/*! For license information please see 4.js.LICENSE.txt */
(self.webpackChunkFBPublication=self.webpackChunkFBPublication||[]).push([[4],{462:function(t,e){"use strict";e.Z={computed:{fullPdf:function(){return this.$store.state.downloads.allPagesVisible&&this.$store.getters["downloads/getFullPdf"]},customFiles:function(){return this.$store.getters["downloads/getCustomFiles"]},pageFiles:function(){return this.$store.state.downloads.currentPagesVisible&&this.$store.getters["downloads/getPageFiles"]},windowTitle:function(){return this.$i18n.t("SaveWindow.TITLE")},fullTooltip:function(){return this.$t("SaveWindow.SAVE_FULL_PUBLICATION_TOOLTIP")},pagesTitle:function(){return{full:this.$t("SaveWindow.FULL_PUBLICATION"),left:this.$t("SaveWindow.SAVE_LEFT_PAGE"),right:this.$t("SaveWindow.SAVE_RIGHT_PAGE"),one:this.$t("SaveWindow.SAVE_CURRENT_PAGE"),withNotes:this.$t("SaveWindow.SAVE_WITH_NOTES"),cancel:this.$t("SaveWindow.CANCEL_BUTTON")}},pagesTooltip:function(){return{full:this.$t("SaveWindow.SAVE_FULL_PUBLICATION_TOOLTIP"),left:this.$t("SaveWindow.SAVE_LEFT_PAGE_TOOLTIP"),right:this.$t("SaveWindow.SAVE_RIGHT_PAGE_TOOLTIP"),one:this.$t("SaveWindow.SAVE_CURRENT_PAGE_TOOLTIP")}},infoMessages:function(){return{info:this.$t("SaveWindow.EMBED_NOTES_INFO"),error:this.$t("SaveWindow.ERROR_MESSAGE"),waiting:this.$t("SaveWindow.WAITING")}},pagerState:function(){return this.$store.getters["pager/legacyState"]}}}},6411:function(t,e,i){"use strict";var s=i(1443);e.Z={methods:{movePagerLeft:function(t){var e=t.target;(0,s.oJ)(this.$store,{target:e})},movePagerRight:function(t){var e=t.target;(0,s.X0)(this.$store,{target:e})},movePagerLeftmost:function(t){var e=t.target,i=void 0===e?null:e,o=t.navTarget,r=void 0!==o&&o;(0,s.tc)(this.$store,{target:i,navTarget:r})},movePagerRightmost:function(t){var e=t.target,i=void 0===e?null:e,o=t.navTarget,r=void 0!==o&&o;(0,s.w9)(this.$store,{target:i,navTarget:r})}}}},3866:function(t,e){"use strict";e.Z={props:{itemData:{type:[Object,Array],required:!0}},name:"SearchResultItem",computed:{isItemDataArray:function(){return Array.isArray(this.itemData)},pageId:function(){return this.isItemDataArray?this.itemData[0].pageId:this.itemData.pageId},textData:function(){return this.isItemDataArray?this.itemData[0].relevance<=this.itemData[1].relevance?this.itemData[0].text:this.itemData[1].text:this.itemData.text},title:function(){var t;if(this.$store.state.pager.spreadMode)if(this.isItemDataArray){var e=this.$store.getters["pages/pageCaptionById"]({id:this.itemData[0].pageId.toString()}),i=this.$store.getters["pages/pageCaptionById"]({id:this.itemData[1].pageId.toString()});if(this.$store.state.book.rightToLeft){var s=[i,e];e=s[0],i=s[1]}t=e+" - "+i}else{var o=this.$store.getters["pages/pageIndexById"](this.pageId.toString()),r=o%2==0?o-1:o+1,n=this.$store.getters["pages/pageIdByIndex"](r),a=this.$store.getters["pages/pageCaptionById"]({id:this.pageId.toString()});if(n){var h=this.$store.getters["pages/pageCaptionById"]({id:n.toString()});if(this.$store.state.book.rightToLeft){var l=[h,a];a=l[0],h=l[1]}t=o>r?h+" - "+a:a+" - "+h}else t=a}else t=this.$store.getters["pages/pageCaptionById"]({id:this.pageId.toString(),forceFullWide:this.itemData.isWide&&!this.itemData.isDivided,widePageSecondHalf:this.itemData.widePageSecondHalf});return this.$i18n.t("SearchToolWindow.PAGE_NUMBER",{0:t})},moreResults:function(){var t=this.isItemDataArray?this.itemData[0].count+this.itemData[1].count:this.itemData.count;return t>1?"..."+this.$i18n.tc("SearchToolWindow.MORE_RESULTS",t-1,{0:t-1}):null}}}},2248:function(t,e,i){"use strict";var s=i(6382),o=i.n(s);e.Z={data:function(){return{tempTimeout:null,showClear:!1,inputDir:this.$store.getters["i18n/isLocaleRtl"]?"rtl":"ltr"}},computed:{results:function(){return this.$store.state.search.results},progress:function(){return this.$store.getters["search/getProgress"]},isSearching:function(){return 100!==this.progress&&null!==this.progress},isInitializing:function(){return this.$store.getters["search/isInitializing"]},preloaderVisible:function(){return this.isSearching||this.isInitializing&&!this.searchQueryIsEmpty},searchQueryIsEmpty:function(){return 0===this.$store.state.search.query.length},exactMatch:{get:function(){return this.$store.state.search.exactMatch},set:function(t){this.$store.dispatch("search/setExactMatch",{component:"search",value:t}),this.updateSearchQuery()}}},methods:{input:function(t){if(t){if(this.showClear=!0,!t.trim())return}else this.showClear=!1;this.tempTimeout&&clearTimeout(this.tempTimeout),this.tempTimeout=setTimeout((function(){this.$refs.searchInput&&(this.tempTimeout=null,this.$root.log("search.query",this.$refs.searchInput.value),this.updateSearchQuery())}).bind(this),500),this.setInputDir()},updateSearchQuery:function(){var t=this.$refs.searchInput.value;t=t.trim().replace(/\s*(\s)\s*/gm,"$1"),this.$store.dispatch("search/setQuery",{value:t})},clear:function(){this.$refs.searchInput.value&&(this.$store.dispatch("search/setQuery",{value:""}),this.$refs.searchInput.value="",this.showClear=!1,this.$nextTick(this.focusInput)),this.setInputDir()},setInputDir:function(){if(this.$refs.searchInput.value){var t=o().getDirection(this.$refs.searchInput.value);this.inputDir=t?"ltr"===t?"ltr":"rtl":"ltr"}else this.inputDir=this.$store.getters["i18n/isLocaleRtl"]?"rtl":"ltr"}}}},663:function(t,e,i){"use strict";var s=i(6382),o=i.n(s),r=i(7503);e.Z={props:{data:{type:Object,required:!0}},components:{thumb:r.Z},computed:{singleMode:function(){return this.$store.state.pager.singleMode},textDirection:function(){return o().getDirection(this.data.caption)},itemStyles:function(){var t={};return this.data.size&&(t.width=this.data.size.width+"px",t.height=this.data.size.height+"px"),t},slideMode:function(){return this.$store.state.pager.slideMode},contentCrop:function(){return this.slideMode&&this.$store.state.book.contentCrop}}}},3549:function(t,e){"use strict";e.Z={computed:{title:function(){return this.$i18n.t("ThumbnailsToolWindow.TITLE")},isRtl:function(){return this.$store.state.book.rightToLeft},pagerState:function(){return this.$store.getters["pager/state"]},singleMode:function(){return this.pagerState.singleMode},slideMode:function(){return this.pagerState.slideMode},mode:function(){return this.pagerState.mode},contentCrop:function(){return this.slideMode&&this.$store.state.book.contentCrop},thumbSizes:function(){return this.getThumbSizes(!1)},thumbDoubleSizes:function(){return this.getThumbSizes(!0)},hasPages:function(){return this.$store.getters["pages/pagesCount"]>0},numerationOffset:function(){return this.$store.state.book.numerationOffset},lowercaseRomans:function(){return this.$store.state.workspace.lowercaseRomans}}}},3760:function(t,e,i){"use strict";var s=i(6382),o=i.n(s),r=i(8531);e.Z={props:{itemData:{type:Object,required:!0},depth:{type:[Number,String],default:0}},computed:{width:function(){return this.depth<=2?214-20*this.depth:154},pageLabel:function(){return this.$store.getters["pages/pageCaptionByIndex"](this.itemData.page-1)},itemTitle:function(){return""+(0,r.jJ)((0,r.m9)(this.itemData.title)).replace(/\n/g,"")+""},textDirection:function(){return o().getDirection(this.itemData.title)},isLocaleRtl:function(){return this.$store.getters["i18n/isLocaleRtl"]}},methods:{toggleOpen:function(t){this.$store.dispatch("toc/toggleState",this.itemData)},refresh:function(){this.$parent.refresh()}},updated:function(){this.$parent.refresh()},mounted:function(){this.$parent.refresh()}}},8002:function(t,e){"use strict";e.Z={computed:{tocItems:function(){return this.$store.state.toc.enabled?this.$store.state.toc.children:[]},level2Items:function(){if(this.$store.state.toc.children)for(var t=0,e=this.$store.state.toc.children.length;t'}})},8856:function(t,e,i){i(4147).register({"add-note":{width:16,height:16,viewBox:"0 0 24 24",data:''}})},607:function(t,e,i){i(4147).register({"arrow-down":{width:16,height:16,viewBox:"0 0 24 24",data:''}})},464:function(t,e,i){i(4147).register({"book-first":{width:16,height:16,viewBox:"0 0 24 24",data:''}})},925:function(t,e,i){i(4147).register({"book-last":{width:16,height:16,viewBox:"0 0 24 24",data:''}})},9036:function(t,e,i){i(4147).register({"book-next":{width:16,height:16,viewBox:"0 0 24 24",data:''}})},6965:function(t,e,i){i(4147).register({"book-prev":{width:16,height:16,viewBox:"0 0 24 24",data:''}})},2731:function(t,e,i){i(4147).register({cancel:{width:16,height:16,viewBox:"0 0 24 24",data:''}})},3374:function(t,e,i){i(4147).register({"chevron-right":{width:24,height:24,viewBox:"0 0 24 24",data:''}})},1691:function(t,e,i){i(4147).register({cross:{width:24,height:24,viewBox:"0 0 24 24",data:''}})},5274:function(t,e,i){i(4147).register({"down-arrow":{width:16,height:16,viewBox:"0 0 16 16",data:''}})},2209:function(t,e,i){i(4147).register({drag:{width:16,height:16,viewBox:"0 0 100 100",data:''}})},9074:function(t,e,i){i(4147).register({equalizer:{width:100,height:100,viewBox:"0 0 100 100",data:''}})},5903:function(t,e,i){i(4147).register({fullscreen:{width:16,height:16,viewBox:"0 0 24 24",data:''}})},5843:function(t,e,i){i(4147).register({"mobile-left":{width:16,height:16,viewBox:"0 0 24 40",data:''}})},9117:function(t,e,i){i(4147).register({"mobile-right":{width:16,height:16,viewBox:"0 0 24 40",data:''}})},2150:function(t,e,i){i(4147).register({"note-content":{width:16,height:16,viewBox:"0 0 24 24",data:''}})},6722:function(t,e,i){i(4147).register({"open-link":{width:16,height:16,viewBox:"0 0 24 24",data:''}})},5958:function(t,e,i){i(4147).register({"rounded-close":{width:16,height:16,viewBox:"0 0 16 16",data:''}})},6010:function(t,e,i){i(4147).register({search:{width:24,height:24,viewBox:"0 0 24 24",data:''}})},169:function(t,e,i){i(4147).register({text:{width:16,height:16,viewBox:"0 0 30 30",data:''}})},5606:function(t,e,i){i(4147).register({thumbnails:{width:16,height:16,viewBox:"0 0 24 24",data:''}})},6062:function(t,e,i){i(4147).register({"trash-can":{width:16,height:16,viewBox:"0 0 24 24",data:''}})},6177:function(t,e,i){i(4147).register({error:{width:16,height:16,viewBox:"0 0 128 128",data:''}})},5284:function(t,e,i){i(4147).register({"made-with":{width:119,height:30,viewBox:"0 0 119 30",data:''}})},1619:function(t,e,i){i(4147).register({"page-wide":{width:500,height:370,viewBox:"0 0 500 370",data:''}})},9719:function(t,e,i){i(4147).register({page:{width:250,height:370,viewBox:"0 0 250 370",data:''}})},148:function(t,e,i){i(4147).register({replay:{width:16,height:16,viewBox:"0 0 70 70",data:''}})},2358:function(t,e,i){"use strict";function s(t){var e=t.filenameOrUrl,i=t.relativePath,s=void 0===i?"assets/pages/content/":i,o=t.encode,r=void 0!==o&&o;return/^(?:https?|medialib):\/\//.test(e)?e:s+(r?encodeURIComponent(e):e)}i.d(e,{n:function(){return s}})},2567:function(t,e,i){"use strict";var s=i(320),o={cTest:!1,id:function(t){return document.getElementById(t)},tag:function(t){return document.getElementsByTagName(t)[0]},tags:function(t){return document.getElementsByTagName(t)},byClass:function(t){return document.getElementsByClassName(t)},add:function(t){return document.createElement(t)},round:function(t,e){e=e||0;for(var i=1,s=0;s=1.5&&(i*=1.5);var s=e.sizes.reduce((function(t,e){return tt?e:t:e>=i&&e0&&void 0!==arguments[0]?arguments[0]:this.pageId;this.renderContent&&this.$pageRegistry.registerPage(t,this.pageSide,this)},deregisterPage:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.pageId;this.renderContent&&this.$pageRegistry.deregisterPage(t,this.pageSide)},getSpreadTwin:function(){var t=this.$store.getters["pager/state"];return this.isCurrent&&t.spreadMode?this.pageId!==t.leftPage||this.isWide&&"right"===this.pageSide?this.pageId===t.rightPage?this.$pageRegistry.getPageComponent(t.leftPage,"left"):null:this.$pageRegistry.getPageComponent(t.rightPage,"right"):null},getDownloadProgress:function(){this.isDownloaded=this.$store.getters["pages/isDownloaded"](this.pageId)}},computed:{showThumbnail:function(){return this.isReady&&this.isDownloaded&&!this.hasError},isMobile:function(){return this.$store.getters["workspace/isMobile"]},isRTLBook:function(){return this.$store.state.book.rightToLeft},apiChange:function(){return this.$store.state.pages.apiChange},changeProperty:function(){return this.$store.state.pages.changeInPage},downloadProgressUpdated:function(){return this.$store.state.pages.downloadProgressUpdated},contentFreezed:function(){return"pending"!==this.$store.state.pager.flipState},updatePending:function(){return!this.isMobile&&this.isZoomed&&this.$store.getters["pages/pageProp"](this.pageId,"updatePending")},preloaderHeader:function(){return this.hasError?this.$t("Other.PAGE_ERROR_TITLE"):null},preloaderText:function(){return this.hasError?this.$t("Other.PAGE_ERROR_MESSAGE"):this.isReady?this.isDownloaded?null:this.$t("Other.DOWNLOADING_PAGE"):this.$t("Other.CONVERTING_PAGE")},backgroundLuma:function(){return this.backgroundColor?(0,c.R)((0,c.l)(this.backgroundColor)):1},enforceTransparentBg:function(){return this.$store.state.workspace.alteredSVGColors&&this.$store.state.workspace.userAgentInfo.browser.samsung},isZoomed:function(){return this.$store.state.pages.size.zoomFactor>1},dir:function(){return this.$store.getters["i18n/isLocaleRtl"]?"rtl":"ltr"},isResizing:function(){return this.$store.state.workspace.isResizing},isPreloaderShown:function(){return this.$store.state.workspace.preloader},pageWidthMultiplier:function(){return this.isWide&&"both"===this.pageSide?2:1},pagesSize:function(){return this.$store.getters["pages/size"]},contentSize:function(){if(this.pageId){var t=this.isOutsideHardcover&&parseInt(this.propWidth,10)===parseInt(this.$store.state.book.bookSize.width,10)&&parseInt(this.propHeight,10)===parseInt(this.$store.state.book.bookSize.height,10)?"FILL":null;return this.$store.getters["pages/contentSize"]({pageID:this.pageId,pageSide:this.pageSide,pageSize:this.pageSize,resizeOverride:t})}return{width:0,height:0,offsetX:0,offsetY:0,scaleRatio:{w:0,h:0}}}}},p=i(6411),g=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-touch",{class:"selecttext"+(t.showCanvas?" active":""),style:t.contStyle,on:{pan:t.pan,panstart:t.reset,panend:t.panEnd,pancancel:t.panEnd}},[t.showCanvas?i("canvas",{class:t.canvasClass,style:{position:"absolute",right:t.isWide&&"right"===t.pageSide?0:"none"},attrs:{width:t.containerSize.width,height:t.containerSize.height}}):t._e(),t._v(" "),t._l(t.textBlockSizes,(function(e,s){return i("div",{staticClass:"text-block",style:{width:e.width+"px",top:e.top+"px",left:e.left+"px",height:e.height+"px"},attrs:{"data-set":"select-text-block"}},[t.inspectorMode?i("span",{staticClass:"block-inspector-mode"},[t._v(t._s(s))]):t._e(),t._v(" "),t._l(t.finalTree[s].lines,(function(s,o){return t.inspectorMode?i("span",{staticClass:"line-inspector-mode",style:{top:s.top*t.containerSize.scaleRatio.h-e.top+"px",left:s.left*t.containerSize.scaleRatio.w-e.left+"px",width:s.width*t.containerSize.scaleRatio.w+"px",height:s.height*t.containerSize.scaleRatio.h+"px"}},[t._v(t._s(o))]):t._e()}))],2)}))],2)},f=[];function m(t,e){return S(t)||b(t,e)||x(t,e)||v()}function v(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function b(t,e){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var s,o,r,n,a=[],h=!0,l=!1;try{if(r=(i=i.call(t)).next,0===e){if(Object(i)!==i)return;h=!1}else for(;!(h=(s=r.call(i)).done)&&(a.push(s.value),a.length!==e);h=!0);}catch(t){l=!0,o=t}finally{try{if(!h&&null!=i.return&&(n=i.return(),Object(n)!==n))return}finally{if(l)throw o}}return a}}function S(t){if(Array.isArray(t))return t}function y(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=x(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var s=0,o=function(){};return{s:o,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,n=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return n=t.done,t},e:function(t){a=!0,r=t},f:function(){try{n||null==i.return||i.return()}finally{if(a)throw r}}}}function w(t){return P(t)||$(t)||x(t)||k()}function k(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function x(t,e){if(t){if("string"==typeof t)return z(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?z(t,e):void 0}}function $(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function P(t){if(Array.isArray(t))return z(t)}function z(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,s=new Array(e);i=e.bottom&&t.left<=e.left&&t.right>=e.right?{rectCrossed:!1,fullSelected:!0}:t.top<=e.top&&t.bottom>=e.bottom&&(t.left>=e.left&&t.left<=e.right||t.right<=e.right&&t.right>=e.left)?{rectCrossed:!0,fullSelected:!0}:t.bottome.bottom||t.left>e.right||t.righte.top&&t.bottom>e.bottom,o=t.tope.top&&t.bottom>e.bottom),"right"===t.cursorHSide?(r=e.right>t.right&&e.leftt.left&&e.leftt.left&&e.leftt.right&&e.leftt.top,h=e.topt.bottom):(n=e.topt.bottom,h=e.topt.top),{activePoint:r&&n,startPoint:a&&h,leftSelected:s,rightSelected:o,rectCrossed:!0,fullSelected:!1});var s,o,r,n,a,h}I.prototype.selectSymbols=function(t,e){var i=this._intersectRects(t,e);return this._collectSelectedBlocks(i),this._collectSelectedLines(i),this._collectSelectedSymbols(i),this._getSelectedSymbols(e)},I.prototype._collectSelectedBlocks=function(t){this.crossInfos=this._getCrossInfos(t);for(var e=this.crossInfos.filter((function(t){return t.startPoint||t.activePoint})).length<2,i=0,s=this.finalTree.length;ithis.finalTree[o].lines[r].top&&n.bottomthis.finalTree[o].lines[r].top&&n.topthis.finalTree[o].lines[r].top&&n.topthis.finalTree[o].lines[r].top&&n.bottom0&&(n.push(this._getLineBreak(n)),e.push.apply(e,w(n)))}}else{var l=this._filterByAllowedRect(this.finalTree[i].lines[o].symbols,t);l.length>0&&e.push.apply(e,w(l).concat([this._getLineBreak(l)]))}else e.push.apply(e,w(this._getSymbolsFromBlock(i,t)));return this._removeRedundantLineBreaks(e)},I.prototype._intersectRects=function(t,e){if(!e)return t;var i=M(t.left,e.left,e.left+e.width),s=M(t.left+t.width,e.left,e.left+e.width),o=M(t.top,e.top,e.top+e.height),r=M(t.top+t.height,e.top,e.top+e.height);return C({},t,{left:i,width:Math.max(s-i,0),right:s,top:o,height:Math.max(r-o,0),bottom:r})},I.prototype._filterByAllowedRect=function(t,e){if(!e)return t;var i=e.left+e.width,s=e.top+e.height;return t.filter((function(t){var o=t.left>=e.left&&t.right<=i||t.left>e.left&&t.left<=i||t.left=e.left,r=t.top>=e.top&&t.bottom<=s||t.top=e.top||t.top>e.top&&t.top<=s;return o&&r}))},I.prototype._removeRedundantLineBreaks=function(t){return 0===t.length||("\n"===t[0].word&&t.splice(0,1),"\n"===t[t.length-1].word&&t.pop()),t},I.prototype._modifyCurrentSelectRect=function(t,e){var i=this,s=this,o=this.partSelectedBlocks[t],r=this.crossInfos[this.partSelectedBlocks[t]],n=C({},e),a=function(t){n.height=i.finalTree[o].top+i.finalTree[o].height-n.top+2,n.top=e.top,t||(n.top+=e.height,s.inverseLineSelection=!0)},h=function(t){n.top=i.finalTree[o].top,n.height=e.height+e.top-i.finalTree[o].top,t||(n.height-=e.height,s.inverseLineSelection=!0)};if(0===t)r.startPoint?a("bottom"===n.cursorVSide):a("bottom"!==n.cursorVSide);else if(1===t){if(r.activePoint)h("bottom"===n.cursorVSide);else h("bottom"!==n.cursorVSide)}return n},I.prototype._simplifySelectedBlocks=function(){var t=this;this.partSelectedBlocks.length>2&&(this.partSelectedBlocks=[Math.min.apply(Math,w(this.partSelectedBlocks)),Math.max.apply(Math,w(this.partSelectedBlocks))]);var e=[].concat(w(this.partSelectedBlocks),w(this.fullSelectedBlocks));if(e.length>0){for(var i=Math.min.apply(Math,w(e)),s=Math.max.apply(Math,w(e)),o=[];i<=s;)o.push(i),i++;this.fullSelectedBlocks=o.filter((function(e){return-1===t.partSelectedBlocks.indexOf(e)}))}},I.prototype._simplifySelectedLines=function(){for(var t=[].concat(w(this.partSelectedLines),w(this.fullSelectedLines)),e=new Map,i=[],s=0,o=t.length;s0&&i.push.apply(i,w(n).concat([this._getLineBreak(n)]))}return i},I.prototype._getLineBreak=function(t,e){var i=.01,s=e?t[0]:t[t.length-1],o={left:e?s.left-i:s.left+s.width,top:s.top,height:s.height,angle:s.angle,width:i,word:"\n",lineBreak:!0};return o.right=o.left+o.width,o},I.prototype._getCrossInfos=function(t){for(var e=[],i=0,s=this.finalTree.length;i=i?i:t};function L(t,e){return t.right=t.left+t.width,t.lefte.right||(t.lefte.right||t.lefte.right-.7*e.width)}function R(t,e,i){var s=e.indexOf(i);t?-1===s&&e.push(i):-1!==s&&e.splice(s,1)}var E,O,F,_,W=i(320);try{i.e(12).then(i.bind(i,4015)).then((function(t){(E=t).memory.grow(80),F=new TextEncoder("utf8"),_=new TextDecoder("utf8"),O=!0})).catch((function(t){console.log("fribidi wasn't initialized")}))}catch(br){console.log("fribidi wasn't initialized")}var D="";function B(){}function A(t,e){var i=t.map((function(t){return t.rtl})).filter((function(t){return!(0,W.o8)(t)}));return 0===i.length?e:i[0]}B.prototype.getSelectedText=function(t,e){for(var i=this._getLines(t),s="",o=O?this._processLineFribidi:this._processLineSimple,r=0,n=i.length;r0?" ":"")+i}return i},B.prototype._processBrackets=function(t){for(var e=[{char:"(",open:!0,reversed:")"},{char:")",open:!1,reversed:"("},{char:"[",open:!0,reversed:"]"},{char:"]",open:!1,reversed:"["},{char:"{",open:!0,reversed:"}"},{char:"}",open:!1,reversed:"{"}],i=t,s=0;s=0;)o=(i=this._processBracket(i,o,e[s].open,e[s].reversed)).indexOf(e[s].char,o+1);return i},B.prototype._processBracket=function(t,e,i,s){var o=function(t,e){return e?/[\s,:;\\.\\!\\?]/.test(t):/[\s,:;]/.test(t)},r=t;return i?(e===r.length-1||o(r[e+1],!0))&&e>0&&!o(r[e-1],!1)&&(r=(e>0?r.substr(0,e):"")+s+(e0?r.substr(0,e):"")+s+(e=e||"right"===this.pageSide&&t.left0?this.pageRect=this.$el.getBoundingClientRect():this.pageRect=null},getBorderCollisions:function(t){return this.allowedRect?{left:t.leftthis.allowedRect.left+this.allowedRect.width,top:t.topthis.allowedRect.bottom}:{}},getCornerSymbol:function(t){return{isRtlSelection:this.isRtlSelection,top:Math.round(t.top*this.containerSize.scaleRatio.h),left:Math.round(t.left*this.containerSize.scaleRatio.w),width:Math.round(t.width*this.containerSize.scaleRatio.w),height:Math.round(t.height*this.containerSize.scaleRatio.h),collisions:this.getBorderCollisions(t)}},drawSelection:function(){if(0!==this.selectedSymbols.length){this.$store.dispatch("workspace/setActiveInteractiveElement","selected-text"),this.context||this.initContext(),this.context.clearRect(0,0,this.containerSize.width,this.containerSize.height),this.context.fillStyle="#027bff";for(var t=0,e=this.selectedSymbols.length;t0?this.$nextTick((function(){e.drawSelection()})):this.resetContext(),this.cornerTimeout=setTimeout((function(){if(!(e.selectedSymbols.length<1)){var t,i;if(1===e.selectedSymbols.length)t=i=e.selectedSymbols[0];else if(e.isRtlSelection){var s=e.selectedSymbols.findIndex((function(t){return t.lineBreak}));t=-1===s?e.selectedSymbols[0]:e.selectedSymbols[s-1];for(var o=e.selectedSymbols.length-1;o>=0&&!e.selectedSymbols[o].lineBreak;)o-=1;i=-1===o?e.selectedSymbols[e.selectedSymbols.length-1]:o===e.selectedSymbols.length-1?e.selectedSymbols[o-1]:e.selectedSymbols[o+1]}else t=e.selectedSymbols[0],10===(i=e.selectedSymbols[e.selectedSymbols.length-1]).word.charCodeAt(0)&&(i=e.selectedSymbols[e.selectedSymbols.length-2]);e.$store.dispatch("text/setCornerSymbols",{first:e.getCornerSymbol(t),last:e.getCornerSymbol(i)})}}),50),0===this.selectedSymbols.length&&this.$root.$emit("selectText:hidePanel")):this.$root.$emit("selectText:hidePanel")},isCurrent:function(t){var e=this;t&&(0===this.finalTree.length&&this.getAndParseXML(),this.$nextTick((function(){e.getPageRect()})))},selectTextInfoLoaded:function(t){t.pageId===this.pageId&&this.getAndParseXML()},animationInProgress:function(t){t||this.$store.getters["pager/isCurrentPage"]({pageId:this.pageId,pageSide:this.pageSide})&&this.getPageRect()},activeInteractiveElement:function(t){"selected-text"!==t&&"text-context-menu"!==t&&this.$store.dispatch("text/reset")}},computed:{canvasClass:function(){return{"select-text-canvas":!0,"show-effect":this.showEffect,"hide-before-effect":!this.showEffect&&this.effectOn}},effectOn:function(){return this.$store.state.text.effect},userRect:function(){var t={top:0,left:0,width:0,height:0};return this.$store.state.text.selectionRect&&(this.pageId===this.$store.state.text.pageID&&this.isWide&&this.pageSide!==this.$store.state.text.pageSide||this.pageId===this.$store.state.text.pageID&&this.pageSide===this.$store.state.text.pageSide&&this.isCurrent)?this.$store.state.text.selectionRect:t},allowedRect:function(){if(this.isWide&&this.isCrossWide&&this.singleMode){var t=this.$store.getters["pages/pageProp"](this.pageId,"width")/2;return{left:"right"===this.pageSide?t:0,width:t,top:0,height:this.$store.getters["pages/pageProp"](this.pageId,"height")}}},singleMode:function(){return this.$store.state.pager.singleMode},showCanvas:function(){return this.selectedSymbols.length>0},selectTextInfoLoaded:function(){return this.$store.state.search.selectTextInfoLoaded},animationInProgress:function(){return this.$store.getters["workspace/animationInProgress"]},activeInteractiveElement:function(){return this.$store.state.workspace.activeInteractiveElement}}},V=i(2155),U={name:"select-text",mixins:[Z],data:function(){return{isActive:!1,isDragging:!0}},mounted:function(){var t=this;this.$nextTick((function(){t.getPageRect()})),this.$parent.$parent.$on("highlight",this.highlight),this.$root.$on("publication:mouseleave",this.panEnd),this.$root.$on("zoomMove",this.zoomMove),this.effectOn&&this.$el.addEventListener("mousemove",this.checkMousePosition)},beforeDestroy:function(){this.resetContext(),this.$parent.$parent.$off("highlight",this.highlight),this.$root.$off("zoomMove",this.zoomMove),this.$root.$off("publication:mouseleave",this.panEnd),this.$el.removeEventListener("mousemove",this.checkMousePosition)},methods:{highlight:function(){var t=this;this.effectOn&&(this.panEnd(),this.showEffect=!0,setTimeout((function(){t.showEffect=!1,t.$store.dispatch("text/setEffect",!1)}),3e3))},reset:function(t){this.effectOn||(this.$el.removeEventListener("mousemove",this.checkMousePosition),this.$root.$emit("selectText:hidePanel"),t&&"panstart"===t.type&&(this.isActive=!0),this.$store.dispatch("text/reset"))},pan:function(t){if(this.pageRect&&this.isLoaded&&this.isCurrent&&(!this.isZoomed||!this.isDragging)&&this.isActive&&!this.selectAll&&!this.effectOn&&!this.animationInProgress){var e={top:t.deltaY>0?t.center.y-t.deltaY-this.pageRect.top:t.center.y-this.pageRect.top,left:t.deltaX>0?t.center.x-t.deltaX-this.pageRect.left:t.center.x-this.pageRect.left,width:Math.abs(t.deltaX),height:Math.abs(t.deltaY),offsetX:this.containerSize.offsetX,offsetY:this.containerSize.offsetY,cursorHSide:t.deltaX>0?"right":"left",cursorVSide:t.deltaY>0?"bottom":"top"};if(e.top=e.top/this.containerSize.scaleRatio.h,e.left/=this.containerSize.scaleRatio.w,e.width/=this.containerSize.scaleRatio.w,e.height/=this.containerSize.scaleRatio.h,this.isWide&&!this.isCrossWide){if("right"===e.cursorHSide&&"left"===this.pageSide&&e.left+e.width>this.containerSize.width/this.containerSize.scaleRatio.w)return;if("left"===e.cursorHSide&&"right"===this.pageSide&&e.left0&&(t.$root.$emit("selectText",{action:"select",pageId:t.pageId,text:t.$store.state.text.selectedText}),t.$root.$emit("selectText:showPanel"),t.$el.addEventListener("mousemove",t.checkMousePosition))}),100)},zoomMove:function(t){"drag"===t.direction&&(this.isDragging=t.active)},checkMousePosition:function(t){this.$parent.$parent.isPointInSelection(t)?this.$root.$emit("selectText:showPanel"):this.$root.$emit("selectText:hidePanel",{forceHide:!1})}},watch:{isActive:function(t){this.$store.dispatch("text/setInProgressSelection",t)},pageSize:function(){var t=this;this.$root.$emit("selectText:hidePanel"),this.$nextTick((function(){t.getPageRect()}))},sidebar:function(){var t=this;this.$root.$emit("selectText:hidePanel"),this.$nextTick((function(){t.getPageRect()}))},wsContainerSize:function(){var t=this;this.$root.$emit("selectText:hidePanel"),this.$nextTick((function(){t.getPageRect()}))},scrollPosition:function(){var t=this;this.$nextTick((function(){t.getPageRect()}))},isLoaded:function(t){this.getPageRect()},animationInProgress:function(){this.$store.dispatch("text/reset"),this.$root.$emit("selectText:hidePanel")},pageResize:function(){var t=this;this.$nextTick((function(){t.getPageRect()}))},selectAll:function(t){t&&this.selectAllPageContent()},preliminarySelection:function(t){this.validContainerSize&&t&&this.finalizePreliminarySelection()},containerSize:function(){this.validContainerSize&&(this.preliminarySelection?this.finalizePreliminarySelection():this.drawSelectionDebounced())}},computed:{inspectorMode:function(){return this.$store.state.workspace.inspectorMode},selectAll:function(){return this.$store.state.text.selectAll&&this.pageId===this.$store.state.text.pageID&&this.pageSide===this.$store.state.text.pageSide},preliminarySelection:function(){return this.$store.state.text.preliminarySelection&&this.pageId===this.$store.state.text.pageID&&this.pageSide===this.$store.state.text.pageSide},validContainerSize:function(){var t,e;return(null===(t=this.containerSize)||void 0===t?void 0:t.width)>0&&(null===(e=this.containerSize)||void 0===e?void 0:e.height)>0},textBlockSizes:function(){var t=this;return this.finalTree.map((function(e){return{width:Math.ceil(e.width*t.containerSize.scaleRatio.w),height:Math.ceil(e.height*t.containerSize.scaleRatio.h),left:Math.floor(e.left*t.containerSize.scaleRatio.w),top:Math.floor(e.top*t.containerSize.scaleRatio.h)}}))},pageSize:function(){return this.$store.state.pages.size},sidebar:function(){return this.$store.state.sidebar.opened},wsContainerSize:function(){return this.$store.state.workspace.containerSize},scrollPosition:function(){return this.$store.getters["text/holderScroll"]},isZoomed:function(){return this.$store.state.pages.size.zoomFactor>1},animationInProgress:function(){return this.$store.getters["workspace/animationInProgress"]},pageResize:function(){return this.$store.getters["pages/pageProp"](this.pageId,"pageResize")}}},j=i(1900),G=(0,j.Z)(U,g,f,!1,null,"22b6e05d",null).exports,X=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-touch",{staticClass:"selecttext",style:t.contStyle,on:{tap:t.reset}},[this.showCanvas?i("canvas",{class:t.canvasClass,style:{position:"absolute",right:"right"===t.pageSide&&t.isWide?0:"none"},attrs:{width:t.containerSize.width,height:t.containerSize.height}}):t._e()])},Y=[],q={name:"select-text-mobile",mixins:[Z],mounted:function(){var t=this;this.$nextTick((function(){t.getPageRect()})),this.$parent.$parent.$on("highlight",this.highlight)},beforeDestroy:function(){this.resetContext(),this.$parent.$parent.$off("highlight",this.highlight)},methods:{highlight:function(){var t=this;this.effectOn&&(this.showEffect=!0,setTimeout((function(){t.showEffect=!1,t.$store.dispatch("text/setEffect",!1)}),3e3))},reset:function(){this.$store.dispatch("text/reset")}},watch:{containerSize:function(){this.getAndParseXML()},animationInProgress:function(){this.$store.dispatch("text/reset")}},computed:{animationInProgress:function(){return this.$store.getters["workspace/animationInProgress"]}}},K=(0,j.Z)(q,X,Y,!1,null,"6d6ab027",null).exports,Q=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-touch",{staticClass:"publication-note",style:t.noteStyle,attrs:{"data-note-id":t.data.id},on:{tap:t.onNoteClick,mousedown:function(t){t.stopPropagation()}}},[i("div",{ref:"icon",class:t.iconClass},[i("svgicon",{attrs:{focusable:"false",name:"note-content"}})],1)])},J=[],tt=(i(2150),i(2567)),et={name:"Note",props:{data:{type:Object,default:function(){return{}}},pageSize:{type:Object,default:function(){return{}}},pageSide:{type:String,default:""},isWide:Boolean,isOutsideHardcover:Boolean},data:function(){return{state:"mini",offsetX:0,offsetY:0,deltaX:0,deltaY:0,minDeltaX:0,minDeltaY:0,maxDeltaX:0,maxDeltaY:0,onMove:!1,position:"absolute",leftOffset:16,rightOffset:16,topOffset:28,bottomOffset:4,ieOffsetX:0,ieOffsetY:0}},computed:{isIE:function(){return!!this.$store.state.workspace.userAgentInfo.browser.msie},isOpened:function(){return this.$store.state.notes.opened===this.data.id},isFirstPage:function(){return this.$store.getters["pages/isFirstPage"](this.data.page)},isLastPage:function(){return this.$store.getters["pages/isLastPage"](this.data.page)},scale:function(){return{w:this.pageSize.width/this.$store.state.book.bookSize.width/("both"===this.pageSide?2:1),h:this.pageSize.height/this.$store.state.book.bookSize.height}},noteStyle:function(){var t=0,e=0,i=0;if(this.isWide&&"right"===this.pageSide&&(t=-this.pageSize.width),this.onMove){if("right"===this.pageSide){var s=this.slideMode&&(this.isFirstPage&&!this.rtl||this.isLastPage&&this.rtl);this.isOutsideHardcover||s||(e=this.pageSize.width)}if("left"===this.pageSide)this.slideMode&&(this.isLastPage&&!this.rtl||this.isFirstPage&&this.rtl)||(i=this.pageSize.width);this.slideMode&&(this.pagerSlideMode&&"both"!==this.pageSide||this.pagerSingleMode)&&(e=0,i=this.pageSize.width),this.pagerSingleMode&&(this.isIE?this.isFirstPage||"right"!==this.pageSide||this.isLastPage&&this.$store.getters["pages/pagesCount"]%2==0||(t-=this.pageSize.width):this.rtl&&"right"===this.pageSide?t-=this.pageSize.width:this.rtl||"left"!==this.pageSide||(t+=this.pageSize.width))}var o=this.data.pX*this.scale.w+this.deltaX+e+t;o=Math.max(this.leftOffset,Math.min(this.pageSize.width+e+i-this.rightOffset,o));var r=this.data.pY*this.scale.h+this.deltaY;return r=Math.max(this.topOffset,Math.min(this.pageSize.height-this.bottomOffset,r)),{"z-index":this.data.id+1e4,position:this.position,top:r+this.ieOffsetY+"px",left:o+this.ieOffsetX+"px"}},iconClass:function(){var t=["note-icon",this.data.color,this.state];return this.isOpened&&t.push("opened"),t},rtl:function(){return this.$store.state.book.rightToLeft},slideMode:function(){return"slide-book"===this.$store.state.workspace.bookComponent},pagerSlideMode:function(){return this.$store.state.pager.slideMode},pagerSingleMode:function(){return this.$store.state.pager.singleMode},currentBookHolder:function(){return this.slideMode?document.querySelector(".slide-wrapper.current .spread-wrapper"):document.getElementById("book-holder")},isFrozenOrNotReady:function(){return this.$store.state.workspace.freezed||"ready"!==this.$store.state.workspace.status||this.$store.state.workspace.isResizing||this.$store.state.pager.freezed}},mounted:function(){this.$refs.icon.addEventListener("mousedown",this.iconMouseDown,!0),this.parentEl=this.$el.parentElement},beforeDestroy:function(){this.$refs.icon.removeEventListener("mousedown",this.iconMouseDown,!0)},methods:{onNoteClick:function(t){this.isFrozenOrNotReady||(this.isOpened?this.$store.dispatch("workspace/setActiveInteractiveElement",null):this.$store.dispatch("notes/setOpenedId",{id:this.data.id,target:"icon"}))},iconMouseDown:function(t){0===t.button&&(t.preventDefault(),t.stopPropagation(),this.offsetX=t.pageX,this.offsetY=t.pageY,this.isOpened||this.$store.dispatch("notes/setOpenedId",{id:null}),this.$store.dispatch("notes/setMoving",!0),document.addEventListener("mousemove",this.iconMouseMove),document.addEventListener("mouseup",this.iconMouseUp),this.$root.$on("publication:mouseleave",this.iconMouseUp))},iconMouseMove:function(t){if(t.stopPropagation(),!this.onMove){if(this.moveElementToSpreadNotes(),this.slideMode&&!this.pagerSingleMode)this.minDeltaX=this.leftOffset-this.data.pX*this.scale.w,this.maxDeltaX=this.pageSize.width-this.data.pX*this.scale.w-this.rightOffset;else if("left"===this.pageSide){this.minDeltaX=this.leftOffset-this.data.pX*this.scale.w;var e=!this.isWide&&(this.isLastPage&&!this.rtl||this.isFirstPage&&this.rtl)?1:2;this.maxDeltaX=this.pageSize.width*e-this.data.pX*this.scale.w-this.rightOffset}else{var i=!this.isWide&&(this.isFirstPage&&!this.rtl||this.isLastPage&&this.rtl)?0:this.pageSize.width;this.minDeltaX=(this.isWide?this.pageSize.width:0)+this.leftOffset-i-this.data.pX*this.scale.w,this.maxDeltaX=this.pageSize.width*(this.isWide?2:1)-this.data.pX*this.scale.w-this.rightOffset}if(!this.pagerSingleMode||this.isFirstPage||this.isLastPage&&this.$store.getters["pages/pagesCount"]%2==0||("left"===this.pageSide?this.maxDeltaX-=this.pageSize.width:"right"===this.pageSide&&(this.minDeltaX+=this.pageSize.width)),this.minDeltaY=this.topOffset-this.data.pY*this.scale.h,this.maxDeltaY=(this.pageSize.height/this.scale.h-this.data.pY)*this.scale.h-this.bottomOffset,!this.isOutsideHardcover){if(this.isIE){var s=this.currentBookHolder.getBoundingClientRect(),o=this.getIEDeltaOffset();this.ieOffsetX=s.left-o,this.ieOffsetY=s.top}this.position="fixed"}this.onMove=!0,this.state="move"}this.deltaX=Math.max(this.minDeltaX,Math.min(t.pageX-this.offsetX,this.maxDeltaX)),this.deltaY=Math.max(this.minDeltaY,Math.min(t.pageY-this.offsetY,this.maxDeltaY))},getIEDeltaOffset:function(){if(this.slideMode&&this.pagerSlideMode)return 0;var t=this.$store.getters["pager/state"];return!this.isWide&&this.isLastPage&&this.rtl&&t.rightPage!==this.data.page||!this.isWide&&this.isFirstPage&&!this.rtl?this.pageSize.width:0},iconMouseUp:function(){if(document.removeEventListener("mousemove",this.iconMouseMove),document.removeEventListener("mouseup",this.iconMouseUp),this.$root.$off("publication:mouseleave",this.iconMouseUp),this.$store.dispatch("notes/setMoving",!1),this.moveElementToPageContainer(),this.onMove){this.isIE&&(this.ieOffsetX=0,this.ieOffsetY=0),this.onMove=!1,this.position="absolute";var t=this.data.page,e=this.deltaX/this.scale.w+this.data.pX;this.isWide||("left"===this.pageSide?e>this.pageSize.width/this.scale.w&&(e-=this.pageSize.width/this.scale.w,this.rtl?t--:t++):e<0&&(e+=this.pageSize.width/this.scale.w,this.rtl?t++:t--),ethis.pageSize.width/this.scale.w-this.rightOffset/this.scale.w&&(e=this.pageSize.width/this.scale.w-this.rightOffset/this.scale.w)),this.$store.dispatch("notes/moveNote",{id:this.data.id,page:t.toString(),pX:Math.round(100*e)/100,pY:Math.round(100*(this.deltaY/this.scale.h+this.data.pY))/100}),this.state="mini",this.deltaX=0,this.deltaY=0}},moveElementToSpreadNotes:function(){this.slideMode||this.isOutsideHardcover||(this.spreadNotesEl||(this.spreadNotesEl=this.createSpreadNotesElement()),this.spreadNotesEl.appendChild(this.$el))},moveElementToPageContainer:function(){this.slideMode||this.isOutsideHardcover||this.parentEl.appendChild(this.$el)},createSpreadNotesElement:function(){var t=document.getElementById("spread-notes");if(!t){var e=document.getElementById("book");t=tt.Z.createElement("div",{id:"spread-notes"},e)}return t}}},it=(0,j.Z)(et,Q,J,!1,null,"4f0d47b2",null).exports,st=i(924),ot=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:t.classes},[i("div",{staticClass:"flip-me-backface",style:t.backfaceStyle},[t.isTranslucentReverseSide?t._l(t.backfaceBackgrounds,(function(e,s){return i("img",{key:s,staticClass:"flip-me-image",style:t.backfaceImgStyle,attrs:{crossOrigin:t.crossOrigin,src:e}})})):t._e(),t._v(" "),i("div",{staticClass:"flip-me-gradient2",style:t.backGradientStyle})],2),t._v(" "),i("div",{staticClass:"flip-me-mask",style:t.maskStyle},[i("div",{staticClass:"flip-me-gradient",style:t.nextGradientStyle}),t._v(" "),i("div",{staticClass:"flip-me-shift-page",style:t.shiftPageStyle},[i("div",{staticClass:"flip-me-next-page",style:t.nextPageStyle},t._l(t.nextBackgrounds,(function(e,s){return i("img",{key:s,staticClass:"flip-me-image",style:t.nextImgStyle,attrs:{crossOrigin:t.crossOrigin,src:e}})})),0)])])])},rt=[],nt=i(2029),at=i.n(nt),ht=(H=window.getComputedStyle(document.documentElement,""),N=(Array.prototype.slice.call(H).join("").match(/-(moz|webkit|ms)-/)||""===H.OLink&&["","o"])[1],{dom:"WebKit|Moz|MS|O".match(new RegExp("("+N+")","i"))[1],lowercase:N,css:"-"+N+"-",js:N[0].toUpperCase()+N.substr(1)}),lt={name:"FlipMe",props:{pageId:{type:String,required:!0},isLeft:{type:Boolean,required:!0}},data:function(){return{angle:0,width:0,backfaceParams:null,nextPageParams:null,tween:null,crossOrigin:(0,d.Z)().getCrossOrigin()}},created:function(){var t=this.$store.getters["pager/flipState"],e=this.isLeft?t.currentLeft:t.currentRight,i=e+(this.isLeft?-1:1),s=e+(this.isLeft?-2:2);this.backfaceParams=this.$store.getters["pager/flipParams"](i),this.nextPageParams=this.$store.getters["pager/flipParams"](s)},mounted:function(){var t=this,e={angle:19,width:0};this.tween=new(at().Tween)(e).to({angle:19,width:7},800).easing(at().Easing.Cubic.InOut).onUpdate((function(){if(t.width=e.width,t.angle=e.angle,0===e.width){var i=5*Math.random()+3,s=11*Math.random()+19;setTimeout((function(){t.tween.to({angle:s,width:i})}),10)}})).yoyo(!0).repeat(1/0).delay(2e3).repeatDelay(200).start(),this.$parent.$once("onContentContainerClick",this.stopAnimation)},beforeDestroy:function(){this.stopAnimation()},computed:{classes:function(){return{"flip-me-container":!0,left:this.isLeft,"translucent-reverse-side":this.singleMode&&this.isTranslucentReverseSide}},singleMode:function(){return this.$store.state.pager.singleMode},isRTLBook:function(){return this.$store.state.book.rightToLeft},isTranslucentReverseSide:function(){return this.$store.state.workspace.components.book.isTranslucentReverseSide},nextBackgrounds:function(){return this.getBackgroundsArray(this.nextPageParams.pageId)},backfaceBackgrounds:function(){return this.getBackgroundsArray(this.backfaceParams.pageId)},pagesSize:function(){return this.$store.getters["pages/size"]},backfaceImgStyle:function(){return this.getImageStyle(this.backfaceParams)},nextImgStyle:function(){return this.getImageStyle(this.nextPageParams)},maskStyle:function(){var t=100-this.width;return{transform:this.isLeft?"rotate3d(0,0,1,-".concat(this.angle,"deg) translate3d(-").concat(t,"%, 0%, 0)"):"rotate3d(0,0,1,".concat(this.angle,"deg) translate3d(").concat(t,"%, 50%, 0)"),transformOrigin:this.isLeft?"".concat(100-t,"% 100%"):"100% 100%"}},nextPageStyle:function(){var t=100-this.width;return{transform:this.isLeft?"rotate3d(0,0,1,".concat(this.angle,"deg)"):"rotate3d(0,0,1,-".concat(this.angle,"deg)"),transformOrigin:this.isLeft?"".concat(100-t,"% 100%"):"100% 100%",backgroundColor:this.$store.getters["pages/pageProp"](this.nextPageParams.pageId,"backgroundColor")}},shiftPageStyle:function(){var t=100-this.width;return{transform:this.isLeft?"translate3d(".concat(t,"%, 0%,0)"):"translate3d(-".concat(t,"%, -50%,0)")}},backfaceStyle:function(){var t,e,i=90-this.angle,s=this.width/Math.sin(i*Math.PI/180);if(this.isLeft){var o=s,r=100-2*s;t="rotate(-".concat(2*this.angle,"deg) translate3d(-").concat(r,"%, 0%,0)"),e="".concat(o,"% 100%")}else{var n=100-s,a=n-s;t="rotate(".concat(2*this.angle,"deg) translate3d(").concat(a,"%, 0%,0)"),e="".concat(n,"% 100%")}return{transform:t,transformOrigin:e,backgroundColor:this.$store.getters["pages/pageProp"](this.backfaceParams.pageId,"backgroundColor")}},nextGradientStyle:function(){return{background:ht.css+"linear-gradient(".concat(this.isLeft?"right":"left",", rgba(0, 0, 0, ").concat((65-this.width)/100,") 0px, transparent ").concat(this.width,"%)")}},backGradientStyle:function(){var t=90-this.angle,e=this.width/Math.sin(t*Math.PI/180);return{transform:this.isLeft?"rotate(".concat(this.angle,"deg) translate3d(0, 10%, 1px)"):"rotate(-".concat(this.angle,"deg) translate3d(0, 10%, 1px)"),transformOrigin:"100% 100%",width:e+"%"}}},methods:{stopAnimation:function(){this.tween.delay(0).repeat(1)},getBackgroundsArray:function(t){var e=[];if(t){var i=this.$store.getters["pages/pageProp"](t,"textUrl"),s=this.$store.getters["pages/pageProp"](t,"substrateUrl");e.push(s),i&&e.push(i)}return e},getImageStyle:function(t){var e=t.wide,i="right"===t.pageSide,s=this.$store.state.pages.size.width,o=document.querySelector('.background[data-id="'+t.pageId+'"]');return(o&&o.style?o.style.cssText:"")+(e&&i?" transform: translate3d(-".concat(s,"px,0,0);"):"")}}},ct=(0,j.Z)(lt,ot,rt,!1,null,"75383dbe",null).exports,dt=i(9426);function ut(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=pt(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var s=0,o=function(){};return{s:o,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,n=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return n=t.done,t},e:function(t){a=!0,r=t},f:function(){try{n||null==i.return||i.return()}finally{if(a)throw r}}}}function pt(t,e){if(t){if("string"==typeof t)return gt(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?gt(t,e):void 0}}function gt(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,s=new Array(e);i0&&this.$emit("content:changed"),this.refreshCache()},isResizing:function(t){this.$emit("resize:"+(t?"start":"end")),this.refreshCache(),t?this.stopHighlight():this.checkHighlight()},contentFreezed:function(t){this.refreshCache(),t?this.cancelResize("freezed",!0):(this.resizeCancelled=!1,this.updateCanvasDebounced(!1))},preloaderVisible:function(t,e){this.refreshCache(),this.isCurrent&&!t&&e&&this.$root.$emit("pageLoaded")},backgrounds:function(){this.refreshCache()},backgroundsCache:function(){this.updateCanvasDebounced(!0)},isHighlighted:function(t){t?this.stopIconAttract():this.startIconAttract()},activeInteractiveElement:function(t){"highlight"!==t&&this.isHighlighted&&this.stopHighlight()}},created:function(){var t=this;this.updateCanvasDebounced=(0,l.Ds)((function(e){e&&(t.canvasUpdated=!1),t.updateCanvas()}),1e3),this.isLoading=this.rawIsLoading},mounted:function(){this.refreshCache(),this.$root.$on("zoomMove",this.zoomMove),this.getContent(),window.addEventListener("resize",this.onResize)},beforeUpdate:function(){this.contentItemsReady>this.content.length&&(this.contentItemsReady=this.content.length)},beforeDestroy:function(){window.removeEventListener("resize",this.onResize),this.cancelResize("destroyed",!0),this.updateCanvasDebounced.destroy(),this.$root.$off("zoomMove",this.zoomMove),this.stopHighlight(),clearInterval(this.iconAttractInterval),this.$refs.bgImage.onload=null,this.$refs.bgImage.onerror=null,this.$refs.bgImage.src="",this.$refs.bgSVG&&(this.$refs.bgSVG.src="")},methods:{bgCacheImageLoaded:function(t){this.isZoomed&&t===this.substrateUrl&&this.setCursor("inherit")},getContent:function(){this.pageContent=this.$store.getters["pages/pageContent"](this.pageId)},getProperties:function(){this.isSVGSupported=this.$store.getters["pages/isSVGSupported"](this.pageId),this.thumbnailUrl=this.$store.getters["pages/pageProp"](this.pageId,"thumbnailUrl"),this.textUrl=this.$store.getters["pages/pageProp"](this.pageId,"textUrl"),this.substrateUrl=this.$store.getters["pages/pageProp"](this.pageId,"substrateUrl"),this.isReady=this.$store.getters["pages/pageProp"](this.pageId,"status")===st.Z.READY,this.loadPending=this.$store.getters["pages/pageProp"](this.pageId,"loadPending"),this.hasError=this.$store.getters["pages/hasError"](this.pageId)},getAPIProperties:function(){this.isWide=this.$store.getters["pages/pageProp"](this.pageId,"wide"),this.isStub=this.$store.getters["pages/pageProp"](this.pageId,"stub");var t=this.$store.getters["pages/isLastPage"](this.pageId)&&this.$store.getters["pages/pageIndexById"](this.pageId)%2!=0&&!this.isWide&&!this.$store.state.pager.singleMode;this.isOutsideHardcover="flip-book"===this.bookComponent&&this.$store.getters["book/hasHardcover"]&&(this.$store.getters["pages/isFirstPage"](this.pageId)||t),this.backgroundColor=this.isOutsideHardcover?this.$store.state.book.hardcoverColor:this.enforceTransparentBg?null:this.$store.getters["pages/pageProp"](this.pageId,"backgroundColor")},refreshCache:function(){var t=this;this.contentFreezed||this.$nextTick((function(){t.preloaderVisibleCache=t.preloaderVisible,t.backgroundsCache=t.backgrounds,t.vectorLayerCache=t.vectorLayer,t.isLoadingCache=t.isLoading,t.updatePendingCache=t.updatePending}))},isVisible:function(t){return!this.isWide||"both"===this.pageSide||t.side===this.pageSide||t.crossWide},checkPageStripes:function(t){if(!this.isCurrent||this.isZoomed||"flip-book"!==this.bookComponent||t.srcEvent.metaKey||t.srcEvent.ctrlKey)return!1;var e=this.$el.getBoundingClientRect(),i=this.$store.getters["pager/state"].singleMode,s=i?this.isRTLBook:"left"===this.pageSide,o=i?!this.isRTLBook:"right"===this.pageSide;return s&&!this.hideLeftStripe&&t.center.x-e.left<.05*e.width?(this.leftStripeTap(),!0):!!(o&&!this.hideRightStripe&&t.center.x-e.left>.95*e.width)&&(this.rightStripeTap(),!0)},onMouseDown:function(){document.activeElement.blur()},onContentTap:function(t){var e=this;if(!this.isWorkspaceFrozen){var i=t.target.classList;if(i)if(i.contains("link"))this.isMobile&&this.$root.$emit("link-highlight",{itemId:t.target.dataset.itemId}),Date.now()>this.tapTimeout&&(setTimeout((function(){e.linkTo(t.target)}),this.$store.state.workspace.doubletapInterval+1),this.tapTimeout=Date.now()+this.$store.state.workspace.doubletapInterval);else if("true"===t.target.dataset.popupFormArea&&this.isMobile)this.$root.$emit("form-highlight",{itemId:t.target.dataset.itemId});else if("desktop"===this.layout){var s=(0,l.UZ)(t.target);if(!i.contains("block")&&!i.contains("text-block")&&-1===s.indexOf("content")&&this.checkPageStripes(t))return;(i.contains("content")||i.contains("block")||i.contains("text-block")||i.contains("selecttext")||i.contains("select-text-canvas"))&&setTimeout((function(){if(!(e.$store.state.workspace.highlightTimeout+350>Date.now())){e.clearHighlightTimeouts(),e.isHighlighted=!(e.isHighlighted||e.initialLinkHighlight||e.initialPopupIconHighlight||e.activeInteractiveElement),e.initialIconsHide=!1,e.initialPopupIconHighlight=!1,e.initialLinkHighlight=!1,e.initialFormHighlight=!1;var t=e.getSpreadTwin();null!==t&&(t.clearHighlightTimeouts(),t.isHighlighted=e.isHighlighted,t.initialIconsHide=!1,t.initialPopupIconHighlight=!1,t.initialLinkHighlight=!1,t.initialFormHighlight=!1);var i=e.$store.getters["pages/urlHeaderById"]({id:e.pageId,forceFullWide:"both"===e.pageSide,widePageSecondHalf:"right"===e.pageSide});e.$root.$emit("highlight",{action:e.isHighlighted?"on":"off",page:i}),e.$store.dispatch("workspace/setActiveInteractiveElement",e.isHighlighted?"highlight":null)}}),350)}}},linkTo:function(t){if("ready"===this.bookStatus){var e=t.getAttribute("data-id"),i=t.getAttribute("data-url");if(e&&!i)this.$store.dispatch("pager/goToPageById",{id:e,target:"link"}),this.$emit("link:click",t),this.$root.$emit("link",{type:"internal",source:"page",pageId:this.pageId,pageToId:e});else if(i){var s=!1===this.checkUrl(i);if(this.$root.$emit("link",{type:"external",pageId:this.pageId,url:i,target:t.target,source:null,isBlacklisted:s}),s)return;t.setAttribute("href",i),t.click(),t.removeAttribute("href"),this.$emit("link:click",t)}}},checkUrl:function(t){for(var e=0;e0?this.$once("loaded",(function(){this.checkHighlight()})):this.isPreloaderShown?this.$once("preloader:off",(function(){this.checkHighlight()})):0===this.content.length&&this.$once("content:changed",(function(){this.checkHighlight()})):(this.autoHighlight&&this.highlightContent(),this.$emit("highlight"))}},startIconAttract:function(){var t=this;if(this.isPrimarySpreadPage){var e=this.getSpreadTwin();this.iconAttractInterval=setInterval((function(){t.iconAttract=!0,e&&(e.iconAttract=!0),setTimeout((function(){t.iconAttract=!1,e&&(e.iconAttract=!1)}),1800)}),8e3)}},stopIconAttract:function(){var t=this.getSpreadTwin();clearInterval(this.iconAttractInterval),this.iconAttract=!1,t&&(t.iconAttract=!1)},clearHighlightTimeouts:function(){clearTimeout(this.highlightTimeout),clearTimeout(this.highlightOffTimeout),clearTimeout(this.linkHighlightOffTimeout),clearTimeout(this.formHighlightOffTimeout)},stopHighlight:function(){this.clearHighlightTimeouts(),this.isHighlighted=!1,this.initialPopupIconHighlight=!1,this.initialLinkHighlight=!1,this.initialFormHighlight=!1},highlightContent:function(){var t=this;if(this.isPrimarySpreadPage){var e=this.getSpreadTwin();this.highlightTimeout=setTimeout((function(){t.initialIconsHide=!1,t.initialPopupIconHighlight=!0,t.initialLinkHighlight=!0,t.initialFormHighlight=!0,e&&(e.initialIconsHide=!1,e.initialPopupIconHighlight=!0,e.initialLinkHighlight=!0,e.initialFormHighlight=!0),t.highlightOffTimeout=setTimeout((function(){t.initialPopupIconHighlight=!1,e&&(e.initialPopupIconHighlight=!1),t.startIconAttract()}),2e3),t.linkHighlightOffTimeout=setTimeout((function(){t.initialLinkHighlight=!1,e&&(e.initialLinkHighlight=!1)}),1700),t.formHighlightOffTimeout=setTimeout((function(){t.initialFormHighlight=!1,e&&(e.initialFormHighlight=!1)}),1700)}),100)}},contentItemReady:function(t){"link"!==t.data.type&&this.contentItemsReady++},contentError:function(){this.$store.dispatch("pages/setStatus",{value:st.Z.ERROR,pageID:this.pageId})},updateCanvas:function(){var t=this,e=this.isZoomed&&this.substrateNum>1;if(!("desktop"!==this.layout||!this.isCurrent||e||this.canvasUpdated||this.contentFreezed||this.devicePixelRatio>1.5)&&(!this.isWide||"right"!==this.pageSide||this.$store.state.pager.singleMode)&&this.backgroundsCache&&this.backgroundsCache[0]){this.cancelResize("new resize",!1),this.resizeCancelled=!1;var i=new Image;this.crossOrigin&&(i.crossOrigin=this.crossOrigin),i.onload=function(){var e=document.createElement("canvas"),s=e.getContext("2d");if(e.style.transform="translateZ(0)",i.onload=null,!t.resizeCancelled)if(t.backgroundsCache.length>1){var o=new Image;t.crossOrigin&&(o.crossOrigin=t.crossOrigin),o.onload=function(){o.onload=null,t.resizeCancelled||(e.width=o.width,e.height=o.height,s.drawImage(i,0,0,o.width,o.height),s.drawImage(o,0,0,o.width,o.height),o.src="",o=null,i=null,t.resizeCanvas(e,t.$refs.bgImage),s=null,e=null)},o.src=t.backgroundsCache[1]}else e.width=i.width,e.height=i.height,s.drawImage(i,0,0,i.width,i.height),i=null,t.resizeCanvas(e,t.$refs.bgImage),s=null,e=null},i.src=this.backgroundsCache[0]}},skipResize:function(){var t=this.$store.state.workspace.userAgentInfo.browser;return t.firefox||t.ie||t.msie||t.msedge},onResize:function(){this.isCurrent&&this.updateCanvasDebounced(!0)},resizeCanvas:function(t,e){var i=this;if(!this.skipResize()&&!this.resizeCancelled){this.cancelResize("new resize",!1);var s=new Date,o=s.getHours()+":"+s.getMinutes()+":"+s.getSeconds()+"."+s.getMilliseconds(),r=this.pageId+"_"+o,n=document.createElement("canvas");this.cancelResize=function(t,e){try{e&&(i.resizeCancelled=!0),r&&i.bookElement.cancelResize&&i.bookElement.cancelResize(r),n=null}catch(s){i.$emit("error",s)}},n.style.transform="translateZ(0)",n.width=this.contentSize.width*(this.wideHalf?2:1)*this.devicePixelRatio,n.height=this.contentSize.height*this.devicePixelRatio,n.getContext("2d").drawImage(t,0,0,n.width,n.height);var a={unsharpAmount:80,unsharpRadius:.6,unsharpThreshold:166,quality:3,alpha:!0};if(!this.resizeCancelled&&this.bookElement.resizePage){var h=this;this.bookElement.resizePage(t,n,a,r,(function(i){if(i){var s=i.toDataURL();if(h.setResizedImg(e,h,s),h.isWide){var o=h.getSpreadTwin();null!==o&&h.setResizedImg(o.$refs.bgImage,o,s)}}r=null,t=null,n=null}))}}},setResizedImg:function(t,e,i){if(t){t.onload=function(){t.onload=null,setTimeout((function(){e.resizeCancelled||(e.canvasUpdated=!0)}),500)};var s=window.MSInputMethodContext&&document.documentMode?1e4:6500;i.length>s&&(t.src=i)}},leftStripeTap:function(){this.movePagerLeft({target:"page-edge-tap"})},rightStripeTap:function(){this.movePagerRight({target:"page-edge-tap"})},arrowHover:function(t,e){"function"==typeof this.bookElement.arrowHover&&this.bookElement.arrowHover(t,e)},zoomMove:function(t){"drag"===t.direction&&(this.contentActive=!!t.active)},isPointInSelection:function(t){var e=this.$el.querySelector(".select-text-canvas");if(!e)return!1;var i=e.getBoundingClientRect(),s=t.clientX-i.left,o=t.clientY-i.top,r=e.getContext("2d").getImageData(s,o,1,1).data;return r[0]+r[1]+r[2]+r[3]!==0},forceBackgroundColor:function(t){this.backgroundColor=t}},computed:{pageStyle:function(){var t="rgba(39, 47, 55, 0.03)",e=this.contentCrop?this.contentSize.height:this.pageSize.height;return{width:(this.contentCrop?this.contentSize.width:this.pageSize.width)+"px",height:(e%2==0?e:e+1)+"px","background-color":this.bordered?t:this.backgroundColor}},zoomInBlur:function(){return!1},showPreloaderContainer:function(){return!this.isStub&&(this.thDebounced||this.preloaderVisibleCache)},showSpinner:function(){return(this.thDebounced||this.isLoadingCache||this.updatePendingCache)&&!this.contentFreezed&&this.isReady&&this.isDownloaded&&!this.hasError},showHighlights:function(){return this.isCurrent&&!this.contentFreezed&&(this.isMobile||this.isSearchOpened)&&!this.showPreloaderContainer},animationInProgress:function(){return this.$store.getters["workspace/animationInProgress"]},isLeftFlipCorner:function(){return"left"===this.$store.getters["workspace/callToNavigation"].side},isLightboxShown:function(){return this.$store.getters["lightbox/isShown"]},flipCornerEnabled:function(){if("flip-book"!==this.bookComponent||!this.isCurrent||this.isLightboxShown)return!1;var t=this.$store.getters["workspace/callToNavigation"];return"corner"===t.type&&(this.$store.state.pager.singleMode||t.side===this.pageSide)&&!this.contentFreezed},bookStatus:function(){return this.bookElement.status||"ready"},isIE:function(){return!0===this.$store.state.workspace.userAgentInfo.browser.msie},bookComponent:function(){return this.$store.state.workspace.bookComponent},bookElement:function(){return"slide-book"===this.bookComponent?this.$parent.$parent:this.$parent},rawIsLoading:function(){return 0===this.$store.state.pages.size.width||null===this.$store.state.pages.size.width||!(this.isStub||!this.isReady||!this.isDownloaded||this.hasError)&&(this.contentItemsReady.5,dark:this.backgroundLuma<=.5,only:this.isOnlyPage,"left-stripe":"flip-book"===this.bookComponent&&"left"===this.pageSide&&!this.hideLeftStripe,"right-stripe":"flip-book"===this.bookComponent&&"right"===this.pageSide&&!this.hideRightStripe,"last-single-page":this.isLastSinglePage,"content-inactive":!this.contentActive}},isOnlyPage:function(){return 1===this.$store.getters["pages/pagesCount"]},isLastSinglePage:function(){return!(!this.$store.state.pager.singleMode||!this.$store.getters["pages/isLastPage"](this.pageId))&&(!this.isWide||!(this.isRTLBook&&"left"!==this.pageSide||!this.isRTLBook&&"right"!==this.pageSide))},preloaderVisible:function(){return!this.isStub&&(this.isLoading||!this.isReady||!this.isDownloaded||this.hasError)},vectorLayer:function(){return this.pageId&&this.isReady&&this.isDownloaded&&!this.hasError&&this.isSVGSupported?this.textUrl:null},backgrounds:function(){if(!this.pageId||!this.isReady||!this.isDownloaded||this.hasError)return[];var t=this.enforceTransparentBg?this.whitePixelUrl:this.stubUrl,e=this.substrateUrl,i=this.textUrl,s=this.isSVGSupported,o=[];if(this.isStub)o.push(t);else{var r=i;e&&o.push(e),r&&!s&&o.push(r)}return o},selectTextEnabled:function(){return!this.isIE&&this.$store.state.workspace.components.textSelection},mobileShowEffectPass:function(){return this.isMobile&&this.$store.state.text.pageID&&this.pageId===this.$store.state.text.pageID},contentPagesArray:function(){return this.$store.getters["content/pagesArray"]},content:function(){var t=this;if(!this.pageId||!this.isReady||!this.isDownloaded||this.hasError||!this.renderContent||this.isStub)return[];var e=this.contentSize.scaleRatio;if(e<=0)return[];var i=this.pageContent;if(!i)return[];for(var s=this.pageId,o=this.pageSide,r=this.isWide,n=[],a=[],h=i.filter((function(e){return"block"!==e.type&&"link"!==e.type&&t.isVisible(e)})).length,c="right"===this.pageSide,d=this.isRTLBook===c,u=this.$store.state.pager.singleMode,p=u||d?0:150,g=0;g8&&(e=8),t.filter="blur("+e+"px)",t},wideHalf:function(){return this.isWide&&"both"!==this.pageSide},marginSide:function(){var t=this.contentCrop?0:(this.pageSize.width-this.contentSize.width)/(this.wideHalf?1:2);return t=Math.round(t),t},contentStyle:function(){var t=this.contentCrop?0:(this.pageSize.height-this.contentSize.height)/2,e={width:this.contentSize.width*(this.wideHalf?2:1)+"px",height:this.contentSize.height+"px"};return this.zoomInBlur&&(e.filter="blur(2px)"),"right"===this.pageSide&&(e.right="0",e.marginRight=this.marginSide+"px"),this.marginSide&&"right"!==this.pageSide&&(e.marginLeft=this.marginSide+"px"),t&&(e.marginTop=t.toFixed(0)+"px"),e},substrateNum:function(){var t=this.$store.getters["pages/currentSize"](this.pageId),e=this.$store.getters["pages/contentSize"]({pageID:this.pageId,pageSize:t});return this.$store.getters["pages/imageSizes"](this.pageId,e).substrate},notesArray:function(){for(var t=[],e=this.$store.state.notes.items,i=0,s=e.length;i=i-o;r--)c+=t[h=a+(r<<2)],d+=t[h+1],u+=t[h+2],p+=t[h+3],e[h]=c/(i-r)|0,e[h+1]=d/(i-r)|0,e[h+2]=u/(i-r)|0,e[h+3]=p/(i-r)|0;for(;r>=0;r--)l=(h=a+(r<<2))+g,e[h]=c/o|0,e[h+1]=d/o|0,e[h+2]=u/o|0,e[h+3]=p/o|0,c+=t[h]-t[l],d+=t[h+1]-t[l+1],u+=t[h+2]-t[l+2],p+=t[h+3]-t[l+3]}}function Lt(t,e,i,s,o){var r,n,a,h,l,c,d,u,p,g=i<<2,f=g*o;for(r=0;r=s-o;n--)c+=t[h=a+n*g],d+=t[h+1],u+=t[h+2],p+=t[h+3],e[h]=c/(s-n)|0,e[h+1]=d/(s-n)|0,e[h+2]=u/(s-n)|0,e[h+3]=p/(s-n)|0;for(;n>=0;n--)l=(h=a+n*g)+f,e[h]=c/o|0,e[h+1]=d/o|0,e[h+2]=u/o|0,e[h+3]=p/o|0,c+=t[h]-t[l],d+=t[h+1]-t[l+1],u+=t[h+2]-t[l+2],p+=t[h+3]-t[l+3]}}function Et(t,e,i,s,o,r,n){var a=t.canvas,h=0|s,l=0|o,c=0|e,d=0|i;r=32*(0|r),r=Math.min(Math.max(r,32),256);var u=Math.max(0,Math.log(r)/Math.log(2)-3|0),p=r>>>u,g=a.width>>>u,f=a.height>>>u;zt.clearRect(0,0,Pt.width,Pt.height),zt.drawImage(a,0,0,g,f);var m=zt.getImageData(0,0,g,f);return It(m.data,g,f,p,n),zt.putImageData(m,0,0),t.clearRect(0,0,h,l),t.drawImage(Pt,0,0,g,f,c,d,1.01*h,l),t}var Ot=Et,Ft=0,_t=3,Wt={mixins:[u],mounted:function(){this.resizeTimer=null},data:function(){return{pageResize:null,widthCache:0}},watch:{isZoomed:function(t){t||this.setCursor("inherit")},isCurrent:function(t){var e=this;this.lastIsCurrent!==t&&(this.alreadyLoaded&&this.getProperties(),this.lastIsCurrent=t,t&&(Ft=0,this.shouldRenderCanvas?this.renderCanvas():function t(){Ft!==_t&&(setTimeout((function(){e.shouldRenderCanvas?e.renderCanvas():e.isCurrent&&t()}),200),!e.$store.state.workspace.animationInProgress&&e.thumbnailUrl&&Ft++)}()))},pageSize:function(){this.rerenderCanvas(!0)},pageResize:function(){this.rerenderCanvas()},backgroundColor:function(){this.rerenderCanvas()}},methods:{renderCanvas:function(){if(!this.$store.state.pager.zoomMode){var t=this.$refs.canvas;if(t){var e=t.getContext("2d"),i=new Image;i.crossOrigin=(0,d.Z)().getCrossOrigin();var s=this.pageSize.width;this.widthCache=s;var o=this.pageSize.height,r="right"===this.pageSide&&this.isWide?-this.contentSize.width:this.contentSize.offsetX,n=this.contentSize.offsetY,a=this.contentSize.width*(this.isWide?2:1),h=this.contentSize.height,l=20,c=(h+=l)/this.contentSize.height,u=Math.floor(s*c)-s;a+=u,r-=l/2,n-=Math.floor(u/2),t.height=Math.floor(o*c),t.width=Math.floor(s*c);var p=t.width-s;t.style.top="-".concat(l/2,"px"),"right"===this.pageSide&&this.isWide?t.style.right="".concat(-Math.floor(p/2),"px"):t.style.left="".concat(-Math.floor(p/2),"px"),e.fillStyle=this.backgroundColor,e.fillRect(0,0,s,o),i.onload=function(){e.save(),e.translate(s,0),e.scale(-1,1),e.drawImage(i,r,n,a,h),e.restore(),Ot(e,0,0,t.width,t.height,2,1),t=null},i.src=this.thumbnailUrl}}},rerenderCanvas:function(){var t=this;arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.widthCache===this.pageSize.width||this.showCanvas&&this.isCurrent&&(null!==this.resizeTimer&&clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout((function(){t.renderCanvas(),t.resizeTimer=null}),350))},getProperties:function(){this.thumbnailUrl=this.isStub&&this.enforceTransparentBg?this.whitePixelUrl:this.$store.getters["pages/pageProp"](this.pageId,"thumbnailUrl"),this.isReady=this.$store.getters["pages/pageProp"](this.pageId,"status")===st.Z.READY,this.loadPending=this.$store.getters["pages/pageProp"](this.pageId,"loadPending"),this.hasError=this.$store.getters["pages/hasError"](this.pageId)},getAPIProperties:function(){this.isWide=this.$store.getters["pages/pageProp"](this.pageId,"wide"),this.isStub=this.$store.getters["pages/pageProp"](this.pageId,"stub"),this.pageResize=this.$store.getters["pages/pageProp"](this.pageId,"pageResize"),this.isHardcoverFirstPage?this.backgroundColor="rgba(255, 255, 255, .15)":this.backgroundColor=null===this.pageId?this.backgroundColor:this.$store.getters["pages/pageProp"](this.pageId,"backgroundColor")}},computed:{showCanvas:function(){return this.showThumbnail&&!this.isHardcoverFirstPage&&!!this.thumbnailUrl},shouldRenderCanvas:function(){return this.showCanvas&&this.$refs.canvas&&!this.$store.state.workspace.animationInProgress},className:function(){return{page:!0,"page-reverse-side":!0,bordered:this.bordered,unready:!this.isReady&&!this.hasError,error:this.hasError,light:this.backgroundLuma>.5,dark:this.backgroundLuma<=.5}},isHardcoverFirstPage:function(){return this.$store.getters["book/hasHardcover"]&&this.$store.getters["pages/isFirstPage"](this.id)},pageSize:function(){var t=this.isOutsideHardcover&&!this.isHardcoverFirstPage?1.03:1,e=this.size||!1,i=this.pagesSize,s=this.pageWidthMultiplier;return e&&e.width&&e.height?{width:Math.round(e.width*t),height:Math.round(e.height*t)}:{width:Math.round(i.width*s*t),height:Math.round(i.height*t)}},pageStyle:function(){return{width:this.pageSize.width+"px",height:this.pageSize.height+"px","background-color":this.backgroundColor}}}},Dt=Wt,Bt=(0,j.Z)(Dt,xt,$t,!1,null,null,null).exports;function At(){return At=Object.assign?Object.assign.bind():function(t){for(var e=1;e3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2,r=arguments.length>5?arguments[5]:void 0,n=arguments.length>6?arguments[6]:void 0,a=arguments.length>7?arguments[7]:void 0,h=arguments.length>8?arguments[8]:void 0,l=arguments.length>9&&void 0!==arguments[9]&&arguments[9],c=h?p(h):s&&3===o?t.rightSheet:s&&2===o?t.bottomRightSheet:s||3!==o?s||2!==o?{first:0,second:0}:t.bottomLeftSheet:t.leftSheet,d=c.first,u=c.second;function p(e){switch(e){case"left":return t.leftSheet;case"right":return t.rightSheet;case"bottom-left":return t.bottomLeftSheet;case"bottom-right":return t.bottomRightSheet}}function g(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2,o=arguments.length>4?arguments[4]:void 0,r=arguments.length>5?arguments[5]:void 0,h=arguments.length>6?arguments[6]:void 0;this.bookState=t,this.firstPageNum=r,this.secondPageNum=h,t.isNullPage(r)&&(this.firstPageNum=-1),t.isNullPage(h)&&(this.secondPageNum=-1),this.generateDOM(e,i,s,o,n,a)}return e.hardcover&&(l||e.isFirstPage(d)||e.isLastPage(d)||e.isLastPage(u)||e.isFirstPage(u))?g.prototype=new Vt:g.prototype=new jt,g.prototype.setContent=function(t){var e=t.first,i=t.second;(0,W.o8)(e)||(this.contentObject1.resetPage(e),this.firstPageNum=e),(0,W.o8)(i)||(this.contentObject2.resetPage(i),this.secondPageNum=i)},new g(e,i,s,o,r,d,u)}var Xt=Gt,Yt=i(8239);function qt(t){return qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qt(t)}var Kt=[],Qt=[],Jt={_version:"3.0.0-alpha.3",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(t,e){var i=this;setTimeout((function(){e(i[t])}),0)},addTest:function(t,e,i){Qt.push({name:t,fn:e,options:i})},addAsyncTest:function(t){Qt.push({name:null,fn:t})}},te=function(){};function ee(t,e){return qt(t)===e}function ie(){var t,e,i,s,o,r;for(var n in Qt){if(t=[],(e=Qt[n]).name&&(t.push(e.name.toLowerCase()),e.options&&e.options.aliases&&e.options.aliases.length))for(i=0;i',t,""].join(""),l.id=h,(c.fake?c:l).innerHTML+=o,c.appendChild(l),c.fake&&(c.style.background="",c.style.overflow="hidden",a=se.style.overflow,se.style.overflow="hidden",se.appendChild(c)),r=e(l,t),c.fake?(c.parentNode.removeChild(c),se.style.overflow=a,se.offsetHeight):l.parentNode.removeChild(l),!!r}Jt.testStyles=pe;function ge(t,e){return!!~(""+t).indexOf(e)}function fe(t,e){var i=t.length;if("CSS"in window&&"supports"in window.CSS){for(;i--;)if(window.CSS.supports(ne(t[i]),e))return!0;return!1}if("CSSSupportsRule"in window){for(var s=[];i--;)s.push("("+ne(t[i])+":"+e+")");return pe("@supports ("+(s=s.join(" or "))+") { #modernizr { position: absolute; } }",(function(t){return"absolute"==getComputedStyle(t,null).position}))}}function me(t,e){return function(){return t.apply(e,arguments)}}function ve(t,e,i){var s;for(var o in t)if(t[o]in e)return!1===i?t[o]:ee(s=e[t[o]],"function")?me(s,i||e):s;return!1}var be={elem:de("modernizr")};te._q.push((function(){delete be.elem}));var Se={style:be.elem.style};function ye(t,e,i,s){if(s=!ee(s,"undefined")&&s,!ee(i,"undefined")){var o=fe(t,i);if(!ee(o,"undefined"))return o}var r,n,a,h,l;function c(){r&&(delete Se.style,delete Se.modElem)}for(Se.style||(r=!0,Se.modElem=de("modernizr"),Se.style=Se.modElem.style),a=t.length,n=0;n= q$9RN.D2(48)?1:5;break;case 7:q$9RN.z9=60;O9s5dF=6;break;case 6:O9s5dF=q$9RN.D2(11) === 38?14:13;break;case 5:O9s5dF=q$9RN.D3(108) === q$9RN.D3(101)?4:3;break;case 9:q$9RN.w9=40;O9s5dF=8;break;case 3:O9s5dF=q$9RN.D3(137) <= 28?9:8;break;case 1:q$9RN.U5=33;O9s5dF=5;break;case 4:q$9RN.z$=63;O9s5dF=3;break;case 14:q$9RN.Y1=63;O9s5dF=13;break;case 8:O9s5dF=q$9RN.D3(168) >= q$9RN.D3(166)?7:6;break;}}q$9RN[338615]=q$9RN[443676];q$9RN[220543]=732;q$9RN.J8=function(){return typeof q$9RN[443676].e0EQi$I === 'function'?q$9RN[443676].e0EQi$I.apply(q$9RN[443676],arguments):q$9RN[443676].e0EQi$I;};q$9RN[382788].p9yy=q$9RN;q$9RN[443676]=(function(){var V6=2;for(;V6 !== 9;){switch(V6){case 3:return b2[2];break;case 2:var b2=[arguments];b2[1]=undefined;b2[2]={};b2[2].e0EQi$I=function(){var O0=2;for(;O0 !== 145;){switch(O0){case 123:O0=G8[16] < G8[88][G8[94]].length?122:150;break;case 135:G8[37]=[];G8[61]='R4';G8[15]='M2';O0=132;break;case 132:G8[94]='p6';G8[40]='F$';G8[44]='H$';G8[56]='U2';O0=128;break;case 7:G8[5]=G8[2];G8[1]={};G8[1].p6=['X1'];G8[1].H$=function(){var S0=function(){return ('aaaa').padEnd(5,'a');};var t4=(/\u0061\141\x61\x61\x61/).j8xIj6(S0 + []);return t4;};G8[3]=G8[1];G8[8]={};O0=10;break;case 149:O0=(function(x3){var e8=2;for(;e8 !== 22;){switch(e8){case 18:s4[2]=false;e8=17;break;case 19:s4[9]++;e8=7;break;case 24:s4[9]++;e8=16;break;case 14:e8=typeof s4[4][s4[1][G8[56]]] === 'undefined'?13:11;break;case 7:e8=s4[9] < s4[0][0].length?6:18;break;case 25:s4[2]=true;e8=24;break;case 17:s4[9]=0;e8=16;break;case 12:s4[6].T1FkFZ(s4[1][G8[56]]);e8=11;break;case 5:return;break;case 1:e8=s4[0][0].length === 0?5:4;break;case 4:s4[4]={};s4[6]=[];s4[9]=0;e8=8;break;case 2:var s4=[arguments];e8=1;break;case 8:s4[9]=0;e8=7;break;case 23:return s4[2];break;case 15:s4[5]=s4[6][s4[9]];s4[7]=s4[4][s4[5]].h / s4[4][s4[5]].t;e8=26;break;case 13:s4[4][s4[1][G8[56]]]=(function(){var w7=2;for(;w7 !== 9;){switch(w7){case 2:var k3=[arguments];k3[8]={};k3[8].h=0;k3[8].t=0;return k3[8];break;}}}).J7diQJ(this,arguments);e8=12;break;case 6:s4[1]=s4[0][0][s4[9]];e8=14;break;case 11:s4[4][s4[1][G8[56]]].t+=true;e8=10;break;case 10:e8=s4[1][G8[40]] === G8[61]?20:19;break;case 16:e8=s4[9] < s4[6].length?15:23;break;case 26:e8=s4[7] >= 0.5?25:24;break;case 20:s4[4][s4[1][G8[56]]].h+=true;e8=19;break;}}})(G8[37])?148:147;break;case 55:G8[54]={};G8[54].p6=['v8'];O0=76;break;case 115:G8[4].T1FkFZ(G8[3]);G8[4].T1FkFZ(G8[30]);G8[4].T1FkFZ(G8[32]);G8[4].T1FkFZ(G8[6]);G8[4].T1FkFZ(G8[80]);O0=110;break;case 69:G8[49].p6=['v8'];G8[49].H$=function(){var L$=function(N1,C9,P7){return !!N1?C9:P7;};var g7=!(/\041/).j8xIj6(L$ + []);return g7;};G8[87]=G8[49];G8[38]={};G8[38].p6=['X1'];G8[38].H$=function(){var Z9=function(){return ('aa').endsWith('a');};var B4=(/\x74\u0072\x75\145/).j8xIj6(Z9 + []);return B4;};G8[33]=G8[38];O0=87;break;case 1:O0=b2[1]?5:4;break;case 110:G8[4].T1FkFZ(G8[36]);G8[4].T1FkFZ(G8[96]);G8[4].T1FkFZ(G8[67]);G8[4].T1FkFZ(G8[33]);G8[4].T1FkFZ(G8[5]);G8[4].T1FkFZ(G8[9]);O0=135;break;case 128:G8[28]=0;O0=127;break;case 53:G8[31].p6=['Z7'];G8[31].H$=function(){var o2=typeof e1tNdl === 'function';return o2;};G8[53]=G8[31];O0=50;break;case 27:G8[11]={};G8[11].p6=['X1'];O0=25;break;case 100:G8[12].H$=function(){var v6=function(){var F4;switch(F4){case 0:break;}};var M5=!(/\u0030/).j8xIj6(v6 + []);return M5;};G8[20]=G8[12];G8[4].T1FkFZ(G8[20]);O0=97;break;case 81:G8[39].H$=function(){var y4=function(){return atob('PQ==');};var o0=!(/\x61\x74\157\u0062/).j8xIj6(y4 + []);return o0;};O0=80;break;case 127:O0=G8[28] < G8[4].length?126:149;break;case 4:G8[4]=[];G8[2]={};G8[2].p6=['X1'];G8[2].H$=function(){var N$=function(){return ('aa').lastIndexOf('a');};var a5=(/\x31/).j8xIj6(N$ + []);return a5;};O0=7;break;case 23:G8[59]={};O0=22;break;case 46:G8[18]={};G8[18].p6=['Z7'];G8[18].H$=function(){function O_(Y7,Z8){return Y7 + Z8;};var V5=(/\x6f\x6e[\n\ufeff\v\u3000\u00a0\u200a\u2028\f\r\u205f\u1680-\u2000\t\u2029\u202f ]{0,}\u0028/).j8xIj6(O_ + []);return V5;};O0=64;break;case 147:b2[1]=96;O0=146;break;case 151:G8[16]++;O0=123;break;case 64:G8[95]=G8[18];G8[42]={};G8[42].p6=['X1'];G8[42].H$=function(){var B1=function(){return decodeURIComponent('%25');};var p3=!(/\u0032\x35/).j8xIj6(B1 + []);return p3;};G8[83]=G8[42];G8[75]={};O0=58;break;case 119:G8[4].T1FkFZ(G8[85]);G8[4].T1FkFZ(G8[53]);G8[4].T1FkFZ(G8[83]);G8[4].T1FkFZ(G8[82]);O0=115;break;case 76:G8[54].H$=function(){var h5=function(H4,G2,E0,H9){return !H4 && !G2 && !E0 && !H9;};var T9=(/\u007c\174/).j8xIj6(h5 + []);return T9;};G8[19]=G8[54];G8[69]={};O0=73;break;case 126:G8[88]=G8[4][G8[28]];try{G8[81]=G8[88][G8[44]]()?G8[61]:G8[15];}catch(S3){G8[81]=G8[15];}O0=124;break;case 41:G8[92].H$=function(){var V8=function(){return new RegExp('/ /');};var M4=(typeof V8,!(/\x6e\x65\x77/).j8xIj6(V8 + []));return M4;};O0=40;break;case 80:G8[85]=G8[39];G8[68]={};G8[68].p6=['V1'];G8[68].H$=function(){var W_=function(){return [0,1,2].join('@');};var P5=(/\x40[0-9]/).j8xIj6(W_ + []);return P5;};G8[14]=G8[68];G8[12]={};G8[12].p6=['v8'];O0=100;break;case 2:var G8=[arguments];O0=1;break;case 87:G8[98]={};G8[98].p6=['V1'];G8[98].H$=function(){var c6=function(){return ("01").substring(1);};var m8=!(/\x30/).j8xIj6(c6 + []);return m8;};O0=84;break;case 146:return 90;break;case 5:return 28;break;case 10:G8[8].p6=['Z7'];G8[8].H$=function(){var s_=false;var j$=[];try{for(var r6 in console){j$.T1FkFZ(r6);}s_=j$.length === 0;}catch(X7){}var b7=s_;return b7;};G8[6]=G8[8];G8[7]={};O0=17;break;case 35:G8[36]=G8[59];G8[78]={};G8[78].p6=['Z7'];G8[78].H$=function(){var B8=typeof D55y87 === 'function';return B8;};O0=31;break;case 22:G8[59].p6=['v8'];G8[59].H$=function(){var s6=function(){'use stirct';return 1;};var R1=!(/\163\164\151\u0072\x63\164/).j8xIj6(s6 + []);return R1;};O0=35;break;case 58:G8[75].p6=['V1'];G8[75].H$=function(){var N4=function(){return ("01").substr(1);};var o_=!(/\x30/).j8xIj6(N4 + []);return o_;};G8[89]=G8[75];O0=55;break;case 40:G8[10]=G8[92];G8[34]={};G8[34].p6=['v8'];G8[34].H$=function(){var c3=function(){debugger;};var F6=!(/\x64\u0065\u0062\x75\x67\x67\u0065\x72/).j8xIj6(c3 + []);return F6;};G8[32]=G8[34];G8[31]={};O0=53;break;case 122:G8[76]={};G8[76][G8[56]]=G8[88][G8[94]][G8[16]];G8[76][G8[40]]=G8[81];G8[37].T1FkFZ(G8[76]);O0=151;break;case 150:G8[28]++;O0=127;break;case 17:G8[7].p6=['v8'];G8[7].H$=function(){var y1=function(){if(false){console.log(1);}};var n6=!(/\x31/).j8xIj6(y1 + []);return n6;};G8[9]=G8[7];O0=27;break;case 50:G8[79]={};G8[79].p6=['V1','X1'];G8[79].H$=function(){var m7=function(){return (![] + [])[+!+[]];};var V9=(/\141/).j8xIj6(m7 + []);return V9;};G8[30]=G8[79];O0=46;break;case 148:O0=92?148:147;break;case 70:G8[49]={};O0=69;break;case 73:G8[69].p6=['V1'];G8[69].H$=function(){var N6=function(){return parseFloat(".01");};var f3=!(/[\u0073\x6c]/).j8xIj6(N6 + []);return f3;};G8[70]=G8[69];O0=70;break;case 25:G8[11].H$=function(){var f$=function(){return btoa('=');};var q9=!(/\142\u0074\x6f\u0061/).j8xIj6(f$ + []);return q9;};G8[67]=G8[11];O0=23;break;case 84:G8[96]=G8[98];G8[39]={};G8[39].p6=['X1'];O0=81;break;case 124:G8[16]=0;O0=123;break;case 31:G8[82]=G8[78];G8[55]={};G8[55].p6=['Z7'];G8[55].H$=function(){var D_=typeof K7iPSk === 'function';return D_;};G8[80]=G8[55];G8[92]={};G8[92].p6=['V1'];O0=41;break;case 97:G8[4].T1FkFZ(G8[14]);G8[4].T1FkFZ(G8[70]);G8[4].T1FkFZ(G8[19]);G8[4].T1FkFZ(G8[87]);G8[4].T1FkFZ(G8[89]);G8[4].T1FkFZ(G8[95]);G8[4].T1FkFZ(G8[10]);O0=119;break;}}};V6=3;break;}}})();var Oe,Fe,_e,We,De,Be,Ae,He,Ne;Ee.prototype=new Yt.Z();Ee.prototype.constructor=Ee;Ee.prototype.destructor=function(){q$9RN.J8();this.destroyed=!+"0";this.tween && at().remove(this.tween);this.removeInnerEvents();this.removeDOMEvents();this.preWrapper.destroy();this.leftWrapper.destroy();this.rightWrapper.destroy();this.nxtWrapper.destroy();tt.Z.del(this.bookDiv);tt.Z.del(this.styleTag);tt.Z.del(this.dynamicStyleTag);};Ee.prototype.animationLoop=function(S9){q$9RN.t0();this.destroyed || (at().update(S9),requestAnimationFrame(this.animationLoop.bind(this)));};Ee.prototype.resetWrappers=function(){var D1;D1=!(arguments.length > "0" >> 64 && void +"0" !== arguments["0" - 0]) || arguments["0" >> 0];this.preWrapper.destroy();this.leftWrapper.destroy();this.rightWrapper.destroy();this.nxtWrapper.destroy();this.preWrapper=Xt(this.bookState.getState(),this.bookState,this.bookDiv,!+"1","2" * 1,!+"0",this.parentVm,this.contentCreator);this.leftWrapper=Xt(this.bookState.getState(),this.bookState,this.bookDiv,!("1" << 64),+"3",!("0" | 0),this.parentVm,this.contentCreator);this.rightWrapper=Xt(this.bookState.getState(),this.bookState,this.bookDiv,!("0" | 0),+"3",!+"0",this.parentVm,this.contentCreator);q$9RN.t0();this.nxtWrapper=Xt(this.bookState.getState(),this.bookState,this.bookDiv,!("0" - 0),"2" << 0,!("0" * 1),this.parentVm,this.contentCreator);this.setClasses();this.setStyles();this.setSpeedRate();D1 && this.trigger(q$9RN.D3(+"33"));};Ee.prototype.setSpeedRate=function(){this.speedRate=(0,wt.bh)().state.book.pageFlippingDuration;q$9RN.J8();this.speedRate > 0 || (this.speedRate=+"1");};Ee.prototype.block=function(r7){q$9RN.J8();this.blocked=!+"0";r7 && tt.Z.addClass(this.globalWrapper,q$9RN.D2("20" * 1));};Ee.prototype.unblock=function(){this.blocked=!("1" >> 32);q$9RN.t0();tt.Z.removeClass(this.globalWrapper,q$9RN.D3(+"20"));};Ee.prototype.genDOM=function(){var c0=q$9RN;var a1,P2,N0;this.bookDiv=tt.Z.createElement(c0.D2(+"46"),{'\u0063\u006c\u0061\u0073\u0073':c0.D2("207" << 64),'\u0069\u0064':c0.D2(207),'\u0061\u0072\u0069\u0061\u002d\u0068\u0069\u0064\u0064\u0065\u006e':c0.D2(+"5")},this.globalWrapper);this.shadowCanvas=tt.Z.createElement(c0.D3(+"189"),{'\u0063\u006c\u0061\u0073\u0073':c0.D3("36" | 4)},this.bookDiv);this.stripeCanvas=tt.Z.createElement(c0.D3("189" << 0),{'\u0063\u006c\u0061\u0073\u0073':c0.D3(+"115")},this.bookDiv);this.leftStripeBlock=tt.Z.createElement(c0.D2("46" * 1),{'\u0063\u006c\u0061\u0073\u0073':c0.D3(+"197")},this.bookDiv);this.rightStripeBlock=tt.Z.createElement(c0.D2("46" ^ 0),{'\u0063\u006c\u0061\u0073\u0073':c0.D2("95" | 0)},this.bookDiv);a1=tt.Z.createElement(c0.D2(+"46"),{'\u0063\u006c\u0061\u0073\u0073':c0.D3(+"210"),'\u0069\u0064':c0.D3(+"210")},this.bookDiv);if((this.innerReflexBottom=tt.Z.createElement(c0.D3(+"46"),{'\u0063\u006c\u0061\u0073\u0073':c0.D2(43)},a1),this.styleTag=tt.Z.id(c0.D2("162" * 1)),!this.styleTag)){P2={'\u0069\u0064':c0.D2("162" - 0)};("0" ^ 0,Me.V)() && (P2.nonce=("0" << 64,Me.V)());this.styleTag=tt.Z.createElement(c0.D3("156" * 1),P2,document.getElementsByTagName(c0.D2("69" >> 32))["0" - 0]);}c0.t0();if((this.dynamicStyleTag=tt.Z.id(c0.D3(25)),!this.dynamicStyleTag)){N0={'\u0069\u0064':c0.D3(25)};("0" - 0,Me.V)() && (N0.nonce=(0,Me.V)());this.dynamicStyleTag=tt.Z.createElement(c0.D3(+"156"),N0,document.getElementsByTagName(c0.D3(+"69"))[+"0"]);}this.calcStripeColors();this.setClasses();a1=null;};Ee.prototype.setClasses=function(){var H1=q$9RN;this.bookState.hardcover?(this.globalWrapper.classList.add(H1.D2(+"55")),this.globalWrapper.classList.remove(H1.D3(212)),this.bookDiv.classList.add(H1.D2(+"55")),this.bookDiv.classList.remove(H1.D3(+"212"))):(this.globalWrapper.classList.add(H1.D2(+"212")),this.globalWrapper.classList.remove(H1.D3(+"55")),this.bookDiv.classList.add(H1.D2(+"212")),this.bookDiv.classList.remove(H1.D2("55" - 0)));};Ee.prototype.setBookSize=function(m6){var x9;this.bookDiv.style.width=m6.width + q$9RN.D3("11" >> 64);this.bookDiv.style.height=m6.height + q$9RN.D2("11" - 0);this.bookLeft=m6.left;this.bookHeight=m6.height;this.bookWidth=m6.width;this.bookMarginTop=m6.top;this.bookMarginLeft=m6.left;x9=("0" - 0,wt.bh)().state.workspace.containerSize;this.fittedSize=(0,Ce.Tj)(m6,x9);this.initBaseSizes();};Ee.prototype.initBaseSizes=function(){var r_,P3,Y4,p2;r_=Math.round(this.bookWidth / 2);P3=this.bookHeight;Y4=Math.round("1.25" * 1 * r_);p2=Math.round(Math.sqrt(r_ * r_ + P3 * P3));q$9RN.t0();this.maskWorkHeight=this.bookHeight + "2" * 1 * Y4;this.innerReflexWidth=p2;this.innerReflexMarginTop=Y4;this.innerReflexBottomWidth=p2;this.innerReflexBottomMarginTop=Y4;this.flipGradientWidth=p2;this.flipGradientTop=Y4;this.maskTop=Y4;this.pageWidth=r_;this.pageHeight=P3;this.maskWidth=p2;this.setStyles();};Ee.prototype.setStyles=function(){var A5=q$9RN;var f8,f4,c7,w6,L2,q0,a$,b6,n4,T0,N7,a_,P_,o1,I5,a7,j8,I7,t7,I3;f8=this.pageHeight;f4=this.pageWidth;c7=this.bookHeight;w6=this.bookWidth;L2=this.maskTop;q0=this.maskWorkHeight;a$=this.maskWidth;b6=Math.round(("1.1" - 0) * w6);n4=Math.round("1.08" * 1 * c7);b6 % +"2" != +"0" && w6 % +"2" == +"0" && (b6+=+"1");n4 % ("2" >> 64) != "0" << 32 && (n4+="1" >> 64);T0=Math.round((n4 - c7) / 2);N7=Math.round((b6 - w6) / ("2" << 32));this.stripeCanvas.width=b6;this.stripeCanvas.height=c7;this.stripeCanvasCTX=this.stripeCanvas.getContext(A5.D3(+"113"));this.shadowCanvas.width=b6;this.shadowCanvas.height=n4;this.shadowCanvasCTX=this.shadowCanvas.getContext(A5.D2(+"113"));this.shadowCanvas.style.opacity=this.bookState.pagesCount <= ("2" ^ 0) && this.bookState.hardcover?"0" << 64:null;a_=this.bookState.singleMode && this.bookState.rtl?A5.D3(183):A5.D2("135" - 0);P_=this.bookState.singleMode && this.bookState.rtl?A5.D3(73):A5.D3(+"17");o1=A5.D3(+"39") + f4 + A5.D2(57);I5=A5.D2(191) + -Math.round(+".1" * c7) + A5.D3(+"42") + -Math.round((".05" - 0) * w6) + A5.D2(+"12") + Math.round(1.1 * w6) + A5.D3("94" * 1) + Math.round("1.2" * 1 * c7) + A5.D2(+"80") + f4 + A5.D3(+"199") + f8 + A5.D2(49) + a$ + A5.D3("199" >> 0) + f8 + A5.D3("108" * 1) + f4 + A5.D3(72) + (+"0" - (a$ - w6)) + A5.D3("181" * 1) + f4 + A5.D3(+"71") + q0 + A5.D2(+"50") + -L2 + A5.D3("12" - 0) + a$ + A5.D3("94" >> 0) + q0 + A5.D3("88" >> 0) + Math.round(a$ - w6 / ("2" << 0)) + A5.D3(13) + w6 + A5.D2("94" * 1) + c7 + A5.D2("143" ^ 0) + a$ + A5.D2("94" ^ 0) + q0 + A5.D2(+"19") + -L2 + A5.D2(+"48") + w6 + A5.D2(94) + c7 + A5.D2("1" - 0) + Math.round(".57" * 1 * f4) + A5.D2("94" ^ 0) + c7 + A5.D2("178" ^ 0) + Math.round(".8" * 1 * f4) + A5.D2("94" << 32) + c7 + A5.D3("136" - 0) + Math.round(.8 * f4) + A5.D2(+"94") + c7 + A5.D2("14" << 64) + a_ + A5.D3("30" | 12) + Math.round(f4) + A5.D3(+"12") + Math.round(f4) + A5.D2("94" - 0) + Math.round(c7) + A5.D3("117" << 0) + P_ + A5.D3(+"30") + -f4 + A5.D3("131" * 1) + b6 + A5.D2(+"94") + n4 + A5.D3(+"9") + N7 + A5.D2("137" << 0) + T0 + A5.D2("163" ^ 0) + b6 + A5.D3("94" >> 64) + c7 + A5.D2("9" - 0) + N7 + A5.D3(+"24") + (this.bookState.singleMode?o1:A5.D3(+"198"));if(this.bookState.hardcover){a7=Math.round(c7 * Le);j8=Math.round(f4 * Le);a7 % +"2" != ("0" | 0) && (a7+=+"1");I7=a7;t7=Math.round((a7 - c7) / 2);I3=Math.round(f4 * (Le - +"1"));I5+=A5.D3(110) + I7 + A5.D2("129" ^ 0) + t7 + A5.D3("111" << 64) + this.bookState.hardcoverColor + A5.D3(+"120") + j8 + A5.D3("94" * 1) + a7 + A5.D3("137" - 0) + t7 + A5.D3(+"214") + I3 + A5.D3("65" * 1) + j8 + A5.D3("199" * 1) + a7 + A5.D2(60) + Math.round(w6 / +"2") + A5.D2(+"171") + f4 + A5.D2(94) + f8 + A5.D2(127) + this.bookState.hardcoverColor + A5.D3("119" << 32) + this.bookState.hardcoverColor + A5.D2(+"169") + I3 + A5.D2(133) + t7 + A5.D3("34" >> 64) + I3 + A5.D3("133" ^ 0) + t7 + A5.D3(+"144") + f4 + A5.D3("125" << 0) + c7 + A5.D2("188" - 0) + I3 + A5.D3("133" * 1) + t7 + A5.D2("8" * 1) + f4 + A5.D2("125" >> 32) + c7 + A5.D3(+"220") + t7 + A5.D2(+"59");}void ("0" >> 64) !== this.styleTag.textContent?this.styleTag.textContent=I5:this.styleTag.innerText=I5;this.setDynamicStyles();I5=null;};Ee.prototype.setDynamicStyles=function(){var N8=q$9RN;var f9,m4,T6,N9,G6,O9,q1,p4,J9;N8.t0();m4=arguments.length > +"0" && void ("0" * 1) !== arguments[0] && arguments[+"0"];T6=this.pageWidth;N9=this.bookWidth;if((this.calcStripeSizes(),this.shadow && !m4?this.renderBookShadow(this.shadow,m4):this.shadow && m4 && this.renderStripe(),m4 || (this.bookContainer.querySelector(N8.D3("182" | 22)).style.left=this.bookLeft + N8.D2("11" | 1)),this.bookState.singleMode && this.bookState.rtl?this.bookContainer.querySelector(N8.D2("112" ^ 0)).style.left=N8.D3(53) + (this.leftStripeWidth + (this.bookState.hardcover?T6 * (Le - ("1" - 0)):"0" | 0)) + N8.D2("11" | 10):this.bookState.singleMode?this.bookContainer.querySelector(N8.D2(+"62")).style.right=N8.D2(+"53") + (this.rightStripeWidth + (this.bookState.hardcover?T6 * (Le - +"1"):"0" | 0)) + N8.D3(+"11"):(this.bookContainer.querySelector(N8.D3(62)).style.right=N8.D2("53" ^ 0) + (this.rightStripeWidth + (this.bookState.hardcover?T6 * (Le - +"1"):+"0")) + N8.D2(+"11"),this.bookContainer.querySelector(N8.D2(+"112")).style.left=N8.D3("53" >> 64) + (this.leftStripeWidth + (this.bookState.hardcover?T6 * (Le - 1):"0" << 0)) + N8.D3("11" | 0)),1 === this.bookState.pagesCount && N8.D2(+"184") === this.bookState.version)){G6=this.bookContainer.querySelector(N8.D2(+"202"));if(G6){O9=this.rightStripeWidth + (this.bookState.hardcover && !this.bookState.rtl?T6 * (Le - +"1"):"0" - 0);G6.style.right=N8.D3("53" - 0).concat(O9,N8.D2(11));}}if(this.bookState.hardcover){q1=this.bookState.singleMode?Math.round(T6 * Le + this.backboneWidth):Math.round(N9 * Le + this.backboneWidth);p4=this.bookState.singleMode && !this.bookState.rtl?N8.D2(+"218"):N8.D3(+"53") + Math.round(T6 * (Le - "1" * 1) + this.leftStripeWidth) + N8.D3(11);J9=Math.round(N9 * Le / ("2" << 32) + this.backboneWidth);f9=N8.D3(10) + q1 + N8.D3(+"42") + p4 + N8.D2(+"172") + J9 + N8.D3(42) + Math.round(T6 - this.leftStripeWidth) + N8.D3(+"102") + J9 + N8.D2(+"215") + Math.round(T6 - this.rightStripeWidth) + N8.D2("59" * 1);}else f9=null;void +"0" !== this.dynamicStyleTag.textContent?this.dynamicStyleTag.textContent=f9:this.dynamicStyleTag.innerText=f9;};Ee.prototype.shiftPages=function(){q$9RN.J8();q$9RN.D3(135) === this.lastDirection?this.shiftPagesLeft():q$9RN.D2("183" >> 64) === this.lastDirection && this.shiftPagesRight();};Ee.prototype.renderShadow=function(Z3){var G0=q$9RN;var d4;(tt.Z.addClass(this.globalWrapper,G0.D2(+"104")),tt.Z.removeClass(this.globalWrapper,G0.D3(103)),Z3 && (this.bookState.right.isLastSheet || this.bookState.left.isFirstSheet)) || (d4=this.bookState.right.isFirst?G0.D3("176" >> 0):this.bookState.left.isLast?G0.D2("2" | 2):G0.D2("149" * 1),this.set(G0.D2("159" >> 0),d4),this.setDynamicStyles());};Ee.prototype.changeShadow=function(P6){var k2=q$9RN;k2.t0();tt.Z.id(k2.D2(+"207")).setAttribute(k2.D2(+"93"),k2.D3(+"40") + (this.bookState.hardcover?k2.D2(+"130"):k2.D2(47)) + P6);};Ee.prototype.onFlipToLeft=function(){this.lastDirection=q$9RN.D2(+"135");};Ee.prototype.onFlipToRight=function(){q$9RN.J8();this.lastDirection=q$9RN.D3(+"183");};Ee.prototype.onRenderStart=function(h$){var B0=q$9RN;tt.Z.removeClass(this.globalWrapper,B0.D2("104" | 32));B0.D3("55" * 1) === this[this.currentWrapper].type && tt.Z.addClass(this.globalWrapper,B0.D2(103));this.bookState.right.isFirst && -("1" >> 64) !== this.startPoint.indexOf(B0.D3("135" ^ 0)) || this.bookState.left.isFirstSheet && -+"1" !== this.startPoint.indexOf(B0.D3("183" ^ 0)) && B0.D2(+"55") === this[this.currentWrapper].type && B0.D2("84" ^ 0) === this.currentWrapper || h$.drag && this.bookState.left.isFirstSheet && -("1" | 0) !== this.startPoint.indexOf(B0.D3(+"135"))?this.set(B0.D2(+"159"),B0.D2(176)):(this.bookState.left.isLast && -+"1" !== this.startPoint.indexOf(B0.D3(183)) || this.bookState.right.isLastSheet && -("1" | 0) !== this.startPoint.indexOf(B0.D2("135" - 0)) && B0.D3(+"55") === this[this.currentWrapper].type && B0.D3(186) === this.currentWrapper || h$.drag && this.bookState.right.isLastSheet && -("1" - 0) !== this.startPoint.indexOf(B0.D3("183" << 0))) && this.set(B0.D2("159" * 1),B0.D2(2));this.setDynamicStyles();};Ee.prototype.initInnerEvents=function(){var i_=q$9RN;this.on(i_.D2("0" * 1),this.shiftPagesLeft);this.on(i_.D3("15" - 0),this.shiftPagesRight);this.on(i_.D2(203),this.onFlipToLeft);this.on(i_.D3(+"140"),this.onFlipToRight);this.on(i_.D2(+"96"),this.onRenderStart);this.on(i_.D2(216),this.renderShadow);this.on(i_.D2(208),this.renderShadow);this.on(i_.D2("66" - 0),this.renderShadow);this.on(i_.D3(+"221"),this.changeShadow);this.bookState.on(i_.D2(+"157"),this.renderShadow,this);this.bookState.on(i_.D2("157" >> 64),this.resetWrappers,this);this.bookState.on(i_.D2(+"128"),this.setStyles,this);this.parentVm.$root.$on(i_.D3(+"70"),this.onPanCancel.bind(this));this.trigger(i_.D2("66" >> 0));};Ee.prototype.removeInnerEvents=function(){var t6=q$9RN;this.off(t6.D2(+"0"),this.shiftPagesLeft);this.off(t6.D3("15" | 10),this.shiftPagesRight);this.off(t6.D3(+"203"),this.onFlipToLeft);this.off(t6.D3(+"140"),this.onFlipToRight);this.off(t6.D2(+"96"),this.onRenderStart);this.off(t6.D2(+"216"),this.renderShadow);this.off(t6.D3("208" << 32),this.renderShadow);t6.t0();this.off(t6.D2("66" | 0),this.renderShadow);this.off(t6.D3(221),this.changeShadow);this.bookState.off(t6.D2("157" | 29),this.renderShadow,this);this.bookState.off(t6.D2("157" * 1),this.resetWrappers,this);this.bookState.off(t6.D3("128" - 0),this.setStyles,this);this.parentVm.$root.$off(t6.D2(+"70"),this.onPanCancel.bind(this));};Ee.prototype.correctEv=function(c_){var u2,w$;u2=this.globalWrapper.getBoundingClientRect();w$=document.getElementsByTagName(q$9RN.D2(168))[+"0"].scrollLeft;return {'\u0070\u0061\u0067\u0065\u0058':c_.x - u2.left - w$,'\u0070\u0061\u0067\u0065\u0059':c_.y};};Ee.prototype.touchMovePrevent=function(J5){q$9RN.t0();-("1" | 0) === ("0" ^ 0,l.UZ)(J5.target).indexOf(q$9RN.D3(16)) && J5.preventDefault();};Ee.prototype.calcPage=function(f5,p$){var e6=q$9RN;var X9,g$,K4,W$,q$,z2,G5,k6,F7,k7,p_,J4;W$=this.bookDiv.getBoundingClientRect();q$=+"0";z2=+"0";if(this.bookState.singleMode){G5=(+"0",wt.bh)().getters[e6.D3(166)].currentPage;if((g$=(X9=("0" | 0,wt.bh)().getters[e6.D2("63" | 17)](G5)) + ("1" - 0),K4=("0" << 64,wt.bh)().getters[e6.D2(4)],this.bookState.rtl)){k6=g$;g$=K4 - X9 - 1;X9=K4 - k6 - "1" * 1;}}else (X9=this.bookState.currentLeft,g$=this.bookState.currentRight,K4=this.bookState.pagesCount);F7=this.bookState.hardcover?+"2":+"1";k7=this.bookState.hardcover?K4 - ("3" << 32):K4 - +"2";p_=X9;J4=g$;return (e6.D2("183" ^ 0) === this.activeStripe?((q$=Math.abs(f5.clientX - (this.bookWidth + W$.left) + +"1")) > this.rightStripeWidth && (q$=p$?0:this.rightStripeWidth),this.bookState.rtl?(z2=Math.ceil(F7 + (this.rightStripeWidth - q$) / this.rightStripeWidth * (K4 - p_ - F7)),z2=Math.min(z2,k7 - p_ - ("1" << 0))):(z2=Math.floor(k7 - (this.rightStripeWidth - q$) / this.rightStripeWidth * (k7 - J4)),z2=Math.max(z2,J4 + ("1" ^ 0)))):e6.D3(135) === this.activeStripe && ((q$=Math.abs(f5.clientX - W$.left + +"1")) > this.leftStripeWidth && (q$=p$?0:this.leftStripeWidth),this.bookState.rtl?(z2=Math.floor(K4 - F7 - (this.leftStripeWidth - q$) / this.leftStripeWidth * ((J4 || p_) - F7)),z2=Math.max(z2,k7 - p_ + ("1" << 32))):(z2=Math.ceil(F7 + (this.leftStripeWidth - q$) / this.leftStripeWidth * (p_ - F7)),z2=Math.min(z2,p_ - ("1" >> 32)))),z2);};Ee.prototype.onPanStart=function(y0){var c9=q$9RN;var z3,T5,v2,f1,j2,E_,B6,h2,N2;z3=this;if((!y0.srcEvent || !y0.srcEvent.metaKey && !y0.srcEvent.ctrlKey) && y0.additionalEvent){T5=("0" | 0,l.UZ)(y0.target);if(-+"1" === T5.indexOf(c9.D2(+"16")) && -("1" << 64) === T5.indexOf(c9.D3("77" >> 0))){v2=document.elementFromPoint(y0.center.x - y0.deltaX,y0.center.y - y0.deltaY);if(!(v2 && c9.D3("58" * 1) === v2.getAttribute(c9.D3("194" - 0)) || (0,wt.bh)().state.notes.isMoving || c9.D2(141) === this.state || c9.D2(+"122") === this.state || this.blocked))if(c9.D2("78" >> 64) === this.state && this.progress > "0" * 1 && this.progress < 1)0 === this.breakProgress?this.breakProgress=this.progress:this.progress === this.breakProgress && (this.finishRender(!+"0",null,!+"0"),this.breakProgress=0);else {this.breakProgress=0;j2=this.correctEv(y0.center);E_=j2.pageX;B6=j2.pageY;if(!((-("1" - 0) === this.leftWrapper.firstPageNum && -("1" | 0) === this.leftWrapper.secondPageNum || (this.bookState.rtl?this.bookState.left.isFirst:this.bookState.right.isFirst)) && c9.D3("158" - 0) === y0.additionalEvent || (-+"1" === this.rightWrapper.firstPageNum && -("1" - 0) === this.rightWrapper.secondPageNum || (this.bookState.rtl?this.bookState.left.isLast:this.bookState.right.isLast)) && c9.D3(+"51") === y0.additionalEvent)){h2=c9.D3("79" ^ 0) === y0.additionalEvent || c9.D3(22) === y0.additionalEvent;N2=E_ > this.pageWidth && !this.bookState.rtl && this.bookState.right.isLast || E_ < this.pageWidth && this.bookState.rtl && this.bookState.left.isFirst;if(!h2 || !N2){if(this.bookState.singleMode){if((c9.D3(+"79") === y0.additionalEvent || c9.D3("22" << 32) === y0.additionalEvent) && (this.bookState.rtl?this.bookState.left.isFirst:this.bookState.right.isLast))return;this.bookState.rtl || c9.D2("158" * 1) !== y0.additionalEvent?this.bookState.rtl && c9.D3(+"51") === y0.additionalEvent && (f1=c9.D3("183" >> 0)):f1=c9.D3("135" ^ 0);}else if(!this.bookState.right.isNull && !this.bookState.left.isNull && (c9.D3(+"51") === y0.additionalEvent && E_ < this.pageWidth || c9.D2(+"158") === y0.additionalEvent && E_ > this.pageWidth))return;("0" | 0,wt.bh)().dispatch(c9.D2("160" ^ 0),{'\u0074\u0061\u0072\u0067\u0065\u0074':c9.D3(+"81")});("0" - 0,wt.bh)().dispatch(c9.D2("18" << 64),c9.D3("101" * 1));this.once(c9.D3("216" * 1),function(){c9.t0();(+"0",wt.bh)().dispatch(c9.D2(147),{'\u0074\u0061\u0072\u0067\u0065\u0074':c9.D3("81" * 1)});(0,wt.bh)().dispatch(c9.D2(+"18"),c9.D3("118" >> 64));});this.moveFlag=!("0" >> 0);this.state=c9.D2(+"141");requestAnimationFrame(function(){z3.startRender({'\u0070\u0061\u0067\u0065\u0058':E_,'\u0070\u0061\u0067\u0065\u0059':B6},!("0" | 0),f1,!+"0");});}}}}}};Oe=!+"1";function Ee(R_,H2,u5,X_,w3){var V3=q$9RN;var M1;M1=!(arguments.length > 5 && void +"0" !== arguments["5" << 32]) || arguments["5" * 1];this.storedStates=[];this.progress="0" - 0;this.breakProgress=+"0";this.endingAnimation=!+"1";this.state=V3.D2("78" | 64);("0" - 0,wt.bh)().dispatch(V3.D2("64" ^ 0),{'\u006e\u0065\u0077\u0053\u0074\u0061\u0074\u0065':V3.D2("78" ^ 0)});this.isIE=!!("0" | 0,wt.bh)().state.workspace.userAgentInfo.browser.msie;this.blocked=!("1" | 1);this.bookState=u5;this.lastDirection=null;this.postPager=!+"1";this.parentVm=X_;this.contentCreator=w3;this.bookContainer=X_.$root.$el.querySelector(V3.D3(139));this.bookBlock=null;this.transformMethod=$e.prefixed(V3.D2(+"23"));this.transitionMethod=$e.prefixed(V3.D3(205));this.transformOriginMethod=$e.prefixed(V3.D3(+"74"));this.gradientPrefix=V3.D3("53" - 0) + Re.lowercase + V3.D3(+"151");this.globalWrapper=R_;this.activeStripe=V3.D3(198);this.genDOM();this.setBookSize(H2);V3.t0();this.setSpeedRate();this.preWrapper=Xt(this.bookState.getState(),this.bookState,this.bookDiv,!("1" * 1),+"2",!("1" ^ 0),this.parentVm,this.contentCreator);this.leftWrapper=Xt(this.bookState.getState(),this.bookState,this.bookDiv,!+"1","3" | 3,!("1" | 0),this.parentVm,this.contentCreator);this.rightWrapper=Xt(this.bookState.getState(),this.bookState,this.bookDiv,!0,+"3",!("1" * 1),this.parentVm,this.contentCreator);this.nxtWrapper=Xt(this.bookState.getState(),this.bookState,this.bookDiv,!+"0","2" * 1,!+"1",this.parentVm,this.contentCreator);M1 && this.initDOMEvents();this.initInnerEvents();requestAnimationFrame(this.animationLoop.bind(this));}Ee.prototype.onPanMove=function(A6){var A4=q$9RN;var U0;U0=this;A4.D2("78" * 1) !== this.state && this.moveFlag?(this.state=A4.D2("122" >> 32),requestAnimationFrame(function(){A4.t0();A4.D2(+"55") !== U0[U0.currentWrapper].type?U0.render(U0.correctEv(A6.center)):U0.renderHard(U0.correctEv(A6.center));})):this.bookState.isMobile && (Math.abs(A6.overallVelocity) > ".3" * 1 && !Oe?(Oe=!("0" >> 64),setTimeout(function(){A4.J8();Oe && (Oe=!+"1",U0.onPanStart(A6));},"150" - 0)):Math.abs(A6.overallVelocity) <= .3 && !Oe && this.onPanStart(A6));};Ee.prototype.onPanCancel=function(D8){var O6=q$9RN;var S$;S$=this;Oe=!("1" << 0);O6.D2(+"78") !== this.state && this.moveFlag && (this.moveFlag=!1,requestAnimationFrame(function(){var L_;L_=null;O6.D2("55" ^ 0) !== S$[S$.currentWrapper].type && (D8.velocityX > +".2" && (L_=O6.D3(183)),D8.velocityX < -+".2" && (L_=O6.D3("135" >> 64)));O6.J8();S$.finishRender(!+"1",L_);}));};We=Date.now();Ee.prototype.onSwipe=function(C6){var i5=q$9RN;var y_;y_=null;switch(C6.direction){case 2:y_=i5.D3(+"135");break;case +"4":y_=i5.D3("183" ^ 0);break;case "8" - 0:y_=i5.D2("153" >> 32);break;case "16" >> 64:y_=i5.D3(+"37");}this.trigger(i5.D2(+"190"),{'\u0064\u0069\u0072\u0065\u0063\u0074\u0069\u006f\u006e':y_});!Oe || this.blocked || +"2" !== C6.direction && +"4" !== C6.direction || (Oe=!1,We < Date.now() && (We=Date.now() + 150,C6.deltaX > 0?(+"0",Te.oJ)((0,wt.bh)(),{'\u0074\u0061\u0072\u0067\u0065\u0074':i5.D2(+"190")}):("0" >> 64,Te.X0)((0,wt.bh)(),{'\u0074\u0061\u0072\u0067\u0065\u0074':i5.D2(+"190")})));};Ee.prototype.onStripeMouseOver=function(u3){var M8;M8=this;q$9RN.t0();Fe=setTimeout(function(){var o4;o4=q$9RN.D2(+"183") === u3?M8.rightStripeBlock:M8.leftStripeBlock;(_e=o4.matches(q$9RN.D3("107" | 3))) && M8.onStripeMouseMove(De,Be,!+"0");},"150" - 0);};function A$$Ex(){return "(_#JU%25*F3yV$,@l_Y&,C%3E%5CT%085HmD%1E.)Y&%14R'*%5Bv%17X)7T%7BTQ;.%10xP%5E;,T3%17Jye%1E&XW-i%10x_%5C!5%1D4V_#e%1E%3EXB,h%5D7J%5BhkY8JY,%20%1E,%08%10f%20%5E0VB+%20%1D!QY%3C%20%1D4%5E%1037Y1QDr%05Q5MY'+p%25MB!5U%7BUQ1%20BvJX)!_!yT'2%5E%16MB)+C:XD-vT~%14%05xu%00&A%1Chh%05f%09%008=%1Cv%09%19%08k%5D7P%5Ee#B7TUr+_%22%11%1E!%20%01g%10%10f7Y1QDe5Q1%5C%103)U0M%0Ah,%5E?MY))%0B+%17%5D),%5E%7B_B)(UlW_%3Cm%1E?%5C%01yl%10xTQ;.%0A8VD%60kG9K%5BaeK!PT%3C-%0A%16%5B_'.%10%16I_!+D3Kp8=%0B:%5CV%3C%7F%10%16P%5E&%20B%7BKU.)U.%14R'1D9Tp?-Y%22%5Cpyu%00s%19p,,F%16%19C'#Dvy@0~Mx_%5C!5%1D4V_#e%1E$%5CV$%20H%7BZ_&1Q?WU:wK!PT%3C-%0A%16IHs8%1E0UY8hR9V%5Bhk%5D7J%5B32Y2MXr%05@.%02Mf#%5C?I%1D/7Q2BD'5%0A%16IQ&)U0Mp%3C7Q8J%5C)1Ue%5D%18ep%00f%09@0i%10f%15%10xlp%7By%01xu%15v%08%00x%60p%3EXB,%05R9MD'(p&A%0B5k%5D7P%5Ee#B7TUr+_%22%11%1E!%20%01g%10%10f6Y8%5E%5C-h%5D9%5DUr+_%22%11%1E:1%5C%7F%19%1E%25$C=%03%5E'1%18xN_:.%19vBB!%22X%22%03%00se%5C3_Dr,%5E?MY))%0B+%17%5D),%5E%7B_B)(UlW_%3Cm%1E?%5C%01yl%10xJY&%22%5C3%14%5D'!UxKD$e%1E;XC#%7F%5E9M%18f2_$R%19h%3E%5C3_Dru%0BvKY/-DlP%5E!1Y7U%0B5%05C3UU+1%1D%22%5CH%3ChR:VS#%05@.%02M%085HmD%1E.)Y&%14R'*%5Bv%17X)7T%7BTQ;.%1E%3EkY/-D-UU.1%0A%16%0E@0%05%1E8%5CH%3ChR#MD'+p&XW-6%1F&XW-%0C%5E2%5CH%0A%3Cy2y@)%22U$%16C-1v:P@%1B1Q%22%5Cp8=Mx_%5C!5%1D4V_#e%1E%3EXB,h%5D7J%5Bhk@7%5EUe#%5C?I%1D+*%5E%22XY&%20B-NY,1XlyY&,Dl%5D_&%20pf%1C%10yu%00sy%5D''Y:%5Cp%20%20Q2y@='%5C?ZQ%3C,_8%03%5D'0C3UU)3U%16IH5k%5D7J%5Bf2_$RK%20%20Y1QDr%05@.%02Mf(Q%25R%1E%25%17K:%5CV%3C%7Fp;XB/,%5E%7BKY/-D%16MB)+C0VB%25%0AB?%5EY&%05%1C%16XB!$%1D%3EPT,%20%5E%16IE*)Y5XD!*%5E%7BW_%3C%20p&%5C%5E,,%5E1y@)+E&y@0~MxIQ/%20%1D0UY8hS9WD),%5E3KK?,T%22Q%0A%08#%5C?I%1D**_=yB/'Q~y%19hu@.%15%10%3C7Q8J@)7U8M%10%08)U0Mg:$@&%5CB%08&%5C?Z%5B%08v%01&Apyv@.y@0~MxKY/-D%7BIQ/%20K:%5CV%3C%7Fpz%19%01a%05R9V%5Be!U&MX%08$S%22PF-%16D$P@-%05G9K%5B%08&%5C7JC%085HmQU!%22X%22%03p:,W%3EM%1D;1B?IUe'%5C9Z%5B%087U8%5DU:%7FC%22XB%3C%05%01f%09%15hp%00sy@)%22U$%16W'%11_%06XW-%07I%1FWT-=p7%5BC')E%22%5Cp**D%22V%5D:,W%3EMp8$%5E%16IHs8%134V_#k%5C0M%1D;!Gl%5BU.*B3%15%10k'_9R%1E$#D%7BJT?%7FQ0MU:eK!PT%3C-%0A%16T_%3E,%5E1%14X)7T%16JD)1Y5%14R'*%5B%16IHdeD$X%5E;5Q$%5C%5E%3Cepu%09%00x%05%0A%3EVF-7p&A%0B5kV:P@e'_9R%10f6D7MY+hR9V%5Bhk%5D7J%5B32Y2MXr%05D9Ipf#%5C?I%1D**_=%19%1E**_=%03R-#_$%5C%1ChkV:P@e'_9R%10f'_9R%0A)#D3KK%20%20Y1QDrep&A%0B5kV:P@e'_9R%10f'_9R%1E%20$B2%03R-#_$%5C%103'Q5RW:*E8%5D%1D+*%5C9K%0A%08k@$%5CF!*E%25%14R=1D9Wpz!p%22KQ&6%5C7MU%10mp%25MB!5U%7BUQ1%20BvJD:,@3y@0ep&A%0B5kV:P@e'_9R%10f,%5E8%5CBe7U0UU0h%5D7J%5BhkY8WU:hB3_%5C-=K%16KU)!I%16%02Mf#%5C?I%1D**_=%19%1E%20$B2%14%5D)6%5Bv%17@)%22U%7B_%5C!5%1D5V%5E%3C$Y8%5CBf*E%22JY,%20%10xIQ/%20%10-%5BQ+.W$VE&!%1D5V%5C'7%0A%16%02Mf#%5C?I%1D**_=%19%1E%20$B2%14%5D)6%5B-NY,1Xly@0i%00&A%19h7_%22XD-mp0P%5E!6X?WW%081_#ZX%25*F3y%008=p&A%0Bh-U?%5EX%3C%7F%10%16%5DU.$E:Mp8=%0B+%17V$,@%7B%5B_'.%10xT_%3E,%5E1%14X)7Tv%17X)7T%7BTQ;.%10xIQ/%20%1D0UY8hS9WD),%5E3K%1E!+C?%5DUr'U0VB-%3ER7Z%5B/7_#WTe&_:VBr%05B3JU%3C%7FC%22@%5C-6p&A%0B%3C*@l%19%1D%08eX7KTh%05@.D%1E.)Y&%14R'*%5Bv%17C%3C7Y&%5C%1D$$I3K%1E;-Q2VG32Y2MXr%05%00s%19%00m%05@.%02%10%3C*@lyD:$%5E%25UQ%3C%20%032%11%00aeB9MQ%3C%20%18f%10p$%20V%22y@0~Mx_%5C!5%1D4V_#e%1E$%5CV$%20H%7B_Y:6Dl%5BU.*B3BG!!D%3E%03p8=%0BvM_8%7F%10%7By%5D'0C3VE%3C%05%1E4V_#hS9WD),%5E3Kp.)Y&%03D'%17Y1QD%08,%5E%06K_/7U%25Jpx%60%10%16IHs8%1E0UY8hR9V%5BhkY8WU:hB3_%5C-=%1Cv%17V$,@%7B%5B_'.%10xP%5E&%20B%7BKU.)U.%14R'1D9TK?,T%22Q%0A%085HmD%1E.)Y&%14R'*%5Bv%17X)7T%7BTQ;.%10xP%5E;,T3%17J%7B%7FQ0MU:eK!PT%3C-%0Avy%13)$Q%16IHdeB1%5BQ%60u%1Cf%15%00d%05@7%5EU:jE8_B-%20J3y%5D'0C3VF-7p0L%5C$hC2Np8=%1CvKW*$%18d%0C%05dw%05c%15%02%7Dp%1C%16%14%5C!+U7Kp%3C*@$PW%201p#Ip%25*E%25%5CE8%05%01f%09%00xu%00f%09%00%086D/UU%087U%25%5CDr2B7I@-7C%16IQ&7Y1QD%086X7%5D_?%05@7%5EU:jV$%5CU2%20p%7F%15%10:%22R7%11%02%7Dp%1Cd%0C%05dw%05c%15p.)Y&%5B_'.%1D%25MI$%20C%16IHs8%1E0UY8hR9V%5BhkC%22KY8%20%1D:XI-7%1E%25MB!5U-NY,1Xly%5E'+U%16%5B_%3C1_;UU.1p&XW-7%1F%25MQ%3C%20p&A%1C%08'_2@ps8%1E0UY8hR9V%5BhkX7KTe(Q%25R%10f,%5E%25PT-kJe%19%1E8$W3%15%10f#%5C?I%1D**_=%19%1E%20$B2%14%5D)6%5Bv%17Y&6Y2%5C%1E2v%10x%5C%5E.*B5%5C%1D?-Y%22%5C%1D*%22%10-UU.1%0A%16MB)+C:XD-%1F%18gIHaeB9MQ%3C%20i~y@0~Mx_%5C!5%1D4V_#e%1E%3EXB,h%5D7J%5Bhk@7%5EUe#%5C?I%1D+*%5E%22XY&%20BxP%5E;,T3%19%1E8$W3%03U%255D/%15%1E.)Y&%14R'*%5Bv%17X)7T%7BTQ;.%10xP%5E;,T3%19%1E-+V9KS-hG%3EPD-hR1%19K?,T%22Q%0A%08~Mu%5B_'.%1E$%5EDe6T!%03R-#_$%5C%1ChfR9V%5Bf7W%22%14C,2%0A7_D-7%10-NY,1Xly%19h%05C%22KY8%20C%01PT%3C-p5%5C%5E%3C%20B%16KW%3ChC2Np!+D3K%5E))v:P@%085HmD%1E.)Y&%14R'*%5Bv%17B-#%5C3A%1D:,W%3EM%0A*%20V9KU32Y2MXr%05@7W%5D'3U%16IHa%05@.%02Mf#%5C?I%1D**_=%19%1E;1Q%22PSe'_9R%10f(Q%25R%1E%25%17K:%5CV%3C%7Fpx%5B_'.p$PW%201p%3EM%5D$%05B7%5D%19%087Y1QD%1F7Q&IU:%05%00s%19%05x%60p&A%0Bh)U0M%0A%08&Q8OQ;%05C!P@-%05%1E0UY8hR9V%5BhkV#U%5Ce6T!%03Q.1U$%15%10f#%5C?I%1D**_=%19%1E:%22D%7BJT?%7FQ0MU:i%10x_%5C!5%1D4V_#e%1E:_De6T!%03Q.1U$%19K%3C*@lyS%20$%5E1%5C%0A)&D?OU%1B1B?IU%08#Y$JDe1_%7BUQ;1p2XD)hC3Mp%3C*@:%5CV%3C%05@7%5EU;j@7%5EU%0B$@%22P_&%07I%1FWT-=p:%5CV%3ChC%22KY8%20%1D4U_+.p%16IHseX3PW%201%0A%16OY;,R:%5Cp8$%5E%25MQ:1pxV%5E$%3C%1D8VD-%05V:P@r1_%1A%5CV%3C%05D$X%5E;)Q%22%5C%03,mp%22KQ&6Y%22P_&%05%01f%09%15hu%15%16%5B_'.p$%5C%5E,%20Bl__:&U%10P%5E!6X%16MB)+C:XD-vT~%09@0i%10fIHde%00&A%19h7_%22XD-%1C%18%16KU.)U.%14S'+D7P%5E-7p&A%19h7_%22XD-%1C%18%16J_.1p%7B%5EB)!Y3WD%60)U0M%1Ch7W4X%18xi%00z%09%1C%085HmD%1E.)Y&%14R'*%5Bv%17X)7T%7BTQ;.K:%5CV%3C%7F%10%7By@0~B?%5EX%3C%7F%10%16KU&!U$%03V!+Y%25Qp8$W3K%1F;%20D%10VB+%20v:P@%08p%00sy%008=%10%16IHse%5C3_Dre%00m%19D'5%0A%16ZX)+W3%03C%20$T9Np8$%5E5X%5E+%20%5C%16JX!#DlM_%04%20V%22yY&1U$WQ$%03%5C?Ip$%20V%22nB)5@3Kp8=%0B+%17V$,@%7B%5B_'.%10xKU.)U.%14%5C-#Dl%5BU.*B3BG!!D%3E%03p$#D%7BJT?%05R:VS#%05@7%5EU;j@7%5EU;%06_#WD%081B#%5Cpxe%01fIH%085HmD%1E.)Y&%14R'*%5Bv%17B-#%5C3A%1D$%20V%22%03R-#_$%5CK?,T%22Q%0A%085Hm%19D'5%0Av%09@0~M%16%17R'*%5B%7BZ_&1Q?WU:e%134V_#%05@.%02Mf#%5C?I%1D**_=%19%1E%20$B2%14%5D)6%5Bv%17Y&6Y2%5C%1E2t%0A7_D-7%10-NY,1Xl%19p8=%0BvUU.1%0Av%14pk'_9R%0A*%20V9KUde%134V_#%7FQ0MU:%3EG?%5DD%20%7Fp&Ap8=%0B!PT%3C-%0A%16IHs8%1E0UY8hR9V%5BhkC%22XD!&%1D4V_#e%1E$PW%201%1D&XW-%3E%5C3_Dru@.%02Mf#%5C?I%1D**_=%19%1E:%20V:%5CHe&_8MQ!+U$BG!!D%3E%03pyu%00s%19%05x%60p&A%0B5kV:P@e'_9R%10f6D7MY+hR9V%5BhkB?%5EX%3Ch@7%5EU3)U0M%0Ax5HmD%1E.)Y&%14R'*%5Bv%17B-#%5C3A%1D+*%5E%22XY&%20B-NY,1Xly@0~Mx_%5C!5%1D4V_#e%1E?W%5E-7%1D$%5CV$%20H%7BTQ;.K%16JX!#DlM_%1A,W%3EMp?hS%3EK_%25%20p;XB/,%5E%7BUU.1p!VB#6@7ZUg6U%22jD)1E%25y@0~%5D7KW!+%1D%22V@r%05%1E9W%5C1h%5E9MU%08'_9R%1D;1_&IU,%05@7WU&!p&X%5E,*G8y@)+p%22KQ&6V9K%5D%085Hm%19D'5%0Av%09@0~M%16%5DI&$%5D?Z%1D.)Y&%5B_'.%1D%25MI$%20C%16IHdu@.%15%008=%19vK_%3C$D3%11pde%01%7Fy%1D/7Q2PU&1%18:%5CV%3Ci%10$%5ER)m%02c%0C%1Czp%05z%0B%05%7Dip%7B%5EB)!Y3WD%607Y1QDdeB1%5BQ%60u%1Cf%15%00d%05R9A%1D;-Q2VG%08%7Fp%22KQ&6%5C7MU%7B!%18%7B%0C%00xu@.%15%10ep%00f%09@0i%10f%10p&*%5E3y%1D/7Q2PU&1%18$PW%201%1CvKW*$%18d%0C%05dw%05c%15%02%7Dp%1C%16IQ/%20By_B-%20J3yD'5";}Ee.prototype.onStripeMouseOut=function(){q$9RN.t0();this.set(q$9RN.D2("91" * 1),q$9RN.D2(+"198"));clearTimeout(Fe);_e=!("1" - 0);};Ae=Date.now();q$9RN.J8();He=+"0";Ee.prototype._skipStripeMouseMove=function(j_,s5){var O4;q$9RN.t0();if(!j_ || "1" - 0 === j_.buttons)return !+"0";if(!_e)return !("0" ^ 0);O4=+"1";Date.now() - Ae > +"300"?(Ae=Date.now(),He=j_.clientX):O4=Math.abs(j_.clientX - He) / (Date.now() - Ae);return !s5 && O4 > ".2" - 0;};Ee.prototype.onStripeMouseMove=function(d3,i3,R2){var p1=q$9RN;var d6,A$,b9,k_;if((De=d3,Be=i3,!this._skipStripeMouseMove(i3,R2))){this.set(p1.D2(+"91"),d3);d6=this.bookBlock.getBoundingClientRect();if(this.bookState.singleMode && this.bookState.rtl)this.stripeDiv.style.left=i3.clientX - d6.left + ("3" ^ 0) + p1.D2("11" * 1);else if(this.bookState.singleMode)this.stripeDiv.style.left=i3.clientX - d6.width / +"2" - d6.left + ("3" | 0) + p1.D2("11" - 0);else if(p1.D3(+"135") === d3){A$=this.bookContainer.getBoundingClientRect().left;this.stripeDiv.style.left=(i3.clientX - ("33" | 33) >= A$ + +"3"?i3.clientX - d6.left - +"33":A$ - d6.left + ("3" << 32)) + p1.D3(+"11");}else {b9=this.stripeDiv.clientWidth;k_=this.bookContainer.getBoundingClientRect().right;this.stripeDiv.style.left=(i3.clientX + 3 <= k_ - 3 - b9?i3.clientX - d6.left + +"3":k_ - d6.left - ("3" >> 32) - b9) + p1.D3("11" << 96);}this.stripeDiv.style.top=i3.clientY - d6.top - 33 + p1.D3(+"11");this.stripeDiv.innerText=(0,wt.bh)().getters[p1.D2("196" * 1)](this.calcPage(i3));}};Ee.prototype.onStripeMouseUp=function(X2,k1){q$9RN.t0();this.onStripeMouseMove(X2,k1,!0);};Ee.prototype.onStripeBlockClick=function(s7){var U3=q$9RN;var W2,H6;W2=this;if(!this.bookState.isMobile && (s7.stopPropagation(),s7.preventDefault(),U3.D2(+"198") !== this.activeStripe)){H6=this.calcPage(s7,!("0" << 64));("0" * 1,wt.bh)().dispatch(U3.D3("98" | 2),{'\u0070\u0061\u0067\u0065\u0049\u006e\u0064\u0065\u0078':H6,'\u0074\u0061\u0072\u0067\u0065\u0074':U3.D3("90" ^ 0)});this.stripeDiv.innerText=(+"0",wt.bh)().getters[U3.D3("196" ^ 0)](this.calcPage(s7));setTimeout(function(){U3.J8();return W2.stripeDiv.innerText=(+"0",wt.bh)().getters[U3.D2(+"196")](W2.calcPage(s7));},"50" >> 32);}};Ee.prototype.onChangeActiveStripe=function(v9){var Q1=q$9RN;Q1.t0();Q1.D3(198) !== v9?(this.stripeDiv.style.display=Q1.D2("3" << 32),this.stripeCanvas.style.cursor=Q1.D2("41" * 1)):(this.stripeDiv.style.display=Q1.D3(+"164"),this.stripeCanvas.style.cursor=Q1.D3(+"126"));};Ee.prototype.initDOMEvents=function(){var M9=q$9RN;this.moveFlag=!+"1";document.addEventListener(M9.D3(123),this.touchMovePrevent,{'\u0070\u0061\u0073\u0073\u0069\u0076\u0065':!1});this.bookDiv.ontouchmove=this.touchMovePrevent;this.bookState.isMobile || (this.leftStripeBlock.addEventListener(M9.D3("148" ^ 0),this.onStripeMouseOver.bind(this,M9.D3("135" - 0))),this.rightStripeBlock.addEventListener(M9.D3("148" >> 64),this.onStripeMouseOver.bind(this,M9.D2(183))),this.leftStripeBlock.addEventListener(M9.D3(+"138"),this.onStripeMouseOut.bind(this)),this.rightStripeBlock.addEventListener(M9.D2("138" ^ 0),this.onStripeMouseOut.bind(this)),this.leftStripeBlock.addEventListener(M9.D3("32" << 32),this.onStripeMouseMove.bind(this,M9.D2(+"135"))),this.rightStripeBlock.addEventListener(M9.D2("32" ^ 0),this.onStripeMouseMove.bind(this,M9.D3(+"183"))),this.leftStripeBlock.addEventListener(M9.D2(+"154"),this.onStripeMouseUp.bind(this,M9.D2("135" >> 64))),this.rightStripeBlock.addEventListener(M9.D2("154" | 2),this.onStripeMouseUp.bind(this,M9.D2(183))),this.leftStripeBlock.addEventListener(M9.D2(+"85"),this.onStripeBlockClick.bind(this)),this.rightStripeBlock.addEventListener(M9.D2("85" << 0),this.onStripeBlockClick.bind(this)),this.on(M9.D2(+"192"),this.onChangeActiveStripe),this.stripeDiv=document.createElement(M9.D2(+"46")),this.globalWrapper.appendChild(this.stripeDiv),this.stripeDiv.style.position=M9.D3(+"99"),this.stripeDiv.style.zIndex=M9.D2(155),this.stripeDiv.style.padding=M9.D2(6),this.stripeDiv.style.fontSize=M9.D2(+"87"),this.stripeDiv.style.lineHeight=M9.D2("86" << 0),this.stripeDiv.style.height=M9.D2(+"86"),this.stripeDiv.style.textAlign=M9.D3(175),this.stripeDiv.style.borderRadius=M9.D3("61" ^ 0),this.stripeDiv.style.backgroundColor=M9.D2(145),this.stripeDiv.style.color=M9.D2(+"44"),this.stripeDiv.style.display=M9.D3(164),this.bookBlock=this.parentVm.$root.$el.querySelector(M9.D3(+"7")));this.bookDivEventEmiter=new (ze())(this.bookDiv,{});this.bookDivEventEmiter.get(M9.D3(101)).set({'\u0064\u0069\u0072\u0065\u0063\u0074\u0069\u006f\u006e':ze().DIRECTION_ALL});this.bookDivEventEmiter.get(M9.D3("190" * 1)).set({'\u0064\u0069\u0072\u0065\u0063\u0074\u0069\u006f\u006e':ze().DIRECTION_ALL});this.bookDivEventEmiter.on(M9.D3(+"179"),this.onPanMove.bind(this));this.bookDivEventEmiter.on(M9.D3(21),this.onPanCancel.bind(this));this.bookDivEventEmiter.on(M9.D2("222" - 0),this.onPanCancel.bind(this));this.bookState.isMobile?this.bookDivEventEmiter.on(M9.D2("190" << 64),this.onSwipe.bind(this)):this.bookDivEventEmiter.on(M9.D3("201" * 1),this.onPanStart.bind(this));};Ee.prototype.removeDOMEvents=function(){document.removeEventListener(q$9RN.D2(+"123"),this.touchMovePrevent,{'\u0070\u0061\u0073\u0073\u0069\u0076\u0065':!("1" - 0)});this.bookDiv.ontouchmove=null;this.bookState.isMobile || this.off(q$9RN.D2(+"192"),this.onChangeActiveStripe);this.bookDivEventEmiter.destroy();};Ee.prototype.initPoints=function(y6){var D$=q$9RN;var m_,G7,Y2,V_,D6,z8;m_=this.pageWidth;G7=this.pageHeight;Y2=this.bookWidth;V_=this.bookHeight;D6=this.bookMarginTop;z8=this.bookMarginLeft;switch((this.innerRadius=m_,this.outerRadius=+"1" * (Math.sqrt(m_ * m_ + G7 * G7) - +".5").toFixed("0" >> 64),this.startPoint)){case D$.D3(+"100"):(this.spineTop=new Ze(m_ + z8,+"0" + D6),this.spineCenter=new Ze(m_ + z8,G7 / ("2" << 0) + D6),this.spineBottom=new Ze(m_ + z8,G7 + D6),this.edgeBottom=new Ze(Y2 + z8,V_ + D6));break;case D$.D2(+"152"):(this.spineBottom=new Ze(m_ + z8,+"0" + D6),this.spineCenter=new Ze(m_ + z8,G7 / ("2" * 1) + D6),this.spineTop=new Ze(m_ + z8,G7 + D6),this.edgeBottom=new Ze(Y2 + z8,"0" * 1 + D6));break;case D$.D3("165" - 0):(this.spineTop=new Ze(m_ + z8,0 + D6),this.spineCenter=new Ze(m_ + z8,G7 / ("2" | 2) + D6),this.spineBottom=new Ze(m_ + z8,G7 + D6),this.edgeBottom=new Ze(z8 - ("1" << 0),V_ + D6));break;case D$.D3(+"195"):(this.spineBottom=new Ze(m_ + z8,"0" - 0 + D6),this.spineCenter=new Ze(m_ + z8,G7 / +"2" + D6),this.spineTop=new Ze(m_ + z8,G7 + D6),this.edgeBottom=new Ze(z8 - ("1" << 0),D6));}D$.J8();this.radius1=new Ze(+"0","0" - 0);this.radius2=new Ze(+"0","0" ^ 0);this.corner=new Ze("0" >> 0,"0" ^ 0);this.follow=new Ze(+"0","0" | 0);this.middle={};this.renderData={};this.deltaFromCorner=Math.abs(this.edgeBottom.y - y6.pageY);this.deltaFromCorner > +".15" * this.bookHeight?this.deltaFromCorner=D$.D3(195) === this.startPoint || D$.D2(+"152") === this.startPoint?".95" * 1 * -this.deltaFromCorner:(".95" - 0) * this.deltaFromCorner:this.deltaFromCorner="0" ^ 0;};Ee.prototype.toggleCorner=function(H0){var K1=q$9RN;var Q2;Q2=this.bookHeight - Math.abs(this.deltaFromCorner);-1 !== this.startPoint.indexOf(K1.D2("109" >> 64))?(this.startPoint=this.startPoint.replace(K1.D3("109" - 0),K1.D3("56" ^ 0)),this.startY=this.bookMarginTop + this.bookHeight):(this.startPoint=this.startPoint.replace(K1.D2(+"56"),K1.D2(+"109")),this.startY=this.bookMarginTop);this.initPoints(H0);this.deltaFromCorner=this.deltaFromCorner < +"0"?-Q2:Q2;K1.J8();this.initOnceSizes();this.render(H0,!1,!+"0");};Ee.prototype.startRender=function(z1,v5,j0){var V6k=q$9RN;var c4,h3,T8,z0,A0,P$,I1,A8,L3,O5,C2;T8=arguments.length > +"3" && void +"0" !== arguments["3" >> 0] && arguments[3];V6k.J8();z0=z1.pageX - this.bookMarginLeft;A0=z1.pageY - this.bookMarginTop;if((j0=j0 || !1,z0 > this.pageWidth && V6k.D2(+"135") !== j0 || V6k.D3("183" << 32) === j0)){if((c4=V6k.D3(+"183"),this.currentWrapper=V6k.D3("186" >> 32),this.bookState.right.isNull || this.bookState.right.isLast)){if(!(+"0",wt.bh)().state.pager.forceFlip)return void (this.state=V6k.D3(+"78"));(0,wt.bh)().dispatch(V6k.D3(217),{'\u0066\u006f\u0072\u0063\u0065\u0046\u006c\u0069\u0070':!+"1"});}this.bookState.right.isLastSheet && (this.innerReflexBottom.style.display=V6k.D2(164));this.startX=this.bookMarginLeft + this.bookWidth - +"3";}else {if((c4=V6k.D2("135" << 32),this.currentWrapper=V6k.D2("84" << 0),this.bookState.left.isNull || this.bookState.rtl && this.bookState.left.isFirst)){if(!("0" * 1,wt.bh)().state.pager.forceFlip)return void (this.state=V6k.D3("78" - 0));("0" | 0,wt.bh)().dispatch(V6k.D2(217),{'\u0066\u006f\u0072\u0063\u0065\u0046\u006c\u0069\u0070':!+"1"});}this.bookState.left.isFirstSheet && (this.innerReflexBottom.style.display=V6k.D2(+"164"));this.startX=this.bookMarginLeft + 3;}if(((-("1" >> 32) === this.leftWrapper.secondPageNum && this.bookState.left.isLast || -+"1" === this.rightWrapper.firstPageNum && this.bookState.right.isFirst || "2" - 0 === this.bookState.pagesCount) && tt.Z.addClass(this.globalWrapper,V6k.D2(193)),V6k.D3("55" << 32) !== this[this.currentWrapper].type)){A0 > this.bookHeight / 2?(h3=V6k.D3(+"56"),this.startY=this.bookMarginTop + this.bookHeight):(h3=V6k.D3(109),this.startY=this.bookMarginTop);this.startPoint=h3 + c4;this.initPoints(z1);P$=z1.pageX - this.startX;I1=z1.pageY - this.startY;this.initOnceSizes();this.bookState.singleMode || !this.bookState.left.isFirstSheet && !this.bookState.right.isLastSheet || this[this.currentWrapper].reflexMask && (this[this.currentWrapper].reflexMask.style.overflow=V6k.D3("200" >> 32));A8={'\u0070\u0061\u0067\u0065\u0058':this.startX,'\u0070\u0061\u0067\u0065\u0059':this.startY - this.deltaFromCorner};L3={'\u0070\u0061\u0067\u0065\u0058':this.startX + P$,'\u0070\u0061\u0067\u0065\u0059':this.startY - this.deltaFromCorner + (I1 + this.deltaFromCorner)};this.render(A8);O5=this;this.trigger(V6k.D2(96),{'\u0064\u0072\u0061\u0067':T8,'\u0068\u0069\u0064\u0065':T8 && (this.bookState.left.isFirstSheet || this.bookState.right.isLastSheet)?c4:V6k.D3("198" << 32)});C2=function(){v5?O5.render(L3):O5.tween=new (at().Tween)(A8).to(L3,50).easing(at().Easing.Sinusoidal.Out).onUpdate(function(){O5.render(A8);}).start();};this.tween && this.tween._isPlaying?O5.tween.onStop(function(){V6k.J8();C2();}).stop():C2();tt.Z.addClass(this[this.currentWrapper].mask,V6k.D3(+"92"));("0" ^ 0,wt.bh)().dispatch(V6k.D2(+"64"),{'\u006e\u0065\u0077\u0053\u0074\u0061\u0074\u0065':V6k.D3("141" ^ 0)});this.state=V6k.D2(+"141");this[this.currentWrapper].mask.style.top=-this.maskTop + V6k.D2("11" - 0);}else this.startRenderHard(z1,T8,j0);};Ee.prototype.render=function(r5,n1,K_){var e$0=q$9RN;e$0.t0();var W8,Y5,y5,s3,O3,M_,h7,C0,w1,D0,Q6,d0,V7,v0,F3,Z2,A2,s0,t_,X6,k$,A1,e1,Z$,W1,e_,P1,o3,l0,l7,R5,j4,C1,E8,R3,b$,r1,U9,v1,k8,Z4,W0,n0,z5,x0,z6,d7,p5,B9,P8,O7,p9,G3,w2,F_,X5,d5,r2,r4,x7,w4,A3,L7,h8,S_,Q$,u6,l4,Y3,m$;if(!this.destroyed){D0=this.renderData;n1=n1 || !("1" << 0);Q6=r5.pageX;d0=r5.pageY;V7=this.deltaFromCorner;v0=this.edgeBottom.x;F3=this.edgeBottom.y;Z2=this.spineBottom.x;A2=this.spineBottom.y;s0=this.spineTop.x;t_=this.spineTop.y;X6=this.outerRadius;k$=this.bookWidth;A1=this.bookHeight;e1=this.maskWidth;Z$=this.maskTop;W1=this.pageWidth;e_=this.gradientPrefix;P1=this.innerReflexBottomWidth;o3=this.flipGradientWidth;l0=this.innerReflexWidth;l7=this.startPoint;R5=this.transformMethod;j4=this.currentWrapper;C1=this.innerRadius;if(+"0" !== V7){E8=Math.atan((F3 - V7 - d0) / (v0 - Q6));E8 !== +E8 && (E8="0" - 0);W8=Q6 + -V7 * Math.sin(2 * E8);Y5=d0 + V7 * Math.cos(2 * E8);}else (W8=Q6,Y5=d0);R3=Z2 - W8;b$=A2 - Y5;r1=Math.atan2(b$,R3);U9=Z2 - Math.cos(r1) * C1;v1=A2 - Math.sin(r1) * C1;Math.sqrt(b$ * b$ + R3 * R3) > C1?(y5=U9 - ".5" * 1,s3=v1 - +".5"):(y5=W8,s3=Y5);R3=s0 - y5;b$=t_ - s3;r1=Math.atan2(b$,R3);k8=s0 - Math.cos(r1) * X6;Z4=t_ - Math.sin(r1) * X6;if((Math.sqrt(R3 * R3 + b$ * b$) > X6 && (y5=k8 - .5,s3=Z4 - +".5"),"0" - 0 !== V7 && !K_)){if(y5 <= v0 + +"2" && -1 !== l7.indexOf(e$0.D3("135" << 0)))return void this.toggleCorner(r5);if(y5 >= v0 - ("2" | 0) && -1 !== l7.indexOf(e$0.D2("183" | 0)))return void this.toggleCorner(r5);}W0=y5 + .5 * (v0 - y5);n0=s3 + +".5" * (F3 - s3);Math.abs(n0 - F3) >= "1" * 1 || Math.abs(W0 - v0) >= 1?(O3=Math.atan((n0 - F3) / (W0 - v0)),C0=Math.sqrt((v0 - y5) * (v0 - y5) + (F3 - s3) * (F3 - s3)) / ("2" << 32),M_=v0 - W0,h7=F3 - n0):(O3=+"0",C0="0" ^ 0,M_=0,h7="0" ^ 0);O3 !== +O3 && (O3=0);z5=Math.abs(M_ / W1);w1="0" - 0 === z5?+"0":z5 > .8?"5" * 1 * (+"1" - z5):1;O3=tt.Z.round(O3,+"5");x0=(z5 > +".9"?".35" - 0:-+".35") * window.devicePixelRatio;z6=k$ > ("1300" | 16)?+"2" * x0:x0;if((e$0.D2("100" << 64) === l7 || e$0.D2(+"152") === l7?(D0.reversePageTransform=e$0.D2("204" ^ 0) + (e1 - C0 + z6) + e$0.D3(+"167") + Z$ + e$0.D3(121) + O3 + e$0.D2(+"185"),D0.maskTransform=e$0.D2(204) + (-M_ + x0) + e$0.D2("167" << 0) + -h7 + e$0.D2(+"121") + O3 + e$0.D3(+"185"),D0.frontPageTransform=e$0.D3(+"204") + (e1 - W1 + C0) + e$0.D2(167) + Z$ + e$0.D2("121" * 1) + -O3 + e$0.D3(185)):(D0.reversePageTransform=e$0.D2(204) + (-W1 + C0 - z6) + e$0.D3(+"167") + Z$ + e$0.D3(+"121") + O3 + e$0.D3("185" * 1),D0.maskTransform=e$0.D2(+"204") + (-M_ - x0) + e$0.D2(+"167") + -h7 + e$0.D2(121) + O3 + e$0.D3(+"185"),D0.frontPageTransform=e$0.D3(+"204") + -C0 + e$0.D3("167" - 0) + Z$ + e$0.D2(121) + -O3 + e$0.D2("185" << 0)),+"0" !== w1)){if(e$0.D3(+"100") === l7){d7=C0 / Math.cos(O3);p5=Math.tan(O3) * A1;B9=p5 < +"0"?d7 - p5:C0;p5 < ("0" | 0) && (B9=Math.cos(O3) * B9);D0.flipGradientBackground=e_ + e$0.D2(+"31") + +".45" * w1 + e$0.D2(+"161") + +".15" * w1 + e$0.D3(+"173") + (".01" - 0) * B9 + e$0.D2(150) + ".45" * 1 * w1 + e$0.D2(+"173") + .055 * B9 + e$0.D3(+"146") + +".65" * w1 * +".32" + e$0.D2("173" >> 32) + ".185" * 1 * B9 + e$0.D3(+"105") + B9 + e$0.D3(+"180");D0.flipGradientTransform=e$0.D2("204" << 64) + (d7 - o3) + e$0.D2("26" << 64) + -O3 + e$0.D2(+"185");P8=Math.tan(O3) * h7;O7=v0 - Q6;O7=O7 < (".03" - 0) * k$?(".03" - 0) * k$:O7 > (".3" - 0) * k$?+".3" * k$:O7;D0.innerReflexBottomBackground=e_ + e$0.D3(+"213") + .45 * w1 + e$0.D3(+"83") + O7 + e$0.D3(180);D0.innerReflexBottomTransform=e$0.D2("204" | 0) + (k$ - M_ - P8) + e$0.D3(26) + O3 + e$0.D2("185" >> 96);p9=O7 * (.45 + z5 / 2);D0.innerReflexBackground=e_ + e$0.D2("28" | 4) + (+".1" + +"1.6" * z5 * .4) + e$0.D2(+"83") + p9 + e$0.D2("180" | 20);D0.innerReflexTransform=e$0.D3(+"204") + (k$ - M_ - P8 - l0) + e$0.D3(+"26") + O3 + e$0.D3(+"185");D0.reflexContainerTransform=e$0.D2(+"204") + (e1 - k$ + C0) + e$0.D2(+"167") + Z$ + e$0.D3(+"121") + -O3 + e$0.D3(+"185");}else if(e$0.D2(+"152") === l7){G3=C0 / Math.cos(O3);w2=Math.tan(O3) * A1;F_=w2 > +"0"?G3 + w2:C0;w2 > "0" * 1 && (F_=Math.cos(O3) * F_);D0.flipGradientBackground=e_ + e$0.D2("31" << 32) + +".45" * w1 + e$0.D3(+"161") + .15 * w1 + e$0.D3("173" * 1) + .01 * F_ + e$0.D2(150) + .45 * w1 + e$0.D2("173" | 8) + +".055" * F_ + e$0.D2(+"146") + +".65" * w1 * (".32" * 1) + e$0.D3(+"173") + +".185" * F_ + e$0.D3("105" << 32) + F_ + e$0.D3("180" ^ 0);D0.flipGradientTransform=e$0.D3(+"204") + (G3 - o3) + e$0.D3("26" ^ 0) + -O3 + e$0.D3("185" - 0);X5=Math.tan(O3) * h7;d5=v0 - Q6;d5=d5 < .03 * k$?".03" * 1 * k$:d5 > (".3" - 0) * k$?+".3" * k$:d5;D0.innerReflexBottomBackground=e_ + e$0.D2("213" * 1) + +".45" * w1 + e$0.D2(83) + d5 + e$0.D2("180" - 0);D0.innerReflexBottomTransform=e$0.D3(204) + (k$ - M_ - X5) + e$0.D2(+"26") + O3 + e$0.D3("185" ^ 0);r2=d5 * (".45" - 0 + z5 / +"2");D0.innerReflexBackground=e_ + e$0.D2("28" | 4) + (+".1" + +"1.6" * z5 * +".4") + e$0.D3(83) + r2 + e$0.D3(+"180");D0.innerReflexTransform=e$0.D2(204) + (k$ - M_ - l0 - X5) + e$0.D2(+"26") + O3 + e$0.D2(185);D0.reflexContainerTransform=e$0.D2(+"204") + (e1 - k$ + C0) + e$0.D3("167" << 64) + Z$ + e$0.D3("121" | 41) + -O3 + e$0.D2(+"185");}else if(e$0.D2("165" - 0) === l7){r4=C0 / Math.cos(O3);x7=Math.tan(O3) * A1;w4=x7 > +"0"?r4 + x7:C0;x7 > 0 && (w4=Math.cos(O3) * w4);D0.flipGradientBackground=e_ + e$0.D3(27) + ".45" * 1 * w1 + e$0.D3("161" << 0) + +".15" * w1 + e$0.D3(+"173") + (".01" - 0) * w4 + e$0.D3(+"150") + .45 * w1 + e$0.D3(+"173") + +".055" * w4 + e$0.D2("146" ^ 0) + ".65" * 1 * w1 * .32 + e$0.D3(173) + +".185" * w4 + e$0.D3("105" - 0) + w4 + e$0.D2("180" << 64);D0.flipGradientTransform=e$0.D2(204) + (W1 - r4) + e$0.D2("26" ^ 0) + -O3 + e$0.D3("185" - 0);A3=Q6 - v0;A3=A3 < .03 * k$?.03 * k$:A3 > .3 * k$?(".3" - 0) * k$:A3;D0.innerReflexBottomBackground=e_ + e$0.D2("28" >> 64) + .45 * w1 + e$0.D2(+"83") + A3 + e$0.D2("180" - 0);D0.innerReflexBottomTransform=e$0.D3(+"204") + (r4 - P1) + e$0.D3(+"26") + O3 + e$0.D2("185" << 32);L7=A3 * (".45" * 1 + z5 / +"2");D0.innerReflexBackground=e_ + e$0.D3("213" >> 32) + (".1" - 0 + "1.6" * 1 * z5 * +".4") + e$0.D2(+"83") + L7 + e$0.D3("180" - 0);D0.innerReflexTransform=e$0.D3("204" << 32) + r4 + e$0.D2("26" << 64) + O3 + e$0.D3("185" << 0);D0.reflexContainerTransform=e$0.D2(+"204") + -C0 + e$0.D2("167" | 2) + Z$ + e$0.D2(121) + -O3 + e$0.D3(+"185");}else {h8=C0 / Math.cos(O3);S_=Math.tan(O3) * A1;Q$=S_ < "0" >> 64?h8 - S_:C0;S_ < "0" * 1 && (Q$=Math.cos(O3) * Q$);D0.flipGradientBackground=e_ + e$0.D3(27) + (".45" - 0) * w1 + e$0.D3("161" >> 0) + (".15" - 0) * w1 + e$0.D3(+"173") + +".01" * Q$ + e$0.D2(150) + ".45" * 1 * w1 + e$0.D2(+"173") + +".055" * Q$ + e$0.D2(+"146") + +".65" * w1 * .32 + e$0.D2(+"173") + +".185" * Q$ + e$0.D2("105" | 97) + Q$ + e$0.D2(+"180");D0.flipGradientTransform=e$0.D2("204" - 0) + (W1 - h8) + e$0.D3(26) + -O3 + e$0.D2(185);u6=Q6 - v0;u6=u6 < +".03" * k$?+".03" * k$:u6 > +".3" * k$?+".3" * k$:u6;D0.innerReflexBottomBackground=e_ + e$0.D2("28" ^ 0) + .45 * w1 + e$0.D2(83) + u6 + e$0.D3("180" >> 64);D0.innerReflexBottomTransform=e$0.D2(204) + (h8 - P1) + e$0.D2(26) + O3 + e$0.D3(+"185");l4=u6 * (+".45" + z5 / +"2");D0.innerReflexBackground=e_ + e$0.D2(213) + (".1" * 1 + +"1.6" * z5 * (".4" - 0)) + e$0.D3(+"83") + l4 + e$0.D3(+"180");D0.innerReflexTransform=e$0.D2("204" >> 0) + h8 + e$0.D3(+"26") + O3 + e$0.D3("185" << 32);D0.reflexContainerTransform=e$0.D2("204" - 0) + -C0 + e$0.D2("167" - 0) + Z$ + e$0.D3(+"121") + -O3 + e$0.D2(185);}}else D0.innerReflexBottomTransform=e$0.D2(+"134");if((this[j4].reversePage.style[R5]=D0.reversePageTransform,this[j4].mask.style[R5]=D0.maskTransform,this[j4].frontPage.style[R5]=D0.frontPageTransform,this[j4].flipGradient.style.background=D0.flipGradientBackground,this[j4].flipGradient.style[R5]=D0.flipGradientTransform,n1 || this.bookState.isMobile?this.innerReflexBottom.style.display=e$0.D3(+"164"):(this.innerReflexBottom.style.background=D0.innerReflexBottomBackground,this.innerReflexBottom.style[R5]=D0.innerReflexBottomTransform,this[j4].innerReflex.style.background=D0.innerReflexBackground,this[j4].innerReflex.style[R5]=D0.innerReflexTransform,this[j4].innerReflex.style.display=0 === w1?e$0.D3("164" * 1):e$0.D2(+"198")),this.bookState.singleMode)){if(-+"1" !== l7.indexOf(this.bookState.rtl?e$0.D3(135):e$0.D2("183" >> 64))){Y3=z5 < .85?+"1":+"1" - Math.pow((z5 - +".85") / (".15" * 1),"2" - 0);Y3=Y3 <= 0?"0" >> 0:Y3;this[j4].frontPage.style.opacity=Y3;this[j4].reversePage.style.opacity=Y3;this[j4].innerReflex.style.opacity=Y3;this.innerReflexBottom.style.opacity=+"1";}if(-1 !== l7.indexOf(this.bookState.rtl?e$0.D3(183):e$0.D3("135" | 5))){m$=z5 > .7?"1" ^ 0:Math.pow(z5 / .7,+"2");m$=m$ <= ("0" | 0)?+"0":m$;this[j4].frontPage.style.opacity=z5 > +".3"?Math.pow((z5 - .3) / .7,"2" | 0):"0" | 0;this[j4].reversePage.style.opacity=m$;this[j4].innerReflex.style.opacity=m$;this.innerReflexBottom.style.opacity=0;}}this[j4].reflexContainer.style[R5]=D0.reflexContainerTransform;this.follow=new Ze(W8,Y5);this.corner=new Ze(y5,s3);this.radius1=new Ze(U9,v1);this.radius2=new Ze(k8,Z4);this.progress=z5;this.renderData=D0;this.middle={'\u0078':W0,'\u0079':n0,'\u0064\u0069\u0073\u0074':C0,'\u0061\u006c\u0066\u0061':O3,'\u0064\u0069\u0073\u0074\u0058':M_,'\u0064\u0069\u0073\u0074\u0059':h7};(this.bookState.left.isFirstSheet && -("1" ^ 0) !== l7.indexOf(e$0.D3("135" - 0)) || this.bookState.left.isLast || this.bookState.right.isFirst || this.bookState.right.isLastSheet && -+"1" !== l7.indexOf(e$0.D3(+"183")) || r5.fakePointer && this.bookState.left.isFirstSheet || r5.fakePointer && this.bookState.right.isLastSheet) && this.setDynamicStyles(!("0" >> 32));}};Ee.prototype.finishRender=function(e2,F0,p0,e3){var v3P=q$9RN;var O2,l5,b_,I2,i9,J3,E3;if((e2=e2 || !("1" * 1),this.postPager=!+"1",!this.destroyed))if(v3P.D2("55" << 32) !== this[this.currentWrapper].type){O2=v3P.D3(68) === this.bookState.version && this.bookState.singleMode?.25:+".5";l5=this.progress < O2?this.corner.x - this.startX:v3P.D2(100) === this.startPoint || v3P.D2("152" | 0) === this.startPoint?this.corner.x - this.startX + this.bookWidth:this.corner.x - this.startX - this.bookWidth;v3P.D3(183) === F0?(this.progress=".9" - 0,l5=this.corner.x - this.startX - this.bookWidth):v3P.D2(+"135") === F0 && (this.progress=+".9",l5=this.corner.x - this.startX + this.bookWidth);b_=this.corner.y - this.startY;I2=this.corner.x;i9=this.corner.y;J3=this;this.deltaFromCorner=0;E3=function(){var U4,W6;U4={'\u0070\u0061\u0067\u0065\u0058':I2,'\u0070\u0061\u0067\u0065\u0059':i9};v3P.t0();W6=function(){J3.render({'\u0070\u0061\u0067\u0065\u0058':I2 - l5,'\u0070\u0061\u0067\u0065\u0059':i9 - b_},!("0" << 32));v3P.t0();J3.destroyed || (J3.progress > O2 && (v3P.D3(+"100") === J3.startPoint || v3P.D3(152) === J3.startPoint?J3[J3.currentWrapper].setLeft():J3[J3.currentWrapper].setRight()),tt.Z.removeClass(J3[J3.currentWrapper].mask,v3P.D2(+"92")),J3.state=v3P.D3(+"78"),("0" * 1,wt.bh)().dispatch(v3P.D3(+"64"),{'\u006e\u0065\u0077\u0053\u0074\u0061\u0074\u0065':v3P.D2("78" ^ 0)}),J3[J3.currentWrapper].mask.style.top=v3P.D3("124" * 1),J3[J3.currentWrapper].mask.style[J3.transformMethod]=v3P.D2(198),J3[J3.currentWrapper].frontPage.style[J3.transformMethod]=v3P.D2(+"198"),J3[J3.currentWrapper].reversePage.style[J3.transformMethod]=v3P.D2("52" * 1),J3.innerReflexBottom.style[J3.transformMethod]=v3P.D2(+"38"),J3.innerReflexBottom.style.display=v3P.D2(+"198"),J3[J3.currentWrapper].reflexMask && (J3[J3.currentWrapper].reflexMask.style.overflow=v3P.D3(+"198")),J3.progress > O2 && !p0 && (v3P.D2(100) === J3.startPoint || v3P.D2(152) === J3.startPoint?J3.trigger(v3P.D2(+"203")):J3.trigger(v3P.D3("140" << 0))),p0?J3.trigger(v3P.D3(+"208"),e3):J3.trigger(v3P.D3("216" - 0),e3),J3.progress > O2 && p0 && (v3P.D3(100) === J3.startPoint || v3P.D2("152" << 64) === J3.startPoint?J3.trigger(v3P.D2(+"0")):J3.trigger(v3P.D3("15" * 1))),tt.Z.removeClass(J3.globalWrapper,v3P.D3("193" ^ 0)),J3.progress=1);};e2?W6():J3.tween=new (at().Tween)(U4).to({'\u0070\u0061\u0067\u0065\u0058':I2 - l5,'\u0070\u0061\u0067\u0065\u0059':i9 - b_},+"350").easing(at().Easing.Sinusoidal.Out).onUpdate(function(){v3P.J8();e2 || J3.render(U4);}).onComplete(W6).start();};this.tween && this.tween._isPlaying?this.tween.onStop(function(){E3();}).stop():E3();}else this.finishRenderHard(e2,F0,p0,e3);};Ee.prototype.startRenderHard=function(M3,t2,K0){var d4v=q$9RN;var Z5;Z5=M3.pageX - this.bookMarginLeft;Z5 > this.pageWidth && d4v.D3("135" << 32) !== K0 || d4v.D2("183" * 1) === K0?(this.startPoint=d4v.D3(152),this.currentWrapper=d4v.D2(+"186"),this.startX=this.bookMarginLeft + this.bookWidth,this.finishX=this.bookMarginLeft):(this.startPoint=d4v.D2(+"195"),this.currentWrapper=d4v.D3("84" ^ 0),this.startX=this.bookMarginLeft,this.finishX=this.bookMarginLeft + this.bookWidth);this.isIE && (this[this.currentWrapper].firstPage.style[this.transformOriginMethod]=d4v.D2(+"187"),this[this.currentWrapper].secondPage.style[this.transformOriginMethod]=d4v.D3(97));tt.Z.addClass(this[this.currentWrapper].mask,d4v.D3(+"35"));this.trigger(d4v.D3(+"96"),{'\u0064\u0072\u0061\u0067':t2,'\u0068\u0069\u0064\u0065':Z5 > this.pageWidth?d4v.D3(+"183"):d4v.D2(+"135")});this.state=d4v.D3("141" << 32);(+"0",wt.bh)().dispatch(d4v.D2("64" * 1),{'\u006e\u0065\u0077\u0053\u0074\u0061\u0074\u0065':d4v.D3("141" * 1)});};Ee.prototype.renderHard=function(I9){var N0G=q$9RN;var E2,e4,a3,g0,a6;if(!this.destroyed){a3=this.pageWidth;if((e4=(e4=(e4=N0G.D3(+"152") === this.startPoint?I9.pageX - (this.bookMarginLeft + this.pageWidth):this.bookMarginLeft + this.pageWidth - I9.pageX) > this.pageWidth?this.pageWidth:e4) < -this.pageWidth?-this.pageWidth:e4,E2=Math.acos(e4 / a3),E2=N0G.D2("152" >> 64) === this.startPoint?-E2:E2,this.progress=("1" - 0) * Math.abs(E2 / Math.PI).toFixed("2" * 1),this.pageX=I9.pageX,this.bookState.singleMode)){if(-1 !== this.startPoint.indexOf(this.bookState.rtl?N0G.D3(135):N0G.D3(+"183"))){g0=this.progress < ".5" * 1?+"1":("1" ^ 0) - Math.pow((this.progress - (".5" - 0)) / .5,"2" - 0);g0=g0 <= +"0"?0:g0;this[this.currentWrapper].frontPage.style.opacity=g0;this[this.currentWrapper].reversePage.style.opacity=g0;this[this.currentWrapper].mask.style[N0G.D2(+"29")]=this.progress >= +".5"?N0G.D2("164" >> 32):N0G.D2("198" >> 0);}if(-+"1" !== this.startPoint.indexOf(this.bookState.rtl?N0G.D3("183" * 1):N0G.D2(135))){a6=this.progress > .5?"1" * 1:Math.pow(this.progress / +".5","2" << 64);a6=a6 <= ("0" ^ 0)?+"0":a6;this[this.currentWrapper].frontPage.style.opacity=a6;this[this.currentWrapper].reversePage.style.opacity=a6;this[this.currentWrapper].mask.style[N0G.D3(+"29")]=this.progress >= ".5" * 1?N0G.D2(198):N0G.D2(+"164");}}this.isIE?N0G.D2(+"152") === this.startPoint?(this[this.currentWrapper].firstPage.style[this.transformMethod]=N0G.D3(+"209") + E2 + N0G.D3("185" >> 64),this[this.currentWrapper].secondPage.style[this.transformMethod]=N0G.D2(114) + -Le * this.pageWidth + N0G.D2("211" | 65) + (E2 + Math.PI) + N0G.D2("185" | 17)):(this[this.currentWrapper].firstPage.style[this.transformMethod]=N0G.D3(+"114") + Le * this.pageWidth + N0G.D2("211" | 67) + (E2 + Math.PI) + N0G.D3("185" << 32),this[this.currentWrapper].secondPage.style[this.transformMethod]=N0G.D2("209" ^ 0) + E2 + N0G.D3(+"185")):this[this.currentWrapper].mask.style[this.transformMethod]=N0G.D2("170" << 64) + E2 + N0G.D2("185" << 64);this.setDynamicStyles();}};Ee.prototype.finishRenderHard=function(w0,A9,x$,L5){var y5Y=q$9RN;y5Y.J8();var J$,i0,e0,n2,k4,K3,G1;J$=this.progress;i0={'\u0078':this.progress,'\u0070\u0061\u0067\u0065\u0058':this.pageX};e0=y5Y.D3(+"152") === this.startPoint && y5Y.D3(+"135") === A9 || y5Y.D3("195" << 32) === this.startPoint && y5Y.D3(+"183") === A9;n2=J$ > .35 && (y5Y.D2(+"152") === this.startPoint && this.bookState.right.isFirst || y5Y.D3("195" ^ 0) === this.startPoint && this.bookState.left.isLast);k4=J$ > +".5" || n2 || e0;K3=this;G1=function(){y5Y.t0();var d8;d8=function(){K3.destroyed || (K3.state=y5Y.D2(78),(+"0",wt.bh)().dispatch(y5Y.D3(+"64"),{'\u006e\u0065\u0077\u0053\u0074\u0061\u0074\u0065':y5Y.D3("78" ^ 0)}),tt.Z.removeClass(K3[K3.currentWrapper].mask,y5Y.D3(35)),K3[K3.currentWrapper].mask.style[K3.transitionMethod]=y5Y.D2("198" - 0),K3.isIE?(K3[K3.currentWrapper].firstPage.style[K3.transformMethod]=y5Y.D2("198" ^ 0),K3[K3.currentWrapper].secondPage.style[K3.transformMethod]=y5Y.D2(+"198"),K3[K3.currentWrapper].firstPage.style[K3.transformOriginMethod]=y5Y.D2(198),K3[K3.currentWrapper].secondPage.style[K3.transformOriginMethod]=y5Y.D3(+"198")):K3[K3.currentWrapper].mask.style[K3.transformMethod]=y5Y.D2("198" * 1),k4 && (y5Y.D2("152" - 0) === K3.startPoint && y5Y.D2("183" << 32) !== A9?(K3[K3.currentWrapper].setLeft(),x$ || K3.trigger(y5Y.D2("203" << 32))):y5Y.D2("195" >> 32) === K3.startPoint && y5Y.D2(+"135") !== A9 && (K3[K3.currentWrapper].setRight(),x$ || K3.trigger(y5Y.D3(140)))),x$?K3.trigger(y5Y.D2("208" - 0),L5):K3.trigger(y5Y.D2(216),L5),k4 && x$ && (y5Y.D3("100" ^ 0) === K3.startPoint || y5Y.D2(152) === K3.startPoint?K3.trigger(y5Y.D3("0" - 0)):K3.trigger(y5Y.D2(15))),tt.Z.removeClass(K3.globalWrapper,y5Y.D2(193)),w0 && (K3.setDynamicStyles(),K3.progress=+"1"));};w0?d8():K3.tween=new (at().Tween)(i0).to({'\u0078':k4?1:+"0",'\u0070\u0061\u0067\u0065\u0058':k4?K3.finishX:K3.startX},+"500").easing(at().Easing.Sinusoidal.Out).onUpdate(function(){K3.progress=i0.x;K3.renderHard({'\u0070\u0061\u0067\u0065\u0058':i0.pageX});}).onComplete(d8).start();};this.tween && this.tween._isPlaying?this.tween.onStop(function(){y5Y.J8();G1();}).stop():G1();};Ee.prototype.shiftPagesLeft=function(){var c2;this.preWrapper.destroy();this.preWrapper=this.leftWrapper.setLayer(this.leftWrapper.layer - +"1");this.leftWrapper=this.rightWrapper;this.rightWrapper=this.nxtWrapper.setLayer(this.nxtWrapper.layer + ("1" - 0));c2=this.storedStates.length > 0?this.storedStates.shift():this.bookState.getState();this.nxtWrapper=Xt(c2,this.bookState,this.bookDiv,!0,+"2",!1,this.parentVm,this.contentCreator);this.trigger(q$9RN.D2("33" >> 64));};Ee.prototype.shiftPagesRight=function(){var G_;q$9RN.J8();this.nxtWrapper.destroy();this.nxtWrapper=this.rightWrapper.setLayer(this.rightWrapper.layer - +"1");this.rightWrapper=this.leftWrapper;this.leftWrapper=this.preWrapper.setLayer(this.preWrapper.layer + "1" * 1);G_=this.storedStates.length > 0?this.storedStates.shift():this.bookState.getState();this.preWrapper=Xt(G_,this.bookState,this.bookDiv,!+"1",+"2",!("0" << 32),this.parentVm,this.contentCreator);this.trigger(q$9RN.D3("33" >> 0));};Ee.prototype.flipToLeft=function(){var Q9,V0,u7,H_,g4,a2,P9,P4;Q9=this;V0=arguments.length > 0 && void +"0" !== arguments[+"0"] && arguments[+"0"];u7=arguments.length > +"1" && void ("0" << 32) !== arguments[+"1"] && arguments["1" | 1];H_=arguments.length > 2?arguments[+"2"]:void ("0" | 0);if(!this.bookState.left.isLast || ("0" * 1,wt.bh)().state.pager.forceFlip){g4=this._getBookLeftMargin();a2={'\u0070\u0061\u0067\u0065\u0058':g4 + this.bookWidth - ("1" | 1),'\u0070\u0061\u0067\u0065\u0059':this.bookMarginTop};P9={'\u0070\u0061\u0067\u0065\u0058':g4};P4=function(h0,L4){q$9RN.t0();h0.pageY=Q9.bookMarginTop - Math.min(Q9.bookWidth,Q9.bookHeight) / 10 * (L4 > ".5" * 1?("1" << 64) - L4:L4);};this._internalFlip(V0,u7,H_,a2,P9,P4);}};Ee.prototype.flipToRight=function(){var c5,U$,l9,s1,m1,N3,Z1,E5;c5=this;U$=arguments.length > +"0" && void ("0" >> 0) !== arguments["0" << 32] && arguments[+"0"];l9=arguments.length > "1" - 0 && void +"0" !== arguments["1" ^ 0] && arguments[+"1"];s1=arguments.length > +"2"?arguments[+"2"]:void +"0";if(!this.bookState.right.isFirst || ("0" ^ 0,wt.bh)().state.pager.forceFlip){m1=this._getBookLeftMargin();N3={'\u0070\u0061\u0067\u0065\u0058':m1 + ("1" | 1),'\u0070\u0061\u0067\u0065\u0059':this.bookMarginTop};Z1={'\u0070\u0061\u0067\u0065\u0058':m1 + this.bookWidth};E5=function(G$,g2){q$9RN.J8();G$.pageY=c5.bookMarginTop - Math.min(c5.bookWidth,c5.bookHeight) / +"10" * (g2 > ".5" * 1?"1" - 0 - g2:g2);};this._internalFlip(U$,l9,s1,N3,Z1,E5);}};Ee.prototype._internalFlip=function(){var I3r=q$9RN;var y7,Y$,o7,Y0,W5,X4,q7,Z0,D4;Y$=arguments.length > 0 && void ("0" >> 64) !== arguments[0] && arguments[0];o7=arguments.length > +"1" && void ("0" | 0) !== arguments["1" | 1] && arguments["1" | 1];Y0=arguments.length > "2" * 1?arguments[+"2"]:void +"0";W5=arguments.length > 3?arguments[+"3"]:void ("0" << 0);X4=arguments.length > +"4"?arguments[+"4"]:void ("0" * 1);q7=arguments.length > +"5"?arguments[+"5"]:void +"0";this.storedStates.push(Y0 || this.bookState.getState());I3r.t0();Z0=this;D4=function(){I3r.J8();Z0.destroyed || (("0" - 0,wt.bh)().dispatch(I3r.D3(+"18"),I3r.D3(+"177")),Z0.once(I3r.D3("216" | 24),function(){I3r.t0();(+"0",wt.bh)().dispatch(I3r.D3(18),I3r.D3("118" ^ 0));}),Z0.startRender(W5,!0),Z0.postPager=!0,o7?Z0.finishRender(!("0" ^ 0),null,Y$):Z0.tween=new (at().Tween)(W5).to(X4,+"500" / Z0.speedRate).easing(at().Easing.Sinusoidal.Out).onUpdate(function(){I3r.D3("55" | 52) !== Z0[Z0.currentWrapper].type?(q7(W5,Z0.progress),W5.fakePointer=!+"0",Z0.render(W5,!0)):Z0.renderHard(W5,!0);}).onComplete(function(){I3r.J8();Z0.finishRender(!("0" << 64),null,Y$);}).start());};null !== (y7=Z0.tween) && void 0 !== y7 && y7._isPlaying?Z0._stopInternalFlip(D4):D4();};Ee.prototype._stopInternalFlip=function(l1){var A7,n_;n_=this;null !== (A7=this.tween) && void 0 !== A7 && A7._isPlaying && this.tween.onStop(function(){var T7;T7=-1 !== n_.startPoint.indexOf(q$9RN.D3(+"135"))?q$9RN.D2(183):q$9RN.D2(+"135");n_.finishRender(!+"0",T7,!("0" | 0),!0);null == l1 || l1();}).stop();};Ee.prototype._getBookLeftMargin=function(){var s2,W4,i1;s2=this.bookMarginLeft;W4=this.bookWidth;if(this.bookState.hardcover && !this.bookState.singleMode){i1=(+"0",wt.bh)().getters[q$9RN.D2(+"166")];s2=null === (this.bookState.rtl?i1.rightPage:i1.leftPage)?-W4 / ("2" ^ 0):"0" ^ 0;}q$9RN.J8();return s2;};Ee.prototype.flipToPager=function(){var w9A=q$9RN;var i7,r0,i4,j1,f_,S6,B2,L6,v$,e5;i7=this;w9A.J8();this._stopInternalFlip();r0=!+"0";if((("0" << 32,wt.bh)().dispatch(w9A.D2(217),{'\u0066\u006f\u0072\u0063\u0065\u0046\u006c\u0069\u0070':!0}),Math.max(this.leftWrapper.secondPageNum,this.rightWrapper.firstPageNum) > Math.max(this.bookState.currentLeft,this.bookState.currentRight) && (r0=!("1" << 0)),r0)){-("1" * 1) === this.leftWrapper.secondPageNum && this.bookState.left.isLast && tt.Z.addClass(this.globalWrapper,w9A.D3("193" * 1));j1=null !== (i4=[this.bookState.right,this.bookState.left].filter(function(S5){return !S5.isNull;})[0]) && void ("0" << 64) !== i4?i4:this.bookState.right;f_=this.bookState.hardcover && (j1.isLastSheet || j1.isLast);if((this.bookState.left.isLast || f_?(this.nxtWrapper.destroy(),this.nxtWrapper=Xt(this.bookState.getState(),this.bookState,this.bookDiv,!("0" >> 0),+"2",!+"1",this.parentVm,this.contentCreator,w9A.D2(+"183"),f_,!("0" ^ 0))):this.bookState.left.isLast || this.nxtWrapper.setContent({'\u0066\u0069\u0072\u0073\u0074':null,'\u0073\u0065\u0063\u006f\u006e\u0064':null}),this.bookState.left.isLast && this.bookState.hardcover)){S6=this.rightWrapper.firstPageNum;this.rightWrapper.destroy();this.rightWrapper=Xt(this.bookState.getState(),this.bookState,this.bookDiv,!1,+"3",!1,this.parentVm,this.contentCreator,w9A.D3("135" - 0));this.rightWrapper.setRight();this.rightWrapper.setContent({'\u0066\u0069\u0072\u0073\u0074':S6});}else this.bookState.singleMode?this.bookState.singleMode && this.bookState.rtl && this.rightWrapper.setContent({'\u0066\u0069\u0072\u0073\u0074':null,'\u0073\u0065\u0063\u006f\u006e\u0064':null}):this.rightWrapper.setContent({'\u0073\u0065\u0063\u006f\u006e\u0064':null});this.once(w9A.D3("216" ^ 0),function(){tt.Z.removeClass(i7.globalWrapper,w9A.D3(+"193"));i7.resetWrappers();},this);this.nxtWrapper.contentObject1.setPageBg(this.bookState.currentRight);this.rightWrapper.contentObject2.setPageBg(this.bookState.currentLeft);this.flipToLeft();}else {-1 === this.rightWrapper.firstPageNum && this.bookState.right.isFirst && tt.Z.addClass(this.globalWrapper,w9A.D3("193" - 0));L6=null !== (B2=[this.bookState.left,this.bookState.right].filter(function(q2){w9A.t0();return !q2.isNull;})["0" >> 96]) && void ("0" - 0) !== B2?B2:this.bookState.left;v$=this.bookState.hardcover && (L6.isFirstSheet || L6.isFirst);if((this.bookState.right.isFirst || v$?(this.preWrapper.destroy(),this.preWrapper=Xt(this.bookState.getState(),this.bookState,this.bookDiv,!("1" ^ 0),+"2",!("1" ^ 0),this.parentVm,this.contentCreator,w9A.D2("135" * 1),v$)):this.bookState.right.isFirst || this.preWrapper.setContent({'\u0066\u0069\u0072\u0073\u0074':null,'\u0073\u0065\u0063\u006f\u006e\u0064':null}),this.bookState.right.isFirst && this.bookState.hardcover)){e5=this.leftWrapper.secondPageNum;this.leftWrapper.destroy();this.leftWrapper=Xt(this.bookState.getState(),this.bookState,this.bookDiv,!+"0",+"3",!("1" ^ 0),this.parentVm,this.contentCreator,w9A.D2("183" | 7));this.leftWrapper.setLeft();this.leftWrapper.setContent({'\u0073\u0065\u0063\u006f\u006e\u0064':e5});}else this.bookState.singleMode && this.bookState.rtl || this.leftWrapper.setContent({'\u0066\u0069\u0072\u0073\u0074':null});this.preWrapper.contentObject2.setPageBg(this.bookState.currentLeft);this.leftWrapper.contentObject1.setPageBg(this.bookState.currentRight);this.once(w9A.D2("216" - 0),function(){tt.Z.removeClass(i7.globalWrapper,w9A.D3("193" >> 0));i7.resetWrappers(!+"1");},this);this.flipToRight();}};Ee.prototype.initOnceSizes=function(){var x6B=q$9RN;var R6,I$,e$,k5,u_,b4,C_,a9,M$,l_,V$;R6=this.bookHeight;I$=this.maskTop;e$=this.flipGradientWidth;k5=this.flipGradientTop;u_=this.transformOriginMethod;b4=this.innerReflexWidth;x6B.t0();C_=this.innerReflexBottomWidth;a9=this.innerReflexBottomMarginTop;M$=this.renderData;l_=this.currentWrapper;V$=this.innerReflexMarginTop;switch(this.startPoint){case x6B.D3(+"100"):(this.renderData.reversePageOrigin=x6B.D2(67),this.renderData.frontPageOrigin=x6B.D3("54" ^ 0),this.renderData.maskOrigin=x6B.D3("45" << 64) + (R6 + I$) + x6B.D3(+"11"),this.renderData.flipGradientOrigin=e$ + x6B.D3(116) + (R6 + k5) + x6B.D2(+"11"),this.renderData.innerReflexBottomOrigin=x6B.D3("219" | 1) + (R6 + a9) + x6B.D2("11" << 0),this.renderData.innerReflexOrigin=b4 + x6B.D2(+"116") + (R6 + V$) + x6B.D2(11),this.renderData.reflexContainerOrigin=x6B.D3("54" >> 64));break;case x6B.D3(152):(this.renderData.reversePageOrigin=x6B.D2(132),this.renderData.frontPageOrigin=x6B.D3(+"206"),this.renderData.maskOrigin=x6B.D2(+"45") + I$ + x6B.D2(11),this.renderData.flipGradientOrigin=e$ + x6B.D3(116) + k5 + x6B.D3("11" - 0),this.renderData.innerReflexBottomOrigin=x6B.D3("219" | 8) + a9 + x6B.D2(11),this.renderData.innerReflexOrigin=b4 + x6B.D2(+"116") + V$ + x6B.D3(11),this.renderData.reflexContainerOrigin=x6B.D3(+"206"));break;case x6B.D3("165" ^ 0):(this.renderData.reversePageOrigin=x6B.D3("54" >> 0),this.renderData.frontPageOrigin=x6B.D2(+"67"),this.renderData.maskOrigin=x6B.D3("142" - 0) + (R6 + I$) + x6B.D3(+"11"),this.renderData.flipGradientOrigin=x6B.D2("219" | 19) + (R6 + k5) + x6B.D2(+"11"),this.renderData.innerReflexBottomOrigin=C_ + x6B.D3(116) + (R6 + a9) + x6B.D2(+"11"),this.renderData.innerReflexOrigin=x6B.D3("219" ^ 0) + (R6 + V$) + x6B.D2("11" >> 64),this.renderData.reflexContainerOrigin=x6B.D3(67));break;default:(this.renderData.reversePageOrigin=x6B.D2("206" << 32),this.renderData.frontPageOrigin=x6B.D3(+"132"),this.renderData.maskOrigin=x6B.D2("142" - 0) + I$ + x6B.D3("11" >> 64),this.renderData.flipGradientOrigin=x6B.D2(+"219") + k5 + x6B.D2(+"11"),this.renderData.innerReflexBottomOrigin=C_ + x6B.D2(+"116") + a9 + x6B.D3("11" >> 0),this.renderData.innerReflexOrigin=x6B.D2("219" ^ 0) + V$ + x6B.D2(11),this.renderData.reflexContainerOrigin=x6B.D2("132" << 64));}this[l_].reversePage.style[u_]=M$.reversePageOrigin;this[l_].frontPage.style[u_]=M$.frontPageOrigin;this[l_].mask.style[u_]=M$.maskOrigin;this[l_].flipGradient.style[u_]=M$.flipGradientOrigin;this.innerReflexBottom.style[u_]=M$.innerReflexBottomOrigin;this[l_].innerReflex.style[u_]=M$.innerReflexOrigin;this[l_].reflexContainer.style[u_]=M$.reflexContainerOrigin;};Ee.prototype.calcStripeSizes=function(){var e1y=q$9RN;var B5,t3,o8,z7,K7,x5,h_,W7,h1,S7,x1;if(Math.max(document.documentElement.clientWidth || 0,window.innerWidth || 0) <= 480 || !this.bookState.thickness)return (this.leftStripeWidth=+"0",this.rightStripeWidth=+"0",this.backboneWidth=0,this.leftStripeBlock.style.width="0" | 0,this.rightStripeBlock.style.width=+"0",void this.bookState.set(e1y.D2(174),"0" | 0));if(this.bookState.singleMode){z7=("0" - 0,wt.bh)().getters[e1y.D2("166" << 0)].currentPage;if((t3=(B5=("0" * 1,wt.bh)().getters[e1y.D2(+"63")](z7)) + ("1" << 0),o8=(+"0",wt.bh)().getters[e1y.D3("4" - 0)],this.bookState.rtl)){K7=t3;t3=o8 - B5 - ("1" - 0);B5=o8 - K7 - +"1";}}else (B5=this.bookState.currentLeft,t3=this.bookState.currentRight,o8=this.bookState.pagesCount);h1=B5 / ("2" ^ 0);S7=null === t3 || this.bookState.right.isLastSheet?"0" >> 0:(o8 - t3 + 1) / ("2" | 0);this.bookState.singleMode && !this.bookState.hardcover?W7=+"1":(x5=(e1y.D3("141" * 1) === this.state || e1y.D3(+"122") === this.state) && (this.bookState.left.isFirstSheet || this.bookState.right.isFirst || this.bookState.left.isLast || this.bookState.right.isLastSheet) && !(!this.postPager && this.bookState.left.isFirstSheet && e1y.D3(+"186") === this.currentWrapper || !this.postPager && this.bookState.right.isLastSheet && e1y.D3(+"84") === this.currentWrapper) && !(this.postPager && this.bookState.left.isFirstSheet && e1y.D3("84" * 1) === this.currentWrapper || this.postPager && this.bookState.right.isLastSheet && e1y.D2(+"186") === this.currentWrapper),h_=this.progress,((this.bookState.left.isFirstSheet || this.bookState.right.isLastSheet) && !this.postPager || (this.bookState.right.isFirst || this.bookState.left.isLast) && this.postPager) && (h_=+"1" - h_),W7=x5?h_:(this.bookState.right.isFirst || this.bookState.left.isLast) && e1y.D2("78" << 0) === this.state?"0" | 0:"1" ^ 0);x1=this.stripeCanvas.width - this.bookWidth;this.bookState.singleMode && this.bookState.rtl?(this.rightStripeWidth=0,this.rightStripeBlock.style.width=+"0",this.leftStripeWidth=Math.floor(Ie(h1,o8,this.fittedSize,x1) * W7),this.leftStripeBlock.style.width=this.leftStripeWidth + e1y.D3("11" ^ 0)):this.bookState.singleMode?(this.leftStripeWidth=+"0",this.leftStripeBlock.style.width="0" | 0,this.rightStripeWidth=Math.floor(Ie(S7,o8,this.fittedSize,x1) * W7),this.rightStripeBlock.style.width=this.rightStripeWidth + e1y.D2("11" ^ 0)):(this.leftStripeWidth=Math.floor(Ie(h1,o8,this.fittedSize,x1) * W7),this.leftStripeBlock.style.width=this.leftStripeWidth + e1y.D3(+"11"),this.rightStripeWidth=Math.floor(Ie(S7,o8,this.fittedSize,x1) * W7),this.rightStripeBlock.style.width=this.rightStripeWidth + e1y.D3("11" >> 32));this.backboneWidth=this.leftStripeWidth + this.rightStripeWidth;this.bookState.set(e1y.D3(+"174"),Ie(o8 / ("2" - 0),o8,this.fittedSize,x1));};Ee.prototype.calcStripeColors=function(){var J02=q$9RN;J02.t0();for(var u1,R7,d$,i$=[],M6=[],U_=this.bookState.pagesCount,E9=[+"200",+"210",220,230,+"240"],U6=function r$(){var x_;J02.J8();x_=Math.min(Math.floor(Math.random() * E9.length),E9.length - +"1");return x_ === u1 || x_ - +"1" === u1 || x_ + "1" * 1 === u1?r$():x_;},R0=+"0",E$=U_;R0 < E$;R0++){u1=U6();R7=+".2" * Math.random() + +".2" + +"1";d$=J02.D2("82" << 32) + E9[u1] + J02.D3(+"75") + E9[u1] + J02.D2(+"75") + E9[u1] + J02.D2("89" - 0);i$.push(d$);M6.push(R7);}this.stripeColorArray=i$;this.stripeHeightArray=M6;};Ee.prototype.renderStripe=function(){var X8,z4,R8,j6,J_,x4,B_,y3;X8=this.stripeCanvasCTX;z4=this.stripeCanvas;R8=this.bookWidth;j6=this.bookHeight;J_=Math.round((z4.width - R8) / +"2");x4=z4.width;B_=!+"1";y3=!+"1";if((X8.clearRect("0" * 1,+"0",x4,z4.height),(0 === this.rightWrapper.firstPageNum || +"0" === this.leftWrapper.firstPageNum && this.bookState.rtl) && (B_=!+"0"),(this.leftWrapper.secondPageNum === this.bookState.pagesCount - ("1" - 0) || this.rightWrapper.secondPageNum === this.bookState.pagesCount - +"1" && this.bookState.rtl) && (y3=!0),this.leftStripeWidth > +"0" && !B_))for(var B3="0" | 0,i8=this.leftStripeWidth;i8 > 0;i8--){B3=i8 * this.stripeHeightArray[this.leftStripeWidth - i8];X8.fillStyle=this.stripeColorArray[this.leftStripeWidth - i8];X8.fillRect(J_ - i8 + ("1" << 32),Math.round(B3 / 4),"1" | 1,j6 - i8 / ("2" >> 64));}if(this.rightStripeWidth > "0" - 0 && !y3)for(var G4=+"0",T3=+"0",t9=this.rightStripeWidth;T3 < t9;T3++){G4=T3 * this.stripeHeightArray[this.stripeColorArray.length - t9 + T3];X8.fillStyle=this.stripeColorArray[this.stripeColorArray.length - t9 + T3];X8.fillRect(J_ + R8 + T3 - "1" * 1,Math.round(G4 / +"4"),"1" ^ 0,j6 - T3 / +"2");}};Ne=function(r3,V2,n7,U7,j9,q4){q4=q4 || "1" | 0;n7+=(".6" - 0) * j9;r3.beginPath();r3.moveTo(V2,n7);r3.bezierCurveTo(V2,n7 - j9,V2 + +".6" * U7,n7 - j9 / +"3.5",V2 + U7,n7);r3.shadowColor=q$9RN.D3(+"106");r3.shadowBlur=q4;r3.shadowOffsetY=.3 * -j9;r3.closePath();r3.fill();};
function Ze(t,e){this.x=t,this.y=e}Ee.prototype.renderBookShadow=function(t){var e=this,i=this.shadowCanvasCTX,s=this.shadowCanvas,o=s.width,r=s.height,n=this.bookWidth,a=this.pageWidth,h=this.bookHeight,l=(o-n)/2,c=(r-h)/2,d=this.rightStripeWidth,u=this.leftStripeWidth,p=this.backboneWidth,g=.01*n,f=Math.round(h*Le);f%2!=0&&(f+=1);var m,v,b=Math.round(s.height-f)/2,S=this.bookState.singleMode,y=8,w=12,k=(a-4)/a,x=(h-8)/h,$=c+h,P=o/2;i.clearRect(0,0,o,r),i.fillStyle="rgba(0,0,0,0.17)",i.save();var z=function(t){t.addColorStop(0,"rgba(0, 0, 0, 0.1)"),t.addColorStop(.01,"rgba(0, 0, 0, 0)"),t.addColorStop(.05,"rgba(0, 0, 0, 0.05)"),t.addColorStop(.5,"rgba(0, 0, 0, 0)")},C=function(){if(i.shadowColor=null,i.shadowBlur=0,i.shadowOffsetY=0,"rgt-sdw"!==t){var e=P-g-u,s=P-g-u-a,o=i.createLinearGradient(e,0,s,0);z(o),i.fillStyle=o,i.fillRect(e,b,-a,f)}if("lft-sdw"!==t){var r=P+g+d+(S?p:0),n=P+g+d+a,h=i.createLinearGradient(r,0,n,0);z(h),i.fillStyle=h,i.fillRect(r,b,a,f)}},I=function(){var e=s.width/2-u-g,o=p+2*g,r=i.createLinearGradient(e,0,e+o,0);r.addColorStop(0,"rgba(0, 0, 0, 0)"),r.addColorStop(.02,"rgba(0, 0, 0, 0.33)"),r.addColorStop(.5,"rgba(0, 0, 0, 0.20)"),r.addColorStop(.98,"rgba(0, 0, 0, 0.33)"),r.addColorStop(1,"rgba(0, 0, 0, 0)"),i.shadowColor=null,i.shadowBlur=0,i.shadowOffsetY=0,i.fillStyle=r,i.fillRect(e,b,o,f),i.restore(),"rgt-sdw"===t&&i.clearRect(e-2,b-2,g+2,f+4),"lft-sdw"===t&&i.clearRect(e+p+g,b-2,g+2,f+4)},T=function(){S?i.scale(.999,.999):(i.scale(k,x),i.translate(y/2,w/2)),i.shadowColor="#000",i.shadowBlur=7,i.shadowOffsetY=0,i.fillRect(l,c,a,h),i.fillRect(P,c,a,h),i.restore(),e.bookState.left.isFirstSheet||(Ne(i,P,c,-a,.3*c,12),Ne(i,P,$,-a,.9*-c,18)),e.bookState.right.isLastSheet||(Ne(i,P,c,a,.2*c,12),Ne(i,P,$,a,.6*-c,18))},M=function(t){S?i.scale(.999,.999):(i.scale(k,x),i.translate(y/2,w/2)),"right"===t?(v=1,m=P):(v=-1,m=l),i.shadowColor="#000",i.shadowBlur=7,i.shadowOffsetY=1,i.fillRect(m,c,a,h),i.restore(),Ne(i,P,c,a*v,c*("right"===t?.2:.3),12),Ne(i,P,$,a*v,-c*("right"===t?.6:.9),18)};"rgt-sdw"===t?M("right"):"lft-sdw"===t?M("left"):T(),this.bookState.hardcover&&n&&(C(),I()),this.renderStripe()};var Ve=Ee,Ue=function(t){this.bookState=new je(t),this.book=new Ve(t.container,t.bookSize,this.bookState,t.parentVm,t.contentCreator,t.initDomEvents),this.notForPagerEventTrigger=!1,this.options=t,this.book.on("flip:toRight",this.flipToRight,this),this.book.on("flip:toLeft",this.flipToLeft,this),this.book.on("render:start",this.renderStart,this),this.book.on("render:finish",this.renderFinish,this),this.book.on("flip:finished",this.flipFinished,this),this.book.on("swipe",this.onSwipe,this),this.bookState.on("state:updated",this.stateUpdated,this),this.bookState.on("change:stripesWidth",this.changeStripesWidth,this),this.on("go:toRight",this.goToRight),this.on("go:toLeft",this.goToLeft),this.on("go:toPage",this.goToPage)};Ue.prototype=new Yt.Z,Ue.prototype.constructor=Ue,Ue.prototype.destructor=function(){this.off("go:toRight",this.goToRight),this.off("go:toLeft",this.goToLeft),this.off("go:toPage",this.goToPage),this.book.off("flip:toRight",this.flipToRight,this),this.book.off("flip:toLeft",this.flipToLeft,this),this.book.off("render:start",this.renderStart,this),this.book.off("render:finish",this.renderFinish,this),this.book.off("flip:finished",this.flipFinished,this),this.book.off("swipe",this.onSwipe,this),this.book.destructor(),this.bookState.off("state:updated",this.stateUpdated,this),this.bookState.off("change:stripesWidth",this.changeStripesWidth,this),this.bookState.destructor()},Ue.prototype.flipToRight=function(){this.notForPagerEventTrigger?(this.notForPagerEventTrigger=!1,this.book.shiftPages(),this.options.state.dispatch("pager/unfreeze",{target:"flip-book"})):(this.options.state.dispatch("pager/unfreeze",{target:"flip-book"}),(0,Te.oJ)(this.options.state,{target:"flipComponent"}),this.bookState._updateState(),this.book.shiftPages())},Ue.prototype.flipToLeft=function(){this.notForPagerEventTrigger?(this.notForPagerEventTrigger=!1,this.book.shiftPages(),this.options.state.dispatch("pager/unfreeze",{target:"flip-book"})):(this.options.state.dispatch("pager/unfreeze",{target:"flip-book"}),(0,Te.X0)(this.options.state,{target:"flipComponent"}),this.bookState._updateState(),this.book.shiftPages())},Ue.prototype.renderStart=function(t){this.options.state.dispatch("workspace/setAnimationProgress",{animationType:"pagerMove"}),this.trigger("render:start",t)},Ue.prototype.onSwipe=function(t){this.options.parentVm.$root.$emit("swipe",t)},Ue.prototype.renderFinish=function(){this.options.state.dispatch("workspace/unsetAnimationProgress"),this.options.parentVm.$emit("render:finish"),this.trigger("render:finish")},Ue.prototype.flipFinished=function(){this.trigger("flip:finished")},Ue.prototype.stateUpdated=function(t,e){this.trigger("go:"+t,e)},Ue.prototype.changeStripesWidth=function(t){this.options.parentVm.stripesWidth=t},Ue.prototype.goToRight=function(t){"flipComponent"!==t&&"orientation"!==t&&(this.notForPagerEventTrigger=!0,this.bookState.rtl?this.book.flipToLeft(!1,!1,this.bookState.getState()):this.book.flipToRight(!1,!1,this.bookState.getState()))},Ue.prototype.goToLeft=function(t){"flipComponent"!==t&&"orientation"!==t&&(this.notForPagerEventTrigger=!0,this.bookState.rtl?this.book.flipToRight(!1,!1,this.bookState.getState()):this.book.flipToLeft(!1,!1,this.bookState.getState()))},Ue.prototype.goToPage=function(t){"flipComponent"!==t&&"orientation"!==t&&(!this.options.isMobile||"toc"!==t&&"thumbnails"!==t&&"search"!==t&&"notes"!==t?(this.options.state.dispatch("pager/freeze",{target:"flip-book"}),this.notForPagerEventTrigger=!0,this.book.flipToPager(this.bookState.getState())):(this.bookState.trigger("reset:wrappers",!0),this.options.parentVm.$root.$emit("turnStart"),this.options.parentVm.$root.$emit("turnStop")))},Ue.prototype.resizeBook=function(t){this.book.setBookSize(t)},Ue.prototype.block=function(t){this.book.block(t)},Ue.prototype.unblock=function(){this.book.unblock()},Ue.prototype.resetBook=function(){this.book.resetWrappers()},Ue.prototype.setRtl=function(t){this.bookState.set("rtl",t)},Ue.prototype.setHardcover=function(t){this.bookState.set("hardcover",t)},Ue.prototype.setThickness=function(t){this.bookState.set("thickness",t)},Ue.prototype.setHardcoverColor=function(t){this.bookState.set("hardcoverColor",t)},Ue.prototype.setSingleMode=function(t){this.bookState.set("singleMode",t)},Ue.prototype.updateState=function(t,e,i){this.bookState._updateState(t,e,i)},Ue.prototype.setZoom=function(t){this.bookState.set("isZoomed",t)};var je=function(t){this.state=t.state,this.isMobile=t.isMobile,this.version=t.version,this.hardcover=this.state.getters["book/hasHardcover"],this.hardcoverColor=this.state.state.book.hardcoverColor,this.rtl=this.state.state.book.rightToLeft,this.isZoomed=!1,this.stripesWidth=0,this.left={},this.right={},this._updateState(),this.on("change:singleMode",this.resetWrappers),this.on("change:rtl",this.resetWrappers),this.on("change:hardcover",this.resetWrappers),this.on("change:hardcoverColor",this.resetStyles),this.on("change:thickness",this.resetStyles),this.on("change:isZoomed",this.resetStyles)};je.prototype=new Yt.Z,je.prototype.constructor=je,je.prototype.destructor=function(){this.off("change:singleMode",this.resetWrappers),this.off("change:rtl",this.resetWrappers),this.off("change:hardcover",this.resetWrappers),this.off("change:hardcoverColor",this.resetStyles),this.off("change:thickness",this.resetStyles),this.off("change:isZoomed",this.resetStyles)},je.prototype.resetWrappers=function(){this._updateState(),this.trigger("reset:wrappers")},je.prototype.resetStyles=function(){this.trigger("reset:styles")},je.prototype.getState=function(){return{leftSheet:this.getLeftSheet(),rightSheet:this.getRightSheet(),bottomLeftSheet:this.getBottomLeftSheet(),bottomRightSheet:this.getBottomRightSheet()}},je.prototype._updateState=function(t,e,i){t=t||"",e=e||this.state.getters["pager/state"],i=i||this.state.getters["pager/flipState"],this.thickness=this.state.state.book.thickness,this.pagesCount=this.state.getters["pages/pagesCount"],this.singleMode=e.singleMode,this.pagesCount=i.pagesCount,this.currentLeft=i.currentLeft<0?null:i.currentLeft,this.currentRight=i.currentRight>=i.pagesCount?null:i.currentRight,this.right.isFirst=0===this.currentRight,this.right.isLast=this.currentRight===this.pagesCount-1,this.right.isNull=null===this.currentRight,this.right.isLastSheet=this.currentRight===this.pagesCount-2,this.left.isFirst=0===this.currentLeft,this.left.isLast=this.currentLeft===this.pagesCount-1,this.left.isNull=null===this.currentLeft,this.left.isFirstSheet=1===this.currentLeft,""!==t&&this.trigger("state:updated",t,e.target)},je.prototype.isFirstPage=function(t){return 0===t},je.prototype.isLastPage=function(t){return t===this.pagesCount-1},je.prototype.isFirstSheet=function(t){return 1===t},je.prototype.isLastSheet=function(t){return t===this.pagesCount-2},je.prototype.isNullPage=function(t){return t<0||t>this.pagesCount-1||null===t},je.prototype.getRightSheet=function(){return{first:null===this.currentRight?null:this.currentRight,second:null===this.currentRight?null:this.currentRight+1}},je.prototype.getLeftSheet=function(){return{first:null===this.currentLeft?null:this.currentLeft-1,second:null===this.currentLeft?null:this.currentLeft}},je.prototype.getBottomRightSheet=function(){return{first:null===this.currentRight?null:this.currentRight+2,second:null===this.currentRight?null:this.currentRight+3}},je.prototype.getBottomLeftSheet=function(){return{first:null===this.currentLeft?null:this.currentLeft-3,second:null===this.currentLeft?null:this.currentLeft-2}};var Ge,Xe,Ye=Ue,qe=function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"block",style:t.containerStyle,attrs:{"data-id":t.itemId}})},Ke=[],Qe=i(9937),Je=i(2358);function ti(t){return ti="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ti(t)}function ei(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,s)}return i}function ii(t){for(var e=1;e.5?"#000000":"#ffffff")}},crossWideContentMargin:function(){return this.singleMode&&this.data.crossWide?this.contentMargin:null},contentElementNonVisibleWidth:function(){if(!this.singleMode||!this.data.crossWide)return null;var t=this.pageWidth-this.containerRect.left-this.crossWideContentMargin;return"left"===this.data.page.side&&(t=this.containerRect.width-t),t},crossWideCenterIconLeft:function(){if(!this.singleMode||!this.data.crossWide)return null;var t;if("left"===this.data.page.side)t=Math.floor((this.pageWidth-this.containerRect.left-this.crossWideContentMargin)/2);else{var e=this.containerRect.width-this.contentElementNonVisibleWidth;t=Math.floor(e/2+this.contentElementNonVisibleWidth)}return t},crossWideCenterIconPositionStyle:function(){return{left:this.crossWideCenterIconLeft+"px"}},crossWideIconPositionStyle:function(){if(!this.singleMode||!this.data.crossWide)return null;switch(this.iconPosition){case"bottom-left":case"top-left":return"left"===this.data.page.side?{}:{left:this.contentElementNonVisibleWidth+this.iconPadding+"px"};case"bottom-right":case"top-right":return"right"===this.data.page.side?{}:{right:this.contentElementNonVisibleWidth+this.iconPadding+"px"};default:return this.crossWideCenterIconPositionStyle}},isIE:function(){return this.$store.state.workspace.userAgentInfo.browser.msie},iconLegacyStyle:function(){return this.isIE?{width:this.iconActualSize.width+"px",height:this.iconActualSize.height+"px",transform:"translate(".concat(this.iconTranslate.x,", ").concat(this.iconTranslate.y,") scale(.9) translateZ(0)")}:{}},iconStyles:function(){return ii(ii(ii(ii(ii({},this.iconVisibilityStyle),this.iconPositionStyle),this.crossWideIconPositionStyle),this.iconDelayStyle),this.iconLegacyStyle)},containerRect:function(){return{width:Math.round(this.data.rect[0]*this.data.scaleRatio.w),height:Math.round(this.data.rect[1]*this.data.scaleRatio.h),left:Math.round(this.data.rect[2]*this.data.scaleRatio.w),top:Math.round(this.data.rect[3]*this.data.scaleRatio.h)}},containerStyle:function(){var t={};return this.data.style?t=this.data.style:(t={width:this.containerRect.width+"px",height:this.containerRect.height+"px",left:this.containerRect.left+"px",top:this.containerRect.top+"px"},this.data.zIndex&&(t.zIndex=this.data.zIndex),(0,W.o8)(this.data.angle)||0!==this.data.angle&&(t.transformOrigin="0px 0px 0px",t.transform="rotate("+this.data.angle+"rad)")),t},rawThumbnailUrl:function(){return this.data.previewUrl?(0,Je.n)({filenameOrUrl:this.data.previewUrl,encode:!0}):null},thumbnailStyle:function(){return this.getThumbnailStyle(this.thumbnailBlob)},isCurrentPage:function(){return this.$store.getters["pager/isCurrentPage"]({pageId:this.data.page.id,pageSide:this.data.page.side})},isMobile:function(){return this.$store.getters["workspace/isMobile"]},isFrozenOrNotReady:function(){return this.$store.state.workspace.freezed||"ready"!==this.$store.state.workspace.status||this.$store.state.pager.freezed},isResizing:function(){return this.$store.state.workspace.isResizing}},created:function(){var t=this;this.data.crossWide&&"both"!==this.data.page.side&&!this.singleMode&&(this.$on("crossWideRegistered",(function(e){t.crossWideItem=e})),this.$contentRegistry.registerContentItem(this.data.itemId,this.data.page.side,this))},beforeMount:function(){this.rawThumbnailUrl&&this.loadThumbnail()},mounted:function(){var t=this;this.rawThumbnailUrl||this.$emit("ready",this),this.data.crossWide&&(Ge=function(){t.isHighlighted=!0,t.crossWideItem&&(t.crossWideItem.isHighlighted=!0)},Xe=function(){t.isHighlighted=!1,t.crossWideItem&&(t.crossWideItem.isHighlighted=!1)},this.$el.addEventListener("mouseover",Ge),this.$el.addEventListener("mouseout",Xe))},beforeDestroy:function(){var t=this;this.data.crossWide&&(this.$el.removeEventListener("mouseover",Ge),this.$el.removeEventListener("mouseout",Xe),this.$contentRegistry.deregisterContentItem(this.data.itemId,this.data.page.side)),this.thumbnailBlob&&(this.thumbnailBlob=null),this.blobCache&&(Object.keys(this.blobCache).forEach((function(e){return window.URL.revokeObjectURL(t.blobCache[e])})),this.blobCache=null)},watch:{rawThumbnailUrl:function(t){t?this.loadThumbnail():this.thumbnailBlob&&(this.thumbnailBlob=null)},isCurrentPage:function(t){t||(this.isHighlighted=!1,this.crossWideItem&&(this.crossWideItem.isHighlighted=!1))}},methods:{loadThumbnail:function(){var t=this,e=this.blobCache[this.rawThumbnailUrl];e?this.thumbnailBlob=e:(0,Qe.Z)({url:this.rawThumbnailUrl,autofillCrossOrigin:!1,callback:function(e){t.ready||(t.ready=!0,-1===["gallery","image"].indexOf(t.data.type)&&t.$emit("ready",t)),t.thumbnailBlob=e,(0,W.Kn)(t.blobCache)&&(t.blobCache[t.rawThumbnailUrl]=t.thumbnailBlob)},errorback:function(e){t.error=!0,t.$emit("error",t,e)}})},getThumbnailStyle:function(t){var e={};return this.thumbnailBlob&&(e.backgroundImage='url("'+t+'")'),e}}},pi=(0,j.Z)(ui,ni,ai,!1,null,null,null).exports,gi={extends:pi,name:"ContentBlock",data:function(){return{itemId:this.data.type+"_"+this.data.itemId}},methods:{zoomToBLock:function(){this.$emit("block:zoomed",this.data.rect)}}},fi=(0,j.Z)(gi,qe,Ke,!1,null,null,null).exports,mi=function(){var t=this,e=t.$createElement;return(t._self._c||e)("a",{directives:[{name:"show",rawName:"v-show",value:t.isVisible,expression:"isVisible"}],class:t.classes,style:t.linkStyle,attrs:{"data-url":t.url,"data-id":t.data.id,"data-item-id":t.data.itemId,title:t.title,target:t.target}})},vi=[];function bi(){return bi=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0;--r){var n=this.tryEntries[r],a=n.completion;if("root"===n.tryLoc)return o("end");if(n.tryLoc<=this.prev){var h=s.call(n,"catchLoc"),l=s.call(n,"finallyLoc");if(h&&l){if(this.prev=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&s.call(o,"finallyLoc")&&this.prev=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),T(i),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var s=i.completion;if("throw"===s.type){var o=s.arg;T(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,i,s){return this.delegate={iterator:L(e),resultName:i,nextLoc:s},"next"===this.method&&(this.arg=t),m}},e}function Ei(t,e,i,s,o,r,n){try{var a=t[r](n),h=a.value}catch(l){return void i(l)}a.done?e(h):Promise.resolve(h).then(s,o)}function Oi(t){return function(){var e=this,i=arguments;return new Promise((function(s,o){var r=t.apply(e,i);function n(t){Ei(r,s,o,n,a,"next",t)}function a(t){Ei(r,s,o,n,a,"throw",t)}n(void 0)}))}}var Fi={name:"ContentButton",props:{icon:{type:String,default:null},caption:{type:String,default:null},size:{type:Object,required:!0,default:function(){return{}},validator:function(t){return!(0,W.o8)(t.height)&&(0,W.kE)(t.height)&&(!(0,W.o8)(t.width)&&(0,W.kE)(t.width)||!(0,W.o8)(t.maxWidth)&&(0,W.kE)(t.maxWidth))}},translate:{type:Object,default:function(){return{x:"-50%",y:"-50%"}}},color:{type:Object,default:function(){return{mainColor:"#ffffff",backgroundColor:"rgba(39, 47, 55, .6)"}}},iconSize:{type:Number,required:!1,default:60,validator:function(t){return(0,W.kE)(t)&&t>=0&&t<=100}},fontSize:{type:Number,required:!1,default:50,validator:function(t){return(0,W.kE)(t)&&t>=0&&t<=100}},cornerRadius:{type:Number,required:!1,default:100,validator:function(t){return(0,W.kE)(t)&&t>=0&&t<=100}},fitHover:{type:Boolean,default:!0,required:!1}},created:function(){var t=this;return Oi(Ri().mark((function e(){return Ri().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.icon){e.next=9;break}return e.prev=1,e.next=4,i(4186)("./"+t.icon);case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),console.log("Could not load the icon '"+t.icon+"'.");case 9:case"end":return e.stop()}}),e,null,[[1,6]])})))()},computed:{buttonClasses:function(){return{"has-icon":!!this.icon,"has-caption":!!this.caption,"no-blur":"transparent"===this.color.backgroundColor,"fit-hover":this.fitHover}},buttonHeight:function(){return this.size.height},buttonWidth:function(){return this.size.width||this.size.maxWidth},buttonSizeStyle:function(){return{"--button-height":this.buttonHeight,"--button-width":this.buttonWidth,width:this.size.width?this.size.width+"px":null,maxWidth:this.size.maxWidth?this.size.maxWidth+"px":null}},buttonColorStyle:function(){return{"--main-color":this.color.mainColor,"--background-color":this.color.backgroundColor,"--background-hover-color":this.color.backgroundHoverColor,"--background-active-color":this.color.backgroundActiveColor}},finalIconSize:function(){if(!this.fitHover)return Math.floor(this.buttonHeight*this.iconSize/100);var t=Math.round(this.buttonHeight*this.iconSize/100);return t%2!=0&&t++,t},finalFontSize:function(){if(!this.fitHover)return Math.floor(this.buttonHeight*this.fontSize/100);var t=Math.round(this.buttonHeight*this.fontSize/100);return t%2!=0&&t++,t},buttonAdditionalStyle:function(){return{"--icon-size":this.finalIconSize,"--font-size":this.finalFontSize,"--corner-radius-factor":this.cornerRadius/100,"--zoom-factor":this.zoomFactor,"--button-translate-x":this.translate.x,"--button-translate-y":this.translate.y}},buttonStyles:function(){return Ii(Ii(Ii({},this.buttonSizeStyle),this.buttonColorStyle),this.buttonAdditionalStyle)},dir:function(){return this.$store.getters["i18n/isLocaleRtl"]?"rtl":"ltr"},zoomFactor:function(){return this.$store.state.pages.size.zoomFactor}}},_i=(0,j.Z)(Fi,$i,Pi,!1,null,"8e50e958",null).exports,Wi=i(5657);function Di(){return Di=Object.assign?Object.assign.bind():function(t){for(var e=1;e1)return null;var s=(0,Wi.F)({data:t,maxSize:i});return(0,d.Z)().getImageFileName(s)},animationInProgress:function(){return this.$store.getters["workspace/animationInProgress"]}},methods:{onImageClick:function(){!this.hasPopup||this.animationInProgress||this.isResizing||(this.$store.commit("sound/SET_MUTE_TEMPORARY",!this.$store.state.caniuse.userInteractions.firstClick),Date.now()>this.tapTimeout&&setTimeout(this.imageClick,this.$store.state.workspace.doubletapInterval+1),this.tapTimeout=Date.now()+this.$store.state.workspace.doubletapInterval)},imageClick:function(){this.$store.commit("sound/SET_MUTE_TEMPORARY",!1),this.isFrozenOrNotReady||this.isEmbed||this.$store.dispatch("lightbox/openLightbox",{type:"image",itemId:this.data.itemId,target:"content-click"})},preventDefault:function(t){t.preventDefault()},previewLoad:function(t){var e=this;if(t){var i=document.createElement("img");i.onload=function(){e.$emit("ready",e),e.addHiddenThumbnail(t),setTimeout((function(){e.makeThumbnailVisible(t)}),100)},i.onerror=function(t){e.$emit("error",e,t)},i.src=t}},addHiddenThumbnail:function(t){if(!this.cachedThumbnails.some((function(e){return e.id===t}))){var e={visibility:"visible",zIndex:-1},i={id:t,style:Di({},this.getThumbnailStyle(t),e)};this.cachedThumbnails.push(i)}},makeThumbnailVisible:function(t){this.cachedThumbnails.forEach((function(e){e.id===t?(e.style.visibility="visible",e.style.zIndex=null):e.style.visibility="hidden"}))}},watch:{thumbnailBlob:function(t){t&&this.previewLoad(t)}},components:{ContentButton:_i}},Ai=(0,j.Z)(Bi,ki,xi,!1,null,null,null).exports,Hi=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",t._g({class:["content-element gallery",t.containerClasses],style:t.containerStyle},t.isEmbed?null:{tap:t.onGalleryClick,panstart:t.preventDefault}),[i("content-button",{style:t.iconStyles,attrs:{icon:t.iconType,caption:t.iconCountCaption,size:t.buttonSize,translate:t.iconTranslate,color:t.iconColor,"icon-size":60,"font-size":40}}),t._v(" "),i("div",{staticClass:"thumbsContainer"},t._l(t.cachedThumbnails,(function(t){return i("div",{key:t.id,staticClass:"thumbnail",style:t.style})})),0)],1)},Ni=[];function Zi(){return Zi=Object.assign?Object.assign.bind():function(t){for(var e=1;e1)return null;var s=(0,Wi.F)({data:t,maxSize:i});return(0,d.Z)().getImageFileName(s)},animationInProgress:function(){return this.$store.getters["workspace/animationInProgress"]},galleryItemsCount:function(){return this.data.items.length},iconWidthLimit:function(){return Vi[this.iconSize]},iconActualSize:function(){var t=this.singleMode&&this.data.crossWide?this.containerRect.width-this.contentElementNonVisibleWidth:this.containerRect.width,e=Math.min(t*this.iconWidthLimit,this.iconNominalSize*(this.isIE?1:2)),i=e/(this.isIE?1:2);return i>this.containerRect.height*this.iconSizeLimit&&(e=(i=this.containerRect.height*this.iconSizeLimit)*(this.isIE?1:2)),{width:Math.round(e),height:Math.round(i)}},buttonSize:function(){return{maxWidth:this.iconActualSize.width,height:this.iconActualSize.height}},iconCountCaption:function(){return""+this.galleryItemsCount}},methods:{onGalleryClick:function(){this.animationInProgress||this.isResizing||(this.$store.commit("sound/SET_MUTE_TEMPORARY",!this.$store.state.caniuse.userInteractions.firstClick),Date.now()>this.tapTimeout&&setTimeout(this.galleryClick,this.$store.state.workspace.doubletapInterval+1),this.tapTimeout=Date.now()+this.$store.state.workspace.doubletapInterval)},galleryClick:function(){this.$store.commit("sound/SET_MUTE_TEMPORARY",!1),this.isFrozenOrNotReady||this.isEmbed||this.$store.dispatch("lightbox/openLightbox",{type:"gallery",itemId:this.data.itemId,target:"content-click"})},preventDefault:function(t){t.preventDefault()},previewLoad:function(t){var e=this;if(t){var i=document.createElement("img");i.onload=function(){e.$emit("ready",e),e.addHiddenThumbnail(t),setTimeout((function(){e.makeThumbnailVisible(t)}),100)},i.onerror=function(t){e.$emit("error",e,t)},i.src=t}},addHiddenThumbnail:function(t){if(!this.cachedThumbnails.some((function(e){return e.id===t}))){var e={visibility:"visible",zIndex:-1},i={id:t,style:Zi({},this.getThumbnailStyle(t),e)};this.cachedThumbnails.push(i)}},makeThumbnailVisible:function(t){this.cachedThumbnails.forEach((function(e){e.id===t?(e.style.visibility="visible",e.style.zIndex=null):e.style.visibility="hidden"}))}},watch:{thumbnailBlob:function(t){t&&this.previewLoad(t)}},components:{ContentButton:_i}},ji=(0,j.Z)(Ui,Hi,Ni,!1,null,null,null).exports,Gi=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-touch",{staticClass:"content-element gif",class:t.containerClasses,style:t.containerStyle,on:{tap:t.onGifClick}},[i("content-button",{style:t.iconStyles,attrs:{icon:t.iconType,size:t.iconActualSize,translate:t.iconTranslate,color:t.iconColor,"icon-size":75}}),t._v(" "),i("transition",{attrs:{name:"fade-thumbnail"}},[t.rawThumbnailUrl?i("div",{directives:[{name:"show",rawName:"v-show",value:t.showThumbnail,expression:"showThumbnail"}],staticClass:"thumbnail",style:t.thumbnailStyle}):t._e()]),t._v(" "),t.isPlaying||t.isEnded?i("div",{staticClass:"image"},[i("img",{ref:"gifImg",style:t.imageStyle,attrs:{crossOrigin:t.crossOrigin,src:t.imageSrcCache}})]):t._e(),t._v(" "),t.isCurrentPage&&t.isLoading?i("div",{staticClass:"preloader",style:t.crossWideCenterIconPositionStyle},[i("spinner",{attrs:{sync:t.spreadMode&&t.data.crossWide,size:18,"line-fg-color":"#5692AE","line-bg-color":"#ffffff"}})],1):t._e(),t._v(" "),!1===t.data.loop?i("div",{staticClass:"replay",style:t.replayPositions},[i("svgicon",{attrs:{focusable:"false",name:"replay",color:"white"}})],1):t._e()],1)},Xi=[];i(148);function Yi(t){return Yi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yi(t)}function qi(t,e,i){return(e=Ki(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function Ki(t){var e=Qi(t,"string");return"symbol"===Yi(e)?e:String(e)}function Qi(t,e){if("object"!==Yi(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,e||"default");if("object"!==Yi(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var Ji,ts=8,es={extends:pi,name:"ContentGif",props:[],data:function(){return{crossOrigin:(0,d.Z)().getCrossOrigin(),isIdle:!0,isLoading:!1,isPlaying:!1,isLoaded:!1,isEnded:!1,isAutoplay:this.data.autoplay,imgWidth:null,imgHeight:null,imgRatio:null,imageSrcCache:null,preloaderTimeout:null,loopTimeout:null,tapTimeout:0}},computed:{spreadMode:function(){return this.$store.state.pager.spreadMode},isLocaleRtl:function(){return this.$store.getters["i18n/isLocaleRtl"]},replayPositions:function(){var t=this.isLocaleRtl?"left":"right",e=this.singleMode&&this.data.crossWide&&this.data.page.side!==t?this.contentElementNonVisibleWidth+ts:ts;return qi({bottom:ts+"px"},t,e+"px")},containerClasses:function(){return{autoplay:this.isAutoplay,loading:this.isLoading,playing:this.isPlaying,ended:this.isEnded,highlighted:this.isHighlighted,"cross-wide":!!this.crossWideItem,"hover-button":"hover"===this.iconVisibility}},imageStyle:function(){return{width:Math.round(this.imgWidth*this.imgRatio*this.data.scaleRatio.w)+"px",height:Math.round(this.imgHeight*this.imgRatio*this.data.scaleRatio.h)+"px"}},imageSrc:function(){var t=!1===this.data.loop?"?rand="+this.rand:"",e=(this.$store.state.workspace.policiesUpdated,(0,Je.n)({filenameOrUrl:this.data.url,encode:!0}));return(0,d.Z)().translatePath(e+t)},rand:function(){return this.$store.state.content.rands[this.data.itemId]},isEmbed:function(){return this.$store.state.workspace.isEmbed},showThumbnail:function(){return!this.isEnded&&!this.isPlaying},animationInProgress:function(){return this.$store.state.workspace.animationInProgress},isLoadedAndVisible:function(){return this.isLoaded&&!this.$store.state.workspace.preloader}},mounted:function(){(!this.data.crossWide&&!this.rand||this.data.crossWide&&!this.crossWideItem&&!1===this.data.loop)&&this.newRand(),this.updateSrcCache(),this.$nextTick(this.checkAutoplay)},watch:{isCurrentPage:"currentPageChanged",isLoadedAndVisible:function(t){t&&(!this.crossWideItem||this.crossWideItem.isLoaded||this.singleMode)&&(this.isLoading=!1,this.playGif(this),this.crossWideItem&&!this.singleMode&&(this.crossWideItem.isLoading=!1,this.playGif(this.crossWideItem)),this.$emit("gif:loaded",this),this.$root.$emit("gif",{action:"loaded",url:this.data.url}))},imageSrc:"updateSrcCache",animationInProgress:function(t){t||this.$emit("pageAnimationEnded")}},methods:{playGif:function(t){t.isPlaying=!0,!1===t.data.loop&&t.data.duration&&(t.loopTimeout=setTimeout((function(){t.isPlaying=!1,t.isEnded=!0}),t.data.duration+300))},onGifClick:function(t){var e=this;this.isResizing||(Date.now()>this.tapTimeout&&setTimeout((function(){e.gifClick(t)}),this.$store.state.workspace.doubletapInterval+1),this.tapTimeout=Date.now()+this.$store.state.workspace.doubletapInterval)},gifClick:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.isFrozenOrNotReady&&!this.isEmbed){if(this.data.url&&this.isIdle&&!this.isLoading)this.$emit("gif:click",this),this.$root.$emit("gif",{action:"click",url:this.data.url}),this.loadGif();else if(!1===this.data.loop&&this.isEnded){var i=this.isMobile&&document.activeElement!==this.$el&&!this.isHighlighted,s=this.isMobile&&this.isHighlighted;if(!e&&!s&&(i||-1===(0,l.UZ)(t.target).indexOf("replay")))return void(i&&(this.isHighlighted=!0,this.crossWideItem&&(this.crossWideItem.isHighlighted=!0)));this.unloadGif(!e),this.$nextTick(this.loadGif),this.isMobile&&this.isHighlighted&&(this.isHighlighted=!1,this.crossWideItem&&(this.crossWideItem.isHighlighted=!1))}else(this.isPlaying||this.isLoading)&&this.unloadGif(!e&&!1===this.data.loop);this.crossWideItem&&!e&&this.crossWideItem.gifClick(null,!0)}},loadGif:function(){var t=this;this.img||(this.img=document.createElement("img")),this.img.onload=function(){clearTimeout(t.preloaderTimeout),t.imgWidth=t.img.naturalWidth,t.imgHeight=t.img.naturalHeight,t.imgRatio=Math.max(t.data.rect[0]/t.imgWidth,t.data.rect[1]/t.imgHeight),t.isLoaded=!0},this.img.onerror=function(e){t.$emit("gif:error",t,e)},this.crossOrigin&&(this.img.crossOrigin=this.crossOrigin),this.img.src=this.imageSrcCache,this.isIdle=!1,this.preloaderTimeout=setTimeout((function(){t.isLoading=!0}),this.data.loop?200:0)},unloadGif:function(t){var e;this.rawThumbnailUrl&&(clearTimeout(this.preloaderTimeout),clearTimeout(this.loopTimeout),this.isLoading=!1,this.isEnded=!1,this.img&&(this.img.onload=null,this.img.onerror=null,this.img.src=""),null===(e=this.$refs.gifImg)||void 0===e||e.removeAttribute("src"),this.isLoaded=!1,this.isPlaying=!1,this.isAutoplay=!1,this.isIdle=!0,t&&this.newRand(),this.$emit("gif:stop",this),this.$root.$emit("gif",{action:"stop",url:this.data.url}))},checkAutoplay:function(){this.data.autoplay&&(this.data.fileSize<10485760||!this.isMobile?this.isCurrentPage&&this.loadGif():this.isAutoplay=!1)},currentPageChanged:function(t){var e=this;t?this.animationInProgress?this.$once("pageAnimationEnded",(function(){e.checkAutoplay()})):this.checkAutoplay():(this.unloadGif(!0),this.data.autoplay&&(this.isAutoplay=!0))},newRand:function(){this.$store.dispatch("content/newRand",{itemId:this.data.itemId})},updateSrcCache:function(){this.imageSrcCache===this.imageSrc||this.isLoaded||(this.imageSrcCache=this.imageSrc)}},components:{spinner:dt.Z,ContentButton:_i}},is=es,ss=(0,j.Z)(is,Gi,Xi,!1,null,null,null).exports,os=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",t._g({staticClass:"content-element video",class:t.containerClasses,style:t.containerStyle},t.isEmbed?null:{tap:t.onVideoClick}),[t.isPlayerShown||t.hasError?t._e():i("content-button",{key:"content-element-icon-"+t.data.itemId,style:t.iconStyles,attrs:{icon:t.iconType,size:t.iconActualSize,translate:t.iconTranslate,color:t.iconColor,iconSize:75}}),t._v(" "),t.hasError?i("content-button",{style:t.iconStyles,attrs:{icon:"error",size:t.iconActualSize,color:t.iconColor,iconSize:75}}):t._e(),t._v(" "),i("v-touch",t._g({directives:[{name:"show",rawName:"v-show",value:t.isThumbnailShown,expression:"isThumbnailShown"}],staticClass:"thumbnail",style:t.thumbnailStyle},t.isEmbed?null:{tap:t.onVideoClick})),t._v(" "),t.isInline&&t.isPlayerShown&&!t.isModalShown?i(t.videoData.provider,{ref:"player",tag:"component",attrs:{id:t.videoData.id,itemId:t.data.itemId,url:t.videoData.originalUrl,embedUrl:t.videoData.embedUrl,accessKey:t.videoData.accessKey,width:t.containerRect.width,height:t.containerRect.height,mute:t.isMuted,start:t.videoData.startFrom,isCurrentPage:t.isCurrentPage,isIos:t.isIos,customUrl:t.videoData.customUrl}}):t._e(),t._v(" "),t.isModalShown?i("modal-window",{ref:"modalWindow",attrs:{width:t.modalRect.width,height:t.modalRect.height,bgColor:"#000",delay:150}},[t.isIos&&t.showPreventer&&"wistia"!==t.videoData.provider?i("v-touch",{ref:"touchPreventer",staticClass:"touch-preventer",class:t.videoData.provider+(t.isModalSmall?" small":""),on:{tap:t.playPause,doubletap:function(t){t.preventDefault()},pinch:function(t){t.preventDefault()}}}):t._e(),t._v(" "),i(t.videoData.provider,{ref:"player",tag:"component",style:t.modalVideoStyle,attrs:{id:t.videoData.id,itemId:t.data.itemId,url:t.videoData.originalUrl,embedUrl:t.videoData.embedUrl,accessKey:t.videoData.accessKey,width:t.modalRect.width,height:t.modalRect.height,mute:t.isMuted,start:t.videoData.startFrom,isCurrentPage:!0,isIos:t.isIos,customUrl:t.videoData.customUrl}})],1):t._e()],1)},rs=[],ns=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("div",{ref:"playerMount",staticClass:"youtube-player player",attrs:{id:t.elementId}})])},as=[],hs=i(1062),ls=i.n(hs);function cs(t){return cs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cs(t)}function ds(){return ds=Object.assign?Object.assign.bind():function(t){for(var e=1;e.1?t:.3})).catch(this.error),this.player.setMuted(!0).catch(this.error)):(this.player.setMuted(!1).catch(this.error),this.player.setVolume(this.volume).catch(this.error))},setVolume:function(t){this.player.setVolume(t).catch(this.error)},setSize:function(){this.player.element&&(this.player.element.width=this.width,this.player.element.height=this.height)},setCurrentTime:function(t){this.player.setCurrentTime(t)},init:function(){var t=this;this.player.ready().then((function(){t.start&&t.player.setCurrentTime(t.start),t.isCurrentPage&&!t.$store.state.workspace.pausedByReader[t.itemId]&&t.player.play(),t.$emit("ready",t.player),t.setMute(t.mute),Ls.forEach((function(e){return Is.call(t,e)}))})).catch(this.error)},error:function(t){var e=this;if(-1!==t.message.indexOf("is not embeddable")&&this.$el.querySelector("iframe"))return;"PasswordError"!==t.name&&"PrivacyError"!==t.name||this.player.element&&(this.$nextTick((function(){e.player.element.focus()})),setTimeout((function(){e.player.element.focus()}),100)),this.$emit("error",t,this.player)}},mounted:function(){var t={width:this.width,height:this.height,autoplay:0,autopause:0,muted:this.mute,transparent:!1,playsinline:!0};this.customUrl?(t.url=this.url,t.url+=this.accessKey?"/"+this.accessKey:""):this.embedUrl?t.url=this.embedUrl:this.accessKey?t.url="https://www.vimeo.com/"+this.id+"/"+this.accessKey:t.id=this.id,this.player=new Ps.Z(this.$el,zs(t,this.options)),this.init(),this.$parent.$on("play",this.play),this.$parent.$on("stop",this.stop),this.$parent.$on("pause",this.pause)},beforeDestroy:function(){this.player&&this.player.unload().catch((function(){})),this.$parent.$off("play",this.play),this.$parent.$off("stop",this.stop),this.$parent.$off("pause",this.pause)}},Es=(0,j.Z)(Rs,Ts,Ms,!1,null,null,null).exports,Os=function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{key:t.elementId,class:"wistia-player player wistia_embed wistia_async_"+t.id,attrs:{id:t.elementId},on:{wheel:function(t){t.stopPropagation()},click:function(t){t.stopPropagation()},touchstart:function(t){t.stopPropagation()},touchmove:function(t){t.stopPropagation()},touchstop:function(t){t.stopPropagation()},touchcancel:function(t){t.stopPropagation()},pointerdown:function(t){t.stopPropagation()},mousedown:function(t){t.stopPropagation()}}})},Fs=[],_s=i(1042),Ws=i(8531);function Ds(){return Ds=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0||(0,l.UZ)(t.target).indexOf("modal-close")>=0)&&(this.isClosing=!0,this.historyEnabled&&0!==window.history.length?window.history.back():this.hide())},loading:function(){this.isLoaded=!1},loaded:function(){this.isLoaded=!0},error:function(){this.hasError=!0},onResize:function(){if(this.windowWidth=window.innerWidth,this.windowHeight=window.innerHeight,this.isAndroid){var t=document.activeElement;if(0!==this.androidKeyboardShift||"input"!==t.tagName.toLowerCase()&&"textarea"!==t.tagName.toLowerCase())0!==this.androidKeyboardShift&&(this.androidKeyboardShift=0);else{var e,i=t.getBoundingClientRect();i.top>this.windowHeight/2&&this.windowHeight<((null===(e=this.rect)||void 0===e?void 0:e.height)||this.height)&&(this.androidKeyboardShift=-i.top/4)}}},onKeydown:function(t){"Escape"===t.code&&this.hide()}},mounted:function(){this.onResizeDebounced=(0,l.Ds)(this.onResize,100,!1),window.addEventListener("resize",this.onResizeDebounced),window.addEventListener("keydown",this.onKeydown),this.$root.$el.appendChild(this.$el)},beforeDestroy:function(){var t=this;window.removeEventListener("resize",this.onResizeDebounced),window.removeEventListener("keydown",this.onKeydown),this.$store.dispatch("workspace/setModalOpened",!1),this.isHideEventEmitted||this.$emit("hidden"),setTimeout((function(){var e,i;null===(e=(i=t.$el).remove)||void 0===e||e.call(i)}),this.delay)},components:{spinner:dt.Z}}),qs={extends:pi,name:"ContentVideo",data:function(){var t;return{playerPromise:new Promise((function(e){t=e})),resolvePlayer:t,isModalShown:!1,isPlayerShown:!1,playerLoaded:!1,isPlaying:!1,volumeEnabled:!1,isEnded:!1,isMutedByPlayer:!1,tapTimeout:0,hasError:!1,videoData:null,showPreventer:!0,currentTime:null,lastProgressId:null,originalStartFrom:null,playedWhenFrozen:!1}},beforeMount:function(){this.data.originalUrl?this.videoData=this.getVideoInfo(this.data.originalUrl):this.videoData=this.data,this.originalStartFrom=this.videoData.startFrom},beforeDestroy:function(){this.saveTime(this.currentTime),this.unbindEvents()},watch:{isCurrentPage:"currentPageChanged",isPlaying:"setPlayingWithSound",isMutedByPlayer:"setPlayingWithSound",shouldAutoplay:function(t){!t||this.isPlayerShown||this.$store.state.workspace.pausedByReader[this.data.itemId]||this.startInline()},data:function(t){t.originalUrl?this.videoData=this.getVideoInfo(t.originalUrl):this.videoData=t},isInline:function(t,e){e&&!t&&this.isPlayerShown&&this.removeInline()},currentTime:function(t){this.saveTime(t)},isWorkspaceFrozen:function(t,e){t&&!e&&this.isInline&&this.removeInline(),!t&&e&&this.shouldAutoplay&&!this.$store.state.workspace.pausedByReader[this.data.itemId]&&this.startInline()},isLightboxShown:function(t){t&&!this.isModalShown?this.$emit("pause"):!this.isMobile&&this.data.autoplay&&this.isCurrentPage&&!this.$store.state.workspace.pausedByReader[this.data.itemId]&&this.$emit("play")}},mounted:function(){this.shouldAutoplay&&!this.$store.state.workspace.pausedByReader[this.data.itemId]&&this.startInline()},computed:{isInline:function(){var t=this.$store.state.workspace.userAgentInfo;return"dialog"!==this.data.mode&&!this.data.crossWide&&!t.browser.safari&&!this.isMobileApp&&!this.isPublisher&&this.data.rect[0]*this.data.scaleRatio.w>144&&this.data.rect[1]*this.data.scaleRatio.h>100},shouldAutoplay:function(){return!this.isFrozenOrNotReady&&!this.isEmbed&&!this.hasError&&!this.isPublisher&&!this.isMobile&&!this.isLightboxShown&&!this.$store.state.workspace.pausedByReader[this.data.itemId]&&this.isInline&&(this.$store.state.caniuse.video.inlineMutedAutoplay||this.$store.state.caniuse.video.inlineAutoplay)&&this.data.autoplay},isLightboxShown:function(){return this.$store.getters["lightbox/isShown"]||this.$store.state.workspace.modalOpened||null!==this.$store.state.popup.opened},shouldShowThumbnail:function(){return"dialog"!==this.data.mode||this.data.showImage},isThumbnailShown:function(){return this.shouldShowThumbnail&&!this.playerLoaded},isIos:function(){return this.$store.state.workspace.userAgentInfo.os.ios},isModalSmall:function(){return this.modalRect.height<=200},isPublisher:function(){return this.$store.state.workspace.userAgentInfo.browser.publisher},isMobileApp:function(){return"mobile-app"===this.$store.getters["info/version"]},apiVideoUrl:function(){var t="";switch(this.data.provider){case"youtube":t="https://www.youtube.com/watch?v="+this.data.id;break;case"vimeo":t="https://vimeo.com/"+this.data.id,this.data.accessKey?t="https://vimeo.com/"+this.data.id+"/"+this.data.accessKey:this.data.originalUrl&&(t=this.data.originalUrl.split("#")[0].split("?")[0]);break;case"wistia":t=this.data.account?"https://"+this.data.account+".wistia.com/medias/"+this.data.id:this.data.originalUrl?this.data.originalUrl.split("#")[0].split("?")[0]:"https://fast.wistia.net/embed/iframe/"+this.data.id;break;default:t=this.data.originalUrl||this.data.id}return t},modalRect:function(){var t=(0,Ce.Tj)({width:this.data.width?this.data.width:this.data.rect[0],height:this.data.height?this.data.height:this.data.rect[1]},{width:.8*this.workspaceSize.width,height:.8*this.workspaceSize.height});return{width:Math.round(t.width),height:Math.round(t.height)}},workspaceSize:function(){return this.$store.getters["workspace/size"]},modalVideoStyle:function(){return"youtube"===this.data.provider?null:{width:this.modalRect.width+"px",height:this.modalRect.height+"px"}},containerClasses:function(){return{error:this.hasError,"cross-wide":!!this.crossWideItem,highlighted:this.isHighlighted,"hover-button":"hover"===this.iconVisibility}},isMuted:function(){return this.$store.state.sound.muteSound||this.$store.state.sound.muteTemporary||this.isInline&&!this.$store.state.caniuse.video.inlineAutoplay&&this.$store.state.caniuse.video.inlineMutedAutoplay},isEmbed:function(){return this.$store.state.workspace.isEmbed},isWorkspaceFrozen:function(){return this.$store.getters["workspace/isFrozen"]},animationInProgress:function(){return this.$store.getters["workspace/animationInProgress"]},rawThumbnailUrl:function(){return this.data.image&&this.shouldShowThumbnail?(0,Je.n)({filenameOrUrl:this.data.image}):null}},methods:{onVideoClick:function(){this.animationInProgress||this.isResizing||(this.$store.commit("sound/SET_MUTE_TEMPORARY",!this.$store.state.caniuse.userInteractions.firstClick),this.$store.commit("workspace/SET_PAUSED_BY_READER",{itemId:this.data.itemId,value:!1}),Date.now()>this.tapTimeout&&setTimeout(this.videoClick,this.$store.state.workspace.doubletapInterval+1),this.tapTimeout=Date.now()+this.$store.state.workspace.doubletapInterval)},videoClick:function(){this.$store.commit("sound/SET_MUTE_TEMPORARY",!1),this.isFrozenOrNotReady||this.isEmbed||this.hasError||(this.isPublisher?this.$root.$emit("video",{action:"publisher",url:this.apiVideoUrl}):(this.$emit("video:click",this),this.isInline?this.startInline():this.openinModal()))},startInline:function(){var t,e=this;this.currentTime=this.loadTime(),this.videoData.startFrom=null!==(t=this.currentTime)&&void 0!==t?t:this.originalStartFrom,this.playerPromise.then((function(){"youtube"===e.data.provider&&(e.playerLoaded=!0)})),this.isPlayerShown=!0,this.$nextTick((function(){this.bindEvents()}))},removeInline:function(){var t=this;this.unbindEvents(),this.isPlayerShown=!1,this.playerLoaded=!1,this.playerPromise=new Promise((function(e){t.resolvePlayer=e}))},openinModal:function(){var t;this.currentTime=this.loadTime(),this.videoData.startFrom=null!==(t=this.currentTime)&&void 0!==t?t:this.originalStartFrom,this.$root.$emit("popupStateChanged",{state:1}),this.isModalShown=!0,this.$nextTick((function(){var t=this;this.$refs.modalWindow.show(),this.$nextTick((function(){this.bindEvents()})),this.$refs.modalWindow.$once("hidden",(function(){t.$root.$emit("popupStateChanged",{state:0}),t.isModalShown=!1,t.isPlaying=!1,t.$emit("video:close",t),t.$root.$emit("video",{action:"close",url:t.apiVideoUrl}),t.unbindEvents()}))}))},playPause:function(t){t.preventDefault(),this.isPlaying?this.$refs.player.pause():this.$refs.player.play()},getVideoInfo:function(t){var e=t.split("?"),i=e[0],s=e[1],o=i.split("#")[0],r=/(?:(?:https?:)?\/\/)?(?:[^.]+\.)?(\w+)(\.|\-)/.exec(o),n=r?r[1]:null,a=o.split("/"),h={provider:n,id:a[a.length-1]};switch(n){case"youtu":case"youtube":if(h.provider="youtube","watch"===h.id){var l=/v=([^&]+)/.exec(s);h.id=l?l[1]:null}break;case"vimeo":var c=/user[0-9]+\/\w+/,d=/^\d+$/;h.customUrl=c.exec(o)?o:null,h.customUrl||d.exec(h.id)||(h.accessKey=h.id,h.id=a[a.length-2]);break;case"wistia":var u=/https?:\/\/(.*)?(?:\.wistia\.com|fast\.wistia\.net)/.exec(o);h.account=u?u[1]:null}return(0,V.Z)(this.data,h)},currentPageChanged:function(t){t?this.isMobile||!this.data.autoplay||this.$store.state.workspace.pausedByReader[this.data.itemId]||this.$emit("play"):this.$emit("pause")},bindEvents:function(){var t=this;this.$refs.player.$on("play",(function(e,i,s){["vimeo","wistia"].includes(t.data.provider)&&t.$store.commit("workspace/SET_PAUSED_BY_READER",{itemId:t.data.itemId,value:null}),"youtube"!==t.data.provider&&t.isInline&&(t.playerLoaded=!0);var o=0===e||0===(null==e?void 0:e.seconds);t.isEnded&&o&&t.originalStartFrom&&t.$refs.player.setCurrentTime(t.originalStartFrom),t.isMutedByPlayer=s,t.isEnded=!1,t.isPlaying=!0,t.showPreventer=!0,t.$emit("video:play",e,t,i),t.$root.$emit("video",{action:"play",url:t.apiVideoUrl,time:e})})),this.$refs.player.$on("pause",(function(e,i,s){if(["vimeo","wistia"].includes(t.data.provider)){var o=t.$store.state.workspace.pausedByReader[t.data.itemId];t.$store.commit("workspace/SET_PAUSED_BY_READER",{itemId:t.data.itemId,value:o||null===o})}t.isPlaying=!1,t.isMutedByPlayer=s,t.currentTime=e,t.$emit("video:pause",e,t,i),t.$root.$emit("video",{action:"pause",url:t.apiVideoUrl,time:e})}));var e=function(e,i,s){t.isEnded=!0,t.isMutedByPlayer=s,t.isPlaying=!1,t.currentTime=t.originalStartFrom,t.$emit("video:end",e,t,i),t.$root.$emit("video",{action:"stop",url:t.apiVideoUrl,time:e})};this.$refs.player.$on("end",e),this.$refs.player.$on("ended",e);var i=function(e,i,s){t.currentTime=e,t.isMutedByPlayer=s,t.$emit("video:seek",e,t,i),t.$root.$emit("video",{action:"seekTo",url:t.apiVideoUrl,time:e})};this.$refs.player.$on("seek",i),this.$refs.player.$on("seeked",i),this.$refs.player.$on("timeupdate",(function(e,i,s){t.isMutedByPlayer=s,t.currentTime=e})),this.$refs.player.$on("secondchange",(function(e,i,s){"wistia"===t.data.provider&&t.isEnded||(t.currentTime=e),t.isMutedByPlayer=s})),this.$refs.player.$on("error",(function(e,i,s){"PasswordError"!==e.name&&"PrivacyError"!==e.name?(t.$emit("video:error",e,t,i),t.isModalShown=!1,t.isPlayerShown=!1,t.playerLoaded=!1,t.isPlaying=!1,t.hasError=!0,t.isMutedByPlayer=s):t.showPreventer=!1})),this.$refs.player.$on("loaded",(function(e,i,s){t.showPreventer=!0,"youtube"!==t.data.provider&&t.isInline&&(t.playerLoaded=!0),t.isMutedByPlayer=s,t.$emit("video:loaded",e,t,i)})),this.$refs.player.$on("ready",(function(){t.$nextTick((function(){t.resolvePlayer()}))}))},unbindEvents:function(){this.$refs.player&&(this.$refs.player.$off("play"),this.$refs.player.$off("pause"),this.$refs.player.$off("end"),this.$refs.player.$off("ended"),this.$refs.player.$off("seek"),this.$refs.player.$off("seeked"),this.$refs.player.$off("error"),this.$refs.player.$off("loaded"),this.$refs.player.$off("ready"))},setPlayingWithSound:function(){this.$store.state.caniuse.userInteractions.firstClick||this.isMutedByPlayer||this.$store.dispatch("caniuse/setFirstClick"),this.$store.dispatch("content/setVideoPlayingWithSound",{playing:this.isPlaying&&!this.isMutedByPlayer,itemId:this.data.itemId})},getVideoHash:function(t){return[[this.videoData.page.id,this.videoData.page.isWide?"wide":this.videoData.page.side].join("_"),this.videoData.provider,this.videoData.id,t].join("_")},saveTime:function(t){var e=this.getVideoHash("time"),i=this.getVideoHash("id"),s=(0,d.Z)().getSessionStorage().getItem(i);this.data.crossWide&&s&&s!=this.lastProgressId||(this.lastProgressId=Date.now(),(0,d.Z)().getSessionStorage().setItem(e,t),(0,d.Z)().getSessionStorage().setItem(i,this.lastProgressId))},loadTime:function(){var t=this.getVideoHash("time"),e=(0,d.Z)().getSessionStorage().getItem(t),i=e?parseInt(e,10):null,s=this.getVideoHash("id");return this.lastProgressId=(0,d.Z)().getSessionStorage().getItem(s),null===i||isNaN(i)?null:i}},components:{ContentButton:_i,youtube:$s,vimeo:Es,wistia:js,"modal-window":(0,j.Z)(Ys,Gs,Xs,!1,null,"1536e47e",null).exports}},Ks=(0,j.Z)(qs,os,rs,!1,null,null,null).exports,Qs=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-touch",t._g({class:t.containerClasses,style:[t.containerStyle,t.highlightedColor],attrs:{"data-item-id":t.data.itemId,"data-popup-form-area":!t.hasButton}},t.isEmbed?null:{tap:t.onButtonClick}),[t.hasButton?i("button-component",{attrs:{fontSize:t.buttonProps.fontSize,size:t.containerRect,caption:t.buttonProps.caption,cornerRadius:t.buttonProps.cornerRadius,color:t.buttonColor,translate:t.buttonTranslate,"fit-hover":!1}}):t._e()],1)},Js=[],to=i(6767),eo=i.n(to),io=i(9712),so=i(1909),oo={extends:pi,name:"ContentForm",components:{FormContainer:io.Z,ButtonComponent:_i},props:[],data:function(){return{tapTimeout:0,isPopup:this.data.popup,hasButton:!!this.data.button,isPressed:!1,provider:(0,so.V)(this.data.url),buttonTranslate:{x:0,y:0}}},mounted:function(){var t=this;this.isMobile&&this.$root.$on("form-highlight",this.setHighlight),Hs=function(){t.isPressed=!0,t.crossWideItem&&(t.crossWideItem.isPressed=!0)},Ns=function(){t.isPressed=!1,t.crossWideItem&&(t.crossWideItem.isPressed=!1)},this.$el.addEventListener("pointerdown",Hs),this.$el.addEventListener("pointerup",Ns),this.$el.addEventListener("mouseout",Ns)},beforeDestroy:function(){this.isMobile&&this.$root.$off("form-highlight",this.setHighlight),this.$el.removeEventListener("pointerdown",Hs),this.$el.removeEventListener("pointerup",Ns),this.$el.removeEventListener("mouseout",Ns)},computed:{containerClasses:function(){return{highlighted:this.isHighlighted,pressed:this.isPressed,"cross-wide":!!this.crossWideItem&&!this.isSlideMode,"content-element":!0,"popup-form-area":!this.hasButton}},isEmbed:function(){return this.$store.state.workspace.isEmbed},animationInProgress:function(){return this.$store.getters["workspace/animationInProgress"]},buttonProps:function(){return this.data.button},buttonColor:function(){var t;if(this.data.button.color){var e=new(eo())(this.data.button.color),i=(0,c.R)((0,c.l)(this.data.button.color))>.5,s=i?e.mix(eo()("black"),.15).hsl().string():e.mix(eo()("white"),.2).hsl().string(),o=i?e.mix(eo()("black"),.3).hsl().string():e.mix(eo()("white"),.4).hsl().string(),r=i?"#000000":"#ffffff";return{backgroundColor:null===(t=this.data.button)||void 0===t?void 0:t.color,backgroundHoverColor:s,backgroundActiveColor:o,mainColor:r}}},isSlideMode:function(){return this.$store.state.pager.slideMode},highlightedColor:function(){var t=this.$store.state.book.links.color;return-1!==t.indexOf("#")&&(t="rgba(".concat((0,c.l)(t).join(","),", 0.6)")),{"--highlighted-color":t}}},methods:{onButtonClick:function(){this.animationInProgress||this.isResizing||(this.$store.commit("sound/SET_MUTE_TEMPORARY",!this.$store.state.caniuse.userInteractions.firstClick),Date.now()>this.tapTimeout&&setTimeout(this.buttonClick,this.$store.state.workspace.doubletapInterval+1),this.tapTimeout=Date.now()+this.$store.state.workspace.doubletapInterval)},buttonClick:function(){this.$store.commit("sound/SET_MUTE_TEMPORARY",!1),this.isFrozenOrNotReady||this.isEmbed||(this.isPopup?this.$store.dispatch("lightbox/openLightbox",{type:"form",itemId:this.data.itemId,target:"content-click"}):(window.open(this.data.url,"_blank"),this.$root.$emit("onTabFormOpen",{url:this.data.url})))},setHighlight:function(t){var e=this;t.itemId===this.data.itemId.toString(10)&&(this.isHighlighted=!0,setTimeout((function(){e.isHighlighted=!1}),500))}}},ro=oo,no=(0,j.Z)(ro,Qs,Js,!1,null,null,null).exports,ao=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition",{attrs:{name:"panel-fade"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:(t.showPanel||t.forceShow)&&!t.inProgress&&!t.contextMenuVisible,expression:"(showPanel || forceShow) && !inProgress && !contextMenuVisible"}],ref:"copyPanel",staticClass:"select-text-panel",class:t.panelClass,style:t.panelStyle,attrs:{dir:t.blockDirection},on:{mouseenter:t.onMouseEnter,mouseleave:t.onMouseLeave,mousedown:function(t){t.stopPropagation()}}},[i("div",{staticClass:"pointer",style:t.pointerStyle}),t._v(" "),i("span",{staticClass:"button",on:{click:t.copyText}},[t._v(t._s(t.$t("RightClickMenu.COPY_TEXT")))]),t._v(" "),t.isOnline?i("span",{staticClass:"divider"},[t._v("|")]):t._e(),t._v(" "),t.isOnline?i("span",{staticClass:"button",on:{click:t.copyTextLink}},[t._v(t._s(t.$t("RightClickMenu.SHARE_SELECTED_TEXT")))]):t._e()])])},ho=[],lo={name:"select-text-panel",data:function(){return{showPanel:!1,forceShow:!1,panelStyle:{},panelRect:{},vertical:null,rightOffset:!1,showPanelTimeout:null,pointerStyle:{}}},mounted:function(){this.$root.$on("selectText:hidePanel",this.hide),this.$root.$on("selectText:showPanel",this.show)},beforeDestroy:function(){this.$root.$off("selectText:hidePanel",this.hide),this.$root.$off("selectText:showPanel",this.show)},computed:{isSlideMode:function(){return this.$store.state.pager.slideMode},userRect:function(){return this.$store.state.text.selectionRect},pageId:function(){return this.$store.state.text.pageID},pageSide:function(){return this.$store.state.text.pageSide},inProgress:function(){return this.$store.state.text.inProgress},pageSize:function(){return this.$store.state.pages.size},cornerSymbols:function(){return this.$store.state.text.cornerSymbols},holderSize:function(){return this.$store.getters["workspace/holderSize"]},bookComponent:function(){return this.$store.state.workspace.bookComponent},locale:function(){return this.$store.getters["i18n/getCurrent"]},blockDirection:function(){return this.$store.getters["i18n/isLocaleRtl"]?"rtl":null},isRtl:function(){return this.$store.state.book.rightToLeft},panelClass:function(){return this.vertical+(this.rightOffset?" right-side":"")+(this.contextMenuVisible?" quick-leave":"")},pages:function(){var t=this.$store.getters["pager/currentPages"].length;return this.$store.getters["pages/pageProp"](this.pageId,"wide")?2:t},hardcoverTopPadding:function(){return this.$store.getters["book/hasHardcover"]?this.$store.state.pager.spreadMode?1===this.pages&&(this.$store.getters["pages/isFirstPage"](this.pageId)||this.$store.getters["pages/isLastPage"](this.pageId))?-.03*this.pageSize.height/2:0:this.$store.state.pager.singleMode&&this.$store.getters["pages/isFirstPage"](this.pageId)?-.03*this.pageSize.height/2:0:0},hardcoverLeftPadding:function(){return this.$store.getters["book/hasHardcover"]&&(this.$store.state.pager.spreadMode&&1===this.pages&&(!this.isRtl&&this.$store.getters["pages/isLastPage"](this.pageId)||this.isRtl&&this.$store.getters["pages/isFirstPage"](this.pageId))||this.$store.state.pager.singleMode&&this.isRtl&&this.$store.getters["pages/isFirstPage"](this.pageId))?-.03*this.pageSize.width:0},pageLeftPadding:function(){var t=this.$store.getters["pages/pageProp"](this.pageId,"wide");return this.$store.getters["pager/isFirstSpread"]||"right"!==this.pageSide||(this.isRtl&&this.$store.getters["pages/isLastPage"](this.pageId)||t)&&!this.$store.state.pager.singleMode?0:this.$store.state.pager.spreadMode?this.pageSize.width:this.$store.state.pager.singleMode&&t?-this.pageSize.width:0},contextMenuVisible:function(){return this.$store.state.workspace.contextMenuVisible},isOnline:function(){return!this.$store.getters["workspace/isOffline"]},pagesWidth:function(){var t,e=this.$store.getters["pager/state"];if(e.slideMode)t=this.holderSize.width;else{var i=e.leftPage&&e.rightPage;t=this.$store.state.pages.size.width*(i?2:1)}return t},workspaceSize:function(){return this.$store.getters["workspace/size"]},isZoomed:function(){return 1!==this.$store.state.pages.size.zoomFactor},bookContainerWidth:function(){var t=this.$store.state.sidebar.opened?this.$store.state.sidebar.width:0;return this.workspaceSize.width-t}},methods:{hide:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{forceHide:!0};this.showPanel=!1,t.forceHide&&(this.forceShow=!1)},show:function(){var t=this,e="first:"+this.cornerSymbols.first.left+"-"+this.cornerSymbols.first.top+" last:"+this.cornerSymbols.last.left+"-"+this.cornerSymbols.last.top;null===this.userRect||this.showPanel&&this.cornerSymbolsCode===e||(this.showPanel=!0,this.cornerSymbolsCode=e,this.$nextTick((function(){t.setPosition()})))},setPosition:function(){var t=this.calculatePanelPosition();this.panelRect.left=t.left,this.panelRect.top=t.top,this.vertical=t.vertical,this.panelStyle={left:this.panelRect.left+"px",top:this.panelRect.top+"px"}},calculatePanelPosition:function(){var t;t=this.cornerSymbols.first.top===this.cornerSymbols.last.top?"left"===this.userRect.cursorHSide?{vertical:"top",horizontal:"first"}:{vertical:"bottom",horizontal:"last"}:"top"===this.userRect.cursorVSide?{vertical:"top",horizontal:"first"}:{vertical:"bottom",horizontal:"last"};var e="[data-zoom-wrapper]",i=new window.WebKitCSSMatrix(window.getComputedStyle(this.$root.$el.querySelector(e)).transform),s=i.m41,o=i.m42,r=50,n=this.calculatePanelCoordinates({position:t,zoomWrapperTranslateX:s});return this.isZoomed?n.top+othis.holderSize.height-r&&(t.vertical="top",n=this.calculatePanelCoordinates({position:t,zoomWrapperTranslateX:s})):n.topthis.holderSize.height-r&&(t.vertical="top",n=this.calculatePanelCoordinates({position:t,zoomWrapperTranslateX:s})),t=(0,V.Z)(t,n)},calculatePanelCoordinates:function(t){var e,i,s,o,r,n=t.position,a=t.zoomWrapperTranslateX,h=null!==(e=null===(i=this.userRect)||void 0===i?void 0:i.offsetX)&&void 0!==e?e:0,l=null!==(s=this.userRect.offsetY)&&void 0!==s?s:0,c=this.cornerSymbols[n.horizontal],d=this.cornerSymbols.first.top!==this.cornerSymbols.last.top,u=this.cornerSymbols.first.isRtlSelection&&d,p=n.horizontal===(u?"last":"first")&&c.collisions.left||n.horizontal===(u?"first":"last")&&!c.collisions.right?c.width:0,g="bottom"===n.vertical?c.height:0,f=this.pageLeftPadding+this.hardcoverLeftPadding+c.left+p+h,m=this.hardcoverTopPadding+c.top+g+l;if(this.isZoomed){var v=this.isSlideMode&&this.holderSize.left<0?0:this.holderSize.left,b=!this.isSlideMode&&this.bookContainerWidth>this.pagesWidth?(this.bookContainerWidth-this.pagesWidth)/2:0;o=this.$el.offsetWidth/2-v-a-b,r=this.bookContainerWidth-this.$el.offsetWidth/2-v-a-b}else o=this.$el.offsetWidth/2-this.holderSize.left,r=this.pagesWidth-(this.$el.offsetWidth/2-this.holderSize.left);var S=this.isZoomed&&(this.$el.offsetWidth/2-(o-f)<23||this.$el.offsetWidth/2-(f-r)<23);return this.pointerStyle.marginLeft=null,this.pointerStyle.display=S?"none":"block",fr&&(this.pointerStyle.marginLeft=f-r+"px",f=r),{left:f,top:m}},copyText:function(){this.$root.$emit("contextMenu:copyText"),this.hide()},copyTextLink:function(){this.$root.$emit("contextMenu:copyTextLink"),this.hide()},onMouseEnter:function(){this.forceShow=!0},onMouseLeave:function(){this.forceShow=!1}}},co=lo,uo=(0,j.Z)(co,ao,ho,!1,null,"122cbd9d",null).exports,po=i(6373);function go(){return go=Object.assign?Object.assign.bind():function(t){for(var e=1;ee.width+e.left-t.left?e.width+e.left-t.left:t.width,height:t.height,left:t.left-e.left,top:t.top-e.top};return i.left<0&&(i.width=i.width+i.left,i.left=0),i},checkScaleFactorForZoom:function(t,e,i){return 1*(e*t).toFixed(2)>i?i/e:t},getScrollAmount:function(t,e,i,s,o){if(t&&t.direction){var r,n;switch(t.direction){case"left":r=e<-100?100:-e;break;case"up":r=i<-100?100:-i;break;case"right":r=e-100>-(n=Math.max(o.width-s.width,0))?-100:-n-e;break;case"down":r=i-100>-(n=Math.max(o.height-s.height,0))?-100:-n-i}return r}},getSuitableZoomFactor:function(t,e,i,s){if(0===e)return null;var o=[1.1,1.25,1.5,1.75,2,2.5,3,3.5,4,4.5,5].filter((function(t){return t>=i&&t<=s})).filter((function(i){return e>0?i>t:i0?o.shift():o.pop()},showSelectTextTip:function(){this.$store.getters["workspace/canShowSelectTextTip"]&&(this.$store.dispatch("workspace/setFlashMessage",{text:this.$tc("AlertMessage.SELECT_TEXT_TIP",0,{key:this.isMac?"⌘":"Ctrl"}),delay:1500}),this.$store.dispatch("workspace/increaseSelectTextTipShowsCount"))}}};function So(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{x:0,y:0};return{width:t.width*e,height:t.height*e,top:t.top+(i.y-i.y*e),left:t.left+(i.x-i.x*e)}}function yo(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{x:0,y:0};return{width:e.width*i,height:e.height*i,top:t.height/2-s.y*i+2*t.top,left:t.width/2-s.x*i+2*t.left}}function wo(t,e){var i=t.width,s=t.height,o=t.top,r=t.left;return s0?o=0:s+o0?r=0:i+r2&&void 0!==arguments[2]?arguments[2]:1;return 1===i?{x:0,y:0}:{x:(t.left-e.left)/(i-1),y:(t.top-e.top)/(i-1)}}i(8856),i(6965),i(9036),i(464),i(925);var xo=i(5109),$o={"content-block":fi,"content-link":wi,"content-image":Ai,"content-gallery":ji,"content-gif":ss,"content-video":Ks,"content-form":no},Po={name:"FlipBook",mixins:[vo,bo,p.Z],props:{containerSize:{type:Object,required:!0},pageSize:{type:Object,required:!0}},components:{page:bt,selectTextPanel:uo},data:function(){return{status:"ready",zoomFactor:1,scaleFactor:1,scaleOrigin:{x:0,y:0},holderScrollTop:0,holderScrollLeft:0,holderScrollY:0,holderScrollX:0,zoomTimeout:0,addNoteTimeout:0,hideLeftArrow:!1,hideRightArrow:!1,visiblePages:"right",animation:!1,lastWheelTime:0,dragActive:!0,stripesWidth:0,dragging:!1,lastZoomFactor:null,overriddenPagerState:null}},beforeMount:function(){this.visiblePages=this.getVisiblePages(),this.lastZoomFactor=this.defaultZoomFactor,this.zoomFactor=this.$store.state.pages.size.zoomFactor,this.setPageSize(this.pageSize)},mounted:function(){var t={};t.bookWidth=2*this.$store.state.pages.size.width,t.bookHeight=this.$store.state.pages.size.height,this.bookHolderElement=this.$el.querySelector("#book-holder"),this.lastZoomBlockID=null,this.flipAdapter=new Ye({bookSize:this.bookSize,state:this.$store,container:this.bookHolderElement,parentVm:this,contentCreator:this.contentCreator,initDomEvents:!this.isEmbed,isMobile:this.isMobile,version:this.version}),this.toggleBlockOnFlip(),this.flipAdapter.on("render:start",this.onRenderStart,this),this.flipAdapter.on("render:finish",this.onRenderFinish,this),this.flipAdapter.on("flip:finished",this.onFlipFinished,this),this.$root.$on("contextMenu:zoomIn",this.zoomIn),this.$root.$on("contextMenu:zoomOut",this.zoomOut),this.$root.$on("bottomMenu:zoomIn",this.zoomIn),this.$root.$on("bottomMenu:zoomOut",this.zoomOut),this.$root.$on("zoomPanel",this.changeZoom),this.$root.$on("zoomMove",this.zoomMove),this.$root.$on("wheel",this.onWheel),this.$root.$on("publication:mouseleave",this.refreshScroll),this.zoomFactor>1&&this.refreshScroll()},beforeDestroy:function(){this.$root.$off("contextMenu:zoomIn",this.zoomIn),this.$root.$off("contextMenu:zoomOut",this.zoomOut),this.$root.$off("bottomMenu:zoomIn",this.zoomIn),this.$root.$off("bottomMenu:zoomOut",this.zoomOut),this.$root.$off("zoomPanel",this.changeZoom),this.$root.$off("zoomMove",this.zoomMove),this.$root.$off("wheel",this.onWheel),this.$root.$off("publication:mouseleave",this.refreshScroll),this.flipAdapter.off("render:start",this.onRenderStart,this),this.flipAdapter.off("render:finish",this.onRenderFinish,this),this.flipAdapter.off("flip:finished",this.onFlipFinished,this),this.flipAdapter.destructor()},watch:{forceRerender:function(){this.forceRerender&&(this.$store.dispatch("pager/setForceRerender",{forceRerender:!1}),this.flipAdapter.resetBook())},pageSize:function(t){this.setPageSize(t)},zoomFactor:function(t,e){var i=this;this.toggleBlockOnFlip();var s={width:this.pageSize.width,height:this.pageSize.height};if(s.width=s.width*t,s.height=s.height*t,s.zoomFactor=t,this.$store.dispatch("pages/changePageSize",s),t>1&&1===e){var o=this.$store.getters["pager/currentPages"].some((function(t){return i.$store.getters["pages/pageProp"](t,"textBlocks")}),this);this.selectTextEnabled&&o&&!this.$store.state.pager.isMoveWatcherActive&&this.showSelectTextTip()}},zoomPanel:function(){this.toggleBlockOnFlip()},status:function(t){"ready"!==t?(this.$store.dispatch("pager/freeze",{target:"flip-book-zoom"}),this.$store.dispatch("workspace/setAnimationProgress",{animationType:this.scaleFactor>1&&1===this.zoomFactor?"initialZoom":"zoomNotInitial"})):(this.$store.dispatch("pager/unfreeze",{target:"flip-book-zoom"}),this.$store.dispatch("workspace/unsetAnimationProgress")),this.toggleBlockOnFlip(),this.refreshScroll(),this.$store.dispatch("workspace/setStatus",t)},bookSize:function(t){this.flipAdapter.resizeBook(t)},singleMode:function(t){this.zoomOut(!0),this.flipAdapter.setSingleMode(t)},currentPages:function(t,e){var i=this;if(t.mode===e.mode||t.zoomMode===e.zoomMode)if(t.isEqualState(e))t.zoomMode?this.zoomIn():this.zoomOut(!1);else{var s=function(t,e,s){t.mode===e.mode&&i.$store.dispatch("sound/playFlipSound",{hardcover:e.hardcover||t.hardcover});var o=i.$store.getters["pager/getDeltaTurns"](e,t);if(1===Math.abs(o)){var r=o>0?"toLeft":"toRight",n=o>0?!t.rightPage||t.isLastSpread:!t.leftPage||t.isFirstSpread;"flipComponent"!==t.target&&"orientation"!==t.target&&n&&i.$store.dispatch("pager/setForceFlip",{forceFlip:!0}),i.flipAdapter.updateState(r,t,s)}else Math.abs(o)>1&&i.flipAdapter.updateState("toPage",t,s)};if(1!==this.zoomFactor){this.overriddenPagerState=e,this.zoomOut(!1);var o=this.$store.getters["pager/flipState"];this.$once("transition:end",(function(){i.overriddenPagerState=null,setTimeout(s.bind(i,t,e,o),0)}))}else{var r=this.$store.getters["pager/flipState"];setTimeout(s.bind(this,t,e,r),0)}}},isWorkspaceFrozen:function(t){t?this.flipAdapter.block(!1):this.flipAdapter.unblock()},workspaceSize:function(){var t;if(1!==this.zoomFactor){var e;if(this.isInitialZoom)e={x:this.isRTLBook?this.bookHolderSize.width:0,y:0};else e={x:this.bookHolderSize.width>this.containerSize.width?-this.holderScrollX+this.containerSize.width/2:this.bookHolderSize.width/2,y:this.bookHolderSize.height>this.containerSize.height?-this.holderScrollY+this.containerSize.height/2:this.bookHolderSize.height/2};var i={x:e.x-this.bookHolderSize.left,y:e.y-this.bookHolderSize.top};this.scaleFactor=1;var s=yo(this.containerSize,this.bookHolderSize,this.scaleFactor,i);s=wo(s,this.containerSize),this.fixBounds(s),this.holderScrollLeft=s.left,this.holderScrollTop=s.top,null===(t=this.scrollComponent)||void 0===t||t.refresh(),this.isInitialZoom&&this.$store.dispatch("workspace/clearInitialZoom")}},isRTLBook:function(t){this.flipAdapter.setRtl(t)},isHardcover:function(t){this.zoomOut(!0),this.flipAdapter.setHardcover(t),this.$root.$emit("forceBookResize")},hardcoverColor:function(t){this.flipAdapter.setHardcoverColor(t)},hasThickness:function(t){this.flipAdapter.setThickness(t)},isOnlyRightPage:function(){var t=this.getVisiblePages();t!==this.visiblePages&&(this.visiblePages=t)},isOnlyLeftPage:function(){var t=this.getVisiblePages();t!==this.visiblePages&&(this.visiblePages=t)},dragActive:function(t){t?this.$refs.bookHolder.$el.classList.remove("nodrag"):this.$refs.bookHolder.$el.classList.add("nodrag")},isMini:function(){this.zoomOut(!0)},workspaceBookSize:function(){this.zoomOut(!0)},orientationChanged:function(t,e){e&&this.isMobile&&this.zoomOut(!0)}},computed:{isFirstSpread:function(){return this.$store.getters["pager/isFirstSpread"]},isLastSpread:function(){return this.$store.getters["pager/isLastSpread"]},isOuterHardcover:function(){return this.isHardcover&&(this.isFirstSpread||this.isLastSpread)},bookSize:function(){var t,e=this.$store.state;return t=e.book.rightToLeft?"left"===this.visiblePages?-e.pages.size.width:0:this.singleMode||"right"===this.visiblePages?-e.pages.size.width:0,{width:2*this.$store.state.pages.size.width,height:this.$store.state.pages.size.height,top:this.containerSize.top+(this.containerSize.height-e.pages.size.height)/2,left:t}},isOnlyRightPage:function(){var t,e=null!==(t=this.overriddenPagerState)&&void 0!==t?t:this.$store.getters["pager/state"];return e.spreadMode&&null===e.leftPage},isOnlyLeftPage:function(){var t,e=null!==(t=this.overriddenPagerState)&&void 0!==t?t:this.$store.getters["pager/state"];return e.spreadMode&&null===e.rightPage},isOnlyPage:function(){return 1===this.$store.getters["pages/pagesCount"]},bookHolderSize:function(){var t,e,i="both"!==this.visiblePages,s=this.$store.getters["pages/size"],o=this.singleMode,r=this.isHardcover?1.03:1,n=this.containerSize.width,a=this.containerSize.height,h=this.holderScrollLeft,l=this.holderScrollTop,c=this.stripesWidth||0,d=24,u=i||o?s.width:2*s.width,p=s.height;return 1===this.zoomFactor?(t=(n-u)/2,e=(a-p)/2):(t=h,e=l),this.$store.dispatch("workspace/setHolderSize",{width:u*r+2*c+2*d,height:p*r,left:1===this.zoomFactor?t:0,top:1===this.zoomFactor?e:0}),{width:Math.round(u),height:Math.round(p),top:Math.round(e),left:Math.round(t)}},bookHolderStyle:function(){var t=this.bookHolderSize,e=this.containerSize,i=this.zoomFactor,s=this.scaleOrigin,o=this.holderScrollLeft,r=this.holderScrollTop,n=this.scaleFactor,a=this.status,h=this.fastAnimation,l=this.animationSpeed,c=e.height>=t.height?Math.round(t.top)+"px":"0",d=e.width>=t.width?Math.round(t.left)+"px":"0",u={width:t.width+"px",height:t.height+"px",top:1===i?t.top+"px":c,left:1===i?t.left+"px":d};if("animating"===a||"pinch"===a||"scale"===a){u.transformOrigin=s.x+"px "+s.y+"px";var p="translate("+(e.width=.9?t.square=!0:e>1.1?t.portrait=!0:t.landscape=!0),t.scaling="scale"===this.status,t["drag-active"]=this.dragging,t["single-page"]=this.pageCount<=2,t["single-mode"]=this.singleMode,t},pageCount:function(){return this.$store.getters["pages/pagesCount"]},currentPages:function(){var t=this.$store.getters["pager/state"],e=this.$store.getters["pages/isFirstPage"](t.currentPage),i=t.spreadMode&&!this.$store.state.pager.spread_rightPage,s=this.isHardcover&&(e||i);return(0,V.Z)(t,{hardcover:s})},singleMode:function(){return this.$store.state.pager.singleMode},forceRerender:function(){return this.$store.state.pager.forceRerender},holderOriginalWidth:function(){return"both"!==this.visiblePages||this.singleMode?this.pageSize.width:2*this.pageSize.width},isWorkspaceFrozen:function(){return this.$store.state.workspace.freezed},frozenBy:function(){return this.$store.state.workspace.frozenBy?this.$store.state.workspace.frozenBy:null},zoomPanel:function(){return this.$store.state.workspace.zoomPanel},wheelScroll:function(){return this.$store.state.workspace.wheelScroll},workspaceSize:function(){return this.$store.state.workspace.containerSize},workspaceBookSize:function(){return this.$store.state.workspace.bookSize},orientationChanged:function(){return this.$store.getters["workspace/orientation"]},minZoom:function(){var t=this.isHardcover&&(this.isFirstPage||this.isLastPage)?1.03:1,e=this.singleMode?1:2;return Math.min(this.$store.state.workspace.containerSize.height/(this.$store.state.pages.size.height*t/this.$store.state.pages.size.zoomFactor),this.$store.state.workspace.containerSize.width/(this.$store.state.pages.size.width*t*e/this.$store.state.pages.size.zoomFactor))},maxZoom:function(){return this.$store.state.workspace.maxZoom},isInitialZoom:function(){return this.$store.state.workspace.initialZoom},animationSpeed:function(){return this.scaleFactor<1?400:600},isMini:function(){return this.$store.state.workspace.mini},isEmbed:function(){return this.$store.state.workspace.isEmbed},version:function(){return this.$store.getters["info/version"]},isMobile:function(){return this.$store.getters["workspace/isMobile"]},isFirefox:function(){return!0===this.$store.state.workspace.userAgentInfo.browser.firefox},isIE:function(){return!0===this.$store.state.workspace.userAgentInfo.browser.msie},isSafari:function(){return!!this.$store.state.workspace.userAgentInfo.browser.safari},isMac:function(){return!0===this.$store.state.workspace.userAgentInfo.os.mac},isRTLBook:function(){return this.$store.state.book.rightToLeft},isLocaleRtl:function(){return this.$store.getters["i18n/isLocaleRtl"]},isHardcover:function(){return this.$store.getters["book/hasHardcover"]},hardcoverColor:function(){return this.$store.state.book.hardcoverColor},hasThickness:function(){return this.$store.state.book.thickness},isFirstPage:function(){var t=this.$store.getters["pager/isFirstSpread"],e=this.$store.getters["pager/isLastSpread"];return this.isRTLBook?e:t},isLastPage:function(){var t=this.$store.getters["pager/isLastSpread"],e=this.$store.getters["pager/isFirstSpread"];return this.isRTLBook?e:t},isSecondPage:function(){var t=this.$store.getters["pager/prevPageId"];return this.$store.getters["pages/isFirstPage"](t)},isSecondToLastPage:function(){var t=this.$store.getters["pager/nextPageId"];return this.$store.getters["pages/isLastPage"](t)},isLightboxShown:function(){return this.$store.getters["lightbox/isShown"]},showBookButtons:function(){return!this.isLightboxShown&&1===this.zoomFactor&&1===this.scaleFactor&&"html"===this.version},showLeftButtons:function(){var t=this.showBookButtons&&!this.isFirstPage&&!(this.hideLeftArrow&&(this.isRTLBook?this.isSecondToLastPage:this.isSecondPage));return t||this.switchFocus("left","right"),t},showRightButtons:function(){var t=this.showBookButtons&&!this.isLastPage&&!(this.hideRightArrow&&(this.isRTLBook?this.isSecondPage:this.isSecondToLastPage));return t||this.switchFocus("right","left"),t},notesEnabled:function(){return this.$store.state.workspace.components.notes&&!this.isMini},showRightAddNote:function(){return(this.showRightButtons||this.hideRightArrow)&&(!this.isLocaleRtl||this.isFirstPage)},showOnlyAddNote:function(){return this.showBookButtons&&this.notesEnabled&&this.isOnlyPage},addNoteTitleText:function(){return this.$t("NotesToolWindow.ADD_NOTE")},leftArrowTitle:function(){return this.isRTLBook?this.$t("NavigationPanel.NEXT_PAGE_TIP"):this.$t("NavigationPanel.PREV_PAGE_TIP")},rightArrowTitle:function(){return this.isRTLBook?this.$t("NavigationPanel.PREV_PAGE_TIP"):this.$t("NavigationPanel.NEXT_PAGE_TIP")},leftMostArrowTitle:function(){return this.isRTLBook?this.$t("NavigationPanel.LAST_PAGE_TIP"):this.$t("NavigationPanel.FIRST_PAGE_TIP")},rightMostArrowTitle:function(){return this.isRTLBook?this.$t("NavigationPanel.FIRST_PAGE_TIP"):this.$t("NavigationPanel.LAST_PAGE_TIP")},bookState:function(){return this.flipAdapter},selectTextEnabled:function(){return!this.isMobile&&!this.isIE&&this.$store.state.workspace.components.textSelection},arrowAttract:function(){var t=this.$store.getters["workspace/callToNavigation"];return"arrow"===t.type&&t.side},bookEventHandlers:function(){return this.isEmbed?null:{pinchstart:this.onPinchStart,pinchmove:this.onPinchMove,pinchend:this.onPinchFinish,pinchcancel:this.onPinchFinish}},bookHolderEventHandlers:function(){var t=this.isEmbed?{}:{doubletap:this.zoomByTap.bind(this,"tap")};return t.tap=this.isHardcover?this.clickOnCover:function(){},t}},methods:{fixBounds:function(t){if(this.isOuterHardcover){var e=this.scaleFactor*this.zoomFactor;if(e>1||e<.95){var i=this.isFirstSpread&&!this.isRTLBook||this.isLastSpread&&this.isRTLBook&&!this.singleMode,s=this.isLastSpread&&!this.isRTLBook&&!this.singleMode||this.isFirstSpread&&this.isRTLBook,o=this.$store.state.pages.size.width,r=Math.round(.03*o/this.zoomFactor*e/2);i?t.left=t.left-r:s&&(t.left=t.left+r)}}},setPageSize:function(t){var e={width:t.width*this.zoomFactor,height:t.height*this.zoomFactor,zoomFactor:this.zoomFactor};this.$store.dispatch("pages/changePageSize",e)},clickOnCover:function(t){for(var e=(0,l.iZ)(t.target),i=0,s=e.length;i1||this.scaleFactor>1)return;this.$store.state.notes.opened&&this.$store.dispatch("notes/setOpenedId",{id:null}),t.deltaY>0?this.$store.dispatch("pager/goForward",{target:"wheel"}):t.deltaY<0&&this.$store.dispatch("pager/goBackward",{target:"wheel"})}this.lastWheelTime=Date.now()}},zoomMove:function(t){if(t&&t.direction)if("ready"===this.status){var e;switch(t.direction){case"left":case"right":e=this.getScrollAmount(t,this.scrollComponent.x,0,this.containerSize,this.bookHolderSize),this.scrollComponent.scrollBy(e,0);break;case"up":case"down":e=this.getScrollAmount(t,0,this.scrollComponent.y,this.containerSize,this.bookHolderSize),this.scrollComponent.scrollBy(0,e);break;case"drag":this.dragActive=t.active,this.initScrollComponent(this.dragActive)}this.scrollComponent&&(this.holderScrollX=this.scrollComponent.x,this.holderScrollY=this.scrollComponent.y,this.$store.dispatch("text/setHolderScroll",{x:this.holderScrollX,y:this.holderScrollY}))}else"drag"===t.direction&&(this.dragActive=t.active)},getVisiblePages:function(){return this.isOnlyRightPage?"right":this.isOnlyLeftPage?"left":"both"},toggleBlockOnFlip:function(){var t=this;1!==this.zoomFactor||this.zoomPanel||"ready"!==this.status?this.flipAdapter.block(!0):setTimeout((function(){t.flipAdapter.unblock()}),20)},refreshScroll:function(){var t=this;this.cancelDragging(),this.$nextTick((function(){t.zoomFactor>1&&"ready"===t.status?t.initScrollComponent(t.dragActive):t.scrollComponent&&(t.holderScrollX=0,t.holderScrollY=0,t.$store.dispatch("text/setHolderScroll",{x:t.holderScrollX,y:t.holderScrollY}),t.scrollComponent.destroy(),delete t.scrollComponent)}))},onScrollEnd:function(){this.cancelDragging(),this.holderScrollX=this.scrollComponent.x,this.holderScrollY=this.scrollComponent.y,this.$store.dispatch("text/setHolderScroll",{x:this.holderScrollX,y:this.holderScrollY})},onScrollBegin:function(){this.holderScrollX=this.scrollComponent.x,this.holderScrollY=this.scrollComponent.y,this.$store.dispatch("text/setHolderScroll",{x:this.holderScrollX,y:this.holderScrollY})},setDragging:function(){1!==this.zoomFactor&&(this.dragging=!0)},cancelDragging:function(){this.dragging=!1},zoomOut:function(t,e){if(1!==this.zoomFactor){if(this.lastZoomFactor=Math.max(this.zoomFactor,this.defaultZoomFactor),t)return this.status="calculating",this.zoomFactor=1,this.scaleFactor=1,this.refreshScroll(),this.holderScrollLeft=0,this.holderScrollTop=0,this.status="ready",this.$root.$emit("unzoomed"),void(this.fastAnimation=!1);this.zoomByTap(e,{center:{x:0,y:0}})}},zoomIn:function(t){this.zoomFactor>1||this.zoomByTap(t)},zoomByTap:function(t,e){if(t&&this.$store.dispatch("pager/setLastTarget",t),!(this.zoomTimeout>Date.now()||this.isWorkspaceFrozen||"ready"!==this.status||"pending"!==this.$store.state.pager.flipState||this.isMini)){e||(e={center:{x:this.isRTLBook?this.workspaceSize.width:0,y:0},target:null});var i=["next-button","previous-button","icon-book-next","icon-book-prev","reflex-container"];if(!e.target||!(i.indexOf(e.target.className)>=0||e.target.classList.contains("stripe")||e.target.classList.contains("page-stripe")||(0,W.HD)(e.target.className)&&e.target.className.indexOf("stripe-block")>=0||"0-0"===e.target.dataset.page||"textarea"===e.target.tagName.toLowerCase())){this.status="calculating";var s,o=!1,r=this.getTappedZoomBlock(e);if(this.isMobile&&r.id){o=this.lastZoomBlockID!==r.id;var n=this.bookHolderElement.getBoundingClientRect();s=this.getBlockRect(r.rect,n)}if(this.lastZoomBlockID=o?r.id:null,o){var a=1.5,h=40,l=2,c=this.containerSize.width-h*l,d=1*(.96*c/s.width).toFixed(2),u=this.bookHolderSize.width-s.width-s.left;(s.left*d1),this.scaleFactor>1?this.$root.$emit("zoomed"):(this.scaleFactor<1||this.zoomPanel&&1===this.scaleFactor)&&this.$root.$emit("unzoomed"),this.$store.dispatch("workspace/setHighlightTimeout",Date.now()+1e3)}}},onPinchStart:function(t){this.isWorkspaceFrozen||"ready"!==this.status||"inProgress"===this.$store.state.pager.flipState||this.isMini||(this.$store.dispatch("pager/setLastTarget","pinch-zoom"),this.minScale=this.holderOriginalWidth/this.bookHolderSize.width,this.scaleFactor=1,this.pinchCenter=t.center,this.isZoomed?(this.updateHolderScroll(!1),this.scaleOrigin={x:t.center.x-this.holderScrollLeft,y:t.center.y-this.holderScrollTop}):this.scaleOrigin={x:t.center.x-this.bookHolderSize.left,y:t.center.y-this.bookHolderSize.top},this.status="pinch")},onPinchMove:function(t){if("pinch"===this.status){var e=this.minScale1?this.$root.$emit("zoomed"):this.scaleFactor<1&&this.$root.$emit("unzoomed")}},setZoom:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0;if(!this.isWorkspaceFrozen&&"ready"===this.status){this.scaleFactor=t/this.zoomFactor,this.updateHolderScroll(!1);var s=i||{x:this.workspaceSize.width/2,y:this.workspaceSize.height/2},o={x:s.x-this.bookHolderSize.left,y:s.y-this.bookHolderSize.top},r=So(this.bookHolderSize,this.scaleFactor,o);r=wo(r,this.containerSize),this.fixBounds(r),this.scaleOrigin=ko(this.bookHolderSize,r,this.scaleFactor),this.newBounds=r,this.flipAdapter.setZoom(this.scaleFactor*this.zoomFactor>1),this.fastAnimation=e,this.status="animating",this.refreshScroll()}},setScaleStart:function(){this.minScale=Math.max(this.minZoom/this.zoomFactor,this.holderOriginalWidth/this.bookHolderSize.width),this.maxScale=this.maxZoom/this.zoomFactor,this.scaleFactor=1,this.updateHolderScroll(!1),this.scaleOrigin={x:this.workspaceSize.width/2-this.holderScrollLeft,y:this.workspaceSize.height/2-this.holderScrollTop},this.status="scale"},setScale:function(t){if("scale"===this.status){var e=this.minScale+(this.maxScale-this.minScale)*t,i=So(this.bookHolderSize,e,{x:this.workspaceSize.width/2-this.holderScrollLeft,y:this.workspaceSize.height/2-this.holderScrollTop});i=wo(i,this.containerSize),this.fixBounds(i),this.scaleOrigin=ko(this.bookHolderSize,i,e);var s=Math.min(this.maxScale,Math.max(this.minScale,e));this.scaleFactor=this.checkScaleFactorForZoom(s,this.zoomFactor,this.maxZoom)}},setScaleFinish:function(){if("scale"===this.status){var t=So(this.bookHolderSize,this.scaleFactor,this.scaleOrigin);t=wo(t,this.containerSize),this.fixBounds(t),this.zoomFactor=1*(this.zoomFactor*this.scaleFactor).toFixed(2),this.scaleFactor=1,this.holderScrollLeft=1!==this.zoomFactor?t.left:0,this.holderScrollTop=1!==this.zoomFactor?t.top:0,this.status="ready"}},changeZoom:function(t){switch(this.$store.dispatch("pager/setLastTarget","change-zoom"),t.action){case"setZoom":this.setZoom(t.zoomFactor,t.fast);break;case"startScale":this.setScaleStart();break;case"changeScale":this.setScale(t.scalePosition);break;case"endScale":this.setScaleFinish();break;case"zoomIn":this.zoomByTap();break;case"zoomOut":this.dragActive=!0,this.zoomOut()}},transitionEnd:function(t){t&&"transform"===t.propertyName&&t.target===this.bookHolderElement&&"animating"===this.status&&(this.fastAnimation=!1,this.lastZoomFactor=Math.max(this.zoomFactor,this.defaultZoomFactor),this.zoomFactor=1*(this.zoomFactor*this.scaleFactor).toFixed(2),this.scaleFactor=1,this.holderScrollLeft=1===this.zoomFactor?0:this.newBounds.left,this.holderScrollTop=1===this.zoomFactor?0:this.newBounds.top,this.status="ready",this.$emit("transition:end"))},updateHolderScroll:function(t){t&&1===this.zoomFactor||(this.containerSize.widthDate.now()||this.$store.state.pager.freezed||(this.zoomTimeout=Date.now()+500,setTimeout((function(){t.movePagerRight({target:"nav-arrow-tap"})}),0))},leftPage:function(){var t=this;this.addNoteTimeout>Date.now()||this.$store.state.pager.freezed||(this.zoomTimeout=Date.now()+500,setTimeout((function(){t.movePagerLeft({target:"nav-arrow-tap"})}),0))},rightmostPage:function(){var t=this;this.zoomTimeout=Date.now()+500,setTimeout((function(){t.movePagerRightmost({navTarget:!0})}),0)},leftmostPage:function(){var t=this;this.zoomTimeout=Date.now()+500,setTimeout((function(){t.movePagerLeftmost({navTarget:!0})}),0)},arrowHover:function(t,e){e?this.$el.classList.add(t+"-highlighted"):this.$el.classList.remove(t+"-highlighted")},btnAddNote:function(t){var e,i,s;this.zoomTimeout=Date.now()+500,this.addNoteTimeout=Date.now()+500,this.currentPages.singleMode?(e=this.currentPages.currentPage,i=this.currentPages.widePageSecondHalf,s=this.isRTLBook&&this.$store.getters["pages/pageProp"](e,"wide")&&!i):(e="left"===t&&!this.isRTLBook||"right"===t&&this.isRTLBook?this.currentPages.leftPage:this.currentPages.rightPage,i="right"===t&&this.currentPages.wide),this.$store.dispatch("notes/addNote",{pageId:e,wideRight:i,wideOpposite:s,target:"flipBook"})},initScrollComponent:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];1!==this.zoomFactor&&(this.scrollComponent?(this.holderScrollX=this.scrollComponent.x,this.holderScrollY=this.scrollComponent.y,this.scrollComponent.off("beforeScrollStart",this.setDragging),this.scrollComponent.off("scrollCancel",this.cancelDragging),this.scrollComponent.off("scroll",this.onScrollBegin),this.scrollComponent.off("scrollEnd",this.onScrollEnd),this.scrollComponent.destroy(),delete this.scrollComponent):(this.holderScrollX=this.containerSize.widtht.length)&&(e=t.length);for(var i=0,s=new Array(e);i1&&this.refreshScroll()},beforeDestroy:function(){this.tween&&at().remove(this.tween),this.$root.$off("contextMenu:zoomIn",this.zoomIn),this.$root.$off("contextMenu:zoomOut",this.zoomOut),this.$root.$off("bottomMenu:zoomIn",this.zoomIn),this.$root.$off("bottomMenu:zoomOut",this.zoomOut),this.$root.$off("zoomPanel",this.changeZoom),this.$root.$off("zoomMove",this.zoomMove),this.$root.$off("wheel",this.onWheel),this.$root.$off("nav:goRight",this.goFastRight),this.$root.$off("nav:goLeft",this.goFastLeft),this.$root.$off("publication:mouseleave",this.onMouseLeave)},watch:{pageSize:function(t){var e={width:t.width*this.zoomFactor,height:t.height*this.zoomFactor,zoomFactor:this.zoomFactor};this.$store.dispatch("pages/changePageSize",e),this.slidesCacheUpdate()},isSingleMode:function(){this.slidesCacheUpdate()},isSlideMode:function(){this.slidesCacheUpdate()},isRtl:function(){this.slidesCacheUpdate()},zoomFactor:function(t,e){var i=this,s={width:this.pageSize.width*t,height:this.pageSize.height*t,zoomFactor:t};if(this.$store.dispatch("pages/changePageSize",s),t>1&&1===e){var o=Mo(this.slidesCache.current.map((function(t){return t.id}))).filter((function(t){return null!==t})).some((function(t){return i.$store.getters["pages/pageProp"](t,"textBlocks")}),this);this.selectTextEnabled&&o&&this.showSelectTextTip()}this.refreshScroll()},status:function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){"sliding"===t?this.$store.dispatch("pager/isPageChanging",!0):this.$store.state.pager.isMoveWatcherActive||this.$store.dispatch("pager/isPageChanging",!1),this.refreshScroll(),this.$store.dispatch("workspace/setStatus",t);var e=["sliding","pan"].indexOf(status)>=0?"inProgress":"pending";this.$store.dispatch("pager/setFlipState",{newState:e}),"ready"!==t||this.isFastSliding?this.$store.dispatch("workspace/setAnimationProgress",{animationType:"pagerMove"}):this.$store.dispatch("workspace/unsetAnimationProgress"),this.updateNoteIcon()})),slides:function(t,e){var i=this;if(this.scrollLock)this.scrollLock=!1;else{var s=e.current[0].state,o=t.current[0].state;if(s.mode===o.mode){this.isSlideMode||this.isSingleMode||this.updateHorizontalScale(t.current,e.current);var r=this.$store.getters["pager/getDeltaTurns"](s,o),n=Math.abs(r)>1;o.zoomMode===s.zoomMode||r?!this.isRtl&&r>0||this.isRtl&&r<0?(n&&this.replaceCachedSlide("right",t.current),this.isZoomed?(this.pendingSlide="right",this.zoomOut()):this.$nextTick((function(){i.animateSlides("right",!1,!0)}))):(!this.isRtl&&r<0||this.isRtl&&r>0)&&(n&&this.replaceCachedSlide("left",t.current),this.isZoomed?(this.pendingSlide="left",this.zoomOut()):this.$nextTick((function(){i.animateSlides("left",!1,!0)}))):o.zoomMode?this.zoomIn():this.zoomOut()}}},workspaceSize:function(t,e){if(this.isMobile&&e.width&&e.height&&(t.width!==e.width||t.height!==e.height))this.zoomOut(!0);else if(1!==this.zoomFactor){var i,s,o={x:(i=this.isInitialZoom?{x:this.isRTLBook?this.spreadSizes.current.width:0,y:0}:{x:t.width/2,y:t.height/2}).x-this.spreadSizes.current.left,y:i.y-this.spreadSizes.current.top};this.scaleFactor=1,s=wo(s=this.isInitialZoom?yo(this.containerSize,this.spreadSizes.current,this.scaleFactor,o):So(this.spreadSizes.current,this.scaleFactor,o),this.containerSize),this.scaleOrigin=ko(this.spreadSizes.current,s,this.scaleFactor),this.slideScrollLeft=s.left,this.slideScrollTop=s.top,this.isInitialZoom&&(this.$store.dispatch("workspace/clearInitialZoom"),this.refreshScroll())}},containerSize:function(){1===this.zoomFactor||this.isMobile||this.refreshScroll()},pageSizes:function(t){var e=this,i=this.slidesCache;Object.keys(i).forEach((function(s){for(var o=0;o1&&"current"!==s||e.isSingleMode&&l)return;e.$store.dispatch("pages/setCurrentSize",{pageID:r,value:{width:a,height:h}})}}))},spreadSizes:function(t){this.$store.dispatch("workspace/setHolderSize",t.current),this.updateNoteIcon()},isLocaleRtl:function(){this.updateNoteIcon()},notesEnabled:function(){this.updateNoteIcon()},dragActive:function(t){t?this.$refs.holder.$el.classList.remove("nodrag"):this.$refs.holder.$el.classList.add("nodrag")},isMini:function(){this.zoomOut(!0),this.updateNoteIcon()},orientationChanged:function(t,e){e&&this.zoomOut(!0)}},computed:{isRTLBook:function(){return this.$store.state.book.rightToLeft},isFirstPage:function(){return this.$store.getters["pager/isFirstSpread"]},isLastPage:function(){return this.$store.getters["pager/isLastSpread"]},isRightmostPage:function(){return this.isFirstPage&&this.isRtl||this.isLastPage&&!this.isRtl},isLeftmostPage:function(){return this.isLastPage&&this.isRtl||this.isFirstPage&&!this.isRtl},isRtl:function(){return this.$store.state.book.rightToLeft},isLocaleRtl:function(){return this.$store.getters["i18n/isLocaleRtl"]},isMobile:function(){return this.$store.getters["workspace/isMobile"]},isSingleMode:function(){return this.$store.state.pager.singleMode},isSpreadMode:function(){return this.$store.state.pager.spreadMode},isSlideMode:function(){return this.$store.state.pager.slideMode},isContentCropMode:function(){return this.isSlideMode&&this.$store.state.book.contentCrop},isZoomed:function(){return 1!==this.zoomFactor},isInitialZoom:function(){return this.$store.state.workspace.initialZoom},zoomPanel:function(){return this.$store.state.workspace.zoomPanel},slides:function(){var t=this,e={},i=this.isRtl?"right":"left",s=this.isRtl?"left":"right",o=this.$store.getters["pager/state"],r=this.$store.getters["pager/nextState"],n=this.$store.getters["pager/prevState"],a=this.$store.getters["pager/secondNextState"],h=this.$store.getters["pager/secondPrevState"],l=this.isRtl?r:n,c=this.isRtl?n:r,d=this.isRtl?a:h,u=this.isRtl?h:a,p=function(i,s,r,n,a,h){if(h||(e[i]=[]),s){var l=t.$store.getters["pages/pageIndexById"](s);n&&r===(t.isRtl?"left":"right")&&l++;var c=t.$store.getters["pages/pageCaptionByIndex"](l),d=t.$store.getters["pages/pageProp"](s,"backgroundColor"),u=t.isSlideMode&&n?"page-wide":"page",p={backgroundColor:d};t.isFastSliding&&(p["font-size"]=Math.min(Math.floor(t.containerSize.height/20),20)+"px"),e[i].push({id:s,side:r,caption:c,icon:u,style:p,wide:n,position:a,state:o})}};if(o.singleMode)p("current",o.currentPage,o.pageSide,o.wide,""),l&&p("left",l.currentPage,l.pageSide,l.wide,""),c&&p("right",c.currentPage,c.pageSide,c.wide,""),d&&p("second-left",d.currentPage,d.pageSide,d.wide,""),u&&p("second-right",u.currentPage,u.pageSide,u.wide,"");else if(o.slideMode){if(e.current=[],o.currentPage){var g=o.wide?"both":i;p("current",o.currentPage,g,o.wide,i)}if(l){var f=l.wide?"both":i;p("left",l.currentPage,f,l.wide,i)}if(c){var m=c.wide?"both":i;p("right",c.currentPage,m,c.wide,i)}if(d){var v=d.wide?"both":i;p("second-left",d.currentPage,v,d.wide,i)}if(u){var b=u.wide?"both":i;p("second-right",u.currentPage,b,u.wide,i)}}else if(o.spreadMode){var S=function(e,o){var r=t.getPageProp(o.leftPage,"wide"),n=r?"both":i;if(p(e,o.leftPage,n,r,i),o.rightPage&&o.leftPage!==o.rightPage){var a=r?"both":s;p(e,o.rightPage,a,r,s,!0)}};S("current",o),l&&S("left",l),c&&S("right",c),d&&S("second-left",d),u&&S("second-right",u)}return e},fitPageSize:function(){return(0,Ce.Tj)(this.pageSize,this.containerSize)},fitDoublePageSize:function(){return(0,Ce.Tj)({width:2*this.pageSize.width,height:this.pageSize.height},this.containerSize)},fitSinglePageSize:function(){return{width:this.fitDoublePageSize.width/2,height:this.fitDoublePageSize.height,top:this.fitDoublePageSize.top,left:(this.containerSize.width-this.fitDoublePageSize.width/2)/2}},pageSizes:function(){var t={},e=this.fitPageSize,i=this.fitDoublePageSize,s=this.fitSinglePageSize;for(var o in this.slidesCache){if(!this.slidesCache.hasOwnProperty(o))return;var r="current"===o?this.zoomFactor:1;if(this.isSingleMode)t[o]={width:Math.round(e.width*r),height:Math.round(e.height*r)};else if(this.isContentCropMode){var n=this.getContentSize(this.slidesCache[o][0].id);t[o]={width:Math.round(n.width*r),height:Math.round(n.height*r),left:n.left,top:n.top}}else{var a=this.slidesCache[o][0].wide;t[o]={width:Math.round((a?i.width:s.width)*r),height:Math.round((a?i.height:s.height)*r)}}}return t},spreadSizes:function(){var t={};for(var e in this.slidesCache){if(!this.slidesCache.hasOwnProperty(e))return;if(t[e]={width:this.pageSizes[e].width*this.slidesCache[e].length,height:this.pageSizes[e].height},this.isZoomed&&"current"===e)t[e].left=this.slideScrollLeft,t[e].top=this.slideScrollTop;else if(this.isSingleMode)t[e].left=this.fitPageSize.left,t[e].top=this.fitPageSize.top;else if(this.isContentCropMode)t[e].left=this.pageSizes[e].left,t[e].top=this.pageSizes[e].top;else{var i=2===this.slidesCache[e].length||this.slidesCache[e][0].wide;t[e].left=i?this.fitDoublePageSize.left:this.fitSinglePageSize.left,t[e].top=i?this.fitDoublePageSize.top:this.fitSinglePageSize.top}}return t},holderClasses:function(){return{zoomed:this.isZoomed,"drag-active":this.dragging,single:this.isSingleMode}},spreadStyles:function(){var t={};return t.current={width:this.spreadSizes.current.width+"px",height:this.spreadSizes.current.height+"px",left:this.isZoomed?this.containerSize.width>=this.spreadSizes.current.width?Math.round((this.containerSize.width-this.spreadSizes.current.width)/2)+"px":0:Math.round(this.spreadSizes.current.left)+"px",top:this.isZoomed?this.containerSize.height>=this.spreadSizes.current.height?Math.round((this.containerSize.height-this.spreadSizes.current.height)/2)+"px":0:Math.round(this.spreadSizes.current.top)+"px",transformOrigin:Math.round(this.scaleOrigin.x)+"px "+Math.round(this.scaleOrigin.y)+"px",transition:"animating"===this.status?["-webkit-transform "+(this.fastAnimation?1:this.zoomAnimationSpeed)+"ms cubic-bezier(0.215, 0.61, 0.355, 1)","transform "+(this.fastAnimation?1:this.zoomAnimationSpeed)+"ms cubic-bezier(0.215, 0.61, 0.355, 1)"]:["-webkit-transform 0ms","transform 0ms"]},"pinch"!==this.status&&"scale"!==this.status&&"animating"!==this.status?t.current.transform="":0!==this.slideScrollTop||0!==this.slideScrollLeft?t.current.transform="translate3d("+(this.containerSize.width1?this.$root.$emit("zoomed"):(this.scaleFactor<1||this.zoomPanel&&1===this.scaleFactor)&&this.$root.$emit("unzoomed")}},setZoom:function(t,e){if(!this.isWorkspaceFrozen&&"ready"===this.status){this.scaleFactor=t/this.zoomFactor,this.updateSlideScroll(!1);var i=e||{x:this.workspaceSize.width/2,y:this.workspaceSize.height/2},s={x:i.x-this.spreadSizes.current.left,y:i.y-this.spreadSizes.current.top},o=So(this.spreadSizes.current,this.scaleFactor,s);o=wo(o,this.containerSize),this.scaleOrigin=ko(this.spreadSizes.current,o,this.scaleFactor),this.newBounds=o,this.fastAnimation=!0,this.status="animating",this.refreshScroll()}},setScaleStart:function(){this.minScale=Math.min(this.containerSize.width/this.spreadSizes.current.width,this.containerSize.height/this.spreadSizes.current.height),this.maxScale=this.maxZoom/this.zoomFactor,this.scaleFactor=1,this.updateSlideScroll(!1),this.scaleOrigin={x:this.workspaceSize.width/2-this.slideScrollLeft,y:this.workspaceSize.height/2-this.slideScrollTop},this.status="scale"},setScale:function(t){if("scale"===this.status){var e=this.minScale+(this.maxScale-this.minScale)*t,i=So(this.spreadSizes.current,e,{x:this.workspaceSize.width/2-this.slideScrollLeft,y:this.workspaceSize.height/2-this.slideScrollTop});i=wo(i,this.containerSize),this.scaleOrigin=ko(this.spreadSizes.current,i,e);var s=Math.min(this.maxScale,Math.max(this.minScale,e));this.scaleFactor=this.checkScaleFactorForZoom(s,this.zoomFactor,this.maxZoom)}},setScaleFinish:function(){if("scale"===this.status){var t=So(this.spreadSizes.current,this.scaleFactor,this.scaleOrigin);t=wo(t,this.containerSize),this.zoomFactor=1*(this.zoomFactor*this.scaleFactor).toFixed(2),this.scaleFactor=1,this.slideScrollLeft=this.isZoomed?t.left:0,this.slideScrollTop=this.isZoomed?t.top:0,this.status="ready"}},onTransitionEnd:function(t){t&&"transform"===t.propertyName&&("animating"===this.status&&(this.fastAnimation=!1,this.lastZoomFactor=Math.max(this.zoomFactor,this.defaultZoomFactor),this.zoomFactor=1*(this.zoomFactor*this.scaleFactor).toFixed(2),this.slideScrollLeft=this.isZoomed?this.newBounds.left:0,this.slideScrollTop=this.isZoomed?this.newBounds.top:0,this.status="ready"),this.pendingSlide&&(this.updatePendingSlide(),this.animateSlides(this.pendingSlide,!1,!0),this.pendingSlide=null))},onPinchStart:function(t){this.isWorkspaceFrozen||"ready"!==this.status||this.isMini||(this.$store.dispatch("pager/setLastTarget","pinch-zoom"),this.minScale=Math.min(this.containerSize.width/this.spreadSizes.current.width,this.containerSize.height/this.spreadSizes.current.height),this.scaleFactor=1,this.pinchCenter=t.center,this.isZoomed?(this.updateSlideScroll(!1),this.scaleOrigin={x:t.center.x-this.slideScrollLeft,y:t.center.y-this.slideScrollTop}):this.scaleOrigin={x:t.center.x-this.spreadSizes.current.left,y:t.center.y-this.spreadSizes.current.top},this.status="pinch")},onPinchMove:function(t){if("pinch"===this.status){var e=this.minScale1?this.$root.$emit("zoomed"):this.scaleFactor<1&&this.$root.$emit("unzoomed")}},changeZoom:function(t){switch(this.$store.dispatch("pager/setLastTarget","change-zoom"),t.action){case"setZoom":this.setZoom(t.zoomFactor);break;case"startScale":this.setScaleStart();break;case"changeScale":this.setScale(t.scalePosition);break;case"endScale":this.setScaleFinish();break;case"zoomIn":this.onTap();break;case"zoomOut":this.zoomOut()}},onPanStart:function(t){var e;if(!(this.blockPan||this.isFastSliding||"ready"!==this.status||t.srcEvent&&(t.srcEvent.metaKey||t.srcEvent.ctrlKey)||null!=t&&null!==(e=t.target)&&void 0!==e&&null!==(e=e.classList)&&void 0!==e&&e.contains("note-article"))){var i=document.elementFromPoint(t.center.x-t.deltaX,t.center.y-t.deltaY);i&&"select-text-block"===i.getAttribute("data-set")||(this.status="pan",this.$root.$emit("turnStart"))}},onPanMove:function(t){var e,i=this;if(!(this.blockPan||this.isFastSliding||"pan"!==this.status||null!=t&&null!==(e=t.target)&&void 0!==e&&null!==(e=e.classList)&&void 0!==e&&e.contains("note-article"))){var s=1;(t.deltaX<0&&this.isRightmostPage||t.deltaX>0&&this.isLeftmostPage)&&(s=.3),window.requestAnimationFrame((function(){i.delta=t.deltaX*s}))}},onPanEnd:function(t){var e;if(!this.blockPan&&(this.isFastSliding||"pan"===this.status||"sliding"===this.status)&&(null==t||null===(e=t.target)||void 0===e||null===(e=e.classList)||void 0===e||!e.contains("note-article"))){var i,s=Math.abs(t.overallVelocityX).toPrecision(2),o=Math.abs(t.deltaX),r=null;t.deltaX>0&&!this.isLeftmostPage&&(o>this.maxDelta/3||s>.5)?(i="left",r="left"):t.deltaX<0&&!this.isRightmostPage&&(o>this.maxDelta/3||s>.5)?(i="right",r="right"):(i="center",r=t.deltaY>0?"down":t.deltaY<0?"up":null),("sliding"===this.status||this.isFastSliding)&&(this.checkFastSlide(i,!1),this.pendingFastSlide)||("left"===i&&!this.isLeftmostPage&&(o>this.maxDelta/3||s>.5)?this.animateSlides("left"):"right"===i&&!this.isRightmostPage&&(o>this.maxDelta/3||s>.5)?this.animateSlides("right"):"sliding"!==this.status&&this.animateSlides("center"),r&&this.$root.$emit("swipe",{direction:r}))}},zoomIn:function(t){this.zoomFactor>1||this.onTap(t)},zoomOut:function(t,e){if(1!==this.zoomFactor){if(this.lastZoomFactor=Math.max(this.zoomFactor,this.defaultZoomFactor),t)return this.status="calculating",this.zoomFactor=1,this.refreshScroll(),this.slideScrollLeft=0,this.slideScrollTop=0,this.status="ready",void this.$root.$emit("unzoomed");this.onTap(e,{center:{x:0,y:0}})}},goRight:function(){this.scrollLock=!0,this.movePagerRight({target:"slide-swipe"}),this.$root.$emit("render:finish")},goLeft:function(){this.scrollLock=!0,this.movePagerLeft({target:"slide-swipe"}),this.$root.$emit("render:finish")},goFastRight:function(){this.checkFastSlide("right")},goFastLeft:function(){this.checkFastSlide("left")},canSlideInDirection:function(t){return t&&("left"===t&&!this.isLeftmostPage||"right"===t&&!this.isRightmostPage)},checkFastSlide:function(t){var e,i,s=this,o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.canSlideInDirection(t)&&(this.isFastSliding&&(this.isSpreadFillerShown=!0),this.pendingFastSlide&&this.pendingFastSlide!==t&&(this.pendingFastSlide=null),"sliding"===this.status&&null!==(e=this.tween)&&void 0!==e&&e._isPlaying&&this.isPagerFrozen&&(this.isFastSliding=!0,o&&this.tween.stop()),!this.pendingFastSlide&&this.isFastSliding&&null!==(i=this.tween)&&void 0!==i&&i._isPlaying&&(this.tween._duration=200,this.pendingFastSlide=t),this.isFastSliding&&(clearTimeout(this.fastSlidingCancelTimeout),this.fastSlidingCancelTimeout=setTimeout((function(){s.isFastSliding=!1,s.isSpreadFillerShown=!1,s.$store.dispatch("workspace/unsetAnimationProgress")}),400)))},animateSlides:function(t){var e,i=this,s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r={x:this.delta};switch(t){case"left":e={x:this.maxDelta};break;case"right":e={x:-this.maxDelta};break;case"center":e={x:0}}o&&this.$root.$emit("turnStart"),this.status="sliding",this.$store.dispatch("pager/freeze",{target:"slide-book"}),this.tween=new(at().Tween)(r).to(e,s||this.isFastSliding?200:this.slideAnimationSpeed).easing(this.slideEasing).onUpdate((function(t){i.delta=t.x})).onComplete((function(){i.$root.$emit("turnStop"),i.$store.dispatch("pager/unfreeze",{target:"slide-book"}),o?i.$root.$emit("render:finish"):"left"===t?i.goLeft():"right"===t&&i.goRight(),i.slidesCacheUpdate(),i.status="ready","center"!==t&&i.$root.$emit("turned"),i.pendingFastSlide&&i.canSlideInDirection(i.pendingFastSlide)&&(i.animateSlides(i.pendingFastSlide),i.pendingFastSlide=null)})).onStop((function(){i.slidesCacheUpdate(),i.$store.dispatch("pager/unfreeze",{target:"slide-book"})})).start()},updateHorizontalScale:function(t,e){var i=0;(e[0].wide||2===e.length)&&i--,(t[0].wide||2===t.length)&&i++,this.horizontalScale=i>0?2:i<0?.5:1},convertToOutputSlides:function(t){var e=function(e){return{position:e,pages:t[e]||[]}};return[e("current")].concat([e("left")]).concat([e("right")]).concat([e("second-left")]).concat([e("second-right")]).filter((function(t){return t.pages.length>0}))},getSlidesWithAllPages:function(t,e){var i=[].concat.apply([],t.map((function(t){return t.pages}))),s=[].concat.apply([],e.map((function(t){return t.pages}))).filter((function(t){return!i.some((function(e){return e.id===t.id}))}));return t.forEach((function(t){t.pages=t.pages.filter((function(t){return!s.some((function(e){return t.id===e.id}))}))})),s.length>0&&s.forEach((function(e){var i={position:"hidden page_"+e.id,pages:[e]};t=t.concat([i])})),t.sort((function(t,e){return t.pages[0].id-e.pages[0].id}))},getNonHiddenSlides:function(t){return t.filter((function(t){return t.position.indexOf("hidden")<0}))},updateOutputSlides:function(){var t=this,e=this.convertToOutputSlides(this.slidesCache);this.outputSlidesCache=this.getSlidesWithAllPages(e,this.outputSlidesCache),this.$nextTick((function(){t.outputSlidesCache=t.getNonHiddenSlides(t.outputSlidesCache)}))},slidesCacheUpdate:function(){this.slidesCache=this.slides,this.delta=0,this.updateOutputSlides()},updatePendingSlide:function(){this.pendingSlide&&this.replaceCachedSlide(this.pendingSlide,this.slides.current)},replaceCachedSlide:function(t,e){this.slidesCache[t]=e,this.updateOutputSlides()},contentCreator:function(t){return _o["content-"+t.type]},refreshScroll:function(){var t=this;this.isInitialZoom||(this.cancelDragging(),this.$nextTick((function(){t.isZoomed&&"ready"===t.status?(t.initScrollComponent(t.dragActive),t.scrollComponent.refresh()):t.scrollComponent&&(t.slideScrollX=0,t.slideScrollY=0,t.$store.dispatch("text/setHolderScroll",{x:t.slideScrollX,y:t.slideScrollY}),t.scrollComponent.refresh(),t.scrollComponent.destroy(),delete t.scrollComponent)})))},initScrollComponent:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];1!==this.zoomFactor&&(this.scrollComponent?(this.slideScrollX=this.scrollComponent.x,this.slideScrollY=this.scrollComponent.y,this.scrollComponent.off("beforeScrollStart",this.setDragging),this.scrollComponent.off("scrollCancel",this.cancelDragging),this.scrollComponent.off("scroll",this.onScrollBegin),this.scrollComponent.off("scrollEnd",this.onScrollEnd),this.scrollComponent.destroy(),delete this.scrollComponent):(this.slideScrollX=this.containerSize.width1||this.scaleFactor>1)return;this.$store.state.notes.opened&&this.$store.dispatch("notes/setOpenedId",{id:null}),t.deltaY>0&&(this.$store.getters["pager/nextPageId"]||0===this.$store.getters["pager/nextPageId"])?(this.checkFastSlide(this.isRTLBook?"left":"right"),this.$store.dispatch("pager/goForward",{target:"wheel"})):t.deltaY<0&&(this.$store.getters["pager/prevPageId"]||0===this.$store.getters["pager/prevPageId"])&&(this.checkFastSlide(this.isRTLBook?"right":"left"),this.$store.dispatch("pager/goBackward",{target:"wheel"}))}this.lastWheelTime=Date.now()}},updateSlideScroll:function(t){t&&!this.isZoomed||(this.containerSize.width0&&e.push("outside")}else{e.push("right");var s=this.spreadSizes.current.left+this.spreadSizes.current.width;t.left=Math.min(s,this.containerSize.width-30)+"px",st.scale?e:t}))},containerClasses:function(){return{overlap:!!this.optimalRect.sizeOverride}},containerStyles:function(){if(!this.optimalRect.scale)return{display:"none"};var t={opacity:this.isReady?1:0,width:this.originalWidth*this.optimalRect.scale+"px",height:this.originalHeight*this.optimalRect.scale+"px"};return t.top=(0,W.o8)(this.optimalRect.top)?null:this.optimalRect.top+"px",t.bottom=(0,W.o8)(this.optimalRect.bottom)?null:this.optimalRect.bottom+"px",t.left=(0,W.o8)(this.optimalRect.left)?null:this.optimalRect.left+"px",t.right=(0,W.o8)(this.optimalRect.right)?null:this.optimalRect.right+"px","0px"!==t.width&&"0px"!==t.height||(t.display="none"),t},logoStyles:function(){return this.hasDefaultLogo?{fill:this.svgLogoColor}:{}},imageStyles:function(){return{width:this.originalWidth*this.optimalRect.scale+"px",height:this.originalHeight*this.optimalRect.scale+"px"}},opaqueBottom:function(){return this.$store.state.skin&&this.$store.state.skin.styles&&(0,W.HD)(this.$store.state.skin.styles.classes)?-1!==this.$store.state.skin.styles.classes.indexOf("opaqueBottom"):null},label:function(){return this.logoLinkUrl?this.$i18n.t("TopMenu.EXTERNAL_LINK_TIP",{0:this.logoLinkUrl}):null}},watch:{bottomMenuEnabled:function(){this.setBottomMenu()},rawCustomLogoUrl:"logoLoad",hasDefaultLogo:"logoLoad",side:"setSvgTransform",optimalRect:function(t){this.$store.dispatch("logo/setFitRectName",t.name)}},methods:{setBottomMenu:function(){this.bottomMenu=this.bottomMenuEnabled?document.getElementsByClassName("bottom-toolbar")[0]:null},logoLoad:function(){var t=this;this.isReady=!1,!this.hasDefaultLogo&&this.rawCustomLogoUrl?this.preloadImg(this.customLogoUrl):this.hasDefaultLogo&&(this.originalWidth=119,this.originalHeight=30,this.customLogoUrl=null,this.isReady=!0,this.$nextTick((function(){return t.setSvgTransform()})))},preloadImg:function(){var t=this;(0,Qe.Z)({url:this.rawCustomLogoUrl,callback:function(e){var i=document.createElement("img");i.onload=function(){t.originalWidth=i.naturalWidth,t.originalHeight=i.naturalHeight,t.destroyImgBlob(),t.customLogoUrl=e,t.isReady=!0},i.onerror=function(){},i.src=e,i.style.width="100%"}})},destroyImgBlob:function(){this.customLogoUrl&&window.URL.revokeObjectURL(this.customLogoUrl)},calculateScale:function(t){if(0===this.originalWidth||0===this.originalHeight)return 0;if(t.width<0||t.height<0)return 0;var e=1,i=1;return this.originalHeight>t.height&&(e=t.height/this.originalHeight),this.originalWidth>t.width&&(i=t.width/this.originalWidth),Math.min(i,e,1)},applySizeConstraints:function(t){!t.lockWidth&&t.width1&&void 0!==arguments[1]&&arguments[1];this.timeout>Date.now()||(this.$root.$emit("nav:goRight"),this.$store.state.pager.freezed||(setTimeout((function(){e.movePagerRight({target:i?"nav-swipe":"nav-tap"})}),0),this.timeout=Date.now()+150))},goLeft:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.timeout>Date.now()||(this.$root.$emit("nav:goLeft"),this.$store.state.pager.freezed||(setTimeout((function(){e.movePagerLeft({target:i?"nav-swipe":"nav-tap"})}),0),this.timeout=Date.now()+150))},pointerDown:function(t){this.isZoomed&&this.pointers.push(t.pointerId)},pointerUp:function(t){this.pointers.length>1&&(this.timeout=Date.now()+150),this.pointers.splice(this.pointers.indexOf(t.pointerId),1)},onVisibilityChange:function(){this.pointers.length=0,this.timeout=0}}}),Go=jo,Xo=(0,j.Z)(Go,Vo,Uo,!1,null,"713bdbfe",null).exports,Yo=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:t.classes},[t.isFirstPage||t.isLightboxShown?t._e():i("div",{staticClass:"button-block left"},[i("button",{staticClass:"nav-btn next-btn nav-left-arrow",attrs:{tabindex:"0",title:t.leftArrowTitle},on:{click:function(e){return e.preventDefault(),t.goLeft(e)}}},[i("transition",{attrs:{name:"bars-fade"}},[t.show?i("svgicon",{staticClass:"arrow",attrs:{focusable:"false",name:"mobile-left",height:"100%"}}):t._e()],1)],1),t._v(" "),i("button",{staticClass:"nav-btn last-btn nav-first-left-arrow",attrs:{tabindex:"0",title:t.leftMostArrowTitle},on:{click:function(e){return e.preventDefault(),t.leftToTheLast(e)}}},[t.show?i("svgicon",{staticClass:"arrow",attrs:{focusable:"false",name:"book-first",height:"100%"}}):t._e()],1)]),t._v(" "),t.isLastPage||t.isLightboxShown?t._e():i("div",{staticClass:"button-block right"},[i("button",{staticClass:"nav-btn next-btn nav-right-arrow",attrs:{tabindex:"0",title:t.rightArrowTitle},on:{click:function(e){return e.preventDefault(),t.goRight(e)}}},[i("transition",{attrs:{name:"bars-fade"}},[t.show?i("svgicon",{staticClass:"arrow",attrs:{focusable:"false",name:"mobile-right",height:"100%"}}):t._e()],1)],1),t._v(" "),i("button",{staticClass:"nav-btn last-btn nav-last-right-arrow",attrs:{tabindex:"0",title:t.rightMostArrowTitle},on:{click:function(e){return e.preventDefault(),t.rightToTheLast(e)}}},[t.show?i("svgicon",{staticClass:"arrow",attrs:{focusable:"false",name:"book-last",height:"100%"}}):t._e()],1)])])},qo=[],Ko={mixins:[p.Z],props:{show:Boolean},data:function(){return{timeout:0,classes:{"nav-arrows":!0,start:!0}}},mounted:function(){var t=this;setTimeout((function(){t.classes.start=!1}),8e3)},computed:{isLightboxShown:function(){return this.$store.getters["lightbox/isShown"]},isRTLBook:function(){return this.$store.state.book.rightToLeft},isFirstPage:function(){var t=null===this.$store.getters["pager/prevNonStubPageId"],e=null===this.$store.getters["pager/nextPageId"];return this.isRTLBook?e:t},isLastPage:function(){var t=null===this.$store.getters["pager/nextPageId"],e=null===this.$store.getters["pager/prevNonStubPageId"];return this.isRTLBook?e:t},isEmbed:function(){return this.$store.state.workspace.isEmbed},leftArrowTitle:function(){return this.isRTLBook?this.$t("NavigationPanel.NEXT_PAGE_TIP"):this.$t("NavigationPanel.PREV_PAGE_TIP")},rightArrowTitle:function(){return this.isRTLBook?this.$t("NavigationPanel.PREV_PAGE_TIP"):this.$t("NavigationPanel.NEXT_PAGE_TIP")},leftMostArrowTitle:function(){return this.isRTLBook?this.$t("NavigationPanel.LAST_PAGE_TIP"):this.$t("NavigationPanel.FIRST_PAGE_TIP")},rightMostArrowTitle:function(){return this.isRTLBook?this.$t("NavigationPanel.FIRST_PAGE_TIP"):this.$t("NavigationPanel.LAST_PAGE_TIP")},animationInProgress:function(){return this.$store.state.workspace.animationInProgress}},watch:{animationInProgress:function(){this.classes.start=!1}},methods:{goRight:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.timeout>Date.now()||(this.$root.$emit("nav:goRight"),this.movePagerRight({target:e?"nav-swipe":"nav-tap"}),this.timeout=Date.now()+150)},goLeft:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.timeout>Date.now()||(this.$root.$emit("nav:goLeft"),this.movePagerLeft({target:e?"nav-swipe":"nav-tap"}),this.timeout=Date.now()+150)},rightToTheLast:function(){this.timeout>Date.now()||(this.movePagerRightmost({navTarget:!0}),this.timeout=Date.now()+150)},leftToTheLast:function(){this.timeout>Date.now()||(this.movePagerLeftmost({navTarget:!0}),this.timeout=Date.now()+150)}}},Qo=Ko,Jo=(0,j.Z)(Qo,Yo,qo,!1,null,"b2596fc6",null).exports,tr=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"zoom-panel",class:t.panelClass,style:t.panelStyle,attrs:{id:"zoom-panel",dir:t.dir}},[i("span",{staticClass:"zoom-panel-caption minus",attrs:{title:t.$t("ZoomBar.ZOOM_OUT_TIP")},on:{click:t.zoomOut}},[t._v("–")]),t._v(" "),i("div",{ref:"zoomLine",staticClass:"zoom-panel-line",on:{click:t.lineClick}},[i("v-touch",{ref:"zoomSlider",staticClass:"zoom-panel-slider",style:t.sliderStyle,attrs:{id:"zoom-slider","pan-options":{direction:"horizontal",threshold:1}},on:{panstart:t.onPanStart,panmove:t.onPanMove,panend:t.onPanEnd,pancancel:t.onPanEnd}})],1),t._v(" "),i("span",{staticClass:"zoom-panel-caption plus",attrs:{title:t.$t("ZoomBar.ZOOM_IN_TIP")},on:{click:t.zoomIn}},[t._v("+")])])},er=[],ir=(i(169),i(2209),{name:"ZoomPanel",data:function(){return{scalePosition:0,savedScalePosition:null,lineWidth:90,forceOpacity:!1,forceVisibility:!1,opacityTimer:null,isGrabbing:!1}},mounted:function(){window.addEventListener("keydown",this.keyDownHandler),this.$root.$on("unzoomed",this.hide),this.updateScalePosition(this.zoomFactor)},beforeDestroy:function(){window.removeEventListener("keydown",this.keyDownHandler),this.$root.$off("unzoomed",this.hide)},watch:{zoomFactor:"updateScalePosition",minZoom:function(t){this.zoomFactor>t?this.scalePosition=1*((this.zoomFactor-t)/(this.maxZoom-t)).toFixed(2):this.scalePosition=0},scalePosition:function(){var t=this;this.forceOpacity=!0,clearTimeout(this.opacityTimer),this.opacityTimer=setTimeout((function(){t.forceOpacity=!1}),2e3)},pagerState:function(){this.forceVisibility=!1},visible:function(t){this.$store.dispatch("workspace/setZoomPanel",t)},zoomPanel:function(t){t||(this.forceVisibility=!1)}},computed:{zoomFactor:function(){return this.$store.state.pages.size.zoomFactor},isRtl:function(){return this.$store.getters["i18n/isLocaleRtl"]},dir:function(){return this.isRtl?"rtl":"ltr"},pagerState:function(){return[this.$store.state.pager.currentPage]},visible:function(){return this.zoomFactor>this.minZoom||this.forceVisibility},zoomPanel:function(){return this.$store.state.workspace.zoomPanel},minZoom:function(){if("slide-book"===this.$store.state.workspace.bookComponent)return 1;var t=this.isHardcover&&(this.isFirstPage||this.isLastPage)?1.03:1,e=this.isSingleMode?1:2,i=this.$store.state.workspace.containerSize.height/(this.$store.state.pages.size.height*t/this.$store.state.pages.size.zoomFactor),s=this.$store.state.workspace.containerSize.width/(this.$store.state.pages.size.width*t*e/this.$store.state.pages.size.zoomFactor),o=Math.round(100*i)/100,r=Math.round(100*s)/100;return Math.min(o,r)},isFirstPage:function(){return this.$store.getters["pager/isFirstSpread"]},isLastPage:function(){return this.$store.getters["pager/isLastSpread"]},isSingleMode:function(){return"single"===this.$store.getters["pager/mode"]},maxZoom:function(){return this.$store.state.workspace.maxZoom},sliderStyle:function(){var t={},e=6;return this.isRtl?t.right=Math.round((this.lineWidth-e)*this.scalePosition)+"px":t.left=Math.round((this.lineWidth-e)*this.scalePosition)+"px",t},panelClass:function(){return{grabbing:this.isGrabbing}},panelStyle:function(){return{opacity:this.forceOpacity?.9:null,visibility:this.visible?"visible":"hidden"}},shouldBlockHotkeys:function(){return null!==this.$store.state.popup.opened||null!==this.$store.state.sidebar.opened||this.$store.state.workspace.modalOpened||this.$store.getters["lightbox/isShown"]}},methods:{zoomOut:function(){if(!this.$store.state.workspace.animationInProgress&&(!1!==this.forceVisibility||0!==this.scalePosition)){if(this.scalePosition>.1)this.scalePosition-=.1;else{if(!0===this.forceVisibility&&0===this.scalePosition)return this.forceVisibility=!1,void this.$root.$emit("zoomPanel",{action:"zoomOut"});this.forceVisibility=!0,this.scalePosition=0}this.$root.$emit("zoomPanel",{action:"setZoom",zoomFactor:1*(this.scalePosition*(this.maxZoom-this.minZoom)+this.minZoom).toFixed(2),fast:!0})}},zoomOutFull:function(){this.$store.state.workspace.animationInProgress||(this.forceVisibility=!1,this.$root.$emit("zoomPanel",{action:"zoomOut"}))},zoomIn:function(){this.$store.state.workspace.animationInProgress||(0!==this.scalePosition||this.visible?(this.scalePosition<0&&(this.scalePosition=0),this.scalePosition<.9?this.scalePosition+=.1:this.scalePosition=1,this.$root.$emit("zoomPanel",{action:"setZoom",zoomFactor:1*(this.scalePosition*(this.maxZoom-this.minZoom)+this.minZoom).toFixed(2),fast:!0})):this.$root.$emit("zoomPanel",{action:"zoomIn"}))},lineClick:function(t){var e=this;if(!this.$store.state.workspace.animationInProgress){var i=this.$refs.zoomLine.getBoundingClientRect();this.isRtl?this.scalePosition=(this.lineWidth-t.clientX+i.left)/this.lineWidth:this.scalePosition=(t.clientX-i.left)/this.lineWidth,this.scalePosition<=0&&(this.scalePosition=0),0===this.scalePosition&&(this.forceVisibility=!0),this.$nextTick((function(){e.$root.$emit("zoomPanel",{action:"setZoom",zoomFactor:1*(e.scalePosition*(e.maxZoom-e.minZoom)+e.minZoom).toFixed(2),fast:!1})}))}},onPanStart:function(){this.savedScalePosition=this.scalePosition,this.isGrabbing=!0,this.$root.$emit("zoomPanel",{action:"startScale"})},onPanMove:function(t){var e=1*(this.isRtl?-t.deltaX/this.lineWidth:t.deltaX/this.lineWidth).toFixed(2);this.scalePosition=this.savedScalePosition+e,this.scalePosition>1&&(this.scalePosition=1),this.scalePosition<=0&&(this.scalePosition=0);var i=this.scalePosition/this.savedScalePosition;this.$root.$emit("zoomPanel",{action:"changeScale",scalePosition:this.scalePosition,scaleRatio:i})},onPanEnd:function(t){this.isGrabbing=!1;var e=1*(this.isRtl?-t.deltaX/this.lineWidth:t.deltaX/this.lineWidth).toFixed(2);this.scalePosition+=e,this.scalePosition>1&&(this.scalePosition=1),this.scalePosition<=0&&(this.scalePosition=0),0===this.scalePosition?this.forceVisibility=!0:this.forceVisibility=!1,this.$root.$emit("zoomPanel",{action:"endScale",zoomFactor:this.scalePosition*(this.maxZoom-this.minZoom)+this.minZoom})},keyDownHandler:function(t){if(((0,W.Ft)(t.target)||(0,W.o8)(t.target)||"input"!==t.target.tagName.toLowerCase()&&"textarea"!==t.target.tagName.toLowerCase()&&"select"!==t.target.tagName.toLowerCase()&&"option"!==t.target.tagName.toLowerCase())&&!this.shouldBlockHotkeys)switch(t.code){case"Equal":case"NumpadAdd":(t.metaKey||t.ctrlKey)&&(t.preventDefault(),this.zoomIn());break;case"Minus":case"NumpadSubtract":(t.metaKey||t.ctrlKey)&&(t.preventDefault(),this.zoomOut());break;case"Digit0":(t.metaKey||t.ctrlKey)&&this.zoomOutFull()}},hide:function(){this.forceVisibility=!1,this.$store.dispatch("workspace/setZoomPanel",!1)},updateScalePosition:function(t){t>this.minZoom?this.scalePosition=1*((t-this.minZoom)/(this.maxZoom-this.minZoom)).toFixed(2):this.scalePosition=0}}}),sr=(0,j.Z)(ir,tr,er,!1,null,"9d1e0d5e",null).exports,or=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"note-editor"},[t.showRect?i("div",{ref:"rect",class:t.rectClass,style:t.rectStyle,attrs:{role:"dialog"},on:{mousedown:function(t){t.stopPropagation()}}},[i("div",{staticClass:"note-body"},[i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.textAreaValue,expression:"textAreaValue"}],ref:"text",staticClass:"note-article",attrs:{role:"textbox",dir:t.textareaDir,maxlength:"500",placeholder:t.localization.placeholderText,tabindex:"0"},domProps:{value:t.textAreaValue},on:{focus:t.focusTextArea,keydown:function(e){return(e.type.indexOf("key")||13===e.keyCode)&&e.ctrlKey?t.setViewState(e):null},input:function(e){e.target.composing||(t.textAreaValue=e.target.value)}}})]),t._v(" "),i("div",{staticClass:"note-footer",attrs:{"aria-hidden":"true"}},[i("div",{class:t.colorSetClass},[i("div",{staticClass:"note-border-color green",attrs:{title:t.localization.colorGreen},on:{click:function(e){return t.setColor("green")}}},[i("div",{staticClass:"note-color"})]),t._v(" "),i("div",{staticClass:"note-border-color blue",attrs:{title:t.localization.colorBlue},on:{click:function(e){return t.setColor("blue")}}},[i("div",{staticClass:"note-color"})]),t._v(" "),i("div",{staticClass:"note-border-color violet",attrs:{title:t.localization.colorViolet},on:{click:function(e){return t.setColor("violet")}}},[i("div",{staticClass:"note-color"})]),t._v(" "),i("div",{staticClass:"note-border-color red",attrs:{title:t.localization.colorRed},on:{click:function(e){return t.setColor("red")}}},[i("div",{staticClass:"note-color"})]),t._v(" "),i("div",{staticClass:"note-border-color orange",attrs:{title:t.localization.colorOrange},on:{click:function(e){return t.setColor("orange")}}},[i("div",{staticClass:"note-color"})]),t._v(" "),i("div",{staticClass:"note-border-color gray",attrs:{title:t.localization.colorGray},on:{click:function(e){return t.setColor("gray")}}},[i("div",{staticClass:"note-color"})])]),t._v(" "),i("div",{staticClass:"note-time"},[t._v(t._s(t.formattedTime))]),t._v(" "),i("span",{staticClass:"icon icon-trash-can note-button note-delete-button",attrs:{title:t.localization.deleteTip},on:{click:t.deleteNoteCheck}},[i("svgicon",{attrs:{focusable:"false",name:"trash-can"}})],1)])]):t._e(),t._v(" "),t.deleteDialog?i("div",{ref:"deleteDialog",class:t.rectClass,style:t.rectStyle,attrs:{role:"dialog"},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.deleteDialogCancel(e)},mousedown:function(t){t.stopPropagation()}}},[i("div",{staticClass:"note-delete-dialog",attrs:{dir:t.dir,"aria-hidden":"true"}},[i("div",{staticClass:"note-delete-dialog-text"},[i("div",{staticClass:"note-delete-dialog-text-flex"},[i("span",[t._v(t._s(t.localization.dialogDeleteText))])])]),t._v(" "),i("div",{staticClass:"note-delete-dialog-buttons"},[i("button",{ref:"cancelButton",staticClass:"note-delete-dialog-cancel",attrs:{tabindex:"0"},on:{click:t.deleteDialogCancel}},[t._v("\n "+t._s(t.localization.cancelButton)+"\n ")]),t._v(" "),i("button",{staticClass:"note-delete-dialog-confirm",attrs:{tabindex:"0"},on:{click:function(e){return t.deleteNote(e,t.deleteTarget)}}},[t._v("\n "+t._s(t.localization.deleteButton)+"\n ")])])])]):t._e()])},rr=[],nr=(i(6062),i(6382)),ar=i.n(nr),hr=24,lr=4,cr=1.03,dr={name:"NoteEditor",data:function(){return{rectLeft:-115,rectTop:4,rectHeight:125,rectWidth:230,rectPadding:10,rectState:"view",deleteDialog:!1,textAreaValue:"",deleteTarget:"editor"}},computed:{textareaDir:function(){if(""!==this.textAreaValue){var t=ar().getDirection(this.textAreaValue);return t&&"ltr"!==t?"rtl":"ltr"}return this.dir},isOpened:function(){return!!this.currentNoteId&&!!this.currentNoteData},isMovingNote:function(){return this.$store.state.notes.isMoving},showRect:function(){return this.isOpened&&!this.isMovingNote&&this.enoughSpace},currentNoteId:function(){return this.$store.state.notes.opened},currentNoteData:function(){return this.$store.getters["notes/noteByID"](this.currentNoteId)},oneCurrentPage:function(){var t=this.pagerState.singleMode,e=this.pagerState.slideMode,i=this.$store.state.pages.structure.length%2==0,s=this.pagerState.isFirstSpread||this.pagerState.isLastSpread&&i;return t||e||s},rightPageOffset:function(){var t=this.pagerState.wide;return!this.oneCurrentPage&&!t&&this.rtl!==(this.pagerState.rightPage===this.currentNoteData.page)?this.pageSize.width:0},singleModeRightPageCorrectionX:function(){var t=this.pagerState.singleMode,e=this.pagerState.wide,i="right"===this.pagerState.pageSide;return t&&e&&i?-this.pageSize.width:0},leftZoomOffset:function(){return this.containerSize.width>this.pageSize.width&&this.oneCurrentPage?(this.containerSize.width-this.pageSize.width)/2+this.leftHardcoverZoomOffset:0},topZoomOffset:function(){return this.containerSize.height>this.pageSize.height?(this.containerSize.height-this.pageSize.height)/2:0},topHardcoverZoomOffset:function(){return this.pagerState.hardcover?-this.pageSize.height*(cr-1)/2:0},leftHardcoverZoomOffset:function(){if(!this.pagerState.hardcover)return 0;var t=this.pageSize.width*(cr-1)/2;return this.isRtlOrientation?t:-t},isZoomed:function(){return 1!==this.$store.state.pages.size.zoomFactor},hardcoverTopPadding:function(){var t=Math.round(this.pageSize.height*cr);return t%2!=0&&(t+=1),this.pagerState.hardcover?Math.round((t-this.pageSize.height)/2):0},isRtlOrientation:function(){return this.pagerState.isFirstSpread&&this.rtl||this.pagerState.isLastSpread&&!this.rtl},hardcoverLeftPadding:function(){return this.pagerState.hardcover&&this.isRtlOrientation?this.pageSize.width*(1-cr):0},currentNotePosition:function(){var t,e;if(this.isZoomed){var i="[data-zoom-wrapper]",s=new window.WebKitCSSMatrix(window.getComputedStyle(this.$root.$el.querySelector(i)).transform);t=s.m41+this.leftZoomOffset,e=s.m42+this.topZoomOffset+this.topHardcoverZoomOffset}else t=this.holderSize.left,e=this.holderSize.top-this.hardcoverTopPadding;return{left:t+this.rightPageOffset+this.singleModeRightPageCorrectionX+this.hardcoverLeftPadding+Math.round(this.currentNoteData.pX*this.scale.w),top:Math.max(e+Math.round(this.currentNoteData.pY*this.scale.h),e+hr+lr)}},pagerState:function(){return this.$store.getters["pager/state"]},slideComponent:function(){return"slide-book"===this.$store.state.workspace.bookComponent},isContentCropMode:function(){return this.pagerState.slideMode&&this.$store.state.book.contentCrop},pageSize:function(){if(this.slideComponent){var t=this.pagerState.currentPage;return this.$store.getters["pages/currentSize"](t)}return this.$store.getters["pages/size"]},holderSize:function(){return this.$store.getters["workspace/holderSize"]},containerSize:function(){return this.$store.getters["workspace/containerSize"]},enoughSpace:function(){return this.containerSize.width>=this.rectWidth+2*this.rectPadding&&this.containerSize.height>=this.rectHeight+2*this.rectPadding},scale:function(){var t=this.slideComponent&&this.pagerState.wide;return{w:this.pageSize.width*(this.pagerState.hardcover?cr:1)/this.$store.state.book.bookSize.width/(t?2:1),h:this.pageSize.height*(this.pagerState.hardcover?cr:1)/this.$store.state.book.bookSize.height}},rectStyle:function(){return{top:this.currentNotePosition.top+this.rectTop+"px",left:this.currentNotePosition.left+this.rectLeft+"px"}},rectClass:function(){return["note-rect",this.rectState]},colorSetClass:function(){return["note-color-set",this.currentNoteData.color]},formattedTime:function(){var t=new Date(Date.now()),e=new Date(this.currentNoteData.date),i=e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return t.getDay()===e.getDay()&&t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()||(i=e.toLocaleDateString()+", "+i),i},dir:function(){return this.$store.getters["i18n/isLocaleRtl"]?"rtl":"ltr"},rtl:function(){return this.$store.state.book.rightToLeft},localization:function(){return{placeholderText:this.$i18n.t("Notes.PLACEHOLDER"),dialogDeleteText:this.$i18n.t("Notes.DIALOG_DELETE_TEXT"),deleteTip:this.$i18n.t("Notes.DELETE_TIP"),deleteButton:this.$i18n.t("AlertWindow.BUTTON_DELETE"),cancelButton:this.$i18n.t("AlertWindow.BUTTON_CANCEL"),colorRed:this.$i18n.t("Notes.COLOR_RED"),colorGray:this.$i18n.t("Notes.COLOR_GRAY"),colorOrange:this.$i18n.t("Notes.COLOR_ORANGE"),colorViolet:this.$i18n.t("Notes.COLOR_VIOLET"),colorBlue:this.$i18n.t("Notes.COLOR_BLUE"),colorGreen:this.$i18n.t("Notes.COLOR_GREEN")}},isFrozenOrNotReady:function(){return this.$store.state.workspace.freezed||"ready"!==this.$store.state.workspace.status||this.$store.state.workspace.isResizing||this.$store.state.pager.freezed},activeInteractiveElement:function(){return this.$store.state.workspace.activeInteractiveElement}},watch:{activeInteractiveElement:function(t){"note"!==t&&this.hideEditor()},isOpened:function(t){var e,i=this;t&&(null!==(e=this.currentNoteData)&&void 0!==e&&e.new&&(this.rectState="edit"),this.showEditor(),setTimeout((function(){"edit"===i.rectState&&i.forceFocus()}),100))},isMovingNote:function(t){t?(this.saveText(this.currentNoteId),this.deleteDialog=!1):this.updateEditorParams()},currentNoteId:function(t,e){null!==e&&this.saveText(e)},size:function(){this.isOpened&&this.updateEditorParams()},containerSize:function(){this.updateEditorParams()},currentNoteData:function(t){this.textAreaValue=t?t.text:""}},mounted:function(){this.$root.$on("contextMenu:deleteNote",this.onDelete),this.$root.$on("contextMenu:editNote",this.onEdit),this.$root.$on("note:deleteDialog",this.onDeleteDialog),this.updateEditorParams(),this.isOpened&&this.showEditor(),this.parentEl=this.$el.parentElement},beforeDestroy:function(){this.$root.$off("contextMenu:deleteNote",this.onDelete),this.$root.$off("contextMenu:editNote",this.onEdit),this.$root.$off("note:deleteDialog",this.onDeleteDialog),document.removeEventListener("keydown",this.checkKeydown),this.deleteDialog=!1},methods:{showEditor:function(){this.$store.dispatch("workspace/setActiveInteractiveElement","note"),this.updateEditorParams(),this.$store.dispatch("notes/setOpenedId",{id:this.currentNoteId}),this.$store.dispatch("notes/setActiveItemById",this.currentNoteId),document.addEventListener("keydown",this.checkKeydown)},hideEditor:function(){this.deleteDialog=!1,document.activeElement===this.$refs.text&&this.$refs.text.blur(),this.$store.dispatch("notes/setOpenedId",{id:null}),this.$store.dispatch("workspace/setHighlightTimeout",Date.now()+300),document.removeEventListener("keydown",this.checkKeydown),this.rectState="view"},updateEditorParams:function(){if(this.isOpened){var t=this.containerSize.width-this.currentNotePosition.left;this.currentNotePosition.leftthis.rectHeight+2*lr,i=this.currentNotePosition.top>this.rectHeight+hr+2*lr;if(e)this.rectTop=lr;else if(i)this.rectTop=-(this.rectHeight+hr+2*lr);else{this.rectTop=-(this.rectHeight+hr+2*lr)/2,this.rectLeft=-this.rectWidth/2;var s=this.rectWidth/2+hr+lr,o=this.currentNotePosition.left>this.rectWidth+this.rectPadding,r=t-hr>this.rectWidth+this.rectPadding;if(o||r)this.rectLeft+="rtl"===this.dir&&o||!r?-s:s;else{var n=this.$el.getBoundingClientRect().right+this.rectWidth+this.rectPadding>this.$store.state.workspace.size.width;this.rectLeft+=n?-s:s}}}},saveText:function(t){var e=this.$store.getters["notes/noteByID"](t);e&&this.$refs.text&&e.text!==this.$refs.text.value&&(this.$store.dispatch("notes/changeText",{id:t,text:this.$refs.text.value}),this.$root.$emit("note",{action:"changeText"}))},setColor:function(t){this.currentNoteData.color!==t&&(this.$store.dispatch("notes/changeColor",{id:this.currentNoteId,color:t}),this.$root.$emit("note",{action:"changeColor",value:t}))},focusTextArea:function(){this.rectState="edit",document.removeEventListener("keydown",this.checkKeydown)},deleteNoteCheck:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"editor";""===this.currentNoteData.text?this.deleteNote(t,i):(this.deleteTarget=i,this.deleteDialog=!0,this.isOpened||document.addEventListener("mousedown",this.deleteDialogCancel),this.$nextTick((function(){document.removeEventListener("keydown",e.checkKeydown),e.$refs.cancelButton.focus()})))},onDeleteDialog:function(t,e){this.currentNoteId!==t&&this.$store.dispatch("notes/setOpenedId",{id:t,target:"noteWindowDelete"}),this.deleteNoteCheck(null,e)},checkKeydown:function(t){if("Escape"===t.code&&this.$store.dispatch("workspace/setActiveInteractiveElement",null),"view"===this.rectState&&t.preventDefault(),"Backspace"===t.code||"Delete"===t.code){if(this.$refs.text===document.activeElement)return;this.deleteNoteCheck(t,"hotkey")}},deleteNote:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;document.removeEventListener("keydown",this.checkKeydown),this.$store.dispatch("notes/deleteNote",{id:this.currentNoteId,target:e}),this.$store.dispatch("workspace/setActiveInteractiveElement",null),this.deleteDialogCancel()},deleteDialogCancel:function(){var t=this;this.isOpened&&document.addEventListener("keydown",this.checkKeydown),document.removeEventListener("mousedown",this.deleteDialogCancel),this.deleteDialog=!1,this.$nextTick((function(){t.$root.$emit("note:closeDeleteDialog")}))},setViewState:function(t){this.rectState="view",t.target.blur()},forceFocus:function(){var t;null===(t=this.$refs.text)||void 0===t||t.focus()},onDelete:function(t){this.currentNoteId!==t&&this.$store.dispatch("notes/setOpenedId",{id:t,target:"contextMenu"}),this.deleteNoteCheck(null,"contextMenu")},onEdit:function(t){this.$store.dispatch("notes/setOpenedId",{id:t,target:"contextMenu"})}}},ur=dr,pr=(0,j.Z)(ur,or,rr,!1,null,"bf390c46",null).exports;i(5903);function gr(){return gr=Object.assign?Object.assign.bind():function(t){for(var e=1;e0},substrateStyle:function(){var t,e;if(this.$store.getters["pager/state"].slideMode)e="100%",t=0;else{var i=this.$store.state.workspace.holderSize.top,s=this.$store.getters["pages/size"].height,o=this.$store.state.workspace.containerSize.height;t=1===this.$store.state.book.bookSize.zoomFactor?i+"px":o>=s?Math.round(i)+"px":0,e=Math.min(s,o)+"px"}return{display:"block",height:e,top:t,cursor:this.isFrozen?"inherit":"pointer","z-index":this.isFrozen&&"flip-book"===this.bookComponent?2e5:"auto"}},logoKey:function(){return this.$store.getters["logo/logoKey"]},renderLogo:function(){return this.$store.getters["logo/renderLogo"]},isMobile:function(){return this.$store.getters["workspace/isMobile"]},isMobileApp:function(){return"mobile-app"===this.$store.getters["info/version"]},isFrozen:function(){return this.$store.getters["workspace/isFrozen"]||this.$store.getters["pager/isFrozen"]}},methods:{documentOnMouseUp:function(){clearTimeout(this.inspectorModeTimeoutId)},documentOnMouseDown:function(t){var e=this;t.shiftKey&&t.altKey&&(t.ctrlKey||t.metaKey)&&(t.preventDefault(),this.inspectorModeTimeoutId=setTimeout((function(){e.$store.dispatch("workspace/setInspectorMode",!e.inspectorMode)}),1e3))},fitBook:function(t,e){var i=gr({},e),s=this.$store.state.book.bookSize,o=this.bookScaleSize,r=this.pagesCount,n=(0,Ce.Tj)({width:2*s.width,height:s.height},i),a=Ie(r,r,n,.1*n.width),h=(o||100)/100,l=28,c=34,d=this.isSingleMode?2*c:2*l,u=10;"desktop"===this.layout?(this.hasThickness&&(i.width-=a),i.width-=d):this.isMobile&&(!this.isSingleMode&&this.hasThickness&&(i.width-=a),i.height-=u);var p=(0,Ce.Tj)(t,i);if(this.isHardcover){var g=this.isSingleMode?1.04:1.03;p.width=p.width/g,p.height=p.height/g}var f=p.height/p.width;return p.width=Math.floor(p.width*h),p.width=p.width%2==0?p.width:p.width+1,p.height=Math.floor(f*p.width),{width:p.width,height:p.height}},resize:function(t){var e=window.getComputedStyle(this.$el),i={left:1*e.getPropertyValue("margin-left").split("px")[0],right:1*e.getPropertyValue("margin-right").split("px")[0],top:1*e.getPropertyValue("margin-top").split("px")[0],bottom:1*e.getPropertyValue("margin-bottom").split("px")[0]};this.containerSize={width:this.size.width-i.left-i.right,height:this.size.height-i.top-i.bottom,top:this.size.top+i.top,left:this.size.left+i.left},this.$store.dispatch("workspace/setContainerSize",this.containerSize);var s=this.fitBook(this.originalBookSize,this.containerSize),o=Math.round(s.width/(this.isSingleMode?1:2)),r=Math.round(s.height);r=r%2==0?r:r+1,this.bookSize={width:o,height:r,zoomFactor:this.originalBookSize.zoomFactor}},goToRightPage:function(){var t=this;this.$store.state.pager.freezed||setTimeout((function(){t.movePagerRight({target:"free-space-tap"})}),0)},goToLeftPage:function(){var t=this;this.$store.state.pager.freezed||setTimeout((function(){t.movePagerLeft({target:"free-space-tap"})}),0)},arrowHover:function(t,e){this.$refs.bookComponent&&"function"==typeof this.$refs.bookComponent.arrowHover&&this.$refs.bookComponent.arrowHover(t,e)},afterFade:function(){this.ctrFade="no-fade"}},beforeMount:function(){this.$root.$once("before-preloader-off",this.resize),this.$store.dispatch("workspace/setBookComponent",this.bookComponent),this.$root.$on("forceBookResize",this.resize)},mounted:function(){this.resize(!0),this.hasPages||this.$root.onPublicationLoad({}),document.addEventListener("mousedown",this.documentOnMouseDown),document.addEventListener("mouseup",this.documentOnMouseUp)},beforeDestroy:function(){this.$root.$off("forceBookResize",this.resize),document.removeEventListener("mousedown",this.documentOnMouseDown),document.removeEventListener("mouseup",this.documentOnMouseUp)},watch:{size:function(){this.resize()},bookScaleSize:function(){this.resize()},originalBookSize:function(){this.resize()},hasThickness:function(){this.resize()},bookComponent:function(t){this.$store.dispatch("pager/setForceRerender",{forceRerender:!1}),this.$store.dispatch("workspace/setBookComponent",t),this.resize()},pagerState:function(t,e){var i=this;!this.miniState||this.miniFullScreen||t.isEqualState(e)||(this.ctrFade="ctr-fade",this.$nextTick((function(){i.miniFullScreen=!0})))},renderLogo:function(t){var e,i=this;t||(null!==(e=this.$refs)&&void 0!==e&&null!==(e=e.logoComponent)&&void 0!==e&&e.$el&&!this.$refs.logoComponent.$el.parentElement&&this.$el.appendChild(this.$refs.logoComponent.$el),this.$nextTick((function(){i.$store.dispatch("logo/updateKey")})))}}},mr=fr,vr=(0,j.Z)(mr,s,o,!1,null,"42bb92b2",null).exports},5343:function(t,e,i){"use strict";i.d(e,{Z:function(){return n}});var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition",{attrs:{name:"fade"}},[i("div",{staticClass:"flash-message",style:t.messageData.style,attrs:{role:"alert","aria-live":"assertive","aria-atomic":"true"}},[t._v("\n "+t._s(t.messageData.text)+"\n ")])])},o=[],r={name:"FlashMessage",mounted:function(){var t=this;null!==this.$store.getters["workspace/flashMessage"]&&setTimeout((function(){t.$store.dispatch("workspace/setFlashMessage",null)}),this.delay)},computed:{messageData:function(){return this.$store.getters["workspace/flashMessage"]},delay:function(){return this.messageData&&this.messageData.delay?this.messageData.delay:900}}},n=(0,i(1900).Z)(r,s,o,!1,null,"8ce2c984",null).exports},7592:function(t,e,i){"use strict";i.d(e,{Z:function(){return J}});var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.show?i("v-touch",{on:{swipeleft:function(e){t.isNavEnabled&&t.goRight("swipe")},swiperight:function(e){t.isNavEnabled&&t.goLeft("swipe")},swipeup:t.close,swipedown:t.close}},[i("span",{ref:"first-trap",attrs:{tabindex:"0","aria-hidden":"true"}}),t._v(" "),i("transition",{attrs:{name:"lightbox"},on:{"after-enter":function(e){!t.isMobile&&t.setFocusTraps({})}}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.isLightboxActive&&(t.areThumbnailsReady||t.isSmallWorkspace||!t.isNavEnabled),expression:"isLightboxActive && (areThumbnailsReady || isSmallWorkspace || !isNavEnabled)"}],class:t.lightboxClasses,style:t.lightboxStyle},[i("div",{staticClass:"lightbox-main"},[i("div",{staticClass:"lightbox-content",style:t.lightboxSizeStyle,on:{click:function(e){!t.isMobile&&t.setFocusTraps({justResetFocus:!0})}}},[i("transition",{attrs:{name:"lightbox-element"}},[i(t.item.component,{key:t.item.key,tag:"component",staticClass:"lightbox-element",attrs:{currentItem:t.item.data},on:{"lightbox-rect":t.setLightboxRect,"toggle-overlap-visibility":t.toggleOverlapVisibility}})],1),t._v(" "),i("button",{ref:"btn-close",staticClass:"lightbox-btn close",style:t.closeButtonStyle,attrs:{tabindex:"0","aria-label":t.localization.closeButton,title:t.localization.closeButton},on:{click:t.close}},[i("svgicon",{staticClass:"svg-icon",attrs:{focusable:"false",name:"cross"}})],1),t._v(" "),t.currentLightboxItem&&t.currentLightboxItem.descriptionByType&&t.isOverlapVisible?i("div",{staticClass:"lightbox-description-wrapper",attrs:{dir:t.currentLightboxItem.descriptionDir}},[i("div",{staticClass:"lightbox-description-container",on:{click:function(e){e.preventDefault(),t.isDescriptionOverflowing&&t.toggleDescription()},mousedown:function(t){t.preventDefault()},mouseup:function(t){t.preventDefault()}}},[null!==t.isDescriptionOverflowing?i("div",{ref:"lightbox-description",class:t.descriptionClasses,attrs:{id:"lightbox-description"}},t._l(t.currentLightboxItem.descriptionByType,(function(e){return i("span",["text"===e.type?[t._v(t._s(e.text))]:"link"===e.type?i("a",{staticClass:"description-link",attrs:{href:e.link,target:"_blank"},on:{click:function(t){t.stopPropagation()},mousedown:function(t){t.preventDefault()},mouseup:function(t){t.preventDefault()}}},[t._v(t._s(e.text))]):t._e()],2)})),0):t._e(),t._v(" "),i("div",{ref:"description-placeholder",staticClass:"lightbox-description lightbox-description-placeholder",attrs:{"aria-hidden":"true"}},t._l(t.currentLightboxItem.descriptionByType,(function(e){return i("span",["text"===e.type?[t._v(t._s(e.text))]:"link"===e.type?i("a",{staticClass:"description-link",attrs:{href:e.link,tabindex:"-1"}},[t._v("\n "+t._s(e.text))]):t._e()],2)})),0),t._v(" "),t.isDescriptionOverflowing?i("div",{staticClass:"lightbox-description-more"},[t._v("\n "+t._s(t.descriptionMore)+"\n ")]):t._e()])]):t._e()],1)]),t._v(" "),!t.isSmallWorkspace&&t.isNavEnabled?[i("div",{staticClass:"nav-area nav-area-left",on:{click:function(e){return t.goLeft("area")}}}),t._v(" "),i("div",{staticClass:"nav-area nav-area-right",on:{click:function(e){return t.goRight("area")}}})]:t._e(),t._v(" "),!t.isSmallWorkspace&&t.isNavEnabled?i("div",{staticClass:"nav-btns"},[i("button",{ref:"nav-btn-left",staticClass:"lightbox-btn nav-btn nav-btn-left",attrs:{tabindex:"0","aria-label":t.localization.leftButton,title:t.localization.leftButton},on:{click:function(e){return t.goLeft("button")}}},[i("svgicon",{staticClass:"chevron-left",attrs:{focusable:"false",name:"chevron-right"}})],1),t._v(" "),i("button",{ref:"nav-btn-right",staticClass:"lightbox-btn nav-btn nav-btn-right",attrs:{tabindex:"0","aria-label":t.localization.rightButton,title:t.localization.rightButton},on:{click:function(e){return t.goRight("button")}}},[i("svgicon",{attrs:{focusable:"false",name:"chevron-right"}})],1)]):t._e(),t._v(" "),t.isSmallWorkspace&&t.isNavEnabled?i("div",{ref:"small-workspace-nav",staticClass:"small-workspace-nav",attrs:{dir:"ltr"}},[i("div",{ref:"nav-btn-left",staticClass:"lightbox-btn small-workspace-nav-btn small-workspace-nav-btn-left",attrs:{role:"button",tabindex:"0","aria-label":t.localization.leftButton,title:t.localization.leftButton},on:{click:function(e){return t.goLeft("button")}}},[i("svgicon",{staticClass:"chevron-left",attrs:{focusable:"false",name:"chevron-right"}})],1),t._v(" "),i("div",{staticClass:"lightbox-nav-dots-wrapper",attrs:{"data-lightbox-nav-dots-wrapper":"true"}},[i("div",{staticClass:"lightbox-nav-dots-grad-left"}),t._v(" "),i("div",{staticClass:"lightbox-nav-dots-grad-right"}),t._v(" "),i("div",{staticClass:"lightbox-nav-dots"},[i("lightbox-nav-dots")],1)]),t._v(" "),i("div",{ref:"nav-btn-right",staticClass:"lightbox-btn small-workspace-nav-btn small-workspace-nav-btn-right",attrs:{role:"button",tabindex:"0","aria-label":t.localization.rightButton,title:t.localization.rightButton},on:{click:function(e){return t.goRight("button")}}},[i("svgicon",{attrs:{focusable:"false",name:"chevron-right"}})],1)]):t._e(),t._v(" "),!t.isSmallWorkspace&&t.isNavEnabled?i("div",{staticClass:"lightbox-nav"},[i("lightbox-thumbnails")],1):t._e(),t._v(" "),i("div",{staticClass:"lightbox-overlay",on:{click:t.close}})],2)]),t._v(" "),i("span",{ref:"last-trap",attrs:{tabindex:"0","aria-hidden":"true"}})],1):t._e()},o=[],r=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:[{"lightbox-thumbnail-image":t.thumbnail}]},[i("transition",{attrs:{name:t.thumbnail?null:"image"}},[t.blobUrl?i("div",{staticClass:"image-wrapper"},[i("div",{staticClass:"image",style:t.imageStyle,attrs:{role:"img","aria-labelledby":"lightbox-description"},on:{click:function(e){!t.thumbnail&&t.isSmallWorkspace&&t.$emit("toggle-overlap-visibility")}}})]):t._e()]),t._v(" "),t.hasError?i("div",{staticClass:"icon-wrap"},[i("svgicon",{staticClass:"error-icon",attrs:{focusable:"false",name:"error"}})],1):t.blobUrl?t._e():i("div",{staticClass:"icon-wrap"},[i("spinner",{attrs:{size:t.thumbnail?12:36,"line-size":3,"line-fg-color":"#5692AE","line-bg-color":"#333"}})],1)],1)},n=[],a=i(9426),h=i(9937),l=i(776),c=i(5657),d=i(2918),u=i(2358),p={},g={props:{currentItem:{type:Object,required:!1}},computed:{workspaceSize:function(){return this.$store.getters["workspace/size"]},isPortrait:function(){return this.$store.getters["workspace/isPortrait"]},isSmallWorkspace:function(){return this.$store.getters["workspace/isSmallWorkspace"]},isMobile:function(){return this.$store.getters["workspace/isMobile"]},isLocaleRtl:function(){return this.$store.getters["i18n/isLocaleRtl"]},isPublisher:function(){return this.$store.state.workspace.userAgentInfo.browser.publisher},buttonSize:function(){return this.isSmallWorkspace?this.$store.state.lightbox.smallWorkspaceButtonSize:this.$store.state.lightbox.buttonSize},bannerHeight:function(){return this.$store.state.workspace.bannerHeight}},methods:{getSafeAreaInset:function(t){return!this.isMobile||this.isPublisher?0:(p[this.workspaceSize.width]=p[this.workspaceSize.width]||{},void 0===p[this.workspaceSize.width][t]&&(p[this.workspaceSize.width][t]=Number(getComputedStyle(document.documentElement).getPropertyValue("--safe-area-inset-"+t).trim().slice(0,-2))),p[this.workspaceSize.width][t])}}},f=(i(6177),{}),m={components:{Spinner:a.Z},mixins:[g],props:{thumbnail:{type:Boolean,default:!1}},data:function(){return{crossOrigin:(0,l.Z)().getCrossOrigin(),blobUrl:null,naturalWidth:null,naturalHeight:null,hasError:null}},computed:{isNavEnabled:function(){return this.$store.getters["lightbox/isNavEnabled"]},wrapperRect:function(){if(this.thumbnail)return this.$store.state.lightbox.thumbnailSizeLimits;if(!this.currentItem||!this.workspaceSize.width)return null;var t=this.getSafeAreaInset("top"),e=this.getSafeAreaInset("right"),i=this.getSafeAreaInset("bottom"),s=this.getSafeAreaInset("left"),o=t+"-"+e+"-"+i+"-"+s+"-"+this.isSmallWorkspace+"-"+this.isPortrait+"-"+this.isNavEnabled+"-"+this.workspaceSize.width+"-"+this.workspaceSize.height+"-"+this.bannerHeight;f[this.currentItem.name]=f[this.currentItem.name]||{};var r=f[this.currentItem.name][o];if(void 0===r){var n,a;n=this.currentItem.originalSize?{width:this.currentItem.originalSize[0],height:this.currentItem.originalSize[1]}:this.naturalWidth?{width:this.naturalWidth,height:this.naturalHeight}:{width:Math.round(this.currentItem.rect[0]*this.currentItem.scaleRatio.w),height:Math.round(this.currentItem.rect[1]*this.currentItem.scaleRatio.h)};var h=Math.max(s,e);if(this.isSmallWorkspace){var l=4;a=this.isPortrait?{width:this.workspaceSize.width-2*l,height:this.workspaceSize.height-2*this.buttonSize-this.navHeight-(this.bannerHeight||t)-i}:{width:this.workspaceSize.width-2*this.buttonSize-2*h,height:this.workspaceSize.height-this.bannerHeight-(this.navHeight||l)-i-l}}else{var c=this.isNavEnabled?Math.max(this.$store.state.lightbox.navAreaPadding,h):0;a={width:this.workspaceSize.width-2*(this.buttonSize+2*c),height:this.workspaceSize.height-this.bannerHeight-2*this.buttonSize-this.navHeight}}r=(0,d.Tj)(n,a,!0),r.width=Math.round(r.width)||1,r.height=Math.round(r.height)||1,f[this.currentItem.name][o]=r}return this.$emit("lightbox-rect",r),r},rawUrl:function(){return this.currentItem&&this.fileName?(0,u.n)({filenameOrUrl:this.fileName}):null},fileName:function(){var t=this.currentItem;if(!(t&&t.name&&t.sizes&&this.wrapperRect))return null;var e=Math.max(this.wrapperRect.width,this.wrapperRect.height),i=(0,c.F)({data:t,maxSize:e});return(0,l.Z)().getImageFileName(i)},imageStyle:function(){var t=this.wrapperRect,e=t.width,i=t.height;return{width:"".concat(e,"px"),height:"".concat(i,"px"),"background-size":this.thumbnail?"cover":"".concat(e,"px ").concat(i,"px"),"background-image":this.blobUrl?"url("+this.blobUrl+")":null}},navHeight:function(){return this.$store.getters["lightbox/navHeight"]}},watch:{rawUrl:{handler:function(t){this.clear(),t&&this.load()},immediate:!0}},methods:{clear:function(){this.blobUrl=null,this.naturalWidth=null,this.naturalHeight=null,this.hasError=null},load:function(){var t=this;(0,h.Z)({url:this.rawUrl,callback:function(e){var i=document.createElement("img");i.onload=function(){t.blobUrl=e,t.naturalWidth=i.naturalWidth,t.naturalHeight=i.naturalHeight,!t.thumbnail&&t.currentItem&&t.$root.$emit("image",{action:"loaded",pageId:t.currentItem.pageId,url:(0,c.q)(t.currentItem),lightboxUrl:window.location.href})},i.onerror=t.onLoadError,i.crossOrigin=t.crossOrigin,i.src=e,i.style.width="100%"},errorback:this.onLoadError})},onLoadError:function(t){console.error("Image loading error from LightboxImage component.",t),this.hasError=!0}}},v=i(1900),b=(0,v.Z)(m,r,n,!1,null,"c1eef398",null).exports,S=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-touch",[i("form-container",{ref:"formContainer",style:t.formContainerStyle,attrs:{url:t.currentItem.url,provider:t.currentItem.provider,msFormScaledSize:t.msFormScaledSize}})],1)},y=[],w=i(9712),k={large:1,medium:.7,small:.5},x={components:{FormContainer:w.Z},mixins:[g],computed:{wrapperRect:function(){if(!this.currentItem||!this.workspaceSize.width)return null;var t=this.getSafeAreaInset("top"),e=this.getSafeAreaInset("right"),i=this.getSafeAreaInset("bottom"),s=this.getSafeAreaInset("left"),o=this.isSmallWorkspace?1:k[this.currentItem.popupSize]||1,r=this.isSmallWorkspace&&!this.isPortrait?8:2*this.buttonSize+2*Math.max(i,t),n=this.isSmallWorkspace&&this.isPortrait?8:2*this.buttonSize+2*Math.max(e,s),a=this.workspaceSize.width*o,h=this.workspaceSize.height*o,l=this.workspaceSize.width-n,c=this.workspaceSize.height-r,d={width:Math.min(a,l),height:Math.min(h,c)-this.bannerHeight};return"google"===this.currentItem.provider&&(d.width=Math.min(d.width,750)),d.width=Math.round(d.width)||1,d.height=Math.round(d.height)||1,this.$emit("lightbox-rect",d),d},formContainerStyle:function(){return{width:this.wrapperRect.width+"px",height:this.wrapperRect.height+"px"}},isSmallMSForm:function(){return(this.wrapperRect.width<=320||this.wrapperRect.height<=320)&&"office"===this.currentItem.provider},msFormScaledSize:function(){var t=(this.wrapperRect.width<=320?this.wrapperRect.width:this.wrapperRect.height)/325,e=Math.ceil(this.wrapperRect.width/t),i=Math.ceil(this.wrapperRect.height/t);return i%2!=0&&i--,e%2!=0&&e--,this.isSmallMSForm?{width:e,height:i,scale:t}:null}},watch:{msFormScaledSize:function(t){this.$refs.formContainer.updateFormSize(t)}}},$=(0,v.Z)(x,S,y,!1,null,null,null).exports,P=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"nav-dots"},t._l(t.currentContent,(function(e,s){return i("lightbox-nav-dot",{key:e.itemId,style:t.navDotsStyle,attrs:{item:e}})})),1)},z=[],C=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:t.navDotClass,attrs:{"data-active":t.isActive,"data-active-gallery-item":t.isActive&&t.isGalleryItem}},[t.isGallery?t._l(t.item.items,(function(e,s){return i("lightbox-nav-dot",{key:t.item.itemId+"-"+s,attrs:{item:e,itemId:t.item.itemId,galleryItemIndex:s}})})):i("div",{staticClass:"circle"})],2)},I=[],T={name:"lightbox-nav-dot",props:{item:{type:Object,required:!0},galleryItemIndex:{type:Number},itemId:{type:Number}},computed:{navDotClass:function(){return{"nav-dot":!this.isGallery,gallery:this.isGallery,active:this.isActive,"gallery-item":this.isGalleryItem}},isGallery:function(){return"gallery"===this.item.type},isGalleryItem:function(){return this.galleryItemIndex||0===this.galleryItemIndex},currentItemId:function(){return this.$store.state.lightbox.currentItemId},currentGalleryItemIndex:function(){return this.$store.state.lightbox.currentGalleryItemIndex},isActive:function(){return this.isGalleryItem?this.itemId===this.currentItemId&&this.galleryItemIndex===this.currentGalleryItemIndex:this.item.itemId===this.currentItemId}}},M={components:{LightboxNavDot:(0,v.Z)(T,C,I,!1,null,"430c6897",null).exports},data:function(){return{translateX:0}},mounted:function(){setTimeout(this.moveDots)},computed:{currentContent:function(){return this.$store.getters["lightbox/currentContent"]},currentItemId:function(){return this.$store.state.lightbox.currentItemId},currentGalleryItemIndex:function(){return this.$store.state.lightbox.currentGalleryItemIndex},navDotsStyle:function(){return{transform:"translateX("+this.translateX+"px)"}}},watch:{currentItemId:function(t){t&&this.$nextTick(this.moveDots)},currentGalleryItemIndex:function(t){(t||0===t)&&this.$nextTick(this.moveDots)}},methods:{moveDots:function(){var t=this.$el.querySelector("[data-active]"),e=null===this.currentGalleryItemIndex?null:this.$el.querySelector("[data-active-gallery-item]"),i=(e||t).offsetWidth,s=document.querySelector("[data-lightbox-nav-dots-wrapper]").offsetWidth;this.translateX=s/2-t.offsetLeft-i/2,e&&(this.translateX=this.translateX-e.offsetLeft-2)}}},L=(0,v.Z)(M,P,z,!1,null,"7fd5bd80",null).exports,R=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"lightbox-thumbnails",style:t.thumbnailsStyle},[t._l(t.currentContent,(function(e,s){return i("lightbox-thumbnail",{key:e.itemId,attrs:{index:s,thumbnail:t.thumbnails[s]}})})),t._v(" "),i("transition",{attrs:{name:"pager"}},["gallery"===t.currentContent[t.currentItemIndex].type?i("div",{staticClass:"lightbox-thumbnails-pager",attrs:{dir:t.workspaceDir}},[i("span",[t._v(t._s(t.currentGalleryItemIndex+1+" / "+t.currentContent[t.currentItemIndex].items.length))])]):t._e()])],2)},E=[],O=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:t.thumbnailClass,style:t.thumbnailStyle,on:{click:function(e){!t.thumbnail.isActive&&t.lightboxGoTo(e)}}},["image"===t.thumbnail.type?i("lightbox-image",{attrs:{currentItem:t.thumbnail,thumbnail:!0}}):t.isGallery?i("div",{staticClass:"gallery-items-wrapper",attrs:{dir:"ltr"}},t._l(t.thumbnail.items,(function(e,s){return i("div",{key:s,class:["gallery-item",{active:t.thumbnail.isActive&&s===t.thumbnail.galleryItemIndex}],style:{width:t.thumbnailsSizes[t.thumbnail.itemId][s].width+"px",height:t.thumbnailsSizes[t.thumbnail.itemId][s].height+"px"},on:{click:function(e){return t.lightboxGoTo(e,s)}}},["image"===e.type?i("lightbox-image",{attrs:{currentItem:e,thumbnail:!0}}):t._e()],1)})),0):t._e()],1)},F=[];function _(t){return A(t)||B(t)||D(t)||W()}function W(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function D(t,e){if(t){if("string"==typeof t)return H(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?H(t,e):void 0}}function B(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function A(t){if(Array.isArray(t))return H(t)}function H(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,s=new Array(e);i=t,!s.isMobile&&s.isDescriptionOverflowing&&s.$nextTick((function(){s.$refs["lightbox-description"].addEventListener("focusin",(function(t){s.isDescriptionExpanded=!0})),s.$refs["lightbox-description"].addEventListener("focusout",(function(t){s.isDescriptionExpanded=!1}))}))}),100))},createFormItem:function(t){this.item=t?{component:this.getElementComponent(t),data:{url:t.url,popupSize:t.popupSize,provider:(0,K.V)(t.url)}}:null}}},J=(0,v.Z)(Q,s,o,!1,null,"66001db2",null).exports},9426:function(t,e,i){"use strict";i.d(e,{Z:function(){return c}});var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("div",{staticClass:"vue-simple-spinner",style:t.spinnerStyle}),t._v(" "),t.message.length>0?i("div",{staticClass:"vue-simple-spinner-text",style:t.textStyle},[t._v("\n "+t._s(t.message)+"\n ")]):t._e()])},o=[],r=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},n=16,a=0,h=0,l={props:{size:{default:32},"line-size":{type:Number,default:3},"line-bg-color":{type:String,default:"#eee"},"line-fg-color":{type:String,default:"#2196f3"},speed:{type:Number,default:.8},sync:{type:Boolean,default:!1},spacing:{type:Number,default:4},message:{type:String,default:""},"font-size":{type:Number,default:13},"text-fg-color":{type:String,default:"#555"}},data:function(){return{syncAngle:null}},mounted:function(){this.sync&&(this.syncAngle=a,requestAnimationFrame(this.rotate),h++)},beforeDestroy:function(){clearTimeout(this.rotateTimeoutId),--h||(a=0)},computed:{oneDegDelay:function(){return 1e3*this.speed/360},syncStep:function(){return Math.round(n/this.oneDegDelay)},spinnerSize:function(){switch(this.size){case"tiny":return 12;case"small":return 16;case"medium":return 32;case"large":return 48;case"big":return 64;case"huge":return 96;case"massive":return 128}return r(this.size)?this.size:32},spinnerBorderWidth:function(){switch(this.size){case"tiny":return 1;case"small":return 2;case"medium":case"large":return 3;case"big":case"huge":return 4;case"massive":return 5}return r(this.lineSize)?this.lineSize:4},spinnerStyle:function(){return{border:this.spinnerBorderWidth+"px solid "+this.lineBgColor,borderTop:this.spinnerBorderWidth+"px solid "+this.lineFgColor,width:this.spinnerSize+"px",height:this.spinnerSize+"px",animation:this.sync?null:"vue-simple-spinner-spin "+this.speed+"s linear infinite",transition:this.sync?null:"all 0.3s linear",transform:this.sync?"rotate("+this.syncAngle+"deg)":null}},textStyle:function(){var t,e;switch(this.size){case"tiny":case"small":case"medium":case"large":case"big":case"huge":case"massive":t=Math.min(Math.max(Math.ceil(this.spinnerSize/8),3),12),e=Math.min(Math.max(Math.ceil(.4*this.spinnerSize),11),32);break;default:t=r(this.spacing)?this.spacing:4,e=r(this.fontSize)?this.fontSize:13}return{marginTop:t+"px",fontSize:e+"px",color:this.textFgColor}}},methods:{rotate:function(){var t=this;this.rotateTimeoutId=setTimeout((function(){t.syncAngle===a?(t.syncAngle=t.syncAngle+t.syncStep,t.syncAngle=t.syncAngle>360?t.syncAngle-360:t.syncAngle,a=t.syncAngle):t.syncAngle=a,requestAnimationFrame(t.rotate)}),n)}}},c=(0,i(1900).Z)(l,s,o,!1,null,null,null).exports},7503:function(t,e,i){"use strict";i.d(e,{Z:function(){return l}});var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:t.className,style:t.pageStyle},[t.preloaderVisible?i("div",{staticClass:"preloader",attrs:{"aria-hidden":"true"}},[i("div",{staticClass:"preloader-container"},[t.isLoading?i("spinner",{staticClass:"preloader-spinner",attrs:{size:t.preloaderSize,"line-size":t.preloaderLineSize,"line-fg-color":"#5692AE","line-bg-color":"#ffffff"}}):t._e()],1)]):t._e(),t._v(" "),t.rightPreloaderVisible?i("div",{staticClass:"preloader right",attrs:{"aria-hidden":"true"}},[i("div",{staticClass:"preloader-container"},[t.isLoading?i("spinner",{staticClass:"preloader-spinner",attrs:{size:t.preloaderSize,"line-size":t.preloaderLineSize,"line-fg-color":"#5692AE","line-bg-color":"#ffffff"}}):t._e()],1)]):t._e(),t._v(" "),t.enforceWhiteBg?i("img",{staticClass:"enforce-white-bg",attrs:{src:t.whitePixelUrl}}):t._e(),t._v(" "),t.background?i("img",{staticClass:"background",style:t.contentStyle,attrs:{crossOrigin:t.crossOrigin,src:t.background,role:"img","data-id":t.pageId,title:t.$t("AlertMessage.LINK_PAGE_TIP"),"aria-label":t.$t("AlertMessage.LINK_PAGE_TIP"),alt:t.imageAlt}}):t._e()])},o=[],r=i(9426),n=i(776),a=i(2918),h={name:"Thumb",props:{id:{type:[String,Number],required:!0},side:{type:String,required:!1,default:"both",validator:function(t){return-1!==["left","right","both"].indexOf(t)}},size:{type:Object,required:!1,default:null},contentCrop:{type:Boolean,default:!1},showPreloader:{type:Boolean,default:!0}},data:function(){return{isReady:!0,pageId:this.id,pageSide:this.side,crossOrigin:(0,n.Z)().getCrossOrigin(),isWide:!1,isStub:!1,hasError:!1,backgroundColor:"#ffffff",thumbnailUrl:null,pageResize:null,contentWidth:0,contentHeight:0,whitePixelUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII="}},components:{spinner:r.Z},beforeMount:function(){this.getProperties()},watch:{id:function(t){this.pageId=t},side:function(t){this.pageSide=t},changeProperty:function(t){t.pageID===this.pageId&&this.getProperties()},pageId:function(){this.getProperties()}},methods:{getProperties:function(){this.isWide=this.$store.getters["pages/pageProp"](this.pageId,"wide"),this.isStub=this.$store.getters["pages/pageProp"](this.pageId,"stub"),this.hasError=-1===this.$store.getters["pages/pageProp"](this.pageId,"thumbnailUrl"),this.backgroundColor=this.$store.getters["pages/pageProp"](this.pageId,"backgroundColor"),this.thumbnailUrl=this.$store.getters["pages/pageProp"](this.pageId,"thumbnailUrl"),this.pageResize=this.$store.getters["pages/pageProp"](this.pageId,"pageResize"),this.contentWidth=this.$store.getters["pages/pageProp"](this.pageId,"width")/this.contentWidthMultiplier,this.contentHeight=this.$store.getters["pages/pageProp"](this.pageId,"height")}},computed:{imageAlt:function(){return this.$i18n.t("AlertMessage.LINK_PAGE_TIP")+" "+this.pageCaption+" ("+this.$i18n.t("ThumbnailsToolWindow.TITLE")+")"},pageCaption:function(){return this.$store.getters["pages/pageCaptionById"]({id:this.id})},className:function(){return{thumb:!0,double:this.bookMode&&this.isWide&&"both"===this.pageSide,loading:this.isLoading,unready:!this.isReady,error:this.hasError}},preloaderVisible:function(){return this.showPreloader&&!this.isStub&&(this.isLoading||!this.isReady||this.hasError)},rightPreloaderVisible:function(){return this.preloaderVisible&&this.bookMode&&this.isWide&&"both"===this.pageSide},preloaderSize:function(){var t=2,e=this.contentCrop?this.contentSize.height:this.pageSize.height,i=this.contentCrop?this.contentSize.width:this.pageSize.width,s=Math.min(i,e)-2*t;return Math.min(24,s)},preloaderLineSize:function(){return 2},enforceWhiteBg:function(){return this.$store.state.workspace.alteredSVGColors&&this.$store.state.workspace.userAgentInfo.browser.samsung},background:function(){if(!this.pageId||!this.isReady||this.hasError)return null;if(this.isStub){this.$store.state.workspace.policiesUpdated;return this.enforceWhiteBg?this.whitePixelUrl:(0,n.Z)().translatePath("assets/pages/pagestub.png")}return this.thumbnailUrl?this.thumbnailUrl:null},isLoading:function(){return!this.thumbnailUrl||(0===this.$store.state.pages.size.width||null===this.$store.state.pages.size.width)},pageWidthMultiplier:function(){return this.isWide&&"both"===this.pageSide?2:1},contentWidthMultiplier:function(){return this.isWide&&"both"!==this.pageSide?"2":"1"},pagesSize:function(){return this.$store.getters["pages/size"]},pageSize:function(){return this.size&&this.size.width&&this.size.height?{width:this.size.width,height:this.size.height}:{width:this.pagesSize.width*this.pageWidthMultiplier,height:1*this.pagesSize.height}},singleMode:function(){return this.$store.state.pager.singleMode},bookMode:function(){return this.$store.state.pager.spreadMode},pageStyle:function(){return{width:(this.contentCrop?this.contentSize.width:this.pageSize.width)+"px",height:(this.contentCrop?this.contentSize.height:this.pageSize.height)+"px","background-color":this.enforceWhiteBg?null:this.backgroundColor}},contentSize:function(){if(this.pageId){var t,e=this.pageResize,i=this.contentWidth,s=this.contentHeight;return t="FIT"===e?(0,a.Tj)({width:i,height:s},this.pageSize):(0,a.hl)({width:i,height:s},this.pageSize),{width:Math.ceil(t.width),height:Math.ceil(t.height),scaleRatio:{w:t.width/i,h:t.height/s}}}return{width:0,height:0,scaleRatio:{w:0,h:0}}},contentStyle:function(){var t=this.contentCrop?0:(this.pageSize.width-this.contentSize.width)/(this.isWide&&"both"!==this.pageSide?1:2),e=this.contentCrop?0:(this.pageSize.height-this.contentSize.height)/2,i={width:this.contentSize.width*this.contentWidthMultiplier+"px",height:this.contentSize.height+"px"};return"right"===this.pageSide?(i.right="0",t&&(i.marginRight=t+"px")):(i.left="0",t&&(i.marginLeft=t+"px")),e&&(i.marginTop=e+"px"),i},changeProperty:function(){return this.$store.state.pages.changeInPage}}},l=(0,i(1900).Z)(h,s,o,!1,null,null,null).exports},9712:function(t,e,i){"use strict";i.d(e,{Z:function(){return a}});var s=function(){var t=this,e=t.$createElement;return(t._self._c||e)("v-touch",{style:t.formContainerStyle})},o=[],r=i(1909),n={name:"FormContainer",props:{url:{type:String,required:!1},provider:{type:String,required:!1},msFormScaledSize:{type:Object,default:null}},data:function(){return{formId:(0,r.c)(this.url)}},mounted:function(){switch(this.provider){case"typeform":this.iframe=document.createElement("iframe"),this.iframe.src=this.url,this.iframe.style.border="none",this.iframe.allowFullscreen=!0;break;case"google":this.iframe=document.createElement("iframe");var t=this.url.split("?");this.iframe.src=t[0]+"?embedded=true",this.iframe.innerHTML="Loading…";break;case"office":this.iframe=document.createElement("iframe"),this.iframe.src=this.url+"&embedded=true",this.iframe.style.border="none",this.iframe.allowFullscreen=!0}this.iframe&&(this.isMobile&&(document.body.style["overscroll-behavior-y"]="none",document.body.style.overflow="hidden"),this.iframe.style.frameBorder=0,this.iframe.style.marginHeight=0,this.iframe.style.marginWidth=0,this.updateFormSize(this.msFormScaledSize),this.$el.appendChild(this.iframe))},beforeDestroy:function(){this.iframe&&this.iframe.remove(),delete this.iframe,this.isMobile&&(document.body.style["overscroll-behavior-y"]="",document.body.style.overflow="")},computed:{formContainerStyle:function(){return{"background-color":"google"===this.provider?"#fff":null}},isMobile:function(){return this.$store.getters["workspace/isMobile"]}},methods:{updateFormSize:function(t){t?(this.iframe.style.width="".concat(t.width,"px"),this.iframe.style.height="".concat(t.height,"px"),this.iframe.style.transform="scale(".concat(t.scale,")"),this.iframe.style["transform-origin"]="left top"):(this.iframe.style.width="100%",this.iframe.style.height="100%",this.iframe.style.transform=null,this.iframe.style["transform-origin"]=null)}}},a=(0,i(1900).Z)(n,s,o,!1,null,null,null).exports},4186:function(t,e,i){var s={"./":[2565,11],"./arrow":[4902,16],"./arrow.js":[4902,16],"./audio":[2400,10],"./audio.js":[2400,10],"./cart":[7875,19],"./cart.js":[7875,19],"./close":[5483,17],"./close.js":[5483,17],"./error":[6177],"./error.js":[6177],"./gallery":[7537,18],"./gallery.js":[7537,18],"./gif":[4582,15],"./gif.js":[4582,15],"./image":[4136,14],"./image.js":[4136,14],"./index":[2565,11],"./index.js":[2565,11],"./made-with":[5284],"./made-with.js":[5284],"./page":[9719],"./page-wide":[1619],"./page-wide.js":[1619],"./page.js":[9719],"./pause":[8175,20],"./pause.js":[8175,20],"./play":[9783,23],"./play.js":[9783,23],"./point":[9596,22],"./point.js":[9596,22],"./replay":[148],"./replay.js":[148]};function o(t){if(!i.o(s,t))return Promise.resolve().then((function(){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}));var e=s[t],o=e[0];return Promise.all(e.slice(1).map(i.e)).then((function(){return i.t(o,23)}))}o.keys=function(){return Object.keys(s)},o.id=4186,t.exports=o}}]);