hypothesis 1.1545.0 → 1.1546.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 +9 -9
- package/build/scripts/annotator.bundle.js +21 -21
- package/build/scripts/annotator.bundle.js.map +1 -1
- package/build/scripts/sidebar.bundle.js +88 -88
- package/build/scripts/sidebar.bundle.js.map +1 -1
- package/build/scripts/ui-playground.bundle.js +9 -9
- package/build/scripts/ui-playground.bundle.js.map +1 -1
- package/build/styles/annotator.css +1 -1
- package/build/styles/sidebar.css +1 -1
- package/build/styles/ui-playground.css +1 -1
- package/package.json +3 -3
package/build/boot.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){"use strict";var s={"scripts/annotator.bundle.js":"scripts/annotator.bundle.js?
|
|
1
|
+
!function(){"use strict";var s={"scripts/annotator.bundle.js":"scripts/annotator.bundle.js?268098","styles/annotator.css":"styles/annotator.css?c0916c","styles/annotator.css.map":"styles/annotator.css.map?8d0b08","styles/highlights.css":"styles/highlights.css?6b4ebd","styles/highlights.css.map":"styles/highlights.css.map?241350","styles/katex.min.css":"styles/katex.min.css?b236b5","styles/katex.min.css.map":"styles/katex.min.css.map?1785d7","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?e2f13a","styles/sidebar.css.map":"styles/sidebar.css.map?67af10","styles/ui-playground.css":"styles/ui-playground.css?49365c","styles/ui-playground.css.map":"styles/ui-playground.css.map?0d6e99","scripts/annotator.bundle.js.map":"scripts/annotator.bundle.js.map?ea7aa9","scripts/sidebar.bundle.js":"scripts/sidebar.bundle.js?bf8b96","scripts/ui-playground.bundle.js":"scripts/ui-playground.bundle.js?a12e9c","scripts/sidebar.bundle.js.map":"scripts/sidebar.bundle.js.map?b2c1d0","scripts/ui-playground.bundle.js.map":"scripts/ui-playground.bundle.js.map?2784a9"};function t(s){s.setAttribute("data-hypothesis-asset","")}function e(s,e){var o=s.createElement("link");o.rel="stylesheet",o.type="text/css",o.href=e,t(o),s.head.appendChild(o)}function o(s,e){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=o.esModule,n=void 0===r||r,i=o.forceReload,a=void 0!==i&&i,l=s.createElement("script");n&&(l.type="module"),a&&(e+="#ts=".concat(Date.now())),l.src=e,l.async=!1,t(l),s.head.appendChild(l)}function r(s,e,o,r){var n=s.createElement("link");n.rel=e,n.href=r,n.type="application/annotator+".concat(o),t(n),s.head.appendChild(n)}function n(s,e,o){var r=s.createElement("link");r.rel="preload",r.as=e,r.href=o,"fetch"===e&&(r.crossOrigin="anonymous"),t(r),s.head.appendChild(r)}function i(s,t){return s.assetRoot+"build/"+s.manifest[t]}function a(s){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;if(-1===s.indexOf("{"))return s;var e=function(){var s,t,e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).currentScript;return e?(s=e.src,(t=s.match(/(https?):\/\/([^:/]+)/))?{protocol:t[1],hostname:t[2]}:null):null}(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)}if(function(){var s=[()=>Object.fromEntries([]),()=>new URL(document.location.href),()=>new Request("https://hypothes.is"),()=>Element.prototype.attachShadow,()=>CSS.supports("display: grid"),()=>(document.evaluate("/html/body",document,null,XPathResult.ANY_TYPE,null),!0)];try{return s.every((s=>s()))}catch(s){return!1}}()){var l=function(s){for(var t={},e=s.querySelectorAll("script.js-hypothesis-config"),o=0;o<e.length;o++){var r=void 0;try{r=JSON.parse(e[o].textContent||"")}catch(s){console.warn("Could not parse settings from js-hypothesis-config tags",s),r={}}Object.assign(t,r)}return t}(document),p=a(l.assetRoot||"https://cdn.hypothes.is/hypothesis/1.1546.0/");if(document.querySelector("hypothesis-app")){!function(s,t){n(s,"fetch",t.apiUrl),n(s,"fetch",t.apiUrl+"links");for(var r=0,a=["scripts/sidebar.bundle.js"];r<a.length;r++)o(s,i(t,a[r]),{esModule:!0});for(var l=0,p=["styles/katex.min.css","styles/sidebar.css"];l<p.length;l++)e(s,i(t,p[l]))}(document,{assetRoot:p,manifest:s,apiUrl:l.apiUrl})}else{var c=function(){var s;return null===(s=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).chrome)||void 0===s||null===(s=s.runtime)||void 0===s?void 0:s.id}();if(c&&!function(s){return!!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:document).querySelector("script.js-hypothesis-config[data-extension-id=".concat(s,"]"))}(c))throw new Error("Could not start Hypothesis extension as configuration is missing");var d=l,h=a(d.notebookAppUrl||"https://hypothes.is/notebook"),u=a(d.profileAppUrl||"https://hypothes.is/user-profile"),y=a(d.sidebarAppUrl||"https://hypothes.is/app.html");!function(s,t){if(!s.querySelector('link[type="application/annotator+html"]')){r(s,"sidebar","html",t.sidebarAppUrl),r(s,"notebook","html",t.notebookAppUrl),r(s,"profile","html",t.profileAppUrl),n(s,"style",i(t,"styles/annotator.css")),r(s,"hypothesis-client","javascript",t.assetRoot+"build/boot.js");for(var a=0,l=["scripts/annotator.bundle.js"];a<l.length;a++)o(s,i(t,l[a]),{esModule:!1});var p=[];void 0!==window.PDFViewerApplication&&p.push("styles/pdfjs-overrides.css"),p.push("styles/highlights.css");for(var c=0,d=p;c<d.length;c++)e(s,i(t,d[c]))}}(document,{assetRoot:p,manifest:s,notebookAppUrl:h,profileAppUrl:u,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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"scripts/annotator.bundle.js": "scripts/annotator.bundle.js?
|
|
3
|
-
"styles/annotator.css": "styles/annotator.css?
|
|
2
|
+
"scripts/annotator.bundle.js": "scripts/annotator.bundle.js?268098",
|
|
3
|
+
"styles/annotator.css": "styles/annotator.css?c0916c",
|
|
4
4
|
"styles/annotator.css.map": "styles/annotator.css.map?8d0b08",
|
|
5
5
|
"styles/highlights.css": "styles/highlights.css?6b4ebd",
|
|
6
6
|
"styles/highlights.css.map": "styles/highlights.css.map?241350",
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
"styles/katex.min.css.map": "styles/katex.min.css.map?1785d7",
|
|
9
9
|
"styles/pdfjs-overrides.css": "styles/pdfjs-overrides.css?c95edf",
|
|
10
10
|
"styles/pdfjs-overrides.css.map": "styles/pdfjs-overrides.css.map?1d8ac6",
|
|
11
|
-
"styles/sidebar.css": "styles/sidebar.css?
|
|
11
|
+
"styles/sidebar.css": "styles/sidebar.css?e2f13a",
|
|
12
12
|
"styles/sidebar.css.map": "styles/sidebar.css.map?67af10",
|
|
13
|
-
"styles/ui-playground.css": "styles/ui-playground.css?
|
|
13
|
+
"styles/ui-playground.css": "styles/ui-playground.css?49365c",
|
|
14
14
|
"styles/ui-playground.css.map": "styles/ui-playground.css.map?0d6e99",
|
|
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/sidebar.bundle.js.map": "scripts/sidebar.bundle.js.map?
|
|
19
|
-
"scripts/ui-playground.bundle.js.map": "scripts/ui-playground.bundle.js.map?
|
|
15
|
+
"scripts/annotator.bundle.js.map": "scripts/annotator.bundle.js.map?ea7aa9",
|
|
16
|
+
"scripts/sidebar.bundle.js": "scripts/sidebar.bundle.js?bf8b96",
|
|
17
|
+
"scripts/ui-playground.bundle.js": "scripts/ui-playground.bundle.js?a12e9c",
|
|
18
|
+
"scripts/sidebar.bundle.js.map": "scripts/sidebar.bundle.js.map?b2c1d0",
|
|
19
|
+
"scripts/ui-playground.bundle.js.map": "scripts/ui-playground.bundle.js.map?2784a9"
|
|
20
20
|
}
|
|
@@ -16,26 +16,26 @@ return"always"}}()},get sidebarAppUrl(){return q(e,"sidebar","html")},get query(
|
|
|
16
16
|
contentInfoBanner:{allowInBrowserExt:!1,defaultValue:null,getValue:z},contentReady:{allowInBrowserExt:!0,defaultValue:null,getValue:z},enableExperimentalNewNoteButton:{allowInBrowserExt:!1,defaultValue:null,getValue:z},group:{allowInBrowserExt:!0,defaultValue:null,getValue:e=>e.group},focus:{allowInBrowserExt:!1,defaultValue:null,getValue:z},theme:{allowInBrowserExt:!1,defaultValue:null,getValue:z},usernameUrl:{allowInBrowserExt:!1,defaultValue:null,getValue:z},onLayoutChange:{allowInBrowserExt:!1,defaultValue:null,getValue:z},openSidebar:{allowInBrowserExt:!0,defaultValue:!1,coerce:N,getValue:z},query:{allowInBrowserExt:!0,defaultValue:null,getValue:e=>e.query},requestConfigFromFrame:{allowInBrowserExt:!1,defaultValue:null,getValue:z},services:{allowInBrowserExt:!1,defaultValue:null,getValue:z},showHighlights:{allowInBrowserExt:!1,defaultValue:"always",getValue:e=>e.showHighlights},notebookAppUrl:{allowInBrowserExt:!0,defaultValue:null,getValue:e=>e.notebookAppUrl},profileAppUrl:{allowInBrowserExt:!0,
|
|
17
17
|
defaultValue:null,getValue:e=>e.profileAppUrl},sidebarAppUrl:{allowInBrowserExt:!0,defaultValue:null,getValue:e=>e.sidebarAppUrl},subFrameIdentifier:{allowInBrowserExt:!0,defaultValue:null,getValue:z},externalContainerSelector:{allowInBrowserExt:!1,defaultValue:null,getValue:z},sideBySide:{allowInBrowserExt:!0,getValue:e=>e.sideBySide}};function X(e,t=window){const n=W(t),o={};for(const r of function(e){const t={annotator:["clientUrl","contentInfoBanner","contentReady","subFrameIdentifier","sideBySide"],sidebar:["appType","annotations","branding","bucketContainerSelector","enableExperimentalNewNoteButton","externalContainerSelector","focus","group","onLayoutChange","openSidebar","query","requestConfigFromFrame","services","showHighlights","sidebarAppUrl","theme","usernameUrl"],notebook:["branding","group","notebookAppUrl","requestConfigFromFrame","services","theme","usernameUrl"],profile:["profileAppUrl"]};return"all"===e?Object.values(t).flat():t[e]}(e)){
|
|
18
18
|
const e=j[r],s=void 0!==e.defaultValue,a=!((i=q(t,"sidebar","html")).startsWith("http://")||i.startsWith("https://"));if(!e.allowInBrowserExt&&a){s&&(o[r]=e.defaultValue);continue}const l=e.getValue(n,r);void 0!==l?o[r]=e.coerce?e.coerce(l):l:s&&(o[r]=e.defaultValue)}var i;return o}var K,Q,G,Y,J,Z,ee,te,ne,oe,ie,re,se={},ae=[],le=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ce=Array.isArray;function de(e,t){for(var n in t)e[n]=t[n];return e}function ue(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function he(e,t,n,o,i){var r={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==i?++G:i,__i:-1,__u:0};return null==i&&null!=Q.vnode&&Q.vnode(r),r}function fe(e){return e.children}function me(e,t){this.props=e,this.context=t}function ge(e,t){if(null==t)return e.__?ge(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?ge(e):null}function pe(e){var t,n
|
|
19
|
-
;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return pe(e)}}function _e(e){(!e.__d&&(e.__d=!0)&&Y.push(e)&&!be.__r++||J!==Q.debounceRendering)&&((J=Q.debounceRendering)||Z)(be)}function be(){var e,t,n,o,i,r,s,a;for(Y.sort(ee);e=Y.shift();)e.__d&&(t=Y.length,o=void 0,r=(i=(n=e).__v).__e,s=[],a=[],n.__P&&((o=de({},i)).__v=i.__v+1,Q.vnode&&Q.vnode(o),Se(n.__P,o,i,n.__n,n.__P.namespaceURI,32&i.__u?[r]:null,s,null==r?ge(i):r,!!(32&i.__u),a),o.__v=i.__v,o.__.__k[o.__i]=o,Ee(s,o,a),o.__e!=r&&pe(o)),Y.length>t&&Y.sort(ee));be.__r=0}function we(e,t,n,o,i,r,s,a,l,c,d){var u,h,f,m,g,p,_=o&&o.__k||ae,b=t.length;for(l=function(e,t,n,o){var
|
|
20
|
-
},null,null,null):void 0===
|
|
21
|
-
;return t}function ye(e,t,n,o){var i=e.key,
|
|
22
|
-
if("http://www.w3.org/2000/svg"==i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"
|
|
23
|
-
u.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
;
|
|
38
|
-
|
|
19
|
+
;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return pe(e)}}function _e(e){(!e.__d&&(e.__d=!0)&&Y.push(e)&&!be.__r++||J!==Q.debounceRendering)&&((J=Q.debounceRendering)||Z)(be)}function be(){var e,t,n,o,i,r,s,a;for(Y.sort(ee);e=Y.shift();)e.__d&&(t=Y.length,o=void 0,r=(i=(n=e).__v).__e,s=[],a=[],n.__P&&((o=de({},i)).__v=i.__v+1,Q.vnode&&Q.vnode(o),Se(n.__P,o,i,n.__n,n.__P.namespaceURI,32&i.__u?[r]:null,s,null==r?ge(i):r,!!(32&i.__u),a),o.__v=i.__v,o.__.__k[o.__i]=o,Ee(s,o,a),o.__e!=r&&pe(o)),Y.length>t&&Y.sort(ee));be.__r=0}function we(e,t,n,o,i,r,s,a,l,c,d){var u,h,f,m,g,p,_=o&&o.__k||ae,b=t.length;for(l=function(e,t,n,o,i){var r,s,a,l,c,d=n.length,u=d,h=0;for(e.__k=new Array(i),r=0;r<i;r++)null!=(s=t[r])&&"boolean"!=typeof s&&"function"!=typeof s?(l=r+h,(s=e.__k[r]="string"==typeof s||"number"==typeof s||"bigint"==typeof s||s.constructor==String?he(null,s,null,null,null):ce(s)?he(fe,{children:s
|
|
20
|
+
},null,null,null):void 0===s.constructor&&s.__b>0?he(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=e,s.__b=e.__b+1,a=null,-1!==(c=s.__i=ye(s,n,l,u))&&(u--,(a=n[c])&&(a.__u|=2)),null==a||null===a.__v?(-1==c&&h--,"function"!=typeof s.type&&(s.__u|=4)):c!=l&&(c==l-1?h--:c==l+1?h++:(c>l?h--:h++,s.__u|=4))):e.__k[r]=null;if(u)for(r=0;r<d;r++)null!=(a=n[r])&&0==(2&a.__u)&&(a.__e==o&&(o=ge(a)),Re(a,a));return o}(n,t,_,l,b),u=0;u<b;u++)null!=(f=n.__k[u])&&(h=-1===f.__i?se:_[f.__i]||se,f.__i=u,p=Se(e,f,h,i,r,s,a,l,c,d),m=f.__e,f.ref&&h.ref!=f.ref&&(h.ref&&Ae(h.ref,null,f),d.push(f.ref,f.__c||m,f)),null==g&&null!=m&&(g=m),4&f.__u||h.__k===f.__k?l=ve(f,l,e):"function"==typeof f.type&&void 0!==p?l=p:m&&(l=m.nextSibling),f.__u&=-7);return n.__e=g,l}function ve(e,t,n){var o,i;if("function"==typeof e.type){for(o=e.__k,i=0;o&&i<o.length;i++)o[i]&&(o[i].__=e,t=ve(o[i],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=ge(e)),n.insertBefore(e.__e,t||null),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType)
|
|
21
|
+
;return t}function ye(e,t,n,o){var i,r,s=e.key,a=e.type,l=t[n];if(null===l||l&&s==l.key&&a===l.type&&0==(2&l.__u))return n;if(o>(null!=l&&0==(2&l.__u)?1:0))for(i=n-1,r=n+1;i>=0||r<t.length;){if(i>=0){if((l=t[i])&&0==(2&l.__u)&&s==l.key&&a===l.type)return i;i--}if(r<t.length){if((l=t[r])&&0==(2&l.__u)&&s==l.key&&a===l.type)return r;r++}}return-1}function xe(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||le.test(t)?n:n+"px"}function Ne(e,t,n,o,i){var r;e:if("style"==t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof o&&(e.style.cssText=o=""),o)for(t in o)n&&t in n||xe(e.style,t,"");if(n)for(t in n)o&&n[t]===o[t]||xe(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])r=t!=(t=t.replace(te,"$1")),t=t.toLowerCase()in e||"onFocusOut"==t||"onFocusIn"==t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+r]=n,n?o?n.u=o.u:(n.u=ne,e.addEventListener(t,r?ie:oe,r)):e.removeEventListener(t,r?ie:oe,r);else{
|
|
22
|
+
if("http://www.w3.org/2000/svg"==i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function Ce(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.t)t.t=ne++;else if(t.t<n.u)return;return n(Q.event?Q.event(t):t)}}}function Se(e,t,n,o,i,r,s,a,l,c){var d,u,h,f,m,g,p,_,b,w,v,y,x,N,C,S,E,k=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(l=!!(32&n.__u),r=[a=t.__e=n.__e]),(d=Q.__b)&&d(t);e:if("function"==typeof k)try{if(_=t.props,b="prototype"in k&&k.prototype.render,w=(d=k.contextType)&&o[d.__c],v=d?w?w.props.value:d.__:o,n.__c?p=(u=t.__c=n.__c).__=u.__E:(b?t.__c=u=new k(_,v):(t.__c=u=new me(_,v),u.constructor=k,u.render=Te),w&&w.sub(u),u.props=_,u.state||(u.state={}),u.context=v,
|
|
23
|
+
u.__n=o,h=u.__d=!0,u.__h=[],u._sb=[]),b&&null==u.__s&&(u.__s=u.state),b&&null!=k.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=de({},u.__s)),de(u.__s,k.getDerivedStateFromProps(_,u.__s))),f=u.props,m=u.state,u.__v=t,h)b&&null==k.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),b&&null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(b&&null==k.getDerivedStateFromProps&&_!==f&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(_,v),!u.__e&&(null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(_,u.__s,v)||t.__v==n.__v)){for(t.__v!=n.__v&&(u.props=_,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some((function(e){e&&(e.__=t)})),y=0;y<u._sb.length;y++)u.__h.push(u._sb[y]);u._sb=[],u.__h.length&&s.push(u);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(_,u.__s,v),b&&null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(f,m,g)}))}if(u.context=v,u.props=_,u.__P=e,u.__e=!1,x=Q.__r,N=0,b){for(u.state=u.__s,u.__d=!1,
|
|
24
|
+
x&&x(t),d=u.render(u.props,u.state,u.context),C=0;C<u._sb.length;C++)u.__h.push(u._sb[C]);u._sb=[]}else do{u.__d=!1,x&&x(t),d=u.render(u.props,u.state,u.context),u.state=u.__s}while(u.__d&&++N<25);u.state=u.__s,null!=u.getChildContext&&(o=de(de({},o),u.getChildContext())),b&&!h&&null!=u.getSnapshotBeforeUpdate&&(g=u.getSnapshotBeforeUpdate(f,m)),a=we(e,ce(S=null!=d&&d.type===fe&&null==d.key?d.props.children:d)?S:[S],t,n,o,i,r,s,a,l,c),u.base=t.__e,t.__u&=-161,u.__h.length&&s.push(u),p&&(u.__E=u.__=null)}catch(e){if(t.__v=null,l||null!=r)if(e.then){for(t.__u|=l?160:128;a&&8==a.nodeType&&a.nextSibling;)a=a.nextSibling;r[r.indexOf(a)]=null,t.__e=a}else for(E=r.length;E--;)ue(r[E]);else t.__e=n.__e,t.__k=n.__k;Q.__e(e,t,n)}else null==r&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=ke(n.__e,t,n,o,i,r,s,l,c);return(d=Q.diffed)&&d(t),128&t.__u?void 0:a}function Ee(e,t,n){for(var o=0;o<n.length;o++)Ae(n[o],n[++o],n[++o]);Q.__c&&Q.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))
|
|
25
|
+
}catch(e){Q.__e(e,t.__v)}}))}function ke(e,t,n,o,i,r,s,a,l){var c,d,u,h,f,m,g,p=n.props,_=t.props,b=t.type;if("svg"==b?i="http://www.w3.org/2000/svg":"math"==b?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),null!=r)for(c=0;c<r.length;c++)if((f=r[c])&&"setAttribute"in f==!!b&&(b?f.localName==b:3==f.nodeType)){e=f,r[c]=null;break}if(null==e){if(null==b)return document.createTextNode(_);e=document.createElementNS(i,b,_.is&&_),a&&(Q.__m&&Q.__m(t,r),a=!1),r=null}if(null===b)p===_||a&&e.data===_||(e.data=_);else{if(r=r&&K.call(e.childNodes),p=n.props||se,!a&&null!=r)for(p={},c=0;c<e.attributes.length;c++)p[(f=e.attributes[c]).name]=f.value;for(c in p)if(f=p[c],"children"==c);else if("dangerouslySetInnerHTML"==c)u=f;else if(!(c in _)){if("value"==c&&"defaultValue"in _||"checked"==c&&"defaultChecked"in _)continue;Ne(e,c,null,f,i)}for(c in _)f=_[c],"children"==c?h=f:"dangerouslySetInnerHTML"==c?d=f:"value"==c?m=f:"checked"==c?g=f:a&&"function"!=typeof f||p[c]===f||Ne(e,c,f,p[c],i)
|
|
26
|
+
;if(d)a||u&&(d.__html===u.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(u&&(e.innerHTML=""),we(e,ce(h)?h:[h],t,n,o,"foreignObject"==b?"http://www.w3.org/1999/xhtml":i,r,s,r?r[0]:n.__k&&ge(n,0),a,l),null!=r)for(c=r.length;c--;)ue(r[c]);a||(c="value","progress"==b&&null==m?e.removeAttribute("value"):void 0!==m&&(m!==e[c]||"progress"==b&&!m||"option"==b&&m!==p[c])&&Ne(e,c,m,p[c],i),c="checked",void 0!==g&&g!==e[c]&&Ne(e,c,g,p[c],i))}return e}function Ae(e,t,n){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){Q.__e(e,n)}}function Re(e,t,n){var o,i;if(Q.unmount&&Q.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||Ae(o,null,t)),null!=(o=e.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){Q.__e(e,t)}o.base=o.__P=null}if(o=e.__k)for(i=0;i<o.length;i++)o[i]&&Re(o[i],t,n||"function"!=typeof e.type);n||ue(e.__e),e.__c=e.__=e.__e=void 0}function Te(e,t,n){return this.constructor(e,n)}
|
|
27
|
+
function Pe(e,t,n){var o,i,r,s;t==document&&(t=document.documentElement),Q.__&&Q.__(e,t),i=(o="function"==typeof n)?null:t.__k,r=[],s=[],Se(t,e=(!o&&n||t).__k=function(e,t,n){var o,i,r,s={};for(r in t)"key"==r?o=t[r]:"ref"==r?i=t[r]:s[r]=t[r];if(arguments.length>2&&(s.children=arguments.length>3?K.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(r in e.defaultProps)void 0===s[r]&&(s[r]=e.defaultProps[r]);return he(e,s,o,i,null)}(fe,null,[e]),i||se,se,t.namespaceURI,!o&&n?[n]:i?null:t.firstChild?K.call(t.childNodes):null,r,!o&&n?n:i?i.__e:t.firstChild,o,s),Ee(r,e,s)}function Le(e,t){var n={__c:t="__cC"+re++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,o;return this.getChildContext||(n=new Set,(o={})[t]=this,this.getChildContext=function(){return o},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.forEach((function(e){e.__e=!0,_e(e)}))},this.sub=function(e){n.add(e);var t=e.componentWillUnmount
|
|
28
|
+
;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}K=ae.slice,Q={__e:function(e,t,n,o){for(var i,r,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((r=i.constructor)&&null!=r.getDerivedStateFromError&&(i.setState(r.getDerivedStateFromError(e)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,o||{}),s=i.__d),s)return i.__E=i}catch(t){e=t}throw e}},G=0,me.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=de({},this.state),"function"==typeof e&&(e=e(de({},n),this.props)),e&&de(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),_e(this))},me.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),_e(this))},me.prototype.render=fe,Y=[],Z="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ee=function(e,t){return e.__v.__b-t.__v.__b},be.__r=0,te=/(PointerCapture)$|Capture$/i,ne=0,oe=Ce(!1),ie=Ce(!0),re=0
|
|
29
|
+
;var Oe,Me,Ie,Be,Fe=0,De=[],He=Q,Ve=He.__b,Ue=He.__r,qe=He.diffed,$e=He.__c,We=He.unmount,ze=He.__;function je(e,t){He.__h&&He.__h(Me,e,Fe||t),Fe=0;var n=Me.__H||(Me.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function Xe(e){return Fe=1,function(e,t,n){var o=je(Oe++,2);if(o.t=e,!o.__c&&(o.__=[at(void 0,t),function(e){var t=o.__N?o.__N[0]:o.__[0],n=o.t(t,e);t!==n&&(o.__N=[n,o.__[1]],o.__c.setState({}))}],o.__c=Me,!Me.u)){var i=function(e,t,n){if(!o.__c.__H)return!0;var i=o.__c.__H.__.filter((function(e){return!!e.__c}));if(i.every((function(e){return!e.__N})))return!r||r.call(this,e,t,n);var s=o.__c.props!==e;return i.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}})),r&&r.call(this,e,t,n)||s};Me.u=!0;var r=Me.shouldComponentUpdate,s=Me.componentWillUpdate;Me.componentWillUpdate=function(e,t,n){if(this.__e){var o=r;r=void 0,i(e,t,n),r=o}s&&s.call(this,e,t,n)},Me.shouldComponentUpdate=i}return o.__N||o.__}(at,e)}function Ke(e,t){var n=je(Oe++,3)
|
|
30
|
+
;!He.__s&&st(n.__H,t)&&(n.__=e,n.i=t,Me.__H.__h.push(n))}function Qe(e,t){var n=je(Oe++,4);!He.__s&&st(n.__H,t)&&(n.__=e,n.i=t,Me.__h.push(n))}function Ge(e){return Fe=5,Ye((function(){return{current:e}}),[])}function Ye(e,t){var n=je(Oe++,7);return st(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Je(e,t){return Fe=8,Ye((function(){return e}),t)}function Ze(e){var t=Me.context[e.__c],n=je(Oe++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(Me)),t.props.value):e.__}function et(){var e=je(Oe++,11);if(!e.__){for(var t=Me.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function tt(){for(var e;e=De.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(it),e.__H.__h.forEach(rt),e.__H.__h=[]}catch(t){e.__H.__h=[],He.__e(t,e.__v)}}He.__b=function(e){Me=null,Ve&&Ve(e)},He.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ze&&ze(e,t)},He.__r=function(e){Ue&&Ue(e),Oe=0;var t=(Me=e.__c).__H;t&&(Ie===Me?(t.__h=[],Me.__h=[],t.__.forEach((function(e){
|
|
31
|
+
e.__N&&(e.__=e.__N),e.i=e.__N=void 0}))):(t.__h.forEach(it),t.__h.forEach(rt),t.__h=[],Oe=0)),Ie=Me},He.diffed=function(e){qe&&qe(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==De.push(t)&&Be===He.requestAnimationFrame||((Be=He.requestAnimationFrame)||ot)(tt)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.i=void 0}))),Ie=Me=null},He.__c=function(e,t){t.some((function(e){try{e.__h.forEach(it),e.__h=e.__h.filter((function(e){return!e.__||rt(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],He.__e(n,e.__v)}})),$e&&$e(e,t)},He.unmount=function(e){We&&We(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{it(e)}catch(e){t=e}})),n.__H=void 0,t&&He.__e(t,n.__v))};var nt="function"==typeof requestAnimationFrame;function ot(e){var t,n=function(){clearTimeout(o),nt&&cancelAnimationFrame(t),setTimeout(e)},o=setTimeout(n,100);nt&&(t=requestAnimationFrame(n))}function it(e){var t=Me,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),Me=t}function rt(e){var t=Me;e.__c=e.__(),Me=t}function st(e,t){
|
|
32
|
+
return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function at(e,t){return"function"==typeof t?t(e):t}const lt={alt:1,ctrl:2,meta:4,shift:8};function ct(e,t){if(!(e instanceof KeyboardEvent))return!1;const n=t.split("+").map((e=>e.toLowerCase()));let o=0,i=null;for(const e of n){const t=lt[e];if(t)o|=t;else{if(null!==i)throw new Error("Multiple non-modifier keys specified");i=e}}if(!i)throw new Error(`Invalid shortcut: ${t}`);return((e.ctrlKey?lt.ctrl:0)|(e.metaKey?lt.meta:0)|(e.altKey?lt.alt:0)|(e.shiftKey?lt.shift:0))===o&&e.key.toLowerCase()===i}function dt(e,t,{rootElement:n}={}){Ke((()=>{if(e)return function(e,t,{rootElement:n=document.documentElement??void 0}={}){const o=n=>{ct(n,e)&&t(n)};return n?(n.addEventListener("keydown",o),()=>n.removeEventListener("keydown",o)):()=>{}}(e,t,{rootElement:n})}),[e,t,n])}const ut=(e=window)=>e.matchMedia("(pointer: coarse)").matches;function ht(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e
|
|
33
|
+
;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class ft{constructor(){ht(this,"_listeners",void 0),this._listeners=new Map}add(e,t,n,o){e.addEventListener(t,n,o);const i=Symbol();return this._listeners.set(i,{eventTarget:e,eventType:t,listener:n,options:o}),i}remove(e){const t=this._listeners.get(e);if(t){const{eventTarget:n,eventType:o,listener:i,options:r}=t;n.removeEventListener(o,i,r),this._listeners.delete(e)}}removeAll(){this._listeners.forEach((({eventTarget:e,eventType:t,listener:n,options:o})=>{e.removeEventListener(t,n,o)})),this._listeners.clear()}}function mt(e){e.focus()}
|
|
34
|
+
function gt(e,{autofocus:t=!1,loop:n=!0,horizontal:o=!0,vertical:i=!0,selector:r="a,button",containerVisible:s=!0,focusElement:a=mt}={}){const l=Ge(null),c=function(e){const t=Ge({callback:e,call:(...e)=>t.current.callback(...e)});return t.current.callback=e,t.current.call}(a);Ke((()=>{if(!s)return()=>{};if(!e.current)throw new Error("Container ref not set");const a=e.current,d=()=>{const e=Array.from(a.querySelectorAll(r)).filter((e=>null!==e.offsetParent&&!function(e){return"boolean"==typeof e.disabled&&e.disabled}(e)));return document.activeElement===a&&e.unshift(a),e},u=(e=d(),t=-1,n=!1,o)=>{t<0&&(t=e.findIndex((e=>0===e.tabIndex)))<0&&(t=0);for(const[i,r]of e.entries())r.tabIndex=i===t?0:-1,i===t&&n&&(l.current=r,c(r,o))},h=d(),f=l.current?h.indexOf(l.current):0;u(h,f,t);const m=new ft;m.add(a,"focusin",(e=>{if(e.target===a&&l.current)return void c(l.current);const n=d(),o=n.indexOf(e.target);o>=0&&u(n,o,t)})),m.add(a,"keydown",(e=>{const t=d();let r=t.findIndex((e=>0===e.tabIndex)),s=!1
|
|
35
|
+
;o&&"ArrowLeft"===e.key||i&&"ArrowUp"===e.key?(0===r?r=n?t.length-1:r:--r,s=!0):o&&"ArrowRight"===e.key||i&&"ArrowDown"===e.key?(r===t.length-1?r=n?0:r:++r,s=!0):"Home"===e.key?(r=0,s=!0):"End"===e.key&&(r=t.length-1,s=!0),s&&(u(t,r,!0,e),e.preventDefault(),e.stopPropagation())}));const g=new MutationObserver((()=>{u()}));return g.observe(a,{subtree:!0,attributes:!0,attributeFilter:["disabled"],childList:!0}),()=>{m.removeAll(),g.disconnect()}}),[t,e,c,o,n,r,i,s])}function pt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class _t{constructor(e){pt(this,"_target",void 0),pt(this,"_value",void 0),this._target=e,this._value=null}
|
|
36
|
+
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 bt(e){const t=Ge(new _t(e));return t.current.target=e,t.current}var wt,vt={exports:{}};var yt,xt=(wt||(wt=1,yt=vt,function(){var e={}.hasOwnProperty;function t(){for(var e="",t=0;t<arguments.length;t++){var i=arguments[t];i&&(e=o(e,n(i)))}return e}function n(n){if("string"==typeof n||"number"==typeof n)return n;if("object"!=typeof n)return"";if(Array.isArray(n))return t.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var i="";for(var r in n)e.call(n,r)&&n[r]&&(i=o(i,r));return i}function o(e,t){return t?e?e+" "+t:e+t:e}yt.exports?(t.default=t,yt.exports=t):window.classNames=t}()),vt.exports),Nt=t(xt);var Ct=0
|
|
37
|
+
;function St(e,t,n,o,i,r){t||(t={});var s,a,l=t;"ref"in t&&(s=t.ref,delete t.ref);var c={type:e,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Ct,__i:-1,__u:0,__source:i,__self:r};if("function"==typeof e&&(s=e.defaultProps))for(a in s)void 0===l[a]&&(l[a]=s[a]);return Q.vnode&&Q.vnode(c),c}Le({}),Le({});var Et="/home/runner/work/frontend-shared/frontend-shared/src/components/layout/Card.tsx";function kt({children:e,classes:t,elementRef:n,active:o=!1,variant:i="raised",width:r="full",...s}){return St("div",{"data-component":"Card",...s,ref:n,className:Nt("rounded-lg border bg-white",{"shadow hover:shadow-md":"raised"===i,"shadow-md":o&&"raised"===i},{"w-full":"full"===r,"w-auto":"auto"===r},t),children:e},void 0,0,{fileName:Et,lineNumber:40,columnNumber:5},this)}var At="/home/runner/work/frontend-shared/frontend-shared/src/components/layout/CardContent.tsx";function Rt({children:e,classes:t,elementRef:n,size:o="md",...i}){return St("div",{"data-component":"CardContent",
|
|
38
|
+
...i,ref:n,className:Nt({"p-3 space-y-4":"md"===o,"p-2 space-y-3":"sm"===o,"p-4 space-y-6":"lg"===o},t),children:e},void 0,0,{fileName:At,lineNumber:29,columnNumber:5},this)}var Tt="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Annotate.tsx";function Pt(e){return St("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16","data-component":"AnnotateIcon",...e,children:St("path",{fill:"currentColor",
|
|
39
39
|
d:"M15 0q.406 0 .703.297A.96.96 0 0 1 16 1v15l-4-3H1a.97.97 0 0 1-.703-.29A.95.95 0 0 1 0 12V1A.96.96 0 0 1 .29.29.97.97 0 0 1 1 0zM7 3l-.469.063q-.468.062-1.031.437T4.469 4.688Q3.999 5.5 4 7l.002.063.006.062a1 1 0 0 1 .008.11l-.002.074-.006.066a1.45 1.45 0 0 0 .43 1.188Q4.874 9 5.5 9q.624 0 1.063-.438Q7 8.126 7 7.5q0-.624-.438-1.063A1.45 1.45 0 0 0 5.5 6a1.5 1.5 0 0 0-.422.062q.266-1.545 1.094-1.804L7 4zm5 0-.469.063q-.468.062-1.031.437T9.469 4.688Q8.999 5.5 9 7l.002.063.006.062a1 1 0 0 1 .008.11l-.002.074-.006.066a1.45 1.45 0 0 0 .43 1.188Q9.874 9 10.5 9q.624 0 1.063-.438Q12 8.125 12 7.5t-.438-1.063A1.45 1.45 0 0 0 10.5 6a1.5 1.5 0 0 0-.422.062q.266-1.545 1.094-1.804L12 4z"},void 0,0,{fileName:Tt,lineNumber:19,columnNumber:7},this)},void 0,0,{fileName:Tt,lineNumber:11,columnNumber:5},this)}var Lt="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Cancel.tsx";function Ot(e){return St("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",
|
|
40
40
|
viewBox:"0 0 16 16","data-component":"CancelIcon",...e,children:St("g",{fill:"none","fill-rule":"evenodd",children:[St("path",{d:"M0 0h16v16H0z"},void 0,0,{fileName:Lt,lineNumber:21,columnNumber:9},this),St("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m8 8 3.536-3.536zL4.464 4.464zm0 0-3.536 3.536zl3.536 3.536z"},void 0,0,{fileName:Lt,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:Lt,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:Lt,lineNumber:11,columnNumber:5},this)}var Mt="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/CaretDown.tsx";function It(e){return St("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"CaretDownIcon",...e,children:St("g",{fill:"none","fill-rule":"evenodd",children:[St("path",{d:"M0 0h16v16H0z"},void 0,0,{fileName:Mt,lineNumber:21,columnNumber:9},this),St("path",{stroke:"currentColor","stroke-linecap":"round",
|
|
41
41
|
"stroke-linejoin":"round","stroke-width":"2",d:"m12 6-4 4-4-4"},void 0,0,{fileName:Mt,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:Mt,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:Mt,lineNumber:11,columnNumber:5},this)}var Bt="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/CaretLeft.tsx";function Ft(e){return St("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"CaretLeftIcon",...e,children:St("g",{fill:"none","fill-rule":"evenodd",children:[St("path",{d:"M0 0h16v16H0z"},void 0,0,{fileName:Bt,lineNumber:21,columnNumber:9},this),St("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 12 6 8l4-4"},void 0,0,{fileName:Bt,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:Bt,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:Bt,lineNumber:11,columnNumber:5},this)}
|
|
@@ -144,7 +144,7 @@ this._sidebarRPC.on("navigateToSegment",(e=>this._integration.navigateToSegment?
|
|
|
144
144
|
if(!t.selector||!t.selector.some((e=>"TextQuoteSelector"===e.type)))return{annotation:e,target:t};let n;try{const o=await this._integration.anchor(this.element,t.selector),i=mo.fromRange(o);n={annotation:e,target:t,range:i}}catch{n={annotation:e,target:t}}return n})));if(!this._annotations.has(e.$tag))return[];for(const e of n)t(e);return e.$orphan=n.length>0&&n.every((e=>e.target.selector&&!e.range)),this._updateAnchors(this.anchors.concat(n),!0),this._sidebarRPC.call("syncAnchoringStatus",e),n}detach(e,t=!0){this._annotations.delete(e);const n=[];for(const t of this.anchors)t.annotation.$tag!==e?n.push(t):t.highlights&&ko(t.highlights);this._updateAnchors(n,t)}_updateAnchors(e,t){this.anchors=e,this._clusterToolbar?.scheduleClusterUpdates(),t&&this._bucketBarClient.update(this.anchors)}async createAnnotation({highlight:e=!1}={}){const t=this.selectedRanges;this.selectedRanges=[];const n=await this.getDocumentInfo(),o=this.element,i=(await Promise.all(t.map((e=>this._integration.describe(o,e))))).map((e=>({
|
|
145
145
|
source:n.uri,selector:e}))),s={uri:n.uri,document:n.metadata,target:i,$highlight:e,$cluster:e?"user-highlights":"user-annotations",$tag:"a:"+r(8)};return this._sidebarRPC.call("createAnnotation",s),this.anchor(s),Er(),s}_hoverAnnotations(e){this._hoveredAnnotations.clear(),e.forEach((e=>this._hoveredAnnotations.add(e)));for(const t of this.anchors)if(t.highlights){const n=e.includes(t.annotation.$tag);Ao(t.highlights,n)}this._sidebarRPC.call("hoverAnnotations",e)}_onSelection(e){const t=this._integration.getAnnotatableRange(e);if(!t)return void this._onClearSelection();const n=document.getSelection(),o=wo(n),i=xo(n);i?(this.selectedRanges=[t],this._hostRPC.call("textSelected"),this._adder.annotationsForSelection=Nr(),this._isAdderVisible=!0,this._adder.show(i,o)):this._onClearSelection()}_onClearSelection(){this._isAdderVisible=!1,this._adder.hide(),this.selectedRanges=[],this._informHostOnNextSelectionClear&&this._hostRPC.call("textUnselected"),this._informHostOnNextSelectionClear=!0}
|
|
146
146
|
selectAnnotations(e,{toggle:t=!1,focusInSidebar:n=!1}={}){t?this._sidebarRPC.call("toggleAnnotationSelection",e):this._sidebarRPC.call("showAnnotations",e,n),this._sidebarRPC.call("openSidebar")}setHighlightsVisible(e,t=!0){!function(e,t){e.classList.toggle("hypothesis-highlights-always-on",t)}(this.element,e),this._highlightsVisible=e,t&&this._hostRPC.call("highlightsVisibleChanged",e)}get highlightsVisible(){return this._highlightsVisible}fitSideBySide(e){this._sidebarLayout=e,this._integration.fitSideBySide(e)}get hoveredAnnotationTags(){return this._hoveredAnnotations}_handleShortcut(e){ct(e,"Ctrl+Shift+H")&&this.setHighlightsVisible(!this._highlightsVisible)}_setOutsideAssignmentNoticeVisible(e){this._outsideAssignmentNotice||(this._outsideAssignmentNotice=new vr(this.element)),this._outsideAssignmentNotice.setVisible(e)}}function Rr(e,t){const n=new URL(e),o=new URLSearchParams;return o.append("config",JSON.stringify(t)),n.hash=o.toString(),n.toString()}function Tr(e,t){const n={}
|
|
147
|
-
;for(const[e,o]of Object.entries(t))"notebookAppUrl"!==e&&"sidebarAppUrl"!==e&&null!=o&&(n[e]=o);n.origin=new URL(e).origin,n.version="1.
|
|
147
|
+
;for(const[e,o]of Object.entries(t))"notebookAppUrl"!==e&&"sidebarAppUrl"!==e&&null!=o&&(n[e]=o);n.origin=new URL(e).origin,n.version="1.1546.0";const o=new URL(window.location.href);if(o.hash="",n.hostURL=o.toString(),Array.isArray(n.services)&&n.services?.length>0){const e=n.services[0];e.onLoginRequest&&(e.onLoginRequestProvided=!0),e.onLogoutRequest&&(e.onLogoutRequestProvided=!0),e.onSignupRequest&&(e.onSignupRequestProvided=!0),e.onProfileRequest&&(e.onProfileRequestProvided=!0),e.onHelpRequest&&(e.onHelpRequestProvided=!0)}return n}function Pr({closed:e,onClose:t,children:n,"data-testid":o,"aria-label":i}){const r=Ge(null);return Ke((()=>{e?r.current?.close():r.current?.showModal()}),[e]),Ke((()=>{const e=r.current;return e?.addEventListener("cancel",t),()=>{e?.removeEventListener("cancel",t)}}),[t]),St("dialog",{ref:r,className:"relative w-full h-full backdrop:bg-black/50","data-testid":o,"aria-label":i,children:n})}function Lr({closed:e,children:t,...n}){return St("div",{...n,
|
|
148
148
|
className:Nt("fixed z-max top-0 left-0 right-0 bottom-0 p-3 bg-black/50",{hidden:e}),children:St("div",{className:"relative w-full h-full",children:t})})}function Or({document_:e=document,...t}){return St(Ye((()=>function(e){return"function"==typeof e.createElement("dialog").showModal}(e)?Pr:Lr),[e]),{...t})}function Mr({config:e,groupId:t}){return St("iframe",{title:"Hypothesis annotation notebook",className:"h-full w-full border-0",allow:"fullscreen; clipboard-write",src:Rr(e.notebookAppUrl,{...Tr(e.notebookAppUrl,e),group:t})})}function Ir({eventBus:e,config:t}){const[n,o]=Xe(0),[i,r]=Xe(!0),[s,a]=Xe(null),l=Ge(""),c=Ge(null);Ke((()=>(l.current=document.body.style.overflow,()=>{document.body.style.overflow=l.current})),[]),Ke((()=>{document.body.style.overflow=i?l.current:"hidden"}),[i]),Ke((()=>{const t=e.createEmitter();return t.subscribe("openNotebook",(e=>{r(!1),o((e=>e+1)),a(e)})),c.current=t,()=>{t.destroy()}}),[e]);const d=Je((()=>{r(!0),c.current?.publish("closeNotebook")}),[])
|
|
149
149
|
;return null===s?null:St(Or,{closed:i,onClose:d,"data-testid":"notebook-outer","aria-label":"Hypothesis notebook",children:[St("div",{className:"absolute right-0 m-3",children:St(yn,{title:"Close notebook",onClick:d,variant:"dark",classes:Nt("!bg-transparent enabled:hover:!bg-grey-3"),"data-testid":"close-button",children:St(Ot,{className:"w-4 h-4"})})}),St(Mr,{config:t,groupId:s},n)]})}class Br{constructor(e,t,n){this._container=new to("notebook",(()=>St(Ir,{eventBus:t,config:n}))),e.append(this._container.element),this._container.render()}destroy(){this._container.destroy()}}function Fr({eventBus:e,config:t}){const[n,o]=Xe(!0),i=Ge(null);Ke((()=>{const t=e.createEmitter();return t.subscribe("openProfile",(()=>{o(!1)})),i.current=t,()=>{t.destroy()}}),[e]);const r=()=>{o(!0),i.current?.publish("closeProfile")};return n?null:St(Or,{closed:n,onClose:r,"data-testid":"profile-outer","aria-label":"Hypothesis profile",children:[St("div",{className:"absolute right-0 m-3",children:St(yn,{
|
|
150
150
|
title:"Close profile dialog",onClick:r,variant:"dark",classes:Nt("!bg-transparent enabled:hover:!bg-grey-3"),children:St(Ot,{className:"w-4 h-4"})})}),St("iframe",{title:"Hypothesis profile",className:"h-full w-full border-0",src:t.profileAppUrl})]})}class Dr{constructor(e,t,n){this._container=new to("profile",(()=>St(Fr,{eventBus:t,config:n}))),e.append(this._container.element),this._container.render()}destroy(){this._container.destroy()}}function Hr({above:e,below:t,buckets:n,onFocusAnnotations:o,onScrollToAnnotation:i,onSelectAnnotations:r}){const s=e.anchors.length>0,a=t.anchors.length>0,l=e=>e.anchors.map((e=>e.tag));return St("ul",{className:"relative",children:[s&&St("li",{className:"absolute right-0 pointer-events-auto mt-[-11px]",style:{top:e.position},children:St(Kn,{"data-testid":"up-navigation-button",direction:"up",onClick:()=>{const t=[...e.anchors].sort(((e,t)=>e.bottom-t.bottom)),n=t[t.length-1];i(n.tag)},onBlur:()=>o([]),onFocus:()=>o(l(e)),onMouseEnter:()=>o(l(e)),onMouseOut:()=>o([]),
|