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IC,EAAS,KAAON,EAAUK,EAAIC,EAAS,KAAON,EAAUK,EAAIC,EAAS,MAAMC,aACvf,CCYA,MAxBA,SAAYC,EAASC,EAAKH,GACxB,GAAI,EAAOd,aAAeiB,IAAQD,EAChC,OAAO,EAAOhB,aAIhB,MAAMkB,GADNF,EAAUA,GAAW,CAAC,GACDG,SAAWH,EAAQV,KAAOA,KAK/C,GAHAY,EAAK,GAAe,GAAVA,EAAK,GAAY,GAC3BA,EAAK,GAAe,GAAVA,EAAK,GAAY,IAEvBD,EAAK,CACPH,EAASA,GAAU,EAEnB,IAAK,IAAIL,EAAI,EAAGA,EAAI,KAAMA,EACxBQ,EAAIH,EAASL,GAAKS,EAAKT,GAGzB,OAAOQ,CACT,CAEA,OAAOL,EAAgBM,EACzB,C","sources":["webpack://rockworld/./app/hooks/useVideoTracking.ts","webpack://rockworld/./app/components/molecules/Embed23Video/Embed23Video.tsx","webpack://rockworld/./app/scripts/core/views/embed-23-video.ts","webpack://rockworld/./app/scripts/core/views/vanilla/elementsFactory.ts","webpack://rockworld/./app/utils/random.ts","webpack://rockworld/./node_modules/uuid/dist/esm-browser/native.js","webpack://rockworld/./node_modules/uuid/dist/esm-browser/rng.js","webpack://rockworld/./node_modules/uuid/dist/esm-browser/stringify.js","webpack://rockworld/./node_modules/uuid/dist/esm-browser/v4.js"],"sourcesContent":["import { getRandomHash } from '@utils/random';\r\nimport { useCallback, useEffect, useRef, useState } from 'react';\r\n\r\nexport const useVideoTracking = () => {\r\n  const [videoId] = useState(getRandomHash());\r\n  const callbackCountRef = useRef(0);\r\n  const iFrameCallbacksRef = useRef({});\r\n  const [iFrameElement, setIFrameElement] = useState<HTMLIFrameElement | null>(null);\r\n  const [timeUpdateValue, setTimeUpdateValue] = useState(0);\r\n  const [videoTitle, setVideoTitle] = useState('');\r\n  const [videoPlayed, setVideoPlayed] = useState(true);\r\n  const [videoDuration, setVideoDuration] = useState(0);\r\n  const [isIframeReady, setIsIframeReady] = useState(false);\r\n  const [timeCheckpoints, setTimeCheckpoints] = useState([\r\n    { percent: 0.1, done: false },\r\n    { percent: 0.25, done: false },\r\n    { percent: 0.5, done: false },\r\n    { percent: 0.75, done: false },\r\n    { percent: 0.9, done: false },\r\n  ]);\r\n\r\n  const receiveMessage = (event: MessageEvent) => {\r\n    let data: {\r\n      event?: string;\r\n      cbId: string;\r\n      a: string | number;\r\n      b: string | number;\r\n    };\r\n    try {\r\n      data = JSON.parse(event.data);\r\n    } catch (err) {\r\n      return;\r\n    }\r\n    if (data?.event === 'ready') {\r\n      setIsIframeReady(true);\r\n    }\r\n\r\n    if (!data?.cbId) return;\r\n\r\n    const videoIdCbId = data.cbId.split('__')[0];\r\n    if (videoIdCbId !== videoId) return;\r\n\r\n    const callback = iFrameCallbacksRef.current[data.cbId];\r\n\r\n    if (callback) {\r\n      callback.apply(this, [data.a, data.b]);\r\n    }\r\n  };\r\n\r\n  const postMessage = (\r\n    type: string,\r\n    event: string,\r\n    callback: (a: string | number, b: string | number) => void\r\n  ): void => {\r\n    callbackCountRef.current += 1;\r\n    const cbId: string = `${videoId}__${callbackCountRef.current}`;\r\n    const args: string[] = [event];\r\n\r\n    const messageObj = {\r\n      f: type,\r\n      args,\r\n      cbId,\r\n    };\r\n\r\n    iFrameCallbacksRef.current[cbId] = callback;\r\n    iFrameElement.contentWindow?.postMessage(JSON.stringify(messageObj), '*');\r\n  };\r\n\r\n  const getVideoPlay = useCallback(() => {\r\n    if (!videoPlayed) {\r\n      setVideoPlayed(true);\r\n    }\r\n  }, [videoPlayed]);\r\n\r\n  const getVideoTitle = useCallback((title: string) => {\r\n    setVideoTitle(title);\r\n  }, []);\r\n\r\n  const getVideoDuration = useCallback((duration: number) => {\r\n    setVideoDuration(duration);\r\n  }, []);\r\n\r\n  const timeupdate = useCallback(() => {\r\n    setTimeUpdateValue((prev) => prev + 1);\r\n  }, []);\r\n\r\n  const getcurrentTime = useCallback(\r\n    (time: number) => {\r\n      const highestPassedCheckpoint = [...timeCheckpoints]\r\n        .reverse()\r\n        .find((checkpoint) => time / videoDuration >= checkpoint.percent);\r\n\r\n      if (highestPassedCheckpoint && !highestPassedCheckpoint.done) {\r\n        const eventName = highestPassedCheckpoint.percent === 0.9 ? 'video_complete' : 'video_percentile';\r\n        App.tracking.trackCustomEvent(eventName, {\r\n          video_title: videoTitle,\r\n          video_category: 'Learnings',\r\n          video_percent: highestPassedCheckpoint.percent * 100,\r\n        });\r\n      }\r\n\r\n      setTimeCheckpoints(\r\n        timeCheckpoints.map((checkpoint) =>\r\n          time / videoDuration >= checkpoint.percent ? { ...checkpoint, done: true } : checkpoint\r\n        )\r\n      );\r\n    },\r\n    [videoDuration, videoTitle, timeCheckpoints]\r\n  );\r\n\r\n  useEffect(() => {\r\n    if (iFrameElement) {\r\n      postMessage('get', 'video_title', getVideoTitle);\r\n      postMessage('get', 'duration', getVideoDuration);\r\n    }\r\n  }, [iFrameElement]);\r\n\r\n  useEffect(() => {\r\n    if (videoTitle && videoDuration) {\r\n      postMessage('bind', 'player:video:timeupdate', timeupdate);\r\n      // in case video is autoplaying\r\n      postMessage('get', 'player:video:playing', getVideoPlay);\r\n      // in case user started playing the video\r\n      postMessage('bind', 'player:video:play', getVideoPlay);\r\n    }\r\n  }, [videoTitle, videoDuration]);\r\n\r\n  useEffect(() => {\r\n    if (timeUpdateValue > 0) {\r\n      postMessage('get', 'currentTime', getcurrentTime);\r\n    }\r\n  }, [timeUpdateValue]);\r\n\r\n  useEffect(() => {\r\n    if (videoPlayed && videoTitle) {\r\n      App.tracking.trackCustomEvent('video_play', { video_title: videoTitle, video_category: 'Learnings' });\r\n    }\r\n  }, [videoPlayed, videoTitle]);\r\n\r\n  useEffect(() => {\r\n    window.addEventListener('message', receiveMessage, false);\r\n\r\n    return () => {\r\n      window.removeEventListener('message', receiveMessage, false);\r\n    };\r\n  }, [receiveMessage]);\r\n\r\n  return {\r\n    videoId,\r\n    iFrameElement,\r\n    setIFrameElement,\r\n    timeUpdateValue,\r\n    setTimeUpdateValue,\r\n    videoTitle,\r\n    setVideoTitle,\r\n    videoPlayed,\r\n    setVideoPlayed,\r\n    videoDuration,\r\n    setVideoDuration,\r\n    timeCheckpoints,\r\n    setTimeCheckpoints,\r\n    isIframeReady,\r\n  };\r\n};\r\n","import React, { FC, useEffect } from 'react';\r\nimport { useVideoTracking } from '@hooks/useVideoTracking';\r\nimport { createRoot } from 'react-dom/client';\r\n\r\ndeclare global {\r\n  interface Window {\r\n    twentyThreeUpdateGTMPlayers?: () => void;\r\n  }\r\n}\r\n\r\ntype Embed23Video = {\r\n  iframe: HTMLIFrameElement;\r\n};\r\n\r\nconst Embed23Video: FC<Embed23Video> = ({ iframe }) => {\r\n  const { isIframeReady, setIFrameElement } = useVideoTracking();\r\n\r\n  useEffect(() => {\r\n    if (window.twentyThreeUpdateGTMPlayers) {\r\n      window.twentyThreeUpdateGTMPlayers();\r\n      console.log('connected fresh players!');\r\n    }\r\n\r\n    if (iframe && isIframeReady) {\r\n      setIFrameElement(iframe);\r\n    }\r\n  }, [iframe, isIframeReady]);\r\n\r\n  return null;\r\n};\r\n\r\nexport { Embed23Video };\r\n\r\nexport const renderEmbed23VideoComponent = (el: HTMLIFrameElement) => {\r\n  const embed23VideoDiv = document.createElement('div');\r\n  embed23VideoDiv.id = 'embed23video';\r\n  el.appendChild(embed23VideoDiv);\r\n  const root = createRoot(embed23VideoDiv);\r\n  root.render(<Embed23Video iframe={el} />);\r\n};\r\n","import { renderEmbed23VideoComponent } from '@molecules/Embed23Video/Embed23Video';\r\nimport { elementsFactory } from './vanilla/elementsFactory';\r\n\r\nconst render = (el: HTMLIFrameElement): void => {\r\n   renderEmbed23VideoComponent(el)\r\n};\r\n\r\nexport default elementsFactory('iframe[src*=\"/v.ihtml/player.html\"]', render, () => {}, false).create;\r\n","import type { FuncCreateElements } from './types';\r\n\r\nexport const elementsFactory = (name: string, render: FuncCreateElements, destroy?: () => void, isClass = true) => {\r\n  const elements = document.querySelectorAll(isClass ? `.${name}` : name);\r\n\r\n  const create = () => {\r\n    [].forEach.call(elements, (el: HTMLElement) => {\r\n      if (el.dataset.initilaizedElements == null || !el.dataset.initilaizedElements.includes(name)) {\r\n        render(el);\r\n        el.dataset.initilaizedElements = `${el.dataset.initilaizedElements ?? ''} ${name}`;\r\n      }\r\n    });\r\n  };\r\n\r\n  const destroyElements = () => {\r\n    if (destroy) {\r\n      [].forEach.call(elements, (el: { dataset: { initilaizedElements: string } }) => {\r\n        destroy();\r\n        if (el.dataset.initilaizedElements) {\r\n          el.dataset.initilaizedElements = el.dataset.initilaizedElements.replace(name, '');\r\n        }\r\n      });\r\n    }\r\n  };\r\n\r\n  return { create, destroy: destroyElements };\r\n};\r\n","import { v4 as uuid } from 'uuid';\r\n\r\nexport const getRandomHash = (length: number = 6) => {\r\n  const value = uuid().slice(0, length);\r\n  return value;\r\n};\r\n","const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default {\n  randomUUID\n};","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n  // lazy load so that environments that need to polyfill have a chance to do so\n  if (!getRandomValues) {\n    // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n    getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n    if (!getRandomValues) {\n      throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n    }\n  }\n\n  return getRandomValues(rnds8);\n}","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n  byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nexport function unsafeStringify(arr, offset = 0) {\n  // Note: Be careful editing this code!  It's been tuned for performance\n  // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n  return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();\n}\n\nfunction stringify(arr, offset = 0) {\n  const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID.  If this throws, it's likely due to one\n  // of the following:\n  // - One or more input array values don't map to a hex octet (leading to\n  // \"undefined\" in the uuid)\n  // - Invalid input values for the RFC `version` or `variant` fields\n\n  if (!validate(uuid)) {\n    throw TypeError('Stringified UUID is invalid');\n  }\n\n  return uuid;\n}\n\nexport default stringify;","import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\n\nfunction v4(options, buf, offset) {\n  if (native.randomUUID && !buf && !options) {\n    return native.randomUUID();\n  }\n\n  options = options || {};\n  const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n  rnds[6] = rnds[6] & 0x0f | 0x40;\n  rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n  if (buf) {\n    offset = offset || 0;\n\n    for (let i = 0; i < 16; ++i) {\n      buf[offset + i] = rnds[i];\n    }\n\n    return buf;\n  }\n\n  return unsafeStringify(rnds);\n}\n\nexport default v4;"],"names":["useVideoTracking","videoId","useState","getRandomHash","callbackCountRef","useRef","iFrameCallbacksRef","iFrameElement","setIFrameElement","timeUpdateValue","setTimeUpdateValue","videoTitle","setVideoTitle","videoPlayed","setVideoPlayed","videoDuration","setVideoDuration","isIframeReady","setIsIframeReady","timeCheckpoints","setTimeCheckpoints","percent","done","receiveMessage","event","data","JSON","parse","err","cbId","split","callback","current","apply","a","b","postMessage","type","messageObj","f","args","contentWindow","stringify","getVideoPlay","useCallback","getVideoTitle","title","getVideoDuration","duration","timeupdate","prev","getcurrentTime","time","highestPassedCheckpoint","reverse","find","checkpoint","eventName","App","tracking","trackCustomEvent","video_title","video_category","video_percent","map","_objectSpread","useEffect","window","addEventListener","removeEventListener","Embed23Video","_ref","iframe","twentyThreeUpdateGTMPlayers","console","log","elementsFactory","el","embed23VideoDiv","document","createElement","id","appendChild","createRoot","render","React","renderEmbed23VideoComponent","name","destroy","isClass","arguments","length","undefined","elements","querySelectorAll","create","forEach","call","dataset","initilaizedElements","includes","destroyElements","replace","uuid","slice","randomUUID","crypto","bind","getRandomValues","rnds8","Uint8Array","rng","Error","byteToHex","i","push","toString","unsafeStringify","arr","offset","toLowerCase","options","buf","rnds","random"],"sourceRoot":""}