{"version":3,"sources":["webpack:///./src/hooks/useParams.ts","webpack:///./src/components/video-lib/components/VideoLayout.tsx","webpack:///./src/components/video-lib/utils/common.ts"],"names":["useParams","href","isBrowser","window","location","params","getParams","searchParams","setSearchParams","useState","useEffect","VideoLayout","props","React","createElement","Layout","style","marginTop","padding","children","URL","Object","fromEntries"],"mappings":"kmvEAAA,8DAGe,SAASA,IACtB,MAAMC,EAAOC,eAAeC,OAAOC,SAASH,KACtCI,EAAUJ,GAAQK,YAAUL,IAAU,IACtC,EAACM,EAAY,EAAEC,GACnBC,mBAAiCJ,GAQnC,OANAK,oBAAU,KACJT,GACFO,EAAgBF,YAAUL,KAE3B,CAACA,IAEGM,I,kCCfT,uEAQe,SAASI,EAAYC,GAClC,OACEC,IAAAC,cAACC,UAAM,KACLF,IAAAC,cAAA,OAAKE,MAAO,CAAEC,UAAW,OAAQC,QAAS,aACvCN,EAAMO,a,kCCZf,oEAAO,MAAMjB,EAAYA,IAAwB,oBAAXC,OAEzBG,EAAaL,IACxB,MAAM,aAAEM,GAAiB,IAAIa,IAAInB,GACjC,OAAOoB,OAAOC,YAAYf","file":"3f985f62e6c52f7e8bc97d6e9a76b184f2711dc4-844e50e89a8cdf16d729.js","sourcesContent":["import { useEffect, useState } from 'react'\nimport { getParams, isBrowser } from '../components/video-lib/utils/common'\n\nexport default function useParams() {\n const href = isBrowser() && window.location.href\n const params = (href && getParams(href)) || {}\n const [searchParams, setSearchParams] =\n useState>(params)\n\n useEffect(() => {\n if (href) {\n setSearchParams(getParams(href))\n }\n }, [href])\n\n return searchParams\n}\n","import React from 'react'\n\nimport Layout from '../../../pages/layout'\n\nexport type VideoLayoutProps = {\n children: JSX.Element\n}\n\nexport default function VideoLayout(props: VideoLayoutProps) {\n return (\n \n
\n {props.children}\n
\n
\n )\n}\n","export const isBrowser = () => typeof window !== 'undefined'\n\nexport const getParams = (href) => {\n const { searchParams } = new URL(href)\n return Object.fromEntries(searchParams)\n}\n\nexport type Video = Record\nexport type RelatedResource = Record\n"],"sourceRoot":""}