From ff20051861f16da2f69fe9de8cc5dc54b2a79207 Mon Sep 17 00:00:00 2001 From: hakimel Date: Thu, 10 Feb 2022 13:28:37 +0100 Subject: [PATCH] fiv out of sync speaker view after presentation reloads #2822 #3032 --- plugin/notes/notes.esm.js | 2 +- plugin/notes/notes.js | 2 +- plugin/notes/plugin.js | 278 +++++++++++++++++++-------------- plugin/notes/speaker-view.html | 13 ++ 4 files changed, 174 insertions(+), 121 deletions(-) diff --git a/plugin/notes/notes.esm.js b/plugin/notes/notes.esm.js index 626e3fef..39ba0614 100644 --- a/plugin/notes/notes.esm.js +++ b/plugin/notes/notes.esm.js @@ -1 +1 @@ -var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=function(t){return t&&t.Math==Math&&t},n=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof t&&t)||function(){return this}()||Function("return this")(),r={},u=function(t){try{return!!t()}catch(t){return!0}},i=!u((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),a={},o={}.propertyIsEnumerable,l=Object.getOwnPropertyDescriptor,s=l&&!o.call({1:2},1);a.f=s?function(t){var e=l(this,t);return!!e&&e.enumerable}:o;var c=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},p={}.toString,d=function(t){return p.call(t).slice(8,-1)},f=d,h="".split,g=u((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==f(t)?h.call(t,""):Object(t)}:Object,D=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},m=g,v=D,y=function(t){return m(v(t))},k=function(t){return"object"==typeof t?null!==t:"function"==typeof t},A=k,E=function(t,e){if(!A(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!A(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!A(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!A(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},b=D,F=function(t){return Object(b(t))},C=F,x={}.hasOwnProperty,w=function(t,e){return x.call(C(t),e)},S=k,B=n.document,_=S(B)&&S(B.createElement),T=function(t){return _?B.createElement(t):{}},z=T,I=!i&&!u((function(){return 7!=Object.defineProperty(z("div"),"a",{get:function(){return 7}}).a})),R=i,$=a,O=c,P=y,L=E,j=w,M=I,N=Object.getOwnPropertyDescriptor;r.f=R?N:function(t,e){if(t=P(t),e=L(e,!0),M)try{return N(t,e)}catch(t){}if(j(t,e))return O(!$.f.call(t,e),t[e])};var U={},q=k,Z=function(t){if(!q(t))throw TypeError(String(t)+" is not an object");return t},K=i,J=I,H=Z,W=E,Y=Object.defineProperty;U.f=K?Y:function(t,e,n){if(H(t),e=W(e,!0),H(n),J)try{return Y(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t};var V=U,X=c,G=i?function(t,e,n){return V.f(t,e,X(1,n))}:function(t,e,n){return t[e]=n,t},Q={exports:{}},tt=n,et=G,nt=function(t,e){try{et(tt,t,e)}catch(n){tt[t]=e}return e},rt=nt,ut=n["__core-js_shared__"]||rt("__core-js_shared__",{}),it=ut,at=Function.toString;"function"!=typeof it.inspectSource&&(it.inspectSource=function(t){return at.call(t)});var ot=it.inspectSource,lt=ot,st=n.WeakMap,ct="function"==typeof st&&/native code/.test(lt(st)),pt={exports:{}},dt=ut;(pt.exports=function(t,e){return dt[t]||(dt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.12.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var ft,ht,gt,Dt=0,mt=Math.random(),vt=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++Dt+mt).toString(36)},yt=pt.exports,kt=vt,At=yt("keys"),Et=function(t){return At[t]||(At[t]=kt(t))},bt={},Ft=ct,Ct=k,xt=G,wt=w,St=ut,Bt=Et,_t=bt,Tt=n.WeakMap;if(Ft||St.state){var zt=St.state||(St.state=new Tt),It=zt.get,Rt=zt.has,$t=zt.set;ft=function(t,e){if(Rt.call(zt,t))throw new TypeError("Object already initialized");return e.facade=t,$t.call(zt,t,e),e},ht=function(t){return It.call(zt,t)||{}},gt=function(t){return Rt.call(zt,t)}}else{var Ot=Bt("state");_t[Ot]=!0,ft=function(t,e){if(wt(t,Ot))throw new TypeError("Object already initialized");return e.facade=t,xt(t,Ot,e),e},ht=function(t){return wt(t,Ot)?t[Ot]:{}},gt=function(t){return wt(t,Ot)}}var Pt={set:ft,get:ht,has:gt,enforce:function(t){return gt(t)?ht(t):ft(t,{})},getterFor:function(t){return function(e){var n;if(!Ct(e)||(n=ht(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}},Lt=n,jt=G,Mt=w,Nt=nt,Ut=ot,qt=Pt.get,Zt=Pt.enforce,Kt=String(String).split("String");(Q.exports=function(t,e,n,r){var u,i=!!r&&!!r.unsafe,a=!!r&&!!r.enumerable,o=!!r&&!!r.noTargetGet;"function"==typeof n&&("string"!=typeof e||Mt(n,"name")||jt(n,"name",e),(u=Zt(n)).source||(u.source=Kt.join("string"==typeof e?e:""))),t!==Lt?(i?!o&&t[e]&&(a=!0):delete t[e],a?t[e]=n:jt(t,e,n)):a?t[e]=n:Nt(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&qt(this).source||Ut(this)}));var Jt=n,Ht=n,Wt=function(t){return"function"==typeof t?t:void 0},Yt=function(t,e){return arguments.length<2?Wt(Jt[t])||Wt(Ht[t]):Jt[t]&&Jt[t][e]||Ht[t]&&Ht[t][e]},Vt={},Xt=Math.ceil,Gt=Math.floor,Qt=function(t){return isNaN(t=+t)?0:(t>0?Gt:Xt)(t)},te=Qt,ee=Math.min,ne=function(t){return t>0?ee(te(t),9007199254740991):0},re=Qt,ue=Math.max,ie=Math.min,ae=function(t,e){var n=re(t);return n<0?ue(n+e,0):ie(n,e)},oe=y,le=ne,se=ae,ce=function(t){return function(e,n,r){var u,i=oe(e),a=le(i.length),o=se(r,a);if(t&&n!=n){for(;a>o;)if((u=i[o++])!=u)return!0}else for(;a>o;o++)if((t||o in i)&&i[o]===n)return t||o||0;return!t&&-1}},pe={includes:ce(!0),indexOf:ce(!1)},de=w,fe=y,he=pe.indexOf,ge=bt,De=function(t,e){var n,r=fe(t),u=0,i=[];for(n in r)!de(ge,n)&&de(r,n)&&i.push(n);for(;e.length>u;)de(r,n=e[u++])&&(~he(i,n)||i.push(n));return i},me=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ve=De,ye=me.concat("length","prototype");Vt.f=Object.getOwnPropertyNames||function(t){return ve(t,ye)};var ke={};ke.f=Object.getOwnPropertySymbols;var Ae=Vt,Ee=ke,be=Z,Fe=Yt("Reflect","ownKeys")||function(t){var e=Ae.f(be(t)),n=Ee.f;return n?e.concat(n(t)):e},Ce=w,xe=Fe,we=r,Se=U,Be=u,_e=/#|\.prototype\./,Te=function(t,e){var n=Ie[ze(t)];return n==$e||n!=Re&&("function"==typeof e?Be(e):!!e)},ze=Te.normalize=function(t){return String(t).replace(_e,".").toLowerCase()},Ie=Te.data={},Re=Te.NATIVE="N",$e=Te.POLYFILL="P",Oe=Te,Pe=n,Le=r.f,je=G,Me=Q.exports,Ne=nt,Ue=function(t,e){for(var n=xe(e),r=Se.f,u=we.f,i=0;i0&&(!i.multiline||i.multiline&&"\n"!==t[i.lastIndex-1])&&(l="(?: "+l+")",c=" "+c,s++),n=new RegExp("^(?:"+l+")",o)),un&&(n=new RegExp("^"+l+"$(?!\\s)",o)),nn&&(e=i.lastIndex),r=Qe.call(a?n:i,c),a?r?(r.input=r.input.slice(s),r[0]=r[0].slice(s),r.index=i.lastIndex,i.lastIndex+=r[0].length):i.lastIndex=0:nn&&r&&(i.lastIndex=i.global?r.index+r[0].length:e),un&&r&&r.length>1&&tn.call(r[0],n,(function(){for(u=1;u=74)&&(on=sn.match(/Chrome\/(\d+)/))&&(ln=on[1]);var fn=ln&&+ln,hn=fn,gn=u,Dn=!!Object.getOwnPropertySymbols&&!gn((function(){return!String(Symbol())||!Symbol.sham&&hn&&hn<41})),mn=Dn&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,vn=n,yn=pt.exports,kn=w,An=vt,En=Dn,bn=mn,Fn=yn("wks"),Cn=vn.Symbol,xn=bn?Cn:Cn&&Cn.withoutSetter||An,wn=function(t){return kn(Fn,t)&&(En||"string"==typeof Fn[t])||(En&&kn(Cn,t)?Fn[t]=Cn[t]:Fn[t]=xn("Symbol."+t)),Fn[t]},Sn=Q.exports,Bn=an,_n=u,Tn=wn,zn=G,In=Tn("species"),Rn=RegExp.prototype,$n=!_n((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")})),On="$0"==="a".replace(/./,"$0"),Pn=Tn("replace"),Ln=!!/./[Pn]&&""===/./[Pn]("a","$0"),jn=!_n((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),Mn=function(t,e,n,r){var u=Tn(t),i=!_n((function(){var e={};return e[u]=function(){return 7},7!=""[t](e)})),a=i&&!_n((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[In]=function(){return n},n.flags="",n[u]=/./[u]),n.exec=function(){return e=!0,null},n[u](""),!e}));if(!i||!a||"replace"===t&&(!$n||!On||Ln)||"split"===t&&!jn){var o=/./[u],l=n(u,""[t],(function(t,e,n,r,u){var a=e.exec;return a===Bn||a===Rn.exec?i&&!u?{done:!0,value:o.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),{REPLACE_KEEPS_$0:On,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Ln}),s=l[0],c=l[1];Sn(String.prototype,t,s),Sn(Rn,u,2==e?function(t,e){return c.call(t,this,e)}:function(t){return c.call(t,this)})}r&&zn(Rn[u],"sham",!0)},Nn=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e},Un=d,qn=an,Zn=function(t,e){var n=t.exec;if("function"==typeof n){var r=n.call(t,e);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==Un(t))throw TypeError("RegExp#exec called on incompatible receiver");return qn.call(t,e)},Kn=Z,Jn=D,Hn=Nn,Wn=Zn;Mn("search",1,(function(t,e,n){return[function(e){var n=Jn(this),r=null==e?void 0:e[t];return void 0!==r?r.call(e,n):new RegExp(e)[t](String(n))},function(t){var r=n(e,t,this);if(r.done)return r.value;var u=Kn(t),i=String(this),a=u.lastIndex;Hn(a,0)||(u.lastIndex=0);var o=Wn(u,i);return Hn(u.lastIndex,a)||(u.lastIndex=a),null===o?-1:o.index}]}));var Yn=Qt,Vn=D,Xn=function(t){return function(e,n){var r,u,i=String(Vn(e)),a=Yn(n),o=i.length;return a<0||a>=o?t?"":void 0:(r=i.charCodeAt(a))<55296||r>56319||a+1===o||(u=i.charCodeAt(a+1))<56320||u>57343?t?i.charAt(a):r:t?i.slice(a,a+2):u-56320+(r-55296<<10)+65536}},Gn={codeAt:Xn(!1),charAt:Xn(!0)}.charAt,Qn=function(t,e,n){return e+(n?Gn(t,e).length:1)},tr=Z,er=ne,nr=D,rr=Qn,ur=Zn;function ir(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ar(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:u}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){o=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}Mn("match",1,(function(t,e,n){return[function(e){var n=nr(this),r=null==e?void 0:e[t];return void 0!==r?r.call(e,n):new RegExp(e)[t](String(n))},function(t){var r=n(e,t,this);if(r.done)return r.value;var u=tr(t),i=String(this);if(!u.global)return ur(u,i);var a=u.unicode;u.lastIndex=0;for(var o,l=[],s=0;null!==(o=ur(u,i));){var c=String(o[0]);l[s]=c,""===c&&(u.lastIndex=rr(i,er(u.lastIndex),a)),s++}return 0===s?null:l}]}));var dr={};dr[wn("toStringTag")]="z";var fr="[object z]"===String(dr),hr=fr,gr=d,Dr=wn("toStringTag"),mr="Arguments"==gr(function(){return arguments}()),vr=hr?gr:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),Dr))?n:mr?gr(e):"Object"==(r=gr(e))&&"function"==typeof e.callee?"Arguments":r},yr=fr?{}.toString:function(){return"[object "+vr(this)+"]"},kr=fr,Ar=Q.exports,Er=yr;kr||Ar(Object.prototype,"toString",Er,{unsafe:!0});var br=F,Fr=Math.floor,Cr="".replace,xr=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,wr=/\$([$&'`]|\d{1,2})/g,Sr=Mn,Br=Z,_r=ne,Tr=Qt,zr=D,Ir=Qn,Rr=function(t,e,n,r,u,i){var a=n+t.length,o=r.length,l=wr;return void 0!==u&&(u=br(u),l=xr),Cr.call(i,l,(function(i,l){var s;switch(l.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,n);case"'":return e.slice(a);case"<":s=u[l.slice(1,-1)];break;default:var c=+l;if(0===c)return i;if(c>o){var p=Fr(c/10);return 0===p?i:p<=o?void 0===r[p-1]?l.charAt(1):r[p-1]+l.charAt(1):i}s=r[c-1]}return void 0===s?"":s}))},$r=Zn,Or=Math.max,Pr=Math.min;Sr("replace",2,(function(t,e,n,r){var u=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,i=r.REPLACE_KEEPS_$0,a=u?"$":"$0";return[function(n,r){var u=zr(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,u,r):e.call(String(u),n,r)},function(t,r){if(!u&&i||"string"==typeof r&&-1===r.indexOf(a)){var o=n(e,t,this,r);if(o.done)return o.value}var l=Br(t),s=String(this),c="function"==typeof r;c||(r=String(r));var p=l.global;if(p){var d=l.unicode;l.lastIndex=0}for(var f=[];;){var h=$r(l,s);if(null===h)break;if(f.push(h),!p)break;""===String(h[0])&&(l.lastIndex=Ir(s,_r(l.lastIndex),d))}for(var g,D="",m=0,v=0;v=m&&(D+=s.slice(m,k)+C,m=k+y.length)}return D+s.slice(m)}]}));var Lr=Q.exports,jr=Z,Mr=u,Nr=Je,Ur=RegExp.prototype,qr=Ur.toString,Zr=Mr((function(){return"/a/b"!=qr.call({source:"a",flags:"b"})})),Kr="toString"!=qr.name;(Zr||Kr)&&Lr(RegExp.prototype,"toString",(function(){var t=jr(this),e=String(t.source),n=t.flags;return"/"+e+"/"+String(void 0===n&&t instanceof RegExp&&!("flags"in Ur)?Nr.call(t):n)}),{unsafe:!0});var Jr=De,Hr=me,Wr=Object.keys||function(t){return Jr(t,Hr)},Yr=F,Vr=Wr;Ze({target:"Object",stat:!0,forced:u((function(){Vr(1)}))},{keys:function(t){return Vr(Yr(t))}});var Xr,Gr=U,Qr=Z,tu=Wr,eu=i?Object.defineProperties:function(t,e){Qr(t);for(var n,r=tu(e),u=r.length,i=0;u>i;)Gr.f(t,n=r[i++],e[n]);return t},nu=Yt("document","documentElement"),ru=Z,uu=eu,iu=me,au=bt,ou=nu,lu=T,su=Et("IE_PROTO"),cu=function(){},pu=function(t){return"