UNPKG

@arcblock/abtnode-docs

Version:

ABT Node Documentation, a help documentation for quickly get started with ABT Node.

2 lines 41 kB
(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{"8jAD":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.InlineIcon=t.Icon=void 0;var o,r=(o=n("q1tI"))&&o.__esModule?o:{default:o};function a(e){return(a="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 i(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var l=0,s=/(-?[0-9.]*[0-9]+[0-9.]*)/g,u=/^-?[0-9.]*[0-9]+[0-9.]*$/g,c=["width","height","inline","hFlip","vFlip","flip","rotate","align","color","box"],d={left:0,top:0,width:16,height:16,rotate:0,hFlip:!1,vFlip:!1};var h=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._item=t}var t,n,o;return t=e,o=[{key:"splitAttributes",value:function(e){var t={icon:Object.create(null),node:Object.create(null)};return Object.keys(e).forEach((function(n){t[-1===c.indexOf(n)?"node":"icon"][n]=e[n]})),t}},{key:"calculateDimension",value:function(e,t,n){if(1===t)return e;if(n=void 0===n?100:n,"number"==typeof e)return Math.ceil(e*t*n)/n;var o=e.split(s);if(null===o||!o.length)return null;for(var r,a=[],i=o.shift(),l=u.test(i);;){if(l?(r=parseFloat(i),isNaN(r)?a.push(i):a.push(Math.ceil(r*t*n)/n)):a.push(i),void 0===(i=o.shift()))return a.join("");l=!l}}},{key:"replaceIDs",value:function(e){var t,n,o=/\sid="(\S+)"/g,r=[];function a(e,t,n){for(var o=0;-1!==(o=n.indexOf(e,o));)n=n.slice(0,o)+t+n.slice(o+e.length),o+=t.length;return n}for(;t=o.exec(e);)r.push(t[1]);return r.length?(n="IconifyId-"+Date.now().toString(16)+"-"+(16777216*Math.random()|0).toString(16)+"-",r.forEach((function(t){var o=n+l;l++,e=a('="'+t+'"','="'+o+'"',e),e=a('="#'+t+'"','="#'+o+'"',e),e=a("(#"+t+")","(#"+o+")",e)})),e):e}}],(n=[{key:"getAttributes",value:function(t){var n=this._item;"object"!==a(t)&&(t=Object.create(null));var o={horizontal:"center",vertical:"middle",slice:!1},r={rotate:n.rotate,hFlip:n.hFlip,vFlip:n.vFlip},i=Object.create(null),l=Object.create(null),s=!0===t.inline||"true"===t.inline||"1"===t.inline,u={left:n.left,top:s?n.inlineTop:n.top,width:n.width,height:s?n.inlineHeight:n.height};if(["hFlip","vFlip"].forEach((function(e){void 0===t[e]||!0!==t[e]&&"true"!==t[e]&&"1"!==t[e]||(r[e]=!r[e])})),void 0!==t.flip&&t.flip.toLowerCase().split(/[\s,]+/).forEach((function(e){switch(e){case"horizontal":r.hFlip=!r.hFlip;break;case"vertical":r.vFlip=!r.vFlip}})),void 0!==t.rotate){var c=t.rotate;if("number"==typeof c)r.rotate+=c;else if("string"==typeof c){var d=c.replace(/^-?[0-9.]*/,"");if(""===d)c=parseInt(c),isNaN(c)||(r.rotate+=c);else if(d!==c){var h=!1;switch(d){case"%":h=25;break;case"deg":h=90}h&&(c=parseInt(c.slice(0,c.length-d.length)),isNaN(c)||(r.rotate+=Math.round(c/h)))}}}var p,f=[];switch(r.hFlip?r.vFlip?r.rotate+=2:(f.push("translate("+(u.width+u.left)+" "+(0-u.top)+")"),f.push("scale(-1 1)"),u.top=u.left=0):r.vFlip&&(f.push("translate("+(0-u.left)+" "+(u.height+u.top)+")"),f.push("scale(1 -1)"),u.top=u.left=0),r.rotate%4){case 1:p=u.height/2+u.top,f.unshift("rotate(90 "+p+" "+p+")"),0===u.left&&0===u.top||(p=u.left,u.left=u.top,u.top=p),u.width!==u.height&&(p=u.width,u.width=u.height,u.height=p);break;case 2:f.unshift("rotate(180 "+(u.width/2+u.left)+" "+(u.height/2+u.top)+")");break;case 3:p=u.width/2+u.left,f.unshift("rotate(-90 "+p+" "+p+")"),0===u.left&&0===u.top||(p=u.left,u.left=u.top,u.top=p),u.width!==u.height&&(p=u.width,u.width=u.height,u.height=p)}var m,v,g=t.width?t.width:null,w=t.height?t.height:null;null===g&&null===w&&(w="1em"),null!==g&&null!==w?(m=g,v=w):null!==g?(m=g,v=e.calculateDimension(m,u.height/u.width)):(v=w,m=e.calculateDimension(v,u.width/u.height)),!1!==m&&(l.width="auto"===m?u.width:m),!1!==v&&(l.height="auto"===v?u.height:v),s&&0!==n.verticalAlign&&(i["vertical-align"]=n.verticalAlign+"em"),void 0!==t.align&&t.align.toLowerCase().split(/[\s,]+/).forEach((function(e){switch(e){case"left":case"right":case"center":o.horizontal=e;break;case"top":case"bottom":case"middle":o.vertical=e;break;case"crop":o.slice=!0;break;case"meet":o.slice=!1}})),l.preserveAspectRatio=function(e){var t;switch(e.horizontal){case"left":t="xMin";break;case"right":t="xMax";break;default:t="xMid"}switch(e.vertical){case"top":t+="YMin";break;case"bottom":t+="YMax";break;default:t+="YMid"}return t+=e.slice?" slice":" meet"}(o),l.viewBox=u.left+" "+u.top+" "+u.width+" "+u.height;var b=e.replaceIDs(n.body);return void 0!==t.color&&(b=b.replace(/currentColor/g,t.color)),f.length&&(b='<g transform="'+f.join(" ")+'">'+b+"</g>"),!0!==t.box&&"true"!==t.box&&"1"!==t.box||(b+='<rect x="'+u.left+'" y="'+u.top+'" width="'+u.width+'" height="'+u.height+'" fill="rgba(0, 0, 0, 0)" />'),{attributes:l,body:b,style:i}}},{key:"getSVG",value:function(t,n){var o=e.splitAttributes(t),r=this.getAttributes(o.icon),a='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"';return n&&Object.keys(o.node).forEach((function(e){a+=" "+e+'="'+o.node[e]+'"'})),Object.keys(r.attributes).forEach((function(e){a+=" "+e+'="'+r.attributes[e]+'"'})),a+=' style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);',Object.keys(r.style).forEach((function(e){a+=" "+e+": "+r.style[e]+";"})),t&&void 0!==t.style&&(a+=t.style),a+='">',a+=r.body+"</svg>"}}])&&i(t.prototype,n),o&&i(t,o),e}();function p(e,t){if("object"!==a(e.icon))return null;var n=h.splitAttributes(e),o=n.icon,i=n.node;delete i.icon,void 0===o.inline&&(o.inline=t);var l=new h(function(e){var t,n=Object.create(null);for(t in d)n[t]=d[t];for(t in e)n[t]=e[t];return void 0===n.inlineTop&&(n.inlineTop=n.top),void 0===n.inlineHeight&&(n.inlineHeight=n.height),void 0===n.verticalAlign&&(n.verticalAlign=n.height%7==0&&n.height%8!=0?-.143:-.125),n}(e.icon)).getAttributes(o),s={transform:"rotate(360deg)"};if(void 0!==l.style["vertical-align"]&&(s.verticalAlign=l.style["vertical-align"]),void 0!==e.style)for(var u in e.style)s[u]=e.style[u];var c,p={xmlns:"http://www.w3.org/2000/svg",focusable:!1,style:s};for(c in i)p[c]=i[c];for(c in l.attributes)p[c]=l.attributes[c];return p.dangerouslySetInnerHTML={__html:l.body},r.default.createElement("svg",p,null)}var f=function(e){return p(e,!1)};t.Icon=f;t.InlineIcon=function(e){return p(e,!0)};var m=f;t.default=m},"9mE6":function(e,t){t.__esModule=!0,t.default={body:'<path d="M10 16.5v-9l6 4.5M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2z" fill="currentColor"/>',width:24,height:24}},E3hX:function(e,t,n){"use strict";var o=n("TqRt");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n("q1tI")),a=(0,o(n("8/g6")).default)(r.default.createElement("path",{d:"M5.88 4.12L13.76 12l-7.88 7.88L8 22l10-10L8 2z"}),"ArrowForwardIos");t.default=a},EBAg:function(e,t,n){},GtMS:function(e,t){t.__esModule=!0,t.default={body:'<path d="M11.5 12l8.5 6V6m-9 12V6l-8.5 6l8.5 6z" fill="currentColor"/>',width:24,height:24}},JlcV:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("i0/C"),r=n("q1tI"),a=o.__importDefault(n("bdgK"));t.default=function(){var e=r.useState({x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0}),t=e[0],n=e[1],o=r.useState((function(){return new a.default((function(e){var t=e[0];t&&n(t.contentRect)}))}))[0];return[r.useCallback((function(e){o.disconnect(),e&&o.observe(e)}),[o]),t]}},OHh6:function(e,t){t.__esModule=!0,t.default={body:'<path d="M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.84-5 6.7v2.07c4-.91 7-4.49 7-8.77c0-4.28-3-7.86-7-8.77M16.5 12c0-1.77-1-3.29-2.5-4.03V16c1.5-.71 2.5-2.24 2.5-4M3 9v6h4l5 5V4L7 9H3z" fill="currentColor"/>',width:24,height:24}},WEVi:function(e,t){t.__esModule=!0,t.default={body:'<path d="M3 9h4l5-5v16l-5-5H3V9m13.59 3L14 9.41L15.41 8L18 10.59L20.59 8L22 9.41L19.41 12L22 14.59L20.59 16L18 13.41L15.41 16L14 14.59L16.59 12z" fill="currentColor"/>',width:24,height:24}},Ynen:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o={fullscreenEnabled:0,fullscreenElement:1,requestFullscreen:2,exitFullscreen:3,fullscreenchange:4,fullscreenerror:5,fullscreen:6},r=["webkitFullscreenEnabled","webkitFullscreenElement","webkitRequestFullscreen","webkitExitFullscreen","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],a=["mozFullScreenEnabled","mozFullScreenElement","mozRequestFullScreen","mozCancelFullScreen","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],i=["msFullscreenEnabled","msFullscreenElement","msRequestFullscreen","msExitFullscreen","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"],l="undefined"!=typeof window&&void 0!==window.document?window.document:{},s="fullscreenEnabled"in l&&Object.keys(o)||r[0]in l&&r||a[0]in l&&a||i[0]in l&&i||[];t.default={requestFullscreen:function(e){return e[s[o.requestFullscreen]]()},requestFullscreenFunction:function(e){return e[s[o.requestFullscreen]]},get exitFullscreen(){return l[s[o.exitFullscreen]].bind(l)},get fullscreenPseudoClass(){return":"+s[o.fullscreen]},addEventListener:function(e,t,n){return l.addEventListener(s[o[e]],t,n)},removeEventListener:function(e,t,n){return l.removeEventListener(s[o[e]],t,n)},get fullscreenEnabled(){return Boolean(l[s[o.fullscreenEnabled]])},set fullscreenEnabled(e){},get fullscreenElement(){return l[s[o.fullscreenElement]]},set fullscreenElement(e){},get onfullscreenchange(){return l[("on"+s[o.fullscreenchange]).toLowerCase()]},set onfullscreenchange(e){return l[("on"+s[o.fullscreenchange]).toLowerCase()]=e},get onfullscreenerror(){return l[("on"+s[o.fullscreenerror]).toLowerCase()]},set onfullscreenerror(e){return l[("on"+s[o.fullscreenerror]).toLowerCase()]=e}}},anHE:function(e,t,n){"use strict";var o=n("TqRt");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n("q1tI")),a=(0,o(n("8/g6")).default)(r.default.createElement("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"}),"FullscreenExit");t.default=a},gLOz:function(e,t,n){"use strict";var o=n("TqRt");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n("q1tI")),a=(0,o(n("8/g6")).default)(r.default.createElement("path",{d:"M11.67 3.87L9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z"}),"ArrowBackIos");t.default=a},gb7j:function(e,t,n){var o=n("g4R6"),r=n("zoYe"),a=n("Sxd8"),i=n("dt0z");e.exports=function(e,t,n){e=i(e),t=r(t);var l=e.length,s=n=void 0===n?l:o(a(n),0,l);return(n-=t.length)>=0&&e.slice(n,s)==t}},gfl7:function(e,t){t.__esModule=!0,t.default={body:'<path d="M2 5.27L3.28 4L20 20.72L18.73 22l-3-3H7v3l-4-4l4-4v3h6.73L7 10.27V11H5V8.27l-3-3M17 13h2v4.18l-2-2V13m0-8V2l4 4l-4 4V7H8.82l-2-2H17z" fill="currentColor"/>',width:24,height:24}},hVMy:function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return Pe}));var o=n("q1tI"),r=n.n(o),a=n("Wbzz"),i=n("gb7j"),l=n.n(i),s=n("vOnD"),u=n("JlcV"),c=n.n(u),d=n("vlII"),h=n.n(d),p=n("pW3x"),f=n.n(p),m=n("668i"),v=n("PsDL"),g=n("E3hX"),w=n.n(g),b=n("gLOz"),E=n.n(b),y=n("jOUs"),M=n.n(y),P=n("anHE"),C=n.n(P),L=n("tE8B"),k=n.n(L),T=n("Ntlj"),_=n("xweI"),A=n.n(_),x=function(e){return e.properties&&Array.isArray(e.properties.className)&&e.properties.className.indexOf("slide")>-1},S=[37,38,33,72,75],O=[39,40,34,74,76];function V(e){var t=e.hast,n=e.controlled,a=e.selected,i=e.onPlay,l=e.changeLocationHash,s=t.children.filter(x),u=s.length,d=f()(),p=d.width,g=d.height,b=c()(),y=b[0],P=b[1].width,L=Object(o.useState)(0),_=L[0],A=L[1],V=h()(!1),D=V[0],N=V[1],I=h()(!1),j=I[0],z=I[1],U=Object(o.useState)()[1];Object(o.useEffect)((function(){if(s[_]&&l&&(window.location.hash=s[_].properties.id),!n){var e=function(e){j&&(S.indexOf(e.which)>=0&&(e.preventDefault(),A(_-1>=0?_-1:0)),O.indexOf(e.which)>=0&&(e.preventDefault(),A(_+1<u?_+1:0)))};return document.addEventListener("keydown",e),window.addEventListener("resize",U),function(){document.removeEventListener("keydown",e),window.removeEventListener("resize",U)}}})),Object(o.useEffect)((function(){"function"==typeof i&&i({current:_,total:u})}),[_]),Object(o.useEffect)((function(){a>=0&&a<u&&a!==_&&A(a)}),[a]);var q=_/(u-1)*100,B=Object(T.a)(function(e,t){return e.children.filter(x).forEach((function(e,n){if(e.properties||(e.properties={}),e.properties.className||(e.properties.className=[]),n===t)-1===e.properties.className.indexOf("active")&&e.properties.className.push("active");else{var o=e.properties.className.indexOf("active");o>-1&&e.properties.className.splice(o,1)}})),e}(t,_)),H=p/g,W=D?p:P,R=W>1280?1280:W,J=0;J=R<=1280?R/(16/9):R/(H>1?Math.min(16/9,H):Math.max(16/9,H));var X=1,Y=0;D&&(Y=(g-J)/2,X=H>16/9?g/J:p/R);var G=".shower { --slide-width: "+R+"px; }";return r.a.createElement(k.a,{enabled:D,onChange:function(e){return N(e)}},r.a.createElement(m.a,{onClickAway:function(){return z(!1)}},r.a.createElement(F,{ref:y,fullscreen:D,controlled:n,height:J,onClick:function(){return z(!0)},style:{marginTop:Y,transform:"scale("+X+")"}},r.a.createElement("div",{className:"presentation-wrapper"},r.a.createElement("div",{className:"shower full"},B.props.children,r.a.createElement("style",{scoped:!0,dangerouslySetInnerHTML:{__html:G}}),!n&&r.a.createElement("div",{className:"progress",role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":q,"aria-valuetext":"Slideshow Progress: "+q,style:{width:q+"%"}})),!n&&r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{className:"controls",style:{width:R}},r.a.createElement("div",{className:"controls-group"},r.a.createElement(v.a,{className:"control-button",onClick:function(){return A(_-1)},disabled:0===_},r.a.createElement(E.a,{className:"control-icon control-prev",fontSize:"small"})),r.a.createElement(v.a,{className:"control-button",onClick:function(){return A(_+1)},disabled:_===u-1},r.a.createElement(w.a,{className:"control-icon control-prev",fontSize:"small"}))),r.a.createElement("div",{className:"controls-group"},r.a.createElement(v.a,{className:"control-button",onClick:function(){return N()},disabled:_===u-1},D?r.a.createElement(C.a,{className:"control-icon control-exit",fontSize:"medium"}):r.a.createElement(M.a,{className:"control-icon control-full",fontSize:"medium"})))))))))}V.defaultProps={changeLocationHash:!1,controlled:!1,selected:-1,onPlay:function(){}};var F=s.default.div.withConfig({displayName:"deck__Div",componentId:"sc-1anoifs-0"})(["width:100%;height:","px;margin-bottom:","px;.presentation-wrapper{position:relative;height:","px;.shower{"," box-shadow:0 0 3px 0 rgba(0,0,0,0.2);.slide.shout h2{padding:0;margin:0;position:absolute;border:none;top:50%;left:0;width:100%;text-align:center;line-height:1;font-size:60px;-webkit-transform:translateY(-50%);transform:translateY(-50%);}.slide.shout.small h2{font-size:36px;}.slide .highlight pre,.slide pre{background-color:#222;font-size:14px;}.slide{.gatsby-resp-image-background-image{display:none !important;}.gatsby-resp-image-image{width:auto !important;height:auto !important;max-height:calc(var(--slide-height) * 0.8) !important;max-width:calc(var(--slide-width) - 128px) !important;}}}.controls{background:#fff;position:absolute;right:0;bottom:-60px;left:0;z-index:4;display:flex;justify-content:space-between;align-items:center;padding:0 10px 0 10px;height:60px;width:100%;"," box-shadow:0 0 3px 0 rgba(0,0,0,0.2);.control-icon{}.control-group{height:60px;}}}"],(function(e){return e.height}),(function(e){return e.controlled?0:84}),(function(e){return e.height}),(function(e){return e.fullscreen?"":"border-radius: 6px 6px 0 0;"}),(function(e){return e.fullscreen?"":"border-radius: 0 0 6px 6px;"})),D=n("zLVn"),N=n("PJYZ"),I=n.n(N),j=n("VbXa"),z=n.n(j),U=n("lSNA"),q=n.n(U),B=n("8jAD"),H=n("9mE6"),W=n.n(H),R=n("zqQw"),J=n.n(R),X=n("sCTh"),Y=n.n(X),G=n("qJpP"),K=n.n(G),Q=n("oJqr"),Z=n.n(Q),$=n("GtMS"),ee=n.n($),te=n("OHh6"),ne=n.n(te),oe=n("WEVi"),re=n.n(oe),ae=n("sRb4"),ie=n.n(ae),le=n("gfl7"),se=n.n(le),ue=function(e){return e instanceof MouseEvent?e.pageX||e.clientX:e.touches[0].pageX||e.touches[0].clientX},ce=function(e){return e>9?e.toString():"0"+e},de=function(e){return isFinite(e)?ce(Math.floor(e/60))+":"+ce(Math.floor(e%60)):"00:00"};function he(e,t){var n=!1;return function(o){n||(e(o),n=!0,setTimeout((function(){return n=!1}),t))}}var pe=function(e){function t(){for(var t,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return t=e.call.apply(e,[this].concat(o))||this,q()(I()(t),"audio",void 0),q()(I()(t),"timeOnMouseMove",0),q()(I()(t),"hasAddedAudioEventListener",!1),q()(I()(t),"downloadProgressAnimationTimer",void 0),q()(I()(t),"progressBarEl",void 0),q()(I()(t),"state",{isDraggingProgress:!1,currentTimePos:"0%",hasDownloadProgressAnimation:!1,downloadProgressArr:[]}),q()(I()(t),"getCurrentProgress",(function(e){var n=t.props.audio;if(!n.src||!isFinite(n.currentTime)||!t.progressBarEl)return{currentTime:0,currentTimePos:"0%"};var o=t.progressBarEl.getBoundingClientRect(),r=o.width,a=ue(e)-o.left;return a<0?a=0:a>r&&(a=r),{currentTime:t.props.audio.duration*a/r,currentTimePos:(a/r*100).toFixed(2)+"%"}})),q()(I()(t),"handleMouseDownProgressBar",(function(e){e.stopPropagation();var n=t.getCurrentProgress(e.nativeEvent),o=n.currentTime,r=n.currentTimePos;isFinite(o)&&(t.timeOnMouseMove=o,t.setState({isDraggingProgress:!0,currentTimePos:r}),e.nativeEvent instanceof MouseEvent?(window.addEventListener("mousemove",t.handleWindowMouseOrTouchMove),window.addEventListener("mouseup",t.handleWindowMouseOrTouchUp)):(window.addEventListener("touchmove",t.handleWindowMouseOrTouchMove),window.addEventListener("touchend",t.handleWindowMouseOrTouchUp)))})),q()(I()(t),"handleWindowMouseOrTouchMove",(function(e){e.preventDefault(),e.stopPropagation();var n=window.getSelection();if(n&&"Range"===n.type&&n.empty(),t.state.isDraggingProgress){var o=t.getCurrentProgress(e),r=o.currentTime,a=o.currentTimePos;t.timeOnMouseMove=r,t.setState({currentTimePos:a})}})),q()(I()(t),"handleWindowMouseOrTouchUp",(function(e){e.stopPropagation(),t.setState((function(e){return e.isDraggingProgress&&isFinite(t.timeOnMouseMove)&&(t.props.audio.currentTime=t.timeOnMouseMove),{isDraggingProgress:!1}})),e instanceof MouseEvent?(window.removeEventListener("mousemove",t.handleWindowMouseOrTouchMove),window.removeEventListener("mouseup",t.handleWindowMouseOrTouchUp)):(window.removeEventListener("touchmove",t.handleWindowMouseOrTouchMove),window.removeEventListener("touchend",t.handleWindowMouseOrTouchUp))})),q()(I()(t),"handleAudioTimeUpdate",he((function(e){var n=t.state.isDraggingProgress,o=e.target;if(!n){var r=o.duration,a=o.currentTime;t.setState({currentTimePos:(a/r*100||0).toFixed(2)+"%"})}}),t.props.progressUpdateInterval)),q()(I()(t),"handleAudioDownloadProgressUpdate",(function(e){for(var n=e.target,o=[],r=0;r<n.buffered.length;r++){var a=n.buffered.start(r),i=n.buffered.end(r);o.push({left:(Math.round(100/n.duration*a)||0)+"%",width:(Math.round(100/n.duration*(i-a))||0)+"%"})}clearTimeout(t.downloadProgressAnimationTimer),t.setState({downloadProgressArr:o,hasDownloadProgressAnimation:!0}),t.downloadProgressAnimationTimer=setTimeout((function(){t.setState({hasDownloadProgressAnimation:!1})}),200)})),t}z()(t,e);var n=t.prototype;return n.componentDidUpdate=function(){var e=this.props.audio;e&&!this.hasAddedAudioEventListener&&(this.audio=e,this.hasAddedAudioEventListener=!0,e.addEventListener("timeupdate",this.handleAudioTimeUpdate),e.addEventListener("progress",this.handleAudioDownloadProgressUpdate))},n.componentWillUnmount=function(){this.audio&&this.hasAddedAudioEventListener&&(this.audio.removeEventListener("timeupdate",this.handleAudioTimeUpdate),this.audio.removeEventListener("progress",this.handleAudioDownloadProgressUpdate)),clearTimeout(this.downloadProgressAnimationTimer)},n.render=function(){var e=this,t=this.props,n=t.showDownloadProgress,o=t.ShowFilledProgress,a=this.state,i=a.currentTimePos,l=a.downloadProgressArr,s=a.hasDownloadProgressAnimation;return r.a.createElement("div",{className:"rhap_progress-container",ref:function(t){e.progressBarEl=t},"aria-label":"Audio Progress Control","aria-describedby":"rhap_current-time",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Number(i.split("%")[0]),tabIndex:0,onMouseDown:this.handleMouseDownProgressBar,onTouchStart:this.handleMouseDownProgressBar},r.a.createElement("div",{className:"rhap_progress-bar "+(n?"rhap_progress-bar-show-download":"")},r.a.createElement("div",{className:"rhap_progress-indicator",style:{left:i}}),o&&r.a.createElement("div",{className:"rhap_progress-filled",style:{width:i}}),n&&l.map((function(e,t){var n=e.left,o=e.width;return r.a.createElement("div",{key:t,className:"rhap_download-progress",style:{left:n,width:o,transitionDuration:s?".2s":"0s"}})}))))},t}(o.Component),fe=function(e){function t(){for(var t,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return t=e.call.apply(e,[this].concat(o))||this,q()(I()(t),"audio",void 0),q()(I()(t),"hasAddedAudioEventListener",!1),q()(I()(t),"state",{currentTime:t.props.defaultCurrentTime}),q()(I()(t),"handleAudioCurrentTimeChange",(function(e){var n=e.target;t.setState({currentTime:de(n.currentTime)})})),t}z()(t,e);var n=t.prototype;return n.componentDidUpdate=function(){var e=this.props.audio;e&&!this.hasAddedAudioEventListener&&(this.audio=e,this.hasAddedAudioEventListener=!0,e.addEventListener("timeupdate",this.handleAudioCurrentTimeChange),e.addEventListener("loadedmetadata",this.handleAudioCurrentTimeChange))},n.componentWillUnmount=function(){this.audio&&this.hasAddedAudioEventListener&&(this.audio.removeEventListener("timeupdate",this.handleAudioCurrentTimeChange),this.audio.removeEventListener("loadedmetadata",this.handleAudioCurrentTimeChange))},n.render=function(){return this.state.currentTime},t}(o.PureComponent),me=function(e){function t(){for(var t,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return t=e.call.apply(e,[this].concat(o))||this,q()(I()(t),"audio",void 0),q()(I()(t),"hasAddedAudioEventListener",!1),q()(I()(t),"state",{duration:t.props.defaultDuration}),q()(I()(t),"handleAudioDurationChange",(function(e){var n=e.target;t.setState({duration:de(n.duration)})})),t}z()(t,e);var n=t.prototype;return n.componentDidUpdate=function(){var e=this.props.audio;e&&!this.hasAddedAudioEventListener&&(this.audio=e,this.hasAddedAudioEventListener=!0,e.addEventListener("durationchange",this.handleAudioDurationChange))},n.componentWillUnmount=function(){this.audio&&this.hasAddedAudioEventListener&&this.audio.removeEventListener("durationchange",this.handleAudioDurationChange)},n.render=function(){return this.state.duration},t}(o.PureComponent),ve=function(e){function t(){for(var t,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return t=e.call.apply(e,[this].concat(o))||this,q()(I()(t),"audio",void 0),q()(I()(t),"hasAddedAudioEventListener",!1),q()(I()(t),"volumeBarEl",void 0),q()(I()(t),"volumeAnimationTimer",0),q()(I()(t),"lastVolume",t.props.volume),q()(I()(t),"state",{currentVolumePos:(t.lastVolume/1*100||0).toFixed(2)+"%",hasVolumeAnimation:!1,isDraggingVolume:!1}),q()(I()(t),"getCurrentVolume",(function(e){var n=t.props.audio;if(!t.volumeBarEl)return{currentVolume:n.volume,currentVolumePos:t.state.currentVolumePos};var o,r,a=t.volumeBarEl.getBoundingClientRect(),i=a.width,l=ue(e)-a.left;return l<0?(o=0,r="0%"):l>a.width?(o=1,r="100%"):(o=l/i,r=l/i*100+"%"),{currentVolume:o,currentVolumePos:r}})),q()(I()(t),"handleClickVolumeButton",(function(){var e=t.props.audio;e.volume>0?(t.lastVolume=e.volume,e.volume=0):e.volume=t.lastVolume})),q()(I()(t),"handleVolumnControlMouseDown",(function(e){e.stopPropagation();var n=t.props.audio,o=t.getCurrentVolume(e.nativeEvent),r=o.currentVolume,a=o.currentVolumePos;n.volume=r,t.setState({isDraggingVolume:!0,currentVolumePos:a}),e.nativeEvent instanceof MouseEvent?(window.addEventListener("mousemove",t.handleWindowMouseOrTouchMove),window.addEventListener("mouseup",t.handleWindowMouseOrTouchUp)):(window.addEventListener("touchmove",t.handleWindowMouseOrTouchMove),window.addEventListener("touchend",t.handleWindowMouseOrTouchUp))})),q()(I()(t),"handleWindowMouseOrTouchMove",(function(e){e.preventDefault(),e.stopPropagation();var n=t.props.audio,o=window.getSelection();if(o&&"Range"===o.type&&o.empty(),t.state.isDraggingVolume){var r=t.getCurrentVolume(e),a=r.currentVolume,i=r.currentVolumePos;n.volume=a,t.setState({currentVolumePos:i})}})),q()(I()(t),"handleWindowMouseOrTouchUp",(function(e){e.stopPropagation(),t.setState({isDraggingVolume:!1}),e instanceof MouseEvent?(window.removeEventListener("mousemove",t.handleWindowMouseOrTouchMove),window.removeEventListener("mouseup",t.handleWindowMouseOrTouchUp)):(window.removeEventListener("touchmove",t.handleWindowMouseOrTouchMove),window.removeEventListener("touchend",t.handleWindowMouseOrTouchUp))})),q()(I()(t),"handleAudioVolumeChange",(function(e){var n=t.state.isDraggingVolume,o=e.target.volume;(t.lastVolume>0&&0===o||0===t.lastVolume&&o>0)&&t.props.onMuteChange(),t.lastVolume=o,n||(t.setState({hasVolumeAnimation:!0,currentVolumePos:(o/1*100||0).toFixed(2)+"%"}),clearTimeout(t.volumeAnimationTimer),t.volumeAnimationTimer=setTimeout((function(){t.setState({hasVolumeAnimation:!1})}),100))})),t}z()(t,e);var n=t.prototype;return n.componentDidUpdate=function(){var e=this.props.audio;e&&!this.hasAddedAudioEventListener&&(this.audio=e,this.hasAddedAudioEventListener=!0,e.addEventListener("volumechange",this.handleAudioVolumeChange))},n.componentWillUnmount=function(){this.audio&&this.hasAddedAudioEventListener&&this.audio.removeEventListener("volumechange",this.handleAudioVolumeChange),clearTimeout(this.volumeAnimationTimer)},n.render=function(){var e=this,t=this.props.audio,n=this.state,o=n.currentVolumePos,a=n.hasVolumeAnimation,i=(t||{}).volume;return r.a.createElement("div",{ref:function(t){e.volumeBarEl=t},onMouseDown:this.handleVolumnControlMouseDown,onTouchStart:this.handleVolumnControlMouseDown,role:"progressbar","aria-label":"volume Control","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Number((100*i).toFixed(0)),tabIndex:0,className:"rhap_volume-bar-area"},r.a.createElement("div",{className:"rhap_volume-bar"},r.a.createElement("div",{className:"rhap_volume-indicator",style:{left:o,transitionDuration:a?".1s":"0s"}})))},t}(o.Component),ge=function(e){function t(t){var n;n=e.call(this,t)||this,q()(I()(n),"state",void 0),q()(I()(n),"audio",void 0),q()(I()(n),"volumeControl",void 0),q()(I()(n),"progressBarInstance",void 0),q()(I()(n),"container",void 0),q()(I()(n),"lastVolume",void 0),q()(I()(n),"listenTracker",void 0),q()(I()(n),"volumeAnimationTimer",void 0),q()(I()(n),"downloadProgressAnimationTimer",void 0),q()(I()(n),"togglePlay",(function(e){(e.stopPropagation(),n.audio.paused&&n.audio.src)?n.audio.play().then(null).catch((function(e){var t=n.props.onPlayError;t&&t(new Error(e))})):n.audio.paused||n.audio.pause()})),q()(I()(n),"handleClickVolumeButton",(function(){n.audio.volume>0?(n.lastVolume=n.audio.volume,n.audio.volume=0):n.audio.volume=n.lastVolume})),q()(I()(n),"handleMuteChange",(function(){n.forceUpdate()})),q()(I()(n),"handleClickLoopButton",(function(){n.setState((function(e){return{isLoopEnabled:!e.isLoopEnabled}}))})),q()(I()(n),"handleClickRewind",(function(){n.setJumpTime(-n.props.progressJumpStep)})),q()(I()(n),"handleClickForward",(function(){n.setJumpTime(n.props.progressJumpStep)})),q()(I()(n),"setJumpTime",(function(e){var t=n.audio,o=t.duration,r=t.currentTime;if(isFinite(o)&&isFinite(r)){var a=r+e/1e3;a<0?(n.audio.currentTime=0,a=0):a>o?(n.audio.currentTime=o,a=o):n.audio.currentTime=a}})),q()(I()(n),"setJumpVolume",(function(e){var t=n.audio.volume+e;t<0?t=0:t>1&&(t=1),n.audio.volume=t})),q()(I()(n),"setListenTrack",(function(){if(!n.listenTracker){var e=n.props.listenInterval;n.listenTracker=setInterval((function(){n.props.onListen&&n.props.onListen(n.audio.currentTime)}),e)}})),q()(I()(n),"clearListenTrack",(function(){n.listenTracker&&(clearInterval(n.listenTracker),delete n.listenTracker)})),q()(I()(n),"handleKeyDown",(function(e){switch(e.keyCode){case 32:e.target!==n.container&&e.target!==n.progressBarInstance.progressBarEl||n.togglePlay(e);break;case 37:n.handleClickRewind();break;case 39:n.handleClickForward();break;case 38:n.setJumpVolume(n.props.volumeJumpStep);break;case 40:n.setJumpVolume(-n.props.volumeJumpStep);break;case 76:n.handleClickLoopButton();break;case 77:n.handleClickVolumeButton()}}));var o=t.volume;return n.state={isPlaying:!1,isLoopEnabled:n.props.loop},n.lastVolume=o,n}z()(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=this;this.forceUpdate();var t=this.audio;this.props.muted?t.volume=0:t.volume=this.lastVolume,t.addEventListener("error",(function(t){e.props.onError&&e.props.onError(t)})),t.addEventListener("canplay",(function(t){e.props.onCanPlay&&e.props.onCanPlay(t)})),t.addEventListener("canplaythrough",(function(t){e.props.onCanPlayThrough&&e.props.onCanPlayThrough(t)})),t.addEventListener("play",(function(t){e.setState({isPlaying:!0}),e.setListenTrack(),e.props.onPlay&&e.props.onPlay(t)})),t.addEventListener("abort",(function(t){e.clearListenTrack(),e.props.autoPlayAfterSrcChange?e.audio.play():e.setState({isPlaying:!1}),e.props.onAbort&&e.props.onAbort(t)})),t.addEventListener("ended",(function(t){e.clearListenTrack(),e.props.onEnded&&e.props.onEnded(t)})),t.addEventListener("pause",(function(t){e.clearListenTrack(),e.audio&&(e.setState({isPlaying:!1}),e.props.onPause&&e.props.onPause(t))}))},n.render=function(){var e,t,n,o=this,a=this.props,i=a.className,l=a.src,s=a.preload,u=a.autoPlay,c=a.crossOrigin,d=a.mediaGroup,h=a.showLoopControl,p=a.showSkipControls,f=a.showJumpControls,m=a.showVolumeControl,v=a.onClickPrevious,g=a.onClickNext,w=a.showDownloadProgress,b=a.ShowFilledProgress,E=a.volume,y=a.defaultCurrentTime,M=a.defaultDuration,P=a.muted,C=a.progressUpdateInterval,L=a.header,k=a.footer,T=a.customIcons,_=a.children,A=a.style,x=this.state,S=x.isPlaying,O=x.isLoopEnabled,V=(this.audio||{}).volume,F=void 0===V?P?0:E:V;return e=O?T.loop?T.loop:r.a.createElement(B.Icon,{icon:ie.a}):T.loopOff?T.loopOff:r.a.createElement(B.Icon,{icon:se.a}),t=S?T.pause?T.pause:r.a.createElement(B.Icon,{icon:J.a}):T.play?T.play:r.a.createElement(B.Icon,{icon:W.a}),n=F?T.volume?T.volume:r.a.createElement(B.Icon,{icon:ne.a}):T.volume?T.volumeMute:r.a.createElement(B.Icon,{icon:re.a}),r.a.createElement("div",{role:"group",tabIndex:0,"aria-label":"Audio Player",className:"rhap_container "+i,onKeyDown:this.handleKeyDown,ref:function(e){o.container=e},style:A},r.a.createElement("audio",{src:l,controls:!1,loop:O,autoPlay:u,preload:s,crossOrigin:c,mediaGroup:d,ref:function(e){o.audio=e}},_),L&&r.a.createElement("div",{className:"rhap_header"},L),r.a.createElement("div",{className:"rhap_progress-section"},r.a.createElement("div",{id:"rhap_current-time",className:"rhap_time rhap_current-time"},r.a.createElement(fe,{audio:this.audio,defaultCurrentTime:y})),r.a.createElement(pe,{ref:function(e){o.progressBarInstance=e},audio:this.audio,progressUpdateInterval:C,showDownloadProgress:w,ShowFilledProgress:b}),r.a.createElement("div",{className:"rhap_time rhap_total-time"},r.a.createElement(me,{audio:this.audio,defaultDuration:M}))),r.a.createElement("div",{className:"rhap_controls-section"},r.a.createElement("div",{className:"rhap_additional-controls"},h&&r.a.createElement("button",{"aria-label":O?"Enable Loop":"Disable Loop",className:"rhap_button-clear rhap_repeat-button",onClick:this.handleClickLoopButton},e)),r.a.createElement("div",{className:"rhap_main-controls"},p&&r.a.createElement("button",{"aria-label":"Previous",className:"rhap_button-clear rhap_main-controls-button rhap_skip-button",onClick:v},T.previous?T.previous:r.a.createElement(B.Icon,{icon:Y.a})),f&&r.a.createElement("button",{"aria-label":"Rewind",className:"rhap_button-clear rhap_main-controls-button rhap_rewind-button",onClick:this.handleClickRewind},T.rewind?T.rewind:r.a.createElement(B.Icon,{icon:ee.a})),r.a.createElement("button",{"aria-label":S?"Pause":"Play",className:"rhap_button-clear rhap_main-controls-button rhap_play-pause-button",onClick:this.togglePlay},t),f&&r.a.createElement("button",{"aria-label":"Forward",className:"rhap_button-clear rhap_main-controls-button rhap_forward-button",onClick:this.handleClickForward},T.forward?T.forward:r.a.createElement(B.Icon,{icon:Z.a})),p&&r.a.createElement("button",{"aria-label":"Skip",className:"rhap_button-clear rhap_main-controls-button rhap_skip-button",onClick:g},T.next?T.next:r.a.createElement(B.Icon,{icon:K.a}))),r.a.createElement("div",{className:"rhap_volume-controls"},m&&r.a.createElement("div",{className:"rhap_volume-container"},r.a.createElement("button",{"aria-label":F?"Mute":"Unmute",onClick:this.handleClickVolumeButton,className:"rhap_button-clear rhap_volume-button"},n),r.a.createElement(ve,{audio:this.audio,volume:F,onMuteChange:this.handleMuteChange})))),k&&r.a.createElement("div",{className:"rhap_footer"},k))},t}(o.Component);q()(ge,"defaultProps",{autoPlay:!1,autoPlayAfterSrcChange:!0,listenInterval:1e3,progressJumpStep:5e3,volumeJumpStep:.1,loop:!1,muted:!1,preload:"auto",progressUpdateInterval:20,defaultCurrentTime:"--:--",defaultDuration:"--:--",volume:1,className:"",showLoopControl:!0,showVolumeControl:!0,showJumpControls:!0,showSkipControls:!1,showDownloadProgress:!0,ShowFilledProgress:!0,customIcons:{}});var we=ge;n("EBAg");function be(e){var t=e.audioSrc,n=e.breakpoints,a=Object(D.a)(e,["audioSrc","breakpoints"]),i=Object(o.useRef)(null),l=Object(o.useState)(0),s=l[0],u=l[1],c=Object(o.useState)(!1),d=c[0],h=c[1],p=Object(o.useState)(!1),f=(p[0],p[1]);Object(o.useEffect)((function(){if(i.current&&i.current.audio){var e=n.find((function(e){return e.slide===s}));e&&d&&(i.current.audio.currentTime=e.start+.25,h(!1))}}),[s]);var m=function(e){for(var t=0;t<n.length;t++){var o=n[t];if(e>=o.start&&e<o.end){o.slide!==s&&u(o.slide);break}}};return r.a.createElement(Ee,null,r.a.createElement("div",{className:"presentation-deck"},r.a.createElement(V,Object.assign({},a,{controlled:!0,selected:s}))),r.a.createElement("div",{className:"presentation-audio"},r.a.createElement(we,{ref:i,autoPlay:!1,showLoopControl:!1,showJumpControls:!1,showSkipControls:!0,listenInterval:200,src:t,onPlay:function(){return f(!0)},onPause:function(){return f(!1)},onCanPlay:function(){i.current&&i.current.audio&&m(i.current.audio.currentTime)},onListen:m,onClickNext:function(){var e=n.findIndex((function(e){return e.slide===s}));if(n[e+1])return u(n[e+1].slide),void h(!0);u(n[0].slide),h(!0)},onClickPrevious:function(){var e=n.findIndex((function(e){return e.slide===s}));if(n[e-1])return u(n[e-1].slide),void h(!0);u(n[n.length-1].slide),h(!0)}})))}var Ee=s.default.div.withConfig({displayName:"player__Div",componentId:"sc-1r25do3-0"})([".rhap_container{flex-direction:row-reverse;align-items:center;min-height:30px;border-radius:0 0 6px 6px;&:focus,&:active,*:focus,*:active{outline:none;}.rhap_progress-section{flex:2;margin-right:60px;}.rhap_controls-section{justify-content:flex-start;flex-shrink:0;margin-top:0;.rhap_additional-controls{display:none;}.rhap_volume-controls{flex-grow:0;flex-shrink:0;width:120px;}}}"]);function ye(e){return r.a.createElement(a.b,{query:"1358860651",render:function(t){var n,o,a=t.tracks.edges.map((function(e){return e.node})),i=e.meta,s=i.audioFile,u=i.audioURL,c=i.trackFile,d=i.trackURL,h=void 0===d?"":d,p=s?s.publicURL:u,f=c?c.relativePath:h;if(p&&f){var m=f.replace(/^\.\//,"/"),v=a.find((function(e){return l()(e.relativePath,m)}));if(v){if(e.hast.children.filter(x).length===v.slides.length){var g=(n=v.slides,o=0,A()(n,(function(e){return e.slide})).map((function(e){var t={slide:e.slide,start:o,end:o+e.duration};return o+=e.duration,t})));return r.a.createElement(be,Object.assign({},e,{audioSrc:p,breakpoints:g}))}console.warn("Incorrect presentation audio track config yaml: breakpoints count does not match slide count")}}return r.a.createElement(V,e)}})}function Me(e){return r.a.createElement(a.b,{query:"2194038815",render:function(t){var n=t.presentations.edges.map((function(e){return e.node})).find((function(t){return t.fileAbsolutePath===e.src}));if(!n)return r.a.createElement("p",null,"Presentation not found ",e.src);var o=n.pageHtmlAst,a=n.frontmatter;return r.a.createElement(ye,{hast:o,meta:a,changeLocationHash:!1})}})}function Pe(e){var t=e.src,n=e.type,o=e.width,a=e.height;return"presentation"===n?r.a.createElement(Me,{src:t,type:n,width:o,height:a}):r.a.createElement("embed",{src:t,type:n,width:o,height:a})}},jOUs:function(e,t,n){"use strict";var o=n("TqRt");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n("q1tI")),a=(0,o(n("8/g6")).default)(r.default.createElement("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"}),"Fullscreen");t.default=a},oJqr:function(e,t){t.__esModule=!0,t.default={body:'<path d="M13 6v12l8.5-6M4 18l8.5-6L4 6v12z" fill="currentColor"/>',width:24,height:24}},qJpP:function(e,t){t.__esModule=!0,t.default={body:'<path d="M16 18h2V6h-2M6 18l8.5-6L6 6v12z" fill="currentColor"/>',width:24,height:24}},sCTh:function(e,t){t.__esModule=!0,t.default={body:'<path d="M6 18V6h2v12H6m3.5-6L18 6v12l-8.5-6z" fill="currentColor"/>',width:24,height:24}},sRb4:function(e,t){t.__esModule=!0,t.default={body:'<path d="M17 17H7v-3l-4 4l4 4v-3h12v-6h-2M7 7h10v3l4-4l-4-4v3H5v6h2V7z" fill="currentColor"/>',width:24,height:24}},tE8B:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n("q1tI"),a=s(r),i=s(n("17x9")),l=s(n("Ynen"));function s(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.fullScreenElement=null,n.detectFullScreen=n.detectFullScreen.bind(n),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidMount",value:function(){l.default.addEventListener("fullscreenchange",this.detectFullScreen)}},{key:"componentWillUnmount",value:function(){l.default.removeEventListener("fullscreenchange",this.detectFullScreen)}},{key:"componentDidUpdate",value:function(){this.handleProps(this.props)}},{key:"handleProps",value:function(e){var t=l.default.fullscreenElement===this.node;t&&!e.enabled?this.leaveFullScreen():!t&&e.enabled&&this.enterFullScreen()}},{key:"detectFullScreen",value:function(){l.default.fullscreenElement===this.node?(this.fullScreenElement=l.default.fullscreenElement,this.props.onChange(!0)):!l.default.fullscreenElement&&this.fullScreenElement&&(this.fullScreenElement=null,this.props.onChange(!1))}},{key:"enterFullScreen",value:function(){l.default.fullscreenEnabled&&l.default.requestFullscreen(this.node)}},{key:"leaveFullScreen",value:function(){l.default.fullscreenEnabled&&l.default.exitFullscreen()}},{key:"render",value:function(){var e=this,t=["fullscreen"];return this.props.enabled&&t.push("fullscreen-enabled"),a.default.createElement("div",{className:t.join(" "),ref:function(t){return e.node=t},style:this.props.enabled?{height:"100%",width:"100%"}:void 0},this.props.children)}}]),t}(r.Component);u.propTypes={children:i.default.node.isRequired,enabled:i.default.bool.isRequired,onChange:i.default.func},u.defaultProps={enabled:!1,onChange:function(){}},t.default=u},vlII:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("q1tI");t.default=function(e){var t=o.useState(e),n=t[0],r=t[1];return[n,o.useCallback((function(e){r("boolean"==typeof e?e:function(e){return!e})}),[r])]}},xweI:function(e,t,n){var o=n("XGnz"),r=n("alwl"),a=n("EA7m"),i=n("mv/X"),l=a((function(e,t){if(null==e)return[];var n=t.length;return n>1&&i(e,t[0],t[1])?t=[]:n>2&&i(t[0],t[1],t[2])&&(t=[t[0]]),r(e,o(t,1),[])}));e.exports=l},zqQw:function(e,t){t.__esModule=!0,t.default={body:'<path d="M15 16h-2V8h2m-4 8H9V8h2m1-6A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2z" fill="currentColor"/>',width:24,height:24}}}]); //# sourceMappingURL=13-dc67d6c5e547aa0b046c.js.map