@jeffusion/bungee-core 2.1.0 → 2.3.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 (2) hide show
  1. package/dist/worker.js +134 -32
  2. package/package.json +3 -3
package/dist/worker.js CHANGED
@@ -16159,10 +16159,13 @@ class PluginRegistry {
16159
16159
  if (existingFactory) {
16160
16160
  return transformerName;
16161
16161
  }
16162
+ const baseDir = import.meta.dir;
16162
16163
  const possiblePaths = [
16163
- path5.join(__dirname, "plugins", "transformers", `${transformerName}.plugin.ts`),
16164
+ path5.join("/usr/app/data/plugins/transformers", `${transformerName}.plugin.ts`),
16165
+ path5.join(baseDir, "plugins", "transformers", `${transformerName}.plugin.js`),
16166
+ path5.join(baseDir, "plugins", "transformers", `${transformerName}.plugin.ts`),
16164
16167
  path5.join(this.configBasePath, "packages/core/src/plugins/transformers", `${transformerName}.plugin.ts`),
16165
- path5.resolve(__dirname, "../plugins/transformers", `${transformerName}.plugin.ts`)
16168
+ path5.resolve(baseDir, "../plugins/transformers", `${transformerName}.plugin.ts`)
16166
16169
  ];
16167
16170
  for (const pluginPath of possiblePaths) {
16168
16171
  try {
@@ -16251,7 +16254,6 @@ class PluginRegistry {
16251
16254
  }
16252
16255
  }
16253
16256
  }
16254
- var __dirname = "/home/runner/work/bungee/bungee/packages/core/src";
16255
16257
  var init_plugin_registry = __esm(() => {
16256
16258
  init_logger();
16257
16259
  init_plugin_pool();
@@ -20246,6 +20248,53 @@ async function applyBodyRules(body, rules, context, requestLog) {
20246
20248
  logger.debug({ request: requestLog, phase: "after", body: modifiedBody }, "Body after applying rules");
20247
20249
  return modifiedBody;
20248
20250
  }
20251
+ function applyQueryRules(searchParams, rules, context, requestLog) {
20252
+ const modified = new URLSearchParams(searchParams);
20253
+ if (rules) {
20254
+ if (rules.add) {
20255
+ forEach_default(rules.add, (value, key) => {
20256
+ const processed = processDynamicValue(value, context);
20257
+ if (processed !== undefined) {
20258
+ modified.set(key, String(processed));
20259
+ logger.debug({ request: requestLog, query: { key, value: processed } }, "Applied query 'add' rule");
20260
+ }
20261
+ });
20262
+ }
20263
+ if (rules.replace) {
20264
+ forEach_default(rules.replace, (value, key) => {
20265
+ if (modified.has(key) || rules.add && key in rules.add) {
20266
+ const processed = processDynamicValue(value, context);
20267
+ if (processed !== undefined) {
20268
+ modified.set(key, String(processed));
20269
+ logger.debug({ request: requestLog, query: { key, value: processed } }, "Applied query 'replace' rule");
20270
+ }
20271
+ }
20272
+ });
20273
+ }
20274
+ if (rules.default) {
20275
+ forEach_default(rules.default, (value, key) => {
20276
+ if (!modified.has(key)) {
20277
+ const processed = processDynamicValue(value, context);
20278
+ if (processed !== undefined) {
20279
+ modified.set(key, String(processed));
20280
+ logger.debug({ request: requestLog, query: { key, value: processed } }, "Applied query 'default' rule");
20281
+ }
20282
+ }
20283
+ });
20284
+ }
20285
+ if (rules.remove) {
20286
+ for (const key of rules.remove) {
20287
+ const wasAdded = rules.add && key in rules.add;
20288
+ const wasReplaced = rules.replace && key in rules.replace;
20289
+ if (!wasAdded && !wasReplaced) {
20290
+ modified.delete(key);
20291
+ logger.debug({ request: requestLog, query: { key } }, "Removed query parameter");
20292
+ }
20293
+ }
20294
+ }
20295
+ }
20296
+ return modified;
20297
+ }
20249
20298
  var init_modifier = __esm(() => {
20250
20299
  init_lodash();
20251
20300
  init_logger();
@@ -20943,6 +20992,11 @@ async function proxyRequest(requestSnapshot, route, upstream, requestLog, config
20943
20992
  });
20944
20993
  }
20945
20994
  }
20995
+ if (finalRequestRules.query) {
20996
+ logger.debug({ request: requestLog }, "Applying query parameter rules");
20997
+ const modifiedSearchParams = applyQueryRules(new URLSearchParams(targetUrl.search), finalRequestRules.query, finalContext, requestLog);
20998
+ targetUrl.search = modifiedSearchParams.toString();
20999
+ }
20946
21000
  let body = null;
20947
21001
  if (requestSnapshot.body) {
20948
21002
  if (requestSnapshot.isJsonBody) {
@@ -21032,6 +21086,7 @@ async function proxyRequest(requestSnapshot, route, upstream, requestLog, config
21032
21086
  }, `Request with ${isRecoveryAttempt ? "recovery" : "normal"} timeout`);
21033
21087
  let proxyRes;
21034
21088
  try {
21089
+ console.log("????", targetUrl.href, fetchOptions);
21035
21090
  proxyRes = await fetch(targetUrl.href, fetchOptions);
21036
21091
  clearTimeout(timeoutId);
21037
21092
  } catch (error) {
@@ -21180,8 +21235,13 @@ var init_assets = __esm(() => {
21180
21235
  <meta charset="UTF-8" />
21181
21236
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
21182
21237
  <title>Bungee Dashboard</title>
21183
- <script type="module" crossorigin src="/__ui/assets/index-Dbvz-VVG.js"></script>
21184
- <link rel="stylesheet" crossorigin href="/__ui/assets/index-DTHFbwVv.css">
21238
+ <script type="module" crossorigin src="/__ui/assets/index-CoOjxcQP.js"></script>
21239
+ <link rel="modulepreload" crossorigin href="/__ui/assets/vendor-7HrnnMjF.js">
21240
+ <link rel="modulepreload" crossorigin href="/__ui/assets/vendor-charts-o8j72P7f.js">
21241
+ <link rel="modulepreload" crossorigin href="/__ui/assets/vendor-lodash-CRdCilnf.js">
21242
+ <link rel="modulepreload" crossorigin href="/__ui/assets/vendor-svelte-CMCOGsuu.js">
21243
+ <link rel="stylesheet" crossorigin href="/__ui/assets/vendor-svelte-DJA7stl0.css">
21244
+ <link rel="stylesheet" crossorigin href="/__ui/assets/index-m5oE-oos.css">
21185
21245
  </head>
21186
21246
  <body>
21187
21247
  <div id="app"></div>
@@ -21189,41 +21249,30 @@ var init_assets = __esm(() => {
21189
21249
  </html>
21190
21250
  `,
21191
21251
  assets: {
21192
- "index-Dbvz-VVG.js": `var Gp=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var W5=Gp((Gs,Xs)=>{(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();function Ee(){}function Ss(t,e){for(const n in e)t[n]=e[n];return t}function Kh(t){return t()}function ka(){return Object.create(null)}function at(t){t.forEach(Kh)}function ui(t){return typeof t=="function"}function Lt(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}function Xp(t){return Object.keys(t).length===0}function Hr(t,...e){if(t==null){for(const s of e)s(void 0);return Ee}const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function ds(t){let e;return Hr(t,n=>e=n)(),e}function Gt(t,e,n){t.$$.on_destroy.push(Hr(e,n))}function ci(t){const e={};for(const n in t)n[0]!=="$"&&(e[n]=t[n]);return e}function a(t,e){t.appendChild(e)}function H(t,e,n){t.insertBefore(e,n||null)}function L(t){t.parentNode&&t.parentNode.removeChild(t)}function En(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function d(t){return document.createElement(t)}function de(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function E(t){return document.createTextNode(t)}function w(){return E(" ")}function $n(){return E("")}function te(t,e,n,s){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n,s)}function Yp(t){return function(e){return e.preventDefault(),t.call(this,e)}}function c(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}const Jp=["width","height"];function Kp(t,e){const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const s in e)e[s]==null?t.removeAttribute(s):s==="style"?t.style.cssText=e[s]:s==="__value"?t.value=t[s]=e[s]:n[s]&&n[s].set&&Jp.indexOf(s)===-1?t[s]=e[s]:c(t,s,e[s])}function Zp(t){let e;return{p(...n){e=n,e.forEach(s=>t.push(s))},r(){e.forEach(n=>t.splice(t.indexOf(n),1))}}}function gt(t){return t===""?null:+t}function Qp(t){return Array.from(t.childNodes)}function M(t,e){e=""+e,t.data!==e&&(t.data=e)}function ie(t,e){t.value=e??""}function Sa(t,e,n,s){n==null?t.style.removeProperty(e):t.style.setProperty(e,n,"")}function Cn(t,e,n){for(let s=0;s<t.options.length;s+=1){const i=t.options[s];if(i.__value===e){i.selected=!0;return}}(!n||e!==void 0)&&(t.selectedIndex=-1)}function Is(t){const e=t.querySelector(":checked");return e&&e.__value}function Rt(t,e,n){t.classList.toggle(e,!!n)}function $p(t,e,{bubbles:n=!1,cancelable:s=!1}={}){return new CustomEvent(t,{detail:e,bubbles:n,cancelable:s})}let zi;function hl(t){zi=t}function To(){if(!zi)throw new Error("Function called outside component initialization");return zi}function is(t){To().$$.on_mount.push(t)}function eg(t){To().$$.after_update.push(t)}function Ai(t){To().$$.on_destroy.push(t)}function Rl(){const t=To();return(e,n,{cancelable:s=!1}={})=>{const i=t.$$.callbacks[e];if(i){const l=$p(e,n,{cancelable:s});return i.slice().forEach(o=>{o.call(t,l)}),!l.defaultPrevented}return!0}}function tg(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach(s=>s.call(this,e))}const Bi=[],vn=[];let Fi=[];const dr=[],Zh=Promise.resolve();let pr=!1;function Qh(){pr||(pr=!0,Zh.then(ed))}function $h(){return Qh(),Zh}function bs(t){Fi.push(t)}function Jn(t){dr.push(t)}const zo=new Set;let Di=0;function ed(){if(Di!==0)return;const t=zi;do{try{for(;Di<Bi.length;){const e=Bi[Di];Di++,hl(e),ng(e.$$)}}catch(e){throw Bi.length=0,Di=0,e}for(hl(null),Bi.length=0,Di=0;vn.length;)vn.pop()();for(let e=0;e<Fi.length;e+=1){const n=Fi[e];zo.has(n)||(zo.add(n),n())}Fi.length=0}while(Bi.length);for(;dr.length;)dr.pop()();pr=!1,zo.clear(),hl(t)}function ng(t){if(t.fragment!==null){t.update(),at(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(bs)}}function sg(t){const e=[],n=[];Fi.forEach(s=>t.indexOf(s)===-1?e.push(s):n.push(s)),n.forEach(s=>s()),Fi=e}const lo=new Set;let ki;function gs(){ki={r:0,c:[],p:ki}}function ms(){ki.r||at(ki.c),ki=ki.p}function Be(t,e){t&&t.i&&(lo.delete(t),t.i(e))}function Fe(t,e,n,s){if(t&&t.o){if(lo.has(t))return;lo.add(t),ki.c.push(()=>{lo.delete(t),s&&(n&&t.d(1),s())}),t.o(e)}else s&&s()}function et(t){return t?.length!==void 0?t:Array.from(t)}function ig(t,e){t.d(1),e.delete(t.key)}function td(t,e){Fe(t,1,1,()=>{e.delete(t.key)})}function Ir(t,e,n,s,i,l,o,r,u,f,h,p){let g=t.length,m=l.length,_=g;const b={};for(;_--;)b[t[_].key]=_;const k=[],v=new Map,y=new Map,S=[];for(_=m;_--;){const A=p(i,l,_),x=n(A);let P=o.get(x);P?S.push(()=>P.p(A,e)):(P=f(x,A),P.c()),v.set(x,k[_]=P),x in b&&y.set(x,Math.abs(_-b[x]))}const C=new Set,T=new Set;function O(A){Be(A,1),A.m(r,h),o.set(A.key,A),h=A.first,m--}for(;g&&m;){const A=k[m-1],x=t[g-1],P=A.key,D=x.key;A===x?(h=A.first,g--,m--):v.has(D)?!o.has(P)||C.has(P)?O(A):T.has(D)?g--:y.get(P)>y.get(D)?(T.add(P),O(A)):(C.add(D),g--):(u(x,o),g--)}for(;g--;){const A=t[g];v.has(A.key)||u(A,o)}for(;m;)O(k[m-1]);return at(S),k}function Br(t,e){const n={},s={},i={$$scope:1};let l=t.length;for(;l--;){const o=t[l],r=e[l];if(r){for(const u in o)u in r||(s[u]=1);for(const u in r)i[u]||(n[u]=r[u],i[u]=1);t[l]=r}else for(const u in o)i[u]=1}for(const o in s)o in n||(n[o]=void 0);return n}function Fr(t){return typeof t=="object"&&t!==null?t:{}}function Kn(t,e,n){const s=t.$$.props[e];s!==void 0&&(t.$$.bound[s]=n,n(t.$$.ctx[s]))}function pt(t){t&&t.c()}function ut(t,e,n){const{fragment:s,after_update:i}=t.$$;s&&s.m(e,n),bs(()=>{const l=t.$$.on_mount.map(Kh).filter(ui);t.$$.on_destroy?t.$$.on_destroy.push(...l):at(l),t.$$.on_mount=[]}),i.forEach(bs)}function ct(t,e){const n=t.$$;n.fragment!==null&&(sg(n.after_update),at(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function lg(t,e){t.$$.dirty[0]===-1&&(Bi.push(t),Qh(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function jt(t,e,n,s,i,l,o=null,r=[-1]){const u=zi;hl(t);const f=t.$$={fragment:null,ctx:[],props:l,update:Ee,not_equal:i,bound:ka(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(u?u.$$.context:[])),callbacks:ka(),dirty:r,skip_bound:!1,root:e.target||u.$$.root};o&&o(f.root);let h=!1;if(f.ctx=n?n(t,e.props||{},(p,g,...m)=>{const _=m.length?m[0]:g;return f.ctx&&i(f.ctx[p],f.ctx[p]=_)&&(!f.skip_bound&&f.bound[p]&&f.bound[p](_),h&&lg(t,p)),g}):[],f.update(),h=!0,at(f.before_update),f.fragment=s?s(f.ctx):!1,e.target){if(e.hydrate){const p=Qp(e.target);f.fragment&&f.fragment.l(p),p.forEach(L)}else f.fragment&&f.fragment.c();e.intro&&Be(t.$$.fragment),ut(t,e.target,e.anchor),ed()}hl(u)}class zt{$$=void 0;$$set=void 0;$destroy(){ct(this,1),this.$destroy=Ee}$on(e,n){if(!ui(n))return Ee;const s=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return s.push(n),()=>{const i=s.indexOf(n);i!==-1&&s.splice(i,1)}}$set(e){this.$$set&&!Xp(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const og="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(og);const Li=[];function nd(t,e){return{subscribe:Js(t,e).subscribe}}function Js(t,e=Ee){let n;const s=new Set;function i(r){if(Lt(t,r)&&(t=r,n)){const u=!Li.length;for(const f of s)f[1](),Li.push(f,t);if(u){for(let f=0;f<Li.length;f+=2)Li[f][0](Li[f+1]);Li.length=0}}}function l(r){i(r(t))}function o(r,u=Ee){const f=[r,u];return s.add(f),s.size===1&&(n=e(i,l)||Ee),r(t),()=>{s.delete(f),s.size===0&&n&&(n(),n=null)}}return{set:i,update:l,subscribe:o}}function Ns(t,e,n){const s=!Array.isArray(t),i=s?[t]:t;if(!i.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const l=e.length<2;return nd(n,(o,r)=>{let u=!1;const f=[];let h=0,p=Ee;const g=()=>{if(h)return;p();const _=e(s?f[0]:f,o,r);l?o(_):p=ui(_)?_:Ee},m=i.map((_,b)=>Hr(_,k=>{f[b]=k,h&=~(1<<b),u&&g()},()=>{h|=1<<b}));return u=!0,g(),function(){at(m),p(),u=!1}})}function Ea(){const t=window.location.href.indexOf("#/");let e=t>-1?window.location.href.substr(t+1):"/";const n=e.indexOf("?");let s="";return n>-1&&(s=e.substr(n+1),e=e.substr(0,n)),{location:e,querystring:s}}const sd=nd(null,function(e){e(Ea());const n=()=>{e(Ea())};return window.addEventListener("hashchange",n,!1),function(){window.removeEventListener("hashchange",n,!1)}}),rg=Ns(sd,t=>t.location);Ns(sd,t=>t.querystring);async function id(t){if(!t||t.length<1||t.charAt(0)!="/"&&t.indexOf("#/")!==0)throw Error("Invalid parameter location");await $h(),history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0),window.location.hash=(t.charAt(0)=="#"?"":"#")+t}async function Fl(){await $h(),window.history.back()}function ag(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Uo,Ta;function ug(){if(Ta)return Uo;Ta=1;var t=function(y){return e(y)&&!n(y)};function e(v){return!!v&&typeof v=="object"}function n(v){var y=Object.prototype.toString.call(v);return y==="[object RegExp]"||y==="[object Date]"||l(v)}var s=typeof Symbol=="function"&&Symbol.for,i=s?Symbol.for("react.element"):60103;function l(v){return v.$$typeof===i}function o(v){return Array.isArray(v)?[]:{}}function r(v,y){return y.clone!==!1&&y.isMergeableObject(v)?b(o(v),v,y):v}function u(v,y,S){return v.concat(y).map(function(C){return r(C,S)})}function f(v,y){if(!y.customMerge)return b;var S=y.customMerge(v);return typeof S=="function"?S:b}function h(v){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(v).filter(function(y){return Object.propertyIsEnumerable.call(v,y)}):[]}function p(v){return Object.keys(v).concat(h(v))}function g(v,y){try{return y in v}catch{return!1}}function m(v,y){return g(v,y)&&!(Object.hasOwnProperty.call(v,y)&&Object.propertyIsEnumerable.call(v,y))}function _(v,y,S){var C={};return S.isMergeableObject(v)&&p(v).forEach(function(T){C[T]=r(v[T],S)}),p(y).forEach(function(T){m(v,T)||(g(v,T)&&S.isMergeableObject(y[T])?C[T]=f(T,S)(v[T],y[T],S):C[T]=r(y[T],S))}),C}function b(v,y,S){S=S||{},S.arrayMerge=S.arrayMerge||u,S.isMergeableObject=S.isMergeableObject||t,S.cloneUnlessOtherwiseSpecified=r;var C=Array.isArray(y),T=Array.isArray(v),O=C===T;return O?C?S.arrayMerge(v,y,S):_(v,y,S):r(y,S)}b.all=function(y,S){if(!Array.isArray(y))throw new Error("first argument should be an array");return y.reduce(function(C,T){return b(C,T,S)},{})};var k=b;return Uo=k,Uo}var cg=ug();const fg=ag(cg);var gr=function(t,e){return gr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},gr(t,e)};function Mo(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");gr(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var At=function(){return At=Object.assign||function(e){for(var n,s=1,i=arguments.length;s<i;s++){n=arguments[s];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e},At.apply(this,arguments)};function hg(t,e){var n={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,s=Object.getOwnPropertySymbols(t);i<s.length;i++)e.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(t,s[i])&&(n[s[i]]=t[s[i]]);return n}function Vo(t,e,n){if(n||arguments.length===2)for(var s=0,i=e.length,l;s<i;s++)(l||!(s in e))&&(l||(l=Array.prototype.slice.call(e,0,s)),l[s]=e[s]);return t.concat(l||Array.prototype.slice.call(e))}function Wo(t,e){var n=e&&e.cache?e.cache:vg,s=e&&e.serializer?e.serializer:bg,i=e&&e.strategy?e.strategy:gg;return i(t,{cache:n,serializer:s})}function dg(t){return t==null||typeof t=="number"||typeof t=="boolean"}function pg(t,e,n,s){var i=dg(s)?s:n(s),l=e.get(i);return typeof l>"u"&&(l=t.call(this,s),e.set(i,l)),l}function ld(t,e,n){var s=Array.prototype.slice.call(arguments,3),i=n(s),l=e.get(i);return typeof l>"u"&&(l=t.apply(this,s),e.set(i,l)),l}function od(t,e,n,s,i){return n.bind(e,t,s,i)}function gg(t,e){var n=t.length===1?pg:ld;return od(t,this,n,e.cache.create(),e.serializer)}function mg(t,e){return od(t,this,ld,e.cache.create(),e.serializer)}var bg=function(){return JSON.stringify(arguments)},_g=(function(){function t(){this.cache=Object.create(null)}return t.prototype.get=function(e){return this.cache[e]},t.prototype.set=function(e,n){this.cache[e]=n},t})(),vg={create:function(){return new _g}},qo={variadic:mg},_t;(function(t){t[t.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",t[t.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",t[t.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",t[t.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",t[t.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",t[t.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",t[t.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",t[t.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",t[t.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",t[t.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",t[t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",t[t.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",t[t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",t[t.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",t[t.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",t[t.INVALID_TAG=23]="INVALID_TAG",t[t.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",t[t.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",t[t.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(_t||(_t={}));var fn;(function(t){t[t.literal=0]="literal",t[t.argument=1]="argument",t[t.number=2]="number",t[t.date=3]="date",t[t.time=4]="time",t[t.select=5]="select",t[t.plural=6]="plural",t[t.pound=7]="pound",t[t.tag=8]="tag"})(fn||(fn={}));var Ui;(function(t){t[t.number=0]="number",t[t.dateTime=1]="dateTime"})(Ui||(Ui={}));function Ma(t){return t.type===fn.literal}function yg(t){return t.type===fn.argument}function rd(t){return t.type===fn.number}function ad(t){return t.type===fn.date}function ud(t){return t.type===fn.time}function cd(t){return t.type===fn.select}function fd(t){return t.type===fn.plural}function wg(t){return t.type===fn.pound}function hd(t){return t.type===fn.tag}function dd(t){return!!(t&&typeof t=="object"&&t.type===Ui.number)}function mr(t){return!!(t&&typeof t=="object"&&t.type===Ui.dateTime)}var pd=/[ \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]/,kg=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function Sg(t){var e={};return t.replace(kg,function(n){var s=n.length;switch(n[0]){case"G":e.era=s===4?"long":s===5?"narrow":"short";break;case"y":e.year=s===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("\`Y/u/U/r\` (year) patterns are not supported, use \`y\` instead");case"q":case"Q":throw new RangeError("\`q/Q\` (quarter) patterns are not supported");case"M":case"L":e.month=["numeric","2-digit","short","long","narrow"][s-1];break;case"w":case"W":throw new RangeError("\`w/W\` (week) patterns are not supported");case"d":e.day=["numeric","2-digit"][s-1];break;case"D":case"F":case"g":throw new RangeError("\`D/F/g\` (day) patterns are not supported, use \`d\` instead");case"E":e.weekday=s===4?"long":s===5?"narrow":"short";break;case"e":if(s<4)throw new RangeError("\`e..eee\` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][s-4];break;case"c":if(s<4)throw new RangeError("\`c..ccc\` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][s-4];break;case"a":e.hour12=!0;break;case"b":case"B":throw new RangeError("\`b/B\` (period) patterns are not supported, use \`a\` instead");case"h":e.hourCycle="h12",e.hour=["numeric","2-digit"][s-1];break;case"H":e.hourCycle="h23",e.hour=["numeric","2-digit"][s-1];break;case"K":e.hourCycle="h11",e.hour=["numeric","2-digit"][s-1];break;case"k":e.hourCycle="h24",e.hour=["numeric","2-digit"][s-1];break;case"j":case"J":case"C":throw new RangeError("\`j/J/C\` (hour) patterns are not supported, use \`h/H/K/k\` instead");case"m":e.minute=["numeric","2-digit"][s-1];break;case"s":e.second=["numeric","2-digit"][s-1];break;case"S":case"A":throw new RangeError("\`S/A\` (second) patterns are not supported, use \`s\` instead");case"z":e.timeZoneName=s<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("\`Z/O/v/V/X/x\` (timeZone) patterns are not supported, use \`z\` instead")}return""}),e}var Eg=/[\\t-\\r \\x85\\u200E\\u200F\\u2028\\u2029]/i;function Tg(t){if(t.length===0)throw new Error("Number skeleton cannot be empty");for(var e=t.split(Eg).filter(function(g){return g.length>0}),n=[],s=0,i=e;s<i.length;s++){var l=i[s],o=l.split("/");if(o.length===0)throw new Error("Invalid number skeleton");for(var r=o[0],u=o.slice(1),f=0,h=u;f<h.length;f++){var p=h[f];if(p.length===0)throw new Error("Invalid number skeleton")}n.push({stem:r,options:u})}return n}function Mg(t){return t.replace(/^(.*?)-/,"")}var Ca=/^\\.(?:(0+)(\\*)?|(#+)|(0+)(#+))$/g,gd=/^(@+)?(\\+|#+)?[rs]?$/g,Cg=/(\\*)(0+)|(#+)(0+)|(0+)/g,md=/^(0+)$/;function Pa(t){var e={};return t[t.length-1]==="r"?e.roundingPriority="morePrecision":t[t.length-1]==="s"&&(e.roundingPriority="lessPrecision"),t.replace(gd,function(n,s,i){return typeof i!="string"?(e.minimumSignificantDigits=s.length,e.maximumSignificantDigits=s.length):i==="+"?e.minimumSignificantDigits=s.length:s[0]==="#"?e.maximumSignificantDigits=s.length:(e.minimumSignificantDigits=s.length,e.maximumSignificantDigits=s.length+(typeof i=="string"?i.length:0)),""}),e}function bd(t){switch(t){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function Pg(t){var e;if(t[0]==="E"&&t[1]==="E"?(e={notation:"engineering"},t=t.slice(2)):t[0]==="E"&&(e={notation:"scientific"},t=t.slice(1)),e){var n=t.slice(0,2);if(n==="+!"?(e.signDisplay="always",t=t.slice(2)):n==="+?"&&(e.signDisplay="exceptZero",t=t.slice(2)),!md.test(t))throw new Error("Malformed concise eng/scientific notation");e.minimumIntegerDigits=t.length}return e}function Aa(t){var e={},n=bd(t);return n||e}function Ag(t){for(var e={},n=0,s=t;n<s.length;n++){var i=s[n];switch(i.stem){case"percent":case"%":e.style="percent";continue;case"%x100":e.style="percent",e.scale=100;continue;case"currency":e.style="currency",e.currency=i.options[0];continue;case"group-off":case",_":e.useGrouping=!1;continue;case"precision-integer":case".":e.maximumFractionDigits=0;continue;case"measure-unit":case"unit":e.style="unit",e.unit=Mg(i.options[0]);continue;case"compact-short":case"K":e.notation="compact",e.compactDisplay="short";continue;case"compact-long":case"KK":e.notation="compact",e.compactDisplay="long";continue;case"scientific":e=At(At(At({},e),{notation:"scientific"}),i.options.reduce(function(u,f){return At(At({},u),Aa(f))},{}));continue;case"engineering":e=At(At(At({},e),{notation:"engineering"}),i.options.reduce(function(u,f){return At(At({},u),Aa(f))},{}));continue;case"notation-simple":e.notation="standard";continue;case"unit-width-narrow":e.currencyDisplay="narrowSymbol",e.unitDisplay="narrow";continue;case"unit-width-short":e.currencyDisplay="code",e.unitDisplay="short";continue;case"unit-width-full-name":e.currencyDisplay="name",e.unitDisplay="long";continue;case"unit-width-iso-code":e.currencyDisplay="symbol";continue;case"scale":e.scale=parseFloat(i.options[0]);continue;case"rounding-mode-floor":e.roundingMode="floor";continue;case"rounding-mode-ceiling":e.roundingMode="ceil";continue;case"rounding-mode-down":e.roundingMode="trunc";continue;case"rounding-mode-up":e.roundingMode="expand";continue;case"rounding-mode-half-even":e.roundingMode="halfEven";continue;case"rounding-mode-half-down":e.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":e.roundingMode="halfExpand";continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(Cg,function(u,f,h,p,g,m){if(f)e.minimumIntegerDigits=h.length;else{if(p&&g)throw new Error("We currently do not support maximum integer digits");if(m)throw new Error("We currently do not support exact integer digits")}return""});continue}if(md.test(i.stem)){e.minimumIntegerDigits=i.stem.length;continue}if(Ca.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(Ca,function(u,f,h,p,g,m){return h==="*"?e.minimumFractionDigits=f.length:p&&p[0]==="#"?e.maximumFractionDigits=p.length:g&&m?(e.minimumFractionDigits=g.length,e.maximumFractionDigits=g.length+m.length):(e.minimumFractionDigits=f.length,e.maximumFractionDigits=f.length),""});var l=i.options[0];l==="w"?e=At(At({},e),{trailingZeroDisplay:"stripIfInteger"}):l&&(e=At(At({},e),Pa(l)));continue}if(gd.test(i.stem)){e=At(At({},e),Pa(i.stem));continue}var o=bd(i.stem);o&&(e=At(At({},e),o));var r=Pg(i.stem);r&&(e=At(At({},e),r))}return e}var Nl={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function Og(t,e){for(var n="",s=0;s<t.length;s++){var i=t.charAt(s);if(i==="j"){for(var l=0;s+1<t.length&&t.charAt(s+1)===i;)l++,s++;var o=1+(l&1),r=l<2?1:3+(l>>1),u="a",f=xg(e);for((f=="H"||f=="k")&&(r=0);r-- >0;)n+=u;for(;o-- >0;)n=f+n}else i==="J"?n+="H":n+=i}return n}function xg(t){var e=t.hourCycle;if(e===void 0&&t.hourCycles&&t.hourCycles.length&&(e=t.hourCycles[0]),e)switch(e){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=t.language,s;n!=="root"&&(s=t.maximize().region);var i=Nl[s||""]||Nl[n||""]||Nl["".concat(n,"-001")]||Nl["001"];return i[0]}var Go,Rg=new RegExp("^".concat(pd.source,"*")),Dg=new RegExp("".concat(pd.source,"*$"));function wt(t,e){return{start:t,end:e}}var Lg=!!String.prototype.startsWith&&"_a".startsWith("a",1),Hg=!!String.fromCodePoint,Ig=!!Object.fromEntries,Bg=!!String.prototype.codePointAt,Fg=!!String.prototype.trimStart,Ng=!!String.prototype.trimEnd,jg=!!Number.isSafeInteger,zg=jg?Number.isSafeInteger:function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},br=!0;try{var Ug=vd("([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)","yu");br=((Go=Ug.exec("a"))===null||Go===void 0?void 0:Go[0])==="a"}catch{br=!1}var Oa=Lg?function(e,n,s){return e.startsWith(n,s)}:function(e,n,s){return e.slice(s,s+n.length)===n},_r=Hg?String.fromCodePoint:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];for(var s="",i=e.length,l=0,o;i>l;){if(o=e[l++],o>1114111)throw RangeError(o+" is not a valid code point");s+=o<65536?String.fromCharCode(o):String.fromCharCode(((o-=65536)>>10)+55296,o%1024+56320)}return s},xa=Ig?Object.fromEntries:function(e){for(var n={},s=0,i=e;s<i.length;s++){var l=i[s],o=l[0],r=l[1];n[o]=r}return n},_d=Bg?function(e,n){return e.codePointAt(n)}:function(e,n){var s=e.length;if(!(n<0||n>=s)){var i=e.charCodeAt(n),l;return i<55296||i>56319||n+1===s||(l=e.charCodeAt(n+1))<56320||l>57343?i:(i-55296<<10)+(l-56320)+65536}},Vg=Fg?function(e){return e.trimStart()}:function(e){return e.replace(Rg,"")},Wg=Ng?function(e){return e.trimEnd()}:function(e){return e.replace(Dg,"")};function vd(t,e){return new RegExp(t,e)}var vr;if(br){var Ra=vd("([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)","yu");vr=function(e,n){var s;Ra.lastIndex=n;var i=Ra.exec(e);return(s=i[1])!==null&&s!==void 0?s:""}}else vr=function(e,n){for(var s=[];;){var i=_d(e,n);if(i===void 0||yd(i)||Yg(i))break;s.push(i),n+=i>=65536?2:1}return _r.apply(void 0,s)};var qg=(function(){function t(e,n){n===void 0&&(n={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return t.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},t.prototype.parseMessage=function(e,n,s){for(var i=[];!this.isEOF();){var l=this.char();if(l===123){var o=this.parseArgument(e,s);if(o.err)return o;i.push(o.val)}else{if(l===125&&e>0)break;if(l===35&&(n==="plural"||n==="selectordinal")){var r=this.clonePosition();this.bump(),i.push({type:fn.pound,location:wt(r,this.clonePosition())})}else if(l===60&&!this.ignoreTag&&this.peek()===47){if(s)break;return this.error(_t.UNMATCHED_CLOSING_TAG,wt(this.clonePosition(),this.clonePosition()))}else if(l===60&&!this.ignoreTag&&yr(this.peek()||0)){var o=this.parseTag(e,n);if(o.err)return o;i.push(o.val)}else{var o=this.parseLiteral(e,n);if(o.err)return o;i.push(o.val)}}}return{val:i,err:null}},t.prototype.parseTag=function(e,n){var s=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:fn.literal,value:"<".concat(i,"/>"),location:wt(s,this.clonePosition())},err:null};if(this.bumpIf(">")){var l=this.parseMessage(e+1,n,!0);if(l.err)return l;var o=l.val,r=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!yr(this.char()))return this.error(_t.INVALID_TAG,wt(r,this.clonePosition()));var u=this.clonePosition(),f=this.parseTagName();return i!==f?this.error(_t.UNMATCHED_CLOSING_TAG,wt(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:fn.tag,value:i,children:o,location:wt(s,this.clonePosition())},err:null}:this.error(_t.INVALID_TAG,wt(r,this.clonePosition())))}else return this.error(_t.UNCLOSED_TAG,wt(s,this.clonePosition()))}else return this.error(_t.INVALID_TAG,wt(s,this.clonePosition()))},t.prototype.parseTagName=function(){var e=this.offset();for(this.bump();!this.isEOF()&&Xg(this.char());)this.bump();return this.message.slice(e,this.offset())},t.prototype.parseLiteral=function(e,n){for(var s=this.clonePosition(),i="";;){var l=this.tryParseQuote(n);if(l){i+=l;continue}var o=this.tryParseUnquoted(e,n);if(o){i+=o;continue}var r=this.tryParseLeftAngleBracket();if(r){i+=r;continue}break}var u=wt(s,this.clonePosition());return{val:{type:fn.literal,value:i,location:u},err:null}},t.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Gg(this.peek()||0))?(this.bump(),"<"):null},t.prototype.tryParseQuote=function(e){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(e==="plural"||e==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var s=this.char();if(s===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(s);this.bump()}return _r.apply(void 0,n)},t.prototype.tryParseUnquoted=function(e,n){if(this.isEOF())return null;var s=this.char();return s===60||s===123||s===35&&(n==="plural"||n==="selectordinal")||s===125&&e>0?null:(this.bump(),_r(s))},t.prototype.parseArgument=function(e,n){var s=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(_t.EXPECT_ARGUMENT_CLOSING_BRACE,wt(s,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(_t.EMPTY_ARGUMENT,wt(s,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(_t.MALFORMED_ARGUMENT,wt(s,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(_t.EXPECT_ARGUMENT_CLOSING_BRACE,wt(s,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:fn.argument,value:i,location:wt(s,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(_t.EXPECT_ARGUMENT_CLOSING_BRACE,wt(s,this.clonePosition())):this.parseArgumentOptions(e,n,i,s);default:return this.error(_t.MALFORMED_ARGUMENT,wt(s,this.clonePosition()))}},t.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),n=this.offset(),s=vr(this.message,n),i=n+s.length;this.bumpTo(i);var l=this.clonePosition(),o=wt(e,l);return{value:s,location:o}},t.prototype.parseArgumentOptions=function(e,n,s,i){var l,o=this.clonePosition(),r=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(r){case"":return this.error(_t.EXPECT_ARGUMENT_TYPE,wt(o,u));case"number":case"date":case"time":{this.bumpSpace();var f=null;if(this.bumpIf(",")){this.bumpSpace();var h=this.clonePosition(),p=this.parseSimpleArgStyleIfPossible();if(p.err)return p;var g=Wg(p.val);if(g.length===0)return this.error(_t.EXPECT_ARGUMENT_STYLE,wt(this.clonePosition(),this.clonePosition()));var m=wt(h,this.clonePosition());f={style:g,styleLocation:m}}var _=this.tryParseArgumentClose(i);if(_.err)return _;var b=wt(i,this.clonePosition());if(f&&Oa(f?.style,"::",0)){var k=Vg(f.style.slice(2));if(r==="number"){var p=this.parseNumberSkeletonFromString(k,f.styleLocation);return p.err?p:{val:{type:fn.number,value:s,location:b,style:p.val},err:null}}else{if(k.length===0)return this.error(_t.EXPECT_DATE_TIME_SKELETON,b);var v=k;this.locale&&(v=Og(k,this.locale));var g={type:Ui.dateTime,pattern:v,location:f.styleLocation,parsedOptions:this.shouldParseSkeletons?Sg(v):{}},y=r==="date"?fn.date:fn.time;return{val:{type:y,value:s,location:b,style:g},err:null}}}return{val:{type:r==="number"?fn.number:r==="date"?fn.date:fn.time,value:s,location:b,style:(l=f?.style)!==null&&l!==void 0?l:null},err:null}}case"plural":case"selectordinal":case"select":{var S=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(_t.EXPECT_SELECT_ARGUMENT_OPTIONS,wt(S,At({},S)));this.bumpSpace();var C=this.parseIdentifierIfPossible(),T=0;if(r!=="select"&&C.value==="offset"){if(!this.bumpIf(":"))return this.error(_t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,wt(this.clonePosition(),this.clonePosition()));this.bumpSpace();var p=this.tryParseDecimalInteger(_t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,_t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(p.err)return p;this.bumpSpace(),C=this.parseIdentifierIfPossible(),T=p.val}var O=this.tryParsePluralOrSelectOptions(e,r,n,C);if(O.err)return O;var _=this.tryParseArgumentClose(i);if(_.err)return _;var A=wt(i,this.clonePosition());return r==="select"?{val:{type:fn.select,value:s,options:xa(O.val),location:A},err:null}:{val:{type:fn.plural,value:s,options:xa(O.val),offset:T,pluralType:r==="plural"?"cardinal":"ordinal",location:A},err:null}}default:return this.error(_t.INVALID_ARGUMENT_TYPE,wt(o,u))}},t.prototype.tryParseArgumentClose=function(e){return this.isEOF()||this.char()!==125?this.error(_t.EXPECT_ARGUMENT_CLOSING_BRACE,wt(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},t.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,n=this.clonePosition();!this.isEOF();){var s=this.char();switch(s){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(_t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,wt(i,this.clonePosition()));this.bump();break}case 123:{e+=1,this.bump();break}case 125:{if(e>0)e-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},t.prototype.parseNumberSkeletonFromString=function(e,n){var s=[];try{s=Tg(e)}catch{return this.error(_t.INVALID_NUMBER_SKELETON,n)}return{val:{type:Ui.number,tokens:s,location:n,parsedOptions:this.shouldParseSkeletons?Ag(s):{}},err:null}},t.prototype.tryParsePluralOrSelectOptions=function(e,n,s,i){for(var l,o=!1,r=[],u=new Set,f=i.value,h=i.location;;){if(f.length===0){var p=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var g=this.tryParseDecimalInteger(_t.EXPECT_PLURAL_ARGUMENT_SELECTOR,_t.INVALID_PLURAL_ARGUMENT_SELECTOR);if(g.err)return g;h=wt(p,this.clonePosition()),f=this.message.slice(p.offset,this.offset())}else break}if(u.has(f))return this.error(n==="select"?_t.DUPLICATE_SELECT_ARGUMENT_SELECTOR:_t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,h);f==="other"&&(o=!0),this.bumpSpace();var m=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?_t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:_t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,wt(this.clonePosition(),this.clonePosition()));var _=this.parseMessage(e+1,n,s);if(_.err)return _;var b=this.tryParseArgumentClose(m);if(b.err)return b;r.push([f,{value:_.val,location:wt(m,this.clonePosition())}]),u.add(f),this.bumpSpace(),l=this.parseIdentifierIfPossible(),f=l.value,h=l.location}return r.length===0?this.error(n==="select"?_t.EXPECT_SELECT_ARGUMENT_SELECTOR:_t.EXPECT_PLURAL_ARGUMENT_SELECTOR,wt(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(_t.MISSING_OTHER_CLAUSE,wt(this.clonePosition(),this.clonePosition())):{val:r,err:null}},t.prototype.tryParseDecimalInteger=function(e,n){var s=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(s=-1);for(var l=!1,o=0;!this.isEOF();){var r=this.char();if(r>=48&&r<=57)l=!0,o=o*10+(r-48),this.bump();else break}var u=wt(i,this.clonePosition());return l?(o*=s,zg(o)?{val:o,err:null}:this.error(n,u)):this.error(e,u)},t.prototype.offset=function(){return this.position.offset},t.prototype.isEOF=function(){return this.offset()===this.message.length},t.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},t.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var n=_d(this.message,e);if(n===void 0)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return n},t.prototype.error=function(e,n){return{val:null,err:{kind:e,message:this.message,location:n}}},t.prototype.bump=function(){if(!this.isEOF()){var e=this.char();e===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},t.prototype.bumpIf=function(e){if(Oa(this.message,e,this.offset())){for(var n=0;n<e.length;n++)this.bump();return!0}return!1},t.prototype.bumpUntil=function(e){var n=this.offset(),s=this.message.indexOf(e,n);return s>=0?(this.bumpTo(s),!0):(this.bumpTo(this.message.length),!1)},t.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var n=this.offset();if(n===e)break;if(n>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},t.prototype.bumpSpace=function(){for(;!this.isEOF()&&yd(this.char());)this.bump()},t.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),n=this.offset(),s=this.message.charCodeAt(n+(e>=65536?2:1));return s??null},t})();function yr(t){return t>=97&&t<=122||t>=65&&t<=90}function Gg(t){return yr(t)||t===47}function Xg(t){return t===45||t===46||t>=48&&t<=57||t===95||t>=97&&t<=122||t>=65&&t<=90||t==183||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8255&&t<=8256||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}function yd(t){return t>=9&&t<=13||t===32||t===133||t>=8206&&t<=8207||t===8232||t===8233}function Yg(t){return t>=33&&t<=35||t===36||t>=37&&t<=39||t===40||t===41||t===42||t===43||t===44||t===45||t>=46&&t<=47||t>=58&&t<=59||t>=60&&t<=62||t>=63&&t<=64||t===91||t===92||t===93||t===94||t===96||t===123||t===124||t===125||t===126||t===161||t>=162&&t<=165||t===166||t===167||t===169||t===171||t===172||t===174||t===176||t===177||t===182||t===187||t===191||t===215||t===247||t>=8208&&t<=8213||t>=8214&&t<=8215||t===8216||t===8217||t===8218||t>=8219&&t<=8220||t===8221||t===8222||t===8223||t>=8224&&t<=8231||t>=8240&&t<=8248||t===8249||t===8250||t>=8251&&t<=8254||t>=8257&&t<=8259||t===8260||t===8261||t===8262||t>=8263&&t<=8273||t===8274||t===8275||t>=8277&&t<=8286||t>=8592&&t<=8596||t>=8597&&t<=8601||t>=8602&&t<=8603||t>=8604&&t<=8607||t===8608||t>=8609&&t<=8610||t===8611||t>=8612&&t<=8613||t===8614||t>=8615&&t<=8621||t===8622||t>=8623&&t<=8653||t>=8654&&t<=8655||t>=8656&&t<=8657||t===8658||t===8659||t===8660||t>=8661&&t<=8691||t>=8692&&t<=8959||t>=8960&&t<=8967||t===8968||t===8969||t===8970||t===8971||t>=8972&&t<=8991||t>=8992&&t<=8993||t>=8994&&t<=9e3||t===9001||t===9002||t>=9003&&t<=9083||t===9084||t>=9085&&t<=9114||t>=9115&&t<=9139||t>=9140&&t<=9179||t>=9180&&t<=9185||t>=9186&&t<=9254||t>=9255&&t<=9279||t>=9280&&t<=9290||t>=9291&&t<=9311||t>=9472&&t<=9654||t===9655||t>=9656&&t<=9664||t===9665||t>=9666&&t<=9719||t>=9720&&t<=9727||t>=9728&&t<=9838||t===9839||t>=9840&&t<=10087||t===10088||t===10089||t===10090||t===10091||t===10092||t===10093||t===10094||t===10095||t===10096||t===10097||t===10098||t===10099||t===10100||t===10101||t>=10132&&t<=10175||t>=10176&&t<=10180||t===10181||t===10182||t>=10183&&t<=10213||t===10214||t===10215||t===10216||t===10217||t===10218||t===10219||t===10220||t===10221||t===10222||t===10223||t>=10224&&t<=10239||t>=10240&&t<=10495||t>=10496&&t<=10626||t===10627||t===10628||t===10629||t===10630||t===10631||t===10632||t===10633||t===10634||t===10635||t===10636||t===10637||t===10638||t===10639||t===10640||t===10641||t===10642||t===10643||t===10644||t===10645||t===10646||t===10647||t===10648||t>=10649&&t<=10711||t===10712||t===10713||t===10714||t===10715||t>=10716&&t<=10747||t===10748||t===10749||t>=10750&&t<=11007||t>=11008&&t<=11055||t>=11056&&t<=11076||t>=11077&&t<=11078||t>=11079&&t<=11084||t>=11085&&t<=11123||t>=11124&&t<=11125||t>=11126&&t<=11157||t===11158||t>=11159&&t<=11263||t>=11776&&t<=11777||t===11778||t===11779||t===11780||t===11781||t>=11782&&t<=11784||t===11785||t===11786||t===11787||t===11788||t===11789||t>=11790&&t<=11798||t===11799||t>=11800&&t<=11801||t===11802||t===11803||t===11804||t===11805||t>=11806&&t<=11807||t===11808||t===11809||t===11810||t===11811||t===11812||t===11813||t===11814||t===11815||t===11816||t===11817||t>=11818&&t<=11822||t===11823||t>=11824&&t<=11833||t>=11834&&t<=11835||t>=11836&&t<=11839||t===11840||t===11841||t===11842||t>=11843&&t<=11855||t>=11856&&t<=11857||t===11858||t>=11859&&t<=11903||t>=12289&&t<=12291||t===12296||t===12297||t===12298||t===12299||t===12300||t===12301||t===12302||t===12303||t===12304||t===12305||t>=12306&&t<=12307||t===12308||t===12309||t===12310||t===12311||t===12312||t===12313||t===12314||t===12315||t===12316||t===12317||t>=12318&&t<=12319||t===12320||t===12336||t===64830||t===64831||t>=65093&&t<=65094}function wr(t){t.forEach(function(e){if(delete e.location,cd(e)||fd(e))for(var n in e.options)delete e.options[n].location,wr(e.options[n].value);else rd(e)&&dd(e.style)||(ad(e)||ud(e))&&mr(e.style)?delete e.style.location:hd(e)&&wr(e.children)})}function Jg(t,e){e===void 0&&(e={}),e=At({shouldParseSkeletons:!0,requiresOtherClause:!0},e);var n=new qg(t,e).parse();if(n.err){var s=SyntaxError(_t[n.err.kind]);throw s.location=n.err.location,s.originalMessage=n.err.message,s}return e?.captureLocation||wr(n.val),n.val}var Vi;(function(t){t.MISSING_VALUE="MISSING_VALUE",t.INVALID_VALUE="INVALID_VALUE",t.MISSING_INTL_API="MISSING_INTL_API"})(Vi||(Vi={}));var Co=(function(t){Mo(e,t);function e(n,s,i){var l=t.call(this,n)||this;return l.code=s,l.originalMessage=i,l}return e.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},e})(Error),Da=(function(t){Mo(e,t);function e(n,s,i,l){return t.call(this,'Invalid values for "'.concat(n,'": "').concat(s,'". Options are "').concat(Object.keys(i).join('", "'),'"'),Vi.INVALID_VALUE,l)||this}return e})(Co),Kg=(function(t){Mo(e,t);function e(n,s,i){return t.call(this,'Value for "'.concat(n,'" must be of type ').concat(s),Vi.INVALID_VALUE,i)||this}return e})(Co),Zg=(function(t){Mo(e,t);function e(n,s){return t.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(s,'"'),Vi.MISSING_VALUE,s)||this}return e})(Co),ss;(function(t){t[t.literal=0]="literal",t[t.object=1]="object"})(ss||(ss={}));function Qg(t){return t.length<2?t:t.reduce(function(e,n){var s=e[e.length-1];return!s||s.type!==ss.literal||n.type!==ss.literal?e.push(n):s.value+=n.value,e},[])}function $g(t){return typeof t=="function"}function oo(t,e,n,s,i,l,o){if(t.length===1&&Ma(t[0]))return[{type:ss.literal,value:t[0].value}];for(var r=[],u=0,f=t;u<f.length;u++){var h=f[u];if(Ma(h)){r.push({type:ss.literal,value:h.value});continue}if(wg(h)){typeof l=="number"&&r.push({type:ss.literal,value:n.getNumberFormat(e).format(l)});continue}var p=h.value;if(!(i&&p in i))throw new Zg(p,o);var g=i[p];if(yg(h)){(!g||typeof g=="string"||typeof g=="number")&&(g=typeof g=="string"||typeof g=="number"?String(g):""),r.push({type:typeof g=="string"?ss.literal:ss.object,value:g});continue}if(ad(h)){var m=typeof h.style=="string"?s.date[h.style]:mr(h.style)?h.style.parsedOptions:void 0;r.push({type:ss.literal,value:n.getDateTimeFormat(e,m).format(g)});continue}if(ud(h)){var m=typeof h.style=="string"?s.time[h.style]:mr(h.style)?h.style.parsedOptions:s.time.medium;r.push({type:ss.literal,value:n.getDateTimeFormat(e,m).format(g)});continue}if(rd(h)){var m=typeof h.style=="string"?s.number[h.style]:dd(h.style)?h.style.parsedOptions:void 0;m&&m.scale&&(g=g*(m.scale||1)),r.push({type:ss.literal,value:n.getNumberFormat(e,m).format(g)});continue}if(hd(h)){var _=h.children,b=h.value,k=i[b];if(!$g(k))throw new Kg(b,"function",o);var v=oo(_,e,n,s,i,l),y=k(v.map(function(T){return T.value}));Array.isArray(y)||(y=[y]),r.push.apply(r,y.map(function(T){return{type:typeof T=="string"?ss.literal:ss.object,value:T}}))}if(cd(h)){var S=h.options[g]||h.options.other;if(!S)throw new Da(h.value,g,Object.keys(h.options),o);r.push.apply(r,oo(S.value,e,n,s,i));continue}if(fd(h)){var S=h.options["=".concat(g)];if(!S){if(!Intl.PluralRules)throw new Co(\`Intl.PluralRules is not available in this environment.
21193
- Try polyfilling it using "@formatjs/intl-pluralrules"
21194
- \`,Vi.MISSING_INTL_API,o);var C=n.getPluralRules(e,{type:h.pluralType}).select(g-(h.offset||0));S=h.options[C]||h.options.other}if(!S)throw new Da(h.value,g,Object.keys(h.options),o);r.push.apply(r,oo(S.value,e,n,s,i,g-(h.offset||0)));continue}}return Qg(r)}function e0(t,e){return e?At(At(At({},t||{}),e||{}),Object.keys(t).reduce(function(n,s){return n[s]=At(At({},t[s]),e[s]||{}),n},{})):t}function t0(t,e){return e?Object.keys(t).reduce(function(n,s){return n[s]=e0(t[s],e[s]),n},At({},t)):t}function Xo(t){return{create:function(){return{get:function(e){return t[e]},set:function(e,n){t[e]=n}}}}}function n0(t){return t===void 0&&(t={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Wo(function(){for(var e,n=[],s=0;s<arguments.length;s++)n[s]=arguments[s];return new((e=Intl.NumberFormat).bind.apply(e,Vo([void 0],n,!1)))},{cache:Xo(t.number),strategy:qo.variadic}),getDateTimeFormat:Wo(function(){for(var e,n=[],s=0;s<arguments.length;s++)n[s]=arguments[s];return new((e=Intl.DateTimeFormat).bind.apply(e,Vo([void 0],n,!1)))},{cache:Xo(t.dateTime),strategy:qo.variadic}),getPluralRules:Wo(function(){for(var e,n=[],s=0;s<arguments.length;s++)n[s]=arguments[s];return new((e=Intl.PluralRules).bind.apply(e,Vo([void 0],n,!1)))},{cache:Xo(t.pluralRules),strategy:qo.variadic})}}var wd=(function(){function t(e,n,s,i){n===void 0&&(n=t.defaultLocale);var l=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var f=l.formatToParts(u);if(f.length===1)return f[0].value;var h=f.reduce(function(p,g){return!p.length||g.type!==ss.literal||typeof p[p.length-1]!="string"?p.push(g.value):p[p.length-1]+=g.value,p},[]);return h.length<=1?h[0]||"":h},this.formatToParts=function(u){return oo(l.ast,l.locales,l.formatters,l.formats,u,void 0,l.message)},this.resolvedOptions=function(){var u;return{locale:((u=l.resolvedLocale)===null||u===void 0?void 0:u.toString())||Intl.NumberFormat.supportedLocalesOf(l.locales)[0]}},this.getAst=function(){return l.ast},this.locales=n,this.resolvedLocale=t.resolveLocale(n),typeof e=="string"){if(this.message=e,!t.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process \`message\` of type \`string\`");var o=i||{};o.formatters;var r=hg(o,["formatters"]);this.ast=t.__parse(e,At(At({},r),{locale:this.resolvedLocale}))}else this.ast=e;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=t0(t.formats,s),this.formatters=i&&i.formatters||n0(this.formatterCache)}return Object.defineProperty(t,"defaultLocale",{get:function(){return t.memoizedDefaultLocale||(t.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),t.memoizedDefaultLocale},enumerable:!1,configurable:!0}),t.memoizedDefaultLocale=null,t.resolveLocale=function(e){if(!(typeof Intl.Locale>"u")){var n=Intl.NumberFormat.supportedLocalesOf(e);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof e=="string"?e:e[0])}},t.__parse=Jg,t.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},t})();function s0(t,e){if(e==null)return;if(e in t)return t[e];const n=e.split(".");let s=t;for(let i=0;i<n.length;i++)if(typeof s=="object"){if(i>0){const l=n.slice(i,n.length).join(".");if(l in s){s=s[l];break}}s=s[n[i]]}else s=void 0;return s}const ni={},i0=(t,e,n)=>n&&(e in ni||(ni[e]={}),t in ni[e]||(ni[e][t]=n),n),kd=(t,e)=>{if(e==null)return;if(e in ni&&t in ni[e])return ni[e][t];const n=Dl(e);for(let s=0;s<n.length;s++){const i=n[s],l=o0(i,t);if(l)return i0(t,e,l)}};let Nr;const Ji=Js({});function l0(t){return Nr[t]||null}function jr(t){return t in Nr}function o0(t,e){if(!jr(t))return null;const n=l0(t);return s0(n,e)}function r0(t){if(t==null)return;const e=Dl(t);for(let n=0;n<e.length;n++){const s=e[n];if(jr(s))return s}}function a0(t,...e){delete ni[t],Ji.update(n=>(n[t]=fg.all([n[t]||{},...e]),n))}Ns([Ji],([t])=>Object.keys(t));Ji.subscribe(t=>Nr=t);const dl={};function u0(t){dl[t]=new Set}function c0(t,e){dl[t].delete(e),dl[t].size===0&&delete dl[t]}function pl(t){return dl[t]}function f0(t){return Dl(t).map(e=>{const n=pl(e);return[e,n?[...n]:[]]}).filter(([,e])=>e.length>0)}function fo(t){return t==null?!1:Dl(t).some(e=>{var n;return(n=pl(e))==null?void 0:n.size})}function h0(t,e){return Promise.all(e.map(s=>(c0(t,s),s().then(i=>i.default||i)))).then(s=>a0(t,...s))}const $i={};function Sd(t){if(!fo(t))return t in $i?$i[t]:Promise.resolve();const e=f0(t);return $i[t]=Promise.all(e.map(([n,s])=>h0(n,s))).then(()=>{if(fo(t))return Sd(t);delete $i[t]}),$i[t]}function Ed(t,e){pl(t)||u0(t);const n=pl(t);pl(t).has(e)||(jr(t)||Ji.update(s=>(s[t]={},s)),n.add(e))}var La=Object.getOwnPropertySymbols,d0=Object.prototype.hasOwnProperty,p0=Object.prototype.propertyIsEnumerable,g0=(t,e)=>{var n={};for(var s in t)d0.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(t!=null&&La)for(var s of La(t))e.indexOf(s)<0&&p0.call(t,s)&&(n[s]=t[s]);return n};const m0={number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}};function b0({locale:t,id:e}){console.warn(\`[svelte-i18n] The message "\${e}" was not found in "\${Dl(t).join('", "')}".\${fo(hi())?\`
21195
-
21196
- Note: there are at least one loader still registered to this locale that wasn't executed.\`:""}\`)}const _0={fallbackLocale:null,loadingDelay:200,formats:m0,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},rl=_0;function Wi(){return rl}function v0(t){const e=t,{formats:n}=e,s=g0(e,["formats"]);let i=t.fallbackLocale;if(t.initialLocale)try{wd.resolveLocale(t.initialLocale)&&(i=t.initialLocale)}catch{console.warn(\`[svelte-i18n] The initial locale "\${t.initialLocale}" is not a valid locale.\`)}return s.warnOnMissingMessages&&(delete s.warnOnMissingMessages,s.handleMissingMessage==null?s.handleMissingMessage=b0:console.warn('[svelte-i18n] The "warnOnMissingMessages" option is deprecated. Please use the "handleMissingMessage" option instead.')),Object.assign(rl,s,{initialLocale:i}),n&&("number"in n&&Object.assign(rl.formats.number,n.number),"date"in n&&Object.assign(rl.formats.date,n.date),"time"in n&&Object.assign(rl.formats.time,n.time)),di.set(i)}const ro=Js(!1);var y0=Object.defineProperty,w0=Object.defineProperties,k0=Object.getOwnPropertyDescriptors,Ha=Object.getOwnPropertySymbols,S0=Object.prototype.hasOwnProperty,E0=Object.prototype.propertyIsEnumerable,Ia=(t,e,n)=>e in t?y0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,T0=(t,e)=>{for(var n in e||(e={}))S0.call(e,n)&&Ia(t,n,e[n]);if(Ha)for(var n of Ha(e))E0.call(e,n)&&Ia(t,n,e[n]);return t},M0=(t,e)=>w0(t,k0(e));let kr;const ho=Js(null);function Ba(t){return t.split("-").map((e,n,s)=>s.slice(0,n+1).join("-")).reverse()}function Dl(t,e=Wi().fallbackLocale){const n=Ba(t);return e?[...new Set([...n,...Ba(e)])]:n}function hi(){return kr??void 0}ho.subscribe(t=>{kr=t??void 0,typeof window<"u"&&t!=null&&document.documentElement.setAttribute("lang",t)});const C0=t=>{if(t&&r0(t)&&fo(t)){const{loadingDelay:e}=Wi();let n;return typeof window<"u"&&hi()!=null&&e?n=window.setTimeout(()=>ro.set(!0),e):ro.set(!0),Sd(t).then(()=>{ho.set(t)}).finally(()=>{clearTimeout(n),ro.set(!1)})}return ho.set(t)},di=M0(T0({},ho),{set:C0}),P0=()=>typeof window>"u"?null:window.navigator.language||window.navigator.languages[0],Po=t=>{const e=Object.create(null);return s=>{const i=JSON.stringify(s);return i in e?e[i]:e[i]=t(s)}};var A0=Object.defineProperty,po=Object.getOwnPropertySymbols,Td=Object.prototype.hasOwnProperty,Md=Object.prototype.propertyIsEnumerable,Fa=(t,e,n)=>e in t?A0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,zr=(t,e)=>{for(var n in e||(e={}))Td.call(e,n)&&Fa(t,n,e[n]);if(po)for(var n of po(e))Md.call(e,n)&&Fa(t,n,e[n]);return t},Ki=(t,e)=>{var n={};for(var s in t)Td.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(t!=null&&po)for(var s of po(t))e.indexOf(s)<0&&Md.call(t,s)&&(n[s]=t[s]);return n};const yl=(t,e)=>{const{formats:n}=Wi();if(t in n&&e in n[t])return n[t][e];throw new Error(\`[svelte-i18n] Unknown "\${e}" \${t} format.\`)},O0=Po(t=>{var e=t,{locale:n,format:s}=e,i=Ki(e,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return s&&(i=yl("number",s)),new Intl.NumberFormat(n,i)}),x0=Po(t=>{var e=t,{locale:n,format:s}=e,i=Ki(e,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return s?i=yl("date",s):Object.keys(i).length===0&&(i=yl("date","short")),new Intl.DateTimeFormat(n,i)}),R0=Po(t=>{var e=t,{locale:n,format:s}=e,i=Ki(e,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return s?i=yl("time",s):Object.keys(i).length===0&&(i=yl("time","short")),new Intl.DateTimeFormat(n,i)}),D0=(t={})=>{var e=t,{locale:n=hi()}=e,s=Ki(e,["locale"]);return O0(zr({locale:n},s))},L0=(t={})=>{var e=t,{locale:n=hi()}=e,s=Ki(e,["locale"]);return x0(zr({locale:n},s))},H0=(t={})=>{var e=t,{locale:n=hi()}=e,s=Ki(e,["locale"]);return R0(zr({locale:n},s))},I0=Po((t,e=hi())=>new wd(t,e,Wi().formats,{ignoreTag:Wi().ignoreTag})),B0=(t,e={})=>{var n,s,i,l;let o=e;typeof t=="object"&&(o=t,t=o.id);const{values:r,locale:u=hi(),default:f}=o;if(u==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let h=kd(t,u);if(!h)h=(l=(i=(s=(n=Wi()).handleMissingMessage)==null?void 0:s.call(n,{locale:u,id:t,defaultValue:f}))!=null?i:f)!=null?l:t;else if(typeof h!="string")return console.warn(\`[svelte-i18n] Message with id "\${t}" must be of type "string", found: "\${typeof h}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.\`),h;if(!r)return h;let p=h;try{p=I0(h,u).format(r)}catch(g){g instanceof Error&&console.warn(\`[svelte-i18n] Message "\${t}" has syntax error:\`,g.message)}return p},F0=(t,e)=>H0(e).format(t),N0=(t,e)=>L0(e).format(t),j0=(t,e)=>D0(e).format(t),z0=(t,e=hi())=>kd(t,e),Et=Ns([di,Ji],()=>B0);Ns([di],()=>F0);Ns([di],()=>N0);Ns([di],()=>j0);Ns([di,Ji],()=>z0);const U0="modulepreload",V0=function(t){return"/__ui/"+t},Na={},Cd=function(e,n,s){let i=Promise.resolve();if(n&&n.length>0){let o=function(f){return Promise.all(f.map(h=>Promise.resolve(h).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const r=document.querySelector("meta[property=csp-nonce]"),u=r?.nonce||r?.getAttribute("nonce");i=o(n.map(f=>{if(f=V0(f),f in Na)return;Na[f]=!0;const h=f.endsWith(".css"),p=h?'[rel="stylesheet"]':"";if(document.querySelector(\`link[href="\${f}"]\${p}\`))return;const g=document.createElement("link");if(g.rel=h?"stylesheet":U0,h||(g.as="script"),g.crossOrigin="",g.href=f,u&&g.setAttribute("nonce",u),document.head.appendChild(g),h)return new Promise((m,_)=>{g.addEventListener("load",m),g.addEventListener("error",()=>_(new Error(\`Unable to preload CSS for \${f}\`)))})}))}function l(o){const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=o,window.dispatchEvent(r),!r.defaultPrevented)throw o}return i.then(o=>{for(const r of o||[])r.status==="rejected"&&l(r.reason);return e().catch(l)})},Pd="zh-CN",Ad="locale",jl=[{code:"zh-CN",name:"\u4E2D\u6587"},{code:"en",name:"English"}];Ed("zh-CN",()=>Cd(()=>import("./zh-CN-bARHc6B8.js"),[]));Ed("en",()=>Cd(()=>import("./en-Woa_MXgq.js"),[]));function W0(){return typeof localStorage<"u"?localStorage.getItem(Ad):null}function q0(t){typeof localStorage<"u"&&localStorage.setItem(Ad,t)}function G0(t){di.set(t),q0(t)}const X0=W0(),Y0=P0(),J0=X0||Y0||Pd;v0({fallbackLocale:Pd,initialLocale:J0});const Ll="bungee_auth_token",Od=Js(typeof window<"u"?localStorage.getItem(Ll):null),go=Js(typeof window<"u"?!!localStorage.getItem(Ll):!1),ja=Js(!1);function K0(t){typeof window>"u"||(localStorage.setItem(Ll,t),Od.set(t),go.set(!0))}function xd(){typeof window>"u"||(localStorage.removeItem(Ll),Od.set(null),go.set(!1))}function Rd(){return typeof window>"u"?null:localStorage.getItem(Ll)}const Z0="/__ui/api";async function zl(t,e){const n=\`\${Z0}\${t}\`,s=Rd(),i={"Content-Type":"application/json",...e?.headers};s&&(i.Authorization=\`Bearer \${s}\`);const l=await fetch(n,{...e,headers:i});if(l.status===401)throw xd(),window.location.hash="#/login",new Error("Unauthorized: Please login");if(!l.ok){const r=await l.json().catch(()=>({error:"Unknown error"}));throw new Error(r.error||\`Request failed with status \${l.status}\`)}return await l.json()}const dn={get:t=>zl(t),post:(t,e)=>zl(t,{method:"POST",body:JSON.stringify(e)}),put:(t,e)=>zl(t,{method:"PUT",body:JSON.stringify(e)}),delete:t=>zl(t,{method:"DELETE"})};async function Ur(){return dn.get("/config")}async function Q0(t){return dn.put("/config",t)}async function $0(t){return dn.post("/config/validate",t)}async function em(t="1h"){return dn.get(\`/stats/history/v2?range=\${t}\`)}async function tm(t="1h"){return dn.get(\`/stats/upstream-distribution?range=\${t}\`)}async function nm(t="1h"){return dn.get(\`/stats/upstream-failures?range=\${t}\`)}async function sm(t="1h"){return dn.get(\`/stats/upstream-status-codes?range=\${t}\`)}/*!
21197
- * @kurkle/color v0.3.4
21198
- * https://github.com/kurkle/color#readme
21199
- * (c) 2024 Jukka Kurkela
21200
- * Released under the MIT License
21201
- */function Hl(t){return t+.5|0}const si=(t,e,n)=>Math.max(Math.min(t,n),e);function al(t){return si(Hl(t*2.55),0,255)}function ri(t){return si(Hl(t*255),0,255)}function Ws(t){return si(Hl(t/2.55)/100,0,1)}function za(t){return si(Hl(t*100),0,100)}const ws={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Sr=[..."0123456789ABCDEF"],im=t=>Sr[t&15],lm=t=>Sr[(t&240)>>4]+Sr[t&15],Ul=t=>(t&240)>>4===(t&15),om=t=>Ul(t.r)&&Ul(t.g)&&Ul(t.b)&&Ul(t.a);function rm(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&ws[t[1]]*17,g:255&ws[t[2]]*17,b:255&ws[t[3]]*17,a:e===5?ws[t[4]]*17:255}:(e===7||e===9)&&(n={r:ws[t[1]]<<4|ws[t[2]],g:ws[t[3]]<<4|ws[t[4]],b:ws[t[5]]<<4|ws[t[6]],a:e===9?ws[t[7]]<<4|ws[t[8]]:255})),n}const am=(t,e)=>t<255?e(t):"";function um(t){var e=om(t)?im:lm;return t?"#"+e(t.r)+e(t.g)+e(t.b)+am(t.a,e):void 0}const cm=/^(hsla?|hwb|hsv)\\(\\s*([-+.e\\d]+)(?:deg)?[\\s,]+([-+.e\\d]+)%[\\s,]+([-+.e\\d]+)%(?:[\\s,]+([-+.e\\d]+)(%)?)?\\s*\\)$/;function Dd(t,e,n){const s=e*Math.min(n,1-n),i=(l,o=(l+t/30)%12)=>n-s*Math.max(Math.min(o-3,9-o,1),-1);return[i(0),i(8),i(4)]}function fm(t,e,n){const s=(i,l=(i+t/60)%6)=>n-n*e*Math.max(Math.min(l,4-l,1),0);return[s(5),s(3),s(1)]}function hm(t,e,n){const s=Dd(t,1,.5);let i;for(e+n>1&&(i=1/(e+n),e*=i,n*=i),i=0;i<3;i++)s[i]*=1-e-n,s[i]+=e;return s}function dm(t,e,n,s,i){return t===i?(e-n)/s+(e<n?6:0):e===i?(n-t)/s+2:(t-e)/s+4}function Vr(t){const n=t.r/255,s=t.g/255,i=t.b/255,l=Math.max(n,s,i),o=Math.min(n,s,i),r=(l+o)/2;let u,f,h;return l!==o&&(h=l-o,f=r>.5?h/(2-l-o):h/(l+o),u=dm(n,s,i,h,l),u=u*60+.5),[u|0,f||0,r]}function Wr(t,e,n,s){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,s)).map(ri)}function qr(t,e,n){return Wr(Dd,t,e,n)}function pm(t,e,n){return Wr(hm,t,e,n)}function gm(t,e,n){return Wr(fm,t,e,n)}function Ld(t){return(t%360+360)%360}function mm(t){const e=cm.exec(t);let n=255,s;if(!e)return;e[5]!==s&&(n=e[6]?al(+e[5]):ri(+e[5]));const i=Ld(+e[2]),l=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?s=pm(i,l,o):e[1]==="hsv"?s=gm(i,l,o):s=qr(i,l,o),{r:s[0],g:s[1],b:s[2],a:n}}function bm(t,e){var n=Vr(t);n[0]=Ld(n[0]+e),n=qr(n),t.r=n[0],t.g=n[1],t.b=n[2]}function _m(t){if(!t)return;const e=Vr(t),n=e[0],s=za(e[1]),i=za(e[2]);return t.a<255?\`hsla(\${n}, \${s}%, \${i}%, \${Ws(t.a)})\`:\`hsl(\${n}, \${s}%, \${i}%)\`}const Ua={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Va={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function vm(){const t={},e=Object.keys(Va),n=Object.keys(Ua);let s,i,l,o,r;for(s=0;s<e.length;s++){for(o=r=e[s],i=0;i<n.length;i++)l=n[i],r=r.replace(l,Ua[l]);l=parseInt(Va[o],16),t[r]=[l>>16&255,l>>8&255,l&255]}return t}let Vl;function ym(t){Vl||(Vl=vm(),Vl.transparent=[0,0,0,0]);const e=Vl[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const wm=/^rgba?\\(\\s*([-+.\\d]+)(%)?[\\s,]+([-+.e\\d]+)(%)?[\\s,]+([-+.e\\d]+)(%)?(?:[\\s,/]+([-+.e\\d]+)(%)?)?\\s*\\)$/;function km(t){const e=wm.exec(t);let n=255,s,i,l;if(e){if(e[7]!==s){const o=+e[7];n=e[8]?al(o):si(o*255,0,255)}return s=+e[1],i=+e[3],l=+e[5],s=255&(e[2]?al(s):si(s,0,255)),i=255&(e[4]?al(i):si(i,0,255)),l=255&(e[6]?al(l):si(l,0,255)),{r:s,g:i,b:l,a:n}}}function Sm(t){return t&&(t.a<255?\`rgba(\${t.r}, \${t.g}, \${t.b}, \${Ws(t.a)})\`:\`rgb(\${t.r}, \${t.g}, \${t.b})\`)}const Yo=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,Hi=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function Em(t,e,n){const s=Hi(Ws(t.r)),i=Hi(Ws(t.g)),l=Hi(Ws(t.b));return{r:ri(Yo(s+n*(Hi(Ws(e.r))-s))),g:ri(Yo(i+n*(Hi(Ws(e.g))-i))),b:ri(Yo(l+n*(Hi(Ws(e.b))-l))),a:t.a+n*(e.a-t.a)}}function Wl(t,e,n){if(t){let s=Vr(t);s[e]=Math.max(0,Math.min(s[e]+s[e]*n,e===0?360:1)),s=qr(s),t.r=s[0],t.g=s[1],t.b=s[2]}}function Hd(t,e){return t&&Object.assign(e||{},t)}function Wa(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=ri(t[3]))):(e=Hd(t,{r:0,g:0,b:0,a:1}),e.a=ri(e.a)),e}function Tm(t){return t.charAt(0)==="r"?km(t):mm(t)}class wl{constructor(e){if(e instanceof wl)return e;const n=typeof e;let s;n==="object"?s=Wa(e):n==="string"&&(s=rm(e)||ym(e)||Tm(e)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var e=Hd(this._rgb);return e&&(e.a=Ws(e.a)),e}set rgb(e){this._rgb=Wa(e)}rgbString(){return this._valid?Sm(this._rgb):void 0}hexString(){return this._valid?um(this._rgb):void 0}hslString(){return this._valid?_m(this._rgb):void 0}mix(e,n){if(e){const s=this.rgb,i=e.rgb;let l;const o=n===l?.5:n,r=2*o-1,u=s.a-i.a,f=((r*u===-1?r:(r+u)/(1+r*u))+1)/2;l=1-f,s.r=255&f*s.r+l*i.r+.5,s.g=255&f*s.g+l*i.g+.5,s.b=255&f*s.b+l*i.b+.5,s.a=o*s.a+(1-o)*i.a,this.rgb=s}return this}interpolate(e,n){return e&&(this._rgb=Em(this._rgb,e._rgb,n)),this}clone(){return new wl(this.rgb)}alpha(e){return this._rgb.a=ri(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=Hl(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=n,this}opaquer(e){const n=this._rgb;return n.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Wl(this._rgb,2,e),this}darken(e){return Wl(this._rgb,2,-e),this}saturate(e){return Wl(this._rgb,1,e),this}desaturate(e){return Wl(this._rgb,1,-e),this}rotate(e){return bm(this._rgb,e),this}}/*!
21252
+ "vendor-svelte-CMCOGsuu.js": 'import{d as n2,I as E0,v as gr}from"./vendor-7HrnnMjF.js";import{L as r2,C as of,a as T0,b as M0,P as a2,c as i2,p as u2,d as nf,e as rf,D as f2,A as c2,B as d2,f as p2}from"./vendor-charts-o8j72P7f.js";import{s as h2}from"./vendor-lodash-CRdCilnf.js";function tt(){}function Jb(t,l){for(const e in l)t[e]=l[e];return t}function S0(t){return t()}function I1(){return Object.create(null)}function bt(t){t.forEach(S0)}function ko(t){return typeof t=="function"}function At(t,l){return t!=t?l==l:t!==l||t&&typeof t=="object"||typeof t=="function"}function m2(t){return Object.keys(t).length===0}function af(t,...l){if(t==null){for(const n of l)n(void 0);return tt}const e=t.subscribe(...l);return e.unsubscribe?()=>e.unsubscribe():e}function Cs(t){let l;return af(t,e=>l=e)(),l}function Dt(t,l,e){t.$$.on_destroy.push(af(l,e))}function Wb(t){const l={};for(const e in t)e[0]!=="$"&&(l[e]=t[e]);return l}function s(t,l){t.appendChild(l)}function j(t,l,e){t.insertBefore(l,e||null)}function P(t){t.parentNode&&t.parentNode.removeChild(t)}function Gt(t,l){for(let e=0;e<t.length;e+=1)t[e]&&t[e].d(l)}function a(t){return document.createElement(t)}function ae(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function _(t){return document.createTextNode(t)}function h(){return _(" ")}function Ul(){return _("")}function V(t,l,e,n){return t.addEventListener(l,e,n),()=>t.removeEventListener(l,e,n)}function o(t,l,e){e==null?t.removeAttribute(l):t.getAttribute(l)!==e&&t.setAttribute(l,e)}const g2=["width","height"];function Gb(t,l){const e=Object.getOwnPropertyDescriptors(t.__proto__);for(const n in l)l[n]==null?t.removeAttribute(n):n==="style"?t.style.cssText=l[n]:n==="__value"?t.value=t[n]=l[n]:e[n]&&e[n].set&&g2.indexOf(n)===-1?t[n]=l[n]:o(t,n,l[n])}function uf(t){let l;return{p(...e){l=e,l.forEach(n=>t.push(n))},r(){l.forEach(e=>t.splice(t.indexOf(e),1))}}}function St(t){return t===""?null:+t}function _2(t){return Array.from(t.childNodes)}function k(t,l){l=""+l,t.data!==l&&(t.data=l)}function Q(t,l){t.value=l??""}function B1(t,l,e,n){e==null?t.style.removeProperty(l):t.style.setProperty(l,e,"")}function kt(t,l,e){for(let n=0;n<t.options.length;n+=1){const r=t.options[n];if(r.__value===l){r.selected=!0;return}}(!e||l!==void 0)&&(t.selectedIndex=-1)}function pl(t){const l=t.querySelector(":checked");return l&&l.__value}function le(t,l,e){t.classList.toggle(l,!!e)}function b2(t,l,{bubbles:e=!1,cancelable:n=!1}={}){return new CustomEvent(t,{detail:l,bubbles:e,cancelable:n})}let wr;function _r(t){wr=t}function Si(){if(!wr)throw new Error("Function called outside component initialization");return wr}function Hs(t){Si().$$.on_mount.push(t)}function Kb(t){Si().$$.after_update.push(t)}function ir(t){Si().$$.on_destroy.push(t)}function Cr(){const t=Si();return(l,e,{cancelable:n=!1}={})=>{const r=t.$$.callbacks[l];if(r){const i=b2(l,e,{cancelable:n});return r.slice().forEach(u=>{u.call(t,i)}),!i.defaultPrevented}return!0}}function Qb(t,l){const e=t.$$.callbacks[l.type];e&&e.slice().forEach(n=>n.call(this,l))}const sr=[],bl=[];let nr=[];const tf=[],R0=Promise.resolve();let lf=!1;function q0(){lf||(lf=!0,R0.then(P0))}function H0(){return q0(),R0}function tl(t){nr.push(t)}function Sl(t){tf.push(t)}const Xu=new Set;let tr=0;function P0(){if(tr!==0)return;const t=wr;do{try{for(;tr<sr.length;){const l=sr[tr];tr++,_r(l),v2(l.$$)}}catch(l){throw sr.length=0,tr=0,l}for(_r(null),sr.length=0,tr=0;bl.length;)bl.pop()();for(let l=0;l<nr.length;l+=1){const e=nr[l];Xu.has(e)||(Xu.add(e),e())}nr.length=0}while(sr.length);for(;tf.length;)tf.pop()();lf=!1,Xu.clear(),_r(t)}function v2(t){if(t.fragment!==null){t.update(),bt(t.before_update);const l=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,l),t.after_update.forEach(tl)}}function k2(t){const l=[],e=[];nr.forEach(n=>t.indexOf(n)===-1?l.push(n):e.push(n)),e.forEach(n=>n()),nr=l}const vi=new Set;let So;function Gl(){So={r:0,c:[],p:So}}function Kl(){So.r||bt(So.c),So=So.p}function et(t,l){t&&t.i&&(vi.delete(t),t.i(l))}function st(t,l,e,n){if(t&&t.o){if(vi.has(t))return;vi.add(t),So.c.push(()=>{vi.delete(t),n&&(e&&t.d(1),n())}),t.o(l)}else n&&n()}function ut(t){return t?.length!==void 0?t:Array.from(t)}function j0(t,l){t.d(1),l.delete(t.key)}function w2(t,l){st(t,1,1,()=>{l.delete(t.key)})}function ff(t,l,e,n,r,i,u,c,f,d,p,m){let g=t.length,b=i.length,v=g;const w={};for(;v--;)w[t[v].key]=v;const C=[],E=new Map,y=new Map,T=[];for(v=b;v--;){const H=m(r,i,v),I=e(H);let R=u.get(I);R?T.push(()=>R.p(H,l)):(R=d(I,H),R.c()),E.set(I,C[v]=R),I in w&&y.set(I,Math.abs(v-w[I]))}const S=new Set,q=new Set;function D(H){et(H,1),H.m(c,p),u.set(H.key,H),p=H.first,b--}for(;g&&b;){const H=C[b-1],I=t[g-1],R=H.key,L=I.key;H===I?(p=H.first,g--,b--):E.has(L)?!u.has(R)||S.has(R)?D(H):q.has(L)?g--:y.get(R)>y.get(L)?(q.add(R),D(H)):(S.add(L),g--):(f(I,u),g--)}for(;g--;){const H=t[g];E.has(H.key)||f(H,u)}for(;b;)D(C[b-1]);return bt(T),C}function Yb(t,l){const e={},n={},r={$$scope:1};let i=t.length;for(;i--;){const u=t[i],c=l[i];if(c){for(const f in u)f in c||(n[f]=1);for(const f in c)r[f]||(e[f]=c[f],r[f]=1);t[i]=c}else for(const f in u)r[f]=1}for(const u in n)u in e||(e[u]=void 0);return e}function Zb(t){return typeof t=="object"&&t!==null?t:{}}function Rl(t,l,e){const n=t.$$.props[l];n!==void 0&&(t.$$.bound[n]=e,e(t.$$.ctx[n]))}function Et(t){t&&t.c()}function yt(t,l,e){const{fragment:n,after_update:r}=t.$$;n&&n.m(l,e),tl(()=>{const i=t.$$.on_mount.map(S0).filter(ko);t.$$.on_destroy?t.$$.on_destroy.push(...i):bt(i),t.$$.on_mount=[]}),r.forEach(tl)}function Ct(t,l){const e=t.$$;e.fragment!==null&&(k2(e.after_update),bt(e.on_destroy),e.fragment&&e.fragment.d(l),e.on_destroy=e.fragment=null,e.ctx=[])}function y2(t,l){t.$$.dirty[0]===-1&&(sr.push(t),q0(),t.$$.dirty.fill(0)),t.$$.dirty[l/31|0]|=1<<l%31}function Ut(t,l,e,n,r,i,u=null,c=[-1]){const f=wr;_r(t);const d=t.$$={fragment:null,ctx:[],props:i,update:tt,not_equal:r,bound:I1(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(l.context||(f?f.$$.context:[])),callbacks:I1(),dirty:c,skip_bound:!1,root:l.target||f.$$.root};u&&u(d.root);let p=!1;if(d.ctx=e?e(t,l.props||{},(m,g,...b)=>{const v=b.length?b[0]:g;return d.ctx&&r(d.ctx[m],d.ctx[m]=v)&&(!d.skip_bound&&d.bound[m]&&d.bound[m](v),p&&y2(t,m)),g}):[],d.update(),p=!0,bt(d.before_update),d.fragment=n?n(d.ctx):!1,l.target){if(l.hydrate){const m=_2(l.target);d.fragment&&d.fragment.l(m),m.forEach(P)}else d.fragment&&d.fragment.c();l.intro&&et(t.$$.fragment),yt(t,l.target,l.anchor),P0()}_r(f)}class Vt{$$=void 0;$$set=void 0;$destroy(){Ct(this,1),this.$destroy=tt}$on(l,e){if(!ko(e))return tt;const n=this.$$.callbacks[l]||(this.$$.callbacks[l]=[]);return n.push(e),()=>{const r=n.indexOf(e);r!==-1&&n.splice(r,1)}}$set(l){this.$$set&&!m2(l)&&(this.$$.skip_bound=!0,this.$$set(l),this.$$.skip_bound=!1)}}const C2="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(C2);const lr=[];function L0(t,l){return{subscribe:lo(t,l).subscribe}}function lo(t,l=tt){let e;const n=new Set;function r(c){if(At(t,c)&&(t=c,e)){const f=!lr.length;for(const d of n)d[1](),lr.push(d,t);if(f){for(let d=0;d<lr.length;d+=2)lr[d][0](lr[d+1]);lr.length=0}}}function i(c){r(c(t))}function u(c,f=tt){const d=[c,f];return n.add(d),n.size===1&&(e=l(r,i)||tt),c(t),()=>{n.delete(d),n.size===0&&e&&(e(),e=null)}}return{set:r,update:i,subscribe:u}}function so(t,l,e){const n=!Array.isArray(t),r=n?[t]:t;if(!r.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const i=l.length<2;return L0(e,(u,c)=>{let f=!1;const d=[];let p=0,m=tt;const g=()=>{if(p)return;m();const v=l(n?d[0]:d,u,c);i?u(v):m=ko(v)?v:tt},b=r.map((v,w)=>af(v,C=>{d[w]=C,p&=~(1<<w),f&&g()},()=>{p|=1<<w}));return f=!0,g(),function(){bt(b),m(),f=!1}})}function A1(){const t=window.location.href.indexOf("#/");let l=t>-1?window.location.href.substr(t+1):"/";const e=l.indexOf("?");let n="";return e>-1&&(n=l.substr(e+1),l=l.substr(0,e)),{location:l,querystring:n}}const D0=L0(null,function(l){l(A1());const e=()=>{l(A1())};return window.addEventListener("hashchange",e,!1),function(){window.removeEventListener("hashchange",e,!1)}}),E2=so(D0,t=>t.location);so(D0,t=>t.querystring);async function I0(t){if(!t||t.length<1||t.charAt(0)!="/"&&t.indexOf("#/")!==0)throw Error("Invalid parameter location");await H0(),history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0),window.location.hash=(t.charAt(0)=="#"?"":"#")+t}async function hi(){await H0(),window.history.back()}function T2(t,l){if(l==null)return;if(l in t)return t[l];const e=l.split(".");let n=t;for(let r=0;r<e.length;r++)if(typeof n=="object"){if(r>0){const i=e.slice(r,e.length).join(".");if(i in n){n=n[i];break}}n=n[e[r]]}else n=void 0;return n}const bo={},M2=(t,l,e)=>e&&(l in bo||(bo[l]={}),t in bo[l]||(bo[l][t]=e),e),B0=(t,l)=>{if(l==null)return;if(l in bo&&t in bo[l])return bo[l][t];const e=Er(l);for(let n=0;n<e.length;n++){const r=e[n],i=R2(r,t);if(i)return M2(t,l,i)}};let cf;const ur=lo({});function S2(t){return cf[t]||null}function df(t){return t in cf}function R2(t,l){if(!df(t))return null;const e=S2(t);return T2(e,l)}function q2(t){if(t==null)return;const l=Er(t);for(let e=0;e<l.length;e++){const n=l[e];if(df(n))return n}}function H2(t,...l){delete bo[t],ur.update(e=>(e[t]=n2.all([e[t]||{},...l]),e))}so([ur],([t])=>Object.keys(t));ur.subscribe(t=>cf=t);const br={};function P2(t){br[t]=new Set}function j2(t,l){br[t].delete(l),br[t].size===0&&delete br[t]}function vr(t){return br[t]}function L2(t){return Er(t).map(l=>{const e=vr(l);return[l,e?[...e]:[]]}).filter(([,l])=>l.length>0)}function yi(t){return t==null?!1:Er(t).some(l=>{var e;return(e=vr(l))==null?void 0:e.size})}function D2(t,l){return Promise.all(l.map(n=>(j2(t,n),n().then(r=>r.default||r)))).then(n=>H2(t,...n))}const pr={};function A0(t){if(!yi(t))return t in pr?pr[t]:Promise.resolve();const l=L2(t);return pr[t]=Promise.all(l.map(([e,n])=>D2(e,n))).then(()=>{if(yi(t))return A0(t);delete pr[t]}),pr[t]}function O0(t,l){vr(t)||P2(t);const e=vr(t);vr(t).has(l)||(df(t)||ur.update(n=>(n[t]={},n)),e.add(l))}var O1=Object.getOwnPropertySymbols,I2=Object.prototype.hasOwnProperty,B2=Object.prototype.propertyIsEnumerable,A2=(t,l)=>{var e={};for(var n in t)I2.call(t,n)&&l.indexOf(n)<0&&(e[n]=t[n]);if(t!=null&&O1)for(var n of O1(t))l.indexOf(n)<0&&B2.call(t,n)&&(e[n]=t[n]);return e};const O2={number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}};function F2({locale:t,id:l}){console.warn(`[svelte-i18n] The message "${l}" was not found in "${Er(t).join(\'", "\')}".${yi(wo())?`\n\nNote: there are at least one loader still registered to this locale that wasn\'t executed.`:""}`)}const z2={fallbackLocale:null,loadingDelay:200,formats:O2,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},hr=z2;function rr(){return hr}function N2(t){const l=t,{formats:e}=l,n=A2(l,["formats"]);let r=t.fallbackLocale;if(t.initialLocale)try{E0.resolveLocale(t.initialLocale)&&(r=t.initialLocale)}catch{console.warn(`[svelte-i18n] The initial locale "${t.initialLocale}" is not a valid locale.`)}return n.warnOnMissingMessages&&(delete n.warnOnMissingMessages,n.handleMissingMessage==null?n.handleMissingMessage=F2:console.warn(\'[svelte-i18n] The "warnOnMissingMessages" option is deprecated. Please use the "handleMissingMessage" option instead.\')),Object.assign(hr,n,{initialLocale:r}),e&&("number"in e&&Object.assign(hr.formats.number,e.number),"date"in e&&Object.assign(hr.formats.date,e.date),"time"in e&&Object.assign(hr.formats.time,e.time)),yo.set(r)}const ki=lo(!1);var U2=Object.defineProperty,V2=Object.defineProperties,J2=Object.getOwnPropertyDescriptors,F1=Object.getOwnPropertySymbols,W2=Object.prototype.hasOwnProperty,G2=Object.prototype.propertyIsEnumerable,z1=(t,l,e)=>l in t?U2(t,l,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[l]=e,K2=(t,l)=>{for(var e in l||(l={}))W2.call(l,e)&&z1(t,e,l[e]);if(F1)for(var e of F1(l))G2.call(l,e)&&z1(t,e,l[e]);return t},Q2=(t,l)=>V2(t,J2(l));let sf;const Ci=lo(null);function N1(t){return t.split("-").map((l,e,n)=>n.slice(0,e+1).join("-")).reverse()}function Er(t,l=rr().fallbackLocale){const e=N1(t);return l?[...new Set([...e,...N1(l)])]:e}function wo(){return sf??void 0}Ci.subscribe(t=>{sf=t??void 0,typeof window<"u"&&t!=null&&document.documentElement.setAttribute("lang",t)});const Y2=t=>{if(t&&q2(t)&&yi(t)){const{loadingDelay:l}=rr();let e;return typeof window<"u"&&wo()!=null&&l?e=window.setTimeout(()=>ki.set(!0),l):ki.set(!0),A0(t).then(()=>{Ci.set(t)}).finally(()=>{clearTimeout(e),ki.set(!1)})}return Ci.set(t)},yo=Q2(K2({},Ci),{set:Y2}),Z2=()=>typeof window>"u"?null:window.navigator.language||window.navigator.languages[0],Ri=t=>{const l=Object.create(null);return n=>{const r=JSON.stringify(n);return r in l?l[r]:l[r]=t(n)}};var X2=Object.defineProperty,Ei=Object.getOwnPropertySymbols,F0=Object.prototype.hasOwnProperty,z0=Object.prototype.propertyIsEnumerable,U1=(t,l,e)=>l in t?X2(t,l,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[l]=e,pf=(t,l)=>{for(var e in l||(l={}))F0.call(l,e)&&U1(t,e,l[e]);if(Ei)for(var e of Ei(l))z0.call(l,e)&&U1(t,e,l[e]);return t},fr=(t,l)=>{var e={};for(var n in t)F0.call(t,n)&&l.indexOf(n)<0&&(e[n]=t[n]);if(t!=null&&Ei)for(var n of Ei(t))l.indexOf(n)<0&&z0.call(t,n)&&(e[n]=t[n]);return e};const yr=(t,l)=>{const{formats:e}=rr();if(t in e&&l in e[t])return e[t][l];throw new Error(`[svelte-i18n] Unknown "${l}" ${t} format.`)},x2=Ri(t=>{var l=t,{locale:e,format:n}=l,r=fr(l,["locale","format"]);if(e==null)throw new Error(\'[svelte-i18n] A "locale" must be set to format numbers\');return n&&(r=yr("number",n)),new Intl.NumberFormat(e,r)}),$2=Ri(t=>{var l=t,{locale:e,format:n}=l,r=fr(l,["locale","format"]);if(e==null)throw new Error(\'[svelte-i18n] A "locale" must be set to format dates\');return n?r=yr("date",n):Object.keys(r).length===0&&(r=yr("date","short")),new Intl.DateTimeFormat(e,r)}),eh=Ri(t=>{var l=t,{locale:e,format:n}=l,r=fr(l,["locale","format"]);if(e==null)throw new Error(\'[svelte-i18n] A "locale" must be set to format time values\');return n?r=yr("time",n):Object.keys(r).length===0&&(r=yr("time","short")),new Intl.DateTimeFormat(e,r)}),th=(t={})=>{var l=t,{locale:e=wo()}=l,n=fr(l,["locale"]);return x2(pf({locale:e},n))},lh=(t={})=>{var l=t,{locale:e=wo()}=l,n=fr(l,["locale"]);return $2(pf({locale:e},n))},sh=(t={})=>{var l=t,{locale:e=wo()}=l,n=fr(l,["locale"]);return eh(pf({locale:e},n))},oh=Ri((t,l=wo())=>new E0(t,l,rr().formats,{ignoreTag:rr().ignoreTag})),nh=(t,l={})=>{var e,n,r,i;let u=l;typeof t=="object"&&(u=t,t=u.id);const{values:c,locale:f=wo(),default:d}=u;if(f==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let p=B0(t,f);if(!p)p=(i=(r=(n=(e=rr()).handleMissingMessage)==null?void 0:n.call(e,{locale:f,id:t,defaultValue:d}))!=null?r:d)!=null?i:t;else if(typeof p!="string")return console.warn(`[svelte-i18n] Message with id "${t}" must be of type "string", found: "${typeof p}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),p;if(!c)return p;let m=p;try{m=oh(p,f).format(c)}catch(g){g instanceof Error&&console.warn(`[svelte-i18n] Message "${t}" has syntax error:`,g.message)}return m},rh=(t,l)=>sh(l).format(t),ah=(t,l)=>lh(l).format(t),ih=(t,l)=>th(l).format(t),uh=(t,l=wo())=>B0(t,l),Rt=so([yo,ur],()=>nh);so([yo],()=>rh);so([yo],()=>ah);so([yo],()=>ih);so([yo,ur],()=>uh);const fh="modulepreload",ch=function(t){return"/__ui/"+t},V1={},N0=function(l,e,n){let r=Promise.resolve();if(e&&e.length>0){let u=function(d){return Promise.all(d.map(p=>Promise.resolve(p).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=c?.nonce||c?.getAttribute("nonce");r=u(e.map(d=>{if(d=ch(d),d in V1)return;V1[d]=!0;const p=d.endsWith(".css"),m=p?\'[rel="stylesheet"]\':"";if(document.querySelector(`link[href="${d}"]${m}`))return;const g=document.createElement("link");if(g.rel=p?"stylesheet":fh,p||(g.as="script"),g.crossOrigin="",g.href=d,f&&g.setAttribute("nonce",f),document.head.appendChild(g),p)return new Promise((b,v)=>{g.addEventListener("load",b),g.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${d}`)))})}))}function i(u){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=u,window.dispatchEvent(c),!c.defaultPrevented)throw u}return r.then(u=>{for(const c of u||[])c.status==="rejected"&&i(c.reason);return l().catch(i)})},U0="zh-CN",V0="locale",mi=[{code:"zh-CN",name:"\u4E2D\u6587"},{code:"en",name:"English"}];O0("zh-CN",()=>N0(()=>import("./zh-CN-wPD53IzZ.js"),[]));O0("en",()=>N0(()=>import("./en-D_EcykrR.js"),[]));function dh(){return typeof localStorage<"u"?localStorage.getItem(V0):null}function ph(t){typeof localStorage<"u"&&localStorage.setItem(V0,t)}function hh(t){yo.set(t),ph(t)}const mh=dh(),gh=Z2(),_h=mh||gh||U0;N2({fallbackLocale:U0,initialLocale:_h});const Tr="bungee_auth_token",J0=lo(typeof window<"u"?localStorage.getItem(Tr):null),Ti=lo(typeof window<"u"?!!localStorage.getItem(Tr):!1),J1=lo(!1);function bh(t){typeof window>"u"||(localStorage.setItem(Tr,t),J0.set(t),Ti.set(!0))}function W0(){typeof window>"u"||(localStorage.removeItem(Tr),J0.set(null),Ti.set(!1))}function G0(){return typeof window>"u"?null:localStorage.getItem(Tr)}const vh="/__ui/api";async function gi(t,l){const e=`${vh}${t}`,n=G0(),r={"Content-Type":"application/json",...l?.headers};n&&(r.Authorization=`Bearer ${n}`);const i=await fetch(e,{...l,headers:r});if(i.status===401)throw W0(),window.location.hash="#/login",new Error("Unauthorized: Please login");if(!i.ok){const c=await i.json().catch(()=>({error:"Unknown error"}));throw new Error(c.error||`Request failed with status ${i.status}`)}return await i.json()}const Cl={get:t=>gi(t),post:(t,l)=>gi(t,{method:"POST",body:JSON.stringify(l)}),put:(t,l)=>gi(t,{method:"PUT",body:JSON.stringify(l)}),delete:t=>gi(t,{method:"DELETE"})};async function hf(){return Cl.get("/config")}async function kh(t){return Cl.put("/config",t)}async function wh(t){return Cl.post("/config/validate",t)}async function yh(t="1h"){return Cl.get(`/stats/history/v2?range=${t}`)}async function Ch(t="1h"){return Cl.get(`/stats/upstream-status-codes?range=${t}`)}async function W1(t="1h",l="all"){return Cl.get(`/stats/upstream-stats?range=${t}&type=${l}`)}const G1=typeof window<"u";function Eh(){const{subscribe:t,set:l}=lo({textColor:"rgba(255, 255, 255, 0.9)",gridColor:"rgba(255, 255, 255, 0.1)"});let e=null,n=null,r=!1;function i(){if(!G1)return;const f=document.createElement("div");f.className="text-base-content",f.style.position="absolute",f.style.visibility="hidden",document.body.appendChild(f);const d=getComputedStyle(f).color;document.body.removeChild(f);const p=d.match(/rgba?\\((\\d+),\\s*(\\d+),\\s*(\\d+)(?:,\\s*[\\d.]+)?\\)/);if(p){const m=parseInt(p[1]),g=parseInt(p[2]),b=parseInt(p[3]),w=(m*299+g*587+b*114)/1e3<128?.2:.15,C=`rgba(${m}, ${g}, ${b}, ${w})`;l({textColor:d,gridColor:C})}else l({textColor:"rgba(100, 100, 100, 0.9)",gridColor:"rgba(100, 100, 100, 0.2)"})}function u(){if(!G1||r)return;r=!0,i(),e=new MutationObserver(()=>{i()}),e.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme","class"]}),n=window.matchMedia("(prefers-color-scheme: dark)");const f=()=>i();n.addEventListener("change",f),typeof window<"u"&&window.addEventListener("beforeunload",()=>{c()})}function c(){e&&(e.disconnect(),e=null),n&&(n.removeEventListener("change",i),n=null),r=!1}return{subscribe:t,init:u,cleanup:c}}const Fs=Eh();so(Fs,t=>t.textColor);so(Fs,t=>t.gridColor);function mf(t,l,e=!0){return{display:e&&!!t,text:t,color:l,font:{size:16,weight:"bold"}}}function Th(t,l={}){const{position:e="top",display:n=!0,padding:r=15,fontSize:i=11}=l;return{display:n,position:e,labels:{padding:r,font:{size:i},color:t}}}function Mi(t,l,e={}){const{stacked:n=!1,beginAtZero:r=!0,fontSize:i=11,maxRotation:u,minRotation:c,title:f}=e,d={stacked:n,beginAtZero:r,ticks:{font:{size:i},color:t},grid:{color:l}};return f&&(d.title={display:f.display,text:f.text,color:t}),u!==void 0&&(d.ticks.maxRotation=u),c!==void 0&&(d.ticks.minRotation=c),d}function K0(t="index",l=!1){return{mode:t,intersect:l}}const wi=new Map,kr=new Map;function Q0(t){return wi.has(t)||wi.set(t,lo({activeIndex:null})),wi.get(t)}function Mh(t,l){kr.has(t)||kr.set(t,new Set),kr.get(t).add(l)}function Sh(t,l){const e=kr.get(t);e&&(e.delete(l),e.size===0&&(kr.delete(t),wi.delete(t)))}function K1(t,l,e){Q0(t).set({activeIndex:l,sourceChartId:e})}function Rh(t){let l=null,e=!1;return{id:`chartSync-${t}-${Math.random().toString(36).substring(2,11)}`,afterInit(r){Mh(t,r),l=Q0(t).subscribe(u=>{e||(u.activeIndex!==null&&u.sourceChartId!==r.id?qh(r,u.activeIndex):u.activeIndex===null&&Hh(r))})},afterEvent(r,i){const u=i.event;if(u.type==="mousemove"){const c=r.getElementsAtEventForMode(u,"index",{axis:"x",intersect:!1},!1);if(c.length>0){const f=c[0].index;K1(t,f,r.id),i.changed=!0}}else u.type==="mouseout"&&(K1(t,null,r.id),i.changed=!0)},destroy(r){e=!0,l&&(l(),l=null),Sh(t,r)}}}function qh(t,l){try{if(!t||!t.ctx||!t.tooltip||!t.data.datasets||t.data.datasets.length===0)return;const e=[];for(let n=0;n<t.data.datasets.length;n++){const r=t.data.datasets[n];if(!r.data||l<0||l>=r.data.length)continue;const i=t.getDatasetMeta(n);!i||!i.controller||!i.data||!i.data[l]||e.push({datasetIndex:n,index:l})}if(e.length===0)return;t.tooltip.setActiveElements(e,{x:0,y:0}),t.update("none")}catch(e){console.debug("Chart sync: tooltip update failed (chart may be destroying)",e)}}function Hh(t){try{if(!t||!t.ctx||!t.tooltip)return;t.tooltip.setActiveElements([],{x:0,y:0}),t.update("none")}catch(l){console.debug("Chart sync: tooltip hide failed (chart may be destroying)",l)}}function Ph(t){let l,e,n;return e=new r2({props:{data:t[2],options:t[1],plugins:t[0]}}),{c(){l=a("div"),Et(e.$$.fragment),o(l,"class","w-full h-full")},m(r,i){j(r,l,i),yt(e,l,null),n=!0},p(r,[i]){const u={};i&4&&(u.data=r[2]),i&2&&(u.options=r[1]),i&1&&(u.plugins=r[0]),e.$set(u)},i(r){n||(et(e.$$.fragment,r),n=!0)},o(r){st(e.$$.fragment,r),n=!1},d(r){r&&P(l),Ct(e)}}}function jh(t,l,e){let n,r,i,u;Dt(t,Fs,g=>e(8,u=g)),of.register(T0,M0,a2,i2,u2,nf,rf);let{title:c}=l,{labels:f}=l,{datasets:d}=l,{yAxisLabel:p=""}=l,{syncGroup:m=void 0}=l;return Hs(()=>{Fs.init()}),ir(()=>{Fs.cleanup()}),t.$$set=g=>{"title"in g&&e(3,c=g.title),"labels"in g&&e(4,f=g.labels),"datasets"in g&&e(5,d=g.datasets),"yAxisLabel"in g&&e(6,p=g.yAxisLabel),"syncGroup"in g&&e(7,m=g.syncGroup)},t.$$.update=()=>{t.$$.dirty&48&&e(2,n={labels:f,datasets:d.map(g=>({...g,borderColor:g.borderColor||"rgb(75, 192, 192)",backgroundColor:g.backgroundColor||"rgba(75, 192, 192, 0.2)",tension:g.tension??.4}))}),t.$$.dirty&360&&e(1,r={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:d.length>1,position:"top",labels:{color:u.textColor}},title:mf(c,u.textColor,!0),tooltip:K0("index",!1)},scales:{y:Mi(u.textColor,u.gridColor,{beginAtZero:!0,title:p?{display:!0,text:p}:void 0}),x:{...Mi(u.textColor,u.gridColor),ticks:{maxRotation:45,minRotation:0,autoSkip:!0,maxTicksLimit:10,color:u.textColor}}},interaction:{mode:"index",axis:"x",intersect:!1}}),t.$$.dirty&128&&e(0,i=m?[Rh(m)]:[])},[i,r,n,c,f,d,p,m,u]}class _i extends Vt{constructor(l){super(),Ut(this,l,jh,Ph,At,{title:3,labels:4,datasets:5,yAxisLabel:6,syncGroup:7})}}function Lh(t){let l,e,n;return e=new f2({props:{data:t[1],options:t[0]}}),{c(){l=a("div"),Et(e.$$.fragment),o(l,"class","w-full h-full")},m(r,i){j(r,l,i),yt(e,l,null),n=!0},p(r,[i]){const u={};i&2&&(u.data=r[1]),i&1&&(u.options=r[0]),e.$set(u)},i(r){n||(et(e.$$.fragment,r),n=!0)},o(r){st(e.$$.fragment,r),n=!1},d(r){r&&P(l),Ct(e)}}}function Dh(t,l,e){let n,r,i;Dt(t,Fs,f=>e(4,i=f)),of.register(c2,nf,rf);let{data:u=[]}=l,{title:c=""}=l;return Hs(()=>{Fs.init()}),ir(()=>{Fs.cleanup()}),t.$$set=f=>{"data"in f&&e(2,u=f.data),"title"in f&&e(3,c=f.title)},t.$$.update=()=>{t.$$.dirty&20&&e(1,n={labels:u.map(f=>f.label),datasets:[{data:u.map(f=>f.value),backgroundColor:["rgba(59, 130, 246, 0.8)","rgba(16, 185, 129, 0.8)","rgba(245, 158, 11, 0.8)","rgba(239, 68, 68, 0.8)","rgba(168, 85, 247, 0.8)","rgba(236, 72, 153, 0.8)","rgba(20, 184, 166, 0.8)","rgba(251, 146, 60, 0.8)","rgba(132, 204, 22, 0.8)","rgba(148, 163, 184, 0.8)"],borderColor:i.gridColor,borderWidth:1}]}),t.$$.dirty&28&&e(0,r={responsive:!0,maintainAspectRatio:!1,plugins:{title:mf(c,i.textColor),legend:{position:"right",labels:{padding:10,font:{size:11},color:i.textColor,generateLabels:f=>{const p=f.data.datasets[0].backgroundColor,m=f.getDatasetMeta(0);return f.data.labels?.map((g,b)=>{const v=m.data[b],w=v&&typeof v.hidden<"u"?v.hidden:!1;return{text:`${g} (${u[b]?.percentage||0}%)`,fillStyle:p[b],strokeStyle:p[b],fontColor:i.textColor,hidden:w,index:b,datasetIndex:0}})||[]}},onClick:(f,d,p)=>{const m=d.index,g=p.chart,b=g.getDatasetMeta(0);b.data[m].hidden=!b.data[m].hidden,g.update()}},tooltip:{callbacks:{label:f=>{const d=f.label||"",p=f.parsed||0,m=u[f.dataIndex]?.percentage||0;return`${d}: ${p} (${m}%)`}}}}})},[r,n,u,c,i]}class Y0 extends Vt{constructor(l){super(),Ut(this,l,Dh,Lh,At,{data:2,title:3})}}function Ih(t){let l,e,n;return e=new d2({props:{data:t[1],options:t[0]}}),{c(){l=a("div"),Et(e.$$.fragment),o(l,"class","w-full h-full")},m(r,i){j(r,l,i),yt(e,l,null),n=!0},p(r,[i]){const u={};i&2&&(u.data=r[1]),i&1&&(u.options=r[0]),e.$set(u)},i(r){n||(et(e.$$.fragment,r),n=!0)},o(r){st(e.$$.fragment,r),n=!1},d(r){r&&P(l),Ct(e)}}}function Bh(t,l,e){let n,r,i;Dt(t,Fs,f=>e(4,i=f)),of.register(p2,T0,M0,nf,rf);let{data:u=[]}=l,{title:c=""}=l;return Hs(()=>{Fs.init()}),ir(()=>{Fs.cleanup()}),t.$$set=f=>{"data"in f&&e(2,u=f.data),"title"in f&&e(3,c=f.title)},t.$$.update=()=>{t.$$.dirty&4&&e(1,n={labels:u.map(f=>f.label),datasets:[{label:"2xx",data:u.map(f=>f.status2xx),backgroundColor:"rgba(16, 185, 129, 0.8)",borderColor:"rgba(16, 185, 129, 1)",borderWidth:1},{label:"3xx",data:u.map(f=>f.status3xx),backgroundColor:"rgba(59, 130, 246, 0.8)",borderColor:"rgba(59, 130, 246, 1)",borderWidth:1},{label:"4xx",data:u.map(f=>f.status4xx),backgroundColor:"rgba(245, 158, 11, 0.8)",borderColor:"rgba(245, 158, 11, 1)",borderWidth:1},{label:"5xx",data:u.map(f=>f.status5xx),backgroundColor:"rgba(239, 68, 68, 0.8)",borderColor:"rgba(239, 68, 68, 1)",borderWidth:1}]}),t.$$.dirty&24&&e(0,r={responsive:!0,maintainAspectRatio:!1,scales:{x:Mi(i.textColor,i.gridColor,{stacked:!0,fontSize:10,maxRotation:45,minRotation:45}),y:Mi(i.textColor,i.gridColor,{stacked:!0,beginAtZero:!0,fontSize:11})},plugins:{title:mf(c,i.textColor),legend:Th(i.textColor,{position:"top",padding:15,fontSize:11}),tooltip:K0("index",!1)}})},[r,n,u,c,i]}class Ah extends Vt{constructor(l){super(),Ut(this,l,Bh,Ih,At,{data:2,title:3})}}function Oh(t){let l,e,n,r,i,u=t[11]("monitoring.noData")+"",c;return{c(){l=a("div"),e=ae("svg"),n=ae("path"),r=h(),i=a("span"),c=_(u),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"class","stroke-current shrink-0 w-6 h-6"),o(l,"class","alert alert-info")},m(f,d){j(f,l,d),s(l,e),s(e,n),s(l,r),s(l,i),s(i,c)},p(f,d){d&2048&&u!==(u=f[11]("monitoring.noData")+"")&&k(c,u)},i:tt,o:tt,d(f){f&&P(l)}}}function Fh(t){let l,e,n,r,i=t[11]("monitoring.charts.requestsTrend")+"",u,c,f,d,p,m,g,b,v=t[11]("monitoring.charts.responseTimeTrend")+"",w,C,E,y,T,S,q,D,H=t[11]("monitoring.charts.successRateTrend")+"",I,R,L,A,N,Z,Y,x,F=t[11]("monitoring.charts.errorsTrend")+"",K,M,B,U,O,J,ie,ue,ne,$,te,re,ee,G,pe,oe,ge=t[11]("dashboard.upstreamFailures")+"",he,ye,Fe,je,we,Oe,Je,Le,Pe,Me=t[11]("dashboard.upstreamStatusCodes")+"",fe,_e,Be,De,se,ke;d=new _i({props:{labels:t[10],datasets:[{label:t[11]("monitoring.charts.periodRequests"),data:t[9],borderColor:"rgb(59, 130, 246)",backgroundColor:"rgba(59, 130, 246, 0.1)"}],yAxisLabel:t[11]("monitoring.charts.requests"),syncGroup:"monitoring-trends"}}),y=new _i({props:{labels:t[10],datasets:[{label:t[11]("monitoring.charts.avgResponseTime"),data:t[7],borderColor:"rgb(34, 197, 94)",backgroundColor:"rgba(34, 197, 94, 0.1)"}],yAxisLabel:t[11]("monitoring.charts.milliseconds"),syncGroup:"monitoring-trends"}}),A=new _i({props:{labels:t[10],datasets:[{label:t[11]("monitoring.charts.successRate"),data:t[6],borderColor:"rgb(16, 185, 129)",backgroundColor:"rgba(16, 185, 129, 0.1)"}],yAxisLabel:t[11]("monitoring.charts.percentage"),syncGroup:"monitoring-trends"}}),U=new _i({props:{labels:t[10],datasets:[{label:t[11]("monitoring.charts.periodErrors"),data:t[8],borderColor:"rgb(239, 68, 68)",backgroundColor:"rgba(239, 68, 68, 0.1)"}],yAxisLabel:t[11]("monitoring.charts.errors"),syncGroup:"monitoring-trends"}});const me=[Vh,Uh],Ee=[];function Ve(de,Te){return de[5].length>0?0:1}te=Ve(t),re=Ee[te]=me[te](t);const Ie=[Wh,Jh],nt=[];function Ne(de,Te){return de[4].length>0?0:1}je=Ne(t),we=nt[je]=Ie[je](t);const Ye=[Kh,Gh],Qe=[];function ve(de,Te){return de[3].length>0?0:1}return De=ve(t),se=Qe[De]=Ye[De](t),{c(){l=a("div"),e=a("div"),n=a("div"),r=a("h3"),u=_(i),c=h(),f=a("div"),Et(d.$$.fragment),p=h(),m=a("div"),g=a("div"),b=a("h3"),w=_(v),C=h(),E=a("div"),Et(y.$$.fragment),T=h(),S=a("div"),q=a("div"),D=a("h3"),I=_(H),R=h(),L=a("div"),Et(A.$$.fragment),N=h(),Z=a("div"),Y=a("div"),x=a("h3"),K=_(F),M=h(),B=a("div"),Et(U.$$.fragment),O=h(),J=a("div"),ie=a("div"),ue=a("h3"),ue.textContent="\u4E0A\u6E38\u6210\u529F\u7EDF\u8BA1",ne=h(),$=a("div"),re.c(),ee=h(),G=a("div"),pe=a("div"),oe=a("h3"),he=_(ge),ye=h(),Fe=a("div"),we.c(),Oe=h(),Je=a("div"),Le=a("div"),Pe=a("h3"),fe=_(Me),_e=h(),Be=a("div"),se.c(),o(r,"class","text-base font-semibold mb-3"),o(f,"class","h-64"),o(n,"class","card-body p-4"),o(e,"class","card bg-base-100 shadow-xl"),o(b,"class","text-base font-semibold mb-3"),o(E,"class","h-64"),o(g,"class","card-body p-4"),o(m,"class","card bg-base-100 shadow-xl"),o(D,"class","text-base font-semibold mb-3"),o(L,"class","h-64"),o(q,"class","card-body p-4"),o(S,"class","card bg-base-100 shadow-xl"),o(x,"class","text-base font-semibold mb-3"),o(B,"class","h-64"),o(Y,"class","card-body p-4"),o(Z,"class","card bg-base-100 shadow-xl"),o(ue,"class","text-base font-semibold mb-3"),o($,"class","h-64"),o(ie,"class","card-body p-4"),o(J,"class","card bg-base-100 shadow-xl"),o(oe,"class","text-base font-semibold mb-3"),o(Fe,"class","h-64"),o(pe,"class","card-body p-4"),o(G,"class","card bg-base-100 shadow-xl"),o(Pe,"class","text-base font-semibold mb-3"),o(Be,"class","h-64"),o(Le,"class","card-body p-4"),o(Je,"class","card bg-base-100 shadow-xl lg:col-span-2"),o(l,"class","grid grid-cols-1 lg:grid-cols-2 gap-6")},m(de,Te){j(de,l,Te),s(l,e),s(e,n),s(n,r),s(r,u),s(n,c),s(n,f),yt(d,f,null),s(l,p),s(l,m),s(m,g),s(g,b),s(b,w),s(g,C),s(g,E),yt(y,E,null),s(l,T),s(l,S),s(S,q),s(q,D),s(D,I),s(q,R),s(q,L),yt(A,L,null),s(l,N),s(l,Z),s(Z,Y),s(Y,x),s(x,K),s(Y,M),s(Y,B),yt(U,B,null),s(l,O),s(l,J),s(J,ie),s(ie,ue),s(ie,ne),s(ie,$),Ee[te].m($,null),s(l,ee),s(l,G),s(G,pe),s(pe,oe),s(oe,he),s(pe,ye),s(pe,Fe),nt[je].m(Fe,null),s(l,Oe),s(l,Je),s(Je,Le),s(Le,Pe),s(Pe,fe),s(Le,_e),s(Le,Be),Qe[De].m(Be,null),ke=!0},p(de,Te){(!ke||Te&2048)&&i!==(i=de[11]("monitoring.charts.requestsTrend")+"")&&k(u,i);const Ze={};Te&1024&&(Ze.labels=de[10]),Te&2560&&(Ze.datasets=[{label:de[11]("monitoring.charts.periodRequests"),data:de[9],borderColor:"rgb(59, 130, 246)",backgroundColor:"rgba(59, 130, 246, 0.1)"}]),Te&2048&&(Ze.yAxisLabel=de[11]("monitoring.charts.requests")),d.$set(Ze),(!ke||Te&2048)&&v!==(v=de[11]("monitoring.charts.responseTimeTrend")+"")&&k(w,v);const Se={};Te&1024&&(Se.labels=de[10]),Te&2176&&(Se.datasets=[{label:de[11]("monitoring.charts.avgResponseTime"),data:de[7],borderColor:"rgb(34, 197, 94)",backgroundColor:"rgba(34, 197, 94, 0.1)"}]),Te&2048&&(Se.yAxisLabel=de[11]("monitoring.charts.milliseconds")),y.$set(Se),(!ke||Te&2048)&&H!==(H=de[11]("monitoring.charts.successRateTrend")+"")&&k(I,H);const Ue={};Te&1024&&(Ue.labels=de[10]),Te&2112&&(Ue.datasets=[{label:de[11]("monitoring.charts.successRate"),data:de[6],borderColor:"rgb(16, 185, 129)",backgroundColor:"rgba(16, 185, 129, 0.1)"}]),Te&2048&&(Ue.yAxisLabel=de[11]("monitoring.charts.percentage")),A.$set(Ue),(!ke||Te&2048)&&F!==(F=de[11]("monitoring.charts.errorsTrend")+"")&&k(K,F);const Ce={};Te&1024&&(Ce.labels=de[10]),Te&2304&&(Ce.datasets=[{label:de[11]("monitoring.charts.periodErrors"),data:de[8],borderColor:"rgb(239, 68, 68)",backgroundColor:"rgba(239, 68, 68, 0.1)"}]),Te&2048&&(Ce.yAxisLabel=de[11]("monitoring.charts.errors")),U.$set(Ce);let mt=te;te=Ve(de),te===mt?Ee[te].p(de,Te):(Gl(),st(Ee[mt],1,1,()=>{Ee[mt]=null}),Kl(),re=Ee[te],re?re.p(de,Te):(re=Ee[te]=me[te](de),re.c()),et(re,1),re.m($,null)),(!ke||Te&2048)&&ge!==(ge=de[11]("dashboard.upstreamFailures")+"")&&k(he,ge);let Ge=je;je=Ne(de),je===Ge?nt[je].p(de,Te):(Gl(),st(nt[Ge],1,1,()=>{nt[Ge]=null}),Kl(),we=nt[je],we?we.p(de,Te):(we=nt[je]=Ie[je](de),we.c()),et(we,1),we.m(Fe,null)),(!ke||Te&2048)&&Me!==(Me=de[11]("dashboard.upstreamStatusCodes")+"")&&k(fe,Me);let ce=De;De=ve(de),De===ce?Qe[De].p(de,Te):(Gl(),st(Qe[ce],1,1,()=>{Qe[ce]=null}),Kl(),se=Qe[De],se?se.p(de,Te):(se=Qe[De]=Ye[De](de),se.c()),et(se,1),se.m(Be,null))},i(de){ke||(et(d.$$.fragment,de),et(y.$$.fragment,de),et(A.$$.fragment,de),et(U.$$.fragment,de),et(re),et(we),et(se),ke=!0)},o(de){st(d.$$.fragment,de),st(y.$$.fragment,de),st(A.$$.fragment,de),st(U.$$.fragment,de),st(re),st(we),st(se),ke=!1},d(de){de&&P(l),Ct(d),Ct(y),Ct(A),Ct(U),Ee[te].d(),nt[je].d(),Qe[De].d()}}}function zh(t){let l,e,n,r,i,u=t[11]("common.error")+"",c,f,d;return{c(){l=a("div"),e=ae("svg"),n=ae("path"),r=h(),i=a("span"),c=_(u),f=_(": "),d=_(t[1]),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","stroke-current shrink-0 h-6 w-6"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(l,"class","alert alert-error")},m(p,m){j(p,l,m),s(l,e),s(e,n),s(l,r),s(l,i),s(i,c),s(i,f),s(i,d)},p(p,m){m&2048&&u!==(u=p[11]("common.error")+"")&&k(c,u),m&2&&k(d,p[1])},i:tt,o:tt,d(p){p&&P(l)}}}function Nh(t){let l;return{c(){l=a("div"),l.innerHTML=\'<span class="loading loading-spinner loading-lg"></span>\',o(l,"class","flex justify-center items-center h-64")},m(e,n){j(e,l,n)},p:tt,i:tt,o:tt,d(e){e&&P(l)}}}function Uh(t){let l,e,n,r,i,u=t[11]("dashboard.noData")+"",c;return{c(){l=a("div"),e=ae("svg"),n=ae("path"),r=h(),i=a("span"),c=_(u),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","1.5"),o(n,"d","M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","h-12 w-12"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"stroke","currentColor"),o(i,"class","text-sm"),o(l,"class","flex flex-col items-center justify-center h-full gap-3 opacity-60")},m(f,d){j(f,l,d),s(l,e),s(e,n),s(l,r),s(l,i),s(i,c)},p(f,d){d&2048&&u!==(u=f[11]("dashboard.noData")+"")&&k(c,u)},i:tt,o:tt,d(f){f&&P(l)}}}function Vh(t){let l,e;return l=new Y0({props:{data:t[5]}}),{c(){Et(l.$$.fragment)},m(n,r){yt(l,n,r),e=!0},p(n,r){const i={};r&32&&(i.data=n[5]),l.$set(i)},i(n){e||(et(l.$$.fragment,n),e=!0)},o(n){st(l.$$.fragment,n),e=!1},d(n){Ct(l,n)}}}function Jh(t){let l,e,n,r,i,u=t[11]("dashboard.noData")+"",c;return{c(){l=a("div"),e=ae("svg"),n=ae("path"),r=h(),i=a("span"),c=_(u),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","1.5"),o(n,"d","M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","h-12 w-12"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"stroke","currentColor"),o(i,"class","text-sm"),o(l,"class","flex flex-col items-center justify-center h-full gap-3 opacity-60")},m(f,d){j(f,l,d),s(l,e),s(e,n),s(l,r),s(l,i),s(i,c)},p(f,d){d&2048&&u!==(u=f[11]("dashboard.noData")+"")&&k(c,u)},i:tt,o:tt,d(f){f&&P(l)}}}function Wh(t){let l,e;return l=new Y0({props:{data:t[4]}}),{c(){Et(l.$$.fragment)},m(n,r){yt(l,n,r),e=!0},p(n,r){const i={};r&16&&(i.data=n[4]),l.$set(i)},i(n){e||(et(l.$$.fragment,n),e=!0)},o(n){st(l.$$.fragment,n),e=!1},d(n){Ct(l,n)}}}function Gh(t){let l,e,n,r,i,u=t[11]("dashboard.noData")+"",c;return{c(){l=a("div"),e=ae("svg"),n=ae("path"),r=h(),i=a("span"),c=_(u),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","1.5"),o(n,"d","M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","h-12 w-12"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"stroke","currentColor"),o(i,"class","text-sm"),o(l,"class","flex flex-col items-center justify-center h-full gap-3 opacity-60")},m(f,d){j(f,l,d),s(l,e),s(e,n),s(l,r),s(l,i),s(i,c)},p(f,d){d&2048&&u!==(u=f[11]("dashboard.noData")+"")&&k(c,u)},i:tt,o:tt,d(f){f&&P(l)}}}function Kh(t){let l,e;return l=new Ah({props:{data:t[3]}}),{c(){Et(l.$$.fragment)},m(n,r){yt(l,n,r),e=!0},p(n,r){const i={};r&8&&(i.data=n[3]),l.$set(i)},i(n){e||(et(l.$$.fragment,n),e=!0)},o(n){st(l.$$.fragment,n),e=!1},d(n){Ct(l,n)}}}function Qh(t){let l,e,n,r=t[11]("monitoring.title")+"",i,u,c,f,d;const p=[Nh,zh,Fh,Oh],m=[];function g(b,v){return b[2]&&!b[0]?0:b[1]?1:b[0]&&b[0].timestamps.length>0?2:3}return c=g(t),f=m[c]=p[c](t),{c(){l=a("div"),e=a("div"),n=a("h2"),i=_(r),u=h(),f.c(),o(n,"class","text-2xl font-bold"),o(l,"class","space-y-6")},m(b,v){j(b,l,v),s(l,e),s(e,n),s(n,i),s(l,u),m[c].m(l,null),d=!0},p(b,[v]){(!d||v&2048)&&r!==(r=b[11]("monitoring.title")+"")&&k(i,r);let w=c;c=g(b),c===w?m[c].p(b,v):(Gl(),st(m[w],1,1,()=>{m[w]=null}),Kl(),f=m[c],f?f.p(b,v):(f=m[c]=p[c](b),f.c()),et(f,1),f.m(l,null))},i(b){d||(et(f),d=!0)},o(b){st(f),d=!1},d(b){b&&P(l),m[c].d()}}}function Yh(t,l,e){let n,r,i,u,c,f,d,p,m;Dt(t,Rt,I=>e(11,m=I));let{selectedRange:g="1h"}=l,{onDataLoaded:b=()=>{}}=l,v=null,w=!0,C=null,E,y=[],T=[],S=[];async function q(){try{e(2,w=!0),e(0,v=await yh(g)),e(1,C=null)}catch(I){e(1,C=I.message)}finally{e(2,w=!1)}}async function D(){try{const[I,R,L]=await Promise.all([W1(g,"success"),W1(g,"failure"),Ch(g)]);e(14,y=I.data),e(15,T=R.data),e(16,S=L.data)}catch(I){console.error("Failed to load upstream stats:",I)}finally{}}async function H(){await Promise.all([q(),D()])}return Hs(()=>{H(),E=setInterval(H,3e4)}),ir(()=>{E&&clearInterval(E)}),t.$$set=I=>{"selectedRange"in I&&e(12,g=I.selectedRange),"onDataLoaded"in I&&e(13,b=I.onDataLoaded)},t.$$.update=()=>{t.$$.dirty&4096&&g&&H(),t.$$.dirty&8195&&(v!==null||C!==null)&&b(C?null:v),t.$$.dirty&4097&&e(10,n=v?.timestamps.map(I=>{const R=new Date(I);switch(g){case"1h":return R.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"});case"12h":return R.toLocaleString("zh-CN",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});case"24h":return R.toLocaleString("zh-CN",{month:"short",day:"numeric",hour:"2-digit"});default:return R.toLocaleTimeString("zh-CN")}})||[]),t.$$.dirty&1&&e(9,r=v?.requests||[]),t.$$.dirty&1&&e(8,i=v?.errors||[]),t.$$.dirty&1&&e(7,u=v?.responseTime||[]),t.$$.dirty&1&&e(6,c=v?.successRate||[]),t.$$.dirty&16384&&e(5,f=y.map(I=>({label:new URL(I.upstream).host,value:I.count,percentage:I.percentage}))),t.$$.dirty&32768&&e(4,d=T.filter(I=>I.failedRequests>0).sort((I,R)=>R.failedRequests-I.failedRequests).map(I=>({label:new URL(I.upstream).host,value:I.failedRequests,percentage:I.percentage}))),t.$$.dirty&65536&&e(3,p=S.map(I=>({label:new URL(I.upstream).host,status2xx:I.status2xx,status3xx:I.status3xx,status4xx:I.status4xx,status5xx:I.status5xx})))},[v,C,w,p,d,f,c,u,i,r,n,m,g,b,y,T,S]}class Zh extends Vt{constructor(l){super(),Ut(this,l,Yh,Qh,At,{selectedRange:12,onDataLoaded:13})}}function Xh(t){let l,e,n,r,i=t[2]("dashboard.totalRequests")+"",u,c,f,d,p,m,g,b=t[2]("dashboard.requestsPerSecond")+"",v,w,C,E,y,T,S,q=t[2]("dashboard.successRate")+"",D,H,I,R,L,A,N,Z=t[2]("dashboard.avgResponseTime")+"",Y,x,F;return{c(){l=a("div"),e=a("div"),n=a("div"),r=a("h2"),u=_(i),c=h(),f=a("p"),f.textContent="-",d=h(),p=a("div"),m=a("div"),g=a("h2"),v=_(b),w=h(),C=a("p"),C.textContent="-",E=h(),y=a("div"),T=a("div"),S=a("h2"),D=_(q),H=h(),I=a("p"),I.textContent="-",R=h(),L=a("div"),A=a("div"),N=a("h2"),Y=_(Z),x=h(),F=a("p"),F.textContent="-",o(r,"class","card-title text-sm"),o(f,"class","text-3xl font-bold"),o(n,"class","card-body"),o(e,"class","card bg-base-100 shadow-xl"),o(g,"class","card-title text-sm"),o(C,"class","text-3xl font-bold"),o(m,"class","card-body"),o(p,"class","card bg-base-100 shadow-xl"),o(S,"class","card-title text-sm"),o(I,"class","text-3xl font-bold"),o(T,"class","card-body"),o(y,"class","card bg-base-100 shadow-xl"),o(N,"class","card-title text-sm"),o(F,"class","text-3xl font-bold"),o(A,"class","card-body"),o(L,"class","card bg-base-100 shadow-xl"),o(l,"class","grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-8")},m(K,M){j(K,l,M),s(l,e),s(e,n),s(n,r),s(r,u),s(n,c),s(n,f),s(l,d),s(l,p),s(p,m),s(m,g),s(g,v),s(m,w),s(m,C),s(l,E),s(l,y),s(y,T),s(T,S),s(S,D),s(T,H),s(T,I),s(l,R),s(l,L),s(L,A),s(A,N),s(N,Y),s(A,x),s(A,F)},p(K,M){M&4&&i!==(i=K[2]("dashboard.totalRequests")+"")&&k(u,i),M&4&&b!==(b=K[2]("dashboard.requestsPerSecond")+"")&&k(v,b),M&4&&q!==(q=K[2]("dashboard.successRate")+"")&&k(D,q),M&4&&Z!==(Z=K[2]("dashboard.avgResponseTime")+"")&&k(Y,Z)},d(K){K&&P(l)}}}function xh(t){let l,e,n,r,i=t[2]("dashboard.totalRequests")+"",u,c,f,d=t[1].totalRequests+"",p,m,g,b,v,w=t[2]("dashboard.requestsPerSecond")+"",C,E,y,T=t[1].requestsPerSecond.toFixed(2)+"",S,q,D,H,I,R=t[2]("dashboard.successRate")+"",L,A,N,Z=t[1].successRate.toFixed(1)+"",Y,x,F,K,M,B,U=t[2]("dashboard.avgResponseTime")+"",O,J,ie,ue=t[1].avgResponseTime.toFixed(0)+"",ne,$;return{c(){l=a("div"),e=a("div"),n=a("div"),r=a("h2"),u=_(i),c=h(),f=a("p"),p=_(d),m=h(),g=a("div"),b=a("div"),v=a("h2"),C=_(w),E=h(),y=a("p"),S=_(T),q=h(),D=a("div"),H=a("div"),I=a("h2"),L=_(R),A=h(),N=a("p"),Y=_(Z),x=_("%"),F=h(),K=a("div"),M=a("div"),B=a("h2"),O=_(U),J=h(),ie=a("p"),ne=_(ue),$=_("ms"),o(r,"class","card-title text-sm"),o(f,"class","text-3xl font-bold"),o(n,"class","card-body"),o(e,"class","card bg-base-100 shadow-xl"),o(v,"class","card-title text-sm"),o(y,"class","text-3xl font-bold"),o(b,"class","card-body"),o(g,"class","card bg-base-100 shadow-xl"),o(I,"class","card-title text-sm"),o(N,"class","text-3xl font-bold"),o(H,"class","card-body"),o(D,"class","card bg-base-100 shadow-xl"),o(B,"class","card-title text-sm"),o(ie,"class","text-3xl font-bold"),o(M,"class","card-body"),o(K,"class","card bg-base-100 shadow-xl"),o(l,"class","grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-8")},m(te,re){j(te,l,re),s(l,e),s(e,n),s(n,r),s(r,u),s(n,c),s(n,f),s(f,p),s(l,m),s(l,g),s(g,b),s(b,v),s(v,C),s(b,E),s(b,y),s(y,S),s(l,q),s(l,D),s(D,H),s(H,I),s(I,L),s(H,A),s(H,N),s(N,Y),s(N,x),s(l,F),s(l,K),s(K,M),s(M,B),s(B,O),s(M,J),s(M,ie),s(ie,ne),s(ie,$)},p(te,re){re&4&&i!==(i=te[2]("dashboard.totalRequests")+"")&&k(u,i),re&2&&d!==(d=te[1].totalRequests+"")&&k(p,d),re&4&&w!==(w=te[2]("dashboard.requestsPerSecond")+"")&&k(C,w),re&2&&T!==(T=te[1].requestsPerSecond.toFixed(2)+"")&&k(S,T),re&4&&R!==(R=te[2]("dashboard.successRate")+"")&&k(L,R),re&2&&Z!==(Z=te[1].successRate.toFixed(1)+"")&&k(Y,Z),re&4&&U!==(U=te[2]("dashboard.avgResponseTime")+"")&&k(O,U),re&2&&ue!==(ue=te[1].avgResponseTime.toFixed(0)+"")&&k(ne,ue)},d(te){te&&P(l)}}}function $h(t){let l,e,n=t[2]("dashboard.title")+"",r,i,u,c,f=t[2]("dashboard.dataRange")+"",d,p,m=t[2]("monitoring.range."+t[0])+"",g,b,v,w,C,E,y,T=t[2]("monitoring.range.oneHour")+"",S,q,D,H,I,R,L=t[2]("monitoring.range.twelveHours")+"",A,N,Z,Y,x,F,K=t[2]("monitoring.range.twentyFourHours")+"",M,B,U,O,J,ie,ue,ne;function $(ee,G){return ee[1]?xh:Xh}let te=$(t),re=te(t);return O=new Zh({props:{selectedRange:t[0],onDataLoaded:t[3]}}),ie=uf(t[5][0]),{c(){l=a("div"),e=a("h1"),r=_(n),i=h(),u=a("div"),c=a("p"),d=_(f),p=_(": "),g=_(m),b=h(),v=a("div"),w=a("label"),C=a("input"),E=h(),y=a("span"),S=_(T),q=h(),D=a("label"),H=a("input"),I=h(),R=a("span"),A=_(L),N=h(),Z=a("label"),Y=a("input"),x=h(),F=a("span"),M=_(K),B=h(),re.c(),U=h(),Et(O.$$.fragment),o(e,"class","text-3xl font-bold mb-6"),o(c,"class","text-sm text-gray-500"),o(C,"class","sr-only"),o(C,"type","radio"),o(C,"name","range"),C.__value="1h",Q(C,C.__value),o(y,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),le(y,"bg-primary",t[0]==="1h"),le(y,"text-primary-content",t[0]==="1h"),le(y,"shadow",t[0]==="1h"),le(y,"text-gray-700",t[0]!=="1h"),le(y,"dark:text-gray-300",t[0]!=="1h"),le(y,"hover:text-gray-900",t[0]!=="1h"),le(y,"dark:hover:text-gray-100",t[0]!=="1h"),o(w,"class","cursor-pointer"),o(H,"class","sr-only"),o(H,"type","radio"),o(H,"name","range"),H.__value="12h",Q(H,H.__value),o(R,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),le(R,"bg-primary",t[0]==="12h"),le(R,"text-primary-content",t[0]==="12h"),le(R,"shadow",t[0]==="12h"),le(R,"text-gray-700",t[0]!=="12h"),le(R,"dark:text-gray-300",t[0]!=="12h"),le(R,"hover:text-gray-900",t[0]!=="12h"),le(R,"dark:hover:text-gray-100",t[0]!=="12h"),o(D,"class","cursor-pointer"),o(Y,"class","sr-only"),o(Y,"type","radio"),o(Y,"name","range"),Y.__value="24h",Q(Y,Y.__value),o(F,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),le(F,"bg-primary",t[0]==="24h"),le(F,"text-primary-content",t[0]==="24h"),le(F,"shadow",t[0]==="24h"),le(F,"text-gray-700",t[0]!=="24h"),le(F,"dark:text-gray-300",t[0]!=="24h"),le(F,"hover:text-gray-900",t[0]!=="24h"),le(F,"dark:hover:text-gray-100",t[0]!=="24h"),o(Z,"class","cursor-pointer"),o(v,"class","inline-flex gap-1 p-1 bg-white dark:bg-gray-800 rounded-lg shadow-sm"),o(u,"class","flex justify-between items-center mb-6"),o(l,"class","p-6"),ie.p(C,H,Y)},m(ee,G){j(ee,l,G),s(l,e),s(e,r),s(l,i),s(l,u),s(u,c),s(c,d),s(c,p),s(c,g),s(u,b),s(u,v),s(v,w),s(w,C),C.checked=C.__value===t[0],s(w,E),s(w,y),s(y,S),s(v,q),s(v,D),s(D,H),H.checked=H.__value===t[0],s(D,I),s(D,R),s(R,A),s(v,N),s(v,Z),s(Z,Y),Y.checked=Y.__value===t[0],s(Z,x),s(Z,F),s(F,M),s(l,B),re.m(l,null),s(l,U),yt(O,l,null),J=!0,ue||(ne=[V(C,"change",t[4]),V(H,"change",t[6]),V(Y,"change",t[7])],ue=!0)},p(ee,[G]){(!J||G&4)&&n!==(n=ee[2]("dashboard.title")+"")&&k(r,n),(!J||G&4)&&f!==(f=ee[2]("dashboard.dataRange")+"")&&k(d,f),(!J||G&5)&&m!==(m=ee[2]("monitoring.range."+ee[0])+"")&&k(g,m),G&1&&(C.checked=C.__value===ee[0]),(!J||G&4)&&T!==(T=ee[2]("monitoring.range.oneHour")+"")&&k(S,T),(!J||G&1)&&le(y,"bg-primary",ee[0]==="1h"),(!J||G&1)&&le(y,"text-primary-content",ee[0]==="1h"),(!J||G&1)&&le(y,"shadow",ee[0]==="1h"),(!J||G&1)&&le(y,"text-gray-700",ee[0]!=="1h"),(!J||G&1)&&le(y,"dark:text-gray-300",ee[0]!=="1h"),(!J||G&1)&&le(y,"hover:text-gray-900",ee[0]!=="1h"),(!J||G&1)&&le(y,"dark:hover:text-gray-100",ee[0]!=="1h"),G&1&&(H.checked=H.__value===ee[0]),(!J||G&4)&&L!==(L=ee[2]("monitoring.range.twelveHours")+"")&&k(A,L),(!J||G&1)&&le(R,"bg-primary",ee[0]==="12h"),(!J||G&1)&&le(R,"text-primary-content",ee[0]==="12h"),(!J||G&1)&&le(R,"shadow",ee[0]==="12h"),(!J||G&1)&&le(R,"text-gray-700",ee[0]!=="12h"),(!J||G&1)&&le(R,"dark:text-gray-300",ee[0]!=="12h"),(!J||G&1)&&le(R,"hover:text-gray-900",ee[0]!=="12h"),(!J||G&1)&&le(R,"dark:hover:text-gray-100",ee[0]!=="12h"),G&1&&(Y.checked=Y.__value===ee[0]),(!J||G&4)&&K!==(K=ee[2]("monitoring.range.twentyFourHours")+"")&&k(M,K),(!J||G&1)&&le(F,"bg-primary",ee[0]==="24h"),(!J||G&1)&&le(F,"text-primary-content",ee[0]==="24h"),(!J||G&1)&&le(F,"shadow",ee[0]==="24h"),(!J||G&1)&&le(F,"text-gray-700",ee[0]!=="24h"),(!J||G&1)&&le(F,"dark:text-gray-300",ee[0]!=="24h"),(!J||G&1)&&le(F,"hover:text-gray-900",ee[0]!=="24h"),(!J||G&1)&&le(F,"dark:hover:text-gray-100",ee[0]!=="24h"),te===(te=$(ee))&&re?re.p(ee,G):(re.d(1),re=te(ee),re&&(re.c(),re.m(l,U)));const pe={};G&1&&(pe.selectedRange=ee[0]),O.$set(pe)},i(ee){J||(et(O.$$.fragment,ee),J=!0)},o(ee){st(O.$$.fragment,ee),J=!1},d(ee){ee&&P(l),re.d(),Ct(O),ie.r(),ue=!1,bt(ne)}}}function em(t){switch(t){case"1h":return 3600;case"12h":return 43200;case"24h":return 86400;default:return 3600}}function tm(t,l,e){let n;Dt(t,Rt,g=>e(2,n=g));let r="1h",i=null;function u(g){e(1,i=c(g))}function c(g){if(!g||g.requests.length===0)return null;const b=g.requests.reduce((T,S)=>T+S,0),v=em(r),w=b/v,C=g.errors.reduce((T,S)=>T+S,0),E=b>0?(b-C)/b*100:100,y=g.responseTime.length>0?g.responseTime.reduce((T,S)=>T+S,0)/g.responseTime.length:0;return{totalRequests:b,requestsPerSecond:w,successRate:E,avgResponseTime:y}}const f=[[]];function d(){r=this.__value,e(0,r)}function p(){r=this.__value,e(0,r)}function m(){r=this.__value,e(0,r)}return[r,i,n,u,d,f,p,m]}class lm extends Vt{constructor(l){super(),Ut(this,l,tm,$h,At,{})}}async function sm(){return Cl.post("/system/reload",{})}async function om(){return Cl.post("/system/restart",{})}function mr(){const{subscribe:t,update:l}=lo([]);let e=0;return{subscribe:t,show:(n,r="info",i=3e3)=>{const u=e++,c={id:u,message:n,type:r,duration:i};return l(f=>[...f,c]),i>0&&setTimeout(()=>{l(f=>f.filter(d=>d.id!==u))},i),u},success:(n,r=3e3)=>mr().show(n,"success",r),error:(n,r=4e3)=>mr().show(n,"error",r),warning:(n,r=3500)=>mr().show(n,"warning",r),info:(n,r=3e3)=>mr().show(n,"info",r),remove:n=>{l(r=>r.filter(i=>i.id!==n))},clear:()=>{l(()=>[])}}}const Lt=mr();function Q1(t,l,e){const n=t.slice();return n[13]=l[e],n[14]=l,n[15]=e,n}function Y1(t){let l,e=t[5]("auth.helpText")+"",n;return{c(){l=a("span"),n=_(e),o(l,"class","label-text-alt text-xs")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i&32&&e!==(e=r[5]("auth.helpText")+"")&&k(n,e)},d(r){r&&P(l)}}}function Z1(t){let l,e,n,r,i=t[5]("auth.tokens")+"",u,c,f=t[3].length+"",d,p,m,g,b,v,w,C,E,y,T=t[5]("auth.expressionSupport")+"",S,q,D,H,I,R,L,A,N=t[5]("auth.addToken")+"",Z,Y,x,F,K,M,B,U=t[5]("auth.securityNotice")+"",O,J,ie,ue=ut(t[3]),ne=[];for(let $=0;$<ue.length;$+=1)ne[$]=X1(Q1(t,ue,$));return{c(){l=a("div"),e=a("input"),n=h(),r=a("div"),u=_(i),c=_(" ("),d=_(f),p=_(")"),m=h(),g=a("div"),b=a("div"),v=ae("svg"),w=ae("path"),C=h(),E=a("div"),y=a("div"),S=_(T),q=h(),D=a("div"),H=a("code"),H.textContent="{{ env.API_TOKEN }}",I=h();for(let $=0;$<ne.length;$+=1)ne[$].c();R=h(),L=a("button"),A=_("+ "),Z=_(N),Y=h(),x=a("div"),F=ae("svg"),K=ae("path"),M=h(),B=a("div"),O=_(U),o(e,"type","checkbox"),e.checked=!0,o(r,"class","collapse-title text-sm font-medium"),o(w,"stroke-linecap","round"),o(w,"stroke-linejoin","round"),o(w,"stroke-width","2"),o(w,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(v,"xmlns","http://www.w3.org/2000/svg"),o(v,"fill","none"),o(v,"viewBox","0 0 24 24"),o(v,"class","stroke-current shrink-0 w-4 h-4 opacity-60"),o(H,"class","text-xs bg-base-300 px-1 rounded"),o(D,"class","mt-1"),o(b,"class","text-xs text-base-content/60 bg-base-200 rounded p-3 flex gap-2"),o(L,"type","button"),o(L,"class","btn btn-sm btn-ghost"),o(g,"class","collapse-content space-y-2"),o(l,"class","collapse collapse-arrow bg-base-200 collapse-open"),o(K,"stroke-linecap","round"),o(K,"stroke-linejoin","round"),o(K,"stroke-width","2"),o(K,"d","M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"),o(F,"xmlns","http://www.w3.org/2000/svg"),o(F,"fill","none"),o(F,"viewBox","0 0 24 24"),o(F,"class","stroke-current shrink-0 w-4 h-4"),o(x,"class","alert alert-warning shadow-sm text-xs")},m($,te){j($,l,te),s(l,e),s(l,n),s(l,r),s(r,u),s(r,c),s(r,d),s(r,p),s(l,m),s(l,g),s(g,b),s(b,v),s(v,w),s(b,C),s(b,E),s(E,y),s(y,S),s(E,q),s(E,D),s(D,H),s(g,I);for(let re=0;re<ne.length;re+=1)ne[re]&&ne[re].m(g,null);s(g,R),s(g,L),s(L,A),s(L,Z),j($,Y,te),j($,x,te),s(x,F),s(F,K),s(x,M),s(x,B),s(B,O),J||(ie=V(L,"click",t[6]),J=!0)},p($,te){if(te&32&&i!==(i=$[5]("auth.tokens")+"")&&k(u,i),te&8&&f!==(f=$[3].length+"")&&k(d,f),te&32&&T!==(T=$[5]("auth.expressionSupport")+"")&&k(S,T),te&168){ue=ut($[3]);let re;for(re=0;re<ue.length;re+=1){const ee=Q1($,ue,re);ne[re]?ne[re].p(ee,te):(ne[re]=X1(ee),ne[re].c(),ne[re].m(g,R))}for(;re<ne.length;re+=1)ne[re].d(1);ne.length=ue.length}te&32&&N!==(N=$[5]("auth.addToken")+"")&&k(Z,N),te&32&&U!==(U=$[5]("auth.securityNotice")+"")&&k(O,U)},d($){$&&(P(l),P(Y),P(x)),Gt(ne,$),J=!1,ie()}}}function X1(t){let l,e,n,r,i,u,c;function f(){t[11].call(e,t[15])}function d(){return t[12](t[15])}return{c(){l=a("div"),e=a("input"),r=h(),i=a("button"),i.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=t[5]("auth.tokenPlaceholder")),o(e,"class","input input-bordered input-sm flex-1 font-mono text-xs"),o(i,"type","button"),o(i,"class","btn btn-sm btn-error btn-square"),o(l,"class","flex gap-2")},m(p,m){j(p,l,m),s(l,e),Q(e,t[3][t[15]]),s(l,r),s(l,i),u||(c=[V(e,"input",f),V(i,"click",d)],u=!0)},p(p,m){t=p,m&32&&n!==(n=t[5]("auth.tokenPlaceholder"))&&o(e,"placeholder",n),m&8&&e.value!==t[3][t[15]]&&Q(e,t[3][t[15]])},d(p){p&&P(l),u=!1,bt(c)}}}function nm(t){let l,e,n,r,i,u,c,f,d,p,m,g,b=t[5]("auth.enableAuth")+"",v,w,C,E,y=t[1]&&Y1(t),T=t[2]&&Z1(t);return{c(){l=a("div"),e=a("div"),n=a("span"),r=_(t[0]),i=h(),y&&y.c(),u=h(),c=a("div"),f=a("div"),d=a("label"),p=a("input"),m=h(),g=a("span"),v=_(b),w=h(),T&&T.c(),o(n,"class","label-text font-semibold"),o(e,"class","label"),o(p,"type","checkbox"),o(p,"class","checkbox"),o(g,"class","label-text"),o(d,"class","label cursor-pointer justify-start gap-4"),o(f,"class","form-control"),o(c,"class","space-y-4"),o(l,"class","form-control w-full")},m(S,q){j(S,l,q),s(l,e),s(e,n),s(n,r),s(e,i),y&&y.m(e,null),s(l,u),s(l,c),s(c,f),s(f,d),s(d,p),p.checked=t[2],s(d,m),s(d,g),s(g,v),s(c,w),T&&T.m(c,null),C||(E=[V(p,"change",t[9]),V(p,"change",t[10])],C=!0)},p(S,[q]){q&1&&k(r,S[0]),S[1]?y?y.p(S,q):(y=Y1(S),y.c(),y.m(e,null)):y&&(y.d(1),y=null),q&4&&(p.checked=S[2]),q&32&&b!==(b=S[5]("auth.enableAuth")+"")&&k(v,b),S[2]?T?T.p(S,q):(T=Z1(S),T.c(),T.m(c,null)):T&&(T.d(1),T=null)},i:tt,o:tt,d(S){S&&P(l),y&&y.d(),T&&T.d(),C=!1,bt(E)}}}function rm(t,l,e){let n;Dt(t,Rt,C=>e(5,n=C));let{value:r=void 0}=l,{label:i="Authentication"}=l,{showHelp:u=!0}=l,c=!1,f=[],d=!1;function p(){e(3,f=[...f,""]),e(4,d=!0)}function m(C){e(3,f=f.filter((E,y)=>y!==C))}function g(){c=this.checked,e(2,c),e(4,d),e(8,r),e(3,f)}const b=()=>{c&&f.length===0&&e(3,f=[""]),e(4,d=!0)};function v(C){f[C]=this.value,e(3,f),e(4,d),e(8,r),e(2,c)}const w=C=>m(C);return t.$$set=C=>{"value"in C&&e(8,r=C.value),"label"in C&&e(0,i=C.label),"showHelp"in C&&e(1,u=C.showHelp)},t.$$.update=()=>{if(t.$$.dirty&284)if(!d&&r&&(e(2,c=r.enabled||!1),e(3,f=r.tokens?[...r.tokens]:[]),e(4,d=!0)),c){const C=f.filter(E=>E.trim()!=="");r?(e(8,r.enabled=!0,r),e(8,r.tokens=C,r)):e(8,r={enabled:!0,tokens:C})}else r&&(e(8,r.enabled=!1,r),e(8,r.tokens=[],r))},[i,u,c,f,d,n,p,m,r,g,b,v,w]}class Z0 extends Vt{constructor(l){super(),Ut(this,l,rm,nm,At,{value:8,label:0,showHelp:1})}}async function am(t={}){const l=new URLSearchParams;return Object.entries(t).forEach(([e,n])=>{n!=null&&(Array.isArray(n)?n.forEach(r=>l.append(e,String(r))):l.append(e,String(n)))}),Cl.get(`/logs?${l.toString()}`)}async function im(t={},l="json"){const e=new URLSearchParams;Object.entries(t).forEach(([r,i])=>{i!=null&&e.append(r,String(i))}),e.append("format",l);const n=await fetch(`/__ui/api/logs/export?${e.toString()}`);if(!n.ok)throw new Error("Failed to export logs");return n.blob()}async function xu(t){return(await Cl.get(`/logs/body/${t}`)).content}async function $u(t){return Cl.get(`/logs/headers/${t}`)}async function um(){return Cl.get("/logs/cleanup/config")}async function fm(){return Cl.post("/logs/cleanup")}function x1(t){let l,e;return{c(){l=a("h3"),e=_(t[1]),o(l,"class","text-lg font-semibold")},m(n,r){j(n,l,r),s(l,e)},p(n,r){r&2&&k(e,n[1])},d(n){n&&P(l)}}}function $1(t){let l,e,n,r,i=t[6]("logging.maxSize")+"",u,c,f,d,p,m,g,b,v,w=t[6]("logging.maxSizeHelp")+"",C,E,y,T,S,q=t[6]("logging.retentionDays")+"",D,H,I,R,L,A,N=t[6]("logging.days")+"",Z,Y,x,F,K=t[6]("logging.retentionDaysHelp")+"",M,B,U;return{c(){l=a("div"),e=a("div"),n=a("label"),r=a("span"),u=_(i),c=h(),f=a("div"),d=a("input"),p=h(),m=a("span"),m.textContent="KB",g=h(),b=a("div"),v=a("span"),C=_(w),E=h(),y=a("div"),T=a("label"),S=a("span"),D=_(q),H=h(),I=a("div"),R=a("input"),L=h(),A=a("span"),Z=_(N),Y=h(),x=a("div"),F=a("span"),M=_(K),o(r,"class","label-text"),o(n,"class","label"),o(n,"for","logging-max-size"),o(d,"id","logging-max-size"),o(d,"type","number"),o(d,"class","input input-bordered flex-1"),o(d,"min","1024"),o(d,"max","102400"),o(d,"step","1024"),o(m,"class","text-sm text-gray-500"),o(f,"class","flex gap-2 items-center"),o(v,"class","label-text-alt"),o(b,"class","label"),o(e,"class","form-control"),o(S,"class","label-text"),o(T,"class","label"),o(T,"for","logging-retention-days"),o(R,"id","logging-retention-days"),o(R,"type","number"),o(R,"class","input input-bordered flex-1"),o(R,"min","1"),o(R,"max","30"),o(A,"class","text-sm text-gray-500"),o(I,"class","flex gap-2 items-center"),o(F,"class","label-text-alt"),o(x,"class","label"),o(y,"class","form-control"),o(l,"class","ml-8 space-y-4")},m(O,J){j(O,l,J),s(l,e),s(e,n),s(n,r),s(r,u),s(e,c),s(e,f),s(f,d),Q(d,t[0].body.maxSize),s(f,p),s(f,m),s(e,g),s(e,b),s(b,v),s(v,C),s(l,E),s(l,y),s(y,T),s(T,S),s(S,D),s(y,H),s(y,I),s(I,R),Q(R,t[0].body.retentionDays),s(I,L),s(I,A),s(A,Z),s(y,Y),s(y,x),s(x,F),s(F,M),B||(U=[V(d,"input",t[10]),V(d,"input",t[7]),V(R,"input",t[11]),V(R,"input",t[7])],B=!0)},p(O,J){J&64&&i!==(i=O[6]("logging.maxSize")+"")&&k(u,i),J&1&&St(d.value)!==O[0].body.maxSize&&Q(d,O[0].body.maxSize),J&64&&w!==(w=O[6]("logging.maxSizeHelp")+"")&&k(C,w),J&64&&q!==(q=O[6]("logging.retentionDays")+"")&&k(D,q),J&1&&St(R.value)!==O[0].body.retentionDays&&Q(R,O[0].body.retentionDays),J&64&&N!==(N=O[6]("logging.days")+"")&&k(Z,N),J&64&&K!==(K=O[6]("logging.retentionDaysHelp")+"")&&k(M,K)},d(O){O&&P(l),B=!1,bt(U)}}}function cm(t){let l,e,n,r=t[6]("logging.cleanupStatus")+"",i,u,c,f=(t[2].isActive?t[6]("logging.active"):t[6]("logging.inactive"))+"",d,p,m,g,b,v=t[6]("logging.cleanupRetention")+"",w,C,E,y=t[2].retentionDays+"",T,S,q=t[6]("logging.days")+"",D,H,I,R,L=t[6]("logging.cleanupInterval")+"",A,N,Z,Y=t[2].scheduleIntervalHours+"",x,F,K=t[6]("logging.hours")+"",M,B,U,O,J=t[6]("logging.manualCleanup")+"",ie,ue,ne,$,te;function re(oe,ge){return oe[4]?hm:pm}let ee=re(t),G=ee(t),pe=t[5]&&ec(t);return{c(){l=a("div"),e=a("div"),n=a("span"),i=_(r),u=h(),c=a("span"),d=_(f),m=h(),g=a("div"),b=a("span"),w=_(v),C=h(),E=a("span"),T=_(y),S=h(),D=_(q),H=h(),I=a("div"),R=a("span"),A=_(L),N=h(),Z=a("span"),x=_(Y),F=h(),M=_(K),B=h(),U=a("button"),G.c(),O=h(),ie=_(J),ue=h(),pe&&pe.c(),ne=Ul(),o(n,"class","text-gray-500"),o(c,"class",p="font-semibold "+(t[2].isActive?"text-success":"text-error")),o(e,"class","flex justify-between text-sm"),o(b,"class","text-gray-500"),o(E,"class","font-semibold"),o(g,"class","flex justify-between text-sm"),o(R,"class","text-gray-500"),o(Z,"class","font-semibold"),o(I,"class","flex justify-between text-sm"),o(l,"class","bg-base-200 p-4 rounded-lg space-y-2"),o(U,"class","btn btn-outline btn-sm w-full"),U.disabled=t[4]},m(oe,ge){j(oe,l,ge),s(l,e),s(e,n),s(n,i),s(e,u),s(e,c),s(c,d),s(l,m),s(l,g),s(g,b),s(b,w),s(g,C),s(g,E),s(E,T),s(E,S),s(E,D),s(l,H),s(l,I),s(I,R),s(R,A),s(I,N),s(I,Z),s(Z,x),s(Z,F),s(Z,M),j(oe,B,ge),j(oe,U,ge),G.m(U,null),s(U,O),s(U,ie),j(oe,ue,ge),pe&&pe.m(oe,ge),j(oe,ne,ge),$||(te=V(U,"click",t[8]),$=!0)},p(oe,ge){ge&64&&r!==(r=oe[6]("logging.cleanupStatus")+"")&&k(i,r),ge&68&&f!==(f=(oe[2].isActive?oe[6]("logging.active"):oe[6]("logging.inactive"))+"")&&k(d,f),ge&4&&p!==(p="font-semibold "+(oe[2].isActive?"text-success":"text-error"))&&o(c,"class",p),ge&64&&v!==(v=oe[6]("logging.cleanupRetention")+"")&&k(w,v),ge&4&&y!==(y=oe[2].retentionDays+"")&&k(T,y),ge&64&&q!==(q=oe[6]("logging.days")+"")&&k(D,q),ge&64&&L!==(L=oe[6]("logging.cleanupInterval")+"")&&k(A,L),ge&4&&Y!==(Y=oe[2].scheduleIntervalHours+"")&&k(x,Y),ge&64&&K!==(K=oe[6]("logging.hours")+"")&&k(M,K),ee!==(ee=re(oe))&&(G.d(1),G=ee(oe),G&&(G.c(),G.m(U,O))),ge&64&&J!==(J=oe[6]("logging.manualCleanup")+"")&&k(ie,J),ge&16&&(U.disabled=oe[4]),oe[5]?pe?pe.p(oe,ge):(pe=ec(oe),pe.c(),pe.m(ne.parentNode,ne)):pe&&(pe.d(1),pe=null)},d(oe){oe&&(P(l),P(B),P(U),P(ue),P(ne)),G.d(),pe&&pe.d(oe),$=!1,te()}}}function dm(t){let l,e,n,r,i=t[6]("common.loading")+"",u;return{c(){l=a("div"),e=a("span"),n=h(),r=a("span"),u=_(i),o(e,"class","loading loading-spinner loading-sm"),o(r,"class","text-sm"),o(l,"class","flex items-center gap-2")},m(c,f){j(c,l,f),s(l,e),s(l,n),s(l,r),s(r,u)},p(c,f){f&64&&i!==(i=c[6]("common.loading")+"")&&k(u,i)},d(c){c&&P(l)}}}function pm(t){let l,e;return{c(){l=ae("svg"),e=ae("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"),o(l,"xmlns","http://www.w3.org/2000/svg"),o(l,"class","h-4 w-4"),o(l,"fill","none"),o(l,"viewBox","0 0 24 24"),o(l,"stroke","currentColor")},m(n,r){j(n,l,r),s(l,e)},d(n){n&&P(l)}}}function hm(t){let l;return{c(){l=a("span"),o(l,"class","loading loading-spinner loading-xs")},m(e,n){j(e,l,n)},d(e){e&&P(l)}}}function ec(t){let l,e,n,r,i,u,c=t[6]("logging.lastCleanup")+"",f,d,p,m,g=t[6]("logging.deletedSqliteRecords")+"",b,v,w=t[5].deletedSqliteRecords+"",C,E,y,T=t[6]("logging.deletedFileLogFiles")+"",S,q,D=t[5].deletedFileLogFiles+"",H,I,R,L=t[6]("logging.deletedBodyFiles")+"",A,N,Z=t[5].deletedBodyDirs+"",Y,x,F=t[6]("logging.dirs")+"",K,M,B=t[5].deletedBodyFiles+"",U,O,J=t[6]("logging.files")+"",ie,ue,ne,$=t[6]("logging.duration")+"",te,re,ee=t[5].durationMs+"",G,pe;return{c(){l=a("div"),e=ae("svg"),n=ae("path"),r=h(),i=a("div"),u=a("div"),f=_(c),d=h(),p=a("div"),m=a("div"),b=_(g),v=_(": "),C=_(w),E=h(),y=a("div"),S=_(T),q=_(": "),H=_(D),I=h(),R=a("div"),A=_(L),N=_(": "),Y=_(Z),x=h(),K=_(F),M=_(", "),U=_(B),O=h(),ie=_(J),ue=h(),ne=a("div"),te=_($),re=_(": "),G=_(ee),pe=_("ms"),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","stroke-current shrink-0 h-6 w-6"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(u,"class","font-semibold"),o(p,"class","mt-1 space-y-1"),o(i,"class","text-sm"),o(l,"class","alert alert-success")},m(oe,ge){j(oe,l,ge),s(l,e),s(e,n),s(l,r),s(l,i),s(i,u),s(u,f),s(i,d),s(i,p),s(p,m),s(m,b),s(m,v),s(m,C),s(p,E),s(p,y),s(y,S),s(y,q),s(y,H),s(p,I),s(p,R),s(R,A),s(R,N),s(R,Y),s(R,x),s(R,K),s(R,M),s(R,U),s(R,O),s(R,ie),s(p,ue),s(p,ne),s(ne,te),s(ne,re),s(ne,G),s(ne,pe)},p(oe,ge){ge&64&&c!==(c=oe[6]("logging.lastCleanup")+"")&&k(f,c),ge&64&&g!==(g=oe[6]("logging.deletedSqliteRecords")+"")&&k(b,g),ge&32&&w!==(w=oe[5].deletedSqliteRecords+"")&&k(C,w),ge&64&&T!==(T=oe[6]("logging.deletedFileLogFiles")+"")&&k(S,T),ge&32&&D!==(D=oe[5].deletedFileLogFiles+"")&&k(H,D),ge&64&&L!==(L=oe[6]("logging.deletedBodyFiles")+"")&&k(A,L),ge&32&&Z!==(Z=oe[5].deletedBodyDirs+"")&&k(Y,Z),ge&64&&F!==(F=oe[6]("logging.dirs")+"")&&k(K,F),ge&32&&B!==(B=oe[5].deletedBodyFiles+"")&&k(U,B),ge&64&&J!==(J=oe[6]("logging.files")+"")&&k(ie,J),ge&64&&$!==($=oe[6]("logging.duration")+"")&&k(te,$),ge&32&&ee!==(ee=oe[5].durationMs+"")&&k(G,ee)},d(oe){oe&&P(l)}}}function mm(t){let l,e,n,r,i,u,c,f,d=t[6]("logging.bodyRecording")+"",p,m,g,b=t[6]("logging.bodyRecordingHelp")+"",v,w,C,E,y,T,S=t[6]("logging.cleanupConfig")+"",q,D,H,I,R=t[1]&&x1(t),L=t[0].body.enabled&&$1(t);function A(Y,x){if(Y[3])return dm;if(Y[2])return cm}let N=A(t),Z=N&&N(t);return{c(){l=a("div"),R&&R.c(),e=h(),n=a("div"),r=a("label"),i=a("input"),u=h(),c=a("div"),f=a("span"),p=_(d),m=h(),g=a("p"),v=_(b),w=h(),L&&L.c(),C=h(),E=a("div"),y=h(),T=a("h4"),q=_(S),D=h(),Z&&Z.c(),o(i,"type","checkbox"),o(i,"class","checkbox"),o(f,"class","label-text font-semibold"),o(g,"class","text-xs text-gray-500 mt-1"),o(c,"class","flex-1"),o(r,"class","label cursor-pointer justify-start gap-4"),o(n,"class","form-control"),o(E,"class","divider"),o(T,"class","font-semibold"),o(l,"class","space-y-4")},m(Y,x){j(Y,l,x),R&&R.m(l,null),s(l,e),s(l,n),s(n,r),s(r,i),i.checked=t[0].body.enabled,s(r,u),s(r,c),s(c,f),s(f,p),s(c,m),s(c,g),s(g,v),s(l,w),L&&L.m(l,null),s(l,C),s(l,E),s(l,y),s(l,T),s(T,q),s(l,D),Z&&Z.m(l,null),H||(I=[V(i,"change",t[9]),V(i,"change",t[7])],H=!0)},p(Y,[x]){Y[1]?R?R.p(Y,x):(R=x1(Y),R.c(),R.m(l,e)):R&&(R.d(1),R=null),x&1&&(i.checked=Y[0].body.enabled),x&64&&d!==(d=Y[6]("logging.bodyRecording")+"")&&k(p,d),x&64&&b!==(b=Y[6]("logging.bodyRecordingHelp")+"")&&k(v,b),Y[0].body.enabled?L?L.p(Y,x):(L=$1(Y),L.c(),L.m(l,C)):L&&(L.d(1),L=null),x&64&&S!==(S=Y[6]("logging.cleanupConfig")+"")&&k(q,S),N===(N=A(Y))&&Z?Z.p(Y,x):(Z&&Z.d(1),Z=N&&N(Y),Z&&(Z.c(),Z.m(l,null)))},i:tt,o:tt,d(Y){Y&&P(l),R&&R.d(),L&&L.d(),Z&&Z.d(),H=!1,bt(I)}}}function gm(t,l,e){let n;Dt(t,Rt,E=>e(6,n=E));let{value:r=null}=l,{label:i=""}=l;const u=Cr();let c=null,f=!1,d=!1,p=null;function m(){u("input")}async function g(){e(3,f=!0);try{e(2,c=await um())}catch(E){console.error("Failed to load cleanup config:",E),Lt.show(n("common.error")+": "+(E instanceof Error?E.message:"Unknown error"),"error")}finally{e(3,f=!1)}}async function b(){if(confirm(n("logging.confirmCleanup"))){e(4,d=!0);try{e(5,p=await fm()),Lt.show(n("logging.cleanupSuccess"),"success"),await g()}catch(E){console.error("Failed to trigger cleanup:",E),Lt.show(n("logging.cleanupFailed",{values:{error:E instanceof Error?E.message:"Unknown error"}}),"error")}finally{e(4,d=!1)}}}Hs(()=>{g()});function v(){r.body.enabled=this.checked,e(0,r)}function w(){r.body.maxSize=St(this.value),e(0,r)}function C(){r.body.retentionDays=St(this.value),e(0,r)}return t.$$set=E=>{"value"in E&&e(0,r=E.value),"label"in E&&e(1,i=E.label)},t.$$.update=()=>{t.$$.dirty&1&&(r||e(0,r={body:{enabled:!1,maxSize:5120,retentionDays:1}})),t.$$.dirty&1&&r&&!r.body&&e(0,r.body={enabled:!1,maxSize:5120,retentionDays:1},r)},[r,i,c,f,d,p,n,m,b,v,w,C]}class _m extends Vt{constructor(l){super(),Ut(this,l,gm,mm,At,{value:0,label:1})}}function bm(t){let l,e;return{c(){l=ae("svg"),e=ae("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3m-1 4l-3 3m0 0l-3-3m3 3V4"),o(l,"xmlns","http://www.w3.org/2000/svg"),o(l,"class","h-4 w-4"),o(l,"fill","none"),o(l,"viewBox","0 0 24 24"),o(l,"stroke","currentColor")},m(n,r){j(n,l,r),s(l,e)},d(n){n&&P(l)}}}function vm(t){let l;return{c(){l=a("span"),o(l,"class","loading loading-spinner loading-xs")},m(e,n){j(e,l,n)},d(e){e&&P(l)}}}function km(t){let l,e;return{c(){l=ae("svg"),e=ae("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),o(l,"xmlns","http://www.w3.org/2000/svg"),o(l,"class","h-4 w-4"),o(l,"fill","none"),o(l,"viewBox","0 0 24 24"),o(l,"stroke","currentColor")},m(n,r){j(n,l,r),s(l,e)},d(n){n&&P(l)}}}function wm(t){let l;return{c(){l=a("span"),o(l,"class","loading loading-spinner loading-xs")},m(e,n){j(e,l,n)},d(e){e&&P(l)}}}function ym(t){let l,e;return{c(){l=ae("svg"),e=ae("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),o(l,"xmlns","http://www.w3.org/2000/svg"),o(l,"class","h-4 w-4"),o(l,"fill","none"),o(l,"viewBox","0 0 24 24"),o(l,"stroke","currentColor")},m(n,r){j(n,l,r),s(l,e)},d(n){n&&P(l)}}}function Cm(t){let l;return{c(){l=a("span"),o(l,"class","loading loading-spinner loading-xs")},m(e,n){j(e,l,n)},d(e){e&&P(l)}}}function Em(t){let l,e,n,r,i,u=t[11]("configuration.formEditor")+"",c,f,d,p,m,g,b=t[11]("configuration.jsonEditor")+"",v,w,C,E,y,T,S,q,D;const H=[Rm,Sm],I=[];function R(L,A){return L[7]==="form"?0:1}return C=R(t),E=I[C]=H[C](t),S=uf(t[20][0]),{c(){l=a("div"),e=a("label"),n=a("input"),r=h(),i=a("span"),c=_(u),f=h(),d=a("label"),p=a("input"),m=h(),g=a("span"),v=_(b),w=h(),E.c(),y=Ul(),o(n,"class","sr-only"),o(n,"type","radio"),o(n,"name","editMode"),n.__value="form",Q(n,n.__value),o(i,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),le(i,"bg-primary",t[7]==="form"),le(i,"text-primary-content",t[7]==="form"),le(i,"shadow",t[7]==="form"),le(i,"text-gray-700",t[7]!=="form"),le(i,"dark:text-gray-300",t[7]!=="form"),le(i,"hover:text-gray-900",t[7]!=="form"),le(i,"dark:hover:text-gray-100",t[7]!=="form"),o(e,"class","cursor-pointer"),o(p,"class","sr-only"),o(p,"type","radio"),o(p,"name","editMode"),p.__value="json",Q(p,p.__value),o(g,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),le(g,"bg-primary",t[7]==="json"),le(g,"text-primary-content",t[7]==="json"),le(g,"shadow",t[7]==="json"),le(g,"text-gray-700",t[7]!=="json"),le(g,"dark:text-gray-300",t[7]!=="json"),le(g,"hover:text-gray-900",t[7]!=="json"),le(g,"dark:hover:text-gray-100",t[7]!=="json"),o(d,"class","cursor-pointer"),o(l,"class","inline-flex gap-1 p-1 bg-white dark:bg-gray-800 rounded-lg shadow-sm mb-4"),S.p(n,p)},m(L,A){j(L,l,A),s(l,e),s(e,n),n.checked=n.__value===t[7],s(e,r),s(e,i),s(i,c),s(l,f),s(l,d),s(d,p),p.checked=p.__value===t[7],s(d,m),s(d,g),s(g,v),j(L,w,A),I[C].m(L,A),j(L,y,A),T=!0,q||(D=[V(n,"change",t[19]),V(p,"change",t[21])],q=!0)},p(L,A){A[0]&128&&(n.checked=n.__value===L[7]),(!T||A[0]&2048)&&u!==(u=L[11]("configuration.formEditor")+"")&&k(c,u),(!T||A[0]&128)&&le(i,"bg-primary",L[7]==="form"),(!T||A[0]&128)&&le(i,"text-primary-content",L[7]==="form"),(!T||A[0]&128)&&le(i,"shadow",L[7]==="form"),(!T||A[0]&128)&&le(i,"text-gray-700",L[7]!=="form"),(!T||A[0]&128)&&le(i,"dark:text-gray-300",L[7]!=="form"),(!T||A[0]&128)&&le(i,"hover:text-gray-900",L[7]!=="form"),(!T||A[0]&128)&&le(i,"dark:hover:text-gray-100",L[7]!=="form"),A[0]&128&&(p.checked=p.__value===L[7]),(!T||A[0]&2048)&&b!==(b=L[11]("configuration.jsonEditor")+"")&&k(v,b),(!T||A[0]&128)&&le(g,"bg-primary",L[7]==="json"),(!T||A[0]&128)&&le(g,"text-primary-content",L[7]==="json"),(!T||A[0]&128)&&le(g,"shadow",L[7]==="json"),(!T||A[0]&128)&&le(g,"text-gray-700",L[7]!=="json"),(!T||A[0]&128)&&le(g,"dark:text-gray-300",L[7]!=="json"),(!T||A[0]&128)&&le(g,"hover:text-gray-900",L[7]!=="json"),(!T||A[0]&128)&&le(g,"dark:hover:text-gray-100",L[7]!=="json");let N=C;C=R(L),C===N?I[C].p(L,A):(Gl(),st(I[N],1,1,()=>{I[N]=null}),Kl(),E=I[C],E?E.p(L,A):(E=I[C]=H[C](L),E.c()),et(E,1),E.m(y.parentNode,y))},i(L){T||(et(E),T=!0)},o(L){st(E),T=!1},d(L){L&&(P(l),P(w),P(y)),I[C].d(L),S.r(),q=!1,bt(D)}}}function Tm(t){let l,e,n,r,i,u=t[11]("common.error")+"",c,f,d;return{c(){l=a("div"),e=ae("svg"),n=ae("path"),r=h(),i=a("span"),c=_(u),f=_(": "),d=_(t[2]),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","stroke-current shrink-0 h-6 w-6"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(l,"class","alert alert-error")},m(p,m){j(p,l,m),s(l,e),s(e,n),s(l,r),s(l,i),s(i,c),s(i,f),s(i,d)},p(p,m){m[0]&2048&&u!==(u=p[11]("common.error")+"")&&k(c,u),m[0]&4&&k(d,p[2])},i:tt,o:tt,d(p){p&&P(l)}}}function Mm(t){let l;return{c(){l=a("div"),l.innerHTML=\'<span class="loading loading-spinner loading-lg"></span>\',o(l,"class","flex justify-center items-center h-64")},m(e,n){j(e,l,n)},p:tt,i:tt,o:tt,d(e){e&&P(l)}}}function Sm(t){let l,e,n,r=t[11]("configuration.jsonConfiguration")+"",i,u,c,f,d,p,m,g=t[11]("configuration.jsonHelp")+"",b,v,w,C=t[9]&&tc(t);return{c(){l=a("div"),e=a("div"),n=a("h2"),i=_(r),u=h(),C&&C.c(),c=h(),f=a("textarea"),p=h(),m=a("p"),b=_(g),o(n,"class","card-title"),o(f,"class","textarea textarea-bordered font-mono text-sm h-96"),o(f,"placeholder",d=t[11]("configuration.jsonPlaceholder")),o(m,"class","text-sm text-gray-500 mt-2"),o(e,"class","card-body"),o(l,"class","card bg-base-100 shadow-xl")},m(E,y){j(E,l,y),s(l,e),s(e,n),s(n,i),s(e,u),C&&C.m(e,null),s(e,c),s(e,f),Q(f,t[8]),s(e,p),s(e,m),s(m,b),v||(w=[V(f,"input",t[28]),V(f,"input",t[12])],v=!0)},p(E,y){y[0]&2048&&r!==(r=E[11]("configuration.jsonConfiguration")+"")&&k(i,r),E[9]?C?C.p(E,y):(C=tc(E),C.c(),C.m(e,c)):C&&(C.d(1),C=null),y[0]&2048&&d!==(d=E[11]("configuration.jsonPlaceholder"))&&o(f,"placeholder",d),y[0]&256&&Q(f,E[8]),y[0]&2048&&g!==(g=E[11]("configuration.jsonHelp")+"")&&k(b,g)},i:tt,o:tt,d(E){E&&P(l),C&&C.d(),v=!1,bt(w)}}}function Rm(t){let l,e,n,r=t[11]("configuration.systemSettings")+"",i,u,c,f,d,p=t[11]("configuration.serverPort")+"",m,g,b,v,w,C,E,y=t[11]("configuration.workerProcesses")+"",T,S,q,D,H,I,R=t[11]("configuration.workerProcessesHelp")+"",L,A,N,Z,Y,x=t[11]("configuration.logLevel")+"",F,K,M,B,U,O,J,ie,ue,ne,$,te=t[11]("configuration.bodyParserLimit")+"",re,ee,G,pe,oe,ge,he=t[11]("configuration.bodyParserLimitHelp")+"",ye,Fe,je,we,Oe,Je,Le,Pe,Me,fe,_e,Be,De,se,ke=t[11]("configuration.requiresRestart")+"",me,Ee,Ve,Ie,nt,Ne=t[11]("logging.title")+"",Ye,Qe,ve,de,Te,Ze,Se,Ue,Ce=t[11]("routes.title")+"",mt,Ge,ce,qe,Re,dt,We,z=t[11]("configuration.routesConfigured",{values:{count:t[1].routes.length}})+"",He,X,ft=t[11]("configuration.manageRoutes")+"",Ht,Ke,_t,lt;function it(at){t[26](at)}let ze={label:t[11]("auth.globalAuth")};t[1].auth!==void 0&&(ze.value=t[1].auth),Oe=new Z0({props:ze}),bl.push(()=>Rl(Oe,"value",it));function Xe(at){t[27](at)}let Bt={};return t[1].logging!==void 0&&(Bt.value=t[1].logging),ve=new _m({props:Bt}),bl.push(()=>Rl(ve,"value",Xe)),{c(){l=a("div"),e=a("div"),n=a("h2"),i=_(r),u=h(),c=a("div"),f=a("label"),d=a("span"),m=_(p),g=h(),b=a("input"),v=h(),w=a("div"),C=a("label"),E=a("span"),T=_(y),S=h(),q=a("input"),D=h(),H=a("div"),I=a("span"),L=_(R),A=h(),N=a("div"),Z=a("label"),Y=a("span"),F=_(x),K=h(),M=a("select"),B=a("option"),B.textContent="Debug",U=a("option"),U.textContent="Info",O=a("option"),O.textContent="Warning",J=a("option"),J.textContent="Error",ie=h(),ue=a("div"),ne=a("label"),$=a("span"),re=_(te),ee=h(),G=a("input"),pe=h(),oe=a("div"),ge=a("span"),ye=_(he),Fe=h(),je=a("div"),we=h(),Et(Oe.$$.fragment),Le=h(),Pe=a("div"),Me=h(),fe=a("div"),_e=ae("svg"),Be=ae("path"),De=h(),se=a("span"),me=_(ke),Ee=h(),Ve=a("div"),Ie=a("div"),nt=a("h2"),Ye=_(Ne),Qe=h(),Et(ve.$$.fragment),Te=h(),Ze=a("div"),Se=a("div"),Ue=a("h2"),mt=_(Ce),Ge=h(),ce=a("div"),qe=ae("svg"),Re=ae("path"),dt=h(),We=a("span"),He=_(z),X=h(),Ht=_(ft),o(n,"class","card-title"),o(d,"class","label-text"),o(f,"class","label"),o(f,"for","config-port"),o(b,"id","config-port"),o(b,"type","number"),o(b,"class","input input-bordered"),o(b,"placeholder","8088"),o(c,"class","form-control"),o(E,"class","label-text"),o(C,"class","label"),o(C,"for","config-workers"),o(q,"id","config-workers"),o(q,"type","number"),o(q,"class","input input-bordered"),o(q,"min","1"),o(q,"placeholder","2"),o(I,"class","label-text-alt"),o(H,"class","label"),o(w,"class","form-control"),o(Y,"class","label-text"),o(Z,"class","label"),o(Z,"for","config-log-level"),B.__value="debug",Q(B,B.__value),U.__value="info",Q(U,U.__value),O.__value="warn",Q(O,O.__value),J.__value="error",Q(J,J.__value),o(M,"id","config-log-level"),o(M,"class","select select-bordered"),t[1].logLevel===void 0&&tl(()=>t[24].call(M)),o(N,"class","form-control"),o($,"class","label-text"),o(ne,"class","label"),o(ne,"for","config-body-limit"),o(G,"id","config-body-limit"),o(G,"type","text"),o(G,"class","input input-bordered"),o(G,"placeholder","50mb"),o(ge,"class","label-text-alt"),o(oe,"class","label"),o(ue,"class","form-control"),o(je,"class","divider"),o(Pe,"class","divider"),o(Be,"stroke-linecap","round"),o(Be,"stroke-linejoin","round"),o(Be,"stroke-width","2"),o(Be,"d","M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"),o(_e,"xmlns","http://www.w3.org/2000/svg"),o(_e,"class","stroke-current shrink-0 h-6 w-6"),o(_e,"fill","none"),o(_e,"viewBox","0 0 24 24"),o(fe,"class","alert alert-warning"),o(e,"class","card-body"),o(l,"class","card bg-base-100 shadow-xl mb-4"),o(nt,"class","card-title"),o(Ie,"class","card-body"),o(Ve,"class","card bg-base-100 shadow-xl mb-4"),o(Ue,"class","card-title"),o(Re,"stroke-linecap","round"),o(Re,"stroke-linejoin","round"),o(Re,"stroke-width","2"),o(Re,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(qe,"xmlns","http://www.w3.org/2000/svg"),o(qe,"fill","none"),o(qe,"viewBox","0 0 24 24"),o(qe,"class","stroke-current shrink-0 w-6 h-6"),o(ce,"class","alert alert-info"),o(Se,"class","card-body"),o(Ze,"class","card bg-base-100 shadow-xl")},m(at,gt){j(at,l,gt),s(l,e),s(e,n),s(n,i),s(e,u),s(e,c),s(c,f),s(f,d),s(d,m),s(c,g),s(c,b),Q(b,t[1].port),s(e,v),s(e,w),s(w,C),s(C,E),s(E,T),s(w,S),s(w,q),Q(q,t[1].workers),s(w,D),s(w,H),s(H,I),s(I,L),s(e,A),s(e,N),s(N,Z),s(Z,Y),s(Y,F),s(N,K),s(N,M),s(M,B),s(M,U),s(M,O),s(M,J),kt(M,t[1].logLevel,!0),s(e,ie),s(e,ue),s(ue,ne),s(ne,$),s($,re),s(ue,ee),s(ue,G),Q(G,t[1].bodyParserLimit),s(ue,pe),s(ue,oe),s(oe,ge),s(ge,ye),s(e,Fe),s(e,je),s(e,we),yt(Oe,e,null),s(e,Le),s(e,Pe),s(e,Me),s(e,fe),s(fe,_e),s(_e,Be),s(fe,De),s(fe,se),s(se,me),j(at,Ee,gt),j(at,Ve,gt),s(Ve,Ie),s(Ie,nt),s(nt,Ye),s(Ie,Qe),yt(ve,Ie,null),j(at,Te,gt),j(at,Ze,gt),s(Ze,Se),s(Se,Ue),s(Ue,mt),s(Se,Ge),s(Se,ce),s(ce,qe),s(qe,Re),s(ce,dt),s(ce,We),s(We,He),s(We,X),s(We,Ht),Ke=!0,_t||(lt=[V(b,"input",t[22]),V(q,"input",t[23]),V(M,"change",t[24]),V(G,"input",t[25])],_t=!0)},p(at,gt){(!Ke||gt[0]&2048)&&r!==(r=at[11]("configuration.systemSettings")+"")&&k(i,r),(!Ke||gt[0]&2048)&&p!==(p=at[11]("configuration.serverPort")+"")&&k(m,p),gt[0]&2&&St(b.value)!==at[1].port&&Q(b,at[1].port),(!Ke||gt[0]&2048)&&y!==(y=at[11]("configuration.workerProcesses")+"")&&k(T,y),gt[0]&2&&St(q.value)!==at[1].workers&&Q(q,at[1].workers),(!Ke||gt[0]&2048)&&R!==(R=at[11]("configuration.workerProcessesHelp")+"")&&k(L,R),(!Ke||gt[0]&2048)&&x!==(x=at[11]("configuration.logLevel")+"")&&k(F,x),gt[0]&2&&kt(M,at[1].logLevel),(!Ke||gt[0]&2048)&&te!==(te=at[11]("configuration.bodyParserLimit")+"")&&k(re,te),gt[0]&2&&G.value!==at[1].bodyParserLimit&&Q(G,at[1].bodyParserLimit),(!Ke||gt[0]&2048)&&he!==(he=at[11]("configuration.bodyParserLimitHelp")+"")&&k(ye,he);const wt={};gt[0]&2048&&(wt.label=at[11]("auth.globalAuth")),!Je&&gt[0]&2&&(Je=!0,wt.value=at[1].auth,Sl(()=>Je=!1)),Oe.$set(wt),(!Ke||gt[0]&2048)&&ke!==(ke=at[11]("configuration.requiresRestart")+"")&&k(me,ke),(!Ke||gt[0]&2048)&&Ne!==(Ne=at[11]("logging.title")+"")&&k(Ye,Ne);const pt={};!de&&gt[0]&2&&(de=!0,pt.value=at[1].logging,Sl(()=>de=!1)),ve.$set(pt),(!Ke||gt[0]&2048)&&Ce!==(Ce=at[11]("routes.title")+"")&&k(mt,Ce),(!Ke||gt[0]&2050)&&z!==(z=at[11]("configuration.routesConfigured",{values:{count:at[1].routes.length}})+"")&&k(He,z),(!Ke||gt[0]&2048)&&ft!==(ft=at[11]("configuration.manageRoutes")+"")&&k(Ht,ft)},i(at){Ke||(et(Oe.$$.fragment,at),et(ve.$$.fragment,at),Ke=!0)},o(at){st(Oe.$$.fragment,at),st(ve.$$.fragment,at),Ke=!1},d(at){at&&(P(l),P(Ee),P(Ve),P(Te),P(Ze)),Ct(Oe),Ct(ve),_t=!1,bt(lt)}}}function tc(t){let l,e,n,r,i,u=t[11]("configuration.jsonParseError",{values:{error:t[9]}})+"",c;return{c(){l=a("div"),e=ae("svg"),n=ae("path"),r=h(),i=a("span"),c=_(u),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","stroke-current shrink-0 h-6 w-6"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(l,"class","alert alert-error mb-4")},m(f,d){j(f,l,d),s(l,e),s(e,n),s(l,r),s(l,i),s(i,c)},p(f,d){d[0]&2560&&u!==(u=f[11]("configuration.jsonParseError",{values:{error:f[9]}})+"")&&k(c,u)},d(f){f&&P(l)}}}function qm(t){let l,e,n,r,i=t[11]("configuration.title")+"",u,c,f,d=t[11]("configuration.subtitle")+"",p,m,g,b,v,w,C,E=t[11]("configuration.export")+"",y,T,S,q,D,H,I,R=t[11]("configuration.import")+"",L,A,N,Z,Y=t[11]("configuration.save")+"",x,F,K,M,B,U=t[11]("configuration.reload")+"",O,J,ie,ue,ne,$=t[11]("configuration.restart")+"",te,re,ee,G,pe,oe,ge,he,ye,Fe,je,we=t[11]("configuration.confirmRestart")+"",Oe,Je,Le,Pe=t[11]("configuration.restartMessage")+"",Me,fe,_e,Be,De,se,ke,me=t[11]("configuration.restartWarning")+"",Ee,Ve,Ie,nt,Ne=t[11]("common.cancel")+"",Ye,Qe,ve,de,Te,Ze,Se=t[11]("configuration.restart")+"",Ue,Ce,mt,Ge;function ce(lt,it){return lt[6]?vm:bm}let qe=ce(t),Re=qe(t);function dt(lt,it){return lt[4]?wm:km}let We=dt(t),z=We(t);function He(lt,it){return lt[5]?Cm:ym}let X=He(t),ft=X(t);const Ht=[Mm,Tm,Em],Ke=[];function _t(lt,it){return lt[3]?0:lt[2]?1:lt[1]?2:-1}return~(G=_t(t))&&(pe=Ke[G]=Ht[G](t)),{c(){l=a("div"),e=a("div"),n=a("div"),r=a("h1"),u=_(i),c=h(),f=a("p"),p=_(d),m=h(),g=a("div"),b=a("button"),v=ae("svg"),w=ae("path"),C=h(),y=_(E),S=h(),q=a("button"),D=ae("svg"),H=ae("path"),I=h(),L=_(R),A=h(),N=a("button"),Re.c(),Z=h(),x=_(Y),K=h(),M=a("button"),z.c(),B=h(),O=_(U),ie=h(),ue=a("button"),ft.c(),ne=h(),te=_($),ee=h(),pe&&pe.c(),oe=h(),ge=a("input"),he=h(),ye=a("div"),Fe=a("div"),je=a("h3"),Oe=_(we),Je=h(),Le=a("p"),Me=_(Pe),fe=h(),_e=a("div"),Be=ae("svg"),De=ae("path"),se=h(),ke=a("span"),Ee=_(me),Ve=h(),Ie=a("div"),nt=a("button"),Ye=_(Ne),Qe=h(),ve=a("button"),de=ae("svg"),Te=ae("path"),Ze=h(),Ue=_(Se),o(r,"class","text-3xl font-bold"),o(f,"class","text-sm text-gray-500 mt-1"),o(w,"stroke-linecap","round"),o(w,"stroke-linejoin","round"),o(w,"stroke-width","2"),o(w,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),o(v,"xmlns","http://www.w3.org/2000/svg"),o(v,"class","h-4 w-4"),o(v,"fill","none"),o(v,"viewBox","0 0 24 24"),o(v,"stroke","currentColor"),o(b,"class","btn btn-outline btn-sm"),b.disabled=T=t[3]||!t[0],o(H,"stroke-linecap","round"),o(H,"stroke-linejoin","round"),o(H,"stroke-width","2"),o(H,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"),o(D,"xmlns","http://www.w3.org/2000/svg"),o(D,"class","h-4 w-4"),o(D,"fill","none"),o(D,"viewBox","0 0 24 24"),o(D,"stroke","currentColor"),o(q,"class","btn btn-outline btn-sm"),q.disabled=t[3],o(N,"class","btn btn-success btn-sm"),N.disabled=F=t[6]||t[3]||!!t[9],o(M,"class","btn btn-primary btn-sm"),M.disabled=J=t[4]||t[3],o(ue,"class","btn btn-warning btn-sm"),ue.disabled=re=t[5]||t[3],o(g,"class","flex gap-2"),o(e,"class","flex justify-between items-center mb-6"),o(ge,"type","checkbox"),o(ge,"class","modal-toggle"),o(je,"class","font-bold text-lg"),o(Le,"class","py-4"),o(De,"stroke-linecap","round"),o(De,"stroke-linejoin","round"),o(De,"stroke-width","2"),o(De,"d","M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"),o(Be,"xmlns","http://www.w3.org/2000/svg"),o(Be,"class","stroke-current shrink-0 h-6 w-6"),o(Be,"fill","none"),o(Be,"viewBox","0 0 24 24"),o(_e,"class","alert alert-warning"),o(nt,"class","btn btn-ghost"),o(Te,"stroke-linecap","round"),o(Te,"stroke-linejoin","round"),o(Te,"stroke-width","2"),o(Te,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),o(de,"xmlns","http://www.w3.org/2000/svg"),o(de,"class","h-4 w-4 mr-1"),o(de,"fill","none"),o(de,"viewBox","0 0 24 24"),o(de,"stroke","currentColor"),o(ve,"class","btn btn-warning"),o(Ie,"class","modal-action"),o(Fe,"class","modal-box"),o(ye,"class","modal"),le(ye,"modal-open",t[10]),o(l,"class","p-6")},m(lt,it){j(lt,l,it),s(l,e),s(e,n),s(n,r),s(r,u),s(n,c),s(n,f),s(f,p),s(e,m),s(e,g),s(g,b),s(b,v),s(v,w),s(b,C),s(b,y),s(g,S),s(g,q),s(q,D),s(D,H),s(q,I),s(q,L),s(g,A),s(g,N),Re.m(N,null),s(N,Z),s(N,x),s(g,K),s(g,M),z.m(M,null),s(M,B),s(M,O),s(g,ie),s(g,ue),ft.m(ue,null),s(ue,ne),s(ue,te),s(l,ee),~G&&Ke[G].m(l,null),s(l,oe),s(l,ge),ge.checked=t[10],s(l,he),s(l,ye),s(ye,Fe),s(Fe,je),s(je,Oe),s(Fe,Je),s(Fe,Le),s(Le,Me),s(Fe,fe),s(Fe,_e),s(_e,Be),s(Be,De),s(_e,se),s(_e,ke),s(ke,Ee),s(Fe,Ve),s(Fe,Ie),s(Ie,nt),s(nt,Ye),s(Ie,Qe),s(Ie,ve),s(ve,de),s(de,Te),s(ve,Ze),s(ve,Ue),Ce=!0,mt||(Ge=[V(b,"click",t[14]),V(q,"click",t[15]),V(N,"click",t[13]),V(M,"click",t[16]),V(ue,"click",t[18]),V(ge,"change",t[29]),V(nt,"click",t[30]),V(ve,"click",t[17])],mt=!0)},p(lt,it){(!Ce||it[0]&2048)&&i!==(i=lt[11]("configuration.title")+"")&&k(u,i),(!Ce||it[0]&2048)&&d!==(d=lt[11]("configuration.subtitle")+"")&&k(p,d),(!Ce||it[0]&2048)&&E!==(E=lt[11]("configuration.export")+"")&&k(y,E),(!Ce||it[0]&9&&T!==(T=lt[3]||!lt[0]))&&(b.disabled=T),(!Ce||it[0]&2048)&&R!==(R=lt[11]("configuration.import")+"")&&k(L,R),(!Ce||it[0]&8)&&(q.disabled=lt[3]),qe!==(qe=ce(lt))&&(Re.d(1),Re=qe(lt),Re&&(Re.c(),Re.m(N,Z))),(!Ce||it[0]&2048)&&Y!==(Y=lt[11]("configuration.save")+"")&&k(x,Y),(!Ce||it[0]&584&&F!==(F=lt[6]||lt[3]||!!lt[9]))&&(N.disabled=F),We!==(We=dt(lt))&&(z.d(1),z=We(lt),z&&(z.c(),z.m(M,B))),(!Ce||it[0]&2048)&&U!==(U=lt[11]("configuration.reload")+"")&&k(O,U),(!Ce||it[0]&24&&J!==(J=lt[4]||lt[3]))&&(M.disabled=J),X!==(X=He(lt))&&(ft.d(1),ft=X(lt),ft&&(ft.c(),ft.m(ue,ne))),(!Ce||it[0]&2048)&&$!==($=lt[11]("configuration.restart")+"")&&k(te,$),(!Ce||it[0]&40&&re!==(re=lt[5]||lt[3]))&&(ue.disabled=re);let ze=G;G=_t(lt),G===ze?~G&&Ke[G].p(lt,it):(pe&&(Gl(),st(Ke[ze],1,1,()=>{Ke[ze]=null}),Kl()),~G?(pe=Ke[G],pe?pe.p(lt,it):(pe=Ke[G]=Ht[G](lt),pe.c()),et(pe,1),pe.m(l,oe)):pe=null),it[0]&1024&&(ge.checked=lt[10]),(!Ce||it[0]&2048)&&we!==(we=lt[11]("configuration.confirmRestart")+"")&&k(Oe,we),(!Ce||it[0]&2048)&&Pe!==(Pe=lt[11]("configuration.restartMessage")+"")&&k(Me,Pe),(!Ce||it[0]&2048)&&me!==(me=lt[11]("configuration.restartWarning")+"")&&k(Ee,me),(!Ce||it[0]&2048)&&Ne!==(Ne=lt[11]("common.cancel")+"")&&k(Ye,Ne),(!Ce||it[0]&2048)&&Se!==(Se=lt[11]("configuration.restart")+"")&&k(Ue,Se),(!Ce||it[0]&1024)&&le(ye,"modal-open",lt[10])},i(lt){Ce||(et(pe),Ce=!0)},o(lt){st(pe),Ce=!1},d(lt){lt&&P(l),Re.d(),z.d(),ft.d(),~G&&Ke[G].d(),mt=!1,bt(Ge)}}}function Hm(t,l,e){let n;Dt(t,Rt,B=>e(11,n=B));let r=null,i=null,u=null,c=!0,f=!1,d=!1,p=!1,m="form",g="",b=null,v=!1;async function w(){try{e(0,r=await hf()),e(1,i=JSON.parse(JSON.stringify(r))),e(8,g=JSON.stringify(r,null,2)),e(2,u=null)}catch(B){e(2,u=B.message)}finally{e(3,c=!1)}}function C(){e(9,b=null);try{e(1,i=JSON.parse(g))}catch(B){e(9,b=B.message)}}async function E(){if(i){e(6,p=!0);try{const B=await wh(i);if(!B.valid){Lt.show(n("configuration.validationFailed",{values:{error:B.error}}),"error");return}const U=await kh(i);U.success?(Lt.show(n("configuration.saved"),"success"),e(0,r=JSON.parse(JSON.stringify(i)))):Lt.show(n("configuration.saveFailed",{values:{error:U.message}}),"error")}catch(B){Lt.show(n("configuration.saveFailed",{values:{error:B.message}}),"error")}finally{e(6,p=!1)}}}function y(){if(!r)return;const B=JSON.stringify(r,null,2),U="data:application/json;charset=utf-8,"+encodeURIComponent(B),O=`bungee-config-${new Date().toISOString().split("T")[0]}.json`,J=document.createElement("a");J.setAttribute("href",U),J.setAttribute("download",O),J.click(),Lt.show(n("configuration.exported"),"success")}function T(){const B=document.createElement("input");B.type="file",B.accept=".json",B.onchange=async U=>{const O=U.target.files[0];if(O)try{const J=await O.text(),ie=JSON.parse(J);e(1,i=ie),e(8,g=JSON.stringify(ie,null,2)),Lt.show(n("configuration.imported"),"success")}catch(J){Lt.show(n("configuration.importFailed",{values:{error:J.message}}),"error")}},B.click()}async function S(){e(4,f=!0);try{const B=await sm();B.success?(Lt.show(n("configuration.reloaded"),"success"),await w()):Lt.show(n("configuration.reloadFailed",{values:{error:B.message}}),"error")}catch(B){Lt.show(n("configuration.reloadFailed",{values:{error:B.message}}),"error")}finally{e(4,f=!1)}}async function q(){e(10,v=!1),e(5,d=!0);try{const B=await om();B.success?Lt.show(n("configuration.restartSent"),"success"):B.error&&B.error.includes("daemon mode")?Lt.show(n("configuration.restartDaemonOnly"),"error",8e3):Lt.show(n("configuration.restartFailed",{values:{error:B.error||B.message}}),"error")}catch(B){Lt.show(n("configuration.restartFailed",{values:{error:B.message}}),"error")}finally{e(5,d=!1)}}Hs(()=>{w()});const D=[[]],H=()=>e(10,v=!0);function I(){m=this.__value,e(7,m)}function R(){m=this.__value,e(7,m)}function L(){i.port=St(this.value),e(1,i)}function A(){i.workers=St(this.value),e(1,i)}function N(){i.logLevel=pl(this),e(1,i)}function Z(){i.bodyParserLimit=this.value,e(1,i)}function Y(B){t.$$.not_equal(i.auth,B)&&(i.auth=B,e(1,i))}function x(B){t.$$.not_equal(i.logging,B)&&(i.logging=B,e(1,i))}function F(){g=this.value,e(8,g)}function K(){v=this.checked,e(10,v)}return[r,i,u,c,f,d,p,m,g,b,v,n,C,E,y,T,S,q,H,I,D,R,L,A,N,Z,Y,x,F,K,()=>e(10,v=!1)]}class Pm extends Vt{constructor(l){super(),Ut(this,l,Hm,qm,At,{},null,[-1,-1])}}class Ro{static async list(){return await Cl.get("/routes")}static async get(l){return(await this.list()).find(n=>n.path===l)||null}static async create(l){const e=await Cl.get("/config");if(e.routes?.some(n=>n.path===l.path))throw new Error(`Route with path "${l.path}" already exists`);e.routes=e.routes||[],e.routes.push(l),await Cl.put("/config",e)}static async update(l,e){const n=await Cl.get("/config"),r=n.routes?.findIndex(i=>i.path===l);if(r===void 0||r===-1)throw new Error(`Route with path "${l}" not found`);if(l!==e.path&&n.routes?.some(i=>i.path===e.path))throw new Error(`Route with path "${e.path}" already exists`);n.routes[r]=e,await Cl.put("/config",n)}static async delete(l){const e=await Cl.get("/config"),n=e.routes?.findIndex(r=>r.path===l);if(n===void 0||n===-1)throw new Error(`Route with path "${l}" not found`);e.routes.splice(n,1),await Cl.put("/config",e)}static async validateRoute(l){const e={routes:[l]};return await Cl.post("/config/validate",e)}static async duplicate(l){const e=await this.get(l);if(!e)throw new Error(`Route with path "${l}" not found`);const n={...e};let r=1,i=`${l}-copy`;const u=await this.list();for(;u.some(c=>c.path===i);)r++,i=`${l}-copy-${r}`;n.path=i,await this.create(n)}}function lc(t,l,e){const n=t.slice();return n[6]=l[e],n}function sc(t){let l;return{c(){l=a("span"),l.textContent="RED",o(l,"class","text-xs text-error font-semibold")},m(e,n){j(e,l,n)},d(e){e&&P(l)}}}function oc(t){let l,e,n,r,i,u,c=Ls(t[6])==="unhealthy",f,d,p,m=t[6].target+"",g,b,v,w=(t[6].weight||100)+"",C,E,y,T=(t[6].priority||1)+"",S,q,D=c&&sc();return{c(){l=a("tr"),e=a("td"),n=a("div"),r=a("div"),u=h(),D&&D.c(),f=h(),d=a("td"),p=a("code"),g=_(m),b=h(),v=a("td"),C=_(w),E=h(),y=a("td"),S=_(T),q=h(),o(r,"class","w-3 h-3 rounded-full tooltip tooltip-right"),o(r,"data-tip",i=t[6].lastFailureTime?`\u6700\u540E\u5931\u8D25: ${nc(t[6].lastFailureTime)}`:Ls(t[6])==="healthy"?t[3]("upstreamsModal.statusHealthy"):Ls(t[6])==="unhealthy"?t[3]("upstreamsModal.statusUnhealthy"):t[3]("upstreamsModal.statusUnknown")),le(r,"bg-success",Ls(t[6])==="healthy"),le(r,"bg-error",Ls(t[6])==="unhealthy"),le(r,"bg-warning",Ls(t[6])==="unknown"),o(n,"class","flex items-center gap-2"),o(p,"class","text-sm"),o(v,"class","text-right"),o(y,"class","text-right"),o(l,"class","hover")},m(H,I){j(H,l,I),s(l,e),s(e,n),s(n,r),s(n,u),D&&D.m(n,null),s(l,f),s(l,d),s(d,p),s(p,g),s(l,b),s(l,v),s(v,C),s(l,E),s(l,y),s(y,S),s(l,q)},p(H,I){I&12&&i!==(i=H[6].lastFailureTime?`\u6700\u540E\u5931\u8D25: ${nc(H[6].lastFailureTime)}`:Ls(H[6])==="healthy"?H[3]("upstreamsModal.statusHealthy"):Ls(H[6])==="unhealthy"?H[3]("upstreamsModal.statusUnhealthy"):H[3]("upstreamsModal.statusUnknown"))&&o(r,"data-tip",i),I&4&&le(r,"bg-success",Ls(H[6])==="healthy"),I&4&&le(r,"bg-error",Ls(H[6])==="unhealthy"),I&4&&le(r,"bg-warning",Ls(H[6])==="unknown"),I&4&&(c=Ls(H[6])==="unhealthy"),c?D||(D=sc(),D.c(),D.m(n,null)):D&&(D.d(1),D=null),I&4&&m!==(m=H[6].target+"")&&k(g,m),I&4&&w!==(w=(H[6].weight||100)+"")&&k(C,w),I&4&&T!==(T=(H[6].priority||1)+"")&&k(S,T)},d(H){H&&P(l),D&&D.d()}}}function jm(t){let l,e,n,r=t[3]("upstreamsModal.title")+"",i,u,c,f,d,p,m,g,b,v,w=t[3]("routeCard.tableHeaders.status")+"",C,E,y,T=t[3]("routeCard.tableHeaders.target")+"",S,q,D,H=t[3]("routeCard.tableHeaders.weight")+"",I,R,L,A=t[3]("routeCard.tableHeaders.priority")+"",N,Z,Y,x,F,K,M=t[3]("upstreamsModal.close")+"",B,U,O,J,ie,ue,ne=ut(t[2]),$=[];for(let te=0;te<ne.length;te+=1)$[te]=oc(lc(t,ne,te));return{c(){l=a("dialog"),e=a("div"),n=a("h3"),i=_(r),u=_(" - "),c=a("code"),f=_(t[1]),d=h(),p=a("div"),m=a("table"),g=a("thead"),b=a("tr"),v=a("th"),C=_(w),E=h(),y=a("th"),S=_(T),q=h(),D=a("th"),I=_(H),R=h(),L=a("th"),N=_(A),Z=h(),Y=a("tbody");for(let te=0;te<$.length;te+=1)$[te].c();x=h(),F=a("div"),K=a("button"),B=_(M),U=h(),O=a("form"),J=a("button"),J.textContent="close",o(c,"class","text-primary"),o(n,"class","font-bold text-lg mb-4"),o(v,"class","w-20"),o(D,"class","w-24 text-right"),o(L,"class","w-20 text-right"),o(m,"class","table table-zebra w-full"),o(p,"class","overflow-x-auto max-h-[60vh]"),o(K,"class","btn"),o(F,"class","modal-action"),o(e,"class","modal-box max-w-3xl"),o(O,"method","dialog"),o(O,"class","modal-backdrop"),o(l,"class","modal"),le(l,"modal-open",t[0])},m(te,re){j(te,l,re),s(l,e),s(e,n),s(n,i),s(n,u),s(n,c),s(c,f),s(e,d),s(e,p),s(p,m),s(m,g),s(g,b),s(b,v),s(v,C),s(b,E),s(b,y),s(y,S),s(b,q),s(b,D),s(D,I),s(b,R),s(b,L),s(L,N),s(m,Z),s(m,Y);for(let ee=0;ee<$.length;ee+=1)$[ee]&&$[ee].m(Y,null);s(e,x),s(e,F),s(F,K),s(K,B),s(l,U),s(l,O),s(O,J),ie||(ue=[V(window,"keydown",t[5]),V(K,"click",t[4]),V(J,"click",t[4])],ie=!0)},p(te,[re]){if(re&8&&r!==(r=te[3]("upstreamsModal.title")+"")&&k(i,r),re&2&&k(f,te[1]),re&8&&w!==(w=te[3]("routeCard.tableHeaders.status")+"")&&k(C,w),re&8&&T!==(T=te[3]("routeCard.tableHeaders.target")+"")&&k(S,T),re&8&&H!==(H=te[3]("routeCard.tableHeaders.weight")+"")&&k(I,H),re&8&&A!==(A=te[3]("routeCard.tableHeaders.priority")+"")&&k(N,A),re&12){ne=ut(te[2]);let ee;for(ee=0;ee<ne.length;ee+=1){const G=lc(te,ne,ee);$[ee]?$[ee].p(G,re):($[ee]=oc(G),$[ee].c(),$[ee].m(Y,null))}for(;ee<$.length;ee+=1)$[ee].d(1);$.length=ne.length}re&8&&M!==(M=te[3]("upstreamsModal.close")+"")&&k(B,M),re&1&&le(l,"modal-open",te[0])},i:tt,o:tt,d(te){te&&P(l),Gt($,te),ie=!1,bt(ue)}}}function Ls(t){return t.status?t.status==="HEALTHY"?"healthy":"unhealthy":"unknown"}function nc(t){if(!t)return"";const l=new Date(t),n=new Date().getTime()-l.getTime(),r=Math.floor(n/1e3),i=Math.floor(r/60),u=Math.floor(i/60);return r<60?`${r}\u79D2\u524D`:i<60?`${i}\u5206\u949F\u524D`:u<24?`${u}\u5C0F\u65F6\u524D`:l.toLocaleString("zh-CN")}function Lm(t,l,e){let n;Dt(t,Rt,d=>e(3,n=d));let{open:r=!1}=l,{routePath:i}=l,{upstreams:u=[]}=l;function c(){e(0,r=!1)}function f(d){d.key==="Escape"&&r&&c()}return t.$$set=d=>{"open"in d&&e(0,r=d.open),"routePath"in d&&e(1,i=d.routePath),"upstreams"in d&&e(2,u=d.upstreams)},[r,i,u,n,c,f]}class Dm extends Vt{constructor(l){super(),Ut(this,l,Lm,jm,At,{open:0,routePath:1,upstreams:2})}}function rc(t,l,e){const n=t.slice();return n[12]=l[e][0],n[13]=l[e][1],n}function ac(t,l,e){const n=t.slice();return n[16]=l[e],n}function ic(t){let l,e=t[8]("routeCard.hasTransformer")+"",n;return{c(){l=a("span"),n=_(e),o(l,"class","badge badge-sm badge-info")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i&256&&e!==(e=r[8]("routeCard.hasTransformer")+"")&&k(n,e)},d(r){r&&P(l)}}}function uc(t){let l,e=t[8]("routeCard.failover")+"",n;return{c(){l=a("span"),n=_(e),o(l,"class","badge badge-sm badge-success")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i&256&&e!==(e=r[8]("routeCard.failover")+"")&&k(n,e)},d(r){r&&P(l)}}}function Im(t){let l,e,n,r,i=t[8]("routeCard.duplicate")+"",u;return{c(){l=ae("svg"),e=ae("path"),n=h(),r=a("span"),u=_(i),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"),o(l,"xmlns","http://www.w3.org/2000/svg"),o(l,"class","h-4 w-4"),o(l,"fill","none"),o(l,"viewBox","0 0 24 24"),o(l,"stroke","currentColor")},m(c,f){j(c,l,f),s(l,e),j(c,n,f),j(c,r,f),s(r,u)},p(c,f){f&256&&i!==(i=c[8]("routeCard.duplicate")+"")&&k(u,i)},d(c){c&&(P(l),P(n),P(r))}}}function Bm(t){let l,e,n,r=t[8]("routeCard.duplicating")+"",i;return{c(){l=a("span"),e=h(),n=a("span"),i=_(r),o(l,"class","loading loading-spinner loading-xs")},m(u,c){j(u,l,c),j(u,e,c),j(u,n,c),s(n,i)},p(u,c){c&256&&r!==(r=u[8]("routeCard.duplicating")+"")&&k(i,r)},d(u){u&&(P(l),P(e),P(n))}}}function Am(t){let l,e,n,r,i=t[8]("routeCard.delete")+"",u;return{c(){l=ae("svg"),e=ae("path"),n=h(),r=a("span"),u=_(i),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"),o(l,"xmlns","http://www.w3.org/2000/svg"),o(l,"class","h-4 w-4"),o(l,"fill","none"),o(l,"viewBox","0 0 24 24"),o(l,"stroke","currentColor")},m(c,f){j(c,l,f),s(l,e),j(c,n,f),j(c,r,f),s(r,u)},p(c,f){f&256&&i!==(i=c[8]("routeCard.delete")+"")&&k(u,i)},d(c){c&&(P(l),P(n),P(r))}}}function Om(t){let l,e,n,r=t[8]("routeCard.deleting")+"",i;return{c(){l=a("span"),e=h(),n=a("span"),i=_(r),o(l,"class","loading loading-spinner loading-xs")},m(u,c){j(u,l,c),j(u,e,c),j(u,n,c),s(n,i)},p(u,c){c&256&&r!==(r=u[8]("routeCard.deleting")+"")&&k(i,r)},d(u){u&&(P(l),P(e),P(n))}}}function fc(t){let l,e,n,r,i,u,c,f=t[16].target+"",d,p,m,g,b=(t[16].weight||100)+"",v,w,C,E=(t[16].priority||1)+"",y,T;return{c(){l=a("tr"),e=a("td"),n=a("div"),i=h(),u=a("td"),c=a("code"),d=_(f),m=h(),g=a("td"),v=_(b),w=h(),C=a("td"),y=_(E),T=h(),o(n,"class","w-2.5 h-2.5 rounded-full tooltip tooltip-right"),o(n,"data-tip",r=t[16].lastFailureTime?`\u6700\u540E\u5931\u8D25: ${mc(t[16].lastFailureTime)}`:to(t[16])==="healthy"?"\u5065\u5EB7":to(t[16])==="unhealthy"?"\u5F02\u5E38":"\u672A\u77E5"),le(n,"bg-success",to(t[16])==="healthy"),le(n,"bg-error",to(t[16])==="unhealthy"),le(n,"bg-warning",to(t[16])==="unknown"),o(c,"class","text-xs truncate max-w-xs block"),o(c,"title",p=t[16].target),o(g,"class","text-right text-xs"),o(C,"class","text-right text-xs"),o(l,"class","hover")},m(S,q){j(S,l,q),s(l,e),s(e,n),s(l,i),s(l,u),s(u,c),s(c,d),s(l,m),s(l,g),s(g,v),s(l,w),s(l,C),s(C,y),s(l,T)},p(S,q){q&128&&r!==(r=S[16].lastFailureTime?`\u6700\u540E\u5931\u8D25: ${mc(S[16].lastFailureTime)}`:to(S[16])==="healthy"?"\u5065\u5EB7":to(S[16])==="unhealthy"?"\u5F02\u5E38":"\u672A\u77E5")&&o(n,"data-tip",r),q&128&&le(n,"bg-success",to(S[16])==="healthy"),q&128&&le(n,"bg-error",to(S[16])==="unhealthy"),q&128&&le(n,"bg-warning",to(S[16])==="unknown"),q&128&&f!==(f=S[16].target+"")&&k(d,f),q&128&&p!==(p=S[16].target)&&o(c,"title",p),q&128&&b!==(b=(S[16].weight||100)+"")&&k(v,b),q&128&&E!==(E=(S[16].priority||1)+"")&&k(y,E)},d(S){S&&P(l)}}}function cc(t){let l,e,n,r,i,u=t[8]("routeCard.viewAll",{values:{count:t[0].upstreams.length}})+"",c,f,d;return{c(){l=a("div"),e=a("button"),n=ae("svg"),r=ae("path"),i=h(),c=_(u),o(r,"stroke-linecap","round"),o(r,"stroke-linejoin","round"),o(r,"stroke-width","2"),o(r,"d","M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"),o(n,"xmlns","http://www.w3.org/2000/svg"),o(n,"class","h-3 w-3"),o(n,"fill","none"),o(n,"viewBox","0 0 24 24"),o(n,"stroke","currentColor"),o(e,"class","btn btn-sm btn-outline gap-1"),o(l,"class","flex justify-center mt-2")},m(p,m){j(p,l,m),s(l,e),s(e,n),s(n,r),s(e,i),s(e,c),f||(d=V(e,"click",t[10]),f=!0)},p(p,m){m&257&&u!==(u=p[8]("routeCard.viewAll",{values:{count:p[0].upstreams.length}})+"")&&k(c,u)},d(p){p&&P(l),f=!1,d()}}}function dc(t){let l,e,n,r=ut(Object.entries(t[0].pathRewrite)),i=[];for(let u=0;u<r.length;u+=1)i[u]=pc(rc(t,r,u));return{c(){l=a("div"),e=a("p"),e.textContent="Path Rewrite:",n=h();for(let u=0;u<i.length;u+=1)i[u].c();o(e,"class","text-sm font-semibold mb-1"),o(l,"class","mt-3")},m(u,c){j(u,l,c),s(l,e),s(l,n);for(let f=0;f<i.length;f+=1)i[f]&&i[f].m(l,null)},p(u,c){if(c&257){r=ut(Object.entries(u[0].pathRewrite));let f;for(f=0;f<r.length;f+=1){const d=rc(u,r,f);i[f]?i[f].p(d,c):(i[f]=pc(d),i[f].c(),i[f].m(l,null))}for(;f<i.length;f+=1)i[f].d(1);i.length=r.length}},d(u){u&&P(l),Gt(i,u)}}}function pc(t){let l,e=t[8]("routeCard.pathRewrite.original")+"",n,r,i,u=t[12]+"",c,f,d=t[8]("routeCard.pathRewrite.rewriteTo")+"",p,m,g,b=t[13]+"",v,w;return{c(){l=a("div"),n=_(e),r=h(),i=a("code"),c=_(u),f=_(" \u2192 "),p=_(d),m=h(),g=a("code"),v=_(b),w=h(),o(i,"class","bg-base-200 px-1.5 py-0.5 rounded text-sm font-mono"),o(g,"class","bg-base-200 px-1.5 py-0.5 rounded text-sm font-mono"),o(l,"class","text-sm text-gray-600")},m(C,E){j(C,l,E),s(l,n),s(l,r),s(l,i),s(i,c),s(l,f),s(l,p),s(l,m),s(l,g),s(g,v),s(l,w)},p(C,E){E&256&&e!==(e=C[8]("routeCard.pathRewrite.original")+"")&&k(n,e),E&1&&u!==(u=C[12]+"")&&k(c,u),E&256&&d!==(d=C[8]("routeCard.pathRewrite.rewriteTo")+"")&&k(p,d),E&1&&b!==(b=C[13]+"")&&k(v,b)},d(C){C&&P(l)}}}function Fm(t){let l,e,n,r,i,u,c=t[0].path+"",f,d,p,m,g=t[8]("routeCard.upstreams",{values:{count:t[0].upstreams.length}})+"",b,v,w,C,E,y,T,S,q,D=t[8]("routeCard.edit")+"",H,I,R,L,A,N,Z,Y,x,F,K,M,B,U,O,J,ie,ue,ne,$,te,re=t[8]("routeCard.tableHeaders.status")+"",ee,G,pe,oe=t[8]("routeCard.tableHeaders.target")+"",ge,he,ye,Fe=t[8]("routeCard.tableHeaders.weight")+"",je,we,Oe,Je=t[8]("routeCard.tableHeaders.priority")+"",Le,Pe,Me,fe,_e,Be,De,se,ke,me,Ee,Ve=t[0].transformer&&ic(t),Ie=t[0].failover?.enabled&&uc(t);function nt(Ge,ce){return Ge[4]?Bm:Im}let Ne=nt(t),Ye=Ne(t);function Qe(Ge,ce){return Ge[3]?Om:Am}let ve=Qe(t),de=ve(t),Te=ut(t[7]),Ze=[];for(let Ge=0;Ge<Te.length;Ge+=1)Ze[Ge]=fc(ac(t,Te,Ge));let Se=t[6]&&cc(t),Ue=t[0].pathRewrite&&dc(t);function Ce(Ge){t[11](Ge)}let mt={routePath:t[0].path,upstreams:t[0].upstreams};return t[5]!==void 0&&(mt.open=t[5]),De=new Dm({props:mt}),bl.push(()=>Rl(De,"open",Ce)),{c(){l=a("div"),e=a("div"),n=a("div"),r=a("div"),i=a("h2"),u=a("code"),f=_(c),d=h(),p=a("div"),m=a("span"),b=_(g),v=h(),Ve&&Ve.c(),w=h(),Ie&&Ie.c(),C=h(),E=a("div"),y=a("button"),T=ae("svg"),S=ae("path"),q=h(),H=_(D),I=h(),R=a("div"),L=a("button"),A=ae("svg"),N=ae("path"),Y=h(),x=a("ul"),F=a("li"),K=a("button"),Ye.c(),M=h(),B=a("li"),U=a("button"),de.c(),O=h(),J=a("div"),ie=a("div"),ue=a("table"),ne=a("thead"),$=a("tr"),te=a("th"),ee=_(re),G=h(),pe=a("th"),ge=_(oe),he=h(),ye=a("th"),je=_(Fe),we=h(),Oe=a("th"),Le=_(Je),Pe=h(),Me=a("tbody");for(let Ge=0;Ge<Ze.length;Ge+=1)Ze[Ge].c();fe=h(),Se&&Se.c(),_e=h(),Ue&&Ue.c(),Be=h(),Et(De.$$.fragment),o(u,"class","text-primary"),o(i,"class","card-title text-lg"),o(m,"class","badge badge-sm"),o(p,"class","flex gap-2 mt-2 flex-wrap"),o(r,"class","flex-1"),o(S,"stroke-linecap","round"),o(S,"stroke-linejoin","round"),o(S,"stroke-width","2"),o(S,"d","M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"),o(T,"xmlns","http://www.w3.org/2000/svg"),o(T,"class","h-4 w-4"),o(T,"fill","none"),o(T,"viewBox","0 0 24 24"),o(T,"stroke","currentColor"),o(y,"class","btn btn-sm btn-primary gap-1"),o(N,"stroke-linecap","round"),o(N,"stroke-linejoin","round"),o(N,"stroke-width","2"),o(N,"d","M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"),o(A,"xmlns","http://www.w3.org/2000/svg"),o(A,"class","h-4 w-4"),o(A,"fill","none"),o(A,"viewBox","0 0 24 24"),o(A,"stroke","currentColor"),o(L,"type","button"),o(L,"class","btn btn-sm btn-ghost btn-square"),o(L,"title",Z=t[8]("routeCard.moreActions")),K.disabled=t[4],o(U,"class","text-error"),U.disabled=t[3],o(x,"class","dropdown-content menu p-2 shadow-lg bg-base-100 rounded-box w-40 z-10"),o(R,"class","dropdown dropdown-end"),o(E,"class","flex gap-2"),o(n,"class","flex justify-between items-start"),o(te,"class","w-12"),o(ye,"class","w-16 text-right"),o(Oe,"class","w-12 text-right"),o($,"class","bg-base-200"),o(ue,"class","table table-xs w-full"),o(ie,"class","overflow-x-auto border border-base-300 rounded-lg"),o(J,"class","mt-4"),o(e,"class","card-body flex flex-col"),o(l,"class","card bg-base-100 shadow-md hover:shadow-lg transition-shadow")},m(Ge,ce){j(Ge,l,ce),s(l,e),s(e,n),s(n,r),s(r,i),s(i,u),s(u,f),s(r,d),s(r,p),s(p,m),s(m,b),s(p,v),Ve&&Ve.m(p,null),s(p,w),Ie&&Ie.m(p,null),s(n,C),s(n,E),s(E,y),s(y,T),s(T,S),s(y,q),s(y,H),s(E,I),s(E,R),s(R,L),s(L,A),s(A,N),s(R,Y),s(R,x),s(x,F),s(F,K),Ye.m(K,null),s(x,M),s(x,B),s(B,U),de.m(U,null),s(e,O),s(e,J),s(J,ie),s(ie,ue),s(ue,ne),s(ne,$),s($,te),s(te,ee),s($,G),s($,pe),s(pe,ge),s($,he),s($,ye),s(ye,je),s($,we),s($,Oe),s(Oe,Le),s(ue,Pe),s(ue,Me);for(let qe=0;qe<Ze.length;qe+=1)Ze[qe]&&Ze[qe].m(Me,null);s(J,fe),Se&&Se.m(J,null),s(e,_e),Ue&&Ue.m(e,null),j(Ge,Be,ce),yt(De,Ge,ce),ke=!0,me||(Ee=[V(y,"click",t[9]),V(K,"click",function(){ko(t[2])&&t[2].apply(this,arguments)}),V(U,"click",function(){ko(t[1])&&t[1].apply(this,arguments)})],me=!0)},p(Ge,[ce]){if(t=Ge,(!ke||ce&1)&&c!==(c=t[0].path+"")&&k(f,c),(!ke||ce&257)&&g!==(g=t[8]("routeCard.upstreams",{values:{count:t[0].upstreams.length}})+"")&&k(b,g),t[0].transformer?Ve?Ve.p(t,ce):(Ve=ic(t),Ve.c(),Ve.m(p,w)):Ve&&(Ve.d(1),Ve=null),t[0].failover?.enabled?Ie?Ie.p(t,ce):(Ie=uc(t),Ie.c(),Ie.m(p,null)):Ie&&(Ie.d(1),Ie=null),(!ke||ce&256)&&D!==(D=t[8]("routeCard.edit")+"")&&k(H,D),(!ke||ce&256&&Z!==(Z=t[8]("routeCard.moreActions")))&&o(L,"title",Z),Ne===(Ne=nt(t))&&Ye?Ye.p(t,ce):(Ye.d(1),Ye=Ne(t),Ye&&(Ye.c(),Ye.m(K,null))),(!ke||ce&16)&&(K.disabled=t[4]),ve===(ve=Qe(t))&&de?de.p(t,ce):(de.d(1),de=ve(t),de&&(de.c(),de.m(U,null))),(!ke||ce&8)&&(U.disabled=t[3]),(!ke||ce&256)&&re!==(re=t[8]("routeCard.tableHeaders.status")+"")&&k(ee,re),(!ke||ce&256)&&oe!==(oe=t[8]("routeCard.tableHeaders.target")+"")&&k(ge,oe),(!ke||ce&256)&&Fe!==(Fe=t[8]("routeCard.tableHeaders.weight")+"")&&k(je,Fe),(!ke||ce&256)&&Je!==(Je=t[8]("routeCard.tableHeaders.priority")+"")&&k(Le,Je),ce&128){Te=ut(t[7]);let Re;for(Re=0;Re<Te.length;Re+=1){const dt=ac(t,Te,Re);Ze[Re]?Ze[Re].p(dt,ce):(Ze[Re]=fc(dt),Ze[Re].c(),Ze[Re].m(Me,null))}for(;Re<Ze.length;Re+=1)Ze[Re].d(1);Ze.length=Te.length}t[6]?Se?Se.p(t,ce):(Se=cc(t),Se.c(),Se.m(J,null)):Se&&(Se.d(1),Se=null),t[0].pathRewrite?Ue?Ue.p(t,ce):(Ue=dc(t),Ue.c(),Ue.m(e,null)):Ue&&(Ue.d(1),Ue=null);const qe={};ce&1&&(qe.routePath=t[0].path),ce&1&&(qe.upstreams=t[0].upstreams),!se&&ce&32&&(se=!0,qe.open=t[5],Sl(()=>se=!1)),De.$set(qe)},i(Ge){ke||(et(De.$$.fragment,Ge),ke=!0)},o(Ge){st(De.$$.fragment,Ge),ke=!1},d(Ge){Ge&&(P(l),P(Be)),Ve&&Ve.d(),Ie&&Ie.d(),Ye.d(),de.d(),Gt(Ze,Ge),Se&&Se.d(),Ue&&Ue.d(),Ct(De,Ge),me=!1,bt(Ee)}}}const hc=5;function to(t){return t.status?t.status==="HEALTHY"?"healthy":"unhealthy":"unknown"}function mc(t){if(!t)return"";const l=new Date(t),n=new Date().getTime()-l.getTime(),r=Math.floor(n/1e3),i=Math.floor(r/60),u=Math.floor(i/60);return r<60?`${r}\u79D2\u524D`:i<60?`${i}\u5206\u949F\u524D`:u<24?`${u}\u5C0F\u65F6\u524D`:l.toLocaleString("zh-CN")}function zm(t,l,e){let n,r,i;Dt(t,Rt,w=>e(8,i=w));let{route:u}=l,{onDelete:c}=l,{onDuplicate:f}=l,{isDeleting:d=!1}=l,{isDuplicating:p=!1}=l,m=!1;function g(){I0(`/routes/edit/${encodeURIComponent(u.path)}`)}function b(){e(5,m=!0)}function v(w){m=w,e(5,m)}return t.$$set=w=>{"route"in w&&e(0,u=w.route),"onDelete"in w&&e(1,c=w.onDelete),"onDuplicate"in w&&e(2,f=w.onDuplicate),"isDeleting"in w&&e(3,d=w.isDeleting),"isDuplicating"in w&&e(4,p=w.isDuplicating)},t.$$.update=()=>{t.$$.dirty&1&&e(7,n=u.upstreams.slice(0,hc)),t.$$.dirty&1&&e(6,r=u.upstreams.length>hc)},[u,c,f,d,p,m,r,n,i,g,b,v]}class Nm extends Vt{constructor(l){super(),Ut(this,l,zm,Fm,At,{route:0,onDelete:1,onDuplicate:2,isDeleting:3,isDuplicating:4})}}function gc(t){let l,e,n,r,i,u,c,f,d,p,m,g,b,v,w,C,E;return{c(){l=a("dialog"),e=a("div"),n=a("h3"),r=_(t[5]),i=h(),u=a("p"),c=_(t[4]),f=h(),d=a("div"),p=a("button"),m=_(t[2]),g=h(),b=a("button"),v=_(t[3]),o(n,"class","font-bold text-lg"),o(u,"class","py-4"),o(p,"class","btn"),o(b,"class",w="btn "+t[1]),o(d,"class","modal-action"),o(e,"class","modal-box"),o(l,"class","modal modal-open")},m(y,T){j(y,l,T),s(l,e),s(e,n),s(n,r),s(e,i),s(e,u),s(u,c),s(e,f),s(e,d),s(d,p),s(p,m),s(d,g),s(d,b),s(b,v),C||(E=[V(p,"click",t[7]),V(b,"click",t[6]),V(l,"click",t[8])],C=!0)},p(y,T){T&32&&k(r,y[5]),T&16&&k(c,y[4]),T&4&&k(m,y[2]),T&8&&k(v,y[3]),T&2&&w!==(w="btn "+y[1])&&o(b,"class",w)},d(y){y&&P(l),C=!1,bt(E)}}}function Um(t){let l,e=t[0]&&gc(t);return{c(){e&&e.c(),l=Ul()},m(n,r){e&&e.m(n,r),j(n,l,r)},p(n,[r]){n[0]?e?e.p(n,r):(e=gc(n),e.c(),e.m(l.parentNode,l)):e&&(e.d(1),e=null)},i:tt,o:tt,d(n){n&&P(l),e&&e.d(n)}}}function Vm(t,l,e){let n,r,i,u,c;Dt(t,Rt,y=>e(13,c=y));let{open:f=!1}=l,{title:d=""}=l,{message:p=""}=l,{confirmText:m=""}=l,{cancelText:g=""}=l,{confirmClass:b="btn-error"}=l;const v=Cr();function w(){v("confirm"),e(0,f=!1)}function C(){v("cancel"),e(0,f=!1)}function E(y){y.target===y.currentTarget&&C()}return t.$$set=y=>{"open"in y&&e(0,f=y.open),"title"in y&&e(9,d=y.title),"message"in y&&e(10,p=y.message),"confirmText"in y&&e(11,m=y.confirmText),"cancelText"in y&&e(12,g=y.cancelText),"confirmClass"in y&&e(1,b=y.confirmClass)},t.$$.update=()=>{t.$$.dirty&8704&&e(5,n=d||c("confirmDialog.title")),t.$$.dirty&1024&&e(4,r=p),t.$$.dirty&10240&&e(3,i=m||c("confirmDialog.confirm")),t.$$.dirty&12288&&e(2,u=g||c("confirmDialog.cancel"))},[f,b,u,i,r,n,w,C,E,d,p,m,g,c]}class X0 extends Vt{constructor(l){super(),Ut(this,l,Vm,Um,At,{open:0,title:9,message:10,confirmText:11,cancelText:12,confirmClass:1})}}function _c(t,l,e){const n=t.slice();return n[29]=l[e],n}function bc(t,l,e){const n=t.slice();return n[32]=l[e],n}function Jm(t){let l,e;return{c(){l=ae("svg"),e=ae("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"),o(l,"xmlns","http://www.w3.org/2000/svg"),o(l,"class","h-4 w-4"),o(l,"fill","none"),o(l,"viewBox","0 0 24 24"),o(l,"stroke","currentColor")},m(n,r){j(n,l,r),s(l,e)},d(n){n&&P(l)}}}function Wm(t){let l;return{c(){l=a("span"),o(l,"class","loading loading-spinner loading-xs")},m(e,n){j(e,l,n)},d(e){e&&P(l)}}}function vc(t){let l,e=t[32]+"",n,r;return{c(){l=a("option"),n=_(e),l.__value=r=t[32],Q(l,l.__value)},m(i,u){j(i,l,u),s(l,n)},p(i,u){u[0]&2048&&e!==(e=i[32]+"")&&k(n,e),u[0]&2048&&r!==(r=i[32])&&(l.__value=r,Q(l,l.__value))},d(i){i&&P(l)}}}function Gm(t){let l,e,n=ut(t[12]),r=[];for(let u=0;u<n.length;u+=1)r[u]=kc(_c(t,n,u));const i=u=>st(r[u],1,1,()=>{r[u]=null});return{c(){l=a("div");for(let u=0;u<r.length;u+=1)r[u].c();o(l,"class","grid grid-cols-1 lg:grid-cols-2 gap-4")},m(u,c){j(u,l,c);for(let f=0;f<r.length;f+=1)r[f]&&r[f].m(l,null);e=!0},p(u,c){if(c[0]&152320){n=ut(u[12]);let f;for(f=0;f<n.length;f+=1){const d=_c(u,n,f);r[f]?(r[f].p(d,c),et(r[f],1)):(r[f]=kc(d),r[f].c(),et(r[f],1),r[f].m(l,null))}for(Gl(),f=n.length;f<r.length;f+=1)i(f);Kl()}},i(u){if(!e){for(let c=0;c<n.length;c+=1)et(r[c]);e=!0}},o(u){r=r.filter(Boolean);for(let c=0;c<r.length;c+=1)st(r[c]);e=!1},d(u){u&&P(l),Gt(r,u)}}}function Km(t){let l;function e(i,u){return i[0].length===0?Xm:Zm}let n=e(t),r=n(t);return{c(){l=a("div"),r.c(),o(l,"class","text-center py-12")},m(i,u){j(i,l,u),r.m(l,null)},p(i,u){n===(n=e(i))&&r?r.p(i,u):(r.d(1),r=n(i),r&&(r.c(),r.m(l,null)))},i:tt,o:tt,d(i){i&&P(l),r.d()}}}function Qm(t){let l,e,n,r,i,u=t[13]("common.error")+"",c,f,d;return{c(){l=a("div"),e=ae("svg"),n=ae("path"),r=h(),i=a("span"),c=_(u),f=_(": "),d=_(t[5]),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","stroke-current shrink-0 h-6 w-6"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(l,"class","alert alert-error")},m(p,m){j(p,l,m),s(l,e),s(e,n),s(l,r),s(l,i),s(i,c),s(i,f),s(i,d)},p(p,m){m[0]&8192&&u!==(u=p[13]("common.error")+"")&&k(c,u),m[0]&32&&k(d,p[5])},i:tt,o:tt,d(p){p&&P(l)}}}function Ym(t){let l;return{c(){l=a("div"),l.innerHTML=\'<span class="loading loading-spinner loading-lg"></span>\',o(l,"class","flex justify-center items-center h-64")},m(e,n){j(e,l,n)},p:tt,i:tt,o:tt,d(e){e&&P(l)}}}function kc(t){let l,e;function n(){return t[24](t[29])}function r(){return t[25](t[29])}return l=new Nm({props:{route:t[29],onDelete:n,onDuplicate:r,isDeleting:t[8].has(t[29].path),isDuplicating:t[9].has(t[29].path)}}),{c(){Et(l.$$.fragment)},m(i,u){yt(l,i,u),e=!0},p(i,u){t=i;const c={};u[0]&4096&&(c.route=t[29]),u[0]&4096&&(c.onDelete=n),u[0]&4096&&(c.onDuplicate=r),u[0]&4352&&(c.isDeleting=t[8].has(t[29].path)),u[0]&4608&&(c.isDuplicating=t[9].has(t[29].path)),l.$set(c)},i(i){e||(et(l.$$.fragment,i),e=!0)},o(i){st(l.$$.fragment,i),e=!1},d(i){Ct(l,i)}}}function Zm(t){let l,e,n,r=t[13]("routes.noMatchingRoutes")+"",i,u,c,f=t[13]("routes.noMatchingMessage")+"",d;return{c(){l=a("div"),l.textContent="\uD83D\uDD0D",e=h(),n=a("h3"),i=_(r),u=h(),c=a("p"),d=_(f),o(l,"class","text-6xl mb-4"),o(n,"class","text-xl font-semibold mb-2"),o(c,"class","text-gray-500")},m(p,m){j(p,l,m),j(p,e,m),j(p,n,m),s(n,i),j(p,u,m),j(p,c,m),s(c,d)},p(p,m){m[0]&8192&&r!==(r=p[13]("routes.noMatchingRoutes")+"")&&k(i,r),m[0]&8192&&f!==(f=p[13]("routes.noMatchingMessage")+"")&&k(d,f)},d(p){p&&(P(l),P(e),P(n),P(u),P(c))}}}function Xm(t){let l,e,n,r=t[13]("routes.noRoutes")+"",i,u,c,f=t[13]("routes.noRoutesMessage")+"",d,p,m,g=t[13]("routes.createFirstRoute")+"",b,v,w;return{c(){l=a("div"),l.textContent="\uD83D\uDE80",e=h(),n=a("h3"),i=_(r),u=h(),c=a("p"),d=_(f),p=h(),m=a("button"),b=_(g),o(l,"class","text-6xl mb-4"),o(n,"class","text-xl font-semibold mb-2"),o(c,"class","text-gray-500 mb-4"),o(m,"class","btn btn-primary")},m(C,E){j(C,l,E),j(C,e,E),j(C,n,E),s(n,i),j(C,u,E),j(C,c,E),s(c,d),j(C,p,E),j(C,m,E),s(m,b),v||(w=V(m,"click",t[18]),v=!0)},p(C,E){E[0]&8192&&r!==(r=C[13]("routes.noRoutes")+"")&&k(i,r),E[0]&8192&&f!==(f=C[13]("routes.noRoutesMessage")+"")&&k(d,f),E[0]&8192&&g!==(g=C[13]("routes.createFirstRoute")+"")&&k(b,g)},d(C){C&&(P(l),P(e),P(n),P(u),P(c),P(p),P(m)),v=!1,w()}}}function wc(t){let l,e=t[13]("routes.showingRoutes",{values:{count:t[12].length,total:t[0].length}})+"",n;return{c(){l=a("div"),n=_(e),o(l,"class","mt-6 text-sm text-gray-500 text-center")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&12289&&e!==(e=r[13]("routes.showingRoutes",{values:{count:r[12].length,total:r[0].length}})+"")&&k(n,e)},d(r){r&&P(l)}}}function xm(t){let l,e,n,r,i=t[13]("routes.title")+"",u,c,f,d=t[13]("routes.subtitle")+"",p,m,g,b,v,w,C,E=t[13]("routes.export")+"",y,T,S,q,D,H=t[13]("routes.import")+"",I,R,L,A,N=t[13]("routes.newRoute")+"",Z,Y,x,F,K,M,B,U,O,J,ie=t[13]("routes.allTransformers")+"",ue,ne,$,te,re,ee=t[13]("routes.filterStatus.all")+"",G,pe,oe=t[13]("routes.filterStatus.healthy")+"",ge,he,ye=t[13]("routes.filterStatus.unhealthy")+"",Fe,je,we,Oe,Je,Le,Pe,Me,fe,_e,Be;function De(ve,de){return ve[10]?Wm:Jm}let se=De(t),ke=se(t),me=ut(t[11]),Ee=[];for(let ve=0;ve<me.length;ve+=1)Ee[ve]=vc(bc(t,me,ve));const Ve=[Ym,Qm,Km,Gm],Ie=[];function nt(ve,de){return ve[4]?0:ve[5]?1:ve[12].length===0?2:3}we=nt(t),Oe=Ie[we]=Ve[we](t);let Ne=!t[4]&&t[0].length>0&&wc(t);function Ye(ve){t[26](ve)}let Qe={title:t[13]("routes.confirmDelete"),message:t[7]?t[13]("routes.confirmDeleteMessage",{values:{path:t[7].path}}):"",confirmText:t[13]("common.delete"),cancelText:t[13]("common.cancel"),confirmClass:"btn-error"};return t[6]!==void 0&&(Qe.open=t[6]),Pe=new X0({props:Qe}),bl.push(()=>Rl(Pe,"open",Ye)),Pe.$on("confirm",t[15]),Pe.$on("cancel",t[16]),{c(){l=a("div"),e=a("div"),n=a("div"),r=a("h1"),u=_(i),c=h(),f=a("p"),p=_(d),m=h(),g=a("div"),b=a("button"),v=ae("svg"),w=ae("path"),C=h(),y=_(E),S=h(),q=a("button"),ke.c(),D=h(),I=_(H),L=h(),A=a("button"),Z=_(N),Y=h(),x=a("div"),F=a("div"),K=a("input"),B=h(),U=a("div"),O=a("select"),J=a("option"),ue=_(ie);for(let ve=0;ve<Ee.length;ve+=1)Ee[ve].c();ne=h(),$=a("div"),te=a("select"),re=a("option"),G=_(ee),pe=a("option"),ge=_(oe),he=a("option"),Fe=_(ye),je=h(),Oe.c(),Je=h(),Ne&&Ne.c(),Le=h(),Et(Pe.$$.fragment),o(r,"class","text-3xl font-bold"),o(f,"class","text-sm text-gray-500 mt-1"),o(w,"stroke-linecap","round"),o(w,"stroke-linejoin","round"),o(w,"stroke-width","2"),o(w,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),o(v,"xmlns","http://www.w3.org/2000/svg"),o(v,"class","h-4 w-4"),o(v,"fill","none"),o(v,"viewBox","0 0 24 24"),o(v,"stroke","currentColor"),o(b,"class","btn btn-sm btn-outline"),b.disabled=T=t[4]||t[0].length===0,o(q,"class","btn btn-sm btn-outline"),q.disabled=R=t[4]||t[10],o(A,"class","btn btn-primary btn-sm"),o(g,"class","flex gap-2"),o(e,"class","flex justify-between items-center mb-6"),o(K,"type","text"),o(K,"placeholder",M=t[13]("routes.searchPlaceholder")),o(K,"class","input input-bordered"),o(F,"class","form-control flex-1"),J.__value="",Q(J,J.__value),o(O,"class","select select-bordered"),t[2]===void 0&&tl(()=>t[22].call(O)),o(U,"class","form-control w-48"),re.__value="all",Q(re,re.__value),pe.__value="healthy",Q(pe,pe.__value),he.__value="unhealthy",Q(he,he.__value),o(te,"class","select select-bordered"),t[3]===void 0&&tl(()=>t[23].call(te)),o($,"class","form-control w-32"),o(x,"class","flex gap-4 mb-6"),o(l,"class","p-6")},m(ve,de){j(ve,l,de),s(l,e),s(e,n),s(n,r),s(r,u),s(n,c),s(n,f),s(f,p),s(e,m),s(e,g),s(g,b),s(b,v),s(v,w),s(b,C),s(b,y),s(g,S),s(g,q),ke.m(q,null),s(q,D),s(q,I),s(g,L),s(g,A),s(A,Z),s(l,Y),s(l,x),s(x,F),s(F,K),Q(K,t[1]),s(x,B),s(x,U),s(U,O),s(O,J),s(J,ue);for(let Te=0;Te<Ee.length;Te+=1)Ee[Te]&&Ee[Te].m(O,null);kt(O,t[2],!0),s(x,ne),s(x,$),s($,te),s(te,re),s(re,G),s(te,pe),s(pe,ge),s(te,he),s(he,Fe),kt(te,t[3],!0),s(l,je),Ie[we].m(l,null),s(l,Je),Ne&&Ne.m(l,null),s(l,Le),yt(Pe,l,null),fe=!0,_e||(Be=[V(b,"click",t[19]),V(q,"click",t[20]),V(A,"click",t[18]),V(K,"input",t[21]),V(O,"change",t[22]),V(te,"change",t[23])],_e=!0)},p(ve,de){if((!fe||de[0]&8192)&&i!==(i=ve[13]("routes.title")+"")&&k(u,i),(!fe||de[0]&8192)&&d!==(d=ve[13]("routes.subtitle")+"")&&k(p,d),(!fe||de[0]&8192)&&E!==(E=ve[13]("routes.export")+"")&&k(y,E),(!fe||de[0]&17&&T!==(T=ve[4]||ve[0].length===0))&&(b.disabled=T),se!==(se=De(ve))&&(ke.d(1),ke=se(ve),ke&&(ke.c(),ke.m(q,D))),(!fe||de[0]&8192)&&H!==(H=ve[13]("routes.import")+"")&&k(I,H),(!fe||de[0]&1040&&R!==(R=ve[4]||ve[10]))&&(q.disabled=R),(!fe||de[0]&8192)&&N!==(N=ve[13]("routes.newRoute")+"")&&k(Z,N),(!fe||de[0]&8192&&M!==(M=ve[13]("routes.searchPlaceholder")))&&o(K,"placeholder",M),de[0]&2&&K.value!==ve[1]&&Q(K,ve[1]),(!fe||de[0]&8192)&&ie!==(ie=ve[13]("routes.allTransformers")+"")&&k(ue,ie),de[0]&2048){me=ut(ve[11]);let Se;for(Se=0;Se<me.length;Se+=1){const Ue=bc(ve,me,Se);Ee[Se]?Ee[Se].p(Ue,de):(Ee[Se]=vc(Ue),Ee[Se].c(),Ee[Se].m(O,null))}for(;Se<Ee.length;Se+=1)Ee[Se].d(1);Ee.length=me.length}de[0]&2052&&kt(O,ve[2]),(!fe||de[0]&8192)&&ee!==(ee=ve[13]("routes.filterStatus.all")+"")&&k(G,ee),(!fe||de[0]&8192)&&oe!==(oe=ve[13]("routes.filterStatus.healthy")+"")&&k(ge,oe),(!fe||de[0]&8192)&&ye!==(ye=ve[13]("routes.filterStatus.unhealthy")+"")&&k(Fe,ye),de[0]&8&&kt(te,ve[3]);let Te=we;we=nt(ve),we===Te?Ie[we].p(ve,de):(Gl(),st(Ie[Te],1,1,()=>{Ie[Te]=null}),Kl(),Oe=Ie[we],Oe?Oe.p(ve,de):(Oe=Ie[we]=Ve[we](ve),Oe.c()),et(Oe,1),Oe.m(l,Je)),!ve[4]&&ve[0].length>0?Ne?Ne.p(ve,de):(Ne=wc(ve),Ne.c(),Ne.m(l,Le)):Ne&&(Ne.d(1),Ne=null);const Ze={};de[0]&8192&&(Ze.title=ve[13]("routes.confirmDelete")),de[0]&8320&&(Ze.message=ve[7]?ve[13]("routes.confirmDeleteMessage",{values:{path:ve[7].path}}):""),de[0]&8192&&(Ze.confirmText=ve[13]("common.delete")),de[0]&8192&&(Ze.cancelText=ve[13]("common.cancel")),!Me&&de[0]&64&&(Me=!0,Ze.open=ve[6],Sl(()=>Me=!1)),Pe.$set(Ze)},i(ve){fe||(et(Oe),et(Pe.$$.fragment,ve),fe=!0)},o(ve){st(Oe),st(Pe.$$.fragment,ve),fe=!1},d(ve){ve&&P(l),ke.d(),Gt(Ee,ve),Ie[we].d(),Ne&&Ne.d(),Ct(Pe),_e=!1,bt(Be)}}}function $m(t,l,e){let n,r,i;Dt(t,Rt,F=>e(13,i=F));let u=[],c=!0,f=null,d="",p="",m="all",g=!0,b=!1,v=null,w=new Set,C=new Set,E=!1;async function y(F=!1){const K=!F&&g;try{K&&e(4,c=!0),e(0,u=await Ro.list()),e(5,f=null),g=!1}catch(M){e(5,f=M.message),F||Lt.show(M.message,"error")}finally{K&&e(4,c=!1)}}async function T(F){e(7,v=F),e(6,b=!0)}async function S(){if(v){w.add(v.path),e(8,w);try{await Ro.delete(v.path),Lt.show(i("routes.deleted",{values:{path:v.path}}),"success"),await y()}catch(F){Lt.show(i("routes.deleteFailed",{values:{error:F.message}}),"error")}finally{w.delete(v.path),e(8,w),e(7,v=null)}}}function q(){e(7,v=null)}async function D(F){C.add(F.path),e(9,C);try{await Ro.duplicate(F.path),Lt.show(i("routes.duplicated",{values:{path:F.path}}),"success"),await y()}catch(K){Lt.show(i("routes.duplicateFailed",{values:{error:K.message}}),"error")}finally{C.delete(F.path),e(9,C)}}function H(){I0("/routes/new")}function I(){if(u.length===0){Lt.show(i("routes.noRoutesToExport"),"warning");return}const F=JSON.stringify(u,null,2),K="data:application/json;charset=utf-8,"+encodeURIComponent(F),M=`bungee-routes-${new Date().toISOString().split("T")[0]}.json`,B=document.createElement("a");B.setAttribute("href",K),B.setAttribute("download",M),B.click(),Lt.show(i("routes.exported"),"success")}function R(){const F=document.createElement("input");F.type="file",F.accept=".json",F.onchange=async K=>{const M=K.target.files[0];if(M){e(10,E=!0);try{const B=await M.text(),U=JSON.parse(B);if(!Array.isArray(U))throw new Error(i("routes.importMustBeArray"));let O=0,J=0;for(const ie of U)try{await Ro.create(ie),O++}catch(ue){J++,console.error(`Failed to import route ${ie.path}:`,ue)}if(O>0){const ie=J>0?i("routes.importPartialSuccess",{values:{success:O,failed:J}}):i("routes.importSuccess",{values:{success:O}});Lt.show(ie,"success"),await y()}else Lt.show(i("routes.importFailed",{values:{error:`${J} routes failed`}}),"error")}catch(B){Lt.show(i("routes.importFailed",{values:{error:B.message}}),"error")}finally{e(10,E=!1)}}},F.click()}Hs(()=>{y();const F=setInterval(()=>{y(!0)},5e3);return()=>{clearInterval(F)}});function L(){d=this.value,e(1,d)}function A(){p=pl(this),e(2,p),e(11,r),e(0,u)}function N(){m=pl(this),e(3,m)}const Z=F=>T(F),Y=F=>D(F);function x(F){b=F,e(6,b)}return t.$$.update=()=>{t.$$.dirty[0]&15&&e(12,n=u.filter(F=>{const K=F.path.toLowerCase().includes(d.toLowerCase())||F.upstreams.some(U=>U.target.toLowerCase().includes(d.toLowerCase())),M=!p||typeof F.transformer=="string"&&F.transformer===p||F.upstreams.some(U=>typeof U.transformer=="string"&&U.transformer===p);let B=!0;return m==="healthy"?B=F.upstreams.every(U=>U.status==="HEALTHY"):m==="unhealthy"&&(B=F.upstreams.some(U=>U.status==="UNHEALTHY")),K&&M&&B})),t.$$.dirty[0]&1&&e(11,r=Array.from(new Set(u.flatMap(F=>{const K=[];return typeof F.transformer=="string"&&K.push(F.transformer),F.upstreams.forEach(M=>{typeof M.transformer=="string"&&K.push(M.transformer)}),K}))))},[u,d,p,m,c,f,b,v,w,C,E,r,n,i,T,S,q,D,H,I,R,L,A,N,Z,Y,x]}class eg extends Vt{constructor(l){super(),Ut(this,l,$m,xm,At,{},null,[-1,-1])}}const yc="/__ui/api";class x0{static async getAll(){const l=await fetch(`${yc}/transformers`);if(!l.ok)throw new Error(`HTTP ${l.status}: ${l.statusText}`);const e=await l.json();return e.plugins||e.transformers||[]}static async getById(l){const e=await fetch(`${yc}/transformers/${encodeURIComponent(l)}`);if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);return await e.json()}}let bi=null;async function tg(){if(bi===null)try{bi=await x0.getAll()}catch(t){console.warn("Failed to fetch transformers from API, using fallback:",t),bi=["openai-to-anthropic","anthropic-to-openai","anthropic-to-gemini"]}return bi}function gf(t,l){const e=[],n=`upstreams[${l}]`;if(!t.target)e.push({field:`${n}.target`,message:Cs(Rt)("validation.targetRequired")});else try{const r=new URL(t.target);["http:","https:"].includes(r.protocol)||e.push({field:`${n}.target`,message:Cs(Rt)("validation.targetProtocol")})}catch{e.push({field:`${n}.target`,message:Cs(Rt)("validation.invalidUrl")})}return t.weight!==void 0&&(typeof t.weight!="number"||t.weight<=0)&&e.push({field:`${n}.weight`,message:Cs(Rt)("validation.weightPositive")}),t.priority!==void 0&&(typeof t.priority!="number"||t.priority<0)&&e.push({field:`${n}.priority`,message:Cs(Rt)("validation.priorityNonNegative")}),e}function lg(t){const l=[];return t.some(n=>n.weight!==void 0)&&t.reduce((r,i)=>r+(i.weight||0),0)===0&&l.push({field:"upstreams",message:Cs(Rt)("validation.totalWeightPositive")}),l}async function sg(t,l){const e=gf(t,l),n=`upstreams[${l}]`;if(t.plugins&&t.plugins.length>0){const r=t.plugins[0];if(typeof r=="string")try{const i=await tg();if(!i.includes(r)){const u=Cs(Rt);e.push({field:`${n}.plugins`,message:u("validation.unknownTransformer",{values:{transformer:r,options:i.join(", ")}})})}}catch(i){console.warn("Failed to validate plugin:",i)}}return e}async function og(t){const l=[];if(t.path?t.path.startsWith("/")||l.push({field:"path",message:Cs(Rt)("validation.pathStartSlash")}):l.push({field:"path",message:Cs(Rt)("validation.pathRequired")}),!t.upstreams||t.upstreams.length===0)l.push({field:"upstreams",message:Cs(Rt)("validation.upstreamRequired")});else{const e=t.upstreams.map((r,i)=>sg(r,i));(await Promise.all(e)).forEach(r=>l.push(...r))}return t.pathRewrite&&Object.keys(t.pathRewrite).forEach(e=>{try{new RegExp(e)}catch{const n=Cs(Rt);l.push({field:`pathRewrite.${e}`,message:n("validation.invalidRegex",{values:{pattern:e}})})}}),t.failover?.enabled&&(t.failover.retryableStatusCodes&&t.failover.retryableStatusCodes.forEach(e=>{if(e<100||e>599){const n=Cs(Rt);l.push({field:"failover.retryableStatusCodes",message:n("validation.invalidStatusCode",{values:{code:e}})})}}),t.failover.recoveryIntervalMs!==void 0&&t.failover.recoveryIntervalMs<=0&&l.push({field:"failover.recoveryIntervalMs",message:Cs(Rt)("validation.recoveryIntervalPositive")}),t.failover.recoveryTimeoutMs!==void 0&&t.failover.recoveryTimeoutMs<=0&&l.push({field:"failover.recoveryTimeoutMs",message:Cs(Rt)("validation.recoveryTimeoutPositive")})),l}function Cc(t){let l,e,n,r,i,u,c,f,d,p,m;function g(w,C){return w[2]==="success"?ig:w[2]==="error"?ag:w[2]==="warning"?rg:ng}let b=g(t),v=b(t);return{c(){l=a("div"),e=a("div"),n=a("div"),v.c(),r=h(),i=a("span"),u=_(t[1]),c=h(),f=a("button"),f.textContent="\u2715",o(f,"class","btn btn-sm btn-ghost"),o(e,"class",d="alert "+t[3]+" shadow-lg"),o(l,"class","toast toast-end toast-top z-50")},m(w,C){j(w,l,C),s(l,e),s(e,n),v.m(n,null),s(n,r),s(n,i),s(i,u),s(e,c),s(e,f),p||(m=V(f,"click",t[4]),p=!0)},p(w,C){b!==(b=g(w))&&(v.d(1),v=b(w),v&&(v.c(),v.m(n,r))),C&2&&k(u,w[1]),C&8&&d!==(d="alert "+w[3]+" shadow-lg")&&o(e,"class",d)},d(w){w&&P(l),v.d(),p=!1,m()}}}function ng(t){let l,e;return{c(){l=ae("svg"),e=ae("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(l,"xmlns","http://www.w3.org/2000/svg"),o(l,"fill","none"),o(l,"viewBox","0 0 24 24"),o(l,"class","stroke-current shrink-0 w-6 h-6")},m(n,r){j(n,l,r),s(l,e)},d(n){n&&P(l)}}}function rg(t){let l,e;return{c(){l=ae("svg"),e=ae("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"),o(l,"xmlns","http://www.w3.org/2000/svg"),o(l,"class","stroke-current shrink-0 h-6 w-6"),o(l,"fill","none"),o(l,"viewBox","0 0 24 24")},m(n,r){j(n,l,r),s(l,e)},d(n){n&&P(l)}}}function ag(t){let l,e;return{c(){l=ae("svg"),e=ae("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),o(l,"xmlns","http://www.w3.org/2000/svg"),o(l,"class","stroke-current shrink-0 h-6 w-6"),o(l,"fill","none"),o(l,"viewBox","0 0 24 24")},m(n,r){j(n,l,r),s(l,e)},d(n){n&&P(l)}}}function ig(t){let l,e;return{c(){l=ae("svg"),e=ae("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"),o(l,"xmlns","http://www.w3.org/2000/svg"),o(l,"class","stroke-current shrink-0 h-6 w-6"),o(l,"fill","none"),o(l,"viewBox","0 0 24 24")},m(n,r){j(n,l,r),s(l,e)},d(n){n&&P(l)}}}function ug(t){let l,e=t[0]&&Cc(t);return{c(){e&&e.c(),l=Ul()},m(n,r){e&&e.m(n,r),j(n,l,r)},p(n,[r]){n[0]?e?e.p(n,r):(e=Cc(n),e.c(),e.m(l.parentNode,l)):e&&(e.d(1),e=null)},i:tt,o:tt,d(n){n&&P(l),e&&e.d(n)}}}function fg(t,l,e){let n,{message:r}=l,{type:i="info"}=l,{duration:u=3e3}=l,{visible:c=!0}=l;const f=Cr();let d;Hs(()=>(u>0&&(d=setTimeout(()=>{e(0,c=!1),f("close")},u)),()=>{d&&clearTimeout(d)}));function p(){e(0,c=!1),f("close"),d&&clearTimeout(d)}return t.$$set=m=>{"message"in m&&e(1,r=m.message),"type"in m&&e(2,i=m.type),"duration"in m&&e(5,u=m.duration),"visible"in m&&e(0,c=m.visible)},t.$$.update=()=>{t.$$.dirty&4&&e(3,n={success:"alert-success",error:"alert-error",warning:"alert-warning",info:"alert-info"}[i])},[c,r,i,n,p,u]}class cg extends Vt{constructor(l){super(),Ut(this,l,fg,ug,At,{message:1,type:2,duration:5,visible:0})}}function Ec(t,l,e){const n=t.slice();return n[7]=l[e],n}function Tc(t){let l,e,n,r,i,u,c,f,d,p,m,g,b=ut(t[1]),v=[];for(let w=0;w<b.length;w+=1)v[w]=Mc(Ec(t,b,w));return{c(){l=a("div"),e=a("div"),n=a("h3"),n.textContent="Select Route Template",r=h(),i=a("div");for(let w=0;w<v.length;w+=1)v[w].c();u=h(),c=a("div"),f=a("button"),f.textContent="Close",d=h(),p=a("button"),o(n,"class","font-bold text-lg mb-4"),o(i,"class","grid grid-cols-1 md:grid-cols-2 gap-4"),o(f,"type","button"),o(f,"class","btn btn-sm"),o(c,"class","modal-action"),o(e,"class","modal-box max-w-4xl"),o(p,"type","button"),o(p,"class","modal-backdrop"),o(p,"aria-label","Close modal"),o(l,"class","modal modal-open")},m(w,C){j(w,l,C),s(l,e),s(e,n),s(e,r),s(e,i);for(let E=0;E<v.length;E+=1)v[E]&&v[E].m(i,null);s(e,u),s(e,c),s(c,f),s(l,d),s(l,p),m||(g=[V(f,"click",t[4]),V(p,"click",t[5])],m=!0)},p(w,C){if(C&6){b=ut(w[1]);let E;for(E=0;E<b.length;E+=1){const y=Ec(w,b,E);v[E]?v[E].p(y,C):(v[E]=Mc(y),v[E].c(),v[E].m(i,null))}for(;E<v.length;E+=1)v[E].d(1);v.length=b.length}},d(w){w&&P(l),Gt(v,w),m=!1,bt(g)}}}function Mc(t){let l,e,n,r,i,u,c,f,d,p,m;function g(){return t[3](t[7])}return{c(){l=a("button"),e=a("div"),n=a("h4"),n.textContent=`${t[7].name}`,r=h(),i=a("p"),i.textContent=`${t[7].description}`,u=h(),c=a("div"),f=a("div"),f.textContent=`${JSON.stringify(t[7].template,null,2)}`,d=h(),o(n,"class","card-title text-base"),o(i,"class","text-sm text-gray-600"),o(f,"class","text-xs font-mono bg-base-100 p-2 rounded max-h-32 overflow-auto"),o(c,"class","mt-2"),o(e,"class","card-body"),o(l,"type","button"),o(l,"class","card card-compact bg-base-200 hover:bg-base-300 cursor-pointer text-left")},m(b,v){j(b,l,v),s(l,e),s(e,n),s(e,r),s(e,i),s(e,u),s(e,c),s(c,f),s(l,d),p||(m=V(l,"click",g),p=!0)},p(b,v){t=b},d(b){b&&P(l),p=!1,m()}}}function dg(t){let l,e=t[0]&&Tc(t);return{c(){e&&e.c(),l=Ul()},m(n,r){e&&e.m(n,r),j(n,l,r)},p(n,[r]){n[0]?e?e.p(n,r):(e=Tc(n),e.c(),e.m(l.parentNode,l)):e&&(e.d(1),e=null)},i:tt,o:tt,d(n){n&&P(l),e&&e.d(n)}}}function pg(t,l,e){let{showTemplates:n=!1}=l;const r=Cr(),i=[{name:"Simple Proxy",description:"Basic reverse proxy to a single upstream",template:{path:"/api",upstreams:[{target:"https://api.example.com",weight:100,priority:1}]}},{name:"Load Balanced",description:"Multiple upstreams with load balancing",template:{path:"/api",upstreams:[{target:"https://api1.example.com",weight:100,priority:1},{target:"https://api2.example.com",weight:100,priority:1}]}},{name:"Failover Setup",description:"Primary and backup upstreams with failover",template:{path:"/api",upstreams:[{target:"https://primary.example.com",weight:200,priority:1},{target:"https://backup.example.com",weight:100,priority:2}],failover:{enabled:!0,retryableStatusCodes:[500,502,503,504]}}},{name:"Anthropic to Gemini",description:"Convert Anthropic API to Google Gemini format",template:{path:"/v1/messages",transformer:"anthropic-to-gemini",upstreams:[{target:"https://generativelanguage.googleapis.com",weight:100,priority:1}]}},{name:"Anthropic to OpenAI",description:"Convert Anthropic API to OpenAI format",template:{path:"/v1/messages",transformer:"anthropic-to-openai",upstreams:[{target:"https://api.openai.com",weight:100,priority:1}]}},{name:"Health Checked API",description:"API with health checks enabled",template:{path:"/api",upstreams:[{target:"https://api.example.com",weight:100,priority:1}],healthCheck:{enabled:!0,interval:3e4,timeout:5e3,path:"/health"}}},{name:"Path Rewrite",description:"Route with path rewriting",template:{path:"/api/v2",upstreams:[{target:"https://api.example.com",weight:100,priority:1}],pathRewrite:{"^/api/v2":"/v1"}}}];function u(p){r("select",p.template),e(0,n=!1)}const c=p=>u(p),f=()=>e(0,n=!1),d=()=>e(0,n=!1);return t.$$set=p=>{"showTemplates"in p&&e(0,n=p.showTemplates)},[n,i,u,c,f,d]}class hg extends Vt{constructor(l){super(),Ut(this,l,pg,dg,At,{showTemplates:0})}}function Sc(t,l,e){const n=t.slice();return n[16]=l[e],n}function mg(t){let l,e,n=t[7]("plugin.none")+"",r,i,u,c,f,d=ut(t[6]),p=[];for(let g=0;g<d.length;g+=1)p[g]=Rc(Sc(t,d,g));let m=t[0]&&qc(t);return{c(){l=a("select"),e=a("option"),r=_(n);for(let g=0;g<p.length;g+=1)p[g].c();i=h(),m&&m.c(),u=Ul(),e.__value=null,Q(e,e.__value),o(l,"id","plugin-select"),o(l,"class","select select-bordered"),t[0]===void 0&&tl(()=>t[11].call(l))},m(g,b){j(g,l,b),s(l,e),s(e,r);for(let v=0;v<p.length;v+=1)p[v]&&p[v].m(l,null);kt(l,t[0],!0),j(g,i,b),m&&m.m(g,b),j(g,u,b),c||(f=[V(l,"change",t[11]),V(l,"change",t[8])],c=!0)},p(g,b){if(b&128&&n!==(n=g[7]("plugin.none")+"")&&k(r,n),b&64){d=ut(g[6]);let v;for(v=0;v<d.length;v+=1){const w=Sc(g,d,v);p[v]?p[v].p(w,b):(p[v]=Rc(w),p[v].c(),p[v].m(l,null))}for(;v<p.length;v+=1)p[v].d(1);p.length=d.length}b&65&&kt(l,g[0]),g[0]?m?m.p(g,b):(m=qc(g),m.c(),m.m(u.parentNode,u)):m&&(m.d(1),m=null)},d(g){g&&(P(l),P(i),P(u)),Gt(p,g),m&&m.d(g),c=!1,bt(f)}}}function gg(t){let l,e,n,r,i,u=t[7]("routeEditor.noPluginsAvailable")+"",c;return{c(){l=a("div"),e=ae("svg"),n=ae("path"),r=h(),i=a("span"),c=_(u),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"class","stroke-current shrink-0 w-6 h-6"),o(l,"class","alert alert-info")},m(f,d){j(f,l,d),s(l,e),s(e,n),s(l,r),s(l,i),s(i,c)},p(f,d){d&128&&u!==(u=f[7]("routeEditor.noPluginsAvailable")+"")&&k(c,u)},d(f){f&&P(l)}}}function Rc(t){let l,e=t[16].name+"",n,r;return{c(){l=a("option"),n=_(e),l.__value=r=t[16].id,Q(l,l.__value)},m(i,u){j(i,l,u),s(l,n)},p(i,u){u&64&&e!==(e=i[16].name+"")&&k(n,e),u&64&&r!==(r=i[16].id)&&(l.__value=r,Q(l,l.__value))},d(i){i&&P(l)}}}function qc(t){let l,e,n=t[6].find(t[12])?.description+"",r;return{c(){l=a("div"),e=a("span"),r=_(n),o(e,"class","label-text-alt text-gray-500"),o(l,"class","label")},m(i,u){j(i,l,u),s(l,e),s(e,r)},p(i,u){u&65&&n!==(n=i[6].find(i[12])?.description+"")&&k(r,n)},d(i){i&&P(l)}}}function Hc(t){let l,e,n=t[2]?"Hide":"Show",r,i,u,c,f,d,p=t[2]&&Pc(t);return{c(){l=a("div"),e=a("button"),r=_(n),i=_(" Preview"),u=h(),p&&p.c(),c=Ul(),o(e,"type","button"),o(e,"class","btn btn-xs btn-outline"),o(l,"class","flex items-center gap-2")},m(m,g){j(m,l,g),s(l,e),s(e,r),s(e,i),j(m,u,g),p&&p.m(m,g),j(m,c,g),f||(d=V(e,"click",t[13]),f=!0)},p(m,g){g&4&&n!==(n=m[2]?"Hide":"Show")&&k(r,n),m[2]?p?p.p(m,g):(p=Pc(m),p.c(),p.m(c.parentNode,c)):p&&(p.d(1),p=null)},d(m){m&&(P(l),P(u),P(c)),p&&p.d(m),f=!1,d()}}}function Pc(t){let l,e,n,r=t[7]("plugin.testPlugin")+"",i,u,c,f,d,p,m=t[7]("plugin.input")+"",g,b,v,w,C,E,y,T,S=t[7]("plugin.output")+"",q,D,H,I,R,L,A,N,Z,Y,x=t[7]("plugin.testPlugin")+"",F,K,M,B,U,O=(t[4]||t[5])&&jc(t),J=t[5]&&Lc(t);return{c(){l=a("div"),e=a("div"),n=a("h4"),i=_(r),u=h(),c=a("div"),f=a("div"),d=a("label"),p=a("span"),g=_(m),b=h(),v=a("textarea"),C=h(),E=a("div"),y=a("label"),T=a("span"),q=_(S),D=h(),H=a("textarea"),R=h(),L=a("div"),A=a("button"),N=ae("svg"),Z=ae("path"),Y=h(),F=_(x),K=h(),O&&O.c(),M=h(),J&&J.c(),o(n,"class","font-semibold text-sm"),o(p,"class","label-text text-xs"),o(d,"class","label py-1"),o(d,"for","plugin-input"),o(v,"id","plugin-input"),o(v,"class","textarea textarea-bordered textarea-sm font-mono text-xs w-full"),o(v,"placeholder",w=t[7]("plugin.inputPlaceholder")),o(v,"rows","10"),o(T,"class","label-text text-xs"),o(y,"class","label py-1"),o(y,"for","plugin-output"),o(H,"id","plugin-output"),o(H,"class","textarea textarea-bordered textarea-sm font-mono text-xs w-full bg-base-100"),H.value=t[4],H.readOnly=!0,o(H,"rows","10"),o(H,"placeholder",I=t[7]("plugin.outputPlaceholder")),o(c,"class","grid grid-cols-2 gap-4"),o(Z,"stroke-linecap","round"),o(Z,"stroke-linejoin","round"),o(Z,"stroke-width","2"),o(Z,"d","M14 5l7 7m0 0l-7 7m7-7H3"),o(N,"xmlns","http://www.w3.org/2000/svg"),o(N,"class","h-3 w-3"),o(N,"fill","none"),o(N,"viewBox","0 0 24 24"),o(N,"stroke","currentColor"),o(A,"type","button"),o(A,"class","btn btn-xs btn-primary"),o(L,"class","flex gap-2"),o(e,"class","card-body p-4 space-y-3"),o(l,"class","card bg-base-200")},m(ie,ue){j(ie,l,ue),s(l,e),s(e,n),s(n,i),s(e,u),s(e,c),s(c,f),s(f,d),s(d,p),s(p,g),s(f,b),s(f,v),Q(v,t[3]),s(c,C),s(c,E),s(E,y),s(y,T),s(T,q),s(E,D),s(E,H),s(e,R),s(e,L),s(L,A),s(A,N),s(N,Z),s(A,Y),s(A,F),s(L,K),O&&O.m(L,null),s(e,M),J&&J.m(e,null),B||(U=[V(v,"input",t[14]),V(A,"click",t[9])],B=!0)},p(ie,ue){ue&128&&r!==(r=ie[7]("plugin.testPlugin")+"")&&k(i,r),ue&128&&m!==(m=ie[7]("plugin.input")+"")&&k(g,m),ue&128&&w!==(w=ie[7]("plugin.inputPlaceholder"))&&o(v,"placeholder",w),ue&8&&Q(v,ie[3]),ue&128&&S!==(S=ie[7]("plugin.output")+"")&&k(q,S),ue&16&&(H.value=ie[4]),ue&128&&I!==(I=ie[7]("plugin.outputPlaceholder"))&&o(H,"placeholder",I),ue&128&&x!==(x=ie[7]("plugin.testPlugin")+"")&&k(F,x),ie[4]||ie[5]?O?O.p(ie,ue):(O=jc(ie),O.c(),O.m(L,null)):O&&(O.d(1),O=null),ie[5]?J?J.p(ie,ue):(J=Lc(ie),J.c(),J.m(e,null)):J&&(J.d(1),J=null)},d(ie){ie&&P(l),O&&O.d(),J&&J.d(),B=!1,bt(U)}}}function jc(t){let l,e=t[7]("common.reset")+"",n,r,i;return{c(){l=a("button"),n=_(e),o(l,"type","button"),o(l,"class","btn btn-xs btn-ghost")},m(u,c){j(u,l,c),s(l,n),r||(i=V(l,"click",t[10]),r=!0)},p(u,c){c&128&&e!==(e=u[7]("common.reset")+"")&&k(n,e)},d(u){u&&P(l),r=!1,i()}}}function Lc(t){let l,e,n,r,i,u=t[7]("common.error")+"",c,f,d;return{c(){l=a("div"),e=ae("svg"),n=ae("path"),r=h(),i=a("span"),c=_(u),f=_(": "),d=_(t[5]),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","stroke-current shrink-0 h-4 w-4"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(i,"class","text-xs"),o(l,"class","alert alert-error py-2")},m(p,m){j(p,l,m),s(l,e),s(e,n),s(l,r),s(l,i),s(i,c),s(i,f),s(i,d)},p(p,m){m&128&&u!==(u=p[7]("common.error")+"")&&k(c,u),m&32&&k(d,p[5])},d(p){p&&P(l)}}}function _g(t){let l,e,n,r,i,u,c;function f(g,b){return g[6].length===0?gg:mg}let d=f(t),p=d(t),m=t[0]&&Hc(t);return{c(){l=a("div"),e=a("div"),n=a("label"),r=a("span"),i=_(t[1]),u=h(),p.c(),c=h(),m&&m.c(),o(r,"class","label-text font-semibold"),o(n,"class","label"),o(n,"for","plugin-select"),o(e,"class","form-control"),o(l,"class","space-y-3")},m(g,b){j(g,l,b),s(l,e),s(e,n),s(n,r),s(r,i),s(e,u),p.m(e,null),s(l,c),m&&m.m(l,null)},p(g,[b]){b&2&&k(i,g[1]),d===(d=f(g))&&p?p.p(g,b):(p.d(1),p=d(g),p&&(p.c(),p.m(e,null))),g[0]?m?m.p(g,b):(m=Hc(g),m.c(),m.m(l,null)):m&&(m.d(1),m=null)},i:tt,o:tt,d(g){g&&P(l),p.d(),m&&m.d()}}}function $0(t){return t.split("-").map(l=>l.charAt(0).toUpperCase()+l.slice(1)).join(" \u2192 ")}function bg(t){const l=t.split("-to-");if(l.length===2){const[e,n]=l;return`Convert ${e.charAt(0).toUpperCase()+e.slice(1)} API format to ${n.charAt(0).toUpperCase()+n.slice(1)} format`}return`${$0(t)} plugin`}function vg(t,l,e){let n;Dt(t,Rt,T=>e(7,n=T));let{plugin:r=null}=l,{label:i="Plugin"}=l;const u=Cr();let c=!1,f=`{\n "model": "claude-3-5-sonnet-20241022",\n "messages": [\n {\n "role": "user",\n "content": "Hello"\n }\n ]\n}`,d="",p=null,m=[];Hs(async()=>{try{const T=await x0.getAll();e(6,m=T.map(S=>({id:S,name:$0(S),description:bg(S)})))}catch(T){console.warn("Failed to load plugins from API, using fallback:",T),e(6,m=[{id:"openai-to-anthropic",name:"OpenAI \u2192 Anthropic",description:"Convert OpenAI API format to Anthropic format"},{id:"anthropic-to-openai",name:"Anthropic \u2192 OpenAI",description:"Convert Anthropic API format to OpenAI format"},{id:"anthropic-to-gemini",name:"Anthropic \u2192 Gemini",description:"Convert Anthropic API format to Google Gemini format"}])}});function g(){u("change",r),e(4,d=""),e(5,p=null)}function b(){if(!r||!f){e(5,p=n("plugin.testFailed",{values:{error:"Invalid input"}}));return}try{const T=JSON.parse(f);let S;r==="anthropic-to-gemini"?S={contents:T.messages?.map(q=>({role:q.role==="user"?"user":"model",parts:[{text:q.content}]})),generationConfig:{temperature:T.temperature||1,maxOutputTokens:T.max_tokens||8192}}:r==="anthropic-to-openai"?S={model:T.model?.replace("claude","gpt-4"),messages:T.messages,temperature:T.temperature,max_tokens:T.max_tokens}:S={...T,_transformed:!0},e(4,d=JSON.stringify(S,null,2)),e(5,p=null)}catch(T){e(5,p=T.message),e(4,d="")}}function v(){e(4,d=""),e(5,p=null)}function w(){r=pl(this),e(0,r),e(6,m)}const C=T=>T.id===r,E=()=>e(2,c=!c);function y(){f=this.value,e(3,f)}return t.$$set=T=>{"plugin"in T&&e(0,r=T.plugin),"label"in T&&e(1,i=T.label)},[r,i,c,f,d,p,m,n,g,b,v,w,C,E,y]}class e2 extends Vt{constructor(l){super(),Ut(this,l,vg,_g,At,{plugin:0,label:1})}}function Dc(t,l,e){const n=t.slice();return n[15]=l[e],n[16]=l,n[17]=e,n}function kg(t){let l,e=t[5]("routeEditor.pathHelpLong")+"",n;return{c(){l=a("span"),n=_(e),o(l,"class","label-text-alt text-gray-500")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i&32&&e!==(e=r[5]("routeEditor.pathHelpLong")+"")&&k(n,e)},d(r){r&&P(l)}}}function wg(t){let l,e=t[1].find(Ac)?.message+"",n;return{c(){l=a("span"),n=_(e),o(l,"class","label-text-alt text-error")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i&2&&e!==(e=r[1].find(Ac)?.message+"")&&k(n,e)},d(r){r&&P(l)}}}function Ic(t){let l,e,n,r,i,u,c,f,d,p,m,g,b;function v(){t[11].call(e,t[16],t[17])}function w(){t[12].call(f,t[16],t[17])}function C(){return t[13](t[17])}return{c(){l=a("div"),e=a("input"),r=h(),i=ae("svg"),u=ae("path"),c=h(),f=a("input"),p=h(),m=a("button"),m.innerHTML=\'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"></path></svg>\',o(e,"id",`path-rewrite-pattern-${t[17]}`),o(e,"type","text"),o(e,"placeholder",n=t[5]("routeEditor.patternPlaceholder")),o(e,"class","input input-bordered input-sm flex-1"),o(u,"stroke-linecap","round"),o(u,"stroke-linejoin","round"),o(u,"stroke-width","2"),o(u,"d","M14 5l7 7m0 0l-7 7m7-7H3"),o(i,"xmlns","http://www.w3.org/2000/svg"),o(i,"class","h-5 w-5 text-gray-400 flex-shrink-0"),o(i,"fill","none"),o(i,"viewBox","0 0 24 24"),o(i,"stroke","currentColor"),o(f,"id",`path-rewrite-replacement-${t[17]}`),o(f,"type","text"),o(f,"placeholder",d=t[5]("routeEditor.replacementPlaceholder")),o(f,"class","input input-bordered input-sm flex-1"),o(m,"type","button"),o(m,"class","btn btn-sm btn-error btn-square flex-shrink-0"),o(l,"class","flex gap-2 items-center")},m(E,y){j(E,l,y),s(l,e),Q(e,t[15].pattern),s(l,r),s(l,i),s(i,u),s(l,c),s(l,f),Q(f,t[15].replacement),s(l,p),s(l,m),g||(b=[V(e,"input",v),V(f,"input",w),V(m,"click",C)],g=!0)},p(E,y){t=E,y&32&&n!==(n=t[5]("routeEditor.patternPlaceholder"))&&o(e,"placeholder",n),y&4&&e.value!==t[15].pattern&&Q(e,t[15].pattern),y&32&&d!==(d=t[5]("routeEditor.replacementPlaceholder"))&&o(f,"placeholder",d),y&4&&f.value!==t[15].replacement&&Q(f,t[15].replacement)},d(E){E&&P(l),g=!1,bt(b)}}}function yg(t){let l,e,n,r,i=t[5]("routes.path")+"",u,c,f,d,p,m,g,b,v,w,C,E,y,T=t[5]("routeEditor.pathRewrite")+"",S,q,D=t[5]("routeEditor.optional")+"",H,I,R,L,A,N,Z,Y,x,F,K,M,B,U=t[5]("routeEditor.addPathRewriteRule")+"",O,J,ie,ue,ne,$,te=t[5]("routeEditor.transformer")+"",re,ee,G,pe=t[5]("routeEditor.transformerHelp")+"",oe,ge,he,ye,Fe,je,we,Oe,Je;function Le(se,ke){return ke&2&&(v=null),v==null&&(v=!!se[1].some(Cg)),v?wg:kg}let Pe=Le(t,-1),Me=Pe(t),fe=ut(t[2]),_e=[];for(let se=0;se<fe.length;se+=1)_e[se]=Ic(Dc(t,fe,se));function Be(se){t[14](se)}let De={label:t[5]("routeEditor.transformer")};return t[3]!==void 0&&(De.plugin=t[3]),he=new e2({props:De}),bl.push(()=>Rl(he,"plugin",Be)),je=new X0({props:{open:t[4]!==null,title:t[5]("common.confirm"),message:t[5]("routeEditor.confirmDeleteRule"),confirmText:t[5]("common.delete"),cancelText:t[5]("common.cancel"),confirmClass:"btn-error"}}),je.$on("confirm",t[8]),je.$on("cancel",t[9]),{c(){l=a("div"),e=a("div"),n=a("label"),r=a("span"),u=_(i),c=h(),f=a("span"),f.textContent="*",d=h(),p=a("input"),g=h(),b=a("div"),Me.c(),w=h(),C=a("div"),E=a("label"),y=a("span"),S=_(T),q=_(" ("),H=_(D),I=_(`)\n `),R=a("div"),L=ae("svg"),A=ae("path"),Z=h(),Y=a("div");for(let se=0;se<_e.length;se+=1)_e[se].c();x=h(),F=a("button"),K=ae("svg"),M=ae("path"),B=h(),O=_(U),J=h(),ie=a("div"),ue=h(),ne=a("div"),$=a("h3"),re=_(te),ee=h(),G=a("p"),oe=_(pe),ge=h(),Et(he.$$.fragment),Fe=h(),Et(je.$$.fragment),o(f,"class","text-error"),o(r,"class","label-text font-semibold"),o(n,"class","label"),o(n,"for","route-path"),o(p,"id","route-path"),o(p,"type","text"),o(p,"placeholder",m=t[5]("routeEditor.pathPlaceholder")),o(p,"class","input input-bordered"),p.required=!0,le(p,"input-error",t[1].some(Bc)),o(b,"class","label"),o(e,"class","form-control"),o(A,"stroke-linecap","round"),o(A,"stroke-linejoin","round"),o(A,"stroke-width","2"),o(A,"d","M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(L,"xmlns","http://www.w3.org/2000/svg"),o(L,"class","h-4 w-4 text-gray-400 cursor-help"),o(L,"fill","none"),o(L,"viewBox","0 0 24 24"),o(L,"stroke","currentColor"),o(R,"class","tooltip tooltip-right"),o(R,"data-tip",N=t[5]("routeEditor.pathRewriteTooltip")),o(y,"class","label-text font-semibold flex items-center gap-2"),o(E,"class","label"),o(E,"for","path-rewrite-pattern-0"),o(M,"stroke-linecap","round"),o(M,"stroke-linejoin","round"),o(M,"stroke-width","2"),o(M,"d","M12 4v16m8-8H4"),o(K,"xmlns","http://www.w3.org/2000/svg"),o(K,"class","h-4 w-4"),o(K,"fill","none"),o(K,"viewBox","0 0 24 24"),o(K,"stroke","currentColor"),o(F,"type","button"),o(F,"class","btn btn-sm btn-outline gap-2"),o(Y,"class","space-y-2"),o(C,"class","form-control"),o(ie,"class","divider"),o($,"class","text-lg font-semibold mb-2"),o(G,"class","text-sm text-gray-500 mb-4"),o(l,"class","space-y-6")},m(se,ke){j(se,l,ke),s(l,e),s(e,n),s(n,r),s(r,u),s(r,c),s(r,f),s(e,d),s(e,p),Q(p,t[0].path),s(e,g),s(e,b),Me.m(b,null),s(l,w),s(l,C),s(C,E),s(E,y),s(y,S),s(y,q),s(y,H),s(y,I),s(y,R),s(R,L),s(L,A),s(C,Z),s(C,Y);for(let me=0;me<_e.length;me+=1)_e[me]&&_e[me].m(Y,null);s(Y,x),s(Y,F),s(F,K),s(K,M),s(F,B),s(F,O),s(l,J),s(l,ie),s(l,ue),s(l,ne),s(ne,$),s($,re),s(ne,ee),s(ne,G),s(G,oe),s(ne,ge),yt(he,ne,null),j(se,Fe,ke),yt(je,se,ke),we=!0,Oe||(Je=[V(p,"input",t[10]),V(F,"click",t[6])],Oe=!0)},p(se,[ke]){if((!we||ke&32)&&i!==(i=se[5]("routes.path")+"")&&k(u,i),(!we||ke&32&&m!==(m=se[5]("routeEditor.pathPlaceholder")))&&o(p,"placeholder",m),ke&1&&p.value!==se[0].path&&Q(p,se[0].path),(!we||ke&2)&&le(p,"input-error",se[1].some(Bc)),Pe===(Pe=Le(se,ke))&&Me?Me.p(se,ke):(Me.d(1),Me=Pe(se),Me&&(Me.c(),Me.m(b,null))),(!we||ke&32)&&T!==(T=se[5]("routeEditor.pathRewrite")+"")&&k(S,T),(!we||ke&32)&&D!==(D=se[5]("routeEditor.optional")+"")&&k(H,D),(!we||ke&32&&N!==(N=se[5]("routeEditor.pathRewriteTooltip")))&&o(R,"data-tip",N),ke&164){fe=ut(se[2]);let Ve;for(Ve=0;Ve<fe.length;Ve+=1){const Ie=Dc(se,fe,Ve);_e[Ve]?_e[Ve].p(Ie,ke):(_e[Ve]=Ic(Ie),_e[Ve].c(),_e[Ve].m(Y,x))}for(;Ve<_e.length;Ve+=1)_e[Ve].d(1);_e.length=fe.length}(!we||ke&32)&&U!==(U=se[5]("routeEditor.addPathRewriteRule")+"")&&k(O,U),(!we||ke&32)&&te!==(te=se[5]("routeEditor.transformer")+"")&&k(re,te),(!we||ke&32)&&pe!==(pe=se[5]("routeEditor.transformerHelp")+"")&&k(oe,pe);const me={};ke&32&&(me.label=se[5]("routeEditor.transformer")),!ye&&ke&8&&(ye=!0,me.plugin=se[3],Sl(()=>ye=!1)),he.$set(me);const Ee={};ke&16&&(Ee.open=se[4]!==null),ke&32&&(Ee.title=se[5]("common.confirm")),ke&32&&(Ee.message=se[5]("routeEditor.confirmDeleteRule")),ke&32&&(Ee.confirmText=se[5]("common.delete")),ke&32&&(Ee.cancelText=se[5]("common.cancel")),je.$set(Ee)},i(se){we||(et(he.$$.fragment,se),et(je.$$.fragment,se),we=!0)},o(se){st(he.$$.fragment,se),st(je.$$.fragment,se),we=!1},d(se){se&&(P(l),P(Fe)),Me.d(),Gt(_e,se),Ct(he),Ct(je,se),Oe=!1,bt(Je)}}}const Cg=t=>t.field==="path",Bc=t=>t.field==="path",Ac=t=>t.field==="path";function Eg(t,l,e){let n;Dt(t,Rt,y=>e(5,n=y));let{route:r}=l,{errors:i=[]}=l,u=[],c=null,f=r.plugins?.[0]||null;function d(){e(2,u=[...u,{pattern:"",replacement:""}])}function p(y){e(4,c=y)}function m(){c!==null&&(e(2,u=u.filter((y,T)=>T!==c)),e(4,c=null))}function g(){e(4,c=null)}function b(){r.path=this.value,e(0,r),e(2,u),e(3,f)}function v(y,T){y[T].pattern=this.value,e(2,u),e(0,r),e(3,f)}function w(y,T){y[T].replacement=this.value,e(2,u),e(0,r),e(3,f)}const C=y=>p(y);function E(y){f=y,e(3,f)}return t.$$set=y=>{"route"in y&&e(0,r=y.route),"errors"in y&&e(1,i=y.errors)},t.$$.update=()=>{if(t.$$.dirty&5){!u.length&&r.pathRewrite&&e(2,u=Object.entries(r.pathRewrite||{}).map(([T,S])=>({pattern:T,replacement:S})));const y={};u.filter(T=>T.pattern.trim()).forEach(T=>{y[T.pattern]=T.replacement}),e(0,r.pathRewrite=Object.keys(y).length>0?y:void 0,r)}t.$$.dirty&8&&e(0,r.plugins=f?[f]:void 0,r)},[r,i,u,f,c,n,d,p,m,g,b,v,w,C,E]}class Tg extends Vt{constructor(l){super(),Ut(this,l,Eg,yg,At,{route:0,errors:1})}}function Oc(t,l,e){const n=t.slice();return n[31]=l[e],n[32]=l,n[33]=e,n}function Fc(t,l,e){const n=t.slice();return n[31]=l[e],n[34]=l,n[33]=e,n}function zc(t,l,e){const n=t.slice();return n[31]=l[e],n[33]=e,n}function Nc(t,l,e){const n=t.slice();return n[31]=l[e],n[36]=l,n[33]=e,n}function Uc(t){let l,e,n,r,i=t[1]&&Vc();return{c(){l=a("div"),e=a("span"),n=_(t[0]),r=h(),i&&i.c(),o(e,"class","label-text font-semibold"),o(l,"class","label")},m(u,c){j(u,l,c),s(l,e),s(e,n),s(l,r),i&&i.m(l,null)},p(u,c){c[0]&1&&k(n,u[0]),u[1]?i||(i=Vc(),i.c(),i.m(l,null)):i&&(i.d(1),i=null)},d(u){u&&P(l),i&&i.d()}}}function Vc(t){let l,e,n;return{c(){l=a("span"),e=_("Support dynamic expressions: "),n=a("code"),n.textContent="{{ expression }}",o(n,"class","text-xs"),o(l,"class","label-text-alt text-xs")},m(r,i){j(r,l,i),s(l,e),s(l,n)},d(r){r&&P(l)}}}function Jc(t){let l,e,n,r,i,u,c,f,d,p;function m(){t[20].call(e,t[36],t[33])}function g(){t[21].call(i,t[36],t[33])}function b(){return t[22](t[33])}return{c(){l=a("div"),e=a("input"),r=h(),i=a("input"),c=h(),f=a("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=t[8]("headers.namePlaceholder")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=t[8]("headers.valuePlaceholder")),o(i,"class","input input-bordered input-sm flex-1"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(l,"class","flex gap-2")},m(v,w){j(v,l,w),s(l,e),Q(e,t[31].key),s(l,r),s(l,i),Q(i,t[31].value),s(l,c),s(l,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(v,w){t=v,w[0]&256&&n!==(n=t[8]("headers.namePlaceholder"))&&o(e,"placeholder",n),w[0]&8&&e.value!==t[31].key&&Q(e,t[31].key),w[0]&256&&u!==(u=t[8]("headers.valuePlaceholder"))&&o(i,"placeholder",u),w[0]&8&&i.value!==t[31].value&&Q(i,t[31].value)},d(v){v&&P(l),d=!1,bt(p)}}}function Mg(t){let l,e=t[8]("headers.empty")+"",n;return{c(){l=a("p"),n=_(e),o(l,"class","text-xs text-gray-500")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&256&&e!==(e=r[8]("headers.empty")+"")&&k(n,e)},d(r){r&&P(l)}}}function Sg(t){let l,e=ut(t[4]),n=[];for(let r=0;r<e.length;r+=1)n[r]=Wc(zc(t,e,r));return{c(){l=a("div");for(let r=0;r<n.length;r+=1)n[r].c();o(l,"class","flex flex-wrap gap-2 mt-2")},m(r,i){j(r,l,i);for(let u=0;u<n.length;u+=1)n[u]&&n[u].m(l,null)},p(r,i){if(i[0]&4112){e=ut(r[4]);let u;for(u=0;u<e.length;u+=1){const c=zc(r,e,u);n[u]?n[u].p(c,i):(n[u]=Wc(c),n[u].c(),n[u].m(l,null))}for(;u<n.length;u+=1)n[u].d(1);n.length=e.length}},d(r){r&&P(l),Gt(n,r)}}}function Wc(t){let l,e=t[31]+"",n,r,i,u,c,f;function d(){return t[24](t[33])}return{c(){l=a("div"),n=_(e),r=h(),i=a("button"),i.textContent="\u2715",u=h(),o(i,"type","button"),o(i,"class","btn btn-ghost btn-xs btn-circle"),o(l,"class","badge badge-lg gap-2")},m(p,m){j(p,l,m),s(l,n),s(l,r),s(l,i),s(l,u),c||(f=V(i,"click",d),c=!0)},p(p,m){t=p,m[0]&16&&e!==(e=t[31]+"")&&k(n,e)},d(p){p&&P(l),c=!1,f()}}}function Gc(t){let l,e,n,r,i,u,c,f,d,p;function m(){t[25].call(e,t[34],t[33])}function g(){t[26].call(i,t[34],t[33])}function b(){return t[27](t[33])}return{c(){l=a("div"),e=a("input"),r=h(),i=a("input"),c=h(),f=a("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=t[8]("headers.namePlaceholder")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=t[8]("headers.valuePlaceholder")),o(i,"class","input input-bordered input-sm flex-1"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(l,"class","flex gap-2")},m(v,w){j(v,l,w),s(l,e),Q(e,t[31].key),s(l,r),s(l,i),Q(i,t[31].value),s(l,c),s(l,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(v,w){t=v,w[0]&256&&n!==(n=t[8]("headers.namePlaceholder"))&&o(e,"placeholder",n),w[0]&32&&e.value!==t[31].key&&Q(e,t[31].key),w[0]&256&&u!==(u=t[8]("headers.valuePlaceholder"))&&o(i,"placeholder",u),w[0]&32&&i.value!==t[31].value&&Q(i,t[31].value)},d(v){v&&P(l),d=!1,bt(p)}}}function Kc(t){let l,e,n,r,i,u,c,f,d,p;function m(){t[28].call(e,t[32],t[33])}function g(){t[29].call(i,t[32],t[33])}function b(){return t[30](t[33])}return{c(){l=a("div"),e=a("input"),r=h(),i=a("input"),c=h(),f=a("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=t[8]("headers.namePlaceholder")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=t[8]("headers.valuePlaceholder")),o(i,"class","input input-bordered input-sm flex-1"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(l,"class","flex gap-2")},m(v,w){j(v,l,w),s(l,e),Q(e,t[31].key),s(l,r),s(l,i),Q(i,t[31].value),s(l,c),s(l,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(v,w){t=v,w[0]&256&&n!==(n=t[8]("headers.namePlaceholder"))&&o(e,"placeholder",n),w[0]&64&&e.value!==t[31].key&&Q(e,t[31].key),w[0]&256&&u!==(u=t[8]("headers.valuePlaceholder"))&&o(i,"placeholder",u),w[0]&64&&i.value!==t[31].value&&Q(i,t[31].value)},d(v){v&&P(l),d=!1,bt(p)}}}function Rg(t){let l,e,n,r,i,u,c,f=t[8]("headers.add")+"",d,p,m=t[3].length+"",g,b,v,w,C,E,y=t[8]("headers.add")+"",T,S,q,D,H,I,R=t[8]("headers.remove")+"",L,A,N=t[4].length+"",Z,Y,x,F,K,M,B,U,O,J=t[8]("common.add")+"",ie,ue,ne,$,te,re,ee,G,pe=t[8]("headers.replace")+"",oe,ge,he=t[5].length+"",ye,Fe,je,we,Oe,Je,Le=t[8]("headers.add")+"",Pe,Me,fe,_e,Be,De,se=t[8]("headers.default")+"",ke,me,Ee=t[6].length+"",Ve,Ie,nt,Ne,Ye,Qe,ve=t[8]("headers.add")+"",de,Te,Ze,Se=t[2]&&Uc(t),Ue=ut(t[3]),Ce=[];for(let z=0;z<Ue.length;z+=1)Ce[z]=Jc(Nc(t,Ue,z));function mt(z,He){return z[4].length>0?Sg:Mg}let Ge=mt(t),ce=Ge(t),qe=ut(t[5]),Re=[];for(let z=0;z<qe.length;z+=1)Re[z]=Gc(Fc(t,qe,z));let dt=ut(t[6]),We=[];for(let z=0;z<dt.length;z+=1)We[z]=Kc(Oc(t,dt,z));return{c(){l=a("div"),Se&&Se.c(),e=h(),n=a("div"),r=a("div"),i=a("input"),u=h(),c=a("div"),d=_(f),p=_(" ("),g=_(m),b=_(")"),v=h(),w=a("div");for(let z=0;z<Ce.length;z+=1)Ce[z].c();C=h(),E=a("button"),T=_(y),S=h(),q=a("div"),D=a("input"),H=h(),I=a("div"),L=_(R),A=_(" ("),Z=_(N),Y=_(")"),x=h(),F=a("div"),K=a("div"),M=a("input"),U=h(),O=a("button"),ie=_(J),ne=h(),ce.c(),$=h(),te=a("div"),re=a("input"),ee=h(),G=a("div"),oe=_(pe),ge=_(" ("),ye=_(he),Fe=_(")"),je=h(),we=a("div");for(let z=0;z<Re.length;z+=1)Re[z].c();Oe=h(),Je=a("button"),Pe=_(Le),Me=h(),fe=a("div"),_e=a("input"),Be=h(),De=a("div"),ke=_(se),me=_(" ("),Ve=_(Ee),Ie=_(")"),nt=h(),Ne=a("div");for(let z=0;z<We.length;z+=1)We[z].c();Ye=h(),Qe=a("button"),de=_(ve),o(i,"type","checkbox"),i.checked=!0,o(c,"class","collapse-title text-sm font-medium"),o(E,"type","button"),o(E,"class","btn btn-sm btn-ghost"),o(w,"class","collapse-content space-y-2"),o(r,"class","collapse collapse-arrow bg-base-200"),o(D,"type","checkbox"),o(I,"class","collapse-title text-sm font-medium"),o(M,"type","text"),o(M,"placeholder",B=t[8]("headers.namePlaceholder")),o(M,"class","input input-bordered input-sm flex-1"),o(O,"type","button"),o(O,"class","btn btn-sm btn-primary"),O.disabled=ue=!t[7].trim(),o(K,"class","flex gap-2"),o(F,"class","collapse-content space-y-2"),o(q,"class","collapse collapse-arrow bg-base-200"),o(re,"type","checkbox"),o(G,"class","collapse-title text-sm font-medium"),o(Je,"type","button"),o(Je,"class","btn btn-sm btn-ghost"),o(we,"class","collapse-content space-y-2"),o(te,"class","collapse collapse-arrow bg-base-200"),o(_e,"type","checkbox"),o(De,"class","collapse-title text-sm font-medium"),o(Qe,"type","button"),o(Qe,"class","btn btn-sm btn-ghost"),o(Ne,"class","collapse-content space-y-2"),o(fe,"class","collapse collapse-arrow bg-base-200"),o(n,"class","space-y-4"),o(l,"class","form-control w-full")},m(z,He){j(z,l,He),Se&&Se.m(l,null),s(l,e),s(l,n),s(n,r),s(r,i),s(r,u),s(r,c),s(c,d),s(c,p),s(c,g),s(c,b),s(r,v),s(r,w);for(let X=0;X<Ce.length;X+=1)Ce[X]&&Ce[X].m(w,null);s(w,C),s(w,E),s(E,T),s(n,S),s(n,q),s(q,D),s(q,H),s(q,I),s(I,L),s(I,A),s(I,Z),s(I,Y),s(q,x),s(q,F),s(F,K),s(K,M),Q(M,t[7]),s(K,U),s(K,O),s(O,ie),s(F,ne),ce.m(F,null),s(n,$),s(n,te),s(te,re),s(te,ee),s(te,G),s(G,oe),s(G,ge),s(G,ye),s(G,Fe),s(te,je),s(te,we);for(let X=0;X<Re.length;X+=1)Re[X]&&Re[X].m(we,null);s(we,Oe),s(we,Je),s(Je,Pe),s(n,Me),s(n,fe),s(fe,_e),s(fe,Be),s(fe,De),s(De,ke),s(De,me),s(De,Ve),s(De,Ie),s(fe,nt),s(fe,Ne);for(let X=0;X<We.length;X+=1)We[X]&&We[X].m(Ne,null);s(Ne,Ye),s(Ne,Qe),s(Qe,de),Te||(Ze=[V(E,"click",t[9]),V(M,"input",t[23]),V(M,"keydown",t[13]),V(O,"click",t[11]),V(Je,"click",t[14]),V(Qe,"click",t[16])],Te=!0)},p(z,He){if(z[2]?Se?Se.p(z,He):(Se=Uc(z),Se.c(),Se.m(l,e)):Se&&(Se.d(1),Se=null),He[0]&256&&f!==(f=z[8]("headers.add")+"")&&k(d,f),He[0]&8&&m!==(m=z[3].length+"")&&k(g,m),He[0]&1288){Ue=ut(z[3]);let X;for(X=0;X<Ue.length;X+=1){const ft=Nc(z,Ue,X);Ce[X]?Ce[X].p(ft,He):(Ce[X]=Jc(ft),Ce[X].c(),Ce[X].m(w,C))}for(;X<Ce.length;X+=1)Ce[X].d(1);Ce.length=Ue.length}if(He[0]&256&&y!==(y=z[8]("headers.add")+"")&&k(T,y),He[0]&256&&R!==(R=z[8]("headers.remove")+"")&&k(L,R),He[0]&16&&N!==(N=z[4].length+"")&&k(Z,N),He[0]&256&&B!==(B=z[8]("headers.namePlaceholder"))&&o(M,"placeholder",B),He[0]&128&&M.value!==z[7]&&Q(M,z[7]),He[0]&256&&J!==(J=z[8]("common.add")+"")&&k(ie,J),He[0]&128&&ue!==(ue=!z[7].trim())&&(O.disabled=ue),Ge===(Ge=mt(z))&&ce?ce.p(z,He):(ce.d(1),ce=Ge(z),ce&&(ce.c(),ce.m(F,null))),He[0]&256&&pe!==(pe=z[8]("headers.replace")+"")&&k(oe,pe),He[0]&32&&he!==(he=z[5].length+"")&&k(ye,he),He[0]&33056){qe=ut(z[5]);let X;for(X=0;X<qe.length;X+=1){const ft=Fc(z,qe,X);Re[X]?Re[X].p(ft,He):(Re[X]=Gc(ft),Re[X].c(),Re[X].m(we,Oe))}for(;X<Re.length;X+=1)Re[X].d(1);Re.length=qe.length}if(He[0]&256&&Le!==(Le=z[8]("headers.add")+"")&&k(Pe,Le),He[0]&256&&se!==(se=z[8]("headers.default")+"")&&k(ke,se),He[0]&64&&Ee!==(Ee=z[6].length+"")&&k(Ve,Ee),He[0]&131392){dt=ut(z[6]);let X;for(X=0;X<dt.length;X+=1){const ft=Oc(z,dt,X);We[X]?We[X].p(ft,He):(We[X]=Kc(ft),We[X].c(),We[X].m(Ne,Ye))}for(;X<We.length;X+=1)We[X].d(1);We.length=dt.length}He[0]&256&&ve!==(ve=z[8]("headers.add")+"")&&k(de,ve)},i:tt,o:tt,d(z){z&&P(l),Se&&Se.d(),Gt(Ce,z),ce.d(),Gt(Re,z),Gt(We,z),Te=!1,bt(Ze)}}}function qg(t,l,e){let n;Dt(t,Rt,M=>e(8,n=M));let{value:r={}}=l,{label:i="Headers"}=l,{showHelp:u=!0}=l,{showLabel:c=!0}=l,f=[],d=[],p="",m=[],g=[],b=!1;function v(){e(3,f=[...f,{key:"",value:""}]),e(19,b=!0)}function w(M){e(3,f=f.filter((B,U)=>U!==M))}function C(){const M=p.trim();M&&!d.includes(M)&&(e(4,d=[...d,M]),e(7,p=""),e(19,b=!0))}function E(M){e(4,d=d.filter((B,U)=>U!==M))}function y(M){M.key==="Enter"&&(M.preventDefault(),C())}function T(){e(5,m=[...m,{key:"",value:""}]),e(19,b=!0)}function S(M){e(5,m=m.filter((B,U)=>U!==M))}function q(){e(6,g=[...g,{key:"",value:""}]),e(19,b=!0)}function D(M){e(6,g=g.filter((B,U)=>U!==M))}function H(M,B){M[B].key=this.value,e(3,f),e(19,b),e(18,r),e(4,d),e(5,m),e(6,g)}function I(M,B){M[B].value=this.value,e(3,f),e(19,b),e(18,r),e(4,d),e(5,m),e(6,g)}const R=M=>w(M);function L(){p=this.value,e(7,p)}const A=M=>E(M);function N(M,B){M[B].key=this.value,e(5,m),e(19,b),e(18,r),e(3,f),e(4,d),e(6,g)}function Z(M,B){M[B].value=this.value,e(5,m),e(19,b),e(18,r),e(3,f),e(4,d),e(6,g)}const Y=M=>S(M);function x(M,B){M[B].key=this.value,e(6,g),e(19,b),e(18,r),e(3,f),e(4,d),e(5,m)}function F(M,B){M[B].value=this.value,e(6,g),e(19,b),e(18,r),e(3,f),e(4,d),e(5,m)}const K=M=>D(M);return t.$$set=M=>{"value"in M&&e(18,r=M.value),"label"in M&&e(0,i=M.label),"showHelp"in M&&e(1,u=M.showHelp),"showLabel"in M&&e(2,c=M.showLabel)},t.$$.update=()=>{if(t.$$.dirty[0]&786552){!b&&(r.add||r.remove||r.replace||r.default)&&(e(3,f=Object.entries(r.add||{}).map(([O,J])=>({key:O,value:String(J)}))),e(4,d=[...r.remove||[]]),e(5,m=Object.entries(r.replace||{}).map(([O,J])=>({key:O,value:String(J)}))),e(6,g=Object.entries(r.default||{}).map(([O,J])=>({key:O,value:String(J)}))),e(19,b=!0));const M={};f.filter(O=>O.key.trim()).forEach(O=>{M[O.key]=O.value}),e(18,r.add=Object.keys(M).length>0?M:void 0,r),e(18,r.remove=d.length>0?d:void 0,r);const B={};m.filter(O=>O.key.trim()).forEach(O=>{B[O.key]=O.value}),e(18,r.replace=Object.keys(B).length>0?B:void 0,r);const U={};g.filter(O=>O.key.trim()).forEach(O=>{U[O.key]=O.value}),e(18,r.default=Object.keys(U).length>0?U:void 0,r)}},[i,u,c,f,d,m,g,p,n,v,w,C,E,y,T,S,q,D,r,b,H,I,R,L,A,N,Z,Y,x,F,K]}class t2 extends Vt{constructor(l){super(),Ut(this,l,qg,Rg,At,{value:18,label:0,showHelp:1,showLabel:2},null,[-1,-1])}}function Qc(t,l,e){const n=t.slice();return n[31]=l[e],n[32]=l,n[33]=e,n}function Yc(t,l,e){const n=t.slice();return n[31]=l[e],n[34]=l,n[33]=e,n}function Zc(t,l,e){const n=t.slice();return n[31]=l[e],n[33]=e,n}function Xc(t,l,e){const n=t.slice();return n[31]=l[e],n[36]=l,n[33]=e,n}function xc(t){let l,e,n,r,i=t[1]&&$c();return{c(){l=a("div"),e=a("span"),n=_(t[0]),r=h(),i&&i.c(),o(e,"class","label-text font-semibold"),o(l,"class","label")},m(u,c){j(u,l,c),s(l,e),s(e,n),s(l,r),i&&i.m(l,null)},p(u,c){c[0]&1&&k(n,u[0]),u[1]?i||(i=$c(),i.c(),i.m(l,null)):i&&(i.d(1),i=null)},d(u){u&&P(l),i&&i.d()}}}function $c(t){let l;return{c(){l=a("span"),l.textContent="Support JSON values and dynamic expressions",o(l,"class","label-text-alt text-xs")},m(e,n){j(e,l,n)},d(e){e&&P(l)}}}function ed(t){let l,e,n,r,i,u,c,f,d,p;function m(){t[20].call(e,t[36],t[33])}function g(){t[21].call(i,t[36],t[33])}function b(){return t[22](t[33])}return{c(){l=a("div"),e=a("input"),r=h(),i=a("input"),c=h(),f=a("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=t[8]("headers.name")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=t[8]("headers.value")),o(i,"class","input input-bordered input-sm flex-[2]"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(l,"class","flex gap-2")},m(v,w){j(v,l,w),s(l,e),Q(e,t[31].key),s(l,r),s(l,i),Q(i,t[31].value),s(l,c),s(l,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(v,w){t=v,w[0]&256&&n!==(n=t[8]("headers.name"))&&o(e,"placeholder",n),w[0]&8&&e.value!==t[31].key&&Q(e,t[31].key),w[0]&256&&u!==(u=t[8]("headers.value"))&&o(i,"placeholder",u),w[0]&8&&i.value!==t[31].value&&Q(i,t[31].value)},d(v){v&&P(l),d=!1,bt(p)}}}function Hg(t){let l,e=t[8]("body.empty")+"",n;return{c(){l=a("p"),n=_(e),o(l,"class","text-xs text-gray-500")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&256&&e!==(e=r[8]("body.empty")+"")&&k(n,e)},d(r){r&&P(l)}}}function Pg(t){let l,e=ut(t[4]),n=[];for(let r=0;r<e.length;r+=1)n[r]=td(Zc(t,e,r));return{c(){l=a("div");for(let r=0;r<n.length;r+=1)n[r].c();o(l,"class","flex flex-wrap gap-2 mt-2")},m(r,i){j(r,l,i);for(let u=0;u<n.length;u+=1)n[u]&&n[u].m(l,null)},p(r,i){if(i[0]&4112){e=ut(r[4]);let u;for(u=0;u<e.length;u+=1){const c=Zc(r,e,u);n[u]?n[u].p(c,i):(n[u]=td(c),n[u].c(),n[u].m(l,null))}for(;u<n.length;u+=1)n[u].d(1);n.length=e.length}},d(r){r&&P(l),Gt(n,r)}}}function td(t){let l,e=t[31]+"",n,r,i,u,c,f;function d(){return t[24](t[33])}return{c(){l=a("div"),n=_(e),r=h(),i=a("button"),i.textContent="\u2715",u=h(),o(i,"type","button"),o(i,"class","btn btn-ghost btn-xs btn-circle"),o(l,"class","badge badge-lg gap-2")},m(p,m){j(p,l,m),s(l,n),s(l,r),s(l,i),s(l,u),c||(f=V(i,"click",d),c=!0)},p(p,m){t=p,m[0]&16&&e!==(e=t[31]+"")&&k(n,e)},d(p){p&&P(l),c=!1,f()}}}function ld(t){let l,e,n,r,i,u,c,f,d,p;function m(){t[25].call(e,t[34],t[33])}function g(){t[26].call(i,t[34],t[33])}function b(){return t[27](t[33])}return{c(){l=a("div"),e=a("input"),r=h(),i=a("input"),c=h(),f=a("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=t[8]("headers.name")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=t[8]("headers.value")),o(i,"class","input input-bordered input-sm flex-[2]"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(l,"class","flex gap-2")},m(v,w){j(v,l,w),s(l,e),Q(e,t[31].key),s(l,r),s(l,i),Q(i,t[31].value),s(l,c),s(l,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(v,w){t=v,w[0]&256&&n!==(n=t[8]("headers.name"))&&o(e,"placeholder",n),w[0]&32&&e.value!==t[31].key&&Q(e,t[31].key),w[0]&256&&u!==(u=t[8]("headers.value"))&&o(i,"placeholder",u),w[0]&32&&i.value!==t[31].value&&Q(i,t[31].value)},d(v){v&&P(l),d=!1,bt(p)}}}function sd(t){let l,e,n,r,i,u,c,f,d,p;function m(){t[28].call(e,t[32],t[33])}function g(){t[29].call(i,t[32],t[33])}function b(){return t[30](t[33])}return{c(){l=a("div"),e=a("input"),r=h(),i=a("input"),c=h(),f=a("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=t[8]("headers.name")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=t[8]("headers.value")),o(i,"class","input input-bordered input-sm flex-[2]"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(l,"class","flex gap-2")},m(v,w){j(v,l,w),s(l,e),Q(e,t[31].key),s(l,r),s(l,i),Q(i,t[31].value),s(l,c),s(l,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(v,w){t=v,w[0]&256&&n!==(n=t[8]("headers.name"))&&o(e,"placeholder",n),w[0]&64&&e.value!==t[31].key&&Q(e,t[31].key),w[0]&256&&u!==(u=t[8]("headers.value"))&&o(i,"placeholder",u),w[0]&64&&i.value!==t[31].value&&Q(i,t[31].value)},d(v){v&&P(l),d=!1,bt(p)}}}function jg(t){let l,e,n,r,i,u,c,f=t[8]("body.add")+"",d,p,m=t[3].length+"",g,b,v,w,C,E,y=t[8]("body.add")+"",T,S,q,D,H,I,R=t[8]("body.remove")+"",L,A,N=t[4].length+"",Z,Y,x,F,K,M,B,U,O,J=t[8]("common.add")+"",ie,ue,ne,$,te,re,ee,G,pe=t[8]("body.replace")+"",oe,ge,he=t[5].length+"",ye,Fe,je,we,Oe,Je,Le=t[8]("body.add")+"",Pe,Me,fe,_e,Be,De,se=t[8]("body.default")+"",ke,me,Ee=t[6].length+"",Ve,Ie,nt,Ne,Ye,Qe,ve=t[8]("body.add")+"",de,Te,Ze,Se=t[2]&&xc(t),Ue=ut(t[3]),Ce=[];for(let z=0;z<Ue.length;z+=1)Ce[z]=ed(Xc(t,Ue,z));function mt(z,He){return z[4].length>0?Pg:Hg}let Ge=mt(t),ce=Ge(t),qe=ut(t[5]),Re=[];for(let z=0;z<qe.length;z+=1)Re[z]=ld(Yc(t,qe,z));let dt=ut(t[6]),We=[];for(let z=0;z<dt.length;z+=1)We[z]=sd(Qc(t,dt,z));return{c(){l=a("div"),Se&&Se.c(),e=h(),n=a("div"),r=a("div"),i=a("input"),u=h(),c=a("div"),d=_(f),p=_(" ("),g=_(m),b=_(")"),v=h(),w=a("div");for(let z=0;z<Ce.length;z+=1)Ce[z].c();C=h(),E=a("button"),T=_(y),S=h(),q=a("div"),D=a("input"),H=h(),I=a("div"),L=_(R),A=_(" ("),Z=_(N),Y=_(")"),x=h(),F=a("div"),K=a("div"),M=a("input"),U=h(),O=a("button"),ie=_(J),ne=h(),ce.c(),$=h(),te=a("div"),re=a("input"),ee=h(),G=a("div"),oe=_(pe),ge=_(" ("),ye=_(he),Fe=_(")"),je=h(),we=a("div");for(let z=0;z<Re.length;z+=1)Re[z].c();Oe=h(),Je=a("button"),Pe=_(Le),Me=h(),fe=a("div"),_e=a("input"),Be=h(),De=a("div"),ke=_(se),me=_(" ("),Ve=_(Ee),Ie=_(")"),nt=h(),Ne=a("div");for(let z=0;z<We.length;z+=1)We[z].c();Ye=h(),Qe=a("button"),de=_(ve),o(i,"type","checkbox"),i.checked=!0,o(c,"class","collapse-title text-sm font-medium"),o(E,"type","button"),o(E,"class","btn btn-sm btn-ghost"),o(w,"class","collapse-content space-y-2"),o(r,"class","collapse collapse-arrow bg-base-200"),o(D,"type","checkbox"),o(I,"class","collapse-title text-sm font-medium"),o(M,"type","text"),o(M,"placeholder",B=t[8]("headers.name")),o(M,"class","input input-bordered input-sm flex-1"),o(O,"type","button"),o(O,"class","btn btn-sm btn-primary"),O.disabled=ue=!t[7].trim(),o(K,"class","flex gap-2"),o(F,"class","collapse-content space-y-2"),o(q,"class","collapse collapse-arrow bg-base-200"),o(re,"type","checkbox"),o(G,"class","collapse-title text-sm font-medium"),o(Je,"type","button"),o(Je,"class","btn btn-sm btn-ghost"),o(we,"class","collapse-content space-y-2"),o(te,"class","collapse collapse-arrow bg-base-200"),o(_e,"type","checkbox"),o(De,"class","collapse-title text-sm font-medium"),o(Qe,"type","button"),o(Qe,"class","btn btn-sm btn-ghost"),o(Ne,"class","collapse-content space-y-2"),o(fe,"class","collapse collapse-arrow bg-base-200"),o(n,"class","space-y-4"),o(l,"class","form-control w-full")},m(z,He){j(z,l,He),Se&&Se.m(l,null),s(l,e),s(l,n),s(n,r),s(r,i),s(r,u),s(r,c),s(c,d),s(c,p),s(c,g),s(c,b),s(r,v),s(r,w);for(let X=0;X<Ce.length;X+=1)Ce[X]&&Ce[X].m(w,null);s(w,C),s(w,E),s(E,T),s(n,S),s(n,q),s(q,D),s(q,H),s(q,I),s(I,L),s(I,A),s(I,Z),s(I,Y),s(q,x),s(q,F),s(F,K),s(K,M),Q(M,t[7]),s(K,U),s(K,O),s(O,ie),s(F,ne),ce.m(F,null),s(n,$),s(n,te),s(te,re),s(te,ee),s(te,G),s(G,oe),s(G,ge),s(G,ye),s(G,Fe),s(te,je),s(te,we);for(let X=0;X<Re.length;X+=1)Re[X]&&Re[X].m(we,null);s(we,Oe),s(we,Je),s(Je,Pe),s(n,Me),s(n,fe),s(fe,_e),s(fe,Be),s(fe,De),s(De,ke),s(De,me),s(De,Ve),s(De,Ie),s(fe,nt),s(fe,Ne);for(let X=0;X<We.length;X+=1)We[X]&&We[X].m(Ne,null);s(Ne,Ye),s(Ne,Qe),s(Qe,de),Te||(Ze=[V(E,"click",t[9]),V(M,"input",t[23]),V(M,"keydown",t[13]),V(O,"click",t[11]),V(Je,"click",t[14]),V(Qe,"click",t[16])],Te=!0)},p(z,He){if(z[2]?Se?Se.p(z,He):(Se=xc(z),Se.c(),Se.m(l,e)):Se&&(Se.d(1),Se=null),He[0]&256&&f!==(f=z[8]("body.add")+"")&&k(d,f),He[0]&8&&m!==(m=z[3].length+"")&&k(g,m),He[0]&1288){Ue=ut(z[3]);let X;for(X=0;X<Ue.length;X+=1){const ft=Xc(z,Ue,X);Ce[X]?Ce[X].p(ft,He):(Ce[X]=ed(ft),Ce[X].c(),Ce[X].m(w,C))}for(;X<Ce.length;X+=1)Ce[X].d(1);Ce.length=Ue.length}if(He[0]&256&&y!==(y=z[8]("body.add")+"")&&k(T,y),He[0]&256&&R!==(R=z[8]("body.remove")+"")&&k(L,R),He[0]&16&&N!==(N=z[4].length+"")&&k(Z,N),He[0]&256&&B!==(B=z[8]("headers.name"))&&o(M,"placeholder",B),He[0]&128&&M.value!==z[7]&&Q(M,z[7]),He[0]&256&&J!==(J=z[8]("common.add")+"")&&k(ie,J),He[0]&128&&ue!==(ue=!z[7].trim())&&(O.disabled=ue),Ge===(Ge=mt(z))&&ce?ce.p(z,He):(ce.d(1),ce=Ge(z),ce&&(ce.c(),ce.m(F,null))),He[0]&256&&pe!==(pe=z[8]("body.replace")+"")&&k(oe,pe),He[0]&32&&he!==(he=z[5].length+"")&&k(ye,he),He[0]&33056){qe=ut(z[5]);let X;for(X=0;X<qe.length;X+=1){const ft=Yc(z,qe,X);Re[X]?Re[X].p(ft,He):(Re[X]=ld(ft),Re[X].c(),Re[X].m(we,Oe))}for(;X<Re.length;X+=1)Re[X].d(1);Re.length=qe.length}if(He[0]&256&&Le!==(Le=z[8]("body.add")+"")&&k(Pe,Le),He[0]&256&&se!==(se=z[8]("body.default")+"")&&k(ke,se),He[0]&64&&Ee!==(Ee=z[6].length+"")&&k(Ve,Ee),He[0]&131392){dt=ut(z[6]);let X;for(X=0;X<dt.length;X+=1){const ft=Qc(z,dt,X);We[X]?We[X].p(ft,He):(We[X]=sd(ft),We[X].c(),We[X].m(Ne,Ye))}for(;X<We.length;X+=1)We[X].d(1);We.length=dt.length}He[0]&256&&ve!==(ve=z[8]("body.add")+"")&&k(de,ve)},i:tt,o:tt,d(z){z&&P(l),Se&&Se.d(),Gt(Ce,z),ce.d(),Gt(Re,z),Gt(We,z),Te=!1,bt(Ze)}}}function Lg(t,l,e){let n;Dt(t,Rt,M=>e(8,n=M));let{value:r={}}=l,{label:i="Body"}=l,{showHelp:u=!0}=l,{showLabel:c=!0}=l,f=[],d=[],p="",m=[],g=[],b=!1;function v(){e(3,f=[...f,{key:"",value:""}]),e(19,b=!0)}function w(M){e(3,f=f.filter((B,U)=>U!==M))}function C(){const M=p.trim();M&&!d.includes(M)&&(e(4,d=[...d,M]),e(7,p=""),e(19,b=!0))}function E(M){e(4,d=d.filter((B,U)=>U!==M))}function y(M){M.key==="Enter"&&(M.preventDefault(),C())}function T(){e(5,m=[...m,{key:"",value:""}]),e(19,b=!0)}function S(M){e(5,m=m.filter((B,U)=>U!==M))}function q(){e(6,g=[...g,{key:"",value:""}]),e(19,b=!0)}function D(M){e(6,g=g.filter((B,U)=>U!==M))}function H(M,B){M[B].key=this.value,e(3,f),e(19,b),e(18,r),e(4,d),e(5,m),e(6,g)}function I(M,B){M[B].value=this.value,e(3,f),e(19,b),e(18,r),e(4,d),e(5,m),e(6,g)}const R=M=>w(M);function L(){p=this.value,e(7,p)}const A=M=>E(M);function N(M,B){M[B].key=this.value,e(5,m),e(19,b),e(18,r),e(3,f),e(4,d),e(6,g)}function Z(M,B){M[B].value=this.value,e(5,m),e(19,b),e(18,r),e(3,f),e(4,d),e(6,g)}const Y=M=>S(M);function x(M,B){M[B].key=this.value,e(6,g),e(19,b),e(18,r),e(3,f),e(4,d),e(5,m)}function F(M,B){M[B].value=this.value,e(6,g),e(19,b),e(18,r),e(3,f),e(4,d),e(5,m)}const K=M=>D(M);return t.$$set=M=>{"value"in M&&e(18,r=M.value),"label"in M&&e(0,i=M.label),"showHelp"in M&&e(1,u=M.showHelp),"showLabel"in M&&e(2,c=M.showLabel)},t.$$.update=()=>{if(t.$$.dirty[0]&786552){!b&&(r.add||r.remove||r.replace||r.default)&&(e(3,f=Object.entries(r.add||{}).map(([O,J])=>({key:O,value:typeof J=="string"?J:JSON.stringify(J)}))),e(4,d=[...r.remove||[]]),e(5,m=Object.entries(r.replace||{}).map(([O,J])=>({key:O,value:typeof J=="string"?J:JSON.stringify(J)}))),e(6,g=Object.entries(r.default||{}).map(([O,J])=>({key:O,value:typeof J=="string"?J:JSON.stringify(J)}))),e(19,b=!0));const M={};f.filter(O=>O.key.trim()).forEach(O=>{try{M[O.key]=JSON.parse(O.value)}catch{M[O.key]=O.value}}),e(18,r.add=Object.keys(M).length>0?M:void 0,r),e(18,r.remove=d.length>0?d:void 0,r);const B={};m.filter(O=>O.key.trim()).forEach(O=>{try{B[O.key]=JSON.parse(O.value)}catch{B[O.key]=O.value}}),e(18,r.replace=Object.keys(B).length>0?B:void 0,r);const U={};g.filter(O=>O.key.trim()).forEach(O=>{try{U[O.key]=JSON.parse(O.value)}catch{U[O.key]=O.value}}),e(18,r.default=Object.keys(U).length>0?U:void 0,r)}},[i,u,c,f,d,m,g,p,n,v,w,C,E,y,T,S,q,D,r,b,H,I,R,L,A,N,Z,Y,x,F,K]}class l2 extends Vt{constructor(l){super(),Ut(this,l,Lg,jg,At,{value:18,label:0,showHelp:1,showLabel:2},null,[-1,-1])}}function od(t,l,e){const n=t.slice();return n[31]=l[e],n[32]=l,n[33]=e,n}function nd(t,l,e){const n=t.slice();return n[31]=l[e],n[34]=l,n[33]=e,n}function rd(t,l,e){const n=t.slice();return n[31]=l[e],n[33]=e,n}function ad(t,l,e){const n=t.slice();return n[31]=l[e],n[36]=l,n[33]=e,n}function id(t){let l,e,n,r,i=t[1]&&ud();return{c(){l=a("div"),e=a("span"),n=_(t[0]),r=h(),i&&i.c(),o(e,"class","label-text font-semibold"),o(l,"class","label")},m(u,c){j(u,l,c),s(l,e),s(e,n),s(l,r),i&&i.m(l,null)},p(u,c){c[0]&1&&k(n,u[0]),u[1]?i||(i=ud(),i.c(),i.m(l,null)):i&&(i.d(1),i=null)},d(u){u&&P(l),i&&i.d()}}}function ud(t){let l,e,n;return{c(){l=a("span"),e=_("Support dynamic expressions: "),n=a("code"),n.textContent="{{ expression }}",o(n,"class","text-xs"),o(l,"class","label-text-alt text-xs")},m(r,i){j(r,l,i),s(l,e),s(l,n)},d(r){r&&P(l)}}}function fd(t){let l,e,n,r,i,u,c,f,d,p;function m(){t[20].call(e,t[36],t[33])}function g(){t[21].call(i,t[36],t[33])}function b(){return t[22](t[33])}return{c(){l=a("div"),e=a("input"),r=h(),i=a("input"),c=h(),f=a("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=t[8]("query.namePlaceholder")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=t[8]("query.valuePlaceholder")),o(i,"class","input input-bordered input-sm flex-1"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(l,"class","flex gap-2")},m(v,w){j(v,l,w),s(l,e),Q(e,t[31].key),s(l,r),s(l,i),Q(i,t[31].value),s(l,c),s(l,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(v,w){t=v,w[0]&256&&n!==(n=t[8]("query.namePlaceholder"))&&o(e,"placeholder",n),w[0]&8&&e.value!==t[31].key&&Q(e,t[31].key),w[0]&256&&u!==(u=t[8]("query.valuePlaceholder"))&&o(i,"placeholder",u),w[0]&8&&i.value!==t[31].value&&Q(i,t[31].value)},d(v){v&&P(l),d=!1,bt(p)}}}function Dg(t){let l,e=t[8]("query.empty")+"",n;return{c(){l=a("p"),n=_(e),o(l,"class","text-xs text-gray-500")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&256&&e!==(e=r[8]("query.empty")+"")&&k(n,e)},d(r){r&&P(l)}}}function Ig(t){let l,e=ut(t[4]),n=[];for(let r=0;r<e.length;r+=1)n[r]=cd(rd(t,e,r));return{c(){l=a("div");for(let r=0;r<n.length;r+=1)n[r].c();o(l,"class","flex flex-wrap gap-2 mt-2")},m(r,i){j(r,l,i);for(let u=0;u<n.length;u+=1)n[u]&&n[u].m(l,null)},p(r,i){if(i[0]&4112){e=ut(r[4]);let u;for(u=0;u<e.length;u+=1){const c=rd(r,e,u);n[u]?n[u].p(c,i):(n[u]=cd(c),n[u].c(),n[u].m(l,null))}for(;u<n.length;u+=1)n[u].d(1);n.length=e.length}},d(r){r&&P(l),Gt(n,r)}}}function cd(t){let l,e=t[31]+"",n,r,i,u,c,f;function d(){return t[24](t[33])}return{c(){l=a("div"),n=_(e),r=h(),i=a("button"),i.textContent="\u2715",u=h(),o(i,"type","button"),o(i,"class","btn btn-ghost btn-xs btn-circle"),o(l,"class","badge badge-lg gap-2")},m(p,m){j(p,l,m),s(l,n),s(l,r),s(l,i),s(l,u),c||(f=V(i,"click",d),c=!0)},p(p,m){t=p,m[0]&16&&e!==(e=t[31]+"")&&k(n,e)},d(p){p&&P(l),c=!1,f()}}}function dd(t){let l,e,n,r,i,u,c,f,d,p;function m(){t[25].call(e,t[34],t[33])}function g(){t[26].call(i,t[34],t[33])}function b(){return t[27](t[33])}return{c(){l=a("div"),e=a("input"),r=h(),i=a("input"),c=h(),f=a("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=t[8]("query.namePlaceholder")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=t[8]("query.valuePlaceholder")),o(i,"class","input input-bordered input-sm flex-1"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(l,"class","flex gap-2")},m(v,w){j(v,l,w),s(l,e),Q(e,t[31].key),s(l,r),s(l,i),Q(i,t[31].value),s(l,c),s(l,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(v,w){t=v,w[0]&256&&n!==(n=t[8]("query.namePlaceholder"))&&o(e,"placeholder",n),w[0]&32&&e.value!==t[31].key&&Q(e,t[31].key),w[0]&256&&u!==(u=t[8]("query.valuePlaceholder"))&&o(i,"placeholder",u),w[0]&32&&i.value!==t[31].value&&Q(i,t[31].value)},d(v){v&&P(l),d=!1,bt(p)}}}function pd(t){let l,e,n,r,i,u,c,f,d,p;function m(){t[28].call(e,t[32],t[33])}function g(){t[29].call(i,t[32],t[33])}function b(){return t[30](t[33])}return{c(){l=a("div"),e=a("input"),r=h(),i=a("input"),c=h(),f=a("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=t[8]("query.namePlaceholder")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=t[8]("query.valuePlaceholder")),o(i,"class","input input-bordered input-sm flex-1"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(l,"class","flex gap-2")},m(v,w){j(v,l,w),s(l,e),Q(e,t[31].key),s(l,r),s(l,i),Q(i,t[31].value),s(l,c),s(l,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(v,w){t=v,w[0]&256&&n!==(n=t[8]("query.namePlaceholder"))&&o(e,"placeholder",n),w[0]&64&&e.value!==t[31].key&&Q(e,t[31].key),w[0]&256&&u!==(u=t[8]("query.valuePlaceholder"))&&o(i,"placeholder",u),w[0]&64&&i.value!==t[31].value&&Q(i,t[31].value)},d(v){v&&P(l),d=!1,bt(p)}}}function Bg(t){let l,e,n,r,i,u,c,f=t[8]("query.add")+"",d,p,m=t[3].length+"",g,b,v,w,C,E,y=t[8]("query.add")+"",T,S,q,D,H,I,R=t[8]("query.remove")+"",L,A,N=t[4].length+"",Z,Y,x,F,K,M,B,U,O,J=t[8]("common.add")+"",ie,ue,ne,$,te,re,ee,G,pe=t[8]("query.replace")+"",oe,ge,he=t[5].length+"",ye,Fe,je,we,Oe,Je,Le=t[8]("query.add")+"",Pe,Me,fe,_e,Be,De,se=t[8]("query.default")+"",ke,me,Ee=t[6].length+"",Ve,Ie,nt,Ne,Ye,Qe,ve=t[8]("query.add")+"",de,Te,Ze,Se=t[2]&&id(t),Ue=ut(t[3]),Ce=[];for(let z=0;z<Ue.length;z+=1)Ce[z]=fd(ad(t,Ue,z));function mt(z,He){return z[4].length>0?Ig:Dg}let Ge=mt(t),ce=Ge(t),qe=ut(t[5]),Re=[];for(let z=0;z<qe.length;z+=1)Re[z]=dd(nd(t,qe,z));let dt=ut(t[6]),We=[];for(let z=0;z<dt.length;z+=1)We[z]=pd(od(t,dt,z));return{c(){l=a("div"),Se&&Se.c(),e=h(),n=a("div"),r=a("div"),i=a("input"),u=h(),c=a("div"),d=_(f),p=_(" ("),g=_(m),b=_(")"),v=h(),w=a("div");for(let z=0;z<Ce.length;z+=1)Ce[z].c();C=h(),E=a("button"),T=_(y),S=h(),q=a("div"),D=a("input"),H=h(),I=a("div"),L=_(R),A=_(" ("),Z=_(N),Y=_(")"),x=h(),F=a("div"),K=a("div"),M=a("input"),U=h(),O=a("button"),ie=_(J),ne=h(),ce.c(),$=h(),te=a("div"),re=a("input"),ee=h(),G=a("div"),oe=_(pe),ge=_(" ("),ye=_(he),Fe=_(")"),je=h(),we=a("div");for(let z=0;z<Re.length;z+=1)Re[z].c();Oe=h(),Je=a("button"),Pe=_(Le),Me=h(),fe=a("div"),_e=a("input"),Be=h(),De=a("div"),ke=_(se),me=_(" ("),Ve=_(Ee),Ie=_(")"),nt=h(),Ne=a("div");for(let z=0;z<We.length;z+=1)We[z].c();Ye=h(),Qe=a("button"),de=_(ve),o(i,"type","checkbox"),i.checked=!0,o(c,"class","collapse-title text-sm font-medium"),o(E,"type","button"),o(E,"class","btn btn-sm btn-ghost"),o(w,"class","collapse-content space-y-2"),o(r,"class","collapse collapse-arrow bg-base-200"),o(D,"type","checkbox"),o(I,"class","collapse-title text-sm font-medium"),o(M,"type","text"),o(M,"placeholder",B=t[8]("query.namePlaceholder")),o(M,"class","input input-bordered input-sm flex-1"),o(O,"type","button"),o(O,"class","btn btn-sm btn-primary"),O.disabled=ue=!t[7].trim(),o(K,"class","flex gap-2"),o(F,"class","collapse-content space-y-2"),o(q,"class","collapse collapse-arrow bg-base-200"),o(re,"type","checkbox"),o(G,"class","collapse-title text-sm font-medium"),o(Je,"type","button"),o(Je,"class","btn btn-sm btn-ghost"),o(we,"class","collapse-content space-y-2"),o(te,"class","collapse collapse-arrow bg-base-200"),o(_e,"type","checkbox"),o(De,"class","collapse-title text-sm font-medium"),o(Qe,"type","button"),o(Qe,"class","btn btn-sm btn-ghost"),o(Ne,"class","collapse-content space-y-2"),o(fe,"class","collapse collapse-arrow bg-base-200"),o(n,"class","space-y-4"),o(l,"class","form-control w-full")},m(z,He){j(z,l,He),Se&&Se.m(l,null),s(l,e),s(l,n),s(n,r),s(r,i),s(r,u),s(r,c),s(c,d),s(c,p),s(c,g),s(c,b),s(r,v),s(r,w);for(let X=0;X<Ce.length;X+=1)Ce[X]&&Ce[X].m(w,null);s(w,C),s(w,E),s(E,T),s(n,S),s(n,q),s(q,D),s(q,H),s(q,I),s(I,L),s(I,A),s(I,Z),s(I,Y),s(q,x),s(q,F),s(F,K),s(K,M),Q(M,t[7]),s(K,U),s(K,O),s(O,ie),s(F,ne),ce.m(F,null),s(n,$),s(n,te),s(te,re),s(te,ee),s(te,G),s(G,oe),s(G,ge),s(G,ye),s(G,Fe),s(te,je),s(te,we);for(let X=0;X<Re.length;X+=1)Re[X]&&Re[X].m(we,null);s(we,Oe),s(we,Je),s(Je,Pe),s(n,Me),s(n,fe),s(fe,_e),s(fe,Be),s(fe,De),s(De,ke),s(De,me),s(De,Ve),s(De,Ie),s(fe,nt),s(fe,Ne);for(let X=0;X<We.length;X+=1)We[X]&&We[X].m(Ne,null);s(Ne,Ye),s(Ne,Qe),s(Qe,de),Te||(Ze=[V(E,"click",t[9]),V(M,"input",t[23]),V(M,"keydown",t[13]),V(O,"click",t[11]),V(Je,"click",t[14]),V(Qe,"click",t[16])],Te=!0)},p(z,He){if(z[2]?Se?Se.p(z,He):(Se=id(z),Se.c(),Se.m(l,e)):Se&&(Se.d(1),Se=null),He[0]&256&&f!==(f=z[8]("query.add")+"")&&k(d,f),He[0]&8&&m!==(m=z[3].length+"")&&k(g,m),He[0]&1288){Ue=ut(z[3]);let X;for(X=0;X<Ue.length;X+=1){const ft=ad(z,Ue,X);Ce[X]?Ce[X].p(ft,He):(Ce[X]=fd(ft),Ce[X].c(),Ce[X].m(w,C))}for(;X<Ce.length;X+=1)Ce[X].d(1);Ce.length=Ue.length}if(He[0]&256&&y!==(y=z[8]("query.add")+"")&&k(T,y),He[0]&256&&R!==(R=z[8]("query.remove")+"")&&k(L,R),He[0]&16&&N!==(N=z[4].length+"")&&k(Z,N),He[0]&256&&B!==(B=z[8]("query.namePlaceholder"))&&o(M,"placeholder",B),He[0]&128&&M.value!==z[7]&&Q(M,z[7]),He[0]&256&&J!==(J=z[8]("common.add")+"")&&k(ie,J),He[0]&128&&ue!==(ue=!z[7].trim())&&(O.disabled=ue),Ge===(Ge=mt(z))&&ce?ce.p(z,He):(ce.d(1),ce=Ge(z),ce&&(ce.c(),ce.m(F,null))),He[0]&256&&pe!==(pe=z[8]("query.replace")+"")&&k(oe,pe),He[0]&32&&he!==(he=z[5].length+"")&&k(ye,he),He[0]&33056){qe=ut(z[5]);let X;for(X=0;X<qe.length;X+=1){const ft=nd(z,qe,X);Re[X]?Re[X].p(ft,He):(Re[X]=dd(ft),Re[X].c(),Re[X].m(we,Oe))}for(;X<Re.length;X+=1)Re[X].d(1);Re.length=qe.length}if(He[0]&256&&Le!==(Le=z[8]("query.add")+"")&&k(Pe,Le),He[0]&256&&se!==(se=z[8]("query.default")+"")&&k(ke,se),He[0]&64&&Ee!==(Ee=z[6].length+"")&&k(Ve,Ee),He[0]&131392){dt=ut(z[6]);let X;for(X=0;X<dt.length;X+=1){const ft=od(z,dt,X);We[X]?We[X].p(ft,He):(We[X]=pd(ft),We[X].c(),We[X].m(Ne,Ye))}for(;X<We.length;X+=1)We[X].d(1);We.length=dt.length}He[0]&256&&ve!==(ve=z[8]("query.add")+"")&&k(de,ve)},i:tt,o:tt,d(z){z&&P(l),Se&&Se.d(),Gt(Ce,z),ce.d(),Gt(Re,z),Gt(We,z),Te=!1,bt(Ze)}}}function Ag(t,l,e){let n;Dt(t,Rt,M=>e(8,n=M));let{value:r={}}=l,{label:i="Query Parameters"}=l,{showHelp:u=!0}=l,{showLabel:c=!0}=l,f=[],d=[],p="",m=[],g=[],b=!1;function v(){e(3,f=[...f,{key:"",value:""}]),e(19,b=!0)}function w(M){e(3,f=f.filter((B,U)=>U!==M))}function C(){const M=p.trim();M&&!d.includes(M)&&(e(4,d=[...d,M]),e(7,p=""),e(19,b=!0))}function E(M){e(4,d=d.filter((B,U)=>U!==M))}function y(M){M.key==="Enter"&&(M.preventDefault(),C())}function T(){e(5,m=[...m,{key:"",value:""}]),e(19,b=!0)}function S(M){e(5,m=m.filter((B,U)=>U!==M))}function q(){e(6,g=[...g,{key:"",value:""}]),e(19,b=!0)}function D(M){e(6,g=g.filter((B,U)=>U!==M))}function H(M,B){M[B].key=this.value,e(3,f),e(19,b),e(18,r),e(4,d),e(5,m),e(6,g)}function I(M,B){M[B].value=this.value,e(3,f),e(19,b),e(18,r),e(4,d),e(5,m),e(6,g)}const R=M=>w(M);function L(){p=this.value,e(7,p)}const A=M=>E(M);function N(M,B){M[B].key=this.value,e(5,m),e(19,b),e(18,r),e(3,f),e(4,d),e(6,g)}function Z(M,B){M[B].value=this.value,e(5,m),e(19,b),e(18,r),e(3,f),e(4,d),e(6,g)}const Y=M=>S(M);function x(M,B){M[B].key=this.value,e(6,g),e(19,b),e(18,r),e(3,f),e(4,d),e(5,m)}function F(M,B){M[B].value=this.value,e(6,g),e(19,b),e(18,r),e(3,f),e(4,d),e(5,m)}const K=M=>D(M);return t.$$set=M=>{"value"in M&&e(18,r=M.value),"label"in M&&e(0,i=M.label),"showHelp"in M&&e(1,u=M.showHelp),"showLabel"in M&&e(2,c=M.showLabel)},t.$$.update=()=>{if(t.$$.dirty[0]&786552){!b&&(r.add||r.remove||r.replace||r.default)&&(e(3,f=Object.entries(r.add||{}).map(([O,J])=>({key:O,value:String(J)}))),e(4,d=[...r.remove||[]]),e(5,m=Object.entries(r.replace||{}).map(([O,J])=>({key:O,value:String(J)}))),e(6,g=Object.entries(r.default||{}).map(([O,J])=>({key:O,value:String(J)}))),e(19,b=!0));const M={};f.filter(O=>O.key.trim()).forEach(O=>{M[O.key]=O.value}),e(18,r.add=Object.keys(M).length>0?M:void 0,r),e(18,r.remove=d.length>0?d:void 0,r);const B={};m.filter(O=>O.key.trim()).forEach(O=>{B[O.key]=O.value}),e(18,r.replace=Object.keys(B).length>0?B:void 0,r);const U={};g.filter(O=>O.key.trim()).forEach(O=>{U[O.key]=O.value}),e(18,r.default=Object.keys(U).length>0?U:void 0,r)}},[i,u,c,f,d,m,g,p,n,v,w,C,E,y,T,S,q,D,r,b,H,I,R,L,A,N,Z,Y,x,F,K]}class s2 extends Vt{constructor(l){super(),Ut(this,l,Ag,Bg,At,{value:18,label:0,showHelp:1,showLabel:2},null,[-1,-1])}}function hd(t){let l,e,n=t[7]("upstream.title",{values:{index:t[1]+1}})+"",r,i,u,c,f,d,p,m,g,b,v,w,C;return{c(){l=a("div"),e=a("h3"),r=_(n),i=h(),u=a("div"),c=a("button"),f=ae("svg"),d=ae("path"),m=h(),g=a("button"),b=_("\u2715"),o(e,"class","font-semibold"),o(d,"stroke-linecap","round"),o(d,"stroke-linejoin","round"),o(d,"stroke-width","2"),o(d,"d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"),o(f,"xmlns","http://www.w3.org/2000/svg"),o(f,"class","h-4 w-4"),o(f,"fill","none"),o(f,"viewBox","0 0 24 24"),o(f,"stroke","currentColor"),o(c,"type","button"),o(c,"class","btn btn-sm btn-outline btn-square"),o(c,"title",p=t[7]("routeCard.duplicate")),o(g,"type","button"),o(g,"class","btn btn-sm btn-error btn-square"),o(g,"title",v=t[7]("upstream.remove")),o(u,"class","flex gap-2"),o(l,"class","flex justify-between items-center mb-4")},m(E,y){j(E,l,y),s(l,e),s(e,r),s(l,i),s(l,u),s(u,c),s(c,f),s(f,d),s(u,m),s(u,g),s(g,b),w||(C=[V(c,"click",function(){ko(t[3])&&t[3].apply(this,arguments)}),V(g,"click",function(){ko(t[2])&&t[2].apply(this,arguments)})],w=!0)},p(E,y){t=E,y&130&&n!==(n=t[7]("upstream.title",{values:{index:t[1]+1}})+"")&&k(r,n),y&128&&p!==(p=t[7]("routeCard.duplicate"))&&o(c,"title",p),y&128&&v!==(v=t[7]("upstream.remove"))&&o(g,"title",v)},d(E){E&&P(l),w=!1,bt(C)}}}function md(t){let l,e,n=t[6].find(bd)?.message+"",r,i;return{c(){l=a("label"),e=a("span"),r=_(n),o(e,"class","label-text-alt text-error"),o(l,"class","label"),o(l,"for",i="upstream-target-"+t[1])},m(u,c){j(u,l,c),s(l,e),s(e,r)},p(u,c){c&64&&n!==(n=u[6].find(bd)?.message+"")&&k(r,n),c&2&&i!==(i="upstream-target-"+u[1])&&o(l,"for",i)},d(u){u&&P(l)}}}function Og(t){let l,e,n,r,i,u,c,f=t[7]("upstream.targetUrl")+"",d,p,m,g,b,v,w,C,E,y=t[6].some(gd),T,S,q,D,H,I=t[7]("upstream.weight")+"",R,L,A,N=t[7]("upstream.weightHelp")+"",Z,Y,x,F,K,M,B,U,O,J,ie,ue,ne,$,te,re,ee,G,pe,oe,ge=t[7]("upstream.transformerHelp")+"",he,ye,Fe,je,we,Oe,Je=t[7]("headers.title")+"",Le,Pe,Me,fe,_e,Be,De,se,ke,me,Ee=t[7]("body.title")+"",Ve,Ie,nt,Ne,Ye,Qe,ve,de,Te,Ze,Se=t[7]("query.title")+"",Ue,Ce,mt,Ge,ce,qe,Re,dt,We=t[4]&&hd(t),z=y&&md(t);function He(ze){t[11](ze)}let X={label:t[7]("upstream.transformer")};t[5]!==void 0&&(X.plugin=t[5]),ee=new e2({props:X}),bl.push(()=>Rl(ee,"plugin",He));function ft(ze){t[12](ze)}let Ht={label:t[7]("headers.title"),showHelp:!1,showLabel:!1};t[0].headers!==void 0&&(Ht.value=t[0].headers),fe=new t2({props:Ht}),bl.push(()=>Rl(fe,"value",ft));function Ke(ze){t[13](ze)}let _t={label:t[7]("body.title"),showHelp:!1,showLabel:!1};t[0].body!==void 0&&(_t.value=t[0].body),Ne=new l2({props:_t}),bl.push(()=>Rl(Ne,"value",Ke));function lt(ze){t[14](ze)}let it={label:t[7]("query.title"),showHelp:!1,showLabel:!1};return t[0].query!==void 0&&(it.value=t[0].query),Ge=new s2({props:it}),bl.push(()=>Rl(Ge,"value",lt)),{c(){l=a("div"),e=a("div"),We&&We.c(),n=h(),r=a("div"),i=a("div"),u=a("label"),c=a("span"),d=_(f),p=h(),m=a("span"),m.textContent="*",b=h(),v=a("input"),E=h(),z&&z.c(),T=h(),S=a("div"),q=a("div"),D=a("label"),H=a("span"),R=_(I),L=h(),A=a("span"),Z=_(N),x=h(),F=a("input"),M=h(),B=a("div"),U=a("label"),O=a("span"),O.textContent="Priority",J=h(),ie=a("span"),ie.textContent="Failover order",ne=h(),$=a("input"),re=h(),Et(ee.$$.fragment),pe=h(),oe=a("div"),he=_(ge),ye=h(),Fe=a("div"),je=a("input"),we=h(),Oe=a("div"),Le=_(Je),Pe=h(),Me=a("div"),Et(fe.$$.fragment),Be=h(),De=a("div"),se=a("input"),ke=h(),me=a("div"),Ve=_(Ee),Ie=h(),nt=a("div"),Et(Ne.$$.fragment),Qe=h(),ve=a("div"),de=a("input"),Te=h(),Ze=a("div"),Ue=_(Se),Ce=h(),mt=a("div"),Et(Ge.$$.fragment),o(m,"class","text-error"),o(c,"class","label-text font-semibold"),o(u,"class","label"),o(u,"for",g="upstream-target-"+t[1]),o(v,"id",w="upstream-target-"+t[1]),o(v,"type","url"),o(v,"placeholder",C=t[7]("upstream.targetPlaceholder")),o(v,"class","input input-bordered"),v.required=!0,le(v,"input-error",t[6].some(_d)),o(i,"class","form-control"),o(H,"class","label-text"),o(A,"class","label-text-alt text-xs"),o(D,"class","label"),o(D,"for",Y="upstream-weight-"+t[1]),o(F,"id",K="upstream-weight-"+t[1]),o(F,"type","number"),o(F,"placeholder","100"),o(F,"class","input input-bordered"),o(F,"min","1"),o(q,"class","form-control"),o(O,"class","label-text"),o(ie,"class","label-text-alt text-xs"),o(U,"class","label"),o(U,"for",ue="upstream-priority-"+t[1]),o($,"id",te="upstream-priority-"+t[1]),o($,"type","number"),o($,"placeholder","1"),o($,"class","input input-bordered"),o($,"min","0"),o(B,"class","form-control"),o(S,"class","grid grid-cols-2 gap-4"),o(oe,"class","divider text-sm font-semibold"),o(je,"type","checkbox"),o(Oe,"class","collapse-title text-sm font-medium"),o(Me,"class","collapse-content"),o(Fe,"class","collapse collapse-arrow bg-base-200"),o(se,"type","checkbox"),o(me,"class","collapse-title text-sm font-medium"),o(nt,"class","collapse-content"),o(De,"class","collapse collapse-arrow bg-base-200"),o(de,"type","checkbox"),o(Ze,"class","collapse-title text-sm font-medium"),o(mt,"class","collapse-content"),o(ve,"class","collapse collapse-arrow bg-base-200"),o(r,"class","grid grid-cols-1 gap-4"),o(e,"class","card-body p-4"),o(l,"class","card bg-base-100 shadow-sm border border-base-300")},m(ze,Xe){j(ze,l,Xe),s(l,e),We&&We.m(e,null),s(e,n),s(e,r),s(r,i),s(i,u),s(u,c),s(c,d),s(c,p),s(c,m),s(i,b),s(i,v),Q(v,t[0].target),s(i,E),z&&z.m(i,null),s(r,T),s(r,S),s(S,q),s(q,D),s(D,H),s(H,R),s(D,L),s(D,A),s(A,Z),s(q,x),s(q,F),Q(F,t[0].weight),s(S,M),s(S,B),s(B,U),s(U,O),s(U,J),s(U,ie),s(B,ne),s(B,$),Q($,t[0].priority),s(r,re),yt(ee,r,null),s(r,pe),s(r,oe),s(oe,he),s(r,ye),s(r,Fe),s(Fe,je),s(Fe,we),s(Fe,Oe),s(Oe,Le),s(Fe,Pe),s(Fe,Me),yt(fe,Me,null),s(r,Be),s(r,De),s(De,se),s(De,ke),s(De,me),s(me,Ve),s(De,Ie),s(De,nt),yt(Ne,nt,null),s(r,Qe),s(r,ve),s(ve,de),s(ve,Te),s(ve,Ze),s(Ze,Ue),s(ve,Ce),s(ve,mt),yt(Ge,mt,null),qe=!0,Re||(dt=[V(v,"input",t[8]),V(F,"input",t[9]),V($,"input",t[10])],Re=!0)},p(ze,[Xe]){ze[4]?We?We.p(ze,Xe):(We=hd(ze),We.c(),We.m(e,n)):We&&(We.d(1),We=null),(!qe||Xe&128)&&f!==(f=ze[7]("upstream.targetUrl")+"")&&k(d,f),(!qe||Xe&2&&g!==(g="upstream-target-"+ze[1]))&&o(u,"for",g),(!qe||Xe&2&&w!==(w="upstream-target-"+ze[1]))&&o(v,"id",w),(!qe||Xe&128&&C!==(C=ze[7]("upstream.targetPlaceholder")))&&o(v,"placeholder",C),Xe&1&&v.value!==ze[0].target&&Q(v,ze[0].target),(!qe||Xe&64)&&le(v,"input-error",ze[6].some(_d)),Xe&64&&(y=ze[6].some(gd)),y?z?z.p(ze,Xe):(z=md(ze),z.c(),z.m(i,null)):z&&(z.d(1),z=null),(!qe||Xe&128)&&I!==(I=ze[7]("upstream.weight")+"")&&k(R,I),(!qe||Xe&128)&&N!==(N=ze[7]("upstream.weightHelp")+"")&&k(Z,N),(!qe||Xe&2&&Y!==(Y="upstream-weight-"+ze[1]))&&o(D,"for",Y),(!qe||Xe&2&&K!==(K="upstream-weight-"+ze[1]))&&o(F,"id",K),Xe&1&&St(F.value)!==ze[0].weight&&Q(F,ze[0].weight),(!qe||Xe&2&&ue!==(ue="upstream-priority-"+ze[1]))&&o(U,"for",ue),(!qe||Xe&2&&te!==(te="upstream-priority-"+ze[1]))&&o($,"id",te),Xe&1&&St($.value)!==ze[0].priority&&Q($,ze[0].priority);const Bt={};Xe&128&&(Bt.label=ze[7]("upstream.transformer")),!G&&Xe&32&&(G=!0,Bt.plugin=ze[5],Sl(()=>G=!1)),ee.$set(Bt),(!qe||Xe&128)&&ge!==(ge=ze[7]("upstream.transformerHelp")+"")&&k(he,ge),(!qe||Xe&128)&&Je!==(Je=ze[7]("headers.title")+"")&&k(Le,Je);const at={};Xe&128&&(at.label=ze[7]("headers.title")),!_e&&Xe&1&&(_e=!0,at.value=ze[0].headers,Sl(()=>_e=!1)),fe.$set(at),(!qe||Xe&128)&&Ee!==(Ee=ze[7]("body.title")+"")&&k(Ve,Ee);const gt={};Xe&128&&(gt.label=ze[7]("body.title")),!Ye&&Xe&1&&(Ye=!0,gt.value=ze[0].body,Sl(()=>Ye=!1)),Ne.$set(gt),(!qe||Xe&128)&&Se!==(Se=ze[7]("query.title")+"")&&k(Ue,Se);const wt={};Xe&128&&(wt.label=ze[7]("query.title")),!ce&&Xe&1&&(ce=!0,wt.value=ze[0].query,Sl(()=>ce=!1)),Ge.$set(wt)},i(ze){qe||(et(ee.$$.fragment,ze),et(fe.$$.fragment,ze),et(Ne.$$.fragment,ze),et(Ge.$$.fragment,ze),qe=!0)},o(ze){st(ee.$$.fragment,ze),st(fe.$$.fragment,ze),st(Ne.$$.fragment,ze),st(Ge.$$.fragment,ze),qe=!1},d(ze){ze&&P(l),We&&We.d(),z&&z.d(),Ct(ee),Ct(fe),Ct(Ne),Ct(Ge),Re=!1,bt(dt)}}}const gd=t=>t.field.includes("target"),_d=t=>t.field.includes("target"),bd=t=>t.field.includes("target");function Fg(t,l,e){let n,r;Dt(t,Rt,y=>e(7,r=y));let{upstream:i}=l,{index:u}=l,{onRemove:c}=l,{onDuplicate:f}=l,{showHeader:d=!0}=l,p=i.plugins?.[0]||null;function m(){i.target=this.value,e(0,i),e(5,p)}function g(){i.weight=St(this.value),e(0,i),e(5,p)}function b(){i.priority=St(this.value),e(0,i),e(5,p)}function v(y){p=y,e(5,p)}function w(y){t.$$.not_equal(i.headers,y)&&(i.headers=y,e(0,i),e(5,p))}function C(y){t.$$.not_equal(i.body,y)&&(i.body=y,e(0,i),e(5,p))}function E(y){t.$$.not_equal(i.query,y)&&(i.query=y,e(0,i),e(5,p))}return t.$$set=y=>{"upstream"in y&&e(0,i=y.upstream),"index"in y&&e(1,u=y.index),"onRemove"in y&&e(2,c=y.onRemove),"onDuplicate"in y&&e(3,f=y.onDuplicate),"showHeader"in y&&e(4,d=y.showHeader)},t.$$.update=()=>{t.$$.dirty&1&&(e(0,i.headers=i.headers||{add:{},remove:[],default:{}},i),e(0,i.body=i.body||{add:{},remove:[],replace:{},default:{}},i),e(0,i.query=i.query||{add:{},remove:[],replace:{},default:{}},i)),t.$$.dirty&32&&e(0,i.plugins=p?[p]:void 0,i),t.$$.dirty&3&&e(6,n=gf(i,u))},[i,u,c,f,d,p,n,r,m,g,b,v,w,C,E]}class zg extends Vt{constructor(l){super(),Ut(this,l,Fg,Og,At,{upstream:0,index:1,onRemove:2,onDuplicate:3,showHeader:4})}}function vd(t,l,e){const n=t.slice();return n[22]=l[e].u,n[23]=l[e].i,n}function kd(t){let l,e,n=t[0].find(Sd)?.message+"",r;return{c(){l=a("div"),e=a("span"),r=_(n),o(l,"class","alert alert-error")},m(i,u){j(i,l,u),s(l,e),s(e,r)},p(i,u){u&1&&n!==(n=i[0].find(Sd)?.message+"")&&k(r,n)},d(i){i&&P(l)}}}function wd(t){let l;return{c(){l=a("span"),l.textContent="Transformer",o(l,"class","badge badge-sm badge-info mt-1")},m(e,n){j(e,l,n)},d(e){e&&P(l)}}}function yd(t,l){let e,n,r=(l[22].priority||1)+"",i,u,c,f,d,p=l[22].target+"",m,g,b,v,w,C=(l[22].weight||100)+"",E,y,T,S,q,D,H,I,R,L,A,N,Z,Y,x,F,K,M,B,U,O=l[22].plugins&&l[22].plugins.length>0&&wd();function J(){return l[18](l[23])}function ie(){return l[19](l[23])}function ue(){return l[20](l[23])}return{key:t,first:null,c(){e=a("tr"),n=a("td"),i=_(r),u=h(),c=a("td"),f=a("div"),d=a("div"),m=_(p),b=h(),O&&O.c(),v=h(),w=a("td"),E=_(C),y=h(),T=a("td"),S=a("div"),q=a("button"),D=ae("svg"),H=ae("path"),R=h(),L=a("button"),A=ae("svg"),N=ae("path"),Y=h(),x=a("button"),F=ae("svg"),K=ae("path"),o(d,"class","font-bold truncate max-w-xs"),o(d,"title",g=l[22].target),o(f,"class","flex flex-col"),o(H,"stroke-linecap","round"),o(H,"stroke-linejoin","round"),o(H,"stroke-width","2"),o(H,"d","M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"),o(D,"xmlns","http://www.w3.org/2000/svg"),o(D,"class","h-4 w-4"),o(D,"fill","none"),o(D,"viewBox","0 0 24 24"),o(D,"stroke","currentColor"),o(q,"type","button"),o(q,"class","btn btn-square btn-xs"),o(q,"title",I=l[8]("common.edit")),o(N,"stroke-linecap","round"),o(N,"stroke-linejoin","round"),o(N,"stroke-width","2"),o(N,"d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"),o(A,"xmlns","http://www.w3.org/2000/svg"),o(A,"class","h-4 w-4"),o(A,"fill","none"),o(A,"viewBox","0 0 24 24"),o(A,"stroke","currentColor"),o(L,"type","button"),o(L,"class","btn btn-square btn-xs"),o(L,"title",Z=l[8]("routeCard.duplicate")),o(K,"stroke-linecap","round"),o(K,"stroke-linejoin","round"),o(K,"stroke-width","2"),o(K,"d","M6 18L18 6M6 6l12 12"),o(F,"xmlns","http://www.w3.org/2000/svg"),o(F,"class","h-4 w-4"),o(F,"fill","none"),o(F,"viewBox","0 0 24 24"),o(F,"stroke","currentColor"),o(x,"type","button"),o(x,"class","btn btn-square btn-xs btn-error"),o(x,"title",M=l[8]("common.delete")),o(S,"class","flex gap-1"),o(e,"class","hover"),this.first=e},m(ne,$){j(ne,e,$),s(e,n),s(n,i),s(e,u),s(e,c),s(c,f),s(f,d),s(d,m),s(f,b),O&&O.m(f,null),s(e,v),s(e,w),s(w,E),s(e,y),s(e,T),s(T,S),s(S,q),s(q,D),s(D,H),s(S,R),s(S,L),s(L,A),s(A,N),s(S,Y),s(S,x),s(x,F),s(F,K),B||(U=[V(q,"click",J),V(L,"click",ie),V(x,"click",ue)],B=!0)},p(ne,$){l=ne,$&128&&r!==(r=(l[22].priority||1)+"")&&k(i,r),$&128&&p!==(p=l[22].target+"")&&k(m,p),$&128&&g!==(g=l[22].target)&&o(d,"title",g),l[22].plugins&&l[22].plugins.length>0?O||(O=wd(),O.c(),O.m(f,null)):O&&(O.d(1),O=null),$&128&&C!==(C=(l[22].weight||100)+"")&&k(E,C),$&256&&I!==(I=l[8]("common.edit"))&&o(q,"title",I),$&256&&Z!==(Z=l[8]("routeCard.duplicate"))&&o(L,"title",Z),$&256&&M!==(M=l[8]("common.delete"))&&o(x,"title",M)},d(ne){ne&&P(e),O&&O.d(),B=!1,bt(U)}}}function Cd(t){let l,e,n=(t[2]?t[8]("routes.noMatchingRoutes"):t[8]("routes.noRoutesMessage"))+"",r;return{c(){l=a("tr"),e=a("td"),r=_(n),o(e,"colspan","4"),o(e,"class","text-center text-gray-500 py-8")},m(i,u){j(i,l,u),s(l,e),s(e,r)},p(i,u){u&260&&n!==(n=(i[2]?i[8]("routes.noMatchingRoutes"):i[8]("routes.noRoutesMessage"))+"")&&k(r,n)},d(i){i&&P(l)}}}function Ed(t){let l,e,n=t[1][0].message+"",r;return{c(){l=a("div"),e=a("span"),r=_(n),o(l,"class","alert alert-warning")},m(i,u){j(i,l,u),s(l,e),s(e,r)},p(i,u){u&2&&n!==(n=i[1][0].message+"")&&k(r,n)},d(i){i&&P(l)}}}function Td(t){let l,e,n,r=(t[4]>=0?t[8]("upstream.title",{values:{index:t[4]+1}}):t[8]("routeEditor.addUpstream"))+"",i,u,c,f,d,p,m,g,b=t[8]("common.cancel")+"",v,w,C,E=t[8]("common.save")+"",y,T,S,q,D;function H(R){t[21](R)}let I={index:t[4],showHeader:!1,onRemove:Ug,onDuplicate:Vg};return t[5]!==void 0&&(I.upstream=t[5]),f=new zg({props:I}),bl.push(()=>Rl(f,"upstream",H)),{c(){l=a("div"),e=a("div"),n=a("h3"),i=_(r),u=h(),c=a("div"),Et(f.$$.fragment),p=h(),m=a("div"),g=a("button"),v=_(b),w=h(),C=a("button"),y=_(E),o(n,"class","font-bold text-lg mb-4"),o(c,"class","max-h-[70vh] overflow-y-auto"),o(g,"type","button"),o(g,"class","btn"),o(C,"type","button"),o(C,"class","btn btn-primary"),C.disabled=T=!t[6],o(m,"class","modal-action"),o(e,"class","modal-box w-11/12 max-w-3xl"),o(l,"class","modal modal-open")},m(R,L){j(R,l,L),s(l,e),s(e,n),s(n,i),s(e,u),s(e,c),yt(f,c,null),s(e,p),s(e,m),s(m,g),s(g,v),s(m,w),s(m,C),s(C,y),S=!0,q||(D=[V(g,"click",t[10]),V(C,"click",t[11])],q=!0)},p(R,L){(!S||L&272)&&r!==(r=(R[4]>=0?R[8]("upstream.title",{values:{index:R[4]+1}}):R[8]("routeEditor.addUpstream"))+"")&&k(i,r);const A={};L&16&&(A.index=R[4]),!d&&L&32&&(d=!0,A.upstream=R[5],Sl(()=>d=!1)),f.$set(A),(!S||L&256)&&b!==(b=R[8]("common.cancel")+"")&&k(v,b),(!S||L&256)&&E!==(E=R[8]("common.save")+"")&&k(y,E),(!S||L&64&&T!==(T=!R[6]))&&(C.disabled=T)},i(R){S||(et(f.$$.fragment,R),S=!0)},o(R){st(f.$$.fragment,R),S=!1},d(R){R&&P(l),Ct(f),q=!1,bt(D)}}}function Ng(t){let l,e,n,r,i=t[8]("routeEditor.upstreams")+"",u,c,f,d,p,m=t[8]("routeEditor.upstreamsHelp")+"",g,b,v,w,C,E,y,T=t[8]("routeEditor.addUpstream")+"",S,q,D=t[0].some(Md),H,I,R,L,A,N,Z=t[8]("upstream.priority")+"",Y,x,F,K=t[8]("upstream.target")+"",M,B,U,O=t[8]("upstream.weight")+"",J,ie,ue,ne=t[8]("routes.actions")+"",$,te,re,ee=[],G=new Map,pe,oe,ge,he,ye,Fe,je,we=D&&kd(t),Oe=ut(t[7]);const Je=fe=>fe[22]._uid;for(let fe=0;fe<Oe.length;fe+=1){let _e=vd(t,Oe,fe),Be=Je(_e);G.set(Be,ee[fe]=yd(Be,_e))}let Le=t[7].length===0&&Cd(t),Pe=t[1].length>0&&Ed(t),Me=t[3]&&t[5]&&Td(t);return{c(){l=a("div"),e=a("div"),n=a("div"),r=a("h3"),u=_(i),c=h(),f=a("span"),f.textContent="*",d=h(),p=a("p"),g=_(m),b=h(),v=a("div"),w=a("input"),E=h(),y=a("button"),S=_(T),q=h(),we&&we.c(),H=h(),I=a("div"),R=a("table"),L=a("thead"),A=a("tr"),N=a("th"),Y=_(Z),x=h(),F=a("th"),M=_(K),B=h(),U=a("th"),J=_(O),ie=h(),ue=a("th"),$=_(ne),te=h(),re=a("tbody");for(let fe=0;fe<ee.length;fe+=1)ee[fe].c();pe=h(),Le&&Le.c(),oe=h(),Pe&&Pe.c(),ge=h(),Me&&Me.c(),he=Ul(),o(f,"class","text-error"),o(r,"class","text-lg font-semibold"),o(p,"class","text-sm text-gray-500 mt-1"),o(w,"type","text"),o(w,"placeholder",C=t[8]("common.search")),o(w,"class","input input-bordered input-sm"),o(y,"type","button"),o(y,"class","btn btn-sm btn-primary"),o(v,"class","flex gap-2"),o(e,"class","flex justify-between items-center"),o(N,"class","w-20"),o(U,"class","w-24"),o(ue,"class","w-32"),o(R,"class","table table-zebra w-full"),o(I,"class","overflow-x-auto"),o(l,"class","space-y-4")},m(fe,_e){j(fe,l,_e),s(l,e),s(e,n),s(n,r),s(r,u),s(r,c),s(r,f),s(n,d),s(n,p),s(p,g),s(e,b),s(e,v),s(v,w),Q(w,t[2]),s(v,E),s(v,y),s(y,S),s(l,q),we&&we.m(l,null),s(l,H),s(l,I),s(I,R),s(R,L),s(L,A),s(A,N),s(N,Y),s(A,x),s(A,F),s(F,M),s(A,B),s(A,U),s(U,J),s(A,ie),s(A,ue),s(ue,$),s(R,te),s(R,re);for(let Be=0;Be<ee.length;Be+=1)ee[Be]&&ee[Be].m(re,null);s(re,pe),Le&&Le.m(re,null),s(l,oe),Pe&&Pe.m(l,null),j(fe,ge,_e),Me&&Me.m(fe,_e),j(fe,he,_e),ye=!0,Fe||(je=[V(w,"input",t[16]),V(y,"click",t[17])],Fe=!0)},p(fe,[_e]){(!ye||_e&256)&&i!==(i=fe[8]("routeEditor.upstreams")+"")&&k(u,i),(!ye||_e&256)&&m!==(m=fe[8]("routeEditor.upstreamsHelp")+"")&&k(g,m),(!ye||_e&256&&C!==(C=fe[8]("common.search")))&&o(w,"placeholder",C),_e&4&&w.value!==fe[2]&&Q(w,fe[2]),(!ye||_e&256)&&T!==(T=fe[8]("routeEditor.addUpstream")+"")&&k(S,T),_e&1&&(D=fe[0].some(Md)),D?we?we.p(fe,_e):(we=kd(fe),we.c(),we.m(l,H)):we&&(we.d(1),we=null),(!ye||_e&256)&&Z!==(Z=fe[8]("upstream.priority")+"")&&k(Y,Z),(!ye||_e&256)&&K!==(K=fe[8]("upstream.target")+"")&&k(M,K),(!ye||_e&256)&&O!==(O=fe[8]("upstream.weight")+"")&&k(J,O),(!ye||_e&256)&&ne!==(ne=fe[8]("routes.actions")+"")&&k($,ne),_e&13184&&(Oe=ut(fe[7]),ee=ff(ee,_e,Je,1,fe,Oe,G,re,j0,yd,pe,vd)),fe[7].length===0?Le?Le.p(fe,_e):(Le=Cd(fe),Le.c(),Le.m(re,null)):Le&&(Le.d(1),Le=null),fe[1].length>0?Pe?Pe.p(fe,_e):(Pe=Ed(fe),Pe.c(),Pe.m(l,null)):Pe&&(Pe.d(1),Pe=null),fe[3]&&fe[5]?Me?(Me.p(fe,_e),_e&40&&et(Me,1)):(Me=Td(fe),Me.c(),et(Me,1),Me.m(he.parentNode,he)):Me&&(Gl(),st(Me,1,1,()=>{Me=null}),Kl())},i(fe){ye||(et(Me),ye=!0)},o(fe){st(Me),ye=!1},d(fe){fe&&(P(l),P(ge),P(he)),we&&we.d();for(let _e=0;_e<ee.length;_e+=1)ee[_e].d();Le&&Le.d(),Pe&&Pe.d(),Me&&Me.d(fe),Fe=!1,bt(je)}}}const Md=t=>t.field==="upstreams",Sd=t=>t.field==="upstreams",Ug=()=>{},Vg=()=>{};function Jg(t,l,e){let n,r,i;Dt(t,Rt,R=>e(8,i=R));let{route:u}=l,{errors:c=[]}=l,{weightErrors:f=[]}=l,d="",p=!1,m=-1,g=null,b=[];function v(R=-1){e(4,m=R),R>=0?e(5,g=JSON.parse(JSON.stringify(u.upstreams[R]))):e(5,g={_uid:gr(),target:"",weight:100,priority:u.upstreams.length+1,headers:{add:{},remove:[],default:{}},body:{add:{},remove:[],replace:{},default:{}},query:{add:{},remove:[],replace:{},default:{}}}),e(3,p=!0)}function w(){e(3,p=!1),e(5,g=null)}function C(){r&&(m>=0?e(14,u.upstreams[m]=g,u):e(14,u.upstreams=[...u.upstreams,g],u),w())}function E(R){if(u.upstreams.length<=1){alert(i("routeEditor.upstreamRequired"));return}e(14,u.upstreams=u.upstreams.filter((L,A)=>A!==R),u)}function y(R){const L=u.upstreams[R],A=JSON.parse(JSON.stringify(L));if(A._uid=gr(),A.target){const N=A.target.match(/^(.+?)(-\\d+)?$/);if(N){const[,Z,Y]=N;if(Y){const x=parseInt(Y.slice(1))+1;A.target=`${Z}-${x}`}else A.target=`${Z}-copy`}else A.target=`${A.target}-copy`}A.priority!==void 0&&(A.priority=Math.max(...u.upstreams.map(N=>N.priority||1))+1),e(14,u.upstreams=[...u.upstreams.slice(0,R+1),A,...u.upstreams.slice(R+1)],u)}function T(){d=this.value,e(2,d)}const S=()=>v(-1),q=R=>v(R),D=R=>y(R),H=R=>E(R);function I(R){g=R,e(5,g)}return t.$$set=R=>{"route"in R&&e(14,u=R.route),"errors"in R&&e(0,c=R.errors),"weightErrors"in R&&e(1,f=R.weightErrors)},t.$$.update=()=>{t.$$.dirty&16388&&e(7,n=u.upstreams.map((R,L)=>({u:R,i:L})).filter(({u:R})=>!d||R.target.toLowerCase().includes(d.toLowerCase()))),t.$$.dirty&16440&&p&&g&&e(15,b=gf(g,m===-1?u.upstreams.length:m)),t.$$.dirty&32808&&e(6,r=p&&g&&b.length===0)},[c,f,d,p,m,g,r,n,i,v,w,C,E,y,u,b,T,S,q,D,H,I]}class Wg extends Vt{constructor(l){super(),Ut(this,l,Jg,Ng,At,{route:14,errors:0,weightErrors:1})}}function Gg(t){let l,e,n;function r(u){t[8](u)}let i={label:t[2]("query.title"),showLabel:!1};return t[0].query!==void 0&&(i.value=t[0].query),l=new s2({props:i}),bl.push(()=>Rl(l,"value",r)),{c(){Et(l.$$.fragment)},m(u,c){yt(l,u,c),n=!0},p(u,c){const f={};c&4&&(f.label=u[2]("query.title")),!e&&c&1&&(e=!0,f.value=u[0].query,Sl(()=>e=!1)),l.$set(f)},i(u){n||(et(l.$$.fragment,u),n=!0)},o(u){st(l.$$.fragment,u),n=!1},d(u){Ct(l,u)}}}function Kg(t){let l,e,n;function r(u){t[7](u)}let i={label:t[2]("body.title"),showLabel:!1};return t[0].body!==void 0&&(i.value=t[0].body),l=new l2({props:i}),bl.push(()=>Rl(l,"value",r)),{c(){Et(l.$$.fragment)},m(u,c){yt(l,u,c),n=!0},p(u,c){const f={};c&4&&(f.label=u[2]("body.title")),!e&&c&1&&(e=!0,f.value=u[0].body,Sl(()=>e=!1)),l.$set(f)},i(u){n||(et(l.$$.fragment,u),n=!0)},o(u){st(l.$$.fragment,u),n=!1},d(u){Ct(l,u)}}}function Qg(t){let l,e,n;function r(u){t[6](u)}let i={label:t[2]("headers.title"),showLabel:!1};return t[0].headers!==void 0&&(i.value=t[0].headers),l=new t2({props:i}),bl.push(()=>Rl(l,"value",r)),{c(){Et(l.$$.fragment)},m(u,c){yt(l,u,c),n=!0},p(u,c){const f={};c&4&&(f.label=u[2]("headers.title")),!e&&c&1&&(e=!0,f.value=u[0].headers,Sl(()=>e=!1)),l.$set(f)},i(u){n||(et(l.$$.fragment,u),n=!0)},o(u){st(l.$$.fragment,u),n=!1},d(u){Ct(l,u)}}}function Yg(t){let l,e,n,r=t[2]("routeEditor.requestModification")+"",i,u,c,f=t[2]("routeEditor.requestModificationHelp")+"",d,p,m,g,b=t[2]("headers.title")+"",v,w,C,E=t[2]("body.title")+"",y,T,S,q=t[2]("query.title")+"",D,H,I,R,L,A,N,Z,Y,x,F,K=t[2]("routeEditor.routeLevelModificationNote")+"",M,B,U,O;const J=[Qg,Kg,Gg],ie=[];function ue(ne,$){return ne[1]==="headers"?0:ne[1]==="body"?1:ne[1]==="query"?2:-1}return~(R=ue(t))&&(L=ie[R]=J[R](t)),{c(){l=a("div"),e=a("div"),n=a("h3"),i=_(r),u=h(),c=a("p"),d=_(f),p=h(),m=a("div"),g=a("button"),v=_(b),w=h(),C=a("button"),y=_(E),T=h(),S=a("button"),D=_(q),H=h(),I=a("div"),L&&L.c(),A=h(),N=a("div"),Z=ae("svg"),Y=ae("path"),x=h(),F=a("span"),M=_(K),o(n,"class","text-lg font-semibold"),o(c,"class","text-sm text-gray-500 mt-1"),o(g,"role","tab"),o(g,"class","tab"),le(g,"tab-active",t[1]==="headers"),o(C,"role","tab"),o(C,"class","tab"),le(C,"tab-active",t[1]==="body"),o(S,"role","tab"),o(S,"class","tab"),le(S,"tab-active",t[1]==="query"),o(m,"role","tablist"),o(m,"class","tabs tabs-boxed"),o(I,"class","mt-4"),o(Y,"stroke-linecap","round"),o(Y,"stroke-linejoin","round"),o(Y,"stroke-width","2"),o(Y,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(Z,"xmlns","http://www.w3.org/2000/svg"),o(Z,"fill","none"),o(Z,"viewBox","0 0 24 24"),o(Z,"class","stroke-current shrink-0 w-6 h-6"),o(F,"class","text-sm"),o(N,"class","alert alert-info mt-4"),o(l,"class","space-y-4")},m(ne,$){j(ne,l,$),s(l,e),s(e,n),s(n,i),s(e,u),s(e,c),s(c,d),s(l,p),s(l,m),s(m,g),s(g,v),s(m,w),s(m,C),s(C,y),s(m,T),s(m,S),s(S,D),s(l,H),s(l,I),~R&&ie[R].m(I,null),s(l,A),s(l,N),s(N,Z),s(Z,Y),s(N,x),s(N,F),s(F,M),B=!0,U||(O=[V(g,"click",t[3]),V(C,"click",t[4]),V(S,"click",t[5])],U=!0)},p(ne,[$]){(!B||$&4)&&r!==(r=ne[2]("routeEditor.requestModification")+"")&&k(i,r),(!B||$&4)&&f!==(f=ne[2]("routeEditor.requestModificationHelp")+"")&&k(d,f),(!B||$&4)&&b!==(b=ne[2]("headers.title")+"")&&k(v,b),(!B||$&2)&&le(g,"tab-active",ne[1]==="headers"),(!B||$&4)&&E!==(E=ne[2]("body.title")+"")&&k(y,E),(!B||$&2)&&le(C,"tab-active",ne[1]==="body"),(!B||$&4)&&q!==(q=ne[2]("query.title")+"")&&k(D,q),(!B||$&2)&&le(S,"tab-active",ne[1]==="query");let te=R;R=ue(ne),R===te?~R&&ie[R].p(ne,$):(L&&(Gl(),st(ie[te],1,1,()=>{ie[te]=null}),Kl()),~R?(L=ie[R],L?L.p(ne,$):(L=ie[R]=J[R](ne),L.c()),et(L,1),L.m(I,null)):L=null),(!B||$&4)&&K!==(K=ne[2]("routeEditor.routeLevelModificationNote")+"")&&k(M,K)},i(ne){B||(et(L),B=!0)},o(ne){st(L),B=!1},d(ne){ne&&P(l),~R&&ie[R].d(),U=!1,bt(O)}}}function Zg(t,l,e){let n;Dt(t,Rt,g=>e(2,n=g));let{route:r}=l,i="headers";const u=()=>e(1,i="headers"),c=()=>e(1,i="body"),f=()=>e(1,i="query");function d(g){t.$$.not_equal(r.headers,g)&&(r.headers=g,e(0,r))}function p(g){t.$$.not_equal(r.body,g)&&(r.body=g,e(0,r))}function m(g){t.$$.not_equal(r.query,g)&&(r.query=g,e(0,r))}return t.$$set=g=>{"route"in g&&e(0,r=g.route)},[r,i,n,u,c,f,d,p,m]}class Xg extends Vt{constructor(l){super(),Ut(this,l,Zg,Yg,At,{route:0})}}function xg(t){let l,e,n,r=t[1]("auth.routeAuth")+"",i,u,c,f=t[1]("auth.routeAuthHelp")+"",d,p,m,g,b;function v(C){t[2](C)}let w={label:t[1]("auth.routeAuth"),showHelp:!0,showLabel:!1};return t[0].auth!==void 0&&(w.value=t[0].auth),m=new Z0({props:w}),bl.push(()=>Rl(m,"value",v)),{c(){l=a("div"),e=a("div"),n=a("h3"),i=_(r),u=h(),c=a("p"),d=_(f),p=h(),Et(m.$$.fragment),o(n,"class","text-lg font-semibold"),o(c,"class","text-sm text-gray-500 mt-1"),o(l,"class","space-y-4")},m(C,E){j(C,l,E),s(l,e),s(e,n),s(n,i),s(e,u),s(e,c),s(c,d),s(l,p),yt(m,l,null),b=!0},p(C,[E]){(!b||E&2)&&r!==(r=C[1]("auth.routeAuth")+"")&&k(i,r),(!b||E&2)&&f!==(f=C[1]("auth.routeAuthHelp")+"")&&k(d,f);const y={};E&2&&(y.label=C[1]("auth.routeAuth")),!g&&E&1&&(g=!0,y.value=C[0].auth,Sl(()=>g=!1)),m.$set(y)},i(C){b||(et(m.$$.fragment,C),b=!0)},o(C){st(m.$$.fragment,C),b=!1},d(C){C&&P(l),Ct(m)}}}function $g(t,l,e){let n;Dt(t,Rt,u=>e(1,n=u));let{route:r}=l;function i(u){t.$$.not_equal(r.auth,u)&&(r.auth=u,e(0,r))}return t.$$set=u=>{"route"in u&&e(0,r=u.route)},[r,n,i]}class e_ extends Vt{constructor(l){super(),Ut(this,l,$g,xg,At,{route:0})}}function Rd(t){let l,e=t[22]("routeEditor.failoverHelp")+"",n;return{c(){l=a("span"),n=_(e),o(l,"class","label-text-alt text-xs")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&4194304&&e!==(e=r[22]("routeEditor.failoverHelp")+"")&&k(n,e)},d(r){r&&P(l)}}}function qd(t){let l,e,n,r=t[22]("routeEditor.retryableStatusCodes")+"",i,u,c,f,d,p,m,g=t[22]("routeEditor.retryableStatusCodesHelp")+"",b,v,w,C,E,y,T=t[22]("routeEditor.passiveHealthCheck")+"",S,q,D,H,I,R,L,A,N=t[22]("routeEditor.passiveHealthCheckTooltip")+"",Z,Y,x,F,K,M,B=t[22]("routeEditor.consecutiveFailuresThreshold")+"",U,O,J,ie,ue,ne,$=t[22]("routeEditor.consecutiveFailuresThresholdHelp")+"",te,re,ee,G,pe,oe=t[22]("routeEditor.healthyThreshold")+"",ge,he,ye,Fe,je,we,Oe=t[22]("routeEditor.healthyThresholdHelp")+"",Je,Le,Pe,Me,fe,_e=t[22]("routeEditor.requestTimeoutMs")+"",Be,De,se,ke,me,Ee,Ve=t[22]("routeEditor.requestTimeoutMsHelp")+"",Ie,nt,Ne,Ye,Qe,ve=t[22]("routeEditor.connectTimeoutMs")+"",de,Te,Ze,Se,Ue,Ce,mt=t[22]("routeEditor.connectTimeoutMsHelp")+"",Ge,ce,qe,Re,dt,We=t[22]("routeEditor.recoveryIntervalMs")+"",z,He,X,ft,Ht,Ke,_t=t[22]("routeEditor.recoveryIntervalHelp")+"",lt,it,ze,Xe,Bt,at=t[22]("routeEditor.recoveryTimeoutMs")+"",gt,wt,pt,vl,rt,Mt,ht=t[22]("routeEditor.recoveryTimeoutHelp")+"",Tt,kl,Ot,hl,ml,ql,Jt=t[22]("routeEditor.activeHealthCheck")+"",Ql,Qt,Yt,Hl,Il,gl,ol,Yl,Ft=t[22]("routeEditor.activeHealthCheckTooltip")+"",Pl,Vl,Jl,El,zt,Zl,Pt,jl=t[22]("routeEditor.enableActiveHealthCheck")+"",Ll,$l,xt,wl,es,Fl,Bl,Wl=t[22]("routeEditor.slowStart")+"",Ps,nl,yl,rl,zl,al,_l,ll,Dl=t[22]("routeEditor.slowStartTooltip")+"",Nl,Tl,Wt,It,jt,$t,el,Kt=t[22]("routeEditor.enableSlowStart")+"",Zt,il,Xt,$e,Al,ts,Xl,xl,ls=t[22]("routeEditor.failoverInfoNotice")+"",Ds,ss,zs,ul=t[11]&&Hd(t),Nt=t[19]&&Pd(t);return{c(){l=a("div"),e=a("label"),n=a("span"),i=_(r),u=h(),c=a("input"),d=h(),p=a("div"),m=a("span"),b=_(g),v=h(),w=a("div"),C=a("input"),E=h(),y=a("div"),S=_(T),q=h(),D=a("div"),H=a("div"),I=ae("svg"),R=ae("path"),L=h(),A=a("span"),Z=_(N),Y=h(),x=a("div"),F=a("div"),K=a("label"),M=a("span"),U=_(B),O=h(),J=a("input"),ie=h(),ue=a("div"),ne=a("span"),te=_($),re=h(),ee=a("div"),G=a("label"),pe=a("span"),ge=_(oe),he=h(),ye=a("input"),Fe=h(),je=a("div"),we=a("span"),Je=_(Oe),Le=h(),Pe=a("div"),Me=a("label"),fe=a("span"),Be=_(_e),De=h(),se=a("input"),ke=h(),me=a("div"),Ee=a("span"),Ie=_(Ve),nt=h(),Ne=a("div"),Ye=a("label"),Qe=a("span"),de=_(ve),Te=h(),Ze=a("input"),Se=h(),Ue=a("div"),Ce=a("span"),Ge=_(mt),ce=h(),qe=a("div"),Re=a("label"),dt=a("span"),z=_(We),He=h(),X=a("input"),ft=h(),Ht=a("div"),Ke=a("span"),lt=_(_t),it=h(),ze=a("div"),Xe=a("label"),Bt=a("span"),gt=_(at),wt=h(),pt=a("input"),vl=h(),rt=a("div"),Mt=a("span"),Tt=_(ht),kl=h(),Ot=a("div"),hl=a("input"),ml=h(),ql=a("div"),Ql=_(Jt),Qt=h(),Yt=a("div"),Hl=a("div"),Il=ae("svg"),gl=ae("path"),ol=h(),Yl=a("span"),Pl=_(Ft),Vl=h(),Jl=a("div"),El=a("label"),zt=a("input"),Zl=h(),Pt=a("span"),Ll=_(jl),$l=h(),ul&&ul.c(),xt=h(),wl=a("div"),es=a("input"),Fl=h(),Bl=a("div"),Ps=_(Wl),nl=h(),yl=a("div"),rl=a("div"),zl=ae("svg"),al=ae("path"),_l=h(),ll=a("span"),Nl=_(Dl),Tl=h(),Wt=a("div"),It=a("label"),jt=a("input"),$t=h(),el=a("span"),Zt=_(Kt),il=h(),Nt&&Nt.c(),Xt=h(),$e=a("div"),Al=ae("svg"),ts=ae("path"),Xl=h(),xl=a("div"),Ds=_(ls),o(n,"class","label-text"),o(e,"class","label"),o(e,"for","failover-status-codes"),o(c,"id","failover-status-codes"),o(c,"type","text"),o(c,"placeholder",f=t[22]("routeEditor.retryableStatusCodesPlaceholder")),o(c,"class","input input-bordered input-sm"),o(m,"class","label-text-alt text-xs"),o(p,"class","label"),o(l,"class","form-control"),o(C,"type","checkbox"),o(y,"class","collapse-title text-sm font-medium"),o(R,"stroke-linecap","round"),o(R,"stroke-linejoin","round"),o(R,"stroke-width","2"),o(R,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(I,"xmlns","http://www.w3.org/2000/svg"),o(I,"fill","none"),o(I,"viewBox","0 0 24 24"),o(I,"class","stroke-current shrink-0 w-4 h-4"),o(H,"class","text-xs text-base-content/60 bg-base-300 rounded p-2 flex gap-2 items-start"),o(M,"class","label-text"),o(K,"class","label"),o(K,"for","consecutive-failures-threshold"),o(J,"id","consecutive-failures-threshold"),o(J,"type","number"),o(J,"placeholder","3"),o(J,"class","input input-bordered input-sm"),o(J,"min","1"),o(ne,"class","label-text-alt text-xs"),o(ue,"class","label"),o(F,"class","form-control"),o(pe,"class","label-text"),o(G,"class","label"),o(G,"for","healthy-threshold"),o(ye,"id","healthy-threshold"),o(ye,"type","number"),o(ye,"placeholder","2"),o(ye,"class","input input-bordered input-sm"),o(ye,"min","1"),o(we,"class","label-text-alt text-xs"),o(je,"class","label"),o(ee,"class","form-control"),o(fe,"class","label-text"),o(Me,"class","label"),o(Me,"for","request-timeout-ms"),o(se,"id","request-timeout-ms"),o(se,"type","number"),o(se,"placeholder","30000"),o(se,"class","input input-bordered input-sm"),o(se,"min","100"),o(Ee,"class","label-text-alt text-xs"),o(me,"class","label"),o(Pe,"class","form-control"),o(Qe,"class","label-text"),o(Ye,"class","label"),o(Ye,"for","connect-timeout-ms"),o(Ze,"id","connect-timeout-ms"),o(Ze,"type","number"),o(Ze,"placeholder","5000"),o(Ze,"class","input input-bordered input-sm"),o(Ze,"min","100"),o(Ce,"class","label-text-alt text-xs"),o(Ue,"class","label"),o(Ne,"class","form-control"),o(dt,"class","label-text"),o(Re,"class","label"),o(Re,"for","recovery-interval-ms"),o(X,"id","recovery-interval-ms"),o(X,"type","number"),o(X,"placeholder","5000"),o(X,"class","input input-bordered input-sm"),o(X,"min","1000"),o(Ke,"class","label-text-alt text-xs"),o(Ht,"class","label"),o(qe,"class","form-control"),o(Bt,"class","label-text"),o(Xe,"class","label"),o(Xe,"for","recovery-timeout-ms"),o(pt,"id","recovery-timeout-ms"),o(pt,"type","number"),o(pt,"placeholder","3000"),o(pt,"class","input input-bordered input-sm"),o(pt,"min","100"),o(Mt,"class","label-text-alt text-xs"),o(rt,"class","label"),o(ze,"class","form-control"),o(x,"class","grid grid-cols-1 md:grid-cols-2 gap-4"),o(D,"class","collapse-content space-y-4"),o(w,"class","collapse collapse-arrow bg-base-200"),o(hl,"type","checkbox"),o(ql,"class","collapse-title text-sm font-medium"),o(gl,"stroke-linecap","round"),o(gl,"stroke-linejoin","round"),o(gl,"stroke-width","2"),o(gl,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(Il,"xmlns","http://www.w3.org/2000/svg"),o(Il,"fill","none"),o(Il,"viewBox","0 0 24 24"),o(Il,"class","stroke-current shrink-0 w-4 h-4"),o(Hl,"class","text-xs text-base-content/60 bg-base-300 rounded p-2 flex gap-2 items-start"),o(zt,"type","checkbox"),o(zt,"class","checkbox checkbox-sm"),o(Pt,"class","label-text"),o(El,"class","label cursor-pointer justify-start gap-4"),o(Jl,"class","form-control"),o(Yt,"class","collapse-content space-y-4"),o(Ot,"class","collapse collapse-arrow bg-base-200"),o(es,"type","checkbox"),o(Bl,"class","collapse-title text-sm font-medium"),o(al,"stroke-linecap","round"),o(al,"stroke-linejoin","round"),o(al,"stroke-width","2"),o(al,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(zl,"xmlns","http://www.w3.org/2000/svg"),o(zl,"fill","none"),o(zl,"viewBox","0 0 24 24"),o(zl,"class","stroke-current shrink-0 w-4 h-4"),o(rl,"class","text-xs text-base-content/60 bg-base-300 rounded p-2 flex gap-2 items-start"),o(jt,"type","checkbox"),o(jt,"class","checkbox checkbox-sm"),o(el,"class","label-text"),o(It,"class","label cursor-pointer justify-start gap-4"),o(Wt,"class","form-control"),o(yl,"class","collapse-content space-y-4"),o(wl,"class","collapse collapse-arrow bg-base-200"),o(ts,"stroke-linecap","round"),o(ts,"stroke-linejoin","round"),o(ts,"stroke-width","2"),o(ts,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(Al,"xmlns","http://www.w3.org/2000/svg"),o(Al,"fill","none"),o(Al,"viewBox","0 0 24 24"),o(Al,"class","stroke-current shrink-0 w-4 h-4"),o($e,"class","alert alert-info shadow-sm text-xs")},m(ot,ct){j(ot,l,ct),s(l,e),s(e,n),s(n,i),s(l,u),s(l,c),Q(c,t[4]),s(l,d),s(l,p),s(p,m),s(m,b),j(ot,v,ct),j(ot,w,ct),s(w,C),s(w,E),s(w,y),s(y,S),s(w,q),s(w,D),s(D,H),s(H,I),s(I,R),s(H,L),s(H,A),s(A,Z),s(D,Y),s(D,x),s(x,F),s(F,K),s(K,M),s(M,U),s(F,O),s(F,J),Q(J,t[5]),s(F,ie),s(F,ue),s(ue,ne),s(ne,te),s(x,re),s(x,ee),s(ee,G),s(G,pe),s(pe,ge),s(ee,he),s(ee,ye),Q(ye,t[6]),s(ee,Fe),s(ee,je),s(je,we),s(we,Je),s(x,Le),s(x,Pe),s(Pe,Me),s(Me,fe),s(fe,Be),s(Pe,De),s(Pe,se),Q(se,t[7]),s(Pe,ke),s(Pe,me),s(me,Ee),s(Ee,Ie),s(x,nt),s(x,Ne),s(Ne,Ye),s(Ye,Qe),s(Qe,de),s(Ne,Te),s(Ne,Ze),Q(Ze,t[8]),s(Ne,Se),s(Ne,Ue),s(Ue,Ce),s(Ce,Ge),s(x,ce),s(x,qe),s(qe,Re),s(Re,dt),s(dt,z),s(qe,He),s(qe,X),Q(X,t[9]),s(qe,ft),s(qe,Ht),s(Ht,Ke),s(Ke,lt),s(x,it),s(x,ze),s(ze,Xe),s(Xe,Bt),s(Bt,gt),s(ze,wt),s(ze,pt),Q(pt,t[10]),s(ze,vl),s(ze,rt),s(rt,Mt),s(Mt,Tt),j(ot,kl,ct),j(ot,Ot,ct),s(Ot,hl),s(Ot,ml),s(Ot,ql),s(ql,Ql),s(Ot,Qt),s(Ot,Yt),s(Yt,Hl),s(Hl,Il),s(Il,gl),s(Hl,ol),s(Hl,Yl),s(Yl,Pl),s(Yt,Vl),s(Yt,Jl),s(Jl,El),s(El,zt),zt.checked=t[11],s(El,Zl),s(El,Pt),s(Pt,Ll),s(Yt,$l),ul&&ul.m(Yt,null),j(ot,xt,ct),j(ot,wl,ct),s(wl,es),s(wl,Fl),s(wl,Bl),s(Bl,Ps),s(wl,nl),s(wl,yl),s(yl,rl),s(rl,zl),s(zl,al),s(rl,_l),s(rl,ll),s(ll,Nl),s(yl,Tl),s(yl,Wt),s(Wt,It),s(It,jt),jt.checked=t[19],s(It,$t),s(It,el),s(el,Zt),s(yl,il),Nt&&Nt.m(yl,null),j(ot,Xt,ct),j(ot,$e,ct),s($e,Al),s(Al,ts),s($e,Xl),s($e,xl),s(xl,Ds),ss||(zs=[V(c,"input",t[28]),V(J,"input",t[29]),V(ye,"input",t[30]),V(se,"input",t[31]),V(Ze,"input",t[32]),V(X,"input",t[33]),V(pt,"input",t[34]),V(zt,"change",t[35]),V(jt,"change",t[43])],ss=!0)},p(ot,ct){ct[0]&4194304&&r!==(r=ot[22]("routeEditor.retryableStatusCodes")+"")&&k(i,r),ct[0]&4194304&&f!==(f=ot[22]("routeEditor.retryableStatusCodesPlaceholder"))&&o(c,"placeholder",f),ct[0]&16&&c.value!==ot[4]&&Q(c,ot[4]),ct[0]&4194304&&g!==(g=ot[22]("routeEditor.retryableStatusCodesHelp")+"")&&k(b,g),ct[0]&4194304&&T!==(T=ot[22]("routeEditor.passiveHealthCheck")+"")&&k(S,T),ct[0]&4194304&&N!==(N=ot[22]("routeEditor.passiveHealthCheckTooltip")+"")&&k(Z,N),ct[0]&4194304&&B!==(B=ot[22]("routeEditor.consecutiveFailuresThreshold")+"")&&k(U,B),ct[0]&32&&St(J.value)!==ot[5]&&Q(J,ot[5]),ct[0]&4194304&&$!==($=ot[22]("routeEditor.consecutiveFailuresThresholdHelp")+"")&&k(te,$),ct[0]&4194304&&oe!==(oe=ot[22]("routeEditor.healthyThreshold")+"")&&k(ge,oe),ct[0]&64&&St(ye.value)!==ot[6]&&Q(ye,ot[6]),ct[0]&4194304&&Oe!==(Oe=ot[22]("routeEditor.healthyThresholdHelp")+"")&&k(Je,Oe),ct[0]&4194304&&_e!==(_e=ot[22]("routeEditor.requestTimeoutMs")+"")&&k(Be,_e),ct[0]&128&&St(se.value)!==ot[7]&&Q(se,ot[7]),ct[0]&4194304&&Ve!==(Ve=ot[22]("routeEditor.requestTimeoutMsHelp")+"")&&k(Ie,Ve),ct[0]&4194304&&ve!==(ve=ot[22]("routeEditor.connectTimeoutMs")+"")&&k(de,ve),ct[0]&256&&St(Ze.value)!==ot[8]&&Q(Ze,ot[8]),ct[0]&4194304&&mt!==(mt=ot[22]("routeEditor.connectTimeoutMsHelp")+"")&&k(Ge,mt),ct[0]&4194304&&We!==(We=ot[22]("routeEditor.recoveryIntervalMs")+"")&&k(z,We),ct[0]&512&&St(X.value)!==ot[9]&&Q(X,ot[9]),ct[0]&4194304&&_t!==(_t=ot[22]("routeEditor.recoveryIntervalHelp")+"")&&k(lt,_t),ct[0]&4194304&&at!==(at=ot[22]("routeEditor.recoveryTimeoutMs")+"")&&k(gt,at),ct[0]&1024&&St(pt.value)!==ot[10]&&Q(pt,ot[10]),ct[0]&4194304&&ht!==(ht=ot[22]("routeEditor.recoveryTimeoutHelp")+"")&&k(Tt,ht),ct[0]&4194304&&Jt!==(Jt=ot[22]("routeEditor.activeHealthCheck")+"")&&k(Ql,Jt),ct[0]&4194304&&Ft!==(Ft=ot[22]("routeEditor.activeHealthCheckTooltip")+"")&&k(Pl,Ft),ct[0]&2048&&(zt.checked=ot[11]),ct[0]&4194304&&jl!==(jl=ot[22]("routeEditor.enableActiveHealthCheck")+"")&&k(Ll,jl),ot[11]?ul?ul.p(ot,ct):(ul=Hd(ot),ul.c(),ul.m(Yt,null)):ul&&(ul.d(1),ul=null),ct[0]&4194304&&Wl!==(Wl=ot[22]("routeEditor.slowStart")+"")&&k(Ps,Wl),ct[0]&4194304&&Dl!==(Dl=ot[22]("routeEditor.slowStartTooltip")+"")&&k(Nl,Dl),ct[0]&524288&&(jt.checked=ot[19]),ct[0]&4194304&&Kt!==(Kt=ot[22]("routeEditor.enableSlowStart")+"")&&k(Zt,Kt),ot[19]?Nt?Nt.p(ot,ct):(Nt=Pd(ot),Nt.c(),Nt.m(yl,null)):Nt&&(Nt.d(1),Nt=null),ct[0]&4194304&&ls!==(ls=ot[22]("routeEditor.failoverInfoNotice")+"")&&k(Ds,ls)},d(ot){ot&&(P(l),P(v),P(w),P(kl),P(Ot),P(xt),P(wl),P(Xt),P($e)),ul&&ul.d(),Nt&&Nt.d(),ss=!1,bt(zs)}}}function Hd(t){let l,e,n,r,i=t[22]("routeEditor.healthCheckIntervalMs")+"",u,c,f,d,p,m,g=t[22]("routeEditor.healthCheckIntervalMsHelp")+"",b,v,w,C,E,y=t[22]("routeEditor.healthCheckTimeoutMs")+"",T,S,q,D,H,I,R=t[22]("routeEditor.healthCheckTimeoutMsHelp")+"",L,A,N,Z,Y,x=t[22]("routeEditor.healthCheckPath")+"",F,K,M,B,U,O,J=t[22]("routeEditor.healthCheckPathHelp")+"",ie,ue,ne,$,te,re=t[22]("routeEditor.healthCheckMethod")+"",ee,G,pe,oe,ge,he,ye,Fe,je,we,Oe,Je=t[22]("routeEditor.healthCheckExpectedStatus")+"",Le,Pe,Me,fe,_e,Be,De=t[22]("routeEditor.healthCheckExpectedStatusHelp")+"",se,ke,me,Ee,Ve,Ie=t[22]("routeEditor.healthCheckUnhealthyThreshold")+"",nt,Ne,Ye,Qe,ve,de,Te=t[22]("routeEditor.healthCheckUnhealthyThresholdHelp")+"",Ze,Se,Ue,Ce,mt,Ge=t[22]("routeEditor.healthCheckHealthyThreshold")+"",ce,qe,Re,dt,We,z,He=t[22]("routeEditor.healthCheckHealthyThresholdHelp")+"",X,ft,Ht;return{c(){l=a("div"),e=a("div"),n=a("label"),r=a("span"),u=_(i),c=h(),f=a("input"),d=h(),p=a("div"),m=a("span"),b=_(g),v=h(),w=a("div"),C=a("label"),E=a("span"),T=_(y),S=h(),q=a("input"),D=h(),H=a("div"),I=a("span"),L=_(R),A=h(),N=a("div"),Z=a("label"),Y=a("span"),F=_(x),K=h(),M=a("input"),B=h(),U=a("div"),O=a("span"),ie=_(J),ue=h(),ne=a("div"),$=a("label"),te=a("span"),ee=_(re),G=h(),pe=a("select"),oe=a("option"),oe.textContent="GET (default)",ge=a("option"),ge.textContent="GET",he=a("option"),he.textContent="POST",ye=a("option"),ye.textContent="HEAD",Fe=h(),je=a("div"),we=a("label"),Oe=a("span"),Le=_(Je),Pe=h(),Me=a("input"),fe=h(),_e=a("div"),Be=a("span"),se=_(De),ke=h(),me=a("div"),Ee=a("label"),Ve=a("span"),nt=_(Ie),Ne=h(),Ye=a("input"),Qe=h(),ve=a("div"),de=a("span"),Ze=_(Te),Se=h(),Ue=a("div"),Ce=a("label"),mt=a("span"),ce=_(Ge),qe=h(),Re=a("input"),dt=h(),We=a("div"),z=a("span"),X=_(He),o(r,"class","label-text"),o(n,"class","label"),o(n,"for","health-check-interval-ms"),o(f,"id","health-check-interval-ms"),o(f,"type","number"),o(f,"placeholder","10000"),o(f,"class","input input-bordered input-sm"),o(f,"min","1000"),o(m,"class","label-text-alt text-xs"),o(p,"class","label"),o(e,"class","form-control"),o(E,"class","label-text"),o(C,"class","label"),o(C,"for","health-check-timeout-ms"),o(q,"id","health-check-timeout-ms"),o(q,"type","number"),o(q,"placeholder","3000"),o(q,"class","input input-bordered input-sm"),o(q,"min","100"),o(I,"class","label-text-alt text-xs"),o(H,"class","label"),o(w,"class","form-control"),o(Y,"class","label-text"),o(Z,"class","label"),o(Z,"for","health-check-path"),o(M,"id","health-check-path"),o(M,"type","text"),o(M,"placeholder","/health"),o(M,"class","input input-bordered input-sm"),o(O,"class","label-text-alt text-xs"),o(U,"class","label"),o(N,"class","form-control"),o(te,"class","label-text"),o($,"class","label"),o($,"for","health-check-method"),oe.__value="",Q(oe,oe.__value),ge.__value="GET",Q(ge,ge.__value),he.__value="POST",Q(he,he.__value),ye.__value="HEAD",Q(ye,ye.__value),o(pe,"id","health-check-method"),o(pe,"class","select select-bordered select-sm"),t[15]===void 0&&tl(()=>t[39].call(pe)),o(ne,"class","form-control"),o(Oe,"class","label-text"),o(we,"class","label"),o(we,"for","health-check-expected-status"),o(Me,"id","health-check-expected-status"),o(Me,"type","text"),o(Me,"placeholder","200"),o(Me,"class","input input-bordered input-sm"),o(Be,"class","label-text-alt text-xs"),o(_e,"class","label"),o(je,"class","form-control"),o(Ve,"class","label-text"),o(Ee,"class","label"),o(Ee,"for","health-check-unhealthy-threshold"),o(Ye,"id","health-check-unhealthy-threshold"),o(Ye,"type","number"),o(Ye,"placeholder","3"),o(Ye,"class","input input-bordered input-sm"),o(Ye,"min","1"),o(de,"class","label-text-alt text-xs"),o(ve,"class","label"),o(me,"class","form-control"),o(mt,"class","label-text"),o(Ce,"class","label"),o(Ce,"for","health-check-healthy-threshold"),o(Re,"id","health-check-healthy-threshold"),o(Re,"type","number"),o(Re,"placeholder","2"),o(Re,"class","input input-bordered input-sm"),o(Re,"min","1"),o(z,"class","label-text-alt text-xs"),o(We,"class","label"),o(Ue,"class","form-control"),o(l,"class","grid grid-cols-1 md:grid-cols-2 gap-4")},m(Ke,_t){j(Ke,l,_t),s(l,e),s(e,n),s(n,r),s(r,u),s(e,c),s(e,f),Q(f,t[12]),s(e,d),s(e,p),s(p,m),s(m,b),s(l,v),s(l,w),s(w,C),s(C,E),s(E,T),s(w,S),s(w,q),Q(q,t[13]),s(w,D),s(w,H),s(H,I),s(I,L),s(l,A),s(l,N),s(N,Z),s(Z,Y),s(Y,F),s(N,K),s(N,M),Q(M,t[14]),s(N,B),s(N,U),s(U,O),s(O,ie),s(l,ue),s(l,ne),s(ne,$),s($,te),s(te,ee),s(ne,G),s(ne,pe),s(pe,oe),s(pe,ge),s(pe,he),s(pe,ye),kt(pe,t[15],!0),s(l,Fe),s(l,je),s(je,we),s(we,Oe),s(Oe,Le),s(je,Pe),s(je,Me),Q(Me,t[16]),s(je,fe),s(je,_e),s(_e,Be),s(Be,se),s(l,ke),s(l,me),s(me,Ee),s(Ee,Ve),s(Ve,nt),s(me,Ne),s(me,Ye),Q(Ye,t[17]),s(me,Qe),s(me,ve),s(ve,de),s(de,Ze),s(l,Se),s(l,Ue),s(Ue,Ce),s(Ce,mt),s(mt,ce),s(Ue,qe),s(Ue,Re),Q(Re,t[18]),s(Ue,dt),s(Ue,We),s(We,z),s(z,X),ft||(Ht=[V(f,"input",t[36]),V(q,"input",t[37]),V(M,"input",t[38]),V(pe,"change",t[39]),V(Me,"input",t[40]),V(Ye,"input",t[41]),V(Re,"input",t[42])],ft=!0)},p(Ke,_t){_t[0]&4194304&&i!==(i=Ke[22]("routeEditor.healthCheckIntervalMs")+"")&&k(u,i),_t[0]&4096&&St(f.value)!==Ke[12]&&Q(f,Ke[12]),_t[0]&4194304&&g!==(g=Ke[22]("routeEditor.healthCheckIntervalMsHelp")+"")&&k(b,g),_t[0]&4194304&&y!==(y=Ke[22]("routeEditor.healthCheckTimeoutMs")+"")&&k(T,y),_t[0]&8192&&St(q.value)!==Ke[13]&&Q(q,Ke[13]),_t[0]&4194304&&R!==(R=Ke[22]("routeEditor.healthCheckTimeoutMsHelp")+"")&&k(L,R),_t[0]&4194304&&x!==(x=Ke[22]("routeEditor.healthCheckPath")+"")&&k(F,x),_t[0]&16384&&M.value!==Ke[14]&&Q(M,Ke[14]),_t[0]&4194304&&J!==(J=Ke[22]("routeEditor.healthCheckPathHelp")+"")&&k(ie,J),_t[0]&4194304&&re!==(re=Ke[22]("routeEditor.healthCheckMethod")+"")&&k(ee,re),_t[0]&32768&&kt(pe,Ke[15]),_t[0]&4194304&&Je!==(Je=Ke[22]("routeEditor.healthCheckExpectedStatus")+"")&&k(Le,Je),_t[0]&65536&&Me.value!==Ke[16]&&Q(Me,Ke[16]),_t[0]&4194304&&De!==(De=Ke[22]("routeEditor.healthCheckExpectedStatusHelp")+"")&&k(se,De),_t[0]&4194304&&Ie!==(Ie=Ke[22]("routeEditor.healthCheckUnhealthyThreshold")+"")&&k(nt,Ie),_t[0]&131072&&St(Ye.value)!==Ke[17]&&Q(Ye,Ke[17]),_t[0]&4194304&&Te!==(Te=Ke[22]("routeEditor.healthCheckUnhealthyThresholdHelp")+"")&&k(Ze,Te),_t[0]&4194304&&Ge!==(Ge=Ke[22]("routeEditor.healthCheckHealthyThreshold")+"")&&k(ce,Ge),_t[0]&262144&&St(Re.value)!==Ke[18]&&Q(Re,Ke[18]),_t[0]&4194304&&He!==(He=Ke[22]("routeEditor.healthCheckHealthyThresholdHelp")+"")&&k(X,He)},d(Ke){Ke&&P(l),ft=!1,bt(Ht)}}}function Pd(t){let l,e,n,r,i=t[22]("routeEditor.slowStartDurationMs")+"",u,c,f,d,p,m,g=t[22]("routeEditor.slowStartDurationMsHelp")+"",b,v,w,C,E,y=t[22]("routeEditor.slowStartInitialWeightFactor")+"",T,S,q,D,H,I,R=t[22]("routeEditor.slowStartInitialWeightFactorHelp")+"",L,A,N;return{c(){l=a("div"),e=a("div"),n=a("label"),r=a("span"),u=_(i),c=h(),f=a("input"),d=h(),p=a("div"),m=a("span"),b=_(g),v=h(),w=a("div"),C=a("label"),E=a("span"),T=_(y),S=h(),q=a("input"),D=h(),H=a("div"),I=a("span"),L=_(R),o(r,"class","label-text"),o(n,"class","label"),o(n,"for","slow-start-duration-ms"),o(f,"id","slow-start-duration-ms"),o(f,"type","number"),o(f,"placeholder","30000"),o(f,"class","input input-bordered input-sm"),o(f,"min","1000"),o(m,"class","label-text-alt text-xs"),o(p,"class","label"),o(e,"class","form-control"),o(E,"class","label-text"),o(C,"class","label"),o(C,"for","slow-start-initial-weight-factor"),o(q,"id","slow-start-initial-weight-factor"),o(q,"type","number"),o(q,"placeholder","0.1"),o(q,"class","input input-bordered input-sm"),o(q,"min","0.01"),o(q,"max","1"),o(q,"step","0.01"),o(I,"class","label-text-alt text-xs"),o(H,"class","label"),o(w,"class","form-control"),o(l,"class","grid grid-cols-1 md:grid-cols-2 gap-4")},m(Z,Y){j(Z,l,Y),s(l,e),s(e,n),s(n,r),s(r,u),s(e,c),s(e,f),Q(f,t[20]),s(e,d),s(e,p),s(p,m),s(m,b),s(l,v),s(l,w),s(w,C),s(C,E),s(E,T),s(w,S),s(w,q),Q(q,t[21]),s(w,D),s(w,H),s(H,I),s(I,L),A||(N=[V(f,"input",t[44]),V(q,"input",t[45])],A=!0)},p(Z,Y){Y[0]&4194304&&i!==(i=Z[22]("routeEditor.slowStartDurationMs")+"")&&k(u,i),Y[0]&1048576&&St(f.value)!==Z[20]&&Q(f,Z[20]),Y[0]&4194304&&g!==(g=Z[22]("routeEditor.slowStartDurationMsHelp")+"")&&k(b,g),Y[0]&4194304&&y!==(y=Z[22]("routeEditor.slowStartInitialWeightFactor")+"")&&k(T,y),Y[0]&2097152&&St(q.value)!==Z[21]&&Q(q,Z[21]),Y[0]&4194304&&R!==(R=Z[22]("routeEditor.slowStartInitialWeightFactorHelp")+"")&&k(L,R)},d(Z){Z&&P(l),A=!1,bt(N)}}}function t_(t){let l,e,n,r,i,u,c,f,d,p,m,g,b=t[22]("routeEditor.enableFailover")+"",v,w,C,E,y=t[1]&&Rd(t),T=t[2]&&qd(t);return{c(){l=a("div"),e=a("div"),n=a("span"),r=_(t[0]),i=h(),y&&y.c(),u=h(),c=a("div"),f=a("div"),d=a("label"),p=a("input"),m=h(),g=a("span"),v=_(b),w=h(),T&&T.c(),o(n,"class","label-text font-semibold"),o(e,"class","label"),o(p,"type","checkbox"),o(p,"class","checkbox"),o(g,"class","label-text"),o(d,"class","label cursor-pointer justify-start gap-4"),o(f,"class","form-control"),o(c,"class","space-y-4"),o(l,"class","form-control w-full")},m(S,q){j(S,l,q),s(l,e),s(e,n),s(n,r),s(e,i),y&&y.m(e,null),s(l,u),s(l,c),s(c,f),s(f,d),s(d,p),p.checked=t[2],s(d,m),s(d,g),s(g,v),s(c,w),T&&T.m(c,null),C||(E=[V(p,"change",t[26]),V(p,"change",t[27])],C=!0)},p(S,q){q[0]&1&&k(r,S[0]),S[1]?y?y.p(S,q):(y=Rd(S),y.c(),y.m(e,null)):y&&(y.d(1),y=null),q[0]&4&&(p.checked=S[2]),q[0]&4194304&&b!==(b=S[22]("routeEditor.enableFailover")+"")&&k(v,b),S[2]?T?T.p(S,q):(T=qd(S),T.c(),T.m(c,null)):T&&(T.d(1),T=null)},i:tt,o:tt,d(S){S&&P(l),y&&y.d(),T&&T.d(),C=!1,bt(E)}}}function jd(t){return t.split(",").map(l=>parseInt(l.trim())).filter(l=>!isNaN(l)&&l>=100&&l<600)}function l_(t,l,e){let n;Dt(t,Rt,ge=>e(22,n=ge));let{value:r=void 0}=l,{label:i="Failover"}=l,{showHelp:u=!0}=l,c=!1,f=!1,d=[],p="",m,g,b,v,w,C,E=!1,y,T,S,q,D=[],H="",I,R,L=!1,A,N;function Z(){c=this.checked,e(2,c),e(3,f),e(23,r),e(24,d),e(25,D),e(5,m),e(6,g),e(7,b),e(8,v),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,S),e(15,q),e(17,I),e(18,R),e(19,L),e(20,A),e(21,N),e(4,p),e(16,H)}const Y=()=>{e(3,f=!0)};function x(){p=this.value,e(4,p),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(5,m),e(6,g),e(7,b),e(8,v),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,S),e(15,q),e(17,I),e(18,R),e(19,L),e(20,A),e(21,N),e(16,H)}function F(){m=St(this.value),e(5,m),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(6,g),e(7,b),e(8,v),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,S),e(15,q),e(17,I),e(18,R),e(19,L),e(20,A),e(21,N),e(4,p),e(16,H)}function K(){g=St(this.value),e(6,g),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(5,m),e(7,b),e(8,v),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,S),e(15,q),e(17,I),e(18,R),e(19,L),e(20,A),e(21,N),e(4,p),e(16,H)}function M(){b=St(this.value),e(7,b),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(5,m),e(6,g),e(8,v),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,S),e(15,q),e(17,I),e(18,R),e(19,L),e(20,A),e(21,N),e(4,p),e(16,H)}function B(){v=St(this.value),e(8,v),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(5,m),e(6,g),e(7,b),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,S),e(15,q),e(17,I),e(18,R),e(19,L),e(20,A),e(21,N),e(4,p),e(16,H)}function U(){w=St(this.value),e(9,w),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(5,m),e(6,g),e(7,b),e(8,v),e(10,C),e(11,E),e(12,y),e(13,T),e(14,S),e(15,q),e(17,I),e(18,R),e(19,L),e(20,A),e(21,N),e(4,p),e(16,H)}function O(){C=St(this.value),e(10,C),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(5,m),e(6,g),e(7,b),e(8,v),e(9,w),e(11,E),e(12,y),e(13,T),e(14,S),e(15,q),e(17,I),e(18,R),e(19,L),e(20,A),e(21,N),e(4,p),e(16,H)}function J(){E=this.checked,e(11,E),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(5,m),e(6,g),e(7,b),e(8,v),e(9,w),e(10,C),e(12,y),e(13,T),e(14,S),e(15,q),e(17,I),e(18,R),e(19,L),e(20,A),e(21,N),e(4,p),e(16,H)}function ie(){y=St(this.value),e(12,y),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(5,m),e(6,g),e(7,b),e(8,v),e(9,w),e(10,C),e(11,E),e(13,T),e(14,S),e(15,q),e(17,I),e(18,R),e(19,L),e(20,A),e(21,N),e(4,p),e(16,H)}function ue(){T=St(this.value),e(13,T),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(5,m),e(6,g),e(7,b),e(8,v),e(9,w),e(10,C),e(11,E),e(12,y),e(14,S),e(15,q),e(17,I),e(18,R),e(19,L),e(20,A),e(21,N),e(4,p),e(16,H)}function ne(){S=this.value,e(14,S),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(5,m),e(6,g),e(7,b),e(8,v),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(15,q),e(17,I),e(18,R),e(19,L),e(20,A),e(21,N),e(4,p),e(16,H)}function $(){q=pl(this),e(15,q),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(5,m),e(6,g),e(7,b),e(8,v),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,S),e(17,I),e(18,R),e(19,L),e(20,A),e(21,N),e(4,p),e(16,H)}function te(){H=this.value,e(16,H),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(5,m),e(6,g),e(7,b),e(8,v),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,S),e(15,q),e(17,I),e(18,R),e(19,L),e(20,A),e(21,N),e(4,p)}function re(){I=St(this.value),e(17,I),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(5,m),e(6,g),e(7,b),e(8,v),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,S),e(15,q),e(18,R),e(19,L),e(20,A),e(21,N),e(4,p),e(16,H)}function ee(){R=St(this.value),e(18,R),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(5,m),e(6,g),e(7,b),e(8,v),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,S),e(15,q),e(17,I),e(19,L),e(20,A),e(21,N),e(4,p),e(16,H)}function G(){L=this.checked,e(19,L),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(5,m),e(6,g),e(7,b),e(8,v),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,S),e(15,q),e(17,I),e(18,R),e(20,A),e(21,N),e(4,p),e(16,H)}function pe(){A=St(this.value),e(20,A),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(5,m),e(6,g),e(7,b),e(8,v),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,S),e(15,q),e(17,I),e(18,R),e(19,L),e(21,N),e(4,p),e(16,H)}function oe(){N=St(this.value),e(21,N),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(5,m),e(6,g),e(7,b),e(8,v),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,S),e(15,q),e(17,I),e(18,R),e(19,L),e(20,A),e(4,p),e(16,H)}return t.$$set=ge=>{"value"in ge&&e(23,r=ge.value),"label"in ge&&e(0,i=ge.label),"showHelp"in ge&&e(1,u=ge.showHelp)},t.$$.update=()=>{t.$$.dirty[0]&62849004&&(!f&&r&&(e(2,c=r.enabled||!1),e(24,d=r.retryableStatusCodes||[500,502,503,504]),e(4,p=d.join(", ")),e(5,m=r.consecutiveFailuresThreshold),e(6,g=r.healthyThreshold),e(7,b=r.requestTimeoutMs),e(8,v=r.connectTimeoutMs),e(9,w=r.recoveryIntervalMs),e(10,C=r.recoveryTimeoutMs),r.healthCheck&&(e(11,E=r.healthCheck.enabled||!1),e(12,y=r.healthCheck.intervalMs),e(13,T=r.healthCheck.timeoutMs),e(14,S=r.healthCheck.path),e(15,q=r.healthCheck.method),e(25,D=r.healthCheck.expectedStatus||[200]),e(16,H=D.join(", ")),e(17,I=r.healthCheck.unhealthyThreshold),e(18,R=r.healthCheck.healthyThreshold)),r.slowStart&&(e(19,L=r.slowStart.enabled||!1),e(20,A=r.slowStart.durationMs),e(21,N=r.slowStart.initialWeightFactor)),e(3,f=!0)),c?r?(e(23,r.enabled=!0,r),e(23,r.retryableStatusCodes=d.length>0?d:[500,502,503,504],r),m!==void 0&&e(23,r.consecutiveFailuresThreshold=m,r),g!==void 0&&e(23,r.healthyThreshold=g,r),b!==void 0&&e(23,r.requestTimeoutMs=b,r),v!==void 0&&e(23,r.connectTimeoutMs=v,r),w!==void 0&&e(23,r.recoveryIntervalMs=w,r),C!==void 0&&e(23,r.recoveryTimeoutMs=C,r),E?e(23,r.healthCheck={enabled:!0,intervalMs:y,timeoutMs:T,path:S,method:q,expectedStatus:D.length>0?D:[200],unhealthyThreshold:I,healthyThreshold:R},r):e(23,r.healthCheck=void 0,r),L?e(23,r.slowStart={enabled:!0,durationMs:A,initialWeightFactor:N},r):e(23,r.slowStart=void 0,r)):e(23,r={enabled:!0,retryableStatusCodes:d.length>0?d:[500,502,503,504]}):e(23,r=void 0)),t.$$.dirty[0]&16&&e(24,d=jd(p)),t.$$.dirty[0]&65536&&e(25,D=jd(H))},[i,u,c,f,p,m,g,b,v,w,C,E,y,T,S,q,H,I,R,L,A,N,n,r,d,D,Z,Y,x,F,K,M,B,U,O,J,ie,ue,ne,$,te,re,ee,G,pe,oe]}class s_ extends Vt{constructor(l){super(),Ut(this,l,l_,t_,At,{value:23,label:0,showHelp:1},null,[-1,-1])}}function o_(t){let l,e,n,r=t[1]("routeEditor.failoverTitle")+"",i,u,c,f=t[1]("routeEditor.failoverHelp")+"",d,p,m,g,b;function v(C){t[2](C)}let w={label:t[1]("routeEditor.failoverTitle"),showHelp:!0,showLabel:!1};return t[0].failover!==void 0&&(w.value=t[0].failover),m=new s_({props:w}),bl.push(()=>Rl(m,"value",v)),{c(){l=a("div"),e=a("div"),n=a("h3"),i=_(r),u=h(),c=a("p"),d=_(f),p=h(),Et(m.$$.fragment),o(n,"class","text-lg font-semibold"),o(c,"class","text-sm text-gray-500 mt-1"),o(l,"class","space-y-4")},m(C,E){j(C,l,E),s(l,e),s(e,n),s(n,i),s(e,u),s(e,c),s(c,d),s(l,p),yt(m,l,null),b=!0},p(C,[E]){(!b||E&2)&&r!==(r=C[1]("routeEditor.failoverTitle")+"")&&k(i,r),(!b||E&2)&&f!==(f=C[1]("routeEditor.failoverHelp")+"")&&k(d,f);const y={};E&2&&(y.label=C[1]("routeEditor.failoverTitle")),!g&&E&1&&(g=!0,y.value=C[0].failover,Sl(()=>g=!1)),m.$set(y)},i(C){b||(et(m.$$.fragment,C),b=!0)},o(C){st(m.$$.fragment,C),b=!1},d(C){C&&P(l),Ct(m)}}}function n_(t,l,e){let n;Dt(t,Rt,u=>e(1,n=u));let{route:r}=l;function i(u){t.$$.not_equal(r.failover,u)&&(r.failover=u,e(0,r))}return t.$$set=u=>{"route"in u&&e(0,r=u.route)},[r,n,i]}class r_ extends Vt{constructor(l){super(),Ut(this,l,n_,o_,At,{route:0})}}function Ld(t,l,e){const n=t.slice();return n[8]=l[e],n[10]=e,n}function Dd(t){let l;return{c(){l=a("span"),l.textContent="Transformer",o(l,"class","badge badge-xs badge-info ml-2")},m(e,n){j(e,l,n)},d(e){e&&P(l)}}}function Id(t){let l,e,n=(t[8].priority||t[10]+1)+"",r,i,u,c,f=(t[8].target||t[4]("routeEditor.notSet"))+"",d,p,m,g,b=t[4]("upstream.weight")+"",v,w,C=(t[8].weight||100)+"",E,y,T,S=t[8].plugins&&t[8].plugins.length>0&&Dd();return{c(){l=a("div"),e=a("div"),r=_(n),i=h(),u=a("div"),c=a("div"),d=_(f),m=h(),g=a("div"),v=_(b),w=_(": "),E=_(C),y=h(),S&&S.c(),T=h(),o(e,"class","badge badge-primary"),o(c,"class","font-medium text-sm truncate"),o(c,"title",p=t[8].target),o(g,"class","text-xs text-gray-500"),o(u,"class","flex-1"),o(l,"class","flex items-center gap-3 p-3 bg-base-100 rounded-lg")},m(q,D){j(q,l,D),s(l,e),s(e,r),s(l,i),s(l,u),s(u,c),s(c,d),s(u,m),s(u,g),s(g,v),s(g,w),s(g,E),s(g,y),S&&S.m(g,null),s(l,T)},p(q,D){D&1&&n!==(n=(q[8].priority||q[10]+1)+"")&&k(r,n),D&17&&f!==(f=(q[8].target||q[4]("routeEditor.notSet"))+"")&&k(d,f),D&1&&p!==(p=q[8].target)&&o(c,"title",p),D&16&&b!==(b=q[4]("upstream.weight")+"")&&k(v,b),D&1&&C!==(C=(q[8].weight||100)+"")&&k(E,C),q[8].plugins&&q[8].plugins.length>0?S||(S=Dd(),S.c(),S.m(g,null)):S&&(S.d(1),S=null)},d(q){q&&P(l),S&&S.d()}}}function Bd(t){let l,e,n,r,i,u,c,f,d,p,m=t[4]("common.copy")+"",g,b,v;return{c(){l=a("div"),e=a("pre"),n=a("code"),r=_(t[3]),i=h(),u=a("div"),c=a("button"),f=ae("svg"),d=ae("path"),p=h(),g=_(m),o(l,"class","mockup-code mt-4"),o(d,"stroke-linecap","round"),o(d,"stroke-linejoin","round"),o(d,"stroke-width","2"),o(d,"d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"),o(f,"xmlns","http://www.w3.org/2000/svg"),o(f,"class","h-4 w-4"),o(f,"fill","none"),o(f,"viewBox","0 0 24 24"),o(f,"stroke","currentColor"),o(c,"type","button"),o(c,"class","btn btn-sm btn-outline"),o(u,"class","card-actions justify-end mt-4")},m(w,C){j(w,l,C),s(l,e),s(e,n),s(n,r),j(w,i,C),j(w,u,C),s(u,c),s(c,f),s(f,d),s(c,p),s(c,g),b||(v=V(c,"click",t[7]),b=!0)},p(w,C){C&8&&k(r,w[3]),C&16&&m!==(m=w[4]("common.copy")+"")&&k(g,m)},d(w){w&&(P(l),P(i),P(u)),b=!1,v()}}}function Ad(t){let l,e,n,r,i=t[4]("auth.routeAuth")+"",u;return{c(){l=a("div"),e=a("div"),e.textContent="\u2713",n=h(),r=a("div"),u=_(i),o(e,"class","badge badge-sm badge-success"),o(r,"class","text-sm"),o(l,"class","flex items-center gap-3")},m(c,f){j(c,l,f),s(l,e),s(l,n),s(l,r),s(r,u)},p(c,f){f&16&&i!==(i=c[4]("auth.routeAuth")+"")&&k(u,i)},d(c){c&&P(l)}}}function Od(t){let l,e,n,r,i=t[4]("routeEditor.pathRewrite")+"",u;return{c(){l=a("div"),e=a("div"),e.textContent="\u2192",n=h(),r=a("div"),u=_(i),o(e,"class","badge badge-sm badge-info"),o(r,"class","text-sm"),o(l,"class","flex items-center gap-3")},m(c,f){j(c,l,f),s(l,e),s(l,n),s(l,r),s(r,u)},p(c,f){f&16&&i!==(i=c[4]("routeEditor.pathRewrite")+"")&&k(u,i)},d(c){c&&P(l)}}}function Fd(t){let l,e,n,r,i=t[4]("routeEditor.transformer")+"",u;return{c(){l=a("div"),e=a("div"),e.textContent="\u26A1",n=h(),r=a("div"),u=_(i),o(e,"class","badge badge-sm badge-warning"),o(r,"class","text-sm"),o(l,"class","flex items-center gap-3")},m(c,f){j(c,l,f),s(l,e),s(l,n),s(l,r),s(r,u)},p(c,f){f&16&&i!==(i=c[4]("routeEditor.transformer")+"")&&k(u,i)},d(c){c&&P(l)}}}function zd(t){let l,e=t[4]("routeEditor.failoverEnabled")+"",n;return{c(){l=a("span"),n=_(e),o(l,"class","badge badge-xs badge-success ml-1")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i&16&&e!==(e=r[4]("routeEditor.failoverEnabled")+"")&&k(n,e)},d(r){r&&P(l)}}}function a_(t){let l,e,n,r=t[4]("routeEditor.preview")+"",i,u,c,f=t[4]("routeEditor.previewHelp")+"",d,p,m,g,b,v=t[4]("routeEditor.upstreams")+"",w,C,E,y=t[2].upstreamsCount+"",T,S,q,D=t[4]("routeEditor.totalWeight")+"",H,I,R=t[2].totalWeight+"",L,A,N,Z,Y=t[4]("routeEditor.features")+"",x,F,K,M=[t[2].hasAuth,t[2].hasFailover,t[2].hasTransformer,t[2].hasPathRewrite].filter(Boolean).length+"",B,U,O,J=t[4]("routeEditor.featuresEnabled")+"",ie,ue,ne,$,te=t[4]("routes.path")+"",re,ee,G,pe=(t[0].path||t[4]("routeEditor.notSet"))+"",oe,ge,he,ye,Fe=t[4]("routeEditor.routePath")+"",je,we,Oe,Je,Le,Pe=t[4]("routeEditor.enabledFeatures")+"",Me,fe,_e,Be,De,se=t[2].hasAuth?"\u2713":"\u25CB",ke,me,Ee,Ve,Ie=t[4]("auth.routeAuth")+"",nt,Ne,Ye,Qe,ve=t[2].hasFailover?"\u2713":"\u25CB",de,Te,Ze,Se,Ue=t[4]("routeEditor.failoverTitle")+"",Ce,mt,Ge,ce,qe=t[2].hasTransformer?"\u2713":"\u25CB",Re,dt,We,z,He=t[4]("routeEditor.transformer")+"",X,ft,Ht,Ke,_t=t[2].hasPathRewrite?"\u2713":"\u25CB",lt,it,ze,Xe,Bt=t[4]("routeEditor.pathRewrite")+"",at,gt,wt,pt,vl,rt=t[4]("routeEditor.upstreams")+"",Mt,ht,Tt,kl,Ot,hl,ml,ql,Jt=t[4]("routeEditor.jsonConfig")+"",Ql,Qt,Yt,Hl=(t[1]?t[4]("common.hide"):t[4]("common.show"))+"",Il,gl,ol,Yl,Ft,Pl,Vl=t[4]("routeEditor.requestFlow")+"",Jl,El,zt,Zl,Pt,jl,Ll,$l,xt=t[4]("routeEditor.clientRequest")+"",wl,es,Fl,Bl=(t[0].path||"/")+"",Wl,Ps,nl,yl,rl,zl,al,_l,ll,Dl,Nl,Tl=t[4]("routeEditor.selectUpstream")+"",Wt,It,jt,$t=t[2].upstreamsCount+"",el,Kt,Zt=t[4]("routeEditor.upstreams")+"",il,Xt,$e,Al,ts,Xl,xl,ls=t[4]("routeEditor.returnResponse")+"",Ds,ss,zs,ul=ut(t[0].upstreams),Nt=[];for(let xe=0;xe<ul.length;xe+=1)Nt[xe]=Id(Ld(t,ul,xe));let ot=t[1]&&Bd(t),ct=t[2].hasAuth&&Ad(t),sl=t[2].hasPathRewrite&&Od(t),Ml=t[2].hasTransformer&&Fd(t),fl=t[2].hasFailover&&zd(t);return{c(){l=a("div"),e=a("div"),n=a("h3"),i=_(r),u=h(),c=a("p"),d=_(f),p=h(),m=a("div"),g=a("div"),b=a("div"),w=_(v),C=h(),E=a("div"),T=_(y),S=h(),q=a("div"),H=_(D),I=_(": "),L=_(R),A=h(),N=a("div"),Z=a("div"),x=_(Y),F=h(),K=a("div"),B=_(M),U=h(),O=a("div"),ie=_(J),ue=h(),ne=a("div"),$=a("div"),re=_(te),ee=h(),G=a("div"),oe=_(pe),he=h(),ye=a("div"),je=_(Fe),we=h(),Oe=a("div"),Je=a("div"),Le=a("h4"),Me=_(Pe),fe=h(),_e=a("div"),Be=a("div"),De=a("div"),ke=_(se),Ee=h(),Ve=a("span"),nt=_(Ie),Ne=h(),Ye=a("div"),Qe=a("div"),de=_(ve),Ze=h(),Se=a("span"),Ce=_(Ue),mt=h(),Ge=a("div"),ce=a("div"),Re=_(qe),We=h(),z=a("span"),X=_(He),ft=h(),Ht=a("div"),Ke=a("div"),lt=_(_t),ze=h(),Xe=a("span"),at=_(Bt),gt=h(),wt=a("div"),pt=a("div"),vl=a("h4"),Mt=_(rt),ht=h(),Tt=a("div");for(let xe=0;xe<Nt.length;xe+=1)Nt[xe].c();kl=h(),Ot=a("div"),hl=a("div"),ml=a("div"),ql=a("h4"),Ql=_(Jt),Qt=h(),Yt=a("button"),Il=_(Hl),gl=h(),ot&&ot.c(),ol=h(),Yl=a("div"),Ft=a("div"),Pl=a("h4"),Jl=_(Vl),El=h(),zt=a("div"),Zl=a("div"),Pt=a("div"),Pt.textContent="1",jl=h(),Ll=a("div"),$l=a("div"),wl=_(xt),es=h(),Fl=a("div"),Wl=_(Bl),Ps=h(),nl=a("div"),ct&&ct.c(),yl=h(),sl&&sl.c(),rl=h(),Ml&&Ml.c(),zl=h(),al=a("div"),_l=a("div"),_l.textContent="2",ll=h(),Dl=a("div"),Nl=a("div"),Wt=_(Tl),It=h(),jt=a("div"),el=_($t),Kt=h(),il=_(Zt),Xt=h(),fl&&fl.c(),$e=h(),Al=a("div"),ts=a("div"),ts.textContent="3",Xl=h(),xl=a("div"),Ds=_(ls),o(n,"class","text-lg font-semibold"),o(c,"class","text-sm text-gray-500 mt-1"),o(b,"class","stat-title"),o(E,"class","stat-value text-primary"),o(q,"class","stat-desc"),o(g,"class","stat bg-base-200 rounded-lg"),o(Z,"class","stat-title"),o(K,"class","stat-value text-2xl"),o(O,"class","stat-desc"),o(N,"class","stat bg-base-200 rounded-lg"),o($,"class","stat-title"),o(G,"class","stat-value text-sm truncate"),o(G,"title",ge=t[0].path),o(ye,"class","stat-desc"),o(ne,"class","stat bg-base-200 rounded-lg"),o(m,"class","grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"),o(Le,"class","card-title text-base"),o(De,"class",me=`badge ${t[2].hasAuth?"badge-success":"badge-ghost"}`),o(Ve,"class","text-sm"),o(Be,"class","flex items-center gap-2"),o(Qe,"class",Te=`badge ${t[2].hasFailover?"badge-success":"badge-ghost"}`),o(Se,"class","text-sm"),o(Ye,"class","flex items-center gap-2"),o(ce,"class",dt=`badge ${t[2].hasTransformer?"badge-success":"badge-ghost"}`),o(z,"class","text-sm"),o(Ge,"class","flex items-center gap-2"),o(Ke,"class",it=`badge ${t[2].hasPathRewrite?"badge-success":"badge-ghost"}`),o(Xe,"class","text-sm"),o(Ht,"class","flex items-center gap-2"),o(_e,"class","space-y-2"),o(Je,"class","card-body"),o(Oe,"class","card bg-base-200"),o(vl,"class","card-title text-base"),o(Tt,"class","space-y-2"),o(pt,"class","card-body"),o(wt,"class","card bg-base-200"),o(ql,"class","card-title text-base"),o(Yt,"type","button"),o(Yt,"class","btn btn-sm btn-ghost"),o(ml,"class","flex justify-between items-center"),o(hl,"class","card-body"),o(Ot,"class","card bg-base-200"),o(Pl,"class","card-title text-base"),o(Pt,"class","badge badge-lg badge-neutral"),o($l,"class","font-medium"),o(Fl,"class","text-xs text-gray-500"),o(Ll,"class","flex-1"),o(Zl,"class","flex items-center gap-3"),o(_l,"class","badge badge-lg badge-primary"),o(Nl,"class","font-medium"),o(jt,"class","text-xs text-gray-500"),o(Dl,"class","flex-1"),o(al,"class","flex items-center gap-3"),o(ts,"class","badge badge-lg badge-accent"),o(xl,"class","font-medium"),o(Al,"class","flex items-center gap-3"),o(nl,"class","ml-6 border-l-2 border-base-300 pl-4 space-y-3"),o(zt,"class","flex flex-col gap-3 mt-4"),o(Ft,"class","card-body"),o(Yl,"class","card bg-base-200"),o(l,"class","space-y-6")},m(xe,vt){j(xe,l,vt),s(l,e),s(e,n),s(n,i),s(e,u),s(e,c),s(c,d),s(l,p),s(l,m),s(m,g),s(g,b),s(b,w),s(g,C),s(g,E),s(E,T),s(g,S),s(g,q),s(q,H),s(q,I),s(q,L),s(m,A),s(m,N),s(N,Z),s(Z,x),s(N,F),s(N,K),s(K,B),s(N,U),s(N,O),s(O,ie),s(m,ue),s(m,ne),s(ne,$),s($,re),s(ne,ee),s(ne,G),s(G,oe),s(ne,he),s(ne,ye),s(ye,je),s(l,we),s(l,Oe),s(Oe,Je),s(Je,Le),s(Le,Me),s(Je,fe),s(Je,_e),s(_e,Be),s(Be,De),s(De,ke),s(Be,Ee),s(Be,Ve),s(Ve,nt),s(_e,Ne),s(_e,Ye),s(Ye,Qe),s(Qe,de),s(Ye,Ze),s(Ye,Se),s(Se,Ce),s(_e,mt),s(_e,Ge),s(Ge,ce),s(ce,Re),s(Ge,We),s(Ge,z),s(z,X),s(_e,ft),s(_e,Ht),s(Ht,Ke),s(Ke,lt),s(Ht,ze),s(Ht,Xe),s(Xe,at),s(l,gt),s(l,wt),s(wt,pt),s(pt,vl),s(vl,Mt),s(pt,ht),s(pt,Tt);for(let cl=0;cl<Nt.length;cl+=1)Nt[cl]&&Nt[cl].m(Tt,null);s(l,kl),s(l,Ot),s(Ot,hl),s(hl,ml),s(ml,ql),s(ql,Ql),s(ml,Qt),s(ml,Yt),s(Yt,Il),s(hl,gl),ot&&ot.m(hl,null),s(l,ol),s(l,Yl),s(Yl,Ft),s(Ft,Pl),s(Pl,Jl),s(Ft,El),s(Ft,zt),s(zt,Zl),s(Zl,Pt),s(Zl,jl),s(Zl,Ll),s(Ll,$l),s($l,wl),s(Ll,es),s(Ll,Fl),s(Fl,Wl),s(zt,Ps),s(zt,nl),ct&&ct.m(nl,null),s(nl,yl),sl&&sl.m(nl,null),s(nl,rl),Ml&&Ml.m(nl,null),s(nl,zl),s(nl,al),s(al,_l),s(al,ll),s(al,Dl),s(Dl,Nl),s(Nl,Wt),s(Dl,It),s(Dl,jt),s(jt,el),s(jt,Kt),s(jt,il),s(jt,Xt),fl&&fl.m(jt,null),s(nl,$e),s(nl,Al),s(Al,ts),s(Al,Xl),s(Al,xl),s(xl,Ds),ss||(zs=V(Yt,"click",t[6]),ss=!0)},p(xe,[vt]){if(vt&16&&r!==(r=xe[4]("routeEditor.preview")+"")&&k(i,r),vt&16&&f!==(f=xe[4]("routeEditor.previewHelp")+"")&&k(d,f),vt&16&&v!==(v=xe[4]("routeEditor.upstreams")+"")&&k(w,v),vt&4&&y!==(y=xe[2].upstreamsCount+"")&&k(T,y),vt&16&&D!==(D=xe[4]("routeEditor.totalWeight")+"")&&k(H,D),vt&4&&R!==(R=xe[2].totalWeight+"")&&k(L,R),vt&16&&Y!==(Y=xe[4]("routeEditor.features")+"")&&k(x,Y),vt&4&&M!==(M=[xe[2].hasAuth,xe[2].hasFailover,xe[2].hasTransformer,xe[2].hasPathRewrite].filter(Boolean).length+"")&&k(B,M),vt&16&&J!==(J=xe[4]("routeEditor.featuresEnabled")+"")&&k(ie,J),vt&16&&te!==(te=xe[4]("routes.path")+"")&&k(re,te),vt&17&&pe!==(pe=(xe[0].path||xe[4]("routeEditor.notSet"))+"")&&k(oe,pe),vt&1&&ge!==(ge=xe[0].path)&&o(G,"title",ge),vt&16&&Fe!==(Fe=xe[4]("routeEditor.routePath")+"")&&k(je,Fe),vt&16&&Pe!==(Pe=xe[4]("routeEditor.enabledFeatures")+"")&&k(Me,Pe),vt&4&&se!==(se=xe[2].hasAuth?"\u2713":"\u25CB")&&k(ke,se),vt&4&&me!==(me=`badge ${xe[2].hasAuth?"badge-success":"badge-ghost"}`)&&o(De,"class",me),vt&16&&Ie!==(Ie=xe[4]("auth.routeAuth")+"")&&k(nt,Ie),vt&4&&ve!==(ve=xe[2].hasFailover?"\u2713":"\u25CB")&&k(de,ve),vt&4&&Te!==(Te=`badge ${xe[2].hasFailover?"badge-success":"badge-ghost"}`)&&o(Qe,"class",Te),vt&16&&Ue!==(Ue=xe[4]("routeEditor.failoverTitle")+"")&&k(Ce,Ue),vt&4&&qe!==(qe=xe[2].hasTransformer?"\u2713":"\u25CB")&&k(Re,qe),vt&4&&dt!==(dt=`badge ${xe[2].hasTransformer?"badge-success":"badge-ghost"}`)&&o(ce,"class",dt),vt&16&&He!==(He=xe[4]("routeEditor.transformer")+"")&&k(X,He),vt&4&&_t!==(_t=xe[2].hasPathRewrite?"\u2713":"\u25CB")&&k(lt,_t),vt&4&&it!==(it=`badge ${xe[2].hasPathRewrite?"badge-success":"badge-ghost"}`)&&o(Ke,"class",it),vt&16&&Bt!==(Bt=xe[4]("routeEditor.pathRewrite")+"")&&k(at,Bt),vt&16&&rt!==(rt=xe[4]("routeEditor.upstreams")+"")&&k(Mt,rt),vt&17){ul=ut(xe[0].upstreams);let cl;for(cl=0;cl<ul.length;cl+=1){const cr=Ld(xe,ul,cl);Nt[cl]?Nt[cl].p(cr,vt):(Nt[cl]=Id(cr),Nt[cl].c(),Nt[cl].m(Tt,null))}for(;cl<Nt.length;cl+=1)Nt[cl].d(1);Nt.length=ul.length}vt&16&&Jt!==(Jt=xe[4]("routeEditor.jsonConfig")+"")&&k(Ql,Jt),vt&18&&Hl!==(Hl=(xe[1]?xe[4]("common.hide"):xe[4]("common.show"))+"")&&k(Il,Hl),xe[1]?ot?ot.p(xe,vt):(ot=Bd(xe),ot.c(),ot.m(hl,null)):ot&&(ot.d(1),ot=null),vt&16&&Vl!==(Vl=xe[4]("routeEditor.requestFlow")+"")&&k(Jl,Vl),vt&16&&xt!==(xt=xe[4]("routeEditor.clientRequest")+"")&&k(wl,xt),vt&1&&Bl!==(Bl=(xe[0].path||"/")+"")&&k(Wl,Bl),xe[2].hasAuth?ct?ct.p(xe,vt):(ct=Ad(xe),ct.c(),ct.m(nl,yl)):ct&&(ct.d(1),ct=null),xe[2].hasPathRewrite?sl?sl.p(xe,vt):(sl=Od(xe),sl.c(),sl.m(nl,rl)):sl&&(sl.d(1),sl=null),xe[2].hasTransformer?Ml?Ml.p(xe,vt):(Ml=Fd(xe),Ml.c(),Ml.m(nl,zl)):Ml&&(Ml.d(1),Ml=null),vt&16&&Tl!==(Tl=xe[4]("routeEditor.selectUpstream")+"")&&k(Wt,Tl),vt&4&&$t!==($t=xe[2].upstreamsCount+"")&&k(el,$t),vt&16&&Zt!==(Zt=xe[4]("routeEditor.upstreams")+"")&&k(il,Zt),xe[2].hasFailover?fl?fl.p(xe,vt):(fl=zd(xe),fl.c(),fl.m(jt,null)):fl&&(fl.d(1),fl=null),vt&16&&ls!==(ls=xe[4]("routeEditor.returnResponse")+"")&&k(Ds,ls)},i:tt,o:tt,d(xe){xe&&P(l),Gt(Nt,xe),ot&&ot.d(),ct&&ct.d(),sl&&sl.d(),Ml&&Ml.d(),fl&&fl.d(),ss=!1,zs()}}}function i_(t,l,e){let n,r,i,u;Dt(t,Rt,m=>e(4,u=m));let{route:c}=l,f=!1;const d=()=>e(1,f=!f),p=()=>{navigator.clipboard.writeText(r),alert(u("common.copied"))};return t.$$set=m=>{"route"in m&&e(0,c=m.route)},t.$$.update=()=>{t.$$.dirty&1&&e(5,n={...c,upstreams:c.upstreams.map(({_uid:m,...g})=>g)}),t.$$.dirty&32&&e(3,r=JSON.stringify(n,null,2)),t.$$.dirty&1&&e(2,i={upstreamsCount:c.upstreams.length,hasAuth:c.auth?.enabled||!1,hasFailover:c.failover?.enabled||!1,hasTransformer:c.plugins&&c.plugins.length>0||!1,hasPathRewrite:c.pathRewrite&&Object.keys(c.pathRewrite).length>0,totalWeight:c.upstreams.reduce((m,g)=>m+(g.weight||100),0)})},[c,f,i,r,u,n,d,p]}class u_ extends Vt{constructor(l){super(),Ut(this,l,i_,a_,At,{route:0})}}function Nd(t,l,e){const n=t.slice();return n[52]=l[e],n}function Ud(t){let l,e;return{c(){l=a("code"),e=_(t[2]),o(l,"class","px-2 py-1 bg-base-200 rounded text-sm font-mono text-gray-600")},m(n,r){j(n,l,r),s(l,e)},p(n,r){r[0]&4&&k(e,n[2])},d(n){n&&P(l)}}}function f_(t){let l,e,n,r,i,u,c,f,d,p=t[16]("routeEditor.basicInfo")+"",m,g,b,v,w,C,E,y=t[16]("routeEditor.upstreams")+"",T,S,q,D=t[0].upstreams.length+"",H,I,R,L,A,N,Z,Y,x=t[16]("routeEditor.requestModification")+"",F,K,M,B,U,O,J,ie=t[16]("auth.routeAuth")+"",ue,ne,$,te,re,ee,G,pe,oe=t[16]("routeEditor.failoverTitle")+"",ge,he,ye,Fe,je,we,Oe,Je,Le,Pe=t[16]("routeEditor.preview")+"",Me,fe,_e,Be,De=t[16]("shortcuts.title")+"",se,ke,me,Ee,Ve,Ie,nt,Ne,Ye,Qe=t[16]("shortcuts.save")+"",ve,de,Te,Ze,Se,Ue,Ce,mt,Ge=t[16]("shortcuts.switchSection")+"",ce,qe,Re,dt,We,z,He=t[16]("shortcuts.cancel")+"",X,ft,Ht,Ke,_t,lt,it,ze,Xe,Bt,at,gt=t[0].auth?.enabled&&Vd(),wt=t[0].failover?.enabled&&Jd(),pt=!t[1]&&Wd(t);const vl=[__,g_,m_,h_,p_,d_],rt=[];function Mt(ht,Tt){return ht[6]==="basic"?0:ht[6]==="upstreams"?1:ht[6]==="modification"?2:ht[6]==="auth"?3:ht[6]==="failover"?4:ht[6]==="preview"?5:-1}return~(it=Mt(t))&&(ze=rt[it]=vl[it](t)),{c(){l=a("div"),e=a("div"),n=a("div"),r=a("ul"),i=a("li"),u=a("button"),c=ae("svg"),f=ae("path"),d=h(),m=_(p),g=h(),b=a("li"),v=a("button"),w=ae("svg"),C=ae("path"),E=h(),T=_(y),S=h(),q=a("span"),H=_(D),R=h(),L=a("li"),A=a("button"),N=ae("svg"),Z=ae("path"),Y=h(),F=_(x),K=h(),M=a("li"),B=a("button"),U=ae("svg"),O=ae("path"),J=h(),ue=_(ie),ne=h(),gt&&gt.c(),$=h(),te=a("li"),re=a("button"),ee=ae("svg"),G=ae("path"),pe=h(),ge=_(oe),he=h(),wt&&wt.c(),ye=h(),Fe=a("li"),je=a("button"),we=ae("svg"),Oe=ae("path"),Je=ae("path"),Le=h(),Me=_(Pe),fe=h(),_e=a("div"),Be=a("div"),se=_(De),ke=h(),me=a("div"),Ee=a("div"),Ve=a("kbd"),Ve.textContent="\u2318",Ie=_(" + "),nt=a("kbd"),nt.textContent="S",Ne=h(),Ye=a("span"),ve=_(Qe),de=h(),Te=a("div"),Ze=a("kbd"),Ze.textContent="Ctrl",Se=_(" + "),Ue=a("kbd"),Ue.textContent="1-6",Ce=h(),mt=a("span"),ce=_(Ge),qe=h(),Re=a("div"),dt=a("kbd"),dt.textContent="Esc",We=h(),z=a("span"),X=_(He),ft=h(),pt&&pt.c(),Ht=h(),Ke=a("div"),_t=a("div"),lt=a("div"),ze&&ze.c(),o(f,"stroke-linecap","round"),o(f,"stroke-linejoin","round"),o(f,"stroke-width","2"),o(f,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(c,"xmlns","http://www.w3.org/2000/svg"),o(c,"class","h-5 w-5"),o(c,"fill","none"),o(c,"viewBox","0 0 24 24"),o(c,"stroke","currentColor"),le(u,"active",t[6]==="basic"),o(C,"stroke-linecap","round"),o(C,"stroke-linejoin","round"),o(C,"stroke-width","2"),o(C,"d","M13 10V3L4 14h7v7l9-11h-7z"),o(w,"xmlns","http://www.w3.org/2000/svg"),o(w,"class","h-5 w-5"),o(w,"fill","none"),o(w,"viewBox","0 0 24 24"),o(w,"stroke","currentColor"),o(q,"class","badge badge-sm tooltip tooltip-right"),o(q,"data-tip",I=t[16]("routeEditor.upstreamCountTooltip",{values:{count:t[0].upstreams.length}})),le(v,"active",t[6]==="upstreams"),o(Z,"stroke-linecap","round"),o(Z,"stroke-linejoin","round"),o(Z,"stroke-width","2"),o(Z,"d","M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"),o(N,"xmlns","http://www.w3.org/2000/svg"),o(N,"class","h-5 w-5"),o(N,"fill","none"),o(N,"viewBox","0 0 24 24"),o(N,"stroke","currentColor"),le(A,"active",t[6]==="modification"),o(O,"stroke-linecap","round"),o(O,"stroke-linejoin","round"),o(O,"stroke-width","2"),o(O,"d","M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"),o(U,"xmlns","http://www.w3.org/2000/svg"),o(U,"class","h-5 w-5"),o(U,"fill","none"),o(U,"viewBox","0 0 24 24"),o(U,"stroke","currentColor"),le(B,"active",t[6]==="auth"),o(G,"stroke-linecap","round"),o(G,"stroke-linejoin","round"),o(G,"stroke-width","2"),o(G,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),o(ee,"xmlns","http://www.w3.org/2000/svg"),o(ee,"class","h-5 w-5"),o(ee,"fill","none"),o(ee,"viewBox","0 0 24 24"),o(ee,"stroke","currentColor"),le(re,"active",t[6]==="failover"),o(Oe,"stroke-linecap","round"),o(Oe,"stroke-linejoin","round"),o(Oe,"stroke-width","2"),o(Oe,"d","M15 12a3 3 0 11-6 0 3 3 0 016 0z"),o(Je,"stroke-linecap","round"),o(Je,"stroke-linejoin","round"),o(Je,"stroke-width","2"),o(Je,"d","M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"),o(we,"xmlns","http://www.w3.org/2000/svg"),o(we,"class","h-5 w-5"),o(we,"fill","none"),o(we,"viewBox","0 0 24 24"),o(we,"stroke","currentColor"),le(je,"active",t[6]==="preview"),o(r,"class","menu bg-base-100 rounded-box shadow-lg gap-1"),o(Be,"class","font-semibold mb-2"),o(Ve,"class","kbd kbd-xs"),o(nt,"class","kbd kbd-xs"),o(Ye,"class","ml-1"),o(Ze,"class","kbd kbd-xs"),o(Ue,"class","kbd kbd-xs"),o(mt,"class","ml-1"),o(dt,"class","kbd kbd-xs"),o(z,"class","ml-1"),o(me,"class","space-y-1 text-gray-500"),o(_e,"class","mt-4 p-3 bg-base-100 rounded-box shadow-lg text-xs"),o(n,"class","sticky top-24"),o(e,"class","w-56 flex-shrink-0 relative z-10"),o(lt,"class","card-body"),o(_t,"class","card bg-base-100 shadow-md"),o(Ke,"class","flex-1 ml-6 relative"),o(l,"class","max-w-7xl mx-auto flex gap-0 p-6 pb-32")},m(ht,Tt){j(ht,l,Tt),s(l,e),s(e,n),s(n,r),s(r,i),s(i,u),s(u,c),s(c,f),s(u,d),s(u,m),s(r,g),s(r,b),s(b,v),s(v,w),s(w,C),s(v,E),s(v,T),s(v,S),s(v,q),s(q,H),s(r,R),s(r,L),s(L,A),s(A,N),s(N,Z),s(A,Y),s(A,F),s(r,K),s(r,M),s(M,B),s(B,U),s(U,O),s(B,J),s(B,ue),s(B,ne),gt&&gt.m(B,null),s(r,$),s(r,te),s(te,re),s(re,ee),s(ee,G),s(re,pe),s(re,ge),s(re,he),wt&&wt.m(re,null),s(r,ye),s(r,Fe),s(Fe,je),s(je,we),s(we,Oe),s(we,Je),s(je,Le),s(je,Me),s(n,fe),s(n,_e),s(_e,Be),s(Be,se),s(_e,ke),s(_e,me),s(me,Ee),s(Ee,Ve),s(Ee,Ie),s(Ee,nt),s(Ee,Ne),s(Ee,Ye),s(Ye,ve),s(me,de),s(me,Te),s(Te,Ze),s(Te,Se),s(Te,Ue),s(Te,Ce),s(Te,mt),s(mt,ce),s(me,qe),s(me,Re),s(Re,dt),s(Re,We),s(Re,z),s(z,X),s(n,ft),pt&&pt.m(n,null),s(l,Ht),s(l,Ke),s(Ke,_t),s(_t,lt),~it&&rt[it].m(lt,null),Xe=!0,Bt||(at=[V(u,"click",t[27]),V(v,"click",t[28]),V(A,"click",t[29]),V(B,"click",t[30]),V(re,"click",t[31]),V(je,"click",t[32])],Bt=!0)},p(ht,Tt){(!Xe||Tt[0]&65536)&&p!==(p=ht[16]("routeEditor.basicInfo")+"")&&k(m,p),(!Xe||Tt[0]&64)&&le(u,"active",ht[6]==="basic"),(!Xe||Tt[0]&65536)&&y!==(y=ht[16]("routeEditor.upstreams")+"")&&k(T,y),(!Xe||Tt[0]&1)&&D!==(D=ht[0].upstreams.length+"")&&k(H,D),(!Xe||Tt[0]&65537&&I!==(I=ht[16]("routeEditor.upstreamCountTooltip",{values:{count:ht[0].upstreams.length}})))&&o(q,"data-tip",I),(!Xe||Tt[0]&64)&&le(v,"active",ht[6]==="upstreams"),(!Xe||Tt[0]&65536)&&x!==(x=ht[16]("routeEditor.requestModification")+"")&&k(F,x),(!Xe||Tt[0]&64)&&le(A,"active",ht[6]==="modification"),(!Xe||Tt[0]&65536)&&ie!==(ie=ht[16]("auth.routeAuth")+"")&&k(ue,ie),ht[0].auth?.enabled?gt||(gt=Vd(),gt.c(),gt.m(B,null)):gt&&(gt.d(1),gt=null),(!Xe||Tt[0]&64)&&le(B,"active",ht[6]==="auth"),(!Xe||Tt[0]&65536)&&oe!==(oe=ht[16]("routeEditor.failoverTitle")+"")&&k(ge,oe),ht[0].failover?.enabled?wt||(wt=Jd(),wt.c(),wt.m(re,null)):wt&&(wt.d(1),wt=null),(!Xe||Tt[0]&64)&&le(re,"active",ht[6]==="failover"),(!Xe||Tt[0]&65536)&&Pe!==(Pe=ht[16]("routeEditor.preview")+"")&&k(Me,Pe),(!Xe||Tt[0]&64)&&le(je,"active",ht[6]==="preview"),(!Xe||Tt[0]&65536)&&De!==(De=ht[16]("shortcuts.title")+"")&&k(se,De),(!Xe||Tt[0]&65536)&&Qe!==(Qe=ht[16]("shortcuts.save")+"")&&k(ve,Qe),(!Xe||Tt[0]&65536)&&Ge!==(Ge=ht[16]("shortcuts.switchSection")+"")&&k(ce,Ge),(!Xe||Tt[0]&65536)&&He!==(He=ht[16]("shortcuts.cancel")+"")&&k(X,He),ht[1]?pt&&(pt.d(1),pt=null):pt?pt.p(ht,Tt):(pt=Wd(ht),pt.c(),pt.m(n,null));let kl=it;it=Mt(ht),it===kl?~it&&rt[it].p(ht,Tt):(ze&&(Gl(),st(rt[kl],1,1,()=>{rt[kl]=null}),Kl()),~it?(ze=rt[it],ze?ze.p(ht,Tt):(ze=rt[it]=vl[it](ht),ze.c()),et(ze,1),ze.m(lt,null)):ze=null)},i(ht){Xe||(et(ze),Xe=!0)},o(ht){st(ze),Xe=!1},d(ht){ht&&P(l),gt&&gt.d(),wt&&wt.d(),pt&&pt.d(),~it&&rt[it].d(),Bt=!1,bt(at)}}}function c_(t){let l;return{c(){l=a("div"),l.innerHTML=\'<span class="loading loading-spinner loading-lg"></span>\',o(l,"class","flex justify-center items-center h-64")},m(e,n){j(e,l,n)},p:tt,i:tt,o:tt,d(e){e&&P(l)}}}function Vd(t){let l;return{c(){l=a("span"),l.textContent="\u2713",o(l,"class","badge badge-success badge-xs")},m(e,n){j(e,l,n)},d(e){e&&P(l)}}}function Jd(t){let l;return{c(){l=a("span"),l.textContent="\u2713",o(l,"class","badge badge-success badge-xs")},m(e,n){j(e,l,n)},d(e){e&&P(l)}}}function Wd(t){let l,e,n,r,i,u=t[16]("routeEditor.useTemplate")+"",c,f,d;return{c(){l=a("div"),e=a("button"),n=ae("svg"),r=ae("path"),i=h(),c=_(u),o(r,"stroke-linecap","round"),o(r,"stroke-linejoin","round"),o(r,"stroke-width","2"),o(r,"d","M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"),o(n,"xmlns","http://www.w3.org/2000/svg"),o(n,"class","h-4 w-4"),o(n,"fill","none"),o(n,"viewBox","0 0 24 24"),o(n,"stroke","currentColor"),o(e,"type","button"),o(e,"class","btn btn-sm btn-outline w-full gap-2"),o(l,"class","mt-4")},m(p,m){j(p,l,m),s(l,e),s(e,n),s(n,r),s(e,i),s(e,c),f||(d=V(e,"click",t[33]),f=!0)},p(p,m){m[0]&65536&&u!==(u=p[16]("routeEditor.useTemplate")+"")&&k(c,u)},d(p){p&&P(l),f=!1,d()}}}function d_(t){let l,e;return l=new u_({props:{route:t[0]}}),{c(){Et(l.$$.fragment)},m(n,r){yt(l,n,r),e=!0},p(n,r){const i={};r[0]&1&&(i.route=n[0]),l.$set(i)},i(n){e||(et(l.$$.fragment,n),e=!0)},o(n){st(l.$$.fragment,n),e=!1},d(n){Ct(l,n)}}}function p_(t){let l,e,n;function r(u){t[38](u)}let i={};return t[0]!==void 0&&(i.route=t[0]),l=new r_({props:i}),bl.push(()=>Rl(l,"route",r)),{c(){Et(l.$$.fragment)},m(u,c){yt(l,u,c),n=!0},p(u,c){const f={};!e&&c[0]&1&&(e=!0,f.route=u[0],Sl(()=>e=!1)),l.$set(f)},i(u){n||(et(l.$$.fragment,u),n=!0)},o(u){st(l.$$.fragment,u),n=!1},d(u){Ct(l,u)}}}function h_(t){let l,e,n;function r(u){t[37](u)}let i={};return t[0]!==void 0&&(i.route=t[0]),l=new e_({props:i}),bl.push(()=>Rl(l,"route",r)),{c(){Et(l.$$.fragment)},m(u,c){yt(l,u,c),n=!0},p(u,c){const f={};!e&&c[0]&1&&(e=!0,f.route=u[0],Sl(()=>e=!1)),l.$set(f)},i(u){n||(et(l.$$.fragment,u),n=!0)},o(u){st(l.$$.fragment,u),n=!1},d(u){Ct(l,u)}}}function m_(t){let l,e,n;function r(u){t[36](u)}let i={};return t[0]!==void 0&&(i.route=t[0]),l=new Xg({props:i}),bl.push(()=>Rl(l,"route",r)),{c(){Et(l.$$.fragment)},m(u,c){yt(l,u,c),n=!0},p(u,c){const f={};!e&&c[0]&1&&(e=!0,f.route=u[0],Sl(()=>e=!1)),l.$set(f)},i(u){n||(et(l.$$.fragment,u),n=!0)},o(u){st(l.$$.fragment,u),n=!1},d(u){Ct(l,u)}}}function g_(t){let l,e,n;function r(u){t[35](u)}let i={errors:t[8],weightErrors:t[9]};return t[0]!==void 0&&(i.route=t[0]),l=new Wg({props:i}),bl.push(()=>Rl(l,"route",r)),{c(){Et(l.$$.fragment)},m(u,c){yt(l,u,c),n=!0},p(u,c){const f={};c[0]&256&&(f.errors=u[8]),c[0]&512&&(f.weightErrors=u[9]),!e&&c[0]&1&&(e=!0,f.route=u[0],Sl(()=>e=!1)),l.$set(f)},i(u){n||(et(l.$$.fragment,u),n=!0)},o(u){st(l.$$.fragment,u),n=!1},d(u){Ct(l,u)}}}function __(t){let l,e,n;function r(u){t[34](u)}let i={errors:t[8]};return t[0]!==void 0&&(i.route=t[0]),l=new Tg({props:i}),bl.push(()=>Rl(l,"route",r)),{c(){Et(l.$$.fragment)},m(u,c){yt(l,u,c),n=!0},p(u,c){const f={};c[0]&256&&(f.errors=u[8]),!e&&c[0]&1&&(e=!0,f.route=u[0],Sl(()=>e=!1)),l.$set(f)},i(u){n||(et(l.$$.fragment,u),n=!0)},o(u){st(l.$$.fragment,u),n=!1},d(u){Ct(l,u)}}}function Gd(t){let l,e=t[16]("autosave.lastSaved")+"",n,r,i=t[19](t[12])+"",u;return{c(){l=a("span"),n=_(e),r=_(": "),u=_(i),o(l,"class","text-xs text-gray-500")},m(c,f){j(c,l,f),s(l,n),s(l,r),s(l,u)},p(c,f){f[0]&65536&&e!==(e=c[16]("autosave.lastSaved")+"")&&k(n,e),f[0]&4096&&i!==(i=c[19](c[12])+"")&&k(u,i)},d(c){c&&P(l)}}}function b_(t){let l,e,n,r,i,u=t[16]("validation.allGood")+"",c;return{c(){l=a("div"),e=ae("svg"),n=ae("path"),r=h(),i=a("span"),c=_(u),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","h-5 w-5"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"stroke","currentColor"),o(i,"class","text-sm font-medium"),o(l,"class","flex items-center gap-2 text-success")},m(f,d){j(f,l,d),s(l,e),s(e,n),s(l,r),s(l,i),s(i,c)},p(f,d){d[0]&65536&&u!==(u=f[16]("validation.allGood")+"")&&k(c,u)},d(f){f&&P(l)}}}function v_(t){let l,e,n,r,i,u=t[10].length+"",c,f,d=t[16]("validation.errors")+"",p,m,g,b=(t[7]?t[16]("common.hide"):t[16]("common.show"))+"",v,w,C;return{c(){l=a("div"),e=ae("svg"),n=ae("path"),r=h(),i=a("span"),c=_(u),f=h(),p=_(d),m=h(),g=a("button"),v=_(b),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","h-5 w-5"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"stroke","currentColor"),o(i,"class","text-sm font-medium"),o(g,"class","btn btn-xs btn-ghost"),o(l,"class","flex items-center gap-2 text-error")},m(E,y){j(E,l,y),s(l,e),s(e,n),s(l,r),s(l,i),s(i,c),s(i,f),s(i,p),s(l,m),s(l,g),s(g,v),w||(C=V(g,"click",t[39]),w=!0)},p(E,y){y[0]&1024&&u!==(u=E[10].length+"")&&k(c,u),y[0]&65536&&d!==(d=E[16]("validation.errors")+"")&&k(p,d),y[0]&65664&&b!==(b=(E[7]?E[16]("common.hide"):E[16]("common.show"))+"")&&k(v,b)},d(E){E&&P(l),w=!1,C()}}}function k_(t){let l,e;return{c(){l=ae("svg"),e=ae("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3m-1 4l-3 3m0 0l-3-3m3 3V4"),o(l,"xmlns","http://www.w3.org/2000/svg"),o(l,"class","h-5 w-5"),o(l,"fill","none"),o(l,"viewBox","0 0 24 24"),o(l,"stroke","currentColor")},m(n,r){j(n,l,r),s(l,e)},d(n){n&&P(l)}}}function w_(t){let l;return{c(){l=a("span"),o(l,"class","loading loading-spinner loading-sm")},m(e,n){j(e,l,n)},d(e){e&&P(l)}}}function Kd(t){let l,e,n=ut(t[10]),r=[];for(let i=0;i<n.length;i+=1)r[i]=Qd(Nd(t,n,i));return{c(){l=a("div"),e=a("ul");for(let i=0;i<r.length;i+=1)r[i].c();o(e,"class","text-sm space-y-1"),o(l,"class","mt-3 p-3 bg-error/10 rounded-lg border border-error/20")},m(i,u){j(i,l,u),s(l,e);for(let c=0;c<r.length;c+=1)r[c]&&r[c].m(e,null)},p(i,u){if(u[0]&1024){n=ut(i[10]);let c;for(c=0;c<n.length;c+=1){const f=Nd(i,n,c);r[c]?r[c].p(f,u):(r[c]=Qd(f),r[c].c(),r[c].m(e,null))}for(;c<r.length;c+=1)r[c].d(1);r.length=n.length}},d(i){i&&P(l),Gt(r,i)}}}function Qd(t){let l,e,n,r,i=t[52].field+"",u,c,f=t[52].message+"",d,p;return{c(){l=a("li"),e=a("span"),e.textContent="\u2022",n=h(),r=a("span"),u=_(i),c=_(": "),d=_(f),p=h(),o(e,"class","text-error"),o(l,"class","flex items-start gap-2")},m(m,g){j(m,l,g),s(l,e),s(l,n),s(l,r),s(r,u),s(r,c),s(r,d),s(l,p)},p(m,g){g[0]&1024&&i!==(i=m[52].field+"")&&k(u,i),g[0]&1024&&f!==(f=m[52].message+"")&&k(d,f)},d(m){m&&P(l)}}}function y_(t){let l,e,n,r,i,u,c,f=t[16]("breadcrumb.home")+"",d,p,m,g,b=t[16]("breadcrumb.routes")+"",v,w,C,E,y,T=(t[1]?t[16]("breadcrumb.editRoute"):t[16]("breadcrumb.newRoute"))+"",S,q,D,H,I,R,L,A,N,Z,Y,x,F,K,M,B=t[16]("common.cancel")+"",U,O,J,ie,ue=t[16]("common.save")+"",ne,$,te,re,ee,G,pe,oe,ge,he,ye,Fe,je,we,Oe,Je,Le,Pe=t[16]("confirmDialog.no")+"",Me,fe,_e,Be=t[16]("confirmDialog.yes")+"",De,se,ke,me,Ee,Ve,Ie=t[1]&&Ud(t);const nt=[c_,f_],Ne=[];function Ye(ce,qe){return ce[3]?0:1}H=Ye(t),I=Ne[H]=nt[H](t);let Qe=t[12]&&!t[1]&&Gd(t);function ve(ce,qe){if(ce[10].length>0)return v_;if(ce[11])return b_}let de=ve(t),Te=de&&de(t);function Ze(ce,qe){return ce[4]?w_:k_}let Se=Ze(t),Ue=Se(t),Ce=t[7]&&t[10].length>0&&Kd(t);function mt(ce){t[40](ce)}let Ge={};return t[5]!==void 0&&(Ge.showTemplates=t[5]),ee=new hg({props:Ge}),bl.push(()=>Rl(ee,"showTemplates",mt)),ee.$on("select",t[22]),{c(){l=a("div"),e=a("div"),n=a("div"),r=a("div"),i=a("ul"),u=a("li"),c=a("button"),d=_(f),p=h(),m=a("li"),g=a("button"),v=_(b),w=h(),C=a("li"),E=a("span"),y=a("span"),S=_(T),q=h(),Ie&&Ie.c(),D=h(),I.c(),R=h(),L=a("div"),A=a("div"),N=a("div"),Z=a("div"),Qe&&Qe.c(),Y=h(),x=a("div"),Te&&Te.c(),F=h(),K=a("div"),M=a("button"),U=_(B),O=h(),J=a("button"),Ue.c(),ie=h(),ne=_(ue),te=h(),Ce&&Ce.c(),re=h(),Et(ee.$$.fragment),pe=h(),oe=a("dialog"),ge=a("div"),he=a("h3"),ye=_(t[14]),Fe=h(),je=a("p"),we=_(t[15]),Oe=h(),Je=a("div"),Le=a("button"),Me=_(Pe),fe=h(),_e=a("button"),De=_(Be),se=h(),ke=a("button"),o(c,"type","button"),o(c,"class","link link-hover"),o(g,"type","button"),o(g,"class","link link-hover"),o(E,"class","flex items-center gap-2"),o(r,"class","breadcrumbs text-sm"),o(n,"class","max-w-7xl mx-auto px-6 py-4"),o(e,"class","bg-base-100 border-b border-base-300"),o(Z,"class","flex items-center gap-4"),o(M,"class","btn btn-outline"),M.disabled=t[4],o(J,"class","btn btn-primary"),J.disabled=$=!t[11]||t[4],o(K,"class","flex gap-3"),o(x,"class","flex items-center gap-4"),o(N,"class","flex justify-between items-center"),o(A,"class","max-w-7xl mx-auto px-6 py-4"),o(L,"class","fixed bottom-0 left-0 right-0 bg-base-100 border-t border-base-300 shadow-2xl z-40"),o(he,"class","font-bold text-lg"),o(je,"class","py-4"),o(Le,"class","btn btn-ghost"),o(_e,"class","btn btn-primary"),o(Je,"class","modal-action"),o(ge,"class","modal-box"),o(ke,"type","button"),o(ke,"class","modal-backdrop"),o(ke,"aria-label","Close dialog"),o(oe,"class","modal"),le(oe,"modal-open",t[13]),o(l,"class","min-h-screen bg-base-200")},m(ce,qe){j(ce,l,qe),s(l,e),s(e,n),s(n,r),s(r,i),s(i,u),s(u,c),s(c,d),s(i,p),s(i,m),s(m,g),s(g,v),s(i,w),s(i,C),s(C,E),s(E,y),s(y,S),s(E,q),Ie&&Ie.m(E,null),s(l,D),Ne[H].m(l,null),s(l,R),s(l,L),s(L,A),s(A,N),s(N,Z),Qe&&Qe.m(Z,null),s(N,Y),s(N,x),Te&&Te.m(x,null),s(x,F),s(x,K),s(K,M),s(M,U),s(K,O),s(K,J),Ue.m(J,null),s(J,ie),s(J,ne),s(A,te),Ce&&Ce.m(A,null),s(l,re),yt(ee,l,null),s(l,pe),s(l,oe),s(oe,ge),s(ge,he),s(he,ye),s(ge,Fe),s(ge,je),s(je,we),s(ge,Oe),s(ge,Je),s(Je,Le),s(Le,Me),s(Je,fe),s(Je,_e),s(_e,De),s(oe,se),s(oe,ke),me=!0,Ee||(Ve=[V(c,"click",t[25]),V(g,"click",t[26]),V(M,"click",t[21]),V(J,"click",t[20]),V(Le,"click",t[18]),V(_e,"click",t[17]),V(ke,"click",t[18])],Ee=!0)},p(ce,qe){(!me||qe[0]&65536)&&f!==(f=ce[16]("breadcrumb.home")+"")&&k(d,f),(!me||qe[0]&65536)&&b!==(b=ce[16]("breadcrumb.routes")+"")&&k(v,b),(!me||qe[0]&65538)&&T!==(T=(ce[1]?ce[16]("breadcrumb.editRoute"):ce[16]("breadcrumb.newRoute"))+"")&&k(S,T),ce[1]?Ie?Ie.p(ce,qe):(Ie=Ud(ce),Ie.c(),Ie.m(E,null)):Ie&&(Ie.d(1),Ie=null);let Re=H;H=Ye(ce),H===Re?Ne[H].p(ce,qe):(Gl(),st(Ne[Re],1,1,()=>{Ne[Re]=null}),Kl(),I=Ne[H],I?I.p(ce,qe):(I=Ne[H]=nt[H](ce),I.c()),et(I,1),I.m(l,R)),ce[12]&&!ce[1]?Qe?Qe.p(ce,qe):(Qe=Gd(ce),Qe.c(),Qe.m(Z,null)):Qe&&(Qe.d(1),Qe=null),de===(de=ve(ce))&&Te?Te.p(ce,qe):(Te&&Te.d(1),Te=de&&de(ce),Te&&(Te.c(),Te.m(x,F))),(!me||qe[0]&65536)&&B!==(B=ce[16]("common.cancel")+"")&&k(U,B),(!me||qe[0]&16)&&(M.disabled=ce[4]),Se!==(Se=Ze(ce))&&(Ue.d(1),Ue=Se(ce),Ue&&(Ue.c(),Ue.m(J,ie))),(!me||qe[0]&65536)&&ue!==(ue=ce[16]("common.save")+"")&&k(ne,ue),(!me||qe[0]&2064&&$!==($=!ce[11]||ce[4]))&&(J.disabled=$),ce[7]&&ce[10].length>0?Ce?Ce.p(ce,qe):(Ce=Kd(ce),Ce.c(),Ce.m(A,null)):Ce&&(Ce.d(1),Ce=null);const dt={};!G&&qe[0]&32&&(G=!0,dt.showTemplates=ce[5],Sl(()=>G=!1)),ee.$set(dt),(!me||qe[0]&16384)&&k(ye,ce[14]),(!me||qe[0]&32768)&&k(we,ce[15]),(!me||qe[0]&65536)&&Pe!==(Pe=ce[16]("confirmDialog.no")+"")&&k(Me,Pe),(!me||qe[0]&65536)&&Be!==(Be=ce[16]("confirmDialog.yes")+"")&&k(De,Be),(!me||qe[0]&8192)&&le(oe,"modal-open",ce[13])},i(ce){me||(et(I),et(ee.$$.fragment,ce),me=!0)},o(ce){st(I),st(ee.$$.fragment,ce),me=!1},d(ce){ce&&P(l),Ie&&Ie.d(),Ne[H].d(),Qe&&Qe.d(),Te&&Te.d(),Ue.d(),Ce&&Ce.d(),Ct(ee),Ee=!1,bt(Ve)}}}function C_(t,l,e){let n;Dt(t,Rt,he=>e(16,n=he));let{params:r={}}=l,i=!1,u="",c=!0,f=!1,d=!1,p="basic",m=!1,g={path:"",upstreams:[{_uid:gr(),target:"",weight:100,priority:1}],headers:{add:{},remove:[],default:{}},body:{add:{},remove:[],replace:{},default:{}},query:{add:{},remove:[],replace:{},default:{}}},b=[],v=[],w=[],C=!1,E=null,y=null,T=null,S=!1,q="",D="",H=null;function I(he,ye,Fe){e(14,q=he),e(15,D=ye),H=Fe,e(13,S=!0)}function R(){e(13,S=!1),H&&(H(),H=null)}function L(){e(13,S=!1),H=null}function A(he){if((he.metaKey||he.ctrlKey)&&he.key==="s"&&(he.preventDefault(),C&&!f&&x()),he.key==="Escape"&&F(),he.key>="1"&&he.key<="6"&&he.ctrlKey&&!he.metaKey&&!he.altKey){const Fe=["basic","upstreams","modification","auth","failover","preview"][parseInt(he.key)-1];Fe&&(e(6,p=Fe),he.preventDefault())}}function N(){if(!i)try{localStorage.setItem("bungee-route-draft",JSON.stringify(g)),e(12,y=Date.now())}catch(he){console.error("Failed to auto-save draft:",he)}}function Z(he){const ye=Math.floor((Date.now()-he)/1e3);return ye<60?n("autosave.justNow"):ye<3600?n("autosave.minutesAgo",{values:{minutes:Math.floor(ye/60)}}):n("autosave.hoursAgo",{values:{hours:Math.floor(ye/3600)}})}async function Y(){try{const he=await og(g),ye=lg(g.upstreams);e(8,b=he),e(9,v=ye),e(10,w=[...he,...ye]),e(11,C=w.length===0&&g.upstreams.length>0)}catch(he){console.error("Validation failed:",he),e(11,C=!1)}}async function x(){if(!C){Lt.show(n("routeEditor.saveFailed",{values:{error:n("common.error")}}),"error");return}try{e(4,f=!0);const he={...g,upstreams:h2(g.upstreams,[ye=>ye.priority??1]).map(({_uid:ye,...Fe})=>Fe)};i?(await Ro.update(u,he),Lt.show(n("routeEditor.routeUpdated"),"success")):(await Ro.create(he),Lt.show(n("routeEditor.routeSaved"),"success"),localStorage.removeItem("bungee-route-draft")),hi()}catch(he){Lt.show(n("routeEditor.saveFailed",{values:{error:he.message}}),"error")}finally{e(4,f=!1)}}function F(){I(n("confirmDialog.cancelTitle"),n("confirmDialog.cancelMessage"),()=>hi())}function K(he){const ye=he.detail;e(0,g={...g,...ye,headers:ye.headers||g.headers,body:ye.body||g.body,query:ye.query||g.query,upstreams:ye.upstreams?.map(Fe=>({...Fe,_uid:gr(),headers:Fe.headers||{add:{},remove:[],default:{}},body:Fe.body||{add:{},remove:[],replace:{},default:{}},query:Fe.query||{add:{},remove:[],replace:{},default:{}}}))||g.upstreams}),Lt.show(n("routeEditor.templateApplied"),"success")}Hs(async()=>{if(window.addEventListener("keydown",A),T=setInterval(()=>{N()},3e4),r.path){e(1,i=!0),e(2,u=decodeURIComponent(r.path));try{const he=await Ro.get(u);he?(e(0,g=he),e(0,g.headers=g.headers||{add:{},remove:[],default:{}},g),e(0,g.body=g.body||{add:{},remove:[],replace:{},default:{}},g),e(0,g.query=g.query||{add:{},remove:[],replace:{},default:{}},g),e(0,g.upstreams=g.upstreams.map(ye=>({...ye,_uid:gr(),headers:ye.headers||{add:{},remove:[],default:{}},body:ye.body||{add:{},remove:[],replace:{},default:{}},query:ye.query||{add:{},remove:[],replace:{},default:{}}})),g)):(Lt.show(n("routes.noRoutes"),"error"),hi())}catch(he){Lt.show(n("routeEditor.saveFailed",{values:{error:he.message}}),"error"),hi()}}else try{const he=localStorage.getItem("bungee-route-draft");if(he){const ye=JSON.parse(he);I(n("confirmDialog.restoreDraftTitle"),n("confirmDialog.restoreDraftMessage"),()=>{e(0,g=ye)})}}catch(he){console.error("Failed to restore draft:",he)}e(3,c=!1)}),ir(()=>{window.removeEventListener("keydown",A),T&&clearInterval(T)});const M=()=>window.location.hash="/",B=()=>window.location.hash="/routes",U=()=>e(6,p="basic"),O=()=>e(6,p="upstreams"),J=()=>e(6,p="modification"),ie=()=>e(6,p="auth"),ue=()=>e(6,p="failover"),ne=()=>e(6,p="preview"),$=()=>e(5,d=!0);function te(he){g=he,e(0,g)}function re(he){g=he,e(0,g)}function ee(he){g=he,e(0,g)}function G(he){g=he,e(0,g)}function pe(he){g=he,e(0,g)}const oe=()=>e(7,m=!m);function ge(he){d=he,e(5,d)}return t.$$set=he=>{"params"in he&&e(23,r=he.params)},t.$$.update=()=>{t.$$.dirty[0]&16777217&&g&&(E&&clearTimeout(E),e(24,E=setTimeout(()=>{Y()},300)))},[g,i,u,c,f,d,p,m,b,v,w,C,y,S,q,D,n,R,L,Z,x,F,K,r,E,M,B,U,O,J,ie,ue,ne,$,te,re,ee,G,pe,oe,ge]}class o2 extends Vt{constructor(l){super(),Ut(this,l,C_,y_,At,{params:23},null,[-1,-1])}}function Yd(t,l,e){const n=t.slice();return n[43]=l[e][0],n[44]=l[e][1],n}function Zd(t,l,e){const n=t.slice();return n[43]=l[e][0],n[44]=l[e][1],n}function Xd(t,l,e){const n=t.slice();return n[43]=l[e][0],n[44]=l[e][1],n}function xd(t,l,e){const n=t.slice();n[52]=l[e],n[61]=e;const r=n[51].durations[n[61]];n[53]=r;const i=n[51].relativeTime[n[61]];n[54]=i;const u=n[53]/n[51].totalDuration*100;n[55]=u;const c=n[54]/n[51].totalDuration*100;n[56]=c;const f=ub(n[52].step);n[57]=f;const d=ib(n[52].step);n[58]=d;const p=(n[53]/n[51].totalDuration*100).toFixed(1);return n[59]=p,n}function $d(t,l,e){const n=t.slice();return n[62]=l[e],n}function ef(t){const l=t.slice(),e=l[27]();return l[51]=e,l}function ep(t,l,e){const n=t.slice();return n[52]=l[e],n}function E_(t){let l,e,n,r,i=t[24]("logs.detail.copyToClipboard")+"",u;return{c(){l=ae("svg"),e=ae("path"),n=h(),r=a("span"),u=_(i),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"),o(l,"xmlns","http://www.w3.org/2000/svg"),o(l,"class","h-4 w-4"),o(l,"fill","none"),o(l,"viewBox","0 0 24 24"),o(l,"stroke","currentColor"),o(r,"class","hidden md:inline")},m(c,f){j(c,l,f),s(l,e),j(c,n,f),j(c,r,f),s(r,u)},p(c,f){f[0]&16777216&&i!==(i=c[24]("logs.detail.copyToClipboard")+"")&&k(u,i)},d(c){c&&(P(l),P(n),P(r))}}}function T_(t){let l,e=t[24]("logs.detail.copied")+"",n;return{c(){l=a("span"),n=_(e),o(l,"class","text-success")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&16777216&&e!==(e=r[24]("logs.detail.copied")+"")&&k(n,e)},d(r){r&&P(l)}}}function M_(t){let l;return{c(){l=a("span"),l.textContent="No steps recorded",o(l,"class","text-sm opacity-40")},m(e,n){j(e,l,n)},p:tt,d(e){e&&P(l)}}}function S_(t){let l,e,n=ut(t[0].processingSteps.slice(0,3)),r=[];for(let u=0;u<n.length;u+=1)r[u]=tp(ep(t,n,u));let i=t[0].processingSteps.length>3&&lp(t);return{c(){for(let u=0;u<r.length;u+=1)r[u].c();l=h(),i&&i.c(),e=Ul()},m(u,c){for(let f=0;f<r.length;f+=1)r[f]&&r[f].m(u,c);j(u,l,c),i&&i.m(u,c),j(u,e,c)},p(u,c){if(c[0]&67108865){n=ut(u[0].processingSteps.slice(0,3));let f;for(f=0;f<n.length;f+=1){const d=ep(u,n,f);r[f]?r[f].p(d,c):(r[f]=tp(d),r[f].c(),r[f].m(l.parentNode,l))}for(;f<r.length;f+=1)r[f].d(1);r.length=n.length}u[0].processingSteps.length>3?i?i.p(u,c):(i=lp(u),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null)},d(u){u&&(P(l),P(e)),Gt(r,u),i&&i.d(u)}}}function tp(t){let l,e=t[26](t[52].step)+"",n;return{c(){l=a("span"),n=_(e),o(l,"class","badge badge-sm badge-outline")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&1&&e!==(e=r[26](r[52].step)+"")&&k(n,e)},d(r){r&&P(l)}}}function lp(t){let l,e,n=t[0].processingSteps.length-3+"",r,i;return{c(){l=a("span"),e=_("+"),r=_(n),i=_(" more"),o(l,"class","badge badge-sm badge-ghost")},m(u,c){j(u,l,c),s(l,e),s(l,r),s(l,i)},p(u,c){c[0]&1&&n!==(n=u[0].processingSteps.length-3+"")&&k(r,n)},d(u){u&&P(l)}}}function sp(t){let l,e,n,r,i,u=t[24]("logs.detail.processingTimeline")+"",c,f,d,p=t[24]("logs.detail.totalSteps",{values:{count:t[0].processingSteps.length}})+"",m,g,b=t[24]("logs.detail.totalDuration",{values:{duration:vo(t[51].totalDuration)}})+"",v,w,C,E=(t[22]?t[24]("logs.detail.hideTimeline"):t[24]("logs.detail.showTimeline"))+"",y,T,S,q,D=t[22]&&op(t);return{c(){l=a("div"),e=a("div"),n=a("div"),r=a("div"),i=a("h4"),c=_(u),f=h(),d=a("p"),m=_(p),g=_(`\uFF0C\n `),v=_(b),w=h(),C=a("button"),y=_(E),T=h(),D&&D.c(),o(i,"class","card-title text-base"),o(d,"class","text-xs opacity-60 mt-1"),o(C,"class","btn btn-sm btn-ghost"),o(n,"class","flex items-center justify-between mb-2"),o(e,"class","card-body p-4"),o(l,"class","card bg-base-200")},m(H,I){j(H,l,I),s(l,e),s(e,n),s(n,r),s(r,i),s(i,c),s(r,f),s(r,d),s(d,m),s(d,g),s(d,v),s(n,w),s(n,C),s(C,y),s(e,T),D&&D.m(e,null),S||(q=V(C,"click",t[31]),S=!0)},p(H,I){I[0]&16777216&&u!==(u=H[24]("logs.detail.processingTimeline")+"")&&k(c,u),I[0]&16777217&&p!==(p=H[24]("logs.detail.totalSteps",{values:{count:H[0].processingSteps.length}})+"")&&k(m,p),I[0]&16777216&&b!==(b=H[24]("logs.detail.totalDuration",{values:{duration:vo(H[51].totalDuration)}})+"")&&k(v,b),I[0]&20971520&&E!==(E=(H[22]?H[24]("logs.detail.hideTimeline"):H[24]("logs.detail.showTimeline"))+"")&&k(y,E),H[22]?D?D.p(H,I):(D=op(H),D.c(),D.m(e,null)):D&&(D.d(1),D=null)},d(H){H&&P(l),D&&D.d(),S=!1,q()}}}function op(t){let l,e,n,r,i,u,c,f,d,p,m=ut(t[0].processingSteps),g=[];for(let b=0;b<m.length;b+=1)g[b]=dp(xd(t,m,b));return{c(){l=a("div"),e=a("div"),n=a("span"),n.textContent="0ms",r=h(),i=a("div"),u=h(),c=a("span"),c.textContent=`${vo(t[51].totalDuration)}`,f=h();for(let b=0;b<g.length;b+=1)g[b].c();d=h(),p=a("div"),p.innerHTML=\'<div class="flex flex-wrap gap-4 text-xs"><div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-blue-500"></div> <span>Authentication</span></div> <div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-purple-500"></div> <span>Plugin</span></div> <div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-green-500"></div> <span>Upstream</span></div> <div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-orange-500"></div> <span>Transform</span></div> <div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-red-500"></div> <span>Error</span></div> <div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-yellow-500"></div> <span>Retry/Recovery</span></div></div>\',o(i,"class","flex-1 border-t border-dashed border-base-content/20"),o(c,"class","mr-32"),o(e,"class","mb-4 flex items-center gap-2 text-xs opacity-50 px-64"),o(l,"class","mt-4"),o(p,"class","mt-6 pt-4 border-t border-base-300")},m(b,v){j(b,l,v),s(l,e),s(e,n),s(e,r),s(e,i),s(e,u),s(e,c),s(l,f);for(let w=0;w<g.length;w+=1)g[w]&&g[w].m(l,null);j(b,d,v),j(b,p,v)},p(b,v){if(v[0]&201326593){m=ut(b[0].processingSteps);let w;for(w=0;w<m.length;w+=1){const C=xd(b,m,w);g[w]?g[w].p(C,v):(g[w]=dp(C),g[w].c(),g[w].m(l,null))}for(;w<g.length;w+=1)g[w].d(1);g.length=m.length}},d(b){b&&(P(l),P(d),P(p)),Gt(g,b)}}}function np(t){let l;return{c(){l=a("div"),o(l,"class","w-px bg-base-content opacity-20 flex-1 min-h-[2.5rem]")},m(e,n){j(e,l,n)},d(e){e&&P(l)}}}function rp(t){let l=t[52].detail.plugins&&Array.isArray(t[52].detail.plugins),e,n,r,i,u=l&&ap(t),c=t[52].detail.target&&up(t),f=t[52].detail.level&&fp(t),d=t[52].detail.error&&cp(t);return{c(){u&&u.c(),e=h(),c&&c.c(),n=h(),f&&f.c(),r=h(),d&&d.c(),i=Ul()},m(p,m){u&&u.m(p,m),j(p,e,m),c&&c.m(p,m),j(p,n,m),f&&f.m(p,m),j(p,r,m),d&&d.m(p,m),j(p,i,m)},p(p,m){m[0]&1&&(l=p[52].detail.plugins&&Array.isArray(p[52].detail.plugins)),l?u?u.p(p,m):(u=ap(p),u.c(),u.m(e.parentNode,e)):u&&(u.d(1),u=null),p[52].detail.target?c?c.p(p,m):(c=up(p),c.c(),c.m(n.parentNode,n)):c&&(c.d(1),c=null),p[52].detail.level?f?f.p(p,m):(f=fp(p),f.c(),f.m(r.parentNode,r)):f&&(f.d(1),f=null),p[52].detail.error?d?d.p(p,m):(d=cp(p),d.c(),d.m(i.parentNode,i)):d&&(d.d(1),d=null)},d(p){p&&(P(e),P(n),P(r),P(i)),u&&u.d(p),c&&c.d(p),f&&f.d(p),d&&d.d(p)}}}function ap(t){let l,e=ut(t[52].detail.plugins),n=[];for(let r=0;r<e.length;r+=1)n[r]=ip($d(t,e,r));return{c(){for(let r=0;r<n.length;r+=1)n[r].c();l=Ul()},m(r,i){for(let u=0;u<n.length;u+=1)n[u]&&n[u].m(r,i);j(r,l,i)},p(r,i){if(i[0]&1){e=ut(r[52].detail.plugins);let u;for(u=0;u<e.length;u+=1){const c=$d(r,e,u);n[u]?n[u].p(c,i):(n[u]=ip(c),n[u].c(),n[u].m(l.parentNode,l))}for(;u<n.length;u+=1)n[u].d(1);n.length=e.length}},d(r){r&&P(l),Gt(n,r)}}}function ip(t){let l,e=t[62]+"",n;return{c(){l=a("span"),n=_(e),o(l,"class","badge badge-xs badge-primary badge-outline")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&1&&e!==(e=r[62]+"")&&k(n,e)},d(r){r&&P(l)}}}function up(t){let l,e=t[52].detail.target+"",n;return{c(){l=a("span"),n=_(e),o(l,"class","badge badge-xs badge-info badge-outline"),o(l,"title","Target upstream")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&1&&e!==(e=r[52].detail.target+"")&&k(n,e)},d(r){r&&P(l)}}}function fp(t){let l,e=t[52].detail.level+"",n;return{c(){l=a("span"),n=_(e),o(l,"class","badge badge-xs badge-warning badge-outline")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&1&&e!==(e=r[52].detail.level+"")&&k(n,e)},d(r){r&&P(l)}}}function cp(t){let l,e,n;return{c(){l=a("span"),e=_("Error"),o(l,"class","badge badge-xs badge-error badge-outline"),o(l,"title",n=t[52].detail.error)},m(r,i){j(r,l,i),s(l,e)},p(r,i){i[0]&1&&n!==(n=r[52].detail.error)&&o(l,"title",n)},d(r){r&&P(l)}}}function R_(t){let l;return{c(){l=a("span"),l.textContent=`${t[59]}%`,o(l,"class","text-xs text-white px-2 leading-7")},m(e,n){j(e,l,n)},p:tt,d(e){e&&P(l)}}}function dp(t){let l,e,n,r,i,u,c,f,d,p=t[26](t[52].step)+"",m,g,b,v,w=t[57]+"",C,E,y,T,S,q,D,H,I,R,L,A,N,Z,Y,x,F=t[61]<t[0].processingSteps.length-1&&np(),K=t[52].detail&&rp(t),M=t[55]>5&&R_(t);return{c(){l=a("div"),e=a("div"),n=a("div"),r=a("div"),u=h(),F&&F.c(),c=h(),f=a("div"),d=a("div"),m=_(p),g=h(),b=a("div"),v=a("span"),C=_(w),E=h(),K&&K.c(),y=h(),T=a("div"),S=a("div"),q=a("div"),M&&M.c(),I=h(),R=a("div"),L=a("div"),L.textContent=`+${t[54]}ms`,A=h(),N=a("div"),N.textContent=`${vo(t[53])}`,Z=h(),Y=a("div"),Y.textContent=`${t[59]}%`,x=h(),o(r,"class",i="w-3 h-3 rounded-full "+t[58]+" z-10"),o(n,"class","flex flex-col items-center"),o(d,"class","text-sm font-medium"),o(v,"class","badge badge-xs badge-ghost"),o(b,"class","text-xs opacity-50 mt-0.5 flex items-center gap-2 flex-wrap"),o(f,"class","flex-1 -mt-0.5"),o(e,"class","flex gap-3 shrink-0 w-64"),o(q,"class",D="absolute h-full "+t[58]+" opacity-70 group-hover:opacity-90 transition-all cursor-pointer"),B1(q,"left",t[56]+"%"),B1(q,"width",Math.max(t[55],1)+"%"),o(q,"title",H=t[52].step+": "+vo(t[53])+" ("+t[59]+"%)"),o(S,"class","w-full h-7 relative bg-base-300/30 rounded overflow-hidden"),o(T,"class","flex-1 flex items-center"),o(L,"class","opacity-60"),o(N,"class","font-semibold"),o(Y,"class","opacity-40"),o(R,"class","shrink-0 w-32 text-xs space-y-0.5 font-mono"),o(l,"class","flex gap-4 group relative mb-3")},m(B,U){j(B,l,U),s(l,e),s(e,n),s(n,r),s(n,u),F&&F.m(n,null),s(e,c),s(e,f),s(f,d),s(d,m),s(f,g),s(f,b),s(b,v),s(v,C),s(b,E),K&&K.m(b,null),s(l,y),s(l,T),s(T,S),s(S,q),M&&M.m(q,null),s(l,I),s(l,R),s(R,L),s(R,A),s(R,N),s(R,Z),s(R,Y),s(l,x)},p(B,U){U[0]&1&&i!==(i="w-3 h-3 rounded-full "+B[58]+" z-10")&&o(r,"class",i),B[61]<B[0].processingSteps.length-1?F||(F=np(),F.c(),F.m(n,null)):F&&(F.d(1),F=null),U[0]&1&&p!==(p=B[26](B[52].step)+"")&&k(m,p),U[0]&1&&w!==(w=B[57]+"")&&k(C,w),B[52].detail?K?K.p(B,U):(K=rp(B),K.c(),K.m(b,null)):K&&(K.d(1),K=null),B[55]>5&&M.p(B,U),U[0]&1&&D!==(D="absolute h-full "+B[58]+" opacity-70 group-hover:opacity-90 transition-all cursor-pointer")&&o(q,"class",D),U[0]&1&&H!==(H=B[52].step+": "+vo(B[53])+" ("+B[59]+"%)")&&o(q,"title",H)},d(B){B&&P(l),F&&F.d(),K&&K.d(),M&&M.d()}}}function q_(t){let l,e,n=t[24]("logs.detail.path")+"",r,i,u,c=t[0].path+"",f;return{c(){l=a("div"),e=a("div"),r=_(n),i=h(),u=a("div"),f=_(c),o(e,"class","text-xs opacity-60 mb-1"),o(u,"class","font-mono text-sm bg-base-300 p-2 rounded break-all")},m(d,p){j(d,l,p),s(l,e),s(e,r),s(l,i),s(l,u),s(u,f)},p(d,p){p[0]&16777216&&n!==(n=d[24]("logs.detail.path")+"")&&k(r,n),p[0]&1&&c!==(c=d[0].path+"")&&k(f,c)},d(d){d&&P(l)}}}function H_(t){let l,e,n=t[24]("logs.detail.originalPath")+"",r,i,u,c=t[0].path+"",f,d,p,m,g=t[24]("logs.detail.transformedPath")+"",b,v,w,C=t[0].transformedPath+"",E;return{c(){l=a("div"),e=a("div"),r=_(n),i=h(),u=a("div"),f=_(c),d=h(),p=a("div"),m=a("div"),b=_(g),v=h(),w=a("div"),E=_(C),o(e,"class","text-xs opacity-60 mb-1"),o(u,"class","font-mono text-sm bg-base-300 p-2 rounded break-all"),o(m,"class","text-xs opacity-60 mb-1"),o(w,"class","font-mono text-sm bg-base-300 p-2 rounded break-all")},m(y,T){j(y,l,T),s(l,e),s(e,r),s(l,i),s(l,u),s(u,f),j(y,d,T),j(y,p,T),s(p,m),s(m,b),s(p,v),s(p,w),s(w,E)},p(y,T){T[0]&16777216&&n!==(n=y[24]("logs.detail.originalPath")+"")&&k(r,n),T[0]&1&&c!==(c=y[0].path+"")&&k(f,c),T[0]&16777216&&g!==(g=y[24]("logs.detail.transformedPath")+"")&&k(b,g),T[0]&1&&C!==(C=y[0].transformedPath+"")&&k(E,C)},d(y){y&&(P(l),P(d),P(p))}}}function pp(t){let l,e,n=t[24]("logs.detail.query")+"",r,i,u,c=t[0].query+"",f;return{c(){l=a("div"),e=a("div"),r=_(n),i=h(),u=a("div"),f=_(c),o(e,"class","text-xs opacity-60 mb-1"),o(u,"class","font-mono text-sm bg-base-300 p-2 rounded break-all")},m(d,p){j(d,l,p),s(l,e),s(e,r),s(l,i),s(l,u),s(u,f)},p(d,p){p[0]&16777216&&n!==(n=d[24]("logs.detail.query")+"")&&k(r,n),p[0]&1&&c!==(c=d[0].query+"")&&k(f,c)},d(d){d&&P(l)}}}function hp(t){let l,e,n,r=t[24]("logs.detail.routePath")+"",i,u,c,f=t[0].routePath+"",d;return{c(){l=a("div"),e=a("div"),n=a("h4"),i=_(r),u=h(),c=a("div"),d=_(f),o(n,"class","card-title text-base mb-2"),o(c,"class","font-mono text-sm"),o(e,"class","card-body p-4"),o(l,"class","card bg-base-200")},m(p,m){j(p,l,m),s(l,e),s(e,n),s(n,i),s(e,u),s(e,c),s(c,d)},p(p,m){m[0]&16777216&&r!==(r=p[24]("logs.detail.routePath")+"")&&k(i,r),m[0]&1&&f!==(f=p[0].routePath+"")&&k(d,f)},d(p){p&&P(l)}}}function mp(t){let l,e,n,r=t[24]("logs.detail.upstream")+"",i,u,c,f=t[0].upstream+"",d,p,m=t[0].transformer&&gp(t);return{c(){l=a("div"),e=a("div"),n=a("h4"),i=_(r),u=h(),c=a("div"),d=_(f),p=h(),m&&m.c(),o(n,"class","card-title text-base mb-2"),o(c,"class","font-mono text-sm mb-2"),o(e,"class","card-body p-4"),o(l,"class","card bg-base-200")},m(g,b){j(g,l,b),s(l,e),s(e,n),s(n,i),s(e,u),s(e,c),s(c,d),s(e,p),m&&m.m(e,null)},p(g,b){b[0]&16777216&&r!==(r=g[24]("logs.detail.upstream")+"")&&k(i,r),b[0]&1&&f!==(f=g[0].upstream+"")&&k(d,f),g[0].transformer?m?m.p(g,b):(m=gp(g),m.c(),m.m(e,null)):m&&(m.d(1),m=null)},d(g){g&&P(l),m&&m.d()}}}function gp(t){let l,e=t[24]("logs.detail.transformer")+"",n,r,i=t[0].transformer+"",u;return{c(){l=a("div"),n=_(e),r=_(": "),u=_(i),o(l,"class","text-xs opacity-60")},m(c,f){j(c,l,f),s(l,n),s(l,r),s(l,u)},p(c,f){f[0]&16777216&&e!==(e=c[24]("logs.detail.transformer")+"")&&k(n,e),f[0]&1&&i!==(i=c[0].transformer+"")&&k(u,i)},d(c){c&&P(l)}}}function _p(t){let l,e,n,r,i,u,c=t[24]("logs.detail.errorInfo")+"",f,d,p,m=t[0].errorMessage+"",g;return{c(){l=a("div"),e=ae("svg"),n=ae("path"),r=h(),i=a("div"),u=a("div"),f=_(c),d=h(),p=a("div"),g=_(m),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","stroke-current shrink-0 h-6 w-6"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(u,"class","font-bold"),o(p,"class","font-mono text-sm"),o(l,"class","alert alert-error")},m(b,v){j(b,l,v),s(l,e),s(e,n),s(l,r),s(l,i),s(i,u),s(u,f),s(i,d),s(i,p),s(p,g)},p(b,v){v[0]&16777216&&c!==(c=b[24]("logs.detail.errorInfo")+"")&&k(f,c),v[0]&1&&m!==(m=b[0].errorMessage+"")&&k(g,m)},d(b){b&&P(l)}}}function bp(t){let l;function e(i,u){return i[0].originalReqHeaderId||i[0].originalReqBodyId?j_:P_}let n=e(t),r=n(t);return{c(){l=a("div"),r.c(),o(l,"class","space-y-4")},m(i,u){j(i,l,u),r.m(l,null)},p(i,u){n===(n=e(i))&&r?r.p(i,u):(r.d(1),r=n(i),r&&(r.c(),r.m(l,null)))},d(i){i&&P(l),r.d()}}}function P_(t){let l,e=t[24]("logs.detail.noDataAvailable")+"",n;return{c(){l=a("div"),n=_(e),o(l,"class","text-center py-8 opacity-60")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&16777216&&e!==(e=r[24]("logs.detail.noDataAvailable")+"")&&k(n,e)},d(r){r&&P(l)}}}function j_(t){let l,e,n=t[0].originalReqHeaderId&&vp(t),r=t[8]&&t[0].originalReqBodyId&&wp(t);return{c(){n&&n.c(),l=h(),r&&r.c(),e=Ul()},m(i,u){n&&n.m(i,u),j(i,l,u),r&&r.m(i,u),j(i,e,u)},p(i,u){i[0].originalReqHeaderId?n?n.p(i,u):(n=vp(i),n.c(),n.m(l.parentNode,l)):n&&(n.d(1),n=null),i[8]&&i[0].originalReqBodyId?r?r.p(i,u):(r=wp(i),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null)},d(i){i&&(P(l),P(e)),n&&n.d(i),r&&r.d(i)}}}function vp(t){let l,e,n=t[24]("logs.detail.requestHeaders")+"",r,i;function u(d,p){return d[17]?B_:d[19]?I_:d[15]!==null?D_:L_}let c=u(t),f=c(t);return{c(){l=a("div"),e=a("div"),r=_(n),i=h(),f.c(),o(e,"class","text-sm font-semibold mb-2")},m(d,p){j(d,l,p),s(l,e),s(e,r),s(l,i),f.m(l,null)},p(d,p){p[0]&16777216&&n!==(n=d[24]("logs.detail.requestHeaders")+"")&&k(r,n),c===(c=u(d))&&f?f.p(d,p):(f.d(1),f=c(d),f&&(f.c(),f.m(l,null)))},d(d){d&&P(l),f.d()}}}function L_(t){let l,e=t[24]("logs.detail.noHeaders")+"",n;return{c(){l=a("div"),n=_(e),o(l,"class","text-sm opacity-60")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&16777216&&e!==(e=r[24]("logs.detail.noHeaders")+"")&&k(n,e)},d(r){r&&P(l)}}}function D_(t){let l,e,n,r,i,u=ut(Object.entries(t[15])),c=[];for(let f=0;f<u.length;f+=1)c[f]=kp(Xd(t,u,f));return{c(){l=a("div"),e=a("table"),n=a("thead"),n.innerHTML=\'<tr><th class="w-1/3">Name</th> <th>Value</th></tr>\',r=h(),i=a("tbody");for(let f=0;f<c.length;f+=1)c[f].c();o(e,"class","table table-sm table-zebra"),o(l,"class","overflow-x-auto")},m(f,d){j(f,l,d),s(l,e),s(e,n),s(e,r),s(e,i);for(let p=0;p<c.length;p+=1)c[p]&&c[p].m(i,null)},p(f,d){if(d[0]&32768){u=ut(Object.entries(f[15]));let p;for(p=0;p<u.length;p+=1){const m=Xd(f,u,p);c[p]?c[p].p(m,d):(c[p]=kp(m),c[p].c(),c[p].m(i,null))}for(;p<c.length;p+=1)c[p].d(1);c.length=u.length}},d(f){f&&P(l),Gt(c,f)}}}function I_(t){let l,e,n;return{c(){l=a("div"),e=a("span"),n=_(t[19]),o(e,"class","text-sm"),o(l,"class","alert alert-error")},m(r,i){j(r,l,i),s(l,e),s(e,n)},p(r,i){i[0]&524288&&k(n,r[19])},d(r){r&&P(l)}}}function B_(t){let l,e,n,r,i=t[24]("common.loading")+"",u;return{c(){l=a("div"),e=a("span"),n=h(),r=a("span"),u=_(i),o(e,"class","loading loading-spinner loading-sm"),o(r,"class","text-sm"),o(l,"class","flex items-center gap-2")},m(c,f){j(c,l,f),s(l,e),s(l,n),s(l,r),s(r,u)},p(c,f){f[0]&16777216&&i!==(i=c[24]("common.loading")+"")&&k(u,i)},d(c){c&&P(l)}}}function kp(t){let l,e,n=t[43]+"",r,i,u,c=t[44]+"",f,d;return{c(){l=a("tr"),e=a("td"),r=_(n),i=h(),u=a("td"),f=_(c),d=h(),o(e,"class","font-mono text-xs"),o(u,"class","font-mono text-xs break-all")},m(p,m){j(p,l,m),s(l,e),s(e,r),s(l,i),s(l,u),s(u,f),s(l,d)},p(p,m){m[0]&32768&&n!==(n=p[43]+"")&&k(r,n),m[0]&32768&&c!==(c=p[44]+"")&&k(f,c)},d(p){p&&P(l)}}}function wp(t){let l,e,n=t[24]("logs.detail.requestBody")+"",r,i;function u(d,p){return d[18]?z_:d[20]?F_:d[16]!==null?O_:A_}let c=u(t),f=c(t);return{c(){l=a("div"),e=a("div"),r=_(n),i=h(),f.c(),o(e,"class","text-sm font-semibold mb-2")},m(d,p){j(d,l,p),s(l,e),s(e,r),s(l,i),f.m(l,null)},p(d,p){p[0]&16777216&&n!==(n=d[24]("logs.detail.requestBody")+"")&&k(r,n),c===(c=u(d))&&f?f.p(d,p):(f.d(1),f=c(d),f&&(f.c(),f.m(l,null)))},d(d){d&&P(l),f.d()}}}function A_(t){let l,e=t[24]("logs.detail.noBody")+"",n;return{c(){l=a("div"),n=_(e),o(l,"class","text-sm opacity-60")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&16777216&&e!==(e=r[24]("logs.detail.noBody")+"")&&k(n,e)},d(r){r&&P(l)}}}function O_(t){let l,e=ar(t[16])+"",n;return{c(){l=a("pre"),n=_(e),o(l,"class","bg-base-300 p-4 rounded overflow-x-auto text-xs max-h-96")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&65536&&e!==(e=ar(r[16])+"")&&k(n,e)},d(r){r&&P(l)}}}function F_(t){let l,e,n;return{c(){l=a("div"),e=a("span"),n=_(t[20]),o(e,"class","text-sm"),o(l,"class","alert alert-error")},m(r,i){j(r,l,i),s(l,e),s(e,n)},p(r,i){i[0]&1048576&&k(n,r[20])},d(r){r&&P(l)}}}function z_(t){let l,e,n,r,i=t[24]("common.loading")+"",u;return{c(){l=a("div"),e=a("span"),n=h(),r=a("span"),u=_(i),o(e,"class","loading loading-spinner loading-sm"),o(r,"class","text-sm"),o(l,"class","flex items-center gap-2")},m(c,f){j(c,l,f),s(l,e),s(l,n),s(l,r),s(r,u)},p(c,f){f[0]&16777216&&i!==(i=c[24]("common.loading")+"")&&k(u,i)},d(c){c&&P(l)}}}function yp(t){let l;function e(i,u){return i[0].reqHeaderId||i[0].reqBodyId?U_:N_}let n=e(t),r=n(t);return{c(){l=a("div"),r.c(),o(l,"class","space-y-4")},m(i,u){j(i,l,u),r.m(l,null)},p(i,u){n===(n=e(i))&&r?r.p(i,u):(r.d(1),r=n(i),r&&(r.c(),r.m(l,null)))},d(i){i&&P(l),r.d()}}}function N_(t){let l,e=t[24]("logs.detail.noDataAvailable")+"",n;return{c(){l=a("div"),n=_(e),o(l,"class","text-center py-8 opacity-60")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&16777216&&e!==(e=r[24]("logs.detail.noDataAvailable")+"")&&k(n,e)},d(r){r&&P(l)}}}function U_(t){let l,e,n=t[0].reqHeaderId&&Cp(t),r=t[8]&&t[0].reqBodyId&&Tp(t);return{c(){n&&n.c(),l=h(),r&&r.c(),e=Ul()},m(i,u){n&&n.m(i,u),j(i,l,u),r&&r.m(i,u),j(i,e,u)},p(i,u){i[0].reqHeaderId?n?n.p(i,u):(n=Cp(i),n.c(),n.m(l.parentNode,l)):n&&(n.d(1),n=null),i[8]&&i[0].reqBodyId?r?r.p(i,u):(r=Tp(i),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null)},d(i){i&&(P(l),P(e)),n&&n.d(i),r&&r.d(i)}}}function Cp(t){let l,e,n=t[24]("logs.detail.requestHeaders")+"",r,i;function u(d,p){return d[11]?G_:d[13]?W_:d[9]!==null?J_:V_}let c=u(t),f=c(t);return{c(){l=a("div"),e=a("div"),r=_(n),i=h(),f.c(),o(e,"class","text-sm font-semibold mb-2")},m(d,p){j(d,l,p),s(l,e),s(e,r),s(l,i),f.m(l,null)},p(d,p){p[0]&16777216&&n!==(n=d[24]("logs.detail.requestHeaders")+"")&&k(r,n),c===(c=u(d))&&f?f.p(d,p):(f.d(1),f=c(d),f&&(f.c(),f.m(l,null)))},d(d){d&&P(l),f.d()}}}function V_(t){let l,e=t[24]("logs.detail.noHeaders")+"",n;return{c(){l=a("div"),n=_(e),o(l,"class","text-sm opacity-60")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&16777216&&e!==(e=r[24]("logs.detail.noHeaders")+"")&&k(n,e)},d(r){r&&P(l)}}}function J_(t){let l,e,n,r,i,u=ut(Object.entries(t[9])),c=[];for(let f=0;f<u.length;f+=1)c[f]=Ep(Zd(t,u,f));return{c(){l=a("div"),e=a("table"),n=a("thead"),n.innerHTML=\'<tr><th class="w-1/3">Name</th> <th>Value</th></tr>\',r=h(),i=a("tbody");for(let f=0;f<c.length;f+=1)c[f].c();o(e,"class","table table-sm table-zebra"),o(l,"class","overflow-x-auto")},m(f,d){j(f,l,d),s(l,e),s(e,n),s(e,r),s(e,i);for(let p=0;p<c.length;p+=1)c[p]&&c[p].m(i,null)},p(f,d){if(d[0]&512){u=ut(Object.entries(f[9]));let p;for(p=0;p<u.length;p+=1){const m=Zd(f,u,p);c[p]?c[p].p(m,d):(c[p]=Ep(m),c[p].c(),c[p].m(i,null))}for(;p<c.length;p+=1)c[p].d(1);c.length=u.length}},d(f){f&&P(l),Gt(c,f)}}}function W_(t){let l,e,n;return{c(){l=a("div"),e=a("span"),n=_(t[13]),o(e,"class","text-sm"),o(l,"class","alert alert-error")},m(r,i){j(r,l,i),s(l,e),s(e,n)},p(r,i){i[0]&8192&&k(n,r[13])},d(r){r&&P(l)}}}function G_(t){let l,e,n,r,i=t[24]("common.loading")+"",u;return{c(){l=a("div"),e=a("span"),n=h(),r=a("span"),u=_(i),o(e,"class","loading loading-spinner loading-sm"),o(r,"class","text-sm"),o(l,"class","flex items-center gap-2")},m(c,f){j(c,l,f),s(l,e),s(l,n),s(l,r),s(r,u)},p(c,f){f[0]&16777216&&i!==(i=c[24]("common.loading")+"")&&k(u,i)},d(c){c&&P(l)}}}function Ep(t){let l,e,n=t[43]+"",r,i,u,c=t[44]+"",f,d;return{c(){l=a("tr"),e=a("td"),r=_(n),i=h(),u=a("td"),f=_(c),d=h(),o(e,"class","font-mono text-xs"),o(u,"class","font-mono text-xs break-all")},m(p,m){j(p,l,m),s(l,e),s(e,r),s(l,i),s(l,u),s(u,f),s(l,d)},p(p,m){m[0]&512&&n!==(n=p[43]+"")&&k(r,n),m[0]&512&&c!==(c=p[44]+"")&&k(f,c)},d(p){p&&P(l)}}}function Tp(t){let l,e,n=t[24]("logs.detail.requestBody")+"",r,i;function u(d,p){return d[4]?Z_:d[6]?Y_:d[2]!==null?Q_:K_}let c=u(t),f=c(t);return{c(){l=a("div"),e=a("div"),r=_(n),i=h(),f.c(),o(e,"class","text-sm font-semibold mb-2")},m(d,p){j(d,l,p),s(l,e),s(e,r),s(l,i),f.m(l,null)},p(d,p){p[0]&16777216&&n!==(n=d[24]("logs.detail.requestBody")+"")&&k(r,n),c===(c=u(d))&&f?f.p(d,p):(f.d(1),f=c(d),f&&(f.c(),f.m(l,null)))},d(d){d&&P(l),f.d()}}}function K_(t){let l,e=t[24]("logs.detail.noBody")+"",n;return{c(){l=a("div"),n=_(e),o(l,"class","text-sm opacity-60")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&16777216&&e!==(e=r[24]("logs.detail.noBody")+"")&&k(n,e)},d(r){r&&P(l)}}}function Q_(t){let l,e=ar(t[2])+"",n;return{c(){l=a("pre"),n=_(e),o(l,"class","bg-base-300 p-4 rounded overflow-x-auto text-xs max-h-96")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&4&&e!==(e=ar(r[2])+"")&&k(n,e)},d(r){r&&P(l)}}}function Y_(t){let l,e,n;return{c(){l=a("div"),e=a("span"),n=_(t[6]),o(e,"class","text-sm"),o(l,"class","alert alert-error")},m(r,i){j(r,l,i),s(l,e),s(e,n)},p(r,i){i[0]&64&&k(n,r[6])},d(r){r&&P(l)}}}function Z_(t){let l,e,n,r,i=t[24]("common.loading")+"",u;return{c(){l=a("div"),e=a("span"),n=h(),r=a("span"),u=_(i),o(e,"class","loading loading-spinner loading-sm"),o(r,"class","text-sm"),o(l,"class","flex items-center gap-2")},m(c,f){j(c,l,f),s(l,e),s(l,n),s(l,r),s(r,u)},p(c,f){f[0]&16777216&&i!==(i=c[24]("common.loading")+"")&&k(u,i)},d(c){c&&P(l)}}}function Mp(t){let l;function e(i,u){return i[0].respHeaderId||i[0].respBodyId?x_:X_}let n=e(t),r=n(t);return{c(){l=a("div"),r.c(),o(l,"class","space-y-4")},m(i,u){j(i,l,u),r.m(l,null)},p(i,u){n===(n=e(i))&&r?r.p(i,u):(r.d(1),r=n(i),r&&(r.c(),r.m(l,null)))},d(i){i&&P(l),r.d()}}}function X_(t){let l,e=t[24]("logs.detail.noDataAvailable")+"",n;return{c(){l=a("div"),n=_(e),o(l,"class","text-center py-8 opacity-60")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&16777216&&e!==(e=r[24]("logs.detail.noDataAvailable")+"")&&k(n,e)},d(r){r&&P(l)}}}function x_(t){let l,e,n=t[0].respHeaderId&&Sp(t),r=t[8]&&t[0].respBodyId&&qp(t);return{c(){n&&n.c(),l=h(),r&&r.c(),e=Ul()},m(i,u){n&&n.m(i,u),j(i,l,u),r&&r.m(i,u),j(i,e,u)},p(i,u){i[0].respHeaderId?n?n.p(i,u):(n=Sp(i),n.c(),n.m(l.parentNode,l)):n&&(n.d(1),n=null),i[8]&&i[0].respBodyId?r?r.p(i,u):(r=qp(i),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null)},d(i){i&&(P(l),P(e)),n&&n.d(i),r&&r.d(i)}}}function Sp(t){let l,e,n=t[24]("logs.detail.responseHeaders")+"",r,i;function u(d,p){return d[12]?lb:d[14]?tb:d[10]!==null?eb:$_}let c=u(t),f=c(t);return{c(){l=a("div"),e=a("div"),r=_(n),i=h(),f.c(),o(e,"class","text-sm font-semibold mb-2")},m(d,p){j(d,l,p),s(l,e),s(e,r),s(l,i),f.m(l,null)},p(d,p){p[0]&16777216&&n!==(n=d[24]("logs.detail.responseHeaders")+"")&&k(r,n),c===(c=u(d))&&f?f.p(d,p):(f.d(1),f=c(d),f&&(f.c(),f.m(l,null)))},d(d){d&&P(l),f.d()}}}function $_(t){let l,e=t[24]("logs.detail.noHeaders")+"",n;return{c(){l=a("div"),n=_(e),o(l,"class","text-sm opacity-60")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&16777216&&e!==(e=r[24]("logs.detail.noHeaders")+"")&&k(n,e)},d(r){r&&P(l)}}}function eb(t){let l,e,n,r,i,u=ut(Object.entries(t[10])),c=[];for(let f=0;f<u.length;f+=1)c[f]=Rp(Yd(t,u,f));return{c(){l=a("div"),e=a("table"),n=a("thead"),n.innerHTML=\'<tr><th class="w-1/3">Name</th> <th>Value</th></tr>\',r=h(),i=a("tbody");for(let f=0;f<c.length;f+=1)c[f].c();o(e,"class","table table-sm table-zebra"),o(l,"class","overflow-x-auto")},m(f,d){j(f,l,d),s(l,e),s(e,n),s(e,r),s(e,i);for(let p=0;p<c.length;p+=1)c[p]&&c[p].m(i,null)},p(f,d){if(d[0]&1024){u=ut(Object.entries(f[10]));let p;for(p=0;p<u.length;p+=1){const m=Yd(f,u,p);c[p]?c[p].p(m,d):(c[p]=Rp(m),c[p].c(),c[p].m(i,null))}for(;p<c.length;p+=1)c[p].d(1);c.length=u.length}},d(f){f&&P(l),Gt(c,f)}}}function tb(t){let l,e,n;return{c(){l=a("div"),e=a("span"),n=_(t[14]),o(e,"class","text-sm"),o(l,"class","alert alert-error")},m(r,i){j(r,l,i),s(l,e),s(e,n)},p(r,i){i[0]&16384&&k(n,r[14])},d(r){r&&P(l)}}}function lb(t){let l,e,n,r,i=t[24]("common.loading")+"",u;return{c(){l=a("div"),e=a("span"),n=h(),r=a("span"),u=_(i),o(e,"class","loading loading-spinner loading-sm"),o(r,"class","text-sm"),o(l,"class","flex items-center gap-2")},m(c,f){j(c,l,f),s(l,e),s(l,n),s(l,r),s(r,u)},p(c,f){f[0]&16777216&&i!==(i=c[24]("common.loading")+"")&&k(u,i)},d(c){c&&P(l)}}}function Rp(t){let l,e,n=t[43]+"",r,i,u,c=t[44]+"",f,d;return{c(){l=a("tr"),e=a("td"),r=_(n),i=h(),u=a("td"),f=_(c),d=h(),o(e,"class","font-mono text-xs"),o(u,"class","font-mono text-xs break-all")},m(p,m){j(p,l,m),s(l,e),s(e,r),s(l,i),s(l,u),s(u,f),s(l,d)},p(p,m){m[0]&1024&&n!==(n=p[43]+"")&&k(r,n),m[0]&1024&&c!==(c=p[44]+"")&&k(f,c)},d(p){p&&P(l)}}}function qp(t){let l,e,n=t[24]("logs.detail.responseBody")+"",r,i;function u(d,p){return d[5]?rb:d[7]?nb:d[3]!==null?ob:sb}let c=u(t),f=c(t);return{c(){l=a("div"),e=a("div"),r=_(n),i=h(),f.c(),o(e,"class","text-sm font-semibold mb-2")},m(d,p){j(d,l,p),s(l,e),s(e,r),s(l,i),f.m(l,null)},p(d,p){p[0]&16777216&&n!==(n=d[24]("logs.detail.responseBody")+"")&&k(r,n),c===(c=u(d))&&f?f.p(d,p):(f.d(1),f=c(d),f&&(f.c(),f.m(l,null)))},d(d){d&&P(l),f.d()}}}function sb(t){let l,e=t[24]("logs.detail.noBody")+"",n;return{c(){l=a("div"),n=_(e),o(l,"class","text-sm opacity-60")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&16777216&&e!==(e=r[24]("logs.detail.noBody")+"")&&k(n,e)},d(r){r&&P(l)}}}function ob(t){let l,e=ar(t[3])+"",n;return{c(){l=a("pre"),n=_(e),o(l,"class","bg-base-300 p-4 rounded overflow-x-auto text-xs max-h-96")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&8&&e!==(e=ar(r[3])+"")&&k(n,e)},d(r){r&&P(l)}}}function nb(t){let l,e,n;return{c(){l=a("div"),e=a("span"),n=_(t[7]),o(e,"class","text-sm"),o(l,"class","alert alert-error")},m(r,i){j(r,l,i),s(l,e),s(e,n)},p(r,i){i[0]&128&&k(n,r[7])},d(r){r&&P(l)}}}function rb(t){let l,e,n,r,i=t[24]("common.loading")+"",u;return{c(){l=a("div"),e=a("span"),n=h(),r=a("span"),u=_(i),o(e,"class","loading loading-spinner loading-sm"),o(r,"class","text-sm"),o(l,"class","flex items-center gap-2")},m(c,f){j(c,l,f),s(l,e),s(l,n),s(l,r),s(r,u)},p(c,f){f[0]&16777216&&i!==(i=c[24]("common.loading")+"")&&k(u,i)},d(c){c&&P(l)}}}function Hp(t){let l,e,n,r=t[24]("logs.detail.authInfo")+"",i,u,c,f,d,p=t[24]("logs.detail.authLevel")+"",m,g,b,v=t[0].authLevel+"",w,C,E,y,T=t[24]("logs.detail.authResult")+"",S,q,D,H=(t[0].authSuccess?t[24]("logs.detail.authSuccess"):t[24]("logs.detail.authFailed"))+"",I,R;return{c(){l=a("div"),e=a("div"),n=a("h4"),i=_(r),u=h(),c=a("div"),f=a("div"),d=a("div"),m=_(p),g=h(),b=a("div"),w=_(v),C=h(),E=a("div"),y=a("div"),S=_(T),q=h(),D=a("span"),I=_(H),o(n,"class","card-title text-base mb-2"),o(d,"class","text-xs opacity-60 mb-1"),o(b,"class","text-sm"),o(y,"class","text-xs opacity-60 mb-1"),o(D,"class",R="badge "+(t[0].authSuccess?"badge-success":"badge-error")),o(c,"class","grid grid-cols-2 gap-4"),o(e,"class","card-body p-4"),o(l,"class","card bg-base-200")},m(L,A){j(L,l,A),s(l,e),s(e,n),s(n,i),s(e,u),s(e,c),s(c,f),s(f,d),s(d,m),s(f,g),s(f,b),s(b,w),s(c,C),s(c,E),s(E,y),s(y,S),s(E,q),s(E,D),s(D,I)},p(L,A){A[0]&16777216&&r!==(r=L[24]("logs.detail.authInfo")+"")&&k(i,r),A[0]&16777216&&p!==(p=L[24]("logs.detail.authLevel")+"")&&k(m,p),A[0]&1&&v!==(v=L[0].authLevel+"")&&k(w,v),A[0]&16777216&&T!==(T=L[24]("logs.detail.authResult")+"")&&k(S,T),A[0]&16777217&&H!==(H=(L[0].authSuccess?L[24]("logs.detail.authSuccess"):L[24]("logs.detail.authFailed"))+"")&&k(I,H),A[0]&1&&R!==(R="badge "+(L[0].authSuccess?"badge-success":"badge-error"))&&o(D,"class",R)},d(L){L&&P(l)}}}function ab(t){let l,e,n,r,i=t[24]("logs.detail.title")+"",u,c,f,d,p,m,g,b,v,w,C,E=t[24]("logs.detail.downloadJson")+"",y,T,S,q,D,H,I,R,L,A=t[24]("logs.detail.overview")+"",N,Z,Y,x,F,K=t[24]("logs.detail.status")+"",M,B,U,O=t[0].status+"",J,ie,ue,ne,$,te=t[24]("logs.detail.method")+"",re,ee,G,pe=t[0].method+"",oe,ge,he,ye,Fe=t[24]("logs.requestType")+"",je,we,Oe,Je=t[25](t[0].requestType)+"",Le,Pe,Me,fe,_e,Be,De=t[24]("logs.detail.duration")+"",se,ke,me,Ee=vo(t[0].duration)+"",Ve,Ie,nt,Ne,Ye=t[24]("logs.detail.timestamp")+"",Qe,ve,de,Te=Pp(t[0].timestamp)+"",Ze,Se,Ue,Ce,mt=t[24]("logs.detail.requestId")+"",Ge,ce,qe,Re=t[0].requestId+"",dt,We,z,He,X=t[24]("logs.detail.processingSteps")+"",ft,Ht,Ke,_t,lt,it,ze,Xe,Bt=t[24]("logs.detail.requestInfo")+"",at,gt,wt,pt,vl,rt,Mt,ht,Tt,kl,Ot,hl,ml,ql,Jt,Ql,Qt,Yt=t[24]("logs.detail.tabOriginalRequest")+"",Hl,Il,gl,ol,Yl,Ft,Pl=t[24]("logs.detail.tabFinalRequest")+"",Vl,Jl,El,zt,Zl,Pt,jl=t[24]("logs.detail.tabResponse")+"",Ll,$l,xt,wl,es,Fl,Bl,Wl,Ps;function nl(Xt,$e){return Xt[23]?T_:E_}let yl=nl(t),rl=yl(t);function zl(Xt,$e){return Xt[0].processingSteps&&Xt[0].processingSteps.length>0?S_:M_}let al=zl(t),_l=al(t),ll=t[0].processingSteps&&t[0].processingSteps.length>0&&sp(ef(t));function Dl(Xt,$e){return Xt[0].transformedPath&&Xt[0].transformedPath!==Xt[0].path?H_:q_}let Nl=Dl(t),Tl=Nl(t),Wt=t[0].query&&pp(t),It=t[0].routePath&&hp(t),jt=t[0].upstream&&mp(t),$t=t[0].errorMessage&&_p(t),el=t[21]==="original"&&bp(t),Kt=t[21]==="transformed"&&yp(t),Zt=t[21]==="response"&&Mp(t),il=t[0].authLevel&&Hp(t);return Bl=uf(t[33][0]),{c(){l=a("div"),e=a("div"),n=a("div"),r=a("h3"),u=_(i),c=h(),f=a("div"),d=a("button"),rl.c(),m=h(),g=a("button"),b=ae("svg"),v=ae("path"),w=h(),C=a("span"),y=_(E),S=h(),q=a("button"),q.innerHTML=\'<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>\',D=h(),H=a("div"),I=a("div"),R=a("div"),L=a("h4"),N=_(A),Z=h(),Y=a("div"),x=a("div"),F=a("div"),M=_(K),B=h(),U=a("span"),J=_(O),ue=h(),ne=a("div"),$=a("div"),re=_(te),ee=h(),G=a("span"),oe=_(pe),ge=h(),he=a("div"),ye=a("div"),je=_(Fe),we=h(),Oe=a("span"),Le=_(Je),fe=h(),_e=a("div"),Be=a("div"),se=_(De),ke=h(),me=a("div"),Ve=_(Ee),Ie=h(),nt=a("div"),Ne=a("div"),Qe=_(Ye),ve=h(),de=a("div"),Ze=_(Te),Se=h(),Ue=a("div"),Ce=a("div"),Ge=_(mt),ce=h(),qe=a("div"),dt=_(Re),We=h(),z=a("div"),He=a("div"),ft=_(X),Ht=h(),Ke=a("div"),_l.c(),_t=h(),ll&&ll.c(),lt=h(),it=a("div"),ze=a("div"),Xe=a("h4"),at=_(Bt),gt=h(),wt=a("div"),Tl.c(),pt=h(),Wt&&Wt.c(),vl=h(),rt=a("div"),It&&It.c(),Mt=h(),jt&&jt.c(),ht=h(),$t&&$t.c(),Tt=h(),kl=a("div"),Ot=a("div"),hl=a("div"),ml=a("div"),ql=a("label"),Jt=a("input"),Ql=h(),Qt=a("span"),Hl=_(Yt),Il=h(),gl=a("label"),ol=a("input"),Yl=h(),Ft=a("span"),Vl=_(Pl),Jl=h(),El=a("label"),zt=a("input"),Zl=h(),Pt=a("span"),Ll=_(jl),$l=h(),xt=a("div"),el&&el.c(),wl=h(),Kt&&Kt.c(),es=h(),Zt&&Zt.c(),Fl=h(),il&&il.c(),o(r,"id","modal-title"),o(r,"class","font-bold text-xl"),o(d,"class","btn btn-sm btn-ghost"),o(d,"title",p=t[24]("logs.detail.copyToClipboard")),o(v,"stroke-linecap","round"),o(v,"stroke-linejoin","round"),o(v,"stroke-width","2"),o(v,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),o(b,"xmlns","http://www.w3.org/2000/svg"),o(b,"class","h-4 w-4"),o(b,"fill","none"),o(b,"viewBox","0 0 24 24"),o(b,"stroke","currentColor"),o(C,"class","hidden md:inline"),o(g,"class","btn btn-sm btn-ghost"),o(g,"title",T=t[24]("logs.detail.downloadJson")),o(q,"class","btn btn-sm btn-circle btn-ghost"),o(f,"class","flex items-center gap-2"),o(n,"class","flex items-center justify-between px-6 py-4 border-b border-base-300"),o(L,"class","card-title text-base mb-3"),o(F,"class","text-xs opacity-60 mb-1"),o(U,"class",ie="badge "+jp(t[0].status)+" badge-lg"),o($,"class","text-xs opacity-60 mb-1"),o(G,"class","badge badge-lg"),o(ye,"class","text-xs opacity-60 mb-1"),o(Oe,"class",Pe="badge "+Lp(t[0].requestType)+" badge-lg"),o(Oe,"title",Me=t[24](`logs.requestType_${t[0].requestType}_desc`)),o(Be,"class","text-xs opacity-60 mb-1"),o(me,"class","font-semibold"),o(Ne,"class","text-xs opacity-60 mb-1"),o(de,"class","text-sm"),o(Ce,"class","text-xs opacity-60 mb-1"),o(qe,"class","font-mono text-xs break-all"),o(Ue,"class","col-span-2"),o(He,"class","text-xs opacity-60 mb-1"),o(Ke,"class","flex gap-2 flex-wrap"),o(z,"class","col-span-2 md:col-span-3 lg:col-span-6"),o(Y,"class","grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4"),o(R,"class","card-body p-4"),o(I,"class","card bg-base-200"),o(Xe,"class","card-title text-base mb-3"),o(wt,"class","space-y-2"),o(ze,"class","card-body p-4"),o(it,"class","card bg-base-200"),o(rt,"class","grid grid-cols-1 md:grid-cols-2 gap-4"),o(Jt,"class","sr-only"),o(Jt,"type","radio"),o(Jt,"name","activeTab"),Jt.__value="original",Q(Jt,Jt.__value),o(Qt,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),le(Qt,"bg-primary",t[21]==="original"),le(Qt,"text-primary-content",t[21]==="original"),le(Qt,"shadow",t[21]==="original"),le(Qt,"text-gray-700",t[21]!=="original"),le(Qt,"dark:text-gray-300",t[21]!=="original"),le(Qt,"hover:text-gray-900",t[21]!=="original"),le(Qt,"dark:hover:text-gray-100",t[21]!=="original"),o(ql,"class","cursor-pointer"),o(ol,"class","sr-only"),o(ol,"type","radio"),o(ol,"name","activeTab"),ol.__value="transformed",Q(ol,ol.__value),o(Ft,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),le(Ft,"bg-primary",t[21]==="transformed"),le(Ft,"text-primary-content",t[21]==="transformed"),le(Ft,"shadow",t[21]==="transformed"),le(Ft,"text-gray-700",t[21]!=="transformed"),le(Ft,"dark:text-gray-300",t[21]!=="transformed"),le(Ft,"hover:text-gray-900",t[21]!=="transformed"),le(Ft,"dark:hover:text-gray-100",t[21]!=="transformed"),o(gl,"class","cursor-pointer"),o(zt,"class","sr-only"),o(zt,"type","radio"),o(zt,"name","activeTab"),zt.__value="response",Q(zt,zt.__value),o(Pt,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),le(Pt,"bg-primary",t[21]==="response"),le(Pt,"text-primary-content",t[21]==="response"),le(Pt,"shadow",t[21]==="response"),le(Pt,"text-gray-700",t[21]!=="response"),le(Pt,"dark:text-gray-300",t[21]!=="response"),le(Pt,"hover:text-gray-900",t[21]!=="response"),le(Pt,"dark:hover:text-gray-100",t[21]!=="response"),o(El,"class","cursor-pointer"),o(ml,"class","inline-flex gap-1 p-1 bg-white dark:bg-gray-800 rounded-lg shadow-sm"),o(hl,"class","p-2 border-b border-base-300 flex justify-center"),o(xt,"class","p-4"),o(Ot,"class","card-body p-0"),o(kl,"class","card bg-base-200"),o(H,"class","flex-1 overflow-y-auto px-6 py-4 space-y-6"),o(e,"class","modal-box max-w-6xl h-[90vh] flex flex-col p-0"),o(e,"role","dialog"),o(e,"aria-labelledby","modal-title"),o(e,"aria-modal","true"),o(l,"class","modal modal-open"),o(l,"role","presentation"),Bl.p(Jt,ol,zt)},m(Xt,$e){j(Xt,l,$e),s(l,e),s(e,n),s(n,r),s(r,u),s(n,c),s(n,f),s(f,d),rl.m(d,null),s(f,m),s(f,g),s(g,b),s(b,v),s(g,w),s(g,C),s(C,y),s(f,S),s(f,q),s(e,D),s(e,H),s(H,I),s(I,R),s(R,L),s(L,N),s(R,Z),s(R,Y),s(Y,x),s(x,F),s(F,M),s(x,B),s(x,U),s(U,J),s(Y,ue),s(Y,ne),s(ne,$),s($,re),s(ne,ee),s(ne,G),s(G,oe),s(Y,ge),s(Y,he),s(he,ye),s(ye,je),s(he,we),s(he,Oe),s(Oe,Le),s(Y,fe),s(Y,_e),s(_e,Be),s(Be,se),s(_e,ke),s(_e,me),s(me,Ve),s(Y,Ie),s(Y,nt),s(nt,Ne),s(Ne,Qe),s(nt,ve),s(nt,de),s(de,Ze),s(Y,Se),s(Y,Ue),s(Ue,Ce),s(Ce,Ge),s(Ue,ce),s(Ue,qe),s(qe,dt),s(Y,We),s(Y,z),s(z,He),s(He,ft),s(z,Ht),s(z,Ke),_l.m(Ke,null),s(H,_t),ll&&ll.m(H,null),s(H,lt),s(H,it),s(it,ze),s(ze,Xe),s(Xe,at),s(ze,gt),s(ze,wt),Tl.m(wt,null),s(wt,pt),Wt&&Wt.m(wt,null),s(H,vl),s(H,rt),It&&It.m(rt,null),s(rt,Mt),jt&&jt.m(rt,null),s(H,ht),$t&&$t.m(H,null),s(H,Tt),s(H,kl),s(kl,Ot),s(Ot,hl),s(hl,ml),s(ml,ql),s(ql,Jt),Jt.checked=Jt.__value===t[21],s(ql,Ql),s(ql,Qt),s(Qt,Hl),s(ml,Il),s(ml,gl),s(gl,ol),ol.checked=ol.__value===t[21],s(gl,Yl),s(gl,Ft),s(Ft,Vl),s(ml,Jl),s(ml,El),s(El,zt),zt.checked=zt.__value===t[21],s(El,Zl),s(El,Pt),s(Pt,Ll),s(Ot,$l),s(Ot,xt),el&&el.m(xt,null),s(xt,wl),Kt&&Kt.m(xt,null),s(xt,es),Zt&&Zt.m(xt,null),s(H,Fl),il&&il.m(H,null),Wl||(Ps=[V(d,"click",t[29]),V(g,"click",t[30]),V(q,"click",function(){ko(t[1])&&t[1].apply(this,arguments)}),V(Jt,"change",t[32]),V(ol,"change",t[34]),V(zt,"change",t[35]),V(l,"click",t[28]),V(l,"keydown",t[36])],Wl=!0)},p(Xt,$e){t=Xt,$e[0]&16777216&&i!==(i=t[24]("logs.detail.title")+"")&&k(u,i),yl===(yl=nl(t))&&rl?rl.p(t,$e):(rl.d(1),rl=yl(t),rl&&(rl.c(),rl.m(d,null))),$e[0]&16777216&&p!==(p=t[24]("logs.detail.copyToClipboard"))&&o(d,"title",p),$e[0]&16777216&&E!==(E=t[24]("logs.detail.downloadJson")+"")&&k(y,E),$e[0]&16777216&&T!==(T=t[24]("logs.detail.downloadJson"))&&o(g,"title",T),$e[0]&16777216&&A!==(A=t[24]("logs.detail.overview")+"")&&k(N,A),$e[0]&16777216&&K!==(K=t[24]("logs.detail.status")+"")&&k(M,K),$e[0]&1&&O!==(O=t[0].status+"")&&k(J,O),$e[0]&1&&ie!==(ie="badge "+jp(t[0].status)+" badge-lg")&&o(U,"class",ie),$e[0]&16777216&&te!==(te=t[24]("logs.detail.method")+"")&&k(re,te),$e[0]&1&&pe!==(pe=t[0].method+"")&&k(oe,pe),$e[0]&16777216&&Fe!==(Fe=t[24]("logs.requestType")+"")&&k(je,Fe),$e[0]&1&&Je!==(Je=t[25](t[0].requestType)+"")&&k(Le,Je),$e[0]&1&&Pe!==(Pe="badge "+Lp(t[0].requestType)+" badge-lg")&&o(Oe,"class",Pe),$e[0]&16777217&&Me!==(Me=t[24](`logs.requestType_${t[0].requestType}_desc`))&&o(Oe,"title",Me),$e[0]&16777216&&De!==(De=t[24]("logs.detail.duration")+"")&&k(se,De),$e[0]&1&&Ee!==(Ee=vo(t[0].duration)+"")&&k(Ve,Ee),$e[0]&16777216&&Ye!==(Ye=t[24]("logs.detail.timestamp")+"")&&k(Qe,Ye),$e[0]&1&&Te!==(Te=Pp(t[0].timestamp)+"")&&k(Ze,Te),$e[0]&16777216&&mt!==(mt=t[24]("logs.detail.requestId")+"")&&k(Ge,mt),$e[0]&1&&Re!==(Re=t[0].requestId+"")&&k(dt,Re),$e[0]&16777216&&X!==(X=t[24]("logs.detail.processingSteps")+"")&&k(ft,X),al===(al=zl(t))&&_l?_l.p(t,$e):(_l.d(1),_l=al(t),_l&&(_l.c(),_l.m(Ke,null))),t[0].processingSteps&&t[0].processingSteps.length>0?ll?ll.p(ef(t),$e):(ll=sp(ef(t)),ll.c(),ll.m(H,lt)):ll&&(ll.d(1),ll=null),$e[0]&16777216&&Bt!==(Bt=t[24]("logs.detail.requestInfo")+"")&&k(at,Bt),Nl===(Nl=Dl(t))&&Tl?Tl.p(t,$e):(Tl.d(1),Tl=Nl(t),Tl&&(Tl.c(),Tl.m(wt,pt))),t[0].query?Wt?Wt.p(t,$e):(Wt=pp(t),Wt.c(),Wt.m(wt,null)):Wt&&(Wt.d(1),Wt=null),t[0].routePath?It?It.p(t,$e):(It=hp(t),It.c(),It.m(rt,Mt)):It&&(It.d(1),It=null),t[0].upstream?jt?jt.p(t,$e):(jt=mp(t),jt.c(),jt.m(rt,null)):jt&&(jt.d(1),jt=null),t[0].errorMessage?$t?$t.p(t,$e):($t=_p(t),$t.c(),$t.m(H,Tt)):$t&&($t.d(1),$t=null),$e[0]&2097152&&(Jt.checked=Jt.__value===t[21]),$e[0]&16777216&&Yt!==(Yt=t[24]("logs.detail.tabOriginalRequest")+"")&&k(Hl,Yt),$e[0]&2097152&&le(Qt,"bg-primary",t[21]==="original"),$e[0]&2097152&&le(Qt,"text-primary-content",t[21]==="original"),$e[0]&2097152&&le(Qt,"shadow",t[21]==="original"),$e[0]&2097152&&le(Qt,"text-gray-700",t[21]!=="original"),$e[0]&2097152&&le(Qt,"dark:text-gray-300",t[21]!=="original"),$e[0]&2097152&&le(Qt,"hover:text-gray-900",t[21]!=="original"),$e[0]&2097152&&le(Qt,"dark:hover:text-gray-100",t[21]!=="original"),$e[0]&2097152&&(ol.checked=ol.__value===t[21]),$e[0]&16777216&&Pl!==(Pl=t[24]("logs.detail.tabFinalRequest")+"")&&k(Vl,Pl),$e[0]&2097152&&le(Ft,"bg-primary",t[21]==="transformed"),$e[0]&2097152&&le(Ft,"text-primary-content",t[21]==="transformed"),$e[0]&2097152&&le(Ft,"shadow",t[21]==="transformed"),$e[0]&2097152&&le(Ft,"text-gray-700",t[21]!=="transformed"),$e[0]&2097152&&le(Ft,"dark:text-gray-300",t[21]!=="transformed"),$e[0]&2097152&&le(Ft,"hover:text-gray-900",t[21]!=="transformed"),$e[0]&2097152&&le(Ft,"dark:hover:text-gray-100",t[21]!=="transformed"),$e[0]&2097152&&(zt.checked=zt.__value===t[21]),$e[0]&16777216&&jl!==(jl=t[24]("logs.detail.tabResponse")+"")&&k(Ll,jl),$e[0]&2097152&&le(Pt,"bg-primary",t[21]==="response"),$e[0]&2097152&&le(Pt,"text-primary-content",t[21]==="response"),$e[0]&2097152&&le(Pt,"shadow",t[21]==="response"),$e[0]&2097152&&le(Pt,"text-gray-700",t[21]!=="response"),$e[0]&2097152&&le(Pt,"dark:text-gray-300",t[21]!=="response"),$e[0]&2097152&&le(Pt,"hover:text-gray-900",t[21]!=="response"),$e[0]&2097152&&le(Pt,"dark:hover:text-gray-100",t[21]!=="response"),t[21]==="original"?el?el.p(t,$e):(el=bp(t),el.c(),el.m(xt,wl)):el&&(el.d(1),el=null),t[21]==="transformed"?Kt?Kt.p(t,$e):(Kt=yp(t),Kt.c(),Kt.m(xt,es)):Kt&&(Kt.d(1),Kt=null),t[21]==="response"?Zt?Zt.p(t,$e):(Zt=Mp(t),Zt.c(),Zt.m(xt,null)):Zt&&(Zt.d(1),Zt=null),t[0].authLevel?il?il.p(t,$e):(il=Hp(t),il.c(),il.m(H,null)):il&&(il.d(1),il=null)},i:tt,o:tt,d(Xt){Xt&&P(l),rl.d(),_l.d(),ll&&ll.d(),Tl.d(),Wt&&Wt.d(),It&&It.d(),jt&&jt.d(),$t&&$t.d(),el&&el.d(),Kt&&Kt.d(),Zt&&Zt.d(),il&&il.d(),Bl.r(),Wl=!1,bt(Ps)}}}function Pp(t){return new Date(t).toLocaleString()}function vo(t){return t<1e3?`${t}ms`:`${(t/1e3).toFixed(2)}s`}function jp(t){return t<300?"badge-success":t<400?"badge-info":t<500?"badge-warning":"badge-error"}function Lp(t){return t==="final"?"badge-success":t==="retry"?"badge-warning":t==="recovery"?"badge-info":"badge-ghost"}function ar(t){return JSON.stringify(t,null,2)}function ib(t){const l=t.toLowerCase();return l.includes("auth")?"bg-blue-500":l.includes("plugin")?"bg-purple-500":l.includes("upstream")||l.includes("proxy")||l.includes("selected")?"bg-green-500":l.includes("transform")||l.includes("rewrite")?"bg-orange-500":l.includes("error")||l.includes("failed")?"bg-red-500":l.includes("retry")||l.includes("recover")||l.includes("circuit")?"bg-yellow-500":"bg-base-content/30"}function ub(t){const l=t.toLowerCase();return l.includes("auth")?"Auth":l.includes("plugin")?"Plugin":l.includes("upstream")||l.includes("proxy")||l.includes("selected")?"Upstream":l.includes("transform")||l.includes("rewrite")?"Transform":l.includes("retry")||l.includes("recover")||l.includes("circuit")?"Retry":"Other"}function fb(t,l,e){let n;Dt(t,Rt,G=>e(24,n=G));let{log:r}=l,{onClose:i}=l,u=null,c=null,f=!1,d=!1,p=null,m=null,g=!1,b=null,v=null,w=!1,C=!1,E=null,y=null,T=null,S=null,q=!1,D=!1,H=null,I=null,R="original",L=!1,A=!1;function N(G){return G?n(`logs.requestType_${G}`):"-"}function Z(G){const pe=`logs.steps.${G}`,oe=n(pe);return oe===pe?G.split("_").map(ge=>ge.charAt(0).toUpperCase()+ge.slice(1)).join(" "):oe}function Y(){if(!r.processingSteps||r.processingSteps.length===0)return{durations:[],relativeTime:[],totalDuration:0};const G=r.processingSteps,pe=G[0].timestamp,oe=G.map((ye,Fe)=>Fe===G.length-1?r.duration-(ye.timestamp-pe):G[Fe+1].timestamp-ye.timestamp),ge=G.map(ye=>ye.timestamp-pe),he=r.duration;return{durations:oe,relativeTime:ge,totalDuration:he}}function x(G){G.target===G.currentTarget&&i()}async function F(){const G={requestId:r.requestId,timestamp:r.timestamp,method:r.method,path:r.path,status:r.status,duration:r.duration,originalRequestHeaders:T,originalRequestBody:S,requestHeaders:b,requestBody:u,responseHeaders:v,responseBody:c,processingSteps:r.processingSteps};try{await navigator.clipboard.writeText(JSON.stringify(G,null,2)),e(23,A=!0),setTimeout(()=>{e(23,A=!1)},2e3)}catch(pe){console.error("Failed to copy:",pe)}}async function K(){const G={requestId:r.requestId,timestamp:r.timestamp,method:r.method,path:r.path,status:r.status,duration:r.duration,originalRequestHeaders:T,originalRequestBody:S,requestHeaders:b,requestBody:u,responseHeaders:v,responseBody:c,processingSteps:r.processingSteps},pe=new Blob([JSON.stringify(G,null,2)],{type:"application/json"}),oe=URL.createObjectURL(pe),ge=document.createElement("a");ge.href=oe,ge.download=`log-${r.requestId}.json`,ge.click(),URL.revokeObjectURL(oe)}async function M(){if(!(!r.reqBodyId||u!==null)){e(4,f=!0),e(6,p=null);try{e(2,u=await xu(r.reqBodyId))}catch(G){e(6,p=G instanceof Error?G.message:"Failed to load request body")}finally{e(4,f=!1)}}}async function B(){if(!(!r.respBodyId||c!==null)){e(5,d=!0),e(7,m=null);try{e(3,c=await xu(r.respBodyId))}catch(G){e(7,m=G instanceof Error?G.message:"Failed to load response body")}finally{e(5,d=!1)}}}async function U(){if(!(!r.reqHeaderId||b!==null)){e(11,w=!0),e(13,E=null);try{e(9,b=await $u(r.reqHeaderId))}catch(G){e(13,E=G instanceof Error?G.message:"Failed to load request headers")}finally{e(11,w=!1)}}}async function O(){if(!(!r.respHeaderId||v!==null)){e(12,C=!0),e(14,y=null);try{e(10,v=await $u(r.respHeaderId))}catch(G){e(14,y=G instanceof Error?G.message:"Failed to load response headers")}finally{e(12,C=!1)}}}async function J(){if(!(!r.originalReqHeaderId||T!==null)){e(17,q=!0),e(19,H=null);try{e(15,T=await $u(r.originalReqHeaderId))}catch(G){e(19,H=G instanceof Error?G.message:"Failed to load original request headers")}finally{e(17,q=!1)}}}async function ie(){if(!(!r.originalReqBodyId||S!==null)){e(18,D=!0),e(20,I=null);try{e(16,S=await xu(r.originalReqBodyId))}catch(G){e(20,I=G instanceof Error?G.message:"Failed to load original request body")}finally{e(18,D=!1)}}}Hs(async()=>{try{const G=await hf();e(8,g=G.logging?.body?.enabled||!1)}catch(G){console.error("Failed to load config:",G),e(8,g=!1)}r.originalReqHeaderId&&J(),r.originalReqBodyId&&ie(),r.reqHeaderId&&U(),r.respHeaderId&&O(),r.reqBodyId&&M(),r.respBodyId&&B()});const ue=[[]],ne=()=>e(22,L=!L);function $(){R=this.__value,e(21,R)}function te(){R=this.__value,e(21,R)}function re(){R=this.__value,e(21,R)}const ee=G=>G.key==="Escape"&&i();return t.$$set=G=>{"log"in G&&e(0,r=G.log),"onClose"in G&&e(1,i=G.onClose)},[r,i,u,c,f,d,p,m,g,b,v,w,C,E,y,T,S,q,D,H,I,R,L,A,n,N,Z,Y,x,F,K,ne,$,ue,te,re,ee]}class cb extends Vt{constructor(l){super(),Ut(this,l,fb,ab,At,{log:0,onClose:1},null,[-1,-1,-1])}}function Dp(t,l,e){const n=t.slice();return n[104]=l[e],n}function Ip(t){let l,e,n,r,i,u=t[24]("logs.newDataAvailable")+"",c,f,d,p,m=t[24]("common.refresh")+"",g,b,v;return{c(){l=a("div"),e=ae("svg"),n=ae("path"),r=h(),i=a("span"),c=_(u),f=h(),d=a("div"),p=a("button"),g=_(m),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"class","stroke-current shrink-0 w-6 h-6"),o(p,"class","btn btn-sm"),o(d,"class","flex-none"),o(l,"class","alert alert-info shadow-lg mb-4")},m(w,C){j(w,l,C),s(l,e),s(e,n),s(l,r),s(l,i),s(i,c),s(l,f),s(l,d),s(d,p),s(p,g),b||(v=V(p,"click",t[29]),b=!0)},p(w,C){C[0]&16777216&&u!==(u=w[24]("logs.newDataAvailable")+"")&&k(c,u),C[0]&16777216&&m!==(m=w[24]("common.refresh")+"")&&k(g,m)},d(w){w&&P(l),b=!1,v()}}}function Bp(t){let l;return{c(){l=a("span"),l.textContent="1",o(l,"class","badge badge-sm")},m(e,n){j(e,l,n)},d(e){e&&P(l)}}}function Ap(t){let l;return{c(){l=a("span"),l.textContent="1",o(l,"class","badge badge-sm")},m(e,n){j(e,l,n)},d(e){e&&P(l)}}}function Op(t){let l;return{c(){l=a("span"),l.textContent="1",o(l,"class","badge badge-sm")},m(e,n){j(e,l,n)},d(e){e&&P(l)}}}function Fp(t){let l,e=[t[5],t[8]!=="recent"||t[9]!==1,t[6]!=="timestamp"||t[7]!=="desc"].filter(Boolean).length+"",n;return{c(){l=a("span"),n=_(e),o(l,"class","badge badge-sm")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&992&&e!==(e=[r[5],r[8]!=="recent"||r[9]!==1,r[6]!=="timestamp"||r[7]!=="desc"].filter(Boolean).length+"")&&k(n,e)},d(r){r&&P(l)}}}function zp(t){let l,e,n,r=t[24]("logs.recentHours")+"",i,u,c,f,d;return{c(){l=a("div"),e=a("div"),n=a("span"),i=_(r),u=h(),c=a("input"),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),o(c,"type","number"),o(c,"min","1"),o(c,"class","input input-bordered input-sm"),o(l,"class","form-control")},m(p,m){j(p,l,m),s(l,e),s(e,n),s(n,i),s(l,u),s(l,c),Q(c,t[9]),f||(d=V(c,"input",t[45]),f=!0)},p(p,m){m[0]&16777216&&r!==(r=p[24]("logs.recentHours")+"")&&k(i,r),m[0]&512&&St(c.value)!==p[9]&&Q(c,p[9])},d(p){p&&P(l),f=!1,d()}}}function Np(t){let l,e,n,r=t[24]("logs.startTime")+"",i,u,c,f,d,p,m,g=t[24]("logs.endTime")+"",b,v,w,C,E;return{c(){l=a("div"),e=a("div"),n=a("span"),i=_(r),u=h(),c=a("input"),f=h(),d=a("div"),p=a("div"),m=a("span"),b=_(g),v=h(),w=a("input"),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),o(c,"type","datetime-local"),o(c,"class","input input-bordered input-sm"),o(l,"class","form-control"),o(m,"class","label-text text-xs font-semibold"),o(p,"class","label py-1"),o(w,"type","datetime-local"),o(w,"class","input input-bordered input-sm"),o(d,"class","form-control")},m(y,T){j(y,l,T),s(l,e),s(e,n),s(n,i),s(l,u),s(l,c),Q(c,t[10]),j(y,f,T),j(y,d,T),s(d,p),s(p,m),s(m,b),s(d,v),s(d,w),Q(w,t[11]),C||(E=[V(c,"input",t[46]),V(w,"input",t[47])],C=!0)},p(y,T){T[0]&16777216&&r!==(r=y[24]("logs.startTime")+"")&&k(i,r),T[0]&1024&&Q(c,y[10]),T[0]&16777216&&g!==(g=y[24]("logs.endTime")+"")&&k(b,g),T[0]&2048&&Q(w,y[11])},d(y){y&&(P(l),P(f),P(d)),C=!1,bt(E)}}}function Up(t){let l,e;return{c(){l=a("span"),e=_(t[13]),o(l,"class","badge badge-sm badge-primary")},m(n,r){j(n,l,r),s(l,e)},p(n,r){r[0]&8192&&k(e,n[13])},d(n){n&&P(l)}}}function Vp(t){let l,e,n,r=t[24]("logs.refreshInterval")+"",i,u,c,f,d=t[24]("logs.refreshEvery5s")+"",p,m,g=t[24]("logs.refreshEvery10s")+"",b,v,w=t[24]("logs.refreshEvery30s")+"",C,E,y=t[24]("logs.refreshEvery60s")+"",T,S,q;return{c(){l=a("div"),e=a("div"),n=a("span"),i=_(r),u=h(),c=a("select"),f=a("option"),p=_(d),m=a("option"),b=_(g),v=a("option"),C=_(w),E=a("option"),T=_(y),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),f.__value="5s",Q(f,f.__value),m.__value="10s",Q(m,m.__value),v.__value="30s",Q(v,v.__value),E.__value="60s",Q(E,E.__value),o(c,"class","select select-bordered select-sm"),t[13]===void 0&&tl(()=>t[51].call(c)),o(l,"class","form-control")},m(D,H){j(D,l,H),s(l,e),s(e,n),s(n,i),s(l,u),s(l,c),s(c,f),s(f,p),s(c,m),s(m,b),s(c,v),s(v,C),s(c,E),s(E,T),kt(c,t[13],!0),S||(q=V(c,"change",t[51]),S=!0)},p(D,H){H[0]&16777216&&r!==(r=D[24]("logs.refreshInterval")+"")&&k(i,r),H[0]&16777216&&d!==(d=D[24]("logs.refreshEvery5s")+"")&&k(p,d),H[0]&16777216&&g!==(g=D[24]("logs.refreshEvery10s")+"")&&k(b,g),H[0]&16777216&&w!==(w=D[24]("logs.refreshEvery30s")+"")&&k(C,w),H[0]&16777216&&y!==(y=D[24]("logs.refreshEvery60s")+"")&&k(T,y),H[0]&8192&&kt(c,D[13])},d(D){D&&P(l),S=!1,q()}}}function Jp(t){let l,e,n,r,i=t[24]("logs.clearFilters")+"",u,c,f;return{c(){l=a("button"),e=ae("svg"),n=ae("path"),r=h(),u=_(i),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M6 18L18 6M6 6l12 12"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","h-4 w-4"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"stroke","currentColor"),o(l,"type","button"),o(l,"class","btn btn-sm btn-ghost gap-1")},m(d,p){j(d,l,p),s(l,e),s(e,n),s(l,r),s(l,u),c||(f=V(l,"click",t[28]),c=!0)},p(d,p){p[0]&16777216&&i!==(i=d[24]("logs.clearFilters")+"")&&k(u,i)},d(d){d&&P(l),c=!1,f()}}}function Wp(t){let l,e=[t[2],t[3],t[4]!==void 0,t[5],t[8]!=="recent"||t[9]!==1,t[6]!=="timestamp"||t[7]!=="desc"].filter(Boolean).length+"",n;return{c(){l=a("span"),n=_(e),o(l,"class","badge badge-sm")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&1020&&e!==(e=[r[2],r[3],r[4]!==void 0,r[5],r[8]!=="recent"||r[9]!==1,r[6]!=="timestamp"||r[7]!=="desc"].filter(Boolean).length+"")&&k(n,e)},d(r){r&&P(l)}}}function Gp(t){let l,e,n,r=t[24]("logs.recentHours")+"",i,u,c,f,d;return{c(){l=a("div"),e=a("div"),n=a("span"),i=_(r),u=h(),c=a("input"),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),o(c,"type","number"),o(c,"min","1"),o(c,"class","input input-bordered input-sm"),o(l,"class","form-control")},m(p,m){j(p,l,m),s(l,e),s(e,n),s(n,i),s(l,u),s(l,c),Q(c,t[9]),f||(d=V(c,"input",t[59]),f=!0)},p(p,m){m[0]&16777216&&r!==(r=p[24]("logs.recentHours")+"")&&k(i,r),m[0]&512&&St(c.value)!==p[9]&&Q(c,p[9])},d(p){p&&P(l),f=!1,d()}}}function Kp(t){let l,e,n,r=t[24]("logs.startTime")+"",i,u,c,f,d,p,m,g=t[24]("logs.endTime")+"",b,v,w,C,E;return{c(){l=a("div"),e=a("div"),n=a("span"),i=_(r),u=h(),c=a("input"),f=h(),d=a("div"),p=a("div"),m=a("span"),b=_(g),v=h(),w=a("input"),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),o(c,"type","datetime-local"),o(c,"class","input input-bordered input-sm"),o(l,"class","form-control"),o(m,"class","label-text text-xs font-semibold"),o(p,"class","label py-1"),o(w,"type","datetime-local"),o(w,"class","input input-bordered input-sm"),o(d,"class","form-control")},m(y,T){j(y,l,T),s(l,e),s(e,n),s(n,i),s(l,u),s(l,c),Q(c,t[10]),j(y,f,T),j(y,d,T),s(d,p),s(p,m),s(m,b),s(d,v),s(d,w),Q(w,t[11]),C||(E=[V(c,"input",t[60]),V(w,"input",t[61])],C=!0)},p(y,T){T[0]&16777216&&r!==(r=y[24]("logs.startTime")+"")&&k(i,r),T[0]&1024&&Q(c,y[10]),T[0]&16777216&&g!==(g=y[24]("logs.endTime")+"")&&k(b,g),T[0]&2048&&Q(w,y[11])},d(y){y&&(P(l),P(f),P(d)),C=!1,bt(E)}}}function Qp(t){let l,e,n,r=t[24]("logs.refreshInterval")+"",i,u,c,f,d=t[24]("logs.refreshEvery5s")+"",p,m,g=t[24]("logs.refreshEvery10s")+"",b,v,w=t[24]("logs.refreshEvery30s")+"",C,E,y=t[24]("logs.refreshEvery60s")+"",T,S,q;return{c(){l=a("div"),e=a("div"),n=a("span"),i=_(r),u=h(),c=a("select"),f=a("option"),p=_(d),m=a("option"),b=_(g),v=a("option"),C=_(w),E=a("option"),T=_(y),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),f.__value="5s",Q(f,f.__value),m.__value="10s",Q(m,m.__value),v.__value="30s",Q(v,v.__value),E.__value="60s",Q(E,E.__value),o(c,"class","select select-bordered select-sm"),t[13]===void 0&&tl(()=>t[65].call(c)),o(l,"class","form-control")},m(D,H){j(D,l,H),s(l,e),s(e,n),s(n,i),s(l,u),s(l,c),s(c,f),s(f,p),s(c,m),s(m,b),s(c,v),s(v,C),s(c,E),s(E,T),kt(c,t[13],!0),S||(q=V(c,"change",t[65]),S=!0)},p(D,H){H[0]&16777216&&r!==(r=D[24]("logs.refreshInterval")+"")&&k(i,r),H[0]&16777216&&d!==(d=D[24]("logs.refreshEvery5s")+"")&&k(p,d),H[0]&16777216&&g!==(g=D[24]("logs.refreshEvery10s")+"")&&k(b,g),H[0]&16777216&&w!==(w=D[24]("logs.refreshEvery30s")+"")&&k(C,w),H[0]&16777216&&y!==(y=D[24]("logs.refreshEvery60s")+"")&&k(T,y),H[0]&8192&&kt(c,D[13])},d(D){D&&P(l),S=!1,q()}}}function Yp(t){let l,e=t[24]("logs.lastRefreshed")+"",n,r,i=new Date(t[21]).toLocaleTimeString()+"",u;return{c(){l=a("div"),n=_(e),r=_(": "),u=_(i),o(l,"class","text-xs text-gray-500 text-center")},m(c,f){j(c,l,f),s(l,n),s(l,r),s(l,u)},p(c,f){f[0]&16777216&&e!==(e=c[24]("logs.lastRefreshed")+"")&&k(n,e),f[0]&2097152&&i!==(i=new Date(c[21]).toLocaleTimeString()+"")&&k(u,i)},d(c){c&&P(l)}}}function Zp(t){let l,e,n,r,i=t[24]("logs.clearFilters")+"",u,c,f;return{c(){l=a("button"),e=ae("svg"),n=ae("path"),r=h(),u=_(i),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M6 18L18 6M6 6l12 12"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","h-4 w-4"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"stroke","currentColor"),o(l,"type","button"),o(l,"class","btn btn-sm btn-ghost gap-1")},m(d,p){j(d,l,p),s(l,e),s(e,n),s(l,r),s(l,u),c||(f=V(l,"click",t[28]),c=!0)},p(d,p){p[0]&16777216&&i!==(i=d[24]("logs.clearFilters")+"")&&k(u,i)},d(d){d&&P(l),c=!1,f()}}}function Xp(t){let l;return{c(){l=a("span"),o(l,"class","badge badge-sm badge-primary")},m(e,n){j(e,l,n)},d(e){e&&P(l)}}}function xp(t){let l,e,n,r=t[24]("logs.recentHours")+"",i,u,c,f,d;return{c(){l=a("div"),e=a("div"),n=a("span"),i=_(r),u=h(),c=a("input"),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),o(c,"type","number"),o(c,"min","1"),o(c,"class","input input-bordered input-sm"),o(l,"class","form-control")},m(p,m){j(p,l,m),s(l,e),s(e,n),s(n,i),s(l,u),s(l,c),Q(c,t[9]),f||(d=V(c,"input",t[73]),f=!0)},p(p,m){m[0]&16777216&&r!==(r=p[24]("logs.recentHours")+"")&&k(i,r),m[0]&512&&St(c.value)!==p[9]&&Q(c,p[9])},d(p){p&&P(l),f=!1,d()}}}function $p(t){let l,e,n,r=t[24]("logs.startTime")+"",i,u,c,f,d,p,m,g=t[24]("logs.endTime")+"",b,v,w,C,E;return{c(){l=a("div"),e=a("div"),n=a("span"),i=_(r),u=h(),c=a("input"),f=h(),d=a("div"),p=a("div"),m=a("span"),b=_(g),v=h(),w=a("input"),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),o(c,"type","datetime-local"),o(c,"class","input input-bordered input-sm"),o(l,"class","form-control"),o(m,"class","label-text text-xs font-semibold"),o(p,"class","label py-1"),o(w,"type","datetime-local"),o(w,"class","input input-bordered input-sm"),o(d,"class","form-control")},m(y,T){j(y,l,T),s(l,e),s(e,n),s(n,i),s(l,u),s(l,c),Q(c,t[10]),j(y,f,T),j(y,d,T),s(d,p),s(p,m),s(m,b),s(d,v),s(d,w),Q(w,t[11]),C||(E=[V(c,"input",t[74]),V(w,"input",t[75])],C=!0)},p(y,T){T[0]&16777216&&r!==(r=y[24]("logs.startTime")+"")&&k(i,r),T[0]&1024&&Q(c,y[10]),T[0]&16777216&&g!==(g=y[24]("logs.endTime")+"")&&k(b,g),T[0]&2048&&Q(w,y[11])},d(y){y&&(P(l),P(f),P(d)),C=!1,bt(E)}}}function e0(t){let l,e,n,r=t[24]("logs.refreshInterval")+"",i,u,c,f,d=t[24]("logs.refreshEvery5s")+"",p,m,g=t[24]("logs.refreshEvery10s")+"",b,v,w=t[24]("logs.refreshEvery30s")+"",C,E,y=t[24]("logs.refreshEvery60s")+"",T,S,q;return{c(){l=a("div"),e=a("div"),n=a("span"),i=_(r),u=h(),c=a("select"),f=a("option"),p=_(d),m=a("option"),b=_(g),v=a("option"),C=_(w),E=a("option"),T=_(y),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),f.__value="5s",Q(f,f.__value),m.__value="10s",Q(m,m.__value),v.__value="30s",Q(v,v.__value),E.__value="60s",Q(E,E.__value),o(c,"class","select select-bordered select-sm"),t[13]===void 0&&tl(()=>t[79].call(c)),o(l,"class","form-control")},m(D,H){j(D,l,H),s(l,e),s(e,n),s(n,i),s(l,u),s(l,c),s(c,f),s(f,p),s(c,m),s(m,b),s(c,v),s(v,C),s(c,E),s(E,T),kt(c,t[13],!0),S||(q=V(c,"change",t[79]),S=!0)},p(D,H){H[0]&16777216&&r!==(r=D[24]("logs.refreshInterval")+"")&&k(i,r),H[0]&16777216&&d!==(d=D[24]("logs.refreshEvery5s")+"")&&k(p,d),H[0]&16777216&&g!==(g=D[24]("logs.refreshEvery10s")+"")&&k(b,g),H[0]&16777216&&w!==(w=D[24]("logs.refreshEvery30s")+"")&&k(C,w),H[0]&16777216&&y!==(y=D[24]("logs.refreshEvery60s")+"")&&k(T,y),H[0]&8192&&kt(c,D[13])},d(D){D&&P(l),S=!1,q()}}}function t0(t){let l,e,n,r,i,u,c=t[24]("logs.clearFilters")+"",f,d,p;return{c(){l=a("div"),e=h(),n=a("button"),r=ae("svg"),i=ae("path"),u=h(),f=_(c),o(l,"class","divider my-2"),o(i,"stroke-linecap","round"),o(i,"stroke-linejoin","round"),o(i,"stroke-width","2"),o(i,"d","M6 18L18 6M6 6l12 12"),o(r,"xmlns","http://www.w3.org/2000/svg"),o(r,"class","h-4 w-4"),o(r,"fill","none"),o(r,"viewBox","0 0 24 24"),o(r,"stroke","currentColor"),o(n,"type","button"),o(n,"class","btn btn-sm btn-ghost w-full gap-1")},m(m,g){j(m,l,g),j(m,e,g),j(m,n,g),s(n,r),s(r,i),s(n,u),s(n,f),d||(p=V(n,"click",t[28]),d=!0)},p(m,g){g[0]&16777216&&c!==(c=m[24]("logs.clearFilters")+"")&&k(f,c)},d(m){m&&(P(l),P(e),P(n)),d=!1,p()}}}function l0(t){let l,e=t[1].trim(),n,r,i,u,c,f,d,p,m=e&&s0(t),g=t[2]&&o0(t),b=t[3]&&n0(t),v=t[4]!==void 0&&r0(t),w=t[5]&&a0(t),C=t[8]==="recent"&&t[9]!==1&&i0(t),E=t[8]==="custom"&&u0(t),y=t[8]==="all"&&f0(t),T=(t[6]!=="timestamp"||t[7]!=="desc")&&c0(t);return{c(){l=a("div"),m&&m.c(),n=h(),g&&g.c(),r=h(),b&&b.c(),i=h(),v&&v.c(),u=h(),w&&w.c(),c=h(),C&&C.c(),f=h(),E&&E.c(),d=h(),y&&y.c(),p=h(),T&&T.c(),o(l,"class","flex items-center gap-2 flex-wrap px-1")},m(S,q){j(S,l,q),m&&m.m(l,null),s(l,n),g&&g.m(l,null),s(l,r),b&&b.m(l,null),s(l,i),v&&v.m(l,null),s(l,u),w&&w.m(l,null),s(l,c),C&&C.m(l,null),s(l,f),E&&E.m(l,null),s(l,d),y&&y.m(l,null),s(l,p),T&&T.m(l,null)},p(S,q){q[0]&2&&(e=S[1].trim()),e?m?m.p(S,q):(m=s0(S),m.c(),m.m(l,n)):m&&(m.d(1),m=null),S[2]?g?g.p(S,q):(g=o0(S),g.c(),g.m(l,r)):g&&(g.d(1),g=null),S[3]?b?b.p(S,q):(b=n0(S),b.c(),b.m(l,i)):b&&(b.d(1),b=null),S[4]!==void 0?v?v.p(S,q):(v=r0(S),v.c(),v.m(l,u)):v&&(v.d(1),v=null),S[5]?w?w.p(S,q):(w=a0(S),w.c(),w.m(l,c)):w&&(w.d(1),w=null),S[8]==="recent"&&S[9]!==1?C?C.p(S,q):(C=i0(S),C.c(),C.m(l,f)):C&&(C.d(1),C=null),S[8]==="custom"?E?E.p(S,q):(E=u0(S),E.c(),E.m(l,d)):E&&(E.d(1),E=null),S[8]==="all"?y?y.p(S,q):(y=f0(S),y.c(),y.m(l,p)):y&&(y.d(1),y=null),S[6]!=="timestamp"||S[7]!=="desc"?T?T.p(S,q):(T=c0(S),T.c(),T.m(l,null)):T&&(T.d(1),T=null)},d(S){S&&P(l),m&&m.d(),g&&g.d(),b&&b.d(),v&&v.d(),w&&w.d(),C&&C.d(),E&&E.d(),y&&y.d(),T&&T.d()}}}function s0(t){let l,e,n=t[24]("logs.searchTerm")+"",r,i,u,c,f,d,p,m,g;return{c(){l=a("div"),e=a("span"),r=_(n),i=_(":"),u=h(),c=a("span"),f=_(t[1]),d=h(),p=a("button"),p.innerHTML=\'<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>\',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(p,"type","button"),o(p,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(l,"class","badge badge-lg gap-2")},m(b,v){j(b,l,v),s(l,e),s(e,r),s(e,i),s(l,u),s(l,c),s(c,f),s(l,d),s(l,p),m||(g=V(p,"click",t[82]),m=!0)},p(b,v){v[0]&16777216&&n!==(n=b[24]("logs.searchTerm")+"")&&k(r,n),v[0]&2&&k(f,b[1])},d(b){b&&P(l),m=!1,g()}}}function o0(t){let l,e,n=t[24]("logs.method")+"",r,i,u,c,f,d,p,m,g;return{c(){l=a("div"),e=a("span"),r=_(n),i=_(":"),u=h(),c=a("span"),f=_(t[2]),d=h(),p=a("button"),p.innerHTML=\'<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>\',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(p,"type","button"),o(p,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(l,"class","badge badge-primary badge-lg gap-2")},m(b,v){j(b,l,v),s(l,e),s(e,r),s(e,i),s(l,u),s(l,c),s(c,f),s(l,d),s(l,p),m||(g=V(p,"click",t[83]),m=!0)},p(b,v){v[0]&16777216&&n!==(n=b[24]("logs.method")+"")&&k(r,n),v[0]&4&&k(f,b[2])},d(b){b&&P(l),m=!1,g()}}}function n0(t){let l,e,n=t[24]("logs.status")+"",r,i,u,c,f,d,p,m,g;return{c(){l=a("div"),e=a("span"),r=_(n),i=_(":"),u=h(),c=a("span"),f=_(t[3]),d=h(),p=a("button"),p.innerHTML=\'<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>\',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(p,"type","button"),o(p,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(l,"class","badge badge-primary badge-lg gap-2")},m(b,v){j(b,l,v),s(l,e),s(e,r),s(e,i),s(l,u),s(l,c),s(c,f),s(l,d),s(l,p),m||(g=V(p,"click",t[84]),m=!0)},p(b,v){v[0]&16777216&&n!==(n=b[24]("logs.status")+"")&&k(r,n),v[0]&8&&k(f,b[3])},d(b){b&&P(l),m=!1,g()}}}function r0(t){let l,e,n=t[24]("logs.result")+"",r,i,u,c,f=(t[4]?t[24]("logs.success"):t[24]("logs.failed"))+"",d,p,m,g,b;return{c(){l=a("div"),e=a("span"),r=_(n),i=_(":"),u=h(),c=a("span"),d=_(f),p=h(),m=a("button"),m.innerHTML=\'<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>\',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(m,"type","button"),o(m,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(l,"class","badge badge-primary badge-lg gap-2")},m(v,w){j(v,l,w),s(l,e),s(e,r),s(e,i),s(l,u),s(l,c),s(c,d),s(l,p),s(l,m),g||(b=V(m,"click",t[85]),g=!0)},p(v,w){w[0]&16777216&&n!==(n=v[24]("logs.result")+"")&&k(r,n),w[0]&16777232&&f!==(f=(v[4]?v[24]("logs.success"):v[24]("logs.failed"))+"")&&k(d,f)},d(v){v&&P(l),g=!1,b()}}}function a0(t){let l,e,n=t[24]("logs.requestType")+"",r,i,u,c,f=t[24](`logs.requestType_${t[5]}`)+"",d,p,m,g,b;return{c(){l=a("div"),e=a("span"),r=_(n),i=_(":"),u=h(),c=a("span"),d=_(f),p=h(),m=a("button"),m.innerHTML=\'<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>\',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(m,"type","button"),o(m,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(l,"class","badge badge-primary badge-lg gap-2")},m(v,w){j(v,l,w),s(l,e),s(e,r),s(e,i),s(l,u),s(l,c),s(c,d),s(l,p),s(l,m),g||(b=V(m,"click",t[86]),g=!0)},p(v,w){w[0]&16777216&&n!==(n=v[24]("logs.requestType")+"")&&k(r,n),w[0]&16777248&&f!==(f=v[24](`logs.requestType_${v[5]}`)+"")&&k(d,f)},d(v){v&&P(l),g=!1,b()}}}function i0(t){let l,e,n=t[24]("logs.timeRange")+"",r,i,u,c,f=t[24]("logs.recentTime")+"",d,p,m,g,b,v,w,C;return{c(){l=a("div"),e=a("span"),r=_(n),i=_(":"),u=h(),c=a("span"),d=_(f),p=h(),m=_(t[9]),g=_("h"),b=h(),v=a("button"),v.innerHTML=\'<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>\',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(v,"type","button"),o(v,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(l,"class","badge badge-primary badge-lg gap-2")},m(E,y){j(E,l,y),s(l,e),s(e,r),s(e,i),s(l,u),s(l,c),s(c,d),s(c,p),s(c,m),s(c,g),s(l,b),s(l,v),w||(C=V(v,"click",t[87]),w=!0)},p(E,y){y[0]&16777216&&n!==(n=E[24]("logs.timeRange")+"")&&k(r,n),y[0]&16777216&&f!==(f=E[24]("logs.recentTime")+"")&&k(d,f),y[0]&512&&k(m,E[9])},d(E){E&&P(l),w=!1,C()}}}function u0(t){let l,e,n=t[24]("logs.timeRange")+"",r,i,u,c,f=t[24]("logs.customTime")+"",d,p,m,g,b;return{c(){l=a("div"),e=a("span"),r=_(n),i=_(":"),u=h(),c=a("span"),d=_(f),p=h(),m=a("button"),m.innerHTML=\'<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>\',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(m,"type","button"),o(m,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(l,"class","badge badge-primary badge-lg gap-2")},m(v,w){j(v,l,w),s(l,e),s(e,r),s(e,i),s(l,u),s(l,c),s(c,d),s(l,p),s(l,m),g||(b=V(m,"click",t[88]),g=!0)},p(v,w){w[0]&16777216&&n!==(n=v[24]("logs.timeRange")+"")&&k(r,n),w[0]&16777216&&f!==(f=v[24]("logs.customTime")+"")&&k(d,f)},d(v){v&&P(l),g=!1,b()}}}function f0(t){let l,e,n=t[24]("logs.timeRange")+"",r,i,u,c,f=t[24]("logs.allTime")+"",d,p,m,g,b;return{c(){l=a("div"),e=a("span"),r=_(n),i=_(":"),u=h(),c=a("span"),d=_(f),p=h(),m=a("button"),m.innerHTML=\'<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>\',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(m,"type","button"),o(m,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(l,"class","badge badge-primary badge-lg gap-2")},m(v,w){j(v,l,w),s(l,e),s(e,r),s(e,i),s(l,u),s(l,c),s(c,d),s(l,p),s(l,m),g||(b=V(m,"click",t[89]),g=!0)},p(v,w){w[0]&16777216&&n!==(n=v[24]("logs.timeRange")+"")&&k(r,n),w[0]&16777216&&f!==(f=v[24]("logs.allTime")+"")&&k(d,f)},d(v){v&&P(l),g=!1,b()}}}function c0(t){let l,e,n=t[24]("logs.sortBy")+"",r,i,u,c,f=t[24](`logs.sortBy${t[6].charAt(0).toUpperCase()+t[6].slice(1)}`)+"",d,p,m=t[7]==="asc"?"\u2191":"\u2193",g,b,v,w,C;return{c(){l=a("div"),e=a("span"),r=_(n),i=_(":"),u=h(),c=a("span"),d=_(f),p=h(),g=_(m),b=h(),v=a("button"),v.innerHTML=\'<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>\',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(v,"type","button"),o(v,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(l,"class","badge badge-primary badge-lg gap-2")},m(E,y){j(E,l,y),s(l,e),s(e,r),s(e,i),s(l,u),s(l,c),s(c,d),s(c,p),s(c,g),s(l,b),s(l,v),w||(C=V(v,"click",t[90]),w=!0)},p(E,y){y[0]&16777216&&n!==(n=E[24]("logs.sortBy")+"")&&k(r,n),y[0]&16777280&&f!==(f=E[24](`logs.sortBy${E[6].charAt(0).toUpperCase()+E[6].slice(1)}`)+"")&&k(d,f),y[0]&128&&m!==(m=E[7]==="asc"?"\u2191":"\u2193")&&k(g,m)},d(E){E&&P(l),w=!1,C()}}}function db(t){let l,e,n,r,i,u,c,f=t[24]("logs.time")+"",d,p,m,g=t[24]("logs.method")+"",b,v,w,C=t[24]("logs.path")+"",E,y,T,S=t[24]("logs.status")+"",q,D,H,I=t[24]("logs.requestType")+"",R,L,A,N=t[24]("logs.duration")+"",Z,Y,x,F=t[24]("logs.upstream")+"",K,M,B,U=t[24]("logs.actions")+"",O,J,ie,ue=[],ne=new Map,$,te,re,ee=t[24]("logs.showing",{values:{start:(t[0]-1)*or+1,end:Math.min(t[0]*or,t[15]),total:t[15]}})+"",G,pe,oe,ge,he,ye,Fe,je,we=t[24]("logs.page",{values:{page:t[0],totalPages:t[16]}})+"",Oe,Je,Le,Pe,Me,fe,_e,Be=ut(t[14]);const De=se=>se[104].requestId;for(let se=0;se<Be.length;se+=1){let ke=Dp(t,Be,se),me=De(ke);ne.set(me,ue[se]=d0(me,ke))}return{c(){l=a("div"),e=a("div"),n=a("div"),r=a("table"),i=a("thead"),u=a("tr"),c=a("th"),d=_(f),p=h(),m=a("th"),b=_(g),v=h(),w=a("th"),E=_(C),y=h(),T=a("th"),q=_(S),D=h(),H=a("th"),R=_(I),L=h(),A=a("th"),Z=_(N),Y=h(),x=a("th"),K=_(F),M=h(),B=a("th"),O=_(U),J=h(),ie=a("tbody");for(let se=0;se<ue.length;se+=1)ue[se].c();$=h(),te=a("div"),re=a("div"),G=_(ee),pe=h(),oe=a("div"),ge=a("button"),he=_("\xAB"),Fe=h(),je=a("button"),Oe=_(we),Je=h(),Le=a("button"),Pe=_("\xBB"),o(r,"class","table table-zebra table-sm"),o(n,"class","overflow-x-auto"),o(re,"class","text-sm"),o(ge,"class","join-item btn btn-sm"),ge.disabled=ye=t[0]<=1,o(je,"class","join-item btn btn-sm"),o(Le,"class","join-item btn btn-sm"),Le.disabled=Me=t[0]>=t[16],o(oe,"class","join"),o(te,"class","flex justify-between items-center p-4"),o(e,"class","card-body p-0"),o(l,"class","card bg-base-100 shadow-xl")},m(se,ke){j(se,l,ke),s(l,e),s(e,n),s(n,r),s(r,i),s(i,u),s(u,c),s(c,d),s(u,p),s(u,m),s(m,b),s(u,v),s(u,w),s(w,E),s(u,y),s(u,T),s(T,q),s(u,D),s(u,H),s(H,R),s(u,L),s(u,A),s(A,Z),s(u,Y),s(u,x),s(x,K),s(u,M),s(u,B),s(B,O),s(r,J),s(r,ie);for(let me=0;me<ue.length;me+=1)ue[me]&&ue[me].m(ie,null);s(e,$),s(e,te),s(te,re),s(re,G),s(te,pe),s(te,oe),s(oe,ge),s(ge,he),s(oe,Fe),s(oe,je),s(je,Oe),s(oe,Je),s(oe,Le),s(Le,Pe),fe||(_e=[V(ge,"click",t[92]),V(Le,"click",t[93])],fe=!0)},p(se,ke){ke[0]&16777216&&f!==(f=se[24]("logs.time")+"")&&k(d,f),ke[0]&16777216&&g!==(g=se[24]("logs.method")+"")&&k(b,g),ke[0]&16777216&&C!==(C=se[24]("logs.path")+"")&&k(E,C),ke[0]&16777216&&S!==(S=se[24]("logs.status")+"")&&k(q,S),ke[0]&16777216&&I!==(I=se[24]("logs.requestType")+"")&&k(R,I),ke[0]&16777216&&N!==(N=se[24]("logs.duration")+"")&&k(Z,N),ke[0]&16777216&&F!==(F=se[24]("logs.upstream")+"")&&k(K,F),ke[0]&16777216&&U!==(U=se[24]("logs.actions")+"")&&k(O,U),ke[0]&218120192&&(Be=ut(se[14]),ue=ff(ue,ke,De,1,se,Be,ne,ie,j0,d0,null,Dp)),ke[0]&16809985&&ee!==(ee=se[24]("logs.showing",{values:{start:(se[0]-1)*or+1,end:Math.min(se[0]*or,se[15]),total:se[15]}})+"")&&k(G,ee),ke[0]&1&&ye!==(ye=se[0]<=1)&&(ge.disabled=ye),ke[0]&16842753&&we!==(we=se[24]("logs.page",{values:{page:se[0],totalPages:se[16]}})+"")&&k(Oe,we),ke[0]&65537&&Me!==(Me=se[0]>=se[16])&&(Le.disabled=Me)},d(se){se&&P(l);for(let ke=0;ke<ue.length;ke+=1)ue[ke].d();fe=!1,bt(_e)}}}function pb(t){let l,e,n,r,i,u=t[24]("logs.noData")+"",c;return{c(){l=a("div"),e=ae("svg"),n=ae("path"),r=h(),i=a("span"),c=_(u),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"class","stroke-current shrink-0 w-6 h-6"),o(l,"class","alert alert-info")},m(f,d){j(f,l,d),s(l,e),s(e,n),s(l,r),s(l,i),s(i,c)},p(f,d){d[0]&16777216&&u!==(u=f[24]("logs.noData")+"")&&k(c,u)},d(f){f&&P(l)}}}function hb(t){let l,e,n,r,i,u=t[24]("common.error")+"",c,f,d;return{c(){l=a("div"),e=ae("svg"),n=ae("path"),r=h(),i=a("span"),c=_(u),f=_(": "),d=_(t[18]),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","stroke-current shrink-0 h-6 w-6"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(l,"class","alert alert-error")},m(p,m){j(p,l,m),s(l,e),s(e,n),s(l,r),s(l,i),s(i,c),s(i,f),s(i,d)},p(p,m){m[0]&16777216&&u!==(u=p[24]("common.error")+"")&&k(c,u),m[0]&262144&&k(d,p[18])},d(p){p&&P(l)}}}function mb(t){let l;return{c(){l=a("div"),l.innerHTML=\'<span class="loading loading-spinner loading-lg"></span>\',o(l,"class","flex justify-center items-center h-64")},m(e,n){j(e,l,n)},p:tt,d(e){e&&P(l)}}}function d0(t,l){let e,n,r=h0(l[104].timestamp)+"",i,u,c,f,d=l[104].method+"",p,m,g,b=l[104].path+"",v,w,C,E,y,T=l[104].status+"",S,q,D,H,I,R=l[27](l[104].requestType)+"",L,A,N,Z,Y,x=m0(l[104].duration)+"",F,K,M,B=(l[104].upstream||"-")+"",U,O,J,ie,ue,ne=l[24]("logs.viewDetail")+"",$,te,re,ee;function G(){return l[91](l[104])}return{key:t,first:null,c(){e=a("tr"),n=a("td"),i=_(r),u=h(),c=a("td"),f=a("span"),p=_(d),m=h(),g=a("td"),v=_(b),C=h(),E=a("td"),y=a("span"),S=_(T),D=h(),H=a("td"),I=a("span"),L=_(R),Z=h(),Y=a("td"),F=_(x),K=h(),M=a("td"),U=_(B),J=h(),ie=a("td"),ue=a("button"),$=_(ne),te=h(),o(n,"class","text-xs"),o(f,"class","badge badge-sm"),o(g,"class","font-mono text-xs truncate max-w-xs"),o(g,"title",w=l[104].path),o(y,"class",q="badge badge-sm "+g0(l[104].status)),o(I,"class",A="badge badge-sm "+_0(l[104].requestType)),o(I,"title",N=l[24](`logs.requestType_${l[104].requestType}_desc`)),o(Y,"class","text-xs"),o(M,"class","text-xs truncate max-w-xs"),o(M,"title",O=l[104].upstream||"-"),o(ue,"class","btn btn-xs btn-ghost"),o(e,"class","hover"),this.first=e},m(pe,oe){j(pe,e,oe),s(e,n),s(n,i),s(e,u),s(e,c),s(c,f),s(f,p),s(e,m),s(e,g),s(g,v),s(e,C),s(e,E),s(E,y),s(y,S),s(e,D),s(e,H),s(H,I),s(I,L),s(e,Z),s(e,Y),s(Y,F),s(e,K),s(e,M),s(M,U),s(e,J),s(e,ie),s(ie,ue),s(ue,$),s(e,te),re||(ee=V(ue,"click",G),re=!0)},p(pe,oe){l=pe,oe[0]&16384&&r!==(r=h0(l[104].timestamp)+"")&&k(i,r),oe[0]&16384&&d!==(d=l[104].method+"")&&k(p,d),oe[0]&16384&&b!==(b=l[104].path+"")&&k(v,b),oe[0]&16384&&w!==(w=l[104].path)&&o(g,"title",w),oe[0]&16384&&T!==(T=l[104].status+"")&&k(S,T),oe[0]&16384&&q!==(q="badge badge-sm "+g0(l[104].status))&&o(y,"class",q),oe[0]&16384&&R!==(R=l[27](l[104].requestType)+"")&&k(L,R),oe[0]&16384&&A!==(A="badge badge-sm "+_0(l[104].requestType))&&o(I,"class",A),oe[0]&16793600&&N!==(N=l[24](`logs.requestType_${l[104].requestType}_desc`))&&o(I,"title",N),oe[0]&16384&&x!==(x=m0(l[104].duration)+"")&&k(F,x),oe[0]&16384&&B!==(B=(l[104].upstream||"-")+"")&&k(U,B),oe[0]&16384&&O!==(O=l[104].upstream||"-")&&o(M,"title",O),oe[0]&16777216&&ne!==(ne=l[24]("logs.viewDetail")+"")&&k($,ne)},d(pe){pe&&P(e),re=!1,ee()}}}function p0(t){let l,e;return l=new cb({props:{log:t[19],onClose:t[94]}}),{c(){Et(l.$$.fragment)},m(n,r){yt(l,n,r),e=!0},p(n,r){const i={};r[0]&524288&&(i.log=n[19]),r[0]&1572864&&(i.onClose=n[94]),l.$set(i)},i(n){e||(et(l.$$.fragment,n),e=!0)},o(n){st(l.$$.fragment,n),e=!1},d(n){Ct(l,n)}}}function gb(t){let l,e,n,r=t[24]("logs.title")+"",i,u,c,f,d,p,m,g,b,v,w,C,E,y=t[24]("logs.method")+"",T,S,q,D,H,I,R,L,A,N,Z=t[24]("logs.allMethods")+"",Y,x,F,K,M,B,U,O,J,ie,ue,ne,$,te,re,ee,G,pe,oe,ge=t[24]("logs.status")+"",he,ye,Fe,je,we,Oe,Je,Le,Pe,Me,fe,_e=t[24]("logs.statusPlaceholder")+"",Be,De,se,ke,me,Ee,Ve=t[24]("logs.result")+"",Ie,nt,Ne,Ye,Qe,ve,de,Te,Ze,Se,Ue=t[24]("logs.allResults")+"",Ce,mt,Ge,ce,qe=t[24]("logs.success")+"",Re,dt,We,z,He=t[24]("logs.failed")+"",X,ft,Ht,Ke,_t=t[24]("logs.moreFilters")+"",lt,it,ze,Xe,Bt,at,gt,wt,pt,vl,rt,Mt,ht=t[24]("logs.requestTypeFilter")+"",Tt,kl,Ot,hl,ml=t[24]("logs.requestType_all")+"",ql,Jt,Ql=t[24]("logs.requestType_final")+"",Qt,Yt,Hl=t[24]("logs.requestType_retry")+"",Il,gl,ol=t[24]("logs.requestType_recovery")+"",Yl,Ft,Pl,Vl,Jl,El=t[24]("logs.timeRange")+"",zt,Zl,Pt,jl,Ll=t[24]("logs.allTime")+"",$l,xt,wl=t[24]("logs.recentTime")+"",es,Fl,Bl=t[24]("logs.customTime")+"",Wl,Ps,nl,yl,rl,zl,al,_l,ll,Dl=t[24]("logs.sortBy")+"",Nl,Tl,Wt,It,jt,$t=t[24]("logs.sortByTimestamp")+"",el,Kt,Zt=t[24]("logs.sortByDuration")+"",il,Xt,$e=t[24]("logs.sortByStatus")+"",Al,ts,Xl,xl,ls=t[24]("logs.desc")+"",Ds,ss,zs=t[24]("logs.asc")+"",ul,Nt,ot,ct,sl,Ml,fl,xe,vt,cl,cr,_f,qo,Co,Mr,Ho,Sr,Rr=t[24]("logs.autoRefresh")+"",qi,bf,Eo,vf,kf,Ns,Us,Po,wf,Hi,qr=t[24]("common.refresh")+"",Pi,yf,jo,io,uo,Lo,Cf,ji,Hr=t[24]("logs.export")+"",Li,Ef,fo,Di,Pr,Tf,Ii,jr,Mf,Sf,Is,Do,js,co,Io,Rf,Lr=t[24]("logs.filters")+"",Bi,qf,Dr,Hf,Bo,dl,Ao,Ir,Br,Ar=t[24]("logs.method")+"",Ai,Pf,Es,Oo,Or=t[24]("logs.allMethods")+"",Oi,Fo,zo,No,Uo,Vo,jf,Jo,Fr,zr,Nr=t[24]("logs.status")+"",Fi,Lf,oo,Df,Wo,Ur,Vr,Jr=t[24]("logs.result")+"",zi,If,Vs,Go,Wr=t[24]("logs.allResults")+"",Ni,Ko,Gr=t[24]("logs.success")+"",Ui,Qo,Kr=t[24]("logs.failed")+"",Vi,Bf,Ji,Af,Yo,Qr,Yr,Zr=t[24]("logs.requestTypeFilter")+"",Wi,Of,Bs,Zo,Xr=t[24]("logs.requestType_all")+"",Gi,Xo,xr=t[24]("logs.requestType_final")+"",Ki,xo,$r=t[24]("logs.requestType_retry")+"",Qi,$o,ea=t[24]("logs.requestType_recovery")+"",Yi,Ff,en,ta,la,sa=t[24]("logs.timeRange")+"",Zi,zf,Js,tn,oa=t[24]("logs.allTime")+"",Xi,ln,na=t[24]("logs.recentTime")+"",xi,sn,ra=t[24]("logs.customTime")+"",$i,Nf,eu,tu,lu,Uf,on,aa,ia,ua=t[24]("logs.sortBy")+"",su,Vf,nn,Ws,rn,fa=t[24]("logs.sortByTimestamp")+"",ou,an,ca=t[24]("logs.sortByDuration")+"",nu,un,da=t[24]("logs.sortByStatus")+"",ru,Jf,no,fn,pa=t[24]("logs.desc")+"",au,cn,ha=t[24]("logs.asc")+"",iu,Wf,dn,po,Gs,pn,Gf,ma=t[24]("common.refresh")+"",uu,Kf,hn,os,ga,mn,_a,ba=t[24]("logs.autoRefresh")+"",fu,Qf,To,Yf,cu,du,Zf,Ks,Qs,gn,Xf,va=t[24]("common.refresh")+"",pu,xf,$f,_n,ho,mo,bn,e1,ka=t[24]("logs.export")+"",hu,t1,go,mu,wa,l1,gu,ya,s1,o1,Ca,vn,As,_o,kn,n1,Ea=t[24]("logs.actions")+"",_u,r1,a1,wn,qt,Ta,Ma=t[24]("logs.filters")+"",bu,i1,yn,Sa,Ra,qa=t[24]("logs.method")+"",vu,u1,Ts,Cn,Ha=t[24]("logs.allMethods")+"",ku,En,Tn,Mn,Sn,Rn,f1,qn,Pa,ja,La=t[24]("logs.status")+"",wu,c1,ro,d1,Hn,Da,Ia,Ba=t[24]("logs.result")+"",yu,p1,Ys,Pn,Aa=t[24]("logs.allResults")+"",Cu,jn,Oa=t[24]("logs.success")+"",Eu,Ln,Fa=t[24]("logs.failed")+"",Tu,h1,Dn,za,Na,Ua=t[24]("logs.requestTypeFilter")+"",Mu,m1,Os,In,Va=t[24]("logs.requestType_all")+"",Su,Bn,Ja=t[24]("logs.requestType_final")+"",Ru,An,Wa=t[24]("logs.requestType_retry")+"",qu,On,Ga=t[24]("logs.requestType_recovery")+"",Hu,g1,Fn,Ka,Qa,Ya=t[24]("logs.timeRange")+"",Pu,_1,Zs,zn,Za=t[24]("logs.allTime")+"",ju,Nn,Xa=t[24]("logs.recentTime")+"",Lu,Un,xa=t[24]("logs.customTime")+"",Du,b1,Iu,Bu,Vn,$a,ei,ti=t[24]("logs.sortBy")+"",Au,v1,Jn,Xs,Wn,li=t[24]("logs.sortByTimestamp")+"",Ou,Gn,si=t[24]("logs.sortByDuration")+"",Fu,Kn,oi=t[24]("logs.sortByStatus")+"",zu,k1,ao,Qn,ni=t[24]("logs.desc")+"",Nu,Yn,ri=t[24]("logs.asc")+"",Uu,w1,Vu,y1,ai,ii=t[24]("common.refresh")+"",Ju,C1,ui,Zn,fi,ci=t[24]("logs.autoRefresh")+"",Wu,E1,Mo,T1,Gu,xs,$s,Xn,M1,di=t[24]("common.refresh")+"",Ku,S1,Qu,R1,xn,$n,q1,er,H1,P1,j1,Yu,dr,Ae,Zu,L1,ns=t[22]&&Ip(t),Ms=t[2]&&Bp(),Ss=t[3]&&Ap(),Rs=t[4]!==void 0&&Op(),rs=(t[5]||t[8]!=="recent"||t[9]!==1||t[6]!=="timestamp"||t[7]!=="desc")&&Fp(t),as=t[8]==="recent"&&zp(t),is=t[8]==="custom"&&Np(t),us=t[12]&&Up(t),fs=t[12]&&Vp(t),cs=t[23]>0&&Jp(t),ds=(t[2]||t[3]||t[4]!==void 0||t[5]||t[8]!=="recent"||t[9]!==1||t[6]!=="timestamp"||t[7]!=="desc")&&Wp(t),ps=t[8]==="recent"&&Gp(t),hs=t[8]==="custom"&&Kp(t),ms=t[12]&&Qp(t),gs=t[21]>0&&Yp(t),_s=t[23]>0&&Zp(t),qs=(t[2]||t[3]||t[4]!==void 0||t[5]||t[8]!=="recent"||t[9]!==1||t[6]!=="timestamp"||t[7]!=="desc"||t[12])&&Xp(),bs=t[8]==="recent"&&xp(t),vs=t[8]==="custom"&&$p(t),ks=t[12]&&e0(t),ws=t[23]>0&&t0(t),ys=t[23]>0&&l0(t);function D1(W,be){return W[17]&&W[14].length===0?mb:W[18]?hb:W[14].length===0?pb:db}let pi=D1(t),eo=pi(t),Ol=t[20]&&t[19]&&p0(t);return{c(){l=a("div"),e=a("div"),n=a("h1"),i=_(r),u=h(),ns&&ns.c(),c=h(),f=a("div"),d=a("div"),p=a("div"),m=a("input"),b=h(),v=a("div"),w=a("div"),C=a("div"),E=a("div"),T=_(y),S=h(),Ms&&Ms.c(),q=h(),D=ae("svg"),H=ae("path"),R=h(),L=a("ul"),A=a("li"),N=a("button"),Y=_(Z),x=h(),F=a("li"),K=a("button"),K.textContent="GET",M=h(),B=a("li"),U=a("button"),U.textContent="POST",O=h(),J=a("li"),ie=a("button"),ie.textContent="PUT",ue=h(),ne=a("li"),$=a("button"),$.textContent="DELETE",te=h(),re=a("li"),ee=a("button"),ee.textContent="PATCH",G=h(),pe=a("div"),oe=a("div"),he=_(ge),ye=h(),Ss&&Ss.c(),Fe=h(),je=ae("svg"),we=ae("path"),Je=h(),Le=a("div"),Pe=a("div"),Me=a("div"),fe=a("span"),Be=_(_e),De=h(),se=a("input"),ke=h(),me=a("div"),Ee=a("div"),Ie=_(Ve),nt=h(),Rs&&Rs.c(),Ne=h(),Ye=ae("svg"),Qe=ae("path"),de=h(),Te=a("ul"),Ze=a("li"),Se=a("button"),Ce=_(Ue),mt=h(),Ge=a("li"),ce=a("button"),Re=_(qe),dt=h(),We=a("li"),z=a("button"),X=_(He),ft=h(),Ht=a("div"),Ke=a("div"),lt=_(_t),it=h(),rs&&rs.c(),ze=h(),Xe=ae("svg"),Bt=ae("path"),gt=h(),wt=a("div"),pt=a("div"),vl=a("div"),rt=a("div"),Mt=a("span"),Tt=_(ht),kl=h(),Ot=a("select"),hl=a("option"),ql=_(ml),Jt=a("option"),Qt=_(Ql),Yt=a("option"),Il=_(Hl),gl=a("option"),Yl=_(ol),Ft=h(),Pl=a("div"),Vl=a("div"),Jl=a("span"),zt=_(El),Zl=h(),Pt=a("select"),jl=a("option"),$l=_(Ll),xt=a("option"),es=_(wl),Fl=a("option"),Wl=_(Bl),Ps=h(),as&&as.c(),nl=h(),is&&is.c(),yl=h(),rl=a("div"),zl=h(),al=a("div"),_l=a("div"),ll=a("span"),Nl=_(Dl),Tl=h(),Wt=a("div"),It=a("select"),jt=a("option"),el=_($t),Kt=a("option"),il=_(Zt),Xt=a("option"),Al=_($e),ts=h(),Xl=a("select"),xl=a("option"),Ds=_(ls),ss=a("option"),ul=_(zs),Nt=h(),ot=a("div"),ct=h(),sl=a("div"),Ml=a("div"),fl=a("div"),xe=ae("svg"),vt=ae("path"),cl=ae("path"),cr=h(),us&&us.c(),_f=h(),qo=a("div"),Co=a("div"),Mr=a("div"),Ho=a("label"),Sr=a("span"),qi=_(Rr),bf=h(),Eo=a("input"),vf=h(),fs&&fs.c(),kf=h(),Ns=a("button"),Us=ae("svg"),Po=ae("path"),wf=h(),Hi=a("span"),Pi=_(qr),yf=h(),jo=a("div"),io=a("div"),uo=ae("svg"),Lo=ae("path"),Cf=h(),ji=a("span"),Li=_(Hr),Ef=h(),fo=a("ul"),Di=a("li"),Pr=a("button"),Pr.textContent="JSON",Tf=h(),Ii=a("li"),jr=a("button"),jr.textContent="CSV",Mf=h(),cs&&cs.c(),Sf=h(),Is=a("div"),Do=a("div"),js=a("div"),co=ae("svg"),Io=ae("path"),Rf=h(),Bi=_(Lr),qf=h(),ds&&ds.c(),Hf=h(),Bo=a("div"),dl=a("div"),Ao=a("div"),Ir=a("div"),Br=a("span"),Ai=_(Ar),Pf=h(),Es=a("select"),Oo=a("option"),Oi=_(Or),Fo=a("option"),Fo.textContent="GET",zo=a("option"),zo.textContent="POST",No=a("option"),No.textContent="PUT",Uo=a("option"),Uo.textContent="DELETE",Vo=a("option"),Vo.textContent="PATCH",jf=h(),Jo=a("div"),Fr=a("div"),zr=a("span"),Fi=_(Nr),Lf=h(),oo=a("input"),Df=h(),Wo=a("div"),Ur=a("div"),Vr=a("span"),zi=_(Jr),If=h(),Vs=a("select"),Go=a("option"),Ni=_(Wr),Ko=a("option"),Ui=_(Gr),Qo=a("option"),Vi=_(Kr),Bf=h(),Ji=a("div"),Af=h(),Yo=a("div"),Qr=a("div"),Yr=a("span"),Wi=_(Zr),Of=h(),Bs=a("select"),Zo=a("option"),Gi=_(Xr),Xo=a("option"),Ki=_(xr),xo=a("option"),Qi=_($r),$o=a("option"),Yi=_(ea),Ff=h(),en=a("div"),ta=a("div"),la=a("span"),Zi=_(sa),zf=h(),Js=a("select"),tn=a("option"),Xi=_(oa),ln=a("option"),xi=_(na),sn=a("option"),$i=_(ra),Nf=h(),ps&&ps.c(),eu=h(),hs&&hs.c(),tu=h(),lu=a("div"),Uf=h(),on=a("div"),aa=a("div"),ia=a("span"),su=_(ua),Vf=h(),nn=a("div"),Ws=a("select"),rn=a("option"),ou=_(fa),an=a("option"),nu=_(ca),un=a("option"),ru=_(da),Jf=h(),no=a("select"),fn=a("option"),au=_(pa),cn=a("option"),iu=_(ha),Wf=h(),dn=a("div"),po=a("div"),Gs=ae("svg"),pn=ae("path"),Gf=h(),uu=_(ma),Kf=h(),hn=a("div"),os=a("div"),ga=a("div"),mn=a("label"),_a=a("span"),fu=_(ba),Qf=h(),To=a("input"),Yf=h(),ms&&ms.c(),cu=h(),du=a("div"),Zf=h(),Ks=a("button"),Qs=ae("svg"),gn=ae("path"),Xf=h(),pu=_(va),xf=h(),gs&&gs.c(),$f=h(),_n=a("div"),ho=a("div"),mo=ae("svg"),bn=ae("path"),e1=h(),hu=_(ka),t1=h(),go=a("ul"),mu=a("li"),wa=a("button"),wa.textContent="JSON",l1=h(),gu=a("li"),ya=a("button"),ya.textContent="CSV",s1=h(),_s&&_s.c(),o1=h(),Ca=a("div"),vn=a("div"),As=a("div"),_o=ae("svg"),kn=ae("path"),n1=h(),_u=_(Ea),r1=h(),qs&&qs.c(),a1=h(),wn=a("div"),qt=a("div"),Ta=a("h3"),bu=_(Ma),i1=h(),yn=a("div"),Sa=a("div"),Ra=a("span"),vu=_(qa),u1=h(),Ts=a("select"),Cn=a("option"),ku=_(Ha),En=a("option"),En.textContent="GET",Tn=a("option"),Tn.textContent="POST",Mn=a("option"),Mn.textContent="PUT",Sn=a("option"),Sn.textContent="DELETE",Rn=a("option"),Rn.textContent="PATCH",f1=h(),qn=a("div"),Pa=a("div"),ja=a("span"),wu=_(La),c1=h(),ro=a("input"),d1=h(),Hn=a("div"),Da=a("div"),Ia=a("span"),yu=_(Ba),p1=h(),Ys=a("select"),Pn=a("option"),Cu=_(Aa),jn=a("option"),Eu=_(Oa),Ln=a("option"),Tu=_(Fa),h1=h(),Dn=a("div"),za=a("div"),Na=a("span"),Mu=_(Ua),m1=h(),Os=a("select"),In=a("option"),Su=_(Va),Bn=a("option"),Ru=_(Ja),An=a("option"),qu=_(Wa),On=a("option"),Hu=_(Ga),g1=h(),Fn=a("div"),Ka=a("div"),Qa=a("span"),Pu=_(Ya),_1=h(),Zs=a("select"),zn=a("option"),ju=_(Za),Nn=a("option"),Lu=_(Xa),Un=a("option"),Du=_(xa),b1=h(),bs&&bs.c(),Iu=h(),vs&&vs.c(),Bu=h(),Vn=a("div"),$a=a("div"),ei=a("span"),Au=_(ti),v1=h(),Jn=a("div"),Xs=a("select"),Wn=a("option"),Ou=_(li),Gn=a("option"),Fu=_(si),Kn=a("option"),zu=_(oi),k1=h(),ao=a("select"),Qn=a("option"),Nu=_(ni),Yn=a("option"),Uu=_(ri),w1=h(),Vu=a("div"),y1=h(),ai=a("h3"),Ju=_(ii),C1=h(),ui=a("div"),Zn=a("label"),fi=a("span"),Wu=_(ci),E1=h(),Mo=a("input"),T1=h(),ks&&ks.c(),Gu=h(),xs=a("button"),$s=ae("svg"),Xn=ae("path"),M1=h(),Ku=_(di),S1=h(),Qu=a("div"),R1=h(),xn=a("div"),$n=a("button"),$n.textContent="JSON",q1=h(),er=a("button"),er.textContent="CSV",H1=h(),ws&&ws.c(),P1=h(),ys&&ys.c(),j1=h(),eo.c(),Yu=h(),Ol&&Ol.c(),dr=Ul(),o(n,"class","text-2xl lg:text-3xl font-bold"),o(e,"class","mb-6"),o(m,"type","text"),o(m,"placeholder",g=t[24]("logs.searchPlaceholder")),o(m,"class","input input-bordered input-sm w-full"),o(p,"class","flex-1 min-w-[200px] xl:max-w-md"),o(H,"stroke-linecap","round"),o(H,"stroke-linejoin","round"),o(H,"stroke-width","2"),o(H,"d","M19 9l-7 7-7-7"),o(D,"xmlns","http://www.w3.org/2000/svg"),o(D,"class","h-3 w-3"),o(D,"fill","none"),o(D,"viewBox","0 0 24 24"),o(D,"stroke","currentColor"),o(E,"role","button"),o(E,"tabindex","0"),o(E,"class",I="btn btn-sm "+(t[2]?"btn-primary":"btn-ghost")+" gap-1"),le(K,"active",t[2]==="GET"),le(U,"active",t[2]==="POST"),le(ie,"active",t[2]==="PUT"),le($,"active",t[2]==="DELETE"),le(ee,"active",t[2]==="PATCH"),o(L,"role","menu"),o(L,"tabindex","0"),o(L,"class","dropdown-content menu p-2 shadow bg-base-100 rounded-box w-40 z-[1]"),o(C,"class","dropdown dropdown-end"),o(we,"stroke-linecap","round"),o(we,"stroke-linejoin","round"),o(we,"stroke-width","2"),o(we,"d","M19 9l-7 7-7-7"),o(je,"xmlns","http://www.w3.org/2000/svg"),o(je,"class","h-3 w-3"),o(je,"fill","none"),o(je,"viewBox","0 0 24 24"),o(je,"stroke","currentColor"),o(oe,"role","button"),o(oe,"tabindex","0"),o(oe,"class",Oe="btn btn-sm "+(t[3]?"btn-primary":"btn-ghost")+" gap-1"),o(fe,"class","label-text text-xs"),o(Me,"class","label py-1"),o(se,"type","text"),o(se,"placeholder","200, 404, 500"),o(se,"class","input input-bordered input-sm"),o(Pe,"class","form-control"),o(Le,"role","menu"),o(Le,"tabindex","0"),o(Le,"class","dropdown-content bg-base-100 rounded-box p-3 shadow-lg w-48 z-[1]"),o(pe,"class","dropdown dropdown-end"),o(Qe,"stroke-linecap","round"),o(Qe,"stroke-linejoin","round"),o(Qe,"stroke-width","2"),o(Qe,"d","M19 9l-7 7-7-7"),o(Ye,"xmlns","http://www.w3.org/2000/svg"),o(Ye,"class","h-3 w-3"),o(Ye,"fill","none"),o(Ye,"viewBox","0 0 24 24"),o(Ye,"stroke","currentColor"),o(Ee,"role","button"),o(Ee,"tabindex","0"),o(Ee,"class",ve="btn btn-sm "+(t[4]!==void 0?"btn-primary":"btn-ghost")+" gap-1"),le(ce,"active",t[4]===!0),le(z,"active",t[4]===!1),o(Te,"role","menu"),o(Te,"tabindex","0"),o(Te,"class","dropdown-content menu p-2 shadow bg-base-100 rounded-box w-40 z-[1]"),o(me,"class","dropdown dropdown-end"),o(Bt,"stroke-linecap","round"),o(Bt,"stroke-linejoin","round"),o(Bt,"stroke-width","2"),o(Bt,"d","M19 9l-7 7-7-7"),o(Xe,"xmlns","http://www.w3.org/2000/svg"),o(Xe,"class","h-3 w-3"),o(Xe,"fill","none"),o(Xe,"viewBox","0 0 24 24"),o(Xe,"stroke","currentColor"),o(Ke,"role","button"),o(Ke,"tabindex","0"),o(Ke,"class",at="btn btn-sm "+(t[5]||t[8]!=="recent"||t[9]!==1||t[6]!=="timestamp"||t[7]!=="desc"?"btn-primary":"btn-ghost")+" gap-1"),o(Mt,"class","label-text text-xs font-semibold"),o(rt,"class","label py-1"),hl.__value="",Q(hl,hl.__value),Jt.__value="final",Q(Jt,Jt.__value),Yt.__value="retry",Q(Yt,Yt.__value),gl.__value="recovery",Q(gl,gl.__value),o(Ot,"class","select select-bordered select-sm"),t[5]===void 0&&tl(()=>t[43].call(Ot)),o(vl,"class","form-control"),o(Jl,"class","label-text text-xs font-semibold"),o(Vl,"class","label py-1"),jl.__value="all",Q(jl,jl.__value),xt.__value="recent",Q(xt,xt.__value),Fl.__value="custom",Q(Fl,Fl.__value),o(Pt,"class","select select-bordered select-sm"),t[8]===void 0&&tl(()=>t[44].call(Pt)),o(Pl,"class","form-control"),o(rl,"class","divider my-2"),o(ll,"class","label-text text-xs font-semibold"),o(_l,"class","label py-1"),jt.__value="timestamp",Q(jt,jt.__value),Kt.__value="duration",Q(Kt,Kt.__value),Xt.__value="status",Q(Xt,Xt.__value),o(It,"class","select select-bordered select-sm flex-1"),t[6]===void 0&&tl(()=>t[48].call(It)),xl.__value="desc",Q(xl,xl.__value),ss.__value="asc",Q(ss,ss.__value),o(Xl,"class","select select-bordered select-sm w-24"),t[7]===void 0&&tl(()=>t[49].call(Xl)),o(Wt,"class","flex gap-2"),o(al,"class","form-control"),o(pt,"class","space-y-3"),o(wt,"role","menu"),o(wt,"tabindex","0"),o(wt,"class","dropdown-content bg-base-100 rounded-box p-4 shadow-lg w-80 z-[1]"),o(Ht,"class","dropdown dropdown-end"),o(w,"class","flex items-center gap-2 flex-wrap"),o(ot,"class","flex-1"),o(vt,"stroke-linecap","round"),o(vt,"stroke-linejoin","round"),o(vt,"stroke-width","2"),o(vt,"d","M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"),o(cl,"stroke-linecap","round"),o(cl,"stroke-linejoin","round"),o(cl,"stroke-width","2"),o(cl,"d","M15 12a3 3 0 11-6 0 3 3 0 016 0z"),o(xe,"xmlns","http://www.w3.org/2000/svg"),o(xe,"class","h-4 w-4"),o(xe,"fill","none"),o(xe,"viewBox","0 0 24 24"),o(xe,"stroke","currentColor"),o(fl,"role","button"),o(fl,"tabindex","0"),o(fl,"class","btn btn-sm btn-outline gap-1"),o(Sr,"class","label-text"),o(Eo,"type","checkbox"),o(Eo,"class","toggle toggle-primary toggle-sm"),o(Ho,"class","label cursor-pointer"),o(Mr,"class","form-control"),o(Co,"class","space-y-3"),o(qo,"role","menu"),o(qo,"tabindex","0"),o(qo,"class","dropdown-content bg-base-100 rounded-box p-4 shadow-lg w-64 z-[1]"),o(Ml,"class","dropdown dropdown-end"),o(Po,"stroke-linecap","round"),o(Po,"stroke-linejoin","round"),o(Po,"stroke-width","2"),o(Po,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),o(Us,"xmlns","http://www.w3.org/2000/svg"),o(Us,"class","h-4 w-4"),o(Us,"fill","none"),o(Us,"viewBox","0 0 24 24"),o(Us,"stroke","currentColor"),le(Us,"animate-spin",t[17]),o(Ns,"type","button"),o(Ns,"class","btn btn-sm btn-outline gap-2"),Ns.disabled=t[17],o(Lo,"stroke-linecap","round"),o(Lo,"stroke-linejoin","round"),o(Lo,"stroke-width","2"),o(Lo,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),o(uo,"xmlns","http://www.w3.org/2000/svg"),o(uo,"class","h-4 w-4"),o(uo,"fill","none"),o(uo,"viewBox","0 0 24 24"),o(uo,"stroke","currentColor"),o(io,"role","button"),o(io,"tabindex","0"),o(io,"class","btn btn-sm btn-secondary gap-2"),o(fo,"role","menu"),o(fo,"tabindex","0"),o(fo,"class","dropdown-content menu p-2 shadow bg-base-100 rounded-box w-32 z-[1]"),o(jo,"class","dropdown dropdown-end"),o(sl,"class","flex items-center gap-2 flex-wrap"),o(v,"class","hidden xl:flex items-center gap-2 flex-wrap flex-1"),o(Io,"stroke-linecap","round"),o(Io,"stroke-linejoin","round"),o(Io,"stroke-width","2"),o(Io,"d","M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"),o(co,"xmlns","http://www.w3.org/2000/svg"),o(co,"class","h-4 w-4"),o(co,"fill","none"),o(co,"viewBox","0 0 24 24"),o(co,"stroke","currentColor"),o(js,"role","button"),o(js,"tabindex","0"),o(js,"class",Dr="btn btn-sm "+(t[2]||t[3]||t[4]!==void 0||t[5]||t[8]!=="recent"||t[9]!==1||t[6]!=="timestamp"||t[7]!=="desc"?"btn-primary":"btn-ghost")+" gap-1"),o(Br,"class","label-text text-xs font-semibold"),o(Ir,"class","label py-1"),Oo.__value="",Q(Oo,Oo.__value),Fo.__value="GET",Q(Fo,Fo.__value),zo.__value="POST",Q(zo,zo.__value),No.__value="PUT",Q(No,No.__value),Uo.__value="DELETE",Q(Uo,Uo.__value),Vo.__value="PATCH",Q(Vo,Vo.__value),o(Es,"class","select select-bordered select-sm"),t[2]===void 0&&tl(()=>t[54].call(Es)),o(Ao,"class","form-control"),o(zr,"class","label-text text-xs font-semibold"),o(Fr,"class","label py-1"),o(oo,"type","text"),o(oo,"placeholder","200, 404, 500"),o(oo,"class","input input-bordered input-sm"),o(Jo,"class","form-control"),o(Vr,"class","label-text text-xs font-semibold"),o(Ur,"class","label py-1"),Go.__value=void 0,Q(Go,Go.__value),Ko.__value=!0,Q(Ko,Ko.__value),Qo.__value=!1,Q(Qo,Qo.__value),o(Vs,"class","select select-bordered select-sm"),t[4]===void 0&&tl(()=>t[56].call(Vs)),o(Wo,"class","form-control"),o(Ji,"class","divider my-2"),o(Yr,"class","label-text text-xs font-semibold"),o(Qr,"class","label py-1"),Zo.__value="",Q(Zo,Zo.__value),Xo.__value="final",Q(Xo,Xo.__value),xo.__value="retry",Q(xo,xo.__value),$o.__value="recovery",Q($o,$o.__value),o(Bs,"class","select select-bordered select-sm"),t[5]===void 0&&tl(()=>t[57].call(Bs)),o(Yo,"class","form-control"),o(la,"class","label-text text-xs font-semibold"),o(ta,"class","label py-1"),tn.__value="all",Q(tn,tn.__value),ln.__value="recent",Q(ln,ln.__value),sn.__value="custom",Q(sn,sn.__value),o(Js,"class","select select-bordered select-sm"),t[8]===void 0&&tl(()=>t[58].call(Js)),o(en,"class","form-control"),o(lu,"class","divider my-2"),o(ia,"class","label-text text-xs font-semibold"),o(aa,"class","label py-1"),rn.__value="timestamp",Q(rn,rn.__value),an.__value="duration",Q(an,an.__value),un.__value="status",Q(un,un.__value),o(Ws,"class","select select-bordered select-sm flex-1"),t[6]===void 0&&tl(()=>t[62].call(Ws)),fn.__value="desc",Q(fn,fn.__value),cn.__value="asc",Q(cn,cn.__value),o(no,"class","select select-bordered select-sm w-24"),t[7]===void 0&&tl(()=>t[63].call(no)),o(nn,"class","flex gap-2"),o(on,"class","form-control"),o(dl,"class","space-y-3"),o(Bo,"role","menu"),o(Bo,"tabindex","0"),o(Bo,"class","dropdown-content bg-base-100 rounded-box p-4 shadow-lg w-80 z-[1]"),o(Do,"class","dropdown dropdown-end"),o(pn,"stroke-linecap","round"),o(pn,"stroke-linejoin","round"),o(pn,"stroke-width","2"),o(pn,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),o(Gs,"xmlns","http://www.w3.org/2000/svg"),o(Gs,"class","h-4 w-4"),o(Gs,"fill","none"),o(Gs,"viewBox","0 0 24 24"),o(Gs,"stroke","currentColor"),le(Gs,"animate-spin",t[17]),o(po,"role","button"),o(po,"tabindex","0"),o(po,"class","btn btn-sm btn-ghost gap-2"),o(_a,"class","label-text"),o(To,"type","checkbox"),o(To,"class","toggle toggle-primary toggle-sm"),o(mn,"class","label cursor-pointer"),o(ga,"class","form-control"),o(du,"class","divider my-2"),o(gn,"stroke-linecap","round"),o(gn,"stroke-linejoin","round"),o(gn,"stroke-width","2"),o(gn,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),o(Qs,"xmlns","http://www.w3.org/2000/svg"),o(Qs,"class","h-4 w-4"),o(Qs,"fill","none"),o(Qs,"viewBox","0 0 24 24"),o(Qs,"stroke","currentColor"),le(Qs,"animate-spin",t[17]),o(Ks,"type","button"),o(Ks,"class","btn btn-sm btn-primary w-full gap-2"),Ks.disabled=t[17],o(os,"class","space-y-3"),o(hn,"role","menu"),o(hn,"tabindex","0"),o(hn,"class","dropdown-content bg-base-100 rounded-box p-4 shadow-lg w-72 z-[1]"),o(dn,"class","dropdown dropdown-end"),o(bn,"stroke-linecap","round"),o(bn,"stroke-linejoin","round"),o(bn,"stroke-width","2"),o(bn,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),o(mo,"xmlns","http://www.w3.org/2000/svg"),o(mo,"class","h-4 w-4"),o(mo,"fill","none"),o(mo,"viewBox","0 0 24 24"),o(mo,"stroke","currentColor"),o(ho,"role","button"),o(ho,"tabindex","0"),o(ho,"class","btn btn-sm btn-secondary gap-2"),o(go,"role","menu"),o(go,"tabindex","0"),o(go,"class","dropdown-content menu p-2 shadow bg-base-100 rounded-box w-32 z-[1]"),o(_n,"class","dropdown dropdown-end"),o(Is,"class","hidden md:flex xl:hidden items-center gap-2"),o(kn,"stroke-linecap","round"),o(kn,"stroke-linejoin","round"),o(kn,"stroke-width","2"),o(kn,"d","M4 6h16M4 12h16M4 18h16"),o(_o,"xmlns","http://www.w3.org/2000/svg"),o(_o,"class","h-4 w-4"),o(_o,"fill","none"),o(_o,"viewBox","0 0 24 24"),o(_o,"stroke","currentColor"),o(As,"role","button"),o(As,"tabindex","0"),o(As,"class","btn btn-sm btn-ghost gap-1"),o(Ta,"class","font-semibold text-sm"),o(Ra,"class","label-text text-xs font-semibold"),o(Sa,"class","label py-1"),Cn.__value="",Q(Cn,Cn.__value),En.__value="GET",Q(En,En.__value),Tn.__value="POST",Q(Tn,Tn.__value),Mn.__value="PUT",Q(Mn,Mn.__value),Sn.__value="DELETE",Q(Sn,Sn.__value),Rn.__value="PATCH",Q(Rn,Rn.__value),o(Ts,"class","select select-bordered select-sm"),t[2]===void 0&&tl(()=>t[68].call(Ts)),o(yn,"class","form-control"),o(ja,"class","label-text text-xs font-semibold"),o(Pa,"class","label py-1"),o(ro,"type","text"),o(ro,"placeholder","200, 404, 500"),o(ro,"class","input input-bordered input-sm"),o(qn,"class","form-control"),o(Ia,"class","label-text text-xs font-semibold"),o(Da,"class","label py-1"),Pn.__value=void 0,Q(Pn,Pn.__value),jn.__value=!0,Q(jn,jn.__value),Ln.__value=!1,Q(Ln,Ln.__value),o(Ys,"class","select select-bordered select-sm"),t[4]===void 0&&tl(()=>t[70].call(Ys)),o(Hn,"class","form-control"),o(Na,"class","label-text text-xs font-semibold"),o(za,"class","label py-1"),In.__value="",Q(In,In.__value),Bn.__value="final",Q(Bn,Bn.__value),An.__value="retry",Q(An,An.__value),On.__value="recovery",Q(On,On.__value),o(Os,"class","select select-bordered select-sm"),t[5]===void 0&&tl(()=>t[71].call(Os)),o(Dn,"class","form-control"),o(Qa,"class","label-text text-xs font-semibold"),o(Ka,"class","label py-1"),zn.__value="all",Q(zn,zn.__value),Nn.__value="recent",Q(Nn,Nn.__value),Un.__value="custom",Q(Un,Un.__value),o(Zs,"class","select select-bordered select-sm"),t[8]===void 0&&tl(()=>t[72].call(Zs)),o(Fn,"class","form-control"),o(ei,"class","label-text text-xs font-semibold"),o($a,"class","label py-1"),Wn.__value="timestamp",Q(Wn,Wn.__value),Gn.__value="duration",Q(Gn,Gn.__value),Kn.__value="status",Q(Kn,Kn.__value),o(Xs,"class","select select-bordered select-sm flex-1"),t[6]===void 0&&tl(()=>t[76].call(Xs)),Qn.__value="desc",Q(Qn,Qn.__value),Yn.__value="asc",Q(Yn,Yn.__value),o(ao,"class","select select-bordered select-sm w-24"),t[7]===void 0&&tl(()=>t[77].call(ao)),o(Jn,"class","flex gap-2"),o(Vn,"class","form-control"),o(Vu,"class","divider my-2"),o(ai,"class","font-semibold text-sm"),o(fi,"class","label-text"),o(Mo,"type","checkbox"),o(Mo,"class","toggle toggle-primary toggle-sm"),o(Zn,"class","label cursor-pointer"),o(ui,"class","form-control"),o(Xn,"stroke-linecap","round"),o(Xn,"stroke-linejoin","round"),o(Xn,"stroke-width","2"),o(Xn,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),o($s,"xmlns","http://www.w3.org/2000/svg"),o($s,"class","h-4 w-4"),o($s,"fill","none"),o($s,"viewBox","0 0 24 24"),o($s,"stroke","currentColor"),le($s,"animate-spin",t[17]),o(xs,"type","button"),o(xs,"class","btn btn-sm btn-primary w-full gap-2"),xs.disabled=t[17],o(Qu,"class","divider my-2"),o($n,"type","button"),o($n,"class","btn btn-sm btn-secondary flex-1 gap-2"),o(er,"type","button"),o(er,"class","btn btn-sm btn-secondary flex-1 gap-2"),o(xn,"class","flex gap-2"),o(qt,"class","space-y-3"),o(wn,"role","menu"),o(wn,"tabindex","0"),o(wn,"class","dropdown-content bg-base-100 rounded-box p-4 shadow-lg w-80 z-[1]"),o(vn,"class","dropdown dropdown-end"),o(Ca,"class","flex md:hidden items-center gap-2"),o(d,"class","flex items-center gap-2 mb-3"),o(f,"class","mb-6"),o(l,"class","p-6")},m(W,be){j(W,l,be),s(l,e),s(e,n),s(n,i),s(l,u),ns&&ns.m(l,null),s(l,c),s(l,f),s(f,d),s(d,p),s(p,m),Q(m,t[1]),s(d,b),s(d,v),s(v,w),s(w,C),s(C,E),s(E,T),s(E,S),Ms&&Ms.m(E,null),s(E,q),s(E,D),s(D,H),s(C,R),s(C,L),s(L,A),s(A,N),s(N,Y),s(L,x),s(L,F),s(F,K),s(L,M),s(L,B),s(B,U),s(L,O),s(L,J),s(J,ie),s(L,ue),s(L,ne),s(ne,$),s(L,te),s(L,re),s(re,ee),s(w,G),s(w,pe),s(pe,oe),s(oe,he),s(oe,ye),Ss&&Ss.m(oe,null),s(oe,Fe),s(oe,je),s(je,we),s(pe,Je),s(pe,Le),s(Le,Pe),s(Pe,Me),s(Me,fe),s(fe,Be),s(Pe,De),s(Pe,se),Q(se,t[3]),s(w,ke),s(w,me),s(me,Ee),s(Ee,Ie),s(Ee,nt),Rs&&Rs.m(Ee,null),s(Ee,Ne),s(Ee,Ye),s(Ye,Qe),s(me,de),s(me,Te),s(Te,Ze),s(Ze,Se),s(Se,Ce),s(Te,mt),s(Te,Ge),s(Ge,ce),s(ce,Re),s(Te,dt),s(Te,We),s(We,z),s(z,X),s(w,ft),s(w,Ht),s(Ht,Ke),s(Ke,lt),s(Ke,it),rs&&rs.m(Ke,null),s(Ke,ze),s(Ke,Xe),s(Xe,Bt),s(Ht,gt),s(Ht,wt),s(wt,pt),s(pt,vl),s(vl,rt),s(rt,Mt),s(Mt,Tt),s(vl,kl),s(vl,Ot),s(Ot,hl),s(hl,ql),s(Ot,Jt),s(Jt,Qt),s(Ot,Yt),s(Yt,Il),s(Ot,gl),s(gl,Yl),kt(Ot,t[5],!0),s(pt,Ft),s(pt,Pl),s(Pl,Vl),s(Vl,Jl),s(Jl,zt),s(Pl,Zl),s(Pl,Pt),s(Pt,jl),s(jl,$l),s(Pt,xt),s(xt,es),s(Pt,Fl),s(Fl,Wl),kt(Pt,t[8],!0),s(pt,Ps),as&&as.m(pt,null),s(pt,nl),is&&is.m(pt,null),s(pt,yl),s(pt,rl),s(pt,zl),s(pt,al),s(al,_l),s(_l,ll),s(ll,Nl),s(al,Tl),s(al,Wt),s(Wt,It),s(It,jt),s(jt,el),s(It,Kt),s(Kt,il),s(It,Xt),s(Xt,Al),kt(It,t[6],!0),s(Wt,ts),s(Wt,Xl),s(Xl,xl),s(xl,Ds),s(Xl,ss),s(ss,ul),kt(Xl,t[7],!0),s(v,Nt),s(v,ot),s(v,ct),s(v,sl),s(sl,Ml),s(Ml,fl),s(fl,xe),s(xe,vt),s(xe,cl),s(fl,cr),us&&us.m(fl,null),s(Ml,_f),s(Ml,qo),s(qo,Co),s(Co,Mr),s(Mr,Ho),s(Ho,Sr),s(Sr,qi),s(Ho,bf),s(Ho,Eo),Eo.checked=t[12],s(Co,vf),fs&&fs.m(Co,null),s(sl,kf),s(sl,Ns),s(Ns,Us),s(Us,Po),s(Ns,wf),s(Ns,Hi),s(Hi,Pi),s(sl,yf),s(sl,jo),s(jo,io),s(io,uo),s(uo,Lo),s(io,Cf),s(io,ji),s(ji,Li),s(jo,Ef),s(jo,fo),s(fo,Di),s(Di,Pr),s(fo,Tf),s(fo,Ii),s(Ii,jr),s(sl,Mf),cs&&cs.m(sl,null),s(d,Sf),s(d,Is),s(Is,Do),s(Do,js),s(js,co),s(co,Io),s(js,Rf),s(js,Bi),s(js,qf),ds&&ds.m(js,null),s(Do,Hf),s(Do,Bo),s(Bo,dl),s(dl,Ao),s(Ao,Ir),s(Ir,Br),s(Br,Ai),s(Ao,Pf),s(Ao,Es),s(Es,Oo),s(Oo,Oi),s(Es,Fo),s(Es,zo),s(Es,No),s(Es,Uo),s(Es,Vo),kt(Es,t[2],!0),s(dl,jf),s(dl,Jo),s(Jo,Fr),s(Fr,zr),s(zr,Fi),s(Jo,Lf),s(Jo,oo),Q(oo,t[3]),s(dl,Df),s(dl,Wo),s(Wo,Ur),s(Ur,Vr),s(Vr,zi),s(Wo,If),s(Wo,Vs),s(Vs,Go),s(Go,Ni),s(Vs,Ko),s(Ko,Ui),s(Vs,Qo),s(Qo,Vi),kt(Vs,t[4],!0),s(dl,Bf),s(dl,Ji),s(dl,Af),s(dl,Yo),s(Yo,Qr),s(Qr,Yr),s(Yr,Wi),s(Yo,Of),s(Yo,Bs),s(Bs,Zo),s(Zo,Gi),s(Bs,Xo),s(Xo,Ki),s(Bs,xo),s(xo,Qi),s(Bs,$o),s($o,Yi),kt(Bs,t[5],!0),s(dl,Ff),s(dl,en),s(en,ta),s(ta,la),s(la,Zi),s(en,zf),s(en,Js),s(Js,tn),s(tn,Xi),s(Js,ln),s(ln,xi),s(Js,sn),s(sn,$i),kt(Js,t[8],!0),s(dl,Nf),ps&&ps.m(dl,null),s(dl,eu),hs&&hs.m(dl,null),s(dl,tu),s(dl,lu),s(dl,Uf),s(dl,on),s(on,aa),s(aa,ia),s(ia,su),s(on,Vf),s(on,nn),s(nn,Ws),s(Ws,rn),s(rn,ou),s(Ws,an),s(an,nu),s(Ws,un),s(un,ru),kt(Ws,t[6],!0),s(nn,Jf),s(nn,no),s(no,fn),s(fn,au),s(no,cn),s(cn,iu),kt(no,t[7],!0),s(Is,Wf),s(Is,dn),s(dn,po),s(po,Gs),s(Gs,pn),s(po,Gf),s(po,uu),s(dn,Kf),s(dn,hn),s(hn,os),s(os,ga),s(ga,mn),s(mn,_a),s(_a,fu),s(mn,Qf),s(mn,To),To.checked=t[12],s(os,Yf),ms&&ms.m(os,null),s(os,cu),s(os,du),s(os,Zf),s(os,Ks),s(Ks,Qs),s(Qs,gn),s(Ks,Xf),s(Ks,pu),s(os,xf),gs&&gs.m(os,null),s(Is,$f),s(Is,_n),s(_n,ho),s(ho,mo),s(mo,bn),s(ho,e1),s(ho,hu),s(_n,t1),s(_n,go),s(go,mu),s(mu,wa),s(go,l1),s(go,gu),s(gu,ya),s(Is,s1),_s&&_s.m(Is,null),s(d,o1),s(d,Ca),s(Ca,vn),s(vn,As),s(As,_o),s(_o,kn),s(As,n1),s(As,_u),s(As,r1),qs&&qs.m(As,null),s(vn,a1),s(vn,wn),s(wn,qt),s(qt,Ta),s(Ta,bu),s(qt,i1),s(qt,yn),s(yn,Sa),s(Sa,Ra),s(Ra,vu),s(yn,u1),s(yn,Ts),s(Ts,Cn),s(Cn,ku),s(Ts,En),s(Ts,Tn),s(Ts,Mn),s(Ts,Sn),s(Ts,Rn),kt(Ts,t[2],!0),s(qt,f1),s(qt,qn),s(qn,Pa),s(Pa,ja),s(ja,wu),s(qn,c1),s(qn,ro),Q(ro,t[3]),s(qt,d1),s(qt,Hn),s(Hn,Da),s(Da,Ia),s(Ia,yu),s(Hn,p1),s(Hn,Ys),s(Ys,Pn),s(Pn,Cu),s(Ys,jn),s(jn,Eu),s(Ys,Ln),s(Ln,Tu),kt(Ys,t[4],!0),s(qt,h1),s(qt,Dn),s(Dn,za),s(za,Na),s(Na,Mu),s(Dn,m1),s(Dn,Os),s(Os,In),s(In,Su),s(Os,Bn),s(Bn,Ru),s(Os,An),s(An,qu),s(Os,On),s(On,Hu),kt(Os,t[5],!0),s(qt,g1),s(qt,Fn),s(Fn,Ka),s(Ka,Qa),s(Qa,Pu),s(Fn,_1),s(Fn,Zs),s(Zs,zn),s(zn,ju),s(Zs,Nn),s(Nn,Lu),s(Zs,Un),s(Un,Du),kt(Zs,t[8],!0),s(qt,b1),bs&&bs.m(qt,null),s(qt,Iu),vs&&vs.m(qt,null),s(qt,Bu),s(qt,Vn),s(Vn,$a),s($a,ei),s(ei,Au),s(Vn,v1),s(Vn,Jn),s(Jn,Xs),s(Xs,Wn),s(Wn,Ou),s(Xs,Gn),s(Gn,Fu),s(Xs,Kn),s(Kn,zu),kt(Xs,t[6],!0),s(Jn,k1),s(Jn,ao),s(ao,Qn),s(Qn,Nu),s(ao,Yn),s(Yn,Uu),kt(ao,t[7],!0),s(qt,w1),s(qt,Vu),s(qt,y1),s(qt,ai),s(ai,Ju),s(qt,C1),s(qt,ui),s(ui,Zn),s(Zn,fi),s(fi,Wu),s(Zn,E1),s(Zn,Mo),Mo.checked=t[12],s(qt,T1),ks&&ks.m(qt,null),s(qt,Gu),s(qt,xs),s(xs,$s),s($s,Xn),s(xs,M1),s(xs,Ku),s(qt,S1),s(qt,Qu),s(qt,R1),s(qt,xn),s(xn,$n),s(xn,q1),s(xn,er),s(qt,H1),ws&&ws.m(qt,null),s(f,P1),ys&&ys.m(f,null),s(l,j1),eo.m(l,null),j(W,Yu,be),Ol&&Ol.m(W,be),j(W,dr,be),Ae=!0,Zu||(L1=[V(m,"input",t[32]),V(N,"click",t[33]),V(K,"click",t[34]),V(U,"click",t[35]),V(ie,"click",t[36]),V($,"click",t[37]),V(ee,"click",t[38]),V(se,"input",t[39]),V(Se,"click",t[40]),V(ce,"click",t[41]),V(z,"click",t[42]),V(Ot,"change",t[43]),V(Pt,"change",t[44]),V(It,"change",t[48]),V(Xl,"change",t[49]),V(Eo,"change",t[50]),V(Ns,"click",t[29]),V(Pr,"click",t[52]),V(jr,"click",t[53]),V(Es,"change",t[54]),V(oo,"input",t[55]),V(Vs,"change",t[56]),V(Bs,"change",t[57]),V(Js,"change",t[58]),V(Ws,"change",t[62]),V(no,"change",t[63]),V(To,"change",t[64]),V(Ks,"click",t[29]),V(wa,"click",t[66]),V(ya,"click",t[67]),V(Ts,"change",t[68]),V(ro,"input",t[69]),V(Ys,"change",t[70]),V(Os,"change",t[71]),V(Zs,"change",t[72]),V(Xs,"change",t[76]),V(ao,"change",t[77]),V(Mo,"change",t[78]),V(xs,"click",t[29]),V($n,"click",t[80]),V(er,"click",t[81])],Zu=!0)},p(W,be){(!Ae||be[0]&16777216)&&r!==(r=W[24]("logs.title")+"")&&k(i,r),W[22]?ns?ns.p(W,be):(ns=Ip(W),ns.c(),ns.m(l,c)):ns&&(ns.d(1),ns=null),(!Ae||be[0]&16777216&&g!==(g=W[24]("logs.searchPlaceholder")))&&o(m,"placeholder",g),be[0]&2&&m.value!==W[1]&&Q(m,W[1]),(!Ae||be[0]&16777216)&&y!==(y=W[24]("logs.method")+"")&&k(T,y),W[2]?Ms||(Ms=Bp(),Ms.c(),Ms.m(E,q)):Ms&&(Ms.d(1),Ms=null),(!Ae||be[0]&4&&I!==(I="btn btn-sm "+(W[2]?"btn-primary":"btn-ghost")+" gap-1"))&&o(E,"class",I),(!Ae||be[0]&16777216)&&Z!==(Z=W[24]("logs.allMethods")+"")&&k(Y,Z),(!Ae||be[0]&4)&&le(K,"active",W[2]==="GET"),(!Ae||be[0]&4)&&le(U,"active",W[2]==="POST"),(!Ae||be[0]&4)&&le(ie,"active",W[2]==="PUT"),(!Ae||be[0]&4)&&le($,"active",W[2]==="DELETE"),(!Ae||be[0]&4)&&le(ee,"active",W[2]==="PATCH"),(!Ae||be[0]&16777216)&&ge!==(ge=W[24]("logs.status")+"")&&k(he,ge),W[3]?Ss||(Ss=Ap(),Ss.c(),Ss.m(oe,Fe)):Ss&&(Ss.d(1),Ss=null),(!Ae||be[0]&8&&Oe!==(Oe="btn btn-sm "+(W[3]?"btn-primary":"btn-ghost")+" gap-1"))&&o(oe,"class",Oe),(!Ae||be[0]&16777216)&&_e!==(_e=W[24]("logs.statusPlaceholder")+"")&&k(Be,_e),be[0]&8&&se.value!==W[3]&&Q(se,W[3]),(!Ae||be[0]&16777216)&&Ve!==(Ve=W[24]("logs.result")+"")&&k(Ie,Ve),W[4]!==void 0?Rs||(Rs=Op(),Rs.c(),Rs.m(Ee,Ne)):Rs&&(Rs.d(1),Rs=null),(!Ae||be[0]&16&&ve!==(ve="btn btn-sm "+(W[4]!==void 0?"btn-primary":"btn-ghost")+" gap-1"))&&o(Ee,"class",ve),(!Ae||be[0]&16777216)&&Ue!==(Ue=W[24]("logs.allResults")+"")&&k(Ce,Ue),(!Ae||be[0]&16777216)&&qe!==(qe=W[24]("logs.success")+"")&&k(Re,qe),(!Ae||be[0]&16)&&le(ce,"active",W[4]===!0),(!Ae||be[0]&16777216)&&He!==(He=W[24]("logs.failed")+"")&&k(X,He),(!Ae||be[0]&16)&&le(z,"active",W[4]===!1),(!Ae||be[0]&16777216)&&_t!==(_t=W[24]("logs.moreFilters")+"")&&k(lt,_t),W[5]||W[8]!=="recent"||W[9]!==1||W[6]!=="timestamp"||W[7]!=="desc"?rs?rs.p(W,be):(rs=Fp(W),rs.c(),rs.m(Ke,ze)):rs&&(rs.d(1),rs=null),(!Ae||be[0]&992&&at!==(at="btn btn-sm "+(W[5]||W[8]!=="recent"||W[9]!==1||W[6]!=="timestamp"||W[7]!=="desc"?"btn-primary":"btn-ghost")+" gap-1"))&&o(Ke,"class",at),(!Ae||be[0]&16777216)&&ht!==(ht=W[24]("logs.requestTypeFilter")+"")&&k(Tt,ht),(!Ae||be[0]&16777216)&&ml!==(ml=W[24]("logs.requestType_all")+"")&&k(ql,ml),(!Ae||be[0]&16777216)&&Ql!==(Ql=W[24]("logs.requestType_final")+"")&&k(Qt,Ql),(!Ae||be[0]&16777216)&&Hl!==(Hl=W[24]("logs.requestType_retry")+"")&&k(Il,Hl),(!Ae||be[0]&16777216)&&ol!==(ol=W[24]("logs.requestType_recovery")+"")&&k(Yl,ol),be[0]&32&&kt(Ot,W[5]),(!Ae||be[0]&16777216)&&El!==(El=W[24]("logs.timeRange")+"")&&k(zt,El),(!Ae||be[0]&16777216)&&Ll!==(Ll=W[24]("logs.allTime")+"")&&k($l,Ll),(!Ae||be[0]&16777216)&&wl!==(wl=W[24]("logs.recentTime")+"")&&k(es,wl),(!Ae||be[0]&16777216)&&Bl!==(Bl=W[24]("logs.customTime")+"")&&k(Wl,Bl),be[0]&256&&kt(Pt,W[8]),W[8]==="recent"?as?as.p(W,be):(as=zp(W),as.c(),as.m(pt,nl)):as&&(as.d(1),as=null),W[8]==="custom"?is?is.p(W,be):(is=Np(W),is.c(),is.m(pt,yl)):is&&(is.d(1),is=null),(!Ae||be[0]&16777216)&&Dl!==(Dl=W[24]("logs.sortBy")+"")&&k(Nl,Dl),(!Ae||be[0]&16777216)&&$t!==($t=W[24]("logs.sortByTimestamp")+"")&&k(el,$t),(!Ae||be[0]&16777216)&&Zt!==(Zt=W[24]("logs.sortByDuration")+"")&&k(il,Zt),(!Ae||be[0]&16777216)&&$e!==($e=W[24]("logs.sortByStatus")+"")&&k(Al,$e),be[0]&64&&kt(It,W[6]),(!Ae||be[0]&16777216)&&ls!==(ls=W[24]("logs.desc")+"")&&k(Ds,ls),(!Ae||be[0]&16777216)&&zs!==(zs=W[24]("logs.asc")+"")&&k(ul,zs),be[0]&128&&kt(Xl,W[7]),W[12]?us?us.p(W,be):(us=Up(W),us.c(),us.m(fl,null)):us&&(us.d(1),us=null),(!Ae||be[0]&16777216)&&Rr!==(Rr=W[24]("logs.autoRefresh")+"")&&k(qi,Rr),be[0]&4096&&(Eo.checked=W[12]),W[12]?fs?fs.p(W,be):(fs=Vp(W),fs.c(),fs.m(Co,null)):fs&&(fs.d(1),fs=null),(!Ae||be[0]&131072)&&le(Us,"animate-spin",W[17]),(!Ae||be[0]&16777216)&&qr!==(qr=W[24]("common.refresh")+"")&&k(Pi,qr),(!Ae||be[0]&131072)&&(Ns.disabled=W[17]),(!Ae||be[0]&16777216)&&Hr!==(Hr=W[24]("logs.export")+"")&&k(Li,Hr),W[23]>0?cs?cs.p(W,be):(cs=Jp(W),cs.c(),cs.m(sl,null)):cs&&(cs.d(1),cs=null),(!Ae||be[0]&16777216)&&Lr!==(Lr=W[24]("logs.filters")+"")&&k(Bi,Lr),W[2]||W[3]||W[4]!==void 0||W[5]||W[8]!=="recent"||W[9]!==1||W[6]!=="timestamp"||W[7]!=="desc"?ds?ds.p(W,be):(ds=Wp(W),ds.c(),ds.m(js,null)):ds&&(ds.d(1),ds=null),(!Ae||be[0]&1020&&Dr!==(Dr="btn btn-sm "+(W[2]||W[3]||W[4]!==void 0||W[5]||W[8]!=="recent"||W[9]!==1||W[6]!=="timestamp"||W[7]!=="desc"?"btn-primary":"btn-ghost")+" gap-1"))&&o(js,"class",Dr),(!Ae||be[0]&16777216)&&Ar!==(Ar=W[24]("logs.method")+"")&&k(Ai,Ar),(!Ae||be[0]&16777216)&&Or!==(Or=W[24]("logs.allMethods")+"")&&k(Oi,Or),be[0]&4&&kt(Es,W[2]),(!Ae||be[0]&16777216)&&Nr!==(Nr=W[24]("logs.status")+"")&&k(Fi,Nr),be[0]&8&&oo.value!==W[3]&&Q(oo,W[3]),(!Ae||be[0]&16777216)&&Jr!==(Jr=W[24]("logs.result")+"")&&k(zi,Jr),(!Ae||be[0]&16777216)&&Wr!==(Wr=W[24]("logs.allResults")+"")&&k(Ni,Wr),(!Ae||be[0]&16777216)&&Gr!==(Gr=W[24]("logs.success")+"")&&k(Ui,Gr),(!Ae||be[0]&16777216)&&Kr!==(Kr=W[24]("logs.failed")+"")&&k(Vi,Kr),be[0]&16&&kt(Vs,W[4]),(!Ae||be[0]&16777216)&&Zr!==(Zr=W[24]("logs.requestTypeFilter")+"")&&k(Wi,Zr),(!Ae||be[0]&16777216)&&Xr!==(Xr=W[24]("logs.requestType_all")+"")&&k(Gi,Xr),(!Ae||be[0]&16777216)&&xr!==(xr=W[24]("logs.requestType_final")+"")&&k(Ki,xr),(!Ae||be[0]&16777216)&&$r!==($r=W[24]("logs.requestType_retry")+"")&&k(Qi,$r),(!Ae||be[0]&16777216)&&ea!==(ea=W[24]("logs.requestType_recovery")+"")&&k(Yi,ea),be[0]&32&&kt(Bs,W[5]),(!Ae||be[0]&16777216)&&sa!==(sa=W[24]("logs.timeRange")+"")&&k(Zi,sa),(!Ae||be[0]&16777216)&&oa!==(oa=W[24]("logs.allTime")+"")&&k(Xi,oa),(!Ae||be[0]&16777216)&&na!==(na=W[24]("logs.recentTime")+"")&&k(xi,na),(!Ae||be[0]&16777216)&&ra!==(ra=W[24]("logs.customTime")+"")&&k($i,ra),be[0]&256&&kt(Js,W[8]),W[8]==="recent"?ps?ps.p(W,be):(ps=Gp(W),ps.c(),ps.m(dl,eu)):ps&&(ps.d(1),ps=null),W[8]==="custom"?hs?hs.p(W,be):(hs=Kp(W),hs.c(),hs.m(dl,tu)):hs&&(hs.d(1),hs=null),(!Ae||be[0]&16777216)&&ua!==(ua=W[24]("logs.sortBy")+"")&&k(su,ua),(!Ae||be[0]&16777216)&&fa!==(fa=W[24]("logs.sortByTimestamp")+"")&&k(ou,fa),(!Ae||be[0]&16777216)&&ca!==(ca=W[24]("logs.sortByDuration")+"")&&k(nu,ca),(!Ae||be[0]&16777216)&&da!==(da=W[24]("logs.sortByStatus")+"")&&k(ru,da),be[0]&64&&kt(Ws,W[6]),(!Ae||be[0]&16777216)&&pa!==(pa=W[24]("logs.desc")+"")&&k(au,pa),(!Ae||be[0]&16777216)&&ha!==(ha=W[24]("logs.asc")+"")&&k(iu,ha),be[0]&128&&kt(no,W[7]),(!Ae||be[0]&131072)&&le(Gs,"animate-spin",W[17]),(!Ae||be[0]&16777216)&&ma!==(ma=W[24]("common.refresh")+"")&&k(uu,ma),(!Ae||be[0]&16777216)&&ba!==(ba=W[24]("logs.autoRefresh")+"")&&k(fu,ba),be[0]&4096&&(To.checked=W[12]),W[12]?ms?ms.p(W,be):(ms=Qp(W),ms.c(),ms.m(os,cu)):ms&&(ms.d(1),ms=null),(!Ae||be[0]&131072)&&le(Qs,"animate-spin",W[17]),(!Ae||be[0]&16777216)&&va!==(va=W[24]("common.refresh")+"")&&k(pu,va),(!Ae||be[0]&131072)&&(Ks.disabled=W[17]),W[21]>0?gs?gs.p(W,be):(gs=Yp(W),gs.c(),gs.m(os,null)):gs&&(gs.d(1),gs=null),(!Ae||be[0]&16777216)&&ka!==(ka=W[24]("logs.export")+"")&&k(hu,ka),W[23]>0?_s?_s.p(W,be):(_s=Zp(W),_s.c(),_s.m(Is,null)):_s&&(_s.d(1),_s=null),(!Ae||be[0]&16777216)&&Ea!==(Ea=W[24]("logs.actions")+"")&&k(_u,Ea),W[2]||W[3]||W[4]!==void 0||W[5]||W[8]!=="recent"||W[9]!==1||W[6]!=="timestamp"||W[7]!=="desc"||W[12]?qs||(qs=Xp(),qs.c(),qs.m(As,null)):qs&&(qs.d(1),qs=null),(!Ae||be[0]&16777216)&&Ma!==(Ma=W[24]("logs.filters")+"")&&k(bu,Ma),(!Ae||be[0]&16777216)&&qa!==(qa=W[24]("logs.method")+"")&&k(vu,qa),(!Ae||be[0]&16777216)&&Ha!==(Ha=W[24]("logs.allMethods")+"")&&k(ku,Ha),be[0]&4&&kt(Ts,W[2]),(!Ae||be[0]&16777216)&&La!==(La=W[24]("logs.status")+"")&&k(wu,La),be[0]&8&&ro.value!==W[3]&&Q(ro,W[3]),(!Ae||be[0]&16777216)&&Ba!==(Ba=W[24]("logs.result")+"")&&k(yu,Ba),(!Ae||be[0]&16777216)&&Aa!==(Aa=W[24]("logs.allResults")+"")&&k(Cu,Aa),(!Ae||be[0]&16777216)&&Oa!==(Oa=W[24]("logs.success")+"")&&k(Eu,Oa),(!Ae||be[0]&16777216)&&Fa!==(Fa=W[24]("logs.failed")+"")&&k(Tu,Fa),be[0]&16&&kt(Ys,W[4]),(!Ae||be[0]&16777216)&&Ua!==(Ua=W[24]("logs.requestTypeFilter")+"")&&k(Mu,Ua),(!Ae||be[0]&16777216)&&Va!==(Va=W[24]("logs.requestType_all")+"")&&k(Su,Va),(!Ae||be[0]&16777216)&&Ja!==(Ja=W[24]("logs.requestType_final")+"")&&k(Ru,Ja),(!Ae||be[0]&16777216)&&Wa!==(Wa=W[24]("logs.requestType_retry")+"")&&k(qu,Wa),(!Ae||be[0]&16777216)&&Ga!==(Ga=W[24]("logs.requestType_recovery")+"")&&k(Hu,Ga),be[0]&32&&kt(Os,W[5]),(!Ae||be[0]&16777216)&&Ya!==(Ya=W[24]("logs.timeRange")+"")&&k(Pu,Ya),(!Ae||be[0]&16777216)&&Za!==(Za=W[24]("logs.allTime")+"")&&k(ju,Za),(!Ae||be[0]&16777216)&&Xa!==(Xa=W[24]("logs.recentTime")+"")&&k(Lu,Xa),(!Ae||be[0]&16777216)&&xa!==(xa=W[24]("logs.customTime")+"")&&k(Du,xa),be[0]&256&&kt(Zs,W[8]),W[8]==="recent"?bs?bs.p(W,be):(bs=xp(W),bs.c(),bs.m(qt,Iu)):bs&&(bs.d(1),bs=null),W[8]==="custom"?vs?vs.p(W,be):(vs=$p(W),vs.c(),vs.m(qt,Bu)):vs&&(vs.d(1),vs=null),(!Ae||be[0]&16777216)&&ti!==(ti=W[24]("logs.sortBy")+"")&&k(Au,ti),(!Ae||be[0]&16777216)&&li!==(li=W[24]("logs.sortByTimestamp")+"")&&k(Ou,li),(!Ae||be[0]&16777216)&&si!==(si=W[24]("logs.sortByDuration")+"")&&k(Fu,si),(!Ae||be[0]&16777216)&&oi!==(oi=W[24]("logs.sortByStatus")+"")&&k(zu,oi),be[0]&64&&kt(Xs,W[6]),(!Ae||be[0]&16777216)&&ni!==(ni=W[24]("logs.desc")+"")&&k(Nu,ni),(!Ae||be[0]&16777216)&&ri!==(ri=W[24]("logs.asc")+"")&&k(Uu,ri),be[0]&128&&kt(ao,W[7]),(!Ae||be[0]&16777216)&&ii!==(ii=W[24]("common.refresh")+"")&&k(Ju,ii),(!Ae||be[0]&16777216)&&ci!==(ci=W[24]("logs.autoRefresh")+"")&&k(Wu,ci),be[0]&4096&&(Mo.checked=W[12]),W[12]?ks?ks.p(W,be):(ks=e0(W),ks.c(),ks.m(qt,Gu)):ks&&(ks.d(1),ks=null),(!Ae||be[0]&131072)&&le($s,"animate-spin",W[17]),(!Ae||be[0]&16777216)&&di!==(di=W[24]("common.refresh")+"")&&k(Ku,di),(!Ae||be[0]&131072)&&(xs.disabled=W[17]),W[23]>0?ws?ws.p(W,be):(ws=t0(W),ws.c(),ws.m(qt,null)):ws&&(ws.d(1),ws=null),W[23]>0?ys?ys.p(W,be):(ys=l0(W),ys.c(),ys.m(f,null)):ys&&(ys.d(1),ys=null),pi===(pi=D1(W))&&eo?eo.p(W,be):(eo.d(1),eo=pi(W),eo&&(eo.c(),eo.m(l,null))),W[20]&&W[19]?Ol?(Ol.p(W,be),be[0]&1572864&&et(Ol,1)):(Ol=p0(W),Ol.c(),et(Ol,1),Ol.m(dr.parentNode,dr)):Ol&&(Gl(),st(Ol,1,1,()=>{Ol=null}),Kl())},i(W){Ae||(et(Ol),Ae=!0)},o(W){st(Ol),Ae=!1},d(W){W&&(P(l),P(Yu),P(dr)),ns&&ns.d(),Ms&&Ms.d(),Ss&&Ss.d(),Rs&&Rs.d(),rs&&rs.d(),as&&as.d(),is&&is.d(),us&&us.d(),fs&&fs.d(),cs&&cs.d(),ds&&ds.d(),ps&&ps.d(),hs&&hs.d(),ms&&ms.d(),gs&&gs.d(),_s&&_s.d(),qs&&qs.d(),bs&&bs.d(),vs&&vs.d(),ks&&ks.d(),ws&&ws.d(),ys&&ys.d(),eo.d(),Ol&&Ol.d(W),Zu=!1,bt(L1)}}}let or=50;function h0(t){return new Date(t).toLocaleString()}function m0(t){return t<1e3?`${t}ms`:`${(t/1e3).toFixed(2)}s`}function g0(t){return t<300?"badge-success":t<400?"badge-info":t<500?"badge-warning":"badge-error"}function _0(t){return t==="final"?"badge-success":t==="retry"?"badge-warning":t==="recovery"?"badge-info":"badge-ghost"}function _b(t,l,e){let n,r;Dt(t,Rt,rt=>e(24,r=rt));let i=1,u="",c="",f="",d,p="",m="timestamp",g="desc",b="recent",v=1,w="",C="",E=[],y=0,T=0,S=!0,q=null,D=null,H=!1,I=!0,R="30s",L=null,A=0,N=!1;const Z={"5s":5e3,"10s":1e4,"30s":3e4,"60s":6e4};let Y="",x="";async function F(){try{e(17,S=!0),e(18,q=null);const rt={page:i,limit:or,sortBy:m,sortOrder:g};u.trim()&&(rt.searchTerm=u.trim()),c&&(rt.method=c),f&&(rt.status=parseInt(f)),d!==void 0&&(rt.success=d),p&&(rt.requestType=p),b==="recent"?(rt.endTime=Date.now(),rt.startTime=Date.now()-v*60*60*1e3):b==="custom"&&(w&&(rt.startTime=new Date(w).getTime()),C&&(rt.endTime=new Date(C).getTime()));const Mt=await am(rt);e(14,E=Mt.data),e(15,y=Mt.total),e(16,T=Mt.totalPages)}catch(rt){e(18,q=rt.message)}finally{e(17,S=!1)}}async function K(rt){try{const Mt={};u.trim()&&(Mt.searchTerm=u.trim()),c&&(Mt.method=c),f&&(Mt.status=parseInt(f)),d!==void 0&&(Mt.success=d),p&&(Mt.requestType=p),b==="recent"?(Mt.endTime=Date.now(),Mt.startTime=Date.now()-v*60*60*1e3):b==="custom"&&(w&&(Mt.startTime=new Date(w).getTime()),C&&(Mt.endTime=new Date(C).getTime()));const ht=await im(Mt,rt),Tt=URL.createObjectURL(ht),kl=document.createElement("a");kl.href=Tt,kl.download=`access-logs-${Date.now()}.${rt}`,kl.click(),URL.revokeObjectURL(Tt)}catch(Mt){alert(`Export failed: ${Mt.message}`)}}function M(rt){e(19,D=rt),e(20,H=!0)}function B(rt){return rt?r(`logs.requestType_${rt}`):"-"}function U(){e(1,u=""),e(2,c=""),e(3,f=""),e(4,d=void 0),e(5,p=""),e(8,b="recent"),e(9,v=1),e(10,w=""),e(11,C=""),e(6,m="timestamp"),e(7,g="desc"),e(0,i=1)}function O(){return!!(u||c||f||d!==void 0||p)}function J(){if(L&&clearInterval(L),I){const rt=Z[R];L=window.setInterval(()=>{document.visibilityState==="visible"&&(O()?e(22,N=!0):(F(),e(21,A=Date.now()),e(22,N=!1)))},rt)}}function ie(){L&&(clearInterval(L),L=null)}async function ue(){await F(),e(21,A=Date.now()),e(22,N=!1)}function ne(){if(document.visibilityState==="visible"){const rt=Date.now()-A,Mt=Z[R];rt>=Mt&&F(),I&&J()}else ie()}Hs(()=>{localStorage.getItem("logsAdvancedFiltersExpanded");const rt=localStorage.getItem("logsRefreshInterval");rt&&e(13,R=rt);const Mt=localStorage.getItem("logsAutoRefresh");Mt!==null&&e(12,I=Mt==="true"),F(),J(),document.addEventListener("visibilitychange",ne)}),ir(()=>{ie(),document.removeEventListener("visibilitychange",ne)});function $(){u=this.value,e(1,u)}const te=()=>e(2,c=""),re=()=>e(2,c="GET"),ee=()=>e(2,c="POST"),G=()=>e(2,c="PUT"),pe=()=>e(2,c="DELETE"),oe=()=>e(2,c="PATCH");function ge(){f=this.value,e(3,f)}const he=()=>e(4,d=void 0),ye=()=>e(4,d=!0),Fe=()=>e(4,d=!1);function je(){p=pl(this),e(5,p)}function we(){b=pl(this),e(8,b)}function Oe(){v=St(this.value),e(9,v)}function Je(){w=this.value,e(10,w)}function Le(){C=this.value,e(11,C)}function Pe(){m=pl(this),e(6,m)}function Me(){g=pl(this),e(7,g)}function fe(){I=this.checked,e(12,I)}function _e(){R=pl(this),e(13,R)}const Be=()=>K("json"),De=()=>K("csv");function se(){c=pl(this),e(2,c)}function ke(){f=this.value,e(3,f)}function me(){d=pl(this),e(4,d)}function Ee(){p=pl(this),e(5,p)}function Ve(){b=pl(this),e(8,b)}function Ie(){v=St(this.value),e(9,v)}function nt(){w=this.value,e(10,w)}function Ne(){C=this.value,e(11,C)}function Ye(){m=pl(this),e(6,m)}function Qe(){g=pl(this),e(7,g)}function ve(){I=this.checked,e(12,I)}function de(){R=pl(this),e(13,R)}const Te=()=>K("json"),Ze=()=>K("csv");function Se(){c=pl(this),e(2,c)}function Ue(){f=this.value,e(3,f)}function Ce(){d=pl(this),e(4,d)}function mt(){p=pl(this),e(5,p)}function Ge(){b=pl(this),e(8,b)}function ce(){v=St(this.value),e(9,v)}function qe(){w=this.value,e(10,w)}function Re(){C=this.value,e(11,C)}function dt(){m=pl(this),e(6,m)}function We(){g=pl(this),e(7,g)}function z(){I=this.checked,e(12,I)}function He(){R=pl(this),e(13,R)}const X=()=>K("json"),ft=()=>K("csv"),Ht=()=>e(1,u=""),Ke=()=>e(2,c=""),_t=()=>e(3,f=""),lt=()=>e(4,d=void 0),it=()=>e(5,p=""),ze=()=>e(9,v=1),Xe=()=>{e(8,b="recent"),e(10,w=""),e(11,C="")},Bt=()=>e(8,b="recent"),at=()=>{e(6,m="timestamp"),e(7,g="desc")},gt=rt=>M(rt),wt=()=>e(0,i=i-1),pt=()=>e(0,i=i+1),vl=()=>{e(20,H=!1),e(19,D=null)};return t.$$.update=()=>{if(t.$$.dirty[0]&4096&&(I?J():ie()),t.$$.dirty[0]&12288&&(localStorage.setItem("logsRefreshInterval",R),localStorage.setItem("logsAutoRefresh",String(I))),t.$$.dirty[0]&1022&&e(23,n=[u.trim(),c,f,d!==void 0,p,b!=="all"&&b!=="recent"||v!==1,m!=="timestamp"||g!=="desc"].filter(Boolean).length),t.$$.dirty[0]&1073742846){const rt=JSON.stringify({limit:or,searchTerm:u,method:c,statusFilter:f,successFilter:d,requestTypeFilter:p,sortBy:m,sortOrder:g,timeRangeType:b,recentHours:v});Y&&rt!==Y&&e(0,i=1),e(30,Y=rt)}if(t.$$.dirty[0]&3328|t.$$.dirty[1]&1){const rt=JSON.stringify({customStartTime:w,customEndTime:C});b==="custom"&&x&&rt!==x&&e(0,i=1),e(31,x=rt)}t.$$.dirty[0]&4095&&F()},[i,u,c,f,d,p,m,g,b,v,w,C,I,R,E,y,T,S,q,D,H,A,N,n,r,K,M,B,U,ue,Y,x,$,te,re,ee,G,pe,oe,ge,he,ye,Fe,je,we,Oe,Je,Le,Pe,Me,fe,_e,Be,De,se,ke,me,Ee,Ve,Ie,nt,Ne,Ye,Qe,ve,de,Te,Ze,Se,Ue,Ce,mt,Ge,ce,qe,Re,dt,We,z,He,X,ft,Ht,Ke,_t,lt,it,ze,Xe,Bt,at,gt,wt,pt,vl]}class bb extends Vt{constructor(l){super(),Ut(this,l,_b,gb,At,{},null,[-1,-1,-1,-1])}}async function vb(t){return Cl.post("/auth/login",{token:t})}function b0(t){let l,e,n;return{c(){l=a("div"),e=a("span"),n=_(t[2]),o(e,"class","label-text-alt text-error"),o(l,"class","label")},m(r,i){j(r,l,i),s(l,e),s(e,n)},p(r,i){i&4&&k(n,r[2])},d(r){r&&P(l)}}}function kb(t){let l,e,n,r,i,u,c,f,d=t[3]("login.title")+"",p,m,g,b=t[3]("login.subtitle")+"",v,w,C,E,y,T=t[3]("login.token")+"",S,q,D,H,I,R,L,A,N=(t[1]?t[3]("login.loggingIn"):t[3]("login.submit"))+"",Z,Y,x,F,K,M=t[2]&&b0(t);return{c(){l=a("div"),e=a("div"),n=a("div"),r=a("div"),i=ae("svg"),u=ae("path"),c=h(),f=a("h1"),p=_(d),m=h(),g=a("p"),v=_(b),w=h(),C=a("div"),E=a("label"),y=a("span"),S=_(T),q=h(),D=a("input"),I=h(),M&&M.c(),R=h(),L=a("div"),A=a("button"),Z=_(N),Y=h(),x=a("div"),x.textContent="Bungee Reverse Proxy",o(u,"stroke-linecap","round"),o(u,"stroke-linejoin","round"),o(u,"stroke-width","2"),o(u,"d","M13 10V3L4 14h7v7l9-11h-7z"),o(i,"xmlns","http://www.w3.org/2000/svg"),o(i,"class","h-16 w-16 text-primary mb-4"),o(i,"fill","none"),o(i,"viewBox","0 0 24 24"),o(i,"stroke","currentColor"),o(f,"class","text-3xl font-bold text-center"),o(g,"class","text-sm text-base-content/60 text-center mt-2"),o(r,"class","flex flex-col items-center mb-6"),o(y,"class","label-text"),o(E,"class","label"),o(E,"for","token-input"),o(D,"id","token-input"),o(D,"type","password"),o(D,"placeholder",H=t[3]("login.tokenPlaceholder")),o(D,"class","input input-bordered w-full"),D.disabled=t[1],o(D,"autocomplete","off"),le(D,"input-error",!!t[2]),o(C,"class","form-control w-full"),o(A,"class","btn btn-primary"),A.disabled=t[1],le(A,"loading",t[1]),o(L,"class","form-control mt-6"),o(x,"class","divider text-xs opacity-50 mt-6"),o(n,"class","card-body"),o(e,"class","card w-full max-w-md bg-base-100 shadow-2xl svelte-1qok2wg"),o(l,"class","min-h-screen bg-base-200 flex items-center justify-center p-4")},m(B,U){j(B,l,U),s(l,e),s(e,n),s(n,r),s(r,i),s(i,u),s(r,c),s(r,f),s(f,p),s(r,m),s(r,g),s(g,v),s(n,w),s(n,C),s(C,E),s(E,y),s(y,S),s(C,q),s(C,D),Q(D,t[0]),s(C,I),M&&M.m(C,null),s(n,R),s(n,L),s(L,A),s(A,Z),s(n,Y),s(n,x),F||(K=[V(D,"input",t[6]),V(D,"keypress",t[5]),V(A,"click",t[4])],F=!0)},p(B,[U]){U&8&&d!==(d=B[3]("login.title")+"")&&k(p,d),U&8&&b!==(b=B[3]("login.subtitle")+"")&&k(v,b),U&8&&T!==(T=B[3]("login.token")+"")&&k(S,T),U&8&&H!==(H=B[3]("login.tokenPlaceholder"))&&o(D,"placeholder",H),U&2&&(D.disabled=B[1]),U&1&&D.value!==B[0]&&Q(D,B[0]),U&4&&le(D,"input-error",!!B[2]),B[2]?M?M.p(B,U):(M=b0(B),M.c(),M.m(C,null)):M&&(M.d(1),M=null),U&10&&N!==(N=(B[1]?B[3]("login.loggingIn"):B[3]("login.submit"))+"")&&k(Z,N),U&2&&(A.disabled=B[1]),U&2&&le(A,"loading",B[1])},i:tt,o:tt,d(B){B&&P(l),M&&M.d(),F=!1,bt(K)}}}function wb(t,l,e){let n;Dt(t,Rt,p=>e(3,n=p));let r="",i=!1,u="";async function c(){if(!r.trim()){e(2,u=n("login.required"));return}e(1,i=!0),e(2,u="");try{const p=await vb(r);p.success?(bh(r),Lt.show(n("login.success"),"success"),window.location.hash="#/"):e(2,u=p.error||n("login.unauthorized"))}catch(p){e(2,u=n("login.failed",{values:{error:p.message}}))}finally{e(1,i=!1)}}function f(p){p.key==="Enter"&&!i&&c()}function d(){r=this.value,e(0,r)}return[r,i,u,n,c,f,d]}class yb extends Vt{constructor(l){super(),Ut(this,l,wb,kb,At,{})}}function Cb(t){let l,e,n=t[0]("notFound.title")+"",r,i,u,c=t[0]("notFound.message")+"",f,d,p,m=t[0]("notFound.goHome")+"",g;return{c(){l=a("div"),e=a("h1"),r=_(n),i=h(),u=a("p"),f=_(c),d=h(),p=a("a"),g=_(m),o(e,"class","text-6xl font-bold mb-4"),o(u,"class","text-2xl mb-8"),o(p,"href","/__ui/#/"),o(p,"class","btn btn-primary"),o(l,"class","flex flex-col items-center justify-center h-screen")},m(b,v){j(b,l,v),s(l,e),s(e,r),s(l,i),s(l,u),s(u,f),s(l,d),s(l,p),s(p,g)},p(b,[v]){v&1&&n!==(n=b[0]("notFound.title")+"")&&k(r,n),v&1&&c!==(c=b[0]("notFound.message")+"")&&k(f,c),v&1&&m!==(m=b[0]("notFound.goHome")+"")&&k(g,m)},i:tt,o:tt,d(b){b&&P(l)}}}function Eb(t,l,e){let n;return Dt(t,Rt,r=>e(0,n=r)),[n]}class Tb extends Vt{constructor(l){super(),Ut(this,l,Eb,Cb,At,{})}}function v0(t,l,e){const n=t.slice();return n[3]=l[e],n}function k0(t,l){let e,n,r;function i(){return l[2](l[3])}return n=new cg({props:{message:l[3].message,type:l[3].type,duration:l[3].duration}}),n.$on("close",i),{key:t,first:null,c(){e=Ul(),Et(n.$$.fragment),this.first=e},m(u,c){j(u,e,c),yt(n,u,c),r=!0},p(u,c){l=u;const f={};c&1&&(f.message=l[3].message),c&1&&(f.type=l[3].type),c&1&&(f.duration=l[3].duration),n.$set(f)},i(u){r||(et(n.$$.fragment,u),r=!0)},o(u){st(n.$$.fragment,u),r=!1},d(u){u&&P(e),Ct(n,u)}}}function Mb(t){let l=[],e=new Map,n,r,i=ut(t[0]);const u=c=>c[3].id;for(let c=0;c<i.length;c+=1){let f=v0(t,i,c),d=u(f);e.set(d,l[c]=k0(d,f))}return{c(){for(let c=0;c<l.length;c+=1)l[c].c();n=Ul()},m(c,f){for(let d=0;d<l.length;d+=1)l[d]&&l[d].m(c,f);j(c,n,f),r=!0},p(c,[f]){f&3&&(i=ut(c[0]),Gl(),l=ff(l,f,u,1,c,i,e,n.parentNode,w2,k0,n,v0),Kl())},i(c){if(!r){for(let f=0;f<i.length;f+=1)et(l[f]);r=!0}},o(c){for(let f=0;f<l.length;f+=1)st(l[f]);r=!1},d(c){c&&P(n);for(let f=0;f<l.length;f+=1)l[f].d(c)}}}function Sb(t,l,e){let n;Dt(t,Lt,u=>e(0,n=u));function r(u){Lt.remove(u)}return[n,r,u=>r(u.id)]}class Rb extends Vt{constructor(l){super(),Ut(this,l,Sb,Mb,At,{})}}function w0(t,l,e){const n=t.slice();return n[11]=l[e],n}function qb(t){let l,e,n,r,i,u,c,f,d,p,m,g,b=t[0]("nav.dashboard")+"",v,w,C,E,y,T,S,q,D=t[0]("nav.routes")+"",H,I,R,L,A,N,Z,Y,x=t[0]("nav.logs")+"",F,K,M,B,U,O,J,ie,ue,ne=t[0]("nav.configuration")+"",$,te,re,ee,G,pe,oe,ge,he=mi.find(t[8])?.name+"",ye,Fe,je,we,Oe,Je,Le,Pe,Me,fe=ut(mi),_e=[];for(let me=0;me<fe.length;me+=1)_e[me]=y0(w0(t,fe,me));let Be=t[4]&&t[5]&&C0(t);const De=[Ob,Ab,Bb,Ib,Db,Lb,jb,Pb],se=[];function ke(me,Ee){return Ee&2&&(Je=null),me[1]==="/login"?0:me[1]==="/"?1:me[1]==="/routes"?2:(Je==null&&(Je=!!me[1].startsWith("/routes/edit/")),Je?3:me[1]==="/routes/new"?4:me[1]==="/logs"?5:me[1]==="/config"?6:7)}return Le=ke(t,-1),Pe=se[Le]=De[Le](t),{c(){l=a("div"),e=a("div"),n=a("div"),n.innerHTML=\'<a href="/__ui/#/" class="flex items-center gap-2 px-4 py-2 hover:bg-base-200 rounded-lg transition-colors"><svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8 text-primary" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path></svg> <div class="flex flex-col"><span class="text-xl font-bold">Bungee</span> <span class="text-xs text-base-content/60">Reverse Proxy</span></div></a>\',r=h(),i=a("div"),u=a("ul"),c=a("li"),f=a("a"),d=ae("svg"),p=ae("path"),m=h(),g=a("span"),v=_(b),w=h(),C=a("li"),E=a("a"),y=ae("svg"),T=ae("path"),S=h(),q=a("span"),H=_(D),I=h(),R=a("li"),L=a("a"),A=ae("svg"),N=ae("path"),Z=h(),Y=a("span"),F=_(x),K=h(),M=a("li"),B=a("a"),U=ae("svg"),O=ae("path"),J=ae("path"),ie=h(),ue=a("span"),$=_(ne),te=h(),re=a("div"),ee=a("div"),G=ae("svg"),pe=ae("path"),oe=h(),ge=a("span"),ye=_(he),Fe=h(),je=a("ul");for(let me=0;me<_e.length;me+=1)_e[me].c();we=h(),Be&&Be.c(),Oe=h(),Pe.c(),o(n,"class","flex-1"),o(p,"stroke-linecap","round"),o(p,"stroke-linejoin","round"),o(p,"stroke-width","2"),o(p,"d","M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"),o(d,"xmlns","http://www.w3.org/2000/svg"),o(d,"class","h-4 w-4"),o(d,"fill","none"),o(d,"viewBox","0 0 24 24"),o(d,"stroke","currentColor"),o(f,"href","/__ui/#/"),o(f,"class","flex items-center gap-2 svelte-1fgps4v"),le(f,"active",t[1]==="/"),o(T,"stroke-linecap","round"),o(T,"stroke-linejoin","round"),o(T,"stroke-width","2"),o(T,"d","M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7"),o(y,"xmlns","http://www.w3.org/2000/svg"),o(y,"class","h-4 w-4"),o(y,"fill","none"),o(y,"viewBox","0 0 24 24"),o(y,"stroke","currentColor"),o(E,"href","/__ui/#/routes"),o(E,"class","flex items-center gap-2 svelte-1fgps4v"),le(E,"active",t[1].startsWith("/routes")),o(N,"stroke-linecap","round"),o(N,"stroke-linejoin","round"),o(N,"stroke-width","2"),o(N,"d","M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"),o(A,"xmlns","http://www.w3.org/2000/svg"),o(A,"class","h-4 w-4"),o(A,"fill","none"),o(A,"viewBox","0 0 24 24"),o(A,"stroke","currentColor"),o(L,"href","/__ui/#/logs"),o(L,"class","flex items-center gap-2 svelte-1fgps4v"),le(L,"active",t[1]==="/logs"),o(O,"stroke-linecap","round"),o(O,"stroke-linejoin","round"),o(O,"stroke-width","2"),o(O,"d","M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"),o(J,"stroke-linecap","round"),o(J,"stroke-linejoin","round"),o(J,"stroke-width","2"),o(J,"d","M15 12a3 3 0 11-6 0 3 3 0 016 0z"),o(U,"xmlns","http://www.w3.org/2000/svg"),o(U,"class","h-4 w-4"),o(U,"fill","none"),o(U,"viewBox","0 0 24 24"),o(U,"stroke","currentColor"),o(B,"href","/__ui/#/config"),o(B,"class","flex items-center gap-2 svelte-1fgps4v"),le(B,"active",t[1]==="/config"),o(u,"class","menu menu-horizontal px-1 gap-1"),o(pe,"stroke-linecap","round"),o(pe,"stroke-linejoin","round"),o(pe,"stroke-width","2"),o(pe,"d","M3 5h12M9 3v2m1.048 9.5A18.022 18.022 0 016.412 9m6.088 9h7M11 21l5-10 5 10M12.751 5C11.783 10.77 8.07 15.61 3 18.129"),o(G,"xmlns","http://www.w3.org/2000/svg"),o(G,"class","h-4 w-4"),o(G,"fill","none"),o(G,"viewBox","0 0 24 24"),o(G,"stroke","currentColor"),o(ge,"class","text-xs"),o(ee,"role","button"),o(ee,"tabindex","0"),o(ee,"class","btn btn-ghost btn-sm gap-1"),o(je,"role","menu"),o(je,"tabindex","0"),o(je,"class","dropdown-content z-[1] menu p-2 shadow bg-base-100 rounded-box w-32 mt-2 gap-1"),o(re,"class","dropdown dropdown-end mx-2"),o(i,"class","flex-none"),o(e,"class","navbar bg-base-100 shadow-lg sticky top-0 z-50"),o(l,"class","min-h-screen bg-base-200")},m(me,Ee){j(me,l,Ee),s(l,e),s(e,n),s(e,r),s(e,i),s(i,u),s(u,c),s(c,f),s(f,d),s(d,p),s(f,m),s(f,g),s(g,v),s(u,w),s(u,C),s(C,E),s(E,y),s(y,T),s(E,S),s(E,q),s(q,H),s(u,I),s(u,R),s(R,L),s(L,A),s(A,N),s(L,Z),s(L,Y),s(Y,F),s(u,K),s(u,M),s(M,B),s(B,U),s(U,O),s(U,J),s(B,ie),s(B,ue),s(ue,$),s(i,te),s(i,re),s(re,ee),s(ee,G),s(G,pe),s(ee,oe),s(ee,ge),s(ge,ye),s(re,Fe),s(re,je);for(let Ve=0;Ve<_e.length;Ve+=1)_e[Ve]&&_e[Ve].m(je,null);s(i,we),Be&&Be.m(i,null),s(l,Oe),se[Le].m(l,null),Me=!0},p(me,Ee){if((!Me||Ee&1)&&b!==(b=me[0]("nav.dashboard")+"")&&k(v,b),(!Me||Ee&2)&&le(f,"active",me[1]==="/"),(!Me||Ee&1)&&D!==(D=me[0]("nav.routes")+"")&&k(H,D),(!Me||Ee&2)&&le(E,"active",me[1].startsWith("/routes")),(!Me||Ee&1)&&x!==(x=me[0]("nav.logs")+"")&&k(F,x),(!Me||Ee&2)&&le(L,"active",me[1]==="/logs"),(!Me||Ee&1)&&ne!==(ne=me[0]("nav.configuration")+"")&&k($,ne),(!Me||Ee&2)&&le(B,"active",me[1]==="/config"),(!Me||Ee&8)&&he!==(he=mi.find(me[8])?.name+"")&&k(ye,he),Ee&72){fe=ut(mi);let Ie;for(Ie=0;Ie<fe.length;Ie+=1){const nt=w0(me,fe,Ie);_e[Ie]?_e[Ie].p(nt,Ee):(_e[Ie]=y0(nt),_e[Ie].c(),_e[Ie].m(je,null))}for(;Ie<_e.length;Ie+=1)_e[Ie].d(1);_e.length=fe.length}me[4]&&me[5]?Be?Be.p(me,Ee):(Be=C0(me),Be.c(),Be.m(i,null)):Be&&(Be.d(1),Be=null);let Ve=Le;Le=ke(me,Ee),Le===Ve?se[Le].p(me,Ee):(Gl(),st(se[Ve],1,1,()=>{se[Ve]=null}),Kl(),Pe=se[Le],Pe?Pe.p(me,Ee):(Pe=se[Le]=De[Le](me),Pe.c()),et(Pe,1),Pe.m(l,null))},i(me){Me||(et(Pe),Me=!0)},o(me){st(Pe),Me=!1},d(me){me&&P(l),Gt(_e,me),Be&&Be.d(),se[Le].d()}}}function Hb(t){let l;return{c(){l=a("div"),l.innerHTML=\'<div class="flex flex-col items-center gap-4"><span class="loading loading-spinner loading-lg"></span> <p class="text-base-content/60">Loading...</p></div>\',o(l,"class","min-h-screen bg-base-200 flex items-center justify-center")},m(e,n){j(e,l,n)},p:tt,i:tt,o:tt,d(e){e&&P(l)}}}function y0(t){let l,e,n,r,i;function u(){return t[9](t[11])}return{c(){l=a("li"),e=a("button"),e.textContent=`${t[11].name}`,n=h(),o(e,"class","svelte-1fgps4v"),le(e,"active",t[3]===t[11].code)},m(c,f){j(c,l,f),s(l,e),s(l,n),r||(i=V(e,"click",u),r=!0)},p(c,f){t=c,f&8&&le(e,"active",t[3]===t[11].code)},d(c){c&&P(l),r=!1,i()}}}function C0(t){let l,e,n,r,i,u,c=t[0]("login.logout")+"",f,d,p;return{c(){l=a("div"),e=a("button"),n=ae("svg"),r=ae("path"),i=h(),u=a("span"),f=_(c),o(r,"stroke-linecap","round"),o(r,"stroke-linejoin","round"),o(r,"stroke-width","2"),o(r,"d","M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"),o(n,"xmlns","http://www.w3.org/2000/svg"),o(n,"class","h-4 w-4"),o(n,"fill","none"),o(n,"viewBox","0 0 24 24"),o(n,"stroke","currentColor"),o(u,"class","text-xs hidden md:inline"),o(e,"class","btn btn-ghost btn-sm gap-1"),o(l,"class","mx-2")},m(m,g){j(m,l,g),s(l,e),s(e,n),s(n,r),s(e,i),s(e,u),s(u,f),d||(p=V(e,"click",t[7]),d=!0)},p(m,g){g&1&&c!==(c=m[0]("login.logout")+"")&&k(f,c)},d(m){m&&P(l),d=!1,p()}}}function Pb(t){let l,e;return l=new Tb({}),{c(){Et(l.$$.fragment)},m(n,r){yt(l,n,r),e=!0},p:tt,i(n){e||(et(l.$$.fragment,n),e=!0)},o(n){st(l.$$.fragment,n),e=!1},d(n){Ct(l,n)}}}function jb(t){let l,e;return l=new Pm({}),{c(){Et(l.$$.fragment)},m(n,r){yt(l,n,r),e=!0},p:tt,i(n){e||(et(l.$$.fragment,n),e=!0)},o(n){st(l.$$.fragment,n),e=!1},d(n){Ct(l,n)}}}function Lb(t){let l,e;return l=new bb({}),{c(){Et(l.$$.fragment)},m(n,r){yt(l,n,r),e=!0},p:tt,i(n){e||(et(l.$$.fragment,n),e=!0)},o(n){st(l.$$.fragment,n),e=!1},d(n){Ct(l,n)}}}function Db(t){let l,e;return l=new o2({props:{params:{}}}),{c(){Et(l.$$.fragment)},m(n,r){yt(l,n,r),e=!0},p:tt,i(n){e||(et(l.$$.fragment,n),e=!0)},o(n){st(l.$$.fragment,n),e=!1},d(n){Ct(l,n)}}}function Ib(t){let l,e;return l=new o2({props:{params:{path:t[1].replace("/routes/edit/","")}}}),{c(){Et(l.$$.fragment)},m(n,r){yt(l,n,r),e=!0},p(n,r){const i={};r&2&&(i.params={path:n[1].replace("/routes/edit/","")}),l.$set(i)},i(n){e||(et(l.$$.fragment,n),e=!0)},o(n){st(l.$$.fragment,n),e=!1},d(n){Ct(l,n)}}}function Bb(t){let l,e;return l=new eg({}),{c(){Et(l.$$.fragment)},m(n,r){yt(l,n,r),e=!0},p:tt,i(n){e||(et(l.$$.fragment,n),e=!0)},o(n){st(l.$$.fragment,n),e=!1},d(n){Ct(l,n)}}}function Ab(t){let l,e;return l=new lm({}),{c(){Et(l.$$.fragment)},m(n,r){yt(l,n,r),e=!0},p:tt,i(n){e||(et(l.$$.fragment,n),e=!0)},o(n){st(l.$$.fragment,n),e=!1},d(n){Ct(l,n)}}}function Ob(t){let l,e;return l=new yb({}),{c(){Et(l.$$.fragment)},m(n,r){yt(l,n,r),e=!0},p:tt,i(n){e||(et(l.$$.fragment,n),e=!0)},o(n){st(l.$$.fragment,n),e=!1},d(n){Ct(l,n)}}}function Fb(t){let l,e,n,r,i;const u=[Hb,qb],c=[];function f(d,p){return d[2]?0:1}return l=f(t),e=c[l]=u[l](t),r=new Rb({}),{c(){e.c(),n=h(),Et(r.$$.fragment)},m(d,p){c[l].m(d,p),j(d,n,p),yt(r,d,p),i=!0},p(d,[p]){let m=l;l=f(d),l===m?c[l].p(d,p):(Gl(),st(c[m],1,1,()=>{c[m]=null}),Kl(),e=c[l],e?e.p(d,p):(e=c[l]=u[l](d),e.c()),et(e,1),e.m(n.parentNode,n))},i(d){i||(et(e),et(r.$$.fragment,d),i=!0)},o(d){st(e),st(r.$$.fragment,d),i=!1},d(d){d&&P(n),c[l].d(d),Ct(r,d)}}}function zb(t,l,e){let n,r,i,u,c,f;Dt(t,Rt,b=>e(0,n=b)),Dt(t,E2,b=>e(1,r=b)),Dt(t,ki,b=>e(2,i=b)),Dt(t,yo,b=>e(3,u=b)),Dt(t,J1,b=>e(4,c=b)),Dt(t,Ti,b=>e(5,f=b));function d(b){hh(b)}Hs(async()=>{try{const v=(await hf()).auth?.enabled||!1;if(J1.set(v),v){const w=G0();Ti.set(!!w),!w&&r!=="/login"&&(window.location.hash="#/login")}}catch(b){console.error("Failed to check auth status:",b)}});function p(){confirm(n("login.logoutConfirm"))&&(W0(),window.location.hash="#/login")}return[n,r,i,u,c,f,d,p,b=>b.code===u,b=>d(b.code)]}class Xb extends Vt{constructor(l){super(),Ut(this,l,zb,Fb,At,{})}}export{Xb as A,Vt as S,ir as a,Qb as b,wr as c,Jb as d,P as e,j as f,a as g,Gb as h,Ut as i,Kb as j,Wb as k,V as l,bl as m,tt as n,Hs as o,Rl as p,Ct as q,et as r,At as s,st as t,Yb as u,Zb as v,Sl as w,yt as x,Et as y};\n',
21253
+ "index-m5oE-oos.css": "*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: \"\"}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root,[data-theme]{background-color:var(--fallback-b1,oklch(var(--b1)/1));color:var(--fallback-bc,oklch(var(--bc)/1))}@supports not (color: oklch(0% 0 0)){:root{color-scheme:light;--fallback-p: #491eff;--fallback-pc: #d4dbff;--fallback-s: #ff41c7;--fallback-sc: #fff9fc;--fallback-a: #00cfbd;--fallback-ac: #00100d;--fallback-n: #2b3440;--fallback-nc: #d7dde4;--fallback-b1: #ffffff;--fallback-b2: #e5e6e6;--fallback-b3: #e5e6e6;--fallback-bc: #1f2937;--fallback-in: #00b3f0;--fallback-inc: #000000;--fallback-su: #00ca92;--fallback-suc: #000000;--fallback-wa: #ffc22d;--fallback-wac: #000000;--fallback-er: #ff6f70;--fallback-erc: #000000}@media (prefers-color-scheme: dark){:root{color-scheme:dark;--fallback-p: #7582ff;--fallback-pc: #050617;--fallback-s: #ff71cf;--fallback-sc: #190211;--fallback-a: #00c7b5;--fallback-ac: #000e0c;--fallback-n: #2a323c;--fallback-nc: #a6adbb;--fallback-b1: #1d232a;--fallback-b2: #191e24;--fallback-b3: #15191e;--fallback-bc: #a6adbb;--fallback-in: #00b3f0;--fallback-inc: #000000;--fallback-su: #00ca92;--fallback-suc: #000000;--fallback-wa: #ffc22d;--fallback-wac: #000000;--fallback-er: #ff6f70;--fallback-erc: #000000}}}html{-webkit-tap-highlight-color:transparent}*{scrollbar-color:color-mix(in oklch,currentColor 35%,transparent) transparent}*:hover{scrollbar-color:color-mix(in oklch,currentColor 60%,transparent) transparent}:root{color-scheme:light;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 89.824% .06192 275.75;--ac: 15.352% .0368 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 49.12% .3096 275.75;--s: 69.71% .329 342.55;--sc: 98.71% .0106 342.55;--a: 76.76% .184 183.61;--n: 32.1785% .02476 255.701624;--nc: 89.4994% .011585 252.096176;--b1: 100% 0 0;--b2: 96.1151% 0 0;--b3: 92.4169% .00108 197.137559;--bc: 27.8078% .029596 256.847952}@media (prefers-color-scheme: dark){:root{color-scheme:dark;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 13.138% .0392 275.75;--sc: 14.96% .052 342.55;--ac: 14.902% .0334 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 65.69% .196 275.75;--s: 74.8% .26 342.55;--a: 74.51% .167 183.61;--n: 31.3815% .021108 254.139175;--nc: 74.6477% .0216 264.435964;--b1: 25.3267% .015896 252.417568;--b2: 23.2607% .013807 253.100675;--b3: 21.1484% .01165 254.087939;--bc: 74.6477% .0216 264.435964}}[data-theme=light]{color-scheme:light;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 89.824% .06192 275.75;--ac: 15.352% .0368 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 49.12% .3096 275.75;--s: 69.71% .329 342.55;--sc: 98.71% .0106 342.55;--a: 76.76% .184 183.61;--n: 32.1785% .02476 255.701624;--nc: 89.4994% .011585 252.096176;--b1: 100% 0 0;--b2: 96.1151% 0 0;--b3: 92.4169% .00108 197.137559;--bc: 27.8078% .029596 256.847952}[data-theme=dark]{color-scheme:dark;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 13.138% .0392 275.75;--sc: 14.96% .052 342.55;--ac: 14.902% .0334 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 65.69% .196 275.75;--s: 74.8% .26 342.55;--a: 74.51% .167 183.61;--n: 31.3815% .021108 254.139175;--nc: 74.6477% .0216 264.435964;--b1: 25.3267% .015896 252.417568;--b2: 23.2607% .013807 253.100675;--b3: 21.1484% .01165 254.087939;--bc: 74.6477% .0216 264.435964}.alert{display:grid;width:100%;grid-auto-flow:row;align-content:flex-start;align-items:center;justify-items:center;gap:1rem;text-align:center;border-radius:var(--rounded-box, 1rem);border-width:1px;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));padding:1rem;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--alert-bg: var(--fallback-b2,oklch(var(--b2)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1));background-color:var(--alert-bg)}@media (min-width: 640px){.alert{grid-auto-flow:column;grid-template-columns:auto minmax(auto,1fr);justify-items:start;text-align:start}}.avatar.placeholder>div{display:flex;align-items:center;justify-content:center}.badge{display:inline-flex;align-items:center;justify-content:center;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s;height:1.25rem;font-size:.875rem;line-height:1.25rem;width:-moz-fit-content;width:fit-content;padding-left:.563rem;padding-right:.563rem;border-radius:var(--rounded-badge, 1.9rem);border-width:1px;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.breadcrumbs{max-width:100%;overflow-x:auto;padding-top:.5rem;padding-bottom:.5rem}.breadcrumbs>ul,.breadcrumbs>ol{display:flex;align-items:center;white-space:nowrap;min-height:-moz-min-content;min-height:min-content}.breadcrumbs>ul>li,.breadcrumbs>ol>li{display:flex;align-items:center}.breadcrumbs>ul>li>a,.breadcrumbs>ol>li>a{display:flex;cursor:pointer;align-items:center}@media (hover:hover){.breadcrumbs>ul>li>a:hover,.breadcrumbs>ol>li>a:hover{text-decoration-line:underline}.link-hover:hover{text-decoration-line:underline}.label a:hover{--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.menu li>*:not(ul,.menu-title,details,.btn):active,.menu li>*:not(ul,.menu-title,details,.btn).active,.menu li>details>summary:active{--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.tab:hover{--tw-text-opacity: 1}.tabs-boxed :is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):hover,.tabs-boxed :is(input:checked):hover{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.table tr.hover:hover,.table tr.hover:nth-child(2n):hover{--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))}.table-zebra tr.hover:hover,.table-zebra tr.hover:nth-child(2n):hover{--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}}.btn{display:inline-flex;height:3rem;min-height:3rem;flex-shrink:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-wrap:wrap;align-items:center;justify-content:center;border-radius:var(--rounded-btn, .5rem);border-color:transparent;border-color:oklch(var(--btn-color, var(--b2)) / var(--tw-border-opacity));padding-left:1rem;padding-right:1rem;text-align:center;font-size:.875rem;line-height:1em;gap:.5rem;font-weight:600;text-decoration-line:none;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);border-width:var(--border-btn, 1px);transition-property:color,background-color,border-color,opacity,box-shadow,transform;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);outline-color:var(--fallback-bc,oklch(var(--bc)/1));background-color:oklch(var(--btn-color, var(--b2)) / var(--tw-bg-opacity));--tw-bg-opacity: 1;--tw-border-opacity: 1}.btn-disabled,.btn[disabled],.btn:disabled{pointer-events:none}.btn-square{height:3rem;width:3rem;padding:0}.btn-circle{height:3rem;width:3rem;border-radius:9999px;padding:0}:where(.btn:is(input[type=checkbox])),:where(.btn:is(input[type=radio])){width:auto;-webkit-appearance:none;-moz-appearance:none;appearance:none}.btn:is(input[type=checkbox]):after,.btn:is(input[type=radio]):after{--tw-content: attr(aria-label);content:var(--tw-content)}.card{position:relative;display:flex;flex-direction:column;border-radius:var(--rounded-box, 1rem)}.card:focus{outline:2px solid transparent;outline-offset:2px}.card-body{display:flex;flex:1 1 auto;flex-direction:column;padding:var(--padding-card, 2rem);gap:.5rem}.card-body :where(p){flex-grow:1}.card-actions{display:flex;flex-wrap:wrap;align-items:flex-start;gap:.5rem}.card figure{display:flex;align-items:center;justify-content:center}.card.image-full{display:grid}.card.image-full:before{position:relative;content:\"\";z-index:10;border-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));opacity:.75}.card.image-full:before,.card.image-full>*{grid-column-start:1;grid-row-start:1}.card.image-full>figure img{height:100%;-o-object-fit:cover;object-fit:cover}.card.image-full>.card-body{position:relative;z-index:20;--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.checkbox{flex-shrink:0;--chkbg: var(--fallback-bc,oklch(var(--bc)/1));--chkfg: var(--fallback-b1,oklch(var(--b1)/1));height:1.5rem;width:1.5rem;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--rounded-btn, .5rem);border-width:1px;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: .2}.collapse:not(td):not(tr):not(colgroup){visibility:visible}.collapse{position:relative;display:grid;overflow:hidden;grid-template-rows:max-content 0fr;transition:grid-template-rows .2s;width:100%;border-radius:var(--rounded-box, 1rem)}.collapse-title,.collapse>input[type=checkbox],.collapse>input[type=radio],.collapse-content{grid-column-start:1;grid-row-start:1}.collapse>input[type=checkbox],.collapse>input[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0}:where(.collapse>input[type=checkbox]),:where(.collapse>input[type=radio]){height:100%;width:100%;z-index:1}.collapse-content{visibility:hidden;grid-column-start:1;grid-row-start:2;min-height:0px;transition:visibility .2s;transition:padding .2s ease-out,background-color .2s ease-out;padding-left:1rem;padding-right:1rem;cursor:unset}.collapse[open],.collapse-open,.collapse:focus:not(.collapse-close){grid-template-rows:max-content 1fr}.collapse:not(.collapse-close):has(>input[type=checkbox]:checked),.collapse:not(.collapse-close):has(>input[type=radio]:checked){grid-template-rows:max-content 1fr}.collapse[open]>.collapse-content,.collapse-open>.collapse-content,.collapse:focus:not(.collapse-close)>.collapse-content,.collapse:not(.collapse-close)>input[type=checkbox]:checked~.collapse-content,.collapse:not(.collapse-close)>input[type=radio]:checked~.collapse-content{visibility:visible;min-height:-moz-fit-content;min-height:fit-content}.divider{display:flex;flex-direction:row;align-items:center;align-self:stretch;margin-top:1rem;margin-bottom:1rem;height:1rem;white-space:nowrap}.divider:before,.divider:after{height:.125rem;width:100%;flex-grow:1;--tw-content: \"\";content:var(--tw-content);background-color:var(--fallback-bc,oklch(var(--bc)/.1))}.dropdown{position:relative;display:inline-block}.dropdown>*:not(summary):focus{outline:2px solid transparent;outline-offset:2px}.dropdown .dropdown-content{position:absolute}.dropdown:is(:not(details)) .dropdown-content{visibility:hidden;opacity:0;transform-origin:top;--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s}.dropdown-end .dropdown-content{inset-inline-end:0px}.dropdown-left .dropdown-content{bottom:auto;inset-inline-end:100%;top:0;transform-origin:right}.dropdown-right .dropdown-content{bottom:auto;inset-inline-start:100%;top:0;transform-origin:left}.dropdown-bottom .dropdown-content{bottom:auto;top:100%;transform-origin:top}.dropdown-top .dropdown-content{bottom:100%;top:auto;transform-origin:bottom}.dropdown-end.dropdown-right .dropdown-content,.dropdown-end.dropdown-left .dropdown-content{bottom:0;top:auto}.dropdown.dropdown-open .dropdown-content,.dropdown:not(.dropdown-hover):focus .dropdown-content,.dropdown:focus-within .dropdown-content{visibility:visible;opacity:1}@media (hover: hover){.dropdown.dropdown-hover:hover .dropdown-content{visibility:visible;opacity:1}.btm-nav>*.disabled:hover,.btm-nav>*[disabled]:hover{pointer-events:none;--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}.btn:hover{--tw-border-opacity: 1;border-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn:hover{background-color:color-mix(in oklab,oklch(var(--btn-color, var(--b2)) / var(--tw-bg-opacity, 1)) 90%,black);border-color:color-mix(in oklab,oklch(var(--btn-color, var(--b2)) / var(--tw-border-opacity, 1)) 90%,black)}}@supports not (color: oklch(0% 0 0)){.btn:hover{background-color:var(--btn-color, var(--fallback-b2));border-color:var(--btn-color, var(--fallback-b2))}}.btn.glass:hover{--glass-opacity: 25%;--glass-border-opacity: 15%}.btn-ghost:hover{border-color:transparent}@supports (color: oklch(0% 0 0)){.btn-ghost:hover{background-color:var(--fallback-bc,oklch(var(--bc)/.2))}}.btn-outline:hover{--tw-border-opacity: 1;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-b1,oklch(var(--b1)/var(--tw-text-opacity)))}.btn-outline.btn-primary:hover{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-primary:hover{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black)}}.btn-outline.btn-secondary:hover{--tw-text-opacity: 1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-secondary:hover{background-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,black)}}.btn-outline.btn-accent:hover{--tw-text-opacity: 1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-accent:hover{background-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,black)}}.btn-outline.btn-success:hover{--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-success:hover{background-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black)}}.btn-outline.btn-info:hover{--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-info:hover{background-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,black)}}.btn-outline.btn-warning:hover{--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-warning:hover{background-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,black)}}.btn-outline.btn-error:hover{--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-error:hover{background-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black)}}.btn-disabled:hover,.btn[disabled]:hover,.btn:disabled:hover{--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .2;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}@supports (color: color-mix(in oklab,black,black)){.btn:is(input[type=checkbox]:checked):hover,.btn:is(input[type=radio]:checked):hover{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black)}}.dropdown.dropdown-hover:hover .dropdown-content{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(.active,.btn):hover,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.active,.btn):hover{cursor:pointer;outline:2px solid transparent;outline-offset:2px}@supports (color: oklch(0% 0 0)){:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(.active,.btn):hover,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.active,.btn):hover{background-color:var(--fallback-bc,oklch(var(--bc)/.1))}}.tab[disabled],.tab[disabled]:hover{cursor:not-allowed;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}}.dropdown:is(details) summary::-webkit-details-marker{display:none}.form-control{display:flex;flex-direction:column}.label{display:flex;-webkit-user-select:none;-moz-user-select:none;user-select:none;align-items:center;justify-content:space-between;padding:.5rem .25rem}.indicator{position:relative;display:inline-flex;width:-moz-max-content;width:max-content}.indicator :where(.indicator-item){z-index:1;position:absolute;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));white-space:nowrap}.input{flex-shrink:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:3rem;padding-left:1rem;padding-right:1rem;font-size:1rem;line-height:2;line-height:1.5rem;border-radius:var(--rounded-btn, .5rem);border-width:1px;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.input[type=number]::-webkit-inner-spin-button,.input-md[type=number]::-webkit-inner-spin-button{margin-top:-1rem;margin-bottom:-1rem;margin-inline-end:-1rem}.input-sm[type=number]::-webkit-inner-spin-button{margin-top:0;margin-bottom:0;margin-inline-end:-0px}.join{display:inline-flex;align-items:stretch;border-radius:var(--rounded-btn, .5rem)}.join :where(.join-item){border-start-end-radius:0;border-end-end-radius:0;border-end-start-radius:0;border-start-start-radius:0}.join .join-item:not(:first-child):not(:last-child),.join *:not(:first-child):not(:last-child) .join-item{border-start-end-radius:0;border-end-end-radius:0;border-end-start-radius:0;border-start-start-radius:0}.join .join-item:first-child:not(:last-child),.join *:first-child:not(:last-child) .join-item{border-start-end-radius:0;border-end-end-radius:0}.join .dropdown .join-item:first-child:not(:last-child),.join *:first-child:not(:last-child) .dropdown .join-item{border-start-end-radius:inherit;border-end-end-radius:inherit}.join :where(.join-item:first-child:not(:last-child)),.join :where(*:first-child:not(:last-child) .join-item){border-end-start-radius:inherit;border-start-start-radius:inherit}.join .join-item:last-child:not(:first-child),.join *:last-child:not(:first-child) .join-item{border-end-start-radius:0;border-start-start-radius:0}.join :where(.join-item:last-child:not(:first-child)),.join :where(*:last-child:not(:first-child) .join-item){border-start-end-radius:inherit;border-end-end-radius:inherit}@supports not selector(:has(*)){:where(.join *){border-radius:inherit}}@supports selector(:has(*)){:where(.join *:has(.join-item)){border-radius:inherit}}.kbd{display:inline-flex;align-items:center;justify-content:center;border-radius:var(--rounded-btn, .5rem);border-width:1px;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: .2;--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));padding-left:.5rem;padding-right:.5rem;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));border-bottom-width:2px;min-height:2.2em;min-width:2.2em}.link{cursor:pointer;text-decoration-line:underline}.link-hover{text-decoration-line:none}.menu{display:flex;flex-direction:column;flex-wrap:wrap;font-size:.875rem;line-height:1.25rem;padding:.5rem}.menu :where(li ul){position:relative;white-space:nowrap;margin-inline-start:1rem;padding-inline-start:.5rem}.menu :where(li:not(.menu-title)>*:not(ul,details,.menu-title,.btn)),.menu :where(li:not(.menu-title)>details>summary:not(.menu-title)){display:grid;grid-auto-flow:column;align-content:flex-start;align-items:center;gap:.5rem;grid-auto-columns:minmax(auto,max-content) auto max-content;-webkit-user-select:none;-moz-user-select:none;user-select:none}.menu li.disabled{cursor:not-allowed;-webkit-user-select:none;-moz-user-select:none;user-select:none;color:var(--fallback-bc,oklch(var(--bc)/.3))}.menu :where(li>.menu-dropdown:not(.menu-dropdown-show)){display:none}:where(.menu li){position:relative;display:flex;flex-shrink:0;flex-direction:column;flex-wrap:wrap;align-items:stretch}:where(.menu li) .badge{justify-self:end}.mockup-code{position:relative;overflow:hidden;overflow-x:auto;min-width:18rem;border-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));padding-top:1.25rem;padding-bottom:1.25rem;--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)));direction:ltr}.mockup-code pre[data-prefix]:before{content:attr(data-prefix);display:inline-block;text-align:right;width:2rem;opacity:.5}.modal{pointer-events:none;position:fixed;inset:0;margin:0;display:grid;height:100%;max-height:none;width:100%;max-width:none;justify-items:center;padding:0;opacity:0;overscroll-behavior:contain;z-index:999;background-color:transparent;color:inherit;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);transition-property:transform,opacity,visibility;overflow-y:hidden}:where(.modal){align-items:center}.modal-box{max-height:calc(100vh - 5em);grid-column-start:1;grid-row-start:1;width:91.666667%;max-width:32rem;--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-bottom-right-radius:var(--rounded-box, 1rem);border-bottom-left-radius:var(--rounded-box, 1rem);border-top-left-radius:var(--rounded-box, 1rem);border-top-right-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));padding:1.5rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s;box-shadow:#00000040 0 25px 50px -12px;overflow-y:auto;overscroll-behavior:contain}.modal-open,.modal:target,.modal-toggle:checked+.modal,.modal[open]{pointer-events:auto;visibility:visible;opacity:1}.modal-action{display:flex;margin-top:1.5rem;justify-content:flex-end}.modal-toggle{position:fixed;height:0px;width:0px;-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0}:root:has(:is(.modal-open,.modal:target,.modal-toggle:checked+.modal,.modal[open])){overflow:hidden;scrollbar-gutter:stable}.navbar{display:flex;align-items:center;padding:var(--navbar-padding, .5rem);min-height:4rem;width:100%}:where(.navbar>*:not(script,style)){display:inline-flex;align-items:center}.radio{flex-shrink:0;--chkbg: var(--bc);height:1.5rem;width:1.5rem;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:9999px;border-width:1px;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: .2}.range{height:1.5rem;width:100%;cursor:pointer;-moz-appearance:none;appearance:none;-webkit-appearance:none;--range-shdw: var(--fallback-bc,oklch(var(--bc)/1));overflow:hidden;border-radius:var(--rounded-box, 1rem);background-color:transparent}.range:focus{outline:none}.select{display:inline-flex;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:3rem;min-height:3rem;padding-inline-start:1rem;padding-inline-end:2.5rem;font-size:.875rem;line-height:1.25rem;line-height:2;border-radius:var(--rounded-btn, .5rem);border-width:1px;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);background-position:calc(100% - 20px) calc(1px + 50%),calc(100% - 16.1px) calc(1px + 50%);background-size:4px 4px,4px 4px;background-repeat:no-repeat}.select[multiple]{height:auto}.stats{display:inline-grid;border-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}:where(.stats){grid-auto-flow:column;overflow-x:auto}.stat{display:inline-grid;width:100%;grid-template-columns:repeat(1,1fr);-moz-column-gap:1rem;column-gap:1rem;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: .1;padding:1rem 1.5rem}.stat-title{grid-column-start:1;white-space:nowrap;color:var(--fallback-bc,oklch(var(--bc)/.6))}.stat-value{grid-column-start:1;white-space:nowrap;font-size:2.25rem;line-height:2.5rem;font-weight:800}.stat-desc{grid-column-start:1;white-space:nowrap;font-size:.75rem;line-height:1rem;color:var(--fallback-bc,oklch(var(--bc)/.6))}.steps{display:inline-grid;grid-auto-flow:column;overflow:hidden;overflow-x:auto;counter-reset:step;grid-auto-columns:1fr}.steps .step{display:grid;grid-template-columns:repeat(1,minmax(0,1fr));grid-template-columns:auto;grid-template-rows:repeat(2,minmax(0,1fr));grid-template-rows:40px 1fr;place-items:center;text-align:center;min-width:4rem}.tabs{display:grid;align-items:flex-end}.tabs-lifted:has(.tab-content[class^=rounded-]) .tab:first-child:not(:is(.tab-active,[aria-selected=true])),.tabs-lifted:has(.tab-content[class*=\" rounded-\"]) .tab:first-child:not(:is(.tab-active,[aria-selected=true])){border-bottom-color:transparent}.tab{position:relative;grid-row-start:1;display:inline-flex;height:2rem;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;flex-wrap:wrap;align-items:center;justify-content:center;text-align:center;font-size:.875rem;line-height:1.25rem;line-height:2;--tab-padding: 1rem;--tw-text-opacity: .5;--tab-color: var(--fallback-bc,oklch(var(--bc)/1));--tab-bg: var(--fallback-b1,oklch(var(--b1)/1));--tab-border-color: var(--fallback-b3,oklch(var(--b3)/1));color:var(--tab-color);padding-inline-start:var(--tab-padding, 1rem);padding-inline-end:var(--tab-padding, 1rem)}.tab:is(input[type=radio]){width:auto;border-bottom-right-radius:0;border-bottom-left-radius:0}.tab:is(input[type=radio]):after{--tw-content: attr(aria-label);content:var(--tw-content)}.tab:not(input):empty{cursor:default;grid-column-start:span 9999}:checked+.tab-content:nth-child(2),:is(.tab-active,[aria-selected=true])+.tab-content:nth-child(2){border-start-start-radius:0px}input.tab:checked+.tab-content,:is(.tab-active,[aria-selected=true])+.tab-content{display:block}.table{position:relative;width:100%;border-radius:var(--rounded-box, 1rem);text-align:left;font-size:.875rem;line-height:1.25rem}.table :where(.table-pin-rows thead tr){position:sticky;top:0;z-index:1;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.table :where(.table-pin-rows tfoot tr){position:sticky;bottom:0;z-index:1;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.table :where(.table-pin-cols tr th){position:sticky;left:0;right:0;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.table-zebra tbody tr:nth-child(2n) :where(.table-pin-cols tr th){--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))}.textarea{min-height:3rem;flex-shrink:1;padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem;line-height:2;border-radius:var(--rounded-btn, .5rem);border-width:1px;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.toast{position:fixed;display:flex;min-width:-moz-fit-content;min-width:fit-content;flex-direction:column;white-space:nowrap;gap:.5rem;padding:1rem}.toggle{flex-shrink:0;--tglbg: var(--fallback-b1,oklch(var(--b1)/1));--handleoffset: 1.5rem;--handleoffsetcalculator: calc(var(--handleoffset) * -1);--togglehandleborder: 0 0;height:1.5rem;width:3rem;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--rounded-badge, 1.9rem);border-width:1px;border-color:currentColor;background-color:currentColor;color:var(--fallback-bc,oklch(var(--bc)/.5));transition:background,box-shadow var(--animation-input, .2s) ease-out;box-shadow:var(--handleoffsetcalculator) 0 0 2px var(--tglbg) inset,0 0 0 2px var(--tglbg) inset,var(--togglehandleborder)}.alert-info{border-color:var(--fallback-in,oklch(var(--in)/.2));--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)));--alert-bg: var(--fallback-in,oklch(var(--in)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1))}.alert-success{border-color:var(--fallback-su,oklch(var(--su)/.2));--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)));--alert-bg: var(--fallback-su,oklch(var(--su)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1))}.alert-warning{border-color:var(--fallback-wa,oklch(var(--wa)/.2));--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)));--alert-bg: var(--fallback-wa,oklch(var(--wa)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1))}.alert-error{border-color:var(--fallback-er,oklch(var(--er)/.2));--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)));--alert-bg: var(--fallback-er,oklch(var(--er)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1))}.badge-neutral{--tw-border-opacity: 1;border-color:var(--fallback-n,oklch(var(--n)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.badge-primary{--tw-border-opacity: 1;border-color:var(--fallback-p,oklch(var(--p)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.badge-accent{--tw-border-opacity: 1;border-color:var(--fallback-a,oklch(var(--a)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-a,oklch(var(--a)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)))}.badge-info{border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-in,oklch(var(--in)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}.badge-success{border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}.badge-warning{border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}.badge-error{border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-er,oklch(var(--er)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}.badge-ghost{--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.badge-outline{border-color:currentColor;--tw-border-opacity: .5;background-color:transparent;color:currentColor}.badge-outline.badge-neutral{--tw-text-opacity: 1;color:var(--fallback-n,oklch(var(--n)/var(--tw-text-opacity)))}.badge-outline.badge-primary{--tw-text-opacity: 1;color:var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity)))}.badge-outline.badge-secondary{--tw-text-opacity: 1;color:var(--fallback-s,oklch(var(--s)/var(--tw-text-opacity)))}.badge-outline.badge-accent{--tw-text-opacity: 1;color:var(--fallback-a,oklch(var(--a)/var(--tw-text-opacity)))}.badge-outline.badge-info{--tw-text-opacity: 1;color:var(--fallback-in,oklch(var(--in)/var(--tw-text-opacity)))}.badge-outline.badge-success{--tw-text-opacity: 1;color:var(--fallback-su,oklch(var(--su)/var(--tw-text-opacity)))}.badge-outline.badge-warning{--tw-text-opacity: 1;color:var(--fallback-wa,oklch(var(--wa)/var(--tw-text-opacity)))}.badge-outline.badge-error{--tw-text-opacity: 1;color:var(--fallback-er,oklch(var(--er)/var(--tw-text-opacity)))}.btm-nav>*:where(.active){border-top-width:2px;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.btm-nav>*.disabled,.btm-nav>*[disabled]{pointer-events:none;--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}.btm-nav>* .label{font-size:1rem;line-height:1.5rem}.breadcrumbs>ul>li>a:focus,.breadcrumbs>ol>li>a:focus{outline:2px solid transparent;outline-offset:2px}.breadcrumbs>ul>li>a:focus-visible,.breadcrumbs>ol>li>a:focus-visible{outline:2px solid currentColor;outline-offset:2px}.breadcrumbs>ul>li+*:before,.breadcrumbs>ol>li+*:before{content:\"\";margin-left:.5rem;margin-right:.75rem;display:block;height:.375rem;width:.375rem;--tw-rotate: 45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));opacity:.4;border-top:1px solid;border-right:1px solid;background-color:transparent}[dir=rtl] .breadcrumbs>ul>li+*:before,[dir=rtl] .breadcrumbs>ol>li+*:before{--tw-rotate: -135deg}@media (prefers-reduced-motion: no-preference){.btn{animation:button-pop var(--animation-btn, .25s) ease-out}}.btn:active:hover,.btn:active:focus{animation:button-pop 0s ease-out;transform:scale(var(--btn-focus-scale, .97))}@supports not (color: oklch(0% 0 0)){.btn{background-color:var(--btn-color, var(--fallback-b2));border-color:var(--btn-color, var(--fallback-b2))}.btn-primary{--btn-color: var(--fallback-p)}.btn-secondary{--btn-color: var(--fallback-s)}.btn-success{--btn-color: var(--fallback-su)}.btn-warning{--btn-color: var(--fallback-wa)}.btn-error{--btn-color: var(--fallback-er)}}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-primary.btn-active{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black)}.btn-outline.btn-secondary.btn-active{background-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,black)}.btn-outline.btn-accent.btn-active{background-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,black)}.btn-outline.btn-success.btn-active{background-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black)}.btn-outline.btn-info.btn-active{background-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,black)}.btn-outline.btn-warning.btn-active{background-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,black)}.btn-outline.btn-error.btn-active{background-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black)}}.btn:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px}.btn-primary{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)));outline-color:var(--fallback-p,oklch(var(--p)/1))}@supports (color: oklch(0% 0 0)){.btn-primary{--btn-color: var(--p)}.btn-secondary{--btn-color: var(--s)}.btn-success{--btn-color: var(--su)}.btn-warning{--btn-color: var(--wa)}.btn-error{--btn-color: var(--er)}}.btn-secondary{--tw-text-opacity: 1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)));outline-color:var(--fallback-s,oklch(var(--s)/1))}.btn-success{--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)));outline-color:var(--fallback-su,oklch(var(--su)/1))}.btn-warning{--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)));outline-color:var(--fallback-wa,oklch(var(--wa)/1))}.btn-error{--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)));outline-color:var(--fallback-er,oklch(var(--er)/1))}.btn.glass{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);outline-color:currentColor}.btn.glass.btn-active{--glass-opacity: 25%;--glass-border-opacity: 15%}.btn-ghost{border-width:1px;border-color:transparent;background-color:transparent;color:currentColor;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);outline-color:currentColor}.btn-ghost.btn-active{border-color:transparent;background-color:var(--fallback-bc,oklch(var(--bc)/.2))}.btn-outline{border-color:currentColor;background-color:transparent;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.btn-outline.btn-active{--tw-border-opacity: 1;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-b1,oklch(var(--b1)/var(--tw-text-opacity)))}.btn-outline.btn-primary{--tw-text-opacity: 1;color:var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity)))}.btn-outline.btn-primary.btn-active{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.btn-outline.btn-secondary{--tw-text-opacity: 1;color:var(--fallback-s,oklch(var(--s)/var(--tw-text-opacity)))}.btn-outline.btn-secondary.btn-active{--tw-text-opacity: 1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)))}.btn-outline.btn-accent{--tw-text-opacity: 1;color:var(--fallback-a,oklch(var(--a)/var(--tw-text-opacity)))}.btn-outline.btn-accent.btn-active{--tw-text-opacity: 1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)))}.btn-outline.btn-success{--tw-text-opacity: 1;color:var(--fallback-su,oklch(var(--su)/var(--tw-text-opacity)))}.btn-outline.btn-success.btn-active{--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}.btn-outline.btn-info{--tw-text-opacity: 1;color:var(--fallback-in,oklch(var(--in)/var(--tw-text-opacity)))}.btn-outline.btn-info.btn-active{--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}.btn-outline.btn-warning{--tw-text-opacity: 1;color:var(--fallback-wa,oklch(var(--wa)/var(--tw-text-opacity)))}.btn-outline.btn-warning.btn-active{--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}.btn-outline.btn-error{--tw-text-opacity: 1;color:var(--fallback-er,oklch(var(--er)/var(--tw-text-opacity)))}.btn-outline.btn-error.btn-active{--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}.btn.btn-disabled,.btn[disabled],.btn:disabled{--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .2;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}.btn:is(input[type=checkbox]:checked),.btn:is(input[type=radio]:checked){--tw-border-opacity: 1;border-color:var(--fallback-p,oklch(var(--p)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.btn:is(input[type=checkbox]:checked):focus-visible,.btn:is(input[type=radio]:checked):focus-visible{outline-color:var(--fallback-p,oklch(var(--p)/1))}@keyframes button-pop{0%{transform:scale(var(--btn-focus-scale, .98))}40%{transform:scale(1.02)}to{transform:scale(1)}}.card :where(figure:first-child){overflow:hidden;border-start-start-radius:inherit;border-start-end-radius:inherit;border-end-start-radius:unset;border-end-end-radius:unset}.card :where(figure:last-child){overflow:hidden;border-start-start-radius:unset;border-start-end-radius:unset;border-end-start-radius:inherit;border-end-end-radius:inherit}.card:focus-visible{outline:2px solid currentColor;outline-offset:2px}.card.bordered{border-width:1px;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}.card.compact .card-body{padding:1rem;font-size:.875rem;line-height:1.25rem}.card-title{display:flex;align-items:center;gap:.5rem;font-size:1.25rem;line-height:1.75rem;font-weight:600}.card.image-full :where(figure){overflow:hidden;border-radius:inherit}.checkbox:focus{box-shadow:none}.checkbox:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}.checkbox:disabled{border-width:0px;cursor:not-allowed;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));opacity:.2}.checkbox:checked,.checkbox[aria-checked=true]{background-repeat:no-repeat;animation:checkmark var(--animation-input, .2s) ease-out;background-color:var(--chkbg);background-image:linear-gradient(-45deg,transparent 65%,var(--chkbg) 65.99%),linear-gradient(45deg,transparent 75%,var(--chkbg) 75.99%),linear-gradient(-45deg,var(--chkbg) 40%,transparent 40.99%),linear-gradient(45deg,var(--chkbg) 30%,var(--chkfg) 30.99%,var(--chkfg) 40%,transparent 40.99%),linear-gradient(-45deg,var(--chkfg) 50%,var(--chkbg) 50.99%)}.checkbox:indeterminate{--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));background-repeat:no-repeat;animation:checkmark var(--animation-input, .2s) ease-out;background-image:linear-gradient(90deg,transparent 80%,var(--chkbg) 80%),linear-gradient(-90deg,transparent 80%,var(--chkbg) 80%),linear-gradient(0deg,var(--chkbg) 43%,var(--chkfg) 43%,var(--chkfg) 57%,var(--chkbg) 57%)}@keyframes checkmark{0%{background-position-y:5px}50%{background-position-y:-2px}to{background-position-y:0}}details.collapse{width:100%}details.collapse summary{position:relative;display:block;outline:2px solid transparent;outline-offset:2px}details.collapse summary::-webkit-details-marker{display:none}.collapse:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}.collapse:has(.collapse-title:focus-visible),.collapse:has(>input[type=checkbox]:focus-visible),.collapse:has(>input[type=radio]:focus-visible){outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}.collapse-arrow>.collapse-title:after{position:absolute;display:block;height:.5rem;width:.5rem;--tw-translate-y: -100%;--tw-rotate: 45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.15s;transition-duration:.2s;top:1.9rem;inset-inline-end:1.4rem;content:\"\";transform-origin:75% 75%;box-shadow:2px 2px;pointer-events:none}.collapse-plus>.collapse-title:after{position:absolute;display:block;height:.5rem;width:.5rem;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.3s;top:.9rem;inset-inline-end:1.4rem;content:\"+\";pointer-events:none}.collapse:not(.collapse-open):not(.collapse-close)>input[type=checkbox],.collapse:not(.collapse-open):not(.collapse-close)>input[type=radio]:not(:checked),.collapse:not(.collapse-open):not(.collapse-close)>.collapse-title{cursor:pointer}.collapse:focus:not(.collapse-open):not(.collapse-close):not(.collapse[open])>.collapse-title{cursor:unset}.collapse-title{position:relative}.collapse-title,:where(.collapse>input[type=checkbox]),:where(.collapse>input[type=radio]){padding:1rem;padding-inline-end:3rem;min-height:3.75rem;transition:background-color .2s ease-out}.collapse[open]>:where(.collapse-content),.collapse-open>:where(.collapse-content),.collapse:focus:not(.collapse-close)>:where(.collapse-content),.collapse:not(.collapse-close)>:where(input[type=checkbox]:checked~.collapse-content),.collapse:not(.collapse-close)>:where(input[type=radio]:checked~.collapse-content){padding-bottom:1rem;transition:padding .2s ease-out,background-color .2s ease-out}.collapse[open].collapse-arrow>.collapse-title:after,.collapse-open.collapse-arrow>.collapse-title:after,.collapse-arrow:focus:not(.collapse-close)>.collapse-title:after,.collapse-arrow:not(.collapse-close)>input[type=checkbox]:checked~.collapse-title:after,.collapse-arrow:not(.collapse-close)>input[type=radio]:checked~.collapse-title:after{--tw-translate-y: -50%;--tw-rotate: 225deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.collapse[open].collapse-plus>.collapse-title:after,.collapse-open.collapse-plus>.collapse-title:after,.collapse-plus:focus:not(.collapse-close)>.collapse-title:after,.collapse-plus:not(.collapse-close)>input[type=checkbox]:checked~.collapse-title:after,.collapse-plus:not(.collapse-close)>input[type=radio]:checked~.collapse-title:after{content:\"\u2212\"}.divider:not(:empty){gap:1rem}.dropdown.dropdown-open .dropdown-content,.dropdown:focus .dropdown-content,.dropdown:focus-within .dropdown-content{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.label-text{font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.label-text-alt{font-size:.75rem;line-height:1rem;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.input input{--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));background-color:transparent}.input input:focus{outline:2px solid transparent;outline-offset:2px}.input[list]::-webkit-calendar-picker-indicator{line-height:1em}.input-bordered{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}.input:focus,.input:focus-within{box-shadow:none;border-color:var(--fallback-bc,oklch(var(--bc)/.2));outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.input-error{--tw-border-opacity: 1;border-color:var(--fallback-er,oklch(var(--er)/var(--tw-border-opacity)))}.input-error:focus,.input-error:focus-within{--tw-border-opacity: 1;border-color:var(--fallback-er,oklch(var(--er)/var(--tw-border-opacity)));outline-color:var(--fallback-er,oklch(var(--er)/1))}.input:has(>input[disabled]),.input-disabled,.input:disabled,.input[disabled]{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}.input:has(>input[disabled])::-moz-placeholder,.input-disabled::-moz-placeholder,.input:disabled::-moz-placeholder,.input[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.input:has(>input[disabled])::placeholder,.input-disabled::placeholder,.input:disabled::placeholder,.input[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.input:has(>input[disabled])>input[disabled]{cursor:not-allowed}.input::-webkit-date-and-time-value{text-align:inherit}.join>:where(*:not(:first-child)){margin-top:0;margin-bottom:0;margin-inline-start:-1px}.join>:where(*:not(:first-child)):is(.btn){margin-inline-start:calc(var(--border-btn) * -1)}.join-item:focus{isolation:isolate}.link:focus{outline:2px solid transparent;outline-offset:2px}.link:focus-visible{outline:2px solid currentColor;outline-offset:2px}.\\!loading{pointer-events:none!important;display:inline-block!important;aspect-ratio:1 / 1!important;width:1.5rem!important;background-color:currentColor!important;-webkit-mask-size:100%!important;mask-size:100%!important;-webkit-mask-repeat:no-repeat!important;mask-repeat:no-repeat!important;-webkit-mask-position:center!important;mask-position:center!important;-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\")!important;mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\")!important}.loading{pointer-events:none;display:inline-block;aspect-ratio:1 / 1;width:1.5rem;background-color:currentColor;-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\")}.loading-spinner{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\")}.loading-xs{width:1rem}.loading-sm{width:1.25rem}.loading-lg{width:2.5rem}:where(.menu li:empty){--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));opacity:.1;margin:.5rem 1rem;height:1px}.menu :where(li ul):before{position:absolute;bottom:.75rem;inset-inline-start:0px;top:.75rem;width:1px;--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));opacity:.1;content:\"\"}.menu :where(li:not(.menu-title)>*:not(ul,details,.menu-title,.btn)),.menu :where(li:not(.menu-title)>details>summary:not(.menu-title)){border-radius:var(--rounded-btn, .5rem);padding:.5rem 1rem;text-align:start;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s;text-wrap:balance}:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(summary,.active,.btn).focus,:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(summary,.active,.btn):focus,:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):is(summary):not(.active,.btn):focus-visible,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(summary,.active,.btn).focus,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(summary,.active,.btn):focus,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):is(summary):not(.active,.btn):focus-visible{cursor:pointer;background-color:var(--fallback-bc,oklch(var(--bc)/.1));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));outline:2px solid transparent;outline-offset:2px}.menu li>*:not(ul,.menu-title,details,.btn):active,.menu li>*:not(ul,.menu-title,details,.btn).active,.menu li>details>summary:active{--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.menu :where(li>details>summary)::-webkit-details-marker{display:none}.menu :where(li>details>summary):after,.menu :where(li>.menu-dropdown-toggle):after{justify-self:end;display:block;margin-top:-.5rem;height:.5rem;width:.5rem;transform:rotate(45deg);transition-property:transform,margin-top;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1);content:\"\";transform-origin:75% 75%;box-shadow:2px 2px;pointer-events:none}.menu :where(li>details[open]>summary):after,.menu :where(li>.menu-dropdown-toggle.menu-dropdown-show):after{transform:rotate(225deg);margin-top:0}.mockup-code:before{content:\"\";margin-bottom:1rem;display:block;height:.75rem;width:.75rem;border-radius:9999px;opacity:.3;box-shadow:1.4em 0,2.8em 0,4.2em 0}.mockup-code pre{padding-right:1.25rem}.mockup-code pre:before{content:\"\";margin-right:2ch}.mockup-phone .display{overflow:hidden;border-radius:40px;margin-top:-25px}.mockup-browser .mockup-browser-toolbar .input{position:relative;margin-left:auto;margin-right:auto;display:block;height:1.75rem;width:24rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));padding-left:2rem;direction:ltr}.mockup-browser .mockup-browser-toolbar .input:before{content:\"\";position:absolute;left:.5rem;top:50%;aspect-ratio:1 / 1;height:.75rem;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:9999px;border-width:2px;border-color:currentColor;opacity:.6}.mockup-browser .mockup-browser-toolbar .input:after{content:\"\";position:absolute;left:1.25rem;top:50%;height:.5rem;--tw-translate-y: 25%;--tw-rotate: -45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:9999px;border-width:1px;border-color:currentColor;opacity:.6}.modal:not(dialog:not(.modal-open)),.modal::backdrop{background-color:#0006;animation:modal-pop .2s ease-out}.modal-backdrop{z-index:-1;grid-column-start:1;grid-row-start:1;display:grid;align-self:stretch;justify-self:stretch;color:transparent}.modal-open .modal-box,.modal-toggle:checked+.modal .modal-box,.modal:target .modal-box,.modal[open] .modal-box{--tw-translate-y: 0px;--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.modal-action>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.modal-action:where([dir=rtl],[dir=rtl] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 1}@keyframes modal-pop{0%{opacity:0}}@keyframes progress-loading{50%{background-position-x:-115%}}.radio:focus{box-shadow:none}.radio:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}.radio:checked,.radio[aria-checked=true]{--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));background-image:none;animation:radiomark var(--animation-input, .2s) ease-out;box-shadow:0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset}.radio:disabled{cursor:not-allowed;opacity:.2}@keyframes radiomark{0%{box-shadow:0 0 0 12px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 12px var(--fallback-b1,oklch(var(--b1)/1)) inset}50%{box-shadow:0 0 0 3px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 3px var(--fallback-b1,oklch(var(--b1)/1)) inset}to{box-shadow:0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset}}.range:focus-visible::-webkit-slider-thumb{--focus-shadow: 0 0 0 6px var(--fallback-b1,oklch(var(--b1)/1)) inset, 0 0 0 2rem var(--range-shdw) inset}.range:focus-visible::-moz-range-thumb{--focus-shadow: 0 0 0 6px var(--fallback-b1,oklch(var(--b1)/1)) inset, 0 0 0 2rem var(--range-shdw) inset}.range::-webkit-slider-runnable-track{height:.5rem;width:100%;border-radius:var(--rounded-box, 1rem);background-color:var(--fallback-bc,oklch(var(--bc)/.1))}.range::-moz-range-track{height:.5rem;width:100%;border-radius:var(--rounded-box, 1rem);background-color:var(--fallback-bc,oklch(var(--bc)/.1))}.range::-webkit-slider-thumb{position:relative;height:1.5rem;width:1.5rem;border-radius:var(--rounded-box, 1rem);border-style:none;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));appearance:none;-webkit-appearance:none;top:50%;color:var(--range-shdw);transform:translateY(-50%);--filler-size: 100rem;--filler-offset: .6rem;box-shadow:0 0 0 3px var(--range-shdw) inset,var(--focus-shadow, 0 0),calc(var(--filler-size) * -1 - var(--filler-offset)) 0 0 var(--filler-size)}.range::-moz-range-thumb{position:relative;height:1.5rem;width:1.5rem;border-radius:var(--rounded-box, 1rem);border-style:none;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));top:50%;color:var(--range-shdw);--filler-size: 100rem;--filler-offset: .5rem;box-shadow:0 0 0 3px var(--range-shdw) inset,var(--focus-shadow, 0 0),calc(var(--filler-size) * -1 - var(--filler-offset)) 0 0 var(--filler-size)}@keyframes rating-pop{0%{transform:translateY(-.125em)}40%{transform:translateY(-.125em)}to{transform:translateY(0)}}.select-bordered{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}.select:focus{box-shadow:none;border-color:var(--fallback-bc,oklch(var(--bc)/.2));outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.select-disabled,.select:disabled,.select[disabled]{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}.select-disabled::-moz-placeholder,.select:disabled::-moz-placeholder,.select[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.select-disabled::placeholder,.select:disabled::placeholder,.select[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.select-multiple,.select[multiple],.select[size].select:not([size=\"1\"]){background-image:none;padding-right:1rem}[dir=rtl] .select{background-position:calc(0% + 12px) calc(1px + 50%),calc(0% + 16px) calc(1px + 50%)}@keyframes skeleton{0%{background-position:150%}to{background-position:-50%}}:where(.stats)>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)));--tw-divide-y-reverse: 0;border-top-width:calc(0px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(0px * var(--tw-divide-y-reverse))}[dir=rtl] .stats>*:not([hidden])~*:not([hidden]){--tw-divide-x-reverse: 1}.steps .step:before{top:0;grid-column-start:1;grid-row-start:1;height:.5rem;width:100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));content:\"\";margin-inline-start:-100%}.steps .step:after{content:counter(step);counter-increment:step;z-index:1;position:relative;grid-column-start:1;grid-row-start:1;display:grid;height:2rem;width:2rem;place-items:center;place-self:center;border-radius:9999px;--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.steps .step:first-child:before{content:none}.steps .step[data-content]:after{content:attr(data-content)}.steps .step-neutral+.step-neutral:before,.steps .step-neutral:after{--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.steps .step-primary+.step-primary:before,.steps .step-primary:after{--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.steps .step-secondary+.step-secondary:before,.steps .step-secondary:after{--tw-bg-opacity: 1;background-color:var(--fallback-s,oklch(var(--s)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)))}.steps .step-accent+.step-accent:before,.steps .step-accent:after{--tw-bg-opacity: 1;background-color:var(--fallback-a,oklch(var(--a)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)))}.steps .step-info+.step-info:before{--tw-bg-opacity: 1;background-color:var(--fallback-in,oklch(var(--in)/var(--tw-bg-opacity)))}.steps .step-info:after{--tw-bg-opacity: 1;background-color:var(--fallback-in,oklch(var(--in)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}.steps .step-success+.step-success:before{--tw-bg-opacity: 1;background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity)))}.steps .step-success:after{--tw-bg-opacity: 1;background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}.steps .step-warning+.step-warning:before{--tw-bg-opacity: 1;background-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-bg-opacity)))}.steps .step-warning:after{--tw-bg-opacity: 1;background-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}.steps .step-error+.step-error:before{--tw-bg-opacity: 1;background-color:var(--fallback-er,oklch(var(--er)/var(--tw-bg-opacity)))}.steps .step-error:after{--tw-bg-opacity: 1;background-color:var(--fallback-er,oklch(var(--er)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}.tabs-lifted>.tab:focus-visible{border-end-end-radius:0;border-end-start-radius:0}.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]),.tab:is(input:checked){border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: 1;--tw-text-opacity: 1}.tab:focus{outline:2px solid transparent;outline-offset:2px}.tab:focus-visible{outline:2px solid currentColor;outline-offset:-5px}.tab-disabled,.tab[disabled]{cursor:not-allowed;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}.tabs-bordered>.tab{border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: .2;border-style:solid;border-bottom-width:calc(var(--tab-border, 1px) + 1px)}.tabs-lifted>.tab{border:var(--tab-border, 1px) solid transparent;border-width:0 0 var(--tab-border, 1px) 0;border-start-start-radius:var(--tab-radius, .5rem);border-start-end-radius:var(--tab-radius, .5rem);border-bottom-color:var(--tab-border-color);padding-inline-start:var(--tab-padding, 1rem);padding-inline-end:var(--tab-padding, 1rem);padding-top:var(--tab-border, 1px)}.tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]),.tabs-lifted>.tab:is(input:checked){background-color:var(--tab-bg);border-width:var(--tab-border, 1px) var(--tab-border, 1px) 0 var(--tab-border, 1px);border-inline-start-color:var(--tab-border-color);border-inline-end-color:var(--tab-border-color);border-top-color:var(--tab-border-color);padding-inline-start:calc(var(--tab-padding, 1rem) - var(--tab-border, 1px));padding-inline-end:calc(var(--tab-padding, 1rem) - var(--tab-border, 1px));padding-bottom:var(--tab-border, 1px);padding-top:0}.tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):before,.tabs-lifted>.tab:is(input:checked):before{z-index:1;content:\"\";display:block;position:absolute;width:calc(100% + var(--tab-radius, .5rem) * 2);height:var(--tab-radius, .5rem);bottom:0;background-size:var(--tab-radius, .5rem);background-position:top left,top right;background-repeat:no-repeat;--tab-grad: calc(69% - var(--tab-border, 1px));--radius-start: radial-gradient( circle at top left, transparent var(--tab-grad), var(--tab-border-color) calc(var(--tab-grad) + .25px), var(--tab-border-color) calc(var(--tab-grad) + var(--tab-border, 1px)), var(--tab-bg) calc(var(--tab-grad) + var(--tab-border, 1px) + .25px) );--radius-end: radial-gradient( circle at top right, transparent var(--tab-grad), var(--tab-border-color) calc(var(--tab-grad) + .25px), var(--tab-border-color) calc(var(--tab-grad) + var(--tab-border, 1px)), var(--tab-bg) calc(var(--tab-grad) + var(--tab-border, 1px) + .25px) );background-image:var(--radius-start),var(--radius-end)}.tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):first-child:before,.tabs-lifted>.tab:is(input:checked):first-child:before{background-image:var(--radius-end);background-position:top right}[dir=rtl] .tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):first-child:before,[dir=rtl] .tabs-lifted>.tab:is(input:checked):first-child:before{background-image:var(--radius-start);background-position:top left}.tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):last-child:before,.tabs-lifted>.tab:is(input:checked):last-child:before{background-image:var(--radius-start);background-position:top left}[dir=rtl] .tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):last-child:before,[dir=rtl] .tabs-lifted>.tab:is(input:checked):last-child:before{background-image:var(--radius-end);background-position:top right}.tabs-lifted>:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled])+.tabs-lifted :is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):before,.tabs-lifted>.tab:is(input:checked)+.tabs-lifted .tab:is(input:checked):before{background-image:var(--radius-end);background-position:top right}.tabs-boxed{border-radius:var(--rounded-btn, .5rem);--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));padding:.25rem}.tabs-boxed .tab{border-radius:var(--rounded-btn, .5rem)}.tabs-boxed :is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]),.tabs-boxed :is(input:checked){--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.table:where([dir=rtl],[dir=rtl] *){text-align:right}.table :where(th,td){padding:.75rem 1rem;vertical-align:middle}.table tr.active,.table tr.active:nth-child(2n),.table-zebra tbody tr:nth-child(2n){--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))}.table-zebra tr.active,.table-zebra tr.active:nth-child(2n),.table-zebra-zebra tbody tr:nth-child(2n){--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}.table :where(thead tr,tbody tr:not(:last-child),tbody tr:first-child:last-child){border-bottom-width:1px;--tw-border-opacity: 1;border-bottom-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}.table :where(thead,tfoot){white-space:nowrap;font-size:.75rem;line-height:1rem;font-weight:700;color:var(--fallback-bc,oklch(var(--bc)/.6))}.table :where(tfoot){border-top-width:1px;--tw-border-opacity: 1;border-top-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}.textarea-bordered{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}.textarea:focus{box-shadow:none;border-color:var(--fallback-bc,oklch(var(--bc)/.2));outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.textarea-disabled,.textarea:disabled,.textarea[disabled]{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}.textarea-disabled::-moz-placeholder,.textarea:disabled::-moz-placeholder,.textarea[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.textarea-disabled::placeholder,.textarea:disabled::placeholder,.textarea[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.toast>*{animation:toast-pop .25s ease-out}@keyframes toast-pop{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}[dir=rtl] .toggle{--handleoffsetcalculator: calc(var(--handleoffset) * 1)}.toggle:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.toggle:hover{background-color:currentColor}.toggle:checked,.toggle[aria-checked=true]{background-image:none;--handleoffsetcalculator: var(--handleoffset);--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}[dir=rtl] .toggle:checked,[dir=rtl] .toggle[aria-checked=true]{--handleoffsetcalculator: calc(var(--handleoffset) * -1)}.toggle:indeterminate{--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));box-shadow:calc(var(--handleoffset) / 2) 0 0 2px var(--tglbg) inset,calc(var(--handleoffset) / -2) 0 0 2px var(--tglbg) inset,0 0 0 2px var(--tglbg) inset}[dir=rtl] .toggle:indeterminate{box-shadow:calc(var(--handleoffset) / 2) 0 0 2px var(--tglbg) inset,calc(var(--handleoffset) / -2) 0 0 2px var(--tglbg) inset,0 0 0 2px var(--tglbg) inset}.toggle-primary:focus-visible{outline-color:var(--fallback-p,oklch(var(--p)/1))}.toggle-primary:checked,.toggle-primary[aria-checked=true]{border-color:var(--fallback-p,oklch(var(--p)/var(--tw-border-opacity)));--tw-border-opacity: .1;--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.toggle:disabled{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));background-color:transparent;opacity:.3;--togglehandleborder: 0 0 0 3px var(--fallback-bc,oklch(var(--bc)/1)) inset, var(--handleoffsetcalculator) 0 0 3px var(--fallback-bc,oklch(var(--bc)/1)) inset}.badge-xs{height:.75rem;font-size:.75rem;line-height:.75rem;padding-left:.313rem;padding-right:.313rem}.badge-sm{height:1rem;font-size:.75rem;line-height:1rem;padding-left:.438rem;padding-right:.438rem}.badge-lg{height:1.5rem;font-size:1rem;line-height:1.5rem;padding-left:.688rem;padding-right:.688rem}.btm-nav-xs>*:where(.active){border-top-width:1px}.btm-nav-sm>*:where(.active){border-top-width:2px}.btm-nav-md>*:where(.active){border-top-width:2px}.btm-nav-lg>*:where(.active){border-top-width:4px}.btn-xs{height:1.5rem;min-height:1.5rem;padding-left:.5rem;padding-right:.5rem;font-size:.75rem}.btn-sm{height:2rem;min-height:2rem;padding-left:.75rem;padding-right:.75rem;font-size:.875rem}.btn-square:where(.btn-xs){height:1.5rem;width:1.5rem;padding:0}.btn-square:where(.btn-sm){height:2rem;width:2rem;padding:0}.btn-square:where(.btn-md){height:3rem;width:3rem;padding:0}.btn-square:where(.btn-lg){height:4rem;width:4rem;padding:0}.btn-circle:where(.btn-xs){height:1.5rem;width:1.5rem;border-radius:9999px;padding:0}.btn-circle:where(.btn-sm){height:2rem;width:2rem;border-radius:9999px;padding:0}.btn-circle:where(.btn-md){height:3rem;width:3rem;border-radius:9999px;padding:0}.btn-circle:where(.btn-lg){height:4rem;width:4rem;border-radius:9999px;padding:0}[type=checkbox].checkbox-sm{height:1.25rem;width:1.25rem}.indicator :where(.indicator-item){bottom:auto;inset-inline-end:0px;inset-inline-start:auto;top:0;--tw-translate-y: -50%;--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item):where([dir=rtl],[dir=rtl] *){--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-start){inset-inline-end:auto;inset-inline-start:0px;--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-start):where([dir=rtl],[dir=rtl] *){--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-center){inset-inline-end:50%;inset-inline-start:50%;--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-center):where([dir=rtl],[dir=rtl] *){--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-end){inset-inline-end:0px;inset-inline-start:auto;--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-end):where([dir=rtl],[dir=rtl] *){--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-bottom){bottom:0;top:auto;--tw-translate-y: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-middle){bottom:50%;top:50%;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-top){bottom:auto;top:0;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.input-sm{height:2rem;padding-left:.75rem;padding-right:.75rem;font-size:.875rem;line-height:2rem}.join.join-vertical{flex-direction:column}.join.join-vertical .join-item:first-child:not(:last-child),.join.join-vertical *:first-child:not(:last-child) .join-item{border-end-start-radius:0;border-end-end-radius:0;border-start-start-radius:inherit;border-start-end-radius:inherit}.join.join-vertical .join-item:last-child:not(:first-child),.join.join-vertical *:last-child:not(:first-child) .join-item{border-start-start-radius:0;border-start-end-radius:0;border-end-start-radius:inherit;border-end-end-radius:inherit}.join.join-horizontal{flex-direction:row}.join.join-horizontal .join-item:first-child:not(:last-child),.join.join-horizontal *:first-child:not(:last-child) .join-item{border-end-end-radius:0;border-start-end-radius:0;border-end-start-radius:inherit;border-start-start-radius:inherit}.join.join-horizontal .join-item:last-child:not(:first-child),.join.join-horizontal *:last-child:not(:first-child) .join-item{border-end-start-radius:0;border-start-start-radius:0;border-end-end-radius:inherit;border-start-end-radius:inherit}.kbd-xs{padding-left:.25rem;padding-right:.25rem;font-size:.75rem;line-height:1rem;min-height:1.2em;min-width:1.2em}.menu-horizontal{display:inline-flex;flex-direction:row}.menu-horizontal>li:not(.menu-title)>details>ul{position:absolute}.select-sm{height:2rem;min-height:2rem;padding-left:.75rem;padding-right:2rem;font-size:.875rem;line-height:2rem}[dir=rtl] .select-sm{padding-left:2rem;padding-right:.75rem}.steps-horizontal .step{display:grid;grid-template-columns:repeat(1,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));place-items:center;text-align:center}.steps-vertical .step{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(1,minmax(0,1fr))}.tabs-md :where(.tab){height:2rem;font-size:.875rem;line-height:1.25rem;line-height:2;--tab-padding: 1rem}.tabs-lg :where(.tab){height:3rem;font-size:1.125rem;line-height:1.75rem;line-height:2;--tab-padding: 1.25rem}.tabs-sm :where(.tab){height:1.5rem;font-size:.875rem;line-height:.75rem;--tab-padding: .75rem}.tabs-xs :where(.tab){height:1.25rem;font-size:.75rem;line-height:.75rem;--tab-padding: .5rem}.textarea-sm{padding:.25rem .75rem;font-size:.875rem;line-height:2rem}:where(.toast){bottom:0;inset-inline-end:0px;inset-inline-start:auto;top:auto;--tw-translate-x: 0px;--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-start){inset-inline-end:auto;inset-inline-start:0px;--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-center){inset-inline-end:50%;inset-inline-start:50%;--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-center):where([dir=rtl],[dir=rtl] *){--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-end){inset-inline-end:0px;inset-inline-start:auto;--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-bottom){bottom:0;top:auto;--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-middle){bottom:auto;top:50%;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-top){bottom:auto;top:0;--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[type=checkbox].toggle-sm{--handleoffset: .75rem;height:1.25rem;width:2rem}.tooltip{position:relative;display:inline-block;--tooltip-offset: calc(100% + 1px + var(--tooltip-tail, 0px))}.tooltip:before{position:absolute;pointer-events:none;z-index:1;content:var(--tw-content);--tw-content: attr(data-tip)}.tooltip:before,.tooltip-top:before{transform:translate(-50%);top:auto;left:50%;right:auto;bottom:var(--tooltip-offset)}.tooltip-right:before{transform:translateY(-50%);top:50%;left:var(--tooltip-offset);right:auto;bottom:auto}.card-compact .card-body{padding:1rem;font-size:.875rem;line-height:1.25rem}.card-compact .card-title{margin-bottom:.25rem}.card-normal .card-body{padding:var(--padding-card, 2rem);font-size:1rem;line-height:1.5rem}.card-normal .card-title{margin-bottom:.75rem}.join.join-vertical>:where(*:not(:first-child)){margin-left:0;margin-right:0;margin-top:-1px}.join.join-vertical>:where(*:not(:first-child)):is(.btn){margin-top:calc(var(--border-btn) * -1)}.join.join-horizontal>:where(*:not(:first-child)){margin-top:0;margin-bottom:0;margin-inline-start:-1px}.join.join-horizontal>:where(*:not(:first-child)):is(.btn){margin-inline-start:calc(var(--border-btn) * -1);margin-top:0}.menu-horizontal>li:not(.menu-title)>details>ul{margin-inline-start:0px;margin-top:1rem;padding-top:.5rem;padding-bottom:.5rem;padding-inline-end:.5rem}.menu-horizontal>li>details>ul:before{content:none}:where(.menu-horizontal>li:not(.menu-title)>details>ul){border-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.modal-top :where(.modal-box){width:100%;max-width:none;--tw-translate-y: -2.5rem;--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-bottom-right-radius:var(--rounded-box, 1rem);border-bottom-left-radius:var(--rounded-box, 1rem);border-top-left-radius:0;border-top-right-radius:0}.modal-middle :where(.modal-box){width:91.666667%;max-width:32rem;--tw-translate-y: 0px;--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-top-left-radius:var(--rounded-box, 1rem);border-top-right-radius:var(--rounded-box, 1rem);border-bottom-right-radius:var(--rounded-box, 1rem);border-bottom-left-radius:var(--rounded-box, 1rem)}.modal-bottom :where(.modal-box){width:100%;max-width:none;--tw-translate-y: 2.5rem;--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-top-left-radius:var(--rounded-box, 1rem);border-top-right-radius:var(--rounded-box, 1rem);border-bottom-right-radius:0;border-bottom-left-radius:0}.steps-horizontal .step{grid-template-rows:40px 1fr;grid-template-columns:auto;min-width:4rem}.steps-horizontal .step:before{height:.5rem;width:100%;--tw-translate-x: 0px;--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));content:\"\";margin-inline-start:-100%}.steps-horizontal .step:where([dir=rtl],[dir=rtl] *):before{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.steps-vertical .step{gap:.5rem;grid-template-columns:40px 1fr;grid-template-rows:auto;min-height:4rem;justify-items:start}.steps-vertical .step:before{height:100%;width:.5rem;--tw-translate-x: -50%;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));margin-inline-start:50%}.steps-vertical .step:where([dir=rtl],[dir=rtl] *):before{--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.table-xs :not(thead):not(tfoot) tr{font-size:.75rem;line-height:1rem}.table-xs :where(th,td){padding:.25rem .5rem}.table-sm :not(thead):not(tfoot) tr{font-size:.875rem;line-height:1.25rem}.table-sm :where(th,td){padding:.5rem .75rem}.tooltip{position:relative;display:inline-block;text-align:center;--tooltip-tail: .1875rem;--tooltip-color: var(--fallback-n,oklch(var(--n)/1));--tooltip-text-color: var(--fallback-nc,oklch(var(--nc)/1));--tooltip-tail-offset: calc(100% + .0625rem - var(--tooltip-tail))}.tooltip:before,.tooltip:after{opacity:0;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-delay:.1s;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.tooltip:after{position:absolute;content:\"\";border-style:solid;border-width:var(--tooltip-tail, 0);width:0;height:0;display:block}.tooltip:before{max-width:20rem;white-space:normal;border-radius:.25rem;padding:.25rem .5rem;font-size:.875rem;line-height:1.25rem;background-color:var(--tooltip-color);color:var(--tooltip-text-color);width:-moz-max-content;width:max-content}.tooltip.tooltip-open:before{opacity:1;transition-delay:75ms}.tooltip.tooltip-open:after{opacity:1;transition-delay:75ms}.tooltip:hover:before{opacity:1;transition-delay:75ms}.tooltip:hover:after{opacity:1;transition-delay:75ms}.tooltip:has(:focus-visible):after,.tooltip:has(:focus-visible):before{opacity:1;transition-delay:75ms}.tooltip:not([data-tip]):hover:before,.tooltip:not([data-tip]):hover:after{visibility:hidden;opacity:0}.tooltip:after,.tooltip-top:after{transform:translate(-50%);border-color:var(--tooltip-color) transparent transparent transparent;top:auto;left:50%;right:auto;bottom:var(--tooltip-tail-offset)}.tooltip-right:after{transform:translateY(-50%);border-color:transparent var(--tooltip-color) transparent transparent;top:50%;left:calc(var(--tooltip-tail-offset) + .0625rem);right:auto;bottom:auto}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.visible{visibility:visible}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.top-24{top:6rem}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.z-\\[1\\]{z-index:1}.col-span-2{grid-column:span 2 / span 2}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:.5rem;margin-bottom:.5rem}.-mt-0\\.5{margin-top:-.125rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-6{margin-left:1.5rem}.ml-8{margin-left:2rem}.mr-1{margin-right:.25rem}.mr-32{margin-right:8rem}.mt-0\\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-12{height:3rem}.h-16{height:4rem}.h-2\\.5{height:.625rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-96{height:24rem}.h-\\[90vh\\]{height:90vh}.h-full{height:100%}.h-screen{height:100vh}.max-h-32{max-height:8rem}.max-h-60{max-height:15rem}.max-h-96{max-height:24rem}.max-h-\\[60vh\\]{max-height:60vh}.max-h-\\[70vh\\]{max-height:70vh}.min-h-0{min-height:0px}.min-h-\\[2\\.5rem\\]{min-height:2.5rem}.min-h-screen{min-height:100vh}.w-1\\/3{width:33.333333%}.w-11\\/12{width:91.666667%}.w-12{width:3rem}.w-16{width:4rem}.w-2\\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-32{width:8rem}.w-4{width:1rem}.w-40{width:10rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-full{width:100%}.w-px{width:1px}.min-w-\\[200px\\]{min-width:200px}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-md{max-width:28rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-\\[2\\]{flex:2}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-help{cursor:help}.cursor-pointer{cursor:pointer}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-y-0\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-box{border-radius:var(--rounded-box, 1rem)}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-l-2{border-left-width:2px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-base-300{--tw-border-opacity: 1;border-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-border-opacity, 1)))}.border-base-content\\/20{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}.border-error\\/20{border-color:var(--fallback-er,oklch(var(--er)/.2))}.bg-base-100{--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity, 1)))}.bg-base-200{--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity, 1)))}.bg-base-300{--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity, 1)))}.bg-base-300\\/30{background-color:var(--fallback-b3,oklch(var(--b3)/.3))}.bg-base-content{--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity, 1)))}.bg-base-content\\/30{background-color:var(--fallback-bc,oklch(var(--bc)/.3))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-error{--tw-bg-opacity: 1;background-color:var(--fallback-er,oklch(var(--er)/var(--tw-bg-opacity, 1)))}.bg-error\\/10{background-color:var(--fallback-er,oklch(var(--er)/.1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))}.bg-primary{--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity, 1)))}.bg-purple-500{--tw-bg-opacity: 1;background-color:rgb(168 85 247 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-success{--tw-bg-opacity: 1;background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity, 1)))}.bg-warning{--tw-bg-opacity: 1;background-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-bg-opacity, 1)))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.stroke-current{stroke:currentColor}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-64{padding-left:16rem;padding-right:16rem}.py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-32{padding-bottom:8rem}.pl-4{padding-left:1rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-6xl{font-size:3.75rem;line-height:1}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.leading-7{line-height:1.75rem}.text-base-content{--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity, 1)))}.text-base-content\\/60{color:var(--fallback-bc,oklch(var(--bc)/.6))}.text-base-content\\/70{color:var(--fallback-bc,oklch(var(--bc)/.7))}.text-error{--tw-text-opacity: 1;color:var(--fallback-er,oklch(var(--er)/var(--tw-text-opacity, 1)))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-primary{--tw-text-opacity: 1;color:var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity, 1)))}.text-primary-content{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity, 1)))}.text-success{--tw-text-opacity: 1;color:var(--fallback-su,oklch(var(--su)/var(--tw-text-opacity, 1)))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.opacity-20{opacity:.2}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-filter{backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}.hover\\:bg-base-200:hover{--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity, 1)))}.hover\\:bg-base-300:hover{--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity, 1)))}.hover\\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.hover\\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.group:hover .group-hover\\:opacity-90{opacity:.9}@media (min-width: 768px){.md\\:col-span-3{grid-column:span 3 / span 3}.md\\:inline{display:inline}.md\\:flex{display:flex}.md\\:hidden{display:none}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 1024px){.lg\\:col-span-2{grid-column:span 2 / span 2}.lg\\:col-span-6{grid-column:span 6 / span 6}.lg\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\\:text-3xl{font-size:1.875rem;line-height:2.25rem}}@media (min-width: 1280px){.xl\\:flex{display:flex}.xl\\:hidden{display:none}.xl\\:max-w-md{max-width:28rem}}@media (prefers-color-scheme: dark){.dark\\:bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.dark\\:text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.dark\\:hover\\:text-gray-100:hover{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity, 1))}}\n",
21254
+ "vendor-7HrnnMjF.js": 'function Ye(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Y,ce;function Ze(){if(ce)return Y;ce=1;var e=function(b){return t(b)&&!n(b)};function t(f){return!!f&&typeof f=="object"}function n(f){var b=Object.prototype.toString.call(f);return b==="[object RegExp]"||b==="[object Date]"||a(f)}var r=typeof Symbol=="function"&&Symbol.for,i=r?Symbol.for("react.element"):60103;function a(f){return f.$$typeof===i}function s(f){return Array.isArray(f)?[]:{}}function o(f,b){return b.clone!==!1&&b.isMergeableObject(f)?H(s(f),f,b):f}function l(f,b,m){return f.concat(b).map(function(_){return o(_,m)})}function u(f,b){if(!b.customMerge)return H;var m=b.customMerge(f);return typeof m=="function"?m:H}function h(f){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(f).filter(function(b){return Object.propertyIsEnumerable.call(f,b)}):[]}function p(f){return Object.keys(f).concat(h(f))}function c(f,b){try{return b in f}catch{return!1}}function v(f,b){return c(f,b)&&!(Object.hasOwnProperty.call(f,b)&&Object.propertyIsEnumerable.call(f,b))}function B(f,b,m){var _={};return m.isMergeableObject(f)&&p(f).forEach(function(E){_[E]=o(f[E],m)}),p(b).forEach(function(E){v(f,E)||(c(f,E)&&m.isMergeableObject(b[E])?_[E]=u(E,m)(f[E],b[E],m):_[E]=o(b[E],m))}),_}function H(f,b,m){m=m||{},m.arrayMerge=m.arrayMerge||l,m.isMergeableObject=m.isMergeableObject||e,m.cloneUnlessOtherwiseSpecified=o;var _=Array.isArray(b),E=Array.isArray(f),L=_===E;return L?_?m.arrayMerge(f,b,m):B(f,b,m):o(b,m)}H.all=function(b,m){if(!Array.isArray(b))throw new Error("first argument should be an array");return b.reduce(function(_,E){return H(_,E,m)},{})};var P=H;return Y=P,Y}var We=Ze();const cr=Ye(We);var K=function(e,t){return K=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},K(e,t)};function j(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");K(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var d=function(){return d=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},d.apply(this,arguments)};function $e(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Z(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function W(e,t){var n=t&&t.cache?t.cache:tt,r=t&&t.serializer?t.serializer:Ke,i=t&&t.strategy?t.strategy:Qe;return i(e,{cache:n,serializer:r})}function ze(e){return e==null||typeof e=="number"||typeof e=="boolean"}function qe(e,t,n,r){var i=ze(r)?r:n(r),a=t.get(i);return typeof a>"u"&&(a=e.call(this,r),t.set(i,a)),a}function Be(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),a=t.get(i);return typeof a>"u"&&(a=e.apply(this,r),t.set(i,a)),a}function Ae(e,t,n,r,i){return n.bind(t,e,r,i)}function Qe(e,t){var n=e.length===1?qe:Be;return Ae(e,this,n,t.cache.create(),t.serializer)}function Je(e,t){return Ae(e,this,Be,t.cache.create(),t.serializer)}var Ke=function(){return JSON.stringify(arguments)},et=(function(){function e(){this.cache=Object.create(null)}return e.prototype.get=function(t){return this.cache[t]},e.prototype.set=function(t,n){this.cache[t]=n},e})(),tt={create:function(){return new et}},$={variadic:Je},g;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(g||(g={}));var y;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(y||(y={}));var M;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(M||(M={}));function be(e){return e.type===y.literal}function rt(e){return e.type===y.argument}function Pe(e){return e.type===y.number}function Ie(e){return e.type===y.date}function Ne(e){return e.type===y.time}function Oe(e){return e.type===y.select}function Le(e){return e.type===y.plural}function nt(e){return e.type===y.pound}function Re(e){return e.type===y.tag}function Me(e){return!!(e&&typeof e=="object"&&e.type===M.number)}function ee(e){return!!(e&&typeof e=="object"&&e.type===M.dateTime)}var Ce=/[ \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]/,it=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^\']*\'[^\']*\')*[^\']*$)/g;function at(e){var t={};return e.replace(it,function(n){var r=n.length;switch(n[0]){case"G":t.era=r===4?"long":r===5?"narrow":"short";break;case"y":t.year=r===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=r===4?"long":r===5?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var st=/[\\t-\\r \\x85\\u200E\\u200F\\u2028\\u2029]/i;function ot(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(st).filter(function(c){return c.length>0}),n=[],r=0,i=t;r<i.length;r++){var a=i[r],s=a.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var o=s[0],l=s.slice(1),u=0,h=l;u<h.length;u++){var p=h[u];if(p.length===0)throw new Error("Invalid number skeleton")}n.push({stem:o,options:l})}return n}function ht(e){return e.replace(/^(.*?)-/,"")}var pe=/^\\.(?:(0+)(\\*)?|(#+)|(0+)(#+))$/g,we=/^(@+)?(\\+|#+)?[rs]?$/g,ut=/(\\*)(0+)|(#+)(0+)|(0+)/g,Ue=/^(0+)$/;function me(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(we,function(n,r,i){return typeof i!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):i==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof i=="string"?i.length:0)),""}),t}function Ge(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function ft(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!Ue.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function ge(e){var t={},n=Ge(e);return n||t}function lt(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=ht(i.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=d(d(d({},t),{notation:"scientific"}),i.options.reduce(function(l,u){return d(d({},l),ge(u))},{}));continue;case"engineering":t=d(d(d({},t),{notation:"engineering"}),i.options.reduce(function(l,u){return d(d({},l),ge(u))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(ut,function(l,u,h,p,c,v){if(u)t.minimumIntegerDigits=h.length;else{if(p&&c)throw new Error("We currently do not support maximum integer digits");if(v)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Ue.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(pe.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(pe,function(l,u,h,p,c,v){return h==="*"?t.minimumFractionDigits=u.length:p&&p[0]==="#"?t.maximumFractionDigits=p.length:c&&v?(t.minimumFractionDigits=c.length,t.maximumFractionDigits=c.length+v.length):(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length),""});var a=i.options[0];a==="w"?t=d(d({},t),{trailingZeroDisplay:"stripIfInteger"}):a&&(t=d(d({},t),me(a)));continue}if(we.test(i.stem)){t=d(d({},t),me(i.stem));continue}var s=Ge(i.stem);s&&(t=d(d({},t),s));var o=ft(i.stem);o&&(t=d(d({},t),o))}return t}var G={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function ct(e,t){for(var n="",r=0;r<e.length;r++){var i=e.charAt(r);if(i==="j"){for(var a=0;r+1<e.length&&e.charAt(r+1)===i;)a++,r++;var s=1+(a&1),o=a<2?1:3+(a>>1),l="a",u=bt(t);for((u=="H"||u=="k")&&(o=0);o-- >0;)n+=l;for(;s-- >0;)n=u+n}else i==="J"?n+="H":n+=i}return n}function bt(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=e.language,r;n!=="root"&&(r=e.maximize().region);var i=G[r||""]||G[n||""]||G["".concat(n,"-001")]||G["001"];return i[0]}var z,pt=new RegExp("^".concat(Ce.source,"*")),mt=new RegExp("".concat(Ce.source,"*$"));function x(e,t){return{start:e,end:t}}var gt=!!String.prototype.startsWith&&"_a".startsWith("a",1),xt=!!String.fromCodePoint,dt=!!Object.fromEntries,Et=!!String.prototype.codePointAt,yt=!!String.prototype.trimStart,vt=!!String.prototype.trimEnd,Ht=!!Number.isSafeInteger,_t=Ht?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},te=!0;try{var Tt=De("([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)","yu");te=((z=Tt.exec("a"))===null||z===void 0?void 0:z[0])==="a"}catch{te=!1}var xe=gt?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},re=xt?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",i=t.length,a=0,s;i>a;){if(s=t[a++],s>1114111)throw RangeError(s+" is not a valid code point");r+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return r},de=dt?Object.fromEntries:function(t){for(var n={},r=0,i=t;r<i.length;r++){var a=i[r],s=a[0],o=a[1];n[s]=o}return n},Fe=Et?function(t,n){return t.codePointAt(n)}:function(t,n){var r=t.length;if(!(n<0||n>=r)){var i=t.charCodeAt(n),a;return i<55296||i>56319||n+1===r||(a=t.charCodeAt(n+1))<56320||a>57343?i:(i-55296<<10)+(a-56320)+65536}},St=yt?function(t){return t.trimStart()}:function(t){return t.replace(pt,"")},Bt=vt?function(t){return t.trimEnd()}:function(t){return t.replace(mt,"")};function De(e,t){return new RegExp(e,t)}var ne;if(te){var Ee=De("([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)","yu");ne=function(t,n){var r;Ee.lastIndex=n;var i=Ee.exec(t);return(r=i[1])!==null&&r!==void 0?r:""}}else ne=function(t,n){for(var r=[];;){var i=Fe(t,n);if(i===void 0||Ve(i)||Nt(i))break;r.push(i),n+=i>=65536?2:1}return re.apply(void 0,r)};var At=(function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,r){for(var i=[];!this.isEOF();){var a=this.char();if(a===123){var s=this.parseArgument(t,r);if(s.err)return s;i.push(s.val)}else{if(a===125&&t>0)break;if(a===35&&(n==="plural"||n==="selectordinal")){var o=this.clonePosition();this.bump(),i.push({type:y.pound,location:x(o,this.clonePosition())})}else if(a===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(g.UNMATCHED_CLOSING_TAG,x(this.clonePosition(),this.clonePosition()))}else if(a===60&&!this.ignoreTag&&ie(this.peek()||0)){var s=this.parseTag(t,n);if(s.err)return s;i.push(s.val)}else{var s=this.parseLiteral(t,n);if(s.err)return s;i.push(s.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:y.literal,value:"<".concat(i,"/>"),location:x(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var a=this.parseMessage(t+1,n,!0);if(a.err)return a;var s=a.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!ie(this.char()))return this.error(g.INVALID_TAG,x(o,this.clonePosition()));var l=this.clonePosition(),u=this.parseTagName();return i!==u?this.error(g.UNMATCHED_CLOSING_TAG,x(l,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:y.tag,value:i,children:s,location:x(r,this.clonePosition())},err:null}:this.error(g.INVALID_TAG,x(o,this.clonePosition())))}else return this.error(g.UNCLOSED_TAG,x(r,this.clonePosition()))}else return this.error(g.INVALID_TAG,x(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&It(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),i="";;){var a=this.tryParseQuote(n);if(a){i+=a;continue}var s=this.tryParseUnquoted(t,n);if(s){i+=s;continue}var o=this.tryParseLeftAngleBracket();if(o){i+=o;continue}break}var l=x(r,this.clonePosition());return{val:{type:y.literal,value:i,location:l},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Pt(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"\'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(r===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(r);this.bump()}return re.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var r=this.char();return r===60||r===123||r===35&&(n==="plural"||n==="selectordinal")||r===125&&t>0?null:(this.bump(),re(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE,x(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(g.EMPTY_ARGUMENT,x(r,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(g.MALFORMED_ARGUMENT,x(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE,x(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:y.argument,value:i,location:x(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE,x(r,this.clonePosition())):this.parseArgumentOptions(t,n,i,r);default:return this.error(g.MALFORMED_ARGUMENT,x(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=ne(this.message,n),i=n+r.length;this.bumpTo(i);var a=this.clonePosition(),s=x(t,a);return{value:r,location:s}},e.prototype.parseArgumentOptions=function(t,n,r,i){var a,s=this.clonePosition(),o=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(o){case"":return this.error(g.EXPECT_ARGUMENT_TYPE,x(s,l));case"number":case"date":case"time":{this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var h=this.clonePosition(),p=this.parseSimpleArgStyleIfPossible();if(p.err)return p;var c=Bt(p.val);if(c.length===0)return this.error(g.EXPECT_ARGUMENT_STYLE,x(this.clonePosition(),this.clonePosition()));var v=x(h,this.clonePosition());u={style:c,styleLocation:v}}var B=this.tryParseArgumentClose(i);if(B.err)return B;var H=x(i,this.clonePosition());if(u&&xe(u?.style,"::",0)){var P=St(u.style.slice(2));if(o==="number"){var p=this.parseNumberSkeletonFromString(P,u.styleLocation);return p.err?p:{val:{type:y.number,value:r,location:H,style:p.val},err:null}}else{if(P.length===0)return this.error(g.EXPECT_DATE_TIME_SKELETON,H);var f=P;this.locale&&(f=ct(P,this.locale));var c={type:M.dateTime,pattern:f,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?at(f):{}},b=o==="date"?y.date:y.time;return{val:{type:b,value:r,location:H,style:c},err:null}}}return{val:{type:o==="number"?y.number:o==="date"?y.date:y.time,value:r,location:H,style:(a=u?.style)!==null&&a!==void 0?a:null},err:null}}case"plural":case"selectordinal":case"select":{var m=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(g.EXPECT_SELECT_ARGUMENT_OPTIONS,x(m,d({},m)));this.bumpSpace();var _=this.parseIdentifierIfPossible(),E=0;if(o!=="select"&&_.value==="offset"){if(!this.bumpIf(":"))return this.error(g.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,x(this.clonePosition(),this.clonePosition()));this.bumpSpace();var p=this.tryParseDecimalInteger(g.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,g.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(p.err)return p;this.bumpSpace(),_=this.parseIdentifierIfPossible(),E=p.val}var L=this.tryParsePluralOrSelectOptions(t,o,n,_);if(L.err)return L;var B=this.tryParseArgumentClose(i);if(B.err)return B;var le=x(i,this.clonePosition());return o==="select"?{val:{type:y.select,value:r,options:de(L.val),location:le},err:null}:{val:{type:y.plural,value:r,options:de(L.val),offset:E,pluralType:o==="plural"?"cardinal":"ordinal",location:le},err:null}}default:return this.error(g.INVALID_ARGUMENT_TYPE,x(s,l))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE,x(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var r=this.char();switch(r){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("\'"))return this.error(g.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,x(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var r=[];try{r=ot(t)}catch{return this.error(g.INVALID_NUMBER_SKELETON,n)}return{val:{type:M.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?lt(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,i){for(var a,s=!1,o=[],l=new Set,u=i.value,h=i.location;;){if(u.length===0){var p=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var c=this.tryParseDecimalInteger(g.EXPECT_PLURAL_ARGUMENT_SELECTOR,g.INVALID_PLURAL_ARGUMENT_SELECTOR);if(c.err)return c;h=x(p,this.clonePosition()),u=this.message.slice(p.offset,this.offset())}else break}if(l.has(u))return this.error(n==="select"?g.DUPLICATE_SELECT_ARGUMENT_SELECTOR:g.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,h);u==="other"&&(s=!0),this.bumpSpace();var v=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?g.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:g.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,x(this.clonePosition(),this.clonePosition()));var B=this.parseMessage(t+1,n,r);if(B.err)return B;var H=this.tryParseArgumentClose(v);if(H.err)return H;o.push([u,{value:B.val,location:x(v,this.clonePosition())}]),l.add(u),this.bumpSpace(),a=this.parseIdentifierIfPossible(),u=a.value,h=a.location}return o.length===0?this.error(n==="select"?g.EXPECT_SELECT_ARGUMENT_SELECTOR:g.EXPECT_PLURAL_ARGUMENT_SELECTOR,x(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(g.MISSING_OTHER_CLAUSE,x(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var a=!1,s=0;!this.isEOF();){var o=this.char();if(o>=48&&o<=57)a=!0,s=s*10+(o-48),this.bump();else break}var l=x(i,this.clonePosition());return a?(s*=r,_t(s)?{val:s,err:null}:this.error(n,l)):this.error(t,l)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=Fe(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(xe(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),r=this.message.indexOf(t,n);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Ve(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),r=this.message.charCodeAt(n+(t>=65536?2:1));return r??null},e})();function ie(e){return e>=97&&e<=122||e>=65&&e<=90}function Pt(e){return ie(e)||e===47}function It(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Ve(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Nt(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function ae(e){e.forEach(function(t){if(delete t.location,Oe(t)||Le(t))for(var n in t.options)delete t.options[n].location,ae(t.options[n].value);else Pe(t)&&Me(t.style)||(Ie(t)||Ne(t))&&ee(t.style)?delete t.style.location:Re(t)&&ae(t.children)})}function Ot(e,t){t===void 0&&(t={}),t=d({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new At(e,t).parse();if(n.err){var r=SyntaxError(g[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t?.captureLocation||ae(n.val),n.val}var C;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(C||(C={}));var k=(function(e){j(t,e);function t(n,r,i){var a=e.call(this,n)||this;return a.code=r,a.originalMessage=i,a}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t})(Error),ye=(function(e){j(t,e);function t(n,r,i,a){return e.call(this,\'Invalid values for "\'.concat(n,\'": "\').concat(r,\'". Options are "\').concat(Object.keys(i).join(\'", "\'),\'"\'),C.INVALID_VALUE,a)||this}return t})(k),Lt=(function(e){j(t,e);function t(n,r,i){return e.call(this,\'Value for "\'.concat(n,\'" must be of type \').concat(r),C.INVALID_VALUE,i)||this}return t})(k),Rt=(function(e){j(t,e);function t(n,r){return e.call(this,\'The intl string context variable "\'.concat(n,\'" was not provided to the string "\').concat(r,\'"\'),C.MISSING_VALUE,r)||this}return t})(k),S;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(S||(S={}));function Mt(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==S.literal||n.type!==S.literal?t.push(n):r.value+=n.value,t},[])}function Ct(e){return typeof e=="function"}function X(e,t,n,r,i,a,s){if(e.length===1&&be(e[0]))return[{type:S.literal,value:e[0].value}];for(var o=[],l=0,u=e;l<u.length;l++){var h=u[l];if(be(h)){o.push({type:S.literal,value:h.value});continue}if(nt(h)){typeof a=="number"&&o.push({type:S.literal,value:n.getNumberFormat(t).format(a)});continue}var p=h.value;if(!(i&&p in i))throw new Rt(p,s);var c=i[p];if(rt(h)){(!c||typeof c=="string"||typeof c=="number")&&(c=typeof c=="string"||typeof c=="number"?String(c):""),o.push({type:typeof c=="string"?S.literal:S.object,value:c});continue}if(Ie(h)){var v=typeof h.style=="string"?r.date[h.style]:ee(h.style)?h.style.parsedOptions:void 0;o.push({type:S.literal,value:n.getDateTimeFormat(t,v).format(c)});continue}if(Ne(h)){var v=typeof h.style=="string"?r.time[h.style]:ee(h.style)?h.style.parsedOptions:r.time.medium;o.push({type:S.literal,value:n.getDateTimeFormat(t,v).format(c)});continue}if(Pe(h)){var v=typeof h.style=="string"?r.number[h.style]:Me(h.style)?h.style.parsedOptions:void 0;v&&v.scale&&(c=c*(v.scale||1)),o.push({type:S.literal,value:n.getNumberFormat(t,v).format(c)});continue}if(Re(h)){var B=h.children,H=h.value,P=i[H];if(!Ct(P))throw new Lt(H,"function",s);var f=X(B,t,n,r,i,a),b=P(f.map(function(E){return E.value}));Array.isArray(b)||(b=[b]),o.push.apply(o,b.map(function(E){return{type:typeof E=="string"?S.literal:S.object,value:E}}))}if(Oe(h)){var m=h.options[c]||h.options.other;if(!m)throw new ye(h.value,c,Object.keys(h.options),s);o.push.apply(o,X(m.value,t,n,r,i));continue}if(Le(h)){var m=h.options["=".concat(c)];if(!m){if(!Intl.PluralRules)throw new k(`Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n`,C.MISSING_INTL_API,s);var _=n.getPluralRules(t,{type:h.pluralType}).select(c-(h.offset||0));m=h.options[_]||h.options.other}if(!m)throw new ye(h.value,c,Object.keys(h.options),s);o.push.apply(o,X(m.value,t,n,r,i,c-(h.offset||0)));continue}}return Mt(o)}function wt(e,t){return t?d(d(d({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=d(d({},e[r]),t[r]||{}),n},{})):e}function Ut(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=wt(e[r],t[r]),n},d({},e)):e}function q(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function Gt(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:W(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,Z([void 0],n,!1)))},{cache:q(e.number),strategy:$.variadic}),getDateTimeFormat:W(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,Z([void 0],n,!1)))},{cache:q(e.dateTime),strategy:$.variadic}),getPluralRules:W(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,Z([void 0],n,!1)))},{cache:q(e.pluralRules),strategy:$.variadic})}}var br=(function(){function e(t,n,r,i){n===void 0&&(n=e.defaultLocale);var a=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(l){var u=a.formatToParts(l);if(u.length===1)return u[0].value;var h=u.reduce(function(p,c){return!p.length||c.type!==S.literal||typeof p[p.length-1]!="string"?p.push(c.value):p[p.length-1]+=c.value,p},[]);return h.length<=1?h[0]||"":h},this.formatToParts=function(l){return X(a.ast,a.locales,a.formatters,a.formats,l,void 0,a.message)},this.resolvedOptions=function(){var l;return{locale:((l=a.resolvedLocale)===null||l===void 0?void 0:l.toString())||Intl.NumberFormat.supportedLocalesOf(a.locales)[0]}},this.getAst=function(){return a.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var s=i||{};s.formatters;var o=$e(s,["formatters"]);this.ast=e.__parse(t,d(d({},o),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=Ut(e.formats,r),this.formatters=i&&i.formatters||Gt(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(!(typeof Intl.Locale>"u")){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=Ot,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e})();/*!\n * @kurkle/color v0.3.4\n * https://github.com/kurkle/color#readme\n * (c) 2024 Jukka Kurkela\n * Released under the MIT License\n */function U(e){return e+.5|0}const N=(e,t,n)=>Math.max(Math.min(e,n),t);function w(e){return N(U(e*2.55),0,255)}function O(e){return N(U(e*255),0,255)}function I(e){return N(U(e/2.55)/100,0,1)}function ve(e){return N(U(e*100),0,100)}const A={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},se=[..."0123456789ABCDEF"],Ft=e=>se[e&15],Dt=e=>se[(e&240)>>4]+se[e&15],F=e=>(e&240)>>4===(e&15),Vt=e=>F(e.r)&&F(e.g)&&F(e.b)&&F(e.a);function Xt(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&A[e[1]]*17,g:255&A[e[2]]*17,b:255&A[e[3]]*17,a:t===5?A[e[4]]*17:255}:(t===7||t===9)&&(n={r:A[e[1]]<<4|A[e[2]],g:A[e[3]]<<4|A[e[4]],b:A[e[5]]<<4|A[e[6]],a:t===9?A[e[7]]<<4|A[e[8]]:255})),n}const jt=(e,t)=>e<255?t(e):"";function kt(e){var t=Vt(e)?Ft:Dt;return e?"#"+t(e.r)+t(e.g)+t(e.b)+jt(e.a,t):void 0}const Yt=/^(hsla?|hwb|hsv)\\(\\s*([-+.e\\d]+)(?:deg)?[\\s,]+([-+.e\\d]+)%[\\s,]+([-+.e\\d]+)%(?:[\\s,]+([-+.e\\d]+)(%)?)?\\s*\\)$/;function Xe(e,t,n){const r=t*Math.min(n,1-n),i=(a,s=(a+e/30)%12)=>n-r*Math.max(Math.min(s-3,9-s,1),-1);return[i(0),i(8),i(4)]}function Zt(e,t,n){const r=(i,a=(i+e/60)%6)=>n-n*t*Math.max(Math.min(a,4-a,1),0);return[r(5),r(3),r(1)]}function Wt(e,t,n){const r=Xe(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function $t(e,t,n,r,i){return e===i?(t-n)/r+(t<n?6:0):t===i?(n-e)/r+2:(e-t)/r+4}function he(e){const n=e.r/255,r=e.g/255,i=e.b/255,a=Math.max(n,r,i),s=Math.min(n,r,i),o=(a+s)/2;let l,u,h;return a!==s&&(h=a-s,u=o>.5?h/(2-a-s):h/(a+s),l=$t(n,r,i,h,a),l=l*60+.5),[l|0,u||0,o]}function ue(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(O)}function fe(e,t,n){return ue(Xe,e,t,n)}function zt(e,t,n){return ue(Wt,e,t,n)}function qt(e,t,n){return ue(Zt,e,t,n)}function je(e){return(e%360+360)%360}function Qt(e){const t=Yt.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?w(+t[5]):O(+t[5]));const i=je(+t[2]),a=+t[3]/100,s=+t[4]/100;return t[1]==="hwb"?r=zt(i,a,s):t[1]==="hsv"?r=qt(i,a,s):r=fe(i,a,s),{r:r[0],g:r[1],b:r[2],a:n}}function Jt(e,t){var n=he(e);n[0]=je(n[0]+t),n=fe(n),e.r=n[0],e.g=n[1],e.b=n[2]}function Kt(e){if(!e)return;const t=he(e),n=t[0],r=ve(t[1]),i=ve(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${I(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const He={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},_e={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function er(){const e={},t=Object.keys(_e),n=Object.keys(He);let r,i,a,s,o;for(r=0;r<t.length;r++){for(s=o=t[r],i=0;i<n.length;i++)a=n[i],o=o.replace(a,He[a]);a=parseInt(_e[s],16),e[o]=[a>>16&255,a>>8&255,a&255]}return e}let D;function tr(e){D||(D=er(),D.transparent=[0,0,0,0]);const t=D[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const rr=/^rgba?\\(\\s*([-+.\\d]+)(%)?[\\s,]+([-+.e\\d]+)(%)?[\\s,]+([-+.e\\d]+)(%)?(?:[\\s,/]+([-+.e\\d]+)(%)?)?\\s*\\)$/;function nr(e){const t=rr.exec(e);let n=255,r,i,a;if(t){if(t[7]!==r){const s=+t[7];n=t[8]?w(s):N(s*255,0,255)}return r=+t[1],i=+t[3],a=+t[5],r=255&(t[2]?w(r):N(r,0,255)),i=255&(t[4]?w(i):N(i,0,255)),a=255&(t[6]?w(a):N(a,0,255)),{r,g:i,b:a,a:n}}}function ir(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${I(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const Q=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,R=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function ar(e,t,n){const r=R(I(e.r)),i=R(I(e.g)),a=R(I(e.b));return{r:O(Q(r+n*(R(I(t.r))-r))),g:O(Q(i+n*(R(I(t.g))-i))),b:O(Q(a+n*(R(I(t.b))-a))),a:e.a+n*(t.a-e.a)}}function V(e,t,n){if(e){let r=he(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=fe(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function ke(e,t){return e&&Object.assign(t||{},e)}function Te(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=O(e[3]))):(t=ke(e,{r:0,g:0,b:0,a:1}),t.a=O(t.a)),t}function sr(e){return e.charAt(0)==="r"?nr(e):Qt(e)}class oe{constructor(t){if(t instanceof oe)return t;const n=typeof t;let r;n==="object"?r=Te(t):n==="string"&&(r=Xt(t)||tr(t)||sr(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=ke(this._rgb);return t&&(t.a=I(t.a)),t}set rgb(t){this._rgb=Te(t)}rgbString(){return this._valid?ir(this._rgb):void 0}hexString(){return this._valid?kt(this._rgb):void 0}hslString(){return this._valid?Kt(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,i=t.rgb;let a;const s=n===a?.5:n,o=2*s-1,l=r.a-i.a,u=((o*l===-1?o:(o+l)/(1+o*l))+1)/2;a=1-u,r.r=255&u*r.r+a*i.r+.5,r.g=255&u*r.g+a*i.g+.5,r.b=255&u*r.b+a*i.b+.5,r.a=s*r.a+(1-s)*i.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=ar(this._rgb,t._rgb,n)),this}clone(){return new oe(this.rgb)}alpha(t){return this._rgb.a=O(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=U(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return V(this._rgb,2,t),this}darken(t){return V(this._rgb,2,-t),this}saturate(t){return V(this._rgb,1,t),this}desaturate(t){return V(this._rgb,1,-t),this}rotate(t){return Jt(this._rgb,t),this}}const T=[];for(let e=0;e<256;++e)T.push((e+256).toString(16).slice(1));function or(e,t=0){return(T[e[t+0]]+T[e[t+1]]+T[e[t+2]]+T[e[t+3]]+"-"+T[e[t+4]]+T[e[t+5]]+"-"+T[e[t+6]]+T[e[t+7]]+"-"+T[e[t+8]]+T[e[t+9]]+"-"+T[e[t+10]]+T[e[t+11]]+T[e[t+12]]+T[e[t+13]]+T[e[t+14]]+T[e[t+15]]).toLowerCase()}let J;const hr=new Uint8Array(16);function ur(){if(!J){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");J=crypto.getRandomValues.bind(crypto)}return J(hr)}const fr=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Se={randomUUID:fr};function lr(e,t,n){e=e||{};const r=e.random??e.rng?.()??ur();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,or(r)}function pr(e,t,n){return Se.randomUUID&&!e?Se.randomUUID():lr(e)}export{oe as C,br as I,cr as d,pr as v};\n',
21255
+ "zh-CN-wPD53IzZ.js": 'const e={error:"\u9519\u8BEF",loading:"\u52A0\u8F7D\u4E2D...",save:"\u4FDD\u5B58",cancel:"\u53D6\u6D88",delete:"\u5220\u9664",edit:"\u7F16\u8F91",add:"\u6DFB\u52A0",confirm:"\u786E\u8BA4",reset:"\u91CD\u7F6E",refresh:"\u5237\u65B0",search:"\u641C\u7D22",filter:"\u7B5B\u9009",export:"\u5BFC\u51FA",import:"\u5BFC\u5165",close:"\u5173\u95ED",show:"\u663E\u793A",hide:"\u9690\u85CF",copy:"\u590D\u5236",copied:"\u5DF2\u590D\u5236"},t={dashboard:"\u4EEA\u8868\u677F",home:"\u9996\u9875",routes:"\u8DEF\u7531\u7BA1\u7406",logs:"\u8BF7\u6C42\u65E5\u5FD7",configuration:"\u914D\u7F6E\u4E2D\u5FC3"},r={home:"\u9996\u9875",routes:"\u8DEF\u7531\u7BA1\u7406",newRoute:"\u65B0\u5EFA\u8DEF\u7531",editRoute:"\u7F16\u8F91\u8DEF\u7531"},a={title:"\u4EEA\u8868\u677F",dataRange:"\u6570\u636E\u65F6\u95F4\u8303\u56F4",totalRequests:"\u603B\u8BF7\u6C42\u6570",requestsPerSec:"\u6BCF\u79D2\u8BF7\u6C42\u6570",requestsPerSecond:"\u6BCF\u79D2\u8BF7\u6C42\u6570",successRate:"\u6210\u529F\u7387",avgResponseTime:"\u5E73\u5747\u54CD\u5E94\u65F6\u95F4",upstreamAnalysis:"\u4E0A\u6E38\u5206\u6790",upstreamDistribution:"\u4E0A\u6E38\u8BF7\u6C42\u5206\u5E03",upstreamFailures:"\u4E0A\u6E38\u5931\u8D25\u7EDF\u8BA1",upstreamStatusCodes:"\u4E0A\u6E38\u72B6\u6001\u7801\u5206\u5E03",noUpstreamData:"\u6240\u9009\u65F6\u95F4\u8303\u56F4\u5185\u6682\u65E0\u4E0A\u6E38\u6570\u636E",noData:"\u6682\u65E0\u6570\u636E"},o={title:"\u76D1\u63A7\u56FE\u8868",range:{"1h":"1\u5C0F\u65F6","12h":"12\u5C0F\u65F6","24h":"24\u5C0F\u65F6",oneHour:"1\u5C0F\u65F6",twelveHours:"12\u5C0F\u65F6",twentyFourHours:"24\u5C0F\u65F6"},charts:{requestsTrend:"\u8BF7\u6C42\u6570\u8D8B\u52BF",periodRequests:"\u65F6\u6BB5\u8BF7\u6C42\u6570",requests:"\u8BF7\u6C42\u6570",responseTimeTrend:"\u54CD\u5E94\u65F6\u95F4\u8D8B\u52BF",avgResponseTime:"\u5E73\u5747\u54CD\u5E94\u65F6\u95F4 (ms)",milliseconds:"\u6BEB\u79D2 (ms)",successRateTrend:"\u6210\u529F\u7387\u8D8B\u52BF",successRate:"\u6210\u529F\u7387 (%)",percentage:"\u767E\u5206\u6BD4 (%)",errorsTrend:"\u9519\u8BEF\u6570\u8D8B\u52BF",periodErrors:"\u65F6\u6BB5\u9519\u8BEF\u6570",errors:"\u9519\u8BEF\u6570"},noData:"\u6682\u65E0\u5386\u53F2\u6570\u636E"},s={title:"\u8DEF\u7531\u7BA1\u7406",subtitle:"\u7BA1\u7406\u60A8\u7684\u53CD\u5411\u4EE3\u7406\u8DEF\u7531\u548C\u4E0A\u6E38\u670D\u52A1\u5668",addRoute:"\u6DFB\u52A0\u8DEF\u7531",newRoute:"+ \u65B0\u5EFA\u8DEF\u7531",createFirstRoute:"\u521B\u5EFA\u7B2C\u4E00\u4E2A\u8DEF\u7531",editRoute:"\u7F16\u8F91\u8DEF\u7531",deleteRoute:"\u5220\u9664\u8DEF\u7531",export:"\u5BFC\u51FA",import:"\u5BFC\u5165",path:"\u8DEF\u5F84",upstreams:"\u4E0A\u6E38\u670D\u52A1\u5668",actions:"\u64CD\u4F5C",searchPlaceholder:"\u641C\u7D22\u8DEF\u7531\u6216\u4E0A\u6E38\u670D\u52A1\u5668...",allTransformers:"\u6240\u6709\u8F6C\u6362\u5668",noRoutes:"\u6682\u65E0\u8DEF\u7531\u914D\u7F6E",noRoutesMessage:"\u521B\u5EFA\u60A8\u7684\u7B2C\u4E00\u4E2A\u8DEF\u7531\u4EE5\u5F00\u59CB\u4EE3\u7406\u8BF7\u6C42",noMatchingRoutes:"\u6CA1\u6709\u5339\u914D\u7684\u8DEF\u7531",noMatchingMessage:"\u8BF7\u5C1D\u8BD5\u8C03\u6574\u641C\u7D22\u6216\u7B5B\u9009\u6761\u4EF6",showingRoutes:"\u663E\u793A {count} / {total} \u4E2A\u8DEF\u7531",confirmDelete:"\u786E\u8BA4\u5220\u9664\u8DEF\u7531",confirmDeleteMessage:\'\u786E\u5B9A\u8981\u5220\u9664\u8DEF\u7531 "{path}" \u5417\uFF1F\u6B64\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500\u3002\',deleted:\'\u8DEF\u7531 "{path}" \u5DF2\u5220\u9664\',deleteFailed:"\u5220\u9664\u5931\u8D25: {error}",duplicated:\'\u8DEF\u7531 "{path}" \u5DF2\u590D\u5236\',duplicateFailed:"\u590D\u5236\u5931\u8D25: {error}",noRoutesToExport:"\u6CA1\u6709\u53EF\u5BFC\u51FA\u7684\u8DEF\u7531",exported:"\u8DEF\u7531\u5DF2\u5BFC\u51FA",importMustBeArray:"\u5BFC\u5165\u6587\u4EF6\u5FC5\u987B\u662F\u8DEF\u7531\u6570\u7EC4",importSuccess:"\u6210\u529F\u5BFC\u5165 {success} \u4E2A\u8DEF\u7531",importPartialSuccess:"\u6210\u529F\u5BFC\u5165 {success} \u4E2A\u8DEF\u7531\uFF0C\u5931\u8D25 {failed} \u4E2A",importFailed:"\u5BFC\u5165\u5931\u8D25: {error}",filterStatus:{all:"\u5168\u90E8\u72B6\u6001",healthy:"\u4EC5\u5065\u5EB7",unhealthy:"\u6709\u5F02\u5E38"}},l={title:"\u914D\u7F6E\u4E2D\u5FC3",subtitle:"\u7F16\u8F91\u548C\u7BA1\u7406\u7CFB\u7EDF\u914D\u7F6E",export:"\u5BFC\u51FA",import:"\u5BFC\u5165",reload:"\u91CD\u65B0\u52A0\u8F7D",restart:"\u91CD\u542F\u670D\u52A1",formEditor:"\u8868\u5355\u7F16\u8F91",jsonEditor:"JSON \u7F16\u8F91",systemSettings:"\u7CFB\u7EDF\u8BBE\u7F6E",serverPort:"\u670D\u52A1\u5668\u7AEF\u53E3",workerProcesses:"\u5DE5\u4F5C\u8FDB\u7A0B\u6570",workerProcessesHelp:"\u8981\u542F\u52A8\u7684\u5DE5\u4F5C\u8FDB\u7A0B\u6570\u91CF",logLevel:"\u65E5\u5FD7\u7EA7\u522B",bodyParserLimit:"\u8BF7\u6C42\u4F53\u5927\u5C0F\u9650\u5236",bodyParserLimitHelp:\'\u6700\u5927\u8BF7\u6C42\u4F53\u5927\u5C0F\uFF08\u4F8B\u5982\uFF1A"50mb"\u3001"100kb"\uFF09\',requiresRestart:"\u6CE8\u610F\uFF1A\u7AEF\u53E3\u3001\u5DE5\u4F5C\u8FDB\u7A0B\u6570\u3001\u65E5\u5FD7\u7EA7\u522B\u548C\u8BF7\u6C42\u4F53\u5927\u5C0F\u9650\u5236\u7684\u66F4\u6539\u9700\u8981\u91CD\u542F\u670D\u52A1\u624D\u80FD\u751F\u6548\u3002",routesConfigured:"{count} \u4E2A\u8DEF\u7531\u5DF2\u914D\u7F6E\u3002",manageRoutes:"\u4F7F\u7528\u8DEF\u7531\u9875\u9762\u7BA1\u7406\u8DEF\u7531\u3002",jsonConfiguration:"JSON \u914D\u7F6E",jsonParseError:"JSON \u89E3\u6790\u9519\u8BEF: {error}",jsonPlaceholder:"\u8F93\u5165 JSON \u914D\u7F6E...",jsonHelp:"\u7F16\u8F91\u539F\u59CB JSON \u914D\u7F6E\u3002\u4FDD\u5B58\u524D\u5C06\u9A8C\u8BC1\u66F4\u6539\u3002",unsavedChanges:"\u60A8\u6709\u672A\u4FDD\u5B58\u7684\u66F4\u6539",reset:"\u91CD\u7F6E",save:"\u4FDD\u5B58\u914D\u7F6E",confirmRestart:"\u786E\u8BA4\u91CD\u542F\u670D\u52A1",restartMessage:"\u786E\u5B9A\u8981\u91CD\u542F\u670D\u52A1\u5417\uFF1F\u8FD9\u5C06\u5BFC\u81F4\u77ED\u6682\u4E2D\u65AD\uFF08\u901A\u5E38 2-3 \u79D2\uFF09\uFF0C\u56E0\u4E3A\u670D\u52A1\u4F1A\u4F18\u96C5\u5730\u91CD\u542F\u3002",restartWarning:"\u6D3B\u52A8\u8FDE\u63A5\u53EF\u80FD\u4F1A\u6682\u65F6\u4E2D\u65AD\u3002",validationFailed:"\u914D\u7F6E\u9A8C\u8BC1\u5931\u8D25: {error}",saved:"\u914D\u7F6E\u5DF2\u4FDD\u5B58",saveFailed:"\u4FDD\u5B58\u5931\u8D25: {error}",exported:"\u914D\u7F6E\u5DF2\u5BFC\u51FA",imported:"\u914D\u7F6E\u5DF2\u5BFC\u5165",importFailed:"\u5BFC\u5165\u5931\u8D25: {error}",reloaded:"\u914D\u7F6E\u5DF2\u6210\u529F\u91CD\u65B0\u52A0\u8F7D",reloadFailed:"\u91CD\u65B0\u52A0\u8F7D\u5931\u8D25: {error}",restartSent:"\u91CD\u542F\u4FE1\u53F7\u5DF2\u53D1\u9001\uFF0C\u670D\u52A1\u5C06\u5728\u51E0\u79D2\u540E\u91CD\u542F",restartDaemonOnly:\'\u91CD\u542F\u529F\u80FD\u4EC5\u5728 daemon \u6A21\u5F0F\u4E0B\u53EF\u7528\u3002\u8BF7\u4F7F\u7528 "bungee restart" \u547D\u4EE4\u6216\u624B\u52A8\u91CD\u542F\u5F00\u53D1\u670D\u52A1\u5668\u3002\',restartFailed:"\u91CD\u542F\u5931\u8D25: {error}"},i={title:"404",message:"\u9875\u9762\u672A\u627E\u5230",goHome:"\u8FD4\u56DE\u9996\u9875"},n={newRoute:"\u65B0\u5EFA\u8DEF\u7531",editRoute:"\u7F16\u8F91\u8DEF\u7531",backToList:"\u8FD4\u56DE\u5217\u8868",routePath:"\u8DEF\u7531\u8DEF\u5F84",pathPlaceholder:"\u4F8B\u5982: /api/*",pathHelp:"\u652F\u6301\u901A\u914D\u7B26 (*) \u548C\u53C2\u6570 (:param)",pathHelpLong:"\u8DEF\u5F84\u652F\u6301\u901A\u914D\u7B26 (*) \u5339\u914D\u4EFB\u610F\u5B57\u7B26\uFF0C\u4EE5\u53CA\u53C2\u6570\u5360\u4F4D\u7B26 (:param) \u6355\u83B7\u8DEF\u5F84\u7247\u6BB5",pathCannotBeChanged:"\u7F16\u8F91\u6A21\u5F0F\u4E0B\u8DEF\u5F84\u4E0D\u53EF\u4FEE\u6539",pathRewrite:"\u8DEF\u5F84\u91CD\u5199",pathRewriteHelp:"\u4F7F\u7528\u6B63\u5219\u8868\u8FBE\u5F0F\u6A21\u5F0F\u4FEE\u6539\u8BF7\u6C42\u8DEF\u5F84",pathRewriteTooltip:"\u8DEF\u5F84\u91CD\u5199\u5141\u8BB8\u4F7F\u7528\u6B63\u5219\u8868\u8FBE\u5F0F\u5339\u914D\u548C\u66FF\u6362\u8BF7\u6C42\u8DEF\u5F84\u3002\u4F8B\u5982\uFF1A^/api/v1 \u2192 /api/v2 \u4F1A\u5C06\u6240\u6709 /api/v1 \u5F00\u5934\u7684\u8DEF\u5F84\u91CD\u5199\u4E3A /api/v2",addPathRewriteRule:"\u6DFB\u52A0\u8DEF\u5F84\u91CD\u5199\u89C4\u5219",patternPlaceholder:"\u5339\u914D\u6B63\u5219\u8868\u8FBE\u5F0F (\u5982 ^/test)",replacementPlaceholder:"\u91CD\u5199\u8DEF\u5F84 (\u5982 /v1)",confirmDeleteRule:"\u786E\u5B9A\u8981\u5220\u9664\u8FD9\u6761\u89C4\u5219\u5417\uFF1F",upstreamCountTooltip:"\u5DF2\u914D\u7F6E {count} \u4E2A\u4E0A\u6E38\u670D\u52A1\u5668",upstreams:"\u4E0A\u6E38\u670D\u52A1\u5668",upstreamsHelp:"\u914D\u7F6E\u4E00\u4E2A\u6216\u591A\u4E2A\u4E0A\u6E38\u670D\u52A1\u5668",addUpstream:"\u6DFB\u52A0\u4E0A\u6E38",transformer:"\u8DEF\u7531\u8F6C\u6362\u5668",transformerHelp:"\u5E94\u7528\u4E8E\u6574\u4E2A\u8DEF\u7531\u7684\u8F6C\u6362\u5668\uFF08\u53EF\u9009\uFF09",noPluginsAvailable:"\u5F53\u524D\u65E0\u53EF\u7528\u8DEF\u7531\u8F6C\u6362\u5668\u63D2\u4EF6",optional:"\u53EF\u9009",basicInfo:"\u57FA\u672C\u4FE1\u606F",requestModification:"\u8BF7\u6C42\u4FEE\u6539",requestModificationHelp:"\u4FEE\u6539\u53D1\u9001\u5230\u4E0A\u6E38\u7684\u8BF7\u6C42\u5934\u3001\u8BF7\u6C42\u4F53\u548C\u67E5\u8BE2\u53C2\u6570",routeLevelModificationNote:"\u8FD9\u4E9B\u89C4\u5219\u5E94\u7528\u4E8E\u6240\u6709\u4E0A\u6E38\u670D\u52A1\u5668",preview:"\u914D\u7F6E\u9884\u89C8",previewHelp:"\u67E5\u770B\u8DEF\u7531\u914D\u7F6E\u7684\u53EF\u89C6\u5316\u9884\u89C8",features:"\u529F\u80FD",featuresEnabled:"\u5DF2\u542F\u7528",enabledFeatures:"\u5DF2\u542F\u7528\u529F\u80FD",notSet:"\u672A\u8BBE\u7F6E",totalWeight:"\u603B\u6743\u91CD",jsonConfig:"JSON \u914D\u7F6E",requestFlow:"\u8BF7\u6C42\u6D41\u7A0B",clientRequest:"\u5BA2\u6237\u7AEF\u8BF7\u6C42",selectUpstream:"\u9009\u62E9\u4E0A\u6E38",returnResponse:"\u8FD4\u56DE\u54CD\u5E94",failoverEnabled:"\u6545\u969C\u8F6C\u79FB\u5DF2\u542F\u7528",templateApplied:"\u6A21\u677F\u5DF2\u5E94\u7528",confirmCancel:"\u786E\u5B9A\u8981\u53D6\u6D88\u5417\uFF1F\u672A\u4FDD\u5B58\u7684\u66F4\u6539\u5C06\u4E22\u5931\u3002",failoverTitle:"\u6545\u969C\u8F6C\u79FB",failoverHelp:"\u914D\u7F6E\u81EA\u52A8\u6545\u969C\u8F6C\u79FB\u548C\u5065\u5EB7\u68C0\u67E5\u673A\u5236",enableFailover:"\u542F\u7528\u81EA\u52A8\u6545\u969C\u8F6C\u79FB",retryableStatusCodes:"\u53EF\u91CD\u8BD5\u7684\u72B6\u6001\u7801",retryableStatusCodesPlaceholder:"\u9ED8\u8BA4: 500, 502, 503, 504\uFF08\u670D\u52A1\u5668\u9519\u8BEF\uFF09",retryableStatusCodesHelp:"\u9047\u5230\u8FD9\u4E9B\u72B6\u6001\u7801\u65F6\u5C06\u81EA\u52A8\u91CD\u8BD5\u5176\u4ED6\u4E0A\u6E38",passiveHealthCheck:"\u88AB\u52A8\u5065\u5EB7\u68C0\u67E5",passiveHealthCheckTooltip:"\u901A\u8FC7\u76D1\u63A7\u5B9E\u9645\u8BF7\u6C42\u7684\u6210\u529F\u5931\u8D25\u6765\u5224\u65AD\u4E0A\u6E38\u5065\u5EB7\u72B6\u6001\uFF0C\u65E0\u9700\u989D\u5916\u63A2\u6D4B\u8BF7\u6C42",consecutiveFailuresThreshold:"\u8FDE\u7EED\u5931\u8D25\u9608\u503C",consecutiveFailuresThresholdHelp:"\u8FDE\u7EED\u5931\u8D25\u591A\u5C11\u6B21\u540E\u6807\u8BB0\u4E3A\u4E0D\u5065\u5EB7\uFF08\u9ED8\u8BA4\uFF1A3\uFF09",healthyThreshold:"\u5065\u5EB7\u9608\u503C",healthyThresholdHelp:"\u8FDE\u7EED\u6210\u529F\u591A\u5C11\u6B21\u540E\u6062\u590D\u4E3A\u5065\u5EB7\uFF08\u9ED8\u8BA4\uFF1A2\uFF09",requestTimeoutMs:"\u8BF7\u6C42\u8D85\u65F6\uFF08\u6BEB\u79D2\uFF09",requestTimeoutMsHelp:"\u6B63\u5E38\u8BF7\u6C42\u7684\u8D85\u65F6\u65F6\u95F4\uFF08\u9ED8\u8BA4\uFF1A30000ms\uFF09",connectTimeoutMs:"\u8FDE\u63A5\u8D85\u65F6\uFF08\u6BEB\u79D2\uFF09",connectTimeoutMsHelp:"\u5EFA\u7ACB\u8FDE\u63A5\u7684\u8D85\u65F6\u65F6\u95F4\uFF08\u9ED8\u8BA4\uFF1A5000ms\uFF09",activeHealthCheck:"\u4E3B\u52A8\u5065\u5EB7\u68C0\u67E5",activeHealthCheckTooltip:"\u5B9A\u671F\u5411\u4E0A\u6E38\u53D1\u9001\u63A2\u6D4B\u8BF7\u6C42\u6765\u4E3B\u52A8\u68C0\u6D4B\u5065\u5EB7\u72B6\u6001\uFF0C\u72EC\u7ACB\u4E8E\u4E1A\u52A1\u6D41\u91CF",enableActiveHealthCheck:"\u542F\u7528\u4E3B\u52A8\u5065\u5EB7\u68C0\u67E5",healthCheckIntervalMs:"\u68C0\u67E5\u95F4\u9694\uFF08\u6BEB\u79D2\uFF09",healthCheckIntervalMsHelp:"\u6BCF\u9694\u591A\u4E45\u6267\u884C\u4E00\u6B21\u5065\u5EB7\u68C0\u67E5\uFF08\u9ED8\u8BA4\uFF1A10000ms\uFF09",healthCheckTimeoutMs:"\u68C0\u67E5\u8D85\u65F6\uFF08\u6BEB\u79D2\uFF09",healthCheckTimeoutMsHelp:"\u5065\u5EB7\u68C0\u67E5\u8BF7\u6C42\u7684\u8D85\u65F6\u65F6\u95F4\uFF08\u9ED8\u8BA4\uFF1A3000ms\uFF09",healthCheckPath:"\u68C0\u67E5\u8DEF\u5F84",healthCheckPathHelp:"\u5065\u5EB7\u68C0\u67E5\u7684 HTTP \u8DEF\u5F84\uFF08\u9ED8\u8BA4\uFF1A/health\uFF09",healthCheckMethod:"HTTP \u65B9\u6CD5",healthCheckExpectedStatus:"\u671F\u671B\u72B6\u6001\u7801",healthCheckExpectedStatusHelp:"\u5065\u5EB7\u68C0\u67E5\u671F\u671B\u8FD4\u56DE\u7684\u72B6\u6001\u7801\uFF08\u9ED8\u8BA4\uFF1A200\uFF09",healthCheckUnhealthyThreshold:"\u4E0D\u5065\u5EB7\u9608\u503C",healthCheckUnhealthyThresholdHelp:"\u8FDE\u7EED\u5931\u8D25\u591A\u5C11\u6B21\u6807\u8BB0\u4E3A\u4E0D\u5065\u5EB7\uFF08\u9ED8\u8BA4\uFF1A3\uFF09",healthCheckHealthyThreshold:"\u5065\u5EB7\u9608\u503C",healthCheckHealthyThresholdHelp:"\u8FDE\u7EED\u6210\u529F\u591A\u5C11\u6B21\u6062\u590D\u4E3A\u5065\u5EB7\uFF08\u9ED8\u8BA4\uFF1A2\uFF09",slowStart:"\u6162\u542F\u52A8",slowStartTooltip:"\u6062\u590D\u7684\u4E0A\u6E38\u9010\u6B65\u589E\u52A0\u6D41\u91CF\uFF0C\u907F\u514D\u77AC\u95F4\u538B\u529B\u5BFC\u81F4\u518D\u6B21\u6545\u969C",enableSlowStart:"\u542F\u7528\u6162\u542F\u52A8\u673A\u5236",slowStartDurationMs:"\u6162\u542F\u52A8\u6301\u7EED\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09",slowStartDurationMsHelp:"\u4ECE\u4E0D\u5065\u5EB7\u6062\u590D\u540E\u9010\u6B65\u589E\u52A0\u6743\u91CD\u7684\u65F6\u95F4\uFF08\u9ED8\u8BA4\uFF1A30000ms\uFF09",slowStartInitialWeightFactor:"\u521D\u59CB\u6743\u91CD\u56E0\u5B50",slowStartInitialWeightFactorHelp:"\u6062\u590D\u540E\u521D\u59CB\u6743\u91CD\u7684\u6BD4\u4F8B\uFF0C0.1 \u8868\u793A 10%\uFF08\u9ED8\u8BA4\uFF1A0.1\uFF09",failoverInfoNotice:"\u6545\u969C\u8F6C\u79FB\u529F\u80FD\u53EF\u4EE5\u81EA\u52A8\u68C0\u6D4B\u4E0A\u6E38\u5065\u5EB7\u72B6\u6001\uFF0C\u5728\u6545\u969C\u65F6\u5207\u6362\u5230\u5907\u7528\u4E0A\u6E38\uFF0C\u4FDD\u8BC1\u670D\u52A1\u53EF\u7528\u6027\u3002",recoveryIntervalMs:"\u6062\u590D\u68C0\u6D4B\u95F4\u9694\uFF08\u6BEB\u79D2\uFF09",recoveryIntervalPlaceholder:"5000",recoveryIntervalHelp:"\u4E0A\u6E38\u5931\u8D25\u540E\u7B49\u5F85\u591A\u4E45\u5C1D\u8BD5\u6062\u590D",recoveryTimeoutMs:"\u6062\u590D\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09",recoveryTimeoutPlaceholder:"3000",recoveryTimeoutHelp:"\u6062\u590D\u8BF7\u6C42\u7684\u8D85\u65F6\u65F6\u95F4\uFF0C\u907F\u514D\u957F\u65F6\u95F4 pending",saveRoute:"\u4FDD\u5B58\u8DEF\u7531",cancel:"\u53D6\u6D88",saving:"\u4FDD\u5B58\u4E2D...",loadingTemplates:"\u52A0\u8F7D\u6A21\u677F\u4E2D...",useTemplate:"\u4F7F\u7528\u6A21\u677F",routeSaved:"\u8DEF\u7531\u5DF2\u4FDD\u5B58",routeUpdated:"\u8DEF\u7531\u5DF2\u66F4\u65B0",saveFailed:"\u4FDD\u5B58\u5931\u8D25: {error}",pathRequired:"\u8DEF\u7531\u8DEF\u5F84\u4E0D\u80FD\u4E3A\u7A7A",upstreamRequired:"\u81F3\u5C11\u9700\u8981\u4E00\u4E2A\u4E0A\u6E38\u670D\u52A1\u5668"},u={upstreams:"{count} \u4E2A\u4E0A\u6E38",hasTransformer:"\u5E26\u8F6C\u6362\u5668",failover:"\u6545\u969C\u8F6C\u79FB",edit:"\u7F16\u8F91",duplicate:"\u590D\u5236",delete:"\u5220\u9664",duplicating:"\u590D\u5236\u4E2D...",deleting:"\u5220\u9664\u4E2D...",viewAll:"\u67E5\u770B\u5168\u90E8 {count} \u4E2A",moreActions:"\u66F4\u591A\u64CD\u4F5C",tableHeaders:{status:"\u72B6\u6001",target:"\u4E3B\u673A\u5730\u5740",weight:"\u6743\u91CD",priority:"\u4F18\u5148\u7EA7"},pathRewrite:{original:"\u539F\u59CB",rewriteTo:"\u91CD\u5199\u4E3A"}},d={title:"\u4E0A\u6E38\u670D\u52A1\u5668\u5217\u8868",close:"\u5173\u95ED",statusHealthy:"\u5065\u5EB7",statusUnhealthy:"\u5F02\u5E38",statusUnknown:"\u672A\u77E5"},c={title:"\u4E0A\u6E38\u670D\u52A1\u5668 #{index}",priority:"\u4F18\u5148\u7EA7",target:"\u76EE\u6807\u5730\u5740",targetUrl:"\u76EE\u6807\u5730\u5740",targetPlaceholder:"https://api.example.com",targetHelp:"\u4E0A\u6E38\u670D\u52A1\u5668\u7684\u5B8C\u6574 URL",weight:"\u6743\u91CD",weightHelp:"\u8D1F\u8F7D\u5747\u8861\u6743\u91CD\uFF081-100\uFF09",transformer:"\u4E0A\u6E38\u8F6C\u6362\u5668",transformerHelp:"\u4EC5\u5E94\u7528\u4E8E\u6B64\u4E0A\u6E38\u7684\u8F6C\u6362\u5668\uFF08\u53EF\u9009\uFF09",remove:"\u79FB\u9664\u4E0A\u6E38",targetRequired:"\u76EE\u6807\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A",invalidUrl:"\u65E0\u6548\u7684 URL \u683C\u5F0F"},p={selectPlugin:"\u9009\u62E9\u63D2\u4EF6",none:"\u65E0\u63D2\u4EF6",description:"\u63D2\u4EF6\u8BF4\u660E",testPlugin:"\u6D4B\u8BD5\u63D2\u4EF6",testing:"\u6D4B\u8BD5\u4E2D...",input:"\u8F93\u5165\uFF08\u539F\u59CB\u683C\u5F0F\uFF09",output:"\u8F93\u51FA\uFF08\u8F6C\u6362\u540E\u683C\u5F0F\uFF09",inputPlaceholder:"\u8F93\u5165\u6D4B\u8BD5\u6570\u636E...",testSuccess:"\u8F6C\u6362\u6210\u529F",testFailed:"\u8F6C\u6362\u5931\u8D25: {error}"},h={title:"\u8BF7\u6C42\u5934",add:"\u6DFB\u52A0",addHeader:"\u6DFB\u52A0\u8BF7\u6C42\u5934",name:"\u540D\u79F0",namePlaceholder:"Content-Type",value:"\u503C",valuePlaceholder:"application/json",remove:"\u79FB\u9664",replace:"\u66FF\u6362",default:"\u9ED8\u8BA4",empty:"\u6682\u65E0\u8BF7\u6C42\u5934"},m={title:"\u8BF7\u6C42\u4F53",bodyType:"\u8BF7\u6C42\u4F53\u7C7B\u578B",json:"JSON",text:"\u7EAF\u6587\u672C",form:"\u8868\u5355\u6570\u636E",none:"\u65E0\u8BF7\u6C42\u4F53",placeholder:"\u8F93\u5165\u8BF7\u6C42\u4F53\u5185\u5BB9...",jsonInvalid:"\u65E0\u6548\u7684 JSON \u683C\u5F0F",add:"\u6DFB\u52A0",remove:"\u79FB\u9664",replace:"\u66FF\u6362",default:"\u9ED8\u8BA4",empty:"\u6682\u65E0\u5B57\u6BB5"},g={title:"\u67E5\u8BE2\u53C2\u6570",name:"\u53C2\u6570\u540D",namePlaceholder:"\u53C2\u6570\u540D\u79F0",value:"\u53C2\u6570\u503C",valuePlaceholder:"\u53C2\u6570\u503C",add:"\u6DFB\u52A0",remove:"\u79FB\u9664",replace:"\u66FF\u6362",default:"\u9ED8\u8BA4",empty:"\u6682\u65E0\u53C2\u6570"},v={title:"\u6761\u4EF6\u8868\u8FBE\u5F0F",placeholder:"request.headers[\'User-Agent\'].includes(\'Mobile\')",help:"\u4F7F\u7528 JavaScript \u8868\u8FBE\u5F0F\uFF0C\u8FD4\u56DE true \u6216 false",examples:"\u793A\u4F8B",example1:"\u68C0\u67E5\u8BF7\u6C42\u5934",example2:"\u68C0\u67E5\u67E5\u8BE2\u53C2\u6570",example3:"\u68C0\u67E5\u8BF7\u6C42\u65B9\u6CD5",test:"\u6D4B\u8BD5\u8868\u8FBE\u5F0F",testResult:"\u6D4B\u8BD5\u7ED3\u679C",resultTrue:"\u6761\u4EF6\u4E3A\u771F",resultFalse:"\u6761\u4EF6\u4E3A\u5047",resultError:"\u8868\u8FBE\u5F0F\u9519\u8BEF: {error}"},y={title:"\u8DEF\u7531\u6A21\u677F",subtitle:"\u5FEB\u901F\u521B\u5EFA\u5E38\u7528\u8DEF\u7531\u914D\u7F6E",useTemplate:"\u4F7F\u7528\u6B64\u6A21\u677F",categories:{api:"API \u4EE3\u7406",static:"\u9759\u6001\u8D44\u6E90",websocket:"WebSocket",auth:"\u8BA4\u8BC1\u4EE3\u7406"},restApi:{name:"REST API \u4EE3\u7406",description:"\u6807\u51C6\u7684 RESTful API \u4EE3\u7406\u914D\u7F6E"},graphql:{name:"GraphQL API",description:"GraphQL \u7AEF\u70B9\u4EE3\u7406"},static:{name:"\u9759\u6001\u6587\u4EF6\u670D\u52A1",description:"\u4EE3\u7406\u9759\u6001\u8D44\u6E90\u6587\u4EF6"},websocket:{name:"WebSocket \u4EE3\u7406",description:"\u5B9E\u65F6\u901A\u4FE1 WebSocket \u4EE3\u7406"},loadBalancing:{name:"\u8D1F\u8F7D\u5747\u8861",description:"\u591A\u4E0A\u6E38\u8D1F\u8F7D\u5747\u8861\u914D\u7F6E"}},T={yes:"\u786E\u5B9A",no:"\u53D6\u6D88",cancelTitle:"\u786E\u8BA4\u53D6\u6D88",cancelMessage:"\u786E\u5B9A\u8981\u53D6\u6D88\u7F16\u8F91\u5E76\u8FD4\u56DE\u5417\uFF1F\u672A\u4FDD\u5B58\u7684\u66F4\u6539\u5C06\u4E22\u5931\u3002",restoreDraftTitle:"\u6062\u590D\u8349\u7A3F",restoreDraftMessage:"\u68C0\u6D4B\u5230\u6709\u672A\u4FDD\u5B58\u7684\u8349\u7A3F\uFF0C\u662F\u5426\u6062\u590D\uFF1F"},f={targetRequired:"\u76EE\u6807\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A",targetProtocol:"\u76EE\u6807\u5730\u5740\u5FC5\u987B\u4F7F\u7528 http \u6216 https \u534F\u8BAE",invalidUrl:"\u65E0\u6548\u7684 URL \u683C\u5F0F",weightPositive:"\u6743\u91CD\u5FC5\u987B\u662F\u6B63\u6570",priorityNonNegative:"\u4F18\u5148\u7EA7\u5FC5\u987B\u662F\u975E\u8D1F\u6570",totalWeightPositive:"\u603B\u6743\u91CD\u5FC5\u987B\u5927\u4E8E 0",unknownTransformer:"\u672A\u77E5\u7684\u8F6C\u6362\u5668: {transformer}\u3002\u53EF\u7528\u9009\u9879: {options}",pathRequired:"\u8DEF\u5F84\u4E0D\u80FD\u4E3A\u7A7A",pathStartSlash:"\u8DEF\u5F84\u5FC5\u987B\u4EE5 / \u5F00\u5934",upstreamRequired:"\u81F3\u5C11\u9700\u8981\u4E00\u4E2A\u4E0A\u6E38\u670D\u52A1\u5668",invalidRegex:"\u65E0\u6548\u7684\u6B63\u5219\u8868\u8FBE\u5F0F: {pattern}",invalidStatusCode:"\u65E0\u6548\u7684\u72B6\u6001\u7801: {code}",recoveryIntervalPositive:"\u6062\u590D\u95F4\u9694\u5FC5\u987B\u5927\u4E8E 0",recoveryTimeoutPositive:"\u6062\u590D\u8D85\u65F6\u65F6\u95F4\u5FC5\u987B\u5927\u4E8E 0",expressionEmpty:"\u8868\u8FBE\u5F0F\u4E0D\u80FD\u4E3A\u7A7A",mismatchedBraces:"{{ }} \u62EC\u53F7\u4E0D\u5339\u914D",mismatchedParentheses:"\u62EC\u53F7\u4E0D\u5339\u914D",mismatchedQuotes:"\u5F15\u53F7\u4E0D\u5339\u914D",valid:"\u914D\u7F6E\u6709\u6548",errors:"\u4E2A\u9519\u8BEF",allGood:"\u914D\u7F6E\u6B63\u786E"},R={title:"\u5FEB\u6377\u952E",save:"\u4FDD\u5B58",cancel:"\u53D6\u6D88",switchSection:"\u5207\u6362\u533A\u57DF"},S={lastSaved:"\u4E0A\u6B21\u4FDD\u5B58",justNow:"\u521A\u521A",minutesAgo:"{minutes} \u5206\u949F\u524D",hoursAgo:"{hours} \u5C0F\u65F6\u524D",restoreDraft:"\u68C0\u6D4B\u5230\u672A\u4FDD\u5B58\u7684\u8349\u7A3F\uFF0C\u662F\u5426\u6062\u590D\uFF1F"},b={globalAuth:"\u5168\u5C40\u8BA4\u8BC1",routeAuth:"\u8DEF\u7531\u8BA4\u8BC1",helpText:"\u4FDD\u62A4\u60A8\u7684 API \u7AEF\u70B9",enableAuth:"\u542F\u7528\u8BA4\u8BC1",enabled:"\u5DF2\u542F\u7528",disabled:"\u5DF2\u7981\u7528",tokens:"\u4EE4\u724C\u5217\u8868",tokenPlaceholder:"\u8F93\u5165 token \u6216\u4F7F\u7528 {{ env.TOKEN_NAME }}",addToken:"\u6DFB\u52A0\u4EE4\u724C",expressionSupport:"\u652F\u6301\u8868\u8FBE\u5F0F\u8BED\u6CD5\u6765\u5F15\u7528\u73AF\u5883\u53D8\u91CF\uFF1A",securityNotice:"\u542F\u7528\u8BA4\u8BC1\u540E\uFF0CAuthorization header \u4F1A\u81EA\u52A8\u79FB\u9664\uFF0C\u4E0D\u4F1A\u8F6C\u53D1\u7ED9\u4E0A\u6E38\u670D\u52A1\u5668\uFF08\u5B89\u5168\u63AA\u65BD\uFF09\u3002",routeAuthHelp:"\u8DEF\u7531\u7EA7\u8BA4\u8BC1\u5C06\u8986\u76D6\u5168\u5C40\u8BA4\u8BC1\u914D\u7F6E\u3002\u5982\u679C\u672A\u914D\u7F6E\uFF0C\u5219\u4F7F\u7528\u5168\u5C40\u8BA4\u8BC1\u8BBE\u7F6E\u3002"},H={title:"\u8BF7\u6C42\u65E5\u5FD7",filters:"\u7B5B\u9009\u5668",autoRefresh:"\u81EA\u52A8\u5237\u65B0",refreshInterval:"\u5237\u65B0\u95F4\u9694",refreshEvery5s:"\u6BCF 5 \u79D2",refreshEvery10s:"\u6BCF 10 \u79D2",refreshEvery30s:"\u6BCF 30 \u79D2",refreshEvery60s:"\u6BCF 60 \u79D2",lastRefreshed:"\u4E0A\u6B21\u5237\u65B0",newDataAvailable:"\u6709\u65B0\u6570\u636E\u53EF\u7528\uFF0C\u70B9\u51FB\u5237\u65B0\u67E5\u770B",searchTerm:"\u641C\u7D22",searchPlaceholder:"\u641C\u7D22\u8DEF\u5F84\u6216\u9519\u8BEF\u4FE1\u606F...",method:"HTTP \u65B9\u6CD5",allMethods:"\u6240\u6709\u65B9\u6CD5",status:"\u72B6\u6001\u7801",statusPlaceholder:"\u4F8B\u5982\uFF1A200\u3001404\u3001500",result:"\u7ED3\u679C",allResults:"\u5168\u90E8",success:"\u6210\u529F",failed:"\u5931\u8D25",timeRange:"\u65F6\u95F4\u8303\u56F4",allTime:"\u5168\u90E8\u65F6\u95F4",recentTime:"\u6700\u8FD1\u65F6\u95F4",customTime:"\u81EA\u5B9A\u4E49\u8303\u56F4",recentHours:"\u6700\u8FD1\u5C0F\u65F6\u6570",startTime:"\u5F00\u59CB\u65F6\u95F4",endTime:"\u7ED3\u675F\u65F6\u95F4",sortBy:"\u6392\u5E8F\u65B9\u5F0F",sortByTimestamp:"\u65F6\u95F4\u6233",sortByDuration:"\u6301\u7EED\u65F6\u95F4",sortByStatus:"\u72B6\u6001\u7801",sortOrder:"\u6392\u5E8F",asc:"\u5347\u5E8F",desc:"\u964D\u5E8F",time:"\u65F6\u95F4",path:"\u8DEF\u5F84",duration:"\u6301\u7EED\u65F6\u95F4",requestType:"\u7C7B\u578B",requestTypeFilter:"\u8BF7\u6C42\u7C7B\u578B",requestType_all:"\u5168\u90E8\u7C7B\u578B",requestType_final:"\u6700\u7EC8\u8BF7\u6C42",requestType_retry:"\u91CD\u8BD5\u8BF7\u6C42",requestType_recovery:"\u6062\u590D\u6D4B\u8BD5",requestType_final_desc:"\u8FD4\u56DE\u5BA2\u6237\u7AEF\u7684\u8BF7\u6C42",requestType_retry_desc:"\u91CD\u8BD5\u5C1D\u8BD5",requestType_recovery_desc:"\u6545\u969C\u6062\u590D\u6D4B\u8BD5",upstream:"\u4E0A\u6E38",actions:"\u64CD\u4F5C",viewDetail:"\u8BE6\u60C5",export:"\u5BFC\u51FA",startStream:"\u542F\u52A8\u6D41",stopStream:"\u505C\u6B62\u6D41",showing:"\u663E\u793A {start}-{end}\uFF0C\u5171 {total} \u6761",page:"\u7B2C {page} \u9875\uFF0C\u5171 {totalPages} \u9875",noData:"\u6682\u65E0\u65E5\u5FD7\u6570\u636E",advancedFilters:"\u9AD8\u7EA7\u7B5B\u9009",activeFilters:"\u4E2A\u7B5B\u9009\u6761\u4EF6",clearFilters:"\u6E05\u9664\u5168\u90E8",moreFilters:"\u66F4\u591A\u7B5B\u9009",detail:{title:"\u8BF7\u6C42\u65E5\u5FD7\u8BE6\u60C5",requestId:"\u8BF7\u6C42 ID",timestamp:"\u65F6\u95F4\u6233",method:"\u65B9\u6CD5",status:"\u72B6\u6001",duration:"\u6301\u7EED\u65F6\u95F4",success:"\u6210\u529F",requestInfo:"\u8BF7\u6C42\u4FE1\u606F",path:"\u8DEF\u5F84",originalPath:"\u539F\u59CB\u8DEF\u5F84",transformedPath:"\u8F6C\u6362\u540E",query:"\u67E5\u8BE2\u5B57\u7B26\u4E32",routePath:"\u5339\u914D\u8DEF\u7531",upstreamInfo:"\u4E0A\u6E38\u4FE1\u606F",upstream:"\u4E0A\u6E38",transformer:"\u8F6C\u6362\u5668",authInfo:"\u8BA4\u8BC1\u4FE1\u606F",authLevel:"\u8BA4\u8BC1\u7EA7\u522B",authResult:"\u7ED3\u679C",authSuccess:"\u5DF2\u8BA4\u8BC1",authFailed:"\u5931\u8D25",processingSteps:"\u5904\u7406\u6B65\u9AA4",errorInfo:"\u9519\u8BEF\u4FE1\u606F",requestBody:"\u8BF7\u6C42\u4F53",responseBody:"\u54CD\u5E94\u4F53",loadRequestBody:"\u52A0\u8F7D\u8BF7\u6C42\u4F53",loadResponseBody:"\u52A0\u8F7D\u54CD\u5E94\u4F53",bodyNotRecorded:"\u6B64\u8BF7\u6C42\u672A\u8BB0\u5F55 Body",bodyNotRecordedReason:"\u53EF\u80FD\u8D85\u8FC7\u5927\u5C0F\u9650\u5236\u6216\u4E3A\u7A7A",originalRequest:"\u539F\u59CB\u8BF7\u6C42\uFF08\u8F6C\u6362\u524D\uFF09",finalRequest:"\u6700\u7EC8\u8BF7\u6C42\uFF08\u53D1\u9001\u7ED9\u4E0A\u6E38\uFF09",responseData:"\u54CD\u5E94\u6570\u636E\uFF08\u4E0A\u6E38\u8FD4\u56DE\uFF09",originalHeaders:"\u539F\u59CB\u8BF7\u6C42\u5934",finalHeaders:"\u6700\u7EC8\u8BF7\u6C42\u5934",requestHeaders:"\u8BF7\u6C42\u5934",responseHeaders:"\u54CD\u5E94\u5934",bodyPreview:"Body \u9884\u89C8",bodyTooLarge:"Body \u8FC7\u5927 ({size})",clickToExpand:"\u70B9\u51FB\u5C55\u5F00",headers:"\u4E2A\u8BF7\u6C42\u5934",noHeaders:"\u6682\u65E0\u8BF7\u6C42\u5934",noBody:"\u6682\u65E0 Body \u6570\u636E",overview:"\u6982\u89C8",routeAndUpstream:"\u8DEF\u7531\u4E0E\u4E0A\u6E38",processingTimeline:"\u5904\u7406\u65F6\u95F4\u7EBF",totalSteps:"\u5171 {count} \u6B65",totalDuration:"\u603B\u8017\u65F6 {duration}",showTimeline:"\u663E\u793A\u65F6\u95F4\u7EBF",hideTimeline:"\u9690\u85CF\u65F6\u95F4\u7EBF",copyToClipboard:"\u590D\u5236",downloadJson:"\u4E0B\u8F7D JSON",copied:"\u5DF2\u590D\u5236\uFF01",tabOriginalRequest:"\u539F\u59CB\u8BF7\u6C42",tabFinalRequest:"\u8F6C\u6362\u540E",tabResponse:"\u54CD\u5E94\u6570\u636E",requestData:"\u8BF7\u6C42\u6570\u636E",noDataAvailable:"\u6682\u65E0\u6570\u636E",step:"\u6B65\u9AA4"},steps:{route_matched:"\u8DEF\u7531\u5339\u914D",request_snapshot_created:"\u8BF7\u6C42\u5FEB\u7167\u521B\u5EFA",auth_failed:"\u8BA4\u8BC1\u5931\u8D25",auth_success:"\u8BA4\u8BC1\u6210\u529F",upstream_selected:"\u4E0A\u6E38\u9009\u62E9",trying_upstream:"\u5C1D\u8BD5\u4E0A\u6E38",circuit_breaker_closed:"\u65AD\u8DEF\u5668\u5173\u95ED",circuit_breaker_opened:"\u65AD\u8DEF\u5668\u6253\u5F00",circuit_breaker_reopened:"\u65AD\u8DEF\u5668\u91CD\u65B0\u6253\u5F00",upstream_recovered:"\u4E0A\u6E38\u6062\u590D",upstream_retry:"\u4E0A\u6E38\u91CD\u8BD5",upstream_failed:"\u4E0A\u6E38\u5931\u8D25",plugin_request_init:"\u63D2\u4EF6\u8BF7\u6C42\u521D\u59CB\u5316",plugin_before_request:"\u63D2\u4EF6\u8BF7\u6C42\u524D\u5904\u7406",plugin_intercepted:"\u63D2\u4EF6\u62E6\u622A\u8BF7\u6C42",plugin_response:"\u63D2\u4EF6\u54CD\u5E94\u5904\u7406",plugin_error:"\u63D2\u4EF6\u9519\u8BEF\u5904\u7406"}},P={title:"\u65E5\u5FD7\u914D\u7F6E",bodyRecording:"\u542F\u7528\u8BF7\u6C42/\u54CD\u5E94\u4F53\u8BB0\u5F55",bodyRecordingHelp:"\u8BB0\u5F55\u8BF7\u6C42\u548C\u54CD\u5E94\u4F53\u7528\u4E8E\u95EE\u9898\u6392\u67E5\u548C\u5206\u6790",maxSize:"\u6700\u5927 Body \u5927\u5C0F",maxSizeHelp:"\u8D85\u8FC7\u6B64\u5927\u5C0F\u7684 Body \u5C06\u88AB\u8DF3\u8FC7\uFF081-100 KB\uFF09",retentionDays:"Body \u4FDD\u7559\u5929\u6570",retentionDaysHelp:"Body \u5C06\u5728\u8FD9\u4E9B\u5929\u6570\u540E\u81EA\u52A8\u5220\u9664",days:"\u5929",hours:"\u5C0F\u65F6",cleanupConfig:"\u6E05\u7406\u914D\u7F6E",cleanupStatus:"\u72B6\u6001",active:"\u6D3B\u8DC3",inactive:"\u672A\u6D3B\u8DC3",cleanupRetention:"\u4FDD\u7559\u65F6\u957F",cleanupInterval:"\u6E05\u7406\u95F4\u9694",manualCleanup:"\u624B\u52A8\u6E05\u7406",confirmCleanup:"\u786E\u5B9A\u8981\u624B\u52A8\u89E6\u53D1\u65E5\u5FD7\u6E05\u7406\u5417\uFF1F\u8FD9\u5C06\u5220\u9664\u6240\u6709\u8D85\u8FC7\u914D\u7F6E\u4FDD\u7559\u671F\u9650\u7684\u65E5\u5FD7\u548C Body\u3002",cleanupSuccess:"\u6E05\u7406\u6210\u529F\u5B8C\u6210",cleanupFailed:"\u6E05\u7406\u5931\u8D25: {error}",lastCleanup:"\u4E0A\u6B21\u6E05\u7406\u7ED3\u679C",deletedSqliteRecords:"\u5DF2\u5220\u9664 SQLite \u8BB0\u5F55",deletedFileLogFiles:"\u5DF2\u5220\u9664\u65E5\u5FD7\u6587\u4EF6",deletedBodyFiles:"\u5DF2\u5220\u9664 Body \u6587\u4EF6",dirs:"\u76EE\u5F55",files:"\u6587\u4EF6",duration:"\u8017\u65F6"},q={title:"\u767B\u5F55",subtitle:"\u8F93\u5165\u8BBF\u95EE\u4EE4\u724C\u4EE5\u7EE7\u7EED",token:"\u8BBF\u95EE\u4EE4\u724C",tokenPlaceholder:"\u8BF7\u8F93\u5165\u8BBF\u95EE\u4EE4\u724C...",submit:"\u767B\u5F55",loggingIn:"\u767B\u5F55\u4E2D...",success:"\u767B\u5F55\u6210\u529F",failed:"\u767B\u5F55\u5931\u8D25\uFF1A{error}",required:"\u8BBF\u95EE\u4EE4\u724C\u4E0D\u80FD\u4E3A\u7A7A",unauthorized:"\u8BBF\u95EE\u4EE4\u724C\u65E0\u6548",logout:"\u9000\u51FA\u767B\u5F55",logoutConfirm:"\u786E\u5B9A\u8981\u9000\u51FA\u767B\u5F55\u5417\uFF1F"},w={common:e,nav:t,breadcrumb:r,dashboard:a,monitoring:o,routes:s,configuration:l,notFound:i,routeEditor:n,routeCard:u,upstreamsModal:d,upstream:c,plugin:p,headers:h,body:m,query:g,expression:v,templates:y,confirmDialog:T,validation:f,shortcuts:R,autosave:S,auth:b,logs:H,logging:P,login:q};export{b as auth,S as autosave,m as body,r as breadcrumb,e as common,l as configuration,T as confirmDialog,a as dashboard,w as default,v as expression,h as headers,P as logging,q as login,H as logs,o as monitoring,t as nav,i as notFound,p as plugin,g as query,u as routeCard,n as routeEditor,s as routes,R as shortcuts,y as templates,c as upstream,d as upstreamsModal,f as validation};\n',
21256
+ "en-D_EcykrR.js": 'const e={error:"Error",loading:"Loading...",save:"Save",cancel:"Cancel",delete:"Delete",edit:"Edit",add:"Add",confirm:"Confirm",reset:"Reset",refresh:"Refresh",search:"Search",filter:"Filter",export:"Export",import:"Import",close:"Close",show:"Show",hide:"Hide",copy:"Copy",copied:"Copied"},t={dashboard:"Dashboard",home:"Home",routes:"Routes",logs:"Request Logs",configuration:"Configuration"},r={home:"Home",routes:"Route Management",newRoute:"New Route",editRoute:"Edit Route"},a={title:"Dashboard",dataRange:"Data Time Range",totalRequests:"Total Requests",requestsPerSec:"Requests/sec",requestsPerSecond:"Requests/sec",successRate:"Success Rate",avgResponseTime:"Avg Response Time",upstreamAnalysis:"Upstream Analysis",upstreamDistribution:"Upstream Request Distribution",upstreamFailures:"Upstream Failure Statistics",upstreamStatusCodes:"Upstream Status Code Distribution",noUpstreamData:"No upstream data available for the selected time range",noData:"No data available"},o={title:"Monitoring Charts",range:{"1h":"1 Hour","12h":"12 Hours","24h":"24 Hours",oneHour:"1 Hour",twelveHours:"12 Hours",twentyFourHours:"24 Hours"},charts:{requestsTrend:"Requests Trend",periodRequests:"Period Requests",requests:"Requests",responseTimeTrend:"Response Time Trend",avgResponseTime:"Avg Response Time (ms)",milliseconds:"Milliseconds (ms)",successRateTrend:"Success Rate Trend",successRate:"Success Rate (%)",percentage:"Percentage (%)",errorsTrend:"Errors Trend",periodErrors:"Period Errors",errors:"Errors"},noData:"No historical data available"},s={title:"Routes",subtitle:"Manage your reverse proxy routes and upstreams",addRoute:"Add Route",newRoute:"+ New Route",createFirstRoute:"Create First Route",editRoute:"Edit Route",deleteRoute:"Delete Route",export:"Export",import:"Import",path:"Path",upstreams:"Upstreams",actions:"Actions",searchPlaceholder:"Search routes or upstreams...",allTransformers:"All Transformers",noRoutes:"No routes configured",noRoutesMessage:"Create your first route to start proxying requests",noMatchingRoutes:"No matching routes",noMatchingMessage:"Try adjusting your search or filter criteria",showingRoutes:"Showing {count} of {total} route(s)",confirmDelete:"Confirm Delete Route",confirmDeleteMessage:\'Are you sure you want to delete route "{path}"? This action cannot be undone.\',deleted:\'Route "{path}" has been deleted\',deleteFailed:"Delete failed: {error}",duplicated:\'Route "{path}" has been duplicated\',duplicateFailed:"Duplicate failed: {error}",noRoutesToExport:"No routes to export",exported:"Routes exported",importMustBeArray:"Import file must be an array of routes",importSuccess:"Successfully imported {success} route(s)",importPartialSuccess:"Successfully imported {success} route(s), failed {failed}",importFailed:"Import failed: {error}",filterStatus:{all:"All Status",healthy:"Healthy Only",unhealthy:"Has Issues"}},i={title:"Configuration",subtitle:"Edit and manage system configuration",export:"Export",import:"Import",reload:"Reload",restart:"Restart Service",formEditor:"Form Editor",jsonEditor:"JSON Editor",systemSettings:"System Settings",serverPort:"Server Port",workerProcesses:"Worker Processes",workerProcessesHelp:"Number of worker processes to spawn",logLevel:"Log Level",bodyParserLimit:"Body Parser Limit",bodyParserLimitHelp:\'Maximum request body size (e.g., "50mb", "100kb")\',requiresRestart:"Note: Changes to Port, Workers, Log Level, and Body Parser Limit require a service restart to take effect.",routesConfigured:"{count} routes configured.",manageRoutes:"Use the Routes page to manage routes.",jsonConfiguration:"JSON Configuration",jsonParseError:"JSON Parse Error: {error}",jsonPlaceholder:"Enter JSON configuration...",jsonHelp:"Edit the raw JSON configuration. Changes will be validated before saving.",unsavedChanges:"You have unsaved changes",reset:"Reset",save:"Save Configuration",confirmRestart:"Confirm Service Restart",restartMessage:"Are you sure you want to restart the service? This will cause a brief interruption (typically 2-3 seconds) as the service gracefully restarts.",restartWarning:"Active connections may be temporarily interrupted.",validationFailed:"Configuration validation failed: {error}",saved:"Configuration saved",saveFailed:"Save failed: {error}",exported:"Configuration exported",imported:"Configuration imported",importFailed:"Import failed: {error}",reloaded:"Configuration successfully reloaded",reloadFailed:"Reload failed: {error}",restartSent:"Restart signal sent, service will restart in a few seconds",restartDaemonOnly:\'Restart feature is only available in daemon mode. Please use "bungee restart" command or manually restart the development server.\',restartFailed:"Restart failed: {error}"},l={title:"404",message:"Page Not Found",goHome:"Go Home"},n={newRoute:"New Route",editRoute:"Edit Route",backToList:"Back to List",routePath:"Route Path",pathPlaceholder:"e.g.: /api/*",pathHelp:"Supports wildcards (*) and parameters (:param)",pathHelpLong:"Paths support wildcards (*) to match any characters and parameter placeholders (:param) to capture path segments",pathRewrite:"Path Rewrite",pathRewriteHelp:"Regex patterns to modify request paths",pathRewriteTooltip:"Path rewrite allows using regex patterns to match and replace request paths. Example: ^/api/v1 \u2192 /api/v2 will rewrite all paths starting with /api/v1 to /api/v2",addPathRewriteRule:"Add Path Rewrite Rule",patternPlaceholder:"Match regex pattern (e.g. ^/test)",replacementPlaceholder:"Rewrite path (e.g. /v1)",confirmDeleteRule:"Are you sure you want to delete this rule?",upstreamCountTooltip:"Configured {count} upstream server(s)",upstreams:"Upstreams",addUpstream:"Add Upstream",transformer:"Route Transformer",transformerHelp:"Transformer applied to the entire route (optional)",noPluginsAvailable:"No route transformer plugins available",optional:"Optional",failoverTitle:"Failover",failoverHelp:"Configure automatic failover and health check mechanisms",enableFailover:"Enable automatic failover",retryableStatusCodes:"Retryable Status Codes",retryableStatusCodesPlaceholder:"Default: 500, 502, 503, 504 (Server Errors)",retryableStatusCodesHelp:"Automatically retry other upstreams when these status codes occur",passiveHealthCheck:"Passive Health Check",passiveHealthCheckTooltip:"Monitors actual request success/failure to determine upstream health, no extra probe requests",consecutiveFailuresThreshold:"Consecutive Failures Threshold",consecutiveFailuresThresholdHelp:"Mark as unhealthy after this many consecutive failures (default: 3)",healthyThreshold:"Healthy Threshold",healthyThresholdHelp:"Recover to healthy after this many consecutive successes (default: 2)",requestTimeoutMs:"Request Timeout (ms)",requestTimeoutMsHelp:"Timeout for normal requests (default: 30000ms)",connectTimeoutMs:"Connect Timeout (ms)",connectTimeoutMsHelp:"Timeout for establishing connection (default: 5000ms)",activeHealthCheck:"Active Health Check",activeHealthCheckTooltip:"Periodically sends probe requests to actively detect upstream health, independent of business traffic",enableActiveHealthCheck:"Enable active health check",healthCheckIntervalMs:"Check Interval (ms)",healthCheckIntervalMsHelp:"How often to perform health checks (default: 10000ms)",healthCheckTimeoutMs:"Check Timeout (ms)",healthCheckTimeoutMsHelp:"Timeout for health check requests (default: 3000ms)",healthCheckPath:"Check Path",healthCheckPathHelp:"HTTP path for health checks (default: /health)",healthCheckMethod:"HTTP Method",healthCheckExpectedStatus:"Expected Status Codes",healthCheckExpectedStatusHelp:"Expected status codes for health checks (default: 200)",healthCheckUnhealthyThreshold:"Unhealthy Threshold",healthCheckUnhealthyThresholdHelp:"Mark as unhealthy after this many consecutive failures (default: 3)",healthCheckHealthyThreshold:"Healthy Threshold",healthCheckHealthyThresholdHelp:"Recover to healthy after this many consecutive successes (default: 2)",slowStart:"Slow Start",slowStartTooltip:"Gradually increases traffic to recovered upstreams to prevent immediate overload and re-failure",enableSlowStart:"Enable slow start mechanism",slowStartDurationMs:"Slow Start Duration (ms)",slowStartDurationMsHelp:"Duration to gradually increase weight after recovery (default: 30000ms)",slowStartInitialWeightFactor:"Initial Weight Factor",slowStartInitialWeightFactorHelp:"Initial weight ratio after recovery, 0.1 means 10% (default: 0.1)",failoverInfoNotice:"Failover automatically detects upstream health status and switches to backup upstreams on failure to ensure service availability.",recoveryIntervalMs:"Recovery Interval (ms)",recoveryIntervalPlaceholder:"5000",recoveryIntervalHelp:"Wait time before attempting to recover a failed upstream",recoveryTimeoutMs:"Recovery Timeout (ms)",recoveryTimeoutPlaceholder:"3000",recoveryTimeoutHelp:"Timeout for recovery attempts to avoid long pending requests",saveRoute:"Save Route",cancel:"Cancel",saving:"Saving...",loadingTemplates:"Loading templates...",useTemplate:"Use Template",routeSaved:"Route saved",routeUpdated:"Route updated",saveFailed:"Save failed: {error}",pathRequired:"Route path cannot be empty",upstreamRequired:"At least one upstream is required"},u={upstreams:"{count} upstream(s)",hasTransformer:"With transformer",failover:"Failover",edit:"Edit",duplicate:"Duplicate",delete:"Delete",duplicating:"Duplicating...",deleting:"Deleting...",viewAll:"View all {count}",moreActions:"More Actions",tableHeaders:{status:"Status",target:"Target",weight:"Weight",priority:"Priority"},pathRewrite:{original:"Original",rewriteTo:"Rewrite to"}},d={title:"Upstream Servers",close:"Close",statusHealthy:"Healthy",statusUnhealthy:"Unhealthy",statusUnknown:"Unknown"},c={title:"Upstream #{index}",priority:"Priority",target:"Target",targetUrl:"Target URL",targetPlaceholder:"https://api.example.com",targetHelp:"Full URL of the upstream server",weight:"Weight",weightHelp:"Load balancing weight (1-100)",transformer:"Upstream Transformer",transformerHelp:"Transformer applied only to this upstream (optional)",remove:"Remove Upstream",targetRequired:"Target URL cannot be empty",invalidUrl:"Invalid URL format"},p={selectPlugin:"Select Plugin",none:"No Plugin",description:"Plugin Description",testPlugin:"Test Plugin",testing:"Testing...",input:"Input (Original Format)",output:"Output (Transformed Format)",inputPlaceholder:"Enter test data...",testSuccess:"Transform successful",testFailed:"Transform failed: {error}"},h={title:"Request Headers",add:"Add",addHeader:"Add Header",name:"Name",namePlaceholder:"Content-Type",value:"Value",valuePlaceholder:"application/json",remove:"Remove",replace:"Replace",default:"Default",empty:"No headers"},m={title:"Request Body",bodyType:"Body Type",json:"JSON",text:"Plain Text",form:"Form Data",none:"No Body",placeholder:"Enter request body content...",jsonInvalid:"Invalid JSON format",add:"Add",remove:"Remove",replace:"Replace",default:"Default",empty:"No fields"},g={title:"Query Parameters",name:"Name",namePlaceholder:"param_name",value:"Value",valuePlaceholder:"param_value",add:"Add",remove:"Remove",replace:"Replace",default:"Default",empty:"No parameters"},y={title:"Conditional Expression",placeholder:"request.headers[\'User-Agent\'].includes(\'Mobile\')",help:"Use JavaScript expressions that return true or false",examples:"Examples",example1:"Check request headers",example2:"Check query parameters",example3:"Check request method",test:"Test Expression",testResult:"Test Result",resultTrue:"Condition is true",resultFalse:"Condition is false",resultError:"Expression error: {error}"},f={title:"Route Templates",subtitle:"Quickly create common route configurations",useTemplate:"Use This Template",categories:{api:"API Proxy",static:"Static Resources",websocket:"WebSocket",auth:"Auth Proxy"},restApi:{name:"REST API Proxy",description:"Standard RESTful API proxy configuration"},graphql:{name:"GraphQL API",description:"GraphQL endpoint proxy"},static:{name:"Static File Server",description:"Proxy static resource files"},websocket:{name:"WebSocket Proxy",description:"Real-time communication WebSocket proxy"},loadBalancing:{name:"Load Balancing",description:"Multi-upstream load balancing configuration"}},v={yes:"Yes",no:"No",cancelTitle:"Confirm Cancel",cancelMessage:"Are you sure you want to cancel and go back? Any unsaved changes will be lost.",restoreDraftTitle:"Restore Draft",restoreDraftMessage:"An unsaved draft was detected. Would you like to restore it?"},R={targetRequired:"Target URL cannot be empty",targetProtocol:"Target URL must use http or https protocol",invalidUrl:"Invalid URL format",weightPositive:"Weight must be positive",priorityNonNegative:"Priority must be non-negative",totalWeightPositive:"Total weight must be greater than 0",unknownTransformer:"Unknown transformer: {transformer}. Available options: {options}",pathRequired:"Path cannot be empty",pathStartSlash:"Path must start with /",upstreamRequired:"At least one upstream is required",invalidRegex:"Invalid regular expression: {pattern}",invalidStatusCode:"Invalid status code: {code}",recoveryIntervalPositive:"Recovery interval must be greater than 0",recoveryTimeoutPositive:"Recovery timeout must be greater than 0",expressionEmpty:"Expression cannot be empty",mismatchedBraces:"Mismatched {{ }} braces",mismatchedParentheses:"Mismatched parentheses",mismatchedQuotes:"Mismatched quotes"},T={globalAuth:"Global Authentication",routeAuth:"Route Authentication",helpText:"Protect your API endpoints",enableAuth:"Enable Authentication",enabled:"Enabled",disabled:"Disabled",tokens:"Token List",tokenPlaceholder:"Enter token or use {{ env.TOKEN_NAME }}",addToken:"Add Token",expressionSupport:"Expression syntax is supported for referencing environment variables:",securityNotice:"When authentication is enabled, the Authorization header is automatically removed and will not be forwarded to upstream servers (security measure).",routeAuthHelp:"Route-level authentication will override global authentication configuration. If not configured, the global authentication settings will be used."},b={title:"Request Logs",filters:"Filters",autoRefresh:"Auto Refresh",refreshInterval:"Refresh Interval",refreshEvery5s:"Every 5s",refreshEvery10s:"Every 10s",refreshEvery30s:"Every 30s",refreshEvery60s:"Every 60s",lastRefreshed:"Last refreshed",newDataAvailable:"New data available, click refresh to view",searchTerm:"Search",searchPlaceholder:"Search path or error message...",method:"HTTP Method",allMethods:"All Methods",status:"Status Code",statusPlaceholder:"e.g., 200, 404, 500",result:"Result",allResults:"All",success:"Success",failed:"Failed",timeRange:"Time Range",allTime:"All Time",recentTime:"Recent Time",customTime:"Custom Range",recentHours:"Recent Hours",startTime:"Start Time",endTime:"End Time",sortBy:"Sort By",sortByTimestamp:"Timestamp",sortByDuration:"Duration",sortByStatus:"Status Code",sortOrder:"Order",asc:"Ascending",desc:"Descending",time:"Time",path:"Path",duration:"Duration",requestType:"Type",requestTypeFilter:"Request Type",requestType_all:"All Types",requestType_final:"Final",requestType_retry:"Retry",requestType_recovery:"Recovery",requestType_final_desc:"Request returned to client",requestType_retry_desc:"Retry attempt",requestType_recovery_desc:"Failover recovery test",upstream:"Upstream",actions:"Actions",viewDetail:"Details",export:"Export",startStream:"Start Stream",stopStream:"Stop Stream",showing:"Showing {start}-{end} of {total}",page:"Page {page} of {totalPages}",noData:"No log data available",advancedFilters:"Advanced Filters",activeFilters:"active filter(s)",clearFilters:"Clear All",moreFilters:"More Filters",detail:{title:"Request Log Details",requestId:"Request ID",timestamp:"Timestamp",method:"Method",status:"Status",duration:"Duration",success:"Success",requestInfo:"Request Information",path:"Path",originalPath:"Original Path",transformedPath:"Transformed Path",query:"Query String",routePath:"Matched Route",upstreamInfo:"Upstream Information",upstream:"Upstream",transformer:"Transformer",authInfo:"Authentication Information",authLevel:"Auth Level",authResult:"Result",authSuccess:"Authenticated",authFailed:"Failed",processingSteps:"Processing Steps",errorInfo:"Error Information",requestBody:"Request Body",responseBody:"Response Body",loadRequestBody:"Load Request Body",loadResponseBody:"Load Response Body",bodyNotRecorded:"Body not recorded for this request",bodyNotRecordedReason:"May have exceeded size limit or was empty",originalRequest:"Original Request (Before Transform)",finalRequest:"Final Request (To Upstream)",responseData:"Response Data (From Upstream)",originalHeaders:"Original Headers",finalHeaders:"Final Headers",requestHeaders:"Request Headers",responseHeaders:"Response Headers",bodyPreview:"Body Preview",bodyTooLarge:"Body too large ({size})",clickToExpand:"Click to expand",headers:"headers",noHeaders:"No headers available",noBody:"No body data",overview:"Overview",routeAndUpstream:"Route & Upstream",processingTimeline:"Processing Timeline",totalSteps:"{count} steps",totalDuration:"took {duration}",showTimeline:"Show Timeline",hideTimeline:"Hide Timeline",copyToClipboard:"Copy",downloadJson:"Download JSON",copied:"Copied!",tabOriginalRequest:"Original",tabFinalRequest:"Transformed",tabResponse:"Response",requestData:"Request Data",noDataAvailable:"No data available",step:"Step"},steps:{route_matched:"Route Matched",request_snapshot_created:"Request Snapshot Created",auth_failed:"Authentication Failed",auth_success:"Authentication Success",upstream_selected:"Upstream Selected",trying_upstream:"Trying Upstream",circuit_breaker_closed:"Circuit Breaker Closed",circuit_breaker_opened:"Circuit Breaker Opened",circuit_breaker_reopened:"Circuit Breaker Reopened",upstream_recovered:"Upstream Recovered",upstream_retry:"Upstream Retry",upstream_failed:"Upstream Failed",plugin_request_init:"Plugin Request Init",plugin_before_request:"Plugin Before Request",plugin_intercepted:"Plugin Intercepted Request",plugin_response:"Plugin Response",plugin_error:"Plugin Error"}},S={title:"Logging Configuration",bodyRecording:"Enable Request/Response Body Recording",bodyRecordingHelp:"Record request and response bodies for troubleshooting and analysis",maxSize:"Maximum Body Size",maxSizeHelp:"Bodies larger than this will be skipped (1-100 KB)",retentionDays:"Body Retention Days",retentionDaysHelp:"Bodies will be automatically deleted after this many days",days:"days",hours:"hours",cleanupConfig:"Cleanup Configuration",cleanupStatus:"Status",active:"Active",inactive:"Inactive",cleanupRetention:"Retention",cleanupInterval:"Cleanup Interval",manualCleanup:"Manual Cleanup",confirmCleanup:"Are you sure you want to manually trigger log cleanup? This will delete all logs and bodies older than the configured retention period.",cleanupSuccess:"Cleanup completed successfully",cleanupFailed:"Cleanup failed: {error}",lastCleanup:"Last Cleanup Results",deletedSqliteRecords:"Deleted SQLite records",deletedFileLogFiles:"Deleted log files",deletedBodyFiles:"Deleted body files",dirs:"directories",files:"files",duration:"Duration"},P={title:"Login",subtitle:"Enter your access token to continue",token:"Access Token",tokenPlaceholder:"Enter your access token...",submit:"Login",loggingIn:"Logging in...",success:"Login successful",failed:"Login failed: {error}",required:"Access token is required",unauthorized:"Invalid access token",logout:"Logout",logoutConfirm:"Are you sure you want to logout?"},w={common:e,nav:t,breadcrumb:r,dashboard:a,monitoring:o,routes:s,configuration:i,notFound:l,routeEditor:n,routeCard:u,upstreamsModal:d,upstream:c,plugin:p,headers:h,body:m,query:g,expression:y,templates:f,confirmDialog:v,validation:R,auth:T,logs:b,logging:S,login:P};export{T as auth,m as body,r as breadcrumb,e as common,i as configuration,v as confirmDialog,a as dashboard,w as default,y as expression,h as headers,S as logging,P as login,b as logs,o as monitoring,t as nav,l as notFound,p as plugin,g as query,u as routeCard,n as routeEditor,s as routes,f as templates,c as upstream,d as upstreamsModal,R as validation};\n',
21257
+ "vendor-svelte-DJA7stl0.css": `.card.svelte-1qok2wg{backdrop-filter:blur(10px)}.active.svelte-1fgps4v{background-color:hsl(var(--p) / .2)}
21258
+ `,
21259
+ "index-CoOjxcQP.js": `import{A as n}from"./vendor-svelte-CMCOGsuu.js";import"./vendor-7HrnnMjF.js";import"./vendor-charts-o8j72P7f.js";import"./vendor-lodash-CRdCilnf.js";(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const o of t.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function s(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?t.credentials="include":e.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function i(e){if(e.ep)return;e.ep=!0;const t=s(e);fetch(e.href,t)}})();new n({target:document.getElementById("app")});
21260
+ `,
21261
+ "vendor-charts-o8j72P7f.js": `import{o as Ts,l as xn,a as Rs,b as yn,c as vn,S as Se,i as we,s as Ce,d as Q,n as Re,e as Mn,f as kn,g as Sn,h as wn,j as Cn,k as ft,m as Ct,p as Je,q as Qe,t as Ze,r as $e,u as ti,v as ei,w as ii,x as si,y as ni}from"./vendor-svelte-CMCOGsuu.js";import{C as Ls}from"./vendor-7HrnnMjF.js";/*!
21202
21262
  * Chart.js v4.5.0
21203
21263
  * https://www.chartjs.org
21204
21264
  * (c) 2025 Chart.js Contributors
21205
21265
  * Released under the MIT License
21206
- */function zs(){}const Mm=(()=>{let t=0;return()=>t++})();function Dt(t){return t==null}function On(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function Tt(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function Es(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function Ds(t,e){return Es(t)?t:e}function dt(t,e){return typeof t>"u"?e:t}const Cm=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,Id=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function rn(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function Ft(t,e,n,s){let i,l,o;if(On(t))for(l=t.length,i=0;i<l;i++)e.call(n,t[i],i);else if(Tt(t))for(o=Object.keys(t),l=o.length,i=0;i<l;i++)e.call(n,t[o[i]],o[i])}function mo(t,e){let n,s,i,l;if(!t||!e||t.length!==e.length)return!1;for(n=0,s=t.length;n<s;++n)if(i=t[n],l=e[n],i.datasetIndex!==l.datasetIndex||i.index!==l.index)return!1;return!0}function bo(t){if(On(t))return t.map(bo);if(Tt(t)){const e=Object.create(null),n=Object.keys(t),s=n.length;let i=0;for(;i<s;++i)e[n[i]]=bo(t[n[i]]);return e}return t}function Bd(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function Pm(t,e,n,s){if(!Bd(t))return;const i=e[t],l=n[t];Tt(i)&&Tt(l)?kl(i,l,s):e[t]=bo(l)}function kl(t,e,n){const s=On(e)?e:[e],i=s.length;if(!Tt(t))return t;n=n||{};const l=n.merger||Pm;let o;for(let r=0;r<i;++r){if(o=s[r],!Tt(o))continue;const u=Object.keys(o);for(let f=0,h=u.length;f<h;++f)l(u[f],t,o,n)}return t}function gl(t,e){return kl(t,e,{merger:Am})}function Am(t,e,n){if(!Bd(t))return;const s=e[t],i=n[t];Tt(s)&&Tt(i)?gl(s,i):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=bo(i))}const qa={"":t=>t,x:t=>t.x,y:t=>t.y};function Om(t){const e=t.split("."),n=[];let s="";for(const i of e)s+=i,s.endsWith("\\\\")?s=s.slice(0,-1)+".":(n.push(s),s="");return n}function xm(t){const e=Om(t);return n=>{for(const s of e){if(s==="")break;n=n&&n[s]}return n}}function Mi(t,e){return(qa[e]||(qa[e]=xm(e)))(t)}function Gr(t){return t.charAt(0).toUpperCase()+t.slice(1)}const Sl=t=>typeof t<"u",fi=t=>typeof t=="function",Ga=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function Rm(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const Nt=Math.PI,yn=2*Nt,Dm=yn+Nt,_o=Number.POSITIVE_INFINITY,Lm=Nt/180,xn=Nt/2,bi=Nt/4,Xa=Nt*2/3,Fd=Math.log10,Bs=Math.sign;function ml(t,e,n){return Math.abs(t-e)<n}function Ya(t){const e=Math.round(t);t=ml(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(Fd(t))),s=t/n;return(s<=1?1:s<=2?2:s<=5?5:10)*n}function Hm(t){const e=[],n=Math.sqrt(t);let s;for(s=1;s<n;s++)t%s===0&&(e.push(s),e.push(t/s));return n===(n|0)&&e.push(n),e.sort((i,l)=>i-l).pop(),e}function Im(t){return typeof t=="symbol"||typeof t=="object"&&t!==null&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}function El(t){return!Im(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function Bm(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function Fm(t,e,n){let s,i,l;for(s=0,i=t.length;s<i;s++)l=t[s][n],isNaN(l)||(e.min=Math.min(e.min,l),e.max=Math.max(e.max,l))}function qs(t){return t*(Nt/180)}function Nm(t){return t*(180/Nt)}function Ja(t){if(!Es(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function Nd(t,e){const n=e.x-t.x,s=e.y-t.y,i=Math.sqrt(n*n+s*s);let l=Math.atan2(s,n);return l<-.5*Nt&&(l+=yn),{angle:l,distance:i}}function Er(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function jm(t,e){return(t-e+Dm)%yn-Nt}function Ms(t){return(t%yn+yn)%yn}function Tl(t,e,n,s){const i=Ms(t),l=Ms(e),o=Ms(n),r=Ms(l-i),u=Ms(o-i),f=Ms(i-l),h=Ms(i-o);return i===l||i===o||s&&l===o||r>u&&f<h}function Zn(t,e,n){return Math.max(e,Math.min(n,t))}function zm(t){return Zn(t,-32768,32767)}function ii(t,e,n,s=1e-6){return t>=Math.min(e,n)-s&&t<=Math.max(e,n)+s}function Xr(t,e,n){n=n||(o=>t[o]<e);let s=t.length-1,i=0,l;for(;s-i>1;)l=i+s>>1,n(l)?i=l:s=l;return{lo:i,hi:s}}const Si=(t,e,n,s)=>Xr(t,n,s?i=>{const l=t[i][e];return l<n||l===n&&t[i+1][e]===n}:i=>t[i][e]<n),Um=(t,e,n)=>Xr(t,n,s=>t[s][e]>=n);function Vm(t,e,n){let s=0,i=t.length;for(;s<i&&t[s]<e;)s++;for(;i>s&&t[i-1]>n;)i--;return s>0||i<t.length?t.slice(s,i):t}const jd=["push","pop","shift","splice","unshift"];function Wm(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),jd.forEach(n=>{const s="_onData"+Gr(n),i=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...l){const o=i.apply(this,l);return t._chartjs.listeners.forEach(r=>{typeof r[s]=="function"&&r[s](...l)}),o}})})}function Ka(t,e){const n=t._chartjs;if(!n)return;const s=n.listeners,i=s.indexOf(e);i!==-1&&s.splice(i,1),!(s.length>0)&&(jd.forEach(l=>{delete t[l]}),delete t._chartjs)}function zd(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const Ud=(function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame})();function Vd(t,e){let n=[],s=!1;return function(...i){n=i,s||(s=!0,Ud.call(window,()=>{s=!1,t.apply(e,n)}))}}function qm(t,e){let n;return function(...s){return e?(clearTimeout(n),n=setTimeout(t,e,s)):t.apply(this,s),e}}const Yr=t=>t==="start"?"left":t==="end"?"right":"center",Yn=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,Gm=(t,e,n,s)=>t===(s?"left":"right")?n:t==="center"?(e+n)/2:e;function Xm(t,e,n){const s=e.length;let i=0,l=s;if(t._sorted){const{iScale:o,vScale:r,_parsed:u}=t,f=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,h=o.axis,{min:p,max:g,minDefined:m,maxDefined:_}=o.getUserBounds();if(m){if(i=Math.min(Si(u,h,p).lo,n?s:Si(e,h,o.getPixelForValue(p)).lo),f){const b=u.slice(0,i+1).reverse().findIndex(k=>!Dt(k[r.axis]));i-=Math.max(0,b)}i=Zn(i,0,s-1)}if(_){let b=Math.max(Si(u,o.axis,g,!0).hi+1,n?0:Si(e,h,o.getPixelForValue(g),!0).hi+1);if(f){const k=u.slice(b-1).findIndex(v=>!Dt(v[r.axis]));b+=Math.max(0,k)}l=Zn(b,i,s)-i}else l=s-i}return{start:i,count:l}}function Ym(t){const{xScale:e,yScale:n,_scaleRanges:s}=t,i={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!s)return t._scaleRanges=i,!0;const l=s.xmin!==e.min||s.xmax!==e.max||s.ymin!==n.min||s.ymax!==n.max;return Object.assign(s,i),l}const ql=t=>t===0||t===1,Za=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*yn/n)),Qa=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*yn/n)+1,bl={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*xn)+1,easeOutSine:t=>Math.sin(t*xn),easeInOutSine:t=>-.5*(Math.cos(Nt*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>ql(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>ql(t)?t:Za(t,.075,.3),easeOutElastic:t=>ql(t)?t:Qa(t,.075,.3),easeInOutElastic(t){return ql(t)?t:t<.5?.5*Za(t*2,.1125,.45):.5+.5*Qa(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-bl.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?bl.easeInBounce(t*2)*.5:bl.easeOutBounce(t*2-1)*.5+.5};function Jr(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function $a(t){return Jr(t)?t:new wl(t)}function Jo(t){return Jr(t)?t:new wl(t).saturate(.5).darken(.1).hexString()}const Jm=["x","y","borderWidth","radius","tension"],Km=["color","borderColor","backgroundColor"];function Zm(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:Km},numbers:{type:"number",properties:Jm}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function Qm(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const eu=new Map;function $m(t,e){e=e||{};const n=t+JSON.stringify(e);let s=eu.get(n);return s||(s=new Intl.NumberFormat(t,e),eu.set(n,s)),s}function Kr(t,e,n){return $m(e,n).format(t)}const e1={values(t){return On(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const s=this.chart.options.locale;let i,l=t;if(n.length>1){const f=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(f<1e-4||f>1e15)&&(i="scientific"),l=t1(t,n)}const o=Fd(Math.abs(l)),r=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),u={notation:i,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(u,this.options.ticks.format),Kr(t,s,u)}};function t1(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var Wd={formatters:e1};function n1(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,n)=>n.lineWidth,tickColor:(e,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Wd.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const Ci=Object.create(null),Tr=Object.create(null);function _l(t,e){if(!e)return t;const n=e.split(".");for(let s=0,i=n.length;s<i;++s){const l=n[s];t=t[l]||(t[l]=Object.create(null))}return t}function Ko(t,e,n){return typeof e=="string"?kl(_l(t,e),n):kl(_l(t,""),e)}class s1{constructor(e,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=s=>s.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(s,i)=>Jo(i.backgroundColor),this.hoverBorderColor=(s,i)=>Jo(i.borderColor),this.hoverColor=(s,i)=>Jo(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(n)}set(e,n){return Ko(this,e,n)}get(e){return _l(this,e)}describe(e,n){return Ko(Tr,e,n)}override(e,n){return Ko(Ci,e,n)}route(e,n,s,i){const l=_l(this,e),o=_l(this,s),r="_"+n;Object.defineProperties(l,{[r]:{value:l[n],writable:!0},[n]:{enumerable:!0,get(){const u=this[r],f=o[i];return Tt(u)?Object.assign({},f,u):dt(u,f)},set(u){this[r]=u}}})}apply(e){e.forEach(n=>n(this))}}var Sn=new s1({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Zm,Qm,n1]);function i1(t){return!t||Dt(t.size)||Dt(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function tu(t,e,n,s,i){let l=e[i];return l||(l=e[i]=t.measureText(i).width,n.push(i)),l>s&&(s=l),s}function _i(t,e,n){const s=t.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((e-i)*s)/s+i}function nu(t,e){!e&&!t||(e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function Mr(t,e,n,s){qd(t,e,n,s,null)}function qd(t,e,n,s,i){let l,o,r,u,f,h,p,g;const m=e.pointStyle,_=e.rotation,b=e.radius;let k=(_||0)*Lm;if(m&&typeof m=="object"&&(l=m.toString(),l==="[object HTMLImageElement]"||l==="[object HTMLCanvasElement]")){t.save(),t.translate(n,s),t.rotate(k),t.drawImage(m,-m.width/2,-m.height/2,m.width,m.height),t.restore();return}if(!(isNaN(b)||b<=0)){switch(t.beginPath(),m){default:i?t.ellipse(n,s,i/2,b,0,0,yn):t.arc(n,s,b,0,yn),t.closePath();break;case"triangle":h=i?i/2:b,t.moveTo(n+Math.sin(k)*h,s-Math.cos(k)*b),k+=Xa,t.lineTo(n+Math.sin(k)*h,s-Math.cos(k)*b),k+=Xa,t.lineTo(n+Math.sin(k)*h,s-Math.cos(k)*b),t.closePath();break;case"rectRounded":f=b*.516,u=b-f,o=Math.cos(k+bi)*u,p=Math.cos(k+bi)*(i?i/2-f:u),r=Math.sin(k+bi)*u,g=Math.sin(k+bi)*(i?i/2-f:u),t.arc(n-p,s-r,f,k-Nt,k-xn),t.arc(n+g,s-o,f,k-xn,k),t.arc(n+p,s+r,f,k,k+xn),t.arc(n-g,s+o,f,k+xn,k+Nt),t.closePath();break;case"rect":if(!_){u=Math.SQRT1_2*b,h=i?i/2:u,t.rect(n-h,s-u,2*h,2*u);break}k+=bi;case"rectRot":p=Math.cos(k)*(i?i/2:b),o=Math.cos(k)*b,r=Math.sin(k)*b,g=Math.sin(k)*(i?i/2:b),t.moveTo(n-p,s-r),t.lineTo(n+g,s-o),t.lineTo(n+p,s+r),t.lineTo(n-g,s+o),t.closePath();break;case"crossRot":k+=bi;case"cross":p=Math.cos(k)*(i?i/2:b),o=Math.cos(k)*b,r=Math.sin(k)*b,g=Math.sin(k)*(i?i/2:b),t.moveTo(n-p,s-r),t.lineTo(n+p,s+r),t.moveTo(n+g,s-o),t.lineTo(n-g,s+o);break;case"star":p=Math.cos(k)*(i?i/2:b),o=Math.cos(k)*b,r=Math.sin(k)*b,g=Math.sin(k)*(i?i/2:b),t.moveTo(n-p,s-r),t.lineTo(n+p,s+r),t.moveTo(n+g,s-o),t.lineTo(n-g,s+o),k+=bi,p=Math.cos(k)*(i?i/2:b),o=Math.cos(k)*b,r=Math.sin(k)*b,g=Math.sin(k)*(i?i/2:b),t.moveTo(n-p,s-r),t.lineTo(n+p,s+r),t.moveTo(n+g,s-o),t.lineTo(n-g,s+o);break;case"line":o=i?i/2:Math.cos(k)*b,r=Math.sin(k)*b,t.moveTo(n-o,s-r),t.lineTo(n+o,s+r);break;case"dash":t.moveTo(n,s),t.lineTo(n+Math.cos(k)*(i?i/2:b),s+Math.sin(k)*b);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function Ml(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function Zr(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Qr(t){t.restore()}function l1(t,e,n,s,i){if(!e)return t.lineTo(n.x,n.y);if(i==="middle"){const l=(e.x+n.x)/2;t.lineTo(l,e.y),t.lineTo(l,n.y)}else i==="after"!=!!s?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function o1(t,e,n,s){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(s?e.cp1x:e.cp2x,s?e.cp1y:e.cp2y,s?n.cp2x:n.cp1x,s?n.cp2y:n.cp1y,n.x,n.y)}function r1(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),Dt(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function a1(t,e,n,s,i){if(i.strikethrough||i.underline){const l=t.measureText(s),o=e-l.actualBoundingBoxLeft,r=e+l.actualBoundingBoxRight,u=n-l.actualBoundingBoxAscent,f=n+l.actualBoundingBoxDescent,h=i.strikethrough?(u+f)/2:f;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=i.decorationWidth||2,t.moveTo(o,h),t.lineTo(r,h),t.stroke()}}function u1(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function Cl(t,e,n,s,i,l={}){const o=On(e)?e:[e],r=l.strokeWidth>0&&l.strokeColor!=="";let u,f;for(t.save(),t.font=i.string,r1(t,l),u=0;u<o.length;++u)f=o[u],l.backdrop&&u1(t,l.backdrop),r&&(l.strokeColor&&(t.strokeStyle=l.strokeColor),Dt(l.strokeWidth)||(t.lineWidth=l.strokeWidth),t.strokeText(f,n,s,l.maxWidth)),t.fillText(f,n,s,l.maxWidth),a1(t,n,s,f,l),s+=Number(i.lineHeight);t.restore()}function vo(t,e){const{x:n,y:s,w:i,h:l,radius:o}=e;t.arc(n+o.topLeft,s+o.topLeft,o.topLeft,1.5*Nt,Nt,!0),t.lineTo(n,s+l-o.bottomLeft),t.arc(n+o.bottomLeft,s+l-o.bottomLeft,o.bottomLeft,Nt,xn,!0),t.lineTo(n+i-o.bottomRight,s+l),t.arc(n+i-o.bottomRight,s+l-o.bottomRight,o.bottomRight,xn,0,!0),t.lineTo(n+i,s+o.topRight),t.arc(n+i-o.topRight,s+o.topRight,o.topRight,0,-xn,!0),t.lineTo(n+o.topLeft,s)}const c1=/^(normal|(\\d+(?:\\.\\d+)?)(px|em|%)?)$/,f1=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function h1(t,e){const n=(""+t).match(c1);if(!n||n[1]==="normal")return e*1.2;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100;break}return e*t}const d1=t=>+t||0;function $r(t,e){const n={},s=Tt(e),i=s?Object.keys(e):e,l=Tt(t)?s?o=>dt(t[o],t[e[o]]):o=>t[o]:()=>t;for(const o of i)n[o]=d1(l(o));return n}function Gd(t){return $r(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Ni(t){return $r(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Ts(t){const e=Gd(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Qn(t,e){t=t||{},e=e||Sn.font;let n=dt(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let s=dt(t.style,e.style);s&&!(""+s).match(f1)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const i={family:dt(t.family,e.family),lineHeight:h1(dt(t.lineHeight,e.lineHeight),n),size:n,style:s,weight:dt(t.weight,e.weight),string:""};return i.string=i1(i),i}function Gl(t,e,n,s){let i,l,o;for(i=0,l=t.length;i<l;++i)if(o=t[i],o!==void 0&&o!==void 0)return o}function p1(t,e,n){const{min:s,max:i}=t,l=Id(e,(i-s)/2),o=(r,u)=>n&&r===0?0:r+u;return{min:o(s,-Math.abs(l)),max:o(i,l)}}function Oi(t,e){return Object.assign(Object.create(t),e)}function ea(t,e=[""],n,s,i=()=>t[0]){const l=n||t;typeof s>"u"&&(s=Kd("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:l,_fallback:s,_getTarget:i,override:r=>ea([r,...t],e,l,s)};return new Proxy(o,{deleteProperty(r,u){return delete r[u],delete r._keys,delete t[0][u],!0},get(r,u){return Yd(r,u,()=>k1(u,e,t,r))},getOwnPropertyDescriptor(r,u){return Reflect.getOwnPropertyDescriptor(r._scopes[0],u)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(r,u){return iu(r).includes(u)},ownKeys(r){return iu(r)},set(r,u,f){const h=r._storage||(r._storage=i());return r[u]=h[u]=f,delete r._keys,!0}})}function qi(t,e,n,s){const i={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:Xd(t,s),setContext:l=>qi(t,l,n,s),override:l=>qi(t.override(l),e,n,s)};return new Proxy(i,{deleteProperty(l,o){return delete l[o],delete t[o],!0},get(l,o,r){return Yd(l,o,()=>m1(l,o,r))},getOwnPropertyDescriptor(l,o){return l._descriptors.allKeys?Reflect.has(t,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,o)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(l,o){return Reflect.has(t,o)},ownKeys(){return Reflect.ownKeys(t)},set(l,o,r){return t[o]=r,delete l[o],!0}})}function Xd(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:s=e.indexable,_allKeys:i=e.allKeys}=t;return{allKeys:i,scriptable:n,indexable:s,isScriptable:fi(n)?n:()=>n,isIndexable:fi(s)?s:()=>s}}const g1=(t,e)=>t?t+Gr(e):e,ta=(t,e)=>Tt(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function Yd(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||e==="constructor")return t[e];const s=n();return t[e]=s,s}function m1(t,e,n){const{_proxy:s,_context:i,_subProxy:l,_descriptors:o}=t;let r=s[e];return fi(r)&&o.isScriptable(e)&&(r=b1(e,r,t,n)),On(r)&&r.length&&(r=_1(e,r,t,o.isIndexable)),ta(e,r)&&(r=qi(r,i,l&&l[e],o)),r}function b1(t,e,n,s){const{_proxy:i,_context:l,_subProxy:o,_stack:r}=n;if(r.has(t))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+t);r.add(t);let u=e(l,o||s);return r.delete(t),ta(t,u)&&(u=na(i._scopes,i,t,u)),u}function _1(t,e,n,s){const{_proxy:i,_context:l,_subProxy:o,_descriptors:r}=n;if(typeof l.index<"u"&&s(t))return e[l.index%e.length];if(Tt(e[0])){const u=e,f=i._scopes.filter(h=>h!==u);e=[];for(const h of u){const p=na(f,i,t,h);e.push(qi(p,l,o&&o[t],r))}}return e}function Jd(t,e,n){return fi(t)?t(e,n):t}const v1=(t,e)=>t===!0?e:typeof t=="string"?Mi(e,t):void 0;function y1(t,e,n,s,i){for(const l of e){const o=v1(n,l);if(o){t.add(o);const r=Jd(o._fallback,n,i);if(typeof r<"u"&&r!==n&&r!==s)return r}else if(o===!1&&typeof s<"u"&&n!==s)return null}return!1}function na(t,e,n,s){const i=e._rootScopes,l=Jd(e._fallback,n,s),o=[...t,...i],r=new Set;r.add(s);let u=su(r,o,n,l||n,s);return u===null||typeof l<"u"&&l!==n&&(u=su(r,o,l,u,s),u===null)?!1:ea(Array.from(r),[""],i,l,()=>w1(e,n,s))}function su(t,e,n,s,i){for(;n;)n=y1(t,e,n,s,i);return n}function w1(t,e,n){const s=t._getTarget();e in s||(s[e]={});const i=s[e];return On(i)&&Tt(n)?n:i||{}}function k1(t,e,n,s){let i;for(const l of e)if(i=Kd(g1(l,t),n),typeof i<"u")return ta(t,i)?na(n,s,t,i):i}function Kd(t,e){for(const n of e){if(!n)continue;const s=n[t];if(typeof s<"u")return s}}function iu(t){let e=t._keys;return e||(e=t._keys=S1(t._scopes)),e}function S1(t){const e=new Set;for(const n of t)for(const s of Object.keys(n).filter(i=>!i.startsWith("_")))e.add(s);return Array.from(e)}const E1=Number.EPSILON||1e-14,Gi=(t,e)=>e<t.length&&!t[e].skip&&t[e],Zd=t=>t==="x"?"y":"x";function T1(t,e,n,s){const i=t.skip?e:t,l=e,o=n.skip?e:n,r=Er(l,i),u=Er(o,l);let f=r/(r+u),h=u/(r+u);f=isNaN(f)?0:f,h=isNaN(h)?0:h;const p=s*f,g=s*h;return{previous:{x:l.x-p*(o.x-i.x),y:l.y-p*(o.y-i.y)},next:{x:l.x+g*(o.x-i.x),y:l.y+g*(o.y-i.y)}}}function M1(t,e,n){const s=t.length;let i,l,o,r,u,f=Gi(t,0);for(let h=0;h<s-1;++h)if(u=f,f=Gi(t,h+1),!(!u||!f)){if(ml(e[h],0,E1)){n[h]=n[h+1]=0;continue}i=n[h]/e[h],l=n[h+1]/e[h],r=Math.pow(i,2)+Math.pow(l,2),!(r<=9)&&(o=3/Math.sqrt(r),n[h]=i*o*e[h],n[h+1]=l*o*e[h])}}function C1(t,e,n="x"){const s=Zd(n),i=t.length;let l,o,r,u=Gi(t,0);for(let f=0;f<i;++f){if(o=r,r=u,u=Gi(t,f+1),!r)continue;const h=r[n],p=r[s];o&&(l=(h-o[n])/3,r[\`cp1\${n}\`]=h-l,r[\`cp1\${s}\`]=p-l*e[f]),u&&(l=(u[n]-h)/3,r[\`cp2\${n}\`]=h+l,r[\`cp2\${s}\`]=p+l*e[f])}}function P1(t,e="x"){const n=Zd(e),s=t.length,i=Array(s).fill(0),l=Array(s);let o,r,u,f=Gi(t,0);for(o=0;o<s;++o)if(r=u,u=f,f=Gi(t,o+1),!!u){if(f){const h=f[e]-u[e];i[o]=h!==0?(f[n]-u[n])/h:0}l[o]=r?f?Bs(i[o-1])!==Bs(i[o])?0:(i[o-1]+i[o])/2:i[o-1]:i[o]}M1(t,i,l),C1(t,l,e)}function Xl(t,e,n){return Math.max(Math.min(t,n),e)}function A1(t,e){let n,s,i,l,o,r=Ml(t[0],e);for(n=0,s=t.length;n<s;++n)o=l,l=r,r=n<s-1&&Ml(t[n+1],e),l&&(i=t[n],o&&(i.cp1x=Xl(i.cp1x,e.left,e.right),i.cp1y=Xl(i.cp1y,e.top,e.bottom)),r&&(i.cp2x=Xl(i.cp2x,e.left,e.right),i.cp2y=Xl(i.cp2y,e.top,e.bottom)))}function O1(t,e,n,s,i){let l,o,r,u;if(e.spanGaps&&(t=t.filter(f=>!f.skip)),e.cubicInterpolationMode==="monotone")P1(t,i);else{let f=s?t[t.length-1]:t[0];for(l=0,o=t.length;l<o;++l)r=t[l],u=T1(f,r,t[Math.min(l+1,o-(s?0:1))%o],e.tension),r.cp1x=u.previous.x,r.cp1y=u.previous.y,r.cp2x=u.next.x,r.cp2y=u.next.y,f=r}e.capBezierPoints&&A1(t,n)}function sa(){return typeof window<"u"&&typeof document<"u"}function ia(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function yo(t,e,n){let s;return typeof t=="string"?(s=parseInt(t,10),t.indexOf("%")!==-1&&(s=s/100*e.parentNode[n])):s=t,s}const Ao=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function x1(t,e){return Ao(t).getPropertyValue(e)}const R1=["top","right","bottom","left"];function Ti(t,e,n){const s={};n=n?"-"+n:"";for(let i=0;i<4;i++){const l=R1[i];s[l]=parseFloat(t[e+"-"+l+n])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const D1=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function L1(t,e){const n=t.touches,s=n&&n.length?n[0]:t,{offsetX:i,offsetY:l}=s;let o=!1,r,u;if(D1(i,l,t.target))r=i,u=l;else{const f=e.getBoundingClientRect();r=s.clientX-f.left,u=s.clientY-f.top,o=!0}return{x:r,y:u,box:o}}function yi(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:s}=e,i=Ao(n),l=i.boxSizing==="border-box",o=Ti(i,"padding"),r=Ti(i,"border","width"),{x:u,y:f,box:h}=L1(t,n),p=o.left+(h&&r.left),g=o.top+(h&&r.top);let{width:m,height:_}=e;return l&&(m-=o.width+r.width,_-=o.height+r.height),{x:Math.round((u-p)/m*n.width/s),y:Math.round((f-g)/_*n.height/s)}}function H1(t,e,n){let s,i;if(e===void 0||n===void 0){const l=t&&ia(t);if(!l)e=t.clientWidth,n=t.clientHeight;else{const o=l.getBoundingClientRect(),r=Ao(l),u=Ti(r,"border","width"),f=Ti(r,"padding");e=o.width-f.width-u.width,n=o.height-f.height-u.height,s=yo(r.maxWidth,l,"clientWidth"),i=yo(r.maxHeight,l,"clientHeight")}}return{width:e,height:n,maxWidth:s||_o,maxHeight:i||_o}}const Yl=t=>Math.round(t*10)/10;function I1(t,e,n,s){const i=Ao(t),l=Ti(i,"margin"),o=yo(i.maxWidth,t,"clientWidth")||_o,r=yo(i.maxHeight,t,"clientHeight")||_o,u=H1(t,e,n);let{width:f,height:h}=u;if(i.boxSizing==="content-box"){const g=Ti(i,"border","width"),m=Ti(i,"padding");f-=m.width+g.width,h-=m.height+g.height}return f=Math.max(0,f-l.width),h=Math.max(0,s?f/s:h-l.height),f=Yl(Math.min(f,o,u.maxWidth)),h=Yl(Math.min(h,r,u.maxHeight)),f&&!h&&(h=Yl(f/2)),(e!==void 0||n!==void 0)&&s&&u.height&&h>u.height&&(h=u.height,f=Yl(Math.floor(h*s))),{width:f,height:h}}function lu(t,e,n){const s=e||1,i=Math.floor(t.height*s),l=Math.floor(t.width*s);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const o=t.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=\`\${t.height}px\`,o.style.width=\`\${t.width}px\`),t.currentDevicePixelRatio!==s||o.height!==i||o.width!==l?(t.currentDevicePixelRatio=s,o.height=i,o.width=l,t.ctx.setTransform(s,0,0,s,0,0),!0):!1}const B1=(function(){let t=!1;try{const e={get passive(){return t=!0,!1}};sa()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t})();function ou(t,e){const n=x1(t,e),s=n&&n.match(/^(\\d+)(\\.\\d+)?px$/);return s?+s[1]:void 0}function wi(t,e,n,s){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function F1(t,e,n,s){return{x:t.x+n*(e.x-t.x),y:s==="middle"?n<.5?t.y:e.y:s==="after"?n<1?t.y:e.y:n>0?e.y:t.y}}function N1(t,e,n,s){const i={x:t.cp2x,y:t.cp2y},l={x:e.cp1x,y:e.cp1y},o=wi(t,i,n),r=wi(i,l,n),u=wi(l,e,n),f=wi(o,r,n),h=wi(r,u,n);return wi(f,h,n)}const j1=function(t,e){return{x(n){return t+t+e-n},setWidth(n){e=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,s){return n-s},leftForLtr(n,s){return n-s}}},z1=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function ji(t,e,n){return t?j1(e,n):z1()}function Qd(t,e){let n,s;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,s=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=s)}function $d(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function ep(t){return t==="angle"?{between:Tl,compare:jm,normalize:Ms}:{between:ii,compare:(e,n)=>e-n,normalize:e=>e}}function ru({start:t,end:e,count:n,loop:s,style:i}){return{start:t%n,end:e%n,loop:s&&(e-t+1)%n===0,style:i}}function U1(t,e,n){const{property:s,start:i,end:l}=n,{between:o,normalize:r}=ep(s),u=e.length;let{start:f,end:h,loop:p}=t,g,m;if(p){for(f+=u,h+=u,g=0,m=u;g<m&&o(r(e[f%u][s]),i,l);++g)f--,h--;f%=u,h%=u}return h<f&&(h+=u),{start:f,end:h,loop:p,style:t.style}}function V1(t,e,n){if(!n)return[t];const{property:s,start:i,end:l}=n,o=e.length,{compare:r,between:u,normalize:f}=ep(s),{start:h,end:p,loop:g,style:m}=U1(t,e,n),_=[];let b=!1,k=null,v,y,S;const C=()=>u(i,S,v)&&r(i,S)!==0,T=()=>r(l,v)===0||u(l,S,v),O=()=>b||C(),A=()=>!b||T();for(let x=h,P=h;x<=p;++x)y=e[x%o],!y.skip&&(v=f(y[s]),v!==S&&(b=u(v,i,l),k===null&&O()&&(k=r(v,i)===0?x:P),k!==null&&A()&&(_.push(ru({start:k,end:x,loop:g,count:o,style:m})),k=null),P=x,S=v));return k!==null&&_.push(ru({start:k,end:p,loop:g,count:o,style:m})),_}function W1(t,e){const n=[],s=t.segments;for(let i=0;i<s.length;i++){const l=V1(s[i],t.points,e);l.length&&n.push(...l)}return n}function q1(t,e,n,s){let i=0,l=e-1;if(n&&!s)for(;i<e&&!t[i].skip;)i++;for(;i<e&&t[i].skip;)i++;for(i%=e,n&&(l+=i);l>i&&t[l%e].skip;)l--;return l%=e,{start:i,end:l}}function G1(t,e,n,s){const i=t.length,l=[];let o=e,r=t[e],u;for(u=e+1;u<=n;++u){const f=t[u%i];f.skip||f.stop?r.skip||(s=!1,l.push({start:e%i,end:(u-1)%i,loop:s}),e=o=f.stop?u:null):(o=u,r.skip&&(e=u)),r=f}return o!==null&&l.push({start:e%i,end:o%i,loop:s}),l}function X1(t,e){const n=t.points,s=t.options.spanGaps,i=n.length;if(!i)return[];const l=!!t._loop,{start:o,end:r}=q1(n,i,l,s);if(s===!0)return au(t,[{start:o,end:r,loop:l}],n,e);const u=r<o?r+i:r,f=!!t._fullLoop&&o===0&&r===i-1;return au(t,G1(n,o,u,f),n,e)}function au(t,e,n,s){return!s||!s.setContext||!n?e:Y1(t,e,n,s)}function Y1(t,e,n,s){const i=t._chart.getContext(),l=uu(t.options),{_datasetIndex:o,options:{spanGaps:r}}=t,u=n.length,f=[];let h=l,p=e[0].start,g=p;function m(_,b,k,v){const y=r?-1:1;if(_!==b){for(_+=u;n[_%u].skip;)_-=y;for(;n[b%u].skip;)b+=y;_%u!==b%u&&(f.push({start:_%u,end:b%u,loop:k,style:v}),h=v,p=b%u)}}for(const _ of e){p=r?p:_.start;let b=n[p%u],k;for(g=p+1;g<=_.end;g++){const v=n[g%u];k=uu(s.setContext(Oi(i,{type:"segment",p0:b,p1:v,p0DataIndex:(g-1)%u,p1DataIndex:g%u,datasetIndex:o}))),J1(k,h)&&m(p,g-1,_.loop,h),b=v,h=k}p<g-1&&m(p,g-1,_.loop,h)}return f}function uu(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function J1(t,e){if(!e)return!1;const n=[],s=function(i,l){return Jr(l)?(n.includes(l)||n.push(l),n.indexOf(l)):l};return JSON.stringify(t,s)!==JSON.stringify(e,s)}function Jl(t,e,n){return t.options.clip?t[n]:e[n]}function K1(t,e){const{xScale:n,yScale:s}=t;return n&&s?{left:Jl(n,e,"left"),right:Jl(n,e,"right"),top:Jl(s,e,"top"),bottom:Jl(s,e,"bottom")}:e}function Z1(t,e){const n=e._clip;if(n.disabled)return!1;const s=K1(e,t.chartArea);return{left:n.left===!1?0:s.left-(n.left===!0?0:n.left),right:n.right===!1?t.width:s.right+(n.right===!0?0:n.right),top:n.top===!1?0:s.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?t.height:s.bottom+(n.bottom===!0?0:n.bottom)}}/*!
21266
+ */function rt(){}const Pn=(()=>{let i=0;return()=>i++})();function T(i){return i==null}function H(i){if(Array.isArray&&Array.isArray(i))return!0;const t=Object.prototype.toString.call(i);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function A(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function Z(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function it(i,t){return Z(i)?i:t}function P(i,t){return typeof i>"u"?t:i}const Dn=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:+i/t,Is=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*t:+i;function E(i,t,e){if(i&&typeof i.call=="function")return i.apply(e,t)}function R(i,t,e,s){let n,o,r;if(H(i))for(o=i.length,n=0;n<o;n++)t.call(e,i[n],n);else if(A(i))for(r=Object.keys(i),o=r.length,n=0;n<o;n++)t.call(e,i[r[n]],r[n])}function be(i,t){let e,s,n,o;if(!i||!t||i.length!==t.length)return!1;for(e=0,s=i.length;e<s;++e)if(n=i[e],o=t[e],n.datasetIndex!==o.datasetIndex||n.index!==o.index)return!1;return!0}function _e(i){if(H(i))return i.map(_e);if(A(i)){const t=Object.create(null),e=Object.keys(i),s=e.length;let n=0;for(;n<s;++n)t[e[n]]=_e(i[e[n]]);return t}return i}function Es(i){return["__proto__","prototype","constructor"].indexOf(i)===-1}function On(i,t,e,s){if(!Es(i))return;const n=t[i],o=e[i];A(n)&&A(o)?Gt(n,o,s):t[i]=_e(o)}function Gt(i,t,e){const s=H(t)?t:[t],n=s.length;if(!A(i))return i;e=e||{};const o=e.merger||On;let r;for(let a=0;a<n;++a){if(r=s[a],!A(r))continue;const l=Object.keys(r);for(let c=0,h=l.length;c<h;++c)o(l[c],i,r,e)}return i}function Ut(i,t){return Gt(i,t,{merger:An})}function An(i,t,e){if(!Es(i))return;const s=t[i],n=e[i];A(s)&&A(n)?Ut(s,n):Object.prototype.hasOwnProperty.call(t,i)||(t[i]=_e(n))}const yi={"":i=>i,x:i=>i.x,y:i=>i.y};function Tn(i){const t=i.split("."),e=[];let s="";for(const n of t)s+=n,s.endsWith("\\\\")?s=s.slice(0,-1)+".":(e.push(s),s="");return e}function Rn(i){const t=Tn(i);return e=>{for(const s of t){if(s==="")break;e=e&&e[s]}return e}}function St(i,t){return(yi[t]||(yi[t]=Rn(t)))(i)}function oi(i){return i.charAt(0).toUpperCase()+i.slice(1)}const Jt=i=>typeof i<"u",gt=i=>typeof i=="function",vi=(i,t)=>{if(i.size!==t.size)return!1;for(const e of i)if(!t.has(e))return!1;return!0};function Ln(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}const L=Math.PI,F=2*L,In=F+L,xe=Number.POSITIVE_INFINITY,En=L/180,N=L/2,bt=L/4,Mi=L*2/3,zs=Math.log10,ot=Math.sign;function Xt(i,t,e){return Math.abs(i-t)<e}function ki(i){const t=Math.round(i);i=Xt(i,t,i/1e3)?t:i;const e=Math.pow(10,Math.floor(zs(i))),s=i/e;return(s<=1?1:s<=2?2:s<=5?5:10)*e}function zn(i){const t=[],e=Math.sqrt(i);let s;for(s=1;s<e;s++)i%s===0&&(t.push(s),t.push(i/s));return e===(e|0)&&t.push(e),t.sort((n,o)=>n-o).pop(),t}function Fn(i){return typeof i=="symbol"||typeof i=="object"&&i!==null&&!(Symbol.toPrimitive in i||"toString"in i||"valueOf"in i)}function Qt(i){return!Fn(i)&&!isNaN(parseFloat(i))&&isFinite(i)}function Bn(i,t){const e=Math.round(i);return e-t<=i&&e+t>=i}function Wn(i,t,e){let s,n,o;for(s=0,n=i.length;s<n;s++)o=i[s][e],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function ct(i){return i*(L/180)}function Hn(i){return i*(180/L)}function Si(i){if(!Z(i))return;let t=1,e=0;for(;Math.round(i*t)/t!==i;)t*=10,e++;return e}function Fs(i,t){const e=t.x-i.x,s=t.y-i.y,n=Math.sqrt(e*e+s*s);let o=Math.atan2(s,e);return o<-.5*L&&(o+=F),{angle:o,distance:n}}function Ye(i,t){return Math.sqrt(Math.pow(t.x-i.x,2)+Math.pow(t.y-i.y,2))}function Nn(i,t){return(i-t+In)%F-L}function et(i){return(i%F+F)%F}function Zt(i,t,e,s){const n=et(i),o=et(t),r=et(e),a=et(o-n),l=et(r-n),c=et(n-o),h=et(n-r);return n===o||n===r||s&&o===r||a>l&&c<h}function U(i,t,e){return Math.max(t,Math.min(e,i))}function Vn(i){return U(i,-32768,32767)}function dt(i,t,e,s=1e-6){return i>=Math.min(t,e)-s&&i<=Math.max(t,e)+s}function ri(i,t,e){e=e||(r=>i[r]<t);let s=i.length-1,n=0,o;for(;s-n>1;)o=n+s>>1,e(o)?n=o:s=o;return{lo:n,hi:s}}const Mt=(i,t,e,s)=>ri(i,e,s?n=>{const o=i[n][t];return o<e||o===e&&i[n+1][t]===e}:n=>i[n][t]<e),jn=(i,t,e)=>ri(i,e,s=>i[s][t]>=e);function Yn(i,t,e){let s=0,n=i.length;for(;s<n&&i[s]<t;)s++;for(;n>s&&i[n-1]>e;)n--;return s>0||n<i.length?i.slice(s,n):i}const Bs=["push","pop","shift","splice","unshift"];function Un(i,t){if(i._chartjs){i._chartjs.listeners.push(t);return}Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Bs.forEach(e=>{const s="_onData"+oi(e),n=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...o){const r=n.apply(this,o);return i._chartjs.listeners.forEach(a=>{typeof a[s]=="function"&&a[s](...o)}),r}})})}function wi(i,t){const e=i._chartjs;if(!e)return;const s=e.listeners,n=s.indexOf(t);n!==-1&&s.splice(n,1),!(s.length>0)&&(Bs.forEach(o=>{delete i[o]}),delete i._chartjs)}function Ws(i){const t=new Set(i);return t.size===i.length?i:Array.from(t)}const Hs=(function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame})();function Ns(i,t){let e=[],s=!1;return function(...n){e=n,s||(s=!0,Hs.call(window,()=>{s=!1,i.apply(t,e)}))}}function Xn(i,t){let e;return function(...s){return t?(clearTimeout(e),e=setTimeout(i,t,s)):i.apply(this,s),t}}const ai=i=>i==="start"?"left":i==="end"?"right":"center",Y=(i,t,e)=>i==="start"?t:i==="end"?e:(t+e)/2,Kn=(i,t,e,s)=>i===(s?"left":"right")?e:i==="center"?(t+e)/2:t;function qn(i,t,e){const s=t.length;let n=0,o=s;if(i._sorted){const{iScale:r,vScale:a,_parsed:l}=i,c=i.dataset&&i.dataset.options?i.dataset.options.spanGaps:null,h=r.axis,{min:d,max:u,minDefined:f,maxDefined:p}=r.getUserBounds();if(f){if(n=Math.min(Mt(l,h,d).lo,e?s:Mt(t,h,r.getPixelForValue(d)).lo),c){const g=l.slice(0,n+1).reverse().findIndex(m=>!T(m[a.axis]));n-=Math.max(0,g)}n=U(n,0,s-1)}if(p){let g=Math.max(Mt(l,r.axis,u,!0).hi+1,e?0:Mt(t,h,r.getPixelForValue(u),!0).hi+1);if(c){const m=l.slice(g-1).findIndex(b=>!T(b[a.axis]));g+=Math.max(0,m)}o=U(g,n,s)-n}else o=s-n}return{start:n,count:o}}function Gn(i){const{xScale:t,yScale:e,_scaleRanges:s}=i,n={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!s)return i._scaleRanges=n,!0;const o=s.xmin!==t.min||s.xmax!==t.max||s.ymin!==e.min||s.ymax!==e.max;return Object.assign(s,n),o}const ne=i=>i===0||i===1,Ci=(i,t,e)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-t)*F/e)),Pi=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*F/e)+1,Kt={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*N)+1,easeOutSine:i=>Math.sin(i*N),easeInOutSine:i=>-.5*(Math.cos(L*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>ne(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>ne(i)?i:Ci(i,.075,.3),easeOutElastic:i=>ne(i)?i:Pi(i,.075,.3),easeInOutElastic(i){return ne(i)?i:i<.5?.5*Ci(i*2,.1125,.45):.5+.5*Pi(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let t=1.70158;return(i/=.5)<1?.5*(i*i*(((t*=1.525)+1)*i-t)):.5*((i-=2)*i*(((t*=1.525)+1)*i+t)+2)},easeInBounce:i=>1-Kt.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?Kt.easeInBounce(i*2)*.5:Kt.easeOutBounce(i*2-1)*.5+.5};function li(i){if(i&&typeof i=="object"){const t=i.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Di(i){return li(i)?i:new Ls(i)}function Le(i){return li(i)?i:new Ls(i).saturate(.5).darken(.1).hexString()}const Jn=["x","y","borderWidth","radius","tension"],Qn=["color","borderColor","backgroundColor"];function Zn(i){i.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),i.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),i.set("animations",{colors:{type:"color",properties:Qn},numbers:{type:"number",properties:Jn}}),i.describe("animations",{_fallback:"animation"}),i.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function $n(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Oi=new Map;function to(i,t){t=t||{};const e=i+JSON.stringify(t);let s=Oi.get(e);return s||(s=new Intl.NumberFormat(i,t),Oi.set(e,s)),s}function ci(i,t,e){return to(t,e).format(i)}const eo={values(i){return H(i)?i:""+i},numeric(i,t,e){if(i===0)return"0";const s=this.chart.options.locale;let n,o=i;if(e.length>1){const c=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(c<1e-4||c>1e15)&&(n="scientific"),o=io(i,e)}const r=zs(Math.abs(o)),a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:n,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),ci(i,s,l)}};function io(i,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&i!==Math.floor(i)&&(e=i-Math.floor(i)),e}var Vs={formatters:eo};function so(i){i.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Vs.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),i.route("scale.ticks","color","","color"),i.route("scale.grid","color","","borderColor"),i.route("scale.border","color","","borderColor"),i.route("scale.title","color","","color"),i.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),i.describe("scales",{_fallback:"scale"}),i.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const wt=Object.create(null),Ue=Object.create(null);function qt(i,t){if(!t)return i;const e=t.split(".");for(let s=0,n=e.length;s<n;++s){const o=e[s];i=i[o]||(i[o]=Object.create(null))}return i}function Ie(i,t,e){return typeof t=="string"?Gt(qt(i,t),e):Gt(qt(i,""),t)}class no{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=s=>s.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(s,n)=>Le(n.backgroundColor),this.hoverBorderColor=(s,n)=>Le(n.borderColor),this.hoverColor=(s,n)=>Le(n.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Ie(this,t,e)}get(t){return qt(this,t)}describe(t,e){return Ie(Ue,t,e)}override(t,e){return Ie(wt,t,e)}route(t,e,s,n){const o=qt(this,t),r=qt(this,s),a="_"+e;Object.defineProperties(o,{[a]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[a],c=r[n];return A(l)?Object.assign({},c,l):P(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(e=>e(this))}}var W=new no({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Zn,$n,so]);function oo(i){return!i||T(i.size)||T(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function Ai(i,t,e,s,n){let o=t[n];return o||(o=t[n]=i.measureText(n).width,e.push(n)),o>s&&(s=o),s}function _t(i,t,e){const s=i.currentDevicePixelRatio,n=e!==0?Math.max(e/2,.5):0;return Math.round((t-n)*s)/s+n}function Ti(i,t){!t&&!i||(t=t||i.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,i.width,i.height),t.restore())}function Xe(i,t,e,s){js(i,t,e,s,null)}function js(i,t,e,s,n){let o,r,a,l,c,h,d,u;const f=t.pointStyle,p=t.rotation,g=t.radius;let m=(p||0)*En;if(f&&typeof f=="object"&&(o=f.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){i.save(),i.translate(e,s),i.rotate(m),i.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),i.restore();return}if(!(isNaN(g)||g<=0)){switch(i.beginPath(),f){default:n?i.ellipse(e,s,n/2,g,0,0,F):i.arc(e,s,g,0,F),i.closePath();break;case"triangle":h=n?n/2:g,i.moveTo(e+Math.sin(m)*h,s-Math.cos(m)*g),m+=Mi,i.lineTo(e+Math.sin(m)*h,s-Math.cos(m)*g),m+=Mi,i.lineTo(e+Math.sin(m)*h,s-Math.cos(m)*g),i.closePath();break;case"rectRounded":c=g*.516,l=g-c,r=Math.cos(m+bt)*l,d=Math.cos(m+bt)*(n?n/2-c:l),a=Math.sin(m+bt)*l,u=Math.sin(m+bt)*(n?n/2-c:l),i.arc(e-d,s-a,c,m-L,m-N),i.arc(e+u,s-r,c,m-N,m),i.arc(e+d,s+a,c,m,m+N),i.arc(e-u,s+r,c,m+N,m+L),i.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*g,h=n?n/2:l,i.rect(e-h,s-l,2*h,2*l);break}m+=bt;case"rectRot":d=Math.cos(m)*(n?n/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,u=Math.sin(m)*(n?n/2:g),i.moveTo(e-d,s-a),i.lineTo(e+u,s-r),i.lineTo(e+d,s+a),i.lineTo(e-u,s+r),i.closePath();break;case"crossRot":m+=bt;case"cross":d=Math.cos(m)*(n?n/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,u=Math.sin(m)*(n?n/2:g),i.moveTo(e-d,s-a),i.lineTo(e+d,s+a),i.moveTo(e+u,s-r),i.lineTo(e-u,s+r);break;case"star":d=Math.cos(m)*(n?n/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,u=Math.sin(m)*(n?n/2:g),i.moveTo(e-d,s-a),i.lineTo(e+d,s+a),i.moveTo(e+u,s-r),i.lineTo(e-u,s+r),m+=bt,d=Math.cos(m)*(n?n/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,u=Math.sin(m)*(n?n/2:g),i.moveTo(e-d,s-a),i.lineTo(e+d,s+a),i.moveTo(e+u,s-r),i.lineTo(e-u,s+r);break;case"line":r=n?n/2:Math.cos(m)*g,a=Math.sin(m)*g,i.moveTo(e-r,s-a),i.lineTo(e+r,s+a);break;case"dash":i.moveTo(e,s),i.lineTo(e+Math.cos(m)*(n?n/2:g),s+Math.sin(m)*g);break;case!1:i.closePath();break}i.fill(),t.borderWidth>0&&i.stroke()}}function $t(i,t,e){return e=e||.5,!t||i&&i.x>t.left-e&&i.x<t.right+e&&i.y>t.top-e&&i.y<t.bottom+e}function hi(i,t){i.save(),i.beginPath(),i.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),i.clip()}function di(i){i.restore()}function ro(i,t,e,s,n){if(!t)return i.lineTo(e.x,e.y);if(n==="middle"){const o=(t.x+e.x)/2;i.lineTo(o,t.y),i.lineTo(o,e.y)}else n==="after"!=!!s?i.lineTo(t.x,e.y):i.lineTo(e.x,t.y);i.lineTo(e.x,e.y)}function ao(i,t,e,s){if(!t)return i.lineTo(e.x,e.y);i.bezierCurveTo(s?t.cp1x:t.cp2x,s?t.cp1y:t.cp2y,s?e.cp2x:e.cp1x,s?e.cp2y:e.cp1y,e.x,e.y)}function lo(i,t){t.translation&&i.translate(t.translation[0],t.translation[1]),T(t.rotation)||i.rotate(t.rotation),t.color&&(i.fillStyle=t.color),t.textAlign&&(i.textAlign=t.textAlign),t.textBaseline&&(i.textBaseline=t.textBaseline)}function co(i,t,e,s,n){if(n.strikethrough||n.underline){const o=i.measureText(s),r=t-o.actualBoundingBoxLeft,a=t+o.actualBoundingBoxRight,l=e-o.actualBoundingBoxAscent,c=e+o.actualBoundingBoxDescent,h=n.strikethrough?(l+c)/2:c;i.strokeStyle=i.fillStyle,i.beginPath(),i.lineWidth=n.decorationWidth||2,i.moveTo(r,h),i.lineTo(a,h),i.stroke()}}function ho(i,t){const e=i.fillStyle;i.fillStyle=t.color,i.fillRect(t.left,t.top,t.width,t.height),i.fillStyle=e}function te(i,t,e,s,n,o={}){const r=H(t)?t:[t],a=o.strokeWidth>0&&o.strokeColor!=="";let l,c;for(i.save(),i.font=n.string,lo(i,o),l=0;l<r.length;++l)c=r[l],o.backdrop&&ho(i,o.backdrop),a&&(o.strokeColor&&(i.strokeStyle=o.strokeColor),T(o.strokeWidth)||(i.lineWidth=o.strokeWidth),i.strokeText(c,e,s,o.maxWidth)),i.fillText(c,e,s,o.maxWidth),co(i,e,s,c,o),s+=Number(n.lineHeight);i.restore()}function ye(i,t){const{x:e,y:s,w:n,h:o,radius:r}=t;i.arc(e+r.topLeft,s+r.topLeft,r.topLeft,1.5*L,L,!0),i.lineTo(e,s+o-r.bottomLeft),i.arc(e+r.bottomLeft,s+o-r.bottomLeft,r.bottomLeft,L,N,!0),i.lineTo(e+n-r.bottomRight,s+o),i.arc(e+n-r.bottomRight,s+o-r.bottomRight,r.bottomRight,N,0,!0),i.lineTo(e+n,s+r.topRight),i.arc(e+n-r.topRight,s+r.topRight,r.topRight,0,-N,!0),i.lineTo(e+r.topLeft,s)}const uo=/^(normal|(\\d+(?:\\.\\d+)?)(px|em|%)?)$/,fo=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function go(i,t){const e=(""+i).match(uo);if(!e||e[1]==="normal")return t*1.2;switch(i=+e[2],e[3]){case"px":return i;case"%":i/=100;break}return t*i}const po=i=>+i||0;function ui(i,t){const e={},s=A(t),n=s?Object.keys(t):t,o=A(i)?s?r=>P(i[r],i[t[r]]):r=>i[r]:()=>i;for(const r of n)e[r]=po(o(r));return e}function Ys(i){return ui(i,{top:"y",right:"x",bottom:"y",left:"x"})}function Tt(i){return ui(i,["topLeft","topRight","bottomLeft","bottomRight"])}function $(i){const t=Ys(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function X(i,t){i=i||{},t=t||W.font;let e=P(i.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let s=P(i.style,t.style);s&&!(""+s).match(fo)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const n={family:P(i.family,t.family),lineHeight:go(P(i.lineHeight,t.lineHeight),e),size:e,style:s,weight:P(i.weight,t.weight),string:""};return n.string=oo(n),n}function oe(i,t,e,s){let n,o,r;for(n=0,o=i.length;n<o;++n)if(r=i[n],r!==void 0&&r!==void 0)return r}function mo(i,t,e){const{min:s,max:n}=i,o=Is(t,(n-s)/2),r=(a,l)=>e&&a===0?0:a+l;return{min:r(s,-Math.abs(o)),max:r(n,o)}}function Pt(i,t){return Object.assign(Object.create(i),t)}function fi(i,t=[""],e,s,n=()=>i[0]){const o=e||i;typeof s>"u"&&(s=qs("_fallback",i));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:o,_fallback:s,_getTarget:n,override:a=>fi([a,...i],t,o,s)};return new Proxy(r,{deleteProperty(a,l){return delete a[l],delete a._keys,delete i[0][l],!0},get(a,l){return Xs(a,l,()=>So(l,t,i,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(a,l){return Li(a).includes(l)},ownKeys(a){return Li(a)},set(a,l,c){const h=a._storage||(a._storage=n());return a[l]=h[l]=c,delete a._keys,!0}})}function Lt(i,t,e,s){const n={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:Us(i,s),setContext:o=>Lt(i,o,e,s),override:o=>Lt(i.override(o),t,e,s)};return new Proxy(n,{deleteProperty(o,r){return delete o[r],delete i[r],!0},get(o,r,a){return Xs(o,r,()=>_o(o,r,a))},getOwnPropertyDescriptor(o,r){return o._descriptors.allKeys?Reflect.has(i,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,r)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(o,r){return Reflect.has(i,r)},ownKeys(){return Reflect.ownKeys(i)},set(o,r,a){return i[r]=a,delete o[r],!0}})}function Us(i,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:s=t.indexable,_allKeys:n=t.allKeys}=i;return{allKeys:n,scriptable:e,indexable:s,isScriptable:gt(e)?e:()=>e,isIndexable:gt(s)?s:()=>s}}const bo=(i,t)=>i?i+oi(t):t,gi=(i,t)=>A(t)&&i!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Xs(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t)||t==="constructor")return i[t];const s=e();return i[t]=s,s}function _o(i,t,e){const{_proxy:s,_context:n,_subProxy:o,_descriptors:r}=i;let a=s[t];return gt(a)&&r.isScriptable(t)&&(a=xo(t,a,i,e)),H(a)&&a.length&&(a=yo(t,a,i,r.isIndexable)),gi(t,a)&&(a=Lt(a,n,o&&o[t],r)),a}function xo(i,t,e,s){const{_proxy:n,_context:o,_subProxy:r,_stack:a}=e;if(a.has(i))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+i);a.add(i);let l=t(o,r||s);return a.delete(i),gi(i,l)&&(l=pi(n._scopes,n,i,l)),l}function yo(i,t,e,s){const{_proxy:n,_context:o,_subProxy:r,_descriptors:a}=e;if(typeof o.index<"u"&&s(i))return t[o.index%t.length];if(A(t[0])){const l=t,c=n._scopes.filter(h=>h!==l);t=[];for(const h of l){const d=pi(c,n,i,h);t.push(Lt(d,o,r&&r[i],a))}}return t}function Ks(i,t,e){return gt(i)?i(t,e):i}const vo=(i,t)=>i===!0?t:typeof i=="string"?St(t,i):void 0;function Mo(i,t,e,s,n){for(const o of t){const r=vo(e,o);if(r){i.add(r);const a=Ks(r._fallback,e,n);if(typeof a<"u"&&a!==e&&a!==s)return a}else if(r===!1&&typeof s<"u"&&e!==s)return null}return!1}function pi(i,t,e,s){const n=t._rootScopes,o=Ks(t._fallback,e,s),r=[...i,...n],a=new Set;a.add(s);let l=Ri(a,r,e,o||e,s);return l===null||typeof o<"u"&&o!==e&&(l=Ri(a,r,o,l,s),l===null)?!1:fi(Array.from(a),[""],n,o,()=>ko(t,e,s))}function Ri(i,t,e,s,n){for(;e;)e=Mo(i,t,e,s,n);return e}function ko(i,t,e){const s=i._getTarget();t in s||(s[t]={});const n=s[t];return H(n)&&A(e)?e:n||{}}function So(i,t,e,s){let n;for(const o of t)if(n=qs(bo(o,i),e),typeof n<"u")return gi(i,n)?pi(e,s,i,n):n}function qs(i,t){for(const e of t){if(!e)continue;const s=e[i];if(typeof s<"u")return s}}function Li(i){let t=i._keys;return t||(t=i._keys=wo(i._scopes)),t}function wo(i){const t=new Set;for(const e of i)for(const s of Object.keys(e).filter(n=>!n.startsWith("_")))t.add(s);return Array.from(t)}const Co=Number.EPSILON||1e-14,It=(i,t)=>t<i.length&&!i[t].skip&&i[t],Gs=i=>i==="x"?"y":"x";function Po(i,t,e,s){const n=i.skip?t:i,o=t,r=e.skip?t:e,a=Ye(o,n),l=Ye(r,o);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const d=s*c,u=s*h;return{previous:{x:o.x-d*(r.x-n.x),y:o.y-d*(r.y-n.y)},next:{x:o.x+u*(r.x-n.x),y:o.y+u*(r.y-n.y)}}}function Do(i,t,e){const s=i.length;let n,o,r,a,l,c=It(i,0);for(let h=0;h<s-1;++h)if(l=c,c=It(i,h+1),!(!l||!c)){if(Xt(t[h],0,Co)){e[h]=e[h+1]=0;continue}n=e[h]/t[h],o=e[h+1]/t[h],a=Math.pow(n,2)+Math.pow(o,2),!(a<=9)&&(r=3/Math.sqrt(a),e[h]=n*r*t[h],e[h+1]=o*r*t[h])}}function Oo(i,t,e="x"){const s=Gs(e),n=i.length;let o,r,a,l=It(i,0);for(let c=0;c<n;++c){if(r=a,a=l,l=It(i,c+1),!a)continue;const h=a[e],d=a[s];r&&(o=(h-r[e])/3,a[\`cp1\${e}\`]=h-o,a[\`cp1\${s}\`]=d-o*t[c]),l&&(o=(l[e]-h)/3,a[\`cp2\${e}\`]=h+o,a[\`cp2\${s}\`]=d+o*t[c])}}function Ao(i,t="x"){const e=Gs(t),s=i.length,n=Array(s).fill(0),o=Array(s);let r,a,l,c=It(i,0);for(r=0;r<s;++r)if(a=l,l=c,c=It(i,r+1),!!l){if(c){const h=c[t]-l[t];n[r]=h!==0?(c[e]-l[e])/h:0}o[r]=a?c?ot(n[r-1])!==ot(n[r])?0:(n[r-1]+n[r])/2:n[r-1]:n[r]}Do(i,n,o),Oo(i,o,t)}function re(i,t,e){return Math.max(Math.min(i,e),t)}function To(i,t){let e,s,n,o,r,a=$t(i[0],t);for(e=0,s=i.length;e<s;++e)r=o,o=a,a=e<s-1&&$t(i[e+1],t),o&&(n=i[e],r&&(n.cp1x=re(n.cp1x,t.left,t.right),n.cp1y=re(n.cp1y,t.top,t.bottom)),a&&(n.cp2x=re(n.cp2x,t.left,t.right),n.cp2y=re(n.cp2y,t.top,t.bottom)))}function Ro(i,t,e,s,n){let o,r,a,l;if(t.spanGaps&&(i=i.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")Ao(i,n);else{let c=s?i[i.length-1]:i[0];for(o=0,r=i.length;o<r;++o)a=i[o],l=Po(c,a,i[Math.min(o+1,r-(s?0:1))%r],t.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,c=a}t.capBezierPoints&&To(i,e)}function mi(){return typeof window<"u"&&typeof document<"u"}function bi(i){let t=i.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function ve(i,t,e){let s;return typeof i=="string"?(s=parseInt(i,10),i.indexOf("%")!==-1&&(s=s/100*t.parentNode[e])):s=i,s}const Pe=i=>i.ownerDocument.defaultView.getComputedStyle(i,null);function Lo(i,t){return Pe(i).getPropertyValue(t)}const Io=["top","right","bottom","left"];function kt(i,t,e){const s={};e=e?"-"+e:"";for(let n=0;n<4;n++){const o=Io[n];s[o]=parseFloat(i[t+"-"+o+e])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const Eo=(i,t,e)=>(i>0||t>0)&&(!e||!e.shadowRoot);function zo(i,t){const e=i.touches,s=e&&e.length?e[0]:i,{offsetX:n,offsetY:o}=s;let r=!1,a,l;if(Eo(n,o,i.target))a=n,l=o;else{const c=t.getBoundingClientRect();a=s.clientX-c.left,l=s.clientY-c.top,r=!0}return{x:a,y:l,box:r}}function yt(i,t){if("native"in i)return i;const{canvas:e,currentDevicePixelRatio:s}=t,n=Pe(e),o=n.boxSizing==="border-box",r=kt(n,"padding"),a=kt(n,"border","width"),{x:l,y:c,box:h}=zo(i,e),d=r.left+(h&&a.left),u=r.top+(h&&a.top);let{width:f,height:p}=t;return o&&(f-=r.width+a.width,p-=r.height+a.height),{x:Math.round((l-d)/f*e.width/s),y:Math.round((c-u)/p*e.height/s)}}function Fo(i,t,e){let s,n;if(t===void 0||e===void 0){const o=i&&bi(i);if(!o)t=i.clientWidth,e=i.clientHeight;else{const r=o.getBoundingClientRect(),a=Pe(o),l=kt(a,"border","width"),c=kt(a,"padding");t=r.width-c.width-l.width,e=r.height-c.height-l.height,s=ve(a.maxWidth,o,"clientWidth"),n=ve(a.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:s||xe,maxHeight:n||xe}}const ae=i=>Math.round(i*10)/10;function Bo(i,t,e,s){const n=Pe(i),o=kt(n,"margin"),r=ve(n.maxWidth,i,"clientWidth")||xe,a=ve(n.maxHeight,i,"clientHeight")||xe,l=Fo(i,t,e);let{width:c,height:h}=l;if(n.boxSizing==="content-box"){const u=kt(n,"border","width"),f=kt(n,"padding");c-=f.width+u.width,h-=f.height+u.height}return c=Math.max(0,c-o.width),h=Math.max(0,s?c/s:h-o.height),c=ae(Math.min(c,r,l.maxWidth)),h=ae(Math.min(h,a,l.maxHeight)),c&&!h&&(h=ae(c/2)),(t!==void 0||e!==void 0)&&s&&l.height&&h>l.height&&(h=l.height,c=ae(Math.floor(h*s))),{width:c,height:h}}function Ii(i,t,e){const s=t||1,n=Math.floor(i.height*s),o=Math.floor(i.width*s);i.height=Math.floor(i.height),i.width=Math.floor(i.width);const r=i.canvas;return r.style&&(e||!r.style.height&&!r.style.width)&&(r.style.height=\`\${i.height}px\`,r.style.width=\`\${i.width}px\`),i.currentDevicePixelRatio!==s||r.height!==n||r.width!==o?(i.currentDevicePixelRatio=s,r.height=n,r.width=o,i.ctx.setTransform(s,0,0,s,0,0),!0):!1}const Wo=(function(){let i=!1;try{const t={get passive(){return i=!0,!1}};mi()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return i})();function Ei(i,t){const e=Lo(i,t),s=e&&e.match(/^(\\d+)(\\.\\d+)?px$/);return s?+s[1]:void 0}function vt(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:i.y+e*(t.y-i.y)}}function Ho(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:s==="middle"?e<.5?i.y:t.y:s==="after"?e<1?i.y:t.y:e>0?t.y:i.y}}function No(i,t,e,s){const n={x:i.cp2x,y:i.cp2y},o={x:t.cp1x,y:t.cp1y},r=vt(i,n,e),a=vt(n,o,e),l=vt(o,t,e),c=vt(r,a,e),h=vt(a,l,e);return vt(c,h,e)}const Vo=function(i,t){return{x(e){return i+i+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,s){return e-s},leftForLtr(e,s){return e-s}}},jo=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,t){return i+t},leftForLtr(i,t){return i}}};function Rt(i,t,e){return i?Vo(t,e):jo()}function Js(i,t){let e,s;(t==="ltr"||t==="rtl")&&(e=i.canvas.style,s=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=s)}function Qs(i,t){t!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}function Zs(i){return i==="angle"?{between:Zt,compare:Nn,normalize:et}:{between:dt,compare:(t,e)=>t-e,normalize:t=>t}}function zi({start:i,end:t,count:e,loop:s,style:n}){return{start:i%e,end:t%e,loop:s&&(t-i+1)%e===0,style:n}}function Yo(i,t,e){const{property:s,start:n,end:o}=e,{between:r,normalize:a}=Zs(s),l=t.length;let{start:c,end:h,loop:d}=i,u,f;if(d){for(c+=l,h+=l,u=0,f=l;u<f&&r(a(t[c%l][s]),n,o);++u)c--,h--;c%=l,h%=l}return h<c&&(h+=l),{start:c,end:h,loop:d,style:i.style}}function Uo(i,t,e){if(!e)return[i];const{property:s,start:n,end:o}=e,r=t.length,{compare:a,between:l,normalize:c}=Zs(s),{start:h,end:d,loop:u,style:f}=Yo(i,t,e),p=[];let g=!1,m=null,b,_,y;const v=()=>l(n,y,b)&&a(n,y)!==0,x=()=>a(o,b)===0||l(o,y,b),k=()=>g||v(),S=()=>!g||x();for(let M=h,w=h;M<=d;++M)_=t[M%r],!_.skip&&(b=c(_[s]),b!==y&&(g=l(b,n,o),m===null&&k()&&(m=a(b,n)===0?M:w),m!==null&&S()&&(p.push(zi({start:m,end:M,loop:u,count:r,style:f})),m=null),w=M,y=b));return m!==null&&p.push(zi({start:m,end:d,loop:u,count:r,style:f})),p}function Xo(i,t){const e=[],s=i.segments;for(let n=0;n<s.length;n++){const o=Uo(s[n],i.points,t);o.length&&e.push(...o)}return e}function Ko(i,t,e,s){let n=0,o=t-1;if(e&&!s)for(;n<t&&!i[n].skip;)n++;for(;n<t&&i[n].skip;)n++;for(n%=t,e&&(o+=n);o>n&&i[o%t].skip;)o--;return o%=t,{start:n,end:o}}function qo(i,t,e,s){const n=i.length,o=[];let r=t,a=i[t],l;for(l=t+1;l<=e;++l){const c=i[l%n];c.skip||c.stop?a.skip||(s=!1,o.push({start:t%n,end:(l-1)%n,loop:s}),t=r=c.stop?l:null):(r=l,a.skip&&(t=l)),a=c}return r!==null&&o.push({start:t%n,end:r%n,loop:s}),o}function Go(i,t){const e=i.points,s=i.options.spanGaps,n=e.length;if(!n)return[];const o=!!i._loop,{start:r,end:a}=Ko(e,n,o,s);if(s===!0)return Fi(i,[{start:r,end:a,loop:o}],e,t);const l=a<r?a+n:a,c=!!i._fullLoop&&r===0&&a===n-1;return Fi(i,qo(e,r,l,c),e,t)}function Fi(i,t,e,s){return!s||!s.setContext||!e?t:Jo(i,t,e,s)}function Jo(i,t,e,s){const n=i._chart.getContext(),o=Bi(i.options),{_datasetIndex:r,options:{spanGaps:a}}=i,l=e.length,c=[];let h=o,d=t[0].start,u=d;function f(p,g,m,b){const _=a?-1:1;if(p!==g){for(p+=l;e[p%l].skip;)p-=_;for(;e[g%l].skip;)g+=_;p%l!==g%l&&(c.push({start:p%l,end:g%l,loop:m,style:b}),h=b,d=g%l)}}for(const p of t){d=a?d:p.start;let g=e[d%l],m;for(u=d+1;u<=p.end;u++){const b=e[u%l];m=Bi(s.setContext(Pt(n,{type:"segment",p0:g,p1:b,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:r}))),Qo(m,h)&&f(d,u-1,p.loop,h),g=b,h=m}d<u-1&&f(d,u-1,p.loop,h)}return c}function Bi(i){return{backgroundColor:i.backgroundColor,borderCapStyle:i.borderCapStyle,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderJoinStyle:i.borderJoinStyle,borderWidth:i.borderWidth,borderColor:i.borderColor}}function Qo(i,t){if(!t)return!1;const e=[],s=function(n,o){return li(o)?(e.includes(o)||e.push(o),e.indexOf(o)):o};return JSON.stringify(i,s)!==JSON.stringify(t,s)}function le(i,t,e){return i.options.clip?i[e]:t[e]}function Zo(i,t){const{xScale:e,yScale:s}=i;return e&&s?{left:le(e,t,"left"),right:le(e,t,"right"),top:le(s,t,"top"),bottom:le(s,t,"bottom")}:t}function $o(i,t){const e=t._clip;if(e.disabled)return!1;const s=Zo(t,i.chartArea);return{left:e.left===!1?0:s.left-(e.left===!0?0:e.left),right:e.right===!1?i.width:s.right+(e.right===!0?0:e.right),top:e.top===!1?0:s.top-(e.top===!0?0:e.top),bottom:e.bottom===!1?i.height:s.bottom+(e.bottom===!0?0:e.bottom)}}/*!
21207
21267
  * Chart.js v4.5.0
21208
21268
  * https://www.chartjs.org
21209
21269
  * (c) 2025 Chart.js Contributors
21210
21270
  * Released under the MIT License
21211
- */class Q1{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,s,i){const l=n.listeners[i],o=n.duration;l.forEach(r=>r({chart:e,initial:n.initial,numSteps:o,currentStep:Math.min(s-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=Ud.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((s,i)=>{if(!s.running||!s.items.length)return;const l=s.items;let o=l.length-1,r=!1,u;for(;o>=0;--o)u=l[o],u._active?(u._total>s.duration&&(s.duration=u._total),u.tick(e),r=!0):(l[o]=l[l.length-1],l.pop());r&&(i.draw(),this._notify(i,s,e,"progress")),l.length||(s.running=!1,this._notify(i,s,e,"complete"),s.initial=!1),n+=l.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let s=n.get(e);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,s)),s}listen(e,n,s){this._getAnims(e).listeners[n].push(s)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((s,i)=>Math.max(s,i._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const s=n.items;let i=s.length-1;for(;i>=0;--i)s[i].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Us=new Q1;const cu="transparent",$1={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const s=$a(t||cu),i=s.valid&&$a(e||cu);return i&&i.valid?i.mix(s,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class eb{constructor(e,n,s,i){const l=n[s];i=Gl([e.to,i,l,e.from]);const o=Gl([e.from,l,i]);this._active=!0,this._fn=e.fn||$1[e.type||typeof o],this._easing=bl[e.easing]||bl.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=s,this._from=o,this._to=i,this._promises=void 0}active(){return this._active}update(e,n,s){if(this._active){this._notify(!1);const i=this._target[this._prop],l=s-this._start,o=this._duration-l;this._start=s,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=l,this._loop=!!e.loop,this._to=Gl([e.to,n,i,e.from]),this._from=Gl([e.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,s=this._duration,i=this._prop,l=this._from,o=this._loop,r=this._to;let u;if(this._active=l!==r&&(o||n<s),!this._active){this._target[i]=r,this._notify(!0);return}if(n<0){this._target[i]=l;return}u=n/s%2,u=o&&u>1?2-u:u,u=this._easing(Math.min(1,Math.max(0,u))),this._target[i]=this._fn(l,r,u)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,s)=>{e.push({res:n,rej:s})})}_notify(e){const n=e?"res":"rej",s=this._promises||[];for(let i=0;i<s.length;i++)s[i][n]()}}class tp{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!Tt(e))return;const n=Object.keys(Sn.animation),s=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const l=e[i];if(!Tt(l))return;const o={};for(const r of n)o[r]=l[r];(On(l.properties)&&l.properties||[i]).forEach(r=>{(r===i||!s.has(r))&&s.set(r,o)})})}_animateOptions(e,n){const s=n.options,i=nb(e,s);if(!i)return[];const l=this._createAnimations(i,s);return s.$shared&&tb(e.options.$animations,s).then(()=>{e.options=s},()=>{}),l}_createAnimations(e,n){const s=this._properties,i=[],l=e.$animations||(e.$animations={}),o=Object.keys(n),r=Date.now();let u;for(u=o.length-1;u>=0;--u){const f=o[u];if(f.charAt(0)==="$")continue;if(f==="options"){i.push(...this._animateOptions(e,n));continue}const h=n[f];let p=l[f];const g=s.get(f);if(p)if(g&&p.active()){p.update(g,h,r);continue}else p.cancel();if(!g||!g.duration){e[f]=h;continue}l[f]=p=new eb(g,e,f,h),i.push(p)}return i}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const s=this._createAnimations(e,n);if(s.length)return Us.add(this._chart,s),!0}}function tb(t,e){const n=[],s=Object.keys(e);for(let i=0;i<s.length;i++){const l=t[s[i]];l&&l.active()&&n.push(l.wait())}return Promise.all(n)}function nb(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function fu(t,e){const n=t&&t.options||{},s=n.reverse,i=n.min===void 0?e:0,l=n.max===void 0?e:0;return{start:s?l:i,end:s?i:l}}function sb(t,e,n){if(n===!1)return!1;const s=fu(t,n),i=fu(e,n);return{top:i.end,right:s.end,bottom:i.start,left:s.start}}function ib(t){let e,n,s,i;return Tt(t)?(e=t.top,n=t.right,s=t.bottom,i=t.left):e=n=s=i=t,{top:e,right:n,bottom:s,left:i,disabled:t===!1}}function np(t,e){const n=[],s=t._getSortedDatasetMetas(e);let i,l;for(i=0,l=s.length;i<l;++i)n.push(s[i].index);return n}function hu(t,e,n,s={}){const i=t.keys,l=s.mode==="single";let o,r,u,f;if(e===null)return;let h=!1;for(o=0,r=i.length;o<r;++o){if(u=+i[o],u===n){if(h=!0,s.all)continue;break}f=t.values[u],Es(f)&&(l||e===0||Bs(e)===Bs(f))&&(e+=f)}return!h&&!s.all?0:e}function lb(t,e){const{iScale:n,vScale:s}=e,i=n.axis==="x"?"x":"y",l=s.axis==="x"?"x":"y",o=Object.keys(t),r=new Array(o.length);let u,f,h;for(u=0,f=o.length;u<f;++u)h=o[u],r[u]={[i]:h,[l]:t[h]};return r}function Zo(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function ob(t,e,n){return\`\${t.id}.\${e.id}.\${n.stack||n.type}\`}function rb(t){const{min:e,max:n,minDefined:s,maxDefined:i}=t.getUserBounds();return{min:s?e:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function ab(t,e,n){const s=t[e]||(t[e]={});return s[n]||(s[n]={})}function du(t,e,n,s){for(const i of e.getMatchingVisibleMetas(s).reverse()){const l=t[i.index];if(n&&l>0||!n&&l<0)return i.index}return null}function pu(t,e){const{chart:n,_cachedMeta:s}=t,i=n._stacks||(n._stacks={}),{iScale:l,vScale:o,index:r}=s,u=l.axis,f=o.axis,h=ob(l,o,s),p=e.length;let g;for(let m=0;m<p;++m){const _=e[m],{[u]:b,[f]:k}=_,v=_._stacks||(_._stacks={});g=v[f]=ab(i,h,b),g[r]=k,g._top=du(g,o,!0,s.type),g._bottom=du(g,o,!1,s.type);const y=g._visualValues||(g._visualValues={});y[r]=k}}function Qo(t,e){const n=t.scales;return Object.keys(n).filter(s=>n[s].axis===e).shift()}function ub(t,e){return Oi(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function cb(t,e,n){return Oi(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function el(t,e){const n=t.controller.index,s=t.vScale&&t.vScale.axis;if(s){e=e||t._parsed;for(const i of e){const l=i._stacks;if(!l||l[s]===void 0||l[s][n]===void 0)return;delete l[s][n],l[s]._visualValues!==void 0&&l[s]._visualValues[n]!==void 0&&delete l[s]._visualValues[n]}}}const $o=t=>t==="reset"||t==="none",gu=(t,e)=>e?t:Object.assign({},t),fb=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:np(n,!0),values:null};class Oo{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Zo(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&el(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,s=this.getDataset(),i=(p,g,m,_)=>p==="x"?g:p==="r"?_:m,l=n.xAxisID=dt(s.xAxisID,Qo(e,"x")),o=n.yAxisID=dt(s.yAxisID,Qo(e,"y")),r=n.rAxisID=dt(s.rAxisID,Qo(e,"r")),u=n.indexAxis,f=n.iAxisID=i(u,l,o,r),h=n.vAxisID=i(u,o,l,r);n.xScale=this.getScaleForId(l),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(r),n.iScale=this.getScaleForId(f),n.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&Ka(this._data,this),e._stacked&&el(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),s=this._data;if(Tt(n)){const i=this._cachedMeta;this._data=lb(n,i)}else if(s!==n){if(s){Ka(s,this);const i=this._cachedMeta;el(i),i._parsed=[]}n&&Object.isExtensible(n)&&Wm(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,s=this.getDataset();let i=!1;this._dataCheck();const l=n._stacked;n._stacked=Zo(n.vScale,n),n.stack!==s.stack&&(i=!0,el(n),n.stack=s.stack),this._resyncElements(e),(i||l!==n._stacked)&&(pu(this,n._parsed),n._stacked=Zo(n.vScale,n))}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),s=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:s,_data:i}=this,{iScale:l,_stacked:o}=s,r=l.axis;let u=e===0&&n===i.length?!0:s._sorted,f=e>0&&s._parsed[e-1],h,p,g;if(this._parsing===!1)s._parsed=i,s._sorted=!0,g=i;else{On(i[e])?g=this.parseArrayData(s,i,e,n):Tt(i[e])?g=this.parseObjectData(s,i,e,n):g=this.parsePrimitiveData(s,i,e,n);const m=()=>p[r]===null||f&&p[r]<f[r];for(h=0;h<n;++h)s._parsed[h+e]=p=g[h],u&&(m()&&(u=!1),f=p);s._sorted=u}o&&pu(this,g)}parsePrimitiveData(e,n,s,i){const{iScale:l,vScale:o}=e,r=l.axis,u=o.axis,f=l.getLabels(),h=l===o,p=new Array(i);let g,m,_;for(g=0,m=i;g<m;++g)_=g+s,p[g]={[r]:h||l.parse(f[_],_),[u]:o.parse(n[_],_)};return p}parseArrayData(e,n,s,i){const{xScale:l,yScale:o}=e,r=new Array(i);let u,f,h,p;for(u=0,f=i;u<f;++u)h=u+s,p=n[h],r[u]={x:l.parse(p[0],h),y:o.parse(p[1],h)};return r}parseObjectData(e,n,s,i){const{xScale:l,yScale:o}=e,{xAxisKey:r="x",yAxisKey:u="y"}=this._parsing,f=new Array(i);let h,p,g,m;for(h=0,p=i;h<p;++h)g=h+s,m=n[g],f[h]={x:l.parse(Mi(m,r),g),y:o.parse(Mi(m,u),g)};return f}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,s){const i=this.chart,l=this._cachedMeta,o=n[e.axis],r={keys:np(i,!0),values:n._stacks[e.axis]._visualValues};return hu(r,o,l.index,{mode:s})}updateRangeFromParsed(e,n,s,i){const l=s[n.axis];let o=l===null?NaN:l;const r=i&&s._stacks[n.axis];i&&r&&(i.values=r,o=hu(i,l,this._cachedMeta.index)),e.min=Math.min(e.min,o),e.max=Math.max(e.max,o)}getMinMax(e,n){const s=this._cachedMeta,i=s._parsed,l=s._sorted&&e===s.iScale,o=i.length,r=this._getOtherScale(e),u=fb(n,s,this.chart),f={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:p}=rb(r);let g,m;function _(){m=i[g];const b=m[r.axis];return!Es(m[e.axis])||h>b||p<b}for(g=0;g<o&&!(!_()&&(this.updateRangeFromParsed(f,e,m,u),l));++g);if(l){for(g=o-1;g>=0;--g)if(!_()){this.updateRangeFromParsed(f,e,m,u);break}}return f}getAllParsedValues(e){const n=this._cachedMeta._parsed,s=[];let i,l,o;for(i=0,l=n.length;i<l;++i)o=n[i][e.axis],Es(o)&&s.push(o);return s}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,s=n.iScale,i=n.vScale,l=this.getParsed(e);return{label:s?""+s.getLabelForValue(l[s.axis]):"",value:i?""+i.getLabelForValue(l[i.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=ib(dt(this.options.clip,sb(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,s=this._cachedMeta,i=s.data||[],l=n.chartArea,o=[],r=this._drawStart||0,u=this._drawCount||i.length-r,f=this.options.drawActiveElementsOnTop;let h;for(s.dataset&&s.dataset.draw(e,l,r,u),h=r;h<r+u;++h){const p=i[h];p.hidden||(p.active&&f?o.push(p):p.draw(e,l))}for(h=0;h<o.length;++h)o[h].draw(e,l)}getStyle(e,n){const s=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(s):this.resolveDataElementOptions(e||0,s)}getContext(e,n,s){const i=this.getDataset();let l;if(e>=0&&e<this._cachedMeta.data.length){const o=this._cachedMeta.data[e];l=o.$context||(o.$context=cb(this.getContext(),e,o)),l.parsed=this.getParsed(e),l.raw=i.data[e],l.index=l.dataIndex=e}else l=this.$context||(this.$context=ub(this.chart.getContext(),this.index)),l.dataset=i,l.index=l.datasetIndex=this.index;return l.active=!!n,l.mode=s,l}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",s){const i=n==="active",l=this._cachedDataOpts,o=e+"-"+n,r=l[o],u=this.enableOptionSharing&&Sl(s);if(r)return gu(r,u);const f=this.chart.config,h=f.datasetElementScopeKeys(this._type,e),p=i?[\`\${e}Hover\`,"hover",e,""]:[e,""],g=f.getOptionScopes(this.getDataset(),h),m=Object.keys(Sn.elements[e]),_=()=>this.getContext(s,i,n),b=f.resolveNamedOptions(g,m,_,p);return b.$shared&&(b.$shared=u,l[o]=Object.freeze(gu(b,u))),b}_resolveAnimations(e,n,s){const i=this.chart,l=this._cachedDataOpts,o=\`animation-\${n}\`,r=l[o];if(r)return r;let u;if(i.options.animation!==!1){const h=this.chart.config,p=h.datasetAnimationScopeKeys(this._type,n),g=h.getOptionScopes(this.getDataset(),p);u=h.createResolver(g,this.getContext(e,s,n))}const f=new tp(i,u&&u.animations);return u&&u._cacheable&&(l[o]=Object.freeze(f)),f}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||$o(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const s=this.resolveDataElementOptions(e,n),i=this._sharedOptions,l=this.getSharedOptions(s),o=this.includeOptions(n,l)||l!==i;return this.updateSharedOptions(l,n,s),{sharedOptions:l,includeOptions:o}}updateElement(e,n,s,i){$o(i)?Object.assign(e,s):this._resolveAnimations(n,i).update(e,s)}updateSharedOptions(e,n,s){e&&!$o(n)&&this._resolveAnimations(void 0,n).update(e,s)}_setStyle(e,n,s,i){e.active=i;const l=this.getStyle(n,i);this._resolveAnimations(n,s,i).update(e,{options:!i&&this.getSharedOptions(l)||l})}removeHoverStyle(e,n,s){this._setStyle(e,s,"active",!1)}setHoverStyle(e,n,s){this._setStyle(e,s,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,s=this._cachedMeta.data;for(const[r,u,f]of this._syncList)this[r](u,f);this._syncList=[];const i=s.length,l=n.length,o=Math.min(l,i);o&&this.parse(0,o),l>i?this._insertElements(i,l-i,e):l<i&&this._removeElements(l,i-l)}_insertElements(e,n,s=!0){const i=this._cachedMeta,l=i.data,o=e+n;let r;const u=f=>{for(f.length+=n,r=f.length-1;r>=o;r--)f[r]=f[r-n]};for(u(l),r=e;r<o;++r)l[r]=new this.dataElementType;this._parsing&&u(i._parsed),this.parse(e,n),s&&this.updateElements(l,e,n,"reset")}updateElements(e,n,s,i){}_removeElements(e,n){const s=this._cachedMeta;if(this._parsing){const i=s._parsed.splice(e,n);s._stacked&&el(s,i)}s.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,s,i]=e;this[n](s,i)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);const s=arguments.length-2;s&&this._sync(["_insertElements",e,s])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function hb(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let s=[];for(let i=0,l=n.length;i<l;i++)s=s.concat(n[i].controller.getAllParsedValues(t));t._cache.$bar=zd(s.sort((i,l)=>i-l))}return t._cache.$bar}function db(t){const e=t.iScale,n=hb(e,t.type);let s=e._length,i,l,o,r;const u=()=>{o===32767||o===-32768||(Sl(r)&&(s=Math.min(s,Math.abs(o-r)||s)),r=o)};for(i=0,l=n.length;i<l;++i)o=e.getPixelForValue(n[i]),u();for(r=void 0,i=0,l=e.ticks.length;i<l;++i)o=e.getPixelForTick(i),u();return s}function pb(t,e,n,s){const i=n.barThickness;let l,o;return Dt(i)?(l=e.min*n.categoryPercentage,o=n.barPercentage):(l=i*s,o=1),{chunk:l/s,ratio:o,start:e.pixels[t]-l/2}}function gb(t,e,n,s){const i=e.pixels,l=i[t];let o=t>0?i[t-1]:null,r=t<i.length-1?i[t+1]:null;const u=n.categoryPercentage;o===null&&(o=l-(r===null?e.end-e.start:r-l)),r===null&&(r=l+l-o);const f=l-(l-Math.min(o,r))/2*u;return{chunk:Math.abs(r-o)/2*u/s,ratio:n.barPercentage,start:f}}function mb(t,e,n,s){const i=n.parse(t[0],s),l=n.parse(t[1],s),o=Math.min(i,l),r=Math.max(i,l);let u=o,f=r;Math.abs(o)>Math.abs(r)&&(u=r,f=o),e[n.axis]=f,e._custom={barStart:u,barEnd:f,start:i,end:l,min:o,max:r}}function sp(t,e,n,s){return On(t)?mb(t,e,n,s):e[n.axis]=n.parse(t,s),e}function mu(t,e,n,s){const i=t.iScale,l=t.vScale,o=i.getLabels(),r=i===l,u=[];let f,h,p,g;for(f=n,h=n+s;f<h;++f)g=e[f],p={},p[i.axis]=r||i.parse(o[f],f),u.push(sp(g,p,l,f));return u}function er(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function bb(t,e,n){return t!==0?Bs(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function _b(t){let e,n,s,i,l;return t.horizontal?(e=t.base>t.x,n="left",s="right"):(e=t.base<t.y,n="bottom",s="top"),e?(i="end",l="start"):(i="start",l="end"),{start:n,end:s,reverse:e,top:i,bottom:l}}function vb(t,e,n,s){let i=e.borderSkipped;const l={};if(!i){t.borderSkipped=l;return}if(i===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:o,end:r,reverse:u,top:f,bottom:h}=_b(t);i==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===s?i=f:(n._bottom||0)===s?i=h:(l[bu(h,o,r,u)]=!0,i=f)),l[bu(i,o,r,u)]=!0,t.borderSkipped=l}function bu(t,e,n,s){return s?(t=yb(t,e,n),t=_u(t,n,e)):t=_u(t,e,n),t}function yb(t,e,n){return t===e?n:t===n?e:t}function _u(t,e,n){return t==="start"?e:t==="end"?n:t}function wb(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class kb extends Oo{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(e,n,s,i){return mu(e,n,s,i)}parseArrayData(e,n,s,i){return mu(e,n,s,i)}parseObjectData(e,n,s,i){const{iScale:l,vScale:o}=e,{xAxisKey:r="x",yAxisKey:u="y"}=this._parsing,f=l.axis==="x"?r:u,h=o.axis==="x"?r:u,p=[];let g,m,_,b;for(g=s,m=s+i;g<m;++g)b=n[g],_={},_[l.axis]=l.parse(Mi(b,f),g),p.push(sp(Mi(b,h),_,o,g));return p}updateRangeFromParsed(e,n,s,i){super.updateRangeFromParsed(e,n,s,i);const l=s._custom;l&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,l.min),e.max=Math.max(e.max,l.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const n=this._cachedMeta,{iScale:s,vScale:i}=n,l=this.getParsed(e),o=l._custom,r=er(o)?"["+o.start+", "+o.end+"]":""+i.getLabelForValue(l[i.axis]);return{label:""+s.getLabelForValue(l[s.axis]),value:r}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,e)}updateElements(e,n,s,i){const l=i==="reset",{index:o,_cachedMeta:{vScale:r}}=this,u=r.getBasePixel(),f=r.isHorizontal(),h=this._getRuler(),{sharedOptions:p,includeOptions:g}=this._getSharedOptions(n,i);for(let m=n;m<n+s;m++){const _=this.getParsed(m),b=l||Dt(_[r.axis])?{base:u,head:u}:this._calculateBarValuePixels(m),k=this._calculateBarIndexPixels(m,h),v=(_._stacks||{})[r.axis],y={horizontal:f,base:b.base,enableBorderRadius:!v||er(_._custom)||o===v._top||o===v._bottom,x:f?b.head:k.center,y:f?k.center:b.head,height:f?k.size:Math.abs(b.size),width:f?Math.abs(b.size):k.size};g&&(y.options=p||this.resolveDataElementOptions(m,e[m].active?"active":i));const S=y.options||e[m].options;vb(y,S,v,o),wb(y,S,h.ratio),this.updateElement(e[m],m,y,i)}}_getStacks(e,n){const{iScale:s}=this._cachedMeta,i=s.getMatchingVisibleMetas(this._type).filter(h=>h.controller.options.grouped),l=s.options.stacked,o=[],r=this._cachedMeta.controller.getParsed(n),u=r&&r[s.axis],f=h=>{const p=h._parsed.find(m=>m[s.axis]===u),g=p&&p[h.vScale.axis];if(Dt(g)||isNaN(g))return!0};for(const h of i)if(!(n!==void 0&&f(h))&&((l===!1||o.indexOf(h.stack)===-1||l===void 0&&h.stack===void 0)&&o.push(h.stack),h.index===e))break;return o.length||o.push(void 0),o}_getStackCount(e){return this._getStacks(void 0,e).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const e=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(e).filter(s=>e[s].axis===n).shift()}_getAxis(){const e={},n=this.getFirstScaleIdForIndexAxis();for(const s of this.chart.data.datasets)e[dt(this.chart.options.indexAxis==="x"?s.xAxisID:s.yAxisID,n)]=!0;return Object.keys(e)}_getStackIndex(e,n,s){const i=this._getStacks(e,s),l=n!==void 0?i.indexOf(n):-1;return l===-1?i.length-1:l}_getRuler(){const e=this.options,n=this._cachedMeta,s=n.iScale,i=[];let l,o;for(l=0,o=n.data.length;l<o;++l)i.push(s.getPixelForValue(this.getParsed(l)[s.axis],l));const r=e.barThickness;return{min:r||db(n),pixels:i,start:s._startPixel,end:s._endPixel,stackCount:this._getStackCount(),scale:s,grouped:e.grouped,ratio:r?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:n,_stacked:s,index:i},options:{base:l,minBarLength:o}}=this,r=l||0,u=this.getParsed(e),f=u._custom,h=er(f);let p=u[n.axis],g=0,m=s?this.applyStack(n,u,s):p,_,b;m!==p&&(g=m-p,m=p),h&&(p=f.barStart,m=f.barEnd-f.barStart,p!==0&&Bs(p)!==Bs(f.barEnd)&&(g=0),g+=p);const k=!Dt(l)&&!h?l:g;let v=n.getPixelForValue(k);if(this.chart.getDataVisibility(e)?_=n.getPixelForValue(g+m):_=v,b=_-v,Math.abs(b)<o){b=bb(b,n,r)*o,p===r&&(v-=b/2);const y=n.getPixelForDecimal(0),S=n.getPixelForDecimal(1),C=Math.min(y,S),T=Math.max(y,S);v=Math.max(Math.min(v,T),C),_=v+b,s&&!h&&(u._stacks[n.axis]._visualValues[i]=n.getValueForPixel(_)-n.getValueForPixel(v))}if(v===n.getPixelForValue(r)){const y=Bs(b)*n.getLineWidthForValue(r)/2;v+=y,b-=y}return{size:b,base:v,head:_,center:_+b/2}}_calculateBarIndexPixels(e,n){const s=n.scale,i=this.options,l=i.skipNull,o=dt(i.maxBarThickness,1/0);let r,u;const f=this._getAxisCount();if(n.grouped){const h=l?this._getStackCount(e):n.stackCount,p=i.barThickness==="flex"?gb(e,n,i,h*f):pb(e,n,i,h*f),g=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,m=this._getAxis().indexOf(dt(g,this.getFirstScaleIdForIndexAxis())),_=this._getStackIndex(this.index,this._cachedMeta.stack,l?e:void 0)+m;r=p.start+p.chunk*_+p.chunk/2,u=Math.min(o,p.chunk*p.ratio)}else r=s.getPixelForValue(this.getParsed(e)[s.axis],e),u=Math.min(o,n.min*n.ratio);return{base:r-u/2,head:r+u/2,center:r,size:u}}draw(){const e=this._cachedMeta,n=e.vScale,s=e.data,i=s.length;let l=0;for(;l<i;++l)this.getParsed(l)[n.axis]!==null&&!s[l].hidden&&s[l].draw(this._ctx)}}function Sb(t,e,n){let s=1,i=1,l=0,o=0;if(e<yn){const r=t,u=r+e,f=Math.cos(r),h=Math.sin(r),p=Math.cos(u),g=Math.sin(u),m=(S,C,T)=>Tl(S,r,u,!0)?1:Math.max(C,C*n,T,T*n),_=(S,C,T)=>Tl(S,r,u,!0)?-1:Math.min(C,C*n,T,T*n),b=m(0,f,p),k=m(xn,h,g),v=_(Nt,f,p),y=_(Nt+xn,h,g);s=(b-v)/2,i=(k-y)/2,l=-(b+v)/2,o=-(k+y)/2}return{ratioX:s,ratioY:i,offsetX:l,offsetY:o}}class Eb extends Oo{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:s,color:i}}=e.legend.options;return n.labels.map((l,o)=>{const u=e.getDatasetMeta(0).controller.getStyle(o);return{text:l,fillStyle:u.backgroundColor,strokeStyle:u.borderColor,fontColor:i,lineWidth:u.borderWidth,pointStyle:s,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,n,s){s.chart.toggleDataVisibility(n.index),s.chart.update()}}}};constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const s=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=s;else{let l=u=>+s[u];if(Tt(s[e])){const{key:u="value"}=this._parsing;l=f=>+Mi(s[f],u)}let o,r;for(o=e,r=e+n;o<r;++o)i._parsed[o]=l(o)}}_getRotation(){return qs(this.options.rotation-90)}_getCircumference(){return qs(this.options.circumference)}_getRotationExtents(){let e=yn,n=-yn;for(let s=0;s<this.chart.data.datasets.length;++s)if(this.chart.isDatasetVisible(s)&&this.chart.getDatasetMeta(s).type===this._type){const i=this.chart.getDatasetMeta(s).controller,l=i._getRotation(),o=i._getCircumference();e=Math.min(e,l),n=Math.max(n,l+o)}return{rotation:e,circumference:n-e}}update(e){const n=this.chart,{chartArea:s}=n,i=this._cachedMeta,l=i.data,o=this.getMaxBorderWidth()+this.getMaxOffset(l)+this.options.spacing,r=Math.max((Math.min(s.width,s.height)-o)/2,0),u=Math.min(Cm(this.options.cutout,r),1),f=this._getRingWeight(this.index),{circumference:h,rotation:p}=this._getRotationExtents(),{ratioX:g,ratioY:m,offsetX:_,offsetY:b}=Sb(p,h,u),k=(s.width-o)/g,v=(s.height-o)/m,y=Math.max(Math.min(k,v)/2,0),S=Id(this.options.radius,y),C=Math.max(S*u,0),T=(S-C)/this._getVisibleDatasetWeightTotal();this.offsetX=_*S,this.offsetY=b*S,i.total=this.calculateTotal(),this.outerRadius=S-T*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-T*f,0),this.updateElements(l,0,l.length,e)}_circumference(e,n){const s=this.options,i=this._cachedMeta,l=this._getCircumference();return n&&s.animation.animateRotate||!this.chart.getDataVisibility(e)||i._parsed[e]===null||i.data[e].hidden?0:this.calculateCircumference(i._parsed[e]*l/yn)}updateElements(e,n,s,i){const l=i==="reset",o=this.chart,r=o.chartArea,f=o.options.animation,h=(r.left+r.right)/2,p=(r.top+r.bottom)/2,g=l&&f.animateScale,m=g?0:this.innerRadius,_=g?0:this.outerRadius,{sharedOptions:b,includeOptions:k}=this._getSharedOptions(n,i);let v=this._getRotation(),y;for(y=0;y<n;++y)v+=this._circumference(y,l);for(y=n;y<n+s;++y){const S=this._circumference(y,l),C=e[y],T={x:h+this.offsetX,y:p+this.offsetY,startAngle:v,endAngle:v+S,circumference:S,outerRadius:_,innerRadius:m};k&&(T.options=b||this.resolveDataElementOptions(y,C.active?"active":i)),v+=S,this.updateElement(C,y,T,i)}}calculateTotal(){const e=this._cachedMeta,n=e.data;let s=0,i;for(i=0;i<n.length;i++){const l=e._parsed[i];l!==null&&!isNaN(l)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(s+=Math.abs(l))}return s}calculateCircumference(e){const n=this._cachedMeta.total;return n>0&&!isNaN(e)?yn*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,s=this.chart,i=s.data.labels||[],l=Kr(n._parsed[e],s.options.locale);return{label:i[e]||"",value:l}}getMaxBorderWidth(e){let n=0;const s=this.chart;let i,l,o,r,u;if(!e){for(i=0,l=s.data.datasets.length;i<l;++i)if(s.isDatasetVisible(i)){o=s.getDatasetMeta(i),e=o.data,r=o.controller;break}}if(!e)return 0;for(i=0,l=e.length;i<l;++i)u=r.resolveDataElementOptions(i),u.borderAlign!=="inner"&&(n=Math.max(n,u.borderWidth||0,u.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let s=0,i=e.length;s<i;++s){const l=this.resolveDataElementOptions(s);n=Math.max(n,l.offset||0,l.hoverOffset||0)}return n}_getRingWeightOffset(e){let n=0;for(let s=0;s<e;++s)this.chart.isDatasetVisible(s)&&(n+=this._getRingWeight(s));return n}_getRingWeight(e){return Math.max(dt(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class Tb extends Oo{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:s,data:i=[],_dataset:l}=n,o=this.chart._animationsDisabled;let{start:r,count:u}=Xm(n,i,o);this._drawStart=r,this._drawCount=u,Ym(n)&&(r=0,u=i.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!l._decimated,s.points=i;const f=this.resolveDatasetElementOptions(e);this.options.showLine||(f.borderWidth=0),f.segment=this.options.segment,this.updateElement(s,void 0,{animated:!o,options:f},e),this.updateElements(i,r,u,e)}updateElements(e,n,s,i){const l=i==="reset",{iScale:o,vScale:r,_stacked:u,_dataset:f}=this._cachedMeta,{sharedOptions:h,includeOptions:p}=this._getSharedOptions(n,i),g=o.axis,m=r.axis,{spanGaps:_,segment:b}=this.options,k=El(_)?_:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||l||i==="none",y=n+s,S=e.length;let C=n>0&&this.getParsed(n-1);for(let T=0;T<S;++T){const O=e[T],A=v?O:{};if(T<n||T>=y){A.skip=!0;continue}const x=this.getParsed(T),P=Dt(x[m]),D=A[g]=o.getPixelForValue(x[g],T),I=A[m]=l||P?r.getBasePixel():r.getPixelForValue(u?this.applyStack(r,x,u):x[m],T);A.skip=isNaN(D)||isNaN(I)||P,A.stop=T>0&&Math.abs(x[g]-C[g])>k,b&&(A.parsed=x,A.raw=f.data[T]),p&&(A.options=h||this.resolveDataElementOptions(T,O.active?"active":i)),v||this.updateElement(O,T,A,i),C=x}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,s=n.options&&n.options.borderWidth||0,i=e.data||[];if(!i.length)return s;const l=i[0].size(this.resolveDataElementOptions(0)),o=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(s,l,o)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}function vi(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class la{static override(e){Object.assign(la.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return vi()}parse(){return vi()}format(){return vi()}add(){return vi()}diff(){return vi()}startOf(){return vi()}endOf(){return vi()}}var Mb={_date:la};function Cb(t,e,n,s){const{controller:i,data:l,_sorted:o}=t,r=i._cachedMeta.iScale,u=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(r&&e===r.axis&&e!=="r"&&o&&l.length){const f=r._reversePixels?Um:Si;if(s){if(i._sharedOptions){const h=l[0],p=typeof h.getRange=="function"&&h.getRange(e);if(p){const g=f(l,e,n-p),m=f(l,e,n+p);return{lo:g.lo,hi:m.hi}}}}else{const h=f(l,e,n);if(u){const{vScale:p}=i._cachedMeta,{_parsed:g}=t,m=g.slice(0,h.lo+1).reverse().findIndex(b=>!Dt(b[p.axis]));h.lo-=Math.max(0,m);const _=g.slice(h.hi).findIndex(b=>!Dt(b[p.axis]));h.hi+=Math.max(0,_)}return h}}return{lo:0,hi:l.length-1}}function xo(t,e,n,s,i){const l=t.getSortedVisibleDatasetMetas(),o=n[e];for(let r=0,u=l.length;r<u;++r){const{index:f,data:h}=l[r],{lo:p,hi:g}=Cb(l[r],e,o,i);for(let m=p;m<=g;++m){const _=h[m];_.skip||s(_,f,m)}}}function Pb(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(s,i){const l=e?Math.abs(s.x-i.x):0,o=n?Math.abs(s.y-i.y):0;return Math.sqrt(Math.pow(l,2)+Math.pow(o,2))}}function tr(t,e,n,s,i){const l=[];return!i&&!t.isPointInArea(e)||xo(t,n,e,function(r,u,f){!i&&!Ml(r,t.chartArea,0)||r.inRange(e.x,e.y,s)&&l.push({element:r,datasetIndex:u,index:f})},!0),l}function Ab(t,e,n,s){let i=[];function l(o,r,u){const{startAngle:f,endAngle:h}=o.getProps(["startAngle","endAngle"],s),{angle:p}=Nd(o,{x:e.x,y:e.y});Tl(p,f,h)&&i.push({element:o,datasetIndex:r,index:u})}return xo(t,n,e,l),i}function Ob(t,e,n,s,i,l){let o=[];const r=Pb(n);let u=Number.POSITIVE_INFINITY;function f(h,p,g){const m=h.inRange(e.x,e.y,i);if(s&&!m)return;const _=h.getCenterPoint(i);if(!(!!l||t.isPointInArea(_))&&!m)return;const k=r(e,_);k<u?(o=[{element:h,datasetIndex:p,index:g}],u=k):k===u&&o.push({element:h,datasetIndex:p,index:g})}return xo(t,n,e,f),o}function nr(t,e,n,s,i,l){return!l&&!t.isPointInArea(e)?[]:n==="r"&&!s?Ab(t,e,n,i):Ob(t,e,n,s,i,l)}function vu(t,e,n,s,i){const l=[],o=n==="x"?"inXRange":"inYRange";let r=!1;return xo(t,n,e,(u,f,h)=>{u[o]&&u[o](e[n],i)&&(l.push({element:u,datasetIndex:f,index:h}),r=r||u.inRange(e.x,e.y,i))}),s&&!r?[]:l}var xb={modes:{index(t,e,n,s){const i=yi(e,t),l=n.axis||"x",o=n.includeInvisible||!1,r=n.intersect?tr(t,i,l,s,o):nr(t,i,l,!1,s,o),u=[];return r.length?(t.getSortedVisibleDatasetMetas().forEach(f=>{const h=r[0].index,p=f.data[h];p&&!p.skip&&u.push({element:p,datasetIndex:f.index,index:h})}),u):[]},dataset(t,e,n,s){const i=yi(e,t),l=n.axis||"xy",o=n.includeInvisible||!1;let r=n.intersect?tr(t,i,l,s,o):nr(t,i,l,!1,s,o);if(r.length>0){const u=r[0].datasetIndex,f=t.getDatasetMeta(u).data;r=[];for(let h=0;h<f.length;++h)r.push({element:f[h],datasetIndex:u,index:h})}return r},point(t,e,n,s){const i=yi(e,t),l=n.axis||"xy",o=n.includeInvisible||!1;return tr(t,i,l,s,o)},nearest(t,e,n,s){const i=yi(e,t),l=n.axis||"xy",o=n.includeInvisible||!1;return nr(t,i,l,n.intersect,s,o)},x(t,e,n,s){const i=yi(e,t);return vu(t,i,"x",n.intersect,s)},y(t,e,n,s){const i=yi(e,t);return vu(t,i,"y",n.intersect,s)}}};const ip=["left","top","right","bottom"];function tl(t,e){return t.filter(n=>n.pos===e)}function yu(t,e){return t.filter(n=>ip.indexOf(n.pos)===-1&&n.box.axis===e)}function nl(t,e){return t.sort((n,s)=>{const i=e?s:n,l=e?n:s;return i.weight===l.weight?i.index-l.index:i.weight-l.weight})}function Rb(t){const e=[];let n,s,i,l,o,r;for(n=0,s=(t||[]).length;n<s;++n)i=t[n],{position:l,options:{stack:o,stackWeight:r=1}}=i,e.push({index:n,box:i,pos:l,horizontal:i.isHorizontal(),weight:i.weight,stack:o&&l+o,stackWeight:r});return e}function Db(t){const e={};for(const n of t){const{stack:s,pos:i,stackWeight:l}=n;if(!s||!ip.includes(i))continue;const o=e[s]||(e[s]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=l}return e}function Lb(t,e){const n=Db(t),{vBoxMaxWidth:s,hBoxMaxHeight:i}=e;let l,o,r;for(l=0,o=t.length;l<o;++l){r=t[l];const{fullSize:u}=r.box,f=n[r.stack],h=f&&r.stackWeight/f.weight;r.horizontal?(r.width=h?h*s:u&&e.availableWidth,r.height=i):(r.width=s,r.height=h?h*i:u&&e.availableHeight)}return n}function Hb(t){const e=Rb(t),n=nl(e.filter(f=>f.box.fullSize),!0),s=nl(tl(e,"left"),!0),i=nl(tl(e,"right")),l=nl(tl(e,"top"),!0),o=nl(tl(e,"bottom")),r=yu(e,"x"),u=yu(e,"y");return{fullSize:n,leftAndTop:s.concat(l),rightAndBottom:i.concat(u).concat(o).concat(r),chartArea:tl(e,"chartArea"),vertical:s.concat(i).concat(u),horizontal:l.concat(o).concat(r)}}function wu(t,e,n,s){return Math.max(t[n],e[n])+Math.max(t[s],e[s])}function lp(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Ib(t,e,n,s){const{pos:i,box:l}=n,o=t.maxPadding;if(!Tt(i)){n.size&&(t[i]-=n.size);const p=s[n.stack]||{size:0,count:1};p.size=Math.max(p.size,n.horizontal?l.height:l.width),n.size=p.size/p.count,t[i]+=n.size}l.getPadding&&lp(o,l.getPadding());const r=Math.max(0,e.outerWidth-wu(o,t,"left","right")),u=Math.max(0,e.outerHeight-wu(o,t,"top","bottom")),f=r!==t.w,h=u!==t.h;return t.w=r,t.h=u,n.horizontal?{same:f,other:h}:{same:h,other:f}}function Bb(t){const e=t.maxPadding;function n(s){const i=Math.max(e[s]-t[s],0);return t[s]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function Fb(t,e){const n=e.maxPadding;function s(i){const l={left:0,top:0,right:0,bottom:0};return i.forEach(o=>{l[o]=Math.max(e[o],n[o])}),l}return s(t?["left","right"]:["top","bottom"])}function ul(t,e,n,s){const i=[];let l,o,r,u,f,h;for(l=0,o=t.length,f=0;l<o;++l){r=t[l],u=r.box,u.update(r.width||e.w,r.height||e.h,Fb(r.horizontal,e));const{same:p,other:g}=Ib(e,n,r,s);f|=p&&i.length,h=h||g,u.fullSize||i.push(r)}return f&&ul(i,e,n,s)||h}function Kl(t,e,n,s,i){t.top=n,t.left=e,t.right=e+s,t.bottom=n+i,t.width=s,t.height=i}function ku(t,e,n,s){const i=n.padding;let{x:l,y:o}=e;for(const r of t){const u=r.box,f=s[r.stack]||{placed:0,weight:1},h=r.stackWeight/f.weight||1;if(r.horizontal){const p=e.w*h,g=f.size||u.height;Sl(f.start)&&(o=f.start),u.fullSize?Kl(u,i.left,o,n.outerWidth-i.right-i.left,g):Kl(u,e.left+f.placed,o,p,g),f.start=o,f.placed+=p,o=u.bottom}else{const p=e.h*h,g=f.size||u.width;Sl(f.start)&&(l=f.start),u.fullSize?Kl(u,l,i.top,g,n.outerHeight-i.bottom-i.top):Kl(u,l,e.top+f.placed,g,p),f.start=l,f.placed+=p,l=u.right}}e.x=l,e.y=o}var ks={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,s){if(!t)return;const i=Ts(t.options.layout.padding),l=Math.max(e-i.width,0),o=Math.max(n-i.height,0),r=Hb(t.boxes),u=r.vertical,f=r.horizontal;Ft(t.boxes,b=>{typeof b.beforeLayout=="function"&&b.beforeLayout()});const h=u.reduce((b,k)=>k.box.options&&k.box.options.display===!1?b:b+1,0)||1,p=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:l,availableHeight:o,vBoxMaxWidth:l/2/h,hBoxMaxHeight:o/2}),g=Object.assign({},i);lp(g,Ts(s));const m=Object.assign({maxPadding:g,w:l,h:o,x:i.left,y:i.top},i),_=Lb(u.concat(f),p);ul(r.fullSize,m,p,_),ul(u,m,p,_),ul(f,m,p,_)&&ul(u,m,p,_),Bb(m),ku(r.leftAndTop,m,p,_),m.x+=m.w,m.y+=m.h,ku(r.rightAndBottom,m,p,_),t.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},Ft(r.chartArea,b=>{const k=b.box;Object.assign(k,t.chartArea),k.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class op{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,s){}removeEventListener(e,n,s){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,s,i){return n=Math.max(0,n||e.width),s=s||e.height,{width:n,height:Math.max(0,i?Math.floor(n/i):s)}}isAttached(e){return!0}updateConfig(e){}}class Nb extends op{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const ao="$chartjs",jb={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Su=t=>t===null||t==="";function zb(t,e){const n=t.style,s=t.getAttribute("height"),i=t.getAttribute("width");if(t[ao]={initial:{height:s,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Su(i)){const l=ou(t,"width");l!==void 0&&(t.width=l)}if(Su(s))if(t.style.height==="")t.height=t.width/(e||2);else{const l=ou(t,"height");l!==void 0&&(t.height=l)}return t}const rp=B1?{passive:!0}:!1;function Ub(t,e,n){t&&t.addEventListener(e,n,rp)}function Vb(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,rp)}function Wb(t,e){const n=jb[t.type]||t.type,{x:s,y:i}=yi(t,e);return{type:n,chart:e,native:t,x:s!==void 0?s:null,y:i!==void 0?i:null}}function wo(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function qb(t,e,n){const s=t.canvas,i=new MutationObserver(l=>{let o=!1;for(const r of l)o=o||wo(r.addedNodes,s),o=o&&!wo(r.removedNodes,s);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function Gb(t,e,n){const s=t.canvas,i=new MutationObserver(l=>{let o=!1;for(const r of l)o=o||wo(r.removedNodes,s),o=o&&!wo(r.addedNodes,s);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Pl=new Map;let Eu=0;function ap(){const t=window.devicePixelRatio;t!==Eu&&(Eu=t,Pl.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function Xb(t,e){Pl.size||window.addEventListener("resize",ap),Pl.set(t,e)}function Yb(t){Pl.delete(t),Pl.size||window.removeEventListener("resize",ap)}function Jb(t,e,n){const s=t.canvas,i=s&&ia(s);if(!i)return;const l=Vd((r,u)=>{const f=i.clientWidth;n(r,u),f<i.clientWidth&&n()},window),o=new ResizeObserver(r=>{const u=r[0],f=u.contentRect.width,h=u.contentRect.height;f===0&&h===0||l(f,h)});return o.observe(i),Xb(t,l),o}function sr(t,e,n){n&&n.disconnect(),e==="resize"&&Yb(t)}function Kb(t,e,n){const s=t.canvas,i=Vd(l=>{t.ctx!==null&&n(Wb(l,t))},t);return Ub(s,e,i),i}class Zb extends op{acquireContext(e,n){const s=e&&e.getContext&&e.getContext("2d");return s&&s.canvas===e?(zb(e,n),s):null}releaseContext(e){const n=e.canvas;if(!n[ao])return!1;const s=n[ao].initial;["height","width"].forEach(l=>{const o=s[l];Dt(o)?n.removeAttribute(l):n.setAttribute(l,o)});const i=s.style||{};return Object.keys(i).forEach(l=>{n.style[l]=i[l]}),n.width=n.width,delete n[ao],!0}addEventListener(e,n,s){this.removeEventListener(e,n);const i=e.$proxies||(e.$proxies={}),o={attach:qb,detach:Gb,resize:Jb}[n]||Kb;i[n]=o(e,n,s)}removeEventListener(e,n){const s=e.$proxies||(e.$proxies={}),i=s[n];if(!i)return;({attach:sr,detach:sr,resize:sr}[n]||Vb)(e,n,i),s[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,s,i){return I1(e,n,s,i)}isAttached(e){const n=e&&ia(e);return!!(n&&n.isConnected)}}function Qb(t){return!sa()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?Nb:Zb}let Ks=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){const{x:n,y:s}=this.getProps(["x","y"],e);return{x:n,y:s}}hasValue(){return El(this.x)&&El(this.y)}getProps(e,n){const s=this.$animations;if(!n||!s)return this;const i={};return e.forEach(l=>{i[l]=s[l]&&s[l].active()?s[l]._to:this[l]}),i}};function $b(t,e){const n=t.options.ticks,s=e_(t),i=Math.min(n.maxTicksLimit||s,s),l=n.major.enabled?n_(e):[],o=l.length,r=l[0],u=l[o-1],f=[];if(o>i)return s_(e,f,l,o/i),f;const h=t_(l,e,i);if(o>0){let p,g;const m=o>1?Math.round((u-r)/(o-1)):null;for(Zl(e,f,h,Dt(m)?0:r-m,r),p=0,g=o-1;p<g;p++)Zl(e,f,h,l[p],l[p+1]);return Zl(e,f,h,u,Dt(m)?e.length:u+m),f}return Zl(e,f,h),f}function e_(t){const e=t.options.offset,n=t._tickSize(),s=t._length/n+(e?0:1),i=t._maxLength/n;return Math.floor(Math.min(s,i))}function t_(t,e,n){const s=i_(t),i=e.length/n;if(!s)return Math.max(i,1);const l=Hm(s);for(let o=0,r=l.length-1;o<r;o++){const u=l[o];if(u>i)return u}return Math.max(i,1)}function n_(t){const e=[];let n,s;for(n=0,s=t.length;n<s;n++)t[n].major&&e.push(n);return e}function s_(t,e,n,s){let i=0,l=n[0],o;for(s=Math.ceil(s),o=0;o<t.length;o++)o===l&&(e.push(t[o]),i++,l=n[i*s])}function Zl(t,e,n,s,i){const l=dt(s,0),o=Math.min(dt(i,t.length),t.length);let r=0,u,f,h;for(n=Math.ceil(n),i&&(u=i-s,n=u/Math.floor(u/n)),h=l;h<0;)r++,h=Math.round(l+r*n);for(f=Math.max(l,0);f<o;f++)f===h&&(e.push(t[f]),r++,h=Math.round(l+r*n))}function i_(t){const e=t.length;let n,s;if(e<2)return!1;for(s=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==s)return!1;return s}const l_=t=>t==="left"?"right":t==="right"?"left":t,Tu=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,Mu=(t,e)=>Math.min(e||t,t);function Cu(t,e){const n=[],s=t.length/e,i=t.length;let l=0;for(;l<i;l+=s)n.push(t[Math.floor(l)]);return n}function o_(t,e,n){const s=t.ticks.length,i=Math.min(e,s-1),l=t._startPixel,o=t._endPixel,r=1e-6;let u=t.getPixelForTick(i),f;if(!(n&&(s===1?f=Math.max(u-l,o-u):e===0?f=(t.getPixelForTick(1)-u)/2:f=(u-t.getPixelForTick(i-1))/2,u+=i<e?f:-f,u<l-r||u>o+r)))return u}function r_(t,e){Ft(t,n=>{const s=n.gc,i=s.length/2;let l;if(i>e){for(l=0;l<i;++l)delete n.data[s[l]];s.splice(0,i)}})}function sl(t){return t.drawTicks?t.tickLength:0}function Pu(t,e){if(!t.display)return 0;const n=Qn(t.font,e),s=Ts(t.padding);return(On(t.text)?t.text.length:1)*n.lineHeight+s.height}function a_(t,e){return Oi(t,{scale:e,type:"scale"})}function u_(t,e,n){return Oi(t,{tick:n,index:e,type:"tick"})}function c_(t,e,n){let s=Yr(t);return(n&&e!=="right"||!n&&e==="right")&&(s=l_(s)),s}function f_(t,e,n,s){const{top:i,left:l,bottom:o,right:r,chart:u}=t,{chartArea:f,scales:h}=u;let p=0,g,m,_;const b=o-i,k=r-l;if(t.isHorizontal()){if(m=Yn(s,l,r),Tt(n)){const v=Object.keys(n)[0],y=n[v];_=h[v].getPixelForValue(y)+b-e}else n==="center"?_=(f.bottom+f.top)/2+b-e:_=Tu(t,n,e);g=r-l}else{if(Tt(n)){const v=Object.keys(n)[0],y=n[v];m=h[v].getPixelForValue(y)-k+e}else n==="center"?m=(f.left+f.right)/2-k+e:m=Tu(t,n,e);_=Yn(s,o,i),p=n==="left"?-xn:xn}return{titleX:m,titleY:_,maxWidth:g,rotation:p}}class Zi extends Ks{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:s,_suggestedMax:i}=this;return e=Ds(e,Number.POSITIVE_INFINITY),n=Ds(n,Number.NEGATIVE_INFINITY),s=Ds(s,Number.POSITIVE_INFINITY),i=Ds(i,Number.NEGATIVE_INFINITY),{min:Ds(e,s),max:Ds(n,i),minDefined:Es(e),maxDefined:Es(n)}}getMinMax(e){let{min:n,max:s,minDefined:i,maxDefined:l}=this.getUserBounds(),o;if(i&&l)return{min:n,max:s};const r=this.getMatchingVisibleMetas();for(let u=0,f=r.length;u<f;++u)o=r[u].controller.getMinMax(this,e),i||(n=Math.min(n,o.min)),l||(s=Math.max(s,o.max));return n=l&&n>s?s:n,s=i&&n>s?n:s,{min:Ds(n,Ds(s,n)),max:Ds(s,Ds(n,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){rn(this.options.beforeUpdate,[this])}update(e,n,s){const{beginAtZero:i,grace:l,ticks:o}=this.options,r=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=p1(this,l,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const u=r<this.ticks.length;this._convertTicksToLabels(u?Cu(this.ticks,r):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=$b(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),u&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,s;this.isHorizontal()?(n=this.left,s=this.right):(n=this.top,s=this.bottom,e=!e),this._startPixel=n,this._endPixel=s,this._reversePixels=e,this._length=s-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){rn(this.options.afterUpdate,[this])}beforeSetDimensions(){rn(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){rn(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),rn(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){rn(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let s,i,l;for(s=0,i=e.length;s<i;s++)l=e[s],l.label=rn(n.callback,[l.value,s,e],this)}afterTickToLabelConversion(){rn(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){rn(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,s=Mu(this.ticks.length,e.ticks.maxTicksLimit),i=n.minRotation||0,l=n.maxRotation;let o=i,r,u,f;if(!this._isVisible()||!n.display||i>=l||s<=1||!this.isHorizontal()){this.labelRotation=i;return}const h=this._getLabelSizes(),p=h.widest.width,g=h.highest.height,m=Zn(this.chart.width-p,0,this.maxWidth);r=e.offset?this.maxWidth/s:m/(s-1),p+6>r&&(r=m/(s-(e.offset?.5:1)),u=this.maxHeight-sl(e.grid)-n.padding-Pu(e.title,this.chart.options.font),f=Math.sqrt(p*p+g*g),o=Nm(Math.min(Math.asin(Zn((h.highest.height+6)/r,-1,1)),Math.asin(Zn(u/f,-1,1))-Math.asin(Zn(g/f,-1,1)))),o=Math.max(i,Math.min(l,o))),this.labelRotation=o}afterCalculateLabelRotation(){rn(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){rn(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:s,title:i,grid:l}}=this,o=this._isVisible(),r=this.isHorizontal();if(o){const u=Pu(i,n.options.font);if(r?(e.width=this.maxWidth,e.height=sl(l)+u):(e.height=this.maxHeight,e.width=sl(l)+u),s.display&&this.ticks.length){const{first:f,last:h,widest:p,highest:g}=this._getLabelSizes(),m=s.padding*2,_=qs(this.labelRotation),b=Math.cos(_),k=Math.sin(_);if(r){const v=s.mirror?0:k*p.width+b*g.height;e.height=Math.min(this.maxHeight,e.height+v+m)}else{const v=s.mirror?0:b*p.width+k*g.height;e.width=Math.min(this.maxWidth,e.width+v+m)}this._calculatePadding(f,h,k,b)}}this._handleMargins(),r?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,s,i){const{ticks:{align:l,padding:o},position:r}=this.options,u=this.labelRotation!==0,f=r!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,p=this.right-this.getPixelForTick(this.ticks.length-1);let g=0,m=0;u?f?(g=i*e.width,m=s*n.height):(g=s*e.height,m=i*n.width):l==="start"?m=n.width:l==="end"?g=e.width:l!=="inner"&&(g=e.width/2,m=n.width/2),this.paddingLeft=Math.max((g-h+o)*this.width/(this.width-h),0),this.paddingRight=Math.max((m-p+o)*this.width/(this.width-p),0)}else{let h=n.height/2,p=e.height/2;l==="start"?(h=0,p=e.height):l==="end"&&(h=n.height,p=0),this.paddingTop=h+o,this.paddingBottom=p+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){rn(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,s;for(n=0,s=e.length;n<s;n++)Dt(e[n].label)&&(e.splice(n,1),s--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let s=this.ticks;n<s.length&&(s=Cu(s,n)),this._labelSizes=e=this._computeLabelSizes(s,s.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,s){const{ctx:i,_longestTextCache:l}=this,o=[],r=[],u=Math.floor(n/Mu(n,s));let f=0,h=0,p,g,m,_,b,k,v,y,S,C,T;for(p=0;p<n;p+=u){if(_=e[p].label,b=this._resolveTickFontOptions(p),i.font=k=b.string,v=l[k]=l[k]||{data:{},gc:[]},y=b.lineHeight,S=C=0,!Dt(_)&&!On(_))S=tu(i,v.data,v.gc,S,_),C=y;else if(On(_))for(g=0,m=_.length;g<m;++g)T=_[g],!Dt(T)&&!On(T)&&(S=tu(i,v.data,v.gc,S,T),C+=y);o.push(S),r.push(C),f=Math.max(S,f),h=Math.max(C,h)}r_(l,n);const O=o.indexOf(f),A=r.indexOf(h),x=P=>({width:o[P]||0,height:r[P]||0});return{first:x(0),last:x(n-1),widest:x(O),highest:x(A),widths:o,heights:r}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return zm(this._alignToPixels?_i(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&e<n.length){const s=n[e];return s.$context||(s.$context=u_(this.getContext(),e,s))}return this.$context||(this.$context=a_(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=qs(this.labelRotation),s=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),l=this._getLabelSizes(),o=e.autoSkipPadding||0,r=l?l.widest.width+o:0,u=l?l.highest.height+o:0;return this.isHorizontal()?u*s>r*i?r/s:u/i:u*i<r*s?u/s:r/i}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,s=this.chart,i=this.options,{grid:l,position:o,border:r}=i,u=l.offset,f=this.isHorizontal(),p=this.ticks.length+(u?1:0),g=sl(l),m=[],_=r.setContext(this.getContext()),b=_.display?_.width:0,k=b/2,v=function(B){return _i(s,B,b)};let y,S,C,T,O,A,x,P,D,I,R,U;if(o==="top")y=v(this.bottom),A=this.bottom-g,P=y-k,I=v(e.top)+k,U=e.bottom;else if(o==="bottom")y=v(this.top),I=e.top,U=v(e.bottom)-k,A=y+k,P=this.top+g;else if(o==="left")y=v(this.right),O=this.right-g,x=y-k,D=v(e.left)+k,R=e.right;else if(o==="right")y=v(this.left),D=e.left,R=v(e.right)-k,O=y+k,x=this.left+g;else if(n==="x"){if(o==="center")y=v((e.top+e.bottom)/2+.5);else if(Tt(o)){const B=Object.keys(o)[0],j=o[B];y=v(this.chart.scales[B].getPixelForValue(j))}I=e.top,U=e.bottom,A=y+k,P=A+g}else if(n==="y"){if(o==="center")y=v((e.left+e.right)/2);else if(Tt(o)){const B=Object.keys(o)[0],j=o[B];y=v(this.chart.scales[B].getPixelForValue(j))}O=y-k,x=O-g,D=e.left,R=e.right}const N=dt(i.ticks.maxTicksLimit,p),z=Math.max(1,Math.ceil(p/N));for(S=0;S<p;S+=z){const B=this.getContext(S),j=l.setContext(B),F=r.setContext(B),W=j.lineWidth,G=j.color,Y=F.dash||[],Q=F.dashOffset,le=j.tickWidth,Z=j.tickColor,V=j.tickBorderDash||[],X=j.tickBorderDashOffset;C=o_(this,S,u),C!==void 0&&(T=_i(s,C,W),f?O=x=D=R=T:A=P=I=U=T,m.push({tx1:O,ty1:A,tx2:x,ty2:P,x1:D,y1:I,x2:R,y2:U,width:W,color:G,borderDash:Y,borderDashOffset:Q,tickWidth:le,tickColor:Z,tickBorderDash:V,tickBorderDashOffset:X}))}return this._ticksLength=p,this._borderValue=y,m}_computeLabelItems(e){const n=this.axis,s=this.options,{position:i,ticks:l}=s,o=this.isHorizontal(),r=this.ticks,{align:u,crossAlign:f,padding:h,mirror:p}=l,g=sl(s.grid),m=g+h,_=p?-h:m,b=-qs(this.labelRotation),k=[];let v,y,S,C,T,O,A,x,P,D,I,R,U="middle";if(i==="top")O=this.bottom-_,A=this._getXAxisLabelAlignment();else if(i==="bottom")O=this.top+_,A=this._getXAxisLabelAlignment();else if(i==="left"){const z=this._getYAxisLabelAlignment(g);A=z.textAlign,T=z.x}else if(i==="right"){const z=this._getYAxisLabelAlignment(g);A=z.textAlign,T=z.x}else if(n==="x"){if(i==="center")O=(e.top+e.bottom)/2+m;else if(Tt(i)){const z=Object.keys(i)[0],B=i[z];O=this.chart.scales[z].getPixelForValue(B)+m}A=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")T=(e.left+e.right)/2-m;else if(Tt(i)){const z=Object.keys(i)[0],B=i[z];T=this.chart.scales[z].getPixelForValue(B)}A=this._getYAxisLabelAlignment(g).textAlign}n==="y"&&(u==="start"?U="top":u==="end"&&(U="bottom"));const N=this._getLabelSizes();for(v=0,y=r.length;v<y;++v){S=r[v],C=S.label;const z=l.setContext(this.getContext(v));x=this.getPixelForTick(v)+l.labelOffset,P=this._resolveTickFontOptions(v),D=P.lineHeight,I=On(C)?C.length:1;const B=I/2,j=z.color,F=z.textStrokeColor,W=z.textStrokeWidth;let G=A;o?(T=x,A==="inner"&&(v===y-1?G=this.options.reverse?"left":"right":v===0?G=this.options.reverse?"right":"left":G="center"),i==="top"?f==="near"||b!==0?R=-I*D+D/2:f==="center"?R=-N.highest.height/2-B*D+D:R=-N.highest.height+D/2:f==="near"||b!==0?R=D/2:f==="center"?R=N.highest.height/2-B*D:R=N.highest.height-I*D,p&&(R*=-1),b!==0&&!z.showLabelBackdrop&&(T+=D/2*Math.sin(b))):(O=x,R=(1-I)*D/2);let Y;if(z.showLabelBackdrop){const Q=Ts(z.backdropPadding),le=N.heights[v],Z=N.widths[v];let V=R-Q.top,X=0-Q.left;switch(U){case"middle":V-=le/2;break;case"bottom":V-=le;break}switch(A){case"center":X-=Z/2;break;case"right":X-=Z;break;case"inner":v===y-1?X-=Z:v>0&&(X-=Z/2);break}Y={left:X,top:V,width:Z+Q.width,height:le+Q.height,color:z.backdropColor}}k.push({label:C,font:P,textOffset:R,options:{rotation:b,color:j,strokeColor:F,strokeWidth:W,textAlign:G,textBaseline:U,translation:[T,O],backdrop:Y}})}return k}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-qs(this.labelRotation))return e==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:s,mirror:i,padding:l}}=this.options,o=this._getLabelSizes(),r=e+l,u=o.widest.width;let f,h;return n==="left"?i?(h=this.right+l,s==="near"?f="left":s==="center"?(f="center",h+=u/2):(f="right",h+=u)):(h=this.right-r,s==="near"?f="right":s==="center"?(f="center",h-=u/2):(f="left",h=this.left)):n==="right"?i?(h=this.left+l,s==="near"?f="right":s==="center"?(f="center",h-=u/2):(f="left",h-=u)):(h=this.left+r,s==="near"?f="left":s==="center"?(f="center",h+=u/2):(f="right",h=this.right)):f="right",{textAlign:f,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:s,top:i,width:l,height:o}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(s,i,l,o),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(l=>l.value===e);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(e){const n=this.options.grid,s=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let l,o;const r=(u,f,h)=>{!h.width||!h.color||(s.save(),s.lineWidth=h.width,s.strokeStyle=h.color,s.setLineDash(h.borderDash||[]),s.lineDashOffset=h.borderDashOffset,s.beginPath(),s.moveTo(u.x,u.y),s.lineTo(f.x,f.y),s.stroke(),s.restore())};if(n.display)for(l=0,o=i.length;l<o;++l){const u=i[l];n.drawOnChartArea&&r({x:u.x1,y:u.y1},{x:u.x2,y:u.y2},u),n.drawTicks&&r({x:u.tx1,y:u.ty1},{x:u.tx2,y:u.ty2},{color:u.tickColor,width:u.tickWidth,borderDash:u.tickBorderDash,borderDashOffset:u.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:s,grid:i}}=this,l=s.setContext(this.getContext()),o=s.display?l.width:0;if(!o)return;const r=i.setContext(this.getContext(0)).lineWidth,u=this._borderValue;let f,h,p,g;this.isHorizontal()?(f=_i(e,this.left,o)-o/2,h=_i(e,this.right,r)+r/2,p=g=u):(p=_i(e,this.top,o)-o/2,g=_i(e,this.bottom,r)+r/2,f=h=u),n.save(),n.lineWidth=l.width,n.strokeStyle=l.color,n.beginPath(),n.moveTo(f,p),n.lineTo(h,g),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const s=this.ctx,i=this._computeLabelArea();i&&Zr(s,i);const l=this.getLabelItems(e);for(const o of l){const r=o.options,u=o.font,f=o.label,h=o.textOffset;Cl(s,f,0,h,u,r)}i&&Qr(s)}drawTitle(){const{ctx:e,options:{position:n,title:s,reverse:i}}=this;if(!s.display)return;const l=Qn(s.font),o=Ts(s.padding),r=s.align;let u=l.lineHeight/2;n==="bottom"||n==="center"||Tt(n)?(u+=o.bottom,On(s.text)&&(u+=l.lineHeight*(s.text.length-1))):u+=o.top;const{titleX:f,titleY:h,maxWidth:p,rotation:g}=f_(this,u,n,r);Cl(e,s.text,0,0,l,{color:s.color,maxWidth:p,rotation:g,textAlign:c_(r,n,i),textBaseline:"middle",translation:[f,h]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,n=e.ticks&&e.ticks.z||0,s=dt(e.grid&&e.grid.z,-1),i=dt(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==Zi.prototype.draw?[{z:n,draw:l=>{this.draw(l)}}]:[{z:s,draw:l=>{this.drawBackground(),this.drawGrid(l),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:l=>{this.drawLabels(l)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",i=[];let l,o;for(l=0,o=n.length;l<o;++l){const r=n[l];r[s]===this.id&&(!e||r.type===e)&&i.push(r)}return i}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return Qn(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class Ql{constructor(e,n,s){this.type=e,this.scope=n,this.override=s,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let s;p_(n)&&(s=this.register(n));const i=this.items,l=e.id,o=this.scope+"."+l;if(!l)throw new Error("class does not have id: "+e);return l in i||(i[l]=e,h_(e,o,s),this.override&&Sn.override(e.id,e.overrides)),o}get(e){return this.items[e]}unregister(e){const n=this.items,s=e.id,i=this.scope;s in n&&delete n[s],i&&s in Sn[i]&&(delete Sn[i][s],this.override&&delete Ci[s])}}function h_(t,e,n){const s=kl(Object.create(null),[n?Sn.get(n):{},Sn.get(e),t.defaults]);Sn.set(e,s),t.defaultRoutes&&d_(e,t.defaultRoutes),t.descriptors&&Sn.describe(e,t.descriptors)}function d_(t,e){Object.keys(e).forEach(n=>{const s=n.split("."),i=s.pop(),l=[t].concat(s).join("."),o=e[n].split("."),r=o.pop(),u=o.join(".");Sn.route(l,i,u,r)})}function p_(t){return"id"in t&&"defaults"in t}class g_{constructor(){this.controllers=new Ql(Oo,"datasets",!0),this.elements=new Ql(Ks,"elements"),this.plugins=new Ql(Object,"plugins"),this.scales=new Ql(Zi,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,s){[...n].forEach(i=>{const l=s||this._getRegistryForType(i);s||l.isForType(i)||l===this.plugins&&i.id?this._exec(e,l,i):Ft(i,o=>{const r=s||this._getRegistryForType(o);this._exec(e,r,o)})})}_exec(e,n,s){const i=Gr(e);rn(s["before"+i],[],s),n[e](s),rn(s["after"+i],[],s)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const s=this._typedRegistries[n];if(s.isForType(e))return s}return this.plugins}_get(e,n,s){const i=n.get(e);if(i===void 0)throw new Error('"'+e+'" is not a registered '+s+".");return i}}var Hs=new g_;class m_{constructor(){this._init=[]}notify(e,n,s,i){n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const l=i?this._descriptors(e).filter(i):this._descriptors(e),o=this._notify(l,e,n,s);return n==="afterDestroy"&&(this._notify(l,e,"stop"),this._notify(this._init,e,"uninstall")),o}_notify(e,n,s,i){i=i||{};for(const l of e){const o=l.plugin,r=o[s],u=[n,i,l.options];if(rn(r,u,o)===!1&&i.cancelable)return!1}return!0}invalidate(){Dt(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){const s=e&&e.config,i=dt(s.options&&s.options.plugins,{}),l=b_(s);return i===!1&&!n?[]:v_(e,l,i,n)}_notifyStateChanges(e){const n=this._oldCache||[],s=this._cache,i=(l,o)=>l.filter(r=>!o.some(u=>r.plugin.id===u.plugin.id));this._notify(i(n,s),e,"stop"),this._notify(i(s,n),e,"start")}}function b_(t){const e={},n=[],s=Object.keys(Hs.plugins.items);for(let l=0;l<s.length;l++)n.push(Hs.getPlugin(s[l]));const i=t.plugins||[];for(let l=0;l<i.length;l++){const o=i[l];n.indexOf(o)===-1&&(n.push(o),e[o.id]=!0)}return{plugins:n,localIds:e}}function __(t,e){return!e&&t===!1?null:t===!0?{}:t}function v_(t,{plugins:e,localIds:n},s,i){const l=[],o=t.getContext();for(const r of e){const u=r.id,f=__(s[u],i);f!==null&&l.push({plugin:r,options:y_(t.config,{plugin:r,local:n[u]},f,o)})}return l}function y_(t,{plugin:e,local:n},s,i){const l=t.pluginScopeKeys(e),o=t.getOptionScopes(s,l);return n&&e.defaults&&o.push(e.defaults),t.createResolver(o,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Cr(t,e){const n=Sn.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function w_(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function k_(t,e){return t===e?"_index_":"_value_"}function Au(t){if(t==="x"||t==="y"||t==="r")return t}function S_(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function Pr(t,...e){if(Au(t))return t;for(const n of e){const s=n.axis||S_(n.position)||t.length>1&&Au(t[0].toLowerCase());if(s)return s}throw new Error(\`Cannot determine type of '\${t}' axis. Please provide 'axis' or 'position' option.\`)}function Ou(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function E_(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(s=>s.xAxisID===t||s.yAxisID===t);if(n.length)return Ou(t,"x",n[0])||Ou(t,"y",n[0])}return{}}function T_(t,e){const n=Ci[t.type]||{scales:{}},s=e.scales||{},i=Cr(t.type,e),l=Object.create(null);return Object.keys(s).forEach(o=>{const r=s[o];if(!Tt(r))return console.error(\`Invalid scale configuration for scale: \${o}\`);if(r._proxy)return console.warn(\`Ignoring resolver passed as options for scale: \${o}\`);const u=Pr(o,r,E_(o,t),Sn.scales[r.type]),f=k_(u,i),h=n.scales||{};l[o]=gl(Object.create(null),[{axis:u},r,h[u],h[f]])}),t.data.datasets.forEach(o=>{const r=o.type||t.type,u=o.indexAxis||Cr(r,e),h=(Ci[r]||{}).scales||{};Object.keys(h).forEach(p=>{const g=w_(p,u),m=o[g+"AxisID"]||g;l[m]=l[m]||Object.create(null),gl(l[m],[{axis:g},s[m],h[p]])})}),Object.keys(l).forEach(o=>{const r=l[o];gl(r,[Sn.scales[r.type],Sn.scale])}),l}function up(t){const e=t.options||(t.options={});e.plugins=dt(e.plugins,{}),e.scales=T_(t,e)}function cp(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function M_(t){return t=t||{},t.data=cp(t.data),up(t),t}const xu=new Map,fp=new Set;function $l(t,e){let n=xu.get(t);return n||(n=e(),xu.set(t,n),fp.add(n)),n}const il=(t,e,n)=>{const s=Mi(e,n);s!==void 0&&t.add(s)};class C_{constructor(e){this._config=M_(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=cp(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),up(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return $l(e,()=>[[\`datasets.\${e}\`,""]])}datasetAnimationScopeKeys(e,n){return $l(\`\${e}.transition.\${n}\`,()=>[[\`datasets.\${e}.transitions.\${n}\`,\`transitions.\${n}\`],[\`datasets.\${e}\`,""]])}datasetElementScopeKeys(e,n){return $l(\`\${e}-\${n}\`,()=>[[\`datasets.\${e}.elements.\${n}\`,\`datasets.\${e}\`,\`elements.\${n}\`,""]])}pluginScopeKeys(e){const n=e.id,s=this.type;return $l(\`\${s}-plugin-\${n}\`,()=>[[\`plugins.\${n}\`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const s=this._scopeCache;let i=s.get(e);return(!i||n)&&(i=new Map,s.set(e,i)),i}getOptionScopes(e,n,s){const{options:i,type:l}=this,o=this._cachedScopes(e,s),r=o.get(n);if(r)return r;const u=new Set;n.forEach(h=>{e&&(u.add(e),h.forEach(p=>il(u,e,p))),h.forEach(p=>il(u,i,p)),h.forEach(p=>il(u,Ci[l]||{},p)),h.forEach(p=>il(u,Sn,p)),h.forEach(p=>il(u,Tr,p))});const f=Array.from(u);return f.length===0&&f.push(Object.create(null)),fp.has(n)&&o.set(n,f),f}chartOptionScopes(){const{options:e,type:n}=this;return[e,Ci[n]||{},Sn.datasets[n]||{},{type:n},Sn,Tr]}resolveNamedOptions(e,n,s,i=[""]){const l={$shared:!0},{resolver:o,subPrefixes:r}=Ru(this._resolverCache,e,i);let u=o;if(A_(o,n)){l.$shared=!1,s=fi(s)?s():s;const f=this.createResolver(e,s,r);u=qi(o,s,f)}for(const f of n)l[f]=u[f];return l}createResolver(e,n,s=[""],i){const{resolver:l}=Ru(this._resolverCache,e,s);return Tt(n)?qi(l,n,void 0,i):l}}function Ru(t,e,n){let s=t.get(e);s||(s=new Map,t.set(e,s));const i=n.join();let l=s.get(i);return l||(l={resolver:ea(e,n),subPrefixes:n.filter(r=>!r.toLowerCase().includes("hover"))},s.set(i,l)),l}const P_=t=>Tt(t)&&Object.getOwnPropertyNames(t).some(e=>fi(t[e]));function A_(t,e){const{isScriptable:n,isIndexable:s}=Xd(t);for(const i of e){const l=n(i),o=s(i),r=(o||l)&&t[i];if(l&&(fi(r)||P_(r))||o&&On(r))return!0}return!1}var O_="4.5.0";const x_=["top","bottom","left","right","chartArea"];function Du(t,e){return t==="top"||t==="bottom"||x_.indexOf(t)===-1&&e==="x"}function Lu(t,e){return function(n,s){return n[t]===s[t]?n[e]-s[e]:n[t]-s[t]}}function Hu(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),rn(n&&n.onComplete,[t],e)}function R_(t){const e=t.chart,n=e.options.animation;rn(n&&n.onProgress,[t],e)}function hp(t){return sa()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const uo={},Iu=t=>{const e=hp(t);return Object.values(uo).filter(n=>n.canvas===e).pop()};function D_(t,e,n){const s=Object.keys(t);for(const i of s){const l=+i;if(l>=e){const o=t[i];delete t[i],(n>0||l>e)&&(t[l+n]=o)}}}function L_(t,e,n,s){return!n||t.type==="mouseout"?null:s?e:t}let pi=class{static defaults=Sn;static instances=uo;static overrides=Ci;static registry=Hs;static version=O_;static getChart=Iu;static register(...e){Hs.add(...e),Bu()}static unregister(...e){Hs.remove(...e),Bu()}constructor(e,n){const s=this.config=new C_(n),i=hp(e),l=Iu(i);if(l)throw new Error("Canvas is already in use. Chart with ID '"+l.id+"' must be destroyed before the canvas with ID '"+l.canvas.id+"' can be reused.");const o=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||Qb(i)),this.platform.updateConfig(s);const r=this.platform.acquireContext(i,o.aspectRatio),u=r&&r.canvas,f=u&&u.height,h=u&&u.width;if(this.id=Mm(),this.ctx=r,this.canvas=u,this.width=h,this.height=f,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new m_,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=qm(p=>this.update(p),o.resizeDelay||0),this._dataChanges=[],uo[this.id]=this,!r||!u){console.error("Failed to create chart: can't acquire context from the given item");return}Us.listen(this,"complete",Hu),Us.listen(this,"progress",R_),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:s,height:i,_aspectRatio:l}=this;return Dt(e)?n&&l?l:i?s/i:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return Hs}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():lu(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return nu(this.canvas,this.ctx),this}stop(){return Us.stop(this),this}resize(e,n){Us.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const s=this.options,i=this.canvas,l=s.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(i,e,n,l),r=s.devicePixelRatio||this.platform.getDevicePixelRatio(),u=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,lu(this,r,!0)&&(this.notifyPlugins("resize",{size:o}),rn(s.onResize,[this,o],this),this.attached&&this._doResize(u)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Ft(n,(s,i)=>{s.id=i})}buildOrUpdateScales(){const e=this.options,n=e.scales,s=this.scales,i=Object.keys(s).reduce((o,r)=>(o[r]=!1,o),{});let l=[];n&&(l=l.concat(Object.keys(n).map(o=>{const r=n[o],u=Pr(o,r),f=u==="r",h=u==="x";return{options:r,dposition:f?"chartArea":h?"bottom":"left",dtype:f?"radialLinear":h?"category":"linear"}}))),Ft(l,o=>{const r=o.options,u=r.id,f=Pr(u,r),h=dt(r.type,o.dtype);(r.position===void 0||Du(r.position,f)!==Du(o.dposition))&&(r.position=o.dposition),i[u]=!0;let p=null;if(u in s&&s[u].type===h)p=s[u];else{const g=Hs.getScale(h);p=new g({id:u,type:h,ctx:this.ctx,chart:this}),s[p.id]=p}p.init(r,e)}),Ft(i,(o,r)=>{o||delete s[r]}),Ft(s,o=>{ks.configure(this,o,o.options),ks.addBox(this,o)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,s=e.length;if(e.sort((i,l)=>i.index-l.index),s>n){for(let i=n;i<s;++i)this._destroyDatasetMeta(i);e.splice(n,s-n)}this._sortedMetasets=e.slice(0).sort(Lu("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((s,i)=>{n.filter(l=>l===s._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let s,i;for(this._removeUnreferencedMetasets(),s=0,i=n.length;s<i;s++){const l=n[s];let o=this.getDatasetMeta(s);const r=l.type||this.config.type;if(o.type&&o.type!==r&&(this._destroyDatasetMeta(s),o=this.getDatasetMeta(s)),o.type=r,o.indexAxis=l.indexAxis||Cr(r,this.options),o.order=l.order||0,o.index=s,o.label=""+l.label,o.visible=this.isDatasetVisible(s),o.controller)o.controller.updateIndex(s),o.controller.linkScales();else{const u=Hs.getController(r),{datasetElementType:f,dataElementType:h}=Sn.datasets[r];Object.assign(u,{dataElementType:Hs.getElement(h),datasetElementType:f&&Hs.getElement(f)}),o.controller=new u(this,s),e.push(o.controller)}}return this._updateMetasets(),e}_resetElements(){Ft(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const s=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const l=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let f=0,h=this.data.datasets.length;f<h;f++){const{controller:p}=this.getDatasetMeta(f),g=!i&&l.indexOf(p)===-1;p.buildOrUpdateElements(g),o=Math.max(+p.getMaxOverflow(),o)}o=this._minPadding=s.layout.autoPadding?o:0,this._updateLayout(o),i||Ft(l,f=>{f.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(Lu("z","_idx"));const{_active:r,_lastEvent:u}=this;u?this._eventHandler(u,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){Ft(this.scales,e=>{ks.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),s=new Set(e.events);(!Ga(n,s)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:s,start:i,count:l}of n){const o=s==="_removeElements"?-l:l;D_(e,i,o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,s=l=>new Set(e.filter(o=>o[0]===l).map((o,r)=>r+","+o.splice(1).join(","))),i=s(0);for(let l=1;l<n;l++)if(!Ga(i,s(l)))return;return Array.from(i).map(l=>l.split(",")).map(l=>({method:l[1],start:+l[2],count:+l[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;ks.update(this,this.width,this.height,e);const n=this.chartArea,s=n.width<=0||n.height<=0;this._layers=[],Ft(this.boxes,i=>{s&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,l)=>{i._idx=l}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,s=this.data.datasets.length;n<s;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,s=this.data.datasets.length;n<s;++n)this._updateDataset(n,fi(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const s=this.getDatasetMeta(e),i={meta:s,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(s.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Us.has(this)?this.attached&&!Us.running(this)&&Us.start(this):(this.draw(),Hu({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:s,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(s,i)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const n=this._sortedMetasets,s=[];let i,l;for(i=0,l=n.length;i<l;++i){const o=n[i];(!e||o.visible)&&s.push(o)}return s}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,s={meta:e,index:e.index,cancelable:!0},i=Z1(this,e);this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(i&&Zr(n,i),e.controller.draw(),i&&Qr(n),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(e){return Ml(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,s,i){const l=xb.modes[n];return typeof l=="function"?l(this,e,s,i):[]}getDatasetMeta(e){const n=this.data.datasets[e],s=this._metasets;let i=s.filter(l=>l&&l._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},s.push(i)),i}getContext(){return this.$context||(this.$context=Oi(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const s=this.getDatasetMeta(e);return typeof s.hidden=="boolean"?!s.hidden:!n.hidden}setDatasetVisibility(e,n){const s=this.getDatasetMeta(e);s.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,s){const i=s?"show":"hide",l=this.getDatasetMeta(e),o=l.controller._resolveAnimations(void 0,i);Sl(n)?(l.data[n].hidden=!s,this.update()):(this.setDatasetVisibility(e,s),o.update(l,{visible:s}),this.update(r=>r.datasetIndex===e?i:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),Us.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),nu(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete uo[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,n=this.platform,s=(l,o)=>{n.addEventListener(this,l,o),e[l]=o},i=(l,o,r)=>{l.offsetX=o,l.offsetY=r,this._eventHandler(l)};Ft(this.options.events,l=>s(l,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,s=(u,f)=>{n.addEventListener(this,u,f),e[u]=f},i=(u,f)=>{e[u]&&(n.removeEventListener(this,u,f),delete e[u])},l=(u,f)=>{this.canvas&&this.resize(u,f)};let o;const r=()=>{i("attach",r),this.attached=!0,this.resize(),s("resize",l),s("detach",o)};o=()=>{this.attached=!1,i("resize",l),this._stop(),this._resize(0,0),s("attach",r)},n.isAttached(this.canvas)?r():o()}unbindEvents(){Ft(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},Ft(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,s){const i=s?"set":"remove";let l,o,r,u;for(n==="dataset"&&(l=this.getDatasetMeta(e[0].datasetIndex),l.controller["_"+i+"DatasetHoverStyle"]()),r=0,u=e.length;r<u;++r){o=e[r];const f=o&&this.getDatasetMeta(o.datasetIndex).controller;f&&f[i+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],s=e.map(({datasetIndex:l,index:o})=>{const r=this.getDatasetMeta(l);if(!r)throw new Error("No dataset found at index "+l);return{datasetIndex:l,element:r.data[o],index:o}});!mo(s,n)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,n))}notifyPlugins(e,n,s){return this._plugins.notify(this,e,n,s)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,s){const i=this.options.hover,l=(u,f)=>u.filter(h=>!f.some(p=>h.datasetIndex===p.datasetIndex&&h.index===p.index)),o=l(n,e),r=s?e:l(e,n);o.length&&this.updateHoverStyle(o,i.mode,!1),r.length&&i.mode&&this.updateHoverStyle(r,i.mode,!0)}_eventHandler(e,n){const s={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},i=o=>(o.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",s,i)===!1)return;const l=this._handleEvent(e,n,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,i),(l||s.changed)&&this.render(),this}_handleEvent(e,n,s){const{_active:i=[],options:l}=this,o=n,r=this._getActiveElements(e,i,s,o),u=Rm(e),f=L_(e,this._lastEvent,s,u);s&&(this._lastEvent=null,rn(l.onHover,[e,r,this],this),u&&rn(l.onClick,[e,r,this],this));const h=!mo(r,i);return(h||n)&&(this._active=r,this._updateHoverStyles(r,i,n)),this._lastEvent=f,h}_getActiveElements(e,n,s,i){if(e.type==="mouseout")return[];if(!s)return n;const l=this.options.hover;return this.getElementsAtEventForMode(e,l.mode,l,i)}};function Bu(){return Ft(pi.instances,t=>t._plugins.invalidate())}function H_(t,e,n){const{startAngle:s,x:i,y:l,outerRadius:o,innerRadius:r,options:u}=e,{borderWidth:f,borderJoinStyle:h}=u,p=Math.min(f/o,Ms(s-n));if(t.beginPath(),t.arc(i,l,o-f/2,s+p/2,n-p/2),r>0){const g=Math.min(f/r,Ms(s-n));t.arc(i,l,r+f/2,n-g/2,s+g/2,!0)}else{const g=Math.min(f/2,o*Ms(s-n));if(h==="round")t.arc(i,l,g,n-Nt/2,s+Nt/2,!0);else if(h==="bevel"){const m=2*g*g,_=-m*Math.cos(n+Nt/2)+i,b=-m*Math.sin(n+Nt/2)+l,k=m*Math.cos(s+Nt/2)+i,v=m*Math.sin(s+Nt/2)+l;t.lineTo(_,b),t.lineTo(k,v)}}t.closePath(),t.moveTo(0,0),t.rect(0,0,t.canvas.width,t.canvas.height),t.clip("evenodd")}function I_(t,e,n){const{startAngle:s,pixelMargin:i,x:l,y:o,outerRadius:r,innerRadius:u}=e;let f=i/r;t.beginPath(),t.arc(l,o,r,s-f,n+f),u>i?(f=i/u,t.arc(l,o,u,n+f,s-f,!0)):t.arc(l,o,i,n+xn,s-xn),t.closePath(),t.clip()}function B_(t){return $r(t,["outerStart","outerEnd","innerStart","innerEnd"])}function F_(t,e,n,s){const i=B_(t.options.borderRadius),l=(n-e)/2,o=Math.min(l,s*e/2),r=u=>{const f=(n-Math.min(l,u))*s/2;return Zn(u,0,Math.min(l,f))};return{outerStart:r(i.outerStart),outerEnd:r(i.outerEnd),innerStart:Zn(i.innerStart,0,o),innerEnd:Zn(i.innerEnd,0,o)}}function Ii(t,e,n,s){return{x:n+t*Math.cos(e),y:s+t*Math.sin(e)}}function ko(t,e,n,s,i,l){const{x:o,y:r,startAngle:u,pixelMargin:f,innerRadius:h}=e,p=Math.max(e.outerRadius+s+n-f,0),g=h>0?h+s+n+f:0;let m=0;const _=i-u;if(s){const z=h>0?h-s:0,B=p>0?p-s:0,j=(z+B)/2,F=j!==0?_*j/(j+s):_;m=(_-F)/2}const b=Math.max(.001,_*p-n/Nt)/p,k=(_-b)/2,v=u+k+m,y=i-k-m,{outerStart:S,outerEnd:C,innerStart:T,innerEnd:O}=F_(e,g,p,y-v),A=p-S,x=p-C,P=v+S/A,D=y-C/x,I=g+T,R=g+O,U=v+T/I,N=y-O/R;if(t.beginPath(),l){const z=(P+D)/2;if(t.arc(o,r,p,P,z),t.arc(o,r,p,z,D),C>0){const W=Ii(x,D,o,r);t.arc(W.x,W.y,C,D,y+xn)}const B=Ii(R,y,o,r);if(t.lineTo(B.x,B.y),O>0){const W=Ii(R,N,o,r);t.arc(W.x,W.y,O,y+xn,N+Math.PI)}const j=(y-O/g+(v+T/g))/2;if(t.arc(o,r,g,y-O/g,j,!0),t.arc(o,r,g,j,v+T/g,!0),T>0){const W=Ii(I,U,o,r);t.arc(W.x,W.y,T,U+Math.PI,v-xn)}const F=Ii(A,v,o,r);if(t.lineTo(F.x,F.y),S>0){const W=Ii(A,P,o,r);t.arc(W.x,W.y,S,v-xn,P)}}else{t.moveTo(o,r);const z=Math.cos(P)*p+o,B=Math.sin(P)*p+r;t.lineTo(z,B);const j=Math.cos(D)*p+o,F=Math.sin(D)*p+r;t.lineTo(j,F)}t.closePath()}function N_(t,e,n,s,i){const{fullCircles:l,startAngle:o,circumference:r}=e;let u=e.endAngle;if(l){ko(t,e,n,s,u,i);for(let f=0;f<l;++f)t.fill();isNaN(r)||(u=o+(r%yn||yn))}return ko(t,e,n,s,u,i),t.fill(),u}function j_(t,e,n,s,i){const{fullCircles:l,startAngle:o,circumference:r,options:u}=e,{borderWidth:f,borderJoinStyle:h,borderDash:p,borderDashOffset:g,borderRadius:m}=u,_=u.borderAlign==="inner";if(!f)return;t.setLineDash(p||[]),t.lineDashOffset=g,_?(t.lineWidth=f*2,t.lineJoin=h||"round"):(t.lineWidth=f,t.lineJoin=h||"bevel");let b=e.endAngle;if(l){ko(t,e,n,s,b,i);for(let k=0;k<l;++k)t.stroke();isNaN(r)||(b=o+(r%yn||yn))}_&&I_(t,e,b),u.selfJoin&&b-o>=Nt&&m===0&&h!=="miter"&&H_(t,e,b),l||(ko(t,e,n,s,b,i),t.stroke())}class z_ extends Ks{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,n,s){const i=this.getProps(["x","y"],s),{angle:l,distance:o}=Nd(i,{x:e,y:n}),{startAngle:r,endAngle:u,innerRadius:f,outerRadius:h,circumference:p}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),g=(this.options.spacing+this.options.borderWidth)/2,m=dt(p,u-r),_=Tl(l,r,u)&&r!==u,b=m>=yn||_,k=ii(o,f+g,h+g);return b&&k}getCenterPoint(e){const{x:n,y:s,startAngle:i,endAngle:l,innerRadius:o,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:u,spacing:f}=this.options,h=(i+l)/2,p=(o+r+f+u)/2;return{x:n+Math.cos(h)*p,y:s+Math.sin(h)*p}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:n,circumference:s}=this,i=(n.offset||0)/4,l=(n.spacing||0)/2,o=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=s>yn?Math.floor(s/yn):0,s===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const r=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(r)*i,Math.sin(r)*i);const u=1-Math.sin(Math.min(Nt,s||0)),f=i*u;e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,N_(e,this,f,l,o),j_(e,this,f,l,o),e.restore()}}function dp(t,e,n=e){t.lineCap=dt(n.borderCapStyle,e.borderCapStyle),t.setLineDash(dt(n.borderDash,e.borderDash)),t.lineDashOffset=dt(n.borderDashOffset,e.borderDashOffset),t.lineJoin=dt(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=dt(n.borderWidth,e.borderWidth),t.strokeStyle=dt(n.borderColor,e.borderColor)}function U_(t,e,n){t.lineTo(n.x,n.y)}function V_(t){return t.stepped?l1:t.tension||t.cubicInterpolationMode==="monotone"?o1:U_}function pp(t,e,n={}){const s=t.length,{start:i=0,end:l=s-1}=n,{start:o,end:r}=e,u=Math.max(i,o),f=Math.min(l,r),h=i<o&&l<o||i>r&&l>r;return{count:s,start:u,loop:e.loop,ilen:f<u&&!h?s+f-u:f-u}}function W_(t,e,n,s){const{points:i,options:l}=e,{count:o,start:r,loop:u,ilen:f}=pp(i,n,s),h=V_(l);let{move:p=!0,reverse:g}=s||{},m,_,b;for(m=0;m<=f;++m)_=i[(r+(g?f-m:m))%o],!_.skip&&(p?(t.moveTo(_.x,_.y),p=!1):h(t,b,_,g,l.stepped),b=_);return u&&(_=i[(r+(g?f:0))%o],h(t,b,_,g,l.stepped)),!!u}function q_(t,e,n,s){const i=e.points,{count:l,start:o,ilen:r}=pp(i,n,s),{move:u=!0,reverse:f}=s||{};let h=0,p=0,g,m,_,b,k,v;const y=C=>(o+(f?r-C:C))%l,S=()=>{b!==k&&(t.lineTo(h,k),t.lineTo(h,b),t.lineTo(h,v))};for(u&&(m=i[y(0)],t.moveTo(m.x,m.y)),g=0;g<=r;++g){if(m=i[y(g)],m.skip)continue;const C=m.x,T=m.y,O=C|0;O===_?(T<b?b=T:T>k&&(k=T),h=(p*h+C)/++p):(S(),t.lineTo(C,T),_=O,p=0,b=k=T),v=T}S()}function Ar(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?q_:W_}function G_(t){return t.stepped?F1:t.tension||t.cubicInterpolationMode==="monotone"?N1:wi}function X_(t,e,n,s){let i=e._path;i||(i=e._path=new Path2D,e.path(i,n,s)&&i.closePath()),dp(t,e.options),t.stroke(i)}function Y_(t,e,n,s){const{segments:i,options:l}=e,o=Ar(e);for(const r of i)dp(t,l,r.style),t.beginPath(),o(t,e,r,{start:n,end:n+s-1})&&t.closePath(),t.stroke()}const J_=typeof Path2D=="function";function K_(t,e,n,s){J_&&!e.options.segment?X_(t,e,n,s):Y_(t,e,n,s)}class Z_ extends Ks{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"};constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,n){const s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){const i=s.spanGaps?this._loop:this._fullLoop;O1(this._points,s,e,i,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=X1(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,s=e.length;return s&&n[e[s-1].end]}interpolate(e,n){const s=this.options,i=e[n],l=this.points,o=W1(this,{property:n,start:i,end:i});if(!o.length)return;const r=[],u=G_(s);let f,h;for(f=0,h=o.length;f<h;++f){const{start:p,end:g}=o[f],m=l[p],_=l[g];if(m===_){r.push(m);continue}const b=Math.abs((i-m[n])/(_[n]-m[n])),k=u(m,_,b,s.stepped);k[n]=e[n],r.push(k)}return r.length===1?r[0]:r}pathSegment(e,n,s){return Ar(this)(e,this,n,s)}path(e,n,s){const i=this.segments,l=Ar(this);let o=this._loop;n=n||0,s=s||this.points.length-n;for(const r of i)o&=l(e,this,r,{start:n,end:n+s-1});return!!o}draw(e,n,s,i){const l=this.options||{};(this.points||[]).length&&l.borderWidth&&(e.save(),K_(e,this,s,i),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Fu(t,e,n,s){const i=t.options,{[n]:l}=t.getProps([n],s);return Math.abs(e-l)<i.radius+i.hitRadius}class Q_ extends Ks{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,n,s){const i=this.options,{x:l,y:o}=this.getProps(["x","y"],s);return Math.pow(e-l,2)+Math.pow(n-o,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(e,n){return Fu(this,e,"x",n)}inYRange(e,n){return Fu(this,e,"y",n)}getCenterPoint(e){const{x:n,y:s}=this.getProps(["x","y"],e);return{x:n,y:s}}size(e){e=e||this.options||{};let n=e.radius||0;n=Math.max(n,n&&e.hoverRadius||0);const s=n&&e.borderWidth||0;return(n+s)*2}draw(e,n){const s=this.options;this.skip||s.radius<.1||!Ml(this,n,this.size(s)/2)||(e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.fillStyle=s.backgroundColor,Mr(e,s,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}function gp(t,e){const{x:n,y:s,base:i,width:l,height:o}=t.getProps(["x","y","base","width","height"],e);let r,u,f,h,p;return t.horizontal?(p=o/2,r=Math.min(n,i),u=Math.max(n,i),f=s-p,h=s+p):(p=l/2,r=n-p,u=n+p,f=Math.min(s,i),h=Math.max(s,i)),{left:r,top:f,right:u,bottom:h}}function li(t,e,n,s){return t?0:Zn(e,n,s)}function $_(t,e,n){const s=t.options.borderWidth,i=t.borderSkipped,l=Gd(s);return{t:li(i.top,l.top,0,n),r:li(i.right,l.right,0,e),b:li(i.bottom,l.bottom,0,n),l:li(i.left,l.left,0,e)}}function e2(t,e,n){const{enableBorderRadius:s}=t.getProps(["enableBorderRadius"]),i=t.options.borderRadius,l=Ni(i),o=Math.min(e,n),r=t.borderSkipped,u=s||Tt(i);return{topLeft:li(!u||r.top||r.left,l.topLeft,0,o),topRight:li(!u||r.top||r.right,l.topRight,0,o),bottomLeft:li(!u||r.bottom||r.left,l.bottomLeft,0,o),bottomRight:li(!u||r.bottom||r.right,l.bottomRight,0,o)}}function t2(t){const e=gp(t),n=e.right-e.left,s=e.bottom-e.top,i=$_(t,n/2,s/2),l=e2(t,n/2,s/2);return{outer:{x:e.left,y:e.top,w:n,h:s,radius:l},inner:{x:e.left+i.l,y:e.top+i.t,w:n-i.l-i.r,h:s-i.t-i.b,radius:{topLeft:Math.max(0,l.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,l.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,l.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,l.bottomRight-Math.max(i.b,i.r))}}}}function ir(t,e,n,s){const i=e===null,l=n===null,r=t&&!(i&&l)&&gp(t,s);return r&&(i||ii(e,r.left,r.right))&&(l||ii(n,r.top,r.bottom))}function n2(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function s2(t,e){t.rect(e.x,e.y,e.w,e.h)}function lr(t,e,n={}){const s=t.x!==n.x?-e:0,i=t.y!==n.y?-e:0,l=(t.x+t.w!==n.x+n.w?e:0)-s,o=(t.y+t.h!==n.y+n.h?e:0)-i;return{x:t.x+s,y:t.y+i,w:t.w+l,h:t.h+o,radius:t.radius}}class i2 extends Ks{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:n,options:{borderColor:s,backgroundColor:i}}=this,{inner:l,outer:o}=t2(this),r=n2(o.radius)?vo:s2;e.save(),(o.w!==l.w||o.h!==l.h)&&(e.beginPath(),r(e,lr(o,n,l)),e.clip(),r(e,lr(l,-n,o)),e.fillStyle=s,e.fill("evenodd")),e.beginPath(),r(e,lr(l,n)),e.fillStyle=i,e.fill(),e.restore()}inRange(e,n,s){return ir(this,e,n,s)}inXRange(e,n){return ir(this,e,null,n)}inYRange(e,n){return ir(this,null,e,n)}getCenterPoint(e){const{x:n,y:s,base:i,horizontal:l}=this.getProps(["x","y","base","horizontal"],e);return{x:l?(n+i)/2:n,y:l?s:(s+i)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}const Nu=(t,e)=>{let{boxHeight:n=e,boxWidth:s=e}=t;return t.usePointStyle&&(n=Math.min(n,e),s=t.pointStyleWidth||Math.min(s,e)),{boxWidth:s,boxHeight:n,itemHeight:Math.max(e,n)}},l2=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class ju extends Ks{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n,s){this.maxWidth=e,this.maxHeight=n,this._margins=s,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let n=rn(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(s=>e.filter(s,this.chart.data))),e.sort&&(n=n.sort((s,i)=>e.sort(s,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const s=e.labels,i=Qn(s.font),l=i.size,o=this._computeTitleHeight(),{boxWidth:r,itemHeight:u}=Nu(s,l);let f,h;n.font=i.string,this.isHorizontal()?(f=this.maxWidth,h=this._fitRows(o,l,r,u)+10):(h=this.maxHeight,f=this._fitCols(o,i,r,u)+10),this.width=Math.min(f,e.maxWidth||this.maxWidth),this.height=Math.min(h,e.maxHeight||this.maxHeight)}_fitRows(e,n,s,i){const{ctx:l,maxWidth:o,options:{labels:{padding:r}}}=this,u=this.legendHitBoxes=[],f=this.lineWidths=[0],h=i+r;let p=e;l.textAlign="left",l.textBaseline="middle";let g=-1,m=-h;return this.legendItems.forEach((_,b)=>{const k=s+n/2+l.measureText(_.text).width;(b===0||f[f.length-1]+k+2*r>o)&&(p+=h,f[f.length-(b>0?0:1)]=0,m+=h,g++),u[b]={left:0,top:m,row:g,width:k,height:i},f[f.length-1]+=k+r}),p}_fitCols(e,n,s,i){const{ctx:l,maxHeight:o,options:{labels:{padding:r}}}=this,u=this.legendHitBoxes=[],f=this.columnSizes=[],h=o-e;let p=r,g=0,m=0,_=0,b=0;return this.legendItems.forEach((k,v)=>{const{itemWidth:y,itemHeight:S}=o2(s,n,l,k,i);v>0&&m+S+2*r>h&&(p+=g+r,f.push({width:g,height:m}),_+=g+r,b++,g=m=0),u[v]={left:_,top:m,col:b,width:y,height:S},g=Math.max(g,y),m+=S+r}),p+=g,f.push({width:g,height:m}),p}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:s,labels:{padding:i},rtl:l}}=this,o=ji(l,this.left,this.width);if(this.isHorizontal()){let r=0,u=Yn(s,this.left+i,this.right-this.lineWidths[r]);for(const f of n)r!==f.row&&(r=f.row,u=Yn(s,this.left+i,this.right-this.lineWidths[r])),f.top+=this.top+e+i,f.left=o.leftForLtr(o.x(u),f.width),u+=f.width+i}else{let r=0,u=Yn(s,this.top+e+i,this.bottom-this.columnSizes[r].height);for(const f of n)f.col!==r&&(r=f.col,u=Yn(s,this.top+e+i,this.bottom-this.columnSizes[r].height)),f.top=u,f.left+=this.left+i,f.left=o.leftForLtr(o.x(f.left),f.width),u+=f.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;Zr(e,this),this._draw(),Qr(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:s,ctx:i}=this,{align:l,labels:o}=e,r=Sn.color,u=ji(e.rtl,this.left,this.width),f=Qn(o.font),{padding:h}=o,p=f.size,g=p/2;let m;this.drawTitle(),i.textAlign=u.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=f.string;const{boxWidth:_,boxHeight:b,itemHeight:k}=Nu(o,p),v=function(O,A,x){if(isNaN(_)||_<=0||isNaN(b)||b<0)return;i.save();const P=dt(x.lineWidth,1);if(i.fillStyle=dt(x.fillStyle,r),i.lineCap=dt(x.lineCap,"butt"),i.lineDashOffset=dt(x.lineDashOffset,0),i.lineJoin=dt(x.lineJoin,"miter"),i.lineWidth=P,i.strokeStyle=dt(x.strokeStyle,r),i.setLineDash(dt(x.lineDash,[])),o.usePointStyle){const D={radius:b*Math.SQRT2/2,pointStyle:x.pointStyle,rotation:x.rotation,borderWidth:P},I=u.xPlus(O,_/2),R=A+g;qd(i,D,I,R,o.pointStyleWidth&&_)}else{const D=A+Math.max((p-b)/2,0),I=u.leftForLtr(O,_),R=Ni(x.borderRadius);i.beginPath(),Object.values(R).some(U=>U!==0)?vo(i,{x:I,y:D,w:_,h:b,radius:R}):i.rect(I,D,_,b),i.fill(),P!==0&&i.stroke()}i.restore()},y=function(O,A,x){Cl(i,x.text,O,A+k/2,f,{strikethrough:x.hidden,textAlign:u.textAlign(x.textAlign)})},S=this.isHorizontal(),C=this._computeTitleHeight();S?m={x:Yn(l,this.left+h,this.right-s[0]),y:this.top+h+C,line:0}:m={x:this.left+h,y:Yn(l,this.top+C+h,this.bottom-n[0].height),line:0},Qd(this.ctx,e.textDirection);const T=k+h;this.legendItems.forEach((O,A)=>{i.strokeStyle=O.fontColor,i.fillStyle=O.fontColor;const x=i.measureText(O.text).width,P=u.textAlign(O.textAlign||(O.textAlign=o.textAlign)),D=_+g+x;let I=m.x,R=m.y;u.setWidth(this.width),S?A>0&&I+D+h>this.right&&(R=m.y+=T,m.line++,I=m.x=Yn(l,this.left+h,this.right-s[m.line])):A>0&&R+T>this.bottom&&(I=m.x=I+n[m.line].width+h,m.line++,R=m.y=Yn(l,this.top+C+h,this.bottom-n[m.line].height));const U=u.x(I);if(v(U,R,O),I=Gm(P,I+_+g,S?I+D:this.right,e.rtl),y(u.x(I),R,O),S)m.x+=D+h;else if(typeof O.text!="string"){const N=f.lineHeight;m.y+=mp(O,N)+h}else m.y+=T}),$d(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,s=Qn(n.font),i=Ts(n.padding);if(!n.display)return;const l=ji(e.rtl,this.left,this.width),o=this.ctx,r=n.position,u=s.size/2,f=i.top+u;let h,p=this.left,g=this.width;if(this.isHorizontal())g=Math.max(...this.lineWidths),h=this.top+f,p=Yn(e.align,p,this.right-g);else{const _=this.columnSizes.reduce((b,k)=>Math.max(b,k.height),0);h=f+Yn(e.align,this.top,this.bottom-_-e.labels.padding-this._computeTitleHeight())}const m=Yn(r,p,p+g);o.textAlign=l.textAlign(Yr(r)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=s.string,Cl(o,n.text,m,h,s)}_computeTitleHeight(){const e=this.options.title,n=Qn(e.font),s=Ts(e.padding);return e.display?n.lineHeight+s.height:0}_getLegendItemAt(e,n){let s,i,l;if(ii(e,this.left,this.right)&&ii(n,this.top,this.bottom)){for(l=this.legendHitBoxes,s=0;s<l.length;++s)if(i=l[s],ii(e,i.left,i.left+i.width)&&ii(n,i.top,i.top+i.height))return this.legendItems[s]}return null}handleEvent(e){const n=this.options;if(!u2(e.type,n))return;const s=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const i=this._hoveredItem,l=l2(i,s);i&&!l&&rn(n.onLeave,[e,i,this],this),this._hoveredItem=s,s&&!l&&rn(n.onHover,[e,s,this],this)}else s&&rn(n.onClick,[e,s,this],this)}}function o2(t,e,n,s,i){const l=r2(s,t,e,n),o=a2(i,s,e.lineHeight);return{itemWidth:l,itemHeight:o}}function r2(t,e,n,s){let i=t.text;return i&&typeof i!="string"&&(i=i.reduce((l,o)=>l.length>o.length?l:o)),e+n.size/2+s.measureText(i).width}function a2(t,e,n){let s=t;return typeof e.text!="string"&&(s=mp(e,n)),s}function mp(t,e){const n=t.text?t.text.length:0;return e*n}function u2(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var oa={id:"legend",_element:ju,start(t,e,n){const s=t.legend=new ju({ctx:t.ctx,options:n,chart:t});ks.configure(t,s,n),ks.addBox(t,s)},stop(t){ks.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const s=t.legend;ks.configure(t,s,n),s.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const s=e.datasetIndex,i=n.chart;i.isDatasetVisible(s)?(i.hide(s),e.hidden=!0):(i.show(s),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:s,textAlign:i,color:l,useBorderRadius:o,borderRadius:r}}=t.legend.options;return t._getSortedDatasetMetas().map(u=>{const f=u.controller.getStyle(n?0:void 0),h=Ts(f.borderWidth);return{text:e[u.index].label,fillStyle:f.backgroundColor,fontColor:l,hidden:!u.visible,lineCap:f.borderCapStyle,lineDash:f.borderDash,lineDashOffset:f.borderDashOffset,lineJoin:f.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:f.borderColor,pointStyle:s||f.pointStyle,rotation:f.rotation,textAlign:i||f.textAlign,borderRadius:o&&(r||f.borderRadius),datasetIndex:u.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class bp extends Ks{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n){const s=this.options;if(this.left=0,this.top=0,!s.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;const i=On(s.text)?s.text.length:1;this._padding=Ts(s.padding);const l=i*Qn(s.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=l:this.width=l}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:s,bottom:i,right:l,options:o}=this,r=o.align;let u=0,f,h,p;return this.isHorizontal()?(h=Yn(r,s,l),p=n+e,f=l-s):(o.position==="left"?(h=s+e,p=Yn(r,i,n),u=Nt*-.5):(h=l-e,p=Yn(r,n,i),u=Nt*.5),f=i-n),{titleX:h,titleY:p,maxWidth:f,rotation:u}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const s=Qn(n.font),l=s.lineHeight/2+this._padding.top,{titleX:o,titleY:r,maxWidth:u,rotation:f}=this._drawArgs(l);Cl(e,n.text,0,0,s,{color:n.color,maxWidth:u,rotation:f,textAlign:Yr(n.align),textBaseline:"middle",translation:[o,r]})}}function c2(t,e){const n=new bp({ctx:t.ctx,options:e,chart:t});ks.configure(t,n,e),ks.addBox(t,n),t.titleBlock=n}var f2={id:"title",_element:bp,start(t,e,n){c2(t,n)},stop(t){const e=t.titleBlock;ks.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const s=t.titleBlock;ks.configure(t,s,n),s.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const cl={average(t){if(!t.length)return!1;let e,n,s=new Set,i=0,l=0;for(e=0,n=t.length;e<n;++e){const r=t[e].element;if(r&&r.hasValue()){const u=r.tooltipPosition();s.add(u.x),i+=u.y,++l}}return l===0||s.size===0?!1:{x:[...s].reduce((r,u)=>r+u)/s.size,y:i/l}},nearest(t,e){if(!t.length)return!1;let n=e.x,s=e.y,i=Number.POSITIVE_INFINITY,l,o,r;for(l=0,o=t.length;l<o;++l){const u=t[l].element;if(u&&u.hasValue()){const f=u.getCenterPoint(),h=Er(e,f);h<i&&(i=h,r=u)}}if(r){const u=r.tooltipPosition();n=u.x,s=u.y}return{x:n,y:s}}};function Ls(t,e){return e&&(On(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Vs(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(\`
21212
- \`)>-1?t.split(\`
21213
- \`):t}function h2(t,e){const{element:n,datasetIndex:s,index:i}=e,l=t.getDatasetMeta(s).controller,{label:o,value:r}=l.getLabelAndValue(i);return{chart:t,label:o,parsed:l.getParsed(i),raw:t.data.datasets[s].data[i],formattedValue:r,dataset:l.getDataset(),dataIndex:i,datasetIndex:s,element:n}}function zu(t,e){const n=t.chart.ctx,{body:s,footer:i,title:l}=t,{boxWidth:o,boxHeight:r}=e,u=Qn(e.bodyFont),f=Qn(e.titleFont),h=Qn(e.footerFont),p=l.length,g=i.length,m=s.length,_=Ts(e.padding);let b=_.height,k=0,v=s.reduce((C,T)=>C+T.before.length+T.lines.length+T.after.length,0);if(v+=t.beforeBody.length+t.afterBody.length,p&&(b+=p*f.lineHeight+(p-1)*e.titleSpacing+e.titleMarginBottom),v){const C=e.displayColors?Math.max(r,u.lineHeight):u.lineHeight;b+=m*C+(v-m)*u.lineHeight+(v-1)*e.bodySpacing}g&&(b+=e.footerMarginTop+g*h.lineHeight+(g-1)*e.footerSpacing);let y=0;const S=function(C){k=Math.max(k,n.measureText(C).width+y)};return n.save(),n.font=f.string,Ft(t.title,S),n.font=u.string,Ft(t.beforeBody.concat(t.afterBody),S),y=e.displayColors?o+2+e.boxPadding:0,Ft(s,C=>{Ft(C.before,S),Ft(C.lines,S),Ft(C.after,S)}),y=0,n.font=h.string,Ft(t.footer,S),n.restore(),k+=_.width,{width:k,height:b}}function d2(t,e){const{y:n,height:s}=e;return n<s/2?"top":n>t.height-s/2?"bottom":"center"}function p2(t,e,n,s){const{x:i,width:l}=s,o=n.caretSize+n.caretPadding;if(t==="left"&&i+l+o>e.width||t==="right"&&i-l-o<0)return!0}function g2(t,e,n,s){const{x:i,width:l}=n,{width:o,chartArea:{left:r,right:u}}=t;let f="center";return s==="center"?f=i<=(r+u)/2?"left":"right":i<=l/2?f="left":i>=o-l/2&&(f="right"),p2(f,t,e,n)&&(f="center"),f}function Uu(t,e,n){const s=n.yAlign||e.yAlign||d2(t,n);return{xAlign:n.xAlign||e.xAlign||g2(t,e,n,s),yAlign:s}}function m2(t,e){let{x:n,width:s}=t;return e==="right"?n-=s:e==="center"&&(n-=s/2),n}function b2(t,e,n){let{y:s,height:i}=t;return e==="top"?s+=n:e==="bottom"?s-=i+n:s-=i/2,s}function Vu(t,e,n,s){const{caretSize:i,caretPadding:l,cornerRadius:o}=t,{xAlign:r,yAlign:u}=n,f=i+l,{topLeft:h,topRight:p,bottomLeft:g,bottomRight:m}=Ni(o);let _=m2(e,r);const b=b2(e,u,f);return u==="center"?r==="left"?_+=f:r==="right"&&(_-=f):r==="left"?_-=Math.max(h,g)+i:r==="right"&&(_+=Math.max(p,m)+i),{x:Zn(_,0,s.width-e.width),y:Zn(b,0,s.height-e.height)}}function eo(t,e,n){const s=Ts(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-s.right:t.x+s.left}function Wu(t){return Ls([],Vs(t))}function _2(t,e,n){return Oi(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function qu(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const _p={beforeTitle:zs,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,s=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(s>0&&e.dataIndex<s)return n[e.dataIndex]}return""},afterTitle:zs,beforeBody:zs,beforeLabel:zs,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return Dt(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:zs,afterBody:zs,beforeFooter:zs,footer:zs,afterFooter:zs};function hs(t,e,n,s){const i=t[e].call(n,s);return typeof i>"u"?_p[e].call(n,s):i}class Gu extends Ks{static positioners=cl;constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,s=this.options.setContext(this.getContext()),i=s.enabled&&n.options.animation&&s.animations,l=new tp(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(l)),l}getContext(){return this.$context||(this.$context=_2(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:s}=n,i=hs(s,"beforeTitle",this,e),l=hs(s,"title",this,e),o=hs(s,"afterTitle",this,e);let r=[];return r=Ls(r,Vs(i)),r=Ls(r,Vs(l)),r=Ls(r,Vs(o)),r}getBeforeBody(e,n){return Wu(hs(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:s}=n,i=[];return Ft(e,l=>{const o={before:[],lines:[],after:[]},r=qu(s,l);Ls(o.before,Vs(hs(r,"beforeLabel",this,l))),Ls(o.lines,hs(r,"label",this,l)),Ls(o.after,Vs(hs(r,"afterLabel",this,l))),i.push(o)}),i}getAfterBody(e,n){return Wu(hs(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:s}=n,i=hs(s,"beforeFooter",this,e),l=hs(s,"footer",this,e),o=hs(s,"afterFooter",this,e);let r=[];return r=Ls(r,Vs(i)),r=Ls(r,Vs(l)),r=Ls(r,Vs(o)),r}_createItems(e){const n=this._active,s=this.chart.data,i=[],l=[],o=[];let r=[],u,f;for(u=0,f=n.length;u<f;++u)r.push(h2(this.chart,n[u]));return e.filter&&(r=r.filter((h,p,g)=>e.filter(h,p,g,s))),e.itemSort&&(r=r.sort((h,p)=>e.itemSort(h,p,s))),Ft(r,h=>{const p=qu(e.callbacks,h);i.push(hs(p,"labelColor",this,h)),l.push(hs(p,"labelPointStyle",this,h)),o.push(hs(p,"labelTextColor",this,h))}),this.labelColors=i,this.labelPointStyles=l,this.labelTextColors=o,this.dataPoints=r,r}update(e,n){const s=this.options.setContext(this.getContext()),i=this._active;let l,o=[];if(!i.length)this.opacity!==0&&(l={opacity:0});else{const r=cl[s.position].call(this,i,this._eventPosition);o=this._createItems(s),this.title=this.getTitle(o,s),this.beforeBody=this.getBeforeBody(o,s),this.body=this.getBody(o,s),this.afterBody=this.getAfterBody(o,s),this.footer=this.getFooter(o,s);const u=this._size=zu(this,s),f=Object.assign({},r,u),h=Uu(this.chart,s,f),p=Vu(s,f,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,l={opacity:1,x:p.x,y:p.y,width:u.width,height:u.height,caretX:r.x,caretY:r.y}}this._tooltipItems=o,this.$context=void 0,l&&this._resolveAnimations().update(this,l),e&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,s,i){const l=this.getCaretPosition(e,s,i);n.lineTo(l.x1,l.y1),n.lineTo(l.x2,l.y2),n.lineTo(l.x3,l.y3)}getCaretPosition(e,n,s){const{xAlign:i,yAlign:l}=this,{caretSize:o,cornerRadius:r}=s,{topLeft:u,topRight:f,bottomLeft:h,bottomRight:p}=Ni(r),{x:g,y:m}=e,{width:_,height:b}=n;let k,v,y,S,C,T;return l==="center"?(C=m+b/2,i==="left"?(k=g,v=k-o,S=C+o,T=C-o):(k=g+_,v=k+o,S=C-o,T=C+o),y=k):(i==="left"?v=g+Math.max(u,h)+o:i==="right"?v=g+_-Math.max(f,p)-o:v=this.caretX,l==="top"?(S=m,C=S-o,k=v-o,y=v+o):(S=m+b,C=S+o,k=v+o,y=v-o),T=S),{x1:k,x2:v,x3:y,y1:S,y2:C,y3:T}}drawTitle(e,n,s){const i=this.title,l=i.length;let o,r,u;if(l){const f=ji(s.rtl,this.x,this.width);for(e.x=eo(this,s.titleAlign,s),n.textAlign=f.textAlign(s.titleAlign),n.textBaseline="middle",o=Qn(s.titleFont),r=s.titleSpacing,n.fillStyle=s.titleColor,n.font=o.string,u=0;u<l;++u)n.fillText(i[u],f.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+r,u+1===l&&(e.y+=s.titleMarginBottom-r)}}_drawColorBox(e,n,s,i,l){const o=this.labelColors[s],r=this.labelPointStyles[s],{boxHeight:u,boxWidth:f}=l,h=Qn(l.bodyFont),p=eo(this,"left",l),g=i.x(p),m=u<h.lineHeight?(h.lineHeight-u)/2:0,_=n.y+m;if(l.usePointStyle){const b={radius:Math.min(f,u)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},k=i.leftForLtr(g,f)+f/2,v=_+u/2;e.strokeStyle=l.multiKeyBackground,e.fillStyle=l.multiKeyBackground,Mr(e,b,k,v),e.strokeStyle=o.borderColor,e.fillStyle=o.backgroundColor,Mr(e,b,k,v)}else{e.lineWidth=Tt(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,e.strokeStyle=o.borderColor,e.setLineDash(o.borderDash||[]),e.lineDashOffset=o.borderDashOffset||0;const b=i.leftForLtr(g,f),k=i.leftForLtr(i.xPlus(g,1),f-2),v=Ni(o.borderRadius);Object.values(v).some(y=>y!==0)?(e.beginPath(),e.fillStyle=l.multiKeyBackground,vo(e,{x:b,y:_,w:f,h:u,radius:v}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),vo(e,{x:k,y:_+1,w:f-2,h:u-2,radius:v}),e.fill()):(e.fillStyle=l.multiKeyBackground,e.fillRect(b,_,f,u),e.strokeRect(b,_,f,u),e.fillStyle=o.backgroundColor,e.fillRect(k,_+1,f-2,u-2))}e.fillStyle=this.labelTextColors[s]}drawBody(e,n,s){const{body:i}=this,{bodySpacing:l,bodyAlign:o,displayColors:r,boxHeight:u,boxWidth:f,boxPadding:h}=s,p=Qn(s.bodyFont);let g=p.lineHeight,m=0;const _=ji(s.rtl,this.x,this.width),b=function(x){n.fillText(x,_.x(e.x+m),e.y+g/2),e.y+=g+l},k=_.textAlign(o);let v,y,S,C,T,O,A;for(n.textAlign=o,n.textBaseline="middle",n.font=p.string,e.x=eo(this,k,s),n.fillStyle=s.bodyColor,Ft(this.beforeBody,b),m=r&&k!=="right"?o==="center"?f/2+h:f+2+h:0,C=0,O=i.length;C<O;++C){for(v=i[C],y=this.labelTextColors[C],n.fillStyle=y,Ft(v.before,b),S=v.lines,r&&S.length&&(this._drawColorBox(n,e,C,_,s),g=Math.max(p.lineHeight,u)),T=0,A=S.length;T<A;++T)b(S[T]),g=p.lineHeight;Ft(v.after,b)}m=0,g=p.lineHeight,Ft(this.afterBody,b),e.y-=l}drawFooter(e,n,s){const i=this.footer,l=i.length;let o,r;if(l){const u=ji(s.rtl,this.x,this.width);for(e.x=eo(this,s.footerAlign,s),e.y+=s.footerMarginTop,n.textAlign=u.textAlign(s.footerAlign),n.textBaseline="middle",o=Qn(s.footerFont),n.fillStyle=s.footerColor,n.font=o.string,r=0;r<l;++r)n.fillText(i[r],u.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+s.footerSpacing}}drawBackground(e,n,s,i){const{xAlign:l,yAlign:o}=this,{x:r,y:u}=e,{width:f,height:h}=s,{topLeft:p,topRight:g,bottomLeft:m,bottomRight:_}=Ni(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(r+p,u),o==="top"&&this.drawCaret(e,n,s,i),n.lineTo(r+f-g,u),n.quadraticCurveTo(r+f,u,r+f,u+g),o==="center"&&l==="right"&&this.drawCaret(e,n,s,i),n.lineTo(r+f,u+h-_),n.quadraticCurveTo(r+f,u+h,r+f-_,u+h),o==="bottom"&&this.drawCaret(e,n,s,i),n.lineTo(r+m,u+h),n.quadraticCurveTo(r,u+h,r,u+h-m),o==="center"&&l==="left"&&this.drawCaret(e,n,s,i),n.lineTo(r,u+p),n.quadraticCurveTo(r,u,r+p,u),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,s=this.$animations,i=s&&s.x,l=s&&s.y;if(i||l){const o=cl[e.position].call(this,this._active,this._eventPosition);if(!o)return;const r=this._size=zu(this,e),u=Object.assign({},o,this._size),f=Uu(n,e,u),h=Vu(e,u,f,n);(i._to!==h.x||l._to!==h.y)&&(this.xAlign=f.xAlign,this.yAlign=f.yAlign,this.width=r.width,this.height=r.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let s=this.opacity;if(!s)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},l={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;const o=Ts(n.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&r&&(e.save(),e.globalAlpha=s,this.drawBackground(l,e,i,n),Qd(e,n.textDirection),l.y+=o.top,this.drawTitle(l,e,n),this.drawBody(l,e,n),this.drawFooter(l,e,n),$d(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const s=this._active,i=e.map(({datasetIndex:r,index:u})=>{const f=this.chart.getDatasetMeta(r);if(!f)throw new Error("Cannot find a dataset at index "+r);return{datasetIndex:r,element:f.data[u],index:u}}),l=!mo(s,i),o=this._positionChanged(i,n);(l||o)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,s=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,l=this._active||[],o=this._getActiveElements(e,l,n,s),r=this._positionChanged(o,e),u=n||!mo(o,l)||r;return u&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),u}_getActiveElements(e,n,s,i){const l=this.options;if(e.type==="mouseout")return[];if(!i)return n.filter(r=>this.chart.data.datasets[r.datasetIndex]&&this.chart.getDatasetMeta(r.datasetIndex).controller.getParsed(r.index)!==void 0);const o=this.chart.getElementsAtEventForMode(e,l.mode,l,s);return l.reverse&&o.reverse(),o}_positionChanged(e,n){const{caretX:s,caretY:i,options:l}=this,o=cl[l.position].call(this,e,n);return o!==!1&&(s!==o.x||i!==o.y)}}var ra={id:"tooltip",_element:Gu,positioners:cl,afterInit(t,e,n){n&&(t.tooltip=new Gu({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:_p},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const v2=(t,e,n,s)=>(typeof e=="string"?(n=t.push(e)-1,s.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function y2(t,e,n,s){const i=t.indexOf(e);if(i===-1)return v2(t,e,n,s);const l=t.lastIndexOf(e);return i!==l?n:i}const w2=(t,e)=>t===null?null:Zn(Math.round(t),0,e);function Xu(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class vp extends Zi{static id="category";static defaults={ticks:{callback:Xu}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const s=this.getLabels();for(const{index:i,label:l}of n)s[i]===l&&s.splice(i,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(Dt(e))return null;const s=this.getLabels();return n=isFinite(n)&&s[n]===e?n:y2(s,e,dt(n,e),this._addedLabels),w2(n,s.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:s,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(s=0),n||(i=this.getLabels().length-1)),this.min=s,this.max=i}buildTicks(){const e=this.min,n=this.max,s=this.options.offset,i=[];let l=this.getLabels();l=e===0&&n===l.length-1?l:l.slice(e,n+1),this._valueRange=Math.max(l.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let o=e;o<=n;o++)i.push({value:o});return i}getLabelForValue(e){return Xu.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function k2(t,e){const n=[],{bounds:i,step:l,min:o,max:r,precision:u,count:f,maxTicks:h,maxDigits:p,includeBounds:g}=t,m=l||1,_=h-1,{min:b,max:k}=e,v=!Dt(o),y=!Dt(r),S=!Dt(f),C=(k-b)/(p+1);let T=Ya((k-b)/_/m)*m,O,A,x,P;if(T<1e-14&&!v&&!y)return[{value:b},{value:k}];P=Math.ceil(k/T)-Math.floor(b/T),P>_&&(T=Ya(P*T/_/m)*m),Dt(u)||(O=Math.pow(10,u),T=Math.ceil(T*O)/O),i==="ticks"?(A=Math.floor(b/T)*T,x=Math.ceil(k/T)*T):(A=b,x=k),v&&y&&l&&Bm((r-o)/l,T/1e3)?(P=Math.round(Math.min((r-o)/T,h)),T=(r-o)/P,A=o,x=r):S?(A=v?o:A,x=y?r:x,P=f-1,T=(x-A)/P):(P=(x-A)/T,ml(P,Math.round(P),T/1e3)?P=Math.round(P):P=Math.ceil(P));const D=Math.max(Ja(T),Ja(A));O=Math.pow(10,Dt(u)?D:u),A=Math.round(A*O)/O,x=Math.round(x*O)/O;let I=0;for(v&&(g&&A!==o?(n.push({value:o}),A<o&&I++,ml(Math.round((A+I*T)*O)/O,o,Yu(o,C,t))&&I++):A<o&&I++);I<P;++I){const R=Math.round((A+I*T)*O)/O;if(y&&R>r)break;n.push({value:R})}return y&&g&&x!==r?n.length&&ml(n[n.length-1].value,r,Yu(r,C,t))?n[n.length-1].value=r:n.push({value:r}):(!y||x===r)&&n.push({value:x}),n}function Yu(t,e,{horizontal:n,minRotation:s}){const i=qs(s),l=(n?Math.sin(i):Math.cos(i))||.001,o=.75*e*(""+t).length;return Math.min(e/l,o)}class S2 extends Zi{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return Dt(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:s}=this.getUserBounds();let{min:i,max:l}=this;const o=u=>i=n?i:u,r=u=>l=s?l:u;if(e){const u=Bs(i),f=Bs(l);u<0&&f<0?r(0):u>0&&f>0&&o(0)}if(i===l){let u=l===0?1:Math.abs(l*.05);r(l+u),e||o(i-u)}this.min=i,this.max=l}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:s}=e,i;return s?(i=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,i>1e3&&(console.warn(\`scales.\${this.id}.ticks.stepSize: \${s} would result generating up to \${i} ticks. Limiting to 1000.\`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let s=this.getTickLimit();s=Math.max(2,s);const i={maxTicks:s,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},l=this._range||this,o=k2(i,l);return e.bounds==="ticks"&&Fm(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const e=this.ticks;let n=this.min,s=this.max;if(super.configure(),this.options.offset&&e.length){const i=(s-n)/Math.max(e.length-1,1)/2;n-=i,s+=i}this._startValue=n,this._endValue=s,this._valueRange=s-n}getLabelForValue(e){return Kr(e,this.chart.options.locale,this.options.ticks.format)}}class yp extends S2{static id="linear";static defaults={ticks:{callback:Wd.formatters.numeric}};determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=Es(e)?e:0,this.max=Es(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,s=qs(this.options.ticks.minRotation),i=(e?Math.sin(s):Math.cos(s))||.001,l=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,l.lineHeight/i))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}const Ro={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},ps=Object.keys(Ro);function Ju(t,e){return t-e}function Ku(t,e){if(Dt(e))return null;const n=t._adapter,{parser:s,round:i,isoWeekday:l}=t._parseOpts;let o=e;return typeof s=="function"&&(o=s(o)),Es(o)||(o=typeof s=="string"?n.parse(o,s):n.parse(o)),o===null?null:(i&&(o=i==="week"&&(El(l)||l===!0)?n.startOf(o,"isoWeek",l):n.startOf(o,i)),+o)}function Zu(t,e,n,s){const i=ps.length;for(let l=ps.indexOf(t);l<i-1;++l){const o=Ro[ps[l]],r=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-e)/(r*o.size))<=s)return ps[l]}return ps[i-1]}function E2(t,e,n,s,i){for(let l=ps.length-1;l>=ps.indexOf(n);l--){const o=ps[l];if(Ro[o].common&&t._adapter.diff(i,s,o)>=e-1)return o}return ps[n?ps.indexOf(n):0]}function T2(t){for(let e=ps.indexOf(t)+1,n=ps.length;e<n;++e)if(Ro[ps[e]].common)return ps[e]}function Qu(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:s,hi:i}=Xr(n,e),l=n[s]>=e?n[s]:n[i];t[l]=!0}}function M2(t,e,n,s){const i=t._adapter,l=+i.startOf(e[0].value,s),o=e[e.length-1].value;let r,u;for(r=l;r<=o;r=+i.add(r,1,s))u=n[r],u>=0&&(e[u].major=!0);return e}function $u(t,e,n){const s=[],i={},l=e.length;let o,r;for(o=0;o<l;++o)r=e[o],i[r]=o,s.push({value:r,major:!1});return l===0||!n?s:M2(t,s,i,n)}class ec extends Zi{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const s=e.time||(e.time={}),i=this._adapter=new Mb._date(e.adapters.date);i.init(n),gl(s.displayFormats,i.formats()),this._parseOpts={parser:s.parser,round:s.round,isoWeekday:s.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:Ku(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,s=e.time.unit||"day";let{min:i,max:l,minDefined:o,maxDefined:r}=this.getUserBounds();function u(f){!o&&!isNaN(f.min)&&(i=Math.min(i,f.min)),!r&&!isNaN(f.max)&&(l=Math.max(l,f.max))}(!o||!r)&&(u(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&u(this.getMinMax(!1))),i=Es(i)&&!isNaN(i)?i:+n.startOf(Date.now(),s),l=Es(l)&&!isNaN(l)?l:+n.endOf(Date.now(),s)+1,this.min=Math.min(i,l-1),this.max=Math.max(i+1,l)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],s=e[e.length-1]),{min:n,max:s}}buildTicks(){const e=this.options,n=e.time,s=e.ticks,i=s.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const l=this.min,o=this.max,r=Vm(i,l,o);return this._unit=n.unit||(s.autoSkip?Zu(n.minUnit,this.min,this.max,this._getLabelCapacity(l)):E2(this,r.length,n.minUnit,this.min,this.max)),this._majorUnit=!s.major.enabled||this._unit==="year"?void 0:T2(this._unit),this.initOffsets(i),e.reverse&&r.reverse(),$u(this,r,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,s=0,i,l;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?n=1-i:n=(this.getDecimalForValue(e[1])-i)/2,l=this.getDecimalForValue(e[e.length-1]),e.length===1?s=l:s=(l-this.getDecimalForValue(e[e.length-2]))/2);const o=e.length<3?.5:.25;n=Zn(n,0,o),s=Zn(s,0,o),this._offsets={start:n,end:s,factor:1/(n+1+s)}}_generate(){const e=this._adapter,n=this.min,s=this.max,i=this.options,l=i.time,o=l.unit||Zu(l.minUnit,n,s,this._getLabelCapacity(n)),r=dt(i.ticks.stepSize,1),u=o==="week"?l.isoWeekday:!1,f=El(u)||u===!0,h={};let p=n,g,m;if(f&&(p=+e.startOf(p,"isoWeek",u)),p=+e.startOf(p,f?"day":o),e.diff(s,n,o)>1e5*r)throw new Error(n+" and "+s+" are too far apart with stepSize of "+r+" "+o);const _=i.ticks.source==="data"&&this.getDataTimestamps();for(g=p,m=0;g<s;g=+e.add(g,r,o),m++)Qu(h,g,_);return(g===s||i.bounds==="ticks"||m===1)&&Qu(h,g,_),Object.keys(h).sort(Ju).map(b=>+b)}getLabelForValue(e){const n=this._adapter,s=this.options.time;return s.tooltipFormat?n.format(e,s.tooltipFormat):n.format(e,s.displayFormats.datetime)}format(e,n){const i=this.options.time.displayFormats,l=this._unit,o=n||i[l];return this._adapter.format(e,o)}_tickFormatFunction(e,n,s,i){const l=this.options,o=l.ticks.callback;if(o)return rn(o,[e,n,s],this);const r=l.time.displayFormats,u=this._unit,f=this._majorUnit,h=u&&r[u],p=f&&r[f],g=s[n],m=f&&p&&g&&g.major;return this._adapter.format(e,i||(m?p:h))}generateTickLabels(e){let n,s,i;for(n=0,s=e.length;n<s;++n)i=e[n],i.label=this._tickFormatFunction(i.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,s=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+s)*n.factor)}getValueForPixel(e){const n=this._offsets,s=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+s*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,s=this.ctx.measureText(e).width,i=qs(this.isHorizontal()?n.maxRotation:n.minRotation),l=Math.cos(i),o=Math.sin(i),r=this._resolveTickFontOptions(0).size;return{w:s*l+r*o,h:s*o+r*l}}_getLabelCapacity(e){const n=this.options.time,s=n.displayFormats,i=s[n.unit]||s.millisecond,l=this._tickFormatFunction(e,0,$u(this,[e],this._majorUnit),i),o=this._getLabelSize(l),r=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return r>0?r:1}getDataTimestamps(){let e=this._cache.data||[],n,s;if(e.length)return e;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,s=i.length;n<s;++n)e=e.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,s;if(e.length)return e;const i=this.getLabels();for(n=0,s=i.length;n<s;++n)e.push(Ku(this,i[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return zd(e.sort(Ju))}}function to(t,e,n){let s=0,i=t.length-1,l,o,r,u;n?(e>=t[s].pos&&e<=t[i].pos&&({lo:s,hi:i}=Si(t,"pos",e)),{pos:l,time:r}=t[s],{pos:o,time:u}=t[i]):(e>=t[s].time&&e<=t[i].time&&({lo:s,hi:i}=Si(t,"time",e)),{time:l,pos:r}=t[s],{time:o,pos:u}=t[i]);const f=o-l;return f?r+(u-r)*(e-l)/f:r}class Y5 extends ec{static id="timeseries";static defaults=ec.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=to(n,this.min),this._tableRange=to(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:s}=this,i=[],l=[];let o,r,u,f,h;for(o=0,r=e.length;o<r;++o)f=e[o],f>=n&&f<=s&&i.push(f);if(i.length<2)return[{time:n,pos:0},{time:s,pos:1}];for(o=0,r=i.length;o<r;++o)h=i[o+1],u=i[o-1],f=i[o],Math.round((h+u)/2)!==f&&l.push({time:f,pos:o/(r-1)});return l}_generate(){const e=this.min,n=this.max;let s=super.getDataTimestamps();return(!s.includes(e)||!s.length)&&s.splice(0,0,e),(!s.includes(n)||s.length===1)&&s.push(n),s.sort((i,l)=>i-l)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),s=this.getLabelTimestamps();return n.length&&s.length?e=this.normalize(n.concat(s)):e=n.length?n:s,e=this._cache.all=e,e}getDecimalForValue(e){return(to(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,s=this.getDecimalForPixel(e)/n.factor-n.end;return to(this._table,s*this._tableRange+this._minPos,!0)}}const tc=/^on/,wp=[];Object.keys(globalThis).forEach(t=>{tc.test(t)&&wp.push(t.replace(tc,""))});function Do(t){const e=zi,n=[];function s(i){tg(e,i)}is(()=>{const i=t();wp.forEach(i instanceof Element?l=>n.push(te(i,l,s)):l=>n.push(i.$on(l,s)))}),Ai(()=>{for(;n.length;)n.pop()()})}function C2(t){let e,n=[t[1]],s={};for(let i=0;i<n.length;i+=1)s=Ss(s,n[i]);return{c(){e=d("canvas"),Kp(e,s)},m(i,l){H(i,e,l),t[8](e)},p:Ee,i:Ee,o:Ee,d(i){i&&L(e),t[8](null)}}}function P2(t){let{data:e,type:n,options:s,plugins:i,children:l,$$scope:o,$$slots:r,...u}=t;return u}function A2(t,e,n){let{type:s}=e,{data:i={datasets:[]}}=e,{options:l={}}=e,{plugins:o=[]}=e,{updateMode:r=void 0}=e,{chart:u=null}=e,f,h=P2(e);is(()=>{n(2,u=new pi(f,{type:s,data:i,options:l,plugins:o}))}),eg(()=>{u&&(n(2,u.data=i,u),Object.assign(u.options,l),u.update(r))}),Ai(()=>{u&&u.destroy(),n(2,u=null)}),Do(()=>f);function p(g){vn[g?"unshift":"push"](()=>{f=g,n(0,f)})}return t.$$set=g=>{n(9,e=Ss(Ss({},e),ci(g))),"type"in g&&n(3,s=g.type),"data"in g&&n(4,i=g.data),"options"in g&&n(5,l=g.options),"plugins"in g&&n(6,o=g.plugins),"updateMode"in g&&n(7,r=g.updateMode),"chart"in g&&n(2,u=g.chart)},e=ci(e),[f,h,u,s,i,l,o,r,p]}class aa extends zt{constructor(e){super(),jt(this,e,A2,C2,Lt,{type:3,data:4,options:5,plugins:6,updateMode:7,chart:2})}}function O2(t){let e,n,s;const i=[{type:"line"},t[1]];function l(r){t[4](r)}let o={};for(let r=0;r<i.length;r+=1)o=Ss(o,i[r]);return t[0]!==void 0&&(o.chart=t[0]),e=new aa({props:o}),t[3](e),vn.push(()=>Kn(e,"chart",l)),{c(){pt(e.$$.fragment)},m(r,u){ut(e,r,u),s=!0},p(r,[u]){const f=u&2?Br(i,[i[0],Fr(r[1])]):{};!n&&u&1&&(n=!0,f.chart=r[0],Jn(()=>n=!1)),e.$set(f)},i(r){s||(Be(e.$$.fragment,r),s=!0)},o(r){Fe(e.$$.fragment,r),s=!1},d(r){t[3](null),ct(e,r)}}}function x2(t,e,n){pi.register(Tb);let{chart:s=null}=e,i,l;Do(()=>l);function o(u){vn[u?"unshift":"push"](()=>{l=u,n(2,l)})}function r(u){s=u,n(0,s)}return t.$$set=u=>{n(5,e=Ss(Ss({},e),ci(u))),"chart"in u&&n(0,s=u.chart)},t.$$.update=()=>{n(1,i=e)},e=ci(e),[s,i,l,o,r]}class R2 extends zt{constructor(e){super(),jt(this,e,x2,O2,Lt,{chart:0})}}function D2(t){let e,n,s;const i=[{type:"doughnut"},t[1]];function l(r){t[4](r)}let o={};for(let r=0;r<i.length;r+=1)o=Ss(o,i[r]);return t[0]!==void 0&&(o.chart=t[0]),e=new aa({props:o}),t[3](e),vn.push(()=>Kn(e,"chart",l)),{c(){pt(e.$$.fragment)},m(r,u){ut(e,r,u),s=!0},p(r,[u]){const f=u&2?Br(i,[i[0],Fr(r[1])]):{};!n&&u&1&&(n=!0,f.chart=r[0],Jn(()=>n=!1)),e.$set(f)},i(r){s||(Be(e.$$.fragment,r),s=!0)},o(r){Fe(e.$$.fragment,r),s=!1},d(r){t[3](null),ct(e,r)}}}function L2(t,e,n){pi.register(Eb);let{chart:s=null}=e,i,l;Do(()=>l);function o(u){vn[u?"unshift":"push"](()=>{l=u,n(2,l)})}function r(u){s=u,n(0,s)}return t.$$set=u=>{n(5,e=Ss(Ss({},e),ci(u))),"chart"in u&&n(0,s=u.chart)},t.$$.update=()=>{n(1,i=e)},e=ci(e),[s,i,l,o,r]}class H2 extends zt{constructor(e){super(),jt(this,e,L2,D2,Lt,{chart:0})}}function I2(t){let e,n,s;const i=[{type:"bar"},t[1]];function l(r){t[4](r)}let o={};for(let r=0;r<i.length;r+=1)o=Ss(o,i[r]);return t[0]!==void 0&&(o.chart=t[0]),e=new aa({props:o}),t[3](e),vn.push(()=>Kn(e,"chart",l)),{c(){pt(e.$$.fragment)},m(r,u){ut(e,r,u),s=!0},p(r,[u]){const f=u&2?Br(i,[i[0],Fr(r[1])]):{};!n&&u&1&&(n=!0,f.chart=r[0],Jn(()=>n=!1)),e.$set(f)},i(r){s||(Be(e.$$.fragment,r),s=!0)},o(r){Fe(e.$$.fragment,r),s=!1},d(r){t[3](null),ct(e,r)}}}function B2(t,e,n){pi.register(kb);let{chart:s=null}=e,i,l;Do(()=>l);function o(u){vn[u?"unshift":"push"](()=>{l=u,n(2,l)})}function r(u){s=u,n(0,s)}return t.$$set=u=>{n(5,e=Ss(Ss({},e),ci(u))),"chart"in u&&n(0,s=u.chart)},t.$$.update=()=>{n(1,i=e)},e=ci(e),[s,i,l,o,r]}class F2 extends zt{constructor(e){super(),jt(this,e,B2,I2,Lt,{chart:0})}}const nc=typeof window<"u";function N2(){const{subscribe:t,set:e}=Js({textColor:"rgba(255, 255, 255, 0.9)",gridColor:"rgba(255, 255, 255, 0.1)"});let n=null,s=null,i=!1;function l(){if(!nc)return;const u=document.createElement("div");u.className="text-base-content",u.style.position="absolute",u.style.visibility="hidden",document.body.appendChild(u);const f=getComputedStyle(u).color;document.body.removeChild(u);const h=f.match(/rgba?\\((\\d+),\\s*(\\d+),\\s*(\\d+)(?:,\\s*[\\d.]+)?\\)/),p=h?\`rgba(\${h[1]}, \${h[2]}, \${h[3]}, 0.1)\`:"rgba(255, 255, 255, 0.1)";e({textColor:f,gridColor:p})}function o(){if(!nc||i)return;i=!0,l(),n=new MutationObserver(()=>{l()}),n.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme","class"]}),s=window.matchMedia("(prefers-color-scheme: dark)");const u=()=>l();s.addEventListener("change",u),typeof window<"u"&&window.addEventListener("beforeunload",()=>{r()})}function r(){n&&(n.disconnect(),n=null),s&&(s.removeEventListener("change",l),s=null),i=!1}return{subscribe:t,init:o,cleanup:r}}const Cs=N2();Ns(Cs,t=>t.textColor);Ns(Cs,t=>t.gridColor);function ua(t,e,n=!0){return{display:n&&!!t,text:t,color:e,font:{size:16,weight:"bold"}}}function j2(t,e={}){const{position:n="top",display:s=!0,padding:i=15,fontSize:l=11}=e;return{display:s,position:n,labels:{padding:i,font:{size:l},color:t}}}function So(t,e,n={}){const{stacked:s=!1,beginAtZero:i=!0,fontSize:l=11,maxRotation:o,minRotation:r,title:u}=n,f={stacked:s,beginAtZero:i,ticks:{font:{size:l},color:t},grid:{color:e}};return u&&(f.title={display:u.display,text:u.text,color:t}),o!==void 0&&(f.ticks.maxRotation=o),r!==void 0&&(f.ticks.minRotation=r),f}function kp(t="index",e=!1){return{mode:t,intersect:e}}function z2(t){let e,n,s;return n=new R2({props:{data:t[1],options:t[0]}}),{c(){e=d("div"),pt(n.$$.fragment),c(e,"class","w-full h-full")},m(i,l){H(i,e,l),ut(n,e,null),s=!0},p(i,[l]){const o={};l&2&&(o.data=i[1]),l&1&&(o.options=i[0]),n.$set(o)},i(i){s||(Be(n.$$.fragment,i),s=!0)},o(i){Fe(n.$$.fragment,i),s=!1},d(i){i&&L(e),ct(n)}}}function U2(t,e,n){let s,i,l;Gt(t,Cs,h=>n(6,l=h)),pi.register(vp,yp,Q_,Z_,f2,ra,oa);let{title:o}=e,{labels:r}=e,{datasets:u}=e,{yAxisLabel:f=""}=e;return is(()=>{Cs.init()}),Ai(()=>{Cs.cleanup()}),t.$$set=h=>{"title"in h&&n(2,o=h.title),"labels"in h&&n(3,r=h.labels),"datasets"in h&&n(4,u=h.datasets),"yAxisLabel"in h&&n(5,f=h.yAxisLabel)},t.$$.update=()=>{t.$$.dirty&24&&n(1,s={labels:r,datasets:u.map(h=>({...h,borderColor:h.borderColor||"rgb(75, 192, 192)",backgroundColor:h.backgroundColor||"rgba(75, 192, 192, 0.2)",tension:h.tension??.4}))}),t.$$.dirty&116&&n(0,i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:u.length>1,position:"top",labels:{color:l.textColor}},title:ua(o,l.textColor,!0),tooltip:kp("index",!1)},scales:{y:So(l.textColor,l.gridColor,{beginAtZero:!0,title:f?{display:!0,text:f}:void 0}),x:{...So(l.textColor,l.gridColor),ticks:{maxRotation:45,minRotation:0,autoSkip:!0,maxTicksLimit:10,color:l.textColor}}},interaction:{mode:"nearest",axis:"x",intersect:!1}})},[i,s,o,r,u,f,l]}class no extends zt{constructor(e){super(),jt(this,e,U2,z2,Lt,{title:2,labels:3,datasets:4,yAxisLabel:5})}}function V2(t){let e,n,s;return n=new H2({props:{data:t[1],options:t[0]}}),{c(){e=d("div"),pt(n.$$.fragment),c(e,"class","w-full h-full")},m(i,l){H(i,e,l),ut(n,e,null),s=!0},p(i,[l]){const o={};l&2&&(o.data=i[1]),l&1&&(o.options=i[0]),n.$set(o)},i(i){s||(Be(n.$$.fragment,i),s=!0)},o(i){Fe(n.$$.fragment,i),s=!1},d(i){i&&L(e),ct(n)}}}function W2(t,e,n){let s,i,l;Gt(t,Cs,u=>n(4,l=u)),pi.register(z_,ra,oa);let{data:o=[]}=e,{title:r=""}=e;return is(()=>{Cs.init()}),Ai(()=>{Cs.cleanup()}),t.$$set=u=>{"data"in u&&n(2,o=u.data),"title"in u&&n(3,r=u.title)},t.$$.update=()=>{t.$$.dirty&20&&n(1,s={labels:o.map(u=>u.label),datasets:[{data:o.map(u=>u.value),backgroundColor:["rgba(59, 130, 246, 0.8)","rgba(16, 185, 129, 0.8)","rgba(245, 158, 11, 0.8)","rgba(239, 68, 68, 0.8)","rgba(168, 85, 247, 0.8)","rgba(236, 72, 153, 0.8)","rgba(20, 184, 166, 0.8)","rgba(251, 146, 60, 0.8)","rgba(132, 204, 22, 0.8)","rgba(148, 163, 184, 0.8)"],borderColor:l.gridColor,borderWidth:1}]}),t.$$.dirty&28&&n(0,i={responsive:!0,maintainAspectRatio:!1,plugins:{title:ua(r,l.textColor),legend:{position:"right",labels:{padding:10,font:{size:11},color:l.textColor,generateLabels:u=>{const h=u.data.datasets[0].backgroundColor;return u.data.labels?.map((p,g)=>({text:\`\${p} (\${o[g]?.percentage||0}%)\`,fillStyle:h[g],strokeStyle:h[g],fontColor:l.textColor,hidden:!1,index:g}))||[]}}},tooltip:{callbacks:{label:u=>{const f=u.label||"",h=u.parsed||0,p=o[u.dataIndex]?.percentage||0;return\`\${f}: \${h} (\${p}%)\`}}}}})},[i,s,o,r,l]}class Sp extends zt{constructor(e){super(),jt(this,e,W2,V2,Lt,{data:2,title:3})}}function q2(t){let e,n,s;return n=new F2({props:{data:t[1],options:t[0]}}),{c(){e=d("div"),pt(n.$$.fragment),c(e,"class","w-full h-full")},m(i,l){H(i,e,l),ut(n,e,null),s=!0},p(i,[l]){const o={};l&2&&(o.data=i[1]),l&1&&(o.options=i[0]),n.$set(o)},i(i){s||(Be(n.$$.fragment,i),s=!0)},o(i){Fe(n.$$.fragment,i),s=!1},d(i){i&&L(e),ct(n)}}}function G2(t,e,n){let s,i,l;Gt(t,Cs,u=>n(4,l=u)),pi.register(i2,vp,yp,ra,oa);let{data:o=[]}=e,{title:r=""}=e;return is(()=>{Cs.init()}),Ai(()=>{Cs.cleanup()}),t.$$set=u=>{"data"in u&&n(2,o=u.data),"title"in u&&n(3,r=u.title)},t.$$.update=()=>{t.$$.dirty&4&&n(1,s={labels:o.map(u=>u.label),datasets:[{label:"2xx",data:o.map(u=>u.status2xx),backgroundColor:"rgba(16, 185, 129, 0.8)",borderColor:"rgba(16, 185, 129, 1)",borderWidth:1},{label:"3xx",data:o.map(u=>u.status3xx),backgroundColor:"rgba(59, 130, 246, 0.8)",borderColor:"rgba(59, 130, 246, 1)",borderWidth:1},{label:"4xx",data:o.map(u=>u.status4xx),backgroundColor:"rgba(245, 158, 11, 0.8)",borderColor:"rgba(245, 158, 11, 1)",borderWidth:1},{label:"5xx",data:o.map(u=>u.status5xx),backgroundColor:"rgba(239, 68, 68, 0.8)",borderColor:"rgba(239, 68, 68, 1)",borderWidth:1}]}),t.$$.dirty&24&&n(0,i={responsive:!0,maintainAspectRatio:!1,scales:{x:So(l.textColor,l.gridColor,{stacked:!0,fontSize:10,maxRotation:45,minRotation:45}),y:So(l.textColor,l.gridColor,{stacked:!0,beginAtZero:!0,fontSize:11})},plugins:{title:ua(r,l.textColor),legend:j2(l.textColor,{position:"top",padding:15,fontSize:11}),tooltip:kp("index",!1)}})},[i,s,o,r,l]}class X2 extends zt{constructor(e){super(),jt(this,e,G2,q2,Lt,{data:2,title:3})}}function Y2(t){let e,n,s,i,l,o=t[11]("monitoring.noData")+"",r;return{c(){e=d("div"),n=de("svg"),s=de("path"),i=w(),l=d("span"),r=E(o),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(n,"class","stroke-current shrink-0 w-6 h-6"),c(e,"class","alert alert-info")},m(u,f){H(u,e,f),a(e,n),a(n,s),a(e,i),a(e,l),a(l,r)},p(u,f){f&2048&&o!==(o=u[11]("monitoring.noData")+"")&&M(r,o)},i:Ee,o:Ee,d(u){u&&L(e)}}}function J2(t){let e,n,s,i,l,o,r,u,f,h,p,g,m,_,b,k,v,y,S,C,T,O,A,x,P,D,I,R,U,N,z,B,j,F,W,G,Y,Q,le;l=new no({props:{title:t[11]("monitoring.charts.requestsTrend"),labels:t[10],datasets:[{label:t[11]("monitoring.charts.periodRequests"),data:t[9],borderColor:"rgb(59, 130, 246)",backgroundColor:"rgba(59, 130, 246, 0.1)"}],yAxisLabel:t[11]("monitoring.charts.requests")}}),h=new no({props:{title:t[11]("monitoring.charts.responseTimeTrend"),labels:t[10],datasets:[{label:t[11]("monitoring.charts.avgResponseTime"),data:t[7],borderColor:"rgb(34, 197, 94)",backgroundColor:"rgba(34, 197, 94, 0.1)"}],yAxisLabel:t[11]("monitoring.charts.milliseconds")}}),b=new no({props:{title:t[11]("monitoring.charts.successRateTrend"),labels:t[10],datasets:[{label:t[11]("monitoring.charts.successRate"),data:t[6],borderColor:"rgb(16, 185, 129)",backgroundColor:"rgba(16, 185, 129, 0.1)"}],yAxisLabel:t[11]("monitoring.charts.percentage")}}),C=new no({props:{title:t[11]("monitoring.charts.errorsTrend"),labels:t[10],datasets:[{label:t[11]("monitoring.charts.periodErrors"),data:t[8],borderColor:"rgb(239, 68, 68)",backgroundColor:"rgba(239, 68, 68, 0.1)"}],yAxisLabel:t[11]("monitoring.charts.errors")}});const Z=[$2,Q2],V=[];function X(q,ce){return q[5].length>0?0:1}P=X(t),D=V[P]=Z[P](t);const J=[tv,ev],oe=[];function ne(q,ce){return q[4].length>0?0:1}z=ne(t),B=oe[z]=J[z](t);const ee=[sv,nv],se=[];function K(q,ce){return q[3].length>0?0:1}return Y=K(t),Q=se[Y]=ee[Y](t),{c(){e=d("div"),n=d("div"),s=d("div"),i=d("div"),pt(l.$$.fragment),o=w(),r=d("div"),u=d("div"),f=d("div"),pt(h.$$.fragment),p=w(),g=d("div"),m=d("div"),_=d("div"),pt(b.$$.fragment),k=w(),v=d("div"),y=d("div"),S=d("div"),pt(C.$$.fragment),T=w(),O=d("div"),A=d("div"),x=d("div"),D.c(),I=w(),R=d("div"),U=d("div"),N=d("div"),B.c(),j=w(),F=d("div"),W=d("div"),G=d("div"),Q.c(),c(i,"class","h-64"),c(s,"class","card-body p-4"),c(n,"class","card bg-base-100 shadow-xl"),c(f,"class","h-64"),c(u,"class","card-body p-4"),c(r,"class","card bg-base-100 shadow-xl"),c(_,"class","h-64"),c(m,"class","card-body p-4"),c(g,"class","card bg-base-100 shadow-xl"),c(S,"class","h-64"),c(y,"class","card-body p-4"),c(v,"class","card bg-base-100 shadow-xl"),c(x,"class","h-64"),c(A,"class","card-body p-4"),c(O,"class","card bg-base-100 shadow-xl"),c(N,"class","h-64"),c(U,"class","card-body p-4"),c(R,"class","card bg-base-100 shadow-xl"),c(G,"class","h-64"),c(W,"class","card-body p-4"),c(F,"class","card bg-base-100 shadow-xl lg:col-span-2"),c(e,"class","grid grid-cols-1 lg:grid-cols-2 gap-6")},m(q,ce){H(q,e,ce),a(e,n),a(n,s),a(s,i),ut(l,i,null),a(e,o),a(e,r),a(r,u),a(u,f),ut(h,f,null),a(e,p),a(e,g),a(g,m),a(m,_),ut(b,_,null),a(e,k),a(e,v),a(v,y),a(y,S),ut(C,S,null),a(e,T),a(e,O),a(O,A),a(A,x),V[P].m(x,null),a(e,I),a(e,R),a(R,U),a(U,N),oe[z].m(N,null),a(e,j),a(e,F),a(F,W),a(W,G),se[Y].m(G,null),le=!0},p(q,ce){const he={};ce&2048&&(he.title=q[11]("monitoring.charts.requestsTrend")),ce&1024&&(he.labels=q[10]),ce&2560&&(he.datasets=[{label:q[11]("monitoring.charts.periodRequests"),data:q[9],borderColor:"rgb(59, 130, 246)",backgroundColor:"rgba(59, 130, 246, 0.1)"}]),ce&2048&&(he.yAxisLabel=q[11]("monitoring.charts.requests")),l.$set(he);const ke={};ce&2048&&(ke.title=q[11]("monitoring.charts.responseTimeTrend")),ce&1024&&(ke.labels=q[10]),ce&2176&&(ke.datasets=[{label:q[11]("monitoring.charts.avgResponseTime"),data:q[7],borderColor:"rgb(34, 197, 94)",backgroundColor:"rgba(34, 197, 94, 0.1)"}]),ce&2048&&(ke.yAxisLabel=q[11]("monitoring.charts.milliseconds")),h.$set(ke);const we={};ce&2048&&(we.title=q[11]("monitoring.charts.successRateTrend")),ce&1024&&(we.labels=q[10]),ce&2112&&(we.datasets=[{label:q[11]("monitoring.charts.successRate"),data:q[6],borderColor:"rgb(16, 185, 129)",backgroundColor:"rgba(16, 185, 129, 0.1)"}]),ce&2048&&(we.yAxisLabel=q[11]("monitoring.charts.percentage")),b.$set(we);const pe={};ce&2048&&(pe.title=q[11]("monitoring.charts.errorsTrend")),ce&1024&&(pe.labels=q[10]),ce&2304&&(pe.datasets=[{label:q[11]("monitoring.charts.periodErrors"),data:q[8],borderColor:"rgb(239, 68, 68)",backgroundColor:"rgba(239, 68, 68, 0.1)"}]),ce&2048&&(pe.yAxisLabel=q[11]("monitoring.charts.errors")),C.$set(pe);let me=P;P=X(q),P===me?V[P].p(q,ce):(gs(),Fe(V[me],1,1,()=>{V[me]=null}),ms(),D=V[P],D?D.p(q,ce):(D=V[P]=Z[P](q),D.c()),Be(D,1),D.m(x,null));let Pe=z;z=ne(q),z===Pe?oe[z].p(q,ce):(gs(),Fe(oe[Pe],1,1,()=>{oe[Pe]=null}),ms(),B=oe[z],B?B.p(q,ce):(B=oe[z]=J[z](q),B.c()),Be(B,1),B.m(N,null));let Se=Y;Y=K(q),Y===Se?se[Y].p(q,ce):(gs(),Fe(se[Se],1,1,()=>{se[Se]=null}),ms(),Q=se[Y],Q?Q.p(q,ce):(Q=se[Y]=ee[Y](q),Q.c()),Be(Q,1),Q.m(G,null))},i(q){le||(Be(l.$$.fragment,q),Be(h.$$.fragment,q),Be(b.$$.fragment,q),Be(C.$$.fragment,q),Be(D),Be(B),Be(Q),le=!0)},o(q){Fe(l.$$.fragment,q),Fe(h.$$.fragment,q),Fe(b.$$.fragment,q),Fe(C.$$.fragment,q),Fe(D),Fe(B),Fe(Q),le=!1},d(q){q&&L(e),ct(l),ct(h),ct(b),ct(C),V[P].d(),oe[z].d(),se[Y].d()}}}function K2(t){let e,n,s,i,l,o=t[11]("common.error")+"",r,u,f;return{c(){e=d("div"),n=de("svg"),s=de("path"),i=w(),l=d("span"),r=E(o),u=E(": "),f=E(t[1]),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-6 w-6"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(e,"class","alert alert-error")},m(h,p){H(h,e,p),a(e,n),a(n,s),a(e,i),a(e,l),a(l,r),a(l,u),a(l,f)},p(h,p){p&2048&&o!==(o=h[11]("common.error")+"")&&M(r,o),p&2&&M(f,h[1])},i:Ee,o:Ee,d(h){h&&L(e)}}}function Z2(t){let e;return{c(){e=d("div"),e.innerHTML='<span class="loading loading-spinner loading-lg"></span>',c(e,"class","flex justify-center items-center h-64")},m(n,s){H(n,e,s)},p:Ee,i:Ee,o:Ee,d(n){n&&L(e)}}}function Q2(t){let e,n=t[11]("dashboard.noData")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-center py-8 opacity-50")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l&2048&&n!==(n=i[11]("dashboard.noData")+"")&&M(s,n)},i:Ee,o:Ee,d(i){i&&L(e)}}}function $2(t){let e,n;return e=new Sp({props:{data:t[5],title:t[11]("dashboard.upstreamDistribution")}}),{c(){pt(e.$$.fragment)},m(s,i){ut(e,s,i),n=!0},p(s,i){const l={};i&32&&(l.data=s[5]),i&2048&&(l.title=s[11]("dashboard.upstreamDistribution")),e.$set(l)},i(s){n||(Be(e.$$.fragment,s),n=!0)},o(s){Fe(e.$$.fragment,s),n=!1},d(s){ct(e,s)}}}function ev(t){let e,n=t[11]("dashboard.noData")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-center py-8 opacity-50")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l&2048&&n!==(n=i[11]("dashboard.noData")+"")&&M(s,n)},i:Ee,o:Ee,d(i){i&&L(e)}}}function tv(t){let e,n;return e=new Sp({props:{data:t[4],title:t[11]("dashboard.upstreamFailures")}}),{c(){pt(e.$$.fragment)},m(s,i){ut(e,s,i),n=!0},p(s,i){const l={};i&16&&(l.data=s[4]),i&2048&&(l.title=s[11]("dashboard.upstreamFailures")),e.$set(l)},i(s){n||(Be(e.$$.fragment,s),n=!0)},o(s){Fe(e.$$.fragment,s),n=!1},d(s){ct(e,s)}}}function nv(t){let e,n=t[11]("dashboard.noData")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-center py-8 opacity-50")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l&2048&&n!==(n=i[11]("dashboard.noData")+"")&&M(s,n)},i:Ee,o:Ee,d(i){i&&L(e)}}}function sv(t){let e,n;return e=new X2({props:{data:t[3],title:t[11]("dashboard.upstreamStatusCodes")}}),{c(){pt(e.$$.fragment)},m(s,i){ut(e,s,i),n=!0},p(s,i){const l={};i&8&&(l.data=s[3]),i&2048&&(l.title=s[11]("dashboard.upstreamStatusCodes")),e.$set(l)},i(s){n||(Be(e.$$.fragment,s),n=!0)},o(s){Fe(e.$$.fragment,s),n=!1},d(s){ct(e,s)}}}function iv(t){let e,n,s,i=t[11]("monitoring.title")+"",l,o,r,u,f;const h=[Z2,K2,J2,Y2],p=[];function g(m,_){return m[2]&&!m[0]?0:m[1]?1:m[0]&&m[0].timestamps.length>0?2:3}return r=g(t),u=p[r]=h[r](t),{c(){e=d("div"),n=d("div"),s=d("h2"),l=E(i),o=w(),u.c(),c(s,"class","text-2xl font-bold"),c(e,"class","space-y-6")},m(m,_){H(m,e,_),a(e,n),a(n,s),a(s,l),a(e,o),p[r].m(e,null),f=!0},p(m,[_]){(!f||_&2048)&&i!==(i=m[11]("monitoring.title")+"")&&M(l,i);let b=r;r=g(m),r===b?p[r].p(m,_):(gs(),Fe(p[b],1,1,()=>{p[b]=null}),ms(),u=p[r],u?u.p(m,_):(u=p[r]=h[r](m),u.c()),Be(u,1),u.m(e,null))},i(m){f||(Be(u),f=!0)},o(m){Fe(u),f=!1},d(m){m&&L(e),p[r].d()}}}function lv(t,e,n){let s,i,l,o,r,u,f,h,p;Gt(t,Et,x=>n(11,p=x));let{selectedRange:g="1h"}=e,{onDataLoaded:m=()=>{}}=e,_=null,b=!0,k=null,v,y=[],S=[],C=[];async function T(){try{n(2,b=!0),n(0,_=await em(g)),n(1,k=null)}catch(x){n(1,k=x.message)}finally{n(2,b=!1)}}async function O(){try{const[x,P,D]=await Promise.all([tm(g),nm(g),sm(g)]);n(14,y=x.data),n(15,S=P.data),n(16,C=D.data)}catch(x){console.error("Failed to load upstream stats:",x)}finally{}}async function A(){await Promise.all([T(),O()])}return is(()=>{A(),v=setInterval(A,3e4)}),Ai(()=>{v&&clearInterval(v)}),t.$$set=x=>{"selectedRange"in x&&n(12,g=x.selectedRange),"onDataLoaded"in x&&n(13,m=x.onDataLoaded)},t.$$.update=()=>{t.$$.dirty&4096&&g&&A(),t.$$.dirty&8195&&(_!==null||k!==null)&&m(k?null:_),t.$$.dirty&4097&&n(10,s=_?.timestamps.map(x=>{const P=new Date(x);switch(g){case"1h":return P.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"});case"12h":return P.toLocaleString("zh-CN",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});case"24h":return P.toLocaleString("zh-CN",{month:"short",day:"numeric",hour:"2-digit"});default:return P.toLocaleTimeString("zh-CN")}})||[]),t.$$.dirty&1&&n(9,i=_?.requests||[]),t.$$.dirty&1&&n(8,l=_?.errors||[]),t.$$.dirty&1&&n(7,o=_?.responseTime||[]),t.$$.dirty&1&&n(6,r=_?.successRate||[]),t.$$.dirty&16384&&n(5,u=y.map(x=>({label:new URL(x.upstream).host,value:x.count,percentage:x.percentage}))),t.$$.dirty&32768&&n(4,f=(()=>{const x=S.reduce((P,D)=>P+D.failedRequests,0);return S.filter(P=>P.failedRequests>0).map(P=>({label:new URL(P.upstream).host,value:P.failedRequests,percentage:x>0?Math.round(P.failedRequests/x*100*100)/100:0}))})()),t.$$.dirty&65536&&n(3,h=C.map(x=>({label:new URL(x.upstream).host,status2xx:x.status2xx,status3xx:x.status3xx,status4xx:x.status4xx,status5xx:x.status5xx})))},[_,k,b,h,f,u,r,o,l,i,s,p,g,m,y,S,C]}class ov extends zt{constructor(e){super(),jt(this,e,lv,iv,Lt,{selectedRange:12,onDataLoaded:13})}}function rv(t){let e,n,s,i,l=t[2]("dashboard.totalRequests")+"",o,r,u,f,h,p,g,m=t[2]("dashboard.requestsPerSecond")+"",_,b,k,v,y,S,C,T=t[2]("dashboard.successRate")+"",O,A,x,P,D,I,R,U=t[2]("dashboard.avgResponseTime")+"",N,z,B;return{c(){e=d("div"),n=d("div"),s=d("div"),i=d("h2"),o=E(l),r=w(),u=d("p"),u.textContent="-",f=w(),h=d("div"),p=d("div"),g=d("h2"),_=E(m),b=w(),k=d("p"),k.textContent="-",v=w(),y=d("div"),S=d("div"),C=d("h2"),O=E(T),A=w(),x=d("p"),x.textContent="-",P=w(),D=d("div"),I=d("div"),R=d("h2"),N=E(U),z=w(),B=d("p"),B.textContent="-",c(i,"class","card-title text-sm"),c(u,"class","text-3xl font-bold"),c(s,"class","card-body"),c(n,"class","card bg-base-100 shadow-xl"),c(g,"class","card-title text-sm"),c(k,"class","text-3xl font-bold"),c(p,"class","card-body"),c(h,"class","card bg-base-100 shadow-xl"),c(C,"class","card-title text-sm"),c(x,"class","text-3xl font-bold"),c(S,"class","card-body"),c(y,"class","card bg-base-100 shadow-xl"),c(R,"class","card-title text-sm"),c(B,"class","text-3xl font-bold"),c(I,"class","card-body"),c(D,"class","card bg-base-100 shadow-xl"),c(e,"class","grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-8")},m(j,F){H(j,e,F),a(e,n),a(n,s),a(s,i),a(i,o),a(s,r),a(s,u),a(e,f),a(e,h),a(h,p),a(p,g),a(g,_),a(p,b),a(p,k),a(e,v),a(e,y),a(y,S),a(S,C),a(C,O),a(S,A),a(S,x),a(e,P),a(e,D),a(D,I),a(I,R),a(R,N),a(I,z),a(I,B)},p(j,F){F&4&&l!==(l=j[2]("dashboard.totalRequests")+"")&&M(o,l),F&4&&m!==(m=j[2]("dashboard.requestsPerSecond")+"")&&M(_,m),F&4&&T!==(T=j[2]("dashboard.successRate")+"")&&M(O,T),F&4&&U!==(U=j[2]("dashboard.avgResponseTime")+"")&&M(N,U)},d(j){j&&L(e)}}}function av(t){let e,n,s,i,l=t[2]("dashboard.totalRequests")+"",o,r,u,f=t[1].totalRequests+"",h,p,g,m,_,b=t[2]("dashboard.requestsPerSecond")+"",k,v,y,S=t[1].requestsPerSecond.toFixed(2)+"",C,T,O,A,x,P=t[2]("dashboard.successRate")+"",D,I,R,U=t[1].successRate.toFixed(1)+"",N,z,B,j,F,W,G=t[2]("dashboard.avgResponseTime")+"",Y,Q,le,Z=t[1].avgResponseTime.toFixed(0)+"",V,X;return{c(){e=d("div"),n=d("div"),s=d("div"),i=d("h2"),o=E(l),r=w(),u=d("p"),h=E(f),p=w(),g=d("div"),m=d("div"),_=d("h2"),k=E(b),v=w(),y=d("p"),C=E(S),T=w(),O=d("div"),A=d("div"),x=d("h2"),D=E(P),I=w(),R=d("p"),N=E(U),z=E("%"),B=w(),j=d("div"),F=d("div"),W=d("h2"),Y=E(G),Q=w(),le=d("p"),V=E(Z),X=E("ms"),c(i,"class","card-title text-sm"),c(u,"class","text-3xl font-bold"),c(s,"class","card-body"),c(n,"class","card bg-base-100 shadow-xl"),c(_,"class","card-title text-sm"),c(y,"class","text-3xl font-bold"),c(m,"class","card-body"),c(g,"class","card bg-base-100 shadow-xl"),c(x,"class","card-title text-sm"),c(R,"class","text-3xl font-bold"),c(A,"class","card-body"),c(O,"class","card bg-base-100 shadow-xl"),c(W,"class","card-title text-sm"),c(le,"class","text-3xl font-bold"),c(F,"class","card-body"),c(j,"class","card bg-base-100 shadow-xl"),c(e,"class","grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-8")},m(J,oe){H(J,e,oe),a(e,n),a(n,s),a(s,i),a(i,o),a(s,r),a(s,u),a(u,h),a(e,p),a(e,g),a(g,m),a(m,_),a(_,k),a(m,v),a(m,y),a(y,C),a(e,T),a(e,O),a(O,A),a(A,x),a(x,D),a(A,I),a(A,R),a(R,N),a(R,z),a(e,B),a(e,j),a(j,F),a(F,W),a(W,Y),a(F,Q),a(F,le),a(le,V),a(le,X)},p(J,oe){oe&4&&l!==(l=J[2]("dashboard.totalRequests")+"")&&M(o,l),oe&2&&f!==(f=J[1].totalRequests+"")&&M(h,f),oe&4&&b!==(b=J[2]("dashboard.requestsPerSecond")+"")&&M(k,b),oe&2&&S!==(S=J[1].requestsPerSecond.toFixed(2)+"")&&M(C,S),oe&4&&P!==(P=J[2]("dashboard.successRate")+"")&&M(D,P),oe&2&&U!==(U=J[1].successRate.toFixed(1)+"")&&M(N,U),oe&4&&G!==(G=J[2]("dashboard.avgResponseTime")+"")&&M(Y,G),oe&2&&Z!==(Z=J[1].avgResponseTime.toFixed(0)+"")&&M(V,Z)},d(J){J&&L(e)}}}function uv(t){let e,n,s=t[2]("dashboard.title")+"",i,l,o,r,u=t[2]("dashboard.dataRange")+"",f,h,p=t[2]("monitoring.range."+t[0])+"",g,m,_,b,k,v,y,S,C,T,O,A,x,P,D,I,R,U;function N(j,F){return j[1]?av:rv}let z=N(t),B=z(t);return P=new ov({props:{selectedRange:t[0],onDataLoaded:t[3]}}),I=Zp(t[5][0]),{c(){e=d("div"),n=d("h1"),i=E(s),l=w(),o=d("div"),r=d("p"),f=E(u),h=E(": "),g=E(p),m=w(),_=d("div"),b=d("input"),v=w(),y=d("input"),C=w(),T=d("input"),A=w(),B.c(),x=w(),pt(P.$$.fragment),c(n,"class","text-3xl font-bold mb-6"),c(r,"class","text-sm text-gray-500"),c(b,"class","join-item btn btn-sm"),c(b,"type","radio"),c(b,"name","range"),c(b,"aria-label",k=t[2]("monitoring.range.oneHour")),b.__value="1h",ie(b,b.__value),c(y,"class","join-item btn btn-sm"),c(y,"type","radio"),c(y,"name","range"),c(y,"aria-label",S=t[2]("monitoring.range.twelveHours")),y.__value="12h",ie(y,y.__value),c(T,"class","join-item btn btn-sm"),c(T,"type","radio"),c(T,"name","range"),c(T,"aria-label",O=t[2]("monitoring.range.twentyFourHours")),T.__value="24h",ie(T,T.__value),c(_,"class","join"),c(o,"class","flex justify-between items-center mb-6"),c(e,"class","p-6"),I.p(b,y,T)},m(j,F){H(j,e,F),a(e,n),a(n,i),a(e,l),a(e,o),a(o,r),a(r,f),a(r,h),a(r,g),a(o,m),a(o,_),a(_,b),b.checked=b.__value===t[0],a(_,v),a(_,y),y.checked=y.__value===t[0],a(_,C),a(_,T),T.checked=T.__value===t[0],a(e,A),B.m(e,null),a(e,x),ut(P,e,null),D=!0,R||(U=[te(b,"change",t[4]),te(y,"change",t[6]),te(T,"change",t[7])],R=!0)},p(j,[F]){(!D||F&4)&&s!==(s=j[2]("dashboard.title")+"")&&M(i,s),(!D||F&4)&&u!==(u=j[2]("dashboard.dataRange")+"")&&M(f,u),(!D||F&5)&&p!==(p=j[2]("monitoring.range."+j[0])+"")&&M(g,p),(!D||F&4&&k!==(k=j[2]("monitoring.range.oneHour")))&&c(b,"aria-label",k),F&1&&(b.checked=b.__value===j[0]),(!D||F&4&&S!==(S=j[2]("monitoring.range.twelveHours")))&&c(y,"aria-label",S),F&1&&(y.checked=y.__value===j[0]),(!D||F&4&&O!==(O=j[2]("monitoring.range.twentyFourHours")))&&c(T,"aria-label",O),F&1&&(T.checked=T.__value===j[0]),z===(z=N(j))&&B?B.p(j,F):(B.d(1),B=z(j),B&&(B.c(),B.m(e,x)));const W={};F&1&&(W.selectedRange=j[0]),P.$set(W)},i(j){D||(Be(P.$$.fragment,j),D=!0)},o(j){Fe(P.$$.fragment,j),D=!1},d(j){j&&L(e),B.d(),ct(P),I.r(),R=!1,at(U)}}}function cv(t){switch(t){case"1h":return 3600;case"12h":return 43200;case"24h":return 86400;default:return 3600}}function fv(t,e,n){let s;Gt(t,Et,g=>n(2,s=g));let i="1h",l=null;function o(g){n(1,l=r(g))}function r(g){if(!g||g.requests.length===0)return null;const m=g.requests.reduce((S,C)=>S+C,0),_=cv(i),b=m/_,k=g.errors.reduce((S,C)=>S+C,0),v=m>0?(m-k)/m*100:100,y=g.responseTime.length>0?g.responseTime.reduce((S,C)=>S+C,0)/g.responseTime.length:0;return{totalRequests:m,requestsPerSecond:b,successRate:v,avgResponseTime:y}}const u=[[]];function f(){i=this.__value,n(0,i)}function h(){i=this.__value,n(0,i)}function p(){i=this.__value,n(0,i)}return[i,l,s,o,f,u,h,p]}class hv extends zt{constructor(e){super(),jt(this,e,fv,uv,Lt,{})}}async function dv(){return dn.post("/system/reload",{})}async function pv(){return dn.post("/system/restart",{})}function fl(){const{subscribe:t,update:e}=Js([]);let n=0;return{subscribe:t,show:(s,i="info",l=3e3)=>{const o=n++,r={id:o,message:s,type:i,duration:l};return e(u=>[...u,r]),l>0&&setTimeout(()=>{e(u=>u.filter(f=>f.id!==o))},l),o},success:(s,i=3e3)=>fl().show(s,"success",i),error:(s,i=4e3)=>fl().show(s,"error",i),warning:(s,i=3500)=>fl().show(s,"warning",i),info:(s,i=3e3)=>fl().show(s,"info",i),remove:s=>{e(i=>i.filter(l=>l.id!==s))},clear:()=>{e(()=>[])}}}const bt=fl();function sc(t,e,n){const s=t.slice();return s[13]=e[n],s[14]=e,s[15]=n,s}function ic(t){let e,n=t[5]("auth.helpText")+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","label-text-alt text-xs")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l&32&&n!==(n=i[5]("auth.helpText")+"")&&M(s,n)},d(i){i&&L(e)}}}function lc(t){let e,n,s,i,l=t[5]("auth.tokens")+"",o,r,u=t[3].length+"",f,h,p,g,m,_,b,k,v,y,S=t[5]("auth.expressionSupport")+"",C,T,O,A,x,P,D,I,R=t[5]("auth.addToken")+"",U,N,z,B,j,F,W,G=t[5]("auth.securityNotice")+"",Y,Q,le,Z=et(t[3]),V=[];for(let X=0;X<Z.length;X+=1)V[X]=oc(sc(t,Z,X));return{c(){e=d("div"),n=d("input"),s=w(),i=d("div"),o=E(l),r=E(" ("),f=E(u),h=E(")"),p=w(),g=d("div"),m=d("div"),_=de("svg"),b=de("path"),k=w(),v=d("div"),y=d("div"),C=E(S),T=w(),O=d("div"),A=d("code"),A.textContent="{{ env.API_TOKEN }}",x=w();for(let X=0;X<V.length;X+=1)V[X].c();P=w(),D=d("button"),I=E("+ "),U=E(R),N=w(),z=d("div"),B=de("svg"),j=de("path"),F=w(),W=d("div"),Y=E(G),c(n,"type","checkbox"),n.checked=!0,c(i,"class","collapse-title text-sm font-medium"),c(b,"stroke-linecap","round"),c(b,"stroke-linejoin","round"),c(b,"stroke-width","2"),c(b,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(_,"xmlns","http://www.w3.org/2000/svg"),c(_,"fill","none"),c(_,"viewBox","0 0 24 24"),c(_,"class","stroke-current shrink-0 w-4 h-4 opacity-60"),c(A,"class","text-xs bg-base-300 px-1 rounded"),c(O,"class","mt-1"),c(m,"class","text-xs text-base-content/60 bg-base-200 rounded p-3 flex gap-2"),c(D,"type","button"),c(D,"class","btn btn-sm btn-ghost"),c(g,"class","collapse-content space-y-2"),c(e,"class","collapse collapse-arrow bg-base-200 collapse-open"),c(j,"stroke-linecap","round"),c(j,"stroke-linejoin","round"),c(j,"stroke-width","2"),c(j,"d","M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"),c(B,"xmlns","http://www.w3.org/2000/svg"),c(B,"fill","none"),c(B,"viewBox","0 0 24 24"),c(B,"class","stroke-current shrink-0 w-4 h-4"),c(z,"class","alert alert-warning shadow-sm text-xs")},m(X,J){H(X,e,J),a(e,n),a(e,s),a(e,i),a(i,o),a(i,r),a(i,f),a(i,h),a(e,p),a(e,g),a(g,m),a(m,_),a(_,b),a(m,k),a(m,v),a(v,y),a(y,C),a(v,T),a(v,O),a(O,A),a(g,x);for(let oe=0;oe<V.length;oe+=1)V[oe]&&V[oe].m(g,null);a(g,P),a(g,D),a(D,I),a(D,U),H(X,N,J),H(X,z,J),a(z,B),a(B,j),a(z,F),a(z,W),a(W,Y),Q||(le=te(D,"click",t[6]),Q=!0)},p(X,J){if(J&32&&l!==(l=X[5]("auth.tokens")+"")&&M(o,l),J&8&&u!==(u=X[3].length+"")&&M(f,u),J&32&&S!==(S=X[5]("auth.expressionSupport")+"")&&M(C,S),J&168){Z=et(X[3]);let oe;for(oe=0;oe<Z.length;oe+=1){const ne=sc(X,Z,oe);V[oe]?V[oe].p(ne,J):(V[oe]=oc(ne),V[oe].c(),V[oe].m(g,P))}for(;oe<V.length;oe+=1)V[oe].d(1);V.length=Z.length}J&32&&R!==(R=X[5]("auth.addToken")+"")&&M(U,R),J&32&&G!==(G=X[5]("auth.securityNotice")+"")&&M(Y,G)},d(X){X&&(L(e),L(N),L(z)),En(V,X),Q=!1,le()}}}function oc(t){let e,n,s,i,l,o,r;function u(){t[11].call(n,t[15])}function f(){return t[12](t[15])}return{c(){e=d("div"),n=d("input"),i=w(),l=d("button"),l.textContent="\u2715",c(n,"type","text"),c(n,"placeholder",s=t[5]("auth.tokenPlaceholder")),c(n,"class","input input-bordered input-sm flex-1 font-mono text-xs"),c(l,"type","button"),c(l,"class","btn btn-sm btn-error btn-square"),c(e,"class","flex gap-2")},m(h,p){H(h,e,p),a(e,n),ie(n,t[3][t[15]]),a(e,i),a(e,l),o||(r=[te(n,"input",u),te(l,"click",f)],o=!0)},p(h,p){t=h,p&32&&s!==(s=t[5]("auth.tokenPlaceholder"))&&c(n,"placeholder",s),p&8&&n.value!==t[3][t[15]]&&ie(n,t[3][t[15]])},d(h){h&&L(e),o=!1,at(r)}}}function gv(t){let e,n,s,i,l,o,r,u,f,h,p,g,m=t[5]("auth.enableAuth")+"",_,b,k,v,y=t[1]&&ic(t),S=t[2]&&lc(t);return{c(){e=d("div"),n=d("div"),s=d("span"),i=E(t[0]),l=w(),y&&y.c(),o=w(),r=d("div"),u=d("div"),f=d("label"),h=d("input"),p=w(),g=d("span"),_=E(m),b=w(),S&&S.c(),c(s,"class","label-text font-semibold"),c(n,"class","label"),c(h,"type","checkbox"),c(h,"class","checkbox"),c(g,"class","label-text"),c(f,"class","label cursor-pointer justify-start gap-4"),c(u,"class","form-control"),c(r,"class","space-y-4"),c(e,"class","form-control w-full")},m(C,T){H(C,e,T),a(e,n),a(n,s),a(s,i),a(n,l),y&&y.m(n,null),a(e,o),a(e,r),a(r,u),a(u,f),a(f,h),h.checked=t[2],a(f,p),a(f,g),a(g,_),a(r,b),S&&S.m(r,null),k||(v=[te(h,"change",t[9]),te(h,"change",t[10])],k=!0)},p(C,[T]){T&1&&M(i,C[0]),C[1]?y?y.p(C,T):(y=ic(C),y.c(),y.m(n,null)):y&&(y.d(1),y=null),T&4&&(h.checked=C[2]),T&32&&m!==(m=C[5]("auth.enableAuth")+"")&&M(_,m),C[2]?S?S.p(C,T):(S=lc(C),S.c(),S.m(r,null)):S&&(S.d(1),S=null)},i:Ee,o:Ee,d(C){C&&L(e),y&&y.d(),S&&S.d(),k=!1,at(v)}}}function mv(t,e,n){let s;Gt(t,Et,k=>n(5,s=k));let{value:i=void 0}=e,{label:l="Authentication"}=e,{showHelp:o=!0}=e,r=!1,u=[],f=!1;function h(){n(3,u=[...u,""]),n(4,f=!0)}function p(k){n(3,u=u.filter((v,y)=>y!==k))}function g(){r=this.checked,n(2,r),n(4,f),n(8,i),n(3,u)}const m=()=>{r&&u.length===0&&n(3,u=[""]),n(4,f=!0)};function _(k){u[k]=this.value,n(3,u),n(4,f),n(8,i),n(2,r)}const b=k=>p(k);return t.$$set=k=>{"value"in k&&n(8,i=k.value),"label"in k&&n(0,l=k.label),"showHelp"in k&&n(1,o=k.showHelp)},t.$$.update=()=>{if(t.$$.dirty&284)if(!f&&i&&(n(2,r=i.enabled||!1),n(3,u=i.tokens?[...i.tokens]:[]),n(4,f=!0)),r){const k=u.filter(v=>v.trim()!=="");i?(n(8,i.enabled=!0,i),n(8,i.tokens=k,i)):n(8,i={enabled:!0,tokens:k})}else i&&(n(8,i.enabled=!1,i),n(8,i.tokens=[],i))},[l,o,r,u,f,s,h,p,i,g,m,_,b]}class Ep extends zt{constructor(e){super(),jt(this,e,mv,gv,Lt,{value:8,label:0,showHelp:1})}}async function bv(t={}){const e=new URLSearchParams;return Object.entries(t).forEach(([n,s])=>{s!=null&&(Array.isArray(s)?s.forEach(i=>e.append(n,String(i))):e.append(n,String(s)))}),dn.get(\`/logs?\${e.toString()}\`)}async function _v(t={},e="json"){const n=new URLSearchParams;Object.entries(t).forEach(([i,l])=>{l!=null&&n.append(i,String(l))}),n.append("format",e);const s=await fetch(\`/__ui/api/logs/export?\${n.toString()}\`);if(!s.ok)throw new Error("Failed to export logs");return s.blob()}function vv(t=1e3){return new EventSource(\`/__ui/api/logs/stream?interval=\${t}\`)}async function or(t){return(await dn.get(\`/logs/body/\${t}\`)).content}async function rr(t){return dn.get(\`/logs/headers/\${t}\`)}async function yv(){return dn.get("/logs/cleanup/config")}async function wv(){return dn.post("/logs/cleanup")}function rc(t){let e,n;return{c(){e=d("h3"),n=E(t[1]),c(e,"class","text-lg font-semibold")},m(s,i){H(s,e,i),a(e,n)},p(s,i){i&2&&M(n,s[1])},d(s){s&&L(e)}}}function ac(t){let e,n,s,i,l=t[6]("logging.maxSize")+"",o,r,u,f,h,p,g,m,_,b=t[6]("logging.maxSizeHelp")+"",k,v,y,S,C,T=t[6]("logging.retentionDays")+"",O,A,x,P,D,I,R=t[6]("logging.days")+"",U,N,z,B,j=t[6]("logging.retentionDaysHelp")+"",F,W,G;return{c(){e=d("div"),n=d("div"),s=d("label"),i=d("span"),o=E(l),r=w(),u=d("div"),f=d("input"),h=w(),p=d("span"),p.textContent="KB",g=w(),m=d("div"),_=d("span"),k=E(b),v=w(),y=d("div"),S=d("label"),C=d("span"),O=E(T),A=w(),x=d("div"),P=d("input"),D=w(),I=d("span"),U=E(R),N=w(),z=d("div"),B=d("span"),F=E(j),c(i,"class","label-text"),c(s,"class","label"),c(s,"for","logging-max-size"),c(f,"id","logging-max-size"),c(f,"type","number"),c(f,"class","input input-bordered flex-1"),c(f,"min","1024"),c(f,"max","102400"),c(f,"step","1024"),c(p,"class","text-sm text-gray-500"),c(u,"class","flex gap-2 items-center"),c(_,"class","label-text-alt"),c(m,"class","label"),c(n,"class","form-control"),c(C,"class","label-text"),c(S,"class","label"),c(S,"for","logging-retention-days"),c(P,"id","logging-retention-days"),c(P,"type","number"),c(P,"class","input input-bordered flex-1"),c(P,"min","1"),c(P,"max","30"),c(I,"class","text-sm text-gray-500"),c(x,"class","flex gap-2 items-center"),c(B,"class","label-text-alt"),c(z,"class","label"),c(y,"class","form-control"),c(e,"class","ml-8 space-y-4")},m(Y,Q){H(Y,e,Q),a(e,n),a(n,s),a(s,i),a(i,o),a(n,r),a(n,u),a(u,f),ie(f,t[0].body.maxSize),a(u,h),a(u,p),a(n,g),a(n,m),a(m,_),a(_,k),a(e,v),a(e,y),a(y,S),a(S,C),a(C,O),a(y,A),a(y,x),a(x,P),ie(P,t[0].body.retentionDays),a(x,D),a(x,I),a(I,U),a(y,N),a(y,z),a(z,B),a(B,F),W||(G=[te(f,"input",t[10]),te(f,"input",t[7]),te(P,"input",t[11]),te(P,"input",t[7])],W=!0)},p(Y,Q){Q&64&&l!==(l=Y[6]("logging.maxSize")+"")&&M(o,l),Q&1&&gt(f.value)!==Y[0].body.maxSize&&ie(f,Y[0].body.maxSize),Q&64&&b!==(b=Y[6]("logging.maxSizeHelp")+"")&&M(k,b),Q&64&&T!==(T=Y[6]("logging.retentionDays")+"")&&M(O,T),Q&1&&gt(P.value)!==Y[0].body.retentionDays&&ie(P,Y[0].body.retentionDays),Q&64&&R!==(R=Y[6]("logging.days")+"")&&M(U,R),Q&64&&j!==(j=Y[6]("logging.retentionDaysHelp")+"")&&M(F,j)},d(Y){Y&&L(e),W=!1,at(G)}}}function kv(t){let e,n,s,i=t[6]("logging.cleanupStatus")+"",l,o,r,u=(t[2].isActive?t[6]("logging.active"):t[6]("logging.inactive"))+"",f,h,p,g,m,_=t[6]("logging.cleanupRetention")+"",b,k,v,y=t[2].retentionDays+"",S,C,T=t[6]("logging.days")+"",O,A,x,P,D=t[6]("logging.cleanupInterval")+"",I,R,U,N=t[2].scheduleIntervalHours+"",z,B,j=t[6]("logging.hours")+"",F,W,G,Y,Q=t[6]("logging.manualCleanup")+"",le,Z,V,X,J;function oe(K,q){return K[4]?Tv:Ev}let ne=oe(t),ee=ne(t),se=t[5]&&uc(t);return{c(){e=d("div"),n=d("div"),s=d("span"),l=E(i),o=w(),r=d("span"),f=E(u),p=w(),g=d("div"),m=d("span"),b=E(_),k=w(),v=d("span"),S=E(y),C=w(),O=E(T),A=w(),x=d("div"),P=d("span"),I=E(D),R=w(),U=d("span"),z=E(N),B=w(),F=E(j),W=w(),G=d("button"),ee.c(),Y=w(),le=E(Q),Z=w(),se&&se.c(),V=$n(),c(s,"class","text-gray-500"),c(r,"class",h="font-semibold "+(t[2].isActive?"text-success":"text-error")),c(n,"class","flex justify-between text-sm"),c(m,"class","text-gray-500"),c(v,"class","font-semibold"),c(g,"class","flex justify-between text-sm"),c(P,"class","text-gray-500"),c(U,"class","font-semibold"),c(x,"class","flex justify-between text-sm"),c(e,"class","bg-base-200 p-4 rounded-lg space-y-2"),c(G,"class","btn btn-outline btn-sm w-full"),G.disabled=t[4]},m(K,q){H(K,e,q),a(e,n),a(n,s),a(s,l),a(n,o),a(n,r),a(r,f),a(e,p),a(e,g),a(g,m),a(m,b),a(g,k),a(g,v),a(v,S),a(v,C),a(v,O),a(e,A),a(e,x),a(x,P),a(P,I),a(x,R),a(x,U),a(U,z),a(U,B),a(U,F),H(K,W,q),H(K,G,q),ee.m(G,null),a(G,Y),a(G,le),H(K,Z,q),se&&se.m(K,q),H(K,V,q),X||(J=te(G,"click",t[8]),X=!0)},p(K,q){q&64&&i!==(i=K[6]("logging.cleanupStatus")+"")&&M(l,i),q&68&&u!==(u=(K[2].isActive?K[6]("logging.active"):K[6]("logging.inactive"))+"")&&M(f,u),q&4&&h!==(h="font-semibold "+(K[2].isActive?"text-success":"text-error"))&&c(r,"class",h),q&64&&_!==(_=K[6]("logging.cleanupRetention")+"")&&M(b,_),q&4&&y!==(y=K[2].retentionDays+"")&&M(S,y),q&64&&T!==(T=K[6]("logging.days")+"")&&M(O,T),q&64&&D!==(D=K[6]("logging.cleanupInterval")+"")&&M(I,D),q&4&&N!==(N=K[2].scheduleIntervalHours+"")&&M(z,N),q&64&&j!==(j=K[6]("logging.hours")+"")&&M(F,j),ne!==(ne=oe(K))&&(ee.d(1),ee=ne(K),ee&&(ee.c(),ee.m(G,Y))),q&64&&Q!==(Q=K[6]("logging.manualCleanup")+"")&&M(le,Q),q&16&&(G.disabled=K[4]),K[5]?se?se.p(K,q):(se=uc(K),se.c(),se.m(V.parentNode,V)):se&&(se.d(1),se=null)},d(K){K&&(L(e),L(W),L(G),L(Z),L(V)),ee.d(),se&&se.d(K),X=!1,J()}}}function Sv(t){let e,n,s,i,l=t[6]("common.loading")+"",o;return{c(){e=d("div"),n=d("span"),s=w(),i=d("span"),o=E(l),c(n,"class","loading loading-spinner loading-sm"),c(i,"class","text-sm"),c(e,"class","flex items-center gap-2")},m(r,u){H(r,e,u),a(e,n),a(e,s),a(e,i),a(i,o)},p(r,u){u&64&&l!==(l=r[6]("common.loading")+"")&&M(o,l)},d(r){r&&L(e)}}}function Ev(t){let e,n;return{c(){e=de("svg"),n=de("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(s,i){H(s,e,i),a(e,n)},d(s){s&&L(e)}}}function Tv(t){let e;return{c(){e=d("span"),c(e,"class","loading loading-spinner loading-xs")},m(n,s){H(n,e,s)},d(n){n&&L(e)}}}function uc(t){let e,n,s,i,l,o,r=t[6]("logging.lastCleanup")+"",u,f,h,p,g=t[6]("logging.deletedSqliteRecords")+"",m,_,b=t[5].deletedSqliteRecords+"",k,v,y,S=t[6]("logging.deletedFileLogFiles")+"",C,T,O=t[5].deletedFileLogFiles+"",A,x,P,D=t[6]("logging.deletedBodyFiles")+"",I,R,U=t[5].deletedBodyDirs+"",N,z,B=t[6]("logging.dirs")+"",j,F,W=t[5].deletedBodyFiles+"",G,Y,Q=t[6]("logging.files")+"",le,Z,V,X=t[6]("logging.duration")+"",J,oe,ne=t[5].durationMs+"",ee,se;return{c(){e=d("div"),n=de("svg"),s=de("path"),i=w(),l=d("div"),o=d("div"),u=E(r),f=w(),h=d("div"),p=d("div"),m=E(g),_=E(": "),k=E(b),v=w(),y=d("div"),C=E(S),T=E(": "),A=E(O),x=w(),P=d("div"),I=E(D),R=E(": "),N=E(U),z=w(),j=E(B),F=E(", "),G=E(W),Y=w(),le=E(Q),Z=w(),V=d("div"),J=E(X),oe=E(": "),ee=E(ne),se=E("ms"),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-6 w-6"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(o,"class","font-semibold"),c(h,"class","mt-1 space-y-1"),c(l,"class","text-sm"),c(e,"class","alert alert-success")},m(K,q){H(K,e,q),a(e,n),a(n,s),a(e,i),a(e,l),a(l,o),a(o,u),a(l,f),a(l,h),a(h,p),a(p,m),a(p,_),a(p,k),a(h,v),a(h,y),a(y,C),a(y,T),a(y,A),a(h,x),a(h,P),a(P,I),a(P,R),a(P,N),a(P,z),a(P,j),a(P,F),a(P,G),a(P,Y),a(P,le),a(h,Z),a(h,V),a(V,J),a(V,oe),a(V,ee),a(V,se)},p(K,q){q&64&&r!==(r=K[6]("logging.lastCleanup")+"")&&M(u,r),q&64&&g!==(g=K[6]("logging.deletedSqliteRecords")+"")&&M(m,g),q&32&&b!==(b=K[5].deletedSqliteRecords+"")&&M(k,b),q&64&&S!==(S=K[6]("logging.deletedFileLogFiles")+"")&&M(C,S),q&32&&O!==(O=K[5].deletedFileLogFiles+"")&&M(A,O),q&64&&D!==(D=K[6]("logging.deletedBodyFiles")+"")&&M(I,D),q&32&&U!==(U=K[5].deletedBodyDirs+"")&&M(N,U),q&64&&B!==(B=K[6]("logging.dirs")+"")&&M(j,B),q&32&&W!==(W=K[5].deletedBodyFiles+"")&&M(G,W),q&64&&Q!==(Q=K[6]("logging.files")+"")&&M(le,Q),q&64&&X!==(X=K[6]("logging.duration")+"")&&M(J,X),q&32&&ne!==(ne=K[5].durationMs+"")&&M(ee,ne)},d(K){K&&L(e)}}}function Mv(t){let e,n,s,i,l,o,r,u,f=t[6]("logging.bodyRecording")+"",h,p,g,m=t[6]("logging.bodyRecordingHelp")+"",_,b,k,v,y,S,C=t[6]("logging.cleanupConfig")+"",T,O,A,x,P=t[1]&&rc(t),D=t[0].body.enabled&&ac(t);function I(N,z){if(N[3])return Sv;if(N[2])return kv}let R=I(t),U=R&&R(t);return{c(){e=d("div"),P&&P.c(),n=w(),s=d("div"),i=d("label"),l=d("input"),o=w(),r=d("div"),u=d("span"),h=E(f),p=w(),g=d("p"),_=E(m),b=w(),D&&D.c(),k=w(),v=d("div"),y=w(),S=d("h4"),T=E(C),O=w(),U&&U.c(),c(l,"type","checkbox"),c(l,"class","checkbox"),c(u,"class","label-text font-semibold"),c(g,"class","text-xs text-gray-500 mt-1"),c(r,"class","flex-1"),c(i,"class","label cursor-pointer justify-start gap-4"),c(s,"class","form-control"),c(v,"class","divider"),c(S,"class","font-semibold"),c(e,"class","space-y-4")},m(N,z){H(N,e,z),P&&P.m(e,null),a(e,n),a(e,s),a(s,i),a(i,l),l.checked=t[0].body.enabled,a(i,o),a(i,r),a(r,u),a(u,h),a(r,p),a(r,g),a(g,_),a(e,b),D&&D.m(e,null),a(e,k),a(e,v),a(e,y),a(e,S),a(S,T),a(e,O),U&&U.m(e,null),A||(x=[te(l,"change",t[9]),te(l,"change",t[7])],A=!0)},p(N,[z]){N[1]?P?P.p(N,z):(P=rc(N),P.c(),P.m(e,n)):P&&(P.d(1),P=null),z&1&&(l.checked=N[0].body.enabled),z&64&&f!==(f=N[6]("logging.bodyRecording")+"")&&M(h,f),z&64&&m!==(m=N[6]("logging.bodyRecordingHelp")+"")&&M(_,m),N[0].body.enabled?D?D.p(N,z):(D=ac(N),D.c(),D.m(e,k)):D&&(D.d(1),D=null),z&64&&C!==(C=N[6]("logging.cleanupConfig")+"")&&M(T,C),R===(R=I(N))&&U?U.p(N,z):(U&&U.d(1),U=R&&R(N),U&&(U.c(),U.m(e,null)))},i:Ee,o:Ee,d(N){N&&L(e),P&&P.d(),D&&D.d(),U&&U.d(),A=!1,at(x)}}}function Cv(t,e,n){let s;Gt(t,Et,v=>n(6,s=v));let{value:i=null}=e,{label:l=""}=e;const o=Rl();let r=null,u=!1,f=!1,h=null;function p(){o("input")}async function g(){n(3,u=!0);try{n(2,r=await yv())}catch(v){console.error("Failed to load cleanup config:",v),bt.show(s("common.error")+": "+(v instanceof Error?v.message:"Unknown error"),"error")}finally{n(3,u=!1)}}async function m(){if(confirm(s("logging.confirmCleanup"))){n(4,f=!0);try{n(5,h=await wv()),bt.show(s("logging.cleanupSuccess"),"success"),await g()}catch(v){console.error("Failed to trigger cleanup:",v),bt.show(s("logging.cleanupFailed",{values:{error:v instanceof Error?v.message:"Unknown error"}}),"error")}finally{n(4,f=!1)}}}is(()=>{g()});function _(){i.body.enabled=this.checked,n(0,i)}function b(){i.body.maxSize=gt(this.value),n(0,i)}function k(){i.body.retentionDays=gt(this.value),n(0,i)}return t.$$set=v=>{"value"in v&&n(0,i=v.value),"label"in v&&n(1,l=v.label)},t.$$.update=()=>{t.$$.dirty&1&&(i||n(0,i={body:{enabled:!1,maxSize:5120,retentionDays:1}})),t.$$.dirty&1&&i&&!i.body&&n(0,i.body={enabled:!1,maxSize:5120,retentionDays:1},i)},[i,l,r,u,f,h,s,p,m,_,b,k]}class Pv extends zt{constructor(e){super(),jt(this,e,Cv,Mv,Lt,{value:0,label:1})}}function Av(t){let e,n;return{c(){e=de("svg"),n=de("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3m-1 4l-3 3m0 0l-3-3m3 3V4"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(s,i){H(s,e,i),a(e,n)},d(s){s&&L(e)}}}function Ov(t){let e;return{c(){e=d("span"),c(e,"class","loading loading-spinner loading-xs")},m(n,s){H(n,e,s)},d(n){n&&L(e)}}}function xv(t){let e,n;return{c(){e=de("svg"),n=de("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(s,i){H(s,e,i),a(e,n)},d(s){s&&L(e)}}}function Rv(t){let e;return{c(){e=d("span"),c(e,"class","loading loading-spinner loading-xs")},m(n,s){H(n,e,s)},d(n){n&&L(e)}}}function Dv(t){let e,n;return{c(){e=de("svg"),n=de("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(s,i){H(s,e,i),a(e,n)},d(s){s&&L(e)}}}function Lv(t){let e;return{c(){e=d("span"),c(e,"class","loading loading-spinner loading-xs")},m(n,s){H(n,e,s)},d(n){n&&L(e)}}}function Hv(t){let e,n,s=t[11]("configuration.formEditor")+"",i,l,o,r=t[11]("configuration.jsonEditor")+"",u,f,h,p,g,m,_,b;const k=[Nv,Fv],v=[];function y(S,C){return S[7]==="form"?0:1}return h=y(t),p=v[h]=k[h](t),{c(){e=d("div"),n=d("button"),i=E(s),l=w(),o=d("button"),u=E(r),f=w(),p.c(),g=$n(),c(n,"class","tab"),Rt(n,"tab-active",t[7]==="form"),c(o,"class","tab"),Rt(o,"tab-active",t[7]==="json"),c(e,"class","tabs tabs-boxed mb-4")},m(S,C){H(S,e,C),a(e,n),a(n,i),a(e,l),a(e,o),a(o,u),H(S,f,C),v[h].m(S,C),H(S,g,C),m=!0,_||(b=[te(n,"click",t[19]),te(o,"click",t[20])],_=!0)},p(S,C){(!m||C&2048)&&s!==(s=S[11]("configuration.formEditor")+"")&&M(i,s),(!m||C&128)&&Rt(n,"tab-active",S[7]==="form"),(!m||C&2048)&&r!==(r=S[11]("configuration.jsonEditor")+"")&&M(u,r),(!m||C&128)&&Rt(o,"tab-active",S[7]==="json");let T=h;h=y(S),h===T?v[h].p(S,C):(gs(),Fe(v[T],1,1,()=>{v[T]=null}),ms(),p=v[h],p?p.p(S,C):(p=v[h]=k[h](S),p.c()),Be(p,1),p.m(g.parentNode,g))},i(S){m||(Be(p),m=!0)},o(S){Fe(p),m=!1},d(S){S&&(L(e),L(f),L(g)),v[h].d(S),_=!1,at(b)}}}function Iv(t){let e,n,s,i,l,o=t[11]("common.error")+"",r,u,f;return{c(){e=d("div"),n=de("svg"),s=de("path"),i=w(),l=d("span"),r=E(o),u=E(": "),f=E(t[2]),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-6 w-6"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(e,"class","alert alert-error")},m(h,p){H(h,e,p),a(e,n),a(n,s),a(e,i),a(e,l),a(l,r),a(l,u),a(l,f)},p(h,p){p&2048&&o!==(o=h[11]("common.error")+"")&&M(r,o),p&4&&M(f,h[2])},i:Ee,o:Ee,d(h){h&&L(e)}}}function Bv(t){let e;return{c(){e=d("div"),e.innerHTML='<span class="loading loading-spinner loading-lg"></span>',c(e,"class","flex justify-center items-center h-64")},m(n,s){H(n,e,s)},p:Ee,i:Ee,o:Ee,d(n){n&&L(e)}}}function Fv(t){let e,n,s,i=t[11]("configuration.jsonConfiguration")+"",l,o,r,u,f,h,p,g=t[11]("configuration.jsonHelp")+"",m,_,b,k=t[9]&&cc(t);return{c(){e=d("div"),n=d("div"),s=d("h2"),l=E(i),o=w(),k&&k.c(),r=w(),u=d("textarea"),h=w(),p=d("p"),m=E(g),c(s,"class","card-title"),c(u,"class","textarea textarea-bordered font-mono text-sm h-96"),c(u,"placeholder",f=t[11]("configuration.jsonPlaceholder")),c(p,"class","text-sm text-gray-500 mt-2"),c(n,"class","card-body"),c(e,"class","card bg-base-100 shadow-xl")},m(v,y){H(v,e,y),a(e,n),a(n,s),a(s,l),a(n,o),k&&k.m(n,null),a(n,r),a(n,u),ie(u,t[8]),a(n,h),a(n,p),a(p,m),_||(b=[te(u,"input",t[27]),te(u,"input",t[12])],_=!0)},p(v,y){y&2048&&i!==(i=v[11]("configuration.jsonConfiguration")+"")&&M(l,i),v[9]?k?k.p(v,y):(k=cc(v),k.c(),k.m(n,r)):k&&(k.d(1),k=null),y&2048&&f!==(f=v[11]("configuration.jsonPlaceholder"))&&c(u,"placeholder",f),y&256&&ie(u,v[8]),y&2048&&g!==(g=v[11]("configuration.jsonHelp")+"")&&M(m,g)},i:Ee,o:Ee,d(v){v&&L(e),k&&k.d(),_=!1,at(b)}}}function Nv(t){let e,n,s,i=t[11]("configuration.systemSettings")+"",l,o,r,u,f,h=t[11]("configuration.serverPort")+"",p,g,m,_,b,k,v,y=t[11]("configuration.workerProcesses")+"",S,C,T,O,A,x,P=t[11]("configuration.workerProcessesHelp")+"",D,I,R,U,N,z=t[11]("configuration.logLevel")+"",B,j,F,W,G,Y,Q,le,Z,V,X,J=t[11]("configuration.bodyParserLimit")+"",oe,ne,ee,se,K,q,ce=t[11]("configuration.bodyParserLimitHelp")+"",he,ke,we,pe,me,Pe,Se,Ce,_e,Ae,ye,$,ue,ae,ge=t[11]("configuration.requiresRestart")+"",re,Ne,Ye,Ve,Qe,st=t[11]("logging.title")+"",Xe,vt,rt,He,$e,Oe,ft,qe,Re=t[11]("routes.title")+"",ze,ve,Je,be,We,yt,Ke,Ie=t[11]("configuration.routesConfigured",{values:{count:t[1].routes.length}})+"",kt,nt,ht=t[11]("configuration.manageRoutes")+"",Ot,Te,it,De;function tt(xe){t[25](xe)}let Ht={label:t[11]("auth.globalAuth")};t[1].auth!==void 0&&(Ht.value=t[1].auth),me=new Ep({props:Ht}),vn.push(()=>Kn(me,"value",tt));function Rn(xe){t[26](xe)}let pn={};return t[1].logging!==void 0&&(pn.value=t[1].logging),rt=new Pv({props:pn}),vn.push(()=>Kn(rt,"value",Rn)),{c(){e=d("div"),n=d("div"),s=d("h2"),l=E(i),o=w(),r=d("div"),u=d("label"),f=d("span"),p=E(h),g=w(),m=d("input"),_=w(),b=d("div"),k=d("label"),v=d("span"),S=E(y),C=w(),T=d("input"),O=w(),A=d("div"),x=d("span"),D=E(P),I=w(),R=d("div"),U=d("label"),N=d("span"),B=E(z),j=w(),F=d("select"),W=d("option"),W.textContent="Debug",G=d("option"),G.textContent="Info",Y=d("option"),Y.textContent="Warning",Q=d("option"),Q.textContent="Error",le=w(),Z=d("div"),V=d("label"),X=d("span"),oe=E(J),ne=w(),ee=d("input"),se=w(),K=d("div"),q=d("span"),he=E(ce),ke=w(),we=d("div"),pe=w(),pt(me.$$.fragment),Se=w(),Ce=d("div"),_e=w(),Ae=d("div"),ye=de("svg"),$=de("path"),ue=w(),ae=d("span"),re=E(ge),Ne=w(),Ye=d("div"),Ve=d("div"),Qe=d("h2"),Xe=E(st),vt=w(),pt(rt.$$.fragment),$e=w(),Oe=d("div"),ft=d("div"),qe=d("h2"),ze=E(Re),ve=w(),Je=d("div"),be=de("svg"),We=de("path"),yt=w(),Ke=d("span"),kt=E(Ie),nt=w(),Ot=E(ht),c(s,"class","card-title"),c(f,"class","label-text"),c(u,"class","label"),c(u,"for","config-port"),c(m,"id","config-port"),c(m,"type","number"),c(m,"class","input input-bordered"),c(m,"placeholder","8088"),c(r,"class","form-control"),c(v,"class","label-text"),c(k,"class","label"),c(k,"for","config-workers"),c(T,"id","config-workers"),c(T,"type","number"),c(T,"class","input input-bordered"),c(T,"min","1"),c(T,"placeholder","2"),c(x,"class","label-text-alt"),c(A,"class","label"),c(b,"class","form-control"),c(N,"class","label-text"),c(U,"class","label"),c(U,"for","config-log-level"),W.__value="debug",ie(W,W.__value),G.__value="info",ie(G,G.__value),Y.__value="warn",ie(Y,Y.__value),Q.__value="error",ie(Q,Q.__value),c(F,"id","config-log-level"),c(F,"class","select select-bordered"),t[1].logLevel===void 0&&bs(()=>t[23].call(F)),c(R,"class","form-control"),c(X,"class","label-text"),c(V,"class","label"),c(V,"for","config-body-limit"),c(ee,"id","config-body-limit"),c(ee,"type","text"),c(ee,"class","input input-bordered"),c(ee,"placeholder","50mb"),c(q,"class","label-text-alt"),c(K,"class","label"),c(Z,"class","form-control"),c(we,"class","divider"),c(Ce,"class","divider"),c($,"stroke-linecap","round"),c($,"stroke-linejoin","round"),c($,"stroke-width","2"),c($,"d","M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"),c(ye,"xmlns","http://www.w3.org/2000/svg"),c(ye,"class","stroke-current shrink-0 h-6 w-6"),c(ye,"fill","none"),c(ye,"viewBox","0 0 24 24"),c(Ae,"class","alert alert-warning"),c(n,"class","card-body"),c(e,"class","card bg-base-100 shadow-xl mb-4"),c(Qe,"class","card-title"),c(Ve,"class","card-body"),c(Ye,"class","card bg-base-100 shadow-xl mb-4"),c(qe,"class","card-title"),c(We,"stroke-linecap","round"),c(We,"stroke-linejoin","round"),c(We,"stroke-width","2"),c(We,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(be,"xmlns","http://www.w3.org/2000/svg"),c(be,"fill","none"),c(be,"viewBox","0 0 24 24"),c(be,"class","stroke-current shrink-0 w-6 h-6"),c(Je,"class","alert alert-info"),c(ft,"class","card-body"),c(Oe,"class","card bg-base-100 shadow-xl")},m(xe,lt){H(xe,e,lt),a(e,n),a(n,s),a(s,l),a(n,o),a(n,r),a(r,u),a(u,f),a(f,p),a(r,g),a(r,m),ie(m,t[1].port),a(n,_),a(n,b),a(b,k),a(k,v),a(v,S),a(b,C),a(b,T),ie(T,t[1].workers),a(b,O),a(b,A),a(A,x),a(x,D),a(n,I),a(n,R),a(R,U),a(U,N),a(N,B),a(R,j),a(R,F),a(F,W),a(F,G),a(F,Y),a(F,Q),Cn(F,t[1].logLevel,!0),a(n,le),a(n,Z),a(Z,V),a(V,X),a(X,oe),a(Z,ne),a(Z,ee),ie(ee,t[1].bodyParserLimit),a(Z,se),a(Z,K),a(K,q),a(q,he),a(n,ke),a(n,we),a(n,pe),ut(me,n,null),a(n,Se),a(n,Ce),a(n,_e),a(n,Ae),a(Ae,ye),a(ye,$),a(Ae,ue),a(Ae,ae),a(ae,re),H(xe,Ne,lt),H(xe,Ye,lt),a(Ye,Ve),a(Ve,Qe),a(Qe,Xe),a(Ve,vt),ut(rt,Ve,null),H(xe,$e,lt),H(xe,Oe,lt),a(Oe,ft),a(ft,qe),a(qe,ze),a(ft,ve),a(ft,Je),a(Je,be),a(be,We),a(Je,yt),a(Je,Ke),a(Ke,kt),a(Ke,nt),a(Ke,Ot),Te=!0,it||(De=[te(m,"input",t[21]),te(T,"input",t[22]),te(F,"change",t[23]),te(ee,"input",t[24])],it=!0)},p(xe,lt){(!Te||lt&2048)&&i!==(i=xe[11]("configuration.systemSettings")+"")&&M(l,i),(!Te||lt&2048)&&h!==(h=xe[11]("configuration.serverPort")+"")&&M(p,h),lt&2&&gt(m.value)!==xe[1].port&&ie(m,xe[1].port),(!Te||lt&2048)&&y!==(y=xe[11]("configuration.workerProcesses")+"")&&M(S,y),lt&2&&gt(T.value)!==xe[1].workers&&ie(T,xe[1].workers),(!Te||lt&2048)&&P!==(P=xe[11]("configuration.workerProcessesHelp")+"")&&M(D,P),(!Te||lt&2048)&&z!==(z=xe[11]("configuration.logLevel")+"")&&M(B,z),lt&2&&Cn(F,xe[1].logLevel),(!Te||lt&2048)&&J!==(J=xe[11]("configuration.bodyParserLimit")+"")&&M(oe,J),lt&2&&ee.value!==xe[1].bodyParserLimit&&ie(ee,xe[1].bodyParserLimit),(!Te||lt&2048)&&ce!==(ce=xe[11]("configuration.bodyParserLimitHelp")+"")&&M(he,ce);const an={};lt&2048&&(an.label=xe[11]("auth.globalAuth")),!Pe&&lt&2&&(Pe=!0,an.value=xe[1].auth,Jn(()=>Pe=!1)),me.$set(an),(!Te||lt&2048)&&ge!==(ge=xe[11]("configuration.requiresRestart")+"")&&M(re,ge),(!Te||lt&2048)&&st!==(st=xe[11]("logging.title")+"")&&M(Xe,st);const Mt={};!He&&lt&2&&(He=!0,Mt.value=xe[1].logging,Jn(()=>He=!1)),rt.$set(Mt),(!Te||lt&2048)&&Re!==(Re=xe[11]("routes.title")+"")&&M(ze,Re),(!Te||lt&2050)&&Ie!==(Ie=xe[11]("configuration.routesConfigured",{values:{count:xe[1].routes.length}})+"")&&M(kt,Ie),(!Te||lt&2048)&&ht!==(ht=xe[11]("configuration.manageRoutes")+"")&&M(Ot,ht)},i(xe){Te||(Be(me.$$.fragment,xe),Be(rt.$$.fragment,xe),Te=!0)},o(xe){Fe(me.$$.fragment,xe),Fe(rt.$$.fragment,xe),Te=!1},d(xe){xe&&(L(e),L(Ne),L(Ye),L($e),L(Oe)),ct(me),ct(rt),it=!1,at(De)}}}function cc(t){let e,n,s,i,l,o=t[11]("configuration.jsonParseError",{values:{error:t[9]}})+"",r;return{c(){e=d("div"),n=de("svg"),s=de("path"),i=w(),l=d("span"),r=E(o),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-6 w-6"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(e,"class","alert alert-error mb-4")},m(u,f){H(u,e,f),a(e,n),a(n,s),a(e,i),a(e,l),a(l,r)},p(u,f){f&2560&&o!==(o=u[11]("configuration.jsonParseError",{values:{error:u[9]}})+"")&&M(r,o)},d(u){u&&L(e)}}}function jv(t){let e,n,s,i,l=t[11]("configuration.title")+"",o,r,u,f=t[11]("configuration.subtitle")+"",h,p,g,m,_,b,k,v=t[11]("configuration.export")+"",y,S,C,T,O,A,x,P=t[11]("configuration.import")+"",D,I,R,U,N=t[11]("configuration.save")+"",z,B,j,F,W,G=t[11]("configuration.reload")+"",Y,Q,le,Z,V,X=t[11]("configuration.restart")+"",J,oe,ne,ee,se,K,q,ce,he,ke,we,pe=t[11]("configuration.confirmRestart")+"",me,Pe,Se,Ce=t[11]("configuration.restartMessage")+"",_e,Ae,ye,$,ue,ae,ge,re=t[11]("configuration.restartWarning")+"",Ne,Ye,Ve,Qe,st=t[11]("common.cancel")+"",Xe,vt,rt,He,$e,Oe,ft=t[11]("configuration.restart")+"",qe,Re,ze,ve;function Je(De,tt){return De[6]?Ov:Av}let be=Je(t),We=be(t);function yt(De,tt){return De[4]?Rv:xv}let Ke=yt(t),Ie=Ke(t);function kt(De,tt){return De[5]?Lv:Dv}let nt=kt(t),ht=nt(t);const Ot=[Bv,Iv,Hv],Te=[];function it(De,tt){return De[3]?0:De[2]?1:De[1]?2:-1}return~(ee=it(t))&&(se=Te[ee]=Ot[ee](t)),{c(){e=d("div"),n=d("div"),s=d("div"),i=d("h1"),o=E(l),r=w(),u=d("p"),h=E(f),p=w(),g=d("div"),m=d("button"),_=de("svg"),b=de("path"),k=w(),y=E(v),C=w(),T=d("button"),O=de("svg"),A=de("path"),x=w(),D=E(P),I=w(),R=d("button"),We.c(),U=w(),z=E(N),j=w(),F=d("button"),Ie.c(),W=w(),Y=E(G),le=w(),Z=d("button"),ht.c(),V=w(),J=E(X),ne=w(),se&&se.c(),K=w(),q=d("input"),ce=w(),he=d("div"),ke=d("div"),we=d("h3"),me=E(pe),Pe=w(),Se=d("p"),_e=E(Ce),Ae=w(),ye=d("div"),$=de("svg"),ue=de("path"),ae=w(),ge=d("span"),Ne=E(re),Ye=w(),Ve=d("div"),Qe=d("button"),Xe=E(st),vt=w(),rt=d("button"),He=de("svg"),$e=de("path"),Oe=w(),qe=E(ft),c(i,"class","text-3xl font-bold"),c(u,"class","text-sm text-gray-500 mt-1"),c(b,"stroke-linecap","round"),c(b,"stroke-linejoin","round"),c(b,"stroke-width","2"),c(b,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),c(_,"xmlns","http://www.w3.org/2000/svg"),c(_,"class","h-4 w-4"),c(_,"fill","none"),c(_,"viewBox","0 0 24 24"),c(_,"stroke","currentColor"),c(m,"class","btn btn-outline btn-sm"),m.disabled=S=t[3]||!t[0],c(A,"stroke-linecap","round"),c(A,"stroke-linejoin","round"),c(A,"stroke-width","2"),c(A,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"),c(O,"xmlns","http://www.w3.org/2000/svg"),c(O,"class","h-4 w-4"),c(O,"fill","none"),c(O,"viewBox","0 0 24 24"),c(O,"stroke","currentColor"),c(T,"class","btn btn-outline btn-sm"),T.disabled=t[3],c(R,"class","btn btn-success btn-sm"),R.disabled=B=t[6]||t[3]||!!t[9],c(F,"class","btn btn-primary btn-sm"),F.disabled=Q=t[4]||t[3],c(Z,"class","btn btn-warning btn-sm"),Z.disabled=oe=t[5]||t[3],c(g,"class","flex gap-2"),c(n,"class","flex justify-between items-center mb-6"),c(q,"type","checkbox"),c(q,"class","modal-toggle"),c(we,"class","font-bold text-lg"),c(Se,"class","py-4"),c(ue,"stroke-linecap","round"),c(ue,"stroke-linejoin","round"),c(ue,"stroke-width","2"),c(ue,"d","M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"),c($,"xmlns","http://www.w3.org/2000/svg"),c($,"class","stroke-current shrink-0 h-6 w-6"),c($,"fill","none"),c($,"viewBox","0 0 24 24"),c(ye,"class","alert alert-warning"),c(Qe,"class","btn btn-ghost"),c($e,"stroke-linecap","round"),c($e,"stroke-linejoin","round"),c($e,"stroke-width","2"),c($e,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),c(He,"xmlns","http://www.w3.org/2000/svg"),c(He,"class","h-4 w-4 mr-1"),c(He,"fill","none"),c(He,"viewBox","0 0 24 24"),c(He,"stroke","currentColor"),c(rt,"class","btn btn-warning"),c(Ve,"class","modal-action"),c(ke,"class","modal-box"),c(he,"class","modal"),Rt(he,"modal-open",t[10]),c(e,"class","p-6")},m(De,tt){H(De,e,tt),a(e,n),a(n,s),a(s,i),a(i,o),a(s,r),a(s,u),a(u,h),a(n,p),a(n,g),a(g,m),a(m,_),a(_,b),a(m,k),a(m,y),a(g,C),a(g,T),a(T,O),a(O,A),a(T,x),a(T,D),a(g,I),a(g,R),We.m(R,null),a(R,U),a(R,z),a(g,j),a(g,F),Ie.m(F,null),a(F,W),a(F,Y),a(g,le),a(g,Z),ht.m(Z,null),a(Z,V),a(Z,J),a(e,ne),~ee&&Te[ee].m(e,null),a(e,K),a(e,q),q.checked=t[10],a(e,ce),a(e,he),a(he,ke),a(ke,we),a(we,me),a(ke,Pe),a(ke,Se),a(Se,_e),a(ke,Ae),a(ke,ye),a(ye,$),a($,ue),a(ye,ae),a(ye,ge),a(ge,Ne),a(ke,Ye),a(ke,Ve),a(Ve,Qe),a(Qe,Xe),a(Ve,vt),a(Ve,rt),a(rt,He),a(He,$e),a(rt,Oe),a(rt,qe),Re=!0,ze||(ve=[te(m,"click",t[14]),te(T,"click",t[15]),te(R,"click",t[13]),te(F,"click",t[16]),te(Z,"click",t[18]),te(q,"change",t[28]),te(Qe,"click",t[29]),te(rt,"click",t[17])],ze=!0)},p(De,[tt]){(!Re||tt&2048)&&l!==(l=De[11]("configuration.title")+"")&&M(o,l),(!Re||tt&2048)&&f!==(f=De[11]("configuration.subtitle")+"")&&M(h,f),(!Re||tt&2048)&&v!==(v=De[11]("configuration.export")+"")&&M(y,v),(!Re||tt&9&&S!==(S=De[3]||!De[0]))&&(m.disabled=S),(!Re||tt&2048)&&P!==(P=De[11]("configuration.import")+"")&&M(D,P),(!Re||tt&8)&&(T.disabled=De[3]),be!==(be=Je(De))&&(We.d(1),We=be(De),We&&(We.c(),We.m(R,U))),(!Re||tt&2048)&&N!==(N=De[11]("configuration.save")+"")&&M(z,N),(!Re||tt&584&&B!==(B=De[6]||De[3]||!!De[9]))&&(R.disabled=B),Ke!==(Ke=yt(De))&&(Ie.d(1),Ie=Ke(De),Ie&&(Ie.c(),Ie.m(F,W))),(!Re||tt&2048)&&G!==(G=De[11]("configuration.reload")+"")&&M(Y,G),(!Re||tt&24&&Q!==(Q=De[4]||De[3]))&&(F.disabled=Q),nt!==(nt=kt(De))&&(ht.d(1),ht=nt(De),ht&&(ht.c(),ht.m(Z,V))),(!Re||tt&2048)&&X!==(X=De[11]("configuration.restart")+"")&&M(J,X),(!Re||tt&40&&oe!==(oe=De[5]||De[3]))&&(Z.disabled=oe);let Ht=ee;ee=it(De),ee===Ht?~ee&&Te[ee].p(De,tt):(se&&(gs(),Fe(Te[Ht],1,1,()=>{Te[Ht]=null}),ms()),~ee?(se=Te[ee],se?se.p(De,tt):(se=Te[ee]=Ot[ee](De),se.c()),Be(se,1),se.m(e,K)):se=null),tt&1024&&(q.checked=De[10]),(!Re||tt&2048)&&pe!==(pe=De[11]("configuration.confirmRestart")+"")&&M(me,pe),(!Re||tt&2048)&&Ce!==(Ce=De[11]("configuration.restartMessage")+"")&&M(_e,Ce),(!Re||tt&2048)&&re!==(re=De[11]("configuration.restartWarning")+"")&&M(Ne,re),(!Re||tt&2048)&&st!==(st=De[11]("common.cancel")+"")&&M(Xe,st),(!Re||tt&2048)&&ft!==(ft=De[11]("configuration.restart")+"")&&M(qe,ft),(!Re||tt&1024)&&Rt(he,"modal-open",De[10])},i(De){Re||(Be(se),Re=!0)},o(De){Fe(se),Re=!1},d(De){De&&L(e),We.d(),Ie.d(),ht.d(),~ee&&Te[ee].d(),ze=!1,at(ve)}}}function zv(t,e,n){let s;Gt(t,Et,F=>n(11,s=F));let i=null,l=null,o=null,r=!0,u=!1,f=!1,h=!1,p="form",g="",m=null,_=!1;async function b(){try{n(0,i=await Ur()),n(1,l=JSON.parse(JSON.stringify(i))),n(8,g=JSON.stringify(i,null,2)),n(2,o=null)}catch(F){n(2,o=F.message)}finally{n(3,r=!1)}}function k(){n(9,m=null);try{n(1,l=JSON.parse(g))}catch(F){n(9,m=F.message)}}async function v(){if(l){n(6,h=!0);try{const F=await $0(l);if(!F.valid){bt.show(s("configuration.validationFailed",{values:{error:F.error}}),"error");return}const W=await Q0(l);W.success?(bt.show(s("configuration.saved"),"success"),n(0,i=JSON.parse(JSON.stringify(l)))):bt.show(s("configuration.saveFailed",{values:{error:W.message}}),"error")}catch(F){bt.show(s("configuration.saveFailed",{values:{error:F.message}}),"error")}finally{n(6,h=!1)}}}function y(){if(!i)return;const F=JSON.stringify(i,null,2),W="data:application/json;charset=utf-8,"+encodeURIComponent(F),G=\`bungee-config-\${new Date().toISOString().split("T")[0]}.json\`,Y=document.createElement("a");Y.setAttribute("href",W),Y.setAttribute("download",G),Y.click(),bt.show(s("configuration.exported"),"success")}function S(){const F=document.createElement("input");F.type="file",F.accept=".json",F.onchange=async W=>{const G=W.target.files[0];if(G)try{const Y=await G.text(),Q=JSON.parse(Y);n(1,l=Q),n(8,g=JSON.stringify(Q,null,2)),bt.show(s("configuration.imported"),"success")}catch(Y){bt.show(s("configuration.importFailed",{values:{error:Y.message}}),"error")}},F.click()}async function C(){n(4,u=!0);try{const F=await dv();F.success?(bt.show(s("configuration.reloaded"),"success"),await b()):bt.show(s("configuration.reloadFailed",{values:{error:F.message}}),"error")}catch(F){bt.show(s("configuration.reloadFailed",{values:{error:F.message}}),"error")}finally{n(4,u=!1)}}async function T(){n(10,_=!1),n(5,f=!0);try{const F=await pv();F.success?bt.show(s("configuration.restartSent"),"success"):F.error&&F.error.includes("daemon mode")?bt.show(s("configuration.restartDaemonOnly"),"error",8e3):bt.show(s("configuration.restartFailed",{values:{error:F.error||F.message}}),"error")}catch(F){bt.show(s("configuration.restartFailed",{values:{error:F.message}}),"error")}finally{n(5,f=!1)}}is(()=>{b()});const O=()=>n(10,_=!0),A=()=>n(7,p="form"),x=()=>n(7,p="json");function P(){l.port=gt(this.value),n(1,l)}function D(){l.workers=gt(this.value),n(1,l)}function I(){l.logLevel=Is(this),n(1,l)}function R(){l.bodyParserLimit=this.value,n(1,l)}function U(F){t.$$.not_equal(l.auth,F)&&(l.auth=F,n(1,l))}function N(F){t.$$.not_equal(l.logging,F)&&(l.logging=F,n(1,l))}function z(){g=this.value,n(8,g)}function B(){_=this.checked,n(10,_)}return[i,l,o,r,u,f,h,p,g,m,_,s,k,v,y,S,C,T,O,A,x,P,D,I,R,U,N,z,B,()=>n(10,_=!1)]}class Uv extends zt{constructor(e){super(),jt(this,e,zv,jv,Lt,{})}}class Ei{static async list(){return await dn.get("/routes")}static async get(e){return(await this.list()).find(s=>s.path===e)||null}static async create(e){const n=await dn.get("/config");if(n.routes?.some(s=>s.path===e.path))throw new Error(\`Route with path "\${e.path}" already exists\`);n.routes=n.routes||[],n.routes.push(e),await dn.put("/config",n)}static async update(e,n){const s=await dn.get("/config"),i=s.routes?.findIndex(l=>l.path===e);if(i===void 0||i===-1)throw new Error(\`Route with path "\${e}" not found\`);if(e!==n.path&&s.routes?.some(l=>l.path===n.path))throw new Error(\`Route with path "\${n.path}" already exists\`);s.routes[i]=n,await dn.put("/config",s)}static async delete(e){const n=await dn.get("/config"),s=n.routes?.findIndex(i=>i.path===e);if(s===void 0||s===-1)throw new Error(\`Route with path "\${e}" not found\`);n.routes.splice(s,1),await dn.put("/config",n)}static async validateRoute(e){const n={routes:[e]};return await dn.post("/config/validate",n)}static async duplicate(e){const n=await this.get(e);if(!n)throw new Error(\`Route with path "\${e}" not found\`);const s={...n};let i=1,l=\`\${e}-copy\`;const o=await this.list();for(;o.some(r=>r.path===l);)i++,l=\`\${e}-copy-\${i}\`;s.path=l,await this.create(s)}}function fc(t,e,n){const s=t.slice();return s[7]=e[n][0],s[8]=e[n][1],s}function hc(t,e,n){const s=t.slice();return s[11]=e[n],s[13]=n,s}function dc(t){let e,n=t[5]("routeCard.hasTransformer")+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","badge badge-sm badge-info")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l&32&&n!==(n=i[5]("routeCard.hasTransformer")+"")&&M(s,n)},d(i){i&&L(e)}}}function pc(t){let e,n=t[5]("routeCard.failover")+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","badge badge-sm badge-success")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l&32&&n!==(n=i[5]("routeCard.failover")+"")&&M(s,n)},d(i){i&&L(e)}}}function gc(t){let e,n=t[5]("upstream.weight")+"",s,i,l=t[11].weight+"",o;return{c(){e=d("span"),s=E(n),i=E(": "),o=E(l),c(e,"class","badge badge-xs")},m(r,u){H(r,e,u),a(e,s),a(e,i),a(e,o)},p(r,u){u&32&&n!==(n=r[5]("upstream.weight")+"")&&M(s,n),u&1&&l!==(l=r[11].weight+"")&&M(o,l)},d(r){r&&L(e)}}}function mc(t){let e,n,s=t[11].priority+"",i;return{c(){e=d("span"),n=E("P: "),i=E(s),c(e,"class","badge badge-xs")},m(l,o){H(l,e,o),a(e,n),a(e,i)},p(l,o){o&1&&s!==(s=l[11].priority+"")&&M(i,s)},d(l){l&&L(e)}}}function bc(t){let e,n,s,i,l,o=t[11].target+"",r,u,f,h,p=t[11].weight&&gc(t),g=t[11].priority!==void 0&&mc(t);return{c(){e=d("div"),n=d("div"),i=w(),l=d("code"),r=E(o),u=w(),p&&p.c(),f=w(),g&&g.c(),h=w(),c(n,"class","w-2 h-2 rounded-full tooltip tooltip-right"),c(n,"data-tip",s=t[11].lastFailureTime?\`\u6700\u540E\u5931\u8D25: \${yc(t[11].lastFailureTime)}\`:ei(t[11])),Rt(n,"bg-success",ei(t[11])==="healthy"),Rt(n,"bg-error",ei(t[11])==="unhealthy"),Rt(n,"bg-warning",ei(t[11])==="unknown"),c(l,"class","text-xs flex-1 truncate"),c(e,"class","flex items-center gap-2 text-sm")},m(m,_){H(m,e,_),a(e,n),a(e,i),a(e,l),a(l,r),a(e,u),p&&p.m(e,null),a(e,f),g&&g.m(e,null),a(e,h)},p(m,_){_&1&&s!==(s=m[11].lastFailureTime?\`\u6700\u540E\u5931\u8D25: \${yc(m[11].lastFailureTime)}\`:ei(m[11]))&&c(n,"data-tip",s),_&1&&Rt(n,"bg-success",ei(m[11])==="healthy"),_&1&&Rt(n,"bg-error",ei(m[11])==="unhealthy"),_&1&&Rt(n,"bg-warning",ei(m[11])==="unknown"),_&1&&o!==(o=m[11].target+"")&&M(r,o),m[11].weight?p?p.p(m,_):(p=gc(m),p.c(),p.m(e,f)):p&&(p.d(1),p=null),m[11].priority!==void 0?g?g.p(m,_):(g=mc(m),g.c(),g.m(e,h)):g&&(g.d(1),g=null)},d(m){m&&L(e),p&&p.d(),g&&g.d()}}}function _c(t){let e,n,s,i,l=et(Object.entries(t[0].pathRewrite)),o=[];for(let r=0;r<l.length;r+=1)o[r]=vc(fc(t,l,r));return{c(){e=d("div"),n=d("p"),n.textContent="Path Rewrite:",s=w(),i=d("div");for(let r=0;r<o.length;r+=1)o[r].c();c(n,"class","text-sm font-semibold"),c(i,"class","text-xs text-gray-500"),c(e,"class","mt-2")},m(r,u){H(r,e,u),a(e,n),a(e,s),a(e,i);for(let f=0;f<o.length;f+=1)o[f]&&o[f].m(i,null)},p(r,u){if(u&1){l=et(Object.entries(r[0].pathRewrite));let f;for(f=0;f<l.length;f+=1){const h=fc(r,l,f);o[f]?o[f].p(h,u):(o[f]=vc(h),o[f].c(),o[f].m(i,null))}for(;f<o.length;f+=1)o[f].d(1);o.length=l.length}},d(r){r&&L(e),En(o,r)}}}function vc(t){let e,n,s=t[7]+"",i,l,o,r=t[8]+"",u;return{c(){e=d("div"),n=d("code"),i=E(s),l=E(" \u2192 "),o=d("code"),u=E(r)},m(f,h){H(f,e,h),a(e,n),a(n,i),a(e,l),a(e,o),a(o,u)},p(f,h){h&1&&s!==(s=f[7]+"")&&M(i,s),h&1&&r!==(r=f[8]+"")&&M(u,r)},d(f){f&&L(e)}}}function Vv(t){let e,n,s,i=t[5]("routeCard.duplicate")+"",l;return{c(){e=de("svg"),n=de("path"),s=w(),l=E(i),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(o,r){H(o,e,r),a(e,n),H(o,s,r),H(o,l,r)},p(o,r){r&32&&i!==(i=o[5]("routeCard.duplicate")+"")&&M(l,i)},d(o){o&&(L(e),L(s),L(l))}}}function Wv(t){let e,n,s=t[5]("routeCard.duplicating")+"",i;return{c(){e=d("span"),n=w(),i=E(s),c(e,"class","loading loading-spinner loading-xs")},m(l,o){H(l,e,o),H(l,n,o),H(l,i,o)},p(l,o){o&32&&s!==(s=l[5]("routeCard.duplicating")+"")&&M(i,s)},d(l){l&&(L(e),L(n),L(i))}}}function qv(t){let e,n,s,i=t[5]("routeCard.delete")+"",l;return{c(){e=de("svg"),n=de("path"),s=w(),l=E(i),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(o,r){H(o,e,r),a(e,n),H(o,s,r),H(o,l,r)},p(o,r){r&32&&i!==(i=o[5]("routeCard.delete")+"")&&M(l,i)},d(o){o&&(L(e),L(s),L(l))}}}function Gv(t){let e,n,s=t[5]("routeCard.deleting")+"",i;return{c(){e=d("span"),n=w(),i=E(s),c(e,"class","loading loading-spinner loading-xs")},m(l,o){H(l,e,o),H(l,n,o),H(l,i,o)},p(l,o){o&32&&s!==(s=l[5]("routeCard.deleting")+"")&&M(i,s)},d(l){l&&(L(e),L(n),L(i))}}}function Xv(t){let e,n,s,i,l,o,r=t[0].path+"",u,f,h,p,g=t[5]("routeCard.upstreams",{values:{count:t[0].upstreams.length}})+"",m,_,b,k,v,y,S=t[5]("routeEditor.upstreams")+"",C,T,O,A,x,P,D,I,R,U,N,z=t[5]("routeCard.edit")+"",B,j,F,W,G,Y,Q,le=t[0].transformer&&dc(t),Z=t[0].failover?.enabled&&pc(t),V=et(t[0].upstreams),X=[];for(let ce=0;ce<V.length;ce+=1)X[ce]=bc(hc(t,V,ce));let J=t[0].pathRewrite&&_c(t);function oe(ce,he){return ce[4]?Wv:Vv}let ne=oe(t),ee=ne(t);function se(ce,he){return ce[3]?Gv:qv}let K=se(t),q=K(t);return{c(){e=d("div"),n=d("div"),s=d("div"),i=d("div"),l=d("h2"),o=d("code"),u=E(r),f=w(),h=d("div"),p=d("span"),m=E(g),_=w(),le&&le.c(),b=w(),Z&&Z.c(),k=w(),v=d("div"),y=d("p"),C=E(S),T=E(":"),O=w(),A=d("div");for(let ce=0;ce<X.length;ce+=1)X[ce].c();x=w(),J&&J.c(),P=w(),D=d("div"),I=d("button"),R=de("svg"),U=de("path"),N=w(),B=E(z),j=w(),F=d("button"),ee.c(),W=w(),G=d("button"),q.c(),c(o,"class","text-primary"),c(l,"class","card-title text-lg"),c(p,"class","badge badge-sm"),c(h,"class","flex gap-2 mt-2 flex-wrap"),c(i,"class","flex-1"),c(s,"class","flex justify-between items-start"),c(y,"class","text-sm font-semibold mb-2"),c(A,"class","space-y-2"),c(v,"class","mt-4"),c(U,"stroke-linecap","round"),c(U,"stroke-linejoin","round"),c(U,"stroke-width","2"),c(U,"d","M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"),c(R,"xmlns","http://www.w3.org/2000/svg"),c(R,"class","h-4 w-4"),c(R,"fill","none"),c(R,"viewBox","0 0 24 24"),c(R,"stroke","currentColor"),c(I,"class","btn btn-sm btn-primary btn-outline"),c(F,"class","btn btn-sm btn-secondary btn-outline"),F.disabled=t[4],c(G,"class","btn btn-sm btn-error btn-outline"),G.disabled=t[3],c(D,"class","card-actions justify-end mt-auto pt-4"),c(n,"class","card-body flex flex-col"),c(e,"class","card bg-base-100 shadow-md hover:shadow-lg transition-shadow")},m(ce,he){H(ce,e,he),a(e,n),a(n,s),a(s,i),a(i,l),a(l,o),a(o,u),a(i,f),a(i,h),a(h,p),a(p,m),a(h,_),le&&le.m(h,null),a(h,b),Z&&Z.m(h,null),a(n,k),a(n,v),a(v,y),a(y,C),a(y,T),a(v,O),a(v,A);for(let ke=0;ke<X.length;ke+=1)X[ke]&&X[ke].m(A,null);a(n,x),J&&J.m(n,null),a(n,P),a(n,D),a(D,I),a(I,R),a(R,U),a(I,N),a(I,B),a(D,j),a(D,F),ee.m(F,null),a(D,W),a(D,G),q.m(G,null),Y||(Q=[te(I,"click",t[6]),te(F,"click",function(){ui(t[2])&&t[2].apply(this,arguments)}),te(G,"click",function(){ui(t[1])&&t[1].apply(this,arguments)})],Y=!0)},p(ce,[he]){if(t=ce,he&1&&r!==(r=t[0].path+"")&&M(u,r),he&33&&g!==(g=t[5]("routeCard.upstreams",{values:{count:t[0].upstreams.length}})+"")&&M(m,g),t[0].transformer?le?le.p(t,he):(le=dc(t),le.c(),le.m(h,b)):le&&(le.d(1),le=null),t[0].failover?.enabled?Z?Z.p(t,he):(Z=pc(t),Z.c(),Z.m(h,null)):Z&&(Z.d(1),Z=null),he&32&&S!==(S=t[5]("routeEditor.upstreams")+"")&&M(C,S),he&33){V=et(t[0].upstreams);let ke;for(ke=0;ke<V.length;ke+=1){const we=hc(t,V,ke);X[ke]?X[ke].p(we,he):(X[ke]=bc(we),X[ke].c(),X[ke].m(A,null))}for(;ke<X.length;ke+=1)X[ke].d(1);X.length=V.length}t[0].pathRewrite?J?J.p(t,he):(J=_c(t),J.c(),J.m(n,P)):J&&(J.d(1),J=null),he&32&&z!==(z=t[5]("routeCard.edit")+"")&&M(B,z),ne===(ne=oe(t))&&ee?ee.p(t,he):(ee.d(1),ee=ne(t),ee&&(ee.c(),ee.m(F,null))),he&16&&(F.disabled=t[4]),K===(K=se(t))&&q?q.p(t,he):(q.d(1),q=K(t),q&&(q.c(),q.m(G,null))),he&8&&(G.disabled=t[3])},i:Ee,o:Ee,d(ce){ce&&L(e),le&&le.d(),Z&&Z.d(),En(X,ce),J&&J.d(),ee.d(),q.d(),Y=!1,at(Q)}}}function ei(t){return t.status?t.status==="HEALTHY"?"healthy":"unhealthy":"unknown"}function yc(t){if(!t)return"";const e=new Date(t),s=new Date().getTime()-e.getTime(),i=Math.floor(s/1e3),l=Math.floor(i/60),o=Math.floor(l/60);return i<60?\`\${i}\u79D2\u524D\`:l<60?\`\${l}\u5206\u949F\u524D\`:o<24?\`\${o}\u5C0F\u65F6\u524D\`:e.toLocaleString("zh-CN")}function Yv(t,e,n){let s;Gt(t,Et,h=>n(5,s=h));let{route:i}=e,{onDelete:l}=e,{onDuplicate:o}=e,{isDeleting:r=!1}=e,{isDuplicating:u=!1}=e;function f(){id(\`/routes/edit/\${encodeURIComponent(i.path)}\`)}return t.$$set=h=>{"route"in h&&n(0,i=h.route),"onDelete"in h&&n(1,l=h.onDelete),"onDuplicate"in h&&n(2,o=h.onDuplicate),"isDeleting"in h&&n(3,r=h.isDeleting),"isDuplicating"in h&&n(4,u=h.isDuplicating)},[i,l,o,r,u,s,f]}class Jv extends zt{constructor(e){super(),jt(this,e,Yv,Xv,Lt,{route:0,onDelete:1,onDuplicate:2,isDeleting:3,isDuplicating:4})}}function wc(t){let e,n,s,i,l,o,r,u,f,h,p,g,m,_,b,k,v;return{c(){e=d("dialog"),n=d("div"),s=d("h3"),i=E(t[5]),l=w(),o=d("p"),r=E(t[4]),u=w(),f=d("div"),h=d("button"),p=E(t[2]),g=w(),m=d("button"),_=E(t[3]),c(s,"class","font-bold text-lg"),c(o,"class","py-4"),c(h,"class","btn"),c(m,"class",b="btn "+t[1]),c(f,"class","modal-action"),c(n,"class","modal-box"),c(e,"class","modal modal-open")},m(y,S){H(y,e,S),a(e,n),a(n,s),a(s,i),a(n,l),a(n,o),a(o,r),a(n,u),a(n,f),a(f,h),a(h,p),a(f,g),a(f,m),a(m,_),k||(v=[te(h,"click",t[7]),te(m,"click",t[6]),te(e,"click",t[8])],k=!0)},p(y,S){S&32&&M(i,y[5]),S&16&&M(r,y[4]),S&4&&M(p,y[2]),S&8&&M(_,y[3]),S&2&&b!==(b="btn "+y[1])&&c(m,"class",b)},d(y){y&&L(e),k=!1,at(v)}}}function Kv(t){let e,n=t[0]&&wc(t);return{c(){n&&n.c(),e=$n()},m(s,i){n&&n.m(s,i),H(s,e,i)},p(s,[i]){s[0]?n?n.p(s,i):(n=wc(s),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:Ee,o:Ee,d(s){s&&L(e),n&&n.d(s)}}}function Zv(t,e,n){let s,i,l,o,r;Gt(t,Et,y=>n(13,r=y));let{open:u=!1}=e,{title:f=""}=e,{message:h=""}=e,{confirmText:p=""}=e,{cancelText:g=""}=e,{confirmClass:m="btn-error"}=e;const _=Rl();function b(){_("confirm"),n(0,u=!1)}function k(){_("cancel"),n(0,u=!1)}function v(y){y.target===y.currentTarget&&k()}return t.$$set=y=>{"open"in y&&n(0,u=y.open),"title"in y&&n(9,f=y.title),"message"in y&&n(10,h=y.message),"confirmText"in y&&n(11,p=y.confirmText),"cancelText"in y&&n(12,g=y.cancelText),"confirmClass"in y&&n(1,m=y.confirmClass)},t.$$.update=()=>{t.$$.dirty&8704&&n(5,s=f||r("confirmDialog.title")),t.$$.dirty&1024&&n(4,i=h),t.$$.dirty&10240&&n(3,l=p||r("confirmDialog.confirm")),t.$$.dirty&12288&&n(2,o=g||r("confirmDialog.cancel"))},[u,m,o,l,i,s,b,k,v,f,h,p,g,r]}class Qv extends zt{constructor(e){super(),jt(this,e,Zv,Kv,Lt,{open:0,title:9,message:10,confirmText:11,cancelText:12,confirmClass:1})}}function kc(t,e,n){const s=t.slice();return s[27]=e[n],s}function Sc(t,e,n){const s=t.slice();return s[30]=e[n],s}function $v(t){let e,n;return{c(){e=de("svg"),n=de("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(s,i){H(s,e,i),a(e,n)},d(s){s&&L(e)}}}function ey(t){let e;return{c(){e=d("span"),c(e,"class","loading loading-spinner loading-xs")},m(n,s){H(n,e,s)},d(n){n&&L(e)}}}function Ec(t){let e,n=t[30]+"",s,i;return{c(){e=d("option"),s=E(n),e.__value=i=t[30],ie(e,e.__value)},m(l,o){H(l,e,o),a(e,s)},p(l,o){o[0]&1024&&n!==(n=l[30]+"")&&M(s,n),o[0]&1024&&i!==(i=l[30])&&(e.__value=i,ie(e,e.__value))},d(l){l&&L(e)}}}function ty(t){let e,n,s=et(t[11]),i=[];for(let o=0;o<s.length;o+=1)i[o]=Tc(kc(t,s,o));const l=o=>Fe(i[o],1,1,()=>{i[o]=null});return{c(){e=d("div");for(let o=0;o<i.length;o+=1)i[o].c();c(e,"class","grid grid-cols-1 lg:grid-cols-2 gap-4")},m(o,r){H(o,e,r);for(let u=0;u<i.length;u+=1)i[u]&&i[u].m(e,null);n=!0},p(o,r){if(r[0]&76160){s=et(o[11]);let u;for(u=0;u<s.length;u+=1){const f=kc(o,s,u);i[u]?(i[u].p(f,r),Be(i[u],1)):(i[u]=Tc(f),i[u].c(),Be(i[u],1),i[u].m(e,null))}for(gs(),u=s.length;u<i.length;u+=1)l(u);ms()}},i(o){if(!n){for(let r=0;r<s.length;r+=1)Be(i[r]);n=!0}},o(o){i=i.filter(Boolean);for(let r=0;r<i.length;r+=1)Fe(i[r]);n=!1},d(o){o&&L(e),En(i,o)}}}function ny(t){let e;function n(l,o){return l[0].length===0?oy:ly}let s=n(t),i=s(t);return{c(){e=d("div"),i.c(),c(e,"class","text-center py-12")},m(l,o){H(l,e,o),i.m(e,null)},p(l,o){s===(s=n(l))&&i?i.p(l,o):(i.d(1),i=s(l),i&&(i.c(),i.m(e,null)))},i:Ee,o:Ee,d(l){l&&L(e),i.d()}}}function sy(t){let e,n,s,i,l,o=t[12]("common.error")+"",r,u,f;return{c(){e=d("div"),n=de("svg"),s=de("path"),i=w(),l=d("span"),r=E(o),u=E(": "),f=E(t[4]),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-6 w-6"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(e,"class","alert alert-error")},m(h,p){H(h,e,p),a(e,n),a(n,s),a(e,i),a(e,l),a(l,r),a(l,u),a(l,f)},p(h,p){p[0]&4096&&o!==(o=h[12]("common.error")+"")&&M(r,o),p[0]&16&&M(f,h[4])},i:Ee,o:Ee,d(h){h&&L(e)}}}function iy(t){let e;return{c(){e=d("div"),e.innerHTML='<span class="loading loading-spinner loading-lg"></span>',c(e,"class","flex justify-center items-center h-64")},m(n,s){H(n,e,s)},p:Ee,i:Ee,o:Ee,d(n){n&&L(e)}}}function Tc(t){let e,n;function s(){return t[22](t[27])}function i(){return t[23](t[27])}return e=new Jv({props:{route:t[27],onDelete:s,onDuplicate:i,isDeleting:t[7].has(t[27].path),isDuplicating:t[8].has(t[27].path)}}),{c(){pt(e.$$.fragment)},m(l,o){ut(e,l,o),n=!0},p(l,o){t=l;const r={};o[0]&2048&&(r.route=t[27]),o[0]&2048&&(r.onDelete=s),o[0]&2048&&(r.onDuplicate=i),o[0]&2176&&(r.isDeleting=t[7].has(t[27].path)),o[0]&2304&&(r.isDuplicating=t[8].has(t[27].path)),e.$set(r)},i(l){n||(Be(e.$$.fragment,l),n=!0)},o(l){Fe(e.$$.fragment,l),n=!1},d(l){ct(e,l)}}}function ly(t){let e,n,s,i=t[12]("routes.noMatchingRoutes")+"",l,o,r,u=t[12]("routes.noMatchingMessage")+"",f;return{c(){e=d("div"),e.textContent="\uD83D\uDD0D",n=w(),s=d("h3"),l=E(i),o=w(),r=d("p"),f=E(u),c(e,"class","text-6xl mb-4"),c(s,"class","text-xl font-semibold mb-2"),c(r,"class","text-gray-500")},m(h,p){H(h,e,p),H(h,n,p),H(h,s,p),a(s,l),H(h,o,p),H(h,r,p),a(r,f)},p(h,p){p[0]&4096&&i!==(i=h[12]("routes.noMatchingRoutes")+"")&&M(l,i),p[0]&4096&&u!==(u=h[12]("routes.noMatchingMessage")+"")&&M(f,u)},d(h){h&&(L(e),L(n),L(s),L(o),L(r))}}}function oy(t){let e,n,s,i=t[12]("routes.noRoutes")+"",l,o,r,u=t[12]("routes.noRoutesMessage")+"",f,h,p,g=t[12]("routes.createFirstRoute")+"",m,_,b;return{c(){e=d("div"),e.textContent="\uD83D\uDE80",n=w(),s=d("h3"),l=E(i),o=w(),r=d("p"),f=E(u),h=w(),p=d("button"),m=E(g),c(e,"class","text-6xl mb-4"),c(s,"class","text-xl font-semibold mb-2"),c(r,"class","text-gray-500 mb-4"),c(p,"class","btn btn-primary")},m(k,v){H(k,e,v),H(k,n,v),H(k,s,v),a(s,l),H(k,o,v),H(k,r,v),a(r,f),H(k,h,v),H(k,p,v),a(p,m),_||(b=te(p,"click",t[17]),_=!0)},p(k,v){v[0]&4096&&i!==(i=k[12]("routes.noRoutes")+"")&&M(l,i),v[0]&4096&&u!==(u=k[12]("routes.noRoutesMessage")+"")&&M(f,u),v[0]&4096&&g!==(g=k[12]("routes.createFirstRoute")+"")&&M(m,g)},d(k){k&&(L(e),L(n),L(s),L(o),L(r),L(h),L(p)),_=!1,b()}}}function Mc(t){let e,n=t[12]("routes.showingRoutes",{values:{count:t[11].length,total:t[0].length}})+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","mt-6 text-sm text-gray-500 text-center")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&6145&&n!==(n=i[12]("routes.showingRoutes",{values:{count:i[11].length,total:i[0].length}})+"")&&M(s,n)},d(i){i&&L(e)}}}function ry(t){let e,n,s,i,l=t[12]("routes.title")+"",o,r,u,f=t[12]("routes.subtitle")+"",h,p,g,m,_,b,k,v=t[12]("routes.export")+"",y,S,C,T,O,A=t[12]("routes.import")+"",x,P,D,I,R=t[12]("routes.newRoute")+"",U,N,z,B,j,F,W,G,Y,Q,le=t[12]("routes.allTransformers")+"",Z,V,X,J,oe,ne,ee,se,K,q,ce;function he($,ue){return $[9]?ey:$v}let ke=he(t),we=ke(t),pe=et(t[10]),me=[];for(let $=0;$<pe.length;$+=1)me[$]=Ec(Sc(t,pe,$));const Pe=[iy,sy,ny,ty],Se=[];function Ce($,ue){return $[3]?0:$[4]?1:$[11].length===0?2:3}X=Ce(t),J=Se[X]=Pe[X](t);let _e=!t[3]&&t[0].length>0&&Mc(t);function Ae($){t[24]($)}let ye={title:t[12]("routes.confirmDelete"),message:t[6]?t[12]("routes.confirmDeleteMessage",{values:{path:t[6].path}}):"",confirmText:t[12]("common.delete"),cancelText:t[12]("common.cancel"),confirmClass:"btn-error"};return t[5]!==void 0&&(ye.open=t[5]),ee=new Qv({props:ye}),vn.push(()=>Kn(ee,"open",Ae)),ee.$on("confirm",t[14]),ee.$on("cancel",t[15]),{c(){e=d("div"),n=d("div"),s=d("div"),i=d("h1"),o=E(l),r=w(),u=d("p"),h=E(f),p=w(),g=d("div"),m=d("button"),_=de("svg"),b=de("path"),k=w(),y=E(v),C=w(),T=d("button"),we.c(),O=w(),x=E(A),D=w(),I=d("button"),U=E(R),N=w(),z=d("div"),B=d("div"),j=d("input"),W=w(),G=d("div"),Y=d("select"),Q=d("option"),Z=E(le);for(let $=0;$<me.length;$+=1)me[$].c();V=w(),J.c(),oe=w(),_e&&_e.c(),ne=w(),pt(ee.$$.fragment),c(i,"class","text-3xl font-bold"),c(u,"class","text-sm text-gray-500 mt-1"),c(b,"stroke-linecap","round"),c(b,"stroke-linejoin","round"),c(b,"stroke-width","2"),c(b,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),c(_,"xmlns","http://www.w3.org/2000/svg"),c(_,"class","h-4 w-4"),c(_,"fill","none"),c(_,"viewBox","0 0 24 24"),c(_,"stroke","currentColor"),c(m,"class","btn btn-sm btn-outline"),m.disabled=S=t[3]||t[0].length===0,c(T,"class","btn btn-sm btn-outline"),T.disabled=P=t[3]||t[9],c(I,"class","btn btn-primary btn-sm"),c(g,"class","flex gap-2"),c(n,"class","flex justify-between items-center mb-6"),c(j,"type","text"),c(j,"placeholder",F=t[12]("routes.searchPlaceholder")),c(j,"class","input input-bordered"),c(B,"class","form-control flex-1"),Q.__value="",ie(Q,Q.__value),c(Y,"class","select select-bordered"),t[2]===void 0&&bs(()=>t[21].call(Y)),c(G,"class","form-control w-64"),c(z,"class","flex gap-4 mb-6"),c(e,"class","p-6")},m($,ue){H($,e,ue),a(e,n),a(n,s),a(s,i),a(i,o),a(s,r),a(s,u),a(u,h),a(n,p),a(n,g),a(g,m),a(m,_),a(_,b),a(m,k),a(m,y),a(g,C),a(g,T),we.m(T,null),a(T,O),a(T,x),a(g,D),a(g,I),a(I,U),a(e,N),a(e,z),a(z,B),a(B,j),ie(j,t[1]),a(z,W),a(z,G),a(G,Y),a(Y,Q),a(Q,Z);for(let ae=0;ae<me.length;ae+=1)me[ae]&&me[ae].m(Y,null);Cn(Y,t[2],!0),a(e,V),Se[X].m(e,null),a(e,oe),_e&&_e.m(e,null),a(e,ne),ut(ee,e,null),K=!0,q||(ce=[te(m,"click",t[18]),te(T,"click",t[19]),te(I,"click",t[17]),te(j,"input",t[20]),te(Y,"change",t[21])],q=!0)},p($,ue){if((!K||ue[0]&4096)&&l!==(l=$[12]("routes.title")+"")&&M(o,l),(!K||ue[0]&4096)&&f!==(f=$[12]("routes.subtitle")+"")&&M(h,f),(!K||ue[0]&4096)&&v!==(v=$[12]("routes.export")+"")&&M(y,v),(!K||ue[0]&9&&S!==(S=$[3]||$[0].length===0))&&(m.disabled=S),ke!==(ke=he($))&&(we.d(1),we=ke($),we&&(we.c(),we.m(T,O))),(!K||ue[0]&4096)&&A!==(A=$[12]("routes.import")+"")&&M(x,A),(!K||ue[0]&520&&P!==(P=$[3]||$[9]))&&(T.disabled=P),(!K||ue[0]&4096)&&R!==(R=$[12]("routes.newRoute")+"")&&M(U,R),(!K||ue[0]&4096&&F!==(F=$[12]("routes.searchPlaceholder")))&&c(j,"placeholder",F),ue[0]&2&&j.value!==$[1]&&ie(j,$[1]),(!K||ue[0]&4096)&&le!==(le=$[12]("routes.allTransformers")+"")&&M(Z,le),ue[0]&1024){pe=et($[10]);let re;for(re=0;re<pe.length;re+=1){const Ne=Sc($,pe,re);me[re]?me[re].p(Ne,ue):(me[re]=Ec(Ne),me[re].c(),me[re].m(Y,null))}for(;re<me.length;re+=1)me[re].d(1);me.length=pe.length}ue[0]&1028&&Cn(Y,$[2]);let ae=X;X=Ce($),X===ae?Se[X].p($,ue):(gs(),Fe(Se[ae],1,1,()=>{Se[ae]=null}),ms(),J=Se[X],J?J.p($,ue):(J=Se[X]=Pe[X]($),J.c()),Be(J,1),J.m(e,oe)),!$[3]&&$[0].length>0?_e?_e.p($,ue):(_e=Mc($),_e.c(),_e.m(e,ne)):_e&&(_e.d(1),_e=null);const ge={};ue[0]&4096&&(ge.title=$[12]("routes.confirmDelete")),ue[0]&4160&&(ge.message=$[6]?$[12]("routes.confirmDeleteMessage",{values:{path:$[6].path}}):""),ue[0]&4096&&(ge.confirmText=$[12]("common.delete")),ue[0]&4096&&(ge.cancelText=$[12]("common.cancel")),!se&&ue[0]&32&&(se=!0,ge.open=$[5],Jn(()=>se=!1)),ee.$set(ge)},i($){K||(Be(J),Be(ee.$$.fragment,$),K=!0)},o($){Fe(J),Fe(ee.$$.fragment,$),K=!1},d($){$&&L(e),we.d(),En(me,$),Se[X].d(),_e&&_e.d(),ct(ee),q=!1,at(ce)}}}function ay(t,e,n){let s,i,l;Gt(t,Et,N=>n(12,l=N));let o=[],r=!0,u=null,f="",h="",p=!0,g=!1,m=null,_=new Set,b=new Set,k=!1;async function v(N=!1){const z=!N&&p;try{z&&n(3,r=!0),n(0,o=await Ei.list()),n(4,u=null),p=!1}catch(B){n(4,u=B.message),N||bt.show(B.message,"error")}finally{z&&n(3,r=!1)}}async function y(N){n(6,m=N),n(5,g=!0)}async function S(){if(m){_.add(m.path),n(7,_);try{await Ei.delete(m.path),bt.show(l("routes.deleted",{values:{path:m.path}}),"success"),await v()}catch(N){bt.show(l("routes.deleteFailed",{values:{error:N.message}}),"error")}finally{_.delete(m.path),n(7,_),n(6,m=null)}}}function C(){n(6,m=null)}async function T(N){b.add(N.path),n(8,b);try{await Ei.duplicate(N.path),bt.show(l("routes.duplicated",{values:{path:N.path}}),"success"),await v()}catch(z){bt.show(l("routes.duplicateFailed",{values:{error:z.message}}),"error")}finally{b.delete(N.path),n(8,b)}}function O(){id("/routes/new")}function A(){if(o.length===0){bt.show(l("routes.noRoutesToExport"),"warning");return}const N=JSON.stringify(o,null,2),z="data:application/json;charset=utf-8,"+encodeURIComponent(N),B=\`bungee-routes-\${new Date().toISOString().split("T")[0]}.json\`,j=document.createElement("a");j.setAttribute("href",z),j.setAttribute("download",B),j.click(),bt.show(l("routes.exported"),"success")}function x(){const N=document.createElement("input");N.type="file",N.accept=".json",N.onchange=async z=>{const B=z.target.files[0];if(B){n(9,k=!0);try{const j=await B.text(),F=JSON.parse(j);if(!Array.isArray(F))throw new Error(l("routes.importMustBeArray"));let W=0,G=0;for(const Y of F)try{await Ei.create(Y),W++}catch(Q){G++,console.error(\`Failed to import route \${Y.path}:\`,Q)}if(W>0){const Y=G>0?l("routes.importPartialSuccess",{values:{success:W,failed:G}}):l("routes.importSuccess",{values:{success:W}});bt.show(Y,"success"),await v()}else bt.show(l("routes.importFailed",{values:{error:\`\${G} routes failed\`}}),"error")}catch(j){bt.show(l("routes.importFailed",{values:{error:j.message}}),"error")}finally{n(9,k=!1)}}},N.click()}is(()=>{v();const N=setInterval(()=>{v(!0)},5e3);return()=>{clearInterval(N)}});function P(){f=this.value,n(1,f)}function D(){h=Is(this),n(2,h),n(10,i),n(0,o)}const I=N=>y(N),R=N=>T(N);function U(N){g=N,n(5,g)}return t.$$.update=()=>{t.$$.dirty[0]&7&&n(11,s=o.filter(N=>{const z=N.path.toLowerCase().includes(f.toLowerCase())||N.upstreams.some(j=>j.target.toLowerCase().includes(f.toLowerCase())),B=!h||typeof N.transformer=="string"&&N.transformer===h||N.upstreams.some(j=>typeof j.transformer=="string"&&j.transformer===h);return z&&B})),t.$$.dirty[0]&1&&n(10,i=Array.from(new Set(o.flatMap(N=>{const z=[];return typeof N.transformer=="string"&&z.push(N.transformer),N.upstreams.forEach(B=>{typeof B.transformer=="string"&&z.push(B.transformer)}),z}))))},[o,f,h,r,u,g,m,_,b,k,i,s,l,y,S,C,T,O,A,x,P,D,I,R,U]}class uy extends zt{constructor(e){super(),jt(this,e,ay,ry,Lt,{},null,[-1,-1])}}var Tp=typeof global=="object"&&global&&global.Object===Object&&global,cy=typeof self=="object"&&self&&self.Object===Object&&self,Zs=Tp||cy||Function("return this")(),Fs=Zs.Symbol,Mp=Object.prototype,fy=Mp.hasOwnProperty,hy=Mp.toString,ll=Fs?Fs.toStringTag:void 0;function dy(t){var e=fy.call(t,ll),n=t[ll];try{t[ll]=void 0;var s=!0}catch{}var i=hy.call(t);return s&&(e?t[ll]=n:delete t[ll]),i}var py=Object.prototype,gy=py.toString;function my(t){return gy.call(t)}var by="[object Null]",_y="[object Undefined]",Cc=Fs?Fs.toStringTag:void 0;function Qi(t){return t==null?t===void 0?_y:by:Cc&&Cc in Object(t)?dy(t):my(t)}function Xi(t){return t!=null&&typeof t=="object"}var vy="[object Symbol]";function Al(t){return typeof t=="symbol"||Xi(t)&&Qi(t)==vy}function co(t,e){for(var n=-1,s=t==null?0:t.length,i=Array(s);++n<s;)i[n]=e(t[n],n,t);return i}var Ps=Array.isArray,Pc=Fs?Fs.prototype:void 0,Ac=Pc?Pc.toString:void 0;function Cp(t){if(typeof t=="string")return t;if(Ps(t))return co(t,Cp)+"";if(Al(t))return Ac?Ac.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function Lo(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function Ho(t){return t}var yy="[object AsyncFunction]",wy="[object Function]",ky="[object GeneratorFunction]",Sy="[object Proxy]";function Pp(t){if(!Lo(t))return!1;var e=Qi(t);return e==wy||e==ky||e==yy||e==Sy}var ar=Zs["__core-js_shared__"],Oc=(function(){var t=/[^.]+$/.exec(ar&&ar.keys&&ar.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function Ey(t){return!!Oc&&Oc in t}var Ty=Function.prototype,My=Ty.toString;function xi(t){if(t!=null){try{return My.call(t)}catch{}try{return t+""}catch{}}return""}var Cy=/[\\\\^$.*+?()[\\]{}|]/g,Py=/^\\[object .+?Constructor\\]$/,Ay=Function.prototype,Oy=Object.prototype,xy=Ay.toString,Ry=Oy.hasOwnProperty,Dy=RegExp("^"+xy.call(Ry).replace(Cy,"\\\\$&").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,"$1.*?")+"$");function Ly(t){if(!Lo(t)||Ey(t))return!1;var e=Pp(t)?Dy:Py;return e.test(xi(t))}function Hy(t,e){return t?.[e]}function Ri(t,e){var n=Hy(t,e);return Ly(n)?n:void 0}var Or=Ri(Zs,"WeakMap");function Iy(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var By=800,Fy=16,Ny=Date.now;function jy(t){var e=0,n=0;return function(){var s=Ny(),i=Fy-(s-n);if(n=s,i>0){if(++e>=By)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function zy(t){return function(){return t}}var xc=(function(){try{var t=Ri(Object,"defineProperty");return t({},"",{}),t}catch{}})(),Uy=xc?function(t,e){return xc(t,"toString",{configurable:!0,enumerable:!1,value:zy(e),writable:!0})}:Ho,Vy=jy(Uy),Wy=9007199254740991,qy=/^(?:0|[1-9]\\d*)$/;function ca(t,e){var n=typeof t;return e=e??Wy,!!e&&(n=="number"||n!="symbol"&&qy.test(t))&&t>-1&&t%1==0&&t<e}function fa(t,e){return t===e||t!==t&&e!==e}var Rc=Math.max;function Gy(t,e,n){return e=Rc(e===void 0?t.length-1:e,0),function(){for(var s=arguments,i=-1,l=Rc(s.length-e,0),o=Array(l);++i<l;)o[i]=s[e+i];i=-1;for(var r=Array(e+1);++i<e;)r[i]=s[i];return r[e]=n(o),Iy(t,this,r)}}function Xy(t,e){return Vy(Gy(t,e,Ho),t+"")}var Yy=9007199254740991;function ha(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Yy}function Io(t){return t!=null&&ha(t.length)&&!Pp(t)}function Dc(t,e,n){if(!Lo(n))return!1;var s=typeof e;return(s=="number"?Io(n)&&ca(e,n.length):s=="string"&&e in n)?fa(n[e],t):!1}var Jy=Object.prototype;function Ky(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||Jy;return t===n}function Zy(t,e){for(var n=-1,s=Array(t);++n<t;)s[n]=e(n);return s}var Qy="[object Arguments]";function Lc(t){return Xi(t)&&Qi(t)==Qy}var Ap=Object.prototype,$y=Ap.hasOwnProperty,e4=Ap.propertyIsEnumerable,da=Lc((function(){return arguments})())?Lc:function(t){return Xi(t)&&$y.call(t,"callee")&&!e4.call(t,"callee")};function t4(){return!1}var Op=typeof Gs=="object"&&Gs&&!Gs.nodeType&&Gs,Hc=Op&&typeof Xs=="object"&&Xs&&!Xs.nodeType&&Xs,n4=Hc&&Hc.exports===Op,Ic=n4?Zs.Buffer:void 0,s4=Ic?Ic.isBuffer:void 0,xr=s4||t4,i4="[object Arguments]",l4="[object Array]",o4="[object Boolean]",r4="[object Date]",a4="[object Error]",u4="[object Function]",c4="[object Map]",f4="[object Number]",h4="[object Object]",d4="[object RegExp]",p4="[object Set]",g4="[object String]",m4="[object WeakMap]",b4="[object ArrayBuffer]",_4="[object DataView]",v4="[object Float32Array]",y4="[object Float64Array]",w4="[object Int8Array]",k4="[object Int16Array]",S4="[object Int32Array]",E4="[object Uint8Array]",T4="[object Uint8ClampedArray]",M4="[object Uint16Array]",C4="[object Uint32Array]",on={};on[v4]=on[y4]=on[w4]=on[k4]=on[S4]=on[E4]=on[T4]=on[M4]=on[C4]=!0;on[i4]=on[l4]=on[b4]=on[o4]=on[_4]=on[r4]=on[a4]=on[u4]=on[c4]=on[f4]=on[h4]=on[d4]=on[p4]=on[g4]=on[m4]=!1;function P4(t){return Xi(t)&&ha(t.length)&&!!on[Qi(t)]}function xp(t){return function(e){return t(e)}}var Rp=typeof Gs=="object"&&Gs&&!Gs.nodeType&&Gs,vl=Rp&&typeof Xs=="object"&&Xs&&!Xs.nodeType&&Xs,A4=vl&&vl.exports===Rp,ur=A4&&Tp.process,Bc=(function(){try{var t=vl&&vl.require&&vl.require("util").types;return t||ur&&ur.binding&&ur.binding("util")}catch{}})(),Fc=Bc&&Bc.isTypedArray,Dp=Fc?xp(Fc):P4,O4=Object.prototype,x4=O4.hasOwnProperty;function R4(t,e){var n=Ps(t),s=!n&&da(t),i=!n&&!s&&xr(t),l=!n&&!s&&!i&&Dp(t),o=n||s||i||l,r=o?Zy(t.length,String):[],u=r.length;for(var f in t)x4.call(t,f)&&!(o&&(f=="length"||i&&(f=="offset"||f=="parent")||l&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||ca(f,u)))&&r.push(f);return r}function D4(t,e){return function(n){return t(e(n))}}var L4=D4(Object.keys,Object),H4=Object.prototype,I4=H4.hasOwnProperty;function B4(t){if(!Ky(t))return L4(t);var e=[];for(var n in Object(t))I4.call(t,n)&&n!="constructor"&&e.push(n);return e}function pa(t){return Io(t)?R4(t):B4(t)}var F4=/\\.|\\[(?:[^[\\]]*|(["'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,N4=/^\\w*$/;function ga(t,e){if(Ps(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||Al(t)?!0:N4.test(t)||!F4.test(t)||e!=null&&t in Object(e)}var Ol=Ri(Object,"create");function j4(){this.__data__=Ol?Ol(null):{},this.size=0}function z4(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var U4="__lodash_hash_undefined__",V4=Object.prototype,W4=V4.hasOwnProperty;function q4(t){var e=this.__data__;if(Ol){var n=e[t];return n===U4?void 0:n}return W4.call(e,t)?e[t]:void 0}var G4=Object.prototype,X4=G4.hasOwnProperty;function Y4(t){var e=this.__data__;return Ol?e[t]!==void 0:X4.call(e,t)}var J4="__lodash_hash_undefined__";function K4(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Ol&&e===void 0?J4:e,this}function Pi(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var s=t[e];this.set(s[0],s[1])}}Pi.prototype.clear=j4;Pi.prototype.delete=z4;Pi.prototype.get=q4;Pi.prototype.has=Y4;Pi.prototype.set=K4;function Z4(){this.__data__=[],this.size=0}function Bo(t,e){for(var n=t.length;n--;)if(fa(t[n][0],e))return n;return-1}var Q4=Array.prototype,$4=Q4.splice;function ew(t){var e=this.__data__,n=Bo(e,t);if(n<0)return!1;var s=e.length-1;return n==s?e.pop():$4.call(e,n,1),--this.size,!0}function tw(t){var e=this.__data__,n=Bo(e,t);return n<0?void 0:e[n][1]}function nw(t){return Bo(this.__data__,t)>-1}function sw(t,e){var n=this.__data__,s=Bo(n,t);return s<0?(++this.size,n.push([t,e])):n[s][1]=e,this}function Qs(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var s=t[e];this.set(s[0],s[1])}}Qs.prototype.clear=Z4;Qs.prototype.delete=ew;Qs.prototype.get=tw;Qs.prototype.has=nw;Qs.prototype.set=sw;var xl=Ri(Zs,"Map");function iw(){this.size=0,this.__data__={hash:new Pi,map:new(xl||Qs),string:new Pi}}function lw(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Fo(t,e){var n=t.__data__;return lw(e)?n[typeof e=="string"?"string":"hash"]:n.map}function ow(t){var e=Fo(this,t).delete(t);return this.size-=e?1:0,e}function rw(t){return Fo(this,t).get(t)}function aw(t){return Fo(this,t).has(t)}function uw(t,e){var n=Fo(this,t),s=n.size;return n.set(t,e),this.size+=n.size==s?0:1,this}function $s(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var s=t[e];this.set(s[0],s[1])}}$s.prototype.clear=iw;$s.prototype.delete=ow;$s.prototype.get=rw;$s.prototype.has=aw;$s.prototype.set=uw;var cw="Expected a function";function ma(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(cw);var n=function(){var s=arguments,i=e?e.apply(this,s):s[0],l=n.cache;if(l.has(i))return l.get(i);var o=t.apply(this,s);return n.cache=l.set(i,o)||l,o};return n.cache=new(ma.Cache||$s),n}ma.Cache=$s;var fw=500;function hw(t){var e=ma(t,function(s){return n.size===fw&&n.clear(),s}),n=e.cache;return e}var dw=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,pw=/\\\\(\\\\)?/g,gw=hw(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(dw,function(n,s,i,l){e.push(i?l.replace(pw,"$1"):s||n)}),e});function mw(t){return t==null?"":Cp(t)}function Lp(t,e){return Ps(t)?t:ga(t,e)?[t]:gw(mw(t))}function No(t){if(typeof t=="string"||Al(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function ba(t,e){e=Lp(e,t);for(var n=0,s=e.length;t!=null&&n<s;)t=t[No(e[n++])];return n&&n==s?t:void 0}function bw(t,e,n){var s=t==null?void 0:ba(t,e);return s===void 0?n:s}function Hp(t,e){for(var n=-1,s=e.length,i=t.length;++n<s;)t[i+n]=e[n];return t}var Nc=Fs?Fs.isConcatSpreadable:void 0;function _w(t){return Ps(t)||da(t)||!!(Nc&&t&&t[Nc])}function vw(t,e,n,s,i){var l=-1,o=t.length;for(n||(n=_w),i||(i=[]);++l<o;){var r=t[l];n(r)?Hp(i,r):i[i.length]=r}return i}function yw(){this.__data__=new Qs,this.size=0}function ww(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function kw(t){return this.__data__.get(t)}function Sw(t){return this.__data__.has(t)}var Ew=200;function Tw(t,e){var n=this.__data__;if(n instanceof Qs){var s=n.__data__;if(!xl||s.length<Ew-1)return s.push([t,e]),this.size=++n.size,this;n=this.__data__=new $s(s)}return n.set(t,e),this.size=n.size,this}function Ys(t){var e=this.__data__=new Qs(t);this.size=e.size}Ys.prototype.clear=yw;Ys.prototype.delete=ww;Ys.prototype.get=kw;Ys.prototype.has=Sw;Ys.prototype.set=Tw;function Mw(t,e){for(var n=-1,s=t==null?0:t.length,i=0,l=[];++n<s;){var o=t[n];e(o,n,t)&&(l[i++]=o)}return l}function Cw(){return[]}var Pw=Object.prototype,Aw=Pw.propertyIsEnumerable,jc=Object.getOwnPropertySymbols,Ow=jc?function(t){return t==null?[]:(t=Object(t),Mw(jc(t),function(e){return Aw.call(t,e)}))}:Cw;function xw(t,e,n){var s=e(t);return Ps(t)?s:Hp(s,n(t))}function zc(t){return xw(t,pa,Ow)}var Rr=Ri(Zs,"DataView"),Dr=Ri(Zs,"Promise"),Lr=Ri(Zs,"Set"),Uc="[object Map]",Rw="[object Object]",Vc="[object Promise]",Wc="[object Set]",qc="[object WeakMap]",Gc="[object DataView]",Dw=xi(Rr),Lw=xi(xl),Hw=xi(Dr),Iw=xi(Lr),Bw=xi(Or),ti=Qi;(Rr&&ti(new Rr(new ArrayBuffer(1)))!=Gc||xl&&ti(new xl)!=Uc||Dr&&ti(Dr.resolve())!=Vc||Lr&&ti(new Lr)!=Wc||Or&&ti(new Or)!=qc)&&(ti=function(t){var e=Qi(t),n=e==Rw?t.constructor:void 0,s=n?xi(n):"";if(s)switch(s){case Dw:return Gc;case Lw:return Uc;case Hw:return Vc;case Iw:return Wc;case Bw:return qc}return e});var Xc=Zs.Uint8Array,Fw="__lodash_hash_undefined__";function Nw(t){return this.__data__.set(t,Fw),this}function jw(t){return this.__data__.has(t)}function Eo(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new $s;++e<n;)this.add(t[e])}Eo.prototype.add=Eo.prototype.push=Nw;Eo.prototype.has=jw;function zw(t,e){for(var n=-1,s=t==null?0:t.length;++n<s;)if(e(t[n],n,t))return!0;return!1}function Uw(t,e){return t.has(e)}var Vw=1,Ww=2;function Ip(t,e,n,s,i,l){var o=n&Vw,r=t.length,u=e.length;if(r!=u&&!(o&&u>r))return!1;var f=l.get(t),h=l.get(e);if(f&&h)return f==e&&h==t;var p=-1,g=!0,m=n&Ww?new Eo:void 0;for(l.set(t,e),l.set(e,t);++p<r;){var _=t[p],b=e[p];if(s)var k=o?s(b,_,p,e,t,l):s(_,b,p,t,e,l);if(k!==void 0){if(k)continue;g=!1;break}if(m){if(!zw(e,function(v,y){if(!Uw(m,y)&&(_===v||i(_,v,n,s,l)))return m.push(y)})){g=!1;break}}else if(!(_===b||i(_,b,n,s,l))){g=!1;break}}return l.delete(t),l.delete(e),g}function qw(t){var e=-1,n=Array(t.size);return t.forEach(function(s,i){n[++e]=[i,s]}),n}function Gw(t){var e=-1,n=Array(t.size);return t.forEach(function(s){n[++e]=s}),n}var Xw=1,Yw=2,Jw="[object Boolean]",Kw="[object Date]",Zw="[object Error]",Qw="[object Map]",$w="[object Number]",ek="[object RegExp]",tk="[object Set]",nk="[object String]",sk="[object Symbol]",ik="[object ArrayBuffer]",lk="[object DataView]",Yc=Fs?Fs.prototype:void 0,cr=Yc?Yc.valueOf:void 0;function ok(t,e,n,s,i,l,o){switch(n){case lk:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ik:return!(t.byteLength!=e.byteLength||!l(new Xc(t),new Xc(e)));case Jw:case Kw:case $w:return fa(+t,+e);case Zw:return t.name==e.name&&t.message==e.message;case ek:case nk:return t==e+"";case Qw:var r=qw;case tk:var u=s&Xw;if(r||(r=Gw),t.size!=e.size&&!u)return!1;var f=o.get(t);if(f)return f==e;s|=Yw,o.set(t,e);var h=Ip(r(t),r(e),s,i,l,o);return o.delete(t),h;case sk:if(cr)return cr.call(t)==cr.call(e)}return!1}var rk=1,ak=Object.prototype,uk=ak.hasOwnProperty;function ck(t,e,n,s,i,l){var o=n&rk,r=zc(t),u=r.length,f=zc(e),h=f.length;if(u!=h&&!o)return!1;for(var p=u;p--;){var g=r[p];if(!(o?g in e:uk.call(e,g)))return!1}var m=l.get(t),_=l.get(e);if(m&&_)return m==e&&_==t;var b=!0;l.set(t,e),l.set(e,t);for(var k=o;++p<u;){g=r[p];var v=t[g],y=e[g];if(s)var S=o?s(y,v,g,e,t,l):s(v,y,g,t,e,l);if(!(S===void 0?v===y||i(v,y,n,s,l):S)){b=!1;break}k||(k=g=="constructor")}if(b&&!k){var C=t.constructor,T=e.constructor;C!=T&&"constructor"in t&&"constructor"in e&&!(typeof C=="function"&&C instanceof C&&typeof T=="function"&&T instanceof T)&&(b=!1)}return l.delete(t),l.delete(e),b}var fk=1,Jc="[object Arguments]",Kc="[object Array]",so="[object Object]",hk=Object.prototype,Zc=hk.hasOwnProperty;function dk(t,e,n,s,i,l){var o=Ps(t),r=Ps(e),u=o?Kc:ti(t),f=r?Kc:ti(e);u=u==Jc?so:u,f=f==Jc?so:f;var h=u==so,p=f==so,g=u==f;if(g&&xr(t)){if(!xr(e))return!1;o=!0,h=!1}if(g&&!h)return l||(l=new Ys),o||Dp(t)?Ip(t,e,n,s,i,l):ok(t,e,u,n,s,i,l);if(!(n&fk)){var m=h&&Zc.call(t,"__wrapped__"),_=p&&Zc.call(e,"__wrapped__");if(m||_){var b=m?t.value():t,k=_?e.value():e;return l||(l=new Ys),i(b,k,n,s,l)}}return g?(l||(l=new Ys),ck(t,e,n,s,i,l)):!1}function _a(t,e,n,s,i){return t===e?!0:t==null||e==null||!Xi(t)&&!Xi(e)?t!==t&&e!==e:dk(t,e,n,s,_a,i)}var pk=1,gk=2;function mk(t,e,n,s){var i=n.length,l=i;if(t==null)return!l;for(t=Object(t);i--;){var o=n[i];if(o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++i<l;){o=n[i];var r=o[0],u=t[r],f=o[1];if(o[2]){if(u===void 0&&!(r in t))return!1}else{var h=new Ys,p;if(!(p===void 0?_a(f,u,pk|gk,s,h):p))return!1}}return!0}function Bp(t){return t===t&&!Lo(t)}function bk(t){for(var e=pa(t),n=e.length;n--;){var s=e[n],i=t[s];e[n]=[s,i,Bp(i)]}return e}function Fp(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function _k(t){var e=bk(t);return e.length==1&&e[0][2]?Fp(e[0][0],e[0][1]):function(n){return n===t||mk(n,t,e)}}function vk(t,e){return t!=null&&e in Object(t)}function yk(t,e,n){e=Lp(e,t);for(var s=-1,i=e.length,l=!1;++s<i;){var o=No(e[s]);if(!(l=t!=null&&n(t,o)))break;t=t[o]}return l||++s!=i?l:(i=t==null?0:t.length,!!i&&ha(i)&&ca(o,i)&&(Ps(t)||da(t)))}function wk(t,e){return t!=null&&yk(t,e,vk)}var kk=1,Sk=2;function Ek(t,e){return ga(t)&&Bp(e)?Fp(No(t),e):function(n){var s=bw(n,t);return s===void 0&&s===e?wk(n,t):_a(e,s,kk|Sk)}}function Tk(t){return function(e){return e?.[t]}}function Mk(t){return function(e){return ba(e,t)}}function Ck(t){return ga(t)?Tk(No(t)):Mk(t)}function Pk(t){return typeof t=="function"?t:t==null?Ho:typeof t=="object"?Ps(t)?Ek(t[0],t[1]):_k(t):Ck(t)}function Ak(t){return function(e,n,s){for(var i=-1,l=Object(e),o=s(e),r=o.length;r--;){var u=o[++i];if(n(l[u],u,l)===!1)break}return e}}var Ok=Ak();function xk(t,e){return t&&Ok(t,e,pa)}function Rk(t,e){return function(n,s){if(n==null)return n;if(!Io(n))return t(n,s);for(var i=n.length,l=-1,o=Object(n);++l<i&&s(o[l],l,o)!==!1;);return n}}var Dk=Rk(xk);function Lk(t,e){var n=-1,s=Io(t)?Array(t.length):[];return Dk(t,function(i,l,o){s[++n]=e(i,l,o)}),s}function Hk(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}function Ik(t,e){if(t!==e){var n=t!==void 0,s=t===null,i=t===t,l=Al(t),o=e!==void 0,r=e===null,u=e===e,f=Al(e);if(!r&&!f&&!l&&t>e||l&&o&&u&&!r&&!f||s&&o&&u||!n&&u||!i)return 1;if(!s&&!l&&!f&&t<e||f&&n&&i&&!s&&!l||r&&n&&i||!o&&i||!u)return-1}return 0}function Bk(t,e,n){for(var s=-1,i=t.criteria,l=e.criteria,o=i.length,r=n.length;++s<o;){var u=Ik(i[s],l[s]);if(u){if(s>=r)return u;var f=n[s];return u*(f=="desc"?-1:1)}}return t.index-e.index}function Fk(t,e,n){e.length?e=co(e,function(l){return Ps(l)?function(o){return ba(o,l.length===1?l[0]:l)}:l}):e=[Ho];var s=-1;e=co(e,xp(Pk));var i=Lk(t,function(l,o,r){var u=co(e,function(f){return f(l)});return{criteria:u,index:++s,value:l}});return Hk(i,function(l,o){return Bk(l,o,n)})}var Nk=Xy(function(t,e){if(t==null)return[];var n=e.length;return n>1&&Dc(t,e[0],e[1])?e=[]:n>2&&Dc(e[0],e[1],e[2])&&(e=[e[0]]),Fk(t,vw(e),[])});const Qc="/__ui/api";class Np{static async getAll(){const e=await fetch(\`\${Qc}/transformers\`);if(!e.ok)throw new Error(\`HTTP \${e.status}: \${e.statusText}\`);const n=await e.json();return n.plugins||n.transformers||[]}static async getById(e){const n=await fetch(\`\${Qc}/transformers/\${encodeURIComponent(e)}\`);if(!n.ok)throw new Error(\`HTTP \${n.status}: \${n.statusText}\`);return await n.json()}}let io=null;async function jk(){if(io===null)try{io=await Np.getAll()}catch(t){console.warn("Failed to fetch transformers from API, using fallback:",t),io=["openai-to-anthropic","anthropic-to-openai","anthropic-to-gemini"]}return io}function jp(t,e){const n=[],s=\`upstreams[\${e}]\`;if(!t.target)n.push({field:\`\${s}.target\`,message:ds(Et)("validation.targetRequired")});else try{const i=new URL(t.target);["http:","https:"].includes(i.protocol)||n.push({field:\`\${s}.target\`,message:ds(Et)("validation.targetProtocol")})}catch{n.push({field:\`\${s}.target\`,message:ds(Et)("validation.invalidUrl")})}return t.weight!==void 0&&(typeof t.weight!="number"||t.weight<=0)&&n.push({field:\`\${s}.weight\`,message:ds(Et)("validation.weightPositive")}),t.priority!==void 0&&(typeof t.priority!="number"||t.priority<0)&&n.push({field:\`\${s}.priority\`,message:ds(Et)("validation.priorityNonNegative")}),n}function zk(t){const e=[];return t.some(s=>s.weight!==void 0)&&t.reduce((i,l)=>i+(l.weight||0),0)===0&&e.push({field:"upstreams",message:ds(Et)("validation.totalWeightPositive")}),e}async function Uk(t,e){const n=jp(t,e),s=\`upstreams[\${e}]\`;if(t.plugins&&t.plugins.length>0){const i=t.plugins[0];if(typeof i=="string")try{const l=await jk();if(!l.includes(i)){const o=ds(Et);n.push({field:\`\${s}.plugins\`,message:o("validation.unknownTransformer",{values:{transformer:i,options:l.join(", ")}})})}}catch(l){console.warn("Failed to validate plugin:",l)}}return n}async function Vk(t){const e=[];if(t.path?t.path.startsWith("/")||e.push({field:"path",message:ds(Et)("validation.pathStartSlash")}):e.push({field:"path",message:ds(Et)("validation.pathRequired")}),!t.upstreams||t.upstreams.length===0)e.push({field:"upstreams",message:ds(Et)("validation.upstreamRequired")});else{const n=t.upstreams.map((i,l)=>Uk(i,l));(await Promise.all(n)).forEach(i=>e.push(...i))}return t.pathRewrite&&Object.keys(t.pathRewrite).forEach(n=>{try{new RegExp(n)}catch{const s=ds(Et);e.push({field:\`pathRewrite.\${n}\`,message:s("validation.invalidRegex",{values:{pattern:n}})})}}),t.failover?.enabled&&(t.failover.retryableStatusCodes&&t.failover.retryableStatusCodes.forEach(n=>{if(n<100||n>599){const s=ds(Et);e.push({field:"failover.retryableStatusCodes",message:s("validation.invalidStatusCode",{values:{code:n}})})}}),t.failover.recoveryIntervalMs!==void 0&&t.failover.recoveryIntervalMs<=0&&e.push({field:"failover.recoveryIntervalMs",message:ds(Et)("validation.recoveryIntervalPositive")}),t.failover.recoveryTimeoutMs!==void 0&&t.failover.recoveryTimeoutMs<=0&&e.push({field:"failover.recoveryTimeoutMs",message:ds(Et)("validation.recoveryTimeoutPositive")})),e}function $c(t,e,n){const s=t.slice();return s[19]=e[n],s[20]=e,s[21]=n,s}function ef(t,e,n){const s=t.slice();return s[19]=e[n],s[22]=e,s[21]=n,s}function tf(t){let e,n,s;return{c(){e=d("span"),n=E("Support dynamic expressions: "),s=d("code"),s.textContent="{{ expression }}",c(s,"class","text-xs"),c(e,"class","label-text-alt text-xs")},m(i,l){H(i,e,l),a(e,n),a(e,s)},d(i){i&&L(e)}}}function nf(t){let e,n,s,i,l,o,r,u,f,h;function p(){t[12].call(n,t[22],t[21])}function g(){t[13].call(l,t[22],t[21])}function m(){return t[14](t[21])}return{c(){e=d("div"),n=d("input"),i=w(),l=d("input"),r=w(),u=d("button"),u.textContent="\u2715",c(n,"type","text"),c(n,"placeholder",s=t[5]("headers.namePlaceholder")),c(n,"class","input input-bordered input-sm flex-1"),c(l,"type","text"),c(l,"placeholder",o=t[5]("headers.valuePlaceholder")),c(l,"class","input input-bordered input-sm flex-1"),c(u,"type","button"),c(u,"class","btn btn-sm btn-error btn-square"),c(e,"class","flex gap-2")},m(_,b){H(_,e,b),a(e,n),ie(n,t[19].key),a(e,i),a(e,l),ie(l,t[19].value),a(e,r),a(e,u),f||(h=[te(n,"input",p),te(l,"input",g),te(u,"click",m)],f=!0)},p(_,b){t=_,b&32&&s!==(s=t[5]("headers.namePlaceholder"))&&c(n,"placeholder",s),b&4&&n.value!==t[19].key&&ie(n,t[19].key),b&32&&o!==(o=t[5]("headers.valuePlaceholder"))&&c(l,"placeholder",o),b&4&&l.value!==t[19].value&&ie(l,t[19].value)},d(_){_&&L(e),f=!1,at(h)}}}function sf(t){let e,n,s,i,l,o,r,u,f,h;function p(){t[16].call(n,t[20],t[21])}function g(){t[17].call(l,t[20],t[21])}function m(){return t[18](t[21])}return{c(){e=d("div"),n=d("input"),i=w(),l=d("input"),r=w(),u=d("button"),u.textContent="\u2715",c(n,"type","text"),c(n,"placeholder",s=t[5]("headers.namePlaceholder")),c(n,"class","input input-bordered input-sm flex-1"),c(l,"type","text"),c(l,"placeholder",o=t[5]("headers.valuePlaceholder")),c(l,"class","input input-bordered input-sm flex-1"),c(u,"type","button"),c(u,"class","btn btn-sm btn-error btn-square"),c(e,"class","flex gap-2")},m(_,b){H(_,e,b),a(e,n),ie(n,t[19].key),a(e,i),a(e,l),ie(l,t[19].value),a(e,r),a(e,u),f||(h=[te(n,"input",p),te(l,"input",g),te(u,"click",m)],f=!0)},p(_,b){t=_,b&32&&s!==(s=t[5]("headers.namePlaceholder"))&&c(n,"placeholder",s),b&16&&n.value!==t[19].key&&ie(n,t[19].key),b&32&&o!==(o=t[5]("headers.valuePlaceholder"))&&c(l,"placeholder",o),b&16&&l.value!==t[19].value&&ie(l,t[19].value)},d(_){_&&L(e),f=!1,at(h)}}}function Wk(t){let e,n,s,i,l,o,r,u,f,h,p,g=t[5]("headers.addHeader")+"",m,_,b=t[2].length+"",k,v,y,S,C,T,O=t[5]("headers.addHeader")+"",A,x,P,D,I,R,U=t[5]("headers.remove")+"",N,z,B,j,F,W,G,Y=t[5]("headers.empty")+"",Q,le,Z,V,X,J,oe=t[5]("headers.default")+"",ne,ee,se=t[4].length+"",K,q,ce,he,ke,we,pe=t[5]("headers.addHeader")+"",me,Pe,Se,Ce=t[1]&&tf(),_e=et(t[2]),Ae=[];for(let ue=0;ue<_e.length;ue+=1)Ae[ue]=nf(ef(t,_e,ue));let ye=et(t[4]),$=[];for(let ue=0;ue<ye.length;ue+=1)$[ue]=sf($c(t,ye,ue));return{c(){e=d("div"),n=d("div"),s=d("span"),i=E(t[0]),l=w(),Ce&&Ce.c(),o=w(),r=d("div"),u=d("div"),f=d("input"),h=w(),p=d("div"),m=E(g),_=E(" ("),k=E(b),v=E(")"),y=w(),S=d("div");for(let ue=0;ue<Ae.length;ue+=1)Ae[ue].c();C=w(),T=d("button"),A=E(O),x=w(),P=d("div"),D=d("input"),I=w(),R=d("div"),N=E(U),z=w(),B=d("div"),j=d("input"),W=w(),G=d("p"),Q=E(Y),le=w(),Z=d("div"),V=d("input"),X=w(),J=d("div"),ne=E(oe),ee=E(" ("),K=E(se),q=E(")"),ce=w(),he=d("div");for(let ue=0;ue<$.length;ue+=1)$[ue].c();ke=w(),we=d("button"),me=E(pe),c(s,"class","label-text font-semibold"),c(n,"class","label"),c(f,"type","checkbox"),f.checked=!0,c(p,"class","collapse-title text-sm font-medium"),c(T,"type","button"),c(T,"class","btn btn-sm btn-ghost"),c(S,"class","collapse-content space-y-2"),c(u,"class","collapse collapse-arrow bg-base-200"),c(D,"type","checkbox"),c(R,"class","collapse-title text-sm font-medium"),c(j,"type","text"),c(j,"placeholder",F=t[5]("headers.namePlaceholder")),c(j,"class","input input-bordered input-sm w-full"),c(G,"class","text-xs text-gray-500 mt-1"),c(B,"class","collapse-content"),c(P,"class","collapse collapse-arrow bg-base-200"),c(V,"type","checkbox"),c(J,"class","collapse-title text-sm font-medium"),c(we,"type","button"),c(we,"class","btn btn-sm btn-ghost"),c(he,"class","collapse-content space-y-2"),c(Z,"class","collapse collapse-arrow bg-base-200"),c(r,"class","space-y-4"),c(e,"class","form-control w-full")},m(ue,ae){H(ue,e,ae),a(e,n),a(n,s),a(s,i),a(n,l),Ce&&Ce.m(n,null),a(e,o),a(e,r),a(r,u),a(u,f),a(u,h),a(u,p),a(p,m),a(p,_),a(p,k),a(p,v),a(u,y),a(u,S);for(let ge=0;ge<Ae.length;ge+=1)Ae[ge]&&Ae[ge].m(S,null);a(S,C),a(S,T),a(T,A),a(r,x),a(r,P),a(P,D),a(P,I),a(P,R),a(R,N),a(P,z),a(P,B),a(B,j),ie(j,t[3]),a(B,W),a(B,G),a(G,Q),a(r,le),a(r,Z),a(Z,V),a(Z,X),a(Z,J),a(J,ne),a(J,ee),a(J,K),a(J,q),a(Z,ce),a(Z,he);for(let ge=0;ge<$.length;ge+=1)$[ge]&&$[ge].m(he,null);a(he,ke),a(he,we),a(we,me),Pe||(Se=[te(T,"click",t[6]),te(j,"input",t[15]),te(we,"click",t[8])],Pe=!0)},p(ue,[ae]){if(ae&1&&M(i,ue[0]),ue[1]?Ce||(Ce=tf(),Ce.c(),Ce.m(n,null)):Ce&&(Ce.d(1),Ce=null),ae&32&&g!==(g=ue[5]("headers.addHeader")+"")&&M(m,g),ae&4&&b!==(b=ue[2].length+"")&&M(k,b),ae&164){_e=et(ue[2]);let ge;for(ge=0;ge<_e.length;ge+=1){const re=ef(ue,_e,ge);Ae[ge]?Ae[ge].p(re,ae):(Ae[ge]=nf(re),Ae[ge].c(),Ae[ge].m(S,C))}for(;ge<Ae.length;ge+=1)Ae[ge].d(1);Ae.length=_e.length}if(ae&32&&O!==(O=ue[5]("headers.addHeader")+"")&&M(A,O),ae&32&&U!==(U=ue[5]("headers.remove")+"")&&M(N,U),ae&32&&F!==(F=ue[5]("headers.namePlaceholder"))&&c(j,"placeholder",F),ae&8&&j.value!==ue[3]&&ie(j,ue[3]),ae&32&&Y!==(Y=ue[5]("headers.empty")+"")&&M(Q,Y),ae&32&&oe!==(oe=ue[5]("headers.default")+"")&&M(ne,oe),ae&16&&se!==(se=ue[4].length+"")&&M(K,se),ae&560){ye=et(ue[4]);let ge;for(ge=0;ge<ye.length;ge+=1){const re=$c(ue,ye,ge);$[ge]?$[ge].p(re,ae):($[ge]=sf(re),$[ge].c(),$[ge].m(he,ke))}for(;ge<$.length;ge+=1)$[ge].d(1);$.length=ye.length}ae&32&&pe!==(pe=ue[5]("headers.addHeader")+"")&&M(me,pe)},i:Ee,o:Ee,d(ue){ue&&L(e),Ce&&Ce.d(),En(Ae,ue),En($,ue),Pe=!1,at(Se)}}}function qk(t,e,n){let s;Gt(t,Et,O=>n(5,s=O));let{value:i={}}=e,{label:l="Headers"}=e,{showHelp:o=!0}=e,r=[],u="",f=[],h=!1;function p(){n(2,r=[...r,{key:"",value:""}]),n(11,h=!0)}function g(O){n(2,r=r.filter((A,x)=>x!==O))}function m(){n(4,f=[...f,{key:"",value:""}]),n(11,h=!0)}function _(O){n(4,f=f.filter((A,x)=>x!==O))}function b(O,A){O[A].key=this.value,n(2,r),n(11,h),n(10,i),n(3,u),n(4,f)}function k(O,A){O[A].value=this.value,n(2,r),n(11,h),n(10,i),n(3,u),n(4,f)}const v=O=>g(O);function y(){u=this.value,n(3,u),n(11,h),n(10,i),n(2,r),n(4,f)}function S(O,A){O[A].key=this.value,n(4,f),n(11,h),n(10,i),n(2,r),n(3,u)}function C(O,A){O[A].value=this.value,n(4,f),n(11,h),n(10,i),n(2,r),n(3,u)}const T=O=>_(O);return t.$$set=O=>{"value"in O&&n(10,i=O.value),"label"in O&&n(0,l=O.label),"showHelp"in O&&n(1,o=O.showHelp)},t.$$.update=()=>{if(t.$$.dirty&3100){!h&&(i.add||i.remove||i.default)&&(n(2,r=Object.entries(i.add||{}).map(([P,D])=>({key:P,value:String(D)}))),n(3,u=(i.remove||[]).join(", ")),n(4,f=Object.entries(i.default||{}).map(([P,D])=>({key:P,value:String(D)}))),n(11,h=!0));const O={};r.filter(P=>P.key.trim()).forEach(P=>{O[P.key]=P.value}),n(10,i.add=Object.keys(O).length>0?O:void 0,i);const A=u.split(",").map(P=>P.trim()).filter(P=>P);n(10,i.remove=A.length>0?A:void 0,i);const x={};f.filter(P=>P.key.trim()).forEach(P=>{x[P.key]=P.value}),n(10,i.default=Object.keys(x).length>0?x:void 0,i)}},[l,o,r,u,f,s,p,g,m,_,i,h,b,k,v,y,S,C,T]}class zp extends zt{constructor(e){super(),jt(this,e,qk,Wk,Lt,{value:10,label:0,showHelp:1})}}function lf(t,e,n){const s=t.slice();return s[25]=e[n],s[26]=e,s[27]=n,s}function of(t,e,n){const s=t.slice();return s[25]=e[n],s[28]=e,s[27]=n,s}function rf(t,e,n){const s=t.slice();return s[25]=e[n],s[29]=e,s[27]=n,s}function af(t){let e;return{c(){e=d("span"),e.textContent="Support JSON values and dynamic expressions",c(e,"class","label-text-alt text-xs")},m(n,s){H(n,e,s)},d(n){n&&L(e)}}}function uf(t){let e,n,s,i,l,o,r,u,f,h;function p(){t[15].call(n,t[29],t[27])}function g(){t[16].call(l,t[29],t[27])}function m(){return t[17](t[27])}return{c(){e=d("div"),n=d("input"),i=w(),l=d("input"),r=w(),u=d("button"),u.textContent="\u2715",c(n,"type","text"),c(n,"placeholder",s=t[6]("headers.name")),c(n,"class","input input-bordered input-sm flex-1"),c(l,"type","text"),c(l,"placeholder",o=t[6]("headers.value")),c(l,"class","input input-bordered input-sm flex-[2]"),c(u,"type","button"),c(u,"class","btn btn-sm btn-error btn-square"),c(e,"class","flex gap-2")},m(_,b){H(_,e,b),a(e,n),ie(n,t[25].key),a(e,i),a(e,l),ie(l,t[25].value),a(e,r),a(e,u),f||(h=[te(n,"input",p),te(l,"input",g),te(u,"click",m)],f=!0)},p(_,b){t=_,b&64&&s!==(s=t[6]("headers.name"))&&c(n,"placeholder",s),b&4&&n.value!==t[25].key&&ie(n,t[25].key),b&64&&o!==(o=t[6]("headers.value"))&&c(l,"placeholder",o),b&4&&l.value!==t[25].value&&ie(l,t[25].value)},d(_){_&&L(e),f=!1,at(h)}}}function cf(t){let e,n,s,i,l,o,r,u,f,h;function p(){t[19].call(n,t[28],t[27])}function g(){t[20].call(l,t[28],t[27])}function m(){return t[21](t[27])}return{c(){e=d("div"),n=d("input"),i=w(),l=d("input"),r=w(),u=d("button"),u.textContent="\u2715",c(n,"type","text"),c(n,"placeholder",s=t[6]("headers.name")),c(n,"class","input input-bordered input-sm flex-1"),c(l,"type","text"),c(l,"placeholder",o=t[6]("headers.value")),c(l,"class","input input-bordered input-sm flex-[2]"),c(u,"type","button"),c(u,"class","btn btn-sm btn-error btn-square"),c(e,"class","flex gap-2")},m(_,b){H(_,e,b),a(e,n),ie(n,t[25].key),a(e,i),a(e,l),ie(l,t[25].value),a(e,r),a(e,u),f||(h=[te(n,"input",p),te(l,"input",g),te(u,"click",m)],f=!0)},p(_,b){t=_,b&64&&s!==(s=t[6]("headers.name"))&&c(n,"placeholder",s),b&16&&n.value!==t[25].key&&ie(n,t[25].key),b&64&&o!==(o=t[6]("headers.value"))&&c(l,"placeholder",o),b&16&&l.value!==t[25].value&&ie(l,t[25].value)},d(_){_&&L(e),f=!1,at(h)}}}function ff(t){let e,n,s,i,l,o,r,u,f,h;function p(){t[22].call(n,t[26],t[27])}function g(){t[23].call(l,t[26],t[27])}function m(){return t[24](t[27])}return{c(){e=d("div"),n=d("input"),i=w(),l=d("input"),r=w(),u=d("button"),u.textContent="\u2715",c(n,"type","text"),c(n,"placeholder",s=t[6]("headers.name")),c(n,"class","input input-bordered input-sm flex-1"),c(l,"type","text"),c(l,"placeholder",o=t[6]("headers.value")),c(l,"class","input input-bordered input-sm flex-[2]"),c(u,"type","button"),c(u,"class","btn btn-sm btn-error btn-square"),c(e,"class","flex gap-2")},m(_,b){H(_,e,b),a(e,n),ie(n,t[25].key),a(e,i),a(e,l),ie(l,t[25].value),a(e,r),a(e,u),f||(h=[te(n,"input",p),te(l,"input",g),te(u,"click",m)],f=!0)},p(_,b){t=_,b&64&&s!==(s=t[6]("headers.name"))&&c(n,"placeholder",s),b&32&&n.value!==t[25].key&&ie(n,t[25].key),b&64&&o!==(o=t[6]("headers.value"))&&c(l,"placeholder",o),b&32&&l.value!==t[25].value&&ie(l,t[25].value)},d(_){_&&L(e),f=!1,at(h)}}}function Gk(t){let e,n,s,i,l,o,r,u,f,h,p,g=t[6]("common.add")+"",m,_,b=t[2].length+"",k,v,y,S,C,T,O=t[6]("common.add")+"",A,x,P,D,I,R,U=t[6]("headers.remove")+"",N,z,B,j,F,W,G,Y=t[6]("headers.empty")+"",Q,le,Z,V,X,J,oe=t[6]("body.replace")+"",ne,ee,se=t[4].length+"",K,q,ce,he,ke,we,pe=t[6]("common.add")+"",me,Pe,Se,Ce,_e,Ae,ye=t[6]("body.default")+"",$,ue,ae=t[5].length+"",ge,re,Ne,Ye,Ve,Qe,st=t[6]("common.add")+"",Xe,vt,rt,He=t[1]&&af(),$e=et(t[2]),Oe=[];for(let ve=0;ve<$e.length;ve+=1)Oe[ve]=uf(rf(t,$e,ve));let ft=et(t[4]),qe=[];for(let ve=0;ve<ft.length;ve+=1)qe[ve]=cf(of(t,ft,ve));let Re=et(t[5]),ze=[];for(let ve=0;ve<Re.length;ve+=1)ze[ve]=ff(lf(t,Re,ve));return{c(){e=d("div"),n=d("div"),s=d("span"),i=E(t[0]),l=w(),He&&He.c(),o=w(),r=d("div"),u=d("div"),f=d("input"),h=w(),p=d("div"),m=E(g),_=E(" ("),k=E(b),v=E(")"),y=w(),S=d("div");for(let ve=0;ve<Oe.length;ve+=1)Oe[ve].c();C=w(),T=d("button"),A=E(O),x=w(),P=d("div"),D=d("input"),I=w(),R=d("div"),N=E(U),z=w(),B=d("div"),j=d("input"),W=w(),G=d("p"),Q=E(Y),le=w(),Z=d("div"),V=d("input"),X=w(),J=d("div"),ne=E(oe),ee=E(" ("),K=E(se),q=E(")"),ce=w(),he=d("div");for(let ve=0;ve<qe.length;ve+=1)qe[ve].c();ke=w(),we=d("button"),me=E(pe),Pe=w(),Se=d("div"),Ce=d("input"),_e=w(),Ae=d("div"),$=E(ye),ue=E(" ("),ge=E(ae),re=E(")"),Ne=w(),Ye=d("div");for(let ve=0;ve<ze.length;ve+=1)ze[ve].c();Ve=w(),Qe=d("button"),Xe=E(st),c(s,"class","label-text font-semibold"),c(n,"class","label"),c(f,"type","checkbox"),f.checked=!0,c(p,"class","collapse-title text-sm font-medium"),c(T,"type","button"),c(T,"class","btn btn-sm btn-ghost"),c(S,"class","collapse-content space-y-2"),c(u,"class","collapse collapse-arrow bg-base-200"),c(D,"type","checkbox"),c(R,"class","collapse-title text-sm font-medium"),c(j,"type","text"),c(j,"placeholder",F=t[6]("body.placeholder")),c(j,"class","input input-bordered input-sm w-full"),c(G,"class","text-xs text-gray-500 mt-1"),c(B,"class","collapse-content"),c(P,"class","collapse collapse-arrow bg-base-200"),c(V,"type","checkbox"),c(J,"class","collapse-title text-sm font-medium"),c(we,"type","button"),c(we,"class","btn btn-sm btn-ghost"),c(he,"class","collapse-content space-y-2"),c(Z,"class","collapse collapse-arrow bg-base-200"),c(Ce,"type","checkbox"),c(Ae,"class","collapse-title text-sm font-medium"),c(Qe,"type","button"),c(Qe,"class","btn btn-sm btn-ghost"),c(Ye,"class","collapse-content space-y-2"),c(Se,"class","collapse collapse-arrow bg-base-200"),c(r,"class","space-y-4"),c(e,"class","form-control w-full")},m(ve,Je){H(ve,e,Je),a(e,n),a(n,s),a(s,i),a(n,l),He&&He.m(n,null),a(e,o),a(e,r),a(r,u),a(u,f),a(u,h),a(u,p),a(p,m),a(p,_),a(p,k),a(p,v),a(u,y),a(u,S);for(let be=0;be<Oe.length;be+=1)Oe[be]&&Oe[be].m(S,null);a(S,C),a(S,T),a(T,A),a(r,x),a(r,P),a(P,D),a(P,I),a(P,R),a(R,N),a(P,z),a(P,B),a(B,j),ie(j,t[3]),a(B,W),a(B,G),a(G,Q),a(r,le),a(r,Z),a(Z,V),a(Z,X),a(Z,J),a(J,ne),a(J,ee),a(J,K),a(J,q),a(Z,ce),a(Z,he);for(let be=0;be<qe.length;be+=1)qe[be]&&qe[be].m(he,null);a(he,ke),a(he,we),a(we,me),a(r,Pe),a(r,Se),a(Se,Ce),a(Se,_e),a(Se,Ae),a(Ae,$),a(Ae,ue),a(Ae,ge),a(Ae,re),a(Se,Ne),a(Se,Ye);for(let be=0;be<ze.length;be+=1)ze[be]&&ze[be].m(Ye,null);a(Ye,Ve),a(Ye,Qe),a(Qe,Xe),vt||(rt=[te(T,"click",t[7]),te(j,"input",t[18]),te(we,"click",t[9]),te(Qe,"click",t[11])],vt=!0)},p(ve,[Je]){if(Je&1&&M(i,ve[0]),ve[1]?He||(He=af(),He.c(),He.m(n,null)):He&&(He.d(1),He=null),Je&64&&g!==(g=ve[6]("common.add")+"")&&M(m,g),Je&4&&b!==(b=ve[2].length+"")&&M(k,b),Je&324){$e=et(ve[2]);let be;for(be=0;be<$e.length;be+=1){const We=rf(ve,$e,be);Oe[be]?Oe[be].p(We,Je):(Oe[be]=uf(We),Oe[be].c(),Oe[be].m(S,C))}for(;be<Oe.length;be+=1)Oe[be].d(1);Oe.length=$e.length}if(Je&64&&O!==(O=ve[6]("common.add")+"")&&M(A,O),Je&64&&U!==(U=ve[6]("headers.remove")+"")&&M(N,U),Je&64&&F!==(F=ve[6]("body.placeholder"))&&c(j,"placeholder",F),Je&8&&j.value!==ve[3]&&ie(j,ve[3]),Je&64&&Y!==(Y=ve[6]("headers.empty")+"")&&M(Q,Y),Je&64&&oe!==(oe=ve[6]("body.replace")+"")&&M(ne,oe),Je&16&&se!==(se=ve[4].length+"")&&M(K,se),Je&1104){ft=et(ve[4]);let be;for(be=0;be<ft.length;be+=1){const We=of(ve,ft,be);qe[be]?qe[be].p(We,Je):(qe[be]=cf(We),qe[be].c(),qe[be].m(he,ke))}for(;be<qe.length;be+=1)qe[be].d(1);qe.length=ft.length}if(Je&64&&pe!==(pe=ve[6]("common.add")+"")&&M(me,pe),Je&64&&ye!==(ye=ve[6]("body.default")+"")&&M($,ye),Je&32&&ae!==(ae=ve[5].length+"")&&M(ge,ae),Je&4192){Re=et(ve[5]);let be;for(be=0;be<Re.length;be+=1){const We=lf(ve,Re,be);ze[be]?ze[be].p(We,Je):(ze[be]=ff(We),ze[be].c(),ze[be].m(Ye,Ve))}for(;be<ze.length;be+=1)ze[be].d(1);ze.length=Re.length}Je&64&&st!==(st=ve[6]("common.add")+"")&&M(Xe,st)},i:Ee,o:Ee,d(ve){ve&&L(e),He&&He.d(),En(Oe,ve),En(qe,ve),En(ze,ve),vt=!1,at(rt)}}}function Xk(t,e,n){let s;Gt(t,Et,R=>n(6,s=R));let{value:i={}}=e,{label:l="Body"}=e,{showHelp:o=!0}=e,r=[],u="",f=[],h=[],p=!1;function g(){n(2,r=[...r,{key:"",value:""}]),n(14,p=!0)}function m(R){n(2,r=r.filter((U,N)=>N!==R))}function _(){n(4,f=[...f,{key:"",value:""}]),n(14,p=!0)}function b(R){n(4,f=f.filter((U,N)=>N!==R))}function k(){n(5,h=[...h,{key:"",value:""}]),n(14,p=!0)}function v(R){n(5,h=h.filter((U,N)=>N!==R))}function y(R,U){R[U].key=this.value,n(2,r),n(14,p),n(13,i),n(3,u),n(4,f),n(5,h)}function S(R,U){R[U].value=this.value,n(2,r),n(14,p),n(13,i),n(3,u),n(4,f),n(5,h)}const C=R=>m(R);function T(){u=this.value,n(3,u),n(14,p),n(13,i),n(2,r),n(4,f),n(5,h)}function O(R,U){R[U].key=this.value,n(4,f),n(14,p),n(13,i),n(2,r),n(3,u),n(5,h)}function A(R,U){R[U].value=this.value,n(4,f),n(14,p),n(13,i),n(2,r),n(3,u),n(5,h)}const x=R=>b(R);function P(R,U){R[U].key=this.value,n(5,h),n(14,p),n(13,i),n(2,r),n(3,u),n(4,f)}function D(R,U){R[U].value=this.value,n(5,h),n(14,p),n(13,i),n(2,r),n(3,u),n(4,f)}const I=R=>v(R);return t.$$set=R=>{"value"in R&&n(13,i=R.value),"label"in R&&n(0,l=R.label),"showHelp"in R&&n(1,o=R.showHelp)},t.$$.update=()=>{if(t.$$.dirty&24636){!p&&(i.add||i.remove||i.replace||i.default)&&(n(2,r=Object.entries(i.add||{}).map(([B,j])=>({key:B,value:typeof j=="string"?j:JSON.stringify(j)}))),n(3,u=(i.remove||[]).join(", ")),n(4,f=Object.entries(i.replace||{}).map(([B,j])=>({key:B,value:typeof j=="string"?j:JSON.stringify(j)}))),n(5,h=Object.entries(i.default||{}).map(([B,j])=>({key:B,value:typeof j=="string"?j:JSON.stringify(j)}))),n(14,p=!0));const R={};r.filter(B=>B.key.trim()).forEach(B=>{try{R[B.key]=JSON.parse(B.value)}catch{R[B.key]=B.value}}),n(13,i.add=Object.keys(R).length>0?R:void 0,i);const U=u.split(",").map(B=>B.trim()).filter(B=>B);n(13,i.remove=U.length>0?U:void 0,i);const N={};f.filter(B=>B.key.trim()).forEach(B=>{try{N[B.key]=JSON.parse(B.value)}catch{N[B.key]=B.value}}),n(13,i.replace=Object.keys(N).length>0?N:void 0,i);const z={};h.filter(B=>B.key.trim()).forEach(B=>{try{z[B.key]=JSON.parse(B.value)}catch{z[B.key]=B.value}}),n(13,i.default=Object.keys(z).length>0?z:void 0,i)}},[l,o,r,u,f,h,s,g,m,_,b,k,v,i,p,y,S,C,T,O,A,x,P,D,I]}class Up extends zt{constructor(e){super(),jt(this,e,Xk,Gk,Lt,{value:13,label:0,showHelp:1})}}function hf(t,e,n){const s=t.slice();return s[16]=e[n],s}function df(t){let e,n=t[16].name+"",s,i;return{c(){e=d("option"),s=E(n),e.__value=i=t[16].id,ie(e,e.__value)},m(l,o){H(l,e,o),a(e,s)},p(l,o){o&64&&n!==(n=l[16].name+"")&&M(s,n),o&64&&i!==(i=l[16].id)&&(e.__value=i,ie(e,e.__value))},d(l){l&&L(e)}}}function pf(t){let e,n,s=t[6].find(t[12])?.description+"",i;return{c(){e=d("div"),n=d("span"),i=E(s),c(n,"class","label-text-alt text-gray-500"),c(e,"class","label")},m(l,o){H(l,e,o),a(e,n),a(n,i)},p(l,o){o&65&&s!==(s=l[6].find(l[12])?.description+"")&&M(i,s)},d(l){l&&L(e)}}}function gf(t){let e,n,s=t[2]?"Hide":"Show",i,l,o,r,u,f,h=t[2]&&mf(t);return{c(){e=d("div"),n=d("button"),i=E(s),l=E(" Preview"),o=w(),h&&h.c(),r=$n(),c(n,"type","button"),c(n,"class","btn btn-xs btn-outline"),c(e,"class","flex items-center gap-2")},m(p,g){H(p,e,g),a(e,n),a(n,i),a(n,l),H(p,o,g),h&&h.m(p,g),H(p,r,g),u||(f=te(n,"click",t[13]),u=!0)},p(p,g){g&4&&s!==(s=p[2]?"Hide":"Show")&&M(i,s),p[2]?h?h.p(p,g):(h=mf(p),h.c(),h.m(r.parentNode,r)):h&&(h.d(1),h=null)},d(p){p&&(L(e),L(o),L(r)),h&&h.d(p),u=!1,f()}}}function mf(t){let e,n,s,i=t[7]("plugin.testPlugin")+"",l,o,r,u,f,h,p=t[7]("plugin.input")+"",g,m,_,b,k,v,y,S,C=t[7]("plugin.output")+"",T,O,A,x,P,D,I,R,U,N,z=t[7]("plugin.testPlugin")+"",B,j,F,W,G,Y=(t[4]||t[5])&&bf(t),Q=t[5]&&_f(t);return{c(){e=d("div"),n=d("div"),s=d("h4"),l=E(i),o=w(),r=d("div"),u=d("div"),f=d("label"),h=d("span"),g=E(p),m=w(),_=d("textarea"),k=w(),v=d("div"),y=d("label"),S=d("span"),T=E(C),O=w(),A=d("textarea"),P=w(),D=d("div"),I=d("button"),R=de("svg"),U=de("path"),N=w(),B=E(z),j=w(),Y&&Y.c(),F=w(),Q&&Q.c(),c(s,"class","font-semibold text-sm"),c(h,"class","label-text text-xs"),c(f,"class","label py-1"),c(f,"for","plugin-input"),c(_,"id","plugin-input"),c(_,"class","textarea textarea-bordered textarea-sm font-mono text-xs w-full"),c(_,"placeholder",b=t[7]("plugin.inputPlaceholder")),c(_,"rows","10"),c(S,"class","label-text text-xs"),c(y,"class","label py-1"),c(y,"for","plugin-output"),c(A,"id","plugin-output"),c(A,"class","textarea textarea-bordered textarea-sm font-mono text-xs w-full bg-base-100"),A.value=t[4],A.readOnly=!0,c(A,"rows","10"),c(A,"placeholder",x=t[7]("plugin.outputPlaceholder")),c(r,"class","grid grid-cols-2 gap-4"),c(U,"stroke-linecap","round"),c(U,"stroke-linejoin","round"),c(U,"stroke-width","2"),c(U,"d","M14 5l7 7m0 0l-7 7m7-7H3"),c(R,"xmlns","http://www.w3.org/2000/svg"),c(R,"class","h-3 w-3"),c(R,"fill","none"),c(R,"viewBox","0 0 24 24"),c(R,"stroke","currentColor"),c(I,"type","button"),c(I,"class","btn btn-xs btn-primary"),c(D,"class","flex gap-2"),c(n,"class","card-body p-4 space-y-3"),c(e,"class","card bg-base-200")},m(le,Z){H(le,e,Z),a(e,n),a(n,s),a(s,l),a(n,o),a(n,r),a(r,u),a(u,f),a(f,h),a(h,g),a(u,m),a(u,_),ie(_,t[3]),a(r,k),a(r,v),a(v,y),a(y,S),a(S,T),a(v,O),a(v,A),a(n,P),a(n,D),a(D,I),a(I,R),a(R,U),a(I,N),a(I,B),a(D,j),Y&&Y.m(D,null),a(n,F),Q&&Q.m(n,null),W||(G=[te(_,"input",t[14]),te(I,"click",t[9])],W=!0)},p(le,Z){Z&128&&i!==(i=le[7]("plugin.testPlugin")+"")&&M(l,i),Z&128&&p!==(p=le[7]("plugin.input")+"")&&M(g,p),Z&128&&b!==(b=le[7]("plugin.inputPlaceholder"))&&c(_,"placeholder",b),Z&8&&ie(_,le[3]),Z&128&&C!==(C=le[7]("plugin.output")+"")&&M(T,C),Z&16&&(A.value=le[4]),Z&128&&x!==(x=le[7]("plugin.outputPlaceholder"))&&c(A,"placeholder",x),Z&128&&z!==(z=le[7]("plugin.testPlugin")+"")&&M(B,z),le[4]||le[5]?Y?Y.p(le,Z):(Y=bf(le),Y.c(),Y.m(D,null)):Y&&(Y.d(1),Y=null),le[5]?Q?Q.p(le,Z):(Q=_f(le),Q.c(),Q.m(n,null)):Q&&(Q.d(1),Q=null)},d(le){le&&L(e),Y&&Y.d(),Q&&Q.d(),W=!1,at(G)}}}function bf(t){let e,n=t[7]("common.reset")+"",s,i,l;return{c(){e=d("button"),s=E(n),c(e,"type","button"),c(e,"class","btn btn-xs btn-ghost")},m(o,r){H(o,e,r),a(e,s),i||(l=te(e,"click",t[10]),i=!0)},p(o,r){r&128&&n!==(n=o[7]("common.reset")+"")&&M(s,n)},d(o){o&&L(e),i=!1,l()}}}function _f(t){let e,n,s,i,l,o=t[7]("common.error")+"",r,u,f;return{c(){e=d("div"),n=de("svg"),s=de("path"),i=w(),l=d("span"),r=E(o),u=E(": "),f=E(t[5]),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-4 w-4"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(l,"class","text-xs"),c(e,"class","alert alert-error py-2")},m(h,p){H(h,e,p),a(e,n),a(n,s),a(e,i),a(e,l),a(l,r),a(l,u),a(l,f)},p(h,p){p&128&&o!==(o=h[7]("common.error")+"")&&M(r,o),p&32&&M(f,h[5])},d(h){h&&L(e)}}}function Yk(t){let e,n,s,i,l,o,r,u,f=t[7]("plugin.none")+"",h,p,g,m,_,b=et(t[6]),k=[];for(let S=0;S<b.length;S+=1)k[S]=df(hf(t,b,S));let v=t[0]&&pf(t),y=t[0]&&gf(t);return{c(){e=d("div"),n=d("div"),s=d("label"),i=d("span"),l=E(t[1]),o=w(),r=d("select"),u=d("option"),h=E(f);for(let S=0;S<k.length;S+=1)k[S].c();p=w(),v&&v.c(),g=w(),y&&y.c(),c(i,"class","label-text font-semibold"),c(s,"class","label"),c(s,"for","plugin-select"),u.__value=null,ie(u,u.__value),c(r,"id","plugin-select"),c(r,"class","select select-bordered"),t[0]===void 0&&bs(()=>t[11].call(r)),c(n,"class","form-control"),c(e,"class","space-y-3")},m(S,C){H(S,e,C),a(e,n),a(n,s),a(s,i),a(i,l),a(n,o),a(n,r),a(r,u),a(u,h);for(let T=0;T<k.length;T+=1)k[T]&&k[T].m(r,null);Cn(r,t[0],!0),a(n,p),v&&v.m(n,null),a(e,g),y&&y.m(e,null),m||(_=[te(r,"change",t[11]),te(r,"change",t[8])],m=!0)},p(S,[C]){if(C&2&&M(l,S[1]),C&128&&f!==(f=S[7]("plugin.none")+"")&&M(h,f),C&64){b=et(S[6]);let T;for(T=0;T<b.length;T+=1){const O=hf(S,b,T);k[T]?k[T].p(O,C):(k[T]=df(O),k[T].c(),k[T].m(r,null))}for(;T<k.length;T+=1)k[T].d(1);k.length=b.length}C&65&&Cn(r,S[0]),S[0]?v?v.p(S,C):(v=pf(S),v.c(),v.m(n,null)):v&&(v.d(1),v=null),S[0]?y?y.p(S,C):(y=gf(S),y.c(),y.m(e,null)):y&&(y.d(1),y=null)},i:Ee,o:Ee,d(S){S&&L(e),En(k,S),v&&v.d(),y&&y.d(),m=!1,at(_)}}}function Vp(t){return t.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" \u2192 ")}function Jk(t){const e=t.split("-to-");if(e.length===2){const[n,s]=e;return\`Convert \${n.charAt(0).toUpperCase()+n.slice(1)} API format to \${s.charAt(0).toUpperCase()+s.slice(1)} format\`}return\`\${Vp(t)} plugin\`}function Kk(t,e,n){let s;Gt(t,Et,S=>n(7,s=S));let{plugin:i=null}=e,{label:l="Plugin"}=e;const o=Rl();let r=!1,u=\`{
21214
- "model": "claude-3-5-sonnet-20241022",
21215
- "messages": [
21216
- {
21217
- "role": "user",
21218
- "content": "Hello"
21219
- }
21220
- ]
21221
- }\`,f="",h=null,p=[];is(async()=>{try{const S=await Np.getAll();n(6,p=S.map(C=>({id:C,name:Vp(C),description:Jk(C)})))}catch(S){console.warn("Failed to load plugins from API, using fallback:",S),n(6,p=[{id:"openai-to-anthropic",name:"OpenAI \u2192 Anthropic",description:"Convert OpenAI API format to Anthropic format"},{id:"anthropic-to-openai",name:"Anthropic \u2192 OpenAI",description:"Convert Anthropic API format to OpenAI format"},{id:"anthropic-to-gemini",name:"Anthropic \u2192 Gemini",description:"Convert Anthropic API format to Google Gemini format"}])}});function g(){o("change",i),n(4,f=""),n(5,h=null)}function m(){if(!i||!u){n(5,h=s("plugin.testFailed",{values:{error:"Invalid input"}}));return}try{const S=JSON.parse(u);let C;i==="anthropic-to-gemini"?C={contents:S.messages?.map(T=>({role:T.role==="user"?"user":"model",parts:[{text:T.content}]})),generationConfig:{temperature:S.temperature||1,maxOutputTokens:S.max_tokens||8192}}:i==="anthropic-to-openai"?C={model:S.model?.replace("claude","gpt-4"),messages:S.messages,temperature:S.temperature,max_tokens:S.max_tokens}:C={...S,_transformed:!0},n(4,f=JSON.stringify(C,null,2)),n(5,h=null)}catch(S){n(5,h=S.message),n(4,f="")}}function _(){n(4,f=""),n(5,h=null)}function b(){i=Is(this),n(0,i),n(6,p)}const k=S=>S.id===i,v=()=>n(2,r=!r);function y(){u=this.value,n(3,u)}return t.$$set=S=>{"plugin"in S&&n(0,i=S.plugin),"label"in S&&n(1,l=S.label)},[i,l,r,u,f,h,p,s,g,m,_,b,k,v,y]}class Wp extends zt{constructor(e){super(),jt(this,e,Kk,Yk,Lt,{plugin:0,label:1})}}function vf(t){let e,n,s=t[6].find(kf)?.message+"",i,l;return{c(){e=d("label"),n=d("span"),i=E(s),c(n,"class","label-text-alt text-error"),c(e,"class","label"),c(e,"for",l="upstream-target-"+t[2])},m(o,r){H(o,e,r),a(e,n),a(n,i)},p(o,r){r&64&&s!==(s=o[6].find(kf)?.message+"")&&M(i,s),r&4&&l!==(l="upstream-target-"+o[2])&&c(e,"for",l)},d(o){o&&L(e)}}}function Zk(t){let e,n,s,i,l=t[7]("upstream.title",{values:{index:t[2]+1}})+"",o,r,u,f,h,p,g,m,_,b,k,v,y,S,C,T,O=t[7]("upstream.targetUrl")+"",A,x,P,D,I,R,U,N,z,B=t[6].some(yf),j,F,W,G,Y,Q=t[7]("upstream.weight")+"",le,Z,V,X=t[7]("upstream.weightHelp")+"",J,oe,ne,ee,se,K,q,ce,he,ke,we,pe,me,Pe,Se,Ce,_e,Ae,ye,$,ue,ae,ge,re=t[7]("upstream.transformerHelp")+"",Ne,Ye,Ve,Qe,st,Xe,vt,rt,He,$e,Oe,ft,qe,Re=B&&vf(t);function ze(Ke){t[11](Ke)}let ve={label:t[7]("upstream.transformer")};t[5]!==void 0&&(ve.plugin=t[5]),_e=new Wp({props:ve}),vn.push(()=>Kn(_e,"plugin",ze));function Je(Ke){t[13](Ke)}let be={label:t[7]("headers.title")};t[0].headers!==void 0&&(be.value=t[0].headers),Qe=new zp({props:be}),vn.push(()=>Kn(Qe,"value",Je));function We(Ke){t[14](Ke)}let yt={label:t[7]("body.title")};return t[0].body!==void 0&&(yt.value=t[0].body),He=new Up({props:yt}),vn.push(()=>Kn(He,"value",We)),{c(){e=d("div"),n=d("div"),s=d("div"),i=d("h3"),o=E(l),r=w(),u=d("div"),f=d("button"),h=de("svg"),p=de("path"),m=w(),_=d("button"),b=E("\u2715"),v=w(),y=d("div"),S=d("div"),C=d("label"),T=d("span"),A=E(O),x=w(),P=d("span"),P.textContent="*",I=w(),R=d("input"),z=w(),Re&&Re.c(),j=w(),F=d("div"),W=d("div"),G=d("label"),Y=d("span"),le=E(Q),Z=w(),V=d("span"),J=E(X),ne=w(),ee=d("input"),K=w(),q=d("div"),ce=d("label"),he=d("span"),he.textContent="Priority",ke=w(),we=d("span"),we.textContent="Failover order",me=w(),Pe=d("input"),Ce=w(),pt(_e.$$.fragment),ye=w(),$=d("div"),ue=d("input"),ae=w(),ge=d("div"),Ne=E(re),Ye=w(),Ve=d("div"),pt(Qe.$$.fragment),Xe=w(),vt=d("div"),rt=w(),pt(He.$$.fragment),c(i,"class","font-semibold"),c(p,"stroke-linecap","round"),c(p,"stroke-linejoin","round"),c(p,"stroke-width","2"),c(p,"d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"),c(h,"xmlns","http://www.w3.org/2000/svg"),c(h,"class","h-4 w-4"),c(h,"fill","none"),c(h,"viewBox","0 0 24 24"),c(h,"stroke","currentColor"),c(f,"type","button"),c(f,"class","btn btn-sm btn-outline btn-square"),c(f,"title",g=t[7]("routeCard.duplicate")),c(_,"type","button"),c(_,"class","btn btn-sm btn-error btn-square"),c(_,"title",k=t[7]("upstream.remove")),c(u,"class","flex gap-2"),c(s,"class","flex justify-between items-center mb-4"),c(P,"class","text-error"),c(T,"class","label-text font-semibold"),c(C,"class","label"),c(C,"for",D="upstream-target-"+t[2]),c(R,"id",U="upstream-target-"+t[2]),c(R,"type","url"),c(R,"placeholder",N=t[7]("upstream.targetPlaceholder")),c(R,"class","input input-bordered"),R.required=!0,Rt(R,"input-error",t[6].some(wf)),c(S,"class","form-control"),c(Y,"class","label-text"),c(V,"class","label-text-alt text-xs"),c(G,"class","label"),c(G,"for",oe="upstream-weight-"+t[2]),c(ee,"id",se="upstream-weight-"+t[2]),c(ee,"type","number"),c(ee,"placeholder","100"),c(ee,"class","input input-bordered"),c(ee,"min","1"),c(W,"class","form-control"),c(he,"class","label-text"),c(we,"class","label-text-alt text-xs"),c(ce,"class","label"),c(ce,"for",pe="upstream-priority-"+t[2]),c(Pe,"id",Se="upstream-priority-"+t[2]),c(Pe,"type","number"),c(Pe,"placeholder","1"),c(Pe,"class","input input-bordered"),c(Pe,"min","0"),c(q,"class","form-control"),c(F,"class","grid grid-cols-2 gap-4"),c(ue,"type","checkbox"),c(ge,"class","collapse-title text-sm font-medium"),c(vt,"class","divider"),c(Ve,"class","collapse-content space-y-6"),c($,"class","collapse collapse-arrow bg-base-200"),c(y,"class","grid grid-cols-1 gap-4"),c(n,"class","card-body p-4"),c(e,"class","card bg-base-100 shadow-sm border border-base-300")},m(Ke,Ie){H(Ke,e,Ie),a(e,n),a(n,s),a(s,i),a(i,o),a(s,r),a(s,u),a(u,f),a(f,h),a(h,p),a(u,m),a(u,_),a(_,b),a(n,v),a(n,y),a(y,S),a(S,C),a(C,T),a(T,A),a(T,x),a(T,P),a(S,I),a(S,R),ie(R,t[0].target),a(S,z),Re&&Re.m(S,null),a(y,j),a(y,F),a(F,W),a(W,G),a(G,Y),a(Y,le),a(G,Z),a(G,V),a(V,J),a(W,ne),a(W,ee),ie(ee,t[0].weight),a(F,K),a(F,q),a(q,ce),a(ce,he),a(ce,ke),a(ce,we),a(q,me),a(q,Pe),ie(Pe,t[0].priority),a(y,Ce),ut(_e,y,null),a(y,ye),a(y,$),a($,ue),ue.checked=t[1],a($,ae),a($,ge),a(ge,Ne),a($,Ye),a($,Ve),ut(Qe,Ve,null),a(Ve,Xe),a(Ve,vt),a(Ve,rt),ut(He,Ve,null),Oe=!0,ft||(qe=[te(f,"click",function(){ui(t[4])&&t[4].apply(this,arguments)}),te(_,"click",function(){ui(t[3])&&t[3].apply(this,arguments)}),te(R,"input",t[8]),te(ee,"input",t[9]),te(Pe,"input",t[10]),te(ue,"change",t[12])],ft=!0)},p(Ke,[Ie]){t=Ke,(!Oe||Ie&132)&&l!==(l=t[7]("upstream.title",{values:{index:t[2]+1}})+"")&&M(o,l),(!Oe||Ie&128&&g!==(g=t[7]("routeCard.duplicate")))&&c(f,"title",g),(!Oe||Ie&128&&k!==(k=t[7]("upstream.remove")))&&c(_,"title",k),(!Oe||Ie&128)&&O!==(O=t[7]("upstream.targetUrl")+"")&&M(A,O),(!Oe||Ie&4&&D!==(D="upstream-target-"+t[2]))&&c(C,"for",D),(!Oe||Ie&4&&U!==(U="upstream-target-"+t[2]))&&c(R,"id",U),(!Oe||Ie&128&&N!==(N=t[7]("upstream.targetPlaceholder")))&&c(R,"placeholder",N),Ie&1&&R.value!==t[0].target&&ie(R,t[0].target),(!Oe||Ie&64)&&Rt(R,"input-error",t[6].some(wf)),Ie&64&&(B=t[6].some(yf)),B?Re?Re.p(t,Ie):(Re=vf(t),Re.c(),Re.m(S,null)):Re&&(Re.d(1),Re=null),(!Oe||Ie&128)&&Q!==(Q=t[7]("upstream.weight")+"")&&M(le,Q),(!Oe||Ie&128)&&X!==(X=t[7]("upstream.weightHelp")+"")&&M(J,X),(!Oe||Ie&4&&oe!==(oe="upstream-weight-"+t[2]))&&c(G,"for",oe),(!Oe||Ie&4&&se!==(se="upstream-weight-"+t[2]))&&c(ee,"id",se),Ie&1&&gt(ee.value)!==t[0].weight&&ie(ee,t[0].weight),(!Oe||Ie&4&&pe!==(pe="upstream-priority-"+t[2]))&&c(ce,"for",pe),(!Oe||Ie&4&&Se!==(Se="upstream-priority-"+t[2]))&&c(Pe,"id",Se),Ie&1&&gt(Pe.value)!==t[0].priority&&ie(Pe,t[0].priority);const kt={};Ie&128&&(kt.label=t[7]("upstream.transformer")),!Ae&&Ie&32&&(Ae=!0,kt.plugin=t[5],Jn(()=>Ae=!1)),_e.$set(kt),Ie&2&&(ue.checked=t[1]),(!Oe||Ie&128)&&re!==(re=t[7]("upstream.transformerHelp")+"")&&M(Ne,re);const nt={};Ie&128&&(nt.label=t[7]("headers.title")),!st&&Ie&1&&(st=!0,nt.value=t[0].headers,Jn(()=>st=!1)),Qe.$set(nt);const ht={};Ie&128&&(ht.label=t[7]("body.title")),!$e&&Ie&1&&($e=!0,ht.value=t[0].body,Jn(()=>$e=!1)),He.$set(ht)},i(Ke){Oe||(Be(_e.$$.fragment,Ke),Be(Qe.$$.fragment,Ke),Be(He.$$.fragment,Ke),Oe=!0)},o(Ke){Fe(_e.$$.fragment,Ke),Fe(Qe.$$.fragment,Ke),Fe(He.$$.fragment,Ke),Oe=!1},d(Ke){Ke&&L(e),Re&&Re.d(),ct(_e),ct(Qe),ct(He),ft=!1,at(qe)}}}const yf=t=>t.field.includes("target"),wf=t=>t.field.includes("target"),kf=t=>t.field.includes("target");function Qk(t,e,n){let s,i;Gt(t,Et,y=>n(7,i=y));let{upstream:l}=e,{index:o}=e,{onRemove:r}=e,{onDuplicate:u}=e,{showAdvanced:f=!1}=e,h=l.plugins?.[0]||null;function p(){l.target=this.value,n(0,l),n(5,h)}function g(){l.weight=gt(this.value),n(0,l),n(5,h)}function m(){l.priority=gt(this.value),n(0,l),n(5,h)}function _(y){h=y,n(5,h)}function b(){f=this.checked,n(1,f)}function k(y){t.$$.not_equal(l.headers,y)&&(l.headers=y,n(0,l),n(5,h))}function v(y){t.$$.not_equal(l.body,y)&&(l.body=y,n(0,l),n(5,h))}return t.$$set=y=>{"upstream"in y&&n(0,l=y.upstream),"index"in y&&n(2,o=y.index),"onRemove"in y&&n(3,r=y.onRemove),"onDuplicate"in y&&n(4,u=y.onDuplicate),"showAdvanced"in y&&n(1,f=y.showAdvanced)},t.$$.update=()=>{t.$$.dirty&1&&(n(0,l.headers=l.headers||{add:{},remove:[],default:{}},l),n(0,l.body=l.body||{add:{},remove:[],replace:{},default:{}},l)),t.$$.dirty&32&&n(0,l.plugins=h?[h]:void 0,l),t.$$.dirty&5&&n(6,s=jp(l,o))},[l,f,o,r,u,h,s,i,p,g,m,_,b,k,v]}class $k extends zt{constructor(e){super(),jt(this,e,Qk,Zk,Lt,{upstream:0,index:2,onRemove:3,onDuplicate:4,showAdvanced:1})}}function Sf(t,e,n){const s=t.slice();return s[7]=e[n],s}function Ef(t){let e,n,s,i,l,o,r,u,f,h,p,g,m=et(t[1]),_=[];for(let b=0;b<m.length;b+=1)_[b]=Tf(Sf(t,m,b));return{c(){e=d("div"),n=d("div"),s=d("h3"),s.textContent="Select Route Template",i=w(),l=d("div");for(let b=0;b<_.length;b+=1)_[b].c();o=w(),r=d("div"),u=d("button"),u.textContent="Close",f=w(),h=d("button"),c(s,"class","font-bold text-lg mb-4"),c(l,"class","grid grid-cols-1 md:grid-cols-2 gap-4"),c(u,"type","button"),c(u,"class","btn btn-sm"),c(r,"class","modal-action"),c(n,"class","modal-box max-w-4xl"),c(h,"type","button"),c(h,"class","modal-backdrop"),c(h,"aria-label","Close modal"),c(e,"class","modal modal-open")},m(b,k){H(b,e,k),a(e,n),a(n,s),a(n,i),a(n,l);for(let v=0;v<_.length;v+=1)_[v]&&_[v].m(l,null);a(n,o),a(n,r),a(r,u),a(e,f),a(e,h),p||(g=[te(u,"click",t[4]),te(h,"click",t[5])],p=!0)},p(b,k){if(k&6){m=et(b[1]);let v;for(v=0;v<m.length;v+=1){const y=Sf(b,m,v);_[v]?_[v].p(y,k):(_[v]=Tf(y),_[v].c(),_[v].m(l,null))}for(;v<_.length;v+=1)_[v].d(1);_.length=m.length}},d(b){b&&L(e),En(_,b),p=!1,at(g)}}}function Tf(t){let e,n,s,i,l,o,r,u,f,h,p;function g(){return t[3](t[7])}return{c(){e=d("button"),n=d("div"),s=d("h4"),s.textContent=\`\${t[7].name}\`,i=w(),l=d("p"),l.textContent=\`\${t[7].description}\`,o=w(),r=d("div"),u=d("div"),u.textContent=\`\${JSON.stringify(t[7].template,null,2)}\`,f=w(),c(s,"class","card-title text-base"),c(l,"class","text-sm text-gray-600"),c(u,"class","text-xs font-mono bg-base-100 p-2 rounded max-h-32 overflow-auto"),c(r,"class","mt-2"),c(n,"class","card-body"),c(e,"type","button"),c(e,"class","card card-compact bg-base-200 hover:bg-base-300 cursor-pointer text-left")},m(m,_){H(m,e,_),a(e,n),a(n,s),a(n,i),a(n,l),a(n,o),a(n,r),a(r,u),a(e,f),h||(p=te(e,"click",g),h=!0)},p(m,_){t=m},d(m){m&&L(e),h=!1,p()}}}function e3(t){let e,n=t[0]&&Ef(t);return{c(){n&&n.c(),e=$n()},m(s,i){n&&n.m(s,i),H(s,e,i)},p(s,[i]){s[0]?n?n.p(s,i):(n=Ef(s),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:Ee,o:Ee,d(s){s&&L(e),n&&n.d(s)}}}function t3(t,e,n){let{showTemplates:s=!1}=e;const i=Rl(),l=[{name:"Simple Proxy",description:"Basic reverse proxy to a single upstream",template:{path:"/api",upstreams:[{target:"https://api.example.com",weight:100,priority:1}]}},{name:"Load Balanced",description:"Multiple upstreams with load balancing",template:{path:"/api",upstreams:[{target:"https://api1.example.com",weight:100,priority:1},{target:"https://api2.example.com",weight:100,priority:1}]}},{name:"Failover Setup",description:"Primary and backup upstreams with failover",template:{path:"/api",upstreams:[{target:"https://primary.example.com",weight:200,priority:1},{target:"https://backup.example.com",weight:100,priority:2}],failover:{enabled:!0,retryableStatusCodes:[500,502,503,504]}}},{name:"Anthropic to Gemini",description:"Convert Anthropic API to Google Gemini format",template:{path:"/v1/messages",transformer:"anthropic-to-gemini",upstreams:[{target:"https://generativelanguage.googleapis.com",weight:100,priority:1}]}},{name:"Anthropic to OpenAI",description:"Convert Anthropic API to OpenAI format",template:{path:"/v1/messages",transformer:"anthropic-to-openai",upstreams:[{target:"https://api.openai.com",weight:100,priority:1}]}},{name:"Health Checked API",description:"API with health checks enabled",template:{path:"/api",upstreams:[{target:"https://api.example.com",weight:100,priority:1}],healthCheck:{enabled:!0,interval:3e4,timeout:5e3,path:"/health"}}},{name:"Path Rewrite",description:"Route with path rewriting",template:{path:"/api/v2",upstreams:[{target:"https://api.example.com",weight:100,priority:1}],pathRewrite:{"^/api/v2":"/v1"}}}];function o(h){i("select",h.template),n(0,s=!1)}const r=h=>o(h),u=()=>n(0,s=!1),f=()=>n(0,s=!1);return t.$$set=h=>{"showTemplates"in h&&n(0,s=h.showTemplates)},[s,l,o,r,u,f]}class n3 extends zt{constructor(e){super(),jt(this,e,t3,e3,Lt,{showTemplates:0})}}function Mf(t){let e,n=t[22]("routeEditor.failoverHelp")+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","label-text-alt text-xs")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&4194304&&n!==(n=i[22]("routeEditor.failoverHelp")+"")&&M(s,n)},d(i){i&&L(e)}}}function Cf(t){let e,n,s,i=t[22]("routeEditor.retryableStatusCodes")+"",l,o,r,u,f,h,p,g=t[22]("routeEditor.retryableStatusCodesHelp")+"",m,_,b,k,v,y,S=t[22]("routeEditor.passiveHealthCheck")+"",C,T,O,A,x,P,D,I,R=t[22]("routeEditor.passiveHealthCheckTooltip")+"",U,N,z,B,j,F,W=t[22]("routeEditor.consecutiveFailuresThreshold")+"",G,Y,Q,le,Z,V,X=t[22]("routeEditor.consecutiveFailuresThresholdHelp")+"",J,oe,ne,ee,se,K=t[22]("routeEditor.healthyThreshold")+"",q,ce,he,ke,we,pe,me=t[22]("routeEditor.healthyThresholdHelp")+"",Pe,Se,Ce,_e,Ae,ye=t[22]("routeEditor.requestTimeoutMs")+"",$,ue,ae,ge,re,Ne,Ye=t[22]("routeEditor.requestTimeoutMsHelp")+"",Ve,Qe,st,Xe,vt,rt=t[22]("routeEditor.connectTimeoutMs")+"",He,$e,Oe,ft,qe,Re,ze=t[22]("routeEditor.connectTimeoutMsHelp")+"",ve,Je,be,We,yt,Ke=t[22]("routeEditor.recoveryIntervalMs")+"",Ie,kt,nt,ht,Ot,Te,it=t[22]("routeEditor.recoveryIntervalHelp")+"",De,tt,Ht,Rn,pn,xe=t[22]("routeEditor.recoveryTimeoutMs")+"",lt,an,Mt,ls,Tn,zn,It=t[22]("routeEditor.recoveryTimeoutHelp")+"",gn,Dn,un,mn,Pn,Fn,Ln=t[22]("routeEditor.activeHealthCheck")+"",Un,os,Ut,Mn,Hn,hn,Vn,An,wn=t[22]("routeEditor.activeHealthCheckTooltip")+"",kn,Wn,rs,St,Xt,qn,as,ot=t[22]("routeEditor.enableActiveHealthCheck")+"",es,_s,xt,Ct,$t,nn,sn,en=t[22]("routeEditor.slowStart")+"",Vt,ts,Wt,qt,Bt,tn,Pt,Yt,Jt=t[22]("routeEditor.slowStartTooltip")+"",cn,Kt,Zt,Ue,ln,bn,fe,Le=t[22]("routeEditor.enableSlowStart")+"",Qt,vs,ys,Gn,ns,_n,Xn,As,js=t[22]("routeEditor.failoverInfoNotice")+"",gi,Os,mi,In=t[11]&&Pf(t),Nn=t[19]&&Af(t);return{c(){e=d("div"),n=d("label"),s=d("span"),l=E(i),o=w(),r=d("input"),f=w(),h=d("div"),p=d("span"),m=E(g),_=w(),b=d("div"),k=d("input"),v=w(),y=d("div"),C=E(S),T=w(),O=d("div"),A=d("div"),x=de("svg"),P=de("path"),D=w(),I=d("span"),U=E(R),N=w(),z=d("div"),B=d("div"),j=d("label"),F=d("span"),G=E(W),Y=w(),Q=d("input"),le=w(),Z=d("div"),V=d("span"),J=E(X),oe=w(),ne=d("div"),ee=d("label"),se=d("span"),q=E(K),ce=w(),he=d("input"),ke=w(),we=d("div"),pe=d("span"),Pe=E(me),Se=w(),Ce=d("div"),_e=d("label"),Ae=d("span"),$=E(ye),ue=w(),ae=d("input"),ge=w(),re=d("div"),Ne=d("span"),Ve=E(Ye),Qe=w(),st=d("div"),Xe=d("label"),vt=d("span"),He=E(rt),$e=w(),Oe=d("input"),ft=w(),qe=d("div"),Re=d("span"),ve=E(ze),Je=w(),be=d("div"),We=d("label"),yt=d("span"),Ie=E(Ke),kt=w(),nt=d("input"),ht=w(),Ot=d("div"),Te=d("span"),De=E(it),tt=w(),Ht=d("div"),Rn=d("label"),pn=d("span"),lt=E(xe),an=w(),Mt=d("input"),ls=w(),Tn=d("div"),zn=d("span"),gn=E(It),Dn=w(),un=d("div"),mn=d("input"),Pn=w(),Fn=d("div"),Un=E(Ln),os=w(),Ut=d("div"),Mn=d("div"),Hn=de("svg"),hn=de("path"),Vn=w(),An=d("span"),kn=E(wn),Wn=w(),rs=d("div"),St=d("label"),Xt=d("input"),qn=w(),as=d("span"),es=E(ot),_s=w(),In&&In.c(),xt=w(),Ct=d("div"),$t=d("input"),nn=w(),sn=d("div"),Vt=E(en),ts=w(),Wt=d("div"),qt=d("div"),Bt=de("svg"),tn=de("path"),Pt=w(),Yt=d("span"),cn=E(Jt),Kt=w(),Zt=d("div"),Ue=d("label"),ln=d("input"),bn=w(),fe=d("span"),Qt=E(Le),vs=w(),Nn&&Nn.c(),ys=w(),Gn=d("div"),ns=de("svg"),_n=de("path"),Xn=w(),As=d("div"),gi=E(js),c(s,"class","label-text"),c(n,"class","label"),c(n,"for","failover-status-codes"),c(r,"id","failover-status-codes"),c(r,"type","text"),c(r,"placeholder",u=t[22]("routeEditor.retryableStatusCodesPlaceholder")),c(r,"class","input input-bordered input-sm"),c(p,"class","label-text-alt text-xs"),c(h,"class","label"),c(e,"class","form-control"),c(k,"type","checkbox"),c(y,"class","collapse-title text-sm font-medium"),c(P,"stroke-linecap","round"),c(P,"stroke-linejoin","round"),c(P,"stroke-width","2"),c(P,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(x,"xmlns","http://www.w3.org/2000/svg"),c(x,"fill","none"),c(x,"viewBox","0 0 24 24"),c(x,"class","stroke-current shrink-0 w-4 h-4"),c(A,"class","text-xs text-base-content/60 bg-base-300 rounded p-2 flex gap-2 items-start"),c(F,"class","label-text"),c(j,"class","label"),c(j,"for","consecutive-failures-threshold"),c(Q,"id","consecutive-failures-threshold"),c(Q,"type","number"),c(Q,"placeholder","3"),c(Q,"class","input input-bordered input-sm"),c(Q,"min","1"),c(V,"class","label-text-alt text-xs"),c(Z,"class","label"),c(B,"class","form-control"),c(se,"class","label-text"),c(ee,"class","label"),c(ee,"for","healthy-threshold"),c(he,"id","healthy-threshold"),c(he,"type","number"),c(he,"placeholder","2"),c(he,"class","input input-bordered input-sm"),c(he,"min","1"),c(pe,"class","label-text-alt text-xs"),c(we,"class","label"),c(ne,"class","form-control"),c(Ae,"class","label-text"),c(_e,"class","label"),c(_e,"for","request-timeout-ms"),c(ae,"id","request-timeout-ms"),c(ae,"type","number"),c(ae,"placeholder","30000"),c(ae,"class","input input-bordered input-sm"),c(ae,"min","100"),c(Ne,"class","label-text-alt text-xs"),c(re,"class","label"),c(Ce,"class","form-control"),c(vt,"class","label-text"),c(Xe,"class","label"),c(Xe,"for","connect-timeout-ms"),c(Oe,"id","connect-timeout-ms"),c(Oe,"type","number"),c(Oe,"placeholder","5000"),c(Oe,"class","input input-bordered input-sm"),c(Oe,"min","100"),c(Re,"class","label-text-alt text-xs"),c(qe,"class","label"),c(st,"class","form-control"),c(yt,"class","label-text"),c(We,"class","label"),c(We,"for","recovery-interval-ms"),c(nt,"id","recovery-interval-ms"),c(nt,"type","number"),c(nt,"placeholder","5000"),c(nt,"class","input input-bordered input-sm"),c(nt,"min","1000"),c(Te,"class","label-text-alt text-xs"),c(Ot,"class","label"),c(be,"class","form-control"),c(pn,"class","label-text"),c(Rn,"class","label"),c(Rn,"for","recovery-timeout-ms"),c(Mt,"id","recovery-timeout-ms"),c(Mt,"type","number"),c(Mt,"placeholder","3000"),c(Mt,"class","input input-bordered input-sm"),c(Mt,"min","100"),c(zn,"class","label-text-alt text-xs"),c(Tn,"class","label"),c(Ht,"class","form-control"),c(z,"class","grid grid-cols-1 md:grid-cols-2 gap-4"),c(O,"class","collapse-content space-y-4"),c(b,"class","collapse collapse-arrow bg-base-200"),c(mn,"type","checkbox"),c(Fn,"class","collapse-title text-sm font-medium"),c(hn,"stroke-linecap","round"),c(hn,"stroke-linejoin","round"),c(hn,"stroke-width","2"),c(hn,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(Hn,"xmlns","http://www.w3.org/2000/svg"),c(Hn,"fill","none"),c(Hn,"viewBox","0 0 24 24"),c(Hn,"class","stroke-current shrink-0 w-4 h-4"),c(Mn,"class","text-xs text-base-content/60 bg-base-300 rounded p-2 flex gap-2 items-start"),c(Xt,"type","checkbox"),c(Xt,"class","checkbox checkbox-sm"),c(as,"class","label-text"),c(St,"class","label cursor-pointer justify-start gap-4"),c(rs,"class","form-control"),c(Ut,"class","collapse-content space-y-4"),c(un,"class","collapse collapse-arrow bg-base-200"),c($t,"type","checkbox"),c(sn,"class","collapse-title text-sm font-medium"),c(tn,"stroke-linecap","round"),c(tn,"stroke-linejoin","round"),c(tn,"stroke-width","2"),c(tn,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(Bt,"xmlns","http://www.w3.org/2000/svg"),c(Bt,"fill","none"),c(Bt,"viewBox","0 0 24 24"),c(Bt,"class","stroke-current shrink-0 w-4 h-4"),c(qt,"class","text-xs text-base-content/60 bg-base-300 rounded p-2 flex gap-2 items-start"),c(ln,"type","checkbox"),c(ln,"class","checkbox checkbox-sm"),c(fe,"class","label-text"),c(Ue,"class","label cursor-pointer justify-start gap-4"),c(Zt,"class","form-control"),c(Wt,"class","collapse-content space-y-4"),c(Ct,"class","collapse collapse-arrow bg-base-200"),c(_n,"stroke-linecap","round"),c(_n,"stroke-linejoin","round"),c(_n,"stroke-width","2"),c(_n,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(ns,"xmlns","http://www.w3.org/2000/svg"),c(ns,"fill","none"),c(ns,"viewBox","0 0 24 24"),c(ns,"class","stroke-current shrink-0 w-4 h-4"),c(Gn,"class","alert alert-info shadow-sm text-xs")},m(je,Ze){H(je,e,Ze),a(e,n),a(n,s),a(s,l),a(e,o),a(e,r),ie(r,t[4]),a(e,f),a(e,h),a(h,p),a(p,m),H(je,_,Ze),H(je,b,Ze),a(b,k),a(b,v),a(b,y),a(y,C),a(b,T),a(b,O),a(O,A),a(A,x),a(x,P),a(A,D),a(A,I),a(I,U),a(O,N),a(O,z),a(z,B),a(B,j),a(j,F),a(F,G),a(B,Y),a(B,Q),ie(Q,t[5]),a(B,le),a(B,Z),a(Z,V),a(V,J),a(z,oe),a(z,ne),a(ne,ee),a(ee,se),a(se,q),a(ne,ce),a(ne,he),ie(he,t[6]),a(ne,ke),a(ne,we),a(we,pe),a(pe,Pe),a(z,Se),a(z,Ce),a(Ce,_e),a(_e,Ae),a(Ae,$),a(Ce,ue),a(Ce,ae),ie(ae,t[7]),a(Ce,ge),a(Ce,re),a(re,Ne),a(Ne,Ve),a(z,Qe),a(z,st),a(st,Xe),a(Xe,vt),a(vt,He),a(st,$e),a(st,Oe),ie(Oe,t[8]),a(st,ft),a(st,qe),a(qe,Re),a(Re,ve),a(z,Je),a(z,be),a(be,We),a(We,yt),a(yt,Ie),a(be,kt),a(be,nt),ie(nt,t[9]),a(be,ht),a(be,Ot),a(Ot,Te),a(Te,De),a(z,tt),a(z,Ht),a(Ht,Rn),a(Rn,pn),a(pn,lt),a(Ht,an),a(Ht,Mt),ie(Mt,t[10]),a(Ht,ls),a(Ht,Tn),a(Tn,zn),a(zn,gn),H(je,Dn,Ze),H(je,un,Ze),a(un,mn),a(un,Pn),a(un,Fn),a(Fn,Un),a(un,os),a(un,Ut),a(Ut,Mn),a(Mn,Hn),a(Hn,hn),a(Mn,Vn),a(Mn,An),a(An,kn),a(Ut,Wn),a(Ut,rs),a(rs,St),a(St,Xt),Xt.checked=t[11],a(St,qn),a(St,as),a(as,es),a(Ut,_s),In&&In.m(Ut,null),H(je,xt,Ze),H(je,Ct,Ze),a(Ct,$t),a(Ct,nn),a(Ct,sn),a(sn,Vt),a(Ct,ts),a(Ct,Wt),a(Wt,qt),a(qt,Bt),a(Bt,tn),a(qt,Pt),a(qt,Yt),a(Yt,cn),a(Wt,Kt),a(Wt,Zt),a(Zt,Ue),a(Ue,ln),ln.checked=t[19],a(Ue,bn),a(Ue,fe),a(fe,Qt),a(Wt,vs),Nn&&Nn.m(Wt,null),H(je,ys,Ze),H(je,Gn,Ze),a(Gn,ns),a(ns,_n),a(Gn,Xn),a(Gn,As),a(As,gi),Os||(mi=[te(r,"input",t[28]),te(Q,"input",t[29]),te(he,"input",t[30]),te(ae,"input",t[31]),te(Oe,"input",t[32]),te(nt,"input",t[33]),te(Mt,"input",t[34]),te(Xt,"change",t[35]),te(ln,"change",t[43])],Os=!0)},p(je,Ze){Ze[0]&4194304&&i!==(i=je[22]("routeEditor.retryableStatusCodes")+"")&&M(l,i),Ze[0]&4194304&&u!==(u=je[22]("routeEditor.retryableStatusCodesPlaceholder"))&&c(r,"placeholder",u),Ze[0]&16&&r.value!==je[4]&&ie(r,je[4]),Ze[0]&4194304&&g!==(g=je[22]("routeEditor.retryableStatusCodesHelp")+"")&&M(m,g),Ze[0]&4194304&&S!==(S=je[22]("routeEditor.passiveHealthCheck")+"")&&M(C,S),Ze[0]&4194304&&R!==(R=je[22]("routeEditor.passiveHealthCheckTooltip")+"")&&M(U,R),Ze[0]&4194304&&W!==(W=je[22]("routeEditor.consecutiveFailuresThreshold")+"")&&M(G,W),Ze[0]&32&&gt(Q.value)!==je[5]&&ie(Q,je[5]),Ze[0]&4194304&&X!==(X=je[22]("routeEditor.consecutiveFailuresThresholdHelp")+"")&&M(J,X),Ze[0]&4194304&&K!==(K=je[22]("routeEditor.healthyThreshold")+"")&&M(q,K),Ze[0]&64&&gt(he.value)!==je[6]&&ie(he,je[6]),Ze[0]&4194304&&me!==(me=je[22]("routeEditor.healthyThresholdHelp")+"")&&M(Pe,me),Ze[0]&4194304&&ye!==(ye=je[22]("routeEditor.requestTimeoutMs")+"")&&M($,ye),Ze[0]&128&&gt(ae.value)!==je[7]&&ie(ae,je[7]),Ze[0]&4194304&&Ye!==(Ye=je[22]("routeEditor.requestTimeoutMsHelp")+"")&&M(Ve,Ye),Ze[0]&4194304&&rt!==(rt=je[22]("routeEditor.connectTimeoutMs")+"")&&M(He,rt),Ze[0]&256&&gt(Oe.value)!==je[8]&&ie(Oe,je[8]),Ze[0]&4194304&&ze!==(ze=je[22]("routeEditor.connectTimeoutMsHelp")+"")&&M(ve,ze),Ze[0]&4194304&&Ke!==(Ke=je[22]("routeEditor.recoveryIntervalMs")+"")&&M(Ie,Ke),Ze[0]&512&&gt(nt.value)!==je[9]&&ie(nt,je[9]),Ze[0]&4194304&&it!==(it=je[22]("routeEditor.recoveryIntervalHelp")+"")&&M(De,it),Ze[0]&4194304&&xe!==(xe=je[22]("routeEditor.recoveryTimeoutMs")+"")&&M(lt,xe),Ze[0]&1024&&gt(Mt.value)!==je[10]&&ie(Mt,je[10]),Ze[0]&4194304&&It!==(It=je[22]("routeEditor.recoveryTimeoutHelp")+"")&&M(gn,It),Ze[0]&4194304&&Ln!==(Ln=je[22]("routeEditor.activeHealthCheck")+"")&&M(Un,Ln),Ze[0]&4194304&&wn!==(wn=je[22]("routeEditor.activeHealthCheckTooltip")+"")&&M(kn,wn),Ze[0]&2048&&(Xt.checked=je[11]),Ze[0]&4194304&&ot!==(ot=je[22]("routeEditor.enableActiveHealthCheck")+"")&&M(es,ot),je[11]?In?In.p(je,Ze):(In=Pf(je),In.c(),In.m(Ut,null)):In&&(In.d(1),In=null),Ze[0]&4194304&&en!==(en=je[22]("routeEditor.slowStart")+"")&&M(Vt,en),Ze[0]&4194304&&Jt!==(Jt=je[22]("routeEditor.slowStartTooltip")+"")&&M(cn,Jt),Ze[0]&524288&&(ln.checked=je[19]),Ze[0]&4194304&&Le!==(Le=je[22]("routeEditor.enableSlowStart")+"")&&M(Qt,Le),je[19]?Nn?Nn.p(je,Ze):(Nn=Af(je),Nn.c(),Nn.m(Wt,null)):Nn&&(Nn.d(1),Nn=null),Ze[0]&4194304&&js!==(js=je[22]("routeEditor.failoverInfoNotice")+"")&&M(gi,js)},d(je){je&&(L(e),L(_),L(b),L(Dn),L(un),L(xt),L(Ct),L(ys),L(Gn)),In&&In.d(),Nn&&Nn.d(),Os=!1,at(mi)}}}function Pf(t){let e,n,s,i,l=t[22]("routeEditor.healthCheckIntervalMs")+"",o,r,u,f,h,p,g=t[22]("routeEditor.healthCheckIntervalMsHelp")+"",m,_,b,k,v,y=t[22]("routeEditor.healthCheckTimeoutMs")+"",S,C,T,O,A,x,P=t[22]("routeEditor.healthCheckTimeoutMsHelp")+"",D,I,R,U,N,z=t[22]("routeEditor.healthCheckPath")+"",B,j,F,W,G,Y,Q=t[22]("routeEditor.healthCheckPathHelp")+"",le,Z,V,X,J,oe=t[22]("routeEditor.healthCheckMethod")+"",ne,ee,se,K,q,ce,he,ke,we,pe,me,Pe=t[22]("routeEditor.healthCheckExpectedStatus")+"",Se,Ce,_e,Ae,ye,$,ue=t[22]("routeEditor.healthCheckExpectedStatusHelp")+"",ae,ge,re,Ne,Ye,Ve=t[22]("routeEditor.healthCheckUnhealthyThreshold")+"",Qe,st,Xe,vt,rt,He,$e=t[22]("routeEditor.healthCheckUnhealthyThresholdHelp")+"",Oe,ft,qe,Re,ze,ve=t[22]("routeEditor.healthCheckHealthyThreshold")+"",Je,be,We,yt,Ke,Ie,kt=t[22]("routeEditor.healthCheckHealthyThresholdHelp")+"",nt,ht,Ot;return{c(){e=d("div"),n=d("div"),s=d("label"),i=d("span"),o=E(l),r=w(),u=d("input"),f=w(),h=d("div"),p=d("span"),m=E(g),_=w(),b=d("div"),k=d("label"),v=d("span"),S=E(y),C=w(),T=d("input"),O=w(),A=d("div"),x=d("span"),D=E(P),I=w(),R=d("div"),U=d("label"),N=d("span"),B=E(z),j=w(),F=d("input"),W=w(),G=d("div"),Y=d("span"),le=E(Q),Z=w(),V=d("div"),X=d("label"),J=d("span"),ne=E(oe),ee=w(),se=d("select"),K=d("option"),K.textContent="GET (default)",q=d("option"),q.textContent="GET",ce=d("option"),ce.textContent="POST",he=d("option"),he.textContent="HEAD",ke=w(),we=d("div"),pe=d("label"),me=d("span"),Se=E(Pe),Ce=w(),_e=d("input"),Ae=w(),ye=d("div"),$=d("span"),ae=E(ue),ge=w(),re=d("div"),Ne=d("label"),Ye=d("span"),Qe=E(Ve),st=w(),Xe=d("input"),vt=w(),rt=d("div"),He=d("span"),Oe=E($e),ft=w(),qe=d("div"),Re=d("label"),ze=d("span"),Je=E(ve),be=w(),We=d("input"),yt=w(),Ke=d("div"),Ie=d("span"),nt=E(kt),c(i,"class","label-text"),c(s,"class","label"),c(s,"for","health-check-interval-ms"),c(u,"id","health-check-interval-ms"),c(u,"type","number"),c(u,"placeholder","10000"),c(u,"class","input input-bordered input-sm"),c(u,"min","1000"),c(p,"class","label-text-alt text-xs"),c(h,"class","label"),c(n,"class","form-control"),c(v,"class","label-text"),c(k,"class","label"),c(k,"for","health-check-timeout-ms"),c(T,"id","health-check-timeout-ms"),c(T,"type","number"),c(T,"placeholder","3000"),c(T,"class","input input-bordered input-sm"),c(T,"min","100"),c(x,"class","label-text-alt text-xs"),c(A,"class","label"),c(b,"class","form-control"),c(N,"class","label-text"),c(U,"class","label"),c(U,"for","health-check-path"),c(F,"id","health-check-path"),c(F,"type","text"),c(F,"placeholder","/health"),c(F,"class","input input-bordered input-sm"),c(Y,"class","label-text-alt text-xs"),c(G,"class","label"),c(R,"class","form-control"),c(J,"class","label-text"),c(X,"class","label"),c(X,"for","health-check-method"),K.__value="",ie(K,K.__value),q.__value="GET",ie(q,q.__value),ce.__value="POST",ie(ce,ce.__value),he.__value="HEAD",ie(he,he.__value),c(se,"id","health-check-method"),c(se,"class","select select-bordered select-sm"),t[15]===void 0&&bs(()=>t[39].call(se)),c(V,"class","form-control"),c(me,"class","label-text"),c(pe,"class","label"),c(pe,"for","health-check-expected-status"),c(_e,"id","health-check-expected-status"),c(_e,"type","text"),c(_e,"placeholder","200"),c(_e,"class","input input-bordered input-sm"),c($,"class","label-text-alt text-xs"),c(ye,"class","label"),c(we,"class","form-control"),c(Ye,"class","label-text"),c(Ne,"class","label"),c(Ne,"for","health-check-unhealthy-threshold"),c(Xe,"id","health-check-unhealthy-threshold"),c(Xe,"type","number"),c(Xe,"placeholder","3"),c(Xe,"class","input input-bordered input-sm"),c(Xe,"min","1"),c(He,"class","label-text-alt text-xs"),c(rt,"class","label"),c(re,"class","form-control"),c(ze,"class","label-text"),c(Re,"class","label"),c(Re,"for","health-check-healthy-threshold"),c(We,"id","health-check-healthy-threshold"),c(We,"type","number"),c(We,"placeholder","2"),c(We,"class","input input-bordered input-sm"),c(We,"min","1"),c(Ie,"class","label-text-alt text-xs"),c(Ke,"class","label"),c(qe,"class","form-control"),c(e,"class","grid grid-cols-1 md:grid-cols-2 gap-4")},m(Te,it){H(Te,e,it),a(e,n),a(n,s),a(s,i),a(i,o),a(n,r),a(n,u),ie(u,t[12]),a(n,f),a(n,h),a(h,p),a(p,m),a(e,_),a(e,b),a(b,k),a(k,v),a(v,S),a(b,C),a(b,T),ie(T,t[13]),a(b,O),a(b,A),a(A,x),a(x,D),a(e,I),a(e,R),a(R,U),a(U,N),a(N,B),a(R,j),a(R,F),ie(F,t[14]),a(R,W),a(R,G),a(G,Y),a(Y,le),a(e,Z),a(e,V),a(V,X),a(X,J),a(J,ne),a(V,ee),a(V,se),a(se,K),a(se,q),a(se,ce),a(se,he),Cn(se,t[15],!0),a(e,ke),a(e,we),a(we,pe),a(pe,me),a(me,Se),a(we,Ce),a(we,_e),ie(_e,t[16]),a(we,Ae),a(we,ye),a(ye,$),a($,ae),a(e,ge),a(e,re),a(re,Ne),a(Ne,Ye),a(Ye,Qe),a(re,st),a(re,Xe),ie(Xe,t[17]),a(re,vt),a(re,rt),a(rt,He),a(He,Oe),a(e,ft),a(e,qe),a(qe,Re),a(Re,ze),a(ze,Je),a(qe,be),a(qe,We),ie(We,t[18]),a(qe,yt),a(qe,Ke),a(Ke,Ie),a(Ie,nt),ht||(Ot=[te(u,"input",t[36]),te(T,"input",t[37]),te(F,"input",t[38]),te(se,"change",t[39]),te(_e,"input",t[40]),te(Xe,"input",t[41]),te(We,"input",t[42])],ht=!0)},p(Te,it){it[0]&4194304&&l!==(l=Te[22]("routeEditor.healthCheckIntervalMs")+"")&&M(o,l),it[0]&4096&&gt(u.value)!==Te[12]&&ie(u,Te[12]),it[0]&4194304&&g!==(g=Te[22]("routeEditor.healthCheckIntervalMsHelp")+"")&&M(m,g),it[0]&4194304&&y!==(y=Te[22]("routeEditor.healthCheckTimeoutMs")+"")&&M(S,y),it[0]&8192&&gt(T.value)!==Te[13]&&ie(T,Te[13]),it[0]&4194304&&P!==(P=Te[22]("routeEditor.healthCheckTimeoutMsHelp")+"")&&M(D,P),it[0]&4194304&&z!==(z=Te[22]("routeEditor.healthCheckPath")+"")&&M(B,z),it[0]&16384&&F.value!==Te[14]&&ie(F,Te[14]),it[0]&4194304&&Q!==(Q=Te[22]("routeEditor.healthCheckPathHelp")+"")&&M(le,Q),it[0]&4194304&&oe!==(oe=Te[22]("routeEditor.healthCheckMethod")+"")&&M(ne,oe),it[0]&32768&&Cn(se,Te[15]),it[0]&4194304&&Pe!==(Pe=Te[22]("routeEditor.healthCheckExpectedStatus")+"")&&M(Se,Pe),it[0]&65536&&_e.value!==Te[16]&&ie(_e,Te[16]),it[0]&4194304&&ue!==(ue=Te[22]("routeEditor.healthCheckExpectedStatusHelp")+"")&&M(ae,ue),it[0]&4194304&&Ve!==(Ve=Te[22]("routeEditor.healthCheckUnhealthyThreshold")+"")&&M(Qe,Ve),it[0]&131072&&gt(Xe.value)!==Te[17]&&ie(Xe,Te[17]),it[0]&4194304&&$e!==($e=Te[22]("routeEditor.healthCheckUnhealthyThresholdHelp")+"")&&M(Oe,$e),it[0]&4194304&&ve!==(ve=Te[22]("routeEditor.healthCheckHealthyThreshold")+"")&&M(Je,ve),it[0]&262144&&gt(We.value)!==Te[18]&&ie(We,Te[18]),it[0]&4194304&&kt!==(kt=Te[22]("routeEditor.healthCheckHealthyThresholdHelp")+"")&&M(nt,kt)},d(Te){Te&&L(e),ht=!1,at(Ot)}}}function Af(t){let e,n,s,i,l=t[22]("routeEditor.slowStartDurationMs")+"",o,r,u,f,h,p,g=t[22]("routeEditor.slowStartDurationMsHelp")+"",m,_,b,k,v,y=t[22]("routeEditor.slowStartInitialWeightFactor")+"",S,C,T,O,A,x,P=t[22]("routeEditor.slowStartInitialWeightFactorHelp")+"",D,I,R;return{c(){e=d("div"),n=d("div"),s=d("label"),i=d("span"),o=E(l),r=w(),u=d("input"),f=w(),h=d("div"),p=d("span"),m=E(g),_=w(),b=d("div"),k=d("label"),v=d("span"),S=E(y),C=w(),T=d("input"),O=w(),A=d("div"),x=d("span"),D=E(P),c(i,"class","label-text"),c(s,"class","label"),c(s,"for","slow-start-duration-ms"),c(u,"id","slow-start-duration-ms"),c(u,"type","number"),c(u,"placeholder","30000"),c(u,"class","input input-bordered input-sm"),c(u,"min","1000"),c(p,"class","label-text-alt text-xs"),c(h,"class","label"),c(n,"class","form-control"),c(v,"class","label-text"),c(k,"class","label"),c(k,"for","slow-start-initial-weight-factor"),c(T,"id","slow-start-initial-weight-factor"),c(T,"type","number"),c(T,"placeholder","0.1"),c(T,"class","input input-bordered input-sm"),c(T,"min","0.01"),c(T,"max","1"),c(T,"step","0.01"),c(x,"class","label-text-alt text-xs"),c(A,"class","label"),c(b,"class","form-control"),c(e,"class","grid grid-cols-1 md:grid-cols-2 gap-4")},m(U,N){H(U,e,N),a(e,n),a(n,s),a(s,i),a(i,o),a(n,r),a(n,u),ie(u,t[20]),a(n,f),a(n,h),a(h,p),a(p,m),a(e,_),a(e,b),a(b,k),a(k,v),a(v,S),a(b,C),a(b,T),ie(T,t[21]),a(b,O),a(b,A),a(A,x),a(x,D),I||(R=[te(u,"input",t[44]),te(T,"input",t[45])],I=!0)},p(U,N){N[0]&4194304&&l!==(l=U[22]("routeEditor.slowStartDurationMs")+"")&&M(o,l),N[0]&1048576&&gt(u.value)!==U[20]&&ie(u,U[20]),N[0]&4194304&&g!==(g=U[22]("routeEditor.slowStartDurationMsHelp")+"")&&M(m,g),N[0]&4194304&&y!==(y=U[22]("routeEditor.slowStartInitialWeightFactor")+"")&&M(S,y),N[0]&2097152&&gt(T.value)!==U[21]&&ie(T,U[21]),N[0]&4194304&&P!==(P=U[22]("routeEditor.slowStartInitialWeightFactorHelp")+"")&&M(D,P)},d(U){U&&L(e),I=!1,at(R)}}}function s3(t){let e,n,s,i,l,o,r,u,f,h,p,g,m=t[22]("routeEditor.enableFailover")+"",_,b,k,v,y=t[1]&&Mf(t),S=t[2]&&Cf(t);return{c(){e=d("div"),n=d("div"),s=d("span"),i=E(t[0]),l=w(),y&&y.c(),o=w(),r=d("div"),u=d("div"),f=d("label"),h=d("input"),p=w(),g=d("span"),_=E(m),b=w(),S&&S.c(),c(s,"class","label-text font-semibold"),c(n,"class","label"),c(h,"type","checkbox"),c(h,"class","checkbox"),c(g,"class","label-text"),c(f,"class","label cursor-pointer justify-start gap-4"),c(u,"class","form-control"),c(r,"class","space-y-4"),c(e,"class","form-control w-full")},m(C,T){H(C,e,T),a(e,n),a(n,s),a(s,i),a(n,l),y&&y.m(n,null),a(e,o),a(e,r),a(r,u),a(u,f),a(f,h),h.checked=t[2],a(f,p),a(f,g),a(g,_),a(r,b),S&&S.m(r,null),k||(v=[te(h,"change",t[26]),te(h,"change",t[27])],k=!0)},p(C,T){T[0]&1&&M(i,C[0]),C[1]?y?y.p(C,T):(y=Mf(C),y.c(),y.m(n,null)):y&&(y.d(1),y=null),T[0]&4&&(h.checked=C[2]),T[0]&4194304&&m!==(m=C[22]("routeEditor.enableFailover")+"")&&M(_,m),C[2]?S?S.p(C,T):(S=Cf(C),S.c(),S.m(r,null)):S&&(S.d(1),S=null)},i:Ee,o:Ee,d(C){C&&L(e),y&&y.d(),S&&S.d(),k=!1,at(v)}}}function Of(t){return t.split(",").map(e=>parseInt(e.trim())).filter(e=>!isNaN(e)&&e>=100&&e<600)}function i3(t,e,n){let s;Gt(t,Et,q=>n(22,s=q));let{value:i=void 0}=e,{label:l="Failover"}=e,{showHelp:o=!0}=e,r=!1,u=!1,f=[],h="",p,g,m,_,b,k,v=!1,y,S,C,T,O=[],A="",x,P,D=!1,I,R;function U(){r=this.checked,n(2,r),n(3,u),n(23,i),n(24,f),n(25,O),n(5,p),n(6,g),n(7,m),n(8,_),n(9,b),n(10,k),n(11,v),n(12,y),n(13,S),n(14,C),n(15,T),n(17,x),n(18,P),n(19,D),n(20,I),n(21,R),n(4,h),n(16,A)}const N=()=>{n(3,u=!0)};function z(){h=this.value,n(4,h),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(5,p),n(6,g),n(7,m),n(8,_),n(9,b),n(10,k),n(11,v),n(12,y),n(13,S),n(14,C),n(15,T),n(17,x),n(18,P),n(19,D),n(20,I),n(21,R),n(16,A)}function B(){p=gt(this.value),n(5,p),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(6,g),n(7,m),n(8,_),n(9,b),n(10,k),n(11,v),n(12,y),n(13,S),n(14,C),n(15,T),n(17,x),n(18,P),n(19,D),n(20,I),n(21,R),n(4,h),n(16,A)}function j(){g=gt(this.value),n(6,g),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(5,p),n(7,m),n(8,_),n(9,b),n(10,k),n(11,v),n(12,y),n(13,S),n(14,C),n(15,T),n(17,x),n(18,P),n(19,D),n(20,I),n(21,R),n(4,h),n(16,A)}function F(){m=gt(this.value),n(7,m),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(5,p),n(6,g),n(8,_),n(9,b),n(10,k),n(11,v),n(12,y),n(13,S),n(14,C),n(15,T),n(17,x),n(18,P),n(19,D),n(20,I),n(21,R),n(4,h),n(16,A)}function W(){_=gt(this.value),n(8,_),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(5,p),n(6,g),n(7,m),n(9,b),n(10,k),n(11,v),n(12,y),n(13,S),n(14,C),n(15,T),n(17,x),n(18,P),n(19,D),n(20,I),n(21,R),n(4,h),n(16,A)}function G(){b=gt(this.value),n(9,b),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(5,p),n(6,g),n(7,m),n(8,_),n(10,k),n(11,v),n(12,y),n(13,S),n(14,C),n(15,T),n(17,x),n(18,P),n(19,D),n(20,I),n(21,R),n(4,h),n(16,A)}function Y(){k=gt(this.value),n(10,k),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(5,p),n(6,g),n(7,m),n(8,_),n(9,b),n(11,v),n(12,y),n(13,S),n(14,C),n(15,T),n(17,x),n(18,P),n(19,D),n(20,I),n(21,R),n(4,h),n(16,A)}function Q(){v=this.checked,n(11,v),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(5,p),n(6,g),n(7,m),n(8,_),n(9,b),n(10,k),n(12,y),n(13,S),n(14,C),n(15,T),n(17,x),n(18,P),n(19,D),n(20,I),n(21,R),n(4,h),n(16,A)}function le(){y=gt(this.value),n(12,y),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(5,p),n(6,g),n(7,m),n(8,_),n(9,b),n(10,k),n(11,v),n(13,S),n(14,C),n(15,T),n(17,x),n(18,P),n(19,D),n(20,I),n(21,R),n(4,h),n(16,A)}function Z(){S=gt(this.value),n(13,S),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(5,p),n(6,g),n(7,m),n(8,_),n(9,b),n(10,k),n(11,v),n(12,y),n(14,C),n(15,T),n(17,x),n(18,P),n(19,D),n(20,I),n(21,R),n(4,h),n(16,A)}function V(){C=this.value,n(14,C),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(5,p),n(6,g),n(7,m),n(8,_),n(9,b),n(10,k),n(11,v),n(12,y),n(13,S),n(15,T),n(17,x),n(18,P),n(19,D),n(20,I),n(21,R),n(4,h),n(16,A)}function X(){T=Is(this),n(15,T),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(5,p),n(6,g),n(7,m),n(8,_),n(9,b),n(10,k),n(11,v),n(12,y),n(13,S),n(14,C),n(17,x),n(18,P),n(19,D),n(20,I),n(21,R),n(4,h),n(16,A)}function J(){A=this.value,n(16,A),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(5,p),n(6,g),n(7,m),n(8,_),n(9,b),n(10,k),n(11,v),n(12,y),n(13,S),n(14,C),n(15,T),n(17,x),n(18,P),n(19,D),n(20,I),n(21,R),n(4,h)}function oe(){x=gt(this.value),n(17,x),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(5,p),n(6,g),n(7,m),n(8,_),n(9,b),n(10,k),n(11,v),n(12,y),n(13,S),n(14,C),n(15,T),n(18,P),n(19,D),n(20,I),n(21,R),n(4,h),n(16,A)}function ne(){P=gt(this.value),n(18,P),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(5,p),n(6,g),n(7,m),n(8,_),n(9,b),n(10,k),n(11,v),n(12,y),n(13,S),n(14,C),n(15,T),n(17,x),n(19,D),n(20,I),n(21,R),n(4,h),n(16,A)}function ee(){D=this.checked,n(19,D),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(5,p),n(6,g),n(7,m),n(8,_),n(9,b),n(10,k),n(11,v),n(12,y),n(13,S),n(14,C),n(15,T),n(17,x),n(18,P),n(20,I),n(21,R),n(4,h),n(16,A)}function se(){I=gt(this.value),n(20,I),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(5,p),n(6,g),n(7,m),n(8,_),n(9,b),n(10,k),n(11,v),n(12,y),n(13,S),n(14,C),n(15,T),n(17,x),n(18,P),n(19,D),n(21,R),n(4,h),n(16,A)}function K(){R=gt(this.value),n(21,R),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(5,p),n(6,g),n(7,m),n(8,_),n(9,b),n(10,k),n(11,v),n(12,y),n(13,S),n(14,C),n(15,T),n(17,x),n(18,P),n(19,D),n(20,I),n(4,h),n(16,A)}return t.$$set=q=>{"value"in q&&n(23,i=q.value),"label"in q&&n(0,l=q.label),"showHelp"in q&&n(1,o=q.showHelp)},t.$$.update=()=>{t.$$.dirty[0]&62849004&&(!u&&i&&(n(2,r=i.enabled||!1),n(24,f=i.retryableStatusCodes||[500,502,503,504]),n(4,h=f.join(", ")),n(5,p=i.consecutiveFailuresThreshold),n(6,g=i.healthyThreshold),n(7,m=i.requestTimeoutMs),n(8,_=i.connectTimeoutMs),n(9,b=i.recoveryIntervalMs),n(10,k=i.recoveryTimeoutMs),i.healthCheck&&(n(11,v=i.healthCheck.enabled||!1),n(12,y=i.healthCheck.intervalMs),n(13,S=i.healthCheck.timeoutMs),n(14,C=i.healthCheck.path),n(15,T=i.healthCheck.method),n(25,O=i.healthCheck.expectedStatus||[200]),n(16,A=O.join(", ")),n(17,x=i.healthCheck.unhealthyThreshold),n(18,P=i.healthCheck.healthyThreshold)),i.slowStart&&(n(19,D=i.slowStart.enabled||!1),n(20,I=i.slowStart.durationMs),n(21,R=i.slowStart.initialWeightFactor)),n(3,u=!0)),r?i?(n(23,i.enabled=!0,i),n(23,i.retryableStatusCodes=f.length>0?f:[500,502,503,504],i),p!==void 0&&n(23,i.consecutiveFailuresThreshold=p,i),g!==void 0&&n(23,i.healthyThreshold=g,i),m!==void 0&&n(23,i.requestTimeoutMs=m,i),_!==void 0&&n(23,i.connectTimeoutMs=_,i),b!==void 0&&n(23,i.recoveryIntervalMs=b,i),k!==void 0&&n(23,i.recoveryTimeoutMs=k,i),v?n(23,i.healthCheck={enabled:!0,intervalMs:y,timeoutMs:S,path:C,method:T,expectedStatus:O.length>0?O:[200],unhealthyThreshold:x,healthyThreshold:P},i):n(23,i.healthCheck=void 0,i),D?n(23,i.slowStart={enabled:!0,durationMs:I,initialWeightFactor:R},i):n(23,i.slowStart=void 0,i)):n(23,i={enabled:!0,retryableStatusCodes:f.length>0?f:[500,502,503,504]}):n(23,i=void 0)),t.$$.dirty[0]&16&&n(24,f=Of(h)),t.$$.dirty[0]&65536&&n(25,O=Of(A))},[l,o,r,u,h,p,g,m,_,b,k,v,y,S,C,T,A,x,P,D,I,R,s,i,f,O,U,N,z,B,j,F,W,G,Y,Q,le,Z,V,X,J,oe,ne,ee,se,K]}class l3 extends zt{constructor(e){super(),jt(this,e,i3,s3,Lt,{value:23,label:0,showHelp:1},null,[-1,-1])}}const jn=[];for(let t=0;t<256;++t)jn.push((t+256).toString(16).slice(1));function o3(t,e=0){return(jn[t[e+0]]+jn[t[e+1]]+jn[t[e+2]]+jn[t[e+3]]+"-"+jn[t[e+4]]+jn[t[e+5]]+"-"+jn[t[e+6]]+jn[t[e+7]]+"-"+jn[t[e+8]]+jn[t[e+9]]+"-"+jn[t[e+10]]+jn[t[e+11]]+jn[t[e+12]]+jn[t[e+13]]+jn[t[e+14]]+jn[t[e+15]]).toLowerCase()}let fr;const r3=new Uint8Array(16);function a3(){if(!fr){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");fr=crypto.getRandomValues.bind(crypto)}return fr(r3)}const u3=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),xf={randomUUID:u3};function c3(t,e,n){t=t||{};const s=t.random??t.rng?.()??a3();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,o3(s)}function ol(t,e,n){return xf.randomUUID&&!t?xf.randomUUID():c3(t)}function Rf(t,e,n){const s=t.slice();return s[38]=e[n],s}function Df(t,e,n){const s=t.slice();return s[41]=e[n],s[42]=e,s[43]=n,s}function Lf(t,e,n){const s=t.slice();return s[44]=e[n],s[45]=e,s[43]=n,s}function Hf(t){let e,n,s,i,l=t[12]("routeEditor.useTemplate")+"",o,r,u;return{c(){e=d("button"),n=de("svg"),s=de("path"),i=w(),o=E(l),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","h-4 w-4"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(n,"stroke","currentColor"),c(e,"type","button"),c(e,"class","btn btn-sm btn-outline")},m(f,h){H(f,e,h),a(e,n),a(n,s),a(e,i),a(e,o),r||(u=te(e,"click",t[23]),r=!0)},p(f,h){h[0]&4096&&l!==(l=f[12]("routeEditor.useTemplate")+"")&&M(o,l)},d(f){f&&L(e),r=!1,u()}}}function f3(t){let e,n,s,i,l=t[12]("routeEditor.routePath")+"",o,r,u,f,h,p=t[12]("routes.path")+"",g,m,_,b,k,v=t[12]("routeEditor.pathHelp")+"",y,S,C,T,O,A=t[8].some(Wf),x,P,D,I,R=t[12]("routeEditor.pathRewrite")+"",U,N,z=t[12]("routeEditor.optional")+"",B,j,F,W,G=t[12]("routeEditor.pathRewriteHelp")+"",Y,Q,le,Z,V,X=t[12]("routeEditor.addPathRewriteRule")+"",J,oe,ne,ee,se,K,q=t[12]("routeEditor.upstreams")+"",ce,he,ke,we,pe,me=t[12]("routeEditor.addUpstream")+"",Pe,Se,Ce=t[8].some(Vf),_e,Ae,ye=[],$=new Map,ue,ae,ge,re,Ne,Ye=t[12]("routeEditor.transformer")+"",Ve,Qe,st,Xe=t[12]("routeEditor.transformerHelp")+"",vt,rt,He,$e,Oe,ft,qe,Re,ze,ve,Je,be,We,yt,Ke,Ie,kt,nt,ht,Ot=t[12]("auth.routeAuth")+"",Te,it,De=t[12]("routeEditor.optional")+"",tt,Ht,Rn,pn,xe=t[12]("auth.routeAuthHelp")+"",lt,an,Mt,ls,Tn,zn,It,gn,Dn=t[12]("routeEditor.failoverTitle")+"",un,mn,Pn=t[12]("routeEditor.optional")+"",Fn,Ln,Un,os,Ut=t[12]("routeEditor.failoverHelp")+"",Mn,Hn,hn,Vn,An,wn,kn,Wn=t[12]("routeEditor.cancel")+"",rs,St,Xt,qn,as,ot,es,_s,xt=A&&If(t),Ct=et(t[1]),$t=[];for(let fe=0;fe<Ct.length;fe+=1)$t[fe]=Bf(Lf(t,Ct,fe));let nn=Ce&&Ff(t),sn=et(t[0].upstreams);const en=fe=>fe[41]._uid;for(let fe=0;fe<sn.length;fe+=1){let Le=Df(t,sn,fe),Qt=en(Le);$.set(Qt,ye[fe]=Nf(Qt,Le))}let Vt=t[9].length>0&&jf(t);function ts(fe){t[31](fe)}let Wt={label:t[12]("routeEditor.transformer")};t[2]!==void 0&&(Wt.plugin=t[2]),$e=new Wp({props:Wt}),vn.push(()=>Kn($e,"plugin",ts));function qt(fe){t[32](fe)}let Bt={label:t[12]("headers.title")};t[0].headers!==void 0&&(Bt.value=t[0].headers),ze=new zp({props:Bt}),vn.push(()=>Kn(ze,"value",qt));function tn(fe){t[33](fe)}let Pt={label:t[12]("body.title")};t[0].body!==void 0&&(Pt.value=t[0].body),yt=new Up({props:Pt}),vn.push(()=>Kn(yt,"value",tn));function Yt(fe){t[34](fe)}let Jt={label:t[12]("auth.routeAuth"),showHelp:!1};t[0].auth!==void 0&&(Jt.value=t[0].auth),Mt=new Ep({props:Jt}),vn.push(()=>Kn(Mt,"value",Yt));function cn(fe){t[35](fe)}let Kt={label:t[12]("routeEditor.failoverTitle"),showHelp:!1};t[0].failover!==void 0&&(Kt.value=t[0].failover),hn=new l3({props:Kt}),vn.push(()=>Kn(hn,"value",cn));function Zt(fe,Le){return fe[6]?p3:d3}let Ue=Zt(t),ln=Ue(t),bn=t[10].length>0&&zf(t);return{c(){e=d("form"),n=d("div"),s=d("div"),i=d("h2"),o=E(l),r=w(),u=d("div"),f=d("label"),h=d("span"),g=E(p),m=w(),_=d("span"),_.textContent="*",b=w(),k=d("span"),y=E(v),S=w(),C=d("input"),O=w(),xt&&xt.c(),x=w(),P=d("div"),D=d("label"),I=d("span"),U=E(R),N=E(" ("),B=E(z),j=E(")"),F=w(),W=d("span"),Y=E(G),Q=w(),le=d("div");for(let fe=0;fe<$t.length;fe+=1)$t[fe].c();Z=w(),V=d("button"),J=E(X),oe=w(),ne=d("div"),ee=d("div"),se=d("div"),K=d("h2"),ce=E(q),he=w(),ke=d("span"),ke.textContent="*",we=w(),pe=d("button"),Pe=E(me),Se=w(),nn&&nn.c(),_e=w(),Ae=d("div");for(let fe=0;fe<ye.length;fe+=1)ye[fe].c();ue=w(),Vt&&Vt.c(),ae=w(),ge=d("div"),re=d("div"),Ne=d("h2"),Ve=E(Ye),Qe=w(),st=d("p"),vt=E(Xe),rt=w(),He=d("div"),pt($e.$$.fragment),ft=w(),qe=d("div"),Re=w(),pt(ze.$$.fragment),Je=w(),be=d("div"),We=w(),pt(yt.$$.fragment),Ie=w(),kt=d("div"),nt=d("div"),ht=d("h2"),Te=E(Ot),it=E(" ("),tt=E(De),Ht=E(")"),Rn=w(),pn=d("p"),lt=E(xe),an=w(),pt(Mt.$$.fragment),Tn=w(),zn=d("div"),It=d("div"),gn=d("h2"),un=E(Dn),mn=E(" ("),Fn=E(Pn),Ln=E(")"),Un=w(),os=d("p"),Mn=E(Ut),Hn=w(),pt(hn.$$.fragment),An=w(),wn=d("div"),kn=d("button"),rs=E(Wn),St=w(),Xt=d("button"),ln.c(),as=w(),bn&&bn.c(),c(i,"class","card-title"),c(_,"class","text-error"),c(h,"class","label-text font-semibold"),c(k,"class","label-text-alt text-xs"),c(f,"class","label"),c(f,"for","route-path"),c(C,"id","route-path"),c(C,"type","text"),c(C,"placeholder",T=t[12]("routeEditor.pathPlaceholder")),c(C,"class","input input-bordered"),C.required=!0,Rt(C,"input-error",t[8].some(qf)),c(u,"class","form-control"),c(I,"class","label-text font-semibold"),c(W,"class","label-text-alt text-xs"),c(D,"class","label"),c(D,"for","path-rewrite-pattern-0"),c(V,"type","button"),c(V,"class","btn btn-sm btn-ghost"),c(le,"class","space-y-2"),c(P,"class","form-control"),c(s,"class","card-body"),c(n,"class","card bg-base-100 shadow-md"),c(ke,"class","text-error"),c(K,"class","card-title"),c(pe,"type","button"),c(pe,"class","btn btn-sm btn-primary"),c(se,"class","flex justify-between items-center"),c(Ae,"class","space-y-4 mt-4"),c(ee,"class","card-body"),c(ne,"class","card bg-base-100 shadow-md"),c(Ne,"class","card-title"),c(st,"class","text-sm text-gray-500 mb-4"),c(qe,"class","divider"),c(be,"class","divider"),c(He,"class","space-y-6"),c(re,"class","card-body"),c(ge,"class","card bg-base-100 shadow-md"),c(ht,"class","card-title"),c(pn,"class","text-sm text-gray-500 mb-4"),c(nt,"class","card-body"),c(kt,"class","card bg-base-100 shadow-md"),c(gn,"class","card-title"),c(os,"class","text-sm text-gray-500 mb-4"),c(It,"class","card-body"),c(zn,"class","card bg-base-100 shadow-md"),c(kn,"type","button"),c(kn,"class","btn btn-ghost"),kn.disabled=t[6],c(Xt,"type","submit"),c(Xt,"class","btn btn-primary"),Xt.disabled=qn=!t[11]||t[6],c(wn,"class","flex justify-end gap-4"),c(e,"class","space-y-8")},m(fe,Le){H(fe,e,Le),a(e,n),a(n,s),a(s,i),a(i,o),a(s,r),a(s,u),a(u,f),a(f,h),a(h,g),a(h,m),a(h,_),a(f,b),a(f,k),a(k,y),a(u,S),a(u,C),ie(C,t[0].path),a(u,O),xt&&xt.m(u,null),a(s,x),a(s,P),a(P,D),a(D,I),a(I,U),a(I,N),a(I,B),a(I,j),a(D,F),a(D,W),a(W,Y),a(P,Q),a(P,le);for(let Qt=0;Qt<$t.length;Qt+=1)$t[Qt]&&$t[Qt].m(le,null);a(le,Z),a(le,V),a(V,J),a(e,oe),a(e,ne),a(ne,ee),a(ee,se),a(se,K),a(K,ce),a(K,he),a(K,ke),a(se,we),a(se,pe),a(pe,Pe),a(ee,Se),nn&&nn.m(ee,null),a(ee,_e),a(ee,Ae);for(let Qt=0;Qt<ye.length;Qt+=1)ye[Qt]&&ye[Qt].m(Ae,null);a(ee,ue),Vt&&Vt.m(ee,null),a(e,ae),a(e,ge),a(ge,re),a(re,Ne),a(Ne,Ve),a(re,Qe),a(re,st),a(st,vt),a(re,rt),a(re,He),ut($e,He,null),a(He,ft),a(He,qe),a(He,Re),ut(ze,He,null),a(He,Je),a(He,be),a(He,We),ut(yt,He,null),a(e,Ie),a(e,kt),a(kt,nt),a(nt,ht),a(ht,Te),a(ht,it),a(ht,tt),a(ht,Ht),a(nt,Rn),a(nt,pn),a(pn,lt),a(nt,an),ut(Mt,nt,null),a(e,Tn),a(e,zn),a(zn,It),a(It,gn),a(gn,un),a(gn,mn),a(gn,Fn),a(gn,Ln),a(It,Un),a(It,os),a(os,Mn),a(It,Hn),ut(hn,It,null),a(e,An),a(e,wn),a(wn,kn),a(kn,rs),a(wn,St),a(wn,Xt),ln.m(Xt,null),a(e,as),bn&&bn.m(e,null),ot=!0,es||(_s=[te(C,"input",t[24]),te(V,"click",t[13]),te(pe,"click",t[15]),te(kn,"click",t[19]),te(e,"submit",Yp(t[18]))],es=!0)},p(fe,Le){if((!ot||Le[0]&4096)&&l!==(l=fe[12]("routeEditor.routePath")+"")&&M(o,l),(!ot||Le[0]&4096)&&p!==(p=fe[12]("routes.path")+"")&&M(g,p),(!ot||Le[0]&4096)&&v!==(v=fe[12]("routeEditor.pathHelp")+"")&&M(y,v),(!ot||Le[0]&4096&&T!==(T=fe[12]("routeEditor.pathPlaceholder")))&&c(C,"placeholder",T),Le[0]&1&&C.value!==fe[0].path&&ie(C,fe[0].path),(!ot||Le[0]&256)&&Rt(C,"input-error",fe[8].some(qf)),Le[0]&256&&(A=fe[8].some(Wf)),A?xt?xt.p(fe,Le):(xt=If(fe),xt.c(),xt.m(u,null)):xt&&(xt.d(1),xt=null),(!ot||Le[0]&4096)&&R!==(R=fe[12]("routeEditor.pathRewrite")+"")&&M(U,R),(!ot||Le[0]&4096)&&z!==(z=fe[12]("routeEditor.optional")+"")&&M(B,z),(!ot||Le[0]&4096)&&G!==(G=fe[12]("routeEditor.pathRewriteHelp")+"")&&M(Y,G),Le[0]&20482){Ct=et(fe[1]);let _n;for(_n=0;_n<Ct.length;_n+=1){const Xn=Lf(fe,Ct,_n);$t[_n]?$t[_n].p(Xn,Le):($t[_n]=Bf(Xn),$t[_n].c(),$t[_n].m(le,Z))}for(;_n<$t.length;_n+=1)$t[_n].d(1);$t.length=Ct.length}(!ot||Le[0]&4096)&&X!==(X=fe[12]("routeEditor.addPathRewriteRule")+"")&&M(J,X),(!ot||Le[0]&4096)&&q!==(q=fe[12]("routeEditor.upstreams")+"")&&M(ce,q),(!ot||Le[0]&4096)&&me!==(me=fe[12]("routeEditor.addUpstream")+"")&&M(Pe,me),Le[0]&256&&(Ce=fe[8].some(Vf)),Ce?nn?nn.p(fe,Le):(nn=Ff(fe),nn.c(),nn.m(ee,_e)):nn&&(nn.d(1),nn=null),Le[0]&196609&&(sn=et(fe[0].upstreams),gs(),ye=Ir(ye,Le,en,1,fe,sn,$,Ae,td,Nf,null,Df),ms()),fe[9].length>0?Vt?Vt.p(fe,Le):(Vt=jf(fe),Vt.c(),Vt.m(ee,null)):Vt&&(Vt.d(1),Vt=null),(!ot||Le[0]&4096)&&Ye!==(Ye=fe[12]("routeEditor.transformer")+"")&&M(Ve,Ye),(!ot||Le[0]&4096)&&Xe!==(Xe=fe[12]("routeEditor.transformerHelp")+"")&&M(vt,Xe);const Qt={};Le[0]&4096&&(Qt.label=fe[12]("routeEditor.transformer")),!Oe&&Le[0]&4&&(Oe=!0,Qt.plugin=fe[2],Jn(()=>Oe=!1)),$e.$set(Qt);const vs={};Le[0]&4096&&(vs.label=fe[12]("headers.title")),!ve&&Le[0]&1&&(ve=!0,vs.value=fe[0].headers,Jn(()=>ve=!1)),ze.$set(vs);const ys={};Le[0]&4096&&(ys.label=fe[12]("body.title")),!Ke&&Le[0]&1&&(Ke=!0,ys.value=fe[0].body,Jn(()=>Ke=!1)),yt.$set(ys),(!ot||Le[0]&4096)&&Ot!==(Ot=fe[12]("auth.routeAuth")+"")&&M(Te,Ot),(!ot||Le[0]&4096)&&De!==(De=fe[12]("routeEditor.optional")+"")&&M(tt,De),(!ot||Le[0]&4096)&&xe!==(xe=fe[12]("auth.routeAuthHelp")+"")&&M(lt,xe);const Gn={};Le[0]&4096&&(Gn.label=fe[12]("auth.routeAuth")),!ls&&Le[0]&1&&(ls=!0,Gn.value=fe[0].auth,Jn(()=>ls=!1)),Mt.$set(Gn),(!ot||Le[0]&4096)&&Dn!==(Dn=fe[12]("routeEditor.failoverTitle")+"")&&M(un,Dn),(!ot||Le[0]&4096)&&Pn!==(Pn=fe[12]("routeEditor.optional")+"")&&M(Fn,Pn),(!ot||Le[0]&4096)&&Ut!==(Ut=fe[12]("routeEditor.failoverHelp")+"")&&M(Mn,Ut);const ns={};Le[0]&4096&&(ns.label=fe[12]("routeEditor.failoverTitle")),!Vn&&Le[0]&1&&(Vn=!0,ns.value=fe[0].failover,Jn(()=>Vn=!1)),hn.$set(ns),(!ot||Le[0]&4096)&&Wn!==(Wn=fe[12]("routeEditor.cancel")+"")&&M(rs,Wn),(!ot||Le[0]&64)&&(kn.disabled=fe[6]),Ue===(Ue=Zt(fe))&&ln?ln.p(fe,Le):(ln.d(1),ln=Ue(fe),ln&&(ln.c(),ln.m(Xt,null))),(!ot||Le[0]&2112&&qn!==(qn=!fe[11]||fe[6]))&&(Xt.disabled=qn),fe[10].length>0?bn?bn.p(fe,Le):(bn=zf(fe),bn.c(),bn.m(e,null)):bn&&(bn.d(1),bn=null)},i(fe){if(!ot){for(let Le=0;Le<sn.length;Le+=1)Be(ye[Le]);Be($e.$$.fragment,fe),Be(ze.$$.fragment,fe),Be(yt.$$.fragment,fe),Be(Mt.$$.fragment,fe),Be(hn.$$.fragment,fe),ot=!0}},o(fe){for(let Le=0;Le<ye.length;Le+=1)Fe(ye[Le]);Fe($e.$$.fragment,fe),Fe(ze.$$.fragment,fe),Fe(yt.$$.fragment,fe),Fe(Mt.$$.fragment,fe),Fe(hn.$$.fragment,fe),ot=!1},d(fe){fe&&L(e),xt&&xt.d(),En($t,fe),nn&&nn.d();for(let Le=0;Le<ye.length;Le+=1)ye[Le].d();Vt&&Vt.d(),ct($e),ct(ze),ct(yt),ct(Mt),ct(hn),ln.d(),bn&&bn.d(),es=!1,at(_s)}}}function h3(t){let e;return{c(){e=d("div"),e.innerHTML='<span class="loading loading-spinner loading-lg"></span>',c(e,"class","flex justify-center items-center h-64")},m(n,s){H(n,e,s)},p:Ee,i:Ee,o:Ee,d(n){n&&L(e)}}}function If(t){let e,n,s=t[8].find(Gf)?.message+"",i;return{c(){e=d("label"),n=d("span"),i=E(s),c(n,"class","label-text-alt text-error"),c(e,"class","label"),c(e,"for","route-path")},m(l,o){H(l,e,o),a(e,n),a(n,i)},p(l,o){o[0]&256&&s!==(s=l[8].find(Gf)?.message+"")&&M(i,s)},d(l){l&&L(e)}}}function Bf(t){let e,n,s,i,l,o,r,u,f,h;function p(){t[25].call(n,t[45],t[43])}function g(){t[26].call(l,t[45],t[43])}function m(){return t[27](t[43])}return{c(){e=d("div"),n=d("input"),i=w(),l=d("input"),r=w(),u=d("button"),u.textContent="\u2715",c(n,"id",\`path-rewrite-pattern-\${t[43]}\`),c(n,"type","text"),c(n,"placeholder",s=t[12]("routeEditor.patternPlaceholder")),c(n,"class","input input-bordered input-sm flex-1"),c(l,"id",\`path-rewrite-replacement-\${t[43]}\`),c(l,"type","text"),c(l,"placeholder",o=t[12]("routeEditor.replacementPlaceholder")),c(l,"class","input input-bordered input-sm flex-1"),c(u,"type","button"),c(u,"class","btn btn-sm btn-error btn-square"),c(e,"class","flex gap-2")},m(_,b){H(_,e,b),a(e,n),ie(n,t[44].pattern),a(e,i),a(e,l),ie(l,t[44].replacement),a(e,r),a(e,u),f||(h=[te(n,"input",p),te(l,"input",g),te(u,"click",m)],f=!0)},p(_,b){t=_,b[0]&4096&&s!==(s=t[12]("routeEditor.patternPlaceholder"))&&c(n,"placeholder",s),b[0]&2&&n.value!==t[44].pattern&&ie(n,t[44].pattern),b[0]&4096&&o!==(o=t[12]("routeEditor.replacementPlaceholder"))&&c(l,"placeholder",o),b[0]&2&&l.value!==t[44].replacement&&ie(l,t[44].replacement)},d(_){_&&L(e),f=!1,at(h)}}}function Ff(t){let e,n,s=t[8].find(Xf)?.message+"",i;return{c(){e=d("div"),n=d("span"),i=E(s),c(e,"class","alert alert-error")},m(l,o){H(l,e,o),a(e,n),a(n,i)},p(l,o){o[0]&256&&s!==(s=l[8].find(Xf)?.message+"")&&M(i,s)},d(l){l&&L(e)}}}function Nf(t,e){let n,s,i,l;function o(){return e[28](e[43])}function r(){return e[29](e[43])}function u(h){e[30](h,e[43])}let f={index:e[43],onRemove:o,onDuplicate:r};return e[0].upstreams[e[43]]!==void 0&&(f.upstream=e[0].upstreams[e[43]]),s=new $k({props:f}),vn.push(()=>Kn(s,"upstream",u)),{key:t,first:null,c(){n=$n(),pt(s.$$.fragment),this.first=n},m(h,p){H(h,n,p),ut(s,h,p),l=!0},p(h,p){e=h;const g={};p[0]&1&&(g.index=e[43]),p[0]&1&&(g.onRemove=o),p[0]&1&&(g.onDuplicate=r),!i&&p[0]&1&&(i=!0,g.upstream=e[0].upstreams[e[43]],Jn(()=>i=!1)),s.$set(g)},i(h){l||(Be(s.$$.fragment,h),l=!0)},o(h){Fe(s.$$.fragment,h),l=!1},d(h){h&&L(n),ct(s,h)}}}function jf(t){let e,n,s=t[9][0].message+"",i;return{c(){e=d("div"),n=d("span"),i=E(s),c(e,"class","alert alert-warning mt-4")},m(l,o){H(l,e,o),a(e,n),a(n,i)},p(l,o){o[0]&512&&s!==(s=l[9][0].message+"")&&M(i,s)},d(l){l&&L(e)}}}function d3(t){let e=t[12]("routeEditor.saveRoute")+"",n;return{c(){n=E(e)},m(s,i){H(s,n,i)},p(s,i){i[0]&4096&&e!==(e=s[12]("routeEditor.saveRoute")+"")&&M(n,e)},d(s){s&&L(n)}}}function p3(t){let e,n,s=t[12]("routeEditor.saving")+"",i;return{c(){e=d("span"),n=w(),i=E(s),c(e,"class","loading loading-spinner")},m(l,o){H(l,e,o),H(l,n,o),H(l,i,o)},p(l,o){o[0]&4096&&s!==(s=l[12]("routeEditor.saving")+"")&&M(i,s)},d(l){l&&(L(e),L(n),L(i))}}}function zf(t){let e,n,s,i,l,o,r=t[12]("common.error")+"",u,f,h,p=et(t[10]),g=[];for(let m=0;m<p.length;m+=1)g[m]=Uf(Rf(t,p,m));return{c(){e=d("div"),n=de("svg"),s=de("path"),i=w(),l=d("div"),o=d("h3"),u=E(r),f=w(),h=d("ul");for(let m=0;m<g.length;m+=1)g[m].c();c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-6 w-6"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(o,"class","font-bold"),c(h,"class","text-xs list-disc list-inside"),c(e,"class","alert alert-warning")},m(m,_){H(m,e,_),a(e,n),a(n,s),a(e,i),a(e,l),a(l,o),a(o,u),a(l,f),a(l,h);for(let b=0;b<g.length;b+=1)g[b]&&g[b].m(h,null)},p(m,_){if(_[0]&4096&&r!==(r=m[12]("common.error")+"")&&M(u,r),_[0]&1024){p=et(m[10]);let b;for(b=0;b<p.length;b+=1){const k=Rf(m,p,b);g[b]?g[b].p(k,_):(g[b]=Uf(k),g[b].c(),g[b].m(h,null))}for(;b<g.length;b+=1)g[b].d(1);g.length=p.length}},d(m){m&&L(e),En(g,m)}}}function Uf(t){let e,n=t[38].field+"",s,i,l=t[38].message+"",o;return{c(){e=d("li"),s=E(n),i=E(": "),o=E(l)},m(r,u){H(r,e,u),a(e,s),a(e,i),a(e,o)},p(r,u){u[0]&1024&&n!==(n=r[38].field+"")&&M(s,n),u[0]&1024&&l!==(l=r[38].message+"")&&M(o,l)},d(r){r&&L(e)}}}function g3(t){let e,n,s,i,l=(t[3]?t[12]("routeEditor.editRoute"):t[12]("routeEditor.newRoute"))+"",o,r,u,f=(t[3]?\`\${t[12]("routeEditor.editRoute")}: \${t[4]}\`:t[12]("routes.subtitle"))+"",h,p,g,m,_,b,k,v,y,S=!t[3]&&Hf(t);const C=[h3,f3],T=[];function O(P,D){return P[5]?0:1}m=O(t),_=T[m]=C[m](t);function A(P){t[36](P)}let x={};return t[7]!==void 0&&(x.showTemplates=t[7]),k=new n3({props:x}),vn.push(()=>Kn(k,"showTemplates",A)),k.$on("select",t[20]),{c(){e=d("div"),n=d("div"),s=d("div"),i=d("h1"),o=E(l),r=w(),u=d("p"),h=E(f),p=w(),S&&S.c(),g=w(),_.c(),b=w(),pt(k.$$.fragment),c(i,"class","text-3xl font-bold"),c(u,"class","text-sm text-gray-500 mt-1"),c(n,"class","mb-6 flex justify-between items-start"),c(e,"class","p-6 max-w-6xl mx-auto")},m(P,D){H(P,e,D),a(e,n),a(n,s),a(s,i),a(i,o),a(s,r),a(s,u),a(u,h),a(n,p),S&&S.m(n,null),a(e,g),T[m].m(e,null),a(e,b),ut(k,e,null),y=!0},p(P,D){(!y||D[0]&4104)&&l!==(l=(P[3]?P[12]("routeEditor.editRoute"):P[12]("routeEditor.newRoute"))+"")&&M(o,l),(!y||D[0]&4120)&&f!==(f=(P[3]?\`\${P[12]("routeEditor.editRoute")}: \${P[4]}\`:P[12]("routes.subtitle"))+"")&&M(h,f),P[3]?S&&(S.d(1),S=null):S?S.p(P,D):(S=Hf(P),S.c(),S.m(n,null));let I=m;m=O(P),m===I?T[m].p(P,D):(gs(),Fe(T[I],1,1,()=>{T[I]=null}),ms(),_=T[m],_?_.p(P,D):(_=T[m]=C[m](P),_.c()),Be(_,1),_.m(e,b));const R={};!v&&D[0]&128&&(v=!0,R.showTemplates=P[7],Jn(()=>v=!1)),k.$set(R)},i(P){y||(Be(_),Be(k.$$.fragment,P),y=!0)},o(P){Fe(_),Fe(k.$$.fragment,P),y=!1},d(P){P&&L(e),S&&S.d(),T[m].d(),ct(k)}}}const Vf=t=>t.field==="upstreams",Wf=t=>t.field==="path",qf=t=>t.field==="path",Gf=t=>t.field==="path",Xf=t=>t.field==="upstreams";function m3(t,e,n){let s;Gt(t,Et,V=>n(12,s=V));let{params:i={}}=e,l=!1,o="",r=!0,u=!1,f=!1,h={path:"",upstreams:[{_uid:ol(),target:"",weight:100,priority:1}],headers:{add:{},remove:[],default:{}},body:{add:{},remove:[],replace:{},default:{}}},p=[],g=[],m=[],_=!1,b=null;async function k(){try{const V=await Vk(h),X=zk(h.upstreams);n(8,p=V),n(9,g=X),n(10,m=[...V,...X]),n(11,_=m.length===0&&h.upstreams.length>0)}catch(V){console.error("Validation failed:",V),n(11,_=!1)}}let v=[],y=h.plugins?.[0]||null;function S(){n(1,v=[...v,{pattern:"",replacement:""}])}function C(V){n(1,v=v.filter((X,J)=>J!==V))}function T(){n(0,h.upstreams=[...h.upstreams,{_uid:ol(),target:"",weight:100,priority:h.upstreams.length+1}],h)}function O(V){if(h.upstreams.length<=1){alert(s("routeEditor.upstreamRequired"));return}n(0,h.upstreams=h.upstreams.filter((X,J)=>J!==V),h)}function A(V){const X=h.upstreams[V],J=JSON.parse(JSON.stringify(X));if(J._uid=ol(),J.target){const oe=J.target.match(/^(.+?)(-\\d+)?$/);if(oe){const[,ne,ee]=oe;if(ee){const se=parseInt(ee.slice(1))+1;J.target=\`\${ne}-\${se}\`}else J.target=\`\${ne}-copy\`}else J.target=\`\${J.target}-copy\`}J.priority!==void 0&&(J.priority=Math.max(...h.upstreams.map(oe=>oe.priority||1))+1),n(0,h.upstreams=[...h.upstreams.slice(0,V+1),J,...h.upstreams.slice(V+1)],h)}async function x(){if(!_){bt.show(s("routeEditor.saveFailed",{values:{error:s("common.error")}}),"error");return}try{n(6,u=!0);const V={...h,upstreams:Nk(h.upstreams,[X=>X.priority??1]).map(({_uid:X,...J})=>J)};l?(await Ei.update(o,V),bt.show(s("routeEditor.routeUpdated"),"success")):(await Ei.create(V),bt.show(s("routeEditor.routeSaved"),"success")),Fl()}catch(V){bt.show(s("routeEditor.saveFailed",{values:{error:V.message}}),"error")}finally{n(6,u=!1)}}function P(){confirm(s("routeEditor.cancel")+"?")&&Fl()}function D(V){const X=V.detail;n(0,h={...h,...X,headers:X.headers||h.headers,body:X.body||h.body,upstreams:X.upstreams?.map(J=>({...J,_uid:ol(),headers:J.headers||{add:{},remove:[],default:{}},body:J.body||{add:{},remove:[],replace:{},default:{}}}))||h.upstreams}),n(2,y=h.plugins?.[0]||null),h.pathRewrite?n(1,v=Object.entries(h.pathRewrite).map(([J,oe])=>({pattern:J,replacement:oe}))):n(1,v=[]),bt.show(s("routeEditor.routeSaved"),"success")}is(async()=>{if(i.path){n(3,l=!0),n(4,o=decodeURIComponent(i.path));try{const V=await Ei.get(o);V?(n(0,h=V),n(0,h.headers=h.headers||{add:{},remove:[],default:{}},h),n(0,h.body=h.body||{add:{},remove:[],replace:{},default:{}},h),n(0,h.upstreams=h.upstreams.map(X=>({...X,_uid:ol(),headers:X.headers||{add:{},remove:[],default:{}},body:X.body||{add:{},remove:[],replace:{},default:{}}})),h),h.pathRewrite&&n(1,v=Object.entries(h.pathRewrite).map(([X,J])=>({pattern:X,replacement:J}))),n(2,y=h.plugins?.[0]||null)):(bt.show(s("routes.noRoutes"),"error"),Fl())}catch(V){bt.show(s("routeEditor.saveFailed",{values:{error:V.message}}),"error"),Fl()}}n(5,r=!1)});const I=()=>n(7,f=!0);function R(){h.path=this.value,n(0,h),n(1,v),n(2,y)}function U(V,X){V[X].pattern=this.value,n(1,v),n(0,h),n(2,y)}function N(V,X){V[X].replacement=this.value,n(1,v),n(0,h),n(2,y)}const z=V=>C(V),B=V=>O(V),j=V=>A(V);function F(V,X){t.$$.not_equal(h.upstreams[X],V)&&(h.upstreams[X]=V,n(0,h),n(1,v),n(2,y))}function W(V){y=V,n(2,y)}function G(V){t.$$.not_equal(h.headers,V)&&(h.headers=V,n(0,h),n(1,v),n(2,y))}function Y(V){t.$$.not_equal(h.body,V)&&(h.body=V,n(0,h),n(1,v),n(2,y))}function Q(V){t.$$.not_equal(h.auth,V)&&(h.auth=V,n(0,h),n(1,v),n(2,y))}function le(V){t.$$.not_equal(h.failover,V)&&(h.failover=V,n(0,h),n(1,v),n(2,y))}function Z(V){f=V,n(7,f)}return t.$$set=V=>{"params"in V&&n(21,i=V.params)},t.$$.update=()=>{if(t.$$.dirty[0]&3){!v.length&&h.pathRewrite&&n(1,v=Object.entries(h.pathRewrite||{}).map(([X,J])=>({pattern:X,replacement:J})));const V={};v.filter(X=>X.pattern.trim()).forEach(X=>{V[X.pattern]=X.replacement}),n(0,h.pathRewrite=Object.keys(V).length>0?V:void 0,h)}t.$$.dirty[0]&4&&n(0,h.plugins=y?[y]:void 0,h),t.$$.dirty[0]&4194305&&h&&(b&&clearTimeout(b),n(22,b=setTimeout(()=>{k()},300)))},[h,v,y,l,o,r,u,f,p,g,m,_,s,S,C,T,O,A,x,P,D,i,b,I,R,U,N,z,B,j,F,W,G,Y,Q,le,Z]}class qp extends zt{constructor(e){super(),jt(this,e,m3,g3,Lt,{params:21},null,[-1,-1])}}function Yf(t,e,n){const s=t.slice();return s[42]=e[n][0],s[43]=e[n][1],s}function Jf(t,e,n){const s=t.slice();return s[42]=e[n][0],s[43]=e[n][1],s}function Kf(t,e,n){const s=t.slice();return s[42]=e[n][0],s[43]=e[n][1],s}function Zf(t,e,n){const s=t.slice();s[51]=e[n],s[60]=n;const i=s[50].durations[s[60]];s[52]=i;const l=s[50].relativeTime[s[60]];s[53]=l;const o=s[52]/s[50].totalDuration*100;s[54]=o;const r=s[53]/s[50].totalDuration*100;s[55]=r;const u=n5(s[51].step);s[56]=u;const f=t5(s[51].step);s[57]=f;const h=(s[52]/s[50].totalDuration*100).toFixed(1);return s[58]=h,s}function Qf(t,e,n){const s=t.slice();return s[61]=e[n],s}function hr(t){const e=t.slice(),n=e[27]();return e[50]=n,e}function $f(t,e,n){const s=t.slice();return s[51]=e[n],s}function b3(t){let e,n,s,i,l=t[24]("logs.detail.copyToClipboard")+"",o;return{c(){e=de("svg"),n=de("path"),s=w(),i=d("span"),o=E(l),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor"),c(i,"class","hidden md:inline")},m(r,u){H(r,e,u),a(e,n),H(r,s,u),H(r,i,u),a(i,o)},p(r,u){u[0]&16777216&&l!==(l=r[24]("logs.detail.copyToClipboard")+"")&&M(o,l)},d(r){r&&(L(e),L(s),L(i))}}}function _3(t){let e,n=t[24]("logs.detail.copied")+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","text-success")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.copied")+"")&&M(s,n)},d(i){i&&L(e)}}}function v3(t){let e;return{c(){e=d("span"),e.textContent="No steps recorded",c(e,"class","text-sm opacity-40")},m(n,s){H(n,e,s)},p:Ee,d(n){n&&L(e)}}}function y3(t){let e,n,s=et(t[0].processingSteps.slice(0,3)),i=[];for(let o=0;o<s.length;o+=1)i[o]=eh($f(t,s,o));let l=t[0].processingSteps.length>3&&th(t);return{c(){for(let o=0;o<i.length;o+=1)i[o].c();e=w(),l&&l.c(),n=$n()},m(o,r){for(let u=0;u<i.length;u+=1)i[u]&&i[u].m(o,r);H(o,e,r),l&&l.m(o,r),H(o,n,r)},p(o,r){if(r[0]&67108865){s=et(o[0].processingSteps.slice(0,3));let u;for(u=0;u<s.length;u+=1){const f=$f(o,s,u);i[u]?i[u].p(f,r):(i[u]=eh(f),i[u].c(),i[u].m(e.parentNode,e))}for(;u<i.length;u+=1)i[u].d(1);i.length=s.length}o[0].processingSteps.length>3?l?l.p(o,r):(l=th(o),l.c(),l.m(n.parentNode,n)):l&&(l.d(1),l=null)},d(o){o&&(L(e),L(n)),En(i,o),l&&l.d(o)}}}function eh(t){let e,n=t[26](t[51].step)+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","badge badge-sm badge-outline")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&1&&n!==(n=i[26](i[51].step)+"")&&M(s,n)},d(i){i&&L(e)}}}function th(t){let e,n,s=t[0].processingSteps.length-3+"",i,l;return{c(){e=d("span"),n=E("+"),i=E(s),l=E(" more"),c(e,"class","badge badge-sm badge-ghost")},m(o,r){H(o,e,r),a(e,n),a(e,i),a(e,l)},p(o,r){r[0]&1&&s!==(s=o[0].processingSteps.length-3+"")&&M(i,s)},d(o){o&&L(e)}}}function nh(t){let e,n,s,i,l,o=t[24]("logs.detail.processingTimeline")+"",r,u,f,h=t[24]("logs.detail.totalSteps",{values:{count:t[0].processingSteps.length}})+"",p,g,m=t[24]("logs.detail.totalDuration",{values:{duration:ai(t[50].totalDuration)}})+"",_,b,k,v=(t[22]?t[24]("logs.detail.hideTimeline"):t[24]("logs.detail.showTimeline"))+"",y,S,C,T,O=t[22]&&sh(t);return{c(){e=d("div"),n=d("div"),s=d("div"),i=d("div"),l=d("h4"),r=E(o),u=w(),f=d("p"),p=E(h),g=E(\`\uFF0C
21222
- \`),_=E(m),b=w(),k=d("button"),y=E(v),S=w(),O&&O.c(),c(l,"class","card-title text-base"),c(f,"class","text-xs opacity-60 mt-1"),c(k,"class","btn btn-sm btn-ghost"),c(s,"class","flex items-center justify-between mb-2"),c(n,"class","card-body p-4"),c(e,"class","card bg-base-200")},m(A,x){H(A,e,x),a(e,n),a(n,s),a(s,i),a(i,l),a(l,r),a(i,u),a(i,f),a(f,p),a(f,g),a(f,_),a(s,b),a(s,k),a(k,y),a(n,S),O&&O.m(n,null),C||(T=te(k,"click",t[31]),C=!0)},p(A,x){x[0]&16777216&&o!==(o=A[24]("logs.detail.processingTimeline")+"")&&M(r,o),x[0]&16777217&&h!==(h=A[24]("logs.detail.totalSteps",{values:{count:A[0].processingSteps.length}})+"")&&M(p,h),x[0]&16777216&&m!==(m=A[24]("logs.detail.totalDuration",{values:{duration:ai(A[50].totalDuration)}})+"")&&M(_,m),x[0]&20971520&&v!==(v=(A[22]?A[24]("logs.detail.hideTimeline"):A[24]("logs.detail.showTimeline"))+"")&&M(y,v),A[22]?O?O.p(A,x):(O=sh(A),O.c(),O.m(n,null)):O&&(O.d(1),O=null)},d(A){A&&L(e),O&&O.d(),C=!1,T()}}}function sh(t){let e,n,s,i,l,o,r,u,f,h,p=et(t[0].processingSteps),g=[];for(let m=0;m<p.length;m+=1)g[m]=fh(Zf(t,p,m));return{c(){e=d("div"),n=d("div"),s=d("span"),s.textContent="0ms",i=w(),l=d("div"),o=w(),r=d("span"),r.textContent=\`\${ai(t[50].totalDuration)}\`,u=w();for(let m=0;m<g.length;m+=1)g[m].c();f=w(),h=d("div"),h.innerHTML='<div class="flex flex-wrap gap-4 text-xs"><div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-blue-500"></div> <span>Authentication</span></div> <div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-purple-500"></div> <span>Plugin</span></div> <div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-green-500"></div> <span>Upstream</span></div> <div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-orange-500"></div> <span>Transform</span></div> <div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-red-500"></div> <span>Error</span></div> <div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-yellow-500"></div> <span>Retry/Recovery</span></div></div>',c(l,"class","flex-1 border-t border-dashed border-base-content/20"),c(r,"class","mr-32"),c(n,"class","mb-4 flex items-center gap-2 text-xs opacity-50 px-64"),c(e,"class","mt-4"),c(h,"class","mt-6 pt-4 border-t border-base-300")},m(m,_){H(m,e,_),a(e,n),a(n,s),a(n,i),a(n,l),a(n,o),a(n,r),a(e,u);for(let b=0;b<g.length;b+=1)g[b]&&g[b].m(e,null);H(m,f,_),H(m,h,_)},p(m,_){if(_[0]&201326593){p=et(m[0].processingSteps);let b;for(b=0;b<p.length;b+=1){const k=Zf(m,p,b);g[b]?g[b].p(k,_):(g[b]=fh(k),g[b].c(),g[b].m(e,null))}for(;b<g.length;b+=1)g[b].d(1);g.length=p.length}},d(m){m&&(L(e),L(f),L(h)),En(g,m)}}}function ih(t){let e;return{c(){e=d("div"),c(e,"class","w-px bg-base-content opacity-20 flex-1 min-h-[2.5rem]")},m(n,s){H(n,e,s)},d(n){n&&L(e)}}}function lh(t){let e=t[51].detail.plugins&&Array.isArray(t[51].detail.plugins),n,s,i,l,o=e&&oh(t),r=t[51].detail.target&&ah(t),u=t[51].detail.level&&uh(t),f=t[51].detail.error&&ch(t);return{c(){o&&o.c(),n=w(),r&&r.c(),s=w(),u&&u.c(),i=w(),f&&f.c(),l=$n()},m(h,p){o&&o.m(h,p),H(h,n,p),r&&r.m(h,p),H(h,s,p),u&&u.m(h,p),H(h,i,p),f&&f.m(h,p),H(h,l,p)},p(h,p){p[0]&1&&(e=h[51].detail.plugins&&Array.isArray(h[51].detail.plugins)),e?o?o.p(h,p):(o=oh(h),o.c(),o.m(n.parentNode,n)):o&&(o.d(1),o=null),h[51].detail.target?r?r.p(h,p):(r=ah(h),r.c(),r.m(s.parentNode,s)):r&&(r.d(1),r=null),h[51].detail.level?u?u.p(h,p):(u=uh(h),u.c(),u.m(i.parentNode,i)):u&&(u.d(1),u=null),h[51].detail.error?f?f.p(h,p):(f=ch(h),f.c(),f.m(l.parentNode,l)):f&&(f.d(1),f=null)},d(h){h&&(L(n),L(s),L(i),L(l)),o&&o.d(h),r&&r.d(h),u&&u.d(h),f&&f.d(h)}}}function oh(t){let e,n=et(t[51].detail.plugins),s=[];for(let i=0;i<n.length;i+=1)s[i]=rh(Qf(t,n,i));return{c(){for(let i=0;i<s.length;i+=1)s[i].c();e=$n()},m(i,l){for(let o=0;o<s.length;o+=1)s[o]&&s[o].m(i,l);H(i,e,l)},p(i,l){if(l[0]&1){n=et(i[51].detail.plugins);let o;for(o=0;o<n.length;o+=1){const r=Qf(i,n,o);s[o]?s[o].p(r,l):(s[o]=rh(r),s[o].c(),s[o].m(e.parentNode,e))}for(;o<s.length;o+=1)s[o].d(1);s.length=n.length}},d(i){i&&L(e),En(s,i)}}}function rh(t){let e,n=t[61]+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","badge badge-xs badge-primary badge-outline")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&1&&n!==(n=i[61]+"")&&M(s,n)},d(i){i&&L(e)}}}function ah(t){let e,n=t[51].detail.target+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","badge badge-xs badge-info badge-outline"),c(e,"title","Target upstream")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&1&&n!==(n=i[51].detail.target+"")&&M(s,n)},d(i){i&&L(e)}}}function uh(t){let e,n=t[51].detail.level+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","badge badge-xs badge-warning badge-outline")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&1&&n!==(n=i[51].detail.level+"")&&M(s,n)},d(i){i&&L(e)}}}function ch(t){let e,n,s;return{c(){e=d("span"),n=E("Error"),c(e,"class","badge badge-xs badge-error badge-outline"),c(e,"title",s=t[51].detail.error)},m(i,l){H(i,e,l),a(e,n)},p(i,l){l[0]&1&&s!==(s=i[51].detail.error)&&c(e,"title",s)},d(i){i&&L(e)}}}function w3(t){let e;return{c(){e=d("span"),e.textContent=\`\${t[58]}%\`,c(e,"class","text-xs text-white px-2 leading-7")},m(n,s){H(n,e,s)},p:Ee,d(n){n&&L(e)}}}function fh(t){let e,n,s,i,l,o,r,u,f,h=t[26](t[51].step)+"",p,g,m,_,b=t[56]+"",k,v,y,S,C,T,O,A,x,P,D,I,R,U,N,z,B=t[60]<t[0].processingSteps.length-1&&ih(),j=t[51].detail&&lh(t),F=t[54]>5&&w3(t);return{c(){e=d("div"),n=d("div"),s=d("div"),i=d("div"),o=w(),B&&B.c(),r=w(),u=d("div"),f=d("div"),p=E(h),g=w(),m=d("div"),_=d("span"),k=E(b),v=w(),j&&j.c(),y=w(),S=d("div"),C=d("div"),T=d("div"),F&&F.c(),x=w(),P=d("div"),D=d("div"),D.textContent=\`+\${t[53]}ms\`,I=w(),R=d("div"),R.textContent=\`\${ai(t[52])}\`,U=w(),N=d("div"),N.textContent=\`\${t[58]}%\`,z=w(),c(i,"class",l="w-3 h-3 rounded-full "+t[57]+" z-10"),c(s,"class","flex flex-col items-center"),c(f,"class","text-sm font-medium"),c(_,"class","badge badge-xs badge-ghost"),c(m,"class","text-xs opacity-50 mt-0.5 flex items-center gap-2 flex-wrap"),c(u,"class","flex-1 -mt-0.5"),c(n,"class","flex gap-3 shrink-0 w-64"),c(T,"class",O="absolute h-full "+t[57]+" opacity-70 group-hover:opacity-90 transition-all cursor-pointer"),Sa(T,"left",t[55]+"%"),Sa(T,"width",Math.max(t[54],1)+"%"),c(T,"title",A=t[51].step+": "+ai(t[52])+" ("+t[58]+"%)"),c(C,"class","w-full h-7 relative bg-base-300/30 rounded overflow-hidden"),c(S,"class","flex-1 flex items-center"),c(D,"class","opacity-60"),c(R,"class","font-semibold"),c(N,"class","opacity-40"),c(P,"class","shrink-0 w-32 text-xs space-y-0.5 font-mono"),c(e,"class","flex gap-4 group relative mb-3")},m(W,G){H(W,e,G),a(e,n),a(n,s),a(s,i),a(s,o),B&&B.m(s,null),a(n,r),a(n,u),a(u,f),a(f,p),a(u,g),a(u,m),a(m,_),a(_,k),a(m,v),j&&j.m(m,null),a(e,y),a(e,S),a(S,C),a(C,T),F&&F.m(T,null),a(e,x),a(e,P),a(P,D),a(P,I),a(P,R),a(P,U),a(P,N),a(e,z)},p(W,G){G[0]&1&&l!==(l="w-3 h-3 rounded-full "+W[57]+" z-10")&&c(i,"class",l),W[60]<W[0].processingSteps.length-1?B||(B=ih(),B.c(),B.m(s,null)):B&&(B.d(1),B=null),G[0]&1&&h!==(h=W[26](W[51].step)+"")&&M(p,h),G[0]&1&&b!==(b=W[56]+"")&&M(k,b),W[51].detail?j?j.p(W,G):(j=lh(W),j.c(),j.m(m,null)):j&&(j.d(1),j=null),W[54]>5&&F.p(W,G),G[0]&1&&O!==(O="absolute h-full "+W[57]+" opacity-70 group-hover:opacity-90 transition-all cursor-pointer")&&c(T,"class",O),G[0]&1&&A!==(A=W[51].step+": "+ai(W[52])+" ("+W[58]+"%)")&&c(T,"title",A)},d(W){W&&L(e),B&&B.d(),j&&j.d(),F&&F.d()}}}function k3(t){let e,n,s=t[24]("logs.detail.path")+"",i,l,o,r=t[0].path+"",u;return{c(){e=d("div"),n=d("div"),i=E(s),l=w(),o=d("div"),u=E(r),c(n,"class","text-xs opacity-60 mb-1"),c(o,"class","font-mono text-sm bg-base-300 p-2 rounded break-all")},m(f,h){H(f,e,h),a(e,n),a(n,i),a(e,l),a(e,o),a(o,u)},p(f,h){h[0]&16777216&&s!==(s=f[24]("logs.detail.path")+"")&&M(i,s),h[0]&1&&r!==(r=f[0].path+"")&&M(u,r)},d(f){f&&L(e)}}}function S3(t){let e,n,s=t[24]("logs.detail.originalPath")+"",i,l,o,r=t[0].path+"",u,f,h,p,g=t[24]("logs.detail.transformedPath")+"",m,_,b,k=t[0].transformedPath+"",v;return{c(){e=d("div"),n=d("div"),i=E(s),l=w(),o=d("div"),u=E(r),f=w(),h=d("div"),p=d("div"),m=E(g),_=w(),b=d("div"),v=E(k),c(n,"class","text-xs opacity-60 mb-1"),c(o,"class","font-mono text-sm bg-base-300 p-2 rounded break-all"),c(p,"class","text-xs opacity-60 mb-1"),c(b,"class","font-mono text-sm bg-base-300 p-2 rounded break-all")},m(y,S){H(y,e,S),a(e,n),a(n,i),a(e,l),a(e,o),a(o,u),H(y,f,S),H(y,h,S),a(h,p),a(p,m),a(h,_),a(h,b),a(b,v)},p(y,S){S[0]&16777216&&s!==(s=y[24]("logs.detail.originalPath")+"")&&M(i,s),S[0]&1&&r!==(r=y[0].path+"")&&M(u,r),S[0]&16777216&&g!==(g=y[24]("logs.detail.transformedPath")+"")&&M(m,g),S[0]&1&&k!==(k=y[0].transformedPath+"")&&M(v,k)},d(y){y&&(L(e),L(f),L(h))}}}function hh(t){let e,n,s=t[24]("logs.detail.query")+"",i,l,o,r=t[0].query+"",u;return{c(){e=d("div"),n=d("div"),i=E(s),l=w(),o=d("div"),u=E(r),c(n,"class","text-xs opacity-60 mb-1"),c(o,"class","font-mono text-sm bg-base-300 p-2 rounded break-all")},m(f,h){H(f,e,h),a(e,n),a(n,i),a(e,l),a(e,o),a(o,u)},p(f,h){h[0]&16777216&&s!==(s=f[24]("logs.detail.query")+"")&&M(i,s),h[0]&1&&r!==(r=f[0].query+"")&&M(u,r)},d(f){f&&L(e)}}}function dh(t){let e,n,s,i=t[24]("logs.detail.routePath")+"",l,o,r,u=t[0].routePath+"",f;return{c(){e=d("div"),n=d("div"),s=d("h4"),l=E(i),o=w(),r=d("div"),f=E(u),c(s,"class","card-title text-base mb-2"),c(r,"class","font-mono text-sm"),c(n,"class","card-body p-4"),c(e,"class","card bg-base-200")},m(h,p){H(h,e,p),a(e,n),a(n,s),a(s,l),a(n,o),a(n,r),a(r,f)},p(h,p){p[0]&16777216&&i!==(i=h[24]("logs.detail.routePath")+"")&&M(l,i),p[0]&1&&u!==(u=h[0].routePath+"")&&M(f,u)},d(h){h&&L(e)}}}function ph(t){let e,n,s,i=t[24]("logs.detail.upstream")+"",l,o,r,u=t[0].upstream+"",f,h,p=t[0].transformer&&gh(t);return{c(){e=d("div"),n=d("div"),s=d("h4"),l=E(i),o=w(),r=d("div"),f=E(u),h=w(),p&&p.c(),c(s,"class","card-title text-base mb-2"),c(r,"class","font-mono text-sm mb-2"),c(n,"class","card-body p-4"),c(e,"class","card bg-base-200")},m(g,m){H(g,e,m),a(e,n),a(n,s),a(s,l),a(n,o),a(n,r),a(r,f),a(n,h),p&&p.m(n,null)},p(g,m){m[0]&16777216&&i!==(i=g[24]("logs.detail.upstream")+"")&&M(l,i),m[0]&1&&u!==(u=g[0].upstream+"")&&M(f,u),g[0].transformer?p?p.p(g,m):(p=gh(g),p.c(),p.m(n,null)):p&&(p.d(1),p=null)},d(g){g&&L(e),p&&p.d()}}}function gh(t){let e,n=t[24]("logs.detail.transformer")+"",s,i,l=t[0].transformer+"",o;return{c(){e=d("div"),s=E(n),i=E(": "),o=E(l),c(e,"class","text-xs opacity-60")},m(r,u){H(r,e,u),a(e,s),a(e,i),a(e,o)},p(r,u){u[0]&16777216&&n!==(n=r[24]("logs.detail.transformer")+"")&&M(s,n),u[0]&1&&l!==(l=r[0].transformer+"")&&M(o,l)},d(r){r&&L(e)}}}function mh(t){let e,n,s,i,l,o,r=t[24]("logs.detail.errorInfo")+"",u,f,h,p=t[0].errorMessage+"",g;return{c(){e=d("div"),n=de("svg"),s=de("path"),i=w(),l=d("div"),o=d("div"),u=E(r),f=w(),h=d("div"),g=E(p),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-6 w-6"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(o,"class","font-bold"),c(h,"class","font-mono text-sm"),c(e,"class","alert alert-error")},m(m,_){H(m,e,_),a(e,n),a(n,s),a(e,i),a(e,l),a(l,o),a(o,u),a(l,f),a(l,h),a(h,g)},p(m,_){_[0]&16777216&&r!==(r=m[24]("logs.detail.errorInfo")+"")&&M(u,r),_[0]&1&&p!==(p=m[0].errorMessage+"")&&M(g,p)},d(m){m&&L(e)}}}function bh(t){let e;function n(l,o){return l[0].originalReqHeaderId||l[0].originalReqBodyId?T3:E3}let s=n(t),i=s(t);return{c(){e=d("div"),i.c(),c(e,"class","space-y-4")},m(l,o){H(l,e,o),i.m(e,null)},p(l,o){s===(s=n(l))&&i?i.p(l,o):(i.d(1),i=s(l),i&&(i.c(),i.m(e,null)))},d(l){l&&L(e),i.d()}}}function E3(t){let e,n=t[24]("logs.detail.noDataAvailable")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-center py-8 opacity-60")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noDataAvailable")+"")&&M(s,n)},d(i){i&&L(e)}}}function T3(t){let e,n,s=t[0].originalReqHeaderId&&_h(t),i=t[8]&&t[0].originalReqBodyId&&yh(t);return{c(){s&&s.c(),e=w(),i&&i.c(),n=$n()},m(l,o){s&&s.m(l,o),H(l,e,o),i&&i.m(l,o),H(l,n,o)},p(l,o){l[0].originalReqHeaderId?s?s.p(l,o):(s=_h(l),s.c(),s.m(e.parentNode,e)):s&&(s.d(1),s=null),l[8]&&l[0].originalReqBodyId?i?i.p(l,o):(i=yh(l),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},d(l){l&&(L(e),L(n)),s&&s.d(l),i&&i.d(l)}}}function _h(t){let e,n,s=t[24]("logs.detail.requestHeaders")+"",i,l;function o(f,h){return f[17]?A3:f[19]?P3:f[15]!==null?C3:M3}let r=o(t),u=r(t);return{c(){e=d("div"),n=d("div"),i=E(s),l=w(),u.c(),c(n,"class","text-sm font-semibold mb-2")},m(f,h){H(f,e,h),a(e,n),a(n,i),a(e,l),u.m(e,null)},p(f,h){h[0]&16777216&&s!==(s=f[24]("logs.detail.requestHeaders")+"")&&M(i,s),r===(r=o(f))&&u?u.p(f,h):(u.d(1),u=r(f),u&&(u.c(),u.m(e,null)))},d(f){f&&L(e),u.d()}}}function M3(t){let e,n=t[24]("logs.detail.noHeaders")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-sm opacity-60")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noHeaders")+"")&&M(s,n)},d(i){i&&L(e)}}}function C3(t){let e,n,s,i,l,o=et(Object.entries(t[15])),r=[];for(let u=0;u<o.length;u+=1)r[u]=vh(Kf(t,o,u));return{c(){e=d("div"),n=d("table"),s=d("thead"),s.innerHTML='<tr><th class="w-1/3">Name</th> <th>Value</th></tr>',i=w(),l=d("tbody");for(let u=0;u<r.length;u+=1)r[u].c();c(n,"class","table table-sm table-zebra"),c(e,"class","overflow-x-auto")},m(u,f){H(u,e,f),a(e,n),a(n,s),a(n,i),a(n,l);for(let h=0;h<r.length;h+=1)r[h]&&r[h].m(l,null)},p(u,f){if(f[0]&32768){o=et(Object.entries(u[15]));let h;for(h=0;h<o.length;h+=1){const p=Kf(u,o,h);r[h]?r[h].p(p,f):(r[h]=vh(p),r[h].c(),r[h].m(l,null))}for(;h<r.length;h+=1)r[h].d(1);r.length=o.length}},d(u){u&&L(e),En(r,u)}}}function P3(t){let e,n,s;return{c(){e=d("div"),n=d("span"),s=E(t[19]),c(n,"class","text-sm"),c(e,"class","alert alert-error")},m(i,l){H(i,e,l),a(e,n),a(n,s)},p(i,l){l[0]&524288&&M(s,i[19])},d(i){i&&L(e)}}}function A3(t){let e,n,s,i,l=t[24]("common.loading")+"",o;return{c(){e=d("div"),n=d("span"),s=w(),i=d("span"),o=E(l),c(n,"class","loading loading-spinner loading-sm"),c(i,"class","text-sm"),c(e,"class","flex items-center gap-2")},m(r,u){H(r,e,u),a(e,n),a(e,s),a(e,i),a(i,o)},p(r,u){u[0]&16777216&&l!==(l=r[24]("common.loading")+"")&&M(o,l)},d(r){r&&L(e)}}}function vh(t){let e,n,s=t[42]+"",i,l,o,r=t[43]+"",u,f;return{c(){e=d("tr"),n=d("td"),i=E(s),l=w(),o=d("td"),u=E(r),f=w(),c(n,"class","font-mono text-xs"),c(o,"class","font-mono text-xs break-all")},m(h,p){H(h,e,p),a(e,n),a(n,i),a(e,l),a(e,o),a(o,u),a(e,f)},p(h,p){p[0]&32768&&s!==(s=h[42]+"")&&M(i,s),p[0]&32768&&r!==(r=h[43]+"")&&M(u,r)},d(h){h&&L(e)}}}function yh(t){let e,n,s=t[24]("logs.detail.requestBody")+"",i,l;function o(f,h){return f[18]?D3:f[20]?R3:f[16]!==null?x3:O3}let r=o(t),u=r(t);return{c(){e=d("div"),n=d("div"),i=E(s),l=w(),u.c(),c(n,"class","text-sm font-semibold mb-2")},m(f,h){H(f,e,h),a(e,n),a(n,i),a(e,l),u.m(e,null)},p(f,h){h[0]&16777216&&s!==(s=f[24]("logs.detail.requestBody")+"")&&M(i,s),r===(r=o(f))&&u?u.p(f,h):(u.d(1),u=r(f),u&&(u.c(),u.m(e,null)))},d(f){f&&L(e),u.d()}}}function O3(t){let e,n=t[24]("logs.detail.noBody")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-sm opacity-60")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noBody")+"")&&M(s,n)},d(i){i&&L(e)}}}function x3(t){let e,n=Yi(t[16])+"",s;return{c(){e=d("pre"),s=E(n),c(e,"class","bg-base-300 p-4 rounded overflow-x-auto text-xs max-h-96")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&65536&&n!==(n=Yi(i[16])+"")&&M(s,n)},d(i){i&&L(e)}}}function R3(t){let e,n,s;return{c(){e=d("div"),n=d("span"),s=E(t[20]),c(n,"class","text-sm"),c(e,"class","alert alert-error")},m(i,l){H(i,e,l),a(e,n),a(n,s)},p(i,l){l[0]&1048576&&M(s,i[20])},d(i){i&&L(e)}}}function D3(t){let e,n,s,i,l=t[24]("common.loading")+"",o;return{c(){e=d("div"),n=d("span"),s=w(),i=d("span"),o=E(l),c(n,"class","loading loading-spinner loading-sm"),c(i,"class","text-sm"),c(e,"class","flex items-center gap-2")},m(r,u){H(r,e,u),a(e,n),a(e,s),a(e,i),a(i,o)},p(r,u){u[0]&16777216&&l!==(l=r[24]("common.loading")+"")&&M(o,l)},d(r){r&&L(e)}}}function wh(t){let e;function n(l,o){return l[0].reqHeaderId||l[0].reqBodyId?H3:L3}let s=n(t),i=s(t);return{c(){e=d("div"),i.c(),c(e,"class","space-y-4")},m(l,o){H(l,e,o),i.m(e,null)},p(l,o){s===(s=n(l))&&i?i.p(l,o):(i.d(1),i=s(l),i&&(i.c(),i.m(e,null)))},d(l){l&&L(e),i.d()}}}function L3(t){let e,n=t[24]("logs.detail.noDataAvailable")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-center py-8 opacity-60")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noDataAvailable")+"")&&M(s,n)},d(i){i&&L(e)}}}function H3(t){let e,n,s=t[0].reqHeaderId&&kh(t),i=t[8]&&t[0].reqBodyId&&Eh(t);return{c(){s&&s.c(),e=w(),i&&i.c(),n=$n()},m(l,o){s&&s.m(l,o),H(l,e,o),i&&i.m(l,o),H(l,n,o)},p(l,o){l[0].reqHeaderId?s?s.p(l,o):(s=kh(l),s.c(),s.m(e.parentNode,e)):s&&(s.d(1),s=null),l[8]&&l[0].reqBodyId?i?i.p(l,o):(i=Eh(l),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},d(l){l&&(L(e),L(n)),s&&s.d(l),i&&i.d(l)}}}function kh(t){let e,n,s=t[24]("logs.detail.requestHeaders")+"",i,l;function o(f,h){return f[11]?N3:f[13]?F3:f[9]!==null?B3:I3}let r=o(t),u=r(t);return{c(){e=d("div"),n=d("div"),i=E(s),l=w(),u.c(),c(n,"class","text-sm font-semibold mb-2")},m(f,h){H(f,e,h),a(e,n),a(n,i),a(e,l),u.m(e,null)},p(f,h){h[0]&16777216&&s!==(s=f[24]("logs.detail.requestHeaders")+"")&&M(i,s),r===(r=o(f))&&u?u.p(f,h):(u.d(1),u=r(f),u&&(u.c(),u.m(e,null)))},d(f){f&&L(e),u.d()}}}function I3(t){let e,n=t[24]("logs.detail.noHeaders")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-sm opacity-60")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noHeaders")+"")&&M(s,n)},d(i){i&&L(e)}}}function B3(t){let e,n,s,i,l,o=et(Object.entries(t[9])),r=[];for(let u=0;u<o.length;u+=1)r[u]=Sh(Jf(t,o,u));return{c(){e=d("div"),n=d("table"),s=d("thead"),s.innerHTML='<tr><th class="w-1/3">Name</th> <th>Value</th></tr>',i=w(),l=d("tbody");for(let u=0;u<r.length;u+=1)r[u].c();c(n,"class","table table-sm table-zebra"),c(e,"class","overflow-x-auto")},m(u,f){H(u,e,f),a(e,n),a(n,s),a(n,i),a(n,l);for(let h=0;h<r.length;h+=1)r[h]&&r[h].m(l,null)},p(u,f){if(f[0]&512){o=et(Object.entries(u[9]));let h;for(h=0;h<o.length;h+=1){const p=Jf(u,o,h);r[h]?r[h].p(p,f):(r[h]=Sh(p),r[h].c(),r[h].m(l,null))}for(;h<r.length;h+=1)r[h].d(1);r.length=o.length}},d(u){u&&L(e),En(r,u)}}}function F3(t){let e,n,s;return{c(){e=d("div"),n=d("span"),s=E(t[13]),c(n,"class","text-sm"),c(e,"class","alert alert-error")},m(i,l){H(i,e,l),a(e,n),a(n,s)},p(i,l){l[0]&8192&&M(s,i[13])},d(i){i&&L(e)}}}function N3(t){let e,n,s,i,l=t[24]("common.loading")+"",o;return{c(){e=d("div"),n=d("span"),s=w(),i=d("span"),o=E(l),c(n,"class","loading loading-spinner loading-sm"),c(i,"class","text-sm"),c(e,"class","flex items-center gap-2")},m(r,u){H(r,e,u),a(e,n),a(e,s),a(e,i),a(i,o)},p(r,u){u[0]&16777216&&l!==(l=r[24]("common.loading")+"")&&M(o,l)},d(r){r&&L(e)}}}function Sh(t){let e,n,s=t[42]+"",i,l,o,r=t[43]+"",u,f;return{c(){e=d("tr"),n=d("td"),i=E(s),l=w(),o=d("td"),u=E(r),f=w(),c(n,"class","font-mono text-xs"),c(o,"class","font-mono text-xs break-all")},m(h,p){H(h,e,p),a(e,n),a(n,i),a(e,l),a(e,o),a(o,u),a(e,f)},p(h,p){p[0]&512&&s!==(s=h[42]+"")&&M(i,s),p[0]&512&&r!==(r=h[43]+"")&&M(u,r)},d(h){h&&L(e)}}}function Eh(t){let e,n,s=t[24]("logs.detail.requestBody")+"",i,l;function o(f,h){return f[4]?V3:f[6]?U3:f[2]!==null?z3:j3}let r=o(t),u=r(t);return{c(){e=d("div"),n=d("div"),i=E(s),l=w(),u.c(),c(n,"class","text-sm font-semibold mb-2")},m(f,h){H(f,e,h),a(e,n),a(n,i),a(e,l),u.m(e,null)},p(f,h){h[0]&16777216&&s!==(s=f[24]("logs.detail.requestBody")+"")&&M(i,s),r===(r=o(f))&&u?u.p(f,h):(u.d(1),u=r(f),u&&(u.c(),u.m(e,null)))},d(f){f&&L(e),u.d()}}}function j3(t){let e,n=t[24]("logs.detail.noBody")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-sm opacity-60")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noBody")+"")&&M(s,n)},d(i){i&&L(e)}}}function z3(t){let e,n=Yi(t[2])+"",s;return{c(){e=d("pre"),s=E(n),c(e,"class","bg-base-300 p-4 rounded overflow-x-auto text-xs max-h-96")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&4&&n!==(n=Yi(i[2])+"")&&M(s,n)},d(i){i&&L(e)}}}function U3(t){let e,n,s;return{c(){e=d("div"),n=d("span"),s=E(t[6]),c(n,"class","text-sm"),c(e,"class","alert alert-error")},m(i,l){H(i,e,l),a(e,n),a(n,s)},p(i,l){l[0]&64&&M(s,i[6])},d(i){i&&L(e)}}}function V3(t){let e,n,s,i,l=t[24]("common.loading")+"",o;return{c(){e=d("div"),n=d("span"),s=w(),i=d("span"),o=E(l),c(n,"class","loading loading-spinner loading-sm"),c(i,"class","text-sm"),c(e,"class","flex items-center gap-2")},m(r,u){H(r,e,u),a(e,n),a(e,s),a(e,i),a(i,o)},p(r,u){u[0]&16777216&&l!==(l=r[24]("common.loading")+"")&&M(o,l)},d(r){r&&L(e)}}}function Th(t){let e;function n(l,o){return l[0].respHeaderId||l[0].respBodyId?q3:W3}let s=n(t),i=s(t);return{c(){e=d("div"),i.c(),c(e,"class","space-y-4")},m(l,o){H(l,e,o),i.m(e,null)},p(l,o){s===(s=n(l))&&i?i.p(l,o):(i.d(1),i=s(l),i&&(i.c(),i.m(e,null)))},d(l){l&&L(e),i.d()}}}function W3(t){let e,n=t[24]("logs.detail.noDataAvailable")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-center py-8 opacity-60")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noDataAvailable")+"")&&M(s,n)},d(i){i&&L(e)}}}function q3(t){let e,n,s=t[0].respHeaderId&&Mh(t),i=t[8]&&t[0].respBodyId&&Ph(t);return{c(){s&&s.c(),e=w(),i&&i.c(),n=$n()},m(l,o){s&&s.m(l,o),H(l,e,o),i&&i.m(l,o),H(l,n,o)},p(l,o){l[0].respHeaderId?s?s.p(l,o):(s=Mh(l),s.c(),s.m(e.parentNode,e)):s&&(s.d(1),s=null),l[8]&&l[0].respBodyId?i?i.p(l,o):(i=Ph(l),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},d(l){l&&(L(e),L(n)),s&&s.d(l),i&&i.d(l)}}}function Mh(t){let e,n,s=t[24]("logs.detail.responseHeaders")+"",i,l;function o(f,h){return f[12]?J3:f[14]?Y3:f[10]!==null?X3:G3}let r=o(t),u=r(t);return{c(){e=d("div"),n=d("div"),i=E(s),l=w(),u.c(),c(n,"class","text-sm font-semibold mb-2")},m(f,h){H(f,e,h),a(e,n),a(n,i),a(e,l),u.m(e,null)},p(f,h){h[0]&16777216&&s!==(s=f[24]("logs.detail.responseHeaders")+"")&&M(i,s),r===(r=o(f))&&u?u.p(f,h):(u.d(1),u=r(f),u&&(u.c(),u.m(e,null)))},d(f){f&&L(e),u.d()}}}function G3(t){let e,n=t[24]("logs.detail.noHeaders")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-sm opacity-60")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noHeaders")+"")&&M(s,n)},d(i){i&&L(e)}}}function X3(t){let e,n,s,i,l,o=et(Object.entries(t[10])),r=[];for(let u=0;u<o.length;u+=1)r[u]=Ch(Yf(t,o,u));return{c(){e=d("div"),n=d("table"),s=d("thead"),s.innerHTML='<tr><th class="w-1/3">Name</th> <th>Value</th></tr>',i=w(),l=d("tbody");for(let u=0;u<r.length;u+=1)r[u].c();c(n,"class","table table-sm table-zebra"),c(e,"class","overflow-x-auto")},m(u,f){H(u,e,f),a(e,n),a(n,s),a(n,i),a(n,l);for(let h=0;h<r.length;h+=1)r[h]&&r[h].m(l,null)},p(u,f){if(f[0]&1024){o=et(Object.entries(u[10]));let h;for(h=0;h<o.length;h+=1){const p=Yf(u,o,h);r[h]?r[h].p(p,f):(r[h]=Ch(p),r[h].c(),r[h].m(l,null))}for(;h<r.length;h+=1)r[h].d(1);r.length=o.length}},d(u){u&&L(e),En(r,u)}}}function Y3(t){let e,n,s;return{c(){e=d("div"),n=d("span"),s=E(t[14]),c(n,"class","text-sm"),c(e,"class","alert alert-error")},m(i,l){H(i,e,l),a(e,n),a(n,s)},p(i,l){l[0]&16384&&M(s,i[14])},d(i){i&&L(e)}}}function J3(t){let e,n,s,i,l=t[24]("common.loading")+"",o;return{c(){e=d("div"),n=d("span"),s=w(),i=d("span"),o=E(l),c(n,"class","loading loading-spinner loading-sm"),c(i,"class","text-sm"),c(e,"class","flex items-center gap-2")},m(r,u){H(r,e,u),a(e,n),a(e,s),a(e,i),a(i,o)},p(r,u){u[0]&16777216&&l!==(l=r[24]("common.loading")+"")&&M(o,l)},d(r){r&&L(e)}}}function Ch(t){let e,n,s=t[42]+"",i,l,o,r=t[43]+"",u,f;return{c(){e=d("tr"),n=d("td"),i=E(s),l=w(),o=d("td"),u=E(r),f=w(),c(n,"class","font-mono text-xs"),c(o,"class","font-mono text-xs break-all")},m(h,p){H(h,e,p),a(e,n),a(n,i),a(e,l),a(e,o),a(o,u),a(e,f)},p(h,p){p[0]&1024&&s!==(s=h[42]+"")&&M(i,s),p[0]&1024&&r!==(r=h[43]+"")&&M(u,r)},d(h){h&&L(e)}}}function Ph(t){let e,n,s=t[24]("logs.detail.responseBody")+"",i,l;function o(f,h){return f[5]?$3:f[7]?Q3:f[3]!==null?Z3:K3}let r=o(t),u=r(t);return{c(){e=d("div"),n=d("div"),i=E(s),l=w(),u.c(),c(n,"class","text-sm font-semibold mb-2")},m(f,h){H(f,e,h),a(e,n),a(n,i),a(e,l),u.m(e,null)},p(f,h){h[0]&16777216&&s!==(s=f[24]("logs.detail.responseBody")+"")&&M(i,s),r===(r=o(f))&&u?u.p(f,h):(u.d(1),u=r(f),u&&(u.c(),u.m(e,null)))},d(f){f&&L(e),u.d()}}}function K3(t){let e,n=t[24]("logs.detail.noBody")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-sm opacity-60")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noBody")+"")&&M(s,n)},d(i){i&&L(e)}}}function Z3(t){let e,n=Yi(t[3])+"",s;return{c(){e=d("pre"),s=E(n),c(e,"class","bg-base-300 p-4 rounded overflow-x-auto text-xs max-h-96")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&8&&n!==(n=Yi(i[3])+"")&&M(s,n)},d(i){i&&L(e)}}}function Q3(t){let e,n,s;return{c(){e=d("div"),n=d("span"),s=E(t[7]),c(n,"class","text-sm"),c(e,"class","alert alert-error")},m(i,l){H(i,e,l),a(e,n),a(n,s)},p(i,l){l[0]&128&&M(s,i[7])},d(i){i&&L(e)}}}function $3(t){let e,n,s,i,l=t[24]("common.loading")+"",o;return{c(){e=d("div"),n=d("span"),s=w(),i=d("span"),o=E(l),c(n,"class","loading loading-spinner loading-sm"),c(i,"class","text-sm"),c(e,"class","flex items-center gap-2")},m(r,u){H(r,e,u),a(e,n),a(e,s),a(e,i),a(i,o)},p(r,u){u[0]&16777216&&l!==(l=r[24]("common.loading")+"")&&M(o,l)},d(r){r&&L(e)}}}function Ah(t){let e,n,s,i=t[24]("logs.detail.authInfo")+"",l,o,r,u,f,h=t[24]("logs.detail.authLevel")+"",p,g,m,_=t[0].authLevel+"",b,k,v,y,S=t[24]("logs.detail.authResult")+"",C,T,O,A=(t[0].authSuccess?t[24]("logs.detail.authSuccess"):t[24]("logs.detail.authFailed"))+"",x,P;return{c(){e=d("div"),n=d("div"),s=d("h4"),l=E(i),o=w(),r=d("div"),u=d("div"),f=d("div"),p=E(h),g=w(),m=d("div"),b=E(_),k=w(),v=d("div"),y=d("div"),C=E(S),T=w(),O=d("span"),x=E(A),c(s,"class","card-title text-base mb-2"),c(f,"class","text-xs opacity-60 mb-1"),c(m,"class","text-sm"),c(y,"class","text-xs opacity-60 mb-1"),c(O,"class",P="badge "+(t[0].authSuccess?"badge-success":"badge-error")),c(r,"class","grid grid-cols-2 gap-4"),c(n,"class","card-body p-4"),c(e,"class","card bg-base-200")},m(D,I){H(D,e,I),a(e,n),a(n,s),a(s,l),a(n,o),a(n,r),a(r,u),a(u,f),a(f,p),a(u,g),a(u,m),a(m,b),a(r,k),a(r,v),a(v,y),a(y,C),a(v,T),a(v,O),a(O,x)},p(D,I){I[0]&16777216&&i!==(i=D[24]("logs.detail.authInfo")+"")&&M(l,i),I[0]&16777216&&h!==(h=D[24]("logs.detail.authLevel")+"")&&M(p,h),I[0]&1&&_!==(_=D[0].authLevel+"")&&M(b,_),I[0]&16777216&&S!==(S=D[24]("logs.detail.authResult")+"")&&M(C,S),I[0]&16777217&&A!==(A=(D[0].authSuccess?D[24]("logs.detail.authSuccess"):D[24]("logs.detail.authFailed"))+"")&&M(x,A),I[0]&1&&P!==(P="badge "+(D[0].authSuccess?"badge-success":"badge-error"))&&c(O,"class",P)},d(D){D&&L(e)}}}function e5(t){let e,n,s,i,l=t[24]("logs.detail.title")+"",o,r,u,f,h,p,g,m,_,b,k,v=t[24]("logs.detail.downloadJson")+"",y,S,C,T,O,A,x,P,D,I=t[24]("logs.detail.overview")+"",R,U,N,z,B,j=t[24]("logs.detail.status")+"",F,W,G,Y=t[0].status+"",Q,le,Z,V,X,J=t[24]("logs.detail.method")+"",oe,ne,ee,se=t[0].method+"",K,q,ce,he,ke=t[24]("logs.requestType")+"",we,pe,me,Pe=t[25](t[0].requestType)+"",Se,Ce,_e,Ae,ye,$,ue=t[24]("logs.detail.duration")+"",ae,ge,re,Ne=ai(t[0].duration)+"",Ye,Ve,Qe,st,Xe=t[24]("logs.detail.timestamp")+"",vt,rt,He,$e=Oh(t[0].timestamp)+"",Oe,ft,qe,Re,ze=t[24]("logs.detail.requestId")+"",ve,Je,be,We=t[0].requestId+"",yt,Ke,Ie,kt,nt=t[24]("logs.detail.processingSteps")+"",ht,Ot,Te,it,De,tt,Ht,Rn,pn=t[24]("logs.detail.requestInfo")+"",xe,lt,an,Mt,ls,Tn,zn,It,gn,Dn,un,mn,Pn,Fn=t[24]("logs.detail.tabOriginalRequest")+"",Ln,Un,os,Ut,Mn=t[24]("logs.detail.tabFinalRequest")+"",Hn,hn,Vn,An,wn=t[24]("logs.detail.tabResponse")+"",kn,Wn,rs,St,Xt,qn,as,ot,es;function _s(Zt,Ue){return Zt[23]?_3:b3}let xt=_s(t),Ct=xt(t);function $t(Zt,Ue){return Zt[0].processingSteps&&Zt[0].processingSteps.length>0?y3:v3}let nn=$t(t),sn=nn(t),en=t[0].processingSteps&&t[0].processingSteps.length>0&&nh(hr(t));function Vt(Zt,Ue){return Zt[0].transformedPath&&Zt[0].transformedPath!==Zt[0].path?S3:k3}let ts=Vt(t),Wt=ts(t),qt=t[0].query&&hh(t),Bt=t[0].routePath&&dh(t),tn=t[0].upstream&&ph(t),Pt=t[0].errorMessage&&mh(t),Yt=t[21]==="original"&&bh(t),Jt=t[21]==="transformed"&&wh(t),cn=t[21]==="response"&&Th(t),Kt=t[0].authLevel&&Ah(t);return{c(){e=d("div"),n=d("div"),s=d("div"),i=d("h3"),o=E(l),r=w(),u=d("div"),f=d("button"),Ct.c(),p=w(),g=d("button"),m=de("svg"),_=de("path"),b=w(),k=d("span"),y=E(v),C=w(),T=d("button"),T.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>',O=w(),A=d("div"),x=d("div"),P=d("div"),D=d("h4"),R=E(I),U=w(),N=d("div"),z=d("div"),B=d("div"),F=E(j),W=w(),G=d("span"),Q=E(Y),Z=w(),V=d("div"),X=d("div"),oe=E(J),ne=w(),ee=d("span"),K=E(se),q=w(),ce=d("div"),he=d("div"),we=E(ke),pe=w(),me=d("span"),Se=E(Pe),Ae=w(),ye=d("div"),$=d("div"),ae=E(ue),ge=w(),re=d("div"),Ye=E(Ne),Ve=w(),Qe=d("div"),st=d("div"),vt=E(Xe),rt=w(),He=d("div"),Oe=E($e),ft=w(),qe=d("div"),Re=d("div"),ve=E(ze),Je=w(),be=d("div"),yt=E(We),Ke=w(),Ie=d("div"),kt=d("div"),ht=E(nt),Ot=w(),Te=d("div"),sn.c(),it=w(),en&&en.c(),De=w(),tt=d("div"),Ht=d("div"),Rn=d("h4"),xe=E(pn),lt=w(),an=d("div"),Wt.c(),Mt=w(),qt&&qt.c(),ls=w(),Tn=d("div"),Bt&&Bt.c(),zn=w(),tn&&tn.c(),It=w(),Pt&&Pt.c(),gn=w(),Dn=d("div"),un=d("div"),mn=d("div"),Pn=d("button"),Ln=E(Fn),os=w(),Ut=d("button"),Hn=E(Mn),Vn=w(),An=d("button"),kn=E(wn),rs=w(),St=d("div"),Yt&&Yt.c(),Xt=w(),Jt&&Jt.c(),qn=w(),cn&&cn.c(),as=w(),Kt&&Kt.c(),c(i,"id","modal-title"),c(i,"class","font-bold text-xl"),c(f,"class","btn btn-sm btn-ghost"),c(f,"title",h=t[24]("logs.detail.copyToClipboard")),c(_,"stroke-linecap","round"),c(_,"stroke-linejoin","round"),c(_,"stroke-width","2"),c(_,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),c(m,"xmlns","http://www.w3.org/2000/svg"),c(m,"class","h-4 w-4"),c(m,"fill","none"),c(m,"viewBox","0 0 24 24"),c(m,"stroke","currentColor"),c(k,"class","hidden md:inline"),c(g,"class","btn btn-sm btn-ghost"),c(g,"title",S=t[24]("logs.detail.downloadJson")),c(T,"class","btn btn-sm btn-circle btn-ghost"),c(u,"class","flex items-center gap-2"),c(s,"class","flex items-center justify-between px-6 py-4 border-b border-base-300"),c(D,"class","card-title text-base mb-3"),c(B,"class","text-xs opacity-60 mb-1"),c(G,"class",le="badge "+xh(t[0].status)+" badge-lg"),c(X,"class","text-xs opacity-60 mb-1"),c(ee,"class","badge badge-lg"),c(he,"class","text-xs opacity-60 mb-1"),c(me,"class",Ce="badge "+Rh(t[0].requestType)+" badge-lg"),c(me,"title",_e=t[24](\`logs.requestType_\${t[0].requestType}_desc\`)),c($,"class","text-xs opacity-60 mb-1"),c(re,"class","font-semibold"),c(st,"class","text-xs opacity-60 mb-1"),c(He,"class","text-sm"),c(Re,"class","text-xs opacity-60 mb-1"),c(be,"class","font-mono text-xs break-all"),c(qe,"class","col-span-2"),c(kt,"class","text-xs opacity-60 mb-1"),c(Te,"class","flex gap-2 flex-wrap"),c(Ie,"class","col-span-2 md:col-span-3 lg:col-span-6"),c(N,"class","grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4"),c(P,"class","card-body p-4"),c(x,"class","card bg-base-200"),c(Rn,"class","card-title text-base mb-3"),c(an,"class","space-y-2"),c(Ht,"class","card-body p-4"),c(tt,"class","card bg-base-200"),c(Tn,"class","grid grid-cols-1 md:grid-cols-2 gap-4"),c(Pn,"class",Un="tab "+(t[21]==="original"?"tab-active":"")),c(Ut,"class",hn="tab "+(t[21]==="transformed"?"tab-active":"")),c(An,"class",Wn="tab "+(t[21]==="response"?"tab-active":"")),c(mn,"class","tabs tabs-boxed bg-transparent p-2 border-b border-base-300"),c(St,"class","p-4"),c(un,"class","card-body p-0"),c(Dn,"class","card bg-base-200"),c(A,"class","flex-1 overflow-y-auto px-6 py-4 space-y-6"),c(n,"class","modal-box max-w-6xl h-[90vh] flex flex-col p-0"),c(n,"role","dialog"),c(n,"aria-labelledby","modal-title"),c(n,"aria-modal","true"),c(e,"class","modal modal-open"),c(e,"role","presentation")},m(Zt,Ue){H(Zt,e,Ue),a(e,n),a(n,s),a(s,i),a(i,o),a(s,r),a(s,u),a(u,f),Ct.m(f,null),a(u,p),a(u,g),a(g,m),a(m,_),a(g,b),a(g,k),a(k,y),a(u,C),a(u,T),a(n,O),a(n,A),a(A,x),a(x,P),a(P,D),a(D,R),a(P,U),a(P,N),a(N,z),a(z,B),a(B,F),a(z,W),a(z,G),a(G,Q),a(N,Z),a(N,V),a(V,X),a(X,oe),a(V,ne),a(V,ee),a(ee,K),a(N,q),a(N,ce),a(ce,he),a(he,we),a(ce,pe),a(ce,me),a(me,Se),a(N,Ae),a(N,ye),a(ye,$),a($,ae),a(ye,ge),a(ye,re),a(re,Ye),a(N,Ve),a(N,Qe),a(Qe,st),a(st,vt),a(Qe,rt),a(Qe,He),a(He,Oe),a(N,ft),a(N,qe),a(qe,Re),a(Re,ve),a(qe,Je),a(qe,be),a(be,yt),a(N,Ke),a(N,Ie),a(Ie,kt),a(kt,ht),a(Ie,Ot),a(Ie,Te),sn.m(Te,null),a(A,it),en&&en.m(A,null),a(A,De),a(A,tt),a(tt,Ht),a(Ht,Rn),a(Rn,xe),a(Ht,lt),a(Ht,an),Wt.m(an,null),a(an,Mt),qt&&qt.m(an,null),a(A,ls),a(A,Tn),Bt&&Bt.m(Tn,null),a(Tn,zn),tn&&tn.m(Tn,null),a(A,It),Pt&&Pt.m(A,null),a(A,gn),a(A,Dn),a(Dn,un),a(un,mn),a(mn,Pn),a(Pn,Ln),a(mn,os),a(mn,Ut),a(Ut,Hn),a(mn,Vn),a(mn,An),a(An,kn),a(un,rs),a(un,St),Yt&&Yt.m(St,null),a(St,Xt),Jt&&Jt.m(St,null),a(St,qn),cn&&cn.m(St,null),a(A,as),Kt&&Kt.m(A,null),ot||(es=[te(f,"click",t[29]),te(g,"click",t[30]),te(T,"click",function(){ui(t[1])&&t[1].apply(this,arguments)}),te(Pn,"click",t[32]),te(Ut,"click",t[33]),te(An,"click",t[34]),te(e,"click",t[28]),te(e,"keydown",t[35])],ot=!0)},p(Zt,Ue){t=Zt,Ue[0]&16777216&&l!==(l=t[24]("logs.detail.title")+"")&&M(o,l),xt===(xt=_s(t))&&Ct?Ct.p(t,Ue):(Ct.d(1),Ct=xt(t),Ct&&(Ct.c(),Ct.m(f,null))),Ue[0]&16777216&&h!==(h=t[24]("logs.detail.copyToClipboard"))&&c(f,"title",h),Ue[0]&16777216&&v!==(v=t[24]("logs.detail.downloadJson")+"")&&M(y,v),Ue[0]&16777216&&S!==(S=t[24]("logs.detail.downloadJson"))&&c(g,"title",S),Ue[0]&16777216&&I!==(I=t[24]("logs.detail.overview")+"")&&M(R,I),Ue[0]&16777216&&j!==(j=t[24]("logs.detail.status")+"")&&M(F,j),Ue[0]&1&&Y!==(Y=t[0].status+"")&&M(Q,Y),Ue[0]&1&&le!==(le="badge "+xh(t[0].status)+" badge-lg")&&c(G,"class",le),Ue[0]&16777216&&J!==(J=t[24]("logs.detail.method")+"")&&M(oe,J),Ue[0]&1&&se!==(se=t[0].method+"")&&M(K,se),Ue[0]&16777216&&ke!==(ke=t[24]("logs.requestType")+"")&&M(we,ke),Ue[0]&1&&Pe!==(Pe=t[25](t[0].requestType)+"")&&M(Se,Pe),Ue[0]&1&&Ce!==(Ce="badge "+Rh(t[0].requestType)+" badge-lg")&&c(me,"class",Ce),Ue[0]&16777217&&_e!==(_e=t[24](\`logs.requestType_\${t[0].requestType}_desc\`))&&c(me,"title",_e),Ue[0]&16777216&&ue!==(ue=t[24]("logs.detail.duration")+"")&&M(ae,ue),Ue[0]&1&&Ne!==(Ne=ai(t[0].duration)+"")&&M(Ye,Ne),Ue[0]&16777216&&Xe!==(Xe=t[24]("logs.detail.timestamp")+"")&&M(vt,Xe),Ue[0]&1&&$e!==($e=Oh(t[0].timestamp)+"")&&M(Oe,$e),Ue[0]&16777216&&ze!==(ze=t[24]("logs.detail.requestId")+"")&&M(ve,ze),Ue[0]&1&&We!==(We=t[0].requestId+"")&&M(yt,We),Ue[0]&16777216&&nt!==(nt=t[24]("logs.detail.processingSteps")+"")&&M(ht,nt),nn===(nn=$t(t))&&sn?sn.p(t,Ue):(sn.d(1),sn=nn(t),sn&&(sn.c(),sn.m(Te,null))),t[0].processingSteps&&t[0].processingSteps.length>0?en?en.p(hr(t),Ue):(en=nh(hr(t)),en.c(),en.m(A,De)):en&&(en.d(1),en=null),Ue[0]&16777216&&pn!==(pn=t[24]("logs.detail.requestInfo")+"")&&M(xe,pn),ts===(ts=Vt(t))&&Wt?Wt.p(t,Ue):(Wt.d(1),Wt=ts(t),Wt&&(Wt.c(),Wt.m(an,Mt))),t[0].query?qt?qt.p(t,Ue):(qt=hh(t),qt.c(),qt.m(an,null)):qt&&(qt.d(1),qt=null),t[0].routePath?Bt?Bt.p(t,Ue):(Bt=dh(t),Bt.c(),Bt.m(Tn,zn)):Bt&&(Bt.d(1),Bt=null),t[0].upstream?tn?tn.p(t,Ue):(tn=ph(t),tn.c(),tn.m(Tn,null)):tn&&(tn.d(1),tn=null),t[0].errorMessage?Pt?Pt.p(t,Ue):(Pt=mh(t),Pt.c(),Pt.m(A,gn)):Pt&&(Pt.d(1),Pt=null),Ue[0]&16777216&&Fn!==(Fn=t[24]("logs.detail.tabOriginalRequest")+"")&&M(Ln,Fn),Ue[0]&2097152&&Un!==(Un="tab "+(t[21]==="original"?"tab-active":""))&&c(Pn,"class",Un),Ue[0]&16777216&&Mn!==(Mn=t[24]("logs.detail.tabFinalRequest")+"")&&M(Hn,Mn),Ue[0]&2097152&&hn!==(hn="tab "+(t[21]==="transformed"?"tab-active":""))&&c(Ut,"class",hn),Ue[0]&16777216&&wn!==(wn=t[24]("logs.detail.tabResponse")+"")&&M(kn,wn),Ue[0]&2097152&&Wn!==(Wn="tab "+(t[21]==="response"?"tab-active":""))&&c(An,"class",Wn),t[21]==="original"?Yt?Yt.p(t,Ue):(Yt=bh(t),Yt.c(),Yt.m(St,Xt)):Yt&&(Yt.d(1),Yt=null),t[21]==="transformed"?Jt?Jt.p(t,Ue):(Jt=wh(t),Jt.c(),Jt.m(St,qn)):Jt&&(Jt.d(1),Jt=null),t[21]==="response"?cn?cn.p(t,Ue):(cn=Th(t),cn.c(),cn.m(St,null)):cn&&(cn.d(1),cn=null),t[0].authLevel?Kt?Kt.p(t,Ue):(Kt=Ah(t),Kt.c(),Kt.m(A,null)):Kt&&(Kt.d(1),Kt=null)},i:Ee,o:Ee,d(Zt){Zt&&L(e),Ct.d(),sn.d(),en&&en.d(),Wt.d(),qt&&qt.d(),Bt&&Bt.d(),tn&&tn.d(),Pt&&Pt.d(),Yt&&Yt.d(),Jt&&Jt.d(),cn&&cn.d(),Kt&&Kt.d(),ot=!1,at(es)}}}function Oh(t){return new Date(t).toLocaleString()}function ai(t){return t<1e3?\`\${t}ms\`:\`\${(t/1e3).toFixed(2)}s\`}function xh(t){return t<300?"badge-success":t<400?"badge-info":t<500?"badge-warning":"badge-error"}function Rh(t){return t==="final"?"badge-success":t==="retry"?"badge-warning":t==="recovery"?"badge-info":"badge-ghost"}function Yi(t){return JSON.stringify(t,null,2)}function t5(t){const e=t.toLowerCase();return e.includes("auth")?"bg-blue-500":e.includes("plugin")?"bg-purple-500":e.includes("upstream")||e.includes("proxy")||e.includes("selected")?"bg-green-500":e.includes("transform")||e.includes("rewrite")?"bg-orange-500":e.includes("error")||e.includes("failed")?"bg-red-500":e.includes("retry")||e.includes("recover")||e.includes("circuit")?"bg-yellow-500":"bg-base-content/30"}function n5(t){const e=t.toLowerCase();return e.includes("auth")?"Auth":e.includes("plugin")?"Plugin":e.includes("upstream")||e.includes("proxy")||e.includes("selected")?"Upstream":e.includes("transform")||e.includes("rewrite")?"Transform":e.includes("retry")||e.includes("recover")||e.includes("circuit")?"Retry":"Other"}function s5(t,e,n){let s;Gt(t,Et,ne=>n(24,s=ne));let{log:i}=e,{onClose:l}=e,o=null,r=null,u=!1,f=!1,h=null,p=null,g=!1,m=null,_=null,b=!1,k=!1,v=null,y=null,S=null,C=null,T=!1,O=!1,A=null,x=null,P="original",D=!1,I=!1;function R(ne){return ne?s(\`logs.requestType_\${ne}\`):"-"}function U(ne){const ee=\`logs.steps.\${ne}\`,se=s(ee);return se===ee?ne.split("_").map(K=>K.charAt(0).toUpperCase()+K.slice(1)).join(" "):se}function N(){if(!i.processingSteps||i.processingSteps.length===0)return{durations:[],relativeTime:[],totalDuration:0};const ne=i.processingSteps,ee=ne[0].timestamp,se=ne.map((ce,he)=>he===ne.length-1?i.duration-(ce.timestamp-ee):ne[he+1].timestamp-ce.timestamp),K=ne.map(ce=>ce.timestamp-ee),q=i.duration;return{durations:se,relativeTime:K,totalDuration:q}}function z(ne){ne.target===ne.currentTarget&&l()}async function B(){const ne={requestId:i.requestId,timestamp:i.timestamp,method:i.method,path:i.path,status:i.status,duration:i.duration,originalRequestHeaders:S,originalRequestBody:C,requestHeaders:m,requestBody:o,responseHeaders:_,responseBody:r,processingSteps:i.processingSteps};try{await navigator.clipboard.writeText(JSON.stringify(ne,null,2)),n(23,I=!0),setTimeout(()=>{n(23,I=!1)},2e3)}catch(ee){console.error("Failed to copy:",ee)}}async function j(){const ne={requestId:i.requestId,timestamp:i.timestamp,method:i.method,path:i.path,status:i.status,duration:i.duration,originalRequestHeaders:S,originalRequestBody:C,requestHeaders:m,requestBody:o,responseHeaders:_,responseBody:r,processingSteps:i.processingSteps},ee=new Blob([JSON.stringify(ne,null,2)],{type:"application/json"}),se=URL.createObjectURL(ee),K=document.createElement("a");K.href=se,K.download=\`log-\${i.requestId}.json\`,K.click(),URL.revokeObjectURL(se)}async function F(){if(!(!i.reqBodyId||o!==null)){n(4,u=!0),n(6,h=null);try{n(2,o=await or(i.reqBodyId))}catch(ne){n(6,h=ne instanceof Error?ne.message:"Failed to load request body")}finally{n(4,u=!1)}}}async function W(){if(!(!i.respBodyId||r!==null)){n(5,f=!0),n(7,p=null);try{n(3,r=await or(i.respBodyId))}catch(ne){n(7,p=ne instanceof Error?ne.message:"Failed to load response body")}finally{n(5,f=!1)}}}async function G(){if(!(!i.reqHeaderId||m!==null)){n(11,b=!0),n(13,v=null);try{n(9,m=await rr(i.reqHeaderId))}catch(ne){n(13,v=ne instanceof Error?ne.message:"Failed to load request headers")}finally{n(11,b=!1)}}}async function Y(){if(!(!i.respHeaderId||_!==null)){n(12,k=!0),n(14,y=null);try{n(10,_=await rr(i.respHeaderId))}catch(ne){n(14,y=ne instanceof Error?ne.message:"Failed to load response headers")}finally{n(12,k=!1)}}}async function Q(){if(!(!i.originalReqHeaderId||S!==null)){n(17,T=!0),n(19,A=null);try{n(15,S=await rr(i.originalReqHeaderId))}catch(ne){n(19,A=ne instanceof Error?ne.message:"Failed to load original request headers")}finally{n(17,T=!1)}}}async function le(){if(!(!i.originalReqBodyId||C!==null)){n(18,O=!0),n(20,x=null);try{n(16,C=await or(i.originalReqBodyId))}catch(ne){n(20,x=ne instanceof Error?ne.message:"Failed to load original request body")}finally{n(18,O=!1)}}}is(async()=>{try{const ne=await Ur();n(8,g=ne.logging?.body?.enabled||!1)}catch(ne){console.error("Failed to load config:",ne),n(8,g=!1)}i.originalReqHeaderId&&Q(),i.originalReqBodyId&&le(),i.reqHeaderId&&G(),i.respHeaderId&&Y(),i.reqBodyId&&F(),i.respBodyId&&W()});const Z=()=>n(22,D=!D),V=()=>n(21,P="original"),X=()=>n(21,P="transformed"),J=()=>n(21,P="response"),oe=ne=>ne.key==="Escape"&&l();return t.$$set=ne=>{"log"in ne&&n(0,i=ne.log),"onClose"in ne&&n(1,l=ne.onClose)},[i,l,o,r,u,f,h,p,g,m,_,b,k,v,y,S,C,T,O,A,x,P,D,I,s,R,U,N,z,B,j,Z,V,X,J,oe]}class i5 extends zt{constructor(e){super(),jt(this,e,s5,e5,Lt,{log:0,onClose:1},null,[-1,-1,-1])}}function Dh(t,e,n){const s=t.slice();return s[51]=e[n],s}function l5(t){let e,n,s,i,l=t[22]("logs.startStream")+"",o;return{c(){e=de("svg"),n=de("path"),s=de("path"),i=w(),o=E(l),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(r,u){H(r,e,u),a(e,n),a(e,s),H(r,i,u),H(r,o,u)},p(r,u){u[0]&4194304&&l!==(l=r[22]("logs.startStream")+"")&&M(o,l)},d(r){r&&(L(e),L(i),L(o))}}}function o5(t){let e,n,s,i,l=t[22]("logs.stopStream")+"",o;return{c(){e=de("svg"),n=de("path"),s=de("path"),i=w(),o=E(l),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M9 10a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-4z"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(r,u){H(r,e,u),a(e,n),a(e,s),H(r,i,u),H(r,o,u)},p(r,u){u[0]&4194304&&l!==(l=r[22]("logs.stopStream")+"")&&M(o,l)},d(r){r&&(L(e),L(i),L(o))}}}function Lh(t){let e,n,s,i=t[22]("logs.activeFilters")+"",l;return{c(){e=d("span"),n=E(t[21]),s=w(),l=E(i),c(e,"class","badge badge-primary badge-sm")},m(o,r){H(o,e,r),a(e,n),a(e,s),a(e,l)},p(o,r){r[0]&2097152&&M(n,o[21]),r[0]&4194304&&i!==(i=o[22]("logs.activeFilters")+"")&&M(l,i)},d(o){o&&L(e)}}}function Hh(t){let e,n,s,i=t[22]("logs.recentHours")+"",l,o,r,u,f;return{c(){e=d("div"),n=d("label"),s=d("span"),l=E(i),o=w(),r=d("input"),c(s,"class","label-text"),c(n,"class","label"),c(n,"for","logs-recent-hours"),c(r,"id","logs-recent-hours"),c(r,"type","number"),c(r,"min","1"),c(r,"class","input input-bordered input-sm"),c(e,"class","form-control")},m(h,p){H(h,e,p),a(e,n),a(n,s),a(s,l),a(e,o),a(e,r),ie(r,t[9]),u||(f=te(r,"input",t[40]),u=!0)},p(h,p){p[0]&4194304&&i!==(i=h[22]("logs.recentHours")+"")&&M(l,i),p[0]&512&&gt(r.value)!==h[9]&&ie(r,h[9])},d(h){h&&L(e),u=!1,f()}}}function Ih(t){let e,n,s,i=t[22]("logs.startTime")+"",l,o,r,u,f,h,p,g=t[22]("logs.endTime")+"",m,_,b,k,v;return{c(){e=d("div"),n=d("label"),s=d("span"),l=E(i),o=w(),r=d("input"),u=w(),f=d("div"),h=d("label"),p=d("span"),m=E(g),_=w(),b=d("input"),c(s,"class","label-text"),c(n,"class","label"),c(n,"for","logs-start-time"),c(r,"id","logs-start-time"),c(r,"type","datetime-local"),c(r,"class","input input-bordered input-sm"),c(e,"class","form-control"),c(p,"class","label-text"),c(h,"class","label"),c(h,"for","logs-end-time"),c(b,"id","logs-end-time"),c(b,"type","datetime-local"),c(b,"class","input input-bordered input-sm"),c(f,"class","form-control")},m(y,S){H(y,e,S),a(e,n),a(n,s),a(s,l),a(e,o),a(e,r),ie(r,t[10]),H(y,u,S),H(y,f,S),a(f,h),a(h,p),a(p,m),a(f,_),a(f,b),ie(b,t[11]),k||(v=[te(r,"input",t[41]),te(b,"input",t[42])],k=!0)},p(y,S){S[0]&4194304&&i!==(i=y[22]("logs.startTime")+"")&&M(l,i),S[0]&1024&&ie(r,y[10]),S[0]&4194304&&g!==(g=y[22]("logs.endTime")+"")&&M(m,g),S[0]&2048&&ie(b,y[11])},d(y){y&&(L(e),L(u),L(f)),k=!1,at(v)}}}function r5(t){let e,n,s,i,l,o,r,u=t[22]("logs.time")+"",f,h,p,g=t[22]("logs.method")+"",m,_,b,k=t[22]("logs.path")+"",v,y,S,C=t[22]("logs.status")+"",T,O,A,x=t[22]("logs.requestType")+"",P,D,I,R=t[22]("logs.duration")+"",U,N,z,B=t[22]("logs.upstream")+"",j,F,W,G=t[22]("logs.actions")+"",Y,Q,le,Z=[],V=new Map,X,J,oe,ne=t[22]("logs.showing",{values:{start:(t[0]-1)*oi+1,end:Math.min(t[0]*oi,t[13]),total:t[13]}})+"",ee,se,K,q,ce,he,ke,we,pe=t[22]("logs.page",{values:{page:t[0],totalPages:t[14]}})+"",me,Pe,Se,Ce,_e,Ae,ye,$=et(t[12]);const ue=ae=>ae[51].requestId;for(let ae=0;ae<$.length;ae+=1){let ge=Dh(t,$,ae),re=ue(ge);V.set(re,Z[ae]=Bh(re,ge))}return{c(){e=d("div"),n=d("div"),s=d("div"),i=d("table"),l=d("thead"),o=d("tr"),r=d("th"),f=E(u),h=w(),p=d("th"),m=E(g),_=w(),b=d("th"),v=E(k),y=w(),S=d("th"),T=E(C),O=w(),A=d("th"),P=E(x),D=w(),I=d("th"),U=E(R),N=w(),z=d("th"),j=E(B),F=w(),W=d("th"),Y=E(G),Q=w(),le=d("tbody");for(let ae=0;ae<Z.length;ae+=1)Z[ae].c();X=w(),J=d("div"),oe=d("div"),ee=E(ne),se=w(),K=d("div"),q=d("button"),ce=E("\xAB"),ke=w(),we=d("button"),me=E(pe),Pe=w(),Se=d("button"),Ce=E("\xBB"),c(i,"class","table table-zebra table-sm"),c(s,"class","overflow-x-auto"),c(oe,"class","text-sm"),c(q,"class","join-item btn btn-sm"),q.disabled=he=t[0]<=1,c(we,"class","join-item btn btn-sm"),c(Se,"class","join-item btn btn-sm"),Se.disabled=_e=t[0]>=t[14],c(K,"class","join"),c(J,"class","flex justify-between items-center p-4"),c(n,"class","card-body p-0"),c(e,"class","card bg-base-100 shadow-xl")},m(ae,ge){H(ae,e,ge),a(e,n),a(n,s),a(s,i),a(i,l),a(l,o),a(o,r),a(r,f),a(o,h),a(o,p),a(p,m),a(o,_),a(o,b),a(b,v),a(o,y),a(o,S),a(S,T),a(o,O),a(o,A),a(A,P),a(o,D),a(o,I),a(I,U),a(o,N),a(o,z),a(z,j),a(o,F),a(o,W),a(W,Y),a(i,Q),a(i,le);for(let re=0;re<Z.length;re+=1)Z[re]&&Z[re].m(le,null);a(n,X),a(n,J),a(J,oe),a(oe,ee),a(J,se),a(J,K),a(K,q),a(q,ce),a(K,ke),a(K,we),a(we,me),a(K,Pe),a(K,Se),a(Se,Ce),Ae||(ye=[te(q,"click",t[46]),te(Se,"click",t[47])],Ae=!0)},p(ae,ge){ge[0]&4194304&&u!==(u=ae[22]("logs.time")+"")&&M(f,u),ge[0]&4194304&&g!==(g=ae[22]("logs.method")+"")&&M(m,g),ge[0]&4194304&&k!==(k=ae[22]("logs.path")+"")&&M(v,k),ge[0]&4194304&&C!==(C=ae[22]("logs.status")+"")&&M(T,C),ge[0]&4194304&&x!==(x=ae[22]("logs.requestType")+"")&&M(P,x),ge[0]&4194304&&R!==(R=ae[22]("logs.duration")+"")&&M(U,R),ge[0]&4194304&&B!==(B=ae[22]("logs.upstream")+"")&&M(j,B),ge[0]&4194304&&G!==(G=ae[22]("logs.actions")+"")&&M(Y,G),ge[0]&104861696&&($=et(ae[12]),Z=Ir(Z,ge,ue,1,ae,$,V,le,ig,Bh,null,Dh)),ge[0]&4202497&&ne!==(ne=ae[22]("logs.showing",{values:{start:(ae[0]-1)*oi+1,end:Math.min(ae[0]*oi,ae[13]),total:ae[13]}})+"")&&M(ee,ne),ge[0]&1&&he!==(he=ae[0]<=1)&&(q.disabled=he),ge[0]&4210689&&pe!==(pe=ae[22]("logs.page",{values:{page:ae[0],totalPages:ae[14]}})+"")&&M(me,pe),ge[0]&16385&&_e!==(_e=ae[0]>=ae[14])&&(Se.disabled=_e)},d(ae){ae&&L(e);for(let ge=0;ge<Z.length;ge+=1)Z[ge].d();Ae=!1,at(ye)}}}function a5(t){let e,n,s,i,l,o=t[22]("logs.noData")+"",r;return{c(){e=d("div"),n=de("svg"),s=de("path"),i=w(),l=d("span"),r=E(o),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(n,"class","stroke-current shrink-0 w-6 h-6"),c(e,"class","alert alert-info")},m(u,f){H(u,e,f),a(e,n),a(n,s),a(e,i),a(e,l),a(l,r)},p(u,f){f[0]&4194304&&o!==(o=u[22]("logs.noData")+"")&&M(r,o)},d(u){u&&L(e)}}}function u5(t){let e,n,s,i,l,o=t[22]("common.error")+"",r,u,f;return{c(){e=d("div"),n=de("svg"),s=de("path"),i=w(),l=d("span"),r=E(o),u=E(": "),f=E(t[16]),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-6 w-6"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(e,"class","alert alert-error")},m(h,p){H(h,e,p),a(e,n),a(n,s),a(e,i),a(e,l),a(l,r),a(l,u),a(l,f)},p(h,p){p[0]&4194304&&o!==(o=h[22]("common.error")+"")&&M(r,o),p[0]&65536&&M(f,h[16])},d(h){h&&L(e)}}}function c5(t){let e;return{c(){e=d("div"),e.innerHTML='<span class="loading loading-spinner loading-lg"></span>',c(e,"class","flex justify-center items-center h-64")},m(n,s){H(n,e,s)},p:Ee,d(n){n&&L(e)}}}function Bh(t,e){let n,s,i=Nh(e[51].timestamp)+"",l,o,r,u,f=e[51].method+"",h,p,g,m=e[51].path+"",_,b,k,v,y,S=e[51].status+"",C,T,O,A,x,P=e[26](e[51].requestType)+"",D,I,R,U,N,z=jh(e[51].duration)+"",B,j,F,W=(e[51].upstream||"-")+"",G,Y,Q,le,Z,V=e[22]("logs.viewDetail")+"",X,J,oe,ne;function ee(){return e[45](e[51])}return{key:t,first:null,c(){n=d("tr"),s=d("td"),l=E(i),o=w(),r=d("td"),u=d("span"),h=E(f),p=w(),g=d("td"),_=E(m),k=w(),v=d("td"),y=d("span"),C=E(S),O=w(),A=d("td"),x=d("span"),D=E(P),U=w(),N=d("td"),B=E(z),j=w(),F=d("td"),G=E(W),Q=w(),le=d("td"),Z=d("button"),X=E(V),J=w(),c(s,"class","text-xs"),c(u,"class","badge badge-sm"),c(g,"class","font-mono text-xs truncate max-w-xs"),c(g,"title",b=e[51].path),c(y,"class",T="badge badge-sm "+zh(e[51].status)),c(x,"class",I="badge badge-sm "+Uh(e[51].requestType)),c(x,"title",R=e[22](\`logs.requestType_\${e[51].requestType}_desc\`)),c(N,"class","text-xs"),c(F,"class","text-xs truncate max-w-xs"),c(F,"title",Y=e[51].upstream||"-"),c(Z,"class","btn btn-xs btn-ghost"),c(n,"class","hover"),this.first=n},m(se,K){H(se,n,K),a(n,s),a(s,l),a(n,o),a(n,r),a(r,u),a(u,h),a(n,p),a(n,g),a(g,_),a(n,k),a(n,v),a(v,y),a(y,C),a(n,O),a(n,A),a(A,x),a(x,D),a(n,U),a(n,N),a(N,B),a(n,j),a(n,F),a(F,G),a(n,Q),a(n,le),a(le,Z),a(Z,X),a(n,J),oe||(ne=te(Z,"click",ee),oe=!0)},p(se,K){e=se,K[0]&4096&&i!==(i=Nh(e[51].timestamp)+"")&&M(l,i),K[0]&4096&&f!==(f=e[51].method+"")&&M(h,f),K[0]&4096&&m!==(m=e[51].path+"")&&M(_,m),K[0]&4096&&b!==(b=e[51].path)&&c(g,"title",b),K[0]&4096&&S!==(S=e[51].status+"")&&M(C,S),K[0]&4096&&T!==(T="badge badge-sm "+zh(e[51].status))&&c(y,"class",T),K[0]&4096&&P!==(P=e[26](e[51].requestType)+"")&&M(D,P),K[0]&4096&&I!==(I="badge badge-sm "+Uh(e[51].requestType))&&c(x,"class",I),K[0]&4198400&&R!==(R=e[22](\`logs.requestType_\${e[51].requestType}_desc\`))&&c(x,"title",R),K[0]&4096&&z!==(z=jh(e[51].duration)+"")&&M(B,z),K[0]&4096&&W!==(W=(e[51].upstream||"-")+"")&&M(G,W),K[0]&4096&&Y!==(Y=e[51].upstream||"-")&&c(F,"title",Y),K[0]&4194304&&V!==(V=e[22]("logs.viewDetail")+"")&&M(X,V)},d(se){se&&L(n),oe=!1,ne()}}}function Fh(t){let e,n;return e=new i5({props:{log:t[17],onClose:t[48]}}),{c(){pt(e.$$.fragment)},m(s,i){ut(e,s,i),n=!0},p(s,i){const l={};i[0]&131072&&(l.log=s[17]),i[0]&393216&&(l.onClose=s[48]),e.$set(l)},i(s){n||(Be(e.$$.fragment,s),n=!0)},o(s){Fe(e.$$.fragment,s),n=!1},d(s){ct(e,s)}}}function f5(t){let e,n,s,i=t[22]("logs.title")+"",l,o,r,u,f,h,p,g,m,_,b,k=t[22]("logs.export")+"",v,y,S,C,T,O,A,x,P,D,I,R,U,N,z=t[22]("logs.filters")+"",B,j,F,W,G=t[22]("logs.clearFilters")+"",Y,Q,le,Z,V,X,J,oe=t[22]("logs.searchTerm")+"",ne,ee,se,K,q,ce,he,ke,we=t[22]("logs.method")+"",pe,me,Pe,Se,Ce=t[22]("logs.allMethods")+"",_e,Ae,ye,$,ue,ae,ge,re,Ne,Ye,Ve=t[22]("logs.status")+"",Qe,st,Xe,vt,rt,He,$e,Oe,ft=t[22]("logs.result")+"",qe,Re,ze,ve,Je=t[22]("logs.allResults")+"",be,We,yt=t[22]("logs.success")+"",Ke,Ie,kt=t[22]("logs.failed")+"",nt,ht,Ot,Te,it,De,tt=t[22]("logs.advancedFilters")+"",Ht,Rn,pn,xe,lt,an,Mt,ls=t[22]("logs.requestTypeFilter")+"",Tn,zn,It,gn,Dn=t[22]("logs.requestType_all")+"",un,mn,Pn=t[22]("logs.requestType_final")+"",Fn,Ln,Un=t[22]("logs.requestType_retry")+"",os,Ut,Mn=t[22]("logs.requestType_recovery")+"",Hn,hn,Vn,An,wn,kn=t[22]("logs.timeRange")+"",Wn,rs,St,Xt,qn=t[22]("logs.allTime")+"",as,ot,es=t[22]("logs.recentTime")+"",_s,xt,Ct=t[22]("logs.customTime")+"",$t,nn,sn,en,Vt,ts,Wt,qt=t[22]("logs.sortBy")+"",Bt,tn,Pt,Yt,Jt=t[22]("logs.sortByTimestamp")+"",cn,Kt,Zt=t[22]("logs.sortByDuration")+"",Ue,ln,bn=t[22]("logs.sortByStatus")+"",fe,Le,Qt,vs,ys,Gn=t[22]("logs.sortOrder")+"",ns,_n,Xn,As,js=t[22]("logs.desc")+"",gi,Os,mi=t[22]("logs.asc")+"",In,Nn,je,Ze,mt,jo,va;function ya(Me,Ge){return Me[19]?o5:l5}let Il=ya(t),xs=Il(t),us=t[21]>0&&Lh(t),cs=t[8]==="recent"&&Hh(t),fs=t[8]==="custom"&&Ih(t);function wa(Me,Ge){return Me[15]&&Me[12].length===0?c5:Me[16]?u5:Me[12].length===0?a5:r5}let Bl=wa(t),Rs=Bl(t),Bn=t[18]&&t[17]&&Fh(t);return{c(){e=d("div"),n=d("div"),s=d("h1"),l=E(i),o=w(),r=d("div"),u=d("button"),xs.c(),h=w(),p=d("div"),g=d("div"),m=de("svg"),_=de("path"),b=w(),v=E(k),y=w(),S=d("ul"),C=d("li"),T=d("button"),T.textContent="JSON",O=w(),A=d("li"),x=d("button"),x.textContent="CSV",P=w(),D=d("div"),I=d("div"),R=d("div"),U=d("div"),N=d("h2"),B=E(z),j=w(),us&&us.c(),F=w(),W=d("button"),Y=E(G),le=w(),Z=d("div"),V=d("div"),X=d("label"),J=d("span"),ne=E(oe),ee=w(),se=d("input"),q=w(),ce=d("div"),he=d("label"),ke=d("span"),pe=E(we),me=w(),Pe=d("select"),Se=d("option"),_e=E(Ce),Ae=d("option"),Ae.textContent="GET",ye=d("option"),ye.textContent="POST",$=d("option"),$.textContent="PUT",ue=d("option"),ue.textContent="DELETE",ae=d("option"),ae.textContent="PATCH",ge=w(),re=d("div"),Ne=d("label"),Ye=d("span"),Qe=E(Ve),st=w(),Xe=d("input"),rt=w(),He=d("div"),$e=d("label"),Oe=d("span"),qe=E(ft),Re=w(),ze=d("select"),ve=d("option"),be=E(Je),We=d("option"),Ke=E(yt),Ie=d("option"),nt=E(kt),ht=w(),Ot=d("div"),Te=d("input"),it=w(),De=d("div"),Ht=E(tt),Rn=w(),pn=d("div"),xe=d("div"),lt=d("div"),an=d("label"),Mt=d("span"),Tn=E(ls),zn=w(),It=d("select"),gn=d("option"),un=E(Dn),mn=d("option"),Fn=E(Pn),Ln=d("option"),os=E(Un),Ut=d("option"),Hn=E(Mn),hn=w(),Vn=d("div"),An=d("label"),wn=d("span"),Wn=E(kn),rs=w(),St=d("select"),Xt=d("option"),as=E(qn),ot=d("option"),_s=E(es),xt=d("option"),$t=E(Ct),nn=w(),cs&&cs.c(),sn=w(),fs&&fs.c(),en=w(),Vt=d("div"),ts=d("label"),Wt=d("span"),Bt=E(qt),tn=w(),Pt=d("select"),Yt=d("option"),cn=E(Jt),Kt=d("option"),Ue=E(Zt),ln=d("option"),fe=E(bn),Le=w(),Qt=d("div"),vs=d("label"),ys=d("span"),ns=E(Gn),_n=w(),Xn=d("select"),As=d("option"),gi=E(js),Os=d("option"),In=E(mi),Nn=w(),Rs.c(),je=w(),Bn&&Bn.c(),Ze=$n(),c(s,"class","text-3xl font-bold"),c(u,"class",f="btn btn-sm "+(t[19]?"btn-error":"btn-primary")),c(_,"stroke-linecap","round"),c(_,"stroke-linejoin","round"),c(_,"stroke-width","2"),c(_,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),c(m,"xmlns","http://www.w3.org/2000/svg"),c(m,"class","h-4 w-4"),c(m,"fill","none"),c(m,"viewBox","0 0 24 24"),c(m,"stroke","currentColor"),c(g,"role","button"),c(g,"tabindex","0"),c(g,"class","btn btn-sm btn-secondary"),c(S,"role","menu"),c(S,"tabindex","0"),c(S,"class","dropdown-content menu p-2 shadow bg-base-100 rounded-box w-32 top-[3em]"),c(p,"class","dropdown dropdown-end z-[1]"),c(r,"class","flex gap-2"),c(n,"class","flex justify-between items-center mb-6"),c(N,"class","card-title text-lg"),c(U,"class","flex items-center gap-2"),c(W,"class","btn btn-sm btn-ghost"),W.disabled=Q=t[21]===0,c(R,"class","flex justify-between items-center mb-4"),c(J,"class","label-text"),c(X,"class","label"),c(X,"for","logs-search"),c(se,"id","logs-search"),c(se,"type","text"),c(se,"placeholder",K=t[22]("logs.searchPlaceholder")),c(se,"class","input input-bordered input-sm"),c(V,"class","form-control"),c(ke,"class","label-text"),c(he,"class","label"),c(he,"for","logs-method"),Se.__value="",ie(Se,Se.__value),Ae.__value="GET",ie(Ae,Ae.__value),ye.__value="POST",ie(ye,ye.__value),$.__value="PUT",ie($,$.__value),ue.__value="DELETE",ie(ue,ue.__value),ae.__value="PATCH",ie(ae,ae.__value),c(Pe,"id","logs-method"),c(Pe,"class","select select-bordered select-sm"),t[2]===void 0&&bs(()=>t[34].call(Pe)),c(ce,"class","form-control"),c(Ye,"class","label-text"),c(Ne,"class","label"),c(Ne,"for","logs-status"),c(Xe,"id","logs-status"),c(Xe,"type","text"),c(Xe,"placeholder",vt=t[22]("logs.statusPlaceholder")),c(Xe,"class","input input-bordered input-sm"),c(re,"class","form-control"),c(Oe,"class","label-text"),c($e,"class","label"),c($e,"for","logs-result"),ve.__value=void 0,ie(ve,ve.__value),We.__value=!0,ie(We,We.__value),Ie.__value=!1,ie(Ie,Ie.__value),c(ze,"id","logs-result"),c(ze,"class","select select-bordered select-sm"),t[4]===void 0&&bs(()=>t[36].call(ze)),c(He,"class","form-control"),c(Z,"class","grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-4"),c(Te,"type","checkbox"),c(Te,"class","peer"),c(De,"class","collapse-title text-sm font-medium"),c(Mt,"class","label-text"),c(an,"class","label"),c(an,"for","logs-request-type"),gn.__value="",ie(gn,gn.__value),mn.__value="final",ie(mn,mn.__value),Ln.__value="retry",ie(Ln,Ln.__value),Ut.__value="recovery",ie(Ut,Ut.__value),c(It,"id","logs-request-type"),c(It,"class","select select-bordered select-sm"),t[5]===void 0&&bs(()=>t[38].call(It)),c(lt,"class","form-control"),c(wn,"class","label-text"),c(An,"class","label"),c(An,"for","logs-time-range"),Xt.__value="all",ie(Xt,Xt.__value),ot.__value="recent",ie(ot,ot.__value),xt.__value="custom",ie(xt,xt.__value),c(St,"id","logs-time-range"),c(St,"class","select select-bordered select-sm"),t[8]===void 0&&bs(()=>t[39].call(St)),c(Vn,"class","form-control"),c(Wt,"class","label-text"),c(ts,"class","label"),c(ts,"for","logs-sort-by"),Yt.__value="timestamp",ie(Yt,Yt.__value),Kt.__value="duration",ie(Kt,Kt.__value),ln.__value="status",ie(ln,ln.__value),c(Pt,"id","logs-sort-by"),c(Pt,"class","select select-bordered select-sm"),t[6]===void 0&&bs(()=>t[43].call(Pt)),c(Vt,"class","form-control"),c(ys,"class","label-text"),c(vs,"class","label"),c(vs,"for","logs-sort-order"),As.__value="desc",ie(As,As.__value),Os.__value="asc",ie(Os,Os.__value),c(Xn,"id","logs-sort-order"),c(Xn,"class","select select-bordered select-sm"),t[7]===void 0&&bs(()=>t[44].call(Xn)),c(Qt,"class","form-control"),c(xe,"class","grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 pt-4"),c(pn,"class","collapse-content"),c(Ot,"class","collapse collapse-arrow bg-base-200"),c(I,"class","card-body"),c(D,"class","card bg-base-100 shadow-xl mb-6"),c(e,"class","p-6")},m(Me,Ge){H(Me,e,Ge),a(e,n),a(n,s),a(s,l),a(n,o),a(n,r),a(r,u),xs.m(u,null),a(r,h),a(r,p),a(p,g),a(g,m),a(m,_),a(g,b),a(g,v),a(p,y),a(p,S),a(S,C),a(C,T),a(S,O),a(S,A),a(A,x),a(e,P),a(e,D),a(D,I),a(I,R),a(R,U),a(U,N),a(N,B),a(U,j),us&&us.m(U,null),a(R,F),a(R,W),a(W,Y),a(I,le),a(I,Z),a(Z,V),a(V,X),a(X,J),a(J,ne),a(V,ee),a(V,se),ie(se,t[1]),a(Z,q),a(Z,ce),a(ce,he),a(he,ke),a(ke,pe),a(ce,me),a(ce,Pe),a(Pe,Se),a(Se,_e),a(Pe,Ae),a(Pe,ye),a(Pe,$),a(Pe,ue),a(Pe,ae),Cn(Pe,t[2],!0),a(Z,ge),a(Z,re),a(re,Ne),a(Ne,Ye),a(Ye,Qe),a(re,st),a(re,Xe),ie(Xe,t[3]),a(Z,rt),a(Z,He),a(He,$e),a($e,Oe),a(Oe,qe),a(He,Re),a(He,ze),a(ze,ve),a(ve,be),a(ze,We),a(We,Ke),a(ze,Ie),a(Ie,nt),Cn(ze,t[4],!0),a(I,ht),a(I,Ot),a(Ot,Te),Te.checked=t[20],a(Ot,it),a(Ot,De),a(De,Ht),a(Ot,Rn),a(Ot,pn),a(pn,xe),a(xe,lt),a(lt,an),a(an,Mt),a(Mt,Tn),a(lt,zn),a(lt,It),a(It,gn),a(gn,un),a(It,mn),a(mn,Fn),a(It,Ln),a(Ln,os),a(It,Ut),a(Ut,Hn),Cn(It,t[5],!0),a(xe,hn),a(xe,Vn),a(Vn,An),a(An,wn),a(wn,Wn),a(Vn,rs),a(Vn,St),a(St,Xt),a(Xt,as),a(St,ot),a(ot,_s),a(St,xt),a(xt,$t),Cn(St,t[8],!0),a(xe,nn),cs&&cs.m(xe,null),a(xe,sn),fs&&fs.m(xe,null),a(xe,en),a(xe,Vt),a(Vt,ts),a(ts,Wt),a(Wt,Bt),a(Vt,tn),a(Vt,Pt),a(Pt,Yt),a(Yt,cn),a(Pt,Kt),a(Kt,Ue),a(Pt,ln),a(ln,fe),Cn(Pt,t[6],!0),a(xe,Le),a(xe,Qt),a(Qt,vs),a(vs,ys),a(ys,ns),a(Qt,_n),a(Qt,Xn),a(Xn,As),a(As,gi),a(Xn,Os),a(Os,In),Cn(Xn,t[7],!0),a(e,Nn),Rs.m(e,null),H(Me,je,Ge),Bn&&Bn.m(Me,Ge),H(Me,Ze,Ge),mt=!0,jo||(va=[te(u,"click",t[24]),te(T,"click",t[31]),te(x,"click",t[32]),te(W,"click",t[27]),te(se,"input",t[33]),te(Pe,"change",t[34]),te(Xe,"input",t[35]),te(ze,"change",t[36]),te(Te,"change",t[37]),te(Te,"change",t[28]),te(It,"change",t[38]),te(St,"change",t[39]),te(Pt,"change",t[43]),te(Xn,"change",t[44])],jo=!0)},p(Me,Ge){(!mt||Ge[0]&4194304)&&i!==(i=Me[22]("logs.title")+"")&&M(l,i),Il===(Il=ya(Me))&&xs?xs.p(Me,Ge):(xs.d(1),xs=Il(Me),xs&&(xs.c(),xs.m(u,null))),(!mt||Ge[0]&524288&&f!==(f="btn btn-sm "+(Me[19]?"btn-error":"btn-primary")))&&c(u,"class",f),(!mt||Ge[0]&4194304)&&k!==(k=Me[22]("logs.export")+"")&&M(v,k),(!mt||Ge[0]&4194304)&&z!==(z=Me[22]("logs.filters")+"")&&M(B,z),Me[21]>0?us?us.p(Me,Ge):(us=Lh(Me),us.c(),us.m(U,null)):us&&(us.d(1),us=null),(!mt||Ge[0]&4194304)&&G!==(G=Me[22]("logs.clearFilters")+"")&&M(Y,G),(!mt||Ge[0]&2097152&&Q!==(Q=Me[21]===0))&&(W.disabled=Q),(!mt||Ge[0]&4194304)&&oe!==(oe=Me[22]("logs.searchTerm")+"")&&M(ne,oe),(!mt||Ge[0]&4194304&&K!==(K=Me[22]("logs.searchPlaceholder")))&&c(se,"placeholder",K),Ge[0]&2&&se.value!==Me[1]&&ie(se,Me[1]),(!mt||Ge[0]&4194304)&&we!==(we=Me[22]("logs.method")+"")&&M(pe,we),(!mt||Ge[0]&4194304)&&Ce!==(Ce=Me[22]("logs.allMethods")+"")&&M(_e,Ce),Ge[0]&4&&Cn(Pe,Me[2]),(!mt||Ge[0]&4194304)&&Ve!==(Ve=Me[22]("logs.status")+"")&&M(Qe,Ve),(!mt||Ge[0]&4194304&&vt!==(vt=Me[22]("logs.statusPlaceholder")))&&c(Xe,"placeholder",vt),Ge[0]&8&&Xe.value!==Me[3]&&ie(Xe,Me[3]),(!mt||Ge[0]&4194304)&&ft!==(ft=Me[22]("logs.result")+"")&&M(qe,ft),(!mt||Ge[0]&4194304)&&Je!==(Je=Me[22]("logs.allResults")+"")&&M(be,Je),(!mt||Ge[0]&4194304)&&yt!==(yt=Me[22]("logs.success")+"")&&M(Ke,yt),(!mt||Ge[0]&4194304)&&kt!==(kt=Me[22]("logs.failed")+"")&&M(nt,kt),Ge[0]&16&&Cn(ze,Me[4]),Ge[0]&1048576&&(Te.checked=Me[20]),(!mt||Ge[0]&4194304)&&tt!==(tt=Me[22]("logs.advancedFilters")+"")&&M(Ht,tt),(!mt||Ge[0]&4194304)&&ls!==(ls=Me[22]("logs.requestTypeFilter")+"")&&M(Tn,ls),(!mt||Ge[0]&4194304)&&Dn!==(Dn=Me[22]("logs.requestType_all")+"")&&M(un,Dn),(!mt||Ge[0]&4194304)&&Pn!==(Pn=Me[22]("logs.requestType_final")+"")&&M(Fn,Pn),(!mt||Ge[0]&4194304)&&Un!==(Un=Me[22]("logs.requestType_retry")+"")&&M(os,Un),(!mt||Ge[0]&4194304)&&Mn!==(Mn=Me[22]("logs.requestType_recovery")+"")&&M(Hn,Mn),Ge[0]&32&&Cn(It,Me[5]),(!mt||Ge[0]&4194304)&&kn!==(kn=Me[22]("logs.timeRange")+"")&&M(Wn,kn),(!mt||Ge[0]&4194304)&&qn!==(qn=Me[22]("logs.allTime")+"")&&M(as,qn),(!mt||Ge[0]&4194304)&&es!==(es=Me[22]("logs.recentTime")+"")&&M(_s,es),(!mt||Ge[0]&4194304)&&Ct!==(Ct=Me[22]("logs.customTime")+"")&&M($t,Ct),Ge[0]&256&&Cn(St,Me[8]),Me[8]==="recent"?cs?cs.p(Me,Ge):(cs=Hh(Me),cs.c(),cs.m(xe,sn)):cs&&(cs.d(1),cs=null),Me[8]==="custom"?fs?fs.p(Me,Ge):(fs=Ih(Me),fs.c(),fs.m(xe,en)):fs&&(fs.d(1),fs=null),(!mt||Ge[0]&4194304)&&qt!==(qt=Me[22]("logs.sortBy")+"")&&M(Bt,qt),(!mt||Ge[0]&4194304)&&Jt!==(Jt=Me[22]("logs.sortByTimestamp")+"")&&M(cn,Jt),(!mt||Ge[0]&4194304)&&Zt!==(Zt=Me[22]("logs.sortByDuration")+"")&&M(Ue,Zt),(!mt||Ge[0]&4194304)&&bn!==(bn=Me[22]("logs.sortByStatus")+"")&&M(fe,bn),Ge[0]&64&&Cn(Pt,Me[6]),(!mt||Ge[0]&4194304)&&Gn!==(Gn=Me[22]("logs.sortOrder")+"")&&M(ns,Gn),(!mt||Ge[0]&4194304)&&js!==(js=Me[22]("logs.desc")+"")&&M(gi,js),(!mt||Ge[0]&4194304)&&mi!==(mi=Me[22]("logs.asc")+"")&&M(In,mi),Ge[0]&128&&Cn(Xn,Me[7]),Bl===(Bl=wa(Me))&&Rs?Rs.p(Me,Ge):(Rs.d(1),Rs=Bl(Me),Rs&&(Rs.c(),Rs.m(e,null))),Me[18]&&Me[17]?Bn?(Bn.p(Me,Ge),Ge[0]&393216&&Be(Bn,1)):(Bn=Fh(Me),Bn.c(),Be(Bn,1),Bn.m(Ze.parentNode,Ze)):Bn&&(gs(),Fe(Bn,1,1,()=>{Bn=null}),ms())},i(Me){mt||(Be(Bn),mt=!0)},o(Me){Fe(Bn),mt=!1},d(Me){Me&&(L(e),L(je),L(Ze)),xs.d(),us&&us.d(),cs&&cs.d(),fs&&fs.d(),Rs.d(),Bn&&Bn.d(Me),jo=!1,at(va)}}}let oi=50;function Nh(t){return new Date(t).toLocaleString()}function jh(t){return t<1e3?\`\${t}ms\`:\`\${(t/1e3).toFixed(2)}s\`}function zh(t){return t<300?"badge-success":t<400?"badge-info":t<500?"badge-warning":"badge-error"}function Uh(t){return t==="final"?"badge-success":t==="retry"?"badge-warning":t==="recovery"?"badge-info":"badge-ghost"}function h5(t,e,n){let s,i;Gt(t,Et,pe=>n(22,i=pe));let l=1,o="",r="",u="",f,h="",p="timestamp",g="desc",m="recent",_=1,b="",k="",v=[],y=0,S=0,C=!0,T=null,O=null,A=!1,x=!1,P=null,D="",I="",R=!1;async function U(){try{n(15,C=!0),n(16,T=null);const pe={page:l,limit:oi,sortBy:p,sortOrder:g};o.trim()&&(pe.searchTerm=o.trim()),r&&(pe.method=r),u&&(pe.status=parseInt(u)),f!==void 0&&(pe.success=f),h&&(pe.requestType=h),m==="recent"?(pe.endTime=Date.now(),pe.startTime=Date.now()-_*60*60*1e3):m==="custom"&&(b&&(pe.startTime=new Date(b).getTime()),k&&(pe.endTime=new Date(k).getTime()));const me=await bv(pe);n(12,v=me.data),n(13,y=me.total),n(14,S=me.totalPages)}catch(pe){n(16,T=pe.message)}finally{n(15,C=!1)}}async function N(pe){try{const me={};o.trim()&&(me.searchTerm=o.trim()),r&&(me.method=r),u&&(me.status=parseInt(u)),f!==void 0&&(me.success=f),h&&(me.requestType=h),m==="recent"?(me.endTime=Date.now(),me.startTime=Date.now()-_*60*60*1e3):m==="custom"&&(b&&(me.startTime=new Date(b).getTime()),k&&(me.endTime=new Date(k).getTime()));const Pe=await _v(me,pe),Se=URL.createObjectURL(Pe),Ce=document.createElement("a");Ce.href=Se,Ce.download=\`access-logs-\${Date.now()}.\${pe}\`,Ce.click(),URL.revokeObjectURL(Se)}catch(me){alert(\`Export failed: \${me.message}\`)}}function z(){x?(P&&(P.close(),P=null),n(19,x=!1)):(P=vv(1e3),P.onmessage=pe=>{const me=JSON.parse(pe.data);n(12,v=[me,...v]),v.length>oi&&n(12,v=v.slice(0,oi))},P.onerror=()=>{console.error("Stream connection error"),z()},n(19,x=!0))}function B(pe){n(17,O=pe),n(18,A=!0)}function j(pe){return pe?i(\`logs.requestType_\${pe}\`):"-"}function F(){n(1,o=""),n(2,r=""),n(3,u=""),n(4,f=void 0),n(5,h=""),n(8,m="recent"),n(9,_=1),n(10,b=""),n(11,k=""),n(6,p="timestamp"),n(7,g="desc"),n(0,l=1)}function W(){localStorage.setItem("logsAdvancedFiltersExpanded",String(R))}is(()=>{const pe=localStorage.getItem("logsAdvancedFiltersExpanded");pe!==null&&n(20,R=pe==="true"),U(),z()}),Ai(()=>{P&&P.close()});const G=()=>N("json"),Y=()=>N("csv");function Q(){o=this.value,n(1,o)}function le(){r=Is(this),n(2,r)}function Z(){u=this.value,n(3,u)}function V(){f=Is(this),n(4,f)}function X(){R=this.checked,n(20,R)}function J(){h=Is(this),n(5,h)}function oe(){m=Is(this),n(8,m)}function ne(){_=gt(this.value),n(9,_)}function ee(){b=this.value,n(10,b)}function se(){k=this.value,n(11,k)}function K(){p=Is(this),n(6,p)}function q(){g=Is(this),n(7,g)}const ce=pe=>B(pe),he=()=>n(0,l=l-1),ke=()=>n(0,l=l+1),we=()=>{n(18,A=!1),n(17,O=null)};return t.$$.update=()=>{if(t.$$.dirty[0]&1022&&n(21,s=[o.trim(),r,u,f!==void 0,h,m!=="all"&&m!=="recent"||_!==1,p!=="timestamp"||g!=="desc"].filter(Boolean).length),t.$$.dirty[0]&536871934){const pe=JSON.stringify({limit:oi,searchTerm:o,method:r,statusFilter:u,successFilter:f,requestTypeFilter:h,sortBy:p,sortOrder:g,timeRangeType:m,recentHours:_});D&&pe!==D&&n(0,l=1),n(29,D=pe)}if(t.$$.dirty[0]&1073745152){const pe=JSON.stringify({customStartTime:b,customEndTime:k});m==="custom"&&I&&pe!==I&&n(0,l=1),n(30,I=pe)}t.$$.dirty[0]&4095&&U()},[l,o,r,u,f,h,p,g,m,_,b,k,v,y,S,C,T,O,A,x,R,s,i,N,z,B,j,F,W,D,I,G,Y,Q,le,Z,V,X,J,oe,ne,ee,se,K,q,ce,he,ke,we]}class d5 extends zt{constructor(e){super(),jt(this,e,h5,f5,Lt,{},null,[-1,-1])}}async function p5(t){return dn.post("/auth/login",{token:t})}function Vh(t){let e,n,s;return{c(){e=d("div"),n=d("span"),s=E(t[2]),c(n,"class","label-text-alt text-error"),c(e,"class","label")},m(i,l){H(i,e,l),a(e,n),a(n,s)},p(i,l){l&4&&M(s,i[2])},d(i){i&&L(e)}}}function g5(t){let e,n,s,i,l,o,r,u,f=t[3]("login.title")+"",h,p,g,m=t[3]("login.subtitle")+"",_,b,k,v,y,S=t[3]("login.token")+"",C,T,O,A,x,P,D,I,R=(t[1]?t[3]("login.loggingIn"):t[3]("login.submit"))+"",U,N,z,B,j,F=t[2]&&Vh(t);return{c(){e=d("div"),n=d("div"),s=d("div"),i=d("div"),l=de("svg"),o=de("path"),r=w(),u=d("h1"),h=E(f),p=w(),g=d("p"),_=E(m),b=w(),k=d("div"),v=d("label"),y=d("span"),C=E(S),T=w(),O=d("input"),x=w(),F&&F.c(),P=w(),D=d("div"),I=d("button"),U=E(R),N=w(),z=d("div"),z.textContent="Bungee Reverse Proxy",c(o,"stroke-linecap","round"),c(o,"stroke-linejoin","round"),c(o,"stroke-width","2"),c(o,"d","M13 10V3L4 14h7v7l9-11h-7z"),c(l,"xmlns","http://www.w3.org/2000/svg"),c(l,"class","h-16 w-16 text-primary mb-4"),c(l,"fill","none"),c(l,"viewBox","0 0 24 24"),c(l,"stroke","currentColor"),c(u,"class","text-3xl font-bold text-center"),c(g,"class","text-sm text-base-content/60 text-center mt-2"),c(i,"class","flex flex-col items-center mb-6"),c(y,"class","label-text"),c(v,"class","label"),c(v,"for","token-input"),c(O,"id","token-input"),c(O,"type","password"),c(O,"placeholder",A=t[3]("login.tokenPlaceholder")),c(O,"class","input input-bordered w-full"),O.disabled=t[1],c(O,"autocomplete","off"),Rt(O,"input-error",!!t[2]),c(k,"class","form-control w-full"),c(I,"class","btn btn-primary"),I.disabled=t[1],Rt(I,"loading",t[1]),c(D,"class","form-control mt-6"),c(z,"class","divider text-xs opacity-50 mt-6"),c(s,"class","card-body"),c(n,"class","card w-full max-w-md bg-base-100 shadow-2xl svelte-1qok2wg"),c(e,"class","min-h-screen bg-base-200 flex items-center justify-center p-4")},m(W,G){H(W,e,G),a(e,n),a(n,s),a(s,i),a(i,l),a(l,o),a(i,r),a(i,u),a(u,h),a(i,p),a(i,g),a(g,_),a(s,b),a(s,k),a(k,v),a(v,y),a(y,C),a(k,T),a(k,O),ie(O,t[0]),a(k,x),F&&F.m(k,null),a(s,P),a(s,D),a(D,I),a(I,U),a(s,N),a(s,z),B||(j=[te(O,"input",t[6]),te(O,"keypress",t[5]),te(I,"click",t[4])],B=!0)},p(W,[G]){G&8&&f!==(f=W[3]("login.title")+"")&&M(h,f),G&8&&m!==(m=W[3]("login.subtitle")+"")&&M(_,m),G&8&&S!==(S=W[3]("login.token")+"")&&M(C,S),G&8&&A!==(A=W[3]("login.tokenPlaceholder"))&&c(O,"placeholder",A),G&2&&(O.disabled=W[1]),G&1&&O.value!==W[0]&&ie(O,W[0]),G&4&&Rt(O,"input-error",!!W[2]),W[2]?F?F.p(W,G):(F=Vh(W),F.c(),F.m(k,null)):F&&(F.d(1),F=null),G&10&&R!==(R=(W[1]?W[3]("login.loggingIn"):W[3]("login.submit"))+"")&&M(U,R),G&2&&(I.disabled=W[1]),G&2&&Rt(I,"loading",W[1])},i:Ee,o:Ee,d(W){W&&L(e),F&&F.d(),B=!1,at(j)}}}function m5(t,e,n){let s;Gt(t,Et,h=>n(3,s=h));let i="",l=!1,o="";async function r(){if(!i.trim()){n(2,o=s("login.required"));return}n(1,l=!0),n(2,o="");try{const h=await p5(i);h.success?(K0(i),bt.show(s("login.success"),"success"),window.location.hash="#/"):n(2,o=h.error||s("login.unauthorized"))}catch(h){n(2,o=s("login.failed",{values:{error:h.message}}))}finally{n(1,l=!1)}}function u(h){h.key==="Enter"&&!l&&r()}function f(){i=this.value,n(0,i)}return[i,l,o,s,r,u,f]}class b5 extends zt{constructor(e){super(),jt(this,e,m5,g5,Lt,{})}}function _5(t){let e,n,s=t[0]("notFound.title")+"",i,l,o,r=t[0]("notFound.message")+"",u,f,h,p=t[0]("notFound.goHome")+"",g;return{c(){e=d("div"),n=d("h1"),i=E(s),l=w(),o=d("p"),u=E(r),f=w(),h=d("a"),g=E(p),c(n,"class","text-6xl font-bold mb-4"),c(o,"class","text-2xl mb-8"),c(h,"href","/__ui/#/"),c(h,"class","btn btn-primary"),c(e,"class","flex flex-col items-center justify-center h-screen")},m(m,_){H(m,e,_),a(e,n),a(n,i),a(e,l),a(e,o),a(o,u),a(e,f),a(e,h),a(h,g)},p(m,[_]){_&1&&s!==(s=m[0]("notFound.title")+"")&&M(i,s),_&1&&r!==(r=m[0]("notFound.message")+"")&&M(u,r),_&1&&p!==(p=m[0]("notFound.goHome")+"")&&M(g,p)},i:Ee,o:Ee,d(m){m&&L(e)}}}function v5(t,e,n){let s;return Gt(t,Et,i=>n(0,s=i)),[s]}class y5 extends zt{constructor(e){super(),jt(this,e,v5,_5,Lt,{})}}function Wh(t){let e,n,s,i,l,o,r,u,f,h,p;function g(b,k){return b[2]==="success"?E5:b[2]==="error"?S5:b[2]==="warning"?k5:w5}let m=g(t),_=m(t);return{c(){e=d("div"),n=d("div"),s=d("div"),_.c(),i=w(),l=d("span"),o=E(t[1]),r=w(),u=d("button"),u.textContent="\u2715",c(u,"class","btn btn-sm btn-ghost"),c(n,"class",f="alert "+t[3]+" shadow-lg"),c(e,"class","toast toast-end toast-top z-50")},m(b,k){H(b,e,k),a(e,n),a(n,s),_.m(s,null),a(s,i),a(s,l),a(l,o),a(n,r),a(n,u),h||(p=te(u,"click",t[4]),h=!0)},p(b,k){m!==(m=g(b))&&(_.d(1),_=m(b),_&&(_.c(),_.m(s,i))),k&2&&M(o,b[1]),k&8&&f!==(f="alert "+b[3]+" shadow-lg")&&c(n,"class",f)},d(b){b&&L(e),_.d(),h=!1,p()}}}function w5(t){let e,n;return{c(){e=de("svg"),n=de("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"class","stroke-current shrink-0 w-6 h-6")},m(s,i){H(s,e,i),a(e,n)},d(s){s&&L(e)}}}function k5(t){let e,n;return{c(){e=de("svg"),n=de("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","stroke-current shrink-0 h-6 w-6"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24")},m(s,i){H(s,e,i),a(e,n)},d(s){s&&L(e)}}}function S5(t){let e,n;return{c(){e=de("svg"),n=de("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","stroke-current shrink-0 h-6 w-6"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24")},m(s,i){H(s,e,i),a(e,n)},d(s){s&&L(e)}}}function E5(t){let e,n;return{c(){e=de("svg"),n=de("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","stroke-current shrink-0 h-6 w-6"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24")},m(s,i){H(s,e,i),a(e,n)},d(s){s&&L(e)}}}function T5(t){let e,n=t[0]&&Wh(t);return{c(){n&&n.c(),e=$n()},m(s,i){n&&n.m(s,i),H(s,e,i)},p(s,[i]){s[0]?n?n.p(s,i):(n=Wh(s),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:Ee,o:Ee,d(s){s&&L(e),n&&n.d(s)}}}function M5(t,e,n){let s,{message:i}=e,{type:l="info"}=e,{duration:o=3e3}=e,{visible:r=!0}=e;const u=Rl();let f;is(()=>(o>0&&(f=setTimeout(()=>{n(0,r=!1),u("close")},o)),()=>{f&&clearTimeout(f)}));function h(){n(0,r=!1),u("close"),f&&clearTimeout(f)}return t.$$set=p=>{"message"in p&&n(1,i=p.message),"type"in p&&n(2,l=p.type),"duration"in p&&n(5,o=p.duration),"visible"in p&&n(0,r=p.visible)},t.$$.update=()=>{t.$$.dirty&4&&n(3,s={success:"alert-success",error:"alert-error",warning:"alert-warning",info:"alert-info"}[l])},[r,i,l,s,h,o]}class C5 extends zt{constructor(e){super(),jt(this,e,M5,T5,Lt,{message:1,type:2,duration:5,visible:0})}}function qh(t,e,n){const s=t.slice();return s[3]=e[n],s}function Gh(t,e){let n,s,i;function l(){return e[2](e[3])}return s=new C5({props:{message:e[3].message,type:e[3].type,duration:e[3].duration}}),s.$on("close",l),{key:t,first:null,c(){n=$n(),pt(s.$$.fragment),this.first=n},m(o,r){H(o,n,r),ut(s,o,r),i=!0},p(o,r){e=o;const u={};r&1&&(u.message=e[3].message),r&1&&(u.type=e[3].type),r&1&&(u.duration=e[3].duration),s.$set(u)},i(o){i||(Be(s.$$.fragment,o),i=!0)},o(o){Fe(s.$$.fragment,o),i=!1},d(o){o&&L(n),ct(s,o)}}}function P5(t){let e=[],n=new Map,s,i,l=et(t[0]);const o=r=>r[3].id;for(let r=0;r<l.length;r+=1){let u=qh(t,l,r),f=o(u);n.set(f,e[r]=Gh(f,u))}return{c(){for(let r=0;r<e.length;r+=1)e[r].c();s=$n()},m(r,u){for(let f=0;f<e.length;f+=1)e[f]&&e[f].m(r,u);H(r,s,u),i=!0},p(r,[u]){u&3&&(l=et(r[0]),gs(),e=Ir(e,u,o,1,r,l,n,s.parentNode,td,Gh,s,qh),ms())},i(r){if(!i){for(let u=0;u<l.length;u+=1)Be(e[u]);i=!0}},o(r){for(let u=0;u<e.length;u+=1)Fe(e[u]);i=!1},d(r){r&&L(s);for(let u=0;u<e.length;u+=1)e[u].d(r)}}}function A5(t,e,n){let s;Gt(t,bt,o=>n(0,s=o));function i(o){bt.remove(o)}return[s,i,o=>i(o.id)]}class O5 extends zt{constructor(e){super(),jt(this,e,A5,P5,Lt,{})}}function Xh(t,e,n){const s=t.slice();return s[11]=e[n],s}function x5(t){let e,n,s,i,l,o,r,u,f,h,p,g,m=t[0]("nav.dashboard")+"",_,b,k,v,y,S,C,T,O=t[0]("nav.routes")+"",A,x,P,D,I,R,U,N,z=t[0]("nav.logs")+"",B,j,F,W,G,Y,Q,le,Z,V=t[0]("nav.configuration")+"",X,J,oe,ne,ee,se,K,q,ce=jl.find(t[8])?.name+"",he,ke,we,pe,me,Pe,Se,Ce,_e,Ae=et(jl),ye=[];for(let re=0;re<Ae.length;re+=1)ye[re]=Yh(Xh(t,Ae,re));let $=t[4]&&t[5]&&Jh(t);const ue=[j5,N5,F5,B5,I5,H5,L5,D5],ae=[];function ge(re,Ne){return Ne&2&&(Pe=null),re[1]==="/login"?0:re[1]==="/"?1:re[1]==="/routes"?2:(Pe==null&&(Pe=!!re[1].startsWith("/routes/edit/")),Pe?3:re[1]==="/routes/new"?4:re[1]==="/logs"?5:re[1]==="/config"?6:7)}return Se=ge(t,-1),Ce=ae[Se]=ue[Se](t),{c(){e=d("div"),n=d("div"),s=d("div"),s.innerHTML='<a href="/__ui/#/" class="flex items-center gap-2 px-4 py-2 hover:bg-base-200 rounded-lg transition-colors"><svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8 text-primary" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path></svg> <div class="flex flex-col"><span class="text-xl font-bold">Bungee</span> <span class="text-xs text-base-content/60">Reverse Proxy</span></div></a>',i=w(),l=d("div"),o=d("ul"),r=d("li"),u=d("a"),f=de("svg"),h=de("path"),p=w(),g=d("span"),_=E(m),b=w(),k=d("li"),v=d("a"),y=de("svg"),S=de("path"),C=w(),T=d("span"),A=E(O),x=w(),P=d("li"),D=d("a"),I=de("svg"),R=de("path"),U=w(),N=d("span"),B=E(z),j=w(),F=d("li"),W=d("a"),G=de("svg"),Y=de("path"),Q=de("path"),le=w(),Z=d("span"),X=E(V),J=w(),oe=d("div"),ne=d("div"),ee=de("svg"),se=de("path"),K=w(),q=d("span"),he=E(ce),ke=w(),we=d("ul");for(let re=0;re<ye.length;re+=1)ye[re].c();pe=w(),$&&$.c(),me=w(),Ce.c(),c(s,"class","flex-1"),c(h,"stroke-linecap","round"),c(h,"stroke-linejoin","round"),c(h,"stroke-width","2"),c(h,"d","M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"),c(f,"xmlns","http://www.w3.org/2000/svg"),c(f,"class","h-4 w-4"),c(f,"fill","none"),c(f,"viewBox","0 0 24 24"),c(f,"stroke","currentColor"),c(u,"href","/__ui/#/"),c(u,"class","flex items-center gap-2 svelte-1fgps4v"),Rt(u,"active",t[1]==="/"),c(S,"stroke-linecap","round"),c(S,"stroke-linejoin","round"),c(S,"stroke-width","2"),c(S,"d","M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7"),c(y,"xmlns","http://www.w3.org/2000/svg"),c(y,"class","h-4 w-4"),c(y,"fill","none"),c(y,"viewBox","0 0 24 24"),c(y,"stroke","currentColor"),c(v,"href","/__ui/#/routes"),c(v,"class","flex items-center gap-2 svelte-1fgps4v"),Rt(v,"active",t[1].startsWith("/routes")),c(R,"stroke-linecap","round"),c(R,"stroke-linejoin","round"),c(R,"stroke-width","2"),c(R,"d","M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"),c(I,"xmlns","http://www.w3.org/2000/svg"),c(I,"class","h-4 w-4"),c(I,"fill","none"),c(I,"viewBox","0 0 24 24"),c(I,"stroke","currentColor"),c(D,"href","/__ui/#/logs"),c(D,"class","flex items-center gap-2 svelte-1fgps4v"),Rt(D,"active",t[1]==="/logs"),c(Y,"stroke-linecap","round"),c(Y,"stroke-linejoin","round"),c(Y,"stroke-width","2"),c(Y,"d","M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"),c(Q,"stroke-linecap","round"),c(Q,"stroke-linejoin","round"),c(Q,"stroke-width","2"),c(Q,"d","M15 12a3 3 0 11-6 0 3 3 0 016 0z"),c(G,"xmlns","http://www.w3.org/2000/svg"),c(G,"class","h-4 w-4"),c(G,"fill","none"),c(G,"viewBox","0 0 24 24"),c(G,"stroke","currentColor"),c(W,"href","/__ui/#/config"),c(W,"class","flex items-center gap-2 svelte-1fgps4v"),Rt(W,"active",t[1]==="/config"),c(o,"class","menu menu-horizontal px-1 gap-1"),c(se,"stroke-linecap","round"),c(se,"stroke-linejoin","round"),c(se,"stroke-width","2"),c(se,"d","M3 5h12M9 3v2m1.048 9.5A18.022 18.022 0 016.412 9m6.088 9h7M11 21l5-10 5 10M12.751 5C11.783 10.77 8.07 15.61 3 18.129"),c(ee,"xmlns","http://www.w3.org/2000/svg"),c(ee,"class","h-4 w-4"),c(ee,"fill","none"),c(ee,"viewBox","0 0 24 24"),c(ee,"stroke","currentColor"),c(q,"class","text-xs"),c(ne,"role","button"),c(ne,"tabindex","0"),c(ne,"class","btn btn-ghost btn-sm gap-1"),c(we,"role","menu"),c(we,"tabindex","0"),c(we,"class","dropdown-content z-[1] menu p-2 shadow bg-base-100 rounded-box w-32 mt-2 gap-1"),c(oe,"class","dropdown dropdown-end mx-2"),c(l,"class","flex-none"),c(n,"class","navbar bg-base-100 shadow-lg sticky top-0 z-50"),c(e,"class","min-h-screen bg-base-200")},m(re,Ne){H(re,e,Ne),a(e,n),a(n,s),a(n,i),a(n,l),a(l,o),a(o,r),a(r,u),a(u,f),a(f,h),a(u,p),a(u,g),a(g,_),a(o,b),a(o,k),a(k,v),a(v,y),a(y,S),a(v,C),a(v,T),a(T,A),a(o,x),a(o,P),a(P,D),a(D,I),a(I,R),a(D,U),a(D,N),a(N,B),a(o,j),a(o,F),a(F,W),a(W,G),a(G,Y),a(G,Q),a(W,le),a(W,Z),a(Z,X),a(l,J),a(l,oe),a(oe,ne),a(ne,ee),a(ee,se),a(ne,K),a(ne,q),a(q,he),a(oe,ke),a(oe,we);for(let Ye=0;Ye<ye.length;Ye+=1)ye[Ye]&&ye[Ye].m(we,null);a(l,pe),$&&$.m(l,null),a(e,me),ae[Se].m(e,null),_e=!0},p(re,Ne){if((!_e||Ne&1)&&m!==(m=re[0]("nav.dashboard")+"")&&M(_,m),(!_e||Ne&2)&&Rt(u,"active",re[1]==="/"),(!_e||Ne&1)&&O!==(O=re[0]("nav.routes")+"")&&M(A,O),(!_e||Ne&2)&&Rt(v,"active",re[1].startsWith("/routes")),(!_e||Ne&1)&&z!==(z=re[0]("nav.logs")+"")&&M(B,z),(!_e||Ne&2)&&Rt(D,"active",re[1]==="/logs"),(!_e||Ne&1)&&V!==(V=re[0]("nav.configuration")+"")&&M(X,V),(!_e||Ne&2)&&Rt(W,"active",re[1]==="/config"),(!_e||Ne&8)&&ce!==(ce=jl.find(re[8])?.name+"")&&M(he,ce),Ne&72){Ae=et(jl);let Ve;for(Ve=0;Ve<Ae.length;Ve+=1){const Qe=Xh(re,Ae,Ve);ye[Ve]?ye[Ve].p(Qe,Ne):(ye[Ve]=Yh(Qe),ye[Ve].c(),ye[Ve].m(we,null))}for(;Ve<ye.length;Ve+=1)ye[Ve].d(1);ye.length=Ae.length}re[4]&&re[5]?$?$.p(re,Ne):($=Jh(re),$.c(),$.m(l,null)):$&&($.d(1),$=null);let Ye=Se;Se=ge(re,Ne),Se===Ye?ae[Se].p(re,Ne):(gs(),Fe(ae[Ye],1,1,()=>{ae[Ye]=null}),ms(),Ce=ae[Se],Ce?Ce.p(re,Ne):(Ce=ae[Se]=ue[Se](re),Ce.c()),Be(Ce,1),Ce.m(e,null))},i(re){_e||(Be(Ce),_e=!0)},o(re){Fe(Ce),_e=!1},d(re){re&&L(e),En(ye,re),$&&$.d(),ae[Se].d()}}}function R5(t){let e;return{c(){e=d("div"),e.innerHTML='<div class="flex flex-col items-center gap-4"><span class="loading loading-spinner loading-lg"></span> <p class="text-base-content/60">Loading...</p></div>',c(e,"class","min-h-screen bg-base-200 flex items-center justify-center")},m(n,s){H(n,e,s)},p:Ee,i:Ee,o:Ee,d(n){n&&L(e)}}}function Yh(t){let e,n,s,i,l;function o(){return t[9](t[11])}return{c(){e=d("li"),n=d("button"),n.textContent=\`\${t[11].name}\`,s=w(),c(n,"class","svelte-1fgps4v"),Rt(n,"active",t[3]===t[11].code)},m(r,u){H(r,e,u),a(e,n),a(e,s),i||(l=te(n,"click",o),i=!0)},p(r,u){t=r,u&8&&Rt(n,"active",t[3]===t[11].code)},d(r){r&&L(e),i=!1,l()}}}function Jh(t){let e,n,s,i,l,o,r=t[0]("login.logout")+"",u,f,h;return{c(){e=d("div"),n=d("button"),s=de("svg"),i=de("path"),l=w(),o=d("span"),u=E(r),c(i,"stroke-linecap","round"),c(i,"stroke-linejoin","round"),c(i,"stroke-width","2"),c(i,"d","M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"),c(s,"xmlns","http://www.w3.org/2000/svg"),c(s,"class","h-4 w-4"),c(s,"fill","none"),c(s,"viewBox","0 0 24 24"),c(s,"stroke","currentColor"),c(o,"class","text-xs hidden md:inline"),c(n,"class","btn btn-ghost btn-sm gap-1"),c(e,"class","mx-2")},m(p,g){H(p,e,g),a(e,n),a(n,s),a(s,i),a(n,l),a(n,o),a(o,u),f||(h=te(n,"click",t[7]),f=!0)},p(p,g){g&1&&r!==(r=p[0]("login.logout")+"")&&M(u,r)},d(p){p&&L(e),f=!1,h()}}}function D5(t){let e,n;return e=new y5({}),{c(){pt(e.$$.fragment)},m(s,i){ut(e,s,i),n=!0},p:Ee,i(s){n||(Be(e.$$.fragment,s),n=!0)},o(s){Fe(e.$$.fragment,s),n=!1},d(s){ct(e,s)}}}function L5(t){let e,n;return e=new Uv({}),{c(){pt(e.$$.fragment)},m(s,i){ut(e,s,i),n=!0},p:Ee,i(s){n||(Be(e.$$.fragment,s),n=!0)},o(s){Fe(e.$$.fragment,s),n=!1},d(s){ct(e,s)}}}function H5(t){let e,n;return e=new d5({}),{c(){pt(e.$$.fragment)},m(s,i){ut(e,s,i),n=!0},p:Ee,i(s){n||(Be(e.$$.fragment,s),n=!0)},o(s){Fe(e.$$.fragment,s),n=!1},d(s){ct(e,s)}}}function I5(t){let e,n;return e=new qp({props:{params:{}}}),{c(){pt(e.$$.fragment)},m(s,i){ut(e,s,i),n=!0},p:Ee,i(s){n||(Be(e.$$.fragment,s),n=!0)},o(s){Fe(e.$$.fragment,s),n=!1},d(s){ct(e,s)}}}function B5(t){let e,n;return e=new qp({props:{params:{path:t[1].replace("/routes/edit/","")}}}),{c(){pt(e.$$.fragment)},m(s,i){ut(e,s,i),n=!0},p(s,i){const l={};i&2&&(l.params={path:s[1].replace("/routes/edit/","")}),e.$set(l)},i(s){n||(Be(e.$$.fragment,s),n=!0)},o(s){Fe(e.$$.fragment,s),n=!1},d(s){ct(e,s)}}}function F5(t){let e,n;return e=new uy({}),{c(){pt(e.$$.fragment)},m(s,i){ut(e,s,i),n=!0},p:Ee,i(s){n||(Be(e.$$.fragment,s),n=!0)},o(s){Fe(e.$$.fragment,s),n=!1},d(s){ct(e,s)}}}function N5(t){let e,n;return e=new hv({}),{c(){pt(e.$$.fragment)},m(s,i){ut(e,s,i),n=!0},p:Ee,i(s){n||(Be(e.$$.fragment,s),n=!0)},o(s){Fe(e.$$.fragment,s),n=!1},d(s){ct(e,s)}}}function j5(t){let e,n;return e=new b5({}),{c(){pt(e.$$.fragment)},m(s,i){ut(e,s,i),n=!0},p:Ee,i(s){n||(Be(e.$$.fragment,s),n=!0)},o(s){Fe(e.$$.fragment,s),n=!1},d(s){ct(e,s)}}}function z5(t){let e,n,s,i,l;const o=[R5,x5],r=[];function u(f,h){return f[2]?0:1}return e=u(t),n=r[e]=o[e](t),i=new O5({}),{c(){n.c(),s=w(),pt(i.$$.fragment)},m(f,h){r[e].m(f,h),H(f,s,h),ut(i,f,h),l=!0},p(f,[h]){let p=e;e=u(f),e===p?r[e].p(f,h):(gs(),Fe(r[p],1,1,()=>{r[p]=null}),ms(),n=r[e],n?n.p(f,h):(n=r[e]=o[e](f),n.c()),Be(n,1),n.m(s.parentNode,s))},i(f){l||(Be(n),Be(i.$$.fragment,f),l=!0)},o(f){Fe(n),Fe(i.$$.fragment,f),l=!1},d(f){f&&L(s),r[e].d(f),ct(i,f)}}}function U5(t,e,n){let s,i,l,o,r,u;Gt(t,Et,m=>n(0,s=m)),Gt(t,rg,m=>n(1,i=m)),Gt(t,ro,m=>n(2,l=m)),Gt(t,di,m=>n(3,o=m)),Gt(t,ja,m=>n(4,r=m)),Gt(t,go,m=>n(5,u=m));function f(m){G0(m)}is(async()=>{try{const _=(await Ur()).auth?.enabled||!1;if(ja.set(_),_){const b=Rd();go.set(!!b),!b&&i!=="/login"&&(window.location.hash="#/login")}}catch(m){console.error("Failed to check auth status:",m)}});function h(){confirm(s("login.logoutConfirm"))&&(xd(),window.location.hash="#/login")}return[s,i,l,o,r,u,f,h,m=>m.code===o,m=>f(m.code)]}class V5 extends zt{constructor(e){super(),jt(this,e,U5,z5,Lt,{})}}new V5({target:document.getElementById("app")})});export default W5();
21271
+ */class tr{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,s,n){const o=e.listeners[n],r=e.duration;o.forEach(a=>a({chart:t,initial:e.initial,numSteps:r,currentStep:Math.min(s-e.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=Hs.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((s,n)=>{if(!s.running||!s.items.length)return;const o=s.items;let r=o.length-1,a=!1,l;for(;r>=0;--r)l=o[r],l._active?(l._total>s.duration&&(s.duration=l._total),l.tick(t),a=!0):(o[r]=o[o.length-1],o.pop());a&&(n.draw(),this._notify(n,s,t,"progress")),o.length||(s.running=!1,this._notify(n,s,t,"complete"),s.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let s=e.get(t);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,s)),s}listen(t,e,s){this._getAnims(t).listeners[e].push(s)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((s,n)=>Math.max(s,n._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const s=e.items;let n=s.length-1;for(;n>=0;--n)s[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var at=new tr;const Wi="transparent",er={boolean(i,t,e){return e>.5?t:i},color(i,t,e){const s=Di(i||Wi),n=s.valid&&Di(t||Wi);return n&&n.valid?n.mix(s,e).hexString():t},number(i,t,e){return i+(t-i)*e}};class ir{constructor(t,e,s,n){const o=e[s];n=oe([t.to,n,o,t.from]);const r=oe([t.from,o,n]);this._active=!0,this._fn=t.fn||er[t.type||typeof r],this._easing=Kt[t.easing]||Kt.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=s,this._from=r,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,s){if(this._active){this._notify(!1);const n=this._target[this._prop],o=s-this._start,r=this._duration-o;this._start=s,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=oe([t.to,e,n,t.from]),this._from=oe([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,s=this._duration,n=this._prop,o=this._from,r=this._loop,a=this._to;let l;if(this._active=o!==a&&(r||e<s),!this._active){this._target[n]=a,this._notify(!0);return}if(e<0){this._target[n]=o;return}l=e/s%2,l=r&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,s)=>{t.push({res:e,rej:s})})}_notify(t){const e=t?"res":"rej",s=this._promises||[];for(let n=0;n<s.length;n++)s[n][e]()}}class $s{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!A(t))return;const e=Object.keys(W.animation),s=this._properties;Object.getOwnPropertyNames(t).forEach(n=>{const o=t[n];if(!A(o))return;const r={};for(const a of e)r[a]=o[a];(H(o.properties)&&o.properties||[n]).forEach(a=>{(a===n||!s.has(a))&&s.set(a,r)})})}_animateOptions(t,e){const s=e.options,n=nr(t,s);if(!n)return[];const o=this._createAnimations(n,s);return s.$shared&&sr(t.options.$animations,s).then(()=>{t.options=s},()=>{}),o}_createAnimations(t,e){const s=this._properties,n=[],o=t.$animations||(t.$animations={}),r=Object.keys(e),a=Date.now();let l;for(l=r.length-1;l>=0;--l){const c=r[l];if(c.charAt(0)==="$")continue;if(c==="options"){n.push(...this._animateOptions(t,e));continue}const h=e[c];let d=o[c];const u=s.get(c);if(d)if(u&&d.active()){d.update(u,h,a);continue}else d.cancel();if(!u||!u.duration){t[c]=h;continue}o[c]=d=new ir(u,t,c,h),n.push(d)}return n}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const s=this._createAnimations(t,e);if(s.length)return at.add(this._chart,s),!0}}function sr(i,t){const e=[],s=Object.keys(t);for(let n=0;n<s.length;n++){const o=i[s[n]];o&&o.active()&&e.push(o.wait())}return Promise.all(e)}function nr(i,t){if(!t)return;let e=i.options;if(!e){i.options=t;return}return e.$shared&&(i.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function Hi(i,t){const e=i&&i.options||{},s=e.reverse,n=e.min===void 0?t:0,o=e.max===void 0?t:0;return{start:s?o:n,end:s?n:o}}function or(i,t,e){if(e===!1)return!1;const s=Hi(i,e),n=Hi(t,e);return{top:n.end,right:s.end,bottom:n.start,left:s.start}}function rr(i){let t,e,s,n;return A(i)?(t=i.top,e=i.right,s=i.bottom,n=i.left):t=e=s=n=i,{top:t,right:e,bottom:s,left:n,disabled:i===!1}}function tn(i,t){const e=[],s=i._getSortedDatasetMetas(t);let n,o;for(n=0,o=s.length;n<o;++n)e.push(s[n].index);return e}function Ni(i,t,e,s={}){const n=i.keys,o=s.mode==="single";let r,a,l,c;if(t===null)return;let h=!1;for(r=0,a=n.length;r<a;++r){if(l=+n[r],l===e){if(h=!0,s.all)continue;break}c=i.values[l],Z(c)&&(o||t===0||ot(t)===ot(c))&&(t+=c)}return!h&&!s.all?0:t}function ar(i,t){const{iScale:e,vScale:s}=t,n=e.axis==="x"?"x":"y",o=s.axis==="x"?"x":"y",r=Object.keys(i),a=new Array(r.length);let l,c,h;for(l=0,c=r.length;l<c;++l)h=r[l],a[l]={[n]:h,[o]:i[h]};return a}function Ee(i,t){const e=i&&i.options.stacked;return e||e===void 0&&t.stack!==void 0}function lr(i,t,e){return\`\${i.id}.\${t.id}.\${e.stack||e.type}\`}function cr(i){const{min:t,max:e,minDefined:s,maxDefined:n}=i.getUserBounds();return{min:s?t:Number.NEGATIVE_INFINITY,max:n?e:Number.POSITIVE_INFINITY}}function hr(i,t,e){const s=i[t]||(i[t]={});return s[e]||(s[e]={})}function Vi(i,t,e,s){for(const n of t.getMatchingVisibleMetas(s).reverse()){const o=i[n.index];if(e&&o>0||!e&&o<0)return n.index}return null}function ji(i,t){const{chart:e,_cachedMeta:s}=i,n=e._stacks||(e._stacks={}),{iScale:o,vScale:r,index:a}=s,l=o.axis,c=r.axis,h=lr(o,r,s),d=t.length;let u;for(let f=0;f<d;++f){const p=t[f],{[l]:g,[c]:m}=p,b=p._stacks||(p._stacks={});u=b[c]=hr(n,h,g),u[a]=m,u._top=Vi(u,r,!0,s.type),u._bottom=Vi(u,r,!1,s.type);const _=u._visualValues||(u._visualValues={});_[a]=m}}function ze(i,t){const e=i.scales;return Object.keys(e).filter(s=>e[s].axis===t).shift()}function dr(i,t){return Pt(i,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function ur(i,t,e){return Pt(i,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Bt(i,t){const e=i.controller.index,s=i.vScale&&i.vScale.axis;if(s){t=t||i._parsed;for(const n of t){const o=n._stacks;if(!o||o[s]===void 0||o[s][e]===void 0)return;delete o[s][e],o[s]._visualValues!==void 0&&o[s]._visualValues[e]!==void 0&&delete o[s]._visualValues[e]}}}const Fe=i=>i==="reset"||i==="none",Yi=(i,t)=>t?i:Object.assign({},i),fr=(i,t,e)=>i&&!t.hidden&&t._stacked&&{keys:tn(e,!0),values:null};class De{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Ee(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Bt(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,s=this.getDataset(),n=(d,u,f,p)=>d==="x"?u:d==="r"?p:f,o=e.xAxisID=P(s.xAxisID,ze(t,"x")),r=e.yAxisID=P(s.yAxisID,ze(t,"y")),a=e.rAxisID=P(s.rAxisID,ze(t,"r")),l=e.indexAxis,c=e.iAxisID=n(l,o,r,a),h=e.vAxisID=n(l,r,o,a);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(r),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&wi(this._data,this),t._stacked&&Bt(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),s=this._data;if(A(e)){const n=this._cachedMeta;this._data=ar(e,n)}else if(s!==e){if(s){wi(s,this);const n=this._cachedMeta;Bt(n),n._parsed=[]}e&&Object.isExtensible(e)&&Un(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,s=this.getDataset();let n=!1;this._dataCheck();const o=e._stacked;e._stacked=Ee(e.vScale,e),e.stack!==s.stack&&(n=!0,Bt(e),e.stack=s.stack),this._resyncElements(t),(n||o!==e._stacked)&&(ji(this,e._parsed),e._stacked=Ee(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:s,_data:n}=this,{iScale:o,_stacked:r}=s,a=o.axis;let l=t===0&&e===n.length?!0:s._sorted,c=t>0&&s._parsed[t-1],h,d,u;if(this._parsing===!1)s._parsed=n,s._sorted=!0,u=n;else{H(n[t])?u=this.parseArrayData(s,n,t,e):A(n[t])?u=this.parseObjectData(s,n,t,e):u=this.parsePrimitiveData(s,n,t,e);const f=()=>d[a]===null||c&&d[a]<c[a];for(h=0;h<e;++h)s._parsed[h+t]=d=u[h],l&&(f()&&(l=!1),c=d);s._sorted=l}r&&ji(this,u)}parsePrimitiveData(t,e,s,n){const{iScale:o,vScale:r}=t,a=o.axis,l=r.axis,c=o.getLabels(),h=o===r,d=new Array(n);let u,f,p;for(u=0,f=n;u<f;++u)p=u+s,d[u]={[a]:h||o.parse(c[p],p),[l]:r.parse(e[p],p)};return d}parseArrayData(t,e,s,n){const{xScale:o,yScale:r}=t,a=new Array(n);let l,c,h,d;for(l=0,c=n;l<c;++l)h=l+s,d=e[h],a[l]={x:o.parse(d[0],h),y:r.parse(d[1],h)};return a}parseObjectData(t,e,s,n){const{xScale:o,yScale:r}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(n);let h,d,u,f;for(h=0,d=n;h<d;++h)u=h+s,f=e[u],c[h]={x:o.parse(St(f,a),u),y:r.parse(St(f,l),u)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,s){const n=this.chart,o=this._cachedMeta,r=e[t.axis],a={keys:tn(n,!0),values:e._stacks[t.axis]._visualValues};return Ni(a,r,o.index,{mode:s})}updateRangeFromParsed(t,e,s,n){const o=s[e.axis];let r=o===null?NaN:o;const a=n&&s._stacks[e.axis];n&&a&&(n.values=a,r=Ni(n,o,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(t,e){const s=this._cachedMeta,n=s._parsed,o=s._sorted&&t===s.iScale,r=n.length,a=this._getOtherScale(t),l=fr(e,s,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:d}=cr(a);let u,f;function p(){f=n[u];const g=f[a.axis];return!Z(f[t.axis])||h>g||d<g}for(u=0;u<r&&!(!p()&&(this.updateRangeFromParsed(c,t,f,l),o));++u);if(o){for(u=r-1;u>=0;--u)if(!p()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,s=[];let n,o,r;for(n=0,o=e.length;n<o;++n)r=e[n][t.axis],Z(r)&&s.push(r);return s}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,s=e.iScale,n=e.vScale,o=this.getParsed(t);return{label:s?""+s.getLabelForValue(o[s.axis]):"",value:n?""+n.getLabelForValue(o[n.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=rr(P(this.options.clip,or(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,s=this._cachedMeta,n=s.data||[],o=e.chartArea,r=[],a=this._drawStart||0,l=this._drawCount||n.length-a,c=this.options.drawActiveElementsOnTop;let h;for(s.dataset&&s.dataset.draw(t,o,a,l),h=a;h<a+l;++h){const d=n[h];d.hidden||(d.active&&c?r.push(d):d.draw(t,o))}for(h=0;h<r.length;++h)r[h].draw(t,o)}getStyle(t,e){const s=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(s):this.resolveDataElementOptions(t||0,s)}getContext(t,e,s){const n=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const r=this._cachedMeta.data[t];o=r.$context||(r.$context=ur(this.getContext(),t,r)),o.parsed=this.getParsed(t),o.raw=n.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=dr(this.chart.getContext(),this.index)),o.dataset=n,o.index=o.datasetIndex=this.index;return o.active=!!e,o.mode=s,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",s){const n=e==="active",o=this._cachedDataOpts,r=t+"-"+e,a=o[r],l=this.enableOptionSharing&&Jt(s);if(a)return Yi(a,l);const c=this.chart.config,h=c.datasetElementScopeKeys(this._type,t),d=n?[\`\${t}Hover\`,"hover",t,""]:[t,""],u=c.getOptionScopes(this.getDataset(),h),f=Object.keys(W.elements[t]),p=()=>this.getContext(s,n,e),g=c.resolveNamedOptions(u,f,p,d);return g.$shared&&(g.$shared=l,o[r]=Object.freeze(Yi(g,l))),g}_resolveAnimations(t,e,s){const n=this.chart,o=this._cachedDataOpts,r=\`animation-\${e}\`,a=o[r];if(a)return a;let l;if(n.options.animation!==!1){const h=this.chart.config,d=h.datasetAnimationScopeKeys(this._type,e),u=h.getOptionScopes(this.getDataset(),d);l=h.createResolver(u,this.getContext(t,s,e))}const c=new $s(n,l&&l.animations);return l&&l._cacheable&&(o[r]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Fe(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const s=this.resolveDataElementOptions(t,e),n=this._sharedOptions,o=this.getSharedOptions(s),r=this.includeOptions(e,o)||o!==n;return this.updateSharedOptions(o,e,s),{sharedOptions:o,includeOptions:r}}updateElement(t,e,s,n){Fe(n)?Object.assign(t,s):this._resolveAnimations(e,n).update(t,s)}updateSharedOptions(t,e,s){t&&!Fe(e)&&this._resolveAnimations(void 0,e).update(t,s)}_setStyle(t,e,s,n){t.active=n;const o=this.getStyle(e,n);this._resolveAnimations(e,s,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,s){this._setStyle(t,s,"active",!1)}setHoverStyle(t,e,s){this._setStyle(t,s,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,s=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const n=s.length,o=e.length,r=Math.min(o,n);r&&this.parse(0,r),o>n?this._insertElements(n,o-n,t):o<n&&this._removeElements(o,n-o)}_insertElements(t,e,s=!0){const n=this._cachedMeta,o=n.data,r=t+e;let a;const l=c=>{for(c.length+=e,a=c.length-1;a>=r;a--)c[a]=c[a-e]};for(l(o),a=t;a<r;++a)o[a]=new this.dataElementType;this._parsing&&l(n._parsed),this.parse(t,e),s&&this.updateElements(o,t,e,"reset")}updateElements(t,e,s,n){}_removeElements(t,e){const s=this._cachedMeta;if(this._parsing){const n=s._parsed.splice(t,e);s._stacked&&Bt(s,n)}s.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,s,n]=t;this[e](s,n)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const s=arguments.length-2;s&&this._sync(["_insertElements",t,s])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function gr(i,t){if(!i._cache.$bar){const e=i.getMatchingVisibleMetas(t);let s=[];for(let n=0,o=e.length;n<o;n++)s=s.concat(e[n].controller.getAllParsedValues(i));i._cache.$bar=Ws(s.sort((n,o)=>n-o))}return i._cache.$bar}function pr(i){const t=i.iScale,e=gr(t,i.type);let s=t._length,n,o,r,a;const l=()=>{r===32767||r===-32768||(Jt(a)&&(s=Math.min(s,Math.abs(r-a)||s)),a=r)};for(n=0,o=e.length;n<o;++n)r=t.getPixelForValue(e[n]),l();for(a=void 0,n=0,o=t.ticks.length;n<o;++n)r=t.getPixelForTick(n),l();return s}function mr(i,t,e,s){const n=e.barThickness;let o,r;return T(n)?(o=t.min*e.categoryPercentage,r=e.barPercentage):(o=n*s,r=1),{chunk:o/s,ratio:r,start:t.pixels[i]-o/2}}function br(i,t,e,s){const n=t.pixels,o=n[i];let r=i>0?n[i-1]:null,a=i<n.length-1?n[i+1]:null;const l=e.categoryPercentage;r===null&&(r=o-(a===null?t.end-t.start:a-o)),a===null&&(a=o+o-r);const c=o-(o-Math.min(r,a))/2*l;return{chunk:Math.abs(a-r)/2*l/s,ratio:e.barPercentage,start:c}}function _r(i,t,e,s){const n=e.parse(i[0],s),o=e.parse(i[1],s),r=Math.min(n,o),a=Math.max(n,o);let l=r,c=a;Math.abs(r)>Math.abs(a)&&(l=a,c=r),t[e.axis]=c,t._custom={barStart:l,barEnd:c,start:n,end:o,min:r,max:a}}function en(i,t,e,s){return H(i)?_r(i,t,e,s):t[e.axis]=e.parse(i,s),t}function Ui(i,t,e,s){const n=i.iScale,o=i.vScale,r=n.getLabels(),a=n===o,l=[];let c,h,d,u;for(c=e,h=e+s;c<h;++c)u=t[c],d={},d[n.axis]=a||n.parse(r[c],c),l.push(en(u,d,o,c));return l}function Be(i){return i&&i.barStart!==void 0&&i.barEnd!==void 0}function xr(i,t,e){return i!==0?ot(i):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function yr(i){let t,e,s,n,o;return i.horizontal?(t=i.base>i.x,e="left",s="right"):(t=i.base<i.y,e="bottom",s="top"),t?(n="end",o="start"):(n="start",o="end"),{start:e,end:s,reverse:t,top:n,bottom:o}}function vr(i,t,e,s){let n=t.borderSkipped;const o={};if(!n){i.borderSkipped=o;return}if(n===!0){i.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:r,end:a,reverse:l,top:c,bottom:h}=yr(i);n==="middle"&&e&&(i.enableBorderRadius=!0,(e._top||0)===s?n=c:(e._bottom||0)===s?n=h:(o[Xi(h,r,a,l)]=!0,n=c)),o[Xi(n,r,a,l)]=!0,i.borderSkipped=o}function Xi(i,t,e,s){return s?(i=Mr(i,t,e),i=Ki(i,e,t)):i=Ki(i,t,e),i}function Mr(i,t,e){return i===t?e:i===e?t:i}function Ki(i,t,e){return i==="start"?t:i==="end"?e:i}function kr(i,{inflateAmount:t},e){i.inflateAmount=t==="auto"?e===1?.33:0:t}class Sr extends De{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,e,s,n){return Ui(t,e,s,n)}parseArrayData(t,e,s,n){return Ui(t,e,s,n)}parseObjectData(t,e,s,n){const{iScale:o,vScale:r}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=o.axis==="x"?a:l,h=r.axis==="x"?a:l,d=[];let u,f,p,g;for(u=s,f=s+n;u<f;++u)g=e[u],p={},p[o.axis]=o.parse(St(g,c),u),d.push(en(St(g,h),p,r,u));return d}updateRangeFromParsed(t,e,s,n){super.updateRangeFromParsed(t,e,s,n);const o=s._custom;o&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:s,vScale:n}=e,o=this.getParsed(t),r=o._custom,a=Be(r)?"["+r.start+", "+r.end+"]":""+n.getLabelForValue(o[n.axis]);return{label:""+s.getLabelForValue(o[s.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,s,n){const o=n==="reset",{index:r,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),c=a.isHorizontal(),h=this._getRuler(),{sharedOptions:d,includeOptions:u}=this._getSharedOptions(e,n);for(let f=e;f<e+s;f++){const p=this.getParsed(f),g=o||T(p[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(f),m=this._calculateBarIndexPixels(f,h),b=(p._stacks||{})[a.axis],_={horizontal:c,base:g.base,enableBorderRadius:!b||Be(p._custom)||r===b._top||r===b._bottom,x:c?g.head:m.center,y:c?m.center:g.head,height:c?m.size:Math.abs(g.size),width:c?Math.abs(g.size):m.size};u&&(_.options=d||this.resolveDataElementOptions(f,t[f].active?"active":n));const y=_.options||t[f].options;vr(_,y,b,r),kr(_,y,h.ratio),this.updateElement(t[f],f,_,n)}}_getStacks(t,e){const{iScale:s}=this._cachedMeta,n=s.getMatchingVisibleMetas(this._type).filter(h=>h.controller.options.grouped),o=s.options.stacked,r=[],a=this._cachedMeta.controller.getParsed(e),l=a&&a[s.axis],c=h=>{const d=h._parsed.find(f=>f[s.axis]===l),u=d&&d[h.vScale.axis];if(T(u)||isNaN(u))return!0};for(const h of n)if(!(e!==void 0&&c(h))&&((o===!1||r.indexOf(h.stack)===-1||o===void 0&&h.stack===void 0)&&r.push(h.stack),h.index===t))break;return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter(s=>t[s].axis===e).shift()}_getAxis(){const t={},e=this.getFirstScaleIdForIndexAxis();for(const s of this.chart.data.datasets)t[P(this.chart.options.indexAxis==="x"?s.xAxisID:s.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,s){const n=this._getStacks(t,s),o=e!==void 0?n.indexOf(e):-1;return o===-1?n.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,s=e.iScale,n=[];let o,r;for(o=0,r=e.data.length;o<r;++o)n.push(s.getPixelForValue(this.getParsed(o)[s.axis],o));const a=t.barThickness;return{min:a||pr(e),pixels:n,start:s._startPixel,end:s._endPixel,stackCount:this._getStackCount(),scale:s,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:s,index:n},options:{base:o,minBarLength:r}}=this,a=o||0,l=this.getParsed(t),c=l._custom,h=Be(c);let d=l[e.axis],u=0,f=s?this.applyStack(e,l,s):d,p,g;f!==d&&(u=f-d,f=d),h&&(d=c.barStart,f=c.barEnd-c.barStart,d!==0&&ot(d)!==ot(c.barEnd)&&(u=0),u+=d);const m=!T(o)&&!h?o:u;let b=e.getPixelForValue(m);if(this.chart.getDataVisibility(t)?p=e.getPixelForValue(u+f):p=b,g=p-b,Math.abs(g)<r){g=xr(g,e,a)*r,d===a&&(b-=g/2);const _=e.getPixelForDecimal(0),y=e.getPixelForDecimal(1),v=Math.min(_,y),x=Math.max(_,y);b=Math.max(Math.min(b,x),v),p=b+g,s&&!h&&(l._stacks[e.axis]._visualValues[n]=e.getValueForPixel(p)-e.getValueForPixel(b))}if(b===e.getPixelForValue(a)){const _=ot(g)*e.getLineWidthForValue(a)/2;b+=_,g-=_}return{size:g,base:b,head:p,center:p+g/2}}_calculateBarIndexPixels(t,e){const s=e.scale,n=this.options,o=n.skipNull,r=P(n.maxBarThickness,1/0);let a,l;const c=this._getAxisCount();if(e.grouped){const h=o?this._getStackCount(t):e.stackCount,d=n.barThickness==="flex"?br(t,e,n,h*c):mr(t,e,n,h*c),u=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,f=this._getAxis().indexOf(P(u,this.getFirstScaleIdForIndexAxis())),p=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0)+f;a=d.start+d.chunk*p+d.chunk/2,l=Math.min(r,d.chunk*d.ratio)}else a=s.getPixelForValue(this.getParsed(t)[s.axis],t),l=Math.min(r,e.min*e.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){const t=this._cachedMeta,e=t.vScale,s=t.data,n=s.length;let o=0;for(;o<n;++o)this.getParsed(o)[e.axis]!==null&&!s[o].hidden&&s[o].draw(this._ctx)}}function wr(i,t,e){let s=1,n=1,o=0,r=0;if(t<F){const a=i,l=a+t,c=Math.cos(a),h=Math.sin(a),d=Math.cos(l),u=Math.sin(l),f=(y,v,x)=>Zt(y,a,l,!0)?1:Math.max(v,v*e,x,x*e),p=(y,v,x)=>Zt(y,a,l,!0)?-1:Math.min(v,v*e,x,x*e),g=f(0,c,d),m=f(N,h,u),b=p(L,c,d),_=p(L+N,h,u);s=(g-b)/2,n=(m-_)/2,o=-(g+b)/2,r=-(m+_)/2}return{ratioX:s,ratioY:n,offsetX:o,offsetY:r}}class Cr extends De{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:s,color:n}}=t.legend.options;return e.labels.map((o,r)=>{const l=t.getDatasetMeta(0).controller.getStyle(r);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:n,lineWidth:l.borderWidth,pointStyle:s,hidden:!t.getDataVisibility(r),index:r}})}return[]}},onClick(t,e,s){s.chart.toggleDataVisibility(e.index),s.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const s=this.getDataset().data,n=this._cachedMeta;if(this._parsing===!1)n._parsed=s;else{let o=l=>+s[l];if(A(s[t])){const{key:l="value"}=this._parsing;o=c=>+St(s[c],l)}let r,a;for(r=t,a=t+e;r<a;++r)n._parsed[r]=o(r)}}_getRotation(){return ct(this.options.rotation-90)}_getCircumference(){return ct(this.options.circumference)}_getRotationExtents(){let t=F,e=-F;for(let s=0;s<this.chart.data.datasets.length;++s)if(this.chart.isDatasetVisible(s)&&this.chart.getDatasetMeta(s).type===this._type){const n=this.chart.getDatasetMeta(s).controller,o=n._getRotation(),r=n._getCircumference();t=Math.min(t,o),e=Math.max(e,o+r)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:s}=e,n=this._cachedMeta,o=n.data,r=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,a=Math.max((Math.min(s.width,s.height)-r)/2,0),l=Math.min(Dn(this.options.cutout,a),1),c=this._getRingWeight(this.index),{circumference:h,rotation:d}=this._getRotationExtents(),{ratioX:u,ratioY:f,offsetX:p,offsetY:g}=wr(d,h,l),m=(s.width-r)/u,b=(s.height-r)/f,_=Math.max(Math.min(m,b)/2,0),y=Is(this.options.radius,_),v=Math.max(y*l,0),x=(y-v)/this._getVisibleDatasetWeightTotal();this.offsetX=p*y,this.offsetY=g*y,n.total=this.calculateTotal(),this.outerRadius=y-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*c,0),this.updateElements(o,0,o.length,t)}_circumference(t,e){const s=this.options,n=this._cachedMeta,o=this._getCircumference();return e&&s.animation.animateRotate||!this.chart.getDataVisibility(t)||n._parsed[t]===null||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*o/F)}updateElements(t,e,s,n){const o=n==="reset",r=this.chart,a=r.chartArea,c=r.options.animation,h=(a.left+a.right)/2,d=(a.top+a.bottom)/2,u=o&&c.animateScale,f=u?0:this.innerRadius,p=u?0:this.outerRadius,{sharedOptions:g,includeOptions:m}=this._getSharedOptions(e,n);let b=this._getRotation(),_;for(_=0;_<e;++_)b+=this._circumference(_,o);for(_=e;_<e+s;++_){const y=this._circumference(_,o),v=t[_],x={x:h+this.offsetX,y:d+this.offsetY,startAngle:b,endAngle:b+y,circumference:y,outerRadius:p,innerRadius:f};m&&(x.options=g||this.resolveDataElementOptions(_,v.active?"active":n)),b+=y,this.updateElement(v,_,x,n)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let s=0,n;for(n=0;n<e.length;n++){const o=t._parsed[n];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(n)&&!e[n].hidden&&(s+=Math.abs(o))}return s}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?F*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,s=this.chart,n=s.data.labels||[],o=ci(e._parsed[t],s.options.locale);return{label:n[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const s=this.chart;let n,o,r,a,l;if(!t){for(n=0,o=s.data.datasets.length;n<o;++n)if(s.isDatasetVisible(n)){r=s.getDatasetMeta(n),t=r.data,a=r.controller;break}}if(!t)return 0;for(n=0,o=t.length;n<o;++n)l=a.resolveDataElementOptions(n),l.borderAlign!=="inner"&&(e=Math.max(e,l.borderWidth||0,l.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let s=0,n=t.length;s<n;++s){const o=this.resolveDataElementOptions(s);e=Math.max(e,o.offset||0,o.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let s=0;s<t;++s)this.chart.isDatasetVisible(s)&&(e+=this._getRingWeight(s));return e}_getRingWeight(t){return Math.max(P(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class Pr extends De{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:s,data:n=[],_dataset:o}=e,r=this.chart._animationsDisabled;let{start:a,count:l}=qn(e,n,r);this._drawStart=a,this._drawCount=l,Gn(e)&&(a=0,l=n.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!o._decimated,s.points=n;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(s,void 0,{animated:!r,options:c},t),this.updateElements(n,a,l,t)}updateElements(t,e,s,n){const o=n==="reset",{iScale:r,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:h,includeOptions:d}=this._getSharedOptions(e,n),u=r.axis,f=a.axis,{spanGaps:p,segment:g}=this.options,m=Qt(p)?p:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||n==="none",_=e+s,y=t.length;let v=e>0&&this.getParsed(e-1);for(let x=0;x<y;++x){const k=t[x],S=b?k:{};if(x<e||x>=_){S.skip=!0;continue}const M=this.getParsed(x),w=T(M[f]),D=S[u]=r.getPixelForValue(M[u],x),C=S[f]=o||w?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,M,l):M[f],x);S.skip=isNaN(D)||isNaN(C)||w,S.stop=x>0&&Math.abs(M[u]-v[u])>m,g&&(S.parsed=M,S.raw=c.data[x]),d&&(S.options=h||this.resolveDataElementOptions(x,k.active?"active":n)),b||this.updateElement(k,x,S,n),v=M}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,s=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return s;const o=n[0].size(this.resolveDataElementOptions(0)),r=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,o,r)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}function xt(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class _i{static override(t){Object.assign(_i.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return xt()}parse(){return xt()}format(){return xt()}add(){return xt()}diff(){return xt()}startOf(){return xt()}endOf(){return xt()}}var Dr={_date:_i};function Or(i,t,e,s){const{controller:n,data:o,_sorted:r}=i,a=n._cachedMeta.iScale,l=i.dataset&&i.dataset.options?i.dataset.options.spanGaps:null;if(a&&t===a.axis&&t!=="r"&&r&&o.length){const c=a._reversePixels?jn:Mt;if(s){if(n._sharedOptions){const h=o[0],d=typeof h.getRange=="function"&&h.getRange(t);if(d){const u=c(o,t,e-d),f=c(o,t,e+d);return{lo:u.lo,hi:f.hi}}}}else{const h=c(o,t,e);if(l){const{vScale:d}=n._cachedMeta,{_parsed:u}=i,f=u.slice(0,h.lo+1).reverse().findIndex(g=>!T(g[d.axis]));h.lo-=Math.max(0,f);const p=u.slice(h.hi).findIndex(g=>!T(g[d.axis]));h.hi+=Math.max(0,p)}return h}}return{lo:0,hi:o.length-1}}function Oe(i,t,e,s,n){const o=i.getSortedVisibleDatasetMetas(),r=e[t];for(let a=0,l=o.length;a<l;++a){const{index:c,data:h}=o[a],{lo:d,hi:u}=Or(o[a],t,r,n);for(let f=d;f<=u;++f){const p=h[f];p.skip||s(p,c,f)}}}function Ar(i){const t=i.indexOf("x")!==-1,e=i.indexOf("y")!==-1;return function(s,n){const o=t?Math.abs(s.x-n.x):0,r=e?Math.abs(s.y-n.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(r,2))}}function We(i,t,e,s,n){const o=[];return!n&&!i.isPointInArea(t)||Oe(i,e,t,function(a,l,c){!n&&!$t(a,i.chartArea,0)||a.inRange(t.x,t.y,s)&&o.push({element:a,datasetIndex:l,index:c})},!0),o}function Tr(i,t,e,s){let n=[];function o(r,a,l){const{startAngle:c,endAngle:h}=r.getProps(["startAngle","endAngle"],s),{angle:d}=Fs(r,{x:t.x,y:t.y});Zt(d,c,h)&&n.push({element:r,datasetIndex:a,index:l})}return Oe(i,e,t,o),n}function Rr(i,t,e,s,n,o){let r=[];const a=Ar(e);let l=Number.POSITIVE_INFINITY;function c(h,d,u){const f=h.inRange(t.x,t.y,n);if(s&&!f)return;const p=h.getCenterPoint(n);if(!(!!o||i.isPointInArea(p))&&!f)return;const m=a(t,p);m<l?(r=[{element:h,datasetIndex:d,index:u}],l=m):m===l&&r.push({element:h,datasetIndex:d,index:u})}return Oe(i,e,t,c),r}function He(i,t,e,s,n,o){return!o&&!i.isPointInArea(t)?[]:e==="r"&&!s?Tr(i,t,e,n):Rr(i,t,e,s,n,o)}function qi(i,t,e,s,n){const o=[],r=e==="x"?"inXRange":"inYRange";let a=!1;return Oe(i,e,t,(l,c,h)=>{l[r]&&l[r](t[e],n)&&(o.push({element:l,datasetIndex:c,index:h}),a=a||l.inRange(t.x,t.y,n))}),s&&!a?[]:o}var Lr={modes:{index(i,t,e,s){const n=yt(t,i),o=e.axis||"x",r=e.includeInvisible||!1,a=e.intersect?We(i,n,o,s,r):He(i,n,o,!1,s,r),l=[];return a.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{const h=a[0].index,d=c.data[h];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:h})}),l):[]},dataset(i,t,e,s){const n=yt(t,i),o=e.axis||"xy",r=e.includeInvisible||!1;let a=e.intersect?We(i,n,o,s,r):He(i,n,o,!1,s,r);if(a.length>0){const l=a[0].datasetIndex,c=i.getDatasetMeta(l).data;a=[];for(let h=0;h<c.length;++h)a.push({element:c[h],datasetIndex:l,index:h})}return a},point(i,t,e,s){const n=yt(t,i),o=e.axis||"xy",r=e.includeInvisible||!1;return We(i,n,o,s,r)},nearest(i,t,e,s){const n=yt(t,i),o=e.axis||"xy",r=e.includeInvisible||!1;return He(i,n,o,e.intersect,s,r)},x(i,t,e,s){const n=yt(t,i);return qi(i,n,"x",e.intersect,s)},y(i,t,e,s){const n=yt(t,i);return qi(i,n,"y",e.intersect,s)}}};const sn=["left","top","right","bottom"];function Wt(i,t){return i.filter(e=>e.pos===t)}function Gi(i,t){return i.filter(e=>sn.indexOf(e.pos)===-1&&e.box.axis===t)}function Ht(i,t){return i.sort((e,s)=>{const n=t?s:e,o=t?e:s;return n.weight===o.weight?n.index-o.index:n.weight-o.weight})}function Ir(i){const t=[];let e,s,n,o,r,a;for(e=0,s=(i||[]).length;e<s;++e)n=i[e],{position:o,options:{stack:r,stackWeight:a=1}}=n,t.push({index:e,box:n,pos:o,horizontal:n.isHorizontal(),weight:n.weight,stack:r&&o+r,stackWeight:a});return t}function Er(i){const t={};for(const e of i){const{stack:s,pos:n,stackWeight:o}=e;if(!s||!sn.includes(n))continue;const r=t[s]||(t[s]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=o}return t}function zr(i,t){const e=Er(i),{vBoxMaxWidth:s,hBoxMaxHeight:n}=t;let o,r,a;for(o=0,r=i.length;o<r;++o){a=i[o];const{fullSize:l}=a.box,c=e[a.stack],h=c&&a.stackWeight/c.weight;a.horizontal?(a.width=h?h*s:l&&t.availableWidth,a.height=n):(a.width=s,a.height=h?h*n:l&&t.availableHeight)}return e}function Fr(i){const t=Ir(i),e=Ht(t.filter(c=>c.box.fullSize),!0),s=Ht(Wt(t,"left"),!0),n=Ht(Wt(t,"right")),o=Ht(Wt(t,"top"),!0),r=Ht(Wt(t,"bottom")),a=Gi(t,"x"),l=Gi(t,"y");return{fullSize:e,leftAndTop:s.concat(o),rightAndBottom:n.concat(l).concat(r).concat(a),chartArea:Wt(t,"chartArea"),vertical:s.concat(n).concat(l),horizontal:o.concat(r).concat(a)}}function Ji(i,t,e,s){return Math.max(i[e],t[e])+Math.max(i[s],t[s])}function nn(i,t){i.top=Math.max(i.top,t.top),i.left=Math.max(i.left,t.left),i.bottom=Math.max(i.bottom,t.bottom),i.right=Math.max(i.right,t.right)}function Br(i,t,e,s){const{pos:n,box:o}=e,r=i.maxPadding;if(!A(n)){e.size&&(i[n]-=e.size);const d=s[e.stack]||{size:0,count:1};d.size=Math.max(d.size,e.horizontal?o.height:o.width),e.size=d.size/d.count,i[n]+=e.size}o.getPadding&&nn(r,o.getPadding());const a=Math.max(0,t.outerWidth-Ji(r,i,"left","right")),l=Math.max(0,t.outerHeight-Ji(r,i,"top","bottom")),c=a!==i.w,h=l!==i.h;return i.w=a,i.h=l,e.horizontal?{same:c,other:h}:{same:h,other:c}}function Wr(i){const t=i.maxPadding;function e(s){const n=Math.max(t[s]-i[s],0);return i[s]+=n,n}i.y+=e("top"),i.x+=e("left"),e("right"),e("bottom")}function Hr(i,t){const e=t.maxPadding;function s(n){const o={left:0,top:0,right:0,bottom:0};return n.forEach(r=>{o[r]=Math.max(t[r],e[r])}),o}return s(i?["left","right"]:["top","bottom"])}function jt(i,t,e,s){const n=[];let o,r,a,l,c,h;for(o=0,r=i.length,c=0;o<r;++o){a=i[o],l=a.box,l.update(a.width||t.w,a.height||t.h,Hr(a.horizontal,t));const{same:d,other:u}=Br(t,e,a,s);c|=d&&n.length,h=h||u,l.fullSize||n.push(a)}return c&&jt(n,t,e,s)||h}function ce(i,t,e,s,n){i.top=e,i.left=t,i.right=t+s,i.bottom=e+n,i.width=s,i.height=n}function Qi(i,t,e,s){const n=e.padding;let{x:o,y:r}=t;for(const a of i){const l=a.box,c=s[a.stack]||{placed:0,weight:1},h=a.stackWeight/c.weight||1;if(a.horizontal){const d=t.w*h,u=c.size||l.height;Jt(c.start)&&(r=c.start),l.fullSize?ce(l,n.left,r,e.outerWidth-n.right-n.left,u):ce(l,t.left+c.placed,r,d,u),c.start=r,c.placed+=d,r=l.bottom}else{const d=t.h*h,u=c.size||l.width;Jt(c.start)&&(o=c.start),l.fullSize?ce(l,o,n.top,u,e.outerHeight-n.bottom-n.top):ce(l,o,t.top+c.placed,u,d),c.start=o,c.placed+=d,o=l.right}}t.x=o,t.y=r}var J={addBox(i,t){i.boxes||(i.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},i.boxes.push(t)},removeBox(i,t){const e=i.boxes?i.boxes.indexOf(t):-1;e!==-1&&i.boxes.splice(e,1)},configure(i,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(i,t,e,s){if(!i)return;const n=$(i.options.layout.padding),o=Math.max(t-n.width,0),r=Math.max(e-n.height,0),a=Fr(i.boxes),l=a.vertical,c=a.horizontal;R(i.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const h=l.reduce((g,m)=>m.box.options&&m.box.options.display===!1?g:g+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:e,padding:n,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/h,hBoxMaxHeight:r/2}),u=Object.assign({},n);nn(u,$(s));const f=Object.assign({maxPadding:u,w:o,h:r,x:n.left,y:n.top},n),p=zr(l.concat(c),d);jt(a.fullSize,f,d,p),jt(l,f,d,p),jt(c,f,d,p)&&jt(l,f,d,p),Wr(f),Qi(a.leftAndTop,f,d,p),f.x+=f.w,f.y+=f.h,Qi(a.rightAndBottom,f,d,p),i.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},R(a.chartArea,g=>{const m=g.box;Object.assign(m,i.chartArea),m.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class on{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,s){}removeEventListener(t,e,s){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,s,n){return e=Math.max(0,e||t.width),s=s||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):s)}}isAttached(t){return!0}updateConfig(t){}}class Nr extends on{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const pe="$chartjs",Vr={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Zi=i=>i===null||i==="";function jr(i,t){const e=i.style,s=i.getAttribute("height"),n=i.getAttribute("width");if(i[pe]={initial:{height:s,width:n,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",Zi(n)){const o=Ei(i,"width");o!==void 0&&(i.width=o)}if(Zi(s))if(i.style.height==="")i.height=i.width/(t||2);else{const o=Ei(i,"height");o!==void 0&&(i.height=o)}return i}const rn=Wo?{passive:!0}:!1;function Yr(i,t,e){i&&i.addEventListener(t,e,rn)}function Ur(i,t,e){i&&i.canvas&&i.canvas.removeEventListener(t,e,rn)}function Xr(i,t){const e=Vr[i.type]||i.type,{x:s,y:n}=yt(i,t);return{type:e,chart:t,native:i,x:s!==void 0?s:null,y:n!==void 0?n:null}}function Me(i,t){for(const e of i)if(e===t||e.contains(t))return!0}function Kr(i,t,e){const s=i.canvas,n=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||Me(a.addedNodes,s),r=r&&!Me(a.removedNodes,s);r&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}function qr(i,t,e){const s=i.canvas,n=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||Me(a.removedNodes,s),r=r&&!Me(a.addedNodes,s);r&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}const ee=new Map;let $i=0;function an(){const i=window.devicePixelRatio;i!==$i&&($i=i,ee.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function Gr(i,t){ee.size||window.addEventListener("resize",an),ee.set(i,t)}function Jr(i){ee.delete(i),ee.size||window.removeEventListener("resize",an)}function Qr(i,t,e){const s=i.canvas,n=s&&bi(s);if(!n)return;const o=Ns((a,l)=>{const c=n.clientWidth;e(a,l),c<n.clientWidth&&e()},window),r=new ResizeObserver(a=>{const l=a[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||o(c,h)});return r.observe(n),Gr(i,o),r}function Ne(i,t,e){e&&e.disconnect(),t==="resize"&&Jr(i)}function Zr(i,t,e){const s=i.canvas,n=Ns(o=>{i.ctx!==null&&e(Xr(o,i))},i);return Yr(s,t,n),n}class $r extends on{acquireContext(t,e){const s=t&&t.getContext&&t.getContext("2d");return s&&s.canvas===t?(jr(t,e),s):null}releaseContext(t){const e=t.canvas;if(!e[pe])return!1;const s=e[pe].initial;["height","width"].forEach(o=>{const r=s[o];T(r)?e.removeAttribute(o):e.setAttribute(o,r)});const n=s.style||{};return Object.keys(n).forEach(o=>{e.style[o]=n[o]}),e.width=e.width,delete e[pe],!0}addEventListener(t,e,s){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),r={attach:Kr,detach:qr,resize:Qr}[e]||Zr;n[e]=r(t,e,s)}removeEventListener(t,e){const s=t.$proxies||(t.$proxies={}),n=s[e];if(!n)return;({attach:Ne,detach:Ne,resize:Ne}[e]||Ur)(t,e,n),s[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,s,n){return Bo(t,e,s,n)}isAttached(t){const e=t&&bi(t);return!!(e&&e.isConnected)}}function ta(i){return!mi()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?Nr:$r}let ht=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:s}=this.getProps(["x","y"],t);return{x:e,y:s}}hasValue(){return Qt(this.x)&&Qt(this.y)}getProps(t,e){const s=this.$animations;if(!e||!s)return this;const n={};return t.forEach(o=>{n[o]=s[o]&&s[o].active()?s[o]._to:this[o]}),n}};function ea(i,t){const e=i.options.ticks,s=ia(i),n=Math.min(e.maxTicksLimit||s,s),o=e.major.enabled?na(t):[],r=o.length,a=o[0],l=o[r-1],c=[];if(r>n)return oa(t,c,o,r/n),c;const h=sa(o,t,n);if(r>0){let d,u;const f=r>1?Math.round((l-a)/(r-1)):null;for(he(t,c,h,T(f)?0:a-f,a),d=0,u=r-1;d<u;d++)he(t,c,h,o[d],o[d+1]);return he(t,c,h,l,T(f)?t.length:l+f),c}return he(t,c,h),c}function ia(i){const t=i.options.offset,e=i._tickSize(),s=i._length/e+(t?0:1),n=i._maxLength/e;return Math.floor(Math.min(s,n))}function sa(i,t,e){const s=ra(i),n=t.length/e;if(!s)return Math.max(n,1);const o=zn(s);for(let r=0,a=o.length-1;r<a;r++){const l=o[r];if(l>n)return l}return Math.max(n,1)}function na(i){const t=[];let e,s;for(e=0,s=i.length;e<s;e++)i[e].major&&t.push(e);return t}function oa(i,t,e,s){let n=0,o=e[0],r;for(s=Math.ceil(s),r=0;r<i.length;r++)r===o&&(t.push(i[r]),n++,o=e[n*s])}function he(i,t,e,s,n){const o=P(s,0),r=Math.min(P(n,i.length),i.length);let a=0,l,c,h;for(e=Math.ceil(e),n&&(l=n-s,e=l/Math.floor(l/e)),h=o;h<0;)a++,h=Math.round(o+a*e);for(c=Math.max(o,0);c<r;c++)c===h&&(t.push(i[c]),a++,h=Math.round(o+a*e))}function ra(i){const t=i.length;let e,s;if(t<2)return!1;for(s=i[0],e=1;e<t;++e)if(i[e]-i[e-1]!==s)return!1;return s}const aa=i=>i==="left"?"right":i==="right"?"left":i,ts=(i,t,e)=>t==="top"||t==="left"?i[t]+e:i[t]-e,es=(i,t)=>Math.min(t||i,i);function is(i,t){const e=[],s=i.length/t,n=i.length;let o=0;for(;o<n;o+=s)e.push(i[Math.floor(o)]);return e}function la(i,t,e){const s=i.ticks.length,n=Math.min(t,s-1),o=i._startPixel,r=i._endPixel,a=1e-6;let l=i.getPixelForTick(n),c;if(!(e&&(s===1?c=Math.max(l-o,r-l):t===0?c=(i.getPixelForTick(1)-l)/2:c=(l-i.getPixelForTick(n-1))/2,l+=n<t?c:-c,l<o-a||l>r+a)))return l}function ca(i,t){R(i,e=>{const s=e.gc,n=s.length/2;let o;if(n>t){for(o=0;o<n;++o)delete e.data[s[o]];s.splice(0,n)}})}function Nt(i){return i.drawTicks?i.tickLength:0}function ss(i,t){if(!i.display)return 0;const e=X(i.font,t),s=$(i.padding);return(H(i.text)?i.text.length:1)*e.lineHeight+s.height}function ha(i,t){return Pt(i,{scale:t,type:"scale"})}function da(i,t,e){return Pt(i,{tick:e,index:t,type:"tick"})}function ua(i,t,e){let s=ai(i);return(e&&t!=="right"||!e&&t==="right")&&(s=aa(s)),s}function fa(i,t,e,s){const{top:n,left:o,bottom:r,right:a,chart:l}=i,{chartArea:c,scales:h}=l;let d=0,u,f,p;const g=r-n,m=a-o;if(i.isHorizontal()){if(f=Y(s,o,a),A(e)){const b=Object.keys(e)[0],_=e[b];p=h[b].getPixelForValue(_)+g-t}else e==="center"?p=(c.bottom+c.top)/2+g-t:p=ts(i,e,t);u=a-o}else{if(A(e)){const b=Object.keys(e)[0],_=e[b];f=h[b].getPixelForValue(_)-m+t}else e==="center"?f=(c.left+c.right)/2-m+t:f=ts(i,e,t);p=Y(s,r,n),d=e==="left"?-N:N}return{titleX:f,titleY:p,maxWidth:u,rotation:d}}class Et extends ht{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:s,_suggestedMax:n}=this;return t=it(t,Number.POSITIVE_INFINITY),e=it(e,Number.NEGATIVE_INFINITY),s=it(s,Number.POSITIVE_INFINITY),n=it(n,Number.NEGATIVE_INFINITY),{min:it(t,s),max:it(e,n),minDefined:Z(t),maxDefined:Z(e)}}getMinMax(t){let{min:e,max:s,minDefined:n,maxDefined:o}=this.getUserBounds(),r;if(n&&o)return{min:e,max:s};const a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)r=a[l].controller.getMinMax(this,t),n||(e=Math.min(e,r.min)),o||(s=Math.max(s,r.max));return e=o&&e>s?s:e,s=n&&e>s?e:s,{min:it(e,it(s,e)),max:it(s,it(e,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){E(this.options.beforeUpdate,[this])}update(t,e,s){const{beginAtZero:n,grace:o,ticks:r}=this.options,a=r.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=mo(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?is(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||r.source==="auto")&&(this.ticks=ea(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,e,s;this.isHorizontal()?(e=this.left,s=this.right):(e=this.top,s=this.bottom,t=!t),this._startPixel=e,this._endPixel=s,this._reversePixels=t,this._length=s-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){E(this.options.afterUpdate,[this])}beforeSetDimensions(){E(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){E(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),E(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){E(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let s,n,o;for(s=0,n=t.length;s<n;s++)o=t[s],o.label=E(e.callback,[o.value,s,t],this)}afterTickToLabelConversion(){E(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){E(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,s=es(this.ticks.length,t.ticks.maxTicksLimit),n=e.minRotation||0,o=e.maxRotation;let r=n,a,l,c;if(!this._isVisible()||!e.display||n>=o||s<=1||!this.isHorizontal()){this.labelRotation=n;return}const h=this._getLabelSizes(),d=h.widest.width,u=h.highest.height,f=U(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/s:f/(s-1),d+6>a&&(a=f/(s-(t.offset?.5:1)),l=this.maxHeight-Nt(t.grid)-e.padding-ss(t.title,this.chart.options.font),c=Math.sqrt(d*d+u*u),r=Hn(Math.min(Math.asin(U((h.highest.height+6)/a,-1,1)),Math.asin(U(l/c,-1,1))-Math.asin(U(u/c,-1,1)))),r=Math.max(n,Math.min(o,r))),this.labelRotation=r}afterCalculateLabelRotation(){E(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){E(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:s,title:n,grid:o}}=this,r=this._isVisible(),a=this.isHorizontal();if(r){const l=ss(n,e.options.font);if(a?(t.width=this.maxWidth,t.height=Nt(o)+l):(t.height=this.maxHeight,t.width=Nt(o)+l),s.display&&this.ticks.length){const{first:c,last:h,widest:d,highest:u}=this._getLabelSizes(),f=s.padding*2,p=ct(this.labelRotation),g=Math.cos(p),m=Math.sin(p);if(a){const b=s.mirror?0:m*d.width+g*u.height;t.height=Math.min(this.maxHeight,t.height+b+f)}else{const b=s.mirror?0:g*d.width+m*u.height;t.width=Math.min(this.maxWidth,t.width+b+f)}this._calculatePadding(c,h,m,g)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,s,n){const{ticks:{align:o,padding:r},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,f=0;l?c?(u=n*t.width,f=s*e.height):(u=s*t.height,f=n*e.width):o==="start"?f=e.width:o==="end"?u=t.width:o!=="inner"&&(u=t.width/2,f=e.width/2),this.paddingLeft=Math.max((u-h+r)*this.width/(this.width-h),0),this.paddingRight=Math.max((f-d+r)*this.width/(this.width-d),0)}else{let h=e.height/2,d=t.height/2;o==="start"?(h=0,d=t.height):o==="end"&&(h=e.height,d=0),this.paddingTop=h+r,this.paddingBottom=d+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){E(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,s;for(e=0,s=t.length;e<s;e++)T(t[e].label)&&(t.splice(e,1),s--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let s=this.ticks;e<s.length&&(s=is(s,e)),this._labelSizes=t=this._computeLabelSizes(s,s.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,s){const{ctx:n,_longestTextCache:o}=this,r=[],a=[],l=Math.floor(e/es(e,s));let c=0,h=0,d,u,f,p,g,m,b,_,y,v,x;for(d=0;d<e;d+=l){if(p=t[d].label,g=this._resolveTickFontOptions(d),n.font=m=g.string,b=o[m]=o[m]||{data:{},gc:[]},_=g.lineHeight,y=v=0,!T(p)&&!H(p))y=Ai(n,b.data,b.gc,y,p),v=_;else if(H(p))for(u=0,f=p.length;u<f;++u)x=p[u],!T(x)&&!H(x)&&(y=Ai(n,b.data,b.gc,y,x),v+=_);r.push(y),a.push(v),c=Math.max(y,c),h=Math.max(v,h)}ca(o,e);const k=r.indexOf(c),S=a.indexOf(h),M=w=>({width:r[w]||0,height:a[w]||0});return{first:M(0),last:M(e-1),widest:M(k),highest:M(S),widths:r,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Vn(this._alignToPixels?_t(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const s=e[t];return s.$context||(s.$context=da(this.getContext(),t,s))}return this.$context||(this.$context=ha(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=ct(this.labelRotation),s=Math.abs(Math.cos(e)),n=Math.abs(Math.sin(e)),o=this._getLabelSizes(),r=t.autoSkipPadding||0,a=o?o.widest.width+r:0,l=o?o.highest.height+r:0;return this.isHorizontal()?l*s>a*n?a/s:l/n:l*n<a*s?l/s:a/n}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,s=this.chart,n=this.options,{grid:o,position:r,border:a}=n,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),u=Nt(o),f=[],p=a.setContext(this.getContext()),g=p.display?p.width:0,m=g/2,b=function(z){return _t(s,z,g)};let _,y,v,x,k,S,M,w,D,C,O,V;if(r==="top")_=b(this.bottom),S=this.bottom-u,w=_-m,C=b(t.top)+m,V=t.bottom;else if(r==="bottom")_=b(this.top),C=t.top,V=b(t.bottom)-m,S=_+m,w=this.top+u;else if(r==="left")_=b(this.right),k=this.right-u,M=_-m,D=b(t.left)+m,O=t.right;else if(r==="right")_=b(this.left),D=t.left,O=b(t.right)-m,k=_+m,M=this.left+u;else if(e==="x"){if(r==="center")_=b((t.top+t.bottom)/2+.5);else if(A(r)){const z=Object.keys(r)[0],B=r[z];_=b(this.chart.scales[z].getPixelForValue(B))}C=t.top,V=t.bottom,S=_+m,w=S+u}else if(e==="y"){if(r==="center")_=b((t.left+t.right)/2);else if(A(r)){const z=Object.keys(r)[0],B=r[z];_=b(this.chart.scales[z].getPixelForValue(B))}k=_-m,M=k-u,D=t.left,O=t.right}const G=P(n.ticks.maxTicksLimit,d),I=Math.max(1,Math.ceil(d/G));for(y=0;y<d;y+=I){const z=this.getContext(y),B=o.setContext(z),tt=a.setContext(z),j=B.lineWidth,Dt=B.color,se=tt.dash||[],Ot=tt.dashOffset,zt=B.tickWidth,pt=B.tickColor,Ft=B.tickBorderDash||[],mt=B.tickBorderDashOffset;v=la(this,y,l),v!==void 0&&(x=_t(s,v,j),c?k=M=D=O=x:S=w=C=V=x,f.push({tx1:k,ty1:S,tx2:M,ty2:w,x1:D,y1:C,x2:O,y2:V,width:j,color:Dt,borderDash:se,borderDashOffset:Ot,tickWidth:zt,tickColor:pt,tickBorderDash:Ft,tickBorderDashOffset:mt}))}return this._ticksLength=d,this._borderValue=_,f}_computeLabelItems(t){const e=this.axis,s=this.options,{position:n,ticks:o}=s,r=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:h,mirror:d}=o,u=Nt(s.grid),f=u+h,p=d?-h:f,g=-ct(this.labelRotation),m=[];let b,_,y,v,x,k,S,M,w,D,C,O,V="middle";if(n==="top")k=this.bottom-p,S=this._getXAxisLabelAlignment();else if(n==="bottom")k=this.top+p,S=this._getXAxisLabelAlignment();else if(n==="left"){const I=this._getYAxisLabelAlignment(u);S=I.textAlign,x=I.x}else if(n==="right"){const I=this._getYAxisLabelAlignment(u);S=I.textAlign,x=I.x}else if(e==="x"){if(n==="center")k=(t.top+t.bottom)/2+f;else if(A(n)){const I=Object.keys(n)[0],z=n[I];k=this.chart.scales[I].getPixelForValue(z)+f}S=this._getXAxisLabelAlignment()}else if(e==="y"){if(n==="center")x=(t.left+t.right)/2-f;else if(A(n)){const I=Object.keys(n)[0],z=n[I];x=this.chart.scales[I].getPixelForValue(z)}S=this._getYAxisLabelAlignment(u).textAlign}e==="y"&&(l==="start"?V="top":l==="end"&&(V="bottom"));const G=this._getLabelSizes();for(b=0,_=a.length;b<_;++b){y=a[b],v=y.label;const I=o.setContext(this.getContext(b));M=this.getPixelForTick(b)+o.labelOffset,w=this._resolveTickFontOptions(b),D=w.lineHeight,C=H(v)?v.length:1;const z=C/2,B=I.color,tt=I.textStrokeColor,j=I.textStrokeWidth;let Dt=S;r?(x=M,S==="inner"&&(b===_-1?Dt=this.options.reverse?"left":"right":b===0?Dt=this.options.reverse?"right":"left":Dt="center"),n==="top"?c==="near"||g!==0?O=-C*D+D/2:c==="center"?O=-G.highest.height/2-z*D+D:O=-G.highest.height+D/2:c==="near"||g!==0?O=D/2:c==="center"?O=G.highest.height/2-z*D:O=G.highest.height-C*D,d&&(O*=-1),g!==0&&!I.showLabelBackdrop&&(x+=D/2*Math.sin(g))):(k=M,O=(1-C)*D/2);let se;if(I.showLabelBackdrop){const Ot=$(I.backdropPadding),zt=G.heights[b],pt=G.widths[b];let Ft=O-Ot.top,mt=0-Ot.left;switch(V){case"middle":Ft-=zt/2;break;case"bottom":Ft-=zt;break}switch(S){case"center":mt-=pt/2;break;case"right":mt-=pt;break;case"inner":b===_-1?mt-=pt:b>0&&(mt-=pt/2);break}se={left:mt,top:Ft,width:pt+Ot.width,height:zt+Ot.height,color:I.backdropColor}}m.push({label:v,font:w,textOffset:O,options:{rotation:g,color:B,strokeColor:tt,strokeWidth:j,textAlign:Dt,textBaseline:V,translation:[x,k],backdrop:se}})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-ct(this.labelRotation))return t==="top"?"left":"right";let n="center";return e.align==="start"?n="left":e.align==="end"?n="right":e.align==="inner"&&(n="inner"),n}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:s,mirror:n,padding:o}}=this.options,r=this._getLabelSizes(),a=t+o,l=r.widest.width;let c,h;return e==="left"?n?(h=this.right+o,s==="near"?c="left":s==="center"?(c="center",h+=l/2):(c="right",h+=l)):(h=this.right-a,s==="near"?c="right":s==="center"?(c="center",h-=l/2):(c="left",h=this.left)):e==="right"?n?(h=this.left+o,s==="near"?c="right":s==="center"?(c="center",h-=l/2):(c="left",h-=l)):(h=this.left+a,s==="near"?c="left":s==="center"?(c="center",h+=l/2):(c="right",h=this.right)):c="right",{textAlign:c,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:s,top:n,width:o,height:r}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(s,n,o,r),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const n=this.ticks.findIndex(o=>o.value===t);return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){const e=this.options.grid,s=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,r;const a=(l,c,h)=>{!h.width||!h.color||(s.save(),s.lineWidth=h.width,s.strokeStyle=h.color,s.setLineDash(h.borderDash||[]),s.lineDashOffset=h.borderDashOffset,s.beginPath(),s.moveTo(l.x,l.y),s.lineTo(c.x,c.y),s.stroke(),s.restore())};if(e.display)for(o=0,r=n.length;o<r;++o){const l=n[o];e.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),e.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:s,grid:n}}=this,o=s.setContext(this.getContext()),r=s.display?o.width:0;if(!r)return;const a=n.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,h,d,u;this.isHorizontal()?(c=_t(t,this.left,r)-r/2,h=_t(t,this.right,a)+a/2,d=u=l):(d=_t(t,this.top,r)-r/2,u=_t(t,this.bottom,a)+a/2,c=h=l),e.save(),e.lineWidth=o.width,e.strokeStyle=o.color,e.beginPath(),e.moveTo(c,d),e.lineTo(h,u),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const s=this.ctx,n=this._computeLabelArea();n&&hi(s,n);const o=this.getLabelItems(t);for(const r of o){const a=r.options,l=r.font,c=r.label,h=r.textOffset;te(s,c,0,h,l,a)}n&&di(s)}drawTitle(){const{ctx:t,options:{position:e,title:s,reverse:n}}=this;if(!s.display)return;const o=X(s.font),r=$(s.padding),a=s.align;let l=o.lineHeight/2;e==="bottom"||e==="center"||A(e)?(l+=r.bottom,H(s.text)&&(l+=o.lineHeight*(s.text.length-1))):l+=r.top;const{titleX:c,titleY:h,maxWidth:d,rotation:u}=fa(this,l,e,a);te(t,s.text,0,0,o,{color:s.color,maxWidth:d,rotation:u,textAlign:ua(a,e,n),textBaseline:"middle",translation:[c,h]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,s=P(t.grid&&t.grid.z,-1),n=P(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Et.prototype.draw?[{z:e,draw:o=>{this.draw(o)}}]:[{z:s,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:e,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",n=[];let o,r;for(o=0,r=e.length;o<r;++o){const a=e[o];a[s]===this.id&&(!t||a.type===t)&&n.push(a)}return n}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return X(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class de{constructor(t,e,s){this.type=t,this.scope=e,this.override=s,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let s;ma(e)&&(s=this.register(e));const n=this.items,o=t.id,r=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in n||(n[o]=t,ga(t,r,s),this.override&&W.override(t.id,t.overrides)),r}get(t){return this.items[t]}unregister(t){const e=this.items,s=t.id,n=this.scope;s in e&&delete e[s],n&&s in W[n]&&(delete W[n][s],this.override&&delete wt[s])}}function ga(i,t,e){const s=Gt(Object.create(null),[e?W.get(e):{},W.get(t),i.defaults]);W.set(t,s),i.defaultRoutes&&pa(t,i.defaultRoutes),i.descriptors&&W.describe(t,i.descriptors)}function pa(i,t){Object.keys(t).forEach(e=>{const s=e.split("."),n=s.pop(),o=[i].concat(s).join("."),r=t[e].split("."),a=r.pop(),l=r.join(".");W.route(o,n,l,a)})}function ma(i){return"id"in i&&"defaults"in i}class ba{constructor(){this.controllers=new de(De,"datasets",!0),this.elements=new de(ht,"elements"),this.plugins=new de(Object,"plugins"),this.scales=new de(Et,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,s){[...e].forEach(n=>{const o=s||this._getRegistryForType(n);s||o.isForType(n)||o===this.plugins&&n.id?this._exec(t,o,n):R(n,r=>{const a=s||this._getRegistryForType(r);this._exec(t,a,r)})})}_exec(t,e,s){const n=oi(t);E(s["before"+n],[],s),e[t](s),E(s["after"+n],[],s)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const s=this._typedRegistries[e];if(s.isForType(t))return s}return this.plugins}_get(t,e,s){const n=e.get(t);if(n===void 0)throw new Error('"'+t+'" is not a registered '+s+".");return n}}var nt=new ba;class _a{constructor(){this._init=[]}notify(t,e,s,n){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=n?this._descriptors(t).filter(n):this._descriptors(t),r=this._notify(o,t,e,s);return e==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),r}_notify(t,e,s,n){n=n||{};for(const o of t){const r=o.plugin,a=r[s],l=[e,n,o.options];if(E(a,l,r)===!1&&n.cancelable)return!1}return!0}invalidate(){T(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const s=t&&t.config,n=P(s.options&&s.options.plugins,{}),o=xa(s);return n===!1&&!e?[]:va(t,o,n,e)}_notifyStateChanges(t){const e=this._oldCache||[],s=this._cache,n=(o,r)=>o.filter(a=>!r.some(l=>a.plugin.id===l.plugin.id));this._notify(n(e,s),t,"stop"),this._notify(n(s,e),t,"start")}}function xa(i){const t={},e=[],s=Object.keys(nt.plugins.items);for(let o=0;o<s.length;o++)e.push(nt.getPlugin(s[o]));const n=i.plugins||[];for(let o=0;o<n.length;o++){const r=n[o];e.indexOf(r)===-1&&(e.push(r),t[r.id]=!0)}return{plugins:e,localIds:t}}function ya(i,t){return!t&&i===!1?null:i===!0?{}:i}function va(i,{plugins:t,localIds:e},s,n){const o=[],r=i.getContext();for(const a of t){const l=a.id,c=ya(s[l],n);c!==null&&o.push({plugin:a,options:Ma(i.config,{plugin:a,local:e[l]},c,r)})}return o}function Ma(i,{plugin:t,local:e},s,n){const o=i.pluginScopeKeys(t),r=i.getOptionScopes(s,o);return e&&t.defaults&&r.push(t.defaults),i.createResolver(r,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Ke(i,t){const e=W.datasets[i]||{};return((t.datasets||{})[i]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function ka(i,t){let e=i;return i==="_index_"?e=t:i==="_value_"&&(e=t==="x"?"y":"x"),e}function Sa(i,t){return i===t?"_index_":"_value_"}function ns(i){if(i==="x"||i==="y"||i==="r")return i}function wa(i){if(i==="top"||i==="bottom")return"x";if(i==="left"||i==="right")return"y"}function qe(i,...t){if(ns(i))return i;for(const e of t){const s=e.axis||wa(e.position)||i.length>1&&ns(i[0].toLowerCase());if(s)return s}throw new Error(\`Cannot determine type of '\${i}' axis. Please provide 'axis' or 'position' option.\`)}function os(i,t,e){if(e[t+"AxisID"]===i)return{axis:t}}function Ca(i,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(s=>s.xAxisID===i||s.yAxisID===i);if(e.length)return os(i,"x",e[0])||os(i,"y",e[0])}return{}}function Pa(i,t){const e=wt[i.type]||{scales:{}},s=t.scales||{},n=Ke(i.type,t),o=Object.create(null);return Object.keys(s).forEach(r=>{const a=s[r];if(!A(a))return console.error(\`Invalid scale configuration for scale: \${r}\`);if(a._proxy)return console.warn(\`Ignoring resolver passed as options for scale: \${r}\`);const l=qe(r,a,Ca(r,i),W.scales[a.type]),c=Sa(l,n),h=e.scales||{};o[r]=Ut(Object.create(null),[{axis:l},a,h[l],h[c]])}),i.data.datasets.forEach(r=>{const a=r.type||i.type,l=r.indexAxis||Ke(a,t),h=(wt[a]||{}).scales||{};Object.keys(h).forEach(d=>{const u=ka(d,l),f=r[u+"AxisID"]||u;o[f]=o[f]||Object.create(null),Ut(o[f],[{axis:u},s[f],h[d]])})}),Object.keys(o).forEach(r=>{const a=o[r];Ut(a,[W.scales[a.type],W.scale])}),o}function ln(i){const t=i.options||(i.options={});t.plugins=P(t.plugins,{}),t.scales=Pa(i,t)}function cn(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function Da(i){return i=i||{},i.data=cn(i.data),ln(i),i}const rs=new Map,hn=new Set;function ue(i,t){let e=rs.get(i);return e||(e=t(),rs.set(i,e),hn.add(e)),e}const Vt=(i,t,e)=>{const s=St(t,e);s!==void 0&&i.add(s)};class Oa{constructor(t){this._config=Da(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=cn(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),ln(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return ue(t,()=>[[\`datasets.\${t}\`,""]])}datasetAnimationScopeKeys(t,e){return ue(\`\${t}.transition.\${e}\`,()=>[[\`datasets.\${t}.transitions.\${e}\`,\`transitions.\${e}\`],[\`datasets.\${t}\`,""]])}datasetElementScopeKeys(t,e){return ue(\`\${t}-\${e}\`,()=>[[\`datasets.\${t}.elements.\${e}\`,\`datasets.\${t}\`,\`elements.\${e}\`,""]])}pluginScopeKeys(t){const e=t.id,s=this.type;return ue(\`\${s}-plugin-\${e}\`,()=>[[\`plugins.\${e}\`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const s=this._scopeCache;let n=s.get(t);return(!n||e)&&(n=new Map,s.set(t,n)),n}getOptionScopes(t,e,s){const{options:n,type:o}=this,r=this._cachedScopes(t,s),a=r.get(e);if(a)return a;const l=new Set;e.forEach(h=>{t&&(l.add(t),h.forEach(d=>Vt(l,t,d))),h.forEach(d=>Vt(l,n,d)),h.forEach(d=>Vt(l,wt[o]||{},d)),h.forEach(d=>Vt(l,W,d)),h.forEach(d=>Vt(l,Ue,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),hn.has(e)&&r.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,wt[e]||{},W.datasets[e]||{},{type:e},W,Ue]}resolveNamedOptions(t,e,s,n=[""]){const o={$shared:!0},{resolver:r,subPrefixes:a}=as(this._resolverCache,t,n);let l=r;if(Ta(r,e)){o.$shared=!1,s=gt(s)?s():s;const c=this.createResolver(t,s,a);l=Lt(r,s,c)}for(const c of e)o[c]=l[c];return o}createResolver(t,e,s=[""],n){const{resolver:o}=as(this._resolverCache,t,s);return A(e)?Lt(o,e,void 0,n):o}}function as(i,t,e){let s=i.get(t);s||(s=new Map,i.set(t,s));const n=e.join();let o=s.get(n);return o||(o={resolver:fi(t,e),subPrefixes:e.filter(a=>!a.toLowerCase().includes("hover"))},s.set(n,o)),o}const Aa=i=>A(i)&&Object.getOwnPropertyNames(i).some(t=>gt(i[t]));function Ta(i,t){const{isScriptable:e,isIndexable:s}=Us(i);for(const n of t){const o=e(n),r=s(n),a=(r||o)&&i[n];if(o&&(gt(a)||Aa(a))||r&&H(a))return!0}return!1}var Ra="4.5.0";const La=["top","bottom","left","right","chartArea"];function ls(i,t){return i==="top"||i==="bottom"||La.indexOf(i)===-1&&t==="x"}function cs(i,t){return function(e,s){return e[i]===s[i]?e[t]-s[t]:e[i]-s[i]}}function hs(i){const t=i.chart,e=t.options.animation;t.notifyPlugins("afterRender"),E(e&&e.onComplete,[i],t)}function Ia(i){const t=i.chart,e=t.options.animation;E(e&&e.onProgress,[i],t)}function dn(i){return mi()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}const me={},ds=i=>{const t=dn(i);return Object.values(me).filter(e=>e.canvas===t).pop()};function Ea(i,t,e){const s=Object.keys(i);for(const n of s){const o=+n;if(o>=t){const r=i[n];delete i[n],(e>0||o>t)&&(i[o+e]=r)}}}function za(i,t,e,s){return!e||i.type==="mouseout"?null:s?t:i}let ie=class{static defaults=W;static instances=me;static overrides=wt;static registry=nt;static version=Ra;static getChart=ds;static register(...t){nt.add(...t),us()}static unregister(...t){nt.remove(...t),us()}constructor(t,e){const s=this.config=new Oa(e),n=dn(t),o=ds(n);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const r=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||ta(n)),this.platform.updateConfig(s);const a=this.platform.acquireContext(n,r.aspectRatio),l=a&&a.canvas,c=l&&l.height,h=l&&l.width;if(this.id=Pn(),this.ctx=a,this.canvas=l,this.width=h,this.height=c,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new _a,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Xn(d=>this.update(d),r.resizeDelay||0),this._dataChanges=[],me[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}at.listen(this,"complete",hs),at.listen(this,"progress",Ia),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:s,height:n,_aspectRatio:o}=this;return T(t)?e&&o?o:n?s/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return nt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Ii(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ti(this.canvas,this.ctx),this}stop(){return at.stop(this),this}resize(t,e){at.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const s=this.options,n=this.canvas,o=s.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(n,t,e,o),a=s.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,Ii(this,a,!0)&&(this.notifyPlugins("resize",{size:r}),E(s.onResize,[this,r],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};R(e,(s,n)=>{s.id=n})}buildOrUpdateScales(){const t=this.options,e=t.scales,s=this.scales,n=Object.keys(s).reduce((r,a)=>(r[a]=!1,r),{});let o=[];e&&(o=o.concat(Object.keys(e).map(r=>{const a=e[r],l=qe(r,a),c=l==="r",h=l==="x";return{options:a,dposition:c?"chartArea":h?"bottom":"left",dtype:c?"radialLinear":h?"category":"linear"}}))),R(o,r=>{const a=r.options,l=a.id,c=qe(l,a),h=P(a.type,r.dtype);(a.position===void 0||ls(a.position,c)!==ls(r.dposition))&&(a.position=r.dposition),n[l]=!0;let d=null;if(l in s&&s[l].type===h)d=s[l];else{const u=nt.getScale(h);d=new u({id:l,type:h,ctx:this.ctx,chart:this}),s[d.id]=d}d.init(a,t)}),R(n,(r,a)=>{r||delete s[a]}),R(s,r=>{J.configure(this,r,r.options),J.addBox(this,r)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,s=t.length;if(t.sort((n,o)=>n.index-o.index),s>e){for(let n=e;n<s;++n)this._destroyDatasetMeta(n);t.splice(e,s-e)}this._sortedMetasets=t.slice(0).sort(cs("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((s,n)=>{e.filter(o=>o===s._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let s,n;for(this._removeUnreferencedMetasets(),s=0,n=e.length;s<n;s++){const o=e[s];let r=this.getDatasetMeta(s);const a=o.type||this.config.type;if(r.type&&r.type!==a&&(this._destroyDatasetMeta(s),r=this.getDatasetMeta(s)),r.type=a,r.indexAxis=o.indexAxis||Ke(a,this.options),r.order=o.order||0,r.index=s,r.label=""+o.label,r.visible=this.isDatasetVisible(s),r.controller)r.controller.updateIndex(s),r.controller.linkScales();else{const l=nt.getController(a),{datasetElementType:c,dataElementType:h}=W.datasets[a];Object.assign(l,{dataElementType:nt.getElement(h),datasetElementType:c&&nt.getElement(c)}),r.controller=new l(this,s),t.push(r.controller)}}return this._updateMetasets(),t}_resetElements(){R(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const s=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let c=0,h=this.data.datasets.length;c<h;c++){const{controller:d}=this.getDatasetMeta(c),u=!n&&o.indexOf(d)===-1;d.buildOrUpdateElements(u),r=Math.max(+d.getMaxOverflow(),r)}r=this._minPadding=s.layout.autoPadding?r:0,this._updateLayout(r),n||R(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(cs("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){R(this.scales,t=>{J.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),s=new Set(t.events);(!vi(e,s)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:s,start:n,count:o}of e){const r=s==="_removeElements"?-o:o;Ea(t,n,r)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,s=o=>new Set(t.filter(r=>r[0]===o).map((r,a)=>a+","+r.splice(1).join(","))),n=s(0);for(let o=1;o<e;o++)if(!vi(n,s(o)))return;return Array.from(n).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;J.update(this,this.width,this.height,t);const e=this.chartArea,s=e.width<=0||e.height<=0;this._layers=[],R(this.boxes,n=>{s&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,o)=>{n._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,s=this.data.datasets.length;e<s;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,s=this.data.datasets.length;e<s;++e)this._updateDataset(e,gt(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const s=this.getDatasetMeta(t),n={meta:s,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",n)!==!1&&(s.controller._update(e),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(at.has(this)?this.attached&&!at.running(this)&&at.start(this):(this.draw(),hs({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:s,height:n}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(s,n)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,s=[];let n,o;for(n=0,o=e.length;n<o;++n){const r=e[n];(!t||r.visible)&&s.push(r)}return s}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,s={meta:t,index:t.index,cancelable:!0},n=$o(this,t);this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(n&&hi(e,n),t.controller.draw(),n&&di(e),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return $t(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,s,n){const o=Lr.modes[e];return typeof o=="function"?o(this,t,s,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],s=this._metasets;let n=s.filter(o=>o&&o._dataset===e).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},s.push(n)),n}getContext(){return this.$context||(this.$context=Pt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const s=this.getDatasetMeta(t);return typeof s.hidden=="boolean"?!s.hidden:!e.hidden}setDatasetVisibility(t,e){const s=this.getDatasetMeta(t);s.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,s){const n=s?"show":"hide",o=this.getDatasetMeta(t),r=o.controller._resolveAnimations(void 0,n);Jt(e)?(o.data[e].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),r.update(o,{visible:s}),this.update(a=>a.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),at.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Ti(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete me[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,s=(o,r)=>{e.addEventListener(this,o,r),t[o]=r},n=(o,r,a)=>{o.offsetX=r,o.offsetY=a,this._eventHandler(o)};R(this.options.events,o=>s(o,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,s=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},n=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let r;const a=()=>{n("attach",a),this.attached=!0,this.resize(),s("resize",o),s("detach",r)};r=()=>{this.attached=!1,n("resize",o),this._stop(),this._resize(0,0),s("attach",a)},e.isAttached(this.canvas)?a():r()}unbindEvents(){R(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},R(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,s){const n=s?"set":"remove";let o,r,a,l;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),a=0,l=t.length;a<l;++a){r=t[a];const c=r&&this.getDatasetMeta(r.datasetIndex).controller;c&&c[n+"HoverStyle"](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],s=t.map(({datasetIndex:o,index:r})=>{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[r],index:r}});!be(s,e)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,e))}notifyPlugins(t,e,s){return this._plugins.notify(this,t,e,s)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,s){const n=this.options.hover,o=(l,c)=>l.filter(h=>!c.some(d=>h.datasetIndex===d.datasetIndex&&h.index===d.index)),r=o(e,t),a=s?t:o(t,e);r.length&&this.updateHoverStyle(r,n.mode,!1),a.length&&n.mode&&this.updateHoverStyle(a,n.mode,!0)}_eventHandler(t,e){const s={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=r=>(r.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",s,n)===!1)return;const o=this._handleEvent(t,e,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,n),(o||s.changed)&&this.render(),this}_handleEvent(t,e,s){const{_active:n=[],options:o}=this,r=e,a=this._getActiveElements(t,n,s,r),l=Ln(t),c=za(t,this._lastEvent,s,l);s&&(this._lastEvent=null,E(o.onHover,[t,a,this],this),l&&E(o.onClick,[t,a,this],this));const h=!be(a,n);return(h||e)&&(this._active=a,this._updateHoverStyles(a,n,e)),this._lastEvent=c,h}_getActiveElements(t,e,s,n){if(t.type==="mouseout")return[];if(!s)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,n)}};function us(){return R(ie.instances,i=>i._plugins.invalidate())}function Fa(i,t,e){const{startAngle:s,x:n,y:o,outerRadius:r,innerRadius:a,options:l}=t,{borderWidth:c,borderJoinStyle:h}=l,d=Math.min(c/r,et(s-e));if(i.beginPath(),i.arc(n,o,r-c/2,s+d/2,e-d/2),a>0){const u=Math.min(c/a,et(s-e));i.arc(n,o,a+c/2,e-u/2,s+u/2,!0)}else{const u=Math.min(c/2,r*et(s-e));if(h==="round")i.arc(n,o,u,e-L/2,s+L/2,!0);else if(h==="bevel"){const f=2*u*u,p=-f*Math.cos(e+L/2)+n,g=-f*Math.sin(e+L/2)+o,m=f*Math.cos(s+L/2)+n,b=f*Math.sin(s+L/2)+o;i.lineTo(p,g),i.lineTo(m,b)}}i.closePath(),i.moveTo(0,0),i.rect(0,0,i.canvas.width,i.canvas.height),i.clip("evenodd")}function Ba(i,t,e){const{startAngle:s,pixelMargin:n,x:o,y:r,outerRadius:a,innerRadius:l}=t;let c=n/a;i.beginPath(),i.arc(o,r,a,s-c,e+c),l>n?(c=n/l,i.arc(o,r,l,e+c,s-c,!0)):i.arc(o,r,n,e+N,s-N),i.closePath(),i.clip()}function Wa(i){return ui(i,["outerStart","outerEnd","innerStart","innerEnd"])}function Ha(i,t,e,s){const n=Wa(i.options.borderRadius),o=(e-t)/2,r=Math.min(o,s*t/2),a=l=>{const c=(e-Math.min(o,l))*s/2;return U(l,0,Math.min(o,c))};return{outerStart:a(n.outerStart),outerEnd:a(n.outerEnd),innerStart:U(n.innerStart,0,r),innerEnd:U(n.innerEnd,0,r)}}function At(i,t,e,s){return{x:e+i*Math.cos(t),y:s+i*Math.sin(t)}}function ke(i,t,e,s,n,o){const{x:r,y:a,startAngle:l,pixelMargin:c,innerRadius:h}=t,d=Math.max(t.outerRadius+s+e-c,0),u=h>0?h+s+e+c:0;let f=0;const p=n-l;if(s){const I=h>0?h-s:0,z=d>0?d-s:0,B=(I+z)/2,tt=B!==0?p*B/(B+s):p;f=(p-tt)/2}const g=Math.max(.001,p*d-e/L)/d,m=(p-g)/2,b=l+m+f,_=n-m-f,{outerStart:y,outerEnd:v,innerStart:x,innerEnd:k}=Ha(t,u,d,_-b),S=d-y,M=d-v,w=b+y/S,D=_-v/M,C=u+x,O=u+k,V=b+x/C,G=_-k/O;if(i.beginPath(),o){const I=(w+D)/2;if(i.arc(r,a,d,w,I),i.arc(r,a,d,I,D),v>0){const j=At(M,D,r,a);i.arc(j.x,j.y,v,D,_+N)}const z=At(O,_,r,a);if(i.lineTo(z.x,z.y),k>0){const j=At(O,G,r,a);i.arc(j.x,j.y,k,_+N,G+Math.PI)}const B=(_-k/u+(b+x/u))/2;if(i.arc(r,a,u,_-k/u,B,!0),i.arc(r,a,u,B,b+x/u,!0),x>0){const j=At(C,V,r,a);i.arc(j.x,j.y,x,V+Math.PI,b-N)}const tt=At(S,b,r,a);if(i.lineTo(tt.x,tt.y),y>0){const j=At(S,w,r,a);i.arc(j.x,j.y,y,b-N,w)}}else{i.moveTo(r,a);const I=Math.cos(w)*d+r,z=Math.sin(w)*d+a;i.lineTo(I,z);const B=Math.cos(D)*d+r,tt=Math.sin(D)*d+a;i.lineTo(B,tt)}i.closePath()}function Na(i,t,e,s,n){const{fullCircles:o,startAngle:r,circumference:a}=t;let l=t.endAngle;if(o){ke(i,t,e,s,l,n);for(let c=0;c<o;++c)i.fill();isNaN(a)||(l=r+(a%F||F))}return ke(i,t,e,s,l,n),i.fill(),l}function Va(i,t,e,s,n){const{fullCircles:o,startAngle:r,circumference:a,options:l}=t,{borderWidth:c,borderJoinStyle:h,borderDash:d,borderDashOffset:u,borderRadius:f}=l,p=l.borderAlign==="inner";if(!c)return;i.setLineDash(d||[]),i.lineDashOffset=u,p?(i.lineWidth=c*2,i.lineJoin=h||"round"):(i.lineWidth=c,i.lineJoin=h||"bevel");let g=t.endAngle;if(o){ke(i,t,e,s,g,n);for(let m=0;m<o;++m)i.stroke();isNaN(a)||(g=r+(a%F||F))}p&&Ba(i,t,g),l.selfJoin&&g-r>=L&&f===0&&h!=="miter"&&Fa(i,t,g),o||(ke(i,t,e,s,g,n),i.stroke())}class Fl extends ht{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,s){const n=this.getProps(["x","y"],s),{angle:o,distance:r}=Fs(n,{x:t,y:e}),{startAngle:a,endAngle:l,innerRadius:c,outerRadius:h,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),u=(this.options.spacing+this.options.borderWidth)/2,f=P(d,l-a),p=Zt(o,a,l)&&a!==l,g=f>=F||p,m=dt(r,c+u,h+u);return g&&m}getCenterPoint(t){const{x:e,y:s,startAngle:n,endAngle:o,innerRadius:r,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:l,spacing:c}=this.options,h=(n+o)/2,d=(r+a+c+l)/2;return{x:e+Math.cos(h)*d,y:s+Math.sin(h)*d}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:s}=this,n=(e.offset||0)/4,o=(e.spacing||0)/2,r=e.circular;if(this.pixelMargin=e.borderAlign==="inner"?.33:0,this.fullCircles=s>F?Math.floor(s/F):0,s===0||this.innerRadius<0||this.outerRadius<0)return;t.save();const a=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(a)*n,Math.sin(a)*n);const l=1-Math.sin(Math.min(L,s||0)),c=n*l;t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,Na(t,this,c,o,r),Va(t,this,c,o,r),t.restore()}}function un(i,t,e=t){i.lineCap=P(e.borderCapStyle,t.borderCapStyle),i.setLineDash(P(e.borderDash,t.borderDash)),i.lineDashOffset=P(e.borderDashOffset,t.borderDashOffset),i.lineJoin=P(e.borderJoinStyle,t.borderJoinStyle),i.lineWidth=P(e.borderWidth,t.borderWidth),i.strokeStyle=P(e.borderColor,t.borderColor)}function ja(i,t,e){i.lineTo(e.x,e.y)}function Ya(i){return i.stepped?ro:i.tension||i.cubicInterpolationMode==="monotone"?ao:ja}function fn(i,t,e={}){const s=i.length,{start:n=0,end:o=s-1}=e,{start:r,end:a}=t,l=Math.max(n,r),c=Math.min(o,a),h=n<r&&o<r||n>a&&o>a;return{count:s,start:l,loop:t.loop,ilen:c<l&&!h?s+c-l:c-l}}function Ua(i,t,e,s){const{points:n,options:o}=t,{count:r,start:a,loop:l,ilen:c}=fn(n,e,s),h=Ya(o);let{move:d=!0,reverse:u}=s||{},f,p,g;for(f=0;f<=c;++f)p=n[(a+(u?c-f:f))%r],!p.skip&&(d?(i.moveTo(p.x,p.y),d=!1):h(i,g,p,u,o.stepped),g=p);return l&&(p=n[(a+(u?c:0))%r],h(i,g,p,u,o.stepped)),!!l}function Xa(i,t,e,s){const n=t.points,{count:o,start:r,ilen:a}=fn(n,e,s),{move:l=!0,reverse:c}=s||{};let h=0,d=0,u,f,p,g,m,b;const _=v=>(r+(c?a-v:v))%o,y=()=>{g!==m&&(i.lineTo(h,m),i.lineTo(h,g),i.lineTo(h,b))};for(l&&(f=n[_(0)],i.moveTo(f.x,f.y)),u=0;u<=a;++u){if(f=n[_(u)],f.skip)continue;const v=f.x,x=f.y,k=v|0;k===p?(x<g?g=x:x>m&&(m=x),h=(d*h+v)/++d):(y(),i.lineTo(v,x),p=k,d=0,g=m=x),b=x}y()}function Ge(i){const t=i.options,e=t.borderDash&&t.borderDash.length;return!i._decimated&&!i._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?Xa:Ua}function Ka(i){return i.stepped?Ho:i.tension||i.cubicInterpolationMode==="monotone"?No:vt}function qa(i,t,e,s){let n=t._path;n||(n=t._path=new Path2D,t.path(n,e,s)&&n.closePath()),un(i,t.options),i.stroke(n)}function Ga(i,t,e,s){const{segments:n,options:o}=t,r=Ge(t);for(const a of n)un(i,o,a.style),i.beginPath(),r(i,t,a,{start:e,end:e+s-1})&&i.closePath(),i.stroke()}const Ja=typeof Path2D=="function";function Qa(i,t,e,s){Ja&&!t.options.segment?qa(i,t,e,s):Ga(i,t,e,s)}class Bl extends ht{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){const n=s.spanGaps?this._loop:this._fullLoop;Ro(this._points,s,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Go(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,s=t.length;return s&&e[t[s-1].end]}interpolate(t,e){const s=this.options,n=t[e],o=this.points,r=Xo(this,{property:e,start:n,end:n});if(!r.length)return;const a=[],l=Ka(s);let c,h;for(c=0,h=r.length;c<h;++c){const{start:d,end:u}=r[c],f=o[d],p=o[u];if(f===p){a.push(f);continue}const g=Math.abs((n-f[e])/(p[e]-f[e])),m=l(f,p,g,s.stepped);m[e]=t[e],a.push(m)}return a.length===1?a[0]:a}pathSegment(t,e,s){return Ge(this)(t,this,e,s)}path(t,e,s){const n=this.segments,o=Ge(this);let r=this._loop;e=e||0,s=s||this.points.length-e;for(const a of n)r&=o(t,this,a,{start:e,end:e+s-1});return!!r}draw(t,e,s,n){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),Qa(t,this,s,n),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function fs(i,t,e,s){const n=i.options,{[e]:o}=i.getProps([e],s);return Math.abs(t-o)<n.radius+n.hitRadius}class Wl extends ht{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,s){const n=this.options,{x:o,y:r}=this.getProps(["x","y"],s);return Math.pow(t-o,2)+Math.pow(e-r,2)<Math.pow(n.hitRadius+n.radius,2)}inXRange(t,e){return fs(this,t,"x",e)}inYRange(t,e){return fs(this,t,"y",e)}getCenterPoint(t){const{x:e,y:s}=this.getProps(["x","y"],t);return{x:e,y:s}}size(t){t=t||this.options||{};let e=t.radius||0;e=Math.max(e,e&&t.hoverRadius||0);const s=e&&t.borderWidth||0;return(e+s)*2}draw(t,e){const s=this.options;this.skip||s.radius<.1||!$t(this,e,this.size(s)/2)||(t.strokeStyle=s.borderColor,t.lineWidth=s.borderWidth,t.fillStyle=s.backgroundColor,Xe(t,s,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function gn(i,t){const{x:e,y:s,base:n,width:o,height:r}=i.getProps(["x","y","base","width","height"],t);let a,l,c,h,d;return i.horizontal?(d=r/2,a=Math.min(e,n),l=Math.max(e,n),c=s-d,h=s+d):(d=o/2,a=e-d,l=e+d,c=Math.min(s,n),h=Math.max(s,n)),{left:a,top:c,right:l,bottom:h}}function ut(i,t,e,s){return i?0:U(t,e,s)}function Za(i,t,e){const s=i.options.borderWidth,n=i.borderSkipped,o=Ys(s);return{t:ut(n.top,o.top,0,e),r:ut(n.right,o.right,0,t),b:ut(n.bottom,o.bottom,0,e),l:ut(n.left,o.left,0,t)}}function $a(i,t,e){const{enableBorderRadius:s}=i.getProps(["enableBorderRadius"]),n=i.options.borderRadius,o=Tt(n),r=Math.min(t,e),a=i.borderSkipped,l=s||A(n);return{topLeft:ut(!l||a.top||a.left,o.topLeft,0,r),topRight:ut(!l||a.top||a.right,o.topRight,0,r),bottomLeft:ut(!l||a.bottom||a.left,o.bottomLeft,0,r),bottomRight:ut(!l||a.bottom||a.right,o.bottomRight,0,r)}}function tl(i){const t=gn(i),e=t.right-t.left,s=t.bottom-t.top,n=Za(i,e/2,s/2),o=$a(i,e/2,s/2);return{outer:{x:t.left,y:t.top,w:e,h:s,radius:o},inner:{x:t.left+n.l,y:t.top+n.t,w:e-n.l-n.r,h:s-n.t-n.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(n.t,n.l)),topRight:Math.max(0,o.topRight-Math.max(n.t,n.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(n.b,n.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(n.b,n.r))}}}}function Ve(i,t,e,s){const n=t===null,o=e===null,a=i&&!(n&&o)&&gn(i,s);return a&&(n||dt(t,a.left,a.right))&&(o||dt(e,a.top,a.bottom))}function el(i){return i.topLeft||i.topRight||i.bottomLeft||i.bottomRight}function il(i,t){i.rect(t.x,t.y,t.w,t.h)}function je(i,t,e={}){const s=i.x!==e.x?-t:0,n=i.y!==e.y?-t:0,o=(i.x+i.w!==e.x+e.w?t:0)-s,r=(i.y+i.h!==e.y+e.h?t:0)-n;return{x:i.x+s,y:i.y+n,w:i.w+o,h:i.h+r,radius:i.radius}}class Hl extends ht{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:s,backgroundColor:n}}=this,{inner:o,outer:r}=tl(this),a=el(r.radius)?ye:il;t.save(),(r.w!==o.w||r.h!==o.h)&&(t.beginPath(),a(t,je(r,e,o)),t.clip(),a(t,je(o,-e,r)),t.fillStyle=s,t.fill("evenodd")),t.beginPath(),a(t,je(o,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,s){return Ve(this,t,e,s)}inXRange(t,e){return Ve(this,t,null,e)}inYRange(t,e){return Ve(this,null,t,e)}getCenterPoint(t){const{x:e,y:s,base:n,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+n)/2:e,y:o?s:(s+n)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}const gs=(i,t)=>{let{boxHeight:e=t,boxWidth:s=t}=i;return i.usePointStyle&&(e=Math.min(e,t),s=i.pointStyleWidth||Math.min(s,t)),{boxWidth:s,boxHeight:e,itemHeight:Math.max(t,e)}},sl=(i,t)=>i!==null&&t!==null&&i.datasetIndex===t.datasetIndex&&i.index===t.index;class ps extends ht{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,s){this.maxWidth=t,this.maxHeight=e,this._margins=s,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=E(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(s=>t.filter(s,this.chart.data))),t.sort&&(e=e.sort((s,n)=>t.sort(s,n,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const s=t.labels,n=X(s.font),o=n.size,r=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=gs(s,o);let c,h;e.font=n.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(r,o,a,l)+10):(h=this.maxHeight,c=this._fitCols(r,n,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,s,n){const{ctx:o,maxWidth:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=n+a;let d=t;o.textAlign="left",o.textBaseline="middle";let u=-1,f=-h;return this.legendItems.forEach((p,g)=>{const m=s+e/2+o.measureText(p.text).width;(g===0||c[c.length-1]+m+2*a>r)&&(d+=h,c[c.length-(g>0?0:1)]=0,f+=h,u++),l[g]={left:0,top:f,row:u,width:m,height:n},c[c.length-1]+=m+a}),d}_fitCols(t,e,s,n){const{ctx:o,maxHeight:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=r-t;let d=a,u=0,f=0,p=0,g=0;return this.legendItems.forEach((m,b)=>{const{itemWidth:_,itemHeight:y}=nl(s,e,o,m,n);b>0&&f+y+2*a>h&&(d+=u+a,c.push({width:u,height:f}),p+=u+a,g++,u=f=0),l[b]={left:p,top:f,col:g,width:_,height:y},u=Math.max(u,_),f+=y+a}),d+=u,c.push({width:u,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:s,labels:{padding:n},rtl:o}}=this,r=Rt(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=Y(s,this.left+n,this.right-this.lineWidths[a]);for(const c of e)a!==c.row&&(a=c.row,l=Y(s,this.left+n,this.right-this.lineWidths[a])),c.top+=this.top+t+n,c.left=r.leftForLtr(r.x(l),c.width),l+=c.width+n}else{let a=0,l=Y(s,this.top+t+n,this.bottom-this.columnSizes[a].height);for(const c of e)c.col!==a&&(a=c.col,l=Y(s,this.top+t+n,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+n,c.left=r.leftForLtr(r.x(c.left),c.width),l+=c.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;hi(t,this),this._draw(),di(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:s,ctx:n}=this,{align:o,labels:r}=t,a=W.color,l=Rt(t.rtl,this.left,this.width),c=X(r.font),{padding:h}=r,d=c.size,u=d/2;let f;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=c.string;const{boxWidth:p,boxHeight:g,itemHeight:m}=gs(r,d),b=function(k,S,M){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;n.save();const w=P(M.lineWidth,1);if(n.fillStyle=P(M.fillStyle,a),n.lineCap=P(M.lineCap,"butt"),n.lineDashOffset=P(M.lineDashOffset,0),n.lineJoin=P(M.lineJoin,"miter"),n.lineWidth=w,n.strokeStyle=P(M.strokeStyle,a),n.setLineDash(P(M.lineDash,[])),r.usePointStyle){const D={radius:g*Math.SQRT2/2,pointStyle:M.pointStyle,rotation:M.rotation,borderWidth:w},C=l.xPlus(k,p/2),O=S+u;js(n,D,C,O,r.pointStyleWidth&&p)}else{const D=S+Math.max((d-g)/2,0),C=l.leftForLtr(k,p),O=Tt(M.borderRadius);n.beginPath(),Object.values(O).some(V=>V!==0)?ye(n,{x:C,y:D,w:p,h:g,radius:O}):n.rect(C,D,p,g),n.fill(),w!==0&&n.stroke()}n.restore()},_=function(k,S,M){te(n,M.text,k,S+m/2,c,{strikethrough:M.hidden,textAlign:l.textAlign(M.textAlign)})},y=this.isHorizontal(),v=this._computeTitleHeight();y?f={x:Y(o,this.left+h,this.right-s[0]),y:this.top+h+v,line:0}:f={x:this.left+h,y:Y(o,this.top+v+h,this.bottom-e[0].height),line:0},Js(this.ctx,t.textDirection);const x=m+h;this.legendItems.forEach((k,S)=>{n.strokeStyle=k.fontColor,n.fillStyle=k.fontColor;const M=n.measureText(k.text).width,w=l.textAlign(k.textAlign||(k.textAlign=r.textAlign)),D=p+u+M;let C=f.x,O=f.y;l.setWidth(this.width),y?S>0&&C+D+h>this.right&&(O=f.y+=x,f.line++,C=f.x=Y(o,this.left+h,this.right-s[f.line])):S>0&&O+x>this.bottom&&(C=f.x=C+e[f.line].width+h,f.line++,O=f.y=Y(o,this.top+v+h,this.bottom-e[f.line].height));const V=l.x(C);if(b(V,O,k),C=Kn(w,C+p+u,y?C+D:this.right,t.rtl),_(l.x(C),O,k),y)f.x+=D+h;else if(typeof k.text!="string"){const G=c.lineHeight;f.y+=pn(k,G)+h}else f.y+=x}),Qs(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,s=X(e.font),n=$(e.padding);if(!e.display)return;const o=Rt(t.rtl,this.left,this.width),r=this.ctx,a=e.position,l=s.size/2,c=n.top+l;let h,d=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),h=this.top+c,d=Y(t.align,d,this.right-u);else{const p=this.columnSizes.reduce((g,m)=>Math.max(g,m.height),0);h=c+Y(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}const f=Y(a,d,d+u);r.textAlign=o.textAlign(ai(a)),r.textBaseline="middle",r.strokeStyle=e.color,r.fillStyle=e.color,r.font=s.string,te(r,e.text,f,h,s)}_computeTitleHeight(){const t=this.options.title,e=X(t.font),s=$(t.padding);return t.display?e.lineHeight+s.height:0}_getLegendItemAt(t,e){let s,n,o;if(dt(t,this.left,this.right)&&dt(e,this.top,this.bottom)){for(o=this.legendHitBoxes,s=0;s<o.length;++s)if(n=o[s],dt(t,n.left,n.left+n.width)&&dt(e,n.top,n.top+n.height))return this.legendItems[s]}return null}handleEvent(t){const e=this.options;if(!al(t.type,e))return;const s=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const n=this._hoveredItem,o=sl(n,s);n&&!o&&E(e.onLeave,[t,n,this],this),this._hoveredItem=s,s&&!o&&E(e.onHover,[t,s,this],this)}else s&&E(e.onClick,[t,s,this],this)}}function nl(i,t,e,s,n){const o=ol(s,i,t,e),r=rl(n,s,t.lineHeight);return{itemWidth:o,itemHeight:r}}function ol(i,t,e,s){let n=i.text;return n&&typeof n!="string"&&(n=n.reduce((o,r)=>o.length>r.length?o:r)),t+e.size/2+s.measureText(n).width}function rl(i,t,e){let s=i;return typeof t.text!="string"&&(s=pn(t,e)),s}function pn(i,t){const e=i.text?i.text.length:0;return t*e}function al(i,t){return!!((i==="mousemove"||i==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(i==="click"||i==="mouseup"))}var Nl={id:"legend",_element:ps,start(i,t,e){const s=i.legend=new ps({ctx:i.ctx,options:e,chart:i});J.configure(i,s,e),J.addBox(i,s)},stop(i){J.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,t,e){const s=i.legend;J.configure(i,s,e),s.options=e},afterUpdate(i){const t=i.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(i,t){t.replay||i.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(i,t,e){const s=t.datasetIndex,n=e.chart;n.isDatasetVisible(s)?(n.hide(s),t.hidden=!0):(n.show(s),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:i=>i.chart.options.color,boxWidth:40,padding:10,generateLabels(i){const t=i.data.datasets,{labels:{usePointStyle:e,pointStyle:s,textAlign:n,color:o,useBorderRadius:r,borderRadius:a}}=i.legend.options;return i._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(e?0:void 0),h=$(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:c.borderColor,pointStyle:s||c.pointStyle,rotation:c.rotation,textAlign:n||c.textAlign,borderRadius:r&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}};class mn extends ht{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const s=this.options;if(this.left=0,this.top=0,!s.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const n=H(s.text)?s.text.length:1;this._padding=$(s.padding);const o=n*X(s.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:s,bottom:n,right:o,options:r}=this,a=r.align;let l=0,c,h,d;return this.isHorizontal()?(h=Y(a,s,o),d=e+t,c=o-s):(r.position==="left"?(h=s+t,d=Y(a,n,e),l=L*-.5):(h=o-t,d=Y(a,e,n),l=L*.5),c=n-e),{titleX:h,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const s=X(e.font),o=s.lineHeight/2+this._padding.top,{titleX:r,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);te(t,e.text,0,0,s,{color:e.color,maxWidth:l,rotation:c,textAlign:ai(e.align),textBaseline:"middle",translation:[r,a]})}}function ll(i,t){const e=new mn({ctx:i.ctx,options:t,chart:i});J.configure(i,e,t),J.addBox(i,e),i.titleBlock=e}var Vl={id:"title",_element:mn,start(i,t,e){ll(i,e)},stop(i){const t=i.titleBlock;J.removeBox(i,t),delete i.titleBlock},beforeUpdate(i,t,e){const s=i.titleBlock;J.configure(i,s,e),s.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Yt={average(i){if(!i.length)return!1;let t,e,s=new Set,n=0,o=0;for(t=0,e=i.length;t<e;++t){const a=i[t].element;if(a&&a.hasValue()){const l=a.tooltipPosition();s.add(l.x),n+=l.y,++o}}return o===0||s.size===0?!1:{x:[...s].reduce((a,l)=>a+l)/s.size,y:n/o}},nearest(i,t){if(!i.length)return!1;let e=t.x,s=t.y,n=Number.POSITIVE_INFINITY,o,r,a;for(o=0,r=i.length;o<r;++o){const l=i[o].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),h=Ye(t,c);h<n&&(n=h,a=l)}}if(a){const l=a.tooltipPosition();e=l.x,s=l.y}return{x:e,y:s}}};function st(i,t){return t&&(H(t)?Array.prototype.push.apply(i,t):i.push(t)),i}function lt(i){return(typeof i=="string"||i instanceof String)&&i.indexOf(\`
21272
+ \`)>-1?i.split(\`
21273
+ \`):i}function cl(i,t){const{element:e,datasetIndex:s,index:n}=t,o=i.getDatasetMeta(s).controller,{label:r,value:a}=o.getLabelAndValue(n);return{chart:i,label:r,parsed:o.getParsed(n),raw:i.data.datasets[s].data[n],formattedValue:a,dataset:o.getDataset(),dataIndex:n,datasetIndex:s,element:e}}function ms(i,t){const e=i.chart.ctx,{body:s,footer:n,title:o}=i,{boxWidth:r,boxHeight:a}=t,l=X(t.bodyFont),c=X(t.titleFont),h=X(t.footerFont),d=o.length,u=n.length,f=s.length,p=$(t.padding);let g=p.height,m=0,b=s.reduce((v,x)=>v+x.before.length+x.lines.length+x.after.length,0);if(b+=i.beforeBody.length+i.afterBody.length,d&&(g+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),b){const v=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;g+=f*v+(b-f)*l.lineHeight+(b-1)*t.bodySpacing}u&&(g+=t.footerMarginTop+u*h.lineHeight+(u-1)*t.footerSpacing);let _=0;const y=function(v){m=Math.max(m,e.measureText(v).width+_)};return e.save(),e.font=c.string,R(i.title,y),e.font=l.string,R(i.beforeBody.concat(i.afterBody),y),_=t.displayColors?r+2+t.boxPadding:0,R(s,v=>{R(v.before,y),R(v.lines,y),R(v.after,y)}),_=0,e.font=h.string,R(i.footer,y),e.restore(),m+=p.width,{width:m,height:g}}function hl(i,t){const{y:e,height:s}=t;return e<s/2?"top":e>i.height-s/2?"bottom":"center"}function dl(i,t,e,s){const{x:n,width:o}=s,r=e.caretSize+e.caretPadding;if(i==="left"&&n+o+r>t.width||i==="right"&&n-o-r<0)return!0}function ul(i,t,e,s){const{x:n,width:o}=e,{width:r,chartArea:{left:a,right:l}}=i;let c="center";return s==="center"?c=n<=(a+l)/2?"left":"right":n<=o/2?c="left":n>=r-o/2&&(c="right"),dl(c,i,t,e)&&(c="center"),c}function bs(i,t,e){const s=e.yAlign||t.yAlign||hl(i,e);return{xAlign:e.xAlign||t.xAlign||ul(i,t,e,s),yAlign:s}}function fl(i,t){let{x:e,width:s}=i;return t==="right"?e-=s:t==="center"&&(e-=s/2),e}function gl(i,t,e){let{y:s,height:n}=i;return t==="top"?s+=e:t==="bottom"?s-=n+e:s-=n/2,s}function _s(i,t,e,s){const{caretSize:n,caretPadding:o,cornerRadius:r}=i,{xAlign:a,yAlign:l}=e,c=n+o,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=Tt(r);let p=fl(t,a);const g=gl(t,l,c);return l==="center"?a==="left"?p+=c:a==="right"&&(p-=c):a==="left"?p-=Math.max(h,u)+n:a==="right"&&(p+=Math.max(d,f)+n),{x:U(p,0,s.width-t.width),y:U(g,0,s.height-t.height)}}function fe(i,t,e){const s=$(e.padding);return t==="center"?i.x+i.width/2:t==="right"?i.x+i.width-s.right:i.x+s.left}function xs(i){return st([],lt(i))}function pl(i,t,e){return Pt(i,{tooltip:t,tooltipItems:e,type:"tooltip"})}function ys(i,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?i.override(e):i}const bn={beforeTitle:rt,title(i){if(i.length>0){const t=i[0],e=t.chart.data.labels,s=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(s>0&&t.dataIndex<s)return e[t.dataIndex]}return""},afterTitle:rt,beforeBody:rt,beforeLabel:rt,label(i){if(this&&this.options&&this.options.mode==="dataset")return i.label+": "+i.formattedValue||i.formattedValue;let t=i.dataset.label||"";t&&(t+=": ");const e=i.formattedValue;return T(e)||(t+=e),t},labelColor(i){const e=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(i){const e=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:rt,afterBody:rt,beforeFooter:rt,footer:rt,afterFooter:rt};function K(i,t,e,s){const n=i[t].call(e,s);return typeof n>"u"?bn[t].call(e,s):n}class vs extends ht{static positioners=Yt;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,s=this.options.setContext(this.getContext()),n=s.enabled&&e.options.animation&&s.animations,o=new $s(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=pl(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:s}=e,n=K(s,"beforeTitle",this,t),o=K(s,"title",this,t),r=K(s,"afterTitle",this,t);let a=[];return a=st(a,lt(n)),a=st(a,lt(o)),a=st(a,lt(r)),a}getBeforeBody(t,e){return xs(K(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:s}=e,n=[];return R(t,o=>{const r={before:[],lines:[],after:[]},a=ys(s,o);st(r.before,lt(K(a,"beforeLabel",this,o))),st(r.lines,K(a,"label",this,o)),st(r.after,lt(K(a,"afterLabel",this,o))),n.push(r)}),n}getAfterBody(t,e){return xs(K(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:s}=e,n=K(s,"beforeFooter",this,t),o=K(s,"footer",this,t),r=K(s,"afterFooter",this,t);let a=[];return a=st(a,lt(n)),a=st(a,lt(o)),a=st(a,lt(r)),a}_createItems(t){const e=this._active,s=this.chart.data,n=[],o=[],r=[];let a=[],l,c;for(l=0,c=e.length;l<c;++l)a.push(cl(this.chart,e[l]));return t.filter&&(a=a.filter((h,d,u)=>t.filter(h,d,u,s))),t.itemSort&&(a=a.sort((h,d)=>t.itemSort(h,d,s))),R(a,h=>{const d=ys(t.callbacks,h);n.push(K(d,"labelColor",this,h)),o.push(K(d,"labelPointStyle",this,h)),r.push(K(d,"labelTextColor",this,h))}),this.labelColors=n,this.labelPointStyles=o,this.labelTextColors=r,this.dataPoints=a,a}update(t,e){const s=this.options.setContext(this.getContext()),n=this._active;let o,r=[];if(!n.length)this.opacity!==0&&(o={opacity:0});else{const a=Yt[s.position].call(this,n,this._eventPosition);r=this._createItems(s),this.title=this.getTitle(r,s),this.beforeBody=this.getBeforeBody(r,s),this.body=this.getBody(r,s),this.afterBody=this.getAfterBody(r,s),this.footer=this.getFooter(r,s);const l=this._size=ms(this,s),c=Object.assign({},a,l),h=bs(this.chart,s,c),d=_s(s,c,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=r,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,s,n){const o=this.getCaretPosition(t,s,n);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,s){const{xAlign:n,yAlign:o}=this,{caretSize:r,cornerRadius:a}=s,{topLeft:l,topRight:c,bottomLeft:h,bottomRight:d}=Tt(a),{x:u,y:f}=t,{width:p,height:g}=e;let m,b,_,y,v,x;return o==="center"?(v=f+g/2,n==="left"?(m=u,b=m-r,y=v+r,x=v-r):(m=u+p,b=m+r,y=v-r,x=v+r),_=m):(n==="left"?b=u+Math.max(l,h)+r:n==="right"?b=u+p-Math.max(c,d)-r:b=this.caretX,o==="top"?(y=f,v=y-r,m=b-r,_=b+r):(y=f+g,v=y+r,m=b+r,_=b-r),x=y),{x1:m,x2:b,x3:_,y1:y,y2:v,y3:x}}drawTitle(t,e,s){const n=this.title,o=n.length;let r,a,l;if(o){const c=Rt(s.rtl,this.x,this.width);for(t.x=fe(this,s.titleAlign,s),e.textAlign=c.textAlign(s.titleAlign),e.textBaseline="middle",r=X(s.titleFont),a=s.titleSpacing,e.fillStyle=s.titleColor,e.font=r.string,l=0;l<o;++l)e.fillText(n[l],c.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+a,l+1===o&&(t.y+=s.titleMarginBottom-a)}}_drawColorBox(t,e,s,n,o){const r=this.labelColors[s],a=this.labelPointStyles[s],{boxHeight:l,boxWidth:c}=o,h=X(o.bodyFont),d=fe(this,"left",o),u=n.x(d),f=l<h.lineHeight?(h.lineHeight-l)/2:0,p=e.y+f;if(o.usePointStyle){const g={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},m=n.leftForLtr(u,c)+c/2,b=p+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,Xe(t,g,m,b),t.strokeStyle=r.borderColor,t.fillStyle=r.backgroundColor,Xe(t,g,m,b)}else{t.lineWidth=A(r.borderWidth)?Math.max(...Object.values(r.borderWidth)):r.borderWidth||1,t.strokeStyle=r.borderColor,t.setLineDash(r.borderDash||[]),t.lineDashOffset=r.borderDashOffset||0;const g=n.leftForLtr(u,c),m=n.leftForLtr(n.xPlus(u,1),c-2),b=Tt(r.borderRadius);Object.values(b).some(_=>_!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,ye(t,{x:g,y:p,w:c,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),ye(t,{x:m,y:p+1,w:c-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(g,p,c,l),t.strokeRect(g,p,c,l),t.fillStyle=r.backgroundColor,t.fillRect(m,p+1,c-2,l-2))}t.fillStyle=this.labelTextColors[s]}drawBody(t,e,s){const{body:n}=this,{bodySpacing:o,bodyAlign:r,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:h}=s,d=X(s.bodyFont);let u=d.lineHeight,f=0;const p=Rt(s.rtl,this.x,this.width),g=function(M){e.fillText(M,p.x(t.x+f),t.y+u/2),t.y+=u+o},m=p.textAlign(r);let b,_,y,v,x,k,S;for(e.textAlign=r,e.textBaseline="middle",e.font=d.string,t.x=fe(this,m,s),e.fillStyle=s.bodyColor,R(this.beforeBody,g),f=a&&m!=="right"?r==="center"?c/2+h:c+2+h:0,v=0,k=n.length;v<k;++v){for(b=n[v],_=this.labelTextColors[v],e.fillStyle=_,R(b.before,g),y=b.lines,a&&y.length&&(this._drawColorBox(e,t,v,p,s),u=Math.max(d.lineHeight,l)),x=0,S=y.length;x<S;++x)g(y[x]),u=d.lineHeight;R(b.after,g)}f=0,u=d.lineHeight,R(this.afterBody,g),t.y-=o}drawFooter(t,e,s){const n=this.footer,o=n.length;let r,a;if(o){const l=Rt(s.rtl,this.x,this.width);for(t.x=fe(this,s.footerAlign,s),t.y+=s.footerMarginTop,e.textAlign=l.textAlign(s.footerAlign),e.textBaseline="middle",r=X(s.footerFont),e.fillStyle=s.footerColor,e.font=r.string,a=0;a<o;++a)e.fillText(n[a],l.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+s.footerSpacing}}drawBackground(t,e,s,n){const{xAlign:o,yAlign:r}=this,{x:a,y:l}=t,{width:c,height:h}=s,{topLeft:d,topRight:u,bottomLeft:f,bottomRight:p}=Tt(n.cornerRadius);e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.beginPath(),e.moveTo(a+d,l),r==="top"&&this.drawCaret(t,e,s,n),e.lineTo(a+c-u,l),e.quadraticCurveTo(a+c,l,a+c,l+u),r==="center"&&o==="right"&&this.drawCaret(t,e,s,n),e.lineTo(a+c,l+h-p),e.quadraticCurveTo(a+c,l+h,a+c-p,l+h),r==="bottom"&&this.drawCaret(t,e,s,n),e.lineTo(a+f,l+h),e.quadraticCurveTo(a,l+h,a,l+h-f),r==="center"&&o==="left"&&this.drawCaret(t,e,s,n),e.lineTo(a,l+d),e.quadraticCurveTo(a,l,a+d,l),e.closePath(),e.fill(),n.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,s=this.$animations,n=s&&s.x,o=s&&s.y;if(n||o){const r=Yt[t.position].call(this,this._active,this._eventPosition);if(!r)return;const a=this._size=ms(this,t),l=Object.assign({},r,this._size),c=bs(e,t,l),h=_s(t,l,c,e);(n._to!==h.x||o._to!==h.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let s=this.opacity;if(!s)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},o={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;const r=$(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=s,this.drawBackground(o,t,n,e),Js(t,e.textDirection),o.y+=r.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),Qs(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const s=this._active,n=t.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),o=!be(s,n),r=this._positionChanged(n,e);(o||r)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,s=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,o=this._active||[],r=this._getActiveElements(t,o,e,s),a=this._positionChanged(r,t),l=e||!be(r,o)||a;return l&&(this._active=r,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,s,n){const o=this.options;if(t.type==="mouseout")return[];if(!n)return e.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const r=this.chart.getElementsAtEventForMode(t,o.mode,o,s);return o.reverse&&r.reverse(),r}_positionChanged(t,e){const{caretX:s,caretY:n,options:o}=this,r=Yt[o.position].call(this,t,e);return r!==!1&&(s!==r.x||n!==r.y)}}var jl={id:"tooltip",_element:vs,positioners:Yt,afterInit(i,t,e){e&&(i.tooltip=new vs({chart:i,options:e}))},beforeUpdate(i,t,e){i.tooltip&&i.tooltip.initialize(e)},reset(i,t,e){i.tooltip&&i.tooltip.initialize(e)},afterDraw(i){const t=i.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(i.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",e)}},afterEvent(i,t){if(i.tooltip){const e=t.replay;i.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(i,t)=>t.bodyFont.size,boxWidth:(i,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:bn},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:i=>i!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const ml=(i,t,e,s)=>(typeof t=="string"?(e=i.push(t)-1,s.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function bl(i,t,e,s){const n=i.indexOf(t);if(n===-1)return ml(i,t,e,s);const o=i.lastIndexOf(t);return n!==o?e:n}const _l=(i,t)=>i===null?null:U(Math.round(i),0,t);function Ms(i){const t=this.getLabels();return i>=0&&i<t.length?t[i]:i}class Yl extends Et{static id="category";static defaults={ticks:{callback:Ms}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const s=this.getLabels();for(const{index:n,label:o}of e)s[n]===o&&s.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(T(t))return null;const s=this.getLabels();return e=isFinite(e)&&s[e]===t?e:bl(s,t,P(e,t),this._addedLabels),_l(e,s.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:s,max:n}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(s=0),e||(n=this.getLabels().length-1)),this.min=s,this.max=n}buildTicks(){const t=this.min,e=this.max,s=this.options.offset,n=[];let o=this.getLabels();o=t===0&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let r=t;r<=e;r++)n.push({value:r});return n}getLabelForValue(t){return Ms.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function xl(i,t){const e=[],{bounds:n,step:o,min:r,max:a,precision:l,count:c,maxTicks:h,maxDigits:d,includeBounds:u}=i,f=o||1,p=h-1,{min:g,max:m}=t,b=!T(r),_=!T(a),y=!T(c),v=(m-g)/(d+1);let x=ki((m-g)/p/f)*f,k,S,M,w;if(x<1e-14&&!b&&!_)return[{value:g},{value:m}];w=Math.ceil(m/x)-Math.floor(g/x),w>p&&(x=ki(w*x/p/f)*f),T(l)||(k=Math.pow(10,l),x=Math.ceil(x*k)/k),n==="ticks"?(S=Math.floor(g/x)*x,M=Math.ceil(m/x)*x):(S=g,M=m),b&&_&&o&&Bn((a-r)/o,x/1e3)?(w=Math.round(Math.min((a-r)/x,h)),x=(a-r)/w,S=r,M=a):y?(S=b?r:S,M=_?a:M,w=c-1,x=(M-S)/w):(w=(M-S)/x,Xt(w,Math.round(w),x/1e3)?w=Math.round(w):w=Math.ceil(w));const D=Math.max(Si(x),Si(S));k=Math.pow(10,T(l)?D:l),S=Math.round(S*k)/k,M=Math.round(M*k)/k;let C=0;for(b&&(u&&S!==r?(e.push({value:r}),S<r&&C++,Xt(Math.round((S+C*x)*k)/k,r,ks(r,v,i))&&C++):S<r&&C++);C<w;++C){const O=Math.round((S+C*x)*k)/k;if(_&&O>a)break;e.push({value:O})}return _&&u&&M!==a?e.length&&Xt(e[e.length-1].value,a,ks(a,v,i))?e[e.length-1].value=a:e.push({value:a}):(!_||M===a)&&e.push({value:M}),e}function ks(i,t,{horizontal:e,minRotation:s}){const n=ct(s),o=(e?Math.sin(n):Math.cos(n))||.001,r=.75*t*(""+i).length;return Math.min(t/o,r)}class yl extends Et{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return T(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:s}=this.getUserBounds();let{min:n,max:o}=this;const r=l=>n=e?n:l,a=l=>o=s?o:l;if(t){const l=ot(n),c=ot(o);l<0&&c<0?a(0):l>0&&c>0&&r(0)}if(n===o){let l=o===0?1:Math.abs(o*.05);a(o+l),t||r(n-l)}this.min=n,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:s}=t,n;return s?(n=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,n>1e3&&(console.warn(\`scales.\${this.id}.ticks.stepSize: \${s} would result generating up to \${n} ticks. Limiting to 1000.\`),n=1e3)):(n=this.computeTickLimit(),e=e||11),e&&(n=Math.min(e,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let s=this.getTickLimit();s=Math.max(2,s);const n={maxTicks:s,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},o=this._range||this,r=xl(n,o);return t.bounds==="ticks"&&Wn(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const t=this.ticks;let e=this.min,s=this.max;if(super.configure(),this.options.offset&&t.length){const n=(s-e)/Math.max(t.length-1,1)/2;e-=n,s+=n}this._startValue=e,this._endValue=s,this._valueRange=s-e}getLabelForValue(t){return ci(t,this.chart.options.locale,this.options.ticks.format)}}class Ul extends yl{static id="linear";static defaults={ticks:{callback:Vs.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=Z(t)?t:0,this.max=Z(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,s=ct(this.options.ticks.minRotation),n=(t?Math.sin(s):Math.cos(s))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const Ae={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},q=Object.keys(Ae);function Ss(i,t){return i-t}function ws(i,t){if(T(t))return null;const e=i._adapter,{parser:s,round:n,isoWeekday:o}=i._parseOpts;let r=t;return typeof s=="function"&&(r=s(r)),Z(r)||(r=typeof s=="string"?e.parse(r,s):e.parse(r)),r===null?null:(n&&(r=n==="week"&&(Qt(o)||o===!0)?e.startOf(r,"isoWeek",o):e.startOf(r,n)),+r)}function Cs(i,t,e,s){const n=q.length;for(let o=q.indexOf(i);o<n-1;++o){const r=Ae[q[o]],a=r.steps?r.steps:Number.MAX_SAFE_INTEGER;if(r.common&&Math.ceil((e-t)/(a*r.size))<=s)return q[o]}return q[n-1]}function vl(i,t,e,s,n){for(let o=q.length-1;o>=q.indexOf(e);o--){const r=q[o];if(Ae[r].common&&i._adapter.diff(n,s,r)>=t-1)return r}return q[e?q.indexOf(e):0]}function Ml(i){for(let t=q.indexOf(i)+1,e=q.length;t<e;++t)if(Ae[q[t]].common)return q[t]}function Ps(i,t,e){if(!e)i[t]=!0;else if(e.length){const{lo:s,hi:n}=ri(e,t),o=e[s]>=t?e[s]:e[n];i[o]=!0}}function kl(i,t,e,s){const n=i._adapter,o=+n.startOf(t[0].value,s),r=t[t.length-1].value;let a,l;for(a=o;a<=r;a=+n.add(a,1,s))l=e[a],l>=0&&(t[l].major=!0);return t}function Ds(i,t,e){const s=[],n={},o=t.length;let r,a;for(r=0;r<o;++r)a=t[r],n[a]=r,s.push({value:a,major:!1});return o===0||!e?s:kl(i,s,n,e)}class Os extends Et{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const s=t.time||(t.time={}),n=this._adapter=new Dr._date(t.adapters.date);n.init(e),Ut(s.displayFormats,n.formats()),this._parseOpts={parser:s.parser,round:s.round,isoWeekday:s.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:ws(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,s=t.time.unit||"day";let{min:n,max:o,minDefined:r,maxDefined:a}=this.getUserBounds();function l(c){!r&&!isNaN(c.min)&&(n=Math.min(n,c.min)),!a&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!r||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),n=Z(n)&&!isNaN(n)?n:+e.startOf(Date.now(),s),o=Z(o)&&!isNaN(o)?o:+e.endOf(Date.now(),s)+1,this.min=Math.min(n,o-1),this.max=Math.max(n+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],s=t[t.length-1]),{min:e,max:s}}buildTicks(){const t=this.options,e=t.time,s=t.ticks,n=s.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const o=this.min,r=this.max,a=Yn(n,o,r);return this._unit=e.unit||(s.autoSkip?Cs(e.minUnit,this.min,this.max,this._getLabelCapacity(o)):vl(this,a.length,e.minUnit,this.min,this.max)),this._majorUnit=!s.major.enabled||this._unit==="year"?void 0:Ml(this._unit),this.initOffsets(n),t.reverse&&a.reverse(),Ds(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,s=0,n,o;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?e=1-n:e=(this.getDecimalForValue(t[1])-n)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?s=o:s=(o-this.getDecimalForValue(t[t.length-2]))/2);const r=t.length<3?.5:.25;e=U(e,0,r),s=U(s,0,r),this._offsets={start:e,end:s,factor:1/(e+1+s)}}_generate(){const t=this._adapter,e=this.min,s=this.max,n=this.options,o=n.time,r=o.unit||Cs(o.minUnit,e,s,this._getLabelCapacity(e)),a=P(n.ticks.stepSize,1),l=r==="week"?o.isoWeekday:!1,c=Qt(l)||l===!0,h={};let d=e,u,f;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":r),t.diff(s,e,r)>1e5*a)throw new Error(e+" and "+s+" are too far apart with stepSize of "+a+" "+r);const p=n.ticks.source==="data"&&this.getDataTimestamps();for(u=d,f=0;u<s;u=+t.add(u,a,r),f++)Ps(h,u,p);return(u===s||n.bounds==="ticks"||f===1)&&Ps(h,u,p),Object.keys(h).sort(Ss).map(g=>+g)}getLabelForValue(t){const e=this._adapter,s=this.options.time;return s.tooltipFormat?e.format(t,s.tooltipFormat):e.format(t,s.displayFormats.datetime)}format(t,e){const n=this.options.time.displayFormats,o=this._unit,r=e||n[o];return this._adapter.format(t,r)}_tickFormatFunction(t,e,s,n){const o=this.options,r=o.ticks.callback;if(r)return E(r,[t,e,s],this);const a=o.time.displayFormats,l=this._unit,c=this._majorUnit,h=l&&a[l],d=c&&a[c],u=s[e],f=c&&d&&u&&u.major;return this._adapter.format(t,n||(f?d:h))}generateTickLabels(t){let e,s,n;for(e=0,s=t.length;e<s;++e)n=t[e],n.label=this._tickFormatFunction(n.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,s=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+s)*e.factor)}getValueForPixel(t){const e=this._offsets,s=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+s*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,s=this.ctx.measureText(t).width,n=ct(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(n),r=Math.sin(n),a=this._resolveTickFontOptions(0).size;return{w:s*o+a*r,h:s*r+a*o}}_getLabelCapacity(t){const e=this.options.time,s=e.displayFormats,n=s[e.unit]||s.millisecond,o=this._tickFormatFunction(t,0,Ds(this,[t],this._majorUnit),n),r=this._getLabelSize(o),a=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],e,s;if(t.length)return t;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(e=0,s=n.length;e<s;++e)t=t.concat(n[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let e,s;if(t.length)return t;const n=this.getLabels();for(e=0,s=n.length;e<s;++e)t.push(ws(this,n[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Ws(t.sort(Ss))}}function ge(i,t,e){let s=0,n=i.length-1,o,r,a,l;e?(t>=i[s].pos&&t<=i[n].pos&&({lo:s,hi:n}=Mt(i,"pos",t)),{pos:o,time:a}=i[s],{pos:r,time:l}=i[n]):(t>=i[s].time&&t<=i[n].time&&({lo:s,hi:n}=Mt(i,"time",t)),{time:o,pos:a}=i[s],{time:r,pos:l}=i[n]);const c=r-o;return c?a+(l-a)*(t-o)/c:a}class Xl extends Os{static id="timeseries";static defaults=Os.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=ge(e,this.min),this._tableRange=ge(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:s}=this,n=[],o=[];let r,a,l,c,h;for(r=0,a=t.length;r<a;++r)c=t[r],c>=e&&c<=s&&n.push(c);if(n.length<2)return[{time:e,pos:0},{time:s,pos:1}];for(r=0,a=n.length;r<a;++r)h=n[r+1],l=n[r-1],c=n[r],Math.round((h+l)/2)!==c&&o.push({time:c,pos:r/(a-1)});return o}_generate(){const t=this.min,e=this.max;let s=super.getDataTimestamps();return(!s.includes(t)||!s.length)&&s.splice(0,0,t),(!s.includes(e)||s.length===1)&&s.push(e),s.sort((n,o)=>n-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),s=this.getLabelTimestamps();return e.length&&s.length?t=this.normalize(e.concat(s)):t=e.length?e:s,t=this._cache.all=t,t}getDecimalForValue(t){return(ge(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,s=this.getDecimalForPixel(t)/e.factor-e.end;return ge(this._table,s*this._tableRange+this._minPos,!0)}}const As=/^on/,_n=[];Object.keys(globalThis).forEach(i=>{As.test(i)&&_n.push(i.replace(As,""))});function Te(i){const t=vn,e=[];function s(n){yn(t,n)}Ts(()=>{const n=i();_n.forEach(n instanceof Element?o=>e.push(xn(n,o,s)):o=>e.push(n.$on(o,s)))}),Rs(()=>{for(;e.length;)e.pop()()})}function Sl(i){let t,e=[i[1]],s={};for(let n=0;n<e.length;n+=1)s=Q(s,e[n]);return{c(){t=Sn("canvas"),wn(t,s)},m(n,o){kn(n,t,o),i[8](t)},p:Re,i:Re,o:Re,d(n){n&&Mn(t),i[8](null)}}}function wl(i){let{data:t,type:e,options:s,plugins:n,children:o,$$scope:r,$$slots:a,...l}=i;return l}function Cl(i,t,e){let{type:s}=t,{data:n={datasets:[]}}=t,{options:o={}}=t,{plugins:r=[]}=t,{updateMode:a=void 0}=t,{chart:l=null}=t,c,h=wl(t);Ts(()=>{e(2,l=new ie(c,{type:s,data:n,options:o,plugins:r}))}),Cn(()=>{l&&(e(2,l.data=n,l),Object.assign(l.options,o),l.update(a))}),Rs(()=>{l&&l.destroy(),e(2,l=null)}),Te(()=>c);function d(u){Ct[u?"unshift":"push"](()=>{c=u,e(0,c)})}return i.$$set=u=>{e(9,t=Q(Q({},t),ft(u))),"type"in u&&e(3,s=u.type),"data"in u&&e(4,n=u.data),"options"in u&&e(5,o=u.options),"plugins"in u&&e(6,r=u.plugins),"updateMode"in u&&e(7,a=u.updateMode),"chart"in u&&e(2,l=u.chart)},t=ft(t),[c,h,l,s,n,o,r,a,d]}class xi extends Se{constructor(t){super(),we(this,t,Cl,Sl,Ce,{type:3,data:4,options:5,plugins:6,updateMode:7,chart:2})}}function Pl(i){let t,e,s;const n=[{type:"line"},i[1]];function o(a){i[4](a)}let r={};for(let a=0;a<n.length;a+=1)r=Q(r,n[a]);return i[0]!==void 0&&(r.chart=i[0]),t=new xi({props:r}),i[3](t),Ct.push(()=>Je(t,"chart",o)),{c(){ni(t.$$.fragment)},m(a,l){si(t,a,l),s=!0},p(a,[l]){const c=l&2?ti(n,[n[0],ei(a[1])]):{};!e&&l&1&&(e=!0,c.chart=a[0],ii(()=>e=!1)),t.$set(c)},i(a){s||($e(t.$$.fragment,a),s=!0)},o(a){Ze(t.$$.fragment,a),s=!1},d(a){i[3](null),Qe(t,a)}}}function Dl(i,t,e){ie.register(Pr);let{chart:s=null}=t,n,o;Te(()=>o);function r(l){Ct[l?"unshift":"push"](()=>{o=l,e(2,o)})}function a(l){s=l,e(0,s)}return i.$$set=l=>{e(5,t=Q(Q({},t),ft(l))),"chart"in l&&e(0,s=l.chart)},i.$$.update=()=>{e(1,n=t)},t=ft(t),[s,n,o,r,a]}class Kl extends Se{constructor(t){super(),we(this,t,Dl,Pl,Ce,{chart:0})}}function Ol(i){let t,e,s;const n=[{type:"doughnut"},i[1]];function o(a){i[4](a)}let r={};for(let a=0;a<n.length;a+=1)r=Q(r,n[a]);return i[0]!==void 0&&(r.chart=i[0]),t=new xi({props:r}),i[3](t),Ct.push(()=>Je(t,"chart",o)),{c(){ni(t.$$.fragment)},m(a,l){si(t,a,l),s=!0},p(a,[l]){const c=l&2?ti(n,[n[0],ei(a[1])]):{};!e&&l&1&&(e=!0,c.chart=a[0],ii(()=>e=!1)),t.$set(c)},i(a){s||($e(t.$$.fragment,a),s=!0)},o(a){Ze(t.$$.fragment,a),s=!1},d(a){i[3](null),Qe(t,a)}}}function Al(i,t,e){ie.register(Cr);let{chart:s=null}=t,n,o;Te(()=>o);function r(l){Ct[l?"unshift":"push"](()=>{o=l,e(2,o)})}function a(l){s=l,e(0,s)}return i.$$set=l=>{e(5,t=Q(Q({},t),ft(l))),"chart"in l&&e(0,s=l.chart)},i.$$.update=()=>{e(1,n=t)},t=ft(t),[s,n,o,r,a]}class ql extends Se{constructor(t){super(),we(this,t,Al,Ol,Ce,{chart:0})}}function Tl(i){let t,e,s;const n=[{type:"bar"},i[1]];function o(a){i[4](a)}let r={};for(let a=0;a<n.length;a+=1)r=Q(r,n[a]);return i[0]!==void 0&&(r.chart=i[0]),t=new xi({props:r}),i[3](t),Ct.push(()=>Je(t,"chart",o)),{c(){ni(t.$$.fragment)},m(a,l){si(t,a,l),s=!0},p(a,[l]){const c=l&2?ti(n,[n[0],ei(a[1])]):{};!e&&l&1&&(e=!0,c.chart=a[0],ii(()=>e=!1)),t.$set(c)},i(a){s||($e(t.$$.fragment,a),s=!0)},o(a){Ze(t.$$.fragment,a),s=!1},d(a){i[3](null),Qe(t,a)}}}function Rl(i,t,e){ie.register(Sr);let{chart:s=null}=t,n,o;Te(()=>o);function r(l){Ct[l?"unshift":"push"](()=>{o=l,e(2,o)})}function a(l){s=l,e(0,s)}return i.$$set=l=>{e(5,t=Q(Q({},t),ft(l))),"chart"in l&&e(0,s=l.chart)},i.$$.update=()=>{e(1,n=t)},t=ft(t),[s,n,o,r,a]}class Gl extends Se{constructor(t){super(),we(this,t,Rl,Tl,Ce,{chart:0})}}export{Fl as A,Gl as B,ie as C,ql as D,Kl as L,Wl as P,Yl as a,Ul as b,Bl as c,jl as d,Nl as e,Hl as f,Vl as p};
21223
21274
  `,
21224
- "index-DTHFbwVv.css": "*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: \"\"}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root,[data-theme]{background-color:var(--fallback-b1,oklch(var(--b1)/1));color:var(--fallback-bc,oklch(var(--bc)/1))}@supports not (color: oklch(0% 0 0)){:root{color-scheme:light;--fallback-p: #491eff;--fallback-pc: #d4dbff;--fallback-s: #ff41c7;--fallback-sc: #fff9fc;--fallback-a: #00cfbd;--fallback-ac: #00100d;--fallback-n: #2b3440;--fallback-nc: #d7dde4;--fallback-b1: #ffffff;--fallback-b2: #e5e6e6;--fallback-b3: #e5e6e6;--fallback-bc: #1f2937;--fallback-in: #00b3f0;--fallback-inc: #000000;--fallback-su: #00ca92;--fallback-suc: #000000;--fallback-wa: #ffc22d;--fallback-wac: #000000;--fallback-er: #ff6f70;--fallback-erc: #000000}@media (prefers-color-scheme: dark){:root{color-scheme:dark;--fallback-p: #7582ff;--fallback-pc: #050617;--fallback-s: #ff71cf;--fallback-sc: #190211;--fallback-a: #00c7b5;--fallback-ac: #000e0c;--fallback-n: #2a323c;--fallback-nc: #a6adbb;--fallback-b1: #1d232a;--fallback-b2: #191e24;--fallback-b3: #15191e;--fallback-bc: #a6adbb;--fallback-in: #00b3f0;--fallback-inc: #000000;--fallback-su: #00ca92;--fallback-suc: #000000;--fallback-wa: #ffc22d;--fallback-wac: #000000;--fallback-er: #ff6f70;--fallback-erc: #000000}}}html{-webkit-tap-highlight-color:transparent}*{scrollbar-color:color-mix(in oklch,currentColor 35%,transparent) transparent}*:hover{scrollbar-color:color-mix(in oklch,currentColor 60%,transparent) transparent}:root{color-scheme:light;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 89.824% .06192 275.75;--ac: 15.352% .0368 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 49.12% .3096 275.75;--s: 69.71% .329 342.55;--sc: 98.71% .0106 342.55;--a: 76.76% .184 183.61;--n: 32.1785% .02476 255.701624;--nc: 89.4994% .011585 252.096176;--b1: 100% 0 0;--b2: 96.1151% 0 0;--b3: 92.4169% .00108 197.137559;--bc: 27.8078% .029596 256.847952}@media (prefers-color-scheme: dark){:root{color-scheme:dark;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 13.138% .0392 275.75;--sc: 14.96% .052 342.55;--ac: 14.902% .0334 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 65.69% .196 275.75;--s: 74.8% .26 342.55;--a: 74.51% .167 183.61;--n: 31.3815% .021108 254.139175;--nc: 74.6477% .0216 264.435964;--b1: 25.3267% .015896 252.417568;--b2: 23.2607% .013807 253.100675;--b3: 21.1484% .01165 254.087939;--bc: 74.6477% .0216 264.435964}}[data-theme=light]{color-scheme:light;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 89.824% .06192 275.75;--ac: 15.352% .0368 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 49.12% .3096 275.75;--s: 69.71% .329 342.55;--sc: 98.71% .0106 342.55;--a: 76.76% .184 183.61;--n: 32.1785% .02476 255.701624;--nc: 89.4994% .011585 252.096176;--b1: 100% 0 0;--b2: 96.1151% 0 0;--b3: 92.4169% .00108 197.137559;--bc: 27.8078% .029596 256.847952}[data-theme=dark]{color-scheme:dark;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 13.138% .0392 275.75;--sc: 14.96% .052 342.55;--ac: 14.902% .0334 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 65.69% .196 275.75;--s: 74.8% .26 342.55;--a: 74.51% .167 183.61;--n: 31.3815% .021108 254.139175;--nc: 74.6477% .0216 264.435964;--b1: 25.3267% .015896 252.417568;--b2: 23.2607% .013807 253.100675;--b3: 21.1484% .01165 254.087939;--bc: 74.6477% .0216 264.435964}.alert{display:grid;width:100%;grid-auto-flow:row;align-content:flex-start;align-items:center;justify-items:center;gap:1rem;text-align:center;border-radius:var(--rounded-box, 1rem);border-width:1px;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));padding:1rem;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--alert-bg: var(--fallback-b2,oklch(var(--b2)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1));background-color:var(--alert-bg)}@media (min-width: 640px){.alert{grid-auto-flow:column;grid-template-columns:auto minmax(auto,1fr);justify-items:start;text-align:start}}.avatar.placeholder>div{display:flex;align-items:center;justify-content:center}.badge{display:inline-flex;align-items:center;justify-content:center;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s;height:1.25rem;font-size:.875rem;line-height:1.25rem;width:-moz-fit-content;width:fit-content;padding-left:.563rem;padding-right:.563rem;border-radius:var(--rounded-badge, 1.9rem);border-width:1px;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}@media (hover:hover){.label a:hover{--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.menu li>*:not(ul,.menu-title,details,.btn):active,.menu li>*:not(ul,.menu-title,details,.btn).active,.menu li>details>summary:active{--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.tab:hover{--tw-text-opacity: 1}.tabs-boxed :is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):hover,.tabs-boxed :is(input:checked):hover{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.table tr.hover:hover,.table tr.hover:nth-child(2n):hover{--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))}.table-zebra tr.hover:hover,.table-zebra tr.hover:nth-child(2n):hover{--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}}.btn{display:inline-flex;height:3rem;min-height:3rem;flex-shrink:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-wrap:wrap;align-items:center;justify-content:center;border-radius:var(--rounded-btn, .5rem);border-color:transparent;border-color:oklch(var(--btn-color, var(--b2)) / var(--tw-border-opacity));padding-left:1rem;padding-right:1rem;text-align:center;font-size:.875rem;line-height:1em;gap:.5rem;font-weight:600;text-decoration-line:none;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);border-width:var(--border-btn, 1px);transition-property:color,background-color,border-color,opacity,box-shadow,transform;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);outline-color:var(--fallback-bc,oklch(var(--bc)/1));background-color:oklch(var(--btn-color, var(--b2)) / var(--tw-bg-opacity));--tw-bg-opacity: 1;--tw-border-opacity: 1}.btn-disabled,.btn[disabled],.btn:disabled{pointer-events:none}.btn-square{height:3rem;width:3rem;padding:0}.btn-circle{height:3rem;width:3rem;border-radius:9999px;padding:0}:where(.btn:is(input[type=checkbox])),:where(.btn:is(input[type=radio])){width:auto;-webkit-appearance:none;-moz-appearance:none;appearance:none}.btn:is(input[type=checkbox]):after,.btn:is(input[type=radio]):after{--tw-content: attr(aria-label);content:var(--tw-content)}.card{position:relative;display:flex;flex-direction:column;border-radius:var(--rounded-box, 1rem)}.card:focus{outline:2px solid transparent;outline-offset:2px}.card-body{display:flex;flex:1 1 auto;flex-direction:column;padding:var(--padding-card, 2rem);gap:.5rem}.card-body :where(p){flex-grow:1}.card-actions{display:flex;flex-wrap:wrap;align-items:flex-start;gap:.5rem}.card figure{display:flex;align-items:center;justify-content:center}.card.image-full{display:grid}.card.image-full:before{position:relative;content:\"\";z-index:10;border-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));opacity:.75}.card.image-full:before,.card.image-full>*{grid-column-start:1;grid-row-start:1}.card.image-full>figure img{height:100%;-o-object-fit:cover;object-fit:cover}.card.image-full>.card-body{position:relative;z-index:20;--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.checkbox{flex-shrink:0;--chkbg: var(--fallback-bc,oklch(var(--bc)/1));--chkfg: var(--fallback-b1,oklch(var(--b1)/1));height:1.5rem;width:1.5rem;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--rounded-btn, .5rem);border-width:1px;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: .2}.collapse:not(td):not(tr):not(colgroup){visibility:visible}.collapse{position:relative;display:grid;overflow:hidden;grid-template-rows:max-content 0fr;transition:grid-template-rows .2s;width:100%;border-radius:var(--rounded-box, 1rem)}.collapse-title,.collapse>input[type=checkbox],.collapse>input[type=radio],.collapse-content{grid-column-start:1;grid-row-start:1}.collapse>input[type=checkbox],.collapse>input[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0}:where(.collapse>input[type=checkbox]),:where(.collapse>input[type=radio]){height:100%;width:100%;z-index:1}.collapse-content{visibility:hidden;grid-column-start:1;grid-row-start:2;min-height:0px;transition:visibility .2s;transition:padding .2s ease-out,background-color .2s ease-out;padding-left:1rem;padding-right:1rem;cursor:unset}.collapse[open],.collapse-open,.collapse:focus:not(.collapse-close){grid-template-rows:max-content 1fr}.collapse:not(.collapse-close):has(>input[type=checkbox]:checked),.collapse:not(.collapse-close):has(>input[type=radio]:checked){grid-template-rows:max-content 1fr}.collapse[open]>.collapse-content,.collapse-open>.collapse-content,.collapse:focus:not(.collapse-close)>.collapse-content,.collapse:not(.collapse-close)>input[type=checkbox]:checked~.collapse-content,.collapse:not(.collapse-close)>input[type=radio]:checked~.collapse-content{visibility:visible;min-height:-moz-fit-content;min-height:fit-content}.divider{display:flex;flex-direction:row;align-items:center;align-self:stretch;margin-top:1rem;margin-bottom:1rem;height:1rem;white-space:nowrap}.divider:before,.divider:after{height:.125rem;width:100%;flex-grow:1;--tw-content: \"\";content:var(--tw-content);background-color:var(--fallback-bc,oklch(var(--bc)/.1))}.dropdown{position:relative;display:inline-block}.dropdown>*:not(summary):focus{outline:2px solid transparent;outline-offset:2px}.dropdown .dropdown-content{position:absolute}.dropdown:is(:not(details)) .dropdown-content{visibility:hidden;opacity:0;transform-origin:top;--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s}.dropdown-end .dropdown-content{inset-inline-end:0px}.dropdown-left .dropdown-content{bottom:auto;inset-inline-end:100%;top:0;transform-origin:right}.dropdown-right .dropdown-content{bottom:auto;inset-inline-start:100%;top:0;transform-origin:left}.dropdown-bottom .dropdown-content{bottom:auto;top:100%;transform-origin:top}.dropdown-top .dropdown-content{bottom:100%;top:auto;transform-origin:bottom}.dropdown-end.dropdown-right .dropdown-content,.dropdown-end.dropdown-left .dropdown-content{bottom:0;top:auto}.dropdown.dropdown-open .dropdown-content,.dropdown:not(.dropdown-hover):focus .dropdown-content,.dropdown:focus-within .dropdown-content{visibility:visible;opacity:1}@media (hover: hover){.dropdown.dropdown-hover:hover .dropdown-content{visibility:visible;opacity:1}.btm-nav>*.disabled:hover,.btm-nav>*[disabled]:hover{pointer-events:none;--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}.btn:hover{--tw-border-opacity: 1;border-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn:hover{background-color:color-mix(in oklab,oklch(var(--btn-color, var(--b2)) / var(--tw-bg-opacity, 1)) 90%,black);border-color:color-mix(in oklab,oklch(var(--btn-color, var(--b2)) / var(--tw-border-opacity, 1)) 90%,black)}}@supports not (color: oklch(0% 0 0)){.btn:hover{background-color:var(--btn-color, var(--fallback-b2));border-color:var(--btn-color, var(--fallback-b2))}}.btn.glass:hover{--glass-opacity: 25%;--glass-border-opacity: 15%}.btn-ghost:hover{border-color:transparent}@supports (color: oklch(0% 0 0)){.btn-ghost:hover{background-color:var(--fallback-bc,oklch(var(--bc)/.2))}}.btn-outline:hover{--tw-border-opacity: 1;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-b1,oklch(var(--b1)/var(--tw-text-opacity)))}.btn-outline.btn-primary:hover{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-primary:hover{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black)}}.btn-outline.btn-secondary:hover{--tw-text-opacity: 1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-secondary:hover{background-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,black)}}.btn-outline.btn-accent:hover{--tw-text-opacity: 1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-accent:hover{background-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,black)}}.btn-outline.btn-success:hover{--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-success:hover{background-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black)}}.btn-outline.btn-info:hover{--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-info:hover{background-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,black)}}.btn-outline.btn-warning:hover{--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-warning:hover{background-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,black)}}.btn-outline.btn-error:hover{--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-error:hover{background-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black)}}.btn-disabled:hover,.btn[disabled]:hover,.btn:disabled:hover{--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .2;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}@supports (color: color-mix(in oklab,black,black)){.btn:is(input[type=checkbox]:checked):hover,.btn:is(input[type=radio]:checked):hover{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black)}}.dropdown.dropdown-hover:hover .dropdown-content{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(.active,.btn):hover,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.active,.btn):hover{cursor:pointer;outline:2px solid transparent;outline-offset:2px}@supports (color: oklch(0% 0 0)){:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(.active,.btn):hover,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.active,.btn):hover{background-color:var(--fallback-bc,oklch(var(--bc)/.1))}}.tab[disabled],.tab[disabled]:hover{cursor:not-allowed;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}}.dropdown:is(details) summary::-webkit-details-marker{display:none}.form-control{display:flex;flex-direction:column}.label{display:flex;-webkit-user-select:none;-moz-user-select:none;user-select:none;align-items:center;justify-content:space-between;padding:.5rem .25rem}.input{flex-shrink:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:3rem;padding-left:1rem;padding-right:1rem;font-size:1rem;line-height:2;line-height:1.5rem;border-radius:var(--rounded-btn, .5rem);border-width:1px;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.input[type=number]::-webkit-inner-spin-button,.input-md[type=number]::-webkit-inner-spin-button{margin-top:-1rem;margin-bottom:-1rem;margin-inline-end:-1rem}.input-sm[type=number]::-webkit-inner-spin-button{margin-top:0;margin-bottom:0;margin-inline-end:-0px}.join{display:inline-flex;align-items:stretch;border-radius:var(--rounded-btn, .5rem)}.join :where(.join-item){border-start-end-radius:0;border-end-end-radius:0;border-end-start-radius:0;border-start-start-radius:0}.join .join-item:not(:first-child):not(:last-child),.join *:not(:first-child):not(:last-child) .join-item{border-start-end-radius:0;border-end-end-radius:0;border-end-start-radius:0;border-start-start-radius:0}.join .join-item:first-child:not(:last-child),.join *:first-child:not(:last-child) .join-item{border-start-end-radius:0;border-end-end-radius:0}.join .dropdown .join-item:first-child:not(:last-child),.join *:first-child:not(:last-child) .dropdown .join-item{border-start-end-radius:inherit;border-end-end-radius:inherit}.join :where(.join-item:first-child:not(:last-child)),.join :where(*:first-child:not(:last-child) .join-item){border-end-start-radius:inherit;border-start-start-radius:inherit}.join .join-item:last-child:not(:first-child),.join *:last-child:not(:first-child) .join-item{border-end-start-radius:0;border-start-start-radius:0}.join :where(.join-item:last-child:not(:first-child)),.join :where(*:last-child:not(:first-child) .join-item){border-start-end-radius:inherit;border-end-end-radius:inherit}@supports not selector(:has(*)){:where(.join *){border-radius:inherit}}@supports selector(:has(*)){:where(.join *:has(.join-item)){border-radius:inherit}}.menu{display:flex;flex-direction:column;flex-wrap:wrap;font-size:.875rem;line-height:1.25rem;padding:.5rem}.menu :where(li ul){position:relative;white-space:nowrap;margin-inline-start:1rem;padding-inline-start:.5rem}.menu :where(li:not(.menu-title)>*:not(ul,details,.menu-title,.btn)),.menu :where(li:not(.menu-title)>details>summary:not(.menu-title)){display:grid;grid-auto-flow:column;align-content:flex-start;align-items:center;gap:.5rem;grid-auto-columns:minmax(auto,max-content) auto max-content;-webkit-user-select:none;-moz-user-select:none;user-select:none}.menu li.disabled{cursor:not-allowed;-webkit-user-select:none;-moz-user-select:none;user-select:none;color:var(--fallback-bc,oklch(var(--bc)/.3))}.menu :where(li>.menu-dropdown:not(.menu-dropdown-show)){display:none}:where(.menu li){position:relative;display:flex;flex-shrink:0;flex-direction:column;flex-wrap:wrap;align-items:stretch}:where(.menu li) .badge{justify-self:end}.modal{pointer-events:none;position:fixed;inset:0;margin:0;display:grid;height:100%;max-height:none;width:100%;max-width:none;justify-items:center;padding:0;opacity:0;overscroll-behavior:contain;z-index:999;background-color:transparent;color:inherit;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);transition-property:transform,opacity,visibility;overflow-y:hidden}:where(.modal){align-items:center}.modal-box{max-height:calc(100vh - 5em);grid-column-start:1;grid-row-start:1;width:91.666667%;max-width:32rem;--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-bottom-right-radius:var(--rounded-box, 1rem);border-bottom-left-radius:var(--rounded-box, 1rem);border-top-left-radius:var(--rounded-box, 1rem);border-top-right-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));padding:1.5rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s;box-shadow:#00000040 0 25px 50px -12px;overflow-y:auto;overscroll-behavior:contain}.modal-open,.modal:target,.modal-toggle:checked+.modal,.modal[open]{pointer-events:auto;visibility:visible;opacity:1}.modal-action{display:flex;margin-top:1.5rem;justify-content:flex-end}.modal-toggle{position:fixed;height:0px;width:0px;-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0}:root:has(:is(.modal-open,.modal:target,.modal-toggle:checked+.modal,.modal[open])){overflow:hidden;scrollbar-gutter:stable}.navbar{display:flex;align-items:center;padding:var(--navbar-padding, .5rem);min-height:4rem;width:100%}:where(.navbar>*:not(script,style)){display:inline-flex;align-items:center}.radio{flex-shrink:0;--chkbg: var(--bc);height:1.5rem;width:1.5rem;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:9999px;border-width:1px;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: .2}.range{height:1.5rem;width:100%;cursor:pointer;-moz-appearance:none;appearance:none;-webkit-appearance:none;--range-shdw: var(--fallback-bc,oklch(var(--bc)/1));overflow:hidden;border-radius:var(--rounded-box, 1rem);background-color:transparent}.range:focus{outline:none}.select{display:inline-flex;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:3rem;min-height:3rem;padding-inline-start:1rem;padding-inline-end:2.5rem;font-size:.875rem;line-height:1.25rem;line-height:2;border-radius:var(--rounded-btn, .5rem);border-width:1px;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);background-position:calc(100% - 20px) calc(1px + 50%),calc(100% - 16.1px) calc(1px + 50%);background-size:4px 4px,4px 4px;background-repeat:no-repeat}.select[multiple]{height:auto}.stats{display:inline-grid;border-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}:where(.stats){grid-auto-flow:column;overflow-x:auto}.steps{display:inline-grid;grid-auto-flow:column;overflow:hidden;overflow-x:auto;counter-reset:step;grid-auto-columns:1fr}.steps .step{display:grid;grid-template-columns:repeat(1,minmax(0,1fr));grid-template-columns:auto;grid-template-rows:repeat(2,minmax(0,1fr));grid-template-rows:40px 1fr;place-items:center;text-align:center;min-width:4rem}.tabs{display:grid;align-items:flex-end}.tabs-lifted:has(.tab-content[class^=rounded-]) .tab:first-child:not(:is(.tab-active,[aria-selected=true])),.tabs-lifted:has(.tab-content[class*=\" rounded-\"]) .tab:first-child:not(:is(.tab-active,[aria-selected=true])){border-bottom-color:transparent}.tab{position:relative;grid-row-start:1;display:inline-flex;height:2rem;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;flex-wrap:wrap;align-items:center;justify-content:center;text-align:center;font-size:.875rem;line-height:1.25rem;line-height:2;--tab-padding: 1rem;--tw-text-opacity: .5;--tab-color: var(--fallback-bc,oklch(var(--bc)/1));--tab-bg: var(--fallback-b1,oklch(var(--b1)/1));--tab-border-color: var(--fallback-b3,oklch(var(--b3)/1));color:var(--tab-color);padding-inline-start:var(--tab-padding, 1rem);padding-inline-end:var(--tab-padding, 1rem)}.tab:is(input[type=radio]){width:auto;border-bottom-right-radius:0;border-bottom-left-radius:0}.tab:is(input[type=radio]):after{--tw-content: attr(aria-label);content:var(--tw-content)}.tab:not(input):empty{cursor:default;grid-column-start:span 9999}:checked+.tab-content:nth-child(2),:is(.tab-active,[aria-selected=true])+.tab-content:nth-child(2){border-start-start-radius:0px}input.tab:checked+.tab-content,:is(.tab-active,[aria-selected=true])+.tab-content{display:block}.table{position:relative;width:100%;border-radius:var(--rounded-box, 1rem);text-align:left;font-size:.875rem;line-height:1.25rem}.table :where(.table-pin-rows thead tr){position:sticky;top:0;z-index:1;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.table :where(.table-pin-rows tfoot tr){position:sticky;bottom:0;z-index:1;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.table :where(.table-pin-cols tr th){position:sticky;left:0;right:0;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.table-zebra tbody tr:nth-child(2n) :where(.table-pin-cols tr th){--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))}.textarea{min-height:3rem;flex-shrink:1;padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem;line-height:2;border-radius:var(--rounded-btn, .5rem);border-width:1px;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.toast{position:fixed;display:flex;min-width:-moz-fit-content;min-width:fit-content;flex-direction:column;white-space:nowrap;gap:.5rem;padding:1rem}.alert-info{border-color:var(--fallback-in,oklch(var(--in)/.2));--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)));--alert-bg: var(--fallback-in,oklch(var(--in)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1))}.alert-success{border-color:var(--fallback-su,oklch(var(--su)/.2));--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)));--alert-bg: var(--fallback-su,oklch(var(--su)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1))}.alert-warning{border-color:var(--fallback-wa,oklch(var(--wa)/.2));--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)));--alert-bg: var(--fallback-wa,oklch(var(--wa)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1))}.alert-error{border-color:var(--fallback-er,oklch(var(--er)/.2));--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)));--alert-bg: var(--fallback-er,oklch(var(--er)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1))}.badge-primary{--tw-border-opacity: 1;border-color:var(--fallback-p,oklch(var(--p)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.badge-info{border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-in,oklch(var(--in)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}.badge-success{border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}.badge-warning{border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}.badge-error{border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-er,oklch(var(--er)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}.badge-ghost{--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.badge-outline{border-color:currentColor;--tw-border-opacity: .5;background-color:transparent;color:currentColor}.badge-outline.badge-neutral{--tw-text-opacity: 1;color:var(--fallback-n,oklch(var(--n)/var(--tw-text-opacity)))}.badge-outline.badge-primary{--tw-text-opacity: 1;color:var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity)))}.badge-outline.badge-secondary{--tw-text-opacity: 1;color:var(--fallback-s,oklch(var(--s)/var(--tw-text-opacity)))}.badge-outline.badge-accent{--tw-text-opacity: 1;color:var(--fallback-a,oklch(var(--a)/var(--tw-text-opacity)))}.badge-outline.badge-info{--tw-text-opacity: 1;color:var(--fallback-in,oklch(var(--in)/var(--tw-text-opacity)))}.badge-outline.badge-success{--tw-text-opacity: 1;color:var(--fallback-su,oklch(var(--su)/var(--tw-text-opacity)))}.badge-outline.badge-warning{--tw-text-opacity: 1;color:var(--fallback-wa,oklch(var(--wa)/var(--tw-text-opacity)))}.badge-outline.badge-error{--tw-text-opacity: 1;color:var(--fallback-er,oklch(var(--er)/var(--tw-text-opacity)))}.btm-nav>*:where(.active){border-top-width:2px;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.btm-nav>*.disabled,.btm-nav>*[disabled]{pointer-events:none;--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}.btm-nav>* .label{font-size:1rem;line-height:1.5rem}@media (prefers-reduced-motion: no-preference){.btn{animation:button-pop var(--animation-btn, .25s) ease-out}}.btn:active:hover,.btn:active:focus{animation:button-pop 0s ease-out;transform:scale(var(--btn-focus-scale, .97))}@supports not (color: oklch(0% 0 0)){.btn{background-color:var(--btn-color, var(--fallback-b2));border-color:var(--btn-color, var(--fallback-b2))}.btn-primary{--btn-color: var(--fallback-p)}.btn-secondary{--btn-color: var(--fallback-s)}.btn-success{--btn-color: var(--fallback-su)}.btn-warning{--btn-color: var(--fallback-wa)}.btn-error{--btn-color: var(--fallback-er)}}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-primary.btn-active{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black)}.btn-outline.btn-secondary.btn-active{background-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,black)}.btn-outline.btn-accent.btn-active{background-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,black)}.btn-outline.btn-success.btn-active{background-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black)}.btn-outline.btn-info.btn-active{background-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,black)}.btn-outline.btn-warning.btn-active{background-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,black)}.btn-outline.btn-error.btn-active{background-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black)}}.btn:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px}.btn-primary{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)));outline-color:var(--fallback-p,oklch(var(--p)/1))}@supports (color: oklch(0% 0 0)){.btn-primary{--btn-color: var(--p)}.btn-secondary{--btn-color: var(--s)}.btn-success{--btn-color: var(--su)}.btn-warning{--btn-color: var(--wa)}.btn-error{--btn-color: var(--er)}}.btn-secondary{--tw-text-opacity: 1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)));outline-color:var(--fallback-s,oklch(var(--s)/1))}.btn-success{--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)));outline-color:var(--fallback-su,oklch(var(--su)/1))}.btn-warning{--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)));outline-color:var(--fallback-wa,oklch(var(--wa)/1))}.btn-error{--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)));outline-color:var(--fallback-er,oklch(var(--er)/1))}.btn.glass{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);outline-color:currentColor}.btn.glass.btn-active{--glass-opacity: 25%;--glass-border-opacity: 15%}.btn-ghost{border-width:1px;border-color:transparent;background-color:transparent;color:currentColor;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);outline-color:currentColor}.btn-ghost.btn-active{border-color:transparent;background-color:var(--fallback-bc,oklch(var(--bc)/.2))}.btn-outline{border-color:currentColor;background-color:transparent;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.btn-outline.btn-active{--tw-border-opacity: 1;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-b1,oklch(var(--b1)/var(--tw-text-opacity)))}.btn-outline.btn-primary{--tw-text-opacity: 1;color:var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity)))}.btn-outline.btn-primary.btn-active{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.btn-outline.btn-secondary{--tw-text-opacity: 1;color:var(--fallback-s,oklch(var(--s)/var(--tw-text-opacity)))}.btn-outline.btn-secondary.btn-active{--tw-text-opacity: 1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)))}.btn-outline.btn-accent{--tw-text-opacity: 1;color:var(--fallback-a,oklch(var(--a)/var(--tw-text-opacity)))}.btn-outline.btn-accent.btn-active{--tw-text-opacity: 1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)))}.btn-outline.btn-success{--tw-text-opacity: 1;color:var(--fallback-su,oklch(var(--su)/var(--tw-text-opacity)))}.btn-outline.btn-success.btn-active{--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}.btn-outline.btn-info{--tw-text-opacity: 1;color:var(--fallback-in,oklch(var(--in)/var(--tw-text-opacity)))}.btn-outline.btn-info.btn-active{--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}.btn-outline.btn-warning{--tw-text-opacity: 1;color:var(--fallback-wa,oklch(var(--wa)/var(--tw-text-opacity)))}.btn-outline.btn-warning.btn-active{--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}.btn-outline.btn-error{--tw-text-opacity: 1;color:var(--fallback-er,oklch(var(--er)/var(--tw-text-opacity)))}.btn-outline.btn-error.btn-active{--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}.btn.btn-disabled,.btn[disabled],.btn:disabled{--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .2;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}.btn:is(input[type=checkbox]:checked),.btn:is(input[type=radio]:checked){--tw-border-opacity: 1;border-color:var(--fallback-p,oklch(var(--p)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.btn:is(input[type=checkbox]:checked):focus-visible,.btn:is(input[type=radio]:checked):focus-visible{outline-color:var(--fallback-p,oklch(var(--p)/1))}@keyframes button-pop{0%{transform:scale(var(--btn-focus-scale, .98))}40%{transform:scale(1.02)}to{transform:scale(1)}}.card :where(figure:first-child){overflow:hidden;border-start-start-radius:inherit;border-start-end-radius:inherit;border-end-start-radius:unset;border-end-end-radius:unset}.card :where(figure:last-child){overflow:hidden;border-start-start-radius:unset;border-start-end-radius:unset;border-end-start-radius:inherit;border-end-end-radius:inherit}.card:focus-visible{outline:2px solid currentColor;outline-offset:2px}.card.bordered{border-width:1px;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}.card.compact .card-body{padding:1rem;font-size:.875rem;line-height:1.25rem}.card-title{display:flex;align-items:center;gap:.5rem;font-size:1.25rem;line-height:1.75rem;font-weight:600}.card.image-full :where(figure){overflow:hidden;border-radius:inherit}.checkbox:focus{box-shadow:none}.checkbox:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}.checkbox:disabled{border-width:0px;cursor:not-allowed;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));opacity:.2}.checkbox:checked,.checkbox[aria-checked=true]{background-repeat:no-repeat;animation:checkmark var(--animation-input, .2s) ease-out;background-color:var(--chkbg);background-image:linear-gradient(-45deg,transparent 65%,var(--chkbg) 65.99%),linear-gradient(45deg,transparent 75%,var(--chkbg) 75.99%),linear-gradient(-45deg,var(--chkbg) 40%,transparent 40.99%),linear-gradient(45deg,var(--chkbg) 30%,var(--chkfg) 30.99%,var(--chkfg) 40%,transparent 40.99%),linear-gradient(-45deg,var(--chkfg) 50%,var(--chkbg) 50.99%)}.checkbox:indeterminate{--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));background-repeat:no-repeat;animation:checkmark var(--animation-input, .2s) ease-out;background-image:linear-gradient(90deg,transparent 80%,var(--chkbg) 80%),linear-gradient(-90deg,transparent 80%,var(--chkbg) 80%),linear-gradient(0deg,var(--chkbg) 43%,var(--chkfg) 43%,var(--chkfg) 57%,var(--chkbg) 57%)}@keyframes checkmark{0%{background-position-y:5px}50%{background-position-y:-2px}to{background-position-y:0}}details.collapse{width:100%}details.collapse summary{position:relative;display:block;outline:2px solid transparent;outline-offset:2px}details.collapse summary::-webkit-details-marker{display:none}.collapse:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}.collapse:has(.collapse-title:focus-visible),.collapse:has(>input[type=checkbox]:focus-visible),.collapse:has(>input[type=radio]:focus-visible){outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}.collapse-arrow>.collapse-title:after{position:absolute;display:block;height:.5rem;width:.5rem;--tw-translate-y: -100%;--tw-rotate: 45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.15s;transition-duration:.2s;top:1.9rem;inset-inline-end:1.4rem;content:\"\";transform-origin:75% 75%;box-shadow:2px 2px;pointer-events:none}.collapse-plus>.collapse-title:after{position:absolute;display:block;height:.5rem;width:.5rem;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.3s;top:.9rem;inset-inline-end:1.4rem;content:\"+\";pointer-events:none}.collapse:not(.collapse-open):not(.collapse-close)>input[type=checkbox],.collapse:not(.collapse-open):not(.collapse-close)>input[type=radio]:not(:checked),.collapse:not(.collapse-open):not(.collapse-close)>.collapse-title{cursor:pointer}.collapse:focus:not(.collapse-open):not(.collapse-close):not(.collapse[open])>.collapse-title{cursor:unset}.collapse-title{position:relative}.collapse-title,:where(.collapse>input[type=checkbox]),:where(.collapse>input[type=radio]){padding:1rem;padding-inline-end:3rem;min-height:3.75rem;transition:background-color .2s ease-out}.collapse[open]>:where(.collapse-content),.collapse-open>:where(.collapse-content),.collapse:focus:not(.collapse-close)>:where(.collapse-content),.collapse:not(.collapse-close)>:where(input[type=checkbox]:checked~.collapse-content),.collapse:not(.collapse-close)>:where(input[type=radio]:checked~.collapse-content){padding-bottom:1rem;transition:padding .2s ease-out,background-color .2s ease-out}.collapse[open].collapse-arrow>.collapse-title:after,.collapse-open.collapse-arrow>.collapse-title:after,.collapse-arrow:focus:not(.collapse-close)>.collapse-title:after,.collapse-arrow:not(.collapse-close)>input[type=checkbox]:checked~.collapse-title:after,.collapse-arrow:not(.collapse-close)>input[type=radio]:checked~.collapse-title:after{--tw-translate-y: -50%;--tw-rotate: 225deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.collapse[open].collapse-plus>.collapse-title:after,.collapse-open.collapse-plus>.collapse-title:after,.collapse-plus:focus:not(.collapse-close)>.collapse-title:after,.collapse-plus:not(.collapse-close)>input[type=checkbox]:checked~.collapse-title:after,.collapse-plus:not(.collapse-close)>input[type=radio]:checked~.collapse-title:after{content:\"\u2212\"}.divider:not(:empty){gap:1rem}.dropdown.dropdown-open .dropdown-content,.dropdown:focus .dropdown-content,.dropdown:focus-within .dropdown-content{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.label-text{font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.label-text-alt{font-size:.75rem;line-height:1rem;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.input input{--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));background-color:transparent}.input input:focus{outline:2px solid transparent;outline-offset:2px}.input[list]::-webkit-calendar-picker-indicator{line-height:1em}.input-bordered{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}.input:focus,.input:focus-within{box-shadow:none;border-color:var(--fallback-bc,oklch(var(--bc)/.2));outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.input-error{--tw-border-opacity: 1;border-color:var(--fallback-er,oklch(var(--er)/var(--tw-border-opacity)))}.input-error:focus,.input-error:focus-within{--tw-border-opacity: 1;border-color:var(--fallback-er,oklch(var(--er)/var(--tw-border-opacity)));outline-color:var(--fallback-er,oklch(var(--er)/1))}.input:has(>input[disabled]),.input-disabled,.input:disabled,.input[disabled]{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}.input:has(>input[disabled])::-moz-placeholder,.input-disabled::-moz-placeholder,.input:disabled::-moz-placeholder,.input[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.input:has(>input[disabled])::placeholder,.input-disabled::placeholder,.input:disabled::placeholder,.input[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.input:has(>input[disabled])>input[disabled]{cursor:not-allowed}.input::-webkit-date-and-time-value{text-align:inherit}.join>:where(*:not(:first-child)){margin-top:0;margin-bottom:0;margin-inline-start:-1px}.join>:where(*:not(:first-child)):is(.btn){margin-inline-start:calc(var(--border-btn) * -1)}.join-item:focus{isolation:isolate}.\\!loading{pointer-events:none!important;display:inline-block!important;aspect-ratio:1 / 1!important;width:1.5rem!important;background-color:currentColor!important;-webkit-mask-size:100%!important;mask-size:100%!important;-webkit-mask-repeat:no-repeat!important;mask-repeat:no-repeat!important;-webkit-mask-position:center!important;mask-position:center!important;-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\")!important;mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\")!important}.loading{pointer-events:none;display:inline-block;aspect-ratio:1 / 1;width:1.5rem;background-color:currentColor;-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\")}.loading-spinner{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\")}.loading-xs{width:1rem}.loading-sm{width:1.25rem}.loading-lg{width:2.5rem}:where(.menu li:empty){--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));opacity:.1;margin:.5rem 1rem;height:1px}.menu :where(li ul):before{position:absolute;bottom:.75rem;inset-inline-start:0px;top:.75rem;width:1px;--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));opacity:.1;content:\"\"}.menu :where(li:not(.menu-title)>*:not(ul,details,.menu-title,.btn)),.menu :where(li:not(.menu-title)>details>summary:not(.menu-title)){border-radius:var(--rounded-btn, .5rem);padding:.5rem 1rem;text-align:start;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s;text-wrap:balance}:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(summary,.active,.btn).focus,:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(summary,.active,.btn):focus,:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):is(summary):not(.active,.btn):focus-visible,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(summary,.active,.btn).focus,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(summary,.active,.btn):focus,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):is(summary):not(.active,.btn):focus-visible{cursor:pointer;background-color:var(--fallback-bc,oklch(var(--bc)/.1));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));outline:2px solid transparent;outline-offset:2px}.menu li>*:not(ul,.menu-title,details,.btn):active,.menu li>*:not(ul,.menu-title,details,.btn).active,.menu li>details>summary:active{--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.menu :where(li>details>summary)::-webkit-details-marker{display:none}.menu :where(li>details>summary):after,.menu :where(li>.menu-dropdown-toggle):after{justify-self:end;display:block;margin-top:-.5rem;height:.5rem;width:.5rem;transform:rotate(45deg);transition-property:transform,margin-top;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1);content:\"\";transform-origin:75% 75%;box-shadow:2px 2px;pointer-events:none}.menu :where(li>details[open]>summary):after,.menu :where(li>.menu-dropdown-toggle.menu-dropdown-show):after{transform:rotate(225deg);margin-top:0}.mockup-phone .display{overflow:hidden;border-radius:40px;margin-top:-25px}.mockup-browser .mockup-browser-toolbar .input{position:relative;margin-left:auto;margin-right:auto;display:block;height:1.75rem;width:24rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));padding-left:2rem;direction:ltr}.mockup-browser .mockup-browser-toolbar .input:before{content:\"\";position:absolute;left:.5rem;top:50%;aspect-ratio:1 / 1;height:.75rem;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:9999px;border-width:2px;border-color:currentColor;opacity:.6}.mockup-browser .mockup-browser-toolbar .input:after{content:\"\";position:absolute;left:1.25rem;top:50%;height:.5rem;--tw-translate-y: 25%;--tw-rotate: -45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:9999px;border-width:1px;border-color:currentColor;opacity:.6}.modal:not(dialog:not(.modal-open)),.modal::backdrop{background-color:#0006;animation:modal-pop .2s ease-out}.modal-backdrop{z-index:-1;grid-column-start:1;grid-row-start:1;display:grid;align-self:stretch;justify-self:stretch;color:transparent}.modal-open .modal-box,.modal-toggle:checked+.modal .modal-box,.modal:target .modal-box,.modal[open] .modal-box{--tw-translate-y: 0px;--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.modal-action>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.modal-action:where([dir=rtl],[dir=rtl] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 1}@keyframes modal-pop{0%{opacity:0}}@keyframes progress-loading{50%{background-position-x:-115%}}.radio:focus{box-shadow:none}.radio:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}.radio:checked,.radio[aria-checked=true]{--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));background-image:none;animation:radiomark var(--animation-input, .2s) ease-out;box-shadow:0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset}.radio:disabled{cursor:not-allowed;opacity:.2}@keyframes radiomark{0%{box-shadow:0 0 0 12px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 12px var(--fallback-b1,oklch(var(--b1)/1)) inset}50%{box-shadow:0 0 0 3px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 3px var(--fallback-b1,oklch(var(--b1)/1)) inset}to{box-shadow:0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset}}.range:focus-visible::-webkit-slider-thumb{--focus-shadow: 0 0 0 6px var(--fallback-b1,oklch(var(--b1)/1)) inset, 0 0 0 2rem var(--range-shdw) inset}.range:focus-visible::-moz-range-thumb{--focus-shadow: 0 0 0 6px var(--fallback-b1,oklch(var(--b1)/1)) inset, 0 0 0 2rem var(--range-shdw) inset}.range::-webkit-slider-runnable-track{height:.5rem;width:100%;border-radius:var(--rounded-box, 1rem);background-color:var(--fallback-bc,oklch(var(--bc)/.1))}.range::-moz-range-track{height:.5rem;width:100%;border-radius:var(--rounded-box, 1rem);background-color:var(--fallback-bc,oklch(var(--bc)/.1))}.range::-webkit-slider-thumb{position:relative;height:1.5rem;width:1.5rem;border-radius:var(--rounded-box, 1rem);border-style:none;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));appearance:none;-webkit-appearance:none;top:50%;color:var(--range-shdw);transform:translateY(-50%);--filler-size: 100rem;--filler-offset: .6rem;box-shadow:0 0 0 3px var(--range-shdw) inset,var(--focus-shadow, 0 0),calc(var(--filler-size) * -1 - var(--filler-offset)) 0 0 var(--filler-size)}.range::-moz-range-thumb{position:relative;height:1.5rem;width:1.5rem;border-radius:var(--rounded-box, 1rem);border-style:none;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));top:50%;color:var(--range-shdw);--filler-size: 100rem;--filler-offset: .5rem;box-shadow:0 0 0 3px var(--range-shdw) inset,var(--focus-shadow, 0 0),calc(var(--filler-size) * -1 - var(--filler-offset)) 0 0 var(--filler-size)}@keyframes rating-pop{0%{transform:translateY(-.125em)}40%{transform:translateY(-.125em)}to{transform:translateY(0)}}.select-bordered{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}.select:focus{box-shadow:none;border-color:var(--fallback-bc,oklch(var(--bc)/.2));outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.select-disabled,.select:disabled,.select[disabled]{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}.select-disabled::-moz-placeholder,.select:disabled::-moz-placeholder,.select[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.select-disabled::placeholder,.select:disabled::placeholder,.select[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.select-multiple,.select[multiple],.select[size].select:not([size=\"1\"]){background-image:none;padding-right:1rem}[dir=rtl] .select{background-position:calc(0% + 12px) calc(1px + 50%),calc(0% + 16px) calc(1px + 50%)}@keyframes skeleton{0%{background-position:150%}to{background-position:-50%}}:where(.stats)>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)));--tw-divide-y-reverse: 0;border-top-width:calc(0px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(0px * var(--tw-divide-y-reverse))}[dir=rtl] .stats>*:not([hidden])~*:not([hidden]){--tw-divide-x-reverse: 1}.steps .step:before{top:0;grid-column-start:1;grid-row-start:1;height:.5rem;width:100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));content:\"\";margin-inline-start:-100%}.steps .step:after{content:counter(step);counter-increment:step;z-index:1;position:relative;grid-column-start:1;grid-row-start:1;display:grid;height:2rem;width:2rem;place-items:center;place-self:center;border-radius:9999px;--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.steps .step:first-child:before{content:none}.steps .step[data-content]:after{content:attr(data-content)}.steps .step-neutral+.step-neutral:before,.steps .step-neutral:after{--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.steps .step-primary+.step-primary:before,.steps .step-primary:after{--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.steps .step-secondary+.step-secondary:before,.steps .step-secondary:after{--tw-bg-opacity: 1;background-color:var(--fallback-s,oklch(var(--s)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)))}.steps .step-accent+.step-accent:before,.steps .step-accent:after{--tw-bg-opacity: 1;background-color:var(--fallback-a,oklch(var(--a)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)))}.steps .step-info+.step-info:before{--tw-bg-opacity: 1;background-color:var(--fallback-in,oklch(var(--in)/var(--tw-bg-opacity)))}.steps .step-info:after{--tw-bg-opacity: 1;background-color:var(--fallback-in,oklch(var(--in)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}.steps .step-success+.step-success:before{--tw-bg-opacity: 1;background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity)))}.steps .step-success:after{--tw-bg-opacity: 1;background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}.steps .step-warning+.step-warning:before{--tw-bg-opacity: 1;background-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-bg-opacity)))}.steps .step-warning:after{--tw-bg-opacity: 1;background-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}.steps .step-error+.step-error:before{--tw-bg-opacity: 1;background-color:var(--fallback-er,oklch(var(--er)/var(--tw-bg-opacity)))}.steps .step-error:after{--tw-bg-opacity: 1;background-color:var(--fallback-er,oklch(var(--er)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}.tabs-lifted>.tab:focus-visible{border-end-end-radius:0;border-end-start-radius:0}.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]),.tab:is(input:checked){border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: 1;--tw-text-opacity: 1}.tab:focus{outline:2px solid transparent;outline-offset:2px}.tab:focus-visible{outline:2px solid currentColor;outline-offset:-5px}.tab-disabled,.tab[disabled]{cursor:not-allowed;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}.tabs-bordered>.tab{border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: .2;border-style:solid;border-bottom-width:calc(var(--tab-border, 1px) + 1px)}.tabs-lifted>.tab{border:var(--tab-border, 1px) solid transparent;border-width:0 0 var(--tab-border, 1px) 0;border-start-start-radius:var(--tab-radius, .5rem);border-start-end-radius:var(--tab-radius, .5rem);border-bottom-color:var(--tab-border-color);padding-inline-start:var(--tab-padding, 1rem);padding-inline-end:var(--tab-padding, 1rem);padding-top:var(--tab-border, 1px)}.tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]),.tabs-lifted>.tab:is(input:checked){background-color:var(--tab-bg);border-width:var(--tab-border, 1px) var(--tab-border, 1px) 0 var(--tab-border, 1px);border-inline-start-color:var(--tab-border-color);border-inline-end-color:var(--tab-border-color);border-top-color:var(--tab-border-color);padding-inline-start:calc(var(--tab-padding, 1rem) - var(--tab-border, 1px));padding-inline-end:calc(var(--tab-padding, 1rem) - var(--tab-border, 1px));padding-bottom:var(--tab-border, 1px);padding-top:0}.tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):before,.tabs-lifted>.tab:is(input:checked):before{z-index:1;content:\"\";display:block;position:absolute;width:calc(100% + var(--tab-radius, .5rem) * 2);height:var(--tab-radius, .5rem);bottom:0;background-size:var(--tab-radius, .5rem);background-position:top left,top right;background-repeat:no-repeat;--tab-grad: calc(69% - var(--tab-border, 1px));--radius-start: radial-gradient( circle at top left, transparent var(--tab-grad), var(--tab-border-color) calc(var(--tab-grad) + .25px), var(--tab-border-color) calc(var(--tab-grad) + var(--tab-border, 1px)), var(--tab-bg) calc(var(--tab-grad) + var(--tab-border, 1px) + .25px) );--radius-end: radial-gradient( circle at top right, transparent var(--tab-grad), var(--tab-border-color) calc(var(--tab-grad) + .25px), var(--tab-border-color) calc(var(--tab-grad) + var(--tab-border, 1px)), var(--tab-bg) calc(var(--tab-grad) + var(--tab-border, 1px) + .25px) );background-image:var(--radius-start),var(--radius-end)}.tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):first-child:before,.tabs-lifted>.tab:is(input:checked):first-child:before{background-image:var(--radius-end);background-position:top right}[dir=rtl] .tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):first-child:before,[dir=rtl] .tabs-lifted>.tab:is(input:checked):first-child:before{background-image:var(--radius-start);background-position:top left}.tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):last-child:before,.tabs-lifted>.tab:is(input:checked):last-child:before{background-image:var(--radius-start);background-position:top left}[dir=rtl] .tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):last-child:before,[dir=rtl] .tabs-lifted>.tab:is(input:checked):last-child:before{background-image:var(--radius-end);background-position:top right}.tabs-lifted>:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled])+.tabs-lifted :is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):before,.tabs-lifted>.tab:is(input:checked)+.tabs-lifted .tab:is(input:checked):before{background-image:var(--radius-end);background-position:top right}.tabs-boxed{border-radius:var(--rounded-btn, .5rem);--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));padding:.25rem}.tabs-boxed .tab{border-radius:var(--rounded-btn, .5rem)}.tabs-boxed :is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]),.tabs-boxed :is(input:checked){--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.table:where([dir=rtl],[dir=rtl] *){text-align:right}.table :where(th,td){padding:.75rem 1rem;vertical-align:middle}.table tr.active,.table tr.active:nth-child(2n),.table-zebra tbody tr:nth-child(2n){--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))}.table-zebra tr.active,.table-zebra tr.active:nth-child(2n),.table-zebra-zebra tbody tr:nth-child(2n){--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}.table :where(thead tr,tbody tr:not(:last-child),tbody tr:first-child:last-child){border-bottom-width:1px;--tw-border-opacity: 1;border-bottom-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}.table :where(thead,tfoot){white-space:nowrap;font-size:.75rem;line-height:1rem;font-weight:700;color:var(--fallback-bc,oklch(var(--bc)/.6))}.table :where(tfoot){border-top-width:1px;--tw-border-opacity: 1;border-top-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}.textarea-bordered{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}.textarea:focus{box-shadow:none;border-color:var(--fallback-bc,oklch(var(--bc)/.2));outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.textarea-disabled,.textarea:disabled,.textarea[disabled]{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}.textarea-disabled::-moz-placeholder,.textarea:disabled::-moz-placeholder,.textarea[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.textarea-disabled::placeholder,.textarea:disabled::placeholder,.textarea[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.toast>*{animation:toast-pop .25s ease-out}@keyframes toast-pop{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}.badge-xs{height:.75rem;font-size:.75rem;line-height:.75rem;padding-left:.313rem;padding-right:.313rem}.badge-sm{height:1rem;font-size:.75rem;line-height:1rem;padding-left:.438rem;padding-right:.438rem}.badge-lg{height:1.5rem;font-size:1rem;line-height:1.5rem;padding-left:.688rem;padding-right:.688rem}.btm-nav-xs>*:where(.active){border-top-width:1px}.btm-nav-sm>*:where(.active){border-top-width:2px}.btm-nav-md>*:where(.active){border-top-width:2px}.btm-nav-lg>*:where(.active){border-top-width:4px}.btn-xs{height:1.5rem;min-height:1.5rem;padding-left:.5rem;padding-right:.5rem;font-size:.75rem}.btn-sm{height:2rem;min-height:2rem;padding-left:.75rem;padding-right:.75rem;font-size:.875rem}.btn-square:where(.btn-xs){height:1.5rem;width:1.5rem;padding:0}.btn-square:where(.btn-sm){height:2rem;width:2rem;padding:0}.btn-square:where(.btn-md){height:3rem;width:3rem;padding:0}.btn-square:where(.btn-lg){height:4rem;width:4rem;padding:0}.btn-circle:where(.btn-xs){height:1.5rem;width:1.5rem;border-radius:9999px;padding:0}.btn-circle:where(.btn-sm){height:2rem;width:2rem;border-radius:9999px;padding:0}.btn-circle:where(.btn-md){height:3rem;width:3rem;border-radius:9999px;padding:0}.btn-circle:where(.btn-lg){height:4rem;width:4rem;border-radius:9999px;padding:0}[type=checkbox].checkbox-sm{height:1.25rem;width:1.25rem}.input-sm{height:2rem;padding-left:.75rem;padding-right:.75rem;font-size:.875rem;line-height:2rem}.join.join-vertical{flex-direction:column}.join.join-vertical .join-item:first-child:not(:last-child),.join.join-vertical *:first-child:not(:last-child) .join-item{border-end-start-radius:0;border-end-end-radius:0;border-start-start-radius:inherit;border-start-end-radius:inherit}.join.join-vertical .join-item:last-child:not(:first-child),.join.join-vertical *:last-child:not(:first-child) .join-item{border-start-start-radius:0;border-start-end-radius:0;border-end-start-radius:inherit;border-end-end-radius:inherit}.join.join-horizontal{flex-direction:row}.join.join-horizontal .join-item:first-child:not(:last-child),.join.join-horizontal *:first-child:not(:last-child) .join-item{border-end-end-radius:0;border-start-end-radius:0;border-end-start-radius:inherit;border-start-start-radius:inherit}.join.join-horizontal .join-item:last-child:not(:first-child),.join.join-horizontal *:last-child:not(:first-child) .join-item{border-end-start-radius:0;border-start-start-radius:0;border-end-end-radius:inherit;border-start-end-radius:inherit}.menu-horizontal{display:inline-flex;flex-direction:row}.menu-horizontal>li:not(.menu-title)>details>ul{position:absolute}.select-sm{height:2rem;min-height:2rem;padding-left:.75rem;padding-right:2rem;font-size:.875rem;line-height:2rem}[dir=rtl] .select-sm{padding-left:2rem;padding-right:.75rem}.steps-horizontal .step{display:grid;grid-template-columns:repeat(1,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));place-items:center;text-align:center}.steps-vertical .step{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(1,minmax(0,1fr))}.tabs-md :where(.tab){height:2rem;font-size:.875rem;line-height:1.25rem;line-height:2;--tab-padding: 1rem}.tabs-lg :where(.tab){height:3rem;font-size:1.125rem;line-height:1.75rem;line-height:2;--tab-padding: 1.25rem}.tabs-sm :where(.tab){height:1.5rem;font-size:.875rem;line-height:.75rem;--tab-padding: .75rem}.tabs-xs :where(.tab){height:1.25rem;font-size:.75rem;line-height:.75rem;--tab-padding: .5rem}.textarea-sm{padding:.25rem .75rem;font-size:.875rem;line-height:2rem}:where(.toast){bottom:0;inset-inline-end:0px;inset-inline-start:auto;top:auto;--tw-translate-x: 0px;--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-start){inset-inline-end:auto;inset-inline-start:0px;--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-center){inset-inline-end:50%;inset-inline-start:50%;--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-center):where([dir=rtl],[dir=rtl] *){--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-end){inset-inline-end:0px;inset-inline-start:auto;--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-bottom){bottom:0;top:auto;--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-middle){bottom:auto;top:50%;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-top){bottom:auto;top:0;--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.tooltip{position:relative;display:inline-block;--tooltip-offset: calc(100% + 1px + var(--tooltip-tail, 0px))}.tooltip:before{position:absolute;pointer-events:none;z-index:1;content:var(--tw-content);--tw-content: attr(data-tip)}.tooltip:before,.tooltip-top:before{transform:translate(-50%);top:auto;left:50%;right:auto;bottom:var(--tooltip-offset)}.tooltip-right:before{transform:translateY(-50%);top:50%;left:var(--tooltip-offset);right:auto;bottom:auto}.card-compact .card-body{padding:1rem;font-size:.875rem;line-height:1.25rem}.card-compact .card-title{margin-bottom:.25rem}.card-normal .card-body{padding:var(--padding-card, 2rem);font-size:1rem;line-height:1.5rem}.card-normal .card-title{margin-bottom:.75rem}.join.join-vertical>:where(*:not(:first-child)){margin-left:0;margin-right:0;margin-top:-1px}.join.join-vertical>:where(*:not(:first-child)):is(.btn){margin-top:calc(var(--border-btn) * -1)}.join.join-horizontal>:where(*:not(:first-child)){margin-top:0;margin-bottom:0;margin-inline-start:-1px}.join.join-horizontal>:where(*:not(:first-child)):is(.btn){margin-inline-start:calc(var(--border-btn) * -1);margin-top:0}.menu-horizontal>li:not(.menu-title)>details>ul{margin-inline-start:0px;margin-top:1rem;padding-top:.5rem;padding-bottom:.5rem;padding-inline-end:.5rem}.menu-horizontal>li>details>ul:before{content:none}:where(.menu-horizontal>li:not(.menu-title)>details>ul){border-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.modal-top :where(.modal-box){width:100%;max-width:none;--tw-translate-y: -2.5rem;--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-bottom-right-radius:var(--rounded-box, 1rem);border-bottom-left-radius:var(--rounded-box, 1rem);border-top-left-radius:0;border-top-right-radius:0}.modal-middle :where(.modal-box){width:91.666667%;max-width:32rem;--tw-translate-y: 0px;--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-top-left-radius:var(--rounded-box, 1rem);border-top-right-radius:var(--rounded-box, 1rem);border-bottom-right-radius:var(--rounded-box, 1rem);border-bottom-left-radius:var(--rounded-box, 1rem)}.modal-bottom :where(.modal-box){width:100%;max-width:none;--tw-translate-y: 2.5rem;--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-top-left-radius:var(--rounded-box, 1rem);border-top-right-radius:var(--rounded-box, 1rem);border-bottom-right-radius:0;border-bottom-left-radius:0}.steps-horizontal .step{grid-template-rows:40px 1fr;grid-template-columns:auto;min-width:4rem}.steps-horizontal .step:before{height:.5rem;width:100%;--tw-translate-x: 0px;--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));content:\"\";margin-inline-start:-100%}.steps-horizontal .step:where([dir=rtl],[dir=rtl] *):before{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.steps-vertical .step{gap:.5rem;grid-template-columns:40px 1fr;grid-template-rows:auto;min-height:4rem;justify-items:start}.steps-vertical .step:before{height:100%;width:.5rem;--tw-translate-x: -50%;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));margin-inline-start:50%}.steps-vertical .step:where([dir=rtl],[dir=rtl] *):before{--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.table-sm :not(thead):not(tfoot) tr{font-size:.875rem;line-height:1.25rem}.table-sm :where(th,td){padding:.5rem .75rem}.tooltip{position:relative;display:inline-block;text-align:center;--tooltip-tail: .1875rem;--tooltip-color: var(--fallback-n,oklch(var(--n)/1));--tooltip-text-color: var(--fallback-nc,oklch(var(--nc)/1));--tooltip-tail-offset: calc(100% + .0625rem - var(--tooltip-tail))}.tooltip:before,.tooltip:after{opacity:0;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-delay:.1s;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.tooltip:after{position:absolute;content:\"\";border-style:solid;border-width:var(--tooltip-tail, 0);width:0;height:0;display:block}.tooltip:before{max-width:20rem;white-space:normal;border-radius:.25rem;padding:.25rem .5rem;font-size:.875rem;line-height:1.25rem;background-color:var(--tooltip-color);color:var(--tooltip-text-color);width:-moz-max-content;width:max-content}.tooltip.tooltip-open:before{opacity:1;transition-delay:75ms}.tooltip.tooltip-open:after{opacity:1;transition-delay:75ms}.tooltip:hover:before{opacity:1;transition-delay:75ms}.tooltip:hover:after{opacity:1;transition-delay:75ms}.tooltip:has(:focus-visible):after,.tooltip:has(:focus-visible):before{opacity:1;transition-delay:75ms}.tooltip:not([data-tip]):hover:before,.tooltip:not([data-tip]):hover:after{visibility:hidden;opacity:0}.tooltip:after,.tooltip-top:after{transform:translate(-50%);border-color:var(--tooltip-color) transparent transparent transparent;top:auto;left:50%;right:auto;bottom:var(--tooltip-tail-offset)}.tooltip-right:after{transform:translateY(-50%);border-color:transparent var(--tooltip-color) transparent transparent;top:50%;left:calc(var(--tooltip-tail-offset) + .0625rem);right:auto;bottom:auto}.visible{visibility:visible}.collapse{visibility:collapse}.static{position:static}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.top-0{top:0}.top-\\[3em\\]{top:3em}.z-10{z-index:10}.z-50{z-index:50}.z-\\[1\\]{z-index:1}.col-span-2{grid-column:span 2 / span 2}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.-mt-0\\.5{margin-top:-.125rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-8{margin-left:2rem}.mr-1{margin-right:.25rem}.mr-32{margin-right:8rem}.mt-0\\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-auto{margin-top:auto}.block{display:block}.flex{display:flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-16{height:4rem}.h-2{height:.5rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-96{height:24rem}.h-\\[90vh\\]{height:90vh}.h-full{height:100%}.h-screen{height:100vh}.max-h-32{max-height:8rem}.max-h-60{max-height:15rem}.max-h-96{max-height:24rem}.min-h-\\[2\\.5rem\\]{min-height:2.5rem}.min-h-screen{min-height:100vh}.w-1\\/3{width:33.333333%}.w-16{width:4rem}.w-2{width:.5rem}.w-3{width:.75rem}.w-32{width:8rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-full{width:100%}.w-px{width:1px}.max-w-4xl{max-width:56rem}.max-w-6xl{max-width:72rem}.max-w-md{max-width:28rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-\\[2\\]{flex:2}.flex-none{flex:none}.shrink-0{flex-shrink:0}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-y-0\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-box{border-radius:var(--rounded-box, 1rem)}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-base-300{--tw-border-opacity: 1;border-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-border-opacity, 1)))}.border-base-content\\/20{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}.bg-base-100{--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity, 1)))}.bg-base-200{--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity, 1)))}.bg-base-300{--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity, 1)))}.bg-base-300\\/30{background-color:var(--fallback-b3,oklch(var(--b3)/.3))}.bg-base-content{--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity, 1)))}.bg-base-content\\/30{background-color:var(--fallback-bc,oklch(var(--bc)/.3))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-error{--tw-bg-opacity: 1;background-color:var(--fallback-er,oklch(var(--er)/var(--tw-bg-opacity, 1)))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))}.bg-purple-500{--tw-bg-opacity: 1;background-color:rgb(168 85 247 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-success{--tw-bg-opacity: 1;background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity, 1)))}.bg-transparent{background-color:transparent}.bg-warning{--tw-bg-opacity: 1;background-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-bg-opacity, 1)))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.stroke-current{stroke:currentColor}.p-0{padding:0}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-64{padding-left:16rem;padding-right:16rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-6xl{font-size:3.75rem;line-height:1}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.leading-7{line-height:1.75rem}.text-base-content{--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity, 1)))}.text-base-content\\/60{color:var(--fallback-bc,oklch(var(--bc)/.6))}.text-error{--tw-text-opacity: 1;color:var(--fallback-er,oklch(var(--er)/var(--tw-text-opacity, 1)))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-primary{--tw-text-opacity: 1;color:var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity, 1)))}.text-success{--tw-text-opacity: 1;color:var(--fallback-su,oklch(var(--su)/var(--tw-text-opacity, 1)))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.opacity-20{opacity:.2}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-filter{backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}.hover\\:bg-base-200:hover{--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity, 1)))}.hover\\:bg-base-300:hover{--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity, 1)))}.hover\\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.group:hover .group-hover\\:opacity-90{opacity:.9}@media (min-width: 768px){.md\\:col-span-3{grid-column:span 3 / span 3}.md\\:inline{display:inline}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 1024px){.lg\\:col-span-2{grid-column:span 2 / span 2}.lg\\:col-span-6{grid-column:span 6 / span 6}.lg\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}.card.svelte-1qok2wg{backdrop-filter:blur(10px)}.active.svelte-1fgps4v{background-color:hsl(var(--p) / .2)}\n",
21225
- "en-Woa_MXgq.js": 'const e={error:"Error",loading:"Loading...",save:"Save",cancel:"Cancel",delete:"Delete",edit:"Edit",add:"Add",confirm:"Confirm",reset:"Reset",search:"Search",filter:"Filter",export:"Export",import:"Import",close:"Close"},t={dashboard:"Dashboard",routes:"Routes",logs:"Request Logs",configuration:"Configuration"},r={title:"Dashboard",dataRange:"Data Time Range",totalRequests:"Total Requests",requestsPerSec:"Requests/sec",requestsPerSecond:"Requests/sec",successRate:"Success Rate",avgResponseTime:"Avg Response Time",upstreamAnalysis:"Upstream Analysis",upstreamDistribution:"Upstream Request Distribution",upstreamFailures:"Upstream Failure Statistics",upstreamStatusCodes:"Upstream Status Code Distribution",noUpstreamData:"No upstream data available for the selected time range",noData:"No data available"},a={title:"Monitoring Charts",range:{"1h":"1 Hour","12h":"12 Hours","24h":"24 Hours",oneHour:"1 Hour",twelveHours:"12 Hours",twentyFourHours:"24 Hours"},charts:{requestsTrend:"Requests Trend",periodRequests:"Period Requests",requests:"Requests",responseTimeTrend:"Response Time Trend",avgResponseTime:"Avg Response Time (ms)",milliseconds:"Milliseconds (ms)",successRateTrend:"Success Rate Trend",successRate:"Success Rate (%)",percentage:"Percentage (%)",errorsTrend:"Errors Trend",periodErrors:"Period Errors",errors:"Errors"},noData:"No historical data available"},o={title:"Routes",subtitle:"Manage your reverse proxy routes and upstreams",addRoute:"Add Route",newRoute:"+ New Route",createFirstRoute:"Create First Route",editRoute:"Edit Route",deleteRoute:"Delete Route",export:"Export",import:"Import",path:"Path",upstreams:"Upstreams",actions:"Actions",searchPlaceholder:"Search routes or upstreams...",allTransformers:"All Transformers",noRoutes:"No routes configured",noRoutesMessage:"Create your first route to start proxying requests",noMatchingRoutes:"No matching routes",noMatchingMessage:"Try adjusting your search or filter criteria",showingRoutes:"Showing {count} of {total} route(s)",confirmDelete:"Confirm Delete Route",confirmDeleteMessage:\'Are you sure you want to delete route "{path}"? This action cannot be undone.\',deleted:\'Route "{path}" has been deleted\',deleteFailed:"Delete failed: {error}",duplicated:\'Route "{path}" has been duplicated\',duplicateFailed:"Duplicate failed: {error}",noRoutesToExport:"No routes to export",exported:"Routes exported",importMustBeArray:"Import file must be an array of routes",importSuccess:"Successfully imported {success} route(s)",importPartialSuccess:"Successfully imported {success} route(s), failed {failed}",importFailed:"Import failed: {error}"},s={title:"Configuration",subtitle:"Edit and manage system configuration",export:"Export",import:"Import",reload:"Reload",restart:"Restart Service",formEditor:"Form Editor",jsonEditor:"JSON Editor",systemSettings:"System Settings",serverPort:"Server Port",workerProcesses:"Worker Processes",workerProcessesHelp:"Number of worker processes to spawn",logLevel:"Log Level",bodyParserLimit:"Body Parser Limit",bodyParserLimitHelp:\'Maximum request body size (e.g., "50mb", "100kb")\',requiresRestart:"Note: Changes to Port, Workers, Log Level, and Body Parser Limit require a service restart to take effect.",routesConfigured:"{count} routes configured.",manageRoutes:"Use the Routes page to manage routes.",jsonConfiguration:"JSON Configuration",jsonParseError:"JSON Parse Error: {error}",jsonPlaceholder:"Enter JSON configuration...",jsonHelp:"Edit the raw JSON configuration. Changes will be validated before saving.",unsavedChanges:"You have unsaved changes",reset:"Reset",save:"Save Configuration",confirmRestart:"Confirm Service Restart",restartMessage:"Are you sure you want to restart the service? This will cause a brief interruption (typically 2-3 seconds) as the service gracefully restarts.",restartWarning:"Active connections may be temporarily interrupted.",validationFailed:"Configuration validation failed: {error}",saved:"Configuration saved",saveFailed:"Save failed: {error}",exported:"Configuration exported",imported:"Configuration imported",importFailed:"Import failed: {error}",reloaded:"Configuration successfully reloaded",reloadFailed:"Reload failed: {error}",restartSent:"Restart signal sent, service will restart in a few seconds",restartDaemonOnly:\'Restart feature is only available in daemon mode. Please use "bungee restart" command or manually restart the development server.\',restartFailed:"Restart failed: {error}"},i={title:"404",message:"Page Not Found",goHome:"Go Home"},n={newRoute:"New Route",editRoute:"Edit Route",backToList:"Back to List",routePath:"Route Path",pathPlaceholder:"e.g.: /api/*",pathHelp:"Supports wildcards (*) and parameters (:param)",pathRewrite:"Path Rewrite",pathRewriteHelp:"Regex patterns to modify request paths",addPathRewriteRule:"Add Path Rewrite Rule",patternPlaceholder:"^/api",replacementPlaceholder:"/v1",upstreams:"Upstreams",addUpstream:"Add Upstream",transformer:"Route Transformer",transformerHelp:"Transformer applied to the entire route (optional)",optional:"Optional",failoverTitle:"Failover",failoverHelp:"Configure automatic failover and health check mechanisms",enableFailover:"Enable automatic failover",retryableStatusCodes:"Retryable Status Codes",retryableStatusCodesPlaceholder:"Default: 500, 502, 503, 504 (Server Errors)",retryableStatusCodesHelp:"Automatically retry other upstreams when these status codes occur",passiveHealthCheck:"Passive Health Check",passiveHealthCheckTooltip:"Monitors actual request success/failure to determine upstream health, no extra probe requests",consecutiveFailuresThreshold:"Consecutive Failures Threshold",consecutiveFailuresThresholdHelp:"Mark as unhealthy after this many consecutive failures (default: 3)",healthyThreshold:"Healthy Threshold",healthyThresholdHelp:"Recover to healthy after this many consecutive successes (default: 2)",requestTimeoutMs:"Request Timeout (ms)",requestTimeoutMsHelp:"Timeout for normal requests (default: 30000ms)",connectTimeoutMs:"Connect Timeout (ms)",connectTimeoutMsHelp:"Timeout for establishing connection (default: 5000ms)",activeHealthCheck:"Active Health Check",activeHealthCheckTooltip:"Periodically sends probe requests to actively detect upstream health, independent of business traffic",enableActiveHealthCheck:"Enable active health check",healthCheckIntervalMs:"Check Interval (ms)",healthCheckIntervalMsHelp:"How often to perform health checks (default: 10000ms)",healthCheckTimeoutMs:"Check Timeout (ms)",healthCheckTimeoutMsHelp:"Timeout for health check requests (default: 3000ms)",healthCheckPath:"Check Path",healthCheckPathHelp:"HTTP path for health checks (default: /health)",healthCheckMethod:"HTTP Method",healthCheckExpectedStatus:"Expected Status Codes",healthCheckExpectedStatusHelp:"Expected status codes for health checks (default: 200)",healthCheckUnhealthyThreshold:"Unhealthy Threshold",healthCheckUnhealthyThresholdHelp:"Mark as unhealthy after this many consecutive failures (default: 3)",healthCheckHealthyThreshold:"Healthy Threshold",healthCheckHealthyThresholdHelp:"Recover to healthy after this many consecutive successes (default: 2)",slowStart:"Slow Start",slowStartTooltip:"Gradually increases traffic to recovered upstreams to prevent immediate overload and re-failure",enableSlowStart:"Enable slow start mechanism",slowStartDurationMs:"Slow Start Duration (ms)",slowStartDurationMsHelp:"Duration to gradually increase weight after recovery (default: 30000ms)",slowStartInitialWeightFactor:"Initial Weight Factor",slowStartInitialWeightFactorHelp:"Initial weight ratio after recovery, 0.1 means 10% (default: 0.1)",failoverInfoNotice:"Failover automatically detects upstream health status and switches to backup upstreams on failure to ensure service availability.",recoveryIntervalMs:"Recovery Interval (ms)",recoveryIntervalPlaceholder:"5000",recoveryIntervalHelp:"Wait time before attempting to recover a failed upstream",recoveryTimeoutMs:"Recovery Timeout (ms)",recoveryTimeoutPlaceholder:"3000",recoveryTimeoutHelp:"Timeout for recovery attempts to avoid long pending requests",saveRoute:"Save Route",cancel:"Cancel",saving:"Saving...",loadingTemplates:"Loading templates...",useTemplate:"Use Template",routeSaved:"Route saved",routeUpdated:"Route updated",saveFailed:"Save failed: {error}",pathRequired:"Route path cannot be empty",upstreamRequired:"At least one upstream is required"},l={upstreams:"{count} upstream(s)",hasTransformer:"With transformer",failover:"Failover",edit:"Edit",duplicate:"Duplicate",delete:"Delete",duplicating:"Duplicating...",deleting:"Deleting..."},u={title:"Upstream #{index}",targetUrl:"Target URL",targetPlaceholder:"https://api.example.com",targetHelp:"Full URL of the upstream server",weight:"Weight",weightHelp:"Load balancing weight (1-100)",transformer:"Upstream Transformer",transformerHelp:"Transformer applied only to this upstream (optional)",remove:"Remove Upstream",targetRequired:"Target URL cannot be empty",invalidUrl:"Invalid URL format"},d={selectPlugin:"Select Plugin",none:"No Plugin",description:"Plugin Description",testPlugin:"Test Plugin",testing:"Testing...",input:"Input (Original Format)",output:"Output (Transformed Format)",inputPlaceholder:"Enter test data...",testSuccess:"Transform successful",testFailed:"Transform failed: {error}"},c={title:"Request Headers",addHeader:"Add Header",name:"Name",namePlaceholder:"Content-Type",value:"Value",valuePlaceholder:"application/json",remove:"Remove",empty:"No headers",default:"Default Headers"},p={title:"Request Body",bodyType:"Body Type",json:"JSON",text:"Plain Text",form:"Form Data",none:"No Body",placeholder:"Enter request body content...",jsonInvalid:"Invalid JSON format",replace:"Replace",default:"Default"},h={title:"Conditional Expression",placeholder:"request.headers[\'User-Agent\'].includes(\'Mobile\')",help:"Use JavaScript expressions that return true or false",examples:"Examples",example1:"Check request headers",example2:"Check query parameters",example3:"Check request method",test:"Test Expression",testResult:"Test Result",resultTrue:"Condition is true",resultFalse:"Condition is false",resultError:"Expression error: {error}"},m={title:"Route Templates",subtitle:"Quickly create common route configurations",useTemplate:"Use This Template",categories:{api:"API Proxy",static:"Static Resources",websocket:"WebSocket",auth:"Auth Proxy"},restApi:{name:"REST API Proxy",description:"Standard RESTful API proxy configuration"},graphql:{name:"GraphQL API",description:"GraphQL endpoint proxy"},static:{name:"Static File Server",description:"Proxy static resource files"},websocket:{name:"WebSocket Proxy",description:"Real-time communication WebSocket proxy"},loadBalancing:{name:"Load Balancing",description:"Multi-upstream load balancing configuration"}},g={title:"Confirm Action",confirm:"Confirm",cancel:"Cancel"},f={targetRequired:"Target URL cannot be empty",targetProtocol:"Target URL must use http or https protocol",invalidUrl:"Invalid URL format",weightPositive:"Weight must be positive",priorityNonNegative:"Priority must be non-negative",totalWeightPositive:"Total weight must be greater than 0",unknownTransformer:"Unknown transformer: {transformer}. Available options: {options}",pathRequired:"Path cannot be empty",pathStartSlash:"Path must start with /",upstreamRequired:"At least one upstream is required",invalidRegex:"Invalid regular expression: {pattern}",invalidStatusCode:"Invalid status code: {code}",recoveryIntervalPositive:"Recovery interval must be greater than 0",recoveryTimeoutPositive:"Recovery timeout must be greater than 0",expressionEmpty:"Expression cannot be empty",mismatchedBraces:"Mismatched {{ }} braces",mismatchedParentheses:"Mismatched parentheses",mismatchedQuotes:"Mismatched quotes"},y={globalAuth:"Global Authentication",routeAuth:"Route Authentication",helpText:"Protect your API endpoints",enableAuth:"Enable Authentication",enabled:"Enabled",disabled:"Disabled",tokens:"Token List",tokenPlaceholder:"Enter token or use {{ env.TOKEN_NAME }}",addToken:"Add Token",expressionSupport:"Expression syntax is supported for referencing environment variables:",securityNotice:"When authentication is enabled, the Authorization header is automatically removed and will not be forwarded to upstream servers (security measure).",routeAuthHelp:"Route-level authentication will override global authentication configuration. If not configured, the global authentication settings will be used."},v={title:"Request Logs",filters:"Filters",searchTerm:"Search",searchPlaceholder:"Search path or error message...",method:"HTTP Method",allMethods:"All Methods",status:"Status Code",statusPlaceholder:"e.g., 200, 404, 500",result:"Result",allResults:"All",success:"Success",failed:"Failed",timeRange:"Time Range",allTime:"All Time",recentTime:"Recent Time",customTime:"Custom Range",recentHours:"Recent Hours",startTime:"Start Time",endTime:"End Time",sortBy:"Sort By",sortByTimestamp:"Timestamp",sortByDuration:"Duration",sortByStatus:"Status Code",sortOrder:"Order",asc:"Ascending",desc:"Descending",time:"Time",path:"Path",duration:"Duration",requestType:"Type",requestTypeFilter:"Request Type",requestType_all:"All Types",requestType_final:"Final",requestType_retry:"Retry",requestType_recovery:"Recovery",requestType_final_desc:"Request returned to client",requestType_retry_desc:"Retry attempt",requestType_recovery_desc:"Failover recovery test",upstream:"Upstream",actions:"Actions",viewDetail:"Details",export:"Export",startStream:"Start Stream",stopStream:"Stop Stream",showing:"Showing {start}-{end} of {total}",page:"Page {page} of {totalPages}",noData:"No log data available",advancedFilters:"Advanced Filters",activeFilters:"active filter(s)",clearFilters:"Clear All",detail:{title:"Request Log Details",requestId:"Request ID",timestamp:"Timestamp",method:"Method",status:"Status",duration:"Duration",success:"Success",requestInfo:"Request Information",path:"Path",originalPath:"Original Path",transformedPath:"Transformed Path",query:"Query String",routePath:"Matched Route",upstreamInfo:"Upstream Information",upstream:"Upstream",transformer:"Transformer",authInfo:"Authentication Information",authLevel:"Auth Level",authResult:"Result",authSuccess:"Authenticated",authFailed:"Failed",processingSteps:"Processing Steps",errorInfo:"Error Information",requestBody:"Request Body",responseBody:"Response Body",loadRequestBody:"Load Request Body",loadResponseBody:"Load Response Body",bodyNotRecorded:"Body not recorded for this request",bodyNotRecordedReason:"May have exceeded size limit or was empty",originalRequest:"Original Request (Before Transform)",finalRequest:"Final Request (To Upstream)",responseData:"Response Data (From Upstream)",originalHeaders:"Original Headers",finalHeaders:"Final Headers",requestHeaders:"Request Headers",responseHeaders:"Response Headers",bodyPreview:"Body Preview",bodyTooLarge:"Body too large ({size})",clickToExpand:"Click to expand",headers:"headers",noHeaders:"No headers available",noBody:"No body data",overview:"Overview",routeAndUpstream:"Route & Upstream",processingTimeline:"Processing Timeline",totalSteps:"{count} steps",totalDuration:"took {duration}",showTimeline:"Show Timeline",hideTimeline:"Hide Timeline",copyToClipboard:"Copy",downloadJson:"Download JSON",copied:"Copied!",tabOriginalRequest:"Original",tabFinalRequest:"Transformed",tabResponse:"Response",requestData:"Request Data",noDataAvailable:"No data available",step:"Step"},steps:{route_matched:"Route Matched",request_snapshot_created:"Request Snapshot Created",auth_failed:"Authentication Failed",auth_success:"Authentication Success",upstream_selected:"Upstream Selected",trying_upstream:"Trying Upstream",circuit_breaker_closed:"Circuit Breaker Closed",circuit_breaker_opened:"Circuit Breaker Opened",circuit_breaker_reopened:"Circuit Breaker Reopened",upstream_recovered:"Upstream Recovered",upstream_retry:"Upstream Retry",upstream_failed:"Upstream Failed",plugin_request_init:"Plugin Request Init",plugin_before_request:"Plugin Before Request",plugin_intercepted:"Plugin Intercepted Request",plugin_response:"Plugin Response",plugin_error:"Plugin Error"}},R={title:"Logging Configuration",bodyRecording:"Enable Request/Response Body Recording",bodyRecordingHelp:"Record request and response bodies for troubleshooting and analysis",maxSize:"Maximum Body Size",maxSizeHelp:"Bodies larger than this will be skipped (1-100 KB)",retentionDays:"Body Retention Days",retentionDaysHelp:"Bodies will be automatically deleted after this many days",days:"days",hours:"hours",cleanupConfig:"Cleanup Configuration",cleanupStatus:"Status",active:"Active",inactive:"Inactive",cleanupRetention:"Retention",cleanupInterval:"Cleanup Interval",manualCleanup:"Manual Cleanup",confirmCleanup:"Are you sure you want to manually trigger log cleanup? This will delete all logs and bodies older than the configured retention period.",cleanupSuccess:"Cleanup completed successfully",cleanupFailed:"Cleanup failed: {error}",lastCleanup:"Last Cleanup Results",deletedSqliteRecords:"Deleted SQLite records",deletedFileLogFiles:"Deleted log files",deletedBodyFiles:"Deleted body files",dirs:"directories",files:"files",duration:"Duration"},T={title:"Login",subtitle:"Enter your access token to continue",token:"Access Token",tokenPlaceholder:"Enter your access token...",submit:"Login",loggingIn:"Logging in...",success:"Login successful",failed:"Login failed: {error}",required:"Access token is required",unauthorized:"Invalid access token",logout:"Logout",logoutConfirm:"Are you sure you want to logout?"},b={common:e,nav:t,dashboard:r,monitoring:a,routes:o,configuration:s,notFound:i,routeEditor:n,routeCard:l,upstream:u,plugin:d,headers:c,body:p,expression:h,templates:m,confirmDialog:g,validation:f,auth:y,logs:v,logging:R,login:T};export{y as auth,p as body,e as common,s as configuration,g as confirmDialog,r as dashboard,b as default,h as expression,c as headers,R as logging,T as login,v as logs,a as monitoring,t as nav,i as notFound,d as plugin,l as routeCard,n as routeEditor,o as routes,m as templates,u as upstream,f as validation};\n',
21226
- "zh-CN-bARHc6B8.js": 'const e={error:"\u9519\u8BEF",loading:"\u52A0\u8F7D\u4E2D...",save:"\u4FDD\uFFFD\uFFFD",cancel:"\u53D6\u6D88",delete:"\u5220\u9664",edit:"\u7F16\u8F91",add:"\u6DFB\u52A0",confirm:"\u786E\u8BA4",reset:"\u91CD\u7F6E",search:"\u641C\u7D22",filter:"\u7B5B\u9009",export:"\u5BFC\u51FA",import:"\u5BFC\u5165",close:"\u5173\u95ED"},t={dashboard:"\u4EEA\u8868\u677F",routes:"\u8DEF\u7531\u7BA1\u7406",logs:"\u8BF7\u6C42\u65E5\u5FD7",configuration:"\u914D\u7F6E\u4E2D\u5FC3"},r={title:"\u4EEA\u8868\u677F",dataRange:"\u6570\u636E\u65F6\u95F4\u8303\u56F4",totalRequests:"\u603B\u8BF7\u6C42\u6570",requestsPerSec:"\u6BCF\u79D2\u8BF7\u6C42\u6570",requestsPerSecond:"\u6BCF\u79D2\u8BF7\u6C42\u6570",successRate:"\u6210\u529F\u7387",avgResponseTime:"\u5E73\u5747\u54CD\u5E94\u65F6\u95F4",upstreamAnalysis:"\u4E0A\u6E38\u5206\u6790",upstreamDistribution:"\u4E0A\u6E38\u8BF7\u6C42\u5206\u5E03",upstreamFailures:"\u4E0A\u6E38\u5931\u8D25\u7EDF\u8BA1",upstreamStatusCodes:"\u4E0A\u6E38\u72B6\u6001\u7801\u5206\u5E03",noUpstreamData:"\u6240\u9009\u65F6\u95F4\u8303\u56F4\u5185\u6682\u65E0\u4E0A\u6E38\u6570\u636E",noData:"\u6682\u65E0\u6570\u636E"},a={title:"\u76D1\u63A7\u56FE\u8868",range:{"1h":"1\u5C0F\u65F6","12h":"12\u5C0F\u65F6","24h":"24\u5C0F\u65F6",oneHour:"1\u5C0F\u65F6",twelveHours:"12\u5C0F\u65F6",twentyFourHours:"24\u5C0F\u65F6"},charts:{requestsTrend:"\u8BF7\u6C42\u6570\u8D8B\u52BF",periodRequests:"\u65F6\u6BB5\u8BF7\u6C42\u6570",requests:"\u8BF7\u6C42\u6570",responseTimeTrend:"\u54CD\u5E94\u65F6\u95F4\u8D8B\u52BF",avgResponseTime:"\u5E73\u5747\u54CD\u5E94\u65F6\u95F4 (ms)",milliseconds:"\u6BEB\u79D2 (ms)",successRateTrend:"\u6210\u529F\u7387\u8D8B\u52BF",successRate:"\u6210\u529F\u7387 (%)",percentage:"\u767E\u5206\u6BD4 (%)",errorsTrend:"\u9519\u8BEF\u6570\u8D8B\u52BF",periodErrors:"\u65F6\u6BB5\u9519\u8BEF\u6570",errors:"\u9519\u8BEF\u6570"},noData:"\u6682\u65E0\u5386\u53F2\u6570\u636E"},o={title:"\u8DEF\u7531\u7BA1\u7406",subtitle:"\u7BA1\u7406\u60A8\u7684\u53CD\u5411\u4EE3\u7406\u8DEF\u7531\u548C\u4E0A\u6E38\u670D\u52A1\u5668",addRoute:"\u6DFB\u52A0\u8DEF\u7531",newRoute:"+ \u65B0\u5EFA\u8DEF\u7531",createFirstRoute:"\u521B\u5EFA\u7B2C\u4E00\u4E2A\u8DEF\u7531",editRoute:"\u7F16\u8F91\u8DEF\u7531",deleteRoute:"\u5220\u9664\u8DEF\u7531",export:"\u5BFC\u51FA",import:"\u5BFC\u5165",path:"\u8DEF\u5F84",upstreams:"\u4E0A\u6E38\u670D\u52A1\u5668",actions:"\u64CD\u4F5C",searchPlaceholder:"\u641C\u7D22\u8DEF\u7531\u6216\u4E0A\u6E38\u670D\u52A1\u5668...",allTransformers:"\u6240\u6709\u8F6C\u6362\u5668",noRoutes:"\u6682\u65E0\u8DEF\u7531\u914D\u7F6E",noRoutesMessage:"\u521B\u5EFA\u60A8\u7684\u7B2C\u4E00\u4E2A\u8DEF\u7531\u4EE5\u5F00\u59CB\u4EE3\u7406\u8BF7\u6C42",noMatchingRoutes:"\u6CA1\u6709\u5339\u914D\u7684\u8DEF\u7531",noMatchingMessage:"\u8BF7\u5C1D\u8BD5\u8C03\u6574\u641C\u7D22\u6216\u7B5B\u9009\u6761\u4EF6",showingRoutes:"\u663E\u793A {count} / {total} \u4E2A\u8DEF\u7531",confirmDelete:"\u786E\u8BA4\u5220\u9664\u8DEF\u7531",confirmDeleteMessage:\'\u786E\u5B9A\u8981\u5220\u9664\u8DEF\u7531 "{path}" \u5417\uFF1F\u6B64\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500\u3002\',deleted:\'\u8DEF\u7531 "{path}" \u5DF2\u5220\u9664\',deleteFailed:"\u5220\u9664\u5931\u8D25: {error}",duplicated:\'\u8DEF\u7531 "{path}" \u5DF2\u590D\u5236\',duplicateFailed:"\u590D\u5236\u5931\u8D25: {error}",noRoutesToExport:"\u6CA1\u6709\u53EF\u5BFC\u51FA\u7684\u8DEF\u7531",exported:"\u8DEF\u7531\u5DF2\u5BFC\u51FA",importMustBeArray:"\u5BFC\u5165\u6587\u4EF6\u5FC5\u987B\u662F\u8DEF\u7531\u6570\u7EC4",importSuccess:"\u6210\u529F\u5BFC\u5165 {success} \u4E2A\u8DEF\u7531",importPartialSuccess:"\u6210\u529F\u5BFC\u5165 {success} \u4E2A\u8DEF\u7531\uFF0C\u5931\u8D25 {failed} \u4E2A",importFailed:"\u5BFC\u5165\u5931\u8D25: {error}"},s={title:"\u914D\u7F6E\u4E2D\u5FC3",subtitle:"\u7F16\u8F91\u548C\u7BA1\u7406\u7CFB\u7EDF\u914D\u7F6E",export:"\u5BFC\u51FA",import:"\u5BFC\u5165",reload:"\u91CD\u65B0\u52A0\u8F7D",restart:"\u91CD\u542F\u670D\u52A1",formEditor:"\u8868\u5355\u7F16\u8F91",jsonEditor:"JSON \u7F16\u8F91",systemSettings:"\u7CFB\u7EDF\u8BBE\u7F6E",serverPort:"\u670D\u52A1\u5668\u7AEF\u53E3",workerProcesses:"\u5DE5\u4F5C\u8FDB\u7A0B\u6570",workerProcessesHelp:"\u8981\u542F\u52A8\u7684\u5DE5\u4F5C\u8FDB\u7A0B\u6570\u91CF",logLevel:"\u65E5\u5FD7\u7EA7\u522B",bodyParserLimit:"\u8BF7\u6C42\u4F53\u5927\u5C0F\u9650\u5236",bodyParserLimitHelp:\'\u6700\u5927\u8BF7\u6C42\u4F53\u5927\u5C0F\uFF08\u4F8B\u5982\uFF1A"50mb"\u3001"100kb"\uFF09\',requiresRestart:"\u6CE8\u610F\uFF1A\u7AEF\u53E3\u3001\u5DE5\u4F5C\u8FDB\u7A0B\u6570\u3001\u65E5\u5FD7\u7EA7\u522B\u548C\u8BF7\u6C42\u4F53\u5927\u5C0F\u9650\u5236\u7684\u66F4\u6539\u9700\u8981\u91CD\u542F\u670D\u52A1\u624D\u80FD\u751F\u6548\u3002",routesConfigured:"{count} \u4E2A\u8DEF\u7531\u5DF2\u914D\u7F6E\u3002",manageRoutes:"\u4F7F\u7528\u8DEF\u7531\u9875\u9762\u7BA1\u7406\u8DEF\u7531\u3002",jsonConfiguration:"JSON \u914D\u7F6E",jsonParseError:"JSON \u89E3\u6790\u9519\u8BEF: {error}",jsonPlaceholder:"\u8F93\u5165 JSON \u914D\u7F6E...",jsonHelp:"\u7F16\u8F91\u539F\u59CB JSON \u914D\u7F6E\u3002\u4FDD\u5B58\u524D\u5C06\u9A8C\u8BC1\u66F4\u6539\u3002",unsavedChanges:"\u60A8\u6709\u672A\u4FDD\u5B58\u7684\u66F4\u6539",reset:"\u91CD\u7F6E",save:"\u4FDD\u5B58\u914D\u7F6E",confirmRestart:"\u786E\u8BA4\u91CD\u542F\u670D\u52A1",restartMessage:"\u786E\u5B9A\u8981\u91CD\u542F\u670D\u52A1\u5417\uFF1F\u8FD9\u5C06\u5BFC\u81F4\u77ED\u6682\u4E2D\u65AD\uFF08\u901A\u5E38 2-3 \u79D2\uFF09\uFF0C\u56E0\u4E3A\u670D\u52A1\u4F1A\u4F18\u96C5\u5730\u91CD\u542F\u3002",restartWarning:"\u6D3B\u52A8\u8FDE\u63A5\u53EF\u80FD\u4F1A\u6682\u65F6\u4E2D\u65AD\u3002",validationFailed:"\u914D\u7F6E\u9A8C\u8BC1\u5931\u8D25: {error}",saved:"\u914D\u7F6E\u5DF2\u4FDD\u5B58",saveFailed:"\u4FDD\u5B58\u5931\u8D25: {error}",exported:"\u914D\u7F6E\u5DF2\u5BFC\u51FA",imported:"\u914D\u7F6E\u5DF2\u5BFC\u5165",importFailed:"\u5BFC\u5165\u5931\u8D25: {error}",reloaded:"\u914D\u7F6E\u5DF2\u6210\u529F\u91CD\u65B0\u52A0\u8F7D",reloadFailed:"\u91CD\u65B0\u52A0\u8F7D\u5931\u8D25: {error}",restartSent:"\u91CD\u542F\u4FE1\u53F7\u5DF2\u53D1\u9001\uFF0C\u670D\u52A1\u5C06\u5728\u51E0\u79D2\u540E\u91CD\u542F",restartDaemonOnly:\'\u91CD\u542F\u529F\u80FD\u4EC5\u5728 daemon \u6A21\u5F0F\u4E0B\u53EF\u7528\u3002\u8BF7\u4F7F\u7528 "bungee restart" \u547D\u4EE4\u6216\u624B\u52A8\u91CD\u542F\u5F00\u53D1\u670D\u52A1\u5668\u3002\',restartFailed:"\u91CD\u542F\u5931\u8D25: {error}"},l={title:"404",message:"\u9875\u9762\u672A\u627E\u5230",goHome:"\u8FD4\u56DE\u9996\u9875"},i={newRoute:"\u65B0\u5EFA\u8DEF\u7531",editRoute:"\u7F16\u8F91\u8DEF\u7531",backToList:"\u8FD4\u56DE\u5217\u8868",routePath:"\u8DEF\u7531\u8DEF\u5F84",pathPlaceholder:"\u4F8B\u5982: /api/*",pathHelp:"\u652F\u6301\u901A\u914D\u7B26 (*) \u548C\u53C2\u6570 (:param)",pathRewrite:"\u8DEF\u5F84\u91CD\u5199",pathRewriteHelp:"\u4F7F\u7528\u6B63\u5219\u8868\u8FBE\u5F0F\u6A21\u5F0F\u4FEE\u6539\u8BF7\u6C42\u8DEF\u5F84",addPathRewriteRule:"\u6DFB\u52A0\u8DEF\u5F84\u91CD\u5199\u89C4\u5219",patternPlaceholder:"^/api",replacementPlaceholder:"/v1",upstreams:"\u4E0A\u6E38\u670D\u52A1\u5668",addUpstream:"\u6DFB\u52A0\u4E0A\u6E38",transformer:"\u8DEF\u7531\u8F6C\u6362\u5668",transformerHelp:"\u5E94\u7528\u4E8E\u6574\u4E2A\u8DEF\u7531\u7684\u8F6C\u6362\u5668\uFF08\u53EF\u9009\uFF09",optional:"\u53EF\u9009",failoverTitle:"\u6545\u969C\u8F6C\u79FB",failoverHelp:"\u914D\u7F6E\u81EA\u52A8\u6545\u969C\u8F6C\u79FB\u548C\u5065\u5EB7\u68C0\u67E5\u673A\u5236",enableFailover:"\u542F\u7528\u81EA\u52A8\u6545\u969C\u8F6C\u79FB",retryableStatusCodes:"\u53EF\u91CD\u8BD5\u7684\u72B6\u6001\u7801",retryableStatusCodesPlaceholder:"\u9ED8\u8BA4: 500, 502, 503, 504\uFF08\u670D\u52A1\u5668\u9519\u8BEF\uFF09",retryableStatusCodesHelp:"\u9047\u5230\u8FD9\u4E9B\u72B6\u6001\u7801\u65F6\u5C06\u81EA\u52A8\u91CD\u8BD5\u5176\u4ED6\u4E0A\u6E38",passiveHealthCheck:"\u88AB\u52A8\u5065\u5EB7\u68C0\u67E5",passiveHealthCheckTooltip:"\u901A\u8FC7\u76D1\u63A7\u5B9E\u9645\u8BF7\u6C42\u7684\u6210\u529F\u5931\u8D25\u6765\u5224\u65AD\u4E0A\u6E38\u5065\u5EB7\u72B6\u6001\uFF0C\u65E0\u9700\u989D\u5916\u63A2\u6D4B\u8BF7\u6C42",consecutiveFailuresThreshold:"\u8FDE\u7EED\u5931\u8D25\u9608\u503C",consecutiveFailuresThresholdHelp:"\u8FDE\u7EED\u5931\u8D25\u591A\u5C11\u6B21\u540E\u6807\u8BB0\u4E3A\u4E0D\u5065\u5EB7\uFF08\u9ED8\u8BA4\uFF1A3\uFF09",healthyThreshold:"\u5065\u5EB7\u9608\u503C",healthyThresholdHelp:"\u8FDE\u7EED\u6210\u529F\u591A\u5C11\u6B21\u540E\u6062\u590D\u4E3A\u5065\u5EB7\uFF08\u9ED8\u8BA4\uFF1A2\uFF09",requestTimeoutMs:"\u8BF7\u6C42\u8D85\u65F6\uFF08\u6BEB\u79D2\uFF09",requestTimeoutMsHelp:"\u6B63\u5E38\u8BF7\u6C42\u7684\u8D85\u65F6\u65F6\u95F4\uFF08\u9ED8\u8BA4\uFF1A30000ms\uFF09",connectTimeoutMs:"\u8FDE\u63A5\u8D85\u65F6\uFF08\u6BEB\u79D2\uFF09",connectTimeoutMsHelp:"\u5EFA\u7ACB\u8FDE\u63A5\u7684\u8D85\u65F6\u65F6\u95F4\uFF08\u9ED8\u8BA4\uFF1A5000ms\uFF09",activeHealthCheck:"\u4E3B\u52A8\u5065\u5EB7\u68C0\u67E5",activeHealthCheckTooltip:"\u5B9A\u671F\u5411\u4E0A\u6E38\u53D1\u9001\u63A2\u6D4B\u8BF7\u6C42\u6765\u4E3B\u52A8\u68C0\u6D4B\u5065\u5EB7\u72B6\u6001\uFF0C\u72EC\u7ACB\u4E8E\u4E1A\u52A1\u6D41\u91CF",enableActiveHealthCheck:"\u542F\u7528\u4E3B\u52A8\u5065\u5EB7\u68C0\u67E5",healthCheckIntervalMs:"\u68C0\u67E5\u95F4\u9694\uFF08\u6BEB\u79D2\uFF09",healthCheckIntervalMsHelp:"\u6BCF\u9694\u591A\u4E45\u6267\u884C\u4E00\u6B21\u5065\u5EB7\u68C0\u67E5\uFF08\u9ED8\u8BA4\uFF1A10000ms\uFF09",healthCheckTimeoutMs:"\u68C0\u67E5\u8D85\u65F6\uFF08\u6BEB\u79D2\uFF09",healthCheckTimeoutMsHelp:"\u5065\u5EB7\u68C0\u67E5\u8BF7\u6C42\u7684\u8D85\u65F6\u65F6\u95F4\uFF08\u9ED8\u8BA4\uFF1A3000ms\uFF09",healthCheckPath:"\u68C0\u67E5\u8DEF\u5F84",healthCheckPathHelp:"\u5065\u5EB7\u68C0\u67E5\u7684 HTTP \u8DEF\u5F84\uFF08\u9ED8\u8BA4\uFF1A/health\uFF09",healthCheckMethod:"HTTP \u65B9\u6CD5",healthCheckExpectedStatus:"\u671F\u671B\u72B6\u6001\u7801",healthCheckExpectedStatusHelp:"\u5065\u5EB7\u68C0\u67E5\u671F\u671B\u8FD4\u56DE\u7684\u72B6\u6001\u7801\uFF08\u9ED8\u8BA4\uFF1A200\uFF09",healthCheckUnhealthyThreshold:"\u4E0D\u5065\u5EB7\u9608\u503C",healthCheckUnhealthyThresholdHelp:"\u8FDE\u7EED\u5931\u8D25\u591A\u5C11\u6B21\u6807\u8BB0\u4E3A\u4E0D\u5065\u5EB7\uFF08\u9ED8\u8BA4\uFF1A3\uFF09",healthCheckHealthyThreshold:"\u5065\u5EB7\u9608\u503C",healthCheckHealthyThresholdHelp:"\u8FDE\u7EED\u6210\u529F\u591A\u5C11\u6B21\u6062\u590D\u4E3A\u5065\u5EB7\uFF08\u9ED8\u8BA4\uFF1A2\uFF09",slowStart:"\u6162\u542F\u52A8",slowStartTooltip:"\u6062\u590D\u7684\u4E0A\u6E38\u9010\u6B65\u589E\u52A0\u6D41\u91CF\uFF0C\u907F\u514D\u77AC\u95F4\u538B\u529B\u5BFC\u81F4\u518D\u6B21\u6545\u969C",enableSlowStart:"\u542F\u7528\u6162\u542F\u52A8\u673A\u5236",slowStartDurationMs:"\u6162\u542F\u52A8\u6301\u7EED\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09",slowStartDurationMsHelp:"\u4ECE\u4E0D\u5065\u5EB7\u6062\u590D\u540E\u9010\u6B65\u589E\u52A0\u6743\u91CD\u7684\u65F6\u95F4\uFF08\u9ED8\u8BA4\uFF1A30000ms\uFF09",slowStartInitialWeightFactor:"\u521D\u59CB\u6743\u91CD\u56E0\u5B50",slowStartInitialWeightFactorHelp:"\u6062\u590D\u540E\u521D\u59CB\u6743\u91CD\u7684\u6BD4\u4F8B\uFF0C0.1 \u8868\u793A 10%\uFF08\u9ED8\u8BA4\uFF1A0.1\uFF09",failoverInfoNotice:"\u6545\u969C\u8F6C\u79FB\u529F\u80FD\u53EF\u4EE5\u81EA\u52A8\u68C0\u6D4B\u4E0A\u6E38\u5065\u5EB7\u72B6\u6001\uFF0C\u5728\u6545\u969C\u65F6\u5207\u6362\u5230\u5907\u7528\u4E0A\u6E38\uFF0C\u4FDD\u8BC1\u670D\u52A1\u53EF\u7528\u6027\u3002",recoveryIntervalMs:"\u6062\u590D\u68C0\u6D4B\u95F4\u9694\uFF08\u6BEB\u79D2\uFF09",recoveryIntervalPlaceholder:"5000",recoveryIntervalHelp:"\u4E0A\u6E38\u5931\u8D25\u540E\u7B49\u5F85\u591A\u4E45\u5C1D\u8BD5\u6062\u590D",recoveryTimeoutMs:"\u6062\u590D\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09",recoveryTimeoutPlaceholder:"3000",recoveryTimeoutHelp:"\u6062\u590D\u8BF7\u6C42\u7684\u8D85\u65F6\u65F6\u95F4\uFF0C\u907F\u514D\u957F\u65F6\u95F4 pending",saveRoute:"\u4FDD\u5B58\u8DEF\u7531",cancel:"\u53D6\u6D88",saving:"\u4FDD\u5B58\u4E2D...",loadingTemplates:"\u52A0\u8F7D\u6A21\u677F\u4E2D...",useTemplate:"\u4F7F\u7528\u6A21\u677F",routeSaved:"\u8DEF\u7531\u5DF2\u4FDD\u5B58",routeUpdated:"\u8DEF\u7531\u5DF2\u66F4\u65B0",saveFailed:"\u4FDD\u5B58\u5931\u8D25: {error}",pathRequired:"\u8DEF\u7531\u8DEF\u5F84\u4E0D\u80FD\u4E3A\u7A7A",upstreamRequired:"\u81F3\u5C11\u9700\u8981\u4E00\u4E2A\u4E0A\u6E38\u670D\u52A1\u5668"},n={upstreams:"{count} \u4E2A\u4E0A\u6E38",hasTransformer:"\u5E26\u8F6C\u6362\u5668",failover:"\u6545\u969C\u8F6C\u79FB",edit:"\u7F16\u8F91",duplicate:"\u590D\u5236",delete:"\u5220\u9664",duplicating:"\u590D\u5236\u4E2D...",deleting:"\u5220\u9664\u4E2D..."},d={title:"\u4E0A\u6E38\u670D\u52A1\u5668 #{index}",targetUrl:"\u76EE\u6807\u5730\u5740",targetPlaceholder:"https://api.example.com",targetHelp:"\u4E0A\u6E38\u670D\u52A1\u5668\u7684\u5B8C\u6574 URL",weight:"\u6743\u91CD",weightHelp:"\u8D1F\u8F7D\u5747\u8861\u6743\u91CD\uFF081-100\uFF09",transformer:"\u4E0A\u6E38\u8F6C\u6362\u5668",transformerHelp:"\u4EC5\u5E94\u7528\u4E8E\u6B64\u4E0A\u6E38\u7684\u8F6C\u6362\u5668\uFF08\u53EF\u9009\uFF09",remove:"\u79FB\u9664\u4E0A\u6E38",targetRequired:"\u76EE\u6807\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A",invalidUrl:"\u65E0\u6548\u7684 URL \u683C\u5F0F"},u={selectPlugin:"\u9009\u62E9\u63D2\u4EF6",none:"\u65E0\u63D2\u4EF6",description:"\u63D2\u4EF6\u8BF4\u660E",testPlugin:"\u6D4B\u8BD5\u63D2\u4EF6",testing:"\u6D4B\u8BD5\u4E2D...",input:"\u8F93\u5165\uFF08\u539F\u59CB\u683C\u5F0F\uFF09",output:"\u8F93\u51FA\uFF08\u8F6C\u6362\u540E\u683C\u5F0F\uFF09",inputPlaceholder:"\u8F93\u5165\u6D4B\u8BD5\u6570\u636E...",testSuccess:"\u8F6C\u6362\u6210\u529F",testFailed:"\u8F6C\u6362\u5931\u8D25: {error}"},c={title:"\u8BF7\u6C42\u5934",addHeader:"\u6DFB\u52A0\u8BF7\u6C42\u5934",name:"\u540D\u79F0",namePlaceholder:"Content-Type",value:"\u503C",valuePlaceholder:"application/json",remove:"\u79FB\u9664",empty:"\u6682\u65E0\u8BF7\u6C42\u5934",default:"\u9ED8\u8BA4\u8BF7\u6C42\u5934"},p={title:"\u8BF7\u6C42\u4F53",bodyType:"\u8BF7\u6C42\u4F53\u7C7B\u578B",json:"JSON",text:"\u7EAF\u6587\u672C",form:"\u8868\u5355\u6570\u636E",none:"\u65E0\u8BF7\u6C42\u4F53",placeholder:"\u8F93\u5165\u8BF7\u6C42\u4F53\u5185\u5BB9...",jsonInvalid:"\u65E0\u6548\u7684 JSON \u683C\u5F0F",replace:"\u66FF\u6362",default:"\u9ED8\u8BA4\u503C"},h={title:"\u6761\u4EF6\u8868\u8FBE\u5F0F",placeholder:"request.headers[\'User-Agent\'].includes(\'Mobile\')",help:"\u4F7F\u7528 JavaScript \u8868\u8FBE\u5F0F\uFF0C\u8FD4\u56DE true \u6216 false",examples:"\u793A\u4F8B",example1:"\u68C0\u67E5\u8BF7\u6C42\u5934",example2:"\u68C0\u67E5\u67E5\u8BE2\u53C2\u6570",example3:"\u68C0\u67E5\u8BF7\u6C42\u65B9\u6CD5",test:"\u6D4B\u8BD5\u8868\u8FBE\u5F0F",testResult:"\u6D4B\u8BD5\u7ED3\u679C",resultTrue:"\u6761\u4EF6\u4E3A\u771F",resultFalse:"\u6761\u4EF6\u4E3A\u5047",resultError:"\u8868\u8FBE\u5F0F\u9519\u8BEF: {error}"},m={title:"\u8DEF\u7531\u6A21\u677F",subtitle:"\u5FEB\u901F\u521B\u5EFA\u5E38\u7528\u8DEF\u7531\u914D\u7F6E",useTemplate:"\u4F7F\u7528\u6B64\u6A21\u677F",categories:{api:"API \u4EE3\u7406",static:"\u9759\u6001\u8D44\u6E90",websocket:"WebSocket",auth:"\u8BA4\u8BC1\u4EE3\u7406"},restApi:{name:"REST API \u4EE3\u7406",description:"\u6807\u51C6\u7684 RESTful API \u4EE3\u7406\u914D\u7F6E"},graphql:{name:"GraphQL API",description:"GraphQL \u7AEF\u70B9\u4EE3\u7406"},static:{name:"\u9759\u6001\u6587\u4EF6\u670D\u52A1",description:"\u4EE3\u7406\u9759\u6001\u8D44\u6E90\u6587\u4EF6"},websocket:{name:"WebSocket \u4EE3\u7406",description:"\u5B9E\u65F6\u901A\u4FE1 WebSocket \u4EE3\u7406"},loadBalancing:{name:"\u8D1F\u8F7D\u5747\u8861",description:"\u591A\u4E0A\u6E38\u8D1F\u8F7D\u5747\u8861\u914D\u7F6E"}},g={title:"\u786E\u8BA4\u64CD\u4F5C",confirm:"\u786E\u8BA4",cancel:"\u53D6\u6D88"},y={targetRequired:"\u76EE\u6807\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A",targetProtocol:"\u76EE\u6807\u5730\u5740\u5FC5\u987B\u4F7F\u7528 http \u6216 https \u534F\u8BAE",invalidUrl:"\u65E0\u6548\u7684 URL \u683C\u5F0F",weightPositive:"\u6743\u91CD\u5FC5\u987B\u662F\u6B63\u6570",priorityNonNegative:"\u4F18\u5148\u7EA7\u5FC5\u987B\u662F\u975E\u8D1F\u6570",totalWeightPositive:"\u603B\u6743\u91CD\u5FC5\u987B\u5927\u4E8E 0",unknownTransformer:"\u672A\u77E5\u7684\u8F6C\u6362\u5668: {transformer}\u3002\u53EF\u7528\u9009\u9879: {options}",pathRequired:"\u8DEF\u5F84\u4E0D\u80FD\u4E3A\u7A7A",pathStartSlash:"\u8DEF\u5F84\u5FC5\u987B\u4EE5 / \u5F00\u5934",upstreamRequired:"\u81F3\u5C11\u9700\u8981\u4E00\u4E2A\u4E0A\u6E38\u670D\u52A1\u5668",invalidRegex:"\u65E0\u6548\u7684\u6B63\u5219\u8868\u8FBE\u5F0F: {pattern}",invalidStatusCode:"\u65E0\u6548\u7684\u72B6\u6001\u7801: {code}",recoveryIntervalPositive:"\u6062\u590D\u95F4\u9694\u5FC5\u987B\u5927\u4E8E 0",recoveryTimeoutPositive:"\u6062\u590D\u8D85\u65F6\u65F6\u95F4\u5FC5\u987B\u5927\u4E8E 0",expressionEmpty:"\u8868\u8FBE\u5F0F\u4E0D\u80FD\u4E3A\u7A7A",mismatchedBraces:"{{ }} \u62EC\u53F7\u4E0D\u5339\u914D",mismatchedParentheses:"\u62EC\u53F7\u4E0D\u5339\u914D",mismatchedQuotes:"\u5F15\u53F7\u4E0D\u5339\u914D"},v={globalAuth:"\u5168\u5C40\u8BA4\u8BC1",routeAuth:"\u8DEF\u7531\u8BA4\u8BC1",helpText:"\u4FDD\u62A4\u60A8\u7684 API \u7AEF\u70B9",enableAuth:"\u542F\u7528\u8BA4\u8BC1",enabled:"\u5DF2\u542F\u7528",disabled:"\u5DF2\u7981\u7528",tokens:"\u4EE4\u724C\u5217\u8868",tokenPlaceholder:"\u8F93\u5165 token \u6216\u4F7F\u7528 {{ env.TOKEN_NAME }}",addToken:"\u6DFB\u52A0\u4EE4\u724C",expressionSupport:"\u652F\u6301\u8868\u8FBE\u5F0F\u8BED\u6CD5\u6765\u5F15\u7528\u73AF\u5883\u53D8\u91CF\uFF1A",securityNotice:"\u542F\u7528\u8BA4\u8BC1\u540E\uFF0CAuthorization header \u4F1A\u81EA\u52A8\u79FB\u9664\uFF0C\u4E0D\u4F1A\u8F6C\u53D1\u7ED9\u4E0A\u6E38\u670D\u52A1\u5668\uFF08\u5B89\u5168\u63AA\u65BD\uFF09\u3002",routeAuthHelp:"\u8DEF\u7531\u7EA7\u8BA4\u8BC1\u5C06\u8986\u76D6\u5168\u5C40\u8BA4\u8BC1\u914D\u7F6E\u3002\u5982\u679C\u672A\u914D\u7F6E\uFF0C\u5219\u4F7F\u7528\u5168\u5C40\u8BA4\u8BC1\u8BBE\u7F6E\u3002"},T={title:"\u8BF7\u6C42\u65E5\u5FD7",filters:"\u7B5B\u9009\u5668",searchTerm:"\u641C\u7D22",searchPlaceholder:"\u641C\u7D22\u8DEF\u5F84\u6216\u9519\u8BEF\u4FE1\u606F...",method:"HTTP \u65B9\u6CD5",allMethods:"\u6240\u6709\u65B9\u6CD5",status:"\u72B6\u6001\u7801",statusPlaceholder:"\u4F8B\u5982\uFF1A200\u3001404\u3001500",result:"\u7ED3\u679C",allResults:"\u5168\u90E8",success:"\u6210\u529F",failed:"\u5931\u8D25",timeRange:"\u65F6\u95F4\u8303\u56F4",allTime:"\u5168\u90E8\u65F6\u95F4",recentTime:"\u6700\u8FD1\u65F6\u95F4",customTime:"\u81EA\u5B9A\u4E49\u8303\u56F4",recentHours:"\u6700\u8FD1\u5C0F\u65F6\u6570",startTime:"\u5F00\u59CB\u65F6\u95F4",endTime:"\u7ED3\u675F\u65F6\u95F4",sortBy:"\u6392\u5E8F\u65B9\u5F0F",sortByTimestamp:"\u65F6\u95F4\u6233",sortByDuration:"\u6301\u7EED\u65F6\u95F4",sortByStatus:"\u72B6\u6001\u7801",sortOrder:"\u6392\u5E8F",asc:"\u5347\u5E8F",desc:"\u964D\u5E8F",time:"\u65F6\u95F4",path:"\u8DEF\u5F84",duration:"\u6301\u7EED\u65F6\u95F4",requestType:"\u7C7B\u578B",requestTypeFilter:"\u8BF7\u6C42\u7C7B\u578B",requestType_all:"\u5168\u90E8\u7C7B\u578B",requestType_final:"\u6700\u7EC8\u8BF7\u6C42",requestType_retry:"\u91CD\u8BD5\u8BF7\u6C42",requestType_recovery:"\u6062\u590D\u6D4B\u8BD5",requestType_final_desc:"\u8FD4\u56DE\u5BA2\u6237\u7AEF\u7684\u8BF7\u6C42",requestType_retry_desc:"\u91CD\u8BD5\u5C1D\u8BD5",requestType_recovery_desc:"\u6545\u969C\u6062\u590D\u6D4B\u8BD5",upstream:"\u4E0A\u6E38",actions:"\u64CD\u4F5C",viewDetail:"\u8BE6\u60C5",export:"\u5BFC\u51FA",startStream:"\u542F\u52A8\u6D41",stopStream:"\u505C\u6B62\u6D41",showing:"\u663E\u793A {start}-{end}\uFF0C\u5171 {total} \u6761",page:"\u7B2C {page} \u9875\uFF0C\u5171 {totalPages} \u9875",noData:"\u6682\u65E0\u65E5\u5FD7\u6570\u636E",advancedFilters:"\u9AD8\u7EA7\u7B5B\u9009",activeFilters:"\u4E2A\u7B5B\u9009\u6761\u4EF6",clearFilters:"\u6E05\u9664\u5168\u90E8",detail:{title:"\u8BF7\u6C42\u65E5\u5FD7\u8BE6\u60C5",requestId:"\u8BF7\u6C42 ID",timestamp:"\u65F6\u95F4\u6233",method:"\u65B9\u6CD5",status:"\u72B6\u6001",duration:"\u6301\u7EED\u65F6\u95F4",success:"\u6210\u529F",requestInfo:"\u8BF7\u6C42\u4FE1\u606F",path:"\u8DEF\u5F84",originalPath:"\u539F\u59CB\u8DEF\u5F84",transformedPath:"\u8F6C\u6362\u540E",query:"\u67E5\u8BE2\u5B57\u7B26\u4E32",routePath:"\u5339\u914D\u8DEF\u7531",upstreamInfo:"\u4E0A\u6E38\u4FE1\u606F",upstream:"\u4E0A\u6E38",transformer:"\u8F6C\u6362\u5668",authInfo:"\u8BA4\u8BC1\u4FE1\u606F",authLevel:"\u8BA4\u8BC1\u7EA7\u522B",authResult:"\u7ED3\u679C",authSuccess:"\u5DF2\u8BA4\u8BC1",authFailed:"\u5931\u8D25",processingSteps:"\u5904\u7406\u6B65\u9AA4",errorInfo:"\u9519\u8BEF\u4FE1\u606F",requestBody:"\u8BF7\u6C42\u4F53",responseBody:"\u54CD\u5E94\u4F53",loadRequestBody:"\u52A0\u8F7D\u8BF7\u6C42\u4F53",loadResponseBody:"\u52A0\u8F7D\u54CD\u5E94\u4F53",bodyNotRecorded:"\u6B64\u8BF7\u6C42\u672A\u8BB0\u5F55 Body",bodyNotRecordedReason:"\u53EF\u80FD\u8D85\u8FC7\u5927\u5C0F\u9650\u5236\u6216\u4E3A\u7A7A",originalRequest:"\u539F\u59CB\u8BF7\u6C42\uFF08\u8F6C\u6362\u524D\uFF09",finalRequest:"\u6700\u7EC8\u8BF7\u6C42\uFF08\u53D1\u9001\u7ED9\u4E0A\u6E38\uFF09",responseData:"\u54CD\u5E94\u6570\u636E\uFF08\u4E0A\u6E38\u8FD4\u56DE\uFF09",originalHeaders:"\u539F\u59CB\u8BF7\u6C42\u5934",finalHeaders:"\u6700\u7EC8\u8BF7\u6C42\u5934",requestHeaders:"\u8BF7\u6C42\u5934",responseHeaders:"\u54CD\u5E94\u5934",bodyPreview:"Body \u9884\u89C8",bodyTooLarge:"Body \u8FC7\u5927 ({size})",clickToExpand:"\u70B9\u51FB\u5C55\u5F00",headers:"\u4E2A\u8BF7\u6C42\u5934",noHeaders:"\u6682\u65E0\u8BF7\u6C42\u5934",noBody:"\u6682\u65E0 Body \u6570\u636E",overview:"\u6982\u89C8",routeAndUpstream:"\u8DEF\u7531\u4E0E\u4E0A\u6E38",processingTimeline:"\u5904\u7406\u65F6\u95F4\u7EBF",totalSteps:"\u5171 {count} \u6B65",totalDuration:"\u603B\u8017\u65F6 {duration}",showTimeline:"\u663E\u793A\u65F6\u95F4\u7EBF",hideTimeline:"\u9690\u85CF\u65F6\u95F4\u7EBF",copyToClipboard:"\u590D\u5236",downloadJson:"\u4E0B\u8F7D JSON",copied:"\u5DF2\u590D\u5236\uFF01",tabOriginalRequest:"\u539F\u59CB\u8BF7\u6C42",tabFinalRequest:"\u8F6C\u6362\u540E",tabResponse:"\u54CD\u5E94\u6570\u636E",requestData:"\u8BF7\u6C42\u6570\u636E",noDataAvailable:"\u6682\u65E0\u6570\u636E",step:"\u6B65\u9AA4"},steps:{route_matched:"\u8DEF\u7531\u5339\u914D",request_snapshot_created:"\u8BF7\u6C42\u5FEB\u7167\u521B\u5EFA",auth_failed:"\u8BA4\u8BC1\u5931\u8D25",auth_success:"\u8BA4\u8BC1\u6210\u529F",upstream_selected:"\u4E0A\u6E38\u9009\u62E9",trying_upstream:"\u5C1D\u8BD5\u4E0A\u6E38",circuit_breaker_closed:"\u65AD\u8DEF\u5668\u5173\u95ED",circuit_breaker_opened:"\u65AD\u8DEF\u5668\u6253\u5F00",circuit_breaker_reopened:"\u65AD\u8DEF\u5668\u91CD\u65B0\u6253\u5F00",upstream_recovered:"\u4E0A\u6E38\u6062\u590D",upstream_retry:"\u4E0A\u6E38\u91CD\u8BD5",upstream_failed:"\u4E0A\u6E38\u5931\u8D25",plugin_request_init:"\u63D2\u4EF6\u8BF7\u6C42\u521D\u59CB\u5316",plugin_before_request:"\u63D2\u4EF6\u8BF7\u6C42\u524D\u5904\u7406",plugin_intercepted:"\u63D2\u4EF6\u62E6\u622A\u8BF7\u6C42",plugin_response:"\u63D2\u4EF6\u54CD\u5E94\u5904\u7406",plugin_error:"\u63D2\u4EF6\u9519\u8BEF\u5904\u7406"}},R={title:"\u65E5\u5FD7\u914D\u7F6E",bodyRecording:"\u542F\u7528\u8BF7\u6C42/\u54CD\u5E94\u4F53\u8BB0\u5F55",bodyRecordingHelp:"\u8BB0\u5F55\u8BF7\u6C42\u548C\u54CD\u5E94\u4F53\u7528\u4E8E\u95EE\u9898\u6392\u67E5\u548C\u5206\u6790",maxSize:"\u6700\u5927 Body \u5927\u5C0F",maxSizeHelp:"\u8D85\u8FC7\u6B64\u5927\u5C0F\u7684 Body \u5C06\u88AB\u8DF3\u8FC7\uFF081-100 KB\uFF09",retentionDays:"Body \u4FDD\u7559\u5929\u6570",retentionDaysHelp:"Body \u5C06\u5728\u8FD9\u4E9B\u5929\u6570\u540E\u81EA\u52A8\u5220\u9664",days:"\u5929",hours:"\u5C0F\u65F6",cleanupConfig:"\u6E05\u7406\u914D\u7F6E",cleanupStatus:"\u72B6\u6001",active:"\u6D3B\u8DC3",inactive:"\u672A\u6D3B\u8DC3",cleanupRetention:"\u4FDD\u7559\u65F6\u957F",cleanupInterval:"\u6E05\u7406\u95F4\u9694",manualCleanup:"\u624B\u52A8\u6E05\u7406",confirmCleanup:"\u786E\u5B9A\u8981\u624B\u52A8\u89E6\u53D1\u65E5\u5FD7\u6E05\u7406\u5417\uFF1F\u8FD9\u5C06\u5220\u9664\u6240\u6709\u8D85\u8FC7\u914D\u7F6E\u4FDD\u7559\u671F\u9650\u7684\u65E5\u5FD7\u548C Body\u3002",cleanupSuccess:"\u6E05\u7406\u6210\u529F\u5B8C\u6210",cleanupFailed:"\u6E05\u7406\u5931\u8D25: {error}",lastCleanup:"\u4E0A\u6B21\u6E05\u7406\u7ED3\u679C",deletedSqliteRecords:"\u5DF2\u5220\u9664 SQLite \u8BB0\u5F55",deletedFileLogFiles:"\u5DF2\u5220\u9664\u65E5\u5FD7\u6587\u4EF6",deletedBodyFiles:"\u5DF2\u5220\u9664 Body \u6587\u4EF6",dirs:"\u76EE\u5F55",files:"\u6587\u4EF6",duration:"\u8017\u65F6"},f={title:"\u767B\u5F55",subtitle:"\u8F93\u5165\u8BBF\u95EE\u4EE4\u724C\u4EE5\u7EE7\u7EED",token:"\u8BBF\u95EE\u4EE4\u724C",tokenPlaceholder:"\u8BF7\u8F93\u5165\u8BBF\u95EE\u4EE4\u724C...",submit:"\u767B\u5F55",loggingIn:"\u767B\u5F55\u4E2D...",success:"\u767B\u5F55\u6210\u529F",failed:"\u767B\u5F55\u5931\u8D25\uFF1A{error}",required:"\u8BBF\u95EE\u4EE4\u724C\u4E0D\u80FD\u4E3A\u7A7A",unauthorized:"\u8BBF\u95EE\u4EE4\u724C\u65E0\u6548",logout:"\u9000\u51FA\u767B\u5F55",logoutConfirm:"\u786E\u5B9A\u8981\u9000\u51FA\u767B\u5F55\u5417\uFF1F"},S={common:e,nav:t,dashboard:r,monitoring:a,routes:o,configuration:s,notFound:l,routeEditor:i,routeCard:n,upstream:d,plugin:u,headers:c,body:p,expression:h,templates:m,confirmDialog:g,validation:y,auth:v,logs:T,logging:R,login:f};export{v as auth,p as body,e as common,s as configuration,g as confirmDialog,r as dashboard,S as default,h as expression,c as headers,R as logging,f as login,T as logs,a as monitoring,t as nav,l as notFound,u as plugin,n as routeCard,i as routeEditor,o as routes,m as templates,d as upstream,y as validation};\n'
21275
+ "vendor-lodash-CRdCilnf.js": 'var Ir=typeof global=="object"&&global&&global.Object===Object&&global,Qr=typeof self=="object"&&self&&self.Object===Object&&self,T=Ir||Qr||Function("return this")(),y=T.Symbol,Gr=Object.prototype,Vr=Gr.hasOwnProperty,kr=Gr.toString,j=y?y.toStringTag:void 0;function rn(r){var n=Vr.call(r,j),t=r[j];try{r[j]=void 0;var e=!0}catch{}var i=kr.call(r);return e&&(n?r[j]=t:delete r[j]),i}var nn=Object.prototype,tn=nn.toString;function en(r){return tn.call(r)}var an="[object Null]",un="[object Undefined]",pr=y?y.toStringTag:void 0;function M(r){return r==null?r===void 0?un:an:pr&&pr in Object(r)?rn(r):en(r)}function C(r){return r!=null&&typeof r=="object"}var on="[object Symbol]";function L(r){return typeof r=="symbol"||C(r)&&M(r)==on}function B(r,n){for(var t=-1,e=r==null?0:r.length,i=Array(e);++t<e;)i[t]=n(r[t],t,r);return i}var _=Array.isArray,gr=y?y.prototype:void 0,dr=gr?gr.toString:void 0;function zr(r){if(typeof r=="string")return r;if(_(r))return B(r,zr)+"";if(L(r))return dr?dr.call(r):"";var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}function U(r){var n=typeof r;return r!=null&&(n=="object"||n=="function")}function H(r){return r}var fn="[object AsyncFunction]",sn="[object Function]",cn="[object GeneratorFunction]",ln="[object Proxy]";function Br(r){if(!U(r))return!1;var n=M(r);return n==sn||n==cn||n==fn||n==ln}var W=T["__core-js_shared__"],hr=(function(){var r=/[^.]+$/.exec(W&&W.keys&&W.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function pn(r){return!!hr&&hr in r}var gn=Function.prototype,dn=gn.toString;function E(r){if(r!=null){try{return dn.call(r)}catch{}try{return r+""}catch{}}return""}var hn=/[\\\\^$.*+?()[\\]{}|]/g,_n=/^\\[object .+?Constructor\\]$/,yn=Function.prototype,vn=Object.prototype,bn=yn.toString,Tn=vn.hasOwnProperty,An=RegExp("^"+bn.call(Tn).replace(hn,"\\\\$&").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,"$1.*?")+"$");function wn(r){if(!U(r)||pn(r))return!1;var n=Br(r)?An:_n;return n.test(E(r))}function On(r,n){return r?.[n]}function x(r,n){var t=On(r,n);return wn(t)?t:void 0}var Q=x(T,"WeakMap");function Pn(r,n,t){switch(t.length){case 0:return r.call(n);case 1:return r.call(n,t[0]);case 2:return r.call(n,t[0],t[1]);case 3:return r.call(n,t[0],t[1],t[2])}return r.apply(n,t)}var $n=800,mn=16,Sn=Date.now;function En(r){var n=0,t=0;return function(){var e=Sn(),i=mn-(e-t);if(t=e,i>0){if(++n>=$n)return arguments[0]}else n=0;return r.apply(void 0,arguments)}}function xn(r){return function(){return r}}var _r=(function(){try{var r=x(Object,"defineProperty");return r({},"",{}),r}catch{}})(),Cn=_r?function(r,n){return _r(r,"toString",{configurable:!0,enumerable:!1,value:xn(n),writable:!0})}:H,Mn=En(Cn),jn=9007199254740991,Rn=/^(?:0|[1-9]\\d*)$/;function tr(r,n){var t=typeof r;return n=n??jn,!!n&&(t=="number"||t!="symbol"&&Rn.test(r))&&r>-1&&r%1==0&&r<n}function er(r,n){return r===n||r!==r&&n!==n}var yr=Math.max;function Ln(r,n,t){return n=yr(n===void 0?r.length-1:n,0),function(){for(var e=arguments,i=-1,a=yr(e.length-n,0),u=Array(a);++i<a;)u[i]=e[n+i];i=-1;for(var o=Array(n+1);++i<n;)o[i]=e[i];return o[n]=t(u),Pn(r,this,o)}}function Fn(r,n){return Mn(Ln(r,n,H),r+"")}var Dn=9007199254740991;function ar(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=Dn}function K(r){return r!=null&&ar(r.length)&&!Br(r)}function vr(r,n,t){if(!U(t))return!1;var e=typeof n;return(e=="number"?K(t)&&tr(n,t.length):e=="string"&&n in t)?er(t[n],r):!1}var In=Object.prototype;function Gn(r){var n=r&&r.constructor,t=typeof n=="function"&&n.prototype||In;return r===t}function zn(r,n){for(var t=-1,e=Array(r);++t<r;)e[t]=n(t);return e}var Bn="[object Arguments]";function br(r){return C(r)&&M(r)==Bn}var Nr=Object.prototype,Nn=Nr.hasOwnProperty,Un=Nr.propertyIsEnumerable,ir=br((function(){return arguments})())?br:function(r){return C(r)&&Nn.call(r,"callee")&&!Un.call(r,"callee")};function Hn(){return!1}var Ur=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Tr=Ur&&typeof module=="object"&&module&&!module.nodeType&&module,Kn=Tr&&Tr.exports===Ur,Ar=Kn?T.Buffer:void 0,Xn=Ar?Ar.isBuffer:void 0,V=Xn||Hn,qn="[object Arguments]",Zn="[object Array]",Wn="[object Boolean]",Jn="[object Date]",Yn="[object Error]",Qn="[object Function]",Vn="[object Map]",kn="[object Number]",rt="[object Object]",nt="[object RegExp]",tt="[object Set]",et="[object String]",at="[object WeakMap]",it="[object ArrayBuffer]",ut="[object DataView]",ot="[object Float32Array]",ft="[object Float64Array]",st="[object Int8Array]",ct="[object Int16Array]",lt="[object Int32Array]",pt="[object Uint8Array]",gt="[object Uint8ClampedArray]",dt="[object Uint16Array]",ht="[object Uint32Array]",c={};c[ot]=c[ft]=c[st]=c[ct]=c[lt]=c[pt]=c[gt]=c[dt]=c[ht]=!0;c[qn]=c[Zn]=c[it]=c[Wn]=c[ut]=c[Jn]=c[Yn]=c[Qn]=c[Vn]=c[kn]=c[rt]=c[nt]=c[tt]=c[et]=c[at]=!1;function _t(r){return C(r)&&ar(r.length)&&!!c[M(r)]}function Hr(r){return function(n){return r(n)}}var Kr=typeof exports=="object"&&exports&&!exports.nodeType&&exports,R=Kr&&typeof module=="object"&&module&&!module.nodeType&&module,yt=R&&R.exports===Kr,J=yt&&Ir.process,wr=(function(){try{var r=R&&R.require&&R.require("util").types;return r||J&&J.binding&&J.binding("util")}catch{}})(),Or=wr&&wr.isTypedArray,Xr=Or?Hr(Or):_t,vt=Object.prototype,bt=vt.hasOwnProperty;function Tt(r,n){var t=_(r),e=!t&&ir(r),i=!t&&!e&&V(r),a=!t&&!e&&!i&&Xr(r),u=t||e||i||a,o=u?zn(r.length,String):[],f=o.length;for(var s in r)bt.call(r,s)&&!(u&&(s=="length"||i&&(s=="offset"||s=="parent")||a&&(s=="buffer"||s=="byteLength"||s=="byteOffset")||tr(s,f)))&&o.push(s);return o}function At(r,n){return function(t){return r(n(t))}}var wt=At(Object.keys,Object),Ot=Object.prototype,Pt=Ot.hasOwnProperty;function $t(r){if(!Gn(r))return wt(r);var n=[];for(var t in Object(r))Pt.call(r,t)&&t!="constructor"&&n.push(t);return n}function ur(r){return K(r)?Tt(r):$t(r)}var mt=/\\.|\\[(?:[^[\\]]*|(["\'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,St=/^\\w*$/;function or(r,n){if(_(r))return!1;var t=typeof r;return t=="number"||t=="symbol"||t=="boolean"||r==null||L(r)?!0:St.test(r)||!mt.test(r)||n!=null&&r in Object(n)}var F=x(Object,"create");function Et(){this.__data__=F?F(null):{},this.size=0}function xt(r){var n=this.has(r)&&delete this.__data__[r];return this.size-=n?1:0,n}var Ct="__lodash_hash_undefined__",Mt=Object.prototype,jt=Mt.hasOwnProperty;function Rt(r){var n=this.__data__;if(F){var t=n[r];return t===Ct?void 0:t}return jt.call(n,r)?n[r]:void 0}var Lt=Object.prototype,Ft=Lt.hasOwnProperty;function Dt(r){var n=this.__data__;return F?n[r]!==void 0:Ft.call(n,r)}var It="__lodash_hash_undefined__";function Gt(r,n){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=F&&n===void 0?It:n,this}function S(r){var n=-1,t=r==null?0:r.length;for(this.clear();++n<t;){var e=r[n];this.set(e[0],e[1])}}S.prototype.clear=Et;S.prototype.delete=xt;S.prototype.get=Rt;S.prototype.has=Dt;S.prototype.set=Gt;function zt(){this.__data__=[],this.size=0}function X(r,n){for(var t=r.length;t--;)if(er(r[t][0],n))return t;return-1}var Bt=Array.prototype,Nt=Bt.splice;function Ut(r){var n=this.__data__,t=X(n,r);if(t<0)return!1;var e=n.length-1;return t==e?n.pop():Nt.call(n,t,1),--this.size,!0}function Ht(r){var n=this.__data__,t=X(n,r);return t<0?void 0:n[t][1]}function Kt(r){return X(this.__data__,r)>-1}function Xt(r,n){var t=this.__data__,e=X(t,r);return e<0?(++this.size,t.push([r,n])):t[e][1]=n,this}function A(r){var n=-1,t=r==null?0:r.length;for(this.clear();++n<t;){var e=r[n];this.set(e[0],e[1])}}A.prototype.clear=zt;A.prototype.delete=Ut;A.prototype.get=Ht;A.prototype.has=Kt;A.prototype.set=Xt;var D=x(T,"Map");function qt(){this.size=0,this.__data__={hash:new S,map:new(D||A),string:new S}}function Zt(r){var n=typeof r;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?r!=="__proto__":r===null}function q(r,n){var t=r.__data__;return Zt(n)?t[typeof n=="string"?"string":"hash"]:t.map}function Wt(r){var n=q(this,r).delete(r);return this.size-=n?1:0,n}function Jt(r){return q(this,r).get(r)}function Yt(r){return q(this,r).has(r)}function Qt(r,n){var t=q(this,r),e=t.size;return t.set(r,n),this.size+=t.size==e?0:1,this}function w(r){var n=-1,t=r==null?0:r.length;for(this.clear();++n<t;){var e=r[n];this.set(e[0],e[1])}}w.prototype.clear=qt;w.prototype.delete=Wt;w.prototype.get=Jt;w.prototype.has=Yt;w.prototype.set=Qt;var Vt="Expected a function";function fr(r,n){if(typeof r!="function"||n!=null&&typeof n!="function")throw new TypeError(Vt);var t=function(){var e=arguments,i=n?n.apply(this,e):e[0],a=t.cache;if(a.has(i))return a.get(i);var u=r.apply(this,e);return t.cache=a.set(i,u)||a,u};return t.cache=new(fr.Cache||w),t}fr.Cache=w;var kt=500;function re(r){var n=fr(r,function(e){return t.size===kt&&t.clear(),e}),t=n.cache;return n}var ne=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["\'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,te=/\\\\(\\\\)?/g,ee=re(function(r){var n=[];return r.charCodeAt(0)===46&&n.push(""),r.replace(ne,function(t,e,i,a){n.push(i?a.replace(te,"$1"):e||t)}),n});function ae(r){return r==null?"":zr(r)}function qr(r,n){return _(r)?r:or(r,n)?[r]:ee(ae(r))}function Z(r){if(typeof r=="string"||L(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}function sr(r,n){n=qr(n,r);for(var t=0,e=n.length;r!=null&&t<e;)r=r[Z(n[t++])];return t&&t==e?r:void 0}function ie(r,n,t){var e=r==null?void 0:sr(r,n);return e===void 0?t:e}function Zr(r,n){for(var t=-1,e=n.length,i=r.length;++t<e;)r[i+t]=n[t];return r}var Pr=y?y.isConcatSpreadable:void 0;function ue(r){return _(r)||ir(r)||!!(Pr&&r&&r[Pr])}function oe(r,n,t,e,i){var a=-1,u=r.length;for(t||(t=ue),i||(i=[]);++a<u;){var o=r[a];t(o)?Zr(i,o):i[i.length]=o}return i}function fe(){this.__data__=new A,this.size=0}function se(r){var n=this.__data__,t=n.delete(r);return this.size=n.size,t}function ce(r){return this.__data__.get(r)}function le(r){return this.__data__.has(r)}var pe=200;function ge(r,n){var t=this.__data__;if(t instanceof A){var e=t.__data__;if(!D||e.length<pe-1)return e.push([r,n]),this.size=++t.size,this;t=this.__data__=new w(e)}return t.set(r,n),this.size=t.size,this}function b(r){var n=this.__data__=new A(r);this.size=n.size}b.prototype.clear=fe;b.prototype.delete=se;b.prototype.get=ce;b.prototype.has=le;b.prototype.set=ge;function de(r,n){for(var t=-1,e=r==null?0:r.length,i=0,a=[];++t<e;){var u=r[t];n(u,t,r)&&(a[i++]=u)}return a}function he(){return[]}var _e=Object.prototype,ye=_e.propertyIsEnumerable,$r=Object.getOwnPropertySymbols,ve=$r?function(r){return r==null?[]:(r=Object(r),de($r(r),function(n){return ye.call(r,n)}))}:he;function be(r,n,t){var e=n(r);return _(r)?e:Zr(e,t(r))}function mr(r){return be(r,ur,ve)}var k=x(T,"DataView"),rr=x(T,"Promise"),nr=x(T,"Set"),Sr="[object Map]",Te="[object Object]",Er="[object Promise]",xr="[object Set]",Cr="[object WeakMap]",Mr="[object DataView]",Ae=E(k),we=E(D),Oe=E(rr),Pe=E(nr),$e=E(Q),P=M;(k&&P(new k(new ArrayBuffer(1)))!=Mr||D&&P(new D)!=Sr||rr&&P(rr.resolve())!=Er||nr&&P(new nr)!=xr||Q&&P(new Q)!=Cr)&&(P=function(r){var n=M(r),t=n==Te?r.constructor:void 0,e=t?E(t):"";if(e)switch(e){case Ae:return Mr;case we:return Sr;case Oe:return Er;case Pe:return xr;case $e:return Cr}return n});var jr=T.Uint8Array,me="__lodash_hash_undefined__";function Se(r){return this.__data__.set(r,me),this}function Ee(r){return this.__data__.has(r)}function N(r){var n=-1,t=r==null?0:r.length;for(this.__data__=new w;++n<t;)this.add(r[n])}N.prototype.add=N.prototype.push=Se;N.prototype.has=Ee;function xe(r,n){for(var t=-1,e=r==null?0:r.length;++t<e;)if(n(r[t],t,r))return!0;return!1}function Ce(r,n){return r.has(n)}var Me=1,je=2;function Wr(r,n,t,e,i,a){var u=t&Me,o=r.length,f=n.length;if(o!=f&&!(u&&f>o))return!1;var s=a.get(r),g=a.get(n);if(s&&g)return s==n&&g==r;var p=-1,l=!0,v=t&je?new N:void 0;for(a.set(r,n),a.set(n,r);++p<o;){var d=r[p],h=n[p];if(e)var O=u?e(h,d,p,n,r,a):e(d,h,p,r,n,a);if(O!==void 0){if(O)continue;l=!1;break}if(v){if(!xe(n,function($,m){if(!Ce(v,m)&&(d===$||i(d,$,t,e,a)))return v.push(m)})){l=!1;break}}else if(!(d===h||i(d,h,t,e,a))){l=!1;break}}return a.delete(r),a.delete(n),l}function Re(r){var n=-1,t=Array(r.size);return r.forEach(function(e,i){t[++n]=[i,e]}),t}function Le(r){var n=-1,t=Array(r.size);return r.forEach(function(e){t[++n]=e}),t}var Fe=1,De=2,Ie="[object Boolean]",Ge="[object Date]",ze="[object Error]",Be="[object Map]",Ne="[object Number]",Ue="[object RegExp]",He="[object Set]",Ke="[object String]",Xe="[object Symbol]",qe="[object ArrayBuffer]",Ze="[object DataView]",Rr=y?y.prototype:void 0,Y=Rr?Rr.valueOf:void 0;function We(r,n,t,e,i,a,u){switch(t){case Ze:if(r.byteLength!=n.byteLength||r.byteOffset!=n.byteOffset)return!1;r=r.buffer,n=n.buffer;case qe:return!(r.byteLength!=n.byteLength||!a(new jr(r),new jr(n)));case Ie:case Ge:case Ne:return er(+r,+n);case ze:return r.name==n.name&&r.message==n.message;case Ue:case Ke:return r==n+"";case Be:var o=Re;case He:var f=e&Fe;if(o||(o=Le),r.size!=n.size&&!f)return!1;var s=u.get(r);if(s)return s==n;e|=De,u.set(r,n);var g=Wr(o(r),o(n),e,i,a,u);return u.delete(r),g;case Xe:if(Y)return Y.call(r)==Y.call(n)}return!1}var Je=1,Ye=Object.prototype,Qe=Ye.hasOwnProperty;function Ve(r,n,t,e,i,a){var u=t&Je,o=mr(r),f=o.length,s=mr(n),g=s.length;if(f!=g&&!u)return!1;for(var p=f;p--;){var l=o[p];if(!(u?l in n:Qe.call(n,l)))return!1}var v=a.get(r),d=a.get(n);if(v&&d)return v==n&&d==r;var h=!0;a.set(r,n),a.set(n,r);for(var O=u;++p<f;){l=o[p];var $=r[l],m=n[l];if(e)var lr=u?e(m,$,l,n,r,a):e($,m,l,r,n,a);if(!(lr===void 0?$===m||i($,m,t,e,a):lr)){h=!1;break}O||(O=l=="constructor")}if(h&&!O){var I=r.constructor,G=n.constructor;I!=G&&"constructor"in r&&"constructor"in n&&!(typeof I=="function"&&I instanceof I&&typeof G=="function"&&G instanceof G)&&(h=!1)}return a.delete(r),a.delete(n),h}var ke=1,Lr="[object Arguments]",Fr="[object Array]",z="[object Object]",ra=Object.prototype,Dr=ra.hasOwnProperty;function na(r,n,t,e,i,a){var u=_(r),o=_(n),f=u?Fr:P(r),s=o?Fr:P(n);f=f==Lr?z:f,s=s==Lr?z:s;var g=f==z,p=s==z,l=f==s;if(l&&V(r)){if(!V(n))return!1;u=!0,g=!1}if(l&&!g)return a||(a=new b),u||Xr(r)?Wr(r,n,t,e,i,a):We(r,n,f,t,e,i,a);if(!(t&ke)){var v=g&&Dr.call(r,"__wrapped__"),d=p&&Dr.call(n,"__wrapped__");if(v||d){var h=v?r.value():r,O=d?n.value():n;return a||(a=new b),i(h,O,t,e,a)}}return l?(a||(a=new b),Ve(r,n,t,e,i,a)):!1}function cr(r,n,t,e,i){return r===n?!0:r==null||n==null||!C(r)&&!C(n)?r!==r&&n!==n:na(r,n,t,e,cr,i)}var ta=1,ea=2;function aa(r,n,t,e){var i=t.length,a=i;if(r==null)return!a;for(r=Object(r);i--;){var u=t[i];if(u[2]?u[1]!==r[u[0]]:!(u[0]in r))return!1}for(;++i<a;){u=t[i];var o=u[0],f=r[o],s=u[1];if(u[2]){if(f===void 0&&!(o in r))return!1}else{var g=new b,p;if(!(p===void 0?cr(s,f,ta|ea,e,g):p))return!1}}return!0}function Jr(r){return r===r&&!U(r)}function ia(r){for(var n=ur(r),t=n.length;t--;){var e=n[t],i=r[e];n[t]=[e,i,Jr(i)]}return n}function Yr(r,n){return function(t){return t==null?!1:t[r]===n&&(n!==void 0||r in Object(t))}}function ua(r){var n=ia(r);return n.length==1&&n[0][2]?Yr(n[0][0],n[0][1]):function(t){return t===r||aa(t,r,n)}}function oa(r,n){return r!=null&&n in Object(r)}function fa(r,n,t){n=qr(n,r);for(var e=-1,i=n.length,a=!1;++e<i;){var u=Z(n[e]);if(!(a=r!=null&&t(r,u)))break;r=r[u]}return a||++e!=i?a:(i=r==null?0:r.length,!!i&&ar(i)&&tr(u,i)&&(_(r)||ir(r)))}function sa(r,n){return r!=null&&fa(r,n,oa)}var ca=1,la=2;function pa(r,n){return or(r)&&Jr(n)?Yr(Z(r),n):function(t){var e=ie(t,r);return e===void 0&&e===n?sa(t,r):cr(n,e,ca|la)}}function ga(r){return function(n){return n?.[r]}}function da(r){return function(n){return sr(n,r)}}function ha(r){return or(r)?ga(Z(r)):da(r)}function _a(r){return typeof r=="function"?r:r==null?H:typeof r=="object"?_(r)?pa(r[0],r[1]):ua(r):ha(r)}function ya(r){return function(n,t,e){for(var i=-1,a=Object(n),u=e(n),o=u.length;o--;){var f=u[++i];if(t(a[f],f,a)===!1)break}return n}}var va=ya();function ba(r,n){return r&&va(r,n,ur)}function Ta(r,n){return function(t,e){if(t==null)return t;if(!K(t))return r(t,e);for(var i=t.length,a=-1,u=Object(t);++a<i&&e(u[a],a,u)!==!1;);return t}}var Aa=Ta(ba);function wa(r,n){var t=-1,e=K(r)?Array(r.length):[];return Aa(r,function(i,a,u){e[++t]=n(i,a,u)}),e}function Oa(r,n){var t=r.length;for(r.sort(n);t--;)r[t]=r[t].value;return r}function Pa(r,n){if(r!==n){var t=r!==void 0,e=r===null,i=r===r,a=L(r),u=n!==void 0,o=n===null,f=n===n,s=L(n);if(!o&&!s&&!a&&r>n||a&&u&&f&&!o&&!s||e&&u&&f||!t&&f||!i)return 1;if(!e&&!a&&!s&&r<n||s&&t&&i&&!e&&!a||o&&t&&i||!u&&i||!f)return-1}return 0}function $a(r,n,t){for(var e=-1,i=r.criteria,a=n.criteria,u=i.length,o=t.length;++e<u;){var f=Pa(i[e],a[e]);if(f){if(e>=o)return f;var s=t[e];return f*(s=="desc"?-1:1)}}return r.index-n.index}function ma(r,n,t){n.length?n=B(n,function(a){return _(a)?function(u){return sr(u,a.length===1?a[0]:a)}:a}):n=[H];var e=-1;n=B(n,Hr(_a));var i=wa(r,function(a,u,o){var f=B(n,function(s){return s(a)});return{criteria:f,index:++e,value:a}});return Oa(i,function(a,u){return $a(a,u,t)})}var Sa=Fn(function(r,n){if(r==null)return[];var t=n.length;return t>1&&vr(r,n[0],n[1])?n=[]:t>2&&vr(n[0],n[1],n[2])&&(n=[n[0]]),ma(r,oe(n),[])});export{Sa as s};\n'
21227
21276
  }
21228
21277
  };
21229
21278
  });
@@ -21339,7 +21388,8 @@ class ConfigHandler {
21339
21388
  static sanitizeModificationRules(obj) {
21340
21389
  return {
21341
21390
  ...obj.headers && { headers: obj.headers },
21342
- ...obj.body && { body: obj.body }
21391
+ ...obj.body && { body: obj.body },
21392
+ ...obj.query && { query: obj.query }
21343
21393
  };
21344
21394
  }
21345
21395
  static sanitizeAuth(auth) {
@@ -22196,6 +22246,36 @@ class LogQueryService {
22196
22246
  failureRate: row.failure_rate || 0
22197
22247
  }));
22198
22248
  }
22249
+ async getUnifiedUpstreamStats(startTime, endTime, type = "all", limit = 10) {
22250
+ const successFilter = type === "success" ? "AND success = 1" : type === "failure" ? "AND success = 0" : "";
22251
+ const query = `
22252
+ SELECT
22253
+ upstream,
22254
+ COUNT(*) as count,
22255
+ ROUND(COUNT(*) * 100.0 / (SELECT COUNT(*) FROM access_logs WHERE timestamp >= ? AND timestamp <= ? AND upstream IS NOT NULL ${successFilter}), 2) as percentage,
22256
+ (SELECT COUNT(*) FROM access_logs al WHERE al.upstream = access_logs.upstream AND al.timestamp >= ? AND al.timestamp <= ?) as total_requests,
22257
+ SUM(CASE WHEN success = 1 THEN 1 ELSE 0 END) as success_requests,
22258
+ SUM(CASE WHEN success = 0 THEN 1 ELSE 0 END) as failed_requests,
22259
+ ROUND(SUM(CASE WHEN success = 0 THEN 1 ELSE 0 END) * 100.0 / (SELECT COUNT(*) FROM access_logs al WHERE al.upstream = access_logs.upstream AND al.timestamp >= ? AND al.timestamp <= ?), 2) as failure_rate
22260
+ FROM access_logs
22261
+ WHERE timestamp >= ? AND timestamp <= ?
22262
+ AND upstream IS NOT NULL
22263
+ ${successFilter}
22264
+ GROUP BY upstream
22265
+ ORDER BY count DESC
22266
+ LIMIT ?
22267
+ `;
22268
+ const rows = this.db.prepare(query).all(startTime, endTime, startTime, endTime, startTime, endTime, startTime, endTime, limit);
22269
+ return rows.map((row) => ({
22270
+ upstream: row.upstream,
22271
+ count: row.count,
22272
+ percentage: row.percentage || 0,
22273
+ totalRequests: row.total_requests,
22274
+ successRequests: row.success_requests,
22275
+ failedRequests: row.failed_requests,
22276
+ failureRate: row.failure_rate || 0
22277
+ }));
22278
+ }
22199
22279
  async getUpstreamStatusCodeStats(startTime, endTime, limit = 10) {
22200
22280
  const query = `
22201
22281
  SELECT
@@ -22372,6 +22452,25 @@ class StatsHandler {
22372
22452
  });
22373
22453
  }
22374
22454
  }
22455
+ static async getUnifiedUpstreamStats(req) {
22456
+ const url = new URL(req.url);
22457
+ const range = url.searchParams.get("range") || "1h";
22458
+ const type = url.searchParams.get("type") || "all";
22459
+ try {
22460
+ const endTime = Date.now();
22461
+ const startTime = StatsHandler.getStartTimeForRange(range, endTime);
22462
+ const data = await logQueryService.getUnifiedUpstreamStats(startTime, endTime, type);
22463
+ return new Response(JSON.stringify({ data, type }), {
22464
+ headers: { "Content-Type": "application/json" }
22465
+ });
22466
+ } catch (error) {
22467
+ console.error("Failed to get unified upstream stats:", error);
22468
+ return new Response(JSON.stringify({ error: "Failed to get unified upstream stats" }), {
22469
+ status: 500,
22470
+ headers: { "Content-Type": "application/json" }
22471
+ });
22472
+ }
22473
+ }
22375
22474
  static async getUpstreamStatusCodes(req) {
22376
22475
  const url = new URL(req.url);
22377
22476
  const range = url.searchParams.get("range") || "1h";
@@ -23042,6 +23141,9 @@ async function handleAPIRequest(req, path12) {
23042
23141
  if (path12 === "/api/stats/history/v2" && method === "GET") {
23043
23142
  return await StatsHandler.getHistoryV2(req);
23044
23143
  }
23144
+ if (path12 === "/api/stats/upstream-stats" && method === "GET") {
23145
+ return await StatsHandler.getUnifiedUpstreamStats(req);
23146
+ }
23045
23147
  if (path12 === "/api/stats/upstream-distribution" && method === "GET") {
23046
23148
  return await StatsHandler.getUpstreamDistribution(req);
23047
23149
  }