{"version":3,"sources":["../../../../../../../../../../../usr/local/lib/node_modules/browserify/node_modules/browser-pack/_prelude.js","../../../js_common/_dzs_helpers.js","../../../jsinc/_dzsap_helpers.js","../../../jsinc/player/_player_keyboard.js","player-comments.source.js","../../../configs/_constants.js"],"names":["ConstantsDzsAp","PLAYLIST_TRANSITION_DURATION","DEBUG_STYLE_1","DEBUG_STYLE_2","DEBUG_STYLE_3","DEBUG_STYLE_ERROR","URL_WAVESURFER_HELPER_BACKUP","WAVESURFER_MAX_TIMEOUT","URL_JQUERY","DEBUG_STYLE_PLAY_FUNCTIONS","ERRORED_OUT_CLASS","ERRORED_OUT_MAX_ATTEMPTS","DZSAP_PLAYER_CLASS_FOOTER_PLAYER","DZSAP_PLAYER_CLASS_LOADED","DZSAP_PLAYER_CLASS_FOR_STICK_TO_BOTTOM_SHOW","DZSAP_PLAYER_CLASS_STICK_TO_BOTTOM","DZSAP_PLAYER_PLACEHOLDER_CLASS_STICK_TO_BOTTOM","DZSAP_PLAYER_TYPE_FOR_ACCEPTING_FEED","DZSAP_PLAYER_ATTR_PLAY_FROM_LAST_POS","DZSAP_SCRIPT_SELECTOR_MAIN_SETTINGS","DZSAP_SCRIPT_SELECTOR_KEYBOARD","DZSAP_VIEW_PLAYER_PLAYING_EASED_TIMEOUT"],"mappings":"AAAA;+hBKAO,MAAMA,iBACXC,6BAD4B,IAE5BC,cAF4B,6CAG5BC,cAH4B,6CAI5BC,cAJ4B,6CAK5BC,kBAL4B,6CAM5BC,6BAN4B,mDAO5BC,uBAP4B,IAQ5BC,WAR4B,mEAS5BC,2BAT4B,6CAU5BC,kBAV4B,cAW5BC,yBAA0B,wCAGrB,MAAMC,kCAAN,wDAAA,cACA,MAAMC,2BAAN,iDAAA,cACA,MAAMC,6CAAN,yEAAA,oBACA,MAAMC,oCAAN,iEAAA,qBACA,MAAMC,gDAAN,yFAAA,iCACA,MAAMC,sCAAN,oDAAA,MACA,MAAMC,sCAAN,oDAAA,MAEA,MAAMC,qCAAN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A,CAAA,QAAA;;AACA,MAAA,IAAI,CAAJ,IAAA,CAAA,OAAA,EAAA,GAAA,CAAA,EAAA;;AAGA,aAAA,KAAA;AACD;AAGF;AAtDI,CAAA;;;;AA0DP,MAAM,CAAN,2BAAA,GAAqC,UAAA,SAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAgC;AAEnE,EAAA,SAAS,CAAT,iBAAA,GAA8B,MAAM,CAAC,CAAC,CAAtC,qCAAoC,CAApC;;AAEA,MAAI,SAAS,CAAT,iBAAA,CAAJ,IAAA,EAAsC;AAEpC,IAAA,SAAS,CAAT,iBAAA,CAAA,IAAA,CAAA,QAAA,EAAA,KAAA;;AAEA,QAAI,MAAM,CAAN,cAAA,CAAJ,iBAAA,EAA6C;AAC3C,MAAA,SAAS,CAAT,iBAAA,CAAA,IAAA,CAAA,qCAAA,EAAA,MAAA;AACD;;AAED,IAAA,SAAS,CAAT,iBAAA,CAAA,EAAA,CAAA,OAAA,EAAA,yCAAA,EAAA,uBAAA;AACA,IAAA,SAAS,CAAT,iBAAA,CAAA,EAAA,CAAA,SAAA,EAAA,OAAA,EAAA,uBAAA;AACA,IAAA,SAAS,CAAT,iBAAA,CAAA,EAAA,CAAA,UAAA,EAAA,OAAA,EAAA,uBAAA;AAVF,GAAA,MAYO;AACL,IAAA,OAAO,CAAP,GAAA,CAAA,4BAAA,EAAA,iBAAA,EAA6D,CAAC,CAAC,CAAC,CAAhE,qCAA8D,CAA9D;AACD;AAlBH,CAAA","file":"bundle.js","sourcesContent":["(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i {\n\n if (window.jQuery) {\n resolve('jQuery loaded');\n } else {\n const script = document.createElement('script');\n script.onload = function () {\n if (window.jQuery) {\n resolve('jQuery loaded');\n } else {\n reject('error loading');\n }\n };\n script.src = ConstantsDzsAp.URL_JQUERY;\n\n document.head.appendChild(script);\n }\n\n setTimeout(() => {\n reject('error loading');\n }, 15000);\n })\n}\n/**\n *\n * @param {string} arg\n * @return {string}\n */\nexport function string_curateClassName(arg){\n\n arg = arg.replace('feed-dzsap', '');\n arg = arg.replace('feed-dzsap--extra-html', '');\n return arg;\n}\n\n\nexport function simpleStringify (object){\n if (object && typeof object === 'object') {\n object = copyWithoutCircularReferences([object], object);\n }\n return JSON.stringify(object);\n\n function copyWithoutCircularReferences(references, object) {\n const cleanObject = {};\n Object.keys(object).forEach(function(key) {\n var value = object[key];\n if (value && typeof value === 'object') {\n if (references.indexOf(value) < 0) {\n references.push(value);\n cleanObject[key] = copyWithoutCircularReferences(references, value);\n references.pop();\n } else {\n cleanObject[key] = '###_Circular_###';\n }\n } else if (typeof value !== 'function') {\n cleanObject[key] = value;\n }\n });\n return cleanObject;\n }\n}\n\nexport const loadScriptIfItDoesNotExist = (scriptSrc, checkForVar) => {\n return new Promise((resolve, reject) => {\n if (checkForVar) {\n resolve('loadfromvar');\n return;\n }\n\n var script = document.createElement('script');\n script.onload = function () {\n resolve('loadfromload');\n };\n script.onerror = function () {\n reject();\n };\n script.src = scriptSrc;\n\n document.head.appendChild(script);\n })\n}\n\n\nexport const getBaseUrl = (baseUrlVar, scriptName) => {\n if (window[baseUrlVar]) {\n return window[baseUrlVar];\n }\n\n let scripts = document.getElementsByTagName(\"script\");\n for (var scriptKey in scripts) {\n if (scripts[scriptKey] && scripts[scriptKey].src && String(scripts[scriptKey].src).indexOf(scriptName) > -1) {\n break;\n }\n }\n var baseUrl_arr = String(scripts[scriptKey].src).split('/');\n baseUrl_arr.splice(-1, 1);\n const result = string_addTrailingSlash(baseUrl_arr.join('/'));\n window[baseUrlVar] = result+'/';\n return result;\n}\n\nfunction string_addTrailingSlash(url){\n var lastChar = url.substr(-1); // Selects the last character\n if (lastChar != '/') { // If the last character is not a slash\n url = url + '/'; // Append a slash to it.\n }\n return url;\n}\nexport const sanitizeToCssPx = (arg) => {\n\n if (String(arg).indexOf('%') > -1 || String(arg).indexOf('em') > -1 || String(arg).indexOf('px') > -1 || String(arg).indexOf('auto') > -1) {\n return arg;\n }\n return arg + 'px';\n}\n\n\nexport const setupTooltip = (args) => {\n\n var mainArgs = Object.assign({\n tooltipInnerHTML: '',\n tooltipIndicatorText: '',\n tooltipConClass: '',\n }, args)\n\n return `
${mainArgs.tooltipInnerHTML} ${mainArgs.tooltipIndicatorText}
`;\n}\n\n\nexport const isInt = function (n) {\n return typeof n == 'number' && Math.round(n) % 1 == 0;\n}\n\nexport const isValid = function (n) {\n return typeof n != 'undefined' && n != '';\n}\n\n\nexport function getRelativeX (mouseX, $el_) {\n if (jQuery) {\n return mouseX - jQuery($el_).offset().left;\n }\n}\n","import {isValid} from \"../js_common/_dzs_helpers\";\nimport {dzsap_keyboardSetup} from \"./player/_player_keyboard\";\nimport {DZSAP_PLAYER_CLASS_FOOTER_PLAYER, DZSAP_PLAYER_CLASS_STICK_TO_BOTTOM} from \"../configs/_constants\";\n\n\nexport function formatTime(arg) {\n\n var s = Math.round(arg);\n var m = 0;\n var h = 0;\n if (s > 0) {\n while (s > 3599 && s < 3000000 && isFinite(s)) {\n h++;\n s -= 3600;\n }\n while (s > 59 && s < 3000000 && isFinite(s)) {\n m++;\n s -= 60;\n }\n if (h) {\n\n return String((h < 10 ? \"0\" : \"\") + h + \":\" + String((m < 10 ? \"0\" : \"\") + m + \":\" + (s < 10 ? \"0\" : \"\") + s));\n }\n return String((m < 10 ? \"0\" : \"\") + m + \":\" + (s < 10 ? \"0\" : \"\") + s);\n } else {\n return \"00:00\";\n }\n}\n\nexport function can_history_api() {\n return !!(window.history && history.pushState);\n}\n\nexport function dzs_clean_string(arg) {\n\n if (arg) {\n\n arg = arg.replace(/[^A-Za-z0-9\\-]/g, '');\n\n arg = arg.replace(/\\./g, '');\n return arg;\n }\n\n return '';\n\n\n}\n\n\nexport function get_query_arg(purl, key) {\n if (purl) {\n\n if (String(purl).indexOf(key + '=') > -1) {\n\n var regexS = \"[?&]\" + key + \"=.+\";\n var regex = new RegExp(regexS);\n var regtest = regex.exec(purl);\n\n\n if (regtest != null) {\n var splitterS = regtest[0];\n if (splitterS.indexOf('&') > -1) {\n var aux = splitterS.split('&');\n splitterS = aux[1];\n }\n\n var splitter = splitterS.split('=');\n\n\n return splitter[1];\n\n }\n\n }\n\n } else {\n }\n}\n\nexport function add_query_arg(purl, key, value) {\n\n key = encodeURIComponent(key);\n value = encodeURIComponent(value);\n\n if (!(purl)) {\n purl = '';\n }\n var s = purl;\n var pair = key + \"=\" + value;\n\n var r = new RegExp(\"(&|\\\\?)\" + key + \"=[^\\&]*\");\n\n s = s.replace(r, \"$1\" + pair);\n\n if (s.indexOf(key + '=') > -1) {\n\n\n } else {\n if (s.indexOf('?') > -1) {\n s += '&' + pair;\n } else {\n s += '?' + pair;\n }\n }\n\n\n if (value === 'NaN') {\n var regex_attr = new RegExp('[\\?|\\&]' + key + '=' + value);\n s = s.replace(regex_attr, '');\n\n\n if (s.indexOf('?') === -1 && s.indexOf('&') > -1) {\n s = s.replace('&', '?');\n }\n }\n\n return s;\n}\n\n\nexport function dzsap_is_mobile() {\n\n\n return is_ios() || is_android();\n}\n\nexport function is_ios() {\n\n return ((navigator.platform.indexOf(\"iPhone\") !== -1) || (navigator.platform.indexOf(\"iPod\") !== -1) || (navigator.platform.indexOf(\"iPad\") !== -1));\n}\n\n\nexport function can_canvas() {\n\n var oCanvas = document.createElement(\"canvas\");\n return !!oCanvas.getContext(\"2d\");\n\n}\n\nexport function is_safari() {\n return Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0;\n}\n\n\nexport function is_android() {\n var ua = navigator.userAgent.toLowerCase();\n\n return (ua.indexOf(\"android\") > -1);\n}\n\nexport function select_all(el) {\n if (typeof window.getSelection !== \"undefined\" && typeof document.createRange !== \"undefined\") {\n var range = document.createRange();\n range.selectNodeContents(el);\n var sel = window.getSelection();\n sel.removeAllRanges();\n sel.addRange(range);\n } else if (typeof document.selection !== \"undefined\" && typeof document.body.createTextRange !== \"undefined\") {\n var textRange = document.body.createTextRange();\n textRange.moveToElementText(el);\n textRange.select();\n }\n}\n\nexport function is_android_good() {\n\n\n}\n\nexport function htmlEncode(arg) {\n return jQuery('
').text(arg).html();\n}\n\nexport function dzsap_generate_keyboard_tooltip(keyboard_controls, lab) {\n\n\n let structureDzsTooltipCommentAfterSubmit = '' + 'Shortcut' + ': ' + keyboard_controls[lab] + '';\n\n structureDzsTooltipCommentAfterSubmit = structureDzsTooltipCommentAfterSubmit.replace('32', 'space');\n structureDzsTooltipCommentAfterSubmit = structureDzsTooltipCommentAfterSubmit.replace('27', 'escape');\n\n return structureDzsTooltipCommentAfterSubmit;\n\n\n}\n\n\n/**\n *\n * @param hex\n * @param {number|null} targetAlpha 0-1\n * @returns {string}\n */\nexport function hexToRgb(hex, targetAlpha = null) {\n var result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n var str = '';\n if (result) {\n result = {\n r: parseInt(result[1], 16),\n g: parseInt(result[2], 16),\n b: parseInt(result[3], 16)\n };\n\n\n var alpha = 1;\n\n if (targetAlpha !== null) {\n alpha = targetAlpha;\n }\n\n\n str = 'rgba(' + result.r + ',' + result.g + ',' + result.b + ',' + alpha + ')';\n }\n\n\n return str;\n\n\n}\n\nexport function assignHelperFunctionsToJquery($) {\n\n\n Math.easeIn = function (t, b, c, d) {\n return -c * (t /= d) * (t - 2) + b;\n };\n\n\n /**\n *\n * @param {string} argfind\n * @param {string} arg\n * @returns {string}\n */\n const checkIfHasClass = (argfind, arg) => {\n\n if (!argfind) {\n var regex = new RegExp('class=\"(.*?)\"');\n var auxarr = regex.exec(arg);\n\n\n if (auxarr && auxarr[1]) {\n argfind = '.' + auxarr[1];\n }\n }\n\n return argfind;\n }\n $.fn.prependOnce = function (arg, argfind) {\n var _t = $(this)\n\n\n argfind = checkIfHasClass(argfind, arg);\n\n\n if (_t.children(argfind).length < 1) {\n _t.prepend(arg);\n return true;\n }\n return false;\n };\n $.fn.appendOnce = function (arg, argfind) {\n var _t = $(this)\n\n argfind = checkIfHasClass(argfind, arg);\n\n if (_t.children(argfind).length < 1) {\n _t.append(arg);\n return true;\n }\n return false;\n };\n};\n\n\nexport function registerTextWidth($) {\n\n $.fn.textWidth = function () {\n var _t = jQuery(this);\n var html_org = _t.html();\n if (_t[0].nodeName === 'INPUT') {\n html_org = _t.val();\n }\n var html_calcS = '' + html_org + '';\n jQuery('body').append(html_calcS);\n var _lastspan = jQuery('span.forcalc').last();\n\n _lastspan.css({\n 'font-size': _t.css('font-size'),\n 'font-family': _t.css('font-family')\n })\n var width = _lastspan.width();\n\n _lastspan.remove();\n return width;\n };\n}\n\nexport function player_checkIfWeShouldShowAComment(selfClass, real_time_curr, real_time_total) {\n\n var $ = jQuery;\n var timer_curr_perc = Math.round((real_time_curr / real_time_total) * 100) / 100;\n if (selfClass.audioType === 'fake') {\n timer_curr_perc = Math.round((selfClass.timeCurrent / selfClass.timeTotal) * 100) / 100;\n }\n if (selfClass._commentsHolder) {\n selfClass._commentsHolder.children().each(function () {\n var _t = $(this);\n if (_t.hasClass('dzstooltip-con')) {\n var _t_posx = _t.offset().left - selfClass._commentsHolder.offset().left;\n\n\n var aux = Math.round((parseFloat(_t_posx) / selfClass._commentsHolder.outerWidth()) * 100) / 100;\n\n\n if (aux) {\n\n if (Math.abs(aux - timer_curr_perc) < 0.02) {\n selfClass._commentsHolder.find('.dzstooltip').removeClass('active');\n _t.find('.dzstooltip').addClass('active');\n } else {\n _t.find('.dzstooltip').removeClass('active');\n }\n }\n }\n })\n }\n}\n\n\nexport function sanitizeObjectForChangeMediaArgs(_sourceForChange) {\n\n var changeMediaArgs = {};\n var _feed_fakePlayer = _sourceForChange;\n\n var lab = '';\n\n if (_sourceForChange.data('original-settings')) {\n return _sourceForChange.data('original-settings');\n }\n\n\n changeMediaArgs.source = null;\n if (_feed_fakePlayer.attr('data-source')) {\n changeMediaArgs.source = _feed_fakePlayer.attr('data-source')\n } else {\n\n if (_feed_fakePlayer.attr('href')) {\n changeMediaArgs.source = _feed_fakePlayer.attr('href');\n }\n }\n\n if (_feed_fakePlayer.attr('data-pcm')) {\n changeMediaArgs.pcm = _feed_fakePlayer.attr('data-pcm');\n }\n\n\n lab = 'thumb';\n if (_feed_fakePlayer.attr('data-' + lab)) {\n changeMediaArgs[lab] = _sourceForChange.attr('data-' + lab);\n }\n\n lab = 'playerid';\n if (_feed_fakePlayer.attr('data-' + lab)) {\n changeMediaArgs[lab] = _sourceForChange.attr('data-' + lab);\n }\n lab = 'type';\n if (_feed_fakePlayer.attr('data-' + lab)) {\n changeMediaArgs[lab] = _sourceForChange.attr('data-' + lab);\n }\n\n\n if (_feed_fakePlayer.attr('data-thumb_link')) {\n changeMediaArgs.thumb_link = _sourceForChange.attr('data-thumb_link');\n }\n\n\n if (_sourceForChange.find('.meta-artist').length > 0 || _sourceForChange.find('.meta-artist-con').length > 0) {\n\n changeMediaArgs.artist = _sourceForChange.find('.the-artist').eq(0).html();\n changeMediaArgs.song_name = _sourceForChange.find('.the-name').eq(0).html();\n }\n\n\n if (_sourceForChange.attr('data-thumb_for_parent')) {\n changeMediaArgs.thumb = _sourceForChange.attr('data-thumb_for_parent');\n }\n\n\n if (_sourceForChange.find('.feed-song-name').length > 0 || _sourceForChange.find('.feed-artist-name').length > 0) {\n changeMediaArgs.artist = _sourceForChange.find('.feed-artist-name').eq(0).html();\n changeMediaArgs.song_name = _sourceForChange.find('.feed-song-name').eq(0).html();\n }\n\n\n return changeMediaArgs;\n}\n\n\nexport function utils_sanitizeToColor(colorString) {\n if (colorString.indexOf('#') === -1 && colorString.indexOf('rgb') === -1 && colorString.indexOf('hsl') === -1) {\n return '#' + colorString;\n }\n return colorString;\n}\n\nexport function dzsapInitjQueryRegisters() {\n}\n\nexport function player_radio_isNameUpdatable(selfClass, radio_update_song_name, targetKey) {\n\n if (selfClass._metaArtistCon.find(targetKey).length && selfClass._metaArtistCon.find(targetKey).eq(0).text().length > 0) {\n\n if (selfClass._metaArtistCon.find(targetKey).eq(0).html().indexOf('{{update}}') > -1) {\n return true;\n }\n }\n\n\n return false;\n}\n\nexport function playerRegisterWindowFunctions() {\n\n\n window['dzsap_functions'] = {};\n window['dzsap_functions']['send_total_time'] = function (argtime, argcthis) {\n\n\n if (argtime && argtime !== Infinity) {\n const data = {\n action: 'dzsap_send_total_time_for_track',\n id_track: argcthis.attr('data-playerid'),\n postdata: Math.ceil(argtime)\n };\n jQuery.post(window.dzsap_ajaxurl, data, function (response) {\n });\n }\n\n }\n\n\n window.dzs_open_social_link = function (arg, argthis) {\n var leftPosition, topPosition;\n var w = 500, h = 500;\n\n leftPosition = (window.screen.width / 2) - ((w / 2) + 10);\n\n topPosition = (window.screen.height / 2) - ((h / 2) + 50);\n var windowFeatures = \"status=no,height=\" + h + \",width=\" + w + \",resizable=yes,left=\" + leftPosition + \",top=\" + topPosition + \",screenX=\" + leftPosition + \",screenY=\" + topPosition + \",toolbar=no,menubar=no,scrollbars=no,location=no,directories=no\";\n\n\n arg = arg.replace('{{replacewithcurrurl}}', encodeURIComponent(window.location.href));\n\n if (argthis && argthis.attr) {\n arg = arg.replace(/{{replacewithdataurl}}/g, argthis.attr('data-url'));\n }\n\n const locationHref = window.location.href;\n\n\n const auxa = locationHref.split('?');\n\n let cid = '';\n let cid_gallery = '';\n\n\n if (argthis) {\n\n } else {\n if (window.dzsap_currplayer_from_share) {\n\n argthis = window.dzsap_currplayer_from_share;\n }\n }\n\n\n if (argthis) {\n\n const $ = jQuery;\n\n if ($(argthis).hasClass('audioplayer')) {\n cid = $(argthis).parent().children().index(argthis);\n cid_gallery = $(argthis).parent().parent().parent().attr('id');\n } else {\n if (jQuery(argthis).parent().parent().attr('data-menu-index')) {\n\n cid = jQuery(argthis).parent().parent().attr('data-menu-index');\n }\n if (jQuery(argthis).parent().parent().attr('data-gallery-id')) {\n\n cid_gallery = jQuery(argthis).parent().parent().attr('data-gallery-id');\n }\n }\n\n }\n\n\n var shareurl = encodeURIComponent(auxa[0] + '?fromsharer=on&audiogallery_startitem_' + cid_gallery + '=' + cid + '');\n arg = arg.replace('{{shareurl}}', shareurl);\n\n\n window.open(arg, \"sharer\", windowFeatures);\n }\n\n\n window.dzsap_wp_send_contor_60_secs = function (argcthis, argtitle) {\n\n var data = {\n video_title: argtitle\n\n , video_analytics_id: argcthis.attr('data-playerid')\n , curr_user: window.dzsap_curr_user\n };\n var theajaxurl = 'index.php?action=ajax_dzsap_submit_contor_60_secs';\n\n if (window.dzsap_settings.dzsap_site_url) {\n\n theajaxurl = dzsap_settings.dzsap_site_url + theajaxurl;\n }\n\n\n jQuery.ajax({\n type: \"POST\",\n url: theajaxurl,\n data: data,\n success: function (response) {\n\n\n },\n error: function (arg) {\n\n }\n });\n }\n\n\n window.dzsap_init_multisharer = function () {\n\n\n }\n\n\n}\n\n\n/**\n *\n * @param {DzsAudioPlayer} selfClass\n */\nexport function assignPcmData(selfClass) {\n\n selfClass.pcmSource = string_jsonConvertToArray(selfClass.cthis.attr('data-pcm'));\n if (selfClass.initOptions.skinwave_enableSpectrum === 'on') {\n var pcmSourceLen = selfClass.pcmSource.length;\n var desiredSize = 256;\n\n for (var i = 0; i < pcmSourceLen; i++) {\n if (i > desiredSize) {\n continue;\n }\n selfClass.pcmSource[i] = selfClass.pcmSource[i * pcmSourceLen / desiredSize] * desiredSize;\n }\n selfClass.pcmSource.splice(desiredSize, pcmSourceLen - desiredSize); // removes 3rd element of array\n }\n}\n\nexport function string_jsonConvertToArray(ar_str) {\n let waves = [];\n if (typeof (ar_str) == 'object') {\n waves = ar_str;\n } else {\n try {\n waves = JSON.parse(ar_str);\n } catch (err) {\n\n }\n }\n\n return waves;\n}\n\n/**\n * should be called only once on init\n */\nexport function dzsap_singleton_ready_calls() {\n\n window.dzsap_singleton_ready_calls_is_called = true;\n\n\n let $feed_dzsapMainSettings = null;\n const $feed_dzsapMainSettingsAll = document.querySelectorAll('.dzsap-main-settings');\n if ($feed_dzsapMainSettingsAll.length) {\n $feed_dzsapMainSettings = $feed_dzsapMainSettingsAll[$feed_dzsapMainSettingsAll.length - 1];\n }\n if ($feed_dzsapMainSettings) {\n window.dzsap_settings = JSON.parse($feed_dzsapMainSettings.innerHTML);\n window.ajaxurl = window.dzsap_settings.ajax_url;\n window.dzsap_curr_user = window.dzsap_settings.dzsap_curr_user;\n }\n\n jQuery('body').append('');\n\n\n window.dzsap__style = jQuery('.dzsap--style');\n\n\n jQuery('audio.zoomsounds-from-audio').each(function () {\n var _t = jQuery(this);\n _t.after('
');\n _t.remove();\n })\n\n jQuery(document).on('focus.dzsap', 'input', function () {\n window.dzsap_currplayer_focused = null;\n })\n\n registerTextWidth(jQuery);\n\n dzsap_keyboardSetup();\n}\n\nexport function jQueryAuxBindings($) {\n\n\n function handleClick_onGlobalZoomSoundsButton(e) {\n var $t = $(this);\n\n\n e.preventDefault();\n e.stopPropagation();\n e.stopImmediatePropagation();\n\n if ($t.hasClass('audioplayer-song-changer')) {\n var _c = $($t.attr('data-fakeplayer')).eq(0);\n\n\n if (_c && _c.get(0) && _c.get(0).api_change_media) {\n _c.get(0).api_change_media($t, {\n 'feeder_type': 'button'\n , 'call_from': 'changed audioplayer-song-changer'\n });\n }\n\n return false;\n }\n\n\n }\n\n\n $(document).off('click.dzsap_metas')\n $(document).on('click.dzsap_metas', '.audioplayer-song-changer', handleClick_onGlobalZoomSoundsButton)\n\n\n}\n\n\n/**\n * for .zoomsounds-wrapper-bg-center\n * @param selfClass\n */\nexport function view_player_playMiscEffects(selfClass) {\n\n selfClass.$conPlayPause.addClass('playing');\n\n if (selfClass.cthis.parent().hasClass('zoomsounds-wrapper-bg-center')) {\n selfClass.cthis.parent().addClass('is-playing');\n }\n}\n\n\nexport function view_player_globalDetermineSyncPlayersIndex(selfClass) {\n\n if (selfClass._sourcePlayer === null && window.dzsap_syncList_players) {\n window.dzsap_syncList_players.forEach(($syncPlayer, index) => {\n if (selfClass.cthis.attr('data-playerid') == $syncPlayer.attr('data-playerid')) {\n window.dzsap_syncList_index = index;\n }\n })\n }\n}\n\n\nexport function player_view_addMetaLoaded(selfClass) {\n\n selfClass.cthis.addClass('meta-loaded');\n selfClass.cthis.removeClass('meta-fake');\n if (selfClass._sourcePlayer) {\n selfClass._sourcePlayer.addClass('meta-loaded');\n selfClass._sourcePlayer.removeClass('meta-fake');\n }\n if (selfClass.$totalTime) {\n\n selfClass.timeModel.refreshTimes();\n selfClass.$totalTime.html(formatTime(selfClass.timeModel.getVisualTotalTime()));\n }\n if (selfClass._sourcePlayer) {\n selfClass._sourcePlayer.addClass('meta-loaded');\n }\n}\n\n\n\nfunction htmlEntities(str) {\n return String(str).replace(/&/g, '&').replace(//g, '>').replace(/\"/g, '"');\n}\n\nexport function waitForScriptToBeAvailableThenExecute(verifyVar, callbackFn) {\n\n new Promise((resolve, reject) => {\n\n let checkInterval = 0;\n\n function checkIfVarExists() {\n if (verifyVar) {\n clearInterval(checkInterval);\n resolve('var exists');\n }\n }\n\n checkIfVarExists()\n checkInterval = setInterval(checkIfVarExists, 300);\n setTimeout(() => {\n reject('timeout');\n }, 5000);\n\n }).then((resolve => {\n callbackFn(resolve);\n })).catch((err) => {\n })\n}\n\n\n\n\nexport function player_reinit_findIfPcmNeedsGenerating(selfClass) {\n const o = selfClass.initOptions;\n\n if (selfClass.cthis.attr('data-pcm')) {\n selfClass.hasInitialPcmData = true;\n }\n\n if (!selfClass.hasInitialPcmData && o.skinwave_wave_mode === 'canvas' && (o.design_skin === 'skin-wave' || selfClass.cthis.attr('data-fakeplayer'))) {\n selfClass.isPcmRequiredToGenerate = true;\n }\n\n\n if (o.scrubbar_type === 'wave') {\n if (o.is_inited_from_playlist) {\n\n selfClass.cthis.addClass('scrubbar-type-wave--has-reveal-animation');\n }\n if (o.scrubbar_type_wave__has_reveal_animation === 'on') {\n\n selfClass.cthis.addClass('scrubbar-type-wave--has-reveal-animation');\n }\n if (selfClass.isPcmRequiredToGenerate) {\n selfClass.cthis.addClass('scrubbar-type-wave--has-reveal-animation');\n }\n }\n}\n\n\nexport function playerFunctions(selfClass, functionType) {\n var o = selfClass.initOptions;\n\n if (functionType === 'detectIds') {\n\n\n if (o.skinwave_comments_playerid === '') {\n if (typeof (selfClass.cthis.attr('id')) !== 'undefined') {\n selfClass.the_player_id = selfClass.cthis.attr('id');\n }\n }\n\n\n if (selfClass.the_player_id == '') {\n\n if (selfClass.cthis.attr('data-computed-playerid')) {\n selfClass.the_player_id = selfClass.cthis.attr('data-computed-playerid');\n }\n if (selfClass.cthis.attr('data-real-playerid')) {\n selfClass.the_player_id = selfClass.cthis.attr('data-real-playerid');\n }\n }\n selfClass.uniqueId = selfClass.the_player_id;\n\n if (typeof selfClass.uniqueId === 'string') {\n selfClass.uniqueId = selfClass.uniqueId.replace('ap', '');\n }\n selfClass.identifier_pcm = selfClass.uniqueId;\n\n\n if (selfClass.uniqueId === '') {\n o.skinwave_comments_enable = 'off';\n }\n\n }\n}\n\nexport function player_delete(selfClass) {\n\n var _con = null;\n if (selfClass.cthis.parent().parent().hasClass('dzsap-sticktobottom')) {\n _con = selfClass.cthis.parent().parent();\n }\n if (_con) {\n if (_con.prev().hasClass(\"dzsap-sticktobottom-placeholder\")) {\n _con.prev().remove();\n }\n _con.remove();\n }\n selfClass.cthis.remove();\n return false;\n}\n\n\n\nexport function sanitizeToHexColor(hexcolor) {\n if (hexcolor.indexOf('#') === -1) {\n hexcolor = '#' + hexcolor;\n }\n return hexcolor;\n}\n\nexport function player_identifySource(selfClass) {\n\n selfClass.data_source = selfClass.cthis.attr('data-source') || '';\n}\n\nexport function player_identifyTypes(selfClass) {\n\n\n var o = selfClass.initOptions;\n const cthis = selfClass.cthis;\n if (cthis.attr('data-type') === 'youtube') {\n o.type = 'youtube';\n selfClass.audioType = 'youtube';\n }\n if (cthis.attr('data-type') === 'soundcloud') {\n o.type = 'soundcloud';\n selfClass.audioType = 'soundcloud';\n\n o.skinwave_enableSpectrum = 'off';\n cthis.removeClass('skin-wave-is-spectrum');\n }\n if (cthis.attr('data-type') === 'mediafile') {\n o.type = 'audio';\n selfClass.audioType = 'audio';\n }\n\n if (cthis.attr('data-type') === 'shoutcast') {\n o.type = 'shoutcast';\n selfClass.audioType = 'audio';\n o.disable_timer = 'on';\n o.skinwave_enableSpectrum = 'off';\n\n if (!cthis.attr('data-streamtype')) {\n\n selfClass.audioTypeSelfHosted_streamType = 'shoutcast';\n }\n\n\n if (o.design_skin === 'skin-default') {\n o.disable_scrub = 'on';\n }\n\n }\n\n\n if (selfClass.audioType === 'audio' || selfClass.audioType === 'normal' || selfClass.audioType === '') {\n selfClass.audioType = 'selfHosted';\n }\n\n\n if (String(selfClass.data_source).indexOf('https://soundcloud.com/') > -1) {\n selfClass.audioType = 'soundcloud';\n }\n}\n\n\n\nexport function player_getPlayFromTime(selfClass) {\n\n selfClass.playFrom = selfClass.initOptions.playfrom;\n\n if (isValid(selfClass.cthis.attr('data-playfrom'))) {\n selfClass.playFrom = selfClass.cthis.attr('data-playfrom');\n }\n\n if (isNaN(parseInt(selfClass.playFrom, 10)) === false) {\n selfClass.playFrom = parseInt(selfClass.playFrom, 10);\n }\n\n\n if (selfClass.playFrom === 'off' || selfClass.playFrom === '') {\n if (get_query_arg(window.location.href, 'audio_time')) {\n selfClass.playFrom = sanitizeToIntFromPointTime(get_query_arg(window.location.href, 'audio_time'));\n }\n }\n\n if (selfClass.timeModel.sampleTimeStart) {\n if (selfClass.playFrom < selfClass.timeModel.sampleTimeStart) {\n selfClass.playFrom = selfClass.timeModel.sampleTimeStart;\n }\n if (typeof selfClass.playFrom === 'string') {\n selfClass.playFrom = selfClass.timeModel.sampleTimeStart;\n }\n }\n}\n\n\nexport function sanitizeToIntFromPointTime(arg) {\n\n\n arg = String(arg).replace('%3A', ':');\n arg = String(arg).replace('#', '');\n\n if (arg && String(arg).indexOf(':') > -1) {\n\n var arr = /(\\d.*):(\\d.*)/g.exec(arg);\n\n\n var m = parseInt(arr[1], 10);\n var s = parseInt(arr[2], 10);\n\n\n return (m * 60) + s;\n } else {\n return Number(arg);\n }\n}\n\n\n/**\n * called in player init()\n * @param {DzsAudioPlayer} selfClass\n */\nexport function player_determineStickToBottomContainer(selfClass) {\n\n let $conTest = selfClass.cthis.parent();\n\n\n\n if ($conTest.hasClass(DZSAP_PLAYER_CLASS_STICK_TO_BOTTOM)) {\n selfClass.$stickToBottomContainer = $conTest;\n selfClass.isStickyPlayer = true;\n\n }\n $conTest = selfClass.cthis.parent().parent();\n if ($conTest.hasClass(DZSAP_PLAYER_CLASS_STICK_TO_BOTTOM)) {\n selfClass.$stickToBottomContainer = $conTest;\n selfClass.isStickyPlayer = true;\n }\n}\n\n\n/**\n *\n * todo: maybe move\n * @param {DzsAudioPlayer} selfClass\n */\nexport function player_stickToBottomContainerDetermineClasses(selfClass) {\n\n if (selfClass.$stickToBottomContainer) {\n if (selfClass.cthis.hasClass('theme-dark')) {\n selfClass.$stickToBottomContainer.addClass('theme-dark');\n }\n\n setTimeout(function () {\n\n selfClass.$stickToBottomContainer.addClass('inited');\n }, 500)\n\n\n }\n\n}\n\nexport function player_service_getSourceProtection(selfClass) {\n\n return new Promise((resolve, reject) => {\n\n jQuery.ajax({\n type: \"POST\",\n url: selfClass.data_source,\n data: {},\n success: function (response) {\n resolve(response);\n },\n error: function (err) {\n reject(err);\n }\n });\n })\n}\n\nexport function player_isGoingToSetupMediaNow(selfClass) {\n return selfClass.audioTypeSelfHosted_streamType !== 'icecast' && selfClass.audioType !== 'youtube';\n}\n\n\nexport function player_stopOtherPlayers(dzsap_list, selfClass) {\n\n let i = 0;\n for (i = 0; i < dzsap_list.length; i++) {\n\n if (dzsap_list[i].get(0) && dzsap_list[i].get(0).api_pause_media && (dzsap_list[i].get(0) != selfClass.cthis.get(0))) {\n\n\n if (dzsap_list[i].data('type_audio_stop_buffer_on_unfocus') && dzsap_list[i].data('type_audio_stop_buffer_on_unfocus') === 'on') {\n dzsap_list[i].get(0).api_destroy_for_rebuffer();\n } else {\n dzsap_list[i].get(0).api_pause_media({\n 'audioapi_setlasttime': false\n });\n }\n }\n }\n}\n\n\nexport function player_syncPlayers_gotoItem(selfClass, targetIncrement) {\n if (window.dzsap_settings.syncPlayers_autoplayEnabled) {\n\n for (let keySyncPlayer in window.dzsap_syncList_players) {\n let $playerInSyncList = selfClass.cthis;\n\n if (selfClass._sourcePlayer) {\n $playerInSyncList = selfClass._sourcePlayer;\n }\n\n\n if (window.dzsap_syncList_players[keySyncPlayer].get(0) === $playerInSyncList.get(0)) {\n\n keySyncPlayer = parseInt(keySyncPlayer, 10);\n let targetIndex = window.dzsap_syncList_index + targetIncrement;\n if (targetIndex >= 0 && targetIndex < window.dzsap_syncList_players.length) {\n const $currentSyncPlayer_ = window.dzsap_syncList_players[targetIndex].get(0);\n\n\n if ($currentSyncPlayer_ && $currentSyncPlayer_.api_play_media) {\n setTimeout(function () {\n $currentSyncPlayer_.api_play_media({\n 'called_from': 'api_sync_players_prev'\n });\n }, 200);\n\n }\n }\n }\n }\n }\n\n}\n\nexport function player_syncPlayers_buildList() {\n\n if (!window.syncPlayers_isDzsapListBuilt) {\n\n window.dzsap_syncList_players = [];\n\n window.syncPlayers_isDzsapListBuilt = true;\n\n jQuery('.audioplayer.is-single-player,.audioplayer-tobe.is-single-player').each(function () {\n var _t23 = jQuery(this);\n\n\n if (_t23.hasClass(DZSAP_PLAYER_CLASS_FOOTER_PLAYER)) {\n return;\n }\n\n\n if (_t23.attr('data-do-not-include-in-list') !== 'on') {\n window.dzsap_syncList_players.push(_t23);\n }\n })\n\n\n clearTimeout(window.syncPlayers_buildTimeout);\n\n window.syncPlayers_buildTimeout = setTimeout(function () {\n window.syncPlayers_isDzsapListBuilt = false;\n }, 500);\n\n }\n}\n\n\n\nexport function convertPluginOptionsToFinalOptions(elThis, defaultOptions, argOptions = null, searchedAttr = 'data-options', $es) {\n\n var finalOptions = null;\n var tempOptions = {};\n var isSetFromJson = false;\n\n if ($es === undefined) {\n $es = jQuery;\n }\n\n\n var $elThis = $es(elThis);\n\n const isArgOptionsDefinedViaJs = Boolean(argOptions && typeof argOptions === 'object' && Object.keys(argOptions).length);\n\n\n if (isArgOptionsDefinedViaJs) {\n tempOptions = argOptions;\n } else {\n if ($elThis.attr(searchedAttr)) {\n try {\n tempOptions = JSON.parse($elThis.attr(searchedAttr));\n isSetFromJson = true;\n } catch (err) {\n\n }\n }\n if (!isSetFromJson) {\n if (typeof $elThis.attr(searchedAttr) != 'undefined' && $elThis.attr('data-options') != '') {\n let aux = $elThis.attr(searchedAttr);\n aux = 'var aux_opts = ' + aux;\n eval(aux);\n tempOptions = Object.assign({}, argOptions);\n }\n }\n }\n finalOptions = Object.assign(defaultOptions, tempOptions);\n\n return finalOptions;\n}\n\nexport function generateFakeArrayForPcm() {\n\n\n var maxlen = 256;\n\n var arr = [];\n\n for (let it1 = 0; it1 < maxlen; it1++) {\n arr[it1] = Math.random() * 100;\n\n }\n\n return arr;\n}\n","import {DZSAP_SCRIPT_SELECTOR_KEYBOARD} from \"../../configs/_constants\";\n\nexport const dzsap_generate_keyboard_controls = function () {\n let keyboard_controls = {\n 'play_trigger_step_back': 'off'\n , 'step_back_amount': '5'\n , 'step_back': '37'\n , 'step_forward': '39'\n , 'sync_players_goto_next': ''\n , 'sync_players_goto_prev': ''\n , 'pause_play': '32'\n , 'show_tooltips': 'off'\n }\n\n\n const $keyboardControlsInfo = jQuery(DZSAP_SCRIPT_SELECTOR_KEYBOARD);\n if ($keyboardControlsInfo.length) {\n window.dzsap_keyboard_controls = JSON.parse($keyboardControlsInfo.html());\n }\n\n if (window.dzsap_keyboard_controls) {\n keyboard_controls = jQuery.extend(keyboard_controls, window.dzsap_keyboard_controls);\n }\n\n keyboard_controls.step_back_amount = Number(keyboard_controls.step_back_amount);\n\n\n return keyboard_controls;\n};\n\n\nexport function handle_keypresses(e) {\n\n if (window.dzsap_isTextFieldFocused) {\n return;\n }\n\n\n function isKeyPressed(checkKeyCode) {\n let isKeyPressed = false;\n if (checkKeyCode.indexOf('ctrl+') > -1) {\n if (e.ctrlKey) {\n checkKeyCode = checkKeyCode.replace('ctrl+', '');\n if (e.keyCode === Number(checkKeyCode)) {\n isKeyPressed = true;\n }\n }\n } else {\n if (e.keyCode === Number(checkKeyCode)) {\n isKeyPressed = true;\n }\n }\n return isKeyPressed;\n }\n\n var $ = jQuery;\n\n const keyboard_controls = $.extend({}, dzsap_generate_keyboard_controls());\n\n\n if (dzsap_currplayer_focused && dzsap_currplayer_focused.api_pause_media) {\n\n if (isKeyPressed(keyboard_controls.pause_play)) {\n if (!$(dzsap_currplayer_focused).hasClass('comments-writer-active')) {\n if ($(dzsap_currplayer_focused).hasClass('is-playing')) {\n dzsap_currplayer_focused.api_pause_media();\n } else {\n dzsap_currplayer_focused.api_play_media();\n }\n\n if (window.dzsap_mouseover) {\n e.preventDefault();\n return false;\n }\n }\n }\n\n if (isKeyPressed(keyboard_controls.step_back)) {\n dzsap_currplayer_focused.api_step_back(keyboard_controls.step_back_amount);\n }\n\n if (isKeyPressed(keyboard_controls.step_forward)) {\n dzsap_currplayer_focused.api_step_forward(keyboard_controls.step_back_amount);\n }\n\n if (isKeyPressed(keyboard_controls.sync_players_goto_next)) {\n dzsap_currplayer_focused.api_sync_players_goto_next();\n }\n\n\n if (isKeyPressed(keyboard_controls.sync_players_goto_prev)) {\n dzsap_currplayer_focused.api_sync_players_goto_prev();\n }\n\n\n }\n}\n\n\n/**\n * called in singleton\n */\nexport const dzsap_keyboardSetup = () => {\n\n let $ = jQuery;\n\n window.dzsap_isTextFieldFocused = false;\n\n $(document).off('keydown.dzsapkeyup');\n $(document).on('keydown.dzsapkeyup', handle_keypresses);\n\n\n $(document).on('focus blur', 'textarea,input', function (e) {\n\n if (e.type == 'focusin' || e.type == 'focus') {\n\n window.dzsap_isTextFieldFocused = true;\n }\n if (e.type == 'focusout' || e.type == 'blur') {\n\n window.dzsap_isTextFieldFocused = false;\n }\n });\n\n\n $(document).on('keydown blur', '.zoomsounds-search-field', function (e) {\n const _t = $(e.currentTarget);\n\n setTimeout(function () {\n\n if (_t) {\n let $audioGallery = $('.audiogallery').eq(0);\n if (_t.attr('data-target')) {\n $audioGallery = $(_t.attr('data-target'));\n }\n if ($audioGallery.get(0) && $audioGallery.get(0).api_filter) {\n $audioGallery.get(0).api_filter('title', _t.val());\n }\n }\n }, 100);\n\n });\n}\n","import {getRelativeX} from \"../../../js_common/_dzs_helpers\";\nimport {formatTime, htmlEncode} from \"../../../jsinc/_dzsap_helpers\";\n\n\nwindow.dzsap_part_comments_loaded = true;\nconst TOOLTIP_ALL_TALIGN_CLASSES = `talign-start talign-center talign-end`;\nconst STRUCTURE_COMMENTS_WRITER = `
\n
\n\n
\n\n \n\n
\n
\n \n
\n
\n\n
commenting on 1:07
\n
\n
\n\n
\n
\n\n
\n
\n
\n
`;\n\n\n/**\n *\n * @param {DzsAudioPlayer} selfClass\n */\nconst hide_comments_writer = function (selfClass) {\n\n\n var $ = jQuery;\n\n\n selfClass.cthis.removeClass('comments-writer-active');\n selfClass._commentsHolder.find('.dzstooltip-con.placeholder').remove();\n selfClass.$commentsWritter.removeClass('active');\n selfClass.$commentsWritter.css({\n 'height': 0\n })\n\n\n if (selfClass.initOptions.parentgallery && $(selfClass.initOptions.parentgallery).get(0) !== undefined && $(selfClass.initOptions.parentgallery).get(0).api_handleResize !== undefined) {\n $(selfClass.initOptions.parentgallery).get(0).api_handleResize();\n }\n\n setTimeout(function () {\n\n selfClass.cthis.find('.comments-writter-temp-css,.dzsap-style-comments').remove();\n }, 300);\n};\n\n/**\n *\n * @param {DzsAudioPlayer} selfClass\n */\nwindow.comments_setupCommentsInitial = function (selfClass) {\n\n\n var $ = jQuery;\n var o = selfClass.initOptions;\n\n\n if (selfClass.cthis.find('.the-comments').length > 0 && selfClass.cthis.find('.the-comments').eq(0).children().length > 0) {\n selfClass.$commentsChildren = selfClass.cthis.find('.the-comments').eq(0).children();\n }\n\n var str_comments_holder = '
';\n\n\n if (o.skinwave_comments_links_to) {\n\n str_comments_holder += '';\n } else {\n\n str_comments_holder += '
';\n }\n\n\n str_comments_holder += '
' + STRUCTURE_COMMENTS_WRITER;\n\n\n selfClass._scrubbar.appendOnce(str_comments_holder);\n selfClass._commentsHolder = selfClass.cthis.find('.comments-holder').eq(0);\n selfClass.$commentsWritter = selfClass.cthis.find('.dzstooltip--comments-writer').eq(0);\n\n\n comments_setupCommentsHolder(selfClass);\n\n\n selfClass._commentsHolder.on('click', function (e) {\n comments_handleClickCommentsBg(selfClass, this, e);\n });\n selfClass._commentsHolder.on('mousemove', function (e) {\n\n selfClass._commentsHolder.find('.comments-avatar--placeholder').css('left', `${getRelativeX(e.pageX, e.currentTarget) - 7}px`)\n\n });\n selfClass.$commentsWritter.find('.dzstooltip--close').on('click', (e) => {\n comments_handleClickCancel(selfClass, e);\n });\n selfClass.$commentsWritter.find('.submit-ap-comment').on('click', (e) => {\n comments_handleClickSubmit(selfClass, e);\n });\n}\n\n\n/**\n *\n * @param {DzsAudioPlayer} selfClass\n */\nconst comments_setupCommentsHolder = function (selfClass) {\n\n\n var $ = jQuery;\n var o = selfClass.initOptions;\n\n if (selfClass._commentsHolder && selfClass.$commentsChildren) {\n\n\n selfClass.$commentsChildren.each(function () {\n\n var _c = $(this);\n\n\n if (o.skinwave_comments_process_in_php === 'on') {\n\n if (_c && _c.hasClass && _c.hasClass('dzstooltip-con')) {\n if (_c.find('.dzstooltip > .dzstooltip--inner').length) {\n\n } else {\n\n\n _c.find('.dzstooltip').wrapInner('
');\n\n\n _c.find('.the-avatar').addClass('tooltip-indicator');\n _c.find('.dzstooltip').before(_c.find('.tooltip-indicator'));\n _c.find('.dzstooltip').addClass('talign-start style-rounded color-dark-light');\n }\n }\n }\n\n selfClass._commentsHolder.append(_c);\n })\n }\n\n}\n\nfunction comments_updateCommentHolderTimerWhenReady(selfClass, percClickFromScrubWidth) {\n\n\n if (selfClass.timeModel.getVisualTotalTime()) {\n\n selfClass.$commentsWritter.find('.dzsap-comments--comment-form-label-time').html(formatTime(percClickFromScrubWidth * selfClass.timeModel.getVisualTotalTime()));\n } else {\n setTimeout(() => {\n comments_updateCommentHolderTimerWhenReady(selfClass, percClickFromScrubWidth);\n }, 100);\n }\n\n}\n\nconst comments_handleClickCommentsBg = function (selfClass, argThis, e) {\n\n\n var $ = jQuery;\n var o = selfClass.initOptions;\n\n var $commentsHolder = $(argThis);\n\n var leftMouseX = parseInt(e.clientX, 10) - $commentsHolder.offset().left;\n let percClickFromScrubWidth = leftMouseX / $commentsHolder.width();\n\n\n selfClass.commentPositionPerc = `calc(${(percClickFromScrubWidth) * 100}% - 7px)`;\n\n\n comments_updateCommentHolderTimerWhenReady(selfClass, percClickFromScrubWidth);\n\n if (o.skinwave_comments_links_to) {\n return;\n }\n if (o.skinwave_comments_allow_post_if_not_logged_in === 'off' && !(window.dzsap_settings && window.dzsap_settings.comments_username)) {\n return false;\n }\n\n // -- start\n\n var sw = true;\n\n\n selfClass._commentsHolder.children().each(function () {\n var $commentElement = $(this);\n\n\n if ($commentElement.hasClass('placeholder') || $commentElement.hasClass('the-bg')) {\n return;\n }\n\n var lmx2 = $commentElement.offset().left - $commentsHolder.offset().left;\n\n\n if (Math.abs(lmx2 - leftMouseX) < 20) {\n selfClass._commentsHolder.find('.dzstooltip-con.placeholder').remove();\n sw = false;\n\n return false;\n }\n })\n\n\n if (!sw) {\n return false;\n }\n\n\n // todo: assign left on tooltip\n selfClass.$commentsWritter.css({\n 'left': `${leftMouseX}px`\n })\n\n\n selfClass.$commentsWritter.css('top', ((parseInt(selfClass._commentsHolder.css('top'), 10) + 20) + 'px'))\n\n\n if (selfClass.$commentsWritter.hasClass('active') === false) {\n selfClass.$commentsWritter.addClass('active');\n selfClass.cthis.addClass('comments-writer-active');\n }\n\n\n if (window.dzsap_settings && window.dzsap_settings.comments_username) {\n selfClass.cthis.find('input[name=comment-email]').remove();\n } else {\n selfClass.$commentsWritter.find('.comments-writer--avatar-con').remove();\n }\n\n\n add_comments_placeholder(selfClass);\n\n\n}\n\nconst ajax_comment_publish = function (argp) {\n // -- only handles ajax call + result\n var selfClass = this;\n var $ = jQuery;\n var o = selfClass.initOptions;\n\n\n var mainarg = argp;\n var data = {\n action: 'dzsap_front_submitcomment',\n postdata: mainarg,\n playerid: selfClass.the_player_id,\n comm_position: selfClass.commentPositionPerc,\n };\n\n if (window.dzsap_settings) {\n data.skinwave_comments_avatar = window.dzsap_settings.comments_avatar;\n data.skinwave_comments_account = window.dzsap_settings.comments_username;\n }\n\n if (selfClass.cthis.find('*[name=comment-email]').length > 0) {\n data.email = selfClass.cthis.find('*[name=comment-email]').eq(0).val();\n }\n\n\n if (selfClass.urlToAjaxHandler) {\n jQuery.ajax({\n type: \"POST\",\n url: selfClass.urlToAjaxHandler,\n data: data,\n success: function (response) {\n if (response.charAt(response.length - 1) == '0') {\n response = response.slice(0, response.length - 1);\n }\n\n\n var fout_tooltipData = '';\n\n // -- process php\n fout_tooltipData = '';\n fout_tooltipData += `
@${window.dzsap_settings.comments_username} says:
${htmlEncode(data.postdata)}
`;\n\n\n selfClass._commentsHolder.append(fout_tooltipData);\n\n\n if (selfClass.action_audio_comment) {\n selfClass.action_audio_comment(selfClass.cthis, fout_tooltipData);\n }\n\n\n },\n error: function (arg) {\n\n selfClass._commentsHolder.append(data.postdata);\n }\n });\n }\n}\n\n\n/**\n *\n * @param {DzsAudioPlayer} selfClass\n */\nfunction add_comments_placeholder(selfClass) {\n\n var strCommentsAvatarUrl = '';\n\n if (window.dzsap_settings && window.dzsap_settings.comments_avatar) {\n strCommentsAvatarUrl = window.dzsap_settings.comments_avatar;\n }\n\n selfClass._commentsHolder.remove('.dzsap-style-comments');\n selfClass._commentsHolder.append('')\n selfClass._commentsHolder.find('.dzstooltip-con.placeholder').remove();\n selfClass._commentsHolder.append('
');\n}\n\nconst comments_handleClickCancel = function (selfClass, e) {\n hide_comments_writer(selfClass);\n}\n\n\nfunction comment_submit(selfClass, comment_text, comment_email, comment_username) {\n\n var $ = jQuery;\n var o = selfClass.initOptions;\n\n var comm_author = '';\n if (comment_email) {\n const regex_mail = /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n\n if (regex_mail.test(comment_email) == false) {\n alert('please insert email, your email is just used for gravatar. it will not be sent or stored anywhere');\n return false;\n }\n\n comm_author = String(comment_email).split('@')[0];\n\n\n if (selfClass.$commentsSelector) {\n\n selfClass.$commentsSelector.find('*[name=comment_email],*[name=comment_user]').remove();\n }\n\n if (!window.dzsap_settings) {\n window.dzsap_settings = {};\n }\n\n window.dzsap_settings.comments_username = comm_author;\n window.dzsap_settings.comments_avatar = 'https://secure.gravatar.com/avatar/' + window.MD5(String(selfClass.cthis.find('input[name=comment-email]').eq(0).val()).toLowerCase()) + '?s=20';\n }\n\n\n var aux = '';\n\n\n // -- process php\n\n aux += comment_text;\n\n\n selfClass.cthis.find('*[name=comment-text]').eq(0).val('');\n\n\n selfClass.cthis.find('.comments-writter-temp-css,.dzsap-style-comments').remove();\n\n\n (ajax_comment_publish.bind(selfClass))(aux);\n\n hide_comments_writer(selfClass);\n\n if (o.parentgallery && $(o.parentgallery).get(0) != undefined && $(o.parentgallery).get(0).api_player_commentSubmitted != undefined) {\n $(o.parentgallery).get(0).api_player_commentSubmitted();\n }\n\n}\n\n\n/**\n *\n * @param selfClass\n * @param e\n * @returns {boolean}\n */\nconst comments_handleClickSubmit = function (selfClass, e) {\n\n var comment_email = '';\n\n if (selfClass.cthis.find('input[name=comment-email]').length) {\n comment_email = selfClass.cthis.find('input[name=comment-email]').eq(0).val();\n }\n\n\n comment_submit(selfClass, selfClass.cthis.find('*[name=comment-text]').eq(0).val(), comment_email);\n\n\n return false;\n}\n\n\n/**\n *\n * @param {DzsAudioPlayer} selfClass\n * @param e\n * @returns {boolean}\n */\nexport const comments_selector_event = function (selfClass, e) {\n const $ = jQuery;\n const _t = $(this);\n let _con = null;\n\n\n if (_t.parent().parent().hasClass('zoomsounds-comment-wrapper')) {\n _con = _t.parent().parent();\n }\n if (_t.parent().parent().parent().hasClass('zoomsounds-comment-wrapper')) {\n _con = _t.parent().parent().parent();\n }\n\n if (e.type == 'focusin') {\n var spx = selfClass.timeCurrent / selfClass.timeTotal * selfClass._commentsHolder.width();\n spx += 'px';\n selfClass.commentPositionPerc = `calc(${selfClass.timeCurrent / selfClass.timeTotal * 100}% - 7px)`;\n\n _con.addClass('active');\n\n add_comments_placeholder(selfClass);\n }\n if (e.type == 'focusout') {\n\n\n }\n if (e.type == 'click') {\n\n if (_t.hasClass('dzstooltip--close')) {\n\n _con.removeClass('active');\n _con.find('input').val('');\n }\n if (_t.hasClass('comments-btn-submit')) {\n\n\n var comment_email = '';\n\n if (_con.find('.comment_email').length) {\n comment_email = _con.find('.comment_email').eq(0).val();\n }\n\n\n comment_submit(selfClass, _con.find('.comment_text').eq(0).val(), comment_email);\n\n\n _con.removeClass('active');\n _con.find('input').val('');\n\n\n return false;\n }\n\n\n }\n}\n\n\nwindow.player_commentsSelectorInit = function(selfClass, $, cthis, o){\n\n selfClass.$commentsSelector = jQuery(o.skinwave_comments_mode_outer_selector);\n\n if (selfClass.$commentsSelector.data) {\n\n selfClass.$commentsSelector.data('parent', cthis);\n\n if (window.dzsap_settings.comments_username) {\n selfClass.$commentsSelector.find('.comment_email,*[name=comment_user]').remove();\n }\n\n selfClass.$commentsSelector.on('click', '.dzstooltip--close,.comments-btn-submit', comments_selector_event);\n selfClass.$commentsSelector.on('focusin', 'input', comments_selector_event);\n selfClass.$commentsSelector.on('focusout', 'input', comments_selector_event);\n\n } else {\n console.log('%c, data not available .. ', 'color: #990000;', $(o.skinwave_comments_mode_outer_selector));\n }\n}\n","export const ConstantsDzsAp = {\n PLAYLIST_TRANSITION_DURATION: 300,\n 'DEBUG_STYLE_1': 'background-color: #aaa022; color: #222222;',\n 'DEBUG_STYLE_2': 'background-color: #7c3b8e; color: #ffffff;',\n 'DEBUG_STYLE_3': 'background-color: #3a696b; color: #eeeeee;',\n 'DEBUG_STYLE_ERROR': 'background-color: #3a696b; color: #eeeeee;',\n URL_WAVESURFER_HELPER_BACKUP: 'https://zoomthe.me/assets/dzsap-wave-generate.js',\n WAVESURFER_MAX_TIMEOUT: 20000,\n URL_JQUERY: 'https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js',\n DEBUG_STYLE_PLAY_FUNCTIONS: 'background-color: #daffda; color: #222222;',\n ERRORED_OUT_CLASS: 'errored-out',\n ERRORED_OUT_MAX_ATTEMPTS: 5\n}\n\nexport const DZSAP_PLAYER_CLASS_FOOTER_PLAYER = 'dzsap_footer';\nexport const DZSAP_PLAYER_CLASS_LOADED = 'dzsap-loaded';\nexport const DZSAP_PLAYER_CLASS_FOR_STICK_TO_BOTTOM_SHOW = 'audioplayer-loaded';\nexport const DZSAP_PLAYER_CLASS_STICK_TO_BOTTOM = 'dzsap-sticktobottom';\nexport const DZSAP_PLAYER_PLACEHOLDER_CLASS_STICK_TO_BOTTOM = 'dzsap-sticktobottom-placeholder';\nexport const DZSAP_PLAYER_TYPE_FOR_ACCEPTING_FEED = 'fake';\nexport const DZSAP_PLAYER_ATTR_PLAY_FROM_LAST_POS = 'last';\n\nexport const DZSAP_SCRIPT_SELECTOR_MAIN_SETTINGS = '#dzsap-main-settings';\nexport const DZSAP_SCRIPT_SELECTOR_KEYBOARD = '#dzsap-keyboard-controls';\nexport const DZSAP_VIEW_PLAYER_PLAYING_EASED_TIMEOUT = 500;\n"]}