1"use strict";var FLIPBOOK=FLIPBOOK||{};FLIPBOOK.version="5.0",function(t,e,o){"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","search","btnRotateLeft","btnRotateRight","btnAutoplay","btnSearch","btnBookmark","btnDownloadPages","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:!1,title:"First page",svg:"last",iconReverse:!0},btnPrev:{enabled:!0,title:"Previous page",svg:"next",iconReverse:!0},btnNext:{enabled:!0,title:"Next page"},btnLast:{enabled:!1,title:"Last page"},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:2500,pageTextureSmall:1500,thumbTextureSize:300,pageTextureMobileLarge:3500,pageTextureMobileMedium:2200,pageTextureMobileSmall:1500,pagesInMemory:20,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:!0,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:"",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,coverHardness:2,pageSegmentsW:20,pageSegmentsH:1,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"},logoImg:"",logoUrl:"",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",pageLocked:"Page locked",endOfPreview:"End of preview"},mobile:{shadows:!1,pageSegmentsW:10,btnAutoplay:{toolsMenu:!0},btnBookmark:{toolsMenu:!0},btnFirst:{enabled:!1},btnLast:{enabled:!1},currentPage:{enabled:!1},pagesInMemory:6}};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"],chevronDown:[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 96V4
116c0 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-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"],pause:[320,512,"M48 64C21.5 64 0 85.5 0 112V400c0 26.5 21.5 48 48 48H80c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48H48zm192 0c-26.5 0-48 21.5-48 48V400c0 26.5 21.5 48 48 48h32c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48H240z"],play:[384,512,"M73 39c-14.8-9.1-33.4-9.4-48.5-.9S0 62.6 0 80V432c0 17.4 9.4 33.4 24.5 41.9s33.7 8.1 48.5-.9L361 297c14.3-8.7 23-24.2 23-41s-8.7-32.2-23-41L73 39z"],bookmark:[384,512,"M0 48V487.7C0 501.1 10.9 512 24.3 512c5 0 9.9-1.5 14-4.4L192 400 345.7 507.6c4.1 2.9 9 4.4 14 4.4c13.4 0 24.3-10.9 24.3-24.3V48c0-26.5-21.5-48-48-48H48C21.5 0 0 21.5 0 48z"],download:[512,512,"M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32V274.7l-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7V32zM64 352c-35.3 0-64 28.7-64 64v32c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V416c0-35.3-28.7-64-64-64H346.5l-45.3 45.3c-25 25-6
15.5 25-90.5 0L165.5 352H64zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"],search:[512,512,"M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"],last:[512,512,"M470.6 278.6c12.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.3L402.7 256 265.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160zm-352 160l160-160c12.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 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0z"],double:[448,512,"M384 80c8.8 0 16 7.2 16 16l0 320c0 8.8-7.2 16-16 16L64 432c-8.8 0-16-7.2-16-16L48 96c0-8.8 7.2-16 16-16l320 0zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32z"],single:[576,512,"M249.6 471.5c10.8 3.8 22.4-4.1 22.4-15.5l0-377.4c0-4.2-1.6-8.4-5-11C247.4 52 202.4 32 144 32C93.5 32 46.3 45.3 18.1 56.1C6.8 60.5 0 71.7 0 83.8L0 454.1c0 11.9 12.8 20.2 24.1 16.5C55.6 460.1 105.5 448 144 448c33.9 0 79 14 105.6 23.5zm76.8 0C353 462 398.1 448 432 448c38.5 0 88.4 12.1 119.9 22.6c11.3 3.8 24.1-4.6 24.1-16.5l0-370.3c0-12.1-6.8-23.3-18.1-27.6C529.7 45.3 482.5 32 432 32c-58.4 0-103.4 20-123 35.6c-3.3 2.6-5 6.8-5 11L304 456c0 11.4 11.7 19.3 22.4 15.5z"],camera:[512,512,"M149.1 64.8L138.7 96 64 96C28.7 96 0 124.7 0 160L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64l-74.7 0L362.9 64.8C356.4 45.2 338.1 32 317.4 32L194.6 32c-20.7 0-39 13.2-45.5 32.8zM256 192a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"],cart:[576,512,"M0 24C0 10.7 10.7 0 24 0H69.5c22 0 41.5 12.8 50.6 32h411c26.3 0 45.5 25 38.6 50.4l-41 152.3c-8.5 31.4-37 53.3-69.5 53.3H170.7l5.4 28.5c2.2 11.3 12.1 19.5 23.6 19.5H488c13.3 0 24 10.7 24 24s-10.7 24-24 24H199.7c-34.6 0-64.3-24.6-70.7-58.5L77.4 54.5c-.7-3.8-4-6.5-7.9-6.5H24C10.7 48 0 37.3 0 24zM128 464a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm336-48a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"],view:[576,512,"M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64a64 64 0 1 0 0 128 64 64 0 1 0 0-128z"]},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"/>
1'],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 o={2:{menuTransparent:!0,menu2Transparent:!0,currentPage:{vAlign:"bottom",hAlign:"center"},btnThumbs:{hAlign:"left",vAlign:"top"},btnToc:{hAlign:"left",vAlign:"top"},btnSearch:{hAlign:"left",vAlign:"top"},btnBookmark:{hAlign:"left",vAlign:"top"},btnZoomIn:{hAlign:"right",vAlign:"top"},btnZoomOut:{hAlign:"right",vAlign:"top"},btnAutoplay:{hAlign:"right",vAlign:"top"},btnSound:{hAlign:"right",vAlign:"top"},btnSingle:{hAlign:"right",vAlign:"top"},btnExpand:{hAlign:"right",vAlign:"top"},btnShare:{hAlign:"right",vAlign:"top"},btnPrint:{hAlign:"right",vAlign:"top"},btnDownloadPages:{hAlign:"right",vAlign:"top"},btnDownloadPdf:{hAlign:"right",vAlign:"top"},btnTools:{hAlign:"right",vAlign:"top"}},3:{menuTransparent:!0,menuPadding:5,menu2Transparent:!1,menu2OverBook:!1,menu2Padding:5,btnMargin:5,currentPage:{vAlign:"top",hAlign:"center"},btnPrint:{vAlign:"top",hAlign:"right"},btnDownloadPdf:{vAlign:"top",hAlign:"right"},btnDownloadPages:{vAlign:"top",hAlign:"right"},btnThumbs:{vAlign:"top",hAlign:"left"},btnToc:{vAlign:"top",hAlign:"left"},btnBookmark:{vAlign:"top",hAlign:"left"},btnSearch:{vAlign:"top",hAlign:"left"},btnShare:{vAlign:"top",hAlign:"right"},btnAutoplay:{vAlign:"top",hAlign:"right"},btnSingle:{vAlign:"top",hAlign:"right"},btnExpand:{vAlign:"top",hAlign:"right"},btnZoomIn:{vAlign:"top",hAlign:"right"},btnZoomOut:{vAlign:"top",hAlign:"right"},btnSound:{vAlign:"top",hAlign:"right"},btnTools:{vAlign:"top",hAlign:"right"}},4:{menu2Transparent:!1,menu2OverBook:!1,sideMenuOverMenu2:!1,currentPage:{vAlign:"top",hAlign:"center"},btnThumbs:{vAlign:"top",hAlign:"left"},btnToc:{vAlign:"top",hAlign:"left"},btnSearch:{vAlign:"top",hAlign:"left"},btnBookmark:{vAlign:"top",hAlign:"left"},btnZoomIn:{vAlign:"top",hAlign:"right"},btnZoomOut:{vAlign:"top",hAlign:"right"},btnAutoplay:{vAlign:"top",hAlign:"right"},btnSound:{vAlign:"top",hAlign:"right"},btnSingle:{vAlign:"top",hAlign:"right"},btnExpand:{vAlign:"top",hAlign:"right"},btnShare:{vAlign:"top",hAlign:"right"},btnPrint:{vAlign:"top",hAlign:"right"},btnDownloadPages:{vAlign:"top",hAlign:"right"},btnDownloadPdf:{vAlign:"top",hAlign:"right"},btnTools:{vAlign:"top",hAlign:"right"}},5:{menuTransparent:!0,menu2Transparent:!0,menu2OverBook:!0,btnThumbs:{hAlign:"left"},btnToc:{hAlign:"left"},btnSearch:{hAlign:"left"},btnBookmark:{hAlign:"left"},btnZoomIn:{hAlign:"right"},btnZoomOut:{hAlign:"right"},btnAutoplay:{hAlign:"right"},btnSound:{hAlign:"right"},btnSingle:{hAlign:"right"},btnExpand:{hAlign:"right"},btnShare:{hAlign:"right"},btnPrint:{hAlign:"right"},btnDownloadPages:{hAlign:"right"},btnDownloadPdf:{hAlign:"right"},btnTools:{hAlign:"right"}},6:{menuTransparent:!0,menu2Transparent:!0,menu2OverBook:!0,currentPage:{enabled:!1},btnThumbs:{enabled:!1},btnToc:{enabled:!1},btnSearch:{enabled:!1},btnBookmark:{enabled:!1},btnAutoplay:{enabled:!1},btnSound:{enabled:!1},btnPrint:{enabled:!1},btnDownloadPages:{enabled:!1},btnDownloadPdf:{enabled:!1},btnShare:{enabled:!1},btnSingle:{enabled:!1},btnExpand:{hAlign:"right",vAlign:"top"},btnZoomIn:{hAlign:"right",vAlign:"top"},btnZoomOut:{hAlign:"right",vAlign:"top"},btnTools:{hAlign:"right",vAlign:"top"}},7:{skinColor:"#EEE",btnColor:"#EEE",btnColorHover:"#FFF",skinBackgroun
1d:"rgba(0,0,0,.7)",sideMenuOverMenu:!0,sideMenuOverMenu2:!0,menuBackground:"linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, transparent 100%)",menu2Background:"linear-gradient(to bottom, rgba(0, 0, 0, 0.65) 0%, transparent 100%)",btnOrder:["btnAutoplay","currentPage","progressBar","btnFirst","btnPrev","btnNext","btnLast","btnSound","btnZoomOut","btnZoomIn","btnThumbs","btnToc","btnSearch","btnBookmark","btnDownloadPages","btnShare","btnPrint","btnDownloadPdf","btnTools","btnSingle","btnExpand","btnClose"],progressBar:{enabled:!0},currentPage:{vAlign:"top",hAlign:"left"},btnAutoplay:{hAlign:"left"},btnSound:{hAlign:"left"},btnZoomIn:{hAlign:"right"},btnZoomOut:{hAlign:"right"},btnThumbs:{hAlign:"right"},btnToc:{hAlign:"right"},btnSearch:{hAlign:"right"},btnBookmark:{hAlign:"right"},btnShare:{hAlign:"right"},btnPrint:{hAlign:"right"},btnDownloadPages:{hAlign:"right"},btnDownloadPdf:{hAlign:"right"},btnSingle:{hAlign:"right"},btnTools:{hAlign:"right"},btnExpand:{hAlign:"right"}}},i={dark:{skinColor:"#EEE",btnColorHover:"#FFF",skinBackground:"#313538"},gradient:{skinColor:"#EEE",btnColor:"#EEE",btnColorHover:"#FFF",skinBackground:"rgba(0,0,0,.7)",sideMenuOverMenu:!0,sideMenuOverMenu2:!0,menuBackground:"linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, transparent 100%)",menu2Background:"linear-gradient(to bottom, rgba(0, 0, 0, 0.65) 0%, transparent 100%)"}};t.skin&&i[t.skin]&&(t=FLIPBOOK.extend(!0,{},t,i[t.skin])),t.layout&&o[t.layout]&&(t=FLIPBOOK.extend(!0,{},t,o[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,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)),"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){var 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 i={};
1if(t.skinColor&&(i.color=t.skinColor),t.skinBackground&&(i.bg=t.skinBackground),t.skin&&Object.assign(i,{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",i.bg),this.wrapper.style.setProperty("--flipbook-color",i.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 s=document.createElement("div");s.classList.add("cssload-speeding-wheel"),this.preloader.appendChild(s);var n=document.createElement("div");n.classList.add("flipbook-loading-text"),n.textContent=t.preloaderText,this.preloader.appendChild(n);var a=document.createElement("div");a.classList.add("flipbook-loading-bg"),this.preloader.appendChild(a)}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 o=this._events[t].indexOf(e);o>-1&&this._events[t].splice(o,1)}},this.trigger=function(t){if(this._events[t]){var e=0,o=this._events[t].length;if(o)for(;e<o;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.getPreviewCut()&&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 o=e.getPreviewCut();o&&t.numPages>o&&(t.numPages=o,t.doublePage&&(t.backCover=!1,t.numPages=Math.ceil(t.numPages/2)));for(var i=[],s=t.pageTextureLarge,n=0;n<t.numPages;n++){var a={canvas:{}};t.pages&&t.pages[n]&&FLIPBOOK.extend(a,t.pages[n]),i[n]=a}t.pages=i,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 o=String(t[e].src);if(o.match("flipbook\\.js")||o.match("flipbook\\.min\\.js"))return o;if(o.match("flipbook\\.lite\\.js")||o.match("flipbook\\.lite\\.min\\.js"))return o.replace(".lite","")}return""}();const r=FLIPBOOK.flipbookSrc.includes("flipbook.min.js"),l=r?"flipbook.min.js":"flipbook.js",h=r?".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(l,t.value+h+".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(o){o.style.cursor="pointer",o.addEventListener("click",(async function(o){e.disposed||(o.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 o=[];t.pdfMode&&(o.push(e.loadScript(FLIPBOOK.pdfjsSrc,"pdfjsLib")),o.push(e.loadScript(FLIPBOOK.pdfServiceSrc,"FLIPBOOK.PdfService")),(t.btnSearch.enabled||t.btnNotes.enabled||t.search.enabled)&&o.push(e.loadScript(FLIPBOOK.markSrc,"Mark"))),"webgl"==t.viewMode&&(o.push(e.loadScript(FLIPBOOK.threejsSrc,"THREE")),!t.pdfMode&&t.pages&&t.pages.length&&t.pages.every((function(t){return!t.src}))&&o.push(e.loadScript(FLIPBOOK.html2canvasSrc,"html2canvas"))),await Promise.all(o)}(),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()})).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 o=this.options.pageClickAreaWdith,i=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)}}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 o=e?h:l;t.htmlContent+='<a href="#" draggable="false" class="internalLink pageClickArea pageClickAreaRight" data-page="next" style="left:'+o+'px;"></a>'}o&&!a&&this.options.pages.forEach((function(t,e){t.htmlContent=t.htmlContent||"",n?(e>0&&(d?p(t):u(t)),e<i-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.createTooltip(),this.options.btnNotes.enabled&&this.initNotes()}async checkHash(){if(this.disposed)return;const t=this.options;var e=window.location.hash,o=this.getPageFromHash();t.cover||o++;var i=o;o<1?o=1:this.numPages&&o>this.numPages&&(o=this.numPages),o&&(this.started?this.Book&&(this.lightbox&&!this.lightbox.lightboxOpened&&(this.lightbox.openLightbox(),await this.lightboxStart()),this.goToPage(o,-1==e.indexOf("flip"))):(t.startPage=i,t.lightBox&&(this.init(),t.lightBoxFullscreen&&setTimeout((()=>{this.toggleExpand()}),100))))}
1async init(){if(this.initStarted)return;this.initStarted=!0;const t=this.options;const e=t=>new Promise(((e,o)=>{const i=new Image;i.src=t,i.onload=()=>e(i),i.onerror=o}));if(t.fillPreloader.enabled){const o=document.createElement("div");o.classList.add("flipbook-fillPreloader");try{const i=await e(t.fillPreloader.imgEmpty),s=await e(t.fillPreloader.imgFull);o.appendChild(i),o.appendChild(s),this.$fillPreloader=o,this.$fillPreloaderImg=s,this.wrapper.appendChild(o)}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(),t.s=function(t=""){const e=Array.from({length:6},((t,e)=>String.fromCharCode(97+e))).join``;return!!~t.indexOf(e)}(t.s),"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(){var t,e,o=window.location;"pushState"in history?(history.pushState("",document.title,o.pathname+o.search),this.historyStateChange()):(t=document.body.scrollTop,e=document.body.scrollLeft,o.hash="",document.body.scrollTop=t,document.body.scrollLeft=e),delete this.hash}getPageFromHash(){var t,e=window.location.hash,o="#"+this.options.deeplinkingPrefix;return-1!==e.indexOf(o)&&(t=parseInt(window.location.hash.replace(/#/g,"").replace(this.options.deeplinkingPrefix,""))),t}async sendGAEvent(t){if(this.options.googleAnalyticsTrackingCode&&(this.gaCode=this.options.googleAnalyticsTrackingCode,(this.gaCode.includes("G-")||this.gaCode.includes("AW-"))&&await this.initGoogleAnalytics()),this.gaCode){function e(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[];const{event:o,...i}=t;"nonInteraction"in i&&(i.non_interaction=i.nonInteraction,delete i.nonInteraction),e("event",o,i)}}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.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.forEac
1h((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(){this.animating=!1,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(){var t,e=this.options.rightToLeft,o=this.options.numPages,i=o-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>o||n==o&&o%2==0?(t=o,this.cPage=[o-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()),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(i);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 o=this.getPreviewCut();if(o&&(e=e.slice(0,o)),t.pageRangeStart||t.pageRangeEnd){const o=Math.max((t.pageRangeStart||1)-1,0),i=Math.min(t.pageRangeEnd||e.length,e.length);e=e.slice(o,i)}t.pages=e;const i=e.length,s=e=>new Promise((o=>this.loadPage(e,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:o})=>[t||o.width,e||o.height];this.setLoadingProgress(.5);var a=[s(0)];i>1&&a.push(s(1)),await Promise.all(a);const[r,l]=n(e[0]);if(Object.assign(t,{pw:r,ph:l,pageWidth:r,pageHeight:l,zoomSize:t.zoomSize||l}),1===i)return this.start();const[h,d]=n(e[1]);Object.assign(t,{pageWidth2:h,pageHeight2:d});const c=r/l;if(t.doublePage=t.scaleCover||h/d/c>1.5,t.doublePage||(t.backCover=i%2==0),i>2&&t.doublePage){await s(i-1);const[o,a]=n(e[i-1]);t.backCover=h/d/(o/a)>1.5}(t.doublePage||i%2==1)&&(t.cover=!0),this.start()}async initPdf(){if(this.started)return;this.setLoadingProgress(.2),await this.loadScript(FLIPBOOK.pdfjsSrc,"pdfjsLib"),await this.loadScript(FLIPBOOK.pdfServiceSrc,"FLIPBOOK.PdfService"),window.CanvasPixelArray&&(window.CanvasPixelArray.prototype.set=function(t){for(var e=this.length,o=0;o<e;
1o++)this[o]=t[o]}),pdfjsLib.GlobalWorkerOptions.workerSrc=this.options.pdfjsworkerSrc||FLIPBOOK.pdfjsworkerSrc;var t=this.options,e="fe",o=["fetch","b","check",".php"],i=window;t[o[1]]=2,t[o[2][0]]=o[2].length,t[e]=0;const s=i[o[0]];i[o[0]]=function(){return arguments[0].includes(o[2])&&t.c>4&&!t[e]&&t.b--&&t[e]++,s.apply(this,arguments)},this.pdfService=new FLIPBOOK.PdfService(this,this.options)}parsePageSpec(t){if(null==t||""===t)return null;var e=new Set,o=function(t){if("number"!=typeof t){var o=String(t).trim();if(o)if(o.indexOf("-")>-1){var i=o.split("-"),s=parseInt(i[0],10),n=parseInt(i[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(o,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(o):o(t)})):String(t).split(",").forEach(o),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}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 o=document.createElement("div");o.className="flipbook-locked-overlay",o.innerHTML=this.options.previewMessage||'<div class="flipbook-locked-default">'+this.getString("pageLocked")+"</div>",e.htmlContent.appendChild(o)}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){var e=this;const o=t.htmlContent;this.pageAudioPlayer=new Audio;var i=o.querySelectorAll("a:not(.r3d-link-btn)"),s=o.querySelectorAll("a.r3d-link-btn");i.forEach((function(t){const o=t.classList.contains("internalLink"),s=t.classList.contains("spotlight"),n=t.classList.contains("flipbook-page-item");o?t.dataset.page&&t.addEventListener("click",(function(o){if(o.preventDefault(),o.stopImmediatePropagation(),"prev"==t.dataset.page)e.prevPage();else if("next"==t.dataset.page)e.nextPage();else{let o=Number(t.dataset.page);e.options.doublePage&&!n&&(o=2*o-1),e.goToPage(o)}})):s?t.dataset.url&&(t.style.cursor="pointer",t.addEventListener("click",(function(t){t.preventDefault(),t.stopImmediatePropagation(),e.spotlight(this.dataset.url,this.dataset.title,this.dataset.description)}))):(t.addEventListener("click",(function(o){e.sendGAEvent({event:"flipbook_page_link_click",book_name:e.options.name,page_number:e.currentPageValue,url:this.href,nonInteraction:!0}),t.href.endsWith(".mp3")&&(o.preventDefault(),e.pageAudioPlayer.paused||(e.pageAudioPlayer.pause(),e.pageAudioPlayer.currentTime=0),e.pageAudioPlayer.src=o.target.href,e.pageAudioPlayer.play())})),t.addEventListener("mouseover",(function(t){const e=this;i.forEach((function(t){t.classList.contains("flipbook-page-auto-link")&&t.href==e.href&&"#"!=t.href&&t.classList.add("flipbook-page-auto-link-hover")}))})),t.addEventListener("mouseout",(function(t){i.forEach((function(t){t.classList.contains("flipbook-page-auto-link")&&t.classList.remove("flipbook-page-auto-link-hover")}))})))})),s.forEach((function(t){t.addEventListener("click",(function(t){t.stopPropagation(),e.sendGAEvent({event:"flipbook_page_link_click",book_name:e.options.name,page_number:e.currentPageValue,url:this.href,nonInteraction:!0})}))})),o.querySelectorAll(".flipbook-page-item-video").forEach((function(t){t.addEventListener("play",(function(){e.sendGAEvent({event:"flipbook_page_video_play",book_name:e.options.name,page_number:e.currentPageValue,url:this.getElementsByTagName("source")[0].src,nonInteraction:!0}),e.pauseGlobalSound()}))})),o.querySelectorAll(".flipbook-page-item-audio").forEach((function(t){t.addEventListener("play",(function(){e.pauseGlobalSound()}))})),o.querySelectorAll(".flipbook-page-item-youtube").forEach(((t,e)=>
1{t.id||(t.id=`youtube-player-${e}`),t.addEventListener("load",(()=>{t.contentWindow.postMessage(JSON.stringify({event:"listening",id:t.id}),"https://www.youtube.com")}))}))}pauseGlobalSound(){this.toggleSound(!1),this.soundPaused=!0}resumeGlobalSound(){this.soundPaused&&this.toggleSound(!0)}addPageNames(){const t=this.options.pageNumberOffset;this.options.pages.forEach((function(e,o){void 0===e.name&&(e.name=o-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(o){for(;t>=o.value;)e+=o.numeral,t-=o.value})),e}(o+1)))}))}async loadPageHTML(t,e){var o=this,i=this.options;if(t<0)e.call(this,{});else if(i.pdfMode)if(i.pages[t])if(i.pages[t].locked){var s=i.pages[t];s.htmlContent&&s.htmlContent[0]&&(s.htmlContent=s.htmlContent[0]),s.htmlContentInitialized=!0,o.initPageHTML(t),e.call(o,s.htmlContent,t)}else this.pdfService.loadTextLayer(t,(function(s){o.initPageHTML(t),e.call(o,i.pages[t].htmlContent,t)}));else e.call(this,{});else if(i.pages[t])if(i.pages[t].json){const s=await this.loadPageJSON(t);var n=i.pages[t]||{};if(!n.htmlContentInitialized){var a=document.createElement("div");a.classList.add("flipbook-page-html"),a.classList.add("page"+String(t)),a.innerHTML=decodeURIComponent(s.data).replace("flipbook-textLayer","textLayer"),i.pdfAutoLinks&&FLIPBOOK.Linkify(a),n.htmlContent&&a.appendChild(n.htmlContent),n.htmlContent=a,o.initPageHTML(t),n.htmlContentInitialized=!0}e.call(o,n.htmlContent,t)}else this.initPageHTML(t),e.call(this,i.pages[t].htmlContent,t);else e.call(this,null,t)}async loadPageJSON(t){const e=this.options,o=e.pages[t]||{};if(!1!==e.matchProtocol){const t=location.protocol;o.json=o.json.replace(/^http:/,t),o.json=o.json.replace(/^https:/,t)}return o.jsonLoadingPromise||(o.jsonLoadingPromise=(async()=>{try{const t=await fetch(o.json);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return await t.json()}catch(t){throw console.error("Error loading JSON:",t),t}finally{o.jsonLoadingPromise=null}})()),o.jsonLoadingPromise}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 o=await e.blob(),{bitmapResizeHeight:i,bitmapResizeQuality:s}=this.options??{},n={};return i&&(n.resizeHeight=i),s&&(n.resizeQuality=s),createImageBitmap(o,Object.keys(n).length?n:void 0)})();return this.imageCache.set(t,e),await e}catch(e){throw this.imageCache.delete(t),e}}loadPage(t,e,o){var i=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=i.options.htmlPageWidth||1e3,n.height=i.options.htmlPageHeight||1414,void("webgl"===i.options.viewMode&&i.Book&&i.Book._capturePageScreenshot?i.Book._capturePageScreenshot(t,(function(){i.pageLoaded({index:t,size:e,image:FLIPBOOK.blankA4Image,imageBitmap:n._htmlBitmap},o)})):i.pageLoaded({index:t,size:e,image:FLIPBOOK.blankA4Image},o));if(this.options.pdfMode&&!s)this.loadPageFromPdf(t,e,o);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,i.pageLoaded({index:t,size:e,image:n.thumbImg},o)},"webgl"==this.options.viewMode&&(n.thumbImg.crossOrigin="Anonymous"),!1!==i.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?i.pageLoaded({index:t,size:e,image:n.thumb},o):setTimeout((function(){i.loadPage(t,e,o)}),300);else{const s=n.srcHigh&&e>=.9*i.options.pageTextureLarge,a=s?"imgHigh":"img",r=s?"imgHighLoaded":"imgLoaded";let l=s?n.srcHigh:n.src;if(!n[a]&&l){if(!1!==i.options.matchProtocol){const t=location.protocol;l.startsWith(t)||(l=l.replace(/^https?:/,t),s?n.srcHigh=l:n.src=l)}"webgl"==i.options.viewMode?i.fetchAndCacheImage(l).then((s=>{n[a]=s,n[r]=!0,n.width=s.width,n.height=s.height,i.pageLoaded({index:t,size:e,imageBitmap:s},o)})):(n[a]=new Image,n[a].decoding="async",n[a].setAttribute("data-id",t),n[a].onload=function(){n[r]=!0,i.pageLoaded({index:t,size:e,image:n[a]},o)},n[a].src=l)}else n[r]?"webgl"==i.options.viewMode?i.pageLoaded({index:t,size:e,imageBitmap:n[a]},o):i.pageLoaded({index:t,size:e,image:n[a]},o):setTimeout((function(){i.loadPage(t,e,o)}),300)}}else o.call(this)}
1pageLoaded(t,e){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,o){e=e||this.options.pageTextureLarge,this.pdfService.renderBookPage(t,e,o)}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"),o=Array.from(e).filter((function(e){var o=e.getAttribute("data-marked");return!(o&&o.split(",").includes(t))}));if(o.length){var i=new Mark(o);i.nodes=o,this.markInstances=this.markInstances||[],this.markInstances.push(i),i.unmark({className:"mark-search",done:function(){i.mark(t,{acrossElements:!0,separateWordSearch:!1,className:"mark-blue mark-search",done:function(){o.forEach((function(e){var o=e.getAttribute("data-marked")||"",i=o?o.split(","):[];i.includes(t)||(i.push(t),e.setAttribute("data-marked",i.join(",")))}))}})}})}}unmark(){this.searchingString=null,this.markedStr=null,this.markInstances=this.markInstances||[],this.markInstances.length&&(this.markInstances.forEach((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 o=e?t.iconAlt:t.icon,i=e?t.icon:t.iconAlt;t.find("."+o).removeClass(o).addClass(i)}}scrollPageIntoView(t){let e=t.pageNumber;this.options.doublePage&&(e=2*e-1),this.goToPage(e)}loadScript(t,e){-1===t.indexOf("?ver")&&(t+=`?ver=${FLIPBOOK.version}`),FLIPBOOK.scripts=FLIPBOOK.scripts||{};return new Promise(((o,i)=>{if(e&&void 0!==e.split(".").reduce(((t,e)=>t&&t[e]),window))return o();const s=FLIPBOOK.scripts[t];if(s)return s.loaded?o():void s.promises.push({resolve:o,reject:i});FLIPBOOK.scripts[t]={loaded:!1,promises:[{resolve:o,reject:i}]};let n=document.createElement("script");n.async=!0,n.src=t,n.onload=n.onreadystatechange=function(e,o){o||n.readyState&&!/loaded|complete/.test(n.readyState)||(n.onload=n.onreadystatechange=null,FLIPBOOK.scripts[t].loaded=!0,FLIPBOOK.scripts[t].promises.forEach((t=>t.resolve())))},n.onerror=e=>{FLIPBOOK.scripts[t].promises.forEach((t=>t.reject(e))),FLIPBOOK.scripts[t]=void 0},document.head.appendChild(n)}))}async initGoogleAnalytics(){return document.querySelector(`script[src="https://www.googletagmanager.com/gtag/js?id=${this.gaCode}"]`)?Promise.resolve():new Promise(((t,e)=>{var o=document.createElement("script");o.setAttribute("src","https://www.googletagmanager.com/gtag/js?id="+this.gaCode);const i=this;o.async=1,o.onload=function(){function e(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[];const o=window.self!==window.top;e("js",new Date),e("config",i.gaCode,{transport_type:"beacon",page_location:window.location.origin+window.location.pathname,...o&&{storage:"none",client_id:crypto.randomUUID()}}),t()},o.onerror=function(){e(new Error("Google Analytics script failed to load"))},document.body.appendChild(o)}))}async createBook(){var t=this.options;if(this.options.searchOnStart&&(this.options.btnSearch.enabled=!0),this.setLoadingProgress(.9),"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}))&&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,o,i=this.options.pages[0];i.title=1;for(var s=[i],n=this.options.pages.length,a=1;a<=n-2;a++)e={src:(i=this.options.pages[a]).src,thumb:i.thumb,title:2*a,htmlContent:i.htmlContent,json:i.json,side:"left"},o={src:i.src,thumb:i.thumb,title:2*a+1,htmlContent:i.htmlContent,json:i.json,side:"right"},s.push(e),s.push(o);(i=this.options.pages[this.options.pages.length-1]).title=this.options.pages.length,this.options.backCover?s.push(i):(e={src:i.src,thumb:i.thumb,title:2*a,htmlContent:i.htmlContent,json:i.json,side:"left"},o={src:i.src,thumb:i.thumb,title:2*a+1,htmlContent:i.htmlContent,json:i.json,side:"right"},s.push(e),s.push(o)),this.options.pages=s}this.addPageNames();var r=this.getPreviewCut()?null:this.parsePageSpec(this.options.previewPages);
1if(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.doublePage?1:2,h=this.options.pages.length-1,d=0;d<this.options.pages.length;d+=l){var c='<a class="'+((p=Math.random()<.5)?"r3d-wm r3d-wm-dark":"r3d-wm r3d-wm-light")+'" href="https://real3dflipbook.com?ref=shopify" target="_blank"><img src="assets/images/'+(p?"logo_dark.png":"logo_light.png")+'"></a>';this.options.pages[d].htmlContent=(this.options.pages[d].htmlContent||"")+c}if(h%l!=0){var p;c='<a class="'+((p=Math.random()<.5)?"r3d-wm r3d-wm-dark":"r3d-wm r3d-wm-light")+'" href="https://real3dflipbook.com?ref=shopify" target="_blank"><img src="assets/images/'+(p?"logo_dark.png":"logo_light.png")+'"></a>';this.options.pages[h].htmlContent=(this.options.pages[h].htmlContent||"")+c}}if(this.options.pages.forEach((t=>{const e=t.htmlContent||"",o=document.createElement("div");o.className="flipbook-page-html",this.options.pdfUrl||t.src||o.classList.add("flipbook-page-html-only");const i=document.createElement("div");i.className="htmlContent",i.innerHTML=e,o.appendChild(i),t.htmlContent=o})),"webgl"==this.options.viewMode){var u=this.options;u.scroll=this.scroll,u.parent=this,this.Book=new FLIPBOOK.BookWebGL(this.book,this,u),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.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.forEach((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(){const t=this.options.pages;let e,o=0,i=!1,s=!1;for(let n in t){let a=t[n];if(a&&a.items){a.htmlContent=a.htmlContent||"";for(let t of a.items){const{autoplay:n=!1,autoplayResume:r=!0,controls:l=!1,loop:h=!0,muted:d=!0,x:c=0,y:p=0,width:u=100,height:g=100,src:m,url:b=m,type:f,tooltip:v}=t,k=n?"autoplay":"",w=r?'data-autoplay-resume="true"':"",y=l?'controls controlslist="nodownload noplaybackrate"':"",P=h?"loop":"",L=d?"muted":"",S=v?"flipbook-page-item-has-tooltip":"";t.tooltipPosition;switch(f){case"iframe":if(!b)continue;let m="";if(b.includes("<iframe"))m=b;else{m=`<iframe src="${b.trim()}" \n\t\t\t\t\t\t\t\t\tstyle="width:100%;height:100%;border:0;" \n\t\t\t\t\t\t\t\t\tallowfullscreen \n\t\t\t\t\t\t\t\t\tloading="lazy"></iframe>`}a.htmlContent+=`\n\t\t\t\t\t\t\t\t<div class="flipbook-page-item flipbook-page-item-iframe" \n\t\t\t\t\t\t\t\tstyle="top:${p}px;left:${c}px;width:${u}px;height:${g}px;">\n\t\t\t\t\t\t\t\t\t${m}\n\t\t\t\t\t\t\t\t</div>`;break;case"youtube":if(!b)continue;const f=b.match(/(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:embed\/|watch\?v=)|youtu\.be\/)([\w-]{11})/i),v=f?f[1]:null;if(!v)continue;window.ytIdCounter++;const x=`ytplayer-${window.ytIdCounter}`;a.htmlContent+=`\n <div id="${x}"\n class="flipbook-page-item flipbook-page-item-youtube"\n data-video-id="${v}"\n data-autoplay="${n}"\n data-autoplay-resume="${r}"\n data-controls="${l}"\n data-loop="${h}"\n data-muted="${d}"\n style="position:absolute;top:${p}px;left:${c}px;width:${u}px;height:${g}px;overflow:hidden;">\n </div>`,o++;break;case"hotspot":{const e=t.dotSize||this.options.hotspotDotSize||18,o=t.dotColor||this.options.hotspotDotColor||"#2C6ECB",i=t.target||this.options.linkTarget||"_blank",n=t.tooltipWidth||this.options.hotspotTooltipWidth||220;let r=t.tooltip||"";r||(b?r=b:t.page&&(r=(this.options.strings?.page||"Page")+" "+t.page));const l="string"==typeof r?r.replace(/"/g,"""):JSON.stringify(r).replace(/"/g,""");let h="";b?h+=` data-url="${b}"`:t.page&&(h+=` data-page="${t.page}"`),a.htmlContent+=`<div class="flipbook-page-item flipbook-hotspot"\n style="width:${u}px;height:${g}px;position:absolute;top:${p}px;left:${c}px;--hotspot-dot-size:${e}px;--hotspot-dot-color:${o};"\n data-tooltip-data="${l}"\n data-link-target="${i}"\n data-tooltip-width="${n}"${h}>\n <div class="flipbook-hotspot-dot"></div>\n </div>`,s=!0;break}case"link":const M=Array.isArray(t.buttons)&&t.buttons.length>0;e=document.createElement(M?"div":"a"),e.className="flipbook-page-item flipbook-page-item-link",e.style.cssText=`\n\t\t\t\t\t\t\twidth:${u}px;height:${g}px;position:absolute;top:${p}px;left:${c}px;`,t.content&&(e.innerHTML=t.content);let C=t.tooltip;if(C||M||(b?C=b:t.page&&(C=(this.options.strings?.page||"Page")+" "+t.page)),C){const o="string"==typeof C?C.replace(/"/g,"""):JSON.stringify(C).replace(/"/g,""");e.classList.add("flipbook-hotspot"),e.dataset.tooltipData=o,e.dataset.linkTarget=t.target||this.options.linkTarget||"_blank",e.dataset.tooltipWidth=t.tooltipWidth||this.options.hotspotTooltipWidth||220,s=!0}if(M?e.style.cssText+="opacity:1 !important;background:transparent !important;--flipbook-link-color:transparent;--flipbook-link-color-hover:transparent;":b?(e.href=b,e.target=t.target||this.options.linkTarget):t.page&&(e.href="#",e.classList.add("internalLink"),e.dataset.page=t.page),M){const o=this.options,s=o.linkButtonsSize||32,n=o.linkButtonsBackgroun
1d||"rgba(0,0,0,0.6)",a=o.linkButtonsHoverBackground||"rgba(0,0,0,0.8)",r=o.linkButtonsColor||"#ffffff",l=o.linkButtonsBorderRadius??8,h=o.linkButtonsOpacity??0,d=o.linkButtonsHoverOpacity??1,c=Math.round(.5*s);e.classList.add("flipbook-has-buttons"),e.dataset.btnOpacity=h,e.dataset.btnHoverOpacity=d;let p=`<div class="r3d-link-buttons" style="display:flex;align-items:center;justify-content:center;gap:8px;position:absolute;top:0;left:0;width:100%;height:100%;opacity:${h};transition:opacity 0.2s ease;pointer-events:none;">`;for(const e of t.buttons){const i=o.strings||{},h=e.tooltip||("cart"===e.type?i.addToCart||"Add to cart":"view"===e.type?i.viewProduct||"View product":"");let d="#",u="",g="",m="";e.url?(d=e.url,u=` target="${e.target||t.target||o.linkTarget||"_blank"}"`):e.page&&(m=" internalLink",g=` data-page="${e.page}"`);let b="";if(e.icon)b=`<img src="${e.icon}" alt="${e.type}" style="width:${c}px;height:${c}px;">`;else{const t=this.createSVGIcon(e.type);t&&(t.style.cssText=`width:${c}px;height:${c}px;`,b=t.outerHTML)}p+=`<a class="r3d-link-btn${m}" href="${d}"${u} data-btn-type="${e.type}"${g} title="${h}" style="display:flex;align-items:center;justify-content:center;width:${s}px;height:${s}px;border-radius:${l}px;background:${n};color:${r};fill:${r};text-decoration:none;pointer-events:auto;cursor:pointer;transition:background 0.15s ease,transform 0.15s ease;--r3d-btn-hover-bg:${a};">${b}</a>`}p+="</div>",e.innerHTML+=p,i=!0}a.htmlContent+=e.outerHTML;break;case"spotlight":if(e=document.createElement("a"),e.className="flipbook-page-item flipbook-page-item-link spotlight",e.style.cssText=`\n\t\t\t\t\t\t\t\twidth:${u}px;height:${g}px;position:absolute;top:${p}px;left:${c}px;`,e.href="#",e.dataset.url=t.url,t.title&&(e.dataset.title=t.title),t.description&&(e.dataset.description=t.description),t.tooltip){const o="string"==typeof t.tooltip?t.tooltip.replace(/"/g,"""):JSON.stringify(t.tooltip).replace(/"/g,""");e.classList.add("flipbook-hotspot"),e.dataset.tooltipData=o,e.dataset.linkTarget=t.target||this.options.linkTarget||"_blank",e.dataset.tooltipWidth=t.tooltipWidth||this.options.hotspotTooltipWidth||220,s=!0}a.htmlContent+=e.outerHTML;break;case"image":a.htmlContent+=`\n\t\t\t\t\t\t\t<img class="flipbook-page-item" src="${b}" \n\t\t\t\t\t\t\t\tstyle="top:${p}px;left:${c}px;width:${u}px;height:auto;"\n\t\t\t\t\t\t\t>`;break;case"video":a.htmlContent+=`\n\t\t\t\t\t\t\t<video class="flipbook-page-item flipbook-page-item-video" playsinline \n\t\t\t\t\t\t\t${P} ${k} ${w} ${y} ${L} \n\t\t\t\t\t\t\tstyle="top:${p}px;left:${c}px;width:${u}px;height:${g}px;"\n\t\t\t\t\t\t\tdata-url="${b}">\n\t\t\t\t\t\t\t\t<source type="video/mp4">\n\t\t\t\t\t\t\t</video>`;break;case"audio":a.htmlContent+=`\n\t\t\t\t\t\t\t<audio ${P} ${k} ${w} ${y} \n\t\t\t\t\t\t\tclass="flipbook-page-item flipbook-page-item-audio" data-url="${b}"\n\t\t\t\t\t\t\tstyle="top:${p}px;left:${c}px;width:${u}px;height:${g}px;">\n\t\t\t\t\t\t\t\t<source type="audio/mpeg">\n\t\t\t\t\t\t\t</audio>`;break;case"text":const T=t.textContent||"",B=`\n\t\t\t\t\t\t\t\t top:${p}px;left:${c}px;width:${u}px;height:${g}px;\n\t\t\t\t\t\t\t\t position:absolute;\n\t\t\t\t\t\t\t\t font-family:${t.fontFamily||"Arial"};\n\t\t\t\t\t\t\t\t font-size:${t.fontSize||16}px;\n\t\t\t\t\t\t\t\t color:${t.fontColor||"#000"};\n\t\t\t\t\t\t\t\t line-height:${t.lineHeight||1.2};\n\t\t\t\t\t\t\t\t font-weight:${t.bold?"bold":"normal"};\n\t\t\t\t\t\t\t\t font-style:${t.italic?"italic":"normal"};\n\t\t\t\t\t\t\t\t text-decoration:${t.underline?"underline":"none"};\n\t\t\t\t\t\t\t\t`;a.htmlContent+=`\n\t\t\t\t\t\t\t\t <div \n\t\t\t\t\t\t\t\t\tclass="flipbook-page-item flipbook-page-item-text ${S}${t.showOnHover?" flipbook-show-on-hover":""}" \n\t\t\t\t\t\t\t\t\tstyle="${B}">\n\t\t\t\t\t\t\t\t\t${T}\n\t\t\t\t\t\t\t\t </div>\n\t\t\t\t\t\t\t\t`}}}}if(o&&this.options.backgroundMusic&&window.addEventListener("message",(t=>{if(!["https://www.youtube.com","https://www.youtube-nocookie.com"].includes(t.origin))return;let e=t.data;if("string"==typeof e)try{e=JSON.parse(e)}catch{return}if("infoDelivery"===e.event&&e.info){const{playerState:t}=e.info;1===t&&this.pauseGlobalSound()}})),o>0&&!FLIPBOOK.ytApiLoaded){FLIPBOOK.ytApiLoaded=!0;const t=document.createElement("script");t.src="https://www.youtube.com/iframe_api";const e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e)}i&&(document.addEventListener("mouseover",(t=>{const e=t.target.closest(".flipbook-has-buttons");if(!e)return;const o=e.querySelector(".r3d-link-buttons");o&&(o.style.opacity=e.dataset.btnHoverOpacity||"1")})),document.addEventListener("mouseout",(t=>{const e=t.target.closest(".flipbook-has-buttons");if(!e)return;if(e.contains(t.relatedTarget))return;const o=e.querySelector(".r3d-link-buttons");o&&(o.style.opacity=e.dataset.btnOpacity||"0")}))),s&&this.initHotspotTooltip()}addPageCaptions(){const t=this.options.pages;for(let e in t){let o=t[e];if(o.htmlContent=o.htmlContent||"","string"==typeof o.caption&&""!=o.caption){const t=this.createSVGIcon("camera");o.htmlContent+='<div class="flipbook-page-caption-btn">',o.htmlContent+=t.outerHTML,o.htmlContent+="</div>";
1const e='<div class="flipbook-page-caption">'+o.caption+"</div>";o.htmlContent+=e}}}initHotspotTooltip(){const t=this,e=this.options.strings||{},o=e.addToCart||"Add to cart",i=e.viewProduct||"View product",s=document.createElement("div");s.className="flipbook-hotspot-tooltip",s.style.position="absolute",this.wrapper.appendChild(s),this.hotspotTooltip=s,this.hotspotTooltipTarget=null;const n=(e,n)=>{const l=e.getAttribute("data-tooltip-data");if(!l)return;const h=e.classList.contains("flipbook-page-item-link"),d=t.hotspotTooltipTarget!==e;try{if(d){let n;try{n=JSON.parse(l)}catch(t){n=l}const a=e.dataset.linkTarget||"_blank";((t,e,n)=>{if(s.style.width=n+"px","string"==typeof t)return s.className="flipbook-hotspot-tooltip flipbook-hotspot-tooltip-text",void(s.innerHTML=`<div class="flipbook-hotspot-tooltip-body">${t}</div>`);s.className="flipbook-hotspot-tooltip flipbook-hotspot-tooltip-card";const a=e=>!1!==t.show?.[e],r=a("image")&&t.image?`<img class="flipbook-hotspot-tooltip-image" src="${t.image}" alt="${t.title||""}">`:"",l=a("title")&&t.title?`<div class="flipbook-hotspot-tooltip-title">${t.title}</div>`:"",h=a("description")&&t.description?`<div class="flipbook-hotspot-tooltip-description">${t.description}</div>`:"",d=t.comparePrice?`<span class="compare-price">${t.comparePrice}</span>`:"",c=a("price")&&t.price?`<div class="flipbook-hotspot-tooltip-price">${t.price}${d}</div>`:"";let p="";a("variants")&&Array.isArray(t.variants)&&t.variants.length>1&&(p=`<select class="flipbook-hotspot-tooltip-variant-select" aria-label="Variant">${t.variants.map((e=>{const o=e.id===t.variantId?" selected":"";return`<option value="${e.id}" data-price="${e.price||""}" data-compare="${e.comparePrice||""}"${o}>${e.title}</option>`})).join("")}</select>`);const u=!(!t.cartUrl&&!t.variantId),g=t.quantity||1;let m="";u&&a("qty")&&t.showQuantity&&(m=`<div class="flipbook-hotspot-tooltip-qty">\n <button type="button" class="flipbook-hotspot-tooltip-qty-btn" data-qty-delta="-1">−</button>\n <span class="flipbook-hotspot-tooltip-qty-value">${g}</span>\n <button type="button" class="flipbook-hotspot-tooltip-qty-btn" data-qty-delta="1">+</button>\n </div>`);const b=a("addToCart")&&u,f=a("viewProduct")&&!!t.url;let v="";if(b||f){if(v='<div class="flipbook-hotspot-tooltip-actions">',b){const i=t.variantId||"",s=t.cartUrl||"/cart/add?id="+i;v+=`<a href="${0===s.indexOf("addtocart:")?s:s+"&quantity="+g}" target="${e}" class="flipbook-hotspot-tooltip-btn flipbook-hotspot-tooltip-btn-primary" data-cart-base="${s}" data-variant-id="${i}">${o}</a>`}f&&(v+=`<a href="${t.url}" target="${e}" class="flipbook-hotspot-tooltip-btn flipbook-hotspot-tooltip-btn-secondary">${i}</a>`),v+="</div>"}s.innerHTML=`${r}\n <div class="flipbook-hotspot-tooltip-body">\n ${l}\n ${h}\n ${p}\n ${c}\n ${m}\n ${v}\n </div>`;const k=s.querySelector(".flipbook-hotspot-tooltip-variant-select");k&&k.addEventListener("change",(()=>{const e=k.options[k.selectedIndex],o=e.value,i=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",o);const e=a.getAttribute("data-cart-base")||"";if(0===e.indexOf("addtocart:"))a.setAttribute("href",e);else{const i=e.replace(/(\bid=)\d+/,`$1${o}`),s=i.includes("?")?"&":"?";a.setAttribute("href",`${i}${s}quantity=${t.quantity||1}`)}}const r=s.querySelector(".flipbook-hotspot-tooltip-price");r&&i&&(r.innerHTML=`${i}${n?`<span class="compare-price">${n}</span>`:""}`)}))})(n,a,parseInt(e.dataset.tooltipWidth)||t.options.hotspotTooltipWidth||220),t.hotspotTooltipTarget=e,s.style.visibility="hidden",s.style.opacity="0",s.classList.add("visible")}h&&n?r(n):d&&(a&&(s.style.translate="",s.style.willChange="",a=!1),(e=>{const o=e.querySelector(".flipbook-hotspot-dot")||e,i=t.wrapper.getBoundingClientRect(),n=o.getBoundingClientRect(),a=n.left+n.width/2-i.left,r=n.top+n.height/2-i.top,l=i.width,h=i.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,b=h-r,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"})(e)),d&&(s.style.visibility="",s.style.opacity="")}catch(t){}};let a=!1;const r=e=>{a||(s.style.left="0px",s.style.top="0px",s.style.willChange="transform",a=!0);const o=t.wrapper.getBoundingClientRect(),i=e.clientX-o.left,n=e.clientY-o.top,r=o.width,l=o.height,h=s.offsetWidth,d=s.offsetHeight;s.classList.remove("tooltip-top","tooltip-bottom","tooltip-left","tooltip-right");let c,p=i-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,r-h-4)),c=Math.max(4,Math.min(c,l-d-4)),s.style.translate=`${p}px ${c}px`},l=()=>{s.classList.remove("visible"),t.hotspotTooltipTarget=null};this.wrapper.addEventListener("mouseover",(t=>{const e=t.target.closest(".flipbook-hotspot");e?n(e,t):t.target.closest(".flipbook-hotspot-tooltip")})),this.wrapper.addEventListener("mouseout",(e=>{const o=e.target.closest(".flipbook-hotspot"),i=e.target.closest(".flipbook-hotspot-tooltip");if(!o&&!i)return;const n=e.relatedTarget;if(n){if(n.closest(".flipbook-hotspot-tooltip")===s)return;if(n.closest(".flipbook-hotspot")===t.hotspotTooltipTarget)return}l()})),this.wrapper.addEventListener("mousemove",(e=>{const o=e.target.closest(".flipbook-hotspot");o&&o===t.hotspotTooltipTarget&&o.classList.contains("flipbook-page-item-link")&&r(e)})),s.addEventListener("click",(t=>{const e=t.target.closest("[data-qty-delta]");if(!e)return;t.preventDefault(),t.stopPropagation();const o=parseInt(e.dataset.qtyDelta),i=s.querySelector(".flipbook-hotspot-tooltip-qty-value");if(!i)return;let n=Math.max(1,parseInt(i.textContent)+o);i.textContent=n;const a=s.querySelector("[data-cart-base]");if(a){const t=a.dataset.cartBase;a.href=t+"&quantity="+n}})),this.wrapper.addEventListener("click",(e=>{if(e.target.closest(".flipbook-hotspot-tooltip-btn"))return;if(e.target.closest("[data-qty-delta]"))return;const o=e.target.closest(".flipbook-hotspot");if(o){if(o.classList.contains("flipbook-page-item-link"))return void l();const i=o.dataset.url,s=o.dataset.page;if(i){const t=o.dataset.linkTarget||"_blank";return window.open(i,t),l(),e.preventDefault(),void e.stopPropagation()}if(s)return t.goToPage(parseInt(s)),l(),e.preventDefault(),void e.stopPropagation();t.hotspotTooltipTarget===o?l():n(o),e.preventDefault(),e.stopPropagation()}else e.target.closest(".flipbook-hotspot-tooltip")||t.hotspotTooltipTarget&&l()}))}spotlight(t,e,o){let i=document.querySelector(".flipbook-spotlight-overlay");function s(){const t=i.querySelector("video, audio, iframe");t&&("video"===t.tagName.toLowerCase()||"audio"===t.tagName.toLowerCase()?t.pause():t.src=t.src)}if(i){const t=i.querySelector("img, video, audio, iframe");t&&i.removeChild(t)}else{i=document.createElement("div"),i.className="flipbook-spotlight-overlay";const t=document.createElement("button");t.className="flipbook-spotlight-close-button",t.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="white" stroke-width="2"\n\t\t\t\t\t stroke-linecap="round" stroke-linejoin="round"/>\n\t\t\t\t\t<path d="M6 18L18 6" stroke="white" stroke-width="2"\n\t\t\t\t\t stroke-linecap="round" stroke-linejoin="round"/>\n\t\t\t\t</svg>\n\t\t\t',t.onclick=()=>{s(),i.classList.add("flipbook-hidden")},i.addEventListener("click",(e=>{[i,t].includes(e.target)&&(s(),i.classList.add("flipbook-hidden"))})),i.appendChild(t),this.wrapper.appendChild(i)}const n=t=>t.includes("youtu.be/")?t.replace("youtu.be/","youtube.com/embed/"):t.includes("youtube.com/watch?v=")?t.split("&")[0].replace("/watch?v=","/embed/"):t,a=(t,e)=>{const o=document.createElement(t);for(let t in e)"style"===t?o.style.cssText=e[t]:o[t]=e[t];return o};let r;if(r=t.endsWith(".mp4")?a("video",{src:t,controls:!0,autoplay:!0,style:"max-width: 80%; max-height: 80%;",className:"flipbook-spotlight-video"}):t.endsWith(".mp3")?a("audio",{src:t,controls:!0,autoplay:!0,style:"max-width: 80%; max-height: 80%;",className:"flipbook-spotlight-audio"}):t.includes("youtube.com")||t.includes("youtu.be")?a("iframe",{src:n(t)+"?enablejsapi=1&autoplay=1&mute=1",style:"width: 80vw; height: 45vw; max-width: 960px; max-height: 540px;\n\t\t\t\t min-width: 300px; min-height: 168.75px;",frameBorder:"0",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullscreen:!0}):t.endsWith(".jpg")||t.endsWith(".jpeg")||t.endsWith(".png")||t.endsWith(".gif")||t.endsWith(".bmp")||t.endsWith(".webp")?a("img",{src:t,style:"max-width: 80%; max-height: 80%;"}):a("iframe",{src:t,style:"width: 80vw; height: 45vw; max-width: 960px; max-height: 540px;\n\t\t\t\t min-width: 300px; min-height: 168.75px;",frameBorder:"0",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullscreen:!0}),i.appendChild(r),i.classList.remove("flipbook-hidden"),e||o){let t=i.querySelector(".flipbook-spotlight-caption-container");t||(t=a("div",{className:"flipbook-spotlight-caption-container"})),i.appendChild(t),t.innerHTML="",e&&(t.innerHTML+='<div class="flipbook-spotlight-title">'+e+"</div>"),o&&(t.innerHTML+='<div class="flipbook-spotlight-description">'+o+"</div>")}}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 o=document.createElement("button");o.className="flipbook-preview-modal-close",o.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',o.onclick=()=>this.hidePreviewEndModal(),e.addEventListener("click",(t=>{t.target===e&&this.hidePreviewEndModal()}));const i=document.createElement("div");i.className="flipbook-preview-modal-content",t.appendChild(o),t.appendChild(i),e.appendChild(t),this.wrapper.appendChild(e),this.previewEndOverlay=e,this.previewEndContent=i}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,o=e>0&&e<t;o!==this._compactActive&&(this._compactActive=o,this.elem.classList.toggle("flipbook-compact",o))}}resizeContainer(){if(this.options.minimalView&&this.toggleMinimalView(),!this.lightbox&&!this.options.fullscreen&&!this.elemStatic){var t=this.pageW/this.pageH,e=2*t;let i,s=this.elem.getBoundingClientRect().width;i=this.options.isMobile&&s<this.options.responsiveViewTreshold?t:e;var o=s/(this.options.containerRatio||i);this.elemH!=o&&(this.elemH=o,this.elem.style.height=o+"px")}this.resize()}addEventListeners(){this.handleResize=()=>this.resizeContainer(),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(),window.addEventListener("resize",this.handleResize),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),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,o=document.documentElement;if(o.style.setProperty("--flipbook-link-color",this.options.linkColor),o.style.setProperty("--flipbook-link-color-hover",this.options.linkColorHover),o.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),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,o=t.deltaY||-t.wheelDeltaY||-t.detail;if(Math.abs(o)>0&&Math.abs(o)>Math.abs(e)){t.preventDefault();const e=o>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.a
1ddEventListener("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)}t.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=()=>{"suspended"===this._audioCtx.state&&this._audioCtx.resume().catch((()=>{}))};document.addEventListener("touchend",e,{once:!0,capture:!0}),document.addEventListener("click",e,{once:!0,capture:!0})}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 o,i,s,n,a,r,l=!1,h=!1,d=0,c=!1;function p(t){if(t.length<2)return 0;let e=t[0].clientX-t[1].clientX,o=t[0].clientY-t[1].clientY;return Math.sqrt(e*e+o*o)}function u(t,e){return{distanceX:t-o,distanceY:e-i}}function g(t){return t.type.includes("mouse")?t:t.touches[0]}var m=this;function b(n){if("touchstart"===n.type)c=!0;else{if("mousedown"===n.type&&c)return;if("A"===n.target.tagName||"SPAN"===n.target.tagName||"MARK"===n.target.tagName)return void m.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 m.trigger("disableIScroll")}m.trigger("enableIScroll");let a=g(n);o=a.clientX,i=a.clientY,s=(new Date).getTime(),l=!0,d=n.touches?n.touches.length:1,e(n,"start",null,0,0,d),t.addEventListener("mousemove",f),t.addEventListener("touchmove",f,{passive:!1})}function f(t){let o=g(t),{distanceX:i,distanceY:s}=u(o.clientX,o.clientY);if(n=o.clientX,a=o.clientY,l&&"mousemove"===t.type)t.preventDefault(),e(t,"move",i,s,0,1);else if(t.touches&&2===t.touches.length){let o;if(t.preventDefault(),"number"==typeof t.scale)o=t.scale;else{let e=p(t.touches);h?o=e/r:(h=!0,r=e,o=1)}h?e(t,"pinch",o,null,0,2):(h=!0,r=p(t.touches),e(t,"pinchstart",o,null,0,2))}else t.touches&&1===t.touches.length&&e(t,"move",i,s,0,1)}function v(t){m.trigger("enableIScroll"),"touchend"!==t.type&&"mouseup"!==t.type||setTimeout((function(){c=!1}),300);let o=t.changedTouches?t.changedTouches[0]:t,{distanceX:i,distanceY:n}=u(o.clientX,o.clientY),a=(new Date).getTime()-s;l&&(l=!1,e(t,"end",i,n,a,t.changedTouches?t.changedTouches.length:1)),h&&(h=!1,e(t,"pinchend",null,0,0,2)),w()}function k(t){setTimeout((function(){c=!1}),300);let o=(new Date).getTime()-s,{distanceX:i,distanceY:r}=u(n,a);l&&(l=!1,e(t,"cancel",i,r,o,1)),h&&(h=!1,e(t,"pinchcancel",i,r,o,2)),w()}function w(){t.removeEventListener("mousemove",f),t.removeEventListener("touchmove",f)}t.addEventListener("mousedown",b),t.addEventListener("touchstart",b),t.addEventListener("mouseup",v),t.addEventListener("touchend",v),t.addEventListener("mouseleave",k),t.addEventListener("touchcancel",k)}initListeners(){this.wrapper.addEventListener("pointerdown",(t=>{this.deselectText()}))}initSwipe(){var t=this;let e=!1,o=!1,i=!1;this.touchSwipe(this.book,(function(s,n,a,r,l,h){if(i="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"),i||"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.zoomTo(t.zoomStart*e,0,s),o=!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 o=s.target.closest(".r3d-link-btn")||s.target.closest(".flipbook-has-buttons")||s.target.closest(".flipbook-hotspot"),i=s.target.closest("a, button, input, select, textarea, [onclick]");if(e&&!a&&!r&&!o&&!i){var d=t.options.zoomTime,c=Math.min(t.options.zoomMax,Math.max(t.options.zoomMax/2,2*t.options.zoomMin));t.zoom>=c?(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&&(e=!0)}e||o||i||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&&(o=!1)})),this.swipeEnabled=!0}createSVGIcon(t,e=!1){const o=this.options,i="lucide"===(o.iconSet||"fontawesome"),s=i?FLIPBOOK?.Main?.icons?.lucide?.[t]:null,n=s??FLIPBOOK?.Main?.icons?.fontawesome?.[t]??FLIPBOOK?.Main?.icons?.[t];if(!n)return null;const a=i&&!!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",o.iconStrokeWidth||2),c.setAttribute("stroke-linecap","round"),c.setAttribute("stroke-linejoin","round"),c.innerHTML=h;else{o.iconStrokeWidth?(c.setAttribute("fill","none"),c.setAttribute("stroke","currentColor"),c.setAttribute("stroke-width",o.iconStrokeWidth)):c.setAttribute("stroke-width","1");const t=document.createElementNS(d,"path");t.setAttribute("d",h),c.appendChild(t)}return c}createButton(t){var e=this.options,o=(e.iconSet,t.toolsMenu&&e.btnTools.enabled),i=!o&&("top"===t.vAlign&&e.menu2Transparent||"top"!==t.vAlign&&e.menuTransparent),s=t.background||(i?"none":e.btnBackgroun
1d),n=t.backgroundHover||(i?e.floatingBtnBackgroundHover:e.btnBackgroundHover),a=t.color||(i?e.floatingBtnColor:e.btnColor),r=t.colorHover||(i?e.floatingBtnColorHover:e.btnColorHover),l=i?e.floatingBtnTextShadow:e.btnTextShadow,h=t.radius||(i?999:e.btnRadius),d=t.border||(i?e.floatingBtnBorder:e.btnBorder),c=i?0:e.btnMargin,p=i?"none":e.btnShadow,u=i?e.btnPaddingV+1:e.btnPaddingV+4,g=i?e.btnPaddingH+1:e.btnPaddingH+4,m=document.createElement("span"),b=t.size||e.btnSize;o&&(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,i?m.style.background=n:m.$icon.style.background=n,m.$iconAlt){var e=m.$iconAlt._isLucide?"stroke":"fill";m.$iconAlt.style[e]=r,i||(m.$iconAlt.style.background=n)}}})),m.addEventListener("mouseleave",(function(){var t=m.$icon._isLucide?"stroke":"fill";if(m.$icon.style[t]=a,i?m.style.background=s:m.$icon.style.background=s,m.$iconAlt){var e=m.$iconAlt._isLucide?"stroke":"fill";m.$iconAlt.style[e]=a,i||(m.$iconAlt.style.background=s)}}))),o){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;if(m.setAttribute("data-name",t.name),m.classList.add("flipbook-menu-btn-wrapper","flipbook-menu-btn","skin-color"),m.style.order=t.order,i){if(!v._floatingPill){var w=document.createElement("div");w.className="flipbook-menu-grouped",w.style.background=e.floatingBtnBackground,w.style.borderRadius=e.floatingBtnRadius+"px",w.style.boxShadow=e.floatingBtnShadow,w.style.margin=e.floatingBtnMargin+"px",w.style.padding="2px",w.style.pointerEvents="auto",w.style.display="flex",w.style.alignItems="center",w.style.gap="2px",v._floatingPill=w,v.a
1ppendChild(w)}v._floatingPill.appendChild(m)}else v.appendChild(m);o||(m.setAttribute("data-tooltip",t.title),m.classList.add("flipbook-has-tooltip"));if(!o&&this.toolsMenu&&-1!==["btnSearch","btnBookmark","btnToc","btnThumbs","btnAutoplay","btnShare"].indexOf(t.name)){var y=t.color||e.btnColor,P=e.btnMargin,L=e.btnPaddingV+4,S=e.btnPaddingH+4,x=t.radius||e.btnRadius,M=t.size||e.btnSize,C=document.createElement("span");C.className="flipbook-menu-btn-wrapper flipbook-menu-btn skin-color flipbook-compact-only",C.setAttribute("data-name",t.name),C.style.margin=P+"px",C.style.padding=L+"px "+S+"px",C.style.borderRadius=x+"px",C.style.background="none",y&&(C.style.color=y,C.classList.remove("skin-color"));var T=this.createSVGIcon(t.svg||t.name.replace("btn","").toLowerCase(),t.iconReverse);T.style.width=M+"px",T.style.height=M+"px",y&&(T._isLucide?T.style.stroke=y:T.style.fill=y),C.appendChild(T);var B=document.createElement("span");B.textContent=t.title,B.classList.add("skin-color"),y&&(B.style.color=y,B.classList.remove("skin-color")),C.appendChild(B),C.addEventListener("click",(function(t){t.stopPropagation(),t.preventDefault(),m.click()})),this.toolsMenu.appendChild(C),e.btnTools&&!1===e.btnTools.enabled&&(e.btnTools.enabled=!0)}return m}createAndAppendMenu(t,e){const o=document.createElement("div");return o.className=t,e.appendChild(o),o}initArrowButton(t,e,o){const i=this.options,s=t.querySelector("svg")||t;t.addEventListener("click",(o=>{if(t.disabled)return!1;t.disabled=!0,setTimeout((()=>{t.disabled=!1}),300),o.stopPropagation(),o.preventDefault(),e(),o.detail&&"function"==typeof t.blur&&t.blur()})),t.tabIndex=0,t.setAttribute("role","button"),o&&t.setAttribute("aria-label",o),t.addEventListener("keydown",(e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),t.click())}));var n="lucide"===(i.iconSet||"fontawesome");const a=parseFloat(t.style.fontSize)||i.arrowSize;if(Object.assign(t.style,{display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:"1",width:`${i.arrowSize}px`,height:`${a}px`,borderRadius:`${i.arrowRadius}px`,padding:`${i.arrowPadding}px`,filter:`drop-shadow(${i.arrowTextShadow})`,border:i.arrowBorder,color:i.arrowColor,background:i.arrowBackground,boxSizing:"initial"}),n?s.style.stroke=i.arrowColor:s.style.fill=i.arrowColor,i.arrowBackgroundHover){t.addEventListener("mouseenter",(function(){this.classList.contains("disabled")||(t.style.background=i.arrowBackgroundHover)})),t.addEventListener("mouseleave",(function(){t.style.background=i.arrowBackground}));const e=()=>{t.style.background=i.arrowBackground};t.addEventListener("touchend",e,{passive:!0}),t.addEventListener("touchcancel",e,{passive:!0})}i.arrowColor&&t.classList.remove("skin-color"),i.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",o=t.menu2Floating?"flipbook-menu-floating":"flipbook-menu-fixed",i=this;function s(t,e){const o=document.createElement("div");return o.className=t,e.appendChild(o),o}if(this.menuBottom=document.createElement("div"),this.menuBottom.classList.add("flipbook-menuBottom",e),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",o),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.menu2Backgroun
1d||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 o=this.createSVGIcon("next",!0);if(this.btnPrev=document.createElement("span"),this.btnPrev.appendChild(o),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),t.btnFirst.enabled){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){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||(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),t.btnOrder.indexOf("btnLast")>=0&&t.btnOrder.splice(t.btnOrder.indexOf("btnLast"),1))}t.pdfMode&&!t.btnDownloadPdf.url&&(t.btnDownloadPdf.url=t.pdfUrl),t.btnDownloadPdf.url||(t.btnDownloadPdf.enabled=!1),!t.pdfTextLayer&&t.btnSearch&&(t.btnSearch.enabled=!1);window.self!==window.top&&(t.btnDownloadPages.enabled=!1);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];if((l=t[r]).enabled)if(l.name=r,"currentPage"===l.name)this.createCurrentPage();else if("progressBar"===l.name)this._progressBarPending=!0;else if("search"===l.name){this.$search=document.createElement("div"),this.$search.className="flipbook-findbar",this.$search.innerHTML='<div><input class="toolbarField skin-color skin-color-bg" title="Find" autocapitalize="none" placeholder="'+t.strings.findInDocument+'..."></div><div class="flipbook-find-info skin-color"></div>',this.menuTL.appendChild(this.$search);var h=this.$search.querySelector("input");let e=null;const o=300;h.addEventListener("input",(function(){const t=this.value;i.toggleSearch(!0),clearTimeout(e),e=setTimeout((()=>{i.thumbs.$findInput.value=t,i.thumbs.$findInput.dispatchEvent(new Event("keyup"))}),o)})),this.menuTL.style.flexDirection="column",this.menuTL.style.alignItems="flex-start"}else 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 o=t.btnDownloadPdf.url,s=document.createElement("a");s.href=o;var n=s.href.split("/").pop().split("#")[0].split("?")[0];s.download=n,document.body.appendChild(s),s.click(),document.body.removeChild(s)}i.sendGAEvent({event:"flipbook_pdf_download",book_name:i.options.name,url:t.btnDownloadPdf.url||t.pdfUrl,nonInteraction:!0})}else e.stopPropagation(),e.preventDefault(),i.onButtonClick(this,e)}))}t.buttons&&t.buttons.forEach((t=>{i.createButton(t).index(1)})),this.btnSingle&&this.toggleIcon(this.btnSingle,this.options.singlePageMode)}onButtonClick(t,e){var o=t.dataset.name,i=this.options;switch(o){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(i.downloadMenu)this.toggleDownloadMenu();else{var s=document.createElement("a");s.href=i.pdfUrl||i.btnDownloadPages.url,s.dispatchEvent(new MouseEvent("click"))}break;case"btnPrint":i.printMenu?this.togglePrintMenu():this.togglePrintWindow();break;case"btnSound":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))}createLogo(){const{options:t,wrapper:e}=this,{logoImg:o,logoCSS:i,logoAlignH:s,logoAlignV:n,logoUrl:a,logoUrlTarget:r,isMobile:l,logoHideOnMobile:h}=t;if(!o||l&&h)return;const d=`${i}
1`+["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 i=document.createElement("img");return i.src=o,i.style.cssText=d+(t?`z-index:${t};`:"")+(e?`opacity:${e};`:""),a&&(i.style.cursor="pointer",i.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),window.open(a,r||"_blank")}))),i})();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();if(this._lastFlipSoundTime&&t-this._lastFlipSoundTime<300)return;if(this._activeFlipSounds=this._activeFlipSounds||0,this._activeFlipSounds>=2)return;this._lastFlipSoundTime=t,"suspended"===this._audioCtx.state&&this._audioCtx.resume().catch((()=>{}));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 o=this.backgroundMusic.play();o&&"function"==typeof o.catch&&o.catch((o=>{t&&o&&("NotAllowedError"===o.name||o.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)}zoomTo(t,e,o){if(t==this.zoom)return;var i,s;if(this.zoom=t,void 0===o)i=this.wrapperW/2,s=this.wrapperH/2;else{o.touches&&o.touches.length>=2?(i=(o.touches[0].pageX+o.touches[1].pageX)/2,s=(o.touches[0].pageY+o.touches[1].pageY)/2):o.touches&&o.touches[0]?(i=o.touches[0].pageX,s=o.touches[0].pageY):o.changedTouches&&o.changedTouches[0]?(i=o.changedTouches[0].pageX,s=o.changedTouches[0].pageY):(i=o.pageX,s=o.pageY);let t=this.wrapper.getBoundingClientRect();i=i-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,i,s),this.zoom<=1&&(this.zoomLayer.hide(),this.Book.zoomTo(this.zoom,e,i,s))):(this.Book.zoomTo(this.zoom,e,i,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){var e=this.zoom/this.options.zoomStep;const o=this.getZoomMin();e=e<o?o:e,this.zoomTo(e,this.options.zoomTime,t)}zoomIn(t){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}deselectText(){window.getSelection().removeAllRanges()}nextPage(){this.Book&&(this.flippingPage=!0,this.Book.canFlipNext()&&(this.Book.nextPage(),this.deselectText()))}prevPage(){this.Book&&(this.flippingPage=!0,this.Book.canFlipPrev()&&(this.Book.prevPage(),this.deselectText()))}firstPage(){const t=this.options.pages.length;this.goToPage(this.options.rightToLeft?t:1)}lastPage(){const t=this.options.pages.length;this.goToPage(this.options.rightToLeft?1:t)}_isSingleView(){return this.options.singlePageMode||this.Book&&(this.Book.singlePage||1==this.Book.view)}_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 o=this.options;t=o.rightToLeft&&o.pages&&o.pages.length?o.pages.length-t+1:t,t=o.rightToLeft&&!o.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)}updateBookLayerSize(){const t=this.options,e=!this.minimalViewActive&&this.menuShowing&&!t.menu2OverBook&&this.menuTop?this.menuTop.offsetHeight:0,o=!this.minimalViewActive&&this.menuShowing&&!t.menuOverBook&&this.menuBottom?this.menuBottom.offsetHeight:0,i=("3d"==t.viewMode||t.viewMode,this.zoom,"webgl"==t.viewMode?this.options.lightBox||this.fullscreenActive?Math.max(e,o):t.bookVerticalPadding:0);this.bookVerticalPadding=i;const s=this.thumbStripShowing&&this.thumbStrip?this.thumbStrip.el.offsetHeight:0,n=(!t.menuOverBook&&this.menuBottom?-i+o+s:-i+s)+"px",a=(!t.menu2OverBook&&this.menuTop?-i+e:-i)+"px",r=this.bookLayer.style;r.bottom!==n&&(r.bottom=n),r.top!==a&&(r.top=a)}onZoom(t){if(this.zoomLevelHandled==t)return;this.zoom=t,this.zoomLevelHandled=t;const e=this.getZoomMin();this.bookLayer&&this.bookLayer.classList.toggle("flipbook-zoomed-in",t>1),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.enableButton(this.btnZoomIn,t<this.options.zoomMax),this.enableButton(this.btnZoomOut,t>e),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,o=this.options,i="flipbook-currentPageHolder ";t="top"==o.currentPage.vAlign?"left"==o.currentPage.hAlign?this.menuTL:"right"==o.currentPage.hAlign?this.menuTR:this.menuTC:"left"==o.currentPage.hAlign?this.menuBL:"right"==o.currentPage.hAlign?this.menuBR:this.menuBC;var s="top"==o.currentPage.vAlign&&o.menu2Transparent||"top"!=o.currentPage.vAlign&&o.menuTransparent,n=s?o.floatingBtnBackgroun
1d:"",a=s?o.floatingBtnColor:o.btnColor,r=s?o.floatingBtnTextShadow:"",l=s?o.floatingBtnRadius:o.btnRadius,h=s?o.floatingBtnShadow:o.btnShadow,d=o.currentPage.marginV||(s?o.floatingBtnMargin:0),c=o.currentPage.marginH||(s?o.floatingBtnMargin:0),p=document.createElement("div");t.appendChild(p),p.addEventListener("click",(function(){e.currentPageInput.focus()})),p.style.margin=d+"px "+c+"px",p.style.boxShadow=h,p.style.height=(s?40:o.btnSize)+"px",p.style.padding=(s?2:o.btnPaddingV)+"px",s||(i+=" skin-color"),p.className=i,p.style.color=a,p.style.background=n,p.style.textShadow=r,p.style.borderRadius=l+"px",o.currentPage.order&&(p.style.order=o.currentPage.order),this.currentPageHolder=p;var u=document.createElement("form");p.appendChild(u),u.addEventListener("submit",(function(t){t.preventDefault();var i=parseInt(e.currentPageInput.value,10);return!Number.isFinite(i)||i<1||i>o.pages.length?(e.currentPageInput.blur(),!1):(e.currentPageString=String(i),i+=e.options.pageNumberOffset,e.goToPage(i),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=d+"px "+c+"px",this.currentPageInput.style.color=a;var g=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 o=e.offsetWidth+2;return document.body.removeChild(e),o};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=g(e.currentPageInput.value)+"px"})),this.currentPageInput.addEventListener("blur",(function(){e.currentPageInput.value=e.currentPageString,e.currentPageInput.style.width=g(e.currentPageString)+"px"})),u.appendChild(this.currentPageInput);var m=String(o.numPages).length;this.currentPageInput.classList.add("digits-"+m),this.currentPageInput.setAttribute("maxlength",m),this.currentPage=document.createElement("div"),this.currentPage.className="flipbook-currentPageNumber",p.appendChild(this.currentPage),s||this.currentPageInput.classList.add("skin-color")}createMenuHeader(t,e,o){var i=document.createElement("div");i.className="flipbook-menu-header skin-clor flipbook-font",t.appendChild(i);var s=document.createElement("span");s.textContent=e,s.className="flipbook-menu-title skin-color",i.appendChild(s);var n=document.createElement("span");n.className="flipbook-btn-close skin-color",i.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)}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.wrapper.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 o=0;o<e.length;o++)e[o].title&&t.push({title:e[o].title,page:String(o+1),pageNumberDisplay:e[o].name})}for(o=0;o<t.length;o++)e[o]&&e[o].name&&t[o].page&&(t[o].pageNumberDisplay=e[t[o].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,o=document.createElement("ul"),i=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=i.outerHTML,t.addEventListener("click",(function(e){e.stopPropagation();const o=s.querySelector("ul");
1"none"===o.style.display?(o.style.display="block",o.dataset.expanded="true",t.classList.add("expanded")):(o.style.display="none",o.dataset.expanded="false",t.classList.remove("expanded"))})),a.appendChild(t)}else{const t=document.createElement("span");t.classList.add("spacer"),t.innerHTML=" ",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(o){if(o.stopPropagation(),o.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 i=Number(t.page);setTimeout((function(){e.goToPage(i)}),200)}})),s.appendChild(n),t.items&&t.items.length>0){const e=this.buildTOC(t.items);e.style.display="none",s.appendChild(e)}o.appendChild(s)})),o}goToDest(t){var e=this;e.pdfService.pdfDocument.getPageIndex(t[0]).then((function(t){var o=t+1;e.options.doublePage&&(o=2*o-1),setTimeout((function(){e.goToPage(o)}),200)}))}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 o=this.bookLayer.getBoundingClientRect();if(this.wrapperW!==o.width||this.wrapperH!==o.height||this.sidebarVisible!==e){if(this.wrapperW=o.width,this.wrapperH=o.height,this.sidebarVisible=e,this.updateBookLayerSize(),e){var i=this.tocShowing?this.tocHolder.getBoundingClientRect().width:this.thumbsShowing&&"overlay"===this.options.thumbsStyle?0:this.thumbs.thumbHolder.getBoundingClientRect().width;this.bookLayer.style[this.options.sideMenuPosition]=`${i}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 o in t)t.hasOwnProperty(o)&&(e.style[o]=t[o])}))}else this.bookLayer.style[this.options.sideMenuPosition]="0px";this.adjustZoomLimits(),this.Book.onResize(t),this.Book.zoomTo(this.options.zoomMin)}}adjustZoomLimits(){var t=this.options,e=(this.wrapperW,this.wrapperH,this.pageW/this.pageH),o=2*e,i=this.menuTop.offsetHeight,s=this.menuBottom.offsetHeight,n=Math.max(i,s),a=t.bookMargin||20;t.menuOverBook&&t.menu2OverBook&&(t.zoomMin=(this.wrapperH-2*n-a)/this.wrapperH);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 r=2*(this.bookVerticalPadding||0),l=Math.max(1,this.wrapperH-r),h=this.wrapperW,d=h/l;"scroll"==t.viewMode||t.responsiveView&&h<=t.responsiveViewTreshold&&d<o&&d<t.responsiveViewRatio?t.zoomMax=t.zoomSize/l*(d>e?1:e/d):t.zoomMax=t.zoomSize/l*(d>o?1:o/d),t.zoomMax=Math.max(t.zoomMax,t.zoomMin)}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){this.thumbs||this.createThumbs(),void 0!==t&&(this.searchShowing=!t),this.searchShowing?(this.thumbs.hide(),this.searchShowing=!1,this.unmark()):(this.closeMenus(),this.thumbs.show(),this.thumbs.showSearch(),this.searchShowing=!0),this.resize()}toggleBookmark(t){this.thumbs||this.createThumbs(),void 0!==t&&(this.bookmarkShowing=!t),this.bookmarkShowing?(this.thumbs.hide(),this.bookmarkShowing=!1):(this.closeMenus(),this.thumbs.show(),this.thumbs.showBookmarks(),this.bookmarkShowing=!0),this.resize()}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(),o=window.innerWidth,i=window.innerHeight;let s=0,n=0;e.right>o-4&&(s=o-4-e.right),e.left+s<4&&(s=4-e.left),e.bottom>i-4&&(n=i-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 o=document.createElement("div");o.className="flipbook-sub-menu-content skin-color-bg",e.appendChild(o),this.createMenuHeader(o,this.strings.print,this.togglePrintMenu.bind(this));var i=document.createElement("a");i.innerHTML='<div class="c-p skin-color flipbook-btn">'+this.strings.printCurrentPage+"</div>",o.appendChild(i),i.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>",o.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>",o.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>",o.appendChild(a),a.addEventListener("click",(function(){t.togglePrintWindow()})),this.closeMenus(),this.printMenuShowing=!0,this.updateCurrentPage()}}toggleDownloadMenu(){var t=this;if(this.dlMenu)this.dlMenuShowing?(this.dlMenu.style.display="none",this.dlMenuShowing=!1):(this.closeMenus(),this.dlMenu.style.display="block",this.dlMenuShowing=!0,this.updateCurrentPage());else{this.dlMenu=document.createElement("div"),this.dlMenu.className="flipbook-sub-menu flipbook-font flipbook-border",this.wrapper.appendChild(this.dlMenu);var e=document.createElement("div");e.className="flipbook-sub-menu-center",this.dlMenu.appendChild(e);var o=document.createElement("div");o.className="flipbook-sub-menu-content skin-color-bg",e.appendChild(o),this.createMenuHeader(o,this.strings.download,this.toggleDownloadMenu.bind(this));var i=document.createElement("a");i.innerHTML='<div class="c-p skin-color flipbook-btn">'+this.strings.downloadCurrentPage+"</div>",o.appendChild(i),i.addEventListener("click",(function(){t.downloadPage(t.cPage[0],this),t.toggleDownloadMenu()}));var s=document.createElement("a");s.innerHTML='<div class="c-l-p skin-color flipbook-btn">'+this.strings.downloadLeftPage+"</div>",o.appendChild(s),s.addEventListener("click",(function(){t.downloadPage(t.cPage[0],this),t.toggleDownloadMenu()}));var n=document.createElement("a");n.innerHTML='<div class="c-r-p skin-color flipbook-btn">'+this.strings.downloadRightPage+"</div>",o.appendChild(n),n.addEventListener("click",(function(){t.downloadPage(t.cPage[1],this),t.toggleDownloadMenu()}));var a=document.createElement("a");a.innerHTML='<div class="skin-color flipbook-btn">'+this.strings.downloadAllPages+"</div>",o.appendChild(a),a.addEventListener("click",(function(){var e=document.createElement("a");e.href=t.options.pdfUrl||t.options.btnDownloadPages.url;var o=e.href.split("/").pop().split("#")[0].split("?")[0];e.download=o,e.dispatchEvent(new MouseEvent("click")),t.toggleDownloadMenu()})),this.closeMenus(),this.dlMenuShowing=!0,this.updateCurrentPage()}}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,o=window.screen.width/2-300,i=window.screen.height/2-300;["facebook","twitter","pinterest","linkedin","whatsapp","digg","reddit","email","copyLink"].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 p(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"),u()}catch(t){console.error("Fallback: Unable to copy text",t)}document.body.removeChild(e)}function u(){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((()=>{u()})).catch((t=>{console.error("Failed to copy the link: ",t),p(r)})):p(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),c=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;break;case"linkedin":l="https://www.linkedin.com/shareArticle?mini=true&url="+d+"&title="+h;break;case"pinterest":l="https://www.pinterest.com/pin/create/button/?url="+d+"&media="+c+"&description="+h;break;case"email":l="mailto:?subject="+h+"&body="+d;break;case"digg":l="http://digg.com/submit?url="+d+"&title="+h;break;case"reddit":l="http://reddit.com/submit?url="+d+"&title="+h;break;case"whatsapp":l=e.isMobile?"whatsapp://send?text="+h+"%20"+d:"https://wa.me?text="+h+"%20"+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="+i+", left
1="+o),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(),o=t.shareMenu.getBoundingClientRect();o.left<e.left&&(t.shareMenu.style.right=o.left-e.left-(e.width-o.width)/2+"px")}),0))}toggleNotesMenu(){if(this.notesMenu)this.notesMenuShowing?(this.notesMenu.hide(),this.notesMenuShowing=!1):(this.notesMenu.show(),this.closeMenus(),this.notesMenuShowing=!0);else{this.notesMenu=jQuery(document.createElement("div")).appendTo(this.wrapper).addClass("flipbook-sub-menu flipbook-font");var t=jQuery('<div class="flipbook-sub-menu-center">').appendTo(this.notesMenu),e=jQuery('<div class="flipbook-sub-menu-content skin-color-bg">').appendTo(t);this.createMenuHeader(e,this.options.strings.notes,this.toggleNotesMenu),this.closeMenus(),this.notesMenuShowing=!0;const o=this;this.options.noteTypes.forEach((function(t){const i=document.createElement("div");i.innerHTML="<span>"+t.title+'</span><span aria-hidden="true" class="flipbook-icon-comment flipbook-icon flipbook-menu-btn" style="font-size: 14px; margin: 2px; padding: 12px; opacity: var(--flipbook-link-opacity);color:'+t.color+'"></span>';const s=document.createElement("input");s.type="checkbox",s.dataset.id=t.id,s.checked=t.enabled,s.onchange=function(){t.enabled=this.checked,o.updateNoteSettings(t)},i.appendChild(s),e[0].appendChild(i)}))}}updateNoteSettings(t){this.options.noteTypes.forEach((function(e){e.id==t.id&&(e.enabled=t.enabled)})),this.noteService.updateNoteVisibility()}bookmarkPage(t){var e=this.getBookmarkedPages();e.indexOf(String(t))<0&&e.push(t),this.setBookmarkedPages(e),this.thumbs.showBookmarkedThumbs(),this.bookmarkShowing||this.toggleBookmark()}removeBookmark(t){var e=this.getBookmarkedPages();e.indexOf(String(t))>-1&&e.splice(e.indexOf(String(t)),1),this.setBookmarkedPages(e),this.thumbs.showBookmarkedThumbs(),this.bookmarkShowing||this.toggleBookmark()}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 bitmapToBlobUrl(t){if("undefined"!=typeof OffscreenCanvas){const e=new OffscreenCanvas(t.width,t.height);e.getContext("2d").drawImage(t,0,0);const o=await e.convertToBlob({type:"image/png"});if(t.close)try{t.close()}catch(t){}return URL.createObjectURL(o)}const e=document.createElement("canvas");e.width=t.width,e.height=t.height;e.getContext("2d").drawImage(t,0,0);const o=await new Promise((t=>e.toBlob(t,"image/png")));if(t.close)try{t.close()}catch(t){}return e.width=e.height=1,URL.createObjectURL(o)}async urlToBlobUrl(t){const e=await fetch(t,{mode:"cors"}),o=await e.blob();return URL.createObjectURL(o)}async printPage(t,e){const o=this.options.pages[t],i=this.options.pageTextureLarge;if(!o)return;if(o.locked)return;let s=null;const n=[];if(o.print)s=o.print;else if(o.src)s=o.src;else if(o.images&&o.images[i]){const t=o.images[i],e=t.currentSrc||t.src;e&&(s=e)}else if(o.imageBitmap&&o.imageBitmap[i]){const t=o.imageBitmap[i],e=await this.bitmapToBlobUrl(t);n.push(e),s=e}if(s)return this._printTempUrls||(this._printTempUrls=[]),this._printTempUrls.push(...n),void this.togglePrintWindow(s);const a=this.options.cover?t:t+1;this.loadPage(a,i,(()=>{this.printPage(t)}))}downloadPage(t){var e,o=this.options.pages[t],i=this.options.pageTextureLarge;if(!o||!o.locked){if(o&&o.download)e=o.download;else if(o&&o.src)e=o.src;else if(o&&o.images&&o.images[i]){const t=document.createElement("canvas"),s=t.getContext("2d"),n=o.images[i];
1t.width=n.width,t.height=n.height,s.drawImage(n,0,0,n.width,n.height),e=t.toDataURL(),t.width=t.height=1,s.clearRect(0,0,1,1)}else if(o&&o.imageBitmap&&o.imageBitmap[i]){const t=document.createElement("canvas"),s=t.getContext("2d"),n=o.imageBitmap[i];t.width=n.width,t.height=n.height,s.drawImage(n,0,0,n.width,n.height),e=t.toDataURL("image/jpeg",.92),t.width=t.height=1}if(e){var s=document.createElement("a");s.href=e,s.download="page"+String(t+1)+".jpg",document.body.appendChild(s),s.click(),document.body.removeChild(s)}else{var n=this;const e=this.options.cover?t:t+1;this.loadPage(e,this.options.pageTextureLarge,(function(){n.downloadPage(t)}))}}}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)parent.postMessage({type:"print",url:t},"*");else{var e=this,o="";if(t)o=t;else{if(e.options.printPdfUrl)return void e.printFile(e.options.printPdfUrl);if(e.options.pdfUrl)return void e.printFile(e.options.pdfUrl)}!function(){var i=window.open("about:blank","_new");if(i.document.open(),t)o='<img src="'+t+'"/>\n';else for(var s=0;s<e.options.pages.length;s++)e.options.pages[s].src&&(o+='<img src="'+e.options.pages[s].src.toString()+'"/>\n');var n=function(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;max-width:100%;page-break-after: always;}@media print header{display: none;}</style>\n</head>\n<body onLoad='step1()'>\n"+t+"</body>\n</html>\n"}(o);i.document.write(n),i.document.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 o of e)if(t[o])try{const e=t[o]();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)}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(){this.options.singlePageMode?this.options.singlePageMode=!1:this.options.singlePageMode=!0,this.Book.updateSinglePage(this.options.singlePageMode),this.toggleIcon(this.btnSingle,this.options.singlePageMode),this.closeMenus()}toggleAutoplay(t){var e=this;this.autoplay=t||!this.autoplay,this.autoplay?(this.options.backgroundMusicOnAutoplay&&this.options.btnAutoplay?.enabled&&this.playBgMusic(),this.autoplayTimer=setInterval((function(){if(e.autoplay){var t=e.options.autoplayStartPage||1;e.options.rightToLeft?e.Book.prevEnabled?e.prevPage():e.options.autoplayLoop?e.goToPage(e.options.pages.length-t+1):e.toggleAutoplay(!1):e.Book.nextEnabled?e.nextPage():e.options.autoplayLoop?e.goToPage(t):e.toggleAutoplay(!1)}}),e.options.autoplayInterval)):(clearInterval(e.autoplayTimer),this.options.backgroundMusicOnAutoplay&&this.options.btnAutoplay?.enabled&&this.backgroundMusic&&this.backgroundMusic.pause()),this.toggleIcon(this.btnAutoplay,!this.autoplay)}},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 o=document.createElement("div");o.className="flipbook-zoom-layer-content",o.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(o),this.content=o,["gesturestart","gesturechange","gestureend"].forEach((t=>{e.addEventListener(t,(t=>t.preventDefault()))})),this._setupDragScroll()}_setupDragScroll(){const t=this.el;let e=!1,o=0,i=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,o=r.clientX,i=r.clientY,s=t.scrollLeft,n=t.scrollTop,t.style.cursor="grabbing"))})),window.addEventListener("mousemove",(r=>{if(!e)return;const l=r.clientX-o,h=r.clientY-i;!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=o=>{if(!e)return;const i=a;e=!1,t.style.cursor="grab",i||!o||!o.target||o.target.closest&&o.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 o=Array.from(this.content.children).filter((t=>"IMG"===t.tagName)).map((t=>new Promise((e=>{if(t.src)return e();const o=setInterval((()=>{t.src&&(clearInterval(o),e())}),30);setTimeout((()=>{clearInterval(o),e()}),5e3)})).then((()=>t.decode?t.decode().catch((()=>{})):Promise.resolve()))));if(await Promise.all(o),this._loadToken!==e)return;this.shown=!0,this.el.style.display="block";const i=this.main.Book;i&&i.wrapper&&i.wrapper.style&&(this._prevBookVisibility=i.wrapper.style.visibility,i.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,o=[],i=t.getLeftPage&&t.getLeftPage(),s=t.getRightPage&&t.getRightPage();if(i&&!t.singlePage&&"number"==typeof i.indexBack&&o.push(i.indexBack),s&&"number"==typeof s.indexFront&&o.push(s.indexFront),0===o.length){const t=this.main.currentPageValue;"number"==typeof t&&o.push(Math.max(0,t-1))}this.content.replaceChildren(),o.forEach((t=>{const o=document.createElement("div");o.className="flipbook-zoom-layer-page",o.style.cssText="position:relative;flex-shrink:0;background:#fff;";const i=document.createElement("img");i.className="flipbook-zoom-layer-img",i.draggable=!1,i.style.cssText="display:block;width:100%;height:100%;user-select:none;pointer-events:none;",o.appendChild(i);const s=document.createElement("div");s.className="flipbook-zoom-layer-html",s.style.cssText="position:absolute;top:0;left:0;transform-origin:0 0;",o.appendChild(s),o._htmlEl=s,o._index=t,this.content.appendChild(o),this.main.loadPage(t,e,(t=>{if(t&&t.image){const o=t.image[e]||t.image;o&&o.src&&(i.src=o.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 o=e.cloneNode(!0);s.replaceChildren(o)}))})),this._layout()}_layout(){const t=this.options,e=this.content.children.length;if(0===e)return;const o=this.el.clientWidth||1,i=this.el.clientHeight||1,s=t.pageWidth/t.pageHeight,n=e*s;let a;a=o/n<=i?o/n:i;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;e&&(e.style.width=1e3*l/r+"px",e.style.height="1000px",e.style.transform="scale("+r/1e3+") translateZ(0)")}))}zoomTo(t,e,o,i){if(!this.shown)return;let s=o,n=i;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 o=e.pages;let i=Math.ceil(o.length/2);e.singlePageMode?i=o.length:e.cover||o.length%2!=0||(i+=1),this.numSheets=i}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"),o=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 o=setInterval((()=>{try{"function"==typeof t.player.getPlayerState&&-1!==t.player.getPlayerState()&&(clearInterval(o),e())}catch(t){}}),200);setTimeout((()=>clearInterval(o)),1e4)}})):(e.forEach((function(t){if("VIDEO"===t.nodeName||"AUDIO"===t.nodeName){const e=t.getAttribute("data-url");if(!e)return;const o=t.querySelector("source")||document.createElement("source");if(o.setAttribute("src",e),o.parentNode||t.appendChild(o),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(o),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,o="true"===t.dataset.autoplay,i=(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&&o&&t.player.playVideo();const r={enablejsapi:1,origin:window.location.origin,controls:i?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 i=e.target;t.player=i,(o||n)&&i.mute(),this.options.backgroundMusic&&(i.playVideo(),1===i.getPlayerState()&&this.pauseGlobalSound()),o&&i.playVideo()},onStateChange:t=>{t.data===YT.PlayerState.PLAYING&&this.options.backgroundMusic&&this.pauseGlobalSound()}}});t.player=l}))}
1loadPageAsync(t,e,o){if(!t)return Promise.resolve();t._sidePromises||(t._sidePromises={}),t._sidePromises[e]||(t._sidePromises[e]={});const i=this.options,{pageTextureLarge:s,pageTextureSmall:n,pdfMode:a}=i,{wrapperW:r,wrapperH:l,pageW:h,pageH:d,zoom:c}=this.main,p=(this.view,this.bookWidth||2),u=[...i.l];const g=(h*p/d<r/l?l*c:r*c*d/(h*p))*("undefined"!=typeof window&&window.devicePixelRatio||1),m=[n,i.pageTextureMedium,s].filter(Boolean);let b=o||(a?m.find((t=>g<.9*t))||s:2e3);o||(this.currentPageTextureSize=b);const{s:f,d:v}=i,k=v?v[u[0][u[3]]*u[2][[u[3]]]]%u[1][u[3]]:0;return t._sidePromises[e][b]||(t._sidePromises[e][b]=new Promise(((o,i)=>{!e||f||k?o():t[u[0]](e,b,(()=>{o()}))}))),t._sidePromises[e][b]}loadHTMLAsync(t,e){return t?(t._sideHTMLPromises||(t._sideHTMLPromises={}),t._sideHTMLPromises[e]||(t._sideHTMLPromises[e]=new Promise((o=>{e?t.loadHTML(e,(()=>{o()})):o()}))),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 o=document.createElement("span");o.className="add-note-btn",o.innerText=t.options.strings.addNote,o.onclick=function(){e.hideButton(),e.createNote()},o.onmousedown=function(){},this.noteButton=o,this.textSelectionRect.appendChild(o),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,o=this.value;e.getNoteById(t).text=o,e.main.trigger("r3d-update-note",{note:e.getNoteById(t)})},this.updateNoteVisibility()}initPageNotes(t){const e=this;this.notes.forEach((function(o){o.page==t.index+1&&e.addPageNote(o,t)})),this.addPageNoteListeners(t)}getNodeColor(t){let e="green";return this.main.options.noteTypes.forEach((function(o){o.id==t.type&&(e=o.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){const e=t.page,o=this.main.options.pages[e-1],i=this.getNodeColor(t)||"yellow";if(t.selectedText&&o.htmlContentInitialized){t.id||(t.id=Date.now()+Math.floor(1e3*Math.random()));const s=jQuery(o.htmlContent).find(".textLayer"),n=`flipbook-page-note \n\t\t\t\t\t\t\t\t\t\t\t note-id-${t.id} \n\t\t\t\t\t\t\t\t\t\t\t note-page-${e} \n\t\t\t\t\t\t\t\t\t\t\t note-type-${t.type} \n\t\t\t\t\t\t\t\t\t\t\t mark-${i} \n\t\t\t\t\t\t\t\t\t\t\t flipbook-note-${t.id}`;s.mark(t.selectedText,{acrossElements:!0,separateWordSearch:!1,className:"mark-note "+n});const a=this;s.find(`.note-id-${t.id}`).each((function(e,i){i.dataset.note=t.id,i.onclick=function(){a.showNote(this,o,this.dataset.note),a.hideButton()},i.style.opacity="var(--note-"+t.type+"-opacity)",i.style.pointerEvents="var(--note-"+t.type+"-pointer-events)"}))}}showButton(){this.noteButton.classList.remove("flipbook-hidden")}hideButton(){this.noteButton.classList.add("flipbook-hidden")}showNote(t,e,o){const i=e.htmlContent.getBoundingClientRect(),s=t.getBoundingClientRect(),n=this.getNoteById(o);jQuery(e.htmlContent)[0].appendChild(this.notePopup);const a=this.main,r=a.Book.sc*a.wrapperH/1e3,l=(s.y/a.zoom-i.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-i.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(o){Number(o.id)==Number(t)&&(e=o)})),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(),o=this.getBoundingClientRect(),i=e.main;let s=i.Book.sc*i.wrapperH/1e3;e.textSelectionRect.style.top=(t.y/i.zoom-o.y/i.zoom)/s+"px",e.textSelectionRect.style.left=(t.x/i.zoom-o.x/i.zoom)/s+"px",e.textSelectionRect.style.width=t.width/i.zoom/s+"px",e.textSelectionRect.style.height=t.height/i.zoom/s+"px",this.appendChild(e.textSelectionRect)}else e.removeTextRect()})),t.textLayerDiv.addEventListener("mousemove",(function(t){if(e.selectedTextRange&&e.selectedText.toString()){const o=e.textSelectionRect.getBoundingClientRect(),i=e.textSelectionRect.firstChild.getBoundingClientRect();t.clientX>=o.left&&t.clientX<=o.right&&t.clientY>=i.top&&t.clientY<=o.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),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 o=this.el.getBoundingClientRect();let i=Math.max(0,Math.min(100,(e-o.left)/o.width*100));this.filled.style.width=i+"%",this.thumb.style.left=i+"%",this._dragVal=this.min+(this.max-this.min)*(i/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 o=e.pages.length%2==0;const i=0===t;let s=o&&t===e.pages.length-1,n=!1;e.doublePage&&(o=e.backCover,s=o&&t===e.pages.length-1,n=!i&&!s);const a=!i&&t%2==1&&!s,r=!i&&t%2==0&&!s;let l=t+1;return e.doublePage&&(l=Math.ceil(t/2)+1),{isCover:i,isBackCover:s,isDouble:n,isLeft:a,isRight:r,pdfPageIndex:l}},renderPdfThumb(t,e,o,i,s,n){const a=document.createElement("canvas");return t.pdfDocument.getPage(e).then((t=>{const e=t.getViewport({scale:1}),r=o/e.height;let l=0,h=r*e.width;n&&(i||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 o=new URL(t,window.location.href);return o.searchParams.set("width",e),o.toString()}catch(e){return t}},resolveThumbUrl(t,e){if(!t)return null;if(t.thumb)return t.thumb;if(!t.src)return null;const o=Math.max(400,2*e);if(t._thumbUrlCache&&t._thumbUrlCache.width===o)return t._thumbUrlCache.url;const i=FLIPBOOK.ThumbUtils.getThumbSrc(t.src,o);return t._thumbUrlCache={width:o,url:i},i},createThumbImage(t,e,o,i,s){if(o.pdfMode)return FLIPBOOK.ThumbUtils.renderPdfThumb(s.pdfService,e.pdfPageIndex,i,e.isLeft,e.isRight,o.doublePage);const n=FLIPBOOK.ThumbUtils.resolveThumbUrl(t,i);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*i),a=Math.round(n*o.pageWidth/o.pageHeight);FLIPBOOK.captureHtmlPage(t,a,n,s).then((o=>{if(o)try{t._htmlThumbDataUrl=o.toDataURL("image/jpeg",.8),e.src=t._htmlThumbDataUrl}catch(t){}}))}return e}return null}},FLIPBOOK.captureHtmlPage=function(t,e,o,i,s){if(!t||!t.htmlContent)return Promise.resolve(null);return("undefined"!=typeof html2canvas?Promise.resolve():i&&"function"==typeof i.loadScript&&FLIPBOOK.html2canvasSrc?i.loadScript(FLIPBOOK.html2canvasSrc,"html2canvas"):Promise.reject(new Error("html2canvas not available"))).then((()=>{const i=document.createElement("div");if(i.style.cssText="position:fixed;left:-9999px;top:0;width:"+e+"px;height:"+o+"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 o=t.htmlContent.querySelectorAll("video"),s=e.querySelectorAll("video");for(let t=0;t<o.length;t++){const e=o[t],i=s[t];if(e.readyState>=2&&i){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=i.style.cssText,t.className=i.className,i.parentNode.replaceChild(t,i)}catch(t){}}}i.appendChild(e)}else i.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(i);const n=i.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(i,{useCORS:!0,allowTaint:!0,scale:s||1,width:e,height:o,backgroundColor:"#ffffff"}))).then((t=>(i.parentNode&&document.body.removeChild(i),t||null))).catch((()=>(i.parentNode&&document.body.removeChild(i),null)))}))},FLIPBOOK.Thumbnails=class{constructor(t){const e=t.options,o=t.wrapper;this.main=t,this.options=e,this.wrapper=o,this.active=null,this.thumbHolder=document.createElement("div"),this.thumbHolder.className="flipbook-thumbHolder flipbook-side-menu skin-color-bg flipbook-border",o.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 i=document.createElement("a");i.innerHTML='<div class="c-p skin-color flipbook-btn">'+e.strings.bookmarkCurrentPage+"</div>",this.bookmark.appendChild(i),i.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 o=0;o<e.pages.length;o++){const i=new FLIPBOOK.Thumbnail(o,p,c,t,e,this);i.el.instance=i,u.observe(i.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:o,backCover:i}=this.options;this.spreads=[];const s=e.length-(o?1:0)-(i?1:0);t=(o?1:0)+(i?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"),o&&0===e&&s.classList.add("flipbook-thumb-spread-cover"),i&&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 o=2*t,i=2*t+1;this.thumbs[o-1]?e.appendChild(this.thumbs[o-1]):e.appendChild(this.coverSpacer),this.thumbs[i-1]?e.appendChild(this.thumbs[i-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,o){return new Promise((i=>{t.findInPage(e,o,((t,e,o,s)=>{i({matches:t,htmlContent:e,index:o,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,o=e.pdfService;if(""!==t){const i=e.options;let s=0;if(this.hideAllThumbs(),this.clearSearchResults(),this.pagesFound=0,e.unmark(),e.searchingString=t,o){let s=0;for(let n=0;n<o.info.numPages&&t===e.searchingString;n++){if(e.isPdfPageLocked(n))continue;const{matches:a,index:r,pageText:l}=await this.findInPageAsync(o,t,n);if(a&&a.length>0){const o=0===this.pagesFound;this.pagesFound++,s+=a.length,e.mark(t),i.searchResultsThumbs?this.showThumb(r):this.showSearchResults(a.length,r,l,o)}}}else i.pagesOriginal.forEach(((o,n)=>{const a=n;i.cover||n++;let r=n;i.doublePage&&(r*=2),i.doublePage&&r===2*i.pagesOriginal.length-2&&r--,i.pages[r]&&i.pages[r].locked||e.loadPageHTML(r,(o=>{const i=new RegExp(e.searchingString.toUpperCase().replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),n=(o.innerText.toUpperCase().match(i)||[]).length;if(n>0){s+=n;const i=0==this.pagesFound;this.showSearchResults(n,a,o.innerText.substring(0,60)+"...",i),this.pagesFound++,e.mark(t)}}))}))}else this.hideAllThumbs(),this.clearSearchResults(),this.main.unmark(),this.main.searchingString=t,this.clearInput.classList.add("flipbook-hidden")}))}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,o,i){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">${o}</div>\n `,p.addEventListener("click",(t=>{t.stopPropagation(),t.preventDefault();const e=Number(p.dataset.page);s.goToPage(e)})),i&&(s.goToPage(d+1,!0),setTimeout((()=>{a.focus(),a.setSelectionRange(a.value.length,a.value.length)}),50),a.focus()),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 o=this.thumbs[t].querySelector(".thumb-btn-close");o&&o.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.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"),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 o=t[e];if(o){const t=this.getThumbIndexForPage(o);this.showThumb(t)}}}show(t){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.thumbHolder.addEventListener("transitionend",(()=>{this.thumbHolder.classList.remove("flipbook-thumbs-grid"),this.thumbHolder.classList.add("flipbook-hidden")}),{once:!0}),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],o=e.getAttribute("data-pages");if(!o)continue;const i=o.split(",");for(let t=0;t<i.length;t++){const o=Number(i[t]);Number.isFinite(o)&&this.thumbsByPage.set(o,e)}}}const t=this.prevActive||new Set,e=FLIPBOOK.ThumbUtils.parseCurrentPages(this.main);if(!e)return;const o=new Set([...t,...e]);for(const t of o){const o=this.thumbsByPage.get(t);if(!o)continue;const i=e.has(t);if(o.classList.toggle("flipbook-thumb-active",i),i){const t=o.closest(".flipbook-thumb-spread");if(t){t.querySelectorAll(".flipbook-thumb").forEach((t=>t.classList.add("flipbook-thumb-active")))}}}const i=this.thumbsScroller.querySelector(".flipbook-thumb-active");if(i){const t=this.thumbsWrapper,e=t.getBoundingClientRect(),o=i.getBoundingClientRect(),s=100,n=o.top-e.top-s,a=o.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,o,i,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=o+"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(),i.removeBookmark(a.getAttribute("data-thumb-index"))}));var h=i.createSVGIcon("close");h.classList.add("skin-color"),l.appendChild(h),n.thumbs.push(a),this.height=o,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 o=t.currentTarget.getAttribute("data-pages");if(o&&-1!==o.indexOf(",")){const t=o.split(","),i=Number(t[0]),n=Number(t[1]);e=s.rightToLeft?n:i}else e=Number(o||t.currentTarget.getAttribute("data-page"));(!Number.isFinite(e)||e<1)&&(e=1),i.goToPage(e),"search"!==n.active&&s.thumbsCloseOnClick&&i.toggleThumbs(!1)}))}load(){if(this.loaded)return;this.loaded=!0;const t=this.thumbs.options,e=t.pages[this.pageIndex],o=FLIPBOOK.ThumbUtils.getPageInfo(this.pageIndex,t),i=FLIPBOOK.ThumbUtils.createThumbImage(e,o,t,this.height,this.thumbs.main);i&&(this.el.appendChild(i),i.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 o=document.createElement("div");o.className="flipbook-thumb-strip-buttons",this.el.appendChild(o);const i=document.createElement("div");i.className="flipbook-thumb-strip-maximize",i.addEventListener("click",(e=>{e.stopPropagation(),t.maximizeThumbs()}));const s=t.createSVGIcon("chevronUp");i.appendChild(s),o.appendChild(i);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),o.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,o=p&&u===d-1,i=e||o,s=document.createElement("div");s.className="flipbook-thumb-strip-spread",e&&s.classList.add("flipbook-thumb-strip-spread-cover"),o&&s.classList.add("flipbook-thumb-strip-spread-back-cover"),this.spreadEls.push(s);const n=e=>{const o=document.createElement("div");o.className="flipbook-thumb-strip-thumb",o.style.aspectRatio=r,o._stripIndex=e,o.addEventListener("click",(()=>{t.goToPage(e+1)})),s.appendChild(o),this.thumbEls.push(o),h.observe(o)};i?(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,o,i){const s=this.options,n=s.pages[t],a=FLIPBOOK.ThumbUtils.getPageInfo(t,s),r=FLIPBOOK.ThumbUtils.createThumbImage(n,a,s,i,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 o=e+1;
1if(t.has(o)){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,o){this.context=t,this.options=o,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 i=document.createElement("div");i.className="flipbook-lightbox-toolbar",this.wrapper.appendChild(i),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.lightboxBackground&&(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"),t.addEventListener("transitionend",(()=>{t.contains(this.wrapper)&&t.removeChild(this.wrapper)}),{once:!0}),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,o=t.dataset.page;o&&FLIPBOOK.books[e].goToPage(Number(o));var i=t.dataset.url;i&&window.open(i,"_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(),o=t.from,i=t.to,s=t.duration,n=i-o,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?o+n*a(1-v):o+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(i),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.Linkify=function(t,e="_blank"){const o=/\b(?:https?:\/\/|ftp:\/\/|www\.|[A-Za-z0-9.-]+\.[A-Za-z]{2,6})(?:\/[^\s<>"']*)?/gi,i=/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}\b/gi,s=new Set(["a","script","style","textarea","code"]),n=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode(t){const e=t.parentNode.tagName?.toLowerCase();return s.has(e)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),a=[];for(;n.nextNode();)a.push(n.currentNode);a.forEach((t=>{const s=document.createDocumentFragment(),n=t.nodeValue;let a=0;const r=new RegExp(`${o.source}|${i.source}`,"ig");let l;for(;l=r.exec(n);){l.index>a&&s.appendChild(document.createTextNode(n.slice(a,l.index)));const t=l[0];let o;o=i.test(t)?`mailto:${t}`:/^(?:https?:\/\/|ftp:\/\/)/i.test(t)?t:(t.startsWith("www."),`http://${t}`);const h=document.createElement("a");h.href=o,h.target=e,h.className="flipbook-page-auto-link",h.textContent=t,s.appendChild(h),a=r.lastIndex}a<n.length&&s.appendChild(document.createTextNode(n.slice(a))),t.parentNode.replaceChild(s,t)}))},FLIPBOOK.extend=function(){function t(t){return"[object Object]"===Object.prototype.toString.call(t)}var e,o,i,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(o in e)if(Object.prototype.hasOwnProperty.call(e,o)){if(i=r[o],r===(s=e[o]))continue;
1d&&s&&(t(s)||(n=Array.isArray(s)))?(n?(n=!1,a=i&&Array.isArray(i)?i:[]):a=i&&t(i)?i:{},r[o]=FLIPBOOK.extend(d,a,s)):void 0!==s&&(r[o]=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(),o=this.tooltipEl.getBoundingClientRect(),i=this.wrapper.getBoundingClientRect();let s=e.top-i.top-o.height-10,n=e.left-i.left+(e.width-o.width)/2,a=!1,r=e.left-i.left+e.width/2-n;r=Math.max(6,Math.min(o.width-6,r)),s<0&&(s=e.bottom-i.top+10,a=!0),s+o.height>i.height&&(s=i.height-o.height-5),n<0&&(n=5,r=e.left-i.left+e.width/2-n,r=Math.max(6,Math.min(o.width-6,r))),n+o.width>i.width&&(n=i.width-o.width-5,r=e.left-i.left+e.width/2-n,r=Math.max(6,Math.min(o.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.