Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Presenter HTML buttons not working and no presentation tab opened #466

Closed
joelostblom opened this issue Dec 12, 2019 · 2 comments
Closed

Comments

@joelostblom
Copy link

@joelostblom joelostblom commented Dec 12, 2019

Thanks for making Sozi!
I am excited to try the new presentation mode, but I am having some issues making it work. When I open the presenter html in a browser, I see a single tab with three small windows and two buttons, previous and next. Nothing happens when I click on the buttons, but clicking directly in one of the three small windows advances the slides. There is only a single tab opened, no additional tab showing just the presentation without the presenter console.

I am opening this in a chromium incognito window, so there are no extensions interfering and I don't see a message that a popup has been blocked. I have tried refreshing the page. When I open the console, I can see that the following error has been raised when the file was opened:

Uncaught DOMException: Blocked a frame with origin "null" from accessing a cross-origin frame.
    at e (file:///home/joel/m2/tmp/test-presenter.sozi.html:47:448)
    at onSoziLoaded (file:///home/joel/m2/tmp/test-presenter.sozi.html:47:479)
    at file:///home/joel/m2/tmp/test-presenter.sozi.html:47:572
    at Array.forEach (<anonymous>)
    at load (file:///home/joel/m2/tmp/test-presenter.sozi.html:47:550)
    at file:///home/joel/m2/tmp/test-presenter.sozi.html:47:1535

Two errors appear in my terminal window when I launch chromium, but this happens every time and I believe they are unrelated to sozi.

[478742:478742:1212/115549.965174:ERROR:sandbox_linux.cc(372)] InitializeSandbox() called with multiple threads in process gpu-process.
[478742:478742:1212/115551.263894:ERROR:buffer_manager.cc(488)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : glBufferData: <- error from previous GL command

Opening the standard sozi html file without the presenter console works as expected an there are no errors.

Click to view the source for the SVG and HTML files:

The SVG file I am working with looks like this:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->

<svg
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:cc="http://creativecommons.org/ns#"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   width="210mm"
   height="297mm"
   viewBox="0 0 210 297"
   version="1.1"
   id="svg8"
   inkscape:version="0.92.4 5da689c313, 2019-01-14"
   sodipodi:docname="test.svg">
  <defs
     id="defs2" />
  <sodipodi:namedview
     id="base"
     pagecolor="#ffffff"
     bordercolor="#666666"
     borderopacity="1.0"
     inkscape:pageopacity="0.0"
     inkscape:pageshadow="2"
     inkscape:zoom="0.7"
     inkscape:cx="266.48382"
     inkscape:cy="737.41012"
     inkscape:document-units="mm"
     inkscape:current-layer="layer1"
     showgrid="false" />
  <metadata
     id="metadata5">
    <rdf:RDF>
      <cc:Work
         rdf:about="">
        <dc:format>image/svg+xml</dc:format>
        <dc:type
           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
        <dc:title></dc:title>
      </cc:Work>
    </rdf:RDF>
  </metadata>
  <g
     inkscape:label="Layer 1"
     inkscape:groupmode="layer"
     id="layer1">
    <rect
       style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ff0000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35099998;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
       id="rect4518"
       width="46.869045"
       height="32.505951"
       x="33.261906"
       y="43"
       ry="1.41741" />
    <circle
       style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#008080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35099998;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
       id="path4520"
       cx="87.123512"
       cy="135.79315"
       r="13.79613" />
  </g>
</svg>

The presenter html file that sozi has created looks like this:

<!doctype html>
<html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title>Untitled</title>
        <style>
            iframe {
                border: 1px solid rgb(128, 128, 128);
            }

            .sozi-frame-preview, .sozi-controls {
                text-align: center;
                margin: 1rem 0;
            }

            iframe:first-child, iframe:last-child {
                width: 40vh;
                height: 30vh;
            }

            iframe:nth-child(2) {
                width: 56vh;
                height: 42vh
            }

            .sozi-notes {
                margin: 0 25vw;
            }
        </style>
    </head>
    <body>
        <div class="sozi-frame-preview">
            <iframe src="test.sozi.html"></iframe>
            <iframe src="test.sozi.html"></iframe>
            <iframe src="test.sozi.html"></iframe>
        </div>
        <div class="sozi-controls">
            <input type="button" id="sozi-previous-btn" value="Prev">
            <input type="button" id="sozi-next-btn"     value="Next">
        </div>
        <div class="sozi-notes"></div>

        <script>"use strict";var currentFrameIndex=0,previews=[{index:-1},{index:0},{index:1}],mainSozi=void 0;function updatePreview(e){0<=e.index&&e.index<e.sozi.presentation.frames.length?e.sozi.player.jumpToFrame(e.index):e.sozi.player.enableBlankScreen()}function updateNotes(){var e=previews[1].sozi.player.currentFrame.notes;"string"==typeof e&&(document.querySelector(".sozi-notes").innerHTML=e)}function onSoziLoaded(n,o){!function e(){n.sozi?o(n.sozi):setTimeout(e,1)}()}function load(e){var i=document.querySelectorAll("iframe");previews.forEach(function(n,o){onSoziLoaded(i[o].contentWindow,function(e){(n.sozi=e).player.disableMedia(),e.player.pause(),e.presentation.enableMouseTranslation=e.presentation.enableMouseNavigation=e.presentation.enableKeyboardZoom=e.presentation.enableKeyboardRotation=e.presentation.enableKeyboardNavigation=!1,updatePreview(n),1===o&&updateNotes()})});var n=window.open(e,"sozi-presentation","width=600, height=400, scrollbars=yes");try{n.focus(),onSoziLoaded(n,function(e){(mainSozi=e).player.addListener("frameChange",onFrameChange)})}catch(e){alert("Could not open presentation window. Please allow popups for this site and refresh this page.")}}function onFrameChange(){previews[1].index=mainSozi.player.currentFrame.index,previews[0].index=previews[1].index-1,previews[2].index=previews[1].index+1,previews.forEach(updatePreview),updateNotes()}function next(){mainSozi.player.moveToNext()}function previous(){mainSozi.player.moveToPrevious()}window.addEventListener("load",function(){load(document.querySelector("iframe").src),document.getElementById("sozi-previous-btn").addEventListener("click",previous,!1),document.getElementById("sozi-next-btn").addEventListener("click",next,!1)},!1);</script>
    </body>
</body>

And the non-presenter HTML file looks like this:

<!doctype html>
<html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title>Untitled</title>
        <style>
            body {
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                margin: 0;
                padding: 0;
                overflow: hidden;
            }

            svg {
                display: none;
            }

            .sozi-frame-list {
                position: absolute;
                top: 0;
                right: 0;
                width: 33%;
                height: 100%;
                margin: 0;
                padding: 0.5em 1em;
                overflow-y: auto;

                list-style: decimal inside;

                font-family: "Droid Sans", Helvetica, Arial, sans-serif;
                font-size: 12pt;

                color: rgb(240, 255, 255);
                background-color: rgba(34, 34, 34, 0.9);
            }

            .sozi-frame-list li {
                margin: 0;
                padding: 0;
                overflow: hidden;
                white-space: nowrap;
                text-overflow: ellipsis;
            }

            li.sozi-title-level-1:before { content: '. . ';             color: rgb(100, 100, 100); }
            li.sozi-title-level-2:before { content: '. . . . ';         color: rgb(100, 100, 100); }
            li.sozi-title-level-3:before { content: '. . . . . . ';     color: rgb(100, 100, 100); }
            li.sozi-title-level-4:before { content: '. . . . . . . . '; color: rgb(100, 100, 100); }

            .sozi-frame-list a {
                color: inherit;
                text-decoration: none;
            }

            .sozi-frame-list a:hover {
                color: rgb(0, 204, 255);
                text-decoration: underline;
            }

            .sozi-frame-list a.current {
                color: rgb(255, 170, 68);
            }

            .sozi-frame-number {
                position: absolute;
                top: 0;
                left: 1em;
                text-align: center;
                padding: 0.3em 0.6em;

                cursor: pointer;

                font-family: "Droid Sans", Helvetica, Arial, sans-serif;
                font-size: 12pt;
                color: rgb(240, 255, 255);
                background-color: rgba(34, 34, 34, 0.9);
            }

            .sozi-blank-screen {
                background: black;
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                opacity: 100%;
                visibility: visible;
                z-index: 999;
                transition: opacity 0.5s, visibility 0.5s;
            }

            svg a {
                cursor: pointer;
            }

            @keyframes spinner {
                to { transform: rotate(360deg); }
            }

            .spinner:before {
                content: '';
                box-sizing: border-box;
                position: absolute;
                top: 50%;
                left: 50%;
                width: 40px;
                height: 40px;
                margin-top: -20px;
                margin-left: -20px;
                border-radius: 50%;
                border: 4px solid #ccc;
                border-top-color: #333;
                animation: spinner .8s linear infinite;
            }
        </style>
    </head>
    <body>
        <svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="210mm" height="297mm" version="1.1" id="svg8" inkscape:version="0.92.4 5da689c313, 2019-01-14" sodipodi:docname="test.svg" style="height: 100%; width: 100%;"><style xmlns="http://www.w3.org/1999/xhtml">svg {
        background: rgba(255, 255, 255, 0.0);
    }</style><defs id="defs2"/><sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="0.7" inkscape:cx="266.48382" inkscape:cy="737.41012" inkscape:document-units="mm" inkscape:current-layer="layer1" showgrid="false"/><metadata id="metadata5">
    <rdf:RDF>
      <cc:Work rdf:about="">
        <dc:format>image/svg+xml</dc:format>
        <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
        <dc:title/>
      </cc:Work>
    </rdf:RDF>
  </metadata><g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1">
    <rect style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ff0000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35099998;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" id="rect4518" width="46.869045" height="32.505951" x="33.261906" y="43" ry="1.41741"/>
    <circle style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#008080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35099998;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" id="path4520" cx="87.123512" cy="135.79315" r="13.79613"/>
  </g></svg>
        <div class="sozi-frame-number" title="Click to show the frame list">1</div>
        <ol class="sozi-frame-list">
            
                
                    <li class="sozi-title-level-0" value="1"><a href="#frame1381" title="New frame">New frame</a></li>
                
            
                
                    <li class="sozi-title-level-0" value="2"><a href="#frame6516" title="New frame">New frame</a></li>
                
            
                
                    <li class="sozi-title-level-0" value="3"><a href="#frame3615" title="New frame">New frame</a></li>
                
            
        </ol>
        <div class="sozi-blank-screen">
            <span class="spinner"></span>
        </div>
        <script>var soziPresentationData = {"enableKeyboardZoom":true,"enableKeyboardRotation":true,"enableKeyboardNavigation":true,"enableMouseTranslation":true,"enableMouseZoom":true,"enableMouseRotation":true,"enableMouseNavigation":true,"frames":[{"frameId":"frame1381","title":"New frame","titleLevel":0,"notes":"","timeoutMs":0,"timeoutEnable":false,"transitionDurationMs":1000,"showInFrameList":true,"showFrameNumber":true,"layerProperties":{"layer1":{"transitionTimingFunction":"linear","transitionRelativeZoom":0,"transitionPathId":""},"__sozi_auto__":{"transitionTimingFunction":"linear","transitionRelativeZoom":0,"transitionPathId":""}},"cameraStates":{"layer1":{"cx":56.88805702651614,"cy":60.41722768568785,"width":53.56317107733077,"height":40.17237830799808,"opacity":1,"angle":0,"clipped":true,"clipXOffset":0,"clipYOffset":0,"clipWidthFactor":0.9999999999999982,"clipHeightFactor":0.9999999999999992},"__sozi_auto__":{"cx":56.88805702651614,"cy":60.41722768568785,"width":53.56317107733077,"height":40.17237830799808,"opacity":1,"angle":0,"clipped":true,"clipXOffset":0,"clipYOffset":0,"clipWidthFactor":0.9999999999999982,"clipHeightFactor":0.9999999999999992}}},{"frameId":"frame6516","title":"New frame","titleLevel":0,"notes":"","timeoutMs":0,"timeoutEnable":false,"transitionDurationMs":1000,"showInFrameList":true,"showFrameNumber":true,"layerProperties":{"layer1":{"transitionTimingFunction":"linear","transitionRelativeZoom":0,"transitionPathId":""},"__sozi_auto__":{"transitionTimingFunction":"linear","transitionRelativeZoom":0,"transitionPathId":""}},"cameraStates":{"layer1":{"cx":87.04862765650847,"cy":137.8835895942574,"width":53.56317107733078,"height":40.17237830799809,"opacity":1,"angle":0,"clipped":true,"clipXOffset":0,"clipYOffset":0,"clipWidthFactor":0.9999999999999982,"clipHeightFactor":0.9999999999999991},"__sozi_auto__":{"cx":87.04862765650847,"cy":137.8835895942574,"width":53.56317107733078,"height":40.17237830799809,"opacity":1,"angle":0,"clipped":true,"clipXOffset":0,"clipYOffset":0,"clipWidthFactor":0.9999999999999982,"clipHeightFactor":0.9999999999999991}}},{"frameId":"frame3615","title":"New frame","titleLevel":0,"notes":"","timeoutMs":0,"timeoutEnable":false,"transitionDurationMs":1000,"showInFrameList":true,"showFrameNumber":true,"layerProperties":{"layer1":{"transitionTimingFunction":"linear","transitionRelativeZoom":0,"transitionPathId":""},"__sozi_auto__":{"transitionTimingFunction":"linear","transitionRelativeZoom":0,"transitionPathId":""}},"cameraStates":{"layer1":{"cx":87.04862765650847,"cy":137.8835895942574,"width":53.56317107733078,"height":40.17237830799809,"opacity":1,"angle":0,"clipped":true,"clipXOffset":0,"clipYOffset":0,"clipWidthFactor":0.9999999999999982,"clipHeightFactor":0.9999999999999991},"__sozi_auto__":{"cx":87.04862765650847,"cy":137.8835895942574,"width":53.56317107733078,"height":40.17237830799809,"opacity":1,"angle":0,"clipped":true,"clipXOffset":0,"clipYOffset":0,"clipWidthFactor":0.9999999999999982,"clipHeightFactor":0.9999999999999991}}}],"elementsToHide":[]};</script>

        <script>!function s(a,o,h){function l(e,t){if(!o[e]){if(!a[e]){var i="function"==typeof require&&require;if(!t&&i)return i(e,!0);if(u)return u(e,!0);var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}var r=o[e]={exports:{}};a[e][0].call(r.exports,function(t){return l(a[e][1][t]||t)},r,r.exports,s,a,o,h)}return o[e].exports}for(var u="function"==typeof require&&require,t=0;t<h.length;t++)l(h[t]);return l}({1:[function(t,e,i){"use strict";function n(t,e,i){e.hasOwnProperty(i)&&(t[i]=e[i])}Object.defineProperty(i,"__esModule",{value:!0});var r=i.CameraState={opacity:1,clipped:!1,clipXOffset:0,clipYOffset:0,clipWidthFactor:1,clipHeightFactor:1,set width(t){this._width=!isNaN(t)&&1<=t?t:1},get width(){return this._width},set height(t){this._height=!isNaN(t)&&1<=t?t:1},get height(){return this._height},set angle(t){this._angle=isNaN(t)?180:(t+180)%360,this._angle<0?this._angle+=180:this._angle-=180},get angle(){return this._angle},init:function(t){var e=(this.svgRoot=t).getBBox();return this.cx=e.x+e.width/2,this.cy=e.y+e.height/2,this.width=e.width,this.height=e.height,this.angle=0,this},initFrom:function(t){return this.svgRoot=t.svgRoot,this.cx=t.cx,this.cy=t.cy,this.width=t.width,this.height=t.height,this.opacity=t.opacity,this.angle=t.angle,this.clipped=t.clipped,this.clipXOffset=t.clipXOffset,this.clipYOffset=t.clipYOffset,this.clipWidthFactor=t.clipWidthFactor,this.clipHeightFactor=t.clipHeightFactor,this},toStorable:function(){return{cx:this.cx,cy:this.cy,width:this.width,height:this.height,opacity:this.opacity,angle:this.angle,clipped:this.clipped,clipXOffset:this.clipXOffset,clipYOffset:this.clipYOffset,clipWidthFactor:this.clipWidthFactor,clipHeightFactor:this.clipHeightFactor}},toMinimalStorable:function(){return this.toStorable()},fromStorable:function(t){return n(this,t,"cx"),n(this,t,"cy"),n(this,t,"width"),n(this,t,"height"),n(this,t,"opacity"),n(this,t,"angle"),n(this,t,"clipped"),n(this,t,"clipXOffset"),n(this,t,"clipYOffset"),n(this,t,"clipWidthFactor"),n(this,t,"clipHeightFactor"),this},setAtElement:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:1,r=4<arguments.length&&void 0!==arguments[4]?arguments[4]:1,s=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0,a=t.getBBox(),o=this.svgRoot.createSVGPoint();o.x=a.x+a.width/2,o.y=a.y+a.height/2;for(var h=t;h.parentNode.parentNode!==this.svgRoot;)h=h.parentNode;var l=h.getCTM().inverse().multiply(t.getCTM());o=o.matrixTransform(l);var u=Math.sqrt(l.a*l.a+l.b*l.b);return this.cx=o.x+e,this.cy=o.y+i,this.width=a.width*u*n,this.height=a.height*u*r,this.angle=180*Math.atan2(l.b,l.a)/Math.PI+s,this},resetClipping:function(){return this.clipXOffset=this.clipYOffset=0,this.clipWidthFactor=this.clipHeightFactor=1,this},offsetFromElement:function(t){var e=Object.create(r).init(this.svgRoot).setAtElement(t);return{deltaX:this.cx-e.cx,deltaY:this.cy-e.cy,widthFactor:this.width/e.width,heightFactor:this.height/e.height,deltaAngle:this.angle-e.angle}},applyOffset:function(t){var e=t.deltaX,i=t.deltaY,n=t.widthFactor,r=t.heightFactor,s=t.deltaAngle;return this.cx-=e,this.cy-=i,this.width/=n,this.height/=r,this.angle-=s,this}}},{}],2:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.Presentation=i.Layer=i.Frame=i.LayerProperties=void 0;var a=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var i=[],n=!0,r=!1,s=void 0;try{for(var a,o=t[Symbol.iterator]();!(n=(a=o.next()).done)&&(i.push(a.value),!e||i.length!==e);n=!0);}catch(t){r=!0,s=t}finally{try{!n&&o.return&&o.return()}finally{if(r)throw s}}return i}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},s=t("../utils"),n=t("./CameraState");function r(t,e,i){e.hasOwnProperty(i)&&(t[i]=e[i])}var o=i.LayerProperties={link:!1,referenceElementId:"",outlineElementId:"",outlineElementAuto:!0,transitionTimingFunction:"linear",transitionRelativeZoom:0,transitionPathId:"",init:function(t){return this.frame=t,this},initFrom:function(t){return this.frame=t.frame,this.link=t.link,this.referenceElementId=t.referenceElementId,this.outlineElementId=t.outlineElementId,this.outlineElementAuto=t.outlineElementAuto,this.transitionTimingFunction=t.transitionTimingFunction,this.transitionRelativeZoom=t.transitionRelativeZoom,this.transitionPathId=t.transitionPathId,this},toStorable:function(){return{link:this.link,referenceElementId:this.referenceElementId,outlineElementId:this.outlineElementId,outlineElementAuto:this.outlineElementAuto,transitionTimingFunction:this.transitionTimingFunction,transitionRelativeZoom:this.transitionRelativeZoom,transitionPathId:this.transitionPathId}},toMinimalStorable:function(){return{transitionTimingFunction:this.transitionTimingFunction,transitionRelativeZoom:this.transitionRelativeZoom,transitionPathId:this.transitionPathId}},fromStorable:function(t){return r(this,t,"link"),r(this,t,"referenceElementId"),r(this,t,"outlineElementId"),r(this,t,"outlineElementAuto"),r(this,t,"transitionTimingFunction"),r(this,t,"transitionRelativeZoom"),r(this,t,"transitionPathId"),this},get index(){return this.frame.layerProperties.indexOf(this)},get referenceElement(){return this.frame.presentation.document.root.getElementById(this.referenceElementId)},get outlineElement(){return this.frame.presentation.document.root.getElementById(this.outlineElementId)},get transitionPath(){return this.frame.presentation.document.root.getElementById(this.transitionPathId)},get outlineElementHide(){return 0<=this.frame.presentation.elementsToHide.indexOf(this.outlineElementId)},set outlineElementHide(t){if(this.outlineElement!==this.frame.presentation.document.root){var e=this.outlineElementHide;if(t&&!e)this.frame.presentation.elementsToHide.push(this.outlineElementId);else if(!t&&e){var i=this.frame.presentation.elementsToHide.indexOf(this.outlineElementId);this.frame.presentation.elementsToHide.splice(i,1)}this.outlineElement&&(this.outlineElement.style.visibility=t?"hidden":"visible")}},get transitionPathHide(){return 0<=this.frame.presentation.elementsToHide.indexOf(this.transitionPathId)},set transitionPathHide(t){var e=this.transitionPathHide;if(t&&!e)this.frame.presentation.elementsToHide.push(this.transitionPathId);else if(!t&&e){var i=this.frame.presentation.elementsToHide.indexOf(this.transitionPathId);this.frame.presentation.elementsToHide.splice(i,1)}this.transitionPath&&(this.transitionPath.style.visibility=t?"hidden":"visible")}},h=i.Frame={title:"New frame",titleLevel:0,notes:"",timeoutMs:0,timeoutEnable:!1,transitionDurationMs:1e3,showInFrameList:!0,showFrameNumber:!0,init:function(e){var i=this;return this.presentation=e,this.frameId=e.makeFrameId(),this.layerProperties=e.layers.map(function(t){return Object.create(o).init(i)}),this.cameraStates=e.layers.map(function(t){return Object.create(n.CameraState).init(e.document.root)}),this},initFrom:function(t,e){return this.presentation=t.presentation,e||(this.frameId=t.presentation.makeFrameId()),this.title=t.title,this.titleLevel=t.titleLevel,this.notes=t.notes,this.timeoutMs=t.timeoutMs,this.timeoutEnable=t.timeoutEnable,this.transitionDurationMs=t.transitionDurationMs,this.showInFrameList=t.showInFrameList,this.showFrameNumber=t.showFrameNumber,this.layerProperties=t.layerProperties.map(function(t){return Object.create(o).initFrom(t)}),this.cameraStates=t.cameraStates.map(function(t){return Object.create(n.CameraState).initFrom(t)}),this},toStorable:function(){var a=this,o={},h={},l={};return this.presentation.layers.forEach(function(t,e){var i=a.layerProperties[e],n=a.cameraStates[e],r=i.referenceElement,s=t.groupId;o[s]=i.toStorable(),h[s]=n.toStorable(),r&&(l[s]=a.cameraStates[e].offsetFromElement(r))}),{frameId:this.frameId,title:this.title,titleLevel:this.titleLevel,notes:this.notes,timeoutMs:this.timeoutMs,timeoutEnable:this.timeoutEnable,transitionDurationMs:this.transitionDurationMs,showInFrameList:this.showInFrameList,showFrameNumber:this.showFrameNumber,layerProperties:o,cameraStates:h,cameraOffsets:l}},toMinimalStorable:function(){var s=this,a={},o={};return this.presentation.layers.forEach(function(t,e){var i=s.layerProperties[e],n=s.cameraStates[e],r=t.groupId;a[r]=i.toMinimalStorable(),o[r]=n.toMinimalStorable()}),{frameId:this.frameId,title:this.title,titleLevel:this.titleLevel,notes:this.notes,timeoutMs:this.timeoutMs,timeoutEnable:this.timeoutEnable,transitionDurationMs:this.transitionDurationMs,showInFrameList:this.showInFrameList,showFrameNumber:this.showFrameNumber,layerProperties:a,cameraStates:o}},fromStorable:function(o){var h=this;return r(this,o,"frameId"),r(this,o,"title"),r(this,o,"titleLevel"),r(this,o,"notes"),r(this,o,"timeoutMs"),r(this,o,"timeoutEnable"),r(this,o,"transitionDurationMs"),r(this,o,"showInFrameList"),r(this,o,"showFrameNumber"),this.presentation.layers.forEach(function(t,e){var i=t.groupId in o.layerProperties?t.groupId:"__sozi_auto__";if(i in o.layerProperties){var n=h.layerProperties[e];n.fromStorable(o.layerProperties[i]);var r=h.cameraStates[e].fromStorable(o.cameraStates[i]),s=n.referenceElement;if(s){var a=o.cameraOffsets[i]||{};r.setAtElement(s,a.deltaX,a.deltaY,a.widthFactor,a.heightFactor,a.deltaAngle)}}}),this},get index(){return this.presentation.frames.indexOf(this)},setAtStates:function(t){var i=this;t.forEach(function(t,e){i.cameraStates[e].initFrom(t)})},isLinkedTo:function(t,e){var i=this.index<t.index?[this,t]:[t,this],n=a(i,2),r=n[0],s=n[1];return s.layerProperties[e].link&&(s.index===r.index+1||s.index>r.index&&this.presentation.frames[s.index-1].isLinkedTo(r,e))}},l=i.Layer={init:function(t,e,i){return this.presentation=t,this.label=e,this.auto=i,this.svgNodes=[],this},get groupId(){return this.auto?"__sozi_auto__":this.svgNodes[0].getAttribute("id")},get index(){return this.presentation.layers.indexOf(this)},get isVisible(){return this.svgNodes.some(function(t){return"none"!==window.getComputedStyle(t).display})},set isVisible(e){this.svgNodes.forEach(function(t){t.style.display=e?"inline":"none"})},contains:function(e){return this.svgNodes.some(function(t){return t.contains(e)})}};i.Presentation={aspectWidth:4,aspectHeight:3,enableKeyboardZoom:!0,enableKeyboardRotation:!0,enableKeyboardNavigation:!0,enableMouseTranslation:!0,enableMouseZoom:!0,enableMouseRotation:!0,enableMouseNavigation:!0,init:function(){return this.frames=[],this.layers=[],this.elementsToHide=[],this},setSVGDocument:function(t){var n=this;this.document=t;var r=Object.create(l).init(this,"auto",!0);return(0,s.toArray)(this.document.root.childNodes).forEach(function(t){if(t instanceof SVGGElement){var e=t.getAttribute("id");if(null===e)r.svgNodes.push(t);else{var i=Object.create(l).init(n,n.document.handler.getLabel(t)||"#"+e,!1);i.svgNodes.push(t),n.layers.push(i)}}}),this.layers.push(r),this},setInitialCameraState:function(){this.initialCameraState=Object.create(n.CameraState).init(this.document.root)},toStorable:function(){return{aspectWidth:this.aspectWidth,aspectHeight:this.aspectHeight,enableKeyboardZoom:this.enableKeyboardZoom,enableKeyboardRotation:this.enableKeyboardRotation,enableKeyboardNavigation:this.enableKeyboardNavigation,enableMouseTranslation:this.enableMouseTranslation,enableMouseZoom:this.enableMouseZoom,enableMouseRotation:this.enableMouseRotation,enableMouseNavigation:this.enableMouseNavigation,frames:this.frames.map(function(t){return t.toStorable()}),elementsToHide:this.elementsToHide.slice()}},toMinimalStorable:function(){return{enableKeyboardZoom:this.enableKeyboardZoom,enableKeyboardRotation:this.enableKeyboardRotation,enableKeyboardNavigation:this.enableKeyboardNavigation,enableMouseTranslation:this.enableMouseTranslation,enableMouseZoom:this.enableMouseZoom,enableMouseRotation:this.enableMouseRotation,enableMouseNavigation:this.enableMouseNavigation,frames:this.frames.map(function(t){return t.toMinimalStorable()}),elementsToHide:this.elementsToHide.slice()}},fromStorable:function(t){var e=this;return r(this,t,"aspectWidth"),r(this,t,"aspectHeight"),r(this,t,"enableKeyboardZoom"),r(this,t,"enableKeyboardRotation"),r(this,t,"enableKeyboardNavigation"),r(this,t,"enableMouseTranslation"),r(this,t,"enableMouseZoom"),r(this,t,"enableMouseRotation"),r(this,t,"enableMouseNavigation"),this.frames=t.frames.map(function(t){return Object.create(h).init(e).fromStorable(t)}),t.elementsToHide&&(this.elementsToHide=t.elementsToHide.slice()),this},get title(){var t=this.document.root.getElementsByTagNameNS("http://www.w3.org/2000/svg","title");return t.length?t[0].firstChild.wholeText.trim():"Untitled"},makeFrameId:function(){for(var t=Math.floor(1e3*(1+9*Math.random())),e=void 0;e="frame"+t,t++,this.frames.some(function(t){return t.frameId===e}););return e},getFrameWithId:function(t){for(var e=0;e<this.frames.length;e++)if(this.frames[e].frameId===t)return this.frames[e];return null},getLayerWithId:function(t){for(var e=0;e<this.layers.length;e++)if(this.layers[e].groupId===t)return this.layers[e];return null},updateLinkedLayers:function(){var r=this;if(this.frames.length){var t=this.frames[0].cameraStates,s=t[t.length-1],e=this.frames[0].layerProperties,a=e[e.length-1];this.layers.forEach(function(t,e){var i=s,n=a;r.frames.forEach(function(t){t.layerProperties[e].link?(t.cameraStates[e].initFrom(i),t.layerProperties[e].referenceElementId=n.referenceElementId,t.layerProperties[e].outlineElementId=n.outlineElementId):(i=t.cameraStates[e],n=t.layerProperties[e])})})}}}},{"../utils":14,"./CameraState":1}],3:[function(t,e,i){"use strict";var n=t("./svg/SVGDocumentWrapper"),r=t("./model/Presentation"),s=t("./player/Viewport"),a=t("./player/Player"),o=c(t("./player/Media")),h=c(t("./player/FrameList")),l=c(t("./player/FrameNumber")),u=c(t("./player/FrameURL"));function c(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}window.addEventListener("load",function(){var t=document.querySelector("svg");t.style.display="inline",n.SVGDocumentWrapper.init(t),r.Presentation.init().setSVGDocument(n.SVGDocumentWrapper),s.Viewport.init(r.Presentation,!1).onLoad(),r.Presentation.fromStorable(window.soziPresentationData),a.Player.init(s.Viewport,r.Presentation),o.init(a.Player),h.init(a.Player),l.init(a.Player),u.init(a.Player),window.sozi={presentation:r.Presentation,viewport:s.Viewport,player:a.Player},a.Player.addListener("stateChange",function(){a.Player.playing?document.title=r.Presentation.title:document.title=r.Presentation.title+" (Paused)"}),window.addEventListener("resize",function(){return s.Viewport.repaint()}),r.Presentation.frames.length&&a.Player.playFromFrame(u.getFrame()),s.Viewport.repaint(),a.Player.disableBlankScreen(),document.querySelector(".sozi-blank-screen .spinner").style.display="none"})},{"./model/Presentation":2,"./player/FrameList":6,"./player/FrameNumber":7,"./player/FrameURL":8,"./player/Media":9,"./player/Player":10,"./player/Viewport":12,"./svg/SVGDocumentWrapper":13}],4:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.Animator=void 0;var n=t("events"),r=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame,s=window.performance&&window.performance.now?window.performance:Date,a=void 0,o=0,h=[];function l(){0<o?(r&&r(l),h.forEach(function(t){t.running&&t.step()})):r||window.clearInterval(a)}var u=i.Animator=Object.create(n.EventEmitter.prototype);u.init=function(){return n.EventEmitter.call(this),this.durationMs=500,this.initialTime=0,this.running=!1,h.push(this),this},u.start=function(t){this.durationMs=t,this.initialTime=s.now(),this.emit("step",0),this.running||(this.running=!0,1===++o&&(r?r(l):a=window.setInterval(l,40)))},u.stop=function(){this.running&&(this.running=!1,o--,this.emit("stop"))},u.step=function(){var t=s.now()-this.initialTime;t>=this.durationMs?(this.emit("step",1),this.running=!1,o--,this.emit("done")):this.emit("step",t/this.durationMs)}},{events:15}],5:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.Camera=void 0;var s=t("../model/CameraState"),a="http://www.w3.org/2000/svg",n=i.Camera=Object.create(s.CameraState);n.init=function(n,t){s.CameraState.init.call(this,n.svgRoot),this.viewport=n,this.layer=t,this.selected=!0,this.svgClipRect=document.createElementNS(a,"rect");var r=void 0;if(n.editMode){this.maskValue=0;var e=document.createElementNS(a,"mask");r=n.makeUniqueId("sozi-mask-"),e.setAttribute("id",r),n.svgRoot.appendChild(e),this.svgMaskRect=document.createElementNS(a,"rect"),e.appendChild(this.svgMaskRect),this.svgClipRect.setAttribute("fill","white"),e.appendChild(this.svgClipRect),this.svgClipOutlineRect1=document.createElementNS(a,"rect"),this.svgClipOutlineRect1.setAttribute("stroke","black"),this.svgClipOutlineRect1.setAttribute("fill","none"),n.svgRoot.appendChild(this.svgClipOutlineRect1),this.svgClipOutlineRect2=document.createElementNS(a,"rect"),this.svgClipOutlineRect2.setAttribute("stroke","white"),this.svgClipOutlineRect2.setAttribute("fill","none"),this.svgClipOutlineRect2.setAttribute("stroke-dasharray","2,2"),n.svgRoot.appendChild(this.svgClipOutlineRect2),this.concealClipping()}else{var i=document.createElementNS(a,"clipPath");r=n.makeUniqueId("sozi-clip-path-"),i.setAttribute("id",r),i.appendChild(this.svgClipRect),n.svgRoot.appendChild(i)}return this.svgTransformGroups=t.svgNodes.map(function(t){var e=document.createElementNS(a,"g");n.svgRoot.insertBefore(e,t),n.editMode?e.setAttribute("mask","url(#"+r+")"):e.setAttribute("clip-path","url(#"+r+")");var i=document.createElementNS(a,"g");return i.appendChild(t),e.appendChild(i),i}),this},n.revealClipping=function(){this.maskValue=64,this.svgClipOutlineRect1.style.display="inline",this.svgClipOutlineRect2.style.display="inline"},n.concealClipping=function(){this.maskValue=0,this.svgClipOutlineRect1.style.display="none",this.svgClipOutlineRect2.style.display="none"},Object.defineProperty(n,"scale",{get:function(){return Math.min(this.viewport.width/this.width,this.viewport.height/this.height)}}),n.rotate=function(t){return this.restoreAspectRatio(),this.angle+=t,this.update()},n.zoom=function(t,e,i){return this.width/=t,this.height/=t,this.restoreAspectRatio(),this.translate((1-t)*(e-this.viewport.width/2),(1-t)*(i-this.viewport.height/2))},n.translate=function(t,e){var i=this.scale,n=this.angle*Math.PI/180,r=Math.sin(n),s=Math.cos(n);return this.cx-=(t*s-e*r)/i,this.cy-=(t*r+e*s)/i,this.restoreAspectRatio(),this.update()},n.clip=function(t,e,i,n){this.clipped=!0;var r=this.scale,s=Math.abs(i-t)+1,a=Math.abs(n-e)+1;return this.clipXOffset=(Math.min(t,i)-(this.viewport.width-s)/2)*this.width/s,this.clipYOffset=(Math.min(e,n)-(this.viewport.height-a)/2)*this.height/a,this.clipWidthFactor=s/this.width/r,this.clipHeightFactor=a/this.height/r,this.update()},n.restoreAspectRatio=function(){var t=this.viewport.width/this.viewport.height/(this.width/this.height);1<t?(this.width*=t,this.clipped&&(this.clipWidthFactor/=t)):(this.height/=t,this.clipped&&(this.clipHeightFactor*=t))},n.getCandidateReferenceElement=function(){if(!this.layer.svgNodes.length||!this.svgRoot.getIntersectionList)return{element:null,score:null};var t=this.svgRoot.createSVGRect();t.x=0,t.y=0,t.width=this.viewport.width,t.height=this.viewport.height;for(var e=this.viewport.width*this.viewport.height,i=this.svgRoot.getIntersectionList(t,this.layer.svgNodes[0]),n=null,r=null,s=0;s<i.length;s++){var a=i[s];if(a.hasAttribute("id")){var o=a.getBoundingClientRect(),h=o.width*o.height,l=Math.max(o.left,this.viewport.x),u=Math.max(o.top,this.viewport.y),c=e+h-2*((Math.min(o.right,this.viewport.x+this.viewport.width)-l)*(Math.min(o.bottom,this.viewport.y+this.viewport.height)-u));(null===r||c<r)&&(r=c,n=a)}}return{element:n,score:r}},Object.defineProperty(n,"clipRect",{get:function(){var t=void 0,e=void 0,i=void 0,n=void 0;if(this.clipped){var r=this.scale;t=Math.round(this.width*this.clipWidthFactor*r),e=Math.round(this.height*this.clipHeightFactor*r),i=Math.round((this.viewport.width-t)/2+this.clipXOffset*this.clipWidthFactor*r),n=Math.round((this.viewport.height-e)/2+this.clipYOffset*this.clipHeightFactor*r)}else t=this.viewport.width,e=this.viewport.height,n=i=0;return{width:t,height:e,x:i,y:n}}}),n.update=function(){var e=this,t=this.clipRect;this.svgClipRect.setAttribute("x",t.x),this.svgClipRect.setAttribute("y",t.y),this.svgClipRect.setAttribute("width",t.width),this.svgClipRect.setAttribute("height",t.height),this.viewport.editMode&&(this.svgMaskRect.setAttribute("fill","rgb("+this.maskValue+","+this.maskValue+","+this.maskValue+")"),this.svgMaskRect.setAttribute("x",0),this.svgMaskRect.setAttribute("y",0),this.svgMaskRect.setAttribute("width",this.viewport.width),this.svgMaskRect.setAttribute("height",this.viewport.height),this.svgClipOutlineRect1.setAttribute("x",t.x),this.svgClipOutlineRect1.setAttribute("y",t.y),this.svgClipOutlineRect1.setAttribute("width",t.width),this.svgClipOutlineRect1.setAttribute("height",t.height),this.svgClipOutlineRect2.setAttribute("x",t.x),this.svgClipOutlineRect2.setAttribute("y",t.y),this.svgClipOutlineRect2.setAttribute("width",t.width),this.svgClipOutlineRect2.setAttribute("height",t.height));var i=this.scale,n=this.viewport.width/i/2-this.cx,r=this.viewport.height/i/2-this.cy;return this.svgTransformGroups.forEach(function(t){t.setAttribute("transform","scale("+i+")translate("+n+","+r+")rotate("+-e.angle+","+e.cx+","+e.cy+")"),t.setAttribute("opacity",e.opacity)}),this},n.interpolate=function(t,e,h,i,l,n,r){var s=i(h),a=1-s;function o(t,e){return e*s+t*a}function u(t,e){var i=(0<l?Math.min(t,e):Math.max(t,e))*(1-l),n=t-i,r=e-i,s=Math.sqrt(n/r),a=s/(1+s),o=h-a;return n/a/a*o*o+i}if(l?(this.width=u(t.width,e.width),this.height=u(t.height,e.height)):(this.width=o(t.width,e.width),this.height=o(t.height,e.height)),n){var c=n.getTotalLength(),m=n.getPointAtLength(r?c:0),d=n.getPointAtLength(r?0:c),f=n.getPointAtLength(c*(r?a:s));this.cx=f.x+o(t.cx-m.x,e.cx-d.x),this.cy=f.y+o(t.cy-m.y,e.cy-d.y)}else this.cx=o(t.cx,e.cx),this.cy=o(t.cy,e.cy);this.opacity=o(t.opacity,e.opacity),180<e.angle-t.angle?this.angle=o(t.angle,e.angle-360):e.angle-t.angle<-180?this.angle=o(t.angle-360,e.angle):this.angle=o(t.angle,e.angle),this.clipped=!0;var p=this.scale,v={clipXOffset:0,clipYOffset:0,clipWidthFactor:this.viewport.width/this.width/p,clipHeightFactor:this.viewport.height/this.height/p},g=t.clipped?t:v,y=e.clipped?e:v;for(var b in v)this[b]=o(g[b],y[b])}},{"../model/CameraState":1}],6:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.init=function(t){l=t,o=document.querySelector(".sozi-frame-list"),(h=(0,n.toArray)(o.querySelectorAll("li a"))).forEach(function(e){e.addEventListener("click",function(t){0===t.button&&(l.previewFrame(e.hash.slice(1)),t.preventDefault())})}),(u=Object.create(r.Animator).init()).addListener("step",b),window.addEventListener("keypress",y,!1),window.addEventListener("resize",function(){return f(d)}),l.viewport.addListener("mouseDown",w),o.addEventListener("mouseout",E,!1),t.addListener("frameChange",M),f(c)},i.open=function(){p(0)},i.close=v,i.toggle=g;var n=t("../utils"),r=t("./Animator"),s=function(t){{if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}}(t("./Timing"));var a=500,o=void 0,h=void 0,l=void 0,u=void 0,c=-1,m=-1,d=c;function f(t){d=t,o.style.left=d*o.offsetWidth+"px"}function p(t){l.pause(),c=d,m=t,u.start(Math.abs(m-c)*a)}function v(){p(-1)}function g(){p(-1-m)}function y(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){switch(t.charCode||t.which){case 84:case 116:l.presentation.enableKeyboardNavigation&&(l.disableBlankScreen(),g());break;default:return}t.stopPropagation(),t.preventDefault()}}function b(t){var e=s.ease(t);f(m*e+c*(1-e))}function w(t){l.presentation.enableMouseNavigation&&1===t&&g()}function E(t){for(var e=t.relatedTarget;e&&e!==o&&e!==document.documentElement;)e=e.parentNode;e!==o&&(v(),t.stopPropagation())}function M(){h.forEach(function(t){t.className=t.hash==="#"+l.currentFrame.frameId?"current":""})}},{"../utils":14,"./Animator":4,"./Timing":11}],7:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.init=function(t){var e=document.querySelector(".sozi-frame-number");t.addListener("frameChange",function(){e.innerHTML=t.currentFrame.index+1,e.style.visibility=t.currentFrame.showFrameNumber?"visible":"hidden"}),e.addEventListener("click",n.open)};var n=function(t){{if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}}(t("./FrameList"))},{"./FrameList":6}],8:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.init=function(t){n=t,window.addEventListener("hashchange",s,!1),n.addListener("frameChange",a)},i.getFrame=r;var n=void 0;function r(){if(window.location.hash){var t=window.location.hash.slice(1),e=n.presentation.getFrameWithId(t);if(e)return e;var i=parseInt(t);return!isNaN(i)&&0<i&&i<=n.presentation.frames.length?n.presentation.frames[i-1]:n.currentFrame}return n.currentFrame}function s(){var t=r();n.currentFrame!==t&&n.moveToFrame(t)}function a(){window.location.hash="#"+n.currentFrame.frameId}},{}],9:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.init=function(t){(l=t).addListener("frameChange",g);for(var e=l.presentation.document.root,i=e.attributes,u=void 0,n=0;n<i.length;n++)if(i[n].value===h){u=i[n].name.slice(6);break}if(!u)return;var r=e.getElementsByTagName(u+":video"),s=e.getElementsByTagName(u+":audio"),a=(0,o.toArray)(r).concat((0,o.toArray)(s)),c=[];a.forEach(function(t){var e=t.parentNode,i=t.localName.slice(u.length+1),n=document.createElementNS(d,"source");n.setAttribute("type",t.getAttribute(u+":type")),n.setAttribute("src",t.getAttribute(u+":src"));var r=void 0;for(r=0;r<c.length&&c[r].rect!==e;r+=1);if(r===c.length){e.setAttribute("visibility","hidden");var s=document.createElementNS(d,i);"true"===t.getAttribute(u+":controls")&&s.setAttribute("controls","controls"),"video"===i&&(s.setAttribute("width",e.getAttribute("width")),s.setAttribute("height",e.getAttribute("height"))),s.addEventListener("click",f,!1),s.addEventListener("mousedown",f,!1),s.addEventListener("mouseup",f,!1),s.addEventListener("mousemove",f,!1),s.addEventListener("contextmenu",f,!1);var a=document.createElementNS(d,"html");a.appendChild(s);var o=document.createElementNS(m,"foreignObject");if(o.setAttribute("x",e.getAttribute("x")),o.setAttribute("y",e.getAttribute("y")),o.setAttribute("width",e.getAttribute("width")),o.setAttribute("height",e.getAttribute("height")),o.appendChild(a),e.parentNode.insertBefore(o,e.nextSibling),t.hasAttribute(u+":start-frame")){var h=t.getAttribute(u+":start-frame"),l=t.getAttribute(u+":stop-frame");h in p||(p[h]=[]),l in v||(v[l]=[]),p[h].push(s),v[l].push(s)}"true"===t.getAttribute(u+":loop")&&s.setAttribute("loop","true"),c.push({rect:t.parentNode,htmlMedia:s})}c[r].htmlMedia.appendChild(n)})},i.disable=function(){l.removeListener("frameChange",g);var t=l.currentFrame.frameId;t in p&&p[t].forEach(function(t){t.pause()})};var o=t("../utils"),m="http://www.w3.org/2000/svg",h="http://sozi.baierouge.fr",d="http://www.w3.org/1999/xhtml",l=void 0;function f(t){t.stopPropagation()}var p={},v={};function g(){var t=l.currentFrame.frameId;t in p&&p[t].forEach(function(t){t.play()}),t in v&&v[t].forEach(function(t){t.pause()})}},{"../utils":14}],10:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.Player=void 0;var r=t("./Animator"),l=h(t("./Timing")),s=t("../model/CameraState"),n=t("../model/Presentation"),a=t("events"),o=h(t("./Media"));function h(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}var u=i.Player=Object.create(a.EventEmitter.prototype);u.init=function(t,e){var i=this,n=2<arguments.length&&void 0!==arguments[2]&&arguments[2];return a.EventEmitter.call(this),this.editMode=!!n,this.viewport=t,this.presentation=e,this.animator=Object.create(r.Animator).init(),this.playing=!1,this.waitingTimeout=!1,this.currentFrame=e.frames[0],this.targetFrame=e.frames[0],this.timeoutHandle=null,this.transitions=[],this.editMode||(this.viewport.addListener("click",function(t){return i.onClick(t)}),window.addEventListener("keydown",function(t){return i.onKeyDown(t)},!1),this.presentation.enableMouseTranslation&&this.viewport.addListener("dragStart",function(){return i.pause()}),this.viewport.addListener("userChangeState",function(){return i.pause()}),window.addEventListener("keypress",function(t){return i.onKeyPress(t)},!1)),this.animator.addListener("step",function(t){return i.onAnimatorStep(t)}),this.animator.addListener("stop",function(){return i.onAnimatorStop()}),this.animator.addListener("done",function(){return i.onAnimatorDone()}),this},u.onClick=function(t){if(this.presentation.enableMouseNavigation)switch(t){case 0:this.moveToNext();break;case 2:this.moveToPrevious()}},u.onKeyDown=function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){switch(t.keyCode){case 36:this.presentation.enableKeyboardNavigation&&(t.shiftKey?this.jumpToFirst():this.moveToFirst());break;case 35:this.presentation.enableKeyboardNavigation&&(t.shiftKey?this.jumpToLast():this.moveToLast());break;case 38:case 33:case 37:this.presentation.enableKeyboardNavigation&&(t.shiftKey?this.jumpToPrevious():this.moveToPrevious());break;case 40:case 34:case 39:case 13:case 32:this.presentation.enableKeyboardNavigation&&(t.shiftKey?this.jumpToNext():this.moveToNext());break;default:return}t.stopPropagation(),t.preventDefault()}},u.onKeyPress=function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){switch(t.charCode||t.which){case 43:this.presentation.enableKeyboardZoom&&(this.viewport.zoom(1.05,this.viewport.width/2,this.viewport.height/2),this.pause());break;case 45:this.presentation.enableKeyboardZoom&&(this.viewport.zoom(1/1.05,this.viewport.width/2,this.viewport.height/2),this.pause());break;case 82:this.presentation.enableKeyboardRotation&&(this.viewport.rotate(-5),this.pause());break;case 114:this.presentation.enableKeyboardRotation&&(this.viewport.rotate(5),this.pause());break;case 80:case 112:this.playing?this.pause():this.resume();break;case 46:this.presentation.enableKeyboardNavigation&&this.toggleBlankScreen();break;default:return}t.stopPropagation(),t.preventDefault()}},u.findFrame=function(t){return n.Frame.isPrototypeOf(t)?t:"string"==typeof t?this.presentation.getFrameWithId(t):"number"==typeof t?this.presentation.frames[t]:null},Object.defineProperty(u,"previousFrame",{get:function(){var t=((this.animator.running?this.targetFrame:this.currentFrame).index+this.presentation.frames.length-1)%this.presentation.frames.length;return this.presentation.frames[t]}}),Object.defineProperty(u,"nextFrame",{get:function(){var t=((this.animator.running?this.targetFrame:this.currentFrame).index+1)%this.presentation.frames.length;return this.presentation.frames[t]}}),u.showCurrentFrame=function(){return this.viewport.setAtStates(this.currentFrame.cameraStates).update(),this.emit("frameChange"),this},u.playFromFrame=function(t){return this.playing||(this.playing=!0,this.emit("stateChange")),this.waitingTimeout=!1,this.targetFrame=this.currentFrame=this.findFrame(t),this.showCurrentFrame(),this.waitTimeout(),this},u.pause=function(){return this.animator.stop(),this.waitingTimeout&&(window.clearTimeout(this.timeoutHandle),this.waitingTimeout=!1),this.playing&&(this.playing=!1,this.emit("stateChange")),this.targetFrame=this.currentFrame,this},u.resume=function(){return this.playFromFrame(this.currentFrame),this},u.waitTimeout=function(){var t=this;return this.currentFrame.timeoutEnable&&(this.waitingTimeout=!0,this.timeoutHandle=window.setTimeout(function(){return t.moveToNext()},this.currentFrame.timeoutMs)),this},u.jumpToFrame=function(t){return this.disableBlankScreen(),this.pause(),this.targetFrame=this.currentFrame=this.findFrame(t),this.showCurrentFrame(),this},u.jumpToFirst=function(){return this.jumpToFrame(0)},u.jumpToLast=function(){return this.jumpToFrame(this.presentation.frames.length-1)},u.jumpToPrevious=function(){return this.jumpToFrame(this.previousFrame)},u.jumpToNext=function(){return this.jumpToFrame(this.nextFrame)},u.moveToFrame=function(t){var s=this;this.disableBlankScreen(),this.waitingTimeout&&(window.clearTimeout(this.timeoutHandle),this.waitingTimeout=!1),this.targetFrame=this.findFrame(t);var a=null,e=500,o=!1,h=!1;return this.currentFrame&&(this.targetFrame===this.nextFrame?(e=this.targetFrame.transitionDurationMs,a=this.targetFrame.layerProperties,o=!0):this.targetFrame===this.previousFrame&&(e=this.currentFrame.transitionDurationMs,a=this.currentFrame.layerProperties,h=o=!0)),this.editMode||this.playing||(this.playing=!0,this.emit("stateChange")),this.viewport.cameras.forEach(function(t){var e=l.ease,i=0,n=null;if(a){var r=a[t.layer.index];i=r.transitionRelativeZoom,e=l[r.transitionTimingFunction],o&&(n=r.transitionPath),h&&(e=e.reverse)}s.setupTransition(t,e,i,n,h)}),this.animator.start(e),this},u.moveToFirst=function(){return this.moveToFrame(0)},u.moveToLast=function(){return this.moveToFrame(this.presentation.frames.length-1)},u.moveToPrevious=function(){for(var t=this.previousFrame.index;0<=t;t--){var e=this.presentation.frames[t];if(!e.timeoutEnable||0!==e.timeoutMs){this.moveToFrame(e);break}}return this},u.moveToNext=function(){return this.moveToFrame(this.nextFrame)},u.moveToCurrent=function(){return this.moveToFrame(this.currentFrame)},u.previewFrame=function(t){var e=this;return this.targetFrame=this.findFrame(t),this.viewport.cameras.forEach(function(t){e.setupTransition(t,l.ease,0)}),this.animator.start(500),this},u.setupTransition=function(t,e,i,n,r){return this.animator.running&&this.animator.stop(),this.transitions.push({camera:t,initialState:Object.create(s.CameraState).initFrom(t),finalState:this.targetFrame.cameraStates[t.layer.index],timingFunction:e,relativeZoom:i,svgPath:n,reverse:r}),this},u.onAnimatorStep=function(e){this.transitions.forEach(function(t){t.camera.interpolate(t.initialState,t.finalState,e,t.timingFunction,t.relativeZoom,t.svgPath,t.reverse),t.camera.update()})},u.onAnimatorStop=function(){this.transitions=[],this.currentFrame=this.targetFrame,this.emit("frameChange")},u.onAnimatorDone=function(){this.transitions=[],this.currentFrame=this.targetFrame,this.emit("frameChange"),this.playing&&this.waitTimeout()},Object.defineProperty(u,"blankScreenIsVisible",{get:function(){return"visible"===document.querySelector(".sozi-blank-screen").style.visibility}}),u.enableBlankScreen=function(){this.pause();var t=document.querySelector(".sozi-blank-screen");t&&(t.style.opacity=1,t.style.visibility="visible")},u.disableBlankScreen=function(){var t=document.querySelector(".sozi-blank-screen");t&&(t.style.opacity=0,t.style.visibility="hidden")},u.toggleBlankScreen=function(){this.blankScreenIsVisible?this.disableBlankScreen():this.enableBlankScreen()},u.disableMedia=function(){o.disable()}},{"../model/CameraState":1,"../model/Presentation":2,"./Animator":4,"./Media":9,"./Timing":11,events:15}],11:[function(t,e,i){"use strict";function r(t,e){return 1-3*e+3*t}function c(t,e){return 3*e-6*t}function m(t){return 3*t}function d(t,e,i,n){return((e*t+i)*t+n)*t}function n(t,e,i,n){var s=r(t,i),a=c(t,i),o=m(t),h=r(e,n),l=c(e,n),u=m(e);return t===e&&i===n?function(t){return t}:function(t){for(var e,i=t,n=0;n<4;n++){var r=(3*s*(e=i)+2*a)*e+o;if(0===r)break;i-=(d(i,s,a,o)-t)/r}return d(i,h,l,u)}}function s(e,t){var i="start"===t?Math.ceil:Math.floor;return function(t){return i(e*t)/e}}Object.defineProperty(i,"__esModule",{value:!0}),i.makeBezier=n,i.makeSteps=s,i.stepMiddle=v;var a=i.linear=n(0,0,1,1);a.reverse=a;var o=i.ease=n(.25,.1,.25,1);o.reverse=o;var h=i.easeIn=n(.42,0,1,1),l=i.easeOut=n(0,0,.58,1);(h.reverse=l).reverse=h;var u=i.easeInOut=n(.42,0,.58,1);u.reverse=u;var f=i.stepStart=s(1,"start"),p=i.stepEnd=s(1,"end");function v(t){return.5<=t?1:0}(f.reverse=p).reverse=f,v.reverse=v},{}],12:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.Viewport=void 0;var n=t("./Camera"),r=t("events"),s=i.Viewport=Object.create(r.EventEmitter.prototype);s.init=function(t,e){var i=this;return r.EventEmitter.call(this),this.presentation=t,this.editMode=!!e,this.cameras=[],this.mouseDragX=0,this.mouseDragY=0,this.dragMode="translate",this.clipMode={cameras:[],operation:"select"},this.showHiddenElements=!1,this.wheelTimeout=null,this.dragHandler=function(t){return i.onDrag(t)},this.dragEndHandler=function(t){return i.onDragEnd(t)},this},s.makeUniqueId=function(t){for(var e=Math.floor(1e3*(1+9*Math.random())),i=void 0;i=t+e,e++,this.svgRoot.getElementById(i););return i},s.onLoad=function(){var e=this;this.svgRoot.addEventListener("mousedown",function(t){return e.onMouseDown(t)},!1),this.svgRoot.addEventListener("mousemove",function(t){return e.onMouseMove(t)},!1),this.svgRoot.addEventListener("contextmenu",function(t){return e.onContextMenu(t)},!1);var t="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll";return this.svgRoot.addEventListener(t,function(t){return e.onWheel(t)},!1),this.cameras=this.presentation.layers.map(function(t){return Object.create(n.Camera).init(e,t)}),this},Object.defineProperty(s,"ready",{get:function(){return!(!this.presentation.document||!this.presentation.document.root)}}),Object.defineProperty(s,"svgRoot",{get:function(){return this.presentation.document.root}}),s.getLayer=function(e){return this.layers.filter(function(t){return t.nodeId===e})[0]},s.onContextMenu=function(t){t.stopPropagation(),t.preventDefault(),this.emit("click",2,t)},s.onMouseMove=function(t){if("clip"===this.dragMode)switch(this.getClipMode(t).operation){case"select":this.svgRoot.style.cursor="crosshair";break;case"n":case"s":this.svgRoot.style.cursor="ns-resize";break;case"w":case"e":this.svgRoot.style.cursor="ew-resize";break;case"nw":case"se":this.svgRoot.style.cursor="nwse-resize";break;case"ne":case"sw":this.svgRoot.style.cursor="nesw-resize";break;case"move":this.svgRoot.style.cursor="move";break;default:this.svgRoot.style.cursor="default"}else this.svgRoot.style.cursor="default"},s.onMouseDown=function(t){t.stopPropagation(),t.preventDefault(),0===t.button&&(this.mouseDragged=!1,this.mouseDragChangedState=!1,this.mouseDragX=this.mouseDragStartX=t.clientX,this.mouseDragY=this.mouseDragStartY=t.clientY,document.documentElement.addEventListener("mousemove",this.dragHandler,!1),document.documentElement.addEventListener("mouseup",this.dragEndHandler,!1),"clip"===this.dragMode&&(this.clipMode=this.getClipMode(t))),this.emit("mouseDown",t.button)},s.getClipMode=function(t){var a=t.clientX-this.x,o=t.clientY-this.y,h={nw:[],sw:[],ne:[],se:[],w:[],e:[],n:[],s:[],move:[]},e=this.cameras.filter(function(t){return t.selected});for(var i in e.forEach(function(t){var e=t.clipRect;if(a>=e.x-3&&a<=e.x+e.width+3&&o>=e.y-3&&o<=e.y+e.height+3){var i=a<=e.x+3,n=a>=e.x+e.width-3-1,r=o<=e.y+3,s=o>=e.y+e.height-3-1;h[i||n||r||s?(r?"n":s?"s":"")+(i?"w":n?"e":""):"move"].push(t)}}),h)if(h[i].length)return{cameras:h[i],operation:i};return{cameras:e,operation:"select"}},s.onDrag=function(t){t.stopPropagation();var e=t.clientX-this.x-this.width/2,i=t.clientY-this.y-this.height/2,n=180*Math.atan2(i,e)/Math.PI,r=t.clientX,s=t.clientY,a=Math.sqrt(e*e+i*i),o=t.clientX-this.mouseDragX,h=t.clientY-this.mouseDragY;if(!this.mouseDragged&&(5<Math.abs(o)||5<Math.abs(h))&&(this.mouseDragged=!0,this.rotateStart=this.rotatePrev=n,this.translateStartX=this.translateXPrev=r,this.translateStartY=this.translateYPrev=s,this.zoomPrev=a,this.emit("dragStart")),this.mouseDragged){var l=this.dragMode;switch("translate"==l&&(t.altKey?l="scale":t.shiftKey&&(l="rotate")),l){case"scale":(this.editMode||this.presentation.enableMouseZoom)&&(0!==this.zoomPrev&&(this.zoom(a/this.zoomPrev,this.width/2,this.height/2),this.mouseDragChangedState=!0),this.zoomPrev=a);break;case"rotate":(this.editMode||this.presentation.enableMouseRotation)&&(t.ctrlKey&&(n=10*Math.round((n-this.rotateStart)/10)+this.rotateStart),this.rotate(this.rotatePrev-n),this.mouseDragChangedState=!0,this.rotatePrev=n);break;case"clip":switch(this.clipMode.operation){case"select":this.clip(this.mouseDragStartX-this.x,this.mouseDragStartY-this.y,this.mouseDragX-this.x,this.mouseDragY-this.y);break;case"move":this.clipRel(o,h,o,h);break;case"w":this.clipRel(o,0,0,0);break;case"e":this.clipRel(0,0,o,0);break;case"n":this.clipRel(0,h,0,0);break;case"s":this.clipRel(0,0,0,h);break;case"nw":this.clipRel(o,h,0,0);break;case"ne":this.clipRel(0,h,o,0);break;case"sw":this.clipRel(o,0,0,h);break;case"se":this.clipRel(0,0,o,h)}this.mouseDragChangedState=!0;break;default:(this.editMode||this.presentation.enableMouseTranslation)&&(t.ctrlKey&&(Math.abs(r-this.translateStartX)>=Math.abs(s-this.translateStartY)?s=this.translateStartY:r=this.translateStartX),this.translate(r-this.translateXPrev,s-this.translateYPrev),this.mouseDragChangedState=!0,this.translateXPrev=r,this.translateYPrev=s)}this.mouseDragX=t.clientX,this.mouseDragY=t.clientY}},s.onDragEnd=function(t){t.stopPropagation(),t.preventDefault(),0===t.button?(this.mouseDragged?(this.emit("dragEnd"),this.mouseDragChangedState&&this.emit("userChangeState")):this.emit("click",t.button,t),document.documentElement.removeEventListener("mousemove",this.dragHandler,!1),document.documentElement.removeEventListener("mouseup",this.dragEndHandler,!1)):this.emit("click",t.button,t)},s.onWheel=function(t){var e=this;null!==this.wheelTimeout&&window.clearTimeout(this.wheelTimeout),t.stopPropagation(),t.preventDefault();var i=0,n=!1;0!==(i=t.wheelDelta?t.wheelDelta:t.detail?-t.detail:-t.deltaY)&&(t.shiftKey?(this.editMode||this.presentation.enableMouseRotation)&&(this.rotate(0<i?5:-5),n=!0):(this.editMode||this.presentation.enableMouseZoom)&&(this.zoom(0<i?1.05:1/1.05,t.clientX-this.x,t.clientY-this.y),n=!0)),n&&(this.wheelTimeout=window.setTimeout(function(){e.wheelTimeout=null,e.emit("userChangeState")},200))},Object.defineProperty(s,"x",{get:function(){return this.svgRoot.getScreenCTM().e}}),Object.defineProperty(s,"y",{get:function(){return this.svgRoot.getScreenCTM().f}}),Object.defineProperty(s,"width",{get:function(){return this.svgRoot===document.documentElement?window.innerWidth:this.svgRoot.parentNode.clientWidth}}),Object.defineProperty(s,"height",{get:function(){return this.svgRoot===document.documentElement?window.innerHeight:this.svgRoot.parentNode.clientHeight}}),s.repaint=function(){var i=this;return this.svgRoot.setAttribute("width",this.width),this.svgRoot.setAttribute("height",this.height),this.update(),this.presentation.elementsToHide.forEach(function(t){var e=document.getElementById(t);e&&(e.style.visibility=i.showHiddenElements?"visible":"hidden")}),this},s.update=function(){return this.cameras.forEach(function(t){t.update()}),this},s.setAtStates=function(t){var i=this;return t.forEach(function(t,e){i.cameras[e].initFrom(t)}),this},s.translate=function(e,i){return this.cameras.forEach(function(t){t.selected&&t.translate(e,i)}),this},s.zoom=function(e,i,n){return this.cameras.forEach(function(t){t.selected&&t.zoom(e,i,n)}),this},s.rotate=function(e){return this.cameras.forEach(function(t){t.selected&&t.rotate(e)}),this},s.clip=function(e,i,n,r){return this.clipMode.cameras.forEach(function(t){t.clip(e,i,n,r)}),this},s.clipRel=function(i,n,r,s){return this.clipMode.cameras.forEach(function(t){var e=t.clipRect;i<=e.width+r-1&&n<=e.height+s-1&&t.clip(e.x+i,e.y+n,e.x+e.width+r-1,e.y+e.height+s-1)}),this}},{"./Camera":5,events:15}],13:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.SVGDocumentWrapper=i.DefaultHandler=void 0,i.registerHandler=function(t,e){h[t]=e};var s=t("../utils"),a="http://www.w3.org/2000/svg",o=["g","image","path","rect","circle","ellipse","line","polyline","polygon","text","clippath"],h={};var l=i.DefaultHandler={matches:function(t){return!0},transform:function(t){return this},isLayer:function(t){return!0},getLabel:function(t){return null}};i.SVGDocumentWrapper={asText:"",root:void 0,handler:l,init:function(t){return this.root=t,(0,s.toArray)(this.root.getElementsByTagName("a")).forEach(function(t){t.addEventListener("mousedown",function(t){return t.stopPropagation()},!1)}),this},get isValidSVG(){return this.root instanceof SVGSVGElement},isLayer:function(t){return t instanceof SVGGElement&&t.hasAttribute("id")&&this.handler.isLayer(t)},initFromString:function(t){var e=this;for(var i in this.root=(new DOMParser).parseFromString(t,"image/svg+xml").documentElement,this.handler=l,h)if(h[i].matches(this.root)){console.log("Using handler: "+i),this.handler=h[i];break}if(this.isValidSVG){this.handler.transform(this.root),this.removeViewbox(),this.removeScripts(),this.disableHyperlinks();var n=h["Adobe Illustrator"];n&&this.handler!==n&&n.transform(this.root);var r=document.createElementNS(a,"g");(0,s.toArray)(this.root.childNodes).forEach(function(t){void 0===t.tagName?e.root.removeChild(t):0<=o.indexOf(t.localName)&&(e.isLayer(t)?r.firstChild&&(e.root.insertBefore(r,t),r=document.createElementNS(a,"g")):r.appendChild(t))}),r.firstChild&&this.root.appendChild(r)}return this.asText=(new XMLSerializer).serializeToString(this.root),this},removeViewbox:function(){this.root.removeAttribute("viewBox"),this.root.style.width=this.root.style.height="100%"},removeScripts:function(){(0,s.toArray)(this.root.getElementsByTagName("script")).forEach(function(t){t.parentNode.removeChild(t)})},disableHyperlinks:function(){(0,s.toArray)(this.root.getElementsByTagName("a")).forEach(function(t){t.addEventListener("click",function(t){return t.preventDefault()},!1)})}}},{"../utils":14}],14:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.toArray=function(t){return Array.prototype.slice.call(t)}},{}],15:[function(t,e,i){var h=Object.create||function(t){var e=function(){};return e.prototype=t,new e},a=Object.keys||function(t){var e=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.push(i);return i},s=Function.prototype.bind||function(t){var e=this;return function(){return e.apply(t,arguments)}};function n(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=h(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}((e.exports=n).EventEmitter=n).prototype._events=void 0,n.prototype._maxListeners=void 0;var r,o=10;try{var l={};Object.defineProperty&&Object.defineProperty(l,"x",{value:0}),r=0===l.x}catch(t){r=!1}function u(t){return void 0===t._maxListeners?n.defaultMaxListeners:t._maxListeners}function c(t,e,i,n){var r,s,a;if("function"!=typeof i)throw new TypeError('"listener" argument must be a function');if((s=t._events)?(s.newListener&&(t.emit("newListener",e,i.listener?i.listener:i),s=t._events),a=s[e]):(s=t._events=h(null),t._eventsCount=0),a){if("function"==typeof a?a=s[e]=n?[i,a]:[a,i]:n?a.unshift(i):a.push(i),!a.warned&&(r=u(t))&&0<r&&a.length>r){a.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+a.length+' "'+String(e)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');o.name="MaxListenersExceededWarning",o.emitter=t,o.type=e,o.count=a.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",o.name,o.message)}}else a=s[e]=i,++t._eventsCount;return t}function m(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var t=new Array(arguments.length),e=0;e<t.length;++e)t[e]=arguments[e];this.listener.apply(this.target,t)}}function d(t,e,i){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:i},r=s.call(m,n);return r.listener=i,n.wrapFn=r}function f(t,e,i){var n=t._events;if(!n)return[];var r=n[e];return r?"function"==typeof r?i?[r.listener||r]:[r]:i?function(t){for(var e=new Array(t.length),i=0;i<e.length;++i)e[i]=t[i].listener||t[i];return e}(r):v(r,r.length):[]}function p(t){var e=this._events;if(e){var i=e[t];if("function"==typeof i)return 1;if(i)return i.length}return 0}function v(t,e){for(var i=new Array(e),n=0;n<e;++n)i[n]=t[n];return i}r?Object.defineProperty(n,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(t){if("number"!=typeof t||t<0||t!=t)throw new TypeError('"defaultMaxListeners" must be a positive number');o=t}}):n.defaultMaxListeners=o,n.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this},n.prototype.getMaxListeners=function(){return u(this)},n.prototype.emit=function(t){var e,i,n,r,s,a,o="error"===t;if(a=this._events)o=o&&null==a.error;else if(!o)return!1;if(o){if(1<arguments.length&&(e=arguments[1]),e instanceof Error)throw e;var h=new Error('Unhandled "error" event. ('+e+")");throw h.context=e,h}if(!(i=a[t]))return!1;var l="function"==typeof i;switch(n=arguments.length){case 1:!function(t,e,i){if(e)t.call(i);else for(var n=t.length,r=v(t,n),s=0;s<n;++s)r[s].call(i)}(i,l,this);break;case 2:!function(t,e,i,n){if(e)t.call(i,n);else for(var r=t.length,s=v(t,r),a=0;a<r;++a)s[a].call(i,n)}(i,l,this,arguments[1]);break;case 3:!function(t,e,i,n,r){if(e)t.call(i,n,r);else for(var s=t.length,a=v(t,s),o=0;o<s;++o)a[o].call(i,n,r)}(i,l,this,arguments[1],arguments[2]);break;case 4:!function(t,e,i,n,r,s){if(e)t.call(i,n,r,s);else for(var a=t.length,o=v(t,a),h=0;h<a;++h)o[h].call(i,n,r,s)}(i,l,this,arguments[1],arguments[2],arguments[3]);break;default:for(r=new Array(n-1),s=1;s<n;s++)r[s-1]=arguments[s];!function(t,e,i,n){if(e)t.apply(i,n);else for(var r=t.length,s=v(t,r),a=0;a<r;++a)s[a].apply(i,n)}(i,l,this,r)}return!0},n.prototype.on=n.prototype.addListener=function(t,e){return c(this,t,e,!1)},n.prototype.prependListener=function(t,e){return c(this,t,e,!0)},n.prototype.once=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.on(t,d(this,t,e)),this},n.prototype.prependOnceListener=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.prependListener(t,d(this,t,e)),this},n.prototype.removeListener=function(t,e){var i,n,r,s,a;if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');if(!(n=this._events))return this;if(!(i=n[t]))return this;if(i===e||i.listener===e)0==--this._eventsCount?this._events=h(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,i.listener||e));else if("function"!=typeof i){for(r=-1,s=i.length-1;0<=s;s--)if(i[s]===e||i[s].listener===e){a=i[s].listener,r=s;break}if(r<0)return this;0===r?i.shift():function(t,e){for(var i=e,n=i+1,r=t.length;n<r;i+=1,n+=1)t[i]=t[n];t.pop()}(i,r),1===i.length&&(n[t]=i[0]),n.removeListener&&this.emit("removeListener",t,a||e)}return this},n.prototype.removeAllListeners=function(t){var e,i,n;if(!(i=this._events))return this;if(!i.removeListener)return 0===arguments.length?(this._events=h(null),this._eventsCount=0):i[t]&&(0==--this._eventsCount?this._events=h(null):delete i[t]),this;if(0===arguments.length){var r,s=a(i);for(n=0;n<s.length;++n)"removeListener"!==(r=s[n])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=h(null),this._eventsCount=0,this}if("function"==typeof(e=i[t]))this.removeListener(t,e);else if(e)for(n=e.length-1;0<=n;n--)this.removeListener(t,e[n]);return this},n.prototype.listeners=function(t){return f(this,t,!0)},n.prototype.rawListeners=function(t){return f(this,t,!1)},n.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):p.call(t,e)},n.prototype.listenerCount=p,n.prototype.eventNames=function(){return 0<this._eventsCount?Reflect.ownKeys(this._events):[]}},{}]},{},[3]);</script>
    </body>
</html>
  • Which version of Sozi are you using? 19.04.22 (from the AUR)
  • Which drawing software did you use? Inkscape 0.92.4 5da689c313, 2019-01-14
  • On which platform? 5.4.2-arch1-1 GNU/Linux
  • If your problem happens when playing a presentation, which browsers have you tried? Chromium 79.0.3945.79 Arch Linux (also tried Firefox 70)

I am not sure wether this is a bug or a question, but I noticed that the forum does not accept any syntax highlighting so I decided to post here to facilitate readability of the code segments.

@aumouvantsillage
Copy link
Collaborator

@aumouvantsillage aumouvantsillage commented Dec 12, 2019

Recent versions of web browsers have introduced new security policies that prevent the presenter from working.

This is fixed in the current development version. If you want to try it, you can download Sozi 19.11 from https://drive.google.com/drive/folders/1E368Ur3qV9Ufu1zadiEW1YMgxfswasx6

This version does not add a lot of new features, but a lot of changes have been made internally.
Please tell me if you have any problems with it.

@joelostblom
Copy link
Author

@joelostblom joelostblom commented Dec 13, 2019

Great, thanks for the explanation and the link!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants