????

Your IP : 18.118.142.235


Current Path : /proc/self/cwd/wp-content/plugins/presto-player/dist/components/cjs/
Upload File :
Current File : //proc/self/cwd/wp-content/plugins/presto-player/dist/components/cjs/learndash-61b60370.js.map

{"file":"learndash-61b60370.js","mappings":";;;;;;AAEA,kBAAe,MAAM,IAAI;AACzB,EAAE,IAAI,OAAO,oBAAoB,KAAK,WAAW,IAAI,oBAAoB,EAAE,qBAAqB,KAAK,QAAQ,EAAE;AAC/G,IAAI,OAAO;AACX,GAAG;AACH;AACA,EAAEA,2FAAc,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AAC/B;AACA;AACA;AACA,EAAE,MAAM,CAAC,oBAAoB,CAAC,oBAAoB,GAAG,YAAY,EAAE,SAAS,EAAE,0BAA0B,KAAK,IAAI,CAAC;AAClH,EAAE,MAAM,CAAC,oBAAoB,CAAC,2BAA2B,GAAG,OAAO,KAAK,oBAAoB,EAAE,YAAY,IAAI,YAAY,EAAE,SAAS,EAAE,iCAAiC,KAAK,IAAI,CAAC;AAClL,EAAE,MAAM,CAAC,oBAAoB,CAAC,0BAA0B,GAAG,YAAY,EAAE,SAAS,EAAE,gCAAgC,CAAC;AACrH,EAAE,MAAM,CAAC,oBAAoB,CAAC,kCAAkC,GAAG,YAAY,EAAE,SAAS,EAAE,kCAAkC,CAAC;AAC/H;AACA;AACA,EAAE,MAAM,CAAC,oBAAoB,CAAC,gBAAgB,GAAG,GAAG,CAAC;AACrD;AACA;AACA,GAAG,MAAM,CAAC,YAAY;AACtB,IAAI,IAAI,oBAAoB,CAAC,WAAW,KAAK,GAAG,EAAE;AAClD,MAAM,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;AAClC,KAAK;AACL;AACA,IAAI,IAAI,QAAQ,CAAC,gBAAgB,CAAC,oEAAoE,GAAG,oBAAoB,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAAC,MAAM,EAAE;AACpK,MAAM,IAAI,oBAAoB,CAAC,WAAW,KAAK,GAAG,EAA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mC,CAAC,gBAAgB,CAAC,WAAW,CAAC,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;AACzG,aAAa,CAAC,CAAC;AACf;AACA;AACA,YAAY,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,oBAAoB,EAAE,eAAe,EAAE,MAAM,IAAI;AAChF,cAAc,IAAI,oBAAoB,CAAC,WAAW,KAAK,GAAG,EAAE;AAC5D,gBAAgB,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;AACnD,eAAe;AACf;AACA,cAAc,IAAI,oBAAoB,CAAC,WAAW,KAAK,GAAG,EAAE;AAC5D,gBAAgB,OAAO,CAAC,GAAG,CAAC,6CAA6C,CAAC,CAAC;AAC3E,eAAe;AACf,cAAc,mCAAmC,CAAC,gBAAgB,CAAC,WAAW,CAAC,EAAE,YAAY,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;AACnH,cAAc,mCAAmC,CAAC,gBAAgB,CAAC,WAAW,CAAC,EAAE,aAAa,EAAE,UAAU,CAAC,CAAC;AAC5G;AACA,cAAc,IAAI,oBAAoB,CAAC,WAAW,KAAK,GAAG,EAAE;AAC5D,gBAAgB,OAAO,CAAC,GAAG,CAAC,iDAAiD,CAAC,CAAC;AAC/E,eAAe;AACf,cAAc,wBAAwB,CAAC,KAAK,CAAC,CAAC;AAC9C;AACA;AACA,cAAc,yBAAyB,EAAE,CAAC;AAC1C,aAAa,CAAC,CAAC;AACf,WAAW;AACX,SAAS,CAAC,CAAC;AACX,KAAK;AACL,GAAG,CAAC,CAAC;AACL,CAAC;;;;","names":["resumeProgress"],"sources":["src/components/core/player/integrations/learndash.js"],"sourcesContent":["import { resumeProgress } from '../functions/save-time';\n\nexport default player => {\n  if (typeof learndash_video_data === 'undefined' || learndash_video_data?.videos_found_provider !== 'presto') {\n    return;\n  }\n\n  resumeProgress(player, true); // maybe resume progress\n\n  // Learndash has this logic in a shitty method on their php class\n  // we have to fake it here since we don't have access to it\n  window.learndash_video_data.videos_auto_complete = prestoPlayer?.learndash?.lesson_video_auto_complete === 'on';\n  window.learndash_video_data.videos_hide_complete_button = 'AFTER' === learndash_video_data?.videos_shown && prestoPlayer?.learndash?.lesson_video_hide_complete_button === 'on';\n  window.learndash_video_data.videos_auto_complete_delay = prestoPlayer?.learndash?.lesson_video_auto_complete_delay;\n  window.learndash_video_data.videos_auto_complete_delay_message = prestoPlayer?.learndash?.videos_auto_complete_delay_message;\n\n  // Temporarily set the video track path to '/' to set the cookie globally\n  window.learndash_video_data.video_track_path = '/';\n\n   // Set learndash video players\n   jQuery(function () {\n    if (learndash_video_data.video_debug === '1') {\n      console.log('PRESTO: init');\n    }\n\n    if (document.querySelectorAll('presto-player[data-video-progression=\"true\"][data-video-provider=\"' + learndash_video_data.videos_found_provider + '\"]').length) {\n      if (learndash_video_data.video_debug === '1') {\n        console.log('PRESTO: calling LearnDash_disable_assets(true)');\n      }\n\n      // Disable learndash assets and watch players.\n      LearnDash_disable_assets(true);\n      LearnDash_watchPlayers();\n\n      // Go through all the <presto-player> instances\n      document\n        .querySelectorAll('presto-player[data-video-progression=\"true\"][data-video-provider=\"' + learndash_video_data.videos_found_provider + '\"]')\n        .forEach(function (element, index) {\n          console.log({element});\n          var element_key = 'presto-player__wrapper-player-' + index;\n          var element_id = element.getAttribute('id');\n\n          if (typeof element_id === 'undefined' || element_id == '') {\n            element_id = element_key;\n            element.setAttribute('id', element_id);\n          }\n\n          ld_video_players[element_key] = {};\n          ld_video_players[element_key]['player_key'] = element_key;\n          ld_video_players[element_key]['player_type'] = learndash_video_data.videos_found_provider;\n          ld_video_players[element_key]['player_id'] = element_id;\n          ld_video_players[element_key]['player_wrapper'] = element.closest('presto-player');\n          if (typeof ld_video_players[element_key]['player_wrapper'] !== 'undefined') {\n            ld_video_players[element_key]['player_cookie_key'] = ld_video_players[element_key]['player_wrapper'].getAttribute('data-video-cookie-key');\n          } else {\n            ld_video_players[element_key]['player_cookie_key'] = '';\n          }\n          ld_video_players[element_key]['player_cookie_values'] = LearnDash_Video_Progress_initSettings(ld_video_players[element_key]);\n\n          // Check if video has been completed already.\n          // If yes, enable the assets back and end watch players function.\n          // If no, then apply all the filters and performs the actions again.\n          if (LearnDash_Video_Progress_getSetting(ld_video_players[element_key], 'video_state') === 'complete') {\n            LearnDash_disable_assets(false);\n            LearnDash_watchPlayersEnd();\n          } else {\n            // Player Seeked.\n            wp.hooks.addAction('presto.playerTimeUpdate', 'presto-player', player => {\n              if (learndash_video_data.video_debug === '1') {\n                console.log('PRESTO: Video is playing');\n              }\n              LearnDash_Video_Progress_setSetting(ld_video_players[element_key], 'video_duration', player.duration);\n              LearnDash_Video_Progress_setSetting(ld_video_players[element_key], 'video_time', player.currentTime);\n\n              if (player.duration && player.duration === player.currentTime) {\n                LearnDash_Video_Progress_setSetting(ld_video_players[element_key], 'video_state', 'complete');\n\n                if (learndash_video_data.video_debug === '1') {\n                  console.log('PRESTO: calling LearnDash_disable_assets(false)');\n                }\n                LearnDash_disable_assets(false);\n\n                // Stop watching players.\n                LearnDash_watchPlayersEnd();\n              }\n            });\n\n            // Player Playing.\n            wp.hooks.addAction('presto.playerPlaying', 'presto-player', player => {\n              if (learndash_video_data.video_debug === '1') {\n                console.log('PRESTO: Video is playing');\n              }\n              LearnDash_Video_Progress_setSetting(ld_video_players[element_key], 'video_duration', player.duration);\n              LearnDash_Video_Progress_setSetting(ld_video_players[element_key], 'video_time', player.currentTime);\n              LearnDash_Video_Progress_setSetting(ld_video_players[element_key], 'video_state', 'play');\n            });\n\n            // Player Paused.\n            wp.hooks.addAction('presto.playerPause', 'presto-player', player => {\n              if (learndash_video_data.video_debug === '1') {\n                console.log('PRESTO: Video is paused');\n              }\n              LearnDash_Video_Progress_setSetting(ld_video_players[element_key], 'video_time', player.currentTime);\n              console.log(player.duration);\n              console.log(player.currentTime);\n              LearnDash_Video_Progress_setSetting(ld_video_players[element_key], 'video_state', 'pause');\n            });\n\n            // Player Ended.\n            wp.hooks.addAction('presto.playerEnded', 'presto-player', player => {\n              if (learndash_video_data.video_debug === '1') {\n                console.log('PRESTO: video ended');\n              }\n\n              if (learndash_video_data.video_debug === '1') {\n                console.log(\"PRESTO: setting 'video_state' to 'complete'\");\n              }\n              LearnDash_Video_Progress_setSetting(ld_video_players[element_key], 'video_time', player.currentTime);\n              LearnDash_Video_Progress_setSetting(ld_video_players[element_key], 'video_state', 'complete');\n\n              if (learndash_video_data.video_debug === '1') {\n                console.log('PRESTO: calling LearnDash_disable_assets(false)');\n              }\n              LearnDash_disable_assets(false);\n\n              // Stop watching players.\n              LearnDash_watchPlayersEnd();\n            });\n          }\n        });\n    }\n  });\n};\n"],"version":3}