PageSourceSearch

https://www.gemeinde-ziethen.de/wp-content/plugins/real3d-flipbook-lite/js/flipbook.min.js?ver=5.5

js gemeinde-ziethen.de collected 2026-10-02 22:01:25 UTC 190,621 bytes, 1 lines download raw bytes

1"use strict";var FLIPBOOK=FLIPBOOK||{};FLIPBOOK.version="5.4.1",FLIPBOOK.tierSource=function(t,e){if(!t||"string"==typeof t||t.src||t.tagName||t.width)return t;if(t[e])return t[e];var i=Object.keys(t);return i.length?t[i[i.length-1]]:null},function(t,e,i){"undefined"!=typeof jQuery&&(jQuery.fn.flipBook=function(t){return new FLIPBOOK.Main(t,this)},jQuery.fn.swipeBook=function(t){return t.viewMode="swipe",new FLIPBOOK.Main(t,this)}),t.FlipBook=function(t,e){return new FLIPBOOK.Main(e,t)}}(window,document),FLIPBOOK.Main=class{static defaultOptions={name:"",pages:[],tableOfContent:[],tableOfContentCloseOnClick:!0,thumbsCloseOnClick:!0,thumbsStyle:"overlay",thumbsDefaultView:"strip",deeplinkingEnabled:!1,deeplinkingPrefix:"",assets:{flipMp3:"assets/mp3/turnPage.mp3",backgroundMp3:"assets/mp3/background.mp3"},pdfUrl:null,rangeChunkSize:256,disableRange:!1,disableStream:!0,disableAutoFetch:!0,pdfAutoLinks:!1,htmlLayer:!0,rightToLeft:!1,startPage:0,sound:!0,backgroundColor:"rgb(81, 85, 88)",backgroundImage:"",backgroundPattern:"",backgroundTransparent:!1,thumbSize:150,loadAllPages:!1,loadPagesF:2,loadPagesB:1,autoplayOnStart:!1,autoplayInterval:3e3,autoplayLoop:!0,skin:"",menuOverBook:!1,menuFloating:!1,menuBackground:"",menuShadow:"",menuMargin:0,menuPadding:0,menuTransparent:!1,menu2OverBook:!0,menu2Floating:!1,menu2Background:"",menu2Shadow:"",menu2Margin:0,menu2Padding:0,menu2Transparent:!0,accentColor:"#3b82f6",skinColor:"#222",skinColorHover:"#111",skinBackground:"#FFF",floatingBtnColor:"#FFF",floatingBtnBackground:"#00000055",btnColor:"",btnBackground:"none",iconSet:"fontawesome",iconStrokeWidth:null,hotspotDotSize:18,hotspotDotColor:"#2C6ECB",hotspotTooltipWidth:220,btnSize:18,btnRadius:2,btnMargin:2,btnPaddingV:10,btnPaddingH:10,btnShadow:"",btnTextShadow:"",btnBorder:"",btnColorHover:"",btnBackgroundHover:"",arrowColor:"#FFF",arrowColorHover:"#FFF",arrowBackground:"rgba(0, 0, 0, 0)",arrowBackgroundHover:"rgba(0, 0, 0, .15)",arrowSize:40,arrowRadius:999,arrowMargin:12,arrowPadding:10,arrowTextShadow:"0px 0px 1px rgba(0, 0, 0, 1)",arrowBorder:"",floatingBtnColorHover:"#FFF",floatingBtnBackgroundHover:"rgba(255, 255, 255, 0.15)",floatingBtnSize:null,floatingBtnRadius:999,floatingBtnMargin:12,floatingBtnPadding:null,floatingBtnShadow:"0 0 0 1px rgba(255, 255, 255, 0.22), 0 2px 12px rgba(0, 0, 0, 0.35)",floatingBtnTextShadow:"",floatingBtnBorder:"",compactBreakpoint:768,btnOrder:["currentPage","progressBar","btnFirst","btnPrev","btnNext","btnLast","btnZoomOut","btnZoomIn","btnThumbs","btnToc","btnShare","btnPrint","btnDownloadPdf","btnSound","btnTools","btnSingle","btnExpand","btnClose"],currentPage:{enabled:!0,title:"Current page",vAlign:"top",hAlign:"left",marginH:0,marginV:0,color:"",background:""},progressBar:{enabled:!1,vAlign:"bottom",height:2,thumbSize:8,color:"",background:""},search:{enabled:!1},btnFirst:{enabled:!0,title:"First page",svg:"last",iconReverse:!0,toolsMenu:!0},btnPrev:{enabled:!0,title:"Previous page",svg:"next",iconReverse:!0},btnNext:{enabled:!0,title:"Next page"},btnLast:{enabled:!0,title:"Last page",toolsMenu:!0},btnZoomIn:{enabled:!0,title:"Zoom in",svg:"plus"},btnZoomOut:{enabled:!0,title:"Zoom out",svg:"minus"},btnRotateLeft:{enabled:!1,title:"Rotate left"},btnRotateRight:{enabled:!1,title:"Rotate right"},btnAutoplay:{enabled:!0,title:"Auto flip",svg:"play",svgAlt:"pause"},btnSearch:{enabled:!0,title:"Search"},btnBookmark:{enabled:!0,title:"Bookmarks"},btnNotes:{enabled:!1,title:"Notes"},btnToc:{enabled:!0,title:"Table of Contents",svg:"list"},btnThumbs:{enabled:!0,title:"Pages"},btnShare:{enabled:!0,title:"Share"},btnPrint:{enabled:!0,title:"Print",toolsMenu:!0},btnDownloadPages:{enabled:!0,title:"Download",url:"",name:"",svg:"download",toolsMenu:!0},btnDownloadPdf:{enabled:!0,title:"Download PDF",url:null,svg:"pdf",toolsMenu:!0},btnSound:{enabled:!0,title:"Sound",svgAlt:"mute",toolsMenu:!0},btnTools:{enabled:!0,title:"More"},btnExpand:{enabled:!0,title:"Toggle fullscreen",svgAlt:"compress"},btnSingle:{enabled:!0,title:"Toggle single page",svgAlt:"double",toolsMenu:!0},btnClose:{title:"Close",hAlign:"right",vAlign:"top",size:20},sideNavigationButtons:!0,hideMenu:!1,shareUrl:null,shareTitle:null,shareImage:null,whatsapp:{enabled:!0,title:"WhatsApp"},twitter:{enabled:!0,title:"X (Twitter)"},facebook:{enabled:!0,title:"Facebook"},pinterest:{enabled:!0,title:"Pinterest"},email:{enabled:!0,title:"Email"},linkedin:{enabled:!0,title:"LinkedIn"},digg:{enabled:!1,title:"Digg"},reddit:{enabled:!1,title:"Reddit"},copyLink:{enabled:!0},pdf:{annotationLayer:!1},pageTextureLarge:4e3,pageTextureMedium:2e3,pageTextureSmall:1200,pageTextureAdaptive:!0,pageRenderReach:8,pageRenderConcurrency:2,pageLoadThrottle:120,pageTextureNeighbour:null,thumbTextureSize:300,pageTextureMobileLarge:3e3,pageTextureMobileMedium:1800,pageTextureMobileSmall:1e3,pagesInMemory:40,pagesInMemorySharp:2,viewMode:"webgl",singlePageMode:!1,singlePageModeIfMobile:!1,bookMargin:20,bookVerticalPadding:200,zoomMin:.95,zoomMin2:.15,zoomMax2:null,zoomSize:null,htmlZoomMax:4,zoomStep:1.5,zoomTime:300,zoomReset:!1,zoomResetTime:300,wheelDisabledNotFullscreen:!1,wheelZoomAlways:!1,arrowsDisabledNotFullscreen:!1,arrowsAlwaysEnabledForNavigation:!0,responsiveView:!0,responsiveViewRatio:1,responsiveViewTreshold:768,minimalView:!1,responsiveViewRatio:1,minimalViewBreakpoint:280,responsiveContainer:!0,minPixelRatio:1,maxPixelRatio:2,cameraFov:30,pageFlipDuration:1,contentOnStart:!1,thumbnailsOnStart:!1,searchOnStart:!1,sideMenuOverBook:!0,sideMenuOverMenu:!1,sideMenuOverMenu2:!0,sideMenuPosition:"left",lightBox:!1,lightBoxOpened:!1,lightBoxFullscreen:!1,lightboxResetOnOpen:!0,lightboxBackgroun
1d:null,lightboxBackgroundColor:null,lightboxBackgroundPattern:null,lightboxBackgroundImage:null,lightboxStartPage:null,lightboxMarginV:"0",lightboxMarginH:"0",lightboxCSS:"",catalogStylesheet:"",catalogCSS:"",customCSS:"",lightboxPreload:!1,lightboxShowMenu:!1,lightboxCloseOnBack:!0,lightboxFromStart:!0,disableImageResize:!0,pan:0,panMax:10,panMax2:2,panMin:-10,panMin2:-2,tilt:0,tiltMax:0,tiltMax2:0,tiltMin:0,tiltMin2:-5,rotateCameraOnMouseMove:!1,rotateCameraOnMouseDrag:!0,lights:!0,lightColor:16777215,lightPositionX:0,lightPositionY:150,lightPositionZ:1400,lightIntensity:.6,shadows:!0,shadowMapSize:1024,shadowOpacity:.3,pageRoughness:1,pageMetalness:0,pageHardness:2,pageGravity:1,coverHardness:2,pageEdgeBend:1.5,pageChaseTime:0,pageLiftKnee:20,pageLiftBend:.7,pageSegmentsW:10,pageSegmentsH:1,pageHoverLift:10,pageHoverLiftDuration:260,pageHoverEdgeWidth:10,pageHoverEdgeOuter:60,pageHoverCornerSize:60,pageBendInEasing:0,pageTextureLog:!1,pageBookPanLag:120,pageBendResponse:200,pageBendVelocity:1,pageBendMomentum:1,pageBendInEndSlow:0,pageBendInForceFactor:2,pageBendInFactor:2,pageBendOutFactor:1.1,pageBendSplit:.4,pageBendBias:1,pageBendEase:0,pageBendGrowth:0,pageBendGrowthEnd:0,pageSegmentsAuto:!0,pageFlipAngle:!0,pageFlipAngleMin:-20,pageFlipAngleMax:20,pageMiddleShadowSize:4,pageMiddleShadowColorL:"#b1b1b1ff",pageMiddleShadowColorR:"#d7d7d7ff",antialias:!1,bitmapResizeHeight:null,bitmapResizeQuality:"medium",preloaderText:"",fillPreloader:{enabled:!1,imgEmpty:"images/logo_light.png",imgFull:"images/logo_dark.png"},firstPagePreloader:!1,logoImg:"",logoUrl:"",opt:["page","Texture","Large","Small","Medium","zoom","Size"],wmUrl:"",logoCSS:"position:absolute;",logoHideOnMobile:!1,printMenu:!0,downloadMenu:!0,cover:!0,backCover:!0,pdfTextLayer:!0,textSelect:!0,annotationLayer:!0,googleAnalyticsTrackingCode:null,linkColor:"rgba(0, 0, 0, 0)",linkColorHover:"rgba(255, 255, 0, 1)",linkOpacity:.4,linkTarget:"_blank",inkButtonsOpacity:0,linkButtonsHoverOpacity:1,linkButtonsBackground:"rgba(0,0,0,0.6)",linkButtonsHoverBackground:"rgba(0,0,0,0.8)",linkButtonsColor:"#ffffff",linkButtonsSize:48,linkButtonsBorderRadius:50,rightClickEnabled:!0,pageNumberOffset:0,flipSound:!0,backgroundMusic:!1,backgroundMusicOnAutoplay:!1,doubleClickZoomDisabled:!1,pageDragDisabled:!1,pageClickAreaWdith:"10%",noteTypes:[{id:1,title:"User",color:"green",enabled:!0},{id:2,title:"Group",color:"yellow",enabled:!0},{id:3,title:"Admin",color:"blue",enabled:!0}],pageRangeStart:null,pageRangeEnd:null,previewMessage:"",lockedPageSize:150,previewMode:{},strings:{print:"Print",printLeftPage:"Print left page",printRightPage:"Print right page",printCurrentPage:"Print current page",printAllPages:"Print all pages",download:"Download",downloadLeftPage:"Download left page",downloadRightPage:"Download right page",downloadCurrentPage:"Download current page",downloadAllPages:"Download all pages",bookmarks:"Bookmarks",bookmarkLeftPage:"Bookmark left page",bookmarkRightPage:"Bookmark right page",bookmarkCurrentPage:"Bookmark current page",search:"Search",findInDocument:"Find in document",pagesFoundContaining:"pages found containing",noMatches:"No matches",matchesFound:"matches found",page:"Page",matches:"matches",match:"match",thumbnails:"Thumbnails",tableOfContent:"Table of Contents",share:"Share",notes:"Notes",pressEscToClose:"Press ESC to close",password:"Password",addNote:"Add note",typeInYourNote:"Type in your note...",copyLink:"Copy link",copied:"Copied",addToCart:"Add to cart",viewProduct:"View product",previousImage:"Previous image",nextImage:"Next image",decreaseQuantity:"Decrease quantity",increaseQuantity:"Increase quantity",pageLocked:"Page locked",endOfPreview:"End of preview"},mobile:{shadows:!1,pageSegmentsW:10,btnAutoplay:{toolsMenu:!0},btnBookmark:{toolsMenu:!0},btnFirst:{toolsMenu:!0},btnLast:{toolsMenu:!0},currentPage:{enabled:!1},pagesInMemory:16}};static icons={fontawesome:{plus:[448,512,"M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"],minus:[448,512,"M432 256c0 17.7-14.3 32-32 32L48 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l352 0c17.7 0 32 14.3 32 32z"],close:[384,512,"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"],
1chevronDown:[512,512,"M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"],chevronUp:[512,512,"M233.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L256 173.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z"],next:[320,512,"M278.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-160 160c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L210.7 256 73.4 118.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l160 160z"],expand:[448,512,"M32 32C14.3 32 0 46.3 0 64v96c0 17.7 14.3 32 32 32s32-14.3 32-32V96h64c17.7 0 32-14.3 32-32s-14.3-32-32-32H32zM64 352c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7 14.3 32 32 32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H64V352zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32h64v64c0 17.7 14.3 32 32 32s32-14.3 32-32V64c0-17.7-14.3-32-32-32H320zM448 352c0-17.7-14.3-32-32-32s-32 14.3-32 32v64H320c-17.7 0-32 14.3-32 32s14.3 32 32 32h96c17.7 0 32-14.3 32-32V352z"],compress:[448,512,"M160 64c0-17.7-14.3-32-32-32s-32 14.3-32 32v64H32c-17.7 0-32 14.3-32 32s14.3 32 32 32h96c17.7 0 32-14.3 32-32V64zM32 320c-17.7 0-32 14.3-32 32s14.3 32 32 32H96v64c0 17.7 14.3 32 32 32s32-14.3 32-32V352c0-17.7-14.3-32-32-32H32zM352 64c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7 14.3 32 32 32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H352V64zM320 320c-17.7 0-32 14.3-32 32v96c0 17.7 14.3 32 32 32s32-14.3 32-32V384h64c17.7 0 32-14.3 32-32s-14.3-32-32-32H320z"],thumbs:[512,512,"M448 96V224H288V96H448zm0 192V416H288V288H448zM224 224H64V96H224V224zM64 288H224V416H64V288zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64z"],print:[512,512,"M128 0C92.7 0 64 28.7 64 64v96h64V64H354.7L384 93.3V160h64V93.3c0-17-6.7-33.3-18.7-45.3L400 18.7C388 6.7 371.7 0 354.7 0H128zM384 352v32 64H128V384 368 352H384zm64 32h32c17.7 0 32-14.3 32-32V256c0-35.3-28.7-64-64-64H64c-35.3 0-64 28.7-64 64v96c0 17.7 14.3 32 32 32H64v64c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V384zM432 248a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"],sound:[640,512,"M533.6 32.5C598.5 85.3 640 165.8 640 256s-41.5 170.8-106.4 223.5c-10.3 8.4-25.4 6.8-33.8-3.5s-6.8-25.4 3.5-33.8C557.5 398.2 592 331.2 592 256s-34.5-142.2-88.7-186.3c-10.3-8.4-11.8-23.5-3.5-33.8s23.5-11.8 33.8-3.5zM473.1 107c43.2 35.2 70.9 88.9 70.9 149s-27.7 113.8-70.9 149c-10.3 8.4-25.4 6.8-33.8-3.5s-6.8-25.4 3.5-33.8C475.3 341.3 496 301.1 496 256s-20.7-85.3-53.2-111.8c-10.3-8.4-11.8-23.5-3.5-33.8s23.5-11.8 33.8-3.5zm-60.5 74.5C434.1 199.1 448 225.9 448 256s-13.9 56.9-35.4 74.5c-10.3 8.4-25.4 6.8-33.8-3.5s-6.8-25.4 3.5-33.8C393.1 284.4 400 271 400 256s-6.9-28.4-17.7-37.3c-10.3-8.4-11.8-23.5-3.5-33.8s23.5-11.8 33.8-3.5zM301.1 34.8C312.6 40 320 51.4 320 64V448c0 12.6-7.4 24-18.9 29.2s-25 3.1-34.4-5.3L131.8 352H64c-35.3 0-64-28.7-64-64V224c0-35.3 28.7-64 64-64h67.8L266.7 40.1c9.4-8.4 22.9-10.4 34.4-5.3z"],mute:[576,512,"M301.1 34.8C312.6 40 320 51.4 320 64V448c0 12.6-7.4 24-18.9 29.2s-25 3.1-34.4-5.3L131.8 352H64c-35.3 0-64-28.7-64-64V224c0-35.3 28.7-64 64-64h67.8L266.7 40.1c9.4-8.4 22.9-10.4 34.4-5.3zM425 167l55 55 55-55c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-55 55 55 55c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-55-55-55 55c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l55-55-55-55c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0z"],share:[448,512,"M352 224c53 0 96-43 96-96s-43-96-96-96s-96 43-96 96c0 4 .2 8 .7 11.9l-94.1 47C145.4 170.2 121.9 160 96 160c-53 0-96 43-96 96s43 96 96 96c25.9 0 49.4-10.2 66.6-26.9l94.1 47c-.5 3.9-.7 7.8-.7 11.9c0 53 43 96 96 96s96-43 96-96s-43-96-96-96c-25.9 0-49.4 10.2-66.6 26.9l-94.1-47c.5-3.9 .7-7.8 .7-11.9s-.2-8-.7-11.9l94.1-47C302.6 213.8 326.1 224 352 224z"],facebook:[320,512,"M279.14 288l14.22-92.66h-88.91v-60.13c0-25.35 12.42-50.06 52.24-50.06h40.42V6.26S260.43 0 225.36 0c-73.22 0-121.08 44.38-121.08 124.72v70.62H22.89V288h81.39v224h100.17V288z"],twitter:[512,512,"M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z"],list:[512,512,"M24 56c0-13.3 10.7-24 24-24H80c13.3 0 24 10.7 24 24V176h16c13.3 0 24 10.7 24 24s-10.7 24-24 24H40c-13.3 0-24-10.7-24-24s10.7-24 24-24H56V80H48C34.7 80 24 69.3 24 56zM86.7 341.2c-6.5-7.4-18.3-6.9-24 1.2L51.5 357.9c-7.7 10.8-22.7 13.3-33.5 5.6s-13.3-22.7-5.6-33.5l11.1-15.6c23.7-33.2 72.3-35.6 99.2-4.9c21.3 24.4 20.8 60.9-1.1 84.7L86.8 432H120c13.3 0 24 10.7 24 24s-10.7 24-24 24H32c-9.5 0-18.2-5.6-22-14.4s-2.1-18.9 4.3-25.9l72-78c5.3-5.8 5.4-14.6 .3-20.5zM224 64H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H224c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 160H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H224c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 160H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H224c-17.7 0-32-14.3-32-32s14.3-32 32-32z"],pdf:[512,512,"M64 464l48 0 0 48-48 0c-35.3 0-64-28.7-64-64L0 64C0 28.7 28.7 0 64 0L229.5 0c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3L384 304l-48 0 0-144-80 0c-17.7 0-32-14.3-32-32l0-80L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16zM176 352l32 0c30.9 0 56 25.1 56 56s-25.1 56-56 56l-16 0 0 32c0 8.8-7.2 16-16 16s-16-7.2
1-16-16l0-48 0-80c0-8.8 7.2-16 16-16zm32 80c13.3 0 24-10.7 24-24s-10.7-24-24-24l-16 0 0 48 16 0zm96-80l32 0c26.5 0 48 21.5 48 48l0 64c0 26.5-21.5 48-48 48l-32 0c-8.8 0-16-7.2-16-16l0-128c0-8.8 7.2-16 16-16zm32 128c8.8 0 16-7.2 16-16l0-64c0-8.8-7.2-16-16-16l-16 0 0 96 16 0zm80-112c0-8.8 7.2-16 16-16l48 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0 0 32 32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0 0 48c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-64 0-64z"],tools:[128,512,"M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z"]},lucide:{plus:[24,24,'<path d="M5 12h14"/><path d="M12 5v14"/>'],minus:[24,24,'<path d="M5 12h14"/>'],close:[24,24,'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>'],chevronDown:[24,24,'<path d="m6 9 6 6 6-6"/>'],chevronUp:[24,24,'<path d="m18 15-6-6-6 6"/>'],next:[24,24,'<path d="m9 18 6-6-6-6"/>'],expand:[24,24,'<path d="M8 3H5a2 2 0 0 0-2 2v3"/><path d="M21 8V5a2 2 0 0 0-2-2h-3"/><path d="M3 16v3a2 2 0 0 0 2 2h3"/><path d="M16 21h3a2 2 0 0 0 2-2v-3"/>'],compress:[24,24,'<path d="M8 3v3a2 2 0 0 1-2 2H3"/><path d="M21 8h-3a2 2 0 0 1-2-2V3"/><path d="M3 16h3a2 2 0 0 1 2 2v3"/><path d="M16 21v-3a2 2 0 0 1 2-2h3"/>'],thumbs:[24,24,'<rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/>'],print:[24,24,'<path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"/><path d="M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6"/><rect x="6" y="14" width="12" height="8" rx="1"/>'],sound:[24,24,'<path d="M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z"/><path d="M16 9a5 5 0 0 1 0 6"/><path d="M19.364 18.364a9 9 0 0 0 0-12.728"/>'],mute:[24,24,'<path d="M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z"/><path d="M22 9l-6 6"/><path d="M16 9l6 6"/>'],share:[24,24,'<circle cx="18" cy="5" r="3"/><circle cx="6" cy="12" r="3"/><circle cx="18" cy="19" r="3"/><path d="M8.59 13.51l6.83 3.98"/><path d="M15.41 6.51l-6.82 3.98"/>'],search:[24,24,'<circle cx="11" cy="11" r="8"/><path d="m21 21-4.34-4.34"/>'],bookmark:[24,24,'<path d="M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z"/>'],list:[24,24,'<path d="M3 5h.01"/><path d="M3 12h.01"/><path d="M3 19h.01"/><path d="M8 5h13"/><path d="M8 12h13"/><path d="M8 19h13"/>'],download:[24,24,'<path d="M12 15V3"/><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><path d="m7 10 5 5 5-5"/>'],single:[24,24,'<path d="M12 7v14"/><path d="M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z"/>'],double:[24,24,'<path d="M12 7v14"/><path d="M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z"/>'],tools:[24,24,'<circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/>'],play:[24,24,'<path d="M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z"/>'],pause:[24,24,'<rect x="14" y="3" width="5" height="18" rx="1"/><rect x="5" y="3" width="5" height="18" rx="1"/>'],first:[24,24,'<path d="m11 17-5-5 5-5"/><path d="m18 17-5-5 5-5"/>'],last:[24,24,'<path d="m6 17 5-5-5-5"/><path d="m13 17 5-5-5-5"/>'],rotateLeft:[24,24,'<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/>'],rotateRight:[24,24,'<path d="M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/>'],pdf:[24,24,'<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><path d="M14 2v6h6"/><path d="M10 9H8"/><path d="M16 13H8"/><path d="M16 17H8"/>'],camera:[24,24,'<path d="M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z"/><circle cx="12" cy="13" r="3"/>'],cart:[24,24,'<circle cx="8" cy="21" r="1"/><circle cx="19" cy="21" r="1"/><path d="M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12"/>'],view:[24,24,'<path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"/><circle cx="12" cy="12" r="3"/>'],copyLink:[24,24,'<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/>']},linkedin:[448,512,"M100.28 448H7.4V148.9h92.88zM53.79 108.1C24.09 108.1 0 83.5 0 53.8a53.79 53.79 0 0 1 107.58 0c0 29.7-24.1 54.3-53.79 54.3zM447.9 448h-92.68V302.4c0-34.7-.7-79.2-48.29-79.2-48.29 0-55.69 37.7-55.69 76.7V448h-92.78V148.9h89.08v40.8h1.3c12.4-23.5 42.69-48.3 87.88-48.3 94 0 111.28 61.9 111.28 142.3V448z"],whatsapp:[448,512,"M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z"],pinterest:[384,512,"M204 6.5C101.4 6.5 0 74.9 0 185.6 0 256 39.6 296 63.6 296c9.9 0 15.6-27.6 15.6-35.4 0-9.3-23.7-29.1-23.7-67.8 0-80.4 61.2-137.4 140.4-137.4 68.1 0 118.5 38.7 118.5 109.8 0 53.1-21.3 152.7-90.3 152.7-24.9 0-46.2-18-46.2-43.8 0-37.8 26.4-74.4 26.4-113.4 0-66.2-93.9-54.2-93.9 25.8 0 16.8 2.1 35.4 9.6 50.7-13.8 59.4-42 147.9-42 209.1 0 18.9 2.7 37.5 4.5 56.4 3.4 3.8 1.7 3.4 6.9 1.5 50.4-69 48.6-82.5 71.4-172.8 12.3 23.4 44.1 36 69.3 36 106.2 0 153.9-103.5 153.9-196.8C384 71.3 298.2 6.5 204 6.5z"],email:[512,512,"M64 112c-8.8 0-16 7.2-16 16v22.1L220.5 291.7c20.7 17 50.4 17 71.1 0L464 150.1V128c0-8.8-7.2-16-16-16H64zM48 212.2V384c0 8.8 7.2 16 16 16H448c8.8 0 16-7.2 16-16V212.2L322 328.8c-38.4 31.5-93.7 31.5-132 0L48 212.2zM0 128C0 92.7 28.7 64 64 64H448c35.3 0 64 28.7 64 64V384c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V128z"],digg:[512,512,"M81.7 172.3H0v174.4h132.7V96h-51v76.3zm0 133.4H50.9v-92.3h30.8v92.3zm297.2-133.4v174.4h81.8v28.5h-81.8V416H512V172.3H378.9zm81.8 133.4h-30.8v-92.3h30.8v92.3zm-235.6 41h82.1v28.5h-82.1V416h133.3V172.3H225.1v174.4zm51.2-133.3h30.8v92.3h-30.8v-92.3zM153.3 96h51.3v51h-51.3V96zm0 76.3h51.3v174.4h-51.3V172.3z"],reddit:[512,512,"M440.3 203.5c-15 0-28.2 6.2-37.9 15.9-35.7-24.7-83.8-40.6-137.1-42.3L293 52.3l88.2 19.8c0 21.6 17.6 39.2 39.2 39.2 22 0 39.7-18.1 39.7-39.7s-17.6-39.7-39.7-39.7c-15.4 0-28.7 9.3-35.3 22l-97.4-21.6c-4.9-1.3-9.7 2.2-11 7.1L246.3 177c-52.9 2.2-100.5 18.1-136.3 42.8-9.7-10.1-23.4-16.3-38.4-16.3-55.6 0-73.8 74.6-22.9 100.1-1.8 7.9-2.6 16.3-2.6 24.7 0 83.8 94.4 151.7 210.3 151.7 116.4 0 210.8-67.9 210.8-151.7 0-8.4-.9-17.2-3.1-25.1 49.9-25.6 31.5-99.7-23.8-99.7zM129.4 308.9c0-22 17.6-39.7 39.7-39.7 21.6 0 39.2 17.6 39.2 39.7 0 21.6-17.6 39.2-39.2 39.2-22 .1-39.7-17.6-39.7-39.2zm214.3 93.5c-36.4 36.4-139.1 36.4-175.5 0-4-3.5-4-9.7 0-13.7 3.5-3.5 9.7-3.5 13.2 0 27.8 28.5 120 29 149 0 3.5-3.5 9.7-3.5 13.2 0 4.1 4 4.1 10.2.1 13.7zm-.8-54.2c-21.6 0-39.2-17.6-39.2-39.2 0-22 
117.6-39.7 39.2-39.7 22 0 39.7 17.6 39.7 39.7-.1 21.5-17.7 39.2-39.7 39.2z"],copyLink:[640,512,"M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z"]};constructor(t,e){e.length?(this.elem=e[0],this.elements=Array.from(e)):(this.elem=e,this.elements=[e]),void 0===FLIPBOOK.hasWebGl&&(FLIPBOOK.hasWebGl=function(){const t=document.createElement("canvas");return(t.getContext("webgl")||t.getContext("experimental-webgl"))instanceof WebGLRenderingContext}()),this.hasWebGl=FLIPBOOK.hasWebGl,this.thumbsShowing=!1,this.bookmarkShowing=!1,this.searchingString=!1,this.tocShowing=!1,this.menuShowing=!0,this.fullscreenActive=!1;const i={},o={};t.skin&&o[t.skin]&&(t=FLIPBOOK.extend(!0,{},t,o[t.skin])),t.layout&&i[t.layout]&&(t=FLIPBOOK.extend(!0,{},t,i[t.layout])),this.options=FLIPBOOK.extend(!0,{},FLIPBOOK.Main.defaultOptions,t),t.btnOrder&&(this.options.btnOrder=t.btnOrder),FLIPBOOK.count=FLIPBOOK.count||0,FLIPBOOK.count++,this.uniqueID=FLIPBOOK.count,this.options.isMobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform),this.options.isMobile&&FLIPBOOK.extend(!0,this.options,this.options.mobile),this.initOptions(this.options)}initOptions(t){const e=this;if(this.strings=t.strings,this.s=0,void 0===FLIPBOOK.maxTextureSize){FLIPBOOK.maxTextureSize=4096;try{var i=document.createElement("canvas").getContext("webgl");i&&(FLIPBOOK.maxTextureSize=Math.min(i.getParameter(i.MAX_TEXTURE_SIZE)||4096,8192))}catch(t){}}t.maxTextureSize=FLIPBOOK.maxTextureSize,t.isMobile&&(t.singlePageMode=!!t.singlePageModeIfMobile||t.singlePageMode,t.viewModeMobile&&(t.viewMode=t.viewModeMobile),t.pageTextureMobileLarge&&(t.pageTextureLarge=t.pageTextureMobileLarge),t.pageTextureMobileMedium&&(t.pageTextureMedium=t.pageTextureMobileMedium),t.pageTextureMobileSmall&&(t.pageTextureSmall=t.pageTextureMobileSmall));var o={a:3,b:10,c:2},s=t.opt;if(t[s[0]+s[1]+s[2]]=t[s[0]+s[1]+s[3]]=t[s[0]+s[1]+s[4]]=Math.pow(o.a*o.b+o.c,o.c),t[s[5]+s[6]]=Math.pow(o.c,o.b),"3dSinglePage"==t.viewMode&&(t.singlePageMode=!0),"2dSinglePage"==t.viewMode&&(t.singlePageMode=!0,t.viewMode="2d"),t.singlePageMode&&("2d"!=t.viewMode&&"swipe"!=t.viewMode&&(t.viewMode="3d"),t.rightToLeft&&(t.viewMode="swipe"),t.cover=!0),t.singlePageMode&&"3d"==t.viewMode&&(t.rightToLeft=!1),"simple"==t.viewMode&&(t.viewMode="3d",t.instantFlip=!0),t.cover||(t.responsiveView=!1),t.webgl){o={a:5,b:6,c:2};t.pageTextureLarge=Math.pow(o.a*o.b-o.c,o.c),t.pageTextureSmall=Math.pow(o.a*o.b-o.c,o.c),t.zoomSize=Math.pow(o.b*o.a+o.a,o.c)}Object.assign(t,{e:"toString",f:"padStart",g:"decodeURIComponent",h:97,i:16}),t.sideMenuPosition=t.rightToLeft?"right":"left","webgl"==t.viewMode&&(this.hasWebGl||(t.viewMode="3d")),("webgl"==t.viewMode||"scroll"==t.viewMode||"swipe"==t.viewMode||t.rightToLeft)&&(t.btnSingle.enabled=!1),this.webgl="webgl"==t.viewMode,t.menuFloating&&(t.sideMenuOverMenu=!0),t.menu2Floating&&(t.menu2OverBook=!0,t.sideMenuOverMenu2=!0),t.menuTransparent&&(t.sideMenuOverMenu=!0,t.menuBackground="none"),t.menu2Transparent?(t.menu2OverBook=!0,t.sideMenuOverMenu2=!0,t.menu2Background="none"):t.sideMenuOverMenu2=!1,t.menuOverBook&&(t.sideMenuOverMenu=!0),t.menu2OverBook&&(t.sideMenuOverMenu2=!0),t.pdfMode=Boolean(t.pdfUrl||t.pdfBase64),t.backgroundTransparent&&(t.backgroundColor="none"),this.options.containerRatio=function(t){if(void 0!==t){if("number"==typeof t)return t;if((t=String(t).trim().replace("/",":")).includes(":")){const e=t.split(":");return parseFloat(e[0])/parseFloat(e[1])}return parseFloat(t)}}(this.options.containerRatio),this.wrapper=document.createElement("div"),this.wrapper.classList.add("flipbook-main-wrapper");let n={};
1if(t.skinColor&&(n.color=t.skinColor),t.skinBackground&&(n.bg=t.skinBackground),t.skin&&Object.assign(n,{light:{color:"#222",bg:"#fff"},dark:{color:"rgba(255, 255, 255, 0.75)",bg:"rgb(49, 53, 56)"},gradient:{color:"#eee",bg:"rgba(30,30,30,.8)"},twilight:{color:"#feffd3",bg:"#141414"},darkGrey:{color:"#9e9e9e",bg:"#212121"},lightGrey:{color:"#757575",bg:"#e0e0e0"}}[t.skin]),this.wrapper.style.setProperty("--flipbook-bg",n.bg),this.wrapper.style.setProperty("--flipbook-color",n.color),this.wrapper.style.setProperty("--flipbook-accent-color",t.accentColor),this.tooltip2=new FLIPBOOK.Tooltip2(this.wrapper),""!==t.backgroundColor&&(this.wrapper.style.background=t.backgroundColor),""!==t.backgroundPattern&&(this.wrapper.style.background=`url(${t.backgroundPattern}) repeat`),""!==t.backgroundImage&&(this.wrapper.style.background=`url(${t.backgroundImage}) no-repeat`,this.wrapper.style.backgroundSize="cover",this.wrapper.style.backgroundPosition="center center"),this.bookLayer=document.createElement("div"),this.bookLayer.classList.add("flipbook-bookLayer"),this.wrapper.appendChild(this.bookLayer),t.pageDragDisabled&&(this.bookLayer.style.cursor="auto"),"spotlight"===t.linkTarget&&this.bookLayer.addEventListener("click",(t=>{"a"===t.target.tagName.toLowerCase()&&(t.preventDefault(),this.spotlight(t.target.href))})),t.rightClickEnabled||this.bookLayer.addEventListener("contextmenu",(function(t){t.preventDefault()})),t.hideMenu&&(this.bookLayer.style.bottom="0",t.menuOverBook=!0),t.pagesOriginal=JSON.parse(JSON.stringify(t.pages)),this.book=document.createElement("div"),this.book.classList.add("book"),this.bookLayer.appendChild(this.book),t.preloader&&"undefined"!=typeof jQuery)this.preloader=jQuery(t.preloader);else{this.preloader=document.createElement("div"),this.preloader.classList.add("flipbook-preloader","cssload-container");var a=document.createElement("div");a.classList.add("cssload-speeding-wheel"),this.preloader.appendChild(a);var r=document.createElement("div");r.classList.add("flipbook-loading-text"),r.textContent=t.preloaderText,this.preloader.appendChild(r);var l=document.createElement("div");l.classList.add("flipbook-loading-bg"),this.preloader.appendChild(l)}this.setLoadingProgress(0),this.dispose=function(){this.disposed=!0},t.main=this,this._events={},this.on=function(t,e){this._events[t]||(this._events[t]=[]),this._events[t].push(e)},this.off=function(t,e){if(this._events[t]){var i=this._events[t].indexOf(e);i>-1&&this._events[t].splice(i,1)}},this.trigger=function(t){if(this._events[t]){var e=0,i=this._events[t].length;if(i)for(;e<i;e++)this._events[t][e].apply(this,[].slice.call(arguments,1))}},this.on("textlayerrendered",(function(t){e.searchingString&&e.mark(e.searchingString)})),this.on("showpagehtml",(function(){this.deselectText(),e.searchingString&&e.mark(e.searchingString)})),this.on("pagechange",(function(){e.previewCutApplied&&e.Book&&!e.Book.canFlipNext()&&e.showPreviewEndModal()})),this.addPageNotes=function(t){this.noteService&&this.noteService.initPageNotes(t)},this.on("pdfinit",(async function(){t.tableOfContent=e.pdfService.outline||t.tableOfContent,t.doublePage=e.pdfService.double,t.scaleCover&&(t.doublePage=!0,t.responsiveView=!1),t.backCover=e.pdfService.backCover,e.viewportOriginal=e.pdfService.viewports[0],t.firstPage={width:e.pdfService.viewports[0].width,height:e.pdfService.viewports[0].height,ratio:e.pdfService.viewports[0].width/e.pdfService.viewports[0].height},e.pdfService.numPages>1&&(t.secondPage={width:e.pdfService.viewports[1].width,height:e.pdfService.viewports[1].height,ratio:e.pdfService.viewports[1].width/e.pdfService.viewports[1].height}),t.numPages=e.pdfService.numPages;var i=e.applyPreviewCut(t.numPages);null!==i&&(t.numPages=i);for(var o=[],s=t.pageTextureLarge,n=0;n<t.numPages;n++){var a={canvas:{}};t.pages&&t.pages[n]&&FLIPBOOK.extend(a,t.pages[n]),o[n]=a}t.pages=o,t.pageWidth=parseInt(s*e.viewportOriginal.width/e.viewportOriginal.height),t.pageHeight=s,t.pw=t.pageWidth,t.ph=t.pageHeight;var r=t.tableOfContent;if(t.btnToc.enabled&&(!r||!r.length)){var l=await e.pdfService.loadOutline();l?t.tableOfContent=l:t.btnToc.enabled=!1}(t.doublePage||t.numPages%2==1)&&(t.cover=!0),e.start()})),FLIPBOOK.flipbookSrc=FLIPBOOK.flipbookSrc||this.options.flipbookSrc||function(){for(var t=document.getElementsByTagName("script"),e=0;e<t.length;e++){var i=String(t[e].src);if(i.match("flipbook\\.js")||i.match("flipbook\\.min\\.js"))return i;if(i.match("flipbook\\.lite\\.js")||i.match("flipbook\\.lite\\.min\\.js"))return i.replace(".lite","")}return""}();const h=FLIPBOOK.flipbookSrc.includes("flipbook.min.js"),d=h?"flipbook.min.js":"flipbook.js",c=h?".min":"";if([{key:"iscrollSrc",value:"libs/iscroll"},{key:"flipbookPanZoomSrc",value:"flipbook.panzoom"},{key:"threejsSrc",value:"libs/three"},{key:"flipbookWebGlSrc",value:"flipbook.webgl.vertex"},{key:"flipbookBook3Src",value:"flipbook.book3"},{key:"flipBookSwipeSrc",value:"flipbook.swipe"},{key:"flipBookScrollSrc",value:"flipbook.scroll"},{key:"pdfjsSrc",value:"libs/pdf"},{key:"pdfServiceSrc",value:"flipbook.pdfservice"},{key:"pdfjsworkerSrc",value:"libs/pdf.worker"},{key:"markSrc",value:"libs/mark"},{key:"html2canvasSrc",value:"libs/html2canvas"}
1].forEach((t=>{FLIPBOOK[t.key]=FLIPBOOK.flipbookSrc.replace(d,t.value+c+".js")})),!t.deeplinkingPrefix&&t.deeplinking&&t.deeplinking.prefix&&(t.deeplinkingPrefix=t.deeplinking.prefix),t.deeplinkingEnabled=t.deeplinkingPrefix||t.deeplinkingEnabled||t.deeplinking&&t.deeplinking.enabled,t.deeplinkingEnabled&&(this.checkHash(),window.addEventListener("hashchange",this.checkHash.bind(this))),t.l=["load","front","rgb","length"],t.lightBox)t.btnClose.enabled=!0,this.canFullscreen()||(this.options.btnExpand.enabled=!1),this.lightbox=new FLIPBOOK.Lightbox(this,this.wrapper,t),this.lightboxStartedTimes=0,this.wrapper.style.background="none",this.bookLayer.style.background="none",this.book.style.background="none",this.lightbox.overlay.appendChild(this.preloader),this.preloader.style.position="fixed",this.elements.forEach((function(i){i.style.cursor="pointer",i.addEventListener("click",(async function(i){e.disposed||(i.preventDefault(),e.lightboxStartPage=this.dataset.page,e.started?(await e.lightboxStart(),t.lightBoxFullscreen&&setTimeout((async function(){e.toggleExpand()}),0),e.lightbox.openLightbox()):(e.init(),e.lightbox.openLightbox(),t.lightBoxFullscreen&&setTimeout((async function(){e.toggleExpand()}),100)))}))})),t.lightBoxOpened?(this.init(),"undefined"!=typeof jQuery&&jQuery(window).trigger("r3d-lightboxloadingstarted")):t.lightboxPreload&&async function(){const i=[];t.pdfMode&&(i.push(e.loadScript(FLIPBOOK.pdfjsSrc,"pdfjsLib")),i.push(e.loadScript(FLIPBOOK.pdfServiceSrc,"FLIPBOOK.PdfService")),(t.btnSearch.enabled||t.btnNotes.enabled||t.search.enabled)&&i.push(e.loadScript(FLIPBOOK.markSrc,"Mark"))),"webgl"==t.viewMode&&(i.push(e.loadScript(FLIPBOOK.threejsSrc,"THREE")),!t.pdfMode&&t.pages&&t.pages.length&&t.pages.every((function(t){return!t.src}))&&i.push(e.loadScript(FLIPBOOK.html2canvasSrc,"html2canvas"))),await Promise.all(i)}(),this.fullscreenElement=document.body;else{t.btnClose.enabled=!1,this.wrapper.appendChild(this.preloader),this.elem.appendChild(this.wrapper),this.elem.style.background=this.wrapper.style.background,this.fullscreenElement=this.elem;new IntersectionObserver((t=>{t[0].isIntersecting?e.Book?(e.Book.enable(),e.resizeContainer(),e.resize()):e.init():e.Book&&(e.Book.disable(),e.Book.hibernate&&e.Book.hibernate())})).observe(this.wrapper)}}async start(){var t=this.options;if(1==t.pages.length&&(t.numPages=1,t.doublePage=!1,t.btnNext.enabled=!1,t.btnPrev.enabled=!1,t.btnFirst.enabled=!1,t.btnLast.enabled=!1,t.sideNavigationButtons=!1,t.btnAutoplay.enabled=!1,t.singlePageMode=!0,t.viewMode="3d",t.rightToLeft=!1,t.btnThumbs.enabled=!1,t.btnToc.enabled=!1,t.btnBookmark.enabled=!1),t.dp&&(t.doublePage=!0),this.started)return;const e=this.options.pageWidth/this.options.pageHeight;e>1&&(this.options.pageWidth/=e,this.options.pageHeight/=e),this.options.zoomSize=this.options.zoomSize||this.options.pageTextureLarge,this.pageW=this.options.pageWidth,this.bookW=2*this.options.pageWidth,this.options.singlePageMode&&(this.bookW/=2),this.pageH=this.options.pageHeight,this.bookH=this.options.pageHeight,this.options.numPages%2==0?this.options.numSheets=(this.options.numPages+2)/2:this.options.numSheets=(this.options.numPages+1)/2,this.started=!0,this.options.lightBox&&(this.lightbox.openLightbox(),await this.lightboxStart());const i=this.options.pageClickAreaWdith,o=this.options.pages.length,s=this.options.doublePage,n=this.options.singlePageMode,a="scroll"==this.options.viewMode,r=1e3*this.options.pageWidth/this.options.pageHeight,l=r-50,h=2*r-50;if(this.options.pages.hasHtmlContent=!!this.options.pages&&this.options.pages.some((t=>!!t.htmlContent)),this.options.pages.hasHtmlContent&&this.bookLayer){if(this.options.catalogStylesheet){const t=document.createElement("link");t.rel="stylesheet",t.href=this.options.catalogStylesheet,t.setAttribute("data-flipbook-catalog",""),this.bookLayer.insertBefore(t,this.bookLayer.firstChild)}if(this.options.catalogCSS){const t=document.createElement("style");t.textContent=this.options.catalogCSS,t.setAttribute("data-flipbook-catalog",""),this.bookLayer.insertBefore(t,this.bookLayer.firstChild)}}if(this.options.customCSS){const t=document.createElement("style");t.textContent=this.options.customCSS,t.setAttribute("data-flipbook-custom",""),(this.bookLayer||this.wrapper||document.head).appendChild(t)}var d=this.options.rightToLeft,c=this;
1function p(t){t.htmlContent+='<a href="#" draggable="false" class="internalLink pageClickArea pageClickAreaLeft" data-page="prev"></a>'}function u(t,e){const i=e?h:l;t.htmlContent+='<a href="#" draggable="false" class="internalLink pageClickArea pageClickAreaRight" data-page="next" style="left:'+i+'px;"></a>'}i&&!a&&this.options.pages.forEach((function(t,e){t.htmlContent=t.htmlContent||"",n?(e>0&&(d?p(t):u(t)),e<o-1&&(d?u(t):p(t))):s?c.options.cover&&0==e||c.options.backCover&&e==c.options.pages.length-1?d?p(t):u(t):(p(t),u(t,!0)):e%2==0?d?p(t):u(t):d?u(t):p(t)})),await this.createBook(),this.hideFirstPagePreloader(),this.createTooltip(),this.options.btnNotes.enabled&&this.initNotes()}async checkHash(){if(this.disposed)return;const t=this.options;var e=window.location.hash,i=this.getPageFromHash();t.cover||i++;var o=i;i<1?i=1:this.numPages&&i>this.numPages&&(i=this.numPages),i&&(this.started?this.Book&&(this.lightbox&&!this.lightbox.lightboxOpened&&(this.lightbox.openLightbox(),await this.lightboxStart()),this.goToPage(i,-1==e.indexOf("flip"))):(t.startPage=o,t.lightBox&&(this.init(),t.lightBoxFullscreen&&setTimeout((()=>{this.toggleExpand()}),100))))}
1async init(){if(this.initStarted)return;this.initStarted=!0;const t=this.options;this.preloadViewEngine();const e=t=>new Promise(((e,i)=>{const o=new Image;o.src=t,o.onload=()=>e(o),o.onerror=i}));if(t.fillPreloader.enabled){const i=document.createElement("div");i.classList.add("flipbook-fillPreloader");try{const o=await e(t.fillPreloader.imgEmpty),s=await e(t.fillPreloader.imgFull);i.appendChild(o),i.appendChild(s),this.$fillPreloader=i,this.$fillPreloaderImg=s,this.wrapper.appendChild(i)}catch(t){console.error("Error loading preloader images",t)}}this.initialized||(this.define=window.define,window.define=null,this.id=this.uniqueID,this.addPageItems(),t.pageCaptions&&this.addPageCaptions(),"webgl"===t.viewMode?(this.loadScript(FLIPBOOK.threejsSrc,"THREE").then((()=>{this.loadScript(FLIPBOOK.flipbookWebGlSrc,"FLIPBOOK.BookWebGL")})),!t.pdfMode&&t.pages&&t.pages.length&&t.pages.every((function(t){return!t.src}))&&this.loadScript(FLIPBOOK.html2canvasSrc,"html2canvas")):"swipe"===t.viewMode?this.loadScript(FLIPBOOK.flipbookPanZoomSrc,"FLIPBOOK.PanZoom").then((()=>{this.loadScript(FLIPBOOK.flipBookSwipeSrc,"FLIPBOOK.BookSwipe")})):"scroll"===t.viewMode?this.loadScript(FLIPBOOK.flipBookScrollSrc,"FLIPBOOK.BookScroll"):this.loadScript(FLIPBOOK.flipbookPanZoomSrc,"FLIPBOOK.PanZoom").then((()=>{this.loadScript(FLIPBOOK.flipbookBook3Src,"FLIPBOOK.Book3")})),t.pdfMode?this.initPdf():this.initJpg(),this.setLoadingProgress(.1),this.initialized=!0)}bodyHasVerticalScrollbar(){return document.body.scrollHeight>window.innerHeight}isIframe(){try{return window.self!==window.top}catch(t){return!0}}isZoomed(){return this.zoom>1}async lightboxStart(){var t,e=this;this.options;(this.started||await this.start(),void 0!==this.Book)?(this.Book.enable(),this.playBgMusic(),this.lightboxStartedTimes++,this.sendGAEvent({event:"flipbook_lightbox_open",book_name:this.options.name,nonInteraction:!0}),this.updateCurrentPage(),this.lightbox.openLightbox(),this.resize(),window.location.hash||(t=this.lightboxStartPage||this.options.lightboxStartPage),t&&this.goToPage(t,!0)):setTimeout((function(){e.lightboxStart()}),100)}setHash(t){t<1&&(t=1),"#"+this.options.deeplinkingPrefix+t!=window.location.hash&&this.options.deeplinkingEnabled&&this.Book.enabled&&this.hash!=t&&(window.location.hash="#"+this.options.deeplinkingPrefix+String(t),this.historyStateChange(),this.hash=t)}historyStateChange(t){this.historyStateChanges=this.historyStateChanges||0,void 0!==t?this.historyStateChanges=t:this.historyStateChanges++}clearHash(){}getPageFromHash(){}async sendGAEvent(t){}lightboxEnd(){document.fullscreenElement&&(this.toggleExpand(),this.toggleIcon(this.btnExpand,!0)),this.Book&&(this.options.lightboxStartPage&&this.Book.goToPage(this.options.lightboxStartPage,!0),this.Book.zoomTo(this.options.zoomMin),this.Book.disable(),this.Book.hibernate&&this.Book.hibernate()),this.closeMenus(),this.setLoadingProgress(1),this.pauseMediaPlayback(),this.backgroundMusic&&this.backgroundMusic.pause(),window.location.hash&&this.clearHash(),this.historyStateChanges&&this.historyStateChange(0)}pauseMediaPlayback(){this.mediaElements&&this.mediaElements.forEach((t=>{if("video"===t.tagName.toLowerCase()||"audio"===t.tagName.toLowerCase())t.pause();else if("iframe"===t.tagName.toLowerCase()){const e=t.src||t.getAttribute("src")||"";if((e.includes("youtube.com/embed")||e.includes("youtube-nocookie.com/embed"))&&t.contentWindow)try{t.contentWindow.postMessage(JSON.stringify({event:"command",func:"pauseVideo",args:[]}),"*")}catch(t){}}})),this.pageAudioPlayer&&this.pageAudioPlayer.pause(),this.youtubes&&this.youtubes.forEach((t=>{const e=t.player;e&&"function"==typeof e.getCurrentTime&&(t.dataset.ytCurrentTime=e.getCurrentTime(),t.dataset.ytMuted=e.isMuted(),e.pauseVideo())}))}turnPageStart(){this.pauseMediaPlayback(),this.resumeGlobalSound(),this.playFlipSound(),this.zoom<=1&&this.showWrapperOverflow()}showWrapperOverflow(){this.overflowVisible||(this.wrapper.style.overflow="visible",this.overflowVisible=!0)}hideWrapperOverflow(){this.overflowVisible&&(this.wrapper.style.overflow="hidden",this.overflowVisible=!1)}turnPageComplete(){if(this.animating=!1,this.Book){this.updateCurrentPage();var t=this.Book.rightIndex||0;this.options.rightToLeft&&(t=this.options.pages.length-t),this.trigger("turnpagecomplete",{rightIndex:t}),this.options.zoomReset&&this.Book.zoomTo(this.options.zoomMin),this.hideWrapperOverflow()}}dragPage(){this.zoom<=1&&this.showWrapperOverflow()}updateCurrentPage(){if(!this.Book)return;var t,e=this.options.rightToLeft,i=this.options.numPages,o=i-this.options.pageNumberOffset,s=this.Book.rightIndex||0;s%2==1&&s++,e&&(s=2*this.Book.numSheets-s);let n=this.options.cover?s:s-1;if(this.options.singlePageMode||this.Book.singlePage||1==this.Book.view?(this.Book.getCurrentPageNumber?t=this.Book.getCurrentPageNumber():(e&&s--,t=s+1),this.setHash(t),this.cPage=[t-1]):(n>i||n==i&&i%2==0?(t=i,this.cPage=[i-1]):n<1?(t=1,this.cPage=[0]):(t=String(n)+"-"+String(n+1),this.cPage=[n-1,n]),this.setHash(n)),this.enableNext(this.Book.canFlipNext(
1)),this.enablePrev(this.Book.canFlipPrev()),2===this.cPage.length?(this.wrapper.querySelectorAll(".c-l-p").forEach((function(t){t.classList.remove("flipbook-hidden")})),this.wrapper.querySelectorAll(".c-r-p").forEach((function(t){t.classList.remove("flipbook-hidden")})),this.wrapper.querySelectorAll(".c-p").forEach((function(t){t.classList.add("flipbook-hidden")}))):(this.wrapper.querySelectorAll(".c-l-p").forEach((function(t){t.classList.add("flipbook-hidden")})),this.wrapper.querySelectorAll(".c-r-p").forEach((function(t){t.classList.add("flipbook-hidden")})),this.wrapper.querySelectorAll(".c-p").forEach((function(t){t.classList.remove("flipbook-hidden")}))),void 0!==this.currentPage&&(this.s&&this.options.pdfPageScale>0&&this.goToPage(0),t!=this.currentPageValue)){this.currentPageValue=String(t);var a=Number(String(t).split("-")[0]),r=Number(String(t).split("-")[1]);a&&this.options.pages[Number(a-1)]&&this.options.pages[Number(a-1)].name&&(a=this.options.pages[Number(a-1)].name),r&&this.options.pages[Number(r-1)]&&this.options.pages[Number(r-1)].name&&(r=this.options.pages[Number(r-1)].name),t=a&&r?a+"-"+r:a||(r||1),this.currentPageString=t,this.currentPageInput.dispatchEvent(new Event("blur",{bubbles:!0,cancelable:!0})),this.currentPage.textContent=" / "+String(o);const e=document.createElement("span");if(e.style.visibility="hidden",e.style.position="absolute",e.style.whiteSpace="pre",e.className="flipbook-currentPageInput",document.body.appendChild(e),e.textContent=t,this.currentPageInput.style.width=`${e.offsetWidth+2}px`,document.body.removeChild(e),this._progressBarPending&&!this.progressBar){var l=this;this.progressBar=new FLIPBOOK.ProgressBar({wrapper:this.menuBottom,min:1,max:this._getProgressStops(),value:1,colors:{fill:this.options.progressBar.color||"",bg:this.options.progressBar.background||""},onChange:function(t){l.goToPage(l._stopToPage(Math.round(t)))}}),this._progressBarPending=!1;var h=this.options.progressBar.height||4,d=this.options.progressBar.thumbSize||12;this.progressBar.el.style.setProperty("--pb-height",h+"px"),this.progressBar.thumb.style.width=d+"px",this.progressBar.thumb.style.height=d+"px",this.menuBottom.style.paddingTop=h+8+"px"}if(this.progressBar){var c=this._getProgressStops();this.progressBar.max!==c&&(this.progressBar.max=c);var p=Number(String(this.currentPageValue).split("-")[0])||1;this.progressBar._silent=!0,this.progressBar.setValue(this._pageToStop(p)),this.progressBar._silent=!1}if(this.resize(),"undefined"!=typeof jQuery)jQuery(this).trigger({type:"pagechange",page:this.currentPageValue,name:this.options.name}),jQuery(window).trigger({type:"r3d-pagechange",page:this.currentPageValue,name:this.options.name});else{var u=new CustomEvent("r3d-pagechange",{detail:{page:this.currentPageValue,name:this.options.name}});window.dispatchEvent(u)}this.trigger("pagechange"),this.sendGAEvent({event:"flipbook_page_view",book_name:this.options.name,page_number:this.currentPageValue,nonInteraction:!0}),this.flippingPage=!1}}async initJpg(){const t=this.options;let e=t.pages||[];var i=this.applyPreviewCut(e.length);if(null!==i&&(e=e.slice(0,i)),t.pageRangeStart||t.pageRangeEnd){const i=Math.max((t.pageRangeStart||1)-1,0),o=Math.min(t.pageRangeEnd||e.length,e.length);e=e.slice(i,o)}t.pages=e;const o=e.length,s=(e,i)=>new Promise((o=>this.loadPage(e,i||t.pageTextureLarge,o)));t.pdfUrl||t.hasHtmlContent||e.some((t=>t.json))||(t.btnSearch.enabled=!1),t.tableOfContent.length||e.some((t=>t.title))||(t.btnToc.enabled=!1);const n=({width:t,height:e,img:i,thumbImg:o})=>{const s=i||o;return[t||s&&s.width,e||s&&s.height]},a=i=>{return(o=e[i])&&o.width&&o.height?Promise.resolve():s(i,t.thumbTextureSize);var o};this.setLoadingProgress(.5),await s(0);const[r,l]=n(e[0]);if(Object.assign(t,{pw:r,ph:l,pageWidth:r,pageHeight:l,zoomSize:t.zoomSize||l}),1===o)return this.start();const h=[a(1)];o>2&&h.push(a(o-1)),await Promise.all(h);const[d,c]=n(e[1]),p=r/l;if(t.doublePage=t.scaleCover||d/c/p>1.5,t.doublePage||(t.backCover=o%2==0),o>2&&t.doublePage){const[i,s]=n(e[o-1]);t.backCover=d/c/(i/s)>1.5}(t.doublePage||o%2==1)&&(t.cover=!0),this.start()}async initPdf(){this.started||(this.setLoadingProgress(.2),await Promise.all([this.loadScript(FLIPBOOK.pdfjsSrc,"pdfjsLib"),this.loadScript(FLIPBOOK.pdfServiceSrc,"FLIPBOOK.PdfService")]),window.CanvasPixelArray&&(window.CanvasPixelArray.prototype.set=function(t){for(var e=this.length,i=0;i<e;i++)this[i]=t[i]}),pdfjsLib.GlobalWorkerOptions.workerSrc=this.options.pdfjsworkerSrc||FLIPBOOK.pdfjsworkerSrc,this.pdfService=new FLIPBOOK.PdfService(this,this.options))}parsePageSpec(t){if(null==t||""===t)return null;var e=new Set,i=function(t){if("number"!=typeof t){var i=String(t).trim();if(i)if(i.indexOf("-")>-1){var o=i.split("-"),s=parseInt(o[0],10),n=parseInt(o[1],10);if(Number.isFinite(s)&&Number.isFinite(n))for(var a=Math.max(Math.min(s,n),1);a<=Math.max(s,n);a++)e.add(a)}else{var r=parseInt(i,10);Number.isFinite(r)&&r>=1&&e.add(r)}}else Number.isFinite(t)&&t>=1&&e.add(t)};return Array.isArray(t)?t.forEach((function(t){"string"==typeof t?t.split(",").forEach(i):i(t)})):String(t).split(",").forEach(i),e.size?e:null}getPreviewCut(){var t=this.options.previewPages;if(null==t||""===t)return null;if("number"==typeof t)return t>0?Math.floor(t):null;if("string"==typeof t&&/^\d+$/.test(t.trim())){var e=parseInt(t.trim(),10);return e>0?e:null}return null}applyPreviewCut(t){var e=this.getPreviewCut();return e?(this.options.doublePage?2*t-1:t)<=e?null:(this.options.doublePage&&(this.options.backCover=!1),this.previewCutApplied=!0,this.options.doublePage?Math.ceil(e/2):e):null}isPdfPageLocked(t){var e=this.options.pages;return(this.options.doublePage?0===t?[0]:[2*t-1,2*t]:[t]).every((function(t){return e[t]&&e[t].locked}))}initPageHTML(t){const e=this.options.pages[t];if(!e.htmlInitialized){if(e.locked&&e.htmlContent&&e.htmlContent.querySelector&&!e.htmlContent.querySelector(".flipbook-locked-overlay")){var i=document.createElement("div");i.className="flipbook-locked-overlay",i.innerHTML=this.options.previewMessage||'<div class="flipbook-locked-default">'+this.getString("pageLocked")+"</div>",e.htmlContent.appendChild(i)}this.addPageLinks(e),this.addPageNotes(e),this.addMediaListeners(e),e.htmlInitialized=!0}}addMediaListeners(t){if(t.htmlContent&&t.htmlContent instanceof Element){const e=t.htmlContent.querySelectorAll("video, audio, iframe");this.mediaElements=this.mediaElements||[],this.mediaElements.push(...e)}}addPageLinks(t){}pauseGlobalSound(){this.options.sound&&(this.toggleSound(!1),this.soundPaused=!0)}resumeGlobalSound(){this.soundPaused&&(this.soundPaused=!1,this.toggleSound(!0))}addPageNames(){const t=this.options.pageNumberOffset;
1this.options.pages.forEach((function(e,i){void 0===e.name&&(e.name=i-t+1,e.name<1&&(e.name=function(t){let e="";return[{value:1e3,numeral:"M"},{value:900,numeral:"CM"},{value:500,numeral:"D"},{value:400,numeral:"CD"},{value:100,numeral:"C"},{value:90,numeral:"XC"},{value:50,numeral:"L"},{value:40,numeral:"XL"},{value:10,numeral:"X"},{value:9,numeral:"IX"},{value:5,numeral:"V"},{value:4,numeral:"IV"},{value:1,numeral:"I"}].forEach((function(i){for(;t>=i.value;)e+=i.numeral,t-=i.value})),e}(i+1)))}))}async loadPageHTML(t,e){var i=this,o=this.options;if(t<0)e.call(this,{});else if(o.pdfMode)if(o.pages[t])if(o.pages[t].locked){var s=o.pages[t];s.htmlContent&&s.htmlContent[0]&&(s.htmlContent=s.htmlContent[0]),s.htmlContentInitialized=!0,i.initPageHTML(t),e.call(i,s.htmlContent,t)}else i.initPageHTML(t),e.call(i,o.pages[t].htmlContent,t);else e.call(this,{});else this.initPageHTML(t),e.call(this,o.pages[t].htmlContent,t)}async fetchAndCacheImage(t){this.imageCache??=new Map;let e=this.imageCache.get(t);if(e)return e;try{const e=(async()=>{const e=await fetch(t,{cache:"force-cache"});if(!e.ok)throw new Error(`Fetch failed: ${e.status}`);const i=await e.blob(),{bitmapResizeHeight:o,bitmapResizeQuality:s}=this.options??{},n={};
1o&&(n.resizeHeight=o);const a="heigh"===s?"high":s;-1!==["pixelated","low","medium","high"].indexOf(a)&&(n.resizeQuality=a);const r=await createImageBitmap(i,Object.keys(n).length?n:void 0);var l=4,h=5;if(r.height>Math.pow(l,h)){const t=await createImageBitmap(r,{resizeHeight:Math.pow(l,h),resizeQuality:"high"});return r.close(),t}return r})();return this.imageCache.set(t,e),await e}catch(e){throw this.imageCache.delete(t),e}}loadPage(t,e,i){var o=this,s=this.options.pages&&this.options.pages[t]&&this.options.pages[t].src,n=this.options.pages[t];if(n){if(!s&&!this.options.pdfMode&&n.htmlContent)return FLIPBOOK.blankA4Image||(FLIPBOOK.blankA4Image=new Image,FLIPBOOK.blankA4Image.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAOCAIAAACZwRr8AAAAEUlEQVR4nGP4jxcwjEoPNmkAtmyibBsS4YAAAAAASUVORK5CYII="),n.img=FLIPBOOK.blankA4Image,n.imgLoaded=!0,n.width=o.options.htmlPageWidth||1e3,n.height=o.options.htmlPageHeight||1414,void("webgl"===o.options.viewMode&&o.Book&&o.Book._capturePageScreenshot?o.Book._capturePageScreenshot(t,(function(){o.pageLoaded({index:t,size:e,image:FLIPBOOK.blankA4Image,imageBitmap:n._htmlBitmap},i)})):o.pageLoaded({index:t,size:e,image:FLIPBOOK.blankA4Image},i));if(this.options.pdfMode&&!s)this.loadPageFromPdf(t,e,i);else if(e==this.options.thumbTextureSize&&n.thumb)if(!n.thumbImg&&n.thumb){if(n.thumbImg=new Image,n.thumbImg.decoding="async",n.thumbImg.setAttribute("data-id",t),n.thumbImg.onload=function(){n.thumbLoaded=!0,o.pageLoaded({index:t,size:e,image:n.thumbImg},i)},"webgl"==this.options.viewMode&&(n.thumbImg.crossOrigin="Anonymous"),!1!==o.options.matchProtocol){const t=location.protocol;n.thumb.startsWith(t)||(n.thumb=n.thumb.replace(/^https?:/,t))}n.thumbImg.src=n.thumb}else n.thumbLoaded?o.pageLoaded({index:t,size:e,image:n.thumb},i):setTimeout((function(){o.loadPage(t,e,i)}),300);else{const s=n.srcHigh&&e>=.9*o.options.pageTextureLarge,a=s?"imgHigh":"img",r=s?"imgHighLoaded":"imgLoaded";let l=s?n.srcHigh:n.src;if(!n[a]&&l){if(!1!==o.options.matchProtocol){const t=location.protocol;l.startsWith(t)||(l=l.replace(/^https?:/,t),s?n.srcHigh=l:n.src=l)}"webgl"==o.options.viewMode?o.fetchAndCacheImage(l).then((s=>{n[a]=s,n[r]=!0,n.width=s.width,n.height=s.height,o.imageMaxSize=Math.max(o.imageMaxSize||0,s.height),o.pageLoaded({index:t,size:e,imageBitmap:s},i)})):(n[a]=new Image,n[a].decoding="async",n[a].setAttribute("data-id",t),n[a].onload=function(){var s=32,l=2,h=Math.pow(s,l);if(this.height>h)try{var d=document.createElement("canvas");d.height=h,d.width=Math.round(this.width/this.height*h),d.getContext("2d").drawImage(this,0,0,d.width,d.height);var c=d.toDataURL(/\.png(\?|$)/i.test(this.src)?"image/png":"image/jpeg",.9);return void(this.src=c)}catch(t){}o.imageMaxSize=Math.max(o.imageMaxSize||0,this.naturalHeight||this.height),n[r]=!0,o.pageLoaded({index:t,size:e,image:n[a]},i)},n[a].src=l)}else n[r]?"webgl"==o.options.viewMode?o.pageLoaded({index:t,size:e,imageBitmap:n[a]},i):o.pageLoaded({index:t,size:e,image:n[a]},i):setTimeout((function(){o.loadPage(t,e,i)}),300)}}else i.call(this)}pageLoaded(t,e){var i=2,o=10;t.imageBitmap&&!t.image&&t.imageBitmap.height>Math.pow(i,o)||(e.call(this,t,e),this.options.loadAllPages&&t.index<this.options.numPages-1&&this.loadPage(t.index+1,t.size,(function(){})),this.searchingString&&this.mark(this.searchingString,!0))}loadPageFromPdf(t,e,i){e=e||this.options.pageTextureLarge;var o=16,s=4;e=Math.min(e,Math.pow(o,2)*s),this.pdfService.renderBookPage(t,e,i)}getString(t){return this.options.strings[t]}async mark(t){await this.loadScript(FLIPBOOK.markSrc,"Mark"),this.markedStr=t;var e=this.wrapper.querySelectorAll(".textLayer"),i=Array.from(e).filter((function(e){var i=e.getAttribute("data-marked");return!(i&&i.split(",").includes(t))}));if(i.length){var o=new Mark(i);o.nodes=i,this.markInstances=this.markInstances||[],this.markInstances.push(o),o.unmark({className:"mark-search",done:function(){o.mark(t,{acrossElements:!0,separateWordSearch:!1,className:"mark-blue mark-search",done:function(){i.forEach((function(e){var i=e.getAttribute("data-marked")||"",o=i?i.split(","):[];o.includes(t)||(o.push(t),e.setAttribute("data-marked",o.join(",")))}))}})}})}}_clearResultMarks(){this.resultMarksLive&&(this.resultMarksLive=!1,this.unmark())}unmark(){this.searchingString=null,this.markedStr=null,this.markInstances=this.markInstances||[],this.markInstances.length&&(this.markInstances.forEac
1h((function(t){t.unmark({className:"mark-search",done:function(){t.nodes.forEach((function(t){t.removeAttribute("data-marked")}))}})})),this.markInstances=[])}toggleSound(t){var e=this.options;if(e.sound=void 0!==t?t:!e.sound,this.backgroundMusic){const t=e.backgroundMusicOnAutoplay&&e.btnAutoplay?.enabled;e.sound&&(!t||this.autoplay)?this.backgroundMusic.play():this.backgroundMusic.pause()}this.toggleIcon(this.btnSound,e.sound)}toggleIcon(t,e){if(t)if(t.$iconAlt)e?(t.$iconAlt.classList.add("flipbook-hidden"),t.$icon.classList.remove("flipbook-hidden")):(t.$iconAlt.classList.remove("flipbook-hidden"),t.$icon.classList.add("flipbook-hidden"));else{var i=e?t.iconAlt:t.icon,o=e?t.icon:t.iconAlt;t.find("."+i).removeClass(i).addClass(o)}}scrollPageIntoView(t){let e=t.pageNumber;this.options.doublePage&&(e=2*e-1),this.goToPage(e)}showFirstPagePreloader(){const t=this.options;if(!t.firstPagePreloader||"webgl"!==t.viewMode)return;if(this.$firstPagePreloader||!this.bookLayer)return;if(t.tilt||t.pan)return;const e=t.pages&&t.pages[0],i=e&&(e.src||e.thumb);if(!i)return;const o=document.createElement("img");o.className="flipbook-first-page-preloader",o.src=i,o.alt="",this.$firstPagePreloader=o,this.bookLayer.appendChild(o),this.positionFirstPagePreloader(),this.uiLocked=!0}positionFirstPagePreloader(){const t=this.$firstPagePreloader;if(!t)return;const e=this.options,i=e.pageWidth,o=e.pageHeight,s=this.bookLayer.clientWidth,n=this.bookLayer.clientHeight-2*(this.bookVerticalPadding||0);if(!i||!o||s<=0||n<=0)return;const a=this.zoom||Number(e.zoomMin)||1,r=Math.min(s/i,n/o)*a;t.style.width=i*r+"px",t.style.height=o*r+"px"}hideFirstPagePreloader(){const t=this.$firstPagePreloader;this.$firstPagePreloader=null,t?requestAnimationFrame((()=>{requestAnimationFrame((()=>{this.uiLocked=!1,t.classList.add("flipbook-first-page-preloader-hidden"),setTimeout((()=>t.parentNode&&t.parentNode.removeChild(t)),400)}))})):this.uiLocked=!1}preloadViewEngine(){if("webgl"===this.options.viewMode){var t={priority:"low"},e=this;this.loadScript(FLIPBOOK.threejsSrc,"THREE",t).then((function(){return e.loadScript(FLIPBOOK.flipbookWebGlSrc,"FLIPBOOK.BookWebGL",t)})).catch((function(){}))}}loadScript(t,e,i){-1===t.indexOf("?ver")&&(t+=`?ver=${FLIPBOOK.version}`),FLIPBOOK.scripts=FLIPBOOK.scripts||{};return new Promise(((o,s)=>{if(e&&void 0!==e.split(".").reduce(((t,e)=>t&&t[e]),window))return o();const n=FLIPBOOK.scripts[t];if(n)return n.loaded?o():void n.promises.push({resolve:o,reject:s});FLIPBOOK.scripts[t]={loaded:!1,promises:[{resolve:o,reject:s}]};let a=document.createElement("script");a.async=!0,i&&i.priority&&(a.fetchPriority=i.priority),a.src=t,a.onload=a.onreadystatechange=function(e,i){i||a.readyState&&!/loaded|complete/.test(a.readyState)||(a.onload=a.onreadystatechange=null,FLIPBOOK.scripts[t].loaded=!0,FLIPBOOK.scripts[t].promises.forEach((t=>t.resolve())))},a.onerror=e=>{FLIPBOOK.scripts[t].promises.forEach((t=>t.reject(e))),FLIPBOOK.scripts[t]=void 0},document.head.appendChild(a)}))}async initGoogleAnalytics(){return document.querySelector(`script[src="https://www.googletagmanager.com/gtag/js?id=${this.gaCode}"]`)?Promise.resolve():new Promise(((t,e)=>{var i=document.createElement("script");i.setAttribute("src","https://www.googletagmanager.com/gtag/js?id="+this.gaCode);const o=this;i.async=1,i.onload=function(){function e(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[];const i=window.self!==window.top;e("js",new Date),e("config",o.gaCode,{transport_type:"beacon",page_location:window.location.origin+window.location.pathname,...i&&{storage:"none",client_id:crypto.randomUUID()}}),t()},i.onerror=function(){e(new Error("Google Analytics script failed to load"))},document.body.appendChild(i)}))}async createBook(){var t=this.options;if(this.options.searchOnStart&&(this.options.btnSearch.enabled=!0),this.setLoadingProgress(.9),this.updateBookLayerSize(),this.showFirstPagePreloader(),"webgl"===this.options.viewMode){await this.loadScript(FLIPBOOK.threejsSrc,"THREE");const t=[this.loadScript(FLIPBOOK.flipbookWebGlSrc,"FLIPBOOK.BookWebGL")];!this.options.pdfMode&&this.options.pages&&this.options.pages.every((function(t){return!t.src}
1))&&t.push(this.loadScript(FLIPBOOK.html2canvasSrc,"html2canvas")),await Promise.all(t)}else"swipe"===this.options.viewMode?await Promise.all([this.loadScript(FLIPBOOK.flipbookPanZoomSrc,"FLIPBOOK.PanZoom"),this.loadScript(FLIPBOOK.flipBookSwipeSrc,"FLIPBOOK.BookSwipe")]):"scroll"===this.options.viewMode?await this.loadScript(FLIPBOOK.flipBookScrollSrc,"FLIPBOOK.BookScroll"):await Promise.all([this.loadScript(FLIPBOOK.flipbookPanZoomSrc,"FLIPBOOK.PanZoom"),this.loadScript(FLIPBOOK.flipbookBook3Src,"FLIPBOOK.Book3")]);if(window.define=this.define,this.setLoadingProgress(1),this.options.pagesOriginal=this.options.pages,this.options.doublePage&&this.options.pages.length>2){var e,i,o=this.options.pages[0];o.title=1;for(var s=[o],n=this.options.pages.length,a=1;a<=n-2;a++)e={src:(o=this.options.pages[a]).src,thumb:o.thumb,title:2*a,htmlContent:o.htmlContent,json:o.json,side:"left"},i={src:o.src,thumb:o.thumb,title:2*a+1,htmlContent:o.htmlContent,json:o.json,side:"right"},s.push(e),s.push(i);(o=this.options.pages[this.options.pages.length-1]).title=this.options.pages.length,this.options.backCover?s.push(o):(e={src:o.src,thumb:o.thumb,title:2*a,htmlContent:o.htmlContent,json:o.json,side:"left"},i={src:o.src,thumb:o.thumb,title:2*a+1,htmlContent:o.htmlContent,json:o.json,side:"right"},s.push(e),s.push(i)),this.options.pages=s}this.addPageNames();var r=this.getPreviewCut()?null:this.parsePageSpec(this.options.previewPages);if(r&&this.options.pages.forEach((function(t,e){r.has(e+1)||(t.locked=!0,t.src&&t.thumb&&(t.src=t.thumb,t.srcHigh=null))})),this.options.numPages=this.options.pages.length,this.options.numPages%2==0||this.options.singlePageMode||(this.options.backCover=!1),this.options.cover||(this.options.backCover=!this.options.backCover),this.options.wm){for(var l=this.options.wmUrl||"https://real3dflipbook.com",h=this.options.doublePage?1:2,d=this.options.pages.length-1,c=0;c<this.options.pages.length;c+=h){var p='<a class="'+((u=Math.random()<.5)?"r3d-wm r3d-wm-dark":"r3d-wm r3d-wm-light")+'" href="'+l+'" target="_blank"><img src="assets/images/'+(u?"logo_dark.png":"logo_light.png")+'"></a>';this.options.pages[c].htmlContent=(this.options.pages[c].htmlContent||"")+p}if(d%h!=0){var u;p='<a class="'+((u=Math.random()<.5)?"r3d-wm r3d-wm-dark":"r3d-wm r3d-wm-light")+'" href="'+l+'" target="_blank"><img src="assets/images/'+(u?"logo_dark.png":"logo_light.png")+'"></a>';this.options.pages[d].htmlContent=(this.options.pages[d].htmlContent||"")+p}}this.options.pages.forEach((t=>{const e=t.htmlContent||"",i=document.createElement("div");i.className="flipbook-page-html",this.options.pdfUrl||t.src||i.classList.add("flipbook-page-html-only");const o=document.createElement("div");o.className="htmlContent",o.innerHTML=e,i.appendChild(o),t.htmlContent=i})),this.updateBookLayerSize();const g=this.bookLayer.getBoundingClientRect();if(g.height>0&&(this.wrapperW=g.width,this.wrapperH=g.height,this.adjustZoomLimits()),"webgl"==this.options.viewMode){var m=this.options;m.scroll=this.scroll,m.parent=this,this.Book=new FLIPBOOK.BookWebGL(this.book,this,m),this.webglMode=!0,this.initSound()}else"swipe"==this.options.viewMode?this.Book=new FLIPBOOK.BookSwipe(this.book,this.bookLayer,this,t):"scroll"==this.options.viewMode?(this.options.singlePageMode=!0,this.Book=new FLIPBOOK.BookScroll(this.book,this.bookLayer,this,t)):("2d"!=this.options.viewMode&&(this.options.viewMode="3d"),this.Book=new FLIPBOOK.Book3(this.book,this,t),this.webglMode=!1,this.initSound());this.initSwipe(),this.initListeners(),this.Book.enable(),this.book.classList.remove("flipbook-hidden"),!t.cover&&t.startPage<2&&(t.startPage=2),this.tocCreated=!1,this.options.pdfMode,this.createMenu(),this.options.sound||this.toggleSound(!1),this.resize(),this.adjustZoomLimits(),this.Book&&null!=this.Book.zoom&&(this.Book.zoom=this.options.zoomMin),this.onZoom(this.options.zoomMin),1==this.options.pages.length&&(this.rightToLeft=!1),FLIPBOOK.books=FLIPBOOK.books||{},FLIPBOOK.books[this.id]=this.Book,this.createLogo(),this.onBookCreated()}async destroy(){this.pdfService&&(this.pdfService.pages&&this.pdfService.pages.forEac
1h((function(t){t.renderingTasks&&t.renderingTasks.forEach((function(t){t.cancel()}))})),this.pdfService.pdfDocument&&(this.pdfService.pdfDocument.cleanup(),await this.pdfService.pdfDocument.destroy(),this.pdfService.pdfDocument=null,this.pdfService=null)),this.bookCreated?(this.Book.destroy(),this.autoplayTimer&&clearInterval(this.autoplayTimer),this.setBookmarkedPages([]),delete FLIPBOOK.books[this.id],this.Book=null,this.initPdf=null,this.createMenu=null,this.createBook=null,this.options=null,this.resizeObserver.disconnect(),this.resizeObserver.disconnect(),this.removeEventListeners()):setTimeout(this.destroy.bind(this),100)}initNotes(){this.noteService=new FLIPBOOK.Notes(this);const t=this;window.addEventListener("r3d-update-note-visibility",(function(e){t.options.noteTypes.forEach((function(t){e.detail.id==t.id&&(t.enabled=e.detail.enabled)})),t.noteService.updateNoteVisibility()}))}createTooltip(){this.tooltip=new FLIPBOOK.Tooltip,this.wrapper.appendChild(this.tooltip.domElement)}showTooltip(t){this.tooltip.show(t)}hideTooltip(){this.tooltip.hide()}addPageItems(){}addPageCaptions(){const t=this.options.pages;for(let e in t){let i=t[e];if(i.htmlContent=i.htmlContent||"","string"==typeof i.caption&&""!=i.caption){const t=this.createSVGIcon("camera");i.htmlContent+='<div class="flipbook-page-caption-btn">',i.htmlContent+=t.outerHTML,i.htmlContent+="</div>";const e='<div class="flipbook-page-caption">'+i.caption+"</div>";i.htmlContent+=e}}}initHotspotTooltip(){const t=this,e=this.options.strings||{},i=e.addToCart||"Add to cart",o=e.viewProduct||"View product",s=document.createElement("div");s.className="flipbook-hotspot-tooltip",s.style.position="absolute",s.tabIndex=-1,this.wrapper.appendChild(s),this.hotspotTooltip=s,this.hotspotTooltipTarget=null,this.hotspotTooltipPinned=!1;const n=e=>{const i=e.querySelector(".flipbook-hotspot-dot")||e,o=t.wrapper.getBoundingClientRect(),n=i.getBoundingClientRect(),a=n.left+n.width/2-o.left,r=n.top+n.height/2-o.top,l=o.width,h=o.height,d=s.offsetWidth,c=s.offsetHeight;let p,u,g;s.classList.remove("tooltip-top","tooltip-bottom","tooltip-left","tooltip-right");const m=r-n.height/2,b=h-(r+n.height/2),f=r>h/2;f&&m>c+0?(g="tooltip-top",p=a-d/2,u=r-n.height/2-0-c):!f&&b>c+0?(g="tooltip-bottom",p=a-d/2,u=r+n.height/2+0):m>c+0?(g="tooltip-top",p=a-d/2,u=r-n.height/2-0-c):b>c+0?(g="tooltip-bottom",p=a-d/2,u=r+n.height/2+0):a>l/2?(g="tooltip-left",p=a-n.width/2-0-d,u=r-c/2):(g="tooltip-right",p=a+n.width/2+0,u=r-c/2),p=Math.max(4,Math.min(p,l-d-4)),u=Math.max(4,Math.min(u,h-c-4)),s.classList.add(g),s.style.left=p+"px",s.style.top=u+"px"},a=(a,h)=>{const d=a.getAttribute("data-tooltip-data");if(!d)return;const c=a.classList.contains("flipbook-page-item-link"),p=t.hotspotTooltipTarget!==a;try{if(p){let n;t.hotspotTooltipTarget?.hasAttribute("aria-expanded")&&t.hotspotTooltipTarget.setAttribute("aria-expanded","false");try{n=JSON.parse(d)}catch(t){n=d}const r=a.dataset.linkTarget||"_blank";((t,n,a)=>{if(s.style.width=a+"px","string"==typeof t)return s.className="flipbook-hotspot-tooltip flipbook-hotspot-tooltip-text",s.setAttribute("role","tooltip"),s.removeAttribute("aria-label"),void(s.innerHTML=`<div class="flipbook-hotspot-tooltip-body">${t}</div>`);s.className="flipbook-hotspot-tooltip flipbook-hotspot-tooltip-card",s.setAttribute("role","dialog"),s.setAttribute("aria-label",String(t.title||"").replace(/<[^>]*>/g,"")||"Details");const r=e=>!1!==t.show?.[e],l=r("image")&&r("gallery")&&Array.isArray(t.images)&&t.images.length>1?t.images:null;s._galleryImages=l;let h="";if(l){l.slice(1).forEach((t=>{(new Image).src=t}));const i=l.map(((t,e)=>`<span class="flipbook-hotspot-tooltip-gallery-dot${0===e?" active":""}"></span>`)).join("");h=`<div class="flipbook-hotspot-tooltip-gallery" data-gallery-index="0">\n                    <img class="flipbook-hotspot-tooltip-image" src="${l[0]}" alt="${t.title||""}">\n                    <button type="button" class="flipbook-hotspot-tooltip-gallery-btn flipbook-hotspot-tooltip-gallery-prev" data-gallery-nav="-1" aria-label="${e.previousImage||"Previous image"}">&lsaquo;</button>\n                    <button type="button" class="flipbook-hotspot-tooltip-gallery-btn flipbook-hotspot-tooltip-gallery-next" data-gallery-nav="1" aria-label="${e.nextImage||"Next image"}">&rsaquo;</button>\n                    <div class="flipbook-hotspot-tooltip-gallery-dots">${i}</div>\n                </div>`}else r("image")&&t.image&&(h=`<img class="flipbook-hotspot-tooltip-image" src="${t.image}" alt="${t.title||""}">`);const d=r("title")&&t.title?`<div class="flipbook-hotspot-tooltip-title">${t.title}</div>`:"",c=r("description")&&t.description?`<div class="flipbook-hotspot-tooltip-description">${t.description}</div>`:"",p=parseFloat(t.rating),u=r("rating")&&!isNaN(p)&&p>0?`<div class="flipbook-hotspot-tooltip-rating"><span class="flipbook-hotspot-tooltip-stars">★★★★★<span class="flipbook-hotspot-tooltip-stars-fill" style="width:${Math.max(0,Math.min(100,p/5*100))}%">★★★★★</span></span>
1${t.ratingCount?`<span class="flipbook-hotspot-tooltip-rating-count">(${t.ratingCount})</span>`:""}</div>`:"",g=t.comparePrice?`<span class="compare-price">${t.comparePrice}</span>`:"",m=r("price")&&t.price?`<div class="flipbook-hotspot-tooltip-price">${t.price}${g}</div>`:"";let b="";r("variants")&&Array.isArray(t.variants)&&t.variants.length>1&&(b=`<select class="flipbook-hotspot-tooltip-variant-select" aria-label="Variant">${t.variants.map((e=>{const i=e.id===t.variantId?" selected":"";return`<option value="${e.id}" data-price="${e.price||""}" data-compare="${e.comparePrice||""}"${i}>${e.title}</option>`})).join("")}</select>`);const f=!(!t.cartUrl&&!t.variantId),v=t.quantity||1;let k="";f&&r("qty")&&t.showQuantity&&(k=`<div class="flipbook-hotspot-tooltip-qty">\n                    <button type="button" class="flipbook-hotspot-tooltip-qty-btn" data-qty-delta="-1" aria-label="${e.decreaseQuantity||"Decrease quantity"}">&minus;</button>\n                    <span class="flipbook-hotspot-tooltip-qty-value" aria-live="polite">${v}</span>\n                    <button type="button" class="flipbook-hotspot-tooltip-qty-btn" data-qty-delta="1" aria-label="${e.increaseQuantity||"Increase quantity"}">+</button>\n                </div>`);const w=r("addToCart")&&f,y=r("viewProduct")&&!!t.url;let P="";if(w||y){if(P='<div class="flipbook-hotspot-tooltip-actions">',w){const e=t.variantId||"",o=t.cartUrl||"/cart/add?id="+e;P+=`<a href="${0===o.indexOf("addtocart:")?o:o+(o.includes("?")?"&":"?")+"quantity="+v}" target="${n}" class="flipbook-hotspot-tooltip-btn flipbook-hotspot-tooltip-btn-primary" data-cart-base="${o}" data-variant-id="${e}" data-quantity="${v}">${i}</a>`}y&&(P+=`<a href="${t.url}" target="${n}" class="flipbook-hotspot-tooltip-btn flipbook-hotspot-tooltip-btn-secondary">${o}</a>`),P+="</div>"}s.innerHTML=`${h}\n                <div class="flipbook-hotspot-tooltip-body">\n                    ${d}\n                    ${u}\n                    ${c}\n                    ${b}\n                    ${m}\n                    ${k}\n                    ${P}\n                </div>`;const L=s.querySelector(".flipbook-hotspot-tooltip-variant-select");L&&L.addEventListener("change",(()=>{const e=L.options[L.selectedIndex],i=e.value,o=e.getAttribute("data-price")||"",n=e.getAttribute("data-compare")||"",a=s.querySelector(".flipbook-hotspot-tooltip-btn-primary[data-variant-id]");if(a){a.setAttribute("data-variant-id",i);const e=a.getAttribute("data-cart-base")||"",o=parseInt(a.getAttribute("data-quantity"),10)||t.quantity||1;if(0===e.indexOf("addtocart:"))a.setAttribute("href",e);else{const t=e.replace(/(\bid=)\d+/,`$1${i}`),s=t.includes("?")?"&":"?";a.setAttribute("href",`${t}${s}quantity=${o}`)}}const r=s.querySelector(".flipbook-hotspot-tooltip-price");r&&o&&(r.innerHTML=`${o}${n?`<span class="compare-price">${n}</span>`:""}`)}))})(n,r,parseInt(a.dataset.tooltipWidth)||t.options.hotspotTooltipWidth||220),t.hotspotTooltipTarget=a,a.hasAttribute("aria-expanded")&&a.setAttribute("aria-expanded","true"),s.style.visibility="hidden",s.style.opacity="0",s.classList.add("visible")}const u=s.classList.contains("flipbook-hotspot-tooltip-card");if(c&&h&&!u)l(h);else if(p){r&&(s.style.translate="",s.style.willChange="",r=!1),n(a);const e=s.querySelector(".flipbook-hotspot-tooltip-image");e&&!e.complete&&e.addEventListener("load",(()=>{t.hotspotTooltipTarget!==a||r||n(a)}),{once:!0})}p&&(s.style.visibility="",s.style.opacity=""),s.classList.add("visible")}catch(t){}};let r=!1;const l=e=>{r||(s.style.left="0px",s.style.top="0px",s.style.willChange="transform",r=!0);
1const i=t.wrapper.getBoundingClientRect(),o=e.clientX-i.left,n=e.clientY-i.top,a=i.width,l=i.height,h=s.offsetWidth,d=s.offsetHeight;s.classList.remove("tooltip-top","tooltip-bottom","tooltip-left","tooltip-right");let c,p=o-h/2;n>l/2?(c=n-d-16,s.classList.add("tooltip-top")):(c=n+16,s.classList.add("tooltip-bottom")),p=Math.max(4,Math.min(p,a-h-4)),c=Math.max(4,Math.min(c,l-d-4)),s.style.translate=`${p}px ${c}px`},h=()=>{c(),t.hotspotTooltipPinned=!1,s.classList.remove("visible"),t.hotspotTooltipTarget?.hasAttribute("aria-expanded")&&t.hotspotTooltipTarget.setAttribute("aria-expanded","false"),t.hotspotTooltipTarget=null};let d=null;function c(){d&&(clearTimeout(d),d=null)}this.pinHotspotCard=e=>{const i=e.getAttribute("data-tooltip-data");if(!i)return!1;let o;try{o=JSON.parse(i)}catch(t){return!1}return!(!o||"object"!=typeof o)&&(c(),t.hotspotTooltipTarget===e&&t.hotspotTooltipPinned?h():(a(e),t.hotspotTooltipPinned=!0),!0)},this.wrapper.addEventListener("mouseover",(e=>{const i=e.target.closest(".flipbook-hotspot");if(i)return i!==t.hotspotTooltipTarget&&(t.hotspotTooltipPinned=!1),c(),void a(i,e);e.target.closest(".flipbook-hotspot-tooltip")&&c()})),this.wrapper.addEventListener("mouseout",(e=>{const i=e.target.closest(".flipbook-hotspot"),o=e.target.closest(".flipbook-hotspot-tooltip");if(!i&&!o)return;if(t.hotspotTooltipPinned)return;const n=e.relatedTarget;if(n){if(n.closest(".flipbook-hotspot-tooltip")===s)return void c();if(n.closest(".flipbook-hotspot")===t.hotspotTooltipTarget)return void c()}c(),d=setTimeout((()=>{d=null,h()}),260)})),this.wrapper.addEventListener("mousemove",(e=>{const i=e.target.closest(".flipbook-hotspot");i&&i===t.hotspotTooltipTarget&&i.classList.contains("flipbook-page-item-link")&&!s.classList.contains("flipbook-hotspot-tooltip-card")&&l(e)})),s.addEventListener("click",(t=>{const e=t.target.closest("[data-qty-delta]");if(!e)return;t.preventDefault(),t.stopPropagation();const i=parseInt(e.dataset.qtyDelta),o=s.querySelector(".flipbook-hotspot-tooltip-qty-value");if(!o)return;let n=Math.max(1,parseInt(o.textContent)+i);o.textContent=n;const a=s.querySelector("[data-cart-base]");if(a){const t=a.dataset.cartBase||"";if(a.dataset.quantity=String(n),0!==t.indexOf("addtocart:")){const e=a.getAttribute("data-variant-id")||"",i=e?t.replace(/(\bid=)\d+/,`$1${e}`):t,o=i.includes("?")?"&":"?";a.href=`${i}${o}quantity=${n}`}}})),s.addEventListener("click",(t=>{const e=t.target.closest("[data-gallery-nav]");if(!e)return;t.preventDefault(),t.stopPropagation();const i=s.querySelector(".flipbook-hotspot-tooltip-gallery"),o=s._galleryImages;if(!i||!o)return;const n=((parseInt(i.dataset.galleryIndex)||0)+parseInt(e.dataset.galleryNav)+o.length)%o.length;i.dataset.galleryIndex=n,i.querySelector(".flipbook-hotspot-tooltip-image").src=o[n],i.querySelectorAll(".flipbook-hotspot-tooltip-gallery-dot").forEach(((t,e)=>t.classList.toggle("active",e===n)))})),this.wrapper.addEventListener("click",(e=>{if(e.target.closest(".flipbook-hotspot-tooltip-btn"))return;if(e.target.closest("[data-qty-delta]"))return;if(e.target.closest("[data-gallery-nav]"))return;const i=e.target.closest(".flipbook-hotspot");if(i){if(i.classList.contains("flipbook-page-item-link"))return t.pinHotspotCard(i)?(e.preventDefault(),void e.stopPropagation()):void h();const o=i.dataset.url,s=i.dataset.page;if(o){const t=i.dataset.linkTarget||"_blank";return window.open(o,t),h(),e.preventDefault(),void e.stopPropagation()}if(s)return t.goToPage(parseInt(s)),h(),e.preventDefault(),void e.stopPropagation();t.hotspotTooltipTarget===i?h():a(i),e.preventDefault(),e.stopPropagation()}else e.target.closest(".flipbook-hotspot-tooltip")||t.hotspotTooltipTarget&&h()})),this.wrapper.addEventListener("keydown",(e=>{if("Escape"===e.key){if(t.hotspotTooltipTarget){const i=t.hotspotTooltipTarget;h(),i.hasAttribute("tabindex")&&i.focus({preventScroll:!0}),e.stopPropagation()}return}if("Enter"!==e.key&&" "!==e.key)return;const i=e.target.closest&&e.target.closest(".flipbook-hotspot");i&&!i.classList.contains("flipbook-page-item-link")&&(" "===e.key&&"button"!==i.getAttribute("role")||(e.preventDefault(),i.click(),t.hotspotTooltipTarget===i&&(s.focus({preventScroll:!0}),document.activeElement!==s&&setTimeout((()=>{t.hotspotTooltipTarget===i&&s.focus({preventScroll:!0})}),50))))}))}spotlight(t,e,i){}showPreviewEndModal(){const t=this.options;let e=this.previewEndOverlay;if(!e){e=document.createElement("div"),e.className="flipbook-preview-modal-overlay";const t=document.createElement("div");t.className="flipbook-preview-modal";const i=document.createElement("button");i.className="flipbook-preview-modal-close",i.innerHTML='\n\t\t\t\t<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n\t\t\t\t\t<path d="M6 6L18 18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n\t\t\t\t\t<path d="M6 18L18 6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n\t\t\t\t</svg>\n\t\t\t',i.onclick=()=>this.hidePreviewEndModal(),e.addEventListener("click",(t=>{t.target===e&&this.hidePreviewEndModal()}));const o=document.createElement("div");o.className="flipbook-preview-modal-content",t.appendChild(i),t.appendChild(o),e.appendChild(t),this.wrapper.appendChild(e),this.previewEndOverlay=e,this.previewEndContent=o}this.previewEndContent.innerHTML=t.previewMessage||'<div class="flipbook-preview-modal-default">'+this.getString("endOfPreview")+"</div>",e.classList.remove("flipbook-hidden"),this._previewEndEsc&&document.removeEventListener("keydown",this._previewEndEsc),this._previewEndEsc=t=>{"Escape"===t.key&&this.hidePreviewEndModal()},document.addEventListener("keydown",this._previewEndEsc)}hidePreviewEndModal(){this.previewEndOverlay&&this.previewEndOverlay.classList.add("flipbook-hidden"),this._previewEndEsc&&(document.removeEventListener("keydown",this._previewEndEsc),this._previewEndEsc=null)}showMenu(){this.menuTop.classList.remove("flipbook-hidden"),this.menuBottom.classList.remove("flipbook-hidden")}hideMenu(){this.menuTop.classList.add("flipbook-hidden"),this.menuBottom.classList.add("flipbook-hidden")}showCenterExpandButton(){if(!this.centerButtonExpand){const t=document.createElement("div");t.className="flipbook-center-btn-expand";const e=this.createSVGIcon("expand");t.appendChild(e),t.addEventListener("click",(()=>{this.toggleExpand()})),this.wrapper.appendChild(t),this.centerButtonExpand=t}this.centerButtonExpand.classList.remove("flipbook-hidden")}hideCenterExpandButton(){this.centerButtonExpand&&this.centerButtonExpand.classList.add("flipbook-hidden")}toggleMinimalView(){this.wrapperW<this.options.minimalViewBreakpoint&&!this.lightbox&&!this.fullscreenActive?this.minimalViewActive||(this.hideMenu(),this.showCenterExpandButton(),this.minimalViewActive=!0,this.goToPage(1,!0),this.updateBookLayerSize()):this.minimalViewActive&&(this.showMenu(),this.hideCenterExpandButton(),this.minimalViewActive=!1,this.updateBookLayerSize())}updateCompactMode(){if(this.elem){var t=this.options.compactBreakpoint||600,e=this.elem.getBoundingClientRect().width,i=e>0&&e<t;i!==this._compactActive&&(this._compactActive=i,this.elem.classList.toggle("flipbook-compact",i))}}resizeContainer(){if(this.options.minimalView&&this.toggleMinimalView(),!this.lightbox&&!this.options.fullscreen&&!this.elemStatic){var t=this.pageW/this.pageH,e=2*t;let o,s=this.elem.getBoundingClientRect().width;o=this.options.isMobile&&s<this.options.responsiveViewTreshold?t:e;var i=s/(this.options.containerRatio||o);window.innerHeight>0&&(i=Math.min(i,window.innerHeight)),this.elemH!=i&&(this.elemH=i,this.elem.style.height=i+"px")}this.resize()}addEventListeners(){this.handleResize=()=>{this.resizeContainer(),this.scheduleRefit()},this.handleKeydown=t=>{if(this.Book.enabled&&(this.options.lightBox||!document.body.classList.contains("flipbook-overflow-hidden"))&&(this.fullscreenActive||!document.body.classList.contains("flipbook-fullscreen"))&&(this.options.arrowsAlwaysEnabledForNavigation&&(37==t.keyCode||39==t.keyCode)||!this.options.lightBox&&!this.fullscreenActive&&(this.options.arrowsDisabledNotFullscreen||this.bodyHasVerticalScrollbar()))){switch(t.keyCode){case 37:this.zoom>1?this.moveBook("left"):this.prevPage();break;case 38:this.zoom>1?this.moveBook("up"):this.nextPage();break;case 39:this.zoom>1?this.moveBook("right"):this.nextPage();break;case 33:this.prevPage();break;case 34:this.nextPage();break;case 36:this.firstPage();break;case 35:this.lastPage();break;case 40:this.zoom>1?this.moveBook("down"):this.prevPage()}return!1}},this.handleFs=()=>this.handleFsChange(),this.handleOrientation=()=>{this.refitViewport(),this.scheduleRefit()},window.addEventListener("resize",this.handleResize),window.addEventListener("orientationchange",this.handleOrientation),document.addEventListener("keydown",this.handleKeydown),document.addEventListener("MSFullscreenChange",this.handleFs),document.addEventListener("mozfullscreenchange",this.handleFs),document.addEventListener("webkitfullscreenchange",this.handleFs),document.addEventListener("fullscreenchange",this.handleFs)}removeEventListeners(){window.removeEventListener("resize",this.handleResize),window.removeEventListener("orientationchange",this.handleOrientation),document.removeEventListener("keydown",this.handleKeydown),document.removeEventListener("MSFullscreenChange",this.handleFs),document.removeEventListener("mozfullscreenchange",this.handleFs),document.removeEventListener("webkitfullscreenchange",this.handleFs),document.removeEventListener("fullscreenchange",this.handleFs)}onBookCreated(){var t=this.options,e=this,i=document.documentElement;if(i.style.setProperty("--flipbook-link-color",this.options.linkColor),i.style.setProperty("--flipbook-link-color-hover",this.options.linkColorHover),i.style.setProperty("--flipbook-link-opacity",this.options.linkOpacity),this.elemStatic="static"==getComputedStyle(this.elem).position,this.resizeContainer(),this.addEventListeners(),this.resizeObserver=new ResizeObserver((t=>{e.resizeContainer(),e.updateCompactMode()})),this.resizeObserver.observe(this.elem),this.updateCompactMode(),this.resizeObserver2=new ResizeObserver((()=>{e.resize()})),this.resizeObserver2.observe(this.bookLayer),requestAnimationFrame((()=>this.refitViewport())),this.scheduleRefit(),this.playBgMusic(),t.lightboxCloseOnBack&&(window.onpopstate=function(){e.Book.enabled&&e.lightbox&&e.lightbox.lightboxOpened&&(window.location.hash||e.lightbox.closeLightbox(!0))}),"scroll"!=this.options.viewMode){this.bookLayer.addEventListener("wheel",function(t){if(t.ctrlKey&&t.preventDefault(),!this.Book.enabled)return;if(!(this.options.lightBox||this.fullscreenActive||t.ctrlKey||this.options.wheelZoomAlways)&&(this.options.wheelDisabledNotFullscreen||this.bodyHasVerticalScrollbar()||this.isIframe()))return;const e=t.deltaX||-t.wheelDeltaX||-t.detail,i=t.deltaY||-t.wheelDeltaY||-t.detail;if(Math.abs(i)>0&&Math.abs(i)>Math.abs(e)){t.preventDefault();const e=i>0?1/this.options.zoomStep:this.options.zoomStep;return this.zoomTo(this.zoom*e,0,t),!1}}.bind(this),{passive:!1});let t=1;this.bookLayer.addEventListener("gesturestart",function(e){e.preventDefault(),t=this.zoom}.bind(this)),this.bookLayer.addEventListener("gesturechange",function(e){e.preventDefault(),"number"==typeof e.scale&&this.zoomTo(t*e.scale,0,e)}.bind(this)),this.bookLayer.addEventListener("gestureend",(t=>t.preventDefault()))}if(e.options.contentOnStart)this.toggleToc(!0);else if(e.options.thumbnailsOnStart)this.options.thumbsStyle="side",this.toggleThumbs(!0);else if(e.options.searchOnStart&&(this.toggleSearch(!0),"string"==typeof this.options.searchOnStart)){const t=this.thumbs.findInput;t.value=this.options.searchOnStart;const e=new KeyboardEvent("keyup",{bubbles:!0});t.dispatchEvent(e)}
1t.autoplayOnStart&&this.toggleAutoplay(!0),this.resize(),this.Book.zoomTo(t.zoomMin),this.updateCurrentPage(),this.goToPage(Number(t.startPage),!0),t.onbookcreated&&t.onbookcreated.call(this),this.bookCreated=!0}initSound(){if(this.options.flipSound&&this.options.assets&&this.options.assets.flipMp3){const t=window.AudioContext||window.webkitAudioContext;if(t)try{this._audioCtx=new t,fetch(this.options.assets.flipMp3).then((t=>t.arrayBuffer())).then((t=>this._audioCtx.decodeAudioData(t))).then((t=>{this._flipBuffer=t})).catch((()=>{}));const e=["touchstart","touchend","pointerdown","pointerup","click"],i=()=>e.forEach((t=>document.removeEventListener(t,o,!0))),o=()=>{if(!this._audioCtx)return i();if("running"!==this._audioCtx.state){this._audioCtx.resume().catch((()=>{}));try{const t=this._audioCtx.createBufferSource();t.buffer=this._silentBuffer||(this._silentBuffer=this._audioCtx.createBuffer(1,1,22050)),t.connect(this._audioCtx.destination),t.start(0)}catch(t){}}};e.forEach((t=>document.addEventListener(t,o,{capture:!0}))),this._releaseFlipSoundUnlock=i}catch(t){}}if(this.options.backgroundMusic){let e=null;if("string"==typeof this.options.backgroundMusic?e=this.options.backgroundMusic:this.options.assets&&this.options.assets.backgroundMp3&&(e=this.options.assets.backgroundMp3),e){this.backgroundMusic=document.createElement("audio"),this.backgroundMusic.preload="auto",this.backgroundMusic.autoplay=!(this.options.backgroundMusicOnAutoplay&&this.options.btnAutoplay?.enabled),this.backgroundMusic.loop=!0;var t=document.createElement("source");t.src=e,t.type="audio/mpeg",this.backgroundMusic.appendChild(t),document.body.appendChild(this.backgroundMusic)}}}touchSwipe(t,e){let i,o,s,n,a,r,l=null,h=!1,d=!1,c=0,p=!1,u=null;function g(t,e){return{distanceX:t-i,distanceY:e-o}}function m(t){return t.type.includes("mouse")?t:t.touches[0]}var b=this;function f(n){if("touchstart"===n.type)p=!0;else{if("mousedown"===n.type&&p)return;if("A"===n.target.tagName&&!n.target.classList.contains("pageClickArea")||"SPAN"===n.target.tagName||"MARK"===n.target.tagName)return void b.trigger("disableIScroll");if(n.target.closest(".flipbook-page-html-only")&&n.target.closest("p, h1, h2, h3, h4, h5, h6, span, li, td, th, dt, dd, label, blockquote, figcaption, a, button, input, select, textarea, [onclick]"))return void b.trigger("disableIScroll");if(n.target.closest(".flipbook-page-html-only")&&n.target.matches(".cat-page div"))return void b.trigger("disableIScroll")}b.trigger("enableIScroll");let a=m(n);i=a.clientX,o=a.clientY,s=(new Date).getTime(),h=!0,u=null,b._swipeMoved=!1,c=n.touches?n.touches.length:1,e(n,"start",null,0,0,c),t.addEventListener("mousemove",v),t.addEventListener("touchmove",v,{passive:!1})}function v(t){let i=m(t),{distanceX:o,distanceY:s}=g(i.clientX,i.clientY);if(n=i.clientX,a=i.clientY,Math.abs(o)+Math.abs(s)>6&&(b._swipeMoved=!0),h&&"mousemove"===t.type)t.preventDefault(),e(t,"move",o,s,0,1);else if(t.touches&&2===t.touches.length){t.preventDefault();const i=(t.touches[0].clientX+t.touches[1].clientX)/2,o=(t.touches[0].clientY+t.touches[1].clientY)/2;let s;if("number"==typeof t.scale)s=t.scale;else{let e=function(t){if(t.length<2)return 0;let e=t[0].clientX-t[1].clientX,i=t[0].clientY-t[1].clientY;return Math.sqrt(e*e+i*i)}(t.touches);d?s=e/r:(r=e,s=1)}if(d){const n={x:i-l.x,y:o-l.y};l={x:i,y:o},e(t,"pinch",s,n,0,2)}else d=!0,l={x:i,y:o},e(t,"pinchstart",s,{x:0,y:0},0,2)}else if(t.touches&&1===t.touches.length){if("scroll"!==b.options.viewMode&&!(b.zoom>1)){if(null===u){const t=Math.abs(o),e=Math.abs(s);if(t+e<10)return;u=t>e?"x":"y"}if("y"===u)return}e(t,"move",o,s,0,1)}}function k(t){b.trigger("enableIScroll"),"touchend"!==t.type&&"mouseup"!==t.type||setTimeout((function(){p=!1}),300);let i=t.changedTouches?t.changedTouches[0]:t,{distanceX:o,distanceY:n}=g(i.clientX,i.clientY),a=(new Date).getTime()-s;if(h){h=!1;e(t,"end","y"===u?0:o,"y"===u?0:n,a,t.changedTouches?t.changedTouches.length:1)}d&&(d=!1,e(t,"pinchend",null,0,0,2)),y()}function w(t){setTimeout((function(){p=!1}),300);let i=(new Date).getTime()-s,{distanceX:o,distanceY:r}=g(n,a);
1h&&(h=!1,e(t,"cancel",o,r,i,1)),d&&(d=!1,e(t,"pinchcancel",o,r,i,2)),y()}function y(){t.removeEventListener("mousemove",v),t.removeEventListener("touchmove",v)}t.addEventListener("mousedown",f),t.addEventListener("touchstart",f),t.addEventListener("mouseup",k),t.addEventListener("touchend",k),t.addEventListener("mouseleave",w),t.addEventListener("touchcancel",w)}initListeners(){this.wrapper.addEventListener("pointerdown",(t=>{this.deselectText()}))}initSwipe(){var t=this;let e=!1,i=!1,o=!1;this.touchSwipe(this.book,(function(s,n,a,r,l,h){if(o="toolSelect"==t.tool||t.options.pageDragDisabled,"start"==n){t.zoomStart=t.zoom;try{t.currentPageInput.dispatchEvent(new Event("blur",{bubbles:!0,cancelable:!0}))}catch(s){}const e=s.target.closest(".flipbook-page-html");e&&e.classList.add("mousedown"),o||"mousedown"!==s.type||(document.body.style.userSelect="none",document.body.style.webkitUserSelect="none")}if(h>1&&"pinch"==n){let e=a;s.scale&&(e=s.scale),t.Book&&(t.Book._gestureZoom=!0),t.zoomTo(t.zoomStart*e,0,s),r&&"number"==typeof r.x&&t.Book&&t.Book._panBy&&t.Book.isZoomed&&t.Book.isZoomed()&&t.Book._panBy(r.x,r.y),i=!0}if("end"==n){if(!t.options.doubleClickZoomDisabled)if(!t.clickTimer&&s.touches)t.clickTimer=setTimeout((function(){delete t.clickTimer}),300);else{clearTimeout(t.clickTimer),delete t.clickTimer;const e=s.target.closest(".flipbook-page-html");e&&e.classList.remove("mousedown");const i=s.target.closest(".r3d-link-btn")||s.target.closest(".flipbook-has-buttons")||s.target.closest(".flipbook-hotspot"),o=s.target.closest("a, button, input, select, textarea, [onclick]");if(e&&!a&&!r&&!i&&!o&&!1!==t.zoomAvailable){var d=t.options.zoomTime,c=Math.min(t.options.zoomMax,Math.max(t.options.zoomMax/2,2*t.options.zoomMin,t.getSharpZoom()));t.zoom>1?(t.zoomTo(t.options.zoomMin,d,s),e.classList.remove("zoomed")):(t.zoomTo(c,d,s),e.classList.add("zoomed"))}}!(Math.abs(a)<5&&l<200)||t.Book&&t.Book._pressDir||(e=!0)}e||i||o||t.Book.onSwipe(s,n,a,r,l,h),e=!1,"end"!=n&&"cancel"!=n&&"pinchend"!=n&&"pinchcancel"!=n||(document.body.style.userSelect="",document.body.style.webkitUserSelect=""),"pinchend"!=n&&"pinchcancel"!=n||(i=!1,t.Book&&t.Book._gestureZoom&&(t.Book._gestureZoom=!1,t.zoomLevelHandled=null,t.onZoom(t.zoom),t.Book.loadPages&&t.Book.loadPages()))})),this.swipeEnabled=!0}createSVGIcon(t,e=!1){const i=this.options,o="lucide"===(i.iconSet||"fontawesome"),s=o?FLIPBOOK?.Main?.icons?.lucide?.[t]:null,n=s??FLIPBOOK?.Main?.icons?.fontawesome?.[t]??FLIPBOOK?.Main?.icons?.[t];if(!n)return null;const a=o&&!!s,[r,l,h]=n,d="http://www.w3.org/2000/svg",c=document.createElementNS(d,"svg");if(c.setAttribute("viewBox",`0 0 ${r} ${l}`),c.setAttribute("height","1em"),c.setAttribute("aria-hidden","true"),c.setAttribute("focusable","false"),c.classList.add("flipbook-icon"),e&&c.classList.add("flipbook-icon-reverse"),c._isLucide=a,a)c.style.setProperty("fill","none","important"),c.setAttribute("stroke","currentColor"),c.setAttribute("stroke-width",i.iconStrokeWidth||2),c.setAttribute("stroke-linecap","round"),c.setAttribute("stroke-linejoin","round"),c.innerHTML=h;else{i.iconStrokeWidth?(c.setAttribute("fill","none"),c.setAttribute("stroke","currentColor"),c.setAttribute("stroke-width",i.iconStrokeWidth)):c.setAttribute("stroke-width","1");const t=document.createElementNS(d,"path");t.setAttribute("d",h),c.appendChild(t)}return c}getFloatingPill(t){if(!t._floatingPill){var e=this.options,i=document.createElement("div");i.className="flipbook-menu-grouped",i.style.background=e.floatingBtnBackground,i.style.borderRadius=e.floatingBtnRadius+"px",i.style.boxShadow=e.floatingBtnShadow,i.style.margin=e.floatingBtnMargin+"px",i.style.padding="2px",i.style.pointerEvents="auto",i.style.display="flex",i.style.alignItems="center",i.style.gap="2px",t._floatingPill=i,t.appendChild(i)}return t._floatingPill}createButton(t){var e=this.options,i=(e.iconSet,t.toolsMenu&&e.btnTools.enabled),o=!i&&("top"===t.vAlign&&e.menu2Transparent||"top"!==t.vAlign&&e.menuTransparent),s=t.background||(o?"none":e.btnBackground),n=t.backgroundHover||(o?e.floatingBtnBackgroundHover:e.btnBackgroun
1dHover),a=t.color||(o?e.floatingBtnColor:e.btnColor),r=t.colorHover||(o?e.floatingBtnColorHover:e.btnColorHover),l=o?e.floatingBtnTextShadow:e.btnTextShadow,h=t.radius||(o?999:e.btnRadius),d=t.border||(o?e.floatingBtnBorder:e.btnBorder),c=o?0:e.btnMargin,p=o?"none":e.btnShadow,u=o?e.btnPaddingV+1:e.btnPaddingV+4,g=o?e.btnPaddingH+1:e.btnPaddingH+4,m=document.createElement("span"),b=t.size||e.btnSize;i&&(s="none",n="none");const f=t.svg||t.name.replace("btn","").toLowerCase();var v;if(m.$icon=this.createSVGIcon(f,t.iconReverse),m.appendChild(m.$icon),t.svgAlt&&(m.$iconAlt=this.createSVGIcon(t.svgAlt,t.iconReverse),m.appendChild(m.$iconAlt),m.$iconAlt.classList.add("flipbook-hidden")),function(t){t.style.margin=`${c}px`,t.style.padding=`${u}px ${g}px`,t.style.borderRadius=`${h}px`,t.style.boxShadow=p,t.style.border=d,t.style.color=a,t.$icon._isLucide?t.$icon.style.stroke=a:t.$icon.style.fill=a,t.$iconAlt&&(t.$iconAlt._isLucide?t.$iconAlt.style.stroke=a:t.$iconAlt.style.fill=a),t.style.background=s,t.style.textShadow=l,t.style.width=`${b}px`,t.style.height=`${b}px`,a&&t.classList.remove("skin-color"),s&&t.classList.remove("skin-color-bg")}(m),t.onclick&&m.addEventListener("click",(function(){t.onclick()})),m.tabIndex=0,m.setAttribute("role","button"),t.title&&m.setAttribute("aria-label",t.title),m.addEventListener("keydown",(function(t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),m.click())})),(r||n)&&(m.addEventListener("mouseenter",(function(){if(!this.classList.contains("disabled")){var t=m.$icon._isLucide?"stroke":"fill";if(m.$icon.style[t]=r,o?m.style.background=n:m.$icon.style.background=n,m.$iconAlt){var e=m.$iconAlt._isLucide?"stroke":"fill";m.$iconAlt.style[e]=r,o||(m.$iconAlt.style.background=n)}}})),m.addEventListener("mouseleave",(function(){var t=m.$icon._isLucide?"stroke":"fill";if(m.$icon.style[t]=a,o?m.style.background=s:m.$icon.style.background=s,m.$iconAlt){var e=m.$iconAlt._isLucide?"stroke":"fill";m.$iconAlt.style[e]=a,o||(m.$iconAlt.style.background=s)}}))),i){v=this.toolsMenu;var k=document.createElement("span");k.textContent=t.title,k.classList.add("skin-color"),m.appendChild(k)}else v="top"===t.vAlign?e.menu2Floating?this.menuTC:"left"===t.hAlign?this.menuTL:"right"===t.hAlign?this.menuTR:this.menuTC:e.menuFloating?this.menuBC:"left"===t.hAlign?this.menuBL:"right"===t.hAlign?this.menuBR:this.menuBC;m.setAttribute("data-name",t.name),m.classList.add("flipbook-menu-btn-wrapper","flipbook-menu-btn","skin-color"),m.style.order=t.order,o?this.getFloatingPill(v).appendChild(m):v.appendChild(m),i||(m.setAttribute("data-tooltip",t.title),m.classList.add("flipbook-has-tooltip"));if(!i&&this.toolsMenu&&-1!==["btnSearch","btnBookmark","btnToc","btnThumbs","btnAutoplay","btnShare"].indexOf(t.name)){var w=t.color||e.btnColor,y=e.btnMargin,P=e.btnPaddingV+4,L=e.btnPaddingH+4,S=t.radius||e.btnRadius,x=t.size||e.btnSize,M=document.createElement("span");M.className="flipbook-menu-btn-wrapper flipbook-menu-btn skin-color flipbook-compact-only",M.setAttribute("data-name",t.name),M.style.margin=y+"px",M.style.padding=P+"px "+L+"px",M.style.borderRadius=S+"px",M.style.background="none",w&&(M.style.color=w,M.classList.remove("skin-color"));var B=this.createSVGIcon(t.svg||t.name.replace("btn","").toLowerCase(),t.iconReverse);B.style.width=x+"px",B.style.height=x+"px",w&&(B._isLucide?B.style.stroke=w:B.style.fill=w),M.appendChild(B);var T=document.createElement("span");T.textContent=t.title,T.classList.add("skin-color"),w&&(T.style.color=w,T.classList.remove("skin-color")),M.appendChild(T),M.addEventListener("click",(function(t){t.stopPropagation(),t.preventDefault(),m.click()})),this.toolsMenu.appendChild(M),e.btnTools&&!1===e.btnTools.enabled&&(e.btnTools.enabled=!0)}return m}createAndAppendMenu(t,e){const i=document.createElement("div");return i.className=t,e.appendChild(i),i}initArrowButton(t,e,i){const o=this.options,s=t.querySelector("svg")||t;t.addEventListener("click",(i=>{if(t.disabled)return!1;t.disabled=!0,setTimeout((()=>{t.disabled=!1}),300),i.stopPropagation(),i.preventDefault(),e(),i.detail&&"function"==typeof t.blur&&t.blur()})),t.tabIndex=0,t.setAttribute("role","button"),i&&t.setAttribute("aria-label",i),t.addEventListener("keydown",(e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),t.click())}));var n="lucide"===(o.iconSet||"fontawesome");const a=parseFloat(t.style.fontSize)||o.arrowSize;if(Object.assign(t.style,{display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:"1",width:`${o.arrowSize}px`,height:`${a}px`,borderRadius:`${o.arrowRadius}
1px`,padding:`${o.arrowPadding}px`,filter:`drop-shadow(${o.arrowTextShadow})`,border:o.arrowBorder,color:o.arrowColor,background:o.arrowBackground,boxSizing:"initial"}),n?s.style.stroke=o.arrowColor:s.style.fill=o.arrowColor,o.arrowBackgroundHover){t.addEventListener("mouseenter",(function(){this.classList.contains("disabled")||(t.style.background=o.arrowBackgroundHover)})),t.addEventListener("mouseleave",(function(){t.style.background=o.arrowBackground}));const e=()=>{t.style.background=o.arrowBackground};t.addEventListener("touchend",e,{passive:!0}),t.addEventListener("touchcancel",e,{passive:!0})}o.arrowColor&&t.classList.remove("skin-color"),o.arrowBackground&&t.classList.remove("skin-color-bg")}createMenu(){if(this.menuBottom)return;var t=this.options,e=t.menuFloating?"flipbook-menu-floating":"flipbook-menu-fixed",i=t.menu2Floating?"flipbook-menu-floating":"flipbook-menu-fixed",o=this;function s(t,e){const i=document.createElement("div");return i.className=t,e.appendChild(i),i}if(this.menuBottom=document.createElement("div"),this.menuBottom.classList.add("flipbook-menuBottom",e),t.menuFloating&&t.menuTransparent&&this.menuBottom.classList.add("flipbook-menu-bare"),t.menuTransparent||"gradient"===t.skin||t.menuBackground&&t.menuBackground.includes("gradient")||this.menuBottom.classList.add("flipbook-border"),this.menuBottom.style.background=t.menuBackground,this.menuBottom.style.boxShadow=t.menuShadow,this.menuBottom.style.margin=t.menuMargin+"px",this.menuBottom.style.padding=t.menuPadding+"px",this.wrapper.appendChild(this.menuBottom),t.menuTransparent||t.menuBackground||this.menuBottom.classList.add("skin-color-bg"),t.hideMenu&&this.menuBottom.classList.add("flipbook-hidden"),this.menuTop=document.createElement("div"),this.menuTop.classList.add("flipbook-menuTop",i),t.menu2Floating&&t.menu2Transparent&&this.menuTop.classList.add("flipbook-menu-bare"),t.menu2Transparent||"gradient"===t.skin||this.menuTop.classList.add("flipbook-border"),this.menuTop.style.background=t.menu2Background,this.menuTop.style.boxShadow=t.menu2Shadow,this.menuTop.style.margin=t.menu2Margin+"px",this.menuTop.style.padding=t.menu2Padding+"px",this.wrapper.appendChild(this.menuTop),t.menu2Transparent||t.menu2Background||this.menuTop.classList.add("skin-color-bg"),"swipe"===t.viewMode&&(t.btnSound.enabled=!1),t.progressBar.enabled&&"bottom"===t.progressBar.vAlign&&(this._progressBarPending=!0),this.menuBL=s("flipbook-menu flipbook-menu-left",this.menuBottom),this.menuBC=s("flipbook-menu flipbook-menu-center",this.menuBottom),this.menuBR=s("flipbook-menu flipbook-menu-right",this.menuBottom),this.menuTL=s("flipbook-menu flipbook-menu-left",this.menuTop),this.menuTC=s("flipbook-menu flipbook-menu-center",this.menuTop),this.menuTR=s("flipbook-menu flipbook-menu-right",this.menuTop),this.options.btnTools.enabled&&(this.toolsMenu=document.createElement("div"),this.toolsMenu.className="flipbook-tools flipbook-submenu skin-color skin-color-bg flipbook-font flipbook-border"),this.options.btnShare.enabled&&(this.shareMenu=document.createElement("div"),this.shareMenu.className="flipbook-share flipbook-submenu skin-color skin-color-bg flipbook-font flipbook-border"),t.sideNavigationButtons){this.$arrowWrapper=document.createElement("div"),this.$arrowWrapper.className="flipbook-nav",this.bookLayer.appendChild(this.$arrowWrapper);const e=this.createSVGIcon("next");this.btnNext=document.createElement("span"),this.btnNext.appendChild(e),this.btnNext.classList.add("flipbook-right-arrow"),this.$arrowWrapper.appendChild(this.btnNext),this.btnNext.style.fontSize=t.arrowSize+"px",this.btnNext.style.marginTop=String(-t.arrowSize/2)+"px",this.btnNext.style.marginRight=t.arrowMargin+"px",this.initArrowButton(this.btnNext,this.nextPage.bind(this),t.btnNext.title);const i=this.createSVGIcon("next",!0);this.btnPrev=document.createElement("span"),this.btnPrev.appendChild(i),this.btnPrev.classList.add("flipbook-left-arrow"),this.$arrowWrapper.appendChild(this.btnPrev),this.btnPrev.style.fontSize=t.arrowSize+"px",this.btnPrev.style.marginTop=String(-t.arrowSize/2)+"px",this.btnPrev.style.marginLeft=t.arrowMargin+"px",this.initArrowButton(this.btnPrev,this.prevPage.bind(this),t.btnPrev.title);const o=e=>!!(t[e].enabled&&t[e].toolsMenu&&t.btnTools.enabled);if(t.btnFirst.enabled&&!o("btnFirst")){const e=this.createSVGIcon("last",!0);this.btnFirst=document.createElement("span"),this.btnFirst.appendChild(e),this.btnFirst.classList.add("flipbook-first-arrow"),this.$arrowWrapper.appendChild(this.btnFirst),this.btnFirst.style.fontSize=.5*t.arrowSize+"px",this.btnFirst.style.marginTop=String(t.arrowSize/2+t.arrowMargin+2*t.arrowPadding)+"px",this.btnFirst.style.marginLeft=t.arrowMargin+"px",this.initArrowButton(this.btnFirst,this.firstPage.bind(this),t.btnFirst.title)}if(t.btnLast.enabled&&!o("btnLast")){const e=this.createSVGIcon("last");this.btnLast=document.createElement("span"),this.btnLast.appendChild(e),this.btnLast.classList.add("flipbook-last-arrow"),this.$arrowWrapper.appendChild(this.btnLast),this.btnLast.style.fontSize=.5*t.arrowSize+"px",this.btnLast.style.marginTop=String(t.arrowSize/2+t.arrowMargin+2*t.arrowPadding)+"px",this.btnLast.style.marginRight=t.arrowMargin+"px",this.initArrowButton(this.btnLast,this.lastPage.bind(this),t.btnLast.title)}t.menuNavigationButtons||(!o("btnFirst")&&t.btnOrder.indexOf("btnFirst")>=0&&t.btnOrder.splice(t.btnOrder.indexOf("btnFirst"),1),t.btnOrder.indexOf("btnPrev")>=0&&t.btnOrder.splice(t.btnOrder.indexOf("btnPrev"),1),t.btnOrder.indexOf("btnNext")>=0&&t.btnOrder.splice(t.btnOrder.indexOf("btnNext"),1),!o("btnLast")&&t.btnOrder.indexOf("btnLast")>=0&&t.btnOrder.splice(t.btnOrder.indexOf("btnLast"),1))}t.pdfMode&&!t.btnDownloadPdf.url&&(t.btnDownloadPdf.url=t.pdfUrl),t.btnD
1ownloadPdf.url||(t.btnDownloadPdf.enabled=!1),!t.pdfTextLayer&&t.btnSearch&&(t.btnSearch.enabled=!1);window.self!==window.top&&(t.btnDownloadPages.enabled=!1),t.btnOrder=["currentPage","progressBar","btnFirst","btnLast","btnZoomOut","btnZoomIn","btnThumbs","btnToc","btnShare","btnPrint","btnDownloadPdf","btnSound","btnTools","btnExpand","btnClose"];for(var n=[],a=0;a<t.btnOrder.length;a++){var r=t.btnOrder[a],l=t[r];t.isMobile&&l.hideOnMobile&&(l.enabled=!1),l.toolsMenu&&l.enabled&&n.push(l)}n.length<=1&&(t.btnTools.enabled=!1);for(a=0;a<t.btnOrder.length;a++){r=t.btnOrder[a];(l=t[r]).enabled&&(l.name=r,"currentPage"===l.name?this.createCurrentPage():"progressBar"===l.name?this._progressBarPending=!0:"search"===l.name||(this[r]=this.createButton(l),this[r].addEventListener("click",(function(e){if("btnDownloadPdf"==this.dataset.name){if(window.self!==window.top)parent.postMessage({type:"download",url:t.btnDownloadPdf.url},"*");else{var i=t.btnDownloadPdf.url,s=document.createElement("a");s.href=i;var n=s.href.split("/").pop().split("#")[0].split("?")[0];s.download=n,document.body.appendChild(s),s.click(),document.body.removeChild(s)}o.sendGAEvent({event:"flipbook_pdf_download",book_name:o.options.name,url:t.btnDownloadPdf.url||t.pdfUrl,nonInteraction:!0})}else e.stopPropagation(),e.preventDefault(),o.onButtonClick(this,e)}))))}t.buttons&&t.buttons.forEach((t=>{o.createButton(t).index(1)})),this.btnSingle&&this.toggleIcon(this.btnSingle,this.options.singlePageMode)}onButtonClick(t,e){var i=t.dataset.name,o=this.options;switch(i){case"btnFirst":this.firstPage();break;case"btnPrev":this.prevPage();break;case"btnNext":this.nextPage();break;case"btnLast":this.lastPage();break;case"btnZoomIn":this.zoomIn();break;case"btnZoomOut":this.zoomOut();break;case"btnAutoplay":this.autoplay||this.nextPage(),this.toggleAutoplay();break;case"btnSearch":this.toggleSearch();break;case"btnBookmark":this.toggleBookmark();break;case"btnRotateLeft":this.Book.rotateLeft&&this.Book.rotateLeft();break;case"btnRotateRight":this.Book.rotateRight&&this.Book.rotateRight();break;case"btnToc":this.toggleToc();break;case"btnThumbs":this.toggleThumbs();break;case"btnShare":this.toggleShareMenu();break;case"btnTools":this.toggleToolsMenu();break;case"btnNotes":this.toggleNotesMenu();break;case"btnDownloadPages":if(o.downloadMenu)this.toggleDownloadMenu();else{var s=document.createElement("a");s.href=o.pdfUrl||o.btnDownloadPages.url,s.dispatchEvent(new MouseEvent("click"))}break;case"btnPrint":o.printMenu?this.togglePrintMenu():this.togglePrintWindow();break;case"btnSound":this.soundPaused=!1,this.toggleSound();break;case"btnExpand":this.toggleExpand();break;case"btnSingle":this.toggleSinglePage();break;case"btnClose":this.lightbox.closeLightbox()}}handleFsChange(){this.Book&&this.Book.enabled&&((document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)===this.fullscreenElement||this.isFullscreen?(this.fullscreenActive=!0,this.options.onfullscreenenter&&this.options.onfullscreenenter.call(this),document.body.classList.add("flipbook-fullscreen"),document.documentElement.classList.add("flipbook-fullscreen")):(this.fullscreenActive=!1,this.options.onfullscreenexit&&this.options.onfullscreenexit.call(this),document.body.classList.remove("flipbook-fullscreen"),document.documentElement.classList.remove("flipbook-fullscreen")),this.toggleIcon(this.btnExpand,!this.fullscreenActive),this.refitViewport(),this.scheduleRefit())}createLogo(){const{options:t,wrapper:e}=this,{logoImg:i,logoCSS:o,logoAlignH:s,logoAlignV:n,logoUrl:a,logoUrlTarget:r,isMobile:l,logoHideOnMobile:h}=t;if(!i||l&&h)return;const d=`${o}`+["position:absolute","right"===s?"right:0":"left"===s?"left:0":"","bottom"===n?"bottom:0":"top"===n?"top:0":""].filter(Boolean).join(";")+";",c=(({zIndex:t="",opacity:e=""}={})=>{const o=document.createElement("img");return o.src=i,o.style.cssText=d+(t?`z-index:${t};`:"")+(e?`opacity:${e};`:""),a&&(o.style.cursor="pointer",o.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),window.open(a,r||"_blank")}))),o})();e.appendChild(c)}setLoadingProgress(t){this.disposed||(this.$fillPreloader?this.setFillPreloaderProgress(t):t>0&&t<1?this.preloader.classList.remove("flipbook-hidden"):this.preloader.classList.add("flipbook-hidden"))}setFillPreloaderProgress(t){if(this.$fillPreloader)if(t>0&&t<1){if(this.fillPreloaderProgress=this.fillPreloaderProgress||0,t<this.fillPreloaderProgress)return;this.fillPreloaderProgress=t;var e=this.$fillPreloaderImg[0];e.style.clip="rect(0px,"+e.width*t+"px,"+e.height+"px,0px)",this.$fillPreloader.show()}else this.$fillPreloader.hide()}playFlipSound(){if(!this.options.sound||!this.Book.enabled)return;if(!this._audioCtx||!this._flipBuffer)return;const t=performance.now();this._lastFlipSoundTime&&t-this._lastFlipSoundTime<300||(this._activeFlipSounds=this._activeFlipSounds||0,this._activeFlipSounds>=2||(this._lastFlipSoundTime=t,"running"===this._audioCtx.state?this._startFlipSource():this._audioCtx.resume().then((()=>this._startFlipSource(t))).catch((()=>{}))))}_startFlipSource(t){if(!this._audioCtx||"running"!==this._audioCtx.state||!this._flipBuffer)return;if(void 0!==t&&performance.now()-t>250)return;const e=this._audioCtx.createBufferSource();e.buffer=this._flipBuffer,e.connect(this._audioCtx.destination),e.onended=()=>{this._activeFlipSounds--},this._activeFlipSounds++;try{e.start(0)}catch(t){this._activeFlipSounds--}}playBgMusic(t=!0){if(!this.options.sound||!this.backgroundMusic)return;if(this.options.backgroundMusicOnAutoplay&&this.options.btnAutoplay?.enabled&&!this.autoplay)return;const e=()=>{const i=this.backgroundMusic.play();i&&"function"==typeof i.catch&&i.catch((i=>{t&&i&&("NotAllowedError"===i.name||i.message?.includes("user"))&&setTimeout(e,200)}))};e()}onMouseWheel(t){if("wheelDeltaX"in t)wheelDeltaX=t.wheelDeltaX/12,wheelDeltaY=t.wheelDeltaY/12;else if("wheelDelta"in t)wheelDeltaX=wheelDeltaY=t.wheelDelta/12;else{if(!("detail"in t))return;wheelDeltaX=wheelDeltaY=3*-t.detail}wheelDeltaX>0?this.zoomIn(t):this.zoomOut(t)}
1zoomTo(t,e,i){if(t==this.zoom)return;var o,s;if(this.zoom=t,void 0===i)o=this.wrapperW/2,s=this.wrapperH/2;else{i.touches&&i.touches.length>=2?(o=(i.touches[0].pageX+i.touches[1].pageX)/2,s=(i.touches[0].pageY+i.touches[1].pageY)/2):i.touches&&i.touches[0]?(o=i.touches[0].pageX,s=i.touches[0].pageY):i.changedTouches&&i.changedTouches[0]?(o=i.changedTouches[0].pageX,s=i.changedTouches[0].pageY):(o=i.pageX,s=i.pageY);let t=this.wrapper.getBoundingClientRect();o=o-t.left-window.scrollX,s=s-t.top-window.scrollY,s+=this.bookVerticalPadding}const n=this.getZoomMin();this.zoom<n&&(this.zoom=n),this.zoom>this.options.zoomMax&&(this.zoom=this.options.zoomMax),this.options.zoomMax2&&this.zoom>this.options.zoomMax2&&(this.zoom=this.options.zoomMax2),this.autoplay&&(this.zoom=this.zoom=n),this.zoomLayer&&this.zoomLayer.shown?(this.zoomLayer.zoomTo(this.zoom,e,o,s),this.zoom<=1&&(this.zoomLayer.hide(),this.Book.zoomTo(this.zoom,e,o,s))):(this.Book.zoomTo(this.zoom,e,o,s),this.zoomLayer&&(clearTimeout(this._zoomLayerSettleTimer),this.zoom>1?this._zoomLayerSettleTimer=setTimeout((()=>{this._zoomLayerSettleTimer=null,this.zoomLayer.show(this.zoom)}),150):this.zoomLayer.hide())),this.onZoom(this.zoom)}zoomOut(t){if(this.uiLocked)return;var e=this.zoom/this.options.zoomStep;e<1&&this.zoom>1&&(e=1);const i=this.getZoomMin();e=e<i?i:e,this.zoomTo(e,this.options.zoomTime,t)}zoomIn(t){if(!this.uiLocked){var e=this.zoom*this.options.zoomStep;e>this.options.zoomMax&&(e=this.options.zoomMax),this.zoomTo(e,this.options.zoomTime,t)}}getZoomMin(){return"scroll"==this.options.viewMode?this.options.zoomMin2:this.options.zoomMin}getSharpZoom(){var t=this.options,e=.88*t.pageTextureMedium;if(!t.pdfMode&&this.imageMaxSize&&(e=Math.min(e||this.imageMaxSize,this.imageMaxSize)),!(e&&this.pageW&&this.pageH&&this.wrapperW&&this.wrapperH))return 0;var i=this.Book&&this.Book.bookWidth||(t.singlePageMode?1:2),o="undefined"!=typeof window&&window.devicePixelRatio||1,s=(this.pageW*i/this.pageH<this.wrapperW/this.wrapperH?this.wrapperH:this.wrapperW*this.pageH/(this.pageW*i))*o;return s>0?e/s:0}deselectText(){const t=document.activeElement;t&&("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable)||window.getSelection().removeAllRanges()}nextPage(){this.Book&&!this.uiLocked&&(this.flippingPage=!0,this.Book.canFlipNext()&&(this.Book.nextPage(),this.deselectText()))}prevPage(){this.Book&&!this.uiLocked&&(this.flippingPage=!0,this.Book.canFlipPrev()&&(this.Book.prevPage(),this.deselectText()))}firstPage(){if(this.uiLocked)return;const t=this.options.pages.length;this.goToPage(this.options.rightToLeft?t:1)}lastPage(){if(this.uiLocked)return;const t=this.options.pages.length;this.goToPage(this.options.rightToLeft?1:t)}_isSingleView(){if(this.options.singlePageMode)return!0;if(this.Book)return!(!this.Book.singlePage&&1!=this.Book.view);const t=this.options;if(!(t.responsiveView&&this.pageW&&this.pageH&&this.wrapperH))return!1;const e=Math.max(0,this.wrapperH-2*(this.bookVerticalPadding||0))||this.wrapperH,i=this.wrapperW/e,o=this.pageW/this.pageH;return this.wrapperW<=t.responsiveViewTreshold&&i<2*o&&i<t.responsiveViewRatio}_getProgressStops(){var t=this.options.pages.length;return this._isSingleView()?t:this.options.numSheets||Math.ceil((t+1)/2)}_stopToPage(t){return this._isSingleView()?t:t<=1?1:2*(t-1)}_pageToStop(t){return this._isSingleView()?t:t<=1?1:Math.floor(t/2)+1}goToPage(t,e){if(this.Book){var i=this.options;t=i.rightToLeft&&i.pages&&i.pages.length?i.pages.length-t+1:t,t=i.rightToLeft&&!i.backCover?t+1:t,e||(this.flippingPage=!0),this.options.cover||t++,t<1?t=1:t>this.options.numPages&&!this.options.rightToLeft&&(t=this.options.numPages),this.Book.goToPage(t,e),this.deselectText()}}moveBook(t){this.Book&&this.Book.move&&this.Book.move(t)}overlayMenuReach(){const t=this.options;if(this.minimalViewActive||!this.menuShowing||!this.wrapper)return{top:0,bottom:0};const e=this.wrapper.getBoundingClientRect(),i=(t,i)=>{const o=(t=>{if(!t)return null;const e=t.querySelector(".flipbook-progress-bar");if(e)return e;const i=t.querySelector(".flipbook-menu-center");if(!i)return null;return i.querySelector(".flipbook-menu-grouped")||(i.querySelector(".flipbook-menu-btn, .flipbook-currentPageHolder")?i:null)})(t);if(!o)return 0;const s=o.getBoundingClientRect();return s.height?Math.max(0,i?e.bottom-s.top:s.bottom-e.top):0};return{top:t.menu2OverBook?i(this.menuTop,!1):0,bottom:t.menuOverBook?i(this.menuBottom,!0):0}}updateBookLayerSize(){const t=this.options,e=!this.minimalViewActive&&this.menuShowing&&!t.menu2OverBook&&this.menuTop?this.menuTop.offsetHeight:0,i=!this.minimalViewActive&&this.menuShowing&&!t.menuOverBook&&this.menuBottom?this.menuBottom.offsetHeight:0,o=("3d"==t.viewMode||t.viewMode,this.zoom,"webgl"==t.viewMode),s=this.overlayMenuReach(),n=o?this.options.lightBox||this.fullscreenActive?Math.max(e,i,s.top,s.bottom):t.bookVerticalPadding:0;this.bookVerticalPadding=n;const a=this.thumbStripShowing&&this.thumbStrip?this.thumbStrip.el.offsetHeight:0,r=(s.bottom-s.top)/2,l=(!t.menuOverBook&&this.menuBottom?-n+i+a:-n+a)+r+"px",h=(!t.menu2OverBook&&this.menuTop?-n+e:-n)-r+"px",d=this.bookLayer.style;d.bottom!==l&&(d.bottom=l),d.top!==h&&(d.top=h),this.positionFirstPagePreloader()}updateZoomButtons(){const t=null==this.zoom?this.getZoomMin():this.zoom;this.enableButton(this.btnZoomIn,!1!==this.zoomAvailable&&t<this.options.zoomMax),this.enableButton(this.btnZoomOut,t>this.getZoomMin())}onZoom(t){this.zoomLevelHandled!=t&&(this.zoom=t,this.zoomLevelHandled=t,this.bookLayer&&this.bookLayer.classList.toggle("flipbook-zoomed-in",t>1&&!1!==this.zoomAvailable),t>1?(void 0===this._savedOverscroll&&(this._savedOverscroll=document.documentElement.style.overscrollBehavior||""),document.documentElement.style.overscrollBehavior="contain"):void 0!==this._savedOverscroll&&(document.documentElement.style.overscrollBehavior=this._savedOverscroll,delete this._savedOverscroll),this.updateZoomButtons(),this.enableSwipe(t<=1),this.zoom>1&&this.hideWrapperOverflow(),this.sendGAEvent({event:"flipbook_zoom",book_name:this.options.name,page_number:this.currentPageValue,zoom:t,nonInteraction:!0}))}enableSwipe(t){this.swipeEnabled=t}createCurrentPage(){var t,e=this,i=this.options,o="flipbook-currentPageHolder ";t="top"==i.currentPage.vAlign?"left"==i.currentPage.hAlign?this.menuTL:"right"==i.currentPage.hAlign?this.menuTR:this.menuTC:"left"==i.currentPage.hAlign?this.menuBL:"right"==i.currentPage.hAlign?this.menuBR:this.menuBC;var s="top"==i.currentPage.vAlign&&i.menu2Transparent||"top"!=i.currentPage.vAlign&&i.menuTransparent,n=s,a=n?"none":s?i.floatingBtnBackgroun
1d:"",r=s?i.floatingBtnColor:i.btnColor,l=s?i.floatingBtnTextShadow:"",h=s?i.floatingBtnRadius:i.btnRadius,d=n?"none":s?i.floatingBtnShadow:i.btnShadow,c=i.currentPage.marginV||(n?0:s?i.floatingBtnMargin:0),p=i.currentPage.marginH||(n?0:s?i.floatingBtnMargin:0),u=document.createElement("div");(n?this.getFloatingPill(t):t).appendChild(u),u.addEventListener("click",(function(){e.currentPageInput.focus()})),u.style.margin=c+"px "+p+"px",u.style.boxShadow=d,u.style.height=(s?40:i.btnSize)+"px",u.style.padding=(s?2:i.btnPaddingV)+"px",s||(o+=" skin-color"),u.className=o,u.style.color=r,u.style.background=a,u.style.textShadow=l,u.style.borderRadius=h+"px",i.currentPage.order&&(u.style.order=i.currentPage.order),this.currentPageHolder=u;var g=document.createElement("form");u.appendChild(g),g.addEventListener("submit",(function(t){t.preventDefault();var o=parseInt(e.currentPageInput.value,10);return!Number.isFinite(o)||o<1||o>i.pages.length?(e.currentPageInput.blur(),!1):(e.currentPageString=String(o),o+=e.options.pageNumberOffset,e.goToPage(o),e.currentPageInput.blur(),!1)})),this.currentPageInput=document.createElement("input"),this.currentPageInput.type="text",this.currentPageInput.inputMode="numeric",this.currentPageInput.pattern="[0-9]*",this.currentPageInput.className="flipbook-currentPageInput",this.currentPageInput.style.margin=c+"px "+p+"px",this.currentPageInput.style.color=r;var m=function(t){var e=document.createElement("span");e.style.visibility="hidden",e.style.position="absolute",e.style.whiteSpace="pre",e.className="flipbook-currentPageInput",document.body.appendChild(e),e.textContent=t||"0";var i=e.offsetWidth+2;return document.body.removeChild(e),i};this.currentPageInput.addEventListener("focus",(function(){e.currentPageInput.select()})),this.currentPageInput.addEventListener("input",(function(){var t=e.currentPageInput.value.replace(/[^0-9]/g,"");t!==e.currentPageInput.value&&(e.currentPageInput.value=t),e.currentPageInput.style.width=m(e.currentPageInput.value)+"px"})),this.currentPageInput.addEventListener("blur",(function(){e.currentPageInput.value=e.currentPageString,e.currentPageInput.style.width=m(e.currentPageString)+"px"})),g.appendChild(this.currentPageInput);var b=String(i.numPages).length;this.currentPageInput.classList.add("digits-"+b),this.currentPageInput.setAttribute("maxlength",b),this.currentPage=document.createElement("div"),this.currentPage.className="flipbook-currentPageNumber",u.appendChild(this.currentPage),s||this.currentPageInput.classList.add("skin-color")}createMenuHeader(t,e,i){var o=document.createElement("div");o.className="flipbook-menu-header skin-clor flipbook-font",t.appendChild(o);var s=document.createElement("span");s.textContent=e,s.className="flipbook-menu-title skin-color",o.appendChild(s);var n=document.createElement("span");n.className="flipbook-btn-close skin-color",o.appendChild(n),n.addEventListener("click",(t=>{t.stopPropagation(),t.preventDefault(),this.closeMenus()}));var a=this.createSVGIcon("close");a.classList.add("skin-color"),n.appendChild(a)}sideMenuLayer(){return this._sideMenuLayer||(this._sideMenuLayer=document.createElement("div"),this._sideMenuLayer.className="flipbook-side-menu-layer",this.wrapper.appendChild(this._sideMenuLayer)),this._sideMenuLayer}createToc(){var t=this.options.tableOfContent;this.tocHolder=document.createElement("div"),this.tocHolder.className="flipbook-tocHolder flipbook-side-menu skin-color-bg flipbook-border",this.sideMenuLayer().appendChild(this.tocHolder),this.tocHolder.style[this.options.sideMenuPosition]="0","right"===this.options.sideMenuPosition&&this.tocHolder.classList.add("flipbook-side-menu-right"),this.tocHolder.classList.add("flipbook-hidden"),this.createMenuHeader(this.tocHolder,this.strings.tableOfContent,this.toggleToc),this.toc=document.createElement("div"),this.toc.className="flipbook-toc",this.tocHolder.appendChild(this.toc);var e=this.options.pages;if(!t||!t.length){t=[];for(var i=0;i<e.length;i++)e[i].title&&t.push({title:e[i].title,page:String(i+1),pageNumberDisplay:e[i].name})}for(i=0;i<t.length;
1i++)e[i]&&e[i].name&&t[i].page&&(t[i].pageNumberDisplay=e[t[i].page-1].name);this.tocScroller=this.buildTOC(t),this.tocScroller.className="flipbook-toc-scroller",this.toc.appendChild(this.tocScroller),this.tocCreated=!0,this.toggleToc()}buildTOC(t){const e=this,i=document.createElement("ul"),o=this.createSVGIcon("next");return t.forEach((t=>{const s=document.createElement("li"),n=document.createElement("div");n.classList.add("toc-item","skin-color");const a=document.createElement("div");if(a.classList.add("title-container"),t.items&&t.items.length>0){const t=document.createElement("span");t.classList.add("expand-icon"),t.innerHTML=o.outerHTML,t.addEventListener("click",(function(e){e.stopPropagation();const i=s.querySelector("ul");"none"===i.style.display?(i.style.display="block",i.dataset.expanded="true",t.classList.add("expanded")):(i.style.display="none",i.dataset.expanded="false",t.classList.remove("expanded"))})),a.appendChild(t)}else{const t=document.createElement("span");t.classList.add("spacer"),t.innerHTML="&nbsp;",a.appendChild(t)}const r=document.createElement("span");r.textContent=t.title,r.classList.add("title"),a.appendChild(r),n.appendChild(a);const l=document.createElement("span");if(l.textContent=t.pageNumberDisplay||t.page,l.classList.add("page-number"),n.appendChild(l),n.addEventListener("click",(function(i){if(i.stopPropagation(),i.preventDefault(),e.options.tableOfContentCloseOnClick&&e.toggleToc(!1),!t.page&&t.dest)"string"==typeof t.dest?e.pdfService.pdfDocument.getDestination(t.dest).then((function(t){e.goToDest(t)})):e.goToDest(t.dest);else{var o=Number(t.page);setTimeout((function(){e.goToPage(o)}),200)}})),s.appendChild(n),t.items&&t.items.length>0){const e=this.buildTOC(t.items);e.style.display="none",s.appendChild(e)}i.appendChild(s)})),i}goToDest(t){}enablePrev(t){this.prevEnabled!=t&&this.btnPrev&&(this.enableButton(this.btnPrev,t),this.enableButton(this.btnFirst,t),this.prevEnabled=t,this.Book.enablePrev(t))}enableNext(t){this.nextEnabled!=t&&this.btnNext&&(this.enableButton(this.btnNext,t),this.enableButton(this.btnLast,t),this.nextEnabled=t,this.Book.enableNext(t))}enableButton(t,e){void 0!==t&&(e?t.classList.remove("disabled"):t.classList.add("disabled"),t.enabled=e)}resize(t){if(!this.Book||!this.Book.enabled)return;const e=this.tocShowing||this.thumbsShowing||this.searchShowing||this.bookmarkShowing;let i=this.bookLayer.getBoundingClientRect();if(t||this.wrapperW!==i.width||this.wrapperH!==i.height||this.sidebarVisible!==e){if(this.wrapperW=i.width,this.wrapperH=i.height,this.sidebarVisible=e,this.updateBookLayerSize(),e){var o=this.tocShowing?this.tocHolder.getBoundingClientRect().width:this.thumbsShowing&&"overlay"===this.options.thumbsStyle?0:this.thumbs.thumbHolder.getBoundingClientRect().width;this.bookLayer.style[this.options.sideMenuPosition]=`${o}px`;let t={bottom:"0px",top:"0px"};this.options.sideMenuOverMenu||(t.bottom=this.menuBottom.offsetHeight+"px"),this.options.sideMenuOverMenu2||(t.top=this.menuTop.offsetHeight+"px"),this.wrapper.querySelectorAll(".flipbook-side-menu").forEach((function(e){for(var i in t)t.hasOwnProperty(i)&&(e.style[i]=t[i])}))}else this.bookLayer.style[this.options.sideMenuPosition]="0px";this.adjustZoomLimits(),this.Book.onResize(t),this.Book.zoomTo(this.options.zoomMin)}}refitViewport(){this.Book&&(this.resizeContainer(),this.resize(!0))}scheduleRefit(){clearTimeout(this._refitTimer),this._refitTimer=setTimeout((()=>this.refitViewport()),250)}adjustZoomLimits(){var t=this.options,e=(this.wrapperW,this.wrapperH,this.pageW/this.pageH),i=2*e;if(void 0===this._zoomMinOption){const e=Number(t.zoomMin);this._zoomMinOption=isFinite(e)?e:1}const o=Math.min(1,Math.max(.95,isFinite(this._zoomMinOption)?this._zoomMinOption:1)),s=this.overlayMenuReach(),n=Math.max(0,this.wrapperH-2*(this.bookVerticalPadding||0))||this.wrapperH,a=this.wrapperW,r=this._isSingleView()?e:i,l=r>0?Math.min(n,a/r):n,h=Math.max(0,Math.min(l,n-s.top-s.bottom));t.zoomMin=l>0?h/l*o:o;if(!t.pdfMode&&t.pages&&t.pages.length&&t.pages.every((t=>!t.src&&t.htmlContent)))return void(t.zoomMax=Math.max(t.htmlZoomMax||4,t.zoomMin));const d=2*(this.bookVerticalPadding||0),c=Math.max(1,this.wrapperH-d),p=this.wrapperW,u=p/c;let g=t.zoomSize;e>1&&(g=Math.min(g,(t.maxTextureSize||4096)/e)),"scroll"==t.viewMode||t.responsiveView&&p<=t.responsiveViewTreshold&&u<i&&u<t.responsiveViewRatio?t.zoomMax=g/c*(u>e?1:e/u):t.zoomMax=g/c*(u>i?1:i/u),t.zoomMax=Math.max(t.zoomMax,t.zoomMin),this.zoomAvailable=t.zoomMax>1.2*this.getZoomMin(),this.bookLayer&&(this.bookLayer.classList.toggle("flipbook-no-zoom",!this.zoomAvailable),this.bookLayer.classList.toggle("flipbook-zoomed-in",this.zoom>1&&this.zoomAvailable)),this.updateZoomButtons()}pdfResize(){this.Book.onZoom()}createThumbs(){this.thumbs=new FLIPBOOK.Thumbnails(this)}toggleThumbs(t){if(this.thumbs||this.createThumbs(),void 0!==t&&(this.thumbsShowing=!t),this.thumbsShowing||this.thumbStripShowing)return this.thumbsShowing&&(this.thumbs.hide(),this.thumbsShowing=!1),this.thumbStripShowing&&this.hideThumbStrip(),void this.resize();this.closeMenus();"strip"===(this.lastThumbView||this.options.thumbsDefaultView)?this.showThumbStrip():(this.thumbs.show(!0),this.thumbsShowing=!0),this.resize()}minimizeThumbs(){this.thumbsShowing&&(this.thumbs.hide(),this.thumbsShowing=!1),this.lastThumbView="strip",this.showThumbStrip(),this.resize()}maximizeThumbs(){this.hideThumbStrip(),this.lastThumbView="grid",this.thumbs||this.createThumbs(),this.thumbs.show(!0),this.thumbsShowing=!0,this.resize()}showThumbStrip(){this.thumbStrip||(this.thumbStrip=new FLIPBOOK.ThumbStrip(this)),this.thumbStrip.show(),this.thumbStripShowing=!0,this.updateBookLayerSize(),this.resize()}hideThumbStrip(){this.thumbStrip&&this.thumbStrip.hide(),this.thumbStripShowing=!1,this.updateBookLayerSize(),this.resize()}toggleToc(t){this.tocCreated?(!this.tocShowing||t?(this.closeMenus(),this.tocShowing=!0,this.tocHolder.classList.remove("flipbook-hidden"),this.tocHolder.classList.remove("flipbook-side-menu-visible"),setTimeout((()=>{this.tocHolder.classList.add("flipbook-side-menu-visible")}),20)):(this.tocHolder.classList.remove("flipbook-side-menu-visible"),this.tocShowing=!1,this.tocHolder.querySelectorAll(".expanded").forEach((t=>{t.classList.remove("expanded")})),this.tocHolder.querySelectorAll('[data-expanded="true"]').forEach((t=>{t.dataset.expanded="false",t.style.display="none"}))),this.resize()):this.createToc()}toggleSearch(t,e){}toggleBookmark(t){}closeMenus(){this.thumbsShowing&&this.toggleThumbs(),this.thumbStripShowing&&this.hideThumbStrip(),this.tocShowing&&this.toggleToc(),this.searchShowing&&this.toggleSearch(),this.bookmarkShowing&&this.toggleBookmark(),this.printMenuShowing&&this.togglePrintMenu(),this.dlMenuShowing&&this.toggleDownloadMenu(),this.shareMenuShowing&&this.toggleShareMenu(),this.toolsMenuShowing&&this.toggleToolsMenu(),this.notesMenuShowing&&this.toggleNotesMenu(),this.passwordMenuShowing&&this.togglePasswordMenu(),this.tooltip2.hideTooltip()}toggleToolsMenu(){var t=this;this.toolsMenu.parentNode||(this.btnTools.appendChild(this.toolsMenu),this.toolsMenu.addEventListener("click",(function(t){t.stopPropagation()})),document.addEventListener("click",(function(e){t.toolsMenuShowing&&t.toggleToolsMenu(),t.shareMenuShowing&&t.toggleShareMenu()}))),this.toolsMenuShowing?(this.toolsMenu.classList.add("flipbook-hidden"),this.toolsMenuShowing=!1,this.btnTools.classList.remove("flipbook-btn-active"),this.btnTools.classList.add("flipbook-has-tooltip")):(this.closeMenus(),this.toolsMenu.classList.remove("flipbook-hidden"),this.toolsMenuShowing=!0,this.btnTools.classList.add("flipbook-btn-active"),this.btnTools.classList.remove("flipbook-has-tooltip"),this.clampSubmenuToViewport(this.toolsMenu))}clampSubmenuToViewport(t){if(!t)return;t.style.transform="";const e=t.getBoundingClientRect(),i=window.innerWidth,o=window.innerHeight;let s=0,n=0;e.right>i-4&&(s=i-4-e.right),e.left+s<4&&(s=4-e.left),e.bottom>o-4&&(n=o-4-e.bottom),e.top+n<4&&(n=4-e.top),(s||n)&&(t.style.transform=`translate(${s}px, ${n}px)`)}togglePrintMenu(){var t=this;if(this.printMenu)this.printMenuShowing?(this.printMenu.style.display="none",this.printMenuShowing=!1):(this.closeMenus(),this.printMenu.style.display="block",this.printMenuShowing=!0,this.updateCurrentPage());else{this.printMenu=document.createElement("div"),this.printMenu.className="flipbook-sub-menu flipbook-font flipbook-border",this.wrapper.appendChild(this.printMenu);var e=document.createElement("div");e.className="flipbook-sub-menu-center",this.printMenu.appendChild(e);var i=document.createElement("div");i.className="flipbook-sub-menu-content skin-color-bg",e.appendChild(i),this.createMenuHeader(i,this.strings.print,this.togglePrintMenu.bind(this));var o=document.createElement("a");o.innerHTML='<div class="c-p skin-color flipbook-btn">'+this.strings.printCurrentPage+"</div>",i.appendChild(o),o.addEventListener("click",(function(){t.printPage(t.cPage[0],this)}));var s=document.createElement("a");s.innerHTML='<div class="c-l-p skin-color flipbook-btn">'+this.strings.printLeftPage+"</div>",i.appendChild(s),s.addEventListener("click",(function(){t.printPage(t.cPage[0],this)}));var n=document.createElement("a");n.innerHTML='<div class="c-r-p skin-color flipbook-btn">'+this.strings.printRightPage+"</div>",i.appendChild(n),n.addEventListener("click",(function(){t.printPage(t.cPage[1],this)}));var a=document.createElement("a");a.innerHTML='<div class="skin-color flipbook-btn">
1'+this.strings.printAllPages+"</div>",i.appendChild(a),a.addEventListener("click",(function(){t.togglePrintWindow()})),this.closeMenus(),this.printMenuShowing=!0,this.updateCurrentPage()}}toggleDownloadMenu(){}toggleShareMenu(){var t=this;if(!this.shareMenu.parentNode){this.btnShare.appendChild(this.shareMenu),this.shareMenu.addEventListener("click",(function(t){t.stopPropagation()})),document.addEventListener("click",(function(e){t.toolsMenuShowing&&t.toggleToolsMenu(),t.shareMenuShowing&&t.toggleShareMenu()}));var e=this.options,i=window.screen.width/2-300,o=window.screen.height/2-300;["facebook","twitter"].forEach((function(s){if(e[s].enabled){var n=document.createElement("span");n.className="flipbook-menu-btn-wrapper flipbook-has-tooltip skin-color",n.setAttribute("data-network",s),n.setAttribute("data-tooltip",e[s].title||e.strings[s]),n.style.width=`${e.btnSize}px`,n.style.height=`${e.btnSize}px`;let a=t.createSVGIcon(s);a.classList.add("skin-color"),n.appendChild(a),t.shareMenu.appendChild(n),n.addEventListener("click",(function(s){s.preventDefault(),s.stopPropagation();var a=this.dataset.network;if("copyLink"==a){var r=e.shareUrl||window.location.href;try{r=decodeURIComponent(r)}catch(s){}function c(t){const e=document.createElement("textarea");e.value=t,e.style.position="fixed",document.body.appendChild(e),e.focus({preventScroll:!0}),e.select();try{document.execCommand("copy"),p()}catch(t){console.error("Fallback: Unable to copy text",t)}document.body.removeChild(e)}function p(){n.setAttribute("data-tooltip",e.strings.copied),t.tooltip2&&t.tooltip2.showTooltip(n),setTimeout((()=>{n.setAttribute("data-tooltip",e.strings.copyLink),t.tooltip2&&t.tooltip2.hideTooltip()}),2e3)}navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(r).then((()=>{p()})).catch((t=>{console.error("Failed to copy the link: ",t),c(r)})):c(r),t.sendGAEvent({event:"flipbook_share",book_name:t.options.name,url:r,nonInteraction:!0})}else{var l,h=encodeURIComponent(e.shareTitle||e[a].description||"Check out this flipbook"),d=encodeURIComponent(e.shareUrl||window.location.href);encodeURIComponent(e.shareImage||"");switch(a){case"facebook":l="https://www.facebook.com/sharer.php?u="+d+"&t="+h;break;case"twitter":l="https://twitter.com/intent/tweet?text="+h+"&url="+d}window.open(l,"Share","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=600, height=600, top="+o+", left="+i),t.sendGAEvent({event:"flipbook_share",book_name:t.options.name,url:l,nonInteraction:!0})}}))}}))}this.shareMenuShowing?(this.shareMenu.classList.add("flipbook-hidden"),this.shareMenuShowing=!1,this.btnShare.classList.remove("flipbook-btn-active"),this.btnShare.classList.add("flipbook-has-tooltip")):(this.closeMenus(),this.shareMenu.classList.remove("flipbook-hidden"),this.shareMenuShowing=!0,this.btnShare.classList.add("flipbook-btn-active"),this.btnShare.classList.remove("flipbook-has-tooltip"),setTimeout((function(){t.shareMenu.style.right="0";const e=t.wrapper.getBoundingClientRect(),i=t.shareMenu.getBoundingClientRect();i.left<e.left&&(t.shareMenu.style.right=i.left-e.left-(e.width-i.width)/2+"px")}),0))}toggleNotesMenu(){}updateNoteSettings(t){this.options.noteTypes.forEach((function(e){e.id==t.id&&(e.enabled=t.enabled)})),this.noteService.updateNoteVisibility()}bookmarkPage(t){}removeBookmark(t){}isBookmarked(t){return this.getBookmarkedPages().indexOf(String(t))>0}getBookmarkedPages(){var t=localStorage.getItem(this.options.name+"_flipbook_bookmarks");return t?t.split(";"):[]}setBookmarkedPages(t){localStorage.setItem(this.options.name+"_flipbook_bookmarks",t.join(";"))}async bitmapToBlob(t){if("undefined"!=typeof OffscreenCanvas){const e=new OffscreenCanvas(t.width,t.height);return e.getContext("2d").drawImage(t,0,0),e.convertToBlob({type:"image/png"})}const e=document.createElement("canvas");e.width=t.width,e.height=t.height;e.getContext("2d").drawImage(t,0,0);const i=await new Promise((t=>e.toBlob(t,"image/png")));return e.width=e.height=1,i}async bitmapToBlobUrl(t){return URL.createObjectURL(await this.bitmapToBlob(t))}async collectPrintItems(){const t=[];for(let e=0;e<this.options.pages.length;e++){const i=this.options.pages[e];if(i&&!i.locked)try{if(i.print||i.src)t.push({url:i.print||i.src});else if(i.images&&Object.keys(i.images).length){const e=Object.keys(i.images).map(Number).sort(((t,e)=>e-t)),o=i.images[e[0]],s=o&&(o.currentSrc||o.src);if(s&&0===s.indexOf("blob:")){const e=await fetch(s).then((t=>
1t.blob())).catch((()=>null));e&&t.push({blob:e})}else s&&t.push({url:s})}else if(i.imageBitmap&&Object.keys(i.imageBitmap).length){const e=Object.keys(i.imageBitmap).map(Number).filter((t=>i.imageBitmap[t]&&i.imageBitmap[t].width)).sort(((t,e)=>e-t));e.length&&t.push({blob:await this.bitmapToBlob(i.imageBitmap[e[0]])})}else if(i.htmlContent&&!this.options.pdfMode)if(i._htmlBitmap&&i._htmlBitmap.width)t.push({blob:await this.bitmapToBlob(i._htmlBitmap)});else if(FLIPBOOK.captureHtmlPage){const e=await FLIPBOOK.captureHtmlPage(i,this.options.htmlPageWidth||1e3,this.options.htmlPageHeight||1414,this,2).catch((()=>null));if(e){const i=await new Promise((t=>e.toBlob(t,"image/png")));e.width=e.height=1,i&&t.push({blob:i})}}}catch(t){}}return t}async urlToBlobUrl(t){const e=await fetch(t,{mode:"cors"}),i=await e.blob();return URL.createObjectURL(i)}async printPage(t,e,i){const o=this.options.pages[t],s=this.options.pageTextureLarge;if(!o)return;if(o.locked)return;let n=null;const a=[];if(o.print)n=o.print;else if(o.src)n=o.src;else if(o.images&&o.images[s]){const t=o.images[s],e=t.currentSrc||t.src;e&&(n=e)}else if(o.imageBitmap&&o.imageBitmap[s]&&o.imageBitmap[s].width){const t=o.imageBitmap[s],e=await this.bitmapToBlobUrl(t);a.push(e),n=e}else if(i&&o.imageBitmap){const t=Object.keys(o.imageBitmap).map(Number).filter((t=>o.imageBitmap[t]&&o.imageBitmap[t].width)).sort(((t,e)=>e-t));if(t.length){const e=await this.bitmapToBlobUrl(o.imageBitmap[t[0]]);a.push(e),n=e}}else if(o.htmlContent&&!this.options.pdfMode)if(o._htmlBitmap&&o._htmlBitmap.width){const t=await this.bitmapToBlobUrl(o._htmlBitmap);a.push(t),n=t}else if(FLIPBOOK.captureHtmlPage){const t=await FLIPBOOK.captureHtmlPage(o,this.options.htmlPageWidth||1e3,this.options.htmlPageHeight||1414,this,2).catch((()=>null));if(t){const e=await new Promise((e=>t.toBlob(e,"image/png")));if(t.width=t.height=1,e){const t=URL.createObjectURL(e);a.push(t),n=t}}}if(n)return this._printTempUrls||(this._printTempUrls=[]),this._printTempUrls.push(...a),void this.togglePrintWindow(n);if(i)return;const r=this.options.cover?t:t+1;this.loadPage(r,s,(()=>{this.printPage(t,void 0,!0)}))}async downloadPage(t,e){}printFile(t){if(window.self!==window.top)parent.postMessage({type:"print",url:t},"*");else try{var e=document.createElement("iframe");e.classList.add("flipbook-hidden"),e.src=t,document.body.appendChild(e),e.contentWindow.onload=function(){var t=this;setTimeout((function(){t.print()}),100)}}catch(t){}}togglePrintWindow(t){if(window.self!==window.top&&t)return 0===t.indexOf("blob:")?void fetch(t).then((t=>t.blob())).then((t=>{parent.postMessage({type:"print",blob:t},"*")})).catch((()=>{parent.postMessage({type:"print",url:t},"*")})):void parent.postMessage({type:"print",url:t},"*");var e=this,i="";if(t)i='<img src="'+t+'"/>\n';else{if(e.options.printPdfUrl)return void e.printFile(e.options.printPdfUrl);if(e.options.pdfUrl)return void e.printFile(e.options.pdfUrl)}function o(t){return"<html>\n<head>\n<script>\nfunction step1() {\n  setTimeout('step2()', 10);\n}\nfunction step2() {\n  window.addEventListener('afterprint', function(){\n       debugger;\n       window.close();\n  });\n  window.print();\n}\n<\/script>\n<style>img {display:block;width:100%;page-break-after: always;}@media print header{display: none;}</style>\n</head>\n<body onLoad='step1()'>\n"+t+"</body>\n</html>\n"}if(i)!function(){var t=window.open("about:blank","_new");t&&(t.document.open(),t.document.write(o(i)),t.document.close())}();else{var s=window.self===window.top,n=s?window.open("about:blank","_new"):null;this.collectPrintItems().then((t=>{t.length?s?(i=t.map((t=>'<img src="'+(t.blob?URL.createObjectURL(t.blob):t.url)+'"/>\n')).join(""),n&&(n.document.open(),n.document.write(o(i)),n.document.close())):parent.postMessage({type:"print",items:t},"*"):n&&n.close()}))}}thumbsVertical(){this.thumbsCreated}isIOS(){return/iP(ad|hone|od)/.test(navigator.userAgent)}fakeScrollToHideToolbar(){if(!this.isIOS())return;const t=window.scrollX||window.pageXOffset,e=window.scrollY||window.pageYOffset;window.scrollTo(t,e+1),setTimeout((()=>{window.scrollTo(t,e)}),10)}fakeScrollToShowToolbar(){if(!this.isIOS())return;const t=window.scrollX||window.pageXOffset,e=window.scrollY||window.pageYOffset;window.scrollTo(t,e-1),setTimeout((()=>{window.scrollTo(t,e)}),10)}canFullscreen(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}requestFullscreen(t){const e=["requestFullscreen","mozRequestFullScreen","webkitRequestFullscreen","msRequestFullscreen"];for(const i of e)if(t[i])try{const e=t[i]();return void(e&&"function"==typeof e.then&&e.catch((t=>this.handleFullscreenError(t))))}catch(t){return void this.handleFullscreenError(t)}this.handleFullscreenError(new Error("Fullscreen API is not supported on this element."))}exitFullscreen(){const t=["exitFullscreen","mozCancelFullScreen","webkitExitFullscreen","msExitFullscreen"];for(const e of t)if(document[e])try{const t=document[e]();return void(t&&"function"==typeof t.then&&t.catch((t=>this.handleFullscreenError(t))))}catch(t){return void this.handleFullscreenError(t)}this.handleFullscreenError(new Error("Exiting fullscreen API is not supported in this document."))}toggleExpand(){const t=this.fullscreenElement;try{document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement?this.exitFullscreen():this.requestFullscreen(t)}catch(t){this.handleFullscreenError(t)}this.toolsMenuShowing&&this.toggleToolsMenu()}handleFullscreenError(t){const e=this.fullscreenElement;this.fullscreenActive=!this.fullscreenActive;window.self!==window.top?parent.postMessage({type:"toggleExpand",fullscreenActive:this.fullscreenActive},"*"):this.fullscreenActive?e!==document.body&&(this.saveScrollPosition(),document.body.classList.add("flipbook-overflow-hidden"),e.classList.add("flipbook-browser-fullscreen"),this.elemParent=e.parentNode,document.body.appendChild(e)):this.elemParent&&(this.elemParent.appendChild(e),this.elemParent=null,document.body.classList.remove("flipbook-overflow-hidden"),e.classList.remove("flipbook-browser-fullscreen"),this.restoreScrollPosition()),this.toggleIcon(this.btnExpand,!this.fullscreenActive),requestAnimationFrame((()=>this.refitViewport())),this.scheduleRefit()}saveScrollPosition(){document.body.dataset.flipbookScrollX=window.scrollX||window.pageXOffset,document.body.dataset.flipbookScrollY=window.scrollY||window.pageYOffset}restoreScrollPosition(){const t=parseInt(document.body.dataset.flipbookScrollX||0,10),e=parseInt(document.body.dataset.flipbookScrollY||0,10);isNaN(t)||isNaN(e)||(window.scrollTo(t,e),delete document.body.dataset.flipbookScrollX,delete document.body.dataset.flipbookScrollY)}expand(){}toggleSinglePage(){}toggleAutoplay(t){}},FLIPBOOK.ZoomLayer=class{constructor(t){this.main=t,this.options=t.options,this.shown=!1,this.scale=1;const e=document.createElement("div");e.className="flipbook-zoom-layer",e.style.cssText=["position:absolute","
1inset:0","display:none","overflow:auto","z-index:5","background:transparent","-webkit-overflow-scrolling:touch","touch-action:pan-x pan-y","cursor:grab"].join(";"),t.bookLayer.appendChild(e),this.el=e;const i=document.createElement("div");i.className="flipbook-zoom-layer-content",i.style.cssText=["position:relative","display:flex","align-items:center","justify-content:center","min-width:100%","min-height:100%","width:max-content","margin:0 auto","gap:0"].join(";"),e.appendChild(i),this.content=i,["gesturestart","gesturechange","gestureend"].forEach((t=>{e.addEventListener(t,(t=>t.preventDefault()))})),this._setupDragScroll()}_setupDragScroll(){const t=this.el;let e=!1,i=0,o=0,s=0,n=0,a=!1;t.addEventListener("mousedown",(r=>{0===r.button&&(r.target.closest&&r.target.closest("a, button, input, select, textarea")||(e=!0,a=!1,i=r.clientX,o=r.clientY,s=t.scrollLeft,n=t.scrollTop,t.style.cursor="grabbing"))})),window.addEventListener("mousemove",(r=>{if(!e)return;const l=r.clientX-i,h=r.clientY-o;!a&&Math.abs(l)+Math.abs(h)>3&&(a=!0),a&&(r.preventDefault(),t.scrollLeft=s-l,t.scrollTop=n-h)}),{passive:!1});const r=i=>{if(!e)return;const o=a;e=!1,t.style.cursor="grab",o||!i||!i.target||i.target.closest&&i.target.closest("a, button, input, select, textarea")||this._zoomOut()};window.addEventListener("mouseup",r),window.addEventListener("mouseleave",r)}_zoomOut(){const t=this.main;if(!t||"function"!=typeof t.zoomTo)return;const e=t.getZoomMin?t.getZoomMin():1;t.zoomTo(e,t.options.zoomTime||300)}async show(t){if(this.shown)return;"number"==typeof t&&(this.scale=t);const e=++this._loadToken;this._populate(),this._layout();const i=Array.from(this.content.children).filter((t=>"IMG"===t.tagName)).map((t=>new Promise((e=>{if(t.src)return e();const i=setInterval((()=>{t.src&&(clearInterval(i),e())}),30);setTimeout((()=>{clearInterval(i),e()}),5e3)})).then((()=>t.decode?t.decode().catch((()=>{})):Promise.resolve()))));if(await Promise.all(i),this._loadToken!==e)return;this.shown=!0,this.el.style.display="block";const o=this.main.Book;o&&o.wrapper&&o.wrapper.style&&(this._prevBookVisibility=o.wrapper.style.visibility,o.wrapper.style.visibility="hidden"),this._prevBookLayerTouchAction=this.main.bookLayer.style.touchAction,this.main.bookLayer.style.touchAction="pan-x pan-y"}hide(){if(this._loadToken=(this._loadToken||0)+1,!this.shown)return void this.content.replaceChildren();this.shown=!1,this.el.style.display="none",this.content.replaceChildren();const t=this.main.Book;t&&t.wrapper&&t.wrapper.style&&(t.wrapper.style.visibility=this._prevBookVisibility||""),this.main.bookLayer.style.touchAction=this._prevBookLayerTouchAction||"",this.scale=1}_populate(){const t=this.main.Book,e=this.options.pageTextureLarge,i=[],o=t.getLeftPage&&t.getLeftPage(),s=t.getRightPage&&t.getRightPage();if(o&&!t.singlePage&&"number"==typeof o.indexBack&&i.push(o.indexBack),s&&"number"==typeof s.indexFront&&i.push(s.indexFront),0===i.length){const t=this.main.currentPageValue;"number"==typeof t&&i.push(Math.max(0,t-1))}this.content.replaceChildren(),i.forEach((t=>{const i=document.createElement("div");i.className="flipbook-zoom-layer-page",i.style.cssText="position:relative;flex-shrink:0;background:#fff;";const o=document.createElement("img");o.className="flipbook-zoom-layer-img",o.draggable=!1,o.style.cssText="display:block;width:100%;height:100%;user-select:none;pointer-events:none;",i.appendChild(o);const s=document.createElement("div");s.className="flipbook-zoom-layer-html",s.style.cssText="position:absolute;top:0;left:0;transform-origin:0 0;",i.appendChild(s),i._htmlEl=s,i._index=t,this.content.appendChild(i),this.main.loadPage(t,e,(t=>{if(t&&t.image){const i=FLIPBOOK.tierSource(t.image,e);i&&i.src&&(o.src=i.src)}})),this.main.loadPageHTML&&this.main.loadPageHTML(t,(t=>{if(!t)return;const e=t.jquery?t[0]:t;if(!e||!e.cloneNode)return;const i=e.cloneNode(!0);s.replaceChildren(i)}))})),this._layout()}_layout(){const t=this.options,e=this.content.children.length;if(0===e)return;const i=this.el.clientWidth||1,o=this.el.clientHeight||1,s=t.pageWidth/t.pageHeight,n=e*s;let a;a=i/n<=o?i/n:o;const r=a*this.scale,l=r*s;
1Array.from(this.content.children).forEach((t=>{t.style.height=r+"px",t.style.width=l+"px";const e=t._htmlEl;if(e){e.style.width=1e3*l/r+"px",e.style.height="1000px";const t=r/1e3;window.CSS&&CSS.supports&&CSS.supports("zoom","2")?(e.style.zoom=t,e.style.transform=""):e.style.transform="scale("+t+") translateZ(0)"}}))}zoomTo(t,e,i,o){if(!this.shown)return;let s=i,n=o;if("number"==typeof s&&"number"==typeof n&&this.main.wrapper){const t=this.main.wrapper.getBoundingClientRect(),e=this.el.getBoundingClientRect();s-=e.left-t.left,n-=e.top-t.top}const a="number"==typeof s?s:this.el.clientWidth/2,r="number"==typeof n?n:this.el.clientHeight/2,l=this.el.scrollLeft,h=this.el.scrollTop,d=this.scale,c=(l+a)/d,p=(h+r)/d;this.scale=t,this._layout(),this.el.scrollLeft=Math.max(0,c*t-a),this.el.scrollTop=Math.max(0,p*t-r)}onResize(){this.shown&&this._layout()}},FLIPBOOK.Book=class{constructor(t,e){this.rightIndex=0,this.options=e,this.main=t,this.pageWidth=e.pageWidth,this.pageHeight=e.pageHeight,this.singlePage=e.singlePageMode;const i=e.pages;let o=Math.ceil(i.length/2);e.singlePageMode?o=i.length:e.cover||i.length%2!=0||(o+=1),this.numSheets=o}goToPage(){}getRightIndex(){}getPageHeight(){this.bookWidth;return 10}canFlipNext(){return this.flippedright>0&&((!this.singlePage||1!=this.flippedright)&&(!(1!=this.view||!this.isFocusedLeft||!this.isFocusedLeft())||!(1==this.flippedright&&!this.options.rightToLeft&&!this.options.backCover)&&!(1==this.flippedright&&this.options.rightToLeft&&!this.options.cover)))}canFlipPrev(){const t=this.options.cover?0:1;return this.flippedleft>t&&(!(1!=this.view||!this.isFocusedRight||!this.isFocusedRight())||!(1==this.flippedleft&&this.options.rightToLeft&&!this.options.backCover))}getCurrentPageNumber(){var t=this.rightIndex%2==1?this.rightIndex+1:this.rightIndex;return this.options.rightToLeft?(t=this.options.pages.length-t,this.isFocusedRight()?t:t+1):this.isFocusedLeft()?t:t+1}async startPageItems(t){if(!t)return;const e=t.querySelectorAll(".flipbook-page-item"),i=t.querySelectorAll(".flipbook-page-item-youtube");t.dataset.pageItemsStarted?e.forEach((t=>{if("VIDEO"!==t.nodeName&&"AUDIO"!==t.nodeName||t.autoplay&&(t.currentTime=0,t.play().catch((()=>{}))),t.player&&"true"===t.dataset.autoplayResume){const e=()=>{try{const e=parseFloat(t.dataset.ytCurrentTime)||0;t.player.seekTo(e,!0),t.player.playVideo(),"false"===t.dataset.ytMuted&&t.player.unMute()}catch(t){console.error("Error resuming video:",t)}};try{t.player.addEventListener("onReady",e)}catch{}const i=setInterval((()=>{try{"function"==typeof t.player.getPlayerState&&-1!==t.player.getPlayerState()&&(clearInterval(i),e())}catch(t){}}),200);setTimeout((()=>clearInterval(i)),1e4)}})):(e.forEach((function(t){if("VIDEO"===t.nodeName||"AUDIO"===t.nodeName){const e=t.getAttribute("data-url");if(!e)return;const i=t.querySelector("source")||document.createElement("source");if(i.setAttribute("src",e),i.parentNode||t.appendChild(i),t.load(),"AUDIO"!==t.nodeName||t.controls||(t.style.visibility="hidden"),t.autoplay||t.controls){const e=()=>{t.currentTime>=t.duration&&t.duration>0&&t.load(),t.autoplay&&t.play().catch((()=>{}))};t.readyState<4?t.oncanplay=e:e()}}})),await this.waitForYouTubeAPI(),this.initYouTubePlayers(i),t.dataset.pageItemsStarted="true")}waitForYouTubeAPI(){return new Promise((t=>{if(window.YT&&YT.Player)t();else{const e=setInterval((()=>{window.YT&&YT.Player&&(clearInterval(e),t())}),100);"function"!=typeof window.onYouTubeIframeAPIReady&&(window.onYouTubeIframeAPIReady=()=>{clearInterval(e),t()})}}))}initYouTubePlayers(t){t.forEach((t=>{const e=t.dataset.videoId,i="true"===t.dataset.autoplay,o=(t.dataset.autoplayResume,"true"===t.dataset.controls),s="true"===t.dataset.loop,n="true"===t.dataset.muted,a=t.playerIframe||document.createElement("div");a.id="yt-"+Math.random(),a.className="r3d-yt-iframe",this.main.youtubes=this.main.youtubes||[],this.main.youtubes.push(t),t.playerIframe=a,t.appendChild(a),t.player&&"function"==typeof t.player.getPlayerState&&i&&t.player.playVideo();const r={enablejsapi:1,origin:window.location.origin,controls:o?1:0,rel:0,playsinline:1,fs:1};s&&(r.loop=1,r.playlist=e);const l=new YT.Player(a.id,{videoId:e,playerVars:r,events:{onReady:e=>{const o=e.target;t.player=o,(i||n)&&o.mute(),this.options.backgroundMusic&&(o.playVideo(),1===o.getPlayerState()&&this.pauseGlobalSound()),i&&o.playVideo()},onStateChange:t=>{t.data===YT.PlayerState.PLAYING&&this.options.backgroundMusic&&this.pauseGlobalSound()}}});t.player=l}))}loadPageAsync(t,e,i){if(!t)return Promise.resolve();t._sidePromises||(t._sidePromises={}),t._sidePromises[e]||(t._sidePromises[e]={});const o=this.options,{pageTextureLarge:s,pageTextureSmall:n,pdfMode:a}=o,{wrapperW:r,wrapperH:l,pageW:h,pageH:d,zoom:c}=this.main,p=(this.view,this.bookWidth||2),u=[...o.l];const g=(h*p/d<r/l?l*c:r*c*d/(h*p))*("undefined"!=typeof window&&window.devicePixelRatio||1),m=Math.max(500,250*Math.ceil(1.12*g/250)),b=[Math.min(n,m),o.pageTextureMedium,s].filter(
1Boolean);let f=i||(a?b.find((t=>g<.9*t))||s:2e3);i||(this.currentPageTextureSize=f);const{s:v,d:k}=o,w=k?k[u[0][u[3]]*u[2][[u[3]]]]%u[1][u[3]]:0;return t._sidePromises[e][f]||(t._sidePromises[e][f]=new Promise(((i,o)=>{!e||v||w?i():t[u[0]](e,f,(()=>{i()}))}))),t._sidePromises[e][f]}loadHTMLAsync(t,e){return t?(t._sideHTMLPromises||(t._sideHTMLPromises={}),t._sideHTMLPromises[e]||(t._sideHTMLPromises[e]=new Promise((i=>{e?t.loadHTML(e,(()=>{i()})):i()}))),t._sideHTMLPromises[e]):Promise.resolve()}pageLoaded(t,e){t&&t.loaded(e)}destroy(){}},FLIPBOOK.Notes=class{constructor(t){const e=this;this.main=t,this.notes=Object.values(t.options.notes||[]),this.textSelectionRect=document.createElement("span"),this.textSelectionRect.className="flipbook-add-note-rect hover";const i=document.createElement("span");i.className="add-note-btn",i.innerText=t.options.strings.addNote,i.onclick=function(){e.hideButton(),e.createNote()},i.onmousedown=function(){},this.noteButton=i,this.textSelectionRect.appendChild(i),this.hideButton(),this.notePopup=document.createElement("div"),this.notePopup.className="flipbook-note-display",this.notePopup.innerHTML='<div class="note-content"><textarea role="textbox" maxlength="500" placeholder="'+t.options.strings.typeInYourNote+'" tabindex="0" class="note-article"></textarea></div> <div  aria-hidden="true" class="note-footer"> <span title="Delete Note" class="icon icon-trash-can note-button note-delete-button"><svg version="1.1" viewBox="0 0 24 24" class="svg-icon svg-fill" focusable="false"><path pid="0" d="M15.976 17.862c0 .607-.414 1.138-.885 1.138H8.893c-.47 0-.869-.513-.869-1.12L8.002 8H16l-.023 9.862zM20 6h-5V4.466C15 3.66 14.853 3 14.013 3h-3.858C9.315 3 9 3.659 9 4.466V6H4v2h2v10c0 1.843 1.153 3 2.893 3h6.198C16.84 21 18 19.852 18 18V8h2V6z"></path><path pid="1" d="M13 18h1V9h-1zM10 18h1V9h-1z"></path></svg></span></div>',this.notePopup.onmouseup=function(t){t.stopPropagation()},this.noteDelete=this.notePopup.getElementsByClassName("note-delete-button")[0],this.noteDelete.onclick=function(){e.deleteNote()},this.noteInput=this.notePopup.querySelectorAll("textarea")[0],this.noteInput.onchange=function(){const t=this.dataset.note,i=this.value;e.getNoteById(t).text=i,e.main.trigger("r3d-update-note",{note:e.getNoteById(t)})},this.updateNoteVisibility()}initPageNotes(t){const e=this;this.notes.forEach((function(i){i.page==t.index+1&&e.addPageNote(i,t)})),this.addPageNoteListeners(t)}getNodeColor(t){let e="green";return this.main.options.noteTypes.forEach((function(i){i.id==t.type&&(e=i.color)})),e}updateNoteVisibility(){let t=document.documentElement;this.main.options.noteTypes.forEach((function(e){t.style.setProperty(`--note-${e.id}-opacity`,e.enabled?"1":"0"),t.style.setProperty(`--note-${e.id}-pointer-events`,e.enabled?"auto":"none")}))}addPageNote(t){}showButton(){this.noteButton.classList.remove("flipbook-hidden")}hideButton(){this.noteButton.classList.add("flipbook-hidden")}showNote(t,e,i){const o=e.htmlContent.getBoundingClientRect(),s=t.getBoundingClientRect(),n=this.getNoteById(i);jQuery(e.htmlContent)[0].appendChild(this.notePopup);const a=this.main,r=a.Book.sc*a.wrapperH/1e3,l=(s.y/a.zoom-o.y/a.zoom)/r;this.notePopup.style.top=l<150?l+40+"px":l-140+"px",this.notePopup.style.left=(s.x/a.zoom+.5*s.width/a.zoom-o.x/a.zoom)/r+"px",this.noteInput.value=n.text||"",this.noteInput.dataset.note=n.id,this.activeNote=n,n.readonly?this.disableNoteEdit():this.enableNoteEdit()}enableNoteEdit(){this.noteDelete.classList.remove("flipbook-hidden"),this.noteInput.readOnly=!1}disableNoteEdit(){this.noteDelete.classList.add("flipbook-hidden"),this.noteInput.readOnly=!0}hideNote(){this.notePopup.parentNode&&this.notePopup.parentNode.removeChild(this.notePopup),this.activeNote=null}createNote(){this.textSelectionRect.appendChild(this.notePopup),this.notePopup.style.left="50%",this.textSelectionRect.offsetTop<150?this.notePopup.style.top="40px":this.notePopup.style.top="-140px",this.noteInput.value="",this.noteInput.focus();const t={selectedText:this.selectedTextString,page:this.selectedTextPageNumber,type:1};this.notes.push(t),this.addPageNote(t),this.noteInput.dataset.note=t.id,this.addPageNoteListeners(this.main.options.pages[t.page-1]),this.activeNote=t,this.enableNoteEdit(),this.main.trigger("r3d-update-note",{note:t})}deleteNote(){const t=this.main.options.pages[this.activeNote.page-1];jQuery(t.htmlContent).find(".textLayer").unmark({className:`flipbook-note-${this.activeNote.id}`});const e=this.notes.indexOf(this.activeNote);e>-1&&this.notes.splice(e,1),this.hideNote(),this.main.trigger("r3d-delete-note",{note:this.activeNote})}getNoteById(t){let e=null;
1return this.notes.forEach((function(i){Number(i.id)==Number(t)&&(e=i)})),e}removeTextRect(){this.textSelectionRect.parentNode&&this.textSelectionRect.parentNode.removeChild(this.textSelectionRect)}addPageNoteListeners(t){const e=this;t.textLayerDiv&&!t.notesInitialized&&(t.textLayerDiv.addEventListener("mouseup",(function(t){if(!t.target.classList.contains("add-note-btn"))if(e.hideNote(),e.showButton(),e.selectedText=window.getSelection(),e.selectedText.toString()){e.selectedTextString=e.selectedText.toString(),e.selectedTextPageNumber=Number(this.dataset.pageNumber),e.selectedTextRange=e.selectedText.getRangeAt(0);const t=e.selectedTextRange.getBoundingClientRect(),i=this.getBoundingClientRect(),o=e.main;let s=o.Book.sc*o.wrapperH/1e3;e.textSelectionRect.style.top=(t.y/o.zoom-i.y/o.zoom)/s+"px",e.textSelectionRect.style.left=(t.x/o.zoom-i.x/o.zoom)/s+"px",e.textSelectionRect.style.width=t.width/o.zoom/s+"px",e.textSelectionRect.style.height=t.height/o.zoom/s+"px",this.appendChild(e.textSelectionRect)}else e.removeTextRect()})),t.textLayerDiv.addEventListener("mousemove",(function(t){if(e.selectedTextRange&&e.selectedText.toString()){const i=e.textSelectionRect.getBoundingClientRect(),o=e.textSelectionRect.firstChild.getBoundingClientRect();t.clientX>=i.left&&t.clientX<=i.right&&t.clientY>=o.top&&t.clientY<=i.bottom?e.showButton():e.hideButton()}})),t.notesInitialized=!0)}},FLIPBOOK.Tooltip=class{constructor(){this.domElement=document.createElement("div"),this.domElement.className="flipbook-tooltip flipbook-noselect",this.domElement.classList.add("flipbook-hidden");const t=this;this.currentPosition={x:0,y:0},document.addEventListener("scroll",(function(){t.position()}))}show(t){this.showing||(this.domElement.classList.remove("flipbook-hidden"),this.showing=!0,t.text&&(this.domElement.innerText=t.text),t.parent&&t.parent.appendChild(this.domElement),t.onClick?(this.domElement.style.cursor="pointer",this.domElement.onclick=t.onClick):(this.domElement.style.cursor="auto",this.domElement.removeAttribute("onclick")),this.currentPosition=t.position,this.position())}hide(){this.showing&&(this.domElement.classList.add("flipbook-hidden"),this.showing=!1)}position(){const t=this.domElement.parentNode.getBoundingClientRect();this.domElement.style.top=this.currentPosition.y-t.top-scrollY+"px",this.domElement.style.left=this.currentPosition.x-t.left-scrollX+"px"}},FLIPBOOK.ProgressBar=class{constructor(t={}){this.value=t.value||0,this.min=t.min||0,this.max=t.max||100,this.onChange=t.onChange||function(t){},this.colors=t.colors||{},this.wrapper=t.wrapper||document.body,this.el=null,this._dragging=!1,this._render(),this.setValue(this.value),this._bindEvents()}_render(){const t=document.createElement("div");t.className="flipbook-progress-bar",t.tabIndex=0,this.colors.bg&&(t.style.setProperty("--progress-bg",this.colors.bg),t.style.setProperty("--progress-bg-opacity","1"),t.style.setProperty("--progress-bg-opacity-hover","1")),this.colors.fill&&t.style.setProperty("--progress-fill",this.colors.fill),this.colors.thumb&&t.style.setProperty("--progress-thumb",this.colors.thumb),this.colors.thumbBorder&&t.style.setProperty("--progress-thumb-border",this.colors.thumbBorder),t.innerHTML=`\n      <div class="progress-track"></div>\n      <div class="progress-filled"></div>\n      <div class="progress-thumb" tabindex="0" role="slider" aria-valuenow="0" aria-valuemin="${this.min}" aria-valuemax="${this.max}"></div>\n    `,this.wrapper.prepend(t),this.el=t,this.track=t.querySelector(".progress-track"),this.filled=t.querySelector(".progress-filled"),this.thumb=t.querySelector(".progress-thumb")}_bindEvents(){this.thumb.addEventListener("mousedown",this._startDrag.bind(this)),this.el.addEventListener("mousedown",this._startDrag.bind(this)),window.addEventListener("mousemove",this._onDrag.bind(this)),window.addEventListener("mouseup",this._endDrag.bind(this)),this.thumb.addEventListener("touchstart",this._startDrag.bind(this),{passive:!1}),this.el.addEventListener("touchstart",this._startDrag.bind(this),{passive:!1}),window.addEventListener("touchmove",this._onDrag.bind(this),{passive:!1}),window.addEventListener("touchend",this._endDrag.bind(this)),this.thumb.addEventListener("keydown",(t=>{"ArrowRight"!==t.key&&"ArrowUp"!==t.key||(this.setValue(this.value+1),t.preventDefault()),"ArrowLeft"!==t.key&&"ArrowDown"!==t.key||(this.setValue(this.value-1),t.preventDefault())}))}_startDrag(t){"mousedown"===t.type&&0!==t.button||(this._dragging=!0,document.body.style.userSelect="none",this._onDrag(t))}_onDrag(t){if(!this._dragging)return;let e;e=t.touches?t.touches[0].clientX:t.clientX;const i=this.el.getBoundingClientRect();let o=Math.max(0,Math.min(100,(e-i.left)/i.width*100));this.filled.style.width=o+"%",this.thumb.style.left=o+"%",this._dragVal=this.min+(this.max-this.min)*(o/100)}
1_endDrag(){this._dragging&&(this._dragging=!1,document.body.style.userSelect="",void 0!==this._dragVal&&(this.setValue(this._dragVal),this._dragVal=void 0))}setValue(t){let e=((t=Math.round(Math.max(this.min,Math.min(this.max,t))))-this.min)/(this.max-this.min)*100;this.filled.style.width=e+"%",this.thumb.style.left=e+"%",this.thumb.setAttribute("aria-valuenow",t),t===this.value||this._silent||this.onChange(t),this.value=t}getValue(){return this.value}},FLIPBOOK.ThumbUtils={getPageInfo(t,e){let i=e.pages.length%2==0;const o=0===t;let s=i&&t===e.pages.length-1,n=!1;e.doublePage&&(i=e.backCover,s=i&&t===e.pages.length-1,n=!o&&!s);const a=!o&&t%2==1&&!s,r=!o&&t%2==0&&!s;let l=t+1;return e.doublePage&&(l=Math.ceil(t/2)+1),{isCover:o,isBackCover:s,isDouble:n,isLeft:a,isRight:r,pdfPageIndex:l}},renderPdfThumb(t,e,i,o,s,n){const a=document.createElement("canvas");return t.pdfDocument.getPage(e).then((t=>{const e=t.getViewport({scale:1}),r=i/e.height;let l=0,h=r*e.width;n&&(o||s)&&(h=r*e.width/2,s&&(l=-h));const d=t.getViewport({scale:r,offsetX:l}),c=a.getContext("2d");a.height=d.height,a.width=h,t.cleanupAfterRender=!0,t.render({canvasContext:c,viewport:d}).promise.then((()=>{t.cleanup()}))})),a},parseCurrentPages(t){const e=(t?.currentPageValue??"").toString().trim();return e?new Set(e.split("-").map(Number).filter(Number.isFinite)):null},getThumbSrc(t,e){if(!t||"string"!=typeof t)return t;if(-1===t.indexOf("cdn.shopify.com"))return t;try{const i=new URL(t,window.location.href);return i.searchParams.set("width",e),i.toString()}catch(e){return t}},resolveThumbUrl(t,e){if(!t)return null;if(t.thumb)return t.thumb;if(!t.src)return null;const i=Math.max(400,2*e);if(t._thumbUrlCache&&t._thumbUrlCache.width===i)return t._thumbUrlCache.url;const o=FLIPBOOK.ThumbUtils.getThumbSrc(t.src,i);return t._thumbUrlCache={width:i,url:o},o},createThumbImage(t,e,i,o,s){if(i.pdfMode)return FLIPBOOK.ThumbUtils.renderPdfThumb(s.pdfService,e.pdfPageIndex,o,e.isLeft,e.isRight,i.doublePage);const n=FLIPBOOK.ThumbUtils.resolveThumbUrl(t,o);if(n){const t=document.createElement("img");return t.src=n,e.isDouble&&(t.style.width="200%",t.style.height="100%",t.style.objectFit="cover",e.isRight&&(t.style.marginLeft="-100%")),t}if(t&&t.htmlContent){const e=document.createElement("img");if(t._htmlThumbDataUrl)e.src=t._htmlThumbDataUrl;else{const n=Math.max(400,2*o),a=Math.round(n*i.pageWidth/i.pageHeight);FLIPBOOK.captureHtmlPage(t,a,n,s).then((i=>{if(i)try{t._htmlThumbDataUrl=i.toDataURL("image/jpeg",.8),e.src=t._htmlThumbDataUrl}catch(t){}}))}return e}return null}},FLIPBOOK.captureHtmlPage=function(t,e,i,o,s){if(!t||!t.htmlContent)return Promise.resolve(null);return("undefined"!=typeof html2canvas?Promise.resolve():o&&"function"==typeof o.loadScript&&FLIPBOOK.html2canvasSrc?o.loadScript(FLIPBOOK.html2canvasSrc,"html2canvas"):Promise.reject(new Error("html2canvas not available"))).then((()=>{const o=document.createElement("div");if(o.style.cssText="position:fixed;left:-9999px;top:0;width:"+e+"px;height:"+i+"px;overflow:hidden;background:#fff;z-index:-1;",t.htmlContent instanceof Element){const e=t.htmlContent.cloneNode(!0);e.style.width="100%",e.style.height="100%",e.style.display="block";const i=t.htmlContent.querySelectorAll("video"),s=e.querySelectorAll("video");for(let t=0;t<i.length;t++){const e=i[t],o=s[t];if(e.readyState>=2&&o){const t=document.createElement("canvas");t.width=e.videoWidth||e.offsetWidth,t.height=e.videoHeight||e.offsetHeight;try{t.getContext("2d").drawImage(e,0,0,t.width,t.height),t.style.cssText=o.style.cssText,t.className=o.className,o.parentNode.replaceChild(t,o)}catch(t){}}}o.appendChild(e)}else o.innerHTML='<div class="flipbook-page-html" style="width:100%;height:100%"><div class="htmlContent" style="width:100%;height:100%">'+t.htmlContent+"</div></div>";document.body.appendChild(o);const n=o.querySelectorAll("img"),a=Array.from(n).map((t=>t.complete?Promise.resolve():new Promise((e=>{t.onload=e,t.onerror=e}))));return Promise.all(a).then((()=>html2canvas(o,{useCORS:!0,allowTaint:!0,scale:s||1,width:e,height:i,backgroundColor:"#ffffff"}))).then((t=>(o.parentNode&&document.body.removeChild(o),t||null))).catch((()=>(o.parentNode&&document.body.removeChild(o),null)))}))},FLIPBOOK.Thumbnails=class{constructor(t){const e=t.options,i=t.wrapper;this.main=t,this.options=e,this.wrapper=i,this.active=null,this.thumbHolder=document.createElement("div"),this.thumbHolder.className="flipbook-thumbHolder flipbook-side-menu skin-color-bg flipbook-border",t.sideMenuLayer().appendChild(this.thumbHolder),this.thumbHolder.style[e.sideMenuPosition]="0","right"===e.sideMenuPosition&&this.thumbHolder.classList.add("flipbook-side-menu-right"),this.thumbHolder.classList.add("flipbook-hidden"),t.createMenuHeader(this.thumbHolder,t.strings.thumbnails,t.toggleThumbs),this.bookmark=document.createElement("div"),this.bookmark.className="flipbook-font",this.thumbHolder.appendChild(this.bookmark),this.bookmark.classList.add("flipbook-hidden");const o=document.createElement("a");o.innerHTML='<div class="c-p skin-color flipbook-btn">'+e.strings.bookmarkCurrentPage+"</div>",this.bookmark.appendChild(o),o.addEventListener("click",(function(e){t.bookmarkPage(t.cPage[0],this),e.preventDefault(),e.stopPropagation()}));const s=document.createElement("a");s.innerHTML='<div class="c-l-p skin-color flipbook-btn">'+e.strings.bookmarkLeftPage+"</div>",this.bookmark.appendChild(s),s.addEventListener("click",(function(e){t.bookmarkPage(t.cPage[0],this),e.preventDefault(),e.stopPropagation()}));const n=document.createElement("a");n.innerHTML='<div class="c-r-p skin-color flipbook-btn">'+e.strings.bookmarkRightPage+"</div>",this.bookmark.appendChild(n),n.addEventListener("click",(function(e){t.bookmarkPage(t.cPage[1],this),e.preventDefault(),e.stopPropagation()})),this.search=document.createElement("div"),this.search.className="flipbook-search",this.thumbHolder.appendChild(this.search),this.search.classList.add("flipbook-hidden"),this.searchBar=document.createElement("div"),this.searchBar.className="flipbook-findbar",this.search.appendChild(this.searchBar),this.findInputCotainer=document.createElement("div"),this.findInputCotainer.id="findbarInputContainer",this.searchBar.appendChild(this.findInputCotainer),this.findInput=document.createElement("input"),this.findInput.className="toolbarField skin-color skin-color-bg",this.findInput.title="Find",this.findInput.autocapitalize="none",this.findInput.placeholder=`${e.strings.findInDocument}...`,this.findInputCotainer.appendChild(this.findInput),this.clearInput=document.createElement("span"),this.clearInput.className="flipbook-search-clear flipbook-hidden skin-color skin-color-bg";var a=t.createSVGIcon("close");a.classList.add("skin-color"),this.clearInput.appendChild(a),this.clearInput.addEventListener("click",(()=>{this.findInput.value="",this.hideAllThumbs(),this.clearSearchResults(),t.unmark(),t.searchingString="",this.clearInput.classList.add("flipbook-hidden"),this.findInput.focus({preventScroll:!0})}
1)),this.findInputCotainer.appendChild(this.clearInput),this.thumbsWrapper=document.createElement("div"),this.thumbsWrapper.className="flipbook-thumbsWrapper",this.thumbHolder.appendChild(this.thumbsWrapper),this.closeGrid=document.createElement("div"),this.closeGrid.className="flipbook-thumbs-grid-close skin-color flipbook-menu-btn",this.thumbsWrapper.appendChild(this.closeGrid);var r=document.createElement("span");r.className="flipbook-thumbs-grid-minimize flipbook-menu-btn",r.addEventListener("click",(t=>{t.stopPropagation(),t.preventDefault(),this.main.minimizeThumbs()}));var l=this.main.createSVGIcon("chevronDown");r.appendChild(l),this.closeGrid.appendChild(r);var h=document.createElement("span");h.className="flipbook-thumbs-grid-close-btn flipbook-menu-btn",h.style.cursor="pointer",h.addEventListener("click",(t=>{t.stopPropagation(),t.preventDefault(),this.main.closeMenus()}));var d=this.main.createSVGIcon("close");d.classList.add("skin-color"),h.appendChild(d),this.closeGrid.appendChild(h),this.thumbsScroller=document.createElement("div"),this.thumbsScroller.className="flipbook-thumbsScroller skin-color",this.thumbsWrapper.appendChild(this.thumbsScroller),this.findInput.addEventListener("keyup",(t=>{const e=t.currentTarget.value;this.searchString(e)})),this.thumbs=[],this.isOverlayMode="overlay"===e.thumbsStyle;const c=e.thumbSize,p=c*e.pageWidth/e.pageHeight;this.main.wrapper.style.setProperty("--flipbook-thumbs-spread-width",2*p+"px");const u=new IntersectionObserver((t=>{t.forEach((t=>{if(!t.isIntersecting)return;const e=t.target;"function"==typeof e.instance.load&&e.instance.load(),u.unobserve(e)}))}),{root:this.thumbHolder,rootMargin:"200px 0px",threshold:.01});for(let i=0;i<e.pages.length;i++){const o=new FLIPBOOK.Thumbnail(i,p,c,t,e,this);o.el.instance=o,u.observe(o.el)}this.coverSpacer=document.createElement("div"),this.coverSpacer.style.width=p+"px",this.coverSpacer.style.height=c+"px",this.coverSpacer.style.display="inline-block",this.backCoverSpacer=document.createElement("div"),this.backCoverSpacer.style.width=p+"px",this.backCoverSpacer.style.height=c+"px",this.backCoverSpacer.style.display="inline-block",this.isOverlayMode&&(this.createSpreads(),this.showSpreads()),this.main.on("pagechange",(()=>{this.updateCurrentPages()}))}createSpreads(){let t;const{pages:e,cover:i,backCover:o}=this.options;this.spreads=[];const s=e.length-(i?1:0)-(o?1:0);t=(i?1:0)+(o?1:0)+Math.ceil(Math.max(0,s)/2);const n=document.createDocumentFragment();for(let e=0;e<t;e++){const s=document.createElement("div");this.spreads.push(s),s.classList.add("flipbook-thumb-spread"),i&&0===e&&s.classList.add("flipbook-thumb-spread-cover"),o&&e===t-1&&s.classList.add("flipbook-thumb-spread-back-cover");const a=2*e,r=2*e+1;s.dataset.pages=String(a)+","+String(r),n.appendChild(s)}this.thumbsScroller.appendChild(n)}showSpreads(){for(let t=0;t<this.spreads.length;t++){const e=this.spreads[t];e.style.display="";const i=2*t,o=2*t+1;this.thumbs[i-1]?e.appendChild(this.thumbs[i-1]):e.appendChild(this.coverSpacer),this.thumbs[o-1]?e.appendChild(this.thumbs[o-1]):e.appendChild(this.backCoverSpacer)}this.spreadsShowing=!0}showSingles(){for(let t=0;t<this.thumbs.length;t++)this.thumbsScroller.appendChild(this.thumbs[t]);this.hideSpreads()}hideSpreads(){if(this.spreads){for(let t=0;t<this.spreads.length;t++)this.spreads[t].style.display="none";this.spreadsShowing=!1}}findInPageAsync(t,e,i){return new Promise((o=>{t.findInPage(e,i,((t,e,i,s)=>{o({matches:t,htmlContent:e,index:i,pageText:s})}))}))}searchString(t){t?this.clearInput.classList.remove("flipbook-hidden"):this.clearInput.classList.add("flipbook-hidden"),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((async()=>{const e=this.main,i=e.pdfService;if(""!==t){const o=e.options;let s=0;if(this.hideAllThumbs(),this.clearSearchResults(),this.pagesFound=0,e.unmark(),e.searchingString=t,i){let s=0;for(let n=0;n<i.info.numPages&&t===e.searchingString;n++){if(e.isPdfPageLocked(n))continue;const{matches:a,index:r,pageText:l}=await this.findInPageAsync(i,t,n);if(a&&a.length>0){const i=0===this.pagesFound;this.pagesFound++,s+=a.length,e.mark(t),o.searchResultsThumbs?this.showThumb(r):this.showSearchResults(a.length,r,l,i)}}}else o.pagesOriginal.forEach(((i,n)=>{const a=n;o.cover||n++;let r=n;o.doublePage&&(r*=2),o.doublePage&&r===2*o.pagesOriginal.length-2&&r--,o.pages[r]&&o.pages[r].locked||e.loadPageHTML(r,(i=>{const o=new RegExp(e.searchingString.toUpperCase().replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),n=(i.innerText.toUpperCase().match(o)||[]).length;if(n>0){s+=n;const o=0==this.pagesFound;this.showSearchResults(n,a,i.innerText.substring(0,60)+"...",o),this.pagesFound++,e.mark(t)}}))}))}else this.hideAllThumbs(),this.clearSearchResults(),this.main.unmark(),this.main.searchingString=t,this.clearInput.classList.add("flipbook-hidden")}),500)}getThumbIndexForPage(t){return t}loadVisibleThumbs(){}showAllThumbs(){for(let t=0;t<this.thumbs.length;t++)this.thumbs[t].classList.remove("flipbook-hidden");this.isOverlayMode&&this.showSpreads(),this.clearSearchResults()}hideAllThumbs(){for(let t=0;t<this.thumbs.length;t++)this.thumbs[t].classList.add("flipbook-hidden")}clearSearchResults(){const t=this.thumbsScroller.querySelectorAll(".flipbook-search-match");for(let e=0;e<t.length;e++)t[e].remove()}showSearchResults(t,e,i,o){const{main:s,options:n,findInput:a}=this,{doublePage:r,strings:l}=s.options;let h,d=e;const c=n.pages.length;if(r&&e>0){d=2*e-1;const t=d+1;h=t<c?`${d+1}
1-${t+1}`:String(d+1)}else h=String(e+1);const p=document.createElement("div");p.className="flipbook-search-match",p.dataset.page=d+1,p.style.order=d;const u=1===t?l.match:l.matches;p.innerHTML=`\n        <div class="flipbook-search-match-title">\n            <span style="float:left"><strong>${l.page} ${h}</strong></span>\n            <span style="float:right">${t} ${u}</span>\n        </div>\n        <div class="flipbook-search-match-text">${i}</div>\n    `,p.addEventListener("click",(t=>{t.stopPropagation(),t.preventDefault();const e=Number(p.dataset.page);s.goToPage(e),s.options.isMobile&&s.searchShowing&&(s.toggleSearch(void 0,!0),s.resultMarksLive=!0)})),o&&s.goToPage(d+1,!0),this.thumbsScroller.appendChild(p),this.hideSpreads()}showThumb(t){const e=this.thumbs[t];e&&e.classList.remove("flipbook-hidden")}hideThumb(t){const e=this.thumbs[t];e&&e.classList.add("flipbook-hidden")}showeCloseButtons(t=!0){const e=t?"remove":"add";for(let t=0;t<this.thumbs.length;t++){const i=this.thumbs[t].querySelector(".thumb-btn-close");i&&i.classList[e]("flipbook-hidden")}}showBookmarks(){this.showeCloseButtons(!0),this.showBookmarkedThumbs(),this.clearSearchResults(),this.bookmark.classList.remove("flipbook-hidden"),this.setTitle(this.options.strings.bookmarks),this.main.updateCurrentPage(),this.active="bookmarks"}showSearch(){this.main.unmark(),this.clearSearchResults(),this.hideAllThumbs(),this.search.classList.remove("flipbook-hidden"),this.showeCloseButtons(!1),this.setTitle(this.options.strings.search),this.findInput.value="",this.clearInput.classList.add("flipbook-hidden");const t=document.activeElement;t&&"INPUT"===t.tagName||this.findInput.focus({preventScroll:!0}),this.active="search"}showBookmarkedThumbs(){const t=this.main.getBookmarkedPages();this.hideAllThumbs(),this.showSingles();for(let e=0;e<t.length;e++){const i=t[e];if(i){const t=this.getThumbIndexForPage(i);this.showThumb(t)}}}_cancelHideEnd(){this._hideEnd&&(this.thumbHolder.removeEventListener("transitionend",this._hideEnd),this._hideEnd=null),this._hideTimer&&(clearTimeout(this._hideTimer),this._hideTimer=null)}show(t){this._cancelHideEnd(),this.setTitle(this.options.strings.thumbnails),this.bookmark.classList.add("flipbook-hidden"),this.search.classList.add("flipbook-hidden"),this.thumbHolder.classList.remove("flipbook-hidden"),this.thumbHolder.classList.remove("flipbook-side-menu-visible"),this.thumbHolder.classList.remove("flipbook-thumbs-grid"),this.main.thumbsVertical(),this.showAllThumbs(),this.showeCloseButtons(!1),this.loadVisibleThumbs(),this.main.resize(),this.active="thumbs",t&&"overlay"===this.main.options.thumbsStyle&&(this.thumbHolder.classList.add("flipbook-thumbs-grid"),this.options.rightToLeft&&(this.thumbsScroller.style.direction="rtl")),this.thumbsScroller.scrollTop=0,setTimeout((()=>{this.thumbHolder.classList.add("flipbook-side-menu-visible")}),20),this.updateCurrentPages()}hide(){const t=this.thumbHolder.classList.contains("flipbook-thumbs-grid");this.thumbHolder.classList.remove("flipbook-side-menu-visible"),this._cancelHideEnd(),this._hideEnd=()=>{this._cancelHideEnd(),this.thumbHolder.classList.contains("flipbook-side-menu-visible")||(this.thumbHolder.classList.remove("flipbook-thumbs-grid"),this.thumbHolder.classList.add("flipbook-hidden"))},this.thumbHolder.addEventListener("transitionend",this._hideEnd),this._hideTimer=setTimeout(this._hideEnd,400),t||this.thumbHolder.classList.remove("flipbook-thumbs-grid"),this.main.resize(),this.active=null}setTitle(t){const e=this.thumbHolder.querySelector(".flipbook-menu-title");e&&(e.textContent=t)}updateCurrentPages(){if(!this.active)return;if(!this.thumbsByPage){this.thumbsByPage=new Map;for(let t=0;t<this.thumbs.length;t++){const e=this.thumbs[t],i=e.getAttribute("data-pages");if(!i)continue;const o=i.split(",");for(let t=0;t<o.length;t++){const i=Number(o[t]);Number.isFinite(i)&&this.thumbsByPage.set(i,e)}}}const t=this.prevActive||new Set,e=FLIPBOOK.ThumbUtils.parseCurrentPages(this.main);if(!e)return;const i=new Set([...t,...e]);for(const t of i){const i=this.thumbsByPage.get(t);if(!i)continue;const o=e.has(t);if(i.classList.toggle("flipbook-thumb-active",o),o){const t=i.closest(".flipbook-thumb-spread");if(t){t.querySelectorAll(".flipbook-thumb").forEach((t=>t.classList.add("flipbook-thumb-active")))}}}const o=this.thumbsScroller.querySelector(".flipbook-thumb-active");if(o){const t=this.thumbsWrapper,e=t.getBoundingClientRect(),i=o.getBoundingClientRect(),s=100,n=i.top-e.top-s,a=i.left-e.left-s;t.scrollTo({top:t.scrollTop+n,left:t.scrollLeft+a,behavior:"smooth"})}this.prevActive=e}},FLIPBOOK.Thumbnail=class{constructor(t,e,i,o,s,n){this.thumbs=n;const a=document.createElement("div");this.el=a;const r=t%2==1?"left":"right";a.className="flipbook-thumb flipbook-thumb-"+r;s.pages[t];a.setAttribute("data-thumb-index",t),a.style.height=i+"px",a.style.width=e+"px";const l=document.createElement("span");l.className="thumb-btn-close skin-color skin-color-bg",a.appendChild(l),l.addEventListener("click",(function(t){t.stopPropagation(),t.preventDefault(),o.removeBookmark(a.getAttribute("data-thumb-index"))}));var h=o.createSVGIcon("close");h.classList.add("skin-color"),l.appendChild(h),n.thumbs.push(a),this.height=i,this.pageIndex=t;const d=t+1;a.setAttribute("data-page",d);let c=d.toString();s.pages[t]&&s.pages[t].name&&(c=s.pages[t].name);const p=c,u=document.createElement("span");u.textContent=c,u.className="skin-color flipbook-thumb-num",a.appendChild(u),a.setAttribute("data-pages",p),"overlay"===s.thumbsStyle&&(s.thumbsCloseOnClick=!0),a.addEventListener("click",(t=>{let e;t.stopPropagation(),t.preventDefault();const i=t.currentTarget.getAttribute("data-pages");if(i&&-1!==i.indexOf(",")){const t=i.split(","),o=Number(t[0]),n=Number(t[1]);e=s.rightToLeft?n:o}else e=Number(i||t.currentTarget.getAttribute("data-page"));(!Number.isFinite(e)||e<1)&&(e=1),o.goToPage(e);const a=s.isMobile;"bookmarks"===n.active?a&&o.bookmarkShowing&&o.toggleBookmark():"search"!==n.active&&(s.thumbsCloseOnClick||a)&&o.toggleThumbs(!1)}))}load(){if(this.loaded)return;this.loaded=!0;const t=this.thumbs.options,e=t.pages[this.pageIndex],i=FLIPBOOK.ThumbUtils.getPageInfo(this.pageIndex,t),o=FLIPBOOK.ThumbUtils.createThumbImage(e,i,t,this.height,this.thumbs.main);o&&(this.el.appendChild(o),o.style.height=this.height+"px")}},FLIPBOOK.ThumbStrip=class{constructor(t){this.main=t;const e=t.options;this.options=e,this.el=document.createElement("div"),this.el.className="flipbook-thumb-strip",e.rightToLeft&&this.el.classList.add("flipbook-thumb-strip-rtl"),t.wrapper.appendChild(this.el),this.scroller=document.createElement("div"),this.scroller.className="flipbook-thumb-strip-scroller",this.el.appendChild(this.scroller);const i=document.createElement("div");i.className="flipbook-thumb-strip-buttons",this.el.appendChild(i);const o=document.createElement("div");o.className="flipbook-thumb-strip-maximize",o.addEventListener("click",(e=>{e.stopPropagation(),t.maximizeThumbs()}));const s=t.createSVGIcon("chevronUp");o.appendChild(s),i.appendChild(o);const n=document.createElement("div");n.className="flipbook-thumb-strip-close",n.addEventListener("click",(e=>{e.stopPropagation(),t.hideThumbStrip()}));const a=t.createSVGIcon("close");n.appendChild(a),i.appendChild(n),this.thumbEls=[],this.spreadEls=[];const r=e.pageWidth/e.pageHeight,l=88*r,h=new IntersectionObserver((t=>{t.forEach((t=>{if(!t.isIntersecting)return;const e=t.target;e._stripLoaded||(e._stripLoaded=!0,this.loadThumb(e._stripIndex,e,l,88),h.unobserve(e))}))}),{root:this.scroller,rootMargin:"0px 300px",threshold:.01}),d=e.pages.length,c=!1!==e.cover,p=!1!==e.backCover&&d%2==0;let u=0;for(;u<d;){const e=c&&0===u,i=p&&u===d-1,o=e||i,s=document.createElement("div");s.className="flipbook-thumb-strip-spread",e&&s.classList.add("flipbook-thumb-strip-spread-cover"),i&&s.classList.add("flipbook-thumb-strip-spread-back-cover"),this.spreadEls.push(s);const n=e=>{const i=document.createElement("div");i.className="flipbook-thumb-strip-thumb",i.style.aspectRatio=r,i._stripIndex=e,i.addEventListener("click",(()=>{t.goToPage(e+1)})),s.appendChild(i),this.thumbEls.push(i),h.observe(i)};o?(n(u),u++):(n(u),u+1<d?(n(u+1),u+=2):u++),this.scroller.appendChild(s)}t.on("pagechange",(()=>{this.el.classList.contains("flipbook-thumb-strip-visible")&&(this.updateActive(),this.scrollToActive())}))}loadThumb(t,e,i,o){const s=this.options,n=s.pages[t],a=FLIPBOOK.ThumbUtils.getPageInfo(t,s),r=FLIPBOOK.ThumbUtils.createThumbImage(n,a,s,o,this.main);r&&e.appendChild(r)}show(){const t=this.main.menuBottom?this.main.menuBottom.offsetHeight:0;this.el.style.bottom=t+8+"px",this.el.offsetHeight,this.el.classList.add("flipbook-thumb-strip-visible"),this.updateActive(),this.scrollToActive()}hide(){this.el.classList.remove("flipbook-thumb-strip-visible")}updateActive(){const t=FLIPBOOK.ThumbUtils.parseCurrentPages(this.main);if(t){for(let t=0;t<this.spreadEls.length;t++)this.spreadEls[t].classList.remove("flipbook-thumb-strip-spread-active");for(let e=0;e<this.thumbEls.length;e++){const i=e+1;if(t.has(i)){this.thumbEls[e].classList.add("flipbook-thumb-strip-active");const t=this.thumbEls[e].closest(".flipbook-thumb-strip-spread");t&&t.classList.add("flipbook-thumb-strip-spread-active")}else this.thumbEls[e].classList.remove("flipbook-thumb-strip-active")}}}scrollToActive(){const t=this.scroller.querySelector(".flipbook-thumb-strip-active");if(t){(t.closest(".flipbook-thumb-strip-spread")||t).scrollIntoView({inline:"center",block:"nearest",behavior:"smooth"})}}},FLIPBOOK.Lightbox=class{static get sharedOverlay(){if(!FLIPBOOK.Lightbox._overlay){const t=document.createElement("div");t.className="flipbook-overlay",document.body.appendChild(t),FLIPBOOK.Lightbox._overlay=t}return FLIPBOOK.Lightbox._overlay}constructor(t,e,i){this.context=t,this.options=i,this.$body=document.body,this.$html=document.documentElement,this.overlay=FLIPBOOK.Lightbox.sharedOverlay,this.wrapper=document.createElement("div"),this.wrapper.className="flipbook-wrapper-transparent",this.wrapper.style.cssText="margin:0;padding:0;height:100%;width:100%;",this.wrapper.appendChild(e);const o=document.createElement("div");o.className="flipbook-lightbox-toolbar",this.wrapper.appendChild(o),document.addEventListener("keydown",(t=>{"Escape"===t.key&&this.closeLightbox()}))}_applyOverlayStyles(){const t=FLIPBOOK.Lightbox.sharedOverlay,e=this.options;t.style.top=e.lightboxMarginV,t.style.bottom=e.lightboxMarginV,t.style.left=e.lightboxMarginH,t.style.right=e.lightboxMarginH,Object.assign(t.style,e.lightboxCSS),e.lightboxBackgroun
1d&&(t.style.background=e.lightboxBackground),e.lightboxBackgroundColor&&(t.style.background=e.lightboxBackgroundColor),e.lightboxBackgroundPattern&&(t.style.background=`url(${e.lightboxBackgroundPattern}) repeat`),e.lightboxBackgroundImage&&(t.style.background=`url(${e.lightboxBackgroundImage}) no-repeat`,t.style.backgroundSize="cover",t.style.backgroundPosition="center center")}openLightbox(){this.lightboxOpened||(this.lightboxOpened=!0,this.showOverlay(),window.dispatchEvent(new Event("r3d-lightboxopen")),this.options.deeplinkingEnabled||(window.history.pushState(null,"",window.location.href),this.context.historyStateChange()),this.context.options.password&&!this.context.pdfinitStarted&&this.context.initialized&&this.context.initPdf())}showOverlay(){if(!this.$html)return;const t=FLIPBOOK.Lightbox.sharedOverlay;this._applyOverlayStyles(),t.appendChild(this.wrapper),t.classList.add("flipbook-overlay-visible"),this.context.saveScrollPosition(),this.$body.classList.add("flipbook-overflow-hidden"),this.$html.classList.add("flipbook-overflow-hidden")}hideOverlay(){if(!this.$html)return;const t=FLIPBOOK.Lightbox.sharedOverlay;t.classList.remove("flipbook-overlay-visible");const e=()=>{t.removeEventListener("transitionend",e),clearTimeout(i),t.classList.contains("flipbook-overlay-visible")||t.contains(this.wrapper)&&t.removeChild(this.wrapper)},i=setTimeout(e,600);t.addEventListener("transitionend",e),this.$body.classList.remove("flipbook-overflow-hidden"),this.$html.classList.remove("flipbook-overflow-hidden"),this.context.restoreScrollPosition()}closeLightbox(t){this.lightboxOpened&&(this.lightboxOpened=!1,this.hideOverlay(),window.dispatchEvent(new Event("r3d-lightboxclose")),this.context.trigger("lightboxclose"),this.context.fullscreenElement.classList.remove("flipbook-browser-fullscreen"),this.context.lightboxEnd(),t||this.options.deeplinkingEnabled||history.back())}disposeLightbox(){this.lightboxOpened=!1,this.hideOverlay(),window.dispatchEvent(new Event("r3d-lightboxclose")),this.context.trigger("lightboxclose"),this.context.fullscreenElement.classList.remove("flipbook-browser-fullscreen"),this.context.lightboxEnd(),this.context.disposed=!0}},FLIPBOOK.onPageLinkClick=function(t){var e=t.dataset.bookid,i=t.dataset.page;i&&FLIPBOOK.books[e].goToPage(Number(i));var o=t.dataset.url;o&&window.open(o,"_blank")},FLIPBOOK.easings={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return t*(2-t)},easeInOutQuad:function(t){return t<.5?2*t*t:(4-2*t)*t-1},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1- --t*t*t*t},easeInOutQuart:function(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1+--t*t*t*t*t},easeInOutQuint:function(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t},easeInSine:function(t){return 1-Math.cos(t*Math.PI/2)},easeOutSine:function(t){return Math.sin(t*Math.PI/2)},easeInOutSine:function(t){return.5*(1-Math.cos(Math.PI*t))}},FLIPBOOK.animate=function(t){let e=performance.now(),i=t.from,o=t.to,s=t.duration,n=o-i,a=FLIPBOOK.easings[t.easing]||FLIPBOOK.easings.linear,r=null,l=null,h=t.repeat||1,d=t.yoyo||!1,c=0,p=!1,u=t.delay||0;function g(){let m=performance.now(),b=null!==l?l-e:m-e;if(b<u)return void(r=requestAnimationFrame(g));b-=u;let f,v=Math.min(b/s,1);f=p?i+n*a(1-v):i+n*a(v),t.step&&t.step(f),v<1?r=requestAnimationFrame(g):(c++,c<h?(d&&(p=!p),e=performance.now(),r=requestAnimationFrame(g)):(t.step&&t.step(o),t.complete&&t.complete()))}return u>0?setTimeout((()=>{e=performance.now(),r=requestAnimationFrame(g)}),u):r=requestAnimationFrame(g),{pause:function(){r&&(cancelAnimationFrame(r),l=performance.now())},resume:function(){l&&(e+=performance.now()-l,l=null,r=requestAnimationFrame(g))},stop:function(){r&&cancelAnimationFrame(r)}}},FLIPBOOK.extend=function(){function t(t){if("[object Object]"!==Object.prototype.toString.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||null===Object.getPrototypeOf(e)}var e,i,o,s,n,a,r=arguments[0]||{},l=1,h=arguments.length,d=!1;for("boolean"==typeof r&&(d=r,r=arguments[1]||{},l=2),"object"!=typeof r&&"function"!=typeof r&&(r={}),h===l&&(r=this,--l);l<h;l++)if(null!=(e=arguments[l]))for(i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(o=r[i],r===(s=e[i]))continue;
1d&&s&&(t(s)||(n=Array.isArray(s)))?(n?(n=!1,a=o&&Array.isArray(o)?o:[]):a=o&&t(o)?o:{},r[i]=FLIPBOOK.extend(d,a,s)):void 0!==s&&(r[i]=s)}return r},FLIPBOOK.Tooltip2=class{constructor(t){this.wrapper=t,this.tooltipEl=null,this.activeTarget=null,this.tooltipObserver=null,this.init()}init(){this.tooltipEl=document.createElement("span"),this.tooltipEl.className="flipbook-tooltip-element skin-color skin-color-bg",this.tooltipEl.setAttribute("role","tooltip"),this.tooltipEl.id="flipbook-tooltip",this.wrapper.appendChild(this.tooltipEl),this.wrapper.addEventListener("mouseover",this.handleMouseOver.bind(this)),this.wrapper.addEventListener("mouseout",this.handleMouseOut.bind(this)),this.wrapper.addEventListener("focusin",this.handleFocusIn.bind(this)),this.wrapper.addEventListener("focusout",this.handleMouseOut.bind(this)),this.wrapper.addEventListener("touchstart",this.handleTouchStart.bind(this),{passive:!0})}handleMouseOver(t){const e=t.target.closest(".flipbook-has-tooltip");e&&!e.classList.contains("disabled")&&this.showTooltip(e)}handleFocusIn(t){const e=t.target.closest(".flipbook-has-tooltip");e&&!e.classList.contains("disabled")&&(e.setAttribute("aria-describedby","flipbook-tooltip"),this.showTooltip(e))}handleTouchStart(t){const e=t.target.closest(".flipbook-has-tooltip");e&&!e.classList.contains("disabled")&&(this.showTooltip(e),setTimeout((()=>this.hideTooltip()),2e3))}handleMouseOut(){this.hideTooltip()}showTooltip(t){this.activeTarget=t,t.setAttribute("aria-describedby","flipbook-tooltip"),this.observeTooltipChanges(t),this.updateTooltipText(),this.tooltipEl.style.opacity=0,this.tooltipEl.style.display="block";const e=t.getBoundingClientRect(),i=this.tooltipEl.getBoundingClientRect(),o=this.wrapper.getBoundingClientRect();let s=e.top-o.top-i.height-10,n=e.left-o.left+(e.width-i.width)/2,a=!1,r=e.left-o.left+e.width/2-n;r=Math.max(6,Math.min(i.width-6,r)),s<0&&(s=e.bottom-o.top+10,a=!0),s+i.height>o.height&&(s=o.height-i.height-5),n<0&&(n=5,r=e.left-o.left+e.width/2-n,r=Math.max(6,Math.min(i.width-6,r))),n+i.width>o.width&&(n=o.width-i.width-5,r=e.left-o.left+e.width/2-n,r=Math.max(6,Math.min(i.width-6,r))),s+=this.wrapper.scrollTop,n+=this.wrapper.scrollLeft,this.tooltipEl.style.top=`${s}px`,this.tooltipEl.style.left=`${n}px`,this.tooltipEl.style.setProperty("--arrow-left",`${r}px`),this.tooltipEl.classList.toggle("below",a),this.tooltipEl.style.opacity=1}updateTooltipText(){this.activeTarget&&(this.tooltipEl.innerText=this.activeTarget.dataset.tooltip||"")}observeTooltipChanges(t){this.tooltipObserver&&(this.tooltipObserver.disconnect(),this.tooltipObserver=null),this.tooltipObserver=new MutationObserver((e=>{if(this.activeTarget&&this.activeTarget===t)for(const t of e)if("attributes"===t.type&&"data-tooltip"===t.attributeName){this.updateTooltipText();break}})),this.tooltipObserver.observe(t,{attributes:!0,attributeFilter:["data-tooltip"]})}hideTooltip(){this.tooltipEl.style.opacity=0,this.tooltipEl.style.display="none",this.activeTarget&&this.activeTarget.removeAttribute("aria-describedby"),this.activeTarget=null,this.tooltipObserver&&(this.tooltipObserver.disconnect(),this.tooltipObserver=null)}};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.