diff --git a/src/web/ui-dist/assets/index-CuJgR-s6.css b/src/web/ui-dist/assets/index-CuJgR-s6.css deleted file mode 100644 index 7d048c4..0000000 --- a/src/web/ui-dist/assets/index-CuJgR-s6.css +++ /dev/null @@ -1 +0,0 @@ -*{box-sizing:border-box;margin:0;padding:0}body{color:#f0ede6;background:#0a0a0c} diff --git a/src/web/ui-dist/assets/index-CxlwZhqE.js b/src/web/ui-dist/assets/index-CxlwZhqE.js deleted file mode 100644 index 15dfeb1..0000000 --- a/src/web/ui-dist/assets/index-CxlwZhqE.js +++ /dev/null @@ -1,184 +0,0 @@ -var e=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports);(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let 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 n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var t=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var ee=Array.isArray;function S(){}var C={H:null,A:null,T:null,S:null},te=Object.prototype.hasOwnProperty;function w(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function T(e,t){return w(e.type,t,e.props)}function E(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function D(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ne=/\/+/g;function re(e,t){return typeof e==`object`&&e&&e.key!=null?D(``+e.key):t.toString(36)}function ie(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(S,S):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ae(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ae(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+re(e,0):a,ee(o)?(i=``,c!=null&&(i=c.replace(ne,`$&/`)+`/`),ae(o,r,i,``,function(e){return e})):o!=null&&(E(o)&&(o=T(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ne,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(ee(e))for(var u=0;u{n.exports=t()})),r=e((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,ee||(ee=!0,E());else{var t=n(l);t!==null&&re(x,t.startTime-e)}}var ee=!1,S=-1,C=5,te=-1;function w(){return g?!0:!(e.unstable_now()-tet&&w());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&re(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?E():ee=!1}}}var E;if(typeof y==`function`)E=function(){y(T)};else if(typeof MessageChannel<`u`){var D=new MessageChannel,ne=D.port2;D.port1.onmessage=T,E=function(){ne.postMessage(null)}}else E=function(){_(T,0)};function re(t,n){S=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(S),S=-1):h=!0,re(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,ee||(ee=!0,E()))),r},e.unstable_shouldYield=w,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),i=e(((e,t)=>{t.exports=r()})),a=e((e=>{var t=n();function r(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=a()})),s=e((e=>{var t=i(),r=n(),a=o();function s(e){var t=`https://react.dev/errors/`+e;if(1ue||(e.current=le[ue],le[ue]=null,ue--)}function j(e,t){ue++,le[ue]=e.current,e.current=t}var fe=de(null),pe=de(null),me=de(null),he=de(null);function ge(e,t){switch(j(me,t),j(pe,e),j(fe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}A(fe),j(fe,e)}function _e(){A(fe),A(pe),A(me)}function ve(e){e.memoizedState!==null&&j(he,e);var t=fe.current,n=Hd(t,e.type);t!==n&&(j(pe,e),j(fe,n))}function ye(e){pe.current===e&&(A(fe),A(pe)),he.current===e&&(A(he),Qf._currentValue=ce)}var be,xe;function Se(e){if(be===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);be=t&&t[1]||``,xe=-1)`:-1i||c[r]!==l[i]){var u=` -`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Ce=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Se(n):``}function Te(e,t){switch(e.tag){case 26:case 27:case 5:return Se(e.type);case 16:return Se(`Lazy`);case 13:return e.child!==t&&t!==null?Se(`Suspense Fallback`):Se(`Suspense`);case 19:return Se(`SuspenseList`);case 0:case 15:return we(e.type,!1);case 11:return we(e.type.render,!1);case 1:return we(e.type,!0);case 31:return Se(`Activity`);default:return``}}function Ee(e){try{var t=``,n=null;do t+=Te(e,n),n=e,e=e.return;while(e);return t}catch(e){return` -Error generating stack: `+e.message+` -`+e.stack}}var De=Object.prototype.hasOwnProperty,Oe=t.unstable_scheduleCallback,ke=t.unstable_cancelCallback,Ae=t.unstable_shouldYield,je=t.unstable_requestPaint,Me=t.unstable_now,Ne=t.unstable_getCurrentPriorityLevel,Pe=t.unstable_ImmediatePriority,Fe=t.unstable_UserBlockingPriority,Ie=t.unstable_NormalPriority,Le=t.unstable_LowPriority,Re=t.unstable_IdlePriority,ze=t.log,Be=t.unstable_setDisableYieldValue,Ve=null,He=null;function Ue(e){if(typeof ze==`function`&&Be(e),He&&typeof He.setStrictMode==`function`)try{He.setStrictMode(Ve,e)}catch{}}var We=Math.clz32?Math.clz32:qe,Ge=Math.log,Ke=Math.LN2;function qe(e){return e>>>=0,e===0?32:31-(Ge(e)/Ke|0)|0}var Je=256,Ye=262144,Xe=4194304;function Ze(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Qe(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ze(n))):i=Ze(o):i=Ze(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ze(n))):i=Ze(o)):i=Ze(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function $e(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function et(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function tt(){var e=Xe;return Xe<<=1,!(Xe&62914560)&&(Xe=4194304),e}function nt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function rt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function it(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),_n=!1;if(gn)try{var vn={};Object.defineProperty(vn,"passive",{get:function(){_n=!0}}),window.addEventListener(`test`,vn,vn),window.removeEventListener(`test`,vn,vn)}catch{_n=!1}var yn=null,bn=null,xn=null;function Sn(){if(xn)return xn;var e,t=bn,n=t.length,r,i=`value`in yn?yn.value:yn.textContent,a=i.length;for(e=0;e=er),rr=` `,ir=!1;function ar(e,t){switch(e){case`keyup`:return Qn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function or(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var sr=!1;function cr(e,t){switch(e){case`compositionend`:return or(t);case`keypress`:return t.which===32?(ir=!0,rr):null;case`textInput`:return e=t.data,e===rr&&ir?null:e;default:return null}}function lr(e,t){if(sr)return e===`compositionend`||!$n&&ar(e,t)?(e=Sn(),xn=bn=yn=null,sr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=jr(n)}}function Nr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Nr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Pr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ut(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ut(e.document)}return t}function Fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Ir=gn&&`documentMode`in document&&11>=document.documentMode,Lr=null,Rr=null,zr=null,Br=!1;function Vr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Br||Lr==null||Lr!==Ut(r)||(r=Lr,`selectionStart`in r&&Fr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),zr&&Ar(zr,r)||(zr=r,r=Ed(Rr,`onSelect`),0>=o,i-=o,Ni=1<<32-We(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),o=a(_,o,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),N&&Fi(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),o=a(y,o,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),N&&Fi(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(o=a(v,o,g),d===null?u=v:d.sibling=v,d=v);return N&&Fi(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),o=a(v,o,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),N&&Fi(i,g),u}function b(e,r,a,c){if(typeof a==`object`&&a&&a.type===y&&a.key===null&&(a=a.props.children),typeof a==`object`&&a){switch(a.$$typeof){case _:a:{for(var l=a.key;r!==null;){if(r.key===l){if(l=a.type,l===y){if(r.tag===7){n(e,r.sibling),c=i(r,a.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===E&&Na(l)===r.type){n(e,r.sibling),c=i(r,a.props),Ba(c,a),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}a.type===y?(c=bi(a.props.children,e.mode,c,a.key),c.return=e,e=c):(c=yi(a.type,a.key,a.props,null,e.mode,c),Ba(c,a),c.return=e,e=c)}return o(e);case v:a:{for(l=a.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),c=i(r,a.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=Ci(a,e.mode,c),c.return=e,e=c}return o(e);case E:return a=Na(a),b(e,r,a,c)}if(se(a))return h(e,r,a,c);if(ie(a)){if(l=ie(a),typeof l!=`function`)throw Error(s(150));return a=l.call(a),g(e,r,a,c)}if(typeof a.then==`function`)return b(e,r,za(a),c);if(a.$$typeof===S)return b(e,r,ca(e,a),c);Va(e,a)}return typeof a==`string`&&a!==``||typeof a==`number`||typeof a==`bigint`?(a=``+a,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,a),c.return=e,e=c):(n(e,r),c=xi(a,e.mode,c),c.return=e,e=c),o(e)):n(e,r)}return function(e,t,n,r){try{Ra=0;var i=b(e,t,n,r);return La=null,i}catch(t){if(t===Da||t===ka)throw t;var a=hi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ua=Ha(!0),Wa=Ha(!1),Ga=!1;function Ka(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ja(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ya(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,G&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=fi(e),di(e,null,n),t}return ci(e,r,t,n),fi(e)}function Xa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ot(e,n)}}function Za(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Qa=!1;function $a(){if(Qa){var e=va;if(e!==null)throw e}}function eo(e,t,n,r){Qa=!1;var i=e.updateQueue;Ga=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(J&f)===f:(r&f)===f){f!==0&&f===_a&&(Qa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Ga=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Gl|=o,e.lanes=o,e.memoizedState=d}}function to(e,t){if(typeof e!=`function`)throw Error(s(191,e));e.call(t)}function no(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=O.T,s={};O.T=s,Ls(e,!1,t,n);try{var c=i(),l=O.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Is(e,t,xa(c,r),pu(e)):Is(e,t,r,pu(e))}catch(n){Is(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{k.p=a,o!==null&&s.types!==null&&(o.types=s.types),O.T=o}}function Es(){}function Ds(e,t,n,r){if(e.tag!==5)throw Error(s(476));var i=Os(e).queue;Ts(e,i,t,ce,n===null?Es:function(){return ks(e),n(r)})}function Os(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ro,lastRenderedState:ce},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ro,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ks(e){var t=Os(e);t.next===null&&(t=e.alternate.memoizedState),Is(e,t.next.queue,{},pu())}function As(){return sa(Qf)}function js(){return B().memoizedState}function Ms(){return B().memoizedState}function Ns(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Ja(n);var r=Ya(t,e,n);r!==null&&(hu(r,t,n),Xa(r,t,n)),t={cache:pa()},e.payload=t;return}t=t.return}}function Ps(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Rs(e)?zs(t,n):(n=li(e,t,n,r),n!==null&&(hu(n,e,r),Bs(n,t,r)))}function Fs(e,t,n){Is(e,t,n,pu())}function Is(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Rs(e))zs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,kr(s,o))return ci(e,t,i,0),K===null&&si(),!1}catch{}if(n=li(e,t,i,r),n!==null)return hu(n,e,r),Bs(n,t,r),!0}return!1}function Ls(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Rs(e)){if(t)throw Error(s(479))}else t=li(e,n,r,2),t!==null&&hu(t,e,2)}function Rs(e){var t=e.alternate;return e===I||t!==null&&t===I}function zs(e,t){yo=vo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Bs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ot(e,n)}}var Vs={readContext:sa,use:Io,useCallback:z,useContext:z,useEffect:z,useImperativeHandle:z,useLayoutEffect:z,useInsertionEffect:z,useMemo:z,useReducer:z,useRef:z,useState:z,useDebugValue:z,useDeferredValue:z,useTransition:z,useSyncExternalStore:z,useId:z,useHostTransitionStatus:z,useFormState:z,useActionState:z,useOptimistic:z,useMemoCache:z,useCacheRefresh:z};Vs.useEffectEvent=z;var Hs={readContext:sa,use:Io,useCallback:function(e,t){return No().memoizedState=[e,t===void 0?null:t],e},useContext:sa,useEffect:fs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),us(4194308,4,vs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return us(4194308,4,e,t)},useInsertionEffect:function(e,t){us(4,2,e,t)},useMemo:function(e,t){var n=No();t=t===void 0?null:t;var r=e();if(bo){Ue(!0);try{e()}finally{Ue(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=No();if(n!==void 0){var i=n(t);if(bo){Ue(!0);try{n(t)}finally{Ue(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ps.bind(null,I,e),[r.memoizedState,e]},useRef:function(e){var t=No();return e={current:e},t.memoizedState=e},useState:function(e){e=Jo(e);var t=e.queue,n=Fs.bind(null,I,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:bs,useDeferredValue:function(e,t){return Cs(No(),e,t)},useTransition:function(){var e=Jo(!1);return e=Ts.bind(null,I,e.queue,!0,!1),No().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=I,i=No();if(N){if(n===void 0)throw Error(s(407));n=n()}else{if(n=t(),K===null)throw Error(s(349));J&127||Uo(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,fs(Go.bind(null,r,a,e),[e]),r.flags|=2048,cs(9,{destroy:void 0},Wo.bind(null,r,a,n,t),null),n},useId:function(){var e=No(),t=K.identifierPrefix;if(N){var n=Pi,r=Ni;n=(r&~(1<<32-We(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=xo++,0<\/script>`,a=a.removeChild(a.firstChild);break;case`select`:a=typeof r.is==`string`?o.createElement(`select`,{is:r.is}):o.createElement(`select`),r.multiple?a.multiple=!0:r.size&&(a.size=r.size);break;default:a=typeof r.is==`string`?o.createElement(i,{is:r.is}):o.createElement(i)}}a[pt]=t,a[mt]=r;a:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)a.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break a;for(;o.sibling===null;){if(o.return===null||o.return===t)break a;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=a;a:switch(Pd(a,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Fc(t)}}return H(t),Ic(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Fc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(s(166));if(e=me.current,qi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=Bi,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[pt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Wi(t,!0)}else e=Bd(e).createTextNode(r),e[pt]=t,t.stateNode=e}return H(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=qi(t),n!==null){if(e===null){if(!r)throw Error(s(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(s(557));e[pt]=t}else Ji(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;H(t),e=!1}else n=Yi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ho(t),t):(ho(t),null);if(t.flags&128)throw Error(s(558))}return H(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=qi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(s(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(s(317));i[pt]=t}else Ji(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;H(t),i=!1}else i=Yi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(ho(t),t):(ho(t),null)}return ho(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),a=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),a!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Rc(t,t.updateQueue),H(t),null);case 4:return _e(),e===null&&Sd(t.stateNode.containerInfo),H(t),null;case 10:return ta(t.type),H(t),null;case 19:if(A(F),r=t.memoizedState,r===null)return H(t),null;if(i=(t.flags&128)!=0,a=r.rendering,a===null)if(i)zc(r,!1);else{if(X!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=go(e),a!==null){for(t.flags|=128,zc(r,!1),e=a.updateQueue,t.updateQueue=e,Rc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)vi(n,e),n=n.sibling;return j(F,F.current&1|2),N&&Fi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Me()>tu&&(t.flags|=128,i=!0,zc(r,!1),t.lanes=4194304)}else{if(!i)if(e=go(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Rc(t,e),zc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!a.alternate&&!N)return H(t),null}else 2*Me()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,i=!0,zc(r,!1),t.lanes=4194304);r.isBackwards?(a.sibling=t.child,t.child=a):(e=r.last,e===null?t.child=a:e.sibling=a,r.last=a)}return r.tail===null?(H(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Me(),e.sibling=null,n=F.current,j(F,i?n&1|2:n&1),N&&Fi(t,r.treeForkCount),e);case 22:case 23:return ho(t),so(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(H(t),t.subtreeFlags&6&&(t.flags|=8192)):H(t),n=t.updateQueue,n!==null&&Rc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&A(Ca),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ta(P),H(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function Vc(e,t){switch(Ri(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ta(P),_e(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ye(t),null;case 31:if(t.memoizedState!==null){if(ho(t),t.alternate===null)throw Error(s(340));Ji()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ho(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));Ji()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return A(F),null;case 4:return _e(),null;case 10:return ta(t.type),null;case 22:case 23:return ho(t),so(),e!==null&&A(Ca),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ta(P),null;case 25:return null;default:return null}}function Hc(e,t){switch(Ri(t),t.tag){case 3:ta(P),_e();break;case 26:case 27:case 5:ye(t);break;case 4:_e();break;case 31:t.memoizedState!==null&&ho(t);break;case 13:ho(t);break;case 19:A(F);break;case 10:ta(t.type);break;case 22:case 23:ho(t),so(),e!==null&&A(Ca);break;case 24:ta(P)}}function Uc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Wc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Gc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{no(t,n)}catch(t){Z(e,e.return,t)}}}function Kc(e,t,n){n.props=Ys(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function qc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function Jc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}function Yc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function Xc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[mt]=t}catch(t){Z(e,e.return,t)}}function Zc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Qc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Zc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function $c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=sn));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(el(e,t,n),e=e.sibling;e!==null;)el(e,t,n),e=e.sibling}function tl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[pt]=e,t[mt]=n}catch(t){Z(e,e.return,t)}}var nl=!1,U=!1,rl=!1,il=typeof WeakSet==`function`?WeakSet:Set,al=null;function ol(e,t){if(e=e.containerInfo,Rd=sp,e=Pr(e),Fr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break a}var o=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=o+i),f!==a||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=o),p===a&&++d===r&&(l=o),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,al=t;al!==null;)if(t=al,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,al=e;else for(;al!==null;){switch(t=al,a=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Pd(a,r,n),a[pt]=e,Et(a),r=a;break a;case`link`:var o=Vf(`link`,`href`,i).get(r+(n.href||``));if(o){for(var c=0;cg&&(o=g,g=h,h=o);var _=Mr(s,h),v=Mr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,O.T=null,n=lu,lu=null;var a=au,o=su;if(iu=0,ou=au=null,su=0,G&6)throw Error(s(331));var c=G;if(G|=4,Fl(a.current),Dl(a,a.current,o,n),G=c,id(0,!1),He&&typeof He.onPostCommitFiberRoot==`function`)try{He.onPostCommitFiberRoot(Ve,a)}catch{}return!0}finally{k.p=i,O.T=r,Vu(e,t)}}function Wu(e,t,n){t=Ti(n,t),t=tc(e.stateNode,t,2),e=Ya(e,t,2),e!==null&&(rt(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=Ti(n,e),n=nc(2),r=Ya(t,n,2),r!==null&&(rc(n,r,t,e),rt(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Ul=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,K===e&&(J&n)===n&&(X===4||X===3&&(J&62914560)===J&&300>Me()-$l?!(G&2)&&Su(e,0):ql|=n,Yl===J&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=tt()),e=ui(e,t),e!==null&&(rt(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(s(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return Oe(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-We(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=J,a=Qe(r,r===K?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||$e(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=Me(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}iu!==0&&iu!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Gt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),Et(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Gt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Gt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Gt(n.imageSizes)+`"]`)):i+=`[href="`+Gt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),Et(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Gt(r)+`"][href="`+Gt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),Et(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=Tt(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);Et(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=Tt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Et(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=Tt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Et(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var i=(i=me.current)?gf(i):null;if(!i)throw Error(s(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=Tt(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var a=Tt(i).hoistableStyles,o=a.get(e);if(o||(i=i.ownerDocument||i,o={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},a.set(e,o),(a=i.querySelector(jf(e)))&&!a._p&&(o.instance=a,o.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),a||Nf(i,e,n,o.state))),t&&r===null)throw Error(s(528,``));return o}if(t&&r!==null)throw Error(s(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=Tt(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(s(444,e))}}function Af(e){return`href="`+Gt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),Et(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Gt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Gt(n.href)+`"]`);if(r)return t.instance=r,Et(r),r;var i=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Et(r),Pd(r,`style`,i),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Af(n.href);var a=e.querySelector(jf(i));if(a)return t.state.loading|=4,t.instance=a,Et(a),a;r=Mf(n),(i=mf.get(i))&&Rf(r,i),a=(e.ownerDocument||e).createElement(`link`),Et(a);var o=a;return o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),t.state.loading|=4,Lf(a,n.precedence,e),t.instance=a;case`script`:return a=Pf(n.src),(i=e.querySelector(Ff(a)))?(t.instance=i,Et(i),i):(r=n,(i=mf.get(a))&&(r=h({},n),zf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),Et(i),Pd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(s(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Et(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),Et(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=s()})),l=n(),u=c(),d=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),f=e(((e,t)=>{t.exports=d()}))(),p={bg:`#0A0A0C`,panel:`#141418`,surface:`#1C1C22`,border:`#2A2A32`,amber:`#E8A030`,amberDim:`#7A5218`,blue:`#3A7BA8`,blueDim:`#1E4060`,green:`#3AB87A`,red:`#C84040`,textPrimary:`#F0EDE6`,textSec:`#8888A0`,textDim:`#444458`},m=window.location.origin,h=m.replace(/^http/,`ws`)+`/ws`,g=`guitar`;try{let e=localStorage.getItem(`pedal_channel`);(e===`guitar`||e===`bass`)&&(g=e)}catch{}function _(e){g=e}function v(e){let t=g;return t?e+(e.includes(`?`)?`&`:`?`)+`channel=`+encodeURIComponent(t):e}async function y(e){let t=await fetch(`${m}${v(e)}`);if(!t.ok)throw Error(`${e} => ${t.status}`);return t.json()}async function b(e,t){let n=await fetch(`${m}${v(e)}`,{method:`POST`,headers:{"Content-Type":`application/json`},body:t==null?void 0:JSON.stringify(t)});if(!n.ok)throw Error(`${e} => ${n.status}`);return n.json()}async function x(e,t){let n=await fetch(`${m}${v(e)}`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)throw Error(`${e} => ${n.status}`);return n.json()}async function ee(e){let t=await fetch(`${m}${v(e)}`,{method:`DELETE`});if(!t.ok)throw Error(`${e} => ${t.status}`);return t.json()}async function S(e,t){let n=new FormData;n.append(`file`,t);let r=await fetch(`${m}${v(e)}`,{method:`POST`,body:n});if(!r.ok)throw Error(`${e} => ${r.status}`);return r.json()}function C(){let[e,t]=(0,l.useState)(null),[n,r]=(0,l.useState)(!1),i=(0,l.useRef)(null),a=(0,l.useRef)(null);return(0,l.useEffect)(()=>{y(`/api/state`).then(e=>{t(e),r(!0)}).catch(()=>{r(!1)});let e;function n(){try{let a=new WebSocket(h);a.onmessage=e=>{try{let n=JSON.parse(e.data);(n.type===`connected`||n.type===`state`)&&(t(n.state),r(!0)),n.type===`preset_changed`&&n.state&&t(n.state),n.type===`bypass_changed`&&t(e=>e&&{...e,bypass:n.bypass}),n.type===`tuner_changed`&&t(e=>e&&{...e,tuner_enabled:n.tuner_enabled}),n.type===`routing_changed`&&t(e=>e&&{...e,routing_mode:n.routing_mode,routing_breakpoint:n.routing_breakpoint}),n.type===`channel_mode_changed`&&t(e=>e&&{...e,channel_mode:n.channel_mode}),(n.type===`model_loaded`||n.type===`ir_loaded`)&&y(`/api/state`).then(e=>t(e)),n.type===`snapshot_recalled`&&n.state&&t(n.state),n.type===`snapshot_saved`&&y(`/api/state`).then(e=>t(e))}catch{}},a.onclose=()=>{r(!1),e=setTimeout(n,3e3)},a.onerror=()=>a.close(),i.current=a}catch{e=setTimeout(n,3e3)}}return n(),a.current=setInterval(()=>{y(`/api/state`).then(e=>{t(e),r(!0)}).catch(()=>{})},5e3),()=>{clearInterval(a.current),clearTimeout(e),i.current&&i.current.close()}},[]),{state:e,connected:n,refresh:(0,l.useCallback)(()=>{y(`/api/state`).then(e=>{t(e),r(!0)}).catch(()=>{})},[])}}var te=` - @import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Inter:wght@300;400;500;600&display=swap'); - * { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; } - body { background: ${p.bg}; color: ${p.textPrimary}; font-family: 'Inter', sans-serif; user-select: none; } - :root { --amber: ${p.amber}; --blue: ${p.blue}; --green: ${p.green}; } - - .mono { font-family: 'JetBrains Mono', monospace; } - - ::-webkit-scrollbar { width: 4px; height: 4px; } - ::-webkit-scrollbar-track { background: ${p.panel}; } - ::-webkit-scrollbar-thumb { background: ${p.border}; border-radius: 2px; } - - input, textarea, select { font-family: inherit; } - - .knob-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; } - .knob { border-radius: 50%; position: relative; touch-action: none; } - .knob-inner { border-radius: 50%; width: 100%; height: 100%; position: relative; - background: radial-gradient(circle at 35% 30%, #3A3A48, #1A1A22); - box-shadow: 0 2px 8px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.07); } - .knob-dot { position: absolute; width: 3px; border-radius: 2px; background: var(--amber); - left: 50%; transform-origin: bottom center; box-shadow: 0 0 6px var(--amber); } - .knob-ring { position: absolute; inset: -5px; border-radius: 50%; } - .knob-label { font-size: 10px; color: ${p.textSec}; letter-spacing: .06em; text-transform: uppercase; text-align: center; } - .knob-value { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: ${p.amber}; } - - .toggle { display: flex; background: ${p.surface}; border-radius: 6px; border: 1px solid ${p.border}; overflow: hidden; } - .toggle-btn { flex: 1; padding: 7px 12px; font-size: 12px; font-weight: 500; letter-spacing: .04em; - background: none; border: none; color: ${p.textSec}; cursor: pointer; transition: all .15s; } - .toggle-btn.active { background: ${p.amber}; color: #000; } - - .vu-bar { display: flex; gap: 2px; align-items: flex-end; height: 100%; } - .vu-seg { width: 4px; border-radius: 1px; transition: opacity .05s; } - - .fader-track { width: 4px; border-radius: 2px; background: ${p.border}; position: relative; cursor: pointer; touch-action: none; } - .fader-fill { width: 100%; border-radius: 2px; position: absolute; bottom: 0; transition: height .05s; } - .fader-thumb { width: 28px; height: 10px; border-radius: 3px; position: absolute; left: 50%; transform: translateX(-50%); - background: linear-gradient(180deg, #3A3A4A, #252530); - border: 1px solid #4A4A5A; box-shadow: 0 2px 4px rgba(0,0,0,.5); - cursor: grab; touch-action: none; } - .fader-thumb::after { content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); - width: 16px; height: 2px; border-radius: 1px; background: rgba(255,255,255,.15); - box-shadow: 0 3px 0 rgba(255,255,255,.15), 0 -3px 0 rgba(255,255,255,.15); } - - .tabbar { display: flex; background: ${p.panel}; border-bottom: 1px solid ${p.border}; flex-shrink: 0; } - .tab { flex: 1; padding: 10px 4px; font-size: 10px; font-weight: 500; letter-spacing: .04em; - text-align: center; text-transform: uppercase; color: ${p.textDim}; - cursor: pointer; border-bottom: 2px solid transparent; transition: all .15s; } - .tab.active { color: ${p.amber}; border-bottom-color: ${p.amber}; } - - .card { background: ${p.panel}; border: 1px solid ${p.border}; border-radius: 10px; padding: 16px; } - .card-sm { background: ${p.surface}; border: 1px solid ${p.border}; border-radius: 8px; padding: 12px; } - - .btn { padding: 10px 18px; border-radius: 7px; font-size: 13px; font-weight: 600; - letter-spacing: .04em; border: none; cursor: pointer; transition: all .12s; } - .btn-primary { background: ${p.amber}; color: #000; } - .btn-primary:active { filter: brightness(.85); transform: scale(.97); } - .btn-ghost { background: ${p.surface}; color: ${p.textPrimary}; border: 1px solid ${p.border}; } - .btn-ghost:active { background: ${p.border}; } - .btn-danger { background: rgba(200,64,64,.2); color: ${p.red}; border: 1px solid rgba(200,64,64,.3); } - .btn-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; - justify-content: center; background: ${p.surface}; border: 1px solid ${p.border}; cursor: pointer; - font-size: 16px; transition: all .12s; } - .btn-icon:active { transform: scale(.93); } - .btn-icon.active { background: rgba(232,160,48,.15); border-color: ${p.amber}; color: ${p.amber}; } - .btn-sm { padding: 6px 12px; font-size: 12px; } - - .fx-block { background: ${p.panel}; border: 1px solid ${p.border}; border-radius: 10px; - overflow: hidden; transition: border-color .15s; } - .fx-block.active { border-color: ${p.amber}; } - .fx-block.bypassed { opacity: .45; } - .fx-header { display: flex; align-items: center; gap: 10px; padding: 10px 12px; - border-bottom: 1px solid ${p.border}; background: ${p.surface}; cursor: pointer; } - .fx-body { padding: 12px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; } - .bypass-led { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; } - .led-on { background: ${p.green}; box-shadow: 0 0 8px ${p.green}; } - .led-off { background: ${p.textDim}; } - - .waveform-wrap { position: relative; overflow: hidden; border-radius: 6px; background: #0F0F14; } - .waveform-canvas { display: block; } - .playhead { position: absolute; top: 0; bottom: 0; width: 1.5px; background: ${p.amber}; - box-shadow: 0 0 8px ${p.amber}; pointer-events: none; transition: left .08s linear; } - - .nam-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; - background: rgba(58,123,168,.15); border: 1px solid rgba(58,123,168,.35); border-radius: 5px; - font-family: 'JetBrains Mono', monospace; font-size: 11px; color: ${p.blue}; } - - .section-label { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; - color: ${p.textDim}; font-weight: 600; margin-bottom: 10px; } - - .preset-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; - border-radius: 8px; cursor: pointer; transition: background .12s; border: 1px solid transparent; } - .preset-row:active, .preset-row.active { background: rgba(232,160,48,.08); border-color: rgba(232,160,48,.25); } - - .transport-btn { width: 44px; height: 44px; border-radius: 50%; display: flex; - align-items: center; justify-content: center; font-size: 16px; cursor: pointer; - border: 2px solid ${p.border}; background: ${p.surface}; transition: all .12s; } - .transport-btn:active { transform: scale(.92); } - .transport-btn.rec { border-color: ${p.red}; background: rgba(200,64,64,.15); } - .transport-btn.play { border-color: ${p.green}; background: rgba(58,184,122,.15); } - - .badge { display: inline-flex; align-items: center; justify-content: center; - padding: 2px 7px; border-radius: 4px; font-size: 10px; font-weight: 700; - letter-spacing: .06em; text-transform: uppercase; } - .badge-amber { background: rgba(232,160,48,.2); color: ${p.amber}; } - .badge-green { background: rgba(58,184,122,.2); color: ${p.green}; } - .badge-blue { background: rgba(58,123,168,.2); color: ${p.blue}; } - .badge-red { background: rgba(200,64,64,.2); color: ${p.red}; } - - .screen-header { padding: 12px 14px 8px; display: flex; align-items: center; - justify-content: space-between; border-bottom: 1px solid ${p.border}; flex-shrink: 0; } - .screen-title { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: ${p.textSec}; } - - .screen-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; - flex-direction: column; gap: 12px; } - - /* Settings lists */ - .setting-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid ${p.border}; } - .setting-label { font-size: 13px; color: ${p.textPrimary}; } - .setting-desc { font-size: 11px; color: ${p.textDim}; margin-top: 2px; } - .switch { width: 40px; height: 22px; border-radius: 11px; background: ${p.border}; cursor: pointer; position: relative; transition: background .2s; flex-shrink: 0; } - .switch.on { background: ${p.green}; } - .switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: white; transition: transform .15s; } - .switch.on::after { transform: translateX(18px); } - - .search-bar { display: flex; background: ${p.surface}; border-radius: 7px; border: 1px solid ${p.border}; - padding: 8px 12px; gap: 8px; align-items: center; } - .search-bar input { background: none; border: none; outline: none; color: ${p.textPrimary}; font-size: 13px; flex: 1; } - .search-bar input::placeholder { color: ${p.textDim}; } - - .file-drop { border: 2px dashed ${p.border}; border-radius: 8px; padding: 20px; text-align: center; - cursor: pointer; transition: all .15s; font-size: 13px; color: ${p.textDim}; } - .file-drop:hover, .file-drop.dragover { border-color: ${p.amber}; color: ${p.amber}; } - - .loader { width: 20px; height: 20px; border: 2px solid ${p.border}; border-top-color: ${p.amber}; - border-radius: 50%; animation: spin .6s linear infinite; } - @keyframes spin { to { transform: rotate(360deg); } } - - .slide-panel { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 100; - display: flex; align-items: flex-end; justify-content: center; } - .slide-panel-inner { background: ${p.bg}; max-width: 440px; width: 100%; max-height: 85vh; - border-radius: 16px 16px 0 0; overflow: hidden; display: flex; flex-direction: column; } - .slide-panel-handle { width: 36px; height: 4px; border-radius: 2px; background: ${p.border}; - margin: 8px auto; flex-shrink: 0; } - - /* Snapshot slots */ - .snap-grid { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0; } - .snap-slot { min-width: 60px; flex-shrink: 0; border-radius: 8px; border: 1.5px solid ${p.border}; - background: ${p.surface}; cursor: pointer; text-align: center; padding: 8px 4px; - transition: all .12s; touch-action: manipulation; position: relative; } - .snap-slot:active { transform: scale(.95); } - .snap-slot.filled { border-color: ${p.amberDim}; } - .snap-slot.active { border-color: ${p.amber}; background: rgba(232,160,48,.08); } - .snap-slot .snap-num { font-family: 'JetBrains Mono', monospace; font-size: 16px; - font-weight: 700; color: ${p.textDim}; } - .snap-slot.filled .snap-num { color: ${p.amber}; } - .snap-slot.active .snap-num { color: ${p.amber}; text-shadow: 0 0 8px ${p.amber}; } - .snap-slot .snap-name { font-size: 9px; color: ${p.textDim}; margin-top: 3px; - overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } - .snap-slot.filled .snap-name { color: ${p.textSec}; } - .snap-slot.active .snap-name { color: ${p.amber}; } - .snap-slot .snap-empty { font-size: 9px; color: ${p.textDim}; margin-top: 3px; font-style: italic; } - .snap-slot .snap-save-indicator { position: absolute; top: -3px; right: -3px; - width: 10px; height: 10px; border-radius: 50%; background: ${p.green}; - box-shadow: 0 0 6px ${p.green}; animation: snap-pop .3s ease-out; } - @keyframes snap-pop { 0% { transform: scale(2); opacity: 0; } 100% { transform: scale(1); opacity: 1; } } - .snap-name-input { background: ${p.surface}; border: 1px solid ${p.amber}; border-radius: 4px; - padding: 2px 6px; color: ${p.amber}; font-size: 10px; text-align: center; outline: none; - font-family: 'Inter', sans-serif; width: 100%; } - .snap-header-btn { cursor: pointer; border: none; background: none; color: ${p.textSec}; - font-size: 16px; padding: 4px 6px; border-radius: 6px; transition: all .12s; - display: flex; align-items: center; gap: 4px; } - .snap-header-btn:hover { color: ${p.amber}; background: rgba(232,160,48,.1); } - .snap-header-btn.active { color: ${p.amber}; background: rgba(232,160,48,.15); } - .snap-header-num { font-family: 'JetBrains Mono', monospace; font-size: 11px; - font-weight: 700; color: ${p.amber}; min-width: 16px; text-align: center; } -`;function w({label:e,value:t=50,onChange:n,size:r=52,color:i=p.amber,min:a=0,max:o=100}){let s=(0,l.useRef)(null),c=(0,l.useRef)(null),u=(t-a)/(o-a),d=-140+u*280,m=e=>{e.preventDefault(),c.current={y:e.touches?e.touches[0].clientY:e.clientY,val:t};let r=e=>{let t=e.touches?e.touches[0].clientY:e.clientY,r=(c.current.y-t)/120,i=Math.max(a,Math.min(o,c.current.val+r*(o-a)));n?.(Math.round(i))},i=()=>{window.removeEventListener(`mousemove`,r),window.removeEventListener(`mouseup`,i),window.removeEventListener(`touchmove`,r),window.removeEventListener(`touchend`,i)};window.addEventListener(`mousemove`,r),window.addEventListener(`mouseup`,i),window.addEventListener(`touchmove`,r,{passive:!1}),window.addEventListener(`touchend`,i)},h=r+12,g=h/2,_=h/2,v=r/2+3,y=(d-90)*(Math.PI/180),b=g+v*Math.cos(y),x=_+v*Math.sin(y);return(0,f.jsxs)(`div`,{className:`knob-wrap`,style:{width:r+12},children:[(0,f.jsxs)(`div`,{className:`knob`,style:{width:r,height:r},onMouseDown:m,onTouchStart:m,ref:s,children:[(0,f.jsxs)(`svg`,{style:{position:`absolute`,inset:-6,width:h,height:h,overflow:`visible`},children:[(0,f.jsx)(`circle`,{cx:g,cy:_,r:v,fill:`none`,stroke:p.border,strokeWidth:`2.5`,strokeLinecap:`round`,opacity:`.5`}),u>0&&(0,f.jsx)(`path`,{d:`M ${g} ${_-v} A ${v} ${v} 0 ${+(u>.5)} 1 ${b} ${x}`,fill:`none`,stroke:i,strokeWidth:`2.5`,strokeLinecap:`round`,style:{filter:`drop-shadow(0 0 3px ${i})`}})]}),(0,f.jsx)(`div`,{className:`knob-inner`,style:{"--amber":i},children:(0,f.jsx)(`div`,{className:`knob-dot`,style:{height:r*.38,bottom:r/2-2,transform:`translateX(-50%) rotate(${d}deg)`,transformOrigin:`50% ${r*.38}px`}})})]}),(0,f.jsx)(`div`,{className:`knob-value mono`,style:{color:i},children:t}),(0,f.jsx)(`div`,{className:`knob-label`,children:e})]})}function T({level:e=0,height:t=60,vertical:n=!0}){let r=Math.round(e/100*12),i=e=>e>=10?p.red:e>=8?`#E8C030`:p.green;return n?(0,f.jsx)(`div`,{style:{display:`flex`,flexDirection:`column-reverse`,gap:2,height:t,alignItems:`center`},children:Array.from({length:12}).map((e,n)=>(0,f.jsx)(`div`,{style:{width:6,height:(t-24)/12,borderRadius:1,background:n(0,f.jsx)(`div`,{style:{flex:1,height:`100%`,borderRadius:1,background:te.default??e.default??50));return(0,f.jsxs)(`div`,{className:`fx-block ${n?`active`:``} ${r?`bypassed`:``}`,children:[(0,f.jsxs)(`div`,{className:`fx-header`,onClick:()=>s(e=>!e),children:[(0,f.jsx)(`div`,{className:`bypass-led ${r?`led-off`:`led-on`}`,onClick:e=>{e.stopPropagation(),a?.()}}),(0,f.jsx)(`span`,{style:{flex:1,fontSize:13,fontWeight:600},children:e}),(0,f.jsx)(`span`,{className:`badge badge-blue`,style:{fontSize:10},children:t}),(0,f.jsx)(`span`,{style:{color:p.textDim,fontSize:18,marginLeft:6},children:o?`▾`:`▸`})]}),o&&(0,f.jsx)(`div`,{className:`fx-body`,children:i.map((e,t)=>(0,f.jsx)(w,{label:e.name,value:c[t],size:44,onChange:e=>u(n=>n.map((n,r)=>r===t?e:n)),min:e.min??0,max:e.max??100},e.key||e.name))})]})}function D({active:e=!0,variant:t=`right`,animated:n=!0}){let r=e?p.green:p.textDim;return t===`right`?(0,f.jsxs)(`svg`,{width:`22`,height:`14`,viewBox:`0 0 22 14`,style:{flexShrink:0,display:`block`},children:[(0,f.jsx)(`line`,{x1:`2`,y1:`7`,x2:`14`,y2:`7`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`}),(0,f.jsx)(`polygon`,{points:`12,3 20,7 12,11`,fill:r}),e&&n&&(0,f.jsx)(`circle`,{r:`1.5`,fill:r,opacity:`0.6`,children:(0,f.jsx)(`animate`,{attributeName:`cx`,values:`4;18`,dur:`1.2s`,repeatCount:`indefinite`})})]}):t===`split`?(0,f.jsxs)(`svg`,{width:`26`,height:`24`,viewBox:`0 0 26 24`,style:{flexShrink:0,display:`block`},children:[(0,f.jsx)(`line`,{x1:`2`,y1:`10`,x2:`14`,y2:`10`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`}),(0,f.jsx)(`line`,{x1:`8`,y1:`10`,x2:`18`,y2:`18`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`}),(0,f.jsx)(`polygon`,{points:`12,6 18,10 12,14`,fill:r}),(0,f.jsx)(`polygon`,{points:`16,14 21,20 19,13`,fill:r})]}):t===`merge`?(0,f.jsxs)(`svg`,{width:`26`,height:`24`,viewBox:`0 0 26 24`,style:{flexShrink:0,display:`block`},children:[(0,f.jsx)(`line`,{x1:`2`,y1:`4`,x2:`12`,y2:`12`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`}),(0,f.jsx)(`line`,{x1:`2`,y1:`20`,x2:`12`,y2:`12`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`}),(0,f.jsx)(`line`,{x1:`12`,y1:`12`,x2:`14`,y2:`12`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`}),(0,f.jsx)(`polygon`,{points:`12,8 18,12 12,16`,fill:r})]}):null}function ne({children:e,onClose:t}){return(0,f.jsx)(`div`,{className:`slide-panel`,onClick:t,children:(0,f.jsxs)(`div`,{className:`slide-panel-inner`,onClick:e=>e.stopPropagation(),children:[(0,f.jsx)(`div`,{className:`slide-panel-handle`}),e]})})}function re({state:e,connected:t,refresh:n}){let[r,i]=(0,l.useState)(e?.master_volume==null?80:Math.round(e.master_volume*100)),[a,o]=(0,l.useState)(null),[s,c]=(0,l.useState)(null),u=a??e?.bypass??!1,d=s??e?.tuner_enabled??!1;(0,l.useEffect)(()=>{e?.master_volume!=null&&i(Math.round(e.master_volume*100))},[e?.master_volume]),(0,l.useEffect)(()=>{e?.bypass!==void 0&&o(null),e?.tuner_enabled!==void 0&&c(null)},[e?.bypass,e?.tuner_enabled]);let m=async e=>{i(e);try{await x(`/api/volume`,{volume:e/100})}catch{}},h=async()=>{let e=!u;o(e);try{await b(`/api/bypass`,{bypass:e})}catch{o(null)}},g=async()=>{let e=!d;c(e);try{await b(`/api/tuner`,{enabled:e})}catch{c(null)}},_=e?.input_level??0,v=e?.output_level??0;return(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100%`},children:[(0,f.jsxs)(`div`,{className:`screen-header`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`screen-title`,children:`Active Rig`}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:6,marginTop:4,flexWrap:`wrap`,alignItems:`center`},children:[e?.current_preset?(0,f.jsx)(`span`,{className:`nam-chip`,style:{color:p.amber,borderColor:`${p.amber}55`,background:`${p.amber}15`},children:e.current_preset.name}):(0,f.jsx)(`span`,{style:{fontSize:11,color:p.textDim},children:`No preset loaded`}),t?(0,f.jsx)(`span`,{className:`badge badge-green`,children:`Connected`}):(0,f.jsx)(`span`,{className:`badge badge-red`,children:`Offline`})]})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:6,alignItems:`center`},children:[(0,f.jsx)(T,{level:_,height:44}),(0,f.jsx)(T,{level:v,height:44})]})]}),(0,f.jsxs)(`div`,{className:`screen-body`,children:[(0,f.jsxs)(`div`,{className:`card-sm`,style:{display:`flex`,gap:10,justifyContent:`space-around`},children:[(0,f.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,f.jsx)(`div`,{className:`section-label`,style:{marginBottom:4},children:`Bypass`}),(0,f.jsx)(`div`,{className:`switch ${u?`on`:``}`,onClick:h,style:{margin:`0 auto`}})]}),(0,f.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,f.jsx)(`div`,{className:`section-label`,style:{marginBottom:4},children:`Tuner`}),(0,f.jsx)(`div`,{className:`switch ${d?`on`:``}`,onClick:g,style:{margin:`0 auto`}})]}),(0,f.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,f.jsx)(`div`,{className:`section-label`,style:{marginBottom:4},children:`Routing`}),(0,f.jsx)(`span`,{className:`mono`,style:{fontSize:12,color:p.amber},children:e?.routing_mode||`mono`})]})]}),d&&(0,f.jsxs)(`div`,{className:`card-sm`,style:{background:`${p.amber}15`,borderColor:p.amber,textAlign:`center`,padding:`20px 16px`},children:[(0,f.jsx)(`div`,{style:{fontSize:32,marginBottom:8},children:`🎵`}),(0,f.jsx)(`div`,{className:`section-label`,style:{color:p.amber,marginBottom:4,fontSize:14},children:`TUNER ACTIVE`}),(0,f.jsx)(`div`,{className:`mono`,style:{fontSize:24,color:p.amber,letterSpacing:4},children:`—————●—————`}),(0,f.jsx)(`div`,{style:{fontSize:11,color:p.textDim,marginTop:8},children:`Tap switch again to exit tuner mode`})]}),(0,f.jsxs)(`div`,{className:`card`,style:{display:`flex`,gap:20,alignItems:`center`},children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{className:`section-label`,children:`Master Volume`}),(0,f.jsx)(`input`,{type:`range`,min:0,max:100,value:r,onChange:e=>m(+e.target.value),style:{width:`100%`,accentColor:p.amber}}),(0,f.jsxs)(`div`,{className:`mono`,style:{fontSize:11,color:p.amber,marginTop:4},children:[r,`%`]})]}),(0,f.jsxs)(`div`,{className:`mono`,style:{fontSize:11,color:p.textSec,textAlign:`right`},children:[e?.nam_loaded?`NAM: Active`:`NAM: —`,(0,f.jsx)(`br`,{}),e?.ir_loaded?`IR: Active`:`IR: —`]})]}),(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsx)(`div`,{className:`section-label`,children:`Signal Chain`}),(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,overflowX:`auto`,padding:`4px 0`},children:(()=>{let t=[`IN`,e?.bypass?`BYP`:e?.nam_loaded?`NAM`:`AMP`,e?.ir_loaded?`IR`:`CAB`,`OUT`],n=e?.routing_mode===`4cm`;e?.routing_breakpoint;let r=!e?.bypass;return t.map((e,t,i)=>(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0},children:[n&&e===`AMP`&&(0,f.jsx)(D,{variant:`split`,active:r}),n&&e===`CAB`&&(0,f.jsx)(D,{variant:`merge`,active:r}),(0,f.jsxs)(`div`,{style:{padding:`3px 8px`,borderRadius:4,fontSize:10,fontWeight:700,background:t===0||t===i.length-1?p.blueDim:n&&e===`AMP`?`rgba(58,184,122,.15)`:p.amberDim,color:t===0||t===i.length-1?p.blue:n&&e===`AMP`?p.green:p.amber,border:`1px solid ${t===0||t===i.length-1?p.blue:n&&e===`AMP`?p.green:p.amber}60`},children:[e,n&&e===`AMP`&&(0,f.jsx)(`span`,{style:{fontSize:8,marginLeft:4,opacity:.7},children:`4CM`}),n&&e===`BYP`&&(0,f.jsx)(`span`,{style:{fontSize:8,marginLeft:4,opacity:.7},children:`4CM`})]}),n&&e===`AMP`&&(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,flexShrink:0,gap:1},children:[(0,f.jsx)(D,{variant:`split`,active:r}),(0,f.jsx)(`span`,{style:{fontSize:7,color:p.textDim,letterSpacing:`.05em`,lineHeight:`1`},children:`LOOP`}),(0,f.jsx)(D,{variant:`merge`,active:r})]}),t{let e=document.querySelector(`.tabbar`)?.children;e&&e[3]?.click()},children:`Browse IRs`}),(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,style:{flex:1,fontSize:10},onClick:()=>{let e=document.querySelector(`.tabbar`)?.children;e&&e[2]?.click()},children:`Browse Models`})]})]})]})}var ie={noise_gate:`Noise Gate`,compressor:`Compressor`,boost:`Boost`,overdrive:`Overdrive`,distortion:`Distortion`,fuzz:`Fuzz`,eq:`EQ`,chorus:`Chorus`,flanger:`Flanger`,phaser:`Phaser`,tremolo:`Tremolo`,vibrato:`Vibrato`,delay:`Delay`,reverb:`Reverb`,volume:`Volume`,nam_amp:`NAM Amp`,ir_cab:`IR Cab`,octaver:`Octaver`,pitch_shifter:`Pitch Shifter`,harmonizer:`Harmonizer`,whammy:`Whammy`,detune:`Detune`,ring_modulator:`Ring Mod`,auto_wah:`Auto Wah`,envelope_filter:`Env Filter`,rotary_speaker:`Rotary`,uni_vibe:`Uni-Vibe`,auto_pan:`Auto Pan`,stereo_widener:`Stereo Widener`,bitcrusher:`Bitcrusher`,wavefolder:`Wavefolder`,rectifier:`Rectifier`,expander:`Expander`,de_esser:`De-esser`,transient_shaper:`Transient Shaper`,parametric_eq:`Parametric EQ`,high_pass_filter:`High Pass`,low_pass_filter:`Low Pass`,band_pass_filter:`Band Pass`,notch_filter:`Notch Filter`,formant_filter:`Formant Filter`,ping_pong_delay:`Ping Pong Delay`,multi_tap_delay:`Multi Tap`,reverse_delay:`Reverse Delay`,tape_echo:`Tape Echo`,shimmer_reverb:`Shimmer Reverb`,looper:`Looper`,early_reflections:`Early Reflections`,sidechain_compressor:`Sidechain Comp`};function ae({state:e,connected:t}){let[n,r]=(0,l.useState)(null),[i,a]=(0,l.useState)(!0),[o,s]=(0,l.useState)(!1),[c,u]=(0,l.useState)({}),d=(0,l.useCallback)(async e=>{if(c[e])return c[e];try{let t=await y(`/api/block-params/${e}`);return u(n=>({...n,[e]:t.params||[]})),t.params||[]}catch{return[]}},[c]);(0,l.useEffect)(()=>{if(!t||!e?.current_preset){r([]),a(!1);return}y(`/api/presets`).then(async t=>{let n=t.banks||[],i=e.current_preset,o=n[i.bank]?.presets?.[i.program];o?.chain&&r(await Promise.all(o.chain.map(async(e,t)=>{let n=await d(e.fx_type);return{id:t+1,title:ie[e.fx_type]||e.fx_type.replace(/_/g,` `).replace(/\b\w/g,e=>e.toUpperCase()),type:e.fx_type,bypassed:e.bypass||!e.enabled,params:n}}))),a(!1)}).catch(()=>{r([]),a(!1)})},[t,e,d]);let m=e=>r(t=>t&&t.map(t=>t.id===e?{...t,bypassed:!t.bypassed}:t)),h=async e=>{s(!1);let t=await d(e);r(n=>[...n||[],{id:Date.now(),title:ie[e]||e,type:e,bypassed:!1,params:t}])};return i?(0,f.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,f.jsx)(`div`,{className:`loader`})}):(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100%`},children:[(0,f.jsxs)(`div`,{className:`screen-header`,children:[(0,f.jsxs)(`div`,{className:`screen-title`,children:[`FX Chain `,(n?.length||0)>0?`(${n.length})`:``]}),(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>s(!0),children:`+ Add Block`})]}),(0,f.jsxs)(`div`,{className:`screen-body`,children:[n&&n.length>0&&(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 2px`,overflowX:`auto`},children:(()=>{let t=e?.routing_mode===`4cm`,r=t?e?.routing_breakpoint||7:-1,i=[];return i.push({label:`IN`,type:`io`,idx:-1}),n.forEach((e,n)=>{t&&n===r&&i.push({label:null,type:`merge-bp`,idx:n}),i.push({label:e.type.toUpperCase(),type:`fx`,idx:n,bypassed:e.bypassed}),t&&n===r-1&&i.push({label:null,type:`split-bp`,idx:n})}),i.push({label:`OUT`,type:`io`,idx:-1}),i.map((e,t)=>e.type===`split-bp`?(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,flexShrink:0,gap:1},children:[(0,f.jsx)(D,{variant:`split`,active:!0}),(0,f.jsx)(`span`,{style:{fontSize:7,color:p.textDim,letterSpacing:`.05em`,lineHeight:`1`},children:`4CM`}),(0,f.jsx)(D,{variant:`merge`,active:!0})]},`bp-${t}`):e.type===`merge-bp`?null:(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0},children:[e.type===`io`&&(0,f.jsx)(`div`,{style:{padding:`3px 8px`,borderRadius:4,fontSize:10,fontWeight:700,background:p.blueDim,color:p.blue,border:`1px solid ${p.blue}60`},children:e.label}),e.type===`fx`&&(0,f.jsx)(`div`,{style:{padding:`3px 8px`,borderRadius:4,fontSize:10,fontWeight:700,background:p.amberDim,color:e.bypassed?p.textDim:p.amber,border:`1px solid ${e.bypassed?p.textDim:p.amber}60`,opacity:e.bypassed?.5:1},children:e.label}),ts(!0),children:`+ Add your first block`})]}):n.map(e=>(0,f.jsx)(E,{...e,active:!e.bypassed,onToggle:()=>m(e.id)},e.id))]}),o&&(0,f.jsxs)(ne,{onClose:()=>s(!1),children:[(0,f.jsx)(`div`,{className:`screen-header`,children:(0,f.jsx)(`div`,{className:`screen-title`,children:`Add FX Block`})}),(0,f.jsx)(`div`,{className:`screen-body`,style:{gap:4},children:Object.entries(ie).map(([e,t])=>(0,f.jsxs)(`div`,{className:`preset-row`,onClick:()=>h(e),style:{borderRadius:6},children:[(0,f.jsx)(`span`,{className:`badge badge-blue`,style:{width:60,flexShrink:0},children:e.split(`_`)[0]}),(0,f.jsx)(`span`,{style:{flex:1,fontSize:13},children:t}),(0,f.jsx)(`span`,{style:{color:p.textDim},children:`+`})]},e))})]})]})}function oe({state:e,connected:t,refresh:n}){let[r,i]=(0,l.useState)([]),[a,o]=(0,l.useState)(null),[s,c]=(0,l.useState)(!0),[u,d]=(0,l.useState)(!1),[m,h]=(0,l.useState)(``),[g,_]=(0,l.useState)([]),[v,x]=(0,l.useState)(!1),[ee,C]=(0,l.useState)(!1),te=(0,l.useRef)(null),w=(0,l.useCallback)(async()=>{if(!t){c(!1);return}try{let e=await y(`/api/models`);i(e.models||[]),o(e.current)}catch{}c(!1)},[t]);(0,l.useEffect)(()=>{w()},[w]);let T=async e=>{try{await b(`/api/models/load`,{path:e}),await w(),n()}catch{alert(`Failed to load model`)}},E=async()=>{try{await b(`/api/models/unload`),o(null),await w(),n()}catch{alert(`Failed to unload`)}},D=async e=>{let t=e.target.files?.[0];if(t){C(!0);try{await S(`/api/models/upload`,t),await w()}catch{alert(`Upload failed`)}C(!1)}},ne=(0,l.useCallback)(async()=>{if(m.trim()){d(!0);try{_((await y(`/api/models/tonedownload/search?q=${encodeURIComponent(m)}`)).results||[])}catch{alert(`Search failed`)}d(!1)}},[m]),re=async e=>{try{await b(`/api/models/tonedownload/install`,{download_url:e.download_url,name:e.name||e.filename,id:e.id,size:e.size,pack_name:e.pack_name,display_name:e.name}),await w(),n()}catch{alert(`Install failed`)}};return s?(0,f.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,f.jsx)(`div`,{className:`loader`})}):(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100%`},children:[(0,f.jsxs)(`div`,{className:`screen-header`,children:[(0,f.jsxs)(`div`,{className:`screen-title`,children:[`NAM Models (`,r.length,`)`]}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:6},children:[(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>x(!v),children:v?`Local`:`Search`}),(0,f.jsx)(`button`,{className:`btn btn-primary btn-sm`,onClick:()=>te.current?.click(),children:ee?`...`:`+ Upload`}),(0,f.jsx)(`input`,{ref:te,type:`file`,accept:`.nam`,style:{display:`none`},onChange:D})]})]}),v&&(0,f.jsxs)(`div`,{style:{padding:`8px 12px`,borderBottom:`1px solid ${p.border}`},children:[(0,f.jsxs)(`div`,{className:`search-bar`,children:[(0,f.jsx)(`span`,{style:{color:p.textDim},children:`🔍`}),(0,f.jsx)(`input`,{type:`text`,placeholder:`Search Tone3000…`,value:m,onChange:e=>h(e.target.value),onKeyDown:e=>e.key===`Enter`&&ne()}),(0,f.jsx)(`button`,{className:`btn btn-primary btn-sm`,onClick:ne,disabled:u,children:u?`...`:`Go`})]}),g.length>0&&(0,f.jsx)(`div`,{style:{marginTop:8,maxHeight:240,overflow:`auto`},children:g.map(e=>(0,f.jsxs)(`div`,{className:`preset-row`,onClick:()=>re(e),style:{borderBottom:`1px solid ${p.border}`,borderRadius:0},children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:13},children:e.name}),(0,f.jsxs)(`div`,{style:{fontSize:10,color:p.textDim},children:[e.author,` · `,e.size_display,` · `,e.architecture]})]}),(0,f.jsx)(`button`,{className:`btn btn-primary btn-sm`,children:`Get`})]},e.id))})]}),(0,f.jsxs)(`div`,{className:`screen-body`,children:[a&&(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsx)(`div`,{className:`section-label`,style:{marginBottom:6},children:`Loaded Model`}),(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,f.jsx)(`div`,{className:`nam-chip`,children:a}),(0,f.jsx)(`button`,{className:`btn btn-danger btn-sm`,onClick:E,children:`Unload`})]})]}),r.length===0?(0,f.jsxs)(`div`,{style:{textAlign:`center`,padding:30,color:p.textDim,fontSize:14},children:[`No NAM models found.`,(0,f.jsx)(`br`,{}),`Upload a .nam file or search Tone3000.`]}):r.map(e=>(0,f.jsxs)(`div`,{className:`preset-row ${e.loaded?`active`:``}`,children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:13,fontWeight:500},children:e.name}),(0,f.jsxs)(`div`,{style:{fontSize:10,color:p.textDim},children:[e.architecture,` · `,e.size_mb,` MB`]})]}),e.loaded?(0,f.jsx)(`span`,{className:`badge badge-green`,children:`Loaded`}):(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>T(e.path),children:`Load`})]},e.name))]})]})}function se({state:e,connected:t,refresh:n}){let[r,i]=(0,l.useState)([]),[a,o]=(0,l.useState)(null),[s,c]=(0,l.useState)(!0),[u,d]=(0,l.useState)(!1),[m,h]=(0,l.useState)(``),[g,_]=(0,l.useState)([]),[v,x]=(0,l.useState)(!1),[ee,C]=(0,l.useState)(!1),te=(0,l.useRef)(null),w=(0,l.useCallback)(async()=>{if(!t){c(!1);return}try{let e=await y(`/api/irs`);i(e.irs||[]),o(e.current)}catch{}c(!1)},[t]);(0,l.useEffect)(()=>{w()},[w]);let T=async e=>{try{await b(`/api/irs/load`,{path:e}),await w(),n()}catch{alert(`Failed to load IR`)}},E=async()=>{try{await b(`/api/irs/unload`),o(null),await w(),n()}catch{alert(`Failed to unload`)}},D=async e=>{let t=e.target.files?.[0];if(t){C(!0);try{await S(`/api/irs/upload`,t),await w()}catch{alert(`Upload failed`)}C(!1)}},ne=(0,l.useCallback)(async()=>{if(m.trim()){d(!0);try{_((await y(`/api/irs/tonedownload/search?q=${encodeURIComponent(m)}`)).results||[])}catch{alert(`Search failed`)}d(!1)}},[m]),re=async e=>{try{await b(`/api/irs/tonedownload/install`,{download_url:e.download_url,name:e.name||e.filename,id:e.id,size:e.size,display_name:e.name}),await w(),n()}catch{alert(`Install failed`)}};return s?(0,f.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,f.jsx)(`div`,{className:`loader`})}):(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100%`},children:[(0,f.jsxs)(`div`,{className:`screen-header`,children:[(0,f.jsxs)(`div`,{className:`screen-title`,children:[`IR Files (`,r.length,`)`]}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:6},children:[(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>x(!v),children:v?`Local`:`Search`}),(0,f.jsx)(`button`,{className:`btn btn-primary btn-sm`,onClick:()=>te.current?.click(),children:ee?`...`:`+ Upload`}),(0,f.jsx)(`input`,{ref:te,type:`file`,accept:`.wav`,style:{display:`none`},onChange:D})]})]}),v&&(0,f.jsxs)(`div`,{style:{padding:`8px 12px`,borderBottom:`1px solid ${p.border}`},children:[(0,f.jsxs)(`div`,{className:`search-bar`,children:[(0,f.jsx)(`span`,{style:{color:p.textDim},children:`🔍`}),(0,f.jsx)(`input`,{type:`text`,placeholder:`Search Tone3000 IRs…`,value:m,onChange:e=>h(e.target.value),onKeyDown:e=>e.key===`Enter`&&ne()}),(0,f.jsx)(`button`,{className:`btn btn-primary btn-sm`,onClick:ne,disabled:u,children:u?`...`:`Go`})]}),g.length>0&&(0,f.jsx)(`div`,{style:{marginTop:8,maxHeight:240,overflow:`auto`},children:g.map(e=>(0,f.jsxs)(`div`,{className:`preset-row`,onClick:()=>re(e),style:{borderBottom:`1px solid ${p.border}`,borderRadius:0},children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:13},children:e.name}),(0,f.jsxs)(`div`,{style:{fontSize:10,color:p.textDim},children:[e.author,` · `,e.size_display]})]}),(0,f.jsx)(`button`,{className:`btn btn-primary btn-sm`,children:`Get`})]},e.id))})]}),(0,f.jsxs)(`div`,{className:`screen-body`,children:[a&&(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsx)(`div`,{className:`section-label`,style:{marginBottom:6},children:`Loaded IR`}),(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,f.jsx)(`div`,{className:`nam-chip`,style:{color:p.green,borderColor:`${p.green}55`,background:`${p.green}15`},children:a}),(0,f.jsx)(`button`,{className:`btn btn-danger btn-sm`,onClick:E,children:`Unload`})]})]}),r.length===0?(0,f.jsxs)(`div`,{style:{textAlign:`center`,padding:30,color:p.textDim,fontSize:14},children:[`No IR files found.`,(0,f.jsx)(`br`,{}),`Upload a .wav file or search Tone3000.`]}):r.map(e=>(0,f.jsxs)(`div`,{className:`preset-row ${e.loaded?`active`:``}`,children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:13,fontWeight:500},children:e.name}),(0,f.jsxs)(`div`,{style:{fontSize:10,color:p.textDim},children:[e.sample_rate,` Hz · `,e.length_ms,` ms · `,e.num_taps,` taps`]})]}),e.loaded?(0,f.jsx)(`span`,{className:`badge badge-green`,children:`Loaded`}):(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>T(e.path),children:`Load`})]},e.name))]})]})}function O({state:e,connected:t,refresh:n}){let[r,i]=(0,l.useState)([]),[a,o]=(0,l.useState)(0),[s,c]=(0,l.useState)(!0),[u,d]=(0,l.useState)(``),[m,h]=(0,l.useState)(!1),[g,_]=(0,l.useState)(null),v=(0,l.useCallback)(async()=>{if(!t){i([]),c(!1);return}try{i((await y(`/api/presets`)).banks||[])}catch{}c(!1)},[t]);(0,l.useEffect)(()=>{v()},[v]);let S=async(e,t)=>{try{await b(`/api/presets/${e}/${t}/activate`),await v(),n()}catch{alert(`Failed to load preset`)}},C=async()=>{if(!u.trim())return;let t=e?.current_preset?.bank??0,n=e?.current_preset?.program??0;try{await x(`/api/presets/${t}/${n}`,{name:u}),h(!1),await v()}catch{alert(`Failed to save`)}},te=async()=>{let e=a,t=r[e]?.presets||[],i=t.findIndex(e=>e==null);i===-1&&(i=t.length);let o=`New Preset ${i+1}`;try{await x(`/api/presets/${e}/${i}`,{name:o}),await v(),await b(`/api/presets/${e}/${i}/activate`),n()}catch{alert(`Failed to create preset`)}},w=async(e,t)=>{try{await ee(`/api/presets/${e}/${t}`),_(null),await v()}catch{alert(`Failed to delete`)}};if(s)return(0,f.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,f.jsx)(`div`,{className:`loader`})});let T=e?.current_preset,E=r[a]?.presets||[];return(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100%`},children:[(0,f.jsxs)(`div`,{className:`screen-header`,children:[(0,f.jsx)(`div`,{className:`screen-title`,children:`Presets`}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:6},children:[(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>h(!0),children:`Save`}),(0,f.jsx)(`button`,{className:`btn btn-primary btn-sm`,onClick:te,children:`+ New`})]})]}),(0,f.jsxs)(`div`,{className:`screen-body`,children:[r.length>1&&(0,f.jsx)(`div`,{className:`toggle`,children:r.map((e,t)=>(0,f.jsx)(`button`,{className:`toggle-btn ${a===t?`active`:``}`,onClick:()=>o(t),children:e.name},e.number))}),T&&(0,f.jsx)(`div`,{className:`card-sm`,style:{display:`flex`,alignItems:`center`,gap:8},children:(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:11,color:p.textDim},children:`Current`}),(0,f.jsxs)(`div`,{style:{fontSize:14,fontWeight:600,color:p.amber},children:[T.name,(0,f.jsxs)(`span`,{className:`mono`,style:{fontSize:10,color:p.textDim,marginLeft:8},children:[`Bank `,T.bank,` · Prog `,T.program]})]})]})}),E.length===0?(0,f.jsx)(`div`,{style:{textAlign:`center`,padding:30,color:p.textDim,fontSize:14},children:`No presets in this bank.`}):E.map((e,t)=>{if(!e)return null;let n=T?.bank===e.bank&&T?.program===e.program,r=g===`${e.bank}-${e.program}`;return(0,f.jsxs)(`div`,{className:`preset-row ${n?`active`:``}`,onClick:()=>!r&&S(e.bank,e.program),children:[(0,f.jsx)(`div`,{className:`mono`,style:{width:28,height:28,borderRadius:6,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:12,fontWeight:700,background:n?`${p.amber}22`:p.surface,color:n?p.amber:p.textDim,border:`1px solid ${n?p.amber+`60`:p.border}`},children:e.program+1}),(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:13,fontWeight:600},children:e.name}),(0,f.jsxs)(`div`,{style:{fontSize:10,color:p.textDim},children:[`Bank `,e.bank,` · Program `,e.program]})]}),n&&(0,f.jsx)(`span`,{style:{color:p.amber,fontSize:16},children:`●`}),r?(0,f.jsxs)(`div`,{style:{display:`flex`,gap:4},children:[(0,f.jsx)(`button`,{className:`btn btn-danger btn-sm`,onClick:t=>{t.stopPropagation(),w(e.bank,e.program)},children:`Confirm`}),(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:e=>{e.stopPropagation(),_(null)},children:`Cancel`})]}):(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,style:{color:p.red},onClick:t=>{t.stopPropagation(),_(`${e.bank}-${e.program}`)},children:`Delete`})]},t)})]}),m&&(0,f.jsxs)(ne,{onClose:()=>h(!1),children:[(0,f.jsx)(`div`,{className:`screen-header`,children:(0,f.jsx)(`div`,{className:`screen-title`,children:`Save Preset`})}),(0,f.jsxs)(`div`,{className:`screen-body`,children:[(0,f.jsx)(`div`,{className:`search-bar`,children:(0,f.jsx)(`input`,{type:`text`,placeholder:`Preset name…`,value:u,onChange:e=>d(e.target.value),autoFocus:!0,onKeyDown:e=>e.key===`Enter`&&C()})}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,f.jsx)(`button`,{className:`btn btn-primary`,style:{flex:1},onClick:C,children:`Save`}),(0,f.jsx)(`button`,{className:`btn btn-ghost`,onClick:()=>h(!1),children:`Cancel`})]})]})]})]})}function k({state:e,connected:t,refresh:n}){let[r,i]=(0,l.useState)(`wifi`),[a,o]=(0,l.useState)([]),[s,c]=(0,l.useState)([]),[u,d]=(0,l.useState)([]),[m,h]=(0,l.useState)(!1),[g,_]=(0,l.useState)(!1),[v,x]=(0,l.useState)(``),[ee,S]=(0,l.useState)(``),[C,te]=(0,l.useState)(null),[w,T]=(0,l.useState)(e?.routing_mode||`mono`),[E,D]=(0,l.useState)(e?.routing_breakpoint||7),[ne,re]=(0,l.useState)(e?.channel_mode||`dual-mono`);(0,l.useEffect)(()=>{e?.routing_mode&&T(e.routing_mode),e?.routing_breakpoint!=null&&D(e.routing_breakpoint),e?.channel_mode&&re(e.channel_mode)},[e?.routing_mode,e?.routing_breakpoint,e?.channel_mode]);let ie=async()=>{h(!0);try{o((await y(`/api/wifi/scan`)).networks||[])}catch{}h(!1)},ae=async(e,t)=>{try{await b(`/api/wifi/connect`,{ssid:e,password:t}),te(null),x(``),S(``),setTimeout(n,2e3)}catch{alert(`Failed to connect`)}},oe=async()=>{try{await b(`/api/wifi/disconnect`),setTimeout(n,2e3)}catch{}},se=async()=>{let t=e?.wifi?.hotspot_active;try{t?await b(`/api/wifi/hotspot/disable`):await b(`/api/wifi/hotspot/enable`,{ssid:`Pi-Pedal`,password:`pedal1234`}),setTimeout(n,2e3)}catch{}},O=async e=>{try{await b(`/api/bluetooth/power`,{on:e}),setTimeout(n,1e3)}catch{}},k=async()=>{_(!0);try{c((await b(`/api/bluetooth/scan`)).devices||[])}catch{}_(!1)},ce=async()=>{try{d((await y(`/api/bluetooth/paired`)).devices||[])}catch{}},le=async e=>{try{await b(`/api/bluetooth/pair`,{address:e}),await ce()}catch{alert(`Pairing failed`)}},ue=async(e,t)=>{try{await b(`/api/routing`,{routing_mode:e,routing_breakpoint:t})}catch{}},de=async e=>{try{await b(`/api/channel-mode`,{channel_mode:e}),re(e)}catch{}};(0,l.useEffect)(()=>{t&&(ie(),ce())},[t]);let A=e?.wifi,j=e?.bluetooth;return(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100%`},children:[(0,f.jsx)(`div`,{className:`screen-header`,children:(0,f.jsx)(`div`,{className:`screen-title`,children:`Settings`})}),(0,f.jsx)(`div`,{className:`toggle`,style:{margin:`6px 10px`},children:[{id:`wifi`,label:`WiFi`},{id:`bt`,label:`Bluetooth`},{id:`routing`,label:`Routing`}].map(e=>(0,f.jsx)(`button`,{className:`toggle-btn ${r===e.id?`active`:``}`,onClick:()=>i(e.id),children:e.label},e.id))}),(0,f.jsxs)(`div`,{className:`screen-body`,style:{gap:4},children:[r===`wifi`&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsxs)(`div`,{className:`setting-row`,style:{border:`none`,paddingTop:0},children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`setting-label`,children:`WiFi`}),(0,f.jsx)(`div`,{className:`setting-desc`,children:A?.connected?`Connected to ${A.ssid}`:`Disconnected`})]}),(0,f.jsx)(`div`,{className:`switch ${A?.connected?`on`:``}`,onClick:oe})]}),A?.connected&&(0,f.jsxs)(`div`,{style:{fontSize:11,color:p.textDim},children:[`IP: `,A.ip,` · Signal: `,A.signal,`%`]}),(0,f.jsxs)(`div`,{className:`setting-row`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`setting-label`,children:`Hotspot`}),(0,f.jsx)(`div`,{className:`setting-desc`,children:A?.hotspot_active?`Active: ${A.hotspot_ssid}`:`Off`})]}),(0,f.jsx)(`div`,{className:`switch ${A?.hotspot_active?`on`:``}`,onClick:se})]})]}),(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:8},children:[(0,f.jsx)(`div`,{className:`section-label`,style:{marginBottom:0},children:`Networks`}),(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:ie,disabled:m,children:m?`...`:`Scan`})]}),a.length===0?(0,f.jsx)(`div`,{style:{fontSize:12,color:p.textDim,padding:`8px 0`},children:`Scan to see available networks.`}):a.map(e=>(0,f.jsxs)(`div`,{className:`preset-row`,style:{padding:`8px 0`,borderRadius:0,borderBottom:`1px solid ${p.border}`},onClick:()=>wpaState?.ssid!==e.ssid&&te(e.ssid),children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:13},children:e.ssid}),(0,f.jsxs)(`div`,{className:`mono`,style:{fontSize:10,color:p.textDim},children:[`Signal: `,e.signal,`% · `,e.encryption||`Open`]})]}),A?.ssid===e.ssid&&(0,f.jsx)(`span`,{className:`badge badge-green`,children:`Connected`})]},e.ssid))]}),C&&(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsxs)(`div`,{className:`section-label`,children:[`Connect to `,C]}),(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:[(0,f.jsx)(`input`,{type:`password`,placeholder:`Password (leave blank for open network)`,value:ee,onChange:e=>S(e.target.value),style:{background:p.surface,border:`1px solid ${p.border}`,borderRadius:6,padding:`8px 12px`,color:p.textPrimary,fontSize:13,outline:`none`},onKeyDown:e=>e.key===`Enter`&&ae(C,ee)}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:6},children:[(0,f.jsx)(`button`,{className:`btn btn-primary btn-sm`,style:{flex:1},onClick:()=>ae(C,ee),children:`Connect`}),(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>te(null),children:`Cancel`})]})]})]})]}),r===`bt`&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsxs)(`div`,{className:`setting-row`,style:{border:`none`,paddingTop:0},children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`setting-label`,children:`Bluetooth`}),(0,f.jsx)(`div`,{className:`setting-desc`,children:j?.powered?`Powered on`:`Off`})]}),(0,f.jsx)(`div`,{className:`switch ${j?.powered?`on`:``}`,onClick:()=>O(!j?.powered)})]}),j?.powered&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`setting-row`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`setting-label`,children:`Discoverable`}),(0,f.jsxs)(`div`,{className:`setting-desc`,children:[j?.name,` (`,j?.address,`)`]})]}),(0,f.jsx)(`div`,{className:`switch ${j?.discoverable?`on`:``}`,onClick:async()=>{try{await b(`/api/bluetooth/discoverable`,{on:!j?.discoverable}),setTimeout(n,500)}catch{}}})]}),(0,f.jsxs)(`div`,{className:`setting-row`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`setting-label`,children:`Bluetooth MIDI`}),(0,f.jsx)(`div`,{className:`setting-desc`,children:j?.midi_enabled?`Enabled`:`Disabled`})]}),(0,f.jsx)(`div`,{className:`switch ${j?.midi_enabled?`on`:``}`,onClick:async()=>{try{await(j?.midi_enabled?b(`/api/bluetooth/midi-disable`):b(`/api/bluetooth/midi-enable`)),setTimeout(n,500)}catch{}}})]})]})]}),j?.powered&&(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:8},children:[(0,f.jsxs)(`div`,{className:`section-label`,style:{marginBottom:0},children:[`Paired Devices (`,u.length,`)`]}),(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:k,disabled:g,children:g?`...`:`Scan`})]}),u.length===0?(0,f.jsx)(`div`,{style:{fontSize:12,color:p.textDim,padding:`8px 0`},children:`No paired devices.`}):u.map(e=>(0,f.jsxs)(`div`,{className:`preset-row`,style:{padding:`8px 0`,borderRadius:0,borderBottom:`1px solid ${p.border}`},children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:13},children:e.name||e.address}),(0,f.jsxs)(`div`,{className:`mono`,style:{fontSize:10,color:p.textDim},children:[e.address,` · `,e.connected?`Connected`:`Paired`]})]}),!e.connected&&(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:async()=>{try{await b(`/api/bluetooth/connect`,{address:e.address})}catch{alert(`Failed`)}},children:`Connect`})]},e.address))]}),g&&s.length>0&&(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsx)(`div`,{className:`section-label`,style:{marginBottom:6},children:`Discovered`}),s.map(e=>(0,f.jsxs)(`div`,{className:`preset-row`,style:{padding:`8px 0`,borderRadius:0,borderBottom:`1px solid ${p.border}`},children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:13},children:e.name||e.address}),(0,f.jsx)(`div`,{className:`mono`,style:{fontSize:10,color:p.textDim},children:e.address})]}),(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>le(e.address),children:`Pair`})]},e.address))]})]}),r===`routing`&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsx)(`div`,{className:`section-label`,children:`4CM Routing`}),(0,f.jsxs)(`div`,{className:`setting-row`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`setting-label`,children:`Mode`}),(0,f.jsx)(`div`,{className:`setting-desc`,children:`Mono (normal) or 4CM (4-cable method)`})]}),(0,f.jsxs)(`select`,{value:w,onChange:e=>{T(e.target.value),ue(e.target.value,E)},style:{background:p.surface,border:`1px solid ${p.border}`,borderRadius:6,padding:`6px 10px`,color:p.textPrimary,fontSize:13,outline:`none`},children:[(0,f.jsx)(`option`,{value:`mono`,children:`Mono`}),(0,f.jsx)(`option`,{value:`4cm`,children:`4CM`})]})]}),w===`4cm`&&(0,f.jsxs)(`div`,{className:`setting-row`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`setting-label`,children:`Breakpoint`}),(0,f.jsx)(`div`,{className:`setting-desc`,children:`Chain position for amp send/return`})]}),(0,f.jsx)(`input`,{type:`number`,min:1,max:15,value:E,onChange:e=>{let t=+e.target.value;D(t),ue(w,t)},style:{background:p.surface,border:`1px solid ${p.border}`,borderRadius:6,padding:`6px 10px`,color:p.textPrimary,fontSize:13,width:60,outline:`none`,textAlign:`center`}})]})]}),(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsx)(`div`,{className:`section-label`,children:`Channel Mode`}),(0,f.jsxs)(`div`,{className:`setting-row`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`setting-label`,children:`Routing`}),(0,f.jsx)(`div`,{className:`setting-desc`,children:`Dual-mono: two independent channels · Stereo: linked as L/R pair`})]}),(0,f.jsxs)(`select`,{value:ne,onChange:e=>de(e.target.value),style:{background:p.surface,border:`1px solid ${p.border}`,borderRadius:6,padding:`6px 10px`,color:p.textPrimary,fontSize:13,outline:`none`},children:[(0,f.jsx)(`option`,{value:`dual-mono`,children:`Dual-Mono`}),(0,f.jsx)(`option`,{value:`stereo`,children:`Stereo`})]})]}),(0,f.jsx)(`div`,{style:{fontSize:10,color:p.textDim,marginTop:4,padding:`4px 0`},children:ne===`dual-mono`?`Each channel controlled independently from its own phone.`:`Channels A (Left) and B (Right) are controlled together.`})]})]})]})]})}function ce({state:e}){let[t,n]=(0,l.useState)(!1),[r,i]=(0,l.useState)([]),[a,o]=(0,l.useState)(!0),s=e?.input_level??0,c=e?.output_level??0,u=(0,l.useCallback)(async()=>{try{i((await y(`/api/captures`)).captures||[])}catch{}o(!1)},[]);return(0,l.useEffect)(()=>{u()},[u]),(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100%`},children:[(0,f.jsxs)(`div`,{className:`screen-header`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`screen-title`,children:`Looper / Recorder`}),(0,f.jsxs)(`div`,{className:`mono`,style:{fontSize:10,color:p.textDim},children:[e?.sample_rate?`${e.sample_rate/1e3}kHz`:`—`,t&&(0,f.jsx)(`span`,{style:{color:p.red,marginLeft:8},children:`● RECORDING`})]})]}),(0,f.jsx)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`},children:t?(0,f.jsx)(`button`,{className:`btn btn-danger btn-sm`,onClick:async()=>{try{await b(`/api/capture/stop`),n(!1),u()}catch{alert(`Failed to stop recording`)}},style:{padding:`8px 16px`},children:`⏹ Stop`}):(0,f.jsx)(`button`,{className:`btn btn-primary btn-sm`,onClick:async()=>{try{await b(`/api/capture/start`),n(!0)}catch{alert(`Failed to start recording`)}},style:{padding:`8px 16px`,background:p.red,color:`#fff`},children:`● Record`})})]}),(0,f.jsxs)(`div`,{className:`screen-body`,children:[(0,f.jsxs)(`div`,{className:`card`,style:{padding:`16px`,display:`flex`,gap:16,alignItems:`center`},children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{className:`section-label`,children:`Input Level`}),(0,f.jsx)(`div`,{style:{display:`flex`,gap:2,height:20,marginTop:4},children:Array.from({length:12}).map((e,t)=>{let n=Math.round(s/100*12)>t,r=t>=10?p.red:t>=8?`#E8C030`:p.green;return(0,f.jsx)(`div`,{style:{flex:1,borderRadius:2,background:n?r:p.border,transition:`all .05s`}},t)})})]}),(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{className:`section-label`,children:`Output Level`}),(0,f.jsx)(`div`,{style:{display:`flex`,gap:2,height:20,marginTop:4},children:Array.from({length:12}).map((e,t)=>{let n=Math.round(c/100*12)>t,r=t>=10?p.red:t>=8?`#E8C030`:p.green;return(0,f.jsx)(`div`,{style:{flex:1,borderRadius:2,background:n?r:p.border,transition:`all .05s`}},t)})})]})]}),t&&(0,f.jsxs)(`div`,{className:`card-sm`,style:{background:`${p.red}15`,borderColor:p.red,textAlign:`center`,padding:20},children:[(0,f.jsx)(`div`,{style:{fontSize:40,marginBottom:8,animation:`pulse 1s ease-in-out infinite`},children:`🔴`}),(0,f.jsx)(`div`,{style:{fontSize:14,fontWeight:600,color:p.red},children:`Recording...`}),(0,f.jsx)(`div`,{className:`mono`,style:{fontSize:11,color:p.textDim,marginTop:4},children:`Saving to captures folder — tap Stop to finish`})]}),!t&&(0,f.jsx)(f.Fragment,{children:(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsxs)(`div`,{className:`section-label`,style:{marginBottom:6},children:[`Recordings (`,r.length,`)`]}),a?(0,f.jsx)(`div`,{className:`loader`,style:{margin:`10px auto`}}):r.length===0?(0,f.jsx)(`div`,{style:{fontSize:12,color:p.textDim,padding:`10px 0`},children:`No recordings yet. Tap ● Record to capture audio.`}):r.map(e=>(0,f.jsxs)(`div`,{className:`preset-row`,style:{padding:`8px 0`,borderRadius:0,borderBottom:`1px solid ${p.border}`},children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:13},children:e.name}),(0,f.jsx)(`div`,{className:`mono`,style:{fontSize:10,color:p.textDim},children:e.size_display})]}),(0,f.jsx)(`a`,{href:`/api/captures/${e.name}`,target:`_blank`,rel:`noopener`,className:`btn btn-ghost btn-sm`,style:{textDecoration:`none`},children:`▶ Play`})]},e.name))]})})]}),(0,f.jsx)(`style`,{children:`@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }`})]})}function le({onClose:e,state:t,connected:n}){let[r,i]=(0,l.useState)({}),[a,o]=(0,l.useState)(!0),[s,c]=(0,l.useState)(null),[u,d]=(0,l.useState)(``),[m,h]=(0,l.useState)(null),[g,_]=(0,l.useState)(!1),v=(0,l.useRef)(null),S=t?.current_snapshot??0,C=(0,l.useCallback)(async()=>{if(!n){o(!1);return}try{i((await y(`/api/snapshots`)).snapshots||{})}catch{}o(!1)},[n]);(0,l.useEffect)(()=>{C()},[C]);let te=e=>{v.current=setTimeout(()=>{v.current=null,E(e)},600)},w=e=>{v.current&&(clearTimeout(v.current),v.current=null,r[String(e)]?D(e):E(e))},T=()=>{v.current&&=(clearTimeout(v.current),null)},E=async e=>{try{await b(`/api/snapshots/${e}/save`),h(e),setTimeout(()=>h(null),800),await C()}catch{}},D=async e=>{try{await b(`/api/snapshots/${e}/recall`),await C()}catch{}},re=async e=>{if(u.trim())try{await x(`/api/snapshots/${e}`,{name:u.trim()}),c(null),await C()}catch{}},ie=async e=>{try{await ee(`/api/snapshots/${e}`),await C()}catch{}};return(0,f.jsxs)(ne,{onClose:e,children:[(0,f.jsxs)(`div`,{className:`screen-header`,style:{justifyContent:`space-between`},children:[(0,f.jsx)(`div`,{className:`screen-title`,children:`Snapshots`}),(0,f.jsx)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`},children:(0,f.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:4,fontSize:10,color:p.textDim,cursor:`pointer`},children:[(0,f.jsx)(`div`,{className:`switch ${g?`on`:``}`,style:{width:28,height:16},onClick:()=>_(e=>!e),children:(0,f.jsx)(`div`,{style:{position:`absolute`,top:1,left:g?11:1,width:13,height:13,borderRadius:`50%`,background:`#fff`,transition:`left .15s`}})}),`Discard Edits`]})})]}),(0,f.jsxs)(`div`,{className:`screen-body`,style:{gap:8},children:[(0,f.jsxs)(`div`,{style:{fontSize:11,color:p.textDim,marginBottom:4},children:[`Tap to recall · Hold to save`,g&&(0,f.jsx)(`span`,{style:{color:p.amber,marginLeft:8},children:`Edits will be discarded on recall`})]}),(0,f.jsx)(`div`,{className:`snap-grid`,children:[1,2,3,4,5,6,7,8].map(e=>{let t=r[String(e)],n=S===e,i=!!t,a=s===e,o=m===e;return(0,f.jsxs)(`div`,{className:`snap-slot ${i?`filled`:``} ${n?`active`:``}`,onMouseDown:()=>te(e),onTouchStart:()=>te(e),onMouseUp:()=>w(e),onTouchEnd:()=>w(e),onMouseLeave:T,onTouchCancel:T,style:o?{background:`rgba(58,184,122,.15)`}:{},children:[(0,f.jsx)(`div`,{className:`snap-num`,children:e}),a?(0,f.jsx)(`input`,{className:`snap-name-input`,value:u,onChange:e=>d(e.target.value),onBlur:()=>re(e),onKeyDown:t=>{t.key===`Enter`&&re(e),t.key===`Escape`&&c(null)},autoFocus:!0,onClick:e=>e.stopPropagation()}):t?(0,f.jsx)(`div`,{className:`snap-name`,onClick:n=>{n.stopPropagation(),c(e),d(t.name)},children:t.name}):(0,f.jsx)(`div`,{className:`snap-empty`,children:`Empty`}),o&&(0,f.jsx)(`div`,{className:`snap-save-indicator`}),n&&(0,f.jsx)(`div`,{style:{position:`absolute`,bottom:-2,left:`50%`,transform:`translateX(-50%)`,width:20,height:2,borderRadius:1,background:p.amber}})]},e)})}),S>0&&r[String(S)]&&(0,f.jsx)(`div`,{style:{marginTop:8,display:`flex`,gap:8},children:(0,f.jsxs)(`button`,{className:`btn btn-danger btn-sm`,style:{flex:1},onClick:()=>ie(S),children:[`Delete Snapshot `,S]})})]})]})}var ue=[{id:`rig`,label:`Rig`,icon:`🎛`},{id:`fx`,label:`FX Chain`,icon:`⛓`},{id:`models`,label:`Models`,icon:`📁`},{id:`irs`,label:`IRs`,icon:`🎚`},{id:`presets`,label:`Presets`,icon:`⭐`},{id:`settings`,label:`Settings`,icon:`⚙`},{id:`record`,label:`Looper`,icon:`🎙`}];function de(){let[e,t]=(0,l.useState)(`rig`),[n,r]=(0,l.useState)(!1),[i,a]=(0,l.useState)(()=>{try{return localStorage.getItem(`pedal_channel`)||`guitar`}catch{return`guitar`}}),{state:o,connected:s,refresh:c}=C();(0,l.useEffect)(()=>{document.title=`Pi Multi-FX Pedal`},[]),(0,l.useEffect)(()=>{try{localStorage.setItem(`pedal_channel`,i)}catch{}_(i)},[i]);let u=e=>{a(e)};return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`style`,{children:te}),(0,f.jsxs)(`div`,{style:{width:`100%`,maxWidth:440,margin:`0 auto`,height:`100dvh`,display:`flex`,flexDirection:`column`,background:p.bg,overflow:`hidden`,fontFamily:`'Inter', sans-serif`},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`4px 10px`,background:p.panel,borderBottom:`1px solid ${p.border}`,flexShrink:0},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,gap:6,alignItems:`center`},children:[(0,f.jsx)(`div`,{style:{width:6,height:6,borderRadius:`50%`,background:s?p.green:p.red,boxShadow:s?`0 0 6px ${p.green}`:`none`}}),o?.channel_mode===`stereo`?(0,f.jsx)(`span`,{className:`badge badge-amber`,style:{fontSize:9,padding:`2px 7px`,letterSpacing:`.08em`},children:`STEREO`}):(0,f.jsxs)(`div`,{className:`toggle`,style:{margin:0,height:22},children:[(0,f.jsx)(`button`,{className:`toggle-btn ${i===`guitar`?`active`:``}`,onClick:()=>u(`guitar`),style:{padding:`2px 8px`,fontSize:10,fontWeight:700,letterSpacing:`.1em`},children:`GUITAR`}),(0,f.jsx)(`button`,{className:`toggle-btn ${i===`bass`?`active`:``}`,onClick:()=>u(`bass`),style:{padding:`2px 8px`,fontSize:10,fontWeight:700,letterSpacing:`.1em`},children:`BASS`})]}),o?.tuner_enabled&&(0,f.jsx)(`span`,{className:`badge badge-amber`,style:{fontSize:8,padding:`1px 5px`},children:`TUNER`})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`},children:[(0,f.jsxs)(`button`,{className:`snap-header-btn ${n?`active`:``}`,onClick:()=>r(!0),title:`Snapshots`,children:[`📷`,o?.current_snapshot>0&&(0,f.jsx)(`span`,{className:`snap-header-num`,children:o.current_snapshot})]}),o?.cpu_percent!=null&&(0,f.jsxs)(`span`,{className:`mono`,style:{fontSize:9,color:p.textDim},children:[`CPU `,o.cpu_percent,`%`]}),o?.sample_rate&&(0,f.jsxs)(`span`,{className:`mono`,style:{fontSize:9,color:p.textDim},children:[o.sample_rate/1e3,`kHz`]}),o?.bypass&&(0,f.jsx)(`span`,{className:`badge badge-red`,style:{fontSize:8,padding:`1px 5px`},children:`BYP`}),o?.nam_loaded&&(0,f.jsx)(`span`,{className:`badge badge-blue`,style:{fontSize:8,padding:`1px 5px`},children:`NAM`}),o?.ir_loaded&&(0,f.jsx)(`span`,{className:`badge badge-green`,style:{fontSize:8,padding:`1px 5px`},children:`IR`})]})]}),(0,f.jsxs)(`div`,{style:{flex:1,overflow:`hidden`,display:`flex`,flexDirection:`column`},children:[e===`rig`&&(0,f.jsx)(re,{state:o,connected:s,refresh:c}),e===`fx`&&(0,f.jsx)(ae,{state:o,connected:s}),e===`models`&&(0,f.jsx)(oe,{state:o,connected:s,refresh:c}),e===`irs`&&(0,f.jsx)(se,{state:o,connected:s,refresh:c}),e===`presets`&&(0,f.jsx)(O,{state:o,connected:s,refresh:c}),e===`settings`&&(0,f.jsx)(k,{state:o,connected:s,refresh:c}),e===`record`&&(0,f.jsx)(ce,{state:o})]}),(0,f.jsx)(`div`,{className:`tabbar`,children:ue.map(n=>(0,f.jsxs)(`div`,{className:`tab ${e===n.id?`active`:``}`,onClick:()=>t(n.id),children:[(0,f.jsx)(`span`,{style:{fontSize:14,display:`block`},children:n.icon}),n.label]},n.id))}),n&&(0,f.jsx)(le,{onClose:()=>r(!1),state:o,connected:s})]})]})}(0,u.createRoot)(document.getElementById(`root`)).render((0,f.jsx)(l.StrictMode,{children:(0,f.jsx)(de,{})})); \ No newline at end of file diff --git a/src/web/ui-dist/assets/index-DI0gBBIR.css b/src/web/ui-dist/assets/index-DI0gBBIR.css new file mode 100644 index 0000000..019aafc --- /dev/null +++ b/src/web/ui-dist/assets/index-DI0gBBIR.css @@ -0,0 +1 @@ +*{box-sizing:border-box;margin:0;padding:0}html,body,#root{height:100%;overflow:hidden}body{color:#f0ede6;-webkit-font-smoothing:antialiased;background:#0a0a0c;font-family:Inter,sans-serif}.mono{font-family:JetBrains Mono,monospace}.badge{letter-spacing:.06em;text-transform:uppercase;border-radius:4px;justify-content:center;align-items:center;padding:2px 7px;font-size:10px;font-weight:700;display:inline-flex}.badge-amber{color:#e8a030;background:#e8a03033}.badge-green{color:#3ab87a;background:#3ab87a33}.badge-blue{color:#4a8bc8;background:#4a8bc833}.badge-red{color:#e06060;background:#e0606033}.btn{cursor:pointer;color:#f0ede6;touch-action:manipulation;background:#1c1c22;border:1px solid #2a2a32;border-radius:6px;justify-content:center;align-items:center;gap:6px;padding:8px 16px;font-size:12px;font-weight:600;transition:all .12s;display:inline-flex}.btn:active{transform:scale(.96)}.btn-sm{padding:5px 10px;font-size:10px}.btn-ghost{background:0 0;border-color:#0000}.btn-danger{color:#e06060;background:#e0606026;border-color:#e06060}.btn-icon{cursor:pointer;touch-action:manipulation;background:#1c1c22;border:1px solid #2a2a32;border-radius:5px;justify-content:center;align-items:center;width:28px;height:28px;transition:all .12s;display:inline-flex}.btn-icon:active{transform:scale(.92)}.slide-panel{z-index:100;background:#000000b3;justify-content:center;align-items:flex-end;display:flex;position:fixed;inset:0}.slide-panel-inner{background:#0a0a0c;border-radius:16px 16px 0 0;flex-direction:column;width:100%;max-width:440px;max-height:85vh;display:flex;overflow:hidden}.slide-panel-handle{background:#2a2a32;border-radius:2px;flex-shrink:0;width:36px;height:4px;margin:8px auto}.screen-header{border-bottom:1px solid #2a2a32;flex-shrink:0;justify-content:space-between;align-items:center;padding:12px 14px 8px;display:flex}.screen-title{letter-spacing:.06em;text-transform:uppercase;color:#8888a0;font-size:13px;font-weight:600}.screen-body{flex-direction:column;flex:1;gap:12px;padding:12px;display:flex;overflow-y:auto}.snap-grid{gap:6px;padding:4px 0;display:flex;overflow-x:auto}.snap-slot{cursor:pointer;text-align:center;touch-action:manipulation;background:#1c1c22;border:1.5px solid #2a2a32;border-radius:8px;flex-shrink:0;min-width:60px;padding:8px 4px;transition:all .12s;position:relative}.snap-slot:active{transform:scale(.95)}.snap-num{color:#8888a0;font-size:16px;font-weight:700}.snap-name{color:#f0ede6;word-break:break-all;margin-top:2px;font-size:9px;line-height:1.3}.snap-empty{color:#444458;margin-top:2px;font-size:9px;font-style:italic}.snap-save-indicator{background:#3ab87a;border-radius:50%;width:6px;height:6px;position:absolute;top:4px;right:4px;box-shadow:0 0 4px #3ab87a}.snap-name-input{color:#f0ede6;text-align:center;background:#0a0a0c;border:1px solid #2a2a32;border-radius:3px;outline:none;width:100%;margin-top:2px;padding:2px 4px;font-size:9px}.preset-row{cursor:pointer;border:1px solid #0000;border-radius:8px;align-items:center;gap:12px;padding:10px 12px;transition:background .12s;display:flex}.preset-row:active,.preset-row.active{background:#e8a03014;border-color:#e8a03040}.transport-btn{cursor:pointer;background:#1c1c22;border:2px solid #2a2a32;border-radius:50%;justify-content:center;align-items:center;width:44px;height:44px;font-size:16px;transition:all .12s;display:flex}.transport-btn:active{transform:scale(.92)}.transport-btn.rec{background:#e0606026;border-color:#e06060}.transport-btn.play{background:#3ab87a26;border-color:#3ab87a}.switch{cursor:pointer;background:#2a2a32;border-radius:11px;flex-shrink:0;width:40px;height:22px;transition:background .2s;position:relative}.switch.on{background:#3ab87a}.switch:after{content:"";background:#fff;border-radius:50%;width:18px;height:18px;transition:transform .15s;position:absolute;top:2px;left:2px}.switch.on:after{transform:translate(18px)}.search-bar{background:#1c1c22;border:1px solid #2a2a32;border-radius:7px;align-items:center;gap:8px;padding:8px 12px;display:flex}.search-bar input{color:#f0ede6;background:0 0;border:none;outline:none;flex:1;font-size:13px}.search-bar input::placeholder{color:#444458}.file-drop{text-align:center;cursor:pointer;color:#444458;border:2px dashed #2a2a32;border-radius:8px;padding:20px;font-size:13px;transition:all .15s}.file-drop:hover,.file-drop.dragover{color:#e8a030;border-color:#e8a030}.loader{border:2px solid #2a2a32;border-top-color:#e8a030;border-radius:50%;width:20px;height:20px;animation:.6s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.setting-row{border-bottom:1px solid #2a2a32;justify-content:space-between;align-items:center;padding:10px 0;display:flex}.setting-label{color:#f0ede6;font-size:13px}.setting-desc{color:#444458;margin-top:2px;font-size:11px}.section-label{letter-spacing:.1em;text-transform:uppercase;color:#444458;margin-bottom:10px;font-size:10px;font-weight:600}.nam-chip{color:#4a8bc8;background:#4a8bc826;border:1px solid #4a8bc859;border-radius:5px;align-items:center;gap:6px;padding:5px 10px;font-family:JetBrains Mono,monospace;font-size:11px;display:inline-flex}.bypass-led{border-radius:50%;flex-shrink:0;width:8px;height:8px}.led-on{background:#3ab87a;box-shadow:0 0 8px #3ab87a}.led-off{background:#444458}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:0s!important;animation-duration:0s!important;animation-iteration-count:1!important}} diff --git a/src/web/ui-dist/assets/index-LMuhdreF.js b/src/web/ui-dist/assets/index-LMuhdreF.js new file mode 100644 index 0000000..d985152 --- /dev/null +++ b/src/web/ui-dist/assets/index-LMuhdreF.js @@ -0,0 +1,97 @@ +var e=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports);(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let 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 n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var t=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var ee=Array.isArray;function S(){}var C={H:null,A:null,T:null,S:null},te=Object.prototype.hasOwnProperty;function ne(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function w(e,t){return ne(e.type,t,e.props)}function T(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function re(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ie=/\/+/g;function E(e,t){return typeof e==`object`&&e&&e.key!=null?re(``+e.key):t.toString(36)}function ae(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(S,S):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function oe(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,oe(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+E(e,0):a,ee(o)?(i=``,c!=null&&(i=c.replace(ie,`$&/`)+`/`),oe(o,r,i,``,function(e){return e})):o!=null&&(T(o)&&(o=w(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ie,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(ee(e))for(var u=0;u{n.exports=t()})),r=e((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,ee||(ee=!0,T());else{var t=n(l);t!==null&&E(x,t.startTime-e)}}var ee=!1,S=-1,C=5,te=-1;function ne(){return g?!0:!(e.unstable_now()-tet&&ne());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&E(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?T():ee=!1}}}var T;if(typeof y==`function`)T=function(){y(w)};else if(typeof MessageChannel<`u`){var re=new MessageChannel,ie=re.port2;re.port1.onmessage=w,T=function(){ie.postMessage(null)}}else T=function(){_(w,0)};function E(t,n){S=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(S),S=-1):h=!0,E(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,ee||(ee=!0,T()))),r},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),i=e(((e,t)=>{t.exports=r()})),a=e((e=>{var t=n();function r(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=a()})),s=e((e=>{var t=i(),r=n(),a=o();function s(e){var t=`https://react.dev/errors/`+e;if(1de||(e.current=ue[de],ue[de]=null,de--)}function k(e,t){de++,ue[de]=e.current,e.current=t}var me=fe(null),he=fe(null),ge=fe(null),A=fe(null);function _e(e,t){switch(k(ge,t),k(he,e),k(me,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}pe(me),k(me,e)}function ve(){pe(me),pe(he),pe(ge)}function ye(e){e.memoizedState!==null&&k(A,e);var t=me.current,n=Hd(t,e.type);t!==n&&(k(he,e),k(me,n))}function be(e){he.current===e&&(pe(me),pe(he)),A.current===e&&(pe(A),Qf._currentValue=le)}var xe,Se;function Ce(e){if(xe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);xe=t&&t[1]||``,Se=-1)`:-1i||c[r]!==l[i]){var u=` +`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{we=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ce(n):``}function Ee(e,t){switch(e.tag){case 26:case 27:case 5:return Ce(e.type);case 16:return Ce(`Lazy`);case 13:return e.child!==t&&t!==null?Ce(`Suspense Fallback`):Ce(`Suspense`);case 19:return Ce(`SuspenseList`);case 0:case 15:return Te(e.type,!1);case 11:return Te(e.type.render,!1);case 1:return Te(e.type,!0);case 31:return Ce(`Activity`);default:return``}}function De(e){try{var t=``,n=null;do t+=Ee(e,n),n=e,e=e.return;while(e);return t}catch(e){return` +Error generating stack: `+e.message+` +`+e.stack}}var Oe=Object.prototype.hasOwnProperty,j=t.unstable_scheduleCallback,ke=t.unstable_cancelCallback,Ae=t.unstable_shouldYield,M=t.unstable_requestPaint,je=t.unstable_now,Me=t.unstable_getCurrentPriorityLevel,Ne=t.unstable_ImmediatePriority,Pe=t.unstable_UserBlockingPriority,Fe=t.unstable_NormalPriority,Ie=t.unstable_LowPriority,Le=t.unstable_IdlePriority,Re=t.log,N=t.unstable_setDisableYieldValue,ze=null,Be=null;function Ve(e){if(typeof Re==`function`&&N(e),Be&&typeof Be.setStrictMode==`function`)try{Be.setStrictMode(ze,e)}catch{}}var He=Math.clz32?Math.clz32:F,Ue=Math.log,P=Math.LN2;function F(e){return e>>>=0,e===0?32:31-(Ue(e)/P|0)|0}var I=256,We=262144,Ge=4194304;function Ke(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function qe(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ke(n))):i=Ke(o):i=Ke(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ke(n))):i=Ke(o)):i=Ke(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Je(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ye(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Xe(){var e=Ge;return Ge<<=1,!(Ge&62914560)&&(Ge=4194304),e}function Ze(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Qe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function $e(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),fn=!1;if(dn)try{var pn={};Object.defineProperty(pn,"passive",{get:function(){fn=!0}}),window.addEventListener(`test`,pn,pn),window.removeEventListener(`test`,pn,pn)}catch{fn=!1}var mn=null,hn=null,gn=null;function _n(){if(gn)return gn;var e,t=hn,n=t.length,r,i=`value`in mn?mn.value:mn.textContent,a=i.length;for(e=0;e=Yn),Qn=` `,$n=!1;function er(e,t){switch(e){case`keyup`:return qn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function tr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var nr=!1;function rr(e,t){switch(e){case`compositionend`:return tr(t);case`keypress`:return t.which===32?($n=!0,Qn):null;case`textInput`:return e=t.data,e===Qn&&$n?null:e;default:return null}}function ir(e,t){if(nr)return e===`compositionend`||!Jn&&er(e,t)?(e=_n(),gn=hn=mn=null,nr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Er(n)}}function Or(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Or(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function kr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Rt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Rt(e.document)}return t}function Ar(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var jr=dn&&`documentMode`in document&&11>=document.documentMode,Mr=null,Nr=null,Pr=null,Fr=!1;function Ir(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Fr||Mr==null||Mr!==Rt(r)||(r=Mr,`selectionStart`in r&&Ar(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Pr&&Tr(Pr,r)||(Pr=r,r=Ed(Nr,`onSelect`),0>=o,i-=o,Oi=1<<32-He(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),o=a(_,o,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),R&&Ai(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),o=a(y,o,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),R&&Ai(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(o=a(v,o,g),d===null?u=v:d.sibling=v,d=v);return R&&Ai(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),o=a(v,o,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),R&&Ai(i,g),u}function b(e,r,a,c){if(typeof a==`object`&&a&&a.type===y&&a.key===null&&(a=a.props.children),typeof a==`object`&&a){switch(a.$$typeof){case _:a:{for(var l=a.key;r!==null;){if(r.key===l){if(l=a.type,l===y){if(r.tag===7){n(e,r.sibling),c=i(r,a.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===T&&ka(l)===r.type){n(e,r.sibling),c=i(r,a.props),Ia(c,a),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}a.type===y?(c=hi(a.props.children,e.mode,c,a.key),c.return=e,e=c):(c=mi(a.type,a.key,a.props,null,e.mode,c),Ia(c,a),c.return=e,e=c)}return o(e);case v:a:{for(l=a.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),c=i(r,a.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=vi(a,e.mode,c),c.return=e,e=c}return o(e);case T:return a=ka(a),b(e,r,a,c)}if(ce(a))return h(e,r,a,c);if(ae(a)){if(l=ae(a),typeof l!=`function`)throw Error(s(150));return a=l.call(a),g(e,r,a,c)}if(typeof a.then==`function`)return b(e,r,Fa(a),c);if(a.$$typeof===S)return b(e,r,ra(e,a),c);La(e,a)}return typeof a==`string`&&a!==``||typeof a==`number`||typeof a==`bigint`?(a=``+a,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,a),c.return=e,e=c):(n(e,r),c=gi(a,e.mode,c),c.return=e,e=c),o(e)):n(e,r)}return function(e,t,n,r){try{Pa=0;var i=b(e,t,n,r);return Na=null,i}catch(t){if(t===Ca||t===Ta)throw t;var a=ui(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var za=Ra(!0),Ba=Ra(!1),Va=!1;function Ha(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ua(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Wa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ga(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,G&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=si(e),oi(e,null,n),t}return ri(e,r,t,n),si(e)}function Ka(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,tt(e,n)}}function qa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ja=!1;function Ya(){if(Ja){var e=ma;if(e!==null)throw e}}function Xa(e,t,n,r){Ja=!1;var i=e.updateQueue;Va=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(J&f)===f:(r&f)===f){f!==0&&f===pa&&(Ja=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Va=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Gl|=o,e.lanes=o,e.memoizedState=d}}function Za(e,t){if(typeof e!=`function`)throw Error(s(191,e));e.call(t)}function Qa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=D.T,s={};D.T=s,Fs(e,!1,t,n);try{var c=i(),l=D.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ps(e,t,_a(c,r),pu(e)):Ps(e,t,r,pu(e))}catch(n){Ps(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{O.p=a,o!==null&&s.types!==null&&(o.types=s.types),D.T=o}}function ws(){}function Ts(e,t,n,r){if(e.tag!==5)throw Error(s(476));var i=Es(e).queue;Cs(e,i,t,le,n===null?ws:function(){return Ds(e),n(r)})}function Es(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:le,baseState:le,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:le},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ds(e){var t=Es(e);t.next===null&&(t=e.alternate.memoizedState),Ps(e,t.next.queue,{},pu())}function Os(){return na(Qf)}function ks(){return jo().memoizedState}function As(){return jo().memoizedState}function js(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Wa(n);var r=Ga(t,e,n);r!==null&&(hu(r,t,n),Ka(r,t,n)),t={cache:la()},e.payload=t;return}t=t.return}}function Ms(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Is(e)?Ls(t,n):(n=ii(e,t,n,r),n!==null&&(hu(n,e,r),Rs(n,t,r)))}function Ns(e,t,n){Ps(e,t,n,pu())}function Ps(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Is(e))Ls(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,wr(s,o))return ri(e,t,i,0),K===null&&ni(),!1}catch{}if(n=ii(e,t,i,r),n!==null)return hu(n,e,r),Rs(n,t,r),!0}return!1}function Fs(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Is(e)){if(t)throw Error(s(479))}else t=ii(e,n,r,2),t!==null&&hu(t,e,2)}function Is(e){var t=e.alternate;return e===B||t!==null&&t===B}function Ls(e,t){go=ho=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Rs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,tt(e,n)}}var zs={readContext:na,use:Po,useCallback:H,useContext:H,useEffect:H,useImperativeHandle:H,useLayoutEffect:H,useInsertionEffect:H,useMemo:H,useReducer:H,useRef:H,useState:H,useDebugValue:H,useDeferredValue:H,useTransition:H,useSyncExternalStore:H,useId:H,useHostTransitionStatus:H,useFormState:H,useActionState:H,useOptimistic:H,useMemoCache:H,useCacheRefresh:H};zs.useEffectEvent=H;var Bs={readContext:na,use:Po,useCallback:function(e,t){return Ao().memoizedState=[e,t===void 0?null:t],e},useContext:na,useEffect:us,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),cs(4194308,4,gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return cs(4194308,4,e,t)},useInsertionEffect:function(e,t){cs(4,2,e,t)},useMemo:function(e,t){var n=Ao();t=t===void 0?null:t;var r=e();if(_o){Ve(!0);try{e()}finally{Ve(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Ao();if(n!==void 0){var i=n(t);if(_o){Ve(!0);try{n(t)}finally{Ve(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ms.bind(null,B,e),[r.memoizedState,e]},useRef:function(e){var t=Ao();return e={current:e},t.memoizedState=e},useState:function(e){e=Ko(e);var t=e.queue,n=Ns.bind(null,B,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:vs,useDeferredValue:function(e,t){return xs(Ao(),e,t)},useTransition:function(){var e=Ko(!1);return e=Cs.bind(null,B,e.queue,!0,!1),Ao().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=B,i=Ao();if(R){if(n===void 0)throw Error(s(407));n=n()}else{if(n=t(),K===null)throw Error(s(349));J&127||Vo(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,us(Uo.bind(null,r,a,e),[e]),r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,a,n,t),null),n},useId:function(){var e=Ao(),t=K.identifierPrefix;if(R){var n=ki,r=Oi;n=(r&~(1<<32-He(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=vo++,0<\/script>`,a=a.removeChild(a.firstChild);break;case`select`:a=typeof r.is==`string`?o.createElement(`select`,{is:r.is}):o.createElement(`select`),r.multiple?a.multiple=!0:r.size&&(a.size=r.size);break;default:a=typeof r.is==`string`?o.createElement(i,{is:r.is}):o.createElement(i)}}a[ct]=t,a[lt]=r;a:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)a.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break a;for(;o.sibling===null;){if(o.return===null||o.return===t)break a;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=a;a:switch(Pd(a,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Pc(t)}}return U(t),Fc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Pc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(s(166));if(e=ge.current,Hi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=Fi,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[ct]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||zi(t,!0)}else e=Bd(e).createTextNode(r),e[ct]=t,t.stateNode=e}return U(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Hi(t),n!==null){if(e===null){if(!r)throw Error(s(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(s(557));e[ct]=t}else Ui(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;U(t),e=!1}else n=Wi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(uo(t),t):(uo(t),null);if(t.flags&128)throw Error(s(558))}return U(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Hi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(s(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(s(317));i[ct]=t}else Ui(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;U(t),i=!1}else i=Wi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(uo(t),t):(uo(t),null)}return uo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),a=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),a!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Lc(t,t.updateQueue),U(t),null);case 4:return ve(),e===null&&Sd(t.stateNode.containerInfo),U(t),null;case 10:return Xi(t.type),U(t),null;case 19:if(pe(z),r=t.memoizedState,r===null)return U(t),null;if(i=(t.flags&128)!=0,a=r.rendering,a===null)if(i)Rc(r,!1);else{if(X!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=fo(e),a!==null){for(t.flags|=128,Rc(r,!1),e=a.updateQueue,t.updateQueue=e,Lc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)pi(n,e),n=n.sibling;return k(z,z.current&1|2),R&&Ai(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&je()>tu&&(t.flags|=128,i=!0,Rc(r,!1),t.lanes=4194304)}else{if(!i)if(e=fo(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Lc(t,e),Rc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!a.alternate&&!R)return U(t),null}else 2*je()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,i=!0,Rc(r,!1),t.lanes=4194304);r.isBackwards?(a.sibling=t.child,t.child=a):(e=r.last,e===null?t.child=a:e.sibling=a,r.last=a)}return r.tail===null?(U(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=je(),e.sibling=null,n=z.current,k(z,i?n&1|2:n&1),R&&Ai(t,r.treeForkCount),e);case 22:case 23:return uo(t),ro(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(U(t),t.subtreeFlags&6&&(t.flags|=8192)):U(t),n=t.updateQueue,n!==null&&Lc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&pe(ya),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Xi(ca),U(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function Bc(e,t){switch(Ni(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xi(ca),ve(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return be(t),null;case 31:if(t.memoizedState!==null){if(uo(t),t.alternate===null)throw Error(s(340));Ui()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(uo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));Ui()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return pe(z),null;case 4:return ve(),null;case 10:return Xi(t.type),null;case 22:case 23:return uo(t),ro(),e!==null&&pe(ya),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Xi(ca),null;case 25:return null;default:return null}}function Vc(e,t){switch(Ni(t),t.tag){case 3:Xi(ca),ve();break;case 26:case 27:case 5:be(t);break;case 4:ve();break;case 31:t.memoizedState!==null&&uo(t);break;case 13:uo(t);break;case 19:pe(z);break;case 10:Xi(t.type);break;case 22:case 23:uo(t),ro(),e!==null&&pe(ya);break;case 24:Xi(ca)}}function Hc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Uc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Wc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Qa(t,n)}catch(t){Z(e,e.return,t)}}}function Gc(e,t,n){n.props=qs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Kc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function qc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}function Jc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function Yc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[lt]=t}catch(t){Z(e,e.return,t)}}function Xc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Zc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Xc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=tn));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[ct]=e,t[lt]=n}catch(t){Z(e,e.return,t)}}var tl=!1,nl=!1,rl=!1,il=typeof WeakSet==`function`?WeakSet:Set,al=null;function ol(e,t){if(e=e.containerInfo,Rd=sp,e=kr(e),Ar(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break a}var o=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=o+i),f!==a||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=o),p===a&&++d===r&&(l=o),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,al=t;al!==null;)if(t=al,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,al=e;else for(;al!==null;){switch(t=al,a=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Pd(a,r,n),a[ct]=e,xt(a),r=a;break a;case`link`:var o=Vf(`link`,`href`,i).get(r+(n.href||``));if(o){for(var c=0;cg&&(o=g,g=h,h=o);var _=Dr(s,h),v=Dr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,D.T=null,n=lu,lu=null;var a=au,o=su;if(iu=0,ou=au=null,su=0,G&6)throw Error(s(331));var c=G;if(G|=4,Fl(a.current),Dl(a,a.current,o,n),G=c,id(0,!1),Be&&typeof Be.onPostCommitFiberRoot==`function`)try{Be.onPostCommitFiberRoot(ze,a)}catch{}return!0}finally{O.p=i,D.T=r,Vu(e,t)}}function Wu(e,t,n){t=bi(n,t),t=$s(e.stateNode,t,2),e=Ga(e,t,2),e!==null&&(Qe(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=bi(n,e),n=ec(2),r=Ga(t,n,2),r!==null&&(tc(n,r,t,e),Qe(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Ul=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,K===e&&(J&n)===n&&(X===4||X===3&&(J&62914560)===J&&300>je()-$l?!(G&2)&&Su(e,0):ql|=n,Yl===J&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=Xe()),e=ai(e,t),e!==null&&(Qe(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(s(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return j(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-He(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=J,a=qe(r,r===K?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Je(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=je(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}iu!==0&&iu!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Bt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),xt(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Bt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Bt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Bt(n.imageSizes)+`"]`)):i+=`[href="`+Bt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),xt(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Bt(r)+`"][href="`+Bt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),xt(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=bt(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);xt(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=bt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),xt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=bt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),xt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var i=(i=ge.current)?gf(i):null;if(!i)throw Error(s(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=bt(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var a=bt(i).hoistableStyles,o=a.get(e);if(o||(i=i.ownerDocument||i,o={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},a.set(e,o),(a=i.querySelector(jf(e)))&&!a._p&&(o.instance=a,o.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),a||Nf(i,e,n,o.state))),t&&r===null)throw Error(s(528,``));return o}if(t&&r!==null)throw Error(s(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=bt(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(s(444,e))}}function Af(e){return`href="`+Bt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),xt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Bt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Bt(n.href)+`"]`);if(r)return t.instance=r,xt(r),r;var i=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),xt(r),Pd(r,`style`,i),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Af(n.href);var a=e.querySelector(jf(i));if(a)return t.state.loading|=4,t.instance=a,xt(a),a;r=Mf(n),(i=mf.get(i))&&Rf(r,i),a=(e.ownerDocument||e).createElement(`link`),xt(a);var o=a;return o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),t.state.loading|=4,Lf(a,n.precedence,e),t.instance=a;case`script`:return a=Pf(n.src),(i=e.querySelector(Ff(a)))?(t.instance=i,xt(i),i):(r=n,(i=mf.get(a))&&(r=h({},n),zf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),xt(i),Pd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(s(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,xt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),xt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=s()})),l=n(),u=c(),d=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),f=e(((e,t)=>{t.exports=d()}))(),p={bg:`#0A0A0C`,panel:`#141418`,surface:`#1C1C22`,border:`#2A2A32`,amber:`#E8A030`,amberDim:`#7A5218`,blue:`#4A8BC8`,blueDim:`#1E4060`,green:`#3AB87A`,red:`#E06060`,textPrimary:`#F0EDE6`,textSec:`#A0A0BC`,textDim:`#7878A0`},m={y:{label:`Y`,desc:`Split evenly`,icon:`⬡`},ab:{label:`A/B`,desc:`Route all to A or B`,icon:`⇄`},cascade:{label:`Cascade`,desc:`A feeds into B`,icon:`⇢`},a_to_b:{label:`A→B`,desc:`Serial path extension`,icon:`↷`}},h={od:p.amber,overdrive:p.amber,drive:p.amber,dist:p.red,distortion:p.red,fuzz:`#D060E0`,mod:p.blue,chorus:p.blue,flange:p.blue,phaser:p.blue,tremolo:p.blue,vibrato:p.blue,rotary:p.blue,delay:`#60A0E0`,echo:`#60A0E0`,reverb:`#60C0D0`,pitch:`#A060E0`,comp:p.green,compressor:p.green,gate:p.green,filter:`#D0A060`,wah:`#D0A060`,eq:`#80A0B0`,ir:p.green,cab:p.green,nam:`#E0A040`,volume:p.textSec,boost:p.amber,split:`#B080C0`,merge:`#80B0C0`},g={od:`fx_distortion`,overdrive:`fx_distortion`,drive:`fx_distortion`,dist:`fx_distortion`,distortion:`fx_distortion`,gain:`fx_distortion`,fuzz:`fx_distortion`,delay:`fx_delay`,echo:`fx_delay`,reverb:`fx_reverb`,chorus:`fx_chorus`,flange:`fx_flanger`,flanger:`fx_flanger`,phaser:`fx_phaser`,tremolo:`fx_modulator`,vibrato:`fx_modulator`,rotary:`fx_modulator`,modulator:`fx_modulator`,pitch:`fx_pitch`,harmonizer:`fx_pitch`,shifter:`fx_pitch`,comp:`fx_compressor`,compressor:`fx_compressor`,limiter:`fx_limiter`,gate:`fx_gate`,noise_gate:`fx_gate`,filter:`fx_filter`,wah:`fx_filter`,eq:`fx_eq`,graphic_eq:`fx_eq`,parametric_eq:`fx_parametric_eq`,multiband_eq:`fx_multiband_eq`,ir:`fx_spatial`,cab:`fx_spatial`,cabinet:`fx_spatial`,nam:`fx_simulator`,capture:`fx_simulator`,amp:`fx_amplifier`,amplifier:`fx_amplifier`,volume:`fx_constant`,level:`fx_constant`,boost:`fx_constant`,split:`fx_split_a`,merge:`fx_mixer`,tuner:`fx_analyzer`,mixer:`fx_mixer`,utility:`fx_utility`,plugin:`fx_plugin`,instrument:`fx_instrument`,reamp:`fx_converter`,looper:`fx_oscillator`},_=`/ui/img/`;function v({type:e,size:t=14,style:n={}}){let r=(e||``).toLowerCase().trim(),i=`fx_plugin`,a=!1;for(let[e,t]of Object.entries(g))if(r===e||r.startsWith(e)||r.includes(e)){i=t,a=!0;break}if(!a&&r){let e=r.replace(/[^a-z0-9]+/g,`_`).replace(/^_|_$/g,``);g[e]&&(i=g[e])}return(0,f.jsx)(`img`,{src:`${_}${i}.svg`,alt:e||`fx`,style:{width:t,height:t,flexShrink:0,filter:`none`,objectFit:`contain`,...n},onError:e=>{e.target.style.display=`none`}})}function y(e){let t=(e||``).toLowerCase().trim();for(let[e,n]of Object.entries(h))if(t===e||t.startsWith(e)||t.includes(e))return n;return p.amber}function b({color:e=p.border,narrow:t=!1}){let n=t?14:18;return(0,f.jsxs)(`svg`,{width:n,height:`24`,viewBox:`0 0 ${n} 24`,fill:`none`,style:{flexShrink:0},children:[(0,f.jsx)(`line`,{x1:`0`,y1:`12`,x2:n-6,y2:`12`,stroke:e,strokeWidth:`2`,strokeLinecap:`round`}),(0,f.jsx)(`polyline`,{points:`${n-10},7 ${n-4},12 ${n-10},17`,fill:`none`,stroke:e,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function x({label:e,isLeft:t}){return(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,flexShrink:0,flexDirection:t?`row`:`row-reverse`},children:[!t&&(0,f.jsx)(b,{}),(0,f.jsx)(`div`,{style:{padding:`7px 12px`,borderRadius:6,fontSize:10,fontWeight:700,letterSpacing:`.12em`,background:p.blueDim,color:p.blue,border:`1px solid ${p.blue}60`,textTransform:`uppercase`,whiteSpace:`nowrap`},children:e}),t&&(0,f.jsx)(b,{})]})}function ee({block:e,selected:t,onSelect:n,onToggle:r,onModelBrowser:i}){let a=e.params||{},o=a.splitType||`y`,s=m[o]||m.y,c=!e.bypassed,u=y(`split`),d=(0,l.useRef)(null),h=(0,l.useCallback)(()=>{d.current=setTimeout(()=>{d.current=null,i?.(e.id)},500)},[e.id,i]),g=(0,l.useCallback)(()=>{d.current&&=(clearTimeout(d.current),null)},[]);return(0,f.jsxs)(`div`,{draggable:!0,onClick:()=>n(e.id),onTouchStart:h,onTouchEnd:g,onTouchMove:g,onMouseDown:g,onMouseUp:g,style:{minWidth:130,width:130,height:76,borderRadius:8,background:`linear-gradient(135deg, ${p.panel}, #1A1520)`,border:`2px solid ${t?p.amber:u}60`,opacity:c?1:.35,cursor:`pointer`,display:`flex`,flexDirection:`column`,position:`relative`,overflow:`hidden`,transition:`all .15s ease`,flexShrink:0,boxShadow:t?`0 0 16px ${p.amber}44, inset 0 0 0 1px ${p.amber}22`:`none`,transform:t?`scale(1.05)`:`scale(1)`},children:[(0,f.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,height:3,background:`linear-gradient(90deg, #B080C0, #80B0C0)`}}),(0,f.jsx)(`div`,{onClick:t=>{t.stopPropagation(),r(e.id)},style:{position:`absolute`,top:6,right:6,width:10,height:10,borderRadius:`50%`,background:c?p.green:p.textDim,boxShadow:c?`0 0 8px ${p.green}`:`none`,transition:`all .15s`,cursor:`pointer`,zIndex:2,border:`1px solid ${c?`${p.green}88`:p.border}`}}),(0,f.jsxs)(`div`,{style:{flex:1,padding:`14px 10px 6px`,display:`flex`,flexDirection:`column`,justifyContent:`center`},children:[(0,f.jsxs)(`div`,{style:{fontSize:12,fontWeight:700,color:u,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,lineHeight:1.3,display:`flex`,alignItems:`center`,gap:6},children:[(0,f.jsx)(v,{type:`split`,size:16}),(0,f.jsxs)(`span`,{children:[`SPLIT `,s.label]})]}),(0,f.jsx)(`div`,{style:{fontSize:9,color:p.textSec,marginTop:2},children:s.desc})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,borderTop:`1px solid ${p.border}44`},children:[(0,f.jsxs)(`div`,{style:{flex:1,fontSize:8,fontWeight:700,textAlign:`center`,padding:`1px 0`,color:`#B080C0`,letterSpacing:`.1em`,borderRight:`1px solid ${p.border}44`},children:[`A `,o===`ab`&&(a.activePath===`B`?`—`:`✓`)]}),(0,f.jsxs)(`div`,{style:{flex:1,fontSize:8,fontWeight:700,textAlign:`center`,padding:`1px 0`,color:`#80B0C0`,letterSpacing:`.1em`},children:[`B `,o===`ab`&&a.activePath===`B`?`✓`:`—`]})]})]})}function S({block:e,selected:t,onSelect:n,onToggle:r,onModelBrowser:i}){let a=e.params||{},o=!e.bypassed,s=(0,l.useRef)(null),c=(0,l.useCallback)(()=>{s.current=setTimeout(()=>{s.current=null,i?.(e.id)},500)},[e.id,i]),u=(0,l.useCallback)(()=>{s.current&&=(clearTimeout(s.current),null)},[]);return(0,f.jsxs)(`div`,{draggable:!0,onClick:()=>n(e.id),onTouchStart:c,onTouchEnd:u,onTouchMove:u,onMouseDown:u,onMouseUp:u,style:{minWidth:130,width:130,height:76,borderRadius:8,background:`linear-gradient(135deg, #15201A, ${p.panel})`,border:`2px solid ${t?p.amber:`#80B0C0`}60`,opacity:o?1:.35,cursor:`pointer`,display:`flex`,flexDirection:`column`,position:`relative`,overflow:`hidden`,transition:`all .15s ease`,flexShrink:0,boxShadow:t?`0 0 16px ${p.amber}44, inset 0 0 0 1px ${p.amber}22`:`none`,transform:t?`scale(1.05)`:`scale(1)`},children:[(0,f.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,height:3,background:`linear-gradient(90deg, #80B0C0, #60A080)`}}),(0,f.jsx)(`div`,{onClick:t=>{t.stopPropagation(),r(e.id)},style:{position:`absolute`,top:6,right:6,width:10,height:10,borderRadius:`50%`,background:o?p.green:p.textDim,boxShadow:o?`0 0 8px ${p.green}`:`none`,transition:`all .15s`,cursor:`pointer`,zIndex:2,border:`1px solid ${o?`${p.green}88`:p.border}`}}),(0,f.jsxs)(`div`,{style:{flex:1,padding:`14px 10px 6px`,display:`flex`,flexDirection:`column`,justifyContent:`center`},children:[(0,f.jsxs)(`div`,{style:{fontSize:12,fontWeight:700,color:`#80B0C0`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,lineHeight:1.3,display:`flex`,alignItems:`center`,gap:6},children:[(0,f.jsx)(v,{type:`merge`,size:16}),(0,f.jsx)(`span`,{children:`MERGE`})]}),(0,f.jsxs)(`div`,{style:{fontSize:9,color:p.textSec,marginTop:2},children:[`Blend `,a.blend??100,`%`]})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,borderTop:`1px solid ${p.border}44`},children:[(0,f.jsxs)(`div`,{style:{flex:1,fontSize:8,fontWeight:700,textAlign:`center`,padding:`1px 0`,color:`#B080C0`,letterSpacing:`.1em`,borderRight:`1px solid ${p.border}44`},children:[`Lv `,a.levelA??100]}),(0,f.jsxs)(`div`,{style:{flex:1,fontSize:8,fontWeight:700,textAlign:`center`,padding:`1px 0`,color:`#80B0C0`,letterSpacing:`.1em`},children:[`Lv `,a.levelB??100]})]})]})}function C({block:e,selected:t,onSelect:n,onToggle:r,pathLabel:i,onModelBrowser:a}){let o=y(e.type),s=!e.bypassed,c=(0,l.useRef)(null),u=(0,l.useCallback)(()=>{c.current=setTimeout(()=>{c.current=null,a?.(e.id)},500)},[e.id,a]),d=(0,l.useCallback)(()=>{c.current&&=(clearTimeout(c.current),null)},[]);return(0,f.jsxs)(`div`,{draggable:!0,onClick:()=>n(e.id),onTouchStart:u,onTouchEnd:d,onTouchMove:d,onMouseDown:d,onMouseUp:d,style:{minWidth:120,width:120,height:76,borderRadius:8,background:i===`B`?`#1A1820`:p.panel,border:`2px solid ${t?p.amber:p.border}`,opacity:s?1:.35,cursor:`pointer`,display:`flex`,flexDirection:`column`,position:`relative`,overflow:`hidden`,transition:`all .15s ease`,flexShrink:0,boxShadow:t?`0 0 16px ${p.amber}44, inset 0 0 0 1px ${p.amber}22`:i===`B`?`inset 0 0 0 1px rgba(128,176,192,0.15)`:`none`,transform:t?`scale(1.05)`:`scale(1)`},children:[(0,f.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,height:3,background:o,boxShadow:s?`0 0 6px ${o}`:`none`}}),(0,f.jsx)(`div`,{style:{position:`absolute`,top:5,left:5,fontSize:9,color:p.textDim,letterSpacing:1.5,lineHeight:1,cursor:`grab`,opacity:.5},children:`⋮⋮`}),(0,f.jsx)(`div`,{onClick:t=>{t.stopPropagation(),r(e.id)},style:{position:`absolute`,top:6,right:6,width:10,height:10,borderRadius:`50%`,background:s?p.green:p.textDim,boxShadow:s?`0 0 8px ${p.green}`:`none`,transition:`all .15s`,cursor:`pointer`,zIndex:2,border:`1px solid ${s?`${p.green}88`:p.border}`},title:s?`Active — tap to bypass`:`Bypassed — tap to enable`}),(0,f.jsxs)(`div`,{style:{flex:1,padding:`14px 10px 6px`,display:`flex`,flexDirection:`column`,justifyContent:`center`},children:[i&&(0,f.jsx)(`div`,{style:{position:`absolute`,top:5,right:20,fontSize:7,fontWeight:700,color:i===`A`?`#B080C0`:`#80B0C0`,letterSpacing:`.08em`,background:`${p.bg}88`,padding:`0 4px`,borderRadius:2,lineHeight:1.4},children:i===`A`?`A`:`B`}),(0,f.jsx)(`div`,{style:{fontSize:12,fontWeight:600,color:p.textPrimary,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,lineHeight:1.3,paddingRight:16},children:e.name||e.type||`FX`}),(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:5,marginTop:3},children:[(0,f.jsx)(v,{type:e.type,size:14}),(0,f.jsx)(`span`,{style:{fontSize:9,fontWeight:700,color:o,letterSpacing:`.08em`,textTransform:`uppercase`,background:`${o}18`,padding:`1px 5px`,borderRadius:3},children:(e.type||`fx`).replace(/_/g,` `).toUpperCase()})]})]})]})}function te(e){let t=e.findIndex(e=>e.type===`split`),n=e.findIndex(e=>e.type===`merge`);if(t===-1||n===-1)return{type:`serial`,blocks:e};let r=e.slice(0,t),i=e[t],a=e.slice(t+1,n),o=e[n],s=e.slice(n+1),c=a.filter(e=>!e.path||e.path===`A`),l=a.filter(e=>e.path===`B`);return{type:`parallel`,beforeSplit:r,splitBlock:i,pathABlocks:c,pathBBlocks:l,mergeBlock:o,afterMerge:s,parallelBlockCount:Math.max(c.length,l.length)}}function ne({blocks:e,selectedBlockId:t,onSelectBlock:n,onToggleBlock:r,onReorder:i,onAddBlock:a,onRemoveBlock:o,onModelBrowser:s}){let c=(0,l.useRef)(null),u=(0,l.useRef)(null),[d,m]=(0,l.useState)(null),[h,g]=(0,l.useState)(0),_=(0,l.useMemo)(()=>te(e),[e]),v=(0,l.useCallback)((e,t)=>{m(t),e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,String(t))},[]),y=(0,l.useCallback)(e=>{e.preventDefault(),e.dataTransfer.dropEffect=`move`},[]),ne=(0,l.useCallback)((e,t)=>{e.preventDefault(),d!==null&&d!==t&&i&&i(d,t),m(null)},[d,i]),w=(0,l.useCallback)(()=>{m(null)},[]),T=(0,l.useCallback)(()=>{if(!c.current||!t)return;let n=(_.type===`serial`?e:[..._.beforeSplit,_.splitBlock,..._.pathABlocks,_.mergeBlock,..._.afterMerge].filter(Boolean)).findIndex(e=>e.id===t);if(n<0)return;let r=c.current.children[n+(_.type,1)];r&&r.scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`center`})},[t,_,e]),re=(0,l.useRef)(t);t!==re.current&&(re.current=t,setTimeout(T,50));let ie=(0,l.useCallback)(e=>{g(e.target.scrollLeft),u.current&&(u.current.scrollLeft=e.target.scrollLeft)},[]);return e.find(e=>e.id===t),(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`},children:[_.type===`parallel`?(()=>{let{beforeSplit:e,splitBlock:i,pathABlocks:a,pathBBlocks:o,mergeBlock:l,afterMerge:d,parallelBlockCount:m}=_,h=[],g=Math.max(a.length,o.length);for(let e=0;e(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0},children:[(0,f.jsx)(C,{block:e,selected:e.id===t,index:i,onSelect:n,onToggle:r,onModelBrowser:s}),(0,f.jsx)(b,{})]},e.id)),(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0},children:[(0,f.jsx)(ee,{block:i,selected:i.id===t,onSelect:n,onToggle:r,onModelBrowser:s}),(0,f.jsx)(b,{})]}),a.map((e,i)=>(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0},children:[(0,f.jsx)(C,{block:e,selected:e.id===t,index:i,onSelect:n,onToggle:r,pathLabel:`A`,onModelBrowser:s}),(0,f.jsx)(b,{})]},e.id)),a.length>0&&(0,f.jsx)(b,{}),(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0},children:[(0,f.jsx)(S,{block:l,selected:l.id===t,onSelect:n,onToggle:r,onModelBrowser:s}),(0,f.jsx)(b,{})]}),d.map((e,i)=>(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0},children:[(0,f.jsx)(C,{block:e,selected:e.id===t,index:i,onSelect:n,onToggle:r,onModelBrowser:s}),(0,f.jsx)(b,{})]},e.id)),(0,f.jsx)(x,{label:`OUT`,isLeft:!1})]}),(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`stretch`,padding:`0 12px`,position:`relative`},children:(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0,minHeight:24},children:(0,f.jsx)(`div`,{style:{width:`calc(100%)`,position:`relative`}})})}),(0,f.jsxs)(`div`,{ref:u,style:{display:`flex`,alignItems:`center`,gap:4,padding:`2px 12px 8px`,overflowX:`auto`,overflowY:`hidden`,minHeight:76,scrollBehavior:`smooth`,WebkitOverflowScrolling:`touch`,borderTop:`1px solid ${p.border}33`},children:[(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0,paddingRight:4,opacity:.3,pointerEvents:`none`},children:e.length>0&&(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:e.map((e,t)=>(0,f.jsx)(`div`,{style:{minWidth:124,height:20,fontSize:8,color:p.textDim,display:`flex`,alignItems:`center`,gap:4},children:(0,f.jsx)(`span`,{children:`──`})},e.id))})}),(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0,opacity:.6},children:(0,f.jsxs)(`svg`,{width:`22`,height:`24`,viewBox:`0 0 22 24`,fill:`none`,style:{flexShrink:0},children:[(0,f.jsx)(`line`,{x1:`8`,y1:`0`,x2:`8`,y2:`18`,stroke:p.blue,strokeWidth:`1.5`,strokeDasharray:`3,2`}),(0,f.jsx)(`line`,{x1:`2`,y1:`18`,x2:`18`,y2:`18`,stroke:p.blue,strokeWidth:`1.5`}),(0,f.jsx)(`polyline`,{points:`14,14 18,18 14,22`,fill:`none`,stroke:p.blue,strokeWidth:`1.5`})]})}),o.length===0&&(0,f.jsxs)(`div`,{style:{flexShrink:0,padding:`16px 16px`,color:p.textDim,fontSize:10,border:`1px dashed ${p.border}44`,borderRadius:6,display:`flex`,alignItems:`center`,gap:8},children:[(0,f.jsx)(`span`,{style:{color:`#80B0C0`,fontSize:8,fontWeight:700,letterSpacing:`.1em`},children:`PATH B`}),(0,f.jsx)(`span`,{children:`Add blocks to Path B`})]}),o.map((i,a)=>(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0},children:[(0,f.jsx)(C,{block:i,selected:i.id===t,index:a+e.length+1,onSelect:n,onToggle:r,pathLabel:`B`}),(0,f.jsx)(b,{narrow:!0})]},i.id)),o.length>0&&(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0,opacity:.6},children:(0,f.jsxs)(`svg`,{width:`22`,height:`24`,viewBox:`0 0 22 24`,fill:`none`,style:{flexShrink:0},children:[(0,f.jsx)(`line`,{x1:`14`,y1:`24`,x2:`14`,y2:`6`,stroke:p.blue,strokeWidth:`1.5`,strokeDasharray:`3,2`}),(0,f.jsx)(`line`,{x1:`4`,y1:`6`,x2:`20`,y2:`6`,stroke:p.blue,strokeWidth:`1.5`}),(0,f.jsx)(`polyline`,{points:`8,10 4,6 8,2`,fill:`none`,stroke:p.blue,strokeWidth:`1.5`})]})}),(0,f.jsx)(`div`,{style:{flex:1,minWidth:20}}),o.length>0&&(0,f.jsx)(`div`,{style:{flexShrink:0,fontSize:7,fontWeight:700,color:`#80B0C0`,letterSpacing:`.12em`,textTransform:`uppercase`,padding:`0 8px`,opacity:.5},children:`Path B`})]}),(0,f.jsxs)(`div`,{style:{position:`absolute`,left:0,top:0,bottom:0,width:20,display:`flex`,flexDirection:`column`,pointerEvents:`none`,opacity:.4},children:[(0,f.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:8,fontWeight:700,color:`#B080C0`,writingMode:`vertical-rl`,letterSpacing:`.2em`},children:`A`}),(0,f.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:8,fontWeight:700,color:`#80B0C0`,writingMode:`vertical-rl`,letterSpacing:`.2em`},children:`B`})]})]})})():(0,f.jsxs)(`div`,{ref:c,onScroll:ie,style:{display:`flex`,alignItems:`center`,gap:4,padding:`10px 12px`,overflowX:`auto`,overflowY:`hidden`,minHeight:96,background:p.bg,borderBottom:`1px solid ${p.border}`,scrollBehavior:`smooth`,WebkitOverflowScrolling:`touch`},children:[(0,f.jsx)(x,{label:`IN`,isLeft:!0}),e.map((e,i)=>(0,f.jsxs)(`div`,{draggable:!0,onDragStart:e=>v(e,i),onDragOver:y,onDrop:e=>ne(e,i),onDragEnd:w,style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0},children:[(0,f.jsx)(C,{block:e,selected:e.id===t,index:i,onSelect:n,onToggle:r,onModelBrowser:s}),(0,f.jsx)(b,{})]},e.id)),e.length===0&&(0,f.jsx)(`div`,{style:{flexShrink:0,padding:`22px 20px`,color:p.textDim,fontSize:12,textAlign:`center`,border:`1px dashed ${p.border}`,borderRadius:8,minWidth:140},children:`No blocks in chain`}),(0,f.jsx)(x,{label:`OUT`,isLeft:!1})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:8,padding:`8px 12px`,borderBottom:`1px solid ${p.border}`,background:p.panel},children:[(0,f.jsx)(`button`,{onClick:a,style:{flex:1,padding:`10px`,borderRadius:7,background:p.surface,border:`1px dashed ${p.border}`,color:p.textSec,fontSize:12,fontWeight:600,cursor:`pointer`,letterSpacing:`.04em`,transition:`all .12s`},children:`+ Add Block`}),t&&(0,f.jsx)(`button`,{onClick:()=>o(t),style:{padding:`10px 14px`,borderRadius:7,background:`rgba(224,96,96,.15)`,border:`1px solid rgba(224,96,96,.3)`,color:p.red,fontSize:12,fontWeight:600,cursor:`pointer`,transition:`all .12s`},children:`✕ Remove`})]})]})}var w={bg:`#0A0A0C`,panel:`#141418`,surface:`#1C1C22`,border:`#2A2A32`,amber:`#E8A030`,amberDim:`#7A5218`,blue:`#4A8BC8`,blueDim:`#1E4060`,green:`#3AB87A`,red:`#E06060`,textPrimary:`#F0EDE6`,textSec:`#A0A0BC`,textDim:`#7878A0`};w.amber,w.amber,w.red,w.blue,w.blue,w.blue,w.blue,w.green,w.green,w.green,w.green;function T(e){return{gate:`GATE`,overdrive:`OD`,distortion:`DST`,fuzz:`FUZZ`,chorus:`CHO`,flanger:`FLN`,phaser:`PHA`,tremolo:`TRE`,delay:`DLY`,echo:`ECH`,reverb:`REV`,compressor:`CMP`,eq:`EQ`,cabinet:`CAB`,ir:`IR`,nam:`NAM`}[(e||``).toLowerCase()]||(e||`FX`).toUpperCase().slice(0,4)}function re({id:e,label:t,mainLabel:n,type:r,sub:i,active:a,enabled:o,onClick:s,onDoubleClick:c,isBank:u,bankDir:d}){let p=(0,l.useRef)(null);(0,l.useEffect)(()=>{let t=p.current;if(!t||!c)return;let n=0,r=()=>{let t=Date.now();t-n<300?(c(e),n=0):n=t};return t.addEventListener(`click`,r),()=>t.removeEventListener(`click`,r)},[e,c]);let m=r===`bypass`,h=r===`bank`,g=a||m&&!o;return(0,f.jsxs)(`div`,{ref:p,onClick:()=>s?.(e),style:{flex:1,minWidth:0,display:`flex`,flexDirection:`column`,alignItems:`center`,gap:2,padding:`6px 3px 8px`,borderRadius:8,border:`1px solid ${g?w.amber:h?w.blueDim:w.border}`,background:g&&!m?`linear-gradient(180deg, ${w.amber}15 0%, ${w.panel} 100%)`:m&&!o?`linear-gradient(180deg, ${w.red}15 0%, ${w.panel} 100%)`:w.surface,cursor:`pointer`,minHeight:58,position:`relative`,transition:`all .1s`,WebkitTapHighlightColor:`transparent`,boxShadow:g&&!m?`0 0 8px ${w.amber}33, inset 0 0 0 1px ${w.amber}22`:m&&!o?`0 0 8px ${w.red}33`:`none`},children:[(0,f.jsx)(`div`,{style:{width:`100%`,background:`#0A0A10`,border:`1px solid ${g?w.amber+`66`:w.border}`,borderRadius:3,padding:`2px 2px`,textAlign:`center`,minHeight:18,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:g?`inset 0 0 4px ${w.amber}22`:`none`},children:(0,f.jsx)(`span`,{style:{fontFamily:`'JetBrains Mono', monospace`,fontSize:7,fontWeight:700,letterSpacing:`.02em`,color:g?w.amber:m&&!o?w.red:w.textPrimary,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,maxWidth:`100%`,lineHeight:1.1},children:t})}),(0,f.jsx)(`div`,{style:{fontFamily:`'JetBrains Mono', monospace`,fontSize:h?10:9,fontWeight:700,color:o===!1?w.textDim:w.textPrimary,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,maxWidth:`100%`,lineHeight:1.2,marginTop:1},children:n||t||r||e||`FX`}),i&&(0,f.jsx)(`div`,{style:{fontSize:7,color:w.textDim,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,maxWidth:`100%`,lineHeight:1},children:i}),!h&&(0,f.jsx)(`div`,{style:{position:`absolute`,top:3,right:3,width:4,height:4,borderRadius:`50%`,background:o===!1?w.textDim:w.green,boxShadow:o===!1?`none`:`0 0 5px ${w.green}`,transition:`all .15s`}}),h&&(0,f.jsx)(`div`,{style:{position:`absolute`,top:3,right:3,fontSize:6,padding:`1px 3px`,borderRadius:2,background:`${w.blueDim}88`,color:w.blue,fontWeight:700,lineHeight:1},children:d===`up`?`▲`:`▼`})]})}function ie({mode:e=`stomp`,blocks:t=[],selectedBlockId:n,currentBank:r=`A`,presets:i=[],currentPreset:a,snapshots:o=[],currentSnapshot:s,onSelectBlock:c,onToggleBlock:l,onBankUp:u,onBankDown:d,onGlobalBypass:p,globalBypass:m,onTunerToggle:h,tunerEnabled:g,onPresetClick:_,onSnapshotClick:v}){let y=[];if(e===`stomp`||e===`stomp-b`){let e=t.length>5?6:Math.max(4,t.length),n=t.slice(0,e).map(e=>({id:e.id,type:`block`,label:T(e.type),mainLabel:e.name||e.type||`FX`,sub:e.bypassed?`BYPASSED`:``,enabled:!e.bypassed}));for(;n.length<5;)n.push({id:`empty_`+n.length,type:`empty`,label:`—`,mainLabel:`Empty`,enabled:!1});y=[...n.slice(0,5),{id:`bypass`,type:`bypass`,label:m?`MUTED`:`BYPASS`,mainLabel:`GLOBAL`,sub:m?``:`tap to mute`,enabled:!m}]}else if(e===`preset`)y=[{id:`bank_up`,type:`bank`,label:`BANK ▲`,mainLabel:`${r} · ${a}`,bankDir:`up`,enabled:!0},...i.slice(0,4).map((e,t)=>({id:`preset_`+t,type:`preset`,label:`0${e.num||t+1}`,mainLabel:e.name||`P${t+1}`,sub:e.num===a?`ACTIVE`:``,enabled:!0})),{id:`bank_down`,type:`bank`,label:`BANK ▼`,mainLabel:`${r} · ${a}`,bankDir:`down`,enabled:!0}];else if(e===`snapshot`)for(y=[...o.slice(0,6).map((e,t)=>({id:`snap_`+(e.num||t),type:`snapshot`,label:`SNAP ${e.num||t+1}`,mainLabel:e.name||`Snapshot ${e.num||t+1}`,sub:(e.num||t+1)===s?`ACTIVE`:``,enabled:!0}))];y.length<6;)y.push({id:`snap_empty_`+y.length,type:`empty`,label:`—`,mainLabel:`Empty`,enabled:!1});return(0,f.jsx)(`div`,{style:{display:`flex`,gap:4,padding:`6px 8px 10px`,background:w.bg,borderTop:`1px solid ${w.border}`,flexShrink:0},children:y.map(t=>(0,f.jsx)(re,{id:t.id,label:t.label,mainLabel:t.mainLabel,type:t.type,sub:t.sub,active:t.id===n||t.type===`preset`&&t.sub===`ACTIVE`||t.type===`snapshot`&&t.sub===`ACTIVE`,enabled:t.enabled,isBank:t.type===`bank`,bankDir:t.bankDir,onClick:t=>{t===`bank_up`?u?.():t===`bank_down`?d?.():t===`bypass`?p?.():t?.startsWith(`preset_`)?_?.(t.replace(`preset_`,``)):t?.startsWith(`snap_`)?v?.(t.replace(`snap_`,``)):(e===`stomp`||e===`stomp-b`)&&c?.(t)},onDoubleClick:t=>{t!==`bank_up`&&t!==`bank_down`&&t!==`bypass`&&(e===`stomp`||e===`stomp-b`)&&l?.(t)}},t.id))})}var E={bg:`#0A0A0C`,panel:`#141418`,surface:`#1C1C22`,border:`#2A2A32`,amber:`#E8A030`,amberDim:`#7A5218`,blue:`#4A8BC8`,green:`#3AB87A`,red:`#E06060`,textPrimary:`#F0EDE6`,textSec:`#A0A0BC`,textDim:`#7878A0`},ae=[{num:6,name:`E`,freq:82.41,color:`#C84040`},{num:5,name:`A`,freq:110,color:`#D07030`},{num:4,name:`D`,freq:146.83,color:`#E8A030`},{num:3,name:`G`,freq:196,color:`#60A0E0`},{num:2,name:`B`,freq:246.94,color:`#3A7BA8`},{num:1,name:`e`,freq:329.63,color:`#50C080`}],oe=[{note:`E2`,freq:82.41},{note:`F2`,freq:87.31},{note:`G2`,freq:98},{note:`A2`,freq:110},{note:`B2`,freq:123.47},{note:`C3`,freq:130.81},{note:`D3`,freq:146.83},{note:`E3`,freq:164.81},{note:`F3`,freq:174.61},{note:`G3`,freq:196},{note:`A3`,freq:220},{note:`B3`,freq:246.94},{note:`C4`,freq:261.63},{note:`D4`,freq:293.66},{note:`E4`,freq:329.63}];function se(){let e=Date.now()/1e3,t=oe[Math.floor(e*.3%oe.length)],n=Math.sin(e*2.5)*15,r=.6+Math.sin(e*.7)*.25,i=-1;for(let e=0;e({note:`--`,cents:0,string:-1,confidence:0,frequency:0}));(0,l.useEffect)(()=>{t&&e&&i({note:e.tuner_note||`--`,cents:e.tuner_cents??0,string:e.tuner_string??-1,confidence:e.tuner_confidence??0,frequency:e.tuner_frequency??0})},[t,e]),(0,l.useEffect)(()=>{if(t&&e?.tuner_enabled)return;let n=setInterval(()=>{i(se())},200);return()=>clearInterval(n)},[t,e]),(0,l.useEffect)(()=>{if(!t||!e?.tuner_enabled)return;let n=!1,r=async()=>{try{let e=await fetch(`/api/tuner/pitch`);if(!n&&e.ok){let t=await e.json();i({note:t.note||`--`,cents:t.cents??0,string:t.string??-1,confidence:t.confidence??0,frequency:t.frequency??0})}}catch{}};r();let a=setInterval(r,80);return()=>{n=!0,clearInterval(a)}},[t,e?.tuner_enabled]);let a=r.cents,o=r.confidence,s=(Math.max(-50,Math.min(50,a))+50)/100,c=Math.abs(a)<=3,u=Math.abs(a)<=10,d=r.string,p=[];for(let e=-50;e<=50;e+=5)p.push(e);let m=c?E.green:u?E.amber:E.textPrimary;return(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100%`,background:E.bg,overflow:`hidden`},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`6px 12px`,background:E.panel,borderBottom:`1px solid ${E.border}`,flexShrink:0},children:[(0,f.jsx)(`div`,{style:{fontSize:10,fontWeight:700,letterSpacing:`.12em`,textTransform:`uppercase`,color:c?E.green:E.amber},children:c?`● In Tune`:`◌ Tuner`}),(0,f.jsx)(`button`,{onClick:n,style:{padding:`6px 14px`,borderRadius:6,background:E.surface,border:`1px solid ${E.border}`,color:E.textPrimary,fontSize:11,fontWeight:600,cursor:`pointer`},children:`✕ Exit Tuner`})]}),(0,f.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:6,padding:`8px 16px`},children:[(0,f.jsx)(`div`,{style:{fontFamily:`'JetBrains Mono', monospace`,fontSize:72,fontWeight:700,color:m,textShadow:c?`0 0 30px ${E.green}44`:u?`0 0 20px ${E.amber}33`:`none`,lineHeight:1,letterSpacing:`.02em`,transition:`color .08s, text-shadow .08s`,minHeight:76,display:`flex`,alignItems:`center`,justifyContent:`center`},children:r.note}),(0,f.jsxs)(`div`,{style:{width:`100%`,maxWidth:320,height:60,position:`relative`,marginTop:4},children:[(0,f.jsx)(`div`,{style:{position:`absolute`,bottom:16,left:0,right:0,height:16,display:`flex`,alignItems:`flex-end`,justifyContent:`space-between`,padding:`0 10px`},children:p.map((e,t)=>{let n=e===0,r=e%10==0;return(0,f.jsx)(`div`,{style:{width:n?3:r?2:1,height:n?16:r?10:5,background:n?E.amber:E.border,borderRadius:1,flexShrink:0}},t)})}),(0,f.jsxs)(`div`,{style:{position:`absolute`,bottom:2,left:0,right:0,display:`flex`,justifyContent:`space-between`,padding:`0 6px`,fontSize:7,color:E.textDim,fontFamily:`'JetBrains Mono', monospace`},children:[(0,f.jsx)(`span`,{children:`-50¢`}),(0,f.jsx)(`span`,{children:`-25¢`}),(0,f.jsx)(`span`,{children:`0¢`}),(0,f.jsx)(`span`,{children:`+25¢`}),(0,f.jsx)(`span`,{children:`+50¢`})]}),(0,f.jsxs)(`div`,{style:{position:`absolute`,bottom:16,left:`calc(10px + ${s} * (100% - 20px))`,transform:`translateX(-50%)`,transition:`left .04s ease-out`},children:[(0,f.jsx)(`div`,{style:{width:2,height:44,background:c?E.green:u?E.amber:E.textPrimary,borderRadius:1,margin:`0 auto`,boxShadow:c?`0 0 8px ${E.green}`:`0 0 4px ${u?E.amber:`transparent`}`}}),(0,f.jsx)(`div`,{style:{width:8,height:8,borderRadius:`50%`,background:c?E.green:u?E.amber:E.textPrimary,margin:`-1px auto 0`,boxShadow:c?`0 0 12px ${E.green}`:`0 0 6px ${u?E.amber:`transparent`}`}})]})]}),(0,f.jsxs)(`div`,{style:{fontSize:13,fontFamily:`'JetBrains Mono', monospace`,color:m,letterSpacing:`.04em`,minHeight:18},children:[a>0?`+${a}¢`:`${a}¢`,c&&(0,f.jsx)(`span`,{style:{color:E.green},children:` ✓`})]})]}),(0,f.jsx)(`div`,{style:{display:`flex`,gap:6,padding:`8px 16px 12px`,justifyContent:`center`,borderTop:`1px solid ${E.border}`,flexShrink:0},children:ae.map(e=>{let t=e.num===d;return(0,f.jsxs)(`div`,{style:{width:40,height:40,borderRadius:8,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,background:t?`${e.color}22`:E.surface,border:`2px solid ${t?e.color:E.border}`,transition:`all .1s`,boxShadow:t?`0 0 12px ${e.color}44`:`none`},children:[(0,f.jsx)(`span`,{style:{fontFamily:`'JetBrains Mono', monospace`,fontSize:16,fontWeight:700,color:t?e.color:E.textDim,lineHeight:1},children:e.name}),(0,f.jsx)(`span`,{style:{fontSize:8,color:t?e.color:E.textDim,opacity:.7,lineHeight:1},children:e.num})]},e.num)})}),(0,f.jsxs)(`div`,{style:{padding:`0 16px 8px`,display:`flex`,alignItems:`center`,gap:8,flexShrink:0},children:[(0,f.jsx)(`span`,{style:{fontSize:8,color:E.textDim,fontFamily:`'JetBrains Mono', monospace`},children:`SIG`}),(0,f.jsx)(`div`,{style:{flex:1,height:3,borderRadius:2,background:E.border,overflow:`hidden`},children:(0,f.jsx)(`div`,{style:{height:`100%`,width:`${Math.max(0,Math.min(100,o*100))}%`,background:o>.7?E.green:o>.3?E.amber:E.red,borderRadius:2,transition:`width .08s`}})}),(0,f.jsxs)(`span`,{style:{fontSize:8,color:E.textDim,fontFamily:`'JetBrains Mono', monospace`,minWidth:20,textAlign:`right`},children:[Math.round(o*100),`%`]})]})]})}var D={bg:`#0A0A0C`,panel:`#141418`,surface:`#1C1C22`,border:`#2A2A32`,amber:`#E8A030`,amberDim:`#7A5218`,blue:`#4A8BC8`,blueDim:`#1E4060`,green:`#3AB87A`,red:`#E06060`,textPrimary:`#F0EDE6`,textSec:`#A0A0BC`,textDim:`#7878A0`},O={overdrive:[{key:`drive`,label:`Drive`,min:0,max:100,def:30},{key:`tone`,label:`Tone`,min:0,max:100,def:50},{key:`level`,label:`Level`,min:0,max:100,def:70}],distortion:[{key:`drive`,label:`Drive`,min:0,max:100,def:50},{key:`tone`,label:`Tone`,min:0,max:100,def:40},{key:`level`,label:`Level`,min:0,max:100,def:60}],fuzz:[{key:`fuzz`,label:`Fuzz`,min:0,max:100,def:60},{key:`tone`,label:`Tone`,min:0,max:100,def:30},{key:`level`,label:`Level`,min:0,max:100,def:60}],delay:[{key:`time`,label:`Time`,min:0,max:100,def:40},{key:`feedback`,label:`Feedback`,min:0,max:100,def:30},{key:`mix`,label:`Mix`,min:0,max:100,def:35}],echo:[{key:`time`,label:`Time`,min:0,max:100,def:40},{key:`feedback`,label:`Feedback`,min:0,max:100,def:30},{key:`mix`,label:`Mix`,min:0,max:100,def:35}],reverb:[{key:`decay`,label:`Decay`,min:0,max:100,def:50},{key:`mix`,label:`Mix`,min:0,max:100,def:30},{key:`tone`,label:`Tone`,min:0,max:100,def:50}],chorus:[{key:`rate`,label:`Rate`,min:0,max:100,def:40},{key:`depth`,label:`Depth`,min:0,max:100,def:40},{key:`mix`,label:`Mix`,min:0,max:100,def:30}],flanger:[{key:`rate`,label:`Rate`,min:0,max:100,def:30},{key:`depth`,label:`Depth`,min:0,max:100,def:50},{key:`feedback`,label:`Feedback`,min:0,max:100,def:40},{key:`mix`,label:`Mix`,min:0,max:100,def:30}],phaser:[{key:`rate`,label:`Rate`,min:0,max:100,def:30},{key:`depth`,label:`Depth`,min:0,max:100,def:50},{key:`feedback`,label:`Feedback`,min:0,max:100,def:40},{key:`mix`,label:`Mix`,min:0,max:100,def:30}],compressor:[{key:`threshold`,label:`Thresh`,min:0,max:100,def:50},{key:`ratio`,label:`Ratio`,min:1,max:20,def:4},{key:`gain`,label:`Gain`,min:0,max:100,def:50}],gate:[{key:`threshold`,label:`Thresh`,min:0,max:100,def:30},{key:`release`,label:`Release`,min:0,max:100,def:50}],eq:[{key:`low`,label:`Low`,min:-12,max:12,def:0},{key:`mid`,label:`Mid`,min:-12,max:12,def:0},{key:`high`,label:`High`,min:-12,max:12,def:0},{key:`level`,label:`Level`,min:0,max:100,def:70}],cabinet:[{key:`level`,label:`Level`,min:0,max:100,def:75}],ir:[{key:`level`,label:`Level`,min:0,max:100,def:75}]},le={overdrive:D.amber,distortion:D.red,fuzz:`#C07030`,delay:D.blue,echo:D.blue,reverb:`#60B0D0`,chorus:D.green,flanger:`#50C080`,phaser:`#80C050`,tremolo:D.green,compressor:`#D09040`,gate:D.textSec,eq:`#7080D0`,cabinet:`#D07090`,ir:`#D07090`,nam:`#E0A040`,boost:D.amber,wah:`#D0A060`,volume:D.textSec,tuner:`#80D0A0`},ue={overdrive:`OD-808`,distortion:`RAT`,fuzz:`Big Muff`,delay:`Digital Delay`,echo:`Tape Echo`,reverb:`Hall Reverb`,chorus:`Chorus`,flanger:`Flanger`,phaser:`Phase 90`,tremolo:`Tremolo`,compressor:`Compressor`,gate:`Noise Gate`,eq:`EQ`,cabinet:`Cabinet`,ir:`IR Loader`,nam:`NAM Model`,boost:`Clean Boost`,wah:`Wah`,volume:`Volume`,tuner:`Tuner`,loop:`FX Loop`};function de(e){return O[(e||``).toLowerCase()]||[{key:`level`,label:`Level`,min:0,max:100,def:50}]}function fe(e){return le[(e||``).toLowerCase()]||D.amber}function pe(e){let t=(e.type||``).toLowerCase();return e.nam_model_path?e.nam_model_path.split(`/`).pop()?.replace(/\.(nam|wav|aiff?)$/i,``)||`NAM Model`:e.ir_file_path?e.ir_file_path.split(`/`).pop()?.replace(/\.(wav|aiff?|ir)$/i,``)||`IR Loader`:ue[t]||t.charAt(0).toUpperCase()+t.slice(1)}function k({label:e,value:t=50,onChange:n,size:r=72,color:i=D.amber,min:a=0,max:o=100,compact:s=!1}){let c=(0,l.useRef)(null),u=(t-a)/(o-a),d=-140+u*280,p=r*.38,m=r*.5-p,h=e=>{e.preventDefault(),c.current={y:e.touches?e.touches[0].clientY:e.clientY,val:t};let r=e=>{let t=e.touches?e.touches[0].clientY:e.clientY,r=(c.current.y-t)/120,i=Math.max(a,Math.min(o,c.current.val+r*(o-a)));n?.(Math.round(i))},i=()=>{window.removeEventListener(`mousemove`,r),window.removeEventListener(`mouseup`,i),window.removeEventListener(`touchmove`,r),window.removeEventListener(`touchend`,i)};window.addEventListener(`mousemove`,r),window.addEventListener(`mouseup`,i),window.addEventListener(`touchmove`,r,{passive:!1}),window.addEventListener(`touchend`,i)},g=r+16,_=g/2,v=g/2,y=r/2+4,b=_+y*Math.cos(Math.PI/180*-230),x=v+y*Math.sin(Math.PI/180*-230),ee=_+y*Math.cos((d-90)*(Math.PI/180)),S=v+y*Math.sin((d-90)*(Math.PI/180)),C=+(u*280>180);return(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:s?2:6,cursor:`pointer`},children:[(0,f.jsxs)(`div`,{style:{width:r,height:r,position:`relative`,touchAction:`none`},onMouseDown:h,onTouchStart:h,children:[(0,f.jsxs)(`svg`,{style:{position:`absolute`,inset:-8,width:g,height:g,overflow:`visible`},children:[(0,f.jsx)(`circle`,{cx:_,cy:v,r:y,fill:`none`,stroke:D.border,strokeWidth:`3`,strokeLinecap:`round`,opacity:`.5`}),u>0&&(0,f.jsx)(`path`,{d:`M ${b} ${x} A ${y} ${y} 0 ${C} 1 ${ee} ${S}`,fill:`none`,stroke:i,strokeWidth:`3`,strokeLinecap:`round`,style:{filter:`drop-shadow(0 0 4px ${i})`}})]}),(0,f.jsx)(`div`,{style:{borderRadius:`50%`,width:`100%`,height:`100%`,position:`relative`,background:`radial-gradient(circle at 35% 30%, #3A3A48, #1A1A22)`,boxShadow:`0 3px 12px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.07)`},children:(0,f.jsx)(`div`,{style:{position:`absolute`,width:4,borderRadius:2,background:i,left:`50%`,transformOrigin:`bottom center`,height:p,top:m,transform:`translateX(-50%) rotate(${d}deg)`,transformOrigin:`50% ${p}px`,boxShadow:`0 0 6px ${i}`}})})]}),(0,f.jsx)(`div`,{style:{fontFamily:`'JetBrains Mono', monospace`,fontSize:s?11:14,fontWeight:700,color:i},children:t}),(0,f.jsx)(`div`,{style:{fontSize:s?7:9,color:D.textSec,letterSpacing:`.06em`,textTransform:`uppercase`,textAlign:`center`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,maxWidth:r+16},children:e})]})}function me({label:e,value:t=50,onChange:n,onChangeEnd:r,min:i=0,max:a=100,color:o=D.amber}){let s=(0,l.useRef)(null),c=(0,l.useRef)(!1),u=(0,l.useRef)(t),d=(0,l.useRef)(n),p=(0,l.useRef)(r),m=(t-i)/(a-i)*100,[h,g]=(0,l.useState)(null);(0,l.useMemo)(()=>{d.current=n},[n]),(0,l.useMemo)(()=>{p.current=r},[r]);let _=(0,l.useCallback)(e=>{let n=s.current;if(!n)return t;let r=n.getBoundingClientRect(),o=(e.touches?e.touches[0].clientX:e.clientX)-r.left;return Math.round(i+Math.max(0,Math.min(1,o/r.width))*(a-i))},[i,a,t]);(0,l.useMemo)(()=>{let e=e=>{if(!c.current)return;e.preventDefault();let t=_(e);u.current=t,g(t),d.current?.(t)},t=()=>{c.current&&(p.current?.(u.current),c.current=!1,g(null))};return window.addEventListener(`mousemove`,e),window.addEventListener(`mouseup`,t),window.addEventListener(`touchmove`,e,{passive:!1}),window.addEventListener(`touchend`,t),()=>{window.removeEventListener(`mousemove`,e),window.removeEventListener(`mouseup`,t),window.removeEventListener(`touchmove`,e),window.removeEventListener(`touchend`,t)}},[_]);let v=e=>{e.preventDefault();let t=_(e);u.current=t,c.current=!0,g(t),d.current?.(t)},y=e=>n=>{n.preventDefault(),n.stopPropagation();let r=Math.max(i,Math.min(a,t+e));d.current?.(r),p.current?.(r)};return(0,f.jsxs)(`div`,{style:{marginBottom:4},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:2},children:[(0,f.jsx)(`span`,{style:{fontSize:11,fontWeight:500,textTransform:`uppercase`,letterSpacing:`.06em`,color:o},children:e}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`},children:[(0,f.jsx)(`button`,{style:{width:34,height:34,borderRadius:`50%`,border:`1px solid ${D.border}`,background:D.panel,color:D.textPrimary,fontSize:16,fontWeight:700,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,lineHeight:1},onMouseDown:y(-5),onTouchStart:y(-5),children:`−`}),(0,f.jsx)(`span`,{style:{fontFamily:`'JetBrains Mono', monospace`,fontSize:16,fontWeight:700,color:o,minWidth:40,textAlign:`center`},children:h??t}),(0,f.jsx)(`button`,{style:{width:34,height:34,borderRadius:`50%`,border:`1px solid ${D.border}`,background:D.panel,color:D.textPrimary,fontSize:16,fontWeight:700,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,lineHeight:1},onMouseDown:y(5),onTouchStart:y(5),children:`+`})]})]}),(0,f.jsxs)(`div`,{ref:s,onMouseDown:v,onTouchStart:v,style:{position:`relative`,height:44,display:`flex`,alignItems:`center`,cursor:`pointer`,touchAction:`none`},children:[(0,f.jsx)(`div`,{style:{width:`100%`,height:10,background:D.border,borderRadius:5,position:`relative`,overflow:`hidden`},children:(0,f.jsx)(`div`,{style:{height:`100%`,borderRadius:5,position:`absolute`,top:0,left:0,width:`${m}%`,background:o,boxShadow:`0 0 8px ${o}44`,transition:`width .03s`}})}),(0,f.jsx)(`div`,{style:{width:30,height:30,borderRadius:`50%`,position:`absolute`,top:`50%`,left:`${m}%`,transform:`translate(-50%,-50%)`,background:o,boxShadow:`0 2px 10px rgba(0,0,0,.6), 0 0 0 3px ${D.bg}`,pointerEvents:`none`,transition:`left .03s`}})]})]})}function he({defs:e,params:t,viewMode:n,color:r,onParamChange:i,onParamChangeEnd:a,compact:o}){return(0,f.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:n===`knob`?8:0,width:`100%`,minWidth:0,flexShrink:0},children:n===`slider`?e.map(e=>(0,f.jsx)(me,{label:e.label,value:t[e.key]==null?e.def:t[e.key],min:e.min,max:e.max,color:r,onChange:t=>i(e.key,t),onChangeEnd:t=>a(e.key,t)},e.key)):(0,f.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(${o?4:Math.min(4,e.length)}, 1fr)`,gap:12,padding:`8px 0`,justifyItems:`center`,width:`100%`,maxWidth:480,margin:`0 auto`},children:e.map(e=>(0,f.jsx)(k,{label:e.label,size:o?60:72,value:t[e.key]==null?e.def:t[e.key],min:e.min,max:e.max,color:r,onChange:t=>{i(e.key,t),a(e.key,t)},compact:o},e.key))})})}function ge({block:e,params:t,viewMode:n,onClose:r,onParamChange:i,onParamChangeEnd:a,onToggleView:o,onToggleBypass:s,onOpenModelBrowser:c}){let u=de(e.type),d=fe(e.type),p=pe(e),m=(0,l.useMemo)(()=>{let e=[];for(let t=0;t{let e=()=>b(window.innerWidth<500);return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let x=(0,l.useCallback)(e=>{v.current=e.touches[0].clientX},[]),ee=(0,l.useCallback)(e=>{if(v.current==null)return;let t=e.changedTouches[0].clientX-v.current;v.current=null,!(Math.abs(t)<50)&&(t<0&&hMath.min(e+1,m.length-1)):t>0&&h>0&&g(e=>Math.max(e-1,0)))},[h,m.length]);return(0,l.useMemo)(()=>{let e=e=>{e.key===`ArrowLeft`&&h>0&&g(e=>e-1),e.key===`ArrowRight`&&he+1),e.key===`Escape`&&r?.()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[h,m.length,r]),(0,f.jsxs)(`div`,{style:{position:`fixed`,inset:0,zIndex:1e3,display:`flex`,flexDirection:`column`,background:D.bg,fontFamily:`'Inter', sans-serif`,color:D.textPrimary},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`10px 14px`,borderBottom:`1px solid ${D.border}`,background:D.panel,flexShrink:0},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,minWidth:0},children:[(0,f.jsx)(`button`,{onClick:r,style:{width:34,height:34,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,background:D.surface,border:`1px solid ${D.border}`,color:D.textPrimary,fontSize:16,cursor:`pointer`,flexShrink:0},children:`✕`}),(0,f.jsxs)(`div`,{style:{minWidth:0},children:[(0,f.jsx)(`div`,{style:{fontSize:15,fontWeight:600,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:p}),(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,marginTop:2},children:(0,f.jsx)(`span`,{style:{display:`inline-flex`,padding:`1px 6px`,borderRadius:3,fontSize:9,fontWeight:700,letterSpacing:`.06em`,textTransform:`uppercase`,background:`${d}22`,color:d},children:(e.type||`fx`).replace(/_/g,` `).toUpperCase()})})]})]}),(0,f.jsx)(`div`,{style:{display:`flex`,gap:6,alignItems:`center`,flexShrink:0},children:(0,f.jsx)(`button`,{onClick:o,style:{padding:`6px 10px`,borderRadius:6,fontSize:10,fontWeight:600,background:D.surface,border:`1px solid ${D.border}`,color:D.textPrimary,cursor:`pointer`,letterSpacing:`.04em`},children:n===`slider`?`◉ Knobs`:`▦ Sliders`})})]}),(0,f.jsx)(`div`,{style:{padding:`6px 14px`,borderBottom:`1px solid ${D.border}`,background:D.surface,flexShrink:0},children:(0,f.jsxs)(`button`,{onClick:s,style:{width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:8,padding:`10px 14px`,borderRadius:8,border:`2px solid ${e.bypassed?D.red+`66`:D.green+`66`}`,background:e.bypassed?`linear-gradient(180deg, ${D.red+`18`}, ${D.panel})`:`linear-gradient(180deg, ${D.green+`18`}, ${D.panel})`,cursor:`pointer`,transition:`all .12s`},children:[(0,f.jsx)(`div`,{style:{width:12,height:12,borderRadius:`50%`,background:e.bypassed?D.textDim:D.green,boxShadow:e.bypassed?`none`:`0 0 8px ${D.green}`}}),(0,f.jsx)(`span`,{style:{fontSize:12,fontWeight:700,letterSpacing:`.08em`,textTransform:`uppercase`,color:e.bypassed?D.red:D.green},children:e.bypassed?`Bypassed — Tap to Enable`:`Active — Tap to Bypass`})]})}),(0,f.jsx)(`div`,{ref:_,onTouchStart:x,onTouchEnd:ee,style:{flex:1,overflowY:`auto`,overflowX:`hidden`,padding:`12px 16px`,display:`flex`,flexDirection:`column`,gap:6},children:m.length===0?(0,f.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,color:D.textDim,fontSize:12},children:`No parameters for this block type`}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(he,{defs:m[h],params:t,viewMode:n,color:d,onParamChange:i,onParamChangeEnd:a,compact:y}),(0,f.jsx)(`div`,{style:{flex:1,minHeight:8}})]})}),(0,f.jsxs)(`div`,{style:{padding:`8px 14px 12px`,borderTop:`1px solid ${D.border}`,background:D.panel,flexShrink:0,display:`flex`,flexDirection:`column`,gap:6},children:[m.length>1&&(0,f.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,gap:5},children:m.map((e,t)=>(0,f.jsx)(`button`,{onClick:()=>g(t),style:{width:8,height:8,borderRadius:`50%`,border:`none`,padding:0,cursor:`pointer`,background:t===h?d:D.border,opacity:t===h?1:.4,transition:`all .12s`}},t))}),m.length>1&&(0,f.jsxs)(`div`,{style:{textAlign:`center`,fontSize:9,color:D.textDim,fontFamily:`'JetBrains Mono', monospace`,letterSpacing:`.04em`},children:[`Page `,h+1,` / `,m.length,(0,f.jsx)(`span`,{style:{marginLeft:8,opacity:.6},children:`← swipe to navigate →`})]}),c&&(0,f.jsxs)(`button`,{onClick:c,style:{width:`100%`,padding:`8px 14px`,borderRadius:7,background:D.surface,border:`1px solid ${D.border}`,color:D.textPrimary,fontSize:11,fontWeight:600,cursor:`pointer`,letterSpacing:`.04em`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:6},children:[(0,f.jsx)(`span`,{children:`🎛`}),` Swap Model / Block Type`]})]})]})}var A={bg:`#0A0A0C`,panel:`#141418`,surface:`#1C1C22`,border:`#2A2A32`,amber:`#E8A030`,amberDim:`#7A5218`,blue:`#4A8BC8`,blueDim:`#1E4060`,green:`#3AB87A`,red:`#E06060`,textPrimary:`#F0EDE6`,textSec:`#A0A0BC`,textDim:`#7878A0`},_e=`/ui/img/`,ve={Distortions:{icon:`fx_distortion`,color:A.red},Dynamics:{icon:`fx_compressor`,color:A.green},Modulations:{icon:`fx_modulator`,color:A.blue},Delays:{icon:`fx_delay`,color:`#60A0E0`},Reverbs:{icon:`fx_reverb`,color:`#60C0D0`},Filters:{icon:`fx_filter`,color:`#D0A060`},Amps:{icon:`fx_amplifier`,color:`#E0A040`},Preamps:{icon:`fx_simulator`,color:`#D08040`},Cabs:{icon:`fx_spatial`,color:`#D07090`},IRs:{icon:`fx_spatial`,color:`#70B090`},"Pitch/Synth":{icon:`fx_pitch`,color:`#A060E0`},"Volume/Pan":{icon:`fx_constant`,color:A.textSec},Looper:{icon:`fx_oscillator`,color:`#80D0A0`},"Send/Return":{icon:`fx_lr`,color:`#9090C0`},Special:{icon:`fx_utility`,color:`#B080C0`}},ye=[`Distortions`,`Dynamics`,`Modulations`,`Delays`,`Reverbs`,`Filters`,`Amps`,`Preamps`,`Cabs`,`IRs`,`Pitch/Synth`,`Volume/Pan`,`Looper`,`Send/Return`,`Special`],be=[`Preamps`,`Looper`,`Pitch/Synth`],xe={od:A.amber,overdrive:A.amber,drive:A.amber,dist:A.red,distortion:A.red,fuzz:`#D060E0`,mod:A.blue,chorus:A.blue,flange:A.blue,phaser:A.blue,tremolo:A.blue,vibrato:A.blue,rotary:A.blue,delay:`#60A0E0`,echo:`#60A0E0`,reverb:`#60C0D0`,pitch:`#A060E0`,comp:A.green,compressor:A.green,gate:A.green,filter:`#D0A060`,wah:`#D0A060`,eq:`#80A0B0`,ir:A.green,cab:A.green,nam:`#E0A040`,volume:A.textSec,boost:A.amber,split:`#B080C0`,merge:`#80B0C0`},Se={od:`fx_distortion`,overdrive:`fx_distortion`,drive:`fx_distortion`,dist:`fx_distortion`,distortion:`fx_distortion`,gain:`fx_distortion`,fuzz:`fx_distortion`,delay:`fx_delay`,echo:`fx_delay`,reverb:`fx_reverb`,chorus:`fx_chorus`,flange:`fx_flanger`,flanger:`fx_flanger`,phaser:`fx_phaser`,tremolo:`fx_modulator`,vibrato:`fx_modulator`,rotary:`fx_modulator`,modulator:`fx_modulator`,pitch:`fx_pitch`,harmonizer:`fx_pitch`,shifter:`fx_pitch`,comp:`fx_compressor`,compressor:`fx_compressor`,limiter:`fx_limiter`,gate:`fx_gate`,noise_gate:`fx_gate`,filter:`fx_filter`,wah:`fx_filter`,eq:`fx_eq`,graphic_eq:`fx_eq`,parametric_eq:`fx_parametric_eq`,multiband_eq:`fx_multiband_eq`,ir:`fx_spatial`,cab:`fx_spatial`,cabinet:`fx_spatial`,nam:`fx_simulator`,capture:`fx_simulator`,amp:`fx_amplifier`,amplifier:`fx_amplifier`,volume:`fx_constant`,level:`fx_constant`,boost:`fx_constant`,split:`fx_split_a`,merge:`fx_mixer`,tuner:`fx_analyzer`,mixer:`fx_mixer`,utility:`fx_utility`,plugin:`fx_plugin`,instrument:`fx_instrument`,looper:`fx_oscillator`,converter:`fx_converter`,reamp:`fx_converter`,lr:`fx_lr`},Ce=[{type:`overdrive`,name:`OD-808`,category:`Distortions`,desc:`Classic overdrive`},{type:`distortion`,name:`RAT`,category:`Distortions`,desc:`Aggressive distortion`},{type:`fuzz`,name:`Big Muff`,category:`Distortions`,desc:`Thick fuzz sustain`},{type:`boost`,name:`Clean Boost`,category:`Distortions`,desc:`Clean level boost`},{type:`compressor`,name:`Compressor`,category:`Dynamics`,desc:`Dynamic range control`},{type:`gate`,name:`Noise Gate`,category:`Dynamics`,desc:`Noise suppression`},{type:`chorus`,name:`Chorus`,category:`Modulations`,desc:`Rich chorus effect`},{type:`flanger`,name:`Flanger`,category:`Modulations`,desc:`Jet plane sweep`},{type:`phaser`,name:`Phase 90`,category:`Modulations`,desc:`Iconic phase shift`},{type:`tremolo`,name:`Tremolo`,category:`Modulations`,desc:`Volume modulation`},{type:`delay`,name:`Digital Delay`,category:`Delays`,desc:`Clean digital repeats`},{type:`echo`,name:`Tape Echo`,category:`Delays`,desc:`Warm tape repeats`},{type:`reverb`,name:`Hall Reverb`,category:`Reverbs`,desc:`Lush hall reverb`},{type:`eq`,name:`Equalizer`,category:`Filters`,desc:`3-band tone control`},{type:`wah`,name:`Wah`,category:`Filters`,desc:`Crybaby wah`},{type:`volume`,name:`Volume Pedal`,category:`Volume/Pan`,desc:`Volume control`},{type:`split`,name:`Split`,category:`Special`,desc:`Parallel routing`},{type:`merge`,name:`Merge`,category:`Special`,desc:`Sum parallel paths`},{type:`tuner`,name:`Tuner`,category:`Special`,desc:`Instrument tuner`},{type:`loop`,name:`FX Loop`,category:`Send/Return`,desc:`External FX send/return`},{type:`cabinet`,name:`Cabinet`,category:`Cabs`,desc:`Speaker cabinet sim`},{type:`ir`,name:`IR Loader`,category:`IRs`,desc:`Impulse response loader`},{type:`nam`,name:`NAM Model`,category:`Amps`,desc:`Neural amp model`}];function we(e){let t=(e||``).toLowerCase().trim();for(let[e,n]of Object.entries(Se))if(t===e||t.startsWith(e)||t.includes(e))return n;return`fx_plugin`}function Te(e){let t=(e||``).toLowerCase().trim();for(let[e,n]of Object.entries(xe))if(t===e||t.startsWith(e)||t.includes(e))return n;return A.amber}function Ee({category:e,size:t=14}){let n=ve[e];return n?(0,f.jsx)(`img`,{src:`${_e}${n.icon}.svg`,alt:e,style:{width:t,height:t,flexShrink:0,filter:`invert(0.95) brightness(2)`,objectFit:`contain`},onError:e=>{e.target.style.display=`none`}}):null}function De({currentBlockType:e,currentBlockName:t,currentModelPath:n,onSelectModel:r,onClose:i}){let[a,o]=(0,l.useState)(`All`),[s,c]=(0,l.useState)(``),[u,d]=(0,l.useState)([]),[p,m]=(0,l.useState)(()=>{try{let e=localStorage.getItem(`helix_model_favorites`);return e?JSON.parse(e):[]}catch{return[]}}),h=(0,l.useRef)(null);(0,l.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await fetch(`/api/models`).then(e=>e.json());e||d(t.models||[])}catch{}})(),()=>{e=!0}},[]);let g=(0,l.useCallback)(e=>{m(t=>{let n=t.includes(e)?t.filter(t=>t!==e):[...t,e];return localStorage.setItem(`helix_model_favorites`,JSON.stringify(n)),n})},[]),_=n||(e?`builtin:${e}`:null),v=(0,l.useMemo)(()=>{let e=[];for(let t of Ce)e.push({id:`builtin:${t.type}`,type:t.type,name:t.name,category:t.category,desc:t.desc,isBuiltin:!0,iconType:t.type});for(let t of u){let n=t.name||t.filename||`Unnamed Model`;e.push({id:`nam:${n}`,type:`nam`,name:n,category:`Amps`,desc:t.architecture?`${t.architecture} · ${t.size_mb}MB`:`Installed NAM model`,isBuiltin:!1,loaded:t.loaded,modelPath:t.path||t.filename,iconType:`nam`})}return e},[u]),y=(0,l.useMemo)(()=>a===`All`?[...ye].filter(e=>be.includes(e)?v.some(t=>t.category===e&&!t.isBuiltin):v.some(t=>t.category===e)):a===`★Favorites`?[]:[a],[a,v]),b=(0,l.useMemo)(()=>{let e=v;if(a===`★Favorites`?e=e.filter(e=>p.includes(e.id)):a!==`All`&&(e=e.filter(e=>e.category===a)),s.trim()){let t=s.toLowerCase();e=e.filter(e=>e.name.toLowerCase().includes(t)||e.type.toLowerCase().includes(t)||(e.desc||``).toLowerCase().includes(t)||(e.category||``).toLowerCase().includes(t))}return e},[v,a,s,p]),x=(0,l.useMemo)(()=>{if(a!==`All`&&a!==`★Favorites`)return null;let e={};for(let t of b)e[t.category]||(e[t.category]=[]),e[t.category].push(t);return e},[b,a]),ee=(0,l.useCallback)(e=>{r?.({type:e.type,name:e.name,modelPath:e.isBuiltin?null:e.modelPath||e.id,isBuiltin:e.isBuiltin}),i?.()},[r,i]),S=[`All`,`★Favorites`,...ye.filter(e=>be.includes(e)?v.some(t=>t.category===e&&!t.isBuiltin):v.some(t=>t.category===e))];return(0,f.jsxs)(`div`,{style:{position:`fixed`,inset:0,zIndex:1e3,display:`flex`,flexDirection:`column`,background:A.bg,color:A.textPrimary,fontFamily:`'Inter', sans-serif`},children:[(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`10px 14px`,borderBottom:`1px solid ${A.border}`,background:A.panel,flexShrink:0},children:(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,f.jsx)(`button`,{onClick:i,style:{width:34,height:34,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,background:A.surface,border:`1px solid ${A.border}`,color:A.textPrimary,fontSize:16,cursor:`pointer`},children:`✕`}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{style:{fontSize:15,fontWeight:600},children:`Model Browser`}),t&&(0,f.jsxs)(`div`,{style:{fontSize:10,color:A.textSec,marginTop:1},children:[`Current: `,t]})]})]})}),(0,f.jsx)(`div`,{style:{padding:`8px 14px`,borderBottom:`1px solid ${A.border}`,background:A.surface,flexShrink:0},children:(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,background:A.panel,borderRadius:7,border:`1px solid ${A.border}`,padding:`7px 10px`},children:[(0,f.jsx)(`span`,{style:{color:A.textDim,fontSize:13},children:`🔍`}),(0,f.jsx)(`input`,{ref:h,placeholder:`Search models...`,value:s,onChange:e=>c(e.target.value),style:{flex:1,background:`none`,border:`none`,color:A.textPrimary,fontSize:13,outline:`none`}}),s&&(0,f.jsx)(`button`,{onClick:()=>c(``),style:{background:`none`,border:`none`,color:A.textDim,fontSize:14,cursor:`pointer`,padding:2},children:`✕`})]})}),(0,f.jsx)(`div`,{style:{display:`flex`,gap:0,overflowX:`auto`,overflowY:`hidden`,borderBottom:`1px solid ${A.border}`,background:A.panel,flexShrink:0,WebkitOverflowScrolling:`touch`},children:S.map(e=>{let t=ve[e],n=a===e;return(0,f.jsxs)(`button`,{onClick:()=>o(e),style:{padding:`8px 12px`,fontSize:10,fontWeight:600,letterSpacing:`.04em`,whiteSpace:`nowrap`,background:`none`,border:`none`,borderBottom:`2px solid ${n?A.amber:`transparent`}`,color:n?A.textPrimary:A.textSec,cursor:`pointer`,display:`flex`,alignItems:`center`,gap:5,flexShrink:0,transition:`all .12s`},children:[t&&(0,f.jsx)(Ee,{category:e,size:12}),e===`★Favorites`&&(0,f.jsx)(`span`,{children:`★`}),e===`★Favorites`?` Favorites`:e]},e)})}),(0,f.jsxs)(`div`,{style:{flex:1,overflowY:`auto`,overflowX:`hidden`,padding:`10px 14px`,WebkitOverflowScrolling:`touch`},children:[a===`★Favorites`&&b.length===0&&(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,padding:`40px 20px`,gap:8,color:A.textDim},children:[(0,f.jsx)(`span`,{style:{fontSize:28},children:`☆`}),(0,f.jsx)(`div`,{style:{fontSize:13,fontWeight:500},children:`No favorites yet`}),(0,f.jsx)(`div`,{style:{fontSize:11,textAlign:`center`},children:`Star a model to add it to your favorites`})]}),s&&b.length===0&&(0,f.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,padding:`40px 20px`,gap:8,color:A.textDim},children:(0,f.jsxs)(`div`,{style:{fontSize:13},children:[`No models matching "`,s,`"`]})}),x?y.map(e=>{let t=x[e]||[];if(t.length===0)return null;let n=ve[e];return(0,f.jsxs)(`div`,{style:{marginBottom:20},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:8},children:[n&&(0,f.jsx)(Ee,{category:e,size:16}),(0,f.jsx)(`span`,{style:{fontSize:11,fontWeight:700,letterSpacing:`.08em`,textTransform:`uppercase`,color:A.textSec},children:e}),(0,f.jsx)(`div`,{style:{flex:1,height:1,background:A.border,opacity:.4}})]}),(0,f.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(130px, 1fr))`,gap:6},children:t.map(e=>(0,f.jsx)(Oe,{model:e,isCurrent:e.id===_,isFavorite:p.includes(e.id),onSelect:()=>ee(e),onToggleFav:()=>g(e.id)},e.id))})]},e)}):(0,f.jsx)(f.Fragment,{children:b.length>0&&(0,f.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(130px, 1fr))`,gap:6},children:b.map(e=>(0,f.jsx)(Oe,{model:e,isCurrent:e.id===_,isFavorite:p.includes(e.id),onSelect:()=>ee(e),onToggleFav:()=>g(e.id)},e.id))})})]})]})}function Oe({model:e,isCurrent:t,isFavorite:n,onSelect:r,onToggleFav:i}){let a=Te(e.type),[o,s]=(0,l.useState)(!1);return(0,f.jsxs)(`div`,{onClick:r,style:{display:`flex`,flexDirection:`column`,gap:0,padding:`10px 8px 8px`,borderRadius:8,background:t?`linear-gradient(135deg, ${a}18, ${A.panel})`:A.surface,border:`1.5px solid ${t?a+`66`:A.border}`,cursor:`pointer`,position:`relative`,transition:`all .12s`,boxShadow:t?`0 0 12px ${a}33`:`none`,minHeight:72},children:[(0,f.jsx)(`div`,{onClick:e=>{e.stopPropagation(),i()},style:{position:`absolute`,top:4,right:4,fontSize:13,cursor:`pointer`,zIndex:2,color:n?A.amber:A.textDim,textShadow:n?`0 0 4px ${A.amber}`:`none`,transition:`all .15s`,lineHeight:1},children:n?`★`:`☆`}),(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,height:34,marginBottom:6},children:o?(0,f.jsx)(`span`,{style:{fontSize:18,color:a,opacity:.7,fontFamily:`'JetBrains Mono', monospace`,fontWeight:700},children:e.name.charAt(0)}):(0,f.jsx)(`img`,{src:`${_e}${we(e.iconType||e.type)}.svg`,alt:e.type,style:{width:28,height:28,filter:`invert(0.95) brightness(2) drop-shadow(0 0 4px ${a}44)`,objectFit:`contain`},onError:()=>s(!0)})}),(0,f.jsx)(`div`,{style:{fontSize:11,fontWeight:600,color:t?a:A.textPrimary,textAlign:`center`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,lineHeight:1.3},children:e.name}),(0,f.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,marginTop:3},children:(0,f.jsx)(`span`,{style:{display:`inline-flex`,padding:`1px 5px`,borderRadius:3,fontSize:8,fontWeight:700,letterSpacing:`.05em`,textTransform:`uppercase`,background:`${a}18`,color:a},children:e.type.replace(/_/g,` `)})}),e.desc&&(0,f.jsx)(`div`,{style:{fontSize:8,color:A.textDim,textAlign:`center`,marginTop:3,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.desc}),t&&(0,f.jsx)(`div`,{style:{position:`absolute`,top:4,left:4,width:6,height:6,borderRadius:`50%`,background:A.green,boxShadow:`0 0 6px ${A.green}`}})]})}var j={bg:`#0A0A0C`,panel:`#141418`,surface:`#1C1C22`,border:`#2A2A32`,amber:`#E8A030`,amberDim:`#7A5218`,blue:`#4A8BC8`,blueDim:`#1E4060`,green:`#3AB87A`,red:`#E06060`,textPrimary:`#F0EDE6`,textSec:`#A0A0BC`,textDim:`#7878A0`},ke=[{id:`save`,label:`Save Preset`,icon:`💾`,desc:`Save current preset to bank`},{id:`bypass`,label:`Bypass/Control`,icon:`🔌`,desc:`Footswitch & pedal assignment`},{id:`settings`,label:`Global Settings`,icon:`⚙`,desc:`Master volume, input, MIDI, display`},{id:`eq`,label:`Global EQ`,icon:`📊`,desc:`Low, Mid, High shelving EQ`},{id:`tuner`,label:`Tuner`,icon:`🎵`,desc:`Instrument tuner`},{id:`wifi`,label:`Wi-Fi / Bluetooth`,icon:`📶`,desc:`Wireless & network settings`}];function Ae({onClose:e,onItemSelect:t}){let n=(0,l.useRef)(null),r=(0,l.useRef)(null);return(0,l.useEffect)(()=>{let e=n.current;e&&requestAnimationFrame(()=>{e.style.transform=`translateX(0)`})},[]),(0,f.jsx)(`div`,{ref:r,onClick:t=>{t.target===t.currentTarget&&e?.()},style:{position:`fixed`,inset:0,zIndex:999,display:`flex`,background:`rgba(0,0,0,0.55)`,transition:`background .2s ease`},children:(0,f.jsxs)(`div`,{ref:n,style:{width:260,maxWidth:`75vw`,height:`100%`,background:j.panel,borderRight:`1px solid ${j.border}`,display:`flex`,flexDirection:`column`,boxShadow:`4px 0 24px rgba(0,0,0,0.5)`,transform:`translateX(-100%)`,transition:`transform .22s cubic-bezier(.22,.61,.36,1)`},children:[(0,f.jsxs)(`div`,{style:{padding:`14px 16px`,borderBottom:`1px solid ${j.border}`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,flexShrink:0},children:[(0,f.jsx)(`div`,{style:{fontSize:14,fontWeight:600,color:j.textPrimary},children:`☰ Menu`}),(0,f.jsx)(`button`,{onClick:e,style:{width:28,height:28,borderRadius:6,display:`flex`,alignItems:`center`,justifyContent:`center`,background:j.surface,border:`1px solid ${j.border}`,color:j.textSec,fontSize:13,cursor:`pointer`},children:`✕`})]}),(0,f.jsx)(`div`,{style:{flex:1,overflowY:`auto`,padding:`8px 0`},children:ke.map(e=>(0,f.jsxs)(`button`,{onClick:()=>t?.(e.id),style:{width:`100%`,display:`flex`,alignItems:`center`,gap:12,padding:`12px 16px`,background:`none`,border:`none`,cursor:`pointer`,textAlign:`left`,color:j.textPrimary,transition:`background .1s`,borderBottom:`1px solid ${j.border}33`},onMouseEnter:e=>{e.currentTarget.style.background=j.surface},onMouseLeave:e=>{e.currentTarget.style.background=`none`},children:[(0,f.jsx)(`div`,{style:{width:34,height:34,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,background:j.surface,border:`1px solid ${j.border}`,fontSize:16,flexShrink:0},children:e.icon}),(0,f.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,f.jsx)(`div`,{style:{fontSize:13,fontWeight:600,color:j.textPrimary},children:e.label}),(0,f.jsx)(`div`,{style:{fontSize:10,color:j.textDim,marginTop:1,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.desc})]}),(0,f.jsx)(`span`,{style:{color:j.textDim,fontSize:11},children:`›`})]},e.id))}),(0,f.jsx)(`div`,{style:{padding:`12px 16px`,borderTop:`1px solid ${j.border}`,flexShrink:0},children:(0,f.jsx)(`div`,{style:{fontSize:9,color:j.textDim,textAlign:`center`,letterSpacing:`.06em`},children:`Helix Stadium v0.1`})})]})})}var M={bg:`#0A0A0C`,panel:`#141418`,surface:`#1C1C22`,border:`#2A2A32`,amber:`#E8A030`,amberDim:`#7A5218`,blue:`#4A8BC8`,blueDim:`#1E4060`,green:`#3AB87A`,red:`#E06060`,textPrimary:`#F0EDE6`,textSec:`#A0A0BC`,textDim:`#7878A0`};async function je(e,t,n){let r={method:e,headers:{"Content-Type":`application/json`}};n&&(r.body=JSON.stringify(n));let i=await fetch(`${t}`,r);if(!i.ok)throw Error(`API ${e} ${t}: ${i.status}`);return i.json()}var Me={Audio:[{key:`master_volume`,label:`Master Volume`,type:`slider`,min:0,max:100,def:72,unit:`%`,icon:`🔊`,via:`volume`},{key:`sample_rate`,label:`Sample Rate`,type:`select`,def:`48000`,options:[{value:`22050`,label:`22.05 kHz`},{value:`44100`,label:`44.1 kHz`},{value:`48000`,label:`48 kHz`},{value:`88200`,label:`88.2 kHz`},{value:`96000`,label:`96 kHz`}],icon:`📊`,via:`audio_profile`},{key:`buffer_size`,label:`Buffer Size`,type:`select`,def:`512`,options:[{value:`64`,label:`64 (1.3ms)`},{value:`128`,label:`128 (2.7ms)`},{value:`256`,label:`256 (5.3ms)`},{value:`512`,label:`512 (10.6ms)`},{value:`1024`,label:`1024 (21.3ms)`}],icon:`📦`,via:`audio_profile`},{key:`input_pad`,label:`Input Pad`,type:`select`,def:`off`,options:[{value:`off`,label:`Off (0 dB)`},{value:`-6`,label:`-6 dB`},{value:`-12`,label:`-12 dB`},{value:`-18`,label:`-18 dB`}],icon:`📥`,via:`settings`},{key:`input_impedance`,label:`Input Impedance`,type:`select`,def:`1m`,options:[{value:`1m`,label:`1 MΩ`},{value:`500k`,label:`500 kΩ`},{value:`250k`,label:`250 kΩ`},{value:`150k`,label:`150 kΩ`},{value:`68k`,label:`68 kΩ`}],icon:`⚡`,via:`settings`}],Routing:[{key:`routing_mode`,label:`Routing Mode`,type:`select`,def:`mono`,options:[{value:`mono`,label:`Mono`},{value:`4cm`,label:`4CM (Stereo FX Loop)`}],icon:`🔀`,via:`routing`},{key:`routing_breakpoint`,label:`FX Loop Breakpoint`,type:`select`,def:`7`,options:[{value:`1`,label:`After block 1`},{value:`2`,label:`After block 2`},{value:`3`,label:`After block 3`},{value:`4`,label:`After block 4`},{value:`5`,label:`After block 5`},{value:`6`,label:`After block 6`},{value:`7`,label:`After block 7`},{value:`8`,label:`After block 8`}],icon:`↔`,via:`routing`}],"Audio Interface":[{key:`input_device`,label:`Input Device`,type:`select`,def:`hw:0,0`,options:[{value:`hw:0,0`,label:`Default (hw:0,0)`},{value:`hw:1,0`,label:`USB Audio (hw:1,0)`},{value:`hw:2,0`,label:`HDMI Audio (hw:2,0)`}],icon:`🎤`,via:`settings`},{key:`output_device`,label:`Output Device`,type:`select`,def:`hw:0,0`,options:[{value:`hw:0,0`,label:`Default (hw:0,0)`},{value:`hw:1,0`,label:`USB Audio (hw:1,0)`},{value:`hw:2,0`,label:`HDMI Audio (hw:2,0)`}],icon:`🔈`,via:`settings`},{key:`channel_mode`,label:`Channel Mode`,type:`select`,def:`mono`,options:[{value:`mono`,label:`Mono`},{value:`dual-mono`,label:`Dual Mono`},{value:`stereo_4cm`,label:`Stereo (4CM)`}],icon:`🔊`,via:`settings`}],MIDI:[{key:`midi_channel`,label:`MIDI Channel`,type:`select`,def:`omni`,options:[{value:`omni`,label:`Omni`},...Array.from({length:16},(e,t)=>({value:String(t+1),label:`Channel ${t+1}`}))],icon:`🎹`,via:`settings`},{key:`midi_clock`,label:`MIDI Clock`,type:`toggle`,def:!1,via:`settings`,icon:`⏱`},{key:`midi_thru`,label:`MIDI Thru`,type:`toggle`,def:!0,via:`settings`,icon:`↔`}],Display:[{key:`brightness`,label:`Display Brightness`,type:`slider`,min:1,max:10,def:8,unit:``,icon:`☀️`,via:`settings`},{key:`auto_dim`,label:`Auto Dim`,type:`toggle`,def:!0,via:`settings`,icon:`🌙`},{key:`screen_saver`,label:`Screen Saver`,type:`select`,def:`5m`,options:[{value:`off`,label:`Off`},{value:`1m`,label:`1 min`},{value:`5m`,label:`5 min`},{value:`15m`,label:`15 min`},{value:`30m`,label:`30 min`}],icon:`💤`,via:`settings`}],Tempo:[{key:`tap_tempo`,label:`Tap Tempo`,type:`bpm`,def:120,via:`settings`,icon:`🔄`},{key:`tempo_division`,label:`Tempo Division`,type:`select`,def:`quarter`,options:[{value:`half`,label:`½ Note`},{value:`quarter`,label:`¼ Note`},{value:`eighth`,label:`⅛ Note`},{value:`triplet`,label:`⅛ Triplet`},{value:`sixteenth`,label:`¹⁄₁₆ Note`},{value:`dotted_eighth`,label:`Dotted ⅛`}],icon:`🎶`,via:`settings`},{key:`tap_tempo_mute`,label:`Mute on Tap`,type:`toggle`,def:!1,via:`settings`,icon:`🔇`}]};function Ne(e={}){let t={};for(let e of Object.values(Me))for(let n of e)t[n.key]=n.def;return{...t,...e}}function Pe({label:e,value:t,min:n,max:r,unit:i,onChange:a}){let o=(0,l.useRef)(null),s=(0,l.useRef)(!1),c=(t-n)/(r-n)*100,u=(0,l.useCallback)(e=>{let i=o.current;if(!i)return t;let a=i.getBoundingClientRect(),s=(e.touches?e.touches[0].clientX:e.clientX)-a.left;return Math.round(n+Math.max(0,Math.min(1,s/a.width))*(r-n))},[n,r,t]);(0,l.useEffect)(()=>{let e=e=>{s.current&&(e.preventDefault(),a?.(u(e)))},t=()=>{s.current=!1};return window.addEventListener(`mousemove`,e),window.addEventListener(`mouseup`,t),window.addEventListener(`touchmove`,e,{passive:!1}),window.addEventListener(`touchend`,t),()=>{window.removeEventListener(`mousemove`,e),window.removeEventListener(`mouseup`,t),window.removeEventListener(`touchmove`,e),window.removeEventListener(`touchend`,t)}},[u,a]);let d=e=>{e.preventDefault(),s.current=!0,a?.(u(e))},p=e=>i=>{i.preventDefault(),i.stopPropagation(),a?.(Math.max(n,Math.min(r,t+e)))};return(0,f.jsxs)(`div`,{children:[(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:4},children:[(0,f.jsx)(`span`,{style:{fontSize:11,fontWeight:500,color:M.textSec},children:e}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:6,alignItems:`center`},children:[(0,f.jsx)(`button`,{style:{width:26,height:26,borderRadius:`50%`,border:`1px solid ${M.border}`,background:M.panel,color:M.textPrimary,fontSize:14,fontWeight:700,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,lineHeight:1},onMouseDown:p(-1),onTouchStart:p(-1),children:`−`}),(0,f.jsxs)(`span`,{style:{fontFamily:`'JetBrains Mono', monospace`,fontSize:14,fontWeight:700,color:M.amber,minWidth:36,textAlign:`center`},children:[t,i]}),(0,f.jsx)(`button`,{style:{width:26,height:26,borderRadius:`50%`,border:`1px solid ${M.border}`,background:M.panel,color:M.textPrimary,fontSize:14,fontWeight:700,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,lineHeight:1},onMouseDown:p(1),onTouchStart:p(1),children:`+`})]})]}),(0,f.jsxs)(`div`,{ref:o,onMouseDown:d,onTouchStart:d,style:{position:`relative`,height:32,display:`flex`,alignItems:`center`,cursor:`pointer`,touchAction:`none`},children:[(0,f.jsx)(`div`,{style:{width:`100%`,height:6,background:M.border,borderRadius:3,position:`relative`,overflow:`hidden`},children:(0,f.jsx)(`div`,{style:{height:`100%`,borderRadius:3,position:`absolute`,top:0,left:0,width:`${c}%`,background:M.amber,boxShadow:`0 0 6px ${M.amber}44`,transition:`width .03s`}})}),(0,f.jsx)(`div`,{style:{width:24,height:24,borderRadius:`50%`,position:`absolute`,top:`50%`,left:`${c}%`,transform:`translate(-50%,-50%)`,background:M.amber,border:`3px solid ${M.bg}`,boxShadow:`0 1px 6px rgba(0,0,0,.5)`,pointerEvents:`none`,transition:`left .03s`}})]})]})}function Fe({label:e,value:t,options:n,onChange:r}){return(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:6},children:(0,f.jsx)(`span`,{style:{fontSize:11,fontWeight:500,color:M.textSec},children:e})}),(0,f.jsx)(`div`,{style:{display:`flex`,gap:4,flexWrap:`wrap`,background:M.panel,borderRadius:6,padding:4},children:n.map(e=>(0,f.jsx)(`button`,{onClick:()=>r?.(e.value),style:{flex:1,padding:`6px 8px`,borderRadius:4,border:`none`,fontSize:10,fontWeight:600,cursor:`pointer`,background:t===e.value?M.amber:`transparent`,color:t===e.value?`#000`:M.textSec,transition:`all .1s`,letterSpacing:`.03em`,whiteSpace:`nowrap`,minWidth:0},children:e.label},e.value))})]})}function Ie({label:e,value:t,onChange:n}){return(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`4px 0`},children:[(0,f.jsx)(`span`,{style:{fontSize:11,fontWeight:500,color:M.textSec},children:e}),(0,f.jsx)(`button`,{onClick:()=>n?.(!t),style:{width:44,height:24,borderRadius:12,background:t?M.amber:M.border,border:`none`,cursor:`pointer`,position:`relative`,transition:`background .15s`},children:(0,f.jsx)(`div`,{style:{width:18,height:18,borderRadius:`50%`,background:`#fff`,position:`absolute`,top:3,left:t?23:3,transition:`left .15s`,boxShadow:`0 1px 3px rgba(0,0,0,.3)`}})})]})}function Le({label:e,value:t,onChange:n}){let r=(0,l.useRef)([]),i=(0,l.useCallback)(()=>{let e=Date.now();if(r.current.push(e),r.current.length>4&&r.current.shift(),r.current.length<2)return;let t=[];for(let e=1;ee+t,0)/t.length,a=Math.max(20,Math.min(300,Math.round(6e4/i)));n?.(a)},[n]);return(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:6},children:(0,f.jsx)(`span`,{style:{fontSize:11,fontWeight:500,color:M.textSec},children:e})}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`},children:[(0,f.jsx)(`button`,{onClick:i,style:{padding:`8px 20px`,borderRadius:8,border:`1px solid ${M.amber}66`,background:`${M.amber}15`,color:M.amber,fontSize:12,fontWeight:700,cursor:`pointer`,letterSpacing:`.05em`},children:`TAP`}),(0,f.jsxs)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,gap:4,background:M.surface,borderRadius:6,border:`1px solid ${M.border}`,padding:`6px 10px`},children:[(0,f.jsx)(`button`,{onClick:()=>n?.(Math.max(20,t-1)),style:{background:`none`,border:`none`,color:M.textDim,fontSize:14,cursor:`pointer`,padding:`0 4px`},children:`−`}),(0,f.jsxs)(`span`,{style:{flex:1,textAlign:`center`,fontFamily:`'JetBrains Mono', monospace`,fontSize:16,fontWeight:700,color:M.amber},children:[t,` BPM`]}),(0,f.jsx)(`button`,{onClick:()=>n?.(Math.min(300,t+1)),style:{background:`none`,border:`none`,color:M.textDim,fontSize:14,cursor:`pointer`,padding:`0 4px`},children:`+`})]})]})]})}function Re({onClose:e,onMasterVolume:t,onAudioProfile:n,onRoutingChange:r,onSaveSettings:i}){let[a,o]=(0,l.useState)(Ne()),[s,c]=(0,l.useState)(!1);(0,l.useEffect)(()=>{let e=!1;return Promise.all([je(`GET`,`/api/state`).catch(()=>null),je(`GET`,`/api/audio/profile`).catch(()=>null),je(`GET`,`/api/routing`).catch(()=>null)]).then(([t,n,r])=>{if(e)return;let i={};t&&(t.master_volume!=null&&(i.master_volume=Math.round(t.master_volume*100)),t.sample_rate!=null&&(i.sample_rate=String(t.sample_rate)),t.channel_mode&&(i.channel_mode=t.channel_mode)),n&&(n.rate!=null&&(i.sample_rate=String(n.rate)),n.period!=null&&(i.buffer_size=String(n.period))),r&&(r.routing_mode&&(i.routing_mode=r.routing_mode),r.routing_breakpoint!=null&&(i.routing_breakpoint=String(r.routing_breakpoint))),o(e=>({...e,...i})),c(!0)}),()=>{e=!0}},[]);let u=Object.entries(Me),d=(0,l.useCallback)((e,a)=>{o(o=>{let s={...o,[e]:a};if(e===`master_volume`)t?.(a);else if(e===`sample_rate`||e===`buffer_size`){let t=e===`sample_rate`?a:s.sample_rate||`48000`,r=e===`buffer_size`?a:s.buffer_size||`512`;n?.(parseInt(t),parseInt(r))}else if(e===`routing_mode`||e===`routing_breakpoint`){let t=e===`routing_mode`?a:s.routing_mode||`mono`,n=e===`routing_breakpoint`?a:s.routing_breakpoint||`7`;r?.(t,parseInt(n))}else i?.({[e]:a});return s})},[t,n,r,i]);return(0,f.jsxs)(`div`,{style:{position:`fixed`,inset:0,zIndex:998,display:`flex`,flexDirection:`column`,background:M.bg,color:M.textPrimary,fontFamily:`'Inter', sans-serif`},children:[(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`10px 14px`,borderBottom:`1px solid ${M.border}`,background:M.panel,flexShrink:0},children:(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,f.jsx)(`button`,{onClick:e,style:{width:34,height:34,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,background:M.surface,border:`1px solid ${M.border}`,color:M.textPrimary,fontSize:16,cursor:`pointer`},children:`✕`}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{style:{fontSize:15,fontWeight:600},children:`Settings`}),!s&&(0,f.jsx)(`span`,{style:{fontSize:10,color:M.textDim},children:`Loading…`})]})]})}),(0,f.jsx)(`div`,{style:{flex:1,overflowY:`auto`,overflowX:`hidden`,padding:`6px 14px 20px`},children:u.map(([e,t])=>(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{style:{fontSize:10,fontWeight:700,letterSpacing:`.1em`,textTransform:`uppercase`,color:M.textDim,padding:`14px 0 8px`},children:e}),(0,f.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12,background:M.surface,borderRadius:8,border:`1px solid ${M.border}`,padding:`12px 14px`},children:t.map(e=>(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`flex-start`,gap:10},children:[(0,f.jsx)(`div`,{style:{width:28,height:28,borderRadius:6,flexShrink:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:M.panel,fontSize:13},children:e.icon}),(0,f.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[e.type===`slider`&&(0,f.jsx)(Pe,{label:e.label,value:a[e.key]??e.def,min:e.min,max:e.max,unit:e.unit,onChange:t=>d(e.key,t)}),e.type===`select`&&(0,f.jsx)(Fe,{label:e.label,value:a[e.key]??e.def,options:e.options,onChange:t=>d(e.key,t)}),e.type===`toggle`&&(0,f.jsx)(Ie,{label:e.label,value:a[e.key]??e.def,onChange:t=>d(e.key,t)}),e.type===`bpm`&&(0,f.jsx)(Le,{label:e.label,value:a[e.key]??e.def,onChange:t=>d(e.key,t)})]})]},e.key))})]},e))})]})}var N={bg:`#0A0A0C`,panel:`#141418`,surface:`#1C1C22`,border:`#2A2A32`,amber:`#E8A030`,amberDim:`#7A5218`,blue:`#4A8BC8`,blueDim:`#1E4060`,green:`#3AB87A`,red:`#E06060`,textPrimary:`#F0EDE6`,textSec:`#A0A0BC`,textDim:`#7878A0`},ze=[{key:`low`,label:`Low`,freq:`80 Hz`,color:`#60A0E0`,shadow:`#60A0E044`},{key:`mid`,label:`Mid`,freq:`800 Hz`,color:N.amber,shadow:`${N.amber}44`},{key:`high`,label:`High`,freq:`6.4 kHz`,color:`#60D080`,shadow:`#60D08044`}];function Be({label:e,freq:t,value:n,min:r,max:i,color:a,onChange:o}){let s=(0,l.useRef)(null),c=(n-r)/(i-r),u=-140+c*280,d=80*.38,p=e=>{e.preventDefault(),s.current={y:e.touches?e.touches[0].clientY:e.clientY,val:n};let t=e=>{let t=e.touches?e.touches[0].clientY:e.clientY,n=(s.current.y-t)/120,a=Math.max(r,Math.min(i,s.current.val+n*(i-r)));o?.(Math.round(a*10)/10)},a=()=>{window.removeEventListener(`mousemove`,t),window.removeEventListener(`mouseup`,a),window.removeEventListener(`touchmove`,t),window.removeEventListener(`touchend`,a)};window.addEventListener(`mousemove`,t),window.addEventListener(`mouseup`,a),window.addEventListener(`touchmove`,t,{passive:!1}),window.addEventListener(`touchend`,a)},m=48+44*Math.cos(Math.PI/180*-230),h=48+44*Math.sin(Math.PI/180*-230),g=48+44*Math.cos((u-90)*(Math.PI/180)),_=48+44*Math.sin((u-90)*(Math.PI/180)),v=+(c*280>180);return(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:4,cursor:`pointer`,minWidth:0},children:[(0,f.jsxs)(`div`,{style:{width:80,height:80,position:`relative`,touchAction:`none`},onMouseDown:p,onTouchStart:p,children:[(0,f.jsxs)(`svg`,{style:{position:`absolute`,inset:-8,width:96,height:96,overflow:`visible`},children:[(0,f.jsx)(`circle`,{cx:48,cy:48,r:44,fill:`none`,stroke:N.border,strokeWidth:`3`,strokeLinecap:`round`,opacity:`.5`}),c>0&&(0,f.jsx)(`path`,{d:`M ${m} ${h} A 44 44 0 ${v} 1 ${g} ${_}`,fill:`none`,stroke:a,strokeWidth:`3`,strokeLinecap:`round`,style:{filter:`drop-shadow(0 0 4px ${a})`}})]}),(0,f.jsx)(`div`,{style:{borderRadius:`50%`,width:`100%`,height:`100%`,position:`relative`,background:`radial-gradient(circle at 35% 30%, #3A3A48, #1A1A22)`,boxShadow:`0 3px 12px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.07)`},children:(0,f.jsx)(`div`,{style:{position:`absolute`,width:4,borderRadius:2,background:a,left:`50%`,transformOrigin:`bottom center`,height:d,top:9.600000000000001,transform:`translateX(-50%) rotate(${u}deg)`,transformOrigin:`50% ${d}px`,boxShadow:`0 0 6px ${a}`}})})]}),(0,f.jsxs)(`div`,{style:{fontFamily:`'JetBrains Mono', monospace`,fontSize:14,fontWeight:700,color:a},children:[n>0?`+${n}`:n,` dB`]}),(0,f.jsx)(`div`,{style:{fontSize:8,color:N.textDim,letterSpacing:`.08em`,textTransform:`uppercase`},children:e}),(0,f.jsx)(`div`,{style:{fontSize:8,color:N.textDim,fontFamily:`'JetBrains Mono', monospace`},children:t})]})}function Ve({bands:e,values:t}){let n=(0,l.useRef)(null);return(0,l.useEffect)(()=>{let r=n.current;if(!r)return;let i=r.getContext(`2d`),a=r.width,o=r.height,s={top:10,bottom:10,left:20,right:10},c=a-s.left-s.right,l=o-s.top-s.bottom;i.clearRect(0,0,a,o),i.strokeStyle=N.border,i.lineWidth=.5;for(let e=-12;e<=12;e+=4){let t=s.top+l*(1-(e+12)/24);i.beginPath(),i.moveTo(s.left,t),i.lineTo(a-s.right,t),i.stroke(),i.fillStyle=N.textDim,i.font=`7px 'JetBrains Mono', monospace`,i.textAlign=`right`,i.fillText(`${e>0?`+`:``}${e}`,s.left-2,t+2)}let u={low:s.left+c*.1,mid:s.left+c*.5,high:s.left+c*.9},d={};e.forEach((e,t)=>{d[e.key]=t});let f=e.map(e=>t[e.key]??0),p=[],m=[];for(let t=0;t<=100;t++){let n=t/100,r=s.left+c*n;e.map((e,t)=>({x:u[e.key],y:-(f[t]||0)}));let i=0;if(n<.1)i=f[0]*(n/.1);else if(n>.9)i=f[2]*((1-n)/.1);else{let e=(n-.1)/.8,t=f[0],r=f[1],a=f[2];i=(1-e)*(1-e)*t+2*(1-e)*e*r+e*e*a}let a=s.top+l*(.5-i/24);p.push(r),m.push(a)}i.beginPath(),i.moveTo(p[0],s.top+l);for(let e=0;e{let t=u[e.key],n=f[d[e.key]]||0,r=s.top+l*(.5-n/24);i.beginPath(),i.arc(t,r,5,0,Math.PI*2),i.fillStyle=e.color,i.fill(),i.strokeStyle=N.bg,i.lineWidth=2,i.stroke()}),i.fillStyle=N.textDim,i.font=`7px 'JetBrains Mono', monospace`,i.textAlign=`center`,i.fillText(`80Hz`,u.low,o-2),i.fillText(`800Hz`,u.mid,o-2),i.fillText(`6.4kHz`,u.high,o-2)},[e,t]),(0,f.jsx)(`canvas`,{ref:n,width:320,height:160,style:{width:`100%`,height:140,borderRadius:8,background:N.panel,border:`1px solid ${N.border}`}})}function He({onClose:e}){let[t,n]=(0,l.useState)({low:0,mid:0,high:0}),r=(0,l.useCallback)((e,t)=>{n(n=>({...n,[e]:t}))},[]);return(0,f.jsxs)(`div`,{style:{position:`fixed`,inset:0,zIndex:998,display:`flex`,flexDirection:`column`,background:N.bg,color:N.textPrimary,fontFamily:`'Inter', sans-serif`},children:[(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`10px 14px`,borderBottom:`1px solid ${N.border}`,background:N.panel,flexShrink:0},children:(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,f.jsx)(`button`,{onClick:e,style:{width:34,height:34,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,background:N.surface,border:`1px solid ${N.border}`,color:N.textPrimary,fontSize:16,cursor:`pointer`},children:`✕`}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{style:{fontSize:15,fontWeight:600},children:`Global EQ`}),(0,f.jsx)(`div`,{style:{fontSize:10,color:N.textSec,marginTop:1},children:`3-band shelving equalizer`})]})]})}),(0,f.jsxs)(`div`,{style:{flex:1,overflowY:`auto`,overflowX:`hidden`,padding:`8px 14px`,display:`flex`,flexDirection:`column`,gap:12},children:[(0,f.jsx)(Ve,{bands:ze,values:t}),(0,f.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-around`,gap:8,background:N.surface,borderRadius:8,border:`1px solid ${N.border}`,padding:`16px 8px`},children:ze.map(e=>(0,f.jsx)(Be,{label:e.label,freq:e.freq,value:t[e.key],min:-12,max:12,color:e.color,onChange:t=>r(e.key,t)},e.key))}),(0,f.jsx)(`button`,{onClick:()=>n({low:0,mid:0,high:0}),style:{width:`100%`,padding:`10px 14px`,borderRadius:8,background:N.surface,border:`1px solid ${N.border}`,color:N.textSec,fontSize:11,fontWeight:600,cursor:`pointer`,letterSpacing:`.06em`},children:`Reset EQ to Flat`})]})]})}var Ue=``;async function P(e,t,n){let r={method:e,headers:{"Content-Type":`application/json`}};n&&(r.body=JSON.stringify(n));let i=await fetch(`${Ue}${t}`,r);if(!i.ok)throw Error(`API ${e} ${t}: ${i.status}`);return i.json()}var F={getState:()=>P(`GET`,`/api/state`),getVu:()=>P(`GET`,`/api/vu`),updateBlock:(e,t)=>P(`PATCH`,`/api/block-params`,{id:e,...t}),toggleBlock:(e,t)=>P(`PATCH`,`/api/blocks`,{id:e,enabled:t}),bypassToggle:()=>P(`POST`,`/api/bypass/toggle`),masterVolume:e=>P(`POST`,`/api/volume`,{volume:e/100}),listModels:()=>P(`GET`,`/api/models`),loadModel:e=>P(`POST`,`/api/models/load`,{path:e}),listPresets:()=>P(`GET`,`/api/presets`),getPreset:(e,t)=>P(`GET`,`/api/presets/${e}/${t}`),activatePreset:(e,t)=>P(`POST`,`/api/presets/${e}/${t}/activate`),savePreset:(e,t,n,r)=>P(`PUT`,`/api/presets/${e}/${t}`,{name:n,chain:[],master_volume:.8,tags:r}),setAudioProfile:(e,t)=>P(`POST`,`/api/audio/profile`,{profile:`stable`,rate:parseInt(e),period:parseInt(t)}),getAudioProfile:()=>P(`GET`,`/api/audio/profile`),getRouting:()=>P(`GET`,`/api/routing`),setRouting:(e,t)=>P(`POST`,`/api/routing`,{routing_mode:e,routing_breakpoint:t}),saveSettings:e=>P(`POST`,`/api/settings`,e),searchModels:e=>P(`GET`,`/api/tonehub/search?q=${encodeURIComponent(e)}`),searchIrs:e=>P(`GET`,`/api/tonehub/search/irs?q=${encodeURIComponent(e)}`),installModel:(e,t)=>P(`POST`,`/api/models/tonedownload/install`,{download_url:e,name:t}),installIr:(e,t)=>P(`POST`,`/api/irs/tonedownload/install`,{download_url:e,name:t}),tunerToggle:e=>P(`POST`,`/api/tuner`,{enabled:e})},I={bg:`#0A0A0C`,panel:`#141418`,surface:`#1C1C22`,border:`#2A2A32`,amber:`#E8A030`,amberDim:`#7A5218`,blue:`#4A8BC8`,blueDim:`#1E4060`,green:`#3AB87A`,red:`#E06060`,textPrimary:`#F0EDE6`,textSec:`#A0A0BC`,textDim:`#7878A0`},We={overdrive:[{key:`drive`,label:`Drive`,min:0,max:100,def:30},{key:`tone`,label:`Tone`,min:0,max:100,def:50},{key:`level`,label:`Level`,min:0,max:100,def:70}],distortion:[{key:`drive`,label:`Drive`,min:0,max:100,def:50},{key:`tone`,label:`Tone`,min:0,max:100,def:40},{key:`level`,label:`Level`,min:0,max:100,def:60}],fuzz:[{key:`fuzz`,label:`Fuzz`,min:0,max:100,def:60},{key:`tone`,label:`Tone`,min:0,max:100,def:30},{key:`level`,label:`Level`,min:0,max:100,def:60}],delay:[{key:`time`,label:`Time`,min:0,max:100,def:40},{key:`feedback`,label:`Feedback`,min:0,max:100,def:30},{key:`mix`,label:`Mix`,min:0,max:100,def:35}],echo:[{key:`time`,label:`Time`,min:0,max:100,def:40},{key:`feedback`,label:`Feedback`,min:0,max:100,def:30},{key:`mix`,label:`Mix`,min:0,max:100,def:35}],reverb:[{key:`decay`,label:`Decay`,min:0,max:100,def:50},{key:`mix`,label:`Mix`,min:0,max:100,def:30},{key:`tone`,label:`Tone`,min:0,max:100,def:50}],chorus:[{key:`rate`,label:`Rate`,min:0,max:100,def:40},{key:`depth`,label:`Depth`,min:0,max:100,def:40},{key:`mix`,label:`Mix`,min:0,max:100,def:30}],flanger:[{key:`rate`,label:`Rate`,min:0,max:100,def:30},{key:`depth`,label:`Depth`,min:0,max:100,def:50},{key:`feedback`,label:`Feedback`,min:0,max:100,def:40},{key:`mix`,label:`Mix`,min:0,max:100,def:30}],phaser:[{key:`rate`,label:`Rate`,min:0,max:100,def:30},{key:`depth`,label:`Depth`,min:0,max:100,def:50},{key:`feedback`,label:`Feedback`,min:0,max:100,def:40},{key:`mix`,label:`Mix`,min:0,max:100,def:30}],compressor:[{key:`threshold`,label:`Thresh`,min:0,max:100,def:50},{key:`ratio`,label:`Ratio`,min:1,max:20,def:4},{key:`gain`,label:`Gain`,min:0,max:100,def:50}],gate:[{key:`threshold`,label:`Thresh`,min:0,max:100,def:30},{key:`release`,label:`Release`,min:0,max:100,def:50}],eq:[{key:`low`,label:`Low`,min:-12,max:12,def:0},{key:`mid`,label:`Mid`,min:-12,max:12,def:0},{key:`high`,label:`High`,min:-12,max:12,def:0},{key:`level`,label:`Level`,min:0,max:100,def:70}],cabinet:[{key:`level`,label:`Level`,min:0,max:100,def:75}],ir:[{key:`level`,label:`Level`,min:0,max:100,def:75}],split:[{key:`splitType`,label:`Split Type`,type:`select`,options:[{value:`y`,label:`Y — Split evenly`,pan:!0},{value:`ab`,label:`A/B — Route to A or B`,pan:!1},{value:`cascade`,label:`Cascade — A feeds B`,pan:!0},{value:`a_to_b`,label:`A→B — Serial extension`,pan:!1}],def:`y`},{key:`panA`,label:`Pan A`,min:0,max:100,def:50,conditional:e=>e.splitType!==`ab`},{key:`panB`,label:`Pan B`,min:0,max:100,def:50,conditional:e=>e.splitType!==`ab`},{key:`activePath`,label:`Active Path`,type:`select`,options:[{value:`A`,label:`A`},{value:`B`,label:`B`}],def:`A`,conditional:e=>e.splitType===`ab`}],merge:[{key:`blend`,label:`Blend`,min:0,max:100,def:100},{key:`levelA`,label:`Level A`,min:0,max:100,def:100},{key:`panA`,label:`Pan A`,min:-100,max:100,def:0},{key:`levelB`,label:`Level B`,min:0,max:100,def:100},{key:`panB`,label:`Pan B`,min:-100,max:100,def:0}]},Ge={overdrive:I.amber,distortion:I.red,fuzz:`#C07030`,delay:I.blue,echo:I.blue,reverb:`#60B0D0`,chorus:I.green,flanger:`#50C080`,phaser:`#80C050`,tremolo:I.green,compressor:`#D09040`,gate:I.textSec,eq:`#7080D0`,cabinet:`#D07090`,ir:`#D07090`,nam:`#E0A040`,nam_amp:`#E0A040`,boost:I.amber,wah:`#D0A060`,volume:I.textSec,tuner:`#80D0A0`,split:`#B080C0`,merge:`#80B0C0`},Ke={overdrive:`OD-808`,distortion:`RAT`,fuzz:`Big Muff`,delay:`Digital Delay`,echo:`Tape Echo`,reverb:`Hall Reverb`,chorus:`Chorus`,flanger:`Flanger`,phaser:`Phase 90`,tremolo:`Tremolo`,compressor:`Compressor`,gate:`Noise Gate`,eq:`EQ`,cabinet:`Cabinet`,ir:`IR Loader`,nam:`NAM Model`,nam_amp:`NAM Model`,boost:`Clean Boost`,wah:`Wah`,volume:`Volume`,tuner:`Tuner`,loop:`FX Loop`,split:`Split`,merge:`Merge`};function qe(e){return We[(e||``).toLowerCase()]||[{key:`level`,label:`Level`,min:0,max:100,def:50}]}function Je(e){return Ge[(e||``).toLowerCase()]||I.amber}function Ye(e){let t=(e.type||``).toLowerCase();return e.nam_model_path?e.nam_model_path.split(`/`).pop()?.replace(/\.(nam|wav|aiff?)$/i,``)||`NAM Model`:e.ir_file_path?e.ir_file_path.split(`/`).pop()?.replace(/\.(wav|aiff?|ir)$/i,``)||`IR Loader`:Ke[t]||t.charAt(0).toUpperCase()+t.slice(1)}var Xe=` + @import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Inter:wght@300;400;500;600&display=swap'); + * { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; user-select: none; } + html, body { height: 100%; overflow: hidden; background: ${I.bg}; } + body { color: ${I.textPrimary}; font-family: 'Inter', sans-serif; } + :root { --amber: ${I.amber}; --blue: ${I.blue}; --green: ${I.green}; } + .mono { font-family: 'JetBrains Mono', monospace; } + ::-webkit-scrollbar { width: 4px; height: 4px; } + ::-webkit-scrollbar-track { background: ${I.panel}; } + ::-webkit-scrollbar-thumb { background: ${I.border}; border-radius: 2px; } + + /* ── Knob ── */ + .knob-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; } + .knob { border-radius: 50%; position: relative; touch-action: none; } + .knob-inner { border-radius: 50%; width: 100%; height: 100%; position: relative; + background: radial-gradient(circle at 35% 30%, #3A3A48, #1A1A22); + box-shadow: 0 2px 8px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.07); } + .knob-dot { position: absolute; width: 3px; border-radius: 2px; background: var(--amber); + left: 50%; transform-origin: bottom center; box-shadow: 0 0 6px var(--amber); } + .knob-label { font-size: 9px; color: ${I.textSec}; letter-spacing: .06em; text-transform: uppercase; text-align: center; } + .knob-value { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: ${I.amber}; } + + /* ── Buttons ── */ + .btn { padding: 8px 14px; border-radius: 6px; font-size: 12px; font-weight: 600; + letter-spacing: .04em; border: none; cursor: pointer; transition: all .12s; } + .btn-primary { background: ${I.amber}; color: #000; } + .btn-primary:active { filter: brightness(.85); transform: scale(.97); } + .btn-ghost { background: ${I.surface}; color: ${I.textPrimary}; border: 1px solid ${I.border}; } + .btn-ghost:active { background: ${I.border}; } + .btn-icon { width: 36px; height: 36px; border-radius: 7px; display: flex; align-items: center; + justify-content: center; background: ${I.surface}; border: 1px solid ${I.border}; cursor: pointer; + font-size: 15px; transition: all .12s; flex-shrink: 0; } + .btn-icon:active { transform: scale(.93); } + .btn-icon.active { background: rgba(232,160,48,.15); border-color: ${I.amber}; color: ${I.amber}; } + .btn:focus-visible { outline: 2px solid #3AB87A; outline-offset: 2px; } + .btn-icon:focus-visible { outline: 2px solid #3AB87A; outline-offset: 2px; } + + /* ── Badge ── */ + .badge { display: inline-flex; align-items: center; justify-content: center; + padding: 2px 7px; border-radius: 4px; font-size: 10px; font-weight: 700; + letter-spacing: .06em; text-transform: uppercase; } + .badge-amber { background: rgba(232,160,48,.2); color: ${I.amber}; } + .badge-green { background: rgba(58,184,122,.2); color: ${I.green}; } + .badge-blue { background: rgba(74,139,200,.2); color: ${I.blue}; } + + /* ── Param slider ── */ + .param-panel { background: ${I.surface}; padding: 8px 12px 6px; border-top: 1px solid ${I.border}; flex-shrink: 0; } + .param-panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; } + .param-panel-title { font-size: 10px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: ${I.textSec}; } + .param-row { display: flex; flex-direction: column; gap: 1px; padding: 1px 0; } + .param-header { display: flex; justify-content: space-between; align-items: center; } + .param-label { font-size: 9px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: ${I.textSec}; } + .param-val { font-family: 'JetBrains Mono',monospace; font-size: 11px; font-weight: 600; } + .param-track-wrap { position: relative; height: 30px; display: flex; align-items: center; cursor: pointer; touch-action: none; } + .param-track { width: 100%; height: 6px; background: ${I.border}; border-radius: 3px; position: relative; overflow: hidden; } + .param-fill { height: 100%; border-radius: 3px; position: absolute; top: 0; left: 0; transition: width .04s; } + .param-thumb { width: 22px; height: 22px; border-radius: 50%; position: absolute; top: 50%; + transform: translate(-50%,-50%); box-shadow: 0 1px 6px rgba(0,0,0,.6); pointer-events: none; + border: 3px solid ${I.bg}; } + .param-btn { width: 28px; height: 28px; border-radius: 50%; border: 1px solid ${I.border}; + background: ${I.panel}; color: ${I.textPrimary}; font-size: 14px; font-weight: 700; + display: flex; align-items: center; justify-content: center; cursor: pointer; line-height: 1; } + .param-btn:active { background: ${I.border}; transform: scale(.92); } + .param-knobs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding: 4px 0; } + + /* ── Screen header (overlays) ── */ + .screen-header { padding: 10px 14px 8px; display: flex; align-items: center; + justify-content: space-between; border-bottom: 1px solid ${I.border}; } + .screen-title { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: ${I.textSec}; } + .screen-body { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; } + + /* ── Preset sidebar chip ── */ + .preset-chip-s { width: 100%; padding: 7px 6px; border-radius: 5px; background: ${I.surface}; border: 1px solid ${I.border}; + display: flex; flex-direction: column; align-items: center; cursor: pointer; transition: all .12s; } + .preset-chip-s.active { border-color: ${I.amber}; background: rgba(232,160,48,.08); } + .preset-chip-s:active { transform: scale(.96); } + .preset-chip-s .pcs-num { font-family: 'JetBrains Mono',monospace; font-size: 14px; font-weight: 700; color: ${I.amber}; line-height: 1.1; } + .preset-chip-s .pcs-name { font-size: 9px; color: ${I.textSec}; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; text-align: center; line-height: 1.2; } + .preset-chip-s .pcs-indicator { width: 4px; height: 4px; border-radius: 50%; margin-top: 3px; } + + /* ── Preset row (captures) ── */ + .preset-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; + border-radius: 6px; cursor: pointer; transition: background .12s; border: 1px solid transparent; } + .preset-row:active, .preset-row.active { background: rgba(232,160,48,.08); border-color: rgba(232,160,48,.25); } + .section-label { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; + color: ${I.textDim}; font-weight: 600; margin-bottom: 8px; } + .card { background: ${I.panel}; border: 1px solid ${I.border}; border-radius: 8px; padding: 14px; } + .card-sm { background: ${I.surface}; border: 1px solid ${I.border}; border-radius: 6px; padding: 10px; } +`;function Ze({label:e,value:t=50,onChange:n,size:r=48,color:i=I.amber,min:a=0,max:o=100}){let s=(0,l.useRef)(null),c=(t-a)/(o-a),u=-140+c*280,d=r*.38,p=r*.5-d,m=e=>{e.preventDefault(),s.current={y:e.touches?e.touches[0].clientY:e.clientY,val:t};let r=e=>{let t=e.touches?e.touches[0].clientY:e.clientY,r=(s.current.y-t)/120,i=Math.max(a,Math.min(o,s.current.val+r*(o-a)));n?.(Math.round(i))},i=()=>{window.removeEventListener(`mousemove`,r),window.removeEventListener(`mouseup`,i),window.removeEventListener(`touchmove`,r),window.removeEventListener(`touchend`,i)};window.addEventListener(`mousemove`,r),window.addEventListener(`mouseup`,i),window.addEventListener(`touchmove`,r,{passive:!1}),window.addEventListener(`touchend`,i)},h=r+12,g=h/2,_=h/2,v=r/2+3,y=g+v*Math.cos(Math.PI/180*-230),b=_+v*Math.sin(Math.PI/180*-230),x=g+v*Math.cos((u-90)*(Math.PI/180)),ee=_+v*Math.sin((u-90)*(Math.PI/180)),S=+(c*280>180);return(0,f.jsxs)(`div`,{className:`knob-wrap`,style:{width:r+12},children:[(0,f.jsxs)(`div`,{className:`knob`,style:{width:r,height:r},onMouseDown:m,onTouchStart:m,children:[(0,f.jsxs)(`svg`,{style:{position:`absolute`,inset:-6,width:h,height:h,overflow:`visible`},children:[(0,f.jsx)(`circle`,{cx:g,cy:_,r:v,fill:`none`,stroke:I.border,strokeWidth:`2`,strokeLinecap:`round`,opacity:`.5`}),c>0&&(0,f.jsx)(`path`,{d:`M ${y} ${b} A ${v} ${v} 0 ${S} 1 ${x} ${ee}`,fill:`none`,stroke:i,strokeWidth:`2`,strokeLinecap:`round`,style:{filter:`drop-shadow(0 0 3px ${i})`}})]}),(0,f.jsx)(`div`,{className:`knob-inner`,style:{"--amber":i},children:(0,f.jsx)(`div`,{className:`knob-dot`,style:{height:d,top:p,transform:`translateX(-50%) rotate(${u}deg)`,transformOrigin:`50% ${d}px`}})})]}),(0,f.jsx)(`div`,{className:`knob-value mono`,style:{color:i},children:t}),(0,f.jsx)(`div`,{className:`knob-label`,children:e})]})}function Qe({label:e,value:t=50,onChange:n,onChangeEnd:r,min:i=0,max:a=100,color:o=I.amber}){let s=(0,l.useRef)(null),c=(0,l.useRef)(!1),u=(0,l.useRef)(t),d=(0,l.useRef)(n),p=(0,l.useRef)(r),m=(t-i)/(a-i)*100;(0,l.useEffect)(()=>{d.current=n},[n]),(0,l.useEffect)(()=>{p.current=r},[r]);let h=(0,l.useCallback)(e=>{let n=s.current;if(!n)return t;let r=n.getBoundingClientRect(),o=(e.touches?e.touches[0].clientX:e.clientX)-r.left;return Math.round(i+Math.max(0,Math.min(1,o/r.width))*(a-i))},[i,a,t]);(0,l.useEffect)(()=>{let e=e=>{if(!c.current)return;e.preventDefault();let t=h(e);u.current=t,d.current?.(t)},t=()=>{c.current&&=(p.current?.(u.current),!1)};return window.addEventListener(`mousemove`,e),window.addEventListener(`mouseup`,t),window.addEventListener(`touchmove`,e,{passive:!1}),window.addEventListener(`touchend`,t),()=>{window.removeEventListener(`mousemove`,e),window.removeEventListener(`mouseup`,t),window.removeEventListener(`touchmove`,e),window.removeEventListener(`touchend`,t)}},[h]);let g=e=>{e.preventDefault();let t=h(e);u.current=t,c.current=!0,d.current?.(t)},_=e=>n=>{n.preventDefault(),n.stopPropagation();let r=Math.max(i,Math.min(a,t+e));d.current?.(r),p.current?.(r)};return(0,f.jsxs)(`div`,{className:`param-row`,children:[(0,f.jsxs)(`div`,{className:`param-header`,children:[(0,f.jsx)(`span`,{className:`param-label`,style:{color:o},children:e}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:4,alignItems:`center`},children:[(0,f.jsx)(`button`,{className:`param-btn`,onMouseDown:_(-5),onTouchStart:_(-5),children:`−`}),(0,f.jsx)(`span`,{className:`param-val`,style:{color:o},children:t}),(0,f.jsx)(`button`,{className:`param-btn`,onMouseDown:_(5),onTouchStart:_(5),children:`+`})]})]}),(0,f.jsx)(`div`,{className:`param-track-wrap`,ref:s,onMouseDown:g,onTouchStart:g,children:(0,f.jsxs)(`div`,{className:`param-track`,children:[(0,f.jsx)(`div`,{className:`param-fill`,style:{width:`${m}%`,background:o}}),(0,f.jsx)(`div`,{className:`param-thumb`,style:{left:`${m}%`,background:o}})]})})]})}function $e({def:e,value:t,color:n,onChange:r}){return(0,f.jsxs)(`div`,{className:`param-row`,children:[(0,f.jsx)(`div`,{className:`param-header`,children:(0,f.jsx)(`span`,{className:`param-label`,style:{color:n},children:e.label})}),(0,f.jsx)(`div`,{style:{display:`flex`,gap:4,flexWrap:`wrap`,background:`#0A0A10`,borderRadius:6,padding:4},children:(e.options||[]).map(e=>(0,f.jsx)(`button`,{onClick:()=>r?.(e.value),style:{flex:1,padding:`5px 8px`,borderRadius:4,border:`none`,fontSize:10,fontWeight:600,cursor:`pointer`,background:t===e.value?n:`transparent`,color:t===e.value?`#000`:`#8888A0`,transition:`all .1s`,letterSpacing:`.03em`,whiteSpace:`nowrap`},children:e.label},e.value))})]})}function et({block:e,params:t,onParamChange:n,onParamChangeEnd:r,viewMode:i,onToggleView:a,onFocus:o,onModelBrowser:s}){let c=qe(e.type),l=Je(e.type),u=c.filter(e=>!e.conditional||e.conditional(t));return(0,f.jsxs)(`div`,{className:`param-panel`,children:[(0,f.jsxs)(`div`,{className:`param-panel-header`,children:[(0,f.jsxs)(`span`,{className:`param-panel-title`,style:{cursor:s?`pointer`:`default`},onClick:()=>s?.(e.id),children:[(0,f.jsx)(`span`,{style:{color:l},children:`●`}),` `,e.name||e.type||``,s&&(0,f.jsx)(`span`,{style:{marginLeft:4,fontSize:8,color:I.textDim},children:`▼`})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:4,alignItems:`center`},children:[o&&(0,f.jsx)(`button`,{className:`btn`,style:{padding:`4px 8px`,fontSize:9,fontWeight:600,background:`${I.amber}22`,border:`1px solid ${I.amber}44`,color:I.amber,borderRadius:5,letterSpacing:`.04em`,cursor:`pointer`},onClick:o,children:`🔍 Focus`}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:26,height:26,fontSize:11,flexShrink:0},onClick:a,children:i===`slider`?`◉`:`▦`})]})]}),i===`slider`?u.map(e=>e.type===`select`?(0,f.jsx)($e,{def:e,value:t[e.key]==null?e.def:t[e.key],color:l,onChange:t=>{n?.(e.key,t),r?.(e.key,t)}},e.key):(0,f.jsx)(Qe,{label:e.label,value:t[e.key]==null?e.def:t[e.key],min:e.min,max:e.max,color:l,onChange:t=>n?.(e.key,t),onChangeEnd:t=>r?.(e.key,t)},e.key)):u.filter(e=>e.type!==`select`).length>0&&(0,f.jsx)(`div`,{className:`param-knobs`,children:u.filter(e=>e.type!==`select`).map(e=>(0,f.jsx)(Ze,{label:e.label,value:t[e.key]==null?e.def:t[e.key],min:e.min,max:e.max,size:48,color:l,onChange:t=>{n?.(e.key,t),r?.(e.key,t)}},e.key))})]})}function tt({level:e=0,height:t=24,vertical:n=!1}){let r=Math.round(e/100*12),i=Math.max(3,(t-12*1.5)/12),a=e=>e>=10?I.red:e>=8?`#E8C030`:I.green;return n?(0,f.jsx)(`div`,{style:{display:`flex`,flexDirection:`column-reverse`,gap:1.5,height:t,alignItems:`center`},children:Array.from({length:12}).map((e,t)=>(0,f.jsx)(`div`,{style:{width:4,height:i,borderRadius:1.5,background:t(0,f.jsx)(`div`,{style:{flex:1,height:`100%`,borderRadius:1,background:t{F.listModels().then(e=>c(e.models||[])).catch(()=>{})},[]);let p=async()=>{if(r.trim()){d(!0);try{o((t===`models`?await F.searchModels(r):await F.searchIrs(r)).results||[])}catch{o([])}d(!1)}},m=async e=>{try{t===`models`?await F.installModel(e.download_url,e.name):await F.installIr(e.download_url,e.name),F.listModels().then(e=>c(e.models||[])).catch(()=>{})}catch(e){alert(`Install failed: `+e.message)}};return(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100%`,background:I.bg},children:[(0,f.jsxs)(`div`,{className:`screen-header`,children:[(0,f.jsx)(`div`,{className:`screen-title`,children:`Downloads`}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:36,height:36,fontSize:13},onClick:e,children:`✕`})]}),(0,f.jsx)(`div`,{style:{padding:`6px 12px`,borderBottom:`1px solid ${I.border}`},children:(0,f.jsxs)(`div`,{className:`toggle`,children:[(0,f.jsx)(`button`,{className:`toggle-btn ${t===`models`?`active`:``}`,onClick:()=>n(`models`),children:`NAM Models`}),(0,f.jsx)(`button`,{className:`toggle-btn ${t===`irs`?`active`:``}`,onClick:()=>n(`irs`),children:`IR Cabs`})]})}),(0,f.jsxs)(`div`,{style:{padding:`6px 12px`,display:`flex`,gap:6,borderBottom:`1px solid ${I.border}`},children:[(0,f.jsxs)(`div`,{style:{flex:1,display:`flex`,background:I.surface,borderRadius:6,border:`1px solid ${I.border}`,padding:`6px 10px`,gap:6,alignItems:`center`},children:[(0,f.jsx)(`span`,{style:{color:I.textDim,fontSize:11},children:`🔍`}),(0,f.jsx)(`input`,{placeholder:`Search ${t===`models`?`NAM models`:`IR cabs`}...`,value:r,onChange:e=>i(e.target.value),onKeyDown:e=>e.key===`Enter`&&p(),style:{flex:1,background:`none`,border:`none`,color:I.textPrimary,fontSize:12,outline:`none`}})]}),(0,f.jsx)(`button`,{className:`btn btn-primary`,style:{padding:`6px 11px`,fontSize:11},onClick:p,children:u?`...`:`Search`})]}),(0,f.jsxs)(`div`,{className:`screen-body`,children:[a===null&&s.length>0&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`div`,{className:`section-label`,children:`Installed Models`}),s.map((e,t)=>(0,f.jsxs)(`div`,{className:`preset-row`,style:{cursor:`default`},children:[(0,f.jsx)(`div`,{style:{width:26,height:26,borderRadius:5,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:11,background:e.loaded?`${I.green}22`:I.surface,color:e.loaded?I.green:I.textDim},children:`🎛`}),(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:12,fontWeight:500},children:e.name}),(0,f.jsxs)(`div`,{className:`mono`,style:{fontSize:10,color:I.textDim},children:[e.architecture,`·`,e.size_mb,`MB`,e.loaded?`· CURRENT`:``]})]})]},t))]}),a!==null&&a.length===0&&(0,f.jsx)(`div`,{className:`card-sm`,style:{textAlign:`center`,color:I.textDim,padding:20},children:`No results found`}),a!==null&&a.map((e,t)=>(0,f.jsxs)(`div`,{className:`preset-row`,style:{cursor:`default`},children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:12,fontWeight:500},children:e.name}),(0,f.jsxs)(`div`,{className:`mono`,style:{fontSize:10,color:I.textDim},children:[e.author,`·`,e.size_display]})]}),(0,f.jsx)(`button`,{className:`btn btn-ghost`,style:{padding:`4px 9px`,fontSize:11},onClick:()=>m(e),children:`Get`})]},t))]})]})}var rt=[{id:`gate`,type:`gate`,name:`Noise Gate`,bypassed:!1,params:{threshold:40,release:25}},{id:`comp`,type:`compressor`,name:`Compressor`,bypassed:!1,params:{threshold:50,ratio:4,gain:50}},{id:`amp`,type:`nam`,name:`Twin Reverb`,bypassed:!1,params:{level:75}},{id:`cab`,type:`ir`,name:`2x12 American`,bypassed:!1,params:{level:75}},{id:`eq`,type:`eq`,name:`EQ`,bypassed:!1,params:{low:0,mid:0,high:0,level:70}},{id:`reverb`,type:`reverb`,name:`Hall Reverb`,bypassed:!1,params:{subtype:`hall`,decay:50,mix:30,tone:50}}],it=[{num:1,bank:1,name:`Plexi Crunch`},{num:2,bank:1,name:`Blues Rock Lead`},{num:3,bank:1,name:`Deluxe Clean`},{num:4,bank:1,name:`British Drive`},{num:5,bank:2,name:`Metal Djent`},{num:6,bank:2,name:`Funky Wah`},{num:7,bank:2,name:`Ambient Pad`},{num:8,bank:2,name:`Shoegaze`}];function at(){let[e,t]=(0,l.useState)(`main`),[n,r]=(0,l.useState)({connected:!1,master_volume:.72,routing_mode:`mono`,cpu_percent:0}),[i,a]=(0,l.useState)(rt),[o,s]=(0,l.useState)(`gate`),[c,u]=(0,l.useState)({}),[d,p]=(0,l.useState)(`slider`),[m,h]=(0,l.useState)(0),[g,_]=(0,l.useState)(1),[v,y]=(0,l.useState)(1),[b,x]=(0,l.useState)(it),[ee,S]=(0,l.useState)(!1),[C,te]=(0,l.useState)(!1),[w,T]=(0,l.useState)(null),[re,E]=(0,l.useState)(null),[ae,oe]=(0,l.useState)(`stomp`),[se,D]=(0,l.useState)(null),[O,le]=(0,l.useState)([]),[ue,de]=(0,l.useState)([]),fe=(0,l.useRef)({blocks:rt,blockParams:{},selectedBlockId:`gate`}),pe=(0,l.useRef)(null);(0,l.useEffect)(()=>{fe.current={blocks:i,blockParams:c,selectedBlockId:o}},[i,c,o]);let k=(0,l.useCallback)(()=>{let e=fe.current,t={blocks:e.blocks.map(e=>({...e,params:{...e.params}})),blockParams:Object.fromEntries(Object.entries(e.blockParams).map(([e,t])=>[e,{...t}])),selectedBlockId:e.selectedBlockId};le(e=>[...e.slice(-49),t]),de([])},[]),me=(0,l.useCallback)(()=>{pe.current||=(k(),setTimeout(()=>{pe.current=null},400))},[k]),he=(0,l.useCallback)(()=>{le(e=>{if(e.length===0)return e;let t=fe.current,n={blocks:t.blocks.map(e=>({...e,params:{...e.params}})),blockParams:Object.fromEntries(Object.entries(t.blockParams).map(([e,t])=>[e,{...t}])),selectedBlockId:t.selectedBlockId};de(e=>[...e,n]);let r=e[e.length-1];return a(r.blocks),u(r.blockParams),s(r.selectedBlockId),e.slice(0,-1)})},[]),A=(0,l.useCallback)(()=>{de(e=>{if(e.length===0)return e;let t=fe.current,n={blocks:t.blocks.map(e=>({...e,params:{...e.params}})),blockParams:Object.fromEntries(Object.entries(t.blockParams).map(([e,t])=>[e,{...t}])),selectedBlockId:t.selectedBlockId};le(e=>[...e,n]);let r=e[e.length-1];return a(r.blocks),u(r.blockParams),s(r.selectedBlockId),e.slice(0,-1)})},[]),[_e,ve]=(0,l.useState)(!1),[ye,be]=(0,l.useState)(null),[xe,Se]=(0,l.useState)(null),Ce=(0,l.useCallback)(e=>{switch(ve(!1),e){case`settings`:be(`settings`);break;case`eq`:be(`eq`);break;case`tuner`:r(e=>({...e,tuner_enabled:!0})),F.tunerToggle(!0).catch(()=>{});break;case`save`:Se(`save`);break;case`bypass`:Se(`bypass`);break;case`wifi`:Se(`wifi`);break}},[]),we=(0,l.useRef)(!1),Te=(0,l.useRef)(!1),Ee=(0,l.useCallback)(async()=>{try{let e=await F.getState();r(e),e.input_level!=null&&h(e.input_level),e.current_preset?.name&&!we.current&&_(e.current_preset.program==null?g:e.current_preset.program+1),e.blocks&&e.blocks.length>0&&!Te.current&&a(e.blocks)}catch{}},[g]);(0,l.useEffect)(()=>{Ee();let e=setInterval(Ee,3e3);return()=>clearInterval(e)},[Ee]),(0,l.useEffect)(()=>{let e=setInterval(()=>{h(e=>Math.max(0,Math.min(100,e+(Math.random()-.5)*50+3)))},120);return()=>clearInterval(e)},[]),(0,l.useEffect)(()=>{F.listPresets().then(e=>{if(e?.banks){let t=[];e.banks.forEach(e=>{(e.presets||[]).forEach((n,r)=>{n&&t.push({num:r+1,bank:e.number+1,name:n.name,chain:n.chain})})}),t.length>0&&x(t)}}).catch(()=>{})},[]);let Oe=(0,l.useCallback)(async(e,t)=>{we.current=!0,te(!0);try{await F.activatePreset(e,t),await new Promise(e=>setTimeout(e,300));let n=await F.getState();r(n),n.current_preset?.name&&_(n.current_preset.program==null?t+1:n.current_preset.program+1);try{let n=await F.getPreset(e,t);n?.chain&&n.chain.length>0&&(a(n.chain.map((e,t)=>{let n={type:e.fx_type||`fx`,enabled:e.enabled!==!1,params:e.params||{},nam_model_path:e.nam_model_path,ir_file_path:e.ir_file_path};return{id:e.id||`block_${e.fx_type||`fx`}_${t}`,type:n.type,name:Ye(n),bypassed:!e.enabled,enabled:n.enabled,params:n.params,nam_model_path:n.nam_model_path,ir_file_path:n.ir_file_path}})),Te.current=!0)}catch(e){console.warn(`Could not fetch chain:`,e)}s(null)}catch(e){console.warn(`Preset activate failed:`,e)}te(!1),setTimeout(()=>{we.current=!1},5e3),setTimeout(()=>{Te.current=!1},5e3)},[]),j=(0,l.useCallback)(async e=>{let t=b.find(t=>t.num===e);t&&(_(e),await Oe(t.bank||1,e-1))},[b,Oe]),ke=(0,l.useMemo)(()=>i.find(e=>e.id===o),[i,o]);(0,l.useEffect)(()=>{if(ke&&c[o]==null){let e=qe(ke.type),t={};e.forEach(e=>{t[e.key]=ke.params?.[e.key]==null?e.def:ke.params[e.key]}),u(e=>({...e,[o]:t}))}},[o,ke,c]);let M=(0,l.useCallback)(e=>{s(t=>t===e?null:e)},[]),je=(0,l.useCallback)((e,t,n)=>{me(),u(r=>({...r,[e]:{...r[e]||{},[t]:n}}))},[me]),Me=(0,l.useCallback)(e=>{k(),Te.current=!0,a(t=>t.map(t=>t.id===e?{...t,bypassed:!t.bypassed}:t)),F.toggleBlock(e,!1).catch(()=>{}),setTimeout(()=>{Te.current=!1},3e3)},[k]),Ne=(0,l.useCallback)((e,t,n)=>{F.updateBlock(e,{[t]:n}).catch(()=>{})},[]),Pe=(0,l.useCallback)((e,t)=>{k(),a(n=>{let r=[...n],[i]=r.splice(e,1);return r.splice(t,0,i),r})},[k]),Fe=(0,l.useCallback)(()=>{D(`picker`)},[k]),Ie=(0,l.useCallback)(e=>{k(),Te.current=!0;let t=`block_`+Date.now(),n=qe(e),r={};n.forEach(e=>{r[e.key]=e.def});let i=Ke[e]||e.charAt(0).toUpperCase()+e.slice(1);a(n=>[...n,{id:t,type:e,name:i,bypassed:!1,params:r}]),D(null),setTimeout(()=>{Te.current=!1},3e3)},[k]),Le=(0,l.useCallback)(e=>{k(),Te.current=!0,a(t=>t.filter(t=>t.id!==e)),o===e&&s(null),setTimeout(()=>{Te.current=!1},3e3)},[k,o]),N=(0,l.useMemo)(()=>b.filter(e=>e.bank===v),[b,v]),ze=String.fromCharCode(64+v),Be=(0,l.useCallback)(()=>{let e=Math.min(v+1,8);y(e);let t=b.filter(t=>t.bank===e);t.length>0&&Oe(t[0].bank,t[0].num-1)},[v,b,Oe]),Ve=(0,l.useCallback)(()=>{let e=Math.max(v-1,1);y(e);let t=b.filter(t=>t.bank===e);t.length>0&&Oe(t[0].bank,t[0].num-1)},[v,b,Oe]),Ue=(0,l.useCallback)(()=>{S(e=>!e),F.bypassToggle().catch(()=>{})},[]),P=(0,l.useCallback)(()=>{let e=!n.tuner_enabled;r(t=>({...t,tuner_enabled:e})),F.tunerToggle(e).catch(()=>{}),e&&t(`main`)},[n.tuner_enabled]),We=(0,l.useCallback)(()=>{Te.current=!0;let e=w;e&&(a(t=>t.map(t=>t.id===e?{...t,bypassed:!t.bypassed}:t)),F.toggleBlock(e,!1).catch(()=>{}),setTimeout(()=>{Te.current=!1},3e3))},[w]),Ge=(0,l.useCallback)(e=>{E(e),w&&T(null)},[w]),Je=(0,l.useCallback)(({type:e,name:t,modelPath:n,isBuiltin:r})=>{let i=re;i&&(k(),Te.current=!0,a(a=>a.map(a=>{if(a.id!==i)return a;let o=qe(e),s={};return o.forEach(e=>{s[e.key]=e.def}),{...a,type:e,name:t||Ye({type:e}),params:s,nam_model_path:!r&&n&&e===`nam`?n:void 0,ir_file_path:!r&&n&&e===`ir`?n:void 0}})),E(null),u(e=>{let t={...e};return delete t[i],t}),setTimeout(()=>{Te.current=!1},3e3))},[re,k]);return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`style`,{children:Xe}),(0,f.jsxs)(`div`,{style:{width:`100%`,height:`100vh`,display:`flex`,flexDirection:`column`,background:I.bg,overflow:`hidden`,fontFamily:`'Inter',sans-serif`,margin:`0 auto`,maxWidth:980},children:[e===`main`&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`4px 12px`,background:I.panel,borderBottom:`1px solid ${I.border}`,flexShrink:0,minHeight:32},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`},children:[(0,f.jsx)(`div`,{style:{width:6,height:6,borderRadius:`50%`,background:n.connected?I.green:I.red,boxShadow:`0 0 6px ${n.connected?I.green:I.red}`}}),(0,f.jsx)(`span`,{className:`mono`,style:{fontSize:9,color:n.connected?I.green:I.red},children:n.connected?`CONNECTED`:`OFFLINE`}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:20,height:20,fontSize:11,opacity:O.length>0?1:.3},onClick:he,disabled:O.length===0,title:`Undo (Ctrl+Z)`,children:`↶`}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:20,height:20,fontSize:11,opacity:ue.length>0?1:.3},onClick:A,disabled:ue.length===0,title:`Redo (Ctrl+Shift+Z)`,children:`↷`}),(0,f.jsx)(`div`,{style:{width:1,height:12,background:I.border}}),(0,f.jsx)(`span`,{className:`mono`,style:{fontSize:10,color:I.textPrimary,fontWeight:600},children:n.current_preset?.name||b.find(e=>e.num===g)?.name||`—`}),C&&(0,f.jsx)(`span`,{className:`mono`,style:{fontSize:8,color:I.amber},children:`⟳`})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`},children:[(0,f.jsx)(tt,{level:m,height:24}),(0,f.jsxs)(`span`,{className:`mono`,style:{fontSize:9,color:I.textSec},children:[`CPU `,(0,f.jsx)(`span`,{style:{color:I.amber,fontWeight:700},children:n.cpu_percent==null?`—`:`${n.cpu_percent}%`})]})]}),(0,f.jsx)(`div`,{style:{width:1,height:12,background:I.border}}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:24,height:24,position:`relative`},onClick:()=>t(`captures`),title:`Downloads`,children:(0,f.jsx)(`img`,{src:`/ui/img/ic_bank.svg`,alt:`captures`,style:{width:14,height:14}})}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:24,height:24,position:`relative`},onClick:()=>t(`presets`),title:`Presets`,children:(0,f.jsx)(`img`,{src:`/ui/img/ic_presets.svg`,alt:`presets`,style:{width:14,height:14}})}),(0,f.jsx)(`div`,{style:{display:`flex`,gap:2,alignItems:`center`,background:I.surface,borderRadius:4,border:`1px solid ${I.border}`,padding:2,height:24},children:[`stomp`,`preset`].map(e=>(0,f.jsx)(`button`,{onClick:()=>oe(e),style:{padding:`1px 5px`,borderRadius:3,border:`none`,height:20,fontSize:8,fontWeight:700,letterSpacing:`.04em`,textTransform:`uppercase`,background:ae===e?I.amber:`transparent`,color:ae===e?`#000`:I.textDim,cursor:`pointer`,lineHeight:1.5,minWidth:34,display:`flex`,alignItems:`center`,justifyContent:`center`},children:e===`stomp`?`SM`:`PR`},e))}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:24,height:24,position:`relative`,background:n.tuner_enabled?`rgba(128,208,160,.15)`:I.surface,borderColor:n.tuner_enabled?I.green:I.border},onClick:P,title:n.tuner_enabled?`Exit Tuner`:`Tuner`,children:(0,f.jsx)(`img`,{src:`/ui/img/fx_analyzer.svg`,alt:`tuner`,style:{width:14,height:14,filter:n.tuner_enabled?`brightness(0) saturate(100%) invert(0.9) sepia(0.4) hue-rotate(80deg)`:`none`}})}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:24,height:24,position:`relative`,background:`rgba(232,160,48,.12)`,borderColor:I.amber},onClick:()=>{document.fullscreenElement?document.exitFullscreen():document.documentElement.requestFullscreen()},title:`Fullscreen`,children:(0,f.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`14`,height:`14`,fill:`#E8A030`,children:(0,f.jsx)(`path`,{d:`M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z`})})}),(0,f.jsx)(`div`,{style:{width:1,height:16,background:I.border}}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:24,height:24,position:`relative`},onClick:()=>ve(!0),title:`Main Menu`,children:(0,f.jsx)(`span`,{style:{fontSize:14,color:I.amber,lineHeight:1},children:`☰`})})]})]}),(0,f.jsxs)(`div`,{style:{flex:1,display:`flex`,overflow:`hidden`},children:[(0,f.jsxs)(`div`,{style:{width:90,flexShrink:0,background:I.surface,borderRight:`1px solid ${I.border}`,display:`flex`,flexDirection:`column`,overflow:`hidden`},children:[(0,f.jsxs)(`div`,{style:{padding:`6px 8px`,textAlign:`center`,borderBottom:`1px solid ${I.border}`,background:I.panel},children:[(0,f.jsxs)(`div`,{className:`mono`,style:{fontSize:14,fontWeight:700,color:I.amber},children:[`Bank `,ze]}),(0,f.jsx)(`div`,{style:{fontSize:9,color:I.textDim,letterSpacing:`.06em`,textTransform:`uppercase`},children:`Programs`})]}),(0,f.jsx)(`div`,{style:{flex:1,overflowY:`auto`,padding:`4px 6px`,display:`flex`,flexDirection:`column`,gap:3},children:N.map(e=>(0,f.jsxs)(`div`,{className:`preset-chip-s ${e.num===g?`active`:``}`,onClick:()=>j(e.num),children:[(0,f.jsxs)(`div`,{className:`pcs-num`,children:[`0`,e.num]}),(0,f.jsx)(`div`,{className:`pcs-name`,children:e.name}),(0,f.jsx)(`div`,{className:`pcs-indicator`,style:{background:e.num===g?I.amber:I.border}})]},e.num))})]}),(0,f.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,overflow:`hidden`,minWidth:0},children:[(0,f.jsx)(`div`,{style:{display:`flex`,gap:4,padding:`3px 8px`,background:I.surface,borderBottom:`1px solid ${I.border}`,flexShrink:0},children:[{label:`Preset`,value:b.find(e=>e.num===g)?.name||`—`},{label:`Routing`,value:(n.routing_mode||`MONO`).toUpperCase()},{label:`Volume`,value:n.master_volume==null?`—`:`${Math.round(n.master_volume*100)}%`},{label:`Bank`,value:ze}].map(e=>(0,f.jsxs)(`div`,{style:{flex:1,textAlign:`center`,padding:`2px 6px`,borderRadius:3,background:I.panel,border:`1px solid ${I.border}`},children:[(0,f.jsx)(`div`,{style:{fontSize:7,color:I.textDim,letterSpacing:`.06em`,textTransform:`uppercase`},children:e.label}),(0,f.jsx)(`div`,{className:`mono`,style:{fontSize:10,fontWeight:600,color:I.amber,marginTop:1},children:e.value})]},e.label))}),(0,f.jsx)(`div`,{style:{flex:ke?`0 0 auto`:1,overflow:`hidden`},children:(0,f.jsx)(ne,{blocks:i,selectedBlockId:o,onSelectBlock:M,onToggleBlock:Me,onReorder:Pe,onAddBlock:Fe,onRemoveBlock:Le,onModelBrowser:Ge,onBlockSelected:Ie})}),ke&&c[o]?(0,f.jsx)(et,{block:ke,params:c[o]||{},viewMode:d,onToggleView:()=>p(e=>e===`slider`?`knob`:`slider`),onParamChange:(e,t)=>je(o,e,t),onParamChangeEnd:(e,t)=>Ne(o,e,t),onFocus:()=>T(o),onModelBrowser:Ge}):(0,f.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,background:I.bg,color:I.textDim,fontSize:11},children:`Tap a block to edit parameters`})]})]}),(0,f.jsx)(ie,{mode:ae,blocks:i,selectedBlockId:o,currentBank:ze,currentPreset:g,presets:N,onSelectBlock:M,onToggleBlock:Me,onBankUp:Be,onBankDown:Ve,onGlobalBypass:Ue,globalBypass:ee,onTunerToggle:P,tunerEnabled:n.tuner_enabled,onPresetClick:e=>{let t=N[parseInt(e)];t&&Oe(t.bank,t.num-1)}})]}),w&&i.find(e=>e.id===w)&&c[w]&&(0,f.jsx)(ge,{block:i.find(e=>e.id===w),params:c[w]||{},viewMode:d,onClose:()=>T(null),onParamChange:(e,t)=>je(w,e,t),onParamChangeEnd:(e,t)=>Ne(w,e,t),onToggleView:()=>p(e=>e===`slider`?`knob`:`slider`),onToggleBypass:We,onOpenModelBrowser:()=>Ge(w)}),e===`captures`&&(0,f.jsx)(nt,{onClose:()=>t(`main`)}),e===`presets`&&(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100%`,background:I.bg},children:[(0,f.jsxs)(`div`,{className:`screen-header`,children:[(0,f.jsx)(`div`,{className:`screen-title`,children:`Presets`}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:36,height:36,fontSize:13},onClick:()=>t(`main`),children:`✕`})]}),(0,f.jsx)(`div`,{className:`screen-body`,children:b.map((e,n)=>(0,f.jsxs)(`div`,{className:`preset-row ${e.num===g?`active`:``}`,onClick:()=>{j(e.num),t(`main`)},children:[(0,f.jsx)(`div`,{className:`mono`,style:{width:26,height:26,borderRadius:5,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:11,fontWeight:700,background:e.num===g?`${I.amber}22`:I.surface,color:e.num===g?I.amber:I.textDim,border:`1px solid ${e.num===g?I.amber+`60`:I.border}`},children:e.num}),(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:12,fontWeight:600},children:e.name}),(0,f.jsxs)(`div`,{className:`mono`,style:{fontSize:9,color:I.textDim},children:[`Bank `,e.bank||1,`·Program `,e.num-1]})]}),e.num===g&&(0,f.jsx)(`span`,{style:{color:I.amber,fontSize:16},children:`●`})]},n))})]}),n.tuner_enabled&&(0,f.jsx)(ce,{tunerData:n,connected:n.connected,onExit:()=>{r(e=>({...e,tuner_enabled:!1})),F.tunerToggle(!1).catch(()=>{})}}),re&&(()=>{let e=i.find(e=>e.id===re);return e?(0,f.jsx)(De,{currentBlockType:e.type,currentBlockName:e.name,currentModelPath:e.nam_model_path||e.ir_file_path,onSelectModel:Je,onClose:()=>E(null)}):null})(),_e&&(0,f.jsx)(Ae,{onClose:()=>ve(!1),onItemSelect:Ce}),ye===`settings`&&(0,f.jsx)(Re,{onClose:()=>be(null),onMasterVolume:e=>F.masterVolume(e).catch(()=>{}),onAudioProfile:(e,t)=>F.setAudioProfile(e,t).catch(()=>{}),onRoutingChange:(e,t)=>F.setRouting(e,t).catch(()=>{}),onSaveSettings:e=>F.saveSettings(e).catch(()=>{})}),ye===`eq`&&(0,f.jsx)(He,{onClose:()=>be(null)}),xe===`save`&&(0,f.jsx)(`div`,{style:{position:`fixed`,inset:0,zIndex:1e3,background:`rgba(0,0,0,.7)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,f.jsxs)(`div`,{className:`card`,style:{width:320,maxWidth:`85vw`,padding:20},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:16},children:[(0,f.jsx)(`div`,{style:{fontSize:14,fontWeight:600,color:I.textPrimary},children:`💾 Save Preset`}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:26,height:26,fontSize:12},onClick:()=>Se(null),children:`✕`})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{style:{fontSize:9,color:I.textSec,marginBottom:4,textTransform:`uppercase`,letterSpacing:`.06em`},children:`Preset Name`}),(0,f.jsx)(`input`,{defaultValue:b.find(e=>e.num===g)?.name||``,style:{width:`100%`,padding:`8px 10px`,borderRadius:6,border:`1px solid ${I.border}`,background:I.surface,color:I.textPrimary,fontSize:13,outline:`none`}})]}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{style:{fontSize:9,color:I.textSec,marginBottom:4,textTransform:`uppercase`,letterSpacing:`.06em`},children:`Target`}),(0,f.jsx)(`div`,{style:{display:`flex`,gap:4,flexWrap:`wrap`},children:[1,2,3,4].map(e=>(0,f.jsxs)(`button`,{className:`btn-ghost`,style:{flex:1,padding:`6px`,fontSize:10,textAlign:`center`},onClick:()=>{Se(null),F.savePreset(v-1,e-1,`Saved Preset`,[]).catch(()=>{})},children:[`Slot `,e,(0,f.jsx)(`br`,{}),(0,f.jsx)(`span`,{style:{fontSize:8,color:I.textDim},children:b.find(t=>t.num===e)?.name||`Empty`})]},e))})]})]})]})}),xe===`bypass`&&(0,f.jsx)(`div`,{style:{position:`fixed`,inset:0,zIndex:1e3,background:`rgba(0,0,0,.7)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,f.jsxs)(`div`,{className:`card`,style:{width:340,maxWidth:`85vw`,padding:20},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:16},children:[(0,f.jsx)(`div`,{style:{fontSize:14,fontWeight:600,color:I.textPrimary},children:`🔌 Bypass / Control`}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:26,height:26,fontSize:12},onClick:()=>Se(null),children:`✕`})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:14},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,f.jsx)(`span`,{style:{fontSize:12,color:I.textPrimary},children:`🚫 Global Bypass`}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:40,height:26,fontSize:10,background:ee?`${I.red}22`:I.surface,borderColor:ee?I.red:I.border},onClick:()=>{S(e=>!e),F.bypassToggle().catch(()=>{})},children:ee?`ON`:`OFF`})]}),(0,f.jsx)(`div`,{style:{height:1,background:I.border}}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{style:{fontSize:9,color:I.textSec,marginBottom:6,textTransform:`uppercase`,letterSpacing:`.06em`},children:`Block Bypass States`}),i.map(e=>(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`4px 0`},children:[(0,f.jsx)(`span`,{style:{fontSize:11,color:I.textPrimary},children:e.name||e.type}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:36,height:22,fontSize:9,background:e.bypassed?`${I.red}22`:I.surface,borderColor:e.bypassed?I.red:I.border},onClick:()=>Me(e.id),children:e.bypassed?`BYP`:`ACT`})]},e.id))]}),(0,f.jsx)(`div`,{style:{height:1,background:I.border}}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{style:{fontSize:9,color:I.textSec,marginBottom:6,textTransform:`uppercase`,letterSpacing:`.06em`},children:`Footswitch Mode`}),(0,f.jsx)(`div`,{style:{display:`flex`,gap:4,background:`#0A0A10`,borderRadius:6,padding:4},children:[`stomp`,`preset`].map(e=>(0,f.jsx)(`button`,{onClick:()=>oe(e),style:{flex:1,padding:`5px 8px`,borderRadius:4,border:`none`,fontSize:10,fontWeight:600,cursor:`pointer`,background:ae===e?I.amber:`transparent`,color:ae===e?`#000`:I.textSec},children:e===`stomp`?`Stompbox`:`Preset`},e))})]})]})]})}),xe===`wifi`&&(0,f.jsx)(`div`,{style:{position:`fixed`,inset:0,zIndex:1e3,background:`rgba(0,0,0,.7)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,f.jsxs)(`div`,{className:`card`,style:{width:340,maxWidth:`85vw`,padding:20},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:16},children:[(0,f.jsx)(`div`,{style:{fontSize:14,fontWeight:600,color:I.textPrimary},children:`📶 Wireless`}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:26,height:26,fontSize:12},onClick:()=>Se(null),children:`✕`})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:14},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,f.jsx)(`span`,{style:{fontSize:12,color:I.textPrimary},children:`📶 Wi‑Fi`}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:40,height:26,fontSize:10},children:`Scan`})]}),(0,f.jsx)(`div`,{className:`card-sm`,style:{textAlign:`center`,padding:16},children:(0,f.jsx)(`span`,{style:{fontSize:11,color:I.textSec},children:`Use pedal as access point or connect to existing network via the settings panel.`})}),(0,f.jsx)(`div`,{style:{height:1,background:I.border}}),(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,f.jsx)(`span`,{style:{fontSize:12,color:I.textPrimary},children:`🔵 Bluetooth`}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:40,height:26,fontSize:10,background:`${I.blue}22`,borderColor:I.blue,color:I.blue},children:`ON`})]}),(0,f.jsx)(`div`,{style:{fontSize:10,color:I.textSec},children:`Bluetooth MIDI is enabled. Pair with your mobile device or MIDI controller.`})]})]})}),se===`picker`&&(0,f.jsx)(`div`,{style:{position:`fixed`,inset:0,zIndex:1e3,background:`rgba(0,0,0,.7)`,display:`flex`,alignItems:`center`,justifyContent:`center`},onClick:e=>e.target===e.currentTarget&&D(null),children:(0,f.jsxs)(`div`,{className:`card`,style:{width:320,maxWidth:`85vw`,padding:20,maxHeight:`80vh`,overflowY:`auto`},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:12},children:[(0,f.jsx)(`div`,{style:{fontSize:13,fontWeight:600,color:I.textPrimary},children:`+ Add Block`}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:24,height:24,fontSize:11},onClick:()=>D(null),children:`✕`})]}),(0,f.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr`,gap:6},children:Object.entries(Ke).filter(([e])=>![`loop`,`split`,`merge`].includes(e)).map(([e,t])=>(0,f.jsxs)(`button`,{className:`btn-ghost`,style:{padding:`8px 6px`,fontSize:10,textAlign:`center`,lineHeight:1.3},onClick:()=>Ie(e),children:[(0,f.jsx)(`div`,{style:{fontWeight:600},children:t}),(0,f.jsx)(`div`,{style:{fontSize:8,color:I.textDim,marginTop:1,textTransform:`capitalize`},children:e})]},e))})]})})]})]})}(0,u.createRoot)(document.getElementById(`root`)).render((0,f.jsx)(l.StrictMode,{children:(0,f.jsx)(at,{})})); \ No newline at end of file diff --git a/src/web/ui-dist/img/footswitch_strip.png b/src/web/ui-dist/img/footswitch_strip.png new file mode 100644 index 0000000..9ae4ed5 Binary files /dev/null and b/src/web/ui-dist/img/footswitch_strip.png differ diff --git a/src/web/ui-dist/img/fx_amplifier.svg b/src/web/ui-dist/img/fx_amplifier.svg new file mode 100644 index 0000000..2325931 --- /dev/null +++ b/src/web/ui-dist/img/fx_amplifier.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_analyzer.svg b/src/web/ui-dist/img/fx_analyzer.svg new file mode 100644 index 0000000..7598fc1 --- /dev/null +++ b/src/web/ui-dist/img/fx_analyzer.svg @@ -0,0 +1,8 @@ + + + + + + diff --git a/src/web/ui-dist/img/fx_chorus.svg b/src/web/ui-dist/img/fx_chorus.svg new file mode 100644 index 0000000..301a39f --- /dev/null +++ b/src/web/ui-dist/img/fx_chorus.svg @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_compressor.svg b/src/web/ui-dist/img/fx_compressor.svg new file mode 100644 index 0000000..f6d7029 --- /dev/null +++ b/src/web/ui-dist/img/fx_compressor.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_constant.svg b/src/web/ui-dist/img/fx_constant.svg new file mode 100644 index 0000000..321a890 --- /dev/null +++ b/src/web/ui-dist/img/fx_constant.svg @@ -0,0 +1,28 @@ + + + + + + + fx + + k + + + + + diff --git a/src/web/ui-dist/img/fx_converter.svg b/src/web/ui-dist/img/fx_converter.svg new file mode 100644 index 0000000..ade942c --- /dev/null +++ b/src/web/ui-dist/img/fx_converter.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_delay.svg b/src/web/ui-dist/img/fx_delay.svg new file mode 100644 index 0000000..b5e29ca --- /dev/null +++ b/src/web/ui-dist/img/fx_delay.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_dial.svg b/src/web/ui-dist/img/fx_dial.svg new file mode 100644 index 0000000..bd56d4f --- /dev/null +++ b/src/web/ui-dist/img/fx_dial.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_distortion.svg b/src/web/ui-dist/img/fx_distortion.svg new file mode 100644 index 0000000..1ad8b16 --- /dev/null +++ b/src/web/ui-dist/img/fx_distortion.svg @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_empty.svg b/src/web/ui-dist/img/fx_empty.svg new file mode 100644 index 0000000..9125ba3 --- /dev/null +++ b/src/web/ui-dist/img/fx_empty.svg @@ -0,0 +1,6 @@ + + + + + diff --git a/src/web/ui-dist/img/fx_eq.svg b/src/web/ui-dist/img/fx_eq.svg new file mode 100644 index 0000000..61d6873 --- /dev/null +++ b/src/web/ui-dist/img/fx_eq.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_error.svg b/src/web/ui-dist/img/fx_error.svg new file mode 100644 index 0000000..37f8f1f --- /dev/null +++ b/src/web/ui-dist/img/fx_error.svg @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/src/web/ui-dist/img/fx_filter.svg b/src/web/ui-dist/img/fx_filter.svg new file mode 100644 index 0000000..e294879 --- /dev/null +++ b/src/web/ui-dist/img/fx_filter.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_filter_hp.svg b/src/web/ui-dist/img/fx_filter_hp.svg new file mode 100755 index 0000000..d695af5 --- /dev/null +++ b/src/web/ui-dist/img/fx_filter_hp.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_flanger.svg b/src/web/ui-dist/img/fx_flanger.svg new file mode 100644 index 0000000..0835ea3 --- /dev/null +++ b/src/web/ui-dist/img/fx_flanger.svg @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_flanger2.svg b/src/web/ui-dist/img/fx_flanger2.svg new file mode 100644 index 0000000..ffed761 --- /dev/null +++ b/src/web/ui-dist/img/fx_flanger2.svg @@ -0,0 +1,194 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_function.svg b/src/web/ui-dist/img/fx_function.svg new file mode 100644 index 0000000..fb59658 --- /dev/null +++ b/src/web/ui-dist/img/fx_function.svg @@ -0,0 +1,41 @@ + + + + + + + + fx + + + + + diff --git a/src/web/ui-dist/img/fx_gate.svg b/src/web/ui-dist/img/fx_gate.svg new file mode 100644 index 0000000..8f2462a --- /dev/null +++ b/src/web/ui-dist/img/fx_gate.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_generator.svg b/src/web/ui-dist/img/fx_generator.svg new file mode 100644 index 0000000..b77ef00 --- /dev/null +++ b/src/web/ui-dist/img/fx_generator.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_instrument.svg b/src/web/ui-dist/img/fx_instrument.svg new file mode 100644 index 0000000..7627d61 --- /dev/null +++ b/src/web/ui-dist/img/fx_instrument.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_limiter.svg b/src/web/ui-dist/img/fx_limiter.svg new file mode 100644 index 0000000..2c465c7 --- /dev/null +++ b/src/web/ui-dist/img/fx_limiter.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_lr.svg b/src/web/ui-dist/img/fx_lr.svg new file mode 100644 index 0000000..6f178d2 --- /dev/null +++ b/src/web/ui-dist/img/fx_lr.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_mixer.svg b/src/web/ui-dist/img/fx_mixer.svg new file mode 100644 index 0000000..891fd3b --- /dev/null +++ b/src/web/ui-dist/img/fx_mixer.svg @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_modulator.svg b/src/web/ui-dist/img/fx_modulator.svg new file mode 100644 index 0000000..f1bba64 --- /dev/null +++ b/src/web/ui-dist/img/fx_modulator.svg @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_multiband_eq.svg b/src/web/ui-dist/img/fx_multiband_eq.svg new file mode 100755 index 0000000..1e43d40 --- /dev/null +++ b/src/web/ui-dist/img/fx_multiband_eq.svg @@ -0,0 +1,15 @@ + + + + + + + + diff --git a/src/web/ui-dist/img/fx_oscillator.svg b/src/web/ui-dist/img/fx_oscillator.svg new file mode 100644 index 0000000..b034041 --- /dev/null +++ b/src/web/ui-dist/img/fx_oscillator.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_parametric_eq.svg b/src/web/ui-dist/img/fx_parametric_eq.svg new file mode 100644 index 0000000..edf2ca7 --- /dev/null +++ b/src/web/ui-dist/img/fx_parametric_eq.svg @@ -0,0 +1,44 @@ + + + + + + + diff --git a/src/web/ui-dist/img/fx_phaser.svg b/src/web/ui-dist/img/fx_phaser.svg new file mode 100644 index 0000000..414b1e2 --- /dev/null +++ b/src/web/ui-dist/img/fx_phaser.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_pitch.svg b/src/web/ui-dist/img/fx_pitch.svg new file mode 100644 index 0000000..88b9517 --- /dev/null +++ b/src/web/ui-dist/img/fx_pitch.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_plugin.svg b/src/web/ui-dist/img/fx_plugin.svg new file mode 100644 index 0000000..e4dadfa --- /dev/null +++ b/src/web/ui-dist/img/fx_plugin.svg @@ -0,0 +1,12 @@ + + + + + + + diff --git a/src/web/ui-dist/img/fx_reverb.svg b/src/web/ui-dist/img/fx_reverb.svg new file mode 100644 index 0000000..55f836f --- /dev/null +++ b/src/web/ui-dist/img/fx_reverb.svg @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_simulator.svg b/src/web/ui-dist/img/fx_simulator.svg new file mode 100644 index 0000000..5cfd98c --- /dev/null +++ b/src/web/ui-dist/img/fx_simulator.svg @@ -0,0 +1,27 @@ + + + + + + + 0 + + 1 + 0 + 1 + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_spatial.svg b/src/web/ui-dist/img/fx_spatial.svg new file mode 100644 index 0000000..ae27920 --- /dev/null +++ b/src/web/ui-dist/img/fx_spatial.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_spectral.svg b/src/web/ui-dist/img/fx_spectral.svg new file mode 100644 index 0000000..dadd1a1 --- /dev/null +++ b/src/web/ui-dist/img/fx_spectral.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_split_a.svg b/src/web/ui-dist/img/fx_split_a.svg new file mode 100644 index 0000000..8dc208c --- /dev/null +++ b/src/web/ui-dist/img/fx_split_a.svg @@ -0,0 +1,18 @@ + + + + + + + A + + + + + + + + diff --git a/src/web/ui-dist/img/fx_split_b.svg b/src/web/ui-dist/img/fx_split_b.svg new file mode 100644 index 0000000..ddebee8 --- /dev/null +++ b/src/web/ui-dist/img/fx_split_b.svg @@ -0,0 +1,23 @@ + + + + + + + B + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_terminal.svg b/src/web/ui-dist/img/fx_terminal.svg new file mode 100644 index 0000000..b2f746a --- /dev/null +++ b/src/web/ui-dist/img/fx_terminal.svg @@ -0,0 +1,9 @@ + + + + + + + diff --git a/src/web/ui-dist/img/fx_utility.svg b/src/web/ui-dist/img/fx_utility.svg new file mode 100644 index 0000000..f7b40b8 --- /dev/null +++ b/src/web/ui-dist/img/fx_utility.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/ic_bank.svg b/src/web/ui-dist/img/ic_bank.svg new file mode 100644 index 0000000..d5eb29e --- /dev/null +++ b/src/web/ui-dist/img/ic_bank.svg @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/src/web/ui-dist/img/ic_drawer.svg b/src/web/ui-dist/img/ic_drawer.svg new file mode 100644 index 0000000..d2b51d3 --- /dev/null +++ b/src/web/ui-dist/img/ic_drawer.svg @@ -0,0 +1,11577 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + πpedal + + + + + + + + + + diff --git a/src/web/ui-dist/img/ic_drawer_2.svg b/src/web/ui-dist/img/ic_drawer_2.svg new file mode 100755 index 0000000..cd8e222 --- /dev/null +++ b/src/web/ui-dist/img/ic_drawer_2.svg @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/ic_logo.svg b/src/web/ui-dist/img/ic_logo.svg new file mode 100644 index 0000000..1f7e03c --- /dev/null +++ b/src/web/ui-dist/img/ic_logo.svg @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/ic_navigate_before.svg b/src/web/ui-dist/img/ic_navigate_before.svg new file mode 100644 index 0000000..f4a753b --- /dev/null +++ b/src/web/ui-dist/img/ic_navigate_before.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/web/ui-dist/img/ic_navigate_next.svg b/src/web/ui-dist/img/ic_navigate_next.svg new file mode 100644 index 0000000..6f4bc0a --- /dev/null +++ b/src/web/ui-dist/img/ic_navigate_next.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/web/ui-dist/img/ic_presets.svg b/src/web/ui-dist/img/ic_presets.svg new file mode 100644 index 0000000..374389d --- /dev/null +++ b/src/web/ui-dist/img/ic_presets.svg @@ -0,0 +1,10 @@ + + + + + + + diff --git a/src/web/ui-dist/img/ic_presets_white.svg b/src/web/ui-dist/img/ic_presets_white.svg new file mode 100644 index 0000000..931ebb2 --- /dev/null +++ b/src/web/ui-dist/img/ic_presets_white.svg @@ -0,0 +1,12 @@ + + + + + + + + + diff --git a/src/web/ui-dist/index.html b/src/web/ui-dist/index.html index 45840af..6c1ee43 100644 --- a/src/web/ui-dist/index.html +++ b/src/web/ui-dist/index.html @@ -2,11 +2,12 @@ + + + NAM Pedal - - Pi Multi-FX Pedal - - + +