UNPKG

@polyv/white-board-sdk

Version:

white board sdk

1 lines 22.9 kB
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){(function(e){!function(e){"use strict";var t,n=function(){try{if(e.URLSearchParams&&"bar"===new e.URLSearchParams("foo=bar").get("foo"))return e.URLSearchParams}catch(e){}return null}(),r=n&&"a=1"===new n({a:1}).toString(),o=n&&"+"===new n("s=%2B").get("s"),i=!n||((t=new n).append("s"," &"),"s=+%26"===t.toString()),a=l.prototype,u=!(!e.Symbol||!e.Symbol.iterator);if(!(n&&r&&o&&i)){var s;a.append=function(e,t){y(this.__URLSearchParams__,e,t)},a.delete=function(e){delete this.__URLSearchParams__[e]},a.get=function(e){var t=this.__URLSearchParams__;return this.has(e)?t[e][0]:null},a.getAll=function(e){var t=this.__URLSearchParams__;return this.has(e)?t[e].slice(0):[]},a.has=function(e){return b(this.__URLSearchParams__,e)},a.set=function(e,t){this.__URLSearchParams__[e]=[""+t]},a.toString=function(){var e,t,n,r,o=this.__URLSearchParams__,i=[];for(t in o)for(n=p(t),e=0,r=o[t];e<r.length;e++)i.push(n+"="+p(r[e]));return i.join("&")},!!o&&n&&!r&&e.Proxy?(s=new Proxy(n,{construct:function(e,t){return new e(new l(t[0]).toString())}})).toString=Function.prototype.toString.bind(l):s=l,Object.defineProperty(e,"URLSearchParams",{value:s});var c=e.URLSearchParams.prototype;c.polyfill=!0,c.forEach=c.forEach||function(e,t){var n=h(this.toString());Object.getOwnPropertyNames(n).forEach((function(r){n[r].forEach((function(n){e.call(t,n,r,this)}),this)}),this)},c.sort=c.sort||function(){var e,t,n,r=h(this.toString()),o=[];for(e in r)o.push(e);for(o.sort(),t=0;t<o.length;t++)this.delete(o[t]);for(t=0;t<o.length;t++){var i=o[t],a=r[i];for(n=0;n<a.length;n++)this.append(i,a[n])}},c.keys=c.keys||function(){var e=[];return this.forEach((function(t,n){e.push(n)})),d(e)},c.values=c.values||function(){var e=[];return this.forEach((function(t){e.push(t)})),d(e)},c.entries=c.entries||function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),d(e)},u&&(c[e.Symbol.iterator]=c[e.Symbol.iterator]||c.entries)}function l(e){((e=e||"")instanceof URLSearchParams||e instanceof l)&&(e=e.toString()),this.__URLSearchParams__=h(e)}function p(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'\(\)~]|%20|%00/g,(function(e){return t[e]}))}function f(e){return e.replace(/[ +]/g,"%20").replace(/(%[a-f0-9]{2})+/gi,(function(e){return decodeURIComponent(e)}))}function d(t){var n={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return u&&(n[e.Symbol.iterator]=function(){return n}),n}function h(e){var t={};if("object"==typeof e)if(g(e))for(var n=0;n<e.length;n++){var r=e[n];if(!g(r)||2!==r.length)throw new TypeError("Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements");y(t,r[0],r[1])}else for(var o in e)e.hasOwnProperty(o)&&y(t,o,e[o]);else{0===e.indexOf("?")&&(e=e.slice(1));for(var i=e.split("&"),a=0;a<i.length;a++){var u=i[a],s=u.indexOf("=");-1<s?y(t,f(u.slice(0,s)),f(u.slice(s+1))):u&&y(t,f(u),"")}}return t}function y(e,t,n){var r="string"==typeof n?n:null!=n&&"function"==typeof n.toString?n.toString():JSON.stringify(n);b(e,t)?e[t].push(r):e[t]=[r]}function g(e){return!!e&&"[object Array]"===Object.prototype.toString.call(e)}function b(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(void 0!==e?e:"undefined"!=typeof window?window:this)}).call(this,n(2))},function(e,t,n){n(0),e.exports=n(3)},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r,o,i,a;n.r(t),n.d(t,"PresentationPlaybackState",(function(){return r})),n.d(t,"PresentationClockState",(function(){return o})),n.d(t,"TransitionPlaybackState",(function(){return i})),n.d(t,"NarrationTrackPlaybackState",(function(){return a})),n.d(t,"BridgeIspring",(function(){return q})),n.d(t,"bridgeIspringTarget",(function(){return z})),function(e){e.PLAYING_SLIDE="playingSlide",e.PLAYING_TRANSITION="playingTransition",e.PAUSED_TRANSITION="pausedTransition",e.PAUSED_SLIDE="pausedSlide",e.SUSPENDED="suspended",e.BUFFERING="buffering"}(r||(r={})),function(e){e.STARTED="started",e.SUSPENDED="suspended",e.BUFFERING="buffering",e.STOPPED="stopped",e.REWINDING="rewinding"}(o||(o={})),function(e){e.PLAYING="playing",e.PAUSED="paused",e.IDLE="idle"}(i||(i={})),function(e){e.ACTIVATED="activated",e.DEACTIVATED="deactivated",e.BUFFERING="buffering"}(a||(a={}));n(0);var u,s,c=function(){return(c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},l=function(){function e(){var e=window.location.search.replace(/^\?/,"");this.queryParams=new URLSearchParams(e),this.handleWindowMessage=this._handleWindowMessage.bind(this)}return e.prototype.connectBridge=function(){window.addEventListener("message",this.handleWindowMessage)},e.prototype.disconnectBridge=function(){window.removeEventListener("message",this.handleWindowMessage)},e.prototype._handleWindowMessage=function(e){if("object"==typeof e.data){var t=e.data;switch(t.message){case s.resize:this.resize(t.params);break;case s.goToPage:this.goToPage(t.params);break;case s.goToStepIndex:this.goToStepIndex(t.params);break;case s.goToNextStep:this.goToNextStep();break;case s.goToPreviousStep:this.goToPreviousStep()}}},e.prototype.sendMessageToParent=function(e){if(parent.location!==window.location){var t=c({pptIdent:this.pptIdent},e);parent.postMessage(t,"*")}},e.prototype.resize=function(e){},e.prototype.goToPage=function(e){},e.prototype.goToStepIndex=function(e){},e.prototype.goToNextStep=function(){},e.prototype.goToPreviousStep=function(){},Object.defineProperty(e.prototype,"defaultCurrentPage",{get:function(){var t=this.queryParams.get("defaultCurrentPage"),n=parseInt(t);return e.checkNumber(n)?n:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultStepIndex",{get:function(){var t=this.queryParams.get("defaultStepIndex"),n=parseInt(t);return e.checkNumber(n)?n:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pptIdent",{get:function(){return this.queryParams.get("pptIdent")||""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this.queryParams.get("whiteVersion")||""},enumerable:!1,configurable:!0}),e.checkNumber=function(e){return"number"==typeof e&&!isNaN(e)&&e>=0&&e!==1/0},e}();!function(e){e.Picture="picture",e.Animation="animation"}(u||(u={})),function(e){e.ispringInited="ispringInited",e.resize="resize",e.goToNextStep="goToNextStep",e.goToPreviousStep="goToPreviousStep",e.goToPage="goToPage",e.goToStepIndex="goToStepIndex"}(s||(s={}));var p=Object.prototype.hasOwnProperty;function f(e,t){return p.call(e,t)}function d(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=0;t<(arguments.length<=1?0:arguments.length-1);t++){var n=t+1<1||arguments.length<=t+1?void 0:arguments[t+1];if(null!=n)for(var r in n)"__proto__"!==r&&f(n,r)&&(e[r]=n[r])}return e}var h=Object.prototype.toString;function y(e,t){var n,r,o=d({encode:encodeURIComponent},t),i=[];function a(e,t){null==t&&(t=""),""===t&&o.ignoreEmpty||("function"==typeof o.encode&&(e=o.encode(e),t=o.encode(String(t))),i.push(e+"="+t))}function u(e){a(n,e)}for(n in e)f(e,n)&&(r=e[n],Array.isArray(r)?r.forEach(u):a(n,r));return i.join("&")}function g(e,t,n){if(null==e||null==t)return e;var r=(e=String(e)).indexOf("#"),o="";return-1!==r&&(o=e.substring(r,e.length),e=e.substring(0,r)),(e=e.replace(/[?&]$/,""))+((t="string"!=typeof t?y(t,n):t.replace(/^[?&]/,""))?(-1!==e.indexOf("?")?"&":"?")+t:"")+o}function b(e){return(b="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 v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function S(e,t){if(t&&("object"===b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function m(e){var t="function"==typeof Map?new Map:void 0;return(m=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return w(e,arguments,I(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),T(r,e)})(e)}function w(e,t,n){return(w=P()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&T(o,n.prototype),o}).apply(null,arguments)}function P(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function T(e,t){return(T=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(e){return(I=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");Object.defineProperty(e,"prototype",{value:Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),writable:!1}),t&&T(e,t)}(u,e);var t,n,r,o,i,a=(t=u,n=P(),function(){var e,r=I(t);if(n){var o=I(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return S(this,e)});function u(e,t,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(r=a.call(this,n)).isCancel=!1,r.isTimeout=!1,r.xhr=e,r.options=t,r.name="AJAXError",r}return r=u,o&&v(r.prototype,o),i&&v(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r}(m(Error));var E=/(?:^|;\s*)(?:application|text)\/([a-z]+)/i;function O(e,t,n,r){return function(){var o,i;switch(t.responseType||function(e){return e&&E.test(e)?RegExp.$1.toLowerCase():""}(e.getResponseHeader("Content-Type"))){case"json":try{o=JSON.parse(e.responseText)}catch(e){i="Invalid JSON structure"}break;case"xml":(o=e.responseXML)&&o.documentElement||(i="Invalid XML format");break;case"blob":o=e.response;break;default:o=e.responseText}var a,u=e.status;!function(e){return!(void 0===e||e>=200&&e<300||1223===e||304===e)}(u)?i&&(a=new _(e,t,i)):a=new _(e,t,"Error (HTTP status code: "+u+")"),a?(a.code=u,a.data=o,r(Object.freeze(a))):n(Object.freeze({xhr:e,options:t,data:o}))}}var j=Object.create(null),x=0;function C(e,t,n,r){e.onload=O(e,t,n,r),e.ontimeout=function(){r(Object.freeze(function(e,t,n){var r=new _(e,t,n||"Request timeout");return r.isTimeout=!0,r}(e,t)))},e.onerror=function(){r(Object.freeze(new _(e,t,"Network error")))},t.onDownloadProgress&&e.addEventListener("progress",t.onDownloadProgress),t.onUploadProgress&&e.upload&&e.upload.addEventListener("progress",t.onUploadProgress),x===Number.MAX_SAFE_INTEGER&&(x=0);var o=++x;return j[o]={xhr:e,options:t,resolve:n,reject:r},o}function k(e){delete j[e]}function R(e,t,n,r,o){return e&&/MSIE\s+(\d+)/.test(navigator.userAgent)&&parseInt(RegExp.$1)<10&&window.XDomainRequest&&("get"===t||"post"===t)&&!n&&!o&&function(e){if(null!=e){if(Array.isArray(e))return!e.length;for(var t in e)if(f(e,t))return!1}return!0}(r)?new window.XDomainRequest:new window.XMLHttpRequest}function L(e,t,n,r){var o,i;if(null!=n&&"get"!==e)return"json"===r?(o="string"==typeof n?n:JSON.stringify(n),i="application/json; charset=utf-8"):"string"==typeof(o=function(e){return"[object Object]"===h.call(e)}(n)?y(n,{ignoreEmpty:!1}):n)&&(i="application/x-www-form-urlencoded; charset=utf-8"),t["Content-Type"]=t["Content-Type"]||i,o}function N(e,t){var n=0;return new Promise((function(r,o){var i=d({},t);i.method=i.method||"get",i.requestType=i.requestType||"",i.responseType=i.responseType||"json",i.timeout=i.timeout||0,i.method=i.method.toLowerCase(),i.requestType=i.requestType.toLowerCase(),i.headers=i.headers||{},Object.freeze(i);var a=function(e){var t=document.createElement("div");t.innerHTML='<a href="'+e+'"></a>';var n=t.firstChild,r=n.host!==location.host;return t=null,n=null,r}(e=function(e,t,n){return null!=t&&(e=g(e,t,{ignoreEmpty:!1})),n&&(e=g(e,{_:Date.now()})),e}(e,i.params,i.preventCaching)),u=R(a,i.method,i.requestType,i.headers,i.withCredentials);n=C(u,i,(function(e){k(n),r(e)}),(function(e){k(n),o(e)})),"blob"!==i.responseType&&"arraybuffer"!==i.responseType||(u.responseType=i.responseType),u.open(i.method,e,!0,i.username,i.password);var s=L(i.method,i.headers,i.data,i.requestType);(function(e,t,n,r){t.timeout&&(e.timeout=t.timeout),n&&null!=t.withCredentials&&(e.withCredentials=!!t.withCredentials),n||null!=r["X-Request-With"]||(r["X-Request-With"]="XMLHttpRequest"),Object.keys(r).forEach((function(t){null!=r[t]&&e.setRequestHeader(t,String(r[t]))}))})(u,i,a,i.headers),"function"==typeof i.beforeSend&&i.beforeSend.call(window,u),u.send(s||""),"function"==typeof i.receiveCancelId&&i.receiveCancelId(n)}))}var A,U=(A=function(e,t){return(A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}A(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),D=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},M=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};var q=function(e){function t(t){var n=e.call(this)||this;return n.player=t.player,n.presentation=n.player.presentation(),n.view=n.player.view(),n.playbackCtrl=n.view.playbackController(),n.clockCtrl=n.playbackCtrl.clock(),n.isFirstSlideChangeEvent=!0,n.isFirstStepChangeEvent=!0,n.connectBridge(),n.handleIspringInited(),n.listenPlaybackEvent(),n.__checkVHall(),n}return U(t,e),t.prototype.listenPlaybackEvent=function(){var e=this;this.playbackCtrl.slideChangeEvent().addHandler((function(t){if(e.isFirstSlideChangeEvent&&0===t)e.isFirstSlideChangeEvent=!1;else{var n=e.getCurrentSlideStepInfo(),r={message:s.goToPage,params:{page:t,stepInfo:n}};e.sendMessageToParent(r)}})),this.playbackCtrl.stepChangeEvent().addHandler((function(t){if(e.isFirstStepChangeEvent||-1===t)e.isFirstStepChangeEvent=!1;else{var n={message:s.goToStepIndex,params:{stepIndex:t}};e.sendMessageToParent(n)}}))},t.prototype.handleIspringInited=function(){return D(this,void 0,void 0,(function(){var e,t,n,r,o,i,a,u,c,l;return M(this,(function(p){switch(p.label){case 0:return[4,this.waitClockInit()];case 1:if(p.sent(),e={message:s.ispringInited,params:{stepInfo:this.getCurrentSlideStepInfo()}},this.sendMessageToParent(e),this.defaultCurrentPage||this.defaultStepIndex){if(n=(t=this).defaultCurrentPage,r=t.defaultStepIndex,n>this.totalSlide-1)return[2];if(!(o=this.presentation.slides().getSlide(n)))return[2];if(i=r,r>o.animationSteps().count()-1&&(i=o.animationSteps().count()-1),!(a=o.animationSteps().getStep(i)))return[2];u=a.startTime(),c=a.duration(),l=u+c,this.playbackCtrl.gotoTimestamp(n,i,l,!1)}return[2]}}))}))},t.prototype.waitClockInit=function(){var e=this;return this.clockInitPromise||(this.clockInitPromise=new Promise((function(t){var n=void 0,r=function(){var r=e.clockCtrl.state();[o.STARTED,o.SUSPENDED].includes(r)&&(t(),n&&(clearInterval(n),n=void 0))};r(),n=window.setInterval((function(){r()}),50)}))),this.clockInitPromise},t.prototype.goToPage=function(e){return D(this,void 0,void 0,(function(){var t;return M(this,(function(n){switch(n.label){case 0:return[4,this.waitClockInit()];case 1:return n.sent(),t=e.page,this.playbackCtrl.gotoSlide(t),[2]}}))}))},t.prototype.goToNextStep=function(){return D(this,void 0,void 0,(function(){return M(this,(function(e){switch(e.label){case 0:return this.isLastSlide&&this.currentSlideIsLastStep?[2]:[4,this.waitClockInit()];case 1:return e.sent(),this.playbackCtrl.gotoNextStep(),[2]}}))}))},t.prototype.goToPreviousStep=function(){return D(this,void 0,void 0,(function(){return M(this,(function(e){switch(e.label){case 0:return[4,this.waitClockInit()];case 1:return e.sent(),this.playbackCtrl.gotoPreviousStep(),[2]}}))}))},t.prototype.goToStepIndex=function(e){return D(this,void 0,void 0,(function(){var t,n,r,o,i,a,u,s;return M(this,(function(c){switch(c.label){case 0:return[4,this.waitClockInit()];case 1:return c.sent(),t=e.stepIndex,n=this.currentSlide.animationSteps().count()-1,t>n&&(t=n),r=this.currentSlide.index(),o=!0,t<this.currentStepIndex&&(o=!1),i=this.currentSlide.animationSteps().getStep(t),a=0,!o&&i&&(u=i.startTime(),s=i.duration(),a=u+s),this.playbackCtrl.gotoTimestamp(r,t,a,!0),[2]}}))}))},t.prototype.resize=function(){this.view.resize(window.innerWidth,window.innerHeight)},t.prototype.getCurrentSlideStepInfo=function(){var e=[],t=this.currentSlideAnimationStepCount;try{for(var n=0;n<t;n++){var r=this.currentSlide.animationSteps().getStep(n);r&&e.push({startTime:r.startTime(),duration:r.duration()})}}catch(e){console.error(e)}return{stepCount:t,stepDuration:this.currentSlideAnimationStepDuration,stepList:e}},Object.defineProperty(t.prototype,"isLastSlide",{get:function(){var e=this.playbackCtrl;return e.currentSlideIndex()===e.lastSlideIndex()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentSlide",{get:function(){return this.playbackCtrl.currentSlide()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentSlideIndex",{get:function(){return this.currentSlide.index()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentStepIndex",{get:function(){return this.clockCtrl.timestamp().stepIndex()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentSlideAnimationStepCount",{get:function(){return this.currentSlide.animationSteps().count()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentSlideAnimationStepDuration",{get:function(){return this.currentSlide.animationSteps().duration()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentSlideIsLastStep",{get:function(){var e=this.currentSlide.animationSteps().count()-1;return this.currentStepIndex===e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"totalSlide",{get:function(){return this.presentation.slides().count()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"docSize",{get:function(){var e,t,n=document.querySelector(".playerView div");return{width:null!==(e=null==n?void 0:n.clientWidth)&&void 0!==e?e:16,height:null!==(t=null==n?void 0:n.clientHeight)&&void 0!==t?t:9}},enumerable:!1,configurable:!0}),t.prototype.__checkElemSize=function(){return D(this,void 0,void 0,(function(){var e,t;return M(this,(function(n){switch(n.label){case 0:e=0,n.label=1;case 1:return e<30?(t=document.querySelector(".playerView div"))&&t.clientWidth?[3,4]:[4,(r=500,new Promise((function(e){setTimeout((function(){e()}),r)})))]:[3,4];case 2:n.sent(),n.label=3;case 3:return e++,[3,1];case 4:return[2]}var r}))}))},t.prototype.__checkVHall=function(){return D(this,void 0,void 0,(function(){var e,t,n,r;return M(this,(function(o){switch(o.label){case 0:if(e=this.queryParams.get("fileId"),t=this.queryParams.get("mode"),!e||"vhall"!==t)return[2];o.label=1;case 1:return o.trys.push([1,4,,5]),[4,this.__checkElemSize()];case 2:return o.sent(),n=this.totalSlide,r=this.docSize,[4,N("http://pm-sales.igeeker.org/api/pm/ispring_data",{method:"post",data:{file_id:e,supplier:"vhall",width:r.width,height:r.height,count:n}})];case 3:return o.sent(),[3,5];case 4:return o.sent(),[3,5];case 5:return[2]}}))}))},t}(l),z={register:function(e){console.info("[white-board-ispring][info][project info]: [version: 3.15.0][buildTime: Thu Mar 20 2025 11:14:27 GMT+0800 (Coordinated Universal Time)]"),document.documentElement.style.backgroundColor="rgba(0, 0, 0, 0)",window.bridgeIspring=new q({player:e})}}}])}));