PageSourceSearch

https://hypothes.is/assets/scripts/login-forms.bundle.js?1b3720

js hypothes.is collected 2026-09-24 07:21:17 UTC 64,064 bytes, 6 lines download raw bytes

vendor: 5,080 bytes, line 1
1var e,n,t,r,o,i,l,a,c,s,d,u,h,f={},_=[],p=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,m=Array.isArray;function v(e,n){for(var t in n)e[t]=n[t];return e}function g(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function b(n,t,r){var o,i,l,a={};for(l in t)"key"==l?o=t[l]:"ref"==l?i=t[l]:a[l]=t[l];if(arguments.length>2&&(a.children=arguments.length>3?e.call(arguments,2):r),"function"==typeof n&&null!=n.defaultProps)for(l in n.defaultProps)void 0===a[l]&&(a[l]=n.defaultProps[l]);return y(n,a,o,i,null)}function y(e,r,o,i,l){var a={type:e,props:r,key:o,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==l?++t:l,__i:-1,__u:0};return null==l&&null!=n.vnode&&n.vnode(a),a}function w(e){return e.children}function x(e,n){this.props=e,this.context=n}function k(e,n){if(null==n)return e.__?k(e.__,e.__i+1):null;for(var t;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e)return t.__e;return"function"==typeof e.type?k(e):null}function C(e){var n,t;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e){e.__e=e.__c.base=t.__e;break}return C(e)}}function N(e){(!e.__d&&(e.__d=!0)&&o.push(e)&&!L.__r++||i!=n.debounceRendering)&&((i=n.debounceRendering)||l)(L)}function L(){for(var e,t,r,i,l,c,s,d=1;o.length;)o.length>d&&o.sort(a),e=o.shift(),d=o.length,e.__d&&(r=void 0,i=void 0,l=(i=(t=e).__v).__e,c=[],s=[],t.__P&&((r=v({},i)).__v=i.__v+1,n.vnode&&n.vnode(r),A(t.__P,r,i,t.__n,t.__P.namespaceURI,32&i.__u?[l]:null,c,null==l?k(i):l,!!(32&i.__u),s),r.__v=i.__v,r.__.__k[r.__i]=r,R(c,r,s),i.__e=i.__=null,r.__e!=l&&C(r)));L.__r=0}function T(e,n,t,r,o,i,l,a,c,s,d){var u,h,p,v,g,b,x,C=r&&r.__k||_,N=n.length;for(c=function(e,n,t,r,o){var i,l,a,c,s,d=t.length,u=d,h=0;for(e.__k=new Array(o),i=0;i<o;i++)null!=(l=n[i])&&"boolean"!=typeof l&&"function"!=typeof l?("string"==typeof l||"number"==typeof l||"bigint"==typeof l||l.constructor==String?l=e.__k[i]=y(null,l,null,null,null):m(l)?l=e.__k[i]=y(w,{children:l},null,null,null):void 0===l.constructor&&l.__b>0?l=e.__k[i]=y(l.type,l.props,l.key,l.ref?l.ref:null,l.__v):e.__k[i]=l,c=i+h,l.__=e,l.__b=e.__b+1,a=null,-1!=(s=l.__i=S(l,t,c,u))&&(u--,(a=t[s])&&(a.__u|=2)),null==a||null==a.__v?(-1==s&&(o>d?h--:o<d&&h++),"function"!=typeof l.type&&(l.__u|=4)):s!=c&&(s==c-1?h--:s==c+1?h++:(s>c?h--:h++,l.__u|=4))):e.__k[i]=null;if(u)for(i=0;i<d;i++)null!=(a=t[i])&&0==(2&a.__u)&&(a.__e==r&&(r=k(a)),D(a,a));return r}(t,n,C,c,N),u=0;u<N;u++)null!=(p=t.__k[u])&&(h=-1==p.__i?f:C[p.__i]||f,p.__i=u,b=A(e,p,h,o,i,l,a,c,s,d),v=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&F(h.ref,null,p),d.push(p.ref,p.__c||v,p)),null==g&&null!=v&&(g=v),(x=!!(4&p.__u))||h.__k===p.__k?c=H(p,c,e,x):"function"==typeof p.type&&void 0!==b?c=b:v&&(c=v.nextSibling),p.__u&=-7);return t.__e=g,c}function H(e,n,t,r){var o,i;if("function"==typeof e.type){for(o=e.__k,i=0;o&&i<o.length;i++)o[i]&&(o[i].__=e,n=H(o[i],n,t,r));return n}e.__e!=n&&(r&&(n&&e.type&&!n.parentNode&&(n=k(e)),t.insertBefore(e.__e,n||null)),n=e.__e);do{n=n&&n.nextSibling}while(null!=n&&8==n.nodeType);return n}function S(e,n,t,r){var o,i,l,a=e.key,c=e.type,s=n[t],d=null!=s&&0==(2&s.__u);if(null===s&&null==a||d&&a==s.key&&c==s.type)return t;if(r>(d?1:0))for(o=t-1,i=t+1;o>=0||i<n.length;)if(null!=(s=n[l=o>=0?o--:i++])&&0==(2&s.__u)&&a==s.key&&c==s.type)return l;return-1}function P(e,n,t){"-"==n[0]?e.setProperty(n,null==t?"":t):e[n]=null==t?"":"number"!=typeof t||p.test(n)?t:t+"px"}function M(e,n,t,r,o){var i,l;e:if("style"==n)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(n in r)t&&n in t||P(e.style,n,"");if(t)for(n in t)r&&t[n]==r[n]||P(e.style,n,t[n])}else if("o"==n[0]&&"n"==n[1])i=n!=(n=n.replace(c,"$1")),l=n.toLowerCase(),n=l in e||"onFocusOut"==n||"onFocusIn"==n?l.slice(2):n.slice(2),e.l||(e.l={}),e.l[n+i]=t,t?r?t.u=r.u:(t.u=s,e.addEventListener(n,i?u:d,i)):e.removeEventListener(n,i?u:d,i);else{if("http://www.w3.org/2000/svg"==o)n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=n&&"height"!=n&&"href"!=n&&"list"!=n&&"form"!=n&&"tabIndex"!=n&&"download"!=n&&"rowSpan"!=n&&"colSpan"!=n&&"role"!=n&&"popover"!=n&&n in e)try{e[n]=null==t?"":t;break e}catch(e){}"function"==typeof t||(null==t||!1===t&&"-"!=n[4]?e.removeAttribute(n):e.setAttribute(n,"popover"==n&&1==t?"":t))}}function E(e){return function(t){if(this.l){var r=this.l[t.type+e];if(null==t.t)t.t=s++;else if(t.t<r.u)return;return r(n.event?n.event(t):t)}}}function A(e,t,r,o,i,l,a,c,s,d){var u,h,f,_,p,b,y,k,C,N,L,H,S,P,M,E,A,R=t.type;if(void 0!==t.constructor)return null;128&r.__u&&(s=!!(32&r.__u),l=[c=t.__e=r.__e]),(u=n.__b)&&u(t);e:if("function"==typeof R)try{if(k=t.props,C="prototype"in R&&R.prototype.render,N=(u=R.contextType)&&o[u.__c],L=u?N?N.props.value:u.__:o,r.__c?y=(h=t.__c=r.__c).__=h.__E:(C?t.__c=h=new R(k,L):(t.__c=h=new x(k,L),h.constructor=R,h.render=q),N&&N.sub(h),h.state||(h.state={}),h.__n=o,f=h.__d=!0,h.__h=[],h._sb=[]),C&&null==h.__s&&(h.__s=h.state),C&&null!=R.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=v({}
1,h.__s)),v(h.__s,R.getDerivedStateFromProps(k,h.__s))),_=h.props,p=h.state,h.__v=t,f)C&&null==R.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),C&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(C&&null==R.getDerivedStateFromProps&&k!==_&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(k,L),t.__v==r.__v||!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(k,h.__s,L)){for(t.__v!=r.__v&&(h.props=k,h.state=h.__s,h.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some((function(e){e&&(e.__=t)})),H=0;H<h._sb.length;H++)h.__h.push(h._sb[H]);h._sb=[],h.__h.length&&a.push(h);break e}null!=h.componentWillUpdate&&h.componentWillUpdate(k,h.__s,L),C&&null!=h.componentDidUpdate&&h.__h.push((function(){h.componentDidUpdate(_,p,b)}))}if(h.context=L,h.props=k,h.__P=e,h.__e=!1,S=n.__r,P=0,C){for(h.state=h.__s,h.__d=!1,S&&S(t),u=h.render(h.props,h.state,h.context),M=0;M<h._sb.length;M++)h.__h.push(h._sb[M]);h._sb=[]}else do{h.__d=!1,S&&S(t),u=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++P<25);h.state=h.__s,null!=h.getChildContext&&(o=v(v({},o),h.getChildContext())),C&&!f&&null!=h.getSnapshotBeforeUpdate&&(b=h.getSnapshotBeforeUpdate(_,p)),E=u,null!=u&&u.type===w&&null==u.key&&(E=z(u.props.children)),c=T(e,m(E)?E:[E],t,r,o,i,l,a,c,s,d),h.base=t.__e,t.__u&=-161,h.__h.length&&a.push(h),y&&(h.__E=h.__=null)}catch(e){if(t.__v=null,s||null!=l)if(e.then){for(t.__u|=s?160:128;c&&8==c.nodeType&&c.nextSibling;)c=c.nextSibling;l[l.indexOf(c)]=null,t.__e=c}else{for(A=l.length;A--;)g(l[A]);I(t)}else t.__e=r.__e,t.__k=r.__k,e.then||I(t);n.__e(e,t,r)}else null==l&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):c=t.__e=O(r.__e,t,r,o,i,l,a,s,d);return(u=n.diffed)&&u(t),128&t.__u?void 0:c}function I(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(I)}function R(e,t,r){for(var o=0;o<r.length;o++)F(r[o],r[++o],r[++o]);n.__c&&n.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){n.__e(e,t.__v)}}))}function z(e){return"object"!=typeof e||null==e||e.__b&&e.__b>0?e:m(e)?e.map(z):v({},e)}function O(t,r,o,i,l,a,c,s,d){var u,h,_,p,v,b,y,w=o.props||f,x=r.props,C=r.type;if("svg"==C?l="http://www.w3.org/2000/svg":"math"==C?l="http://www.w3.org/1998/Math/MathML":l||(l="http://www.w3.org/1999/xhtml"),null!=a)for(u=0;u<a.length;u++)if((v=a[u])&&"setAttribute"in v==!!C&&(C?v.localName==C:3==v.nodeType)){t=v,a[u]=null;break}if(null==t){if(null==C)return document.createTextNode(x);t=document.createElementNS(l,C,x.is&&x),s&&(n.__m&&n.__m(r,a),s=!1),a=null}if(null==C)w===x||s&&t.data==x||(t.data=x);else{if(a=a&&e.call(t.childNodes),!s&&null!=a)for(w={},u=0;u<t.attributes.length;u++)w[(v=t.attributes[u]).name]=v.value;for(u in w)if(v=w[u],"children"==u);else if("dangerouslySetInnerHTML"==u)_=v;else if(!(u in x)){if("value"==u&&"defaultValue"in x||"checked"==u&&"defaultChecked"in x)continue;M(t,u,null,v,l)}for(u in x)v=x[u],"children"==u?p=v:"dangerouslySetInnerHTML"==u?h=v:"value"==u?b=v:"checked"==u?y=v:s&&"function"!=typeof v||w[u]===v||M(t,u,v,w[u],l);if(h)s||_&&(h.__html==_.__html||h.__html==t.innerHTML)||(t.innerHTML=h.__html),r.__k=[];else if(_&&(t.innerHTML=""),T("template"==r.type?t.content:t,m(p)?p:[p],r,o,i,"foreignObject"==C?"http://www.w3.org/1999/xhtml":l,a,c,a?a[0]:o.__k&&k(o,0),s,d),null!=a)for(u=a.length;u--;)g(a[u]);s||(u="value","progress"==C&&null==b?t.removeAttribute("value"):null!=b&&(b!==t[u]||"progress"==C&&!b||"option"==C&&b!=w[u])&&M(t,u,b,w[u],l),u="checked",null!=y&&y!=t[u]&&M(t,u,y,w[u],l))}return t}function F(e,t,r){try{if("function"==typeof e){var o="function"==typeof e.__u;o&&e.__u(),o&&null==t||(e.__u=e(t))}else e.current=t}catch(e){n.__e(e,r)}}function D(e,t,r){var o,i;if(n.unmount&&n.unmount(e),(o=e.ref)&&(o.current&&o.current!=e.__e||F(o,null,t)),null!=(o=e.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){n.__e(e,t)}o.base=o.__P=null}if(o=e.__k)for(i=0;i<o.length;i++)o[i]&&D(o[i],t,r||"function"!=typeof e.type);r||g(e.__e),e.__c=e.__=e.__e=void 0}function q(e,n,t){return this.constructor(e,t)}function V(n,t,r){var o,i,l,a,c=v({},n.props);for(l in n.type&&n.type.defaultProps&&(a=n.type.defaultProps),t)"key"==l?o=t[l]:"ref"==l?i=t[l]:c[l]=void 0===t[l]&&null!=a?a[l]:t[l];return arguments.length>2&&(c.children=arguments.length>3?e.call(arguments,2):r),y(n.type,c,o||n.key,i||n.ref,null)}function U(e){function n(e){var t,r;return this.getChildContext||(t=new Set,(r={})[n.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){t=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&t.forEach((function(e){e.__e=!0,N(e)}))},this.sub=function(e){t.add(e);var n=e.componentWillUnmount;e.componentWillUnmount=function(){t&&t.delete(e),n&&n.call(e)}}),e.children}return n.__c="__cC"+h++,n.__=e,n.Provider=n.__l=(n.Consumer=function(e,n){return e.children(n)}).contextType=n,n}e=_.slice,n={__e:function(e,n,t,r){for(var o,i,l;n=n.__;)if((o=n.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),l=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),l=o.__d),l)return o.__E=o}catch(n){e=n}throw e}},t=0,r=function(e){return null!=e&&void 0===e.constructor},x.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=v({},this.state),"function"==typeof e&&(e=e(v({},t),this.props)),e&&v(t,e),null!=e&&this.__v&&(n&&this._sb.push(n),N(this))},x.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),N(this))},x.prototype.render=w,o=[],l="function"==typeof Promise?Promise.prototype.then.bind(Prom
1ise.resolve()):setTimeout,a=function(e,n){return e.__v.__b-n.__v.__b},L.__r=0,c=/(PointerCapture)$|Capture$/i,s=0,d=E(!1),u=E(!0),h=0;var W,j,B,$,Z=0,G=[],K=n,J=K.__b,Q=K.__r,Y=K.diffed,X=K.__c,ee=K.unmount,ne=K.__;function te(e,n){K.__h&&K.__h(j,e,Z||n),Z=0;var t=j.__H||(j.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({}),t.__[e]}function re(e){return Z=1,function(e,n,t){var r=te(W++,2);if(r.t=e,!r.__c&&(r.__=[ve(void 0,n),function(e){var n=r.__N?r.__N[0]:r.__[0],t=r.t(n,e);n!==t&&(r.__N=[t,r.__[1]],r.__c.setState({}))}],r.__c=j,!j.__f)){var o=function(e,n,t){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return!!e.__c}));if(o.every((function(e){return!e.__N})))return!i||i.call(this,e,n,t);var l=r.__c.props!==e;return o.forEach((function(e){if(e.__N){var n=e.__[0];e.__=e.__N,e.__N=void 0,n!==e.__[0]&&(l=!0)}})),i&&i.call(this,e,n,t)||l};j.__f=!0;var i=j.shouldComponentUpdate,l=j.componentWillUpdate;j.componentWillUpdate=function(e,n,t){if(this.__e){var r=i;i=void 0,o(e,n,t),i=r}l&&l.call(this,e,n,t)},j.shouldComponentUpdate=o}return r.__N||r.__}(ve,e)}function oe(e,n){var t=te(W++,3);!K.__s&&me(t.__H,n)&&(t.__=e,t.u=n,j.__H.__h.push(t))}function ie(e,n){var t=te(W++,4);!K.__s&&me(t.__H,n)&&(t.__=e,t.u=n,j.__h.push(t))}function le(e){return Z=5,ae((function(){return{current:e}}),[])}function ae(e,n){var t=te(W++,7);return me(t.__H,n)&&(t.__=e(),t.__H=n,t.__h=e),t.__}function ce(e,n){return Z=8,ae((function(){return e}),n)}function se(e){var n=j.context[e.__c],t=te(W++,9);return t.c=e,n?(null==t.__&&(t.__=!0,n.sub(j)),n.props.value):e.__}function de(){var e=te(W++,11);if(!e.__){for(var n=j.__v;null!==n&&!n.__m&&null!==n.__;)n=n.__;var t=n.__m||(n.__m=[0,0]);e.__="P"+t[0]+"-"+t[1]++}return e.__}function ue(){for(var e;e=G.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(_e),e.__H.__h.forEach(pe),e.__H.__h=[]}catch(n){e.__H.__h=[],K.__e(n,e.__v)}}K.__b=function(e){j=null,J&&J(e)},K.__=function(e,n){e&&n.__k&&n.__k.__m&&(e.__m=n.__k.__m),ne&&ne(e,n)},K.__r=function(e){Q&&Q(e),W=0;var n=(j=e.__c).__H;n&&(B===j?(n.__h=[],j.__h=[],n.__.forEach((function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0}))):(n.__h.forEach(_e),n.__h.forEach(pe),n.__h=[],W=0)),B=j},K.diffed=function(e){Y&&Y(e);var n=e.__c;n&&n.__H&&(n.__H.__h.length&&(1!==G.push(n)&&$===K.requestAnimationFrame||(($=K.requestAnimationFrame)||fe)(ue)),n.__H.__.forEach((function(e){e.u&&(e.__H=e.u),e.u=void 0}))),B=j=null}
1,K.__c=function(e,n){n.some((function(e){try{e.__h.forEach(_e),e.__h=e.__h.filter((function(e){return!e.__||pe(e)}))}catch(t){n.some((function(e){e.__h&&(e.__h=[])})),n=[],K.__e(t,e.__v)}})),X&&X(e,n)},K.unmount=function(e){ee&&ee(e);var n,t=e.__c;t&&t.__H&&(t.__H.__.forEach((function(e){try{_e(e)}catch(e){n=e}})),t.__H=void 0,n&&K.__e(n,t.__v))};var he="function"==typeof requestAnimationFrame;function fe(e){var n,t=function(){clearTimeout(r),he&&cancelAnimationFrame(n),setTimeout(e)},r=setTimeout(t,35);he&&(n=requestAnimationFrame(t))}function _e(e){var n=j,t=e.__c;"function"==typeof t&&(e.__c=void 0,t()),j=n}function pe(e){var n=j;e.__c=e.__(),j=n}function me(e,n){return!e||e.length!==n.length||n.some((function(n,t){return n!==e[t]}))}function ve(e,n){return"function"==typeof n?n(e):n}function ge(e,n,t){return(n=function(e){var n=function(e,n){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}class be{constructor(){ge(this,"_listeners",void 0),this._listeners=new Map}add(e,n,t,r){e.addEventListener(n,t,r);const o=Symbol();return this._listeners.set(o,{eventTarget:e,eventType:n,listener:t,options:r}),o}remove(e){const n=this._listeners.get(e);if(n){const{eventTarget:t,eventType:r,listener:o,options:i}=n;t.removeEventListener(r,o,i),this._listeners.delete(e)}}removeAll(){this._listeners.forEach((({eventTarget:e,eventType:n,listener:t,options:r})=>{e.removeEventListener(n,t,r)})),this._listeners.clear()}}function ye(e,n,t){return(n=function(e){var n=function(e,n){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}class we{constructor(e){ye(this,"_target",void 0),ye(this,"_value",void 0),this._target=e,this._value=null}get current(){return this._value}set current(e){this._value=e,this._updateTarget()}get target(){return this._target}set target(e){e!==this._target&&(this._target=e,this._updateTarget())}_updateTarget(){const e=this._value;"function"==typeof this._target?this._target(e):this._target&&(this._target.current=e)}}function xe(e){const n=le(new we(e));return n.current.target=e,n.current}let ke=0;function Ce(e){ke++;return{...e,id:`${ke}`}}var Ne=0;function Le(e,t,r,o,i,l){t||(t={});var a,c,s=t;if("ref"in s)for(c in s={},t)"ref"==c?a=t[c]:s[c]=t[c];var d={type:e,props:s,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Ne,__i:-1,__u:0,__source:i,__self:l};if("function"==typeof e&&(a=e.defaultProps))for(c in a)void 0===s[c]&&(s[c]=a[c]);return n.vnode&&n.vnode(d),d}function Te(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var He,Se={exports:{}};
2/*!
3	Copyright (c) 2018 Jed Watson.
4	Licensed under the MIT License (MIT), see
5	http://jedwatson.github.io/classnames
6*/function Pe(){return He||(He=1,e=Se,function(){var n={}.hasOwnProperty;function t(){for(var e="",n=0;n<arguments.length;n++){var t=arguments[n];t&&(e=o(e,r(t)))}return e}function r(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return t.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var r="";for(var i in e)n.call(e,i)&&e[i]&&(r=o(r,i));return r}function o(e,n){return n?e?e+" "+n:e+n:e}e.exports?(t.default=t,e.exports=t):window.classNames=t}()),Se.exports;var e}var Me=Te(Pe());const Ee='a,button:not([role="tab"]),input,select,textarea,[role="grid"],[role="tablist"]';function Ae({children:e,classes:n,elementRef:t,open:r=!0,variant:o="dark",...i}){return r?Le("div",{"data-component":"Overlay",...i,ref:t,className:Me("fixed top-0 left-0 w-full h-full z-10 flex items-center justify-center",{"bg-black/50":"dark"===o,"bg-white/50":"light"===o},n),children:e}):null}const Ie=U({}),Re=U({});function ze({children:e,classes:n,elementRef:t,variant:r="raised",...o}){const i=xe(t),l=ae((()=>({scrollRef:i})),[i]);return Le(Re.Provider,{value:l,children:Le("div",{"data-component":"Scroll",...o,ref:i,className:Me("min-h-0","h-full w-full overflow-auto",{"scroll-shadows":"raised"===r},n),children:e})})}function Oe({children:e,classes:n,elementRef:t,active:r=!1,variant:o="raised",width:i="full",...l}){return Le("div",{"data-component":"Card",...l,ref:t,className:Me("rounded-lg border bg-white",{"shadow hover:shadow-md":"raised"===o,"shadow-md":r&&"raised"===o},{"w-full":"full"===i,"w-auto":"auto"===i},n),children:e})}function Fe({children:e,classes:n,elementRef:t,...r}){return Le("div",{"data-component":"CardActions",...r,className:Me("flex items-center justify-end space-x-3",n
6),ref:t,children:e})}function De({children:e,classes:n,elementRef:t,size:r="md",...o}){return Le("div",{"data-component":"CardContent",...o,ref:t,className:Me({"p-3 space-y-4":"md"===r,"p-2 space-y-3":"sm"===r,"p-4 space-y-6":"lg"===r},n),children:e})}function qe(e){return Le("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"ArrowRightIcon",...e,children:Le("g",{"fill-rule":"evenodd",children:[Le("path",{fill:"none",d:"M0 0h16v16H0z"}),Le("path",{fill:"currentColor",d:"m9.613 3.21.094.083 4 4a1 1 0 0 1 .083 1.32l-.083.094-4 4a1 1 0 0 1-1.497-1.32l.083-.094L10.585 9H3a1 1 0 0 1-.117-1.993L3 7h7.585L8.293 4.707a1 1 0 0 1-.083-1.32l.083-.094a1 1 0 0 1 1.32-.083"})]})})}function Ve(e){return Le("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"CancelIcon",...e,children:Le("g",{"fill-rule":"evenodd",children:[Le("path",{fill:"none",d:"M0 0h16v16H0z"}),Le("path",{fill:"currentColor",d:"m12.322 5.085-.08.087-2.828 2.827 2.829 2.83a1 1 0 0 1-1.32 1.497l-.095-.083L8 9.414l-2.828 2.829c-.915.914-2.272-.388-1.494-1.328l.08-.087L6.584 8 3.757 5.172a1 1 0 0 1 1.32-1.498l.095.083L8 6.585l2.828-2.828c.886-.885 2.188.309 1.56 1.239z"})]})})}function Ue(e){return Le("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"CautionIcon",...e,children:Le("g",{"fill-rule":"evenodd",children:[Le("path",{fill:"none",d:"M0 0h16v16H0z"}),Le("path",{fill:"currentColor",d:"M8 0c.767 0 1.432.455 1.794 1.148l5.917 11.326c.386.738.36 1.573.071 2.23-.286.651-.926 1.296-1.864 1.296H2.082c-.938 0-1.578-.645-1.864-1.295a2.6 2.6 0 0 1 .07-2.23L6.207 1.147C6.568.455 7.233 0 8 0m0 2.038-.021.036L2.06 13.4a.6.6 0 0 0-.012.5.3.3 0 0 0 .062.1H13.89a.3.3 0 0 0 .061-.1.6.6 0 0 0-.012-.5L8.02 2.074zm5.874 11.972q0 0 .01-.006-.01.007-.01.006m-11.748 0q0 .002-.01-.006z"}),Le("path",{fill:"currentColor",d:"M8 5a1 1 0 0 1 1 1v3a1 1 0 0 1-2 0V6a1 1 0 0 1 1-1M9 12a1 1 0 1 1-2 0 1 1 0 0 1 2 0"})]})})}function We(e){return Le("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"CheckIcon",...e,children:Le("g",{"fill-rule":"evenodd",children:[Le("path",{fill:"none",d:"M0 0h16v16H0z"}),Le("path",{fill:"currentColor",d:"M12.18 2.427a1 1 0 0 1 1.705 1.04l-.066.106-7 10a1 1 0 0 1-1.606.045l-.07-.104-3-5A1 1 0 0 1 3.792 7.39l.065.097 2.207 3.677z"})]})})}function je(e){return Le("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"CheckboxIcon",...e,children:Le("g",{"fill-rule":"evenodd",children:[Le("path",{fill:"none",d:"M0 0h16v16H0z"}),Le("path",{fill:"currentColor",d:"M0 2.5A2.5 2.5 0 0 1 2.5 0h11A2.5 2.5 0 0 1 16 2.5v11a2.5 2.5 0 0 1-2.5 2.5h-11A2.5 2.5 0 0 1 0 13.5zM2.5 1A1.5 1.5 0 0 0 1 2.5v11A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-11A1.5 1.5 0 0 0 13.5 1z","clip-rule":"evenodd"})]})})}function Be(e){return Le("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"CheckboxCheckedFilledIcon",...e,children:Le("g",{"fill-rule":"evenodd",children:[Le("path",{fill:"none",d:"M0 0h16v16H0z"}),Le("path",{fill:"currentColor",d:"M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2zm10.18 3.636a.75.75 0 0 0-1.044.184l-4.588 6.552-1.655-2.758-.05-.072a.75.75 0 0 0-1.236.844l2.25 3.75.053.078a.75.75 0 0 0 1.204-.034l5.25-7.5.05-.08a.75.75 0 0 0-.234-.964","clip-rule":"evenodd"})]})})}function $e(e){return Le("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"CopyIcon",...e,children:Le("g",{"fill-rule":"evenodd",children:[Le("path",{fill:"none",d:"M0 0h16v16H0z"}),Le("path",{fill:"currentColor",d:"M15 0a1 1 0 0 1 .993.883L16 1v10a1 1 0 0 1-.883.993L15 12H7a1 1 0 0 1-.993-.883L6 11V1a1 1 0 0 1 .883-.993L7 0zM4 4a1 1 0 0 1 .117 1.993L4 6H2v8h7a1 1 0 0 1 .993.883L10 15a1 1 0 0 1-.883.993L9 16H1a1 1 0 0 1-.993-.883L0 15V5a1 1 0 0 1 .883-.993L1 4zm4-2h6v8H8z"})]})})}function Ze(e){return Le("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"EmailFilledIcon",...e,children:Le("g",{"fill-rule":"evenodd",children:[Le("path",{fill:"none",d:"M0 0h16v16H0z"}),Le("path",{fill:"currentColor",d:"M15.538 2.721A2 2 0 0 0 14 2H2l-.183.008a2 2 0 0 0-1.355.713L8 8.375zM7.7 9.4.031 3.647Q.001 3.82 0 4v8l.005.15A2 2 0 0 0 2 14h12l.15-.005A2 2 0 0 0 16 12V4l-.008-.178-.023-.174L8.3 9.4l-.08.049a.5.5 0 0 1-.44 0z"})]})})}function Ge(e){return Le("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"ExternalIcon",...e,children:Le("g",{"fill-rule":"evenodd",children:[Le("path",{fill:"none",d:"M0 0h16v16H0z"}),Le("path",{fill:"currentColor",d:"M13 2a1 1 0 0 1 .993.883L14 3v6a1 1 0 0 1-1.993.117L12 9V5.414l-8.293 8.293a1 1 0 0 1-1.497-1.32l.083-.094L10.584 4H7a1 1 0 0 1-.993-.883L6 3a1 1 0 0 1 .883-.993L7 2z"})]})})}function Ke(e){return Le("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"LogoIcon",...e,children:Le("g",{"fill-rule":"evenodd",children:[Le("path",{fill:"none",d:"M0 0h16v16H0z"}),Le("path",{fill:"currentColor",d:"M13.83 0C14.476 0 15 .53 15 1.185V12.69c0 .654-.524 1.185-1.17 1.185H9.75L8 16l-1.75-2.125H2.17c-.646 0-1.17-.53-1.17-1.185V1.186C1 .53 1.524 0 2.17 0z"}),Le("path",{fill:"#fff",d:"M4.785 2.133h-1.71v9.6h1.71V8.735c0-1.522.473-1.754.905-1.793l.228-.009.17.003c.51.02.979.15.979 1.199v3.598h1.71V7.598c0-1.865-1.152-2.463-2.29-2.463l-.39.003c-.753.017-.822.154-1.312 1.197zM11.889 9.6c-.573 0-1.037.477-1.037 1.067 0 .589.464 1.066 1.037 1.066s1.037-.477 1.037-1.066S12.462 9.6 11.889 9.6"})]})})}function Je({children:e,classes:n,elementRef:t,expanded:r,pressed:o,title:i,icon:l,size:a="md",variant:c="secondary",unstyled:s=!1,role:d,...u}){const h=!s,f=h&&"custom"!==c,_=h&&"custom"!==a,p={"aria-label":i};return"tab"===d?p["aria-selected"]=o:(p["aria-pressed"]=o,p["aria-expanded"]=r),Le("button",{role:null!=d?d:"button","data-component":"Button",type:"button",...p,...u,className:Me({"focus-visible:ring focus-visible:outline-none transition-colors whitespace-nowrap flex items-center":h},f&&{"font-semibold rounded":!0,"text-grey-7 bg-grey-1 enabled:hover:text-grey-9 enabled:hover:bg-grey-2 aria-pressed:text-grey-9 aria-expanded:text-grey-9":"secondary"===c,"text-grey-1 bg-grey-7 enabled:hover:bg-grey-8 disabled:text-grey-4":"primary"===c},_&&{"p-2 gap-x-2":"md"===a,"p-1 gap-x-1":"xs"===a,"p-1.5 gap-x-1.5":"sm"===a,"p-2.5 gap-x-1.5":"lg"===a},n),ref:t,title:i,children:[l&&Le(l,{className:"w-em h-em"}),e]})}const Qe=Me("input-group:border input-group:rounded-none","input-group:first:rounded-l input-group:last:rounded-r","input-group:ml-[-1px] input-group:first:ml-0","focus:z-1");function Ye({children:e,classes:n,elementRef:t,...r}){return Le("div",{"data-component":"InputGroup",...r,ref:t,className:Me("input-group","flex items-stretch w-full justify-center",n),children:e})}function Xe({children:e,classes:n,elementRef:t,pressed:r,expanded:o,icon:i,size:l="md",title:a,variant:c="secondary",unstyled:s=!1,...d}){const u=!s;return Le(Je,{"data-component":"IconButton",...d,classes:Me({"focus-visible:ring focus-visible:outline-none transition-colors rounded whitespace-nowrap":u,"flex items-center justify-center":u},u&&Qe,u&&"custom"!==c&&{"text-grey-7 bg-transparent enabled:hover:text-grey-9 aria-pressed:text-brand aria-expanded:text-brand":"secondary"===c,"text-brand bg-transparent enabled:hover:text-grey-9 disabled:text-grey-7":"primary"===c,"text-grey-7 bg-grey-2 enabled:hover:text-grey-9 enabled:hover:bg-grey-3 disabled:text-grey-5 aria-pressed:bg-grey-3 aria-expanded:bg-grey-3":"dark"===c},u&&"custom"!==l&&{"gap-x-2 touch:min-w-touch-minimum touch:min-h-touch-minimum":!0,"p-2":"md"===l,"p-1":"xs"===l,"p-1.5":"sm"===l,"p-2.5":"lg"===l},n),elementRef:t,title:a,pressed:r,expanded:o,unstyled:!0,children:[i&&Le(i,{className:"w-em h-em"}),e]})}function en({children:e,classes:n,elementRef:t,title:r,onClick:o,...i}){var l;const a=se(Ie);return Le(Xe,{"data-component":"CloseButton",elementRef:t,icon:Ve,title:null!==(l=null!=r?r:null==a?void 0:a.title)&&void 0!==l?l:"Close",classes:n,...i,onClick:null!=o?o:null==a?void 0:a.onClose,children:e})}function nn({children:e,classes:n,elementRef:t,tagName:r="h1",variant:o="primary",...i}){const l=r;return Le("div",{"data-component":"CardTitle",...i,className:Me({"text-lg text-brand font-semibold":"primary"===o,"text-xl text-slate-7 font-normal":"secondary"===o},n),ref:t,children:Le(l,{"data-testid":"card-title-heading",children:e})})}function tn({children:e,classes:n,elementRef:t,fullWidth:r=!1,onClose:o,title:i,variant:l="primary",...a}){const c=se(Ie),s=null!=o?o:null==c?void 0:c.onClose;return Le("div",{"data-component":"CardHeader",...a,className:Me("flex items-center gap-x-2 border-b py-2",{"bg-slate-0 border-slate-5 rounded-t-[inherit]":"secondary"===l,"mx-3":!r&&"primary"===l,"px-3":r||"secondary"===l},n),ref:t,children:[i&&Le(nn,{variant:l,children:i}),e,Le("div",{className:"grow"}),s&&Le(en,{onClick:s,classes:Me("-mr-2.5","text-[16px]")})]})}function rn({children:e,elementRef:n,buttons:t,fullWidthHeader:r=!1,icon:o,onClose:i,paddingSize:l="md",scrollable:a=!1,title:c,...s}){const d="flex flex-col min-h-0 h-full",u="none"===l?e:Le(De,{classes:d,"data-testid":"panel-content-wrapper",size:l,children:e});return Le(Oe,{"data-composite-component":"Panel",...s,classes:d,elementRef:n,children:[Le(tn,{onClose:i,fullWidth:a||r,children:[o&&Le(o,{className:"w-em h-em"}),Le(nn,{children:c})]}),a?Le(ze,{classes:Me({"rounded-b-[inherit]":!t}),children:u}):Le(w,{children:u}),t&&Le(De,{"data-testid":"panel-buttons",children:Le(Fe,{children:t})})]})}function on({closeOnClickAway:e=!1,closeOnEscape:n=!1,closeOnFocusAway:t=!1,children:r,initialFocus:o="auto",restoreFocus:i=!1,transitionComponent:l,classes:a,elementRef:c,onClose:s,closeTitle:d,...u}){const h="custom"!==u.variant;const{buttons:f,icon:_,paddingSize:p="md",title:m="",scrollable:v=!0,...g}=h?u:{buttons:void 0,icon:void 0,paddingSize:void 0,title:void 0,scrollable:void 0,...u},b=xe(c),y=le(document.activeElement),[x,k]=re(!1),C=ce((()=>{l?k(!1):null==s||s()}),[s,l]),N=ce((()=>
6{if("manual"===o)return;var e;if("auto"===o)return void(null===(e=b.current)||void 0===e||e.focus());const n=null==o?void 0:o.current;var t;n&&!n.disabled?n.focus():null===(t=b.current)||void 0===t||t.focus()}),[o,b]);!function(e,n,{enabled:t=!0}={}){oe((()=>{if(!t)return()=>{};const r=document.body,o=new be,i=t=>{e.current&&!t.composedPath().includes(e.current)&&n(t)};return o.add(r,"mousedown",i),o.add(r,"click",i),()=>{o.removeAll()}}),[e,t,n])}(b,C,{enabled:e}),function(e,n,{enabled:t=!0}={}){oe((()=>{if(!t)return()=>{};const r=document.body,o=new be;return o.add(r,"keydown",(t=>{e.includes(t.key)&&n(t)})),()=>{o.removeAll()}}),[t,n,e])}(["Escape"],C,{enabled:n}),function(e,n,{enabled:t=!0}={}){oe((()=>{if(!t||!e.current)return()=>{};const r=new be;return r.add(e.current,"focusout",(t=>{const r=t;e.current&&!e.current.contains(r.relatedTarget)&&n(r)})),()=>{r.removeAll()}}),[e,t,n])}(b,C,{enabled:t});const L=de(),T=ae((()=>null!=l?l:w),[l]);oe((()=>{k(!0),l||N()}),[]),ie((()=>{const e=y.current;return()=>{i&&e&&e.focus()}}),[]),ie((()=>{var e;const n=null==b||null===(e=b.current)||void 0===e?void 0:e.querySelector("p");n&&(n.id=L,b.current.setAttribute("aria-describedby",L))}),[L,b]);const H={onClose:s?C:void 0,title:d};return Le(Ie.Provider,{value:H,children:Le(T,{direction:x?"in":"out",onTransitionEnd:e=>{"in"===e?N():null==s||s()},children:Le("div",{"data-component":"Dialog",tabIndex:-1,role:"dialog",...g,className:Me("flex flex-col",a),ref:b,children:h?Le(rn,{buttons:f,fullWidthHeader:!0,icon:_,paddingSize:p,title:m,scrollable:v,children:r}):Le(w,{children:r})})})})}function ln({children:e,disableCloseOnEscape:n=!1,disableFocusTrap:t=!1,disableRestoreFocus:r=!1,size:o="md",classes:i,elementRef:l,closeOnClickAway:a=!1,closeOnFocusAway:c=!1,initialFocus:s="auto",...d}){const u=xe(l);return function(e,{enabled:n=!0,selector:t=Ee}={}){const r=le(null);oe((()=>{if(!n)return()=>{};if(!e.current)throw new Error("Container ref not set");const o=e.current,i=()=>{const e=Array.from(o.querySelectorAll(t)).filter((e=>{return null!==e.offsetParent&&!("boolean"==typeof(n=e).disabled&&n.disabled);var n}));return document.activeElement===o&&e.unshift(o),e},l=(e=i(),n=-1,t=!1)=>{n<0&&(n=e.findIndex((e=>0===e.tabIndex)))<0&&(n=0);for(const[o,i]of e.entries())i.tabIndex=o===n?0:-1,o===n&&t&&(r.current=i,i.focus())},a=i(),c=a.indexOf(document.activeElement);l(a,c);const s=new be;s.add(o,"focusin",(e=>{const n=i(),t=n.indexOf(e.target);t>=0&&l(n,t)})),s.add(o,"keydown",(e=>{const n=i();let t=n.findIndex((e=>0===e.tabIndex));-1!==t&&n[t]!==o||!r.current||(t=n.indexOf(r.current));let a=!1;"Tab"===e.key&&e.shiftKey?(0===t?t=n.length-1:--t,a=!0):"Tab"===e.key&&(t===n.length-1?t=0:++t,a=!0),a&&(l(n,t,!0),e.preventDefault(),e.stopPropagation())}));const d=new MutationObserver((()=>{l()}));return d.observe(o,{subtree:!0,attributes:!0,attributeFilter:["disabled"],childList:!0}),()=>{s.removeAll(),d.disconnect()}}),[e,n,t])}(u,{enabled:!t}),Le(Ae,{"data-composite-component":"ModalDialog",children:Le(on,{"aria-modal":!0,...d,closeOnClickAway:a,closeOnFocusAway:c,closeOnEscape:!n,initialFocus:s,restoreFocus:!r,classes:Me("flex flex-col","custom"!==o&&"max-w-[90vw] max-h-[90vh]","custom"!==o&&"tall:fixed tall:max-h-[80vh] tall:top-[10vh]",{"w-[30rem]":"sm"===o,"w-[36rem]":"md"===o,"w-[42rem]":"lg"===o},i),elementRef:u,"data-modal-size":o,children:e})})}function an({children:e,elementRef:n,containerRef:t,checked:r,icon:o,checkedIcon:i,disabled:l,onChange:a,id:c,type:s,containerClasses:d,...u}){const h=r?i:o;return Le("label",{className:Me("relative flex items-center gap-x-1.5",{"cursor-pointer":!l,"opacity-70":l},d),htmlFor:c,"data-composite-component":"checkbox"===s?"Checkbox":"RadioButton",ref:t,children:[Le("input",{...u,type:s,ref:n,className:Me("peer","absolute w-em h-em","opacity-[.00001]",{"cursor-pointer":!l}),checked:r,disabled:l,id:c,onChange:a}),Le(h,{className:Me("peer-focus-visible:ring","w-em h-em","min-w-min min-h-min")}),Le("span",{children:e})]})}function cn({checked:e,defaultChecked:n=!1,icon:t=je,checkedIcon:r=Be,onChange:o,...i}){const l="boolean"==typeof e,[a,c]=re(n);return Le(an,{icon:t,checkedIcon:r,type:"checkbox",checked:l?e:a,onChange:function(e){null==o||o.call(this,e),l||c(e.target.checked)},...i})}function sn(e,n){ie((()=>{var t;null===(t=e.current)||void 0===t||t.setCustomValidity(null!=n?n:"")}),[n,e])}function dn({classes:e,feedback:n}){return Me("focus-visible:ring focus-visible:outline-none ring-inset border rounded w-full p-2","bg-grey-0 focus:bg-white disabled:bg-grey-1","placeholder:text-grey-6 disabled:placeholder:text-grey-7","touch:text-at-least-16px",{"ring-2":!!n,"ring-red-error":"error"===n,"ring-yellow-notice":"warning"===n},Qe,e)}function un({elementRef:e,type:n="text",classes:t,error:r,feedback:o,...i}){i.id||i["aria-label"]||console.warn("`Input` component should have either an `id` or an `aria-label` attribute");const l=xe(e);return r&&(o="error"),sn(l,r),Le("input",{"data-component":"Input",...i,ref:l,type:n,className:dn({classes:t,feedback:o}),"aria-invalid":"error"===o})}function hn({elementRef:e,error:n,feedback:t,classes:r,...o}
6){o.id||o["aria-label"]||console.warn("`Textarea` component should have either an `id` or an `aria-label` attribute");const i=xe(e);return n&&(t="error"),sn(i,n),Le("textarea",{"data-component":"Textarea",...o,ref:i,className:dn({classes:r,feedback:t}),"aria-invalid":"error"===t})}function fn({children:e,classes:n,elementRef:t,icon:r,status:o="notice",size:i="md",variant:l="outlined",unstyled:a=!1,...c}){const s=!a,d=s&&"custom"!==l,u=s&&"custom"!==i;let h=r;if(!h)switch(o){case"success":h=We;break;case"error":h=Ve;break;default:h=Ue}const f=d&&u;return Le("div",{"data-component":"Callout",...c,ref:t,className:Me(s&&"flex items-center border",d&&{"rounded border":!0,"shadow hover:shadow-md cursor-pointer":"raised"===l,"border-yellow-notice":"notice"===o,"border-green-success":"success"===o,"border-red-error":"error"===o},d&&{"bg-yellow-notice":"notice"===o&&f,"bg-green-success":"success"===o&&f,"bg-red-error":"error"===o&&f,"bg-white":!f},n),children:[f&&Le("div",{className:Me({"p-2":"md"===i,"p-1.5":"sm"===i,"p-3":"lg"===i}),children:Le(h,{"data-testid":"callout-icon",className:Me("text-white",{"w-[1.25em] h-[1.25em]":"md"===i,"w-[0.85em] h-[0.85em]":"sm"===i,"w-[1.5em] h-[1.5em]":"lg"===i})})}),Le("div",{className:Me(u&&{"p-2":"md"===i,"py-1.5 px-2":"sm"===i,"p-3":"lg"===i},s&&"grow",d&&"bg-white rounded-r"),children:e})]})}function _n({message:e,onDismiss:n}){return Le(fn,{classes:Me({"sr-only":e.visuallyHidden}),status:e.type,onClick:()=>n(e.id),variant:"raised",children:e.message})}const pn=({direction:e,onTransitionEnd:n,children:t,transitionClasses:r={}})=>{const o="out"===e,i=le(null),l=ae((()=>{const{transitionIn:e="animate-fade-in",transitionOut:n="animate-fade-out"}=r;return{[e]:!o,[n]:o}}),[o,r]);return Le("div",{"data-testid":"animation-container",onAnimationEnd:t=>{t.target===i.current&&(null==n||n(null!=e?e:"in"))},ref:i,className:Me("relative w-full container",l),children:t})};function mn({messages:e,onMessageDismiss:n,transitionClasses:t,setTimeout_:r=setTimeout}){const[o,i]=re([]),l=le(new Map),a=ce((e=>i((n=>[...n,e]))),[]),c=ce((e=>{const n=r((()=>{a(e),l.current.delete(e)}),5e3);l.current.set(e,n)}),[a,r]),s=ce(((e,t)=>{var r;const o=null===(r=t.autoDismiss)||void 0===r||r;"in"===e&&o&&c(t.id),"out"===e&&(n(t.id),i((e=>e.filter((e=>e!==t.id)))))}),[c,n]);return ie((()=>{const e=l.current;return()=>{e.forEach((e=>clearTimeout(e)))}}),[]),Le("ul",{"aria-live":"polite","aria-relevant":"additions",className:"w-full space-y-2","data-component":"ToastMessages",children:e.map((e=>{const n=o.includes(e.id);return Le("li",{className:Me({"mb-2":!e.visuallyHidden}),children:Le(pn,{direction:n?"out":"in",onTransitionEnd:n=>s(n,e),transitionClasses:t,children:Le(_n,{message:e,onDismiss:a})})},e.id)}))})}function vn({children:e,classes:n,elementRef:t,underline:r="none",unstyled:o=!1,variant:i="brand",...l}){const a=!o;return Le("a",{"data-component":"Link",rel:"noopener noreferrer",...l,className:Me(a&&{"focus-visible:ring focus-visible:outline-none rounded":!0,"no-underline hover:no-underline":"none"===r,"underline hover:underline":"always"===r,"no-underline hover:underline":"hover"===r},a&&"custom"!==i&&{"text-brand hover:text-brand-dark":"brand"===i,"text-color-text-light hover:text-brand":"text-light"===i,"text-color-text hover:text-brand-dark":"text"===i},n),ref:t,children:e})}const gn=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement);function bn(e,n){return e===n&&(0!==e||1/e==1/n)||e!=e&&n!=n}const yn=e=>{const n=le([e,(...e)=>n[0](...e)]).current;return ie((()=>{n[0]=e})),n[1]},wn="pushState",xn="replaceState",kn=["popstate",wn,xn,"hashchange"],Cn=e=>{for(const n of kn)addEventListener(n,e);return()=>{for(const n of kn)removeEventListener(n,e)}},Nn=(e,n)=>function(e,n,t){t&&!gn&&(n=t);const r=n(),[{_instance:o},i]=re({_instance:{_value:r,_getSnapshot:n}});return ie((()=>{o._value=r,o._getSnapshot=n,bn(o._value,n())||i({_instance:o})}),[e,r,n]),oe((()=>(bn(o._value,o._getSnapshot())||i({_instance:o}),e((()=>{bn(o._value,o._getSnapshot())||i({_instance:o})})))),[e]),r}(Cn,e,n),Ln=()=>location.search,Tn=()=>location.pathname,Hn=({ssrPath:e}={})=>Nn(Tn,e?()=>e:Tn),Sn=(e,{replace:n=!1,state:t=null}={})=>history[n?xn:wn](t,"",e),Pn=(e={})=>[Hn(e),Sn],Mn=Symbol.for("wouter_v3");if("undefined"!=typeof history&&void 0===window[Mn]){for(const e of[wn,xn
6]){const n=history[e];history[e]=function(){const t=n.apply(this,arguments),r=new Event(e);return r.arguments=arguments,dispatchEvent(r),t}}Object.defineProperty(window,Mn,{value:!0})}const En=(e="")=>"/"===e?"":e,An=(e="",n)=>((e,n)=>n.toLowerCase().indexOf(e.toLowerCase())?"~"+n:n.slice(e.length)||"/")(In(En(e)),In(n)),In=e=>{try{return decodeURI(e)}catch(n){return e}},Rn={hook:Pn,searchHook:({ssrSearch:e=""}={})=>Nn(Ln,(()=>e)),parser:function(e,n){if(e instanceof RegExp)return{keys:!1,pattern:e};var t,r,o,i,l=[],a="",c=e.split("/");for(c[0]||c.shift();o=c.shift();)"*"===(t=o[0])?(l.push(t),a+="?"===o[1]?"(?:/(.*))?":"/(.*)"):":"===t?(r=o.indexOf("?",1),i=o.indexOf(".",1),l.push(o.substring(1,~r?r:~i?i:o.length)),a+=~r&&!~i?"(?:/([^/]+?))?":"/([^/]+?)",~i&&(a+=(~r?"?":"")+"\\"+o.substring(i))):a+="/"+o;return{keys:l,pattern:new RegExp("^"+a+(n?"(?=$|/)":"/?$"),"i")}},base:"",ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:e=>e},zn=U(Rn),On=()=>se(zn),Fn={},Dn=U(Fn),qn=e=>{const[n,t]=e.hook(e);return[An(e.base,n),yn(((n,r)=>t(((e,n)=>"~"===e[0]?e.slice(1):En(n)+e)(n,e.base),r)))]},Vn=(e,n,t,r)=>{const{pattern:o,keys:i}=n instanceof RegExp?{keys:!1,pattern:n}:e(n||"*",r),l=o.exec(t)||[],[a,...c]=l;return void 0!==a?[!0,(()=>{const e=!1!==i?Object.fromEntries(i.map(((e,n)=>[e,c[n]]))):l.groups;let n={...c};return e&&Object.assign(n,e),n})(),...r?[a]:[]]:[!1,null]},Un=e=>Vn(On().parser,e,qn(On())[0]),Wn=({children:e,...n})=>{const t=On(),r=n.hook?Rn:t;let o=r;const[i,l]=n.ssrPath?.split("?")??[];l&&(n.ssrSearch=l,n.ssrPath=i),n.hrefs=n.hrefs??n.hook?.hrefs;let a=le({}),c=a.current,s=c;for(let e in r){const t="base"===e?r[e]+(n[e]||""):n[e]||r[e];c===s&&t!==s[e]&&(a.current=s={...s}),s[e]=t,t===r[e]&&t===o[e]||(o=s)}return b(zn.Provider,{value:o,children:e})},jn=({children:e,component:n},t)=>n?b(n,{params:t}):"function"==typeof e?e(t):e,Bn=({path:e,nest:n,match:t,...r})=>{const o=On(),[i]=qn(o),[l,a,c]=t??Vn(o.parser,e,i,n),s=(e=>{let n=le(Fn);const t=n.current;return n.current=Object.keys(e).length!==Object.keys(t).length||Object.entries(e).some((([e,n])=>n!==t[e]))?e:t})({...se(Dn),...a});if(!l)return null;const d=c?b(Wn,{base:c},jn(r,s)):jn(r,s);return b(Dn.Provider,{value:s,children:d})},$n=(e,n)=>{const t=On(),[o,i]=qn(t),{to:l="",href:a=l,onClick:c,asChild:s,children:d,className:u,replace:h,state:f,..._}=e,p=yn((n=>{n.ctrlKey||n.metaKey||n.altKey||n.shiftKey||0!==n.button||(c?.(n),n.defaultPrevented||(n.preventDefault(),i(a,e)))})),m=t.hrefs("~"===a[0]?a.slice(1):t.base+a,t);return s&&r(d)?V(d,{onClick:p,href:m}):b("a",{..._,onClick:p,href:m,className:u?.call?u(o===a):u,children:d,ref:n})},Zn=e=>Array.isArray(e)?e.flatMap((e=>Zn(e&&e.type===w?e.props.children:e))):[e],Gn=({children:e,location:n})=>{const t=On(),[o]=qn(t);for(const i of Zn(e)){let e=0;if(r(i)&&(e=Vn(t.parser,i.props.path,n||o,i.props.nest))[0])return V(i,{match:e})}return null};U(null);const Kn=U(null),Jn={accountDelete:"/account/delete",accountDeveloper:"/account/developer",accountNotifications:"/account/settings/notifications",accountSettings:"/account/settings",forgotPassword:"/forgot-password",login:"/login",profile:"/account/profile",signup:"/signup",signupWithEmail:"/signup/email",signupWithFacebook:"/signup/facebook",signupWithGoogle:"/signup/google",signupWithORCID:"/signup/orcid"};function Qn(e,n,t,r={}){const o=e.data?.[n]??t,[i,l]=re(o),[a,c]=re(!1),[s,d]=re(!0),u=ce((e=>{l(e),d(!1),c(!0)}),[]),h=ce((e=>{l(e),d(!0),c(!0)}),[]);let f;return f=a?r.validate?.(i,s):e.errors?.[n],{name:n,value:i,update:u,commit:h,changed:a,committed:s,error:f}}function Yn({children:e}){return Le("div",{role:"list",className:"flex gap-x-2",children:e})}function Xn(){return Le("div",{className:"mt-2 mb-6 border-b border-b-text-grey-6 py-2 flex flex-row items-center",children:Le(Yn,{children:[Le(Yn.Link,{testId:"settings-link",href:Jn.accountSettings,server:!0,children:"Account"}),Le(Yn.Link,{testId:"profile-link",href:Jn.profile,server:!0,children:"Profile"}),Le(Yn.Link,{testId:"notifications-link",href:Jn.accountNotifications,server:!0,children:"Notifications"}),Le(Yn.Link,{testId:"developer-link",href:Jn.accountDeveloper,server:!0,children:"Developer"})]})})}function et({...e}){return Le("svg",{version:"1.1",id:"svg9",width:"24",height:"24",viewBox:"0 0 666.66668 666.66717",xmlns:"http://www.w3.org/2000/svg",...e,children:[Le("defs",{id:"defs13",children:Le("clipPath",{clipPathUnits:"userSpaceOnUse",id:"clipPath25",children:Le("path",{d:"M 0,700 H 700 V 0 H 0 Z",id:"path23"})})}),Le("g",{id:"g17",transform:"matrix(1.3333333,0,0,-1.3333333,-133.33333,799.99999)",children:Le("g",{id:"g19",children:Le("g",{id:"g21","clip-path":"url(#clipPath25)",children:[Le("g",{id:"g27",transform:"translate(600,350)",children:Le("path",{d:"m 0,0 c 0,138.071 -111.929,250 -250,250 -138.071,0 -250,-111.929 -250,-250 0,-117.245 80.715,-215.622 189.606,-242.638 v 166.242 h -51.552 V 0 h 51.552 v 32.919 c 0,85.092 38.508,124.532 122.048,124.532 15.838,0 43.167,-3.105 54.347,-6.211 V 81.986 c -5.901,0.62
61 -16.149,0.932 -28.882,0.932 -40.993,0 -56.832,-15.528 -56.832,-55.9 V 0 h 81.659 l -14.028,-76.396 h -67.631 V -248.169 C -95.927,-233.218 0,-127.818 0,0",style:"fill:#0866ff;fill-opacity:1;fill-rule:nonzero;stroke:none",id:"path29"})}),Le("g",{id:"g31",transform:"translate(447.9175,273.6036)",children:Le("path",{d:"M 0,0 14.029,76.396 H -67.63 v 27.019 c 0,40.372 15.838,55.899 56.831,55.899 12.733,0 22.981,-0.31 28.882,-0.931 v 69.253 c -11.18,3.106 -38.509,6.212 -54.347,6.212 -83.539,0 -122.048,-39.441 -122.048,-124.533 V 76.396 h -51.552 V 0 h 51.552 v -166.242 c 19.343,-4.798 39.568,-7.362 60.394,-7.362 10.254,0 20.358,0.632 30.288,1.831 L -67.63,0 Z",style:"fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none",id:"path33"})})]})})})]})}function nt({center:e=!0,classes:n,children:t,csrfToken:r,...o}){return Le("form",{method:"POST","data-testid":"form",className:Me("max-w-[530px] flex flex-col gap-y-4",e&&"mx-auto",n),...o,children:[r&&Le("input",{type:"hidden",name:"csrf_token",value:r}),t]})}function tt({disableSubmit:e=!1,submitLabel:n="Save"}){return Le("div",{className:"mb-4 pt-2 flex items-center gap-x-4",children:[Le("div",{className:"grow"}),Le(Je,{type:"submit",variant:"primary","data-testid":"submit-button",disabled:e,children:n})]})}function rt({...e}){return Le("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",width:"24",...e,children:[Le("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z",fill:"#4285F4"}),Le("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),Le("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),Le("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"}),Le("path",{d:"M1 1h22v22H1z",fill:"none"})]})}function ot({...e}){return Le("svg",{width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[Le("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M24 12c0 6.6278-5.3723 12-12 12-6.6285 0-12-5.3722-12-12C0 5.3715 5.3715 0 12 0c6.6278 0 12 5.3715 12 12Z",fill:"#A6CE39"}),Le("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.1098 7.2278h-4.0875v10.425h4.1055c3.4162 0 5.5125-2.5335 5.5125-5.2125 0-1.2263-.4215-2.529-1.3275-3.528-.9113-1.002-2.2987-1.6845-4.2037-1.6845ZM13.95 15.975h-2.1098v-7.0688H13.875c1.3672 0 2.34.414 2.97 1.05.6315.6367.939 1.5157.939 2.484 0 .588-.1792 1.4752-.7447 2.211-.5587.7268-1.5075 1.3238-3.0892 1.3238Zm3.9833-3.0195c-.1883 1.305-1.1205 3.207-3.9833 3.207h-2.2972H13.95c2.8628 0 3.795-1.902 3.9833-3.207Zm1.359-1.8038c-.4928-1.9508-2.1375-3.7365-5.1825-3.7365h-3.9 3.9c3.045 0 4.6897 1.7857 5.1825 3.7365Zm.1612 1.2885ZM6.2723 7.2562v10.4153h1.8188V7.2562H6.2723Zm1.6312 10.2278H6.459h1.4438ZM7.1813 6.4875c.63 0 1.1347-.5168 1.1347-1.1348 0-.6172-.5047-1.134-1.1347-1.134-.6285 0-1.134.5055-1.134 1.1348 0 .6172.504 1.134 1.134 1.134Z",fill:"#fff"})]})}function it({message:e}){return Le("div",{"data-testid":"error-container",role:"alert",children:e&&Le("div",{className:"text-red-error font-bold flex items-center gap-x-2","data-testid":"error-message",children:[Le(Ve,{}),e]})})}function lt(){return Le("span",{className:"text-brand",children:"*"})}function at({id:e,htmlFor:n,text:t,required:r}){return Le("label",{className:"font-bold",id:e,htmlFor:n,children:[t,r&&Le(lt,{})]})}function ct({value:e,limit:n,error:t=!1}){return Le("div",{className:"flex",children:[Le("div",{className:"grow"}),Le("span",{"data-testid":"char-counter",className:t?"text-red-error font-bold":void 0,children:[e,"/",n]})]})}function st({type:e="input",inputType:n,value:t,placeholder:r,onChangeValue:o,onCommitValue:i,minLength:l=0,maxLength:a,label:c,required:s=!1,showRequired:d=s,autofocus:u=!1,classes:h="",name:f,fieldError:_="",includeStatusLineInLayout:p=!1}){const m=de(),[v,g]=re(!1);let b="";"number"==typeof a&&[...t].length>a?b=`Must be ${a} characters or less.`:[...t].length<l&&v&&(b=`Must be ${l} characters or more.`);const y="input"===e?un:hn;return Le("div",{className:"relative",children:[Le(at,{htmlFor:m,text:c,required:d}),Le(y,{id:m,onInput:e=>{o(e.target.value)},onChange:e=>{i?.(e.target.value),g(!0)},error:b,value:t,placeholder:r,classes:h,autofocus:u,autocomplete:"off",required:s,name:f,type:n}),Le("div",{className:Me(p?"relative":"absolute","w-full"),"data-testid":"status-line",children:"number"==typeof a&&Le(ct,{value:[...t].length,limit:a,error:Boolean(b)})}),_&&Le("div",{className:"mt-1",children:Le(it,{message:_})})]})}Yn.Link=function({children:e,href:n,testId:t,server:r=!1}){const[o]=Un(n);return Le(r?"a":$n,{href:n,className:Me({"focus-visible-ring whitespace-nowrap flex items-center font-semibold rounded px-2 py-1 gap-x-2":!0,"text-grey-1 bg-grey-7":o,"hover:bg-grey-2":!o}),"data-testid":t,"aria-current":o,role:"listitem",children:e})};const dt=e=>({name:e.name,value:e.value,fieldError:e.error,onChangeValue:e.update,onCommitValue:e.commit});function ut({text:e}){return Le("h1",{class:"text-lg mb-4",children:e})}function ht({config:e}){const n=Qn(e.forms.email,"email",""),t=Qn(e.forms.email,"password","");return Le(w,{children:[Le(ut,{text:e.context.user.email?"Change your email address":"Add an email address"}),Le(nt,{csrfToken:e.csrfToken,"data-testid":"email-form",children:[Le("input",{type:"hidden",name:"__formid__",value:"email"}),e.context.user.email&&Le("p",{children:["Current email address:"," ",Le("b",{"data-testid":"current-email",children:e.context.user.email})]}),Le(st,{inputType:"email",label:e.context.user.email?"New email address":"Email address",required:!0,...dt(n)}),e.context.user.has_password&&Le(st,{label:"Confirm password",inputType:"password",required:!0,...dt(t)}),Le(tt,{})]})]})}function ft({config:e}){const n=Qn(e.forms.password,"password",""),t=Qn(e.forms.password,"new_password",""),r=Qn(e.forms.password,"new_password_confirm","");return Le(w,{children:[e.context.user.has_password?Le(ut,{text:"Change your password"}):Le(ut,{text:"Add a password"}),Le(nt,{csrfToken:e.csrfToken,"data-testid":"password-form",children:[Le("input",{type:"hidden",name:"__formid__",value:"password"}),e.context.user.has_password&&Le(st,{label:"Current password",inputType:"password",required:!0,...dt(n)}),Le(st,{label:"New password",inputType:"password",required:!0,minLength:8,...dt(t)}),Le(st,{label:"Confirm new password",inputType:"password",required:!0,...dt(r)}),Le(tt,{})]})]})}function _t({config:e,provider:n}
6){const t=e.context.identities?.[n],r=t?.connected,o=t?.provider_unique_id,i=t?.email,l=t?.url,a=e.routes?.[`oidc.connect.${n}`],c={google:rt,facebook:et,orcid:ot}[n],s={google:Le(w,{children:["Connect ",Le("b",{children:"Google"})]}),facebook:Le(w,{children:["Connect ",Le("b",{children:"Facebook"})]}),orcid:Le(w,{children:["Connect ",Le("b",{children:"ORCID"})]})}[n];return Le(w,{children:r?Le("div",{className:"border rounded-md px-3 py-2 flex flex-row items-center gap-x-3",children:[Le(c,{}),Le("span",{className:"grow",children:["Connected:"," ",Le("a",{target:"_blank",rel:"noreferrer",class:"font-bold",href:l,"data-testid":`connect-account-link-${n}`,children:i||o})]}),Le(nt,{csrfToken:e.csrfToken,action:e.routes.identity_delete,"data-testid":`remove-account-form-${n}`,children:[Le("input",{type:"hidden",name:"provider",value:n}),Le("input",{type:"hidden",name:"provider_unique_id",value:o}),Le(Je,{type:"submit",size:"sm",children:"Remove"})]})]}):Le("a",{href:a,className:"border rounded-md p-3 flex flex-row items-center gap-x-3","data-testid":`connect-account-link-${n}`,children:[Le(c,{}),Le("span",{className:"grow",children:s}),Le(Ge,{className:"w-[20px] h-[20px]"})]})})}function pt({config:e}){return e.features.log_in_with_google||e.features.log_in_with_facebook||e.features.log_in_with_orcid?Le(w,{children:[Le(ut,{text:"Connect your account"}),Le("p",{className:"mb-9",children:"Connecting an account enables you to log in to Hypothesis without your Hypothesis password."}),Le("div",{class:"mx-auto max-w-[400px] flex flex-col gap-y-3",children:[e.features.log_in_with_google&&Le(_t,{config:e,provider:"google"}),e.features.log_in_with_facebook&&Le(_t,{config:e,provider:"facebook"}),e.features.log_in_with_orcid&&Le(_t,{config:e,provider:"orcid"})]})]}):null}function mt(){const e=se(Kn);return Le(w,{children:[Le(Xn,{}),Le(ht,{config:e}),Le(ft,{config:e}),Le(pt,{config:e}),Le("div",{className:"border-t mt-8 py-2 flex flex-row justify-end",children:Le(vn,{href:Jn.accountDelete,underline:"always",variant:"text",children:"Delete your account"})})]})}function vt({children:e,classes:n}){return Le("div",{className:Me("text-grey-7 text-sm/relaxed",n),children:e})}function gt({title:e,value:n}){const[t,r]=re(!1);return oe((()=>{if(!t)return()=>{};const e=setTimeout((()=>r(!1)),1e3);return()=>clearTimeout(e)}),[t]),Le(Xe,{icon:t?We:$e,title:e,onClick:async()=>{await navigator.clipboard.writeText(n),r(!0)},variant:"dark"})}function bt({children:e,...n}){return Le("p",{className:"my-2",...n,children:e})}function yt(){const e=se(Kn),n=e.token,t=de();return Le(w,{children:[Le(Xn,{}),Le(bt,{children:["API tokens can be used to access your data via the"," ",Le(vn,{target:"_blank",href:"https://h.readthedocs.io/en/latest/api/",underline:"always",children:"Hypothesis API"}),"."]}),Le(fn,{status:"notice",classes:"my-4",children:[Le("b",{children:"Keep your API tokens safe"})," as they can be used to access all data in your account."]}),Le(nt,{classes:"mt-8",csrfToken:e.csrfToken,children:[n&&Le(w,{children:[Le(at,{htmlFor:t,text:"Current API token"}),Le(Ye,{children:[Le(un,{id:t,name:"token",readonly:!0,value:n,classes:"font-mono"}),Le(gt,{title:"Copy token",value:n})]})]}),Le(tt,{submitLabel:n?"Recreate API token":"Create API token"})]})]})}function wt({children:e,classes:n,center:t,variant:r="default"}){return Le("h1",{className:Me("text-xl/none",t&&"text-center","default"===r&&"my-8",n),children:e})}function xt({action:e}){const n=se(Kn);return n.urls?.login?Le("footer",{className:Me({"fixed bottom-0 left-0 right-0 p-4":n.forOAuth,"my-8 py-4":!n.forOAuth,"border-t border-t-text-grey-6":!0}),children:["login"===e&&Le(w,{children:["Already have an account?"," ",Le(vn,{"data-testid":"login-link",underline:"always",href:n.urls.login.username_or_email,variant:"text",children:"Log in"})]}),"signup"===e&&Le(w,{children:["Don","'","t have a Hypothesis account?"," ",Le(vn,{"data-testid":"signup-link",underline:"always",href:n.urls.signup,variant:"text",children:"Sign up"})]})]}):null}function kt({routerLink:e,href:n,providerIcon:t,children:r}){const o=e?qe:Ge;return Le(e?$n:"a",{href:n,className:"border rounded-md p-3 flex flex-row items-center gap-x-3",children:[t,Le("span",{className:"grow",children:r}),Le(o,{className:"w-[20px] h-[20px]"})]})}const Ct={google:{text:Le(w,{children:["Continue with ",Le("b",{children:"Google"})]}),Icon:rt},facebook:{text:Le(w,{children:["Continue with ",Le("b",{children:"Facebook"})]}),Icon:et},orcid:{text:Le(w,{children:["Continue with ",Le("b",{children:"ORCID"})]}),Icon:ot}};function Nt({provider:e,href:n}){const t=Ct[e];return Le(kt,{href:n,providerIcon:Le(t.Icon,{className:"inline"}),children:t.text})}function Lt({enableSocialLogin:e}){const n=se(Kn),t=n.form,r=Qn(t,"username",""),o=Qn(t,"password",""),i=n.forOAuth?Le(w,{children:["Log in to Hypothesis"," ",Le(Ke,{className:"inline ml-1 w-[28px] h-[28px]"})]}):"Log in",l=Boolean(r.error)||0===r.value.length;return Le(w,{children:[Le(wt,{center:n.forOAuth,children:i}),Le("div",{className:"mx-auto max-w-[400px] flex flex-col gap-y-3 items-stretch",children:[Le(nt,{csrfToken:n.
6csrfToken,center:!1,children:[Le(st,{type:"input",name:"username",value:r.value,fieldError:r.error,onChangeValue:r.update,label:"Username or email",autofocus:l,required:!0,showRequired:!1}),Le(st,{type:"input",inputType:"password",name:"password",value:o.value,fieldError:o.error,onChangeValue:o.update,label:"Password",autofocus:!l,required:!0,showRequired:!1}),Le("div",{className:"pt-2 flex flex-row items-center",children:[Le(vn,{href:Jn.forgotPassword,underline:"always",variant:"text-light","data-testid":"forgot-password-link",children:"Forgot your password?"}),Le("div",{className:"grow"}),Le(Je,{type:"submit",variant:"primary","data-testid":"submit-button",children:"Log in"})]})]}),e&&n.urls?.login&&Le(w,{children:[Le("div",{className:"self-center uppercase",children:"or"}),n.urls.login.google&&Le(Nt,{provider:"google",href:n.urls.login.google}),n.urls.login.facebook&&Le(Nt,{provider:"facebook",href:n.urls.login.facebook}),n.urls.login.orcid&&Le(Nt,{provider:"orcid",href:n.urls.login.orcid})]})]}),Le(xt,{action:"signup"})]})}function Tt({description:e,children:n,error:t="",...r}){const o=de();return Le("div",{children:[Le(cn,{...r,"aria-describedby":e?o:void 0,children:n}),e&&Le("div",{"data-testid":"description",id:o,className:"text-grey-6 mt-1 ml-5",children:e}),t&&Le("div",{className:"mt-1",children:Le(it,{message:t})})]})}function Ht(){const e=se(Kn),n=e.form,t=Qn(n,"reply",!0),r=Qn(n,"mention",!0),o=Qn(n,"moderation",!0),i=e=>({name:e.name,checked:e.value,value:"true",onChange:n=>{e.update(n.target.checked)}});return e.hasEmail?Le(w,{children:[Le(Xn,{}),Le(nt,{csrfToken:e.csrfToken,children:[Le("p",{children:"Email me when someone:"}),Le(Tt,{"data-testid":"reply-checkbox",...i(t),children:"Replies to my annotations"}),Le(Tt,{"data-testid":"mention-checkbox",...i(r),children:"Mentions me in an annotation"}),Le(Tt,{"data-testid":"moderation-checkbox",...i(o),children:"Moderates my annotations"}),Le(tt,{})]})]}):Le(fn,{children:["Notifications will not be sent because your account does not have an email address. You can add an email address in"," ",Le(vn,{underline:"always",href:Jn.accountSettings,children:"account settings"}),"."]})}function St(){const e=se(Kn),n=e.form,t=Qn(n,"display_name",""),r=Qn(n,"description",""),o=Qn(n,"location",""),i=Qn(n,"link",""),l=Qn(n,"orcid",""),a=e=>({name:e.name,value:e.value,fieldError:e.error,onChangeValue:e.update,onCommitValue:e.commit});return Le(w,{children:[Le(Xn,{}),Le(nt,{csrfToken:e.csrfToken,children:[Le(st,{label:"Display name",maxLength:30,...a(t)}),Le(st,{type:"textarea",label:"Description",maxLength:250,...a(r)}),Le(st,{label:"Location",...a(o)}),Le(st,{label:"Link",...a(i)}),Le(st,{label:"ORCID Identifier",...a(l)}),Le(tt,{})]})]})}function Pt({title:e,message:n,confirmAction:t,onConfirm:r,onCancel:o}){return Le(ln,{buttons:Le(w,{children:[Le(Je,{"data-testid":"cancel-button",onClick:o,children:"Cancel"}),Le(Je,{variant:"primary","data-testid":"confirm-button",onClick:r,children:t})]}),title:e,onClose:o,children:n})}function Mt({children:e}){const[n,t]=Pn(),[r,o]=re(null),i=ce((e=>{t(e)}),[t]),l=ce((()=>[n,i]),[n,i]);return Le(w,{children:[Le(Wn,{hook:l,children:e}),r&&Le(Pt,{title:"Leave page?",onCancel:()=>o(null),onConfirm:()=>{o(null),t(r)},confirmAction:"Leave page",message:"This will lose unsaved changes."})]})}function Et({provider:e,identity:n}){return Le("div",{"data-testid":"id-badge",className:"border rounded-md p-3 flex flex-row items-center gap-x-3 max-w-[400px] mx-auto",children:["facebook"===e&&Le(et,{className:"inline","aria-label":"Facebook icon"}),"google"===e&&Le(rt,{className:"inline","aria-label":"Google icon"}),"orcid"===e&&Le("a",{href:"https://orcid.org",target:"_blank",rel:"noreferrer",children:Le(ot,{className:"inline","aria-label":"ORCID icon"})})," ",Le("span",{className:"grow",children:["Connected: ",Le("b",{"data-testid":"connected-id",children:n})]}),Le(We,{className:"w-[20px] h-[20px]"})]})}function At({idProvider:e,location_:n=location}){const t=se(Kn),[r,o]=re(!1),[i,l]=re(null),a=t.form,c=Qn(a,"username","",{validate:(e,n)=>e.match(/^[A-Za-z0-9_.]*$/)?n&&(e.startsWith(".")||e.endsWith("."))?"May not start or end with a period.":void 0:"Must have only letters, numbers, periods and underscores."}),s=Qn(a,"email",""),d=Qn(a,"password",""),u=Qn(a,"privacy_accepted",!1),h=Qn(a,"comms_opt_in",!1);return ie((()=>{const e=new URL(n.href).searchParams.get("idinfo");e&&l(e)}
6),[n]),e&&!i?Le("div",{"data-testid":"error",children:"Social login identity missing. Please try again."}):Le(w,{children:[Le(wt,{center:t.forOAuth,children:"Sign up for Hypothesis"}),Le(nt,{csrfToken:t.csrfToken,onSubmit:()=>o(!0),children:[e&&t.identity&&Le(Et,{provider:e,identity:t.identity.email||t.identity.provider_unique_id}),i&&Le("input",{type:"hidden",name:"idinfo",value:i}),Le(st,{type:"input",name:"username",value:c.value,fieldError:c.error,onChangeValue:c.update,onCommitValue:c.commit,label:"Username",minLength:3,maxLength:30,autofocus:!0,required:!0,showRequired:!1}),!e&&Le(st,{type:"input",name:"email",value:s.value,fieldError:s.error,onChangeValue:s.update,label:"Email address",required:!0,showRequired:!1}),!e&&Le(st,{type:"input",inputType:"password",name:"password",value:d.value,fieldError:d.error,onChangeValue:d.update,label:"Password",minLength:8,required:!0,showRequired:!1}),e&&Le("div",{className:"mt-3"}),Le(Tt,{"data-testid":"privacy-accepted",checked:u.value,name:"privacy_accepted",value:"true",onChange:e=>{u.update(e.target.checked)},error:u.error,required:!0,children:["I have read and agree to the"," ",Le("a",{className:"link",href:"https://web.hypothes.is/privacy/",children:"privacy policy"}),","," ",Le("a",{className:"link",href:"https://web.hypothes.is/terms-of-service/",children:"terms of service"}),", and"," ",Le("a",{className:"link",href:"https://web.hypothes.is/community-guidelines/",children:"community guidelines"}),"."]}),Le(Tt,{"data-testid":"comms-opt-in",checked:h.value,name:"comms_opt_in",value:"true",onChange:e=>{h.update(e.target.checked)},children:"I would like to receive news about annotation and Hypothesis."}),Le(tt,{disableSubmit:r,submitLabel:"Sign up"})]}),Le(xt,{action:"login"})]})}function It(){const e=se(Kn),n=e.urls?.login;return Le(w,{children:[Le("div",{className:"flex flex-col text-md",children:[Le(wt,{center:e.forOAuth,children:"Sign up for Hypothesis"}),Le("div",{className:"mt-[40px] self-center flex flex-col gap-y-3 w-[400px]",children:[Le(kt,{routerLink:!0,href:Jn.signupWithEmail,providerIcon:Le(Ze,{className:"inline w-[24px] h-[24px]"}),children:["Sign up with ",Le("b",{children:"email"})]}),n&&Le(w,{children:[Le("div",{className:"self-center uppercase",children:"or"}),n.google&&Le(Nt,{provider:"google",href:n.google}),n.facebook&&Le(Nt,{provider:"facebook",href:n.facebook}),n.orcid&&Le(Nt,{provider:"orcid",href:n.orcid})]})]})]}),Le(xt,{action:"login"})]})}function Rt({config:e}){const n=ae((()=>function(e){return(e.flashMessages??[]).map((e=>({...e,autoDismiss:!1})))}(e)),[e]),{toastMessages:t,dismissToastMessage:r}=function(e=[]){const[n,t]=re(e.map(Ce));return{toastMessages:n,appendToastMessage:ce((e=>{t((n=>[...n,Ce(e)]))}),[]),dismissToastMessage:ce((e=>t((n=>n.filter((n=>n.id!==e))))),[])}}(n),o=Boolean(e.features.log_in_with_orcid||e.features.log_in_with_google||e.features.log_in_with_facebook);return Le(vt,{children:[Le(mn,{messages:t,onMessageDismiss:r}),Le(Kn.Provider,{value:e,children:Le(Mt,{children:Le(Gn,{children:[Le(Bn,{path:Jn.login,children:Le(Lt,{enableSocialLogin:o})}),Le(Bn,{path:Jn.signup,children:[o&&Le(It,{}),!o&&Le(At,{})]}),Le(Bn,{path:Jn.signupWithEmail,children:Le(At,{})}),Le(Bn,{path:Jn.signupWithFacebook,children:Le(At,{idProvider:"facebook"})}),Le(Bn,{path:Jn.signupWithGoogle,children:Le(At,{idProvider:"google"})}),Le(Bn,{path:Jn.signupWithORCID,children:Le(At,{idProvider:"orcid"})}),Le(Bn,{path:Jn.accountSettings,children:Le(mt,{})}),Le(Bn,{path:Jn.profile,children:Le(St,{})}),Le(Bn,{path:Jn.accountDeveloper,children:Le(yt,{})}),Le(Bn,{path:Jn.accountNotifications,children:Le(Ht,{})}),Le(Bn,{children:Le("h1",{"data-testid":"unknown-route",children:"Page not found"})})]})})})]})}!function(){const t=function(e){const n=document.querySelector(e);if(!n)throw new Error(`Unable to render UI because container "${e}" was not found`);return n}("#js-app-container");!function(t,r,o){var i,l,a;r==document&&(r=document.documentElement),n.__&&n.__(t,r),i=r.__k,l=[],a=[],A(r,t=r.__k=b(w,null,[t]),i||f,f,r.namespaceURI,i?null:r.firstChild?e.call(r.childNodes):null,l,
6i?i.__e:r.firstChild,!1,a),R(l,t,a)}(Le(Rt,{config:function(){try{return JSON.parse(document.querySelector(".js-config").textContent)}catch{throw new Error("Failed to parse frontend configuration")}}()}),t)}();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.