hypothesis 1.1522.0 → 1.1524.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 CHANGED
@@ -1 +1 @@
1
- !function(){"use strict";var s={"scripts/annotator.bundle.js":"scripts/annotator.bundle.js?793870","styles/annotator.css":"styles/annotator.css?f1348d","styles/annotator.css.map":"styles/annotator.css.map?4dcebd","styles/highlights.css":"styles/highlights.css?6b4ebd","styles/highlights.css.map":"styles/highlights.css.map?241350","styles/katex.min.css":"styles/katex.min.css?58e394","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?9f6cfa","styles/sidebar.css.map":"styles/sidebar.css.map?7780ad","styles/ui-playground.css":"styles/ui-playground.css?854f91","styles/ui-playground.css.map":"styles/ui-playground.css.map?647144","scripts/sidebar.bundle.js":"scripts/sidebar.bundle.js?07ce28","scripts/ui-playground.bundle.js":"scripts/ui-playground.bundle.js?732680","scripts/annotator.bundle.js.map":"scripts/annotator.bundle.js.map?6bbeb2","scripts/ui-playground.bundle.js.map":"scripts/ui-playground.bundle.js.map?b1d4de","scripts/sidebar.bundle.js.map":"scripts/sidebar.bundle.js.map?c9ea95"};function t(s){s.setAttribute("data-hypothesis-asset","")}function e(s,e){var n=s.createElement("link");n.rel="stylesheet",n.type="text/css",n.href=e,t(n),s.head.appendChild(n)}function n(s,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.esModule,o=void 0===r||r,i=n.forceReload,a=void 0!==i&&i,l=s.createElement("script");o&&(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,n,r){var o=s.createElement("link");o.rel=e,o.href=r,o.type="application/annotator+".concat(n),t(o),s.head.appendChild(o)}function o(s,e,n){var r=s.createElement("link");r.rel="preload",r.as=e,r.href=n,"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=[function(){return Object.fromEntries([])},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 l=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),p=a(l.assetRoot||"https://cdn.hypothes.is/hypothesis/1.1522.0/");if(document.querySelector("hypothesis-app")){!function(s,t){o(s,"fetch",t.apiUrl),o(s,"fetch",t.apiUrl+"links");for(var r=0,a=["scripts/sidebar.bundle.js"];r<a.length;r++)n(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 u=l,d=a(u.notebookAppUrl||"https://hypothes.is/notebook"),h=a(u.profileAppUrl||"https://hypothes.is/user-profile"),y=a(u.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),o(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++)n(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,u=p;c<u.length;c++)e(s,i(t,u[c]))}}(document,{assetRoot:p,manifest:s,notebookAppUrl:d,profileAppUrl: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/.")}();
1
+ !function(){"use strict";var s={"scripts/annotator.bundle.js":"scripts/annotator.bundle.js?5f9e1e","styles/annotator.css.map":"styles/annotator.css.map?4dcebd","styles/annotator.css":"styles/annotator.css?e1c6e7","styles/highlights.css":"styles/highlights.css?6b4ebd","styles/highlights.css.map":"styles/highlights.css.map?241350","styles/katex.min.css":"styles/katex.min.css?58e394","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?f04d36","styles/sidebar.css.map":"styles/sidebar.css.map?7780ad","styles/ui-playground.css":"styles/ui-playground.css?47f01e","styles/ui-playground.css.map":"styles/ui-playground.css.map?647144","scripts/annotator.bundle.js.map":"scripts/annotator.bundle.js.map?fcf1c7","scripts/sidebar.bundle.js":"scripts/sidebar.bundle.js?1e1b39","scripts/ui-playground.bundle.js":"scripts/ui-playground.bundle.js?7e39a1","scripts/ui-playground.bundle.js.map":"scripts/ui-playground.bundle.js.map?4b9470","scripts/sidebar.bundle.js.map":"scripts/sidebar.bundle.js.map?a68617"};function t(s){s.setAttribute("data-hypothesis-asset","")}function e(s,e){var n=s.createElement("link");n.rel="stylesheet",n.type="text/css",n.href=e,t(n),s.head.appendChild(n)}function n(s,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.esModule,o=void 0===r||r,i=n.forceReload,a=void 0!==i&&i,l=s.createElement("script");o&&(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,n,r){var o=s.createElement("link");o.rel=e,o.href=r,o.type="application/annotator+".concat(n),t(o),s.head.appendChild(o)}function o(s,e,n){var r=s.createElement("link");r.rel="preload",r.as=e,r.href=n,"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=[function(){return Object.fromEntries([])},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 l=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),p=a(l.assetRoot||"https://cdn.hypothes.is/hypothesis/1.1524.0/");if(document.querySelector("hypothesis-app")){!function(s,t){o(s,"fetch",t.apiUrl),o(s,"fetch",t.apiUrl+"links");for(var r=0,a=["scripts/sidebar.bundle.js"];r<a.length;r++)n(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 u=l,d=a(u.notebookAppUrl||"https://hypothes.is/notebook"),h=a(u.profileAppUrl||"https://hypothes.is/user-profile"),y=a(u.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),o(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++)n(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,u=p;c<u.length;c++)e(s,i(t,u[c]))}}(document,{assetRoot:p,manifest:s,notebookAppUrl:d,profileAppUrl: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/.")}();
@@ -1,20 +1,20 @@
1
1
  {
2
- "scripts/annotator.bundle.js": "scripts/annotator.bundle.js?793870",
3
- "styles/annotator.css": "styles/annotator.css?f1348d",
2
+ "scripts/annotator.bundle.js": "scripts/annotator.bundle.js?5f9e1e",
4
3
  "styles/annotator.css.map": "styles/annotator.css.map?4dcebd",
4
+ "styles/annotator.css": "styles/annotator.css?e1c6e7",
5
5
  "styles/highlights.css": "styles/highlights.css?6b4ebd",
6
6
  "styles/highlights.css.map": "styles/highlights.css.map?241350",
7
7
  "styles/katex.min.css": "styles/katex.min.css?58e394",
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?9f6cfa",
11
+ "styles/sidebar.css": "styles/sidebar.css?f04d36",
12
12
  "styles/sidebar.css.map": "styles/sidebar.css.map?7780ad",
13
- "styles/ui-playground.css": "styles/ui-playground.css?854f91",
13
+ "styles/ui-playground.css": "styles/ui-playground.css?47f01e",
14
14
  "styles/ui-playground.css.map": "styles/ui-playground.css.map?647144",
15
- "scripts/sidebar.bundle.js": "scripts/sidebar.bundle.js?07ce28",
16
- "scripts/ui-playground.bundle.js": "scripts/ui-playground.bundle.js?732680",
17
- "scripts/annotator.bundle.js.map": "scripts/annotator.bundle.js.map?6bbeb2",
18
- "scripts/ui-playground.bundle.js.map": "scripts/ui-playground.bundle.js.map?b1d4de",
19
- "scripts/sidebar.bundle.js.map": "scripts/sidebar.bundle.js.map?c9ea95"
15
+ "scripts/annotator.bundle.js.map": "scripts/annotator.bundle.js.map?fcf1c7",
16
+ "scripts/sidebar.bundle.js": "scripts/sidebar.bundle.js?1e1b39",
17
+ "scripts/ui-playground.bundle.js": "scripts/ui-playground.bundle.js?7e39a1",
18
+ "scripts/ui-playground.bundle.js.map": "scripts/ui-playground.bundle.js.map?4b9470",
19
+ "scripts/sidebar.bundle.js.map": "scripts/sidebar.bundle.js.map?a68617"
20
20
  }
@@ -33,8 +33,8 @@ return"function"==typeof t?t(e):t}const at={alt:1,ctrl:2,meta:4,shift:8};functio
33
33
  ;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 dt{constructor(){ht(this,"_listeners",void 0),this._listeners=new Map}add(e,t,n,i){e.addEventListener(t,n,i);const o=Symbol();return this._listeners.set(o,{eventTarget:e,eventType:t,listener:n,options:i}),o}remove(e){const t=this._listeners.get(e);if(t){const{eventTarget:n,eventType:i,listener:o,options:r}=t;n.removeEventListener(i,o,r),this._listeners.delete(e)}}removeAll(){this._listeners.forEach((({eventTarget:e,eventType:t,listener:n,options:i})=>{e.removeEventListener(t,n,i)})),this._listeners.clear()}}function ft(e){e.focus()}function mt(e,{autofocus:t=!1,loop:n=!0,horizontal:i=!0,vertical:o=!0,selector:r="a,button",containerVisible:s=!0,focusElement:a=ft}={}){const l=Ge(null),c=function(e){const t=Ge({callback:e,call:(...e)=>t.current.callback(...e)})
34
34
  ;return t.current.callback=e,t.current.call}(a);Xe((()=>{if(!s)return()=>{};if(!e.current)throw new Error("Container ref not set");const a=e.current,u=()=>{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},h=(e=u(),t=-1,n=!1,i)=>{t<0&&(t=e.findIndex((e=>0===e.tabIndex)))<0&&(t=0);for(const[o,r]of e.entries())r.tabIndex=o===t?0:-1,o===t&&n&&(l.current=r,c(r,i))},d=u(),f=l.current?d.indexOf(l.current):0;h(d,f,t);const m=new dt;m.add(a,"focusin",(e=>{if(e.target===a&&l.current)return void c(l.current);const n=u(),i=n.indexOf(e.target);i>=0&&h(n,i,t)})),m.add(a,"keydown",(e=>{const t=u();let r=t.findIndex((e=>0===e.tabIndex)),s=!1;i&&"ArrowLeft"===e.key||o&&"ArrowUp"===e.key?(0===r?r=n?t.length-1:r:--r,s=!0):i&&"ArrowRight"===e.key||o&&"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&&(h(t,r,!0,e),
35
35
  e.preventDefault(),e.stopPropagation())}));const p=new MutationObserver((()=>{h()}));return p.observe(a,{subtree:!0,attributes:!0,attributeFilter:["disabled"],childList:!0}),()=>{m.removeAll(),p.disconnect()}}),[t,e,c,i,n,r,o,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 i=n.call(e,t||"default");if("object"!=typeof i)return i;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 gt{constructor(e){pt(this,"_target",void 0),pt(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
36
- ;"function"==typeof this._target?this._target(e):this._target&&(this._target.current=e)}}function _t(e){const t=Ge(new gt(e));return t.current.target=e,t.current}var bt,vt={exports:{}};var yt,wt=(bt||(bt=1,yt=vt,function(){var e={}.hasOwnProperty;function t(){for(var e="",t=0;t<arguments.length;t++){var o=arguments[t];o&&(e=i(e,n(o)))}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 o="";for(var r in n)e.call(n,r)&&n[r]&&(o=i(o,r));return o}function i(e,t){return t?e?e+" "+t:e+t:e}yt.exports?(t.default=t,yt.exports=t):window.classNames=t}()),vt.exports),xt=t(wt);var Ct=0;function Nt(e,t,n,i,o,r){t||(t={});var s,a,l=t;if("ref"in l)for(a in l={},t)"ref"==a?s=t[a]:l[a]=t[a];var c={type:e,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--Ct,__i:-1,__u:0,
37
- __source:o,__self:r};if("function"==typeof e&&(s=e.defaultProps))for(a in s)void 0===l[a]&&(l[a]=s[a]);return G.vnode&&G.vnode(c),c}Pe({}),Pe({});var St="/home/runner/work/frontend-shared/frontend-shared/src/components/layout/Card.tsx";function Et({children:e,classes:t,elementRef:n,active:i=!1,variant:o="raised",width:r="full",...s}){return Nt("div",{"data-component":"Card",...s,ref:n,className:xt("rounded-lg border bg-white",{"shadow hover:shadow-md":"raised"===o,"shadow-md":i&&"raised"===o},{"w-full":"full"===r,"w-auto":"auto"===r},t),children:e},void 0,0,{fileName:St,lineNumber:40,columnNumber:5},this)}var At="/home/runner/work/frontend-shared/frontend-shared/src/components/layout/CardContent.tsx";function kt({children:e,classes:t,elementRef:n,size:i="md",...o}){return Nt("div",{"data-component":"CardContent",...o,ref:n,className:xt({"p-3 space-y-4":"md"===i,"p-2 space-y-3":"sm"===i,"p-4 space-y-6":"lg"===i},t),children:e},void 0,0,{fileName:At,lineNumber:29,columnNumber:5},this)}
36
+ ;"function"==typeof this._target?this._target(e):this._target&&(this._target.current=e)}}function _t(e){const t=Ge(new gt(e));return t.current.target=e,t.current}var bt,vt={exports:{}};var yt,wt=(bt||(bt=1,yt=vt,function(){var e={}.hasOwnProperty;function t(){for(var e="",t=0;t<arguments.length;t++){var o=arguments[t];o&&(e=i(e,n(o)))}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 o="";for(var r in n)e.call(n,r)&&n[r]&&(o=i(o,r));return o}function i(e,t){return t?e?e+" "+t:e+t:e}yt.exports?(t.default=t,yt.exports=t):window.classNames=t}()),vt.exports),xt=t(wt);var Ct=0;function Nt(e,t,n,i,o,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,__d:void 0,__c:null,constructor:void 0,__v:--Ct,__i:-1,__u:0,__source:o,__self:r}
37
+ ;if("function"==typeof e&&(s=e.defaultProps))for(a in s)void 0===l[a]&&(l[a]=s[a]);return G.vnode&&G.vnode(c),c}Pe({}),Pe({});var St="/home/runner/work/frontend-shared/frontend-shared/src/components/layout/Card.tsx";function Et({children:e,classes:t,elementRef:n,active:i=!1,variant:o="raised",width:r="full",...s}){return Nt("div",{"data-component":"Card",...s,ref:n,className:xt("rounded-lg border bg-white",{"shadow hover:shadow-md":"raised"===o,"shadow-md":i&&"raised"===o},{"w-full":"full"===r,"w-auto":"auto"===r},t),children:e},void 0,0,{fileName:St,lineNumber:40,columnNumber:5},this)}var At="/home/runner/work/frontend-shared/frontend-shared/src/components/layout/CardContent.tsx";function kt({children:e,classes:t,elementRef:n,size:i="md",...o}){return Nt("div",{"data-component":"CardContent",...o,ref:n,className:xt({"p-3 space-y-4":"md"===i,"p-2 space-y-3":"sm"===i,"p-4 space-y-6":"lg"===i},t),children:e},void 0,0,{fileName:At,lineNumber:29,columnNumber:5},this)}
38
38
  var Tt="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Annotate.tsx";function Rt(e){return Nt("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16","data-component":"AnnotateIcon",...e,children:Nt("path",{fill:"currentColor",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)
39
39
  },void 0,0,{fileName:Tt,lineNumber:11,columnNumber:5},this)}var Pt="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Cancel.tsx";function Ot(e){return Nt("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:Nt("g",{fill:"none","fill-rule":"evenodd",children:[Nt("path",{d:"M0 0h16v16H0z"},void 0,0,{fileName:Pt,lineNumber:21,columnNumber:9},this),Nt("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:Pt,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:Pt,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:Pt,lineNumber:11,columnNumber:5},this)}var It="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/CaretDown.tsx";function Mt(e){return Nt("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",
40
40
  viewBox:"0 0 16 16","data-component":"CaretDownIcon",...e,children:Nt("g",{fill:"none","fill-rule":"evenodd",children:[Nt("path",{d:"M0 0h16v16H0z"},void 0,0,{fileName:It,lineNumber:21,columnNumber:9},this),Nt("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m12 6-4 4-4-4"},void 0,0,{fileName:It,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:It,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:It,lineNumber:11,columnNumber:5},this)}var Lt="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/CaretLeft.tsx";function Bt(e){return Nt("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:Nt("g",{fill:"none","fill-rule":"evenodd",children:[Nt("path",{d:"M0 0h16v16H0z"},void 0,0,{fileName:Lt,lineNumber:21,columnNumber:9},this),Nt("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",
@@ -142,7 +142,7 @@ this._sidebarRPC.on("loadAnnotations",(async e=>{try{await Promise.all(e.map((e=
142
142
  ;const t=e=>{const t=yr(e);if(!t)return;const n=vi(t,e.annotation?.$cluster);n.forEach((t=>{t._annotation=e.annotation})),e.highlights=n,this._hoveredAnnotations.has(e.annotation.$tag)&&xi(n,!0)};this.detach(e.$tag,!1),this._annotations.add(e.$tag),e.target||(e.target=[]);const n=await Promise.all(e.target.map((async t=>{if(!t.selector||!t.selector.some((e=>"TextQuoteSelector"===e.type)))return{annotation:e,target:t};let n;try{const i=await this._integration.anchor(this.element,t.selector),o=li.fromRange(i);n={annotation:e,target:t,range:o}}catch(i){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&&wi(t.highlights);this._updateAnchors(n,t)}_updateAnchors(e,t){
143
143
  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(),i=this.element,o=(await Promise.all(t.map((e=>this._integration.describe(i,e))))).map((e=>({source:n.uri,selector:e}))),s={uri:n.uri,document:n.metadata,target:o,$highlight:e,$cluster:e?"user-highlights":"user-annotations",$tag:"a:"+r(8)};return this._sidebarRPC.call("createAnnotation",s),this.anchor(s),wr(),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);xi(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(),i=fi(n),o=gi(n);o?(this.selectedRanges=[t],this._hostRPC.call("textSelected"),
144
144
  this._adder.annotationsForSelection=br(),this._isAdderVisible=!0,this._adder.show(o,i)):this._onClearSelection()}_onClearSelection(){this._isAdderVisible=!1,this._adder.hide(),this.selectedRanges=[],this._informHostOnNextSelectionClear&&this._hostRPC.call("textUnselected"),this._informHostOnNextSelectionClear=!0}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){lt(e,"Ctrl+Shift+H")&&this.setHighlightsVisible(!this._highlightsVisible)}_setOutsideAssignmentNoticeVisible(e){
145
- this._outsideAssignmentNotice||(this._outsideAssignmentNotice=new pr(this.element)),this._outsideAssignmentNotice.setVisible(e)}}function Nr(e,t){const n=new URL(e),i=new URLSearchParams;return i.append("config",JSON.stringify(t)),n.hash=i.toString(),n.toString()}function Sr(e,t){const n={};for(const[e,i]of Object.entries(t))"notebookAppUrl"!==e&&"sidebarAppUrl"!==e&&null!=i&&(n[e]=i);n.origin=new URL(e).origin,n.version="1.1522.0";const i=new URL(window.location.href);if(i.hash="",n.hostURL=i.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 Er({closed:e,onClose:t,children:n,"data-testid":i,"aria-label":o}){const r=Ge(null);return Xe((()=>{e?r.current?.close():r.current?.showModal()}),[e]),Xe((()=>{const e=r.current
145
+ this._outsideAssignmentNotice||(this._outsideAssignmentNotice=new pr(this.element)),this._outsideAssignmentNotice.setVisible(e)}}function Nr(e,t){const n=new URL(e),i=new URLSearchParams;return i.append("config",JSON.stringify(t)),n.hash=i.toString(),n.toString()}function Sr(e,t){const n={};for(const[e,i]of Object.entries(t))"notebookAppUrl"!==e&&"sidebarAppUrl"!==e&&null!=i&&(n[e]=i);n.origin=new URL(e).origin,n.version="1.1524.0";const i=new URL(window.location.href);if(i.hash="",n.hostURL=i.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 Er({closed:e,onClose:t,children:n,"data-testid":i,"aria-label":o}){const r=Ge(null);return Xe((()=>{e?r.current?.close():r.current?.showModal()}),[e]),Xe((()=>{const e=r.current
146
146
  ;return e?.addEventListener("cancel",t),()=>{e?.removeEventListener("cancel",t)}}),[t]),Nt("dialog",{ref:r,className:"relative w-full h-full backdrop:bg-black/50","data-testid":i,"aria-label":o,children:n})}function Ar({closed:e,children:t,...n}){return Nt("div",{...n,className:xt("fixed z-max top-0 left-0 right-0 bottom-0 p-3 bg-black/50",{hidden:e}),children:Nt("div",{className:"relative w-full h-full",children:t})})}function kr({document_:e=document,...t}){return Nt(Ke((()=>function(e){return"function"==typeof e.createElement("dialog").showModal}(e)?Er:Ar),[e]),{...t})}function Tr({config:e,groupId:t}){return Nt("iframe",{title:"Hypothesis annotation notebook",className:"h-full w-full border-0",allow:"fullscreen; clipboard-write",src:Nr(e.notebookAppUrl,{...Sr(e.notebookAppUrl,e),group:t})})}function Rr({eventBus:e,config:t}){const[n,i]=je(0),[o,r]=je(!0),[s,a]=je(null),l=Ge(""),c=Ge(null);Xe((()=>(l.current=document.body.style.overflow,()=>{document.body.style.overflow=l.current})),[]),Xe((()=>{
147
147
  document.body.style.overflow=o?l.current:"hidden"}),[o]),Xe((()=>{const t=e.createEmitter();return t.subscribe("openNotebook",(e=>{r(!1),i((e=>e+1)),a(e)})),c.current=t,()=>{t.destroy()}}),[e]);const u=Qe((()=>{r(!0),c.current?.publish("closeNotebook")}),[]);return null===s?null:Nt(kr,{closed:o,onClose:u,"data-testid":"notebook-outer","aria-label":"Hypothesis notebook",children:[Nt("div",{className:"absolute right-0 m-3",children:Nt(yn,{title:"Close notebook",onClick:u,variant:"dark",classes:xt("!bg-transparent enabled:hover:!bg-grey-3"),"data-testid":"close-button",children:Nt(Ot,{className:"w-4 h-4"})})}),Nt(Tr,{config:t,groupId:s},n)]})}class Pr{constructor(e,t,n){this._container=new Kn("notebook",(()=>Nt(Rr,{eventBus:t,config:n}))),e.append(this._container.element),this._container.render()}destroy(){this._container.destroy()}}function Or({eventBus:e,config:t}){const[n,i]=je(!0),o=Ge(null);Xe((()=>{const t=e.createEmitter();return t.subscribe("openProfile",(()=>{i(!1)})),o.current=t,()=>{t.destroy()}
148
148
  }),[e]);const r=()=>{i(!0),o.current?.publish("closeProfile")};return n?null:Nt(kr,{closed:n,onClose:r,"data-testid":"profile-outer","aria-label":"Hypothesis profile",children:[Nt("div",{className:"absolute right-0 m-3",children:Nt(yn,{title:"Close profile dialog",onClick:r,variant:"dark",classes:xt("!bg-transparent enabled:hover:!bg-grey-3"),children:Nt(Ot,{className:"w-4 h-4"})})}),Nt("iframe",{title:"Hypothesis profile",className:"h-full w-full border-0",src:t.profileAppUrl})]})}class Ir{constructor(e,t,n){this._container=new Kn("profile",(()=>Nt(Or,{eventBus:t,config:n}))),e.append(this._container.element),this._container.render()}destroy(){this._container.destroy()}}var Mr,Lr={exports:{}};var Br=(Mr||(Mr=1,function(e){!function(t,n,i,o){var r,s=["","webkit","Moz","MS","ms","o"],a=n.createElement("div"),l="function",c=Math.round,u=Math.abs,h=Date.now;function d(e,t,n){return setTimeout(v(e,n),t)}function f(e,t,n){return!!Array.isArray(e)&&(m(e,n[t],n),!0)}function m(e,t,n){var i