replaywebpage 2.3.3 → 2.3.4
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/adblock/adblock.gz +0 -0
- package/dist/electron.js +1 -1
- package/dist/index.js +139 -139
- package/dist/preload.js +3 -3
- package/dist/sw.js +9 -9
- package/dist/types/index.d.ts +6 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/loader.d.ts.map +1 -1
- package/dist/types/misc.d.ts +11 -1
- package/dist/types/misc.d.ts.map +1 -1
- package/dist/types/swmanager.d.ts +1 -0
- package/dist/types/swmanager.d.ts.map +1 -1
- package/dist/types/utils/assertNonNullish.d.ts +2 -0
- package/dist/types/utils/assertNonNullish.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +5 -0
- package/dist/types/utils/index.d.ts.map +1 -0
- package/dist/utils.js +32 -0
- package/package.json +7 -3
- package/src/index.ts +11 -1
- package/src/loader.ts +2 -8
- package/src/misc.ts +5 -0
- package/src/swmanager.ts +12 -0
- package/src/utils/index.ts +4 -0
- package/sw.js +9 -9
- package/ui.js +108 -108
package/ui.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Licence: Apache-2.0
|
|
7
7
|
* https://github.com/nextapps-de/flexsearch
|
|
8
8
|
*/
|
|
9
|
-
function _f(self){"use strict";try{module&&(self=module)}catch(e){}var t;function u(e){return void 0===e||e}function aa(e){const t=Array(e);for(let i=0;i<e;i++)t[i]=v();return t}function v(){return Object.create(null)}function ba(e,t){return t.length-e.length}function x(e){return"string"==typeof e}function C(e){return"object"==typeof e}function D(e){return"function"==typeof e}function ca(e,t){var i=da;if(e&&(t&&(e=E(e,t)),this.H&&(e=E(e,this.H)),this.J&&1<e.length&&(e=E(e,this.J)),i||""===i)){if(e=e.split(i),this.filter){t=this.filter,i=e.length;const o=[];for(let n=0,r=0;n<i;n++){const i=e[n];i&&!t[i]&&(o[r++]=i)}e=o}return e}return e}self._factory=_f;const da=/[\p{Z}\p{S}\p{P}\p{C}]+/u,ea=/[\u0300-\u036f]/g;function fa(e,t){const i=Object.keys(e),o=i.length,n=[];let r="",s=0;for(let a,l,c=0;c<o;c++)a=i[c],(l=e[a])?(n[s++]=F(t?"(?!\\b)"+a+"(\\b|_)":a),n[s++]=l):r+=(r?"|":"")+a;return r&&(n[s++]=F(t?"(?!\\b)("+r+")(\\b|_)":"("+r+")"),n[s]=""),n}function E(e,t){for(let i=0,o=t.length;i<o&&(e=e.replace(t[i],t[i+1]));i+=2);return e}function F(e){return new RegExp(e,"g")}function ha(e){let t="",i="";for(let o,n=0,r=e.length;n<r;n++)(o=e[n])!==i&&(t+=i=o);return t}var ja={encode:ia,F:!1,G:""};function ia(e){return ca.call(this,(""+e).toLowerCase(),!1)}const ka={},G={};function la(e){I(e,"add"),I(e,"append"),I(e,"search"),I(e,"update"),I(e,"remove")}function I(e,t){e[t+"Async"]=function(){const e=this,i=arguments;var o=i[i.length-1];let n;return D(o)&&(n=o,delete i[i.length-1]),o=new Promise((function(o){setTimeout((function(){e.async=!0;const n=e[t].apply(e,i);e.async=!1,o(n)}))})),n?(o.then(n),this):o}}function ma(e,t,i,o){const n=e.length;let r,s,a=[],l=0;o&&(o=[]);for(let c=n-1;0<=c;c--){const d=e[c],h=d.length,u=v();let f=!r;for(let e=0;e<h;e++){const h=d[e],p=h.length;if(p)for(let e,d,m=0;m<p;m++)if(d=h[m],r){if(r[d]){if(!c)if(i)i--;else if(a[l++]=d,l===t)return a;(c||o)&&(u[d]=1),f=!0}if(o&&(e=(s[d]||0)+1,s[d]=e,e<n)){const t=o[e-2]||(o[e-2]=[]);t[t.length]=d}}else u[d]=1}if(o)r||(s=u);else if(!f)return[];r=u}if(o)for(let e,n,s=o.length-1;0<=s;s--){e=o[s],n=e.length;for(let o,s=0;s<n;s++)if(o=e[s],!r[o]){if(i)i--;else if(a[l++]=o,l===t)return a;r[o]=1}}return a}function na(e,t){const i=v(),o=v(),n=[];for(let t=0;t<e.length;t++)i[e[t]]=1;for(let e,r=0;r<t.length;r++){e=t[r];for(let t,r=0;r<e.length;r++)t=e[r],i[t]&&!o[t]&&(o[t]=1,n[n.length]=t)}return n}function J(e){this.l=!0!==e&&e,this.cache=v(),this.h=[]}function oa(e,t,i){C(e)&&(e=e.query);let o=this.cache.get(e);return o||(o=this.search(e,t,i),this.cache.set(e,o)),o}J.prototype.set=function(e,t){if(!this.cache[e]){var i=this.h.length;for(i===this.l?delete this.cache[this.h[i-1]]:i++,--i;0<i;i--)this.h[i]=this.h[i-1];this.h[0]=e}this.cache[e]=t},J.prototype.get=function(e){const t=this.cache[e];if(this.l&&t&&(e=this.h.indexOf(e))){const t=this.h[e-1];this.h[e-1]=this.h[e],this.h[e]=t}return t};const qa={memory:{charset:"latin:extra",D:3,B:4,m:!1},performance:{D:3,B:3,s:!1,context:{depth:2,D:1}},match:{charset:"latin:extra",G:"reverse"},score:{charset:"latin:advanced",D:20,B:3,context:{depth:3,D:9}},default:{}};function ra(e,t,i,o,n,r,s){setTimeout((function(){const a=e(i?i+"."+o:o,JSON.stringify(s));a&&a.then?a.then((function(){t.export(e,t,i,n,r+1)})):t.export(e,t,i,n,r+1)}))}function K(e,t){if(!(this instanceof K))return new K(e);var i;if(e){x(e)?e=qa[e]:(i=e.preset)&&(e=Object.assign({},i[i],e)),i=e.charset;var o=e.lang;x(i)&&(-1===i.indexOf(":")&&(i+=":default"),i=G[i]),x(o)&&(o=ka[o])}else e={};let n,r,s=e.context||{};if(this.encode=e.encode||i&&i.encode||ia,this.register=t||v(),this.D=n=e.resolution||9,this.G=t=i&&i.G||e.tokenize||"strict",this.depth="strict"===t&&s.depth,this.l=u(s.bidirectional),this.s=r=u(e.optimize),this.m=u(e.fastupdate),this.B=e.minlength||1,this.C=e.boost,this.map=r?aa(n):v(),this.A=n=s.resolution||1,this.h=r?aa(n):v(),this.F=i&&i.F||e.rtl,this.H=(t=e.matcher||o&&o.H)&&fa(t,!1),this.J=(t=e.stemmer||o&&o.J)&&fa(t,!0),i=t=e.filter||o&&o.filter){i=t,o=v();for(let e=0,t=i.length;e<t;e++)o[i[e]]=1;i=o}this.filter=i,this.cache=(t=e.cache)&&new J(t)}function L(e,t,i,o,n){return i&&1<e?t+(o||0)<=e?i+(n||0):(e-1)/(t+(o||0))*(i+(n||0))+1|0:0}function M(e,t,i,o,n,r,s){let a=s?e.h:e.map;(!t[i]||s&&!t[i][s])&&(e.s&&(a=a[o]),s?((t=t[i]||(t[i]=v()))[s]=1,a=a[s]||(a[s]=v())):t[i]=1,a=a[i]||(a[i]=[]),e.s||(a=a[o]||(a[o]=[])),r&&a.includes(n)||(a[a.length]=n,e.m&&((e=e.register[n]||(e.register[n]=[]))[e.length]=a)))}function sa(e,t,i,o,n,r,s,a){let l=[],c=a?e.h:e.map;if(e.s||(c=ua(c,s,a,e.l)),c){let i=0;const d=Math.min(c.length,a?e.A:e.D);for(let t,h,u=0,f=0;u<d&&!((t=c[u])&&(e.s&&(t=ua(t,s,a,e.l)),n&&t&&r&&(h=t.length,h<=n?(n-=h,t=null):(t=t.slice(n),n=0)),t&&(l[i++]=t,r&&(f+=t.length,f>=o))));u++);if(i)return r?ta(l,o,0):void(t[t.length]=l)}return!i&&l}function ta(e,t,i){return e=1===e.length?e[0]:[].concat.apply([],e),i||e.length>t?e.slice(i,i+t):e}function ua(e,t,i,o){return i?e=(e=e[(o=o&&t>i)?t:i])&&e[o?i:t]:e=e[t],e}function N(e,t,i,o,n){let r=0;if(e.constructor===Array)if(n)-1!==(t=e.indexOf(t))?1<e.length&&(e.splice(t,1),r++):r++;else{n=Math.min(e.length,i);for(let s,a=0;a<n;a++)(s=e[a])&&(r=N(s,t,i,o,n),o||r||delete e[a])}else for(let s in e)(r=N(e[s],t,i,o,n))||delete e[s];return r}function va(e){e=e.data;var t=self._index;const i=e.args;var o=e.task;if("init"===o)o=e.options||{},e=e.factory,t=o.encode,o.cache=!1,t&&0===t.indexOf("function")&&(o.encode=Function("return "+t)()),e?(Function("return "+e)()(self),self._index=new self.FlexSearch.Index(o),delete self.FlexSearch):self._index=new K(o);else e=e.id,t=t[o].apply(t,i),postMessage("search"===o?{id:e,msg:t}:{id:e})}t=K.prototype,t.append=function(e,t){return this.add(e,t,!0)},t.add=function(e,t,i,o){if(t&&(e||0===e)){if(!o&&!i&&this.register[e])return this.update(e,t);if(o=(t=this.encode(t)).length){const c=v(),d=v(),h=this.depth,u=this.D;for(let f=0;f<o;f++){let p=t[this.F?o-1-f:f];var n=p.length;if(p&&n>=this.B&&(h||!d[p])){var r=L(u,o,f),s="";switch(this.G){case"full":if(2<n){for(r=0;r<n;r++)for(var a=n;a>r;a--)if(a-r>=this.B){var l=L(u,o,f,n,r);M(this,d,s=p.substring(r,a),l,e,i)}break}case"reverse":if(1<n){for(a=n-1;0<a;a--)(s=p[a]+s).length>=this.B&&M(this,d,s,L(u,o,f,n,a),e,i);s=""}case"forward":if(1<n){for(a=0;a<n;a++)(s+=p[a]).length>=this.B&&M(this,d,s,r,e,i);break}default:if(this.C&&(r=Math.min(r/this.C(t,p,f)|0,u-1)),M(this,d,p,r,e,i),h&&1<o&&f<o-1)for(n=v(),s=this.A,r=p,a=Math.min(h+1,o-f),n[r]=1,l=1;l<a;l++)if((p=t[this.F?o-1-f-l:f+l])&&p.length>=this.B&&!n[p]){n[p]=1;const t=this.l&&p>r;M(this,c,t?r:p,L(s+(o/2>s?0:1),o,f,a-1,l-1),e,i,t?p:r)}}}}this.m||(this.register[e]=1)}}return this},t.search=function(e,t,i){i||(!t&&C(e)?e=(i=e).query:C(t)&&(i=t));let o,n,r,s=[],a=0;if(i){e=i.query||e,t=i.limit,a=i.offset||0;var l=i.context;n=i.suggest}if(e&&(o=(e=this.encode(""+e)).length,1<o)){i=v();var c=[];for(let t,r=0,a=0;r<o;r++)if((t=e[r])&&t.length>=this.B&&!i[t]){if(!(this.s||n||this.map[t]))return s;c[a++]=t,i[t]=1}o=(e=c).length}if(!o)return s;t||(t=100),i=0,(l=this.depth&&1<o&&!1!==l)?(r=e[0],i=1):1<o&&e.sort(ba);for(let d,h;i<o;i++){if(h=e[i],l?(d=sa(this,s,n,t,a,2===o,h,r),n&&!1===d&&s.length||(r=h)):d=sa(this,s,n,t,a,1===o,h),d)return d;if(n&&i===o-1){if(!(c=s.length)){if(l){l=0,i=-1;continue}return s}if(1===c)return ta(s[0],t,a)}}return ma(s,t,a,n)},t.contain=function(e){return!!this.register[e]},t.update=function(e,t){return this.remove(e).add(e,t)},t.remove=function(e,t){const i=this.register[e];if(i){if(this.m)for(let t,o=0;o<i.length;o++)t=i[o],t.splice(t.indexOf(e),1);else N(this.map,e,this.D,this.s),this.depth&&N(this.h,e,this.A,this.s);if(t||delete this.register[e],this.cache){t=this.cache;for(let i,o,n=0;n<t.h.length;n++)o=t.h[n],i=t.cache[o],i.includes(e)&&(t.h.splice(n--,1),delete t.cache[o])}}return this},t.searchCache=oa,t.export=function(e,t,i,o,n){let r,s;switch(n||(n=0)){case 0:if(r="reg",this.m){s=v();for(let e in this.register)s[e]=1}else s=this.register;break;case 1:r="cfg",s={doc:0,opt:this.s?1:0};break;case 2:r="map",s=this.map;break;case 3:r="ctx",s=this.h;break;default:return}return ra(e,t||this,i,r,o,n,s),!0},t.import=function(e,t){if(t)switch(x(t)&&(t=JSON.parse(t)),e){case"cfg":this.s=!!t.opt;break;case"reg":this.m=!1,this.register=t;break;case"map":this.map=t;break;case"ctx":this.h=t}},la(K.prototype);let wa=0;function O(e){if(!(this instanceof O))return new O(e);var t;e?D(t=e.encode)&&(e.encode=t.toString()):e={},(t=(self||window)._factory)&&(t=t.toString());const i="undefined"==typeof window&&self.exports,o=this;this.o=xa(t,i,e.worker),this.h=v(),this.o&&(i?this.o.on("message",(function(e){o.h[e.id](e.msg),delete o.h[e.id]})):this.o.onmessage=function(e){e=e.data,o.h[e.id](e.msg),delete o.h[e.id]},this.o.postMessage({task:"init",factory:t,options:e}))}function P(e){O.prototype[e]=O.prototype[e+"Async"]=function(){const t=this,i=[].slice.call(arguments);var o=i[i.length-1];let n;return D(o)&&(n=o,i.splice(i.length-1,1)),o=new Promise((function(o){setTimeout((function(){t.h[++wa]=o,t.o.postMessage({task:e,id:wa,args:i})}))})),n?(o.then(n),this):o}}function xa(a,b,c){let d;try{d=b?eval('new (require("worker_threads")["Worker"])("../dist/node/node.js")'):a?new Worker(URL.createObjectURL(new Blob(["onmessage="+va.toString()],{type:"text/javascript"}))):new Worker(x(c)?c:"worker/worker.js",{type:"module"})}catch(e){}return d}function Q(e){if(!(this instanceof Q))return new Q(e);var t,i=e.document||e.doc||e;this.K=[],this.h=[],this.A=[],this.register=v(),this.key=(t=i.key||i.id)&&S(t,this.A)||"id",this.m=u(e.fastupdate),this.C=(t=i.store)&&!0!==t&&[],this.store=t&&v(),this.I=(t=i.tag)&&S(t,this.A),this.l=t&&v(),this.cache=(t=e.cache)&&new J(t),e.cache=!1,this.o=e.worker,this.async=!1,t=v();let o=i.index||i.field||i;x(o)&&(o=[o]);for(let i,n,r=0;r<o.length;r++)i=o[r],x(i)||(n=i,i=i.field),n=C(n)?Object.assign({},e,n):e,this.o&&(t[i]=new O(n),t[i].o||(this.o=!1)),this.o||(t[i]=new K(n,this.register)),this.K[r]=S(i,this.A),this.h[r]=i;if(this.C)for(x(e=i.store)&&(e=[e]),i=0;i<e.length;i++)this.C[i]=S(e[i],this.A);this.index=t}function S(e,t){const i=e.split(":");let o=0;for(let n=0;n<i.length;n++)0<=(e=i[n]).indexOf("[]")&&(e=e.substring(0,e.length-2))&&(t[o]=!0),e&&(i[o++]=e);return o<i.length&&(i.length=o),1<o?i:i[0]}function T(e,t){if(x(t))e=e[t];else for(let i=0;e&&i<t.length;i++)e=e[t[i]];return e}function U(e,t,i,o,n){if(e=e[n],o===i.length-1)t[n]=e;else if(e)if(e.constructor===Array)for(t=t[n]=Array(e.length),n=0;n<e.length;n++)U(e,t,i,o,n);else t=t[n]||(t[n]=v()),n=i[++o],U(e,t,i,o,n)}function V(e,t,i,o,n,r,s,a){if(e=e[s])if(o===t.length-1){if(e.constructor===Array){if(i[o]){for(t=0;t<e.length;t++)n.add(r,e[t],!0,!0);return}e=e.join(" ")}n.add(r,e,a,!0)}else if(e.constructor===Array)for(s=0;s<e.length;s++)V(e,t,i,o,n,r,s,a);else s=t[++o],V(e,t,i,o,n,r,s,a)}function ya(e,t,i,o){let n=this.l[e],r=n&&n.length-i;if(r&&0<r)return(r>t||i)&&(n=n.slice(i,i+t)),o&&(n=za.call(this,n)),{tag:e,result:n}}function za(e){const t=Array(e.length);for(let i,o=0;o<e.length;o++)i=e[o],t[o]={id:i,doc:this.store[i]};return t}P("add"),P("append"),P("search"),P("update"),P("remove"),t=Q.prototype,t.add=function(e,t,i){if(C(e)&&(e=T(t=e,this.key)),t&&(e||0===e)){if(!i&&this.register[e])return this.update(e,t);for(let o,n,r=0;r<this.h.length;r++)n=this.h[r],o=this.K[r],x(o)&&(o=[o]),V(t,o,this.A,0,this.index[n],e,o[0],i);if(this.I){let o=T(t,this.I),n=v();x(o)&&(o=[o]);for(let t,r,s=0;s<o.length;s++)if(t=o[s],!n[t]&&(n[t]=1,r=this.l[t]||(this.l[t]=[]),!i||!r.includes(e))&&(r[r.length]=e,this.m)){const t=this.register[e]||(this.register[e]=[]);t[t.length]=r}}if(this.store&&(!i||!this.store[e])){let i;if(this.C){i=v();for(let e,o=0;o<this.C.length;o++)e=this.C[o],x(e)?i[e]=t[e]:U(t,i,e,0,e[0])}this.store[e]=i||t}}return this},t.append=function(e,t){return this.add(e,t,!0)},t.update=function(e,t){return this.remove(e).add(e,t)},t.remove=function(e){if(C(e)&&(e=T(e,this.key)),this.register[e]){for(var t=0;t<this.h.length&&(this.index[this.h[t]].remove(e,!this.o),!this.m);t++);if(this.I&&!this.m)for(let i in this.l){const o=(t=this.l[i]).indexOf(e);-1!==o&&(1<t.length?t.splice(o,1):delete this.l[i])}this.store&&delete this.store[e],delete this.register[e]}return this},t.search=function(e,t,i,o){i||(!t&&C(e)?(i=e,e=""):C(t)&&(i=t,t=0));let n,r,s,a,l,c,d=[],h=[],u=0;if(i)if(i.constructor===Array)s=i,i=null;else{if(e=i.query||e,s=(n=i.pluck)||i.index||i.field,a=i.tag,r=this.store&&i.enrich,l="and"===i.bool,t=i.limit||t||100,c=i.offset||0,a&&(x(a)&&(a=[a]),!e)){for(let e,i=0;i<a.length;i++)(e=ya.call(this,a[i],t,c,r))&&(d[d.length]=e,u++);return u?d:[]}x(s)&&(s=[s])}s||(s=this.h),l=l&&(1<s.length||a&&1<a.length);const f=!o&&(this.o||this.async)&&[];for(let n,r,p,m=0;m<s.length;m++){let b;if(r=s[m],x(r)||(b=r,r=b.field,e=b.query||e,t=b.limit||t),f)f[m]=this.index[r].searchAsync(e,t,b||i);else{if(n=o?o[m]:this.index[r].search(e,t,b||i),p=n&&n.length,a&&p){const e=[];let i=0;l&&(e[0]=[n]);for(let t,o,n=0;n<a.length;n++)t=a[n],(p=(o=this.l[t])&&o.length)&&(i++,e[e.length]=l?[o]:o);i&&(n=l?ma(e,t||100,c||0):na(n,e),p=n.length)}if(p)h[u]=r,d[u++]=n;else if(l)return[]}}if(f){const o=this;return new Promise((function(n){Promise.all(f).then((function(r){n(o.search(e,t,i,r))}))}))}if(!u)return[];if(n&&(!r||!this.store))return d[0];for(let e,t=0;t<h.length;t++){if(e=d[t],e.length&&r&&(e=za.call(this,e)),n)return e;d[t]={field:h[t],result:e}}return d},t.contain=function(e){return!!this.register[e]},t.get=function(e){return this.store[e]},t.set=function(e,t){return this.store[e]=t,this},t.searchCache=oa,t.export=function(e,t,i,o,n){if(n||(n=0),o||(o=0),o<this.h.length){const i=this.h[o],r=this.index[i];t=this,setTimeout((function(){r.export(e,t,n?i:"",o,n++)||(o++,n=1,t.export(e,t,i,o,n))}))}else{let t,r;switch(n){case 1:t="tag",r=this.l;break;case 2:t="store",r=this.store;break;default:return}ra(e,this,i,t,o,n,r)}},t.import=function(e,t){if(t)switch(x(t)&&(t=JSON.parse(t)),e){case"tag":this.l=t;break;case"reg":this.m=!1,this.register=t;for(let e,i=0;i<this.h.length;i++)e=this.index[this.h[i]],e.register=t,e.m=!1;break;case"store":this.store=t;break;default:const i=(e=e.split("."))[0];e=e[1],i&&e&&this.index[i].import(e,t)}},la(Q.prototype);var Ba={encode:Aa,F:!1,G:""};const Ca=[F("[àáâãäå]"),"a",F("[èéêë]"),"e",F("[ìíîï]"),"i",F("[òóôõöő]"),"o",F("[ùúûüű]"),"u",F("[ýŷÿ]"),"y",F("ñ"),"n",F("[çc]"),"k",F("ß"),"s",F(" & ")," and "];function Aa(e){var t=e=""+e;return t.normalize&&(t=t.normalize("NFD").replace(ea,"")),ca.call(this,t.toLowerCase(),!e.normalize&&Ca)}var Ea={encode:Da,F:!1,G:"strict"};const Fa=/[^a-z0-9]+/,Ga={b:"p",v:"f",w:"f",z:"s",x:"s",ß:"s",d:"t",n:"m",c:"k",g:"k",j:"k",q:"k",i:"e",y:"e",u:"o"};function Da(e){const t=[];if(e=Aa.call(this,e).join(" ")){const i=e.split(Fa),o=i.length;for(let n,r=0,s=0;r<o;r++)if((e=i[r])&&(!this.filter||!this.filter[e])){n=e[0];let i=Ga[n]||n,o=i;for(let t=1;t<e.length;t++){n=e[t];const r=Ga[n]||n;r&&r!==o&&(i+=r,o=r)}t[s++]=i}}return t}var Ia={encode:Ha,F:!1,G:""};const Ja=[F("ae"),"a",F("oe"),"o",F("sh"),"s",F("th"),"t",F("ph"),"f",F("pf"),"f",F("(?![aeo])h(?![aeo])"),"",F("(?!^[aeo])h(?!^[aeo])"),""];function Ha(e,t){return e&&(2<(e=Da.call(this,e).join(" ")).length&&(e=E(e,Ja)),t||(1<e.length&&(e=ha(e)),e&&(e=e.split(" ")))),e||[]}var La={encode:Ka,F:!1,G:""};const Ma=F("(?!\\b)[aeo]");function Ka(e){return e&&(1<(e=Ha.call(this,e,!0)).length&&(e=e.replace(Ma,"")),1<e.length&&(e=ha(e)),e&&(e=e.split(" "))),e||[]}G["latin:default"]=ja,G["latin:simple"]=Ba,G["latin:balance"]=Ea,G["latin:advanced"]=Ia,G["latin:extra"]=La;const W=self;let Y;const Z={Index:K,Document:Q,Worker:O,registerCharset:function(e,t){G[e]=t},registerLanguage:function(e,t){ka[e]=t}};(Y=W.define)&&Y.amd?Y([],(function(){return Z})):W.exports?W.exports=Z:W.FlexSearch=Z}(this)},431:e=>{"use strict";const t=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],i=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],o=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],n=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],r=(e,t,i)=>{let o=e;return"string"==typeof t||Array.isArray(t)?o=e.toLocaleString(t,i):!0!==t&&void 0===i||(o=e.toLocaleString(void 0,i)),o};e.exports=(e,s)=>{if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);const a=(s=Object.assign({bits:!1,binary:!1},s)).bits?s.binary?n:o:s.binary?i:t;if(s.signed&&0===e)return` 0 ${a[0]}`;const l=e<0,c=l?"-":s.signed?"+":"";let d;if(l&&(e=-e),void 0!==s.minimumFractionDigits&&(d={minimumFractionDigits:s.minimumFractionDigits}),void 0!==s.maximumFractionDigits&&(d=Object.assign({maximumFractionDigits:s.maximumFractionDigits},d)),e<1){return c+r(e,s.locale,d)+" "+a[0]}const h=Math.min(Math.floor(s.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),a.length-1);e/=Math.pow(s.binary?1024:1e3,h),d||(e=e.toPrecision(3));return c+r(Number(e),s.locale,d)+" "+a[h]}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var i=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(i.exports,i,i.exports,__webpack_require__),i.loaded=!0,i.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var i in t)__webpack_require__.o(t,i)&&!__webpack_require__.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __webpack_exports__={};(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Chooser:()=>zi,Coll:()=>ki,CollIndex:()=>$i,CollInfo:()=>yi,Embed:()=>Ao,FaIcon:()=>Ve,GDrive:()=>mo,IS_APP:()=>qe,Item:()=>ki,ItemIndex:()=>$i,ItemInfo:()=>yi,LitElement:()=>me,Loader:()=>go,PageEntry:()=>zo,Pages:()=>xo,Replay:()=>_o,ReplayWebApp:()=>Ci,ReplayWebPage:()=>Ao,SWManager:()=>it,Sorter:()=>Co,Story:()=>po,URLResources:()=>Io,VERSION:()=>je,WrModal:()=>Ge,apiPrefix:()=>Oe,clickOnSpacebarPress:()=>He,css:()=>h,html:()=>Q,replayPrefix:()=>Ue,unsafeCSS:()=>d,unsafeSVG:()=>Te,updateFaviconLinks:()=>We,wrapCss:()=>Ne});var e={};__webpack_require__.r(e),__webpack_require__.d(e,{attentionMarkers:()=>$r,contentInitial:()=>vr,disable:()=>zr,document:()=>gr,flow:()=>yr,flowInitial:()=>wr,insideSpan:()=>Sr,string:()=>xr,text:()=>kr});function t(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}function i(e,t,i,o){return new(i||(i=Promise))((function(n,r){function s(e){try{l(o.next(e))}catch(e){r(e)}}function a(e){try{l(o.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((o=o.apply(e,t||[])).next())}))}Object.create;function o(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],o=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function n(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e=o(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(t){return new Promise((function(o,n){(function(e,t,i,o){Promise.resolve(o).then((function(t){e({value:t,done:i})}),t)})(o,n,(t=e[i](t)).done,t.value)}))}}}Object.create;
|
|
9
|
+
function _f(self){"use strict";try{module&&(self=module)}catch(e){}var t;function u(e){return void 0===e||e}function aa(e){const t=Array(e);for(let i=0;i<e;i++)t[i]=v();return t}function v(){return Object.create(null)}function ba(e,t){return t.length-e.length}function x(e){return"string"==typeof e}function C(e){return"object"==typeof e}function D(e){return"function"==typeof e}function ca(e,t){var i=da;if(e&&(t&&(e=E(e,t)),this.H&&(e=E(e,this.H)),this.J&&1<e.length&&(e=E(e,this.J)),i||""===i)){if(e=e.split(i),this.filter){t=this.filter,i=e.length;const o=[];for(let n=0,r=0;n<i;n++){const i=e[n];i&&!t[i]&&(o[r++]=i)}e=o}return e}return e}self._factory=_f;const da=/[\p{Z}\p{S}\p{P}\p{C}]+/u,ea=/[\u0300-\u036f]/g;function fa(e,t){const i=Object.keys(e),o=i.length,n=[];let r="",s=0;for(let a,l,c=0;c<o;c++)a=i[c],(l=e[a])?(n[s++]=F(t?"(?!\\b)"+a+"(\\b|_)":a),n[s++]=l):r+=(r?"|":"")+a;return r&&(n[s++]=F(t?"(?!\\b)("+r+")(\\b|_)":"("+r+")"),n[s]=""),n}function E(e,t){for(let i=0,o=t.length;i<o&&(e=e.replace(t[i],t[i+1]));i+=2);return e}function F(e){return new RegExp(e,"g")}function ha(e){let t="",i="";for(let o,n=0,r=e.length;n<r;n++)(o=e[n])!==i&&(t+=i=o);return t}var ja={encode:ia,F:!1,G:""};function ia(e){return ca.call(this,(""+e).toLowerCase(),!1)}const ka={},G={};function la(e){I(e,"add"),I(e,"append"),I(e,"search"),I(e,"update"),I(e,"remove")}function I(e,t){e[t+"Async"]=function(){const e=this,i=arguments;var o=i[i.length-1];let n;return D(o)&&(n=o,delete i[i.length-1]),o=new Promise((function(o){setTimeout((function(){e.async=!0;const n=e[t].apply(e,i);e.async=!1,o(n)}))})),n?(o.then(n),this):o}}function ma(e,t,i,o){const n=e.length;let r,s,a=[],l=0;o&&(o=[]);for(let c=n-1;0<=c;c--){const d=e[c],h=d.length,u=v();let f=!r;for(let e=0;e<h;e++){const h=d[e],p=h.length;if(p)for(let e,d,m=0;m<p;m++)if(d=h[m],r){if(r[d]){if(!c)if(i)i--;else if(a[l++]=d,l===t)return a;(c||o)&&(u[d]=1),f=!0}if(o&&(e=(s[d]||0)+1,s[d]=e,e<n)){const t=o[e-2]||(o[e-2]=[]);t[t.length]=d}}else u[d]=1}if(o)r||(s=u);else if(!f)return[];r=u}if(o)for(let e,n,s=o.length-1;0<=s;s--){e=o[s],n=e.length;for(let o,s=0;s<n;s++)if(o=e[s],!r[o]){if(i)i--;else if(a[l++]=o,l===t)return a;r[o]=1}}return a}function na(e,t){const i=v(),o=v(),n=[];for(let t=0;t<e.length;t++)i[e[t]]=1;for(let e,r=0;r<t.length;r++){e=t[r];for(let t,r=0;r<e.length;r++)t=e[r],i[t]&&!o[t]&&(o[t]=1,n[n.length]=t)}return n}function J(e){this.l=!0!==e&&e,this.cache=v(),this.h=[]}function oa(e,t,i){C(e)&&(e=e.query);let o=this.cache.get(e);return o||(o=this.search(e,t,i),this.cache.set(e,o)),o}J.prototype.set=function(e,t){if(!this.cache[e]){var i=this.h.length;for(i===this.l?delete this.cache[this.h[i-1]]:i++,--i;0<i;i--)this.h[i]=this.h[i-1];this.h[0]=e}this.cache[e]=t},J.prototype.get=function(e){const t=this.cache[e];if(this.l&&t&&(e=this.h.indexOf(e))){const t=this.h[e-1];this.h[e-1]=this.h[e],this.h[e]=t}return t};const qa={memory:{charset:"latin:extra",D:3,B:4,m:!1},performance:{D:3,B:3,s:!1,context:{depth:2,D:1}},match:{charset:"latin:extra",G:"reverse"},score:{charset:"latin:advanced",D:20,B:3,context:{depth:3,D:9}},default:{}};function ra(e,t,i,o,n,r,s){setTimeout((function(){const a=e(i?i+"."+o:o,JSON.stringify(s));a&&a.then?a.then((function(){t.export(e,t,i,n,r+1)})):t.export(e,t,i,n,r+1)}))}function K(e,t){if(!(this instanceof K))return new K(e);var i;if(e){x(e)?e=qa[e]:(i=e.preset)&&(e=Object.assign({},i[i],e)),i=e.charset;var o=e.lang;x(i)&&(-1===i.indexOf(":")&&(i+=":default"),i=G[i]),x(o)&&(o=ka[o])}else e={};let n,r,s=e.context||{};if(this.encode=e.encode||i&&i.encode||ia,this.register=t||v(),this.D=n=e.resolution||9,this.G=t=i&&i.G||e.tokenize||"strict",this.depth="strict"===t&&s.depth,this.l=u(s.bidirectional),this.s=r=u(e.optimize),this.m=u(e.fastupdate),this.B=e.minlength||1,this.C=e.boost,this.map=r?aa(n):v(),this.A=n=s.resolution||1,this.h=r?aa(n):v(),this.F=i&&i.F||e.rtl,this.H=(t=e.matcher||o&&o.H)&&fa(t,!1),this.J=(t=e.stemmer||o&&o.J)&&fa(t,!0),i=t=e.filter||o&&o.filter){i=t,o=v();for(let e=0,t=i.length;e<t;e++)o[i[e]]=1;i=o}this.filter=i,this.cache=(t=e.cache)&&new J(t)}function L(e,t,i,o,n){return i&&1<e?t+(o||0)<=e?i+(n||0):(e-1)/(t+(o||0))*(i+(n||0))+1|0:0}function M(e,t,i,o,n,r,s){let a=s?e.h:e.map;(!t[i]||s&&!t[i][s])&&(e.s&&(a=a[o]),s?((t=t[i]||(t[i]=v()))[s]=1,a=a[s]||(a[s]=v())):t[i]=1,a=a[i]||(a[i]=[]),e.s||(a=a[o]||(a[o]=[])),r&&a.includes(n)||(a[a.length]=n,e.m&&((e=e.register[n]||(e.register[n]=[]))[e.length]=a)))}function sa(e,t,i,o,n,r,s,a){let l=[],c=a?e.h:e.map;if(e.s||(c=ua(c,s,a,e.l)),c){let i=0;const d=Math.min(c.length,a?e.A:e.D);for(let t,h,u=0,f=0;u<d&&!((t=c[u])&&(e.s&&(t=ua(t,s,a,e.l)),n&&t&&r&&(h=t.length,h<=n?(n-=h,t=null):(t=t.slice(n),n=0)),t&&(l[i++]=t,r&&(f+=t.length,f>=o))));u++);if(i)return r?ta(l,o,0):void(t[t.length]=l)}return!i&&l}function ta(e,t,i){return e=1===e.length?e[0]:[].concat.apply([],e),i||e.length>t?e.slice(i,i+t):e}function ua(e,t,i,o){return i?e=(e=e[(o=o&&t>i)?t:i])&&e[o?i:t]:e=e[t],e}function N(e,t,i,o,n){let r=0;if(e.constructor===Array)if(n)-1!==(t=e.indexOf(t))?1<e.length&&(e.splice(t,1),r++):r++;else{n=Math.min(e.length,i);for(let s,a=0;a<n;a++)(s=e[a])&&(r=N(s,t,i,o,n),o||r||delete e[a])}else for(let s in e)(r=N(e[s],t,i,o,n))||delete e[s];return r}function va(e){e=e.data;var t=self._index;const i=e.args;var o=e.task;if("init"===o)o=e.options||{},e=e.factory,t=o.encode,o.cache=!1,t&&0===t.indexOf("function")&&(o.encode=Function("return "+t)()),e?(Function("return "+e)()(self),self._index=new self.FlexSearch.Index(o),delete self.FlexSearch):self._index=new K(o);else e=e.id,t=t[o].apply(t,i),postMessage("search"===o?{id:e,msg:t}:{id:e})}t=K.prototype,t.append=function(e,t){return this.add(e,t,!0)},t.add=function(e,t,i,o){if(t&&(e||0===e)){if(!o&&!i&&this.register[e])return this.update(e,t);if(o=(t=this.encode(t)).length){const c=v(),d=v(),h=this.depth,u=this.D;for(let f=0;f<o;f++){let p=t[this.F?o-1-f:f];var n=p.length;if(p&&n>=this.B&&(h||!d[p])){var r=L(u,o,f),s="";switch(this.G){case"full":if(2<n){for(r=0;r<n;r++)for(var a=n;a>r;a--)if(a-r>=this.B){var l=L(u,o,f,n,r);M(this,d,s=p.substring(r,a),l,e,i)}break}case"reverse":if(1<n){for(a=n-1;0<a;a--)(s=p[a]+s).length>=this.B&&M(this,d,s,L(u,o,f,n,a),e,i);s=""}case"forward":if(1<n){for(a=0;a<n;a++)(s+=p[a]).length>=this.B&&M(this,d,s,r,e,i);break}default:if(this.C&&(r=Math.min(r/this.C(t,p,f)|0,u-1)),M(this,d,p,r,e,i),h&&1<o&&f<o-1)for(n=v(),s=this.A,r=p,a=Math.min(h+1,o-f),n[r]=1,l=1;l<a;l++)if((p=t[this.F?o-1-f-l:f+l])&&p.length>=this.B&&!n[p]){n[p]=1;const t=this.l&&p>r;M(this,c,t?r:p,L(s+(o/2>s?0:1),o,f,a-1,l-1),e,i,t?p:r)}}}}this.m||(this.register[e]=1)}}return this},t.search=function(e,t,i){i||(!t&&C(e)?e=(i=e).query:C(t)&&(i=t));let o,n,r,s=[],a=0;if(i){e=i.query||e,t=i.limit,a=i.offset||0;var l=i.context;n=i.suggest}if(e&&(o=(e=this.encode(""+e)).length,1<o)){i=v();var c=[];for(let t,r=0,a=0;r<o;r++)if((t=e[r])&&t.length>=this.B&&!i[t]){if(!(this.s||n||this.map[t]))return s;c[a++]=t,i[t]=1}o=(e=c).length}if(!o)return s;t||(t=100),i=0,(l=this.depth&&1<o&&!1!==l)?(r=e[0],i=1):1<o&&e.sort(ba);for(let d,h;i<o;i++){if(h=e[i],l?(d=sa(this,s,n,t,a,2===o,h,r),n&&!1===d&&s.length||(r=h)):d=sa(this,s,n,t,a,1===o,h),d)return d;if(n&&i===o-1){if(!(c=s.length)){if(l){l=0,i=-1;continue}return s}if(1===c)return ta(s[0],t,a)}}return ma(s,t,a,n)},t.contain=function(e){return!!this.register[e]},t.update=function(e,t){return this.remove(e).add(e,t)},t.remove=function(e,t){const i=this.register[e];if(i){if(this.m)for(let t,o=0;o<i.length;o++)t=i[o],t.splice(t.indexOf(e),1);else N(this.map,e,this.D,this.s),this.depth&&N(this.h,e,this.A,this.s);if(t||delete this.register[e],this.cache){t=this.cache;for(let i,o,n=0;n<t.h.length;n++)o=t.h[n],i=t.cache[o],i.includes(e)&&(t.h.splice(n--,1),delete t.cache[o])}}return this},t.searchCache=oa,t.export=function(e,t,i,o,n){let r,s;switch(n||(n=0)){case 0:if(r="reg",this.m){s=v();for(let e in this.register)s[e]=1}else s=this.register;break;case 1:r="cfg",s={doc:0,opt:this.s?1:0};break;case 2:r="map",s=this.map;break;case 3:r="ctx",s=this.h;break;default:return}return ra(e,t||this,i,r,o,n,s),!0},t.import=function(e,t){if(t)switch(x(t)&&(t=JSON.parse(t)),e){case"cfg":this.s=!!t.opt;break;case"reg":this.m=!1,this.register=t;break;case"map":this.map=t;break;case"ctx":this.h=t}},la(K.prototype);let wa=0;function O(e){if(!(this instanceof O))return new O(e);var t;e?D(t=e.encode)&&(e.encode=t.toString()):e={},(t=(self||window)._factory)&&(t=t.toString());const i="undefined"==typeof window&&self.exports,o=this;this.o=xa(t,i,e.worker),this.h=v(),this.o&&(i?this.o.on("message",(function(e){o.h[e.id](e.msg),delete o.h[e.id]})):this.o.onmessage=function(e){e=e.data,o.h[e.id](e.msg),delete o.h[e.id]},this.o.postMessage({task:"init",factory:t,options:e}))}function P(e){O.prototype[e]=O.prototype[e+"Async"]=function(){const t=this,i=[].slice.call(arguments);var o=i[i.length-1];let n;return D(o)&&(n=o,i.splice(i.length-1,1)),o=new Promise((function(o){setTimeout((function(){t.h[++wa]=o,t.o.postMessage({task:e,id:wa,args:i})}))})),n?(o.then(n),this):o}}function xa(a,b,c){let d;try{d=b?eval('new (require("worker_threads")["Worker"])("../dist/node/node.js")'):a?new Worker(URL.createObjectURL(new Blob(["onmessage="+va.toString()],{type:"text/javascript"}))):new Worker(x(c)?c:"worker/worker.js",{type:"module"})}catch(e){}return d}function Q(e){if(!(this instanceof Q))return new Q(e);var t,i=e.document||e.doc||e;this.K=[],this.h=[],this.A=[],this.register=v(),this.key=(t=i.key||i.id)&&S(t,this.A)||"id",this.m=u(e.fastupdate),this.C=(t=i.store)&&!0!==t&&[],this.store=t&&v(),this.I=(t=i.tag)&&S(t,this.A),this.l=t&&v(),this.cache=(t=e.cache)&&new J(t),e.cache=!1,this.o=e.worker,this.async=!1,t=v();let o=i.index||i.field||i;x(o)&&(o=[o]);for(let i,n,r=0;r<o.length;r++)i=o[r],x(i)||(n=i,i=i.field),n=C(n)?Object.assign({},e,n):e,this.o&&(t[i]=new O(n),t[i].o||(this.o=!1)),this.o||(t[i]=new K(n,this.register)),this.K[r]=S(i,this.A),this.h[r]=i;if(this.C)for(x(e=i.store)&&(e=[e]),i=0;i<e.length;i++)this.C[i]=S(e[i],this.A);this.index=t}function S(e,t){const i=e.split(":");let o=0;for(let n=0;n<i.length;n++)0<=(e=i[n]).indexOf("[]")&&(e=e.substring(0,e.length-2))&&(t[o]=!0),e&&(i[o++]=e);return o<i.length&&(i.length=o),1<o?i:i[0]}function T(e,t){if(x(t))e=e[t];else for(let i=0;e&&i<t.length;i++)e=e[t[i]];return e}function U(e,t,i,o,n){if(e=e[n],o===i.length-1)t[n]=e;else if(e)if(e.constructor===Array)for(t=t[n]=Array(e.length),n=0;n<e.length;n++)U(e,t,i,o,n);else t=t[n]||(t[n]=v()),n=i[++o],U(e,t,i,o,n)}function V(e,t,i,o,n,r,s,a){if(e=e[s])if(o===t.length-1){if(e.constructor===Array){if(i[o]){for(t=0;t<e.length;t++)n.add(r,e[t],!0,!0);return}e=e.join(" ")}n.add(r,e,a,!0)}else if(e.constructor===Array)for(s=0;s<e.length;s++)V(e,t,i,o,n,r,s,a);else s=t[++o],V(e,t,i,o,n,r,s,a)}function ya(e,t,i,o){let n=this.l[e],r=n&&n.length-i;if(r&&0<r)return(r>t||i)&&(n=n.slice(i,i+t)),o&&(n=za.call(this,n)),{tag:e,result:n}}function za(e){const t=Array(e.length);for(let i,o=0;o<e.length;o++)i=e[o],t[o]={id:i,doc:this.store[i]};return t}P("add"),P("append"),P("search"),P("update"),P("remove"),t=Q.prototype,t.add=function(e,t,i){if(C(e)&&(e=T(t=e,this.key)),t&&(e||0===e)){if(!i&&this.register[e])return this.update(e,t);for(let o,n,r=0;r<this.h.length;r++)n=this.h[r],o=this.K[r],x(o)&&(o=[o]),V(t,o,this.A,0,this.index[n],e,o[0],i);if(this.I){let o=T(t,this.I),n=v();x(o)&&(o=[o]);for(let t,r,s=0;s<o.length;s++)if(t=o[s],!n[t]&&(n[t]=1,r=this.l[t]||(this.l[t]=[]),!i||!r.includes(e))&&(r[r.length]=e,this.m)){const t=this.register[e]||(this.register[e]=[]);t[t.length]=r}}if(this.store&&(!i||!this.store[e])){let i;if(this.C){i=v();for(let e,o=0;o<this.C.length;o++)e=this.C[o],x(e)?i[e]=t[e]:U(t,i,e,0,e[0])}this.store[e]=i||t}}return this},t.append=function(e,t){return this.add(e,t,!0)},t.update=function(e,t){return this.remove(e).add(e,t)},t.remove=function(e){if(C(e)&&(e=T(e,this.key)),this.register[e]){for(var t=0;t<this.h.length&&(this.index[this.h[t]].remove(e,!this.o),!this.m);t++);if(this.I&&!this.m)for(let i in this.l){const o=(t=this.l[i]).indexOf(e);-1!==o&&(1<t.length?t.splice(o,1):delete this.l[i])}this.store&&delete this.store[e],delete this.register[e]}return this},t.search=function(e,t,i,o){i||(!t&&C(e)?(i=e,e=""):C(t)&&(i=t,t=0));let n,r,s,a,l,c,d=[],h=[],u=0;if(i)if(i.constructor===Array)s=i,i=null;else{if(e=i.query||e,s=(n=i.pluck)||i.index||i.field,a=i.tag,r=this.store&&i.enrich,l="and"===i.bool,t=i.limit||t||100,c=i.offset||0,a&&(x(a)&&(a=[a]),!e)){for(let e,i=0;i<a.length;i++)(e=ya.call(this,a[i],t,c,r))&&(d[d.length]=e,u++);return u?d:[]}x(s)&&(s=[s])}s||(s=this.h),l=l&&(1<s.length||a&&1<a.length);const f=!o&&(this.o||this.async)&&[];for(let n,r,p,m=0;m<s.length;m++){let b;if(r=s[m],x(r)||(b=r,r=b.field,e=b.query||e,t=b.limit||t),f)f[m]=this.index[r].searchAsync(e,t,b||i);else{if(n=o?o[m]:this.index[r].search(e,t,b||i),p=n&&n.length,a&&p){const e=[];let i=0;l&&(e[0]=[n]);for(let t,o,n=0;n<a.length;n++)t=a[n],(p=(o=this.l[t])&&o.length)&&(i++,e[e.length]=l?[o]:o);i&&(n=l?ma(e,t||100,c||0):na(n,e),p=n.length)}if(p)h[u]=r,d[u++]=n;else if(l)return[]}}if(f){const o=this;return new Promise((function(n){Promise.all(f).then((function(r){n(o.search(e,t,i,r))}))}))}if(!u)return[];if(n&&(!r||!this.store))return d[0];for(let e,t=0;t<h.length;t++){if(e=d[t],e.length&&r&&(e=za.call(this,e)),n)return e;d[t]={field:h[t],result:e}}return d},t.contain=function(e){return!!this.register[e]},t.get=function(e){return this.store[e]},t.set=function(e,t){return this.store[e]=t,this},t.searchCache=oa,t.export=function(e,t,i,o,n){if(n||(n=0),o||(o=0),o<this.h.length){const i=this.h[o],r=this.index[i];t=this,setTimeout((function(){r.export(e,t,n?i:"",o,n++)||(o++,n=1,t.export(e,t,i,o,n))}))}else{let t,r;switch(n){case 1:t="tag",r=this.l;break;case 2:t="store",r=this.store;break;default:return}ra(e,this,i,t,o,n,r)}},t.import=function(e,t){if(t)switch(x(t)&&(t=JSON.parse(t)),e){case"tag":this.l=t;break;case"reg":this.m=!1,this.register=t;for(let e,i=0;i<this.h.length;i++)e=this.index[this.h[i]],e.register=t,e.m=!1;break;case"store":this.store=t;break;default:const i=(e=e.split("."))[0];e=e[1],i&&e&&this.index[i].import(e,t)}},la(Q.prototype);var Ba={encode:Aa,F:!1,G:""};const Ca=[F("[àáâãäå]"),"a",F("[èéêë]"),"e",F("[ìíîï]"),"i",F("[òóôõöő]"),"o",F("[ùúûüű]"),"u",F("[ýŷÿ]"),"y",F("ñ"),"n",F("[çc]"),"k",F("ß"),"s",F(" & ")," and "];function Aa(e){var t=e=""+e;return t.normalize&&(t=t.normalize("NFD").replace(ea,"")),ca.call(this,t.toLowerCase(),!e.normalize&&Ca)}var Ea={encode:Da,F:!1,G:"strict"};const Fa=/[^a-z0-9]+/,Ga={b:"p",v:"f",w:"f",z:"s",x:"s",ß:"s",d:"t",n:"m",c:"k",g:"k",j:"k",q:"k",i:"e",y:"e",u:"o"};function Da(e){const t=[];if(e=Aa.call(this,e).join(" ")){const i=e.split(Fa),o=i.length;for(let n,r=0,s=0;r<o;r++)if((e=i[r])&&(!this.filter||!this.filter[e])){n=e[0];let i=Ga[n]||n,o=i;for(let t=1;t<e.length;t++){n=e[t];const r=Ga[n]||n;r&&r!==o&&(i+=r,o=r)}t[s++]=i}}return t}var Ia={encode:Ha,F:!1,G:""};const Ja=[F("ae"),"a",F("oe"),"o",F("sh"),"s",F("th"),"t",F("ph"),"f",F("pf"),"f",F("(?![aeo])h(?![aeo])"),"",F("(?!^[aeo])h(?!^[aeo])"),""];function Ha(e,t){return e&&(2<(e=Da.call(this,e).join(" ")).length&&(e=E(e,Ja)),t||(1<e.length&&(e=ha(e)),e&&(e=e.split(" ")))),e||[]}var La={encode:Ka,F:!1,G:""};const Ma=F("(?!\\b)[aeo]");function Ka(e){return e&&(1<(e=Ha.call(this,e,!0)).length&&(e=e.replace(Ma,"")),1<e.length&&(e=ha(e)),e&&(e=e.split(" "))),e||[]}G["latin:default"]=ja,G["latin:simple"]=Ba,G["latin:balance"]=Ea,G["latin:advanced"]=Ia,G["latin:extra"]=La;const W=self;let Y;const Z={Index:K,Document:Q,Worker:O,registerCharset:function(e,t){G[e]=t},registerLanguage:function(e,t){ka[e]=t}};(Y=W.define)&&Y.amd?Y([],(function(){return Z})):W.exports?W.exports=Z:W.FlexSearch=Z}(this)},431:e=>{"use strict";const t=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],i=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],o=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],n=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],r=(e,t,i)=>{let o=e;return"string"==typeof t||Array.isArray(t)?o=e.toLocaleString(t,i):!0!==t&&void 0===i||(o=e.toLocaleString(void 0,i)),o};e.exports=(e,s)=>{if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);const a=(s=Object.assign({bits:!1,binary:!1},s)).bits?s.binary?n:o:s.binary?i:t;if(s.signed&&0===e)return` 0 ${a[0]}`;const l=e<0,c=l?"-":s.signed?"+":"";let d;if(l&&(e=-e),void 0!==s.minimumFractionDigits&&(d={minimumFractionDigits:s.minimumFractionDigits}),void 0!==s.maximumFractionDigits&&(d=Object.assign({maximumFractionDigits:s.maximumFractionDigits},d)),e<1){return c+r(e,s.locale,d)+" "+a[0]}const h=Math.min(Math.floor(s.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),a.length-1);e/=Math.pow(s.binary?1024:1e3,h),d||(e=e.toPrecision(3));return c+r(Number(e),s.locale,d)+" "+a[h]}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var i=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(i.exports,i,i.exports,__webpack_require__),i.loaded=!0,i.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var i in t)__webpack_require__.o(t,i)&&!__webpack_require__.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __webpack_exports__={};(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Chooser:()=>Ei,Coll:()=>Ci,CollIndex:()=>Li,CollInfo:()=>zi,Embed:()=>Ro,FaIcon:()=>Ve,GDrive:()=>yo,IS_APP:()=>qe,Item:()=>Ci,ItemIndex:()=>Li,ItemInfo:()=>zi,LitElement:()=>me,Loader:()=>So,PageEntry:()=>Ao,Pages:()=>Co,Replay:()=>To,ReplayWebApp:()=>Ti,ReplayWebPage:()=>Ro,SWManager:()=>it,Sorter:()=>Po,Story:()=>wo,URLResources:()=>Do,VERSION:()=>je,WrModal:()=>Ge,apiPrefix:()=>Oe,clickOnSpacebarPress:()=>He,css:()=>h,dateFormatter:()=>Tt,dateTimeFormatter:()=>At,digestMessage:()=>gt,getDateFromTS:()=>wt,getPageDateTS:()=>yt,getReplayLink:()=>kt,getTS:()=>xt,html:()=>Q,parseURLSchemeHostPath:()=>$t,replayPrefix:()=>Ue,rwpIcon:()=>bt,rwpLogoAnimated:()=>xo,serviceWorkerActivated:()=>ot,sourceToId:()=>St,timeFormatter:()=>Pt,tsToDate:()=>vt,unsafeCSS:()=>d,unsafeSVG:()=>Te,updateFaviconLinks:()=>We,wrapCss:()=>Ne});var e={};__webpack_require__.r(e),__webpack_require__.d(e,{attentionMarkers:()=>Er,contentInitial:()=>$r,disable:()=>Ar,document:()=>Sr,flow:()=>_r,flowInitial:()=>zr,insideSpan:()=>Lr,string:()=>Cr,text:()=>Ir});function t(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}function i(e,t,i,o){return new(i||(i=Promise))((function(n,r){function s(e){try{l(o.next(e))}catch(e){r(e)}}function a(e){try{l(o.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((o=o.apply(e,t||[])).next())}))}Object.create;function o(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],o=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function n(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e=o(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(t){return new Promise((function(o,n){(function(e,t,i,o){Promise.resolve(o).then((function(t){e({value:t,done:i})}),t)})(o,n,(t=e[i](t)).done,t.value)}))}}}Object.create;
|
|
10
10
|
/**
|
|
11
11
|
* @license
|
|
12
12
|
* Copyright 2019 Google LLC
|
|
@@ -66,7 +66,7 @@ class Le extends Ie{constructor(e){if(super(e),this.it=X,e.type!==_e)throw Error
|
|
|
66
66
|
* Copyright 2017 Google LLC
|
|
67
67
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
68
68
|
*/
|
|
69
|
-
class Ae extends Le{}Ae.directiveName="unsafeSVG",Ae.resultType=2;const Te=Ce(Ae),Pe="important",De=" !"+Pe,Fe=Ce(class extends Ie{constructor(e){if(super(e),e.type!==ze||"style"!==e.name||e.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce(((t,i)=>{const o=e[i];return null==o?t:t+`${i=i.includes("-")?i:i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`}),"")}update(e,[t]){const{style:i}=e.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(t)),this.render(t);for(const e of this.ft)null==t[e]&&(this.ft.delete(e),e.includes("-")?i.removeProperty(e):i[e]=null);for(const e in t){const o=t[e];if(null!=o){this.ft.add(e);const t="string"==typeof o&&o.endsWith(De);e.includes("-")||t?i.setProperty(e,t?o.slice(0,-11):o,t?Pe:""):i[e]=o}}return J}});var Me,Re=__webpack_require__(989);const Oe="./w/api",Ue="./w",Be=d(Re.A);function Ne(e){return[Be,e]}const qe=window.IS_APP||(null===(Me=window.electron)||void 0===Me?void 0:Me.IS_APP)||window.matchMedia("(display-mode: standalone)").matches,je="2.3.
|
|
69
|
+
class Ae extends Le{}Ae.directiveName="unsafeSVG",Ae.resultType=2;const Te=Ce(Ae),Pe="important",De=" !"+Pe,Fe=Ce(class extends Ie{constructor(e){if(super(e),e.type!==ze||"style"!==e.name||e.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce(((t,i)=>{const o=e[i];return null==o?t:t+`${i=i.includes("-")?i:i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`}),"")}update(e,[t]){const{style:i}=e.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(t)),this.render(t);for(const e of this.ft)null==t[e]&&(this.ft.delete(e),e.includes("-")?i.removeProperty(e):i[e]=null);for(const e in t){const o=t[e];if(null!=o){this.ft.add(e);const t="string"==typeof o&&o.endsWith(De);e.includes("-")||t?i.setProperty(e,t?o.slice(0,-11):o,t?Pe:""):i[e]=o}}return J}});var Me,Re=__webpack_require__(989);const Oe="./w/api",Ue="./w",Be=d(Re.A);function Ne(e){return[Be,e]}const qe=window.IS_APP||(null===(Me=window.electron)||void 0===Me?void 0:Me.IS_APP)||window.matchMedia("(display-mode: standalone)").matches,je="2.3.4";function He(e){" "==e.key&&(e.preventDefault(),e.target.click())}function We(e){const t=document.querySelector("head"),i=document.querySelectorAll("link[rel*='icon']");for(const e of i)t.removeChild(e);for(const i of e.icons){const e=document.createElement("link");e.rel=i.rel,e.href=i.href,t.appendChild(e)}}class Ve extends me{constructor(){super(),this.size="1.1em",this.width=null,this.height=null}static get properties(){return{svg:{type:String},size:{type:String},width:{type:String},height:{type:String}}}static get styles(){return h`
|
|
70
70
|
:host {
|
|
71
71
|
display: inline-block;
|
|
72
72
|
padding: 0;
|
|
@@ -128,19 +128,19 @@ class Ae extends Le{}Ae.directiveName="unsafeSVG",Ae.resultType=2;const Te=Ce(Ae
|
|
|
128
128
|
</div>
|
|
129
129
|
<div style="white-space: pre-wrap; text-align: center">${t}</div>
|
|
130
130
|
</section>
|
|
131
|
-
`:""}}
|
|
131
|
+
`:""}}function ot(){return i(this,void 0,void 0,(function*(){navigator.serviceWorker.controller||(yield new Promise((e=>{navigator.serviceWorker.addEventListener("controllerchange",(()=>{e()}))})))}))}
|
|
132
132
|
/**
|
|
133
133
|
* @license
|
|
134
134
|
* Copyright 2020 Google LLC
|
|
135
135
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
136
136
|
*/
|
|
137
|
-
const{I:
|
|
137
|
+
const{I:nt}=fe,rt=(e,t)=>{const i=e._$AN;if(void 0===i)return!1;for(const e of i)e._$AO?.(t,!1),rt(e,t);return!0},st=e=>{let t,i;do{if(void 0===(t=e._$AM))break;i=t._$AN,i.delete(e),e=t}while(0===i?.size)},at=e=>{for(let t;t=e._$AM;e=t){let i=t._$AN;if(void 0===i)t._$AN=i=new Set;else if(i.has(e))break;i.add(e),dt(t)}};function lt(e){void 0!==this._$AN?(st(this),this._$AM=e,at(this)):this._$AM=e}function ct(e,t=!1,i=0){const o=this._$AH,n=this._$AN;if(void 0!==n&&0!==n.size)if(t)if(Array.isArray(o))for(let e=i;e<o.length;e++)rt(o[e],!1),st(o[e]);else null!=o&&(rt(o,!1),st(o));else rt(this,e)}const dt=e=>{e.type==_e&&(e._$AP??=ct,e._$AQ??=lt)};class ht extends Ie{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,i){super._$AT(e,t,i),at(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(rt(this,e),st(this))}setValue(e){if((e=>void 0===e.strings)(this._$Ct))this._$Ct._$AI(e,this);else{const t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}
|
|
138
138
|
/**
|
|
139
139
|
* @license
|
|
140
140
|
* Copyright 2020 Google LLC
|
|
141
141
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
142
142
|
*/
|
|
143
|
-
const
|
|
143
|
+
const ut=()=>new ft;class ft{}const pt=new WeakMap,mt=Ce(class extends ht{render(e){return X}update(e,[t]){const i=t!==this.Y;return i&&void 0!==this.Y&&this.rt(void 0),(i||this.lt!==this.ct)&&(this.Y=t,this.ht=e.options?.host,this.rt(this.ct=e.element)),X}rt(e){if(this.isConnected||(e=void 0),"function"==typeof this.Y){const t=this.ht??globalThis;let i=pt.get(t);void 0===i&&(i=new WeakMap,pt.set(t,i)),void 0!==i.get(this.Y)&&this.Y.call(this.ht,void 0),i.set(this.Y,e),void 0!==e&&this.Y.call(this.ht,e)}else this.Y.value=e}get lt(){return"function"==typeof this.Y?pt.get(this.ht??globalThis)?.get(this.Y):this.Y?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),bt='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path fill="currentColor" d="M9.014 8.5c-.048 1-.24 1.86-.497 2.47-.15.357-.304.582-.424.701a1 1 0 0 1-.07.062 1 1 0 0 1-.07-.062c-.12-.12-.273-.343-.424-.7-.257-.61-.448-1.472-.497-2.471zM10.018 8.5c-.052 1.183-.288 2.236-.638 2.999A3.76 3.76 0 0 0 11.75 8.5zM6.666 11.499A3.76 3.76 0 0 1 4.296 8.5h1.732c.053 1.183.288 2.236.638 2.999M7.032 7.5c.049-1 .24-1.86.497-2.47.15-.357.305-.581.424-.701a1 1 0 0 1 .07-.062q.026.018.07.062c.12.12.274.344.424.7.258.61.449 1.472.497 2.471zM6.028 7.5H4.295a3.76 3.76 0 0 1 2.371-2.999c-.35.763-.585 1.816-.638 2.999M9.38 4.501A3.76 3.76 0 0 1 11.75 7.5h-1.733c-.052-1.183-.288-2.236-.638-2.999"/><path fill="currentColor" d="M12.921 9.078A5.01 5.01 0 0 1 8.023 13a5.01 5.01 0 0 1-4.981-4.42l-1.538.92-1.48-.886C.337 12.745 3.798 16 8.023 16c4.104 0 7.489-3.073 7.965-7.038L14.542 8zM16.023 7.386C15.71 3.255 12.247 0 8.023 0 3.92 0 .533 3.073.057 7.038L1.504 8l1.621-1.078A5.01 5.01 0 0 1 8.023 3a5.01 5.01 0 0 1 4.981 4.42l1.538-.92z"/></svg>\n';function gt(e,t){return i(this,void 0,void 0,(function*(){const i=(new TextEncoder).encode(e),o=yield crypto.subtle.digest(t,i),n=Array.from(new Uint8Array(o)).map((e=>e.toString(16).padStart(2,"0"))).join("");return n}))}function vt(e){if(!e)return"";e.length<14&&(e+="00000101000000".substr(e.length));const t=e.substring(0,4)+"-"+e.substring(4,6)+"-"+e.substring(6,8)+"T"+e.substring(8,10)+":"+e.substring(10,12)+":"+e.substring(12,14)+"-00:00";return new Date(t)}function wt(e){let t=null;t=new Date(e);return t&&t instanceof Date?xt(t.toISOString()):""}function yt(e){let t=null;try{t=new Date(e.ts||e.date)}catch(e){}const i=t&&t instanceof Date?xt(t.toISOString()):"";return{date:t,timestamp:i}}function xt(e){return e.replace(/[-:T]/g,"").slice(0,14)}function kt(e,t,i,o){const n=new URLSearchParams;return n.set("view",e),n.set("url",t),n.set("ts",i),o&&n.set("waczhash",o),"#"+n.toString()}function St(e){return i(this,void 0,void 0,(function*(){try{new URL(e)}catch(t){e=new URL(e,document.baseURI).href}const t="id-"+(yield gt(e,"SHA-256")).slice(0,12);return{url:e,item:t}}))}function $t(e){let t=e.indexOf("://"),i=0,o="",n="",r="";return t>=0?(o=e.slice(0,t),t+=3):(t++,e.startsWith("//")&&(t+=2)),i=e.indexOf("/",t),i>0?(n=e.slice(t,i),r=e.slice(i)):(n=e.slice(t),r=""),{scheme:o,host:n,path:r}}const zt='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --\x3e<path d="M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"/></svg>',_t='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --\x3e<path d="M464 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zm-6 400H54a6 6 0 0 1-6-6V86a6 6 0 0 1 6-6h404a6 6 0 0 1 6 6v340a6 6 0 0 1-6 6zm-42-92v24c0 6.627-5.373 12-12 12H204c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h200c6.627 0 12 5.373 12 12zm0-96v24c0 6.627-5.373 12-12 12H204c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h200c6.627 0 12 5.373 12 12zm0-96v24c0 6.627-5.373 12-12 12H204c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h200c6.627 0 12 5.373 12 12zm-252 12c0 19.882-16.118 36-36 36s-36-16.118-36-36 16.118-36 36-36 36 16.118 36 36zm0 96c0 19.882-16.118 36-36 36s-36-16.118-36-36 16.118-36 36-36 36 16.118 36 36zm0 96c0 19.882-16.118 36-36 36s-36-16.118-36-36 16.118-36 36-36 36 16.118 36 36z"/></svg>',Ct='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512">\x3c!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --\x3e<path d="M528 0H48C21.5 0 0 21.5 0 48v320c0 26.5 21.5 48 48 48h192l-16 48h-72c-13.3 0-24 10.7-24 24s10.7 24 24 24h272c13.3 0 24-10.7 24-24s-10.7-24-24-24h-72l-16-48h192c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zm-16 352H64V64h448v288z"/></svg>',It='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --\x3e<path d="M200 288H88c-21.4 0-32.1 25.8-17 41l32.9 31-99.2 99.3c-6.2 6.2-6.2 16.4 0 22.6l25.4 25.4c6.2 6.2 16.4 6.2 22.6 0L152 408l31.1 33c15.1 15.1 40.9 4.4 40.9-17V312c0-13.3-10.7-24-24-24zm112-64h112c21.4 0 32.1-25.9 17-41l-33-31 99.3-99.3c6.2-6.2 6.2-16.4 0-22.6L481.9 4.7c-6.2-6.2-16.4-6.2-22.6 0L360 104l-31.1-33C313.8 55.9 288 66.6 288 88v112c0 13.3 10.7 24 24 24zm96 136l33-31.1c15.1-15.1 4.4-40.9-17-40.9H312c-13.3 0-24 10.7-24 24v112c0 21.4 25.9 32.1 41 17l31-32.9 99.3 99.3c6.2 6.2 16.4 6.2 22.6 0l25.4-25.4c6.2-6.2 6.2-16.4 0-22.6L408 360zM183 71.1L152 104 52.7 4.7c-6.2-6.2-16.4-6.2-22.6 0L4.7 30.1c-6.2 6.2-6.2 16.4 0 22.6L104 152l-33 31.1C55.9 198.2 66.6 224 88 224h112c13.3 0 24-10.7 24-24V88c0-21.3-25.9-32-41-16.9z"/></svg>';var Lt=__webpack_require__(431),Et=__webpack_require__.n(Lt);const At=new Intl.DateTimeFormat([...navigator.languages],{month:"2-digit",day:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),Tt=new Intl.DateTimeFormat([...navigator.languages],{month:"2-digit",day:"2-digit",year:"numeric"}),Pt=new Intl.DateTimeFormat([...navigator.languages],{hour:"2-digit",minute:"2-digit",second:"2-digit"});class Dt extends me{constructor(){super(...arguments),this.collInfo=null,this.ts=null,this.url=null,this.active=!1}get renderRoot(){return this}static get embedStyles(){return h`
|
|
144
144
|
rwp-embed-receipt {
|
|
145
145
|
display: flex;
|
|
146
146
|
flex-direction: column;
|
|
@@ -274,7 +274,7 @@ const ht=()=>new ut;class ut{}const ft=new WeakMap,pt=Ce(class extends dt{render
|
|
|
274
274
|
margin: 0.5rem;
|
|
275
275
|
line-height: 0.5rem;
|
|
276
276
|
}
|
|
277
|
-
`}render(){var e,t,i,o;const{numValid:n=0,numInvalid:r=0,domain:s,certFingerprint:a,datapackageHash:l,publicKey:c,software:d}=null!==(t=null===(e=this.collInfo)||void 0===e?void 0:e.verify)&&void 0!==t?t:{},h=null===(i=this.collInfo)||void 0===i?void 0:i.sourceUrl,u=a?`https://crt.sh/?q=${a}`:"",f=this.ts?
|
|
277
|
+
`}render(){var e,t,i,o;const{numValid:n=0,numInvalid:r=0,domain:s,certFingerprint:a,datapackageHash:l,publicKey:c,software:d}=null!==(t=null===(e=this.collInfo)||void 0===e?void 0:e.verify)&&void 0!==t?t:{},h=null===(i=this.collInfo)||void 0===i?void 0:i.sourceUrl,u=a?`https://crt.sh/?q=${a}`:"",f=this.ts?At.format(vt(this.ts)):"";return Q`
|
|
278
278
|
<div class="dropdown mb-4 ${this.active?"is-active":""}">
|
|
279
279
|
<div class="dropdown-trigger embed-info-container">
|
|
280
280
|
<button
|
|
@@ -333,7 +333,7 @@ const ht=()=>new ut;class ut{}const ft=new WeakMap,pt=Ce(class extends dt{render
|
|
|
333
333
|
<fa-icon
|
|
334
334
|
size="1.0em"
|
|
335
335
|
aria-hidden="true"
|
|
336
|
-
.svg="${
|
|
336
|
+
.svg="${zt}"
|
|
337
337
|
></fa-icon>
|
|
338
338
|
</span>
|
|
339
339
|
<span>Download Archive</span>
|
|
@@ -371,7 +371,7 @@ const ht=()=>new ut;class ut{}const ft=new WeakMap,pt=Ce(class extends dt{render
|
|
|
371
371
|
<p class="show-hash">${l}</p>
|
|
372
372
|
${null!=(null===(o=this.collInfo)||void 0===o?void 0:o.size)?Q`
|
|
373
373
|
<h3 class="mt-2">Size</h3>
|
|
374
|
-
<p>${
|
|
374
|
+
<p>${Et()(Number(this.collInfo.size||0))}</p>
|
|
375
375
|
`:X}
|
|
376
376
|
</div>
|
|
377
377
|
${h?Q``:""}
|
|
@@ -415,7 +415,7 @@ const ht=()=>new ut;class ut{}const ft=new WeakMap,pt=Ce(class extends dt{render
|
|
|
415
415
|
</div>
|
|
416
416
|
</div>
|
|
417
417
|
</div>
|
|
418
|
-
`}onEmbedDrop(e){e.stopPropagation(),this.active=!this.active}}t([ye({type:Object})],Lt.prototype,"collInfo",void 0),t([ye({type:String})],Lt.prototype,"ts",void 0),t([ye({type:String})],Lt.prototype,"url",void 0),t([ye({type:Boolean})],Lt.prototype,"active",void 0),customElements.define("rwp-embed-receipt",Lt);var Et="undefined"!=typeof window?window:null,At=null===Et,Tt=At?void 0:Et.document,Pt="addEventListener",Dt="removeEventListener",Ft="getBoundingClientRect",Mt="_a",Rt="_b",Ot="_c",Ut="horizontal",Bt=function(){return!1},Nt=At?"calc":["","-webkit-","-moz-","-o-"].filter((function(e){var t=Tt.createElement("div");return t.style.cssText="width:"+e+"calc(9px)",!!t.style.length})).shift()+"calc",qt=function(e){return"string"==typeof e||e instanceof String},jt=function(e){if(qt(e)){var t=Tt.querySelector(e);if(!t)throw new Error("Selector "+e+" did not match a DOM element");return t}return e},Ht=function(e,t,i){var o=e[t];return void 0!==o?o:i},Wt=function(e,t,i,o){if(t){if("end"===o)return 0;if("center"===o)return e/2}else if(i){if("start"===o)return 0;if("center"===o)return e/2}return e},Vt=function(e,t){var i=Tt.createElement("div");return i.className="gutter gutter-"+t,i},Gt=function(e,t,i){var o={};return qt(t)?o[e]=t:o[e]=Nt+"("+t+"% - "+i+"px)",o},Kt=function(e,t){var i;return(i={})[e]=t+"px",i};const Yt=function(e,t){if(void 0===t&&(t={}),At)return{};var i,o,n,r,s,a,l=e;Array.from&&(l=Array.from(l));var c=jt(l[0]).parentNode,d=getComputedStyle?getComputedStyle(c):null,h=d?d.flexDirection:null,u=Ht(t,"sizes")||l.map((function(){return 100/l.length})),f=Ht(t,"minSize",100),p=Array.isArray(f)?f:l.map((function(){return f})),m=Ht(t,"maxSize",1/0),b=Array.isArray(m)?m:l.map((function(){return m})),g=Ht(t,"expandToMin",!1),v=Ht(t,"gutterSize",10),w=Ht(t,"gutterAlign","center"),y=Ht(t,"snapOffset",30),x=Ht(t,"dragInterval",1),k=Ht(t,"direction",Ut),S=Ht(t,"cursor",k===Ut?"col-resize":"row-resize"),$=Ht(t,"gutter",Vt),z=Ht(t,"elementStyle",Gt),_=Ht(t,"gutterStyle",Kt);function C(e,t,o,n){var r=z(i,t,o,n);Object.keys(r).forEach((function(t){e.style[t]=r[t]}))}function I(){return a.map((function(e){return e.size}))}function L(e){return"touches"in e?e.touches[0][o]:e[o]}function E(e){var t=a[this.a],i=a[this.b],o=t.size+i.size;t.size=e/this.size*o,i.size=o-e/this.size*o,C(t.element,t.size,this[Rt],t.i),C(i.element,i.size,this[Ot],i.i)}function A(e){var i,o=a[this.a],n=a[this.b];this.dragging&&(i=L(e)-this.start+(this[Rt]-this.dragOffset),x>1&&(i=Math.round(i/x)*x),i<=o.minSize+y+this[Rt]?i=o.minSize+this[Rt]:i>=this.size-(n.minSize+y+this[Ot])&&(i=this.size-(n.minSize+this[Ot])),i>=o.maxSize-y+this[Rt]?i=o.maxSize+this[Rt]:i<=this.size-(n.maxSize-y+this[Ot])&&(i=this.size-(n.maxSize+this[Ot])),E.call(this,i),Ht(t,"onDrag",Bt)(I()))}function T(){var e=a[this.a].element,t=a[this.b].element,o=e[Ft](),s=t[Ft]();this.size=o[i]+s[i]+this[Rt]+this[Ot],this.start=o[n],this.end=o[r]}function P(e){var t=function(e){if(!getComputedStyle)return null;var t=getComputedStyle(e);if(!t)return null;var i=e[s];return 0===i?null:i-=k===Ut?parseFloat(t.paddingLeft)+parseFloat(t.paddingRight):parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)}(c);if(null===t)return e;if(p.reduce((function(e,t){return e+t}),0)>t)return e;var i=0,o=[],n=e.map((function(n,r){var s=t*n/100,a=Wt(v,0===r,r===e.length-1,w),l=p[r]+a;return s<l?(i+=l-s,o.push(0),l):(o.push(s-l),s)}));return 0===i?e:n.map((function(e,n){var r=e;if(i>0&&o[n]-i>0){var s=Math.min(i,o[n]-i);i-=s,r=e-s}return r/t*100}))}function D(){var e=this,i=a[e.a].element,o=a[e.b].element;e.dragging&&Ht(t,"onDragEnd",Bt)(I()),e.dragging=!1,Et[Dt]("mouseup",e.stop),Et[Dt]("touchend",e.stop),Et[Dt]("touchcancel",e.stop),Et[Dt]("mousemove",e.move),Et[Dt]("touchmove",e.move),e.stop=null,e.move=null,i[Dt]("selectstart",Bt),i[Dt]("dragstart",Bt),o[Dt]("selectstart",Bt),o[Dt]("dragstart",Bt),i.style.userSelect="",i.style.webkitUserSelect="",i.style.MozUserSelect="",i.style.pointerEvents="",o.style.userSelect="",o.style.webkitUserSelect="",o.style.MozUserSelect="",o.style.pointerEvents="",e.gutter.style.cursor="",e.parent.style.cursor="",Tt.body.style.cursor=""}function F(e){if(!("button"in e)||0===e.button){var i=this,o=a[i.a].element,n=a[i.b].element;i.dragging||Ht(t,"onDragStart",Bt)(I()),e.preventDefault(),i.dragging=!0,i.move=A.bind(i),i.stop=D.bind(i),Et[Pt]("mouseup",i.stop),Et[Pt]("touchend",i.stop),Et[Pt]("touchcancel",i.stop),Et[Pt]("mousemove",i.move),Et[Pt]("touchmove",i.move),o[Pt]("selectstart",Bt),o[Pt]("dragstart",Bt),n[Pt]("selectstart",Bt),n[Pt]("dragstart",Bt),o.style.userSelect="none",o.style.webkitUserSelect="none",o.style.MozUserSelect="none",o.style.pointerEvents="none",n.style.userSelect="none",n.style.webkitUserSelect="none",n.style.MozUserSelect="none",n.style.pointerEvents="none",i.gutter.style.cursor=S,i.parent.style.cursor=S,Tt.body.style.cursor=S,T.call(i),i.dragOffset=L(e)-i.end}}k===Ut?(i="width",o="clientX",n="left",r="right",s="clientWidth"):"vertical"===k&&(i="height",o="clientY",n="top",r="bottom",s="clientHeight"),u=P(u);var M=[];function R(e){var t=e.i===M.length,i=t?M[e.i-1]:M[e.i];T.call(i);var o=t?i.size-e.minSize-i[Ot]:e.minSize+i[Rt];E.call(i,o)}return a=l.map((function(e,t){var o,n={element:jt(e),size:u[t],minSize:p[t],maxSize:b[t],i:t};if(t>0&&((o={a:t-1,b:t,dragging:!1,direction:k,parent:c})[Rt]=Wt(v,t-1==0,!1,w),o[Ot]=Wt(v,!1,t===l.length-1,w),"row-reverse"===h||"column-reverse"===h)){var r=o.a;o.a=o.b,o.b=r}if(t>0){var s=$(t,k,n.element);!function(e,t,o){var n=_(i,t,o);Object.keys(n).forEach((function(t){e.style[t]=n[t]}))}(s,v,t),o[Mt]=F.bind(o),s[Pt]("mousedown",o[Mt]),s[Pt]("touchstart",o[Mt]),c.insertBefore(s,n.element),o.gutter=s}return C(n.element,n.size,Wt(v,0===t,t===l.length-1,w),t),t>0&&M.push(o),n})),a.forEach((function(e){var t=e.element[Ft]()[i];t<e.minSize&&(g?R(e):e.minSize=t)})),{setSizes:function(e){var t=P(e);t.forEach((function(e,i){if(i>0){var o=M[i-1],n=a[o.a],r=a[o.b];n.size=t[i-1],r.size=e,C(n.element,n.size,o[Rt],n.i),C(r.element,r.size,o[Ot],r.i)}}))},getSizes:I,collapse:function(e){R(a[e])},destroy:function(e,t){M.forEach((function(o){if(!0!==t?o.parent.removeChild(o.gutter):(o.gutter[Dt]("mousedown",o[Mt]),o.gutter[Dt]("touchstart",o[Mt])),!0!==e){var n=z(i,o.a.size,o[Rt]);Object.keys(n).forEach((function(e){a[o.a].element.style[e]="",a[o.b].element.style[e]=""}))}}))},parent:c,pairs:M}};var Qt="";function Zt(e){Qt=e}var Jt={name:"default",resolver:e=>function(e=""){if(!Qt){const e=[...document.getElementsByTagName("script")],t=e.find((e=>e.hasAttribute("data-shoelace")));if(t)Zt(t.getAttribute("data-shoelace"));else{const t=e.find((e=>/shoelace(\.min)?\.js($|\?)/.test(e.src)||/shoelace-autoloader(\.min)?\.js($|\?)/.test(e.src)));let i="";t&&(i=t.getAttribute("src")),Zt(i.split("/").slice(0,-1).join("/"))}}return Qt.replace(/\/$/,"")+(e?`/${e.replace(/^\//,"")}`:"")}(`assets/icons/${e}.svg`)},Xt={caret:'\n <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <polyline points="6 9 12 15 18 9"></polyline>\n </svg>\n ',check:'\n <svg part="checked-icon" class="checkbox__icon" viewBox="0 0 16 16">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">\n <g stroke="currentColor">\n <g transform="translate(3.428571, 3.428571)">\n <path d="M0,5.71428571 L3.42857143,9.14285714"></path>\n <path d="M9.14285714,0 L3.42857143,9.14285714"></path>\n </g>\n </g>\n </g>\n </svg>\n ',"chevron-down":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-down" viewBox="0 0 16 16">\n <path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/>\n </svg>\n ',"chevron-left":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-left" viewBox="0 0 16 16">\n <path fill-rule="evenodd" d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"/>\n </svg>\n ',"chevron-right":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-right" viewBox="0 0 16 16">\n <path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"/>\n </svg>\n ',copy:'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-copy" viewBox="0 0 16 16">\n <path fill-rule="evenodd" d="M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V2Zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H6ZM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1H2Z"/>\n </svg>\n ',eye:'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16">\n <path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/>\n <path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>\n </svg>\n ',"eye-slash":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye-slash" viewBox="0 0 16 16">\n <path d="M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755-.165.165-.337.328-.517.486l.708.709z"/>\n <path d="M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"/>\n <path d="M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884-12-12 .708-.708 12 12-.708.708z"/>\n </svg>\n ',eyedropper:'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eyedropper" viewBox="0 0 16 16">\n <path d="M13.354.646a1.207 1.207 0 0 0-1.708 0L8.5 3.793l-.646-.647a.5.5 0 1 0-.708.708L8.293 5l-7.147 7.146A.5.5 0 0 0 1 12.5v1.793l-.854.853a.5.5 0 1 0 .708.707L1.707 15H3.5a.5.5 0 0 0 .354-.146L11 7.707l1.146 1.147a.5.5 0 0 0 .708-.708l-.647-.646 3.147-3.146a1.207 1.207 0 0 0 0-1.708l-2-2zM2 12.707l7-7L10.293 7l-7 7H2v-1.293z"></path>\n </svg>\n ',"grip-vertical":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-grip-vertical" viewBox="0 0 16 16">\n <path d="M7 2a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zM7 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zM7 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"></path>\n </svg>\n ',indeterminate:'\n <svg part="indeterminate-icon" class="checkbox__icon" viewBox="0 0 16 16">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">\n <g stroke="currentColor" stroke-width="2">\n <g transform="translate(2.285714, 6.857143)">\n <path d="M10.2857143,1.14285714 L1.14285714,1.14285714"></path>\n </g>\n </g>\n </g>\n </svg>\n ',"person-fill":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-person-fill" viewBox="0 0 16 16">\n <path d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/>\n </svg>\n ',"play-fill":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-play-fill" viewBox="0 0 16 16">\n <path d="m11.596 8.697-6.363 3.692c-.54.313-1.233-.066-1.233-.697V4.308c0-.63.692-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393z"></path>\n </svg>\n ',"pause-fill":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pause-fill" viewBox="0 0 16 16">\n <path d="M5.5 3.5A1.5 1.5 0 0 1 7 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5zm5 0A1.5 1.5 0 0 1 12 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5z"></path>\n </svg>\n ',radio:'\n <svg part="checked-icon" class="radio__icon" viewBox="0 0 16 16">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g fill="currentColor">\n <circle cx="8" cy="8" r="3.42857143"></circle>\n </g>\n </g>\n </svg>\n ',"star-fill":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-star-fill" viewBox="0 0 16 16">\n <path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z"/>\n </svg>\n ',"x-lg":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-lg" viewBox="0 0 16 16">\n <path d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z"/>\n </svg>\n ',"x-circle-fill":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-circle-fill" viewBox="0 0 16 16">\n <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z"></path>\n </svg>\n '},ei={name:"system",resolver:e=>e in Xt?`data:image/svg+xml,${encodeURIComponent(Xt[e])}`:""},ti=[Jt,ei],ii=[];function oi(e){return ti.find((t=>t.name===e))}var ni,ri=Object.defineProperty,si=Object.defineProperties,ai=Object.getOwnPropertyDescriptor,li=Object.getOwnPropertyDescriptors,ci=Object.getOwnPropertySymbols,di=Object.prototype.hasOwnProperty,hi=Object.prototype.propertyIsEnumerable,ui=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),fi=(e,t,i)=>t in e?ri(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,pi=(e,t)=>{for(var i in t||(t={}))di.call(t,i)&&fi(e,i,t[i]);if(ci)for(var i of ci(t))hi.call(t,i)&&fi(e,i,t[i]);return e},mi=(e,t)=>si(e,li(t)),bi=(e,t,i,o)=>{for(var n,r=o>1?void 0:o?ai(t,i):t,s=e.length-1;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&ri(t,i,r),r},gi=function(e,t){this[0]=e,this[1]=t},vi=e=>{var t,i=e[ui("asyncIterator")],o=!1,n={};return null==i?(i=e[ui("iterator")](),t=e=>n[e]=t=>i[e](t)):(i=i.call(e),t=e=>n[e]=t=>{if(o){if(o=!1,"throw"===e)throw t;return t}return o=!0,{done:!1,value:new gi(new Promise((o=>{var n=i[e](t);if(!(n instanceof Object))throw TypeError("Object expected");o(n)})),1)}}),n[ui("iterator")]=()=>n,t("next"),"throw"in i?t("throw"):n.throw=e=>{throw e},"return"in i&&t("return"),n};!function(e,t){!function(e){ti=ti.filter((t=>t.name!==e))}(e),ti.push({name:e,resolver:t.resolver,mutator:t.mutator,spriteSheet:t.spriteSheet}),ii.forEach((t=>{t.library===e&&t.setIcon()}))}("system",{resolver:e=>"x-lg"===e?ei.resolver(e):""});let wi=ni=class extends me{static get styles(){return Ne(ni.compStyles)}static get compStyles(){return h`
|
|
418
|
+
`}onEmbedDrop(e){e.stopPropagation(),this.active=!this.active}}t([ye({type:Object})],Dt.prototype,"collInfo",void 0),t([ye({type:String})],Dt.prototype,"ts",void 0),t([ye({type:String})],Dt.prototype,"url",void 0),t([ye({type:Boolean})],Dt.prototype,"active",void 0),customElements.define("rwp-embed-receipt",Dt);var Ft="undefined"!=typeof window?window:null,Mt=null===Ft,Rt=Mt?void 0:Ft.document,Ot="addEventListener",Ut="removeEventListener",Bt="getBoundingClientRect",Nt="_a",qt="_b",jt="_c",Ht="horizontal",Wt=function(){return!1},Vt=Mt?"calc":["","-webkit-","-moz-","-o-"].filter((function(e){var t=Rt.createElement("div");return t.style.cssText="width:"+e+"calc(9px)",!!t.style.length})).shift()+"calc",Gt=function(e){return"string"==typeof e||e instanceof String},Kt=function(e){if(Gt(e)){var t=Rt.querySelector(e);if(!t)throw new Error("Selector "+e+" did not match a DOM element");return t}return e},Yt=function(e,t,i){var o=e[t];return void 0!==o?o:i},Qt=function(e,t,i,o){if(t){if("end"===o)return 0;if("center"===o)return e/2}else if(i){if("start"===o)return 0;if("center"===o)return e/2}return e},Zt=function(e,t){var i=Rt.createElement("div");return i.className="gutter gutter-"+t,i},Jt=function(e,t,i){var o={};return Gt(t)?o[e]=t:o[e]=Vt+"("+t+"% - "+i+"px)",o},Xt=function(e,t){var i;return(i={})[e]=t+"px",i};const ei=function(e,t){if(void 0===t&&(t={}),Mt)return{};var i,o,n,r,s,a,l=e;Array.from&&(l=Array.from(l));var c=Kt(l[0]).parentNode,d=getComputedStyle?getComputedStyle(c):null,h=d?d.flexDirection:null,u=Yt(t,"sizes")||l.map((function(){return 100/l.length})),f=Yt(t,"minSize",100),p=Array.isArray(f)?f:l.map((function(){return f})),m=Yt(t,"maxSize",1/0),b=Array.isArray(m)?m:l.map((function(){return m})),g=Yt(t,"expandToMin",!1),v=Yt(t,"gutterSize",10),w=Yt(t,"gutterAlign","center"),y=Yt(t,"snapOffset",30),x=Yt(t,"dragInterval",1),k=Yt(t,"direction",Ht),S=Yt(t,"cursor",k===Ht?"col-resize":"row-resize"),$=Yt(t,"gutter",Zt),z=Yt(t,"elementStyle",Jt),_=Yt(t,"gutterStyle",Xt);function C(e,t,o,n){var r=z(i,t,o,n);Object.keys(r).forEach((function(t){e.style[t]=r[t]}))}function I(){return a.map((function(e){return e.size}))}function L(e){return"touches"in e?e.touches[0][o]:e[o]}function E(e){var t=a[this.a],i=a[this.b],o=t.size+i.size;t.size=e/this.size*o,i.size=o-e/this.size*o,C(t.element,t.size,this[qt],t.i),C(i.element,i.size,this[jt],i.i)}function A(e){var i,o=a[this.a],n=a[this.b];this.dragging&&(i=L(e)-this.start+(this[qt]-this.dragOffset),x>1&&(i=Math.round(i/x)*x),i<=o.minSize+y+this[qt]?i=o.minSize+this[qt]:i>=this.size-(n.minSize+y+this[jt])&&(i=this.size-(n.minSize+this[jt])),i>=o.maxSize-y+this[qt]?i=o.maxSize+this[qt]:i<=this.size-(n.maxSize-y+this[jt])&&(i=this.size-(n.maxSize+this[jt])),E.call(this,i),Yt(t,"onDrag",Wt)(I()))}function T(){var e=a[this.a].element,t=a[this.b].element,o=e[Bt](),s=t[Bt]();this.size=o[i]+s[i]+this[qt]+this[jt],this.start=o[n],this.end=o[r]}function P(e){var t=function(e){if(!getComputedStyle)return null;var t=getComputedStyle(e);if(!t)return null;var i=e[s];return 0===i?null:i-=k===Ht?parseFloat(t.paddingLeft)+parseFloat(t.paddingRight):parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)}(c);if(null===t)return e;if(p.reduce((function(e,t){return e+t}),0)>t)return e;var i=0,o=[],n=e.map((function(n,r){var s=t*n/100,a=Qt(v,0===r,r===e.length-1,w),l=p[r]+a;return s<l?(i+=l-s,o.push(0),l):(o.push(s-l),s)}));return 0===i?e:n.map((function(e,n){var r=e;if(i>0&&o[n]-i>0){var s=Math.min(i,o[n]-i);i-=s,r=e-s}return r/t*100}))}function D(){var e=this,i=a[e.a].element,o=a[e.b].element;e.dragging&&Yt(t,"onDragEnd",Wt)(I()),e.dragging=!1,Ft[Ut]("mouseup",e.stop),Ft[Ut]("touchend",e.stop),Ft[Ut]("touchcancel",e.stop),Ft[Ut]("mousemove",e.move),Ft[Ut]("touchmove",e.move),e.stop=null,e.move=null,i[Ut]("selectstart",Wt),i[Ut]("dragstart",Wt),o[Ut]("selectstart",Wt),o[Ut]("dragstart",Wt),i.style.userSelect="",i.style.webkitUserSelect="",i.style.MozUserSelect="",i.style.pointerEvents="",o.style.userSelect="",o.style.webkitUserSelect="",o.style.MozUserSelect="",o.style.pointerEvents="",e.gutter.style.cursor="",e.parent.style.cursor="",Rt.body.style.cursor=""}function F(e){if(!("button"in e)||0===e.button){var i=this,o=a[i.a].element,n=a[i.b].element;i.dragging||Yt(t,"onDragStart",Wt)(I()),e.preventDefault(),i.dragging=!0,i.move=A.bind(i),i.stop=D.bind(i),Ft[Ot]("mouseup",i.stop),Ft[Ot]("touchend",i.stop),Ft[Ot]("touchcancel",i.stop),Ft[Ot]("mousemove",i.move),Ft[Ot]("touchmove",i.move),o[Ot]("selectstart",Wt),o[Ot]("dragstart",Wt),n[Ot]("selectstart",Wt),n[Ot]("dragstart",Wt),o.style.userSelect="none",o.style.webkitUserSelect="none",o.style.MozUserSelect="none",o.style.pointerEvents="none",n.style.userSelect="none",n.style.webkitUserSelect="none",n.style.MozUserSelect="none",n.style.pointerEvents="none",i.gutter.style.cursor=S,i.parent.style.cursor=S,Rt.body.style.cursor=S,T.call(i),i.dragOffset=L(e)-i.end}}k===Ht?(i="width",o="clientX",n="left",r="right",s="clientWidth"):"vertical"===k&&(i="height",o="clientY",n="top",r="bottom",s="clientHeight"),u=P(u);var M=[];function R(e){var t=e.i===M.length,i=t?M[e.i-1]:M[e.i];T.call(i);var o=t?i.size-e.minSize-i[jt]:e.minSize+i[qt];E.call(i,o)}return a=l.map((function(e,t){var o,n={element:Kt(e),size:u[t],minSize:p[t],maxSize:b[t],i:t};if(t>0&&((o={a:t-1,b:t,dragging:!1,direction:k,parent:c})[qt]=Qt(v,t-1==0,!1,w),o[jt]=Qt(v,!1,t===l.length-1,w),"row-reverse"===h||"column-reverse"===h)){var r=o.a;o.a=o.b,o.b=r}if(t>0){var s=$(t,k,n.element);!function(e,t,o){var n=_(i,t,o);Object.keys(n).forEach((function(t){e.style[t]=n[t]}))}(s,v,t),o[Nt]=F.bind(o),s[Ot]("mousedown",o[Nt]),s[Ot]("touchstart",o[Nt]),c.insertBefore(s,n.element),o.gutter=s}return C(n.element,n.size,Qt(v,0===t,t===l.length-1,w),t),t>0&&M.push(o),n})),a.forEach((function(e){var t=e.element[Bt]()[i];t<e.minSize&&(g?R(e):e.minSize=t)})),{setSizes:function(e){var t=P(e);t.forEach((function(e,i){if(i>0){var o=M[i-1],n=a[o.a],r=a[o.b];n.size=t[i-1],r.size=e,C(n.element,n.size,o[qt],n.i),C(r.element,r.size,o[jt],r.i)}}))},getSizes:I,collapse:function(e){R(a[e])},destroy:function(e,t){M.forEach((function(o){if(!0!==t?o.parent.removeChild(o.gutter):(o.gutter[Ut]("mousedown",o[Nt]),o.gutter[Ut]("touchstart",o[Nt])),!0!==e){var n=z(i,o.a.size,o[qt]);Object.keys(n).forEach((function(e){a[o.a].element.style[e]="",a[o.b].element.style[e]=""}))}}))},parent:c,pairs:M}};var ti="";function ii(e){ti=e}var oi={name:"default",resolver:e=>function(e=""){if(!ti){const e=[...document.getElementsByTagName("script")],t=e.find((e=>e.hasAttribute("data-shoelace")));if(t)ii(t.getAttribute("data-shoelace"));else{const t=e.find((e=>/shoelace(\.min)?\.js($|\?)/.test(e.src)||/shoelace-autoloader(\.min)?\.js($|\?)/.test(e.src)));let i="";t&&(i=t.getAttribute("src")),ii(i.split("/").slice(0,-1).join("/"))}}return ti.replace(/\/$/,"")+(e?`/${e.replace(/^\//,"")}`:"")}(`assets/icons/${e}.svg`)},ni={caret:'\n <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <polyline points="6 9 12 15 18 9"></polyline>\n </svg>\n ',check:'\n <svg part="checked-icon" class="checkbox__icon" viewBox="0 0 16 16">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">\n <g stroke="currentColor">\n <g transform="translate(3.428571, 3.428571)">\n <path d="M0,5.71428571 L3.42857143,9.14285714"></path>\n <path d="M9.14285714,0 L3.42857143,9.14285714"></path>\n </g>\n </g>\n </g>\n </svg>\n ',"chevron-down":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-down" viewBox="0 0 16 16">\n <path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/>\n </svg>\n ',"chevron-left":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-left" viewBox="0 0 16 16">\n <path fill-rule="evenodd" d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"/>\n </svg>\n ',"chevron-right":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-right" viewBox="0 0 16 16">\n <path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"/>\n </svg>\n ',copy:'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-copy" viewBox="0 0 16 16">\n <path fill-rule="evenodd" d="M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V2Zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H6ZM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1H2Z"/>\n </svg>\n ',eye:'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16">\n <path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/>\n <path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>\n </svg>\n ',"eye-slash":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye-slash" viewBox="0 0 16 16">\n <path d="M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755-.165.165-.337.328-.517.486l.708.709z"/>\n <path d="M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"/>\n <path d="M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884-12-12 .708-.708 12 12-.708.708z"/>\n </svg>\n ',eyedropper:'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eyedropper" viewBox="0 0 16 16">\n <path d="M13.354.646a1.207 1.207 0 0 0-1.708 0L8.5 3.793l-.646-.647a.5.5 0 1 0-.708.708L8.293 5l-7.147 7.146A.5.5 0 0 0 1 12.5v1.793l-.854.853a.5.5 0 1 0 .708.707L1.707 15H3.5a.5.5 0 0 0 .354-.146L11 7.707l1.146 1.147a.5.5 0 0 0 .708-.708l-.647-.646 3.147-3.146a1.207 1.207 0 0 0 0-1.708l-2-2zM2 12.707l7-7L10.293 7l-7 7H2v-1.293z"></path>\n </svg>\n ',"grip-vertical":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-grip-vertical" viewBox="0 0 16 16">\n <path d="M7 2a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zM7 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zM7 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"></path>\n </svg>\n ',indeterminate:'\n <svg part="indeterminate-icon" class="checkbox__icon" viewBox="0 0 16 16">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">\n <g stroke="currentColor" stroke-width="2">\n <g transform="translate(2.285714, 6.857143)">\n <path d="M10.2857143,1.14285714 L1.14285714,1.14285714"></path>\n </g>\n </g>\n </g>\n </svg>\n ',"person-fill":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-person-fill" viewBox="0 0 16 16">\n <path d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/>\n </svg>\n ',"play-fill":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-play-fill" viewBox="0 0 16 16">\n <path d="m11.596 8.697-6.363 3.692c-.54.313-1.233-.066-1.233-.697V4.308c0-.63.692-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393z"></path>\n </svg>\n ',"pause-fill":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pause-fill" viewBox="0 0 16 16">\n <path d="M5.5 3.5A1.5 1.5 0 0 1 7 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5zm5 0A1.5 1.5 0 0 1 12 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5z"></path>\n </svg>\n ',radio:'\n <svg part="checked-icon" class="radio__icon" viewBox="0 0 16 16">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g fill="currentColor">\n <circle cx="8" cy="8" r="3.42857143"></circle>\n </g>\n </g>\n </svg>\n ',"star-fill":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-star-fill" viewBox="0 0 16 16">\n <path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z"/>\n </svg>\n ',"x-lg":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-lg" viewBox="0 0 16 16">\n <path d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z"/>\n </svg>\n ',"x-circle-fill":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-circle-fill" viewBox="0 0 16 16">\n <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z"></path>\n </svg>\n '},ri={name:"system",resolver:e=>e in ni?`data:image/svg+xml,${encodeURIComponent(ni[e])}`:""},si=[oi,ri],ai=[];function li(e){return si.find((t=>t.name===e))}var ci,di=Object.defineProperty,hi=Object.defineProperties,ui=Object.getOwnPropertyDescriptor,fi=Object.getOwnPropertyDescriptors,pi=Object.getOwnPropertySymbols,mi=Object.prototype.hasOwnProperty,bi=Object.prototype.propertyIsEnumerable,gi=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),vi=(e,t,i)=>t in e?di(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,wi=(e,t)=>{for(var i in t||(t={}))mi.call(t,i)&&vi(e,i,t[i]);if(pi)for(var i of pi(t))bi.call(t,i)&&vi(e,i,t[i]);return e},yi=(e,t)=>hi(e,fi(t)),xi=(e,t,i,o)=>{for(var n,r=o>1?void 0:o?ui(t,i):t,s=e.length-1;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&di(t,i,r),r},ki=function(e,t){this[0]=e,this[1]=t},Si=e=>{var t,i=e[gi("asyncIterator")],o=!1,n={};return null==i?(i=e[gi("iterator")](),t=e=>n[e]=t=>i[e](t)):(i=i.call(e),t=e=>n[e]=t=>{if(o){if(o=!1,"throw"===e)throw t;return t}return o=!0,{done:!1,value:new ki(new Promise((o=>{var n=i[e](t);if(!(n instanceof Object))throw TypeError("Object expected");o(n)})),1)}}),n[gi("iterator")]=()=>n,t("next"),"throw"in i?t("throw"):n.throw=e=>{throw e},"return"in i&&t("return"),n};!function(e,t){!function(e){si=si.filter((t=>t.name!==e))}(e),si.push({name:e,resolver:t.resolver,mutator:t.mutator,spriteSheet:t.spriteSheet}),ai.forEach((t=>{t.library===e&&t.setIcon()}))}("system",{resolver:e=>"x-lg"===e?ri.resolver(e):""});let $i=ci=class extends me{static get styles(){return Ne(ci.compStyles)}static get compStyles(){return h`
|
|
419
419
|
:host {
|
|
420
420
|
min-width: unset; /* @todo(emma, 2023-11-06) see about removing this, if the min-width set on all web components is unnecessary */
|
|
421
421
|
}
|
|
@@ -453,7 +453,7 @@ const ht=()=>new ut;class ut{}const ft=new WeakMap,pt=Ce(class extends dt{render
|
|
|
453
453
|
aria-hidden="true"
|
|
454
454
|
></fa-icon>
|
|
455
455
|
</sl-copy-button>`:X}
|
|
456
|
-
</div>`}};t([ye({type:String})]
|
|
456
|
+
</div>`}};t([ye({type:String})],$i.prototype,"copy",void 0),t([ye({type:String})],$i.prototype,"label",void 0),t([ye({type:String})],$i.prototype,"class",void 0),$i=ci=t([ge("wr-labeled-field")],$i);class zi extends me{constructor(){super(...arguments),this.item=null,this.detailed=!1,this.canDelete=!1}static get styles(){return Ne(zi.compStyles)}static get compStyles(){return h`
|
|
457
457
|
.columns {
|
|
458
458
|
width: 100%;
|
|
459
459
|
}
|
|
@@ -527,10 +527,10 @@ const ht=()=>new ut;class ut{}const ft=new WeakMap,pt=Ce(class extends dt{render
|
|
|
527
527
|
${t.coll||"No ID"}
|
|
528
528
|
</wr-labeled-field>`:X}
|
|
529
529
|
<wr-labeled-field label="Date Loaded" class="column is-2">
|
|
530
|
-
${t.ctime?
|
|
530
|
+
${t.ctime?At.format(new Date(t.ctime)):X}
|
|
531
531
|
</wr-labeled-field>
|
|
532
532
|
<wr-labeled-field label="Total Size" class="column is-2">
|
|
533
|
-
${
|
|
533
|
+
${Et()(Number(t.totalSize||t.size||0))}
|
|
534
534
|
</wr-labeled-field>
|
|
535
535
|
`}renderSummaryView(){const e=this.item;return Q` <div class="columns">
|
|
536
536
|
<div class="column col-title is-4">
|
|
@@ -604,7 +604,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
604
604
|
<wr-labeled-field label="Loading Mode" class="column">
|
|
605
605
|
${e.onDemand?"Download On-Demand":"Fully Local"}
|
|
606
606
|
</wr-labeled-field>
|
|
607
|
-
</div>`}render(){return this.detailed?this.renderDetailed():this.renderSummaryView()}onCopy(e,t){return e.preventDefault(),e.stopPropagation(),t&&navigator.clipboard.writeText(t),!1}onPurge(e){const t={reload:e};this.dispatchEvent(new CustomEvent("item-purge",{detail:t}))}}t([ye({type:Object})],
|
|
607
|
+
</div>`}render(){return this.detailed?this.renderDetailed():this.renderSummaryView()}onCopy(e,t){return e.preventDefault(),e.stopPropagation(),t&&navigator.clipboard.writeText(t),!1}onPurge(e){const t={reload:e};this.dispatchEvent(new CustomEvent("item-purge",{detail:t}))}}t([ye({type:Object})],zi.prototype,"item",void 0),t([ye({type:Boolean})],zi.prototype,"detailed",void 0),t([ye({type:Boolean})],zi.prototype,"canDelete",void 0),customElements.define("wr-item-info",zi);const _i="search://";class Ci extends me{constructor(){super(),this.inited=!1,this.sourceUrl=null,this.downloadUrl=null,this.loadInfo=null,this.showSidebar=null,this.itemInfo=null,this.item="",this.hasStory=!1,this.isLoading=!1,this.tabData={},this.url="",this.ts="",this.isFullscreen=null,this.menuActive=!1,this.embed=null,this.embedDropdownActive=!1,this.editable=!1,this.browsable=!0,this.clearable=!0,this.isVisible=!0,this.favIconUrl="",this.appName="ReplayWeb.page",this.appVersion=je,this.autoUpdateInterval=10,this.swName=null,this.replayNotFoundError=!1,this.multiTs=[],this.splitter=null,this._replaceLoc=!1,this._locUpdateNeeded=!1,this._locationHash="",this._autoUpdater=null,this.archiveInfoDialog=ut(),this.tabNames=["pages","story","resources","info"],this.tabLabels={pages:"Pages",story:"Story",resources:"URLs"},this._lastUrlUpdate=null,this.showSidebar="1"===localStorage.getItem("pages:showSidebar")&&this.browsable}firstUpdated(){this.inited=!0,window.addEventListener("hashchange",(()=>this.onHashChange())),this.addEventListener("fullscreenchange",(()=>{this.isFullscreen=!!document.fullscreenElement})),this.embed&&this.loadInfo&&this.loadInfo.hideOffscreen&&(this.observer=new IntersectionObserver((e=>{this.isVisible=e[0].isIntersecting})),this.observer.observe(this))}runUpdateLoop(){var e;return i(this,void 0,void 0,(function*(){try{for(;this.editable&&this.autoUpdateInterval&&(!(null===(e=this.itemInfo)||void 0===e?void 0:e.pages)||this.itemInfo.pages.length<100);)yield new Promise((e=>setTimeout(e,1e3*this.autoUpdateInterval))),yield this.doUpdateInfo(!0)}finally{this._autoUpdater=null}}))}getMultiTimestamps(){return i(this,void 0,void 0,(function*(){if(!this.tabData.url)return;const e=yield fetch(Oe+"/c/"+this.item+"/ts/?url="+window.encodeURIComponent(this.tabData.url));if(200!==e.status)return void(this.multiTs=[]);const t=yield e.json();this.multiTs=t.timestamps}))}willUpdate(e){if(e.has("tabData")){const t={};Object.entries(this.tabData).forEach((([e,i])=>{i&&(t[e]=i)})),this.tabData=t;const i=e.get("tabData");this.tabData.url&&this.tabData.url!==(null==i?void 0:i.url)&&this.getMultiTimestamps()}}updated(e){var t;if(e.has("sourceUrl")&&this.doUpdateInfo(),e.has("editable")&&this.editable&&this.autoUpdateInterval&&!this._autoUpdater&&(this._autoUpdater=this.runUpdateLoop()),e.has("tabData")){if(!(null===(t=this.itemInfo)||void 0===t?void 0:t.coll))return;const i="#"+new URLSearchParams(this.tabData).toString();if(this.tabData.url||(this.url=_i+decodeURIComponent(this._paramsToString(this.tabData))),i!==this._locationHash){if(this._locationHash=i,this._replaceLoc||0===Object.keys(e.get("tabData")||{}).length){const e=new URL(window.location.href);e.hash=this._locationHash,window.history.replaceState({},"",e.href),this._replaceLoc=!1}else if(window.location.hash=this._locationHash,!this.showSidebar){const e=this.renderRoot.querySelector("wr-coll-replay");e&&e.focus()}if(this.embed&&window.parent!==window){const{url:e,ts:t,view:i,query:o,title:n}=this.tabData,r=this._lastUrlUpdate,s=this.replayNotFoundError;if(!r||r.url!==e||r.ts!==t||r.view!==i||r.query!==o||r.title!==n){const r={type:"urlchange",url:e,ts:t,view:i,query:o,title:n,replayNotFoundError:s};window.parent.postMessage(r,"*"),this._lastUrlUpdate=r}}}this._locUpdateNeeded=!1}e.has("showSidebar")&&(this.embed||localStorage.setItem("pages:showSidebar",this.showSidebar?"1":"0")),(e.has("tabData")||e.has("showSidebar"))&&this.configureSplitter()}configureSplitter(){if(this.tabData.url&&this.showSidebar){const e=this.renderRoot.querySelector("#contents"),t=this.renderRoot.querySelector("wr-coll-replay");if(e&&t&&!this.splitter){const i={sizes:[30,70],minSize:[300,300],gutterSize:4,onDragStart(){t.setDisablePointer(!0)},onDragEnd(){t.setDisablePointer(!1)}};this.splitter=ei([e,t],i)}}else if(this.splitter){try{this.splitter.destroy()}catch(e){}this.splitter=null}}doUpdateInfo(e=!1){var t,o,n,r;return i(this,void 0,void 0,(function*(){if(e&&this.tabData.url&&!this.showSidebar)return;let i=null===(t=this.loadInfo)||void 0===t?void 0:t.customColl;if(!i){i=(yield St(this.sourceUrl)).item}this.item=i;const s=Oe+"/c/"+i,a=Ue+"/"+i,l=yield fetch(s+"?all=1");if(200!=l.status)return void(this.itemInfo={});const c=yield l.json();if(this.itemInfo=Object.assign({apiPrefix:s,replayPrefix:a,coll:i},c),null===(n=null===(o=this.loadInfo)||void 0===o?void 0:o.extraConfig)||void 0===n?void 0:n.headers){const e=this.loadInfo.extraConfig.headers;yield fetch(`${s}/updateAuth`,{method:"POST",body:JSON.stringify({headers:e})})}const{title:d,name:h,filename:u,downloadUrl:f}=this.itemInfo;d||(this.itemInfo.title=h||u),this.downloadUrl=null===f?null:f||this.sourceUrl,"replayonly"!==this.embed&&"replay-with-info"!==this.embed||(this.showSidebar=!1),this.hasStory=Boolean(this.itemInfo.desc||(null===(r=this.itemInfo.lists)||void 0===r?void 0:r.length)),this.dispatchEvent(new CustomEvent("coll-loaded",{detail:{collInfo:this.itemInfo,alreadyLoaded:!0}})),this.onHashChange()}))}onItemLoaded(e){this.doUpdateInfo(),this.loadInfo=null,e.detail.sourceUrl&&(this.sourceUrl=e.detail.sourceUrl),this.dispatchEvent(new CustomEvent("coll-loaded",{detail:{sourceUrl:this.sourceUrl,collInfo:this.itemInfo}}))}onItemUpdate(e){this.editable&&(this.itemInfo=Object.assign(Object.assign({},this.itemInfo),e.detail))}onHashChange(){var e,t,i;const o=window.location.hash;if(o&&o!==this._locationHash&&(this.tabData=Object.fromEntries(new URLSearchParams(o.slice(1)).entries()),this._locationHash=o),(null===(e=this.itemInfo)||void 0===e?void 0:e.coll)&&(!this.tabData.view||!this.tabNames.includes(this.tabData.view))){const e=this.hasStory?"story":this.editable||(null===(t=this.itemInfo.pages)||void 0===t?void 0:t.length)?"pages":"resources";this.tabData=Object.assign(Object.assign({},this.tabData),{view:e})}if(this.tabData.url&&this.tabData.url.startsWith("page:")){const e=Number(this.tabData.url.slice(5));if((null===(i=this.itemInfo)||void 0===i?void 0:i.pages)&&!isNaN(e)&&e<this.itemInfo.pages.length){const t=this.itemInfo.pages[e];this.tabData.url=t.url,this.tabData.ts=yt(t).timestamp}}this.hasStory||"story"!==this.tabData.view||(this.tabData.view="pages"),this.tabData.url&&this.tabData.query&&this.browsable&&(this.showSidebar=!0)}onTabClick(e){e.preventDefault();const t=e.currentTarget.getAttribute("href");return this.tabData=Object.assign(Object.assign({},this.tabData),{view:t.slice(1)}),!1}onItemTabNav(e){if(e.detail.reload)return void this.onRefresh(null,!0);const t=e.target.id,{data:i,replaceLoc:o,replayNotFoundError:n}=e.detail;this.replayNotFoundError=n,(t===this.tabData.view||"replay"===t&&this.tabData.url||this.showSidebar&&this.tabData.url)&&this.updateTabData(i,o)}updateTabData(e,t=!1){this.tabData=Object.assign(Object.assign({},this.tabData),e),this.tabData.url&&(this.url=this.tabData.url||""),this.tabData.ts&&(this.ts=this.tabData.ts||""),this._replaceLoc=!this._locUpdateNeeded&&t,this._locUpdateNeeded=!0}static get styles(){return Ne(Ci.compStyles)}static get compStyles(){return h`
|
|
608
608
|
:host {
|
|
609
609
|
display: flex;
|
|
610
610
|
flex-direction: column;
|
|
@@ -692,9 +692,9 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
692
692
|
display: flex;
|
|
693
693
|
}
|
|
694
694
|
|
|
695
|
-
${
|
|
695
|
+
${Dt.embedStyles}
|
|
696
696
|
|
|
697
|
-
${
|
|
697
|
+
${Ci.replayBarStyles}
|
|
698
698
|
`}static get replayBarStyles(){return h`
|
|
699
699
|
.breadbar {
|
|
700
700
|
display: flex;
|
|
@@ -916,7 +916,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
916
916
|
@coll-loaded=${this.onItemLoaded}
|
|
917
917
|
></wr-loader>`:this.itemInfo?Q`
|
|
918
918
|
${this.renderLocationBar()} ${this.renderVerifyInfo()}
|
|
919
|
-
<sl-dialog label="Archive Info" ${
|
|
919
|
+
<sl-dialog label="Archive Info" ${mt(this.archiveInfoDialog)}>
|
|
920
920
|
${this.renderItemInfo()}
|
|
921
921
|
<sl-button
|
|
922
922
|
slot="footer"
|
|
@@ -1072,7 +1072,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
1072
1072
|
size="1.0em"
|
|
1073
1073
|
class="has-text-grey"
|
|
1074
1074
|
aria-hidden="true"
|
|
1075
|
-
.svg="${
|
|
1075
|
+
.svg="${_t}"
|
|
1076
1076
|
></fa-icon>
|
|
1077
1077
|
</span>
|
|
1078
1078
|
</a>`:""}
|
|
@@ -1163,7 +1163,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
1163
1163
|
${this.renderToolbarRight()}
|
|
1164
1164
|
</div>
|
|
1165
1165
|
</nav>
|
|
1166
|
-
<p id="skip-replay-target" tabindex="-1" class="is-sr-only">Skipped</p>`}renderToolbarRight(){var e,t;const i=!!this.tabData.url,o=this.ts?
|
|
1166
|
+
<p id="skip-replay-target" tabindex="-1" class="is-sr-only">Skipped</p>`}renderToolbarRight(){var e,t;const i=!!this.tabData.url,o=this.ts?At.format(vt(this.ts)):"";return Q` <div
|
|
1167
1167
|
class="dropdown is-right ${this.menuActive?"is-active":""}"
|
|
1168
1168
|
@click="${()=>this.menuActive=!1}"
|
|
1169
1169
|
>
|
|
@@ -1182,7 +1182,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
1182
1182
|
size="1.0em"
|
|
1183
1183
|
class="has-text-grey"
|
|
1184
1184
|
aria-hidden="true"
|
|
1185
|
-
.svg="${this.isFullscreen?
|
|
1185
|
+
.svg="${this.isFullscreen?It:Ct}"
|
|
1186
1186
|
></fa-icon>
|
|
1187
1187
|
</span>
|
|
1188
1188
|
</a>
|
|
@@ -1219,7 +1219,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
1219
1219
|
size="1.0em"
|
|
1220
1220
|
class="has-text-grey"
|
|
1221
1221
|
aria-hidden="true"
|
|
1222
|
-
.svg="${this.isFullscreen?
|
|
1222
|
+
.svg="${this.isFullscreen?It:Ct}"
|
|
1223
1223
|
></fa-icon>
|
|
1224
1224
|
</span>
|
|
1225
1225
|
<span>Full Screen</span>
|
|
@@ -1236,7 +1236,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
1236
1236
|
size="1.0em"
|
|
1237
1237
|
class="has-text-grey"
|
|
1238
1238
|
aria-hidden="true"
|
|
1239
|
-
.svg="${
|
|
1239
|
+
.svg="${_t}"
|
|
1240
1240
|
></fa-icon>
|
|
1241
1241
|
</span>
|
|
1242
1242
|
<span>Browse Contents</span>
|
|
@@ -1271,7 +1271,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
1271
1271
|
size="1.0em"
|
|
1272
1272
|
class="has-text-grey"
|
|
1273
1273
|
aria-hidden="true"
|
|
1274
|
-
.svg="${
|
|
1274
|
+
.svg="${zt}"
|
|
1275
1275
|
></fa-icon>
|
|
1276
1276
|
</span>
|
|
1277
1277
|
<span>Download Archive</span>
|
|
@@ -1306,14 +1306,14 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
1306
1306
|
class="has-text-grey"
|
|
1307
1307
|
size="1.0rem"
|
|
1308
1308
|
aria-hidden="true"
|
|
1309
|
-
.svg=${
|
|
1309
|
+
.svg=${bt}
|
|
1310
1310
|
></fa-icon>
|
|
1311
1311
|
<span> About ${this.appName}</span>
|
|
1312
1312
|
<span class="menu-version">(${this.appVersion})</span>
|
|
1313
1313
|
</a>
|
|
1314
1314
|
</div>
|
|
1315
1315
|
</div>
|
|
1316
|
-
</div>`}renderTimestamp(){var e;const t=[];null===(e=this.multiTs)||void 0===e||e.forEach((e=>{try{const i=
|
|
1316
|
+
</div>`}renderTimestamp(){var e;const t=[];null===(e=this.multiTs)||void 0===e||e.forEach((e=>{try{const i=wt(+e),o=i?At.format(vt(i)):"";t.push({date:i,label:o})}catch(e){}}));const i=this.ts?At.format(vt(this.ts)):"";return Q`<div id="datetime" class="control is-hidden-mobile">
|
|
1317
1317
|
${t.length>1?Q`
|
|
1318
1318
|
<sl-dropdown placement="top-end" hoist>
|
|
1319
1319
|
<button
|
|
@@ -1399,7 +1399,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
1399
1399
|
role="${$e(e?void 0:"main")}"
|
|
1400
1400
|
>
|
|
1401
1401
|
</wr-page-view>`:""}
|
|
1402
|
-
`}skipMenu(e){var t;e.preventDefault(),null===(t=this.renderRoot.querySelector("#skip-replay-target"))||void 0===t||t.focus()}onKeyDown(e){"Esc"!==e.key&&"Escape"!==e.key||(e.preventDefault(),e.currentTarget.value=this.url)}onMenu(e){e.stopPropagation(),this.menuActive=!this.menuActive,this.menuActive&&document.addEventListener("click",(()=>{this.menuActive=!1}),{once:!0})}onFullscreenToggle(e){e.preventDefault(),this.menuActive=!1,this.isFullscreen?document.exitFullscreen():this.requestFullscreen()}onGoBack(e){e.preventDefault(),this.menuActive=!1,window.history.back()}onGoForward(e){e.preventDefault(),this.menuActive=!1,window.history.forward()}onShowPages(e){e.preventDefault(),this.showSidebar||document.documentElement.clientWidth>=769?this.showSidebar=!this.showSidebar:(this.showSidebar=!1,this.updateTabData({url:"",ts:""})),this.browsable||(this.showSidebar=!1)}onFullPageView(e){e.preventDefault(),this.updateTabData({url:"",ts:""})}onHideSidebar(e){e.preventDefault(),this.showSidebar=!1}onReplayLoading(e){return i(this,void 0,void 0,(function*(){this.embed&&window.parent!==window&&this.isLoading!==e.detail.loading&&window.parent.postMessage(Object.assign({type:"page-loading"},e.detail),"*"),this.isLoading=e.detail.loading}))}onFavIcons(e){return i(this,void 0,void 0,(function*(){this.embed&&window.parent!==window&&window.parent.postMessage(Object.assign({type:"favicons"},e.detail),"*");for(const t of e.detail.icons){const e=yield fetch(t.href);if(200===e.status){const i=e.headers.get("Content-Type");if(i&&!i.startsWith("text/"))return void(this.favIconUrl=t.href)}}this.favIconUrl=""}))}onPurgeCache(e){e.preventDefault();const t=!e.detail||void 0===e.detail.reload||e.detail.reload;this.deleteFully(t)}deleteFully(e=!1){return i(this,void 0,void 0,(function*(){const t=this.itemInfo.apiPrefix+(e?"?reload=1":""),i=yield fetch(t,{method:"DELETE"});200!==i.status&&console.warn("purge failed: "+i.status),e||this.embed?window.location.reload():window.location.search=""}))}onSubmit(e){e.preventDefault();const t=this.renderRoot.querySelector("input");return t.value?this.navigateTo(t.value):t.value=this.url,!1}onLostFocus(e){e.currentTarget.value||(e.currentTarget.value=this.url)}onTimestampDropdownBtnBlur(e){const t=e.currentTarget.closest("sl-dropdown"),i=e.relatedTarget;i&&(null==t?void 0:t.contains(i))||(null==t?void 0:t.open)&&t.hide()}onSelectTimestamp(e){const{item:t}=e.detail;this.updateTabData({ts:t.value})}navigateTo(e){let t;if(e.startsWith("http://")||e.startsWith("https://")){if(t={url:e},e===this.tabData.url){const e=this.renderRoot.querySelector("wr-coll-replay");return void(e&&e.refresh())}}else t=e.startsWith(
|
|
1402
|
+
`}skipMenu(e){var t;e.preventDefault(),null===(t=this.renderRoot.querySelector("#skip-replay-target"))||void 0===t||t.focus()}onKeyDown(e){"Esc"!==e.key&&"Escape"!==e.key||(e.preventDefault(),e.currentTarget.value=this.url)}onMenu(e){e.stopPropagation(),this.menuActive=!this.menuActive,this.menuActive&&document.addEventListener("click",(()=>{this.menuActive=!1}),{once:!0})}onFullscreenToggle(e){e.preventDefault(),this.menuActive=!1,this.isFullscreen?document.exitFullscreen():this.requestFullscreen()}onGoBack(e){e.preventDefault(),this.menuActive=!1,window.history.back()}onGoForward(e){e.preventDefault(),this.menuActive=!1,window.history.forward()}onShowPages(e){e.preventDefault(),this.showSidebar||document.documentElement.clientWidth>=769?this.showSidebar=!this.showSidebar:(this.showSidebar=!1,this.updateTabData({url:"",ts:""})),this.browsable||(this.showSidebar=!1)}onFullPageView(e){e.preventDefault(),this.updateTabData({url:"",ts:""})}onHideSidebar(e){e.preventDefault(),this.showSidebar=!1}onReplayLoading(e){return i(this,void 0,void 0,(function*(){this.embed&&window.parent!==window&&this.isLoading!==e.detail.loading&&window.parent.postMessage(Object.assign({type:"page-loading"},e.detail),"*"),this.isLoading=e.detail.loading}))}onFavIcons(e){return i(this,void 0,void 0,(function*(){this.embed&&window.parent!==window&&window.parent.postMessage(Object.assign({type:"favicons"},e.detail),"*");for(const t of e.detail.icons){const e=yield fetch(t.href);if(200===e.status){const i=e.headers.get("Content-Type");if(i&&!i.startsWith("text/"))return void(this.favIconUrl=t.href)}}this.favIconUrl=""}))}onPurgeCache(e){e.preventDefault();const t=!e.detail||void 0===e.detail.reload||e.detail.reload;this.deleteFully(t)}deleteFully(e=!1){return i(this,void 0,void 0,(function*(){const t=this.itemInfo.apiPrefix+(e?"?reload=1":""),i=yield fetch(t,{method:"DELETE"});200!==i.status&&console.warn("purge failed: "+i.status),e||this.embed?window.location.reload():window.location.search=""}))}onSubmit(e){e.preventDefault();const t=this.renderRoot.querySelector("input");return t.value?this.navigateTo(t.value):t.value=this.url,!1}onLostFocus(e){e.currentTarget.value||(e.currentTarget.value=this.url)}onTimestampDropdownBtnBlur(e){const t=e.currentTarget.closest("sl-dropdown"),i=e.relatedTarget;i&&(null==t?void 0:t.contains(i))||(null==t?void 0:t.open)&&t.hide()}onSelectTimestamp(e){const{item:t}=e.detail;this.updateTabData({ts:t.value})}navigateTo(e){let t;if(e.startsWith("http://")||e.startsWith("https://")){if(t={url:e},e===this.tabData.url){const e=this.renderRoot.querySelector("wr-coll-replay");return void(e&&e.refresh())}}else t=e.startsWith(_i)?this._stringToParams(e):{query:e,view:"pages"};this.updateTabData(t)}_stringToParams(e){const t=new URLSearchParams(e.slice(9)),i={url:"",ts:""};for(const e of["query","view","currList","currMime","urlSearchType"])t.has(e)&&(i[e]=t.get(e));return i}_paramsToString(e){const t=new URLSearchParams;for(const i of["query","view","currList","currMime","urlSearchType"])i in e&&t.set(i,String(e[i]));return t.toString()}onRefresh(e,t=!1){if(e&&e.preventDefault(),this.menuActive=!1,this.tabData.url){const e=this.renderRoot.querySelector("wr-coll-replay");e&&e.refresh()}else t||window.location.reload()}onAbout(){this.dispatchEvent(new CustomEvent("about-show"))}onShowInfoDialog(){var e;null===(e=this.archiveInfoDialog.value)||void 0===e||e.show()}onHideInfoDialog(){var e;null===(e=this.archiveInfoDialog.value)||void 0===e||e.hide()}}t([ye({type:Boolean})],Ci.prototype,"inited",void 0),t([ye({type:String})],Ci.prototype,"sourceUrl",void 0),t([ye({type:String})],Ci.prototype,"downloadUrl",void 0),t([ye({type:Object,attribute:!1})],Ci.prototype,"loadInfo",void 0),t([ye({type:Boolean})],Ci.prototype,"showSidebar",void 0),t([ye({type:Object,attribute:!1})],Ci.prototype,"itemInfo",void 0),t([ye({type:String})],Ci.prototype,"item",void 0),t([ye({type:Boolean})],Ci.prototype,"hasStory",void 0),t([ye({type:Boolean})],Ci.prototype,"isLoading",void 0),t([ye({type:Object,attribute:!1})],Ci.prototype,"tabData",void 0),t([ye({type:String})],Ci.prototype,"url",void 0),t([ye({type:String})],Ci.prototype,"ts",void 0),t([ye({type:Boolean})],Ci.prototype,"isFullscreen",void 0),t([ye({type:Boolean})],Ci.prototype,"menuActive",void 0),t([ye({type:String})],Ci.prototype,"embed",void 0),t([ye({type:Boolean})],Ci.prototype,"embedDropdownActive",void 0),t([ye({type:Boolean})],Ci.prototype,"editable",void 0),t([ye({type:Boolean})],Ci.prototype,"browsable",void 0),t([ye({type:Boolean})],Ci.prototype,"clearable",void 0),t([ye({type:Boolean})],Ci.prototype,"isVisible",void 0),t([ye({type:String})],Ci.prototype,"favIconUrl",void 0),t([ye({type:String})],Ci.prototype,"appName",void 0),t([ye({type:String})],Ci.prototype,"appVersion",void 0),t([ye({type:Number})],Ci.prototype,"autoUpdateInterval",void 0),t([ye({type:String})],Ci.prototype,"swName",void 0),t([ye({type:Boolean})],Ci.prototype,"replayNotFoundError",void 0),t([ye({type:Array})],Ci.prototype,"multiTs",void 0),customElements.define("wr-item",Ci);const Ii='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --\x3e<path d="M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"/></svg>';class Li extends me{get typeFilter(){return""}get indexParams(){return""}constructor(){super(),this.items=[],this.query="",this.filteredItems=[],this.sortedItems=[],this.hideHeader=!1,this.dateName="Date Loaded",this.headerName="Loaded Archives",this._deleting={},this.hideHeader="1"===localStorage.getItem("index:hideHeader")}get sortKeys(){return[{key:"title",name:"Title"},{key:"sourceUrl",name:"Source"},{key:"ctime",name:this.dateName},{key:"size",name:"Total Size"}]}firstUpdated(){this.loadItems()}updated(e){e.has("hideHeader")&&localStorage.setItem("index:hideHeader",this.hideHeader?"1":"0"),(e.has("items")||e.has("query"))&&this.filter()}filter(){if(this.query){this.filteredItems=[];for(const e of this.items)(e.sourceUrl.indexOf(this.query)>=0||e.filename&&e.filename.indexOf(this.query)>=0||Boolean(e.loadUrl&&e.loadUrl.indexOf(this.query)>=0)||e.title&&e.title.indexOf(this.query)>=0)&&this.filteredItems.push(e)}else this.filteredItems=this.items}loadItems(){return i(this,void 0,void 0,(function*(){const e=yield fetch(`${Oe}/coll-index?${this.indexParams}`);try{if(200!==e.status)throw new Error("Invalid API Response, Retry");const t=yield e.json();this.items=t.colls.map((e=>{var t;return e.title=null!==(t=e.title)&&void 0!==t?t:e.filename,e})),this._deleting={},this.sortedItems=[]}catch(e){setTimeout((()=>this.loadItems()),500)}}))}onDeleteItem(e){return i(this,void 0,void 0,(function*(){if(e.preventDefault(),e.stopPropagation(),!this.sortedItems)return;const t=Number(e.currentTarget.getAttribute("data-coll-index")),i=this.sortedItems[t];if(!i||this._deleting[i.sourceUrl])return;this._deleting[i.sourceUrl]=!0,this.requestUpdate();const o=yield fetch(`${Oe}/c/${i.id}`,{method:"DELETE"});if(200===o.status){const e=yield o.json();this.items=e.colls}return!1}))}static get styles(){return Ne(Li.compStyles)}static get compStyles(){return h`
|
|
1403
1403
|
:host {
|
|
1404
1404
|
overflow-y: auto;
|
|
1405
1405
|
min-width: 0;
|
|
@@ -1522,7 +1522,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
1522
1522
|
placeholder="Search by Archive Title or Source"
|
|
1523
1523
|
/>
|
|
1524
1524
|
<span class="icon is-left is-small">
|
|
1525
|
-
<fa-icon .svg="${
|
|
1525
|
+
<fa-icon .svg="${Ii}"></fa-icon>
|
|
1526
1526
|
</span>
|
|
1527
1527
|
</div>
|
|
1528
1528
|
<wr-sorter
|
|
@@ -1575,7 +1575,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
1575
1575
|
>
|
|
1576
1576
|
to archive entire websites with automated crawling!
|
|
1577
1577
|
</p>
|
|
1578
|
-
`}}t([ye({type:Array})]
|
|
1578
|
+
`}}t([ye({type:Array})],Li.prototype,"items",void 0),t([ye({type:String})],Li.prototype,"query",void 0),t([ye({type:Array})],Li.prototype,"filteredItems",void 0),t([ye({type:Array})],Li.prototype,"sortedItems",void 0),t([ye({type:Boolean})],Li.prototype,"hideHeader",void 0),t([ye({type:String})],Li.prototype,"dateName",void 0),t([ye({type:String})],Li.prototype,"headerName",void 0),t([xe()],Li.prototype,"_deleting",void 0),customElements.define("wr-item-index",Li);let Ei=class extends me{constructor(){super(...arguments),this.fileDisplayName="",this.file=null,this.droppedFile=null,this.hasNativeFS=!!window.showOpenFilePicker&&!qe,this.showOpenFilePickerOptions={types:[{description:"WARC, WACZ, and HAR Files",accept:{"application/warc":[".warc",".gz"],"application/har":[".har"],"application/wacz":[".wacz"],"application/json":[".json"]}}]},this.newFullImport=!1,this.noHead=!1}updated(e){e.has("droppedFile")&&this.droppedFile&&this.onDropFile()}onDropFile(){const e=this.showOpenFilePickerOptions.types.map((e=>e.accept)).map(Object.values).flat(2).some((e=>{var t;return null===(t=this.droppedFile)||void 0===t?void 0:t.name.endsWith(e)}));if(e){if(null===this.droppedFile)return;this.setFile(this.droppedFile),this.dispatchEvent(new CustomEvent("did-drop-file",{bubbles:!0,composed:!0})),this.onStartLoad()}}onChooseFile(e){0!==e.currentTarget.files.length&&this.setFile(e.currentTarget.files[0])}setFile(e){var t;this.file=e,qe&&(null===(t=window.electron)||void 0===t?void 0:t.getPath)&&(this.file.path=window.electron.getPath(this.file)),this.fileDisplayName="file://"+(e.path||e.name)}onChooseNativeFile(){return i(this,void 0,void 0,(function*(){if(!this.hasNativeFS)return;const[e]=yield window.showOpenFilePicker(this.showOpenFilePickerOptions);this.fileHandle=e,this.file=yield e.getFile(),this.fileDisplayName="file://"+e.name}))}randomId(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}onStartLoad(e){e&&e.preventDefault();const t={sourceUrl:this.fileDisplayName,newFullImport:this.newFullImport};return this.file&&(t.isFile=!0,this.file.path?(t.loadUrl="file2://"+this.file.path,t.noCache=!0):this.fileHandle?(t.loadUrl=this.fileDisplayName,t.extra={fileHandle:this.fileHandle},t.noCache=!1):(t.loadUrl=URL.createObjectURL(this.file),t.blob=this.file,t.noCache=!1),t.size=this.file.size,t.name=this.fileDisplayName),this.dispatchEvent(new CustomEvent("load-start",{bubbles:!0,composed:!0,detail:t})),!1}onInput(e){this.fileDisplayName=e.currentTarget.value,this.file&&this.fileDisplayName&&this.fileDisplayName.startsWith("file://")&&(this.file=null,this.fileDisplayName="")}static get styles(){return Ne(h`
|
|
1579
1579
|
:host {
|
|
1580
1580
|
min-width: 0;
|
|
1581
1581
|
}
|
|
@@ -1684,7 +1684,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
1684
1684
|
</form>
|
|
1685
1685
|
</div>
|
|
1686
1686
|
</div>
|
|
1687
|
-
</section>`}};var
|
|
1687
|
+
</section>`}};var Ai;t([ye({type:String})],Ei.prototype,"fileDisplayName",void 0),t([ye({attribute:!1})],Ei.prototype,"file",void 0),t([ye({attribute:!1})],Ei.prototype,"droppedFile",void 0),t([ye({type:Boolean})],Ei.prototype,"hasNativeFS",void 0),t([ye({type:Object})],Ei.prototype,"showOpenFilePickerOptions",void 0),t([ye({type:Boolean})],Ei.prototype,"newFullImport",void 0),t([ye({type:Boolean})],Ei.prototype,"noHead",void 0),Ei=t([ge("wr-chooser")],Ei);let Ti=Ai=class extends me{constructor(e="sw.js"){super(),this.inited=!1,this.pageParams=new URLSearchParams,this.sourceUrl=null,this.navMenuShown=!1,this.showAbout=!1,this.showFileDropOverlay=!1,this.collTitle=null,this.loadInfo=null,this.embed=null,this.collPageUrl="",this.pageTitle="",this.pageReplay=!1,this.source=null,this.skipRuffle=!1,this.swErrorMsg=null,this.useRuffle=!1,this.droppedFile=null,this.maybeStartFileDrop=e=>{this.sourceUrl||(this.showFileDropOverlay=!0,e.preventDefault())},this.swName=e,this.swmanager=null,this.skipRuffle=!1,this.useRuffle=!1,this.safariKeyframes(),this.addEventListener("dragenter",(e=>{this.maybeStartFileDrop(e)})),this.addEventListener("dragover",(e=>{this.maybeStartFileDrop(e)})),this.addEventListener("dragleave",(()=>{this.showFileDropOverlay=!1})),this.addEventListener("dragend",(()=>{this.showFileDropOverlay=!1})),this.addEventListener("drop",(e=>{var t;this.droppedFile=(null===(t=e.dataTransfer)||void 0===t?void 0:t.files[0])||null,this.showFileDropOverlay=!1,e.preventDefault()}))}get appName(){return"ReplayWeb.page"}get homeUrl(){return window.location.pathname}static get styles(){return Ne(Ai.appStyles)}static get appStyles(){return h`
|
|
1688
1688
|
#wrlogo {
|
|
1689
1689
|
max-height: 1rem;
|
|
1690
1690
|
}
|
|
@@ -2009,7 +2009,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
2009
2009
|
</div>
|
|
2010
2010
|
</div>`}onAboutClose(){this.showAbout=!1}renderDropFileOverlay(){return Q`
|
|
2011
2011
|
<div class="drop-file-overlay">Drop to load web archive</div>
|
|
2012
|
-
`}};function Ii(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}t([ye({type:Boolean})],Ci.prototype,"inited",void 0),t([ye({type:Object})],Ci.prototype,"pageParams",void 0),t([ye({type:String})],Ci.prototype,"sourceUrl",void 0),t([ye({type:Boolean})],Ci.prototype,"navMenuShown",void 0),t([ye({type:Boolean})],Ci.prototype,"showAbout",void 0),t([ye({type:Boolean})],Ci.prototype,"showFileDropOverlay",void 0),t([ye({type:String})],Ci.prototype,"collTitle",void 0),t([ye({type:Object})],Ci.prototype,"loadInfo",void 0),t([ye({type:String})],Ci.prototype,"embed",void 0),t([ye({type:String})],Ci.prototype,"collPageUrl",void 0),t([ye({type:String})],Ci.prototype,"pageTitle",void 0),t([ye({type:Boolean})],Ci.prototype,"pageReplay",void 0),t([ye({type:String})],Ci.prototype,"source",void 0),t([ye({type:Boolean})],Ci.prototype,"skipRuffle",void 0),t([ye({type:String})],Ci.prototype,"swErrorMsg",void 0),Ci=_i=t([ge("replay-app-main")],Ci);let Li={baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};const Ei=/[&<>"']/,Ai=/[&<>"']/g,Ti=/[<>"']|&(?!#?\w+;)/,Pi=/[<>"']|&(?!#?\w+;)/g,Di={"&":"&","<":"<",">":">",'"':""","'":"'"},Fi=e=>Di[e];function Mi(e,t){if(t){if(Ei.test(e))return e.replace(Ai,Fi)}else if(Ti.test(e))return e.replace(Pi,Fi);return e}const Ri=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function Oi(e){return e.replace(Ri,((e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const Ui=/(^|[^\[])\^/g;function Bi(e,t){e=e.source||e,t=t||"";const i={replace:(t,o)=>(o=(o=o.source||o).replace(Ui,"$1"),e=e.replace(t,o),i),getRegex:()=>new RegExp(e,t)};return i}const Ni=/[^\w:]/g,qi=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function ji(e,t,i){if(e){let e;try{e=decodeURIComponent(Oi(i)).replace(Ni,"").toLowerCase()}catch(e){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!qi.test(i)&&(i=function(e,t){Hi[" "+e]||(Wi.test(e)?Hi[" "+e]=e+"/":Hi[" "+e]=Zi(e,"/",!0));e=Hi[" "+e];const i=-1===e.indexOf(":");return"//"===t.substring(0,2)?i?t:e.replace(Vi,"$1")+t:"/"===t.charAt(0)?i?t:e.replace(Gi,"$1")+t:e+t}(t,i));try{i=encodeURI(i).replace(/%25/g,"%")}catch(e){return null}return i}const Hi={},Wi=/^[^:]+:\/*[^/]*$/,Vi=/^([^:]+:)[\s\S]*$/,Gi=/^([^:]+:\/*[^/]*)[\s\S]*$/;const Ki={exec:function(){}};function Yi(e){let t,i,o=1;for(;o<arguments.length;o++)for(i in t=arguments[o],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}function Qi(e,t){const i=e.replace(/\|/g,((e,t,i)=>{let o=!1,n=t;for(;--n>=0&&"\\"===i[n];)o=!o;return o?"|":" |"})),o=i.split(/ \|/);let n=0;if(o[0].trim()||o.shift(),o[o.length-1].trim()||o.pop(),o.length>t)o.splice(t);else for(;o.length<t;)o.push("");for(;n<o.length;n++)o[n]=o[n].trim().replace(/\\\|/g,"|");return o}function Zi(e,t,i){const o=e.length;if(0===o)return"";let n=0;for(;n<o;){const r=e.charAt(o-n-1);if(r!==t||i){if(r===t||!i)break;n++}else n++}return e.substr(0,o-n)}function Ji(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function Xi(e,t){if(t<1)return"";let i="";for(;t>1;)1&t&&(i+=e),t>>=1,e+=e;return i+e}function eo(e,t,i,o){const n=t.href,r=t.title?Mi(t.title):null,s=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){o.state.inLink=!0;const e={type:"link",raw:i,href:n,title:r,text:s,tokens:o.inlineTokens(s,[])};return o.state.inLink=!1,e}return{type:"image",raw:i,href:n,title:r,text:Mi(s)}}class to{constructor(e){this.options=e||Li}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:Zi(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],i=function(e,t){const i=e.match(/^(\s+)(?:```)/);if(null===i)return t;const o=i[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[i]=t;return i.length>=o.length?e.slice(o.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim():t[2],text:i}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=Zi(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}const i={type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:[]};return this.lexer.inline(i.text,i.tokens),i}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const e=t[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(e,[]),text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let i,o,n,r,s,a,l,c,d,h,u,f,p=t[1].trim();const m=p.length>1,b={type:"list",raw:"",ordered:m,start:m?+p.slice(0,-1):"",loose:!1,items:[]};p=m?`\\d{1,9}\\${p.slice(-1)}`:`\\${p}`,this.options.pedantic&&(p=m?p:"[*+-]");const g=new RegExp(`^( {0,3}${p})((?: [^\\n]*)?(?:\\n|$))`);for(;e&&(f=!1,t=g.exec(e))&&!this.rules.block.hr.test(e);){if(i=t[0],e=e.substring(i.length),c=t[2].split("\n",1)[0],d=e.split("\n",1)[0],this.options.pedantic?(r=2,u=c.trimLeft()):(r=t[2].search(/[^ ]/),r=r>4?1:r,u=c.slice(r),r+=t[1].length),a=!1,!c&&/^ *$/.test(d)&&(i+=d+"\n",e=e.substring(d.length+1),f=!0),!f){const t=new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])`);for(;e&&(h=e.split("\n",1)[0],c=h,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!t.test(c));){if(c.search(/[^ ]/)>=r||!c.trim())u+="\n"+c.slice(r);else{if(a)break;u+="\n"+c}a||c.trim()||(a=!0),i+=h+"\n",e=e.substring(h.length+1)}}b.loose||(l?b.loose=!0:/\n *\n *$/.test(i)&&(l=!0)),this.options.gfm&&(o=/^\[[ xX]\] /.exec(u),o&&(n="[ ] "!==o[0],u=u.replace(/^\[[ xX]\] +/,""))),b.items.push({type:"list_item",raw:i,task:!!o,checked:n,loose:!1,text:u}),b.raw+=i}b.items[b.items.length-1].raw=i.trimRight(),b.items[b.items.length-1].text=u.trimRight(),b.raw=b.raw.trimRight();const v=b.items.length;for(s=0;s<v;s++){this.lexer.state.top=!1,b.items[s].tokens=this.lexer.blockTokens(b.items[s].text,[]);const e=b.items[s].tokens.filter((e=>"space"===e.type)),t=e.every((e=>{const t=e.raw.split("");let i=0;for(const e of t)if("\n"===e&&(i+=1),i>1)return!0;return!1}));!b.loose&&e.length&&t&&(b.loose=!0,b.items[s].loose=!0)}return b}}html(e){const t=this.rules.block.html.exec(e);if(t){const e={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};return this.options.sanitize&&(e.type="paragraph",e.text=this.options.sanitizer?this.options.sanitizer(t[0]):Mi(t[0]),e.tokens=[],this.lexer.inline(e.text,e.tokens)),e}}def(e){const t=this.rules.block.def.exec(e);if(t){t[3]&&(t[3]=t[3].substring(1,t[3].length-1));return{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}}}table(e){const t=this.rules.block.table.exec(e);if(t){const e={type:"table",header:Qi(t[1]).map((e=>({text:e}))),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(e.header.length===e.align.length){e.raw=t[0];let i,o,n,r,s=e.align.length;for(i=0;i<s;i++)/^ *-+: *$/.test(e.align[i])?e.align[i]="right":/^ *:-+: *$/.test(e.align[i])?e.align[i]="center":/^ *:-+ *$/.test(e.align[i])?e.align[i]="left":e.align[i]=null;for(s=e.rows.length,i=0;i<s;i++)e.rows[i]=Qi(e.rows[i],e.header.length).map((e=>({text:e})));for(s=e.header.length,o=0;o<s;o++)e.header[o].tokens=[],this.lexer.inlineTokens(e.header[o].text,e.header[o].tokens);for(s=e.rows.length,o=0;o<s;o++)for(r=e.rows[o],n=0;n<r.length;n++)r[n].tokens=[],this.lexer.inlineTokens(r[n].text,r[n].tokens);return e}}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t){const e={type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:[]};return this.lexer.inline(e.text,e.tokens),e}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e={type:"paragraph",raw:t[0],text:"\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1],tokens:[]};return this.lexer.inline(e.text,e.tokens),e}}text(e){const t=this.rules.block.text.exec(e);if(t){const e={type:"text",raw:t[0],text:t[0],tokens:[]};return this.lexer.inline(e.text,e.tokens),e}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:Mi(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):Mi(t[0]):t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const t=Zi(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;const i=e.length;let o=0,n=0;for(;n<i;n++)if("\\"===e[n])n++;else if(e[n]===t[0])o++;else if(e[n]===t[1]&&(o--,o<0))return n;return-1}(t[2],"()");if(e>-1){const i=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,i).trim(),t[3]=""}}let i=t[2],o="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);e&&(i=e[1],o=e[3])}else o=t[3]?t[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(i=this.options.pedantic&&!/>$/.test(e)?i.slice(1):i.slice(1,-1)),eo(t,{href:i?i.replace(this.rules.inline._escapes,"$1"):i,title:o?o.replace(this.rules.inline._escapes,"$1"):o},t[0],this.lexer)}}reflink(e,t){let i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){let e=(i[2]||i[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e||!e.href){const e=i[0].charAt(0);return{type:"text",raw:e,text:e}}return eo(i,e,i[0],this.lexer)}}emStrong(e,t,i=""){let o=this.rules.inline.emStrong.lDelim.exec(e);if(!o)return;if(o[3]&&i.match(/[\p{L}\p{N}]/u))return;const n=o[1]||o[2]||"";if(!n||n&&(""===i||this.rules.inline.punctuation.exec(i))){const i=o[0].length-1;let n,r,s=i,a=0;const l="*"===o[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+i);null!=(o=l.exec(t));){if(n=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!n)continue;if(r=n.length,o[3]||o[4]){s+=r;continue}if((o[5]||o[6])&&i%3&&!((i+r)%3)){a+=r;continue}if(s-=r,s>0)continue;if(r=Math.min(r,r+s+a),Math.min(i,r)%2){const t=e.slice(1,i+o.index+r);return{type:"em",raw:e.slice(0,i+o.index+r+1),text:t,tokens:this.lexer.inlineTokens(t,[])}}const t=e.slice(2,i+o.index+r-1);return{type:"strong",raw:e.slice(0,i+o.index+r+1),text:t,tokens:this.lexer.inlineTokens(t,[])}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const i=/[^ ]/.test(e),o=/^ /.test(e)&&/ $/.test(e);return i&&o&&(e=e.substring(1,e.length-1)),e=Mi(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2],[])}}autolink(e,t){const i=this.rules.inline.autolink.exec(e);if(i){let e,o;return"@"===i[2]?(e=Mi(this.options.mangle?t(i[1]):i[1]),o="mailto:"+e):(e=Mi(i[1]),o=e),{type:"link",raw:i[0],text:e,href:o,tokens:[{type:"text",raw:e,text:e}]}}}url(e,t){let i;if(i=this.rules.inline.url.exec(e)){let e,o;if("@"===i[2])e=Mi(this.options.mangle?t(i[0]):i[0]),o="mailto:"+e;else{let t;do{t=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])[0]}while(t!==i[0]);e=Mi(i[0]),o="www."===i[1]?"http://"+e:e}return{type:"link",raw:i[0],text:e,href:o,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e,t){const i=this.rules.inline.text.exec(e);if(i){let e;return e=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):Mi(i[0]):i[0]:Mi(this.options.smartypants?t(i[0]):i[0]),{type:"text",raw:i[0],text:e}}}}const io={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?<?([^\s>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:Ki,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};io.def=Bi(io.def).replace("label",io._label).replace("title",io._title).getRegex(),io.bullet=/(?:[*+-]|\d{1,9}[.)])/,io.listItemStart=Bi(/^( *)(bull) */).replace("bull",io.bullet).getRegex(),io.list=Bi(io.list).replace(/bull/g,io.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+io.def.source+")").getRegex(),io._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",io._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,io.html=Bi(io.html,"i").replace("comment",io._comment).replace("tag",io._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),io.paragraph=Bi(io._paragraph).replace("hr",io.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",io._tag).getRegex(),io.blockquote=Bi(io.blockquote).replace("paragraph",io.paragraph).getRegex(),io.normal=Yi({},io),io.gfm=Yi({},io.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),io.gfm.table=Bi(io.gfm.table).replace("hr",io.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",io._tag).getRegex(),io.gfm.paragraph=Bi(io._paragraph).replace("hr",io.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",io.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",io._tag).getRegex(),io.pedantic=Yi({},io.normal,{html:Bi("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",io._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ki,paragraph:Bi(io.normal._paragraph).replace("hr",io.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",io.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const oo={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Ki,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Ki,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};function no(e){return e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function ro(e){let t,i,o="";const n=e.length;for(t=0;t<n;t++)i=e.charCodeAt(t),Math.random()>.5&&(i="x"+i.toString(16)),o+="&#"+i+";";return o}oo._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",oo.punctuation=Bi(oo.punctuation).replace(/punctuation/g,oo._punctuation).getRegex(),oo.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,oo.escapedEmSt=/\\\*|\\_/g,oo._comment=Bi(io._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),oo.emStrong.lDelim=Bi(oo.emStrong.lDelim).replace(/punct/g,oo._punctuation).getRegex(),oo.emStrong.rDelimAst=Bi(oo.emStrong.rDelimAst,"g").replace(/punct/g,oo._punctuation).getRegex(),oo.emStrong.rDelimUnd=Bi(oo.emStrong.rDelimUnd,"g").replace(/punct/g,oo._punctuation).getRegex(),oo._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,oo._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,oo._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,oo.autolink=Bi(oo.autolink).replace("scheme",oo._scheme).replace("email",oo._email).getRegex(),oo._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,oo.tag=Bi(oo.tag).replace("comment",oo._comment).replace("attribute",oo._attribute).getRegex(),oo._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,oo._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,oo._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,oo.link=Bi(oo.link).replace("label",oo._label).replace("href",oo._href).replace("title",oo._title).getRegex(),oo.reflink=Bi(oo.reflink).replace("label",oo._label).replace("ref",io._label).getRegex(),oo.nolink=Bi(oo.nolink).replace("ref",io._label).getRegex(),oo.reflinkSearch=Bi(oo.reflinkSearch,"g").replace("reflink",oo.reflink).replace("nolink",oo.nolink).getRegex(),oo.normal=Yi({},oo),oo.pedantic=Yi({},oo.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Bi(/^!?\[(label)\]\((.*?)\)/).replace("label",oo._label).getRegex(),reflink:Bi(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",oo._label).getRegex()}),oo.gfm=Yi({},oo.normal,{escape:Bi(oo.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),oo.gfm.url=Bi(oo.gfm.url,"i").replace("email",oo.gfm._extended_email).getRegex(),oo.breaks=Yi({},oo.gfm,{br:Bi(oo.br).replace("{2,}","*").getRegex(),text:Bi(oo.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});class so{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Li,this.options.tokenizer=this.options.tokenizer||new to,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:io.normal,inline:oo.normal};this.options.pedantic?(t.block=io.pedantic,t.inline=oo.pedantic):this.options.gfm&&(t.block=io.gfm,this.options.breaks?t.inline=oo.breaks:t.inline=oo.gfm),this.tokenizer.rules=t}static get rules(){return{block:io,inline:oo}}static lex(e,t){return new so(t).lex(e)}static lexInline(e,t){return new so(t).inlineTokens(e)}lex(e){let t;for(e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens);t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens}blockTokens(e,t=[]){let i,o,n,r;for(this.options.pedantic&&(e=e.replace(/^ +$/gm,""));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((o=>!!(i=o.call({lexer:this},e,t))&&(e=e.substring(i.raw.length),t.push(i),!0)))))if(i=this.tokenizer.space(e))e=e.substring(i.raw.length),1===i.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(i);else if(i=this.tokenizer.code(e))e=e.substring(i.raw.length),o=t[t.length-1],!o||"paragraph"!==o.type&&"text"!==o.type?t.push(i):(o.raw+="\n"+i.raw,o.text+="\n"+i.text,this.inlineQueue[this.inlineQueue.length-1].src=o.text);else if(i=this.tokenizer.fences(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.heading(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.hr(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.blockquote(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.list(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.html(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.def(e))e=e.substring(i.raw.length),o=t[t.length-1],!o||"paragraph"!==o.type&&"text"!==o.type?this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title}):(o.raw+="\n"+i.raw,o.text+="\n"+i.raw,this.inlineQueue[this.inlineQueue.length-1].src=o.text);else if(i=this.tokenizer.table(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.lheading(e))e=e.substring(i.raw.length),t.push(i);else{if(n=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const i=e.slice(1);let o;this.options.extensions.startBlock.forEach((function(e){o=e.call({lexer:this},i),"number"==typeof o&&o>=0&&(t=Math.min(t,o))})),t<1/0&&t>=0&&(n=e.substring(0,t+1))}if(this.state.top&&(i=this.tokenizer.paragraph(n)))o=t[t.length-1],r&&"paragraph"===o.type?(o.raw+="\n"+i.raw,o.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):t.push(i),r=n.length!==e.length,e=e.substring(i.raw.length);else if(i=this.tokenizer.text(e))e=e.substring(i.raw.length),o=t[t.length-1],o&&"text"===o.type?(o.raw+="\n"+i.raw,o.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):t.push(i);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t){this.inlineQueue.push({src:e,tokens:t})}inlineTokens(e,t=[]){let i,o,n,r,s,a,l=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(l));)e.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,r.index)+"["+Xi("a",r[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,r.index)+"["+Xi("a",r[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.escapedEmSt.exec(l));)l=l.slice(0,r.index)+"++"+l.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(s||(a=""),s=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((o=>!!(i=o.call({lexer:this},e,t))&&(e=e.substring(i.raw.length),t.push(i),!0)))))if(i=this.tokenizer.escape(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.tag(e))e=e.substring(i.raw.length),o=t[t.length-1],o&&"text"===i.type&&"text"===o.type?(o.raw+=i.raw,o.text+=i.text):t.push(i);else if(i=this.tokenizer.link(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(i.raw.length),o=t[t.length-1],o&&"text"===i.type&&"text"===o.type?(o.raw+=i.raw,o.text+=i.text):t.push(i);else if(i=this.tokenizer.emStrong(e,l,a))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.codespan(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.br(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.del(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.autolink(e,ro))e=e.substring(i.raw.length),t.push(i);else if(this.state.inLink||!(i=this.tokenizer.url(e,ro))){if(n=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const i=e.slice(1);let o;this.options.extensions.startInline.forEach((function(e){o=e.call({lexer:this},i),"number"==typeof o&&o>=0&&(t=Math.min(t,o))})),t<1/0&&t>=0&&(n=e.substring(0,t+1))}if(i=this.tokenizer.inlineText(n,no))e=e.substring(i.raw.length),"_"!==i.raw.slice(-1)&&(a=i.raw.slice(-1)),s=!0,o=t[t.length-1],o&&"text"===o.type?(o.raw+=i.raw,o.text+=i.text):t.push(i);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(i.raw.length),t.push(i);return t}}class ao{constructor(e){this.options=e||Li}code(e,t,i){const o=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,o);null!=t&&t!==e&&(i=!0,e=t)}return e=e.replace(/\n$/,"")+"\n",o?'<pre><code class="'+this.options.langPrefix+Mi(o,!0)+'">'+(i?e:Mi(e,!0))+"</code></pre>\n":"<pre><code>"+(i?e:Mi(e,!0))+"</code></pre>\n"}blockquote(e){return"<blockquote>\n"+e+"</blockquote>\n"}html(e){return e}heading(e,t,i,o){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+o.slug(i)+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"}hr(){return this.options.xhtml?"<hr/>\n":"<hr>\n"}list(e,t,i){const o=t?"ol":"ul";return"<"+o+(t&&1!==i?' start="'+i+'"':"")+">\n"+e+"</"+o+">\n"}listitem(e){return"<li>"+e+"</li>\n"}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(e){return"<p>"+e+"</p>\n"}table(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return"<tr>\n"+e+"</tr>\n"}tablecell(e,t){const i=t.header?"th":"td";return(t.align?"<"+i+' align="'+t.align+'">':"<"+i+">")+e+"</"+i+">\n"}strong(e){return"<strong>"+e+"</strong>"}em(e){return"<em>"+e+"</em>"}codespan(e){return"<code>"+e+"</code>"}br(){return this.options.xhtml?"<br/>":"<br>"}del(e){return"<del>"+e+"</del>"}link(e,t,i){if(null===(e=ji(this.options.sanitize,this.options.baseUrl,e)))return i;let o='<a href="'+Mi(e)+'"';return t&&(o+=' title="'+t+'"'),o+=">"+i+"</a>",o}image(e,t,i){if(null===(e=ji(this.options.sanitize,this.options.baseUrl,e)))return i;let o='<img src="'+e+'" alt="'+i+'"';return t&&(o+=' title="'+t+'"'),o+=this.options.xhtml?"/>":">",o}text(e){return e}}class lo{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,i){return""+i}image(e,t,i){return""+i}br(){return""}}class co{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let i=e,o=0;if(this.seen.hasOwnProperty(i)){o=this.seen[e];do{o++,i=e+"-"+o}while(this.seen.hasOwnProperty(i))}return t||(this.seen[e]=o,this.seen[i]=0),i}slug(e,t={}){const i=this.serialize(e);return this.getNextSafeSlug(i,t.dryrun)}}class ho{constructor(e){this.options=e||Li,this.options.renderer=this.options.renderer||new ao,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new lo,this.slugger=new co}static parse(e,t){return new ho(t).parse(e)}static parseInline(e,t){return new ho(t).parseInline(e)}parse(e,t=!0){let i,o,n,r,s,a,l,c,d,h,u,f,p,m,b,g,v,w,y,x="";const k=e.length;for(i=0;i<k;i++)if(h=e[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[h.type]&&(y=this.options.extensions.renderers[h.type].call({parser:this},h),!1!==y||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(h.type)))x+=y||"";else switch(h.type){case"space":continue;case"hr":x+=this.renderer.hr();continue;case"heading":x+=this.renderer.heading(this.parseInline(h.tokens),h.depth,Oi(this.parseInline(h.tokens,this.textRenderer)),this.slugger);continue;case"code":x+=this.renderer.code(h.text,h.lang,h.escaped);continue;case"table":for(c="",l="",r=h.header.length,o=0;o<r;o++)l+=this.renderer.tablecell(this.parseInline(h.header[o].tokens),{header:!0,align:h.align[o]});for(c+=this.renderer.tablerow(l),d="",r=h.rows.length,o=0;o<r;o++){for(a=h.rows[o],l="",s=a.length,n=0;n<s;n++)l+=this.renderer.tablecell(this.parseInline(a[n].tokens),{header:!1,align:h.align[n]});d+=this.renderer.tablerow(l)}x+=this.renderer.table(c,d);continue;case"blockquote":d=this.parse(h.tokens),x+=this.renderer.blockquote(d);continue;case"list":for(u=h.ordered,f=h.start,p=h.loose,r=h.items.length,d="",o=0;o<r;o++)b=h.items[o],g=b.checked,v=b.task,m="",b.task&&(w=this.renderer.checkbox(g),p?b.tokens.length>0&&"paragraph"===b.tokens[0].type?(b.tokens[0].text=w+" "+b.tokens[0].text,b.tokens[0].tokens&&b.tokens[0].tokens.length>0&&"text"===b.tokens[0].tokens[0].type&&(b.tokens[0].tokens[0].text=w+" "+b.tokens[0].tokens[0].text)):b.tokens.unshift({type:"text",text:w}):m+=w),m+=this.parse(b.tokens,p),d+=this.renderer.listitem(m,v,g);x+=this.renderer.list(d,u,f);continue;case"html":x+=this.renderer.html(h.text);continue;case"paragraph":x+=this.renderer.paragraph(this.parseInline(h.tokens));continue;case"text":for(d=h.tokens?this.parseInline(h.tokens):h.text;i+1<k&&"text"===e[i+1].type;)h=e[++i],d+="\n"+(h.tokens?this.parseInline(h.tokens):h.text);x+=t?this.renderer.paragraph(d):d;continue;default:{const e='Token with "'+h.type+'" type was not found.';if(this.options.silent)return void console.error(e);throw new Error(e)}}return x}parseInline(e,t){t=t||this.renderer;let i,o,n,r="";const s=e.length;for(i=0;i<s;i++)if(o=e[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]&&(n=this.options.extensions.renderers[o.type].call({parser:this},o),!1!==n||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)))r+=n||"";else switch(o.type){case"escape":case"text":r+=t.text(o.text);break;case"html":r+=t.html(o.text);break;case"link":r+=t.link(o.href,o.title,this.parseInline(o.tokens,t));break;case"image":r+=t.image(o.href,o.title,o.text);break;case"strong":r+=t.strong(this.parseInline(o.tokens,t));break;case"em":r+=t.em(this.parseInline(o.tokens,t));break;case"codespan":r+=t.codespan(o.text);break;case"br":r+=t.br();break;case"del":r+=t.del(this.parseInline(o.tokens,t));break;default:{const e='Token with "'+o.type+'" type was not found.';if(this.options.silent)return void console.error(e);throw new Error(e)}}return r}}function uo(e,t,i){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"==typeof t&&(i=t,t=null),Ji(t=Yi({},uo.defaults,t||{})),i){const o=t.highlight;let n;try{n=so.lex(e,t)}catch(e){return i(e)}const r=function(e){let r;if(!e)try{t.walkTokens&&uo.walkTokens(n,t.walkTokens),r=ho.parse(n,t)}catch(t){e=t}return t.highlight=o,e?i(e):i(null,r)};if(!o||o.length<3)return r();if(delete t.highlight,!n.length)return r();let s=0;return uo.walkTokens(n,(function(e){"code"===e.type&&(s++,setTimeout((()=>{o(e.text,e.lang,(function(t,i){if(t)return r(t);null!=i&&i!==e.text&&(e.text=i,e.escaped=!0),s--,0===s&&r()}))}),0))})),void(0===s&&r())}try{const i=so.lex(e,t);return t.walkTokens&&uo.walkTokens(i,t.walkTokens),ho.parse(i,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+Mi(e.message+"",!0)+"</pre>";throw e}}uo.options=uo.setOptions=function(e){var t;return Yi(uo.defaults,e),t=uo.defaults,Li=t,uo},uo.getDefaults=Ii,uo.defaults=Li,uo.use=function(...e){const t=Yi({},...e),i=uo.defaults.extensions||{renderers:{},childTokens:{}};let o;e.forEach((e=>{if(e.extensions&&(o=!0,e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if(e.renderer){const t=i.renderers?i.renderers[e.name]:null;i.renderers[e.name]=t?function(...i){let o=e.renderer.apply(this,i);return!1===o&&(o=t.apply(this,i)),o}:e.renderer}if(e.tokenizer){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");i[e.level]?i[e.level].unshift(e.tokenizer):i[e.level]=[e.tokenizer],e.start&&("block"===e.level?i.startBlock?i.startBlock.push(e.start):i.startBlock=[e.start]:"inline"===e.level&&(i.startInline?i.startInline.push(e.start):i.startInline=[e.start]))}e.childTokens&&(i.childTokens[e.name]=e.childTokens)}))),e.renderer){const i=uo.defaults.renderer||new ao;for(const t in e.renderer){const o=i[t];i[t]=(...n)=>{let r=e.renderer[t].apply(i,n);return!1===r&&(r=o.apply(i,n)),r}}t.renderer=i}if(e.tokenizer){const i=uo.defaults.tokenizer||new to;for(const t in e.tokenizer){const o=i[t];i[t]=(...n)=>{let r=e.tokenizer[t].apply(i,n);return!1===r&&(r=o.apply(i,n)),r}}t.tokenizer=i}if(e.walkTokens){const i=uo.defaults.walkTokens;t.walkTokens=function(t){e.walkTokens.call(this,t),i&&i.call(this,t)}}o&&(t.extensions=i),uo.setOptions(t)}))},uo.walkTokens=function(e,t){for(const i of e)switch(t.call(uo,i),i.type){case"table":for(const e of i.header)uo.walkTokens(e.tokens,t);for(const e of i.rows)for(const i of e)uo.walkTokens(i.tokens,t);break;case"list":uo.walkTokens(i.items,t);break;default:uo.defaults.extensions&&uo.defaults.extensions.childTokens&&uo.defaults.extensions.childTokens[i.type]?uo.defaults.extensions.childTokens[i.type].forEach((function(e){uo.walkTokens(i[e],t)})):i.tokens&&uo.walkTokens(i.tokens,t)}},uo.parseInline=function(e,t){if(null==e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");Ji(t=Yi({},uo.defaults,t||{}));try{const i=so.lexInline(e,t);return t.walkTokens&&uo.walkTokens(i,t.walkTokens),ho.parseInline(i,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+Mi(e.message+"",!0)+"</pre>";throw e}},uo.Parser=ho,uo.parser=ho.parse,uo.Renderer=ao,uo.TextRenderer=lo,uo.Lexer=so,uo.lexer=so.lex,uo.Tokenizer=to,uo.Slugger=co,uo.parse=uo;uo.options,uo.setOptions,uo.use,uo.walkTokens,uo.parseInline,ho.parse,so.lex;var fo;let po=fo=class extends me{constructor(){super(...arguments),this.collInfo=null,this.curatedPageMap={},this.currList=0,this.active=!1,this.isSidebar=!1,this.splitDirection=!1,this.lastST=0,this.clickTime=0,this.splitter=null}recalcSplitter(e){this.splitDirection=this.isSidebar||e<769?"vertical":"horizontal"}firstUpdated(){this.recalcSplitter(document.documentElement.clientWidth),this.obs=new ResizeObserver((e=>{this.recalcSplitter(e[0].contentRect.width)})),this.obs.observe(this)}updated(e){e.has("collInfo")&&this.doLoadCurated(),(e.has("collInfo")||e.has("isSidebar"))&&this.recalcSplitter(document.documentElement.clientWidth),e.has("splitDirection")&&this.configureSplitter(),e.has("currList")&&this.active&&this.sendChangeEvent({currList:this.currList})}configureSplitter(){const e=this.renderRoot.querySelector(".sidebar"),t=this.renderRoot.querySelector(".main-content");if(this.splitter){try{this.splitter.destroy()}catch(e){}this.splitter=null}if(e&&t&&!this.splitter){const i={sizes:[20,80],gutterSize:4,direction:this.splitDirection};this.splitter=Yt([e,t],i)}}doLoadCurated(){return i(this,void 0,void 0,(function*(){if(null==this.collInfo)return;this.curatedPageMap={};const e={};for(const t of this.collInfo.pages)e[t.id]=t;for(const e of this.collInfo.curatedPages){this.curatedPageMap[e.list]||(this.curatedPageMap[e.list]=[]);const t=e,i=t.url,o=t.ts,n=t.title||t.url,r=e.desc;this.curatedPageMap[e.list].push({url:i,ts:o,title:n,desc:r})}this.scrollToList()}))}static get styles(){return Ne(h`
|
|
2012
|
+
`}};function Pi(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}t([ye({type:Boolean})],Ti.prototype,"inited",void 0),t([ye({type:Object})],Ti.prototype,"pageParams",void 0),t([ye({type:String})],Ti.prototype,"sourceUrl",void 0),t([ye({type:Boolean})],Ti.prototype,"navMenuShown",void 0),t([ye({type:Boolean})],Ti.prototype,"showAbout",void 0),t([ye({type:Boolean})],Ti.prototype,"showFileDropOverlay",void 0),t([ye({type:String})],Ti.prototype,"collTitle",void 0),t([ye({type:Object})],Ti.prototype,"loadInfo",void 0),t([ye({type:String})],Ti.prototype,"embed",void 0),t([ye({type:String})],Ti.prototype,"collPageUrl",void 0),t([ye({type:String})],Ti.prototype,"pageTitle",void 0),t([ye({type:Boolean})],Ti.prototype,"pageReplay",void 0),t([ye({type:String})],Ti.prototype,"source",void 0),t([ye({type:Boolean})],Ti.prototype,"skipRuffle",void 0),t([ye({type:String})],Ti.prototype,"swErrorMsg",void 0),Ti=Ai=t([ge("replay-app-main")],Ti);let Di={baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};const Fi=/[&<>"']/,Mi=/[&<>"']/g,Ri=/[<>"']|&(?!#?\w+;)/,Oi=/[<>"']|&(?!#?\w+;)/g,Ui={"&":"&","<":"<",">":">",'"':""","'":"'"},Bi=e=>Ui[e];function Ni(e,t){if(t){if(Fi.test(e))return e.replace(Mi,Bi)}else if(Ri.test(e))return e.replace(Oi,Bi);return e}const qi=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function ji(e){return e.replace(qi,((e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const Hi=/(^|[^\[])\^/g;function Wi(e,t){e=e.source||e,t=t||"";const i={replace:(t,o)=>(o=(o=o.source||o).replace(Hi,"$1"),e=e.replace(t,o),i),getRegex:()=>new RegExp(e,t)};return i}const Vi=/[^\w:]/g,Gi=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Ki(e,t,i){if(e){let e;try{e=decodeURIComponent(ji(i)).replace(Vi,"").toLowerCase()}catch(e){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!Gi.test(i)&&(i=function(e,t){Yi[" "+e]||(Qi.test(e)?Yi[" "+e]=e+"/":Yi[" "+e]=io(e,"/",!0));e=Yi[" "+e];const i=-1===e.indexOf(":");return"//"===t.substring(0,2)?i?t:e.replace(Zi,"$1")+t:"/"===t.charAt(0)?i?t:e.replace(Ji,"$1")+t:e+t}(t,i));try{i=encodeURI(i).replace(/%25/g,"%")}catch(e){return null}return i}const Yi={},Qi=/^[^:]+:\/*[^/]*$/,Zi=/^([^:]+:)[\s\S]*$/,Ji=/^([^:]+:\/*[^/]*)[\s\S]*$/;const Xi={exec:function(){}};function eo(e){let t,i,o=1;for(;o<arguments.length;o++)for(i in t=arguments[o],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}function to(e,t){const i=e.replace(/\|/g,((e,t,i)=>{let o=!1,n=t;for(;--n>=0&&"\\"===i[n];)o=!o;return o?"|":" |"})),o=i.split(/ \|/);let n=0;if(o[0].trim()||o.shift(),o[o.length-1].trim()||o.pop(),o.length>t)o.splice(t);else for(;o.length<t;)o.push("");for(;n<o.length;n++)o[n]=o[n].trim().replace(/\\\|/g,"|");return o}function io(e,t,i){const o=e.length;if(0===o)return"";let n=0;for(;n<o;){const r=e.charAt(o-n-1);if(r!==t||i){if(r===t||!i)break;n++}else n++}return e.substr(0,o-n)}function oo(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function no(e,t){if(t<1)return"";let i="";for(;t>1;)1&t&&(i+=e),t>>=1,e+=e;return i+e}function ro(e,t,i,o){const n=t.href,r=t.title?Ni(t.title):null,s=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){o.state.inLink=!0;const e={type:"link",raw:i,href:n,title:r,text:s,tokens:o.inlineTokens(s,[])};return o.state.inLink=!1,e}return{type:"image",raw:i,href:n,title:r,text:Ni(s)}}class so{constructor(e){this.options=e||Di}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:io(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],i=function(e,t){const i=e.match(/^(\s+)(?:```)/);if(null===i)return t;const o=i[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[i]=t;return i.length>=o.length?e.slice(o.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim():t[2],text:i}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=io(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}const i={type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:[]};return this.lexer.inline(i.text,i.tokens),i}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const e=t[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(e,[]),text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let i,o,n,r,s,a,l,c,d,h,u,f,p=t[1].trim();const m=p.length>1,b={type:"list",raw:"",ordered:m,start:m?+p.slice(0,-1):"",loose:!1,items:[]};p=m?`\\d{1,9}\\${p.slice(-1)}`:`\\${p}`,this.options.pedantic&&(p=m?p:"[*+-]");const g=new RegExp(`^( {0,3}${p})((?: [^\\n]*)?(?:\\n|$))`);for(;e&&(f=!1,t=g.exec(e))&&!this.rules.block.hr.test(e);){if(i=t[0],e=e.substring(i.length),c=t[2].split("\n",1)[0],d=e.split("\n",1)[0],this.options.pedantic?(r=2,u=c.trimLeft()):(r=t[2].search(/[^ ]/),r=r>4?1:r,u=c.slice(r),r+=t[1].length),a=!1,!c&&/^ *$/.test(d)&&(i+=d+"\n",e=e.substring(d.length+1),f=!0),!f){const t=new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])`);for(;e&&(h=e.split("\n",1)[0],c=h,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!t.test(c));){if(c.search(/[^ ]/)>=r||!c.trim())u+="\n"+c.slice(r);else{if(a)break;u+="\n"+c}a||c.trim()||(a=!0),i+=h+"\n",e=e.substring(h.length+1)}}b.loose||(l?b.loose=!0:/\n *\n *$/.test(i)&&(l=!0)),this.options.gfm&&(o=/^\[[ xX]\] /.exec(u),o&&(n="[ ] "!==o[0],u=u.replace(/^\[[ xX]\] +/,""))),b.items.push({type:"list_item",raw:i,task:!!o,checked:n,loose:!1,text:u}),b.raw+=i}b.items[b.items.length-1].raw=i.trimRight(),b.items[b.items.length-1].text=u.trimRight(),b.raw=b.raw.trimRight();const v=b.items.length;for(s=0;s<v;s++){this.lexer.state.top=!1,b.items[s].tokens=this.lexer.blockTokens(b.items[s].text,[]);const e=b.items[s].tokens.filter((e=>"space"===e.type)),t=e.every((e=>{const t=e.raw.split("");let i=0;for(const e of t)if("\n"===e&&(i+=1),i>1)return!0;return!1}));!b.loose&&e.length&&t&&(b.loose=!0,b.items[s].loose=!0)}return b}}html(e){const t=this.rules.block.html.exec(e);if(t){const e={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};return this.options.sanitize&&(e.type="paragraph",e.text=this.options.sanitizer?this.options.sanitizer(t[0]):Ni(t[0]),e.tokens=[],this.lexer.inline(e.text,e.tokens)),e}}def(e){const t=this.rules.block.def.exec(e);if(t){t[3]&&(t[3]=t[3].substring(1,t[3].length-1));return{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}}}table(e){const t=this.rules.block.table.exec(e);if(t){const e={type:"table",header:to(t[1]).map((e=>({text:e}))),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(e.header.length===e.align.length){e.raw=t[0];let i,o,n,r,s=e.align.length;for(i=0;i<s;i++)/^ *-+: *$/.test(e.align[i])?e.align[i]="right":/^ *:-+: *$/.test(e.align[i])?e.align[i]="center":/^ *:-+ *$/.test(e.align[i])?e.align[i]="left":e.align[i]=null;for(s=e.rows.length,i=0;i<s;i++)e.rows[i]=to(e.rows[i],e.header.length).map((e=>({text:e})));for(s=e.header.length,o=0;o<s;o++)e.header[o].tokens=[],this.lexer.inlineTokens(e.header[o].text,e.header[o].tokens);for(s=e.rows.length,o=0;o<s;o++)for(r=e.rows[o],n=0;n<r.length;n++)r[n].tokens=[],this.lexer.inlineTokens(r[n].text,r[n].tokens);return e}}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t){const e={type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:[]};return this.lexer.inline(e.text,e.tokens),e}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e={type:"paragraph",raw:t[0],text:"\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1],tokens:[]};return this.lexer.inline(e.text,e.tokens),e}}text(e){const t=this.rules.block.text.exec(e);if(t){const e={type:"text",raw:t[0],text:t[0],tokens:[]};return this.lexer.inline(e.text,e.tokens),e}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:Ni(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):Ni(t[0]):t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const t=io(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;const i=e.length;let o=0,n=0;for(;n<i;n++)if("\\"===e[n])n++;else if(e[n]===t[0])o++;else if(e[n]===t[1]&&(o--,o<0))return n;return-1}(t[2],"()");if(e>-1){const i=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,i).trim(),t[3]=""}}let i=t[2],o="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);e&&(i=e[1],o=e[3])}else o=t[3]?t[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(i=this.options.pedantic&&!/>$/.test(e)?i.slice(1):i.slice(1,-1)),ro(t,{href:i?i.replace(this.rules.inline._escapes,"$1"):i,title:o?o.replace(this.rules.inline._escapes,"$1"):o},t[0],this.lexer)}}reflink(e,t){let i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){let e=(i[2]||i[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e||!e.href){const e=i[0].charAt(0);return{type:"text",raw:e,text:e}}return ro(i,e,i[0],this.lexer)}}emStrong(e,t,i=""){let o=this.rules.inline.emStrong.lDelim.exec(e);if(!o)return;if(o[3]&&i.match(/[\p{L}\p{N}]/u))return;const n=o[1]||o[2]||"";if(!n||n&&(""===i||this.rules.inline.punctuation.exec(i))){const i=o[0].length-1;let n,r,s=i,a=0;const l="*"===o[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+i);null!=(o=l.exec(t));){if(n=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!n)continue;if(r=n.length,o[3]||o[4]){s+=r;continue}if((o[5]||o[6])&&i%3&&!((i+r)%3)){a+=r;continue}if(s-=r,s>0)continue;if(r=Math.min(r,r+s+a),Math.min(i,r)%2){const t=e.slice(1,i+o.index+r);return{type:"em",raw:e.slice(0,i+o.index+r+1),text:t,tokens:this.lexer.inlineTokens(t,[])}}const t=e.slice(2,i+o.index+r-1);return{type:"strong",raw:e.slice(0,i+o.index+r+1),text:t,tokens:this.lexer.inlineTokens(t,[])}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const i=/[^ ]/.test(e),o=/^ /.test(e)&&/ $/.test(e);return i&&o&&(e=e.substring(1,e.length-1)),e=Ni(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2],[])}}autolink(e,t){const i=this.rules.inline.autolink.exec(e);if(i){let e,o;return"@"===i[2]?(e=Ni(this.options.mangle?t(i[1]):i[1]),o="mailto:"+e):(e=Ni(i[1]),o=e),{type:"link",raw:i[0],text:e,href:o,tokens:[{type:"text",raw:e,text:e}]}}}url(e,t){let i;if(i=this.rules.inline.url.exec(e)){let e,o;if("@"===i[2])e=Ni(this.options.mangle?t(i[0]):i[0]),o="mailto:"+e;else{let t;do{t=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])[0]}while(t!==i[0]);e=Ni(i[0]),o="www."===i[1]?"http://"+e:e}return{type:"link",raw:i[0],text:e,href:o,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e,t){const i=this.rules.inline.text.exec(e);if(i){let e;return e=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):Ni(i[0]):i[0]:Ni(this.options.smartypants?t(i[0]):i[0]),{type:"text",raw:i[0],text:e}}}}const ao={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?<?([^\s>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:Xi,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};ao.def=Wi(ao.def).replace("label",ao._label).replace("title",ao._title).getRegex(),ao.bullet=/(?:[*+-]|\d{1,9}[.)])/,ao.listItemStart=Wi(/^( *)(bull) */).replace("bull",ao.bullet).getRegex(),ao.list=Wi(ao.list).replace(/bull/g,ao.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ao.def.source+")").getRegex(),ao._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ao._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,ao.html=Wi(ao.html,"i").replace("comment",ao._comment).replace("tag",ao._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ao.paragraph=Wi(ao._paragraph).replace("hr",ao.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ao._tag).getRegex(),ao.blockquote=Wi(ao.blockquote).replace("paragraph",ao.paragraph).getRegex(),ao.normal=eo({},ao),ao.gfm=eo({},ao.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),ao.gfm.table=Wi(ao.gfm.table).replace("hr",ao.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ao._tag).getRegex(),ao.gfm.paragraph=Wi(ao._paragraph).replace("hr",ao.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",ao.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ao._tag).getRegex(),ao.pedantic=eo({},ao.normal,{html:Wi("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",ao._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Xi,paragraph:Wi(ao.normal._paragraph).replace("hr",ao.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",ao.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const lo={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Xi,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Xi,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};function co(e){return e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function ho(e){let t,i,o="";const n=e.length;for(t=0;t<n;t++)i=e.charCodeAt(t),Math.random()>.5&&(i="x"+i.toString(16)),o+="&#"+i+";";return o}lo._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",lo.punctuation=Wi(lo.punctuation).replace(/punctuation/g,lo._punctuation).getRegex(),lo.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,lo.escapedEmSt=/\\\*|\\_/g,lo._comment=Wi(ao._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),lo.emStrong.lDelim=Wi(lo.emStrong.lDelim).replace(/punct/g,lo._punctuation).getRegex(),lo.emStrong.rDelimAst=Wi(lo.emStrong.rDelimAst,"g").replace(/punct/g,lo._punctuation).getRegex(),lo.emStrong.rDelimUnd=Wi(lo.emStrong.rDelimUnd,"g").replace(/punct/g,lo._punctuation).getRegex(),lo._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,lo._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,lo._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,lo.autolink=Wi(lo.autolink).replace("scheme",lo._scheme).replace("email",lo._email).getRegex(),lo._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,lo.tag=Wi(lo.tag).replace("comment",lo._comment).replace("attribute",lo._attribute).getRegex(),lo._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,lo._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,lo._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,lo.link=Wi(lo.link).replace("label",lo._label).replace("href",lo._href).replace("title",lo._title).getRegex(),lo.reflink=Wi(lo.reflink).replace("label",lo._label).replace("ref",ao._label).getRegex(),lo.nolink=Wi(lo.nolink).replace("ref",ao._label).getRegex(),lo.reflinkSearch=Wi(lo.reflinkSearch,"g").replace("reflink",lo.reflink).replace("nolink",lo.nolink).getRegex(),lo.normal=eo({},lo),lo.pedantic=eo({},lo.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Wi(/^!?\[(label)\]\((.*?)\)/).replace("label",lo._label).getRegex(),reflink:Wi(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",lo._label).getRegex()}),lo.gfm=eo({},lo.normal,{escape:Wi(lo.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),lo.gfm.url=Wi(lo.gfm.url,"i").replace("email",lo.gfm._extended_email).getRegex(),lo.breaks=eo({},lo.gfm,{br:Wi(lo.br).replace("{2,}","*").getRegex(),text:Wi(lo.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});class uo{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Di,this.options.tokenizer=this.options.tokenizer||new so,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:ao.normal,inline:lo.normal};this.options.pedantic?(t.block=ao.pedantic,t.inline=lo.pedantic):this.options.gfm&&(t.block=ao.gfm,this.options.breaks?t.inline=lo.breaks:t.inline=lo.gfm),this.tokenizer.rules=t}static get rules(){return{block:ao,inline:lo}}static lex(e,t){return new uo(t).lex(e)}static lexInline(e,t){return new uo(t).inlineTokens(e)}lex(e){let t;for(e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens);t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens}blockTokens(e,t=[]){let i,o,n,r;for(this.options.pedantic&&(e=e.replace(/^ +$/gm,""));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((o=>!!(i=o.call({lexer:this},e,t))&&(e=e.substring(i.raw.length),t.push(i),!0)))))if(i=this.tokenizer.space(e))e=e.substring(i.raw.length),1===i.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(i);else if(i=this.tokenizer.code(e))e=e.substring(i.raw.length),o=t[t.length-1],!o||"paragraph"!==o.type&&"text"!==o.type?t.push(i):(o.raw+="\n"+i.raw,o.text+="\n"+i.text,this.inlineQueue[this.inlineQueue.length-1].src=o.text);else if(i=this.tokenizer.fences(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.heading(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.hr(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.blockquote(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.list(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.html(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.def(e))e=e.substring(i.raw.length),o=t[t.length-1],!o||"paragraph"!==o.type&&"text"!==o.type?this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title}):(o.raw+="\n"+i.raw,o.text+="\n"+i.raw,this.inlineQueue[this.inlineQueue.length-1].src=o.text);else if(i=this.tokenizer.table(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.lheading(e))e=e.substring(i.raw.length),t.push(i);else{if(n=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const i=e.slice(1);let o;this.options.extensions.startBlock.forEach((function(e){o=e.call({lexer:this},i),"number"==typeof o&&o>=0&&(t=Math.min(t,o))})),t<1/0&&t>=0&&(n=e.substring(0,t+1))}if(this.state.top&&(i=this.tokenizer.paragraph(n)))o=t[t.length-1],r&&"paragraph"===o.type?(o.raw+="\n"+i.raw,o.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):t.push(i),r=n.length!==e.length,e=e.substring(i.raw.length);else if(i=this.tokenizer.text(e))e=e.substring(i.raw.length),o=t[t.length-1],o&&"text"===o.type?(o.raw+="\n"+i.raw,o.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):t.push(i);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t){this.inlineQueue.push({src:e,tokens:t})}inlineTokens(e,t=[]){let i,o,n,r,s,a,l=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(l));)e.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,r.index)+"["+no("a",r[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,r.index)+"["+no("a",r[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.escapedEmSt.exec(l));)l=l.slice(0,r.index)+"++"+l.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(s||(a=""),s=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((o=>!!(i=o.call({lexer:this},e,t))&&(e=e.substring(i.raw.length),t.push(i),!0)))))if(i=this.tokenizer.escape(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.tag(e))e=e.substring(i.raw.length),o=t[t.length-1],o&&"text"===i.type&&"text"===o.type?(o.raw+=i.raw,o.text+=i.text):t.push(i);else if(i=this.tokenizer.link(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(i.raw.length),o=t[t.length-1],o&&"text"===i.type&&"text"===o.type?(o.raw+=i.raw,o.text+=i.text):t.push(i);else if(i=this.tokenizer.emStrong(e,l,a))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.codespan(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.br(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.del(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.autolink(e,ho))e=e.substring(i.raw.length),t.push(i);else if(this.state.inLink||!(i=this.tokenizer.url(e,ho))){if(n=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const i=e.slice(1);let o;this.options.extensions.startInline.forEach((function(e){o=e.call({lexer:this},i),"number"==typeof o&&o>=0&&(t=Math.min(t,o))})),t<1/0&&t>=0&&(n=e.substring(0,t+1))}if(i=this.tokenizer.inlineText(n,co))e=e.substring(i.raw.length),"_"!==i.raw.slice(-1)&&(a=i.raw.slice(-1)),s=!0,o=t[t.length-1],o&&"text"===o.type?(o.raw+=i.raw,o.text+=i.text):t.push(i);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(i.raw.length),t.push(i);return t}}class fo{constructor(e){this.options=e||Di}code(e,t,i){const o=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,o);null!=t&&t!==e&&(i=!0,e=t)}return e=e.replace(/\n$/,"")+"\n",o?'<pre><code class="'+this.options.langPrefix+Ni(o,!0)+'">'+(i?e:Ni(e,!0))+"</code></pre>\n":"<pre><code>"+(i?e:Ni(e,!0))+"</code></pre>\n"}blockquote(e){return"<blockquote>\n"+e+"</blockquote>\n"}html(e){return e}heading(e,t,i,o){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+o.slug(i)+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"}hr(){return this.options.xhtml?"<hr/>\n":"<hr>\n"}list(e,t,i){const o=t?"ol":"ul";return"<"+o+(t&&1!==i?' start="'+i+'"':"")+">\n"+e+"</"+o+">\n"}listitem(e){return"<li>"+e+"</li>\n"}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(e){return"<p>"+e+"</p>\n"}table(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return"<tr>\n"+e+"</tr>\n"}tablecell(e,t){const i=t.header?"th":"td";return(t.align?"<"+i+' align="'+t.align+'">':"<"+i+">")+e+"</"+i+">\n"}strong(e){return"<strong>"+e+"</strong>"}em(e){return"<em>"+e+"</em>"}codespan(e){return"<code>"+e+"</code>"}br(){return this.options.xhtml?"<br/>":"<br>"}del(e){return"<del>"+e+"</del>"}link(e,t,i){if(null===(e=Ki(this.options.sanitize,this.options.baseUrl,e)))return i;let o='<a href="'+Ni(e)+'"';return t&&(o+=' title="'+t+'"'),o+=">"+i+"</a>",o}image(e,t,i){if(null===(e=Ki(this.options.sanitize,this.options.baseUrl,e)))return i;let o='<img src="'+e+'" alt="'+i+'"';return t&&(o+=' title="'+t+'"'),o+=this.options.xhtml?"/>":">",o}text(e){return e}}class po{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,i){return""+i}image(e,t,i){return""+i}br(){return""}}class mo{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let i=e,o=0;if(this.seen.hasOwnProperty(i)){o=this.seen[e];do{o++,i=e+"-"+o}while(this.seen.hasOwnProperty(i))}return t||(this.seen[e]=o,this.seen[i]=0),i}slug(e,t={}){const i=this.serialize(e);return this.getNextSafeSlug(i,t.dryrun)}}class bo{constructor(e){this.options=e||Di,this.options.renderer=this.options.renderer||new fo,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new po,this.slugger=new mo}static parse(e,t){return new bo(t).parse(e)}static parseInline(e,t){return new bo(t).parseInline(e)}parse(e,t=!0){let i,o,n,r,s,a,l,c,d,h,u,f,p,m,b,g,v,w,y,x="";const k=e.length;for(i=0;i<k;i++)if(h=e[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[h.type]&&(y=this.options.extensions.renderers[h.type].call({parser:this},h),!1!==y||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(h.type)))x+=y||"";else switch(h.type){case"space":continue;case"hr":x+=this.renderer.hr();continue;case"heading":x+=this.renderer.heading(this.parseInline(h.tokens),h.depth,ji(this.parseInline(h.tokens,this.textRenderer)),this.slugger);continue;case"code":x+=this.renderer.code(h.text,h.lang,h.escaped);continue;case"table":for(c="",l="",r=h.header.length,o=0;o<r;o++)l+=this.renderer.tablecell(this.parseInline(h.header[o].tokens),{header:!0,align:h.align[o]});for(c+=this.renderer.tablerow(l),d="",r=h.rows.length,o=0;o<r;o++){for(a=h.rows[o],l="",s=a.length,n=0;n<s;n++)l+=this.renderer.tablecell(this.parseInline(a[n].tokens),{header:!1,align:h.align[n]});d+=this.renderer.tablerow(l)}x+=this.renderer.table(c,d);continue;case"blockquote":d=this.parse(h.tokens),x+=this.renderer.blockquote(d);continue;case"list":for(u=h.ordered,f=h.start,p=h.loose,r=h.items.length,d="",o=0;o<r;o++)b=h.items[o],g=b.checked,v=b.task,m="",b.task&&(w=this.renderer.checkbox(g),p?b.tokens.length>0&&"paragraph"===b.tokens[0].type?(b.tokens[0].text=w+" "+b.tokens[0].text,b.tokens[0].tokens&&b.tokens[0].tokens.length>0&&"text"===b.tokens[0].tokens[0].type&&(b.tokens[0].tokens[0].text=w+" "+b.tokens[0].tokens[0].text)):b.tokens.unshift({type:"text",text:w}):m+=w),m+=this.parse(b.tokens,p),d+=this.renderer.listitem(m,v,g);x+=this.renderer.list(d,u,f);continue;case"html":x+=this.renderer.html(h.text);continue;case"paragraph":x+=this.renderer.paragraph(this.parseInline(h.tokens));continue;case"text":for(d=h.tokens?this.parseInline(h.tokens):h.text;i+1<k&&"text"===e[i+1].type;)h=e[++i],d+="\n"+(h.tokens?this.parseInline(h.tokens):h.text);x+=t?this.renderer.paragraph(d):d;continue;default:{const e='Token with "'+h.type+'" type was not found.';if(this.options.silent)return void console.error(e);throw new Error(e)}}return x}parseInline(e,t){t=t||this.renderer;let i,o,n,r="";const s=e.length;for(i=0;i<s;i++)if(o=e[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]&&(n=this.options.extensions.renderers[o.type].call({parser:this},o),!1!==n||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)))r+=n||"";else switch(o.type){case"escape":case"text":r+=t.text(o.text);break;case"html":r+=t.html(o.text);break;case"link":r+=t.link(o.href,o.title,this.parseInline(o.tokens,t));break;case"image":r+=t.image(o.href,o.title,o.text);break;case"strong":r+=t.strong(this.parseInline(o.tokens,t));break;case"em":r+=t.em(this.parseInline(o.tokens,t));break;case"codespan":r+=t.codespan(o.text);break;case"br":r+=t.br();break;case"del":r+=t.del(this.parseInline(o.tokens,t));break;default:{const e='Token with "'+o.type+'" type was not found.';if(this.options.silent)return void console.error(e);throw new Error(e)}}return r}}function go(e,t,i){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"==typeof t&&(i=t,t=null),oo(t=eo({},go.defaults,t||{})),i){const o=t.highlight;let n;try{n=uo.lex(e,t)}catch(e){return i(e)}const r=function(e){let r;if(!e)try{t.walkTokens&&go.walkTokens(n,t.walkTokens),r=bo.parse(n,t)}catch(t){e=t}return t.highlight=o,e?i(e):i(null,r)};if(!o||o.length<3)return r();if(delete t.highlight,!n.length)return r();let s=0;return go.walkTokens(n,(function(e){"code"===e.type&&(s++,setTimeout((()=>{o(e.text,e.lang,(function(t,i){if(t)return r(t);null!=i&&i!==e.text&&(e.text=i,e.escaped=!0),s--,0===s&&r()}))}),0))})),void(0===s&&r())}try{const i=uo.lex(e,t);return t.walkTokens&&go.walkTokens(i,t.walkTokens),bo.parse(i,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+Ni(e.message+"",!0)+"</pre>";throw e}}go.options=go.setOptions=function(e){var t;return eo(go.defaults,e),t=go.defaults,Di=t,go},go.getDefaults=Pi,go.defaults=Di,go.use=function(...e){const t=eo({},...e),i=go.defaults.extensions||{renderers:{},childTokens:{}};let o;e.forEach((e=>{if(e.extensions&&(o=!0,e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if(e.renderer){const t=i.renderers?i.renderers[e.name]:null;i.renderers[e.name]=t?function(...i){let o=e.renderer.apply(this,i);return!1===o&&(o=t.apply(this,i)),o}:e.renderer}if(e.tokenizer){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");i[e.level]?i[e.level].unshift(e.tokenizer):i[e.level]=[e.tokenizer],e.start&&("block"===e.level?i.startBlock?i.startBlock.push(e.start):i.startBlock=[e.start]:"inline"===e.level&&(i.startInline?i.startInline.push(e.start):i.startInline=[e.start]))}e.childTokens&&(i.childTokens[e.name]=e.childTokens)}))),e.renderer){const i=go.defaults.renderer||new fo;for(const t in e.renderer){const o=i[t];i[t]=(...n)=>{let r=e.renderer[t].apply(i,n);return!1===r&&(r=o.apply(i,n)),r}}t.renderer=i}if(e.tokenizer){const i=go.defaults.tokenizer||new so;for(const t in e.tokenizer){const o=i[t];i[t]=(...n)=>{let r=e.tokenizer[t].apply(i,n);return!1===r&&(r=o.apply(i,n)),r}}t.tokenizer=i}if(e.walkTokens){const i=go.defaults.walkTokens;t.walkTokens=function(t){e.walkTokens.call(this,t),i&&i.call(this,t)}}o&&(t.extensions=i),go.setOptions(t)}))},go.walkTokens=function(e,t){for(const i of e)switch(t.call(go,i),i.type){case"table":for(const e of i.header)go.walkTokens(e.tokens,t);for(const e of i.rows)for(const i of e)go.walkTokens(i.tokens,t);break;case"list":go.walkTokens(i.items,t);break;default:go.defaults.extensions&&go.defaults.extensions.childTokens&&go.defaults.extensions.childTokens[i.type]?go.defaults.extensions.childTokens[i.type].forEach((function(e){go.walkTokens(i[e],t)})):i.tokens&&go.walkTokens(i.tokens,t)}},go.parseInline=function(e,t){if(null==e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");oo(t=eo({},go.defaults,t||{}));try{const i=uo.lexInline(e,t);return t.walkTokens&&go.walkTokens(i,t.walkTokens),bo.parseInline(i,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+Ni(e.message+"",!0)+"</pre>";throw e}},go.Parser=bo,go.parser=bo.parse,go.Renderer=fo,go.TextRenderer=po,go.Lexer=uo,go.lexer=uo.lex,go.Tokenizer=so,go.Slugger=mo,go.parse=go;go.options,go.setOptions,go.use,go.walkTokens,go.parseInline,bo.parse,uo.lex;var vo;let wo=vo=class extends me{constructor(){super(...arguments),this.collInfo=null,this.curatedPageMap={},this.currList=0,this.active=!1,this.isSidebar=!1,this.splitDirection=!1,this.lastST=0,this.clickTime=0,this.splitter=null}recalcSplitter(e){this.splitDirection=this.isSidebar||e<769?"vertical":"horizontal"}firstUpdated(){this.recalcSplitter(document.documentElement.clientWidth),this.obs=new ResizeObserver((e=>{this.recalcSplitter(e[0].contentRect.width)})),this.obs.observe(this)}updated(e){e.has("collInfo")&&this.doLoadCurated(),(e.has("collInfo")||e.has("isSidebar"))&&this.recalcSplitter(document.documentElement.clientWidth),e.has("splitDirection")&&this.configureSplitter(),e.has("currList")&&this.active&&this.sendChangeEvent({currList:this.currList})}configureSplitter(){const e=this.renderRoot.querySelector(".sidebar"),t=this.renderRoot.querySelector(".main-content");if(this.splitter){try{this.splitter.destroy()}catch(e){}this.splitter=null}if(e&&t&&!this.splitter){const i={sizes:[20,80],gutterSize:4,direction:this.splitDirection};this.splitter=ei([e,t],i)}}doLoadCurated(){return i(this,void 0,void 0,(function*(){if(null==this.collInfo)return;this.curatedPageMap={};const e={};for(const t of this.collInfo.pages)e[t.id]=t;for(const e of this.collInfo.curatedPages){this.curatedPageMap[e.list]||(this.curatedPageMap[e.list]=[]);const t=e,i=t.url,o=t.ts,n=t.title||t.url,r=e.desc;this.curatedPageMap[e.list].push({url:i,ts:o,title:n,desc:r})}this.scrollToList()}))}static get styles(){return Ne(h`
|
|
2013
2013
|
:host {
|
|
2014
2014
|
width: 100%;
|
|
2015
2015
|
height: 100%;
|
|
@@ -2030,7 +2030,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
2030
2030
|
width: 100% !important;
|
|
2031
2031
|
}
|
|
2032
2032
|
|
|
2033
|
-
${
|
|
2033
|
+
${vo.sidebarStyles(d(":host(.sidebar)"))}
|
|
2034
2034
|
|
|
2035
2035
|
.desc p {
|
|
2036
2036
|
margin-bottom: 1em;
|
|
@@ -2076,7 +2076,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
2076
2076
|
}
|
|
2077
2077
|
|
|
2078
2078
|
@media screen and (max-width: 768px) {
|
|
2079
|
-
${
|
|
2079
|
+
${vo.sidebarStyles()}
|
|
2080
2080
|
}
|
|
2081
2081
|
|
|
2082
2082
|
.gutter.gutter-vertical:hover {
|
|
@@ -2149,7 +2149,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
2149
2149
|
${this.collInfo.title}
|
|
2150
2150
|
</h2>
|
|
2151
2151
|
|
|
2152
|
-
${this.collInfo.desc?Ee(
|
|
2152
|
+
${this.collInfo.desc?Ee(go(this.collInfo.desc)):""}
|
|
2153
2153
|
</section>
|
|
2154
2154
|
${this.renderLists()}
|
|
2155
2155
|
</div>
|
|
@@ -2165,22 +2165,22 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
2165
2165
|
</ol>
|
|
2166
2166
|
</div>
|
|
2167
2167
|
</article>
|
|
2168
|
-
`))}`}renderCPage(e){const t=new Date(e.ts),i=
|
|
2168
|
+
`))}`}renderCPage(e){const t=new Date(e.ts),i=xt(t.toISOString());return Q` <li>
|
|
2169
2169
|
<div class="content">
|
|
2170
2170
|
<a
|
|
2171
2171
|
@click="${this.onReplay}"
|
|
2172
2172
|
data-url="${e.url}"
|
|
2173
2173
|
data-ts="${i}"
|
|
2174
|
-
href="${
|
|
2174
|
+
href="${kt("story",e.url,i)}"
|
|
2175
2175
|
>
|
|
2176
2176
|
<p class="is-size-6 has-text-weight-bold has-text-link">${e.title}</p>
|
|
2177
2177
|
<p class="has-text-dark">${e.url}</p>
|
|
2178
2178
|
</a>
|
|
2179
|
-
<p>${
|
|
2179
|
+
<p>${At.format(t)}</p>
|
|
2180
2180
|
<p>${e.desc}</p>
|
|
2181
2181
|
</div>
|
|
2182
2182
|
<hr />
|
|
2183
|
-
</li>`}onReplay(e){e.preventDefault();const t={url:e.currentTarget.getAttribute("data-url"),ts:e.currentTarget.getAttribute("data-ts")};return this.sendChangeEvent(t),!1}sendChangeEvent(e){this.dispatchEvent(new CustomEvent("coll-tab-nav",{detail:{data:e}}))}onClickScroll(e){return e.preventDefault(),this.currList=Number(e.currentTarget.getAttribute("data-list")),this.scrollToList(),!1}scrollToList(){var e,t,i;this.currList>(null!==(i=null===(t=null===(e=this.collInfo)||void 0===e?void 0:e.lists)||void 0===t?void 0:t.length)&&void 0!==i?i:0)&&(this.currList=0);const o={behavior:"smooth",block:"nearest",inline:"nearest"};this.clickTime=(new Date).getTime();const n=this.renderRoot.getElementById("list-"+this.currList);n&&n.scrollIntoView(o)}onScroll(e){const t=e.currentTarget,i=this.renderRoot.getElementById("list-"+this.currList);if(!i)return;let o=i;const n=t.offsetTop,r=t.scrollTop;if(r>this.lastST)for(;o.nextElementSibling&&o.nextElementSibling.getBoundingClientRect().top<n;)o=o.nextElementSibling;else for(;o.previousElementSibling&&o.previousElementSibling.getBoundingClientRect().bottom>=n;)o=o.previousElementSibling;if(this.lastST=r,o&&o!=i&&o.id.startsWith("list-")&&(this.currList=Number(o.id.slice(5))),(new Date).getTime()-this.clickTime<1e3)return;const s=this.renderRoot.querySelector(`a[data-list="${this.currList}"]`);if(s){const e={behavior:"smooth",block:"nearest",inline:"nearest"};s.scrollIntoView(e)}}};t([ye({type:Object})],
|
|
2183
|
+
</li>`}onReplay(e){e.preventDefault();const t={url:e.currentTarget.getAttribute("data-url"),ts:e.currentTarget.getAttribute("data-ts")};return this.sendChangeEvent(t),!1}sendChangeEvent(e){this.dispatchEvent(new CustomEvent("coll-tab-nav",{detail:{data:e}}))}onClickScroll(e){return e.preventDefault(),this.currList=Number(e.currentTarget.getAttribute("data-list")),this.scrollToList(),!1}scrollToList(){var e,t,i;this.currList>(null!==(i=null===(t=null===(e=this.collInfo)||void 0===e?void 0:e.lists)||void 0===t?void 0:t.length)&&void 0!==i?i:0)&&(this.currList=0);const o={behavior:"smooth",block:"nearest",inline:"nearest"};this.clickTime=(new Date).getTime();const n=this.renderRoot.getElementById("list-"+this.currList);n&&n.scrollIntoView(o)}onScroll(e){const t=e.currentTarget,i=this.renderRoot.getElementById("list-"+this.currList);if(!i)return;let o=i;const n=t.offsetTop,r=t.scrollTop;if(r>this.lastST)for(;o.nextElementSibling&&o.nextElementSibling.getBoundingClientRect().top<n;)o=o.nextElementSibling;else for(;o.previousElementSibling&&o.previousElementSibling.getBoundingClientRect().bottom>=n;)o=o.previousElementSibling;if(this.lastST=r,o&&o!=i&&o.id.startsWith("list-")&&(this.currList=Number(o.id.slice(5))),(new Date).getTime()-this.clickTime<1e3)return;const s=this.renderRoot.querySelector(`a[data-list="${this.currList}"]`);if(s){const e={behavior:"smooth",block:"nearest",inline:"nearest"};s.scrollIntoView(e)}}};t([ye({type:Object})],wo.prototype,"collInfo",void 0),t([ye({type:Object})],wo.prototype,"curatedPageMap",void 0),t([ye({type:Number})],wo.prototype,"currList",void 0),t([ye({type:Boolean})],wo.prototype,"active",void 0),t([ye({type:Boolean})],wo.prototype,"isSidebar",void 0),t([ye({type:Boolean})],wo.prototype,"splitDirection",void 0),wo=vo=t([ge("wr-coll-story")],wo);class yo extends me{constructor(){super(),this.state="trypublic",this.sourceUrl="",this.scriptLoaded=!1,this.error=!1}static get properties(){return{state:{type:String},sourceUrl:{type:String},error:{type:Boolean},reauth:{type:Boolean}}}updated(e){e.has("sourceUrl")&&(this.error=!1,this.state="trypublic",this.tryPublicAccess().then((e=>{e||(this.state="tryauto",this.requestUpdate())})))}tryPublicAccess(){return i(this,void 0,void 0,(function*(){try{const e=this.sourceUrl,t=`https://helper-proxy.webrecorder.workers.dev/g/${e.slice(14)}`;let i=null;try{i=yield fetch(t)}catch(e){return!1}const o=yield i.json();if(!o.url||!o.name||!o.size)return!1;if(o.size>15e6)return!1;const n=o.url;try{const e=new AbortController,t=e.signal;if(i=yield fetch(n,{signal:t}),e.abort(),200!=i.status)return!1}catch(e){return!1}const r=o.name,s={publicUrl:n},a=Number(o.size);return this.dispatchEvent(new CustomEvent("load-ready",{detail:{name:r,extra:s,size:a,sourceUrl:e}})),!0}catch(e){return!1}}))}onLoad(){this.scriptLoaded=!0,this.gauth("none",(e=>{e.error?"implicitonly"!==this.state&&(this.state="trymanual"):this.authed(e)}))}onClickAuth(){this.gauth("select_account",(e=>{e.error||this.authed(e)}))}authed(e){return i(this,void 0,void 0,(function*(){const t=this.sourceUrl,i=`https://www.googleapis.com/drive/v3/files/${t.slice(14)}`,o={Authorization:`Bearer ${e.access_token}`},n=yield fetch(i+"?fields=name,size&supportsAllDrives=true",{headers:o});if(404===n.status||403==n.status)return"implicitonly"!==this.state&&(this.state="trymanual"),void(this.error=!0);this.error=!1;const r=yield n.json(),s=r.name,a=Number(r.size);this.dispatchEvent(new CustomEvent("load-ready",{detail:{sourceUrl:t,headers:o,size:a,name:s}}))}))}static get styles(){return Ne(h``)}render(){return Q` ${this.script()}
|
|
2184
2184
|
${"trymanual"!==this.state?Q` <p>Connecting to Google Drive...</p> `:Q`
|
|
2185
2185
|
${this.error?Q`
|
|
2186
2186
|
<div class="error has-text-danger">
|
|
@@ -2203,7 +2203,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
2203
2203
|
></span>
|
|
2204
2204
|
<span>Authorize Google Drive</span>
|
|
2205
2205
|
</button>
|
|
2206
|
-
`}`}script(){if("trypublic"===this.state||this.scriptLoaded)return Q``;const e=document.createElement("script");return e.onload=()=>this.onLoad(),e.src="https://apis.google.com/js/platform.js",e}gauth(e,t){self.gapi.load("auth2",(()=>{self.gapi.auth2.authorize({client_id:"160798412227-tko4c82uopud11q105b2lvbogsj77hlg.apps.googleusercontent.com",scope:"https://www.googleapis.com/auth/drive.file",response_type:"token",prompt:e},t)}))}}customElements.define("wr-gdrive",
|
|
2206
|
+
`}`}script(){if("trypublic"===this.state||this.scriptLoaded)return Q``;const e=document.createElement("script");return e.onload=()=>this.onLoad(),e.src="https://apis.google.com/js/platform.js",e}gauth(e,t){self.gapi.load("auth2",(()=>{self.gapi.auth2.authorize({client_id:"160798412227-tko4c82uopud11q105b2lvbogsj77hlg.apps.googleusercontent.com",scope:"https://www.googleapis.com/auth/drive.file",response_type:"token",prompt:e},t)}))}}customElements.define("wr-gdrive",yo);const xo='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><style>\n@keyframes a0_t { 0% { transform: rotate(0deg); } 100% { transform: rotate(-360deg); } }\n</style><path d="M6.807 11.246h-0.001c-0.074 0-0.144-0.033-0.191-0.09c-0.047-0.057-0.067-0.131-0.054-0.204c.338-1.735 1.483-3.206 3.082-3.959c.038-0.018 .083-0.015 .118 .008c.036 .022 .057 .061 .058 .103c.001 .017-0.003 .035-0.011 .05c-0.426 1.035-0.719 2.371-0.81 3.856c-0.007 .132-0.117 .236-0.249 .236Zm7.364-4.091c-0.019-0.047-0.008-0.101 .027-0.138c.037-0.035 .092-0.045 .139-0.025c1.6 .753 2.745 2.224 3.081 3.96c.012 .072-0.008 .146-0.055 .203c-0.047 .056-0.117 .089-0.19 .09l-1.942 .001c-0.132 0-0.242-0.104-0.249-0.236c-0.091-1.485-0.384-2.821-0.811-3.855m3.002 5.591c.074 0 .144 .033 .192 .089c.047 .057 .067 .132 .054 .205c-0.336 1.736-1.481 3.208-3.082 3.96c-0.047 .02-0.102 .01-0.139-0.025c-0.035-0.037-0.045-0.091-0.026-0.138c.426-1.033 .719-2.369 .81-3.856c.008-0.132 .117-0.235 .249-0.235Zm-7.364 4.091c.007 .016 .01 .033 .01 .05c-0.001 .042-0.022 .081-0.057 .104c-0.036 .023-0.08 .027-0.119 .01c-1.599-0.754-2.744-2.225-3.081-3.961c-0.013-0.073 .007-0.147 .054-0.204c.048-0.056 .117-0.088 .191-0.088c.495-0.002 1.488-0.002 1.942-0.002c.132 0 .241 .103 .249 .235c.091 1.487 .384 2.823 .811 3.856m.694-3.825c-0.005-0.069 .019-0.136 .066-0.187c.048-0.05 .114-0.078 .183-0.078l2.477-0.001c.138 .001 .249 .112 .249 .25v.016c-0.107 1.583-0.461 2.962-0.997 3.872c-0.111 .198-0.249 .375-0.414 .531c-0.045 .035-0.109 .035-0.154 0c-0.164-0.155-0.304-0.334-0.414-0.531c-0.536-0.91-0.89-2.289-0.996-3.872m2.975-2.032v.016c0 .138-0.111 .249-0.249 .25h-2.477c-0.138 0-0.25-0.112-0.25-0.25l.001-0.016c.106-1.583 .46-2.961 .996-3.872c.127-0.214 .272-0.408 .414-0.53c.045-0.035 .109-0.035 .154 0c.142 .122 .288 .316 .414 .53c.536 .911 .89 2.289 .997 3.872" fill="#0891b2"/><path d="M23.774 13.333c.09 .05 .14 .149 .128 .25c-0.778 5.876-5.811 10.417-11.897 10.417c-6.114 0-11.165-4.581-11.907-10.495l-0.001-0.028c.001-0.137 .111-0.247 .248-0.248c.044 0 .087 .012 .125 .035c.54 .312 1.438 .835 1.768 1.028c.078 .045 .174 .045 .252-0.001l1.777-1.044c.071-0.042 .157-0.046 .231-0.012c.075 .035 .128 .103 .142 .184c.691 3.524 3.774 6.069 7.365 6.081c3.563-0.011 6.63-2.518 7.351-6.007c.014-0.073 .061-0.136 .126-0.171l2.042-1.103c.075-0.041 .165-0.04 .24 .001Zm-23.548-2.666c-0.09-0.049-0.141-0.148-0.128-0.25c.778-5.876 5.811-10.417 11.897-10.417c6.114 0 11.165 4.581 11.907 10.495l.001 .028c-0.001 .137-0.111 .247-0.248 .248c-0.044 0-0.087-0.012-0.125-0.035c-0.59-0.341-1.179-0.684-1.768-1.028c-0.078-0.045-0.174-0.045-0.252 .001l-1.777 1.044c-0.071 .042-0.157 .046-0.231 .012c-0.075-0.035-0.128-0.103-0.142-0.184c-0.691-3.524-3.774-6.069-7.365-6.081c-3.563 .011-6.63 2.518-7.351 6.007c-0.014 .073-0.061 .136-0.126 .171l-2.042 1.103c-0.075 .041-0.166 .041-0.241-0.001Z" fill="#4d7c0f" style="animation: 3s linear infinite both a0_t;transform-origin:center;"/></svg>\n',ko=["errored","googledrive","permission_needed"];class So extends me{constructor(){super(...arguments),this.loadInfo=null,this.state="waiting",this.progress=0,this.percent=0,this.currentSize=0,this.totalSize=0,this.total=0,this.coll="",this.tryFileHandle=!!window.showOpenFilePicker,this.errorAllowRetry=!1,this.pingInterval=0,this.fileHandle=null,this.noWebWorker=!1}firstUpdated(){this.initMessages()}initMessages(){if(this.noWebWorker=Boolean(this.loadInfo&&this.loadInfo.noWebWorker),this.noWebWorker){if(!navigator.serviceWorker)return;this.worker=navigator.serviceWorker}else this.worker=new Worker(this.swName);this.worker.addEventListener("message",(e=>{var t;switch(e.data.msg_type){case"collProgress":if(e.data.name===this.coll){if(this.percent=e.data.percent,e.data.error)if(this.error=e.data.error,this.state="errored",this.errorAllowRetry=!0,this.fileHandle=e.data.fileHandle,"missing_local_file"===this.error)this.tryFileHandle=!1;else if("permission_needed"===this.error&&e.data.fileHandle){this.state="permission_needed";break}e.data.currentSize&&e.data.totalSize&&(this.currentSize=e.data.currentSize,this.totalSize=e.data.totalSize),this.extraMsg=e.data.extraMsg}break;case"collAdded":e.data.name===this.coll&&(this.total||(this.total=100),this.progress=this.total,this.percent=100,this.dispatchEvent(new CustomEvent("coll-loaded",{detail:e.data})),this.noWebWorker?this.pingInterval&&clearInterval(this.pingInterval):null===(t=this.worker)||void 0===t||t.terminate(),this.worker=null)}}))}doLoad(){var e,t;return i(this,void 0,void 0,(function*(){let i,o,n=this.sourceUrl,r=null;if(this.percent=this.currentSize=this.totalSize=0,null===(e=this.loadInfo)||void 0===e?void 0:e.swError)return this.state="errored",this.error=this.loadInfo.swError,void(this.errorAllowRetry=!1);try{const{scheme:e,host:i,path:o}=$t(n);switch(e){case"googledrive":this.state="googledrive",r=null!==(t=yield this.googledriveInit())&&void 0!==t?t:null;break;case"s3":r={sourceUrl:n,loadUrl:`https://${i}.s3.amazonaws.com${o}`,name:this.sourceUrl};break;case"file":if(!this.loadInfo&&!this.tryFileHandle)return this.state="errored",this.error="File URLs can not be entered directly or shared.\nYou can select a file to upload from the main page by clicking the 'Choose File...' button.",void(this.errorAllowRetry=!1);r=this.loadInfo;break;case"proxy":n="proxy:"+n.slice(8)}}catch(e){console.log(e)}r||(r={sourceUrl:n}),this.state="started",this.loadInfo&&(r.newFullImport=this.loadInfo.newFullImport,r.loadEager=this.loadInfo.loadEager,r.noCache=this.loadInfo.noCache,this.loadInfo.extraConfig&&(o=this.loadInfo.extraConfig),n.startsWith("proxy:")&&(null==o?void 0:o.recording)&&(i="recordingproxy"));const s={msg_type:"addColl",name:this.coll,extraConfig:o,type:i,skipExisting:!0,file:r};yield ot(),this.worker&&(this.noWebWorker?(navigator.serviceWorker.controller.postMessage(s),this.pingInterval=setInterval((()=>{navigator.serviceWorker.controller.postMessage({msg_type:"ping"})}),15e3)):this.worker.postMessage(s))}))}googledriveInit(){return this._gdWait=new Promise((e=>this._gdResolve=e)),this._gdWait}onLoadReady(e){this._gdResolve&&this._gdResolve(e.detail)}onCancel(){var e;return i(this,void 0,void 0,(function*(){if(!this.worker)return;const t={msg_type:"cancelLoad",name:this.coll};if(!this.noWebWorker)return this.worker.postMessage(t),yield this.updateComplete,void this.dispatchEvent(new CustomEvent("coll-load-cancel",{bubbles:!0,composed:!0}));(null===(e=navigator.serviceWorker)||void 0===e?void 0:e.controller)&&(navigator.serviceWorker.controller.postMessage(t),this.pingInterval&&clearInterval(this.pingInterval))}))}updated(e){(Boolean(this.sourceUrl&&e.has("sourceUrl"))||e.has("tryFileHandle"))&&this.doLoad()}static get styles(){return Ne(h`
|
|
2207
2207
|
:host {
|
|
2208
2208
|
height: 100%;
|
|
2209
2209
|
display: flex;
|
|
@@ -2245,7 +2245,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
2245
2245
|
<fa-icon
|
|
2246
2246
|
size="5rem"
|
|
2247
2247
|
style="margin-bottom: 1rem;"
|
|
2248
|
-
.svg=${
|
|
2248
|
+
.svg=${ko.includes(this.state)?Ke:xo}
|
|
2249
2249
|
aria-label="ReplayWeb.page Logo"
|
|
2250
2250
|
role="img"
|
|
2251
2251
|
></fa-icon>
|
|
@@ -2300,14 +2300,14 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
2300
2300
|
`:X}
|
|
2301
2301
|
${this.currentSize&&this.totalSize?Q` <div class="loaded-prog">
|
|
2302
2302
|
Loaded
|
|
2303
|
-
<b>${
|
|
2303
|
+
<b>${Et()(this.currentSize)}</b>
|
|
2304
2304
|
of
|
|
2305
2305
|
|
|
2306
|
-
<b>${
|
|
2306
|
+
<b>${Et()(this.totalSize)}</b>
|
|
2307
2307
|
|
|
2308
2308
|
${this.extraMsg&&Q` <p class="extra-msg">(${this.extraMsg})</p> `}
|
|
2309
2309
|
</div>`:Q``}
|
|
2310
|
-
`}onAskPermission(){var e;return i(this,void 0,void 0,(function*(){"granted"===(yield null===(e=this.fileHandle)||void 0===e?void 0:e.requestPermission({mode:"read"}))&&this.doLoad()}))}}t([ye({type:String})],
|
|
2310
|
+
`}onAskPermission(){var e;return i(this,void 0,void 0,(function*(){"granted"===(yield null===(e=this.fileHandle)||void 0===e?void 0:e.requestPermission({mode:"read"}))&&this.doLoad()}))}}t([ye({type:String})],So.prototype,"sourceUrl",void 0),t([ye({type:Object})],So.prototype,"loadInfo",void 0),t([ye({type:String})],So.prototype,"state",void 0),t([ye({type:Number})],So.prototype,"progress",void 0),t([ye({type:Number})],So.prototype,"percent",void 0),t([ye({type:Number})],So.prototype,"currentSize",void 0),t([ye({type:Number})],So.prototype,"totalSize",void 0),t([ye({type:String})],So.prototype,"error",void 0),t([ye({type:Number})],So.prototype,"total",void 0),t([ye({type:String})],So.prototype,"status",void 0),t([ye({type:String})],So.prototype,"coll",void 0),t([ye({type:String})],So.prototype,"embed",void 0),t([ye({type:Boolean})],So.prototype,"tryFileHandle",void 0),t([ye({type:Boolean})],So.prototype,"errorAllowRetry",void 0),t([ye({type:String})],So.prototype,"extraMsg",void 0),t([ye({type:String})],So.prototype,"swName",void 0),customElements.define("wr-loader",So);var $o=__webpack_require__(563),zo=__webpack_require__.n($o),_o=__webpack_require__(112);class Co extends me{constructor(){super(...arguments),this.filteredPages=[],this.sortedPages=[],this.query="",this.flex=null,this.textPages=null,this.newQuery=null,this.loading=!1,this.updatingSearch=!1,this.showAllPages=!1,this.hasExtraPages=!1,this.currList=0,this.active=!1,this.editable=!1,this.changeNeeded=!1,this.selectedPages=new Set,this.menuActive=!1,this.sortKey="date",this.sortDesc=!0,this.isSidebar=!1,this.url="",this.ts="",this.editing=!1,this.toDeletePages=null,this.toDeletePage=null,this.collInfo=null,this.allSelected=!1,this.defaultKey="",this.dynamicPagesQuery=!1,this.totalPages=0,this.dynamicPageCount=1,this.skipScrollMore=!1}static get sortKeys(){return[{key:"",name:"Best Match"},{key:"title",name:"Title"},{key:"date",name:"Date"}]}_timedUpdate(){null!==this.newQuery&&(this.query=this.newQuery,this.newQuery=null,this.filter())}updated(e){return i(this,void 0,void 0,(function*(){if(e.has("collInfo")?this.updateTextSearch():(e.has("query")||e.has("currList")||e.has("showAllPages"))&&this.filter(),e.has("active")&&this.active&&this.changeNeeded&&this.filter(),e.has("query")){this.query?(this.sortKey="",this.sortDesc=!1):(this.sortKey="date",this.sortDesc=!0);const e=this.renderRoot.querySelector("wr-sorter");e&&(e.sortKey=this.sortKey,e.sortDesc=this.sortDesc)}if(e.has("sortedPages")&&this.isSidebar){const e=this.renderRoot.querySelector(".current");if(e){const t={behavior:"smooth",block:"nearest",inline:"nearest"};setTimeout((()=>e.scrollIntoView(t)),100)}}}))}onChangeQuery(e){this.newQuery=e.currentTarget.value,this._ival&&window.clearTimeout(this._ival),this._ival=window.setTimeout((()=>this._timedUpdate()),250)}filter(){return i(this,void 0,void 0,(function*(){if(this.loading)return;if(this.active||(this.changeNeeded=!0),this.loading=!0,this.flex&&this.query&&this.textPages){const e=yield this.flex.searchAsync(this.query,25);this.filteredPages=e.map((e=>this.textPages[e]))}else this.showAllPages&&this.hasExtraPages?this.filteredPages=[...this.textPages]:this.dynamicPagesQuery||(this.filteredPages=[...this.collInfo.pages]);if(this.totalPages=this.filteredPages.length,this.dynamicPagesQuery){if(this.query)this.hasExtraPages=!1;else{const e=this.collInfo.pages.filter((e=>e.isSeed));this.filteredPages=this.showAllPages||!e.length?[...this.collInfo.pages]:e,this.hasExtraPages=e.length<this.collInfo.pages.length}this.dynamicPageCount=1,yield this.addDynamicPages()}0!==this.currList&&(yield this.filterCurated());for(const e of this.filteredPages){const{timestamp:t,date:i}=yt(e);if(null==i)throw new Error("Page date is null");e.timestamp=t,e.date=i}this.loading=!1,this.changeNeeded=!1;const e={query:this.query,currList:this.currList};this.sendChangeEvent(e)}))}addDynamicPages(){return i(this,void 0,void 0,(function*(){const e=new URLSearchParams;this.query&&e.set("search",this.query),e.set("page",this.dynamicPageCount+""),e.set("pageSize","25");const t=yield fetch(`${this.collInfo.apiPrefix}/pages?${e.toString()}`),i=yield t.json();if(!i.pages)return;i.pages.length||(this.skipScrollMore=!0);const o=new Set;this.filteredPages.forEach((e=>o.add(e.id)));const n=[];for(const{id:e,url:t,title:r,mime:s,status:a,ts:l,favIconUrl:c,waczhash:d,isSeed:h}of i.pages){if(o.has(e))continue;if(!this.showAllPages&&this.hasExtraPages&&!this.query&&!h)continue;let i;i="string"==typeof l?new Date(l).getTime():l;const u={id:e,url:t,title:r,mime:s,status:a,ts:i,favIconUrl:c,waczhash:d};n.push(u)}n.length&&(this.filteredPages=[...this.filteredPages,...n]),this.totalPages=this.filteredPages.length}))}filterCurated(){return i(this,void 0,void 0,(function*(){const e=yield fetch(`${this.collInfo.apiPrefix}/curated/${this.currList}`),t=(yield e.json()).curated;this.filteredPages=t}))}sendChangeEvent(e){this.dispatchEvent(new CustomEvent("coll-tab-nav",{detail:{data:e}}))}addPages(e){var t;const i=new _o.Index;return this.flex=i,this.textPages=e,this.dynamicPagesQuery||(this.hasExtraPages=Boolean(this.textPages&&(null===(t=this.collInfo)||void 0===t?void 0:t.pages)&&this.textPages.length>this.collInfo.pages.length)),this.collInfo&&(this.dynamicPagesQuery=this.collInfo.canQueryPages||!1),Promise.all(e.map(((e,t)=>{let o=e.url;return e.title&&(o+=" "+e.title),e.text&&(o+=" "+e.text),i.addAsync(t,o)})))}updateTextSearch(){var e,t,o,r;return i(this,void 0,void 0,(function*(){if(this.updatingSearch)return;this.updatingSearch=!0;let i=0;try{const c=yield caches.open("cache:"+this.collInfo.coll),d=`${this.collInfo.apiPrefix}/textIndex`;let h=yield c.match(d);h&&Number(h.headers.get("Content-Length"))||(h=yield fetch(d),200===h.status&&Number(h.headers.get("Content-Length"))&&c.put(d,h.clone()));const u=[];try{for(var s,a=!0,l=n(zo()(h.body.getReader()));s=yield l.next(),!(e=s.done);a=!0){r=s.value,a=!1;const e=r;e.url&&(e.id=++i,u.push(e))}}catch(e){t={error:e}}finally{try{a||e||!(o=l.return)||(yield o.call(l))}finally{if(t)throw t.error}}yield this.addPages(u)}catch(e){console.warn(e)}finally{0===i&&(yield this.addPages(this.collInfo.pages)),this.updatingSearch=!1}yield this.filter()}))}static get styles(){return Ne(h`
|
|
2311
2311
|
:host {
|
|
2312
2312
|
width: 100%;
|
|
2313
2313
|
flex: 1 1 auto;
|
|
@@ -2435,10 +2435,10 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
2435
2435
|
}
|
|
2436
2436
|
|
|
2437
2437
|
@media screen and (max-width: 768px) {
|
|
2438
|
-
${
|
|
2438
|
+
${Co.sidebarStyles()}
|
|
2439
2439
|
}
|
|
2440
2440
|
|
|
2441
|
-
${
|
|
2441
|
+
${Co.sidebarStyles(d`:host(.sidebar)`)}
|
|
2442
2442
|
|
|
2443
2443
|
.mobile-lists {
|
|
2444
2444
|
display: block !important;
|
|
@@ -2573,7 +2573,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
2573
2573
|
placeholder="Search by Page URL, Title, or Text"
|
|
2574
2574
|
/>
|
|
2575
2575
|
<span class="icon is-left"
|
|
2576
|
-
><fa-icon .svg="${
|
|
2576
|
+
><fa-icon .svg="${Ii}" aria-hidden="true"></fa-icon
|
|
2577
2577
|
></span>
|
|
2578
2578
|
</div>
|
|
2579
2579
|
</div>
|
|
@@ -2774,7 +2774,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
2774
2774
|
id="pages"
|
|
2775
2775
|
.sortKey="${this.sortKey}"
|
|
2776
2776
|
.sortDesc="${this.sortDesc}"
|
|
2777
|
-
.sortKeys="${
|
|
2777
|
+
.sortKeys="${Co.sortKeys}"
|
|
2778
2778
|
.data="${this.filteredPages}"
|
|
2779
2779
|
.pageResults="${this.dynamicPagesQuery?this.totalPages:100}"
|
|
2780
2780
|
@sort-changed="${this.onSortChanged}"
|
|
@@ -2790,7 +2790,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
2790
2790
|
${this.toDeletePage?Q` <p>
|
|
2791
2791
|
Are you sure you want to delete the page
|
|
2792
2792
|
<b>${this.toDeletePage.title}</b>? (Size:
|
|
2793
|
-
<b>${
|
|
2793
|
+
<b>${Et()(this.toDeletePage.size)}</b>)
|
|
2794
2794
|
</p>`:Q`
|
|
2795
2795
|
<p>
|
|
2796
2796
|
Are you sure you want to delete the
|
|
@@ -2811,7 +2811,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
2811
2811
|
>
|
|
2812
2812
|
Cancel
|
|
2813
2813
|
</button>
|
|
2814
|
-
</wr-modal>`:Q``}isCurrPage(e){if(this.isSidebar&&e.url===this.url){let t=e.timestamp;return!t&&e.date?t=
|
|
2814
|
+
</wr-modal>`:Q``}isCurrPage(e){if(this.isSidebar&&e.url===this.url){let t=e.timestamp;return!t&&e.date?t=xt(e.date):"string"==typeof e.ts&&(t=xt(e.ts)),t===this.ts}return!1}renderPages(){return Q`
|
|
2815
2815
|
<div class="page-header has-text-weight-bold">
|
|
2816
2816
|
${this.renderPageHeader()}
|
|
2817
2817
|
</div>
|
|
@@ -2840,7 +2840,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
2840
2840
|
>`:"No Pages Found":Q`<span class="fix-text-wrapping"
|
|
2841
2841
|
>No Pages are defined in this archive. The archive may be empty.
|
|
2842
2842
|
<a href="#view=resources">Try browsing by URL</a>.</span
|
|
2843
|
-
>`}onScroll(e){return i(this,void 0,void 0,(function*(){const t=e.currentTarget;if(t.scrollHeight-t.scrollTop-t.clientHeight<40&&!this.skipScrollMore){this.skipScrollMore=!0,this.dynamicPagesQuery&&(this.dynamicPageCount+=1,yield this.addDynamicPages());const e=this.renderRoot.querySelector("wr-sorter");e&&e.getMore(25)}}))}}t([ye({type:Array})],
|
|
2843
|
+
>`}onScroll(e){return i(this,void 0,void 0,(function*(){const t=e.currentTarget;if(t.scrollHeight-t.scrollTop-t.clientHeight<40&&!this.skipScrollMore){this.skipScrollMore=!0,this.dynamicPagesQuery&&(this.dynamicPageCount+=1,yield this.addDynamicPages());const e=this.renderRoot.querySelector("wr-sorter");e&&e.getMore(25)}}))}}t([ye({type:Array})],Co.prototype,"filteredPages",void 0),t([ye({type:Array})],Co.prototype,"sortedPages",void 0),t([ye({type:String})],Co.prototype,"query",void 0),t([ye({attribute:!1})],Co.prototype,"flex",void 0),t([ye({attribute:!1})],Co.prototype,"textPages",void 0),t([ye()],Co.prototype,"newQuery",void 0),t([ye({type:Boolean})],Co.prototype,"loading",void 0),t([ye({type:Boolean})],Co.prototype,"updatingSearch",void 0),t([ye({type:Boolean})],Co.prototype,"showAllPages",void 0),t([ye({type:Boolean})],Co.prototype,"hasExtraPages",void 0),t([ye({type:Number})],Co.prototype,"currList",void 0),t([ye({type:Boolean})],Co.prototype,"active",void 0),t([ye({type:Boolean})],Co.prototype,"editable",void 0),t([ye({type:Boolean})],Co.prototype,"changeNeeded",void 0),t([ye({attribute:!1})],Co.prototype,"selectedPages",void 0),t([ye({type:Boolean})],Co.prototype,"menuActive",void 0),t([ye({type:String})],Co.prototype,"sortKey",void 0),t([ye({type:Boolean})],Co.prototype,"sortDesc",void 0),t([ye({type:Boolean})],Co.prototype,"isSidebar",void 0),t([ye({type:String})],Co.prototype,"url",void 0),t([ye({type:String})],Co.prototype,"ts",void 0),t([ye({type:Boolean})],Co.prototype,"editing",void 0),t([ye({type:Array})],Co.prototype,"toDeletePages",void 0),t([ye({type:Object})],Co.prototype,"toDeletePage",void 0),t([ye({type:Object})],Co.prototype,"collInfo",void 0),t([ye({type:Boolean})],Co.prototype,"allSelected",void 0),t([ye({type:String})],Co.prototype,"defaultKey",void 0),t([ye({type:Boolean})],Co.prototype,"dynamicPagesQuery",void 0),t([ye({type:Number})],Co.prototype,"totalPages",void 0),t([ye({type:Number})],Co.prototype,"dynamicPageCount",void 0),t([ye({type:Boolean})],Co.prototype,"skipScrollMore",void 0),customElements.define("wr-page-view",Co);const Io=new RegExp(`[${["-","[","]","/","{","}","(",")","*","+","?",".","\\","^","$","|"].join("\\")}]`,"g"),Lo=e=>e.replace(Io,"\\$&");class Eo extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}static get observedAttributes(){return["keywords","delimiter"]}get keywords(){var e;return null!==(e=this.getAttribute("keywords"))&&void 0!==e?e:""}set keywords(e){this.setAttribute("keywords",e)}get delimiter(){var e;return null!==(e=this.getAttribute("delimiter"))&&void 0!==e?e:""}set delimiter(e){this.setAttribute("delimiter",e)}attributeChangedCallback(e,t,i){"keywords"!==e&&"delimiter"!==e||i!==t&&this._render()}connectedCallback(){this._render(),this.__observer=new MutationObserver((()=>{this._render()})),this.__observer.observe(this,{childList:!0,characterData:!0,subtree:!0})}disconnectedCallback(){this.__observer&&(this.__observer.disconnect(),this.__observer=void 0)}_render(){if(!this.shadowRoot)return;const e=this.textContent||"",t=this.getAttribute("keywords"),i=this.getAttribute("delimiter")||/\s+/;if(!t)return void(this.shadowRoot.textContent=e);const o=e.toLowerCase(),n=t.toLowerCase().split(i).sort(((e,t)=>t.length-e.length)),r=new RegExp(`${n.map(Lo).join("|")}`,"gi"),s=e.split(r),a=document.createElement("div");let l=0;for(const t of s)if(a.appendChild(document.createTextNode(t)),l+=t.length,l<o.length){const t=o.substring(l),i=n.find((e=>t.startsWith(e)));if(i){const t=document.createElement("mark");t.textContent=e.substr(l,i.length),a.appendChild(t),l+=i.length}}this.shadowRoot.innerHTML=`\n <style>\n mark {\n color: var(--keyword-mark-color);\n background: var(--keyword-mark-background, yellow);\n }\n </style>\n ${a.innerHTML}\n `}}customElements.define("keyword-mark",Eo);class Ao extends me{constructor(){super(...arguments),this.query="",this.textSnippet="",this.page=null,this.replayPrefix="",this.deleting=!1,this.selected=!1,this.editable=!1,this.index=0,this.isCurrent=!1,this.isSidebar=!1,this.thumbnailValid=!0,this.iconValid=!0}static get styles(){return Ne(h`
|
|
2844
2844
|
:host {
|
|
2845
2845
|
min-height: min-content;
|
|
2846
2846
|
width: 100%;
|
|
@@ -2921,10 +2921,10 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
2921
2921
|
}
|
|
2922
2922
|
|
|
2923
2923
|
@media screen and (max-width: 768px) {
|
|
2924
|
-
${
|
|
2924
|
+
${Ao.sidebarStyles()}
|
|
2925
2925
|
}
|
|
2926
2926
|
|
|
2927
|
-
${
|
|
2927
|
+
${Ao.sidebarStyles(d`:host(.sidebar)`)}
|
|
2928
2928
|
|
|
2929
2929
|
.current a {
|
|
2930
2930
|
background-color: rgb(207, 243, 255);
|
|
@@ -2971,7 +2971,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
2971
2971
|
${e} .media-left {
|
|
2972
2972
|
padding-left: 0.75rem;
|
|
2973
2973
|
}
|
|
2974
|
-
`}updated(e){(e.has("page")||e.has("query"))&&(this.updateSnippet(),this.deleting=!1)}render(){const e=this.page,{date:t}=
|
|
2974
|
+
`}updated(e){(e.has("page")||e.has("query"))&&(this.updateSnippet(),this.deleting=!1)}render(){const e=this.page,{date:t}=yt(e),i="number"==typeof e.size,o=this.editable&&!this.isSidebar;return Q`
|
|
2975
2975
|
${o?Q` <div class="check-select">
|
|
2976
2976
|
<label class="checkbox">
|
|
2977
2977
|
<input
|
|
@@ -2987,8 +2987,8 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
2987
2987
|
<div class="column col-index is-1 is-size-7">${this.index}.</div>
|
|
2988
2988
|
`:""}
|
|
2989
2989
|
<div class="column col-date is-2">
|
|
2990
|
-
<div>${t?
|
|
2991
|
-
<div>${t?
|
|
2990
|
+
<div>${t?Tt.format(t):""}</div>
|
|
2991
|
+
<div>${t?Pt.format(t):""}</div>
|
|
2992
2992
|
</div>
|
|
2993
2993
|
<div class="column">
|
|
2994
2994
|
<div class="media">
|
|
@@ -2998,7 +2998,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
2998
2998
|
<a
|
|
2999
2999
|
@dblclick="${this.onReload}"
|
|
3000
3000
|
@click="${this.onReplay}"
|
|
3001
|
-
href="${
|
|
3001
|
+
href="${kt("pages",this.page.url,this.page.timestamp,this.page.waczhash)}"
|
|
3002
3002
|
>
|
|
3003
3003
|
<p class="is-size-6 has-text-weight-bold has-text-link text">
|
|
3004
3004
|
<keyword-mark keywords="${this.query}"
|
|
@@ -3011,7 +3011,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
3011
3011
|
>${this.thumbnailValid?this.renderFavicon():""}
|
|
3012
3012
|
</p>
|
|
3013
3013
|
<p class="has-text-grey-dark text is-inline-date">
|
|
3014
|
-
${t?
|
|
3014
|
+
${t?At.format(t):""}
|
|
3015
3015
|
</p>
|
|
3016
3016
|
</a>
|
|
3017
3017
|
${this.textSnippet?Q` <div class="text">
|
|
@@ -3021,7 +3021,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
3021
3021
|
</div>`:Q``}
|
|
3022
3022
|
</div>
|
|
3023
3023
|
${i?Q` <div class="media-right" style="margin-right: 2em">
|
|
3024
|
-
${
|
|
3024
|
+
${Et()(e.size)}
|
|
3025
3025
|
</div>`:""}
|
|
3026
3026
|
</div>
|
|
3027
3027
|
</div>
|
|
@@ -3046,7 +3046,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
3046
3046
|
@error=${()=>this.iconValid=!1}
|
|
3047
3047
|
src=${`${this.getReplayPrefix()}/${this.page.favIconUrl}`}
|
|
3048
3048
|
loading="lazy"
|
|
3049
|
-
/>`}updateSnippet(){const e=this.textSnippet;if(!this.query||!this.page.text)return this.textSnippet=null,void this.requestUpdate("textSnippet",e);let t=this.page.text,i=this.query,o=t.indexOf(this.query);if(o<0){const n=t.toLowerCase(),r=i.toLowerCase();if(o=n.indexOf(r),o<0)return this.textSnippet=null,void this.requestUpdate("textSnippet",e);t=n,i=r}let n=o;o=Math.max(o-100,0),n=Math.min(n+200,t.length),0===o&&n===t.length?this.textSnippet=t:this.textSnippet="..."+t.slice(o,n)+"...",this.requestUpdate("textSnippet",e)}onReplay(e,t=!1){e.preventDefault();const i={url:this.page.url,ts:this.page.timestamp,waczhash:this.page.waczhash};return this.sendChangeEvent(i,t),!1}onReload(e){return this.onReplay(e,!0)}sendChangeEvent(e,t){this.dispatchEvent(new CustomEvent("coll-tab-nav",{bubbles:!0,composed:!0,detail:{data:e,reload:t}}))}onSendDeletePage(){const e=this.page;this.dispatchEvent(new CustomEvent("delete-page",{detail:{page:e}}))}onSendSelToggle(e){const t=this.page.id,i=e.currentTarget.checked;this.dispatchEvent(new CustomEvent("sel-page",{detail:{page:t,selected:i}}))}}t([ye({type:String})],
|
|
3049
|
+
/>`}updateSnippet(){const e=this.textSnippet;if(!this.query||!this.page.text)return this.textSnippet=null,void this.requestUpdate("textSnippet",e);let t=this.page.text,i=this.query,o=t.indexOf(this.query);if(o<0){const n=t.toLowerCase(),r=i.toLowerCase();if(o=n.indexOf(r),o<0)return this.textSnippet=null,void this.requestUpdate("textSnippet",e);t=n,i=r}let n=o;o=Math.max(o-100,0),n=Math.min(n+200,t.length),0===o&&n===t.length?this.textSnippet=t:this.textSnippet="..."+t.slice(o,n)+"...",this.requestUpdate("textSnippet",e)}onReplay(e,t=!1){e.preventDefault();const i={url:this.page.url,ts:this.page.timestamp,waczhash:this.page.waczhash};return this.sendChangeEvent(i,t),!1}onReload(e){return this.onReplay(e,!0)}sendChangeEvent(e,t){this.dispatchEvent(new CustomEvent("coll-tab-nav",{bubbles:!0,composed:!0,detail:{data:e,reload:t}}))}onSendDeletePage(){const e=this.page;this.dispatchEvent(new CustomEvent("delete-page",{detail:{page:e}}))}onSendSelToggle(e){const t=this.page.id,i=e.currentTarget.checked;this.dispatchEvent(new CustomEvent("sel-page",{detail:{page:t,selected:i}}))}}t([ye({type:String})],Ao.prototype,"query",void 0),t([ye({type:String})],Ao.prototype,"textSnippet",void 0),t([ye({type:Object})],Ao.prototype,"page",void 0),t([ye({type:String})],Ao.prototype,"replayPrefix",void 0),t([ye({type:Boolean})],Ao.prototype,"deleting",void 0),t([ye({type:Boolean})],Ao.prototype,"selected",void 0),t([ye({type:Boolean})],Ao.prototype,"editable",void 0),t([ye({type:Number})],Ao.prototype,"index",void 0),t([ye({type:Boolean})],Ao.prototype,"isCurrent",void 0),t([ye({type:Boolean})],Ao.prototype,"isSidebar",void 0),t([xe()],Ao.prototype,"thumbnailValid",void 0),t([xe()],Ao.prototype,"iconValid",void 0),customElements.define("wr-page-entry",Ao);class To extends me{constructor(){super(...arguments),this.collInfo=null,this.sourceUrl=null,this.url="",this.ts="",this.waczhash="",this.replayUrl="",this.replayTS="",this.actualTS="",this.title="",this.iframeUrl=null,this.showAuth=!1,this.replayNotFoundError=!1,this.authFileHandle=null,this.reauthWait=null,this._loadPoll=null}firstUpdated(){window.addEventListener("message",(e=>this.onReplayMessage(e))),navigator.serviceWorker.addEventListener("message",(e=>this.handleSWMessage(e)))}handleSWMessage(e){return i(this,void 0,void 0,(function*(){if("authneeded"===e.data.type&&this.collInfo&&e.data.coll===this.collInfo.coll){if(e.data.fileHandle){this.authFileHandle=e.data.fileHandle;try{if("granted"===(yield this.authFileHandle.requestPermission({mode:"read"})))return this.showAuth=!1,this.reauthWait=null,void this.refresh()}catch(e){console.warn(e)}}else this.authFileHandle=null;this.reauthWait?yield this.reauthWait:this.showAuth=!0}else e.data.type&&window.parent.postMessage(e.data)}))}doSetIframeUrl(){this.iframeUrl=this.url&&this.collInfo?`${this.collInfo.replayPrefix}/${this.waczhash?`:${this.waczhash}/`:""}${this.ts||""}mp_/${this.url}`:""}updated(e){if((e.has("sourceUrl")||e.has("collInfo"))&&(this.reauthWait=null),!this.url||this.replayUrl==this.url&&this.replayTS==this.ts||!e.has("url")&&!e.has("ts")||(this.replayUrl=this.url,this.replayTS=this.ts,this.showAuth=!1,this.reauthWait=null,this.doSetIframeUrl()),this.iframeUrl&&e.has("iframeUrl")){this.waitForLoad();const e={title:"Archived Page",replayTitle:!1};this.dispatchEvent(new CustomEvent("update-title",{bubbles:!0,composed:!0,detail:e}))}if(this.replayUrl&&e.has("replayUrl")||this.replayTS&&e.has("replayTS")){const e={url:this.replayUrl,ts:this.replayTS};this.dispatchEvent(new CustomEvent("coll-tab-nav",{detail:{replaceLoc:!0,data:e,replayNotFoundError:this.replayNotFoundError}}))}if(this.title&&(e.has("title")||e.has("actualTS"))){const e={title:this.title,url:this.replayUrl,ts:this.actualTS,replayTitle:!0};this.dispatchEvent(new CustomEvent("update-title",{bubbles:!0,composed:!0,detail:e}))}}setDisablePointer(e){const t=this.renderRoot.querySelector("iframe");t&&(t.style.pointerEvents=e?"none":"all")}onReplayMessage(e){const t=this.renderRoot.querySelector("iframe");if(t&&e.source===t.contentWindow)if("load"===e.data.wb_type||"replace-url"===e.data.wb_type||"archive-not-found"===e.data.wb_type){if(this.replayTS=e.data.is_live?"":e.data.ts,this.actualTS=e.data.ts,this.replayUrl=e.data.url,this.title=e.data.title||this.title,this.replayNotFoundError="archive-not-found"===e.data.wb_type,this.clearLoading(t.contentWindow),e.data.icons){const t=e.data.icons;this.dispatchEvent(new CustomEvent("replay-favicons",{bubbles:!0,composed:!0,detail:{icons:t}}))}}else if("title"===e.data.wb_type)this.title=e.data.title;else{const t=Object.assign({type:e.data.wb_type},e.data);delete t.wb_type,window.parent.postMessage(t)}}onReAuthed(e){this.reauthWait=(()=>i(this,void 0,void 0,(function*(){if(this.authFileHandle){if("granted"!==(yield this.authFileHandle.requestPermission({mode:"read"})))return void(this.reauthWait=null);this.authFileHandle=null}else{const t=e.detail.headers;yield fetch(`${this.collInfo.apiPrefix}/updateAuth`,{method:"POST",body:JSON.stringify({headers:t})})}this.showAuth&&(this.showAuth=!1,this.reauthWait=null),this.refresh()})))()}waitForLoad(){this.setLoading(),this._loadPoll=window.setInterval((()=>{const e=this.renderRoot.querySelector("iframe");(null==e?void 0:e.contentDocument)&&e.contentWindow&&("complete"!==e.contentDocument.readyState||e.contentWindow._WBWombat)||this.clearLoading(null==e?void 0:e.contentWindow)}),5e3)}clearLoading(e){if(this.dispatchEvent(new CustomEvent("replay-loading",{detail:{loading:!1}})),this._loadPoll&&(window.clearInterval(this._loadPoll),this._loadPoll=null),e)try{e.addEventListener("beforeunload",(()=>{this.setLoading()}))}catch(e){}}setLoading(){this.dispatchEvent(new CustomEvent("replay-loading",{detail:{loading:!0}}))}refresh(){var e;const t=this.renderRoot.querySelector("iframe");if(!t)return;const i=this.iframeUrl;this.doSetIframeUrl(),i!==this.iframeUrl&&this.url!==this.replayUrl||(this.waitForLoad(),null===(e=t.contentWindow)||void 0===e||e.location.reload())}static get styles(){return Ne(h`
|
|
3050
3050
|
:host {
|
|
3051
3051
|
display: flex;
|
|
3052
3052
|
flex-direction: column;
|
|
@@ -3160,7 +3160,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
3160
3160
|
this archive.)
|
|
3161
3161
|
</p>
|
|
3162
3162
|
</div>
|
|
3163
|
-
</div>`}`}}t([ye({type:Object})],
|
|
3163
|
+
</div>`}`}}t([ye({type:Object})],To.prototype,"collInfo",void 0),t([ye({type:String})],To.prototype,"sourceUrl",void 0),t([ye({type:String})],To.prototype,"url",void 0),t([ye({type:String})],To.prototype,"ts",void 0),t([ye({type:String})],To.prototype,"waczhash",void 0),t([ye({type:String})],To.prototype,"replayUrl",void 0),t([ye({type:String})],To.prototype,"replayTS",void 0),t([ye({type:String})],To.prototype,"actualTS",void 0),t([ye({type:String})],To.prototype,"title",void 0),t([ye({type:String})],To.prototype,"iframeUrl",void 0),t([ye({type:Boolean})],To.prototype,"showAuth",void 0),t([ye({type:Boolean})],To.prototype,"replayNotFoundError",void 0),t([ye({type:Object})],To.prototype,"authFileHandle",void 0),customElements.define("wr-coll-replay",To);let Po=class extends me{constructor(){super(...arguments),this.sortedData=[],this.data=[],this.pageResults=0,this.numResults=0,this.sortKey=null,this.sortDesc=null}firstUpdated(){if(this.id){const e=localStorage.getItem(`${this.id}:sortKey`);null!==e&&(this.sortKey=e);const t=localStorage.getItem(`${this.id}:sortDesc`);null!==t&&(this.sortDesc="1"===t)}}updated(e){const t=e.has("sortKey"),i=e.has("sortDesc"),o=e.has("data");t&&null!==this.sortKey&&localStorage.setItem(`${this.id}:sortKey`,this.sortKey),i&&null!==this.sortDesc&&localStorage.setItem(`${this.id}:sortDesc`,this.sortDesc?"1":"0"),(t||i||o)&&this.sortData()}sortData(){this.sortedData=[...this.data],this.numResults=this.pageResults,""===this.sortKey?this.sortDesc&&this.sortedData.reverse():this.sortedData.sort(((e,t)=>e[this.sortKey]===t[this.sortKey]?0:this.sortDesc==e[this.sortKey]<t[this.sortKey]?1:-1)),this.sendSortChanged()}sendSortChanged(){const e={sortKey:this.sortKey,sortDesc:this.sortDesc,sortedData:this.numResults?this.sortedData.slice(0,this.numResults):this.sortedData};this.dispatchEvent(new CustomEvent("sort-changed",{detail:e}))}getMore(e=100){this.pageResults&&this.numResults>=this.sortedData.length||(this.numResults+=e,this.sendSortChanged())}static get styles(){return Ne(h`
|
|
3164
3164
|
:host {
|
|
3165
3165
|
min-width: 100px;
|
|
3166
3166
|
box-sizing: border-box !important;
|
|
@@ -3183,7 +3183,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
3183
3183
|
<span>Order:</span>
|
|
3184
3184
|
<span class="is-sr-only">${this.sortDesc?"Ascending":"Descending"}</span>
|
|
3185
3185
|
<span class="icon"><fa-icon aria-hidden="true" .svg=${this.sortDesc?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">\x3c!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --\x3e<path d="M279 224H41c-21.4 0-32.1-25.9-17-41L143 64c9.4-9.4 24.6-9.4 33.9 0l119 119c15.2 15.1 4.5 41-16.9 41z"/></svg>':'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">\x3c!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --\x3e<path d="M41 288h238c21.4 0 32.1 25.9 17 41L177 448c-9.4 9.4-24.6 9.4-33.9 0L24 329c-15.1-15.1-4.4-41 17-41z"/></svg>'}></span>
|
|
3186
|
-
</button>`}};t([ye({attribute:!1})],
|
|
3186
|
+
</button>`}};t([ye({attribute:!1})],Po.prototype,"sortedData",void 0),t([ye({attribute:!1})],Po.prototype,"data",void 0),t([ye({type:String})],Po.prototype,"id",void 0),t([ye({type:Number})],Po.prototype,"pageResults",void 0),t([ye({attribute:!1})],Po.prototype,"numResults",void 0),t([ye({type:String})],Po.prototype,"sortKey",void 0),t([ye({type:Boolean})],Po.prototype,"sortDesc",void 0),t([ye({attribute:!1})],Po.prototype,"sortKeys",void 0),Po=t([ge("wr-sorter")],Po);class Do extends me{static get filters(){return[{name:"HTML",filter:"text/html,text/xhtml"},{name:"Images",filter:"image/"},{name:"Audio/Video",filter:"audio/,video/"},{name:"PDF",filter:"application/pdf"},{name:"Javascript",filter:"application/javascript,application/x-javascript"},{name:"CSS",filter:"text/css"},{name:"Fonts",filter:"font/,application/font-woff"},{name:"Plain Text",filter:"text/plain"},{name:"JSON",filter:"application/json"},{name:"DASH/HLS",filter:"application/dash+xml,application/x-mpegURL,application/vnd.apple.mpegurl"},{name:"All URLs",filter:""}]}static get sortKeys(){return[{key:"url",name:"URL"},{key:"ts",name:"Date"},{key:"mime",name:"Media Type"},{key:"status",name:"Status"}]}constructor(){super(),this.collInfo=null,this.isSidebar=!1,this.currMime="",this.query="",this.urlSearchType="",this.filteredResults=[],this.sortedResults=[],this.results=[],this.newQuery=null,this.tryMore=!1,this.loading=!1,this.sortKey="url",this.sortDesc=!1}static get properties(){return{collInfo:{type:Object},isSidebar:{type:Boolean},currMime:{type:String},query:{type:String},urlSearchType:{type:String},filteredResults:{type:Array},sortedResults:{type:Array},loading:{type:Boolean},sortKey:{type:String},sortDesc:{type:Boolean}}}firstUpdated(){""===this.urlSearchType&&(this.urlSearchType="prefix")}_timedUpdate(){null!==this.newQuery&&(this.query=this.newQuery,this.newQuery=null)}updated(e){if(e.has("query")||e.has("urlSearchType")||e.has("currMime")){this.doLoadResources();const t={query:this.query,urlSearchType:this.urlSearchType,currMime:this.currMime},i=!e.has("currMime")&&!e.has("urlSearchType");this.dispatchEvent(new CustomEvent("coll-tab-nav",{detail:{replaceLoc:i,data:t}}))}(e.has("sortKey")||e.has("sortDesc"))&&this.filter()}doLoadResources(e=!1){return i(this,void 0,void 0,(function*(){if(e&&(!this.tryMore||!this.results.length))return;if(this.loading)return;this.loading=!0;const t="contains"!==this.urlSearchType?this.query:"",i=t&&"prefix"===this.urlSearchType?1:0,o=this.currMime,n=new URLSearchParams({mime:o,url:t,prefix:String(i),count:String(100)});if(e){const e=this.results[this.results.length-1];n.set("fromMime",e.mime),n.set("fromUrl",e.url),n.set("fromStatus",e.status),n.set("fromTs",String(new Date(e.date).getTime()))}const r=yield fetch(`${this.collInfo.apiPrefix}/urls?${n.toString()}`),s=yield r.json();this.results=e?this.results.concat(s.urls):s.urls,this.tryMore=s.urls.length>=100,this.filter(),this.loading=!1}))}onChangeTypeSearch(e){this.currMime=e.currentTarget.value}onChangeQuery(e){this.newQuery=e.currentTarget.value,this._ival&&window.clearTimeout(this._ival),this._ival=window.setTimeout((()=>this._timedUpdate()),250)}onClickUrlType(e){this.urlSearchType=e.currentTarget.value}filter(){const e=[],t="contains"===this.urlSearchType?this.query:"";for(const i of this.results)(!t||i.url.indexOf(t)>=0)&&e.push(i);this.filteredResults=e}onScroll(e){const t=e.currentTarget,i=t.scrollHeight-t.scrollTop-t.clientHeight;this.tryMore&&i<40&&this.doLoadResources(!0)}static get styles(){return Ne(h`
|
|
3187
3187
|
:host {
|
|
3188
3188
|
width: 100%;
|
|
3189
3189
|
height: 100%;
|
|
@@ -3298,7 +3298,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
3298
3298
|
<span class="is-hidden-mobile">Search: </span>
|
|
3299
3299
|
<div class="select">
|
|
3300
3300
|
<select @change="${this.onChangeTypeSearch}">
|
|
3301
|
-
${
|
|
3301
|
+
${Do.filters.map((e=>Q`
|
|
3302
3302
|
<option
|
|
3303
3303
|
value="${e.filter}"
|
|
3304
3304
|
?selected="${e.filter===this.currMime}"
|
|
@@ -3320,7 +3320,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
3320
3320
|
placeholder="Enter URL to Search"
|
|
3321
3321
|
/>
|
|
3322
3322
|
<span class="icon is-left"
|
|
3323
|
-
><fa-icon .svg="${
|
|
3323
|
+
><fa-icon .svg="${Ii}"></fa-icon
|
|
3324
3324
|
></span>
|
|
3325
3325
|
</div>
|
|
3326
3326
|
</div>
|
|
@@ -3372,7 +3372,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
3372
3372
|
id="urls"
|
|
3373
3373
|
.sortKey="${this.sortKey}"
|
|
3374
3374
|
.sortDesc="${this.sortDesc}"
|
|
3375
|
-
.sortKeys="${
|
|
3375
|
+
.sortKeys="${Do.sortKeys}"
|
|
3376
3376
|
.data="${this.filteredResults}"
|
|
3377
3377
|
@sort-changed="${this.onSortChanged}"
|
|
3378
3378
|
>
|
|
@@ -3447,7 +3447,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
3447
3447
|
@click="${this.onReplay}"
|
|
3448
3448
|
data-url="${e.url}"
|
|
3449
3449
|
data-ts="${e.ts}"
|
|
3450
|
-
href="${
|
|
3450
|
+
href="${kt("resources",e.url,e.ts)}"
|
|
3451
3451
|
>
|
|
3452
3452
|
<keyword-mark keywords="${this.query}"
|
|
3453
3453
|
>${e.url}</keyword-mark
|
|
@@ -3456,7 +3456,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
3456
3456
|
</td>
|
|
3457
3457
|
<td class="column col-ts is-2">
|
|
3458
3458
|
<p class="minihead is-hidden-tablet">Date</p>
|
|
3459
|
-
${
|
|
3459
|
+
${At.format(new Date(e.date))}
|
|
3460
3460
|
</td>
|
|
3461
3461
|
<td class="column col-mime is-3">
|
|
3462
3462
|
<p class="minihead is-hidden-tablet">Media Type</p>
|
|
@@ -3472,7 +3472,7 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
3472
3472
|
</tr>`}
|
|
3473
3473
|
</tbody>
|
|
3474
3474
|
</table>
|
|
3475
|
-
`}onSort(e){e.preventDefault();const t=e.currentTarget.getAttribute("data-key");t===this.sortKey?this.sortDesc=!this.sortDesc:(this.sortDesc=!1,this.sortKey=t)}onSortChanged(e){this.sortedResults=e.detail.sortedData,this.sortKey=e.detail.sortKey,this.sortDesc=e.detail.sortDesc}onReplay(e){e.preventDefault();const t={url:e.currentTarget.getAttribute("data-url"),ts:e.currentTarget.getAttribute("data-ts")};return this.dispatchEvent(new CustomEvent("coll-tab-nav",{detail:{data:t}})),!1}}customElements.define("wr-coll-resources",
|
|
3475
|
+
`}onSort(e){e.preventDefault();const t=e.currentTarget.getAttribute("data-key");t===this.sortKey?this.sortDesc=!this.sortDesc:(this.sortDesc=!1,this.sortKey=t)}onSortChanged(e){this.sortedResults=e.detail.sortedData,this.sortKey=e.detail.sortKey,this.sortDesc=e.detail.sortDesc}onReplay(e){e.preventDefault();const t={url:e.currentTarget.getAttribute("data-url"),ts:e.currentTarget.getAttribute("data-ts")};return this.dispatchEvent(new CustomEvent("coll-tab-nav",{detail:{data:t}})),!1}}customElements.define("wr-coll-resources",Do);const Fo=document.currentScript&&document.currentScript.src;let Mo="";class Ro extends me{constructor(){super(...arguments),this.url="",this.ts="",this.query="",this.view="replay",this.embed=null,this.replaybase="./replay/",this.swName="sw.js",this.coll="",this.config="",this.inited=!1,this.paramString=null,this.deepLink=!1,this.updateFavicons=!1,this.sandbox=!1,this.noSandbox=null,this.noWebWorker=!1,this.noCache=!1,this.useAdblock=!1,this.adblockRulesUrl="./adblock/adblock.gz",this.newWindowBase="",this.loading="",this.useRuffle=!1,this.replayfile=Mo,this.mainElementName="replay-app-main",this.appName="ReplayWeb.page",this.customConfig=null,this.reloadCount=0}static setDefaultReplayFile(e){Mo=e}doRegister(){return i(this,void 0,void 0,(function*(){const e=new URL(this.replaybase,window.location.href);if(this.isCrossOrigin=e.origin!==window.location.origin,this.isCrossOrigin)return void(this.inited=!0);const t=this.swName+"?serveIndex=1",i=this.appName,o=this.replaybase,n=this.requireSubdomainIframe;this.swmanager=new it({name:t,scope:o,requireSubdomainIframe:n,appName:i});try{yield this.swmanager.register(),this.inited=!0}catch(e){this.errorMessage=this.swmanager.renderErrorReport()}}))}fullReload(){var e;return i(this,void 0,void 0,(function*(){if(!(null===(e=this.iframe)||void 0===e?void 0:e.contentWindow))return!1;const t=Oe+"/c/"+this.coll+"?reload=1";return 200===(yield this.iframe.contentWindow.fetch(t,{method:"DELETE"})).status&&(this.iframe.contentWindow.location.reload(),!0)}))}handleMessage(e){if(this.iframe&&e.source===this.iframe.contentWindow)switch(e.data.type){case"urlchange":this.deepLink&&this.handleUrlChangeMessage(e.data),this.dispatchEvent(new CustomEvent("rwp-url-change",{detail:e.data}));break;case"page-loading":this.dispatchEvent(new CustomEvent("rwp-page-loading",{detail:e.data}));break;case"favicons":this.updateFavicons&&We(e.data)}}handleUrlChangeMessage(e){const{url:t,ts:i,view:o,query:n,title:r}=e;r&&(this.title=r);const s={};t&&(s.url=t),i&&(s.ts=i),n&&(s.query=n),o&&!t&&(s.view=o);const a=new URLSearchParams(s),l=new URL(window.location.href);l.hash="#"+a.toString(),window.history.replaceState({},"",l)}firstUpdated(){this.noSandbox&&console.warn("The noSandbox flag is deprecated. ReplayWeb.page does not add a sandbox by default. To enable sandboxing, use 'sandbox' flag instead. This may result in PDFs not loading and pages opening in new windows, but may be more secure in some situations"),this.doRegister(),window.addEventListener("message",(e=>this.handleMessage(e))),this.deepLink&&(this.updateFromHash(),window.addEventListener("hashchange",(()=>this.updateFromHash()))),this.loadBrowserDefaults()}loadBrowserDefaults(){var e;void 0!==window.GestureEvent&&void 0===window.SharedWorker&&(this.noWebWorker=!0),(null===(e=navigator.storage)||void 0===e?void 0:e.estimate)||(this.noCache=!0)}updateFromHash(){const e=new URLSearchParams(window.location.hash.slice(1));e.has("url")&&(this.url=e.get("url")),e.has("ts")&&(this.ts=e.get("ts")),e.has("query")&&(this.query=e.get("query")),e.has("view")&&(this.view=e.get("view"))}mergeConfigs(){if(!this.customConfig)return this.config;if(this.config){const e=Object.assign(Object.assign({},this.customConfig),JSON.parse(this.config));return JSON.stringify(e)}return JSON.stringify(this.customConfig)}updated(e){if(e.has("url")||e.has("ts")||e.has("query")||e.has("view")||e.has("source")||e.has("src")){this.embed=this.embed||"default",this.src&&(this.source=this.src);const e=new URL(this.source,document.baseURI),t=this.mergeConfigs(),i={source:e,customColl:this.coll,config:t,basePageUrl:window.location.href.split("#")[0],baseUrlSourcePrefix:this.newWindowBase,embed:this.embed};this.deepLink||i.baseUrlSourcePrefix||(i.baseUrlSourcePrefix="https://replayweb.page/"),this.noWebWorker&&(i.noWebWorker="1"),this.noCache&&(i.noCache="1"),this.hideOffscreen&&(i.hideOffscreen="1"),"eager"===this.loading&&(i.loading="eager"),"sw.js"!==this.swName&&(i.swName=this.swName),this.useRuffle&&(i.ruffle="1"),this.useAdblock&&this.adblockRulesUrl&&(i.adblockUrl=this.adblockRulesUrl),this.paramString=new URLSearchParams(i).toString();const o={url:this.url,ts:this.ts,query:this.query};this.url||(o.view=this.view),this.hashString=new URLSearchParams(o).toString()}}static get styles(){return Ne(h`
|
|
3476
3476
|
.logo {
|
|
3477
3477
|
margin: 1em;
|
|
3478
3478
|
flex-grow: 1;
|
|
@@ -3507,13 +3507,13 @@ function*(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}(e.resour
|
|
|
3507
3507
|
></iframe>
|
|
3508
3508
|
`:Q``}
|
|
3509
3509
|
${this.errorMessage}
|
|
3510
|
-
`}onLoad(e){if(this.isCrossOrigin)return;const t=e.target.contentWindow,i=e.target.contentDocument;if(t.navigator.serviceWorker&&!t.navigator.serviceWorker.controller&&this.reloadCount<=2)return this.reloadCount++,void setTimeout((()=>t.location.reload()),100);if(this.reloadCount=0,t.customElements.get(this.mainElementName))return;const o=i.createElement("script");o.src=
|
|
3510
|
+
`}onLoad(e){if(this.isCrossOrigin)return;const t=e.target.contentWindow,i=e.target.contentDocument;if(t.navigator.serviceWorker&&!t.navigator.serviceWorker.controller&&this.reloadCount<=2)return this.reloadCount++,void setTimeout((()=>t.location.reload()),100);if(this.reloadCount=0,t.customElements.get(this.mainElementName))return;const o=i.createElement("script");o.src=Fo,i.head.appendChild(o)}}t([ye({type:String})],Ro.prototype,"url",void 0),t([ye({type:String})],Ro.prototype,"ts",void 0),t([ye({type:String})],Ro.prototype,"query",void 0),t([ye({type:String})],Ro.prototype,"source",void 0),t([ye({type:String})],Ro.prototype,"src",void 0),t([ye({type:String})],Ro.prototype,"view",void 0),t([ye({type:String})],Ro.prototype,"embed",void 0),t([ye({type:String})],Ro.prototype,"replaybase",void 0),t([ye({type:String})],Ro.prototype,"swName",void 0),t([ye({type:String})],Ro.prototype,"title",void 0),t([ye({type:String})],Ro.prototype,"coll",void 0),t([ye({type:String})],Ro.prototype,"config",void 0),t([ye({type:Boolean})],Ro.prototype,"inited",void 0),t([ye({type:String})],Ro.prototype,"paramString",void 0),t([ye({type:String})],Ro.prototype,"hashString",void 0),t([ye({type:Boolean})],Ro.prototype,"deepLink",void 0),t([ye({type:Boolean})],Ro.prototype,"updateFavicons",void 0),t([ye({type:Boolean})],Ro.prototype,"sandbox",void 0),t([ye({type:Boolean})],Ro.prototype,"noSandbox",void 0),t([ye({type:Boolean})],Ro.prototype,"noWebWorker",void 0),t([ye({type:Boolean})],Ro.prototype,"noCache",void 0),t([ye({type:Boolean})],Ro.prototype,"hideOffscreen",void 0),t([ye({type:Boolean})],Ro.prototype,"useAdblock",void 0),t([ye({type:String})],Ro.prototype,"adblockRulesUrl",void 0),t([ye({type:String})],Ro.prototype,"newWindowBase",void 0),t([ye({type:String})],Ro.prototype,"errorMessage",void 0),t([ye({type:Boolean})],Ro.prototype,"requireSubdomainIframe",void 0),t([ye({type:String})],Ro.prototype,"loading",void 0),t([ye({type:Boolean})],Ro.prototype,"useRuffle",void 0),t([Se("iframe")],Ro.prototype,"iframe",void 0),function(){i(this,void 0,void 0,(function*(){customElements.define("replay-web-page",Ro)}))}();
|
|
3511
3511
|
/**
|
|
3512
3512
|
* @license
|
|
3513
3513
|
* Copyright 2020 Google LLC
|
|
3514
3514
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3515
3515
|
*/
|
|
3516
|
-
const To=Symbol.for(""),Po=e=>{if(e?.r===To)return e?._$litStatic$},Do=(e,...t)=>({_$litStatic$:t.reduce(((t,i,o)=>t+(e=>{if(void 0!==e._$litStatic$)return e._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${e}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(i)+e[o+1]),e[0]),r:To}),Fo=new Map,Mo=e=>(t,...i)=>{const o=i.length;let n,r;const s=[],a=[];let l,c=0,d=!1;for(;c<o;){for(l=t[c];c<o&&void 0!==(r=i[c],n=Po(r));)l+=n+t[++c],d=!0;c!==o&&a.push(r),s.push(l),c++}if(c===o&&s.push(t[o]),d){const e=s.join("$$lit$$");void 0===(t=Fo.get(e))&&(s.raw=s,Fo.set(e,t=s)),i=a}return e(t,...i)},Ro=Mo(Q),Oo=(Mo(Z),document.createElement("i"));function Uo(e){const t="&"+e+";";Oo.innerHTML=t;const i=Oo.textContent;return(59!==i.charCodeAt(i.length-1)||"semi"===e)&&(i!==t&&i)}function Bo(e,t,i,o){const n=e.length;let r,s=0;if(t=t<0?-t>n?0:n+t:t>n?n:t,i=i>0?i:0,o.length<1e4)r=Array.from(o),r.unshift(t,i),e.splice(...r);else for(i&&e.splice(t,i);s<o.length;)r=o.slice(s,s+1e4),r.unshift(t,0),e.splice(...r),s+=1e4,t+=1e4}function No(e,t){return e.length>0?(Bo(e,e.length,0,t),e):t}const qo={}.hasOwnProperty;function jo(e,t){let i;for(i in t){const o=(qo.call(e,i)?e[i]:void 0)||(e[i]={}),n=t[i];let r;if(n)for(r in n){qo.call(o,r)||(o[r]=[]);const e=n[r];Ho(o[r],Array.isArray(e)?e:e?[e]:[])}}}function Ho(e,t){let i=-1;const o=[];for(;++i<t.length;)("after"===t[i].add?e:o).push(t[i]);Bo(e,0,0,o)}function Wo(e,t){let i;for(i in t){const o=(qo.call(e,i)?e[i]:void 0)||(e[i]={}),n=t[i];let r;if(n)for(r in n)o[r]=n[r]}}const Vo={'"':"quot","&":"amp","<":"lt",">":"gt"};function Go(e){return e.replace(/["&<>]/g,(function(e){return"&"+Vo[e]+";"}))}function Ko(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Yo=ln(/[A-Za-z]/),Qo=ln(/[\dA-Za-z]/),Zo=ln(/[#-'*+\--9=?A-Z^-~]/);function Jo(e){return null!==e&&(e<32||127===e)}const Xo=ln(/\d/),en=ln(/[\dA-Fa-f]/),tn=ln(/[!-/:-@[-`{-~]/);function on(e){return null!==e&&e<-2}function nn(e){return null!==e&&(e<0||32===e)}function rn(e){return-2===e||-1===e||32===e}const sn=ln(/\p{P}|\p{S}/u),an=ln(/\s/);function ln(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function cn(e,t){const i=Go(function(e){const t=[];let i=-1,o=0,n=0;for(;++i<e.length;){const r=e.charCodeAt(i);let s="";if(37===r&&Qo(e.charCodeAt(i+1))&&Qo(e.charCodeAt(i+2)))n=2;else if(r<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(r))||(s=String.fromCharCode(r));else if(r>55295&&r<57344){const t=e.charCodeAt(i+1);r<56320&&t>56319&&t<57344?(s=String.fromCharCode(r,t),n=1):s="�"}else s=String.fromCharCode(r);s&&(t.push(e.slice(o,i),encodeURIComponent(s)),o=i+n+1,s=""),n&&(i+=n,n=0)}return t.join("")+e.slice(o)}(e||""));if(!t)return i;const o=i.indexOf(":"),n=i.indexOf("?"),r=i.indexOf("#"),s=i.indexOf("/");return o<0||s>-1&&o>s||n>-1&&o>n||r>-1&&o>r||t.test(i.slice(0,o))?i:""}const dn={}.hasOwnProperty,hn=/^(https?|ircs?|mailto|xmpp)$/i,un=/^https?$/i;function fn(e){const t=e||{};let i=!0;const o={},n=[[]],r=[],s=[],a=function(e){const t={};let i=-1;for(;++i<e.length;)Wo(t,e[i]);return t}([{enter:{blockQuote:function(){s.push(!1),w(),b("<blockquote>")},codeFenced:function(){w(),b("<pre><code"),u("fencesCount",0)},codeFencedFenceInfo:p,codeFencedFenceMeta:p,codeIndented:function(){w(),b("<pre><code>")},codeText:function(){u("inCodeText",!0),b("<code>")},content:function(){u("slurpAllLineEndings",!0)},definition:function(){p(),r.push({})},definitionDestinationString:function(){p(),u("ignoreEncode",!0)},definitionLabelString:p,definitionTitleString:p,emphasis:function(){b("<em>")},htmlFlow:function(){w(),I()},htmlText:I,image:function(){r.push({image:!0}),i=void 0},label:p,link:function(){r.push({})},listItemMarker:function(){f("expectFirstItem")?b(">"):k();w(),b("<li>"),u("expectFirstItem"),u("lastWasTag")},listItemValue:function(e){if(f("expectFirstItem")){const t=Number.parseInt(this.sliceSerialize(e),10);1!==t&&b(' start="'+y(String(t))+'"')}},listOrdered:function(e){s.push(!e._loose),w(),b("<ol"),u("expectFirstItem",!0)},listUnordered:function(e){s.push(!e._loose),w(),b("<ul"),u("expectFirstItem",!0)},paragraph:function(){s[s.length-1]||(w(),b("<p>"));u("slurpAllLineEndings")},reference:p,resource:function(){p(),r[r.length-1].destination=""},resourceDestinationString:function(){p(),u("ignoreEncode",!0)},resourceTitleString:p,setextHeading:function(){p(),u("slurpAllLineEndings")},strong:function(){b("<strong>")}},exit:{atxHeading:function(){b("</h"+f("headingRank")+">"),u("headingRank")},atxHeadingSequence:function(e){if(f("headingRank"))return;u("headingRank",this.sliceSerialize(e).length),w(),b("<h"+f("headingRank")+">")},autolinkEmail:function(e){const t=this.sliceSerialize(e);b('<a href="'+cn("mailto:"+t)+'">'),g(y(t)),b("</a>")},autolinkProtocol:function(e){const i=this.sliceSerialize(e);b('<a href="'+cn(i,t.allowDangerousProtocol?void 0:hn)+'">'),g(y(i)),b("</a>")},blockQuote:function(){s.pop(),w(),b("</blockquote>"),u("slurpAllLineEndings")},characterEscapeValue:z,characterReferenceMarkerHexadecimal:L,characterReferenceMarkerNumeric:L,characterReferenceValue:function(e){const t=this.sliceSerialize(e);g(y(f("characterReferenceType")?function(e,t){const i=Number.parseInt(e,t);return i<9||11===i||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||!(65535&~i)||65534==(65535&i)||i>1114111?"�":String.fromCodePoint(i)}(t,"characterReferenceMarkerNumeric"===f("characterReferenceType")?10:16):Uo(t))),u("characterReferenceType")},codeFenced:S,codeFencedFence:function(){const e=f("fencesCount")||0;e||(b(">"),u("slurpOneLineEnding",!0));u("fencesCount",e+1)},codeFencedFenceInfo:function(){b(' class="language-'+m()+'"')},codeFencedFenceMeta:x,codeFlowValue:function(e){g(y(this.sliceSerialize(e))),u("flowCodeSeenData",!0)},codeIndented:S,codeText:function(){u("inCodeText"),b("</code>")},codeTextData:z,data:z,definition:function(){const e=Ko(r[r.length-1].labelId);m(),dn.call(o,e)||(o[e]=r[r.length-1]);r.pop()},definitionDestinationString:function(){r[r.length-1].destination=m(),u("ignoreEncode")},definitionLabelString:function(e){m(),r[r.length-1].labelId=this.sliceSerialize(e)},definitionTitleString:function(){r[r.length-1].title=m()},emphasis:function(){b("</em>")},hardBreakEscape:_,hardBreakTrailing:_,htmlFlow:C,htmlFlowData:z,htmlText:C,htmlTextData:z,image:$,label:function(){r[r.length-1].label=m()},labelText:function(e){r[r.length-1].labelId=this.sliceSerialize(e)},lineEnding:function(e){if(f("slurpAllLineEndings"))return;if(f("slurpOneLineEnding"))return void u("slurpOneLineEnding");if(f("inCodeText"))return void g(" ");g(y(this.sliceSerialize(e)))},link:$,listOrdered:function(){k(),s.pop(),v(),b("</ol>")},listUnordered:function(){k(),s.pop(),v(),b("</ul>")},paragraph:function(){s[s.length-1]?u("slurpAllLineEndings",!0):b("</p>")},reference:x,referenceString:function(e){r[r.length-1].referenceId=this.sliceSerialize(e)},resource:x,resourceDestinationString:function(){r[r.length-1].destination=m(),u("ignoreEncode")},resourceTitleString:function(){r[r.length-1].title=m()},setextHeading:function(){const e=m();w(),b("<h"+f("headingRank")+">"),g(e),b("</h"+f("headingRank")+">"),u("slurpAllLineEndings"),u("headingRank")},setextHeadingLineSequence:function(e){u("headingRank",61===this.sliceSerialize(e).charCodeAt(0)?1:2)},setextHeadingText:function(){u("slurpAllLineEndings",!0)},strong:function(){b("</strong>")},thematicBreak:function(){w(),b("<hr />")}}},...t.htmlExtensions||[]]),l={definitions:o,tightStack:s},c={buffer:p,encode:y,getData:f,lineEndingIfNeeded:w,options:t,raw:g,resume:m,setData:u,tag:b};let d=t.defaultLineEnding;return function(e){let t=-1,i=0;const o=[];let r=[],s=[];for(;++t<e.length;)d||"lineEnding"!==e[t][1].type&&"lineEndingBlank"!==e[t][1].type||(d=e[t][2].sliceSerialize(e[t][1])),"listOrdered"!==e[t][1].type&&"listUnordered"!==e[t][1].type||("enter"===e[t][0]?o.push(t):h(e.slice(o.pop(),t))),"definition"===e[t][1].type&&("enter"===e[t][0]?(s=No(s,e.slice(i,t)),i=t):(r=No(r,e.slice(i,t+1)),i=t+1));r=No(r,s),r=No(r,e.slice(i)),t=-1;const l=r;a.enter.null&&a.enter.null.call(c);for(;++t<e.length;){const e=a[l[t][0]],i=l[t][1].type,o=e[i];dn.call(e,i)&&o&&o.call({sliceSerialize:l[t][2].sliceSerialize,...c},l[t][1])}a.exit.null&&a.exit.null.call(c);return n[0].join("")};function h(e){const t=e.length;let i,o=0,n=0,r=!1;for(;++o<t;){const t=e[o];if(t[1]._container)i=void 0,"enter"===t[0]?n++:n--;else switch(t[1].type){case"listItemPrefix":"exit"===t[0]&&(i=!0);break;case"linePrefix":break;case"lineEndingBlank":"enter"!==t[0]||n||(i?i=void 0:r=!0);break;default:i=void 0}}e[0][1]._loose=r}function u(e,t){l[e]=t}function f(e){return l[e]}function p(){n.push([])}function m(){return n.pop().join("")}function b(e){i&&(u("lastWasTag",!0),n[n.length-1].push(e))}function g(e){u("lastWasTag"),n[n.length-1].push(e)}function v(){g(d||"\n")}function w(){const e=n[n.length-1],t=e[e.length-1],i=t?t.charCodeAt(t.length-1):null;10!==i&&13!==i&&null!==i&&v()}function y(e){return f("ignoreEncode")?e:Go(e)}function x(){m()}function k(){f("lastWasTag")&&!f("slurpAllLineEndings")&&w(),b("</li>"),u("slurpAllLineEndings")}function S(){const e=f("fencesCount");void 0!==e&&e<2&&l.tightStack.length>0&&!f("lastWasTag")&&v(),f("flowCodeSeenData")&&w(),b("</code></pre>"),void 0!==e&&e<2&&w(),u("flowCodeSeenData"),u("fencesCount"),u("slurpOneLineEnding")}function $(){let e=r.length-1;const n=r[e],s=n.referenceId||n.labelId,a=void 0===n.destination?o[Ko(s)]:n;for(i=!0;e--;)if(r[e].image){i=void 0;break}n.image?(b('<img src="'+cn(a.destination,t.allowDangerousProtocol?void 0:un)+'" alt="'),g(n.label),b('"')):b('<a href="'+cn(a.destination,t.allowDangerousProtocol?void 0:hn)+'"'),b(a.title?' title="'+a.title+'"':""),n.image?b(" />"):(b(">"),g(n.label),b("</a>")),r.pop()}function z(e){g(y(this.sliceSerialize(e)))}function _(){b("<br />")}function C(){u("ignoreEncode")}function I(){t.allowDangerousHtml&&u("ignoreEncode",!0)}function L(e){u("characterReferenceType",e.type)}}function pn(e,t,i,o){const n=o?o-1:Number.POSITIVE_INFINITY;let r=0;return function(o){if(rn(o))return e.enter(i),s(o);return t(o)};function s(o){return rn(o)&&r++<n?(e.consume(o),s):(e.exit(i),t(o))}}const mn={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,(function(i){if(null===i)return void e.consume(i);return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),pn(e,t,"linePrefix")}),(function(t){return e.enter("paragraph"),o(t)}));let i;return t;function o(t){const o=e.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=o),i=o,n(t)}function n(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):on(t)?(e.consume(t),e.exit("chunkText"),o):(e.consume(t),n)}}};const bn={tokenize:function(e){const t=this,i=[];let o,n,r,s=0;return a;function a(o){if(s<i.length){const n=i[s];return t.containerState=n[1],e.attempt(n[0].continuation,l,c)(o)}return c(o)}function l(e){if(s++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&v();const i=t.events.length;let n,r=i;for(;r--;)if("exit"===t.events[r][0]&&"chunkFlow"===t.events[r][1].type){n=t.events[r][1].end;break}g(s);let a=i;for(;a<t.events.length;)t.events[a][1].end={...n},a++;return Bo(t.events,r+1,0,t.events.slice(i)),t.events.length=a,c(e)}return a(e)}function c(n){if(s===i.length){if(!o)return u(n);if(o.currentConstruct&&o.currentConstruct.concrete)return p(n);t.interrupt=Boolean(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(gn,d,h)(n)}function d(e){return o&&v(),g(s),u(e)}function h(e){return t.parser.lazy[t.now().line]=s!==i.length,r=t.now().offset,p(e)}function u(i){return t.containerState={},e.attempt(gn,f,p)(i)}function f(e){return s++,i.push([t.currentConstruct,t.containerState]),u(e)}function p(i){return null===i?(o&&v(),g(0),void e.consume(i)):(o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:n}),m(i))}function m(i){return null===i?(b(e.exit("chunkFlow"),!0),g(0),void e.consume(i)):on(i)?(e.consume(i),b(e.exit("chunkFlow")),s=0,t.interrupt=void 0,a):(e.consume(i),m)}function b(e,i){const a=t.sliceStream(e);if(i&&a.push(null),e.previous=n,n&&(n.next=e),n=e,o.defineSkip(e.start),o.write(a),t.parser.lazy[e.start.line]){let e=o.events.length;for(;e--;)if(o.events[e][1].start.offset<r&&(!o.events[e][1].end||o.events[e][1].end.offset>r))return;const i=t.events.length;let n,a,l=i;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(n){a=t.events[l][1].end;break}n=!0}for(g(s),e=i;e<t.events.length;)t.events[e][1].end={...a},e++;Bo(t.events,l+1,0,t.events.slice(i)),t.events.length=e}}function g(o){let n=i.length;for(;n-- >o;){const o=i[n];t.containerState=o[1],o[0].exit.call(t,e)}i.length=o}function v(){o.write([null]),n=void 0,o=void 0,t.containerState._closeFlow=void 0}}},gn={tokenize:function(e,t,i){return pn(e,e.attempt(this.parser.constructs.document,t,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};const vn={partial:!0,tokenize:function(e,t,i){return function(t){return rn(t)?pn(e,o,"linePrefix")(t):o(t)};function o(e){return null===e||on(e)?t(e):i(e)}}};class wn{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const i=null==t?Number.POSITIVE_INFINITY:t;return i<this.left.length?this.left.slice(e,i):e>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(e,t,i){const o=t||0;this.setCursor(Math.trunc(e));const n=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return i&&yn(this.left,i),n.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),yn(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),yn(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);yn(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);yn(this.left,t.reverse())}}}function yn(e,t){let i=0;if(t.length<1e4)e.push(...t);else for(;i<t.length;)e.push(...t.slice(i,i+1e4)),i+=1e4}function xn(e){const t={};let i,o,n,r,s,a,l,c=-1;const d=new wn(e);for(;++c<d.length;){for(;c in t;)c=t[c];if(i=d.get(c),c&&"chunkFlow"===i[1].type&&"listItemPrefix"===d.get(c-1)[1].type&&(a=i[1]._tokenizer.events,n=0,n<a.length&&"lineEndingBlank"===a[n][1].type&&(n+=2),n<a.length&&"content"===a[n][1].type))for(;++n<a.length&&"content"!==a[n][1].type;)"chunkText"===a[n][1].type&&(a[n][1]._isInFirstContentOfListItem=!0,n++);if("enter"===i[0])i[1].contentType&&(Object.assign(t,kn(d,c)),c=t[c],l=!0);else if(i[1]._container){for(n=c,o=void 0;n--&&(r=d.get(n),"lineEnding"===r[1].type||"lineEndingBlank"===r[1].type);)"enter"===r[0]&&(o&&(d.get(o)[1].type="lineEndingBlank"),r[1].type="lineEnding",o=n);o&&(i[1].end={...d.get(o)[1].start},s=d.slice(o,c),s.unshift(i),d.splice(o,c-o+1,s))}}return Bo(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!l}function kn(e,t){const i=e.get(t)[1],o=e.get(t)[2];let n=t-1;const r=[],s=i._tokenizer||o.parser[i.contentType](i.start),a=s.events,l=[],c={};let d,h,u=-1,f=i,p=0,m=0;const b=[m];for(;f;){for(;e.get(++n)[1]!==f;);r.push(n),f._tokenizer||(d=o.sliceStream(f),f.next||d.push(null),h&&s.defineSkip(f.start),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(d),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),h=f,f=f.next}for(f=i;++u<a.length;)"exit"===a[u][0]&&"enter"===a[u-1][0]&&a[u][1].type===a[u-1][1].type&&a[u][1].start.line!==a[u][1].end.line&&(m=u+1,b.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(s.events=[],f?(f._tokenizer=void 0,f.previous=void 0):b.pop(),u=b.length;u--;){const t=a.slice(b[u],b[u+1]),i=r.pop();l.push([i,i+t.length-1]),e.splice(i,2,t)}for(l.reverse(),u=-1;++u<l.length;)c[p+l[u][0]]=p+l[u][1],p+=l[u][1]-l[u][0]-1;return c}const Sn={resolve:function(e){return xn(e),e},tokenize:function(e,t){let i;return function(t){return e.enter("content"),i=e.enter("chunkContent",{contentType:"content"}),o(t)};function o(t){return null===t?n(t):on(t)?e.check($n,r,n)(t):(e.consume(t),o)}function n(i){return e.exit("chunkContent"),e.exit("content"),t(i)}function r(t){return e.consume(t),e.exit("chunkContent"),i.next=e.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,o}}},$n={partial:!0,tokenize:function(e,t,i){const o=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),pn(e,n,"linePrefix")};function n(n){if(null===n||on(n))return i(n);const r=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&r&&"linePrefix"===r[1].type&&r[2].sliceSerialize(r[1],!0).length>=4?t(n):e.interrupt(o.parser.constructs.flow,i,t)(n)}}};const zn={tokenize:function(e){const t=this,i=e.attempt(vn,(function(o){if(null===o)return void e.consume(o);return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,i}),e.attempt(this.parser.constructs.flowInitial,o,pn(e,e.attempt(this.parser.constructs.flow,o,e.attempt(Sn,o)),"linePrefix")));return i;function o(o){if(null!==o)return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,i;e.consume(o)}}};const _n={resolveAll:En()},Cn=Ln("string"),In=Ln("text");function Ln(e){return{resolveAll:En("text"===e?An:void 0),tokenize:function(t){const i=this,o=this.parser.constructs[e],n=t.attempt(o,r,s);return r;function r(e){return l(e)?n(e):s(e)}function s(e){if(null!==e)return t.enter("data"),t.consume(e),a;t.consume(e)}function a(e){return l(e)?(t.exit("data"),n(e)):(t.consume(e),a)}function l(e){if(null===e)return!0;const t=o[e];let n=-1;if(t)for(;++n<t.length;){const e=t[n];if(!e.previous||e.previous.call(i,i.previous))return!0}return!1}}}}function En(e){return function(t,i){let o,n=-1;for(;++n<=t.length;)void 0===o?t[n]&&"data"===t[n][1].type&&(o=n,n++):t[n]&&"data"===t[n][1].type||(n!==o+2&&(t[o][1].end=t[n-1][1].end,t.splice(o+2,n-o-2),n=o+2),o=void 0);return e?e(t,i):t}}function An(e,t){let i=0;for(;++i<=e.length;)if((i===e.length||"lineEnding"===e[i][1].type)&&"data"===e[i-1][1].type){const o=e[i-1][1],n=t.sliceStream(o);let r,s=n.length,a=-1,l=0;for(;s--;){const e=n[s];if("string"==typeof e){for(a=e.length;32===e.charCodeAt(a-1);)l++,a--;if(a)break;a=-1}else if(-2===e)r=!0,l++;else if(-1!==e){s++;break}}if(l){const n={type:i===e.length||r||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:o.start._bufferIndex+a,_index:o.start._index+s,line:o.end.line,column:o.end.column-l,offset:o.end.offset-l},end:{...o.end}};o.end={...n.start},o.start.offset===o.end.offset?Object.assign(o,n):(e.splice(i,0,["enter",n,t],["exit",n,t]),i+=2)}i++}return e}const Tn={name:"thematicBreak",tokenize:function(e,t,i){let o,n=0;return function(t){return e.enter("thematicBreak"),function(e){return o=e,r(e)}(t)};function r(r){return r===o?(e.enter("thematicBreakSequence"),s(r)):n>=3&&(null===r||on(r))?(e.exit("thematicBreak"),t(r)):i(r)}function s(t){return t===o?(e.consume(t),n++,s):(e.exit("thematicBreakSequence"),rn(t)?pn(e,r,"whitespace")(t):r(t))}}};const Pn={continuation:{tokenize:function(e,t,i){const o=this;return o.containerState._closeFlow=void 0,e.check(vn,(function(i){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,pn(e,t,"listItemIndent",o.containerState.size+1)(i)}),(function(i){if(o.containerState.furtherBlankLines||!rn(i))return o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,n(i);return o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,e.attempt(Fn,t,n)(i)}));function n(n){return o.containerState._closeFlow=!0,o.interrupt=void 0,pn(e,e.attempt(Pn,t,i),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(n)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,i){const o=this,n=o.events[o.events.length-1];let r=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,s=0;return function(t){const n=o.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===n?!o.containerState.marker||t===o.containerState.marker:Xo(t)){if(o.containerState.type||(o.containerState.type=n,e.enter(n,{_container:!0})),"listUnordered"===n)return e.enter("listItemPrefix"),42===t||45===t?e.check(Tn,i,l)(t):l(t);if(!o.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(t)}return i(t)};function a(t){return Xo(t)&&++s<10?(e.consume(t),a):(!o.interrupt||s<2)&&(o.containerState.marker?t===o.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):i(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||t,e.check(vn,o.interrupt?i:c,e.attempt(Dn,h,d))}function c(e){return o.containerState.initialBlankLine=!0,r++,h(e)}function d(t){return rn(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),h):i(t)}function h(i){return o.containerState.size=r+o.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(i)}}},Dn={partial:!0,tokenize:function(e,t,i){const o=this;return pn(e,(function(e){const n=o.events[o.events.length-1];return!rn(e)&&n&&"listItemPrefixWhitespace"===n[1].type?t(e):i(e)}),"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},Fn={partial:!0,tokenize:function(e,t,i){const o=this;return pn(e,(function(e){const n=o.events[o.events.length-1];return n&&"listItemIndent"===n[1].type&&n[2].sliceSerialize(n[1],!0).length===o.containerState.size?t(e):i(e)}),"listItemIndent",o.containerState.size+1)}};const Mn={continuation:{tokenize:function(e,t,i){const o=this;return function(t){if(rn(t))return pn(e,n,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return n(t)};function n(o){return e.attempt(Mn,t,i)(o)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,i){const o=this;return function(t){if(62===t){const i=o.containerState;return i.open||(e.enter("blockQuote",{_container:!0}),i.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),n}return i(t)};function n(i){return rn(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(i))}}};function Rn(e,t,i,o,n,r,s,a,l){const c=l||Number.POSITIVE_INFINITY;let d=0;return function(t){if(60===t)return e.enter(o),e.enter(n),e.enter(r),e.consume(t),e.exit(r),h;if(null===t||32===t||41===t||Jo(t))return i(t);return e.enter(o),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),p(t)};function h(i){return 62===i?(e.enter(r),e.consume(i),e.exit(r),e.exit(n),e.exit(o),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),u(i))}function u(t){return 62===t?(e.exit("chunkString"),e.exit(a),h(t)):null===t||60===t||on(t)?i(t):(e.consume(t),92===t?f:u)}function f(t){return 60===t||62===t||92===t?(e.consume(t),u):u(t)}function p(n){return d||null!==n&&41!==n&&!nn(n)?d<c&&40===n?(e.consume(n),d++,p):41===n?(e.consume(n),d--,p):null===n||32===n||40===n||Jo(n)?i(n):(e.consume(n),92===n?m:p):(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(o),t(n))}function m(t){return 40===t||41===t||92===t?(e.consume(t),p):p(t)}}function On(e,t,i,o,n,r){const s=this;let a,l=0;return function(t){return e.enter(o),e.enter(n),e.consume(t),e.exit(n),e.enter(r),c};function c(h){return l>999||null===h||91===h||93===h&&!a||94===h&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?i(h):93===h?(e.exit(r),e.enter(n),e.consume(h),e.exit(n),e.exit(o),t):on(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(t){return null===t||91===t||93===t||on(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),a||(a=!rn(t)),92===t?h:d)}function h(t){return 91===t||92===t||93===t?(e.consume(t),l++,d):d(t)}}function Un(e,t,i,o,n,r){let s;return function(t){if(34===t||39===t||40===t)return e.enter(o),e.enter(n),e.consume(t),e.exit(n),s=40===t?41:t,a;return i(t)};function a(i){return i===s?(e.enter(n),e.consume(i),e.exit(n),e.exit(o),t):(e.enter(r),l(i))}function l(t){return t===s?(e.exit(r),a(s)):null===t?i(t):on(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),pn(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===s||null===t||on(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?d:c)}function d(t){return t===s||92===t?(e.consume(t),c):c(t)}}function Bn(e,t){let i;return function o(n){if(on(n))return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),i=!0,o;if(rn(n))return pn(e,o,i?"linePrefix":"lineSuffix")(n);return t(n)}}const Nn={name:"definition",tokenize:function(e,t,i){const o=this;let n;return function(t){return e.enter("definition"),function(t){return On.call(o,e,r,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function r(t){return n=Ko(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),s):i(t)}function s(t){return nn(t)?Bn(e,a)(t):a(t)}function a(t){return Rn(e,l,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(qn,c,c)(t)}function c(t){return rn(t)?pn(e,d,"whitespace")(t):d(t)}function d(r){return null===r||on(r)?(e.exit("definition"),o.parser.defined.push(n),t(r)):i(r)}}},qn={partial:!0,tokenize:function(e,t,i){return function(t){return nn(t)?Bn(e,o)(t):i(t)};function o(t){return Un(e,n,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function n(t){return rn(t)?pn(e,r,"whitespace")(t):r(t)}function r(e){return null===e||on(e)?t(e):i(e)}}};const jn={name:"codeIndented",tokenize:function(e,t,i){const o=this;return function(t){return e.enter("codeIndented"),pn(e,n,"linePrefix",5)(t)};function n(e){const t=o.events[o.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?r(e):i(e)}function r(t){return null===t?a(t):on(t)?e.attempt(Hn,r,a)(t):(e.enter("codeFlowValue"),s(t))}function s(t){return null===t||on(t)?(e.exit("codeFlowValue"),r(t)):(e.consume(t),s)}function a(i){return e.exit("codeIndented"),t(i)}}},Hn={partial:!0,tokenize:function(e,t,i){const o=this;return n;function n(t){return o.parser.lazy[o.now().line]?i(t):on(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),n):pn(e,r,"linePrefix",5)(t)}function r(e){const r=o.events[o.events.length-1];return r&&"linePrefix"===r[1].type&&r[2].sliceSerialize(r[1],!0).length>=4?t(e):on(e)?n(e):i(e)}}};const Wn={name:"headingAtx",resolve:function(e,t){let i,o,n=e.length-2,r=3;"whitespace"===e[r][1].type&&(r+=2);n-2>r&&"whitespace"===e[n][1].type&&(n-=2);"atxHeadingSequence"===e[n][1].type&&(r===n-1||n-4>r&&"whitespace"===e[n-2][1].type)&&(n-=r+1===n?2:4);n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Bo(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]]));return e},tokenize:function(e,t,i){let o=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),n(t)}(t)};function n(t){return 35===t&&o++<6?(e.consume(t),n):null===t||nn(t)?(e.exit("atxHeadingSequence"),r(t)):i(t)}function r(i){return 35===i?(e.enter("atxHeadingSequence"),s(i)):null===i||on(i)?(e.exit("atxHeading"),t(i)):rn(i)?pn(e,r,"whitespace")(i):(e.enter("atxHeadingText"),a(i))}function s(t){return 35===t?(e.consume(t),s):(e.exit("atxHeadingSequence"),r(t))}function a(t){return null===t||35===t||nn(t)?(e.exit("atxHeadingText"),r(t)):(e.consume(t),a)}}};const Vn={name:"setextUnderline",resolveTo:function(e,t){let i,o,n,r=e.length;for(;r--;)if("enter"===e[r][0]){if("content"===e[r][1].type){i=r;break}"paragraph"===e[r][1].type&&(o=r)}else"content"===e[r][1].type&&e.splice(r,1),n||"definition"!==e[r][1].type||(n=r);const s={type:"setextHeading",start:{...e[o][1].start},end:{...e[e.length-1][1].end}};e[o][1].type="setextHeadingText",n?(e.splice(o,0,["enter",s,t]),e.splice(n+1,0,["exit",e[i][1],t]),e[i][1].end={...e[n][1].end}):e[i][1]=s;return e.push(["exit",s,t]),e},tokenize:function(e,t,i){const o=this;let n;return function(t){let s,a=o.events.length;for(;a--;)if("lineEnding"!==o.events[a][1].type&&"linePrefix"!==o.events[a][1].type&&"content"!==o.events[a][1].type){s="paragraph"===o.events[a][1].type;break}if(!o.parser.lazy[o.now().line]&&(o.interrupt||s))return e.enter("setextHeadingLine"),n=t,function(t){return e.enter("setextHeadingLineSequence"),r(t)}(t);return i(t)};function r(t){return t===n?(e.consume(t),r):(e.exit("setextHeadingLineSequence"),rn(t)?pn(e,s,"lineSuffix")(t):s(t))}function s(o){return null===o||on(o)?(e.exit("setextHeadingLine"),t(o)):i(o)}}};const Gn=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Kn=["pre","script","style","textarea"],Yn={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},tokenize:function(e,t,i){const o=this;let n,r,s,a,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(a){return 33===a?(e.consume(a),d):47===a?(e.consume(a),r=!0,f):63===a?(e.consume(a),n=3,o.interrupt?t:D):Yo(a)?(e.consume(a),s=String.fromCharCode(a),p):i(a)}function d(r){return 45===r?(e.consume(r),n=2,h):91===r?(e.consume(r),n=5,a=0,u):Yo(r)?(e.consume(r),n=4,o.interrupt?t:D):i(r)}function h(n){return 45===n?(e.consume(n),o.interrupt?t:D):i(n)}function u(n){const r="CDATA[";return n===r.charCodeAt(a++)?(e.consume(n),6===a?o.interrupt?t:_:u):i(n)}function f(t){return Yo(t)?(e.consume(t),s=String.fromCharCode(t),p):i(t)}function p(a){if(null===a||47===a||62===a||nn(a)){const l=47===a,c=s.toLowerCase();return l||r||!Kn.includes(c)?Gn.includes(s.toLowerCase())?(n=6,l?(e.consume(a),m):o.interrupt?t(a):_(a)):(n=7,o.interrupt&&!o.parser.lazy[o.now().line]?i(a):r?b(a):g(a)):(n=1,o.interrupt?t(a):_(a))}return 45===a||Qo(a)?(e.consume(a),s+=String.fromCharCode(a),p):i(a)}function m(n){return 62===n?(e.consume(n),o.interrupt?t:_):i(n)}function b(t){return rn(t)?(e.consume(t),b):$(t)}function g(t){return 47===t?(e.consume(t),$):58===t||95===t||Yo(t)?(e.consume(t),v):rn(t)?(e.consume(t),g):$(t)}function v(t){return 45===t||46===t||58===t||95===t||Qo(t)?(e.consume(t),v):w(t)}function w(t){return 61===t?(e.consume(t),y):rn(t)?(e.consume(t),w):g(t)}function y(t){return null===t||60===t||61===t||62===t||96===t?i(t):34===t||39===t?(e.consume(t),l=t,x):rn(t)?(e.consume(t),y):k(t)}function x(t){return t===l?(e.consume(t),l=null,S):null===t||on(t)?i(t):(e.consume(t),x)}function k(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||nn(t)?w(t):(e.consume(t),k)}function S(e){return 47===e||62===e||rn(e)?g(e):i(e)}function $(t){return 62===t?(e.consume(t),z):i(t)}function z(t){return null===t||on(t)?_(t):rn(t)?(e.consume(t),z):i(t)}function _(t){return 45===t&&2===n?(e.consume(t),E):60===t&&1===n?(e.consume(t),A):62===t&&4===n?(e.consume(t),F):63===t&&3===n?(e.consume(t),D):93===t&&5===n?(e.consume(t),P):!on(t)||6!==n&&7!==n?null===t||on(t)?(e.exit("htmlFlowData"),C(t)):(e.consume(t),_):(e.exit("htmlFlowData"),e.check(Qn,M,C)(t))}function C(t){return e.check(Zn,I,M)(t)}function I(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),L}function L(t){return null===t||on(t)?C(t):(e.enter("htmlFlowData"),_(t))}function E(t){return 45===t?(e.consume(t),D):_(t)}function A(t){return 47===t?(e.consume(t),s="",T):_(t)}function T(t){if(62===t){const i=s.toLowerCase();return Kn.includes(i)?(e.consume(t),F):_(t)}return Yo(t)&&s.length<8?(e.consume(t),s+=String.fromCharCode(t),T):_(t)}function P(t){return 93===t?(e.consume(t),D):_(t)}function D(t){return 62===t?(e.consume(t),F):45===t&&2===n?(e.consume(t),D):_(t)}function F(t){return null===t||on(t)?(e.exit("htmlFlowData"),M(t)):(e.consume(t),F)}function M(i){return e.exit("htmlFlow"),t(i)}}},Qn={partial:!0,tokenize:function(e,t,i){return function(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(vn,t,i)}}},Zn={partial:!0,tokenize:function(e,t,i){const o=this;return function(t){if(on(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),n;return i(t)};function n(e){return o.parser.lazy[o.now().line]?i(e):t(e)}}};const Jn={partial:!0,tokenize:function(e,t,i){const o=this;return function(t){if(null===t)return i(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),n};function n(e){return o.parser.lazy[o.now().line]?i(e):t(e)}}},Xn={concrete:!0,name:"codeFenced",tokenize:function(e,t,i){const o=this,n={partial:!0,tokenize:function(e,t,i){let n=0;return s;function s(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l}function l(t){return e.enter("codeFencedFence"),rn(t)?pn(e,c,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}function c(t){return t===r?(e.enter("codeFencedFenceSequence"),d(t)):i(t)}function d(t){return t===r?(n++,e.consume(t),d):n>=a?(e.exit("codeFencedFenceSequence"),rn(t)?pn(e,h,"whitespace")(t):h(t)):i(t)}function h(o){return null===o||on(o)?(e.exit("codeFencedFence"),t(o)):i(o)}}};let r,s=0,a=0;return function(t){return function(t){const i=o.events[o.events.length-1];return s=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,r=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===r?(a++,e.consume(t),l):a<3?i(t):(e.exit("codeFencedFenceSequence"),rn(t)?pn(e,c,"whitespace")(t):c(t))}function c(i){return null===i||on(i)?(e.exit("codeFencedFence"),o.interrupt?t(i):e.check(Jn,f,v)(i)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(i))}function d(t){return null===t||on(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):rn(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),pn(e,h,"whitespace")(t)):96===t&&t===r?i(t):(e.consume(t),d)}function h(t){return null===t||on(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),u(t))}function u(t){return null===t||on(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===r?i(t):(e.consume(t),u)}function f(t){return e.attempt(n,v,p)(t)}function p(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return s>0&&rn(t)?pn(e,b,"linePrefix",s+1)(t):b(t)}function b(t){return null===t||on(t)?e.check(Jn,f,v)(t):(e.enter("codeFlowValue"),g(t))}function g(t){return null===t||on(t)?(e.exit("codeFlowValue"),b(t)):(e.consume(t),g)}function v(i){return e.exit("codeFenced"),t(i)}}};const er={name:"characterReference",tokenize:function(e,t,i){const o=this;let n,r,s=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),a};function a(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),n=31,r=Qo,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),n=6,r=en,c):(e.enter("characterReferenceValue"),n=7,r=Xo,c(t))}function c(a){if(59===a&&s){const n=e.exit("characterReferenceValue");return r!==Qo||Uo(o.sliceSerialize(n))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):i(a)}return r(a)&&s++<n?(e.consume(a),c):i(a)}}};const tr={name:"characterEscape",tokenize:function(e,t,i){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),o};function o(o){return tn(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):i(o)}}};const ir={name:"lineEnding",tokenize:function(e,t){return function(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),pn(e,t,"linePrefix")}}};function or(e,t,i){const o=[];let n=-1;for(;++n<e.length;){const r=e[n].resolveAll;r&&!o.includes(r)&&(t=r(t,i),o.push(r))}return t}const nr={name:"labelEnd",resolveAll:function(e){let t=-1;const i=[];for(;++t<e.length;){const o=e[t][1];if(i.push(e[t]),"labelImage"===o.type||"labelLink"===o.type||"labelEnd"===o.type){const e="labelImage"===o.type?4:2;o.type="data",t+=e}}e.length!==i.length&&Bo(e,0,e.length,i);return e},resolveTo:function(e,t){let i,o,n,r,s=e.length,a=0;for(;s--;)if(i=e[s][1],o){if("link"===i.type||"labelLink"===i.type&&i._inactive)break;"enter"===e[s][0]&&"labelLink"===i.type&&(i._inactive=!0)}else if(n){if("enter"===e[s][0]&&("labelImage"===i.type||"labelLink"===i.type)&&!i._balanced&&(o=s,"labelLink"!==i.type)){a=2;break}}else"labelEnd"===i.type&&(n=s);const l={type:"labelLink"===e[o][1].type?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[o][1].start},end:{...e[n][1].end}},d={type:"labelText",start:{...e[o+a+2][1].end},end:{...e[n-2][1].start}};return r=[["enter",l,t],["enter",c,t]],r=No(r,e.slice(o+1,o+a+3)),r=No(r,[["enter",d,t]]),r=No(r,or(t.parser.constructs.insideSpan.null,e.slice(o+a+4,n-3),t)),r=No(r,[["exit",d,t],e[n-2],e[n-1],["exit",c,t]]),r=No(r,e.slice(n+1)),r=No(r,[["exit",l,t]]),Bo(e,o,e.length,r),e},tokenize:function(e,t,i){const o=this;let n,r,s=o.events.length;for(;s--;)if(("labelImage"===o.events[s][1].type||"labelLink"===o.events[s][1].type)&&!o.events[s][1]._balanced){n=o.events[s][1];break}return function(t){if(!n)return i(t);if(n._inactive)return d(t);return r=o.parser.defined.includes(Ko(o.sliceSerialize({start:n.end,end:o.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),a};function a(t){return 40===t?e.attempt(rr,c,r?c:d)(t):91===t?e.attempt(sr,c,r?l:d)(t):r?c(t):d(t)}function l(t){return e.attempt(ar,c,d)(t)}function c(e){return t(e)}function d(e){return n._balanced=!0,i(e)}}},rr={tokenize:function(e,t,i){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),o};function o(t){return nn(t)?Bn(e,n)(t):n(t)}function n(t){return 41===t?c(t):Rn(e,r,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function r(t){return nn(t)?Bn(e,a)(t):c(t)}function s(e){return i(e)}function a(t){return 34===t||39===t||40===t?Un(e,l,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return nn(t)?Bn(e,c)(t):c(t)}function c(o){return 41===o?(e.enter("resourceMarker"),e.consume(o),e.exit("resourceMarker"),e.exit("resource"),t):i(o)}}},sr={tokenize:function(e,t,i){const o=this;return function(t){return On.call(o,e,n,r,"reference","referenceMarker","referenceString")(t)};function n(e){return o.parser.defined.includes(Ko(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?t(e):i(e)}function r(e){return i(e)}}},ar={tokenize:function(e,t,i){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),o};function o(o){return 93===o?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):i(o)}}};const lr={name:"labelStartImage",resolveAll:nr.resolveAll,tokenize:function(e,t,i){const o=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),n};function n(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),r):i(t)}function r(e){return 94===e&&"_hiddenFootnoteSupport"in o.parser.constructs?i(e):t(e)}}};function cr(e){return null===e||nn(e)||an(e)?1:sn(e)?2:void 0}const dr={name:"attention",resolveAll:function(e,t){let i,o,n,r,s,a,l,c,d=-1;for(;++d<e.length;)if("enter"===e[d][0]&&"attentionSequence"===e[d][1].type&&e[d][1]._close)for(i=d;i--;)if("exit"===e[i][0]&&"attentionSequence"===e[i][1].type&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[d][1]).charCodeAt(0)){if((e[i][1]._close||e[d][1]._open)&&(e[d][1].end.offset-e[d][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[d][1].end.offset-e[d][1].start.offset)%3))continue;a=e[i][1].end.offset-e[i][1].start.offset>1&&e[d][1].end.offset-e[d][1].start.offset>1?2:1;const h={...e[i][1].end},u={...e[d][1].start};hr(h,-a),hr(u,a),r={type:a>1?"strongSequence":"emphasisSequence",start:h,end:{...e[i][1].end}},s={type:a>1?"strongSequence":"emphasisSequence",start:{...e[d][1].start},end:u},n={type:a>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[d][1].start}},o={type:a>1?"strong":"emphasis",start:{...r.start},end:{...s.end}},e[i][1].end={...r.start},e[d][1].start={...s.end},l=[],e[i][1].end.offset-e[i][1].start.offset&&(l=No(l,[["enter",e[i][1],t],["exit",e[i][1],t]])),l=No(l,[["enter",o,t],["enter",r,t],["exit",r,t],["enter",n,t]]),l=No(l,or(t.parser.constructs.insideSpan.null,e.slice(i+1,d),t)),l=No(l,[["exit",n,t],["enter",s,t],["exit",s,t],["exit",o,t]]),e[d][1].end.offset-e[d][1].start.offset?(c=2,l=No(l,[["enter",e[d][1],t],["exit",e[d][1],t]])):c=0,Bo(e,i-1,d-i+3,l),d=i+l.length-c-2;break}d=-1;for(;++d<e.length;)"attentionSequence"===e[d][1].type&&(e[d][1].type="data");return e},tokenize:function(e,t){const i=this.parser.constructs.attentionMarkers.null,o=this.previous,n=cr(o);let r;return function(t){return r=t,e.enter("attentionSequence"),s(t)};function s(a){if(a===r)return e.consume(a),s;const l=e.exit("attentionSequence"),c=cr(a),d=!c||2===c&&n||i.includes(a),h=!n||2===n&&c||i.includes(o);return l._open=Boolean(42===r?d:d&&(n||!h)),l._close=Boolean(42===r?h:h&&(c||!d)),t(a)}}};function hr(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const ur={name:"autolink",tokenize:function(e,t,i){let o=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),n};function n(t){return Yo(t)?(e.consume(t),r):64===t?i(t):l(t)}function r(e){return 43===e||45===e||46===e||Qo(e)?(o=1,s(e)):l(e)}function s(t){return 58===t?(e.consume(t),o=0,a):(43===t||45===t||46===t||Qo(t))&&o++<32?(e.consume(t),s):(o=0,l(t))}function a(o){return 62===o?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(o),e.exit("autolinkMarker"),e.exit("autolink"),t):null===o||32===o||60===o||Jo(o)?i(o):(e.consume(o),a)}function l(t){return 64===t?(e.consume(t),c):Zo(t)?(e.consume(t),l):i(t)}function c(e){return Qo(e)?d(e):i(e)}function d(i){return 46===i?(e.consume(i),o=0,c):62===i?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(i),e.exit("autolinkMarker"),e.exit("autolink"),t):h(i)}function h(t){if((45===t||Qo(t))&&o++<63){const i=45===t?h:d;return e.consume(t),i}return i(t)}}};const fr={name:"htmlText",tokenize:function(e,t,i){const o=this;let n,r,s;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),a};function a(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),y):63===t?(e.consume(t),v):Yo(t)?(e.consume(t),S):i(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),r=0,f):Yo(t)?(e.consume(t),g):i(t)}function c(t){return 45===t?(e.consume(t),u):i(t)}function d(t){return null===t?i(t):45===t?(e.consume(t),h):on(t)?(s=d,T(t)):(e.consume(t),d)}function h(t){return 45===t?(e.consume(t),u):d(t)}function u(e){return 62===e?A(e):45===e?h(e):d(e)}function f(t){const o="CDATA[";return t===o.charCodeAt(r++)?(e.consume(t),6===r?p:f):i(t)}function p(t){return null===t?i(t):93===t?(e.consume(t),m):on(t)?(s=p,T(t)):(e.consume(t),p)}function m(t){return 93===t?(e.consume(t),b):p(t)}function b(t){return 62===t?A(t):93===t?(e.consume(t),b):p(t)}function g(t){return null===t||62===t?A(t):on(t)?(s=g,T(t)):(e.consume(t),g)}function v(t){return null===t?i(t):63===t?(e.consume(t),w):on(t)?(s=v,T(t)):(e.consume(t),v)}function w(e){return 62===e?A(e):v(e)}function y(t){return Yo(t)?(e.consume(t),x):i(t)}function x(t){return 45===t||Qo(t)?(e.consume(t),x):k(t)}function k(t){return on(t)?(s=k,T(t)):rn(t)?(e.consume(t),k):A(t)}function S(t){return 45===t||Qo(t)?(e.consume(t),S):47===t||62===t||nn(t)?$(t):i(t)}function $(t){return 47===t?(e.consume(t),A):58===t||95===t||Yo(t)?(e.consume(t),z):on(t)?(s=$,T(t)):rn(t)?(e.consume(t),$):A(t)}function z(t){return 45===t||46===t||58===t||95===t||Qo(t)?(e.consume(t),z):_(t)}function _(t){return 61===t?(e.consume(t),C):on(t)?(s=_,T(t)):rn(t)?(e.consume(t),_):$(t)}function C(t){return null===t||60===t||61===t||62===t||96===t?i(t):34===t||39===t?(e.consume(t),n=t,I):on(t)?(s=C,T(t)):rn(t)?(e.consume(t),C):(e.consume(t),L)}function I(t){return t===n?(e.consume(t),n=void 0,E):null===t?i(t):on(t)?(s=I,T(t)):(e.consume(t),I)}function L(t){return null===t||34===t||39===t||60===t||61===t||96===t?i(t):47===t||62===t||nn(t)?$(t):(e.consume(t),L)}function E(e){return 47===e||62===e||nn(e)?$(e):i(e)}function A(o){return 62===o?(e.consume(o),e.exit("htmlTextData"),e.exit("htmlText"),t):i(o)}function T(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),P}function P(t){return rn(t)?pn(e,D,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):D(t)}function D(t){return e.enter("htmlTextData"),s(t)}}};const pr={name:"labelStartLink",resolveAll:nr.resolveAll,tokenize:function(e,t,i){const o=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),n};function n(e){return 94===e&&"_hiddenFootnoteSupport"in o.parser.constructs?i(e):t(e)}}};const mr={name:"hardBreakEscape",tokenize:function(e,t,i){return function(t){return e.enter("hardBreakEscape"),e.consume(t),o};function o(o){return on(o)?(e.exit("hardBreakEscape"),t(o)):i(o)}}};const br={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,i,o=e.length-4,n=3;if(!("lineEnding"!==e[n][1].type&&"space"!==e[n][1].type||"lineEnding"!==e[o][1].type&&"space"!==e[o][1].type))for(t=n;++t<o;)if("codeTextData"===e[t][1].type){e[n][1].type="codeTextPadding",e[o][1].type="codeTextPadding",n+=2,o-=2;break}t=n-1,o++;for(;++t<=o;)void 0===i?t!==o&&"lineEnding"!==e[t][1].type&&(i=t):t!==o&&"lineEnding"!==e[t][1].type||(e[i][1].type="codeTextData",t!==i+2&&(e[i][1].end=e[t-1][1].end,e.splice(i+2,t-i-2),o-=t-i-2,t=i+2),i=void 0);return e},tokenize:function(e,t,i){let o,n,r=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),s(t)};function s(t){return 96===t?(e.consume(t),r++,s):(e.exit("codeTextSequence"),a(t))}function a(t){return null===t?i(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),a):96===t?(n=e.enter("codeTextSequence"),o=0,c(t)):on(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||on(t)?(e.exit("codeTextData"),a(t)):(e.consume(t),l)}function c(i){return 96===i?(e.consume(i),o++,c):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(i)):(n.type="codeTextData",l(i))}}};const gr={42:Pn,43:Pn,45:Pn,48:Pn,49:Pn,50:Pn,51:Pn,52:Pn,53:Pn,54:Pn,55:Pn,56:Pn,57:Pn,62:Mn},vr={91:Nn},wr={[-2]:jn,[-1]:jn,32:jn},yr={35:Wn,42:Tn,45:[Vn,Tn],60:Yn,61:Vn,95:Tn,96:Xn,126:Xn},xr={38:er,92:tr},kr={[-5]:ir,[-4]:ir,[-3]:ir,33:lr,38:er,42:dr,60:[ur,fr],91:pr,92:[mr,tr],93:nr,95:dr,96:br},Sr={null:[dr,_n]},$r={null:[42,95]},zr={null:[]};function _r(e,t,i){let o={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const n={},r=[];let s=[],a=[],l=!0;const c={attempt:v((function(e,t){w(e,t.from)})),check:v(g),consume:function(e){on(e)?(o.line++,o.column=1,o.offset+=-3===e?2:1,y()):-1!==e&&(o.column++,o.offset++);o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===s[o._index].length&&(o._bufferIndex=-1,o._index++));d.previous=e,l=!0},enter:function(e,t){const i=t||{};return i.type=e,i.start=p(),d.events.push(["enter",i,d]),a.push(i),i},exit:function(e){const t=a.pop();return t.end=p(),d.events.push(["exit",t,d]),t},interrupt:v(g,{interrupt:!0})},d={code:null,containerState:{},defineSkip:function(e){n[e.line]=e.column,y()},events:[],now:p,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let i=-1;const o=[];let n;for(;++i<e.length;){const r=e[i];let s;if("string"==typeof r)s=r;else switch(r){case-5:s="\r";break;case-4:s="\n";break;case-3:s="\r\n";break;case-2:s=t?" ":"\t";break;case-1:if(!t&&n)continue;s=" ";break;default:s=String.fromCharCode(r)}n=-2===r,o.push(s)}return o.join("")}(f(e),t)},sliceStream:f,write:function(e){if(s=No(s,e),m(),null!==s[s.length-1])return[];return w(t,0),d.events=or(r,d.events,d),d.events}};let h,u=t.tokenize.call(d,c);return t.resolveAll&&r.push(t),d;function f(e){return function(e,t){const i=t.start._index,o=t.start._bufferIndex,n=t.end._index,r=t.end._bufferIndex;let s;if(i===n)s=[e[i].slice(o,r)];else{if(s=e.slice(i,n),o>-1){const e=s[0];"string"==typeof e?s[0]=e.slice(o):s.shift()}r>0&&s.push(e[n].slice(0,r))}return s}(s,e)}function p(){const{_bufferIndex:e,_index:t,line:i,column:n,offset:r}=o;return{_bufferIndex:e,_index:t,line:i,column:n,offset:r}}function m(){let e;for(;o._index<s.length;){const t=s[o._index];if("string"==typeof t)for(e=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===e&&o._bufferIndex<t.length;)b(t.charCodeAt(o._bufferIndex));else b(t)}}function b(e){l=void 0,h=e,u=u(e)}function g(e,t){t.restore()}function v(e,t){return function(i,n,r){let s,h,u,f;return Array.isArray(i)?m(i):"tokenize"in i?m([i]):function(e){return t;function t(t){const i=null!==t&&e[t],o=null!==t&&e.null;return m([...Array.isArray(i)?i:i?[i]:[],...Array.isArray(o)?o:o?[o]:[]])(t)}}(i);function m(e){return s=e,h=0,0===e.length?r:b(e[h])}function b(e){return function(i){f=function(){const e=p(),t=d.previous,i=d.currentConstruct,n=d.events.length,r=Array.from(a);return{from:n,restore:s};function s(){o=e,d.previous=t,d.currentConstruct=i,d.events.length=n,a=r,y()}}(),u=e,e.partial||(d.currentConstruct=e);if(e.name&&d.parser.constructs.disable.null.includes(e.name))return v(i);return e.tokenize.call(t?Object.assign(Object.create(d),t):d,c,g,v)(i)}}function g(t){return l=!0,e(u,f),n}function v(e){return l=!0,f.restore(),++h<s.length?b(s[h]):r}}}function w(e,t){e.resolveAll&&!r.includes(e)&&r.push(e),e.resolve&&Bo(d.events,t,d.events.length-t,e.resolve(d.events.slice(t),d)),e.resolveTo&&(d.events=e.resolveTo(d.events,d))}function y(){o.line in n&&o.column<2&&(o.column=n[o.line],o.offset+=n[o.line]-1)}}function Cr(t){const i={constructs:function(e){const t={};let i=-1;for(;++i<e.length;)jo(t,e[i]);return t}([e,...(t||{}).extensions||[]]),content:o(mn),defined:[],document:o(bn),flow:o(zn),lazy:{},string:o(Cn),text:o(In)};return i;function o(e){return function(t){return _r(i,e,t)}}}const Ir=/[\0\t\n\r]/g;function Lr(e,t,i){return"string"!=typeof t&&(i=t,t=void 0),fn(i)(function(e){for(;!xn(e););return e}(Cr(i).document().write(function(){let e,t=1,i="",o=!0;return function(n,r,s){const a=[];let l,c,d,h,u;for(n=i+("string"==typeof n?n.toString():new TextDecoder(r||void 0).decode(n)),d=0,i="",o&&(65279===n.charCodeAt(0)&&d++,o=void 0);d<n.length;){if(Ir.lastIndex=d,l=Ir.exec(n),h=l&&void 0!==l.index?l.index:n.length,u=n.charCodeAt(h),!l){i=n.slice(d);break}if(10===u&&d===h&&e)a.push(-3),e=void 0;else switch(e&&(a.push(-5),e=void 0),d<h&&(a.push(n.slice(d,h)),t+=h-d),u){case 0:a.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),a.push(-2);t++<c;)a.push(-1);break;case 10:a.push(-4),t=1;break;default:e=!0,t=1}d=h+1}return s&&(e&&a.push(-5),i&&a.push(i),a.push(null)),a}}()(e,t,!0))))}function Er(e){let t=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:function(e,i,o){const n=this.previous,r=this.events;let s=0;return function(t){if(126===n&&"characterEscape"!==r[r.length-1][1].type)return o(t);return e.enter("strikethroughSequenceTemporary"),a(t)};function a(r){const l=cr(n);if(126===r)return s>1?o(r):(e.consume(r),s++,a);if(s<2&&!t)return o(r);const c=e.exit("strikethroughSequenceTemporary"),d=cr(r);return c._open=!d||2===d&&Boolean(l),c._close=!l||2===l&&Boolean(d),i(r)}},resolveAll:function(e,t){let i=-1;for(;++i<e.length;)if("enter"===e[i][0]&&"strikethroughSequenceTemporary"===e[i][1].type&&e[i][1]._close){let o=i;for(;o--;)if("exit"===e[o][0]&&"strikethroughSequenceTemporary"===e[o][1].type&&e[o][1]._open&&e[i][1].end.offset-e[i][1].start.offset==e[o][1].end.offset-e[o][1].start.offset){e[i][1].type="strikethroughSequence",e[o][1].type="strikethroughSequence";const n={type:"strikethrough",start:Object.assign({},e[o][1].start),end:Object.assign({},e[i][1].end)},r={type:"strikethroughText",start:Object.assign({},e[o][1].end),end:Object.assign({},e[i][1].start)},s=[["enter",n,t],["enter",e[o][1],t],["exit",e[o][1],t],["enter",r,t]],a=t.parser.constructs.insideSpan.null;a&&Bo(s,s.length,0,or(a,e.slice(o+1,i),t)),Bo(s,s.length,0,[["exit",r,t],["enter",e[i][1],t],["exit",e[i][1],t],["exit",n,t]]),Bo(e,o-1,i-o+3,s),i=o+s.length-2;break}}i=-1;for(;++i<e.length;)"strikethroughSequenceTemporary"===e[i][1].type&&(e[i][1].type="data");return e}};return null==t&&(t=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}}}let Ar=class extends me{constructor(){super(...arguments),this.value=""}render(){return Ro`${(e=>({_$litStatic$:e,r:To}))(Lr(this.value,{extensions:[Er()],htmlExtensions:[{enter:{strikethrough(){this.tag("<del>")}},exit:{strikethrough(){this.tag("</del>")}}}]}))}`}};Ar.styles=[h`
|
|
3516
|
+
const Oo=Symbol.for(""),Uo=e=>{if(e?.r===Oo)return e?._$litStatic$},Bo=(e,...t)=>({_$litStatic$:t.reduce(((t,i,o)=>t+(e=>{if(void 0!==e._$litStatic$)return e._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${e}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(i)+e[o+1]),e[0]),r:Oo}),No=new Map,qo=e=>(t,...i)=>{const o=i.length;let n,r;const s=[],a=[];let l,c=0,d=!1;for(;c<o;){for(l=t[c];c<o&&void 0!==(r=i[c],n=Uo(r));)l+=n+t[++c],d=!0;c!==o&&a.push(r),s.push(l),c++}if(c===o&&s.push(t[o]),d){const e=s.join("$$lit$$");void 0===(t=No.get(e))&&(s.raw=s,No.set(e,t=s)),i=a}return e(t,...i)},jo=qo(Q),Ho=(qo(Z),document.createElement("i"));function Wo(e){const t="&"+e+";";Ho.innerHTML=t;const i=Ho.textContent;return(59!==i.charCodeAt(i.length-1)||"semi"===e)&&(i!==t&&i)}function Vo(e,t,i,o){const n=e.length;let r,s=0;if(t=t<0?-t>n?0:n+t:t>n?n:t,i=i>0?i:0,o.length<1e4)r=Array.from(o),r.unshift(t,i),e.splice(...r);else for(i&&e.splice(t,i);s<o.length;)r=o.slice(s,s+1e4),r.unshift(t,0),e.splice(...r),s+=1e4,t+=1e4}function Go(e,t){return e.length>0?(Vo(e,e.length,0,t),e):t}const Ko={}.hasOwnProperty;function Yo(e,t){let i;for(i in t){const o=(Ko.call(e,i)?e[i]:void 0)||(e[i]={}),n=t[i];let r;if(n)for(r in n){Ko.call(o,r)||(o[r]=[]);const e=n[r];Qo(o[r],Array.isArray(e)?e:e?[e]:[])}}}function Qo(e,t){let i=-1;const o=[];for(;++i<t.length;)("after"===t[i].add?e:o).push(t[i]);Vo(e,0,0,o)}function Zo(e,t){let i;for(i in t){const o=(Ko.call(e,i)?e[i]:void 0)||(e[i]={}),n=t[i];let r;if(n)for(r in n)o[r]=n[r]}}const Jo={'"':"quot","&":"amp","<":"lt",">":"gt"};function Xo(e){return e.replace(/["&<>]/g,(function(e){return"&"+Jo[e]+";"}))}function en(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const tn=pn(/[A-Za-z]/),on=pn(/[\dA-Za-z]/),nn=pn(/[#-'*+\--9=?A-Z^-~]/);function rn(e){return null!==e&&(e<32||127===e)}const sn=pn(/\d/),an=pn(/[\dA-Fa-f]/),ln=pn(/[!-/:-@[-`{-~]/);function cn(e){return null!==e&&e<-2}function dn(e){return null!==e&&(e<0||32===e)}function hn(e){return-2===e||-1===e||32===e}const un=pn(/\p{P}|\p{S}/u),fn=pn(/\s/);function pn(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function mn(e,t){const i=Xo(function(e){const t=[];let i=-1,o=0,n=0;for(;++i<e.length;){const r=e.charCodeAt(i);let s="";if(37===r&&on(e.charCodeAt(i+1))&&on(e.charCodeAt(i+2)))n=2;else if(r<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(r))||(s=String.fromCharCode(r));else if(r>55295&&r<57344){const t=e.charCodeAt(i+1);r<56320&&t>56319&&t<57344?(s=String.fromCharCode(r,t),n=1):s="�"}else s=String.fromCharCode(r);s&&(t.push(e.slice(o,i),encodeURIComponent(s)),o=i+n+1,s=""),n&&(i+=n,n=0)}return t.join("")+e.slice(o)}(e||""));if(!t)return i;const o=i.indexOf(":"),n=i.indexOf("?"),r=i.indexOf("#"),s=i.indexOf("/");return o<0||s>-1&&o>s||n>-1&&o>n||r>-1&&o>r||t.test(i.slice(0,o))?i:""}const bn={}.hasOwnProperty,gn=/^(https?|ircs?|mailto|xmpp)$/i,vn=/^https?$/i;function wn(e){const t=e||{};let i=!0;const o={},n=[[]],r=[],s=[],a=function(e){const t={};let i=-1;for(;++i<e.length;)Zo(t,e[i]);return t}([{enter:{blockQuote:function(){s.push(!1),w(),b("<blockquote>")},codeFenced:function(){w(),b("<pre><code"),u("fencesCount",0)},codeFencedFenceInfo:p,codeFencedFenceMeta:p,codeIndented:function(){w(),b("<pre><code>")},codeText:function(){u("inCodeText",!0),b("<code>")},content:function(){u("slurpAllLineEndings",!0)},definition:function(){p(),r.push({})},definitionDestinationString:function(){p(),u("ignoreEncode",!0)},definitionLabelString:p,definitionTitleString:p,emphasis:function(){b("<em>")},htmlFlow:function(){w(),I()},htmlText:I,image:function(){r.push({image:!0}),i=void 0},label:p,link:function(){r.push({})},listItemMarker:function(){f("expectFirstItem")?b(">"):k();w(),b("<li>"),u("expectFirstItem"),u("lastWasTag")},listItemValue:function(e){if(f("expectFirstItem")){const t=Number.parseInt(this.sliceSerialize(e),10);1!==t&&b(' start="'+y(String(t))+'"')}},listOrdered:function(e){s.push(!e._loose),w(),b("<ol"),u("expectFirstItem",!0)},listUnordered:function(e){s.push(!e._loose),w(),b("<ul"),u("expectFirstItem",!0)},paragraph:function(){s[s.length-1]||(w(),b("<p>"));u("slurpAllLineEndings")},reference:p,resource:function(){p(),r[r.length-1].destination=""},resourceDestinationString:function(){p(),u("ignoreEncode",!0)},resourceTitleString:p,setextHeading:function(){p(),u("slurpAllLineEndings")},strong:function(){b("<strong>")}},exit:{atxHeading:function(){b("</h"+f("headingRank")+">"),u("headingRank")},atxHeadingSequence:function(e){if(f("headingRank"))return;u("headingRank",this.sliceSerialize(e).length),w(),b("<h"+f("headingRank")+">")},autolinkEmail:function(e){const t=this.sliceSerialize(e);b('<a href="'+mn("mailto:"+t)+'">'),g(y(t)),b("</a>")},autolinkProtocol:function(e){const i=this.sliceSerialize(e);b('<a href="'+mn(i,t.allowDangerousProtocol?void 0:gn)+'">'),g(y(i)),b("</a>")},blockQuote:function(){s.pop(),w(),b("</blockquote>"),u("slurpAllLineEndings")},characterEscapeValue:z,characterReferenceMarkerHexadecimal:L,characterReferenceMarkerNumeric:L,characterReferenceValue:function(e){const t=this.sliceSerialize(e);g(y(f("characterReferenceType")?function(e,t){const i=Number.parseInt(e,t);return i<9||11===i||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||!(65535&~i)||65534==(65535&i)||i>1114111?"�":String.fromCodePoint(i)}(t,"characterReferenceMarkerNumeric"===f("characterReferenceType")?10:16):Wo(t))),u("characterReferenceType")},codeFenced:S,codeFencedFence:function(){const e=f("fencesCount")||0;e||(b(">"),u("slurpOneLineEnding",!0));u("fencesCount",e+1)},codeFencedFenceInfo:function(){b(' class="language-'+m()+'"')},codeFencedFenceMeta:x,codeFlowValue:function(e){g(y(this.sliceSerialize(e))),u("flowCodeSeenData",!0)},codeIndented:S,codeText:function(){u("inCodeText"),b("</code>")},codeTextData:z,data:z,definition:function(){const e=en(r[r.length-1].labelId);m(),bn.call(o,e)||(o[e]=r[r.length-1]);r.pop()},definitionDestinationString:function(){r[r.length-1].destination=m(),u("ignoreEncode")},definitionLabelString:function(e){m(),r[r.length-1].labelId=this.sliceSerialize(e)},definitionTitleString:function(){r[r.length-1].title=m()},emphasis:function(){b("</em>")},hardBreakEscape:_,hardBreakTrailing:_,htmlFlow:C,htmlFlowData:z,htmlText:C,htmlTextData:z,image:$,label:function(){r[r.length-1].label=m()},labelText:function(e){r[r.length-1].labelId=this.sliceSerialize(e)},lineEnding:function(e){if(f("slurpAllLineEndings"))return;if(f("slurpOneLineEnding"))return void u("slurpOneLineEnding");if(f("inCodeText"))return void g(" ");g(y(this.sliceSerialize(e)))},link:$,listOrdered:function(){k(),s.pop(),v(),b("</ol>")},listUnordered:function(){k(),s.pop(),v(),b("</ul>")},paragraph:function(){s[s.length-1]?u("slurpAllLineEndings",!0):b("</p>")},reference:x,referenceString:function(e){r[r.length-1].referenceId=this.sliceSerialize(e)},resource:x,resourceDestinationString:function(){r[r.length-1].destination=m(),u("ignoreEncode")},resourceTitleString:function(){r[r.length-1].title=m()},setextHeading:function(){const e=m();w(),b("<h"+f("headingRank")+">"),g(e),b("</h"+f("headingRank")+">"),u("slurpAllLineEndings"),u("headingRank")},setextHeadingLineSequence:function(e){u("headingRank",61===this.sliceSerialize(e).charCodeAt(0)?1:2)},setextHeadingText:function(){u("slurpAllLineEndings",!0)},strong:function(){b("</strong>")},thematicBreak:function(){w(),b("<hr />")}}},...t.htmlExtensions||[]]),l={definitions:o,tightStack:s},c={buffer:p,encode:y,getData:f,lineEndingIfNeeded:w,options:t,raw:g,resume:m,setData:u,tag:b};let d=t.defaultLineEnding;return function(e){let t=-1,i=0;const o=[];let r=[],s=[];for(;++t<e.length;)d||"lineEnding"!==e[t][1].type&&"lineEndingBlank"!==e[t][1].type||(d=e[t][2].sliceSerialize(e[t][1])),"listOrdered"!==e[t][1].type&&"listUnordered"!==e[t][1].type||("enter"===e[t][0]?o.push(t):h(e.slice(o.pop(),t))),"definition"===e[t][1].type&&("enter"===e[t][0]?(s=Go(s,e.slice(i,t)),i=t):(r=Go(r,e.slice(i,t+1)),i=t+1));r=Go(r,s),r=Go(r,e.slice(i)),t=-1;const l=r;a.enter.null&&a.enter.null.call(c);for(;++t<e.length;){const e=a[l[t][0]],i=l[t][1].type,o=e[i];bn.call(e,i)&&o&&o.call({sliceSerialize:l[t][2].sliceSerialize,...c},l[t][1])}a.exit.null&&a.exit.null.call(c);return n[0].join("")};function h(e){const t=e.length;let i,o=0,n=0,r=!1;for(;++o<t;){const t=e[o];if(t[1]._container)i=void 0,"enter"===t[0]?n++:n--;else switch(t[1].type){case"listItemPrefix":"exit"===t[0]&&(i=!0);break;case"linePrefix":break;case"lineEndingBlank":"enter"!==t[0]||n||(i?i=void 0:r=!0);break;default:i=void 0}}e[0][1]._loose=r}function u(e,t){l[e]=t}function f(e){return l[e]}function p(){n.push([])}function m(){return n.pop().join("")}function b(e){i&&(u("lastWasTag",!0),n[n.length-1].push(e))}function g(e){u("lastWasTag"),n[n.length-1].push(e)}function v(){g(d||"\n")}function w(){const e=n[n.length-1],t=e[e.length-1],i=t?t.charCodeAt(t.length-1):null;10!==i&&13!==i&&null!==i&&v()}function y(e){return f("ignoreEncode")?e:Xo(e)}function x(){m()}function k(){f("lastWasTag")&&!f("slurpAllLineEndings")&&w(),b("</li>"),u("slurpAllLineEndings")}function S(){const e=f("fencesCount");void 0!==e&&e<2&&l.tightStack.length>0&&!f("lastWasTag")&&v(),f("flowCodeSeenData")&&w(),b("</code></pre>"),void 0!==e&&e<2&&w(),u("flowCodeSeenData"),u("fencesCount"),u("slurpOneLineEnding")}function $(){let e=r.length-1;const n=r[e],s=n.referenceId||n.labelId,a=void 0===n.destination?o[en(s)]:n;for(i=!0;e--;)if(r[e].image){i=void 0;break}n.image?(b('<img src="'+mn(a.destination,t.allowDangerousProtocol?void 0:vn)+'" alt="'),g(n.label),b('"')):b('<a href="'+mn(a.destination,t.allowDangerousProtocol?void 0:gn)+'"'),b(a.title?' title="'+a.title+'"':""),n.image?b(" />"):(b(">"),g(n.label),b("</a>")),r.pop()}function z(e){g(y(this.sliceSerialize(e)))}function _(){b("<br />")}function C(){u("ignoreEncode")}function I(){t.allowDangerousHtml&&u("ignoreEncode",!0)}function L(e){u("characterReferenceType",e.type)}}function yn(e,t,i,o){const n=o?o-1:Number.POSITIVE_INFINITY;let r=0;return function(o){if(hn(o))return e.enter(i),s(o);return t(o)};function s(o){return hn(o)&&r++<n?(e.consume(o),s):(e.exit(i),t(o))}}const xn={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,(function(i){if(null===i)return void e.consume(i);return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),yn(e,t,"linePrefix")}),(function(t){return e.enter("paragraph"),o(t)}));let i;return t;function o(t){const o=e.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=o),i=o,n(t)}function n(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):cn(t)?(e.consume(t),e.exit("chunkText"),o):(e.consume(t),n)}}};const kn={tokenize:function(e){const t=this,i=[];let o,n,r,s=0;return a;function a(o){if(s<i.length){const n=i[s];return t.containerState=n[1],e.attempt(n[0].continuation,l,c)(o)}return c(o)}function l(e){if(s++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&v();const i=t.events.length;let n,r=i;for(;r--;)if("exit"===t.events[r][0]&&"chunkFlow"===t.events[r][1].type){n=t.events[r][1].end;break}g(s);let a=i;for(;a<t.events.length;)t.events[a][1].end={...n},a++;return Vo(t.events,r+1,0,t.events.slice(i)),t.events.length=a,c(e)}return a(e)}function c(n){if(s===i.length){if(!o)return u(n);if(o.currentConstruct&&o.currentConstruct.concrete)return p(n);t.interrupt=Boolean(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Sn,d,h)(n)}function d(e){return o&&v(),g(s),u(e)}function h(e){return t.parser.lazy[t.now().line]=s!==i.length,r=t.now().offset,p(e)}function u(i){return t.containerState={},e.attempt(Sn,f,p)(i)}function f(e){return s++,i.push([t.currentConstruct,t.containerState]),u(e)}function p(i){return null===i?(o&&v(),g(0),void e.consume(i)):(o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:n}),m(i))}function m(i){return null===i?(b(e.exit("chunkFlow"),!0),g(0),void e.consume(i)):cn(i)?(e.consume(i),b(e.exit("chunkFlow")),s=0,t.interrupt=void 0,a):(e.consume(i),m)}function b(e,i){const a=t.sliceStream(e);if(i&&a.push(null),e.previous=n,n&&(n.next=e),n=e,o.defineSkip(e.start),o.write(a),t.parser.lazy[e.start.line]){let e=o.events.length;for(;e--;)if(o.events[e][1].start.offset<r&&(!o.events[e][1].end||o.events[e][1].end.offset>r))return;const i=t.events.length;let n,a,l=i;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(n){a=t.events[l][1].end;break}n=!0}for(g(s),e=i;e<t.events.length;)t.events[e][1].end={...a},e++;Vo(t.events,l+1,0,t.events.slice(i)),t.events.length=e}}function g(o){let n=i.length;for(;n-- >o;){const o=i[n];t.containerState=o[1],o[0].exit.call(t,e)}i.length=o}function v(){o.write([null]),n=void 0,o=void 0,t.containerState._closeFlow=void 0}}},Sn={tokenize:function(e,t,i){return yn(e,e.attempt(this.parser.constructs.document,t,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};const $n={partial:!0,tokenize:function(e,t,i){return function(t){return hn(t)?yn(e,o,"linePrefix")(t):o(t)};function o(e){return null===e||cn(e)?t(e):i(e)}}};class zn{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const i=null==t?Number.POSITIVE_INFINITY:t;return i<this.left.length?this.left.slice(e,i):e>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(e,t,i){const o=t||0;this.setCursor(Math.trunc(e));const n=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return i&&_n(this.left,i),n.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),_n(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),_n(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);_n(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);_n(this.left,t.reverse())}}}function _n(e,t){let i=0;if(t.length<1e4)e.push(...t);else for(;i<t.length;)e.push(...t.slice(i,i+1e4)),i+=1e4}function Cn(e){const t={};let i,o,n,r,s,a,l,c=-1;const d=new zn(e);for(;++c<d.length;){for(;c in t;)c=t[c];if(i=d.get(c),c&&"chunkFlow"===i[1].type&&"listItemPrefix"===d.get(c-1)[1].type&&(a=i[1]._tokenizer.events,n=0,n<a.length&&"lineEndingBlank"===a[n][1].type&&(n+=2),n<a.length&&"content"===a[n][1].type))for(;++n<a.length&&"content"!==a[n][1].type;)"chunkText"===a[n][1].type&&(a[n][1]._isInFirstContentOfListItem=!0,n++);if("enter"===i[0])i[1].contentType&&(Object.assign(t,In(d,c)),c=t[c],l=!0);else if(i[1]._container){for(n=c,o=void 0;n--&&(r=d.get(n),"lineEnding"===r[1].type||"lineEndingBlank"===r[1].type);)"enter"===r[0]&&(o&&(d.get(o)[1].type="lineEndingBlank"),r[1].type="lineEnding",o=n);o&&(i[1].end={...d.get(o)[1].start},s=d.slice(o,c),s.unshift(i),d.splice(o,c-o+1,s))}}return Vo(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!l}function In(e,t){const i=e.get(t)[1],o=e.get(t)[2];let n=t-1;const r=[],s=i._tokenizer||o.parser[i.contentType](i.start),a=s.events,l=[],c={};let d,h,u=-1,f=i,p=0,m=0;const b=[m];for(;f;){for(;e.get(++n)[1]!==f;);r.push(n),f._tokenizer||(d=o.sliceStream(f),f.next||d.push(null),h&&s.defineSkip(f.start),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(d),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),h=f,f=f.next}for(f=i;++u<a.length;)"exit"===a[u][0]&&"enter"===a[u-1][0]&&a[u][1].type===a[u-1][1].type&&a[u][1].start.line!==a[u][1].end.line&&(m=u+1,b.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(s.events=[],f?(f._tokenizer=void 0,f.previous=void 0):b.pop(),u=b.length;u--;){const t=a.slice(b[u],b[u+1]),i=r.pop();l.push([i,i+t.length-1]),e.splice(i,2,t)}for(l.reverse(),u=-1;++u<l.length;)c[p+l[u][0]]=p+l[u][1],p+=l[u][1]-l[u][0]-1;return c}const Ln={resolve:function(e){return Cn(e),e},tokenize:function(e,t){let i;return function(t){return e.enter("content"),i=e.enter("chunkContent",{contentType:"content"}),o(t)};function o(t){return null===t?n(t):cn(t)?e.check(En,r,n)(t):(e.consume(t),o)}function n(i){return e.exit("chunkContent"),e.exit("content"),t(i)}function r(t){return e.consume(t),e.exit("chunkContent"),i.next=e.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,o}}},En={partial:!0,tokenize:function(e,t,i){const o=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),yn(e,n,"linePrefix")};function n(n){if(null===n||cn(n))return i(n);const r=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&r&&"linePrefix"===r[1].type&&r[2].sliceSerialize(r[1],!0).length>=4?t(n):e.interrupt(o.parser.constructs.flow,i,t)(n)}}};const An={tokenize:function(e){const t=this,i=e.attempt($n,(function(o){if(null===o)return void e.consume(o);return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,i}),e.attempt(this.parser.constructs.flowInitial,o,yn(e,e.attempt(this.parser.constructs.flow,o,e.attempt(Ln,o)),"linePrefix")));return i;function o(o){if(null!==o)return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,i;e.consume(o)}}};const Tn={resolveAll:Mn()},Pn=Fn("string"),Dn=Fn("text");function Fn(e){return{resolveAll:Mn("text"===e?Rn:void 0),tokenize:function(t){const i=this,o=this.parser.constructs[e],n=t.attempt(o,r,s);return r;function r(e){return l(e)?n(e):s(e)}function s(e){if(null!==e)return t.enter("data"),t.consume(e),a;t.consume(e)}function a(e){return l(e)?(t.exit("data"),n(e)):(t.consume(e),a)}function l(e){if(null===e)return!0;const t=o[e];let n=-1;if(t)for(;++n<t.length;){const e=t[n];if(!e.previous||e.previous.call(i,i.previous))return!0}return!1}}}}function Mn(e){return function(t,i){let o,n=-1;for(;++n<=t.length;)void 0===o?t[n]&&"data"===t[n][1].type&&(o=n,n++):t[n]&&"data"===t[n][1].type||(n!==o+2&&(t[o][1].end=t[n-1][1].end,t.splice(o+2,n-o-2),n=o+2),o=void 0);return e?e(t,i):t}}function Rn(e,t){let i=0;for(;++i<=e.length;)if((i===e.length||"lineEnding"===e[i][1].type)&&"data"===e[i-1][1].type){const o=e[i-1][1],n=t.sliceStream(o);let r,s=n.length,a=-1,l=0;for(;s--;){const e=n[s];if("string"==typeof e){for(a=e.length;32===e.charCodeAt(a-1);)l++,a--;if(a)break;a=-1}else if(-2===e)r=!0,l++;else if(-1!==e){s++;break}}if(l){const n={type:i===e.length||r||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:o.start._bufferIndex+a,_index:o.start._index+s,line:o.end.line,column:o.end.column-l,offset:o.end.offset-l},end:{...o.end}};o.end={...n.start},o.start.offset===o.end.offset?Object.assign(o,n):(e.splice(i,0,["enter",n,t],["exit",n,t]),i+=2)}i++}return e}const On={name:"thematicBreak",tokenize:function(e,t,i){let o,n=0;return function(t){return e.enter("thematicBreak"),function(e){return o=e,r(e)}(t)};function r(r){return r===o?(e.enter("thematicBreakSequence"),s(r)):n>=3&&(null===r||cn(r))?(e.exit("thematicBreak"),t(r)):i(r)}function s(t){return t===o?(e.consume(t),n++,s):(e.exit("thematicBreakSequence"),hn(t)?yn(e,r,"whitespace")(t):r(t))}}};const Un={continuation:{tokenize:function(e,t,i){const o=this;return o.containerState._closeFlow=void 0,e.check($n,(function(i){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,yn(e,t,"listItemIndent",o.containerState.size+1)(i)}),(function(i){if(o.containerState.furtherBlankLines||!hn(i))return o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,n(i);return o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,e.attempt(Nn,t,n)(i)}));function n(n){return o.containerState._closeFlow=!0,o.interrupt=void 0,yn(e,e.attempt(Un,t,i),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(n)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,i){const o=this,n=o.events[o.events.length-1];let r=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,s=0;return function(t){const n=o.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===n?!o.containerState.marker||t===o.containerState.marker:sn(t)){if(o.containerState.type||(o.containerState.type=n,e.enter(n,{_container:!0})),"listUnordered"===n)return e.enter("listItemPrefix"),42===t||45===t?e.check(On,i,l)(t):l(t);if(!o.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(t)}return i(t)};function a(t){return sn(t)&&++s<10?(e.consume(t),a):(!o.interrupt||s<2)&&(o.containerState.marker?t===o.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):i(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||t,e.check($n,o.interrupt?i:c,e.attempt(Bn,h,d))}function c(e){return o.containerState.initialBlankLine=!0,r++,h(e)}function d(t){return hn(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),h):i(t)}function h(i){return o.containerState.size=r+o.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(i)}}},Bn={partial:!0,tokenize:function(e,t,i){const o=this;return yn(e,(function(e){const n=o.events[o.events.length-1];return!hn(e)&&n&&"listItemPrefixWhitespace"===n[1].type?t(e):i(e)}),"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},Nn={partial:!0,tokenize:function(e,t,i){const o=this;return yn(e,(function(e){const n=o.events[o.events.length-1];return n&&"listItemIndent"===n[1].type&&n[2].sliceSerialize(n[1],!0).length===o.containerState.size?t(e):i(e)}),"listItemIndent",o.containerState.size+1)}};const qn={continuation:{tokenize:function(e,t,i){const o=this;return function(t){if(hn(t))return yn(e,n,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return n(t)};function n(o){return e.attempt(qn,t,i)(o)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,i){const o=this;return function(t){if(62===t){const i=o.containerState;return i.open||(e.enter("blockQuote",{_container:!0}),i.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),n}return i(t)};function n(i){return hn(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(i))}}};function jn(e,t,i,o,n,r,s,a,l){const c=l||Number.POSITIVE_INFINITY;let d=0;return function(t){if(60===t)return e.enter(o),e.enter(n),e.enter(r),e.consume(t),e.exit(r),h;if(null===t||32===t||41===t||rn(t))return i(t);return e.enter(o),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),p(t)};function h(i){return 62===i?(e.enter(r),e.consume(i),e.exit(r),e.exit(n),e.exit(o),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),u(i))}function u(t){return 62===t?(e.exit("chunkString"),e.exit(a),h(t)):null===t||60===t||cn(t)?i(t):(e.consume(t),92===t?f:u)}function f(t){return 60===t||62===t||92===t?(e.consume(t),u):u(t)}function p(n){return d||null!==n&&41!==n&&!dn(n)?d<c&&40===n?(e.consume(n),d++,p):41===n?(e.consume(n),d--,p):null===n||32===n||40===n||rn(n)?i(n):(e.consume(n),92===n?m:p):(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(o),t(n))}function m(t){return 40===t||41===t||92===t?(e.consume(t),p):p(t)}}function Hn(e,t,i,o,n,r){const s=this;let a,l=0;return function(t){return e.enter(o),e.enter(n),e.consume(t),e.exit(n),e.enter(r),c};function c(h){return l>999||null===h||91===h||93===h&&!a||94===h&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?i(h):93===h?(e.exit(r),e.enter(n),e.consume(h),e.exit(n),e.exit(o),t):cn(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(t){return null===t||91===t||93===t||cn(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),a||(a=!hn(t)),92===t?h:d)}function h(t){return 91===t||92===t||93===t?(e.consume(t),l++,d):d(t)}}function Wn(e,t,i,o,n,r){let s;return function(t){if(34===t||39===t||40===t)return e.enter(o),e.enter(n),e.consume(t),e.exit(n),s=40===t?41:t,a;return i(t)};function a(i){return i===s?(e.enter(n),e.consume(i),e.exit(n),e.exit(o),t):(e.enter(r),l(i))}function l(t){return t===s?(e.exit(r),a(s)):null===t?i(t):cn(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),yn(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===s||null===t||cn(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?d:c)}function d(t){return t===s||92===t?(e.consume(t),c):c(t)}}function Vn(e,t){let i;return function o(n){if(cn(n))return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),i=!0,o;if(hn(n))return yn(e,o,i?"linePrefix":"lineSuffix")(n);return t(n)}}const Gn={name:"definition",tokenize:function(e,t,i){const o=this;let n;return function(t){return e.enter("definition"),function(t){return Hn.call(o,e,r,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function r(t){return n=en(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),s):i(t)}function s(t){return dn(t)?Vn(e,a)(t):a(t)}function a(t){return jn(e,l,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(Kn,c,c)(t)}function c(t){return hn(t)?yn(e,d,"whitespace")(t):d(t)}function d(r){return null===r||cn(r)?(e.exit("definition"),o.parser.defined.push(n),t(r)):i(r)}}},Kn={partial:!0,tokenize:function(e,t,i){return function(t){return dn(t)?Vn(e,o)(t):i(t)};function o(t){return Wn(e,n,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function n(t){return hn(t)?yn(e,r,"whitespace")(t):r(t)}function r(e){return null===e||cn(e)?t(e):i(e)}}};const Yn={name:"codeIndented",tokenize:function(e,t,i){const o=this;return function(t){return e.enter("codeIndented"),yn(e,n,"linePrefix",5)(t)};function n(e){const t=o.events[o.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?r(e):i(e)}function r(t){return null===t?a(t):cn(t)?e.attempt(Qn,r,a)(t):(e.enter("codeFlowValue"),s(t))}function s(t){return null===t||cn(t)?(e.exit("codeFlowValue"),r(t)):(e.consume(t),s)}function a(i){return e.exit("codeIndented"),t(i)}}},Qn={partial:!0,tokenize:function(e,t,i){const o=this;return n;function n(t){return o.parser.lazy[o.now().line]?i(t):cn(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),n):yn(e,r,"linePrefix",5)(t)}function r(e){const r=o.events[o.events.length-1];return r&&"linePrefix"===r[1].type&&r[2].sliceSerialize(r[1],!0).length>=4?t(e):cn(e)?n(e):i(e)}}};const Zn={name:"headingAtx",resolve:function(e,t){let i,o,n=e.length-2,r=3;"whitespace"===e[r][1].type&&(r+=2);n-2>r&&"whitespace"===e[n][1].type&&(n-=2);"atxHeadingSequence"===e[n][1].type&&(r===n-1||n-4>r&&"whitespace"===e[n-2][1].type)&&(n-=r+1===n?2:4);n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Vo(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]]));return e},tokenize:function(e,t,i){let o=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),n(t)}(t)};function n(t){return 35===t&&o++<6?(e.consume(t),n):null===t||dn(t)?(e.exit("atxHeadingSequence"),r(t)):i(t)}function r(i){return 35===i?(e.enter("atxHeadingSequence"),s(i)):null===i||cn(i)?(e.exit("atxHeading"),t(i)):hn(i)?yn(e,r,"whitespace")(i):(e.enter("atxHeadingText"),a(i))}function s(t){return 35===t?(e.consume(t),s):(e.exit("atxHeadingSequence"),r(t))}function a(t){return null===t||35===t||dn(t)?(e.exit("atxHeadingText"),r(t)):(e.consume(t),a)}}};const Jn={name:"setextUnderline",resolveTo:function(e,t){let i,o,n,r=e.length;for(;r--;)if("enter"===e[r][0]){if("content"===e[r][1].type){i=r;break}"paragraph"===e[r][1].type&&(o=r)}else"content"===e[r][1].type&&e.splice(r,1),n||"definition"!==e[r][1].type||(n=r);const s={type:"setextHeading",start:{...e[o][1].start},end:{...e[e.length-1][1].end}};e[o][1].type="setextHeadingText",n?(e.splice(o,0,["enter",s,t]),e.splice(n+1,0,["exit",e[i][1],t]),e[i][1].end={...e[n][1].end}):e[i][1]=s;return e.push(["exit",s,t]),e},tokenize:function(e,t,i){const o=this;let n;return function(t){let s,a=o.events.length;for(;a--;)if("lineEnding"!==o.events[a][1].type&&"linePrefix"!==o.events[a][1].type&&"content"!==o.events[a][1].type){s="paragraph"===o.events[a][1].type;break}if(!o.parser.lazy[o.now().line]&&(o.interrupt||s))return e.enter("setextHeadingLine"),n=t,function(t){return e.enter("setextHeadingLineSequence"),r(t)}(t);return i(t)};function r(t){return t===n?(e.consume(t),r):(e.exit("setextHeadingLineSequence"),hn(t)?yn(e,s,"lineSuffix")(t):s(t))}function s(o){return null===o||cn(o)?(e.exit("setextHeadingLine"),t(o)):i(o)}}};const Xn=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],er=["pre","script","style","textarea"],tr={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},tokenize:function(e,t,i){const o=this;let n,r,s,a,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(a){return 33===a?(e.consume(a),d):47===a?(e.consume(a),r=!0,f):63===a?(e.consume(a),n=3,o.interrupt?t:D):tn(a)?(e.consume(a),s=String.fromCharCode(a),p):i(a)}function d(r){return 45===r?(e.consume(r),n=2,h):91===r?(e.consume(r),n=5,a=0,u):tn(r)?(e.consume(r),n=4,o.interrupt?t:D):i(r)}function h(n){return 45===n?(e.consume(n),o.interrupt?t:D):i(n)}function u(n){const r="CDATA[";return n===r.charCodeAt(a++)?(e.consume(n),6===a?o.interrupt?t:_:u):i(n)}function f(t){return tn(t)?(e.consume(t),s=String.fromCharCode(t),p):i(t)}function p(a){if(null===a||47===a||62===a||dn(a)){const l=47===a,c=s.toLowerCase();return l||r||!er.includes(c)?Xn.includes(s.toLowerCase())?(n=6,l?(e.consume(a),m):o.interrupt?t(a):_(a)):(n=7,o.interrupt&&!o.parser.lazy[o.now().line]?i(a):r?b(a):g(a)):(n=1,o.interrupt?t(a):_(a))}return 45===a||on(a)?(e.consume(a),s+=String.fromCharCode(a),p):i(a)}function m(n){return 62===n?(e.consume(n),o.interrupt?t:_):i(n)}function b(t){return hn(t)?(e.consume(t),b):$(t)}function g(t){return 47===t?(e.consume(t),$):58===t||95===t||tn(t)?(e.consume(t),v):hn(t)?(e.consume(t),g):$(t)}function v(t){return 45===t||46===t||58===t||95===t||on(t)?(e.consume(t),v):w(t)}function w(t){return 61===t?(e.consume(t),y):hn(t)?(e.consume(t),w):g(t)}function y(t){return null===t||60===t||61===t||62===t||96===t?i(t):34===t||39===t?(e.consume(t),l=t,x):hn(t)?(e.consume(t),y):k(t)}function x(t){return t===l?(e.consume(t),l=null,S):null===t||cn(t)?i(t):(e.consume(t),x)}function k(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||dn(t)?w(t):(e.consume(t),k)}function S(e){return 47===e||62===e||hn(e)?g(e):i(e)}function $(t){return 62===t?(e.consume(t),z):i(t)}function z(t){return null===t||cn(t)?_(t):hn(t)?(e.consume(t),z):i(t)}function _(t){return 45===t&&2===n?(e.consume(t),E):60===t&&1===n?(e.consume(t),A):62===t&&4===n?(e.consume(t),F):63===t&&3===n?(e.consume(t),D):93===t&&5===n?(e.consume(t),P):!cn(t)||6!==n&&7!==n?null===t||cn(t)?(e.exit("htmlFlowData"),C(t)):(e.consume(t),_):(e.exit("htmlFlowData"),e.check(ir,M,C)(t))}function C(t){return e.check(or,I,M)(t)}function I(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),L}function L(t){return null===t||cn(t)?C(t):(e.enter("htmlFlowData"),_(t))}function E(t){return 45===t?(e.consume(t),D):_(t)}function A(t){return 47===t?(e.consume(t),s="",T):_(t)}function T(t){if(62===t){const i=s.toLowerCase();return er.includes(i)?(e.consume(t),F):_(t)}return tn(t)&&s.length<8?(e.consume(t),s+=String.fromCharCode(t),T):_(t)}function P(t){return 93===t?(e.consume(t),D):_(t)}function D(t){return 62===t?(e.consume(t),F):45===t&&2===n?(e.consume(t),D):_(t)}function F(t){return null===t||cn(t)?(e.exit("htmlFlowData"),M(t)):(e.consume(t),F)}function M(i){return e.exit("htmlFlow"),t(i)}}},ir={partial:!0,tokenize:function(e,t,i){return function(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt($n,t,i)}}},or={partial:!0,tokenize:function(e,t,i){const o=this;return function(t){if(cn(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),n;return i(t)};function n(e){return o.parser.lazy[o.now().line]?i(e):t(e)}}};const nr={partial:!0,tokenize:function(e,t,i){const o=this;return function(t){if(null===t)return i(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),n};function n(e){return o.parser.lazy[o.now().line]?i(e):t(e)}}},rr={concrete:!0,name:"codeFenced",tokenize:function(e,t,i){const o=this,n={partial:!0,tokenize:function(e,t,i){let n=0;return s;function s(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l}function l(t){return e.enter("codeFencedFence"),hn(t)?yn(e,c,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}function c(t){return t===r?(e.enter("codeFencedFenceSequence"),d(t)):i(t)}function d(t){return t===r?(n++,e.consume(t),d):n>=a?(e.exit("codeFencedFenceSequence"),hn(t)?yn(e,h,"whitespace")(t):h(t)):i(t)}function h(o){return null===o||cn(o)?(e.exit("codeFencedFence"),t(o)):i(o)}}};let r,s=0,a=0;return function(t){return function(t){const i=o.events[o.events.length-1];return s=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,r=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===r?(a++,e.consume(t),l):a<3?i(t):(e.exit("codeFencedFenceSequence"),hn(t)?yn(e,c,"whitespace")(t):c(t))}function c(i){return null===i||cn(i)?(e.exit("codeFencedFence"),o.interrupt?t(i):e.check(nr,f,v)(i)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(i))}function d(t){return null===t||cn(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):hn(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),yn(e,h,"whitespace")(t)):96===t&&t===r?i(t):(e.consume(t),d)}function h(t){return null===t||cn(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),u(t))}function u(t){return null===t||cn(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===r?i(t):(e.consume(t),u)}function f(t){return e.attempt(n,v,p)(t)}function p(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return s>0&&hn(t)?yn(e,b,"linePrefix",s+1)(t):b(t)}function b(t){return null===t||cn(t)?e.check(nr,f,v)(t):(e.enter("codeFlowValue"),g(t))}function g(t){return null===t||cn(t)?(e.exit("codeFlowValue"),b(t)):(e.consume(t),g)}function v(i){return e.exit("codeFenced"),t(i)}}};const sr={name:"characterReference",tokenize:function(e,t,i){const o=this;let n,r,s=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),a};function a(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),n=31,r=on,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),n=6,r=an,c):(e.enter("characterReferenceValue"),n=7,r=sn,c(t))}function c(a){if(59===a&&s){const n=e.exit("characterReferenceValue");return r!==on||Wo(o.sliceSerialize(n))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):i(a)}return r(a)&&s++<n?(e.consume(a),c):i(a)}}};const ar={name:"characterEscape",tokenize:function(e,t,i){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),o};function o(o){return ln(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):i(o)}}};const lr={name:"lineEnding",tokenize:function(e,t){return function(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),yn(e,t,"linePrefix")}}};function cr(e,t,i){const o=[];let n=-1;for(;++n<e.length;){const r=e[n].resolveAll;r&&!o.includes(r)&&(t=r(t,i),o.push(r))}return t}const dr={name:"labelEnd",resolveAll:function(e){let t=-1;const i=[];for(;++t<e.length;){const o=e[t][1];if(i.push(e[t]),"labelImage"===o.type||"labelLink"===o.type||"labelEnd"===o.type){const e="labelImage"===o.type?4:2;o.type="data",t+=e}}e.length!==i.length&&Vo(e,0,e.length,i);return e},resolveTo:function(e,t){let i,o,n,r,s=e.length,a=0;for(;s--;)if(i=e[s][1],o){if("link"===i.type||"labelLink"===i.type&&i._inactive)break;"enter"===e[s][0]&&"labelLink"===i.type&&(i._inactive=!0)}else if(n){if("enter"===e[s][0]&&("labelImage"===i.type||"labelLink"===i.type)&&!i._balanced&&(o=s,"labelLink"!==i.type)){a=2;break}}else"labelEnd"===i.type&&(n=s);const l={type:"labelLink"===e[o][1].type?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[o][1].start},end:{...e[n][1].end}},d={type:"labelText",start:{...e[o+a+2][1].end},end:{...e[n-2][1].start}};return r=[["enter",l,t],["enter",c,t]],r=Go(r,e.slice(o+1,o+a+3)),r=Go(r,[["enter",d,t]]),r=Go(r,cr(t.parser.constructs.insideSpan.null,e.slice(o+a+4,n-3),t)),r=Go(r,[["exit",d,t],e[n-2],e[n-1],["exit",c,t]]),r=Go(r,e.slice(n+1)),r=Go(r,[["exit",l,t]]),Vo(e,o,e.length,r),e},tokenize:function(e,t,i){const o=this;let n,r,s=o.events.length;for(;s--;)if(("labelImage"===o.events[s][1].type||"labelLink"===o.events[s][1].type)&&!o.events[s][1]._balanced){n=o.events[s][1];break}return function(t){if(!n)return i(t);if(n._inactive)return d(t);return r=o.parser.defined.includes(en(o.sliceSerialize({start:n.end,end:o.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),a};function a(t){return 40===t?e.attempt(hr,c,r?c:d)(t):91===t?e.attempt(ur,c,r?l:d)(t):r?c(t):d(t)}function l(t){return e.attempt(fr,c,d)(t)}function c(e){return t(e)}function d(e){return n._balanced=!0,i(e)}}},hr={tokenize:function(e,t,i){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),o};function o(t){return dn(t)?Vn(e,n)(t):n(t)}function n(t){return 41===t?c(t):jn(e,r,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function r(t){return dn(t)?Vn(e,a)(t):c(t)}function s(e){return i(e)}function a(t){return 34===t||39===t||40===t?Wn(e,l,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return dn(t)?Vn(e,c)(t):c(t)}function c(o){return 41===o?(e.enter("resourceMarker"),e.consume(o),e.exit("resourceMarker"),e.exit("resource"),t):i(o)}}},ur={tokenize:function(e,t,i){const o=this;return function(t){return Hn.call(o,e,n,r,"reference","referenceMarker","referenceString")(t)};function n(e){return o.parser.defined.includes(en(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?t(e):i(e)}function r(e){return i(e)}}},fr={tokenize:function(e,t,i){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),o};function o(o){return 93===o?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):i(o)}}};const pr={name:"labelStartImage",resolveAll:dr.resolveAll,tokenize:function(e,t,i){const o=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),n};function n(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),r):i(t)}function r(e){return 94===e&&"_hiddenFootnoteSupport"in o.parser.constructs?i(e):t(e)}}};function mr(e){return null===e||dn(e)||fn(e)?1:un(e)?2:void 0}const br={name:"attention",resolveAll:function(e,t){let i,o,n,r,s,a,l,c,d=-1;for(;++d<e.length;)if("enter"===e[d][0]&&"attentionSequence"===e[d][1].type&&e[d][1]._close)for(i=d;i--;)if("exit"===e[i][0]&&"attentionSequence"===e[i][1].type&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[d][1]).charCodeAt(0)){if((e[i][1]._close||e[d][1]._open)&&(e[d][1].end.offset-e[d][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[d][1].end.offset-e[d][1].start.offset)%3))continue;a=e[i][1].end.offset-e[i][1].start.offset>1&&e[d][1].end.offset-e[d][1].start.offset>1?2:1;const h={...e[i][1].end},u={...e[d][1].start};gr(h,-a),gr(u,a),r={type:a>1?"strongSequence":"emphasisSequence",start:h,end:{...e[i][1].end}},s={type:a>1?"strongSequence":"emphasisSequence",start:{...e[d][1].start},end:u},n={type:a>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[d][1].start}},o={type:a>1?"strong":"emphasis",start:{...r.start},end:{...s.end}},e[i][1].end={...r.start},e[d][1].start={...s.end},l=[],e[i][1].end.offset-e[i][1].start.offset&&(l=Go(l,[["enter",e[i][1],t],["exit",e[i][1],t]])),l=Go(l,[["enter",o,t],["enter",r,t],["exit",r,t],["enter",n,t]]),l=Go(l,cr(t.parser.constructs.insideSpan.null,e.slice(i+1,d),t)),l=Go(l,[["exit",n,t],["enter",s,t],["exit",s,t],["exit",o,t]]),e[d][1].end.offset-e[d][1].start.offset?(c=2,l=Go(l,[["enter",e[d][1],t],["exit",e[d][1],t]])):c=0,Vo(e,i-1,d-i+3,l),d=i+l.length-c-2;break}d=-1;for(;++d<e.length;)"attentionSequence"===e[d][1].type&&(e[d][1].type="data");return e},tokenize:function(e,t){const i=this.parser.constructs.attentionMarkers.null,o=this.previous,n=mr(o);let r;return function(t){return r=t,e.enter("attentionSequence"),s(t)};function s(a){if(a===r)return e.consume(a),s;const l=e.exit("attentionSequence"),c=mr(a),d=!c||2===c&&n||i.includes(a),h=!n||2===n&&c||i.includes(o);return l._open=Boolean(42===r?d:d&&(n||!h)),l._close=Boolean(42===r?h:h&&(c||!d)),t(a)}}};function gr(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const vr={name:"autolink",tokenize:function(e,t,i){let o=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),n};function n(t){return tn(t)?(e.consume(t),r):64===t?i(t):l(t)}function r(e){return 43===e||45===e||46===e||on(e)?(o=1,s(e)):l(e)}function s(t){return 58===t?(e.consume(t),o=0,a):(43===t||45===t||46===t||on(t))&&o++<32?(e.consume(t),s):(o=0,l(t))}function a(o){return 62===o?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(o),e.exit("autolinkMarker"),e.exit("autolink"),t):null===o||32===o||60===o||rn(o)?i(o):(e.consume(o),a)}function l(t){return 64===t?(e.consume(t),c):nn(t)?(e.consume(t),l):i(t)}function c(e){return on(e)?d(e):i(e)}function d(i){return 46===i?(e.consume(i),o=0,c):62===i?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(i),e.exit("autolinkMarker"),e.exit("autolink"),t):h(i)}function h(t){if((45===t||on(t))&&o++<63){const i=45===t?h:d;return e.consume(t),i}return i(t)}}};const wr={name:"htmlText",tokenize:function(e,t,i){const o=this;let n,r,s;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),a};function a(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),y):63===t?(e.consume(t),v):tn(t)?(e.consume(t),S):i(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),r=0,f):tn(t)?(e.consume(t),g):i(t)}function c(t){return 45===t?(e.consume(t),u):i(t)}function d(t){return null===t?i(t):45===t?(e.consume(t),h):cn(t)?(s=d,T(t)):(e.consume(t),d)}function h(t){return 45===t?(e.consume(t),u):d(t)}function u(e){return 62===e?A(e):45===e?h(e):d(e)}function f(t){const o="CDATA[";return t===o.charCodeAt(r++)?(e.consume(t),6===r?p:f):i(t)}function p(t){return null===t?i(t):93===t?(e.consume(t),m):cn(t)?(s=p,T(t)):(e.consume(t),p)}function m(t){return 93===t?(e.consume(t),b):p(t)}function b(t){return 62===t?A(t):93===t?(e.consume(t),b):p(t)}function g(t){return null===t||62===t?A(t):cn(t)?(s=g,T(t)):(e.consume(t),g)}function v(t){return null===t?i(t):63===t?(e.consume(t),w):cn(t)?(s=v,T(t)):(e.consume(t),v)}function w(e){return 62===e?A(e):v(e)}function y(t){return tn(t)?(e.consume(t),x):i(t)}function x(t){return 45===t||on(t)?(e.consume(t),x):k(t)}function k(t){return cn(t)?(s=k,T(t)):hn(t)?(e.consume(t),k):A(t)}function S(t){return 45===t||on(t)?(e.consume(t),S):47===t||62===t||dn(t)?$(t):i(t)}function $(t){return 47===t?(e.consume(t),A):58===t||95===t||tn(t)?(e.consume(t),z):cn(t)?(s=$,T(t)):hn(t)?(e.consume(t),$):A(t)}function z(t){return 45===t||46===t||58===t||95===t||on(t)?(e.consume(t),z):_(t)}function _(t){return 61===t?(e.consume(t),C):cn(t)?(s=_,T(t)):hn(t)?(e.consume(t),_):$(t)}function C(t){return null===t||60===t||61===t||62===t||96===t?i(t):34===t||39===t?(e.consume(t),n=t,I):cn(t)?(s=C,T(t)):hn(t)?(e.consume(t),C):(e.consume(t),L)}function I(t){return t===n?(e.consume(t),n=void 0,E):null===t?i(t):cn(t)?(s=I,T(t)):(e.consume(t),I)}function L(t){return null===t||34===t||39===t||60===t||61===t||96===t?i(t):47===t||62===t||dn(t)?$(t):(e.consume(t),L)}function E(e){return 47===e||62===e||dn(e)?$(e):i(e)}function A(o){return 62===o?(e.consume(o),e.exit("htmlTextData"),e.exit("htmlText"),t):i(o)}function T(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),P}function P(t){return hn(t)?yn(e,D,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):D(t)}function D(t){return e.enter("htmlTextData"),s(t)}}};const yr={name:"labelStartLink",resolveAll:dr.resolveAll,tokenize:function(e,t,i){const o=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),n};function n(e){return 94===e&&"_hiddenFootnoteSupport"in o.parser.constructs?i(e):t(e)}}};const xr={name:"hardBreakEscape",tokenize:function(e,t,i){return function(t){return e.enter("hardBreakEscape"),e.consume(t),o};function o(o){return cn(o)?(e.exit("hardBreakEscape"),t(o)):i(o)}}};const kr={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,i,o=e.length-4,n=3;if(!("lineEnding"!==e[n][1].type&&"space"!==e[n][1].type||"lineEnding"!==e[o][1].type&&"space"!==e[o][1].type))for(t=n;++t<o;)if("codeTextData"===e[t][1].type){e[n][1].type="codeTextPadding",e[o][1].type="codeTextPadding",n+=2,o-=2;break}t=n-1,o++;for(;++t<=o;)void 0===i?t!==o&&"lineEnding"!==e[t][1].type&&(i=t):t!==o&&"lineEnding"!==e[t][1].type||(e[i][1].type="codeTextData",t!==i+2&&(e[i][1].end=e[t-1][1].end,e.splice(i+2,t-i-2),o-=t-i-2,t=i+2),i=void 0);return e},tokenize:function(e,t,i){let o,n,r=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),s(t)};function s(t){return 96===t?(e.consume(t),r++,s):(e.exit("codeTextSequence"),a(t))}function a(t){return null===t?i(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),a):96===t?(n=e.enter("codeTextSequence"),o=0,c(t)):cn(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||cn(t)?(e.exit("codeTextData"),a(t)):(e.consume(t),l)}function c(i){return 96===i?(e.consume(i),o++,c):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(i)):(n.type="codeTextData",l(i))}}};const Sr={42:Un,43:Un,45:Un,48:Un,49:Un,50:Un,51:Un,52:Un,53:Un,54:Un,55:Un,56:Un,57:Un,62:qn},$r={91:Gn},zr={[-2]:Yn,[-1]:Yn,32:Yn},_r={35:Zn,42:On,45:[Jn,On],60:tr,61:Jn,95:On,96:rr,126:rr},Cr={38:sr,92:ar},Ir={[-5]:lr,[-4]:lr,[-3]:lr,33:pr,38:sr,42:br,60:[vr,wr],91:yr,92:[xr,ar],93:dr,95:br,96:kr},Lr={null:[br,Tn]},Er={null:[42,95]},Ar={null:[]};function Tr(e,t,i){let o={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const n={},r=[];let s=[],a=[],l=!0;const c={attempt:v((function(e,t){w(e,t.from)})),check:v(g),consume:function(e){cn(e)?(o.line++,o.column=1,o.offset+=-3===e?2:1,y()):-1!==e&&(o.column++,o.offset++);o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===s[o._index].length&&(o._bufferIndex=-1,o._index++));d.previous=e,l=!0},enter:function(e,t){const i=t||{};return i.type=e,i.start=p(),d.events.push(["enter",i,d]),a.push(i),i},exit:function(e){const t=a.pop();return t.end=p(),d.events.push(["exit",t,d]),t},interrupt:v(g,{interrupt:!0})},d={code:null,containerState:{},defineSkip:function(e){n[e.line]=e.column,y()},events:[],now:p,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let i=-1;const o=[];let n;for(;++i<e.length;){const r=e[i];let s;if("string"==typeof r)s=r;else switch(r){case-5:s="\r";break;case-4:s="\n";break;case-3:s="\r\n";break;case-2:s=t?" ":"\t";break;case-1:if(!t&&n)continue;s=" ";break;default:s=String.fromCharCode(r)}n=-2===r,o.push(s)}return o.join("")}(f(e),t)},sliceStream:f,write:function(e){if(s=Go(s,e),m(),null!==s[s.length-1])return[];return w(t,0),d.events=cr(r,d.events,d),d.events}};let h,u=t.tokenize.call(d,c);return t.resolveAll&&r.push(t),d;function f(e){return function(e,t){const i=t.start._index,o=t.start._bufferIndex,n=t.end._index,r=t.end._bufferIndex;let s;if(i===n)s=[e[i].slice(o,r)];else{if(s=e.slice(i,n),o>-1){const e=s[0];"string"==typeof e?s[0]=e.slice(o):s.shift()}r>0&&s.push(e[n].slice(0,r))}return s}(s,e)}function p(){const{_bufferIndex:e,_index:t,line:i,column:n,offset:r}=o;return{_bufferIndex:e,_index:t,line:i,column:n,offset:r}}function m(){let e;for(;o._index<s.length;){const t=s[o._index];if("string"==typeof t)for(e=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===e&&o._bufferIndex<t.length;)b(t.charCodeAt(o._bufferIndex));else b(t)}}function b(e){l=void 0,h=e,u=u(e)}function g(e,t){t.restore()}function v(e,t){return function(i,n,r){let s,h,u,f;return Array.isArray(i)?m(i):"tokenize"in i?m([i]):function(e){return t;function t(t){const i=null!==t&&e[t],o=null!==t&&e.null;return m([...Array.isArray(i)?i:i?[i]:[],...Array.isArray(o)?o:o?[o]:[]])(t)}}(i);function m(e){return s=e,h=0,0===e.length?r:b(e[h])}function b(e){return function(i){f=function(){const e=p(),t=d.previous,i=d.currentConstruct,n=d.events.length,r=Array.from(a);return{from:n,restore:s};function s(){o=e,d.previous=t,d.currentConstruct=i,d.events.length=n,a=r,y()}}(),u=e,e.partial||(d.currentConstruct=e);if(e.name&&d.parser.constructs.disable.null.includes(e.name))return v(i);return e.tokenize.call(t?Object.assign(Object.create(d),t):d,c,g,v)(i)}}function g(t){return l=!0,e(u,f),n}function v(e){return l=!0,f.restore(),++h<s.length?b(s[h]):r}}}function w(e,t){e.resolveAll&&!r.includes(e)&&r.push(e),e.resolve&&Vo(d.events,t,d.events.length-t,e.resolve(d.events.slice(t),d)),e.resolveTo&&(d.events=e.resolveTo(d.events,d))}function y(){o.line in n&&o.column<2&&(o.column=n[o.line],o.offset+=n[o.line]-1)}}function Pr(t){const i={constructs:function(e){const t={};let i=-1;for(;++i<e.length;)Yo(t,e[i]);return t}([e,...(t||{}).extensions||[]]),content:o(xn),defined:[],document:o(kn),flow:o(An),lazy:{},string:o(Pn),text:o(Dn)};return i;function o(e){return function(t){return Tr(i,e,t)}}}const Dr=/[\0\t\n\r]/g;function Fr(e,t,i){return"string"!=typeof t&&(i=t,t=void 0),wn(i)(function(e){for(;!Cn(e););return e}(Pr(i).document().write(function(){let e,t=1,i="",o=!0;return function(n,r,s){const a=[];let l,c,d,h,u;for(n=i+("string"==typeof n?n.toString():new TextDecoder(r||void 0).decode(n)),d=0,i="",o&&(65279===n.charCodeAt(0)&&d++,o=void 0);d<n.length;){if(Dr.lastIndex=d,l=Dr.exec(n),h=l&&void 0!==l.index?l.index:n.length,u=n.charCodeAt(h),!l){i=n.slice(d);break}if(10===u&&d===h&&e)a.push(-3),e=void 0;else switch(e&&(a.push(-5),e=void 0),d<h&&(a.push(n.slice(d,h)),t+=h-d),u){case 0:a.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),a.push(-2);t++<c;)a.push(-1);break;case 10:a.push(-4),t=1;break;default:e=!0,t=1}d=h+1}return s&&(e&&a.push(-5),i&&a.push(i),a.push(null)),a}}()(e,t,!0))))}function Mr(e){let t=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:function(e,i,o){const n=this.previous,r=this.events;let s=0;return function(t){if(126===n&&"characterEscape"!==r[r.length-1][1].type)return o(t);return e.enter("strikethroughSequenceTemporary"),a(t)};function a(r){const l=mr(n);if(126===r)return s>1?o(r):(e.consume(r),s++,a);if(s<2&&!t)return o(r);const c=e.exit("strikethroughSequenceTemporary"),d=mr(r);return c._open=!d||2===d&&Boolean(l),c._close=!l||2===l&&Boolean(d),i(r)}},resolveAll:function(e,t){let i=-1;for(;++i<e.length;)if("enter"===e[i][0]&&"strikethroughSequenceTemporary"===e[i][1].type&&e[i][1]._close){let o=i;for(;o--;)if("exit"===e[o][0]&&"strikethroughSequenceTemporary"===e[o][1].type&&e[o][1]._open&&e[i][1].end.offset-e[i][1].start.offset==e[o][1].end.offset-e[o][1].start.offset){e[i][1].type="strikethroughSequence",e[o][1].type="strikethroughSequence";const n={type:"strikethrough",start:Object.assign({},e[o][1].start),end:Object.assign({},e[i][1].end)},r={type:"strikethroughText",start:Object.assign({},e[o][1].end),end:Object.assign({},e[i][1].start)},s=[["enter",n,t],["enter",e[o][1],t],["exit",e[o][1],t],["enter",r,t]],a=t.parser.constructs.insideSpan.null;a&&Vo(s,s.length,0,cr(a,e.slice(o+1,i),t)),Vo(s,s.length,0,[["exit",r,t],["enter",e[i][1],t],["exit",e[i][1],t],["exit",n,t]]),Vo(e,o-1,i-o+3,s),i=o+s.length-2;break}}i=-1;for(;++i<e.length;)"strikethroughSequenceTemporary"===e[i][1].type&&(e[i][1].type="data");return e}};return null==t&&(t=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}}}let Rr=class extends me{constructor(){super(...arguments),this.value=""}render(){return jo`${(e=>({_$litStatic$:e,r:Oo}))(Fr(this.value,{extensions:[Mr()],htmlExtensions:[{enter:{strikethrough(){this.tag("<del>")}},exit:{strikethrough(){this.tag("</del>")}}}]}))}`}};Rr.styles=[h`
|
|
3517
3517
|
h1,
|
|
3518
3518
|
h2,
|
|
3519
3519
|
h3,
|
|
@@ -3547,7 +3547,7 @@ const To=Symbol.for(""),Po=e=>{if(e?.r===To)return e?._$litStatic$},Do=(e,...t)=
|
|
|
3547
3547
|
p:last-child {
|
|
3548
3548
|
margin-bottom: 0;
|
|
3549
3549
|
}
|
|
3550
|
-
`],t([ye({type:String})],
|
|
3550
|
+
`],t([ye({type:String})],Rr.prototype,"value",void 0),Rr=t([ge("wr-coll-description")],Rr);var Or=h`
|
|
3551
3551
|
:host {
|
|
3552
3552
|
display: inline-block;
|
|
3553
3553
|
color: var(--sl-color-neutral-600);
|
|
@@ -3594,7 +3594,7 @@ const To=Symbol.for(""),Po=e=>{if(e?.r===To)return e?._$litStatic$},Do=(e,...t)=
|
|
|
3594
3594
|
.icon-button__icon {
|
|
3595
3595
|
pointer-events: none;
|
|
3596
3596
|
}
|
|
3597
|
-
`,
|
|
3597
|
+
`,Ur=h`
|
|
3598
3598
|
:host {
|
|
3599
3599
|
display: inline-block;
|
|
3600
3600
|
width: 1em;
|
|
@@ -3607,7 +3607,7 @@ const To=Symbol.for(""),Po=e=>{if(e?.r===To)return e?._$litStatic$},Do=(e,...t)=
|
|
|
3607
3607
|
height: 100%;
|
|
3608
3608
|
width: 100%;
|
|
3609
3609
|
}
|
|
3610
|
-
`;function
|
|
3610
|
+
`;function Br(e,t){const i=wi({waitUntilFirstUpdate:!1},t);return(t,o)=>{const{update:n}=t,r=Array.isArray(e)?e:[e];t.update=function(e){r.forEach((t=>{const n=t;if(e.has(n)){const t=e.get(n),r=this[n];t!==r&&(i.waitUntilFirstUpdate&&!this.hasUpdated||this[o](t,r))}})),n.call(this,e)}}}var Nr=h`
|
|
3611
3611
|
:host {
|
|
3612
3612
|
box-sizing: border-box;
|
|
3613
3613
|
}
|
|
@@ -3621,18 +3621,18 @@ const To=Symbol.for(""),Po=e=>{if(e?.r===To)return e?._$litStatic$},Do=(e,...t)=
|
|
|
3621
3621
|
[hidden] {
|
|
3622
3622
|
display: none !important;
|
|
3623
3623
|
}
|
|
3624
|
-
`,
|
|
3624
|
+
`,qr=class extends me{constructor(){super(),Object.entries(this.constructor.dependencies).forEach((([e,t])=>{this.constructor.define(e,t)}))}emit(e,t){const i=new CustomEvent(e,wi({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(i),i}static define(e,t=this,i={}){const o=customElements.get(e);if(!o)return void customElements.define(e,class extends t{},i);let n=" (unknown version)",r=n;"version"in t&&t.version&&(n=" v"+t.version),"version"in o&&o.version&&(r=" v"+o.version),n&&r&&n===r||console.warn(`Attempted to register <${e}>${n}, but <${e}>${r} has already been registered.`)}};qr.version="2.15.1",qr.dependencies={},xi([ye()],qr.prototype,"dir",2),xi([ye()],qr.prototype,"lang",2);var jr,Hr=Symbol(),Wr=Symbol(),Vr=new Map,Gr=class extends qr{constructor(){super(...arguments),this.initialRender=!1,this.svg=null,this.label="",this.library="default"}async resolveIcon(e,t){var i;let o;if(null==t?void 0:t.spriteSheet){this.svg=Q`<svg part="svg">
|
|
3625
3625
|
<use part="use" href="${e}"></use>
|
|
3626
|
-
</svg>`,await this.updateComplete;const i=this.shadowRoot.querySelector("[part='svg']");return"function"==typeof t.mutator&&t.mutator(i),this.svg}try{if(o=await fetch(e,{mode:"cors"}),!o.ok)return 410===o.status?
|
|
3626
|
+
</svg>`,await this.updateComplete;const i=this.shadowRoot.querySelector("[part='svg']");return"function"==typeof t.mutator&&t.mutator(i),this.svg}try{if(o=await fetch(e,{mode:"cors"}),!o.ok)return 410===o.status?Hr:Wr}catch(e){return Wr}try{const e=document.createElement("div");e.innerHTML=await o.text();const t=e.firstElementChild;if("svg"!==(null==(i=null==t?void 0:t.tagName)?void 0:i.toLowerCase()))return Hr;jr||(jr=new DOMParser);const n=jr.parseFromString(t.outerHTML,"text/html").body.querySelector("svg");return n?(n.part.add("svg"),document.adoptNode(n)):Hr}catch(e){return Hr}}connectedCallback(){var e;super.connectedCallback(),e=this,ai.push(e)}firstUpdated(){this.initialRender=!0,this.setIcon()}disconnectedCallback(){var e;super.disconnectedCallback(),e=this,ai=ai.filter((t=>t!==e))}getIconSource(){const e=li(this.library);return this.name&&e?{url:e.resolver(this.name),fromLibrary:!0}:{url:this.src,fromLibrary:!1}}handleLabelChange(){"string"==typeof this.label&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}async setIcon(){var e;const{url:t,fromLibrary:i}=this.getIconSource(),o=i?li(this.library):void 0;if(!t)return void(this.svg=null);let n=Vr.get(t);if(n||(n=this.resolveIcon(t,o),Vr.set(t,n)),!this.initialRender)return;const r=await n;if(r===Wr&&Vr.delete(t),t===this.getIconSource().url)if(((e,t)=>void 0===t?void 0!==e?._$litType$:e?._$litType$===t)(r))this.svg=r;else switch(r){case Wr:case Hr:this.svg=null,this.emit("sl-error");break;default:this.svg=r.cloneNode(!0),null==(e=null==o?void 0:o.mutator)||e.call(o,this.svg),this.emit("sl-load")}}render(){return this.svg}};Gr.styles=[Nr,Ur],xi([xe()],Gr.prototype,"svg",2),xi([ye({reflect:!0})],Gr.prototype,"name",2),xi([ye()],Gr.prototype,"src",2),xi([ye()],Gr.prototype,"label",2),xi([ye({reflect:!0})],Gr.prototype,"library",2),xi([Br("label")],Gr.prototype,"handleLabelChange",1),xi([Br(["name","src","library"])],Gr.prototype,"setIcon",1);
|
|
3627
3627
|
/**
|
|
3628
3628
|
* @license
|
|
3629
3629
|
* Copyright 2018 Google LLC
|
|
3630
3630
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3631
3631
|
*/
|
|
3632
|
-
const
|
|
3632
|
+
const Kr=Ce(class extends Ie{constructor(e){if(super(e),e.type!==ze||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){if(void 0===this.st){this.st=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in t)t[e]&&!this.nt?.has(e)&&this.st.add(e);return this.render(t)}const i=e.element.classList;for(const e of this.st)e in t||(i.remove(e),this.st.delete(e));for(const e in t){const o=!!t[e];o===this.st.has(e)||this.nt?.has(e)||(o?(i.add(e),this.st.add(e)):(i.remove(e),this.st.delete(e)))}return J}});var Yr=class extends qr{constructor(){super(...arguments),this.hasFocus=!1,this.label="",this.disabled=!1}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleClick(e){this.disabled&&(e.preventDefault(),e.stopPropagation())}click(){this.button.click()}focus(e){this.button.focus(e)}blur(){this.button.blur()}render(){const e=!!this.href,t=e?Bo`a`:Bo`button`;return jo`
|
|
3633
3633
|
<${t}
|
|
3634
3634
|
part="base"
|
|
3635
|
-
class=${
|
|
3635
|
+
class=${Kr({"icon-button":!0,"icon-button--disabled":!e&&this.disabled,"icon-button--focused":this.hasFocus})}
|
|
3636
3636
|
?disabled=${$e(e?void 0:this.disabled)}
|
|
3637
3637
|
type=${$e(e?void 0:"button")}
|
|
3638
3638
|
href=${$e(e?this.href:void 0)}
|
|
@@ -3655,7 +3655,7 @@ const qr=Ce(class extends Ie{constructor(e){if(super(e),e.type!==ze||"class"!==e
|
|
|
3655
3655
|
aria-hidden="true"
|
|
3656
3656
|
></sl-icon>
|
|
3657
3657
|
</${t}>
|
|
3658
|
-
`}};
|
|
3658
|
+
`}};Yr.styles=[Nr,Or],Yr.dependencies={"sl-icon":Gr},xi([Se(".icon-button")],Yr.prototype,"button",2),xi([xe()],Yr.prototype,"hasFocus",2),xi([ye()],Yr.prototype,"name",2),xi([ye()],Yr.prototype,"library",2),xi([ye()],Yr.prototype,"src",2),xi([ye()],Yr.prototype,"href",2),xi([ye()],Yr.prototype,"target",2),xi([ye()],Yr.prototype,"download",2),xi([ye()],Yr.prototype,"label",2),xi([ye({type:Boolean,reflect:!0})],Yr.prototype,"disabled",2);var Qr=new Map,Zr=new WeakMap;function Jr(e){return null!=e?e:{keyframes:[],options:{duration:0}}}function Xr(e,t){return"rtl"===t.toLowerCase()?{keyframes:e.rtlKeyframes||e.keyframes,options:e.options}:e}function es(e,t){Qr.set(e,Jr(t))}function ts(e,t,i){const o=Zr.get(e);if(null==o?void 0:o[t])return Xr(o[t],i.dir);const n=Qr.get(t);return n?Xr(n,i.dir):{keyframes:[],options:{duration:0}}}function is(e,t){return new Promise((i=>{e.addEventListener(t,(function o(n){n.target===e&&(e.removeEventListener(t,o),i())}))}))}function os(e,t,i){return new Promise((o=>{if((null==i?void 0:i.duration)===1/0)throw new Error("Promise-based animations must be finite.");const n=e.animate(t,yi(wi({},i),{duration:rs()?0:i.duration}));n.addEventListener("cancel",o,{once:!0}),n.addEventListener("finish",o,{once:!0})}))}function ns(e){return(e=e.toString().toLowerCase()).indexOf("ms")>-1?parseFloat(e):e.indexOf("s")>-1?1e3*parseFloat(e):parseFloat(e)}function rs(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function ss(e){return Promise.all(e.getAnimations().map((e=>new Promise((t=>{e.cancel(),requestAnimationFrame(t)})))))}const as=new Set,ls=new MutationObserver(ps),cs=new Map;let ds,hs=document.documentElement.dir||"ltr",us=document.documentElement.lang||navigator.language;function fs(...e){e.map((e=>{const t=e.$code.toLowerCase();cs.has(t)?cs.set(t,Object.assign(Object.assign({},cs.get(t)),e)):cs.set(t,e),ds||(ds=e)})),ps()}function ps(){hs=document.documentElement.dir||"ltr",us=document.documentElement.lang||navigator.language,[...as.keys()].map((e=>{"function"==typeof e.requestUpdate&&e.requestUpdate()}))}ls.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]});class ms{constructor(e){this.host=e,this.host.addController(this)}hostConnected(){as.add(this.host)}hostDisconnected(){as.delete(this.host)}dir(){return`${this.host.dir||hs}`.toLowerCase()}lang(){return`${this.host.lang||us}`.toLowerCase()}getTranslationData(e){var t,i;const o=new Intl.Locale(e.replace(/_/g,"-")),n=null==o?void 0:o.language.toLowerCase(),r=null!==(i=null===(t=null==o?void 0:o.region)||void 0===t?void 0:t.toLowerCase())&&void 0!==i?i:"";return{locale:o,language:n,region:r,primary:cs.get(`${n}-${r}`),secondary:cs.get(n)}}exists(e,t){var i;const{primary:o,secondary:n}=this.getTranslationData(null!==(i=t.lang)&&void 0!==i?i:this.lang());return t=Object.assign({includeFallback:!1},t),!!(o&&o[e]||n&&n[e]||t.includeFallback&&ds&&ds[e])}term(e,...t){const{primary:i,secondary:o}=this.getTranslationData(this.lang());let n;if(i&&i[e])n=i[e];else if(o&&o[e])n=o[e];else{if(!ds||!ds[e])return console.error(`No translation found for: ${String(e)}`),String(e);n=ds[e]}return"function"==typeof n?n(...t):n}date(e,t){return e=new Date(e),new Intl.DateTimeFormat(this.lang(),t).format(e)}number(e,t){return e=Number(e),isNaN(e)?"":new Intl.NumberFormat(this.lang(),t).format(e)}relativeTime(e,t,i){return new Intl.RelativeTimeFormat(this.lang(),i).format(e,t)}}var bs={$code:"en",$name:"English",$dir:"ltr",carousel:"Carousel",clearEntry:"Clear entry",close:"Close",copied:"Copied",copy:"Copy",currentValue:"Current value",error:"Error",goToSlide:(e,t)=>`Go to slide ${e} of ${t}`,hidePassword:"Hide password",loading:"Loading",nextSlide:"Next slide",numOptionsSelected:e=>0===e?"No options selected":1===e?"1 option selected":`${e} options selected`,previousSlide:"Previous slide",progress:"Progress",remove:"Remove",resize:"Resize",scrollToEnd:"Scroll to end",scrollToStart:"Scroll to start",selectAColorFromTheScreen:"Select a color from the screen",showPassword:"Show password",slideNum:e=>`Slide ${e}`,toggleColorFormat:"Toggle color format"};fs(bs);var gs=bs,vs=class extends ms{};fs(gs);var ws=class{constructor(e,...t){this.slotNames=[],this.handleSlotChange=e=>{const t=e.target;(this.slotNames.includes("[default]")&&!t.name||t.name&&this.slotNames.includes(t.name))&&this.host.requestUpdate()},(this.host=e).addController(this),this.slotNames=t}hasDefaultSlot(){return[...this.host.childNodes].some((e=>{if(e.nodeType===e.TEXT_NODE&&""!==e.textContent.trim())return!0;if(e.nodeType===e.ELEMENT_NODE){const t=e;if("sl-visually-hidden"===t.tagName.toLowerCase())return!1;if(!t.hasAttribute("slot"))return!0}return!1}))}hasNamedSlot(e){return null!==this.host.querySelector(`:scope > [slot="${e}"]`)}test(e){return"[default]"===e?this.hasDefaultSlot():this.hasNamedSlot(e)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}};var ys=h`
|
|
3659
3659
|
:host {
|
|
3660
3660
|
display: contents;
|
|
3661
3661
|
|
|
@@ -3746,10 +3746,10 @@ const qr=Ce(class extends Ie{constructor(e){if(super(e),e.type!==ze||"class"!==e
|
|
|
3746
3746
|
font-size: var(--sl-font-size-medium);
|
|
3747
3747
|
padding-inline-end: var(--sl-spacing-medium);
|
|
3748
3748
|
}
|
|
3749
|
-
`,
|
|
3749
|
+
`,xs=Object.assign(document.createElement("div"),{className:"sl-toast-stack"}),ks=class extends qr{constructor(){super(...arguments),this.hasSlotController=new ws(this,"icon","suffix"),this.localize=new vs(this),this.open=!1,this.closable=!1,this.variant="primary",this.duration=1/0}firstUpdated(){this.base.hidden=!this.open}restartAutoHide(){clearTimeout(this.autoHideTimeout),this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout((()=>this.hide()),this.duration))}handleCloseClick(){this.hide()}handleMouseMove(){this.restartAutoHide()}async handleOpenChange(){if(this.open){this.emit("sl-show"),this.duration<1/0&&this.restartAutoHide(),await ss(this.base),this.base.hidden=!1;const{keyframes:e,options:t}=ts(this,"alert.show",{dir:this.localize.dir()});await os(this.base,e,t),this.emit("sl-after-show")}else{this.emit("sl-hide"),clearTimeout(this.autoHideTimeout),await ss(this.base);const{keyframes:e,options:t}=ts(this,"alert.hide",{dir:this.localize.dir()});await os(this.base,e,t),this.base.hidden=!0,this.emit("sl-after-hide")}}handleDurationChange(){this.restartAutoHide()}async show(){if(!this.open)return this.open=!0,is(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,is(this,"sl-after-hide")}async toast(){return new Promise((e=>{null===xs.parentElement&&document.body.append(xs),xs.appendChild(this),requestAnimationFrame((()=>{this.clientWidth,this.show()})),this.addEventListener("sl-after-hide",(()=>{xs.removeChild(this),e(),null===xs.querySelector("sl-alert")&&xs.remove()}),{once:!0})}))}render(){return Q`
|
|
3750
3750
|
<div
|
|
3751
3751
|
part="base"
|
|
3752
|
-
class=${
|
|
3752
|
+
class=${Kr({alert:!0,"alert--open":this.open,"alert--closable":this.closable,"alert--has-icon":this.hasSlotController.test("icon"),"alert--primary":"primary"===this.variant,"alert--success":"success"===this.variant,"alert--neutral":"neutral"===this.variant,"alert--warning":"warning"===this.variant,"alert--danger":"danger"===this.variant})}
|
|
3753
3753
|
role="alert"
|
|
3754
3754
|
aria-hidden=${this.open?"false":"true"}
|
|
3755
3755
|
@mousemove=${this.handleMouseMove}
|
|
@@ -3774,7 +3774,7 @@ const qr=Ce(class extends Ie{constructor(e){if(super(e),e.type!==ze||"class"!==e
|
|
|
3774
3774
|
></sl-icon-button>
|
|
3775
3775
|
`:""}
|
|
3776
3776
|
</div>
|
|
3777
|
-
`}};
|
|
3777
|
+
`}};ks.styles=[Nr,ys],ks.dependencies={"sl-icon-button":Yr},xi([Se('[part~="base"]')],ks.prototype,"base",2),xi([ye({type:Boolean,reflect:!0})],ks.prototype,"open",2),xi([ye({type:Boolean,reflect:!0})],ks.prototype,"closable",2),xi([ye({reflect:!0})],ks.prototype,"variant",2),xi([ye({type:Number})],ks.prototype,"duration",2),xi([Br("open",{waitUntilFirstUpdate:!0})],ks.prototype,"handleOpenChange",1),xi([Br("duration")],ks.prototype,"handleDurationChange",1),es("alert.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),es("alert.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}});ks.define("sl-alert");var Ss=h`
|
|
3778
3778
|
:host {
|
|
3779
3779
|
--track-width: 2px;
|
|
3780
3780
|
--track-color: rgb(128 128 128 / 25%);
|
|
@@ -3831,12 +3831,12 @@ const qr=Ce(class extends Ie{constructor(e){if(super(e),e.type!==ze||"class"!==e
|
|
|
3831
3831
|
stroke-dasharray: 0.05em, 3em;
|
|
3832
3832
|
}
|
|
3833
3833
|
}
|
|
3834
|
-
|
|
3834
|
+
`,$s=class extends qr{constructor(){super(...arguments),this.localize=new vs(this)}render(){return Q`
|
|
3835
3835
|
<svg part="base" class="spinner" role="progressbar" aria-label=${this.localize.term("loading")}>
|
|
3836
3836
|
<circle class="spinner__track"></circle>
|
|
3837
3837
|
<circle class="spinner__indicator"></circle>
|
|
3838
3838
|
</svg>
|
|
3839
|
-
`}}
|
|
3839
|
+
`}};$s.styles=[Nr,Ss];var zs=new WeakMap,_s=new WeakMap,Cs=new WeakMap,Is=new WeakSet,Ls=new WeakMap,Es=class{constructor(e,t){this.handleFormData=e=>{const t=this.options.disabled(this.host),i=this.options.name(this.host),o=this.options.value(this.host),n="sl-button"===this.host.tagName.toLowerCase();this.host.isConnected&&!t&&!n&&"string"==typeof i&&i.length>0&&void 0!==o&&(Array.isArray(o)?o.forEach((t=>{e.formData.append(i,t.toString())})):e.formData.append(i,o.toString()))},this.handleFormSubmit=e=>{var t;const i=this.options.disabled(this.host),o=this.options.reportValidity;this.form&&!this.form.noValidate&&(null==(t=zs.get(this.form))||t.forEach((e=>{this.setUserInteracted(e,!0)}))),!this.form||this.form.noValidate||i||o(this.host)||(e.preventDefault(),e.stopImmediatePropagation())},this.handleFormReset=()=>{this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),Ls.set(this.host,[])},this.handleInteraction=e=>{const t=Ls.get(this.host);t.includes(e.type)||t.push(e.type),t.length===this.options.assumeInteractionOn.length&&this.setUserInteracted(this.host,!0)},this.checkFormValidity=()=>{if(this.form&&!this.form.noValidate){const e=this.form.querySelectorAll("*");for(const t of e)if("function"==typeof t.checkValidity&&!t.checkValidity())return!1}return!0},this.reportFormValidity=()=>{if(this.form&&!this.form.noValidate){const e=this.form.querySelectorAll("*");for(const t of e)if("function"==typeof t.reportValidity&&!t.reportValidity())return!1}return!0},(this.host=e).addController(this),this.options=wi({form:e=>{const t=e.form;if(t){const i=e.getRootNode().querySelector(`#${t}`);if(i)return i}return e.closest("form")},name:e=>e.name,value:e=>e.value,defaultValue:e=>e.defaultValue,disabled:e=>{var t;return null!=(t=e.disabled)&&t},reportValidity:e=>"function"!=typeof e.reportValidity||e.reportValidity(),checkValidity:e=>"function"!=typeof e.checkValidity||e.checkValidity(),setValue:(e,t)=>e.value=t,assumeInteractionOn:["sl-input"]},t)}hostConnected(){const e=this.options.form(this.host);e&&this.attachForm(e),Ls.set(this.host,[]),this.options.assumeInteractionOn.forEach((e=>{this.host.addEventListener(e,this.handleInteraction)}))}hostDisconnected(){this.detachForm(),Ls.delete(this.host),this.options.assumeInteractionOn.forEach((e=>{this.host.removeEventListener(e,this.handleInteraction)}))}hostUpdated(){const e=this.options.form(this.host);e||this.detachForm(),e&&this.form!==e&&(this.detachForm(),this.attachForm(e)),this.host.hasUpdated&&this.setValidity(this.host.validity.valid)}attachForm(e){e?(this.form=e,zs.has(this.form)?zs.get(this.form).add(this.host):zs.set(this.form,new Set([this.host])),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),_s.has(this.form)||(_s.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity()),Cs.has(this.form)||(Cs.set(this.form,this.form.checkValidity),this.form.checkValidity=()=>this.checkFormValidity())):this.form=void 0}detachForm(){if(!this.form)return;const e=zs.get(this.form);e&&(e.delete(this.host),e.size<=0&&(this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),_s.has(this.form)&&(this.form.reportValidity=_s.get(this.form),_s.delete(this.form)),Cs.has(this.form)&&(this.form.checkValidity=Cs.get(this.form),Cs.delete(this.form)),this.form=void 0))}setUserInteracted(e,t){t?Is.add(e):Is.delete(e),e.requestUpdate()}doAction(e,t){if(this.form){const i=document.createElement("button");i.type=e,i.style.position="absolute",i.style.width="0",i.style.height="0",i.style.clipPath="inset(50%)",i.style.overflow="hidden",i.style.whiteSpace="nowrap",t&&(i.name=t.name,i.value=t.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach((e=>{t.hasAttribute(e)&&i.setAttribute(e,t.getAttribute(e))}))),this.form.append(i),i.click(),i.remove()}}getForm(){var e;return null!=(e=this.form)?e:null}reset(e){this.doAction("reset",e)}submit(e){this.doAction("submit",e)}setValidity(e){const t=this.host,i=Boolean(Is.has(t)),o=Boolean(t.required);t.toggleAttribute("data-required",o),t.toggleAttribute("data-optional",!o),t.toggleAttribute("data-invalid",!e),t.toggleAttribute("data-valid",e),t.toggleAttribute("data-user-invalid",!e&&i),t.toggleAttribute("data-user-valid",e&&i)}updateValidity(){const e=this.host;this.setValidity(e.validity.valid)}emitInvalidEvent(e){const t=new CustomEvent("sl-invalid",{bubbles:!1,composed:!1,cancelable:!0,detail:{}});e||t.preventDefault(),this.host.dispatchEvent(t)||null==e||e.preventDefault()}},As=Object.freeze({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1}),Ts=(Object.freeze(yi(wi({},As),{valid:!1,valueMissing:!0})),Object.freeze(yi(wi({},As),{valid:!1,customError:!0})),h`
|
|
3840
3840
|
:host {
|
|
3841
3841
|
display: inline-block;
|
|
3842
3842
|
position: relative;
|
|
@@ -4429,10 +4429,10 @@ const qr=Ce(class extends Ie{constructor(e){if(super(e),e.type!==ze||"class"!==e
|
|
|
4429
4429
|
:host([data-sl-button-group__button][checked]) {
|
|
4430
4430
|
z-index: 2;
|
|
4431
4431
|
}
|
|
4432
|
-
`),
|
|
4432
|
+
`),Ps=class extends qr{constructor(){super(...arguments),this.formControlController=new Es(this,{assumeInteractionOn:["click"]}),this.hasSlotController=new ws(this,"[default]","prefix","suffix"),this.localize=new vs(this),this.hasFocus=!1,this.invalid=!1,this.title="",this.variant="default",this.size="medium",this.caret=!1,this.disabled=!1,this.loading=!1,this.outline=!1,this.pill=!1,this.circle=!1,this.type="button",this.name="",this.value="",this.href="",this.rel="noreferrer noopener"}get validity(){return this.isButton()?this.button.validity:As}get validationMessage(){return this.isButton()?this.button.validationMessage:""}firstUpdated(){this.isButton()&&this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleClick(){"submit"===this.type&&this.formControlController.submit(this),"reset"===this.type&&this.formControlController.reset(this)}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}isButton(){return!this.href}isLink(){return!!this.href}handleDisabledChange(){this.isButton()&&this.formControlController.setValidity(this.disabled)}click(){this.button.click()}focus(e){this.button.focus(e)}blur(){this.button.blur()}checkValidity(){return!this.isButton()||this.button.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return!this.isButton()||this.button.reportValidity()}setCustomValidity(e){this.isButton()&&(this.button.setCustomValidity(e),this.formControlController.updateValidity())}render(){const e=this.isLink(),t=e?Bo`a`:Bo`button`;return jo`
|
|
4433
4433
|
<${t}
|
|
4434
4434
|
part="base"
|
|
4435
|
-
class=${
|
|
4435
|
+
class=${Kr({button:!0,"button--default":"default"===this.variant,"button--primary":"primary"===this.variant,"button--success":"success"===this.variant,"button--neutral":"neutral"===this.variant,"button--warning":"warning"===this.variant,"button--danger":"danger"===this.variant,"button--text":"text"===this.variant,"button--small":"small"===this.size,"button--medium":"medium"===this.size,"button--large":"large"===this.size,"button--caret":this.caret,"button--circle":this.circle,"button--disabled":this.disabled,"button--focused":this.hasFocus,"button--loading":this.loading,"button--standard":!this.outline,"button--outline":this.outline,"button--pill":this.pill,"button--rtl":"rtl"===this.localize.dir(),"button--has-label":this.hasSlotController.test("[default]"),"button--has-prefix":this.hasSlotController.test("prefix"),"button--has-suffix":this.hasSlotController.test("suffix")})}
|
|
4436
4436
|
?disabled=${$e(e?void 0:this.disabled)}
|
|
4437
4437
|
type=${$e(e?void 0:this.type)}
|
|
4438
4438
|
title=${this.title}
|
|
@@ -4453,10 +4453,10 @@ const qr=Ce(class extends Ie{constructor(e){if(super(e),e.type!==ze||"class"!==e
|
|
|
4453
4453
|
<slot name="prefix" part="prefix" class="button__prefix"></slot>
|
|
4454
4454
|
<slot part="label" class="button__label"></slot>
|
|
4455
4455
|
<slot name="suffix" part="suffix" class="button__suffix"></slot>
|
|
4456
|
-
${this.caret?
|
|
4457
|
-
${this.loading?
|
|
4456
|
+
${this.caret?jo` <sl-icon part="caret" class="button__caret" library="system" name="caret"></sl-icon> `:""}
|
|
4457
|
+
${this.loading?jo`<sl-spinner part="spinner"></sl-spinner>`:""}
|
|
4458
4458
|
</${t}>
|
|
4459
|
-
`}};
|
|
4459
|
+
`}};Ps.styles=[Nr,Ts],Ps.dependencies={"sl-icon":Gr,"sl-spinner":$s},xi([Se(".button")],Ps.prototype,"button",2),xi([xe()],Ps.prototype,"hasFocus",2),xi([xe()],Ps.prototype,"invalid",2),xi([ye()],Ps.prototype,"title",2),xi([ye({reflect:!0})],Ps.prototype,"variant",2),xi([ye({reflect:!0})],Ps.prototype,"size",2),xi([ye({type:Boolean,reflect:!0})],Ps.prototype,"caret",2),xi([ye({type:Boolean,reflect:!0})],Ps.prototype,"disabled",2),xi([ye({type:Boolean,reflect:!0})],Ps.prototype,"loading",2),xi([ye({type:Boolean,reflect:!0})],Ps.prototype,"outline",2),xi([ye({type:Boolean,reflect:!0})],Ps.prototype,"pill",2),xi([ye({type:Boolean,reflect:!0})],Ps.prototype,"circle",2),xi([ye()],Ps.prototype,"type",2),xi([ye()],Ps.prototype,"name",2),xi([ye()],Ps.prototype,"value",2),xi([ye()],Ps.prototype,"href",2),xi([ye()],Ps.prototype,"target",2),xi([ye()],Ps.prototype,"rel",2),xi([ye()],Ps.prototype,"download",2),xi([ye()],Ps.prototype,"form",2),xi([ye({attribute:"formaction"})],Ps.prototype,"formAction",2),xi([ye({attribute:"formenctype"})],Ps.prototype,"formEnctype",2),xi([ye({attribute:"formmethod"})],Ps.prototype,"formMethod",2),xi([ye({attribute:"formnovalidate",type:Boolean})],Ps.prototype,"formNoValidate",2),xi([ye({attribute:"formtarget"})],Ps.prototype,"formTarget",2),xi([Br("disabled",{waitUntilFirstUpdate:!0})],Ps.prototype,"handleDisabledChange",1);Ps.define("sl-button");var Ds=h`
|
|
4460
4460
|
:host {
|
|
4461
4461
|
--max-width: 20rem;
|
|
4462
4462
|
--hide-delay: 0ms;
|
|
@@ -4508,7 +4508,7 @@ const qr=Ce(class extends Ie{constructor(e){if(super(e),e.type!==ze||"class"!==e
|
|
|
4508
4508
|
user-select: none;
|
|
4509
4509
|
-webkit-user-select: none;
|
|
4510
4510
|
}
|
|
4511
|
-
`,
|
|
4511
|
+
`,Fs=h`
|
|
4512
4512
|
:host {
|
|
4513
4513
|
--arrow-color: var(--sl-color-neutral-1000);
|
|
4514
4514
|
--arrow-size: 6px;
|
|
@@ -4566,29 +4566,29 @@ const qr=Ce(class extends Ie{constructor(e){if(super(e),e.type!==ze||"class"!==e
|
|
|
4566
4566
|
var(--hover-bridge-bottom-left-x, 0) var(--hover-bridge-bottom-left-y, 0)
|
|
4567
4567
|
);
|
|
4568
4568
|
}
|
|
4569
|
-
`;const Es=Math.min,As=Math.max,Ts=Math.round,Ps=Math.floor,Ds=e=>({x:e,y:e}),Fs={left:"right",right:"left",bottom:"top",top:"bottom"},Ms={start:"end",end:"start"};function Rs(e,t,i){return As(e,Es(t,i))}function Os(e,t){return"function"==typeof e?e(t):e}function Us(e){return e.split("-")[0]}function Bs(e){return e.split("-")[1]}function Ns(e){return"x"===e?"y":"x"}function qs(e){return"y"===e?"height":"width"}function js(e){return["top","bottom"].includes(Us(e))?"y":"x"}function Hs(e){return Ns(js(e))}function Ws(e){return e.replace(/start|end/g,(e=>Ms[e]))}function Vs(e){return e.replace(/left|right|bottom|top/g,(e=>Fs[e]))}function Gs(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Ks(e){const{x:t,y:i,width:o,height:n}=e;return{width:o,height:n,top:i,left:t,right:t+o,bottom:i+n,x:t,y:i}}function Ys(e,t,i){let{reference:o,floating:n}=e;const r=js(t),s=Hs(t),a=qs(s),l=Us(t),c="y"===r,d=o.x+o.width/2-n.width/2,h=o.y+o.height/2-n.height/2,u=o[a]/2-n[a]/2;let f;switch(l){case"top":f={x:d,y:o.y-n.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:h};break;case"left":f={x:o.x-n.width,y:h};break;default:f={x:o.x,y:o.y}}switch(Bs(t)){case"start":f[s]-=u*(i&&c?-1:1);break;case"end":f[s]+=u*(i&&c?-1:1)}return f}async function Qs(e,t){var i;void 0===t&&(t={});const{x:o,y:n,platform:r,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:u=!1,padding:f=0}=Os(t,e),p=Gs(f),m=a[u?"floating"===h?"reference":"floating":h],b=Ks(await r.getClippingRect({element:null==(i=await(null==r.isElement?void 0:r.isElement(m)))||i?m:m.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),g="floating"===h?{x:o,y:n,width:s.floating.width,height:s.floating.height}:s.reference,v=await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),w=await(null==r.isElement?void 0:r.isElement(v))&&await(null==r.getScale?void 0:r.getScale(v))||{x:1,y:1},y=Ks(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:v,strategy:l}):g);return{top:(b.top-y.top+p.top)/w.y,bottom:(y.bottom-b.bottom+p.bottom)/w.y,left:(b.left-y.left+p.left)/w.x,right:(y.right-b.right+p.right)/w.x}}function Zs(e){return ea(e)?(e.nodeName||"").toLowerCase():"#document"}function Js(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Xs(e){var t;return null==(t=(ea(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function ea(e){return e instanceof Node||e instanceof Js(e).Node}function ta(e){return e instanceof Element||e instanceof Js(e).Element}function ia(e){return e instanceof HTMLElement||e instanceof Js(e).HTMLElement}function oa(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof Js(e).ShadowRoot)}function na(e){const{overflow:t,overflowX:i,overflowY:o,display:n}=ca(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+i)&&!["inline","contents"].includes(n)}function ra(e){return["table","td","th"].includes(Zs(e))}function sa(e){const t=aa(),i=ca(e);return"none"!==i.transform||"none"!==i.perspective||!!i.containerType&&"normal"!==i.containerType||!t&&!!i.backdropFilter&&"none"!==i.backdropFilter||!t&&!!i.filter&&"none"!==i.filter||["transform","perspective","filter"].some((e=>(i.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(i.contain||"").includes(e)))}function aa(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function la(e){return["html","body","#document"].includes(Zs(e))}function ca(e){return Js(e).getComputedStyle(e)}function da(e){return ta(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ha(e){if("html"===Zs(e))return e;const t=e.assignedSlot||e.parentNode||oa(e)&&e.host||Xs(e);return oa(t)?t.host:t}function ua(e){const t=ha(e);return la(t)?e.ownerDocument?e.ownerDocument.body:e.body:ia(t)&&na(t)?t:ua(t)}function fa(e,t,i){var o;void 0===t&&(t=[]),void 0===i&&(i=!0);const n=ua(e),r=n===(null==(o=e.ownerDocument)?void 0:o.body),s=Js(n);return r?t.concat(s,s.visualViewport||[],na(n)?n:[],s.frameElement&&i?fa(s.frameElement):[]):t.concat(n,fa(n,[],i))}function pa(e){const t=ca(e);let i=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const n=ia(e),r=n?e.offsetWidth:i,s=n?e.offsetHeight:o,a=Ts(i)!==r||Ts(o)!==s;return a&&(i=r,o=s),{width:i,height:o,$:a}}function ma(e){return ta(e)?e:e.contextElement}function ba(e){const t=ma(e);if(!ia(t))return Ds(1);const i=t.getBoundingClientRect(),{width:o,height:n,$:r}=pa(t);let s=(r?Ts(i.width):i.width)/o,a=(r?Ts(i.height):i.height)/n;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const ga=Ds(0);function va(e){const t=Js(e);return aa()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ga}function wa(e,t,i,o){void 0===t&&(t=!1),void 0===i&&(i=!1);const n=e.getBoundingClientRect(),r=ma(e);let s=Ds(1);t&&(o?ta(o)&&(s=ba(o)):s=ba(e));const a=function(e,t,i){return void 0===t&&(t=!1),!(!i||t&&i!==Js(e))&&t}(r,i,o)?va(r):Ds(0);let l=(n.left+a.x)/s.x,c=(n.top+a.y)/s.y,d=n.width/s.x,h=n.height/s.y;if(r){const e=Js(r),t=o&&ta(o)?Js(o):o;let i=e,n=i.frameElement;for(;n&&o&&t!==i;){const e=ba(n),t=n.getBoundingClientRect(),o=ca(n),r=t.left+(n.clientLeft+parseFloat(o.paddingLeft))*e.x,s=t.top+(n.clientTop+parseFloat(o.paddingTop))*e.y;l*=e.x,c*=e.y,d*=e.x,h*=e.y,l+=r,c+=s,i=Js(n),n=i.frameElement}}return Ks({width:d,height:h,x:l,y:c})}const ya=[":popover-open",":modal"];function xa(e){return ya.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function ka(e){return wa(Xs(e)).left+da(e).scrollLeft}function Sa(e,t,i){let o;if("viewport"===t)o=function(e,t){const i=Js(e),o=Xs(e),n=i.visualViewport;let r=o.clientWidth,s=o.clientHeight,a=0,l=0;if(n){r=n.width,s=n.height;const e=aa();(!e||e&&"fixed"===t)&&(a=n.offsetLeft,l=n.offsetTop)}return{width:r,height:s,x:a,y:l}}(e,i);else if("document"===t)o=function(e){const t=Xs(e),i=da(e),o=e.ownerDocument.body,n=As(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),r=As(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-i.scrollLeft+ka(e);const a=-i.scrollTop;return"rtl"===ca(o).direction&&(s+=As(t.clientWidth,o.clientWidth)-n),{width:n,height:r,x:s,y:a}}(Xs(e));else if(ta(t))o=function(e,t){const i=wa(e,!0,"fixed"===t),o=i.top+e.clientTop,n=i.left+e.clientLeft,r=ia(e)?ba(e):Ds(1);return{width:e.clientWidth*r.x,height:e.clientHeight*r.y,x:n*r.x,y:o*r.y}}(t,i);else{const i=va(e);o={...t,x:t.x-i.x,y:t.y-i.y}}return Ks(o)}function $a(e,t){const i=ha(e);return!(i===t||!ta(i)||la(i))&&("fixed"===ca(i).position||$a(i,t))}function za(e,t,i){const o=ia(t),n=Xs(t),r="fixed"===i,s=wa(e,!0,r,t);let a={scrollLeft:0,scrollTop:0};const l=Ds(0);if(o||!o&&!r)if(("body"!==Zs(t)||na(n))&&(a=da(t)),o){const e=wa(t,!0,r,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else n&&(l.x=ka(n));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function _a(e){return"static"===ca(e).position}function Ca(e,t){return ia(e)&&"fixed"!==ca(e).position?t?t(e):e.offsetParent:null}function Ia(e,t){const i=Js(e);if(xa(e))return i;if(!ia(e)){let t=ha(e);for(;t&&!la(t);){if(ta(t)&&!_a(t))return t;t=ha(t)}return i}let o=Ca(e,t);for(;o&&ra(o)&&_a(o);)o=Ca(o,t);return o&&la(o)&&_a(o)&&!sa(o)?i:o||function(e){let t=ha(e);for(;ia(t)&&!la(t);){if(sa(t))return t;t=ha(t)}return null}(e)||i}const La={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:i,offsetParent:o,strategy:n}=e;const r="fixed"===n,s=Xs(o),a=!!t&&xa(t.floating);if(o===s||a&&r)return i;let l={scrollLeft:0,scrollTop:0},c=Ds(1);const d=Ds(0),h=ia(o);if((h||!h&&!r)&&(("body"!==Zs(o)||na(s))&&(l=da(o)),ia(o))){const e=wa(o);c=ba(o),d.x=e.x+o.clientLeft,d.y=e.y+o.clientTop}return{width:i.width*c.x,height:i.height*c.y,x:i.x*c.x-l.scrollLeft*c.x+d.x,y:i.y*c.y-l.scrollTop*c.y+d.y}},getDocumentElement:Xs,getClippingRect:function(e){let{element:t,boundary:i,rootBoundary:o,strategy:n}=e;const r=[..."clippingAncestors"===i?xa(t)?[]:function(e,t){const i=t.get(e);if(i)return i;let o=fa(e,[],!1).filter((e=>ta(e)&&"body"!==Zs(e))),n=null;const r="fixed"===ca(e).position;let s=r?ha(e):e;for(;ta(s)&&!la(s);){const t=ca(s),i=sa(s);i||"fixed"!==t.position||(n=null),(r?!i&&!n:!i&&"static"===t.position&&n&&["absolute","fixed"].includes(n.position)||na(s)&&!i&&$a(e,s))?o=o.filter((e=>e!==s)):n=t,s=ha(s)}return t.set(e,o),o}(t,this._c):[].concat(i),o],s=r[0],a=r.reduce(((e,i)=>{const o=Sa(t,i,n);return e.top=As(o.top,e.top),e.right=Es(o.right,e.right),e.bottom=Es(o.bottom,e.bottom),e.left=As(o.left,e.left),e}),Sa(t,s,n));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Ia,getElementRects:async function(e){const t=this.getOffsetParent||Ia,i=this.getDimensions,o=await i(e.floating);return{reference:za(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:i}=pa(e);return{width:t,height:i}},getScale:ba,isElement:ta,isRTL:function(e){return"rtl"===ca(e).direction}};function Ea(e,t,i,o){void 0===o&&(o={});const{ancestorScroll:n=!0,ancestorResize:r=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=o,c=ma(e),d=n||r?[...c?fa(c):[],...fa(t)]:[];d.forEach((e=>{n&&e.addEventListener("scroll",i,{passive:!0}),r&&e.addEventListener("resize",i)}));const h=c&&a?function(e,t){let i,o=null;const n=Xs(e);function r(){var e;clearTimeout(i),null==(e=o)||e.disconnect(),o=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),r();const{left:c,top:d,width:h,height:u}=e.getBoundingClientRect();if(a||t(),!h||!u)return;const f={rootMargin:-Ps(d)+"px "+-Ps(n.clientWidth-(c+h))+"px "+-Ps(n.clientHeight-(d+u))+"px "+-Ps(c)+"px",threshold:As(0,Es(1,l))||1};let p=!0;function m(e){const t=e[0].intersectionRatio;if(t!==l){if(!p)return s();t?s(!1,t):i=setTimeout((()=>{s(!1,1e-7)}),1e3)}p=!1}try{o=new IntersectionObserver(m,{...f,root:n.ownerDocument})}catch(e){o=new IntersectionObserver(m,f)}o.observe(e)}(!0),r}(c,i):null;let u,f=-1,p=null;s&&(p=new ResizeObserver((e=>{let[o]=e;o&&o.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=p)||e.observe(t)}))),i()})),c&&!l&&p.observe(c),p.observe(t));let m=l?wa(e):null;return l&&function t(){const o=wa(e);!m||o.x===m.x&&o.y===m.y&&o.width===m.width&&o.height===m.height||i();m=o,u=requestAnimationFrame(t)}(),i(),()=>{var e;d.forEach((e=>{n&&e.removeEventListener("scroll",i),r&&e.removeEventListener("resize",i)})),null==h||h(),null==(e=p)||e.disconnect(),p=null,l&&cancelAnimationFrame(u)}}const Aa=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var i,o;const{x:n,y:r,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:i,platform:o,elements:n}=e,r=await(null==o.isRTL?void 0:o.isRTL(n.floating)),s=Us(i),a=Bs(i),l="y"===js(i),c=["left","top"].includes(s)?-1:1,d=r&&l?-1:1,h=Os(t,e);let{mainAxis:u,crossAxis:f,alignmentAxis:p}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return a&&"number"==typeof p&&(f="end"===a?-1*p:p),l?{x:f*d,y:u*c}:{x:u*c,y:f*d}}(t,e);return s===(null==(i=a.offset)?void 0:i.placement)&&null!=(o=a.arrow)&&o.alignmentOffset?{}:{x:n+l.x,y:r+l.y,data:{...l,placement:s}}}}},Ta=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:o,placement:n}=t,{mainAxis:r=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:i}=e;return{x:t,y:i}}},...l}=Os(e,t),c={x:i,y:o},d=await Qs(t,l),h=js(Us(n)),u=Ns(h);let f=c[u],p=c[h];if(r){const e="y"===u?"bottom":"right";f=Rs(f+d["y"===u?"top":"left"],f,f-d[e])}if(s){const e="y"===h?"bottom":"right";p=Rs(p+d["y"===h?"top":"left"],p,p-d[e])}const m=a.fn({...t,[u]:f,[h]:p});return{...m,data:{x:m.x-i,y:m.y-o}}}}},Pa=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var i,o;const{placement:n,middlewareData:r,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:u,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...b}=Os(e,t);if(null!=(i=r.arrow)&&i.alignmentOffset)return{};const g=Us(n),v=Us(a)===a,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),y=u||(v||!m?[Vs(a)]:function(e){const t=Vs(e);return[Ws(e),t,Ws(t)]}(a));u||"none"===p||y.push(...function(e,t,i,o){const n=Bs(e);let r=function(e,t,i){const o=["left","right"],n=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return i?t?n:o:t?o:n;case"left":case"right":return t?r:s;default:return[]}}(Us(e),"start"===i,o);return n&&(r=r.map((e=>e+"-"+n)),t&&(r=r.concat(r.map(Ws)))),r}(a,m,p,w));const x=[a,...y],k=await Qs(t,b),S=[];let $=(null==(o=r.flip)?void 0:o.overflows)||[];if(d&&S.push(k[g]),h){const e=function(e,t,i){void 0===i&&(i=!1);const o=Bs(e),n=Hs(e),r=qs(n);let s="x"===n?o===(i?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[r]>t.floating[r]&&(s=Vs(s)),[s,Vs(s)]}(n,s,w);S.push(k[e[0]],k[e[1]])}if($=[...$,{placement:n,overflows:S}],!S.every((e=>e<=0))){var z,_;const e=((null==(z=r.flip)?void 0:z.index)||0)+1,t=x[e];if(t)return{data:{index:e,overflows:$},reset:{placement:t}};let i=null==(_=$.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:_.placement;if(!i)switch(f){case"bestFit":{var C;const e=null==(C=$.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:C[0];e&&(i=e);break}case"initialPlacement":i=a}if(n!==i)return{reset:{placement:i}}}return{}}}},Da=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:i,rects:o,platform:n,elements:r}=t,{apply:s=(()=>{}),...a}=Os(e,t),l=await Qs(t,a),c=Us(i),d=Bs(i),h="y"===js(i),{width:u,height:f}=o.floating;let p,m;"top"===c||"bottom"===c?(p=c,m=d===(await(null==n.isRTL?void 0:n.isRTL(r.floating))?"start":"end")?"left":"right"):(m=c,p="end"===d?"top":"bottom");const b=f-l.top-l.bottom,g=u-l.left-l.right,v=Es(f-l[p],b),w=Es(u-l[m],g),y=!t.middlewareData.shift;let x=v,k=w;if(h?k=d||y?Es(w,g):g:x=d||y?Es(v,b):b,y&&!d){const e=As(l.left,0),t=As(l.right,0),i=As(l.top,0),o=As(l.bottom,0);h?k=u-2*(0!==e||0!==t?e+t:As(l.left,l.right)):x=f-2*(0!==i||0!==o?i+o:As(l.top,l.bottom))}await s({...t,availableWidth:k,availableHeight:x});const S=await n.getDimensions(r.floating);return u!==S.width||f!==S.height?{reset:{rects:!0}}:{}}}},Fa=e=>({name:"arrow",options:e,async fn(t){const{x:i,y:o,placement:n,rects:r,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=Os(e,t)||{};if(null==c)return{};const h=Gs(d),u={x:i,y:o},f=Hs(n),p=qs(f),m=await s.getDimensions(c),b="y"===f,g=b?"top":"left",v=b?"bottom":"right",w=b?"clientHeight":"clientWidth",y=r.reference[p]+r.reference[f]-u[f]-r.floating[p],x=u[f]-r.reference[f],k=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let S=k?k[w]:0;S&&await(null==s.isElement?void 0:s.isElement(k))||(S=a.floating[w]||r.floating[p]);const $=y/2-x/2,z=S/2-m[p]/2-1,_=Es(h[g],z),C=Es(h[v],z),I=_,L=S-m[p]-C,E=S/2-m[p]/2+$,A=Rs(I,E,L),T=!l.arrow&&null!=Bs(n)&&E!==A&&r.reference[p]/2-(E<I?_:C)-m[p]/2<0,P=T?E<I?E-I:E-L:0;return{[f]:u[f]+P,data:{[f]:A,centerOffset:E-A-P,...T&&{alignmentOffset:P}},reset:T}}}),Ma=(e,t,i)=>{const o=new Map,n={platform:La,...i},r={...n.platform,_c:o};return(async(e,t,i)=>{const{placement:o="bottom",strategy:n="absolute",middleware:r=[],platform:s}=i,a=r.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:d,y:h}=Ys(c,o,l),u=o,f={},p=0;for(let i=0;i<a.length;i++){const{name:r,fn:m}=a[i],{x:b,y:g,data:v,reset:w}=await m({x:d,y:h,initialPlacement:o,placement:u,strategy:n,middlewareData:f,rects:c,platform:s,elements:{reference:e,floating:t}});d=null!=b?b:d,h=null!=g?g:h,f={...f,[r]:{...f[r],...v}},w&&p<=50&&(p++,"object"==typeof w&&(w.placement&&(u=w.placement),w.rects&&(c=!0===w.rects?await s.getElementRects({reference:e,floating:t,strategy:n}):w.rects),({x:d,y:h}=Ys(c,u,l))),i=-1)}return{x:d,y:h,placement:u,strategy:n,middlewareData:f}})(e,t,{...n,platform:r})};function Ra(e){return Ua(e)}function Oa(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function Ua(e){for(let t=e;t;t=Oa(t))if(t instanceof Element&&"none"===getComputedStyle(t).display)return null;for(let t=Oa(e);t;t=Oa(t)){if(!(t instanceof Element))continue;const e=getComputedStyle(t);if("contents"!==e.display){if("static"!==e.position||"none"!==e.filter)return t;if("BODY"===t.tagName)return t}}return null}var Ba=class extends Mr{constructor(){super(...arguments),this.active=!1,this.placement="top",this.strategy="absolute",this.distance=0,this.skidding=0,this.arrow=!1,this.arrowPlacement="anchor",this.arrowPadding=10,this.flip=!1,this.flipFallbackPlacements="",this.flipFallbackStrategy="best-fit",this.flipPadding=0,this.shift=!1,this.shiftPadding=0,this.autoSizePadding=0,this.hoverBridge=!1,this.updateHoverBridge=()=>{if(this.hoverBridge&&this.anchorEl){const e=this.anchorEl.getBoundingClientRect(),t=this.popup.getBoundingClientRect();let i=0,o=0,n=0,r=0,s=0,a=0,l=0,c=0;this.placement.includes("top")||this.placement.includes("bottom")?e.top<t.top?(i=e.left,o=e.bottom,n=e.right,r=e.bottom,s=t.left,a=t.top,l=t.right,c=t.top):(i=t.left,o=t.bottom,n=t.right,r=t.bottom,s=e.left,a=e.top,l=e.right,c=e.top):e.left<t.left?(i=e.right,o=e.top,n=t.left,r=t.top,s=e.right,a=e.bottom,l=t.left,c=t.bottom):(i=t.right,o=t.top,n=e.left,r=e.top,s=t.right,a=t.bottom,l=e.left,c=e.bottom),this.style.setProperty("--hover-bridge-top-left-x",`${i}px`),this.style.setProperty("--hover-bridge-top-left-y",`${o}px`),this.style.setProperty("--hover-bridge-top-right-x",`${n}px`),this.style.setProperty("--hover-bridge-top-right-y",`${r}px`),this.style.setProperty("--hover-bridge-bottom-left-x",`${s}px`),this.style.setProperty("--hover-bridge-bottom-left-y",`${a}px`),this.style.setProperty("--hover-bridge-bottom-right-x",`${l}px`),this.style.setProperty("--hover-bridge-bottom-right-y",`${c}px`)}}}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start()}disconnectedCallback(){super.disconnectedCallback(),this.stop()}async updated(e){super.updated(e),e.has("active")&&(this.active?this.start():this.stop()),e.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&"string"==typeof this.anchor){const e=this.getRootNode();this.anchorEl=e.getElementById(this.anchor)}else this.anchor instanceof Element||function(e){return null!==e&&"object"==typeof e&&"getBoundingClientRect"in e&&(!("contextElement"in e)||e instanceof Element)}(this.anchor)?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),this.anchorEl&&this.start()}start(){this.anchorEl&&(this.cleanup=Ea(this.anchorEl,this.popup,(()=>{this.reposition()})))}async stop(){return new Promise((e=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame((()=>e()))):e()}))}reposition(){if(!this.active||!this.anchorEl)return;const e=[Aa({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?e.push(Da({apply:({rects:e})=>{const t="width"===this.sync||"both"===this.sync,i="height"===this.sync||"both"===this.sync;this.popup.style.width=t?`${e.reference.width}px`:"",this.popup.style.height=i?`${e.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&e.push(Pa({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:"best-fit"===this.flipFallbackStrategy?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&e.push(Ta({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?e.push(Da({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:e,availableHeight:t})=>{"vertical"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-height",`${t}px`):this.style.removeProperty("--auto-size-available-height"),"horizontal"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-width",`${e}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&e.push(Fa({element:this.arrowEl,padding:this.arrowPadding}));const t="absolute"===this.strategy?e=>La.getOffsetParent(e,Ra):La.getOffsetParent;Ma(this.anchorEl,this.popup,{placement:this.placement,middleware:e,strategy:this.strategy,platform:mi(pi({},La),{getOffsetParent:t})}).then((({x:e,y:t,middlewareData:i,placement:o})=>{const n="rtl"===getComputedStyle(this).direction,r={top:"bottom",right:"left",bottom:"top",left:"right"}[o.split("-")[0]];if(this.setAttribute("data-current-placement",o),Object.assign(this.popup.style,{left:`${e}px`,top:`${t}px`}),this.arrow){const e=i.arrow.x,t=i.arrow.y;let o="",s="",a="",l="";if("start"===this.arrowPlacement){const i="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";o="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",s=n?i:"",l=n?"":i}else if("end"===this.arrowPlacement){const i="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";s=n?"":i,l=n?i:"",a="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else"center"===this.arrowPlacement?(l="number"==typeof e?"calc(50% - var(--arrow-size-diagonal))":"",o="number"==typeof t?"calc(50% - var(--arrow-size-diagonal))":""):(l="number"==typeof e?`${e}px`:"",o="number"==typeof t?`${t}px`:"");Object.assign(this.arrowEl.style,{top:o,right:s,bottom:a,left:l,[r]:"calc(var(--arrow-size-diagonal) * -1)"})}})),requestAnimationFrame((()=>this.updateHoverBridge())),this.emit("sl-reposition")}render(){return Q`
|
|
4569
|
+
`;const Ms=Math.min,Rs=Math.max,Os=Math.round,Us=Math.floor,Bs=e=>({x:e,y:e}),Ns={left:"right",right:"left",bottom:"top",top:"bottom"},qs={start:"end",end:"start"};function js(e,t,i){return Rs(e,Ms(t,i))}function Hs(e,t){return"function"==typeof e?e(t):e}function Ws(e){return e.split("-")[0]}function Vs(e){return e.split("-")[1]}function Gs(e){return"x"===e?"y":"x"}function Ks(e){return"y"===e?"height":"width"}function Ys(e){return["top","bottom"].includes(Ws(e))?"y":"x"}function Qs(e){return Gs(Ys(e))}function Zs(e){return e.replace(/start|end/g,(e=>qs[e]))}function Js(e){return e.replace(/left|right|bottom|top/g,(e=>Ns[e]))}function Xs(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function ea(e){const{x:t,y:i,width:o,height:n}=e;return{width:o,height:n,top:i,left:t,right:t+o,bottom:i+n,x:t,y:i}}function ta(e,t,i){let{reference:o,floating:n}=e;const r=Ys(t),s=Qs(t),a=Ks(s),l=Ws(t),c="y"===r,d=o.x+o.width/2-n.width/2,h=o.y+o.height/2-n.height/2,u=o[a]/2-n[a]/2;let f;switch(l){case"top":f={x:d,y:o.y-n.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:h};break;case"left":f={x:o.x-n.width,y:h};break;default:f={x:o.x,y:o.y}}switch(Vs(t)){case"start":f[s]-=u*(i&&c?-1:1);break;case"end":f[s]+=u*(i&&c?-1:1)}return f}async function ia(e,t){var i;void 0===t&&(t={});const{x:o,y:n,platform:r,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:u=!1,padding:f=0}=Hs(t,e),p=Xs(f),m=a[u?"floating"===h?"reference":"floating":h],b=ea(await r.getClippingRect({element:null==(i=await(null==r.isElement?void 0:r.isElement(m)))||i?m:m.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),g="floating"===h?{x:o,y:n,width:s.floating.width,height:s.floating.height}:s.reference,v=await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),w=await(null==r.isElement?void 0:r.isElement(v))&&await(null==r.getScale?void 0:r.getScale(v))||{x:1,y:1},y=ea(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:v,strategy:l}):g);return{top:(b.top-y.top+p.top)/w.y,bottom:(y.bottom-b.bottom+p.bottom)/w.y,left:(b.left-y.left+p.left)/w.x,right:(y.right-b.right+p.right)/w.x}}function oa(e){return sa(e)?(e.nodeName||"").toLowerCase():"#document"}function na(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ra(e){var t;return null==(t=(sa(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function sa(e){return e instanceof Node||e instanceof na(e).Node}function aa(e){return e instanceof Element||e instanceof na(e).Element}function la(e){return e instanceof HTMLElement||e instanceof na(e).HTMLElement}function ca(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof na(e).ShadowRoot)}function da(e){const{overflow:t,overflowX:i,overflowY:o,display:n}=ma(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+i)&&!["inline","contents"].includes(n)}function ha(e){return["table","td","th"].includes(oa(e))}function ua(e){const t=fa(),i=ma(e);return"none"!==i.transform||"none"!==i.perspective||!!i.containerType&&"normal"!==i.containerType||!t&&!!i.backdropFilter&&"none"!==i.backdropFilter||!t&&!!i.filter&&"none"!==i.filter||["transform","perspective","filter"].some((e=>(i.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(i.contain||"").includes(e)))}function fa(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function pa(e){return["html","body","#document"].includes(oa(e))}function ma(e){return na(e).getComputedStyle(e)}function ba(e){return aa(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ga(e){if("html"===oa(e))return e;const t=e.assignedSlot||e.parentNode||ca(e)&&e.host||ra(e);return ca(t)?t.host:t}function va(e){const t=ga(e);return pa(t)?e.ownerDocument?e.ownerDocument.body:e.body:la(t)&&da(t)?t:va(t)}function wa(e,t,i){var o;void 0===t&&(t=[]),void 0===i&&(i=!0);const n=va(e),r=n===(null==(o=e.ownerDocument)?void 0:o.body),s=na(n);return r?t.concat(s,s.visualViewport||[],da(n)?n:[],s.frameElement&&i?wa(s.frameElement):[]):t.concat(n,wa(n,[],i))}function ya(e){const t=ma(e);let i=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const n=la(e),r=n?e.offsetWidth:i,s=n?e.offsetHeight:o,a=Os(i)!==r||Os(o)!==s;return a&&(i=r,o=s),{width:i,height:o,$:a}}function xa(e){return aa(e)?e:e.contextElement}function ka(e){const t=xa(e);if(!la(t))return Bs(1);const i=t.getBoundingClientRect(),{width:o,height:n,$:r}=ya(t);let s=(r?Os(i.width):i.width)/o,a=(r?Os(i.height):i.height)/n;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const Sa=Bs(0);function $a(e){const t=na(e);return fa()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Sa}function za(e,t,i,o){void 0===t&&(t=!1),void 0===i&&(i=!1);const n=e.getBoundingClientRect(),r=xa(e);let s=Bs(1);t&&(o?aa(o)&&(s=ka(o)):s=ka(e));const a=function(e,t,i){return void 0===t&&(t=!1),!(!i||t&&i!==na(e))&&t}(r,i,o)?$a(r):Bs(0);let l=(n.left+a.x)/s.x,c=(n.top+a.y)/s.y,d=n.width/s.x,h=n.height/s.y;if(r){const e=na(r),t=o&&aa(o)?na(o):o;let i=e,n=i.frameElement;for(;n&&o&&t!==i;){const e=ka(n),t=n.getBoundingClientRect(),o=ma(n),r=t.left+(n.clientLeft+parseFloat(o.paddingLeft))*e.x,s=t.top+(n.clientTop+parseFloat(o.paddingTop))*e.y;l*=e.x,c*=e.y,d*=e.x,h*=e.y,l+=r,c+=s,i=na(n),n=i.frameElement}}return ea({width:d,height:h,x:l,y:c})}const _a=[":popover-open",":modal"];function Ca(e){return _a.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Ia(e){return za(ra(e)).left+ba(e).scrollLeft}function La(e,t,i){let o;if("viewport"===t)o=function(e,t){const i=na(e),o=ra(e),n=i.visualViewport;let r=o.clientWidth,s=o.clientHeight,a=0,l=0;if(n){r=n.width,s=n.height;const e=fa();(!e||e&&"fixed"===t)&&(a=n.offsetLeft,l=n.offsetTop)}return{width:r,height:s,x:a,y:l}}(e,i);else if("document"===t)o=function(e){const t=ra(e),i=ba(e),o=e.ownerDocument.body,n=Rs(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),r=Rs(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-i.scrollLeft+Ia(e);const a=-i.scrollTop;return"rtl"===ma(o).direction&&(s+=Rs(t.clientWidth,o.clientWidth)-n),{width:n,height:r,x:s,y:a}}(ra(e));else if(aa(t))o=function(e,t){const i=za(e,!0,"fixed"===t),o=i.top+e.clientTop,n=i.left+e.clientLeft,r=la(e)?ka(e):Bs(1);return{width:e.clientWidth*r.x,height:e.clientHeight*r.y,x:n*r.x,y:o*r.y}}(t,i);else{const i=$a(e);o={...t,x:t.x-i.x,y:t.y-i.y}}return ea(o)}function Ea(e,t){const i=ga(e);return!(i===t||!aa(i)||pa(i))&&("fixed"===ma(i).position||Ea(i,t))}function Aa(e,t,i){const o=la(t),n=ra(t),r="fixed"===i,s=za(e,!0,r,t);let a={scrollLeft:0,scrollTop:0};const l=Bs(0);if(o||!o&&!r)if(("body"!==oa(t)||da(n))&&(a=ba(t)),o){const e=za(t,!0,r,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else n&&(l.x=Ia(n));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function Ta(e){return"static"===ma(e).position}function Pa(e,t){return la(e)&&"fixed"!==ma(e).position?t?t(e):e.offsetParent:null}function Da(e,t){const i=na(e);if(Ca(e))return i;if(!la(e)){let t=ga(e);for(;t&&!pa(t);){if(aa(t)&&!Ta(t))return t;t=ga(t)}return i}let o=Pa(e,t);for(;o&&ha(o)&&Ta(o);)o=Pa(o,t);return o&&pa(o)&&Ta(o)&&!ua(o)?i:o||function(e){let t=ga(e);for(;la(t)&&!pa(t);){if(ua(t))return t;t=ga(t)}return null}(e)||i}const Fa={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:i,offsetParent:o,strategy:n}=e;const r="fixed"===n,s=ra(o),a=!!t&&Ca(t.floating);if(o===s||a&&r)return i;let l={scrollLeft:0,scrollTop:0},c=Bs(1);const d=Bs(0),h=la(o);if((h||!h&&!r)&&(("body"!==oa(o)||da(s))&&(l=ba(o)),la(o))){const e=za(o);c=ka(o),d.x=e.x+o.clientLeft,d.y=e.y+o.clientTop}return{width:i.width*c.x,height:i.height*c.y,x:i.x*c.x-l.scrollLeft*c.x+d.x,y:i.y*c.y-l.scrollTop*c.y+d.y}},getDocumentElement:ra,getClippingRect:function(e){let{element:t,boundary:i,rootBoundary:o,strategy:n}=e;const r=[..."clippingAncestors"===i?Ca(t)?[]:function(e,t){const i=t.get(e);if(i)return i;let o=wa(e,[],!1).filter((e=>aa(e)&&"body"!==oa(e))),n=null;const r="fixed"===ma(e).position;let s=r?ga(e):e;for(;aa(s)&&!pa(s);){const t=ma(s),i=ua(s);i||"fixed"!==t.position||(n=null),(r?!i&&!n:!i&&"static"===t.position&&n&&["absolute","fixed"].includes(n.position)||da(s)&&!i&&Ea(e,s))?o=o.filter((e=>e!==s)):n=t,s=ga(s)}return t.set(e,o),o}(t,this._c):[].concat(i),o],s=r[0],a=r.reduce(((e,i)=>{const o=La(t,i,n);return e.top=Rs(o.top,e.top),e.right=Ms(o.right,e.right),e.bottom=Ms(o.bottom,e.bottom),e.left=Rs(o.left,e.left),e}),La(t,s,n));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Da,getElementRects:async function(e){const t=this.getOffsetParent||Da,i=this.getDimensions,o=await i(e.floating);return{reference:Aa(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:i}=ya(e);return{width:t,height:i}},getScale:ka,isElement:aa,isRTL:function(e){return"rtl"===ma(e).direction}};function Ma(e,t,i,o){void 0===o&&(o={});const{ancestorScroll:n=!0,ancestorResize:r=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=o,c=xa(e),d=n||r?[...c?wa(c):[],...wa(t)]:[];d.forEach((e=>{n&&e.addEventListener("scroll",i,{passive:!0}),r&&e.addEventListener("resize",i)}));const h=c&&a?function(e,t){let i,o=null;const n=ra(e);function r(){var e;clearTimeout(i),null==(e=o)||e.disconnect(),o=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),r();const{left:c,top:d,width:h,height:u}=e.getBoundingClientRect();if(a||t(),!h||!u)return;const f={rootMargin:-Us(d)+"px "+-Us(n.clientWidth-(c+h))+"px "+-Us(n.clientHeight-(d+u))+"px "+-Us(c)+"px",threshold:Rs(0,Ms(1,l))||1};let p=!0;function m(e){const t=e[0].intersectionRatio;if(t!==l){if(!p)return s();t?s(!1,t):i=setTimeout((()=>{s(!1,1e-7)}),1e3)}p=!1}try{o=new IntersectionObserver(m,{...f,root:n.ownerDocument})}catch(e){o=new IntersectionObserver(m,f)}o.observe(e)}(!0),r}(c,i):null;let u,f=-1,p=null;s&&(p=new ResizeObserver((e=>{let[o]=e;o&&o.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=p)||e.observe(t)}))),i()})),c&&!l&&p.observe(c),p.observe(t));let m=l?za(e):null;return l&&function t(){const o=za(e);!m||o.x===m.x&&o.y===m.y&&o.width===m.width&&o.height===m.height||i();m=o,u=requestAnimationFrame(t)}(),i(),()=>{var e;d.forEach((e=>{n&&e.removeEventListener("scroll",i),r&&e.removeEventListener("resize",i)})),null==h||h(),null==(e=p)||e.disconnect(),p=null,l&&cancelAnimationFrame(u)}}const Ra=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var i,o;const{x:n,y:r,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:i,platform:o,elements:n}=e,r=await(null==o.isRTL?void 0:o.isRTL(n.floating)),s=Ws(i),a=Vs(i),l="y"===Ys(i),c=["left","top"].includes(s)?-1:1,d=r&&l?-1:1,h=Hs(t,e);let{mainAxis:u,crossAxis:f,alignmentAxis:p}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return a&&"number"==typeof p&&(f="end"===a?-1*p:p),l?{x:f*d,y:u*c}:{x:u*c,y:f*d}}(t,e);return s===(null==(i=a.offset)?void 0:i.placement)&&null!=(o=a.arrow)&&o.alignmentOffset?{}:{x:n+l.x,y:r+l.y,data:{...l,placement:s}}}}},Oa=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:o,placement:n}=t,{mainAxis:r=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:i}=e;return{x:t,y:i}}},...l}=Hs(e,t),c={x:i,y:o},d=await ia(t,l),h=Ys(Ws(n)),u=Gs(h);let f=c[u],p=c[h];if(r){const e="y"===u?"bottom":"right";f=js(f+d["y"===u?"top":"left"],f,f-d[e])}if(s){const e="y"===h?"bottom":"right";p=js(p+d["y"===h?"top":"left"],p,p-d[e])}const m=a.fn({...t,[u]:f,[h]:p});return{...m,data:{x:m.x-i,y:m.y-o}}}}},Ua=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var i,o;const{placement:n,middlewareData:r,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:u,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...b}=Hs(e,t);if(null!=(i=r.arrow)&&i.alignmentOffset)return{};const g=Ws(n),v=Ws(a)===a,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),y=u||(v||!m?[Js(a)]:function(e){const t=Js(e);return[Zs(e),t,Zs(t)]}(a));u||"none"===p||y.push(...function(e,t,i,o){const n=Vs(e);let r=function(e,t,i){const o=["left","right"],n=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return i?t?n:o:t?o:n;case"left":case"right":return t?r:s;default:return[]}}(Ws(e),"start"===i,o);return n&&(r=r.map((e=>e+"-"+n)),t&&(r=r.concat(r.map(Zs)))),r}(a,m,p,w));const x=[a,...y],k=await ia(t,b),S=[];let $=(null==(o=r.flip)?void 0:o.overflows)||[];if(d&&S.push(k[g]),h){const e=function(e,t,i){void 0===i&&(i=!1);const o=Vs(e),n=Qs(e),r=Ks(n);let s="x"===n?o===(i?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[r]>t.floating[r]&&(s=Js(s)),[s,Js(s)]}(n,s,w);S.push(k[e[0]],k[e[1]])}if($=[...$,{placement:n,overflows:S}],!S.every((e=>e<=0))){var z,_;const e=((null==(z=r.flip)?void 0:z.index)||0)+1,t=x[e];if(t)return{data:{index:e,overflows:$},reset:{placement:t}};let i=null==(_=$.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:_.placement;if(!i)switch(f){case"bestFit":{var C;const e=null==(C=$.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:C[0];e&&(i=e);break}case"initialPlacement":i=a}if(n!==i)return{reset:{placement:i}}}return{}}}},Ba=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:i,rects:o,platform:n,elements:r}=t,{apply:s=(()=>{}),...a}=Hs(e,t),l=await ia(t,a),c=Ws(i),d=Vs(i),h="y"===Ys(i),{width:u,height:f}=o.floating;let p,m;"top"===c||"bottom"===c?(p=c,m=d===(await(null==n.isRTL?void 0:n.isRTL(r.floating))?"start":"end")?"left":"right"):(m=c,p="end"===d?"top":"bottom");const b=f-l.top-l.bottom,g=u-l.left-l.right,v=Ms(f-l[p],b),w=Ms(u-l[m],g),y=!t.middlewareData.shift;let x=v,k=w;if(h?k=d||y?Ms(w,g):g:x=d||y?Ms(v,b):b,y&&!d){const e=Rs(l.left,0),t=Rs(l.right,0),i=Rs(l.top,0),o=Rs(l.bottom,0);h?k=u-2*(0!==e||0!==t?e+t:Rs(l.left,l.right)):x=f-2*(0!==i||0!==o?i+o:Rs(l.top,l.bottom))}await s({...t,availableWidth:k,availableHeight:x});const S=await n.getDimensions(r.floating);return u!==S.width||f!==S.height?{reset:{rects:!0}}:{}}}},Na=e=>({name:"arrow",options:e,async fn(t){const{x:i,y:o,placement:n,rects:r,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=Hs(e,t)||{};if(null==c)return{};const h=Xs(d),u={x:i,y:o},f=Qs(n),p=Ks(f),m=await s.getDimensions(c),b="y"===f,g=b?"top":"left",v=b?"bottom":"right",w=b?"clientHeight":"clientWidth",y=r.reference[p]+r.reference[f]-u[f]-r.floating[p],x=u[f]-r.reference[f],k=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let S=k?k[w]:0;S&&await(null==s.isElement?void 0:s.isElement(k))||(S=a.floating[w]||r.floating[p]);const $=y/2-x/2,z=S/2-m[p]/2-1,_=Ms(h[g],z),C=Ms(h[v],z),I=_,L=S-m[p]-C,E=S/2-m[p]/2+$,A=js(I,E,L),T=!l.arrow&&null!=Vs(n)&&E!==A&&r.reference[p]/2-(E<I?_:C)-m[p]/2<0,P=T?E<I?E-I:E-L:0;return{[f]:u[f]+P,data:{[f]:A,centerOffset:E-A-P,...T&&{alignmentOffset:P}},reset:T}}}),qa=(e,t,i)=>{const o=new Map,n={platform:Fa,...i},r={...n.platform,_c:o};return(async(e,t,i)=>{const{placement:o="bottom",strategy:n="absolute",middleware:r=[],platform:s}=i,a=r.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:d,y:h}=ta(c,o,l),u=o,f={},p=0;for(let i=0;i<a.length;i++){const{name:r,fn:m}=a[i],{x:b,y:g,data:v,reset:w}=await m({x:d,y:h,initialPlacement:o,placement:u,strategy:n,middlewareData:f,rects:c,platform:s,elements:{reference:e,floating:t}});d=null!=b?b:d,h=null!=g?g:h,f={...f,[r]:{...f[r],...v}},w&&p<=50&&(p++,"object"==typeof w&&(w.placement&&(u=w.placement),w.rects&&(c=!0===w.rects?await s.getElementRects({reference:e,floating:t,strategy:n}):w.rects),({x:d,y:h}=ta(c,u,l))),i=-1)}return{x:d,y:h,placement:u,strategy:n,middlewareData:f}})(e,t,{...n,platform:r})};function ja(e){return Wa(e)}function Ha(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function Wa(e){for(let t=e;t;t=Ha(t))if(t instanceof Element&&"none"===getComputedStyle(t).display)return null;for(let t=Ha(e);t;t=Ha(t)){if(!(t instanceof Element))continue;const e=getComputedStyle(t);if("contents"!==e.display){if("static"!==e.position||"none"!==e.filter)return t;if("BODY"===t.tagName)return t}}return null}var Va=class extends qr{constructor(){super(...arguments),this.active=!1,this.placement="top",this.strategy="absolute",this.distance=0,this.skidding=0,this.arrow=!1,this.arrowPlacement="anchor",this.arrowPadding=10,this.flip=!1,this.flipFallbackPlacements="",this.flipFallbackStrategy="best-fit",this.flipPadding=0,this.shift=!1,this.shiftPadding=0,this.autoSizePadding=0,this.hoverBridge=!1,this.updateHoverBridge=()=>{if(this.hoverBridge&&this.anchorEl){const e=this.anchorEl.getBoundingClientRect(),t=this.popup.getBoundingClientRect();let i=0,o=0,n=0,r=0,s=0,a=0,l=0,c=0;this.placement.includes("top")||this.placement.includes("bottom")?e.top<t.top?(i=e.left,o=e.bottom,n=e.right,r=e.bottom,s=t.left,a=t.top,l=t.right,c=t.top):(i=t.left,o=t.bottom,n=t.right,r=t.bottom,s=e.left,a=e.top,l=e.right,c=e.top):e.left<t.left?(i=e.right,o=e.top,n=t.left,r=t.top,s=e.right,a=e.bottom,l=t.left,c=t.bottom):(i=t.right,o=t.top,n=e.left,r=e.top,s=t.right,a=t.bottom,l=e.left,c=e.bottom),this.style.setProperty("--hover-bridge-top-left-x",`${i}px`),this.style.setProperty("--hover-bridge-top-left-y",`${o}px`),this.style.setProperty("--hover-bridge-top-right-x",`${n}px`),this.style.setProperty("--hover-bridge-top-right-y",`${r}px`),this.style.setProperty("--hover-bridge-bottom-left-x",`${s}px`),this.style.setProperty("--hover-bridge-bottom-left-y",`${a}px`),this.style.setProperty("--hover-bridge-bottom-right-x",`${l}px`),this.style.setProperty("--hover-bridge-bottom-right-y",`${c}px`)}}}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start()}disconnectedCallback(){super.disconnectedCallback(),this.stop()}async updated(e){super.updated(e),e.has("active")&&(this.active?this.start():this.stop()),e.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&"string"==typeof this.anchor){const e=this.getRootNode();this.anchorEl=e.getElementById(this.anchor)}else this.anchor instanceof Element||function(e){return null!==e&&"object"==typeof e&&"getBoundingClientRect"in e&&(!("contextElement"in e)||e instanceof Element)}(this.anchor)?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),this.anchorEl&&this.start()}start(){this.anchorEl&&(this.cleanup=Ma(this.anchorEl,this.popup,(()=>{this.reposition()})))}async stop(){return new Promise((e=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame((()=>e()))):e()}))}reposition(){if(!this.active||!this.anchorEl)return;const e=[Ra({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?e.push(Ba({apply:({rects:e})=>{const t="width"===this.sync||"both"===this.sync,i="height"===this.sync||"both"===this.sync;this.popup.style.width=t?`${e.reference.width}px`:"",this.popup.style.height=i?`${e.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&e.push(Ua({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:"best-fit"===this.flipFallbackStrategy?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&e.push(Oa({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?e.push(Ba({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:e,availableHeight:t})=>{"vertical"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-height",`${t}px`):this.style.removeProperty("--auto-size-available-height"),"horizontal"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-width",`${e}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&e.push(Na({element:this.arrowEl,padding:this.arrowPadding}));const t="absolute"===this.strategy?e=>Fa.getOffsetParent(e,ja):Fa.getOffsetParent;qa(this.anchorEl,this.popup,{placement:this.placement,middleware:e,strategy:this.strategy,platform:yi(wi({},Fa),{getOffsetParent:t})}).then((({x:e,y:t,middlewareData:i,placement:o})=>{const n="rtl"===getComputedStyle(this).direction,r={top:"bottom",right:"left",bottom:"top",left:"right"}[o.split("-")[0]];if(this.setAttribute("data-current-placement",o),Object.assign(this.popup.style,{left:`${e}px`,top:`${t}px`}),this.arrow){const e=i.arrow.x,t=i.arrow.y;let o="",s="",a="",l="";if("start"===this.arrowPlacement){const i="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";o="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",s=n?i:"",l=n?"":i}else if("end"===this.arrowPlacement){const i="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";s=n?"":i,l=n?i:"",a="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else"center"===this.arrowPlacement?(l="number"==typeof e?"calc(50% - var(--arrow-size-diagonal))":"",o="number"==typeof t?"calc(50% - var(--arrow-size-diagonal))":""):(l="number"==typeof e?`${e}px`:"",o="number"==typeof t?`${t}px`:"");Object.assign(this.arrowEl.style,{top:o,right:s,bottom:a,left:l,[r]:"calc(var(--arrow-size-diagonal) * -1)"})}})),requestAnimationFrame((()=>this.updateHoverBridge())),this.emit("sl-reposition")}render(){return Q`
|
|
4570
4570
|
<slot name="anchor" @slotchange=${this.handleAnchorChange}></slot>
|
|
4571
4571
|
|
|
4572
4572
|
<span
|
|
4573
4573
|
part="hover-bridge"
|
|
4574
|
-
class=${
|
|
4574
|
+
class=${Kr({"popup-hover-bridge":!0,"popup-hover-bridge--visible":this.hoverBridge&&this.active})}
|
|
4575
4575
|
></span>
|
|
4576
4576
|
|
|
4577
4577
|
<div
|
|
4578
4578
|
part="popup"
|
|
4579
|
-
class=${
|
|
4579
|
+
class=${Kr({popup:!0,"popup--active":this.active,"popup--fixed":"fixed"===this.strategy,"popup--has-arrow":this.arrow})}
|
|
4580
4580
|
>
|
|
4581
4581
|
<slot></slot>
|
|
4582
4582
|
${this.arrow?Q`<div part="arrow" class="popup__arrow" role="presentation"></div>`:""}
|
|
4583
4583
|
</div>
|
|
4584
|
-
`}};
|
|
4584
|
+
`}};Va.styles=[Nr,Fs],xi([Se(".popup")],Va.prototype,"popup",2),xi([Se(".popup__arrow")],Va.prototype,"arrowEl",2),xi([ye()],Va.prototype,"anchor",2),xi([ye({type:Boolean,reflect:!0})],Va.prototype,"active",2),xi([ye({reflect:!0})],Va.prototype,"placement",2),xi([ye({reflect:!0})],Va.prototype,"strategy",2),xi([ye({type:Number})],Va.prototype,"distance",2),xi([ye({type:Number})],Va.prototype,"skidding",2),xi([ye({type:Boolean})],Va.prototype,"arrow",2),xi([ye({attribute:"arrow-placement"})],Va.prototype,"arrowPlacement",2),xi([ye({attribute:"arrow-padding",type:Number})],Va.prototype,"arrowPadding",2),xi([ye({type:Boolean})],Va.prototype,"flip",2),xi([ye({attribute:"flip-fallback-placements",converter:{fromAttribute:e=>e.split(" ").map((e=>e.trim())).filter((e=>""!==e)),toAttribute:e=>e.join(" ")}})],Va.prototype,"flipFallbackPlacements",2),xi([ye({attribute:"flip-fallback-strategy"})],Va.prototype,"flipFallbackStrategy",2),xi([ye({type:Object})],Va.prototype,"flipBoundary",2),xi([ye({attribute:"flip-padding",type:Number})],Va.prototype,"flipPadding",2),xi([ye({type:Boolean})],Va.prototype,"shift",2),xi([ye({type:Object})],Va.prototype,"shiftBoundary",2),xi([ye({attribute:"shift-padding",type:Number})],Va.prototype,"shiftPadding",2),xi([ye({attribute:"auto-size"})],Va.prototype,"autoSize",2),xi([ye()],Va.prototype,"sync",2),xi([ye({type:Object})],Va.prototype,"autoSizeBoundary",2),xi([ye({attribute:"auto-size-padding",type:Number})],Va.prototype,"autoSizePadding",2),xi([ye({attribute:"hover-bridge",type:Boolean})],Va.prototype,"hoverBridge",2);var Ga=class extends qr{constructor(){super(),this.localize=new vs(this),this.content="",this.placement="top",this.disabled=!1,this.distance=8,this.open=!1,this.skidding=0,this.trigger="hover focus",this.hoist=!1,this.handleBlur=()=>{this.hasTrigger("focus")&&this.hide()},this.handleClick=()=>{this.hasTrigger("click")&&(this.open?this.hide():this.show())},this.handleFocus=()=>{this.hasTrigger("focus")&&this.show()},this.handleDocumentKeyDown=e=>{"Escape"===e.key&&(e.stopPropagation(),this.hide())},this.handleMouseOver=()=>{if(this.hasTrigger("hover")){const e=ns(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>this.show()),e)}},this.handleMouseOut=()=>{if(this.hasTrigger("hover")){const e=ns(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>this.hide()),e)}},this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)}disconnectedCallback(){var e;null==(e=this.closeWatcher)||e.destroy(),document.removeEventListener("keydown",this.handleDocumentKeyDown)}firstUpdated(){this.body.hidden=!this.open,this.open&&(this.popup.active=!0,this.popup.reposition())}hasTrigger(e){return this.trigger.split(" ").includes(e)}async handleOpenChange(){var e,t;if(this.open){if(this.disabled)return;this.emit("sl-show"),"CloseWatcher"in window?(null==(e=this.closeWatcher)||e.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>{this.hide()}):document.addEventListener("keydown",this.handleDocumentKeyDown),await ss(this.body),this.body.hidden=!1,this.popup.active=!0;const{keyframes:t,options:i}=ts(this,"tooltip.show",{dir:this.localize.dir()});await os(this.popup.popup,t,i),this.popup.reposition(),this.emit("sl-after-show")}else{this.emit("sl-hide"),null==(t=this.closeWatcher)||t.destroy(),document.removeEventListener("keydown",this.handleDocumentKeyDown),await ss(this.body);const{keyframes:e,options:i}=ts(this,"tooltip.hide",{dir:this.localize.dir()});await os(this.popup.popup,e,i),this.popup.active=!1,this.body.hidden=!0,this.emit("sl-after-hide")}}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,is(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,is(this,"sl-after-hide")}render(){return Q`
|
|
4585
4585
|
<sl-popup
|
|
4586
4586
|
part="base"
|
|
4587
4587
|
exportparts="
|
|
4588
4588
|
popup:base__popup,
|
|
4589
4589
|
arrow:base__arrow
|
|
4590
4590
|
"
|
|
4591
|
-
class=${
|
|
4591
|
+
class=${Kr({tooltip:!0,"tooltip--open":this.open})}
|
|
4592
4592
|
placement=${this.placement}
|
|
4593
4593
|
distance=${this.distance}
|
|
4594
4594
|
skidding=${this.skidding}
|
|
@@ -4606,7 +4606,7 @@ const qr=Ce(class extends Ie{constructor(e){if(super(e),e.type!==ze||"class"!==e
|
|
|
4606
4606
|
<slot name="content">${this.content}</slot>
|
|
4607
4607
|
</div>
|
|
4608
4608
|
</sl-popup>
|
|
4609
|
-
`}};
|
|
4609
|
+
`}};Ga.styles=[Nr,Ds],Ga.dependencies={"sl-popup":Va},xi([Se("slot:not([name])")],Ga.prototype,"defaultSlot",2),xi([Se(".tooltip__body")],Ga.prototype,"body",2),xi([Se("sl-popup")],Ga.prototype,"popup",2),xi([ye()],Ga.prototype,"content",2),xi([ye()],Ga.prototype,"placement",2),xi([ye({type:Boolean,reflect:!0})],Ga.prototype,"disabled",2),xi([ye({type:Number})],Ga.prototype,"distance",2),xi([ye({type:Boolean,reflect:!0})],Ga.prototype,"open",2),xi([ye({type:Number})],Ga.prototype,"skidding",2),xi([ye()],Ga.prototype,"trigger",2),xi([ye({type:Boolean})],Ga.prototype,"hoist",2),xi([Br("open",{waitUntilFirstUpdate:!0})],Ga.prototype,"handleOpenChange",1),xi([Br(["content","distance","hoist","placement","skidding"])],Ga.prototype,"handleOptionsChange",1),xi([Br("disabled")],Ga.prototype,"handleDisabledChange",1),es("tooltip.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:150,easing:"ease"}}),es("tooltip.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:150,easing:"ease"}});var Ka=h`
|
|
4610
4610
|
:host {
|
|
4611
4611
|
--error-color: var(--sl-color-danger-600);
|
|
4612
4612
|
--success-color: var(--sl-color-success-600);
|
|
@@ -4649,9 +4649,9 @@ const qr=Ce(class extends Ie{constructor(e){if(super(e),e.type!==ze||"class"!==e
|
|
|
4649
4649
|
slot {
|
|
4650
4650
|
display: inline-flex;
|
|
4651
4651
|
}
|
|
4652
|
-
`,
|
|
4652
|
+
`,Ya=class extends qr{constructor(){super(...arguments),this.localize=new vs(this),this.isCopying=!1,this.status="rest",this.value="",this.from="",this.disabled=!1,this.copyLabel="",this.successLabel="",this.errorLabel="",this.feedbackDuration=1e3,this.tooltipPlacement="top",this.hoist=!1}async handleCopy(){if(this.disabled||this.isCopying)return;this.isCopying=!0;let e=this.value;if(this.from){const t=this.getRootNode(),i=this.from.includes("."),o=this.from.includes("[")&&this.from.includes("]");let n=this.from,r="";i?[n,r]=this.from.trim().split("."):o&&([n,r]=this.from.trim().replace(/\]$/,"").split("["));const s="getElementById"in t?t.getElementById(n):null;s?e=o?s.getAttribute(r)||"":i?s[r]||"":s.textContent||"":(this.showStatus("error"),this.emit("sl-error"))}if(e)try{await navigator.clipboard.writeText(e),this.showStatus("success"),this.emit("sl-copy",{detail:{value:e}})}catch(e){this.showStatus("error"),this.emit("sl-error")}else this.showStatus("error"),this.emit("sl-error")}async showStatus(e){const t=this.copyLabel||this.localize.term("copy"),i=this.successLabel||this.localize.term("copied"),o=this.errorLabel||this.localize.term("error"),n="success"===e?this.successIcon:this.errorIcon,r=ts(this,"copy.in",{dir:"ltr"}),s=ts(this,"copy.out",{dir:"ltr"});this.tooltip.content="success"===e?i:o,await this.copyIcon.animate(s.keyframes,s.options).finished,this.copyIcon.hidden=!0,this.status=e,n.hidden=!1,await n.animate(r.keyframes,r.options).finished,setTimeout((async()=>{await n.animate(s.keyframes,s.options).finished,n.hidden=!0,this.status="rest",this.copyIcon.hidden=!1,await this.copyIcon.animate(r.keyframes,r.options).finished,this.tooltip.content=t,this.isCopying=!1}),this.feedbackDuration)}render(){const e=this.copyLabel||this.localize.term("copy");return Q`
|
|
4653
4653
|
<sl-tooltip
|
|
4654
|
-
class=${
|
|
4654
|
+
class=${Kr({"copy-button":!0,"copy-button--success":"success"===this.status,"copy-button--error":"error"===this.status})}
|
|
4655
4655
|
content=${e}
|
|
4656
4656
|
placement=${this.tooltipPlacement}
|
|
4657
4657
|
?disabled=${this.disabled}
|
|
@@ -4681,7 +4681,7 @@ const qr=Ce(class extends Ie{constructor(e){if(super(e),e.type!==ze||"class"!==e
|
|
|
4681
4681
|
</slot>
|
|
4682
4682
|
</button>
|
|
4683
4683
|
</sl-tooltip>
|
|
4684
|
-
`}};
|
|
4684
|
+
`}};Ya.styles=[Nr,Ka],Ya.dependencies={"sl-icon":Gr,"sl-tooltip":Ga},xi([Se('slot[name="copy-icon"]')],Ya.prototype,"copyIcon",2),xi([Se('slot[name="success-icon"]')],Ya.prototype,"successIcon",2),xi([Se('slot[name="error-icon"]')],Ya.prototype,"errorIcon",2),xi([Se("sl-tooltip")],Ya.prototype,"tooltip",2),xi([xe()],Ya.prototype,"isCopying",2),xi([xe()],Ya.prototype,"status",2),xi([ye()],Ya.prototype,"value",2),xi([ye()],Ya.prototype,"from",2),xi([ye({type:Boolean,reflect:!0})],Ya.prototype,"disabled",2),xi([ye({attribute:"copy-label"})],Ya.prototype,"copyLabel",2),xi([ye({attribute:"success-label"})],Ya.prototype,"successLabel",2),xi([ye({attribute:"error-label"})],Ya.prototype,"errorLabel",2),xi([ye({attribute:"feedback-duration",type:Number})],Ya.prototype,"feedbackDuration",2),xi([ye({attribute:"tooltip-placement"})],Ya.prototype,"tooltipPlacement",2),xi([ye({type:Boolean})],Ya.prototype,"hoist",2),es("copy.in",{keyframes:[{scale:".25",opacity:".25"},{scale:"1",opacity:"1"}],options:{duration:100}}),es("copy.out",{keyframes:[{scale:"1",opacity:"1"},{scale:".25",opacity:"0"}],options:{duration:100}});Ya.define("sl-copy-button");var Qa=new WeakMap;function Za(e){let t=Qa.get(e);return t||(t=window.getComputedStyle(e,null),Qa.set(e,t)),t}function Ja(e){const t=e.tagName.toLowerCase(),i=Number(e.getAttribute("tabindex"));if(e.hasAttribute("tabindex")&&(isNaN(i)||i<=-1))return!1;if(e.hasAttribute("disabled"))return!1;if(e.closest("[inert]"))return!1;if("input"===t&&"radio"===e.getAttribute("type")&&!e.hasAttribute("checked"))return!1;if(!function(e){if("function"==typeof e.checkVisibility)return e.checkVisibility({checkOpacity:!1,checkVisibilityCSS:!0});const t=Za(e);return"hidden"!==t.visibility&&"none"!==t.display}(e))return!1;if(("audio"===t||"video"===t)&&e.hasAttribute("controls"))return!0;if(e.hasAttribute("tabindex"))return!0;if(e.hasAttribute("contenteditable")&&"false"!==e.getAttribute("contenteditable"))return!0;return!!["button","input","select","textarea","a","audio","video","summary","iframe"].includes(t)||function(e){const t=Za(e),{overflowY:i,overflowX:o}=t;return"scroll"===i||"scroll"===o||"auto"===i&&"auto"===o&&(e.scrollHeight>e.clientHeight&&"auto"===i||!(!(e.scrollWidth>e.clientWidth)||"auto"!==o))}(e)}function Xa(e){const t=new WeakMap,i=[];return function o(n){if(n instanceof Element){if(n.hasAttribute("inert")||n.closest("[inert]"))return;if(t.has(n))return;t.set(n,!0),!i.includes(n)&&Ja(n)&&i.push(n),n instanceof HTMLSlotElement&&function(e,t){var i;return(null==(i=e.getRootNode({composed:!0}))?void 0:i.host)!==t}(n,e)&&n.assignedElements({flatten:!0}).forEach((e=>{o(e)})),null!==n.shadowRoot&&"open"===n.shadowRoot.mode&&o(n.shadowRoot)}for(const e of n.children)o(e)}(e),i.sort(((e,t)=>{const i=Number(e.getAttribute("tabindex"))||0;return(Number(t.getAttribute("tabindex"))||0)-i}))}function*el(e=document.activeElement){null!=e&&(yield e,"shadowRoot"in e&&e.shadowRoot&&"closed"!==e.shadowRoot.mode&&(yield*Si(el(e.shadowRoot.activeElement))))}var tl=[],il=class{constructor(e){this.tabDirection="forward",this.handleFocusIn=()=>{this.isActive()&&this.checkFocus()},this.handleKeyDown=e=>{var t;if("Tab"!==e.key||this.isExternalActivated)return;if(!this.isActive())return;const i=[...el()].pop();if(this.previousFocus=i,this.previousFocus&&this.possiblyHasTabbableChildren(this.previousFocus))return;e.shiftKey?this.tabDirection="backward":this.tabDirection="forward";const o=Xa(this.element);let n=o.findIndex((e=>e===i));this.previousFocus=this.currentFocus;const r="forward"===this.tabDirection?1:-1;for(;;){n+r>=o.length?n=0:n+r<0?n=o.length-1:n+=r,this.previousFocus=this.currentFocus;const i=o[n];if("backward"===this.tabDirection&&this.previousFocus&&this.possiblyHasTabbableChildren(this.previousFocus))return;if(i&&this.possiblyHasTabbableChildren(i))return;e.preventDefault(),this.currentFocus=i,null==(t=this.currentFocus)||t.focus({preventScroll:!1});const s=[...el()];if(s.includes(this.currentFocus)||!s.includes(this.previousFocus))break}setTimeout((()=>this.checkFocus()))},this.handleKeyUp=()=>{this.tabDirection="forward"},this.element=e,this.elementsWithTabbableControls=["iframe"]}activate(){tl.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){tl=tl.filter((e=>e!==this.element)),this.currentFocus=null,document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return tl[tl.length-1]===this.element}activateExternal(){this.isExternalActivated=!0}deactivateExternal(){this.isExternalActivated=!1}checkFocus(){if(this.isActive()&&!this.isExternalActivated){const e=Xa(this.element);if(!this.element.matches(":focus-within")){const t=e[0],i=e[e.length-1],o="forward"===this.tabDirection?t:i;"function"==typeof(null==o?void 0:o.focus)&&(this.currentFocus=o,o.focus({preventScroll:!1}))}}}possiblyHasTabbableChildren(e){return this.elementsWithTabbableControls.includes(e.tagName.toLowerCase())||e.hasAttribute("controls")}};var ol=new Set;function nl(e){if(ol.add(e),!document.documentElement.classList.contains("sl-scroll-lock")){const e=function(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}()+function(){const e=Number(getComputedStyle(document.body).paddingRight.replace(/px/,""));return isNaN(e)||!e?0:e}();let t=getComputedStyle(document.documentElement).scrollbarGutter;t&&"auto"!==t||(t="stable"),e<=0&&(t="revert"),document.documentElement.style.setProperty("--sl-scroll-lock-gutter",t),document.documentElement.classList.add("sl-scroll-lock"),document.documentElement.style.setProperty("--sl-scroll-lock-size",`${e}px`)}}function rl(e){ol.delete(e),0===ol.size&&(document.documentElement.classList.remove("sl-scroll-lock"),document.documentElement.style.removeProperty("--sl-scroll-lock-size"))}var sl=h`
|
|
4685
4685
|
:host {
|
|
4686
4686
|
--width: 31rem;
|
|
4687
4687
|
--header-spacing: var(--sl-spacing-large);
|
|
@@ -4798,10 +4798,10 @@ const qr=Ce(class extends Ie{constructor(e){if(super(e),e.type!==ze||"class"!==e
|
|
|
4798
4798
|
border: solid 1px var(--sl-color-neutral-0);
|
|
4799
4799
|
}
|
|
4800
4800
|
}
|
|
4801
|
-
`,
|
|
4801
|
+
`,al=class extends qr{constructor(){super(...arguments),this.hasSlotController=new ws(this,"footer"),this.localize=new vs(this),this.modal=new il(this),this.open=!1,this.label="",this.noHeader=!1,this.handleDocumentKeyDown=e=>{"Escape"===e.key&&this.modal.isActive()&&this.open&&(e.stopPropagation(),this.requestClose("keyboard"))}}firstUpdated(){this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),nl(this))}disconnectedCallback(){var e;super.disconnectedCallback(),this.modal.deactivate(),rl(this),null==(e=this.closeWatcher)||e.destroy()}requestClose(e){if(this.emit("sl-request-close",{cancelable:!0,detail:{source:e}}).defaultPrevented){const e=ts(this,"dialog.denyClose",{dir:this.localize.dir()});os(this.panel,e.keyframes,e.options)}else this.hide()}addOpenListeners(){var e;"CloseWatcher"in window?(null==(e=this.closeWatcher)||e.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>this.requestClose("keyboard")):document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){var e;null==(e=this.closeWatcher)||e.destroy(),document.removeEventListener("keydown",this.handleDocumentKeyDown)}async handleOpenChange(){if(this.open){this.emit("sl-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.modal.activate(),nl(this);const e=this.querySelector("[autofocus]");e&&e.removeAttribute("autofocus"),await Promise.all([ss(this.dialog),ss(this.overlay)]),this.dialog.hidden=!1,requestAnimationFrame((()=>{this.emit("sl-initial-focus",{cancelable:!0}).defaultPrevented||(e?e.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),e&&e.setAttribute("autofocus","")}));const t=ts(this,"dialog.show",{dir:this.localize.dir()}),i=ts(this,"dialog.overlay.show",{dir:this.localize.dir()});await Promise.all([os(this.panel,t.keyframes,t.options),os(this.overlay,i.keyframes,i.options)]),this.emit("sl-after-show")}else{this.emit("sl-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([ss(this.dialog),ss(this.overlay)]);const e=ts(this,"dialog.hide",{dir:this.localize.dir()}),t=ts(this,"dialog.overlay.hide",{dir:this.localize.dir()});await Promise.all([os(this.overlay,t.keyframes,t.options).then((()=>{this.overlay.hidden=!0})),os(this.panel,e.keyframes,e.options).then((()=>{this.panel.hidden=!0}))]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,rl(this);const i=this.originalTrigger;"function"==typeof(null==i?void 0:i.focus)&&setTimeout((()=>i.focus())),this.emit("sl-after-hide")}}async show(){if(!this.open)return this.open=!0,is(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,is(this,"sl-after-hide")}render(){return Q`
|
|
4802
4802
|
<div
|
|
4803
4803
|
part="base"
|
|
4804
|
-
class=${
|
|
4804
|
+
class=${Kr({dialog:!0,"dialog--open":this.open,"dialog--has-footer":this.hasSlotController.test("footer")})}
|
|
4805
4805
|
>
|
|
4806
4806
|
<div part="overlay" class="dialog__overlay" @click=${()=>this.requestClose("overlay")} tabindex="-1"></div>
|
|
4807
4807
|
|
|
@@ -4842,7 +4842,7 @@ const qr=Ce(class extends Ie{constructor(e){if(super(e),e.type!==ze||"class"!==e
|
|
|
4842
4842
|
</footer>
|
|
4843
4843
|
</div>
|
|
4844
4844
|
</div>
|
|
4845
|
-
`}};
|
|
4845
|
+
`}};al.styles=[Nr,sl],al.dependencies={"sl-icon-button":Yr},xi([Se(".dialog")],al.prototype,"dialog",2),xi([Se(".dialog__panel")],al.prototype,"panel",2),xi([Se(".dialog__overlay")],al.prototype,"overlay",2),xi([ye({type:Boolean,reflect:!0})],al.prototype,"open",2),xi([ye({reflect:!0})],al.prototype,"label",2),xi([ye({attribute:"no-header",type:Boolean,reflect:!0})],al.prototype,"noHeader",2),xi([Br("open",{waitUntilFirstUpdate:!0})],al.prototype,"handleOpenChange",1),es("dialog.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),es("dialog.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}}),es("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}}),es("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}}),es("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}});al.define("sl-dialog");var ll=h`
|
|
4846
4846
|
:host {
|
|
4847
4847
|
display: inline-block;
|
|
4848
4848
|
}
|
|
@@ -4890,7 +4890,7 @@ const qr=Ce(class extends Ie{constructor(e){if(super(e),e.type!==ze||"class"!==e
|
|
|
4890
4890
|
max-width: var(--auto-size-available-width) !important;
|
|
4891
4891
|
max-height: var(--auto-size-available-height) !important;
|
|
4892
4892
|
}
|
|
4893
|
-
`,
|
|
4893
|
+
`,cl=class extends qr{constructor(){super(...arguments),this.localize=new vs(this),this.open=!1,this.placement="bottom-start",this.disabled=!1,this.stayOpenOnSelect=!1,this.distance=0,this.skidding=0,this.hoist=!1,this.sync=void 0,this.handleKeyDown=e=>{this.open&&"Escape"===e.key&&(e.stopPropagation(),this.hide(),this.focusOnTrigger())},this.handleDocumentKeyDown=e=>{var t;if("Escape"===e.key&&this.open&&!this.closeWatcher)return e.stopPropagation(),this.focusOnTrigger(),void this.hide();if("Tab"===e.key){if(this.open&&"sl-menu-item"===(null==(t=document.activeElement)?void 0:t.tagName.toLowerCase()))return e.preventDefault(),this.hide(),void this.focusOnTrigger();setTimeout((()=>{var e,t,i;const o=(null==(e=this.containingElement)?void 0:e.getRootNode())instanceof ShadowRoot?null==(i=null==(t=document.activeElement)?void 0:t.shadowRoot)?void 0:i.activeElement:document.activeElement;this.containingElement&&(null==o?void 0:o.closest(this.containingElement.tagName.toLowerCase()))===this.containingElement||this.hide()}))}},this.handleDocumentMouseDown=e=>{const t=e.composedPath();this.containingElement&&!t.includes(this.containingElement)&&this.hide()},this.handlePanelSelect=e=>{const t=e.target;this.stayOpenOnSelect||"sl-menu"!==t.tagName.toLowerCase()||(this.hide(),this.focusOnTrigger())}}connectedCallback(){super.connectedCallback(),this.containingElement||(this.containingElement=this)}firstUpdated(){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0)}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners(),this.hide()}focusOnTrigger(){const e=this.trigger.assignedElements({flatten:!0})[0];"function"==typeof(null==e?void 0:e.focus)&&e.focus()}getMenu(){return this.panel.assignedElements({flatten:!0}).find((e=>"sl-menu"===e.tagName.toLowerCase()))}handleTriggerClick(){this.open?this.hide():(this.show(),this.focusOnTrigger())}async handleTriggerKeyDown(e){if([" ","Enter"].includes(e.key))return e.preventDefault(),void this.handleTriggerClick();const t=this.getMenu();if(t){const i=t.getAllItems(),o=i[0],n=i[i.length-1];["ArrowDown","ArrowUp","Home","End"].includes(e.key)&&(e.preventDefault(),this.open||(this.show(),await this.updateComplete),i.length>0&&this.updateComplete.then((()=>{"ArrowDown"!==e.key&&"Home"!==e.key||(t.setCurrentItem(o),o.focus()),"ArrowUp"!==e.key&&"End"!==e.key||(t.setCurrentItem(n),n.focus())})))}}handleTriggerKeyUp(e){" "===e.key&&e.preventDefault()}handleTriggerSlotChange(){this.updateAccessibleTrigger()}updateAccessibleTrigger(){const e=this.trigger.assignedElements({flatten:!0}).find((e=>function(e){var t,i;const o=Xa(e);return{start:null!=(t=o[0])?t:null,end:null!=(i=o[o.length-1])?i:null}}(e).start));let t;if(e){switch(e.tagName.toLowerCase()){case"sl-button":case"sl-icon-button":t=e.button;break;default:t=e}t.setAttribute("aria-haspopup","true"),t.setAttribute("aria-expanded",this.open?"true":"false")}}async show(){if(!this.open)return this.open=!0,is(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,is(this,"sl-after-hide")}reposition(){this.popup.reposition()}addOpenListeners(){var e;this.panel.addEventListener("sl-select",this.handlePanelSelect),"CloseWatcher"in window?(null==(e=this.closeWatcher)||e.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>{this.hide(),this.focusOnTrigger()}):this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){var e;this.panel&&(this.panel.removeEventListener("sl-select",this.handlePanelSelect),this.panel.removeEventListener("keydown",this.handleKeyDown)),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown),null==(e=this.closeWatcher)||e.destroy()}async handleOpenChange(){if(this.disabled)this.open=!1;else if(this.updateAccessibleTrigger(),this.open){this.emit("sl-show"),this.addOpenListeners(),await ss(this),this.panel.hidden=!1,this.popup.active=!0;const{keyframes:e,options:t}=ts(this,"dropdown.show",{dir:this.localize.dir()});await os(this.popup.popup,e,t),this.emit("sl-after-show")}else{this.emit("sl-hide"),this.removeOpenListeners(),await ss(this);const{keyframes:e,options:t}=ts(this,"dropdown.hide",{dir:this.localize.dir()});await os(this.popup.popup,e,t),this.panel.hidden=!0,this.popup.active=!1,this.emit("sl-after-hide")}}render(){return Q`
|
|
4894
4894
|
<sl-popup
|
|
4895
4895
|
part="base"
|
|
4896
4896
|
id="dropdown"
|
|
@@ -4903,7 +4903,7 @@ const qr=Ce(class extends Ie{constructor(e){if(super(e),e.type!==ze||"class"!==e
|
|
|
4903
4903
|
auto-size="vertical"
|
|
4904
4904
|
auto-size-padding="10"
|
|
4905
4905
|
sync=${$e(this.sync?this.sync:void 0)}
|
|
4906
|
-
class=${
|
|
4906
|
+
class=${Kr({dropdown:!0,"dropdown--open":this.open})}
|
|
4907
4907
|
>
|
|
4908
4908
|
<slot
|
|
4909
4909
|
name="trigger"
|
|
@@ -4920,7 +4920,7 @@ const qr=Ce(class extends Ie{constructor(e){if(super(e),e.type!==ze||"class"!==e
|
|
|
4920
4920
|
<slot part="panel" class="dropdown__panel"></slot>
|
|
4921
4921
|
</div>
|
|
4922
4922
|
</sl-popup>
|
|
4923
|
-
`}};
|
|
4923
|
+
`}};cl.styles=[Nr,ll],cl.dependencies={"sl-popup":Va},xi([Se(".dropdown")],cl.prototype,"popup",2),xi([Se(".dropdown__trigger")],cl.prototype,"trigger",2),xi([Se(".dropdown__panel")],cl.prototype,"panel",2),xi([ye({type:Boolean,reflect:!0})],cl.prototype,"open",2),xi([ye({reflect:!0})],cl.prototype,"placement",2),xi([ye({type:Boolean,reflect:!0})],cl.prototype,"disabled",2),xi([ye({attribute:"stay-open-on-select",type:Boolean,reflect:!0})],cl.prototype,"stayOpenOnSelect",2),xi([ye({attribute:!1})],cl.prototype,"containingElement",2),xi([ye({type:Number})],cl.prototype,"distance",2),xi([ye({type:Number})],cl.prototype,"skidding",2),xi([ye({type:Boolean})],cl.prototype,"hoist",2),xi([ye({reflect:!0})],cl.prototype,"sync",2),xi([Br("open",{waitUntilFirstUpdate:!0})],cl.prototype,"handleOpenChange",1),es("dropdown.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}}),es("dropdown.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});cl.define("sl-dropdown");var dl=h`
|
|
4924
4924
|
:host {
|
|
4925
4925
|
display: block;
|
|
4926
4926
|
position: relative;
|
|
@@ -4935,14 +4935,14 @@ const qr=Ce(class extends Ie{constructor(e){if(super(e),e.type!==ze||"class"!==e
|
|
|
4935
4935
|
::slotted(sl-divider) {
|
|
4936
4936
|
--spacing: var(--sl-spacing-x-small);
|
|
4937
4937
|
}
|
|
4938
|
-
`,
|
|
4938
|
+
`,hl=class extends qr{connectedCallback(){super.connectedCallback(),this.setAttribute("role","menu")}handleClick(e){const t=["menuitem","menuitemcheckbox"],i=e.composedPath().find((e=>{var i;return t.includes((null==(i=null==e?void 0:e.getAttribute)?void 0:i.call(e,"role"))||"")}));if(!i)return;const o=i;"checkbox"===o.type&&(o.checked=!o.checked),this.emit("sl-select",{detail:{item:o}})}handleKeyDown(e){if("Enter"===e.key||" "===e.key){const t=this.getCurrentItem();e.preventDefault(),e.stopPropagation(),null==t||t.click()}else if(["ArrowDown","ArrowUp","Home","End"].includes(e.key)){const t=this.getAllItems(),i=this.getCurrentItem();let o=i?t.indexOf(i):0;t.length>0&&(e.preventDefault(),e.stopPropagation(),"ArrowDown"===e.key?o++:"ArrowUp"===e.key?o--:"Home"===e.key?o=0:"End"===e.key&&(o=t.length-1),o<0&&(o=t.length-1),o>t.length-1&&(o=0),this.setCurrentItem(t[o]),t[o].focus())}}handleMouseDown(e){const t=e.target;this.isMenuItem(t)&&this.setCurrentItem(t)}handleSlotChange(){const e=this.getAllItems();e.length>0&&this.setCurrentItem(e[0])}isMenuItem(e){var t;return"sl-menu-item"===e.tagName.toLowerCase()||["menuitem","menuitemcheckbox","menuitemradio"].includes(null!=(t=e.getAttribute("role"))?t:"")}getAllItems(){return[...this.defaultSlot.assignedElements({flatten:!0})].filter((e=>!(e.inert||!this.isMenuItem(e))))}getCurrentItem(){return this.getAllItems().find((e=>"0"===e.getAttribute("tabindex")))}setCurrentItem(e){this.getAllItems().forEach((t=>{t.setAttribute("tabindex",t===e?"0":"-1")}))}render(){return Q`
|
|
4939
4939
|
<slot
|
|
4940
4940
|
@slotchange=${this.handleSlotChange}
|
|
4941
4941
|
@click=${this.handleClick}
|
|
4942
4942
|
@keydown=${this.handleKeyDown}
|
|
4943
4943
|
@mousedown=${this.handleMouseDown}
|
|
4944
4944
|
></slot>
|
|
4945
|
-
`}};
|
|
4945
|
+
`}};hl.styles=[Nr,dl],xi([Se("slot")],hl.prototype,"defaultSlot",2);hl.define("sl-menu");var ul=h`
|
|
4946
4946
|
:host {
|
|
4947
4947
|
--submenu-offset: -2px;
|
|
4948
4948
|
|
|
@@ -5094,9 +5094,9 @@ const qr=Ce(class extends Ie{constructor(e){if(super(e),e.type!==ze||"class"!==e
|
|
|
5094
5094
|
max-width: var(--auto-size-available-width) !important;
|
|
5095
5095
|
max-height: var(--auto-size-available-height) !important;
|
|
5096
5096
|
}
|
|
5097
|
-
`,
|
|
5097
|
+
`,fl=class{constructor(e,t,i){this.popupRef=ut(),this.enableSubmenuTimer=-1,this.isConnected=!1,this.isPopupConnected=!1,this.skidding=0,this.submenuOpenDelay=100,this.handleMouseMove=e=>{this.host.style.setProperty("--safe-triangle-cursor-x",`${e.clientX}px`),this.host.style.setProperty("--safe-triangle-cursor-y",`${e.clientY}px`)},this.handleMouseOver=()=>{this.hasSlotController.test("submenu")&&this.enableSubmenu()},this.handleKeyDown=e=>{switch(e.key){case"Escape":case"Tab":this.disableSubmenu();break;case"ArrowLeft":e.target!==this.host&&(e.preventDefault(),e.stopPropagation(),this.host.focus(),this.disableSubmenu());break;case"ArrowRight":case"Enter":case" ":this.handleSubmenuEntry(e)}},this.handleClick=e=>{var t;e.target===this.host?(e.preventDefault(),e.stopPropagation()):e.target instanceof Element&&("sl-menu-item"===e.target.tagName||(null==(t=e.target.role)?void 0:t.startsWith("menuitem")))&&this.disableSubmenu()},this.handleFocusOut=e=>{e.relatedTarget&&e.relatedTarget instanceof Element&&this.host.contains(e.relatedTarget)||this.disableSubmenu()},this.handlePopupMouseover=e=>{e.stopPropagation()},this.handlePopupReposition=()=>{const e=this.host.renderRoot.querySelector("slot[name='submenu']"),t=null==e?void 0:e.assignedElements({flatten:!0}).filter((e=>"sl-menu"===e.localName))[0],i="rtl"===this.localize.dir();if(!t)return;const{left:o,top:n,width:r,height:s}=t.getBoundingClientRect();this.host.style.setProperty("--safe-triangle-submenu-start-x",`${i?o+r:o}px`),this.host.style.setProperty("--safe-triangle-submenu-start-y",`${n}px`),this.host.style.setProperty("--safe-triangle-submenu-end-x",`${i?o+r:o}px`),this.host.style.setProperty("--safe-triangle-submenu-end-y",`${n+s}px`)},(this.host=e).addController(this),this.hasSlotController=t,this.localize=i}hostConnected(){this.hasSlotController.test("submenu")&&!this.host.disabled&&this.addListeners()}hostDisconnected(){this.removeListeners()}hostUpdated(){this.hasSlotController.test("submenu")&&!this.host.disabled?(this.addListeners(),this.updateSkidding()):this.removeListeners()}addListeners(){this.isConnected||(this.host.addEventListener("mousemove",this.handleMouseMove),this.host.addEventListener("mouseover",this.handleMouseOver),this.host.addEventListener("keydown",this.handleKeyDown),this.host.addEventListener("click",this.handleClick),this.host.addEventListener("focusout",this.handleFocusOut),this.isConnected=!0),this.isPopupConnected||this.popupRef.value&&(this.popupRef.value.addEventListener("mouseover",this.handlePopupMouseover),this.popupRef.value.addEventListener("sl-reposition",this.handlePopupReposition),this.isPopupConnected=!0)}removeListeners(){this.isConnected&&(this.host.removeEventListener("mousemove",this.handleMouseMove),this.host.removeEventListener("mouseover",this.handleMouseOver),this.host.removeEventListener("keydown",this.handleKeyDown),this.host.removeEventListener("click",this.handleClick),this.host.removeEventListener("focusout",this.handleFocusOut),this.isConnected=!1),this.isPopupConnected&&this.popupRef.value&&(this.popupRef.value.removeEventListener("mouseover",this.handlePopupMouseover),this.popupRef.value.removeEventListener("sl-reposition",this.handlePopupReposition),this.isPopupConnected=!1)}handleSubmenuEntry(e){const t=this.host.renderRoot.querySelector("slot[name='submenu']");if(!t)return void console.error("Cannot activate a submenu if no corresponding menuitem can be found.",this);let i=null;for(const e of t.assignedElements())if(i=e.querySelectorAll("sl-menu-item, [role^='menuitem']"),0!==i.length)break;if(i&&0!==i.length){i[0].setAttribute("tabindex","0");for(let e=1;e!==i.length;++e)i[e].setAttribute("tabindex","-1");this.popupRef.value&&(e.preventDefault(),e.stopPropagation(),this.popupRef.value.active?i[0]instanceof HTMLElement&&i[0].focus():(this.enableSubmenu(!1),this.host.updateComplete.then((()=>{i[0]instanceof HTMLElement&&i[0].focus()})),this.host.requestUpdate()))}}setSubmenuState(e){this.popupRef.value&&this.popupRef.value.active!==e&&(this.popupRef.value.active=e,this.host.requestUpdate())}enableSubmenu(e=!0){e?(window.clearTimeout(this.enableSubmenuTimer),this.enableSubmenuTimer=window.setTimeout((()=>{this.setSubmenuState(!0)}),this.submenuOpenDelay)):this.setSubmenuState(!0)}disableSubmenu(){window.clearTimeout(this.enableSubmenuTimer),this.setSubmenuState(!1)}updateSkidding(){var e;if(!(null==(e=this.host.parentElement)?void 0:e.computedStyleMap))return;const t=this.host.parentElement.computedStyleMap(),i=["padding-top","border-top-width","margin-top"].reduce(((e,i)=>{var o;const n=null!=(o=t.get(i))?o:new CSSUnitValue(0,"px");return e-(n instanceof CSSUnitValue?n:new CSSUnitValue(0,"px")).to("px").value}),0);this.skidding=i}isExpanded(){return!!this.popupRef.value&&this.popupRef.value.active}renderSubmenu(){const e="ltr"===this.localize.dir();return this.isConnected?Q`
|
|
5098
5098
|
<sl-popup
|
|
5099
|
-
${
|
|
5099
|
+
${mt(this.popupRef)}
|
|
5100
5100
|
placement=${e?"right-start":"left-start"}
|
|
5101
5101
|
anchor="anchor"
|
|
5102
5102
|
flip
|
|
@@ -5108,11 +5108,11 @@ const qr=Ce(class extends Ie{constructor(e){if(super(e),e.type!==ze||"class"!==e
|
|
|
5108
5108
|
>
|
|
5109
5109
|
<slot name="submenu"></slot>
|
|
5110
5110
|
</sl-popup>
|
|
5111
|
-
`:Q` <slot name="submenu" hidden></slot> `}},
|
|
5111
|
+
`:Q` <slot name="submenu" hidden></slot> `}},pl=class extends qr{constructor(){super(...arguments),this.type="normal",this.checked=!1,this.value="",this.loading=!1,this.disabled=!1,this.localize=new vs(this),this.hasSlotController=new ws(this,"submenu"),this.submenuController=new fl(this,this.hasSlotController,this.localize),this.handleHostClick=e=>{this.disabled&&(e.preventDefault(),e.stopImmediatePropagation())},this.handleMouseOver=e=>{this.focus(),e.stopPropagation()}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleHostClick),this.addEventListener("mouseover",this.handleMouseOver)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleHostClick),this.removeEventListener("mouseover",this.handleMouseOver)}handleDefaultSlotChange(){const e=this.getTextLabel();void 0!==this.cachedTextLabel?e!==this.cachedTextLabel&&(this.cachedTextLabel=e,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1})):this.cachedTextLabel=e}handleCheckedChange(){if(this.checked&&"checkbox"!==this.type)return this.checked=!1,void console.error('The checked attribute can only be used on menu items with type="checkbox"',this);"checkbox"===this.type?this.setAttribute("aria-checked",this.checked?"true":"false"):this.removeAttribute("aria-checked")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleTypeChange(){"checkbox"===this.type?(this.setAttribute("role","menuitemcheckbox"),this.setAttribute("aria-checked",this.checked?"true":"false")):(this.setAttribute("role","menuitem"),this.removeAttribute("aria-checked"))}getTextLabel(){return function(e){if(!e)return"";const t=e.assignedNodes({flatten:!0});let i="";return[...t].forEach((e=>{e.nodeType===Node.TEXT_NODE&&(i+=e.textContent)})),i}(this.defaultSlot)}isSubmenu(){return this.hasSlotController.test("submenu")}render(){const e="rtl"===this.localize.dir(),t=this.submenuController.isExpanded();return Q`
|
|
5112
5112
|
<div
|
|
5113
5113
|
id="anchor"
|
|
5114
5114
|
part="base"
|
|
5115
|
-
class=${
|
|
5115
|
+
class=${Kr({"menu-item":!0,"menu-item--rtl":e,"menu-item--checked":this.checked,"menu-item--disabled":this.disabled,"menu-item--loading":this.loading,"menu-item--has-submenu":this.isSubmenu(),"menu-item--submenu-expanded":t})}
|
|
5116
5116
|
?aria-haspopup="${this.isSubmenu()}"
|
|
5117
5117
|
?aria-expanded="${!!t}"
|
|
5118
5118
|
>
|
|
@@ -5133,4 +5133,4 @@ const qr=Ce(class extends Ie{constructor(e){if(super(e),e.type!==ze||"class"!==e
|
|
|
5133
5133
|
${this.submenuController.renderSubmenu()}
|
|
5134
5134
|
${this.loading?Q` <sl-spinner part="spinner" exportparts="base:spinner__base"></sl-spinner> `:""}
|
|
5135
5135
|
</div>
|
|
5136
|
-
`}};
|
|
5136
|
+
`}};pl.styles=[Nr,ul],pl.dependencies={"sl-icon":Gr,"sl-popup":Va,"sl-spinner":$s},xi([Se("slot:not([name])")],pl.prototype,"defaultSlot",2),xi([Se(".menu-item")],pl.prototype,"menuItem",2),xi([ye()],pl.prototype,"type",2),xi([ye({type:Boolean,reflect:!0})],pl.prototype,"checked",2),xi([ye()],pl.prototype,"value",2),xi([ye({type:Boolean,reflect:!0})],pl.prototype,"loading",2),xi([ye({type:Boolean,reflect:!0})],pl.prototype,"disabled",2),xi([Br("checked")],pl.prototype,"handleCheckedChange",1),xi([Br("disabled")],pl.prototype,"handleDisabledChange",1),xi([Br("type")],pl.prototype,"handleTypeChange",1);pl.define("sl-menu-item")})();var __webpack_export_target__=self;for(var i in __webpack_exports__)__webpack_export_target__[i]=__webpack_exports__[i];__webpack_exports__.__esModule&&Object.defineProperty(__webpack_export_target__,"__esModule",{value:!0})})();
|