\").appendTo(\".bookmark\")[0];\n\t\tvar dataName = this.data.metadata.name;\n\n\n\t\tif (\n\t\t\tHFN.config.isMobile() &&\n\t\t\t!this.data.metadata.isfolder &&\n\t\t\tthis.data.metadata.audiolink &&\n\t\t\tthis.data.metadata.category === HFN.CATEGORY.AUDIO\n\t\t) {\n\t\t\t// Disable bookmark for one page mobile audio player\n\t\t\tbookmark.css({ display: \"none\" });\n\t\t} else {\n\t\t\tbookmark.css({ display: \"flex\" });\n\t\t}\n\n\t\tprc.EditBookmarkTooltip(node, {\n\t\t\tcode,\n\t\t\tname: dataName,\n\t\t\tlocationId: locationid,\n\t\t\tholderObject: document.createElement(\"div\")\n\t\t});\n\t},\n\t_setupLayout: function() {\n\t\tconsole.log(\"PUB data: \", this.data)\n\n\t\tvar self = this;\n\t\tvar hasBranding = Boolean(this.data.branding)\n\t\tvar layout = '#desktopLayout';\n\t\tvar headline = \"\";\n\t\tvar description = \"\";\n\t\tvar imageSrc = \"\";\n\t\tvar coverSrc = \"\";\n\t\tvar coverPosition = 0;\n\t\tvar coverSize = \"100%\";\n\t\tvar hideRibbon = this.data.ownerisbusiness || this.data.ownerispremium || hasBranding;\n\n\t\tif (!hideRibbon) {\n\t\t\tsetTimeout(function () {\n\t\t\t\t// Show promo modal and ribbon\n\t\t\t\tHFN.initShowPromoOffer();\n\t\t\t}, 500);\n\t\t}\n\n\t\t// var showBranding = this.data.branding;\n\n\t\tif (hasBranding && showBranding) {\n\t\t\theadline = this.data.branding.header;\n\t\t\tdescription = this.data.branding.description;\n\t\t\tvar hasLogo = Boolean(this.data.branding.logo1x);\n\t\t\tvar hasCover = Boolean(this.data.branding.coversmall);\n\t\t\tvar coverColor = hasBranding && this.data.branding.covercolor ? this.data.branding.covercolor : false;\n\t\t\tvar coverGradient = hasBranding && this.data.branding.covergradient ? this.data.branding.covergradient : false;\n\n\t\t\tif (hasLogo) {\n\t\t\t\tif ($.browser.mobile) {\n\t\t\t\t\tif (this.data.branding.logomobile) {\n\t\t\t\t\t\timageSrc = HFN.prepUrl(this.data.branding.logomobile);\n\t\t\t\t\t}\n\t\t\t\t} else if (window.devicePixelRatio > 1) {\n\t\t\t\t\timageSrc = HFN.prepUrl(this.data.branding.logo2x);\n\t\t\t\t} else {\n\t\t\t\t\timageSrc = HFN.prepUrl(this.data.branding.logo1x);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction initCoverData(data) {\n\t\t\t\tvar currentWidth = hasBranding && data.branding.coverwidth ? window.innerWidth : 1;\n\t\t\t\tvar originalWidth = data.branding.coverwidth || 1;\n\t\t\t\tvar coverOffset = hasBranding && data.branding.coveroffsety ? calcRelativeOffset(currentWidth, originalWidth, data.branding.coveroffsety) : 0;\n\t\t\t\tvar coverImageHeight;\n\t\t\t\tvar coverContainerHeight = $.browser.mobile ? 180 : 300;\n\t\t\t\tvar hasMobile = Boolean(data.branding.covermobile);\n\n\t\t\t\tif (hasMobile && ($.browser.mobile || window.screen.width <= 1080)) {\n\t\t\t\t\tcoverSrc = HFN.prepUrl(data.branding.covermobile);\n\t\t\t\t\tcoverImageHeight = calcCoverHeight(self.getBrandingImageSize(data.branding.covermobile, 'height'), self.getBrandingImageSize(data.branding.covermobile, 'width'));\n\t\t\t\t} else if (window.screen.width <= 1366 && data.branding.coversmall) {\n\t\t\t\t\tcoverSrc = HFN.prepUrl(data.branding.coversmall);\n\t\t\t\t\tcoverImageHeight = calcCoverHeight(self.getBrandingImageSize(data.branding.coversmall, 'height'), self.getBrandingImageSize(data.branding.coversmall, 'width'));\n\t\t\t\t} else if (window.screen.width > 1366) {\n\t\t\t\t\tlet cover = data.branding.coverbig || data.branding.coversmall;\n\t\t\t\t\tif (cover) {\n\t\t\t\t\t\tcoverSrc = HFN.prepUrl(cover);\n\t\t\t\t\t\tcoverImageHeight = calcCoverHeight(self.getBrandingImageSize(cover, 'height'), self.getBrandingImageSize(cover, 'width'));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (coverImageHeight) {\n\t\t\t\t\tcoverPosition = getCoverPosition(coverOffset, coverImageHeight, coverContainerHeight);\n\t\t\t\t\tcoverSize = getCoverSize(coverOffset, coverImageHeight, coverContainerHeight);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction repositionCover(coverSrc, coverPosition, coverSize) {\n\t\t\t\tif (!$.browser.mobile) {\n\t\t\t\t\t$('.branding-header').css({\n\t\t\t\t\t\t\"background-image\": \"url(\" + coverSrc + \")\",\n\t\t\t\t\t\t\"background-size\": coverSize,\n\t\t\t\t\t\t\"background-position\": coverPosition === \"bottom\" ? coverPosition : \"0px \" + coverPosition + \"px\"\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\t$('#branding .cover-photo').css({\n\t\t\t\t\t\t\"background-image\": \"url(\" + coverSrc + \")\",\n\t\t\t\t\t\t\"background-size\": coverSize,\n\t\t\t\t\t\t\"background-position\": coverPosition === \"bottom\" ? coverPosition : \"0px \" + coverPosition + \"px\"\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (hasCover) {\n\t\t\t\tvar data = this.data;\n\t\t\t\tinitCoverData(data);\n\t\t\t\t$( window ).resize(function() {\n\t\t\t\t\tinitCoverData(data);\n\t\t\t\t\trepositionCover(coverSrc, coverPosition, coverSize);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tif ($.browser.mobile) {\n\t\t\tlayout = '#mobileLayout';\n\t\t\t$('html').addClass('mobile');\n\t\t\t$('link.files').after('
');\n\t\t}\n\n\t\t$('html').addClass('dlink');\n\t\t$('#megawrap').empty();\n\n\t\ttry {\n\t\t\tthis.holder = HFN.renderTemplate(layout, {\n\t\t\t\theadline: headline,\n\t\t\t\tdescription: description,\n\t\t\t\timageSrc: imageSrc,\n\t\t\t\tpowered_by: __(\"powered_by\", \"Powered by pCloud\")\n\t\t\t}).appendTo('#megawrap').find('#dl_content');\n\t\t} catch (error) {\n\t\t\tconsole.error(\"Loading preview error\", error, error.message);\n\t\t}\n\n\t\twindow.addEventListener(\"error\", (error) => {\n\t\t\tconsole.error(\"THIS IS AN ERROR FROM EVENT LISTENER\", error, error.message);\n\t\t});\n\n\n\t\tconsole.log(\"title-image src:\", imageSrc)\n\t\tconsole.log(\"headline:\", headline)\n\t\tconsole.log(\"description:\", description)\n\n\t\tif (hasBranding && showBranding) {\n\t\t\tif (!imageSrc) {\n\t\t\t\t$('.branding-header .title-image').remove();\n\t\t\t} else {\n\t\t\t\tvar imgWidth = $.browser.mobile ? (this.getBrandingImageSize(this.data.branding.logomobile, 'width') / 2) : this.getBrandingImageSize(this.data.branding.logo1x, 'width');\n\t\t\t\tvar imgHeight = $.browser.mobile ? (this.getBrandingImageSize(this.data.branding.logomobile, 'height') / 2) : this.getBrandingImageSize(this.data.branding.logo1x, 'height');\n\n\t\t\t\tif ($.browser.mobile && imgWidth > 300) {\n\t\t\t\t\tvar imgWidthMobile = $(\".branding-header\").width();\n\t\t\t\t\tvar imgHeightMobile = imgHeight / (imgWidth / imgWidthMobile);\n\t\t\t\t\t$('.branding-header .title-image').css({\n\t\t\t\t\t\t\"width\": imgWidthMobile + \"px\",\n\t\t\t\t\t\t\"height\": imgHeightMobile,\n\t\t\t\t\t\t\"max-width\": imgWidth,\n\t\t\t\t\t\t\"max-height\": imgHeight,\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\t$('.branding-header .title-image').css({\n\t\t\t\t\t\t\"width\": imgWidth,\n\t\t\t\t\t\t\"height\": imgHeight,\n\t\t\t\t\t\t\"border\": \"3px solid #fff\",\n\t\t\t\t\t\t\"border-radius\": \"3px\"\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!$.browser.mobile) {\n\t\t\t\t$(\".branding-header\").css({\n\t\t\t\t\t\"height\": 300,\n\t\t\t\t\t\"box-sizing\": \"border-box\"\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (coverSrc && !$.browser.mobile) {\n\t\t\t\t$('.branding-header').css({\n\t\t\t\t\t\"background-image\": \"url(\" + coverSrc + \")\",\n\t\t\t\t\t\"background-size\": coverSize,\n\t\t\t\t\t\"background-repeat\": \"no-repeat\",\n\t\t\t\t\t\"background-position\": coverPosition === \"bottom\" ? coverPosition : \"0px \" + coverPosition + \"px\"\n\t\t\t\t});\n\t\t\t\t$('.branding-header .texts').css({\n\t\t\t\t\tcolor: \"#fff\"\n\t\t\t\t})\n\n\t\t\t\tif (headline || description) {\n\t\t\t\t\t$('.branding-header .gradient-bg').css({\n\t\t\t\t\t\tdisplay: \"inline-block\"\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\tif (!imageSrc) {\n\t\t\t\t\t$('.branding-header .texts').css({\n\t\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\t\tleft: \"0px\",\n\t\t\t\t\t\tbottom: \"36px\"\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t} else if (coverSrc && $.browser.mobile) {\n\t\t\t\t$(\".branding-header\").css({\n\t\t\t\t\t\"height\": \"initial\"\n\t\t\t\t});\n\n\t\t\t\t$('#branding .cover-photo').css({\n\t\t\t\t\t\"display\": \"inline-block\",\n\t\t\t\t\t\"background-image\": \"url(\" + coverSrc + \")\",\n\t\t\t\t\t\"background-size\": coverSize,\n\t\t\t\t\t\"background-repeat\": \"no-repeat\",\n\t\t\t\t\t\"background-position\": coverPosition === \"bottom\" ? coverPosition : \"0px \" + coverPosition + \"px\"\n\t\t\t\t});\n\n\t\t\t\tif (imageSrc) {\n\t\t\t\t\t$(\".branding-header\").css({\n\t\t\t\t\t\t\"padding-top\": \"120px\",\n\t\t\t\t\t\t\"min-height\": \"180px\"\n\t\t\t\t\t})\n\t\t\t\t} else {\n\t\t\t\t\t$(\".branding-header\").css({\n\t\t\t\t\t\t\"padding-top\": $('#branding .cover-photo').outerHeight()\n\t\t\t\t\t})\n\t\t\t\t\t$(\".branding-header .texts\").css({\n\t\t\t\t\t\t\"margin-top\": \"30px\"\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t} else if ((coverColor || coverGradient)&& !$.browser.mobile) {\n\t\t\t\tif (coverColor) {\n\t\t\t\t\t$('.branding-header').css({\n\t\t\t\t\t\t\"background-color\": \"#\" + coverColor\n\t\t\t\t\t});\n\t\t\t\t} else if (coverGradient) {\n\t\t\t\t\tcoverGradient = coverGradient.split(\",\");\n\t\t\t\t\t$('.branding-header').css({\n\t\t\t\t\t\t\"background\": \"linear-gradient(to right, #\" + coverGradient[0] + \", #\" + coverGradient[1] + \")\"\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t$('.branding-header .texts').css({\n\t\t\t\t\tcolor: \"#fff\"\n\t\t\t\t})\n\n\t\t\t} else if ((coverColor || coverGradient) && $.browser.mobile) {\n\t\t\t\tif (imageSrc) {\n\t\t\t\t\tif (coverColor) {\n\t\t\t\t\t\t$('.cover-photo').css({\n\t\t\t\t\t\t\t\"display\": \"inline-block\",\n\t\t\t\t\t\t\t\"background-color\": \"#\" + coverColor\n\t\t\t\t\t\t});\n\t\t\t\t\t} else if (coverGradient) {\n\t\t\t\t\t\tcoverGradient = coverGradient.split(\",\");\n\t\t\t\t\t\t$('.cover-photo').css({\n\t\t\t\t\t\t\t\"display\": \"inline-block\",\n\t\t\t\t\t\t\t\"background\": \"linear-gradient(to right, #\" + coverGradient[0] + \", #\" + coverGradient[1] + \")\"\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\t$(\".branding-header\").css({\n\t\t\t\t\t\t\"padding-top\": \"120px\",\n\t\t\t\t\t\t\"min-height\": \"180px\"\n\t\t\t\t\t})\n\t\t\t\t} else {\n\t\t\t\t\tif (coverColor) {\n\t\t\t\t\t\t$(\".branding-header\").css({\n\t\t\t\t\t\t\t\"background-color\": \"#\" + coverColor\n\t\t\t\t\t\t})\n\t\t\t\t\t} else if (coverGradient) {\n\t\t\t\t\t\tcoverGradient = coverGradient.split(\",\");\n\t\t\t\t\t\t$('.branding-header').css({\n\t\t\t\t\t\t\t\"background\": \"linear-gradient(to right, #\" + coverGradient[0] + \", #\" + coverGradient[1] + \")\"\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\t$('.branding-header .texts').css({\n\t\t\t\t\t\tcolor: \"#fff\"\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t} else if (!(coverColor || coverSrc || coverGradient) && $.browser.mobile && (headline || description)) {\n\t\t\t\t$(\".branding-header\").css({\n\t\t\t\t\t\"height\": \"initial\"\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (!headline) {\n\t\t\t\t$('.branding-header .headline').remove();\n\t\t\t} else {\n\t\t\t\tif ($.browser.mobile) {\n\t\t\t\t\t$('.branding-header .title-image').css({ \"margin-bottom\": \"26px\" });\n\t\t\t\t} else {\n\t\t\t\t\t$('.branding-header .title-image').css({ \"margin-bottom\": \"36px\" });\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (imageSrc && !headline && description) {\n\t\t\t\t$('.branding-header .title-image').css({ \"margin-bottom\": \"36px\" });\n\t\t\t}\n\n\t\t\tif (!description) {\n\t\t\t\t$('.branding-header .description').remove();\n\t\t\t} else {\n\t\t\t\t$('.branding-header .headline').css({ \"margin-bottom\": \"8px\" });\n\t\t\t}\n\n\t\t\t$(\"#basic\").remove();\n\t\t\t$(\"#branding > .header-wrap\").css({\n\t\t\t\tposition: \"absolute\",\n\t\t\t\ttop: $(\".branding-header\").outerHeight()\n\t\t\t});\n\n\t\t\tvar header = $(\"#branding > .header-wrap\").offset().top;\n\n\t\t\t$(window).scroll(function() {\n\t\t\t\t//close dropdown menu\n\t\t\t\tdropDown.close();\n\n\t\t\t\tvar currentScroll = $(window).scrollTop();\n\n\t\t\t\tif (currentScroll >= header) {\n\t\t\t\t\t$(\"#branding > .header-wrap\").css({\n\t\t\t\t\t\tposition: \"fixed\",\n\t\t\t\t\t\ttop: \"0\",\n\t\t\t\t\t\tleft: \"0\"\n\t\t\t\t\t});\n\t\t\t\t\t$(\".dl-sidebar\").css({\n\t\t\t\t\t\ttop: $(\".header-wrap\").outerHeight() + $(\".headerunder\").outerHeight()\n\t\t\t\t\t})\n\t\n\t\t\t\t} else {\n\t\t\t\t\t$(\"#branding > .header-wrap\").css({\n\t\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\t\ttop: $(\".branding-header\").outerHeight()\n\t\t\t\t\t});\n\n\t\t\t\t\t$(\".dl-sidebar\").css({\n\t\t\t\t\t\ttop: $(\".branding-header\").outerHeight() + $(\".header-wrap\").outerHeight()\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t})\n\t\t} else {\n\t\t\tif (!showBranding) {\n\t\t\t\t$(\"#basic\").remove();\n\t\t\t\t$(\"#branding > .branding-header\").css({\n\t\t\t\t\tdisplay: \"none\"\n\t\t\t\t})\n\t\t\t\t$(\"#branding > .header-wrap\").css({\n\t\t\t\t\tposition: \"absolute\"\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\t$(\"#branding\").remove();\n\t\t\t}\n\t\t}\n\n\t\t$(\".logo-place\").find(\"a\").prop(\"href\", URLMY);\n\n\t\t// Add bookmark\n\t\t// Bookmark is now inited in initUser\n\n\t\t// Add services button\n\n\t\tthis.addDesktopButton(this.getServicesButton());\n\t},\n\n\t_go: function(view) {\n\t\tvar self = this;\n\n\t\tif (view) {\n\t\t\tthis._view = view;\n\t\t} else {\n\t\t\tthis._view = this._template();\n\t\t}\n\n\t\t\tconsole.log(views);\n\t\t\tconsole.log(this._view);\n\n\t\tviews[this._view](this.data, this.holder);\n\t\tthis._postView();\n\n\t\t//this.yellowLine.show();\n\t\tads2016.show(this.data);\n\t\t// this.initSidebar();\n\n\t\tsetcookie(\"refcode\", this.code, 0.83);\n\t\tsetcookie(\"publinkcode\", this.code, 0.83);\n\n\t\t/*\n\t\tthis.ads2016.willShowAd(function(showAd) {\n\t\t\tif (!showAd) {\n\t\t\t\tself.inviteToLogin();\n\t\t\t}\n\t\t});\n\t\t*/\n\t},\n\n\t_template: function() {\n\t\tvar view = 'generic';\n\t\tvar data = this.data;\n\t\tvar meta = data.metadata;\n\t\tvar viewCategoryMap = {};\n\t\tvar blobid;\n\n\t\tviewCategoryMap[CATEGORY.IMAGE] = 'image';\n\t\tviewCategoryMap[CATEGORY.VIDEO] = 'video';\n\t\tviewCategoryMap[CATEGORY.AUDIO] = 'audio';\n\t\tviewCategoryMap[CATEGORY.DOCUMENT] = 'documentview';\n\n\t\t// hide/show document preview for mobile\n\t\t// if ($.browser.mobile)\n\t\t// \tdelete viewCategoryMap[CATEGORY.DOCUMENT];\n\n\t\tconsole.log('data', data);\n\n\t\tif (data.result === 4008) {\n\t\t\tdata.error = __(\"error_4008\", \"You can't access the content of this link temporarily. Try again later\");\n\t\t}\n\n\t\tif (data.error) {\n\t\t\tif ([2258, 1125].indexOf(data.result) != -1) {\n\t\t\t\tview = 'password';\n\t\t\t} else {\n\t\t\t\tview = 'error';\n\t\t\t}\n\t\t} else if (data.overtraffic) {\n\t\t\tview = 'overtraffic';\n\t\t} else if (meta.isfolder) {\n\t\t\tview = 'folder';\n\t\t} else if (meta.category in viewCategoryMap) {\n\t\t\tview = viewCategoryMap[meta.category];\n\t\t}\n\n\t\tif (view === \"documentview\" && !HFN.docPreview.canPreview(meta) && fileext(meta.name).toLowerCase() !== \"pdf\") {\n\t\t view = \"generic\";\n\t\t}\n\n\t\tif (isAsia() && isVideo(view) && data.showads) {\n\t\t\tview = 'overtraffic';\n\t\t}\n\n\t\treturn view;\n\t},\n\n\tgo: function(view) {\n\t\tthis._setupLayout();\n\t\tthis._compat();\n\t\tthis._go(view);\n\t},\n\n\tgetDownloadButton: function() {\n\t\tvar self = this;\n\t\treturn HFN.renderTemplate('#downloadButton')\n\t\t\t.on('click', this._actionDownloadFile.bind(this));\n\t},\n\n\t_postView: function() {\n\t\tvar isCopynow = $.deparam.querystring().copynow;\n\t\tvar self = this;\n\n\t\tif (isCopynow) {\n\t\t\tself.getUser(function(user) {\n\t\t\t\tself._actionCopyToCloud();\n\t\t\t});\n\t\t} else {\n\t\t\tthis._gaEvent('show');\n\t\t}\n\n\t\tif ($.browser.mobile && this._view === \"documentview\") {\n\t\t\t$(\"footer\").hide();\n\t\t}\n\n\t\tvar isPDF = this.data && this.data.metadata && this.data.metadata.category === CATEGORY.DOCUMENT && fileext(this.data.metadata.name).toLowerCase() === \"pdf\";\n\n\t\tif (canShowOpenInApp() && isSameLocation() && this.data.candownload && !isPDF) {\n\t\t\topenInApp(this.code);\n\t\t}\n\t},\n\n\t_isManyPhotos: function(meta) {\n\t\tvar cnt = 0;\n\t\tvar n = 0;\n\t\tvar eachFile = function eachFile(meta) {\n\t\t\tif (meta.category == HFN.CATEGORY.IMAGE)\n\t\t\t\tcnt++;\n\t\t\tn++;\n\n\t\t\tif (meta.isfolder) {\n\t\t\t\tfor (var i = 0; i < meta.contents.length; ++i) {\n\t\t\t\t\teachFile(meta.contents[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\teachFile(meta);\n\t\tn--;\n\n\t\treturn cnt > n / 2;\n\t},\n\n\t_gaEvent: function (type) {\n\t\tvar eventCategory = (config.isMobile() ? 'Mobile' : 'Desktop') + ' DLink ';\n\t\tvar view = this._view;\n\t\tvar data = this.data;\n\t\tvar meta = data.metadata;\n\n\t\tif (this._isManyPhotos(meta)) {\n\t\t\tview = 'photos';\n\t\t}\n\n\t\tif (view == 'overtraffic') {\n\t\t\tview = view + ' - ' + (data.ownerispremium ? 'premium' : 'free');\n\t\t}\n\t},\n\n\tgetDisabledDownloadButton: function () {\n\t\treturn this.getDownloadButton().off('click').addClass('disabled');\n\t},\n\n\tgetSaveButton: function() {\n\t\tvar self = this, meta = this.data.metadata;\n\t\treturn HFN.renderTemplate('#saveButton')\n\t\t\t.on('click', this._actionCopyToCloud.bind(this));\n\t},\n\n\t_actionCopyToCloud: function (data, modalContainer) {\n\t if (!data) {\n\t\t data = this.data\n\t }\n\t\tvar dLinkMeta = HFN.dLink.data.metadata;\n\t\t\n\t\tvar meta = data.metadata || data.metaData;\n\t\tif (dLinkMeta) {\n\t\t\tmeta = dLinkMeta;\n\t\t}\n\t\t\n\t\tvar self = this;\n\t\tvar refId = 558;\n\t\tvar clearAfterMe = function () { fs.reset(); };\n\t\tvar copy = function () {\n\t\t\tif (typeof gtag === \"function\") {\n\t\t\t\tgtag(\"event\", \"shared_link_click\", {\n\t\t\t\t\taction: \"save to pCloud\",\n\t\t\t\t\tlocation: \"header\",\n\t\t\t\t\tuser: HFN.config.auth ? 1 : 0\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tif (meta && meta.ismine) {\n\t\t\t\tHFN.message(__('File or folder already exists.'), 'error');\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (!HFN.config.user.emailverified && data.overtraffic) {\n\t\t\t\tHFN.message(__('verify_account_check_email_info', 'You need verified account for this action. Check your e-mail for more info.'), 'error');\n\t\t\t\tself.sendVerifyMail();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconsole.log('calling copyToCloud: code, linkpassword, meta', code, data.linkpassword, meta);\n\n\t\t\tHFN.copyToCloud({\n\t\t\t\tcode: code,\n\t\t\t\tlinkpassword: data.linkpassword,\n\t\t\t\ttoCopy: meta,\n\t\t\t\tonDone: function () {}\n\t\t\t}, modalContainer);\n\t\t}\n\n\t\tif (HFN.config.auth) {\n\t\t\tcopy();\n\t\t} else {\n\t\t\tif (this._view == 'overtraffic') {\n\t\t\t\trefId = 564;\n\t\t\t}\n\n\t\t\tsetcookie('ref', refId, 0);\n\n\t\t\tif (this._view == 'overtraffic') {\n\t\t\t\tlocation.href =\n\t\t\t\t\t'https://www.pcloud.com/cloud-storage-pricing-plans.html?custombox=on&returnurl=' +\n\t\t\t\t\tencodeURIComponent(this._location() + '©now=1') +\n\t\t\t\t\t'&ref=' + refId;\n\t\t\t} else {\n\t\t\t\tHFN.initSaveFileLoginRegModal(copy, modalContainer);\n\t\t\t\t//HFN.initSurpriseLoginRegModal('register', copy);\n\t\t\t}\n\t\t}\n\t},\n\n\tpremiumOnlyUrl: function(url) {\n\n\t},\n\n\tsendVerifyMail: function () {\n\t\tif (rcookie('_verifymail')) {\n\t\t\treturn;\n\t\t}\n\n\t\tHFN.apiMethod('sendverificationemail', {}, function() {}, { errorCallback: function() {} });\n\t\tsetcookie('_verifymail', 1, 0);\n\t},\n\tgetDownloadHeaderButton: function (outheader) {\n\t\tvar self = this;\n\t\tvar meta = this.data.metadata;\n\t\tvar btn;\n\t\tvar actions;\n\t\tvar options;\n\n\t\toptions = {\n\t\t\tholderClass: 'mn-share'\n\t\t}\n\n\t\tif (outheader) {\n\t\t\toptions.holderClass = 'mn-share';\n\t\t}\n\n\t\tbtn = $('
')\n\t\t\t.text(__('Download', 'Download'))\n\t\t\t.addClass(\"download_button\")\n\n\t\tactions = [\n\t\t\t[meta.isfolder ? __('save_to_device_zip', 'Download as ZIP') : __('direct_download', 'Direct download'), '', false, \"download\", { action: 'download', subtext: __('save_to_device_zip_description', 'Save directly to your device')}]\n\t\t];\n\t\tif (isSameLocation()) {\n\t\t\tactions.unshift([__('save_to_pcloud', 'Save to pCloud'), '', false, \"save-to-pcloud\", { action: 'save', subtext: __('save_to_pcloud_description', 'Save directly to pCloud for free') }])\n\t\t}\n\n\t\tdropDown.bindList(actions, btn, {\n\t\t\tdirection: dropDown.DIR_LEFT,\n\t\t\teventTrigger: 'click',\n\t\t\teventClose: 'click',\n\t\t\tposition: 'fixed',\n\t\t\tshowTip: true,\n\t\t\tholderClass: options.holderClass,\n\t\t\toverwriteTip: {\n\t\t\t\tright: 9\n\t\t\t},\n\t\t\tbuildCell: function (item, el) {\n\t\t\t\tif (item[3] === 'save-to-pcloud' && !isSameLocation()) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconsole.log(\"DOWNLOAD ITEM\", item, dropDown.N_SUB);\n\t\t var a = $('')\n\t\t .attr('href', 'javascript:void(0);')\n\t\t .attr('data-action', item[4].action)\n\t\t .append(\n\t\t $('
')\n\t\t\t\t\t\t\t//.append('
'\n\t\t\t\t\t\t\t.append(\n\t\t\t\t\t\t\t\t$('')\n\t\t\t\t\t\t\t\t\t.append($('').text(item[dropDown.N_TEXT] + ( item[dropDown.N_SUB] && 0 ? ' (sub)': '' ) ))\n\t\t\t\t\t\t\t\t\t.append($('').text(item[4].subtext))\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t.append('')\n\t\t )\n\t\t .on('click', function (e) {\n\t\t \te.preventDefault();\n\t\t\t\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\t\t\t\tif ($(this).data(\"action\") == \"download\") {\n\t\t\t\t\t\t\t\t\t\tself._actionDownloadFile();\n\t\t\t\t\t\t\t\t\t} else if ($(this).data(\"action\") == \"save\") {\n\t\t\t\t\t\t\t\t\t\tself._actionCopyToCloud();\n\t\t\t\t\t\t\t\t\t}\n\n\t\t \tdropDown.resetTo(0);\n\t\t })\n\t\t .appendTo(el);\n\n\t\t return a;\n\t\t\t}\n\t\t});\n\n\t\treturn btn;\n\t},\n\n\tgetShareHeaderIcon: function () {\n\t\tvar self = this;\n\t\tvar icon;\n\t\tvar actions;\n\t\tvar list;\n\n\t\ticon = $('
')\n\t\t\t.text(__(\"Share\"))\n\t\t\t.addClass(\"share_button\")\n\n\t\tlist = [\n\t\t\t//['fb', 'Facebook'],\n\t\t\t//['tw', 'Twitter'],\n\t\t\t//['gp', 'Google Plus']\n\t\t\t['fb', '
Facebook
'],\n\t\t\t['tw', '
Twitter
'],\n\t\t];\n\n\t\tif (copySupported()) {\n\t\t\t//list.unshift(['copy', __('Copy link')]);\n\t\t\tlist.unshift(['copy', '
'+i18n.get('Copy link')+'
'+'
']);\n\t\t\tattachCopy('.sharer-copy', this._location(), function (e) {\n\t\t\t\tHFN.message(__('Link copied.'));\n\t\t\t});\n\t\t}\n\n\t\tdropDown.bindList(list, icon, {\n\t\t\tdirection: dropDown.DIR_LEFT,\n\t\t\tchildDirection: dropDown.DIR_LEFT,\n\t\t\teventTrigger: 'click',\n\t\t\teventClose: 'click',\n\t\t\tposition: 'fixed',\n\t\t\tholderClass: 'mnnew share',\n\t\t\tshowTip: true,\n\t\t\tholderClass: 'mn-share',\n\t\t\toverwriteTip: {\n\t\t\t\tright: 8\n\t\t\t},\n\t\t\tbuildHolder: function (obj) {\n\t\t\t\t// obj/*.addClass('mn-blue')*/.css('z-index', 101);\n\t\t\t},\n\t\t\tbuildCell: function (item, el) {\n\n\t\t\t\tvar litem = $('
'+item[1]+'')\n\t\t\t\t\t.on('click', function(e){\n\t\t\t\t\t\tconsole.log(item[0]);\n\t\t\t\t\t\tconsole.log('ccc', e);\n\t\t\t\t\t\tif (typeof gtag === \"function\") {\n\t\t\t\t\t\t\tif (item[0] == 'copy') {\n\t\t\t\t\t\t\t\tgtag(\"event\", \"shared_link_click\", {\n\t\t\t\t\t\t\t\t\taction: \"copy link\",\n\t\t\t\t\t\t\t\t\tcategory: \"share\",\n\t\t\t\t\t\t\t\t\ttype: \"copy\",\n\t\t\t\t\t\t\t\t\tlocation: \"header\",\n\t\t\t\t\t\t\t\t\tuser: HFN.config.auth ? 1 : 0\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t} else if (item[0] == 'fb') {\n\t\t\t\t\t\t\t\tgtag(\"event\", \"shared_link_click\", {\n\t\t\t\t\t\t\t\t\taction: `initaite facebook share`,\n\t\t\t\t\t\t\t\t\tcategory: \"share\",\n\t\t\t\t\t\t\t\t\ttype: \"social share\",\n\t\t\t\t\t\t\t\t\tlocation: \"header\",\n\t\t\t\t\t\t\t\t\tuser: HFN.config.auth ? 1 : 0\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t} else if (item[0] == 'tw') {\n\t\t\t\t\t\t\t\tgtag(\"event\", \"shared_link_click\", {\n\t\t\t\t\t\t\t\t\taction: `initaite twitter share`,\n\t\t\t\t\t\t\t\t\tcategory: \"share\",\n\t\t\t\t\t\t\t\t\ttype: \"social share\",\n\t\t\t\t\t\t\t\t\tlocation: \"header\",\n\t\t\t\t\t\t\t\t\tuser: HFN.config.auth ? 1 : 0\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (item[0] == 'copy') {\n\t\t\t\t\t\t\tdropDown.resetTo(0);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// share\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\t\tself.desktopShare(item[0]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}).appendTo(el);\n\n\t\t\t\t/*\n\t\t\t\tif (item[0] == 'copy') {\n\t\t\t\t\t$('#sharer-cp').zclip({\n\t\t\t\t\t\tpath: '/swf/ZeroClipboard.swf',\n\t\t\t\t\t\tcopy: \"https://\" + window.location.host + window.location.pathname + \"?code=\" + self.code\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t*/\n\n\t\t\t\treturn litem;\n\t\t\t}\n\t\t});\n\n\t\treturn icon;\n\t},\n\n\tgetServicesButton: function () {\n\t\tvar wrapper = $('
');\n\t\tprc.PCloudServicesDropdown(wrapper[0], {});\n\t\treturn wrapper;\n\t},\n\n\taddDesktopButton: function (button) {\n\t\t$('.header .header-links').prepend(button);\n\t},\n\n\tgetMobileSaveButton: function () {\n\t\tvar self = this, meta = this.data.metadata;\n\t\treturn HFN.renderTemplate('#saveButton')\n\t\t\t.on('click', this._actionCopyToCloud.bind(this));\n\t},\n\n\tgetDesktopButtons: function() {\n\t\treturn [this.getSaveButton(), this.getDownloadButton()];\n\t},\n\n\tclearMobileButtons: function () {\n\t\t$('.header .buttons').empty();\n\t},\n\n\taddMobileButton: function(button) {\n\t\t$('.header .buttons').append(button);\n\t},\n\n\taddHeaderFilename: function(value) {\n\t\t$('.header .name-wrapper .filename').text(value);\n\t},\n\n\t_initiateLogin: function() {\n\t\tif ($.browser.mobile) {\n\t\t\tlocation.href =\n\t\t\t\t'/#page=login' +\n\t\t\t\t'&memo=' + encodeURIComponent('Login to save') +\n\t\t\t\t'&returl='+ encodeURIComponent(this._location() + '©now=1');\n\t\t} else {\n\n\t\t}\n\t},\n\n\t_actionDownloadFile: function(data) {\n\t \tif (!data) {\n\t\t\t data = this.data;\n\t\t}\n\t\tvar self = this;\n\t\tvar isLogged = HFN.config.auth;\n\t\tvar isOwnerPremium = data.ownerispremium;\n\t\tvar isOwnerBusiness = data.ownerisbusiness;\n\n if (typeof gtag === \"function\") {\n gtag(\"event\", \"shared_link_click\", {\n action: \"download\",\n location: \"header\",\n type: \"archive\",\n user: HFN.config.auth ? 1 : 0\n })\n }\n\n\t\tif (isOwnerPremium) {\n\t\t\tHFN.initShowDownloadLinkModal();\n\t\t} else if (!isLogged && !isOwnerPremium && !isOwnerBusiness) {\n\t\t\tHFN.initDownloadZipLoginRegModal();\n\t\t}\n\n\t\t/*\n\t\tif (!HFN.config.auth && $.browser.android) {\n\t\t\tthis.ads.showAd(this.data);\n\t\t}\n\t\t*/\n\n\t\tif ($.browser.mobile)\n\t\t\tlocation.href = self.data.downloadlink;\n\t\telse\n\t\t\twindow.open(self.data.downloadlink);\n\t},\n\n\t_actionSheetDownloadItems: function(data) {\n\t\tvar meta = data ? data : this.data.metadata;\n\t\tvar actions = [];\n\n\t\tif (isSameLocation()) {\n\t\t\tactions.push({\n\t\t\t\taction: 'savetopcloud',\n\t\t\t\ttitle: __('save_to_pcloud', 'Save to pCloud'),\n\t\t\t\tsubtext: __('save_to_pcloud_description'),\n\t\t\t\ticon: 'icon-save',\n\t\t\t\tactive: true\n\t\t\t});\n\t\t}\n\n\t\tactions.push({\n\t\t\taction: 'download',\n\t\t\ttitle: meta.isfolder ? __('save_to_mob_device_zip', 'Save to Device as ZIP') : __('save_to_device', 'Save to Device'),\n\t\t\tsubtext: __('save_to_device_zip_description'),\n\t\t\ticon: 'icon-dwl',\n\t\t\tactive: true\n\t\t});\n\n\t\treturn actions;\n\t},\n\n\tcreateDownloadButtonMobile: function (data) {\n\t \tif (!data) {\n\t\t\tdata = this.data;\n\t\t}\n\t\tvar self = this;\n\t\tvar shareBtn = $('
');\n\t\tvar meta = data.metadata;\n\t\tvar shareBtn;\n\n\t \tactionSheet.setup({\n\t\t el: shareBtn,\n\t\t actionTitle: meta.isfolder && 0 ? __('save_folder_zip', 'Save folder as ZIP') : false,\n\t\t items: this._actionSheetDownloadItems(),\n\t\t onClick: function (item) {\n\t\t\t\t\tif (item.action == 'savetopcloud') {\n\t\t\t\t\t\tself._actionCopyToCloud();\n\t\t\t\t\t} else if (item.action == 'download' && item.active) {\n\t\t\t\t\t\tself._actionDownloadFile();\n\t\t\t\t\t}\n\n\t\t\t\t\tactionSheet.closeAll();\n\t\t },\n\t\t buildItem: function (item, obj) {\n\t\t\t\t\t// item.append($('
').text(obj.title));\n\n\t\t\t\t\titem.append(\n\t\t\t\t\t\t$('
')\n\t\t\t\t\t\t\t.append($('
').text(obj.title))\n\t\t\t\t\t\t\t.append($('
').text(obj.subtext))\n\t\t\t\t\t)\n\t\t\t\t\t.addClass(\"download-mobile-sheet\");\n\n\t\t\t\t\tif (!obj.isaction && !obj.iscancel) {\n \t\t\t\t\t\titem.append($('
').addClass(obj.icon));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (obj.active != undefined && !obj.active) {\n\t\t\t\t\t\titem.addClass('inactive');\n\t\t\t\t\t}\n\n\t\t\t\t\t/*\n\t\t\t\t\tif (obj.action === \"savetopcloud\") {\n\t\t\t\t\t\titem.find(\".title\").remove();\n\t\t\t\t\t\titem.append(\n\t\t\t\t\t\t\t$(\"
\")\n\t\t\t\t\t\t\t\t.addClass(\"title\")\n\t\t\t\t\t\t\t\t.attr(\"href\", \"https://www.pcloud.com/app-save.html?code=\" + self.code)\n\t\t\t\t\t\t\t\t.text(obj.title)\n\t\t\t\t\t\t\t\t.on(\"click\", function(e) {\n\t\t\t\t\t\t\t\t\t//e.stopPropagation();\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t).on(\"click\", function(e) {\n\n\t\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\t*/\n\t\t\t\t}\n\t\t});\n\t\treturn shareBtn;\n\t},\n\n\tcreateUploadButtonMobile: function () {\n\t\tvar self = this;\n\t\tvar uploadBtn = $('
');\n\t\tvar data = self.data;\n\t\tuploadBtn.off('click').on('click', function() {\n\t\t\thandleDisabledInfoModals(HFN.uploadControl.uploadFileFromCustomButton);\n\t\t})\n\t\treturn uploadBtn;\n\t},\n\n\tcreateShareButtonMobile: function () {\n\t\tvar self = this;\n\t\tvar shareButton = $('
');\n\t\tvar items = [{\n\t\t\tact: 'copy',\n\t\t\tanalytics: \"copy\",\n\t\t\ttitle: __('Copy link', 'Copy Link'),\n\t\t\ticon: 'icon-copy'\n\t\t}];\n\n\t\tif (navigator.userActivation && typeof navigator.share === 'function') {\n\t\t\titems.unshift({\n\t\t\t\tact: 'share',\n\t\t\t\tanalytics: \"share\",\n\t\t\t\ttitle: __('Share', 'Share'),\n\t\t\t\ticon: 'icon-share'\n\t\t\t});\n\t\t} else {\n\t\t\titems.push({\n\t\t\t\tact: 'fb',\n\t\t\t\tanalytics: \"facebook\",\n\t\t\t\ttitle: __('Share on Facebook', 'Share on Facebook'),\n\t\t\t\ticon: 'icon-fb'\n\t\t\t});\n\t\t\titems.push({\n\t\t\t\tact: 'tw',\n\t\t\t\tanalytics: \"twitter\",\n\t\t\t\ttitle: __('Share on Twitter', 'Share on Twitter'),\n\t\t\t\ticon: 'icon-tw'\n\t\t\t});\n\t\t}\n\n\t\tactionSheet.setup({\n\t\t\tel: shareButton,\n\t\t\tonClick: function (item) {\n\t\t\t\tif (item.act === \"share\" && typeof gtag === \"function\") {\n\t\t\t\t\tgtag(\"event\", \"shared_link_click\", {\n\t\t\t\t\t\taction: \"initiate mobile share\",\n\t\t\t\t\t\tcategory: \"share\",\n\t\t\t\t\t\ttype: \"mobile share\",\n\t\t\t\t\t\tlocation: \"header\",\n\t\t\t\t\t\tuser: HFN.config.auth ? 1 : 0\n\t\t\t\t\t})\n\t\t\t\t} else if (item.act === \"copy\" && typeof gtag === \"function\") {\n\t\t\t\t\tgtag(\"event\", \"shared_link_click\", {\n\t\t\t\t\t\taction: \"copy link\",\n\t\t\t\t\t\tcategory: \"share\",\n\t\t\t\t\t\ttype: \"copy\",\n\t\t\t\t\t\tlocation: \"header\",\n\t\t\t\t\t\tuser: HFN.config.auth ? 1 : 0\n\t\t\t\t\t})\n\t\t\t\t} else {\n\t\t\t\t\tgtag(\"event\", \"shared_link_click\", {\n\t\t\t\t\t\taction: `initaite ${item.analytics} share`,\n\t\t\t\t\t\tcategory: \"share\",\n\t\t\t\t\t\ttype: \"social share\",\n\t\t\t\t\t\tlocation: \"header\",\n\t\t\t\t\t\tuser: HFN.config.auth ? 1 : 0\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\tself.mobileShare(item.act);\n\t\t\t},\n\t\t\titems: items,\n\t\t\tbuildItem: function (item, obj) {\n\t\t\t\titem.append($('
')\n\t\t\t\t\t.text(obj.title))\n\t\t\t\t\t.addClass(\"share-mobile-sheet\");\n\t\t\t\tif (!obj.isaction && !obj.iscancel)\n\t\t\t\t\titem.append($('
').addClass(obj.icon))\n\t\t\t}\n\t\t});\n\n\t\treturn shareButton;\n\t},\n\n\t_location: function () {\n \treturn location.protocol + '//' + location.host + location.pathname + '?code=' + this.code;\n\t},\n\n\tdesktopShare: function (act) {\n\t\tswitch (act) {\n\t\t\tcase 'mail':\n\t\t\t\tvar cont=HFN.renderTemplate('.viewpublink', {puburl: this._location()});\n\t\t\t\tPopup.open(cont, { title: 'Download Link' });\n\t\t\t\t$('.modal a#copy-publink').zclip({\n\t\t\t\t\tpath: '/swf/ZeroClipboard.swf',\n\t\t\t\t\tcopy: $('.modal input[name=publinkurl]').val()\n\t\t\t\t});\n\t\t\tbreak;\n\t\t\tcase 'cp':\n\t\t\t/*\n\t\t\tvar cont=HFN.renderTemplate('.viewpublink', {puburl: publink.sharer.location()});\n\t\t\tPopup.open(cont, { title: 'Download Link' });\n\t\t\t$('.modal a#copy-publink').zclip({\n\t\t\tpath: '/swf/ZeroClipboard.swf',\n\t\t\tcopy: $('.modal input[name=publinkurl]').val()\n\t\t\t});\n\t\t\t*/\n\t\t\tbreak;\n\t\t\tcase 'fb':\n\t\t\t\tvar popup = window.open('https://www.facebook.com/sharer/sharer.php?u='+ encodeURIComponent(this._location()), 'fbshare', 'height=400,width=570');\n\t\t\t\tif (window.focus) {\n\t\t\t\t\tpopup.focus();\n\t\t\t\t}\n\n\t\t\t\tconsole.log('share', 'https://www.facebook.com/sharer/sharer.php?u='+ encodeURIComponent(this._location()));\n\t\t\tbreak;\n\t\t\tcase 'tw':\n\t\t\t\tvar popup=window.open('https://twitter.com/intent/tweet?url=' + encodeURIComponent(this._location()) + '&text=pCloud Download Link','twshare','height=400,width=570');\n\t\t\t\tif (window.focus) {\n\t\t\t\t\tpopup.focus();\n\t\t\t\t}\n\t\t\tbreak;\n\t\t};\n\t},\n\n\tmobileShare: function (act) {\n\t\tvar self = this;\n\n\t\tswitch (act) {\n\t\t\tcase 'copy':\n\t\t\t\ttry {\n\t\t\t\t\tnavigator.clipboard.writeText(location.href).then(\n\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\tHFN.message(__('Link copied.'));\n\t\t\t\t\t\t},\n\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\tthrow new Error();\n\t\t\t\t\t\t}\n\t\t\t\t\t).catch(() => {\n\t\t\t\t\t\tthis.mobileShareView(HFN.renderTemplate('#shareCopylink', {\n\t\t\t\t\t\t\tpuburl: self._location()\n\t\t\t\t\t\t}));\n\t\t\t\t\t});\n\t\t\t\t} catch (err) {\n\t\t\t\t\tthis.mobileShareView(HFN.renderTemplate('#shareCopylink', {\n\t\t\t\t\t\tpuburl: self._location()\n\t\t\t\t\t}));\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 'fb':\n\t\t\t\tthis.mobileShareView(\n\t\t\t\t\tHFN.renderTemplate('#shareFacebook', { puburl: self._location() })\n\t\t\t\t\t\t.find('.button')\n\t\t\t\t\t\t.on('click', function (e) {\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\twindow.open('https://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent(self._location()));\n\t\t\t\t\t\t}).end()\n\t\t\t\t);\n\t\t\tbreak;\n\t\t\tcase 'tw':\n\t\t\t\tthis.mobileShareView(\n\t\t\t\t\tHFN.renderTemplate('#shareTwitter', { puburl: self._location() })\n\t\t\t\t\t\t.find('.button')\n\t\t\t\t\t\t.on('click', function (e) {\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\twindow.open('https://twitter.com/intent/tweet?url=' + encodeURIComponent(self._location()) + '&text=pCloud Download Link');\n\t\t\t\t\t\t}).end()\n\t\t\t\t);\n\t\t\tbreak;\n\t\t\tcase 'share':\n\t\t\t\tif (navigator.userActivation.isActive && typeof navigator.share === 'function') {\n\t\t\t\t\tnavigator.share({\n\t\t\t\t\t\ttitle: 'pCloud Download Link',\n\t\t\t\t\t\ttext: (self.data.metadata.name != '') ? self.data.metadata.name : '',\n\t\t\t\t\t\turl: self._location(),\n\t\t\t\t\t})\n\t\t\t\t\t.then(() => '')\n\t\t\t\t\t.catch(() => '');\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t},\n\n\tmobileShareView: function (content) {\n\t\tconsole.log('viewing', content);\n\n\t\tvar self = this;\n\t\tvar view;\n\n\t\tif ($('.mob-dialog').length)\n\t\t\t$('.mob-dialog').remove();\n\n\t\tview = $('
').append(content);\n\n view.prepend($('div.header').clone().css('position', 'static'));\n view.find('.buttons').empty().append(\n \t$('
')\n \t\t.on('click', function (e) {\n \t\t\tself.mobileShareClose();\n \t\t\thashManager.removeState('sh');\n \t\t})\n );\n view.css({ width: '100%', height: '200%', top: 0 });\n $('body').append(view);\n\n setTimeout(function () {\n \tview.addClass('show');\n \t$('html').addClass('noscroll');\n }, 0);\n\t},\n\n\tmobileShareClose: function () {\n\t\t$('.mob-dialog').remove();\n\t\t$('html').removeClass('noscroll');\n\t\t// Dummy change\n\t},\n\n\timageUrl: function(width, height) {\n\t\treturn HFN.apiMethodUrl(false, 'getpubthumb', {\n\t\t\tcode: this.code,\n\t\t\tlinkpassword: this.data.linkpassword,\n\t\t\tsize: width + 'x' + height,\n\t\t\tcrop: 0,\n\t\t\ttype: 'auto'\n\t\t});\n\t},\n\n\tcheckImageUrl: function(imageUrl, onSuccess, onError) {\n\t\t$.ajax({\n\t\t\turl: imageUrl,\n\t\t\ttype: 'GET',\n\t\t\tdataType: 'json',\n\t\t\tprocessData: false,\n\t\t\tsuccess: function({ error }) {\n\t\t\t\tif (error) {\n\t\t\t\t\tonError();\n\t\t\t\t} else {\n\t\t\t\t\tonSuccess();\n\t\t\t\t}\n\t\t\t},\n\t\t\terror: function() {\n\t\t\t\tonSuccess();\n\t\t\t}\n\t\t})\n\t},\n\n\tdynamicTitle: function (meta) {\n\t\tvar template = HFN.renderTemplate('#dLinkDynamicTitle', {\n\t\t\tfilename: meta.name,\n\t\t\tfilesize: HFN.formatSize(meta.isfolder ? HFN.folderData(meta)[0] : meta.size)\n\t\t});\n\n\t\tvar resize = function () {\n\t\t\ttemplate.find('.filename').css('max-width', $(window).outerWidth() - template.find('.size').outerWidth() - 30);\n\t\t}\n\n\t\tsetTimeout(resize, 0);\n\n\t\treturn { template: template, resize: resize };\n\t},\n\n\tsetFooterPosition: function(content) {\n\t\tvar areaHeight = $(window).outerHeight();\n\t\tvar contentHeight = $(content).outerHeight();\n\t\tvar footerHeight = $('footer').outerHeight();\n\n\t\tconsole.log(\"setFooterPosition areaHeight\", areaHeight)\n\t\tconsole.log(\"setFooterPosition contentHeight\", contentHeight)\n\t\tconsole.log(\"setFooterPosition footerHeight\", footerHeight)\n\t},\n\n\tcentralizeDlContent: function(content) {\n\n\t\t// resets\n\t\t$(content).css('marginTop', 0);\n\n\t\tvar contentHeight = $(content).outerHeight();\n\t\tvar areaHeight = $(window).outerHeight();\n\t\tvar headerHeight = $('.header-wrap').outerHeight();\n\t\tvar titleHeight = $('._title').outerHeight();\n\t\tvar footerHeight = $('footer').outerHeight();\n\t\tvar minMTop = headerHeight + 10;\n\t\tvar mtop;\n\n\t\tconsole.log('content', content);\n\t\tconsole.log('headerHeight', headerHeight);\n\t\tconsole.log('contentHeight', contentHeight);\n\t\tconsole.log('titleHeight', titleHeight);\n\n\t\t// to centeralize the video only\n\t\t// count the title two times\n\t\t//\n\t\tconsole.log(contentHeight);\n\t\tconsole.log(titleHeight);\n\n\t\t// contentHeight += titleHeight;\n\n\t\tconsole.log('contentHeight', contentHeight);\n\n\t\t// remove header\n\t\t//areaHeight -= headerHeight;\n\n\t\tconsole.log(\"areaHeight\", areaHeight);\n\t\tconsole.log(\"contentHeight\", contentHeight);\n\n\t\tvar freeSpace = 0;\n\t\tif (this.data.branding) {\n\t\t\tvar brandingHeight = $(\".branding-header\").outerHeight();\n\n\t\t\tfreeSpace = areaHeight - contentHeight - footerHeight - brandingHeight;\n\t\t} else {\n\t\t\tfreeSpace = areaHeight - contentHeight - footerHeight;\n\t\t}\n\n\t\tconsole.log(\"freeSpace\", freeSpace);\n\t\tconsole.log(\"this.data.branding\", this.data.branding);\n\n\t\tmtop = ((freeSpace) / 2) + (headerHeight / 2);\n\t\tmtop = Math.max(minMTop, mtop);\n\n\t\t$('#dl_content').addClass('centralized').css('marginTop', mtop);\n\t},\n\n\tinviteToLogin: function() {\n\t\tvar self = this;\n\n\t\tif (this.shouldBotherUser()) {\n\t\t\tsetTimeout(function() {\n\t\t\t\tsetcookie('ref', 1139, 0);\n\t\t\t\tHFN.initSurpriseLoginRegModal('register', function() {\n\t\t\t\t\tself._actionCopyToCloud();\n\t\t\t\t});\n\t\t\t}, 3000);\n\t\t}\n\t},\n\n\tshouldBotherUser: function() {\n\t\tvar data = this.data;\n\n\t\tif (rcookie('pcauth')) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (data.ownerispremium && !data.showads) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (data.ownerisbusiness) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t},\n\n\tinitSidebar: function() {\n\t\tvar self = this;\n\n\t\tif (this.data.ownerisme && HFN.config.isSite()) {\n\n\t\t\tif (!$(\".dl-sidebar\").length) {\n\t\t\t\t$(\"#megawrap > div\").append('');\n// to do:\n\t\t\t\tif(true) {\n\t\t\t\t\t$(\".dl-sidebar\").css({\n\t\t\t\t\t\ttop: $(\".branding-header\").outerHeight() + $(\".header-wrap\").outerHeight()\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/*\n\t\t\t$('.profile').before(\n\t\t\t\t$('
')\n\t\t\t\t\t.on(\"click\", function() {\n\t\t\t\t\t\tif (self.removeSidebar) {\n\t\t\t\t\t\t\tself.closeSidebar();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tself.openSidebar();\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t);\n\t\t\t*/\n\n\t\t\tsetTimeout(this.openSidebar.bind(this), 500);\n\t\t}\n\t},\n\n\tremoveSidebar: false,\n\tstatsSidebar: function(opened) {\n\t\tvar self = this;\n\n\t\tself.removeSidebar = prc.DLStatsSidebar($('.dl-sidebar')[0], {\n\t\t\topen: opened,\n\t\t\ttoken: rcookie('pcauth'),\n\t\t\tlinkid: this.data.linkid,\n\t\t\tonButtonClicked: opened ? this.closeSidebar.bind(this) : this.openSidebar.bind(this),\n\t\t\tonInviteUsers: function() {\n\t\t\t\tconsole.log(self);\n\n\t\t\t\t//HFN.sharePublink(this.data.metadata);\n\t\t\t\tlocation.href = URLMY+\"#page=shares&tab=myshares-tab\" + '&sharelink=' + self.data.linkid;\n\t\t\t}\n\t\t});\n\t},\n\topenSidebar: function() {\n\t\tvar self = this;\n\n\n\t\t//$('html').addClass('sidebar-opened');\n\n\t\tthis.statsSidebar(true);\n\t\t$(\".dl-sidebar\").removeClass(\"minimized\");\n\n\t\t/*\n\t\tthis.removeSidebar = prc.DLStatsSidebar($('.dl-sidebar')[0], {\n\t\t\ttoken: rcookie('pcauth'),\n\t\t\tlinkid: this.data.linkid,\n\t\t\tonCloseRequest: this.closeSidebar.bind(this),\n\t\t\tonInviteUsers: function() {\n\t\t\t\t//HFN.sharePublink(this.data.metadata);\n\t\t\t\tlocation.href = \"/#page=shares&tab=myshares-tab\" + '&sharelink=' + self.data.linkid;\n\t\t\t}\n\t\t});\n\t\t*/\n\n\t\t//$(window).trigger('resize');\n\t},\n\n\tcloseSidebar: function() {\n\n\t\tconsole.log(\"closing\");\n\n\t\tthis.statsSidebar(false);\n\n\t\tif (this.removeSidebar && 0) {\n\t\t\tthis.removeSidebar();\n\t\t\tthis.removeSidebar = false;\n\t\t}\n\n\t\t$(\".dl-sidebar\").addClass(\"minimized\");\n\t\t//$('.dl-sidebar').remove();\n\n\t},\n\n\tgetBrandingImageSize: function(img, prop) {\n\t\treturn (this.brandingImagesSize[img.path] && this.brandingImagesSize[img.path][prop]) || null;\n\t}\n}\n\nfunction isVideo(view) {\n\treturn ['video', 'folder'].indexOf(view) != -1;\n}\n\nfunction isAsia() {\n\treturn (asiaCodes.indexOf(dLink.data.country.toUpperCase()) != -1 ||\n\t\t['XZ9kPuZ7UmbmhujfAFdFw41KksjUQEncHC7', 'XZTFiBZ0AGvm0aDhc7ahyC2qsw1QQ0DOUCy',\n\t\t 'XZ2e6uZvJw7eLxgI9muKXt5cD59vmXG5UaX', 'kZxUYXZO2KKG7hDh2FrjyJoV2lNAyItJxBk',\n\t\t 'XZK7guZ6PzAY9Li1q8oLxmsDLvPGpkV3rck', 'XZjQH2Z9oAJXbMpQT4mWbsxX1UnVVEPzBkV',\n\t\t 'XZG0nsZYALq95nK85B7iPCJS8mbBpkUz4yk', 'kZPSRBZbzYSrOcNujXXsc07r58R40crs4sy',\n\t\t 'XZB8AnZAb3z52cIdvJasHaXvg9QimaotUry', 'kZQCAmZfgodlRVqq5paWk7s0Cp2p7bFVdry',\n\t\t 'XZz4DDZ3ExbUEFmzAHGFwF4MgTwLjNiONTy' // infolinks\n\t\t ].indexOf(dLink.code) != -1);\n}\n\nexport default dLink;\n","import \"../styles/dlink.less\";\n\nimport dlink from \"../lib/dlink\";\n\nHFN.dLink = dlink;\n","module.exports = jQuery;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","__webpack_require__.amdO = {};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.hmd = (module) => {\n\tmodule = Object.create(module);\n\tif (!module.children) module.children = [];\n\tObject.defineProperty(module, 'exports', {\n\t\tenumerable: true,\n\t\tset: () => {\n\t\t\tthrow new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);\n\t\t}\n\t});\n\treturn module;\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t6: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkpcloud_js\"] = self[\"webpackChunkpcloud_js\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [0], () => (__webpack_require__(62789)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","asiaCodes","getAdTimes","times","rcookie","_parseInt","setAdTime","setcookie","isError","dlink","_view","isVideo","indexOf","isOvertraffic","viewReferral","platform","$","browser","mobile","refs","image","video","document","folder","audio","generic","desktop","ads","noop","url","imageSize","text","buttonText","n","imagePosition","imageHolderSize","width","height","smallVersion","_canShowAds","user","data","getType","metadata","isPortrait","ownerispremium","showads","ownerisbusiness","candownload","_canShowExternalAds","ret","code","country","toUpperCase","premium","business","_canShowInternalAds","type","console","log","_shouldShowAds","_adImagePath","src","retinaSrc","_getAd","meta","browserType","categoryAdsMap","category","CATEGORY","DOCUMENT","withDesktopOverlay","adHtml","cont","HFN","renderTemplate","addClass","find","append","on","e","animate","bottom","remove","body","hide","setTimeout","show","trigger","withMobileOverlay","_close","css","window","outerHeight","overlay","appendTo","IMAGE","VIDEO","AUDIO","ARCHIVE","getUser","ad","anchor","attr","encodeURIComponent","_location","location","href","pCloudMobileOverlayContent","pCloudMobileAd","_showMobile","retinaImage","initLoginRegModal","_actionCopyToCloud","pCloudAdContent","pCloudDesktopAd","willShowAd","cb","storeLinks","ios","android","open","deepLink","locationId","getLocationFromUrl","id","getDeepLink","gtag","action","iphone","ipad","holder","params","isfolder","songs","contents","forEach","item","index","list","audioPlayer","getMinifyData","playItemId","fileid","song","isPublic","isSingle","footer","getElementsByTagName","style","display","config","isMobile","documentElement","getElementById","this","audioPlayerBox","prc","AudioPlayer","documentview","template","canDownload","previewlink","iframeSrc","callback","errorCallback","pdfContainer","isSameLocation","getSaveButton","getDownloadButton","addMobileButton","createShareButtonMobile","_actionSheetDownloadItems","length","createDownloadButtonMobile","createTextNode","name","formatSize","size","removeClass","isInternetExplorer","DocPreview","file","onError","error","go","iframeel","createElement","setAttribute","parentElement","appendChild","ajax","cache","method","done","fail","addDesktopButton","getShareHeaderIcon","getDownloadHeaderButton","_resize","errorMessages","message","result","resize","push","centralizeDlContent","linkpassword","canupload","usercanupload","grid_opts","_filterList","_filterTree","cacheTree","folderid","createUploadButtonMobile","title","paging","templateswitch","noempty","place","triggerOpenPublicFolder","hashManager","getState","then","blobid","obj","_findByBlobid","parentFolderId","parentfolderid","filter","closest","_markFileBlobId","replace","results","RegExp","exec","decodeURIComponent","_getParameterByName","orientationChangeEnabled","off","openFolder","originalEvent","newURL","oldURL","filtered","blob_id","Array","i","prop","Object","dynamicTitle","filename","filesize","branding","unshift","iconwrap","icon","createIcon","metaIcon","ICONS","OVERTRAFFIC_PUBLINK","windowResize","DelayedExecution","eachResize","maxWidth","Math","max","screen","availWidth","availHeight","maxHeight","thumbSize","calcImageSize","thumb","imageUrl","end","isSite","onload","naturalWidth","naturalHeight","resizeArea","onerror","hpad","padHeight","wpad","min","outerWidth","cssobj","overtraffic","folderData","access_limit","__","over_explain_premium","click_to_continue","over_explain_login","click_to_login","escape","setupThumb","getMobileSaveButton","initDownloadlinkLoginRegModal","userinfo","reload","_func","password","iserror","host","deparam","querystring","ep","customclass","embed","_loadVideoPlayer","node","autoPlay","arguments","undefined","seek","disableHLS","maxVideoSize","getProperMaxVideoSize","videoData","videoUrls","thumbUrl","thumbType","originalWidth","originalHeight","rotate","HLSpath","getVideoUrls","variants","thumbWidth","getProperThumbnailSize","thumbHeight","vidstackMediaPlayer","shownVideoSuccessTimeout","videoContainerRemove","VideoContainer","ref","noSwipeGesture","defaultDocumentTitle","setVideoLoading","toggleLoading","onPause","refreshVideoLinksRetryCounter","onPlay","clearTimeout","current","state","playing","_ref","mediaType","lastPlayingTime","disableHLSVideoRetries","apiMethod","vlinksret","numRetriesOnError","NUM_RETRIES_ON_ERROR","showErrorLoadingVideo","forceFresh","loading","empty","showBranding","br","locationid","US_LOCATIONID","dLink","new","ispinned","views","brandingImagesSize","loadData","queue","iconformat","token","auth","ownerisme","dlinkownerisme","linkid","docPreview","canPreview","hashCache","hash","previewRet","prepUrl","audioRet","audiolink","downloadlink","apiMethodUrl","forcedownload","downloadRet","langFromUrl","getSearch","language","pCloudIntl","updateLang","apply","bind","moved","init","_this","apiInit","addEventListener","event","preventDefault","head","media","styleSheet","cssText","disableBodyScrollOnModal","root","classList","contains","target","wheelEvent","passive","fflookup","setLang","Boolean","hasLogo","logo1x","hasMobile","covermobile","imgUrls","self","logomobile","devicePixelRatio","logo2x","coversmall","cover","coverbig","promises","map","img","getImageSize","path","_Promise","_setupLayout","_compat","_go","dwltag","initCrashlytics","initAnalytics","initFacebook","initTwitter","initTiktokTracking","initTracking","GA_FLAG","onStart","FBQ_FLAG","setCookieConsent","removeCookieConsent","CookieConsent","initAnalyticsTracking","initFacebookTracking","initTwitterTracking","onAgreed","refresh","_userPromise","obLength","resolve","initBookmark","info","bookmark","dataName","EditBookmarkTooltip","holderObject","hasBranding","layout","headline","description","imageSrc","coverSrc","coverPosition","coverSize","initShowPromoOffer","initCoverData","coverImageHeight","currentWidth","coverwidth","innerWidth","coverOffset","coveroffsety","calcRelativeOffset","coverContainerHeight","calcCoverHeight","getBrandingImageSize","getCoverPosition","getCoverSize","header","hasCover","coverColor","covercolor","coverGradient","covergradient","repositionCover","after","powered_by","imgWidth","imgHeight","imgWidthMobile","imgHeightMobile","color","position","left","split","top","offset","scroll","dropDown","close","scrollTop","URLMY","getServicesButton","view","_template","_postView","ads2016","viewCategoryMap","fileext","toLowerCase","_actionDownloadFile","isCopynow","copynow","_gaEvent","isPDF","removeOpenApp","componentRender","React","OpenInApp","onOpen","onClose","openInApp","_isManyPhotos","cnt","eachFile","getDisabledDownloadButton","modalContainer","dLinkMeta","metaData","refId","copy","ismine","emailverified","sendVerifyMail","copyToCloud","toCopy","onDone","initSaveFileLoginRegModal","premiumOnlyUrl","outheader","btn","actions","options","holderClass","subtext","bindList","direction","DIR_LEFT","eventTrigger","eventClose","showTip","overwriteTip","right","buildCell","el","N_SUB","N_TEXT","stopPropagation","resetTo","copySupported","i18n","get","attachCopy","_defineProperty","childDirection","desktopShare","wrapper","PCloudServicesDropdown","button","prepend","getDesktopButtons","clearMobileButtons","addHeaderFilename","value","_initiateLogin","isLogged","isOwnerPremium","isOwnerBusiness","initShowDownloadLinkModal","initDownloadZipLoginRegModal","active","shareBtn","actionSheet","setup","actionTitle","items","onClick","closeAll","buildItem","isaction","iscancel","uploadBtn","handleDisabledInfoModals","uploadControl","uploadFileFromCustomButton","shareButton","act","analytics","navigator","userActivation","share","concat","mobileShare","protocol","pathname","puburl","Popup","zclip","val","popup","focus","_this2","clipboard","writeText","Error","mobileShareView","err","isActive","content","clone","mobileShareClose","removeState","crop","checkImageUrl","onSuccess","dataType","processData","success","setFooterPosition","areaHeight","contentHeight","footerHeight","mtop","headerHeight","titleHeight","minMTop","freeSpace","inviteToLogin","shouldBotherUser","initSurpriseLoginRegModal","initSidebar","openSidebar","removeSidebar","statsSidebar","opened","DLStatsSidebar","onButtonClicked","closeSidebar","onInviteUsers","module","exports","jQuery","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","loaded","__webpack_modules__","call","m","amdO","O","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","j","keys","every","key","splice","r","getter","__esModule","d","a","definition","o","defineProperty","enumerable","g","globalThis","Function","hmd","create","children","set","prototype","hasOwnProperty","Symbol","toStringTag","nmd","paths","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","nc","__webpack_exports__"],"sourceRoot":""}