hypothesis 1.1116.0 → 1.1117.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/boot.js +1 -1
- package/build/manifest.json +6 -6
- package/build/scripts/annotator.bundle.js +17 -16
- package/build/scripts/annotator.bundle.js.map +1 -1
- package/build/scripts/sidebar.bundle.js +41 -40
- package/build/scripts/sidebar.bundle.js.map +1 -1
- package/build/scripts/ui-playground.bundle.js +15 -15
- package/build/scripts/ui-playground.bundle.js.map +1 -1
- package/package.json +6 -6
package/build/boot.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){"use strict";function s(s){s.setAttribute("data-hypothesis-asset","")}function t(t,e){var n=t.createElement("link");n.rel="stylesheet",n.type="text/css",n.href=e,s(n),t.head.appendChild(n)}function e(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.esModule,o=void 0===r||r,a=n.forceReload,i=void 0!==a&&a,l=t.createElement("script");o&&(l.type="module"),i&&(e+="#ts=".concat(Date.now())),l.src=e,l.async=!1,s(l),t.head.appendChild(l)}function n(t,e,n,r){var o=t.createElement("link");o.rel=e,o.href=r,o.type="application/annotator+".concat(n),s(o),t.head.appendChild(o)}function r(t,e,n){var r=t.createElement("link");r.rel="preload",r.as=e,r.href=n,"fetch"===e&&(r.crossOrigin="anonymous"),s(r),t.head.appendChild(r)}function o(s,t){return s.assetRoot+"build/"+s.manifest[t]}function a(s){var t=s.match(/(https?):\/\/([^:/]+)/);return t?{protocol:t[1],hostname:t[2]}:null}function i(){var s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=s.currentScript;return t?a(t.src):null}function l(s){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;if(-1===s.indexOf("{"))return s;var e=i(t);if(!e)throw new Error("Could not process URL template because script origin is unknown");return s=(s=s.replace("{current_host}",e.hostname)).replace("{current_scheme}",e.protocol)}var c={"scripts/annotator.bundle.js":"scripts/annotator.bundle.js?
|
|
1
|
+
!function(){"use strict";function s(s){s.setAttribute("data-hypothesis-asset","")}function t(t,e){var n=t.createElement("link");n.rel="stylesheet",n.type="text/css",n.href=e,s(n),t.head.appendChild(n)}function e(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.esModule,o=void 0===r||r,a=n.forceReload,i=void 0!==a&&a,l=t.createElement("script");o&&(l.type="module"),i&&(e+="#ts=".concat(Date.now())),l.src=e,l.async=!1,s(l),t.head.appendChild(l)}function n(t,e,n,r){var o=t.createElement("link");o.rel=e,o.href=r,o.type="application/annotator+".concat(n),s(o),t.head.appendChild(o)}function r(t,e,n){var r=t.createElement("link");r.rel="preload",r.as=e,r.href=n,"fetch"===e&&(r.crossOrigin="anonymous"),s(r),t.head.appendChild(r)}function o(s,t){return s.assetRoot+"build/"+s.manifest[t]}function a(s){var t=s.match(/(https?):\/\/([^:/]+)/);return t?{protocol:t[1],hostname:t[2]}:null}function i(){var s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=s.currentScript;return t?a(t.src):null}function l(s){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;if(-1===s.indexOf("{"))return s;var e=i(t);if(!e)throw new Error("Could not process URL template because script origin is unknown");return s=(s=s.replace("{current_host}",e.hostname)).replace("{current_scheme}",e.protocol)}var c={"scripts/annotator.bundle.js":"scripts/annotator.bundle.js?6f92c2","styles/annotator.css":"styles/annotator.css?ee3462","styles/annotator.css.map":"styles/annotator.css.map?82cd76","styles/highlights.css":"styles/highlights.css?5dd56a","styles/highlights.css.map":"styles/highlights.css.map?5d963f","styles/katex.min.css":"styles/katex.min.css?817f75","styles/katex.min.css.map":"styles/katex.min.css.map?42d80c","styles/pdfjs-overrides.css":"styles/pdfjs-overrides.css?c95edf","styles/pdfjs-overrides.css.map":"styles/pdfjs-overrides.css.map?1d8ac6","styles/sidebar.css":"styles/sidebar.css?f81607","styles/sidebar.css.map":"styles/sidebar.css.map?8234f5","styles/ui-playground.css":"styles/ui-playground.css?0d14bc","styles/ui-playground.css.map":"styles/ui-playground.css.map?f09223","scripts/annotator.bundle.js.map":"scripts/annotator.bundle.js.map?4e60b7","scripts/sidebar.bundle.js":"scripts/sidebar.bundle.js?bcc5bf","scripts/ui-playground.bundle.js":"scripts/ui-playground.bundle.js?298f4d","scripts/ui-playground.bundle.js.map":"scripts/ui-playground.bundle.js.map?dfaf58","scripts/sidebar.bundle.js.map":"scripts/sidebar.bundle.js.map?d6c88a"};if(function(){var s=[function(){return Promise.resolve()},function(){return new Map},function(){return new URL(document.location.href)},function(){return new Request("https://hypothes.is")},function(){return Element.prototype.attachShadow},function(){return CSS.supports("display: grid")},function(){return document.evaluate("/html/body",document,null,XPathResult.ANY_TYPE,null),!0}];try{return s.every((function(s){return s()}))}catch(s){return!1}}()){var p=function(s){for(var t={},e=s.querySelectorAll("script.js-hypothesis-config"),n=0;n<e.length;n++){var r=void 0;try{r=JSON.parse(e[n].textContent||"")}catch(s){console.warn("Could not parse settings from js-hypothesis-config tags",s),r={}}Object.assign(t,r)}return t}(document),u=l(p.assetRoot||"https://cdn.hypothes.is/hypothesis/1.1117.0/");if(document.querySelector("hypothesis-app")){!function(s,n){r(s,"fetch",n.apiUrl),r(s,"fetch",n.apiUrl+"links");for(var a=0,i=["scripts/sidebar.bundle.js"];a<i.length;a++)e(s,o(n,i[a]),{esModule:!0});for(var l=0,c=["styles/katex.min.css","styles/sidebar.css"];l<c.length;l++)t(s,o(n,c[l]))}(document,{assetRoot:u,manifest:c,apiUrl:p.apiUrl})}else{var d=p,h=l(d.notebookAppUrl||"https://hypothes.is/notebook"),y=l(d.sidebarAppUrl||"https://hypothes.is/app.html");!function(s,a){if(!s.querySelector('link[type="application/annotator+html"]')){n(s,"sidebar","html",a.sidebarAppUrl),n(s,"notebook","html",a.notebookAppUrl),r(s,"style",o(a,"styles/annotator.css")),n(s,"hypothesis-client","javascript",a.assetRoot+"build/boot.js");for(var i=0,l=["scripts/annotator.bundle.js"];i<l.length;i++)e(s,o(a,l[i]),{esModule:!1});var c=[];void 0!==window.PDFViewerApplication&&c.push("styles/pdfjs-overrides.css"),c.push("styles/highlights.css");for(var p=0,u=c;p<u.length;p++)t(s,o(a,u[p]))}}(document,{assetRoot:u,manifest:c,notebookAppUrl:h,sidebarAppUrl:y})}}else console.warn("The Hypothesis annotation tool is not supported in this browser. See https://web.hypothes.is/help/which-browsers-are-supported-by-hypothesis/.")}();
|
package/build/manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"scripts/annotator.bundle.js": "scripts/annotator.bundle.js?
|
|
2
|
+
"scripts/annotator.bundle.js": "scripts/annotator.bundle.js?6f92c2",
|
|
3
3
|
"styles/annotator.css": "styles/annotator.css?ee3462",
|
|
4
4
|
"styles/annotator.css.map": "styles/annotator.css.map?82cd76",
|
|
5
5
|
"styles/highlights.css": "styles/highlights.css?5dd56a",
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
"styles/sidebar.css.map": "styles/sidebar.css.map?8234f5",
|
|
13
13
|
"styles/ui-playground.css": "styles/ui-playground.css?0d14bc",
|
|
14
14
|
"styles/ui-playground.css.map": "styles/ui-playground.css.map?f09223",
|
|
15
|
-
"scripts/annotator.bundle.js.map": "scripts/annotator.bundle.js.map?
|
|
16
|
-
"scripts/sidebar.bundle.js": "scripts/sidebar.bundle.js?
|
|
17
|
-
"scripts/ui-playground.bundle.js": "scripts/ui-playground.bundle.js?
|
|
18
|
-
"scripts/ui-playground.bundle.js.map": "scripts/ui-playground.bundle.js.map?
|
|
19
|
-
"scripts/sidebar.bundle.js.map": "scripts/sidebar.bundle.js.map?
|
|
15
|
+
"scripts/annotator.bundle.js.map": "scripts/annotator.bundle.js.map?4e60b7",
|
|
16
|
+
"scripts/sidebar.bundle.js": "scripts/sidebar.bundle.js?bcc5bf",
|
|
17
|
+
"scripts/ui-playground.bundle.js": "scripts/ui-playground.bundle.js?298f4d",
|
|
18
|
+
"scripts/ui-playground.bundle.js.map": "scripts/ui-playground.bundle.js.map?dfaf58",
|
|
19
|
+
"scripts/sidebar.bundle.js.map": "scripts/sidebar.bundle.js.map?d6c88a"
|
|
20
20
|
}
|
|
@@ -3,21 +3,22 @@ r(t.target)&&(e||s(t.target))&&a(t.target)}function d(t){r(t.target)&&(t.target.
|
|
|
3
3
|
document.removeEventListener("touchmove",m),document.removeEventListener("touchstart",m),document.removeEventListener("touchend",m)}function m(t){t.target.nodeName&&"html"===t.target.nodeName.toLowerCase()||(e=!1,g())}document.addEventListener("keydown",c,!0),document.addEventListener("mousedown",h,!0),document.addEventListener("pointerdown",h,!0),document.addEventListener("touchstart",h,!0),document.addEventListener("visibilitychange",f,!0),p(),t.addEventListener("focus",u,!0),t.addEventListener("blur",d,!0),t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host?t.host.setAttribute("data-js-focus-visible",""):t.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if("undefined"!=typeof window&&"undefined"!=typeof document){var e;window.applyFocusVisiblePolyfill=t;try{e=new CustomEvent("focus-visible-polyfill-ready")}catch(t){
|
|
4
4
|
(e=document.createEvent("CustomEvent")).initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(e)}"undefined"!=typeof document&&t(document)}();var e,n={exports:{}};e=n,function(){var t={}.hasOwnProperty;function n(){for(var e=[],i=0;i<arguments.length;i++){var o=arguments[i];if(o){var r=typeof o;if("string"===r||"number"===r)e.push(o);else if(Array.isArray(o)){if(o.length){var s=n.apply(null,o);s&&e.push(s)}}else if("object"===r){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){e.push(o.toString());continue}for(var a in o)t.call(o,a)&&o[a]&&e.push(a)}}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n}();var i,o,r,s,a,l,c=n.exports,h={},u=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function f(t,e){for(var n in e)t[n]=e[n];return t}function p(t){var e=t.parentNode;e&&e.removeChild(t)}function g(t,e,n,i,s){var a={type:t,props:e,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,
|
|
5
5
|
__h:null,constructor:void 0,__v:null==s?++r:s};return null==s&&null!=o.vnode&&o.vnode(a),a}function m(t){return t.children}function _(t,e){this.props=t,this.context=e}function v(t,e){if(null==e)return t.__?v(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?v(t):null}function w(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return w(t)}}function y(t){(!t.__d&&(t.__d=!0)&&s.push(t)&&!b.__r++||a!==o.debounceRendering)&&((a=o.debounceRendering)||setTimeout)(b)}function b(){for(var t;b.__r=s.length;)t=s.sort((function(t,e){return t.__v.__b-e.__v.__b})),s=[],t.some((function(t){var e,n,i,o,r,s;t.__d&&(r=(o=(e=t).__v).__e,(s=e.__P)&&(n=[],(i=f({},o)).__v=o.__v+1,T(s,o,i,e.__n,void 0!==s.ownerSVGElement,null!=o.__h?[r]:null,n,null==r?v(o):r,o.__h),R(n,o),o.__e!=r&&w(o)))}))}function C(t,e,n,i,o,r,s,a,l,c){
|
|
6
|
-
var d,f,p,_,w,y,b,C=i&&i.__k||u,E=C.length;for(n.__k=[],d=0;d<e.length;d++)if(null!=(_=n.__k[d]=null==(_=e[d])||"boolean"==typeof _?null:"string"==typeof _||"number"==typeof _||"bigint"==typeof _?g(null,_,null,null,_):Array.isArray(_)?g(m,{children:_},null,null,null):_.__b>0?g(_.type,_.props,_.key,_.ref?_.ref:null,_.__v):_)){if(_.__=n,_.__b=n.__b+1,null===(p=C[d])||p&&_.key==p.key&&_.type===p.type)C[d]=void 0;else for(f=0;f<E;f++){if((p=C[f])&&_.key==p.key&&_.type===p.type){C[f]=void 0;break}p=null}T(t,_,p=p||h,o,r,s,a,l,c),w=_.__e,(f=_.ref)&&p.ref!=f&&(b||(b=[]),p.ref&&b.push(p.ref,null,_),b.push(f,_.__c||w,_)),null!=w?(null==y&&(y=w),"function"==typeof _.type&&_.__k===p.__k?_.__d=l=x(_,l,t):l=S(t,_,p,C,w,l),"function"==typeof n.type&&(n.__d=l)):l&&p.__e==l&&l.parentNode!=t&&(l=v(p))}for(n.__e=y,d=E;d--;)null!=C[d]&&
|
|
7
|
-
|
|
8
|
-
if(o)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null
|
|
9
|
-
f(u.__s,A.getDerivedStateFromProps(y,u.__s))),p=u.props,g=u.state,d)null==A.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==A.getDerivedStateFromProps&&y!==p&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(y,x),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(y,u.__s,x)||e.__v===n.__v){u.props=y,u.state=u.__s,e.__v!==n.__v&&(u.__d=!1),u.__v=e,e.__e=n.__e,e.__k=n.__k,e.__k.forEach((function(t){t&&(t.__=e)})),u.__h.length&&a.push(u);break t}null!=u.componentWillUpdate&&u.componentWillUpdate(y,u.__s,x),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(p,g,v)}))}if(u.context=x,u.props=y,u.__v=e,u.__P=t,S=o.__r,E=0,"prototype"in A&&A.prototype.render)u.state=u.__s,u.__d=!1,S&&S(e),h=u.render(u.props,u.state,u.context);else do{u.__d=!1,S&&S(e),h=u.render(u.props,u.state,u.context),u.state=u.__s
|
|
10
|
-
null!=u.getChildContext&&(i=f(f({},i),u.getChildContext())),d||null==u.getSnapshotBeforeUpdate||(v=u.getSnapshotBeforeUpdate(p,g)),k=null!=h&&h.type===m&&null==h.key?h.props.children:h,C(t,Array.isArray(k)?k:[k],e,n,i,r,s,a,l,c),u.base=e.__e,e.__h=null,u.__h.length&&a.push(u),w&&(u.__E=u.__=null),u.__e=!1}else null==s&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=L(n.__e,e,n,i,r,s,a,c);(h=o.diffed)&&h(e)}catch(t){e.__v=null,(c||null!=s)&&(e.__e=l,e.__h=!!c,s[s.indexOf(l)]=null),o.__e(t,e,n)}}function R(t,e){o.__c&&o.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){o.__e(t,e.__v)}}))}function L(t,e,n,o,r,s,a,l){var c,u,d,f=n.props,g=e.props,m=e.type,_=0;if("svg"===m&&(r=!0),null!=s)for(;_<s.length;_++)if((c=s[_])&&"setAttribute"in c==!!m&&(m?c.localName===m:3===c.nodeType)){t=c,s[_]=null;break}if(null==t){if(null===m)return document.createTextNode(g)
|
|
11
|
-
if(null===m)f===g||l&&t.data===g||(t.data=g);else{if(s=s&&i.call(t.childNodes),u=(f=n.props||h).dangerouslySetInnerHTML,d=g.dangerouslySetInnerHTML,!l){if(null!=s)for(f={},_=0;_<t.attributes.length;_++)f[t.attributes[_].name]=t.attributes[_].value;(d||u)&&(d&&(u&&d.__html==u.__html||d.__html===t.innerHTML)||(t.innerHTML=d&&d.__html||""))}if(function(t,e,n,i,o){var r;for(r in n)"children"===r||"key"===r||r in e||k(t,r,null,n[r],i);for(r in e)o&&"function"!=typeof e[r]||"children"===r||"key"===r||"value"===r||"checked"===r||n[r]===e[r]||k(t,r,e[r],n[r],i)}(t,g,f,r,l),d)e.__k=[];else if(_=e.props.children,C(t,Array.isArray(_)?_:[_],e,n,o,r&&"foreignObject"!==m,s,a,s?s[0]:n.__k&&v(n,0),l),null!=s)for(_=s.length;_--;)null!=s[_]&&p(s[_]);l||("value"in g&&void 0!==(_=g.value)&&(_!==t.value||"progress"===m&&!_||"option"===m&&_!==f.value)&&k(t,"value",_,f.value,!1),
|
|
12
|
-
}catch(t){o.__e(t,n)}}function M(t,e,n){var i,r;if(o.unmount&&o.unmount(t),(i=t.ref)&&(i.current&&i.current!==t.__e||P(i,null,e)),null!=(i=t.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(t){o.__e(t,e)}i.base=i.__P=null,t.__c=void 0}if(i=t.__k)for(r=0;r<i.length;r++)i[r]&&M(i[r],e,"function"!=typeof t.type);n||null==t.__e||p(t.__e),t.__=t.__e=t.__d=void 0}function O(t,e,n){return this.constructor(t,n)}function I(t,e,n){var r,s,a;o.__&&o.__(t,e),s=(r="function"==typeof n)?null:n&&n.__k||e.__k,a=[],T(e,t=(!r&&n||e).__k=function(t,e,n){var o,r,s,a={};for(s in e)"key"==s?o=e[s]:"ref"==s?r=e[s]:a[s]=e[s];if(arguments.length>2&&(a.children=arguments.length>3?i.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(s in t.defaultProps)void 0===a[s]&&(a[s]=t.defaultProps[s]);return g(t,a,o,r,null)
|
|
13
|
-
Consumer:function(t,e){return t.children(e)},Provider:function(t){var n,i;return this.getChildContext||(n=[],(i={})[e]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&n.some(y)},this.sub=function(t){n.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n.splice(n.indexOf(t),1),e&&e.call(t)}}),t.children}};return n.Provider.__=n.Consumer.contextType=n}i=u.slice,o={__e:function(t,e,n,i){for(var o,r,s;e=e.__;)if((o=e.__c)&&!o.__)try{if((r=o.constructor)&&null!=r.getDerivedStateFromError&&(o.setState(r.getDerivedStateFromError(t)),s=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(t,i||{}),s=o.__d),s)return o.__E=o}catch(e){t=e}throw t}},r=0,_.prototype.setState=function(t,e){var n
|
|
14
|
-
t&&this.__h.push(t),y(this))},_.prototype.render=m,s=[],b.__r=0,l=0;var H,V,D,F,q=0,U=[],z=[],W=o.__b,$=o.__r,j=o.diffed,X=o.__c,Y=o.unmount;function Z(t,e){o.__h&&o.__h(V,t,q||e),q=0;var n=V.__H||(V.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({__V:z}),n.__[t]}function G(t){return q=1,function(t,e,n){var i=Z(H++,2);if(i.t=t,!i.__c&&(i.__=[n?n(e):st(void 0,e),function(t){var e=i.__N?i.__N[0]:i.__[0],n=i.t(e,t);e!==n&&(i.__N=[n,i.__[1]],i.__c.setState({}))}],i.__c=V,!V.u)){V.u=!0;var o=V.shouldComponentUpdate;V.shouldComponentUpdate=function(t,e,n){if(!i.__c.__H)return!0;var r=i.__c.__H.__.filter((function(t){return t.__c}));if(r.every((function(t){return!t.__N})))return!o||o.call(this,t,e,n);var s=!1;return r.forEach((function(t){if(t.__N){var e=t.__[0]
|
|
15
|
-
n.i=e,V.__h.push(n))}function J(t){return q=5,function(t,e){var n=Z(H++,7);return rt(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}((function(){return{current:t}}),[])}function tt(){for(var t;t=U.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(it),t.__H.__h.forEach(ot),t.__H.__h=[]}catch(e){t.__H.__h=[],o.__e(e,t.__v)}}o.__b=function(t){"function"!=typeof t.type||t.
|
|
16
|
-
t.__h.forEach(it),t.__h=t.__h.filter((function(t){return!t.__||ot(t)}))}catch(n){e.some((function(t){t.__h&&(t.__h=[])})),e=[],o.__e(n,t.__v)}})),X&&X(t,e)},o.unmount=function(t){Y&&Y(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{it(t)}catch(t){e=t}})),n.__H=void 0,e&&o.__e(e,n.__v))};var et="function"==typeof requestAnimationFrame;function nt(t){var e,n=function(){clearTimeout(i),et&&cancelAnimationFrame(e),setTimeout(t)},i=setTimeout(n,100);et&&(e=requestAnimationFrame(n))}function it(t){var e=V,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),V=e}function ot(t){var e=V;t.__c=t.__(),V=e}function rt(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function st(t,e){
|
|
17
|
-
;if("function"==typeof t&&(s=t.defaultProps))for(a in s)void 0===l[a]&&(l[a]=s[a]);return o.vnode&&o.vnode(c),c}const ct=new Map;function ht({name:t,className:e="",inline:n=!1,title:i=""}){const o=ct.get(t);if(!o)throw new Error(`Icon "${t.toString()}" is not registered`);const r=J();Q((()=>{const t=r.current.querySelector("svg");t&&t.setAttribute("class",e)}),[e,o]);const s={};return i&&(s.title=i),lt("span",{className:c("Hyp-SvgIcon",{"Hyp-SvgIcon--inline":n}),dangerouslySetInnerHTML:{__html:o},ref:r,...s},void 0,!1,{fileName:"/home/runner/work/frontend-shared/frontend-shared/src/components/SvgIcon.js",lineNumber:69,columnNumber:5})}function ut(t,e){const n="string"==typeof t?Symbol(t):t;return ct.set(n,e),n}
|
|
18
|
-
;const f=null!==(d=null==u?void 0:u.role)&&void 0!==d?d:"button",p={"aria-label":u.title};return"tab"===f?p["aria-selected"]=l:(p["aria-pressed"]=l,p["aria-expanded"]=a),lt("button",{ref:t,className:c(n,`${n}--${r}`,`${n}--${s}`,{[`${n}--icon-${o}`]:i},e),type:h,...p,...u},void 0,!1,{fileName:dt,lineNumber:82,columnNumber:5})}function pt({className:t="Hyp-IconButton",...e}){const{icon:n}=e;return lt(ft,{className:t,...e,children:lt(ht,{name:n},void 0,!1,{fileName:dt,lineNumber:110,columnNumber:7})},void 0,!1,{fileName:dt,lineNumber:109,columnNumber:5})}function gt({children:t,className:e="Hyp-LabeledButton",...n}){const{icon:i,iconPosition:o="left"}=n;return lt(ft,{className:e,...n,children:[i&&"left"===o&<(ht,{name:i},void 0,!1,{fileName:dt,lineNumber:129,
|
|
19
|
-
ut("checkbox",' <svg\n width="16"\n height="16"\n viewBox="-4 -4 39 39"\n aria-hidden="true"\n focusable="false"\n >\n <rect\n class="hyp-svg-checkbox--background"\n width="35"\n height="35"\n x="-2"\n y="-2"\n stroke="currentColor"\n fill="none"\n stroke-width="3"\n rx="5"\n ry="5"\n />\n <polyline\n class="hyp-svg-checkbox--checkmark"\n points="4,14 12,23 28,5"\n stroke="transparent"\n stroke-width="5"\n fill="none"\n />\n</svg>')
|
|
20
|
-
;function _t({name:t,classes:e="",containerClasses:n="",title:i=""}){const o=ct.get(t);if(!o)throw new Error(`Icon "${t.toString()}" is not registered`);const r=J();Q((()=>{const t=r.current.querySelector("svg");t&&t.setAttribute("class",c("Hyp-Icon",e))}),[e,o]);const s={};return i&&(s.title=i),lt("span",{className:n,dangerouslySetInnerHTML:{__html:o},ref:r,...s},void 0,!1,{fileName:"/home/runner/work/frontend-shared/frontend-shared/src/components/Icon.js",lineNumber:62,columnNumber:5})}function vt({children:t,classes:e="",linkRef:n,...i}){return lt("a",{
|
|
6
|
+
var d,f,p,_,w,y,b,C=i&&i.__k||u,E=C.length;for(n.__k=[],d=0;d<e.length;d++)if(null!=(_=n.__k[d]=null==(_=e[d])||"boolean"==typeof _?null:"string"==typeof _||"number"==typeof _||"bigint"==typeof _?g(null,_,null,null,_):Array.isArray(_)?g(m,{children:_},null,null,null):_.__b>0?g(_.type,_.props,_.key,_.ref?_.ref:null,_.__v):_)){if(_.__=n,_.__b=n.__b+1,null===(p=C[d])||p&&_.key==p.key&&_.type===p.type)C[d]=void 0;else for(f=0;f<E;f++){if((p=C[f])&&_.key==p.key&&_.type===p.type){C[f]=void 0;break}p=null}T(t,_,p=p||h,o,r,s,a,l,c),w=_.__e,(f=_.ref)&&p.ref!=f&&(b||(b=[]),p.ref&&b.push(p.ref,null,_),b.push(f,_.__c||w,_)),null!=w?(null==y&&(y=w),"function"==typeof _.type&&_.__k===p.__k?_.__d=l=x(_,l,t):l=S(t,_,p,C,w,l),"function"==typeof n.type&&(n.__d=l)):l&&p.__e==l&&l.parentNode!=t&&(l=v(p))}for(n.__e=y,d=E;d--;)null!=C[d]&&M(C[d],C[d]);if(b)for(d=0;d<b.length;d++)P(b[d],b[++d],b[++d])}function x(t,e,n){for(var i,o=t.__k,r=0;o&&r<o.length;r++)(i=o[r])&&(i.__=t,e="function"==typeof i.type?x(i,e,n):S(n,i,i,o,i.__e,e))
|
|
7
|
+
;return e}function S(t,e,n,i,o,r){var s,a,l;if(void 0!==e.__d)s=e.__d,e.__d=void 0;else if(null==n||o!=r||null==o.parentNode)t:if(null==r||r.parentNode!==t)t.appendChild(o),s=null;else{for(a=r,l=0;(a=a.nextSibling)&&l<i.length;l+=2)if(a==o)break t;t.insertBefore(o,r),s=r}return void 0!==s?s:o.nextSibling}function E(t,e,n){"-"===e[0]?t.setProperty(e,n):t[e]=null==n?"":"number"!=typeof n||d.test(e)?n:n+"px"}function k(t,e,n,i,o){var r;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof i&&(t.style.cssText=i=""),i)for(e in i)n&&e in n||E(t.style,e,"");if(n)for(e in n)i&&n[e]===i[e]||E(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])r=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+r]=n,n?i||t.addEventListener(e,r?N:A,r):t.removeEventListener(e,r?N:A,r);else if("dangerouslySetInnerHTML"!==e){
|
|
8
|
+
if(o)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null==n||!1===n&&-1==e.indexOf("-")?t.removeAttribute(e):t.setAttribute(e,n))}}function A(t){this.l[t.type+!1](o.event?o.event(t):t)}function N(t){this.l[t.type+!0](o.event?o.event(t):t)}function T(t,e,n,i,r,s,a,l,c){var h,u,d,p,g,v,w,y,b,x,S,E,k,A=e.type;if(void 0!==e.constructor)return null;null!=n.__h&&(c=n.__h,l=e.__e=n.__e,e.__h=null,s=[l]),(h=o.__b)&&h(e);try{t:if("function"==typeof A){y=e.props,b=(h=A.contextType)&&i[h.__c],x=h?b?b.props.value:h.__:i,n.__c?w=(u=e.__c=n.__c).__=u.__E:("prototype"in A&&A.prototype.render?e.__c=u=new A(y,x):(e.__c=u=new _(y,x),u.constructor=A,u.render=O),b&&b.sub(u),u.props=y,u.state||(u.state={}),u.context=x,u.__n=i,d=u.__d=!0,u.__h=[],u._sb=[]),null==u.__s&&(u.__s=u.state),null!=A.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=f({},u.__s)),
|
|
9
|
+
f(u.__s,A.getDerivedStateFromProps(y,u.__s))),p=u.props,g=u.state;for(h=0;h<u._sb.length;h++)u.__h.push(u._sb[h]),u._sb=[];if(d)null==A.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==A.getDerivedStateFromProps&&y!==p&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(y,x),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(y,u.__s,x)||e.__v===n.__v){u.props=y,u.state=u.__s,e.__v!==n.__v&&(u.__d=!1),u.__v=e,e.__e=n.__e,e.__k=n.__k,e.__k.forEach((function(t){t&&(t.__=e)})),u.__h.length&&a.push(u);break t}null!=u.componentWillUpdate&&u.componentWillUpdate(y,u.__s,x),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(p,g,v)}))}if(u.context=x,u.props=y,u.__v=e,u.__P=t,S=o.__r,E=0,"prototype"in A&&A.prototype.render)u.state=u.__s,u.__d=!1,S&&S(e),h=u.render(u.props,u.state,u.context);else do{u.__d=!1,S&&S(e),h=u.render(u.props,u.state,u.context),u.state=u.__s
|
|
10
|
+
}while(u.__d&&++E<25);u.state=u.__s,null!=u.getChildContext&&(i=f(f({},i),u.getChildContext())),d||null==u.getSnapshotBeforeUpdate||(v=u.getSnapshotBeforeUpdate(p,g)),k=null!=h&&h.type===m&&null==h.key?h.props.children:h,C(t,Array.isArray(k)?k:[k],e,n,i,r,s,a,l,c),u.base=e.__e,e.__h=null,u.__h.length&&a.push(u),w&&(u.__E=u.__=null),u.__e=!1}else null==s&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=L(n.__e,e,n,i,r,s,a,c);(h=o.diffed)&&h(e)}catch(t){e.__v=null,(c||null!=s)&&(e.__e=l,e.__h=!!c,s[s.indexOf(l)]=null),o.__e(t,e,n)}}function R(t,e){o.__c&&o.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){o.__e(t,e.__v)}}))}function L(t,e,n,o,r,s,a,l){var c,u,d,f=n.props,g=e.props,m=e.type,_=0;if("svg"===m&&(r=!0),null!=s)for(;_<s.length;_++)if((c=s[_])&&"setAttribute"in c==!!m&&(m?c.localName===m:3===c.nodeType)){t=c,s[_]=null;break}if(null==t){if(null===m)return document.createTextNode(g)
|
|
11
|
+
;t=r?document.createElementNS("http://www.w3.org/2000/svg",m):document.createElement(m,g.is&&g),s=null,l=!1}if(null===m)f===g||l&&t.data===g||(t.data=g);else{if(s=s&&i.call(t.childNodes),u=(f=n.props||h).dangerouslySetInnerHTML,d=g.dangerouslySetInnerHTML,!l){if(null!=s)for(f={},_=0;_<t.attributes.length;_++)f[t.attributes[_].name]=t.attributes[_].value;(d||u)&&(d&&(u&&d.__html==u.__html||d.__html===t.innerHTML)||(t.innerHTML=d&&d.__html||""))}if(function(t,e,n,i,o){var r;for(r in n)"children"===r||"key"===r||r in e||k(t,r,null,n[r],i);for(r in e)o&&"function"!=typeof e[r]||"children"===r||"key"===r||"value"===r||"checked"===r||n[r]===e[r]||k(t,r,e[r],n[r],i)}(t,g,f,r,l),d)e.__k=[];else if(_=e.props.children,C(t,Array.isArray(_)?_:[_],e,n,o,r&&"foreignObject"!==m,s,a,s?s[0]:n.__k&&v(n,0),l),null!=s)for(_=s.length;_--;)null!=s[_]&&p(s[_]);l||("value"in g&&void 0!==(_=g.value)&&(_!==t.value||"progress"===m&&!_||"option"===m&&_!==f.value)&&k(t,"value",_,f.value,!1),
|
|
12
|
+
"checked"in g&&void 0!==(_=g.checked)&&_!==t.checked&&k(t,"checked",_,f.checked,!1))}return t}function P(t,e,n){try{"function"==typeof t?t(e):t.current=e}catch(t){o.__e(t,n)}}function M(t,e,n){var i,r;if(o.unmount&&o.unmount(t),(i=t.ref)&&(i.current&&i.current!==t.__e||P(i,null,e)),null!=(i=t.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(t){o.__e(t,e)}i.base=i.__P=null,t.__c=void 0}if(i=t.__k)for(r=0;r<i.length;r++)i[r]&&M(i[r],e,n||"function"!=typeof t.type);n||null==t.__e||p(t.__e),t.__=t.__e=t.__d=void 0}function O(t,e,n){return this.constructor(t,n)}function I(t,e,n){var r,s,a;o.__&&o.__(t,e),s=(r="function"==typeof n)?null:n&&n.__k||e.__k,a=[],T(e,t=(!r&&n||e).__k=function(t,e,n){var o,r,s,a={};for(s in e)"key"==s?o=e[s]:"ref"==s?r=e[s]:a[s]=e[s];if(arguments.length>2&&(a.children=arguments.length>3?i.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(s in t.defaultProps)void 0===a[s]&&(a[s]=t.defaultProps[s]);return g(t,a,o,r,null)
|
|
13
|
+
}(m,null,[t]),s||h,h,void 0!==e.ownerSVGElement,!r&&n?[n]:s?null:e.firstChild?i.call(e.childNodes):null,a,!r&&n?n:s?s.__e:e.firstChild,r),R(a,t)}function B(t,e){var n={__c:e="__cC"+l++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var n,i;return this.getChildContext||(n=[],(i={})[e]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&n.some(y)},this.sub=function(t){n.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n.splice(n.indexOf(t),1),e&&e.call(t)}}),t.children}};return n.Provider.__=n.Consumer.contextType=n}i=u.slice,o={__e:function(t,e,n,i){for(var o,r,s;e=e.__;)if((o=e.__c)&&!o.__)try{if((r=o.constructor)&&null!=r.getDerivedStateFromError&&(o.setState(r.getDerivedStateFromError(t)),s=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(t,i||{}),s=o.__d),s)return o.__E=o}catch(e){t=e}throw t}},r=0,_.prototype.setState=function(t,e){var n
|
|
14
|
+
;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=f({},this.state),"function"==typeof t&&(t=t(f({},n),this.props)),t&&f(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),y(this))},_.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),y(this))},_.prototype.render=m,s=[],b.__r=0,l=0;var H,V,D,F,q=0,U=[],z=[],W=o.__b,$=o.__r,j=o.diffed,X=o.__c,Y=o.unmount;function Z(t,e){o.__h&&o.__h(V,t,q||e),q=0;var n=V.__H||(V.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({__V:z}),n.__[t]}function G(t){return q=1,function(t,e,n){var i=Z(H++,2);if(i.t=t,!i.__c&&(i.__=[n?n(e):st(void 0,e),function(t){var e=i.__N?i.__N[0]:i.__[0],n=i.t(e,t);e!==n&&(i.__N=[n,i.__[1]],i.__c.setState({}))}],i.__c=V,!V.u)){V.u=!0;var o=V.shouldComponentUpdate;V.shouldComponentUpdate=function(t,e,n){if(!i.__c.__H)return!0;var r=i.__c.__H.__.filter((function(t){return t.__c}));if(r.every((function(t){return!t.__N})))return!o||o.call(this,t,e,n);var s=!1;return r.forEach((function(t){if(t.__N){var e=t.__[0]
|
|
15
|
+
;t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(s=!0)}})),!(!s&&i.__c.props===t)&&(!o||o.call(this,t,e,n))}}return i.__N||i.__}(st,t)}function K(t,e){var n=Z(H++,3);!o.__s&&rt(n.__H,e)&&(n.__=t,n.i=e,V.__H.__h.push(n))}function Q(t,e){var n=Z(H++,4);!o.__s&&rt(n.__H,e)&&(n.__=t,n.i=e,V.__h.push(n))}function J(t){return q=5,function(t,e){var n=Z(H++,7);return rt(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}((function(){return{current:t}}),[])}function tt(){for(var t;t=U.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(it),t.__H.__h.forEach(ot),t.__H.__h=[]}catch(e){t.__H.__h=[],o.__e(e,t.__v)}}o.__b=function(t){"function"!=typeof t.type||t.__m||t.type===m?t.__m||(t.__m=t.__&&t.__.__m?t.__.__m:""):t.__m=(t.__&&t.__.__m?t.__.__m:"")+(t.__&&t.__.__k?t.__.__k.indexOf(t):0),V=null,W&&W(t)},o.__r=function(t){$&&$(t),H=0;var e=(V=t.__c).__H;e&&(D===V?(e.__h=[],V.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.__V=z,t.__N=t.i=void 0}))):(e.__h.forEach(it),e.__h.forEach(ot),e.__h=[])),D=V},o.diffed=function(t){j&&j(t)
|
|
16
|
+
;var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==U.push(e)&&F===o.requestAnimationFrame||((F=o.requestAnimationFrame)||nt)(tt)),e.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.__V!==z&&(t.__=t.__V),t.i=void 0,t.__V=z}))),D=V=null},o.__c=function(t,e){e.some((function(t){try{t.__h.forEach(it),t.__h=t.__h.filter((function(t){return!t.__||ot(t)}))}catch(n){e.some((function(t){t.__h&&(t.__h=[])})),e=[],o.__e(n,t.__v)}})),X&&X(t,e)},o.unmount=function(t){Y&&Y(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{it(t)}catch(t){e=t}})),n.__H=void 0,e&&o.__e(e,n.__v))};var et="function"==typeof requestAnimationFrame;function nt(t){var e,n=function(){clearTimeout(i),et&&cancelAnimationFrame(e),setTimeout(t)},i=setTimeout(n,100);et&&(e=requestAnimationFrame(n))}function it(t){var e=V,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),V=e}function ot(t){var e=V;t.__c=t.__(),V=e}function rt(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function st(t,e){
|
|
17
|
+
return"function"==typeof e?e(t):e}var at=0;function lt(t,e,n,i,r){var s,a,l={};for(a in e)"ref"==a?s=e[a]:l[a]=e[a];var c={type:t,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--at,__source:r,__self:i};if("function"==typeof t&&(s=t.defaultProps))for(a in s)void 0===l[a]&&(l[a]=s[a]);return o.vnode&&o.vnode(c),c}const ct=new Map;function ht({name:t,className:e="",inline:n=!1,title:i=""}){const o=ct.get(t);if(!o)throw new Error(`Icon "${t.toString()}" is not registered`);const r=J();Q((()=>{const t=r.current.querySelector("svg");t&&t.setAttribute("class",e)}),[e,o]);const s={};return i&&(s.title=i),lt("span",{className:c("Hyp-SvgIcon",{"Hyp-SvgIcon--inline":n}),dangerouslySetInnerHTML:{__html:o},ref:r,...s},void 0,!1,{fileName:"/home/runner/work/frontend-shared/frontend-shared/src/components/SvgIcon.js",lineNumber:69,columnNumber:5})}function ut(t,e){const n="string"==typeof t?Symbol(t):t;return ct.set(n,e),n}
|
|
18
|
+
var dt="/home/runner/work/frontend-shared/frontend-shared/src/components/buttons.js";function ft({buttonRef:t,classes:e,className:n,icon:i,iconPosition:o="left",size:r="medium",variant:s="normal",expanded:a,pressed:l,type:h="button",...u}){var d;const f=null!==(d=null==u?void 0:u.role)&&void 0!==d?d:"button",p={"aria-label":u.title};return"tab"===f?p["aria-selected"]=l:(p["aria-pressed"]=l,p["aria-expanded"]=a),lt("button",{ref:t,className:c(n,`${n}--${r}`,`${n}--${s}`,{[`${n}--icon-${o}`]:i},e),type:h,...p,...u},void 0,!1,{fileName:dt,lineNumber:82,columnNumber:5})}function pt({className:t="Hyp-IconButton",...e}){const{icon:n}=e;return lt(ft,{className:t,...e,children:lt(ht,{name:n},void 0,!1,{fileName:dt,lineNumber:110,columnNumber:7})},void 0,!1,{fileName:dt,lineNumber:109,columnNumber:5})}function gt({children:t,className:e="Hyp-LabeledButton",...n}){const{icon:i,iconPosition:o="left"}=n;return lt(ft,{className:e,...n,children:[i&&"left"===o&<(ht,{name:i},void 0,!1,{fileName:dt,lineNumber:129,
|
|
19
|
+
columnNumber:43}),t,i&&"right"===o&<(ht,{name:i},void 0,!1,{fileName:dt,lineNumber:131,columnNumber:44})]},void 0,!0,{fileName:dt,lineNumber:128,columnNumber:5})}ut("checkbox",' <svg\n width="16"\n height="16"\n viewBox="-4 -4 39 39"\n aria-hidden="true"\n focusable="false"\n >\n <rect\n class="hyp-svg-checkbox--background"\n width="35"\n height="35"\n x="-2"\n y="-2"\n stroke="currentColor"\n fill="none"\n stroke-width="3"\n rx="5"\n ry="5"\n />\n <polyline\n class="hyp-svg-checkbox--checkmark"\n points="4,14 12,23 28,5"\n stroke="transparent"\n stroke-width="5"\n fill="none"\n />\n</svg>')
|
|
20
|
+
;var mt='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><g fill-rule="evenodd"><rect fill="none" stroke="none" x="0" y="0" width="16" height="16"></rect><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 8l3.536-3.536L8 8 4.464 4.464 8 8zm0 0l-3.536 3.536L8 8l3.536 3.536L8 8z"></path></g></svg>\n';ut("cancel",mt);function _t({name:t,classes:e="",containerClasses:n="",title:i=""}){const o=ct.get(t);if(!o)throw new Error(`Icon "${t.toString()}" is not registered`);const r=J();Q((()=>{const t=r.current.querySelector("svg");t&&t.setAttribute("class",c("Hyp-Icon",e))}),[e,o]);const s={};return i&&(s.title=i),lt("span",{className:n,dangerouslySetInnerHTML:{__html:o},ref:r,...s},void 0,!1,{fileName:"/home/runner/work/frontend-shared/frontend-shared/src/components/Icon.js",lineNumber:62,columnNumber:5})}function vt({children:t,classes:e="",linkRef:n,...i}){return lt("a",{
|
|
21
|
+
className:c("Hyp-Link",e),ref:n,rel:"noopener noreferrer",...i,children:t},void 0,!1,{fileName:"/home/runner/work/frontend-shared/frontend-shared/src/components/Link.js",lineNumber:26,columnNumber:5})}ut("cancel",mt)
|
|
21
22
|
;ut("spinner",'<svg viewBox="0 0 64 64" width="16" height="16">\n <g stroke-width="6" stroke="currentColor" stroke-linecap="round">\n <line y1="16" y2="28" transform="translate(32,32) rotate(180)">\n <animate attributeName="stroke-opacity" dur="750ms" values="0;1;.8;.65;.45;.3;.15;0" repeatCount="indefinite"></animate>\n </line>\n <line y1="16" y2="28" transform="translate(32,32) rotate(225)">\n <animate attributeName="stroke-opacity" dur="750ms" values=".15;0;1;.8;.65;.45;.3;.15" repeatCount="indefinite"></animate>\n </line>\n <line y1="16" y2="28" transform="translate(32,32) rotate(270)">\n <animate attributeName="stroke-opacity" dur="750ms" values=".3;.15;0;1;.8;.65;.45;.3" repeatCount="indefinite"></animate>\n </line>\n <line y1="16" y2="28" transform="translate(32,32) rotate(315)">\n <animate attributeName="stroke-opacity" dur="750ms" values=".45;.3;.15;0;1;.85;.65;.45" repeatCount="indefinite"></animate>\n </line>\n <line y1="16" y2="28" transform="translate(32,32) rotate(0)">\n <animate attributeName="stroke-opacity" dur="750ms" values=".65;.45;.3;.15;0;1;.8;.65;" repeatCount="indefinite"></animate>\n </line>\n <line y1="16" y2="28" transform="translate(32,32) rotate(45)">\n <animate attributeName="stroke-opacity" dur="750ms" values=".8;.65;.45;.3;.15;0;1;.8" repeatCount="indefinite"></animate>\n </line>\n <line y1="16" y2="28" transform="translate(32,32) rotate(90)">\n <animate attributeName="stroke-opacity" dur="750ms" values="1;.85;.6;.45;.3;.15;0;1;" repeatCount="indefinite"></animate>\n </line>\n <line y1="16" y2="28" transform="translate(32,32) rotate(135)">\n <animate attributeName="stroke-opacity" dur="750ms" values="0;1;.8;.65;.45;.3;.15;0" repeatCount="indefinite"></animate>\n </line>\n </g>\n</svg>')
|
|
22
23
|
;const wt={
|
|
23
24
|
annotate:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">\n <path fill="currentColor" fill-rule="nonzero" d="M15 0c.27 0 .505.099.703.297A.961.961 0 0116 1v15l-4-3H1a.974.974 0 01-.703-.29A.953.953 0 010 12V1C0 .719.096.482.29.29A.966.966 0 011 0h14zM7 3l-.469.063c-.312.041-.656.187-1.031.437-.375.25-.719.646-1.031 1.188C4.156 5.229 4 6 4 7l.002.063.006.062a.896.896 0 01.008.11l-.002.074-.006.066a1.447 1.447 0 00.43 1.188C4.729 8.854 5.082 9 5.5 9c.417 0 .77-.146 1.063-.438C6.854 8.271 7 7.918 7 7.5c0-.417-.146-.77-.438-1.063A1.447 1.447 0 005.5 6c-.073 0-.146.005-.219.016-.073.01-.14.026-.203.046.177-1.03.542-1.632 1.094-1.804L7 4V3zm5 0l-.469.063c-.312.041-.656.187-1.031.437-.375.25-.719.646-1.031 1.188C9.156 5.229 9 6 9 7l.002.063.006.062a.896.896 0 01.008.11l-.002.074-.006.066a1.447 1.447 0 00.43 1.188c.291.291.645.437 1.062.437.417 0 .77-.146 1.063-.438.291-.291.437-.645.437-1.062 0-.417-.146-.77-.438-1.063A1.447 1.447 0 0010.5 6c-.073 0-.146.005-.219.016-.073.01-.14.026-.203.046.177-1.03.542-1.632 1.094-1.804L12 4V3z"/>\n</svg>\n',
|
|
@@ -107,7 +108,7 @@ const[t,e]=await Promise.all([this._integration.uri(),this._integration.getMetad
|
|
|
107
108
|
destroy(){this._portFinder.destroy(),this._hostRPC.destroy(),this._sidebarRPC.destroy(),this._listeners.removeAll(),this._selectionObserver.disconnect(),this._adder.destroy(),this._bucketBarClient.destroy(),function(t){Ie(Array.from(t.querySelectorAll("hypothesis-highlight")))}(this.element),this._integration.destroy()}async anchor(t){const e=t=>{const e=ji(t);if(!e)return;const n=Me(e);n.forEach((e=>{e._annotation=t.annotation})),t.highlights=n,this._hoveredAnnotations.has(t.annotation.$tag)&&Be(n,!0)};this.detach(t.$tag,!1),this._annotations.add(t.$tag),t.target||(t.target=[]);const n=await Promise.all(t.target.map((async e=>{if(!e.selector||!e.selector.some((t=>"TextQuoteSelector"===t.type)))return{annotation:t,target:e};let n;try{const i=await this._integration.anchor(this.element,e.selector),o=Ee.fromRange(i);n={annotation:t,target:e,range:o}}catch(i){n={annotation:t,target:e}}return n})));if(!this._annotations.has(t.$tag))return[];for(let t of n)e(t)
|
|
108
109
|
;return t.$orphan=n.length>0&&n.every((t=>t.target.selector&&!t.range)),this._updateAnchors(this.anchors.concat(n),!0),this._sidebarRPC.call("syncAnchoringStatus",t),n}detach(t,e=!0){this._annotations.delete(t);const n=[];for(let e of this.anchors)e.annotation.$tag!==t?n.push(e):e.highlights&&Ie(e.highlights);this._updateAnchors(n,e)}_updateAnchors(t,e){this.anchors=t,e&&this._bucketBarClient.update(this.anchors)}async createAnnotation({highlight:t=!1}={}){const e=this.selectedRanges;this.selectedRanges=[];const n=await this.getDocumentInfo(),i=this.element,o=(await Promise.all(e.map((t=>this._integration.describe(i,t))))).map((t=>({source:n.uri,selector:t}))),r={uri:n.uri,document:n.metadata,target:o,$highlight:t,$tag:"a:"+Ct(8)};return this._sidebarRPC.call("createAnnotation",r),this.anchor(r),Xi(),r}_hoverAnnotations(t){this._hoveredAnnotations.clear(),t.forEach((t=>this._hoveredAnnotations.add(t)));for(let e of this.anchors)if(e.highlights){const n=t.includes(e.annotation.$tag);Be(e.highlights,n)}
|
|
109
110
|
this._sidebarRPC.call("hoverAnnotations",t)}_scrollToClosestOffScreenAnchor(t,e){const n=function(t,e){let n=null,i=0;for(let r of t){var o;if(null===(o=r.highlights)||void 0===o||!o.length)continue;const t=He(r.highlights).top;"up"===e&&t>=137||"down"===e&&t<=window.innerHeight-22||(!n||"up"===e&&t>i||"down"===e&&t<i)&&(n=r,i=t)}return n}(this.anchors.filter((({annotation:e})=>t.includes(e.$tag))),e);n&&this._integration.scrollToAnchor(n)}_onSelection(t){if(!this._integration.canAnnotate(t))return void this._onClearSelection();const e=document.getSelection(),n=Ne(e),i=Le(e);i?(this.selectedRanges=[t],this._hostRPC.call("textSelected"),this._adder.annotationsForSelection=Wi(),this._isAdderVisible=!0,this._adder.show(i,n)):this._onClearSelection()}_onClearSelection(){this._isAdderVisible=!1,this._adder.hide(),this.selectedRanges=[],this._informHostOnNextSelectionClear&&this._hostRPC.call("textUnselected"),this._informHostOnNextSelectionClear=!0}selectAnnotations(t,{toggle:e=!1,focusInSidebar:n=!1}={}){
|
|
110
|
-
e?this._sidebarRPC.call("toggleAnnotationSelection",t):this._sidebarRPC.call("showAnnotations",t,n),this._sidebarRPC.call("openSidebar")}setHighlightsVisible(t,e=!0){!function(t,e){t.classList.toggle("hypothesis-highlights-always-on",e)}(this.element,t),this._highlightsVisible=t,e&&this._hostRPC.call("highlightsVisibleChanged",t)}get highlightsVisible(){return this._highlightsVisible}fitSideBySide(t){this._sideBySideActive=this._integration.fitSideBySide(t)}get sideBySideActive(){return this._sideBySideActive}get hoveredAnnotationTags(){return this._hoveredAnnotations}_handleShortcut(t){Zt(t,"Ctrl+Shift+H")&&this.setHighlightsVisible(!this._highlightsVisible)}}function Zi(t,e){const n=new URL(t),i=new URLSearchParams;return i.append("config",JSON.stringify(e)),n.hash=i.toString(),n.toString()}function Gi(t,e){var n;const i={};for(let[t,n]of Object.entries(e))"notebookAppUrl"!==t&&"sidebarAppUrl"!==t&&null!=n&&(i[t]=n);i.origin=new URL(t).origin,i.version="1.
|
|
111
|
+
e?this._sidebarRPC.call("toggleAnnotationSelection",t):this._sidebarRPC.call("showAnnotations",t,n),this._sidebarRPC.call("openSidebar")}setHighlightsVisible(t,e=!0){!function(t,e){t.classList.toggle("hypothesis-highlights-always-on",e)}(this.element,t),this._highlightsVisible=t,e&&this._hostRPC.call("highlightsVisibleChanged",t)}get highlightsVisible(){return this._highlightsVisible}fitSideBySide(t){this._sideBySideActive=this._integration.fitSideBySide(t)}get sideBySideActive(){return this._sideBySideActive}get hoveredAnnotationTags(){return this._hoveredAnnotations}_handleShortcut(t){Zt(t,"Ctrl+Shift+H")&&this.setHighlightsVisible(!this._highlightsVisible)}}function Zi(t,e){const n=new URL(t),i=new URLSearchParams;return i.append("config",JSON.stringify(e)),n.hash=i.toString(),n.toString()}function Gi(t,e){var n;const i={};for(let[t,n]of Object.entries(e))"notebookAppUrl"!==t&&"sidebarAppUrl"!==t&&null!=n&&(i[t]=n);i.origin=new URL(t).origin,i.version="1.1117.0";const o=new URL(window.location.href)
|
|
111
112
|
;if(o.hash="",i.hostURL=o.toString(),Array.isArray(i.services)&&(null===(n=i.services)||void 0===n?void 0:n.length)>0){const t=i.services[0];t.onLoginRequest&&(t.onLoginRequestProvided=!0),t.onLogoutRequest&&(t.onLogoutRequestProvided=!0),t.onSignupRequest&&(t.onSignupRequestProvided=!0),t.onProfileRequest&&(t.onProfileRequestProvided=!0),t.onHelpRequest&&(t.onHelpRequestProvided=!0)}return i}function Ki({config:t,groupId:e}){return lt("iframe",{title:"Hypothesis annotation notebook",className:"h-full w-full border-0",allowFullScreen:!0,src:Zi(t.notebookAppUrl,{...Gi(t.notebookAppUrl,t),group:e})})}function Qi({eventBus:t,config:e}){const[n,i]=G(0),[o,r]=G(!0),[s,a]=G(null),l=J(""),h=J(null);K((()=>(l.current=document.body.style.overflow,()=>{document.body.style.overflow=l.current})),[]),K((()=>{document.body.style.overflow=o?l.current:"hidden"}),[o]),K((()=>{const e=t.createEmitter();return e.subscribe("openNotebook",(t=>{r(!1),i((t=>t+1)),a(t)})),h.current=e,()=>{e.destroy()}}),[t])
|
|
112
113
|
;return null===s?null:lt("div",{className:c("fixed z-max top-0 left-0 right-0 bottom-0 p-3 bg-black/50",{hidden:o}),"data-testid":"notebook-outer",children:lt("div",{className:"relative w-full h-full","data-testid":"notebook-inner",children:[lt("div",{className:"absolute right-0 text-xl m-3",children:lt(pt,{icon:"cancel",title:"Close the Notebook",onClick:()=>{var t;r(!0),null===(t=h.current)||void 0===t||t.publish("closeNotebook")},variant:"dark"})}),lt(Ki,{config:e,groupId:s},n)]})})}class Ji{constructor(t,e,n){this._outerContainer=document.createElement("hypothesis-notebook"),t.appendChild(this._outerContainer),this.shadowRoot=ve(this._outerContainer),I(lt(Qi,{eventBus:e,config:n}),this.shadowRoot)}destroy(){I(null,this.shadowRoot),this._outerContainer.remove()}}var to={exports:{}};!function(t){!function(e,n,i,o){var r,s=["","webkit","Moz","MS","ms","o"],a=n.createElement("div"),l=Math.round,c=Math.abs,h=Date.now;function u(t,e,n){return setTimeout(v(t,n),e)}function d(t,e,n){
|
|
113
114
|
return!!Array.isArray(t)&&(f(t,n[e],n),!0)}function f(t,e,n){var i;if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==o)for(i=0;i<t.length;)e.call(n,t[i],i,t),i++;else for(i in t)t.hasOwnProperty(i)&&e.call(n,t[i],i,t)}function p(t,n,i){var o="DEPRECATED METHOD: "+n+"\n"+i+" AT \n";return function(){var n=new Error("get-stack-trace"),i=n&&n.stack?n.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",r=e.console&&(e.console.warn||e.console.log);return r&&r.call(e.console,o,i),t.apply(this,arguments)}}r="function"!=typeof Object.assign?function(t){if(t===o||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];if(i!==o&&null!==i)for(var r in i)i.hasOwnProperty(r)&&(e[r]=i[r])}return e}:Object.assign;var g=p((function(t,e,n){for(var i=Object.keys(e),r=0;r<i.length;)(!n||n&&t[i[r]]===o)&&(t[i[r]]=e[i[r]]),r++;return t
|