"use strict";const l=require("classnames"),s=require("react"),o=require("./UrlUtils-33beea49.js"),c=require("isomorphic-dompurify");function*i(){let e=0;for(;;)yield String(e),e=(e+1)%10}function d(r,e){class t extends s.Component{constructor(a){super(a),this.refresh=()=>{this.setState({key:this.state.keygen.next().value})},this.state={keygen:i(),oldProps:a,key:"1"}}static getDerivedStateFromProps(a,u){return e(u.oldProps,a)?{key:u.keygen.next().value,oldProps:a}:null}render(){return s.createElement(r,{key:this.state.key,propsGuardRefresh:this.refresh,...this.props},this.props.children)}}return t}const b="breadcrumbs _breadcrumbs_67507",h="breadcrumbsSeparator _breadcrumbsSeparator_55104",m={breadcrumbs:b,breadcrumbsSeparator:h},p=()=>s.createElement("span",{className:l(m.breadcrumbsSeparator,"breadcrumbsSeparator")},"›"),y=d(r=>s.createElement("div",{className:l(m.breadcrumbs,"breadcrumb",r.className)},(s.Children.map(r.children,e=>e)||[]).reduce((e,t,n,a)=>(e.push(t),n<a.length-1&&e.push(s.createElement(p,{key:`separator-${n}`})),e),[])),(r,e)=>e.children!==r.children),_=(r,e)=>{const t={ADD_TAGS:["iframe"],ADD_ATTR:["target","allow","allowfullscreen","frameborder","scrolling"]};return{__html:e?c.sanitize(r,{...t,...e}):c.sanitize(r,{...t})}},g=r=>`https://img.youtube.com/vi/${r}/hqdefault.jpg`,f=(r,e)=>{if(!e)return`https://www.youtube.com/embed/${r}`;const t=o.UrlUtils.buildURLSearchParamsFromObject({...e,autoplay:e.autoplay?"1":"",modestbranding:e.modestbranding?"1":"",mute:e.mute?"1":""});return`https://www.youtube.com/embed/${r}?${t.toString()}`};exports.Breadcrumbs=y;exports.getYoutubeEmbedUrl=f;exports.getYoutubeHqThumbnailUrl=g;exports.makeSafeReactInnerHTML=_;
