var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};$jscomp.arrayIterator=function(a){return{next:$jscomp.arrayIteratorImpl(a)}};$jscomp.makeIterator=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):$jscomp.arrayIterator(a)};$jscomp.owns=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};$jscomp.ASSUME_ES5=!1;
$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,d){a!=Array.prototype&&a!=Object.prototype&&(a[b]=d.value)};$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.polyfill=function(a,b,d,c){if(b){d=$jscomp.global;a=a.split(".");for(c=0;c<a.length-1;c++){var e=a[c];e in d||(d[e]={});d=d[e]}a=a[a.length-1];c=d[a];b=b(c);b!=c&&null!=b&&$jscomp.defineProperty(d,a,{configurable:!0,writable:!0,value:b})}};$jscomp.polyfill("Object.entries",function(a){return a?a:function(b){var a=[],c;for(c in b)$jscomp.owns(b,c)&&a.push([c,b[c]]);return a}},"es8","es3");
$jscomp.checkStringArgs=function(a,b,d){if(null==a)throw new TypeError("The 'this' value for String.prototype."+d+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+d+" must not be a regular expression");return a+""};
$jscomp.polyfill("String.prototype.repeat",function(a){return a?a:function(a){var b=$jscomp.checkStringArgs(this,null,"repeat");if(0>a||1342177279<a)throw new RangeError("Invalid count value");a|=0;for(var c="";a;)if(a&1&&(c+=b),a>>>=1)b+=b;return c}},"es6","es3");$jscomp.SYMBOL_PREFIX="jscomp_symbol_";$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};
$jscomp.SymbolClass=function(a,b){this.$jscomp$symbol$id_=a;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:b})};$jscomp.SymbolClass.prototype.toString=function(){return this.$jscomp$symbol$id_};$jscomp.Symbol=function(){function a(d){if(this instanceof a)throw new TypeError("Symbol is not a constructor");return new $jscomp.SymbolClass($jscomp.SYMBOL_PREFIX+(d||"")+"_"+b++,d)}var b=0;return a}();
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var a=$jscomp.global.Symbol.iterator;a||(a=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("Symbol.iterator"));"function"!=typeof Array.prototype[a]&&$jscomp.defineProperty(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}});$jscomp.initSymbolIterator=function(){}};
$jscomp.initSymbolAsyncIterator=function(){$jscomp.initSymbol();var a=$jscomp.global.Symbol.asyncIterator;a||(a=$jscomp.global.Symbol.asyncIterator=$jscomp.global.Symbol("Symbol.asyncIterator"));$jscomp.initSymbolAsyncIterator=function(){}};$jscomp.iteratorPrototype=function(a){$jscomp.initSymbolIterator();a={next:a};a[$jscomp.global.Symbol.iterator]=function(){return this};return a};
$jscomp.iteratorFromArray=function(a,b){$jscomp.initSymbolIterator();a instanceof String&&(a+="");var d=0,c={next:function(){if(d<a.length){var e=d++;return{value:b(e,a[e]),done:!1}}c.next=function(){return{done:!0,value:void 0}};return c.next()}};c[Symbol.iterator]=function(){return c};return c};$jscomp.polyfill("Array.prototype.keys",function(a){return a?a:function(){return $jscomp.iteratorFromArray(this,function(a){return a})}},"es6","es3");
(function(){var a={checkpoints:{},setCheckpoint:function(a){this.checkpoints[a]=performance.now();window.debugPerformance&&window.debugPerformance("Checkpoint set: "+a);return this.checkpoints[a]},timeBetween:function(a,d){if(!this.checkpoints[a])return window.debugError&&window.debugError('Start checkpoint "'+a+'" not found'),null;if(!this.checkpoints[d])return window.debugError&&window.debugError('End checkpoint "'+d+'" not found'),null;var b=this.checkpoints[d]-this.checkpoints[a];window.debugPerformance&&
window.debugPerformance('Time between "'+a+'" and "'+d+'": '+b.toFixed(2)+"ms");return b},timeFrom:function(a){if(!this.checkpoints[a])return window.debugError&&window.debugError('Checkpoint "'+a+'" not found'),null;var b=performance.now()-this.checkpoints[a];window.debugPerformance&&window.debugPerformance('Time from "'+a+'" to now: '+b.toFixed(2)+"ms");return b},clearCheckpoints:function(){this.checkpoints={};window.debugPerformance&&window.debugPerformance("All checkpoints cleared")},getCheckpoints:function(){return this.checkpoints},
showCheckpoints:function(){var a=Object.entries(this.checkpoints);0===a.length?window.debugPerformance&&window.debugPerformance("No checkpoints set"):window.debugPerformance&&(window.debugPerformance("Checkpoint times (relative to page load):"),a.sort(function(a,b){return a[1]-b[1]}).forEach(function(a){var b=$jscomp.makeIterator(a);a=b.next().value;b=b.next().value;window.debugPerformance(a+": "+b.toFixed(2)+"ms")}))},analyzeCheckpoints:function(){var a=Object.entries(this.checkpoints);if(2>a.length)window.debugPerformance&&
window.debugPerformance("Need at least 2 checkpoints to analyze time distribution");else{a=a.sort(function(a,b){return a[1]-b[1]});var d=a[0],c=a[a.length-1],e=c[1]-d[1];window.debugPerformance&&(window.debugPerformance("--- Performance Analysis ---"),window.debugPerformance('Total time from "'+d[0]+'" to "'+c[0]+'": '+e.toFixed(2)+"ms"),window.debugPerformance("----------------------------------"));d=[];for(c=0;c<a.length-1;c++){var f=a[c],l=a[c+1],m=l[1]-f[1],g=m/e*100;d.push({start:f[0],end:l[0],
duration:m,percentage:g});window.debugPerformance&&window.debugPerformance(f[0]+" \u2192 "+l[0]+": "+m.toFixed(2)+"ms ("+g.toFixed(1)+"%)")}window.debugPerformance&&(window.debugPerformance("----------------------------------"),d.forEach(function(a){var b=a.start+"\u2192"+a.end;b=20<b.length?b.substring(0,17)+"...":" ".repeat(20-b.length)+b;window.debugPerformance("\u2588".repeat(Math.max(1,Math.round(a.percentage/100*15)))+" "+a.percentage.toFixed(1)+"% | "+b)}),window.debugPerformance("----------------------------------"));
return{totalTime:e,segments:d}}}};window.setCheckpoint=function(b){return a.setCheckpoint(b)};window.timeBetween=function(b,d){return a.timeBetween(b,d)};window.timeFrom=function(b){return a.timeFrom(b)};window.clearCheckpoints=function(){return a.clearCheckpoints()};window.showCheckpoints=function(){return a.showCheckpoints()};window.analyzeCheckpoints=function(){return a.analyzeCheckpoints()}})();
(function(){function a(a,b){var c=b.nextElementSibling;c&&c.classList.contains("debug-expanded-json")?c.remove():(c=document.createElement("pre"),c.className="debug-expanded-json",c.textContent=JSON.stringify(a,null,2),c.style.margin="0",c.style.padding="6px 10px",c.style.borderTop="1px dashed #444",c.style.color="#ccc",c.style.whiteSpace="pre-wrap",b.parentNode.insertBefore(c,b.nextSibling))}function b(b,d,e,f){var k=(new Date).toISOString().slice(11,19),h=document.createElement("div");h.className=
"debug-log-entry";h.style.borderBottom="1px dashed #444";h.style.padding="2px 0";var n=document.createElement("span");n.style.color="#888";n.textContent=f?"":"["+k+"] "+b+": ";h.appendChild(n);Array.isArray(d)?(b=document.createElement("span"),b.textContent="Array("+d.length+") ["+d.slice(0,5).join(", ")+(5<d.length?", ...":"")+"]",b.style.cursor="pointer",b.style.textDecoration="underline",b.style.color=e,b.onclick=function(){return a(d,h)},h.appendChild(b)):"object"===typeof d&&null!==d?(b=Object.keys(d),
f=b.slice(0,3).map(function(a){return a+": "+JSON.stringify(d[a])}).join(", ").slice(0,30),k=document.createElement("span"),k.textContent="Object { "+f+(3<b.length?", ...":"")+" }",k.style.cursor="pointer",k.style.textDecoration="underline",k.style.color=e,k.onclick=function(){return a(d,h)},h.appendChild(k)):(b=document.createElement("span"),b.textContent=String(d),b.style.color=e,h.appendChild(b));c.appendChild(h);g||(c.scrollTop=c.scrollHeight)}if(!document.getElementById("debug-log-panel")){var d=
document.createElement("div");d.style.cssText="position: fixed; top: 0; left: 0; right: 0; z-index: 99999;";document.body.appendChild(d);var c=document.createElement("div");c.id="debug-log-panel";c.style.cssText="\n    width: 100%;\n    height: 20vh;\n    background: rgba(0, 0, 0, 0.85);\n    color: #0f0;\n    font-family: monospace;\n    font-size: 12px;\n    overflow-y: auto;\n    padding: 6px 10px 26px;\n    box-sizing: border-box;\n  ";d.appendChild(c);var e=document.createElement("div");e.style.cssText=
"\n    position: fixed;\n    top: 20vh;\n    left: 0;\n    width: 100%;\n    background: rgba(0, 0, 0, 0.85);\n    padding: 4px 10px;\n    display: flex;\n    justify-content: flex-end;\n    gap: 6px;\n    z-index: 100000;\n    font-family: monospace;\n  ";document.body.appendChild(e);var f=document.createElement("button");f.textContent="\u23f6";var l=document.createElement("button");l.textContent="\ud83e\uddf9 Clear";var m=document.createElement("button");m.textContent="\u274c Close";[f,l,m].forEach(function(a){a.style.cssText=
"\n      background: #333;\n      border: 1px solid #888;\n      color: #eee;\n      font-size: 10px;\n      padding: 2px 6px;\n      cursor: pointer;\n    ";e.appendChild(a)});var g=!0;f.onclick=function(){g=!g;c.style.height=g?"20vh":"66vh";e.style.top=g?"20vh":"66vh";f.textContent=g?"\u23f7":"\u23f6";g||(c.scrollTop=c.scrollHeight)};l.onclick=function(){c.querySelectorAll(".debug-log-entry, .debug-expanded-json").forEach(function(a){return a.remove()})};m.onclick=function(){console._patchedForDebugPanel&&
(console.log=console._origLog||console.log,console.error=console._origErr||console.error,delete console._patchedForDebugPanel);delete window.debugLog;delete window.debugError;delete window.debugPerformance;delete window.setCheckpoint;delete window.timeBetween;delete window.timeFrom;delete window.clearCheckpoints;delete window.showCheckpoints;delete window.analyzeCheckpoints;d.remove();e.remove()};window.debugLog=function(a){return b("log",a,"#0f0",!1)};window.debugError=function(a){return b("error",
a,"#f55",!1)};window.debugPerformance=function(a){return b("perf",a,"#0cf",!0)};console._patchedForDebugPanel||(console._origLog=console.log,console._origErr=console.error,console.log=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c-0]=arguments[c];console._origLog.apply(console,b);b.forEach(function(a){return debugLog(a)})},console.error=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c-0]=arguments[c];console._origErr.apply(console,b);b.forEach(function(a){return debugError(a)})},console._patchedForDebugPanel=
!0);debugLog("\ud83d\udd0d Debug panel initialized");debugPerformance("\u23f1\ufe0f Performance tracking initialized - Use setCheckpoint(), timeBetween(), timeFrom(), and analyzeCheckpoints() to track performance")}})();
