/*!
* reveal.js 4.2.1
* https://revealjs.com
* MIT licensed
*
* Copyright (C) 2011-2021 Hakim El Hattab, https://hakim.se
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Reveal=t()}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=function(e){return e&&e.Math==Math&&e},n=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof e&&e)||function(){return this}()||Function("return this")(),i={},r=function(e){try{return!!e()}catch(e){return!0}},a=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),o={},s={}.propertyIsEnumerable,l=Object.getOwnPropertyDescriptor,c=l&&!s.call({1:2},1);o.f=c?function(e){var t=l(this,e);return!!t&&t.enumerable}:s;var u=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},d={}.toString,h=function(e){return d.call(e).slice(8,-1)},f=h,v="".split,g=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==f(e)?v.call(e,""):Object(e)}:Object,p=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},m=g,y=p,b=function(e){return m(y(e))},w=function(e){return"object"==typeof e?null!==e:"function"==typeof e},S=w,E=function(e,t){if(!S(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!S(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!S(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!S(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")},k=p,A=function(e){return Object(k(e))},R=A,x={}.hasOwnProperty,L=function(e,t){return x.call(R(e),t)},P=w,C=n.document,N=P(C)&&P(C.createElement),I=function(e){return N?C.createElement(e):{}},M=I,T=!a&&!r((function(){return 7!=Object.defineProperty(M("div"),"a",{get:function(){return 7}}).a})),O=a,D=o,j=u,F=b,z=E,H=L,U=T,B=Object.getOwnPropertyDescriptor;i.f=O?B:function(e,t){if(e=F(e),t=z(t,!0),U)try{return B(e,t)}catch(e){}if(H(e,t))return j(!D.f.call(e,t),e[t])};var _={},q=w,W=function(e){if(!q(e))throw TypeError(String(e)+" is not an object");return e},V=a,K=T,Y=W,$=E,X=Object.defineProperty;_.f=V?X:function(e,t,n){if(Y(e),t=$(t,!0),Y(n),K)try{return X(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var G=_,J=u,Q=a?function(e,t,n){return G.f(e,t,J(1,n))}:function(e,t,n){return e[t]=n,e},Z={exports:{}},ee=n,te=Q,ne=function(e,t){try{te(ee,e,t)}catch(n){ee[e]=t}return t},ie=ne,re="__core-js_shared__",ae=n[re]||ie(re,{}),oe=ae,se=Function.toString;"function"!=typeof oe.inspectSource&&(oe.inspectSource=function(e){return se.call(e)});var le=oe.inspectSource,ce=le,ue=n.WeakMap,de="function"==typeof ue&&/native code/.test(ce(ue)),he={exports:{}},fe=ae;(he.exports=function(e,t){return fe[e]||(fe[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.12.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var ve,ge,pe,me=0,ye=Math.random(),be=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++me+ye).toString(36)},we=he.exports,Se=be,Ee=we("keys"),ke=function(e){return Ee[e]||(Ee[e]=Se(e))},Ae={},Re=de,xe=w,Le=Q,Pe=L,Ce=ae,Ne=ke,Ie=Ae,Me="Object already initialized",Te=n.WeakMap;if(Re||Ce.state){var Oe=Ce.state||(Ce.state=new Te),De=Oe.get,je=Oe.has,Fe=Oe.set;ve=function(e,t){if(je.call(Oe,e))throw new TypeError(Me);return t.facade=e,Fe.call(Oe,e,t),t},ge=function(e){return De.call(Oe,e)||{}},pe=function(e){return je.call(Oe,e)}}else{var ze=Ne("state");Ie[ze]=!0,ve=function(e,t){if(Pe(e,ze))throw new TypeError(Me);return t.facade=e,Le(e,ze,t),t},ge=function(e){return Pe(e,ze)?e[ze]:{}},pe=function(e){return Pe(e,ze)}}var He={set:ve,get:ge,has:pe,enforce:function(e){return pe(e)?ge(e):ve(e,{})},getterFor:function(e){return function(t){var n;if(!xe(t)||(n=ge(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},Ue=n,Be=Q,_e=L,qe=ne,We=le,Ve=He.get,Ke=He.enforce,Ye=String(String).split("String");(Z.exports=function(e,t,n,i){var r,a=!!i&&!!i.unsafe,o=!!i&&!!i.enumerable,s=!!i&&!!i.noTargetGet;"function"==typeof n&&("string"!=typeof t||_e(n,"name")||Be(n,"name",t),(r=Ke(n)).source||(r.source=Ye.join("string"==typeof t?t:""))),e!==Ue?(a?!s&&e[t]&&(o=!0):delete e[t],o?e[t]=n:Be(e,t,n)):o?e[t]=n:qe(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&Ve(this).source||We(this)}));var $e=n,Xe=$e,Ge=n,Je=function(e){return"function"==typeof e?e:void 0},Qe=function(e,t){return arguments.length<2?Je(Xe[e])||Je(Ge[e]):Xe[e]&&Xe[e][t]||Ge[e]&&Ge[e][t]},Ze={},et=Math.ceil,tt=Math.floor,nt=function(e){return isNaN(e=+e)?0:(e>0?tt:et)(e)},it=nt,rt=Math.min,at=function(e){return e>0?rt(it(e),9007199254740991):0},ot=nt,st=Math.max,lt=Math.min,ct=function(e,t){var n=ot(e);return n<0?st(n+t,0):lt(n,t)},ut=b,dt=at,ht=ct,ft=function(e){return function(t,n,i){var r,a=ut(t),o=dt(a.length),s=ht(i,o);if(e&&n!=n){for(;o>s;)if((r=a[s++])!=r)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===n)return e||s||0;return!e&&-1}},vt={includes:ft(!0),indexOf:ft(!1)},gt=L,pt=b,mt=vt.indexOf,yt=Ae,bt=function(e,t){var n,i=pt(e),r=0,a=[];for(n in i)!gt(yt,n)&&gt(i,n)&&a.push(n);for(;t.length>r;)gt(i,n=t[r++])&&(~mt(a,n)||a.push(n));return a},wt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],St=bt,Et=wt.concat("length","prototype");Ze.f=Object.getOwnPropertyNames||function(e){return St(e,Et)};var kt={};kt.f=Object.getOwnPropertySymbols;var At=Ze,Rt=kt,xt=W,Lt=Qe("Reflect","ownKeys")||function(e){var t=At.f(xt(e)),n=Rt.f;return n?t.concat(n(e)):t},Pt=L,Ct=Lt,Nt=i,It=_,Mt=function(e,t){for(var n=Ct(t),i=It.f,r=Nt.f,a=0;a<n.length;a++){var o=n[a];Pt(e,o)||i(e,o,r(t,o))}},Tt=r,Ot=/#|\.prototype\./,Dt=function(e,t){var n=Ft[jt(e)];return n==Ht||n!=zt&&("function"==typeof t?Tt(t):!!t)},jt=Dt.normalize=function(e){return String(e).replace(Ot,".").toLowerCase()},Ft=Dt.data={},zt=Dt.NATIVE="N",Ht=Dt.POLYFILL="P",Ut=Dt,Bt=n,_t=i.f,qt=Q,Wt=Z.exports,Vt=ne,Kt=Mt,Yt=Ut,$t=function(e,t){var n,i,r,a,o,s=e.target,l=e.global,c=e.stat;if(n=l?Bt:c?Bt[s]||Vt(s,{}):(Bt[s]||{}).prototype)for(i in t){if(a=t[i],r=e.noTargetGet?(o=_t(n,i))&&o.value:n[i],!Yt(l?i:s+(c?".":"#")+i,e.forced)&&void 0!==r){if(typeof a==typeof r)continue;Kt(a,r)}(e.sham||r&&r.sham)&&qt(a,"sham",!0),Wt(n,i,a,e)}},Xt=bt,Gt=wt,Jt=Object.keys||function(e){return Xt(e,Gt)},Qt=a,Zt=r,en=Jt,tn=kt,nn=o,rn=A,an=g,on=Object.assign,sn=Object.defineProperty,ln=!on||Zt((function(){if(Qt&&1!==on({b:1},on(sn({},"a",{enumerable:!0,get:function(){sn(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach((function(e){t[e]=e})),7!=on({},e)[n]||en(on({},t)).join("")!=i}))?function(e,t){for(var n=rn(e),i=arguments.length,r=1,a=tn.f,o=nn.f;i>r;)for(var s,l=an(arguments[r++]),c=a?en(l).concat(a(l)):en(l),u=c.length,d=0;u>d;)s=c[d++],Qt&&!o.call(l,s)||(n[s]=l[s]);return n}:on;$t({target:"Object",stat:!0,forced:Object.assign!==ln},{assign:ln});var cn,un,dn=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},hn=dn,fn=function(e,t,n){if(hn(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,r){return e.call(t,n,i,r)}}return function(){return e.apply(t,arguments)}},vn=h,gn=Array.isArray||function(e){return"Array"==vn(e)},pn=Qe("navigator","userAgent")||"",mn=pn,yn=n.process,bn=yn&&yn.versions,wn=bn&&bn.v8;wn?un=(cn=wn.split("."))[0]<4?1:cn[0]+cn[1]:mn&&(!(cn=mn.match(/Edge\/(\d+)/))||cn[1]>=74)&&(cn=mn.match(/Chrome\/(\d+)/))&&(un=cn[1]);var Sn=un&&+un,En=Sn,kn=r,An=!!Object.getOwnPropertySymbols&&!kn((function(){return!String(Symbol())||!Symbol.sham&&En&&En<41})),Rn=An&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,xn=n,Ln=he.exports,Pn=L,Cn=be,Nn=An,In=Rn,Mn=Ln("wks"),Tn=xn.Symbol,On=In?Tn:Tn&&Tn.withoutSetter||Cn,Dn=function(e){return Pn(Mn,e)&&(Nn||"string"==typeof Mn[e])||(Nn&&Pn(Tn,e)?Mn[e]=Tn[e]:Mn[e]=On("Symbol."+e)),Mn[e]},jn=w,Fn=gn,zn=Dn("species"),Hn=function(e,t){var n;return Fn(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!Fn(n.prototype)?jn(n)&&null===(n=n[zn])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)},Un=fn,Bn=g,_n=A,qn=at,Wn=Hn,Vn=[].push,Kn=function(e){var t=1==e,n=2==e,i=3==e,r=4==e,a=6==e,o=7==e,s=5==e||a;return function(l,c,u,d){for(var h,f,v=_n(l),g=Bn(v),p=Un(c,u,3),m=qn(g.length),y=0,b=d||Wn,w=t?b(l,m):n||o?b(l,0):void 0;m>y;y++)if((s||y in g)&&(f=p(h=g[y],y,v),e))if(t)w[y]=f;else if(f)switch(e){case 3:return!0;case 5:return h;case 6:return y;case 2:Vn.call(w,h)}else switch(e){case 4:return!1;case 7:Vn.call(w,h)}return a?-1:i||r?r:w}},Yn={forEach:Kn(0),map:Kn(1),filter:Kn(2),some:Kn(3),every:Kn(4),find:Kn(5),findIndex:Kn(6),filterOut:Kn(7)},$n=r,Xn=Sn,Gn=Dn("species"),Jn=function(e){return Xn>=51||!$n((function(){var t=[];return(t.constructor={})[Gn]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Qn=Yn.map;$t({target:"Array",proto:!0,forced:!Jn("map")},{map:function(e){return Qn(this,e,arguments.length>1?arguments[1]:void 0)}});var Zn=E,ei=_,ti=u,ni=function(e,t,n){var i=Zn(t);i in e?ei.f(e,i,ti(0,n)):e[i]=n},ii=$t,ri=r,ai=gn,oi=w,si=A,li=at,ci=ni,ui=Hn,di=Jn,hi=Sn,fi=Dn("isConcatSpreadable"),vi=9007199254740991,gi="Maximum allowed index exceeded",pi=hi>=51||!ri((function(){var e=[];return e[fi]=!1,e.concat()[0]!==e})),mi=di("concat"),yi=function(e){if(!oi(e))return!1;var t=e[fi];return void 0!==t?!!t:ai(e)};function bi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function wi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bi(Object(n),!0).forEach((function(t){xi(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Si(e){return(Si="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ei(e,t,n,i,r,a,o){try{var s=e[a](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(i,r)}function ki(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ai(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Ri(e,t,n){return t&&Ai(e.prototype,t),n&&Ai(e,n),e}function xi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Li(e){return function(e){if(Array.isArray(e))return Pi(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Pi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pi(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}ii({target:"Array",proto:!0,forced:!pi||!mi},{concat:function(e){var t,n,i,r,a,o=si(this),s=ui(o,0),l=0;for(t=-1,i=arguments.length;t<i;t++)if(yi(a=-1===t?o:arguments[t])){if(l+(r=li(a.length))>vi)throw TypeError(gi);for(n=0;n<r;n++,l++)n in a&&ci(s,l,a[n])}else{if(l>=vi)throw TypeError(gi);ci(s,l++,a)}return s.length=l,s}});var Ci={};Ci[Dn("toStringTag")]="z";var Ni="[object z]"===String(Ci),Ii=Ni,Mi=h,Ti=Dn("toStringTag"),Oi="Arguments"==Mi(function(){return arguments}()),Di=Ii?Mi:function(e){var t,n,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),Ti))?n:Oi?Mi(t):"Object"==(i=Mi(t))&&"function"==typeof t.callee?"Arguments":i},ji=Di,Fi=Ni?{}.toString:function(){return"[object "+ji(this)+"]"},zi=Ni,Hi=Z.exports,Ui=Fi;zi||Hi(Object.prototype,"toString",Ui,{unsafe:!0});var Bi=n.Promise,_i=Z.exports,qi=w,Wi=W,Vi=function(e){if(!qi(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e},Ki=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,i){return Wi(n),Vi(i),t?e.call(n,i):n.__proto__=i,n}}():void 0),Yi=_.f,$i=L,Xi=Dn("toStringTag"),Gi=function(e,t,n){e&&!$i(e=n?e:e.prototype,Xi)&&Yi(e,Xi,{configurable:!0,value:t})},Ji=Qe,Qi=_,Zi=a,er=Dn("species"),tr={},nr=tr,ir=Dn("iterator"),rr=Array.prototype,ar=function(e){return void 0!==e&&(nr.Array===e||rr[ir]===e)},or=Di,sr=tr,lr=Dn("iterator"),cr=function(e){if(null!=e)return e[lr]||e["@@iterator"]||sr[or(e)]},ur=W,dr=function(e){var t=e.return;if(void 0!==t)return ur(t.call(e)).value},hr=W,fr=ar,vr=at,gr=fn,pr=cr,mr=dr,yr=function(e,t){this.stopped=e,this.result=t},br=Dn("iterator"),wr=!1;try{var Sr=0,Er={next:function(){return{done:!!Sr++}},return:function(){wr=!0}};Er[br]=function(){return this},Array.from(Er,(function(){throw 2}))}catch(e){}var kr,Ar,Rr,xr=function(e,t){if(!t&&!wr)return!1;var n=!1;try{var i={};i[br]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(e){}return n},Lr=W,Pr=dn,Cr=Dn("species"),Nr=function(e,t){var n,i=Lr(e).constructor;return void 0===i||null==(n=Lr(i)[Cr])?t:Pr(n)},Ir=Qe("document","documentElement"),Mr=/(?:iphone|ipod|ipad).*applewebkit/i.test(pn),Tr="process"==h(n.process),Or=n,Dr=r,jr=fn,Fr=Ir,zr=I,Hr=Mr,Ur=Tr,Br=Or.location,_r=Or.setImmediate,qr=Or.clearImmediate,Wr=Or.process,Vr=Or.MessageChannel,Kr=Or.Dispatch,Yr=0,$r={},Xr="onreadystatechange",Gr=function(e){if($r.hasOwnProperty(e)){var t=$r[e];delete $r[e],t()}},Jr=function(e){return function(){Gr(e)}},Qr=function(e){Gr(e.data)},Zr=function(e){Or.postMessage(e+"",Br.protocol+"//"+Br.host)};_r&&qr||(_r=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return $r[++Yr]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},kr(Yr),Yr},qr=function(e){delete $r[e]},Ur?kr=function(e){Wr.nextTick(Jr(e))}:Kr&&Kr.now?kr=function(e){Kr.now(Jr(e))}:Vr&&!Hr?(Rr=(Ar=new Vr).port2,Ar.port1.onmessage=Qr,kr=jr(Rr.postMessage,Rr,1)):Or.addEventListener&&"function"==typeof postMessage&&!Or.importScripts&&Br&&"file:"!==Br.protocol&&!Dr(Zr)?(kr=Zr,Or.addEventListener("message",Qr,!1)):kr=Xr in zr("script")?function(e){Fr.appendChild(zr("script")).onreadystatechange=function(){Fr.removeChild(this),Gr(e)}}:function(e){setTimeout(Jr(e),0)});var ea,ta,na,ia,ra,aa,oa,sa,la={set:_r,clear:qr},ca=/web0s(?!.*chrome)/i.test(pn),ua=n,da=i.f,ha=la.set,fa=Mr,va=ca,ga=Tr,pa=ua.MutationObserver||ua.WebKitMutationObserver,ma=ua.document,ya=ua.process,ba=ua.Promise,wa=da(ua,"queueMicrotask"),Sa=wa&&wa.value;Sa||(ea=function(){var e,t;for(ga&&(e=ya.domain)&&e.exit();ta;){t=ta.fn,ta=ta.next;try{t()}catch(e){throw ta?ia():na=void 0,e}}na=void 0,e&&e.enter()},fa||ga||va||!pa||!ma?ba&&ba.resolve?((oa=ba.resolve(void 0)).constructor=ba,sa=oa.then,ia=function(){sa.call(oa,ea)}):ia=ga?function(){ya.nextTick(ea)}:function(){ha.call(ua,ea)}:(ra=!0,aa=ma.createTextNode(""),new pa(ea).observe(aa,{characterData:!0}),ia=function(){aa.data=ra=!ra}));var Ea=Sa||function(e){var t={fn:e,next:void 0};na&&(na.next=t),ta||(ta=t,ia()),na=t},ka={},Aa=dn,Ra=function(e){var t,n;this.promise=new e((function(e,i){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=i})),this.resolve=Aa(t),this.reject=Aa(n)};ka.f=function(e){return new Ra(e)};var xa,La,Pa,Ca,Na=W,Ia=w,Ma=ka,Ta=n,Oa="object"==typeof window,Da=$t,ja=n,Fa=Qe,za=Bi,Ha=Z.exports,Ua=function(e,t,n){for(var i in t)_i(e,i,t[i],n);return e},Ba=Ki,_a=Gi,qa=function(e){var t=Ji(e),n=Qi.f;Zi&&t&&!t[er]&&n(t,er,{configurable:!0,get:function(){return this}})},Wa=w,Va=dn,Ka=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e},Ya=le,$a=function(e,t,n){var i,r,a,o,s,l,c,u=n&&n.that,d=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_ITERATOR),f=!(!n||!n.INTERRUPTED),v=gr(t,u,1+d+f),g=function(e){return i&&mr(i),new yr(!0,e)},p=function(e){return d?(hr(e),f?v(e[0],e[1],g):v(e[0],e[1])):f?v(e,g):v(e)};if(h)i=e;else{if("function"!=typeof(r=pr(e)))throw TypeError("Target is not iterable");if(fr(r)){for(a=0,o=vr(e.length);o>a;a++)if((s=p(e[a]))&&s instanceof yr)return s;return new yr(!1)}i=r.call(e)}for(l=i.next;!(c=l.call(i)).done;){try{s=p(c.value)}catch(e){throw mr(i),e}if("object"==typeof s&&s&&s instanceof yr)return s}return new yr(!1)},Xa=xr,Ga=Nr,Ja=la.set,Qa=Ea,Za=function(e,t){if(Na(e),Ia(t)&&t.constructor===e)return t;var n=Ma.f(e);return(0,n.resolve)(t),n.promise},eo=function(e,t){var n=Ta.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))},to=ka,no=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},io=He,ro=Ut,ao=Oa,oo=Tr,so=Sn,lo=Dn("species"),co="Promise",uo=io.get,ho=io.set,fo=io.getterFor(co),vo=za&&za.prototype,go=za,po=vo,mo=ja.TypeError,yo=ja.document,bo=ja.process,wo=to.f,So=wo,Eo=!!(yo&&yo.createEvent&&ja.dispatchEvent),ko="function"==typeof PromiseRejectionEvent,Ao="unhandledrejection",Ro=!1,xo=ro(co,(function(){var e=Ya(go)!==String(go);if(!e&&66===so)return!0;if(so>=51&&/native code/.test(go))return!1;var t=new go((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(t.constructor={})[lo]=n,!(Ro=t.then((function(){}))instanceof n)||!e&&ao&&!ko})),Lo=xo||!Xa((function(e){go.all(e).catch((function(){}))})),Po=function(e){var t;return!(!Wa(e)||"function"!=typeof(t=e.then))&&t},Co=function(e,t){if(!e.notified){e.notified=!0;var n=e.reactions;Qa((function(){for(var i=e.value,r=1==e.state,a=0;n.length>a;){var o,s,l,c=n[a++],u=r?c.ok:c.fail,d=c.resolve,h=c.reject,f=c.domain;try{u?(r||(2===e.rejection&&To(e),e.rejection=1),!0===u?o=i:(f&&f.enter(),o=u(i),f&&(f.exit(),l=!0)),o===c.promise?h(mo("Promise-chain cycle")):(s=Po(o))?s.call(o,d,h):d(o)):h(i)}catch(e){f&&!l&&f.exit(),h(e)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&Io(e)}))}},No=function(e,t,n){var i,r;Eo?((i=yo.createEvent("Event")).promise=t,i.reason=n,i.initEvent(e,!1,!0),ja.dispatchEvent(i)):i={promise:t,reason:n},!ko&&(r=ja["on"+e])?r(i):e===Ao&&eo("Unhandled promise rejection",n)},Io=function(e){Ja.call(ja,(function(){var t,n=e.facade,i=e.value;if(Mo(e)&&(t=no((function(){oo?bo.emit("unhandledRejection",i,n):No(Ao,n,i)})),e.rejection=oo||Mo(e)?2:1,t.error))throw t.value}))},Mo=function(e){return 1!==e.rejection&&!e.parent},To=function(e){Ja.call(ja,(function(){var t=e.facade;oo?bo.emit("rejectionHandled",t):No("rejectionhandled",t,e.value)}))},Oo=function(e,t,n){return function(i){e(t,i,n)}},Do=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,Co(e,!0))},jo=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw mo("Promise can't be resolved itself");var i=Po(t);i?Qa((function(){var n={done:!1};try{i.call(t,Oo(jo,n,e),Oo(Do,n,e))}catch(t){Do(n,t,e)}})):(e.value=t,e.state=1,Co(e,!1))}catch(t){Do({done:!1},t,e)}}};if(xo&&(po=(go=function(e){Ka(this,go,co),Va(e),xa.call(this);var t=uo(this);try{e(Oo(jo,t),Oo(Do,t))}catch(e){Do(t,e)}}).prototype,(xa=function(e){ho(this,{type:co,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=Ua(po,{then:function(e,t){var n=fo(this),i=wo(Ga(this,go));return i.ok="function"!=typeof e||e,i.fail="function"==typeof t&&t,i.domain=oo?bo.domain:void 0,n.parent=!0,n.reactions.push(i),0!=n.state&&Co(n,!1),i.promise},catch:function(e){return this.then(void 0,e)}}),La=function(){var e=new xa,t=uo(e);this.promise=e,this.resolve=Oo(jo,t),this.reject=Oo(Do,t)},to.f=wo=function(e){return e===go||e===Pa?new La(e):So(e)},"function"==typeof za&&vo!==Object.prototype)){Ca=vo.then,Ro||(Ha(vo,"then",(function(e,t){var n=this;return new go((function(e,t){Ca.call(n,e,t)})).then(e,t)}),{unsafe:!0}),Ha(vo,"catch",po.catch,{unsafe:!0}));try{delete vo.constructor}catch(e){}Ba&&Ba(vo,po)}Da({global:!0,wrap:!0,forced:xo},{Promise:go}),_a(go,co,!1),qa(co),Pa=Fa(co),Da({target:co,stat:!0,forced:xo},{reject:function(e){var t=wo(this);return t.reject.call(void 0,e),t.promise}}),Da({target:co,stat:!0,forced:xo},{resolve:function(e){return Za(this,e)}}),Da({target:co,stat:!0,forced:Lo},{all:function(e){var t=this,n=wo(t),i=n.resolve,r=n.reject,a=no((function(){var n=Va(t.resolve),a=[],o=0,s=1;$a(e,(function(e){var l=o++,c=!1;a.push(void 0),s++,n.call(t,e).then((function(e){c||(c=!0,a[l]=e,--s||i(a))}),r)})),--s||i(a)}));return a.error&&r(a.value),n.promise},race:function(e){var t=this,n=wo(t),i=n.reject,r=no((function(){var r=Va(t.resolve);$a(e,(function(e){r.call(t,e).then(n.resolve,i)}))}));return r.error&&i(r.value),n.promise}});var Fo=r,zo=function(e,t){var n=[][e];return!!n&&Fo((function(){n.call(null,t||function(){throw 1},1)}))},Ho=Yn.forEach,Uo=n,Bo={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},_o=zo("forEach")?[].forEach:function(e){return Ho(this,e,arguments.length>1?arguments[1]:void 0)},qo=Q;for(var Wo in Bo){var Vo=Uo[Wo],Ko=Vo&&Vo.prototype;if(Ko&&Ko.forEach!==_o)try{qo(Ko,"forEach",_o)}catch(e){Ko.forEach=_o}}var Yo=W,$o=dr,Xo=fn,Go=A,Jo=function(e,t,n,i){try{return i?t(Yo(n)[0],n[1]):t(n)}catch(t){throw $o(e),t}},Qo=ar,Zo=at,es=ni,ts=cr,ns=function(e){var t,n,i,r,a,o,s=Go(e),l="function"==typeof this?this:Array,c=arguments.length,u=c>1?arguments[1]:void 0,d=void 0!==u,h=ts(s),f=0;if(d&&(u=Xo(u,c>2?arguments[2]:void 0,2)),null==h||l==Array&&Qo(h))for(n=new l(t=Zo(s.length));t>f;f++)o=d?u(s[f],f):s[f],es(n,f,o);else for(a=(r=h.call(s)).next,n=new l;!(i=a.call(r)).done;f++)o=d?Jo(r,u,[i.value,f],!0):i.value,es(n,f,o);return n.length=f,n};$t({target:"Array",stat:!0,forced:!xr((function(e){Array.from(e)}))},{from:ns});var is,rs,as,os=nt,ss=p,ls=function(e){return function(t,n){var i,r,a=String(ss(t)),o=os(n),s=a.length;return o<0||o>=s?e?"":void 0:(i=a.charCodeAt(o))<55296||i>56319||o+1===s||(r=a.charCodeAt(o+1))<56320||r>57343?e?a.charAt(o):i:e?a.slice(o,o+2):r-56320+(i-55296<<10)+65536}},cs={codeAt:ls(!1),charAt:ls(!0)},us=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),ds=L,hs=A,fs=us,vs=ke("IE_PROTO"),gs=Object.prototype,ps=fs?Object.getPrototypeOf:function(e){return e=hs(e),ds(e,vs)?e[vs]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?gs:null},ms=r,ys=ps,bs=Q,ws=L,Ss=Dn("iterator"),Es=!1;[].keys&&("next"in(as=[].keys())?(rs=ys(ys(as)))!==Object.prototype&&(is=rs):Es=!0),(null==is||ms((function(){var e={};return is[Ss].call(e)!==e})))&&(is={}),ws(is,Ss)||bs(is,Ss,(function(){return this}));var ks,As={IteratorPrototype:is,BUGGY_SAFARI_ITERATORS:Es},Rs=_,xs=W,Ls=Jt,Ps=a?Object.defineProperties:function(e,t){xs(e);for(var n,i=Ls(t),r=i.length,a=0;r>a;)Rs.f(e,n=i[a++],t[n]);return e},Cs=W,Ns=Ps,Is=wt,Ms=Ae,Ts=Ir,Os=I,Ds=ke("IE_PROTO"),js=function(){},Fs=function(e){return"<script>"+e+"</"+"script>"},zs=function(){try{ks=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;zs=ks?function(e){e.write(Fs("")),e.close();var t=e.parentWindow.Object;return e=null,t}(ks):((t=Os("iframe")).style.display="none",Ts.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Fs("document.F=Object")),e.close(),e.F);for(var n=Is.length;n--;)delete zs.prototype[Is[n]];return zs()};Ms[Ds]=!0;var Hs=Object.create||function(e,t){var n;return null!==e?(js.prototype=Cs(e),n=new js,js.prototype=null,n[Ds]=e):n=zs(),void 0===t?n:Ns(n,t)},Us=As.IteratorPrototype,Bs=Hs,_s=u,qs=Gi,Ws=tr,Vs=function(){return this},Ks=$t,Ys=function(e,t,n){var i=t+" Iterator";return e.prototype=Bs(Us,{next:_s(1,n)}),qs(e,i,!1),Ws[i]=Vs,e},$s=ps,Xs=Ki,Gs=Gi,Js=Q,Qs=Z.exports,Zs=tr,el=As.IteratorPrototype,tl=As.BUGGY_SAFARI_ITERATORS,nl=Dn("iterator"),il="keys",rl="values",al="entries",ol=function(){return this},sl=cs.charAt,ll=He,cl=function(e,t,n,i,r,a,o){Ys(n,t,i);var s,l,c,u=function(e){if(e===r&&g)return g;if(!tl&&e in f)return f[e];switch(e){case il:case rl:case al:return function(){return new n(this,e)}}return function(){return new n(this)}},d=t+" Iterator",h=!1,f=e.prototype,v=f[nl]||f["@@iterator"]||r&&f[r],g=!tl&&v||u(r),p="Array"==t&&f.entries||v;if(p&&(s=$s(p.call(new e)),el!==Object.prototype&&s.next&&($s(s)!==el&&(Xs?Xs(s,el):"function"!=typeof s[nl]&&Js(s,nl,ol)),Gs(s,d,!0))),r==rl&&v&&v.name!==rl&&(h=!0,g=function(){return v.call(this)}),f[nl]!==g&&Js(f,nl,g),Zs[t]=g,r)if(l={values:u(rl),keys:a?g:u(il),entries:u(al)},o)for(c in l)(tl||h||!(c in f))&&Qs(f,c,l[c]);else Ks({target:t,proto:!0,forced:tl||h},l);return l},ul="String Iterator",dl=ll.set,hl=ll.getterFor(ul);cl(String,"String",(function(e){dl(this,{type:ul,string:String(e),index:0})}),(function(){var e,t=hl(this),n=t.string,i=t.index;return i>=n.length?{value:void 0,done:!0}:(e=sl(n,i),t.index+=e.length,{value:e,done:!1})}));var fl="\t\n\v\f\r                　\u2028\u2029\ufeff",vl=p,gl="[\t\n\v\f\r                　\u2028\u2029\ufeff]",pl=RegExp("^"+gl+gl+"*"),ml=RegExp(gl+gl+"*$"),yl=function(e){return function(t){var n=String(vl(t));return 1&e&&(n=n.replace(pl,"")),2&e&&(n=n.replace(ml,"")),n}},bl={start:yl(1),end:yl(2),trim:yl(3)},wl=r,Sl=fl,El=bl.trim;$t({target:"String",proto:!0,forced:function(e){return wl((function(){return!!Sl[e]()||"​᠎"!="​᠎"[e]()||Sl[e].name!==e}))}("trim")},{trim:function(){return El(this)}});var kl={},Al=b,Rl=Ze.f,xl={}.toString,Ll="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];kl.f=function(e){return Ll&&"[object Window]"==xl.call(e)?function(e){try{return Rl(e)}catch(e){return Ll.slice()}}(e):Rl(Al(e))};var Pl={},Cl=Dn;Pl.f=Cl;var Nl=$e,Il=L,Ml=Pl,Tl=_.f,Ol=$t,Dl=n,jl=Qe,Fl=a,zl=An,Hl=Rn,Ul=r,Bl=L,_l=gn,ql=w,Wl=W,Vl=A,Kl=b,Yl=E,$l=u,Xl=Hs,Gl=Jt,Jl=Ze,Ql=kl,Zl=kt,ec=i,tc=_,nc=o,ic=Q,rc=Z.exports,ac=he.exports,oc=Ae,sc=be,lc=Dn,cc=Pl,uc=function(e){var t=Nl.Symbol||(Nl.Symbol={});Il(t,e)||Tl(t,e,{value:Ml.f(e)})},dc=Gi,hc=He,fc=Yn.forEach,vc=ke("hidden"),gc="Symbol",pc=lc("toPrimitive"),mc=hc.set,yc=hc.getterFor(gc),bc=Object.prototype,wc=Dl.Symbol,Sc=jl("JSON","stringify"),Ec=ec.f,kc=tc.f,Ac=Ql.f,Rc=nc.f,xc=ac("symbols"),Lc=ac("op-symbols"),Pc=ac("string-to-symbol-registry"),Cc=ac("symbol-to-string-registry"),Nc=ac("wks"),Ic=Dl.QObject,Mc=!Ic||!Ic.prototype||!Ic.prototype.findChild,Tc=Fl&&Ul((function(){return 7!=Xl(kc({},"a",{get:function(){return kc(this,"a",{value:7}).a}})).a}))?function(e,t,n){var i=Ec(bc,t);i&&delete bc[t],kc(e,t,n),i&&e!==bc&&kc(bc,t,i)}:kc,Oc=function(e,t){var n=xc[e]=Xl(wc.prototype);return mc(n,{type:gc,tag:e,description:t}),Fl||(n.description=t),n},Dc=Hl?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof wc},jc=function(e,t,n){e===bc&&jc(Lc,t,n),Wl(e);var i=Yl(t,!0);return Wl(n),Bl(xc,i)?(n.enumerable?(Bl(e,vc)&&e[vc][i]&&(e[vc][i]=!1),n=Xl(n,{enumerable:$l(0,!1)})):(Bl(e,vc)||kc(e,vc,$l(1,{})),e[vc][i]=!0),Tc(e,i,n)):kc(e,i,n)},Fc=function(e,t){Wl(e);var n=Kl(t),i=Gl(n).concat(Bc(n));return fc(i,(function(t){Fl&&!zc.call(n,t)||jc(e,t,n[t])})),e},zc=function(e){var t=Yl(e,!0),n=Rc.call(this,t);return!(this===bc&&Bl(xc,t)&&!Bl(Lc,t))&&(!(n||!Bl(this,t)||!Bl(xc,t)||Bl(this,vc)&&this[vc][t])||n)},Hc=function(e,t){var n=Kl(e),i=Yl(t,!0);if(n!==bc||!Bl(xc,i)||Bl(Lc,i)){var r=Ec(n,i);return!r||!Bl(xc,i)||Bl(n,vc)&&n[vc][i]||(r.enumerable=!0),r}},Uc=function(e){var t=Ac(Kl(e)),n=[];return fc(t,(function(e){Bl(xc,e)||Bl(oc,e)||n.push(e)})),n},Bc=function(e){var t=e===bc,n=Ac(t?Lc:Kl(e)),i=[];return fc(n,(function(e){!Bl(xc,e)||t&&!Bl(bc,e)||i.push(xc[e])})),i};(zl||(rc((wc=function(){if(this instanceof wc)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=sc(e),n=function(e){this===bc&&n.call(Lc,e),Bl(this,vc)&&Bl(this[vc],t)&&(this[vc][t]=!1),Tc(this,t,$l(1,e))};return Fl&&Mc&&Tc(bc,t,{configurable:!0,set:n}),Oc(t,e)}).prototype,"toString",(function(){return yc(this).tag})),rc(wc,"withoutSetter",(function(e){return Oc(sc(e),e)})),nc.f=zc,tc.f=jc,ec.f=Hc,Jl.f=Ql.f=Uc,Zl.f=Bc,cc.f=function(e){return Oc(lc(e),e)},Fl&&(kc(wc.prototype,"description",{configurable:!0,get:function(){return yc(this).description}}),rc(bc,"propertyIsEnumerable",zc,{unsafe:!0}))),Ol({global:!0,wrap:!0,forced:!zl,sham:!zl},{Symbol:wc}),fc(Gl(Nc),(function(e){uc(e)})),Ol({target:gc,stat:!0,forced:!zl},{for:function(e){var t=String(e);if(Bl(Pc,t))return Pc[t];var n=wc(t);return Pc[t]=n,Cc[n]=t,n},keyFor:function(e){if(!Dc(e))throw TypeError(e+" is not a symbol");if(Bl(Cc,e))return Cc[e]},useSetter:function(){Mc=!0},useSimple:function(){Mc=!1}}),Ol({target:"Object",stat:!0,forced:!zl,sham:!Fl},{create:function(e,t){return void 0===t?Xl(e):Fc(Xl(e),t)},defineProperty:jc,defineProperties:Fc,getOwnPropertyDescriptor:Hc}),Ol({target:"Object",stat:!0,forced:!zl},{getOwnPropertyNames:Uc,getOwnPropertySymbols:Bc}),Ol({target:"Object",stat:!0,forced:Ul((function(){Zl.f(1)}))},{getOwnPropertySymbols:function(e){return Zl.f(Vl(e))}}),Sc)&&Ol({target:"JSON",stat:!0,forced:!zl||Ul((function(){var e=wc();return"[null]"!=Sc([e])||"{}"!=Sc({a:e})||"{}"!=Sc(Object(e))}))},{stringify:function(e,t,n){for(var i,r=[e],a=1;arguments.length>a;)r.push(arguments[a++]);if(i=t,(ql(t)||void 0!==e)&&!Dc(e))return _l(t)||(t=function(e,t){if("function"==typeof i&&(t=i.call(this,e,t)),!Dc(t))return t}),r[1]=t,Sc.apply(null,r)}});wc.prototype[pc]||ic(wc.prototype,pc,wc.prototype.valueOf),dc(wc,gc),oc[vc]=!0;var _c=$t,qc=a,Wc=n,Vc=L,Kc=w,Yc=_.f,$c=Mt,Xc=Wc.Symbol;if(qc&&"function"==typeof Xc&&(!("description"in Xc.prototype)||void 0!==Xc().description)){var Gc={},Jc=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof Jc?new Xc(e):void 0===e?Xc():Xc(e);return""===e&&(Gc[t]=!0),t};$c(Jc,Xc);var Qc=Jc.prototype=Xc.prototype;Qc.constructor=Jc;var Zc=Qc.toString,eu="Symbol(test)"==String(Xc("test")),tu=/^Symbol\((.*)\)[^)]+$/;Yc(Qc,"description",{configurable:!0,get:function(){var e=Kc(this)?this.valueOf():this,t=Zc.call(e);if(Vc(Gc,e))return"";var n=eu?t.slice(7,-1):t.replace(tu,"$1");return""===n?void 0:n}}),_c({global:!0,forced:!0},{Symbol:Jc})}var nu=W,iu={},ru=r;function au(e,t){return RegExp(e,t)}iu.UNSUPPORTED_Y=ru((function(){var e=au("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),iu.BROKEN_CARET=ru((function(){var e=au("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));var ou,su,lu=function(){var e=nu(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},cu=iu,uu=he.exports,du=RegExp.prototype.exec,hu=uu("native-string-replace",String.prototype.replace),fu=du,vu=(ou=/a/,su=/b*/g,du.call(ou,"a"),du.call(su,"a"),0!==ou.lastIndex||0!==su.lastIndex),gu=cu.UNSUPPORTED_Y||cu.BROKEN_CARET,pu=void 0!==/()??/.exec("")[1];(vu||pu||gu)&&(fu=function(e){var t,n,i,r,a=this,o=gu&&a.sticky,s=lu.call(a),l=a.source,c=0,u=e;return o&&(-1===(s=s.replace("y","")).indexOf("g")&&(s+="g"),u=String(e).slice(a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==e[a.lastIndex-1])&&(l="(?: "+l+")",u=" "+u,c++),n=new RegExp("^(?:"+l+")",s)),pu&&(n=new RegExp("^"+l+"$(?!\\s)",s)),vu&&(t=a.lastIndex),i=du.call(o?n:a,u),o?i?(i.input=i.input.slice(c),i[0]=i[0].slice(c),i.index=a.lastIndex,a.lastIndex+=i[0].length):a.lastIndex=0:vu&&i&&(a.lastIndex=a.global?i.index+i[0].length:t),pu&&i&&i.length>1&&hu.call(i[0],n,(function(){for(r=1;r<arguments.length-2;r++)void 0===arguments[r]&&(i[r]=void 0)})),i});var mu=fu;$t({target:"RegExp",proto:!0,forced:/./.exec!==mu},{exec:mu});var yu=Z.exports,bu=mu,wu=r,Su=Dn,Eu=Q,ku=Su("species"),Au=RegExp.prototype,Ru=!wu((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),xu="$0"==="a".replace(/./,"$0"),Lu=Su("replace"),Pu=!!/./[Lu]&&""===/./[Lu]("a","$0"),Cu=!wu((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),Nu=function(e,t,n,i){var r=Su(e),a=!wu((function(){var t={};return t[r]=function(){return 7},7!=""[e](t)})),o=a&&!wu((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[ku]=function(){return n},n.flags="",n[r]=/./[r]),n.exec=function(){return t=!0,null},n[r](""),!t}));if(!a||!o||"replace"===e&&(!Ru||!xu||Pu)||"split"===e&&!Cu){var s=/./[r],l=n(r,""[e],(function(e,t,n,i,r){var o=t.exec;return o===bu||o===Au.exec?a&&!r?{done:!0,value:s.call(t,n,i)}:{done:!0,value:e.call(n,t,i)}:{done:!1}}),{REPLACE_KEEPS_$0:xu,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Pu}),c=l[0],u=l[1];yu(String.prototype,e,c),yu(Au,r,2==t?function(e,t){return u.call(e,this,t)}:function(e){return u.call(e,this)})}i&&Eu(Au[r],"sham",!0)},Iu=cs.charAt,Mu=function(e,t,n){return t+(n?Iu(e,t).length:1)},Tu=h,Ou=mu,Du=function(e,t){var n=e.exec;if("function"==typeof n){var i=n.call(e,t);if("object"!=typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==Tu(e))throw TypeError("RegExp#exec called on incompatible receiver");return Ou.call(e,t)},ju=W,Fu=at,zu=p,Hu=Mu,Uu=Du;Nu("match",1,(function(e,t,n){return[function(t){var n=zu(this),i=null==t?void 0:t[e];return void 0!==i?i.call(t,n):new RegExp(t)[e](String(n))},function(e){var i=n(t,e,this);if(i.done)return i.value;var r=ju(e),a=String(this);if(!r.global)return Uu(r,a);var o=r.unicode;r.lastIndex=0;for(var s,l=[],c=0;null!==(s=Uu(r,a));){var u=String(s[0]);l[c]=u,""===u&&(r.lastIndex=Hu(a,Fu(r.lastIndex),o)),c++}return 0===c?null:l}]}));var Bu=$t,_u=ct,qu=nt,Wu=at,Vu=A,Ku=Hn,Yu=ni,$u=Jn("splice"),Xu=Math.max,Gu=Math.min,Ju=9007199254740991,Qu="Maximum allowed length exceeded";Bu({target:"Array",proto:!0,forced:!$u},{splice:function(e,t){var n,i,r,a,o,s,l=Vu(this),c=Wu(l.length),u=_u(e,c),d=arguments.length;if(0===d?n=i=0:1===d?(n=0,i=c-u):(n=d-2,i=Gu(Xu(qu(t),0),c-u)),c+n-i>Ju)throw TypeError(Qu);for(r=Ku(l,i),a=0;a<i;a++)(o=u+a)in l&&Yu(r,a,l[o]);if(r.length=i,n<i){for(a=u;a<c-i;a++)s=a+n,(o=a+i)in l?l[s]=l[o]:delete l[s];for(a=c;a>c-i+n;a--)delete l[a-1]}else if(n>i)for(a=c-i;a>u;a--)s=a+n-1,(o=a+i-1)in l?l[s]=l[o]:delete l[s];for(a=0;a<n;a++)l[a+u]=arguments[a+2];return l.length=c-i+n,r}});var Zu=w,ed=h,td=Dn("match"),nd=Nu,id=function(e){var t;return Zu(e)&&(void 0!==(t=e[td])?!!t:"RegExp"==ed(e))},rd=W,ad=p,od=Nr,sd=Mu,ld=at,cd=Du,ud=mu,dd=iu.UNSUPPORTED_Y,hd=[].push,fd=Math.min,vd=4294967295;nd("split",2,(function(e,t,n){var i;return i="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var i=String(ad(this)),r=void 0===n?vd:n>>>0;if(0===r)return[];if(void 0===e)return[i];if(!id(e))return t.call(i,e,r);for(var a,o,s,l=[],c=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),u=0,d=new RegExp(e.source,c+"g");(a=ud.call(d,i))&&!((o=d.lastIndex)>u&&(l.push(i.slice(u,a.index)),a.length>1&&a.index<i.length&&hd.apply(l,a.slice(1)),s=a[0].length,u=o,l.length>=r));)d.lastIndex===a.index&&d.lastIndex++;return u===i.length?!s&&d.test("")||l.push(""):l.push(i.slice(u)),l.length>r?l.slice(0,r):l}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var r=ad(this),a=null==t?void 0:t[e];return void 0!==a?a.call(t,r,n):i.call(String(r),t,n)},function(e,r){var a=n(i,e,this,r,i!==t);if(a.done)return a.value;var o=rd(e),s=String(this),l=od(o,RegExp),c=o.unicode,u=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(dd?"g":"y"),d=new l(dd?"^(?:"+o.source+")":o,u),h=void 0===r?vd:r>>>0;if(0===h)return[];if(0===s.length)return null===cd(d,s)?[s]:[];for(var f=0,v=0,g=[];v<s.length;){d.lastIndex=dd?0:v;var p,m=cd(d,dd?s.slice(v):s);if(null===m||(p=fd(ld(d.lastIndex+(dd?v:0)),s.length))===f)v=sd(s,v,c);else{if(g.push(s.slice(f,v)),g.length===h)return g;for(var y=1;y<=m.length-1;y++)if(g.push(m[y]),g.length===h)return g;v=f=p}}return g.push(s.slice(f)),g}]}),dd);var gd=w,pd=Ki,md=a,yd=n,bd=Ut,wd=Z.exports,Sd=L,Ed=h,kd=function(e,t,n){var i,r;return pd&&"function"==typeof(i=t.constructor)&&i!==n&&gd(r=i.prototype)&&r!==n.prototype&&pd(e,r),e},Ad=E,Rd=r,xd=Hs,Ld=Ze.f,Pd=i.f,Cd=_.f,Nd=bl.trim,Id="Number",Md=yd.Number,Td=Md.prototype,Od=Ed(xd(Td))==Id,Dd=function(e){var t,n,i,r,a,o,s,l,c=Ad(e,!1);if("string"==typeof c&&c.length>2)if(43===(t=(c=Nd(c)).charCodeAt(0))||45===t){if(88===(n=c.charCodeAt(2))||120===n)return NaN}else if(48===t){switch(c.charCodeAt(1)){case 66:case 98:i=2,r=49;break;case 79:case 111:i=8,r=55;break;default:return+c}for(o=(a=c.slice(2)).length,s=0;s<o;s++)if((l=a.charCodeAt(s))<48||l>r)return NaN;return parseInt(a,i)}return+c};if(bd(Id,!Md(" 0o1")||!Md("0b1")||Md("+0x1"))){for(var jd,Fd=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof Fd&&(Od?Rd((function(){Td.valueOf.call(n)})):Ed(n)!=Id)?kd(new Md(Dd(t)),n,Fd):Dd(t)},zd=md?Ld(Md):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),Hd=0;zd.length>Hd;Hd++)Sd(Md,jd=zd[Hd])&&!Sd(Fd,jd)&&Cd(Fd,jd,Pd(Md,jd));Fd.prototype=Td,Td.constructor=Fd,wd(yd,Id,Fd)}var Ud=a,Bd=_.f,_d=Function.prototype,qd=_d.toString,Wd=/^\s*function ([^ (]*)/,Vd="name";Ud&&!(Vd in _d)&&Bd(_d,Vd,{configurable:!0,get:function(){try{return qd.call(this).match(Wd)[1]}catch(e){return""}}});var Kd=$t,Yd=b,$d=[].join,Xd=g!=Object,Gd=zo("join",",");Kd({target:"Array",proto:!0,forced:Xd||!Gd},{join:function(e){return $d.call(Yd(this),void 0===e?",":e)}});var Jd=A,Qd=Math.floor,Zd="".replace,eh=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,th=/\$([$&'`]|\d{1,2})/g,nh=Nu,ih=W,rh=at,ah=nt,oh=p,sh=Mu,lh=function(e,t,n,i,r,a){var o=n+e.length,s=i.length,l=th;return void 0!==r&&(r=Jd(r),l=eh),Zd.call(a,l,(function(a,l){var c;switch(l.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(o);case"<":c=r[l.slice(1,-1)];break;default:var u=+l;if(0===u)return a;if(u>s){var d=Qd(u/10);return 0===d?a:d<=s?void 0===i[d-1]?l.charAt(1):i[d-1]+l.charAt(1):a}c=i[u-1]}return void 0===c?"":c}))},ch=Du,uh=Math.max,dh=Math.min;nh("replace",2,(function(e,t,n,i){var r=i.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,a=i.REPLACE_KEEPS_$0,o=r?"$":"$0";return[function(n,i){var r=oh(this),a=null==n?void 0:n[e];return void 0!==a?a.call(n,r,i):t.call(String(r),n,i)},function(e,i){if(!r&&a||"string"==typeof i&&-1===i.indexOf(o)){var s=n(t,e,this,i);if(s.done)return s.value}var l=ih(e),c=String(this),u="function"==typeof i;u||(i=String(i));var d=l.global;if(d){var h=l.unicode;l.lastIndex=0}for(var f=[];;){var v=ch(l,c);if(null===v)break;if(f.push(v),!d)break;""===String(v[0])&&(l.lastIndex=sh(c,rh(l.lastIndex),h))}for(var g,p="",m=0,y=0;y<f.length;y++){v=f[y];for(var b=String(v[0]),w=uh(dh(ah(v.index),c.length),0),S=[],E=1;E<v.length;E++)S.push(void 0===(g=v[E])?g:String(g));var k=v.groups;if(u){var A=[b].concat(S,w,c);void 0!==k&&A.push(k);var R=String(i.apply(void 0,A))}else R=lh(b,c,w,S,k,i);w>=m&&(p+=c.slice(m,w)+R,m=w+b.length)}return p+c.slice(m)}]}));var hh=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},fh=W,vh=p,gh=hh,ph=Du;Nu("search",1,(function(e,t,n){return[function(t){var n=vh(this),i=null==t?void 0:t[e];return void 0!==i?i.call(t,n):new RegExp(t)[e](String(n))},function(e){var i=n(t,e,this);if(i.done)return i.value;var r=fh(e),a=String(this),o=r.lastIndex;gh(o,0)||(r.lastIndex=0);var s=ph(r,a);return gh(r.lastIndex,o)||(r.lastIndex=o),null===s?-1:s.index}]}));var mh=function(e,t){for(var n in t)e[n]=t[n];return e},yh=function(e,t){return Array.from(e.querySelectorAll(t))},bh=function(e,t,n){n?e.classList.add(t):e.classList.remove(t)},wh=function(e){if("string"==typeof e){if("null"===e)return null;if("true"===e)return!0;if("false"===e)return!1;if(e.match(/^-?[\d\.]+$/))return parseFloat(e)}return e},Sh=function(e,t){e.style.transform=t},Eh=function(e,t){var n=e.matches||e.matchesSelector||e.msMatchesSelector;return!(!n||!n.call(e,t))},kh=function(e,t){if("function"==typeof e.closest)return e.closest(t);for(;e;){if(Eh(e,t))return e;e=e.parentNode}return null},Ah=function(e,t,n){for(var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=e.querySelectorAll("."+n),a=0;a<r.length;a++){var o=r[a];if(o.parentNode===e)return o}var s=document.createElement(t);return s.className=n,s.innerHTML=i,e.appendChild(s),s},Rh=function(e){var t=document.createElement("style");return t.type="text/css",e&&e.length>0&&(t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))),document.head.appendChild(t),t},xh=function(){var e={};for(var t in location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,(function(t){e[t.split("=").shift()]=t.split("=").pop()})),e){var n=e[t];e[t]=wh(unescape(n))}return void 0!==e.dependencies&&delete e.dependencies,e},Lh=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(e){var n,i=e.style.height;return e.style.height="0px",e.parentNode.style.height="auto",n=t-e.parentNode.offsetHeight,e.style.height=i+"px",e.parentNode.style.removeProperty("height"),n}return t},Ph={mp4:"video/mp4",m4a:"video/mp4",ogv:"video/ogg",mpeg:"video/mpeg",webm:"video/webm"},Ch=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Ph[e.split(".").pop()]},Nh=navigator.userAgent,Ih=document.createElement("div"),Mh=/(iphone|ipod|ipad|android)/gi.test(Nh)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,Th=/chrome/i.test(Nh)&&!/edge/i.test(Nh),Oh=/android/gi.test(Nh),Dh="zoom"in Ih.style&&!Mh&&(Th||/Version\/[\d\.]+.*Safari/.test(Nh)),jh={};Object.defineProperty(jh,"__esModule",{value:!0});var Fh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},zh=jh.default=function(e){if(e){var t=function(e){return[].slice.call(e)},n=0,i=1,r=2,a=3,o=[],s=null,l="requestAnimationFrame"in e?function(){e.cancelAnimationFrame(s),s=e.requestAnimationFrame((function(){return u(o.filter((function(e){return e.dirty&&e.active})))}))}:function(){},c=function(e){return function(){o.forEach((function(t){return t.dirty=e})),l()}},u=function(e){e.filter((function(e){return!e.styleComputed})).forEach((function(e){e.styleComputed=v(e)})),e.filter(g).forEach(p);var t=e.filter(f);t.forEach(h),t.forEach((function(e){p(e),d(e)})),t.forEach(m)},d=function(e){return e.dirty=n},h=function(e){e.availableWidth=e.element.parentNode.clientWidth,e.currentWidth=e.element.scrollWidth,e.previousFontSize=e.currentFontSize,e.currentFontSize=Math.min(Math.max(e.minSize,e.availableWidth/e.currentWidth*e.previousFontSize),e.maxSize),e.whiteSpace=e.multiLine&&e.currentFontSize===e.minSize?"normal":"nowrap"},f=function(e){return e.dirty!==r||e.dirty===r&&e.element.parentNode.clientWidth!==e.availableWidth},v=function(t){var n=e.getComputedStyle(t.element,null);t.currentFontSize=parseFloat(n.getPropertyValue("font-size")),t.display=n.getPropertyValue("display"),t.whiteSpace=n.getPropertyValue("white-space")},g=function(e){var t=!1;return!e.preStyleTestCompleted&&(/inline-/.test(e.display)||(t=!0,e.display="inline-block"),"nowrap"!==e.whiteSpace&&(t=!0,e.whiteSpace="nowrap"),e.preStyleTestCompleted=!0,t)},p=function(e){e.element.style.whiteSpace=e.whiteSpace,e.element.style.display=e.display,e.element.style.fontSize=e.currentFontSize+"px"},m=function(e){e.element.dispatchEvent(new CustomEvent("fit",{detail:{oldValue:e.previousFontSize,newValue:e.currentFontSize,scaleFactor:e.currentFontSize/e.previousFontSize}}))},y=function(e,t){return function(){e.dirty=t,e.active&&l()}},b=function(e){return function(){o=o.filter((function(t){return t.element!==e.element})),e.observeMutations&&e.observer.disconnect(),e.element.style.whiteSpace=e.originalStyle.whiteSpace,e.element.style.display=e.originalStyle.display,e.element.style.fontSize=e.originalStyle.fontSize}},w=function(e){return function(){e.active||(e.active=!0,l())}},S=function(e){return function(){return e.active=!1}},E=function(e){e.observeMutations&&(e.observer=new MutationObserver(y(e,i)),e.observer.observe(e.element,e.observeMutations))},k={minSize:16,maxSize:512,multiLine:!0,observeMutations:"MutationObserver"in e&&{subtree:!0,childList:!0,characterData:!0}},A=null,R=function(){e.clearTimeout(A),A=e.setTimeout(c(r),P.observeWindowDelay)},x=["resize","orientationchange"];return Object.defineProperty(P,"observeWindow",{set:function(t){var n=(t?"add":"remove")+"EventListener";x.forEach((function(t){e[n](t,R)}))}}),P.observeWindow=!0,P.observeWindowDelay=100,P.fitAll=c(a),P}function L(e,t){var n=Fh({},k,t),i=e.map((function(e){var t=Fh({},n,{element:e,active:!0});return function(e){e.originalStyle={whiteSpace:e.element.style.whiteSpace,display:e.element.style.display,fontSize:e.element.style.fontSize},E(e),e.newbie=!0,e.dirty=!0,o.push(e)}(t),{element:e,fit:y(t,a),unfreeze:w(t),freeze:S(t),unsubscribe:b(t)}}));return l(),i}function P(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e?L(t(document.querySelectorAll(e)),n):L([e],n)[0]}}("undefined"==typeof window?null:window),Hh=function(){function e(t){ki(this,e),this.Reveal=t,this.startEmbeddedIframe=this.startEmbeddedIframe.bind(this)}return Ri(e,[{key:"shouldPreload",value:function(e){var t=this.Reveal.getConfig().preloadIframes;return"boolean"!=typeof t&&(t=e.hasAttribute("data-preload")),t}},{key:"load",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.style.display=this.Reveal.getConfig().display,yh(e,"img[data-src], video[data-src], audio[data-src], iframe[data-src]").forEach((function(e){("IFRAME"!==e.tagName||t.shouldPreload(e))&&(e.setAttribute("src",e.getAttribute("data-src")),e.setAttribute("data-lazy-loaded",""),e.removeAttribute("data-src"))})),yh(e,"video, audio").forEach((function(e){var t=0;yh(e,"source[data-src]").forEach((function(e){e.setAttribute("src",e.getAttribute("data-src")),e.removeAttribute("data-src"),e.setAttribute("data-lazy-loaded",""),t+=1})),Mh&&"VIDEO"===e.tagName&&e.setAttribute("playsinline",""),t>0&&e.load()}));var i=e.slideBackgroundElement;if(i){i.style.display="block";var r=e.slideBackgroundContentElement,a=e.getAttribute("data-background-iframe");if(!1===i.hasAttribute("data-loaded")){i.setAttribute("data-loaded","true");var o=e.getAttribute("data-background-image"),s=e.getAttribute("data-background-video"),l=e.hasAttribute("data-background-video-loop"),c=e.hasAttribute("data-background-video-muted");if(o)/^data:/.test(o.trim())?r.style.backgroundImage="url(".concat(o.trim(),")"):r.style.backgroundImage=o.split(",").map((function(e){return"url(".concat(encodeURI(e.trim()),")")})).join(",");else if(s&&!this.Reveal.isSpeakerNotes()){var u=document.createElement("video");l&&u.setAttribute("loop",""),c&&(u.muted=!0),Mh&&(u.muted=!0,u.setAttribute("playsinline","")),s.split(",").forEach((function(e){var t=Ch(e);u.innerHTML+=t?'<source src="'.concat(e,'" type="').concat(t,'">'):'<source src="'.concat(e,'">')})),r.appendChild(u)}else if(a&&!0!==n.excludeIframes){var d=document.createElement("iframe");d.setAttribute("allowfullscreen",""),d.setAttribute("mozallowfullscreen",""),d.setAttribute("webkitallowfullscreen",""),d.setAttribute("allow","autoplay"),d.setAttribute("data-src",a),d.style.width="100%",d.style.height="100%",d.style.maxHeight="100%",d.style.maxWidth="100%",r.appendChild(d)}}var h=r.querySelector("iframe[data-src]");h&&this.shouldPreload(i)&&!/autoplay=(1|true|yes)/gi.test(a)&&h.getAttribute("src")!==a&&h.setAttribute("src",a)}this.layout(e)}},{key:"layout",value:function(e){var t=this;Array.from(e.querySelectorAll(".r-fit-text")).forEach((function(e){zh(e,{minSize:24,maxSize:.8*t.Reveal.getConfig().height,observeMutations:!1,observeWindow:!1})}))}},{key:"unload",value:function(e){e.style.display="none";var t=this.Reveal.getSlideBackground(e);t&&(t.style.display="none",yh(t,"iframe[src]").forEach((function(e){e.removeAttribute("src")}))),yh(e,"video[data-lazy-loaded][src], audio[data-lazy-loaded][src], iframe[data-lazy-loaded][src]").forEach((function(e){e.setAttribute("data-src",e.getAttribute("src")),e.removeAttribute("src")})),yh(e,"video[data-lazy-loaded] source[src], audio source[src]").forEach((function(e){e.setAttribute("data-src",e.getAttribute("src")),e.removeAttribute("src")}))}},{key:"formatEmbeddedContent",value:function(){var e=this,t=function(t,n,i){yh(e.Reveal.getSlidesElement(),"iframe["+t+'*="'+n+'"]').forEach((function(e){var n=e.getAttribute(t);n&&-1===n.indexOf(i)&&e.setAttribute(t,n+(/\?/.test(n)?"&":"?")+i)}))};t("src","youtube.com/embed/","enablejsapi=1"),t("data-src","youtube.com/embed/","enablejsapi=1"),t("src","player.vimeo.com/","api=1"),t("data-src","player.vimeo.com/","api=1")}},{key:"startEmbeddedContent",value:function(e){var t=this;e&&!this.Reveal.isSpeakerNotes()&&(yh(e,'img[src$=".gif"]').forEach((function(e){e.setAttribute("src",e.getAttribute("src"))})),yh(e,"video, audio").forEach((function(e){if(!kh(e,".fragment")||kh(e,".fragment.visible")){var n=t.Reveal.getConfig().autoPlayMedia;if("boolean"!=typeof n&&(n=e.hasAttribute("data-autoplay")||!!kh(e,".slide-background")),n&&"function"==typeof e.play)if(e.readyState>1)t.startEmbeddedMedia({target:e});else if(Mh){var i=e.play();i&&"function"==typeof i.catch&&!1===e.controls&&i.catch((function(){e.controls=!0,e.addEventListener("play",(function(){e.controls=!1}))}))}else e.removeEventListener("loadeddata",t.startEmbeddedMedia),e.addEventListener("loadeddata",t.startEmbeddedMedia)}})),yh(e,"iframe[src]").forEach((function(e){kh(e,".fragment")&&!kh(e,".fragment.visible")||t.startEmbeddedIframe({target:e})})),yh(e,"iframe[data-src]").forEach((function(e){kh(e,".fragment")&&!kh(e,".fragment.visible")||e.getAttribute("src")!==e.getAttribute("data-src")&&(e.removeEventListener("load",t.startEmbeddedIframe),e.addEventListener("load",t.startEmbeddedIframe),e.setAttribute("src",e.getAttribute("data-src")))})))}},{key:"startEmbeddedMedia",value:function(e){var t=!!kh(e.target,"html"),n=!!kh(e.target,".present");t&&n&&(e.target.currentTime=0,e.target.play()),e.target.removeEventListener("loadeddata",this.startEmbeddedMedia)}},{key:"startEmbeddedIframe",value:function(e){var t=e.target;if(t&&t.contentWindow){var n=!!kh(e.target,"html"),i=!!kh(e.target,".present");if(n&&i){var r=this.Reveal.getConfig().autoPlayMedia;"boolean"!=typeof r&&(r=t.hasAttribute("data-autoplay")||!!kh(t,".slide-background")),/youtube\.com\/embed\//.test(t.getAttribute("src"))&&r?t.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*"):/player\.vimeo\.com\//.test(t.getAttribute("src"))&&r?t.contentWindow.postMessage('{"method":"play"}',"*"):t.contentWindow.postMessage("slide:start","*")}}}},{key:"stopEmbeddedContent",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n=mh({unloadIframes:!0},n),e&&e.parentNode&&(yh(e,"video, audio").forEach((function(e){e.hasAttribute("data-ignore")||"function"!=typeof e.pause||(e.setAttribute("data-paused-by-reveal",""),e.pause())})),yh(e,"iframe").forEach((function(e){e.contentWindow&&e.contentWindow.postMessage("slide:stop","*"),e.removeEventListener("load",t.startEmbeddedIframe)})),yh(e,'iframe[src*="youtube.com/embed/"]').forEach((function(e){!e.hasAttribute("data-ignore")&&e.contentWindow&&"function"==typeof e.contentWindow.postMessage&&e.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")})),yh(e,'iframe[src*="player.vimeo.com/"]').forEach((function(e){!e.hasAttribute("data-ignore")&&e.contentWindow&&"function"==typeof e.contentWindow.postMessage&&e.contentWindow.postMessage('{"method":"pause"}',"*")})),!0===n.unloadIframes&&yh(e,"iframe[data-src]").forEach((function(e){e.setAttribute("src","about:blank"),e.removeAttribute("src")})))}}]),e}(),Uh=function(){function e(t){ki(this,e),this.Reveal=t}return Ri(e,[{key:"render",value:function(){this.element=document.createElement("div"),this.element.className="slide-number",this.Reveal.getRevealElement().appendChild(this.element)}},{key:"configure",value:function(e,t){var n="none";e.slideNumber&&!this.Reveal.isPrintingPDF()&&("all"===e.showSlideNumber||"speaker"===e.showSlideNumber&&this.Reveal.isSpeakerNotes())&&(n="block"),this.element.style.display=n}},{key:"update",value:function(){this.Reveal.getConfig().slideNumber&&this.element&&(this.element.innerHTML=this.getSlideNumber())}},{key:"getSlideNumber",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.Reveal.getCurrentSlide(),n=this.Reveal.getConfig(),i="h.v";if("function"==typeof n.slideNumber)e=n.slideNumber(t);else{"string"==typeof n.slideNumber&&(i=n.slideNumber),/c/.test(i)||1!==this.Reveal.getHorizontalSlides().length||(i="c");var r=t&&"uncounted"===t.dataset.visibility?0:1;switch(e=[],i){case"c":e.push(this.Reveal.getSlidePastCount(t)+r);break;case"c/t":e.push(this.Reveal.getSlidePastCount(t)+r,"/",this.Reveal.getTotalSlides());break;default:var a=this.Reveal.getIndices(t);e.push(a.h+r);var o="h/v"===i?"/":".";this.Reveal.isVerticalSlide(t)&&e.push(o,a.v+1)}}var s="#"+this.Reveal.location.getHash(t);return this.formatNumber(e[0],e[1],e[2],s)}},{key:"formatNumber",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#"+this.Reveal.location.getHash();return"number"!=typeof n||isNaN(n)?'<a href="'.concat(i,'">\n\t\t\t\t\t<span class="slide-number-a">').concat(e,"</span>\n\t\t\t\t\t</a>"):'<a href="'.concat(i,'">\n\t\t\t\t\t<span class="slide-number-a">').concat(e,'</span>\n\t\t\t\t\t<span class="slide-number-delimiter">').concat(t,'</span>\n\t\t\t\t\t<span class="slide-number-b">').concat(n,"</span>\n\t\t\t\t\t</a>")}}]),e}(),Bh=function(e){var t=e.match(/^#([0-9a-f]{3})$/i);if(t&&t[1])return t=t[1],{r:17*parseInt(t.charAt(0),16),g:17*parseInt(t.charAt(1),16),b:17*parseInt(t.charAt(2),16)};var n=e.match(/^#([0-9a-f]{6})$/i);if(n&&n[1])return n=n[1],{r:parseInt(n.substr(0,2),16),g:parseInt(n.substr(2,2),16),b:parseInt(n.substr(4,2),16)};var i=e.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);if(i)return{r:parseInt(i[1],10),g:parseInt(i[2],10),b:parseInt(i[3],10)};var r=e.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\,\s*([\d]+|[\d]*.[\d]+)\s*\)$/i);return r?{r:parseInt(r[1],10),g:parseInt(r[2],10),b:parseInt(r[3],10),a:parseFloat(r[4])}:null},_h=function(){function e(t){ki(this,e),this.Reveal=t}return Ri(e,[{key:"render",value:function(){this.element=document.createElement("div"),this.element.className="backgrounds",this.Reveal.getRevealElement().appendChild(this.element)}},{key:"create",value:function(){var e=this;this.element.innerHTML="",this.element.classList.add("no-transition"),this.Reveal.getHorizontalSlides().forEach((function(t){var n=e.createBackground(t,e.element);yh(t,"section").forEach((function(t){e.createBackground(t,n),n.classList.add("stack")}))})),this.Reveal.getConfig().parallaxBackgroundImage?(this.element.style.backgroundImage='url("'+this.Reveal.getConfig().parallaxBackgroundImage+'")',this.element.style.backgroundSize=this.Reveal.getConfig().parallaxBackgroundSize,this.element.style.backgroundRepeat=this.Reveal.getConfig().parallaxBackgroundRepeat,this.element.style.backgroundPosition=this.Reveal.getConfig().parallaxBackgroundPosition,setTimeout((function(){e.Reveal.getRevealElement().classList.add("has-parallax-background")}),1)):(this.element.style.backgroundImage="",this.Reveal.getRevealElement().classList.remove("has-parallax-background"))}},{key:"createBackground",value:function(e,t){var n=document.createElement("div");n.className="slide-background "+e.className.replace(/present|past|future/,"");var i=document.createElement("div");return i.className="slide-background-content",n.appendChild(i),t.appendChild(n),e.slideBackgroundElement=n,e.slideBackgroundContentElement=i,this.sync(e),n}},{key:"sync",value:function(e){var t=e.slideBackgroundElement,n=e.slideBackgroundContentElement,i={background:e.getAttribute("data-background"),backgroundSize:e.getAttribute("data-background-size"),backgroundImage:e.getAttribute("data-background-image"),backgroundVideo:e.getAttribute("data-background-video"),backgroundIframe:e.getAttribute("data-background-iframe"),backgroundColor:e.getAttribute("data-background-color"),backgroundRepeat:e.getAttribute("data-background-repeat"),backgroundPosition:e.getAttribute("data-background-position"),backgroundTransition:e.getAttribute("data-background-transition"),backgroundOpacity:e.getAttribute("data-background-opacity")},r=e.hasAttribute("data-preload");e.classList.remove("has-dark-background"),e.classList.remove("has-light-background"),t.removeAttribute("data-loaded"),t.removeAttribute("data-background-hash"),t.removeAttribute("data-background-size"),t.removeAttribute("data-background-transition"),t.style.backgroundColor="",n.style.backgroundSize="",n.style.backgroundRepeat="",n.style.backgroundPosition="",n.style.backgroundImage="",n.style.opacity="",n.innerHTML="",i.background&&(/^(http|file|\/\/)/gi.test(i.background)||/\.(svg|png|jpg|jpeg|gif|bmp)([?#\s]|$)/gi.test(i.background)?e.setAttribute("data-background-image",i.background):t.style.background=i.background),(i.background||i.backgroundColor||i.backgroundImage||i.backgroundVideo||i.backgroundIframe)&&t.setAttribute("data-background-hash",i.background+i.backgroundSize+i.backgroundImage+i.backgroundVideo+i.backgroundIframe+i.backgroundColor+i.backgroundRepeat+i.backgroundPosition+i.backgroundTransition+i.backgroundOpacity),i.backgroundSize&&t.setAttribute("data-background-size",i.backgroundSize),i.backgroundColor&&(t.style.backgroundColor=i.backgroundColor),i.backgroundTransition&&t.setAttribute("data-background-transition",i.backgroundTransition),r&&t.setAttribute("data-preload",""),i.backgroundSize&&(n.style.backgroundSize=i.backgroundSize),i.backgroundRepeat&&(n.style.backgroundRepeat=i.backgroundRepeat),i.backgroundPosition&&(n.style.backgroundPosition=i.backgroundPosition),i.backgroundOpacity&&(n.style.opacity=i.backgroundOpacity);var a,o=i.backgroundColor;if(!o||!Bh(o)){var s=window.getComputedStyle(t);s&&s.backgroundColor&&(o=s.backgroundColor)}if(o){var l=Bh(o);l&&0!==l.a&&("string"==typeof(a=o)&&(a=Bh(a)),(a?(299*a.r+587*a.g+114*a.b)/1e3:null)<128?e.classList.add("has-dark-background"):e.classList.add("has-light-background"))}}},{key:"update",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.Reveal.getCurrentSlide(),i=this.Reveal.getIndices(),r=null,a=this.Reveal.getConfig().rtl?"future":"past",o=this.Reveal.getConfig().rtl?"past":"future";if(Array.from(this.element.childNodes).forEach((function(e,n){e.classList.remove("past","present","future"),n<i.h?e.classList.add(a):n>i.h?e.classList.add(o):(e.classList.add("present"),r=e),(t||n===i.h)&&yh(e,".slide-background").forEach((function(e,t){e.classList.remove("past","present","future"),t<i.v?e.classList.add("past"):t>i.v?e.classList.add("future"):(e.classList.add("present"),n===i.h&&(r=e))}))})),this.previousBackground&&this.Reveal.slideContent.stopEmbeddedContent(this.previousBackground,{unloadIframes:!this.Reveal.slideContent.shouldPreload(this.previousBackground)}),r){this.Reveal.slideContent.startEmbeddedContent(r);var s=r.querySelector(".slide-background-content");if(s){var l=s.style.backgroundImage||"";/\.gif/i.test(l)&&(s.style.backgroundImage="",window.getComputedStyle(s).opacity,s.style.backgroundImage=l)}var c=this.previousBackground?this.previousBackground.getAttribute("data-background-hash"):null,u=r.getAttribute("data-background-hash");u&&u===c&&r!==this.previousBackground&&this.element.classList.add("no-transition"),this.previousBackground=r}n&&["has-light-background","has-dark-background"].forEach((function(t){n.classList.contains(t)?e.Reveal.getRevealElement().classList.add(t):e.Reveal.getRevealElement().classList.remove(t)}),this),setTimeout((function(){e.element.classList.remove("no-transition")}),1)}},{key:"updateParallax",value:function(){var e=this.Reveal.getIndices();if(this.Reveal.getConfig().parallaxBackgroundImage){var t,n,i=this.Reveal.getHorizontalSlides(),r=this.Reveal.getVerticalSlides(),a=this.element.style.backgroundSize.split(" ");1===a.length?t=n=parseInt(a[0],10):(t=parseInt(a[0],10),n=parseInt(a[1],10));var o,s=this.element.offsetWidth,l=i.length;o=("number"==typeof this.Reveal.getConfig().parallaxBackgroundHorizontal?this.Reveal.getConfig().parallaxBackgroundHorizontal:l>1?(t-s)/(l-1):0)*e.h*-1;var c,u,d=this.element.offsetHeight,h=r.length;c="number"==typeof this.Reveal.getConfig().parallaxBackgroundVertical?this.Reveal.getConfig().parallaxBackgroundVertical:(n-d)/(h-1),u=h>0?c*e.v:0,this.element.style.backgroundPosition=o+"px "+-u+"px"}}}]),e}(),qh=A,Wh=Jt;$t({target:"Object",stat:!0,forced:r((function(){Wh(1)}))},{keys:function(e){return Wh(qh(e))}});var Vh=Yn.filter;$t({target:"Array",proto:!0,forced:!Jn("filter")},{filter:function(e){return Vh(this,e,arguments.length>1?arguments[1]:void 0)}});var Kh=$t,Yh=w,$h=gn,Xh=ct,Gh=at,Jh=b,Qh=ni,Zh=Dn,ef=Jn("slice"),tf=Zh("species"),nf=[].slice,rf=Math.max;Kh({target:"Array",proto:!0,forced:!ef},{slice:function(e,t){var n,i,r,a=Jh(this),o=Gh(a.length),s=Xh(e,o),l=Xh(void 0===t?o:t,o);if($h(a)&&("function"!=typeof(n=a.constructor)||n!==Array&&!$h(n.prototype)?Yh(n)&&null===(n=n[tf])&&(n=void 0):n=void 0,n===Array||void 0===n))return nf.call(a,s,l);for(i=new(void 0===n?Array:n)(rf(l-s,0)),r=0;s<l;s++,r++)s in a&&Qh(i,r,a[s]);return i.length=r,i}});var af=".slides section",of=".slides>section",sf=".slides>section.present>section",lf=/registerPlugin|registerKeyboardShortcut|addKeyBinding|addEventListener/,cf=/fade-(down|up|right|left|out|in-then-out|in-then-semi-out)|semi-fade-out|current-visible|shrink|grow/,uf=0,df=function(){function e(t){ki(this,e),this.Reveal=t}return Ri(e,[{key:"run",value:function(e,t){var n=this;this.reset();var i=this.Reveal.getSlides(),r=i.indexOf(t),a=i.indexOf(e);if(e.hasAttribute("data-auto-animate")&&t.hasAttribute("data-auto-animate")&&e.getAttribute("data-auto-animate-id")===t.getAttribute("data-auto-animate-id")&&!(r>a?t:e).hasAttribute("data-auto-animate-restart")){this.autoAnimateStyleSheet=this.autoAnimateStyleSheet||Rh();var o=this.getAutoAnimateOptions(t);e.dataset.autoAnimate="pending",t.dataset.autoAnimate="pending",o.slideDirection=r>a?"forward":"backward";var s=this.getAutoAnimatableElements(e,t).map((function(e){return n.autoAnimateElements(e.from,e.to,e.options||{},o,uf++)}));if("false"!==t.dataset.autoAnimateUnmatched&&!0===this.Reveal.getConfig().autoAnimateUnmatched){var l=.8*o.duration,c=.2*o.duration;this.getUnmatchedAutoAnimateElements(t).forEach((function(e){var t=n.getAutoAnimateOptions(e,o),i="unmatched";t.duration===o.duration&&t.delay===o.delay||(i="unmatched-"+uf++,s.push('[data-auto-animate="running"] [data-auto-animate-target="'.concat(i,'"] { transition: opacity ').concat(t.duration,"s ease ").concat(t.delay,"s; }"))),e.dataset.autoAnimateTarget=i}),this),s.push('[data-auto-animate="running"] [data-auto-animate-target="unmatched"] { transition: opacity '.concat(l,"s ease ").concat(c,"s; }"))}this.autoAnimateStyleSheet.innerHTML=s.join(""),requestAnimationFrame((function(){n.autoAnimateStyleSheet&&(getComputedStyle(n.autoAnimateStyleSheet).fontWeight,t.dataset.autoAnimate="running")})),this.Reveal.dispatchEvent({type:"autoanimate",data:{fromSlide:e,toSlide:t,sheet:this.autoAnimateStyleSheet}})}}},{key:"reset",value:function(){yh(this.Reveal.getRevealElement(),'[data-auto-animate]:not([data-auto-animate=""])').forEach((function(e){e.dataset.autoAnimate=""})),yh(this.Reveal.getRevealElement(),"[data-auto-animate-target]").forEach((function(e){delete e.dataset.autoAnimateTarget})),this.autoAnimateStyleSheet&&this.autoAnimateStyleSheet.parentNode&&(this.autoAnimateStyleSheet.parentNode.removeChild(this.autoAnimateStyleSheet),this.autoAnimateStyleSheet=null)}},{key:"autoAnimateElements",value:function(e,t,n,i,r){e.dataset.autoAnimateTarget="",t.dataset.autoAnimateTarget=r;var a=this.getAutoAnimateOptions(t,i);void 0!==n.delay&&(a.delay=n.delay),void 0!==n.duration&&(a.duration=n.duration),void 0!==n.easing&&(a.easing=n.easing);var o=this.getAutoAnimatableProperties("from",e,n),s=this.getAutoAnimatableProperties("to",t,n);t.classList.contains("fragment")&&(delete s.styles.opacity,e.classList.contains("fragment")&&(e.className.match(cf)||[""])[0]===(t.className.match(cf)||[""])[0]&&"forward"===i.slideDirection&&t.classList.add("visible","disabled"));if(!1!==n.translate||!1!==n.scale){var l=this.Reveal.getScale(),c={x:(o.x-s.x)/l,y:(o.y-s.y)/l,scaleX:o.width/s.width,scaleY:o.height/s.height};c.x=Math.round(1e3*c.x)/1e3,c.y=Math.round(1e3*c.y)/1e3,c.scaleX=Math.round(1e3*c.scaleX)/1e3,c.scaleX=Math.round(1e3*c.scaleX)/1e3;var u=!1!==n.translate&&(0!==c.x||0!==c.y),d=!1!==n.scale&&(0!==c.scaleX||0!==c.scaleY);if(u||d){var h=[];u&&h.push("translate(".concat(c.x,"px, ").concat(c.y,"px)")),d&&h.push("scale(".concat(c.scaleX,", ").concat(c.scaleY,")")),o.styles.transform=h.join(" "),o.styles["transform-origin"]="top left",s.styles.transform="none"}}for(var f in s.styles){var v=s.styles[f],g=o.styles[f];v===g?delete s.styles[f]:(!0===v.explicitValue&&(s.styles[f]=v.value),!0===g.explicitValue&&(o.styles[f]=g.value))}var p="",m=Object.keys(s.styles);m.length>0&&(o.styles.transition="none",s.styles.transition="all ".concat(a.duration,"s ").concat(a.easing," ").concat(a.delay,"s"),s.styles["transition-property"]=m.join(", "),s.styles["will-change"]=m.join(", "),p='[data-auto-animate-target="'+r+'"] {'+Object.keys(o.styles).map((function(e){return e+": "+o.styles[e]+" !important;"})).join("")+'}[data-auto-animate="running"] [data-auto-animate-target="'+r+'"] {'+Object.keys(s.styles).map((function(e){return e+": "+s.styles[e]+" !important;"})).join("")+"}");return p}},{key:"getAutoAnimateOptions",value:function(e,t){var n={easing:this.Reveal.getConfig().autoAnimateEasing,duration:this.Reveal.getConfig().autoAnimateDuration,delay:0};if(n=mh(n,t),e.parentNode){var i=kh(e.parentNode,"[data-auto-animate-target]");i&&(n=this.getAutoAnimateOptions(i,n))}return e.dataset.autoAnimateEasing&&(n.easing=e.dataset.autoAnimateEasing),e.dataset.autoAnimateDuration&&(n.duration=parseFloat(e.dataset.autoAnimateDuration)),e.dataset.autoAnimateDelay&&(n.delay=parseFloat(e.dataset.autoAnimateDelay)),n}},{key:"getAutoAnimatableProperties",value:function(e,t,n){var i=this.Reveal.getConfig(),r={styles:[]};if(!1!==n.translate||!1!==n.scale){var a;if("function"==typeof n.measure)a=n.measure(t);else if(i.center)a=t.getBoundingClientRect();else{var o=this.Reveal.getScale();a={x:t.offsetLeft*o,y:t.offsetTop*o,width:t.offsetWidth*o,height:t.offsetHeight*o}}r.x=a.x,r.y=a.y,r.width=a.width,r.height=a.height}var s=getComputedStyle(t);return(n.styles||i.autoAnimateStyles).forEach((function(t){var n;"string"==typeof t&&(t={property:t}),""!==(n=void 0!==t.from&&"from"===e?{value:t.from,explicitValue:!0}:void 0!==t.to&&"to"===e?{value:t.to,explicitValue:!0}:s[t.property])&&(r.styles[t.property]=n)})),r}},{key:"getAutoAnimatableElements",value:function(e,t){var n=("function"==typeof this.Reveal.getConfig().autoAnimateMatcher?this.Reveal.getConfig().autoAnimateMatcher:this.getAutoAnimatePairs).call(this,e,t),i=[];return n.filter((function(e,t){if(-1===i.indexOf(e.to))return i.push(e.to),!0}))}},{key:"getAutoAnimatePairs",value:function(e,t){var n=this,i=[],r="h1, h2, h3, h4, h5, h6, p, li";return this.findAutoAnimateMatches(i,e,t,"[data-id]",(function(e){return e.nodeName+":::"+e.getAttribute("data-id")})),this.findAutoAnimateMatches(i,e,t,r,(function(e){return e.nodeName+":::"+e.innerText})),this.findAutoAnimateMatches(i,e,t,"img, video, iframe",(function(e){return e.nodeName+":::"+(e.getAttribute("src")||e.getAttribute("data-src"))})),this.findAutoAnimateMatches(i,e,t,"pre",(function(e){return e.nodeName+":::"+e.innerText})),i.forEach((function(e){Eh(e.from,r)?e.options={scale:!1}:Eh(e.from,"pre")&&(e.options={scale:!1,styles:["width","height"]},n.findAutoAnimateMatches(i,e.from,e.to,".hljs .hljs-ln-code",(function(e){return e.textContent}),{scale:!1,styles:[],measure:n.getLocalBoundingBox.bind(n)}),n.findAutoAnimateMatches(i,e.from,e.to,".hljs .hljs-ln-line[data-line-number]",(function(e){return e.getAttribute("data-line-number")}),{scale:!1,styles:["width"],measure:n.getLocalBoundingBox.bind(n)}))}),this),i}},{key:"getLocalBoundingBox",value:function(e){var t=this.Reveal.getScale();return{x:Math.round(e.offsetLeft*t*100)/100,y:Math.round(e.offsetTop*t*100)/100,width:Math.round(e.offsetWidth*t*100)/100,height:Math.round(e.offsetHeight*t*100)/100}}},{key:"findAutoAnimateMatches",value:function(e,t,n,i,r,a){var o={},s={};[].slice.call(t.querySelectorAll(i)).forEach((function(e,t){var n=r(e);"string"==typeof n&&n.length&&(o[n]=o[n]||[],o[n].push(e))})),[].slice.call(n.querySelectorAll(i)).forEach((function(t,n){var i,l=r(t);if(s[l]=s[l]||[],s[l].push(t),o[l]){var c=s[l].length-1,u=o[l].length-1;o[l][c]?(i=o[l][c],o[l][c]=null):o[l][u]&&(i=o[l][u],o[l][u]=null)}i&&e.push({from:i,to:t,options:a})}))}},{key:"getUnmatchedAutoAnimateElements",value:function(e){var t=this;return[].slice.call(e.children).reduce((function(e,n){var i=n.querySelector("[data-auto-animate-target]");return n.hasAttribute("data-auto-animate-target")||i||e.push(n),n.querySelector("[data-auto-animate-target]")&&(e=e.concat(t.getUnmatchedAutoAnimateElements(n))),e}),[])}}]),e}(),hf=function(){function e(t){ki(this,e),this.Reveal=t}return Ri(e,[{key:"configure",value:function(e,t){!1===e.fragments?this.disable():!1===t.fragments&&this.enable()}},{key:"disable",value:function(){yh(this.Reveal.getSlidesElement(),".fragment").forEach((function(e){e.classList.add("visible"),e.classList.remove("current-fragment")}))}},{key:"enable",value:function(){yh(this.Reveal.getSlidesElement(),".fragment").forEach((function(e){e.classList.remove("visible"),e.classList.remove("current-fragment")}))}},{key:"availableRoutes",value:function(){var e=this.Reveal.getCurrentSlide();if(e&&this.Reveal.getConfig().fragments){var t=e.querySelectorAll(".fragment:not(.disabled)"),n=e.querySelectorAll(".fragment:not(.disabled):not(.visible)");return{prev:t.length-n.length>0,next:!!n.length}}return{prev:!1,next:!1}}},{key:"sort",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e=Array.from(e);var n=[],i=[],r=[];e.forEach((function(e){if(e.hasAttribute("data-fragment-index")){var t=parseInt(e.getAttribute("data-fragment-index"),10);n[t]||(n[t]=[]),n[t].push(e)}else i.push([e])})),n=n.concat(i);var a=0;return n.forEach((function(e){e.forEach((function(e){r.push(e),e.setAttribute("data-fragment-index",a)})),a++})),!0===t?n:r}},{key:"sortAll",value:function(){var e=this;this.Reveal.getHorizontalSlides().forEach((function(t){var n=yh(t,"section");n.forEach((function(t,n){e.sort(t.querySelectorAll(".fragment"))}),e),0===n.length&&e.sort(t.querySelectorAll(".fragment"))}))}},{key:"update",value:function(e,t){var n=this,i={shown:[],hidden:[]},r=this.Reveal.getCurrentSlide();if(r&&this.Reveal.getConfig().fragments&&(t=t||this.sort(r.querySelectorAll(".fragment"))).length){var a=0;if("number"!=typeof e){var o=this.sort(r.querySelectorAll(".fragment.visible")).pop();o&&(e=parseInt(o.getAttribute("data-fragment-index")||0,10))}Array.from(t).forEach((function(t,r){if(t.hasAttribute("data-fragment-index")&&(r=parseInt(t.getAttribute("data-fragment-index"),10)),a=Math.max(a,r),r<=e){var o=t.classList.contains("visible");t.classList.add("visible"),t.classList.remove("current-fragment"),r===e&&(n.Reveal.announceStatus(n.Reveal.getStatusText(t)),t.classList.add("current-fragment"),n.Reveal.slideContent.startEmbeddedContent(t)),o||(i.shown.push(t),n.Reveal.dispatchEvent({target:t,type:"visible",bubbles:!1}))}else{var s=t.classList.contains("visible");t.classList.remove("visible"),t.classList.remove("current-fragment"),s&&(n.Reveal.slideContent.stopEmbeddedContent(t),i.hidden.push(t),n.Reveal.dispatchEvent({target:t,type:"hidden",bubbles:!1}))}})),e="number"==typeof e?e:-1,e=Math.max(Math.min(e,a),-1),r.setAttribute("data-fragment",e)}return i}},{key:"sync",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.Reveal.getCurrentSlide();return this.sort(e.querySelectorAll(".fragment"))}},{key:"goto",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.Reveal.getCurrentSlide();if(n&&this.Reveal.getConfig().fragments){var i=this.sort(n.querySelectorAll(".fragment:not(.disabled)"));if(i.length){if("number"!=typeof e){var r=this.sort(n.querySelectorAll(".fragment:not(.disabled).visible")).pop();e=r?parseInt(r.getAttribute("data-fragment-index")||0,10):-1}e+=t;var a=this.update(e,i);return a.hidden.length&&this.Reveal.dispatchEvent({type:"fragmenthidden",data:{fragment:a.hidden[0],fragments:a.hidden}}),a.shown.length&&this.Reveal.dispatchEvent({type:"fragmentshown",data:{fragment:a.shown[0],fragments:a.shown}}),this.Reveal.controls.update(),this.Reveal.progress.update(),this.Reveal.getConfig().fragmentInURL&&this.Reveal.location.writeURL(),!(!a.shown.length&&!a.hidden.length)}}return!1}},{key:"next",value:function(){return this.goto(null,1)}},{key:"prev",value:function(){return this.goto(null,-1)}}]),e}(),ff=function(){function e(t){ki(this,e),this.Reveal=t,this.active=!1,this.onSlideClicked=this.onSlideClicked.bind(this)}return Ri(e,[{key:"activate",value:function(){var e=this;if(this.Reveal.getConfig().overview&&!this.isActive()){this.active=!0,this.Reveal.getRevealElement().classList.add("overview"),this.Reveal.cancelAutoSlide(),this.Reveal.getSlidesElement().appendChild(this.Reveal.getBackgroundsElement()),yh(this.Reveal.getRevealElement(),af).forEach((function(t){t.classList.contains("stack")||t.addEventListener("click",e.onSlideClicked,!0)}));var t=this.Reveal.getComputedSlideSize();this.overviewSlideWidth=t.width+70,this.overviewSlideHeight=t.height+70,this.Reveal.getConfig().rtl&&(this.overviewSlideWidth=-this.overviewSlideWidth),this.Reveal.updateSlidesVisibility(),this.layout(),this.update(),this.Reveal.layout();var n=this.Reveal.getIndices();this.Reveal.dispatchEvent({type:"overviewshown",data:{indexh:n.h,indexv:n.v,currentSlide:this.Reveal.getCurrentSlide()}})}}},{key:"layout",value:function(){var e=this;this.Reveal.getHorizontalSlides().forEach((function(t,n){t.setAttribute("data-index-h",n),Sh(t,"translate3d("+n*e.overviewSlideWidth+"px, 0, 0)"),t.classList.contains("stack")&&yh(t,"section").forEach((function(t,i){t.setAttribute("data-index-h",n),t.setAttribute("data-index-v",i),Sh(t,"translate3d(0, "+i*e.overviewSlideHeight+"px, 0)")}))})),Array.from(this.Reveal.getBackgroundsElement().childNodes).forEach((function(t,n){Sh(t,"translate3d("+n*e.overviewSlideWidth+"px, 0, 0)"),yh(t,".slide-background").forEach((function(t,n){Sh(t,"translate3d(0, "+n*e.overviewSlideHeight+"px, 0)")}))}))}},{key:"update",value:function(){var e=Math.min(window.innerWidth,window.innerHeight),t=Math.max(e/5,150)/e,n=this.Reveal.getIndices();this.Reveal.transformSlides({overview:["scale("+t+")","translateX("+-n.h*this.overviewSlideWidth+"px)","translateY("+-n.v*this.overviewSlideHeight+"px)"].join(" ")})}},{key:"deactivate",value:function(){var e=this;if(this.Reveal.getConfig().overview){this.active=!1,this.Reveal.getRevealElement().classList.remove("overview"),this.Reveal.getRevealElement().classList.add("overview-deactivating"),setTimeout((function(){e.Reveal.getRevealElement().classList.remove("overview-deactivating")}),1),this.Reveal.getRevealElement().appendChild(this.Reveal.getBackgroundsElement()),yh(this.Reveal.getRevealElement(),af).forEach((function(t){Sh(t,""),t.removeEventListener("click",e.onSlideClicked,!0)})),yh(this.Reveal.getBackgroundsElement(),".slide-background").forEach((function(e){Sh(e,"")})),this.Reveal.transformSlides({overview:""});var t=this.Reveal.getIndices();this.Reveal.slide(t.h,t.v),this.Reveal.layout(),this.Reveal.cueAutoSlide(),this.Reveal.dispatchEvent({type:"overviewhidden",data:{indexh:t.h,indexv:t.v,currentSlide:this.Reveal.getCurrentSlide()}})}}},{key:"toggle",value:function(e){"boolean"==typeof e?e?this.activate():this.deactivate():this.isActive()?this.deactivate():this.activate()}},{key:"isActive",value:function(){return this.active}},{key:"onSlideClicked",value:function(e){if(this.isActive()){e.preventDefault();for(var t=e.target;t&&!t.nodeName.match(/section/gi);)t=t.parentNode;if(t&&!t.classList.contains("disabled")&&(this.deactivate(),t.nodeName.match(/section/gi))){var n=parseInt(t.getAttribute("data-index-h"),10),i=parseInt(t.getAttribute("data-index-v"),10);this.Reveal.slide(n,i)}}}}]),e}(),vf=function(){function e(t){ki(this,e),this.Reveal=t,this.shortcuts={},this.bindings={},this.onDocumentKeyDown=this.onDocumentKeyDown.bind(this),this.onDocumentKeyPress=this.onDocumentKeyPress.bind(this)}return Ri(e,[{key:"configure",value:function(e,t){"linear"===e.navigationMode?(this.shortcuts["&#8594;  ,  &#8595;  ,  SPACE  ,  N  ,  L  ,  J"]="Next slide",this.shortcuts["&#8592;  ,  &#8593;  ,  P  ,  H  ,  K"]="Previous slide"):(this.shortcuts["N  ,  SPACE"]="Next slide",this.shortcuts["P  ,  Shift SPACE"]="Previous slide",this.shortcuts["&#8592;  ,  H"]="Navigate left",this.shortcuts["&#8594;  ,  L"]="Navigate right",this.shortcuts["&#8593;  ,  K"]="Navigate up",this.shortcuts["&#8595;  ,  J"]="Navigate down"),this.shortcuts["Alt + &#8592;/&#8593/&#8594;/&#8595;"]="Navigate without fragments",this.shortcuts["Shift + &#8592;/&#8593/&#8594;/&#8595;"]="Jump to first/last slide",this.shortcuts["B  ,  ."]="Pause",this.shortcuts.F="Fullscreen",this.shortcuts["ESC, O"]="Slide overview"}},{key:"bind",value:function(){document.addEventListener("keydown",this.onDocumentKeyDown,!1),document.addEventListener("keypress",this.onDocumentKeyPress,!1)}},{key:"unbind",value:function(){document.removeEventListener("keydown",this.onDocumentKeyDown,!1),document.removeEventListener("keypress",this.onDocumentKeyPress,!1)}},{key:"addKeyBinding",value:function(e,t){"object"===Si(e)&&e.keyCode?this.bindings[e.keyCode]={callback:t,key:e.key,description:e.description}:this.bindings[e]={callback:t,key:null,description:null}}},{key:"removeKeyBinding",value:function(e){delete this.bindings[e]}},{key:"triggerKey",value:function(e){this.onDocumentKeyDown({keyCode:e})}},{key:"registerKeyboardShortcut",value:function(e,t){this.shortcuts[e]=t}},{key:"getShortcuts",value:function(){return this.shortcuts}},{key:"getBindings",value:function(){return this.bindings}},{key:"onDocumentKeyPress",value:function(e){e.shiftKey&&63===e.charCode&&this.Reveal.toggleHelp()}},{key:"onDocumentKeyDown",value:function(e){var t=this.Reveal.getConfig();if("function"==typeof t.keyboardCondition&&!1===t.keyboardCondition(e))return!0;if("focused"===t.keyboardCondition&&!this.Reveal.isFocused())return!0;var n=e.keyCode,i=!this.Reveal.isAutoSliding();this.Reveal.onUserInput(e);var r=document.activeElement&&!0===document.activeElement.isContentEditable,a=document.activeElement&&document.activeElement.tagName&&/input|textarea/i.test(document.activeElement.tagName),o=document.activeElement&&document.activeElement.className&&/speaker-notes/i.test(document.activeElement.className),s=!(-1!==[32,37,38,39,40,78,80].indexOf(e.keyCode)&&e.shiftKey||e.altKey)&&(e.shiftKey||e.altKey||e.ctrlKey||e.metaKey);if(!(r||a||o||s)){var l,c=[66,86,190,191];if("object"===Si(t.keyboard))for(l in t.keyboard)"togglePause"===t.keyboard[l]&&c.push(parseInt(l,10));if(this.Reveal.isPaused()&&-1===c.indexOf(n))return!1;var u,d,h="linear"===t.navigationMode||!this.Reveal.hasHorizontalSlides()||!this.Reveal.hasVerticalSlides(),f=!1;if("object"===Si(t.keyboard))for(l in t.keyboard)if(parseInt(l,10)===n){var v=t.keyboard[l];"function"==typeof v?v.apply(null,[e]):"string"==typeof v&&"function"==typeof this.Reveal[v]&&this.Reveal[v].call(),f=!0}if(!1===f)for(l in this.bindings)if(parseInt(l,10)===n){var g=this.bindings[l].callback;"function"==typeof g?g.apply(null,[e]):"string"==typeof g&&"function"==typeof this.Reveal[g]&&this.Reveal[g].call(),f=!0}!1===f&&(f=!0,80===n||33===n?this.Reveal.prev({skipFragments:e.altKey}):78===n||34===n?this.Reveal.next({skipFragments:e.altKey}):72===n||37===n?e.shiftKey?this.Reveal.slide(0):!this.Reveal.overview.isActive()&&h?this.Reveal.prev({skipFragments:e.altKey}):this.Reveal.left({skipFragments:e.altKey}):76===n||39===n?e.shiftKey?this.Reveal.slide(this.Reveal.getHorizontalSlides().length-1):!this.Reveal.overview.isActive()&&h?this.Reveal.next({skipFragments:e.altKey}):this.Reveal.right({skipFragments:e.altKey}):75===n||38===n?e.shiftKey?this.Reveal.slide(void 0,0):!this.Reveal.overview.isActive()&&h?this.Reveal.prev({skipFragments:e.altKey}):this.Reveal.up({skipFragments:e.altKey}):74===n||40===n?e.shiftKey?this.Reveal.slide(void 0,Number.MAX_VALUE):!this.Reveal.overview.isActive()&&h?this.Reveal.next({skipFragments:e.altKey}):this.Reveal.down({skipFragments:e.altKey}):36===n?this.Reveal.slide(0):35===n?this.Reveal.slide(this.Reveal.getHorizontalSlides().length-1):32===n?(this.Reveal.overview.isActive()&&this.Reveal.overview.deactivate(),e.shiftKey?this.Reveal.prev({skipFragments:e.altKey}):this.Reveal.next({skipFragments:e.altKey})):58===n||59===n||66===n||86===n||190===n||191===n?this.Reveal.togglePause():70===n?(u=t.embedded?this.Reveal.getViewportElement():document.documentElement,(d=(u=u||document.documentElement).requestFullscreen||u.webkitRequestFullscreen||u.webkitRequestFullScreen||u.mozRequestFullScreen||u.msRequestFullscreen)&&d.apply(u)):65===n?t.autoSlideStoppable&&this.Reveal.toggleAutoSlide(i):f=!1),f?e.preventDefault&&e.preventDefault():27!==n&&79!==n||(!1===this.Reveal.closeOverlay()&&this.Reveal.overview.toggle(),e.preventDefault&&e.preventDefault()),this.Reveal.cueAutoSlide()}}}]),e}(),gf=function(){function e(t){ki(this,e),this.Reveal=t,this.writeURLTimeout=0,this.onWindowHashChange=this.onWindowHashChange.bind(this)}return Ri(e,[{key:"bind",value:function(){window.addEventListener("hashchange",this.onWindowHashChange,!1)}},{key:"unbind",value:function(){window.removeEventListener("hashchange",this.onWindowHashChange,!1)}},{key:"getIndicesFromHash",value:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location.hash,i=n.replace(/^#\/?/,""),r=i.split("/");if(/^[0-9]*$/.test(r[0])||!i.length){var a,o=this.Reveal.getConfig(),s=o.hashOneBasedIndex?1:0,l=parseInt(r[0],10)-s||0,c=parseInt(r[1],10)-s||0;return o.fragmentInURL&&(a=parseInt(r[2],10),isNaN(a)&&(a=void 0)),{h:l,v:c,f:a}}/\/[-\d]+$/g.test(i)&&(t=parseInt(i.split("/").pop(),10),t=isNaN(t)?void 0:t,i=i.split("/").shift());try{e=document.getElementById(decodeURIComponent(i))}catch(e){}return e?wi(wi({},this.Reveal.getIndices(e)),{},{f:t}):null}},{key:"readURL",value:function(){var e=this.Reveal.getIndices(),t=this.getIndicesFromHash();t?t.h===e.h&&t.v===e.v&&void 0===t.f||this.Reveal.slide(t.h,t.v,t.f):this.Reveal.slide(e.h||0,e.v||0)}},{key:"writeURL",value:function(e){var t=this.Reveal.getConfig(),n=this.Reveal.getCurrentSlide();if(clearTimeout(this.writeURLTimeout),"number"==typeof e)this.writeURLTimeout=setTimeout(this.writeURL,e);else if(n){var i=this.getHash();t.history?window.location.hash=i:t.hash&&("/"===i?window.history.replaceState(null,null,window.location.pathname+window.location.search):window.history.replaceState(null,null,"#"+i))}}},{key:"getHash",value:function(e){var t="/",n=e||this.Reveal.getCurrentSlide(),i=n?n.getAttribute("id"):null;i&&(i=encodeURIComponent(i));var r=this.Reveal.getIndices(e);if(this.Reveal.getConfig().fragmentInURL||(r.f=void 0),"string"==typeof i&&i.length)t="/"+i,r.f>=0&&(t+="/"+r.f);else{var a=this.Reveal.getConfig().hashOneBasedIndex?1:0;(r.h>0||r.v>0||r.f>=0)&&(t+=r.h+a),(r.v>0||r.f>=0)&&(t+="/"+(r.v+a)),r.f>=0&&(t+="/"+r.f)}return t}},{key:"onWindowHashChange",value:function(e){this.readURL()}}]),e}(),pf=function(){function e(t){ki(this,e),this.Reveal=t,this.onNavigateLeftClicked=this.onNavigateLeftClicked.bind(this),this.onNavigateRightClicked=this.onNavigateRightClicked.bind(this),this.onNavigateUpClicked=this.onNavigateUpClicked.bind(this),this.onNavigateDownClicked=this.onNavigateDownClicked.bind(this),this.onNavigatePrevClicked=this.onNavigatePrevClicked.bind(this),this.onNavigateNextClicked=this.onNavigateNextClicked.bind(this)}return Ri(e,[{key:"render",value:function(){var e=this.Reveal.getConfig().rtl,t=this.Reveal.getRevealElement();this.element=document.createElement("aside"),this.element.className="controls",this.element.innerHTML='<button class="navigate-left" aria-label="'.concat(e?"next slide":"previous slide",'"><div class="controls-arrow"></div></button>\n\t\t\t<button class="navigate-right" aria-label="').concat(e?"previous slide":"next slide",'"><div class="controls-arrow"></div></button>\n\t\t\t<button class="navigate-up" aria-label="above slide"><div class="controls-arrow"></div></button>\n\t\t\t<button class="navigate-down" aria-label="below slide"><div class="controls-arrow"></div></button>'),this.Reveal.getRevealElement().appendChild(this.element),this.controlsLeft=yh(t,".navigate-left"),this.controlsRight=yh(t,".navigate-right"),this.controlsUp=yh(t,".navigate-up"),this.controlsDown=yh(t,".navigate-down"),this.controlsPrev=yh(t,".navigate-prev"),this.controlsNext=yh(t,".navigate-next"),this.controlsRightArrow=this.element.querySelector(".navigate-right"),this.controlsLeftArrow=this.element.querySelector(".navigate-left"),this.controlsDownArrow=this.element.querySelector(".navigate-down")}},{key:"configure",value:function(e,t){this.element.style.display=e.controls?"block":"none",this.element.setAttribute("data-controls-layout",e.controlsLayout),this.element.setAttribute("data-controls-back-arrows",e.controlsBackArrows)}},{key:"bind",value:function(){var e=this,t=["touchstart","click"];Oh&&(t=["touchstart"]),t.forEach((function(t){e.controlsLeft.forEach((function(n){return n.addEventListener(t,e.onNavigateLeftClicked,!1)})),e.controlsRight.forEach((function(n){return n.addEventListener(t,e.onNavigateRightClicked,!1)})),e.controlsUp.forEach((function(n){return n.addEventListener(t,e.onNavigateUpClicked,!1)})),e.controlsDown.forEach((function(n){return n.addEventListener(t,e.onNavigateDownClicked,!1)})),e.controlsPrev.forEach((function(n){return n.addEventListener(t,e.onNavigatePrevClicked,!1)})),e.controlsNext.forEach((function(n){return n.addEventListener(t,e.onNavigateNextClicked,!1)}))}))}},{key:"unbind",value:function(){var e=this;["touchstart","click"].forEach((function(t){e.controlsLeft.forEach((function(n){return n.removeEventListener(t,e.onNavigateLeftClicked,!1)})),e.controlsRight.forEach((function(n){return n.removeEventListener(t,e.onNavigateRightClicked,!1)})),e.controlsUp.forEach((function(n){return n.removeEventListener(t,e.onNavigateUpClicked,!1)})),e.controlsDown.forEach((function(n){return n.removeEventListener(t,e.onNavigateDownClicked,!1)})),e.controlsPrev.forEach((function(n){return n.removeEventListener(t,e.onNavigatePrevClicked,!1)})),e.controlsNext.forEach((function(n){return n.removeEventListener(t,e.onNavigateNextClicked,!1)}))}))}},{key:"update",value:function(){var e=this.Reveal.availableRoutes();[].concat(Li(this.controlsLeft),Li(this.controlsRight),Li(this.controlsUp),Li(this.controlsDown),Li(this.controlsPrev),Li(this.controlsNext)).forEach((function(e){e.classList.remove("enabled","fragmented"),e.setAttribute("disabled","disabled")})),e.left&&this.controlsLeft.forEach((function(e){e.classList.add("enabled"),e.removeAttribute("disabled")})),e.right&&this.controlsRight.forEach((function(e){e.classList.add("enabled"),e.removeAttribute("disabled")})),e.up&&this.controlsUp.forEach((function(e){e.classList.add("enabled"),e.removeAttribute("disabled")})),e.down&&this.controlsDown.forEach((function(e){e.classList.add("enabled"),e.removeAttribute("disabled")})),(e.left||e.up)&&this.controlsPrev.forEach((function(e){e.classList.add("enabled"),e.removeAttribute("disabled")})),(e.right||e.down)&&this.controlsNext.forEach((function(e){e.classList.add("enabled"),e.removeAttribute("disabled")}));var t=this.Reveal.getCurrentSlide();if(t){var n=this.Reveal.fragments.availableRoutes();n.prev&&this.controlsPrev.forEach((function(e){e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")})),n.next&&this.controlsNext.forEach((function(e){e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")})),this.Reveal.isVerticalSlide(t)?(n.prev&&this.controlsUp.forEach((function(e){e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")})),n.next&&this.controlsDown.forEach((function(e){e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}))):(n.prev&&this.controlsLeft.forEach((function(e){e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")})),n.next&&this.controlsRight.forEach((function(e){e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")})))}if(this.Reveal.getConfig().controlsTutorial){var i=this.Reveal.getIndices();!this.Reveal.hasNavigatedVertically()&&e.down?this.controlsDownArrow.classList.add("highlight"):(this.controlsDownArrow.classList.remove("highlight"),this.Reveal.getConfig().rtl?!this.Reveal.hasNavigatedHorizontally()&&e.left&&0===i.v?this.controlsLeftArrow.classList.add("highlight"):this.controlsLeftArrow.classList.remove("highlight"):!this.Reveal.hasNavigatedHorizontally()&&e.right&&0===i.v?this.controlsRightArrow.classList.add("highlight"):this.controlsRightArrow.classList.remove("highlight"))}}},{key:"onNavigateLeftClicked",value:function(e){e.preventDefault(),this.Reveal.onUserInput(),"linear"===this.Reveal.getConfig().navigationMode?this.Reveal.prev():this.Reveal.left()}},{key:"onNavigateRightClicked",value:function(e){e.preventDefault(),this.Reveal.onUserInput(),"linear"===this.Reveal.getConfig().navigationMode?this.Reveal.next():this.Reveal.right()}},{key:"onNavigateUpClicked",value:function(e){e.preventDefault(),this.Reveal.onUserInput(),this.Reveal.up()}},{key:"onNavigateDownClicked",value:function(e){e.preventDefault(),this.Reveal.onUserInput(),this.Reveal.down()}},{key:"onNavigatePrevClicked",value:function(e){e.preventDefault(),this.Reveal.onUserInput(),this.Reveal.prev()}},{key:"onNavigateNextClicked",value:function(e){e.preventDefault(),this.Reveal.onUserInput(),this.Reveal.next()}}]),e}(),mf=function(){function e(t){ki(this,e),this.Reveal=t,this.onProgressClicked=this.onProgressClicked.bind(this)}return Ri(e,[{key:"render",value:function(){this.element=document.createElement("div"),this.element.className="progress",this.Reveal.getRevealElement().appendChild(this.element),this.bar=document.createElement("span"),this.element.appendChild(this.bar)}},{key:"configure",value:function(e,t){this.element.style.display=e.progress?"block":"none"}},{key:"bind",value:function(){this.Reveal.getConfig().progress&&this.element&&this.element.addEventListener("click",this.onProgressClicked,!1)}},{key:"unbind",value:function(){this.Reveal.getConfig().progress&&this.element&&this.element.removeEventListener("click",this.onProgressClicked,!1)}},{key:"update",value:function(){if(this.Reveal.getConfig().progress&&this.bar){var e=this.Reveal.getProgress();this.Reveal.getTotalSlides()<2&&(e=0),this.bar.style.transform="scaleX("+e+")"}}},{key:"getMaxWidth",value:function(){return this.Reveal.getRevealElement().offsetWidth}},{key:"onProgressClicked",value:function(e){this.Reveal.onUserInput(e),e.preventDefault();var t=this.Reveal.getSlides(),n=t.length,i=Math.floor(e.clientX/this.getMaxWidth()*n);this.Reveal.getConfig().rtl&&(i=n-i);var r=this.Reveal.getIndices(t[i]);this.Reveal.slide(r.h,r.v)}}]),e}(),yf=function(){function e(t){ki(this,e),this.Reveal=t,this.lastMouseWheelStep=0,this.cursorHidden=!1,this.cursorInactiveTimeout=0,this.onDocumentCursorActive=this.onDocumentCursorActive.bind(this),this.onDocumentMouseScroll=this.onDocumentMouseScroll.bind(this)}return Ri(e,[{key:"configure",value:function(e,t){e.mouseWheel?(document.addEventListener("DOMMouseScroll",this.onDocumentMouseScroll,!1),document.addEventListener("mousewheel",this.onDocumentMouseScroll,!1)):(document.removeEventListener("DOMMouseScroll",this.onDocumentMouseScroll,!1),document.removeEventListener("mousewheel",this.onDocumentMouseScroll,!1)),e.hideInactiveCursor?(document.addEventListener("mousemove",this.onDocumentCursorActive,!1),document.addEventListener("mousedown",this.onDocumentCursorActive,!1)):(this.showCursor(),document.removeEventListener("mousemove",this.onDocumentCursorActive,!1),document.removeEventListener("mousedown",this.onDocumentCursorActive,!1))}},{key:"showCursor",value:function(){this.cursorHidden&&(this.cursorHidden=!1,this.Reveal.getRevealElement().style.cursor="")}},{key:"hideCursor",value:function(){!1===this.cursorHidden&&(this.cursorHidden=!0,this.Reveal.getRevealElement().style.cursor="none")}},{key:"onDocumentCursorActive",value:function(e){this.showCursor(),clearTimeout(this.cursorInactiveTimeout),this.cursorInactiveTimeout=setTimeout(this.hideCursor.bind(this),this.Reveal.getConfig().hideCursorTime)}},{key:"onDocumentMouseScroll",value:function(e){if(Date.now()-this.lastMouseWheelStep>1e3){this.lastMouseWheelStep=Date.now();var t=e.detail||-e.wheelDelta;t>0?this.Reveal.next():t<0&&this.Reveal.prev()}}}]),e}(),bf=a,wf=Jt,Sf=b,Ef=o.f,kf=function(e){return function(t){for(var n,i=Sf(t),r=wf(i),a=r.length,o=0,s=[];a>o;)n=r[o++],bf&&!Ef.call(i,n)||s.push(e?[n,i[n]]:i[n]);return s}},Af={entries:kf(!0),values:kf(!1)}.values;$t({target:"Object",stat:!0},{values:function(e){return Af(e)}});var Rf=function(e,t){var n=document.createElement("script");n.type="text/javascript",n.async=!1,n.defer=!1,n.src=e,"function"==typeof t&&(n.onload=n.onreadystatechange=function(e){("load"===e.type||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=n.onerror=null,t())},n.onerror=function(e){n.onload=n.onreadystatechange=n.onerror=null,t(new Error("Failed loading script: "+n.src+"\n"+e))});var i=document.querySelector("head");i.insertBefore(n,i.lastChild)},xf=function(){function e(t){ki(this,e),this.Reveal=t,this.state="idle",this.registeredPlugins={},this.asyncDependencies=[]}return Ri(e,[{key:"load",value:function(e,t){var n=this;return this.state="loading",e.forEach(this.registerPlugin.bind(this)),new Promise((function(e){var i=[],r=0;if(t.forEach((function(e){e.condition&&!e.condition()||(e.async?n.asyncDependencies.push(e):i.push(e))})),i.length){r=i.length;var a=function(t){t&&"function"==typeof t.callback&&t.callback(),0==--r&&n.initPlugins().then(e)};i.forEach((function(e){"string"==typeof e.id?(n.registerPlugin(e),a(e)):"string"==typeof e.src?Rf(e.src,(function(){return a(e)})):(console.warn("Unrecognized plugin format",e),a())}))}else n.initPlugins().then(e)}))}},{key:"initPlugins",value:function(){var e=this;return new Promise((function(t){var n=Object.values(e.registeredPlugins),i=n.length;if(0===i)e.loadAsync().then(t);else{var r,a=function(){0==--i?e.loadAsync().then(t):r()},o=0;(r=function(){var t=n[o++];if("function"==typeof t.init){var i=t.init(e.Reveal);i&&"function"==typeof i.then?i.then(a):a()}else a()})()}}))}},{key:"loadAsync",value:function(){return this.state="loaded",this.asyncDependencies.length&&this.asyncDependencies.forEach((function(e){Rf(e.src,e.callback)})),Promise.resolve()}},{key:"registerPlugin",value:function(e){2===arguments.length&&"string"==typeof arguments[0]?(e=arguments[1]).id=arguments[0]:"function"==typeof e&&(e=e());var t=e.id;"string"!=typeof t?console.warn("Unrecognized plugin format; can't find plugin.id",e):void 0===this.registeredPlugins[t]?(this.registeredPlugins[t]=e,"loaded"===this.state&&"function"==typeof e.init&&e.init(this.Reveal)):console.warn('reveal.js: "'+t+'" plugin has already been registered')}},{key:"hasPlugin",value:function(e){return!!this.registeredPlugins[e]}},{key:"getPlugin",value:function(e){return this.registeredPlugins[e]}},{key:"getRegisteredPlugins",value:function(){return this.registeredPlugins}}]),e}();!function(e){var t=function(e){var t,n=Object.prototype,i=n.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var r=t&&t.prototype instanceof p?t:p,a=Object.create(r.prototype),o=new P(i||[]);return a._invoke=function(e,t,n){var i=d;return function(r,a){if(i===f)throw new Error("Generator is already running");if(i===v){if("throw"===r)throw a;return N()}for(n.method=r,n.arg=a;;){var o=n.delegate;if(o){var s=R(o,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=f;var l=u(e,t,n);if("normal"===l.type){if(i=n.done?v:h,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i=v,n.method="throw",n.arg=l.arg)}}}(e,n,o),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var d="suspendedStart",h="suspendedYield",f="executing",v="completed",g={};function p(){}function m(){}function y(){}var b={};b[a]=function(){return this};var w=Object.getPrototypeOf,S=w&&w(w(C([])));S&&S!==n&&i.call(S,a)&&(b=S);var E=y.prototype=p.prototype=Object.create(b);function k(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function A(e,t){function n(r,a,o,s){var l=u(e[r],e,a);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==typeof d&&i.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,o,s)}),(function(e){n("throw",e,o,s)})):t.resolve(d).then((function(e){c.value=e,o(c)}),(function(e){return n("throw",e,o,s)}))}s(l.arg)}var r;this._invoke=function(e,i){function a(){return new t((function(t,r){n(e,i,t,r)}))}return r=r?r.then(a,a):a()}}function R(e,n){var i=e.iterator[n.method];if(i===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,R(e,n),"throw"===n.method))return g;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,g;var a=r.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function C(e){if(e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function n(){for(;++r<e.length;)if(i.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}return{next:N}}function N(){return{value:t,done:!0}}return m.prototype=E.constructor=y,y.constructor=m,m.displayName=l(y,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,l(e,s,"GeneratorFunction")),e.prototype=Object.create(E),e},e.awrap=function(e){return{__await:e}},k(A.prototype),A.prototype[o]=function(){return this},e.AsyncIterator=A,e.async=function(t,n,i,r,a){void 0===a&&(a=Promise);var o=new A(c(t,n,i,r),a);return e.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},k(E),l(E,s,"Generator"),E[a]=function(){return this},E.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var i=t.pop();if(i in e)return n.value=i,n.done=!1,n}return n.done=!0,n}},e.values=C,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(i,r){return s.type="throw",s.arg=e,n.next=i,r&&(n.method="next",n.arg=t),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var l=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(l&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var r=i.arg;L(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:C(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),g}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}}({exports:{}});var Lf=function(){function e(t){ki(this,e),this.Reveal=t}var t,n;return Ri(e,[{key:"setupPDF",value:(t=regeneratorRuntime.mark((function e(){var t,n,i,r,a,o,s,l,c,u,d,h,f,v;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.Reveal.getConfig(),n=yh(this.Reveal.getRevealElement(),af),i=t.slideNumber&&/all|print/i.test(t.showSlideNumber),r=this.Reveal.getComputedSlideSize(window.innerWidth,window.innerHeight),a=Math.floor(r.width*(1+t.margin)),o=Math.floor(r.height*(1+t.margin)),s=r.width,l=r.height,e.next=8,new Promise(requestAnimationFrame);case 8:return Rh("@page{size:"+a+"px "+o+"px; margin: 0px;}"),Rh(".reveal section>img, .reveal section>video, .reveal section>iframe{max-width: "+s+"px; max-height:"+l+"px}"),document.documentElement.classList.add("print-pdf"),document.body.style.width=a+"px",document.body.style.height=o+"px",(c=document.querySelector(".reveal-viewport"))&&(d=window.getComputedStyle(c))&&d.background&&(u=d.background),e.next=17,new Promise(requestAnimationFrame);case 17:return this.Reveal.layoutSlideContents(s,l),e.next=20,new Promise(requestAnimationFrame);case 20:return h=n.map((function(e){return e.scrollHeight})),f=[],v=n[0].parentNode,n.forEach((function(e,n){if(!1===e.classList.contains("stack")){var r=(a-s)/2,c=(o-l)/2,d=h[n],v=Math.max(Math.ceil(d/o),1);(1===(v=Math.min(v,t.pdfMaxPagesPerSlide))&&t.center||e.classList.contains("center"))&&(c=Math.max((o-d)/2,0));var g=document.createElement("div");if(f.push(g),g.className="pdf-page",g.style.height=(o+t.pdfPageHeightOffset)*v+"px",u&&(g.style.background=u),g.appendChild(e),e.style.left=r+"px",e.style.top=c+"px",e.style.width=s+"px",this.Reveal.slideContent.layout(e),e.slideBackgroundElement&&g.insertBefore(e.slideBackgroundElement,e),t.showNotes){var p=this.Reveal.getSlideNotes(e);if(p){var m="string"==typeof t.showNotes?t.showNotes:"inline",y=document.createElement("div");y.classList.add("speaker-notes"),y.classList.add("speaker-notes-pdf"),y.setAttribute("data-layout",m),y.innerHTML=p,"separate-page"===m?f.push(y):(y.style.left="8px",y.style.bottom="8px",y.style.width=a-16+"px",g.appendChild(y))}}if(i){var b=n+1,w=document.createElement("div");w.classList.add("slide-number"),w.classList.add("slide-number-pdf"),w.innerHTML=b,g.appendChild(w)}if(t.pdfSeparateFragments){var S,E=this.Reveal.fragments.sort(g.querySelectorAll(".fragment"),!0);E.forEach((function(e){S&&S.forEach((function(e){e.classList.remove("current-fragment")})),e.forEach((function(e){e.classList.add("visible","current-fragment")}),this);var t=g.cloneNode(!0);f.push(t),S=e}),this),E.forEach((function(e){e.forEach((function(e){e.classList.remove("visible","current-fragment")}))}))}else yh(g,".fragment:not(.fade-out)").forEach((function(e){e.classList.add("visible")}))}}),this),e.next=26,new Promise(requestAnimationFrame);case 26:f.forEach((function(e){return v.appendChild(e)})),this.Reveal.dispatchEvent({type:"pdf-ready"});case 28:case"end":return e.stop()}}),e,this)})),n=function(){var e=this,n=arguments;return new Promise((function(i,r){var a=t.apply(e,n);function o(e){Ei(a,i,r,o,s,"next",e)}function s(e){Ei(a,i,r,o,s,"throw",e)}o(void 0)}))},function(){return n.apply(this,arguments)})},{key:"isPrintingPDF",value:function(){return/print-pdf/gi.test(window.location.search)}}]),e}(),Pf=function(){function e(t){ki(this,e),this.Reveal=t,this.touchStartX=0,this.touchStartY=0,this.touchStartCount=0,this.touchCaptured=!1,this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onTouchStart=this.onTouchStart.bind(this),this.onTouchMove=this.onTouchMove.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this)}return Ri(e,[{key:"bind",value:function(){var e=this.Reveal.getRevealElement();"onpointerdown"in window?(e.addEventListener("pointerdown",this.onPointerDown,!1),e.addEventListener("pointermove",this.onPointerMove,!1),e.addEventListener("pointerup",this.onPointerUp,!1)):window.navigator.msPointerEnabled?(e.addEventListener("MSPointerDown",this.onPointerDown,!1),e.addEventListener("MSPointerMove",this.onPointerMove,!1),e.addEventListener("MSPointerUp",this.onPointerUp,!1)):(e.addEventListener("touchstart",this.onTouchStart,!1),e.addEventListener("touchmove",this.onTouchMove,!1),e.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"unbind",value:function(){var e=this.Reveal.getRevealElement();e.removeEventListener("pointerdown",this.onPointerDown,!1),e.removeEventListener("pointermove",this.onPointerMove,!1),e.removeEventListener("pointerup",this.onPointerUp,!1),e.removeEventListener("MSPointerDown",this.onPointerDown,!1),e.removeEventListener("MSPointerMove",this.onPointerMove,!1),e.removeEventListener("MSPointerUp",this.onPointerUp,!1),e.removeEventListener("touchstart",this.onTouchStart,!1),e.removeEventListener("touchmove",this.onTouchMove,!1),e.removeEventListener("touchend",this.onTouchEnd,!1)}},{key:"isSwipePrevented",value:function(e){if(Eh(e,"video, audio"))return!0;for(;e&&"function"==typeof e.hasAttribute;){if(e.hasAttribute("data-prevent-swipe"))return!0;e=e.parentNode}return!1}},{key:"onTouchStart",value:function(e){if(this.isSwipePrevented(e.target))return!0;this.touchStartX=e.touches[0].clientX,this.touchStartY=e.touches[0].clientY,this.touchStartCount=e.touches.length}},{key:"onTouchMove",value:function(e){if(this.isSwipePrevented(e.target))return!0;var t=this.Reveal.getConfig();if(this.touchCaptured)Oh&&e.preventDefault();else{this.Reveal.onUserInput(e);var n=e.touches[0].clientX,i=e.touches[0].clientY;if(1===e.touches.length&&2!==this.touchStartCount){var r=this.Reveal.availableRoutes({includeFragments:!0}),a=n-this.touchStartX,o=i-this.touchStartY;a>40&&Math.abs(a)>Math.abs(o)?(this.touchCaptured=!0,"linear"===t.navigationMode?t.rtl?this.Reveal.next():this.Reveal.prev():this.Reveal.left()):a<-40&&Math.abs(a)>Math.abs(o)?(this.touchCaptured=!0,"linear"===t.navigationMode?t.rtl?this.Reveal.prev():this.Reveal.next():this.Reveal.right()):o>40&&r.up?(this.touchCaptured=!0,"linear"===t.navigationMode?this.Reveal.prev():this.Reveal.up()):o<-40&&r.down&&(this.touchCaptured=!0,"linear"===t.navigationMode?this.Reveal.next():this.Reveal.down()),t.embedded?(this.touchCaptured||this.Reveal.isVerticalSlide())&&e.preventDefault():e.preventDefault()}}}},{key:"onTouchEnd",value:function(e){this.touchCaptured=!1}},{key:"onPointerDown",value:function(e){e.pointerType!==e.MSPOINTER_TYPE_TOUCH&&"touch"!==e.pointerType||(e.touches=[{clientX:e.clientX,clientY:e.clientY}],this.onTouchStart(e))}},{key:"onPointerMove",value:function(e){e.pointerType!==e.MSPOINTER_TYPE_TOUCH&&"touch"!==e.pointerType||(e.touches=[{clientX:e.clientX,clientY:e.clientY}],this.onTouchMove(e))}},{key:"onPointerUp",value:function(e){e.pointerType!==e.MSPOINTER_TYPE_TOUCH&&"touch"!==e.pointerType||(e.touches=[{clientX:e.clientX,clientY:e.clientY}],this.onTouchEnd(e))}}]),e}(),Cf="focus",Nf="blur",If=function(){function e(t){ki(this,e),this.Reveal=t,this.onRevealPointerDown=this.onRevealPointerDown.bind(this),this.onDocumentPointerDown=this.onDocumentPointerDown.bind(this)}return Ri(e,[{key:"configure",value:function(e,t){e.embedded?this.blur():(this.focus(),this.unbind())}},{key:"bind",value:function(){this.Reveal.getConfig().embedded&&this.Reveal.getRevealElement().addEventListener("pointerdown",this.onRevealPointerDown,!1)}},{key:"unbind",value:function(){this.Reveal.getRevealElement().removeEventListener("pointerdown",this.onRevealPointerDown,!1),document.removeEventListener("pointerdown",this.onDocumentPointerDown,!1)}},{key:"focus",value:function(){this.state!==Cf&&(this.Reveal.getRevealElement().classList.add("focused"),document.addEventListener("pointerdown",this.onDocumentPointerDown,!1)),this.state=Cf}},{key:"blur",value:function(){this.state!==Nf&&(this.Reveal.getRevealElement().classList.remove("focused"),document.removeEventListener("pointerdown",this.onDocumentPointerDown,!1)),this.state=Nf}},{key:"isFocused",value:function(){return this.state===Cf}},{key:"onRevealPointerDown",value:function(e){this.focus()}},{key:"onDocumentPointerDown",value:function(e){var t=kh(e.target,".reveal");t&&t===this.Reveal.getRevealElement()||this.blur()}}]),e}(),Mf=function(){function e(t){ki(this,e),this.Reveal=t}return Ri(e,[{key:"render",value:function(){this.element=document.createElement("div"),this.element.className="speaker-notes",this.element.setAttribute("data-prevent-swipe",""),this.element.setAttribute("tabindex","0"),this.Reveal.getRevealElement().appendChild(this.element)}},{key:"configure",value:function(e,t){e.showNotes&&this.element.setAttribute("data-layout","string"==typeof e.showNotes?e.showNotes:"inline")}},{key:"update",value:function(){this.Reveal.getConfig().showNotes&&this.element&&this.Reveal.getCurrentSlide()&&!this.Reveal.print.isPrintingPDF()&&(this.element.innerHTML=this.getSlideNotes()||'<span class="notes-placeholder">No notes on this slide.</span>')}},{key:"updateVisibility",value:function(){this.Reveal.getConfig().showNotes&&this.hasNotes()&&!this.Reveal.print.isPrintingPDF()?this.Reveal.getRevealElement().classList.add("show-notes"):this.Reveal.getRevealElement().classList.remove("show-notes")}},{key:"hasNotes",value:function(){return this.Reveal.getSlidesElement().querySelectorAll("[data-notes], aside.notes").length>0}},{key:"isSpeakerNotesWindow",value:function(){return!!window.location.search.match(/receiver/gi)}},{key:"getSlideNotes",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.Reveal.getCurrentSlide();if(e.hasAttribute("data-notes"))return e.getAttribute("data-notes");var t=e.querySelector("aside.notes");return t?t.innerHTML:null}}]),e}(),Tf=A,Of=ct,Df=at,jf=Hs,Ff=_,zf=Dn("unscopables"),Hf=Array.prototype;null==Hf[zf]&&Ff.f(Hf,zf,{configurable:!0,value:jf(null)});var Uf=function(e){Hf[zf][e]=!0};$t({target:"Array",proto:!0},{fill:function(e){for(var t=Tf(this),n=Df(t.length),i=arguments.length,r=Of(i>1?arguments[1]:void 0,n),a=i>2?arguments[2]:void 0,o=void 0===a?n:Of(a,n);o>r;)t[r++]=e;return t}}),Uf("fill");var Bf=function(){function e(t,n){ki(this,e),this.diameter=100,this.diameter2=this.diameter/2,this.thickness=6,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=t,this.progressCheck=n,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.canvas.style.width=this.diameter2+"px",this.canvas.style.height=this.diameter2+"px",this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}return Ri(e,[{key:"setPlaying",value:function(e){var t=this.playing;this.playing=e,!t&&this.playing?this.animate():this.render()}},{key:"animate",value:function(){var e=this.progress;this.progress=this.progressCheck(),e>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&requestAnimationFrame(this.animate.bind(this))}},{key:"render",value:function(){var e=this.playing?this.progress:0,t=this.diameter2-this.thickness,n=this.diameter2,i=this.diameter2,r=28;this.progressOffset+=.1*(1-this.progressOffset);var a=-Math.PI/2+e*(2*Math.PI),o=-Math.PI/2+this.progressOffset*(2*Math.PI);this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(n,i,t+4,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(n,i,t,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="rgba( 255, 255, 255, 0.2 )",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(n,i,t,o,a,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(n-14,i-14),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,10,r),this.context.fillRect(18,0,10,r)):(this.context.beginPath(),this.context.translate(4,0),this.context.moveTo(0,0),this.context.lineTo(24,14),this.context.lineTo(0,r),this.context.fillStyle="#fff",this.context.fill()),this.context.restore()}},{key:"on",value:function(e,t){this.canvas.addEventListener(e,t,!1)}},{key:"off",value:function(e,t){this.canvas.removeEventListener(e,t,!1)}},{key:"destroy",value:function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)}}]),e}(),_f={width:960,height:700,margin:.04,minScale:.2,maxScale:2,controls:!0,controlsTutorial:!0,controlsLayout:"bottom-right",controlsBackArrows:"faded",progress:!0,slideNumber:!1,showSlideNumber:"all",hashOneBasedIndex:!1,hash:!1,respondToHashChanges:!0,history:!1,keyboard:!0,keyboardCondition:null,disableLayout:!1,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,navigationMode:"default",shuffle:!1,fragments:!0,fragmentInURL:!0,embedded:!1,help:!0,pause:!0,showNotes:!1,showHiddenSlides:!1,autoPlayMedia:null,preloadIframes:null,autoAnimate:!0,autoAnimateMatcher:null,autoAnimateEasing:"ease",autoAnimateDuration:1,autoAnimateUnmatched:!0,autoAnimateStyles:["opacity","color","background-color","padding","font-size","line-height","letter-spacing","border-width","border-color","border-radius","outline","outline-offset"],autoSlide:0,autoSlideStoppable:!0,autoSlideMethod:null,defaultTiming:null,mouseWheel:!1,previewLinks:!1,postMessage:!0,postMessageEvents:!1,focusBodyOnPageVisibilityChange:!0,transition:"slide",transitionSpeed:"default",backgroundTransition:"fade",parallaxBackgroundImage:"",parallaxBackgroundSize:"",parallaxBackgroundRepeat:"",parallaxBackgroundPosition:"",parallaxBackgroundHorizontal:null,parallaxBackgroundVertical:null,pdfMaxPagesPerSlide:Number.POSITIVE_INFINITY,pdfSeparateFragments:!0,pdfPageHeightOffset:-1,viewDistance:3,mobileViewDistance:2,display:"block",hideInactiveCursor:!0,hideCursorTime:5e3,dependencies:[],plugins:[]},qf="4.2.1";function Wf(e,t){arguments.length<2&&(t=arguments[0],e=document.querySelector(".reveal"));var n,i,r,a,o,s={},l={},c=!1,u={hasNavigatedHorizontally:!1,hasNavigatedVertically:!1},d=[],h=1,f={layout:"",overview:""},v={},g="idle",p=0,m=0,y=-1,b=!1,w=new Hh(s),S=new Uh(s),E=new df(s),k=new _h(s),A=new hf(s),R=new ff(s),x=new vf(s),L=new gf(s),P=new pf(s),C=new mf(s),N=new yf(s),I=new xf(s),M=new Lf(s),T=new If(s),O=new Pf(s),D=new Mf(s);function j(n){if(!e)throw'Unable to find presentation root (<div class="reveal">).';if(v.wrapper=e,v.slides=e.querySelector(".slides"),!v.slides)throw'Unable to find slides container (<div class="slides">).';return l=wi(wi(wi(wi(wi({},_f),l),t),n),xh()),F(),window.addEventListener("load",oe,!1),I.load(l.plugins,l.dependencies).then(z),new Promise((function(e){return s.on("ready",e)}))}function F(){!0===l.embedded?v.viewport=kh(e,".reveal-viewport")||e:(v.viewport=document.body,document.documentElement.classList.add("reveal-full-page")),v.viewport.classList.add("reveal-viewport")}function z(){c=!0,H(),U(),V(),W(),Ae(),K(),L.readURL(),k.update(!0),setTimeout((function(){v.slides.classList.remove("no-transition"),v.wrapper.classList.add("ready"),Q({type:"ready",data:{indexh:n,indexv:i,currentSlide:a}})}),1),M.isPrintingPDF()&&($(),"complete"===document.readyState?M.setupPDF():window.addEventListener("load",(function(){M.setupPDF()})))}function H(){l.showHiddenSlides||yh(v.wrapper,'section[data-visibility="hidden"]').forEach((function(e){e.parentNode.removeChild(e)}))}function U(){v.slides.classList.add("no-transition"),Mh?v.wrapper.classList.add("no-hover"):v.wrapper.classList.remove("no-hover"),k.render(),S.render(),P.render(),C.render(),D.render(),v.pauseOverlay=Ah(v.wrapper,"div","pause-overlay",l.controls?'<button class="resume-button">Resume presentation</button>':null),v.statusElement=B(),v.wrapper.setAttribute("role","application")}function B(){var e=v.wrapper.querySelector(".aria-status");return e||((e=document.createElement("div")).style.position="absolute",e.style.height="1px",e.style.width="1px",e.style.overflow="hidden",e.style.clip="rect( 1px, 1px, 1px, 1px )",e.classList.add("aria-status"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),v.wrapper.appendChild(e)),e}function _(e){v.statusElement.textContent=e}function q(e){var t="";if(3===e.nodeType)t+=e.textContent;else if(1===e.nodeType){var n=e.getAttribute("aria-hidden"),i="none"===window.getComputedStyle(e).display;"true"===n||i||Array.from(e.childNodes).forEach((function(e){t+=q(e)}))}return""===(t=t.trim())?"":t+" "}function W(){setInterval((function(){0===v.wrapper.scrollTop&&0===v.wrapper.scrollLeft||(v.wrapper.scrollTop=0,v.wrapper.scrollLeft=0)}),1e3)}function V(){l.postMessage&&window.addEventListener("message",(function(e){var t=e.data;if("string"==typeof t&&"{"===t.charAt(0)&&"}"===t.charAt(t.length-1)&&(t=JSON.parse(t)).method&&"function"==typeof s[t.method])if(!1===lf.test(t.method)){var n=s[t.method].apply(s,t.args);Z("callback",{method:t.method,result:n})}else console.warn('reveal.js: "'+t.method+'" is is blacklisted from the postMessage API')}),!1)}function K(e){var t=wi({},l);if("object"===Si(e)&&mh(l,e),!1!==s.isReady()){var n=v.wrapper.querySelectorAll(af).length;v.wrapper.classList.remove(t.transition),v.wrapper.classList.add(l.transition),v.wrapper.setAttribute("data-transition-speed",l.transitionSpeed),v.wrapper.setAttribute("data-background-transition",l.backgroundTransition),v.viewport.style.setProperty("--slide-width",l.width+"px"),v.viewport.style.setProperty("--slide-height",l.height+"px"),l.shuffle&&Re(),bh(v.wrapper,"embedded",l.embedded),bh(v.wrapper,"rtl",l.rtl),bh(v.wrapper,"center",l.center),!1===l.pause&&pe(),l.previewLinks?(ee(),te("[data-preview-link=false]")):(te(),ee("[data-preview-link]:not([data-preview-link=false])")),E.reset(),o&&(o.destroy(),o=null),n>1&&l.autoSlide&&l.autoSlideStoppable&&((o=new Bf(v.wrapper,(function(){return Math.min(Math.max((Date.now()-y)/p,0),1)}))).on("click",ot),b=!1),"default"!==l.navigationMode?v.wrapper.setAttribute("data-navigation-mode",l.navigationMode):v.wrapper.removeAttribute("data-navigation-mode"),D.configure(l,t),T.configure(l,t),N.configure(l,t),P.configure(l,t),C.configure(l,t),x.configure(l,t),A.configure(l,t),S.configure(l,t),Ee()}}function Y(){window.addEventListener("resize",it,!1),l.touch&&O.bind(),l.keyboard&&x.bind(),l.progress&&C.bind(),l.respondToHashChanges&&L.bind(),P.bind(),T.bind(),v.slides.addEventListener("click",nt,!1),v.slides.addEventListener("transitionend",tt,!1),v.pauseOverlay.addEventListener("click",pe,!1),l.focusBodyOnPageVisibilityChange&&document.addEventListener("visibilitychange",rt,!1)}function $(){O.unbind(),T.unbind(),x.unbind(),P.unbind(),C.unbind(),L.unbind(),window.removeEventListener("resize",it,!1),v.slides.removeEventListener("click",nt,!1),v.slides.removeEventListener("transitionend",tt,!1),v.pauseOverlay.removeEventListener("click",pe,!1)}function X(t,n,i){e.addEventListener(t,n,i)}function G(t,n,i){e.removeEventListener(t,n,i)}function J(e){"string"==typeof e.layout&&(f.layout=e.layout),"string"==typeof e.overview&&(f.overview=e.overview),f.layout?Sh(v.slides,f.layout+" "+f.overview):Sh(v.slides,f.overview)}function Q(e){var t=e.target,n=void 0===t?v.wrapper:t,i=e.type,r=e.data,a=e.bubbles,o=void 0===a||a,s=document.createEvent("HTMLEvents",1,2);return s.initEvent(i,o,!0),mh(s,r),n.dispatchEvent(s),n===v.wrapper&&Z(i),s}function Z(e,t){if(l.postMessageEvents&&window.parent!==window.self){var n={namespace:"reveal",eventName:e,state:_e()};mh(n,t),window.parent.postMessage(JSON.stringify(n),"*")}}function ee(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"a";Array.from(v.wrapper.querySelectorAll(e)).forEach((function(e){/^(http|www)/gi.test(e.getAttribute("href"))&&e.addEventListener("click",at,!1)}))}function te(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"a";Array.from(v.wrapper.querySelectorAll(e)).forEach((function(e){/^(http|www)/gi.test(e.getAttribute("href"))&&e.removeEventListener("click",at,!1)}))}function ne(e){ae(),v.overlay=document.createElement("div"),v.overlay.classList.add("overlay"),v.overlay.classList.add("overlay-preview"),v.wrapper.appendChild(v.overlay),v.overlay.innerHTML='<header>\n\t\t\t\t<a class="close" href="#"><span class="icon"></span></a>\n\t\t\t\t<a class="external" href="'.concat(e,'" target="_blank"><span class="icon"></span></a>\n\t\t\t</header>\n\t\t\t<div class="spinner"></div>\n\t\t\t<div class="viewport">\n\t\t\t\t<iframe src="').concat(e,'"></iframe>\n\t\t\t\t<small class="viewport-inner">\n\t\t\t\t\t<span class="x-frame-error">Unable to load iframe. This is likely due to the site\'s policy (x-frame-options).</span>\n\t\t\t\t</small>\n\t\t\t</div>'),v.overlay.querySelector("iframe").addEventListener("load",(function(e){v.overlay.classList.add("loaded")}),!1),v.overlay.querySelector(".close").addEventListener("click",(function(e){ae(),e.preventDefault()}),!1),v.overlay.querySelector(".external").addEventListener("click",(function(e){ae()}),!1)}function ie(e){"boolean"==typeof e?e?re():ae():v.overlay?ae():re()}function re(){if(l.help){ae(),v.overlay=document.createElement("div"),v.overlay.classList.add("overlay"),v.overlay.classList.add("overlay-help"),v.wrapper.appendChild(v.overlay);var e='<p class="title">Keyboard Shortcuts</p><br/>',t=x.getShortcuts(),n=x.getBindings();for(var i in e+="<table><th>KEY</th><th>ACTION</th>",t)e+="<tr><td>".concat(i,"</td><td>").concat(t[i],"</td></tr>");for(var r in n)n[r].key&&n[r].description&&(e+="<tr><td>".concat(n[r].key,"</td><td>").concat(n[r].description,"</td></tr>"));e+="</table>",v.overlay.innerHTML='\n\t\t\t\t<header>\n\t\t\t\t\t<a class="close" href="#"><span class="icon"></span></a>\n\t\t\t\t</header>\n\t\t\t\t<div class="viewport">\n\t\t\t\t\t<div class="viewport-inner">'.concat(e,"</div>\n\t\t\t\t</div>\n\t\t\t"),v.overlay.querySelector(".close").addEventListener("click",(function(e){ae(),e.preventDefault()}),!1)}}function ae(){return!!v.overlay&&(v.overlay.parentNode.removeChild(v.overlay),v.overlay=null,!0)}function oe(){if(v.wrapper&&!M.isPrintingPDF()){if(!l.disableLayout){Mh&&!l.embedded&&document.documentElement.style.setProperty("--vh",.01*window.innerHeight+"px");var e=le(),t=h;se(l.width,l.height),v.slides.style.width=e.width+"px",v.slides.style.height=e.height+"px",h=Math.min(e.presentationWidth/e.width,e.presentationHeight/e.height),h=Math.max(h,l.minScale),1===(h=Math.min(h,l.maxScale))?(v.slides.style.zoom="",v.slides.style.left="",v.slides.style.top="",v.slides.style.bottom="",v.slides.style.right="",J({layout:""})):h>1&&Dh&&window.devicePixelRatio<2?(v.slides.style.zoom=h,v.slides.style.left="",v.slides.style.top="",v.slides.style.bottom="",v.slides.style.right="",J({layout:""})):(v.slides.style.zoom="",v.slides.style.left="50%",v.slides.style.top="50%",v.slides.style.bottom="auto",v.slides.style.right="auto",J({layout:"translate(-50%, -50%) scale("+h+")"}));for(var n=Array.from(v.wrapper.querySelectorAll(af)),i=0,r=n.length;i<r;i++){var a=n[i];"none"!==a.style.display&&(l.center||a.classList.contains("center")?a.classList.contains("stack")?a.style.top=0:a.style.top=Math.max((e.height-a.scrollHeight)/2,0)+"px":a.style.top="")}t!==h&&Q({type:"resize",data:{oldScale:t,scale:h,size:e}})}C.update(),k.updateParallax(),R.isActive()&&R.update()}}function se(e,t){yh(v.slides,"section > .stretch, section > .r-stretch").forEach((function(n){var i=Lh(n,t);if(/(img|video)/gi.test(n.nodeName)){var r=n.naturalWidth||n.videoWidth,a=n.naturalHeight||n.videoHeight,o=Math.min(e/r,i/a);n.style.width=r*o+"px",n.style.height=a*o+"px"}else n.style.width=e+"px",n.style.height=i+"px"}))}function le(e,t){var n={width:l.width,height:l.height,presentationWidth:e||v.wrapper.offsetWidth,presentationHeight:t||v.wrapper.offsetHeight};return n.presentationWidth-=n.presentationWidth*l.margin,n.presentationHeight-=n.presentationHeight*l.margin,"string"==typeof n.width&&/%$/.test(n.width)&&(n.width=parseInt(n.width,10)/100*n.presentationWidth),"string"==typeof n.height&&/%$/.test(n.height)&&(n.height=parseInt(n.height,10)/100*n.presentationHeight),n}function ce(e,t){"object"===Si(e)&&"function"==typeof e.setAttribute&&e.setAttribute("data-previous-indexv",t||0)}function ue(e){if("object"===Si(e)&&"function"==typeof e.setAttribute&&e.classList.contains("stack")){var t=e.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(e.getAttribute(t)||0,10)}return 0}function de(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a;return e&&e.parentNode&&!!e.parentNode.nodeName.match(/section/i)}function he(){return!(!a||!de(a))&&!a.nextElementSibling}function fe(){return 0===n&&0===i}function ve(){return!!a&&(!a.nextElementSibling&&(!de(a)||!a.parentNode.nextElementSibling))}function ge(){if(l.pause){var e=v.wrapper.classList.contains("paused");Ve(),v.wrapper.classList.add("paused"),!1===e&&Q({type:"paused"})}}function pe(){var e=v.wrapper.classList.contains("paused");v.wrapper.classList.remove("paused"),We(),e&&Q({type:"resumed"})}function me(e){"boolean"==typeof e?e?ge():pe():ye()?pe():ge()}function ye(){return v.wrapper.classList.contains("paused")}function be(e){"boolean"==typeof e?e?Ye():Ke():b?Ye():Ke()}function we(){return!(!p||b)}function Se(e,t,o,s){if(!Q({type:"beforeslidechange",data:{indexh:void 0===e?n:e,indexv:void 0===t?i:t,origin:s}}).defaultPrevented){r=a;var c=v.wrapper.querySelectorAll(of);if(0!==c.length){void 0!==t||R.isActive()||(t=ue(c[e])),r&&r.parentNode&&r.parentNode.classList.contains("stack")&&ce(r.parentNode,i);var u=d.concat();d.length=0;var h=n||0,f=i||0;n=xe(of,void 0===e?n:e),i=xe(sf,void 0===t?i:t);var p=n!==h||i!==f;p||(r=null);var m=c[n],y=m.querySelectorAll("section");a=y[i]||m;var b=!1;p&&r&&a&&!R.isActive()&&(r.hasAttribute("data-auto-animate")&&a.hasAttribute("data-auto-animate")&&r.getAttribute("data-auto-animate-id")===a.getAttribute("data-auto-animate-id")&&!(n>h||i>f?a:r).hasAttribute("data-auto-animate-restart")&&(b=!0,v.slides.classList.add("disable-slide-transitions")),g="running"),Le(),oe(),R.isActive()&&R.update(),void 0!==o&&A.goto(o),r&&r!==a&&(r.classList.remove("present"),r.setAttribute("aria-hidden","true"),fe()&&setTimeout((function(){De().forEach((function(e){ce(e,0)}))}),0));e:for(var x=0,N=d.length;x<N;x++){for(var I=0;I<u.length;I++)if(u[I]===d[x]){u.splice(I,1);continue e}v.viewport.classList.add(d[x]),Q({type:d[x]})}for(;u.length;)v.viewport.classList.remove(u.pop());p&&Q({type:"slidechanged",data:{indexh:n,indexv:i,previousSlide:r,currentSlide:a,origin:s}}),!p&&r||(w.stopEmbeddedContent(r),w.startEmbeddedContent(a)),requestAnimationFrame((function(){_(q(a))})),C.update(),P.update(),D.update(),k.update(),k.updateParallax(),S.update(),A.update(),L.writeURL(),We(),b&&(setTimeout((function(){v.slides.classList.remove("disable-slide-transitions")}),0),l.autoAnimate&&E.run(r,a))}}}function Ee(){$(),Y(),oe(),p=l.autoSlide,We(),k.create(),L.writeURL(),A.sortAll(),P.update(),C.update(),Le(),D.update(),D.updateVisibility(),k.update(!0),S.update(),w.formatEmbeddedContent(),!1===l.autoPlayMedia?w.stopEmbeddedContent(a,{unloadIframes:!1}):w.startEmbeddedContent(a),R.isActive()&&R.layout()}function ke(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a;k.sync(e),A.sync(e),w.load(e),k.update(),D.update()}function Ae(){Te().forEach((function(e){yh(e,"section").forEach((function(e,t){t>0&&(e.classList.remove("present"),e.classList.remove("past"),e.classList.add("future"),e.setAttribute("aria-hidden","true"))}))}))}function Re(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Te();e.forEach((function(t,n){var i=e[Math.floor(Math.random()*e.length)];i.parentNode===t.parentNode&&t.parentNode.insertBefore(t,i);var r=t.querySelectorAll("section");r.length&&Re(r)}))}function xe(e,t){var n=yh(v.wrapper,e),i=n.length,r=M.isPrintingPDF();if(i){l.loop&&(t%=i)<0&&(t=i+t),t=Math.max(Math.min(t,i-1),0);for(var a=0;a<i;a++){var o=n[a],s=l.rtl&&!de(o);o.classList.remove("past"),o.classList.remove("present"),o.classList.remove("future"),o.setAttribute("hidden",""),o.setAttribute("aria-hidden","true"),o.querySelector("section")&&o.classList.add("stack"),r?o.classList.add("present"):a<t?(o.classList.add(s?"future":"past"),l.fragments&&yh(o,".fragment").forEach((function(e){e.classList.add("visible"),e.classList.remove("current-fragment")}))):a>t&&(o.classList.add(s?"past":"future"),l.fragments&&yh(o,".fragment.visible").forEach((function(e){e.classList.remove("visible","current-fragment")})))}var c=n[t],u=c.classList.contains("present");c.classList.add("present"),c.removeAttribute("hidden"),c.removeAttribute("aria-hidden"),u||Q({target:c,type:"visible",bubbles:!1});var h=c.getAttribute("data-state");h&&(d=d.concat(h.split(" ")))}else t=0;return t}function Le(){var e,t=Te(),r=t.length;if(r&&void 0!==n){var a=R.isActive()?10:l.viewDistance;Mh&&(a=R.isActive()?6:l.mobileViewDistance),M.isPrintingPDF()&&(a=Number.MAX_VALUE);for(var o=0;o<r;o++){var s=t[o],c=yh(s,"section"),u=c.length;if(e=Math.abs((n||0)-o)||0,l.loop&&(e=Math.abs(((n||0)-o)%(r-a))||0),e<a?w.load(s):w.unload(s),u)for(var d=ue(s),h=0;h<u;h++){var f=c[h];e+(o===(n||0)?Math.abs((i||0)-h):Math.abs(h-d))<a?w.load(f):w.unload(f)}}Fe()?v.wrapper.classList.add("has-vertical-slides"):v.wrapper.classList.remove("has-vertical-slides"),je()?v.wrapper.classList.add("has-horizontal-slides"):v.wrapper.classList.remove("has-horizontal-slides")}}function Pe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.includeFragments,r=void 0!==t&&t,a=v.wrapper.querySelectorAll(of),o=v.wrapper.querySelectorAll(sf),s={left:n>0,right:n<a.length-1,up:i>0,down:i<o.length-1};if(l.loop&&(a.length>1&&(s.left=!0,s.right=!0),o.length>1&&(s.up=!0,s.down=!0)),a.length>1&&"linear"===l.navigationMode&&(s.right=s.right||s.down,s.left=s.left||s.up),!0===r){var c=A.availableRoutes();s.left=s.left||c.prev,s.up=s.up||c.prev,s.down=s.down||c.next,s.right=s.right||c.next}if(l.rtl){var u=s.left;s.left=s.right,s.right=u}return s}function Ce(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,t=Te(),n=0;e:for(var i=0;i<t.length;i++){for(var r=t[i],o=r.querySelectorAll("section"),s=0;s<o.length;s++){if(o[s]===e)break e;"uncounted"!==o[s].dataset.visibility&&n++}if(r===e)break;!1===r.classList.contains("stack")&&"uncounted"!==r.dataset.visibility&&n++}return n}function Ne(){var e=He(),t=Ce();if(a){var n=a.querySelectorAll(".fragment");if(n.length>0){t+=a.querySelectorAll(".fragment.visible").length/n.length*.9}}return Math.min(t/(e-1),1)}function Ie(e){var t,r=n,o=i;if(e){var s=de(e),l=s?e.parentNode:e,c=Te();r=Math.max(c.indexOf(l),0),o=void 0,s&&(o=Math.max(yh(e.parentNode,"section").indexOf(e),0))}if(!e&&a&&a.querySelectorAll(".fragment").length>0){var u=a.querySelector(".current-fragment");t=u&&u.hasAttribute("data-fragment-index")?parseInt(u.getAttribute("data-fragment-index"),10):a.querySelectorAll(".fragment.visible").length-1}return{h:r,v:o,f:t}}function Me(){return yh(v.wrapper,'.slides section:not(.stack):not([data-visibility="uncounted"])')}function Te(){return yh(v.wrapper,of)}function Oe(){return yh(v.wrapper,".slides>section>section")}function De(){return yh(v.wrapper,".slides>section.stack")}function je(){return Te().length>1}function Fe(){return Oe().length>1}function ze(){return Me().map((function(e){for(var t={},n=0;n<e.attributes.length;n++){var i=e.attributes[n];t[i.name]=i.value}return t}))}function He(){return Me().length}function Ue(e,t){var n=Te()[e],i=n&&n.querySelectorAll("section");return i&&i.length&&"number"==typeof t?i?i[t]:void 0:n}function Be(e,t){var n="number"==typeof e?Ue(e,t):e;if(n)return n.slideBackgroundElement}function _e(){var e=Ie();return{indexh:e.h,indexv:e.v,indexf:e.f,paused:ye(),overview:R.isActive()}}function qe(e){if("object"===Si(e)){Se(wh(e.indexh),wh(e.indexv),wh(e.indexf));var t=wh(e.paused),n=wh(e.overview);"boolean"==typeof t&&t!==ye()&&me(t),"boolean"==typeof n&&n!==R.isActive()&&R.toggle(n)}}function We(){if(Ve(),a&&!1!==l.autoSlide){var e=a.querySelector(".current-fragment");e||(e=a.querySelector(".fragment"));var t=e?e.getAttribute("data-autoslide"):null,n=a.parentNode?a.parentNode.getAttribute("data-autoslide"):null,i=a.getAttribute("data-autoslide");t?p=parseInt(t,10):i?p=parseInt(i,10):n?p=parseInt(n,10):(p=l.autoSlide,0===a.querySelectorAll(".fragment").length&&yh(a,"video, audio").forEach((function(e){e.hasAttribute("data-autoplay")&&p&&1e3*e.duration/e.playbackRate>p&&(p=1e3*e.duration/e.playbackRate+1e3)}))),!p||b||ye()||R.isActive()||ve()&&!A.availableRoutes().next&&!0!==l.loop||(m=setTimeout((function(){"function"==typeof l.autoSlideMethod?l.autoSlideMethod():Ze(),We()}),p),y=Date.now()),o&&o.setPlaying(-1!==m)}}function Ve(){clearTimeout(m),m=-1}function Ke(){p&&!b&&(b=!0,Q({type:"autoslidepaused"}),clearTimeout(m),o&&o.setPlaying(!1))}function Ye(){p&&b&&(b=!1,Q({type:"autoslideresumed"}),We())}function $e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.skipFragments,r=void 0!==t&&t;u.hasNavigatedHorizontally=!0,l.rtl?(R.isActive()||r||!1===A.next())&&Pe().left&&Se(n+1,"grid"===l.navigationMode?i:void 0):(R.isActive()||r||!1===A.prev())&&Pe().left&&Se(n-1,"grid"===l.navigationMode?i:void 0)}function Xe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.skipFragments,r=void 0!==t&&t;u.hasNavigatedHorizontally=!0,l.rtl?(R.isActive()||r||!1===A.prev())&&Pe().right&&Se(n-1,"grid"===l.navigationMode?i:void 0):(R.isActive()||r||!1===A.next())&&Pe().right&&Se(n+1,"grid"===l.navigationMode?i:void 0)}function Ge(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.skipFragments,r=void 0!==t&&t;(R.isActive()||r||!1===A.prev())&&Pe().up&&Se(n,i-1)}function Je(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.skipFragments,r=void 0!==t&&t;u.hasNavigatedVertically=!0,(R.isActive()||r||!1===A.next())&&Pe().down&&Se(n,i+1)}function Qe(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.skipFragments,r=void 0!==i&&i;if(r||!1===A.prev())if(Pe().up)Ge({skipFragments:r});else if((e=l.rtl?yh(v.wrapper,".slides>section.future").pop():yh(v.wrapper,".slides>section.past").pop())&&e.classList.contains("stack")){var a=e.querySelectorAll("section").length-1||void 0,o=n-1;Se(o,a)}else $e({skipFragments:r})}function Ze(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.skipFragments,n=void 0!==t&&t;if(u.hasNavigatedHorizontally=!0,u.hasNavigatedVertically=!0,n||!1===A.next()){var i=Pe();i.down&&i.right&&l.loop&&he()&&(i.down=!1),i.down?Je({skipFragments:n}):l.rtl?$e({skipFragments:n}):Xe({skipFragments:n})}}function et(e){l.autoSlideStoppable&&Ke()}function tt(e){"running"===g&&/section/gi.test(e.target.nodeName)&&(g="idle",Q({type:"slidetransitionend",data:{indexh:n,indexv:i,previousSlide:r,currentSlide:a}}))}function nt(e){var t=kh(e.target,'a[href^="#"]');if(t){var n=t.getAttribute("href"),i=L.getIndicesFromHash(n);i&&(s.slide(i.h,i.v,i.f),e.preventDefault())}}function it(e){oe()}function rt(e){!1===document.hidden&&document.activeElement!==document.body&&("function"==typeof document.activeElement.blur&&document.activeElement.blur(),document.body.focus())}function at(e){if(e.currentTarget&&e.currentTarget.hasAttribute("href")){var t=e.currentTarget.getAttribute("href");t&&(ne(t),e.preventDefault())}}function ot(e){ve()&&!1===l.loop?(Se(0,0),Ye()):b?Ye():Ke()}var st={VERSION:qf,initialize:j,configure:K,sync:Ee,syncSlide:ke,syncFragments:A.sync.bind(A),slide:Se,left:$e,right:Xe,up:Ge,down:Je,prev:Qe,next:Ze,navigateLeft:$e,navigateRight:Xe,navigateUp:Ge,navigateDown:Je,navigatePrev:Qe,navigateNext:Ze,navigateFragment:A.goto.bind(A),prevFragment:A.prev.bind(A),nextFragment:A.next.bind(A),on:X,off:G,addEventListener:X,removeEventListener:G,layout:oe,shuffle:Re,availableRoutes:Pe,availableFragments:A.availableRoutes.bind(A),toggleHelp:ie,toggleOverview:R.toggle.bind(R),togglePause:me,toggleAutoSlide:be,isFirstSlide:fe,isLastSlide:ve,isLastVerticalSlide:he,isVerticalSlide:de,isPaused:ye,isAutoSliding:we,isSpeakerNotes:D.isSpeakerNotesWindow.bind(D),isOverview:R.isActive.bind(R),isFocused:T.isFocused.bind(T),isPrintingPDF:M.isPrintingPDF.bind(M),isReady:function(){return c},loadSlide:w.load.bind(w),unloadSlide:w.unload.bind(w),showPreview:ne,hidePreview:ae,addEventListeners:Y,removeEventListeners:$,dispatchEvent:Q,getState:_e,setState:qe,getProgress:Ne,getIndices:Ie,getSlidesAttributes:ze,getSlidePastCount:Ce,getTotalSlides:He,getSlide:Ue,getPreviousSlide:function(){return r},getCurrentSlide:function(){return a},getSlideBackground:Be,getSlideNotes:D.getSlideNotes.bind(D),getSlides:Me,getHorizontalSlides:Te,getVerticalSlides:Oe,hasHorizontalSlides:je,hasVerticalSlides:Fe,hasNavigatedHorizontally:function(){return u.hasNavigatedHorizontally},hasNavigatedVertically:function(){return u.hasNavigatedVertically},addKeyBinding:x.addKeyBinding.bind(x),removeKeyBinding:x.removeKeyBinding.bind(x),triggerKey:x.triggerKey.bind(x),registerKeyboardShortcut:x.registerKeyboardShortcut.bind(x),getComputedSlideSize:le,getScale:function(){return h},getConfig:function(){return l},getQueryHash:xh,getRevealElement:function(){return e},getSlidesElement:function(){return v.slides},getViewportElement:function(){return v.viewport},getBackgroundsElement:function(){return k.element},registerPlugin:I.registerPlugin.bind(I),hasPlugin:I.hasPlugin.bind(I),getPlugin:I.getPlugin.bind(I),getPlugins:I.getRegisteredPlugins.bind(I)};return mh(s,wi(wi({},st),{},{announceStatus:_,getStatusText:q,print:M,focus:T,progress:C,controls:P,location:L,overview:R,fragments:A,slideContent:w,slideNumber:S,onUserInput:et,closeOverlay:ae,updateSlidesVisibility:Le,layoutSlideContents:se,transformSlides:J,cueAutoSlide:We,cancelAutoSlide:Ve})),st}var Vf=Wf,Kf=[];return Vf.initialize=function(e){return Object.assign(Vf,new Wf(document.querySelector(".reveal"),e)),Kf.map((function(e){return e(Vf)})),Vf.initialize()},["configure","on","off","addEventListener","removeEventListener","registerPlugin"].forEach((function(e){Vf[e]=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];Kf.push((function(t){var i;return(i=t[e]).call.apply(i,[null].concat(n))}))}})),Vf.isReady=function(){return!1},Vf.VERSION=qf,Vf}));
//# sourceMappingURL=reveal.js.map
