PageSourceSearch

https://www.vdocipher.com/dashboard/assets/index--IUFzQ4S.js

js vdocipher.com collected 2026-09-24 17:15:21 UTC 146,121 bytes, 105 lines download raw bytes

1var ja=Object.defineProperty;var Ca=(e,n,r)=>n in e?ja(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r;var ln=(e,n,r)=>Ca(e,typeof n!="symbol"?n+"":n,r);import{c1 as Vn,a8 as R,c2 as wa,c3 as Ea,c4 as Sa,c5 as _a,c6 as Ia,c7 as Aa,c8 as Ra,c9 as Pa,k as Y,r as C,bY as Ta,j as t,ag as ft,bB as se,a6 as X,m as P,ca as ka,cb as Oa,cc as Da,cd as Ma,ce as Na,cf as La,cg as Fa,ch as Ha,ci as $a,cj as Ua,ck as Ba,cl as Ga,W as Fe,az as gt,cm as Va,K as B,y as Ce,z as we,C as Ee,U as He,H as mt,x as W,O as st,s as D,cn as za,co as Wa,cp as Ka,cq as qa,cr as Ya,cs as Xa,ct as Za,cu as Ja,cv as Qa,cw as eo,cx as to,bF as zn,cy as vt,cz as N,ai as Wn,ay as de,cA as ce,cB as A,cC as re,cD as Kn,cE as te,cF as ne,w as Se,cG as q,cH as no,cI as $e,T as U,ah as yt,ap as ro,bz as qn,cJ as ao,t as T,v as k,bp as _e,cK as Ue,cL as Be,a2 as z,cM as xt,G as Yn,cN as bt,bV as _,Z as oo,cO as cn,cP as dn,cQ as so,cR as io,a9 as lo,cS as co,cT as uo,bq as un,br as ho,cU as po,bs as fo,as as Xn,cV as go,L as mo,ak as Zn,cW as vo,bo as jt,cX as yo,cY as xo,cZ as bo,c_ as jo,c$ as Co,d0 as wo,d1 as Eo,d2 as So,d3 as _o,d4 as Io,d5 as Ao,d6 as Ro,Q as Po,d7 as To,d8 as ko,d9 as Oo,da as Do,db as Mo,dc as No,dd as Lo,de as Fo,df as Ho,dg as $o,dh as Uo,di as Bo,dj as Go,dk as Vo,dl as zo,dm as Jn,dn as it,bw as Wo,dp as Ko,dq as qo,dr as Yo,ds as Xo,dt as Zo,du as Jo,dv as Qo,dw as es,dx as ts,dy as ns,dz as rs,dA as as,dB as os,dC as ss,dD as is,V as ls,bC as Qe,dE as cs}from"./main-aBTKHUp_.js";import{P as ds,a as us}from"./index-DJKxxMCm.js";import{g as hs,A as ps,S as be,C as Ge,d as fs,s as Qn,a as gs,f as ms,b as K,u as vs,c as ys,P as xs,e as bs}from"./player-preview-M4aCehFJ.js";import{D as js}from"./MoreVert-DRM6vhxb.js";import{C as Cs}from"./country-list-BIMU6r7j.js";import{C as ae}from"./custom-button-CLW-euWD.js";import{C as ws}from"./contact-support-link-DxHzmOop.js";import{T as er}from"./tab-bar-eiRnkifs.js";import{d as Es,a as Ss}from"./Lock-CtCy4yCy.js";import{I as _s}from"./index-8mwQlFRS.js";import{T as Is}from"./tutorial-card-Zp9v_sTx.js";import{B as S,S as ie}from"./info-DjMq-vZJ.js";import{L as tr}from"./loading-Bk1A64wn.js";import"./TableHead-CJLY4dpJ.js";import"./PlayArrow-VIyiqGHr.js";var nr={exports:{}};(function(e){(function(n){const r="(0?\\d+|0x[a-f0-9]+)",o={fourOctet:new RegExp(`^${r}\\.${r}\\.${r}\\.${r}$`,"i"),threeOctet:new RegExp(`^${r}\\.${r}\\.${r}$`,"i"),twoOctet:new RegExp(`^${r}\\.${r}$`,"i"),longValue:new RegExp(`^${r}$`,"i")},a=new RegExp("^0[0-7]+$","i"),i=new RegExp("^0x[a-f0-9]+$","i"),c="%[0-9a-z]{1,}",l="(?:[0-9a-f]+::?)+",u={zoneIndex:new RegExp(c,"i"),native:new RegExp(`^(::)?(${l})?([0-9a-f]+)?(::)?(${c})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${r}\\.${r}\\.${r}\\.${r}(${c})?)$`,"i"),transitional:new RegExp(`^((?:${l})|(?:::)(?:${l})?)${r}\\.${r}\\.${r}\\.${r}(${c})?$`,"i")};function h(s,d){if(s.indexOf("::")!==s.lastIndexOf("::"))return null;let p=0,g=-1,x=(s.match(u.zoneIndex)||[])[0],m,j;for(x&&(x=x.substring(1),s=s.replace(/%.+$/,""));(g=s.indexOf(":",g+1))>=0;)p++;if(s.substr(0,2)==="::"&&p--,s.substr(-2,2)==="::"&&p--,p>d)return null;for(j=d-p,m=":";j--;)m+="0:";return s=s.replace("::",m),s[0]===":"&&(s=s.slice(1)),s[s.length-1]===":"&&(s=s.slice(0,-1)),d=function(){const L=s.split(":"),V=[];for(let ee=0;ee<L.length;ee++)V.push(parseInt(L[ee],16));return V}(),{parts:d,zoneId:x}}function f(s,d,p,g){if(s.length!==d.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let x=0,m;for(;g>0;){if(m=p-g,m<0&&(m=0),s[x]>>m!==d[x]>>m)return!1;g-=p,x+=1}return!0}function y(s){if(i.test(s))return parseInt(s,16);if(s[0]==="0"&&!isNaN(parseInt(s[1],10))){if(a.test(s))return parseInt(s,8);throw new Error(`ipaddr: cannot parse ${s} as octal`)}return parseInt(s,10)}function b(s,d){for(;s.length<d;)s=`0${s}`;return s}const v={};v.IPv4=function(){function s(d){if(d.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let p,g;for(p=0;p<d.length;p++)if(g=d[p],!(0<=g&&g<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=d}return s.prototype.SpecialRanges={unspecified:[[new s([0,0,0,0]),8]],broadcast:[[new s([255,255,255,255]),32]],multicast:[[new s([224,0,0,0]),4]],linkLocal:[[new s([169,254,0,0]),16]],loopback:[[new s([127,0,0,0]),8]],carrierGradeNat:[[new s([100,64,0,0]),10]],private:[[new s([10,0,0,0]),8],[new s([172,16,0,0]),12],[new s([192,168,0,0]),16]],reserved:[[new s([192,0,0,0]),24],[new s([192,0,2,0]),24],[new s([192,88,99,0]),24],[new s([198,18,0,0]),15],[new s([198,51,100,0]),24],[new s([203,0,113,0]),24],[new s([240,0,0,0]),4]],as112:[[new s([192,175,48,0]),24],[new s([192,3
11,196,0]),24]],amt:[[new s([192,52,193,0]),24]]},s.prototype.kind=function(){return"ipv4"},s.prototype.match=function(d,p){let g;if(p===void 0&&(g=d,d=g[0],p=g[1]),d.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return f(this.octets,d.octets,8,p)},s.prototype.prefixLengthFromSubnetMask=function(){let d=0,p=!1;const g={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0};let x,m,j;for(x=3;x>=0;x-=1)if(m=this.octets[x],m in g){if(j=g[m],p&&j!==0)return null;j!==8&&(p=!0),d+=j}else return null;return 32-d},s.prototype.range=function(){return v.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){return this.octets.slice(0)},s.prototype.toIPv4MappedAddress=function(){return v.IPv6.parse(`::ffff:${this.toString()}`)},s.prototype.toNormalizedString=function(){return this.toString()},s.prototype.toString=function(){return this.octets.join(".")},s}(),v.IPv4.broadcastAddressFromCIDR=function(s){try{const d=this.parseCIDR(s),p=d[0].toByteArray(),g=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),x=[];let m=0;for(;m<4;)x.push(parseInt(p[m],10)|parseInt(g[m],10)^255),m++;return new this(x)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},v.IPv4.isIPv4=function(s){return this.parser(s)!==null},v.IPv4.isValid=function(s){try{return new this(this.parser(s)),!0}catch{return!1}},v.IPv4.isValidCIDR=function(s){try{return this.parseCIDR(s),!0}catch{return!1}},v.IPv4.isValidFourPartDecimal=function(s){return!!(v.IPv4.isValid(s)&&s.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},v.IPv4.isValidCIDRFourPartDecimal=function(s){const d=s.match(/^(.+)\/(\d+)$/);return!v.IPv4.isValidCIDR(s)||!d?!1:v.IPv4.isValidFourPartDecimal(d[1])},v.IPv4.networkAddressFromCIDR=function(s){let d,p,g,x,m;try{for(d=this.parseCIDR(s),g=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),x=[],p=0;p<4;)x.push(parseInt(g[p],10)&parseInt(m[p],10)),p++;return new this(x)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},v.IPv4.parse=function(s){const d=this.parser(s);if(d===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(d)},v.IPv4.parseCIDR=function(s){let d;if(d=s.match(/^(.+)\/(\d+)$/)){const p=parseInt(d[2]);if(p>=0&&p<=32){const g=[this.parse(d[1]),p];return Object.defineProperty(g,"toString",{value:function(){return this.join("/")}}),g}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},v.IPv4.parser=function(s){let d,p,g;if(d=s.match(o.fourOctet))return function(){const x=d.slice(1,6),m=[];for(let j=0;j<x.length;j++)p=x[j],m.push(y(p));return m}();if(d=s.match(o.longValue)){if(g=y(d[1]),g>4294967295||g<0)throw new Error("ipaddr: address outside defined range");return function(){const x=[];let m;for(m=0;m<=24;m+=8)x.push(g>>m&255);return x}().reverse()}else return(d=s.match(o.twoOctet))?function(){const x=d.slice(1,4),m=[];if(g=y(x[1]),g>16777215||g<0)throw new Error("ipaddr: address outside defined range");return m.push(y(x[0])),m.push(g>>16&255),m.push(g>>8&255),m.push(g&255),m}():(d=s.match(o.threeOctet))?function(){const x=d.slice(1,5),m=[];if(g=y(x[2]),g>65535||g<0)throw new Error("ipaddr: address outside defined range");return m.push(y(x[0])),m.push(y(x[1])),m.push(g>>8&255),m.push(g&255),m}():null},v.IPv4.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>32)throw new Error("ipaddr: invalid IPv4 prefix length");const d=[0,0,0,0];let p=0;const g=Math.floor(s/8);for(;p<g;)d[p]=255,p++;return g<4&&(d[g]=Math.pow(2,s%8)-1<<8-s%8),new this(d)},v.IPv6=function(){function s(d,p){let g,x;if(d.length===16)for(this.parts=[],g=0;g<=14;g+=2)this.parts.push(d[g]<<8|d[g+1]);else if(d.length===8)this.parts=d;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(g=0;g<this.parts.length;g++)if(x=this.parts[g],!(0<=x&&x<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");p&&(this.zoneId=p)}return s.prototype.SpecialRanges={unspecified:[new s([0,0,0,0,0,0,0,0]),128],linkLocal:[new s([65152,0,0,0,0,0,0,0]),10],multicast:[new s([65280,0,0,0,0,0,0,0]),8],loopback:[new s([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new s([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new s([0,0,0,0,0,65535,0,0]),96],deprecatedSiteLocal:[new s([65216,0,0,0,0,0,0,0]),10],discard:[new s([256,0,0,0,0,0,0,0]),64],rfc6145:[new s([0,0,0,0,65535,0,0,0]),96],rfc6052:[[new s([100,65435,0,0,0,0,0,0]),96],[new s([100,65435,1,0,0,0,0,0]),48]],"6to4":[new s([8194,0,0,0,0,0,0,0]),16],teredo:[new s([8193,0,0,0,0,0,0,0]),32],benchmarking:[new s([8193,2,0,0,0,0,0,0]),48],amt:[new s([8193,3,0,0,0,0,0,0]),32],as112v6:[[new s([8193,4,274,0,0,0,0,0]),48],[new s([9760,79,32768,0,0,0,0,0]),48]],deprecatedOrchid:[new s([8193,16,0,0,0,0,0,0]),28],orchid2:[new s([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new s([8193,48,0,0,0,0,0,0]),28],segmentRouting:[new s([24320,0,0,0,0,0,0,0]),16],reserved:[[new s([8193,0,0,0,0,0,0,0]),23],[new s([8193,3512,0,0,0,0,0,0]),32],[new s([16383,0,0,0,0,0,0,0]),20]]},s.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},s.prototype.kind=function(){return"ipv6"},s.prototype.match=function(d,p){let g;if(p===void 0&&(g=d,d=g[0],p=g[1]),d.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return f(this.parts,d.parts,16,p)},s.prototype.prefixLengthFromSubnetMask=function(){let d=0,p=!1;const g={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0};let x,m;
1for(let j=7;j>=0;j-=1)if(x=this.parts[j],x in g){if(m=g[x],p&&m!==0)return null;m!==16&&(p=!0),d+=m}else return null;return 128-d},s.prototype.range=function(){return v.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){let d;const p=[],g=this.parts;for(let x=0;x<g.length;x++)d=g[x],p.push(d>>8),p.push(d&255);return p},s.prototype.toFixedLengthString=function(){const d=(function(){const g=[];for(let x=0;x<this.parts.length;x++)g.push(b(this.parts[x].toString(16),4));return g}).call(this).join(":");let p="";return this.zoneId&&(p=`%${this.zoneId}`),d+p},s.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");const d=this.parts.slice(-2),p=d[0],g=d[1];return new v.IPv4([p>>8,p&255,g>>8,g&255])},s.prototype.toNormalizedString=function(){const d=(function(){const g=[];for(let x=0;x<this.parts.length;x++)g.push(this.parts[x].toString(16));return g}).call(this).join(":");let p="";return this.zoneId&&(p=`%${this.zoneId}`),d+p},s.prototype.toRFC5952String=function(){const d=/((^|:)(0(:|$)){2,})/g,p=this.toNormalizedString();let g=0,x=-1,m;for(;m=d.exec(p);)m[0].length>x&&(g=m.index,x=m[0].length);return x<0?p:`${p.substring(0,g)}::${p.substring(g+x)}`},s.prototype.toString=function(){return this.toRFC5952String()},s}(),v.IPv6.broadcastAddressFromCIDR=function(s){try{const d=this.parseCIDR(s),p=d[0].toByteArray(),g=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),x=[];let m=0;for(;m<16;)x.push(parseInt(p[m],10)|parseInt(g[m],10)^255),m++;return new this(x)}catch(d){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${d})`)}},v.IPv6.isIPv6=function(s){return this.parser(s)!==null},v.IPv6.isValid=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{const d=this.parser(s);return new this(d.parts,d.zoneId),!0}catch{return!1}},v.IPv6.isValidCIDR=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{return this.parseCIDR(s),!0}catch{return!1}},v.IPv6.networkAddressFromCIDR=function(s){let d,p,g,x,m;try{for(d=this.parseCIDR(s),g=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),x=[],p=0;p<16;)x.push(parseInt(g[p],10)&parseInt(m[p],10)),p++;return new this(x)}catch(j){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${j})`)}},v.IPv6.parse=function(s){const d=this.parser(s);if(d.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(d.parts,d.zoneId)},v.IPv6.parseCIDR=function(s){let d,p,g;if((p=s.match(/^(.+)\/(\d+)$/))&&(d=parseInt(p[2]),d>=0&&d<=128))return g=[this.parse(p[1]),d],Object.defineProperty(g,"toString",{value:function(){return this.join("/")}}),g;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},v.IPv6.parser=function(s){let d,p,g,x,m,j;if(g=s.match(u.deprecatedTransitional))return this.parser(`::ffff:${g[1]}`);if(u.native.test(s))return h(s,8);if((g=s.match(u.transitional))&&(j=g[6]||"",d=g[1],g[1].endsWith("::")||(d=d.slice(0,-1)),d=h(d+j,6),d.parts)){for(m=[parseInt(g[2]),parseInt(g[3]),parseInt(g[4]),parseInt(g[5])],p=0;p<m.length;p++)if(x=m[p],!(0<=x&&x<=255))return null;return d.parts.push(m[0]<<8|m[1]),d.parts.push(m[2]<<8|m[3]),{parts:d.parts,zoneId:d.zoneId}}return null},v.IPv6.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>128)throw new Error("ipaddr: invalid IPv6 prefix length");const d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];let p=0;const g=Math.floor(s/8);for(;p<g;)d[p]=255,p++;return g<16&&(d[g]=Math.pow(2,s%8)-1<<8-s%8),new this(d)},v.fromByteArray=function(s){const d=s.length;if(d===4)return new v.IPv4(s);if(d===16)return new v.IPv6(s);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},v.isValid=function(s){return v.IPv6.isValid(s)||v.IPv4.isValid(s)},v.isValidCIDR=function(s){return v.IPv6.isValidCIDR(s)||v.IPv4.isValidCIDR(s)},v.parse=function(s){if(v.IPv6.isValid(s))return v.IPv6.parse(s);if(v.IPv4.isValid(s))return v.IPv4.parse(s);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},v.parseCIDR=function(s){try{return v.IPv6.parseCIDR(s)}catch{try{return v.IPv4.parseCIDR(s)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},v.process=function(s){const d=this.parse(s);return d.kind()==="ipv6"&&d.isIPv4MappedAddress()?d.toIPv4Address():d},v.subnetMatch=function(s,d,p){let g,x,m,j;p==null&&(p="unicast");for(x in d)if(Object.prototype.hasOwnProperty.call(d,x)){for(m=d[x],m[0]&&!(m[0]instanceof Array)&&(m=[m]),g=0;g<m.length;g++)if(j=m[g],s.kind()===j[0].kind()&&s.match.apply(s,j))return x}return p},e.exports?e.exports=v:n.ipaddr=v})(R)})(nr);var As=nr.exports;const hn=Vn(As),Rs=()=>{const e=()=>({type:Sa}),n=o=>({type:_a,accessParams:o}),r=()=>({type:Ia});return o=>
1(o(e()),wa().then(a=>{o(n(a.data))}).catch(a=>{const{message:i}=a.data;o({type:"ERROR_MESSAGE",message:i}),o(r())}))},Ps=(e,n)=>{const r=()=>({type:Aa}),o=()=>({type:Ra,ipGeo:e,urlWhiteList:n}),a=()=>({type:Pa});return i=>(i(r()),Ea([{name:"ipGeoRules",value:e},{name:"whitelisthref",value:n}]).then(()=>{i({type:"SUCCESS_MESSAGE",message:"UPDATED SUCCESSFULLY"}),i(o())}).catch(c=>{const{message:l}=c.data;i({type:"ERROR_MESSAGE",message:l}),i(a())}))};class Ts extends C.Component{constructor(n){super(n),this.testInvalidChar=this.testInvalidChar.bind(this),this.handleSaveChange=this.handleSaveChange.bind(this),this.state={urlwhitelist:"",ipAndCountry:"",override:!1,invalidInput:!1}}testInvalidChar(n,r){const o=["subdomains","hostname"],a=["(",")","|",":","/"];let i=!1;return a.forEach(c=>{n.includes(c)&&(i=!0)}),i&&o.includes(r)?(this.setState({...this.state,invalidInput:!0}),!0):(this.setState({...this.state,invalidInput:!1}),!1)}async componentDidMount(){await this.props.getAccessParams()}getUrlWhiteListObject(n,r,o){const a=n.split(`
2`).filter(i=>i.trim()!=="");return a.length>0?JSON.stringify({mode:o,values:a,override:r}):""}async handleSaveChange(n,r,o,a,i){const c=this.getUrlWhiteListObject(n,o,r);if(!this.testInvalidChar(n)){const{setAccessParams:l,showErrorMessage:u}=this.props;let h="Please enter a valid JSON";const f=y=>hn.isValidCIDR(y)||hn.isValid(y);try{const y=i&&a!=""?JSON.parse(a):a;if(Array.isArray(y)){if(!y.map(v=>v.ipSet).flat().every(v=>f(v)))throw h="Invalid IP(s)",new Error("Invalid IP(s)")}else if(y.selectedCountriesAndIPs&&!y.selectedCountriesAndIPs.filter(v=>!Ta[v]).every(v=>f(v)))throw h="Invalid IP(s)",new Error("Invalid IP(s)");if(i)await l(a||"",c||"");else{const{whiteListOrBlack:b,selectedCountriesAndIPs:v}=a,s=hs(v,b);await l(s||"",c||"")}}catch{u(h)}}}render(){const{settingAccessParams:n,fetchingAccessParams:r,ipAndCountry:o,urlwhitelist:a}=this.props;return r?t.jsx("main",{children:t.jsx(ds,{heading:"Access Control",children:t.jsx(us,{children:"Loading..."})})}):t.jsx("main",{children:t.jsx(ps,{note:se.SECURITY_CONFIG.ACCESS_CONTROL_NOTE,saving:n,ipAndCountry:o||"",urlwhitelist:a||"",handleSaveChange:this.handleSaveChange,showErrorMessage:ft})})}}const ks=e=>e.accessSetting,Os=e=>X({setAccessParams:Ps,getAccessParams:Rs,showErrorMessage:ft},e),Ds=Y(ks,Os)(Ts),Ms=e=>P({url:`/user/params?name=${e}`,method:"GET"}),Ns=e=>P({url:"/user/params",method:"POST",data:e}),Ls=e=>{const{ask:n,challengePassword:r,privateKey:o,certificate:a}=e,i=new FormData;return i.append("certificate",a[0]),i.append("privateKey",o[0]),i.append("ask",n),i.append("challengePassword",r),P({url:"/user/fairplay",method:"POST",data:i})},Fs=e=>P({url:"/user/rsakeys",method:"POST",data:e,responseType:"blob"}),Hs=e=>{const n=()=>({type:Ua}),r=a=>({type:Ba,statusObj:a}),o=()=>({type:Ga});return a=>{a(n());const i={};return Ms(e).then(c=>{c.data.forEach(l=>i[l.name]=l.value),a(r(i))}).catch(c=>{const{message:l}=c.data;a({type:"ERROR_MESSAGE",message:l}),a(o())})}},$s=e=>{const n=()=>({type:Fa}),r=()=>({type:Ha}),o=()=>({type:$a});return a=>(a(n()),Ns(e).then(()=>{a(r())}).catch(i=>{const{message:c}=i.data;a({type:"ERROR_MESSAGE",message:c}),a(o())}))},Us=e=>{const n=()=>({type:Ma}),r=()=>({type:Na,statusObj:e}),o=()=>({type:La});return a=>(a(n()),Ls(e).then(()=>{a(r())}).catch(i=>{const{message:c}=i.data;a({type:"ERROR_MESSAGE",message:c}),a(o())}))},Bs=e=>{const n=()=>({type:ka}),r=()=>({type:Oa}),o=()=>({type:Da});return a=>(a(n()),Fs(e).then(i=>{const c=document.createElement("a");document.body.appendChild(c),c.style="display: none";const l=window.URL.createObjectURL(i.data);c.href=l,c.download="rsakeys",c.click(),a(r())}).catch(i=>{const{message:c}=i.data;a({type:"ERROR_MESSAGE",message:c}),a(o())}))},pn=({label:e,name:n,defaultValue:r,onChange:o,required:a,children:i,variant:c,placeholder:l,fullWidth:u=!0,error:h})=>t.jsx(Fe,{value:r,onChange:o,name:n,variant:c,label:e,required:a,placeholder:l,helperText:i,fullWidth:u,error:h});let fn,gn;const mn=D(js)(()=>({display:"none"})),vn=D("div")(()=>({display:"flex",alignItems:"center",marginTop:14,label:{width:200},".MuiTextField-root":{marginLeft:50}
2,input:{width:280}})),Gs=D("div")(()=>({display:"flex","button:last-of-type":{marginLeft:28}})),Vs=()=>t.jsxs(C.Fragment,{children:[t.jsxs("div",{className:"page-message",style:{maxWidth:800,margin:"0 auto"},children:[t.jsx("p",{children:"We provide Google Widevine DRM encryption for Desktop and Android as default integration. On iOS devices, video uses proprietary encryption, which is secure from downloaders but is not as secure as a DRM. On macOS Safari, the player will give you a message to watch on the Google Chrome browser."}),t.jsx("p",{children:"To fix these limitations, you can apply for a Fairplay certificate from Apple. Fairplay is the DRM for Apple devices, which can improve playback and also block screen capture. It is an Apple-provided DRM used by all renowned streaming services, such as Netflix and Disney. It enables Desktop macOS Safari for HTML5 playback. Chrome and Firefox will continue to use Google Widevine DRM."}),t.jsxs("p",{children:["To enable Fairplay, you must apply for a Fairplay certificate from Apple. Apple only grants the DRM license to the content owner/distributor. Hence, this does not come integrated by default. You do not need to code anything. We have already built the integration with Fairplay, and you will have a simple interface to enable your Fairplay certificate with us. If you want to turn off iOS playback for your account until you receive Fairplay DRM from Apple, please let us know from the ",t.jsx("em",{children:"support"})," section."]}),t.jsx("p",{children:"Fairplay DRM Application Process with Apple: Apple might be strict with its license requirements, so the application approval depends on a case-to-case basis. Apple requires you to have an Apple developer account. If you have an app on the app store, you already have this. We will guide you through the application process with the key things to keep in mind to increase your chances of getting a Fairplay license. There are no extra costs from VdoCipher for Fairplay. Apple Fairplay certificate can be applied even before buying any VdoCipher plan, but we integrate once you have one of our paid plans."})]}),t.jsx(ws,{})]});class zs extends C.Component{constructor(){super(),this.state={certificate:{},privateKey:{},ask:"",privateKeyParaphrase:"",createRSAkeysDialogOpen:!1,business:"",country:""},this.handleChange=this.handleChange.bind(this)}componentDidUpdate(n){const r=n.fetchingRSAkeys,{fetchingRSAkeys:o}=this.props;r===!0&&o===!1&&this.handleRSAKeysCancel()}handleFileUploadClick(n){n.open()}handleChange(n){this.setState({[n.target.name]:n.target.value})}handleRSAKeysCancel(){this.setState({createRSAkeysDialogOpen:!1,business:"",country:""})}handleCancel(){this.setState({isConfiguringFairplay:!1,certificate:{},privateKey:{},ask:"",privateKeyParaphrase:""})}render(){const{certificate:n,privateKey:r,ask:o,privateKeyParaphrase:a,createRSAkeysDialogOpen:i,business:c,country:l}=this.state,{configureFairplay:u,requestRSAKeys:h,configuringFairplay:f,closeConfigureFairplay:y}=this.props;return t.jsxs(C.Fragment,{children:[t.jsxs(B,{container:!0,children:[t.jsxs(B,{item:!0,sm:10,children:[t.jsx(mn,{ref:b=>fn=b,accept:".cer",onDrop:b=>this.setState({certificate:b})}),t.jsx(ae,{variant:"contained",type:"secondary",customClass:"fairplay-button",onClick:()=>this.handleFileUploadClick(fn),children:"Choose certificate .cer file   "}),"  ",Object.keys(n).length>0?n[0].name:"No file chosen *",t.jsx("br",{}),t.jsx(mn,{ref:b=>gn=b,accept:".pem",onDrop:b=>this.setState({privateKey:b})}),t.jsx(ae,{variant:"contained",type:"secondary",customClass:"fairplay-button",onClick:()=>this.handleFileUploadClick(gn),children:"Choose private key .pem file"}),"  ",Object.keys(r).length>0?r[0].name:"No file chosen *"]}),t.jsxs(B,{item:!0,sm:2,children:[t.jsx(ae,{variant:"contained",type:"primary",onClick:()=>this.setState({createRSAkeysDialogOpen:!0}),children:"Create RSA keys"}),t.jsxs(Ce,{open:i,"aria-labelledby":"generate-rsakeys-dialog-title",children:[t.jsx(we,{children:"Generate new RSA key pair and CSR file"}),t.jsxs(Ee,{children:[t.jsx(Fe,{variant:"outlined",placeholder:"Business",name:"business",value:c,fullWidth:!0,onChange:b=>this.handleChange(b),style:{marginBottom:"1.5em"}}),t.jsx(Cs,{country:l,handleChange:this.handleChange,inputLabel:"Country"}),t.jsxs(He,{style:{marginTop:"1.5em"},children:["Note that this is just a utility to generate simple RSA keys. The same keys and CSR f
2ile can be generated using openssl command line by following Apple's official documentation.",t.jsx("br",{}),"Generating keys here does not configure your Apple account or sets up Fairplay VdoCipher. After generating these keys, you need to get these keys signed by Apple and then uplod it here to finish the setup."]})]}),t.jsxs(mt,{children:[t.jsx(W,{onClick:()=>this.handleRSAKeysCancel(),color:"primary",children:"Cancel"}),t.jsx(W,{onClick:()=>h({organisation:c,country:l}),variant:"contained",color:"primary",disabled:!c||!l,children:"Generate RSA keys"})]})]})]})]}),t.jsxs(vn,{children:[t.jsx("label",{children:"ASK"}),t.jsx(pn,{variant:"outlined",placeholder:"Password field",name:"ask",value:o,error:o.length!==32,fullWidth:!1,onChange:b=>this.handleChange(b),children:o.length!==32?"Must have 32 characters":""})]}),t.jsx("br",{}),t.jsxs(vn,{children:[t.jsx("label",{children:"Private key passphrase"}),t.jsx(pn,{variant:"outlined",placeholder:"Password field",name:"privateKeyParaphrase",value:a,error:a==="",fullWidth:!1,required:!0,onChange:b=>this.handleChange(b)})]}),t.jsxs(Gs,{children:[t.jsx(ae,{variant:"contained",type:"secondary",customClass:"save-access-button",onClick:()=>y(),children:"Cancel"}),t.jsxs(ae,{variant:"contained",type:"primary",customClass:"save-access-button",disabled:o.length!==32||a===""||Object.keys(n).length===0||Object.keys(r).length===0||f,onClick:()=>u({certificate:n,privateKey:r,ask:o,challengePassword:a}),children:[!f&&"Save",f&&t.jsx(st,{})]})]})]})}}class Ws extends C.Component{constructor(n){super(n),this.state={isFairplayConfigured:!1,fairplaycert:"",isConfiguringFairplay:!1,configured:!1}}async componentDidMount(){this._isMounted=!0,await this.props.readParamsStatus("fairplaycert,fpsKeys");const{statusObj:n}=this.props.fairplay;this._isMounted&&this.setState({isFairplayConfigured:n.fpsKeys&&n.fairplaycert})}componentWillUnmount(){this._isMounted=!1}componentDidUpdate(n){const r=n.fairplay.configured,{configured:o}=this.props.fairplay;r===!1&&o===!0&&this.setState({configured:!0})}handleConfigureClick(n=!0){this.setState({isConfiguringFairplay:n})}render(){const{isConfiguringFairplay:n,isFairplayConfigured:r,configured:o}=this.state,{fairplay:a,requestRSAKeys:i,configureFairplay:c}=this.props,{configuringFairplay:l,fetchingRSAkeys:u}=a,{plan:h}=gt();return t.jsxs(t.Fragment,{children:[t.jsx(be,{bc:"#fff",className:"tab-content",children:t.jsx(Vs,{})}),t.jsxs(be,{bc:"#fff",className:"tab-content full-round",margin:"9px 0 50px 0",children:[!n&&!r&&t.jsxs(ae,{variant:"contained",type:"primary",onClick:()=>this.handleConfigureClick(),children:[h==="Trial"?"Upgrade to ":""," Configure Fairplay"]}),n&&!r&&!o&&t.jsx(zs,{configureFairplay:c,requestRSAKeys:i,configuringFairplay:l,fetchingRSAkeys:u,closeConfigureFairplay:()=>this.handleConfigureClick(!1)}),(r||o)&&t.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[t.jsx(Va,{fontSize:"large",style:{fill:"green"}}),"  ",t.jsx("b",{children:"Fairplay configured!"})]})]})]})}}const Ks=e=>e,qs=e=>X({readParamsStatus:Hs,modifyHlsePlayback:$s,configureFairplay:Us,requestRSAKeys:Bs,showErrorMessage:ft},e),Ys=Y(Ks,qs)(Ws),Xs=()=>P({url:"/user/params?name=allowOriginalDownload",method:"GET"}),Zs=()=>P({url:"/user/settings/send-original-download-email",method:"POST"}),Js=()=>P({url:"/user/settings/disable-original-download",method:"POST"}),Qs={fetchingAllowDownloadStatus:!1,sendingOriginalFileDownloadMail:!1,disablingOriginalDownload:!1,status:!1,message:null,messageType:null,emailSentForEnable:!1},ei=()=>{const[e,n]=C.useReducer(za,Qs);return{state:e,fetchAllowOrigFileDownloadStatus:()=>{const i=()=>({type:Ja}),c=u=>({type:Qa,status:u}),l=u=>({type:eo,message:u});n(i()),Xs().then(u=>{const{data:h}=u;let f=!1;h[0]&&(f=h[0].value=="true"),n(c(f))}).catch(u=>{const{message:h}=u.data;n(l(h))})},sendOriginalFileDownloadMail:()=>{const i=()=>({type:Ya}),c=u=>({type:Xa,message:u}),l=u=>({type:Za,message:u});n(i()),Zs().then(u=>{const{message:h}=u.data;n(c(h))}).catch(u=>{const{message:h}=u.data;n(l(h))})},disableOriginalDownload:()=>{const i=()=>({type:Wa}),c=u=>({type:Ka,message:u}),l=u=>({type:qa,message:u});n(i()),Js().then(u=>{const{message:h}=u.data;n(c(h))}).catch(u=>{const{message:h}=u.data;n(l(h))})}}},ti=()=>t.jsx("p",{style:{marginTop:28},children:"You have turned on original file download, if you no longer need to keep it enabled or download original files, you should turn this off."}),ni=()=>t.jsxs(C.Fragment,{children:[t.jsx("p",{style:{marginTop:28},children:"Clicking the button below will send a confirmation email to your registered email with a link. Download will be enabled only when you click that link. You can disable this afterwards."}),t.jsx("p",{style:{marginTop:28},children:"This action is only available to the admin user of an account. If you are not the admin, please contact your account admin."})]}),ri=()=>{const{state:e,fetchAllowOrigFileDownloadStatus:n,sendOriginalFileDownloadMail:r,disableOriginalDownload:o}=ei(),{status:a,disablingOriginalDownload:i,fetchingAllowDownloadStatus:c,sendingOriginalFileDownloadMail:l,message:u,messageType:h,emailSentForEnable:f}=e;return C.useEffect(()=>{async function y(){await n()}y()},[]),t.jsxs("div",{className:"tab-content",children:[t.jsx("p",{className:"security-header",children:"Downloading original videos is by default disabled in your account. This is to prevent any security issues if account password is compromised. It is advised that this option is enabled only when needed and disabled 
2when you have downloaded the required files."}),c?t.jsx("div",{style:{alignSelf:"center",textAlign:"center"},children:t.jsx(st,{size:36})}):t.jsxs(C.Fragment,{children:[a?t.jsx(ti,{}):t.jsx(ni,{}),u&&t.jsx(to,{severity:h,style:{marginTop:16},children:u}),!f&&t.jsx(ae,{variant:"contained",type:"primary",onClick:a?o:r,customClass:"save-access-button",disabled:l||i,children:l||i?t.jsx("div",{style:{alignSelf:"center",textAlign:"center"},children:t.jsx(st,{size:36,color:"secondary"})}):t.jsx(C.Fragment,{children:a?"Disable Download":"Enable Download"})})]})]})};let Me=se.SECURITY_CONFIG.SECURITY;Me=Me.filter(e=>{const n=e.label==="IOS Playback";return!Wn()&&!de()||!n});const ai=D("div")(()=>({"div.tab-content":{padding:"30px",background:"#fff",borderRadius:"0 0 20px 20px",boxShadow:"0px 12px 23px rgba(62, 73, 84, 0.04)"},"div.full-round":{borderRadius:"20px"},"div.no-data":{margin:"40px 16px"},".roles-div":{display:"flex",flexWrap:"wrap"},".security-header":{marginBottom:14,color:"rgba(0,0,0,0.54)",fontStyle:"italic",marginTop:"5px"}})),oi=()=>{const[e,n]=C.useState(0);return C.useEffect(()=>{const r=Me.findIndex(o=>window.location.pathname.includes(o.to));n(r)},[window.location.pathname]),t.jsxs(ai,{children:[t.jsx(zn,{children:"Security"}),t.jsx(er,{value:e,tabs:Me,onChange:null,type:"Link"}),t.jsxs(vt,{children:[t.jsx(N,{path:"/dashboard/security/settings",component:Ds}),!Wn()&&!de()&&t.jsx(N,{path:"/dashboard/security/fairplay",component:Ys}),t.jsx(N,{path:"/dashboard/security/advanced",component:ri}),t.jsx(N,{exact:!0,path:"/dashboard/config/advanced",children:t.jsx(ce,{to:"/dashboard/security/advanced"})}),t.jsx(N,{exact:!0,path:"/dashboard/config/fairplay",children:t.jsx(ce,{to:"/dashboard/security/fairplay"})}),t.jsx(ce,{to:"/dashboard/security/settings"})]})]})},si=(e,n,r)=>{if(navigator.clipboard)navigator.clipboard.writeText(e);else{const o=window.getSelection();o.removeAllRanges();const a=document.createRange();a.selectNodeContents(n.current),o.addRange(a),r("Enter Ctrl + C to copy")}},ii="/dashboard/assets/wordpress-custom-player-config-B5cpvpp6.png";function li(){return t.jsxs("div",{children:[t.jsx("p",{children:t.jsx("strong",{children:"Custom player is only available with v2 player"})}),t.jsx("p",{children:t.jsx("a",{target:"_blank",href:"https://www.vdocipher.com/docs/player/v2/",children:"Full documentation for using this player including JS API"})}),t.jsxs("p",{children:["Modify the existing embed code by appending player query parameter to the ",t.jsx("code",{children:t.jsx(A,{padding:"2px 4px",bgColor:"#f9ede2",children:"src"})})," attribute of the ",t.jsx("code",{children:t.jsx(A,{padding:"2px 4px",bgColor:"#f9ede2",children:"iframe"})}),". The new part is the ",t.jsx("code",{children:t.jsx(A,{padding:"2px 4px",bgColor:"#f9ede2",children:"&player=___"})}),". You have to replace the ",t.jsx("code",{children:t.jsx(A,{padding:"2px 4px",bgColor:"#f9ede2",children:"___"})}),"  with the ",t.jsx("code",{children:t.jsx(A,{padding:"2px 4px",bgColor:"#f9ede2",children:"id"})})," copied above."]}),t.jsx(q,{language:"xml",snippet:`
3      <iframe
4        src="https://player.vdocipher.com/v2/?otp=______&playbackInfo=_____&player=_______"
5        style="border:0;width:720px;height:405px"
6        allow="encrypted-media"
7        allowfullscreen
8      ></iframe>
9        `})]})}function ci(){return t.jsxs("div",{children:[t.jsx("p",{children:t.jsx("strong",{children:"Minimum version recommended: 1.19.4"})}),t.jsxs("p",{children:["Read the ",t.jsx("a",{target:"_blank",href:"https://www.vdocipher.com/docs/mobile/android/getting-started",children:"full documentation"}),"  for how to use the SDK before adding the below modifications."]}),t.jsxs("p",{children:["Set player id in ",t.jsx("code",{children:t.jsx(A,{padding:"2px 4px",bgColor:"#f9ede2",children:"VdoInitParams"})})," using method ",t.jsx("code",{children:t.jsx(A,{padding:"2px 4px",bgColor:"#f9ede2",children:"setCustomPlayer"})})]}),t.jsx(q,{language:"java",snippet:`
10      VdoInitParams vdoParams = new VdoInitParams.Builder()
11        .setOtp(____)
12        .setPlaybackInfo(____)
13        .setCustomPlayer(____) // custom player id goes here
14        .build();
15      `}),t.jsxs("p",{children:["For offline downloads, send the player id when downloading video. It is accepted by ",t.jsx("code",{children:t.jsx(A,{padding:"2px 4px",bgColor:"#f9ede2",children:"downloadOptionsWithOtp()"})}),". Once downloaded, player cannot be changed and ",t.jsx("code",{children:t.jsx(A,{padding:"2px 4px",bgColor:"#f9ede2",children:"setCustomPlayer()"})}),", if used, will be ignored."]}),t.jsx(q,{language:"java",snippet:`
16      OptionsDownloader optionsDownloader = new OptionsDownloader(context);
17      // assuming we have otp and playbackInfo
18      optionsDownloader.downloadOptionsWithOtp(
19          otp,
20          playbackInfo,
21          customPlayerId, // <-- player id goes here
22          new OptionsDownloader.Callback() {
23              @Override
24              public void onOptionsReceived(DownloadOptions options) {
25                  // we have received the available download options
26                  Log.i("Success", "onOptionsReceived");
27                  // Call enqueueV2() method here to initiate download
28              }
29
30              @Override
31              public void onOptionsNotReceived(ErrorDescription errDesc) {
32                  // there was an error downloading the available options
33                  String errMsg = "onOptionsNotReceived : " + errDesc.toString();
34                  Log.e("Error", errMsg);
35              }
36          }
37      );
38      `})]})}function di(){return t.jsxs("div",{children:[t.jsx("p",{children:t.jsx("strong",{children:"Minimum supported version: 2.3.3"})}),t.jsxs("p",{children:["Read the ",t.jsx("a",{target:"_blank",href:"https://www.vdocipher.com/docs/mobile/ios/getting-started",children:"full documentation"})," for how to use the SDK before adding the below modifications."]}),t.jsxs("p",{children:["Specify player id when creating a new ",t.jsx("code",{children:t.jsx(A,{padding:"2px 4px",bgColor:"#f9ede2",children:"VdoAsset"})})," object. Use the generated object to play videos with ",t.jsx("code",{children:t.jsx(A,{padding:"2px 4px",bgColor:"#f9ede2",children:"playOnline()"})})]}),t.jsx(q,{language:"swift",snippet:`
39        VdoAsset.createAsset(videoId: videoId, playerId: playerId) { asset, error in
40            if let asset = asset {
41                self.asset = asset
42                DispatchQueue.main.async {
43                  let vdoPlayerController: UIViewController = VdoCi
43pher.getVdoPlayerViewController()
44                  self.present(vdoPlayerController, animated: true)
45                }
46                
47                // use the asset object to play videos with playOnline()
48            }
49        }
50      `}),t.jsxs("p",{children:["For offline use, specify the same ",t.jsx("code",{children:t.jsx(A,{padding:"2px 4px",bgColor:"#f9ede2",children:"playerId"})}),"  when generating asset for offline download. After download, when playing offline, make sure to specify the same",t.jsx("code",{children:t.jsx(A,{padding:"2px 4px",bgColor:"#f9ede2",children:"playerId"})})," to generate ",t.jsx("code",{children:t.jsx(A,{padding:"2px 4px",bgColor:"#f9ede2",children:"VdoAsset"})})," which was used for downloading. If asset is created with a different ",t.jsxs("code",{children:["StyledHighlightedText",t.jsx(A,{padding:"2px 4px",bgColor:"#f9ede2",children:"playerId"})]}),", then the SDK will give an error."]})]})}function ui(){return t.jsxs("div",{children:[t.jsx("p",{children:t.jsx("strong",{children:"Minimum version: 1.17.2"})}),t.jsxs("p",{children:["Read the ",t.jsx("a",{target:"_blank",href:"https://www.vdocipher.com/docs/mobile/react-native/getting-started",children:"full documentation"}),"  for SDK before adding the below modifications."]}),t.jsxs("p",{children:["Send player id in ",t.jsx("code",{children:t.jsx(A,{padding:"2px 4px",bgColor:"#f9ede2",children:"embedInfo"})})," with key name as ",t.jsx("code",{children:t.jsx(A,{padding:"2px 4px",bgColor:"#f9ede2",children:"customPlayerId"})})]}),t.jsx(q,{language:"javascript",snippet:`
51      import { VdoPlayerView } from 'vdocipher-rn-bridge';
52
53      const embedInfo = {
54        otp: '______',
55        playbackInfo: '______',
56        customPlayerId: '______' // <-- player id goes here
57      };
58
59      // in JSX
60
61      <VdoPlayerView
62        style={{height: 200, width: '100%'}}
63        embedInfo={embedInfo}
64      />`})]})}function hi(){return t.jsxs("div",{children:[t.jsx("strong",{children:" Minimum version recommended: 2.2.1"}),t.jsxs("p",{children:["Read the full"," ",t.jsx("a",{target:"_blank",href:"https://www.vdocipher.com/docs/mobile/flutter/getting-started",children:"documentation"})," ","for how to use the SDK before adding the below modifications. Set player id in"," ",t.jsx(A,{padding:"2px 4px",bgColor:"#f9ede2",children:"EmbedInfoOptions"})," ","using property"," ",t.jsx(A,{padding:"2px 4px",bgColor:"#f9ede2",children:"customPlayerId"})]}),t.jsx(q,{snippet:`EmbedInfo embedInfo = EmbedInfo.streaming(
65  otp: '______',
66  playbackInfo: '_______',
67  embedInfoOptions: EmbedInfoOptions(customPlayerId: '_____') // custom player id goes here
68);`,language:"dart"}),t.jsxs("p",{children:["For offline downloads, send the player id when downloading video. It is accepted by"," ",t.jsx(A,{padding:"2px 4px",bgColor:"#f9ede2",children:"downloadOptionsWithOtp()"}),". Once downloaded, player cannot be changed and"," ",t.jsx(A,{padding:"2px 4px",bgColor:"#f9ede2",children:"EmbedInfoOptions(customPlayerId: '_____')"}),", if used, will be ignored."]}),t.jsx(q,{snippet:`OptionsDownloader optionsDownloader = new OptionsDownloader();
69        optionsDownloader.downloadOptionsWithOtp(otp, playbackInfo, customPlayerId,
70            (downloadOptions) {
71              // we have received the available download options
72            }, (vdoError) {
73              // there was an error downloading the available options
74            });`,language:"dart"})]})}function pi(){return t.jsxs("div",{children:[t.jsx("p",{children:t.jsx("strong",{children:"Minimum required version 1.28"})}),t.jsxs("p",{children:["Read the ",t.jsx("a",{target:"_blank",href:"https://www.vdocipher.com/blog/2022/11/protect-videos-on-wordpress/",children:"Wordpress plugin documentation"}),"  from our blog."]}),t.jsxs("ul",{children:[t.jsx("li",{children:"Go to vdocipher settings in your wordpress dashboard"}),t.jsx("li",{children:"Read how player versions apply to wordpress. If you have any custom code changes done to player in wordpress, those will not translate to v2."}),t.jsx("li",{children:"Switch to version 2 of player"}),t.jsx("li",{children:"Copy the player id above and paste it in the Player ID input"})]}),t.jsx("p",{children:"Ensure you do not have any customisation done to the video player. If you had any custom styles or APIs integrated 
74with the video player, you should keep using `v1` of the player."}),t.jsx("img",{src:ii,alt:"wordpress-custom-player-ui-screenshot",style:{maxWidth:"min(100%, 600px)"}})]})}const fi=Se("div")`
75  button {
76    align-items: end;
77  }
78
79  padding-top: 80px;
80
81  .doc-and-tutorial-wrapper {
82    padding: 10px;
83    background: #f9f9f9;
84    margin: 20px 0;
85    display: flex;
86    align-items: center;
87    justify-content: space-around;
88    flex-wrap: wrap-reverse;
89  }
90`;function gi(){const[e,n]=C.useState(0),r=(o,a)=>{n(a)};return t.jsxs(fi,{children:[t.jsx("hr",{}),t.jsxs("div",{className:"doc-and-tutorial-wrapper",children:[t.jsxs("div",{style:{maxWidth:600,margin:"0"},children:[t.jsx("h3",{children:"How to customise video player?"}),t.jsx("p",{children:"This section allows you to customise the looks of the video player without writing a single line of code."}),t.jsxs("p",{children:["A ",t.jsx("em",{children:"player"})," is a collection of configuration options. These configuration options define how the video player is rendered. These options can toggle individual controls from the player, it can change the behaviour and set parameters for specific components. It can also let you change the general looks and design of the player."]}),t.jsxs("p",{children:["Each player is identified by an ",t.jsx("code",{children:t.jsx(A,{padding:"2px 4px",bgColor:"#f9ede2",children:"id"})}),". This is added to an embed code/Player SDK. It is also possible to use the player without changing code if you are applying universally to all embedded videos. This is called making it ",t.jsx("em",{children:"default"}),". When made ",t.jsx("em",{children:"default"}),", that player is applied to all videos without making any change."]}),t.jsx("p",{children:"This is not just on the web. It can also be used to customise the looks of video players on your mobile apps. It can be used in native android, iOS, react native and flutter using our SDKs for the respective platforms. Learn how to set the player id on each platform using the tabs below."}),t.jsx("p",{children:"Custom player is a new feature. It is only available on our latest player SDKs for each platform. Note the minimum version requirements for each platform below."})]}),t.jsx("div",{style:{height:"220px",marginTop:"18px",marginBottom:"auto"},children:t.jsx(Is,{poster:null,title:"Custom Video Player Tutorial",link:`https://www.vdocipher.com/blog/custom-video-player-tutorial/
91`})})]}),t.jsxs(re,{sx:{flexGrow:1,bgcolor:"background.paper",display:"flex",borderTop:1,borderColor:"divider",minHeight:600},children:[t.jsxs(Kn,{value:e,onChange:r,orientation:"vertical",sx:{borderRight:1,borderColor:"divider",minWidth:150},children:[t.jsx(te,{label:"Web"}),t.jsx(te,{label:"Android"}),t.jsx(te,{label:"React Native"}),t.jsx(te,{label:"iOS"}),t.jsx(te,{label:"Wordpress"}),t.jsx(te,{label:"Flutter"})]}),t.jsx(ne,{value:e,index:0,children:t.jsx(li,{})}),t.jsx(ne,{value:e,index:1,children:t.jsx(ci,{})}),t.jsx(ne,{value:e,index:2,children:t.jsx(ui,{})}),t.jsx(ne,{value:e,index:3,children:t.jsx(di,{})}),t.jsx(ne,{value:e,index:4,children:t.jsx(pi,{})}),t.jsx(ne,{value:e,index:5,children:t.jsx(hi,{})})]})]})}const yn=Se("div")(()=>({margin:"40px 16px"})),mi=({fetchPlayerConfigsAction:e,playerConfigs:n,setCurrentConfigAction:r,deletePlayerConfigAction:o,fetchingPlayerConfigs:a,deletingPlayerConfig:i,getDefaultAction:c,gettingDefault:l,formOpen:u,showSuccessMessage:h})=>{const f=C.useRef(null),y=no(),[b,v]=C.useState(!1),{isZenstream:s=!1}=C.useContext($e),d=p=>p.map(g=>(g.configId=t.jsxs("div",{style:{display:"flex",columnGap:"1%",alignItems:"center"},ref:f,children:[g.id,t.jsx(yt,{onClick:()=>si(g.id,f,h),children:t.jsx(Es,{fontSize:"small"})})]}),g.lastModified=ro(g.updatedAt,!0),g.default=t.jsx(_s,{checked:g.isDefault,onCh
91ange:()=>{r(g),v(!0)}}),g));return C.useEffect(()=>{(async()=>{await e(),c()})()},[]),C.useEffect(()=>{i||r(null)},[i]),t.jsxs("div",{style:{display:u?"none":"block"},children:[(a||l)&&t.jsx(yn,{children:t.jsx(U,{color:"textSecondary",align:"center",children:"Loading"})}),!(a||l)&&n&&t.jsx(Ge,{columns:se.SECURITY_CONFIG.PLAYER_CONFIG_TABLE_COLUMNS,buttonSize:"large",showButtonOnRight:!0,tableData:d(n.filter(p=>p.theme==="pv2_theme02")),handleDelete:o,isDeleting:i,tableType:"Custom Player",handleCreate:()=>{y.push("/dashboard/config/customplayer/new")},identityKey:"id",isEditable:!0,handleEdit:p=>{r(p)},defaultPlayerConfirmBoxState:b,setDefaultPlayerConfirmBoxState:v}),!(a||l)&&n&&n.length==0&&t.jsx(yn,{children:t.jsx(U,{color:"textSecondary",align:"center",children:"No Custom Players for this account yet. Create one!"})}),!s&&t.jsx(gi,{})]})},vi=e=>e.playerConfigs,yi=e=>X({fetchPlayerConfigsAction:ms,getDefaultAction:gs,setCurrentConfigAction:Qn,showSuccessMessage:qn,deletePlayerConfigAction:fs},e),xi=Y(vi,yi)(mi),rr=()=>{const{pathname:e}=ao();return C.useEffect(()=>{window.scrollTo(0,0)},[e]),t.jsx("div",{className:"tab-content",children:t.jsx(xi,{})})};
91var Ct={},bi=k;Object.defineProperty(Ct,"__esModule",{value:!0});var ar=Ct.default=void 0,ji=bi(T()),xn=t;ar=Ct.default=(0,ji.default)([(0,xn.jsx)("path",{d:"M6 22h12l-6-6z"},"0"),(0,xn.jsx)("path",{d:"M21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h4v-2H3V5h18v12h-4v2h4c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"},"1")],"Airplay");var wt={},Ci=k;Object.defineProperty(wt,"__esModule",{value:!0});var or=wt.default=void 0,wi=Ci(T()),Ei=t;or=wt.default=(0,wi.default)((0,Ei.jsx)("path",{d:"M19 1H5c-1.1 0-1.99.9-1.99 2L3 15.93c0 .69.35 1.3.88 1.66L12 23l8.11-5.41c.53-.36.88-.97.88-1.66L21 3c0-1.1-.9-2-2-2m-9 15-5-5 1.41-1.41L10 13.17l7.59-7.59L19 7z"}),"Beenhere");var Et={},Si=k;Object.defineProperty(Et,"__esModule",{value:!0});var sr=Et.default=void 0,_i=Si(T()),bn=t;sr=Et.default=(0,_i.default)([(0,bn.jsx)("path",{d:"M11.99 5V1l-5 5 5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6h-2c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"},"0"),(0,bn.jsx)("path",{d:"M10.89 16h-.85v-3.26l-1.01.31v-.69l1.77-.63h.09zm4.28-1.76c0 .32-.03.6-.1.82s-.17.42-.29.57-.28.26-.45.33-.37.1-.59.1-.41-.03-.59-.1-.33-.18-.46-.33-.23-.34-.3-.57-.11-.5-.11-.82v-.74c0-.32.03-.6.1-.82s.17-.42.29-.57.28-.26.45-.33.37-.1.59-.1.41.03.59.1.33.18.46.33.23.34.3.57.11.5.11.82zm-.85-.86c0-.19-.01-.35-.04-.48s-.07-.23-.12-.31-.11-.14-.19-.17-.16-.05-.25-.05-.18.02-.25.05-.14.09-.19.17-.09.18-.12.31-.04.29-.04.48v.97c0 .19.01.35.04.48s.07.24.12.32.11.14.19.17.16.05.25.05.18-.02.25-.05.14-.09.19-.17.09-.19.11-.32.04-.29.04-.48v-.97z"},"1")],"Replay10");var St={},Ii=k;Object.defineProperty(St,"__esModule",{value:!0});var ir=St.default=void 0,Ai=Ii(T()),Ri=t;ir=St.default=(0,Ai.default)((0,Ri.jsx)("path",{d:"M7 9H2V7h5zm0 3H2v2h5zm13.59 7-3.83-3.83c-.8.52-1.74.83-2.76.83-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5c0 1.02-.31 1.96-.83 2.75L22 17.59zM17 11c0-1.65-1.35-3-3-3s-3 1.35-3 3 1.35 3 3 3 3-1.35 3-3M2 19h10v-2H2z"}),"ManageSearch");var _t={},Pi=k;Object.defineProperty(_t,"__esModule",{value:!0});var lr=_t.default=void 0,Ti=Pi(T()),ki=t;lr=_t.default=(0,Ti.default)((0,ki.jsx)("path",{d:"M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m-8 7H9.5v-.5h-2v3h2V13H11v1c0 .55-.45 1-1 1H7c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1h3c.55 0 1 .45 1 1zm7 0h-1.5v-.5h-2v3h2V13H18v1c0 .55-.45 1-1 1h-3c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1h3c.55 0 1 .45 1 1z"}),"ClosedCaption");var It={},Oi=k;Object.defineProperty(It,"__esModule",{value:!0});var cr=It.default=void 0,Di=Oi(T()),Mi=t;cr=It.default=(0,Di.default)((0,Mi.jsx)("path",{d:"M19 5v14H5V5zm1.1-2H3.9c-.5 0-.9.4-.9.9v16.2c0 .4.4.9.9.9h16.2c.4 0 .9-.5.9-.9V3.9c0-.5-.5-.9-.9-.9M11 7h6v2h-6zm0 4h6v2h-6zm0 4h6v2h-6zM7 7h2v2H7zm0 4h2v2H7zm0 4h2v2H7z"}),"ListAlt");var At={},Ni=k;Object.defineProperty(At,"__esModule",{value:!0});var dr=At.default=void 0,Li=Ni(T()),Fi=t;dr=At.default=(0,Li.default)((0,Fi.jsx)("path",{d:"M21 3H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2M1 18v3h3c0-1.66-1.34-3-3-3m0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7m0-4v2c4.97 0 9 4.03 9 9h2c0-6.08-4.93-11-11-11"}),"Cast");var Rt={},Hi=k;
91Object.defineProperty(Rt,"__esModule",{value:!0});var ur=Rt.default=void 0,$i=Hi(T()),Ui=t;ur=Rt.default=(0,$i.default)((0,Ui.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M9.5 16.5v-9l7 4.5z"}),"PlayCircle");const jn=({label:e,name:n,value:r,allOptions:o,setOptions:a,disabled:i=!1})=>t.jsxs(_e,{fullWidth:!0,children:[t.jsx(Ue,{id:`${e.trim()}-label`,children:e}),t.jsx(Be,{id:`${e.trim()}`,name:n,multiple:!0,value:r,disabled:i,onChange:c=>a(c),input:t.jsx(bt,{label:e}),renderValue:n==="playbackSpeedOptions"?c=>c.sort((l,u)=>l-u).join(", "):c=>c.join(", "),MenuProps:{sx:{li:{padding:"4px"},"&& .Mui-selected":{backgroundColor:"#fff"}},PaperProps:{style:{maxHeight:270}}},children:o.map(c=>t.jsxs(z,{value:c,disabled:n==="playbackSpeedOptions"&&c===1,children:[t.jsx(xt,{checked:r.indexOf(c)>-1}),t.jsx(Yn,{primary:c})]},c))})]}),Cn=({label:e,name:n,value:r,allOptions:o,setOptions:a,disabled:i})=>t.jsxs(_e,{fullWidth:!0,children:[t.jsx(Ue,{id:`${e.trim()}-label`,children:e}),t.jsx(Be,{labelId:`${e.trim()}-label`,id:`${e.trim()}`,value:r,name:n,onChange:c=>a(c),variant:"outlined",label:e,disabled:i,SelectDisplayProps:{style:{display:"flex",columnGap:10,alignItems:"center"}},children:o.map(c=>t.jsxs(z,{value:c.value||c,style:{display:"flex",columnGap:10,alignItems:"center"},children:[c.icon,c.label||c.value||c]},c.value||c))})]});var Pt={},Bi=k;Object.defineProperty(Pt,"__esModule",{value:!0});var hr=Pt.default=void 0,Gi=Bi(T()),wn=t;hr=Pt.default=(0,Gi.default)([(0,wn.jsx)("path",{d:"M18 13c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6v4l5-5-5-5v4c-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8z"},"0"),(0,wn.jsx)("path",{d:"M10.86 15.94v-4.27h-.09L9 12.3v.69l1.01-.31v3.26zm1.39-2.5v.74c0 1.9 1.31 1.82 1.44 1.82.14 0 1.44.09 1.44-1.82v-.74c0-1.9-1.31-1.82-1.44-1.82-.14 0-1.44-.09-1.44 1.82m2.04-.12v.97c0 .77-.21 1.03-.59 1.03s-.6-.26-.6-1.03v-.97c0-.75.22-1.01.59-1.01.38-.01.6.26.6 1.01"},"1")],"Forward10");var Tt={},Vi=k;Object.defineProperty(Tt,"__esModule",{value:!0});var pr=Tt.default=void 0,zi=Vi(T()),Wi=t;pr=Tt.default=(0,zi.default)((0,Wi.jsx)("path",{d:"M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z"}),"Fullscreen");var kt={},Ki=k;Object.defineProperty(kt,"__esModule",{value:!0});var fr=kt.default=void 0,qi=Ki(T()),Yi=t;fr=kt.default=(0,qi.default)((0,Yi.jsx)("path",{d:"M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m-9 3h2v2h-2zm0 3h2v2h-2zM8 8h2v2H8zm0 3h2v2H8zm-1 2H5v-2h2zm0-3H5V8h2zm9 7H8v-2h8zm0-4h-2v-2h2zm0-3h-2V8h2zm3 3h-2v-2h2zm0-3h-2V8h2z"}),"Keyboard");var Ot={},Xi=k;Object.defineProperty(Ot,"__esModule",{value:!0});var gr=Ot.default=void 0,Zi=Xi(T()),Ji=t;gr=Ot.default=(0,Zi.default)((0,Ji.jsx)("path",{d:"M19 7h-8v6h8zm2-4H3c-1.1 0-2 .9-2 2v14c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98V5c0-1.1-.9-2-2-2m0 16.01H3V4.98h18z"}),"PictureInPicture");var Dt={},Qi=k;Object.defineProperty(Dt,"__esModule",{value:!0});var mr=Dt.default=void 0,el=Qi(T()),tl=t;mr=Dt.default=(0,el.default)((0,tl.jsx)("path",{d:"M9 16h2V8H9zm3-14C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m1-4h2V8h-2z"}),"PauseCircleOutline");const nl=Se(Fe)(()=>({".MuiInputBase-root ":{marginBottom:"10px"},".MuiInputBase-input.MuiOutlinedInput-input":{paddingBlock:"16.5px",borderRadius:"4px",fontSize:"16px",lineHeight:1},".MuiInputLabel-root":{top:"4px",lineHeight:1,backgroundcolor:"#F9FAFC"}})),En=({value:e,setValue:n,type:r="text",label:o="",name:a,disabled:i=!1,autoFocus:c=!1})=>t.jsx(nl,{label:o,value:e,onChange:l=>{a=="skipDuration"?n(l):n(l.target.value)},variant:"outlined",fullWidth:!0,autoFocus:c,type:r,name:a,disabled:i,InputLabelProps:a=="skipDuration"&&isNaN(e)||String(e).length==0?{shrink:!1}:{},inputProps:a=="skipDuration"?{min:0}:{}});var Mt={},rl=k;Object.defineProperty(Mt,"__esModule",{value:!0});var vr=Mt.default=void 0,al=rl(T()),ol=t;vr=Mt.default=(0,al.default)((0,ol.jsx)("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8m-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12m3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8m5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8m3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5"}),"ColorLens");
91function he(){return(he=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e}).apply(this,arguments)}function Nt(e,n){if(e==null)return{};var r,o,a={},i=Object.keys(e);for(o=0;o<i.length;o++)n.indexOf(r=i[o])>=0||(a[r]=e[r]);return a}function me(e){var n=C.useRef(e),r=C.useRef(function(o){n.current&&n.current(o)});return n.current=e,r.current}var ue=function(e,n,r){return n===void 0&&(n=0),r===void 0&&(r=1),e>r?r:e<n?n:e},ve=function(e){return"touches"in e},lt=function(e){return e&&e.ownerDocument.defaultView||self},Sn=function(e,n,r){var o=e.getBoundingClientRect(),a=ve(n)?function(i,c){for(var l=0;l<i.length;l++)if(i[l].identifier===c)return i[l];return i[0]}(n.touches,r):n;return{left:ue((a.pageX-(o.left+lt(e).pageXOffset))/o.width),top:ue((a.pageY-(o.top+lt(e).pageYOffset))/o.height)}},_n=function(e){!ve(e)&&e.preventDefault()},Lt=_.memo(function(e){var n=e.onMove,r=e.onKey,o=e.onEnd,a=Nt(e,["onMove","onKey","onEnd"]),i=C.useRef(null),c=me(n),l=me(r),u=me(o),h=C.useRef(null),f=C.useRef(!1),y=C.useMemo(function(){var p=function(m){_n(m),(ve(m)?m.touches.length>0:m.buttons>0)&&i.current?c(Sn(i.current,m,h.current)):(x(!1),u())},g=function(){x(!1),u()};function x(m){var j=f.current,L=lt(i.current),V=m?L.addEventListener:L.removeEventListener;V(j?"touchmove":"mousemove",p),V(j?"touchend":"mouseup",g)}return[function(m){var j=m.nativeEvent,L=i.current;if(L&&(_n(j),!function(ee,Ze){return Ze&&!ve(ee)}(j,f.current)&&L)){if(ve(j)){f.current=!0;var V=j.changedTouches||[];V.length&&(h.current=V[0].identifier)}L.focus(),c(Sn(L,j,h.current)),x(!0)}},function(m){var j=m.which||m.keyCode;j<37||j>40||(m.preventDefault(),l({left:j===39?.05:j===37?-.05:0,top:j===40?.05:j===38?-.05:0}))},function(m){var j=m.which||m.keyCode;j>=37&&j<=40&&u()},x]},[l,c,u]),b=y[0],v=y[1],s=y[2],d=y[3];return C.useEffect(function(){return d},[d]),_.createElement("div",he({},a,{onTouchStart:b,onMouseDown:b,className:"react-colorful__interactive",ref:i,onKeyDown:v,onKeyUp:s,tabIndex:0,role:"slider"}))}),Ie=function(e){return e.filter(Boolean).join(" ")},Ft=function(e){var n=e.color,r=e.left,o=e.top,a=o===void 0?.5:o,i=Ie(["react-colorful__pointer",e.className]);return _.createElement("div",{className:i,style:{top:100*a+"%",left:100*r+"%"}},_.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:n}}))},O=function(e,n,r){return n===void 0&&(n=0),r===void 0&&(r=Math.pow(10,n)),Math.round(r*e)/r},sl=function(e){return br(ct(e))},ct=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?O(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?O(parseInt(e.substring(6,8),16)/255,2):1}},il=function(e){return ll(xr(e))},yr=function(e){var n=e.s,r=e.v,o=e.a,a=(200-n)*r/100;return{h:O(e.h),s:O(a>0&&a<200?n*r/100/(a<=100?a:200-a)*100:0),l:O(a/2),a:O(o,2)}},dt=function(e){var n=yr(e);return"hsl("+n.h+", "+n.s+"%, "+n.l+"%)"},et=function(e){var n=yr(e);return"hsla("+n.h+", "+n.s+"%, "+n.l+"%, "+n.a+")"},xr=function(e){var n=e.h,r=e.s,o=e.v,a=e.a;n=n/360*6,r/=100,o/=100;var i=Math.floor(n),c=o*(1-r),l=o*(1-(n-i)*r),u=o*(1-(1-n+i)*r),h=i%6;return{r:O(255*[o,l,c,c,u,o][h]),g:O(255*[u,o,o,l,c,c][h]),b:O(255*[c,c,u,o,o,l][h]),a:O(a,2)}},Re=function(e){var n=e.toString(16);return n.length<2?"0"+n:n},ll=function(e){var n=e.r,r=e.g,o=e.b,a=e.a,i=a<1?Re(O(255*a)):"";return"#"+Re(n)+Re(r)+Re(o)+i},br=function(e){var n=e.r,r=e.g,o=e.b,a=e.a,i=Math.max(n,r,o),c=i-Math.min(n,r,o),l=c?i===n?(r-o)/c:i===r?2+(o-n)/c:4+(n-r)/c:0;return{h:O(60*(l<0?l+6:l)),s:O(i?c/i*100:0),v:O(i/255*100),a}},jr=_.memo(function(e){var n=e.hue,r=e.onChange,o=e.onChangeEnd,a=Ie(["react-colorful__hue",e.className]);return _.createElement("div",{className:a},_.createElement(Lt,{onMove:function(i){r({h:360*i.left})},onKey:function(i){r({h:ue(n+360*i.left,0,360)})},onEnd:o,"aria-label":"Hue","aria-valuenow":O(n),"aria-valuemax":"360","aria-valuemin":"
910"},_.createElement(Ft,{className:"react-colorful__hue-pointer",left:n/360,color:dt({h:n,s:100,v:100,a:1})})))}),Cr=_.memo(function(e){var n=e.hsva,r=e.onChange,o=e.onChangeEnd,a={backgroundColor:dt({h:n.h,s:100,v:100,a:1})};return _.createElement("div",{className:"react-colorful__saturation",style:a},_.createElement(Lt,{onMove:function(i){r({s:100*i.left,v:100-100*i.top})},onKey:function(i){r({s:ue(n.s+100*i.left,0,100),v:ue(n.v-100*i.top,0,100)})},onEnd:o,"aria-label":"Color","aria-valuetext":"Saturation "+O(n.s)+"%, Brightness "+O(n.v)+"%"},_.createElement(Ft,{className:"react-colorful__saturation-pointer",top:1-n.v/100,left:n.s/100,color:dt(n)})))}),Ht=function(e,n){if(e===n)return!0;for(var r in e)if(e[r]!==n[r])return!1;return!0},cl=function(e,n){return e.toLowerCase()===n.toLowerCase()||Ht(ct(e),ct(n))};function wr(e,n,r,o){var a=me(r),i=me(o),c=C.useState(function(){return e.toHsva(n)}),l=c[0],u=c[1],h=C.useRef({color:n,hsva:l}),f=C.useRef(!1);C.useEffect(function(){if(!e.equal(n,h.current.color)){var v=e.toHsva(n);h.current={hsva:v,color:n},u(v),f.current=!1}},[n,e]),C.useEffect(function(){var v;Ht(l,h.current.hsva)||e.equal(v=e.fromHsva(l),h.current.color)||(h.current={hsva:l,color:v},a(v),f.current=!0)},[l,e,a]);var y=C.useCallback(function(v){u(function(s){return Object.assign({},s,v)})},[]),b=C.useCallback(function(){f.current&&(f.current=!1,i(h.current.color))},[i]);return[l,y,b]}var dl=typeof window<"u"?C.useLayoutEffect:C.useEffect,ul=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},In=new Map,Er=function(e){dl(function(){var n=e.current?e.current.ownerDocument:document;if(n!==void 0&&!In.has(n)){var r=n.createElement("style");r.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,In.set(n,r);var o=ul();o&&r.setAttribute("nonce",o),n.head.appendChild(r)}},[])},hl=function(e){var n=e.className,r=e.colorModel,o=e.color,a=o===void 0?r.defaultColor:o,i=e.onChange,c=e.onChangeEnd,l=Nt(e,["className","colorModel","color","onChange","onChangeEnd"]),u=C.useRef(null);Er(u);var h=wr(r,a,i,c),f=h[0],y=h[1],b=h[2],v=Ie(["react-colorful",n]);return _.createElement("div",he({},l,{ref:u,className:v}),_.createElement(Cr,{hsva:f,onChange:y,onChangeEnd:b}),_.createElement(jr,{hue:f.h,onChange:y,onChangeEnd:b,className:"react-colorful__last-control"}))},pl={defaultColor:"000",toHsva:sl,fromHsva:function(e){return il({h:e.h,s:e.s,v:e.v,a:1})},equal:cl},fl=function(e){return _.createElement(hl,he({},e,{colorModel:pl}))},gl=function(e){var n=e.className,r=e.hsva,o=e.onChange,a=e.onChangeEnd,i={backgroundImage:"linear-gradient(90deg, "+et(Object.assign({},r,{a:0}))+", "+et(Object.assign({},r,{a:1}))+")"},c=Ie(["react-colorful__alpha",n]),l=O(100*r.a);return _.createElement("div",{className:c},_.createElement("div",{className:"react-colorful__alpha-gradient",style:i}),_.createElement(Lt,{onMove:function(u){o({a:u.left})},onKey:function(u){o({a:ue(r.a+u.left)})},onEnd:a,"aria-label":"Alpha","aria-valuetext":l+"%","aria-valuenow":l,"aria-valuemin":"
910","aria-valuemax":"100"},_.createElement(Ft,{className:"react-colorful__alpha-pointer",left:r.a,color:et(r)})))},ml=function(e){var n=e.className,r=e.colorModel,o=e.color,a=o===void 0?r.defaultColor:o,i=e.onChange,c=e.onChangeEnd,l=Nt(e,["className","colorModel","color","onChange","onChangeEnd"]),u=C.useRef(null);Er(u);var h=wr(r,a,i,c),f=h[0],y=h[1],b=h[2],v=Ie(["react-colorful",n]);return _.createElement("div",he({},l,{ref:u,className:v}),_.createElement(Cr,{hsva:f,onChange:y,onChangeEnd:b}),_.createElement(jr,{hue:f.h,onChange:y,onChangeEnd:b}),_.createElement(gl,{hsva:f,onChange:y,onChangeEnd:b,className:"react-colorful__last-control"}))},vl={defaultColor:{r:0,g:0,b:0,a:1},toHsva:br,fromHsva:xr,equal:Ht},yl=function(e){return _.createElement(ml,he({},e,{colorModel:vl}))};const xl=D("div")(({color:e})=>({width:"32px",height:"32px",borderRadius:"50%",border:"3px solid #fff",boxShadow:"0 0 0 1px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(0, 0, 0, 0.1)",cursor:"pointer",backgroundColor:e})),bl=e=>{var c,l,u,h;const n=e.replace("rgba(","").replace(")","").split(","),r=Number((c=n[0])==null?void 0:c.trim())||0,o=Number((l=n[1])==null?void 0:l.trim())||0,a=Number((u=n[2])==null?void 0:u.trim())||0,i=Number((h=n[3])==null?void 0:h.trim())||0;return{r,g:o,b:a,a:i}},jl=({color:e,onChange:n,withAlpha:r})=>{const[o,a]=C.useState(null),i=h=>{a(h.currentTarget)},c=()=>{a(null)},l=!!o,u=l?"color-picker-popover":void 0;return t.jsxs("div",{children:[t.jsx(xl,{color:e,onClick:i}),t.jsx(oo,{id:u,open:l,anchorEl:o,onClose:c,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:r?t.jsx(yl,{color:bl(e),onChange:n}):t.jsx(fl,{color:e,onChange:n})})]})},Cl=D("div")(()=>({display:"flex",columnGap:"5px",marginTop:"20px"})),tt=({color:e,setOptions:n,label:r,stateKey:o,withAlpha:a=!1})=>t.jsx(Cl,{children:t.jsx(Fe,{label:r,value:e,name:o,onChange:i=>n(i),variant:"outlined",fullWidth:!0,InputProps:{startAdornment:t.jsxs(cn,{position:"start",children:[t.jsx(vr,{})," ",a?"RGBA":"Hex"]}),endAdornment:t.jsx(cn,{position:"end",sx:{borderRadius:"50%"},children:t.jsx(jl,{color:e,withAlpha:a,onChange:i=>{let c=i;if(a&&typeof i=="object"){const{r:l=0,g:u=0,b:h=0,a:f=1}=i??{};c=`rgba(${l}, ${u}, ${h}, ${f})`}n({target:{name:o,value:c}})}})})},inputProps:{maxLength:a?30:7}})});var $t={},wl=k;Object.defineProperty($t,"__esModule",{value:!0});var Sr=$t.default=void 0,El=wl(T()),Sl=t;Sr=$t.default=(0,El.default)((0,Sl.jsx)("path",{d:"M18 8c0-3.31-2.69-6-6-6S6 4.69 6 8c0 4.5 6 11 6 11s6-6.5 6-11m-8 0c0-1.1.9-2 2-2s2 .9 2 2-.89 2-2 2c-1.1 0-2-.9-2-2M5 20v2h14v-2z"}),"PinDrop");var Ut={},_l=k;Object.defineProperty(Ut,"__esModule",{value:!0});var _r=Ut.default=void 0,Il=_l(T()),Al=t;_r=Ut.default=(0,Il.default)((0,Al.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4zm1.5 4.5h2v-3h-2z"}),"Hd");var Bt={},Rl=k;Object.defineProperty(Bt,"__esModule",{value:!0});var Ir=Bt.default=void 0,Pl=Rl(T()),Tl=t;Ir=Bt.default=(0,Pl.default)((0,Tl.jsx)("path",{fillRule:"evenodd",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m6 10c0 3.31-2.69 6-6 6s-6-2.69-6-6h2c0 2.21 1.79 4 4 4s4-1.79 4-4-1.79-4-4-4v3L8 7l4-4v3c3.31 0 6 2.69 6 6"}),"ReplayCircleFilled");var Gt={},kl=k;Object.defineProperty(Gt,"__esModule",{value:!0});var Ar=Gt.default=void 0,Ol=kl(T()),Dl=t;Ar=Gt.default=(0,Ol.default)((0,Dl.jsx)("path",{d:"M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2M9.5 16.5v-9l7 4.5z"}),"SmartDisplay");var Vt={},Ml=k;Object.defineProperty(Vt,"__esModule",{value:!0});var Rr=Vt.default=void 0,Nl=Ml(T()),Ll=t;Rr=Vt.default=(0,Nl.default)((0,Ll.jsx)("path",{d:"M3 9v6h4l5 5V4L7 9zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77"}),"VolumeUp");const $="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20filter='url(%23filter0_d_3351_20704)'%3e%3ccircle%20cx='10'%20cy='10'%20r='8'%20fill='white'/%3e%3c/g%3e%3cpath%20d='M6.44434%2010.4451L8.98402%2012.6673L13.5554%207.33398'%20stroke='%235F50E4'/%3e%3cdefs%3e%3cfilter%20id='filter0_d_3351_20704'%20x='0'%20y='0'%20width='20'%20height='20'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='Backgroun
91dImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset/%3e%3cfeGaussianBlur%20stdDeviation='1'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.25%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_3351_20704'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_3351_20704'%20result='shape'/%3e%3c/filter%3e%3c/defs%3e%3c/svg%3e";function Fl({disabled:e,qualityTrackLabels:n,onChangeHandler:r}){const[o,a]=C.useState(!1);let i="";const c=Object.fromEntries(dn.map(l=>[l.value,l.preview]));return i=n.label.map((l,u)=>{const h=c[l];return u===0?h:n.separator==="()"?`(${h})`:`${n.separator} ${h}`}).join(" "),t.jsxs(so,{disabled:e,expanded:e?!1:o,onChange:(l,u)=>{e||a(u)},sx:{"&:before":{display:"none"},borderTopLeftRadius:8,borderTopRightRadius:8,boxShadow:"2px 2px 6px rgba(0,0,0,0.1)","&.Mui-expanded":{margin:"0px"},"&.Mui-disabled":{backgroundColor:"rgba(0, 0, 0, 0.09)"},pointerEvents:e?"none":"auto"},children:[t.jsx(io,{expandIcon:t.jsx(lo,{}),"aria-controls":"quality-label-content",id:"quality-label-header",children:t.jsx(U,{sx:{fontSize:"14px",color:"grey.dimgray"},children:"Choose the text of quality labels"})}),t.jsxs(co,{sx:{padding:0},children:[t.jsxs(re,{sx:{borderTop:"1px solid rgb(223, 227, 230)",display:"flex"},children:[t.jsx(re,{sx:{flex:3,p:"10px"},children:t.jsxs(re,{children:[t.jsx(U,{variant:"body2",children:"Information to display"}),t.jsx(uo,{sx:{rowGap:"0 !important",mb:"0 !important"},children:dn.map(l=>t.jsx(un,{control:t.jsx(xt,{checked:n.label.includes(l.value),disabled:n.label.length===1&&n.label.includes(l.value),sx:{padding:"5px"}}),label:l.label,name:`qualityTrackLabels ${l.value}`,sx:{margin:0,"& .MuiFormControlLabel-label":{fontSize:"14px"}},onChange:u=>r(u)},l.value))})]})}),t.jsxs(re,{sx:{flex:2,borderLeft:"1px solid rgb(223, 227, 230)",p:"10px"},children:[t.jsx(U,{variant:"body2",children:"Separator"}),t.jsx(_e,{children:t.jsx(ho,{"aria-labelledby":"radio-buttons-group-label",defaultValue:" ",sx:{rowGap:"0 !important",mb:"0 !important"},onChange:l=>r(l),children:po.map(l=>t.jsx(un,{value:l.value,control:t.jsx(fo,{checked:n.separator===l.value,sx:{padding:"5px"}}),name:`qualityTrackString ${l.value}`,label:l.label,sx:{margin:0,"& .MuiFormControlLabel-label":{fontSize:"14px"}}},l.value))})})]})]}),n.label.length>0&&t.jsxs(re,{sx:{p:"10px",borderTop:"1px solid rgb(223, 227, 230)"},children:[t.jsxs(U,{variant:"body2",sx:{mb:"5px"},children:[t.jsx("b",{children:"Preview : "}),i]}),t.jsx(U,{variant:"body2",children:"* Note that multiple tracks can have the same resolutions and result in duplicate labels."})]})]})]})}const I=Se("div")(({isHidden:e})=>({padding:"10px",backgroundColor:"#F9FAFC",border:"1px solid #DFE5EC",borderRadius:"4px",marginBottom:"20px",display:e?"none":"block"})),nt=({href:e,children:n})=>t.jsx(mo,{target:"_blank",rel:"noopener noreferrer",href:e,children:n}),Hl=({options:e,setOptions:n,configName:r,setConfigName:o})=>{const{primaryColor:a,showPlayPauseBtn:i,showTimeText:c,showVolume:l,showProgressBar:u,showSpeedControl:h,showQualityControl:f,showCaptionsControl:y,showFullScreen:b,showForward:v,showBackward:s,enableAirPlay:d,hideControlsOnPause:p,skipDuration:g,playbackSpeedOptions:x,collapseInSettings:m,enableCaptionSearch:j,enablePiP:L,enableChromecast:V,enableChapters:ee,showReplayAtEnd:Ze,enableLockControls:ea,showScrubbingPreview:ta,enableKeyboardShortcuts:na,confirmBeforeAutoResume:ra,enableAutoResumeLocal:an,enableDoubleTapSkip:Ae,enableSaveOffline:aa,conserveVolumeAcrossSession:oa,conserveSpeedAcrossSession:sa,conserveQualityAcrossSession:ia,conserveSelectedCaptionLanguage:la,initialPlayButtonShape:ca,initialDurationPosition:da,captionGlobalStyles:on}=e,sn=["chapters","captions","speed","quality","captionSearch","saveOffline"],ua=Xn("saveOffline");let Je;ua?Je=sn:Je=sn.filter(w=>w!=="saveOffline");const[ha,pa]=C.useState({chromecast:!1,doubleTapSkip:!1,scrubbingPreview:!1,saveOffline:!1,enablePiP:!1,conservePlayerPreferences:!1});C.useEffect(()=>{const ba=go(["chromecast","doubleTapSkip","scrubbingPreview","saveOffline","enablePiP","conservePlayerPreferences"]);pa({...ba})},[]),C.useEffect(()=>{Ae||v||s||n({target:{name:"skipDuration",value:0}})},[Ae,v,s]);const{chromecast:fa,doubleTapSkip:ga,scrubbingPreview:ma,saveOffline:va,enablePiP:ya,conservePlayerPreferences:xa}=ha;return t.jsxs("div",{children:[t.jsx(K,{text:"Player Config",fontSize:16,styles:{padding:"20px",borderBottom:"1px solid #DFE3E6",position:"sticky",top:"calc(75px + 60px
91)",backgroundColor:"white",opacity:"1",zIndex:5}}),t.jsxs("div",{className:"input-group",children:[t.jsx(K,{text:"Player Name"}),t.jsx(En,{value:r,setValue:o,label:"",type:"text",autoFocus:!0}),t.jsx(K,{text:"Skip Forward/Backward Buttons"}),t.jsxs(I,{children:[ga&&t.jsx(S,{label:"Enable Double Tap Skip",name:"enableDoubleTapSkip",value:Ae,onChangeHandler:w=>n(w)}),t.jsx(S,{label:"Show Forward Button",name:"showForward",value:v,onChangeHandler:n,icon:t.jsx(hr,{})}),t.jsx(S,{label:"Show Backward Button",name:"showBackward",value:s,onChangeHandler:n,icon:t.jsx(sr,{})}),t.jsx(En,{value:g,setValue:n,disabled:!(Ae||v||s),label:"Skip Duration",type:"number",name:"skipDuration"})]}),t.jsx(K,{text:"SPEED CONTROL"}),t.jsxs(I,{children:[t.jsx(S,{label:"Show Speed Control",name:"showSpeedControl",value:h,onChangeHandler:w=>n(w)}),t.jsx("div",{style:{marginTop:"15px",marginBottom:"10px"},children:t.jsx(jn,{label:"PlayBack Speed Options",name:"playbackSpeedOptions",value:x,allOptions:[.25,.5,.75,1,1.25,1.5,1.75,2],setOptions:n,disabled:!h})})]}),t.jsx(K,{text:"CAPTIONS"}),t.jsxs(I,{children:[t.jsx(S,{label:"Show Captions Control",name:"showCaptionsControl",value:y,onChangeHandler:w=>n(w),icon:t.jsx(lr,{})}),t.jsx(S,{label:"Enable Caption Search",name:"enableCaptionSearch",value:j,onChangeHandler:w=>n(w),disabled:!y,icon:t.jsx(ir,{})})]}),t.jsx(K,{text:"Caption styles"}),t.jsxs(I,{children:[t.jsx(tt,{color:on.color,setOptions:n,label:"Caption Color",stateKey:"captionGlobalStyles.color"}),t.jsx(tt,{color:on.backgroundColor,setOptions:n,label:"Caption Background Color",stateKey:"captionGlobalStyles.backgroundColor",withAlpha:!0})]}),t.jsx(K,{text:"PROGRESS"}),t.jsxs(I,{children:[t.jsx(S,{label:"Show Progress Bar",name:"showProgressBar",value:u,onChangeHandler:n,icon:t.jsx(Sr,{})}),ma&&t.jsx(S,{label:"Show Scrubbing Preview",name:"showScrubbingPreview",value:ta,onChangeHandler:w=>n(w),disabled:!u})]}),t.jsx(K,{text:"AUTO RESUME"}),t.jsxs(I,{children:[t.jsx(S,{label:"Enable Local Resume",name:"enableAutoResumeLocal",value:an,onChangeHandler:w=>n(w),icon:t.jsx(or,{})}),t.jsx(S,{isHidden:!0,label:"Confirm Before AutoResume",name:"confirmBeforeAutoResume",value:ra,onChangeHandler:w=>n(w),description:"Ask viewer: 'Resume watching or start afresh'",disabled:!an})]}),t.jsx(K,{text:"OTHER CONTROLS"}),t.jsx(I,{children:t.jsx(jn,{label:"Buttons to move inside a settings icon",name:"collapseInSettings",value:m,allOptions:Je,setOptions:n})}),t.jsxs(I,{children:[t.jsx(tt,{color:a,setOptions:n,label:"Primary Color",stateKey:"primaryColor"}),t.jsxs(ie,{children:[t.jsxs("li",{children:[t.jsx("img",{src:$}),t.jsx(t.Fragment,{children:"On Android app, this is not used. Colour is taken from the application theme."})]}),t.jsxs("li",{children:[t.jsx("img",{src:$}),t.jsx(t.Fragment,{children:" On iOS app, this is applied to the seek bar colour"})]}),t.jsxs("li",{children:[t.jsx("img",{src:$}),t.jsx(t.Fragment,{children:"On Web player, this is applied to the seek bar and the initial play button"})]})]})]}),t.jsx(I,{children:t.jsx(S,{label:"Show Play/Pause Button",name:"showPlayPauseBtn",value:i,onChangeHandler:n,icon:t.jsx(mr,{})})}),t.jsx(I,{children:t.jsx(S,{label:"Show Time Text",name:"showTimeText",value:c,onChangeHandler:n})}),t.jsxs(I,{children:[t.jsx(S,{label:"Show Volume icon",name:"showVolume",value:l,onChangeHandler:n,icon:t.jsx(Rr,{})}),t.jsx(ie,{children:t.jsxs("li",{children:[t.jsx("img",{src:$}),"Volume icon is only shown on the web."]})})]}),t.jsxs(I,{children:[t.jsx(S,{label:"Show Quality Control",name:"showQualityControl",value:f,onChangeHandler:n,icon:t.jsx(_r,{})}),t.jsx(Fl,{disabled:!f,qualityTrackLabels:e.qualityTrackLabels,onChangeHandler:n})]}),t.jsx(I,{children:t.jsx(S,{label:"Show FullScreen",name:"showFullScreen",value:b,onChangeHandler:n,icon:t.jsx(pr,{})})}),t.jsx(I,{children:t.jsx(S,{label:"Enable AirPlay",name:"enableAirPlay",value:d,onChangeHandler:n,icon:t.jsx(ar,{})})}),t.jsx(I,{isHidden:!0,children:t.jsx(S,{isHidden:!0,label:"Hide Controls on Pause",name:"hideControlsOnPause",value:p,onChangeHandler:n})}),t.jsx(I,{children:t.jsx(S,{label:"Show Replay At End",name:"showReplayAtEnd",value:Ze,onCh
91angeHandler:w=>n(w),icon:t.jsx(Ir,{})})}),t.jsxs(I,{children:[t.jsx(S,{label:"Enable Lock Controls",name:"enableLockControls",value:ea,onChangeHandler:w=>n(w),icon:t.jsx(Ss,{})}),t.jsx(ie,{children:t.jsxs("li",{children:[t.jsx("img",{src:$}),t.jsx(t.Fragment,{children:"Only on Android app and iOS app"})]})})]}),ya&&t.jsx(I,{children:t.jsxs(t.Fragment,{children:[t.jsx(S,{label:"Enable PiP",name:"enablePiP",value:L,onChangeHandler:w=>n(w),icon:t.jsx(gr,{})}),t.jsxs(ie,{children:["Does not apply to android. Behavior varies by platform. Note the following:",t.jsxs("li",{children:[t.jsx("img",{src:$}),"On the web, PiP button only shows on desktop Chrome, and other Chromium-based browsers."]}),t.jsxs("li",{children:[t.jsx("img",{src:$}),t.jsx(nt,{href:"https://www.vdocipher.com/docs/mobile/android/getting-started#picture-in-picture",children:"Android Native instructions for PiP"})," "]}),t.jsxs("li",{children:[t.jsx("img",{src:$}),t.jsx(nt,{href:"https://www.vdocipher.com/docs/mobile/react-native/pip-mode",children:"React Native instructions (for Android)"})]}),t.jsxs("li",{children:[t.jsx("img",{src:$}),t.jsx(nt,{href:"https://www.vdocipher.com/docs/mobile/flutter/pip-mode",children:"Flutter instructions (for Android)"})]}),t.jsxs("li",{children:[t.jsx("img",{src:$}),t.jsxs("p",{style:{margin:0}
91,children:["On iOS, add ",t.jsx("strong",{children:"Background Modes"})," capability to your app with the mode"," ",t.jsx("strong",{children:"Audio, AirPlay, and Picture in Picture"}),". No code changes required."]})]})]})]})}),t.jsx(I,{children:t.jsx(S,{label:"Enable Keyboard Shortcuts",name:"enableKeyboardShortcuts",value:na,onChangeHandler:w=>n(w),icon:t.jsx(fr,{})})}),t.jsx(I,{children:t.jsx(S,{label:"Enable Chapters",name:"enableChapters",value:ee,onChangeHandler:w=>n(w),icon:t.jsx(cr,{})})}),fa&&t.jsx(I,{children:t.jsx(S,{label:"Enable Chromecast",name:"enableChromecast",value:V,onChangeHandler:w=>n(w),icon:t.jsx(dr,{})})}),va&&t.jsx(I,{children:t.jsx(S,{label:"Enable Save Offline",name:"enableSaveOffline",value:aa,onChangeHandler:w=>n(w)})}),t.jsxs(I,{children:[t.jsx("div",{style:{marginTop:"15px",marginBottom:"10px"},children:t.jsx(Cn,{label:"Shape of Play Button",name:"initialPlayButtonShape",value:ca,allOptions:[{value:"circle",icon:t.jsx(ur,{})},{value:"square",icon:t.jsx(Ar,{})}],setOptions:n})}),t.jsx("div",{style:{marginTop:"15px",marginBottom:"10px"},children:t.jsx(Cn,{label:"Position of Video Duration",name:"initialDurationPosition",value:da,allOptions:[{label:"none",value:"none"},{label:"center",value:"center"},{label:"top left",value:"top-left"},{label:"top right",value:"top-right"},{label:"bottom left",value:"bottom-left"},{label:"bottom right",value:"bottom-right"}],setOptions:n})}),t.jsx(ie,{children:t.jsxs("li",{children:[t.jsx("img",{src:$}),t.jsx(t.Fragment,{children:"Currently only available on web player. Coming soon to Android app and iOS app too."})]})})]}),xa&&t.jsxs(I,{children:[t.jsx(S,{label:"Remember last volume level",name:"conserveVolumeAcrossSession",value:oa,onChangeHandler:w=>n(w)}),t.jsx(S,{label:"Remember last player speed",name:"conserveSpeedAcrossSession",value:sa,onChangeHandler:w=>n(w)}),t.jsx(S,{label:"Remember last quality",name:"conserveQualityAcrossSession",value:ia,onChangeHandler:w=>n(w)}),t.jsx(S,{label:"Remember last caption language",name:"conserveSelectedCaptionLanguage",value:la,onChangeHandler:w=>n(w)}),t.jsx(ie,{children:t.jsxs("li",{children:[t.jsx("img",{src:$}),"Volume not applicable on Android and iOS Apps"]})})]})]})]})};function $l(e){const n=C.useRef();return C.useEffect(()=>{n.current=e}),n.current}const Ul=e=>{const{buttonName:n,buttonVariant:r,createPlayerConfigAction:o,updatePlayerConfigAction:a,config:i,currentConfig:c,creatingPlayerConfig:l,updatingPlayerConfig:u,setCurrentConfigAction:h}=e,f=$l({updatingPlayerConfig:u,creatingPlayerConfig:l});let y,b;f&&(y=f.updatingPlayerConfig,b=f.creatingPlayerConfig),C.useEffect(()=>{(y&&!u||b&&!l)&&h(null)},[u,l]);const v=u||l;return t.jsx(W,{color:"primary",variant:r,onClick:()=>{c?a(c.id,i):o({...i,theme:"pv2_theme02"})},component:Zn,to:"/dashboard/config/customplayer",disabled:v,children:v?"Saving":n})},Bl=e=>e.playerConfigs,Gl=e=>X({createPlayerConfigAction:ys,updatePlayerConfigAction:vs,setCurrentConfigAction:Qn},e),Vl=Y(Bl,Gl)(Ul),zl=({config:e})=>t.jsx(B,{container:!0,style:{position:"sticky",bottom:0,backgroundColor:"white",overflow:"hidden",borderRadius:"0px 0px 5px 5px",padding:"10px",borderTop:"0.2px solid #DFDFDF",border:"1px solid #DFE3E6",zIndex:1},children:t.jsx(B,{item:!0,xs:4,children:t.jsxs(B,{container:!0,spacing:10,children:[t.jsx(B,{item:!0,xs:2,children:t.jsx(Vl,{buttonName:"Save",buttonVariant:"contained",config:e})}),t.jsx(B,{item:!0,xs:2,children:t.jsx(W,{variant:"outlined",color:"primary",component:Zn,to:"/dashboard/config/customplayer",children:"Discard"})})]})})}),An={collapseInSettings:[],confirmBeforeAutoResume:!1,enableAirPlay:!1,enableAutoResumeLocal:!0,enableCaptionSearch:!0,enableChromecast:!1,enableChapters:!0,enableDoubleTapSkip:!0,enableKeyboardShortcuts:!0,enableLockControls:!0,enablePiP:!1,enableReportBug:!1,enableSaveOffline:!1,hideControlsOnPause:!0,playbackSpeedOptions:[.5,.75,1,1.25,1.5,1.75,2],primaryColor:"#FF0000",showBackward:!0,showCaptionsControl:!0,showForward:!0,showFullScreen:!0,showPlayPauseBtn:!0,showProgressBar:!0,showQualityControl:!0,showReplayAtEnd:!0,showScrubbingPreview:!1,showSpeedControl:!0,showTimeText:!0,showVolume:!0,skipDuration:10,conserveVolumeAcrossSession:!1,conserveSpeedAcrossSession:!1,conserveQualityAcrossSession:!1,conserveSelectedCaptionLanguage:!1,initialPlayButtonShape:"circle",initialDurationPosition:"none",qualityTrackLabels:{separator:"()",label:["ROUNDED_kbps"]},captionGlobalStyles:{color:"#ffffff",backgroundColor:"rgba(0, 0, 0, 0.5)"}},Wl=["primaryColor","playbackSpeedOptions","collapseInSettings","initialPlayButtonShape","initialDurationPosition"],Rn={showProgressBar:{pair:"showScrubbingPreview",finalValue:!1},showSpeedControl:{pair:"playbackSpeedOptions",finalValue:[1]},enableAutoResumeLocal:{pair:"confirmBeforeAutoResume",finalValue:!1},showCaptionsControl:{pair:"enableCaptionSearch",finalValue:!1}},Kl=e=>{const{currentConfig:n,fetchingCurrentConfig:r}=e,[o,a]=C.useState(An),[i,c]=C.useState(""),l=f=>{if(f.target.name in Rn&&f.target.checked===!1){const{pair:y,finalValue:b}=Rn[f.target.name];a({...o,[f.target.name]:!1,[y]:b});return}if(f.target.name==="skipDuration")a({...o,skipDuration:parseInt(f.target.value)});else if(Wl.indexOf(f.target.name)>-1)a({...o,[f.target.name]:f.target.value});else if(f.target.name.includes("qualityTrackLabels")){const y=f.target.name.split(" ")[1];a(b=>{var s;const v=((s=b.qualityTrackLabels)==null?void 0:s.label)||[];return{...b,qualityTrackLabels:{...b.qualityTrackLabels,label:f.target.checked?[...v,y]:v.filter(d=>d!==y)}}})}else if(f.target.name.includes("qualityTrackString")){const y=f.target.name.split(" ")[1];a(b=>({...b,qualityTrackLabels:{...b.qualityTrackLabels,separator:y||" "}}))}else f.target.name.includes("captionGlobalStyles")?a(y=>{const{name:b,value:v}=f.target,[s,d]=b.split(".");return{...y,[s]:{...y[s],[d]:v}}}):a({...o,[f.target.name]:f.target.checked})};C.useEffect(()=>{n&&(a({...An,...n.options}),c(n.name))},[n]),C.useEffect(()=>{(async()=>
91{if(!n){const y=vo();if(y==="new")return;await e.getCurrentConfigFromId(y)}})()},[]);const u="20160313versUSE3132Y8s8VLiguviSgRlrrMgwMsq6RGQBAsOR5aXb4yUBJ5fmK",h="eyJ2aWRlb0lkIjoiOTUwZjkzZDkzMjE2NDFmMzllZWExOTYzYjM3ZDM3MDQifQ==";return r?t.jsx(tr,{}):t.jsxs("div",{className:"tab-content",style:{background:"none",paddingInline:"0"},children:[t.jsxs(B,{container:!0,sx:{gap:"20px",justifyContent:"start",marginBottom:"15px"},children:[t.jsx(B,{item:!0,sm:5,flexGrow:1,sx:{backgroundColor:"#fff",borderRadius:"10px",border:"1px solid #DFE3E6",lineHeight:1,order:{sm:0,xs:1}},children:t.jsx(Hl,{options:o,setOptions:l,configName:i,setConfigName:c,currentConfig:n})}),t.jsx(B,{item:!0,sx:{backgroundColor:"#fff",borderRadius:"10px",border:"1px solid #DFE3E6",lineHeight:1,flexGrow:1},children:t.jsx(xs,{options:o,otp:u,playbackInfo:h,config:{name:i,options:o}})})]}),t.jsx(zl,{config:{name:i,options:o}})]})},ql=e=>e.playerConfigs,Yl=e=>X({getCurrentConfigFromId:bs},e),Pr=Y(ql,Yl)(Kl);var zt={},Xl=k;Object.defineProperty(zt,"__esModule",{value:!0});var Tr=zt.default=void 0,Zl=Xl(T()),Jl=t;Tr=zt.default=(0,Zl.default)((0,Jl.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm-1 4 6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2zm-1 7h5.5L14 6.5z"}),"FileCopy");const Ql=D("hr")(()=>({border:"0.5px solid #F0F1F5"})),ec=D("div")(()=>({marginBottom:"15vh",lineHeight:2,maxWidth:300})),tc=()=>{const{isZenstream:e=!1,placeHolderTextLowercase:n=!1}=C.useContext($e);return t.jsx(be,{className:"tab-content full-round",margin:"18px 0",children:t.jsxs(jt,{children:[t.jsx("h3",{children:"How to use API keys"}),t.jsx("vdocipher-player",{style:{width:300,maxWidth:"100vw",float:"right"},popovermode:!0,otp:"20160313versUSE313ItvcOya6CXCwwbTmId0aaWnR3923A8S5nXNbAVmgXvpbcL",playbackinfo:"eyJ2aWRlb0lkIjoiMWZkNDYyMWQ5OWRlNDNjNmFkMjc1YjRiMzE4NWRmZGUifQ=="}),t.jsx(ec,{children:t.jsxs("p",{children:[t.jsx("strong",{children:"API Key"}),t.jsx("em",{children:": password for servers"}),t.jsx("br",{}),t.jsx("p",{children:"A secret token which allows one application to access the API of another application or service while blocking access to everyone else without the key."})]})}),t.jsx(Ql,{}),t.jsx("h3",{children:"(Only editable by account admin)"}),t.jsx("p",{children:`To use ${n} on with your website or app, your server program
92          needs to communicate with the ${n} server to to allow a video to
93          playback or upload video or get list of videos matching a search. The
94          server can be a CMS platform such as Wordpress or Moodle; or a custom
95          website such as PHP, Nodejs, C# or Ruby.`}),t.jsx("h3",{children:"Keeping the keys safe"}),t.jsx("p",{children:`Your account password can be used to login to your ${n} account
96          and do everything such as upload, search, play or delete the videos.
97          So, you keep your password secret from others. Consider the API keys
98          also as passwords to your account and sharing these with caution with
99          your team members.`}),t.jsxs("p",{children:["Your website and mobile app has a front-end and a back-end component. The front-end runs on your user-device.",t.jsx("em",{children:"Never use your API key in the mobile app or website javascript code."}),"It is as unsafe as putting your password on twitter."]}),t.jsx("h3",{children:"What are permissions?"}),t.jsxs("p",{children:["You can limit what information can be obtained from API using a given key by specifying the permissions. All keys have the"," ",t.jsx("strong",{children:"viewer"})," permission. This means it can read everything on the dashboard. It can not obtain other API keys and cannot play any video."]}),t.jsxs("ul",{style:{listStyleType:"none"},children:[!e&&t.jsxs("li",{children:[t.jsx("strong",{children:"✔ otpCreator"})," is specially made to be used on your server where you will generate temporary tokens so that your logged-in users can watch their videos."]}),t.jsxs("li",{children:[t.jsx("strong",{children:"✔ uploader"})," ",`permission allows uploading
100            videos to your ${n} account`,"."]}),t.jsxs("li",{children:[t.jsx("strong",{children:"✔ editor"})," is the highest permission and allows all video management and configuration changes other than adding or removing team members."]})]}),t.jsx("h3",{children:"How to rotate API Keys?"}),t.jsxs("p",{children:["In case your API keys are compromised or you like to change passwords/security ke
100ys as your own policy, you should rotate the API keys. Follow the best practices for rotation of security keys. Below steps are just a recommendation, use your own judgement and",t.jsx("em",{children:"consult your system-admins and developers before making any change."})]}),t.jsxs("ol",{style:{listStyleType:"none"},children:[t.jsx("li",{children:"✔ If a key is not in use, delete them. After deleting, wait for some time to check that your application is working fine without the key. You should delete unused keys anyway, even if you are not rotating."}),t.jsx("li",{children:"✔ Ensure that the keys have only the minimum required permission."}),t.jsx("li",{children:"✔ Create a new key with the same permission as the live key."}),t.jsx("li",{children:"✔ Change the key on your server application. Restart the server process, if needed, according to your system operations policy."}),t.jsx("li",{children:"✔ Ensure that that new key is working correctly. You can wait as long as needed to verify that the key is correctly setup and working fine."}),t.jsx("li",{children:"✔ Delete the older keys and ensure that the website/app is working correctly afterwards."})]})]})})},nc=()=>P({url:"/user/apikeys",method:"GET"}),rc=()=>P({url:"/user/apikeys",method:"POST"}),ac=e=>P({url:`/user/apikeys/${e}`,method:"DELETE"}),oc=(e,n)=>P({url:`/user/apiKeys/${e}`,method:"PUT",data:n}),sc=()=>{const e=()=>({type:Io}),n=o=>({type:Ao,apikeysList:o}),r=()=>({type:Ro});return o=>(o(e()),nc().then(a=>{o(n(a.data))}).catch(a=>{const{message:i}=a.data;o({type:"ERROR_MESSAGE",message:i}),o(r())}))},ic=()=>{const e=()=>({type:Eo}),n=o=>({type:So,apikey:o}),r=()=>({type:_o});return o=>(o(e()),rc().then(a=>{o(n(a.data))}).catch(a=>{const{message:i}=a.data;o({type:"ERROR_MESSAGE",message:i}),o(r())}))},lc=(e,n)=>{const r=()=>({type:yo}),o=(i,c)=>({type:xo,keyid:i,role:c}),a=()=>({type:bo});return i=>(i(r()),oc(e,{rolecsv:n}).then(()=>{i(o(e,n))}).catch(c=>{const{message:l}=c.data;i({type:"ERROR_MESSAGE",message:l}),i(a())}))},cc=e=>{const n=()=>({type:jo}),r=a=>({type:Co,id:a}),o=()=>({type:wo});return a=>(a(n()),ac(e).then(()=>{a(r(e))}).catch(i=>{const{message:c}=i.data;a({type:"ERROR_MESSAGE",message:c}),a(o())}))};class dc extends C.Component{constructor(n){super(n),this.secret=C.createRef(),this.state={generateAPIkeyDialogOpen:!1,allroles:["editor","uploader","viewer","otpCreator"]},this.handleGenerateAPIKeyDialogOpen=this.handleGenerateAPIKeyDialogOpen.bind(this)}componentDidMount(){const{userSettings:n=[]}=gt();n.findIndex(o=>o.name==="showVod"&&o.value==="yes")<0&&this.setState({allroles:["editor","uploader","viewer","otpCreator"]}),this.props.fetchAPIKeys()}handleGenerateAPIKeyDialogClose(){this.setState({generateAPIkeyDialogOpen:!1})}async handleGenerateAPIKeyDialogOpen(){await this.props.generateAPIKey();const{apikeys:n}=this.props,{apikeyGenerationError:r}=n;r===!1&&this.setState({generateAPIkeyDialogOpen:!0})}handleCopyButton(){if(navigator.clipboard){const{apikeys:n}=this.props,{apikeydetails:r}=n;navigator.clipboard.writeText(r.apiKey)}else{const n=window.getSelection();n.removeAllRanges();const r=document.createRange();r.selectNodeContents(this.secret.current),n.addRange(r),this.props.showSuccessMessage("Enter Ctrl + C to copy")}}getTableData(n){return n.map(r=>(r.createdAt=r.createdAt%1e3===0?r.createdAt:r.createdAt*1e3,r))}render(){const{updateAPIKey:n,deleteAPIKey:r,apikeys:o}=this.props,{apikeysList:a,apikeydetails:i,deletingAPIKey:c}=o,{generateAPIkeyDialogOpen:l,allroles:u}=this.state,f=de()?u.filter(y=>y!=="otpCreator"):u;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"tab-content",children:[t.jsx(Ge,{columns:se.SECURITY_CONFIG.API_KEYS_TABLE_COLUMNS,tableData:this.getTableData(a),handleDelete:r,isDeleting:c,tableType:"API Key",allPermissions:f,handleCreate:this.handleGenerateAPIKeyDialogOpen,updatePermissions:n,identityKey:"keyId",deletingText:"apikey? The action is irreversible."}),t.jsxs(Ce,{maxWidth:"lg","aria-labelledby":"generateapikey-dialog-title",open:l,onClose:()=>this.handleGenerateAPIKeyDialogClose(),children:[t.jsx(we,{children:"New Key"}),t.jsx(Ee,{children:t.jsxs(He,{children:["Copy API Secret for making API request. This is the last time we will show you the key secret.",t.jsx("br",{}),t.jsx("br",{}),"API Secret:    ",i&&t.jsx("span",{ref:this.secret,children:i.apiKey})," ",t.jsx(Po,{title:"Copy Secret Key",children:t.jsx(yt,{onClick:()=>this.handleCopyButton(),children:t.jsx(Tr,{})})})]})})]}),a.length===0&&t.jsx("div",{className:"no-data",children:t.jsx(U,{color:"textSecondary",align:"center",children:"No apikeys for this project yet"})})]}),t.jsx(tc,{})]})}}const uc=e=>e,hc=e=>X({fetchAPIKeys:sc,generateAPIKey:ic,deleteAPIKey:cc,updateAPIKey:lc,showSuccessMessage:qn},e),pc=Y(uc,hc)(dc),fc=D("div")(()=>({marginBottom:"5vh",marginTop:"5vh",lineHeight:2,maxWidth:300})),gc=()=>{const{isZenstream:e=!1,placeHolderTextLowercase:n=""}=C.useContext($e);return t.jsx(be,{className:"tab-content full-round",margin:"4vh 0",children:t.jsxs(jt,{children:[t.jsx("h3",{children:"Adding your team-members to your account"}),t.jsx("vdocipher-player",{style:{width:300,maxWidth:"100vw",float:"right"},popovermode:!0,otp:"20160313versUSE313etkTCt1ATyFCKu56ogRhNTivZt6IeCZZqwFjO82bvJUMZZ",playbackinfo:"eyJ2aWRlb0lkIjoiN2I2ZjgyMzYzYTRmNDIyNTk4MWNhNGJmOTk2MWQyNzcifQ=="}),t.jsxs(fc,{children:[t.jsx("p",{children:t.jsx("strong",{children:"(Only editable by account admin)"})}),t.jsx("p",{children:`You can add one-or more users to your ${n} account and give
101            them specific access control with different permissions.`}),t.jsx("h3",{children:"Meaning of permissions levels"}),t.jsxs("p",{children:["You can limit what access is available to a user by specifying the permissions. All users have the ",t.jsx("strong",{children:"viewer"})," permission. This means they can read everything on the dashboard. They can not obtain your API keys and cannot play any video."]})]}),t.jsxs("ul",{style:{listStyleType:"none",padding:0},children:[!e&&t.jsxs("li",{children:["✔ ",t.jsx("strong",{children:"otpCreator "}),"permissions is required to allow playing video. Without this permission, even ",t.jsx("code",{children:"editor"})," role can not watch any video."]}),t.jsxs("li",{children:["✔ ",t.jsx("strong",{children:"uploader "}),`permission allows uploading videos to your ${n} account.`]}),t.jsxs("li",{children:["✔ ",t.jsx("strong",{children:"editor "}),"is the highest permission and allows all video management and configuration changes other than adding or removing team members. It does not give video watch permission without otpCreator."]})]})]})})},mc=()=>P({url:"/user/manageduser",method:"GET"}),vc=e=>P({url:"/user/manageduser",method:"POST",data:e}),yc=(e,n)=>P({url:`/user/manageduser/${e}`,method:"PUT",data:n}),xc=e=>P({url:`/user/manageduser/${e}`,method:"DELETE"}),bc=e=>P({url:"/user/initiateadminchange",method:"POST",data:e}),jc=()=>{const e=()=>({type:Go}),n=o=>({type:Vo,list:o}),r=()=>({type:zo});return o=>
101(o(e()),mc().then(a=>{o(n(a.data))}).catch(a=>{const{message:i}=a.data;o({type:"ERROR_MESSAGE",message:i}),o(r())}))},Cc=e=>{const n=()=>({type:$o}),r=a=>({type:Uo,user:a}),o=()=>({type:Bo});return a=>(a(n()),vc(e).then(i=>{a(r(i.data))}).catch(i=>{const{message:c}=i.data;a({type:"ERROR_MESSAGE",message:c}),a(o())}))},wc=(e,n)=>{const r=()=>({type:Lo}),o=(i,c)=>({type:Fo,user:c,id:i}),a=()=>({type:Ho});return i=>(i(r()),yc(e,{rolecsv:n}).then(()=>{i(o(e,n))}).catch(c=>{const{message:l}=c.data;i({type:"ERROR_MESSAGE",message:l}),i(a())}))},Ec=e=>{const n=()=>({type:Do}),r=a=>({type:Mo,id:a}),o=()=>({type:No});return a=>(a(n()),xc(e).then(()=>{a(r(e))}).catch(i=>{const{message:c}=i.data;a({type:"ERROR_MESSAGE",message:c}),a(o())}))},Sc=e=>{const n=()=>({type:To}),r=()=>({type:ko}),o=()=>({type:Oo});return a=>(a(n()),bc({user:e}).then(i=>{a(r());const{message:c}=i.data;a({type:"SUCCESS_MESSAGE",message:c})}).catch(i=>{const{message:c}=i.data;a(o()),a({type:"ERROR_MESSAGE",message:c})}))},_c=D(Wo)(()=>({backgroundColor:"#fff",border:"1px solid #D3D3D3",marginRight:7,maxWidth:"80px"}));class Ic extends C.Component{constructor(n){super(n),this.state={searchValue:"",matchingList:[],addUserDialogOpen:!1,name:"",username:"",adminAccount:!1,disableAdd:!0,newUserRole:["viewer"],allroles:["editor","uploader","viewer","otpCreator","liveModerator"]},this.handleNameChange=this.handleNameChange.bind(this),this.handleUserNameChange=this.handleUserNameChange.bind(this)}componentDidMount(){this.props.fetchManagedUsers()}componentDidUpdate(n){const r=n.addingUser,{addingUser:o,users:{usersList:a}}=this.props;r===!0&&o===!1&&this.handleAddUserDialogClose();const i=n.users.usersList,{username:c}=gt();i!==a&&a.forEach(l=>{l.username===c&&l.isAdmin===!0&&this.setState({adminAccount:!0})})}async handleSearchChange(n){await this.setState({searchValue:n});const{users:r}=this.props,o=r.usersList.filter(a=>a.username.includes(n)||a.name.includes(n));this.setState({matchingList:o})}handleNameChange(n){this.setState({name:n})}handleUserNameChange(n){this.setState({username:n})}handleNewUserRoleChange(n){this.setState({newUserRole:n})}handleAddUserDialogClose(){this.setState({addUserDialogOpen:!1,name:"",username:"",newUserRole:["viewer"]})}handleAddUserInvalidity(){this.setState({disableAdd:!0})}handleAddUserValidity(){this.setState({disableAdd:!1})}getTableData(n){return n.map(r=>(r.createdAt=r.createdAt%1e3===0?r.createdAt:r.createdAt*1e3,r))}render(){const{createManagedUser:n,users:r,deleteManagedUser:o,updateManagedUser:a,initiateAdminChange:i,users:{loadingUsers:c}}=this.props,{usersList:l,addingUser:u,deletingUser:h,initiatingAdminChange:f}=r,{addUserDialogOpen:y,name:b,username:v,allroles:s,newUserRole:d,disableAdd:p}=this.state,x=de()?s.filter(m=>m!=="otpCreator"):s;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"tab-content",children:[t.jsx(Ge,{columns:se.SECURITY_CONFIG.USERS_TABLE_COLUMNS,tableData:this.getTableData(l),handleDelete:o,isDeleting:h,tableType:"User",allPermissions:x,updatePermissions:a,handleCreate:()=>this.setState({addUserDialogOpen:!0}),identityKey:"id",initiateAdminChange:i,initiatingAdminChange:f,deletingText:"user? The action is irreversible."}),t.jsxs(Ce,{open:y,"aria-labelledby":"adduser-dialog-title",children:[t.jsx(we,{children:"Add User"}),t.jsxs(Ee,{children:[t.jsx(He,{children:"Enter Name, Email and Role of the user to be added"}),t.jsxs(Jn,{onInvalid:()=>this.handleAddUserInvalidity(),onValid:()=>this.handleAddUserValidity(),children:[t.jsx(it,{name:"name",required:!0,value:b,autoF
101ocus:!0,setValue:this.handleNameChange,floatingText:"Name"}),t.jsx(it,{type:"email",name:"email",required:!0,value:v,floatingText:"Email",setValue:this.handleUserNameChange,validations:"isEmail",validationError:"Enter a valid email"}),t.jsxs(_e,{fullWidth:!0,sx:{marginTop:3},children:[t.jsx(Ue,{id:"user-role-selection-label",children:"Role"}),t.jsx(Be,{labelId:"user-role-selection-label",multiple:!0,name:"Role",value:d,onChange:m=>this.handleNewUserRoleChange(m.target.value),input:t.jsx(bt,{label:"Role"}),renderValue:m=>t.jsx("div",{className:"roles-div",children:m.filter(j=>j!=="viewer").concat("viewer").map(j=>j&&t.jsx(_c,{size:"small",label:j.charAt(0).toUpperCase()+j.slice(1)},j))}),children:s.filter(m=>de()?m!="otpCreator":!0).map((m,j)=>t.jsxs(z,{value:m,disabled:m==="viewer",children:[t.jsx(xt,{checked:d.indexOf(m)>-1||m==="viewer"}),t.jsx(Yn,{primary:m.charAt(0).toUpperCase()+m.slice(1)})]},j))})]})]})]}),t.jsxs(mt,{children:[t.jsx(W,{onClick:()=>this.handleAddUserDialogClose(),color:"primary",children:"Cancel"}),t.jsx(W,{onClick:async()=>{await n({name:b,username:v,newUserRole:d.join()}),this.handleAddUserDialogClose()},variant:"contained",color:"primary",disabled:u||p,children:"Add User"})]})]}),l.length===0&&!c&&t.jsx("div",{className:"no-data",children:t.jsx(U,{color:"textSecondary",align:"center",children:"No users for this project yet"})}),c&&t.jsx(tr,{loadingMessage:"Fetching users"})]}),t.jsx(gc,{})]})}}const Ac=e=>e,Rc=e=>X({fetchManagedUsers:jc,createManagedUser:Cc,updateManagedUser:wc,deleteManagedUser:Ec,initiateAdminChange:Sc},e),Pc=Y(Ac,Rc)(Ic);var kr={},Wt={},Kt={},Z={},qt={},Yt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Doctype=e.CDATA=e.Tag=e.Style=e.Script=e.Comment=e.Directive=e.Text=e.Root=e.isTag=e.ElementType=void 0;var n;(function(o){o.Root="root",o.Text="text",o.Directive="directive",o.Comment="comment",o.Script="script",o.Style="style",o.Tag="tag",o.CDATA="cdata",o.Doctype="doctype"})(n=e.ElementType||(e.ElementType={}));function r(o){return o.type===n.Tag||o.type===n.Script||o.type===n.Style}e.isTag=r,e.Root=n.Root,e.Text=n.Text,e.Directive=n.Directive,e.Comment=n.Comment,e.Script=n.Script,e.Style=n.Style,e.Tag=n.Tag,e.CDATA=n.CDATA,e.Doctype=n.Doctype})(Yt);var E={},J=R&&R.__extends||function(){var e=function(n,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(o[i]=a[i])},e(n,r)};return function(n,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(n,r);function o(){this.constructor=n}n.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),ye=R&&R.__assign||function(){return ye=Object.assign||function(e){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ye.apply(this,arguments)};Object.defineProperty(E,"__esModule",{value:!0});E.cloneNode=E.hasChildren=E.isDocument=E.isDirective=E.isComment=E.isText=E.isCDATA=E.isTag=E.Element=E.Document=E.CDATA=E.NodeWithChildren=E.ProcessingInstruction=E.Comment=E.Text=E.DataNode=E.Node=void 0;var H=Yt,Xt=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(n){this.parent=n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(n){this.prev=n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(n){this.next=n},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(n){return n===void 0&&(n=!1),Zt(this,n)},e}();E.Node=Xt;var Ve=function(e){J(n,e);function n(r){var o=e.call(this)||this;return o.data=r,o}return Object.defineProperty(n.prototype,"nodeValue",{get:function(){return this.data},set:function(r){this.data=r}
vendor: 4,292 bytes, line 101
101,enumerable:!1,configurable:!0}),n}(Xt);E.DataNode=Ve;var Or=function(e){J(n,e);function n(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=H.ElementType.Text,r}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),n}(Ve);E.Text=Or;var Dr=function(e){J(n,e);function n(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=H.ElementType.Comment,r}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),n}(Ve);E.Comment=Dr;var Mr=function(e){J(n,e);function n(r,o){var a=e.call(this,o)||this;return a.name=r,a.type=H.ElementType.Directive,a}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),n}(Ve);E.ProcessingInstruction=Mr;var ze=function(e){J(n,e);function n(r){var o=e.call(this)||this;return o.children=r,o}return Object.defineProperty(n.prototype,"firstChild",{get:function(){var r;return(r=this.children[0])!==null&&r!==void 0?r:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"childNodes",{get:function(){return this.children},set:function(r){this.children=r},enumerable:!1,configurable:!0}),n}(Xt);E.NodeWithChildren=ze;var Nr=function(e){J(n,e);function n(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=H.ElementType.CDATA,r}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),n}(ze);E.CDATA=Nr;var Lr=function(e){J(n,e);function n(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=H.ElementType.Root,r}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),n}(ze);E.Document=Lr;var Fr=function(e){J(n,e);function n(r,o,a,i){a===void 0&&(a=[]),i===void 0&&(i=r==="script"?H.ElementType.Script:r==="style"?H.ElementType.Style:H.ElementType.Tag);var c=e.call(this,a)||this;return c.name=r,c.attribs=o,c.type=i,c}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"tagName",{get:function(){return this.name},set:function(r){this.name=r},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"attributes",{get:function(){var r=this;return Object.keys(this.attribs).map(function(o){var a,i;return{name:o,value:r.attribs[o],namespace:(a=r["x-attribsNamespace"])===null||a===void 0?void 0:a[o],prefix:(i=r["x-attribsPrefix"])===null||i===void 0?void 0:i[o]}})},enumerable:!1,configurable:!0}),n}(ze);E.Element=Fr;function Hr(e){return(0,H.isTag)(e)}E.isTag=Hr;function $r(e){return e.type===H.ElementType.CDATA}E.isCDATA=$r;function Ur(e){return e.type===H.ElementType.Text}E.isText=Ur;function Br(e){return e.type===H.ElementType.Comment}E.isComment=Br;function Gr(e){return e.type===H.ElementType.Directive}E.isDirective=Gr;function Vr(e){return e.type===H.ElementType.Root}E.isDocument=Vr;function Tc(e){return Object.prototype.hasOwnProperty.call(e,"children")}E.hasChildren=Tc;function Zt(e,n){n===void 0&&(n=!1);var r;if(Ur(e))r=new Or(e.data);else if(Br(e))r=new Dr(e.data);else if(Hr(e)){var o=n?rt(e.children):[],a=new Fr(e.name,ye({},e.attribs),o);o.forEach(function(u){return u.parent=a}),e.namespace!=null&&(a.namespace=e.namespace),e["x-attribsNamespace"]&&(a["x-attribsNamespace"]=ye({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(a["x-attribsPrefix"]=ye({},e["x-attribsPrefix"])),r=a}else if($r(e)){var o=n?rt(e.children):[],i=new Nr(o);o.forEach(function(h){return h.parent=i}),r=i}else if(Vr(e)){var o=n?rt(e.children):[],c=new Lr(o);o.forEach(function(h){return h.parent=c}),e["x-mode"]&&(c["x-mode"]=e["x-mode"]),r=c}else if(Gr(e)){var l=new Mr(e.name,e.data);e["x-name"]!=null&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),r=l}else throw new Error("Not implemented yet: ".concat(e.type));return r.startIndex=e.startIndex,r.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(r.sourceCodeLocation=e.sourceCodeLocation),r}E.cloneNode=Zt;function rt(e){for(var n=e.map(function(o){return Zt(o,!0)}
101),r=1;r<n.length;r++)n[r].prev=n[r-1],n[r-1].next=n[r];return n}(function(e){var n=R&&R.__createBinding||(Object.create?function(l,u,h,f){f===void 0&&(f=h);var y=Object.getOwnPropertyDescriptor(u,h);(!y||("get"in y?!u.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return u[h]}}),Object.defineProperty(l,f,y)}:function(l,u,h,f){f===void 0&&(f=h),l[f]=u[h]}),r=R&&R.__exportStar||function(l,u){for(var h in l)h!=="default"&&!Object.prototype.hasOwnProperty.call(u,h)&&n(u,l,h)};Object.defineProperty(e,"__esModule",{value:!0}),e.DomHandler=void 0;var o=Yt,a=E;r(E,e);var i={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},c=function(){function l(u,h,f){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof h=="function"&&(f=h,h=i),typeof u=="object"&&(h=u,u=void 0),this.callback=u??null,this.options=h??i,this.elementCB=f??null}return l.prototype.onparserinit=function(u){this.parser=u},l.prototype.onreset=function(){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},l.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},l.prototype.onerror=function(u){this.handleCallback(u)},l.prototype.onclosetag=function(){this.lastNode=null;var u=this.tagStack.pop();this.options.withEndIndices&&(u.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(u)},l.prototype.onopentag=function(u,h){var f=this.options.xmlMode?o.ElementType.Tag:void 0,y=new a.Element(u,h,void 0,f);this.addNode(y),this.tagStack.push(y)},l.prototype.ontext=function(u){var h=this.lastNode;if(h&&h.type===o.ElementType.Text)h.data+=u,this.options.withEndIndices&&(h.endIndex=this.parser.endIndex);else{var f=new a.Text(u);this.addNode(f),this.lastNode=f}},l.prototype.oncomment=function(u){if(this.lastNode&&this.lastNode.type===o.ElementType.Comment){this.lastNode.data+=u;return}var h=new a.Comment(u);this.addNode(h),this.lastNode=h},l.prototype.oncommentend=function(){this.lastNode=null},l.prototype.oncdatastart=function(){var u=new a.Text(""),h=new a.CDATA([u]);this.addNode(h),u.parent=h,this.lastNode=u},l.prototype.oncdataend=function(){this.lastNode=null},l.prototype.onprocessinginstruction=function(u,h){var f=new a.ProcessingInstruction(u,h);this.addNode(f)},l.prototype.handleCallback=function(u){if(typeof this.callback=="function")this.callback(u,this.dom);else if(u)throw u},l.prototype.addNode=function(u){var h=this.tagStack[this.tagStack.length-1],f=h.children[h.children.length-1];this.options.withStartIndices&&(u.startIndex=this.parser.startIndex),this.options.withEndIndices&&(u.endIndex=this.parser.endIndex),h.children.push(u),f&&(u.prev=f,f.next=u),u.parent=h,this.lastNode=null},l}();e.DomHandler=c,e.default=c})(qt);var zr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CARRIAGE_RETURN_PLACEHOLDER_REGEX=e.CARRIAGE_RETURN_PLACEHOLDER=e.CARRIAGE_RETURN_REGEX=e.CARRIAGE_RETURN=e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES=void 0,e.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES.reduce(function(n,r){return n[r.toLowerCase()]=r,n},{}),e.CARRIAGE_RETURN="\r",e.CARRIAGE_RETURN_REGEX=new RegExp(e.CARRIAGE_RETURN,"g"),e.CARRIAGE_RETURN_PLACEHOLDER="__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now().toString(),"__"),e.CARRIAGE_RETURN_PLACEHOLDER_REGEX=new RegExp(e.CARRIAGE_RETURN_PLACEHOLDER,"g")})(zr);Object.defineProperty(Z,"__esModule",{value:!0});Z.formatAttributes=Wr;Z.hasOpenTag=Dc;Z.escapeSpecialCharacters=Mc;Z.revertEscapedCharacters=Kr;Z.formatDOM=qr;var Pe=qt,je=zr;function kc(e){return je.CASE_SENSITIVE_TAG_NAMES_MAP[e]}function Wr(e){for(var n={},r=0,o=e.length;r<o;r++){var a=e[r];n[a.name]=a.value}return n}function Oc(e){e=e.toLowerCase();var n=kc(e);return n||e}function Dc(e,n){var r="<"+n,o=e.toLowerCase().indexOf(r);if(o===-1)return!1;var a=e[o+r.length];return a===">"||a===" "||a==="	"||a===`
102`||a==="\r"||a==="/"}function Mc(e){return e.replace(je.CARRIAGE_RETURN_REGEX,je.CARRIAGE_RETURN_PLACEHOLDER)}function Kr(e){return e.replace(je.CARRIAGE_RETURN_PLACEHOLDER_REGEX,je.CARRIAGE_RETURN)}function qr(e,n,r){var o,a,i,c;n===void 0&&(n=null);for(var l=[],u,h=0,f=e.length;h<f;h++){var y=e[h];switch(y.nodeType){case 1:{var b=Oc(y.nodeName);u=new Pe.Element(b,Wr(y.attributes)),u.children=qr(b==="template"?y.content.childNodes:y.childNodes,u);break}case 3:u=new Pe.Text(Kr((o=y.nodeValue)!==null&&o!==void 0?o:""));break;case 8:u=new Pe.Comment((a=y.nodeValue)!==null&&a!==void 0?a:"");break;default:continue}var v=(i=l[h-1])!==null&&i!==void 0?i:null;v&&(v.next=u),u.parent=n,u.prev=v,u.next=null,l.push(u)}return r&&(u=new Pe.ProcessingInstruction(r.substring(0,r.indexOf(" ")).toLowerCase(),r),u.next=(c=l[0])!==null&&c!==void 0?c:null,u.parent=n,l.unshift(u),l[1]&&(l[1].prev=l[0])),l}
102Object.defineProperty(Kt,"__esModule",{value:!0});Kt.default=Hc;var pe=Z,Pn="html",Te="head",le="body",Nc=/<([a-zA-Z]+[0-9]?)/,Ne=function(e,n){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},ut=function(e,n){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},Tn=typeof window=="object"&&window.DOMParser;if(typeof Tn=="function"){var Lc=new Tn,Fc="text/html";ut=function(e,n){return n&&(e="<".concat(n,">").concat(e,"</").concat(n,">")),Lc.parseFromString(e,Fc)},Ne=ut}if(typeof document=="object"&&document.implementation){var ke=document.implementation.createHTMLDocument();Ne=function(e,n){if(n){var r=ke.documentElement.querySelector(n);return r&&(r.innerHTML=e),ke}return ke.documentElement.innerHTML=e,ke}}var Oe=typeof document=="object"&&document.createElement("template"),ht;Oe&&Oe.content&&(ht=function(e){return Oe.innerHTML=e,Oe.content.childNodes});var kn=function(){return document.createDocumentFragment().childNodes};function Hc(e){var n,r,o,a,i,c;e=(0,pe.escapeSpecialCharacters)(e);var l=Nc.exec(e),u=(n=l==null?void 0:l[1])===null||n===void 0?void 0:n.toLowerCase();switch(u){case Pn:{var h=ut(e);if(!(0,pe.hasOpenTag)(e,Te)){var f=h.querySelector(Te);(r=f==null?void 0:f.parentNode)===null||r===void 0||r.removeChild(f)}if(!(0,pe.hasOpenTag)(e,le)){var f=h.querySelector(le);(o=f==null?void 0:f.parentNode)===null||o===void 0||o.removeChild(f)}return h.querySelectorAll(Pn)}case Te:case le:{var y=Ne(e).querySelectorAll(u);return(0,pe.hasOpenTag)(e,le)&&(0,pe.hasOpenTag)(e,Te)?(i=(a=y[0].parentNode)===null||a===void 0?void 0:a.childNodes)!==null&&i!==void 0?i:kn():y}default:{if(ht)return ht(e);var f=Ne(e,le).querySelector(le);return(c=f==null?void 0:f.childNodes)!==null&&c!==void 0?c:kn()}}}var $c=R&&R.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Wt,"__esModule",{value:!0});Wt.default=Vc;var Uc=$c(Kt),Bc=Z,Gc=/<(![a-zA-Z\s]+)>/;function Vc(e){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];var n=Gc.exec(e),r=n?n[1]:void 0;return(0,Bc.formatDOM)((0,Uc.default)(e),null,r)}var We={},G={},Ke={},zc=0;Ke.SAME=zc;var Wc=1;Ke.CAMELCASE=Wc;Ke.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRen
102dering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xl
102inkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1};const Yr=0,Q=1,qe=2,Ye=3,Jt=4,Xr=5,Zr=6;function Kc(e){return M.hasOwnProperty(e)?M[e]:null}function F(e,n,r,o,a,i,c){this.acceptsBooleans=n===qe||n===Ye||n===Jt,this.attributeName=o,this.attributeNamespace=a,this.mustUseProperty=r,this.propertyName=e,this.type=n,this.sanitizeURL=i,this.removeEmptyString=c}const M={},qc=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];qc.forEach(e=>{M[e]=new F(e,Yr,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([e,n])=>{M[e]=new F(e,Q,!1,n,null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(e=>{M[e]=new F(e,qe,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(e=>{M[e]=new F(e,qe,!1,e,null,!1,!1)});["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(e=>{M[e]=new F(e,Ye,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(e=>{M[e]=new F(e,Ye,!0,e,null,!1,!1)});["capture","download"].forEach(e=>{M[e]=new F(e,Jt,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(e=>{M[e]=new F(e,Zr,!1,e,null,!1,!1)});["rowSpan","start"].forEach(e=>{M[e]=new F(e,Xr,!1,e.toLowerCase(),null,!1,!1)});const Qt=/[\-\:]([a-z])/g,en=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(e=>{const n=e.replace(Qt,en);M[n]=new F(n,Q,!1,e,null,!1,!1)});["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(e=>{const n=e.replace(Qt,en);M[n]=new F(n,Q,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(e=>{const n=e.replace(Qt,en);M[n]=new F(n,Q,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(e=>{M[e]=new F(e,Q,!1,e.toLowerCase(),null,!1,!1)});const Yc="xlinkHref";M[Yc]=new F("xlinkHref",Q,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(e=>{M[e]=new F(e,Q,!1,e.toLowerCase(),null,!0,!0)});const{CAMELCASE:Xc,SAME:Zc,possibleStandardNames:On}=Ke,Jc=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",Qc=Jc+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ed=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+Qc+"]*$")),td=Object.keys(On).reduce((e,n)=>{const r=On[n];return r===Zc?e[n]=n:r===Xc?e[n.toLowerCase()]=n:e[n]=r,e},{});G.BOOLEAN=Ye;G.BOOLEANISH_STRING=qe;G.NUMERIC=Xr;G.OVERLOADED_BOOLEAN=Jt;G.POSITIVE_NUMERIC=Zr;G.RESERVED=Yr;G.STRING=Q;G.getPropertyInfo=Kc;G.isCustomAttribute=ed;G.possibleStandardNames=td;var tn={},nn={}
102,Dn=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,nd=/\n/g,rd=/^\s*/,ad=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,od=/^:\s*/,sd=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,id=/^[;\s]*/,ld=/^\s+|\s+$/g,cd=`
103`,Mn="/",Nn="*",oe="",dd="comment",ud="declaration";function hd(e,n){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];n=n||{};var r=1,o=1;function a(s){var d=s.match(nd);d&&(r+=d.length);var p=s.lastIndexOf(cd);o=~p?s.length-p:o+s.length}function i(){var s={line:r,column:o};return function(d){return d.position=new c(s),h(),d}}function c(s){this.start=s,this.end={line:r,column:o},this.source=n.source}c.prototype.content=e;function l(s){var d=new Error(n.source+":"+r+":"+o+": "+s);if(d.reason=s,d.filename=n.source,d.line=r,d.column=o,d.source=e,!n.silent)throw d}function u(s){var d=s.exec(e);if(d){var p=d[0];return a(p),e=e.slice(p.length),d}}function h(){u(rd)}function f(s){var d;for(s=s||[];d=y();)d!==!1&&s.push(d);return s}function y(){var s=i();if(!(Mn!=e.charAt(0)||Nn!=e.charAt(1))){for(var d=2;oe!=e.charAt(d)&&(Nn!=e.charAt(d)||Mn!=e.charAt(d+1));)++d;if(d+=2,oe===e.charAt(d-1))return l("End of comment missing");var p=e.slice(2,d-2);return o+=2,a(p),e=e.slice(d),o+=2,s({type:dd,comment:p})}}function b(){var s=i(),d=u(ad);if(d){if(y(),!u(od))return l("property missing ':'");var p=u(sd),g=s({type:ud,property:Ln(d[0].replace(Dn,oe)),value:p?Ln(p[0].replace(Dn,oe)):oe});return u(id),g}}function v(){var s=[];f(s);for(var d;d=b();)d!==!1&&(s.push(d),f(s));return s}return h(),v()}function Ln(e){return e?e.replace(ld,oe):oe}var pd=hd,fd=R&&R.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(nn,"__esModule",{value:!0});nn.default=md;const gd=fd(pd);function md(e,n){let r=null;if(!e||typeof e!="string")return r;const o=(0,gd.default)(e),a=typeof n=="function";return o.forEach(i=>{if(i.type!=="declaration")return;const{property:c,value:l}=i;a?n(c,l,i):l&&(r=r||{},r[c]=l)}),r}var Xe={};Object.defineProperty(Xe,"__esModule",{value:!0});Xe.camelCase=void 0;var vd=/^--[a-zA-Z0-9_-]+$/,yd=/-([a-z])/g,xd=/^[^-]+$/,bd=/^-(webkit|moz|ms|o|khtml)-/,jd=/^-(ms)-/,Cd=function(e){return!e||xd.test(e)||vd.test(e)},wd=function(e,n){return n.toUpperCase()},Fn=function(e,n){return"".concat(n,"-")},Ed=function(e,n){return n===void 0&&(n={}),Cd(e)?e:(e=e.toLowerCase(),n.reactCompat?e=e.replace(jd,Fn):e=e.replace(bd,Fn),e.replace(yd,wd))};Xe.camelCase=Ed;var Sd=R&&R.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},_d=Sd(nn),Id=Xe;function pt(e,n){var r={};return!e||typeof e!="string"||(0,_d.default)(e,function(o,a){o&&a&&(r[(0,Id.camelCase)(o,n)]=a)}),r}pt.default=pt;var Ad=pt;(function(e){var n=R&&R.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(e,"__esModule",{value:!0}),e.returnFirstArg=e.canTextBeChildOfNode=e.ELEMENTS_WITH_NO_TEXT_CHILDREN=e.PRESERVE_CUSTOM_ATTRIBUTES=void 0,e.isCustomComponent=i,e.setStyleProp=l;var r=C,o=n(Ad),a=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function i(f,y){return f.includes("-")?!a.has(f):!!(y&&typeof y.is=="string")}var c={reactCompat:!0};function l(f,y){if(typeof f=="string"){if(!f.trim()){y.style={};return}try{y.style=(0,o.default)(f,c)}catch{y.style={}}}}e.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,e.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var u=function(f){return!e.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(f.name)};e.canTextBeChildOfNode=u;var h=function(f){return f};e.returnFirstArg=h})(tn);Object.defineProperty(We,"__esModule",{value:!0});We.default=kd;var ge=G,Hn=tn,Rd=["checked","value"],Pd=["input","select","textarea"],Td={reset:!0,submit:!0};function kd(e,n){e===void 0&&(e={});var r={},o=!!(e.type&&Td[e.type]);for(var a in e){var i=e[a];if((0,ge.isCustomAttribute)(a)){r[a]=i;continue}var c=a.toLowerCase(),l=$n(c);if(l){var u=(0,ge.getPropertyInfo)(l);switch(Rd.includes(l)&&Pd.includes(n)&&!o&&(l=$n("default"+c)),r[l]=i,u==null?void 0:u.type){case ge.BOOLEAN:r[l]=!0;break;case ge.OVERLOADED_BOOLEAN:i===""&&(r[l]=!0);break}continue}Hn.PRESERVE_CUSTOM_ATTRIBUTES&&(r[a]=i)}return(0,Hn.setStyleProp)(e.style,r),r}function $n(e){return ge.possibleStandardNames[e]}var rn={}
103,Od=R&&R.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(rn,"__esModule",{value:!0});rn.default=Jr;var at=C,Dd=Od(We),xe=tn,Md={cloneElement:at.cloneElement,createElement:at.createElement,isValidElement:at.isValidElement};function Jr(e,n){var r,o,a,i,c;n===void 0&&(n={});for(var l=[],u=typeof n.replace=="function",h=(r=n.transform)!==null&&r!==void 0?r:xe.returnFirstArg,f=(o=n.library)!==null&&o!==void 0?o:Md,y=f.cloneElement,b=f.createElement,v=f.isValidElement,s=e.length,d=0;d<s;d++){var p=e[d];if(u){var g=(a=n.replace)===null||a===void 0?void 0:a.call(n,p,d);if(v(g)){s>1&&(g=y(g,{key:(i=g.key)!==null&&i!==void 0?i:d})),l.push(h(g,p,d));continue}}if(p.type==="text"){var x=!p.data.trim().length;if(x&&p.parent&&!(0,xe.canTextBeChildOfNode)(p.parent)||n.trim&&x)continue;l.push(h(p.data,p,d));continue}var m=p,j={};Nd(m)?((0,xe.setStyleProp)(m.attribs.style,m.attribs),j=m.attribs):m.attribs&&(j=(0,Dd.default)(m.attribs,m.name));var L=void 0;switch(p.type){case"script":case"style":p.children[0]&&(j.dangerouslySetInnerHTML={__html:p.children[0].data});break;case"tag":p.name==="textarea"&&p.children[0]?j.defaultValue=p.children[0].data:!((c=p.children)===null||c===void 0)&&c.length&&(L=Jr(p.children,n));break;default:continue}s>1&&(j.key=d),l.push(h(b(p.name,j,L),p,d))}return l.length===1?l[0]:l}function Nd(e){return xe.PRESERVE_CUSTOM_ATTRIBUTES&&e.type==="tag"&&(0,xe.isCustomComponent)(e.name,e.attribs)}(function(e){var n=R&&R.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(e,"__esModule",{value:!0}),e.htmlToDOM=e.domToReact=e.attributesToProps=e.Text=e.ProcessingInstruction=e.Element=e.Comment=void 0,e.default=l;var r=n(Wt);e.htmlToDOM=r.default;var o=n(We);e.attributesToProps=o.default;var a=n(rn);e.domToReact=a.default;var i=qt;Object.defineProperty(e,"Comment",{enumerable:!0,get:function(){return i.Comment}}),Object.defineProperty(e,"Element",{enumerable:!0,get:function(){return i.Element}}),Object.defineProperty(e,"ProcessingInstruction",{enumerable:!0,get:function(){return i.ProcessingInstruction}}),Object.defineProperty(e,"Text",{enumerable:!0,get:function(){return i.Text}});var c={lowerCaseAttributeNames:!1};function l(u,h){var f;if(typeof u!="string")throw new TypeError("First argument must be a string");return u?(0,a.default)((0,r.default)(u,(f=h==null?void 0:h.htmlparser2)!==null&&f!==void 0?f:c),h):[]}})(kr);const Un=Vn(kr),Ld=Un.default||Un,Fd=()=>P({url:"/hooks",method:"GET"}),Hd=e=>{const{url:n,event:r}=e;return P({url:"/hooks",method:"POST",data:{value:n,type:"http",event:r,status:1}})},$d=e=>P({url:`/hooks/${e}`,method:"DELETE"}),Ud=e=>{const{uuid:n}=e;return P({url:"/hooks/test-webhook",method:"POST",data:{hookId:n}})},Bd=e=>P({url:`/hooks/${e}/reactivate`,method:"PUT"}),Gd=()=>{const e=()=>({type:os}),n=o=>({type:ss,webhooksList:o==null?void 0:o.webhooksList,sampleWebhookData:o==null?void 0:o.SAMPLE_WEBHOOK_BODY_MAP}),r=()=>({type:is});return o=>(o(e()),Fd().then(a=>{o(n(a==null?void 0:a.data))}).catch(a=>{const{message:i=""}=a.data||{};o({type:"ERROR_MESSAGE",message:i}),o(r())}))},Vd=e=>{const n=()=>({type:ns}),r=a=>({type:rs,webhook:a}),o=()=>({type:as});return a=>(a(n()),Hd(e).then(i=>{a(r(i.data))}).catch(i=>{const{message:c=""}=i.data||{};a({type:"ERROR_MESSAGE",message:c}),a(o())}))},zd=e=>{const n=()=>({type:Qo}),r=a=>({type:es,id:a}),o=()=>({type:ts});return a=>(a(n()),$d(e).then(()=>{a(r(e))}).catch(i=>{const{message:c}=i.data;a({type:"ERROR_MESSAGE",message:c}),a(o())}))},Wd=e=>{const n=()=>({type:Xo}),r=a=>({type:Zo,response:a}),o=()=>({type:Jo});return a=>(a(n()),Ud(e).then(i=>{a(r(i))}).catch(i=>{const{message:c}=i.data;a({type:"ERROR_MESSAGE",message:c}),a(o())}))},Kd=e=>{const n=()=>({type:Ko}),r=a=>({type:qo,id:a}),o=()=>({type:Yo});return a=>(a(n()),Bd(e).then(()=>{a(r(e))}).catch(i=>{const{message:c}=i.data;a({type:"ERROR_MESSAGE",message:c}),a(o())}))};function qd(){return t.jsx("div",{className:"doc-and-tutorial-wrapper",children:t.jsxs("div",{style:{maxWidth:600,margin:"0"}
103,children:[t.jsx("h3",{children:"HTTP POST properties"}),t.jsxs("p",{children:["The POST will be a json body and the content-type request header will be ",t.jsx("code",{children:"application/json"}),". The JSON object will have the following properties. Note that new keys might be added in future without notice and you should not have a direct dependency to having an absolute structure when parsing this JSON."]})]})})}const Yd=Se("div")(()=>({button:{alignItems:"end"},paddingTop:80,".doc-and-tutorial-wrapper":{padding:"8px",background:"#F9F9F9",display:"flex",alignItems:"center",justifyContent:"start",flexWrap:"wrap-reverse"}}));function Xd({webhookSampleData:e={}}){const[n,r]=C.useState(0),{placeHolderText:o=""}=C.useContext($e),a=(l,u)=>{r(u)},{sampleDataWebhook:i=""}=e||{},c=Object.keys(i);return t.jsxs(Yd,{children:[t.jsx("hr",{}),t.jsx("div",{className:"doc-and-tutorial-wrapper",children:t.jsxs("div",{style:{maxWidth:600,margin:"0"},children:[t.jsx("h2",{children:"Using web-hooks"}),t.jsx("p",{children:"Whenever a video is ready or faces an error, based on the event you select here, our servers will send a POST request to the URL that you specify here. This provides a notification to your server so that you can take relevant actions e.g. publishing the video on your website or sending notifications to your viewers."}),t.jsx(qd,{})]})}),t.jsxs(re,{sx:{flexGrow:1,bgcolor:"background.paper",display:"flex",borderTop:1,borderColor:"divider",minHeight:400},children:[t.jsx(Kn,{value:n,onChange:a,orientation:"vertical","aria-label":"webhook_docs_tab",sx:{borderRight:1,borderColor:"divider",minWidth:150},children:c.map((l,u)=>t.jsx(te,{sx:{textTransform:"none"},label:l},`${l}_${u}`))}),Object.values(i).map((l,u)=>t.jsx(ne,{value:n,index:u,children:t.jsx(be,{className:"full-round",width:"70%",children:t.jsx(jt,{children:t.jsx(q,{noButton:!0,snippet:JSON.stringify(l,null,2)})})})},c[u]))]}),t.jsx("div",{className:"doc-and-tutorial-wrapper",children:t.jsxs("div",{style:{maxWidth:600,margin:"0"},children:[t.jsx("h3",{children:"Authentication"}),t.jsx("p",{children:"It is a good idea to add a simple authentication parameter to the URL so that you can be sure that someone else is not sending a fake video-ready event. Here is an example of doing so."}),t.jsx("pre",{style:{color:"#5F50E4",marginTop:23},children:t.jsx("code",{children:"http://example.com/video-is-ready.php?token=49eb0c0b29529216bab89627"})}),t.jsx("p",{children:`With a URL like this, you can verify the token in your server
104            application to verify that the POST request has indeed come from
105            ${o} servers.`})]})})]})}const Zd=(e,n={})=>{const{sampleDataWebhook:r={}}=n||{};return r[e]?r[e]:r["video:ready"]},ot=D("pre")(()=>({textWrap:"unset",wordBreak:"break-all",marginTop:0})),Jd=D("div")(()=>({display:"grid",gridTemplateColumns:"1fr auto 1fr","@media (max-width: 600px)":{gridTemplateColumns:"1fr"}})),fe=D(U)(()=>({marginBottom:0,display:"block"})),De=D(U)(()=>({marginBottom:"16px",display:"block"})),Bn=D("div",{shouldForwardProp:e=>e!=="response"})(({response:e})=>({padding:0,paddingLeft:e?"24px":0,maxWidth:"700px",wordBreak:"break-word","@media (max-width: 600px)":{paddingLeft:0}})),Gn=D(we,{shouldForwardProp:e=>e!=="response"})(({response:e})=>({padding:0,paddingLeft:e?"24px":0,marginBottom:"8px","@media (max-width: 600px)":{paddingLeft:0}})),Qd=({eventType:e,showMockDataDialog:n,sendMockEvents:r,testingWebhook:o,testWebhookRes:a,webhookData:i})=>{var c,l,u,h,f,y,b,v;return t.jsx(Ce,{open:n,onClose:()=>r(!1),fullWidth:!0,maxWidth:"lg",scroll:"paper",children:t.jsxs(Ee,{children:[t.jsx(yt,{"aria-label":"close",onClick:()=>r(!1),sx:{position:"absolute",right:8,top:8,color:s=>s.palette.grey[500]},children:t.jsx(ls,{})}),t.jsxs(Jd,{children:[t.jsxs("div",{children:[t.jsx(Gn,{children:"Request"}),t.jsx(Qe,{sx:{marginBottom:1}}),t.jsxs(Bn,{children:[t.jsx(fe,{variant:"subtitle1",children:"Headers"}),t.jsx(De,{variant:"caption",children:t.jsx(ot,{children:JSON.stringify({"content-type":"application/json"},null,2)})}),t.jsx(fe,{variant:"subtitle1",children:"Body"}),t.jsx(De,{variant:"caption",children:t.jsx(ot,{children:JSON.stringify(Zd(e,i),null,2)})})]})]}),t.jsx(Qe,{orientation:"vertical",flexItem:!0}),t.jsxs("div",{children:[t.jsx(Gn,{response:!0,children:"Response"}),t.jsx(Qe,{sx:{marginBottom:1}}),t.jsx(Bn,{response:!0,children:o?"Processing...":t.jsxs(t.Fragment,{children:[t.jsxs(fe,{children:["Status: ",(c=a==null?void 0:a.data)!=null&&c.statusCode||(l=a==null?void 0:a.data)!=null&&l.statusMessage?`${(u=a==null?void 0:a.data)==null?void 0:u.statusCode} ${(h=a==null?void 0:a.data)==null?void 0:h.statusMessage}`:"N/A"]}),t.jsx(fe,{variant:"subtitle1",children:"Headers"}),t.jsx(De,{variant:"caption",children:t.jsx(ot,{children:(f=a==null?void 0:a.data)!=null&&f.headers?JSON.stringify((y=a==null?void 0:a.data)==null?void 0:y.headers,null,2):"N/A"})}),t.jsx(fe,{variant:"subtitle1",children:"Body"}),t.jsx(De,{variant:"caption",children:(b=a==null?void 0:a.data)!=null&&b.body?JSON.stringify((v=a==null?void 0:a.data)==null?void 0:v.body,null,2):"N/A"})]})})]})]})]})})},eu={category:"warning",style:"",dismissible:!1,message:t.jsxs("ul",{children:[t.jsx("li",{children:"The hook's failure count increases whenever it does not return a status code of 200. If this occurs, please review your API and ensure that it returns 200 status code even if it is failing due to some internal reasons."}),t.jsx("li",{children:"Hooks will be deactivated after failing more than 15 times consecutively. At that point, we will stop attempting to call the hook on the specified events and mark it as inactive."}),t.jsx("li",{children:'If your hook is deactivated, try to resolve the issue with your API and then click the "Reactivate" button to restore its functionality.'})]})};class tu extends C.Component{constructor(r){super(r);ln(this,"getInfoBoxStatus",()=>{var a;let r=!1;const o=((a=this.props)==null?void 0:a.webhooksList)||[];for(const i of o){if(i.failure_count>=15)return 2;i.failure_count>0&&i.failure_count<=14&&(r=!0)}return r?1:0});this.state={createWebhookDialogOpen:!1,url:"",allowCreate:!1,event:"video:ready",showMockDataDialog:!1},this.handleUrlChange=this.handleUrlChange.bind(this),this.handleCreateWebHookDialogOpen=this.handleCreateWebHookDialogOpen.bind(this),this.sendMockEvents=this.sendMockEvents.bind(this),this.getFailureState=this.getFailureState.bind(this)}componentDidMount(){this.props.fetchWebHooks()}componentDidUpdate(r){const o=r.creatingWebhook,{creatingWebhook:a}=this.props;o===!0&&a===!1&&this.handleCreateWebHookDialogClose()}handleCreateWebHookDialogClose(){this.setState({createWebhookDialogOpen:!1,url:""})}handleCreateWebHookDialogOpen(){this.setState({createWebhookDialogOpen:!0})}handleUrlChange(r){this.validationForUrl(r)?this.setState({url:r,allowCreate:!0}):this.setState({url:r,allowCreate:!1})}handleEventChange(r){this.setState({event:r})}validationForUrl(r){return/^http(s)?:\/\/[\w.-]+(?:\.[\w.-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=]+$/.test(r)}getErrorMessage(r){return this.validationForUrl(r)?"":"Url must begin with http or https"}allowCreate(){this.setState({allowCreate:!0})}disallowCreate(){this.setState({allowCreate:!1})}
105async sendMockEvents(r,o){if(r===!1){this.setState({showMockDataDialog:!1});return}this.setState({showMockDataDialog:r,event:o.event}),this.props.testWebHook(o)}getFailureState(r,o){let i=r>=15?"Inactive":"Active";return r>0&&r<15&&(i=i+`<br/>(Failures: ${r})`),r>=15?t.jsx(W,{variant:"outlined",size:"small",onClick:()=>this.props.updateWebhook(o),children:"Reactivate"}):i}getTableData(r){return r.map(o=>{o.sendMock=t.jsx(W,{onClick:()=>this.sendMockEvents(!0,o),variant:"outlined",size:"small",children:"Send Mock Event"});const a=this.getFailureState(o.failure_count,o.uuid);return o.state=typeof a=="string"?Ld(a):a,o})}render(){const{webhooksList:r=[],sampleDataWebhook:o={},creatingWebhook:a,createWebHook:i,deletingWebhook:c,deleteWebHook:l,testingWebhook:u,testWebhookRes:h}=this.props,{createWebhookDialogOpen:f,url:y,allowCreate:b,event:v,showMockDataDialog:s}=this.state;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"tab-content",children:[this.getInfoBoxStatus()>0&&t.jsx(cs,{notice:{...eu,category:this.getInfoBoxStatus()===2?"error":"warning"},hideLink:!0,hideIcon:!1,style:{color:"black"}}),t.jsx(Ge,{columns:se.SECURITY_CONFIG.WEB_HOOK_TABLE_COLUMNS,tableData:this.getTableData(r),handleDelete:l,isDeleting:c,tableType:"Web Hook",handleCreate:this.handleCreateWebHookDialogOpen,identityKey:"uuid",deletingText:"Web Hook? The action is irreversible."}),t.jsxs(Ce,{maxWidth:"sm",fullWidth:!0,"aria-labelledby":"createwebhook-dialog-title",open:f,onClose:()=>this.handleCreateWebHookDialogClose(),children:[t.jsx(we,{children:"New Hook"}),t.jsxs(Ee,{children:[t.jsx(He,{children:"Enter URL, Event of the Web Hook to be created"}),t.jsxs(Jn,{children:[t.jsx(it,{name:"url",required:!0,value:y,autoFocus:!0,setValue:this.handleUrlChange,floatingText:"URL"}),t.jsxs(_e,{fullWidth:!0,sx:{marginTop:2},children:[t.jsx(Ue,{id:"webhook-event-selection-label",children:"Event"}),t.jsxs(Be,{placeholder:"Event",labelId:"webhook-event-selection-label",value:v,onChange:d=>this.handleEventChange(d.target.value),input:t.jsx(bt,{label:"Event"}),children:[t.jsx(z,{value:"video:ready",children:"video:ready"}),t.jsx(z,{value:"video:error",children:"video:error"}),t.jsx(z,{value:"video:deleted",children:"video:deleted"}),t.jsx(z,{value:"video:updated",children:"video:updated"}),t.jsx(z,{value:"poster:uploaded",children:"poster:uploaded"}),t.jsx(z,{value:"caption:uploaded",children:"caption:uploaded"}),t.jsx(z,{value:"caption:generated",children:"caption:generated"})]})]})]})]}),t.jsxs(mt,{children:[t.jsx(W,{onClick:()=>this.handleCreateWebHookDialogClose(),color:"primary",children:"Cancel"}),t.jsx(W,{onClick:()=>i({url:y,event:v}),variant:"contained",color:"primary",disabled:a||!b,children:"Create Web Hook"})]})]}),t.jsx(Qd,{eventType:v,showMockDataDialog:s,sendMockEvents:this.sendMockEvents,testingWebhook:u,testWebhookRes:h,webhookData:{sampleDataWebhook:o,webhooksList:r}}),r.length===0&&t.jsx("div",{className:"no-data",children:t.jsx(U,{color:"textSecondary",align:"center",children:"No web hooks for this project yet"})})]}),t.jsx(Xd,{webhookSampleData:{sampleDataWebhook:o,webhooksList:r}})]})}}const nu=e=>e.webhooks,ru=e=>X({fetchWebHooks:Gd,createWebHook:Vd,deleteWebHook:zd,testWebHook:Wd,updateWebhook:Kd},e),au=Y(nu,ru)(tu),ou=Xn("playerConfig"),su=se.SECURITY_CONFIG.CONFIG;let Le=su;const Qr=de();Le=Le.filter(e=>{const n=e.label==="Custom Player";return ou&&!Qr||!n});const iu=D("div")(()=>({"div.tab-content":{padding:"30px",background:"#fff",borderRadius:"0 0 20px 20px",boxShadow:"0px 12px 23px rgba(62, 73, 84, 0.04)"},"div.full-round":{borderRadius:"20px"},"div.no-data":{margin:"40px 16px"},".roles-div":{display:"flex",flexWrap:"wrap"},".security-header":{marginBottom:14,color:"rgba(0,0,0,0.54)",fontStyle:"italic",marginTop:"5px"}})),lu=()=>{const[e,n]=C.useState(0);return C.useEffect(()=>{const r=Le.findIndex(o=>window.location.pathname.includes(o.to));n(r)},[window.location.pathname]),t.jsxs(iu,{children:[t.jsx(zn,{children:"Config"}),t.jsx(er,{value:e,tabs:Le,onChange:null,type:"Link"}),t.jsxs(vt,{children:[t.jsx(N,{path:"/dashboard/config/apikeys",component:pc}),t.jsx(N,{path:"/dashboard/config/users",component:Pc}),t.jsx(N,{path:"/dashboard/config/webhooks",component:au}),!Qr&&t.jsx(N,{exact:!0,path:"/dashboard/config/customplayer",component:rr}),t.jsx(N,{path:"/dashboard/config/customplayer/:configId",component:Pr}),t.jsx(N,{exact:!0,path:"/dashboard/config/watchtime-track",children:t.jsx(ce,{to:"/dashboard/analytics/watchtime-track"})}),t.jsx(ce,{to:"/dashboard/config/apikeys"})]})]})},cu=D("div")(()=>({margin:"30px","div.tab-content":{padding:"30px",background:"#fff",borderRadius:"0 0 20px 20px",boxShadow:"0px 12px 23px rgba(62, 73, 84, 0.04)"},"div.full-round":{borderRadius:"20px"},"div.no-data":{margin:"40px 16px"},".roles-div":{display:"flex",flexWrap:"wrap"},".security-header":{marginBottom:14,color:"rgba(0,0,0,0.54)",fontStyle:"italic",marginTop:"5px"}}));class _u extends C.Component{render(){return t.jsx(cu,{children:t.jsxs(vt,{children:[t.jsx(N,{path:["/dashboard/security","/dashboard/config/settings","/dashboard/config/advanced","/dashboard/config/fairplay"],component:oi}),t.jsx(N,{path:"/dashboard/config",component:lu}),t.jsx(N,{exact:!0,path:"/dashboard/config/customplayer",component:rr}),t.jsx(N,{path:"/dashboard/config/customplayer/:configId",component:Pr}),t.jsx(N,{exact:!0,path:"/dashboard/config/watchtime-track",children:t.jsx(ce,{to:"/dashboard/analytics/watchtime-track"})})]})})}}export{_u as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.