!function(){var e={101:function(){var e,t,i;function n(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}(t=t||(e=[],{getAll:function(){return e},removeAll:function(){e=[]},add:function(t){e.push(t)},remove:function(t){var i=e.indexOf(t);-1!==i&&e.splice(i,1)},update:function(t){if(0===e.length)return!1;var i=0;for(t=null!=t?t:window.performance.now();i1?1:w,P=d(w),a)if(null!=i[h]){var h,w,P,S=i[h]||0,x=a[h];n(x,Array)?e[h]=f(x,P):("string"==typeof x&&(x=x.startsWith("+")||x.startsWith("-")?S+parseFloat(x,10):parseFloat(x,10)),"number"==typeof x&&(e[h]=S+(x-S)*P))}if(null!=y&&y.call(e,P),1===w){if(r>0){for(h in isFinite(r)&&r--,s){if("string"==typeof a[h]&&(s[h]=s[h]+parseFloat(a[h],10)),l){var C=s[h];s[h]=a[h],a[h]=C}i[h]=s[h]}l&&(u=!u),c=t+p}else{null!=b&&b.call(e);for(var E=0,T=g.length;E1?o(e[n],e[n-1],n-a):o(e[s],e[s+1>n?n:s+1],a-s)},Bezier:function(e,i){for(var n=0,a=e.length-1,s=Math.pow,o=t.Interpolation.Utils.Bernstein,r=0;r<=a;r++)n+=s(1-i,a-r)*s(i,r)*e[r]*o(a,r);return n},Utils:{Linear:function(e,t,i){return(t-e)*i+e},Bernstein:function(e,i){var n=t.Interpolation.Utils.Factorial;return n(e)/n(i)/n(e-i)},Factorial:(i=[1],function(e){var t=1;if(i[e])return i[e];for(var n=e;n>1;n--)t*=n;return i[e]=t,t}),CatmullRom:function(e,t,i,n,a){var s=(i-e)*.5,o=(n-t)*.5,r=a*a;return a*r*(2*t-2*i+s+o)+(-3*t+3*i-2*s-o)*r+s*a+t}}},window.TWEEN=t}},t={};function i(n){var a=t[n];if(void 0!==a)return a.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,i),s.exports}i.amdO={},function(){"use strict";var e,t,n={jQuery:jQuery,version:"2.3.57",autoDetectLocation:!0,slug:void 0,locationVar:"dearViewerLocation",locationFile:void 0,MOUSE_CLICK_ACTIONS:{NONE:"none",NAV:"nav"},ARROW_KEYS_ACTIONS:{NONE:"none",NAV:"nav"},MOUSE_DBL_CLICK_ACTIONS:{NONE:"none",ZOOM:"zoom"},MOUSE_SCROLL_ACTIONS:{NONE:"none",ZOOM:"zoom",NAV:"nav"},PAGE_SCALE:{PAGE_FIT:"fit",PAGE_WIDTH:"width",AUTO:"auto",ACTUAL:"actual",MANUAL:"manual"},READ_DIRECTION:{LTR:"ltr",RTL:"rtl"},TURN_DIRECTION:{LEFT:"left",RIGHT:"right",NONE:"none"},INFO_TYPE:{INFO:"info",ERROR:"error"},FLIPBOOK_PAGE_MODE:{SINGLE:"single",DOUBLE:"double",AUTO:"auto"},FLIPBOOK_SINGLE_PAGE_MODE:{ZOOM:"zoom",BOOKLET:"booklet",AUTO:"auto"},FLIPBOOK_PAGE_SIZE:{AUTO:"auto",SINGLE:"single",DOUBLE_INTERNAL:"dbl_int",DOUBLE:"dbl",DOUBLE_COVER_BACK:"dbl_cover_back"},LINK_TARGET:{NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4},CONTROLS_POSITION:{HIDDEN:"hidden",TOP:"top",BOTTOM:"bottom"},TURN_CORNER:{TL:"tl",TR:"tr",BL:"bl",BR:"br",L:"l",R:"r",NONE:"none"},REQUEST_STATUS:{OFF:"none",ON:"pending",COUNT:"counting"},TEXTURE_TARGET:{THUMB:0,VIEWER:1,ZOOM:2},FLIPBOOK_CENTER_SHIFT:{RIGHT:1,LEFT:-1,NONE:0},FLIPBOOK_COVER_TYPE:{NONE:"none",PLAIN:"plain",BASIC:"basic",RIDGE:"ridge"}};function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i'),cMapUrl:"js/libs/cmaps/",logo:"",logoUrl:"",sharePrefix:"",pageSize:n.FLIPBOOK_PAGE_SIZE.AUTO,backgroundImage:"",pixelRatio:window.devicePixelRatio||1,spotLightIntensity:.22,ambientLightColor:"#fff",ambientLightIntensity:.8,shadowOpacity:.1,slug:void 0,headerElementSelector:void 0,onReady:function(e){},onPageChanged:function(e){},beforePageChanged:function(e){},onCreate:function(e){},onCreateUI:function(e){},onFlip:function(e){},beforeFlip:function(e){},autoPDFLinktoViewer:!1,autoLightBoxFullscreen:!1,thumbLayout:"book-title-hover",cleanupAfterRender:!0,canvasWillReadFrequently:!0,providerType:"pdf",loadMoreCount:-1,autoPlay:!1,autoPlayDuration:1e3,autoPlayStart:!1,popupBackGroundColor:"#eee",mockupMode:!1,instantTextureProcess:!1,cachePDFTexture:!1,pdfVersion:"default"},n.defaults={},n.jQuery.extend(!0,n.defaults,n._defaults),n.viewers={},n.providers={},n.openFileOptions={},n.executeCallback=function(){};var s=n.jQuery,o="WebKitCSSMatrix"in window||document.body&&"MozPerspective"in document.body.style,r="onmousedown"in window,l=n.utils={mouseEvents:r?{type:"mouse",start:"mousedown",move:"mousemove",end:"mouseup"}:{type:"touch",start:"touchstart",move:"touchmove",end:"touchend"},html:{div:"
",a:"",input:"",select:""},getSharePrefix:function(){return l.getSharePrefixes()[0]},getSharePrefixes:function(){return(n.defaults.sharePrefix+",dflip-,flipbook-,dearflip-,dearpdf-").split(",").map(function(e){return e.trim()})},toRad:function(e){return e*Math.PI/180},toDeg:function(e){return 180*e/Math.PI},ifdef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return null==e?t:e},createBtn:function(e,t,i){var n=s(l.html.div,{class:"df-ui-btn df-ui-"+e,title:i,html:void 0!==i?""+i+"":""});return void 0!==t&&t.indexOf("-1?n.html(t.replace("-1&&(t.href.indexOf("https://")>-1?e=e.replace("http://","https://"):t.href.indexOf("http://")>-1&&(e=e.replace("https://","http://")),t.href.indexOf("://www.")>-1&&-1===e.indexOf("://www.")&&(e=e.replace("://","://www.")),-1===t.href.indexOf("://www.")&&e.indexOf("://www.")>-1&&(e=e.replace("://www.","://")))}catch(t){console.log("Skipping URL correction: "+e)}return e},rotateStr:function(e){return" rotateZ("+e+"deg) "},lowerPowerOfTwo:function(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))},nearestPowerOfTwo:function(e,t){return Math.min(t||2048,Math.pow(2,Math.ceil(Math.log(e)/Math.LN2)))},getFullscreenElement:function(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement},hasFullscreenEnabled:function(){return document.fullscreenEnabled||document.mozFullScreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled},fixMouseEvent:function(e){if(!e)return e;var t=e.originalEvent||e;if(!t.changedTouches||!(t.changedTouches.length>0))return e;var i=s.event.fix(e),n=t.changedTouches[0];return i.clientX=n.clientX,i.clientY=n.clientY,i.pageX=n.pageX,i.touches=t.touches,i.pageY=n.pageY,i.movementX=n.movementX,i.movementY=n.movementY,i},limitAt:function(e,t,i){return ei?i:e},distOrigin:function(e,t){return l.distPoints(0,0,e,t)},distPoints:function(e,t,i,n){return Math.sqrt(Math.pow(i-e,2)+Math.pow(n-t,2))},angleByDistance:function(e,t){var i=t/2,n=l.limitAt(e,0,t);return n-1||e.indexOf("/"+n.locationFile+".min.js")>-1||e.indexOf("js/"+n.locationFile+".")>-1)&&(e.indexOf("https://")>-1||e.indexOf("http://")>-1)){var t=e.split("/");window[n.locationVar]=t.slice(0,-2).join("/")}});else if(-1==window[n.locationVar].indexOf(":")){var e=document.createElement("a");e.href=window[n.locationVar],window[n.locationVar]=e.href,e=null}void 0!==window[n.locationVar]&&window[n.locationVar].length>2&&"/"!==window[n.locationVar].slice(-1)&&(window.window[n.locationVar]+="/")},disposeObject:function(e){return e&&e.dispose&&e.dispose(),e=null},log:function(){for(var e,t=arguments.length,i=Array(t),s=0;sl.color.getBrightness(e)}},isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),isIOS:/(iPad|iPhone|iPod)/g.test(navigator.userAgent),isIPad:"iPad"===navigator.platform||void 0!==navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/Mac/.test(navigator.platform),isMac:navigator.platform.toUpperCase().indexOf("MAC")>=0,isSafari:/constructor/i.test(window.HTMLElement)||"[object SafariRemoteNotification]"===(!window.safari||window.safari.pushNotification).toString(),isIEUnsupported:!!navigator.userAgent.match(/(MSIE|Trident)/),isSafariWindows:function(){return!l.isMac&&l.isSafari},hasWebgl:function(){try{var e=document.createElement("canvas");return!!(window.WebGLRenderingContext&&(e.getContext("webgl")||e.getContext("experimental-webgl")))}catch(e){return!1}}(),hasES2022:void 0!==Array.prototype.at,canSupport3D:function(){var e=!0;try{if(!1==l.hasWebgl)e=!1,console.log("Proper Support for Canvas webgl 3D not detected!");else if(!1==l.hasES2022)e=!1,console.log("Proper Support for 3D not extpected in older browser!");else if(-1!==navigator.userAgent.indexOf("MSIE")||navigator.appVersion.indexOf("Trident/")>0)e=!1,console.log("Proper Support for 3D not detected for IE!");else if(l.isSafariWindows())e=!1,console.log("Proper Support for 3D not detected for Safari!");else{var t=navigator.userAgent.toString().toLowerCase().match(/android\s([0-9\.]*)/i);(t=t?t[1]:void 0)&&(t=parseInt(t,10),!isNaN(t)&&t<9&&(e=!1,console.log("Proper Support for 3D not detected for Android below 9.0!")))}}catch(e){}return e},prefix:(e=window.getComputedStyle(document.documentElement,""),t=Array.prototype.slice.call(e).join("").match(/-(moz|webkit|ms)-/)[1],{dom:"WebKit|Moz|MS".match(RegExp("("+t+")","i"))[1],lowercase:t,css:"-"+t+"-",js:t[0].toUpperCase()+t.substr(1)}),scrollIntoView:function(e,t,i){(t=t||e.parentNode).scrollTop=e.offsetTop+(!1===i?e.offsetHeight-t.offsetHeight:0),t.scrollLeft=e.offsetLeft-t.offsetLeft},getVisibleElements:function(e){var t=e.container,i=e.elements,n=e.visible||[],a=t.scrollTop,s=a+t.clientHeight;if(0==s)return n;var o=0,r=i.length-1,l=i[o],h=l.offsetTop+l.clientTop+l.clientHeight;if(h>1;(h=(l=i[u]).offsetTop+l.clientTop+l.clientHeight)>a?r=u:o=u+1}for(var p=o;p2&&void 0!==arguments[2]&&arguments[2],n=e.startPoint,a=e.app.zoomValue,s=e.left+(!0===i?0:t.raw.x-n.raw.x),o=e.top+(!0===i?0:t.raw.y-n.raw.y);e.left=Math.ceil(l.limitAt(s,-e.shiftWidth,e.shiftWidth)),e.top=Math.ceil(l.limitAt(o,-e.shiftHeight,e.shiftHeight)),1===a&&(e.left=0,e.top=0),!1===i&&(e.startPoint=t)}};l.isChromeExtension=function(){return 0===window.location.href.indexOf("chrome-extension://")};var h=/\x00+/g,u=/[\x01-\x1F]/g;l.removeNullCharacters=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"string"!=typeof e?(warn("The argument for removeNullCharacters must be a string."),e):(t&&(e=e.replace(u," ")),e.replace(h,""))},n.hashFocusBookFound=!1,l.detectHash=function(){n.preParseHash=window.location.hash;var e=l.getSharePrefixes();-1==e.indexOf("")&&e.push(""),Array.prototype.forEach.call(e,function(e){var t=n.preParseHash;if(t&&t.indexOf(e)>=0&&!1===n.hashFocusBookFound){e.length>0&&(t=t.split(e)[1]);var i=t.split("/")[0].replace("#","");if(i.length>0){var a,o=t.split("/")[1];if(null!=o&&(o=o.split("/")[0]),0===(a=s("[data-df-slug="+i+"]")).length&&(a=s("[data-slug="+i+"]")),0===a.length&&(a=s("#df-"+i+",#"+i)),0===a.length&&(a=s("[data-_slug="+i+"]")),a.length>0&&a.is("._df_thumb,._df_button,._df_custom,._df_link,._df_book,.df-element,.dp-element")){a=s(a[0]),n.hashFocusBookFound=!0,o=parseInt(o,10),l.focusHash(a);var r=n.activeLightBox&&n.activeLightBox.app||a.data("df-app");if(null!=r)return r.gotoPage(o),r.hashNavigationEnabled=!0,l.focusHash(r.element),!1;null!=o&&a.attr("data-hash-page",o),a.addClass("df-hash-focused",!0),null!=a.data("lightbox")||null!=a.data("df-lightbox")?a.trigger("click"):null!=a.attr("href")&&a.attr("href").indexOf(".pdf")>-1&&a.trigger("click")}}}})},l.focusHash=function(e){var t,i;null===(t=(i=e[0]).scrollIntoView)||void 0===t||t.call(i,{behavior:"smooth",block:"nearest",inline:"nearest"})},l.contain=function(e,t,i,n){var a=Math.min(i/e,n/t);return{width:e*a,height:t*a}},l.containUnStretched=function(e,t,i,n){var a=Math.min(1,i/e,n/t);return{width:e*a,height:t*a}},l.fallbackOptions=function(e){return void 0===e.share.mail&&(e.share.mail="mailto:?subject="+e.text.mailSubject+"&body="+e.text.mailBody),e.openPage&&(e.openPage=parseInt(e.openPage,10)),e};var p=function(e){var t={},i={id:"",thumb:"",openPage:"data-hash-page,df-page,data-df-page,data-page,page",target:"",height:"",showDownloadControl:"data-download",source:"pdf-source,df-source,source",is3D:"webgl,is3d",viewerType:"viewertype,viewer-type",pagemode:""};for(var n in i)for(var a=(n+","+i[n]).split(","),s=0;s2&&void 0!==arguments[2]?arguments[2]:0;return e?(i=t>135?180-(180-t)*2:t>45?t-45:0,i=l.limitAt(i,n,180)):(i=t<45?2*t:t<135?t+45:180,i=l.limitAt(i,0,180-n)),i},l.sanitizeOptions=function(e){var t,i;if(e.showDownloadControl=l.parseBoolIfExists(e.showDownloadControl),e.showSearchControl=l.parseBoolIfExists(e.showSearchControl),e.showPrintControl=l.parseBoolIfExists(e.showPrintControl),e.flipbook3DTiltAngleLeft=l.parseIntIfExists(e.flipbook3DTiltAngleLeft),e.flipbook3DTiltAngleUp=l.parseIntIfExists(e.flipbook3DTiltAngleUp),e.paddingLeft=l.parseIntIfExists(e.paddingLeft),e.paddingRight=l.parseIntIfExists(e.paddingRight),e.paddingTop=l.parseIntIfExists(e.paddingTop),e.paddingBottom=l.parseIntIfExists(e.paddingBottom),e.duration=l.parseIntIfExists(e.duration),e.rangeChunkSize=l.parseIntIfExists(e.rangeChunkSize),e.maxTextureSize=l.parseIntIfExists(e.maxTextureSize),e.linkTarget=l.parseIntIfExists(e.linkTarget),e.zoomRatio=l.parseFloatIfExists(e.zoomRatio),e.enableAnalytics=l.parseBoolIfExists(e.enableAnalytics),e.autoPlay=l.parseBoolIfExists(e.autoPlay),e.autoPlayStart=l.parseBoolIfExists(e.autoPlayStart),e.autoPlayDuration=l.parseIntIfExists(e.autoPlayDuration),void 0!==e.loadMoreCount&&(e.loadMoreCount=l.parseInt(e.loadMoreCount),(isNaN(e.loadMoreCount)||0===e.loadMoreCount)&&(e.loadMoreCount=-1)),null!=e.source&&(Array===e.source.constructor||Array.isArray(e.source)||(t=e.source,null!=(i=Array)&&"undefined"!=typeof Symbol&&i[Symbol.hasInstance]?!!i[Symbol.hasInstance](t):t instanceof i)))for(var n=0;n0&&-1===e.indexOf("http:")&&-1===e.indexOf("https:"))return l.log("AutoLink Rejected: "+s+" for "+e),e;if(0===e.indexOf("www."))s="http://"+e;else if(0===e.indexOf("http://")||0===e.indexOf("https://"));else if(0===e.indexOf("mailto:"));else if(e.indexOf("@")>0&&(s="mailto:"+e,null===e.match(/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/)))return l.log("AutoLink Rejected: "+s+" for "+e),e;return l.log("AutoLink: "+s+" for "+e),''+e+""})},l.supportsPassive=!1;try{var c=Object.defineProperty({},"passive",{get:function(){l.supportsPassive=!0}});window.addEventListener("testPassive",null,c),window.removeEventListener("testPassive",null,c)}catch(e){}n.parseCSSElements=function(){s(".dvcss").each(function(){var e,t=s(this),i=function(e){for(var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"dvcss_e_",n=e.classList,a=0;a").html(e.title),i=s("
").appendTo(e.element);i.append(s("
")),i.append(s("
"));var a=s("
").append(t).appendTo(i),o=s(''+e.title+'');o.attr("data-src",e.thumbURL),o.attr("src",n.defaults.popupThumbPlaceholder),a.prepend(o),n.addLazyElement(o[0]),!0===n.defaults.displayLightboxPlayIcon&&a.addClass("df-icon-play-popup"),"book-title-top"===e.thumbLayout?t.prependTo(e.element):("book-title-bottom"===e.thumbLayout||"cover-title"===e.thumbLayout)&&(e.hasShelf?e.thumbLayout="book-title-fixed":t.appendTo(e.element),!0===n.defaults.displayLightboxPlayIcon&&(e.element.removeClass("df-icon-play-popup"),i.addClass("df-icon-play-popup"))),e.element.addClass("df-tl-"+e.thumbLayout),e.element.attr("title",e.title)},n.initId=10,n.embeds=[],n.activeEmbeds=[],n.removeEmbeds=[],n.removeEmbedsLimit=l.isMobile?1:2,n.parseNormalElements=function(){s(".df-posts").each(function(){if(!1!==n.defaults.loadMoreCount&&-1!==n.defaults.loadMoreCount){var e=s(this);if("true"!==e.data("df-parsed")){e.data("df-parsed","true"),e.attr("df-parsed","true");var t=0,i=e.find(".df-element"),a=i.length;i.each(function(){++t>n.defaults.loadMoreCount&&s(this).attr("skip-parse","true")}),a>n.defaults.loadMoreCount&&e.append("
Load More..
")}}}),n.triggerId=10,s(".df-element").each(function(){var e=s(this);if("true"!==e.attr("skip-parse")&&"true"!==e.data("df-parsed")){e.data("df-parsed","true"),e.attr("df-parsed","true");var t=e.data("df-lightbox")||e.data("lightbox");if(void 0===t)e.addClass("df-lazy-embed"),n.addLazyElement(e[0]);else if(e.addClass("df-popup-"+t),"thumb"===t){var i=e.data("df-thumb-layout")||n.defaults.thumbLayout,a=l.httpsCorrection(e.data("df-thumb"));e.removeAttr("data-thumb").removeAttr("data-thumb-layout");var o=e.html().trim();(void 0===o||""===o)&&(o="Click to Open");var r=e.parent().hasClass("df-has-shelf");n.parseThumbs({element:e,thumbURL:a,title:o,thumbLayout:i,hasShelf:r}),r&&e.after(s(""))}else"button"===t&&n.defaults.buttonClass&&e.addClass(n.defaults.buttonClass);var h=e.attr("data-trigger");null!=h&&h.length>1&&(h=h.split(","),n.triggerId++,h.forEach(function(t){e.attr("df-trigger-id",n.triggerId),s("#"+t).addClass("df-trigger").attr("df-trigger",n.triggerId)}))}}),n.handleLazy=function(){var e;if(n.removeEmbeds.length>n.removeEmbedsLimit&&(e=n.removeEmbeds.shift())){var t=s("[initID='"+e+"']");if(t.length>0){var i=t.data("df-app");if(i){t.attr("data-df-page",i.currentPageNumber),l.log("Removed app id "+e),i.dispose(),i=null;var a=n.activeEmbeds.indexOf(e);a>-1&&n.activeEmbeds.splice(a,1)}}}if(e=n.embeds.shift()){var o=s("[initID='"+e+"']");if(o.length>0){if(o.is("img"))o.hasClass("df-lazy")?(o.attr("src",o.attr("data-src")),o.removeAttr("data-src"),o.removeClass("df-lazy"),n.lazyObserver.unobserve(o[0])):l.log("Prevent this"),n.handleLazy();else{var r=o.data("df-app");null==r?o.dearviewer():r.softInit(),l.log("Created app id "+e),n.activeEmbeds.push(e)}}}n.removeEmbeds.length<=n.removeEmbedsLimit&&0==n.embeds.length&&(n.checkRequestQueue=null)}},n.lazyObserver={observe:function(e){(e=s(e)).is("img")?e.hasClass("df-lazy")&&(e.attr("src",e.attr("data-src")),e.removeAttr("data-src"),e.removeClass("df-lazy")):e.dearviewer()}},"function"==typeof IntersectionObserver&&(n.lazyObserver=new IntersectionObserver(function(e,t){e.forEach(function(e){var t,i=s(e.target),a=i.attr("initID");e.isIntersecting?(!i.attr("initID")&&(i.attr("initID",n.initId),a=n.initId.toString(),n.initId++),(t=n.removeEmbeds.indexOf(a))>-1?(n.removeEmbeds.splice(t,1),l.log("Removed id "+a+"from Removal list")):-1==(t=n.embeds.indexOf(a))&&(n.embeds.push(a),l.log("Added id "+a+"to Add list"))):a&&((t=n.embeds.indexOf(a))>-1?(n.embeds.splice(t,1),l.log("Removed id "+a+" from Add list")):-1==(t=n.removeEmbeds.indexOf(a))&&(n.removeEmbeds.push(a),l.log("Added id "+a+" to Removal list"))),d=0,(n.removeEmbeds.length>n.removeEmbedsLimit||n.embeds.length>0)&&null==n.checkRequestQueue&&(n.checkRequestQueue=function(){d++,n.checkRequestQueue&&requestAnimationFrame(function(){n&&n.checkRequestQueue&&n.checkRequestQueue()}),d>20&&(d=0,n.handleLazy())},n.checkRequestQueue())})}));var d=0;n.addLazyElement=function(e){n.lazyObserver.observe(e)},n.parseElements=l.parseElements=function(){n.parseCSSElements(),n.parseNormalElements()},n.initUtils=function(){l.detectScriptLocation();var e=s("body");(l.isSafari||l.isIOS)&&e.addClass("df-ios"),e.on("click",function(){}),e.on("click",".df-posts .df-load-more-button",function(){var e=s(this).closest(".df-posts");if(e.length>0){var t=0;e.find(".df-element").each(function(){var e=s(this);"true"===e.attr("skip-parse")&&(t.df-has-shelf df-post-shelf:before, .df-has-shelf df-post-shelf:after{background-image: url('"+n.defaults.shelfImage+"');}")};var f=n.utils,g=function(){var e;function t(e,i){(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")})(this,t),this.pages=[],this.app=i,this.parentElement=this.app.viewerContainer;var n="df-viewer "+(e.viewerClass||"");this.element=jQuery("
",{class:n}),this.parentElement.append(this.element),this.wrapper=jQuery("
",{class:"df-viewer-wrapper"}),this.element.append(this.wrapper),this.oldBasePageNumber=0,this.pages=[],this.minZoom=1,this.maxZoom=4,this.swipeThreshold=20,this.stageDOM=null,this.events={},this.arrowKeysAction=e.arrowKeysAction,this.clickAction=e.clickAction,this.scrollAction=e.scrollAction,this.dblClickAction=e.dblClickAction,this.pageBuffer=[],this.pageBufferSize=10}return e=[{key:"init",value:function(){}},{key:"softDispose",value:function(){}},{key:"updateBuffer",value:function(e){}},{key:"pageResetCallback",value:function(e){}},{key:"initCustomControls",value:function(){}},{key:"_getInnerWidth",value:function(){return this.app.dimensions.containerWidth-this.app.dimensions.padding.width-this.app.dimensions.offset.width}},{key:"_getInnerHeight",value:function(){return this.app.dimensions.maxHeight-this.app.dimensions.padding.height}},{key:"_getOuterHeight",value:function(e){return e}},{key:"dispose",value:function(){this.stageDOM&&(this.stageDOM.removeEventListener("mousemove",this.events.mousemove,!1),this.stageDOM.removeEventListener("mousedown",this.events.mousedown,!1),this.stageDOM.removeEventListener("mouseup",this.events.mouseup,!1),this.stageDOM.removeEventListener("touchmove",this.events.mousemove,!1),this.stageDOM.removeEventListener("touchstart",this.events.mousedown,!1),this.stageDOM.removeEventListener("touchend",this.events.mouseup,!1),this.stageDOM.removeEventListener("dblclick",this.events.dblclick,!1),this.stageDOM.removeEventListener("scroll",this.events.scroll,!1),this.stageDOM.removeEventListener("mousewheel",this.events.mousewheel,!1),this.stageDOM.removeEventListener("DOMMouseScroll",this.events.mousewheel,!1)),this.events=null,this.stageDOM=null,this.element.remove()}},{key:"checkDocumentPageSizes",value:function(){}},{key:"getViewerPageNumber",value:function(e){return e}},{key:"getDocumentPageNumber",value:function(e){return e}},{key:"getRenderContext",value:function(e,t){var i=this.app,a=i.provider,s=t.pageNumber,o=f.ifdef(t.textureTarget,n.TEXTURE_TARGET.VIEWER);i.dimensions.pageFit;var r=a.viewPorts[s],l=i.viewer.getTextureSize(t),h=null;if(h=o===n.TEXTURE_TARGET.THUMB?i.thumbSize:Math.floor(l.height),void 0===a.getCache(s,h)){var u=l.height/r.height,p=document.createElement("canvas"),c=this.filterViewPort(e.getViewport({scale:u,rotation:e._pageInfo.rotate+i.options.pageRotation}),s);o===n.TEXTURE_TARGET.THUMB&&(u=c.width/c.height>180/i.thumbSize?180*u/c.width:u*i.thumbSize/c.height,c=this.filterViewPort(e.getViewport({scale:u,rotation:e._pageInfo.rotate+i.options.pageRotation}),s)),p.height=Math.floor(c.height),p.width=Math.floor(c.width);var d=Math.abs(p.width-l.width)/l.width*100;return d>.001&&d<2&&(p.width=Math.floor(l.width),p.height=Math.floor(l.height)),i.viewer.filterViewPortCanvas(c,p,s),{canvas:p,canvasContext:p.getContext("2d",{willReadFrequently:!0===n.defaults.canvasWillReadFrequently}),viewport:c}}}},{key:"filterViewPort",value:function(e,t){return e}},{key:"getViewPort",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.app.provider.viewPorts[e];return t?null!=i?i:this.app.provider.defaultPage.viewPort:i}},{key:"pagesReady",value:function(){}},{key:"onReady",value:function(){}},{key:"filterViewPortCanvas",value:function(e){}},{key:"finalizeAnnotations",value:function(){}},{key:"finalizeTextContent",value:function(){}},{key:"updateTextContent",value:function(e){void 0==e&&(e=this.getBasePage(e)),this.app.provider.processTextContent(e,this.getTextElement(e,!0))}},{key:"isActivePage",value:function(e){return e===this.app.currentPageNumber}},{key:"initEvents",value:function(){var e=this.stageDOM=f.ifdef(this.stageDOM,this.parentElement[0]);e&&(e.addEventListener("mousemove",this.events.mousemove=this.mouseMove.bind(this),!1),e.addEventListener("mousedown",this.events.mousedown=this.mouseDown.bind(this),!1),e.addEventListener("mouseup",this.events.mouseup=this.mouseUp.bind(this),!1),e.addEventListener("touchmove",this.events.mousemove=this.mouseMove.bind(this),!1),e.addEventListener("touchstart",this.events.mousedown=this.mouseDown.bind(this),!1),e.addEventListener("touchend",this.events.mouseup=this.mouseUp.bind(this),!1),e.addEventListener("dblclick",this.events.dblclick=this.dblclick.bind(this),!1),e.addEventListener("scroll",this.events.scroll=this.onScroll.bind(this),!1),e.addEventListener("mousewheel",this.events.mousewheel=this.mouseWheel.bind(this),!1),e.addEventListener("DOMMouseScroll",this.events.mousewheel=this.mouseWheel.bind(this),!1)),this.startTouches=null,this.lastScale=null,this.startPoint=null}},{key:"refresh",value:function(){}},{key:"reset",value:function(){}},{key:"eventToPoint",value:function(e){var t={x:e.clientX,y:e.clientY};return t.x=t.x-this.app.viewerContainer[0].getBoundingClientRect().left,t.y=t.y-this.app.viewerContainer[0].getBoundingClientRect().top,{raw:t}}},{key:"mouseMove",value:function(e){e=f.fixMouseEvent(e),this.pinchMove(e),!0===this.pinchZoomDirty&&e.preventDefault(),this.startPoint&&!0!=this.pinchZoomDirty&&(this.pan(this.eventToPoint(e)),e.preventDefault())}},{key:"mouseDown",value:function(e){e=f.fixMouseEvent(e),this.pinchDown(e),this.startPoint=this.eventToPoint(e)}},{key:"mouseUp",value:function(e){e=f.fixMouseEvent(e),!0===this.pinchZoomDirty&&e.preventDefault();var t=this.eventToPoint(e),i=e.target||e.originalTarget,n=this.startPoint&&t.x===this.startPoint.x&&t.y===this.startPoint.y&&"A"!==i.nodeName;!0===e.ctrlKey&&n&&this.zoomOnPoint(t),this.pinchUp(e),this.startPoint=null}},{key:"pinchDown",value:function(e){null!=e.touches&&2==e.touches.length&&null==this.startTouches&&(this.startTouches=f.getTouches(e),this.app.viewer.zoomCenter=f.getVectorAvg(f.getTouches(e,this.parentElement.offset())),this.lastScale=1)}},{key:"pinchUp",value:function(e){null!=e.touches&&e.touches.length<2&&!0==this.pinchZoomDirty&&(this.app.viewer.lastScale=this.lastScale,this.app.container.removeClass("df-pinch-zoom"),this.updateTemporaryScale(!0),this.app.zoom(),this.lastScale=null,this.app.viewer.canSwipe=!1,this.pinchZoomDirty=!1,this.app.viewer._pinchZoomLastScale=null,this.startTouches=null)}},{key:"pinchMove",value:function(e){if(null!=e.touches&&2==e.touches.length&&null!=this.startTouches){this.pinchZoomDirty=!0,this.app.container.addClass("df-pinch-zoom");var t=f.calculateScale(this.startTouches,f.getTouches(e));this.lastScale,this.lastScale=t,this.app.viewer.pinchZoomUpdateScale=f.limitAt(t,this.app.viewer.minZoom/this.app.zoomValue,this.app.viewer.maxZoom/this.app.zoomValue),this.app.viewer._pinchZoomLastScale!=this.app.viewer.pinchZoomUpdateScale&&(this.app.viewer.pinchZoomRequestStatus=n.REQUEST_STATUS.ON,this.app.viewer._pinchZoomLastScale=this.app.viewer.pinchZoomUpdateScale),e.preventDefault();return}}},{key:"updateTemporaryScale",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!0===e)this.parentElement[0].style.transform="none";else if(this.app.viewer.zoomCenter){var t=this.app.viewer.pinchZoomUpdateScale;this.parentElement[0].style.transformOrigin=this.app.viewer.zoomCenter.x+"px "+this.app.viewer.zoomCenter.y+"px",this.parentElement[0].style.transform="scale3d("+t+","+t+",1)"}}},{key:"pan",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.panRequestStatus=n.REQUEST_STATUS.ON,f.pan(this,e,t)}},{key:"updatePan",value:function(){this.element.css({transform:"translate3d("+this.left+"px,"+this.top+"px,0)"})}},{key:"dblclick",value:function(e){}},{key:"onScroll",value:function(e){}},{key:"mouseWheel",value:function(e){var t=this.app,i=f.getMouseDelta(e),a=!0===e.ctrlKey,s=t.options.mouseScrollAction===n.MOUSE_SCROLL_ACTIONS.ZOOM&&(!0===t.options.isLightBox||!0===t.isFullscreen);a||s?(i>0||i<0)&&(e.preventDefault(),t.viewer.zoomCenter=this.eventToPoint(e).raw,t.zoom(i),t.ui.update()):t.options.mouseScrollAction===n.MOUSE_SCROLL_ACTIONS.NAV&&(i>0?t.next():i<0&&t.prev())}},{key:"zoomOnPoint",value:function(e){this.app.viewer.zoomCenter=e.raw,this.app.zoom(1)}},{key:"getVisiblePages",value:function(){return this.visiblePagesCache=[],{main:this.visiblePagesCache,buffer:[]}}},{key:"getBasePage",value:function(){return this.app.currentPageNumber}},{key:"isFirstPage",value:function(e){return void 0===e&&(e=this.app.currentPageNumber),1===e}},{key:"isLastPage",value:function(e){return void 0===e&&(e=this.app.currentPageNumber),e===this.app.pageCount}},{key:"isEdgePage",value:function(e){return void 0===e&&(e=this.app.currentPageNumber),1===e||e===this.app.pageCount}},{key:"checkRequestQueue",value:function(){var e=n.REQUEST_STATUS;this.panRequestStatus===e.ON&&(this.updatePan(),this.panRequestStatus=e.OFF),this.app.viewer.pinchZoomRequestStatus===e.ON&&(this.app.viewer.updateTemporaryScale(),this.app.viewer.pinchZoomRequestStatus=e.OFF)}},{key:"isAnimating",value:function(){return!1}},{key:"updatePendingStatusClass",value:function(e){void 0===e&&(e=this.isAnimating()),this.app.container.toggleClass("df-pending",e)}},{key:"initPages",value:function(){}},{key:"resize",value:function(){}},{key:"determinePageMode",value:function(){}},{key:"zoom",value:function(){}},{key:"gotoPageCallBack",value:function(){this.requestRefresh()}},{key:"requestRefresh",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];this.app.refreshRequestStatus=!0===e?n.REQUEST_STATUS.ON:n.REQUEST_STATUS.OFF}},{key:"getPageByNumber",value:function(e){var t=this.pages,i=void 0;if(this.app.isValidPage(e)){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1],i=this.getPageByNumber(e);if(void 0!==i)return void 0===i.annotationElement&&(i.annotationElement=jQuery("