@jsenv/server 17.7.1 → 17.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -853,6 +853,18 @@ main {
853
853
  font-weight: 700;
854
854
  }
855
855
 
856
+ .route_also_method {
857
+ color: #fff;
858
+ text-shadow: 0 1px #0000001a;
859
+ background: var(--method-color);
860
+ border-radius: 3px;
861
+ margin-left: 6px;
862
+ padding: 3px 6px;
863
+ font-family: sans-serif;
864
+ font-size: 11px;
865
+ font-weight: 700;
866
+ }
867
+
856
868
  .route_resource {
857
869
  word-break: break-word;
858
870
  margin-top: 0;
@@ -897,7 +909,7 @@ main {
897
909
  opacity: .85;
898
910
  }
899
911
 
900
- .route_details[data-forbidden] .route_method {
912
+ .route_details[data-forbidden] .route_method, .route_details[data-forbidden] .route_also_method {
901
913
  opacity: .7;
902
914
  filter: grayscale(60%);
903
915
  }
@@ -1221,23 +1233,23 @@ label .filter_text {
1221
1233
  });
1222
1234
  </script>
1223
1235
  <script type="module">/* esm.sh - preact@10.23.1 */
1224
- var M$3,h$1,X,ie,x$2,J,Y,R,j$1,$,O$1,T$2={},ee=[],le=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,I=Array.isArray;function b$3(_,e){for(var t in e)_[t]=e[t];return _}function _e(_){var e=_.parentNode;e&&e.removeChild(_);}function se(_,e,t){var i,n,r,l={};for(r in e)r=="key"?i=e[r]:r=="ref"?n=e[r]:l[r]=e[r];if(arguments.length>2&&(l.children=arguments.length>3?M$3.call(arguments,2):t),typeof _=="function"&&_.defaultProps!=null)for(r in _.defaultProps)l[r]===void 0&&(l[r]=_.defaultProps[r]);return U$1(_,l,i,n,null)}function U$1(_,e,t,i,n){var r={type:_,props:e,key:t,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:n??++X,__i:-1,__u:0};return n==null&&h$1.vnode!=null&&h$1.vnode(r),r}function N(_){return _.children}function F$1(_,e){this.props=_,this.context=e;}function C$2(_,e){if(e==null)return _.__?C$2(_.__,_.__i+1):null;for(var t;e<_.__k.length;e++)if((t=_.__k[e])!=null&&t.__e!=null)return t.__e;return typeof _.type=="function"?C$2(_):null}function te(_){var e,t;if((_=_.__)!=null&&_.__c!=null){for(_.__e=_.__c.base=null,e=0;e<_.__k.length;e++)if((t=_.__k[e])!=null&&t.__e!=null){_.__e=_.__c.base=t.__e;break}return te(_)}}function B(_){(!_.__d&&(_.__d=true)&&x$2.push(_)&&!H$1.__r++||J!==h$1.debounceRendering)&&((J=h$1.debounceRendering)||Y)(H$1);}function H$1(){var _,e,t,i,n,r,l,s;for(x$2.sort(R);_=x$2.shift();)_.__d&&(e=x$2.length,i=void 0,r=(n=(t=_).__v).__e,l=[],s=[],t.__P&&((i=b$3({},n)).__v=n.__v+1,h$1.vnode&&h$1.vnode(i),z$1(t.__P,i,n,t.__n,t.__P.namespaceURI,32&n.__u?[r]:null,l,r??C$2(n),!!(32&n.__u),s),i.__v=n.__v,i.__.__k[i.__i]=i,re(l,i,s),i.__e!=r&&te(i)),x$2.length>e&&x$2.sort(R));H$1.__r=0;}function ne(_,e,t,i,n,r,l,s,c,u,p){var o,m,f,v,g,y=i&&i.__k||ee,a=e.length;for(t.__d=c,ue(t,e,y),c=t.__d,o=0;o<a;o++)(f=t.__k[o])!=null&&typeof f!="boolean"&&typeof f!="function"&&(m=f.__i===-1?T$2:y[f.__i]||T$2,f.__i=o,z$1(_,f,m,n,r,l,s,c,u,p),v=f.__e,f.ref&&m.ref!=f.ref&&(m.ref&&q$1(m.ref,null,f),p.push(f.ref,f.__c||v,f)),g==null&&v!=null&&(g=v),65536&f.__u||m.__k===f.__k?c=oe(f,c,_):typeof f.type=="function"&&f.__d!==void 0?c=f.__d:v&&(c=v.nextSibling),f.__d=void 0,f.__u&=-196609);t.__d=c,t.__e=g;}function ue(_,e,t){var i,n,r,l,s,c=e.length,u=t.length,p=u,o=0;for(_.__k=[],i=0;i<c;i++)l=i+o,(n=_.__k[i]=(n=e[i])==null||typeof n=="boolean"||typeof n=="function"?null:typeof n=="string"||typeof n=="number"||typeof n=="bigint"||n.constructor==String?U$1(null,n,null,null,null):I(n)?U$1(N,{children:n},null,null,null):n.constructor===void 0&&n.__b>0?U$1(n.type,n.props,n.key,n.ref?n.ref:null,n.__v):n)!=null?(n.__=_,n.__b=_.__b+1,s=ce(n,t,l,p),n.__i=s,r=null,s!==-1&&(p--,(r=t[s])&&(r.__u|=131072)),r==null||r.__v===null?(s==-1&&o--,typeof n.type!="function"&&(n.__u|=65536)):s!==l&&(s==l-1?o=s-l:s==l+1?o++:s>l?p>c-l?o+=s-l:o--:s<l&&o++,s!==i+o&&(n.__u|=65536))):(r=t[l])&&r.key==null&&r.__e&&(131072&r.__u)==0&&(r.__e==_.__d&&(_.__d=C$2(r)),V(r,r,false),t[l]=null,p--);if(p)for(i=0;i<u;i++)(r=t[i])!=null&&(131072&r.__u)==0&&(r.__e==_.__d&&(_.__d=C$2(r)),V(r,r));}function oe(_,e,t){var i,n;if(typeof _.type=="function"){for(i=_.__k,n=0;i&&n<i.length;n++)i[n]&&(i[n].__=_,e=oe(i[n],e,t));return e}_.__e!=e&&(e&&_.type&&!t.contains(e)&&(e=C$2(_)),t.insertBefore(_.__e,e||null),e=_.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType===8);return e}function ce(_,e,t,i){var n=_.key,r=_.type,l=t-1,s=t+1,c=e[t];if(c===null||c&&n==c.key&&r===c.type&&(131072&c.__u)==0)return t;if(i>(c!=null&&(131072&c.__u)==0?1:0))for(;l>=0||s<e.length;){if(l>=0){if((c=e[l])&&(131072&c.__u)==0&&n==c.key&&r===c.type)return l;l--;}if(s<e.length){if((c=e[s])&&(131072&c.__u)==0&&n==c.key&&r===c.type)return s;s++;}}return -1}function K(_,e,t){e[0]==="-"?_.setProperty(e,t??""):_[e]=t==null?"":typeof t!="number"||le.test(e)?t:t+"px";}function W$2(_,e,t,i,n){var r;e:if(e==="style")if(typeof t=="string")_.style.cssText=t;else {if(typeof i=="string"&&(_.style.cssText=i=""),i)for(e in i)t&&e in t||K(_.style,e,"");if(t)for(e in t)i&&t[e]===i[e]||K(_.style,e,t[e]);}else if(e[0]==="o"&&e[1]==="n")r=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in _||e==="onFocusOut"||e==="onFocusIn"?e.toLowerCase().slice(2):e.slice(2),_.l||(_.l={}),_.l[e+r]=t,t?i?t.u=i.u:(t.u=j$1,_.addEventListener(e,r?O$1:$,r)):_.removeEventListener(e,r?O$1:$,r);else {if(n=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in _)try{_[e]=t??"";break e}catch{}typeof t=="function"||(t==null||t===false&&e[4]!=="-"?_.removeAttribute(e):_.setAttribute(e,e=="popover"&&t==1?"":t));}}function Q(_){return function(e){if(this.l){var t=this.l[e.type+_];if(e.t==null)e.t=j$1++;else if(e.t<t.u)return;return t(h$1.event?h$1.event(e):e)}}}function z$1(_,e,t,i,n,r,l,s,c,u){var p,o,m,f,v,g,y,a,d,P,w,D,S,G,E,A,k=e.type;if(e.constructor!==void 0)return null;128&t.__u&&(c=!!(32&t.__u),r=[s=e.__e=t.__e]),(p=h$1.__b)&&p(e);e:if(typeof k=="function")try{if(a=e.props,d="prototype"in k&&k.prototype.render,P=(p=k.contextType)&&i[p.__c],w=p?P?P.props.value:p.__:i,t.__c?y=(o=e.__c=t.__c).__=o.__E:(d?e.__c=o=new k(a,w):(e.__c=o=new F$1(a,w),o.constructor=k,o.render=ae),P&&P.sub(o),o.props=a,o.state||(o.state={}),o.context=w,o.__n=i,m=o.__d=!0,o.__h=[],o._sb=[]),d&&o.__s==null&&(o.__s=o.state),d&&k.getDerivedStateFromProps!=null&&(o.__s==o.state&&(o.__s=b$3({},o.__s)),b$3(o.__s,k.getDerivedStateFromProps(a,o.__s))),f=o.props,v=o.state,o.__v=e,m)d&&k.getDerivedStateFromProps==null&&o.componentWillMount!=null&&o.componentWillMount(),d&&o.componentDidMount!=null&&o.__h.push(o.componentDidMount);else {if(d&&k.getDerivedStateFromProps==null&&a!==f&&o.componentWillReceiveProps!=null&&o.componentWillReceiveProps(a,w),!o.__e&&(o.shouldComponentUpdate!=null&&o.shouldComponentUpdate(a,o.__s,w)===!1||e.__v===t.__v)){for(e.__v!==t.__v&&(o.props=a,o.state=o.__s,o.__d=!1),e.__e=t.__e,e.__k=t.__k,e.__k.forEach(function(L){L&&(L.__=e);}),D=0;D<o._sb.length;D++)o.__h.push(o._sb[D]);o._sb=[],o.__h.length&&l.push(o);break e}o.componentWillUpdate!=null&&o.componentWillUpdate(a,o.__s,w),d&&o.componentDidUpdate!=null&&o.__h.push(function(){o.componentDidUpdate(f,v,g);});}if(o.context=w,o.props=a,o.__P=_,o.__e=!1,S=h$1.__r,G=0,d){for(o.state=o.__s,o.__d=!1,S&&S(e),p=o.render(o.props,o.state,o.context),E=0;E<o._sb.length;E++)o.__h.push(o._sb[E]);o._sb=[];}else do o.__d=!1,S&&S(e),p=o.render(o.props,o.state,o.context),o.state=o.__s;while(o.__d&&++G<25);o.state=o.__s,o.getChildContext!=null&&(i=b$3(b$3({},i),o.getChildContext())),d&&!m&&o.getSnapshotBeforeUpdate!=null&&(g=o.getSnapshotBeforeUpdate(f,v)),ne(_,I(A=p!=null&&p.type===N&&p.key==null?p.props.children:p)?A:[A],e,t,i,n,r,l,s,c,u),o.base=e.__e,e.__u&=-161,o.__h.length&&l.push(o),y&&(o.__E=o.__=null);}catch(L){if(e.__v=null,c||r!=null){for(e.__u|=c?160:32;s&&s.nodeType===8&&s.nextSibling;)s=s.nextSibling;r[r.indexOf(s)]=null,e.__e=s;}else e.__e=t.__e,e.__k=t.__k;h$1.__e(L,e,t);}else r==null&&e.__v===t.__v?(e.__k=t.__k,e.__e=t.__e):e.__e=pe(t.__e,e,t,i,n,r,l,c,u);(p=h$1.diffed)&&p(e);}function re(_,e,t){e.__d=void 0;for(var i=0;i<t.length;i++)q$1(t[i],t[++i],t[++i]);h$1.__c&&h$1.__c(e,_),_.some(function(n){try{_=n.__h,n.__h=[],_.some(function(r){r.call(n);});}catch(r){h$1.__e(r,n.__v);}});}function pe(_,e,t,i,n,r,l,s,c){var u,p,o,m,f,v,g,y=t.props,a=e.props,d=e.type;if(d==="svg"?n="http://www.w3.org/2000/svg":d==="math"?n="http://www.w3.org/1998/Math/MathML":n||(n="http://www.w3.org/1999/xhtml"),r!=null){for(u=0;u<r.length;u++)if((f=r[u])&&"setAttribute"in f==!!d&&(d?f.localName===d:f.nodeType===3)){_=f,r[u]=null;break}}if(_==null){if(d===null)return document.createTextNode(a);_=document.createElementNS(n,d,a.is&&a),r=null,s=false;}if(d===null)y===a||s&&_.data===a||(_.data=a);else {if(r=r&&M$3.call(_.childNodes),y=t.props||T$2,!s&&r!=null)for(y={},u=0;u<_.attributes.length;u++)y[(f=_.attributes[u]).name]=f.value;for(u in y)if(f=y[u],u!="children"){if(u=="dangerouslySetInnerHTML")o=f;else if(u!=="key"&&!(u in a)){if(u=="value"&&"defaultValue"in a||u=="checked"&&"defaultChecked"in a)continue;W$2(_,u,null,f,n);}}for(u in a)f=a[u],u=="children"?m=f:u=="dangerouslySetInnerHTML"?p=f:u=="value"?v=f:u=="checked"?g=f:u==="key"||s&&typeof f!="function"||y[u]===f||W$2(_,u,f,y[u],n);if(p)s||o&&(p.__html===o.__html||p.__html===_.innerHTML)||(_.innerHTML=p.__html),e.__k=[];else if(o&&(_.innerHTML=""),ne(_,I(m)?m:[m],e,t,i,d==="foreignObject"?"http://www.w3.org/1999/xhtml":n,r,l,r?r[0]:t.__k&&C$2(t,0),s,c),r!=null)for(u=r.length;u--;)r[u]!=null&&_e(r[u]);s||(u="value",v!==void 0&&(v!==_[u]||d==="progress"&&!v||d==="option"&&v!==y[u])&&W$2(_,u,v,y[u],n),u="checked",g!==void 0&&g!==_[u]&&W$2(_,u,g,y[u],n));}return _}function q$1(_,e,t){try{if(typeof _=="function"){var i=typeof _.__u=="function";i&&_.__u(),i&&e==null||(_.__u=_(e));}else _.current=e;}catch(n){h$1.__e(n,t);}}function V(_,e,t){var i,n;if(h$1.unmount&&h$1.unmount(_),(i=_.ref)&&(i.current&&i.current!==_.__e||q$1(i,null,e)),(i=_.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount();}catch(r){h$1.__e(r,e);}i.base=i.__P=null;}if(i=_.__k)for(n=0;n<i.length;n++)i[n]&&V(i[n],e,t||typeof _.type!="function");t||_.__e==null||_e(_.__e),_.__c=_.__=_.__e=_.__d=void 0;}function ae(_,e,t){return this.constructor(_,t)}function de(_,e,t){var i,n,r,l;h$1.__&&h$1.__(_,e),n=(i="undefined"=="function")?null:e.__k,r=[],l=[],z$1(e,_=(e).__k=se(N,null,[_]),n||T$2,T$2,e.namespaceURI,n?null:e.firstChild?M$3.call(e.childNodes):null,r,n?n.__e:e.firstChild,i,l),re(r,_,l);}M$3=ee.slice,h$1={__e:function(_,e,t,i){for(var n,r,l;e=e.__;)if((n=e.__c)&&!n.__)try{if((r=n.constructor)&&r.getDerivedStateFromError!=null&&(n.setState(r.getDerivedStateFromError(_)),l=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(_,i||{}),l=n.__d),l)return n.__E=n}catch(s){_=s;}throw _}},X=0,ie=function(_){return _!=null&&_.constructor==null},F$1.prototype.setState=function(_,e){var t;t=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=b$3({},this.state),typeof _=="function"&&(_=_(b$3({},t),this.props)),_&&b$3(t,_),_!=null&&this.__v&&(e&&this._sb.push(e),B(this));},F$1.prototype.forceUpdate=function(_){this.__v&&(this.__e=true,_&&this.__h.push(_),B(this));},F$1.prototype.render=N,x$2=[],Y=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,R=function(_,e){return _.__v.__b-e.__v.__b},H$1.__r=0,j$1=0,$=Q(false),O$1=Q(true);
1236
+ var M$3,h,X,ie,x$2,J,Y,R,j,$,O$1,T$2={},ee=[],le=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,I=Array.isArray;function b$3(_,e){for(var t in e)_[t]=e[t];return _}function _e(_){var e=_.parentNode;e&&e.removeChild(_);}function se(_,e,t){var i,n,r,l={};for(r in e)r=="key"?i=e[r]:r=="ref"?n=e[r]:l[r]=e[r];if(arguments.length>2&&(l.children=arguments.length>3?M$3.call(arguments,2):t),typeof _=="function"&&_.defaultProps!=null)for(r in _.defaultProps)l[r]===void 0&&(l[r]=_.defaultProps[r]);return U$1(_,l,i,n,null)}function U$1(_,e,t,i,n){var r={type:_,props:e,key:t,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:n??++X,__i:-1,__u:0};return n==null&&h.vnode!=null&&h.vnode(r),r}function N(_){return _.children}function F$1(_,e){this.props=_,this.context=e;}function C$3(_,e){if(e==null)return _.__?C$3(_.__,_.__i+1):null;for(var t;e<_.__k.length;e++)if((t=_.__k[e])!=null&&t.__e!=null)return t.__e;return typeof _.type=="function"?C$3(_):null}function te(_){var e,t;if((_=_.__)!=null&&_.__c!=null){for(_.__e=_.__c.base=null,e=0;e<_.__k.length;e++)if((t=_.__k[e])!=null&&t.__e!=null){_.__e=_.__c.base=t.__e;break}return te(_)}}function B(_){(!_.__d&&(_.__d=true)&&x$2.push(_)&&!H$1.__r++||J!==h.debounceRendering)&&((J=h.debounceRendering)||Y)(H$1);}function H$1(){var _,e,t,i,n,r,l,s;for(x$2.sort(R);_=x$2.shift();)_.__d&&(e=x$2.length,i=void 0,r=(n=(t=_).__v).__e,l=[],s=[],t.__P&&((i=b$3({},n)).__v=n.__v+1,h.vnode&&h.vnode(i),z$1(t.__P,i,n,t.__n,t.__P.namespaceURI,32&n.__u?[r]:null,l,r??C$3(n),!!(32&n.__u),s),i.__v=n.__v,i.__.__k[i.__i]=i,re(l,i,s),i.__e!=r&&te(i)),x$2.length>e&&x$2.sort(R));H$1.__r=0;}function ne(_,e,t,i,n,r,l,s,c,u,p){var o,m,f,v,g,y=i&&i.__k||ee,a=e.length;for(t.__d=c,ue(t,e,y),c=t.__d,o=0;o<a;o++)(f=t.__k[o])!=null&&typeof f!="boolean"&&typeof f!="function"&&(m=f.__i===-1?T$2:y[f.__i]||T$2,f.__i=o,z$1(_,f,m,n,r,l,s,c,u,p),v=f.__e,f.ref&&m.ref!=f.ref&&(m.ref&&q$1(m.ref,null,f),p.push(f.ref,f.__c||v,f)),g==null&&v!=null&&(g=v),65536&f.__u||m.__k===f.__k?c=oe(f,c,_):typeof f.type=="function"&&f.__d!==void 0?c=f.__d:v&&(c=v.nextSibling),f.__d=void 0,f.__u&=-196609);t.__d=c,t.__e=g;}function ue(_,e,t){var i,n,r,l,s,c=e.length,u=t.length,p=u,o=0;for(_.__k=[],i=0;i<c;i++)l=i+o,(n=_.__k[i]=(n=e[i])==null||typeof n=="boolean"||typeof n=="function"?null:typeof n=="string"||typeof n=="number"||typeof n=="bigint"||n.constructor==String?U$1(null,n,null,null,null):I(n)?U$1(N,{children:n},null,null,null):n.constructor===void 0&&n.__b>0?U$1(n.type,n.props,n.key,n.ref?n.ref:null,n.__v):n)!=null?(n.__=_,n.__b=_.__b+1,s=ce(n,t,l,p),n.__i=s,r=null,s!==-1&&(p--,(r=t[s])&&(r.__u|=131072)),r==null||r.__v===null?(s==-1&&o--,typeof n.type!="function"&&(n.__u|=65536)):s!==l&&(s==l-1?o=s-l:s==l+1?o++:s>l?p>c-l?o+=s-l:o--:s<l&&o++,s!==i+o&&(n.__u|=65536))):(r=t[l])&&r.key==null&&r.__e&&(131072&r.__u)==0&&(r.__e==_.__d&&(_.__d=C$3(r)),V(r,r,false),t[l]=null,p--);if(p)for(i=0;i<u;i++)(r=t[i])!=null&&(131072&r.__u)==0&&(r.__e==_.__d&&(_.__d=C$3(r)),V(r,r));}function oe(_,e,t){var i,n;if(typeof _.type=="function"){for(i=_.__k,n=0;i&&n<i.length;n++)i[n]&&(i[n].__=_,e=oe(i[n],e,t));return e}_.__e!=e&&(e&&_.type&&!t.contains(e)&&(e=C$3(_)),t.insertBefore(_.__e,e||null),e=_.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType===8);return e}function ce(_,e,t,i){var n=_.key,r=_.type,l=t-1,s=t+1,c=e[t];if(c===null||c&&n==c.key&&r===c.type&&(131072&c.__u)==0)return t;if(i>(c!=null&&(131072&c.__u)==0?1:0))for(;l>=0||s<e.length;){if(l>=0){if((c=e[l])&&(131072&c.__u)==0&&n==c.key&&r===c.type)return l;l--;}if(s<e.length){if((c=e[s])&&(131072&c.__u)==0&&n==c.key&&r===c.type)return s;s++;}}return -1}function K(_,e,t){e[0]==="-"?_.setProperty(e,t??""):_[e]=t==null?"":typeof t!="number"||le.test(e)?t:t+"px";}function W$1(_,e,t,i,n){var r;e:if(e==="style")if(typeof t=="string")_.style.cssText=t;else {if(typeof i=="string"&&(_.style.cssText=i=""),i)for(e in i)t&&e in t||K(_.style,e,"");if(t)for(e in t)i&&t[e]===i[e]||K(_.style,e,t[e]);}else if(e[0]==="o"&&e[1]==="n")r=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in _||e==="onFocusOut"||e==="onFocusIn"?e.toLowerCase().slice(2):e.slice(2),_.l||(_.l={}),_.l[e+r]=t,t?i?t.u=i.u:(t.u=j,_.addEventListener(e,r?O$1:$,r)):_.removeEventListener(e,r?O$1:$,r);else {if(n=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in _)try{_[e]=t??"";break e}catch{}typeof t=="function"||(t==null||t===false&&e[4]!=="-"?_.removeAttribute(e):_.setAttribute(e,e=="popover"&&t==1?"":t));}}function Q(_){return function(e){if(this.l){var t=this.l[e.type+_];if(e.t==null)e.t=j++;else if(e.t<t.u)return;return t(h.event?h.event(e):e)}}}function z$1(_,e,t,i,n,r,l,s,c,u){var p,o,m,f,v,g,y,a,d,P,w,D,S,G,E,A,k=e.type;if(e.constructor!==void 0)return null;128&t.__u&&(c=!!(32&t.__u),r=[s=e.__e=t.__e]),(p=h.__b)&&p(e);e:if(typeof k=="function")try{if(a=e.props,d="prototype"in k&&k.prototype.render,P=(p=k.contextType)&&i[p.__c],w=p?P?P.props.value:p.__:i,t.__c?y=(o=e.__c=t.__c).__=o.__E:(d?e.__c=o=new k(a,w):(e.__c=o=new F$1(a,w),o.constructor=k,o.render=ae),P&&P.sub(o),o.props=a,o.state||(o.state={}),o.context=w,o.__n=i,m=o.__d=!0,o.__h=[],o._sb=[]),d&&o.__s==null&&(o.__s=o.state),d&&k.getDerivedStateFromProps!=null&&(o.__s==o.state&&(o.__s=b$3({},o.__s)),b$3(o.__s,k.getDerivedStateFromProps(a,o.__s))),f=o.props,v=o.state,o.__v=e,m)d&&k.getDerivedStateFromProps==null&&o.componentWillMount!=null&&o.componentWillMount(),d&&o.componentDidMount!=null&&o.__h.push(o.componentDidMount);else {if(d&&k.getDerivedStateFromProps==null&&a!==f&&o.componentWillReceiveProps!=null&&o.componentWillReceiveProps(a,w),!o.__e&&(o.shouldComponentUpdate!=null&&o.shouldComponentUpdate(a,o.__s,w)===!1||e.__v===t.__v)){for(e.__v!==t.__v&&(o.props=a,o.state=o.__s,o.__d=!1),e.__e=t.__e,e.__k=t.__k,e.__k.forEach(function(L){L&&(L.__=e);}),D=0;D<o._sb.length;D++)o.__h.push(o._sb[D]);o._sb=[],o.__h.length&&l.push(o);break e}o.componentWillUpdate!=null&&o.componentWillUpdate(a,o.__s,w),d&&o.componentDidUpdate!=null&&o.__h.push(function(){o.componentDidUpdate(f,v,g);});}if(o.context=w,o.props=a,o.__P=_,o.__e=!1,S=h.__r,G=0,d){for(o.state=o.__s,o.__d=!1,S&&S(e),p=o.render(o.props,o.state,o.context),E=0;E<o._sb.length;E++)o.__h.push(o._sb[E]);o._sb=[];}else do o.__d=!1,S&&S(e),p=o.render(o.props,o.state,o.context),o.state=o.__s;while(o.__d&&++G<25);o.state=o.__s,o.getChildContext!=null&&(i=b$3(b$3({},i),o.getChildContext())),d&&!m&&o.getSnapshotBeforeUpdate!=null&&(g=o.getSnapshotBeforeUpdate(f,v)),ne(_,I(A=p!=null&&p.type===N&&p.key==null?p.props.children:p)?A:[A],e,t,i,n,r,l,s,c,u),o.base=e.__e,e.__u&=-161,o.__h.length&&l.push(o),y&&(o.__E=o.__=null);}catch(L){if(e.__v=null,c||r!=null){for(e.__u|=c?160:32;s&&s.nodeType===8&&s.nextSibling;)s=s.nextSibling;r[r.indexOf(s)]=null,e.__e=s;}else e.__e=t.__e,e.__k=t.__k;h.__e(L,e,t);}else r==null&&e.__v===t.__v?(e.__k=t.__k,e.__e=t.__e):e.__e=pe(t.__e,e,t,i,n,r,l,c,u);(p=h.diffed)&&p(e);}function re(_,e,t){e.__d=void 0;for(var i=0;i<t.length;i++)q$1(t[i],t[++i],t[++i]);h.__c&&h.__c(e,_),_.some(function(n){try{_=n.__h,n.__h=[],_.some(function(r){r.call(n);});}catch(r){h.__e(r,n.__v);}});}function pe(_,e,t,i,n,r,l,s,c){var u,p,o,m,f,v,g,y=t.props,a=e.props,d=e.type;if(d==="svg"?n="http://www.w3.org/2000/svg":d==="math"?n="http://www.w3.org/1998/Math/MathML":n||(n="http://www.w3.org/1999/xhtml"),r!=null){for(u=0;u<r.length;u++)if((f=r[u])&&"setAttribute"in f==!!d&&(d?f.localName===d:f.nodeType===3)){_=f,r[u]=null;break}}if(_==null){if(d===null)return document.createTextNode(a);_=document.createElementNS(n,d,a.is&&a),r=null,s=false;}if(d===null)y===a||s&&_.data===a||(_.data=a);else {if(r=r&&M$3.call(_.childNodes),y=t.props||T$2,!s&&r!=null)for(y={},u=0;u<_.attributes.length;u++)y[(f=_.attributes[u]).name]=f.value;for(u in y)if(f=y[u],u!="children"){if(u=="dangerouslySetInnerHTML")o=f;else if(u!=="key"&&!(u in a)){if(u=="value"&&"defaultValue"in a||u=="checked"&&"defaultChecked"in a)continue;W$1(_,u,null,f,n);}}for(u in a)f=a[u],u=="children"?m=f:u=="dangerouslySetInnerHTML"?p=f:u=="value"?v=f:u=="checked"?g=f:u==="key"||s&&typeof f!="function"||y[u]===f||W$1(_,u,f,y[u],n);if(p)s||o&&(p.__html===o.__html||p.__html===_.innerHTML)||(_.innerHTML=p.__html),e.__k=[];else if(o&&(_.innerHTML=""),ne(_,I(m)?m:[m],e,t,i,d==="foreignObject"?"http://www.w3.org/1999/xhtml":n,r,l,r?r[0]:t.__k&&C$3(t,0),s,c),r!=null)for(u=r.length;u--;)r[u]!=null&&_e(r[u]);s||(u="value",v!==void 0&&(v!==_[u]||d==="progress"&&!v||d==="option"&&v!==y[u])&&W$1(_,u,v,y[u],n),u="checked",g!==void 0&&g!==_[u]&&W$1(_,u,g,y[u],n));}return _}function q$1(_,e,t){try{if(typeof _=="function"){var i=typeof _.__u=="function";i&&_.__u(),i&&e==null||(_.__u=_(e));}else _.current=e;}catch(n){h.__e(n,t);}}function V(_,e,t){var i,n;if(h.unmount&&h.unmount(_),(i=_.ref)&&(i.current&&i.current!==_.__e||q$1(i,null,e)),(i=_.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount();}catch(r){h.__e(r,e);}i.base=i.__P=null;}if(i=_.__k)for(n=0;n<i.length;n++)i[n]&&V(i[n],e,t||typeof _.type!="function");t||_.__e==null||_e(_.__e),_.__c=_.__=_.__e=_.__d=void 0;}function ae(_,e,t){return this.constructor(_,t)}function de(_,e,t){var i,n,r,l;h.__&&h.__(_,e),n=(i="undefined"=="function")?null:e.__k,r=[],l=[],z$1(e,_=(e).__k=se(N,null,[_]),n||T$2,T$2,e.namespaceURI,n?null:e.firstChild?M$3.call(e.childNodes):null,r,n?n.__e:e.firstChild,i,l),re(r,_,l);}M$3=ee.slice,h={__e:function(_,e,t,i){for(var n,r,l;e=e.__;)if((n=e.__c)&&!n.__)try{if((r=n.constructor)&&r.getDerivedStateFromError!=null&&(n.setState(r.getDerivedStateFromError(_)),l=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(_,i||{}),l=n.__d),l)return n.__E=n}catch(s){_=s;}throw _}},X=0,ie=function(_){return _!=null&&_.constructor==null},F$1.prototype.setState=function(_,e){var t;t=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=b$3({},this.state),typeof _=="function"&&(_=_(b$3({},t),this.props)),_&&b$3(t,_),_!=null&&this.__v&&(e&&this._sb.push(e),B(this));},F$1.prototype.forceUpdate=function(_){this.__v&&(this.__e=true,_&&this.__h.push(_),B(this));},F$1.prototype.render=N,x$2=[],Y=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,R=function(_,e){return _.__v.__b-e.__v.__b},H$1.__r=0,j=0,$=Q(false),O$1=Q(true);
1225
1237
 
1226
1238
  /* esm.sh - htm@3.1.1 */
1227
- var a$1=function(p,f,c,n){var l;f[0]=0;for(var u=1;u<f.length;u++){var g=f[u++],o=f[u]?(f[0]|=g?1:2,c[f[u++]]):f[++u];g===3?n[0]=o:g===4?n[1]=Object.assign(n[1]||{},o):g===5?(n[1]=n[1]||{})[f[++u]]=o:g===6?n[1][f[++u]]+=o+"":g?(l=p.apply(o,a$1(p,o,c,["",null])),n.push(l),o[0]?f[0]|=2:(f[u-2]=0,f[u]=l)):n.push(o);}return n},M$2=new Map;function b$2(p){var f=M$2.get(this);return f||(f=new Map,M$2.set(this,f)),(f=a$1(this,f.get(p)||(f.set(p,f=(function(c){for(var n,l,u=1,g="",o="",i=[0],s=function(v){u===1&&(v||(g=g.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?i.push(0,v,g):u===3&&(v||g)?(i.push(3,v,g),u=2):u===2&&g==="..."&&v?i.push(4,v,0):u===2&&g&&!v?i.push(5,0,true,g):u>=5&&((g||!v&&u===5)&&(i.push(u,0,g,l),u=6),v&&(i.push(u,v,0,l),u=6)),g="";},t=0;t<c.length;t++){t&&(u===1&&s(),s(t));for(var w=0;w<c[t].length;w++)n=c[t][w],u===1?n==="<"?(s(),i=[i],u=3):g+=n:u===4?g==="--"&&n===">"?(u=1,g=""):g=n+g[0]:o?n===o?o="":g+=n:n==='"'||n==="'"?o=n:n===">"?(s(),u=1):u&&(n==="="?(u=5,l=g,g=""):n==="/"&&(u<5||c[t][w+1]===">")?(s(),u===3&&(i=i[0]),u=i,(i=i[0]).push(2,0,u),u=0):n===" "||n===" "||n===`
1239
+ var a$2=function(p,f,c,n){var l;f[0]=0;for(var u=1;u<f.length;u++){var g=f[u++],o=f[u]?(f[0]|=g?1:2,c[f[u++]]):f[++u];g===3?n[0]=o:g===4?n[1]=Object.assign(n[1]||{},o):g===5?(n[1]=n[1]||{})[f[++u]]=o:g===6?n[1][f[++u]]+=o+"":g?(l=p.apply(o,a$2(p,o,c,["",null])),n.push(l),o[0]?f[0]|=2:(f[u-2]=0,f[u]=l)):n.push(o);}return n},M$2=new Map;function b$2(p){var f=M$2.get(this);return f||(f=new Map,M$2.set(this,f)),(f=a$2(this,f.get(p)||(f.set(p,f=(function(c){for(var n,l,u=1,g="",o="",i=[0],s=function(v){u===1&&(v||(g=g.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?i.push(0,v,g):u===3&&(v||g)?(i.push(3,v,g),u=2):u===2&&g==="..."&&v?i.push(4,v,0):u===2&&g&&!v?i.push(5,0,true,g):u>=5&&((g||!v&&u===5)&&(i.push(u,0,g,l),u=6),v&&(i.push(u,v,0,l),u=6)),g="";},t=0;t<c.length;t++){t&&(u===1&&s(),s(t));for(var w=0;w<c[t].length;w++)n=c[t][w],u===1?n==="<"?(s(),i=[i],u=3):g+=n:u===4?g==="--"&&n===">"?(u=1,g=""):g=n+g[0]:o?n===o?o="":g+=n:n==='"'||n==="'"?o=n:n===">"?(s(),u=1):u&&(n==="="?(u=5,l=g,g=""):n==="/"&&(u<5||c[t][w+1]===">")?(s(),u===3&&(i=i[0]),u=i,(i=i[0]).push(2,0,u),u=0):n===" "||n===" "||n===`
1228
1240
  `||n==="\r"?(s(),u=2):g+=n),u===3&&g==="!--"&&(u=4,i=i[0]);}return s(),i})(p)),f),arguments,[])).length>1?f:f[0]}
1229
1241
 
1230
1242
  /* esm.sh - htm@3.1.1/preact */
1231
1243
  var p$3=b$2.bind(se);
1232
1244
 
1233
- /* esm.sh - @preact/signals-core@1.14.4 */
1234
- var j=Symbol.for("preact-signals");function S$2(){if(v$1>1)v$1--;else {var t,i=false;for((function(){var f=p$2;for(p$2=void 0;f!==void 0;){var w=f.S;if(w.v===f.v)for(var a=w.t;a!==void 0;a=a.x)a.i===f.i&&(a.i=w.i);f=f.o;}})();c$2!==void 0;){var o=c$2;for(c$2=void 0,l$1++;o!==void 0;){var r=o.u;if(o.u=void 0,o.f&=-3,!(8&o.f)&&g$1(o))try{o.c();}catch(f){i||(t=f,i=true);}o=r;}}if(l$1=0,v$1--,i)throw t}}var e,n=void 0;function d$1(t){var i=n,o=e;n=void 0,e=void 0;try{return t()}finally{n=i,e=o;}}var c$2=void 0,v$1=0,l$1=0,m=0,p$2=void 0,y=0;function x$1(t){if(n!==void 0){var i=t.n;if(i===void 0||i.t!==n)return i={i:0,S:t,p:n.s,n:void 0,t:n,e:void 0,x:void 0,r:i},n.s!==void 0&&(n.s.n=i),n.s=i,t.n=i,32&n.f&&t.S(i),i;if(i.i===-1)return i.i=0,i.n!==void 0&&(i.n.p=i.p,i.p!==void 0&&(i.p.n=i.n),i.p=n.s,i.n=void 0,n.s.n=i,n.s=i),i}}function s(t,i){this.v=t,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=i?.watched,this.Z=i?.unwatched,this.name=i?.name;}s.prototype.brand=j;s.prototype.h=function(){return true};s.prototype.S=function(t){var i=this,o=this.t;o!==t&&t.e===void 0&&(t.x=o,this.t=t,o!==void 0?o.e=t:d$1(function(){var r;(r=i.W)==null||r.call(i);}));};s.prototype.U=function(t){var i=this;if(this.t!==void 0){var o=t.e,r=t.x;o!==void 0&&(o.x=r,t.e=void 0),r!==void 0&&(r.e=o,t.x=void 0),t===this.t&&(this.t=r,r===void 0&&d$1(function(){var f;(f=i.Z)==null||f.call(i);}));}};s.prototype.subscribe=function(t){var i=this;return Z(function(){var o=i.value;d$1(function(){return t(o)});},{name:"sub"})};s.prototype.valueOf=function(){return this.value};s.prototype.toString=function(){return this.value+""};s.prototype.toJSON=function(){return this.value};s.prototype.peek=function(){var t=this;return d$1(function(){return t.value})};Object.defineProperty(s.prototype,"value",{get:function(){var t=x$1(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if(l$1>100)throw new Error("Cycle detected");((function(o){v$1!==0&&l$1===0&&o.l!==m&&(o.l=m,p$2={S:o,v:o.v,i:o.i,o:p$2});}))(this),this.v=t,this.i++,y++,v$1++;try{for(var i=this.t;i!==void 0;i=i.x)i.t.N();}finally{S$2();}}}});function M$1(t,i){return new s(t,i)}function g$1(t){for(var i=t.s;i!==void 0;i=i.n)if(i.S.i!==i.i||!i.S.h()||i.S.i!==i.i)return true;return false}function E$1(t){for(var i=t.s;i!==void 0;i=i.n){var o=i.S.n;if(o!==void 0&&(i.r=o),i.S.n=i,i.i=-1,i.n===void 0){t.s=i;break}}}function O(t){for(var i=t.s,o=void 0;i!==void 0;){var r=i.p;i.i===-1?(i.S.U(i),r!==void 0&&(r.n=i.n),i.n!==void 0&&(i.n.p=r)):o=i,i.S.n=i.r,i.r!==void 0&&(i.r=void 0),i=r;}t.s=o;}function h(t,i){s.call(this,void 0,i),this.x=t,this.s=void 0,this.g=y-1,this.f=4;}h.prototype=new s;h.prototype.h=function(){if(this.f&=-3,1&this.f)return false;if((36&this.f)==32||(this.f&=-5,this.g===y))return true;if(this.g=y,this.f|=1,this.i>0&&!g$1(this))return this.f&=-2,true;var t=n;try{E$1(this),n=this;var i=this.x();(16&this.f||this.v!==i||this.i===0)&&(this.v=i,this.f&=-17,this.i++);}catch(o){this.v=o,this.f|=16,this.i++;}return n=t,O(this),this.f&=-2,true};h.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var i=this.s;i!==void 0;i=i.n)i.S.S(i);}s.prototype.S.call(this,t);};h.prototype.U=function(t){if(this.t!==void 0&&(s.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var i=this.s;i!==void 0;i=i.n)i.S.U(i);}};h.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N();}};Object.defineProperty(h.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=x$1(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function T$1(t,i){return new h(t,i)}function U(t){var i=t.m;if(t.m=void 0,typeof i=="function"){v$1++;var o=n;n=void 0;try{i();}catch(r){throw t.f&=-2,t.f|=8,b$1(t),r}finally{n=o,S$2();}}}function b$1(t){for(var i=t.s;i!==void 0;i=i.n)i.S.U(i);t.x=void 0,t.s=void 0,U(t);}function W$1(t){if(n!==this)throw new Error("Out-of-order effect");O(this),n=t,this.f&=-2,8&this.f&&b$1(this),S$2();}function u(t,i){this.x=t,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=i?.name,e&&e.push(this);}u.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var i=this.x();typeof i=="function"&&(this.m=i);}finally{t();}};u.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,U(this),E$1(this),v$1++;var t=n;return n=this,W$1.bind(this,t)};u.prototype.N=function(){2&this.f||(this.f|=2,this.u=c$2,c$2=this);};u.prototype.d=function(){this.f|=8,1&this.f||b$1(this);};u.prototype.dispose=function(){this.d();};function Z(t,i){var o=new u(t,i);try{o.c();}catch(f){throw o.d(),f}var r=o.d.bind(o);return r[Symbol.dispose]=r,r}
1245
+ /* esm.sh - @preact/signals-core@1.14.5 */
1246
+ var P=Symbol.for("preact-signals");function b$1(){if(u>1)u--;else {var t,i=false;for((function(){var r=S$2;for(S$2=void 0;r!==void 0;){var h=r.S;if(h.v===r.v)for(var e=h.t;e!==void 0;e=e.x)e.i===r.i&&(e.i=h.i);r=r.o;}})();l$1!==void 0;){var o=l$1;for(l$1=void 0,y++;o!==void 0;){var n=o.u;if(o.u=void 0,o.f&=-3,!(8&o.f)&&m(o))try{o.c();}catch(r){i||(t=r,i=true);}o=n;}}if(y=0,u--,i)throw t}}var v$1,f=void 0;function p$2(t){var i=f,o=v$1;f=void 0,v$1=void 0;try{return t()}finally{f=i,v$1=o;}}var l$1=void 0,u=0,y=0,g$1=0,S$2=void 0,w$1=0;function O(t){if(f!==void 0){var i=t.n;if(i===void 0||i.t!==f)return i={i:0,S:t,p:f.s,n:void 0,t:f,e:void 0,x:void 0,r:i},f.s!==void 0&&(f.s.n=i),f.s=i,t.n=i,32&f.f&&t.S(i),i;if(i.i===-1)return i.i=0,i.n!==void 0&&(i.n.p=i.p,i.p!==void 0&&(i.p.n=i.n),i.p=f.s,i.n=void 0,f.s.n=i,f.s=i),i}}function s(t,i){this.v=t,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=i?.watched,this.Z=i?.unwatched,this.name=i?.name;}s.prototype.brand=P;s.prototype.h=function(){return true};s.prototype.S=function(t){var i=this,o=this.t;o!==t&&t.e===void 0&&(t.x=o,this.t=t,o!==void 0?o.e=t:p$2(function(){var n;(n=i.W)==null||n.call(i);}));};s.prototype.U=function(t){var i=this;if(this.t!==void 0){var o=t.e,n=t.x;o!==void 0&&(o.x=n,t.e=void 0),n!==void 0&&(n.e=o,t.x=void 0),t===this.t&&(this.t=n,n===void 0&&p$2(function(){var r;(r=i.Z)==null||r.call(i);}));}};s.prototype.subscribe=function(t){var i=this;return D$1(function(){var o=i.value;p$2(function(){return t(o)});},{name:"sub"})};s.prototype.valueOf=function(){return this.value};s.prototype.toString=function(){return this.value+""};s.prototype.toJSON=function(){return this.value};s.prototype.peek=function(){var t=this;return p$2(function(){return t.value})};Object.defineProperty(s.prototype,"value",{get:function(){var t=O(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if(y>100)throw new Error("Cycle detected");((function(o){u!==0&&y===0&&o.l!==g$1&&(o.l=g$1,S$2={S:o,v:o.v,i:o.i,o:S$2});}))(this),this.v=t,this.i++,w$1++,u++;try{for(var i=this.t;i!==void 0;i=i.x)i.t.N();}finally{b$1();}}}});function M$1(t,i){return new s(t,i)}function m(t){for(var i=t.s;i!==void 0;i=i.n)if(i.S.i!==i.i||!i.S.h()||i.S.i!==i.i)return true;return false}function E$1(t){for(var i=t.s;i!==void 0;i=i.n){var o=i.S.n;if(o!==void 0&&(i.r=o),i.S.n=i,i.i=-1,i.n===void 0){t.s=i;break}}}function U(t){for(var i=t.s,o=void 0;i!==void 0;){var n=i.p;i.i===-1?(i.S.U(i),n!==void 0&&(n.n=i.n),i.n!==void 0&&(i.n.p=n)):o=i,i.S.n=i.r,i.r!==void 0&&(i.r=void 0),i=n;}t.s=o;}function a$1(t,i){s.call(this,void 0,i),this.x=t,this.s=void 0,this.g=w$1-1,this.f=4;}a$1.prototype=new s;a$1.prototype.h=function(){if(this.f&=-3,1&this.f)return false;if((36&this.f)==32||(this.f&=-5,this.g===w$1))return true;if(this.g=w$1,this.f|=1,this.i>0&&!m(this))return this.f&=-2,true;var t=f;try{E$1(this),f=this;var i=this.x();(16&this.f||this.v!==i||this.i===0)&&(this.v=i,this.f&=-17,this.i++);}catch(o){this.v=o,this.f|=16,this.i++;}return f=t,U(this),this.f&=-2,true};a$1.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var i=this.s;i!==void 0;i=i.n)i.S.S(i);}s.prototype.S.call(this,t);};a$1.prototype.U=function(t){if(this.t!==void 0&&(s.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var i=this.s;i!==void 0;i=i.n)i.S.U(i);}};a$1.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N();}};Object.defineProperty(a$1.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=O(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function T$1(t,i){return new a$1(t,i)}function C$2(t){var i=t.j;if(t.j=void 0,typeof i=="function"){u++;var o=f;f=void 0;try{i();}catch(n){throw t.f&=-2,t.f|=8,x$1(t),n}finally{f=o,b$1();}}}function x$1(t){for(var i=t.s;i!==void 0;i=i.n)i.S.U(i);t.x=void 0,t.s=void 0,C$2(t);}function Z(t){if(f!==this)throw new Error("Out-of-order effect");U(this),f=t,this.f&=-2;try{8&this.f&&x$1(this);}finally{b$1();}}function d$1(t,i){this.x=t,this.j=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=i?.name,v$1&&v$1.push(this);}d$1.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var i=this.x();typeof i=="function"&&(this.j=i);}finally{t();}};d$1.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,C$2(this),E$1(this),u++;var t=f;return f=this,Z.bind(this,t)};d$1.prototype.N=function(){2&this.f||(this.f|=2,this.u=l$1,l$1=this);};d$1.prototype.d=function(){this.f|=8,1&this.f||x$1(this);};d$1.prototype.dispose=function(){this.d();};function D$1(t,i){var o=new d$1(t,i);try{o.c();}catch(r){throw o.d(),r}var n=o.d.bind(o);return n[Symbol.dispose]=n,n}
1235
1247
 
1236
1248
  /* esm.sh - preact@10.23.1/hooks */
1237
- var c$1,r,d,b,v=0,x=[],o=h$1,g=o.__b,C$1=o.__r,A=o.diffed,D=o.__c,F=o.unmount,k=o.__;function l(t,_){o.__h&&o.__h(r,t,v||_),v=0;var u=r.__H||(r.__H={__:[],__h:[]});return t>=u.__.length&&u.__.push({}),u.__[t]}function z(t){return v=5,T(function(){return {current:t}},[])}function T(t,_){var u=l(c$1++,7);return E(u.__H,_)&&(u.__=t(),u.__H=_,u.__h=t),u.__}function M(t,_){return v=8,T(function(){return t},_)}function S$1(){for(var t;t=x.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(p$1),t.__H.__h.forEach(H),t.__H.__h=[];}catch(_){t.__H.__h=[],o.__e(_,t.__v);}}o.__b=function(t){r=null,g&&g(t);},o.__=function(t,_){t&&_.__k&&_.__k.__m&&(t.__m=_.__k.__m),k&&k(t,_);},o.__r=function(t){C$1&&C$1(t),c$1=0;var _=(r=t.__c).__H;_&&(d===r?(_.__h=[],r.__h=[],_.__.forEach(function(u){u.__N&&(u.__=u.__N),u.i=u.__N=void 0;})):(_.__h.forEach(p$1),_.__h.forEach(H),_.__h=[],c$1=0)),d=r;},o.diffed=function(t){A&&A(t);var _=t.__c;_&&_.__H&&(_.__H.__h.length&&(x.push(_)!==1&&b===o.requestAnimationFrame||((b=o.requestAnimationFrame)||W)(S$1)),_.__H.__.forEach(function(u){u.i&&(u.__H=u.i),u.i=void 0;})),d=r=null;},o.__c=function(t,_){_.some(function(u){try{u.__h.forEach(p$1),u.__h=u.__h.filter(function(n){return !n.__||H(n)});}catch(n){_.some(function(i){i.__h&&(i.__h=[]);}),_=[],o.__e(n,u.__v);}}),D&&D(t,_);},o.unmount=function(t){F&&F(t);var _,u=t.__c;u&&u.__H&&(u.__H.__.forEach(function(n){try{p$1(n);}catch(i){_=i;}}),u.__H=void 0,_&&o.__e(_,u.__v));};var q=typeof requestAnimationFrame=="function";function W(t){var _,u=function(){clearTimeout(n),q&&cancelAnimationFrame(_),setTimeout(t);},n=setTimeout(u,100);q&&(_=requestAnimationFrame(u));}function p$1(t){var _=r,u=t.__c;typeof u=="function"&&(t.__c=void 0,u()),r=_;}function H(t){var _=r;t.__c=t.__(),r=_;}function E(t,_){return !t||t.length!==_.length||_.some(function(u,n){return u!==t[n]})}
1249
+ var c$1,r,d,b,v=0,x=[],o=h,g=o.__b,C$1=o.__r,A=o.diffed,D=o.__c,F=o.unmount,k=o.__;function l(t,_){o.__h&&o.__h(r,t,v||_),v=0;var u=r.__H||(r.__H={__:[],__h:[]});return t>=u.__.length&&u.__.push({}),u.__[t]}function z(t){return v=5,T(function(){return {current:t}},[])}function T(t,_){var u=l(c$1++,7);return E(u.__H,_)&&(u.__=t(),u.__H=_,u.__h=t),u.__}function M(t,_){return v=8,T(function(){return t},_)}function S$1(){for(var t;t=x.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(p$1),t.__H.__h.forEach(H),t.__H.__h=[];}catch(_){t.__H.__h=[],o.__e(_,t.__v);}}o.__b=function(t){r=null,g&&g(t);},o.__=function(t,_){t&&_.__k&&_.__k.__m&&(t.__m=_.__k.__m),k&&k(t,_);},o.__r=function(t){C$1&&C$1(t),c$1=0;var _=(r=t.__c).__H;_&&(d===r?(_.__h=[],r.__h=[],_.__.forEach(function(u){u.__N&&(u.__=u.__N),u.i=u.__N=void 0;})):(_.__h.forEach(p$1),_.__h.forEach(H),_.__h=[],c$1=0)),d=r;},o.diffed=function(t){A&&A(t);var _=t.__c;_&&_.__H&&(_.__H.__h.length&&(x.push(_)!==1&&b===o.requestAnimationFrame||((b=o.requestAnimationFrame)||W)(S$1)),_.__H.__.forEach(function(u){u.i&&(u.__H=u.i),u.i=void 0;})),d=r=null;},o.__c=function(t,_){_.some(function(u){try{u.__h.forEach(p$1),u.__h=u.__h.filter(function(n){return !n.__||H(n)});}catch(n){_.some(function(i){i.__h&&(i.__h=[]);}),_=[],o.__e(n,u.__v);}}),D&&D(t,_);},o.unmount=function(t){F&&F(t);var _,u=t.__c;u&&u.__H&&(u.__H.__.forEach(function(n){try{p$1(n);}catch(i){_=i;}}),u.__H=void 0,_&&o.__e(_,u.__v));};var q=typeof requestAnimationFrame=="function";function W(t){var _,u=function(){clearTimeout(n),q&&cancelAnimationFrame(_),setTimeout(t);},n=setTimeout(u,100);q&&(_=requestAnimationFrame(u));}function p$1(t){var _=r,u=t.__c;typeof u=="function"&&(t.__c=void 0,u()),r=_;}function H(t){var _=r;t.__c=t.__(),r=_;}function E(t,_){return !t||t.length!==_.length||_.some(function(u,n){return u!==t[n]})}
1238
1250
 
1239
1251
  /* esm.sh - @preact/signals@1.3.0 */
1240
- var p;function a(e,n){h$1[e]=n.bind(null,h$1[e]||function(){});}function c(e){p&&p(),p=e&&e.S();}function S(e){var n=this,t=e.data,i=w(t);i.value=t;var u=T(function(){for(var r=n.__v;r=r.__;)if(r.__c){r.__c.__$f|=4;break}return n.__$u.c=function(){var f;!ie(u.peek())&&((f=n.base)==null?void 0:f.nodeType)===3?n.base.data=u.peek():(n.__$f|=1,n.setState({}));},T$1(function(){var f=i.value.value;return f===0?0:f===true?"":f||""})},[]);return u.value}S.displayName="_st";Object.defineProperties(s.prototype,{constructor:{configurable:true,value:void 0},type:{configurable:true,value:S},props:{configurable:true,get:function(){return {data:this}}},__b:{configurable:true,value:1}});a("__b",function(e,n){if(typeof n.type=="string"){var t,i=n.props;for(var u in i)if(u!=="children"){var r=i[u];r instanceof s&&(t||(n.__np=t={}),t[u]=r,i[u]=r.peek());}}e(n);});a("__r",function(e,n){c();var t,i=n.__c;i&&(i.__$f&=-2,(t=i.__$u)===void 0&&(i.__$u=t=(function(u){var r;return Z(function(){r=this;}),r.c=function(){i.__$f|=1,i.setState({});},r})())),c(t),e(n);});a("__e",function(e,n,t,i){c(),e(n,t,i);});a("diffed",function(e,n){c();var t;if(typeof n.type=="string"&&(t=n.__e)){var i=n.__np,u=n.props;if(i){var r=t.U;if(r)for(var f in r){var o=r[f];o!==void 0&&!(f in i)&&(o.d(),r[f]=void 0);}else t.U=r={};for(var _ in i){var v=r[_],m=i[_];v===void 0?(v=C(t,_,m,u),r[_]=v):v.o(m,u);}}}e(n);});function C(e,n,t,i){var u=n in e&&e.ownerSVGElement===void 0,r=M$1(t);return {o:function(f,o){r.value=f,i=o;},d:Z(function(){var f=r.value.value;i[n]!==f&&(i[n]=f,u?e[n]=f:f?e.setAttribute(n,f):e.removeAttribute(n));})}}a("unmount",function(e,n){if(typeof n.type=="string"){var t=n.__e;if(t){var i=t.U;if(i){t.U=void 0;for(var u in i){var r=i[u];r&&r.d();}}}}else {var f=n.__c;if(f){var o=f.__$u;o&&(f.__$u=void 0,o.d());}}e(n);});a("__h",function(e,n,t,i){(i<3||i===9)&&(n.__$f|=2),e(n,t,i);});F$1.prototype.shouldComponentUpdate=function(e,n){var t=this.__$u;if(!(t&&t.s!==void 0||4&this.__$f)||3&this.__$f)return true;for(var i in n)return true;for(var u in e)if(u!=="__source"&&e[u]!==this.props[u])return true;for(var r in this.props)if(!(r in e))return true;return false};function w(e){return T(function(){return M$1(e)},[])}
1252
+ var p;function a(e,n){h[e]=n.bind(null,h[e]||function(){});}function c(e){p&&p(),p=e&&e.S();}function S(e){var n=this,t=e.data,i=w(t);i.value=t;var u=T(function(){for(var r=n.__v;r=r.__;)if(r.__c){r.__c.__$f|=4;break}return n.__$u.c=function(){var f;!ie(u.peek())&&((f=n.base)==null?void 0:f.nodeType)===3?n.base.data=u.peek():(n.__$f|=1,n.setState({}));},T$1(function(){var f=i.value.value;return f===0?0:f===true?"":f||""})},[]);return u.value}S.displayName="_st";Object.defineProperties(s.prototype,{constructor:{configurable:true,value:void 0},type:{configurable:true,value:S},props:{configurable:true,get:function(){return {data:this}}},__b:{configurable:true,value:1}});a("__b",function(e,n){if(typeof n.type=="string"){var t,i=n.props;for(var u in i)if(u!=="children"){var r=i[u];r instanceof s&&(t||(n.__np=t={}),t[u]=r,i[u]=r.peek());}}e(n);});a("__r",function(e,n){c();var t,i=n.__c;i&&(i.__$f&=-2,(t=i.__$u)===void 0&&(i.__$u=t=function(u){var r;return D$1(function(){r=this;}),r.c=function(){i.__$f|=1,i.setState({});},r}())),c(t),e(n);});a("__e",function(e,n,t,i){c(),e(n,t,i);});a("diffed",function(e,n){c();var t;if(typeof n.type=="string"&&(t=n.__e)){var i=n.__np,u=n.props;if(i){var r=t.U;if(r)for(var f in r){var o=r[f];o!==void 0&&!(f in i)&&(o.d(),r[f]=void 0);}else t.U=r={};for(var _ in i){var v=r[_],m=i[_];v===void 0?(v=C(t,_,m,u),r[_]=v):v.o(m,u);}}}e(n);});function C(e,n,t,i){var u=n in e&&e.ownerSVGElement===void 0,r=M$1(t);return {o:function(f,o){r.value=f,i=o;},d:D$1(function(){var f=r.value.value;i[n]!==f&&(i[n]=f,u?e[n]=f:f?e.setAttribute(n,f):e.removeAttribute(n));})}}a("unmount",function(e,n){if(typeof n.type=="string"){var t=n.__e;if(t){var i=t.U;if(i){t.U=void 0;for(var u in i){var r=i[u];r&&r.d();}}}}else {var f=n.__c;if(f){var o=f.__$u;o&&(f.__$u=void 0,o.d());}}e(n);});a("__h",function(e,n,t,i){(i<3||i===9)&&(n.__$f|=2),e(n,t,i);});F$1.prototype.shouldComponentUpdate=function(e,n){var t=this.__$u;if(!(t&&t.s!==void 0||4&this.__$f)||3&this.__$f)return true;for(var i in n)return true;for(var u in e)if(u!=="__source"&&e[u]!==this.props[u])return true;for(var r in this.props)if(!(r in e))return true;return false};function w(e){return T(function(){return M$1(e)},[])}
1241
1253
 
1242
1254
  const routesLoadingSignal = M$1(false);
1243
1255
  const routeLoadingErrorSignal = M$1(null);
@@ -1835,6 +1847,7 @@ const routesLoadingSignal = M$1(false);
1835
1847
  const RouteDetails = ({
1836
1848
  meta,
1837
1849
  method,
1850
+ methods,
1838
1851
  resource,
1839
1852
  description,
1840
1853
  availableMediaTypes,
@@ -1858,6 +1871,10 @@ const routesLoadingSignal = M$1(false);
1858
1871
  if (selectedPackageName && packageName !== selectedPackageName) {
1859
1872
  return null;
1860
1873
  }
1874
+ // what the router answers beyond the declared method (a GET route
1875
+ // also answers HEAD); a "*" route answers everything, its chip says so
1876
+ const alsoMethods =
1877
+ method === "*" ? [] : methods.filter((m) => m !== method);
1861
1878
 
1862
1879
  return p$3`<details
1863
1880
  class="route_details"
@@ -1867,6 +1884,14 @@ const routesLoadingSignal = M$1(false);
1867
1884
  >
1868
1885
  <summary class="route_summary_container">
1869
1886
  <span class="route_method">${method}</span>
1887
+ ${alsoMethods.map(
1888
+ (alsoMethod) => p$3`<span
1889
+ class="route_also_method"
1890
+ style="--method-color: var(--method-${alsoMethod.toLowerCase()}-color)"
1891
+ title="Also answers ${alsoMethod}"
1892
+ >+${alsoMethod}</span
1893
+ >`,
1894
+ )}
1870
1895
  <p class="route_resource">${resource}</p>
1871
1896
  ${method === "GET" && !forbidden
1872
1897
  ? p$3`<a
@@ -1011,11 +1011,7 @@ function requireCuid2 () {
1011
1011
  }
1012
1012
 
1013
1013
  var cuid2Exports = requireCuid2();
1014
-
1015
- cuid2Exports.createId;
1016
- cuid2Exports.getConstants;
1017
1014
  var init$3 = cuid2Exports.init;
1018
- cuid2Exports.isCuid;
1019
1015
 
1020
1016
  function getDefaultExportFromCjs$1 (x) {
1021
1017
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
@@ -1,7 +1,7 @@
1
1
  import cluster from "node:cluster";
2
2
  import { extname } from "node:path";
3
3
  import { parse } from "node:querystring";
4
- import http, { STATUS_CODES } from "node:http";
4
+ import require$$0, { STATUS_CODES } from "node:http";
5
5
  import { Http2ServerResponse } from "node:http2";
6
6
  import net, { Socket, createServer, isIP } from "node:net";
7
7
  import { Stream, Writable, Readable } from "node:stream";
@@ -2100,7 +2100,7 @@ const writeHead = (
2100
2100
  };
2101
2101
 
2102
2102
  const statusTextFromStatus = (status) =>
2103
- http.STATUS_CODES[status] || "not specified";
2103
+ require$$0.STATUS_CODES[status] || "not specified";
2104
2104
 
2105
2105
  const headersToNodeHeaders = (headers, { ignoreConnectionHeader }) => {
2106
2106
  const nodeHeaders = {};
@@ -2895,7 +2895,7 @@ const createPolyglotServer = async ({
2895
2895
  certificate,
2896
2896
  privateKey,
2897
2897
  }) => {
2898
- const httpServer = http.createServer();
2898
+ const httpServer = require$$0.createServer();
2899
2899
  const tlsServer = await createSecureServer({
2900
2900
  certificate,
2901
2901
  privateKey,
@@ -4211,7 +4211,7 @@ const serverPluginOpenFile = () => {
4211
4211
  description: "Can be used to open a given file in your editor.",
4212
4212
  declarationSource: import.meta.url,
4213
4213
  fetch: (request) => {
4214
- let file = decodeURIComponent(request.params[0]);
4214
+ const file = request.params[0];
4215
4215
  if (!file) {
4216
4216
  return {
4217
4217
  status: 400,
@@ -5918,7 +5918,14 @@ const createResourcePattern = (pattern) => {
5918
5918
  matchesEveryResource,
5919
5919
  match: (resource) => {
5920
5920
  const [pathname, search, hash] = resourceToParts(resource);
5921
- let decodedPathname = decodeURIComponent(pathname);
5921
+ let decodedPathname;
5922
+ try {
5923
+ decodedPathname = decodeURIComponent(pathname);
5924
+ } catch {
5925
+ // the path comes from the client: one that cannot be decoded (/%c0)
5926
+ // names no resource, it is not an internal error
5927
+ return null;
5928
+ }
5922
5929
  let result = pathnamePattern.match(decodedPathname);
5923
5930
  if (!result && directoryPattern) {
5924
5931
  result = directoryPattern.match(
@@ -6959,6 +6966,7 @@ const createRoute = ({
6959
6966
  }
6960
6967
  return {
6961
6968
  method,
6969
+ methods,
6962
6970
  resource,
6963
6971
  description,
6964
6972
  availableMediaTypes,
package/dist/ws/ws.js CHANGED
@@ -1,13 +1,13 @@
1
- import require$$0$3 from "node:events";
1
+ import require$$0$4 from "node:events";
2
2
  import require$$1$1 from "node:https";
3
- import http from "node:http";
3
+ import require$$0 from "node:http";
4
4
  import net from "node:net";
5
5
  import require$$4 from "node:tls";
6
6
  import require$$1 from "node:crypto";
7
- import require$$0$2 from "node:stream";
7
+ import require$$0$3 from "node:stream";
8
8
  import require$$7 from "node:url";
9
- import require$$0 from "node:zlib";
10
- import require$$0$1 from "node:buffer";
9
+ import require$$0$1 from "node:zlib";
10
+ import require$$0$2 from "node:buffer";
11
11
  import require$$2 from "node:util";
12
12
 
13
13
  function getDefaultExportFromCjs (x) {
@@ -49,6 +49,8 @@ function requireBufferUtil () {
49
49
  if (hasRequiredBufferUtil) return bufferUtil.exports;
50
50
  hasRequiredBufferUtil = 1;
51
51
 
52
+ const { websocketMask, websocketUnmask } = require$$0;
53
+
52
54
  const { EMPTY_BUFFER } = requireConstants();
53
55
 
54
56
  const FastBuffer = Buffer[Symbol.species];
@@ -160,8 +162,17 @@ function requireBufferUtil () {
160
162
  unmask: _unmask
161
163
  };
162
164
 
163
- /* istanbul ignore else */
164
- if (!process.env.WS_NO_BUFFER_UTIL) {
165
+ if (websocketMask) {
166
+ bufferUtil.exports.mask = function (source, mask, output, offset, length) {
167
+ if (length < 24) _mask(source, mask, output, offset, length);
168
+ else websocketMask(source, mask, output, offset, length);
169
+ };
170
+
171
+ bufferUtil.exports.unmask = function (buffer, mask) {
172
+ if (buffer.length < 24) _unmask(buffer, mask);
173
+ else websocketUnmask(buffer, mask);
174
+ };
175
+ } /* istanbul ignore else */ else if (!process.env.WS_NO_BUFFER_UTIL) {
165
176
  try {
166
177
  const bufferUtil$1 = require('bufferutil');
167
178
 
@@ -251,7 +262,7 @@ function requirePermessageDeflate () {
251
262
  if (hasRequiredPermessageDeflate) return permessageDeflate$1;
252
263
  hasRequiredPermessageDeflate = 1;
253
264
 
254
- const zlib = require$$0;
265
+ const zlib = require$$0$1;
255
266
 
256
267
  const bufferUtil = requireBufferUtil();
257
268
  const Limiter = requireLimiter();
@@ -790,7 +801,7 @@ function requireValidation () {
790
801
  if (hasRequiredValidation) return validation.exports;
791
802
  hasRequiredValidation = 1;
792
803
 
793
- const { isUtf8 } = require$$0$1;
804
+ const { isUtf8 } = require$$0$2;
794
805
 
795
806
  const { hasBlob } = requireConstants();
796
807
 
@@ -950,7 +961,7 @@ function requireReceiver () {
950
961
  if (hasRequiredReceiver) return receiver$1;
951
962
  hasRequiredReceiver = 1;
952
963
 
953
- const { Writable } = require$$0$2;
964
+ const { Writable } = require$$0$3;
954
965
 
955
966
  const PerMessageDeflate = requirePermessageDeflate();
956
967
  const {
@@ -1703,7 +1714,7 @@ function requireSender () {
1703
1714
  if (hasRequiredSender) return sender$1;
1704
1715
  hasRequiredSender = 1;
1705
1716
 
1706
- const { Duplex } = require$$0$2;
1717
+ const { Duplex } = require$$0$3;
1707
1718
  const { randomFillSync } = require$$1;
1708
1719
  const {
1709
1720
  types: { isUint8Array }
@@ -1854,7 +1865,9 @@ function requireSender () {
1854
1865
  target.writeUIntBE(dataLength, 4, 6);
1855
1866
  }
1856
1867
 
1857
- if (!options.mask) return [target, data];
1868
+ if (!options.mask) {
1869
+ return dataLength ? [target, data] : [target];
1870
+ }
1858
1871
 
1859
1872
  target[1] |= 0x80;
1860
1873
  target[offset - 4] = mask[0];
@@ -1862,6 +1875,7 @@ function requireSender () {
1862
1875
  target[offset - 2] = mask[2];
1863
1876
  target[offset - 1] = mask[3];
1864
1877
 
1878
+ if (!dataLength) return [target];
1865
1879
  if (skipMasking) return [target, data];
1866
1880
 
1867
1881
  if (merge) {
@@ -2829,13 +2843,13 @@ function requireWebsocket () {
2829
2843
  if (hasRequiredWebsocket) return websocket;
2830
2844
  hasRequiredWebsocket = 1;
2831
2845
 
2832
- const EventEmitter = require$$0$3;
2846
+ const EventEmitter = require$$0$4;
2833
2847
  const https = require$$1$1;
2834
- const http$1 = http;
2848
+ const http = require$$0;
2835
2849
  const net$1 = net;
2836
2850
  const tls = require$$4;
2837
2851
  const { randomBytes, createHash } = require$$1;
2838
- const { Duplex, Readable } = require$$0$2;
2852
+ const { Duplex, Readable } = require$$0$3;
2839
2853
  const { URL } = require$$7;
2840
2854
 
2841
2855
  const PerMessageDeflate = requirePermessageDeflate();
@@ -3586,7 +3600,7 @@ function requireWebsocket () {
3586
3600
 
3587
3601
  const defaultPort = isSecure ? 443 : 80;
3588
3602
  const key = randomBytes(16).toString('base64');
3589
- const request = isSecure ? https.request : http$1.request;
3603
+ const request = isSecure ? https.request : http.request;
3590
3604
  const protocolSet = new Set();
3591
3605
  let perMessageDeflate;
3592
3606
 
@@ -3646,10 +3660,15 @@ function requireWebsocket () {
3646
3660
  }
3647
3661
 
3648
3662
  if (isIpcUrl) {
3649
- const parts = opts.path.split(':');
3663
+ const i = opts.path.indexOf(':');
3650
3664
 
3651
- opts.socketPath = parts[0];
3652
- opts.path = parts[1];
3665
+ if (i === -1) {
3666
+ opts.socketPath = opts.path;
3667
+ opts.path = '';
3668
+ } else {
3669
+ opts.socketPath = opts.path.slice(0, i);
3670
+ opts.path = opts.path.slice(i + 1);
3671
+ }
3653
3672
  }
3654
3673
 
3655
3674
  let req;
@@ -4259,7 +4278,7 @@ function requireStream () {
4259
4278
  hasRequiredStream = 1;
4260
4279
 
4261
4280
  requireWebsocket();
4262
- const { Duplex } = require$$0$2;
4281
+ const { Duplex } = require$$0$3;
4263
4282
 
4264
4283
  /**
4265
4284
  * Emits the `'close'` event on a stream.
@@ -4512,9 +4531,9 @@ function requireWebsocketServer () {
4512
4531
  if (hasRequiredWebsocketServer) return websocketServer$1;
4513
4532
  hasRequiredWebsocketServer = 1;
4514
4533
 
4515
- const EventEmitter = require$$0$3;
4516
- const http$1 = http;
4517
- const { Duplex } = require$$0$2;
4534
+ const EventEmitter = require$$0$4;
4535
+ const http = require$$0;
4536
+ const { Duplex } = require$$0$3;
4518
4537
  const { createHash } = require$$1;
4519
4538
 
4520
4539
  const extension = requireExtension();
@@ -4610,8 +4629,8 @@ function requireWebsocketServer () {
4610
4629
  }
4611
4630
 
4612
4631
  if (options.port != null) {
4613
- this._server = http$1.createServer((req, res) => {
4614
- const body = http$1.STATUS_CODES[426];
4632
+ this._server = http.createServer((req, res) => {
4633
+ const body = http.STATUS_CODES[426];
4615
4634
 
4616
4635
  res.writeHead(426, {
4617
4636
  'Content-Length': body.length,
@@ -5021,7 +5040,7 @@ function requireWebsocketServer () {
5021
5040
  // call to `socket.end()` below, which triggers an `'error'` event that in
5022
5041
  // turn causes the socket to be destroyed.
5023
5042
  //
5024
- message = message || http$1.STATUS_CODES[code];
5043
+ message = message || http.STATUS_CODES[code];
5025
5044
  headers = {
5026
5045
  Connection: 'close',
5027
5046
  'Content-Type': 'text/html',
@@ -5032,7 +5051,7 @@ function requireWebsocketServer () {
5032
5051
  socket.once('finish', socket.destroy);
5033
5052
 
5034
5053
  socket.end(
5035
- `HTTP/1.1 ${code} ${http$1.STATUS_CODES[code]}\r\n` +
5054
+ `HTTP/1.1 ${code} ${http.STATUS_CODES[code]}\r\n` +
5036
5055
  Object.keys(headers)
5037
5056
  .map((h) => `${h}: ${headers[h]}`)
5038
5057
  .join('\r\n') +
@@ -31,7 +31,7 @@ await startServer({
31
31
  | `GET /*` | anything, with the path in `request.params[0]` |
32
32
  | `GET *` | anything: a catch-all, put it last |
33
33
 
34
- A `GET` route also answers `HEAD`: the response is built the same way and sent without its body.
34
+ A `GET` route also answers `HEAD`: the response is built the same way and sent without its body. When building that body is costly, declare a `HEAD` route for the same resource before the `GET` one: it answers `HEAD` in its place.
35
35
 
36
36
  Only `*` widens a pattern. Routes are tried in order, so a route covering others (`GET /docs/*`, `GET *`) goes after them. `fetch` can be async; returning `null` or `undefined` declines the request and the next route is tried.
37
37
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/server",
3
- "version": "17.7.1",
3
+ "version": "17.7.3",
4
4
  "type": "module",
5
5
  "description": "A modern Node.js HTTP server with declarative routing, content negotiation, and WebSocket support",
6
6
  "repository": {
@@ -55,11 +55,11 @@
55
55
  "@jsenv/url-pattern": "../../tooling/url-pattern",
56
56
  "@jsenv/urls": "../../tooling/urls",
57
57
  "@jsenv/utils": "../../tooling/utils",
58
- "eventsource": "5.1.2",
58
+ "eventsource": "5.1.4",
59
59
  "formidable": "3.5.4",
60
- "playwright": "1.63.0",
61
- "undici": "8.11.2",
62
- "ws": "8.22.0"
60
+ "playwright": "1.64.1",
61
+ "undici": "8.12.3",
62
+ "ws": "8.22.1"
63
63
  },
64
64
  "publishConfig": {
65
65
  "access": "public"
@@ -10,7 +10,7 @@ export const serverPluginOpenFile = () => {
10
10
  description: "Can be used to open a given file in your editor.",
11
11
  declarationSource: import.meta.url,
12
12
  fetch: (request) => {
13
- let file = decodeURIComponent(request.params[0]);
13
+ const file = request.params[0];
14
14
  if (!file) {
15
15
  return {
16
16
  status: 400,
@@ -443,6 +443,17 @@
443
443
  background: var(--method-color);
444
444
  border-radius: 3px;
445
445
  }
446
+ .route_also_method {
447
+ margin-left: 6px;
448
+ padding: 3px 6px;
449
+ color: #fff;
450
+ font-weight: 700;
451
+ font-size: 11px;
452
+ font-family: sans-serif;
453
+ text-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
454
+ background: var(--method-color);
455
+ border-radius: 3px;
456
+ }
446
457
  .route_resource {
447
458
  margin-top: 0;
448
459
  margin-bottom: 0;
@@ -486,7 +497,8 @@
486
497
  border-color: var(--forbidden-border-color);
487
498
  opacity: 0.85;
488
499
  }
489
- .route_details[data-forbidden] .route_method {
500
+ .route_details[data-forbidden] .route_method,
501
+ .route_details[data-forbidden] .route_also_method {
490
502
  opacity: 0.7;
491
503
  filter: grayscale(60%);
492
504
  }
@@ -1428,6 +1440,7 @@
1428
1440
  const RouteDetails = ({
1429
1441
  meta,
1430
1442
  method,
1443
+ methods,
1431
1444
  resource,
1432
1445
  description,
1433
1446
  availableMediaTypes,
@@ -1451,6 +1464,10 @@
1451
1464
  if (selectedPackageName && packageName !== selectedPackageName) {
1452
1465
  return null;
1453
1466
  }
1467
+ // what the router answers beyond the declared method (a GET route
1468
+ // also answers HEAD); a "*" route answers everything, its chip says so
1469
+ const alsoMethods =
1470
+ method === "*" ? [] : methods.filter((m) => m !== method);
1454
1471
 
1455
1472
  return html`<details
1456
1473
  class="route_details"
@@ -1460,6 +1477,14 @@
1460
1477
  >
1461
1478
  <summary class="route_summary_container">
1462
1479
  <span class="route_method">${method}</span>
1480
+ ${alsoMethods.map(
1481
+ (alsoMethod) => html`<span
1482
+ class="route_also_method"
1483
+ style="--method-color: var(--method-${alsoMethod.toLowerCase()}-color)"
1484
+ title="Also answers ${alsoMethod}"
1485
+ >+${alsoMethod}</span
1486
+ >`,
1487
+ )}
1463
1488
  <p class="route_resource">${resource}</p>
1464
1489
  ${method === "GET" && !forbidden
1465
1490
  ? html`<a
@@ -766,6 +766,7 @@ const createRoute = ({
766
766
  }
767
767
  return {
768
768
  method,
769
+ methods,
769
770
  resource,
770
771
  description,
771
772
  availableMediaTypes,