From 89b1cefb3e65bbdcb89bf9e5fd60499d448d55ea Mon Sep 17 00:00:00 2001 From: Bifeldy Date: Mon, 16 Oct 2023 01:08:34 +0900 Subject: [PATCH] =?UTF-8?q?=E2=9C=94=20Build=20=F0=9F=8E=89=2016-10-2023?= =?UTF-8?q?=20=E2=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...95fbee4ef8e.js => 635.d0d0e16169922893.js} | 2 +- dist/fansubid/browser/750.739b8058c2f54ada.js | 1 + dist/fansubid/browser/750.ebd8141ed453be68.js | 1 - ...d70da4f14f5.js => 794.489ee51efe96d202.js} | 2 +- ...b2c1e13d577.js => 839.20303174f083f134.js} | 2 +- dist/fansubid/browser/915.580f18c13dada6ab.js | 1 + dist/fansubid/browser/915.963bdeecbe73cd07.js | 1 - dist/fansubid/browser/939.e9d5bead82343605.js | 1 + dist/fansubid/browser/939.fd2a3249d749666c.js | 1 - dist/fansubid/browser/index.html | 2 +- .../fansubid/browser/main.3de35e27ffd93d42.js | 1 - .../fansubid/browser/main.e0742bf98dcc9caa.js | 1 + dist/fansubid/browser/ngsw.json | 36 +++++++++---------- ...32d05b2.js => runtime.f9b63484f8d87cae.js} | 2 +- dist/fansubid/server/main.js | 2 +- 15 files changed, 28 insertions(+), 28 deletions(-) rename dist/fansubid/browser/{635.48e1195fbee4ef8e.js => 635.d0d0e16169922893.js} (76%) create mode 100644 dist/fansubid/browser/750.739b8058c2f54ada.js delete mode 100644 dist/fansubid/browser/750.ebd8141ed453be68.js rename dist/fansubid/browser/{794.e9d71d70da4f14f5.js => 794.489ee51efe96d202.js} (99%) rename dist/fansubid/browser/{839.12157b2c1e13d577.js => 839.20303174f083f134.js} (99%) create mode 100644 dist/fansubid/browser/915.580f18c13dada6ab.js delete mode 100644 dist/fansubid/browser/915.963bdeecbe73cd07.js create mode 100644 dist/fansubid/browser/939.e9d5bead82343605.js delete mode 100644 dist/fansubid/browser/939.fd2a3249d749666c.js delete mode 100644 dist/fansubid/browser/main.3de35e27ffd93d42.js create mode 100644 dist/fansubid/browser/main.e0742bf98dcc9caa.js rename dist/fansubid/browser/{runtime.1fe4f3a6432d05b2.js => runtime.f9b63484f8d87cae.js} (77%) diff --git a/dist/fansubid/browser/635.48e1195fbee4ef8e.js b/dist/fansubid/browser/635.d0d0e16169922893.js similarity index 76% rename from dist/fansubid/browser/635.48e1195fbee4ef8e.js rename to dist/fansubid/browser/635.d0d0e16169922893.js index 9234ef4a4..3efa6d1c3 100644 --- a/dist/fansubid/browser/635.48e1195fbee4ef8e.js +++ b/dist/fansubid/browser/635.d0d0e16169922893.js @@ -1 +1 @@ -(self.webpackChunkfansubid=self.webpackChunkfansubid||[]).push([[635],{8635:(He,Ie,H)=>{"use strict";H.r(Ie),H.d(Ie,{BerkasModule:()=>T0});var X=H(6895),_e=H(1390),B=H(4006),we=H(7375),ve=H(3170),Q=H(6271),Ce=H(4249),Ee=H(210),Te=H(6436),pe=H(8613),u=H(4650);let se=(()=>{class s{}return s.\u0275fac=function(t){return new(t||s)},s.\u0275mod=u.oAB({type:s}),s.\u0275inj=u.cJS({imports:[X.ez]}),s})();var Fe=H(8764),Ve=H(4167),it=H(7355),yt=H(2777),oe=H(5861),Le=H(529),me=H(8505),Oe=H(7272),Ge=H(5934),ke=H(257),Ue=H(3e3),je=H(8745),rt=H(8987),w=H(6382),D=H(4137),V=H(4327),te=H(6925),$=H(197);let de=(()=>{class s{constructor(t,i,e){this.gs=t,this.toast=i,this.dls=e,this.attachmentsDownload={}}getAttachmentDownloadFile(t){return this.attachmentsDownload[t.id]||(this.attachmentsDownload[t.id]={},this.attachmentsDownload[t.id].name=t.name,this.attachmentsDownload[t.id].orig=t.orig,this.attachmentsDownload[t.id].size=t.size,this.attachmentsDownload[t.id].ext=t.ext,this.attachmentsDownload[t.id].download_count=t.download_count,this.attachmentsDownload[t.id].google_drive=t.google_drive,this.attachmentsDownload[t.id].discord=t.discord,this.attachmentsDownload[t.id].mode="indeterminate",this.attachmentsDownload[t.id].isDownloading=!1,this.attachmentsDownload[t.id].isCompleted=!1,this.attachmentsDownload[t.id].data=null,this.attachmentsDownload[t.id].handler=null,this.attachmentsDownload[t.id].toast=null,this.attachmentsDownload[t.id].totals=0,this.attachmentsDownload[t.id].percentage=0,this.attachmentsDownload[t.id].speed=0,this.attachmentsDownload[t.id].loaded=0),this.attachmentsDownload[t.id]}stopFail(t){t.isDownloading=!1,t.isCompleted=!1,t.toast&&this.toast.remove(t.toast.toastId)}onProgress(t,i){if(i.loaded){this.gs.log("[DOWNLOAD_PROGRESS]",i),t.mode="determinate";const e=i.loaded-t.loaded;t.totals+=e,t.speed=e/1e3,t.percentage=Math.round(t.totals/t.size*100),t.loaded=i.loaded,t.toast.toastRef.componentInstance.message=`${t.percentage}% @ ${t.speed} KB/s`}}startDownload(t,i=!0){var e=this;const r=this.attachmentsDownload[t];var a;r.toast=this.toast.warning(`${r.percentage}% @ ${r.speed} KB/s`,"Mengunduh ...",{closeButton:!1,timeOut:0,disableTimeOut:"extendedTimeOut",tapToDismiss:!1}),r.isCompleted?this.saveFileAs(t):(r.isDownloading=!0,r.discord?this.dls.getListDdl(t).subscribe({next:(a=(0,oe.Z)(function*(o){e.gs.log("[DOWNLOAD_LIST_DDL]",o);const l=o.results.sort((v,g)=>v.chunk_idx-g.chunk_idx),d=[];for(const v of l){let g=null;g=i&&v.url?e.dls.downloadDdlDirect(v.url):e.dls.downloadDdlProxy(v.id),d.push(g)}const f=[];var v;r.handler=(0,Oe.z)(...d).subscribe({next:(v=(0,oe.Z)(function*(g){if(g.type===Le.dt.DownloadProgress&&e.onProgress(r,g),g.type===Le.dt.Response){r.loaded=0;const E=yield g.body.arrayBuffer(),x=new Uint8Array(E);e.gs.log("[DOWNLOAD_CHUNK_APPEND]",E.byteLength),f.push(x)}if(g.type===Le.dt.Response&&f.length===l.length){e.gs.log("[DOWNLOAD_CHUNK_COMPLETED]",f);const T=new Blob(f);r.mode="determinate",r.isDownloading=!1,r.isCompleted=!0,r.data=T,e.toast.remove(r.toast.toastId),e.saveFileAs(t)}}),function(T){return v.apply(this,arguments)}),error:v=>{e.gs.log("[DOWNLOAD_CHUNK_ERROR]",v,"error"),e.stopFail(r)}})}),function(l){return a.apply(this,arguments)}),error:a=>{this.gs.log("[DOWNLOAD_ERROR]",a,"error"),this.stopFail(r)}}):r.handler=this.dls.downloadLampiran(t).subscribe({next:a=>{a.type===Le.dt.DownloadProgress&&this.onProgress(r,a),a.type===Le.dt.Response&&(this.gs.log("[DOWNLOAD_COMPLETED]",a),r.mode="determinate",r.isDownloading=!1,r.isCompleted=!0,r.data=a.body,this.toast.remove(r.toast.toastId),this.saveFileAs(t))},error:a=>{this.gs.log("[DOWNLOAD_ERROR]",a,"error"),this.stopFail(r)}}))}cancelDownload(t){const i=this.attachmentsDownload[t];i.mode="indeterminate",i.percentage=0,i.speed=0,i.totals=0,i.loaded=0,i.isDownloading=!1,i.isCompleted=!1,i.handler&&i.handler.unsubscribe(),i.toast&&this.toast.remove(i.toast.toastId)}saveFileAs(t){this.gs.log("[SAVE_FILE]",t);const i=this.attachmentsDownload[t];(0,V.saveAs)(i.data,`${i.orig||i.name+"."+i.ext}`)}}return s.\u0275fac=function(t){return new(t||s)(u.LFG(ke.U),u.LFG(te.k),u.LFG($.v))},s.\u0275prov=u.Yz7({token:s,factory:s.\u0275fac,providedIn:"root"}),s})();var le=H(8020),xe=H(8381),J=H(3238),ue=H(4859),ee=H(7392),ie=H(9549),Ae=H(6338),Ze=H(3162),We=H(4385),qe=H(266),Me=H(8616),Pt=H(9226),P=H.n(Pt),St=H(1421),z=H.n(St);function gt(){return gt=Object.assign?Object.assign.bind():function(s){for(var n=1;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function oi(s,n,t){return(oi=vt()?Reflect.construct.bind():function(e,r,a){var o=[null];o.push.apply(o,r);var d=new(Function.bind.apply(e,o));return a&<(d,a.prototype),d}).apply(null,arguments)}var rn=H(3871),xr=H.n(rn),Sr="http://example.com";const Ji=function(n,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(n)&&(n=P().location&&P().location.href||"");var i="function"==typeof P().URL,e=/^\/\//.test(n),r=!P().location&&!/\/\//i.test(n);if(i?n=new(P().URL)(n,P().location||Sr):/\/\//i.test(n)||(n=xr().buildAbsoluteURL(P().location&&P().location.href||"",n)),i){var a=new URL(t,n);return r?a.href.slice(Sr.length):e?a.href.slice(a.protocol.length):a.href}return xr().buildAbsoluteURL(n,t)};var Cr=function(){function s(){this.listeners={}}var n=s.prototype;return n.on=function(i,e){this.listeners[i]||(this.listeners[i]=[]),this.listeners[i].push(e)},n.off=function(i,e){if(!this.listeners[i])return!1;var r=this.listeners[i].indexOf(e);return this.listeners[i]=this.listeners[i].slice(0),this.listeners[i].splice(r,1),r>-1},n.trigger=function(i){var e=this.listeners[i];if(e)if(2===arguments.length)for(var r=e.length,a=0;a-1;r=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,r)),this.buffer=this.buffer.substring(r+1)},n}(Cr),Bn=String.fromCharCode(9),kr=function(n){var t=/([0-9.]*)?@?([0-9.]*)?/.exec(n||""),i={};return t[1]&&(i.length=parseInt(t[1],10)),t[2]&&(i.offset=parseInt(t[2],10)),i},Ft=function(n){for(var r,t=n.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),i={},e=t.length;e--;)""!==t[e]&&((r=/([^=]*)=(.*)/.exec(t[e]).slice(1))[0]=r[0].replace(/^\s+|\s+$/g,""),r[1]=r[1].replace(/^\s+|\s+$/g,""),r[1]=r[1].replace(/^['"](.*)['"]$/g,"$1"),i[r[0]]=r[1]);return i},Vi=function(s){function n(){var i;return(i=s.call(this)||this).customParsers=[],i.tagMappers=[],i}re(n,s);var t=n.prototype;return t.push=function(e){var a,o,r=this;if(0!==(e=e.trim()).length){if("#"!==e[0])return void this.trigger("data",{type:"uri",uri:e});this.tagMappers.reduce(function(d,f){var v=f(e);return v===e?d:d.concat([v])},[e]).forEach(function(d){for(var f=0;f0&&(a.duration=S.duration),0===S.duration&&(a.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=r},key:function(){if(S.attributes)if("NONE"!==S.attributes.METHOD)if(S.attributes.URI){if("com.apple.streamingkeydelivery"===S.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:S.attributes});if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===S.attributes.KEYFORMAT)return-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(S.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===S.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==S.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):S.attributes.KEYID&&"0x"===S.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:S.attributes.KEYFORMAT,keyId:S.attributes.KEYID.substring(2)},pssh:er(S.attributes.URI.split(",")[1])})):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}));S.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),l={method:S.attributes.METHOD||"AES-128",uri:S.attributes.URI},typeof S.attributes.IV<"u"&&(l.iv=S.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else l=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(S.number)?this.manifest.mediaSequence=S.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+S.number})},"discontinuity-sequence":function(){isFinite(S.number)?(this.manifest.discontinuitySequence=S.number,T=S.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+S.number})},"playlist-type":function(){/VOD|EVENT/.test(S.playlistType)?this.manifest.playlistType=S.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+S.playlist})},map:function(){o={},S.uri&&(o.uri=S.uri),S.byterange&&(o.byterange=S.byterange),l&&(o.key=l)},"stream-inf":function(){this.manifest.playlists=r,this.manifest.mediaGroups=this.manifest.mediaGroups||v,S.attributes?(a.attributes||(a.attributes={}),gt(a.attributes,S.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||v,S.attributes&&S.attributes.TYPE&&S.attributes["GROUP-ID"]&&S.attributes.NAME){var q=this.manifest.mediaGroups[S.attributes.TYPE];q[S.attributes["GROUP-ID"]]=q[S.attributes["GROUP-ID"]]||{},N=q[S.attributes["GROUP-ID"]],(F={default:/yes/i.test(S.attributes.DEFAULT)}).autoselect=!!F.default||/yes/i.test(S.attributes.AUTOSELECT),S.attributes.LANGUAGE&&(F.language=S.attributes.LANGUAGE),S.attributes.URI&&(F.uri=S.attributes.URI),S.attributes["INSTREAM-ID"]&&(F.instreamId=S.attributes["INSTREAM-ID"]),S.attributes.CHARACTERISTICS&&(F.characteristics=S.attributes.CHARACTERISTICS),S.attributes.FORCED&&(F.forced=/yes/i.test(S.attributes.FORCED)),N[S.attributes.NAME]=F}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){T+=1,a.discontinuity=!0,this.manifest.discontinuityStarts.push(r.length)},"program-date-time":function(){typeof this.manifest.dateTimeString>"u"&&(this.manifest.dateTimeString=S.dateTimeString,this.manifest.dateTimeObject=S.dateTimeObject),a.dateTimeString=S.dateTimeString,a.dateTimeObject=S.dateTimeObject},targetduration:function(){!isFinite(S.duration)||S.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+S.duration}):(this.manifest.targetDuration=S.duration,Ar.call(this,this.manifest))},start:function(){S.attributes&&!isNaN(S.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:S.attributes["TIME-OFFSET"],precise:S.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out":function(){a.cueOut=S.data},"cue-out-cont":function(){a.cueOutCont=S.data},"cue-in":function(){a.cueIn=S.data},skip:function(){this.manifest.skip=_i(S.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",S.attributes,["SKIPPED-SEGMENTS"])},part:function(){var q=this;d=!0;var ne=this.manifest.segments.length,he=_i(S.attributes);a.parts=a.parts||[],a.parts.push(he),he.byterange&&(he.byterange.hasOwnProperty("offset")||(he.byterange.offset=x),x=he.byterange.offset+he.byterange.length),this.warnOnMissingAttributes_("#EXT-X-PART #"+(a.parts.length-1)+" for segment #"+ne,S.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach(function(ye,ge){ye.hasOwnProperty("lastPart")||q.trigger("warn",{message:"#EXT-X-RENDITION-REPORT #"+ge+" lacks required attribute(s): LAST-PART"})})},"server-control":function(){var q=this.manifest.serverControl=_i(S.attributes);q.hasOwnProperty("canBlockReload")||(q.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),Ar.call(this,this.manifest),q.canSkipDateranges&&!q.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint":function(){var q=this.manifest.segments.length,ne=_i(S.attributes),he=ne.type&&"PART"===ne.type;a.preloadHints=a.preloadHints||[],a.preloadHints.push(ne),ne.byterange&&(ne.byterange.hasOwnProperty("offset")||(ne.byterange.offset=he?x:0,he&&(x=ne.byterange.offset+ne.byterange.length)));var K=a.preloadHints.length-1;if(this.warnOnMissingAttributes_("#EXT-X-PRELOAD-HINT #"+K+" for segment #"+q,S.attributes,["TYPE","URI"]),ne.type)for(var ye=0;yei.timeline?1:-1})},lu=function(n){var t=[];return function(n,t,i){t.forEach(function(e){for(var r in n.mediaGroups[e])for(var a in n.mediaGroups[e][r])i(n.mediaGroups[e][r][a])})}(n,uf,function(i,e,r,a){t=t.concat(i.playlists||[])}),t},du=function(n){var t=n.playlist;t.mediaSequence=n.mediaSequence,t.segments.forEach(function(e,r){e.number=t.mediaSequence+r})},Wn=function(n){return n&&n.uri+"-"+function(n){var t;return t="bigint"==typeof n.offset||"bigint"==typeof n.length?P().BigInt(n.offset)+P().BigInt(n.length)-P().BigInt(1):n.offset+n.length-1,n.offset+"-"+t}(n.byterange)},os=function(n){return nu(n.reduce(function(i,e){var a,r=e.attributes.id+(e.attributes.lang||"");i[r]?(e.segments&&(e.segments[0]&&(e.segments[0].discontinuity=!0),(a=i[r].segments).push.apply(a,e.segments)),e.attributes.contentProtection&&(i[r].attributes.contentProtection=e.attributes.contentProtection)):(i[r]=e,i[r].attributes.timelineStarts=[]);return i[r].attributes.timelineStarts.push({start:e.attributes.periodStart,timeline:e.attributes.periodStart}),i},{})).map(function(i){return i.discontinuityStarts=function(n,t){return n.reduce(function(i,e,r){return e.discontinuity&&i.push(r),i},[])}(i.segments||[]),i})},us=function(n,t){var i=Wn(n.sidx),e=i&&t[i]&&t[i].sidx;return e&&ss(n,e,n.sidx.resolvedUri),n},hf=function(n,t){if(void 0===t&&(t={}),!Object.keys(t).length)return n;for(var i in n)n[i]=us(n[i],t);return n},yf=function(n){var t,i=n.attributes,e=n.segments,r=n.sidx,a=n.discontinuityStarts,o={attributes:(t={NAME:i.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:i.width,height:i.height},CODECS:i.codecs,BANDWIDTH:i.bandwidth},t["PROGRAM-ID"]=1,t),uri:"",endList:"static"===i.type,timeline:i.periodStart,resolvedUri:"",targetDuration:i.duration,discontinuityStarts:a,timelineStarts:i.timelineStarts,segments:e};return i.contentProtection&&(o.contentProtection=i.contentProtection),r&&(o.sidx=r),o},Tf=function(n){var t=n.attributes;return"video/mp4"===t.mimeType||"video/webm"===t.mimeType||"video"===t.contentType},bf=function(n){var t=n.attributes;return"audio/mp4"===t.mimeType||"audio/webm"===t.mimeType||"audio"===t.contentType},xf=function(n){var t=n.attributes;return"text/vtt"===t.mimeType||"text"===t.contentType},cu=function(n){return n?Object.keys(n).reduce(function(t,i){return t.concat(n[i].playlists)},[]):[]},Ef=function(n){var t,i=n.dashPlaylists,e=n.locations,r=n.sidxMapping,a=void 0===r?{}:r,o=n.previousManifest;if(!i.length)return{};var l=i[0].attributes,d=l.sourceDuration,f=l.type,v=l.suggestedPresentationDelay,g=l.minimumUpdatePeriod,T=os(i.filter(Tf)).map(yf),E=os(i.filter(bf)),x=os(i.filter(xf)),S=i.map(function(he){return he.attributes.captionServices}).filter(Boolean),N={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(t={AUDIO:{},VIDEO:{}},t["CLOSED-CAPTIONS"]={},t.SUBTITLES={},t),uri:"",duration:d,playlists:hf(T,a)};g>=0&&(N.minimumUpdatePeriod=1e3*g),e&&(N.locations=e),"dynamic"===f&&(N.suggestedPresentationDelay=v);var j=E.length?function(n,t,i){void 0===t&&(t={}),void 0===i&&(i=!1);var e,r=n.reduce(function(o,l){var d=l.attributes.role&&l.attributes.role.value||"",f=l.attributes.lang||"",v=l.attributes.label||"main";f&&!l.attributes.label&&(v=l.attributes.lang+(d?" ("+d+")":"")),o[v]||(o[v]={language:f,autoselect:!0,default:"main"===d,playlists:[],uri:""});var T=us(function(n,t){var i,e=n.attributes,r=n.segments,a=n.sidx,o=n.mediaSequence,l=n.discontinuitySequence,d=n.discontinuityStarts,f={attributes:(i={NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs},i["PROGRAM-ID"]=1,i),uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:"",targetDuration:e.duration,discontinuitySequence:l,discontinuityStarts:d,timelineStarts:e.timelineStarts,mediaSequence:o,segments:r};return e.contentProtection&&(f.contentProtection=e.contentProtection),a&&(f.sidx=a),t&&(f.attributes.AUDIO="audio",f.attributes.SUBTITLES="subs"),f}(l,i),t);return o[v].playlists.push(T),typeof e>"u"&&"main"===d&&((e=l).default=!0),o},{});return e||(r[Object.keys(r)[0]].default=!0),r}(E,a,0===N.playlists.length):null,W=x.length?function(n,t){return void 0===t&&(t={}),n.reduce(function(i,e){var r=e.attributes.lang||"text";return i[r]||(i[r]={language:r,default:!1,autoselect:!1,playlists:[],uri:""}),i[r].playlists.push(us(function(n){var t,i=n.attributes,e=n.segments,r=n.mediaSequence,a=n.discontinuityStarts,o=n.discontinuitySequence;typeof e>"u"&&(e=[{uri:i.baseUrl,timeline:i.periodStart,resolvedUri:i.baseUrl||"",duration:i.sourceDuration,number:0}],i.duration=i.sourceDuration);var l=((t={NAME:i.id,BANDWIDTH:i.bandwidth})["PROGRAM-ID"]=1,t);return i.codecs&&(l.CODECS=i.codecs),{attributes:l,uri:"",endList:"static"===i.type,timeline:i.periodStart,resolvedUri:i.baseUrl||"",targetDuration:i.duration,timelineStarts:i.timelineStarts,discontinuityStarts:a,discontinuitySequence:o,mediaSequence:r,segments:e}}(e),t)),i},{})}(x,a):null,q=T.concat(cu(j),cu(W)),ne=q.map(function(he){return he.timelineStarts});return N.timelineStarts=uu(ne),function(n,t){n.forEach(function(i){i.mediaSequence=0,i.discontinuitySequence=ns(t,function(e){return e.timeline===i.timeline}),i.segments&&i.segments.forEach(function(e,r){e.number=r})})}(q,N.timelineStarts),j&&(N.mediaGroups.AUDIO.audio=j),W&&(N.mediaGroups.SUBTITLES.subs=W),S.length&&(N.mediaGroups["CLOSED-CAPTIONS"].cc=function(n){return n.reduce(function(t,i){return i&&i.forEach(function(e){var a=e.language;t[a]={autoselect:!1,default:!1,instreamId:e.channel,language:a},e.hasOwnProperty("aspectRatio")&&(t[a].aspectRatio=e.aspectRatio),e.hasOwnProperty("easyReader")&&(t[a].easyReader=e.easyReader),e.hasOwnProperty("3D")&&(t[a]["3D"]=e["3D"])}),t},{})}(S)),o?function(n){var t=n.oldManifest,i=n.newManifest,e=t.playlists.concat(lu(t)),r=i.playlists.concat(lu(i));return i.timelineStarts=uu([t.timelineStarts,i.timelineStarts]),function(n){var t=n.oldPlaylists,e=n.timelineStarts;n.newPlaylists.forEach(function(r){r.discontinuitySequence=ns(e,function(f){return f.timeline===r.timeline});var a=function(n,t){for(var i=0;ia.timeline||a.segments.length&&r.timeline>a.segments[a.segments.length-1].timeline)&&r.discontinuitySequence--);a.segments[l].discontinuity&&!o.discontinuity&&(o.discontinuity=!0,r.discontinuityStarts.unshift(0),r.discontinuitySequence--),du({playlist:r,mediaSequence:a.segments[l].number})}})}({oldPlaylists:e,newPlaylists:r,timelineStarts:i.timelineStarts}),i}({oldManifest:o,newManifest:N}):N},Cf=function(n,t,i){var o=n.timescale,d=n.periodStart,v=n.minimumUpdatePeriod;return Math.ceil((((n.NOW+n.clientOffset)/1e3+(void 0===v?0:v)-(n.availabilityStartTime+(void 0===d?0:d)))*(void 0===o?1:o)-t)/i)},fu=function(n,t){for(var i=n.type,e=n.minimumUpdatePeriod,r=void 0===e?0:e,a=n.media,o=void 0===a?"":a,l=n.sourceDuration,d=n.timescale,f=void 0===d?1:d,v=n.startNumber,g=void 0===v?1:v,T=n.periodStart,E=[],x=-1,S=0;Sx&&(x=W);var q=void 0;if(j<0){var ne=S+1;q=ne===t.length?"dynamic"===i&&r>0&&o.indexOf("$Number$")>0?Cf(n,x,F):(l*f-x)/F:(t[ne].t-x)/F}else q=j+1;for(var he=g+E.length+q,K=g+E.length;K"u")return t;var a=""+n[i];return"RepresentationID"===i||(r=e?parseInt(r,10):1,a.length>=r)?a:""+new Array(r-a.length+1).join("0")+a}}(t))},If=function(n,t){var i={RepresentationID:n.id,Bandwidth:n.bandwidth||0},e=n.initialization,r=void 0===e?{sourceURL:"",range:""}:e,a=on({baseUrl:n.baseUrl,source:hu(r.sourceURL,i),range:r.range}),o=function(n,t){return n.duration||t?n.duration?as(n):fu(n,t):[{number:n.startNumber||1,duration:n.sourceDuration,time:0,timeline:n.periodStart}]}(n,t);return o.map(function(l){i.Number=l.number,i.Time=l.time;var d=hu(n.media||"",i),g=n.periodStart+(l.time-(n.presentationTimeOffset||0))/(n.timescale||1);return{uri:d,timeline:l.timeline,duration:l.duration,resolvedUri:Ji(n.baseUrl||"",d),map:a,number:l.number,presentationTime:g}})},Pf=function(n,t){var i=n.duration,e=n.segmentUrls,r=void 0===e?[]:e,a=n.periodStart;if(!i&&!t||i&&t)throw new Error("SEGMENT_TIME_UNSPECIFIED");var l,o=r.map(function(f){return function(n,t){var i=n.baseUrl,e=n.initialization,r=void 0===e?{}:e,a=on({baseUrl:i,source:r.sourceURL,range:r.range}),o=on({baseUrl:i,source:t.media,range:t.mediaRange});return o.map=a,o}(n,f)});return i&&(l=as(n)),t&&(l=fu(n,t)),l.map(function(f,v){if(o[v]){var g=o[v],T=n.timescale||1,E=n.presentationTimeOffset||0;return g.timeline=f.timeline,g.duration=f.duration,g.number=f.number,g.presentationTime=a+(f.time-E)/T,g}}).filter(function(f){return f})},Of=function(n){var e,r,t=n.attributes,i=n.segmentInfo;i.template?(r=If,e=Bt(t,i.template)):i.base?(r=ou,e=Bt(t,i.base)):i.list&&(r=Pf,e=Bt(t,i.list));var a={attributes:t};if(!r)return a;var o=r(e,i.segmentTimeline);if(e.duration){var f=e.timescale;e.duration=e.duration/(void 0===f?1:f)}else e.duration=o.length?o.reduce(function(g,T){return Math.max(g,Math.ceil(T.duration))},0):0;return a.attributes=e,a.segments=o,i.base&&e.indexRange&&(a.sidx=o[0],a.segments=[]),a},Tt=function(n,t){return au(n.childNodes).filter(function(i){return i.tagName===t})},ls=function(n){return n.textContent.trim()},Ir=function(n){var l=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(n);if(!l)return 0;var d=l.slice(1),v=d[1],g=d[2],T=d[3],E=d[4],x=d[5];return 31536e3*parseFloat(d[0]||0)+2592e3*parseFloat(v||0)+86400*parseFloat(g||0)+3600*parseFloat(T||0)+60*parseFloat(E||0)+parseFloat(x||0)},pu={mediaPresentationDuration:function(n){return Ir(n)},availabilityStartTime:function(n){return function(n){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(n)&&(n+="Z"),Date.parse(n)}(n)/1e3},minimumUpdatePeriod:function(n){return Ir(n)},suggestedPresentationDelay:function(n){return Ir(n)},type:function(n){return n},timeShiftBufferDepth:function(n){return Ir(n)},start:function(n){return Ir(n)},width:function(n){return parseInt(n,10)},height:function(n){return parseInt(n,10)},bandwidth:function(n){return parseInt(n,10)},startNumber:function(n){return parseInt(n,10)},timescale:function(n){return parseInt(n,10)},presentationTimeOffset:function(n){return parseInt(n,10)},duration:function(n){var t=parseInt(n,10);return isNaN(t)?Ir(n):t},d:function(n){return parseInt(n,10)},t:function(n){return parseInt(n,10)},r:function(n){return parseInt(n,10)},DEFAULT:function(n){return n}},Mt=function(n){return n&&n.attributes?au(n.attributes).reduce(function(t,i){return t[i.name]=(pu[i.name]||pu.DEFAULT)(i.value),t},{}):{}},Mf={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},Gn=function(n,t){return t.length?qn(n.map(function(i){return t.map(function(e){return Ji(i,ls(e))})})):n},ds=function(n){var t=Tt(n,"SegmentTemplate")[0],i=Tt(n,"SegmentList")[0],e=i&&Tt(i,"SegmentURL").map(function(g){return Bt({tag:"SegmentURL"},Mt(g))}),r=Tt(n,"SegmentBase")[0],a=i||t,o=a&&Tt(a,"SegmentTimeline")[0],l=i||r||t,d=l&&Tt(l,"Initialization")[0],f=t&&Mt(t);f&&d?f.initialization=d&&Mt(d):f&&f.initialization&&(f.initialization={sourceURL:f.initialization});var v={template:f,segmentTimeline:o&&Tt(o,"S").map(function(g){return Mt(g)}),list:i&&Bt(Mt(i),{segmentUrls:e,initialization:Mt(d)}),base:r&&Bt(Mt(r),{initialization:Mt(d)})};return Object.keys(v).forEach(function(g){v[g]||delete v[g]}),v},jf=function(n,t){return function(i,e){var r=Gn(t,Tt(i.node,"BaseURL")),a=Bt(n,{periodStart:i.attributes.start});"number"==typeof i.attributes.duration&&(a.periodDuration=i.attributes.duration);var o=Tt(i.node,"AdaptationSet"),l=ds(i.node);return qn(o.map(function(n,t,i){return function(e){var r=Mt(e),a=Gn(t,Tt(e,"BaseURL")),o=Tt(e,"Role")[0],l={role:Mt(o)},d=Bt(n,r,l),f=Tt(e,"Accessibility")[0],v=function(n){return"urn:scte:dash:cc:cea-608:2015"===n.schemeIdUri?("string"!=typeof n.value?[]:n.value.split(";")).map(function(e){var r,a;if(a=e,/^CC\d=/.test(e)){var o=e.split("=");r=o[0],a=o[1]}else/^CC\d$/.test(e)&&(r=e);return{channel:r,language:a}}):"urn:scte:dash:cc:cea-708:2015"===n.schemeIdUri?("string"!=typeof n.value?[]:n.value.split(";")).map(function(e){var r={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(e)){var a=e.split("="),l=a[1],d=void 0===l?"":l;r.channel=a[0],r.language=e,d.split(",").forEach(function(f){var v=f.split(":"),g=v[0],T=v[1];"lang"===g?r.language=T:"er"===g?r.easyReader=Number(T):"war"===g?r.aspectRatio=Number(T):"3D"===g&&(r["3D"]=Number(T))})}else r.language=e;return r.channel&&(r.channel="SERVICE"+r.channel),r}):void 0}(Mt(f));v&&(d=Bt(d,{captionServices:v}));var g=Tt(e,"Label")[0];if(g&&g.childNodes.length){var T=g.childNodes[0].nodeValue.trim();d=Bt(d,{label:T})}var E=function(n){return n.reduce(function(t,i){var e=Mt(i),r=Mf[e.schemeIdUri];if(r){t[r]={attributes:e};var a=Tt(i,"cenc:pssh")[0];if(a){var o=ls(a),l=o&&er(o);t[r].pssh=l}}return t},{})}(Tt(e,"ContentProtection"));Object.keys(E).length&&(d=Bt(d,{contentProtection:E}));var x=ds(e),S=Tt(e,"Representation"),N=Bt(i,x);return qn(S.map(function(n,t,i){return function(e){var r=Tt(e,"BaseURL"),a=Gn(t,r),o=Bt(n,Mt(e)),l=ds(e);return a.map(function(d){return{segmentInfo:Bt(i,l),attributes:Bt(o,{baseUrl:d})}})}}(d,a,N)))}}(a,r,l)))}},mu=function(n){if(""===n)throw new Error("DASH_EMPTY_MANIFEST");var i,e,t=new Vn.DOMParser;try{e=(i=t.parseFromString(n,"application/xml"))&&"MPD"===i.documentElement.tagName?i.documentElement:null}catch{}if(!e||e&&e.getElementsByTagName("parsererror").length>0)throw new Error("DASH_INVALID_XML");return e},Zf=H(7459),Kf=H.n(Zf),Re=function(n){return n instanceof Uint8Array?n:(!Array.isArray(n)&&!function(n){return function(n){return"function"===ArrayBuffer.isView?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer}(n)}(n)&&!(n instanceof ArrayBuffer)&&(n="number"!=typeof n||"number"==typeof n&&n!=n?0:[n]),new Uint8Array(n&&n.buffer||n,n&&n.byteOffset||0,n&&n.byteLength||0))},Ot=P().BigInt||Number,cs=[Ot("0x1"),Ot("0x100"),Ot("0x10000"),Ot("0x1000000"),Ot("0x100000000"),Ot("0x10000000000"),Ot("0x1000000000000"),Ot("0x100000000000000"),Ot("0x10000000000000000")],Jf=(s=new Uint16Array([65484]),new Uint8Array(s.buffer,s.byteOffset,s.byteLength),function(n,t){var i=void 0===t?{}:t,e=i.signed,r=void 0!==e&&e,a=i.le,o=void 0!==a&&a;n=Re(n);var l=o?"reduce":"reduceRight",f=(n[l]?n[l]:Array.prototype[l]).call(n,function(g,T,E){var x=o?E:Math.abs(E+1-n.length);return g+Ot(T)*cs[x]},Ot(0));if(r){var v=cs[n.length]/Ot(2)-Ot(1);(f=Ot(f))>v&&(f-=v,f-=v,f-=Ot(2))}return Number(f)}),_u=function(n,t){if("string"!=typeof n&&n&&"function"==typeof n.toString&&(n=n.toString()),"string"!=typeof n)return new Uint8Array;t||(n=unescape(encodeURIComponent(n)));for(var i=new Uint8Array(n.length),e=0;e=t.length&&(t.every?t.every:Array.prototype.every).call(t,function(f,v){return f===(l[v]?l[v]&n[a+v]:n[a+v])})},rh=Re([73,68,51]),un=function s(n,t){return void 0===t&&(t=0),(n=Re(n)).length-t<10||!ht(n,rh,{offset:t})?t:(t+=function(n,t){void 0===t&&(t=0);var e=(n=Re(n))[t+6]<<21|n[t+7]<<14|n[t+8]<<7|n[t+9];return(16&n[t+5])>>4?e+20:e+10}(n,t),s(n,t))},fs=(new Uint8Array([79,112,117,115,72,101,97,100]),function(n){return"string"==typeof n?_u(n):n}),ps=function(n){n=Re(n);for(var t=[],i=0;n.length>i;){var e=n[i],r=0,a=0,o=n[++a];for(a++;128&o;)r=(127&o)<<7,o=n[a],a++;r+=127&o;for(var l=0;l>>0,o=n.subarray(r+4,r+8);if(0===a)break;var l=r+a;if(l>n.length){if(i)break;l=n.length}var d=n.subarray(r+8,l);ht(o,t[0])&&(1===t.length?e.push(d):e.push.apply(e,s(d,t.slice(1),i))),r=l}return e},dt={EBML:Re([26,69,223,163]),DocType:Re([66,130]),Segment:Re([24,83,128,103]),SegmentInfo:Re([21,73,169,102]),Tracks:Re([22,84,174,107]),Track:Re([174]),TrackNumber:Re([215]),DefaultDuration:Re([35,227,131]),TrackEntry:Re([174]),TrackType:Re([131]),FlagDefault:Re([136]),CodecID:Re([134]),CodecPrivate:Re([99,162]),VideoTrack:Re([224]),AudioTrack:Re([225]),Cluster:Re([31,67,182,117]),Timestamp:Re([231]),TimestampScale:Re([42,215,177]),BlockGroup:Re([160]),BlockDuration:Re([155]),Block:Re([161]),SimpleBlock:Re([163])},ms=[128,64,32,16,8,4,2,1],rr=function(n,t,i,e){void 0===i&&(i=!0),void 0===e&&(e=!1);var r=function(n){for(var t=1,i=0;i=t.length)return t.length;var e=rr(t,i,!1);if(ht(n.bytes,e.bytes))return i;var r=rr(t,i+e.length);return s(n,t,i+r.length+r.value+e.length)},pt=function s(n,t){t=function(n){return Array.isArray(n)?n.map(function(t){return yu(t)}):[yu(n)]}(t),n=Re(n);var i=[];if(!t.length)return i;for(var e=0;en.length?n.length:o+a.value);ht(t[0],r.bytes)&&(1===t.length?i.push(d):i=i.concat(s(d,t.slice(1)))),e+=r.length+a.length+d.length}return i},ph=Re([0,0,0,1]),mh=Re([0,0,1]),gh=Re([0,0,3]),vh=function(n){for(var t=[],i=1;i>1&63),-1!==i.indexOf(d)&&(a=r+l),r+=l+("h264"===t?1:2)}else r++}return n.subarray(0,0)},jt={webm:Re([119,101,98,109]),matroska:Re([109,97,116,114,111,115,107,97]),flac:Re([102,76,97,67]),ogg:Re([79,103,103,83]),ac3:Re([11,119]),riff:Re([82,73,70,70]),avi:Re([65,86,73]),wav:Re([87,65,86,69]),"3gp":Re([102,116,121,112,51,103]),mp4:Re([102,116,121,112]),fmp4:Re([115,116,121,112]),mov:Re([102,116,121,112,113,116]),moov:Re([109,111,111,118]),moof:Re([109,111,111,102])},Pr={aac:function(n){var t=un(n);return ht(n,[255,16],{offset:t,mask:[255,22]})},mp3:function(n){var t=un(n);return ht(n,[255,2],{offset:t,mask:[255,6]})},webm:function(n){var t=pt(n,[dt.EBML,dt.DocType])[0];return ht(t,jt.webm)},mkv:function(n){var t=pt(n,[dt.EBML,dt.DocType])[0];return ht(t,jt.matroska)},mp4:function(n){return!Pr["3gp"](n)&&!Pr.mov(n)&&(!!(ht(n,jt.mp4,{offset:4})||ht(n,jt.fmp4,{offset:4})||ht(n,jt.moof,{offset:4})||ht(n,jt.moov,{offset:4}))||void 0)},mov:function(n){return ht(n,jt.mov,{offset:4})},"3gp":function(n){return ht(n,jt["3gp"],{offset:4})},ac3:function(n){var t=un(n);return ht(n,jt.ac3,{offset:t})},ts:function(n){if(n.length<189&&n.length>=1)return 71===n[0];for(var t=0;t+1880?l:0)}if(P().console){var d=P().console[i];!d&&"debug"===i&&(d=P().console.info||P().console.log),d&&a&&o.test(i)&&d[Array.isArray(r)?"apply":"call"](P().console,r)}}}(s,i),i.createLogger=function(e){return Eu(s+": "+e)},i.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:n},i.level=function(e){if("string"==typeof e){if(!i.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');n=e}return n},(i.history=function(){return zt?[].concat(zt):[]}).filter=function(e){return(zt||[]).filter(function(r){return new RegExp(".*"+e+".*").test(r[0])})},i.history.clear=function(){zt&&(zt.length=0)},i.history.disable=function(){null!==zt&&(zt.length=0,zt=null)},i.history.enable=function(){null===zt&&(zt=[])},i.error=function(){for(var e=arguments.length,r=new Array(e),a=0;a1?n-1:0),i=1;i=0)throw new Error("class has illegal whitespace characters")}function Rr(){return z()===P().document}function Mr(s){return Ii(s)&&1===s.nodeType}function Mu(){try{return P().parent!==P().self}catch{return!0}}function Uu(s){return function(n,t){if(!Lu(n))return z()[s](null);Lu(t)&&(t=z().querySelector(t));var i=Mr(t)?t:z();return i[s]&&i[s](n)}}function Ye(s,n,t,i){void 0===s&&(s="div"),void 0===n&&(n={}),void 0===t&&(t={});var e=z().createElement(s);return Object.getOwnPropertyNames(n).forEach(function(r){var a=n[r];-1!==r.indexOf("aria-")||"role"===r||"type"===r?(Ke.warn("Setting attributes in the second argument of createEl()\nhas been deprecated. Use the third argument instead.\ncreateEl(type, properties, attributes). Attempting to set "+r+" to "+a+"."),e.setAttribute(r,a)):"textContent"===r?nr(e,a):(e[r]!==a||"tabIndex"===r)&&(e[r]=a)}),Object.getOwnPropertyNames(t).forEach(function(r){e.setAttribute(r,t[r])}),i&&Es(e,i),e}function nr(s,n){return typeof s.textContent>"u"?s.innerText=n:s.textContent=n,s}function xs(s,n){n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s)}function ar(s,n){return Ru(n),s.classList?s.classList.contains(n):function Dh(s){return new RegExp("(^|\\s)"+s+"($|\\s)")}(n).test(s.className)}function Oi(s,n){return s.classList?s.classList.add(n):ar(s,n)||(s.className=(s.className+" "+n).trim()),s}function mn(s,n){return s?(s.classList?s.classList.remove(n):(Ru(n),s.className=s.className.split(/\s+/).filter(function(t){return t!==n}).join(" ")),s):(Ke.warn("removeClass was called with an element that doesn't exist"),null)}function Nu(s,n,t){var i=ar(s,n);if("function"==typeof t&&(t=t(s,n)),"boolean"!=typeof t&&(t=!i),t!==i)return t?Oi(s,n):mn(s,n),s}function Fu(s,n){Object.getOwnPropertyNames(n).forEach(function(t){var i=n[t];null===i||typeof i>"u"||!1===i?s.removeAttribute(t):s.setAttribute(t,!0===i?"":i)})}function Li(s){var n={};if(s&&s.attributes&&s.attributes.length>0)for(var i=s.attributes,e=i.length-1;e>=0;e--){var r=i[e].name,a=i[e].value;("boolean"==typeof s[r]||-1!==",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+r+","))&&(a=null!==a),n[r]=a}return n}function Bu(s,n){return s.getAttribute(n)}function Ur(s,n,t){s.setAttribute(n,t)}function Xn(s,n){s.removeAttribute(n)}function ju(){z().body.focus(),z().onselectstart=function(){return!1}}function Hu(){z().onselectstart=function(){return!0}}function Nr(s){if(s&&s.getBoundingClientRect&&s.parentNode){var n=s.getBoundingClientRect(),t={};return["bottom","height","left","right","top","width"].forEach(function(i){void 0!==n[i]&&(t[i]=n[i])}),t.height||(t.height=parseFloat(fn(s,"height"))),t.width||(t.width=parseFloat(fn(s,"width"))),t}}function gn(s){if(!s||s&&!s.offsetParent)return{left:0,top:0,width:0,height:0};for(var n=s.offsetWidth,t=s.offsetHeight,i=0,e=0;s.offsetParent&&s!==z()[Kn.fullscreenElement];)i+=s.offsetLeft,e+=s.offsetTop,s=s.offsetParent;return{left:i,top:e,width:n,height:t}}function Jn(s,n){var t={x:0,y:0};if(Ht)for(var i=s;i&&"html"!==i.nodeName.toLowerCase();){var e=fn(i,"transform");if(/^matrix/.test(e)){var r=e.slice(7,-1).split(/,\s/).map(Number);t.x+=r[4],t.y+=r[5]}else if(/^matrix3d/.test(e)){var a=e.slice(9,-1).split(/,\s/).map(Number);t.x+=a[12],t.y+=a[13]}i=i.parentNode}var o={},l=gn(n.target),d=gn(s),f=d.width,g=n.offsetY-(d.top-l.top),T=n.offsetX-(d.left-l.left);return n.changedTouches&&(T=n.changedTouches[0].pageX-d.left,g=n.changedTouches[0].pageY+d.top,Ht&&(T-=t.x,g-=t.y)),o.y=1-Math.max(0,Math.min(1,g/d.height)),o.x=Math.max(0,Math.min(1,T/f)),o}function Vu(s){return Ii(s)&&3===s.nodeType}function Ss(s){for(;s.firstChild;)s.removeChild(s.firstChild);return s}function qu(s){return"function"==typeof s&&(s=s()),(Array.isArray(s)?s:[s]).map(function(n){return"function"==typeof n&&(n=n()),Mr(n)||Vu(n)?n:"string"==typeof n&&/\S/.test(n)?z().createTextNode(n):void 0}).filter(function(n){return n})}function Es(s,n){return qu(n).forEach(function(t){return s.appendChild(t)}),s}function Wu(s,n){return Es(Ss(s),n)}function vn(s){return void 0===s.button&&void 0===s.buttons||0===s.button&&void 0===s.buttons||"mouseup"===s.type&&0===s.button&&0===s.buttons||!(0!==s.button||1!==s.buttons)}var Cs,Gi=Uu("querySelector"),Gu=Uu("querySelectorAll"),Zu=Object.freeze({__proto__:null,isReal:Rr,isEl:Mr,isInFrame:Mu,createEl:Ye,textContent:nr,prependTo:xs,hasClass:ar,addClass:Oi,removeClass:mn,toggleClass:Nu,setAttributes:Fu,getAttributes:Li,getAttribute:Bu,setAttribute:Ur,removeAttribute:Xn,blockTextSelection:ju,unblockTextSelection:Hu,getBoundingClientRect:Nr,findPosition:gn,getPointerPosition:Jn,isTextNode:Vu,emptyEl:Ss,normalizeContent:qu,appendContent:Es,insertContent:Wu,isSingleLeftClick:vn,$:Gi,$$:Gu}),Ku=!1,Ph=function(){if(!1!==Cs.options.autoSetup){var n=Array.prototype.slice.call(z().getElementsByTagName("video")),t=Array.prototype.slice.call(z().getElementsByTagName("audio")),i=Array.prototype.slice.call(z().getElementsByTagName("video-js")),e=n.concat(t,i);if(e&&e.length>0)for(var r=0,a=e.length;r-1&&(e={passive:!0}),s.addEventListener(n,i.dispatcher,e)}else s.attachEvent&&s.attachEvent("on"+n,i.dispatcher)}function Ut(s,n,t){if(Vt.has(s)){var i=Vt.get(s);if(i.handlers){if(Array.isArray(n))return ws(Ut,s,n,t);var e=function(d,f){i.handlers[f]=[],Qu(d,f)};if(void 0===n){for(var r in i.handlers)Object.prototype.hasOwnProperty.call(i.handlers||{},r)&&e(s,r);return}var a=i.handlers[n];if(a){if(!t)return void e(s,n);if(t.guid)for(var o=0;o=t&&(n.apply(void 0,arguments),i=a)}},It=function(){};It.prototype.allowedEvents_={},It.prototype.addEventListener=It.prototype.on=function(s,n){var t=this.addEventListener;this.addEventListener=function(){},Xt(this,s,n),this.addEventListener=t},It.prototype.removeEventListener=It.prototype.off=function(s,n){Ut(this,s,n)},It.prototype.one=function(s,n){var t=this.addEventListener;this.addEventListener=function(){},ia(this,s,n),this.addEventListener=t},It.prototype.any=function(s,n){var t=this.addEventListener;this.addEventListener=function(){},Xu(this,s,n),this.addEventListener=t},It.prototype.dispatchEvent=It.prototype.trigger=function(s){var n=s.type||s;"string"==typeof s&&(s={type:n}),s=ea(s),this.allowedEvents_[n]&&this["on"+n]&&this["on"+n](s),Fr(this,s)},It.prototype.queueTrigger=function(s){var n=this;_n||(_n=new Map);var t=s.type||s,i=_n.get(this);i||_n.set(this,i=new Map);var e=i.get(t);i.delete(t),P().clearTimeout(e);var r=P().setTimeout(function(){0===i.size&&(i=null,_n.delete(n)),n.trigger(s)},0);i.set(t,r)};var ra=function(n){return"function"==typeof n.name?n.name():"string"==typeof n.name?n.name:n.name_?n.name_:n.constructor&&n.constructor.name?n.constructor.name:typeof n},Mi=function(n){return n instanceof It||!!n.eventBusEl_&&["on","one","off","trigger"].every(function(t){return"function"==typeof n[t]})},Is=function(n){return"string"==typeof n&&/\S/.test(n)||Array.isArray(n)&&!!n.length},na=function(n,t,i){if(!n||!n.nodeName&&!Mi(n))throw new Error("Invalid target for "+ra(t)+"#"+i+"; must be a DOM node or evented object.")},Ju=function(n,t,i){if(!Is(n))throw new Error("Invalid event type for "+ra(t)+"#"+i+"; must be a non-empty string or array.")},el=function(n,t,i){if("function"!=typeof n)throw new Error("Invalid listener for "+ra(t)+"#"+i+"; must be a function.")},Ds=function(n,t,i){var r,a,o,e=t.length<3||t[0]===n||t[0]===n.eventBusEl_;return e?(r=n.eventBusEl_,t.length>=3&&t.shift(),a=t[0],o=t[1]):(r=t[0],a=t[1],o=t[2]),na(r,n,i),Ju(a,n,i),el(o,n,i),{isTargetingSelf:e,target:r,type:a,listener:o=at(n,o)}},sr=function(n,t,i,e){na(n,n,t),n.nodeName?Uh[t](n,i,e):n[t](i,e)},Bh={on:function(){for(var n=this,t=arguments.length,i=new Array(t),e=0;e=0;i--)this.children_[i].dispose&&this.children_[i].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),this.el_=null),this.player_=null}},n.isDisposed=function(){return Boolean(this.isDisposed_)},n.player=function(){return this.player_},n.options=function(i){return i?(this.options_=ct(this.options_,i),this.options_):this.options_},n.el=function(){return this.el_},n.createEl=function(i,e,r){return Ye(i,e,r)},n.localize=function(i,e,r){void 0===r&&(r=i);var a=this.player_.language&&this.player_.language(),o=this.player_.languages&&this.player_.languages(),l=o&&o[a],d=a&&a.split("-")[0],f=o&&o[d],v=r;return l&&l[i]?v=l[i]:f&&f[i]&&(v=f[i]),e&&(v=v.replace(/\{(\d+)\}/g,function(g,T){var E=e[T-1],x=E;return typeof E>"u"&&(x=g),x})),v},n.handleLanguagechange=function(){},n.contentEl=function(){return this.contentEl_||this.el_},n.id=function(){return this.id_},n.name=function(){return this.name_},n.children=function(){return this.children_},n.getChildById=function(i){return this.childIndex_[i]},n.getChild=function(i){if(i)return this.childNameIndex_[i]},n.getDescendant=function(){for(var i=arguments.length,e=new Array(i),r=0;r=0;r--)if(this.children_[r]===i){e=!0,this.children_.splice(r,1);break}if(e){i.parentComponent_=null,this.childIndex_[i.id()]=null,this.childNameIndex_[bt(i.name())]=null,this.childNameIndex_[aa(i.name())]=null;var a=i.el();a&&a.parentNode===this.contentEl()&&this.contentEl().removeChild(i.el())}}},n.initChildren=function(){var i=this,e=this.options_.children;if(e){var o,r=this.options_,l=s.getComponent("Tech");(o=Array.isArray(e)?e:Object.keys(e)).concat(Object.keys(this.options_).filter(function(d){return!o.some(function(f){return"string"==typeof f?d===f:d===f.name})})).map(function(d){var f,v;return"string"==typeof d?v=e[f=d]||i.options_[f]||{}:(f=d.name,v=d),{name:f,opts:v}}).filter(function(d){var f=s.getComponent(d.opts.componentClass||bt(d.name));return f&&!l.isTech(f)}).forEach(function(f){var v=f.name,g=f.opts;if(void 0!==r[v]&&(g=r[v]),!1!==g){!0===g&&(g={}),g.playerOptions=i.options_.playerOptions;var T=i.addChild(v,g);T&&(i[v]=T)}})}},n.buildCSSClass=function(){return""},n.ready=function(i,e){if(void 0===e&&(e=!1),i){if(!this.isReady_)return this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(i);e?i.call(this):this.setTimeout(i,1)}},n.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var i=this.readyQueue_;this.readyQueue_=[],i&&i.length>0&&i.forEach(function(e){e.call(this)},this),this.trigger("ready")},1)},n.$=function(i,e){return Gi(i,e||this.contentEl())},n.$$=function(i,e){return Gu(i,e||this.contentEl())},n.hasClass=function(i){return ar(this.el_,i)},n.addClass=function(i){Oi(this.el_,i)},n.removeClass=function(i){mn(this.el_,i)},n.toggleClass=function(i,e){Nu(this.el_,i,e)},n.show=function(){this.removeClass("vjs-hidden")},n.hide=function(){this.addClass("vjs-hidden")},n.lockShowing=function(){this.addClass("vjs-lock-showing")},n.unlockShowing=function(){this.removeClass("vjs-lock-showing")},n.getAttribute=function(i){return Bu(this.el_,i)},n.setAttribute=function(i,e){Ur(this.el_,i,e)},n.removeAttribute=function(i){Xn(this.el_,i)},n.width=function(i,e){return this.dimension("width",i,e)},n.height=function(i,e){return this.dimension("height",i,e)},n.dimensions=function(i,e){this.width(i,!0),this.height(e)},n.dimension=function(i,e,r){if(void 0!==e)return(null===e||e!=e)&&(e=0),this.el_.style[i]=-1!==(""+e).indexOf("%")||-1!==(""+e).indexOf("px")?e:"auto"===e?"":e+"px",void(r||this.trigger("componentresize"));if(!this.el_)return 0;var a=this.el_.style[i],o=a.indexOf("px");return parseInt(-1!==o?a.slice(0,o):this.el_["offset"+bt(i)],10)},n.currentDimension=function(i){var e=0;if("width"!==i&&"height"!==i)throw new Error("currentDimension only accepts width or height value");if(e=fn(this.el_,i),0===(e=parseFloat(e))||isNaN(e)){var r="offset"+bt(i);e=this.el_[r]}return e},n.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},n.currentWidth=function(){return this.currentDimension("width")},n.currentHeight=function(){return this.currentDimension("height")},n.focus=function(){this.el_.focus()},n.blur=function(){this.el_.blur()},n.handleKeyDown=function(i){this.player_&&(De().isEventKey(i,"Tab")||i.stopPropagation(),this.player_.handleKeyDown(i))},n.handleKeyPress=function(i){this.handleKeyDown(i)},n.emitTapEvents=function(){var o,i=0,e=null;this.on("touchstart",function(d){1===d.touches.length&&(e={pageX:d.touches[0].pageX,pageY:d.touches[0].pageY},i=P().performance.now(),o=!0)}),this.on("touchmove",function(d){if(d.touches.length>1)o=!1;else if(e){var f=d.touches[0].pageX-e.pageX,v=d.touches[0].pageY-e.pageY;Math.sqrt(f*f+v*v)>10&&(o=!1)}});var l=function(){o=!1};this.on("touchleave",l),this.on("touchcancel",l),this.on("touchend",function(d){e=null,!0===o&&P().performance.now()-i<200&&(d.preventDefault(),this.trigger("tap"))})},n.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e,i=at(this.player(),this.player().reportUserActivity);this.on("touchstart",function(){i(),this.clearInterval(e),e=this.setInterval(i,250)});var r=function(o){i(),this.clearInterval(e)};this.on("touchmove",i),this.on("touchend",r),this.on("touchcancel",r)}},n.setTimeout=function(i,e){var a,r=this;return i=at(this,i),this.clearTimersOnDispose_(),a=P().setTimeout(function(){r.setTimeoutIds_.has(a)&&r.setTimeoutIds_.delete(a),i()},e),this.setTimeoutIds_.add(a),a},n.clearTimeout=function(i){return this.setTimeoutIds_.has(i)&&(this.setTimeoutIds_.delete(i),P().clearTimeout(i)),i},n.setInterval=function(i,e){i=at(this,i),this.clearTimersOnDispose_();var r=P().setInterval(i,e);return this.setIntervalIds_.add(r),r},n.clearInterval=function(i){return this.setIntervalIds_.has(i)&&(this.setIntervalIds_.delete(i),P().clearInterval(i)),i},n.requestAnimationFrame=function(i){var r,e=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),i=at(this,i),r=P().requestAnimationFrame(function(){e.rafIds_.has(r)&&e.rafIds_.delete(r),i()}),this.rafIds_.add(r),r):this.setTimeout(i,1e3/60)},n.requestNamedAnimationFrame=function(i,e){var r=this;if(!this.namedRafs_.has(i)){this.clearTimersOnDispose_(),e=at(this,e);var a=this.requestAnimationFrame(function(){e(),r.namedRafs_.has(i)&&r.namedRafs_.delete(i)});return this.namedRafs_.set(i,a),i}},n.cancelNamedAnimationFrame=function(i){!this.namedRafs_.has(i)||(this.cancelAnimationFrame(this.namedRafs_.get(i)),this.namedRafs_.delete(i))},n.cancelAnimationFrame=function(i){return this.supportsRaf_?(this.rafIds_.has(i)&&(this.rafIds_.delete(i),P().cancelAnimationFrame(i)),i):this.clearTimeout(i)},n.clearTimersOnDispose_=function(){var i=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",function(){[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(function(e){var a=e[1];i[e[0]].forEach(function(o,l){return i[a](l)})}),i.clearingTimersOnDispose_=!1}))},s.registerComponent=function(i,e){if("string"!=typeof i||!i)throw new Error('Illegal component name, "'+i+'"; must be a non-empty string.');var r=s.getComponent("Tech"),a=r&&r.isTech(e),o=s===e||s.prototype.isPrototypeOf(e.prototype);if(a||!o)throw new Error('Illegal component, "'+i+'"; '+(a?"techs must be registered using Tech.registerTech()":"must be a Component subclass")+".");i=bt(i),s.components_||(s.components_={});var d=s.getComponent("Player");if("Player"===i&&d&&d.players){var f=d.players,v=Object.keys(f);if(f&&v.length>0&&v.map(function(g){return f[g]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return s.components_[i]=e,s.components_[aa(i)]=e,e},s.getComponent=function(i){if(i&&s.components_)return s.components_[i]},s}();function il(s,n,t,i){return function Gh(s,n,t){if("number"!=typeof n||n<0||n>t)throw new Error("Failed to execute '"+s+"' on 'TimeRanges': The index provided ("+n+") is non-numeric or out of bounds (0-"+t+").")}(s,i,t.length-1),t[i][n]}function Ls(s){var n;return n=void 0===s||0===s.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:s.length,start:il.bind(null,"start",0,s),end:il.bind(null,"end",1,s)},P().Symbol&&P().Symbol.iterator&&(n[P().Symbol.iterator]=function(){return(s||[]).values()}),n}function or(s,n){return Array.isArray(s)?Ls(s):void 0===s||void 0===n?Ls():Ls([[s,n]])}function rl(s,n){var i,e,t=0;if(!n)return 0;(!s||!s.length)&&(s=or(0,0));for(var r=0;rn&&(e=n),t+=e-i;return t/n}function qt(s){if(s instanceof qt)return s;"number"==typeof s?this.code=s:"string"==typeof s?this.message=s:Ii(s)&&("number"==typeof s.code&&(this.code=s.code),_t(this,s)),this.message||(this.message=qt.defaultMessages[this.code]||"")}Y.prototype.supportsRaf_="function"==typeof P().requestAnimationFrame&&"function"==typeof P().cancelAnimationFrame,Y.registerComponent("Component",Y),qt.prototype.code=0,qt.prototype.message="",qt.prototype.status=null,qt.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],qt.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var Br=0;Br=0;r--)if(i[r].enabled){Us(i,i[r]);break}return(e=s.call(this,i)||this).changing_=!1,e}re(n,s);var t=n.prototype;return t.addTrack=function(e){var r=this;e.enabled&&Us(this,e),s.prototype.addTrack.call(this,e),e.addEventListener&&(e.enabledChange_=function(){r.changing_||(r.changing_=!0,Us(r,e),r.changing_=!1,r.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))},t.removeTrack=function(e){s.prototype.removeTrack.call(this,e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)},n}(Hr),Ns=function(n,t){for(var i=0;i=0;r--)if(i[r].selected){Ns(i,i[r]);break}return(e=s.call(this,i)||this).changing_=!1,Object.defineProperty(Ne(e),"selectedIndex",{get:function(){for(var o=0;o0&&(P().console&&P().console.groupCollapsed&&P().console.groupCollapsed("Text Track parsing errors for "+t.src),e.forEach(function(r){return Ke.error(r)}),P().console&&P().console.groupEnd&&P().console.groupEnd()),i.flush()},dl=function(n,t){var i={uri:n},e=sa(n);e&&(i.cors=e);var r="use-credentials"===t.tech_.crossOrigin();r&&(i.withCredentials=r),ki()(i,at(this,function(a,o,l){if(a)return Ke.error(a,o);t.loaded_=!0,"function"!=typeof P().WebVTT?t.tech_&&t.tech_.any(["vttjsloaded","vttjserror"],function(d){if("vttjserror"!==d.type)return ll(l,t);Ke.error("vttjs failed to load, stopping trying to process "+t.src)}):ll(l,t)}))},Tn=function(s){function n(i){var e;if(void 0===i&&(i={}),!i.tech)throw new Error("A tech was not provided.");var r=ct(i,{kind:ep[i.kind]||"subtitles",language:i.language||i.srclang||""}),a=ol[r.mode]||"disabled",o=r.default;("metadata"===r.kind||"chapters"===r.kind)&&(a="hidden"),(e=s.call(this,r)||this).tech_=r.tech,e.cues_=[],e.activeCues_=[],e.preload_=!1!==e.tech_.preloadTextTracks;var l=new sl(e.cues_),d=new sl(e.activeCues_),f=!1,v=at(Ne(e),function(){!this.tech_.isReady_||this.tech_.isDisposed()||(this.activeCues=this.activeCues,f&&(this.trigger("cuechange"),f=!1))});return e.tech_.one("dispose",function(){e.tech_.off("timeupdate",v)}),"disabled"!==a&&e.tech_.on("timeupdate",v),Object.defineProperties(Ne(e),{default:{get:function(){return o},set:function(){}},mode:{get:function(){return a},set:function(E){!ol[E]||a!==E&&(a=E,!this.preload_&&"disabled"!==a&&0===this.cues.length&&dl(this.src,this),this.tech_.off("timeupdate",v),"disabled"!==a&&this.tech_.on("timeupdate",v),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?l:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return d;for(var E=this.tech_.currentTime(),x=[],S=0,N=this.cues.length;S=E||F.startTime===F.endTime&&F.startTime<=E&&F.startTime+.5>=E)&&x.push(F)}if(f=!1,x.length!==this.activeCues_.length)f=!0;else for(var j=0;j0)return void this.trigger("vttjsloaded");var r=z().createElement("script");r.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",r.onload=function(){e.trigger("vttjsloaded")},r.onerror=function(){e.trigger("vttjserror")},this.on("dispose",function(){r.onload=null,r.onerror=null}),P().WebVTT=!0,this.el().parentNode.appendChild(r)}else this.ready(this.addWebVttScript_)},t.emulateTextTracks=function(){var e=this,r=this.textTracks(),a=this.remoteTextTracks(),o=function(g){return r.addTrack(g.track)},l=function(g){return r.removeTrack(g.track)};a.on("addtrack",o),a.on("removetrack",l),this.addWebVttScript_();var d=function(){return e.trigger("texttrackchange")},f=function(){d();for(var g=0;g=0;e--){var r=s[e];r[n]&&r[n](i,t)}}(s,t,o,a),o}var dp={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},cp={setCurrentTime:1,setMuted:1,setVolume:1},gl={play:1,pause:1};function Vs(s){return function(n,t){return n===oa?oa:t[s]?t[s](n):n}}function lr(s,n,t,i,e,r){void 0===s&&(s={}),void 0===n&&(n=[]),void 0===e&&(e=[]),void 0===r&&(r=!1);var o=n[0],l=n.slice(1);if("string"==typeof o)lr(s,ur[o],t,i,e,r);else if(o){var d=function pp(s,n){var t=Hs[s.id()],i=null;if(null==t)return i=n(s),Hs[s.id()]=[[n,i]],i;for(var e=0;e0;this.player_.tech(!0)&&!((pn||hn)&&r)&&this.player_.tech(!0).focus(),this.player_.paused()?yi(this.player_.play()):this.player_.pause()}},n}(la);Y.registerComponent("PosterImage",yp);var ni="#222",Tp={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function qs(s,n){var t;if(4===s.length)t=s[1]+s[1]+s[2]+s[2]+s[3]+s[3];else{if(7!==s.length)throw new Error("Invalid color code provided, "+s+"; must be formatted as e.g. #f0e or #f604e2.");t=s.slice(1)}return"rgba("+parseInt(t.slice(0,2),16)+","+parseInt(t.slice(2,4),16)+","+parseInt(t.slice(4,6),16)+","+n+")"}function Ws(s,n,t){try{s.style[n]=t}catch{return}}var bp=function(s){function n(i,e,r){var a;a=s.call(this,i,e,r)||this;var o=function(d){return a.updateDisplay(d)};return i.on("loadstart",function(l){return a.toggleDisplay(l)}),i.on("texttrackchange",o),i.on("loadedmetadata",function(l){return a.preselectTrack(l)}),i.ready(at(Ne(a),function(){if(i.tech_&&i.tech_.featuresNativeTextTracks)this.hide();else{i.on("fullscreenchange",o),i.on("playerresize",o),P().addEventListener("orientationchange",o),i.on("dispose",function(){return P().removeEventListener("orientationchange",o)});for(var l=this.options_.playerOptions.tracks||[],d=0;d0;return yi(r),void(this.player_.tech(!0)&&(!pn&&!hn||!a)&&this.player_.tech(!0).focus())}var o=this.player_.getChild("controlBar"),l=o&&o.getChild("playToggle");if(l){var d=function(){return l.focus()};yn(r)?r.then(d,function(){}):this.setTimeout(d,1)}else this.player_.tech(!0).focus()},t.handleKeyDown=function(e){this.mouseused_=!1,s.prototype.handleKeyDown.call(this,e)},t.handleMouseDown=function(e){this.mouseused_=!0},n}(hi);yl.prototype.controlText_="Play Video",Y.registerComponent("BigPlayButton",yl);var Sp=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).controlText(e&&e.controlText||r.localize("Close")),r}re(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-close-button "+s.prototype.buildCSSClass.call(this)},t.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},t.handleKeyDown=function(e){De().isEventKey(e,"Esc")?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):s.prototype.handleKeyDown.call(this,e)},n}(hi);Y.registerComponent("CloseButton",Sp);var Tl=function(s){function n(i,e){var r;return void 0===e&&(e={}),r=s.call(this,i,e)||this,e.replay=void 0===e.replay||e.replay,r.on(i,"play",function(a){return r.handlePlay(a)}),r.on(i,"pause",function(a){return r.handlePause(a)}),e.replay&&r.on(i,"ended",function(a){return r.handleEnded(a)}),r}re(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-play-control "+s.prototype.buildCSSClass.call(this)},t.handleClick=function(e){this.player_.paused()?yi(this.player_.play()):this.player_.pause()},t.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},t.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},t.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},t.handleEnded=function(e){var r=this;this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",function(a){return r.handleSeeked(a)})},n}(hi);Tl.prototype.controlText_="Play",Y.registerComponent("PlayToggle",Tl);var bl=function(n,t){n=n<0?0:n;var i=Math.floor(n%60),e=Math.floor(n/60%60),r=Math.floor(n/3600),a=Math.floor(t/60%60),o=Math.floor(t/3600);return(isNaN(n)||n===1/0)&&(r=e=i="-"),(r=r>0||o>0?r+":":"")+(e=((r||a>=10)&&e<10?"0"+e:e)+":")+(i<10?"0"+i:i)},Gs=bl;function Wr(s,n){return void 0===n&&(n=s),Gs(s,n)}var Gr=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).on(i,["timeupdate","ended"],function(a){return r.updateContent(a)}),r.updateTextNode_(),r}re(n,s);var t=n.prototype;return t.createEl=function(){var e=this.buildCSSClass(),r=s.prototype.createEl.call(this,"div",{className:e+" vjs-time-control vjs-control"}),a=Ye("span",{className:"vjs-control-text",textContent:this.localize(this.labelText_)+"\xa0"},{role:"presentation"});return r.appendChild(a),this.contentEl_=Ye("span",{className:e+"-display"},{"aria-live":"off",role:"presentation"}),r.appendChild(this.contentEl_),r},t.dispose=function(){this.contentEl_=null,this.textNode_=null,s.prototype.dispose.call(this)},t.updateTextNode_=function(e){var r=this;void 0===e&&(e=0),e=Wr(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",function(){if(r.contentEl_){var a=r.textNode_;a&&r.contentEl_.firstChild!==a&&(a=null,Ke.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),r.textNode_=z().createTextNode(r.formattedTime_),r.textNode_&&(a?r.contentEl_.replaceChild(r.textNode_,a):r.contentEl_.appendChild(r.textNode_))}}))},t.updateContent=function(e){},n}(Y);Gr.prototype.labelText_="Time",Gr.prototype.controlText_="Time",Y.registerComponent("TimeDisplay",Gr);var Zs=function(s){function n(){return s.apply(this,arguments)||this}re(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-current-time"},t.updateContent=function(e){var r;r=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(r)},n}(Gr);Zs.prototype.labelText_="Current Time",Zs.prototype.controlText_="Current Time",Y.registerComponent("CurrentTimeDisplay",Zs);var Ks=function(s){function n(i,e){var r,a=function(l){return r.updateContent(l)};return(r=s.call(this,i,e)||this).on(i,"durationchange",a),r.on(i,"loadstart",a),r.on(i,"loadedmetadata",a),r}re(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-duration"},t.updateContent=function(e){var r=this.player_.duration();this.updateTextNode_(r)},n}(Gr);Ks.prototype.labelText_="Duration",Ks.prototype.controlText_="Duration",Y.registerComponent("DurationDisplay",Ks);var kp=function(s){function n(){return s.apply(this,arguments)||this}return re(n,s),n.prototype.createEl=function(){var e=s.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),r=s.prototype.createEl.call(this,"div"),a=s.prototype.createEl.call(this,"span",{textContent:"/"});return r.appendChild(a),e.appendChild(r),e},n}(Y);Y.registerComponent("TimeDivider",kp);var zs=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).on(i,"durationchange",function(a){return r.updateContent(a)}),r}re(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-remaining-time"},t.createEl=function(){var e=s.prototype.createEl.call(this);return!1!==this.options_.displayNegative&&e.insertBefore(Ye("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e},t.updateContent=function(e){var r;"number"==typeof this.player_.duration()&&(r=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(r))},n}(Gr);zs.prototype.labelText_="Remaining Time",zs.prototype.controlText_="Remaining Time",Y.registerComponent("RemainingTimeDisplay",zs);var Ap=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).updateShowing(),r.on(r.player(),"durationchange",function(a){return r.updateShowing(a)}),r}re(n,s);var t=n.prototype;return t.createEl=function(){var e=s.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=Ye("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(Ye("span",{className:"vjs-control-text",textContent:this.localize("Stream Type")+"\xa0"})),this.contentEl_.appendChild(z().createTextNode(this.localize("LIVE"))),e.appendChild(this.contentEl_),e},t.dispose=function(){this.contentEl_=null,s.prototype.dispose.call(this)},t.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},n}(Y);Y.registerComponent("LiveDisplay",Ap);var xl=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).updateLiveEdgeStatus(),r.player_.liveTracker&&(r.updateLiveEdgeStatusHandler_=function(a){return r.updateLiveEdgeStatus(a)},r.on(r.player_.liveTracker,"liveedgechange",r.updateLiveEdgeStatusHandler_)),r}re(n,s);var t=n.prototype;return t.createEl=function(){var e=s.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=Ye("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e},t.updateLiveEdgeStatus=function(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))},t.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},t.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,s.prototype.dispose.call(this)},n}(hi);xl.prototype.controlText_="Seek to live, currently playing live",Y.registerComponent("SeekToLive",xl);var da=function(n,t,i){return n=Number(n),Math.min(i,Math.max(t,isNaN(n)?t:n))},Ys=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).handleMouseDown_=function(a){return r.handleMouseDown(a)},r.handleMouseUp_=function(a){return r.handleMouseUp(a)},r.handleKeyDown_=function(a){return r.handleKeyDown(a)},r.handleClick_=function(a){return r.handleClick(a)},r.handleMouseMove_=function(a){return r.handleMouseMove(a)},r.update_=function(a){return r.update(a)},r.bar=r.getChild(r.options_.barName),r.vertical(!!r.options_.vertical),r.enable(),r}re(n,s);var t=n.prototype;return t.enabled=function(){return this.enabled_},t.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},t.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},t.createEl=function(e,r,a){return void 0===r&&(r={}),void 0===a&&(a={}),r.className=r.className+" vjs-slider",r=_t({tabIndex:0},r),a=_t({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},a),s.prototype.createEl.call(this,e,r,a)},t.handleMouseDown=function(e){var r=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"===e.type&&!Pi&&e.preventDefault(),ju(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(r,"mousemove",this.handleMouseMove_),this.on(r,"mouseup",this.handleMouseUp_),this.on(r,"touchmove",this.handleMouseMove_),this.on(r,"touchend",this.handleMouseUp_),this.handleMouseMove(e,!0)},t.handleMouseMove=function(e){},t.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;Hu(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.update()},t.update=function(){var e=this;if(this.el_&&this.bar){var r=this.getProgress();return r===this.progress_||(this.progress_=r,this.requestNamedAnimationFrame("Slider#update",function(){var a=e.vertical()?"height":"width";e.bar.el().style[a]=(100*r).toFixed(2)+"%"})),r}},t.getProgress=function(){return Number(da(this.getPercent(),0,1).toFixed(4))},t.calculateDistance=function(e){var r=Jn(this.el_,e);return this.vertical()?r.y:r.x},t.handleKeyDown=function(e){De().isEventKey(e,"Left")||De().isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepBack()):De().isEventKey(e,"Right")||De().isEventKey(e,"Up")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):s.prototype.handleKeyDown.call(this,e)},t.handleClick=function(e){e.stopPropagation(),e.preventDefault()},t.vertical=function(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.addClass(this.vertical_?"vjs-slider-vertical":"vjs-slider-horizontal")},n}(Y);Y.registerComponent("Slider",Ys);var $s=function(n,t){return da(n/t*100,0,100).toFixed(2)+"%"},wp=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).partEls_=[],r.on(i,"progress",function(a){return r.update(a)}),r}re(n,s);var t=n.prototype;return t.createEl=function(){var e=s.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),r=Ye("span",{className:"vjs-control-text"}),a=Ye("span",{textContent:this.localize("Loaded")}),o=z().createTextNode(": ");return this.percentageEl_=Ye("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(r),r.appendChild(a),r.appendChild(o),r.appendChild(this.percentageEl_),e},t.dispose=function(){this.partEls_=null,this.percentageEl_=null,s.prototype.dispose.call(this)},t.update=function(e){var r=this;this.requestNamedAnimationFrame("LoadProgressBar#update",function(){var a=r.player_.liveTracker,o=r.player_.buffered(),l=a&&a.isLive()?a.seekableEnd():r.player_.duration(),d=r.player_.bufferedEnd(),f=r.partEls_,v=$s(d,l);r.percent_!==v&&(r.el_.style.width=v,nr(r.percentageEl_,v),r.percent_=v);for(var g=0;go.length;S--)r.el_.removeChild(f[S-1]);f.length=o.length})},n}(Y);Y.registerComponent("LoadProgressBar",wp);var Ip=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).update=Ri(at(Ne(r),r.update),30),r}re(n,s);var t=n.prototype;return t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},t.update=function(e,r,a){var o=gn(this.el_),l=Nr(this.player_.el()),d=e.width*r;if(l&&o){var f=e.left-l.left+d,v=e.width-d+(l.right-e.right),g=o.width/2;fo.width&&(g=o.width),g=Math.round(g),this.el_.style.right="-"+g+"px",this.write(a)}},t.write=function(e){nr(this.el_,e)},t.updateTime=function(e,r,a,o){var l=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",function(){var d,f=l.player_.duration();if(l.player_.liveTracker&&l.player_.liveTracker.isLive()){var v=l.player_.liveTracker.liveWindow(),g=v-r*v;d=(g<1?"":"-")+Wr(g,v)}else d=Wr(a,f);l.update(e,r,d),o&&o()})},n}(Y);Y.registerComponent("TimeTooltip",Ip);var Qs=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).update=Ri(at(Ne(r),r.update),30),r}re(n,s);var t=n.prototype;return t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},t.update=function(e,r){var a=this.getChild("timeTooltip");if(a){var o=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();a.updateTime(e,r,o)}},n}(Y);Qs.prototype.options_={children:[]},!Ht&&!Di&&Qs.prototype.options_.children.push("timeTooltip"),Y.registerComponent("PlayProgressBar",Qs);var Sl=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).update=Ri(at(Ne(r),r.update),30),r}re(n,s);var t=n.prototype;return t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},t.update=function(e,r){var a=this,o=r*this.player_.duration();this.getChild("timeTooltip").updateTime(e,r,o,function(){a.el_.style.left=e.width*r+"px"})},n}(Y);Sl.prototype.options_={children:["timeTooltip"]},Y.registerComponent("MouseTimeDisplay",Sl);var Xs=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).setEventHandlers_(),r}re(n,s);var t=n.prototype;return t.setEventHandlers_=function(){var e=this;this.update_=at(this,this.update),this.update=Ri(this.update_,30),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=function(r){return e.enableInterval_(r)},this.disableIntervalHandler_=function(r){return e.disableInterval_(r)},this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in z()&&"visibilityState"in z()&&this.on(z(),"visibilitychange",this.toggleVisibility_)},t.toggleVisibility_=function(e){"hidden"===z().visibilityState?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(!this.player_.ended()&&!this.player_.paused()&&this.enableInterval_(),this.update())},t.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,30))},t.disableInterval_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type||!this.updateInterval||(this.clearInterval(this.updateInterval),this.updateInterval=null)},t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},t.update=function(e){var r=this;if("hidden"!==z().visibilityState){var a=s.prototype.update.call(this);return this.requestNamedAnimationFrame("SeekBar#update",function(){var o=r.player_.ended()?r.player_.duration():r.getCurrentTime_(),l=r.player_.liveTracker,d=r.player_.duration();l&&l.isLive()&&(d=r.player_.liveTracker.liveCurrentTime()),r.percent_!==a&&(r.el_.setAttribute("aria-valuenow",(100*a).toFixed(2)),r.percent_=a),(r.currentTime_!==o||r.duration_!==d)&&(r.el_.setAttribute("aria-valuetext",r.localize("progress bar timing: currentTime={1} duration={2}",[Wr(o,d),Wr(d,d)],"{1} of {2}")),r.currentTime_=o,r.duration_=d),r.bar&&r.bar.update(Nr(r.el()),r.getProgress())}),a}},t.userSeek_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)},t.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},t.getPercent=function(){var r,e=this.getCurrentTime_(),a=this.player_.liveTracker;return a&&a.isLive()?(r=(e-a.seekableStart())/a.liveWindow(),a.atLiveEdge()&&(r=1)):r=e/this.player_.duration(),r},t.handleMouseDown=function(e){!vn(e)||(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),s.prototype.handleMouseDown.call(this,e))},t.handleMouseMove=function(e,r){if(void 0===r&&(r=!1),vn(e)){!r&&!this.player_.scrubbing()&&this.player_.scrubbing(!0);var a,o=this.calculateDistance(e),l=this.player_.liveTracker;if(l&&l.isLive()){if(o>=.99)return void l.seekToLiveEdge();var d=l.seekableStart(),f=l.liveCurrentTime();if((a=d+o*l.liveWindow())>=f&&(a=f),a<=d&&(a=d+.1),a===1/0)return}else(a=o*this.player_.duration())===this.player_.duration()&&(a-=.1);this.userSeek_(a)}},t.enable=function(){s.prototype.enable.call(this);var e=this.getChild("mouseTimeDisplay");!e||e.show()},t.disable=function(){s.prototype.disable.call(this);var e=this.getChild("mouseTimeDisplay");!e||e.hide()},t.handleMouseUp=function(e){s.prototype.handleMouseUp.call(this,e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?yi(this.player_.play()):this.update_()},t.stepForward=function(){this.userSeek_(this.player_.currentTime()+5)},t.stepBack=function(){this.userSeek_(this.player_.currentTime()-5)},t.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.handleKeyDown=function(e){var r=this.player_.liveTracker;if(De().isEventKey(e,"Space")||De().isEventKey(e,"Enter"))e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(De().isEventKey(e,"Home"))e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(De().isEventKey(e,"End"))e.preventDefault(),e.stopPropagation(),r&&r.isLive()?this.userSeek_(r.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(De()(e))){e.preventDefault(),e.stopPropagation();var a=10*(De().codes[De()(e)]-De().codes[0])/100;r&&r.isLive()?this.userSeek_(r.seekableStart()+r.liveWindow()*a):this.userSeek_(this.player_.duration()*a)}else De().isEventKey(e,"PgDn")?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-60)):De().isEventKey(e,"PgUp")?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+60)):s.prototype.handleKeyDown.call(this,e)},t.dispose=function(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in z()&&"visibilityState"in z()&&this.off(z(),"visibilitychange",this.toggleVisibility_),s.prototype.dispose.call(this)},n}(Ys);Xs.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},!Ht&&!Di&&Xs.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Y.registerComponent("SeekBar",Xs);var Cl=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).handleMouseMove=Ri(at(Ne(r),r.handleMouseMove),30),r.throttledHandleMouseSeek=Ri(at(Ne(r),r.handleMouseSeek),30),r.handleMouseUpHandler_=function(a){return r.handleMouseUp(a)},r.handleMouseDownHandler_=function(a){return r.handleMouseDown(a)},r.enable(),r}re(n,s);var t=n.prototype;return t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},t.handleMouseMove=function(e){var r=this.getChild("seekBar");if(r){var a=r.getChild("playProgressBar"),o=r.getChild("mouseTimeDisplay");if(a||o){var l=r.el(),d=gn(l),f=Jn(l,e).x;f=da(f,0,1),o&&o.update(d,f),a&&a.update(d,r.getProgress())}}},t.handleMouseSeek=function(e){var r=this.getChild("seekBar");r&&r.handleMouseMove(e)},t.enabled=function(){return this.enabled_},t.disable=function(){if(this.children().forEach(function(r){return r.disable&&r.disable()}),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,"mousemove",this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){var e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&yi(this.player_.play())}},t.enable=function(){this.children().forEach(function(e){return e.enable&&e.enable()}),!this.enabled()&&(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},t.removeListenersAddedOnMousedownAndTouchstart=function(){var e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)},t.handleMouseDown=function(e){var r=this.el_.ownerDocument,a=this.getChild("seekBar");a&&a.handleMouseDown(e),this.on(r,"mousemove",this.throttledHandleMouseSeek),this.on(r,"touchmove",this.throttledHandleMouseSeek),this.on(r,"mouseup",this.handleMouseUpHandler_),this.on(r,"touchend",this.handleMouseUpHandler_)},t.handleMouseUp=function(e){var r=this.getChild("seekBar");r&&r.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()},n}(Y);Cl.prototype.options_={children:["seekBar"]},Y.registerComponent("ProgressControl",Cl);var kl=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).on(i,["enterpictureinpicture","leavepictureinpicture"],function(a){return r.handlePictureInPictureChange(a)}),r.on(i,["disablepictureinpicturechanged","loadedmetadata"],function(a){return r.handlePictureInPictureEnabledChange(a)}),r.disable(),r}re(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-picture-in-picture-control "+s.prototype.buildCSSClass.call(this)},t.handlePictureInPictureEnabledChange=function(){z().pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()?this.enable():this.disable()},t.handlePictureInPictureChange=function(e){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture"),this.handlePictureInPictureEnabledChange()},t.handleClick=function(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},n}(hi);kl.prototype.controlText_="Picture-in-Picture",Y.registerComponent("PictureInPictureToggle",kl);var Al=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).on(i,"fullscreenchange",function(a){return r.handleFullscreenChange(a)}),!1===z()[i.fsApi_.fullscreenEnabled]&&r.disable(),r}re(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-fullscreen-control "+s.prototype.buildCSSClass.call(this)},t.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},t.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},n}(hi);Al.prototype.controlText_="Fullscreen",Y.registerComponent("FullscreenToggle",Al);var Pp=function(s){function n(){return s.apply(this,arguments)||this}return re(n,s),n.prototype.createEl=function(){var e=s.prototype.createEl.call(this,"div",{className:"vjs-volume-level"});return e.appendChild(s.prototype.createEl.call(this,"span",{className:"vjs-control-text"})),e},n}(Y);Y.registerComponent("VolumeLevel",Pp);var Op=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).update=Ri(at(Ne(r),r.update),30),r}re(n,s);var t=n.prototype;return t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})},t.update=function(e,r,a,o){if(!a){var l=Nr(this.el_),d=Nr(this.player_.el()),f=e.width*r;if(!d||!l)return;var v=e.left-d.left+f,g=e.width-f+(d.right-e.right),T=l.width/2;vl.width&&(T=l.width),this.el_.style.right="-"+T+"px"}this.write(o+"%")},t.write=function(e){nr(this.el_,e)},t.updateVolume=function(e,r,a,o,l){var d=this;this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",function(){d.update(e,r,a,o.toFixed(0)),l&&l()})},n}(Y);Y.registerComponent("VolumeLevelTooltip",Op);var wl=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).update=Ri(at(Ne(r),r.update),30),r}re(n,s);var t=n.prototype;return t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},t.update=function(e,r,a){var o=this,l=100*r;this.getChild("volumeLevelTooltip").updateVolume(e,r,a,l,function(){a?o.el_.style.bottom=e.height*r+"px":o.el_.style.left=e.width*r+"px"})},n}(Y);wl.prototype.options_={children:["volumeLevelTooltip"]},Y.registerComponent("MouseVolumeLevelDisplay",wl);var fa=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).on("slideractive",function(a){return r.updateLastVolume_(a)}),r.on(i,"volumechange",function(a){return r.updateARIAAttributes(a)}),i.ready(function(){return r.updateARIAAttributes()}),r}re(n,s);var t=n.prototype;return t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},t.handleMouseDown=function(e){!vn(e)||s.prototype.handleMouseDown.call(this,e)},t.handleMouseMove=function(e){var r=this.getChild("mouseVolumeLevelDisplay");if(r){var a=this.el(),o=Nr(a),l=this.vertical(),d=Jn(a,e);d=da(d=l?d.y:d.x,0,1),r.update(o,d,l)}!vn(e)||(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},t.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},t.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},t.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},t.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},t.updateARIAAttributes=function(e){var r=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",r),this.el_.setAttribute("aria-valuetext",r+"%")},t.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},t.updateLastVolume_=function(){var e=this,r=this.player_.volume();this.one("sliderinactive",function(){0===e.player_.volume()&&e.player_.lastVolume_(r)})},n}(Ys);fa.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},!Ht&&!Di&&fa.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),fa.prototype.playerEvent="volumechange",Y.registerComponent("VolumeBar",fa);var Il=function(s){function n(i,e){var r;return void 0===e&&(e={}),e.vertical=e.vertical||!1,(typeof e.volumeBar>"u"||cn(e.volumeBar))&&(e.volumeBar=e.volumeBar||{},e.volumeBar.vertical=e.vertical),function(n,t){t.tech_&&!t.tech_.featuresVolumeControl&&n.addClass("vjs-hidden"),n.on(t,"loadstart",function(){t.tech_.featuresVolumeControl?n.removeClass("vjs-hidden"):n.addClass("vjs-hidden")})}(Ne(r=s.call(this,i,e)||this),i),r.throttledHandleMouseMove=Ri(at(Ne(r),r.handleMouseMove),30),r.handleMouseUpHandler_=function(a){return r.handleMouseUp(a)},r.on("mousedown",function(a){return r.handleMouseDown(a)}),r.on("touchstart",function(a){return r.handleMouseDown(a)}),r.on("mousemove",function(a){return r.handleMouseMove(a)}),r.on(r.volumeBar,["focus","slideractive"],function(){r.volumeBar.addClass("vjs-slider-active"),r.addClass("vjs-slider-active"),r.trigger("slideractive")}),r.on(r.volumeBar,["blur","sliderinactive"],function(){r.volumeBar.removeClass("vjs-slider-active"),r.removeClass("vjs-slider-active"),r.trigger("sliderinactive")}),r}re(n,s);var t=n.prototype;return t.createEl=function(){var e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),s.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+e})},t.handleMouseDown=function(e){var r=this.el_.ownerDocument;this.on(r,"mousemove",this.throttledHandleMouseMove),this.on(r,"touchmove",this.throttledHandleMouseMove),this.on(r,"mouseup",this.handleMouseUpHandler_),this.on(r,"touchend",this.handleMouseUpHandler_)},t.handleMouseUp=function(e){var r=this.el_.ownerDocument;this.off(r,"mousemove",this.throttledHandleMouseMove),this.off(r,"touchmove",this.throttledHandleMouseMove),this.off(r,"mouseup",this.handleMouseUpHandler_),this.off(r,"touchend",this.handleMouseUpHandler_)},t.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},n}(Y);Il.prototype.options_={children:["volumeBar"]},Y.registerComponent("VolumeControl",Il);var Dl=function(s){function n(i,e){var r;return function(n,t){t.tech_&&!t.tech_.featuresMuteControl&&n.addClass("vjs-hidden"),n.on(t,"loadstart",function(){t.tech_.featuresMuteControl?n.removeClass("vjs-hidden"):n.addClass("vjs-hidden")})}(Ne(r=s.call(this,i,e)||this),i),r.on(i,["loadstart","volumechange"],function(a){return r.update(a)}),r}re(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-mute-control "+s.prototype.buildCSSClass.call(this)},t.handleClick=function(e){var r=this.player_.volume(),a=this.player_.lastVolume_();0===r?(this.player_.volume(a<.1?.1:a),this.player_.muted(!1)):this.player_.muted(!this.player_.muted())},t.update=function(e){this.updateIcon_(),this.updateControlText_()},t.updateIcon_=function(){var e=this.player_.volume(),r=3;Ht&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?r=0:e<.33?r=1:e<.67&&(r=2);for(var a=0;a<4;a++)mn(this.el_,"vjs-vol-"+a);Oi(this.el_,"vjs-vol-"+r)},t.updateControlText_=function(){var r=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==r&&this.controlText(r)},n}(hi);Dl.prototype.controlText_="Mute",Y.registerComponent("MuteToggle",Dl);var Pl=function(s){function n(i,e){var r;return void 0===e&&(e={}),e.inline=!(typeof e.inline<"u")||e.inline,(typeof e.volumeControl>"u"||cn(e.volumeControl))&&(e.volumeControl=e.volumeControl||{},e.volumeControl.vertical=!e.inline),(r=s.call(this,i,e)||this).handleKeyPressHandler_=function(a){return r.handleKeyPress(a)},r.on(i,["loadstart"],function(a){return r.volumePanelState_(a)}),r.on(r.muteToggle,"keyup",function(a){return r.handleKeyPress(a)}),r.on(r.volumeControl,"keyup",function(a){return r.handleVolumeControlKeyUp(a)}),r.on("keydown",function(a){return r.handleKeyPress(a)}),r.on("mouseover",function(a){return r.handleMouseOver(a)}),r.on("mouseout",function(a){return r.handleMouseOut(a)}),r.on(r.volumeControl,["slideractive"],r.sliderActive_),r.on(r.volumeControl,["sliderinactive"],r.sliderInactive_),r}re(n,s);var t=n.prototype;return t.sliderActive_=function(){this.addClass("vjs-slider-active")},t.sliderInactive_=function(){this.removeClass("vjs-slider-active")},t.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},t.createEl=function(){var e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),s.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+e})},t.dispose=function(){this.handleMouseOut(),s.prototype.dispose.call(this)},t.handleVolumeControlKeyUp=function(e){De().isEventKey(e,"Esc")&&this.muteToggle.focus()},t.handleMouseOver=function(e){this.addClass("vjs-hover"),Xt(z(),"keyup",this.handleKeyPressHandler_)},t.handleMouseOut=function(e){this.removeClass("vjs-hover"),Ut(z(),"keyup",this.handleKeyPressHandler_)},t.handleKeyPress=function(e){De().isEventKey(e,"Esc")&&this.handleMouseOut()},n}(Y);Pl.prototype.options_={children:["muteToggle","volumeControl"]},Y.registerComponent("VolumePanel",Pl);var Ol=function(s){function n(i,e){var r;return r=s.call(this,i,e)||this,e&&(r.menuButton_=e.menuButton),r.focusedChild_=-1,r.on("keydown",function(a){return r.handleKeyDown(a)}),r.boundHandleBlur_=function(a){return r.handleBlur(a)},r.boundHandleTapClick_=function(a){return r.handleTapClick(a)},r}re(n,s);var t=n.prototype;return t.addEventListenerForItem=function(e){e instanceof Y&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},t.removeEventListenerForItem=function(e){e instanceof Y&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))},t.removeChild=function(e){"string"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),s.prototype.removeChild.call(this,e)},t.addItem=function(e){var r=this.addChild(e);r&&this.addEventListenerForItem(r)},t.createEl=function(){this.contentEl_=Ye(this.options_.contentElType||"ul",{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var r=s.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return r.appendChild(this.contentEl_),Xt(r,"click",function(a){a.preventDefault(),a.stopImmediatePropagation()}),r},t.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,s.prototype.dispose.call(this)},t.handleBlur=function(e){var r=e.relatedTarget||z().activeElement;if(!this.children().some(function(o){return o.el()===r})){var a=this.menuButton_;a&&a.buttonPressed_&&r!==a.el().firstChild&&a.unpressButton()}},t.handleTapClick=function(e){if(this.menuButton_){this.menuButton_.unpressButton();var r=this.children();if(!Array.isArray(r))return;var a=r.filter(function(o){return o.el()===e.target})[0];if(!a)return;"CaptionSettingsMenuItem"!==a.name()&&this.menuButton_.focus()}},t.handleKeyDown=function(e){De().isEventKey(e,"Left")||De().isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(De().isEventKey(e,"Right")||De().isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())},t.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},t.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},t.focus=function(e){void 0===e&&(e=0);var r=this.children().slice();r.length&&r[0].hasClass("vjs-menu-title")&&r.shift(),r.length>0&&(e<0?e=0:e>=r.length&&(e=r.length-1),this.focusedChild_=e,r[e].el_.focus())},n}(Y);Y.registerComponent("Menu",Ol);var Js=function(s){function n(i,e){var r;void 0===e&&(e={}),(r=s.call(this,i,e)||this).menuButton_=new hi(i,e),r.menuButton_.controlText(r.controlText_),r.menuButton_.el_.setAttribute("aria-haspopup","true");var a=hi.prototype.buildCSSClass();r.menuButton_.el_.className=r.buildCSSClass()+" "+a,r.menuButton_.removeClass("vjs-control"),r.addChild(r.menuButton_),r.update(),r.enabled_=!0;var o=function(d){return r.handleClick(d)};return r.handleMenuKeyUp_=function(l){return r.handleMenuKeyUp(l)},r.on(r.menuButton_,"tap",o),r.on(r.menuButton_,"click",o),r.on(r.menuButton_,"keydown",function(l){return r.handleKeyDown(l)}),r.on(r.menuButton_,"mouseenter",function(){r.addClass("vjs-hover"),r.menu.show(),Xt(z(),"keyup",r.handleMenuKeyUp_)}),r.on("mouseleave",function(l){return r.handleMouseLeave(l)}),r.on("keydown",function(l){return r.handleSubmenuKeyDown(l)}),r}re(n,s);var t=n.prototype;return t.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},t.createMenu=function(){var e=new Ol(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var r=Ye("li",{className:"vjs-menu-title",textContent:bt(this.options_.title),tabIndex:-1}),a=new Y(this.player_,{el:r});e.addItem(a)}if(this.items=this.createItems(),this.items)for(var o=0;o-1&&"showing"===d.mode){a=!1;break}}a!==this.isSelected_&&this.selected(a)},t.handleSelectedLanguageChange=function(e){for(var r=this.player().textTracks(),a=!0,o=0,l=r.length;o-1&&"showing"===d.mode){a=!1;break}}a&&(this.player_.cache_.selectedLanguage={enabled:!1})},n}(xn);Y.registerComponent("OffTextTrackMenuItem",Ll);var Zr=function(s){function n(i,e){return void 0===e&&(e={}),e.tracks=i.textTracks(),s.call(this,i,e)||this}return re(n,s),n.prototype.createItems=function(e,r){var a;void 0===e&&(e=[]),void 0===r&&(r=xn),this.label_&&(a=this.label_+" off"),e.push(new Ll(this.player_,{kinds:this.kinds_,kind:this.kind_,label:a})),this.hideThreshold_+=1;var o=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var l=0;l-1){var f=new r(this.player_,{track:d,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});f.addClass("vjs-"+d.kind+"-menu-item"),e.push(f)}}return e},n}(eo);Y.registerComponent("TextTrackButton",Zr);var Rl=function(s){function n(i,e){var r,a=e.track,o=e.cue,l=i.currentTime();return e.selectable=!0,e.multiSelectable=!1,e.label=o.text,e.selected=o.startTime<=l&&l=0;r--){var a=e[r];if(a.kind===this.kind_)return a}},t.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(bt(this.kind_))},t.createMenu=function(){return this.options_.title=this.getMenuCaption(),s.prototype.createMenu.call(this)},t.createItems=function(){var e=[];if(!this.track_)return e;var r=this.track_.cues;if(!r)return e;for(var a=0,o=r.length;a-1&&(r.label_="captions"),r.menuButton_.controlText(bt(r.label_)),r}re(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-subs-caps-button "+s.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+s.prototype.buildWrapperCSSClass.call(this)},t.createItems=function(){var e=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(e.push(new no(this.player_,{kind:this.label_})),this.hideThreshold_+=1),s.prototype.createItems.call(this,e,Ml)},n}(Zr);so.prototype.kinds_=["captions","subtitles"],so.prototype.controlText_="Subtitles",Y.registerComponent("SubsCapsButton",so);var Ul=function(s){function n(i,e){var r,a=e.track,o=i.audioTracks();e.label=a.label||a.language||"Unknown",e.selected=a.enabled,(r=s.call(this,i,e)||this).track=a,r.addClass("vjs-"+a.kind+"-menu-item");var l=function(){for(var f=arguments.length,v=new Array(f),g=0;g=0;a--)r.push(new oo(this.player(),{rate:e[a]+"x"}));return r},t.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},t.handleClick=function(e){var r=this.player().playbackRate(),a=this.playbackRates(),l=(a.indexOf(r)+1)%a.length;this.player().playbackRate(a[l])},t.handlePlaybackRateschange=function(e){this.update()},t.playbackRates=function(){var e=this.player();return e.playbackRates&&e.playbackRates()||[]},t.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},t.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},t.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")},n}(Js);Fl.prototype.controlText_="Playback Rate",Y.registerComponent("PlaybackRateMenuButton",Fl);var Bl=function(s){function n(){return s.apply(this,arguments)||this}re(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-spacer "+s.prototype.buildCSSClass.call(this)},t.createEl=function(e,r,a){return void 0===e&&(e="div"),void 0===r&&(r={}),void 0===a&&(a={}),r.className||(r.className=this.buildCSSClass()),s.prototype.createEl.call(this,e,r,a)},n}(Y);Y.registerComponent("Spacer",Bl);var Mp=function(s){function n(){return s.apply(this,arguments)||this}re(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-custom-control-spacer "+s.prototype.buildCSSClass.call(this)},t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),textContent:"\xa0"})},n}(Bl);Y.registerComponent("CustomControlSpacer",Mp);var ha=function(s){function n(){return s.apply(this,arguments)||this}return re(n,s),n.prototype.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},n}(Y);ha.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture"in z()&&ha.prototype.options_.children.splice(ha.prototype.options_.children.length-1,0,"pictureInPictureToggle"),Y.registerComponent("ControlBar",ha);var jl=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).on(i,"error",function(a){return r.open(a)}),r}re(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-error-display "+s.prototype.buildCSSClass.call(this)},t.content=function(){var e=this.player().error();return e?this.localize(e.message):""},n}(jr);jl.prototype.options_=gt({},jr.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),Y.registerComponent("ErrorDisplay",jl);var uo="vjs-text-track-settings",Hl=["#000","Black"],Vl=["#00F","Blue"],ql=["#0FF","Cyan"],Wl=["#0F0","Green"],Gl=["#F0F","Magenta"],Zl=["#F00","Red"],Kl=["#FFF","White"],zl=["#FF0","Yellow"],lo=["1","Opaque"],co=["0.5","Semi-Transparent"],Yl=["0","Transparent"],dr={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Hl,Kl,Zl,Wl,Vl,zl,Gl,ql]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[lo,co,Yl]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Kl,Hl,Zl,Wl,Vl,zl,Gl,ql]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(n){return"1.00"===n?null:Number(n)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[lo,co]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[Yl,co,lo]}};function $l(s,n){if(n&&(s=n(s)),s&&"none"!==s)return s}dr.windowColor.options=dr.backgroundColor.options;var Fp=function(s){function n(i,e){var r;return e.temporary=!1,(r=s.call(this,i,e)||this).updateDisplay=r.updateDisplay.bind(Ne(r)),r.fill(),r.hasBeenOpened_=r.hasBeenFilled_=!0,r.endDialog=Ye("p",{className:"vjs-control-text",textContent:r.localize("End of dialog window.")}),r.el().appendChild(r.endDialog),r.setDefaults(),void 0===e.persistTextTrackSettings&&(r.options_.persistTextTrackSettings=r.options_.playerOptions.persistTextTrackSettings),r.on(r.$(".vjs-done-button"),"click",function(){r.saveSettings(),r.close()}),r.on(r.$(".vjs-default-button"),"click",function(){r.setDefaults(),r.updateDisplay()}),Or(dr,function(a){r.on(r.$(a.selector),"change",r.updateDisplay)}),r.options_.persistTextTrackSettings&&r.restoreSettings(),r}re(n,s);var t=n.prototype;return t.dispose=function(){this.endDialog=null,s.prototype.dispose.call(this)},t.createElSelect_=function(e,r,a){var o=this;void 0===r&&(r=""),void 0===a&&(a="label");var l=dr[e],d=l.id.replace("%s",this.id_),f=[r,d].join(" ").trim();return["<"+a+' id="'+d+'" class="'+("label"===a?"vjs-label":"")+'">',this.localize(l.label),"",'").join("")},t.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['
','',this.localize("Text"),"",this.createElSelect_("color",e),'',this.createElSelect_("textOpacity",e),"","
"].join("")},t.createElBgColor_=function(){var e="captions-background-"+this.id_;return['
','',this.localize("Background"),"",this.createElSelect_("backgroundColor",e),'',this.createElSelect_("backgroundOpacity",e),"","
"].join("")},t.createElWinColor_=function(){var e="captions-window-"+this.id_;return['
','',this.localize("Window"),"",this.createElSelect_("windowColor",e),'',this.createElSelect_("windowOpacity",e),"","
"].join("")},t.createElColors_=function(){return Ye("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},t.createElFont_=function(){return Ye("div",{className:"vjs-track-settings-font",innerHTML:['
',this.createElSelect_("fontPercent","","legend"),"
",'
',this.createElSelect_("edgeStyle","","legend"),"
",'
',this.createElSelect_("fontFamily","","legend"),"
"].join("")})},t.createElControls_=function(){var e=this.localize("restore all settings to the default values");return Ye("div",{className:"vjs-track-settings-controls",innerHTML:['",'"].join("")})},t.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},t.label=function(){return this.localize("Caption Settings Dialog")},t.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},t.buildCSSClass=function(){return s.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},t.getValues=function(){var e=this;return function kh(s,n,t){return void 0===t&&(t=0),ku(s).reduce(function(i,e){return n(i,s[e],e)},t)}(dr,function(r,a,o){var l=function Up(s,n){return $l(s.options[s.options.selectedIndex].value,n)}(e.$(a.selector),a.parser);return void 0!==l&&(r[o]=l),r},{})},t.setValues=function(e){var r=this;Or(dr,function(a,o){!function Np(s,n,t){if(n)for(var i=0;ithis.options_.liveTolerance;(!this.timeupdateSeen_||o===1/0)&&(d=!1),d!==this.behindLiveEdge_&&(this.behindLiveEdge_=d,this.trigger("liveedgechange"))}},t.handleDurationchange=function(){this.toggleTracking()},t.toggleTracking=function(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())},t.startTracking=function(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,30),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))},t.handleFirstTimeupdate=function(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)},t.handleSeeked=function(){var e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()},t.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)},t.reset_=function(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)},t.nextSeekedFromUser=function(){this.nextSeekedFromUser_=!0},t.stopTracking=function(){!this.isTracking()||(this.reset_(),this.trigger("liveedgechange"))},t.seekableEnd=function(){for(var e=this.player_.seekable(),r=[],a=e?e.length:0;a--;)r.push(e.end(a));return r.length?r.sort()[r.length-1]:1/0},t.seekableStart=function(){for(var e=this.player_.seekable(),r=[],a=e?e.length:0;a--;)r.push(e.start(a));return r.length?r.sort()[0]:0},t.liveWindow=function(){var e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()},t.isLive=function(){return this.isTracking()},t.atLiveEdge=function(){return!this.behindLiveEdge()},t.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},t.pastSeekEnd=function(){var e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_},t.behindLiveEdge=function(){return this.behindLiveEdge_},t.isTracking=function(){return"number"==typeof this.trackingInterval_},t.seekToLiveEdge=function(){this.seekedBehindLive_=!1,!this.atLiveEdge()&&(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))},t.dispose=function(){this.off(z(),"visibilitychange",this.handleVisibilityChange_),this.stopTracking(),s.prototype.dispose.call(this)},n}(Y);Y.registerComponent("LiveTracker",Hp);var pa,fo=function(n){var t=n.el();if(t.hasAttribute("src"))return n.triggerSourceset(t.src),!0;var i=n.$$("source"),e=[],r="";if(!i.length)return!1;for(var a=0;a=2&&l.push("loadeddata"),e.readyState>=3&&l.push("canplay"),e.readyState>=4&&l.push("canplaythrough"),this.ready(function(){l.forEach(function(d){this.trigger(d)},this)})}},t.setScrubbing=function(e){this.isScrubbing_=e},t.scrubbing=function(){return this.isScrubbing_},t.setCurrentTime=function(e){try{this.isScrubbing_&&this.el_.fastSeek&&Qn?this.el_.fastSeek(e):this.el_.currentTime=e}catch(r){Ke(r,"Video is not ready. (Video.js)")}},t.duration=function(){var e=this;return this.el_.duration===1/0&&Di&&Pi&&0===this.el_.currentTime?(this.on("timeupdate",function a(){e.el_.currentTime>0&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",a))}),NaN):this.el_.duration||NaN},t.width=function(){return this.el_.offsetWidth},t.height=function(){return this.el_.offsetHeight},t.proxyWebkitFullscreen_=function(){var e=this;if("webkitDisplayingFullscreen"in this.el_){var r=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},a=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",r),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",a),this.on("dispose",function(){e.off("webkitbeginfullscreen",a),e.off("webkitendfullscreen",r)})}},t.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var e=P().navigator&&P().navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},t.enterFullScreen=function(){var e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)yi(this.el_.play()),this.setTimeout(function(){e.pause();try{e.webkitEnterFullScreen()}catch(r){this.trigger("fullscreenerror",r)}},0);else try{e.webkitEnterFullScreen()}catch(r){this.trigger("fullscreenerror",r)}},t.exitFullScreen=function(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))},t.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()},t.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},t.reset=function(){n.resetMediaElement(this.el_)},t.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},t.setControls=function(e){this.el_.controls=!!e},t.addTextTrack=function(e,r,a){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,r,a):s.prototype.addTextTrack.call(this,e,r,a)},t.createRemoteTextTrack=function(e){if(!this.featuresNativeTextTracks)return s.prototype.createRemoteTextTrack.call(this,e);var r=z().createElement("track");return e.kind&&(r.kind=e.kind),e.label&&(r.label=e.label),(e.language||e.srclang)&&(r.srclang=e.language||e.srclang),e.default&&(r.default=e.default),e.id&&(r.id=e.id),e.src&&(r.src=e.src),r},t.addRemoteTextTrack=function(e,r){var a=s.prototype.addRemoteTextTrack.call(this,e,r);return this.featuresNativeTextTracks&&this.el().appendChild(a),a},t.removeRemoteTextTrack=function(e){if(s.prototype.removeRemoteTextTrack.call(this,e),this.featuresNativeTextTracks)for(var r=this.$$("track"),a=r.length;a--;)(e===r[a]||e===r[a].track)&&this.el().removeChild(r[a])},t.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var e={};return typeof this.el().webkitDroppedFrameCount<"u"&&typeof this.el().webkitDecodedFrameCount<"u"&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),P().performance&&"function"==typeof P().performance.now?e.creationTime=P().performance.now():P().performance&&P().performance.timing&&"number"==typeof P().performance.timing.navigationStart&&(e.creationTime=P().Date.now()-P().performance.timing.navigationStart),e},n}(st);ho(be,"TEST_VID",function(){if(Rr()){var s=z().createElement("video"),n=z().createElement("track");return n.kind="captions",n.srclang="en",n.label="English",s.appendChild(n),s}}),be.isSupported=function(){try{be.TEST_VID.volume=.5}catch{return!1}return!(!be.TEST_VID||!be.TEST_VID.canPlayType)},be.canPlayType=function(s){return be.TEST_VID.canPlayType(s)},be.canPlaySource=function(s,n){return be.canPlayType(s.type)},be.canControlVolume=function(){try{var s=be.TEST_VID.volume;be.TEST_VID.volume=s/2+.1;var n=s!==be.TEST_VID.volume;return n&&Ht?(P().setTimeout(function(){be&&be.prototype&&(be.prototype.featuresVolumeControl=s!==be.TEST_VID.volume)}),!1):n}catch{return!1}},be.canMuteVolume=function(){try{var s=be.TEST_VID.muted;return be.TEST_VID.muted=!s,be.TEST_VID.muted?Ur(be.TEST_VID,"muted","muted"):Xn(be.TEST_VID,"muted"),s!==be.TEST_VID.muted}catch{return!1}},be.canControlPlaybackRate=function(){if(Di&&Pi&&Pu<58)return!1;try{var s=be.TEST_VID.playbackRate;return be.TEST_VID.playbackRate=s/2+.1,s!==be.TEST_VID.playbackRate}catch{return!1}},be.canOverrideAttributes=function(){try{var s=function(){};Object.defineProperty(z().createElement("video"),"src",{get:s,set:s}),Object.defineProperty(z().createElement("audio"),"src",{get:s,set:s}),Object.defineProperty(z().createElement("video"),"innerHTML",{get:s,set:s}),Object.defineProperty(z().createElement("audio"),"innerHTML",{get:s,set:s})}catch{return!1}return!0},be.supportsNativeTextTracks=function(){return Qn||Ht&&Pi},be.supportsNativeVideoTracks=function(){return!(!be.TEST_VID||!be.TEST_VID.videoTracks)},be.supportsNativeAudioTracks=function(){return!(!be.TEST_VID||!be.TEST_VID.audioTracks)},be.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach(function(s){var t=s[1];ho(be.prototype,s[0],function(){return be[t]()},!0)}),be.prototype.featuresVolumeControl=be.canControlVolume(),be.prototype.movingMediaElementInDOM=!Ht,be.prototype.featuresFullscreenResize=!0,be.prototype.featuresProgressEvents=!0,be.prototype.featuresTimeupdateEvents=!0,be.patchCanPlayType=function(){_s>=4&&!Du&&!Pi&&(pa=be.TEST_VID&&be.TEST_VID.constructor.prototype.canPlayType,be.TEST_VID.constructor.prototype.canPlayType=function(s){return s&&/^application\/(?:x-|vnd\.apple\.)mpegurl/i.test(s)?"maybe":pa.call(this,s)})},be.unpatchCanPlayType=function(){var s=be.TEST_VID.constructor.prototype.canPlayType;return pa&&(be.TEST_VID.constructor.prototype.canPlayType=pa),s},be.patchCanPlayType(),be.disposeMediaElement=function(s){if(s){for(s.parentNode&&s.parentNode.removeChild(s);s.hasChildNodes();)s.removeChild(s.firstChild);s.removeAttribute("src"),"function"==typeof s.load&&function(){try{s.load()}catch{}}()}},be.resetMediaElement=function(s){if(s){for(var n=s.querySelectorAll("source"),t=n.length;t--;)s.removeChild(n[t]);s.removeAttribute("src"),"function"==typeof s.load&&function(){try{s.load()}catch{}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(s){be.prototype[s]=function(){return this.el_[s]||this.el_.hasAttribute(s)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(s){be.prototype["set"+bt(s)]=function(n){this.el_[s]=n,n?this.el_.setAttribute(s,s):this.el_.removeAttribute(s)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach(function(s){be.prototype[s]=function(){return this.el_[s]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(s){be.prototype["set"+bt(s)]=function(n){this.el_[s]=n}}),["pause","load","play"].forEach(function(s){be.prototype[s]=function(){return this.el_[s]()}}),st.withSourceHandlers(be),be.nativeSourceHandler={},be.nativeSourceHandler.canPlayType=function(s){try{return be.TEST_VID.canPlayType(s)}catch{return""}},be.nativeSourceHandler.canHandleSource=function(s,n){if(s.type)return be.nativeSourceHandler.canPlayType(s.type);if(s.src){var t=js(s.src);return be.nativeSourceHandler.canPlayType("video/"+t)}return""},be.nativeSourceHandler.handleSource=function(s,n,t){n.setSrc(s.src)},be.nativeSourceHandler.dispose=function(){},be.registerSourceHandler(be.nativeSourceHandler),st.registerTech("Html5",be);var Jl=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],po={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},mo=["tiny","xsmall","small","medium","large","xlarge","huge"],ma={};mo.forEach(function(s){var n="x"===s.charAt(0)?"x-"+s.substring(1):s;ma[s]="vjs-layout-"+n});var Kp={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},Et=function(s){function n(i,e,r){var a;if(i.id=i.id||e.id||"vjs_video_"+Zi(),(e=_t(n.getTagSettings(i),e)).initChildren=!1,e.createEl=!1,e.evented=!1,e.reportTouchActivity=!1,!e.language)if("function"==typeof i.closest){var o=i.closest("[lang]");o&&o.getAttribute&&(e.language=o.getAttribute("lang"))}else for(var l=i;l&&1===l.nodeType;){if(Li(l).hasOwnProperty("lang")){e.language=l.getAttribute("lang");break}l=l.parentNode}if((a=s.call(this,null,e,r)||this).boundDocumentFullscreenChange_=function(g){return a.documentFullscreenChange_(g)},a.boundFullWindowOnEscKey_=function(g){return a.fullWindowOnEscKey(g)},a.boundUpdateStyleEl_=function(g){return a.updateStyleEl_(g)},a.boundApplyInitTime_=function(g){return a.applyInitTime_(g)},a.boundUpdateCurrentBreakpoint_=function(g){return a.updateCurrentBreakpoint_(g)},a.boundHandleTechClick_=function(g){return a.handleTechClick_(g)},a.boundHandleTechDoubleClick_=function(g){return a.handleTechDoubleClick_(g)},a.boundHandleTechTouchStart_=function(g){return a.handleTechTouchStart_(g)},a.boundHandleTechTouchMove_=function(g){return a.handleTechTouchMove_(g)},a.boundHandleTechTouchEnd_=function(g){return a.handleTechTouchEnd_(g)},a.boundHandleTechTap_=function(g){return a.handleTechTap_(g)},a.isFullscreen_=!1,a.log=Cu(a.id_),a.fsApi_=Kn,a.isPosterFromTech_=!1,a.queuedCallbacks_=[],a.isReady_=!1,a.hasStarted_=!1,a.userActive_=!1,a.debugEnabled_=!1,!a.options_||!a.options_.techOrder||!a.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(a.tag=i,a.tagAttributes=i&&Li(i),a.language(a.options_.language),e.languages){var d={};Object.getOwnPropertyNames(e.languages).forEach(function(g){d[g.toLowerCase()]=e.languages[g]}),a.languages_=d}else a.languages_=n.prototype.options_.languages;a.resetCache_(),a.poster_=e.poster||"",a.controls_=!!e.controls,i.controls=!1,i.removeAttribute("controls"),a.changingSrc_=!1,a.playCallbacks_=[],a.playTerminatedQueue_=[],i.hasAttribute("autoplay")?a.autoplay(!0):a.autoplay(a.options_.autoplay),e.plugins&&Object.keys(e.plugins).forEach(function(g){if("function"!=typeof a[g])throw new Error('plugin "'+g+'" does not exist')}),a.scrubbing_=!1,a.el_=a.createEl(),Ps(Ne(a),{eventBusKey:"el_"}),a.fsApi_.requestFullscreen&&(Xt(z(),a.fsApi_.fullscreenchange,a.boundDocumentFullscreenChange_),a.on(a.fsApi_.fullscreenchange,a.boundDocumentFullscreenChange_)),a.fluid_&&a.on(["playerreset","resize"],a.boundUpdateStyleEl_);var f=ct(a.options_);e.plugins&&Object.keys(e.plugins).forEach(function(g){a[g](e.plugins[g])}),e.debug&&a.debug(!0),a.options_.playerOptions=f,a.middleware_=[],a.playbackRates(e.playbackRates),a.initChildren(),a.isAudio("audio"===i.nodeName.toLowerCase()),a.controls()?a.addClass("vjs-controls-enabled"):a.addClass("vjs-controls-disabled"),a.el_.setAttribute("role","region"),a.isAudio()?a.el_.setAttribute("aria-label",a.localize("Audio Player")):a.el_.setAttribute("aria-label",a.localize("Video Player")),a.isAudio()&&a.addClass("vjs-audio"),a.flexNotSupported_()&&a.addClass("vjs-no-flex"),Lr&&a.addClass("vjs-touch-enabled"),Ht||a.addClass("vjs-workinghover"),n.players[a.id_]=Ne(a);var v="7.18.1".split(".")[0];return a.addClass("vjs-v"+v),a.userActive(!0),a.reportUserActivity(),a.one("play",function(g){return a.listenForUserActivity_(g)}),a.on("stageclick",function(g){return a.handleStageClick_(g)}),a.on("keydown",function(g){return a.handleKeyDown(g)}),a.on("languagechange",function(g){return a.handleLanguagechange(g)}),a.breakpoints(a.options_.breakpoints),a.responsive(a.options_.responsive),a}re(n,s);var t=n.prototype;return t.dispose=function(){var e=this;this.trigger("dispose"),this.off("dispose"),Ut(z(),this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),Ut(z(),"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),n.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),function hp(s){Hs[s.id()]=null}(this),Wt.names.forEach(function(r){var o=e[Wt[r].getterName]();o&&o.off&&o.off()}),s.prototype.dispose.call(this)},t.createEl=function(){var r,e=this.tag,a=this.playerElIngest_=e.parentNode&&e.parentNode.hasAttribute&&e.parentNode.hasAttribute("data-vjs-player"),o="video-js"===this.tag.tagName.toLowerCase();a?r=this.el_=e.parentNode:o||(r=this.el_=s.prototype.createEl.call(this,"div"));var l=Li(e);if(o){for(r=this.el_=e,e=this.tag=z().createElement("video");r.children.length;)e.appendChild(r.firstChild);ar(r,"video-js")||Oi(r,"video-js"),r.appendChild(e),a=this.playerElIngest_=r,Object.keys(r).forEach(function(E){try{e[E]=r[E]}catch{}})}if(e.setAttribute("tabindex","-1"),l.tabindex="-1",(pn||Pi&&Ou)&&(e.setAttribute("role","application"),l.role="application"),e.removeAttribute("width"),e.removeAttribute("height"),"width"in l&&delete l.width,"height"in l&&delete l.height,Object.getOwnPropertyNames(l).forEach(function(E){o&&"class"===E||r.setAttribute(E,l[E]),o&&e.setAttribute(E,l[E])}),e.playerId=e.id,e.id+="_html5_api",e.className="vjs-tech",e.player=r.player=this,this.addClass("vjs-paused"),!0!==P().VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=zu("vjs-styles-dimensions");var d=Gi(".vjs-styles-defaults"),f=Gi("head");f.insertBefore(this.styleEl_,d?d.nextSibling:f.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);for(var v=e.getElementsByTagName("a"),g=0;g0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),g=v[1]/v[0];o=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/g:this.videoWidth()||300,l=void 0!==this.height_?this.height_:o*g,f=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(f),Yu(this.styleEl_,"\n ."+f+" {\n width: "+o+"px;\n height: "+l+"px;\n }\n\n ."+f+".vjs-fluid {\n padding-top: "+100*g+"%;\n }\n ")}else{var e="number"==typeof this.width_?this.width_:this.options_.width,r="number"==typeof this.height_?this.height_:this.options_.height,a=this.tech_&&this.tech_.el();a&&(e>=0&&(a.width=e),r>=0&&(a.height=r))}},t.loadTech_=function(e,r){var a=this;this.tech_&&this.unloadTech_();var o=bt(e),l=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==o&&this.tag&&(st.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=o,this.isReady_=!1;var d=this.autoplay();("string"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(d=!1);var f={source:r,autoplay:d,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+l+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset,Promise:this.options_.Promise};Wt.names.forEach(function(g){var T=Wt[g];f[T.getterName]=a[T.privateName]}),_t(f,this.options_[o]),_t(f,this.options_[l]),_t(f,this.options_[e.toLowerCase()]),this.tag&&(f.tag=this.tag),r&&r.src===this.cache_.src&&this.cache_.currentTime>0&&(f.startTime=this.cache_.currentTime);var v=st.getTech(e);if(!v)throw new Error("No Tech named '"+o+"' exists! '"+o+"' should be registered using videojs.registerTech()'");this.tech_=new v(f),this.tech_.ready(at(this,this.handleTechReady_),!0),function(n,t){n.forEach(function(i){var e=t.addRemoteTextTrack(i).track;!i.src&&i.cues&&i.cues.forEach(function(r){return e.addCue(r)})}),t.textTracks()}(this.textTracksJson_||[],this.tech_),Jl.forEach(function(g){a.on(a.tech_,g,function(T){return a["handleTech"+bt(g)+"_"](T)})}),Object.keys(po).forEach(function(g){a.on(a.tech_,g,function(T){0===a.tech_.playbackRate()&&a.tech_.seeking()?a.queuedCallbacks_.push({callback:a["handleTech"+po[g]+"_"].bind(a),event:T}):a["handleTech"+po[g]+"_"](T)})}),this.on(this.tech_,"loadstart",function(g){return a.handleTechLoadStart_(g)}),this.on(this.tech_,"sourceset",function(g){return a.handleTechSourceset_(g)}),this.on(this.tech_,"waiting",function(g){return a.handleTechWaiting_(g)}),this.on(this.tech_,"ended",function(g){return a.handleTechEnded_(g)}),this.on(this.tech_,"seeking",function(g){return a.handleTechSeeking_(g)}),this.on(this.tech_,"play",function(g){return a.handleTechPlay_(g)}),this.on(this.tech_,"firstplay",function(g){return a.handleTechFirstPlay_(g)}),this.on(this.tech_,"pause",function(g){return a.handleTechPause_(g)}),this.on(this.tech_,"durationchange",function(g){return a.handleTechDurationChange_(g)}),this.on(this.tech_,"fullscreenchange",function(g,T){return a.handleTechFullscreenChange_(g,T)}),this.on(this.tech_,"fullscreenerror",function(g,T){return a.handleTechFullscreenError_(g,T)}),this.on(this.tech_,"enterpictureinpicture",function(g){return a.handleTechEnterPictureInPicture_(g)}),this.on(this.tech_,"leavepictureinpicture",function(g){return a.handleTechLeavePictureInPicture_(g)}),this.on(this.tech_,"error",function(g){return a.handleTechError_(g)}),this.on(this.tech_,"posterchange",function(g){return a.handleTechPosterChange_(g)}),this.on(this.tech_,"textdata",function(g){return a.handleTechTextData_(g)}),this.on(this.tech_,"ratechange",function(g){return a.handleTechRateChange_(g)}),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode!==this.el()&&("Html5"!==o||!this.tag)&&xs(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},t.unloadTech_=function(){var e=this;Wt.names.forEach(function(r){var a=Wt[r];e[a.privateName]=e[a.getterName]()}),this.textTracksJson_=function(n){var t=n.$$("track"),i=Array.prototype.map.call(t,function(r){return r.track});return Array.prototype.map.call(t,function(r){var a=Rs(r.track);return r.src&&(a.src=r.src),a}).concat(Array.prototype.filter.call(n.textTracks(),function(r){return-1===i.indexOf(r)}).map(Rs))}(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},t.tech=function(e){return void 0===e&&Ke.warn("Using the tech directly can be dangerous. I hope you know what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"),this.tech_},t.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)},t.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)},t.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},t.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?"play":this.autoplay())},t.manualAutoplay_=function(e){var r=this;if(this.tech_&&"string"==typeof e){var o,a=function(){var d=r.muted();r.muted(!0);var f=function(){r.muted(d)};r.playTerminatedQueue_.push(f);var v=r.play();if(yn(v))return v.catch(function(g){throw f(),new Error("Rejection at manualAutoplay. Restoring muted value. "+(g||""))})};if("any"!==e||this.muted()?o="muted"!==e||this.muted()?this.play():a():yn(o=this.play())&&(o=o.catch(a)),yn(o))return o.then(function(){r.trigger({type:"autoplay-success",autoplay:e})}).catch(function(){r.trigger({type:"autoplay-failure",autoplay:e})})}},t.updateSourceCaches_=function(e){void 0===e&&(e="");var r=e,a="";"string"!=typeof r&&(r=e.src,a=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],r&&!a&&(a=function(n,t){if(!t)return"";if(n.cache_.source.src===t&&n.cache_.source.type)return n.cache_.source.type;var i=n.cache_.sources.filter(function(o){return o.src===t});if(i.length)return i[0].type;for(var e=n.$$("source"),r=0;r0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach(function(e){return e.callback(e.event)}),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},t.handleTechWaiting_=function(){var e=this;this.addClass("vjs-waiting"),this.trigger("waiting");var r=this.currentTime();this.on("timeupdate",function o(){r!==e.currentTime()&&(e.removeClass("vjs-waiting"),e.off("timeupdate",o))})},t.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},t.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},t.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},t.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},t.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.removeClass("vjs-ended"),this.trigger("seeked")},t.handleTechFirstPlay_=function(){this.options_.starttime&&(Ke.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},t.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},t.handleTechEnded_=function(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},t.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},t.handleTechClick_=function(e){!this.controls_||(void 0===this.options_||void 0===this.options_.userActions||void 0===this.options_.userActions.click||!1!==this.options_.userActions.click)&&(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?yi(this.play()):this.pause())},t.handleTechDoubleClick_=function(e){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),function(a){return a.contains(e.target)})||(void 0===this.options_||void 0===this.options_.userActions||void 0===this.options_.userActions.doubleClick||!1!==this.options_.userActions.doubleClick)&&(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))},t.handleTechTap_=function(){this.userActive(!this.userActive())},t.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},t.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},t.handleTechTouchEnd_=function(e){e.cancelable&&e.preventDefault()},t.handleStageClick_=function(){this.reportUserActivity()},t.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},t.documentFullscreenChange_=function(e){var r=e.target.player;if(!r||r===this){var a=this.el(),o=z()[this.fsApi_.fullscreenElement]===a;!o&&a.matches?o=a.matches(":"+this.fsApi_.fullscreen):!o&&a.msMatchesSelector&&(o=a.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(o)}},t.handleTechFullscreenChange_=function(e,r){var a=this;r&&(r.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",function(){a.removeClass("vjs-ios-native-fs")})),this.isFullscreen(r.isFullscreen))},t.handleTechFullscreenError_=function(e,r){this.trigger("fullscreenerror",r)},t.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},t.handleTechEnterPictureInPicture_=function(e){this.isInPictureInPicture(!0)},t.handleTechLeavePictureInPicture_=function(e){this.isInPictureInPicture(!1)},t.handleTechError_=function(){var e=this.tech_.error();this.error(e)},t.handleTechTextData_=function(){var e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},t.getCache=function(){return this.cache_},t.resetCache_=function(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}},t.techCall_=function(e,r){this.ready(function(){if(e in cp)return function lp(s,n,t,i){return n[t](s.reduce(Vs(t),i))}(this.middleware_,this.tech_,e,r);if(e in gl)return ml(this.middleware_,this.tech_,e,r);try{this.tech_&&this.tech_[e](r)}catch(a){throw Ke(a),a}},!0)},t.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in dp)return function up(s,n,t){return s.reduceRight(Vs(t),n[t]())}(this.middleware_,this.tech_,e);if(e in gl)return ml(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(r){throw void 0===this.tech_[e]?(Ke("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",r),r):"TypeError"===r.name?(Ke("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",r),this.tech_.isReady_=!1,r):(Ke(r),r)}}},t.play=function(){var e=this,r=this.options_.Promise||P().Promise;return r?new r(function(a){e.play_(a)}):this.play_()},t.play_=function(e){var r=this;void 0===e&&(e=yi),this.playCallbacks_.push(e);var a=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc()));if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!a)return this.waitToPlay_=function(l){r.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(!a&&(Qn||Ht)&&this.load());var o=this.techGet_("play");null===o?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(o)},t.runPlayTerminatedQueue_=function(){var e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(r){r()})},t.runPlayCallbacks_=function(e){var r=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],r.forEach(function(a){a(e)})},t.pause=function(){this.techCall_("pause")},t.paused=function(){return!1!==this.techGet_("paused")},t.played=function(){return this.techGet_("played")||or(0,0)},t.scrubbing=function(e){if(typeof e>"u")return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},t.currentTime=function(e){return typeof e<"u"?(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",e),void(this.cache_.initTime=0)):(this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),void this.one("canplay",this.boundApplyInitTime_))):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},t.applyInitTime_=function(){this.currentTime(this.cache_.initTime)},t.duration=function(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))},t.remainingTime=function(){return this.duration()-this.currentTime()},t.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},t.buffered=function(){var e=this.techGet_("buffered");return(!e||!e.length)&&(e=or(0,0)),e},t.bufferedPercent=function(){return rl(this.buffered(),this.duration())},t.bufferedEnd=function(){var e=this.buffered(),r=this.duration(),a=e.end(e.length-1);return a>r&&(a=r),a},t.volume=function(e){var r;return void 0!==e?(r=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=r,this.techCall_("setVolume",r),void(r>0&&this.lastVolume_(r))):(r=parseFloat(this.techGet_("volume")),isNaN(r)?1:r)},t.muted=function(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)},t.defaultMuted=function(e){return void 0!==e?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},t.lastVolume_=function(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e},t.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},t.isFullscreen=function(e){if(void 0!==e){var r=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==r&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),void this.toggleFullscreenClass_()}return this.isFullscreen_},t.requestFullscreen=function(e){var r=this.options_.Promise||P().Promise;if(r){var a=this;return new r(function(o,l){function d(){a.off("fullscreenerror",v),a.off("fullscreenchange",f)}function f(){d(),o()}function v(T,E){d(),l(E)}a.one("fullscreenchange",f),a.one("fullscreenerror",v);var g=a.requestFullscreenHelper_(e);g&&(g.then(d,d),g.then(o,l))})}return this.requestFullscreenHelper_()},t.requestFullscreenHelper_=function(e){var a,r=this;if(this.fsApi_.prefixed||(a=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(a=e)),this.fsApi_.requestFullscreen){var o=this.el_[this.fsApi_.requestFullscreen](a);return o&&o.then(function(){return r.isFullscreen(!0)},function(){return r.isFullscreen(!1)}),o}this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()},t.exitFullscreen=function(){var e=this.options_.Promise||P().Promise;if(e){var r=this;return new e(function(a,o){function l(){r.off("fullscreenerror",f),r.off("fullscreenchange",d)}function d(){l(),a()}function f(g,T){l(),o(T)}r.one("fullscreenchange",d),r.one("fullscreenerror",f);var v=r.exitFullscreenHelper_();v&&(v.then(l,l),v.then(a,o))})}return this.exitFullscreenHelper_()},t.exitFullscreenHelper_=function(){var e=this;if(this.fsApi_.requestFullscreen){var r=z()[this.fsApi_.exitFullscreen]();return r&&yi(r.then(function(){return e.isFullscreen(!1)})),r}this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()},t.enterFullWindow=function(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=z().documentElement.style.overflow,Xt(z(),"keydown",this.boundFullWindowOnEscKey_),z().documentElement.style.overflow="hidden",Oi(z().body,"vjs-full-window"),this.trigger("enterFullWindow")},t.fullWindowOnEscKey=function(e){De().isEventKey(e,"Esc")&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())},t.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,Ut(z(),"keydown",this.boundFullWindowOnEscKey_),z().documentElement.style.overflow=this.docOrigOverflow,mn(z().body,"vjs-full-window"),this.trigger("exitFullWindow")},t.disablePictureInPicture=function(e){if(void 0===e)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")},t.isInPictureInPicture=function(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_},t.requestPictureInPicture=function(){if("pictureInPictureEnabled"in z()&&!1===this.disablePictureInPicture())return this.techGet_("requestPictureInPicture")},t.exitPictureInPicture=function(){if("pictureInPictureEnabled"in z())return z().exitPictureInPicture()},t.handleKeyDown=function(e){var l,d,r=this.options_.userActions;r&&r.hotkeys&&(d=(l=this.el_.ownerDocument.activeElement).tagName.toLowerCase(),l.isContentEditable||("input"===d?-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(l.type):-1!==["textarea"].indexOf(d))||("function"==typeof r.hotkeys?r.hotkeys.call(this,e):this.handleHotkeys(e)))},t.handleHotkeys=function(e){var r=this.options_.userActions?this.options_.userActions.hotkeys:{},a=r.fullscreenKey,l=r.muteKey,d=void 0===l?function(x){return De().isEventKey(x,"m")}:l,f=r.playPauseKey,v=void 0===f?function(x){return De().isEventKey(x,"k")||De().isEventKey(x,"Space")}:f;if((void 0===a?function(x){return De().isEventKey(x,"f")}:a).call(this,e)){e.preventDefault(),e.stopPropagation();var g=Y.getComponent("FullscreenToggle");!1!==z()[this.fsApi_.fullscreenEnabled]&&g.prototype.handleClick.call(this,e)}else d.call(this,e)?(e.preventDefault(),e.stopPropagation(),Y.getComponent("MuteToggle").prototype.handleClick.call(this,e)):v.call(this,e)&&(e.preventDefault(),e.stopPropagation(),Y.getComponent("PlayToggle").prototype.handleClick.call(this,e))},t.canPlayType=function(e){for(var r,a=0,o=this.options_.techOrder;a"u")return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();var o=vp(e);if(o.length){if(this.changingSrc_=!0,r||(this.cache_.sources=o),this.updateSourceCaches_(o[0]),sp(this,o[0],function(f,v){if(a.middleware_=v,r||(a.cache_.sources=o),a.updateSourceCaches_(f),a.src_(f))return o.length>1?a.handleSrc_(o.slice(1)):(a.changingSrc_=!1,a.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0),void a.triggerReady());!function op(s,n){s.forEach(function(t){return t.setTech&&t.setTech(n)})}(v,a.tech_)}),this.options_.retryOnError&&o.length>1){var l=function(){a.error(null),a.handleSrc_(o.slice(1),!0)},d=function(){a.off("error",l)};this.one("error",l),this.one("playing",d),this.resetRetryOnError_=function(){a.off("error",l),a.off("playing",d)}}}else this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0)},t.src=function(e){return this.handleSrc_(e,!1)},t.src_=function(e){var r=this,a=this.selectSource([e]);return!a||(function(n,t){return bt(n)===bt(t)}(a.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1},!0),!1):(this.changingSrc_=!0,this.loadTech_(a.tech,a.source),this.tech_.ready(function(){r.changingSrc_=!1}),!1))},t.load=function(){this.techCall_("load")},t.reset=function(){var e=this,r=this.options_.Promise||P().Promise;this.paused()||!r?this.doReset_():yi(this.play().then(function(){return e.doReset_()}))},t.doReset_=function(){this.tech_&&this.tech_.clearTracks("text"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),Mi(this)&&this.trigger("playerreset")},t.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},t.resetProgressBar_=function(){this.currentTime(0);var e=this.controlBar,r=e.durationDisplay,a=e.remainingTimeDisplay;r&&r.updateContent(),a&&a.updateContent()},t.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()},t.resetVolumeBar_=function(){this.volume(1),this.trigger("volumechange")},t.currentSources=function(){var e=this.currentSource(),r=[];return 0!==Object.keys(e).length&&r.push(e),this.cache_.sources||r},t.currentSource=function(){return this.cache_.source||{}},t.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},t.currentType=function(){return this.currentSource()&&this.currentSource().type||""},t.preload=function(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},t.autoplay=function(e){if(void 0===e)return this.options_.autoplay||!1;var r;"string"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_("string"==typeof e?e:"play"),r=!1):this.options_.autoplay=!!e,r=typeof r>"u"?this.options_.autoplay:r,this.tech_&&this.techCall_("setAutoplay",r)},t.playsinline=function(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},t.loop=function(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},t.poster=function(e){if(void 0===e)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))},t.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},t.controls=function(e){if(void 0===e)return!!this.controls_;this.controls_!==(e=!!e)&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},t.usingNativeControls=function(e){if(void 0===e)return!!this.usingNativeControls_;this.usingNativeControls_!==(e=!!e)&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},t.error=function(e){var r=this;if(void 0===e)return this.error_||null;if(Wi("beforeerror").forEach(function(o){var l=o(r,e);Ii(l)&&!Array.isArray(l)||"string"==typeof l||"number"==typeof l||null===l?e=l:r.log.error("please return a value that MediaError expects in beforeerror hooks")}),this.options_.suppressNotSupportedError&&e&&4===e.code){var a=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],a),void this.one("loadstart",function(){this.off(["click","touchstart"],a)})}if(null===e)return this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new qt(e),this.addClass("vjs-error"),Ke.error("(CODE:"+this.error_.code+" "+qt.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error"),Wi("error").forEach(function(o){return o(r,r.error_)})},t.reportUserActivity=function(e){this.userActivity_=!0},t.userActive=function(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",function(r){r.stopPropagation(),r.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},t.listenForUserActivity_=function(){var e,r,a,o=at(this,this.reportUserActivity),f=function(E){o(),this.clearInterval(e)};this.on("mousedown",function(){o(),this.clearInterval(e),e=this.setInterval(o,250)}),this.on("mousemove",function(E){(E.screenX!==r||E.screenY!==a)&&(r=E.screenX,a=E.screenY,o())}),this.on("mouseup",f),this.on("mouseleave",f);var g,v=this.getChild("controlBar");v&&!Ht&&!Di&&(v.on("mouseenter",function(T){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),v.on("mouseleave",function(T){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",o),this.on("keyup",o),this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(g);var T=this.options_.inactivityTimeout;T<=0||(g=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},T))}},250)},t.playbackRate=function(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)},t.defaultPlaybackRate=function(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},t.isAudio=function(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e},t.addTextTrack=function(e,r,a){if(this.tech_)return this.tech_.addTextTrack(e,r,a)},t.addRemoteTextTrack=function(e,r){if(this.tech_)return this.tech_.addRemoteTextTrack(e,r)},t.removeRemoteTextTrack=function(e){void 0===e&&(e={});var a=e.track;if(a||(a=e),this.tech_)return this.tech_.removeRemoteTextTrack(a)},t.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},t.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},t.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},t.language=function(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),Mi(this)&&this.trigger("languagechange"))},t.languages=function(){return ct(n.prototype.options_.languages,this.languages_)},t.toJSON=function(){var e=ct(this.options_),r=e.tracks;e.tracks=[];for(var a=0;a"):function(){}},Ki=1/30,bi=.1,rd=function(n,t){var e,i=[];if(n&&n.length)for(e=0;e=t})},xa=function(n,t){return rd(n,function(i){return i-Ki>=t})},nd=function(n){var t=[];if(!n||!n.length)return"";for(var i=0;i "+n.end(i));return t.join(", ")},cr=function(n){for(var t=[],i=0;ia)){if(t>r&&t<=a){i+=a-t;continue}i+=a-r}}return i},sd=U.createTimeRange,_o=function(n,t){if(!t.preload)return t.duration;var i=0;return(t.parts||[]).forEach(function(e){i+=e.duration}),(t.preloadHints||[]).forEach(function(e){"PART"===e.type&&(i+=n.partTargetDuration)}),i},yo=function(n){return(n.segments||[]).reduce(function(t,i,e){return i.parts?i.parts.forEach(function(r,a){t.push({duration:r.duration,segmentIndex:e,partIndex:a,part:r,segment:i})}):t.push({duration:i.duration,segmentIndex:e,partIndex:null,segment:i,part:null}),t},[])},od=function(n){var t=n.segments&&n.segments.length&&n.segments[n.segments.length-1];return t&&t.parts||[]},ud=function(n){var t=n.preloadSegment;if(t){var i=t.parts;return(t.preloadHints||[]).reduce(function(a,o){return a+("PART"===o.type?1:0)},0)+(i&&i.length?i.length:0)}},ld=function(n,t){if(t.endList)return 0;if(n&&n.suggestedPresentationDelay)return n.suggestedPresentationDelay;var i=od(t).length>0;return i&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:i&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},dd=function(n,t,i){if(typeof t>"u"&&(t=n.mediaSequence+n.segments.length),t"u"){if(n.totalDuration)return n.totalDuration;if(!n.endList)return P()[1/0]}return dd(n,t,i)},En=function(n){var t=n.defaultDuration,i=n.durationList,e=n.startIndex,r=n.endIndex,a=0;if(e>r){var o=[r,e];e=o[0],r=o[1]}if(e<0){for(var l=e;lDate.now()},To=function(n){return n.excludeUntil&&n.excludeUntil===1/0},Sa=function(n){var t=hd(n);return!n.disabled&&!t},pd=function(n,t){return t.attributes&&t.attributes[n]},bo=function(n,t){if(1===n.playlists.length)return!0;var i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===n.playlists.filter(function(e){return!!Sa(e)&&(e.attributes.BANDWIDTH||0)0)for(var T=f-1;T>=0;T--){var E=d[T];if(l+=E.duration,o){if(l<0)continue}else if(l+Ki<=0)continue;return{partIndex:E.partIndex,segmentIndex:E.segmentIndex,startTime:a-En({defaultDuration:t.targetDuration,durationList:d,startIndex:f,endIndex:T})}}return{partIndex:d[0]&&d[0].partIndex||null,segmentIndex:d[0]&&d[0].segmentIndex||0,startTime:i}}if(f<0){for(var x=f;x<0;x++)if((l-=t.targetDuration)<0)return{partIndex:d[0]&&d[0].partIndex||null,segmentIndex:d[0]&&d[0].segmentIndex||0,startTime:i};f=0}for(var S=f;S0)continue}else if(l-Ki>=0)continue;return{partIndex:N.partIndex,segmentIndex:N.segmentIndex,startTime:a+En({defaultDuration:t.targetDuration,durationList:d,startIndex:f,endIndex:S})}}return{segmentIndex:d[d.length-1].segmentIndex,partIndex:d[d.length-1].partIndex,startTime:i}},isEnabled:Sa,isDisabled:function(n){return n.disabled},isBlacklisted:hd,isIncompatible:To,playlistEnd:fd,isAes:function(n){for(var t=0;t-1&&o!==a.length-1&&(i._HLS_part=o),(o>-1||a.length)&&r--}i._HLS_msn=r}if(t.serverControl&&t.serverControl.canSkipUntil&&(i._HLS_skip=t.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(i).length){var l=new(P().URL)(n);["_HLS_skip","_HLS_msn","_HLS_part"].forEach(function(d){!i.hasOwnProperty(d)||l.searchParams.set(d,i[d])}),n=l.toString()}return n}(a,r)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:a,withCredentials:this.withCredentials},function(o,l){if(e.request){if(o)return e.playlistRequestError(e.request,e.media(),"HAVE_METADATA");e.haveMetadata({playlistString:e.request.responseText,url:e.media().uri,id:e.media().id})}})}},t.playlistRequestError=function(e,r,a){var o=r.uri,l=r.id;this.request=null,a&&(this.state=a),this.error={playlist:this.master.playlists[l],status:e.status,message:"HLS playlist request error at URL: "+o+".",responseText:e.responseText,code:e.status>=500?4:2},this.trigger("error")},t.parseManifest_=function(e){var r=this,a=e.url;return function(n){var t=n.onwarn,i=n.oninfo,e=n.manifestString,r=n.customTagParsers,a=void 0===r?[]:r,o=n.customTagMappers,l=void 0===o?[]:o,d=n.experimentalLLHLS,f=new ef;t&&f.on("warn",t),i&&f.on("info",i),a.forEach(function(x){return f.addParser(x)}),l.forEach(function(x){return f.addTagMapper(x)}),f.push(e),f.end();var v=f.manifest;if(d||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(x){v.hasOwnProperty(x)&&delete v[x]}),v.segments&&v.segments.forEach(function(x){["parts","preloadHints"].forEach(function(S){x.hasOwnProperty(S)&&delete x[S]})})),!v.targetDuration){var g=10;v.segments&&v.segments.length&&(g=v.segments.reduce(function(x,S){return Math.max(x,S.duration)},0)),t&&t("manifest has no targetDuration defaulting to "+g),v.targetDuration=g}var T=od(v);if(T.length&&!v.partTargetDuration){var E=T.reduce(function(x,S){return Math.max(x,S.duration)},0);t&&(t("manifest has no partTargetDuration defaulting to "+E),gd.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),v.partTargetDuration=E}return v}({onwarn:function(d){return r.logger_("m3u8-parser warn for "+a+": "+d.message)},oninfo:function(d){return r.logger_("m3u8-parser info for "+a+": "+d.message)},manifestString:e.manifestString,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,experimentalLLHLS:this.experimentalLLHLS})},t.haveMetadata=function(e){var r=e.playlistString,a=e.playlistObject,o=e.url,l=e.id;this.request=null,this.state="HAVE_METADATA";var d=a||this.parseManifest_({url:o,manifestString:r});d.lastRequest=Date.now(),vd({playlist:d,uri:o,id:l});var f=Eo(this.master,d);this.targetDuration=d.partTargetDuration||d.targetDuration,this.pendingMedia_=null,f?(this.master=f,this.media_=this.master.playlists[l]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(Co(this.media(),!!f)),this.trigger("loadedplaylist")},t.dispose=function(){this.trigger("dispose"),this.stopRequest(),P().clearTimeout(this.mediaUpdateTimeout),P().clearTimeout(this.finalRenditionTimeout),this.off()},t.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},t.media=function(e,r){var a=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"==typeof e){if(!this.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.master.playlists[e]}if(P().clearTimeout(this.finalRenditionTimeout),r){var o=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=P().setTimeout(this.media.bind(this,e,!1),o)}else{var l=this.state,d=!this.media_||e.id!==this.media_.id,f=this.master.playlists[e.id];if(f&&f.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(d&&(this.trigger("mediachanging"),this.trigger("HAVE_MASTER"===l?"loadedmetadata":"mediachange")));if(this.updateMediaUpdateTimeout_(Co(e,!0)),d){if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=e,this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials},function(v,g){if(a.request){if(e.lastRequest=Date.now(),e.resolvedUri=ba(a.handleManifestRedirects,e.resolvedUri,g),v)return a.playlistRequestError(a.request,e,l);a.haveMetadata({playlistString:g.responseText,url:e.uri,id:e.id}),a.trigger("HAVE_MASTER"===l?"loadedmetadata":"mediachange")}})}}},t.pause=function(){this.mediaUpdateTimeout&&(P().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.state=this.media_?"HAVE_METADATA":"HAVE_MASTER":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")},t.load=function(e){var r=this;this.mediaUpdateTimeout&&(P().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);var a=this.media();if(e){var o=a?(a.partTargetDuration||a.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=P().setTimeout(function(){r.mediaUpdateTimeout=null,r.load()},o)}else this.started?this.trigger(a&&!a.endList?"mediaupdatetimeout":"loadedplaylist"):this.start()},t.updateMediaUpdateTimeout_=function(e){var r=this;this.mediaUpdateTimeout&&(P().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=P().setTimeout(function(){r.mediaUpdateTimeout=null,r.trigger("mediaupdatetimeout"),r.updateMediaUpdateTimeout_(e)},e))},t.start=function(){var e=this;if(this.started=!0,"object"==typeof this.src)return this.src.uri||(this.src.uri=P().location.href),this.src.resolvedUri=this.src.uri,void setTimeout(function(){e.setupInitialPlaylist(e.src)},0);this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},function(r,a){if(e.request){if(e.request=null,r)return e.error={status:a.status,message:"HLS playlist request error at URL: "+e.src+".",responseText:a.responseText,code:2},"HAVE_NOTHING"===e.state&&(e.started=!1),e.trigger("error");e.src=ba(e.handleManifestRedirects,e.src,a);var o=e.parseManifest_({manifestString:a.responseText,url:e.src});e.setupInitialPlaylist(o)}})},t.srcUri=function(){return"string"==typeof this.src?this.src:this.src.uri},t.setupInitialPlaylist=function(e){if(this.state="HAVE_MASTER",e.playlists)return this.master=e,_d(this.master,this.srcUri()),e.playlists.forEach(function(a){a.segments=Td(a),a.segments.forEach(function(o){yd(o,a.resolvedUri)})}),this.trigger("loadedplaylist"),void(this.request||this.media(this.master.playlists[0]));var r=this.srcUri()||P().location.href;this.master=function(n,t){var i=So(0,t),e={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:P().location.href,resolvedUri:P().location.href,playlists:[{uri:t,id:i,resolvedUri:t,attributes:{}}]};return e.playlists[i]=e.playlists[0],e.playlists[t]=e.playlists[0],e}(0,r),this.haveMetadata({playlistObject:e,url:r,id:this.master.playlists[0].id}),this.trigger("loadedmetadata")},n}(U.EventTarget),mm=U.xhr,gm=U.mergeOptions,ko=function(n,t,i,e){var r="arraybuffer"===n.responseType?n.response:n.responseText;!t&&r&&(n.responseTime=Date.now(),n.roundTripTime=n.responseTime-n.requestTime,n.bytesReceived=r.byteLength||r.length,n.bandwidth||(n.bandwidth=Math.floor(n.bytesReceived/n.roundTripTime*8*1e3))),i.headers&&(n.responseHeaders=i.headers),t&&"ETIMEDOUT"===t.code&&(n.timedout=!0),!t&&!n.aborted&&200!==i.statusCode&&206!==i.statusCode&&0!==i.statusCode&&(t=new Error("XHR Failed with a response of: "+(n&&(r||n.responseText)))),e(t,n)},xd=function(){var n=function t(i,e){i=gm({timeout:45e3},i);var r=t.beforeRequest||U.Vhs.xhr.beforeRequest;if(r&&"function"==typeof r){var a=r(i);a&&(i=a)}var l=(!0===U.Vhs.xhr.original?mm:U.Vhs.xhr)(i,function(f,v){return ko(l,f,v,e)}),d=l.abort;return l.abort=function(){return l.aborted=!0,d.apply(l,arguments)},l.uri=i.uri,l.requestTime=Date.now(),l};return n.original=!0,n},Ao=function(n){var t={};return n.byterange&&(t.Range=function(n){return"bytes="+n.offset+"-"+("bigint"==typeof n.offset||"bigint"==typeof n.length?P().BigInt(n.offset)+P().BigInt(n.length)-P().BigInt(1):n.offset+n.length-1)}(n.byterange)),t},_m=function(n,t){return n.start(t)+"-"+n.end(t)},ym=function(n,t){var i=n.toString(16);return"00".substring(0,2-i.length)+i+(t%2?" ":"")},Tm=function(n){return n>=32&&n<126?String.fromCharCode(n):"."},Sd=function(n){var t={};return Object.keys(n).forEach(function(i){var e=n[i];t[i]=ArrayBuffer.isView(e)?{bytes:e.buffer,byteOffset:e.byteOffset,byteLength:e.byteLength}:e}),t},Ca=function(n){var t=n.byterange||{length:1/0,offset:0};return[t.length,t.offset,n.resolvedUri].join(",")},Ed=function(n){return n.resolvedUri},Cd=function(n){for(var t=Array.prototype.slice.call(n),i=16,e="",o=0;o"u"||!i||!a)return f({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!i.endList&&!d.hasStarted_)return f({message:"player must be playing a live stream to start buffering"});if(!function(n){if(!n.segments||0===n.segments.length)return!1;for(var t=0;tnew Date(l.getTime()+1e3*d)?null:(i>l&&(e=o),{segment:e,estimatedStart:e.videoTimingInfo?e.videoTimingInfo.transmuxedPresentationStart:Yt.duration(t,t.mediaSequence+t.segments.indexOf(e)),type:e.videoTimingInfo?"accurate":"estimate"})}(t,i);if(!v)return f({message:t+" was not found in the stream"});var g=v.segment,T=function(n,t){var i,e;try{i=new Date(n),e=new Date(t)}catch{}var r=i.getTime();return(e.getTime()-r)/1e3}(g.dateTimeObject,t);if("estimate"===v.type)return 0===r?f({message:t+" is not buffered yet. Try again"}):(a(v.estimatedStart+T),void d.one("seeked",function(){s({programTime:t,playlist:i,retryCount:r-1,seekTo:a,pauseAfterSeek:l,tech:d,callback:f})}));var E=g.start+T;d.one("seeked",function(){return f(null,d.currentTime())}),l&&d.pause(),a(E)},wo=function(n,t){if(4===n.readyState)return t()},Ad=U.mergeOptions,wd=function(n,t){if(!bd(n,t)||n.sidx&&t.sidx&&(n.sidx.offset!==t.sidx.offset||n.sidx.length!==t.sidx.length))return!1;if(!n.sidx&&t.sidx||n.sidx&&!t.sidx||n.segments&&!t.segments||!n.segments&&t.segments)return!1;if(!n.segments&&!t.segments)return!0;for(var i=0;i=N+S)return f(v,{response:E.subarray(S,S+N),status:g.status,uri:g.uri});o.request=o.vhs_.xhr({uri:d,responseType:"arraybuffer",headers:Ao({byterange:e.sidx.byterange})},f)})}else this.mediaRequest_=P().setTimeout(function(){return a(!1)},0)},t.dispose=function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},P().clearTimeout(this.minimumUpdatePeriodTimeout_),P().clearTimeout(this.mediaRequest_),P().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.off()},t.hasPendingRequest=function(){return this.request||this.mediaRequest_},t.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},t.media=function(e){var r=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var a=this.state;if("string"==typeof e){if(!this.masterPlaylistLoader_.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.masterPlaylistLoader_.master.playlists[e]}var o=!this.media_||e.id!==this.media_.id;if(o&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state="HAVE_METADATA",this.media_=e,void(o&&(this.trigger("mediachanging"),this.trigger("mediachange")));!o||(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,a,function(l){r.haveMetadata({startingState:a,playlist:e})}))},t.haveMetadata=function(e){var r=e.startingState,a=e.playlist;this.state="HAVE_METADATA",this.loadedPlaylists_[a.id]=a,this.mediaRequest_=null,this.refreshMedia_(a.id),this.trigger("HAVE_MASTER"===r?"loadedmetadata":"mediachange")},t.pause=function(){this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),P().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMaster_&&(P().clearTimeout(this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_),this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_=null),"HAVE_NOTHING"===this.state&&(this.started=!1)},t.load=function(e){var r=this;P().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;var a=this.media();if(e){var o=a?a.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=P().setTimeout(function(){return r.load()},o)}else this.started?a&&!a.endList?(this.isMaster_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start()},t.start=function(){var e=this;this.started=!0,this.isMaster_?this.requestMaster_(function(r,a){e.haveMaster_(),!e.hasPendingRequest()&&!e.media_&&e.media(e.masterPlaylistLoader_.master.playlists[0])}):this.mediaRequest_=P().setTimeout(function(){return e.haveMaster_()},0)},t.requestMaster_=function(e){var r=this;this.request=this.vhs_.xhr({uri:this.masterPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},function(a,o){if(!r.requestErrored_(a,o)){var l=o.responseText!==r.masterPlaylistLoader_.masterXml_;return r.masterPlaylistLoader_.masterXml_=o.responseText,r.masterLoaded_=o.responseHeaders&&o.responseHeaders.date?Date.parse(o.responseHeaders.date):Date.now(),r.masterPlaylistLoader_.srcUrl=ba(r.handleManifestRedirects,r.masterPlaylistLoader_.srcUrl,o),l?(r.handleMaster_(),void r.syncClientServerClock_(function(){return e(o,l)})):e(o,l)}"HAVE_NOTHING"===r.state&&(r.started=!1)})},t.syncClientServerClock_=function(e){var r=this,a=function(n){return function(n){var t=Tt(n,"UTCTiming")[0];if(!t)return null;var i=Mt(t);switch(i.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":i.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":i.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":i.method="DIRECT",i.value=Date.parse(i.value);break;default:throw new Error("UNSUPPORTED_UTC_TIMING_SCHEME")}return i}(mu(n))}(this.masterPlaylistLoader_.masterXml_);return null===a?(this.masterPlaylistLoader_.clientOffset_=this.masterLoaded_-Date.now(),e()):"DIRECT"===a.method?(this.masterPlaylistLoader_.clientOffset_=a.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:pi(this.masterPlaylistLoader_.srcUrl,a.value),method:a.method,withCredentials:this.withCredentials},function(o,l){if(r.request){if(o)return r.masterPlaylistLoader_.clientOffset_=r.masterLoaded_-Date.now(),e();var d;d="HEAD"===a.method?l.responseHeaders&&l.responseHeaders.date?Date.parse(l.responseHeaders.date):r.masterLoaded_:Date.parse(l.responseText),r.masterPlaylistLoader_.clientOffset_=d-Date.now(),e()}}))},t.haveMaster_=function(){this.state="HAVE_MASTER",this.isMaster_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)},t.handleMaster_=function(){this.mediaRequest_=null;var e=this.masterPlaylistLoader_.master,r=function(n){var i=n.srcUrl,o=function(n,t){void 0===t&&(t={});var i=function(n,t){void 0===t&&(t={});var i=t,e=i.manifestUri,r=void 0===e?"":e,a=i.NOW,o=void 0===a?Date.now():a,l=i.clientOffset,d=void 0===l?0:l,f=Tt(n,"Period");if(!f.length)throw new Error("INVALID_NUMBER_OF_PERIOD");var v=Tt(n,"Location"),g=Mt(n),T=Gn([r],Tt(n,"BaseURL"));g.type=g.type||"static",g.sourceDuration=g.mediaPresentationDuration||0,g.NOW=o,g.clientOffset=d,v.length&&(g.locations=v.map(ls));var E=[];return f.forEach(function(x,S){var N=Mt(x),F=E[S-1];N.start=function(n){var t=n.attributes,i=n.priorPeriodAttributes;return"number"==typeof t.start?t.start:i&&"number"==typeof i.start&&"number"==typeof i.duration?i.start+i.duration:i||"static"!==n.mpdType?null:0}({attributes:N,priorPeriodAttributes:F?F.attributes:null,mpdType:g.type}),E.push({node:x,attributes:N})}),{locations:g.locations,representationInfo:qn(E.map(jf(g,T)))}}(mu(n),t),e=function(n){return n.map(Of)}(i.representationInfo);return Ef({dashPlaylists:e,locations:i.locations,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest})}(n.masterXml,{manifestUri:i,clientOffset:n.clientOffset,sidxMapping:n.sidxMapping,previousManifest:n.previousManifest});return _d(o,i),o}({masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_,previousManifest:e});e&&(r=function(n,t,i){for(var e=!0,r=Ad(n,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts}),a=0;a-1)},this.trigger=function(p){var h,m,_,y;if(h=c[p])if(2===arguments.length)for(_=h.length,m=0;m<_;++m)h[m].call(this,arguments[1]);else{for(y=[],m=arguments.length,m=1;m"u")){for(b in Pe)Pe.hasOwnProperty(b)&&(Pe[b]=[b.charCodeAt(0),b.charCodeAt(1),b.charCodeAt(2),b.charCodeAt(3)]);ot=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),Je=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),Nt=new Uint8Array([0,0,0,1]),fr=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),ai=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),si={video:fr,audio:ai},hr=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Fi=new Uint8Array([0,0,0,0,0,0,0,0]),Bi=new Uint8Array([0,0,0,0,0,0,0,0]),pr=Bi,mr=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),mc=Bi,Ei=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),a=function(c){var m,_,p=[],h=0;for(m=1;m>>1,c.samplingfrequencyindex<<7|c.channelcount<<3,6,1,2]))},d=function(){return a(Pe.ftyp,ot,Nt,ot,Je)},q=function(c){return a(Pe.hdlr,si[c])},f=function(c){return a(Pe.mdat,c)},W=function(c){var p=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,c.duration>>>24&255,c.duration>>>16&255,c.duration>>>8&255,255&c.duration,85,196,0,0]);return c.samplerate&&(p[12]=c.samplerate>>>24&255,p[13]=c.samplerate>>>16&255,p[14]=c.samplerate>>>8&255,p[15]=255&c.samplerate),a(Pe.mdhd,p)},j=function(c){return a(Pe.mdia,W(c),q(c.type),g(c))},v=function(c){return a(Pe.mfhd,new Uint8Array([0,0,0,0,(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c]))},g=function(c){return a(Pe.minf,"video"===c.type?a(Pe.vmhd,Ei):a(Pe.smhd,Fi),o(),he(c))},T=function(c,p){for(var h=[],m=p.length;m--;)h[m]=ye(p[m]);return a.apply(null,[Pe.moof,v(c)].concat(h))},E=function(c){for(var p=c.length,h=[];p--;)h[p]=N(c[p]);return a.apply(null,[Pe.moov,S(4294967295)].concat(h).concat(x(c)))},x=function(c){for(var p=c.length,h=[];p--;)h[p]=ge(c[p]);return a.apply(null,[Pe.mvex].concat(h))},S=function(c){var p=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return a(Pe.mvhd,p)},ne=function(c){var m,_,p=c.samples||[],h=new Uint8Array(4+p.length);for(_=0;_>>8),y.push(255&m[I].byteLength),y=y.concat(Array.prototype.slice.call(m[I]));for(I=0;I<_.length;I++)k.push((65280&_[I].byteLength)>>>8),k.push(255&_[I].byteLength),k=k.concat(Array.prototype.slice.call(_[I]));if(L=[Pe.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&h.width)>>8,255&h.width,(65280&h.height)>>8,255&h.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),a(Pe.avcC,new Uint8Array([1,h.profileIdc,h.profileCompatibility,h.levelIdc,255].concat([m.length],y,[_.length],k))),a(Pe.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],h.sarRatio){var O=h.sarRatio[0],M=h.sarRatio[1];L.push(a(Pe.pasp,new Uint8Array([(4278190080&O)>>24,(16711680&O)>>16,(65280&O)>>8,255&O,(4278190080&M)>>24,(16711680&M)>>16,(65280&M)>>8,255&M])))}return a.apply(null,L)},c=function(h){return a(Pe.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&h.channelcount)>>8,255&h.channelcount,(65280&h.samplesize)>>8,255&h.samplesize,0,0,0,0,(65280&h.samplerate)>>8,255&h.samplerate,0,0]),l(h))},F=function(c){var p=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&c.id)>>24,(16711680&c.id)>>16,(65280&c.id)>>8,255&c.id,0,0,0,0,(4278190080&c.duration)>>24,(16711680&c.duration)>>16,(65280&c.duration)>>8,255&c.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&c.width)>>8,255&c.width,0,0,(65280&c.height)>>8,255&c.height,0,0]);return a(Pe.tkhd,p)},ye=function(c){var p,h,m,_,k,I;return p=a(Pe.tfhd,new Uint8Array([0,0,0,58,(4278190080&c.id)>>24,(16711680&c.id)>>16,(65280&c.id)>>8,255&c.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),k=Math.floor(c.baseMediaDecodeTime/r),I=Math.floor(c.baseMediaDecodeTime%r),h=a(Pe.tfdt,new Uint8Array([1,0,0,0,k>>>24&255,k>>>16&255,k>>>8&255,255&k,I>>>24&255,I>>>16&255,I>>>8&255,255&I])),"audio"===c.type?(m=$e(c,92),a(Pe.traf,p,h,m)):(_=ne(c),m=$e(c,_.length+92),a(Pe.traf,p,h,m,_))},N=function(c){return c.duration=c.duration||4294967295,a(Pe.trak,F(c),j(c))},ge=function(c){var p=new Uint8Array([0,0,0,0,(4278190080&c.id)>>24,(16711680&c.id)>>16,(65280&c.id)>>8,255&c.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==c.type&&(p[p.length-1]=0),a(Pe.trex,p)},function(){var b,c,p;p=function(m,_){var y=0,k=0,I=0,L=0;return m.length&&(void 0!==m[0].duration&&(y=1),void 0!==m[0].size&&(k=2),void 0!==m[0].flags&&(I=4),void 0!==m[0].compositionTimeOffset&&(L=8)),[0,0,y|k|I|L,1,(4278190080&m.length)>>>24,(16711680&m.length)>>>16,(65280&m.length)>>>8,255&m.length,(4278190080&_)>>>24,(16711680&_)>>>16,(65280&_)>>>8,255&_]},c=function(m,_){var y,k,I,L,O,M;for(I=p(L=m.samples||[],_+=20+16*L.length),(k=new Uint8Array(I.length+16*L.length)).set(I),y=I.length,M=0;M>>24,k[y++]=(16711680&O.duration)>>>16,k[y++]=(65280&O.duration)>>>8,k[y++]=255&O.duration,k[y++]=(4278190080&O.size)>>>24,k[y++]=(16711680&O.size)>>>16,k[y++]=(65280&O.size)>>>8,k[y++]=255&O.size,k[y++]=O.flags.isLeading<<2|O.flags.dependsOn,k[y++]=O.flags.isDependedOn<<6|O.flags.hasRedundancy<<4|O.flags.paddingValue<<1|O.flags.isNonSyncSample,k[y++]=61440&O.flags.degradationPriority,k[y++]=15&O.flags.degradationPriority,k[y++]=(4278190080&O.compositionTimeOffset)>>>24,k[y++]=(16711680&O.compositionTimeOffset)>>>16,k[y++]=(65280&O.compositionTimeOffset)>>>8,k[y++]=255&O.compositionTimeOffset;return a(Pe.trun,k)},b=function(m,_){var y,k,I,L,O,M;for(I=p(L=m.samples||[],_+=20+8*L.length),(y=new Uint8Array(I.length+8*L.length)).set(I),k=I.length,M=0;M>>24,y[k++]=(16711680&O.duration)>>>16,y[k++]=(65280&O.duration)>>>8,y[k++]=255&O.duration,y[k++]=(4278190080&O.size)>>>24,y[k++]=(16711680&O.size)>>>16,y[k++]=(65280&O.size)>>>8,y[k++]=255&O.size;return a(Pe.trun,y)},$e=function(m,_){return"audio"===m.type?b(m,_):c(m,_)}}();var Vo,Wo,Go,Na,Zo,vc,_c,yc,Dn_mdat=f,Dn_moof=T,gc=function(c,p){var h={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return h.dataOffset=p,h.compositionTimeOffset=c.pts-c.dts,h.duration=c.duration,h.size=4*c.length,h.size+=c.byteLength,c.keyFrame&&(h.flags.dependsOn=2,h.flags.isNonSyncSample=0),h},zi=[33,16,5,32,164,27],Ho=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],et=function(c){for(var p=[];c--;)p.push(0);return p};Wo=function(c){return 9e4*c},Go=function(c,p){return c*p},Na=function(c){return c/9e4},Zo=function(c,p){return c/p},vc=function(c,p){return Wo(Zo(c,p))},_c=function(c,p){return Go(Na(c),p)},yc=function(c,p,h){return Na(h?c:c-p)};var Qe_secondsToVideoTs=Wo,Qe_videoTsToSeconds=Na,Qe_audioTsToVideoTs=vc,Qe_videoTsToAudioTs=_c,Qe_metadataTsToSeconds=yc,Fa_prefixWithSilence=function(c,p,h,m){var _,O,M,G,y=0,k=0,I=0,L=0;if(p.length&&(_=Qe_audioTsToVideoTs(c.baseMediaDecodeTime,c.samplerate),y=Math.ceil(9e4/(c.samplerate/1024)),h&&m&&(k=_-Math.max(h,m),L=(I=Math.floor(k/y))*y),!(I<1||L>45e3))){for((O=function(){if(!Vo){var c={96e3:[zi,[227,64],et(154),[56]],88200:[zi,[231],et(170),[56]],64e3:[zi,[248,192],et(240),[56]],48e3:[zi,[255,192],et(268),[55,148,128],et(54),[112]],44100:[zi,[255,192],et(268),[55,163,128],et(84),[112]],32e3:[zi,[255,192],et(268),[55,234],et(226),[112]],24e3:[zi,[255,192],et(268),[55,255,128],et(268),[111,112],et(126),[224]],16e3:[zi,[255,192],et(268),[55,255,128],et(268),[111,255],et(269),[223,108],et(195),[1,192]],12e3:[Ho,et(268),[3,127,248],et(268),[6,255,240],et(268),[13,255,224],et(268),[27,253,128],et(259),[56]],11025:[Ho,et(268),[3,127,248],et(268),[6,255,240],et(268),[13,255,224],et(268),[27,255,192],et(268),[55,175,128],et(108),[112]],8e3:[Ho,et(268),[3,121,16],et(47),[7]]};Vo=function(c){return Object.keys(c).reduce(function(p,h){return p[h]=new Uint8Array(c[h].reduce(function(m,_){return m.concat(_)},[])),p},{})}(c)}return Vo}()[c.samplerate])||(O=p[0].data),M=0;M=this.virtualRowCount&&"function"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(b),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},ji.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},ji.prototype.addText=function(b){this.rows[this.rowIdx]+=b},ji.prototype.backspace=function(){if(!this.isEmpty()){var b=this.rows[this.rowIdx];this.rows[this.rowIdx]=b.substr(0,b.length-1)}};var ja=function(c,p,h){this.serviceNum=c,this.text="",this.currentWindow=new ji(-1),this.windows=[],this.stream=h,"string"==typeof p&&this.createTextDecoder(p)};ja.prototype.init=function(b,c){this.startPts=b;for(var p=0;p<8;p++)this.windows[p]=new ji(p),"function"==typeof c&&(this.windows[p].beforeRowOverflow=c)},ja.prototype.setCurrentWindow=function(b){this.currentWindow=this.windows[b]},ja.prototype.createTextDecoder=function(b){if(typeof TextDecoder>"u")this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(b)}catch(c){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+b+" encoding. "+c})}};var ut=function b(c){c=c||{},b.prototype.init.call(this);var _,p=this,h=c.captionServices||{},m={};Object.keys(h).forEach(function(y){_=h[y],/^SERVICE/.test(y)&&(m[y]=_.encoding)}),this.serviceEncodings=m,this.current708Packet=null,this.services={},this.push=function(y){3===y.type?(p.new708Packet(),p.add708Bytes(y)):(null===p.current708Packet&&p.new708Packet(),p.add708Bytes(y))}};ut.prototype=new n,ut.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},ut.prototype.add708Bytes=function(b){var c=b.ccData,p=c>>>8,h=255&c;this.current708Packet.ptsVals.push(b.pts),this.current708Packet.data.push(p),this.current708Packet.data.push(h)},ut.prototype.push708Packet=function(){var b=this.current708Packet,c=b.data,p=null,h=null,m=0,_=c[m++];for(b.seq=_>>6,b.sizeCode=63&_;m>5)&&h>0&&(p=_=c[m++]),this.pushServiceBlock(p,m,h),h>0&&(m+=h-1)},ut.prototype.pushServiceBlock=function(b,c,p){var h,m=c,_=this.current708Packet.data,y=this.services[b];for(y||(y=this.initService(b,m));m>5,_.rowLock=(16&h)>>4,_.columnLock=(8&h)>>3,_.priority=7&h,h=p[++b],_.relativePositioning=(128&h)>>7,_.anchorVertical=127&h,h=p[++b],_.anchorHorizontal=h,h=p[++b],_.anchorPoint=(240&h)>>4,_.rowCount=15&h,h=p[++b],_.columnCount=63&h,h=p[++b],_.windowStyle=(56&h)>>3,_.penStyle=7&h,_.virtualRowCount=_.rowCount+1,b},ut.prototype.setWindowAttributes=function(b,c){var p=this.current708Packet.data,h=p[b],m=c.currentWindow.winAttr;return h=p[++b],m.fillOpacity=(192&h)>>6,m.fillRed=(48&h)>>4,m.fillGreen=(12&h)>>2,m.fillBlue=3&h,h=p[++b],m.borderType=(192&h)>>6,m.borderRed=(48&h)>>4,m.borderGreen=(12&h)>>2,m.borderBlue=3&h,h=p[++b],m.borderType+=(128&h)>>5,m.wordWrap=(64&h)>>6,m.printDirection=(48&h)>>4,m.scrollDirection=(12&h)>>2,m.justify=3&h,h=p[++b],m.effectSpeed=(240&h)>>4,m.effectDirection=(12&h)>>2,m.displayEffect=3&h,b},ut.prototype.flushDisplayed=function(b,c){for(var p=[],h=0;h<8;h++)c.windows[h].visible&&!c.windows[h].isEmpty()&&p.push(c.windows[h].getText());c.endPts=b,c.text=p.join("\n\n"),this.pushCaption(c),c.startPts=b},ut.prototype.pushCaption=function(b){""!==b.text&&(this.trigger("data",{startPts:b.startPts,endPts:b.endPts,text:b.text,stream:"cc708_"+b.serviceNum}),b.text="",b.startPts=b.endPts)},ut.prototype.displayWindows=function(b,c){var h=this.current708Packet.data[++b],m=this.getPts(b);this.flushDisplayed(m,c);for(var _=0;_<8;_++)h&1<<_&&(c.windows[_].visible=1);return b},ut.prototype.hideWindows=function(b,c){var h=this.current708Packet.data[++b],m=this.getPts(b);this.flushDisplayed(m,c);for(var _=0;_<8;_++)h&1<<_&&(c.windows[_].visible=0);return b},ut.prototype.toggleWindows=function(b,c){var h=this.current708Packet.data[++b],m=this.getPts(b);this.flushDisplayed(m,c);for(var _=0;_<8;_++)h&1<<_&&(c.windows[_].visible^=1);return b},ut.prototype.clearWindows=function(b,c){var h=this.current708Packet.data[++b],m=this.getPts(b);this.flushDisplayed(m,c);for(var _=0;_<8;_++)h&1<<_&&c.windows[_].clearText();return b},ut.prototype.deleteWindows=function(b,c){var h=this.current708Packet.data[++b],m=this.getPts(b);this.flushDisplayed(m,c);for(var _=0;_<8;_++)h&1<<_&&c.windows[_].reset();return b},ut.prototype.setPenAttributes=function(b,c){var p=this.current708Packet.data,h=p[b],m=c.currentWindow.penAttr;return h=p[++b],m.textTag=(240&h)>>4,m.offset=(12&h)>>2,m.penSize=3&h,h=p[++b],m.italics=(128&h)>>7,m.underline=(64&h)>>6,m.edgeType=(56&h)>>3,m.fontStyle=7&h,b},ut.prototype.setPenColor=function(b,c){var p=this.current708Packet.data,h=p[b],m=c.currentWindow.penColor;return h=p[++b],m.fgOpacity=(192&h)>>6,m.fgRed=(48&h)>>4,m.fgGreen=(12&h)>>2,m.fgBlue=3&h,h=p[++b],m.bgOpacity=(192&h)>>6,m.bgRed=(48&h)>>4,m.bgGreen=(12&h)>>2,m.bgBlue=3&h,h=p[++b],m.edgeRed=(48&h)>>4,m.edgeGreen=(12&h)>>2,m.edgeBlue=3&h,b},ut.prototype.setPenLocation=function(b,c){var p=this.current708Packet.data,h=p[b],m=c.currentWindow.penLoc;return c.currentWindow.pendingNewLine=!0,h=p[++b],m.row=15&h,h=p[++b],m.column=63&h,b},ut.prototype.reset=function(b,c){var p=this.getPts(b);return this.flushDisplayed(p,c),this.initService(c.serviceNum,b)};var K0={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Ha=function(c){return null===c?"":(c=K0[c]||c,String.fromCharCode(c))},z0=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],gr=function(){for(var c=[],p=15;p--;)c.push("");return c},mt=function b(c,p){b.prototype.init.call(this),this.field_=c||0,this.dataChannel_=p||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(h){var m,_,y,k,I;if((m=32639&h.ccData)!==this.lastControlCode_){if(4096==(61440&m)?this.lastControlCode_=m:m!==this.PADDING_&&(this.lastControlCode_=null),y=m>>>8,k=255&m,m!==this.PADDING_)if(m===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(m===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(h.pts),this.flushDisplayed(h.pts),_=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=_,this.startPts_=h.pts;else if(m===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(h.pts);else if(m===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(h.pts);else if(m===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(h.pts);else if(m===this.CARRIAGE_RETURN_)this.clearFormatting(h.pts),this.flushDisplayed(h.pts),this.shiftRowsUp_(),this.startPts_=h.pts;else if(m===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(m===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(h.pts),this.displayed_=gr();else if(m===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=gr();else if(m===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(h.pts),this.displayed_=gr()),this.mode_="paintOn",this.startPts_=h.pts;else if(this.isSpecialCharacter(y,k))I=Ha((y=(3&y)<<8)|k),this[this.mode_](h.pts,I),this.column_++;else if(this.isExtCharacter(y,k))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),I=Ha((y=(3&y)<<8)|k),this[this.mode_](h.pts,I),this.column_++;else if(this.isMidRowCode(y,k))this.clearFormatting(h.pts),this[this.mode_](h.pts," "),this.column_++,14==(14&k)&&this.addFormatting(h.pts,["i"]),1==(1&k)&&this.addFormatting(h.pts,["u"]);else if(this.isOffsetControlCode(y,k))this.column_+=3&k;else if(this.isPAC(y,k)){var L=z0.indexOf(7968&m);"rollUp"===this.mode_&&(L-this.rollUpRows_+1<0&&(L=this.rollUpRows_-1),this.setRollUp(h.pts,L)),L!==this.row_&&(this.clearFormatting(h.pts),this.row_=L),1&k&&-1===this.formatting_.indexOf("u")&&this.addFormatting(h.pts,["u"]),16==(16&m)&&(this.column_=4*((14&m)>>1)),this.isColorPAC(k)&&14==(14&k)&&this.addFormatting(h.pts,["i"])}else this.isNormalChar(y)&&(0===k&&(k=null),I=Ha(y),I+=Ha(k),this[this.mode_](h.pts,I),this.column_+=I.length)}else this.lastControlCode_=null}};mt.prototype=new n,mt.prototype.flushDisplayed=function(b){var c=this.displayed_.map(function(p,h){try{return p.trim()}catch{return this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+h+"."}),""}},this).join("\n").replace(/^\n+|\n+$/g,"");c.length&&this.trigger("data",{startPts:this.startPts_,endPts:b,text:c,stream:this.name_})},mt.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=gr(),this.nonDisplayed_=gr(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},mt.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},mt.prototype.isSpecialCharacter=function(b,c){return b===this.EXT_&&c>=48&&c<=63},mt.prototype.isExtCharacter=function(b,c){return(b===this.EXT_+1||b===this.EXT_+2)&&c>=32&&c<=63},mt.prototype.isMidRowCode=function(b,c){return b===this.EXT_&&c>=32&&c<=47},mt.prototype.isOffsetControlCode=function(b,c){return b===this.OFFSET_&&c>=33&&c<=35},mt.prototype.isPAC=function(b,c){return b>=this.BASE_&&b=64&&c<=127},mt.prototype.isColorPAC=function(b){return b>=64&&b<=79||b>=96&&b<=127},mt.prototype.isNormalChar=function(b){return b>=32&&b<=127},mt.prototype.setRollUp=function(b,c){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(b),this.nonDisplayed_=gr(),this.displayed_=gr()),void 0!==c&&c!==this.row_)for(var p=0;p"},"");this[this.mode_](b,p)},mt.prototype.clearFormatting=function(b){if(this.formatting_.length){var c=this.formatting_.reverse().reduce(function(p,h){return p+""},"");this.formatting_=[],this[this.mode_](b,c)}},mt.prototype.popOn=function(b,c){var p=this.nonDisplayed_[this.row_];this.nonDisplayed_[this.row_]=p+=c},mt.prototype.rollUp=function(b,c){var p=this.displayed_[this.row_];this.displayed_[this.row_]=p+=c},mt.prototype.shiftRowsUp_=function(){var b;for(b=0;bp&&(h=-1);Math.abs(p-c)>4294967296;)c+=8589934592*h;return c},xc=function b(c){var p,h;b.prototype.init.call(this),this.type_=c||"shared",this.push=function(m){"shared"!==this.type_&&m.type!==this.type_||(void 0===h&&(h=m.dts),m.dts=Ko(m.dts,h),m.pts=Ko(m.pts,h),p=m.dts,this.trigger("data",m))},this.flush=function(){h=p,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){h=void 0,p=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};xc.prototype=new n;var Za,Sc_TimestampRolloverStream=xc,Sc_handleRollover=Ko,Ec=function(c,p,h){var m,_="";for(m=p;m>>2;ae*=4,M.timeStamp=ae+=3&Se[7],void 0===I.pts&&void 0===I.dts&&(I.pts=M.timeStamp,I.dts=M.timeStamp),this.trigger("timestamp",M)}I.frames.push(M),L+=10,L+=O}while(L>>4>1&&(k+=_[k]+1),0===y.pid)y.type="pat",c(_.subarray(k),y),this.trigger("data",y);else if(y.pid===this.pmtPid)for(y.type="pmt",c(_.subarray(k),y),this.trigger("data",y);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([_,k,y]):this.processPes_(_,k,y)},this.processPes_=function(_,y,k){k.streamType=k.pid===this.programMapTable.video?Rt.H264_STREAM_TYPE:k.pid===this.programMapTable.audio?Rt.ADTS_STREAM_TYPE:this.programMapTable["timed-metadata"][k.pid],k.type="pes",k.data=_.subarray(y),this.trigger("data",k)}},Ln.prototype=new n,Ln.STREAM_TYPES={h264:27,adts:15},za=function(){var y,c=this,p=!1,h={data:[],size:0},m={data:[],size:0},_={data:[],size:0},I=function(O,M,G){var Zt,fe=new Uint8Array(O.size),Se={type:M},ae=0,Be=0,kt=!1;if(O.data.length&&!(O.size<9)){for(Se.trackId=O.data[0].pid,ae=0;ae>>3,M.pts*=4,M.pts+=(6&O[13])>>>1,M.dts=M.pts,64&G&&(M.dts=(14&O[14])<<27|(255&O[15])<<20|(254&O[16])<<12|(255&O[17])<<5|(254&O[18])>>>3,M.dts*=4,M.dts+=(6&O[18])>>>1)),M.data=O.subarray(9+O[8]))})(fe,Se),kt="video"===M||Se.packetLength<=O.size,(G||kt)&&(O.size=0,O.data.length=0),kt&&c.trigger("data",Se)}};za.prototype.init.call(this),this.push=function(L){({pat:function(){},pes:function(){var M,G;switch(L.streamType){case Rt.H264_STREAM_TYPE:M=h,G="video";break;case Rt.ADTS_STREAM_TYPE:M=m,G="audio";break;case Rt.METADATA_STREAM_TYPE:M=_,G="timed-metadata";break;default:return}L.payloadUnitStartIndicator&&I(M,G,!0),M.data.push(L),M.size+=L.data.byteLength},pmt:function(){var M={type:"metadata",tracks:[]};null!==(y=L.programMapTable).video&&M.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.video,codec:"avc",type:"video"}),null!==y.audio&&M.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.audio,codec:"adts",type:"audio"}),p=!0,c.trigger("data",M)}})[L.type]()},this.reset=function(){h.size=0,h.data.length=0,m.size=0,m.data.length=0,this.trigger("reset")},this.flushStreams_=function(){I(h,"video"),I(m,"audio"),I(_,"timed-metadata")},this.flush=function(){if(!p&&y){var L={type:"metadata",tracks:[]};null!==y.video&&L.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.video,codec:"avc",type:"video"}),null!==y.audio&&L.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.audio,codec:"adts",type:"audio"}),c.trigger("data",L)}p=!1,this.flushStreams_(),this.trigger("done")}},za.prototype=new n;var kc={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:Ka,TransportParseStream:Ln,ElementaryStream:za,TimestampRolloverStream:J0,CaptionStream:qa.CaptionStream,Cea608Stream:qa.Cea608Stream,Cea708Stream:qa.Cea708Stream,MetadataStream:X0};for(var Yo in Rt)Rt.hasOwnProperty(Yo)&&(kc[Yo]=Rt[Yo]);var Ya,Hi=kc,Ac=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];Ya=function(c){var p,h=0;Ya.prototype.init.call(this),this.skipWarn_=function(m,_){this.trigger("log",{level:"warn",message:"adts skiping bytes "+m+" to "+_+" in frame "+h+" outside syncword"})},this.push=function(m){var y,k,I,L,O,_=0;if(c||(h=0),"audio"===m.type){p&&p.length?(I=p,(p=new Uint8Array(I.byteLength+m.data.byteLength)).set(I),p.set(m.data,I.byteLength)):p=m.data;for(var M;_+7>>2],p.byteLength-_<(y=(3&p[_+3])<<11|p[_+4]<<3|(224&p[_+5])>>5))break;this.trigger("data",{pts:m.pts+h*O,dts:m.dts+h*O,sampleCount:L,audioobjecttype:1+(p[_+2]>>>6&3),channelcount:(1&p[_+2])<<2|(192&p[_+3])>>>6,samplerate:Ac[(60&p[_+2])>>>2],samplingfrequencyindex:(60&p[_+2])>>>2,samplesize:16,data:p.subarray(_+7+k,_+y)}),h++,_+=y}else"number"!=typeof M&&(M=_),_++;"number"==typeof M&&(this.skipWarn_(M,_),M=null),p=p.subarray(_)}},this.flush=function(){h=0,this.trigger("done")},this.reset=function(){p=void 0,this.trigger("reset")},this.endTimeline=function(){p=void 0,this.trigger("endedtimeline")}},Ya.prototype=new n;var Ic,wc=Ya;Ic=function(c){var p=c.byteLength,h=0,m=0;this.length=function(){return 8*p},this.bitsAvailable=function(){return 8*p+m},this.loadWord=function(){var _=c.byteLength-p,y=new Uint8Array(4),k=Math.min(4,p);if(0===k)throw new Error("no bytes available");y.set(c.subarray(_,_+k)),h=new DataView(y.buffer).getUint32(0),m=8*k,p-=k},this.skipBits=function(_){var y;m>_?(h<<=_,m-=_):(_-=m,_-=8*(y=Math.floor(_/8)),p-=y,this.loadWord(),h<<=_,m-=_)},this.readBits=function(_){var y=Math.min(m,_),k=h>>>32-y;return(m-=y)>0?h<<=y:p>0&&this.loadWord(),(y=_-y)>0?k<>>_))return h<<=_,m-=_,_;return this.loadWord(),_+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var _=this.skipLeadingZeros();return this.readBits(_+1)-1},this.readExpGolomb=function(){var _=this.readUnsignedExpGolomb();return 1&_?1+_>>>1:-1*(_>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var $a,Rn,Dc,ty=Ic;Rn=function(){var p,h,c=0;Rn.prototype.init.call(this),this.push=function(m){var _;h?((_=new Uint8Array(h.byteLength+m.data.byteLength)).set(h),_.set(m.data,h.byteLength),h=_):h=m.data;for(var y=h.byteLength;c3&&this.trigger("data",h.subarray(c+3)),h=null,c=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},Rn.prototype=new n,Dc={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},$a=function(){var p,h,m,_,y,k,I,c=new Rn;$a.prototype.init.call(this),p=this,this.push=function(L){"video"===L.type&&(h=L.trackId,m=L.pts,_=L.dts,c.push(L))},c.on("data",function(L){var O={trackId:h,pts:m,dts:_,data:L,nalUnitTypeCode:31&L[0]};switch(O.nalUnitTypeCode){case 5:O.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:O.nalUnitType="sei_rbsp",O.escapedRBSP=y(L.subarray(1));break;case 7:O.nalUnitType="seq_parameter_set_rbsp",O.escapedRBSP=y(L.subarray(1)),O.config=k(O.escapedRBSP);break;case 8:O.nalUnitType="pic_parameter_set_rbsp";break;case 9:O.nalUnitType="access_unit_delimiter_rbsp"}p.trigger("data",O)}),c.on("done",function(){p.trigger("done")}),c.on("partialdone",function(){p.trigger("partialdone")}),c.on("reset",function(){p.trigger("reset")}),c.on("endedtimeline",function(){p.trigger("endedtimeline")}),this.flush=function(){c.flush()},this.partialFlush=function(){c.partialFlush()},this.reset=function(){c.reset()},this.endTimeline=function(){c.endTimeline()},I=function(O,M){var Se,G=8,fe=8;for(Se=0;Se=0?h:0,(16&c[p+5])>>4?h+20:h+10},ny=function b(c,p){return c.length-p<10||c[p]!=="I".charCodeAt(0)||c[p+1]!=="D".charCodeAt(0)||c[p+2]!=="3".charCodeAt(0)?p:b(c,p+=Pc(c,p))},Oc=function(c){return c[0]<<21|c[1]<<14|c[2]<<7|c[3]},oy=function(c,p,h){return unescape(function(c,p,h){var m,_="";for(m=p;m=p+2&&255==(255&c[p])&&240==(240&c[p+1])&&16==(22&c[p+1])},parseId3TagSize:Pc,parseAdtsSize:function(c,p){return 6144&c[p+3]|c[p+4]<<3|(224&c[p+5])>>5},parseType:function(c,p){return c[p]==="I".charCodeAt(0)&&c[p+1]==="D".charCodeAt(0)&&c[p+2]==="3".charCodeAt(0)?"timed-metadata":!0&c[p]&&240==(240&c[p+1])?"audio":null},parseSampleRate:function(c){for(var p=0;p+5>>2];p++}return null},parseAacTimestamp:function(c){var p,h,m;p=10,64&c[5]&&(p+=4,p+=Oc(c.subarray(10,14)));do{if((h=Oc(c.subarray(p+4,p+8)))<1)return null;if("PRIV"===String.fromCharCode(c[p],c[p+1],c[p+2],c[p+3])){m=c.subarray(p+10,p+h+10);for(var y=0;y>>2;return(L*=4)+(3&I[7])}break}}p+=10,p+=h}while(p=3;)if(c[_]!=="I".charCodeAt(0)||c[_+1]!=="D".charCodeAt(0)||c[_+2]!=="3".charCodeAt(0))if(255!=(255&c[_])||240!=(240&c[_+1]))_++;else{if(c.length-_<7||_+(m=Qa.parseAdtsSize(c,_))>c.length)break;I={type:"audio",data:c.subarray(_,_+m),pts:p,dts:p},this.trigger("data",I),_+=m}else{if(c.length-_<10||_+(m=Qa.parseId3TagSize(c,_))>c.length)break;k={type:"timed-metadata",data:c.subarray(_,_+m)},this.trigger("data",k),_+=m}c=c.length-_>0?c.subarray(_):new Uint8Array},this.reset=function(){c=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){c=new Uint8Array,this.trigger("endedtimeline")}},Xa.prototype=new n;var Mn,en,Ja,vr,fy=Xa,$o=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],Qo=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],my=iy.H264Stream,gy=Qa.isLikelyAacData,_y=function(c,p){p.stream=c,this.trigger("log",p)},Lc=function(c,p){for(var h=Object.keys(p),m=0;m=h?c:(p.minSegmentDts=1/0,c.filter(function(m){return m.dts>=h&&(p.minSegmentDts=Math.min(p.minSegmentDts,m.dts),p.minSegmentPts=p.minSegmentDts,!0)}))}(h,c,_),c.baseMediaDecodeTime=gi_calculateTrackBaseMediaDecodeTime(c,p.keepOriginalTimestamps),Se=Fa_prefixWithSilence(c,I,y,k),c.samples=function(c){var p,m=[];for(p=0;p1&&(p=c.shift(),c.byteLength-=p.byteLength,c.nalCount-=p.nalCount,c[0][0].dts=p.dts,c[0][0].pts=p.pts,c[0][0].duration+=p.duration),c}(O)),_.length){var kt;if(!(kt=p.alignGopsAtEnd?this.alignGopsAtEnd_(O):this.alignGopsAtStart_(O)))return this.gopCache_.unshift({gop:O.pop(),pps:c.pps,sps:c.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),m=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");gi_clearDtsInfo(c),O=kt}gi_collectDtsInfo(c,O),c.samples=function(c,p){var h,m,_,y,I=p||0,L=[];for(h=0;h=-1e4&&G<=45e3&&(!fe||M>G)&&(fe=ae,M=G));return fe?fe.gop:null},this.alignGopsAtStart_=function(I){var L,O,M,G,fe,Se,ae,Be;for(fe=I.byteLength,Se=I.nalCount,ae=I.duration,L=O=0;L<_.length&&OM.pts?L++:(O++,fe-=G.byteLength,Se-=G.nalCount,ae-=G.duration);return 0===O?I:O===I.length?null:((Be=I.slice(O)).byteLength=fe,Be.duration=ae,Be.nalCount=Se,Be.pts=Be[0].pts,Be.dts=Be[0].dts,Be)},this.alignGopsAtEnd_=function(I){var L,O,M,G,fe,Se,ae;for(L=_.length-1,O=I.length-1,fe=null,Se=!1;L>=0&&O>=0;){if((M=_[L]).pts===(G=I[O]).pts){Se=!0;break}M.pts>G.pts?L--:(L===_.length-1&&(fe=O),O--)}if(!Se&&null===fe)return null;if(0===(ae=Se?O:fe))return I;var Be=I.slice(ae),kt=Be.reduce(function(Zt,Tr){return Zt.byteLength+=Tr.byteLength,Zt.duration+=Tr.duration,Zt.nalCount+=Tr.nalCount,Zt},{byteLength:0,duration:0,nalCount:0});return Be.byteLength=kt.byteLength,Be.duration=kt.duration,Be.nalCount=kt.nalCount,Be.pts=Be[0].pts,Be.dts=Be[0].dts,Be},this.alignGopsWith=function(I){_=I}},Mn.prototype=new n,vr=function(c,p){this.numberOfTracks=0,this.metadataStream=p,this.remuxTracks=!(typeof(c=c||{}).remux<"u"&&!c.remux),this.keepOriginalTimestamps="boolean"==typeof c.keepOriginalTimestamps&&c.keepOriginalTimestamps,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,vr.prototype.init.call(this),this.push=function(h){return h.text?this.pendingCaptions.push(h):h.frames?this.pendingMetadata.push(h):(this.pendingTracks.push(h.track),this.pendingBytes+=h.boxes.byteLength,"video"===h.track.type&&(this.videoTrack=h.track,this.pendingBoxes.push(h.boxes)),void("audio"===h.track.type&&(this.audioTrack=h.track,this.pendingBoxes.unshift(h.boxes))))}},vr.prototype=new n,vr.prototype.flush=function(b){var h,m,_,k,c=0,p={captions:[],captionStreams:{},metadata:[],info:{}},y=0;if(this.pendingTracks.length=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(y=this.videoTrack.timelineStartInfo.pts,Qo.forEach(function(I){p.info[I]=this.videoTrack[I]},this)):this.audioTrack&&(y=this.audioTrack.timelineStartInfo.pts,$o.forEach(function(I){p.info[I]=this.audioTrack[I]},this)),this.videoTrack||this.audioTrack){for(p.type=1===this.pendingTracks.length?this.pendingTracks[0].type:"combined",this.emittedTracks+=this.pendingTracks.length,_=function(c){var m,p=d(),h=E(c);return(m=new Uint8Array(p.byteLength+h.byteLength)).set(p),m.set(h,p.byteLength),m}(this.pendingTracks),p.initSegment=new Uint8Array(_.byteLength),p.initSegment.set(_),p.data=new Uint8Array(this.pendingBytes),k=0;k=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},vr.prototype.setRemux=function(b){this.remuxTracks=b},Ja=function(c){var m,_,p=this,h=!0;Ja.prototype.init.call(this),this.baseMediaDecodeTime=(c=c||{}).baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var y={};this.transmuxPipeline_=y,y.type="aac",y.metadataStream=new Hi.MetadataStream,y.aacStream=new fy,y.audioTimestampRolloverStream=new Hi.TimestampRolloverStream("audio"),y.timedMetadataTimestampRolloverStream=new Hi.TimestampRolloverStream("timed-metadata"),y.adtsStream=new wc,y.coalesceStream=new vr(c,y.metadataStream),y.headOfPipeline=y.aacStream,y.aacStream.pipe(y.audioTimestampRolloverStream).pipe(y.adtsStream),y.aacStream.pipe(y.timedMetadataTimestampRolloverStream).pipe(y.metadataStream).pipe(y.coalesceStream),y.metadataStream.on("timestamp",function(k){y.aacStream.setTimestamp(k.timeStamp)}),y.aacStream.on("data",function(k){"timed-metadata"!==k.type&&"audio"!==k.type||y.audioSegmentStream||(_=_||{timelineStartInfo:{baseMediaDecodeTime:p.baseMediaDecodeTime},codec:"adts",type:"audio"},y.coalesceStream.numberOfTracks++,y.audioSegmentStream=new en(_,c),y.audioSegmentStream.on("log",p.getLogTrigger_("audioSegmentStream")),y.audioSegmentStream.on("timingInfo",p.trigger.bind(p,"audioTimingInfo")),y.adtsStream.pipe(y.audioSegmentStream).pipe(y.coalesceStream),p.trigger("trackinfo",{hasAudio:!!_,hasVideo:!!m}))}),y.coalesceStream.on("data",this.trigger.bind(this,"data")),y.coalesceStream.on("done",this.trigger.bind(this,"done")),Lc(this,y)},this.setupTsPipeline=function(){var y={};this.transmuxPipeline_=y,y.type="ts",y.metadataStream=new Hi.MetadataStream,y.packetStream=new Hi.TransportPacketStream,y.parseStream=new Hi.TransportParseStream,y.elementaryStream=new Hi.ElementaryStream,y.timestampRolloverStream=new Hi.TimestampRolloverStream,y.adtsStream=new wc,y.h264Stream=new my,y.captionStream=new Hi.CaptionStream(c),y.coalesceStream=new vr(c,y.metadataStream),y.headOfPipeline=y.packetStream,y.packetStream.pipe(y.parseStream).pipe(y.elementaryStream).pipe(y.timestampRolloverStream),y.timestampRolloverStream.pipe(y.h264Stream),y.timestampRolloverStream.pipe(y.adtsStream),y.timestampRolloverStream.pipe(y.metadataStream).pipe(y.coalesceStream),y.h264Stream.pipe(y.captionStream).pipe(y.coalesceStream),y.elementaryStream.on("data",function(k){var I;if("metadata"===k.type){for(I=k.tracks.length;I--;)m||"video"!==k.tracks[I].type?!_&&"audio"===k.tracks[I].type&&((_=k.tracks[I]).timelineStartInfo.baseMediaDecodeTime=p.baseMediaDecodeTime):(m=k.tracks[I]).timelineStartInfo.baseMediaDecodeTime=p.baseMediaDecodeTime;m&&!y.videoSegmentStream&&(y.coalesceStream.numberOfTracks++,y.videoSegmentStream=new Mn(m,c),y.videoSegmentStream.on("log",p.getLogTrigger_("videoSegmentStream")),y.videoSegmentStream.on("timelineStartInfo",function(L){_&&!c.keepOriginalTimestamps&&(_.timelineStartInfo=L,y.audioSegmentStream.setEarliestDts(L.dts-p.baseMediaDecodeTime))}),y.videoSegmentStream.on("processedGopsInfo",p.trigger.bind(p,"gopInfo")),y.videoSegmentStream.on("segmentTimingInfo",p.trigger.bind(p,"videoSegmentTimingInfo")),y.videoSegmentStream.on("baseMediaDecodeTime",function(L){_&&y.audioSegmentStream.setVideoBaseMediaDecodeTime(L)}),y.videoSegmentStream.on("timingInfo",p.trigger.bind(p,"videoTimingInfo")),y.h264Stream.pipe(y.videoSegmentStream).pipe(y.coalesceStream)),_&&!y.audioSegmentStream&&(y.coalesceStream.numberOfTracks++,y.audioSegmentStream=new en(_,c),y.audioSegmentStream.on("log",p.getLogTrigger_("audioSegmentStream")),y.audioSegmentStream.on("timingInfo",p.trigger.bind(p,"audioTimingInfo")),y.audioSegmentStream.on("segmentTimingInfo",p.trigger.bind(p,"audioSegmentTimingInfo")),y.adtsStream.pipe(y.audioSegmentStream).pipe(y.coalesceStream)),p.trigger("trackinfo",{hasAudio:!!_,hasVideo:!!m})}}),y.coalesceStream.on("data",this.trigger.bind(this,"data")),y.coalesceStream.on("id3Frame",function(k){k.dispatchType=y.metadataStream.dispatchType,p.trigger("id3Frame",k)}),y.coalesceStream.on("caption",this.trigger.bind(this,"caption")),y.coalesceStream.on("done",this.trigger.bind(this,"done")),Lc(this,y)},this.setBaseMediaDecodeTime=function(y){var k=this.transmuxPipeline_;c.keepOriginalTimestamps||(this.baseMediaDecodeTime=y),_&&(_.timelineStartInfo.dts=void 0,_.timelineStartInfo.pts=void 0,gi_clearDtsInfo(_),k.audioTimestampRolloverStream&&k.audioTimestampRolloverStream.discontinuity()),m&&(k.videoSegmentStream&&(k.videoSegmentStream.gopCache_=[]),m.timelineStartInfo.dts=void 0,m.timelineStartInfo.pts=void 0,gi_clearDtsInfo(m),k.captionStream.reset()),k.timestampRolloverStream&&k.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(y){_&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(y)},this.setRemux=function(y){var k=this.transmuxPipeline_;c.remux=y,k&&k.coalesceStream&&k.coalesceStream.setRemux(y)},this.alignGopsWith=function(y){m&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(y)},this.getLogTrigger_=function(y){var k=this;return function(I){I.stream=y,k.trigger("log",I)}},this.push=function(y){if(h){var k=gy(y);k&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():!k&&"ts"!==this.transmuxPipeline_.type&&this.setupTsPipeline(),h=!1}this.transmuxPipeline_.headOfPipeline.push(y)},this.flush=function(){h=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},Ja.prototype=new n;var Hc,Wc,Jo,yy={Transmuxer:Ja,VideoSegmentStream:Mn,AudioSegmentStream:en,AUDIO_PROPERTIES:$o,VIDEO_PROPERTIES:Qo,generateSegmentTimingInfo:Xo},es_toUnsigned=function(c){return c>>>0},_r=function(c){var p="";return p+=String.fromCharCode(c[0]),p+=String.fromCharCode(c[1]),(p+=String.fromCharCode(c[2]))+String.fromCharCode(c[3])},Sy=es_toUnsigned,ft=function b(c,p){var m,_,y,k,I,h=[];if(!p.length)return null;for(m=0;m1?m+_:c.byteLength,y===p[0]&&(1===p.length?h.push(c.subarray(m+8,k)):(I=b(c.subarray(m+8,k),p.slice(1))).length&&(h=h.concat(I))),m=k;return h},Cy=es_toUnsigned,ky=e.getUint64,Uc=function(c){return{isLeading:(12&c[0])>>>2,dependsOn:3&c[0],isDependedOn:(192&c[1])>>>6,hasRedundancy:(48&c[1])>>>4,paddingValue:(14&c[1])>>>1,isNonSyncSample:1&c[1],degradationPriority:c[2]<<8|c[3]}},Bc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Nn=typeof window<"u"?window:typeof Bc<"u"?Bc:typeof self<"u"?self:{},Py=function(c){for(var _,y,p=c.byteLength,h=[],m=1;m0?function(c){var p={version:c[0],flags:new Uint8Array(c.subarray(1,4))};return p.baseMediaDecodeTime=1===p.version?ky(c.subarray(4)):Cy(c[4]<<24|c[5]<<16|c[6]<<8|c[7]),p}(fe[0]).baseMediaDecodeTime:0,ae=ft(L,["trun"]);p===G&&ae.length>0&&(Be=function(c,p,h){var m=p,_=h.defaultSampleDuration||0,y=h.defaultSampleSize||0,k=h.trackId,I=[];return c.forEach(function(L){var M=function(c){var G,p={version:c[0],flags:new Uint8Array(c.subarray(1,4)),samples:[]},h=new DataView(c.buffer,c.byteOffset,c.byteLength),m=1&p.flags[2],_=4&p.flags[2],y=1&p.flags[1],k=2&p.flags[1],I=4&p.flags[1],L=8&p.flags[1],O=h.getUint32(4),M=8;for(m&&(p.dataOffset=h.getInt32(M),M+=4),_&&O&&(G={flags:Uc(c.subarray(M,M+4))},M+=4,y&&(G.duration=h.getUint32(M),M+=4),k&&(G.size=h.getUint32(M),M+=4),L&&(G.compositionTimeOffset=1===p.version?h.getInt32(M):h.getUint32(M),M+=4),p.samples.push(G),O--);O--;)G={},y&&(G.duration=h.getUint32(M),M+=4),k&&(G.size=h.getUint32(M),M+=4),I&&(G.flags=Uc(c.subarray(M,M+4)),M+=4),L&&(G.compositionTimeOffset=1===p.version?h.getInt32(M):h.getUint32(M),M+=4),p.samples.push(G);return p}(L).samples;M.forEach(function(G){void 0===G.duration&&(G.duration=_),void 0===G.size&&(G.size=y),G.trackId=k,G.dts=m,void 0===G.compositionTimeOffset&&(G.compositionTimeOffset=0),"bigint"==typeof m?(G.pts=m+Nn.BigInt(G.compositionTimeOffset),m+=Nn.BigInt(G.duration)):(G.pts=m+G.compositionTimeOffset,m+=G.duration)}),I=I.concat(M)}),I}(ae,Se,M),kt=function(c,p,h){var y,k,I,L,m=new DataView(c.buffer,c.byteOffset,c.byteLength),_={logs:[],seiNals:[]};for(k=0;k+40;){var G=h.shift();this.parse(G,L,O)}return M=function(c,p,h){if(null===p)return null;var _=Uy(c,p)[p]||{};return{seiNals:_.seiNals,logs:_.logs,timescale:h}}(I,m,_),M&&M.logs&&(y.logs=y.logs.concat(M.logs)),null!==M&&M.seiNals?(this.pushNals(M.seiNals),this.flushStream(),y):y.logs.length?{logs:y.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(I){if(!this.isInitialized()||!I||0===I.length)return null;I.forEach(function(L){p.push(L)})},this.flushStream=function(){if(!this.isInitialized())return null;k?p.partialFlush():p.flush()},this.clearParsedCaptions=function(){y.captions=[],y.captionStreams={},y.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;p.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){h=[],m=null,_=null,y?this.clearParsedCaptions():y={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},ts=es_toUnsigned,Fn=function(c){return("00"+c.toString(16)).slice(-2)},jy=e.getUint64;Hc=function(c,p){var m=ft(p,["moof","traf"]).reduce(function(_,y){var G,fe,k=ft(y,["tfhd"])[0],I=ts(k[4]<<24|k[5]<<16|k[6]<<8|k[7]),L=c[I]||9e4,O=ft(y,["tfdt"])[0],M=new DataView(O.buffer,O.byteOffset,O.byteLength);return"bigint"==typeof(G=1===O[0]?jy(O.subarray(4,12)):M.getUint32(4))?fe=G/Nn.BigInt(L):"number"==typeof G&&!isNaN(G)&&(fe=G/L),fe11?(_.codec+=".",_.codec+=Fn(Se[9]),_.codec+=Fn(Se[10]),_.codec+=Fn(Se[11])):_.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(_.codec)?(Se=fe.subarray(28),"esds"===_r(Se.subarray(4,8))&&Se.length>20&&0!==Se[19]?(_.codec+="."+Fn(Se[19]),_.codec+="."+Fn(Se[20]>>>2&63).replace(/^0/,"")):_.codec="mp4a.40.2"):_.codec=_.codec.toLowerCase())}var Be=ft(m,["mdia","mdhd"])[0];Be&&(_.timescale=Jo(Be)),h.push(_)}),h};var Gc_startTime=Hc,Gc_tracks=Wc,Zc=function(c){var p=31&c[1];return(p<<=8)|c[2]},is=function(c){return!!(64&c[1])},rs=function(c){var p=0;return(48&c[3])>>>4>1&&(p+=c[4]+1),p},eu=function(c){switch(c){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},Ky={parseType:function(c,p){var h=Zc(c);return 0===h?"pat":h===p?"pmt":p?"pes":null},parsePat:function(c){var p=is(c),h=4+rs(c);return p&&(h+=c[h]+1),(31&c[h+10])<<8|c[h+11]},parsePmt:function(c){var p={},h=is(c),m=4+rs(c);if(h&&(m+=c[m]+1),1&c[m+5]){var y;y=3+((15&c[m+1])<<8|c[m+2])-4;for(var I=12+((15&c[m+10])<<8|c[m+11]);I=c.byteLength)return null;var _,m=null;return 192&(_=c[h+7])&&((m={}).pts=(14&c[h+9])<<27|(255&c[h+10])<<20|(254&c[h+11])<<12|(255&c[h+12])<<5|(254&c[h+13])>>>3,m.pts*=4,m.pts+=(6&c[h+13])>>>1,m.dts=m.pts,64&_&&(m.dts=(14&c[h+14])<<27|(255&c[h+15])<<20|(254&c[h+16])<<12|(255&c[h+17])<<5|(254&c[h+18])>>>3,m.dts*=4,m.dts+=(6&c[h+18])>>>1)),m},videoPacketContainsKeyFrame:function(c){for(var p=4+rs(c),h=c.subarray(p),m=0,_=0,y=!1;_3&&"slice_layer_without_partitioning_rbsp_idr"===eu(31&h[_+3])&&(y=!0),y}},tn=Sc_handleRollover,tt={};tt.ts=Ky,tt.aac=Qa;var yr=9e4,Gt=188,Kc=function(c,p,h){for(var y,I,L,O,m=0,_=Gt,M=!1;_<=c.byteLength;)if(71!==c[m]||71!==c[_]&&_!==c.byteLength)m++,_++;else{if("pes"===(y=c.subarray(m,_),tt.ts.parseType(y,p.pid))&&(I=tt.ts.parsePesType(y,p.table),L=tt.ts.parsePayloadUnitStartIndicator(y),"audio"===I&&L&&(O=tt.ts.parsePesTime(y))&&(O.type="audio",h.audio.push(O),M=!0)),M)break;m+=Gt,_+=Gt}for(m=(_=c.byteLength)-Gt,M=!1;m>=0;)if(71!==c[m]||71!==c[_]&&_!==c.byteLength)m--,_--;else{if("pes"===(y=c.subarray(m,_),tt.ts.parseType(y,p.pid))&&(I=tt.ts.parsePesType(y,p.table),L=tt.ts.parsePayloadUnitStartIndicator(y),"audio"===I&&L&&(O=tt.ts.parsePesTime(y))&&(O.type="audio",h.audio.push(O),M=!0)),M)break;m-=Gt,_-=Gt}},Yy=function(c,p,h){for(var y,I,L,O,M,G,fe,m=0,_=Gt,Se=!1,ae={data:[],size:0};_=0;)if(71!==c[m]||71!==c[_])m--,_--;else{if("pes"===(y=c.subarray(m,_),tt.ts.parseType(y,p.pid))&&(I=tt.ts.parsePesType(y,p.table),L=tt.ts.parsePayloadUnitStartIndicator(y),"video"===I&&L&&(O=tt.ts.parsePesTime(y))&&(O.type="video",h.video.push(O),Se=!0)),Se)break;m-=Gt,_-=Gt}},eT_inspect=function(c,p){var m;return m=tt.aac.isLikelyAacData(c)?function(c){for(var I,p=!1,h=0,m=null,_=null,y=0,k=0;c.length-k>=3;){switch(tt.aac.parseType(c,k)){case"timed-metadata":if(c.length-k<10){p=!0;break}if((y=tt.aac.parseId3TagSize(c,k))>c.length){p=!0;break}null===_&&(I=c.subarray(k,k+y),_=tt.aac.parseAacTimestamp(I)),k+=y;break;case"audio":if(c.length-k<7){p=!0;break}if((y=tt.aac.parseAdtsSize(c,k))>c.length){p=!0;break}null===m&&(I=c.subarray(k,k+y),m=tt.aac.parseSampleRate(I)),h++,k+=y;break;default:k++}if(p)return null}if(null===m||null===_)return null;var O=yr/m;return{audio:[{type:"audio",dts:_,pts:_},{type:"audio",dts:_+1024*h*O,pts:_+1024*h*O}]}}(c):function(c){var p={pid:null,table:null},h={};for(var m in function(c,p){for(var _,h=0,m=Gt;m"u"||isNaN(h))&&(h=c.audio[0].dts),c.audio.forEach(function(y){y.dts=tn(y.dts,h),y.pts=tn(y.pts,h),y.dtsTime=y.dts/yr,y.ptsTime=y.pts/yr})}if(c.video&&c.video.length){var m=p;if((typeof m>"u"||isNaN(m))&&(m=c.video[0].dts),c.video.forEach(function(y){y.dts=tn(y.dts,m),y.pts=tn(y.pts,m),y.dtsTime=y.dts/yr,y.ptsTime=y.pts/yr}),c.firstKeyFrame){var _=c.firstKeyFrame;_.dts=tn(_.dts,m),_.pts=tn(_.pts,m),_.dtsTime=_.dts/yr,_.ptsTime=_.pts/yr}}}(m,p),m):null},zc=function(){function b(p,h){this.options=h||{},this.self=p,this.init()}var c=b.prototype;return c.init=function(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new yy.Transmuxer(this.options),function(c,p){p.on("data",function(h){var m=h.initSegment;h.initSegment={data:m.buffer,byteOffset:m.byteOffset,byteLength:m.byteLength};var _=h.data;h.data=_.buffer,c.postMessage({action:"data",segment:h,byteOffset:_.byteOffset,byteLength:_.byteLength},[h.data])}),p.on("done",function(h){c.postMessage({action:"done"})}),p.on("gopInfo",function(h){c.postMessage({action:"gopInfo",gopInfo:h})}),p.on("videoSegmentTimingInfo",function(h){var m={start:{decode:Qe_videoTsToSeconds(h.start.dts),presentation:Qe_videoTsToSeconds(h.start.pts)},end:{decode:Qe_videoTsToSeconds(h.end.dts),presentation:Qe_videoTsToSeconds(h.end.pts)},baseMediaDecodeTime:Qe_videoTsToSeconds(h.baseMediaDecodeTime)};h.prependedContentDuration&&(m.prependedContentDuration=Qe_videoTsToSeconds(h.prependedContentDuration)),c.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:m})}),p.on("audioSegmentTimingInfo",function(h){var m={start:{decode:Qe_videoTsToSeconds(h.start.dts),presentation:Qe_videoTsToSeconds(h.start.pts)},end:{decode:Qe_videoTsToSeconds(h.end.dts),presentation:Qe_videoTsToSeconds(h.end.pts)},baseMediaDecodeTime:Qe_videoTsToSeconds(h.baseMediaDecodeTime)};h.prependedContentDuration&&(m.prependedContentDuration=Qe_videoTsToSeconds(h.prependedContentDuration)),c.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:m})}),p.on("id3Frame",function(h){c.postMessage({action:"id3Frame",id3Frame:h})}),p.on("caption",function(h){c.postMessage({action:"caption",caption:h})}),p.on("trackinfo",function(h){c.postMessage({action:"trackinfo",trackInfo:h})}),p.on("audioTimingInfo",function(h){c.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:Qe_videoTsToSeconds(h.start),end:Qe_videoTsToSeconds(h.end)}})}),p.on("videoTimingInfo",function(h){c.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:Qe_videoTsToSeconds(h.start),end:Qe_videoTsToSeconds(h.end)}})}),p.on("log",function(h){c.postMessage({action:"log",log:h})})}(this.self,this.transmuxer)},c.pushMp4Captions=function(h){this.captionParser||(this.captionParser=new By,this.captionParser.init());var m=new Uint8Array(h.data,h.byteOffset,h.byteLength),_=this.captionParser.parse(m,h.trackIds,h.timescales);this.self.postMessage({action:"mp4Captions",captions:_&&_.captions||[],logs:_&&_.logs||[],data:m.buffer},[m.buffer])},c.probeMp4StartTime=function(h){var _=h.data,y=Gc_startTime(h.timescales,_);this.self.postMessage({action:"probeMp4StartTime",startTime:y,data:_},[_.buffer])},c.probeMp4Tracks=function(h){var m=h.data,_=Gc_tracks(m);this.self.postMessage({action:"probeMp4Tracks",tracks:_,data:m},[m.buffer])},c.probeTs=function(h){var m=h.data,_=h.baseStartTime,y="number"!=typeof _||isNaN(_)?void 0:9e4*_,k=eT_inspect(m,y),I=null;k&&((I={hasVideo:k.video&&2===k.video.length||!1,hasAudio:k.audio&&2===k.audio.length||!1}).hasVideo&&(I.videoStart=k.video[0].ptsTime),I.hasAudio&&(I.audioStart=k.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:I,data:m},[m.buffer])},c.clearAllMp4Captions=function(){this.captionParser&&this.captionParser.clearAllCaptions()},c.clearParsedMp4Captions=function(){this.captionParser&&this.captionParser.clearParsedCaptions()},c.push=function(h){var m=new Uint8Array(h.data,h.byteOffset,h.byteLength);this.transmuxer.push(m)},c.reset=function(){this.transmuxer.reset()},c.setTimestampOffset=function(h){this.transmuxer.setBaseMediaDecodeTime(Math.round(Qe_secondsToVideoTs(h.timestampOffset||0)))},c.setAudioAppendStart=function(h){this.transmuxer.setAudioAppendStart(Math.ceil(Qe_secondsToVideoTs(h.appendStart)))},c.setRemux=function(h){this.transmuxer.setRemux(h.remux)},c.flush=function(h){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})},c.endTimeline=function(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})},c.alignGopsWith=function(h){this.transmuxer.alignGopsWith(h.gopsToAlignWith.slice())},b}();self.onmessage=function(b){"init"===b.data.action&&b.data.options?this.messageHandlers=new zc(self,b.data.options):(this.messageHandlers||(this.messageHandlers=new zc(self)),b.data&&b.data.action&&"init"!==b.data.action&&this.messageHandlers[b.data.action]&&this.messageHandlers[b.data.action](b.data))}})),Hm=Pd(jm),Rd=function(n){var t=n.transmuxer,i=n.bytes,e=n.audioAppendStart,r=n.gopsToAlignWith,a=n.remux,o=n.onData,l=n.onTrackInfo,d=n.onAudioTimingInfo,f=n.onVideoTimingInfo,v=n.onVideoSegmentTimingInfo,g=n.onAudioSegmentTimingInfo,T=n.onId3,E=n.onCaptions,x=n.onDone,S=n.onEndedTimeline,N=n.onTransmuxerLog,F=n.isEndOfTimeline,j={buffer:[]},W=F;if(t.onmessage=function(ye){t.currentTransmux===n&&("data"===ye.data.action&&function(n,t,i){var e=n.data.segment,r=e.type,a=e.initSegment,f=e.videoFrameDtsTime,v=e.videoFramePtsTime;t.buffer.push({captions:e.captions,captionStreams:e.captionStreams,metadata:e.metadata});var g=n.data.segment.boxes||{data:n.data.segment.data},T={type:r,data:new Uint8Array(g.data,g.data.byteOffset,g.data.byteLength),initSegment:new Uint8Array(a.data,a.byteOffset,a.byteLength)};typeof f<"u"&&(T.videoFrameDtsTime=f),typeof v<"u"&&(T.videoFramePtsTime=v),i(T)}(ye,j,o),"trackinfo"===ye.data.action&&l(ye.data.trackInfo),"gopInfo"===ye.data.action&&function(n,t){t.gopInfo=n.data.gopInfo}(ye,j),"audioTimingInfo"===ye.data.action&&d(ye.data.audioTimingInfo),"videoTimingInfo"===ye.data.action&&f(ye.data.videoTimingInfo),"videoSegmentTimingInfo"===ye.data.action&&v(ye.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===ye.data.action&&g(ye.data.audioSegmentTimingInfo),"id3Frame"===ye.data.action&&T([ye.data.id3Frame],ye.data.id3Frame.dispatchType),"caption"===ye.data.action&&E(ye.data.caption),"endedtimeline"===ye.data.action&&(W=!1,S()),"log"===ye.data.action&&N(ye.data.log),"transmuxed"===ye.data.type&&(W||(t.onmessage=null,function(n){var t=n.transmuxedData,i=n.callback;t.buffer=[],i(t)}({transmuxedData:j,callback:x}),Md(t))))},e&&t.postMessage({action:"setAudioAppendStart",appendStart:e}),Array.isArray(r)&&t.postMessage({action:"alignGopsWith",gopsToAlignWith:r}),typeof a<"u"&&t.postMessage({action:"setRemux",remux:a}),i.byteLength){var ne=i instanceof ArrayBuffer?i:i.buffer,he=i instanceof ArrayBuffer?0:i.byteOffset;t.postMessage({action:"push",data:ne,byteOffset:he,byteLength:i.byteLength},[ne])}F&&t.postMessage({action:"endTimeline"}),t.postMessage({action:"flush"})},Md=function(n){n.currentTransmux=null,n.transmuxQueue.length&&(n.currentTransmux=n.transmuxQueue.shift(),"function"==typeof n.currentTransmux?n.currentTransmux():Rd(n.currentTransmux))},Ud=function(n,t){n.postMessage({action:t}),Md(n)},Do_reset=function(n){!function(n,t){if(!t.currentTransmux)return t.currentTransmux=n,void Ud(t,n);t.transmuxQueue.push(Ud.bind(null,t,n))}("reset",n)},ka=function(n){var t=n.transmuxer,i=n.endAction||n.action,e=n.callback,r=gt({},n,{endAction:null,transmuxer:null,callback:null});if(t.addEventListener("message",function d(f){f.data.action===i&&(t.removeEventListener("message",d),f.data.data&&(f.data.data=new Uint8Array(f.data.data,n.byteOffset||0,n.byteLength||f.data.data.byteLength),n.data&&(n.data=f.data.data)),e(f.data))}),n.data){var o=n.data instanceof ArrayBuffer;r.byteOffset=o?0:n.data.byteOffset,r.byteLength=n.data.byteLength,t.postMessage(r,[o?n.data:n.data.buffer])}else t.postMessage(r)},Po=function(n){n.forEach(function(t){t.abort()})},Oo=function(n,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:-101,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:-102,xhr:t}:n?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:2,xhr:t}:"arraybuffer"===t.responseType&&0===t.response.byteLength?{status:t.status,message:"Empty HLS response at URL: "+t.uri,code:2,xhr:t}:null},Bd=function(n,t,i){return function(e,r){var a=r.response,o=Oo(e,r);if(o)return i(o,n);if(16!==a.byteLength)return i({status:r.status,message:"Invalid HLS key at URL: "+r.uri,code:2,xhr:r},n);for(var l=new DataView(a),d=new Uint32Array([l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12)]),f=0;f0}(x)){t.isFmp4=!0;var S=t.map.tracks,N={isFmp4:!0,hasVideo:!!S.video,hasAudio:!!S.audio};S.audio&&S.audio.codec&&"enca"!==S.audio.codec&&(N.audioCodec=S.audio.codec),S.video&&S.video.codec&&"encv"!==S.video.codec&&(N.videoCodec=S.video.codec),S.video&&S.audio&&(N.isMuxed=!0),e(t,N);var F=function(W){g(t,{data:x,type:N.hasAudio&&!N.isMuxed?"audio":"video"}),W&&W.length&&d(t,W),T(null,t,{})};ka({action:"probeMp4StartTime",timescales:t.map.timescales,data:x,transmuxer:t.transmuxer,callback:function(W){var q=W.data,ne=W.startTime;i=q.buffer,t.bytes=x=q,N.hasAudio&&!N.isMuxed&&r(t,"audio","start",ne),N.hasVideo&&r(t,"video","start",ne),S.video&&q.byteLength&&t.transmuxer?ka({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:t.transmuxer,data:x,timescales:t.map.timescales,trackIds:[S.video.id],callback:function(K){i=K.data.buffer,t.bytes=x=K.data,K.logs.forEach(function(ye){E(U.mergeOptions(ye,{stream:"mp4CaptionParser"}))}),F(K.captions)}}):F()}})}else{if(t.transmuxer)return typeof t.container>"u"&&(t.container=vs(x)),"ts"!==t.container&&"aac"!==t.container?(e(t,{hasAudio:!1,hasVideo:!1}),void T(null,t,{})):void Xm({segment:t,bytes:i,trackInfoFn:e,timingInfoFn:r,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:l,captionsFn:d,isEndOfTimeline:f,endedTimelineFn:v,dataFn:g,doneFn:T,onTransmuxerLog:E});T(null,t,{})}},Vd=function(n,t){var l,i=n.id,e=n.key,r=n.encryptedBytes,a=n.decryptionWorker;a.addEventListener("message",function d(f){if(f.data.source===i){a.removeEventListener("message",d);var v=f.data.decrypted;t(new Uint8Array(v.bytes,v.byteOffset,v.byteLength))}}),l=e.bytes.slice?e.bytes.slice():new Uint32Array(Array.prototype.slice.call(e.bytes)),a.postMessage(Sd({source:i,encrypted:r,key:l,iv:e.iv}),[r.buffer,l.buffer])},rg=function(n){var t=n.xhr,i=n.xhrOptions,r=n.segment,a=n.abortFn,o=n.progressFn,l=n.trackInfoFn,d=n.timingInfoFn,f=n.videoSegmentTimingInfoFn,v=n.audioSegmentTimingInfoFn,g=n.id3Fn,T=n.captionsFn,E=n.isEndOfTimeline,x=n.endedTimelineFn,S=n.dataFn,j=[],W=function(n){var t=n.activeXhrs,i=n.decryptionWorker,e=n.trackInfoFn,r=n.timingInfoFn,a=n.videoSegmentTimingInfoFn,o=n.audioSegmentTimingInfoFn,l=n.id3Fn,d=n.captionsFn,f=n.isEndOfTimeline,v=n.endedTimelineFn,g=n.dataFn,T=n.doneFn,E=n.onTransmuxerLog,x=0,S=!1;return function(N,F){if(!S){if(N)return S=!0,Po(t),T(N,F);if((x+=1)===t.length){var j=function(){if(F.encryptedBytes)return function(n){var i=n.segment,e=n.trackInfoFn,r=n.timingInfoFn,a=n.videoSegmentTimingInfoFn,o=n.audioSegmentTimingInfoFn,l=n.id3Fn,d=n.captionsFn,f=n.isEndOfTimeline,v=n.endedTimelineFn,g=n.dataFn,T=n.doneFn,E=n.onTransmuxerLog;Vd({id:i.requestId,key:i.key,encryptedBytes:i.encryptedBytes,decryptionWorker:n.decryptionWorker},function(x){i.bytes=x,Hd({segment:i,bytes:i.bytes,trackInfoFn:e,timingInfoFn:r,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:l,captionsFn:d,isEndOfTimeline:f,endedTimelineFn:v,dataFn:g,doneFn:T,onTransmuxerLog:E})})}({decryptionWorker:i,segment:F,trackInfoFn:e,timingInfoFn:r,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:l,captionsFn:d,isEndOfTimeline:f,endedTimelineFn:v,dataFn:g,doneFn:T,onTransmuxerLog:E});Hd({segment:F,bytes:F.bytes,trackInfoFn:e,timingInfoFn:r,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:l,captionsFn:d,isEndOfTimeline:f,endedTimelineFn:v,dataFn:g,doneFn:T,onTransmuxerLog:E})};if(F.endOfAllRequests=Date.now(),F.map&&F.map.encryptedBytes&&!F.map.bytes)return Vd({decryptionWorker:i,id:F.requestId+"-init",encryptedBytes:F.map.encryptedBytes,key:F.map.key},function(W){F.map.bytes=W,jd(F,function(q){if(q)return Po(t),T(q,F);j()})});j()}}}}({activeXhrs:j,decryptionWorker:n.decryptionWorker,trackInfoFn:l,timingInfoFn:d,videoSegmentTimingInfoFn:f,audioSegmentTimingInfoFn:v,id3Fn:g,captionsFn:T,isEndOfTimeline:E,endedTimelineFn:x,dataFn:S,doneFn:n.doneFn,onTransmuxerLog:n.onTransmuxerLog});if(r.key&&!r.key.bytes){var q=[r.key];r.map&&!r.map.bytes&&r.map.key&&r.map.key.resolvedUri===r.key.resolvedUri&&q.push(r.map.key);var K=t(U.mergeOptions(i,{uri:r.key.resolvedUri,responseType:"arraybuffer"}),Bd(r,q,W));j.push(K)}if(r.map&&!r.map.bytes){if(r.map.key&&(!r.key||r.key.resolvedUri!==r.map.key.resolvedUri)){var Pe=t(U.mergeOptions(i,{uri:r.map.key.resolvedUri,responseType:"arraybuffer"}),Bd(r,[r.map.key],W));j.push(Pe)}var ot=U.mergeOptions(i,{uri:r.map.resolvedUri,responseType:"arraybuffer",headers:Ao(r.map)}),Nt=function(n){var t=n.segment,i=n.finishProcessingFn;return function(e,r){var a=Oo(e,r);if(a)return i(a,t);var o=new Uint8Array(r.response);if(t.map.key)return t.map.encryptedBytes=o,i(null,t);t.map.bytes=o,jd(t,function(l){if(l)return l.xhr=r,l.status=r.status,i(l,t);i(null,t)})}}({segment:r,finishProcessingFn:W}),Je=t(ot,Nt);j.push(Je)}var fr=U.mergeOptions(i,{uri:r.part&&r.part.resolvedUri||r.resolvedUri,responseType:"arraybuffer",headers:Ao(r)}),si=t(fr,function(n){var t=n.segment,i=n.finishProcessingFn,e=n.responseType;return function(r,a){var o=Oo(r,a);if(o)return i(o,t);var l="arraybuffer"!==e&&a.responseText?function(n){for(var t=new Uint8Array(new ArrayBuffer(n.length)),i=0;i1)return ng("multiple "+i+" codecs found as attributes: "+t[i].join(", ")+". Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs."),void(t[i]=null);t[i]=t[i][0]}),t},Wd=function(n){var t=0;return n.audio&&t++,n.video&&t++,t},An=function(n,t){var i=t.attributes||{},e=Aa(function(n){var t=n.attributes||{};if(t.CODECS)return Xe(t.CODECS)}(t)||[]);if(qd(n,t)&&!e.audio&&!function(n,t){if(!qd(n,t))return!0;var e=n.mediaGroups.AUDIO[(t.attributes||{}).AUDIO];for(var r in e)if(!e[r].uri&&!e[r].playlists)return!0;return!1}(n,t)){var r=Aa(function(n,t){if(!n.mediaGroups.AUDIO||!t)return null;var i=n.mediaGroups.AUDIO[t];if(!i)return null;for(var e in i){var r=i[e];if(r.default&&r.playlists)return Xe(r.playlists[0].attributes.CODECS)}return null}(n,i.AUDIO)||[]);r.audio&&(e.audio=r.audio)}return e},wa=mi("PlaylistSelector"),Gd=function(n){if(n&&n.playlist){var t=n.playlist;return JSON.stringify({id:t.id,bandwidth:n.bandwidth,width:n.width,height:n.height,codecs:t.attributes&&t.attributes.CODECS||""})}},Ia=function(n,t){if(!n)return"";var i=P().getComputedStyle(n);return i?i[t]:""},Qr=function(n,t){var i=n.slice();n.sort(function(e,r){var a=t(e,r);return 0===a?i.indexOf(e)-i.indexOf(r):a})},Lo=function(n,t){var i,e;return n.attributes.BANDWIDTH&&(i=n.attributes.BANDWIDTH),i=i||P().Number.MAX_VALUE,t.attributes.BANDWIDTH&&(e=t.attributes.BANDWIDTH),i-(e||P().Number.MAX_VALUE)},Zd=function(n,t,i,e,r,a){if(n){var o={bandwidth:t,width:i,height:e,limitRenditionByPlayerDimensions:r},l=n.playlists;Yt.isAudioOnly(n)&&(l=a.getAudioTrackPlaylists_(),o.audioOnly=!0);var d=l.map(function(ge){var Pe=ge.attributes&&ge.attributes.RESOLUTION&&ge.attributes.RESOLUTION.width,ot=ge.attributes&&ge.attributes.RESOLUTION&&ge.attributes.RESOLUTION.height;return{bandwidth:ge.attributes&&ge.attributes.BANDWIDTH||P().Number.MAX_VALUE,width:Pe,height:ot,playlist:ge}});Qr(d,function(ge,$e){return ge.bandwidth-$e.bandwidth});var f=(d=d.filter(function(ge){return!Yt.isIncompatible(ge.playlist)})).filter(function(ge){return Yt.isEnabled(ge.playlist)});f.length||(f=d.filter(function(ge){return!Yt.isDisabled(ge.playlist)}));var v=f.filter(function(ge){return ge.bandwidth*Dt.BANDWIDTH_VARIANCEi||ge.height>e})).filter(function(ge){return ge.width===j[0].width&&ge.height===j[0].height}),g=W[W.length-1],q=W.filter(function(ge){return ge.bandwidth===g.bandwidth})[0]),a.experimentalLeastPixelDiffSelector){var he=S.map(function(ge){return ge.pixelDiff=Math.abs(ge.width-i)+Math.abs(ge.height-e),ge});Qr(he,function(ge,$e){return ge.pixelDiff===$e.pixelDiff?$e.bandwidth-ge.bandwidth:ge.pixelDiff-$e.pixelDiff}),ne=he[0]}var K=ne||q||F||T||f[0]||d[0];if(K&&K.playlist){var ye="sortedPlaylistReps";return ne?ye="leastPixelDiffRep":q?ye="resolutionPlusOneRep":F?ye="resolutionBestRep":T?ye="bandwidthBestRep":f[0]&&(ye="enabledPlaylistReps"),wa("choosing "+Gd(K)+" using "+ye+" with options",o),K.playlist}return wa("could not choose a playlist with options",o),null}},Kd=function(){var n=this.useDevicePixelRatio&&P().devicePixelRatio||1;return Zd(this.playlists.master,this.systemBandwidth,parseInt(Ia(this.tech_.el(),"width"),10)*n,parseInt(Ia(this.tech_.el(),"height"),10)*n,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)},wn=function(n,t,i){var e,r;if(i&&i.cues)for(e=i.cues.length;e--;)(r=i.cues[e]).startTime>=n&&r.endTime<=t&&i.removeCue(r)},Yd=function(n){return"number"==typeof n&&isFinite(n)},Da=1/60,Xr=function(n){var t=n.startOfSegment,i=n.duration,e=n.segment,r=n.part,a=n.playlist,o=a.mediaSequence,l=a.id,d=a.segments,v=n.mediaIndex,g=n.partIndex,T=n.timeline,E=(void 0===d?[]:d).length-1,x="mediaIndex/partIndex increment";n.getMediaInfoForTime?x="getMediaInfoForTime ("+n.getMediaInfoForTime+")":n.isSyncRequest&&(x="getSyncSegmentCandidate (isSyncRequest)"),n.independent&&(x+=" with independent "+n.independent);var S="number"==typeof g,N=n.segment.uri?"segment":"pre-segment",F=S?ud({preloadSegment:e})-1:0;return N+" ["+(o+v)+"/"+(o+E)+"]"+(S?" part ["+g+"/"+F+"]":"")+" segment start/end ["+e.start+" => "+e.end+"]"+(S?" part start/end ["+r.start+" => "+r.end+"]":"")+" startOfSegment ["+t+"] duration ["+i+"] timeline ["+T+"] selected by ["+x+"] playlist ["+l+"]"},$d=function(n){return n+"TimingInfo"},Qd=function(n){var t=n.timelineChangeController,e=n.segmentTimeline,r=n.loaderType,a=n.audioDisabled;if(n.currentTimeline===e)return!1;if("audio"===r){var o=t.lastTimelineChange({type:"main"});return!o||o.to!==e}if("main"===r&&a){var l=t.pendingTimelineChange({type:"audio"});return!(l&&l.to===e)}return!1},Xd=function(n){var t=n.segmentDuration,i=n.maxDuration;return!!t&&Math.round(t)>i+Ki},Ro=function(s){function n(i,e){var r;if(r=s.call(this)||this,!i)throw new TypeError("Initialization settings are required");if("function"!=typeof i.currentTime)throw new TypeError("No currentTime getter specified");if(!i.mediaSource)throw new TypeError("No MediaSource specified");return r.bandwidth=i.bandwidth,r.throughput={rate:0,count:0},r.roundTrip=NaN,r.resetStats_(),r.mediaIndex=null,r.partIndex=null,r.hasPlayed_=i.hasPlayed,r.currentTime_=i.currentTime,r.seekable_=i.seekable,r.seeking_=i.seeking,r.duration_=i.duration,r.mediaSource_=i.mediaSource,r.vhs_=i.vhs,r.loaderType_=i.loaderType,r.currentMediaInfo_=void 0,r.startingMediaInfo_=void 0,r.segmentMetadataTrack_=i.segmentMetadataTrack,r.goalBufferLength_=i.goalBufferLength,r.sourceType_=i.sourceType,r.sourceUpdater_=i.sourceUpdater,r.inbandTextTracks_=i.inbandTextTracks,r.state_="INIT",r.timelineChangeController_=i.timelineChangeController,r.shouldSaveSegmentTimingInfo_=!0,r.parse708captions_=i.parse708captions,r.captionServices_=i.captionServices,r.experimentalExactManifestTimings=i.experimentalExactManifestTimings,r.checkBufferTimeout_=null,r.error_=void 0,r.currentTimeline_=-1,r.pendingSegment_=null,r.xhrOptions_=null,r.pendingSegments_=[],r.audioDisabled_=!1,r.isPendingTimestampOffset_=!1,r.gopBuffer_=[],r.timeMapping_=0,r.safeAppend_=U.browser.IE_VERSION>=11,r.appendInitSegment_={audio:!0,video:!0},r.playlistOfLastInitSegment_={audio:null,video:null},r.callQueue_=[],r.loadQueue_=[],r.metadataQueue_={id3:[],caption:[]},r.waitingOnRemove_=!1,r.quotaExceededErrorRetryTimeout_=null,r.activeInitSegmentId_=null,r.initSegments_={},r.cacheEncryptionKeys_=i.cacheEncryptionKeys,r.keyCache_={},r.decrypter_=i.decrypter,r.syncController_=i.syncController,r.syncPoint_={segmentIndex:0,time:0},r.transmuxer_=r.createTransmuxer_(),r.triggerSyncInfoUpdate_=function(){return r.trigger("syncinfoupdate")},r.syncController_.on("syncinfoupdate",r.triggerSyncInfoUpdate_),r.mediaSource_.addEventListener("sourceopen",function(){r.isEndOfStream_()||(r.ended_=!1)}),r.fetchAtBuffer_=!1,r.logger_=mi("SegmentLoader["+r.loaderType_+"]"),Object.defineProperty(Ne(r),"state",{get:function(){return this.state_},set:function(o){o!==this.state_&&(this.logger_(this.state_+" -> "+o),this.state_=o,this.trigger("statechange"))}}),r.sourceUpdater_.on("ready",function(){r.hasEnoughInfoToAppend_()&&r.processCallQueue_()}),"main"===r.loaderType_&&r.timelineChangeController_.on("pendingtimelinechange",function(){r.hasEnoughInfoToAppend_()&&r.processCallQueue_()}),"audio"===r.loaderType_&&r.timelineChangeController_.on("timelinechange",function(){r.hasEnoughInfoToLoad_()&&r.processLoadQueue_(),r.hasEnoughInfoToAppend_()&&r.processCallQueue_()}),r}re(n,s);var t=n.prototype;return t.createTransmuxer_=function(){return function(n){var t=new Hm;t.currentTransmux=null,t.transmuxQueue=[];var i=t.terminate;return t.terminate=function(){return t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)},t.postMessage({action:"init",options:n}),t}({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})},t.resetStats_=function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0},t.dispose=function(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&P().clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()},t.setAudio=function(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())},t.abort=function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)},t.abort_=function(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,P().clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null},t.checkForAbort_=function(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state="READY",!0)},t.error=function(e){return typeof e<"u"&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_},t.endOfStream=function(){this.ended_=!0,this.transmuxer_&&Do_reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")},t.buffered_=function(){var e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return U.createTimeRanges();if("main"===this.loaderType_){var a=e.hasVideo;if(a&&e.hasAudio&&!this.audioDisabled_&&!e.isMuxed)return this.sourceUpdater_.buffered();if(a)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()},t.initSegmentForMap=function(e,r){if(void 0===r&&(r=!1),!e)return null;var a=Ca(e),o=this.initSegments_[a];return r&&!o&&e.bytes&&(this.initSegments_[a]=o={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),o||e},t.segmentKey=function(e,r){if(void 0===r&&(r=!1),!e)return null;var a=Ed(e),o=this.keyCache_[a];this.cacheEncryptionKeys_&&r&&!o&&e.bytes&&(this.keyCache_[a]=o={resolvedUri:e.resolvedUri,bytes:e.bytes});var l={resolvedUri:(o||e).resolvedUri};return o&&(l.bytes=o.bytes),l},t.couldBeginLoading_=function(){return this.playlist_&&!this.paused()},t.load=function(){if(this.monitorBuffer_(),this.playlist_){if("INIT"===this.state&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY")}},t.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},t.playlist=function(e,r){if(void 0===r&&(r={}),e){var a=this.playlist_,o=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=r,"INIT"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},"main"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));var l=null;if(a&&(a.id?l=a.id:a.uri&&(l=a.uri)),this.logger_("playlist update ["+l+" => "+(e.id||e.uri)+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!a||a.uri!==e.uri)return null!==this.mediaIndex&&(e.endList?this.resyncLoader():this.resetLoader()),this.currentMediaInfo_=void 0,void this.trigger("playlistupdate");var d=e.mediaSequence-a.mediaSequence;if(this.logger_("live window shift ["+d+"]"),null!==this.mediaIndex)if(this.mediaIndex-=d,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{var f=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!f.parts||!f.parts.length||!f.parts[this.partIndex])){var v=this.mediaIndex;this.logger_("currently processing part (index "+this.partIndex+") no longer exists."),this.resetLoader(),this.mediaIndex=v}}o&&(o.mediaIndex-=d,o.mediaIndex<0?(o.mediaIndex=null,o.partIndex=null):(o.mediaIndex>=0&&(o.segment=e.segments[o.mediaIndex]),o.partIndex>=0&&o.segment.parts&&(o.part=o.segment.parts[o.partIndex]))),this.syncController_.saveExpiredSegmentInfo(a,e)}},t.pause=function(){this.checkBufferTimeout_&&(P().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)},t.paused=function(){return null===this.checkBufferTimeout_},t.resetEverything=function(e){this.ended_=!1,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))},t.resetLoader=function(){this.fetchAtBuffer_=!1,this.resyncLoader()},t.resyncLoader=function(){this.transmuxer_&&Do_reset(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})},t.remove=function(e,r,a,o){if(void 0===a&&(a=function(){}),void 0===o&&(o=!1),r===1/0&&(r=this.duration_()),r<=e)this.logger_("skipping remove because end ${end} is <= start ${start}");else if(this.sourceUpdater_&&this.getMediaInfo_()){var l=1,d=function(){0==--l&&a()};for(var f in(o||!this.audioDisabled_)&&(l++,this.sourceUpdater_.removeAudio(e,r,d)),(o||"main"===this.loaderType_)&&(this.gopBuffer_=function(n,t,i,e){for(var r=Math.ceil((t-e)*Zn.ONE_SECOND_IN_TS),a=Math.ceil((i-e)*Zn.ONE_SECOND_IN_TS),o=n.slice(),l=n.length;l--&&!(n[l].pts<=a););if(-1===l)return o;for(var d=l+1;d--&&!(n[d].pts<=r););return d=Math.max(d,0),o.splice(d,l-d+1),o}(this.gopBuffer_,e,r,this.timeMapping_),l++,this.sourceUpdater_.removeVideo(e,r,d)),this.inbandTextTracks_)wn(e,r,this.inbandTextTracks_[f]);wn(e,r,this.segmentMetadataTrack_),d()}else this.logger_("skipping remove because no source updater or starting media info")},t.monitorBuffer_=function(){this.checkBufferTimeout_&&P().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=P().setTimeout(this.monitorBufferTick_.bind(this),1)},t.monitorBufferTick_=function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&P().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=P().setTimeout(this.monitorBufferTick_.bind(this),500)},t.fillBuffer_=function(){if(!this.sourceUpdater_.updating()){var e=this.chooseNextRequest_();!e||("number"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e))}},t.isEndOfStream_=function(e,r,a){if(void 0===e&&(e=this.mediaIndex),void 0===r&&(r=this.playlist_),void 0===a&&(a=this.partIndex),!r||!this.mediaSource_)return!1;var o="number"==typeof e&&r.segments[e];return r.endList&&"open"===this.mediaSource_.readyState&&e+1===r.segments.length&&(!o||!o.parts||a+1===o.parts.length)},t.chooseNextRequest_=function(){var e=this.buffered_(),r=ad(e)||0,a=vo(e,this.currentTime_()),o=!this.hasPlayed_()&&a>=1,l=a>=this.goalBufferLength_(),d=this.playlist_.segments;if(!d.length||o||l)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_());var f={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(f.isSyncRequest)f.mediaIndex=function(n,t,i){t=t||[];for(var e=[],r=0,a=0;ai))return a}return 0===e.length?0:e[e.length-1]}(this.currentTimeline_,d,r);else if(null!==this.mediaIndex){var v=d[this.mediaIndex],g="number"==typeof this.partIndex?this.partIndex:-1;f.startOfSegment=v.end?v.end:r,v.parts&&v.parts[g+1]?(f.mediaIndex=this.mediaIndex,f.partIndex=g+1):f.mediaIndex=this.mediaIndex+1}else{var T=Yt.getMediaInfoForTime({experimentalExactManifestTimings:this.experimentalExactManifestTimings,playlist:this.playlist_,currentTime:this.fetchAtBuffer_?r:this.currentTime_(),startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time}),E=T.segmentIndex,x=T.startTime,S=T.partIndex;f.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd "+r:"currentTime "+this.currentTime_(),f.mediaIndex=E,f.startOfSegment=x,f.partIndex=S}var N=d[f.mediaIndex],F=N&&"number"==typeof f.partIndex&&N.parts&&N.parts[f.partIndex];if(!N||"number"==typeof f.partIndex&&!F)return null;if("number"!=typeof f.partIndex&&N.parts&&(f.partIndex=0,F=N.parts[0]),!a&&F&&!F.independent)if(0===f.partIndex){var j=d[f.mediaIndex-1],W=j.parts&&j.parts.length&&j.parts[j.parts.length-1];W&&W.independent&&(f.mediaIndex-=1,f.partIndex=j.parts.length-1,f.independent="previous segment")}else N.parts[f.partIndex-1].independent&&(f.partIndex-=1,f.independent="previous part");return f.mediaIndex>=d.length-1&&this.mediaSource_&&"ended"===this.mediaSource_.readyState&&!this.seeking_()?null:this.generateSegmentInfo_(f)},t.generateSegmentInfo_=function(e){var r=e.independent,a=e.playlist,o=e.mediaIndex,l=e.startOfSegment,d=e.isSyncRequest,f=e.partIndex,v=e.forceTimestampOffset,g=e.getMediaInfoForTime,T=a.segments[o],E="number"==typeof f&&T.parts[f],x={requestId:"segment-loader-"+Math.random(),uri:E&&E.resolvedUri||T.resolvedUri,mediaIndex:o,partIndex:E?f:null,isSyncRequest:d,startOfSegment:l,playlist:a,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:T.timeline,duration:E&&E.duration||T.duration,segment:T,part:E,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:g,independent:r},S=typeof v<"u"?v:this.isPendingTimestampOffset_;x.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:T.timeline,currentTimeline:this.currentTimeline_,startOfSegment:l,buffered:this.buffered_(),overrideCheck:S});var N=ad(this.sourceUpdater_.audioBuffered());return"number"==typeof N&&(x.audioAppendStart=N-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(x.gopsToAlignWith=function(n,t,i){if(typeof t>"u"||null===t||!n.length)return[];var r,e=Math.ceil((t-i+3)*Zn.ONE_SECOND_IN_TS);for(r=0;re);r++);return n.slice(r)}(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),x},t.timestampOffsetForSegment_=function(e){return function(n){var t=n.segmentTimeline,i=n.currentTimeline,e=n.startOfSegment,r=n.buffered;return n.overrideCheck||t!==i?t "+T+" for "+f),function(n,t,i){if(!n[i]){t.trigger({type:"usage",name:"vhs-608"}),t.trigger({type:"usage",name:"hls-608"});var e=i;/^cc708_/.test(i)&&(e="SERVICE"+i.split("_")[1]);var r=t.textTracks().getTrackById(e);if(r)n[i]=r;else{var o=i,l=i,d=!1,f=(t.options_.vhs&&t.options_.vhs.captionServices||{})[e];f&&(o=f.label,l=f.language,d=f.default),n[i]=t.addRemoteTextTrack({kind:"captions",id:e,default:d,label:o,language:l},!1).track}}}(x,a.vhs_.tech_,f),wn(g,T,x[f]),function(n){var t=n.inbandTextTracks,i=n.captionArray,e=n.timestampOffset;if(i){var r=P().WebKitDataCue||P().VTTCue;i.forEach(function(a){t[a.stream].addCue(new r(a.startTime+e,a.endTime+e,a.text))})}}({captionArray:E,inbandTextTracks:x,timestampOffset:l})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}},t.handleId3_=function(e,r,a){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)){if(!this.pendingSegment_.hasAppendedData_)return void this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,r,a));var l=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();(function(n,t,i){n.metadataTrack_||(n.metadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,n.metadataTrack_.inBandMetadataTrackDispatchType=t)})(this.inbandTextTracks_,a,this.vhs_.tech_),function(n){var t=n.inbandTextTracks,i=n.metadataArray,e=n.timestampOffset,r=n.videoDuration;if(i){var a=P().WebKitDataCue||P().VTTCue,o=t.metadataTrack_;if(o&&(i.forEach(function(T){var E=T.cueTime+e;"number"!=typeof E||P().isNaN(E)||E<0||!(E<1/0)||T.frames.forEach(function(x){var S=new a(E,E,x.value||x.url||x.data||"");S.frame=x,S.value=x,function(n){Object.defineProperties(n.frame,{id:{get:function(){return U.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),n.value.key}},value:{get:function(){return U.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),n.value.data}},privateData:{get:function(){return U.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),n.value.data}}})}(S),o.addCue(S)})}),o.cues&&o.cues.length)){for(var l=o.cues,d=[],f=0;f1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+cr(f).join(", ")),v.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+cr(v).join(", "));var g=f.length?f.start(0):0,T=f.length?f.end(f.length-1):0,E=v.length?v.start(0):0,x=v.length?v.end(v.length-1):0;if(T-g<=1&&x-E<=1)return this.logger_("On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: "+d.byteLength+", audio buffer: "+cr(f).join(", ")+", video buffer: "+cr(v).join(", ")+", "),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),void this.trigger("error");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:o,type:l,bytes:d}));var N=this.currentTime_()-1;this.logger_("On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to "+N),this.remove(0,N,function(){a.logger_("On QUOTA_EXCEEDED_ERR, retrying append in 1s"),a.waitingOnRemove_=!1,a.quotaExceededErrorRetryTimeout_=P().setTimeout(function(){a.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),a.quotaExceededErrorRetryTimeout_=null,a.processCallQueue_()},1e3)},!0)},t.handleAppendError_=function(e,r){var a=e.segmentInfo,o=e.type,l=e.bytes;if(r){if(22===r.code)return void this.handleQuotaExceededError_({segmentInfo:a,type:o,bytes:l});this.logger_("Received non QUOTA_EXCEEDED_ERR on append",r),this.error(o+" append of "+l.length+"b failed for segment #"+a.mediaIndex+" in playlist "+a.playlist.id),this.trigger("appenderror")}},t.appendToSourceBuffer_=function(e){var r=e.segmentInfo,a=e.type,o=e.initSegment,l=e.data,d=e.bytes;if(!d){var f=[l],v=l.byteLength;o&&(f.unshift(o),v+=o.byteLength),d=function(n){var i,t=0;return n.bytes&&(i=new Uint8Array(n.bytes),n.segments.forEach(function(e){i.set(e,t),t+=e.byteLength})),i}({bytes:v,segments:f})}this.sourceUpdater_.appendBuffer({segmentInfo:r,type:a,bytes:d},this.handleAppendError_.bind(this,{segmentInfo:r,type:a,bytes:d}))},t.handleSegmentTimingInfo_=function(e,r,a){if(this.pendingSegment_&&r===this.pendingSegment_.requestId){var o=this.pendingSegment_.segment,l=e+"TimingInfo";o[l]||(o[l]={}),o[l].transmuxerPrependedSeconds=a.prependedContentDuration||0,o[l].transmuxedPresentationStart=a.start.presentation,o[l].transmuxedDecodeStart=a.start.decode,o[l].transmuxedPresentationEnd=a.end.presentation,o[l].transmuxedDecodeEnd=a.end.decode,o[l].baseMediaDecodeTime=a.baseMediaDecodeTime}},t.appendData_=function(e,r){var a=r.type,o=r.data;if(o&&o.byteLength&&("audio"!==a||!this.audioDisabled_)){var l=this.getInitSegmentAndUpdateState_({type:a,initSegment:r.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:a,initSegment:l,data:o})}},t.loadSegment_=function(e){var r=this;this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),"number"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.hasEnoughInfoToLoad_()?this.updateTransmuxerAndRequestSegment_(e):this.loadQueue_.push(function(){var a=gt({},e,{forceTimestampOffset:!0});gt(e,r.generateSegmentInfo_(a)),r.isPendingTimestampOffset_=!1,r.updateTransmuxerAndRequestSegment_(e)})},t.updateTransmuxerAndRequestSegment_=function(e){var r=this;this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));var a=this.createSimplifiedSegmentObj_(e),f=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)||null!==this.mediaIndex&&e.timeline!==this.currentTimeline_&&e.timeline>0;this.logger_("Requesting "+Xr(e)),a.map&&!a.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=rg({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:a,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:f,endedTimelineFn:function(){r.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:function(g){var T=g.message,E=g.level,x=g.stream;r.logger_(Xr(e)+" logged from transmuxer stream "+x+" as a "+E+": "+T)}})},t.trimBackBuffer_=function(e){var r=function(n,t,i){var e=t-Dt.BACK_BUFFER_LENGTH;return n.length&&(e=Math.max(e,n.start(0))),Math.min(t-i,e)}(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);r>0&&this.remove(0,r)},t.createSimplifiedSegmentObj_=function(e){var r=e.segment,a=e.part,o={resolvedUri:a?a.resolvedUri:r.resolvedUri,byterange:a?a.byterange:r.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part},l=e.playlist.segments[e.mediaIndex-1];if(l&&l.timeline===r.timeline&&(l.videoTimingInfo?o.baseStartTime=l.videoTimingInfo.transmuxedDecodeEnd:l.audioTimingInfo&&(o.baseStartTime=l.audioTimingInfo.transmuxedDecodeEnd)),r.key){var d=r.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);o.key=this.segmentKey(r.key),o.key.iv=d}return r.map&&(o.map=this.initSegmentForMap(r.map)),o},t.saveTransferStats_=function(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)},t.saveBandwidthRelatedStats_=function(e,r){this.pendingSegment_.byteLength=r.bytesReceived,e=e);r++);return n.slice(0,r).concat(t)}(this.gopBuffer_,a.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(o)}},t.setTimeMapping_=function(e){var r=this.syncController_.mappingForTimeline(e);null!==r&&(this.timeMapping_=r)},t.updateMediaSecondsLoaded_=function(e){this.mediaSecondsLoaded+="number"==typeof e.start&&"number"==typeof e.end?e.end-e.start:e.duration},t.shouldUpdateTransmuxerTimestampOffset_=function(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())},t.trueSegmentStart_=function(e){var r=e.currentStart,o=e.mediaIndex,l=e.firstVideoFrameTimeForData;if(typeof r<"u")return r;if(!e.useVideoTimingInfo)return e.audioTimingInfo.start;var T=e.playlist.segments[o-1];return 0===o||!T||typeof T.start>"u"||T.end!==l+e.currentVideoTimestampOffset?l:e.videoTimingInfo.start},t.waitForAppendsToComplete_=function(e){var r=this.getCurrentMediaInfo_(e);if(!r)return this.error({message:"No starting media returned, likely due to an unsupported media format.",blacklistDuration:1/0}),void this.trigger("error");var d="main"===this.loaderType_&&r.hasVideo,f=!this.audioDisabled_&&r.hasAudio&&!r.isMuxed;if(e.waitingOnAppends=0,!e.hasAppendedData_)return!e.timingInfo&&"number"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);d&&e.waitingOnAppends++,f&&e.waitingOnAppends++,d&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),f&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))},t.checkAppendsDone_=function(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())},t.checkForIllegalMediaSwitch=function(e){var r=function(n,t,i){return"main"===n&&t&&i?i.hasAudio||i.hasVideo?t.hasVideo&&!i.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!t.hasVideo&&i.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null}(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!r&&(this.error({message:r,blacklistDuration:1/0}),this.trigger("error"),!0)},t.updateSourceBufferTimestampOffset_=function(e){if(null!==e.timestampOffset&&"number"==typeof e.timingInfo.start&&!e.changedTimestampOffset&&"main"===this.loaderType_){var r=!1;e.timestampOffset-=e.timingInfo.start,e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),r=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),r=!0),r&&this.trigger("timestampoffset")}},t.updateTimingInfoEnd_=function(e){e.timingInfo=e.timingInfo||{};var r=this.getMediaInfo_(),o="main"===this.loaderType_&&r&&r.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;!o||(e.timingInfo.end="number"==typeof o.end?o.end:o.start+e.duration)},t.handleAppendsDone_=function(){if(this.pendingSegment_&&this.trigger("appendsdone"),!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var e=this.pendingSegment_;this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:"main"===this.loaderType_});var r=function(n,t){if("hls"!==t)return null;var i=function(n){var t=0;return["video","audio"].forEach(function(i){var e=n[i+"TimingInfo"];if(e){var o,r=e.start,a=e.end;"bigint"==typeof r||"bigint"==typeof a?o=P().BigInt(a)-P().BigInt(r):"number"==typeof r&&"number"==typeof a&&(o=a-r),typeof o<"u"&&o>t&&(t=o)}}),"bigint"==typeof t&&t3*e.playlist.targetDuration,d=o&&o.end&&this.currentTime_()-o.end>3*e.playlist.partTargetDuration;if(l||d)return this.logger_("bad "+(l?"segment":"part")+" "+Xr(e)),void this.resetEverything();null!==this.mediaIndex&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}else this.logger_("Throwing away un-appended sync request "+Xr(e))},t.recordThroughput_=function(e){if(e.duration"u"||(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_},t.remove=function(e,r){wn(e,r,this.subtitlesTrack_)},t.fillBuffer_=function(){var e=this,r=this.chooseNextRequest_();if(r){if(null===this.syncController_.timestampOffsetForTimeline(r.timeline))return this.syncController_.one("timestampoffset",function(){e.state="READY",e.paused()||e.monitorBuffer_()}),void(this.state="WAITING_ON_TIMELINE");this.loadSegment_(r)}},t.timestampOffsetForSegment_=function(){return null},t.chooseNextRequest_=function(){return this.skipEmptySegments_(s.prototype.chooseNextRequest_.call(this))},t.skipEmptySegments_=function(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e},t.stopForError=function(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")},t.segmentRequestFinished_=function(e,r,a){var o=this;if(this.subtitlesTrack_){if(this.saveTransferStats_(r.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return-101===e.code&&this.handleTimeout_(),-102===e.code?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);var l=this.pendingSegment_;this.saveBandwidthRelatedStats_(l.duration,r.stats),this.state="APPENDING",this.trigger("appending");var d=l.segment;if(d.map&&(d.map.bytes=r.map.bytes),l.bytes=r.bytes,"function"!=typeof P().WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var f,v=function(){o.subtitlesTrack_.tech_.off("vttjsloaded",f),o.stopForError({message:"Error loading vtt.js"})};return f=function(){o.subtitlesTrack_.tech_.off("vttjserror",v),o.segmentRequestFinished_(e,r,a)},this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",f),void this.subtitlesTrack_.tech_.one("vttjserror",v)}d.requested=!0;try{this.parseVTTCues_(l)}catch(g){return void this.stopForError({message:g.message})}if(this.updateTimeMapping_(l,this.syncController_.timelines[l.timeline],this.playlist_),l.timingInfo=l.cues.length?{start:l.cues[0].startTime,end:l.cues[l.cues.length-1].endTime}:{start:l.startOfSegment,end:l.startOfSegment+l.duration},l.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");l.byteLength=l.bytes.byteLength,this.mediaSecondsLoaded+=d.duration,l.cues.forEach(function(g){o.subtitlesTrack_.addCue(o.featuresNativeTextTracks_?new(P().VTTCue)(g.startTime,g.endTime,g.text):g)}),function(n){var t=n.cues;if(t)for(var i=0;i1&&e.push(t[a]);e.length&&e.forEach(function(o){return n.removeCue(o)})}}(this.subtitlesTrack_),this.handleAppendsDone_()}else this.state="READY"},t.handleData_=function(){},t.updateTimingInfoEnd_=function(){},t.parseVTTCues_=function(e){var r,a=!1;"function"==typeof P().TextDecoder?r=new(P().TextDecoder)("utf8"):(r=P().WebVTT.StringDecoder(),a=!0);var o=new(P().WebVTT.Parser)(P(),P().vttjs,r);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},o.oncue=e.cues.push.bind(e.cues),o.ontimestampmap=function(f){e.timestampmap=f},o.onparsingerror=function(f){U.log.warn("Error encountered when parsing cues: "+f.message)},e.segment.map){var l=e.segment.map.bytes;a&&(l=rc(l)),o.parse(l)}var d=e.bytes;a&&(d=rc(d)),o.parse(d),o.flush()},t.updateTimeMapping_=function(e,r,a){var o=e.segment;if(r){if(!e.cues.length)return void(o.empty=!0);var l=e.timestampmap,d=l.MPEGTS/Zn.ONE_SECOND_IN_TS-l.LOCAL+r.mapping;e.cues.forEach(function(g){g.startTime+=d,g.endTime+=d}),a.syncInfo||(a.syncInfo={mediaSequence:a.mediaSequence+e.mediaIndex,time:Math.min(e.cues[0].startTime,e.cues[e.cues.length-1].startTime-o.duration)})}},n}(Ro),Og=function(n,t){for(var i=n.cues,e=0;e=r.adStartTime&&t<=r.adEndTime)return r}return null},ac=[{name:"VOD",run:function(n,t,i,e,r){return i!==1/0?{time:0,segmentIndex:0,partIndex:null}:null}},{name:"ProgramDateTime",run:function(n,t,i,e,r){if(!Object.keys(n.timelineToDatetimeMappings).length)return null;var a=null,o=null,l=yo(t);r=r||0;for(var d=0;d=E)&&(o=E,a={time:T,segmentIndex:v.segmentIndex,partIndex:v.partIndex})}}return a}},{name:"Discontinuity",run:function(n,t,i,e,r){var a=null;if(r=r||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(var o=null,l=0;l=g)&&(o=g,a={time:v.time,segmentIndex:d,partIndex:null})}}return a}},{name:"Playlist",run:function(n,t,i,e,r){return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}:null}}],Mg=function(s){function n(i){var e;return(e=s.call(this)||this).timelines=[],e.discontinuities=[],e.timelineToDatetimeMappings={},e.logger_=mi("SyncController"),e}re(n,s);var t=n.prototype;return t.getSyncPoint=function(e,r,a,o){var l=this.runStrategies_(e,r,a,o);return l.length?this.selectSyncPoint_(l,{key:"time",value:o}):null},t.getExpiredTime=function(e,r){if(!e||!e.segments)return null;var a=this.runStrategies_(e,r,e.discontinuitySequence,0);if(!a.length)return null;var o=this.selectSyncPoint_(a,{key:"segmentIndex",value:0});return o.segmentIndex>0&&(o.time*=-1),Math.abs(o.time+En({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:o.segmentIndex,endIndex:0}))},t.runStrategies_=function(e,r,a,o){for(var l=[],d=0;d86400)U.log.warn("Not saving expired segment info. Media sequence gap "+a+" is too large.");else for(var o=a-1;o>=0;o--){var l=e.segments[o];if(l&&typeof l.start<"u"){r.syncInfo={mediaSequence:e.mediaSequence+o,time:l.start},this.logger_("playlist refresh sync: [time:"+r.syncInfo.time+", mediaSequence: "+r.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break}}},t.setDateTimeMappingForStart=function(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){var r=e.segments[0],a=r.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[r.timeline]=-a}},t.saveSegmentTimingInfo=function(e){var r=e.segmentInfo,a=e.shouldSaveTimelineMapping,o=this.calculateSegmentTimeMapping_(r,r.timingInfo,a),l=r.segment;o&&(this.saveDiscontinuitySyncInfo_(r),r.playlist.syncInfo||(r.playlist.syncInfo={mediaSequence:r.playlist.mediaSequence+r.mediaIndex,time:l.start}));var d=l.dateTimeObject;l.discontinuity&&a&&d&&(this.timelineToDatetimeMappings[l.timeline]=-d.getTime()/1e3)},t.timestampOffsetForTimeline=function(e){return typeof this.timelines[e]>"u"?null:this.timelines[e].time},t.mappingForTimeline=function(e){return typeof this.timelines[e]>"u"?null:this.timelines[e].mapping},t.calculateSegmentTimeMapping_=function(e,r,a){var f,v,o=e.segment,l=e.part,d=this.timelines[e.timeline];if("number"==typeof e.timestampOffset)d={time:e.startOfSegment,mapping:e.startOfSegment-r.start},a&&(this.timelines[e.timeline]=d,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+e.timeline+": [time: "+d.time+"] [mapping: "+d.mapping+"]")),f=e.startOfSegment,v=r.end+d.mapping;else{if(!d)return!1;f=r.start+d.mapping,v=r.end+d.mapping}return l&&(l.start=f,l.end=v),(!o.start||fv){var g;g=f<0?a.start-En({defaultDuration:r.targetDuration,durationList:r.segments,startIndex:e.mediaIndex,endIndex:l}):a.end+En({defaultDuration:r.targetDuration,durationList:r.segments,startIndex:e.mediaIndex+1,endIndex:l}),this.discontinuities[d]={time:g,accuracy:v}}}},t.dispose=function(){this.trigger("dispose"),this.off()},n}(U.EventTarget),Ug=function(s){function n(){var i;return(i=s.call(this)||this).pendingTimelineChanges_={},i.lastTimelineChanges_={},i}re(n,s);var t=n.prototype;return t.clearPendingTimelineChange=function(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")},t.pendingTimelineChange=function(e){var r=e.type,a=e.from,o=e.to;return"number"==typeof a&&"number"==typeof o&&(this.pendingTimelineChanges_[r]={type:r,from:a,to:o},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[r]},t.lastTimelineChange=function(e){var r=e.type,a=e.from,o=e.to;return"number"==typeof a&&"number"==typeof o&&(this.lastTimelineChanges_[r]={type:r,from:a,to:o},delete this.pendingTimelineChanges_[r],this.trigger("timelinechange")),this.lastTimelineChanges_[r]},t.dispose=function(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()},n}(U.EventTarget),Ng=Od(Ld(function(){function s(x,S,N){return x(N={path:S,exports:{},require:function(j,W){return function n(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},N.exports),N.exports}var t=s(function(x){function S(F,j){for(var W=0;W-1},S.trigger=function(F){var j=this.listeners[F];if(j)if(2===arguments.length)for(var W=j.length,q=0;q>7))^q]=q;for(ne=he=0;!j[ne];ne^=ge||1,he=ye[he]||1)for(j[ne]=ot=(ot=he^he<<1^he<<2^he<<3^he<<4)>>8^255&ot^99,W[ot]=ne,Je=16843009*K[$e=K[ge=K[ne]]]^65537*$e^257*ge^16843008*ne,Nt=257*K[ot]^16843008*ot,q=0;q<4;q++)N[q][ne]=Nt=Nt<<24^Nt>>>8,F[q][ot]=Je=Je<<24^Je>>>8;for(q=0;q<5;q++)N[q]=N[q].slice(0),F[q]=F[q].slice(0);return S}()),this._tables=[[l[0][0].slice(),l[0][1].slice(),l[0][2].slice(),l[0][3].slice(),l[0][4].slice()],[l[1][0].slice(),l[1][1].slice(),l[1][2].slice(),l[1][3].slice(),l[1][4].slice()]];var F,j,W,q=this._tables[0][4],ne=this._tables[1],he=N.length,K=1;if(4!==he&&6!==he&&8!==he)throw new Error("Invalid aes key size");var ye=N.slice(0),ge=[];for(this._key=[ye,ge],F=he;F<4*he+28;F++)W=ye[F-1],(F%he==0||8===he&&F%he==4)&&(W=q[W>>>24]<<24^q[W>>16&255]<<16^q[W>>8&255]<<8^q[255&W],F%he==0&&(W=W<<8^W>>>24^K<<24,K=K<<1^283*(K>>7))),ye[F]=ye[F-he]^W;for(j=0;F;j++,F--)W=ye[3&j?F:F-4],ge[j]=F<=4||j<4?W:ne[0][q[W>>>24]]^ne[1][q[W>>16&255]]^ne[2][q[W>>8&255]]^ne[3][q[255&W]]}return x.prototype.decrypt=function(F,j,W,q,ne,he){var ot,Nt,Je,ai,K=this._key[1],ye=F^K[0],ge=q^K[1],$e=W^K[2],Pe=j^K[3],fr=K.length/4-2,si=4,Ei=this._tables[1],Fi=Ei[0],hr=Ei[1],Bi=Ei[2],pr=Ei[3],mr=Ei[4];for(ai=0;ai>>24]^hr[ge>>16&255]^Bi[$e>>8&255]^pr[255&Pe]^K[si],Nt=Fi[ge>>>24]^hr[$e>>16&255]^Bi[Pe>>8&255]^pr[255&ye]^K[si+1],Je=Fi[$e>>>24]^hr[Pe>>16&255]^Bi[ye>>8&255]^pr[255&ge]^K[si+2],Pe=Fi[Pe>>>24]^hr[ye>>16&255]^Bi[ge>>8&255]^pr[255&$e]^K[si+3],si+=4,ye=ot,ge=Nt,$e=Je;for(ai=0;ai<4;ai++)ne[(3&-ai)+he]=mr[ye>>>24]<<24^mr[ge>>16&255]<<16^mr[$e>>8&255]<<8^mr[255&Pe]^K[si++],ot=ye,ye=ge,ge=$e,$e=Pe,Pe=ot},x}(),f=function(x){function S(){var F;return(F=x.call(this,r)||this).jobs=[],F.delay=1,F.timeout_=null,F}e(S,x);var N=S.prototype;return N.processJob_=function(){this.jobs.shift()(),this.timeout_=this.jobs.length?setTimeout(this.processJob_.bind(this),this.delay):null},N.push=function(j){this.jobs.push(j),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},S}(r),v=function(S){return S<<24|(65280&S)<<8|(16711680&S)>>8|S>>>24},T=function(){function x(N,F,j,W){var q=x.STEP,ne=new Int32Array(N.buffer),he=new Uint8Array(N.byteLength),K=0;for(this.asyncStream_=new f,this.asyncStream_.push(this.decryptChunk_(ne.subarray(K,K+q),F,j,he)),K=q;K>2),W=new d(Array.prototype.slice.call(N)),q=new Uint8Array(S.byteLength),ne=new Int32Array(q.buffer);for(he=F[0],K=F[1],ye=F[2],ge=F[3],Je=0;Je=0&&(t="main-desc"),t},Pa=function(n,t){n.abort(),n.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},No=function(n,t){t.activePlaylistLoader=n,n.load()},Oa={AUDIO:function(n,t){return function(){var e=t.mediaTypes[n],r=t.blacklistCurrentPlaylist;Pa(t.segmentLoaders[n],e);var a=e.activeTrack(),o=e.activeGroup(),l=(o.filter(function(v){return v.default})[0]||o[0]).id,d=e.tracks[l];if(a!==d){for(var f in U.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),e.tracks)e.tracks[f].enabled=e.tracks[f]===d;e.onTrackChanged()}else r({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(n,t){return function(){var i=t.segmentLoaders[n],e=t.mediaTypes[n];U.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),Pa(i,e);var r=e.activeTrack();r&&(r.mode="disabled"),e.onTrackChanged()}}},sc={AUDIO:function(n,t,i){if(t){var e=i.tech,r=i.requestOptions,a=i.segmentLoaders[n];t.on("loadedmetadata",function(){var o=t.media();a.playlist(o,r),(!e.paused()||o.endList&&"none"!==e.preload())&&a.load()}),t.on("loadedplaylist",function(){a.playlist(t.media(),r),e.paused()||a.load()}),t.on("error",Oa[n](n,i))}},SUBTITLES:function(n,t,i){var e=i.tech,r=i.requestOptions,a=i.segmentLoaders[n],o=i.mediaTypes[n];t.on("loadedmetadata",function(){var l=t.media();a.playlist(l,r),a.track(o.activeTrack()),(!e.paused()||l.endList&&"none"!==e.preload())&&a.load()}),t.on("loadedplaylist",function(){a.playlist(t.media(),r),e.paused()||a.load()}),t.on("error",Oa[n](n,i))}},qg={AUDIO:function(n,t){var i=t.vhs,e=t.sourceType,r=t.segmentLoaders[n],a=t.requestOptions,o=t.master.mediaGroups,l=t.mediaTypes[n],d=l.groups,f=l.tracks,v=l.logger_,g=t.masterPlaylistLoader,T=Cn(g.master);for(var E in(!o[n]||0===Object.keys(o[n]).length)&&(o[n]={main:{default:{default:!0}}},T&&(o[n].main.default.playlists=g.master.playlists)),o[n])for(var x in d[E]||(d[E]=[]),o[n][E]){var S=o[n][E][x],N=void 0;if(T?(v("AUDIO group '"+E+"' label '"+x+"' is a master playlist"),S.isMasterPlaylist=!0,N=null):N="vhs-json"===e&&S.playlists?new $r(S.playlists[0],i,a):S.resolvedUri?new $r(S.resolvedUri,i,a):S.playlists&&"dash"===e?new Io(S.playlists[0],i,a,g):null,S=U.mergeOptions({id:x,playlistLoader:N},S),sc[n](n,S.playlistLoader,t),d[E].push(S),typeof f[x]>"u"){var F=new U.AudioTrack({id:x,kind:Bg(S),enabled:!1,language:S.language,default:S.default,label:x});f[x]=F}}r.on("error",Oa[n](n,t))},SUBTITLES:function(n,t){var i=t.tech,e=t.vhs,r=t.sourceType,a=t.segmentLoaders[n],o=t.requestOptions,l=t.master.mediaGroups,d=t.mediaTypes[n],f=d.groups,v=d.tracks,g=t.masterPlaylistLoader;for(var T in l[n])for(var E in f[T]||(f[T]=[]),l[n][T])if(!l[n][T][E].forced){var x=l[n][T][E],S=void 0;if("hls"===r)S=new $r(x.resolvedUri,e,o);else if("dash"===r){if(!x.playlists.filter(function(j){return j.excludeUntil!==1/0}).length)return;S=new Io(x.playlists[0],e,o,g)}else"vhs-json"===r&&(S=new $r(x.playlists?x.playlists[0]:x.resolvedUri,e,o));if(x=U.mergeOptions({id:E,playlistLoader:S},x),sc[n](n,x.playlistLoader,t),f[T].push(x),typeof v[E]>"u"){var F=i.addRemoteTextTrack({id:E,kind:"subtitles",default:x.default&&x.autoselect,language:x.language,label:E},!1).track;v[E]=F}}a.on("error",Oa[n](n,t))},"CLOSED-CAPTIONS":function(n,t){var i=t.tech,e=t.master.mediaGroups,r=t.mediaTypes[n],a=r.groups,o=r.tracks;for(var l in e[n])for(var d in a[l]||(a[l]=[]),e[n][l]){var f=e[n][l][d];if(/^(?:CC|SERVICE)/.test(f.instreamId)){var v=i.options_.vhs&&i.options_.vhs.captionServices||{},g={label:d,language:f.language,instreamId:f.instreamId,default:f.default&&f.autoselect};if(v[g.instreamId]&&(g=U.mergeOptions(g,v[g.instreamId])),void 0===g.default&&delete g.default,a[l].push(U.mergeOptions({id:d},f)),typeof o[d]>"u"){var T=i.addRemoteTextTrack({id:g.instreamId,kind:"captions",default:g.default,language:g.language,label:g.label},!1).track;o[d]=T}}}}},Wg=function s(n,t){for(var i=0;i"u")&&(j=1/0),Ni=f,e.experimentalBufferBasedABR=Boolean(S),e.experimentalLeastPixelDiffSelector=Boolean(N),e.withCredentials=o,e.tech_=l,e.vhs_=l.vhs,e.sourceType_=E,e.useCueTags_=v,e.blacklistDuration=g,e.maxPlaylistRetries=j,e.enableLowInitialPlaylist=T,e.useCueTags_&&(e.cueTagsTrack_=e.tech_.addTextTrack("metadata","ad-cues"),e.cueTagsTrack_.inBandMetadataTrackDispatchType=""),e.requestOptions_={withCredentials:o,handleManifestRedirects:a,maxPlaylistRetries:j,timeout:null},e.on("error",e.pauseLoading),e.mediaTypes_=function(){var n={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(t){n[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Ui,activeTrack:Ui,getActiveGroup:Ui,onGroupChanged:Ui,onTrackChanged:Ui,lastTrack_:null,logger_:mi("MediaGroups["+t+"]")}}),n}(),e.mediaSource=new(P().MediaSource),e.handleDurationChange_=e.handleDurationChange_.bind(Ne(e)),e.handleSourceOpen_=e.handleSourceOpen_.bind(Ne(e)),e.handleSourceEnded_=e.handleSourceEnded_.bind(Ne(e)),e.mediaSource.addEventListener("durationchange",e.handleDurationChange_),e.mediaSource.addEventListener("sourceopen",e.handleSourceOpen_),e.mediaSource.addEventListener("sourceended",e.handleSourceEnded_),e.seekable_=U.createTimeRanges(),e.hasPlayed_=!1,e.syncController_=new Mg(i),e.segmentMetadataTrack_=l.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,e.decrypter_=new Fg,e.sourceUpdater_=new ic(e.mediaSource),e.inbandTextTracks_={},e.timelineChangeController_=new Ug;var W={vhs:e.vhs_,parse708captions:i.parse708captions,captionServices:F,mediaSource:e.mediaSource,currentTime:e.tech_.currentTime.bind(e.tech_),seekable:function(){return e.seekable()},seeking:function(){return e.tech_.seeking()},duration:function(){return e.duration()},hasPlayed:function(){return e.hasPlayed_},goalBufferLength:function(){return e.goalBufferLength()},bandwidth:d,syncController:e.syncController_,decrypter:e.decrypter_,sourceType:e.sourceType_,inbandTextTracks:e.inbandTextTracks_,cacheEncryptionKeys:x,sourceUpdater:e.sourceUpdater_,timelineChangeController:e.timelineChangeController_,experimentalExactManifestTimings:i.experimentalExactManifestTimings};e.masterPlaylistLoader_="dash"===e.sourceType_?new Io(r,e.vhs_,e.requestOptions_):new $r(r,e.vhs_,e.requestOptions_),e.setupMasterPlaylistLoaderListeners_(),e.mainSegmentLoader_=new Ro(U.mergeOptions(W,{segmentMetadataTrack:e.segmentMetadataTrack_,loaderType:"main"}),i),e.audioSegmentLoader_=new Ro(U.mergeOptions(W,{loaderType:"audio"}),i),e.subtitleSegmentLoader_=new Pg(U.mergeOptions(W,{loaderType:"vtt",featuresNativeTextTracks:e.tech_.featuresNativeTextTracks}),i),e.setupSegmentLoaderListeners_(),e.experimentalBufferBasedABR&&(e.masterPlaylistLoader_.one("loadedplaylist",function(){return e.startABRTimer_()}),e.tech_.on("pause",function(){return e.stopABRTimer_()}),e.tech_.on("play",function(){return e.startABRTimer_()})),Qg.forEach(function(ne){e[ne+"_"]=Xg.bind(Ne(e),ne)}),e.logger_=mi("MPC"),e.triggeredFmp4Usage=!1,"none"===e.tech_.preload()?(e.loadOnPlay_=function(){e.loadOnPlay_=null,e.masterPlaylistLoader_.load()},e.tech_.one("play",e.loadOnPlay_)):e.masterPlaylistLoader_.load(),e.timeToLoadedData__=-1,e.mainAppendsToLoadedData__=-1,e.audioAppendsToLoadedData__=-1;var q="none"===e.tech_.preload()?"play":"loadstart";return e.tech_.one(q,function(){var ne=Date.now();e.tech_.one("loadeddata",function(){e.timeToLoadedData__=Date.now()-ne,e.mainAppendsToLoadedData__=e.mainSegmentLoader_.mediaAppends,e.audioAppendsToLoadedData__=e.audioSegmentLoader_.mediaAppends})}),e}re(n,s);var t=n.prototype;return t.mainAppendsToLoadedData_=function(){return this.mainAppendsToLoadedData__},t.audioAppendsToLoadedData_=function(){return this.audioAppendsToLoadedData__},t.appendsToLoadedData_=function(){var e=this.mainAppendsToLoadedData_(),r=this.audioAppendsToLoadedData_();return-1===e||-1===r?-1:e+r},t.timeToLoadedData_=function(){return this.timeToLoadedData__},t.checkABR_=function(){var e=this.selectPlaylist();e&&this.shouldSwitchToMedia_(e)&&this.switchMedia_(e,"abr")},t.switchMedia_=function(e,r,a){var o=this.media(),l=o&&(o.id||o.uri),d=e.id||e.uri;l&&l!==d&&(this.logger_("switch media "+l+" -> "+d+" from "+r),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-"+r})),this.masterPlaylistLoader_.media(e,a)},t.startABRTimer_=function(){var e=this;this.stopABRTimer_(),this.abrTimer_=P().setInterval(function(){return e.checkABR_()},250)},t.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(P().clearInterval(this.abrTimer_),this.abrTimer_=null)},t.getAudioTrackPlaylists_=function(){var e=this.master(),r=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return r;var l,a=e.mediaGroups.AUDIO,o=Object.keys(a);if(Object.keys(this.mediaTypes_.AUDIO.groups).length)l=this.mediaTypes_.AUDIO.activeTrack();else{var d=a.main||o.length&&a[o[0]];for(var f in d)if(d[f].default){l={label:f};break}}if(!l)return r;var v=[];for(var g in a)if(a[g][l.label]){var T=a[g][l.label];if(T.playlists&&T.playlists.length)v.push.apply(v,T.playlists);else if(T.uri)v.push(T);else if(e.playlists.length)for(var E=0;E1&&Cn(t.master))for(var d=0;d"u"?o:null!==i&&o&&o.filter(function(v){return v.id===i.id})[0]||null}}(E,n),t[E].activeTrack=Zg[E](E,n),t[E].onGroupChanged=function(n,t){return function(){var i=t.segmentLoaders,e=i[n],r=i.main,a=t.mediaTypes[n],o=a.activeTrack(),l=a.getActiveGroup(),d=a.activePlaylistLoader,f=a.lastGroup_;if((!l||!f||l.id!==f.id)&&(a.lastGroup_=l,a.lastTrack_=o,Pa(e,a),l&&!l.isMasterPlaylist)){if(!l.playlistLoader)return void(d&&r.resetEverything());e.resyncLoader(),No(l.playlistLoader,a)}}}(E,n),t[E].onGroupChanging=function(n,t){return function(){var i=t.segmentLoaders[n];t.mediaTypes[n].lastGroup_=null,i.abort(),i.pause()}}(E,n),t[E].onTrackChanged=function(n,t){return function(){var i=t.masterPlaylistLoader,e=t.segmentLoaders,r=e[n],a=e.main,o=t.mediaTypes[n],l=o.activeTrack(),d=o.getActiveGroup(),f=o.activePlaylistLoader,v=o.lastTrack_;if((!v||!l||v.id!==l.id)&&(o.lastGroup_=d,o.lastTrack_=l,Pa(r,o),d)){if(d.isMasterPlaylist){if(!l||!v||l.id===v.id)return;var g=t.vhs.masterPlaylistController_,T=g.selectPlaylist();if(g.media()===T)return;return o.logger_("track change. Switching master audio from "+v.id+" to "+l.id),i.pause(),a.resetEverything(),void g.fastQualityChange_(T)}if("AUDIO"===n){if(!d.playlistLoader)return a.setAudio(!0),void a.resetEverything();r.setAudio(!0),a.setAudio(!1)}if(f===d.playlistLoader)return void No(d.playlistLoader,o);r.track&&r.track(l),r.resetEverything(),No(d.playlistLoader,o)}}}(E,n),t[E].getActiveGroup=function(n,t){var i=t.mediaTypes;return function(){var e=i[n].activeTrack();return e?i[n].activeGroup(e):null}}(E,n)});var d=t.AUDIO.activeGroup();if(d){var f=(d.filter(function(E){return E.default})[0]||d[0]).id;t.AUDIO.tracks[f].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged(),t.AUDIO.getActiveGroup().playlistLoader?(l.setAudio(!1),o.setAudio(!0)):l.setAudio(!0)}i.on("mediachange",function(){["AUDIO","SUBTITLES"].forEach(function(E){return t[E].onGroupChanged()})}),i.on("mediachanging",function(){["AUDIO","SUBTITLES"].forEach(function(E){return t[E].onGroupChanging()})});var g=function(){t.AUDIO.onTrackChanged(),e.trigger({type:"usage",name:"vhs-audio-change"}),e.trigger({type:"usage",name:"hls-audio-change"})};for(var T in e.audioTracks().addEventListener("change",g),e.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),r.on("dispose",function(){e.audioTracks().removeEventListener("change",g),e.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)}),e.clearTracks("audio"),t.AUDIO.tracks)e.audioTracks().addTrack(t.AUDIO.tracks[T])}({sourceType:e.sourceType_,segmentLoaders:{AUDIO:e.audioSegmentLoader_,SUBTITLES:e.subtitleSegmentLoader_,main:e.mainSegmentLoader_},tech:e.tech_,requestOptions:e.requestOptions_,masterPlaylistLoader:e.masterPlaylistLoader_,vhs:e.vhs_,master:e.master(),mediaTypes:e.mediaTypes_,blacklistCurrentPlaylist:e.blacklistCurrentPlaylist.bind(e)}),e.triggerPresenceUsage_(e.master(),r),e.setupFirstPlay(),!e.mediaTypes_.AUDIO.activePlaylistLoader||e.mediaTypes_.AUDIO.activePlaylistLoader.media()?e.trigger("selectedinitialmedia"):e.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",function(){e.trigger("selectedinitialmedia")})}),this.masterPlaylistLoader_.on("loadedplaylist",function(){e.loadOnPlay_&&e.tech_.off("play",e.loadOnPlay_);var r=e.masterPlaylistLoader_.media();if(!r){var a;if(e.excludeUnsupportedVariants_(),e.enableLowInitialPlaylist&&(a=e.selectInitialPlaylist()),a||(a=e.selectPlaylist()),!a||!e.shouldSwitchToMedia_(a))return;if(e.initialMedia_=a,e.switchMedia_(e.initialMedia_,"initial"),"vhs-json"!==e.sourceType_||!e.initialMedia_.segments)return;r=e.initialMedia_}e.handleUpdatedMediaPlaylist(r)}),this.masterPlaylistLoader_.on("error",function(){e.blacklistCurrentPlaylist(e.masterPlaylistLoader_.error)}),this.masterPlaylistLoader_.on("mediachanging",function(){e.mainSegmentLoader_.abort(),e.mainSegmentLoader_.pause()}),this.masterPlaylistLoader_.on("mediachange",function(){var r=e.masterPlaylistLoader_.media(),a=1.5*r.targetDuration*1e3;e.requestOptions_.timeout=bo(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?0:a,e.mainSegmentLoader_.playlist(r,e.requestOptions_),e.mainSegmentLoader_.load(),e.tech_.trigger({type:"mediachange",bubbles:!0})}),this.masterPlaylistLoader_.on("playlistunchanged",function(){var r=e.masterPlaylistLoader_.media();"playlist-unchanged"!==r.lastExcludeReason_&&e.stuckAtPlaylistEnd_(r)&&(e.blacklistCurrentPlaylist({message:"Playlist no longer updating.",reason:"playlist-unchanged"}),e.tech_.trigger("playliststuck"))}),this.masterPlaylistLoader_.on("renditiondisabled",function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})}),this.masterPlaylistLoader_.on("renditionenabled",function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})})},t.handleUpdatedMediaPlaylist=function(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())},t.triggerPresenceUsage_=function(e,r){var a=e.mediaGroups||{},o=!0,l=Object.keys(a.AUDIO);for(var d in a.AUDIO)for(var f in a.AUDIO[d])a.AUDIO[d][f].uri||(o=!1);o&&(this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),this.tech_.trigger({type:"usage",name:"hls-demuxed"})),Object.keys(a.SUBTITLES).length&&(this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),this.tech_.trigger({type:"usage",name:"hls-webvtt"})),Ni.Playlist.isAes(r)&&(this.tech_.trigger({type:"usage",name:"vhs-aes"}),this.tech_.trigger({type:"usage",name:"hls-aes"})),l.length&&Object.keys(a.AUDIO[l[0]]).length>1&&(this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.tech_.trigger({type:"usage",name:"hls-alternate-audio"})),this.useCueTags_&&(this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"}),this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"}))},t.shouldSwitchToMedia_=function(e){var r=this.masterPlaylistLoader_.media()||this.masterPlaylistLoader_.pendingMedia_,a=this.tech_.currentTime(),o=this.bufferLowWaterLine(),l=this.bufferHighWaterLine();return function(n){var t=n.currentPlaylist,i=n.buffered,e=n.currentTime,r=n.nextPlaylist,a=n.bufferLowWaterLine,o=n.bufferHighWaterLine,l=n.duration,d=n.experimentalBufferBasedABR,f=n.log;if(!r)return U.log.warn("We received no playlist to switch to. Please check your stream."),!1;var v="allowing switch "+(t&&t.id||"null")+" -> "+r.id;if(!t)return f(v+" as current playlist is not set"),!0;if(r.id===t.id)return!1;var g=Boolean(Yr(i,e).length);if(!t.endList)return g||"number"!=typeof t.partTargetDuration?(f(v+" as current playlist is live"),!0):(f("not "+v+" as current playlist is live llhls, but currentTime isn't in buffered."),!1);var T=vo(i,e),E=d?Dt.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Dt.MAX_BUFFER_LOW_WATER_LINE;if(lS)&&T>=a){var F=v+" as forwardBuffer >= bufferLowWaterLine ("+T+" >= "+a+")";return d&&(F+=" and next bandwidth > current bandwidth ("+x+" > "+S+")"),f(F),!0}return f("not "+v+" as no switching criteria met"),!1}({buffered:this.tech_.buffered(),currentTime:a,currentPlaylist:r,nextPlaylist:e,bufferLowWaterLine:o,bufferHighWaterLine:l,duration:this.duration(),experimentalBufferBasedABR:this.experimentalBufferBasedABR,log:this.logger_})},t.setupSegmentLoaderListeners_=function(){var e=this;this.experimentalBufferBasedABR||(this.mainSegmentLoader_.on("bandwidthupdate",function(){var a=e.selectPlaylist();e.shouldSwitchToMedia_(a)&&e.switchMedia_(a,"bandwidthupdate"),e.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("progress",function(){e.trigger("progress")})),this.mainSegmentLoader_.on("error",function(){e.blacklistCurrentPlaylist(e.mainSegmentLoader_.error())}),this.mainSegmentLoader_.on("appenderror",function(){e.error=e.mainSegmentLoader_.error_,e.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",function(){e.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",function(){e.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"}),e.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",function(){e.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",function(){e.error=e.audioSegmentLoader_.error_,e.trigger("error")}),this.mainSegmentLoader_.on("ended",function(){e.logger_("main segment loader ended"),e.onEndOfStream()}),this.mainSegmentLoader_.on("earlyabort",function(a){e.experimentalBufferBasedABR||(e.delegateLoaders_("all",["abort"]),e.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120))});var r=function(){if(!e.sourceUpdater_.hasCreatedSourceBuffers())return e.tryToCreateSourceBuffers_();var o=e.getCodecsOrExclude_();!o||e.sourceUpdater_.addOrChangeSourceBuffers(o)};this.mainSegmentLoader_.on("trackinfo",r),this.audioSegmentLoader_.on("trackinfo",r),this.mainSegmentLoader_.on("fmp4",function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",function(){e.logger_("audioSegmentLoader ended"),e.onEndOfStream()})},t.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)},t.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()},t.smoothQualityChange_=function(e){void 0===e&&(e=this.selectPlaylist()),this.fastQualityChange_(e)},t.fastQualityChange_=function(e){var r=this;void 0===e&&(e=this.selectPlaylist()),e!==this.masterPlaylistLoader_.media()?(this.switchMedia_(e,"fast-quality"),this.mainSegmentLoader_.resetEverything(function(){r.tech_.setCurrentTime(U.browser.IE_VERSION||U.browser.IS_EDGE?r.tech_.currentTime()+.04:r.tech_.currentTime())})):this.logger_("skipping fastQualityChange because new media is same as old")},t.play=function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();var e=this.tech_.seekable();if(this.tech_.duration()===1/0&&this.tech_.currentTime()this.maxPlaylistRetries?1/0:Date.now()+1e3*r,a.excludeUntil=v,e.reason&&(a.lastExcludeReason_=e.reason),this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-blacklisted"}),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});var g=this.selectPlaylist();if(!g)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");(e.internal?this.logger_:U.log.warn)((e.internal?"Internal problem":"Problem")+" encountered with playlist "+a.id+"."+(e.message?" "+e.message:"")+" Switching to playlist "+g.id+"."),g.attributes.AUDIO!==a.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),g.attributes.SUBTITLES!==a.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);var x=g.targetDuration/2*1e3||5e3,S="number"==typeof g.lastRequest&&Date.now()-g.lastRequest<=x;return this.switchMedia_(g,"exclude",d||S)},t.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()},t.delegateLoaders_=function(e,r){var a=this,o=[],l="all"===e;(l||"main"===e)&&o.push(this.masterPlaylistLoader_);var d=[];(l||"audio"===e)&&d.push("AUDIO"),(l||"subtitle"===e)&&(d.push("CLOSED-CAPTIONS"),d.push("SUBTITLES")),d.forEach(function(f){var v=a.mediaTypes_[f]&&a.mediaTypes_[f].activePlaylistLoader;v&&o.push(v)}),["main","audio","subtitle"].forEach(function(f){var v=a[f+"SegmentLoader_"];v&&(e===f||"all"===e)&&o.push(v)}),o.forEach(function(f){return r.forEach(function(v){"function"==typeof f[v]&&f[v]()})})},t.setCurrentTime=function(e){var r=Yr(this.tech_.buffered(),e);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?r&&r.length?e:(this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),void this.load()):0},t.duration=function(){if(!this.masterPlaylistLoader_)return 0;var e=this.masterPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Ni.Playlist.duration(e):1/0:0},t.seekable=function(){return this.seekable_},t.onSyncInfoUpdate_=function(){var e;if(this.masterPlaylistLoader_){var r=this.masterPlaylistLoader_.media();if(r){var a=this.syncController_.getExpiredTime(r,this.duration());if(null!==a){var d,f,o=this.masterPlaylistLoader_.master,l=Ni.Playlist.seekable(r,a,Ni.Playlist.liveEdgeDelay(o,r));0===l.length||this.mediaTypes_.AUDIO.activePlaylistLoader&&(r=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(a=this.syncController_.getExpiredTime(r,this.duration()))||0===(e=Ni.Playlist.seekable(r,a,Ni.Playlist.liveEdgeDelay(o,r))).length)||(this.seekable_&&this.seekable_.length&&(d=this.seekable_.end(0),f=this.seekable_.start(0)),this.seekable_=e?e.start(0)>l.end(0)||l.start(0)>e.end(0)?l:U.createTimeRanges([[e.start(0)>l.start(0)?e.start(0):l.start(0),e.end(0)0&&(o=Math.max(o,a.end(a.length-1))),this.mediaSource.duration!==o&&this.sourceUpdater_.setDuration(o)}},t.dispose=function(){var e=this;this.trigger("dispose"),this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(function(r){var a=e.mediaTypes_[r].groups;for(var o in a)a[o].forEach(function(l){l.playlistLoader&&l.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()},t.master=function(){return this.masterPlaylistLoader_.master},t.media=function(){return this.masterPlaylistLoader_.media()||this.initialMedia_},t.areMediaTypesKnown_=function(){var e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,r=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),a=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!r||!a)},t.getCodecsOrExclude_=function(){var e=this,r={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}};r.video=r.main;var a=An(this.master(),this.media()),o={},l=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(r.main.hasVideo&&(o.video=a.video||r.main.videoCodec||"avc1.4d400d"),r.main.isMuxed&&(o.video+=","+(a.audio||r.main.audioCodec||Qt)),(r.main.hasAudio&&!r.main.isMuxed||r.audio.hasAudio||l)&&(o.audio=a.audio||r.main.audioCodec||r.audio.audioCodec||Qt,r.audio.isFmp4=r.main.hasAudio&&!r.main.isMuxed?r.main.isFmp4:r.audio.isFmp4),o.audio||o.video){var v,f={};if(["video","audio"].forEach(function(x){if(o.hasOwnProperty(x)&&!function(S,N){return S?ii(N):ci(N)}(r[x].isFmp4,o[x])){var S=r[x].isFmp4?"browser":"muxer";f[S]=f[S]||[],f[S].push(o[x]),"audio"===x&&(v=S)}}),l&&v&&this.media().attributes.AUDIO){var g=this.media().attributes.AUDIO;this.master().playlists.forEach(function(x){(x.attributes&&x.attributes.AUDIO)===g&&x!==e.media()&&(x.excludeUntil=1/0)}),this.logger_("excluding audio group "+g+" as "+v+' does not support codec(s): "'+o.audio+'"')}if(!Object.keys(f).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var E=[];if(["video","audio"].forEach(function(x){var S=(Xe(e.sourceUpdater_.codecs[x]||"")[0]||{}).type,N=(Xe(o[x]||"")[0]||{}).type;S&&N&&S.toLowerCase()!==N.toLowerCase()&&E.push('"'+e.sourceUpdater_.codecs[x]+'" -> "'+o[x]+'"')}),E.length)return void this.blacklistCurrentPlaylist({playlist:this.media(),message:"Codec switching not supported: "+E.join(", ")+".",blacklistDuration:1/0,internal:!0})}return o}var T=Object.keys(f).reduce(function(x,S){return x&&(x+=", "),x+(S+' does not support codec(s): "')+f[S].join(",")+'"'},"")+".";this.blacklistCurrentPlaylist({playlist:this.media(),internal:!0,message:T,blacklistDuration:1/0})}else this.blacklistCurrentPlaylist({playlist:this.media(),message:"Could not determine codecs for playlist.",blacklistDuration:1/0})},t.tryToCreateSourceBuffers_=function(){if("open"===this.mediaSource.readyState&&!this.sourceUpdater_.hasCreatedSourceBuffers()&&this.areMediaTypesKnown_()){var e=this.getCodecsOrExclude_();if(e){this.sourceUpdater_.createSourceBuffers(e);var r=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(r)}}},t.excludeUnsupportedVariants_=function(){var e=this,r=this.master().playlists,a=[];Object.keys(r).forEach(function(o){var l=r[o];if(-1===a.indexOf(l.id)){a.push(l.id);var d=An(e.master,l),f=[];d.audio&&!ci(d.audio)&&!ii(d.audio)&&f.push("audio codec "+d.audio),d.video&&!ci(d.video)&&!ii(d.video)&&f.push("video codec "+d.video),d.text&&"stpp.ttml.im1t"===d.text&&f.push("text codec "+d.text),f.length&&(l.excludeUntil=1/0,e.logger_("excluding "+l.id+" for unsupported: "+f.join(", ")))}})},t.excludeIncompatibleVariants_=function(e){var r=this,a=[],o=this.master().playlists,l=Aa(Xe(e)),d=Wd(l),f=l.video&&Xe(l.video)[0]||null,v=l.audio&&Xe(l.audio)[0]||null;Object.keys(o).forEach(function(g){var T=o[g];if(-1===a.indexOf(T.id)&&T.excludeUntil!==1/0){a.push(T.id);var E=[],x=An(r.masterPlaylistLoader_.master,T),S=Wd(x);if(x.audio||x.video){if(S!==d&&E.push('codec count "'+S+'" !== "'+d+'"'),!r.sourceUpdater_.canChangeType()){var N=x.video&&Xe(x.video)[0]||null,F=x.audio&&Xe(x.audio)[0]||null;N&&f&&N.type.toLowerCase()!==f.type.toLowerCase()&&E.push('video codec "'+N.type+'" !== "'+f.type+'"'),F&&v&&F.type.toLowerCase()!==v.type.toLowerCase()&&E.push('audio codec "'+F.type+'" !== "'+v.type+'"')}E.length&&(T.excludeUntil=1/0,r.logger_("blacklisting "+T.id+": "+E.join(" && ")))}}})},t.updateAdCues_=function(e){var r=0,a=this.seekable();a.length&&(r=a.start(0)),function(n,t,i){if(void 0===i&&(i=0),n.segments)for(var r,e=i,a=0;a"u"?o:(e?delete r.disabled:r.disabled=!0,e!==o&&!a&&(i(),n.trigger(e?"renditionenabled":"renditiondisabled")),e)}}(n.playlists,t.id,o)},oc=["seeking","seeked","pause","playing","error"],nv=function(){function s(t){var i=this;this.masterPlaylistController_=t.masterPlaylistController,this.tech_=t.tech,this.seekable=t.seekable,this.allowSeeksWithinUnsafeLiveWindow=t.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=t.liveRangeSafeTimeDelta,this.media=t.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=mi("PlaybackWatcher"),this.logger_("initialize");var e=function(){return i.monitorCurrentTime_()},r=function(){return i.monitorCurrentTime_()},a=function(){return i.techWaiting_()},o=function(){return i.cancelTimer_()},l=this.masterPlaylistController_,d=["main","subtitle","audio"],f={};d.forEach(function(g){f[g]={reset:function(){return i.resetSegmentDownloads_(g)},updateend:function(){return i.checkSegmentDownloads_(g)}},l[g+"SegmentLoader_"].on("appendsdone",f[g].updateend),l[g+"SegmentLoader_"].on("playlistupdate",f[g].reset),i.tech_.on(["seeked","seeking"],f[g].reset)});var v=function(T){["main","audio"].forEach(function(E){l[E+"SegmentLoader_"][T]("appended",i.seekingAppendCheck_)})};this.seekingAppendCheck_=function(){i.fixesBadSeeks_()&&(i.consecutiveUpdates=0,i.lastRecordedTime=i.tech_.currentTime(),v("off"))},this.clearSeekingAppendCheck_=function(){return v("off")},this.watchForBadSeeking_=function(){i.clearSeekingAppendCheck_(),v("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",a),this.tech_.on(oc,o),this.tech_.on("canplay",r),this.tech_.one("play",e),this.dispose=function(){i.clearSeekingAppendCheck_(),i.logger_("dispose"),i.tech_.off("waiting",a),i.tech_.off(oc,o),i.tech_.off("canplay",r),i.tech_.off("play",e),i.tech_.off("seeking",i.watchForBadSeeking_),i.tech_.off("seeked",i.clearSeekingAppendCheck_),d.forEach(function(g){l[g+"SegmentLoader_"].off("appendsdone",f[g].updateend),l[g+"SegmentLoader_"].off("playlistupdate",f[g].reset),i.tech_.off(["seeked","seeking"],f[g].reset)}),i.checkCurrentTimeTimeout_&&P().clearTimeout(i.checkCurrentTimeTimeout_),i.cancelTimer_()}}var n=s.prototype;return n.monitorCurrentTime_=function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&P().clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=P().setTimeout(this.monitorCurrentTime_.bind(this),250)},n.resetSegmentDownloads_=function(i){var e=this.masterPlaylistController_[i+"SegmentLoader_"];this[i+"StalledDownloads_"]>0&&this.logger_("resetting possible stalled download count for "+i+" loader"),this[i+"StalledDownloads_"]=0,this[i+"Buffered_"]=e.buffered_()},n.checkSegmentDownloads_=function(i){var e=this.masterPlaylistController_,r=e[i+"SegmentLoader_"],a=r.buffered_(),o=function(n,t){if(n===t)return!1;if(!n&&t||!t&&n||n.length!==t.length)return!0;for(var i=0;i=e.end(e.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&i===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):i===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=i)}},n.cancelTimer_=function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null},n.fixesBadSeeks_=function(){if(!this.tech_.seeking())return!1;var o,e=this.seekable(),r=this.tech_.currentTime();if(this.afterSeekableWindow_(e,r,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(o=e.end(e.length-1)),this.beforeSeekableWindow_(e,r)){var d=e.start(0);o=d+(d===e.end(0)?0:bi)}if(typeof o<"u")return this.logger_("Trying to seek outside of seekable at time "+r+" with seekable range "+nd(e)+". Seeking to "+o+"."),this.tech_.setCurrentTime(o),!0;for(var f=this.masterPlaylistController_.sourceUpdater_,v=this.tech_.buffered(),g=f.audioBuffer?f.audioBuffered():null,T=f.videoBuffer?f.videoBuffered():null,E=this.media(),x=E.partTargetDuration?E.partTargetDuration:2*(E.targetDuration-Ki),S=[g,T],N=0;N "+r.end(0)+"]. Attempting to resume playback by seeking to the current time."),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"}),void this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})}},n.techWaiting_=function(){var i=this.seekable(),e=this.tech_.currentTime();if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(i,e)){var r=i.end(i.length-1);return this.logger_("Fell out of live window at time "+e+". Seeking to live point (seekable end) "+r),this.cancelTimer_(),this.tech_.setCurrentTime(r),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var a=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,o=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:a.audioBuffered(),videoBuffered:a.videoBuffered(),currentTime:e}))return this.cancelTimer_(),this.tech_.setCurrentTime(e),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;var d=xa(o,e);if(d.length>0){var f=d.start(0)-e;return this.logger_("Stopped at "+e+", setting timer for "+f+", seeking to "+d.start(0)),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*f,e),!0}return!1},n.afterSeekableWindow_=function(i,e,r,a){if(void 0===a&&(a=!1),!i.length)return!1;var o=i.end(i.length-1)+bi;return!r.endList&&a&&(o=i.end(i.length-1)+3*r.targetDuration),e>o},n.beforeSeekableWindow_=function(i,e){return!!(i.length&&i.start(0)>0&&e2)return{start:o,end:l}}return null},s}(),av={errorInterval:30,getSource:function(n){return n(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},sv=function s(n,t){var i=0,e=0,r=U.mergeOptions(av,t);n.ready(function(){n.trigger({type:"usage",name:"vhs-error-reload-initialized"}),n.trigger({type:"usage",name:"hls-error-reload-initialized"})});var a=function(){e&&n.currentTime(e)},o=function(g){null!=g&&(e=n.duration()!==1/0&&n.currentTime()||0,n.one("loadedmetadata",a),n.src(g),n.trigger({type:"usage",name:"vhs-error-reload"}),n.trigger({type:"usage",name:"hls-error-reload"}),n.play())},l=function(){return Date.now()-i<1e3*r.errorInterval?(n.trigger({type:"usage",name:"vhs-error-reload-canceled"}),void n.trigger({type:"usage",name:"hls-error-reload-canceled"})):r.getSource&&"function"==typeof r.getSource?(i=Date.now(),r.getSource.call(n,o)):void U.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")},d=function v(){n.off("loadedmetadata",a),n.off("error",l),n.off("dispose",v)};n.on("error",l),n.on("dispose",d),n.reloadSourceOnError=function(g){d(),s(n,g)}},Lt={PlaylistLoader:$r,Playlist:Yt,utils:Sm,STANDARD_PLAYLIST_SELECTOR:Kd,INITIAL_PLAYLIST_SELECTOR:function(){var n=this,t=this.playlists.master.playlists.filter(Yt.isEnabled);return Qr(t,function(e,r){return Lo(e,r)}),t.filter(function(e){return!!An(n.playlists.master,e).video})[0]||null},lastBandwidthSelector:Kd,movingAverageBandwidthSelector:function(n){var t=-1,i=-1;if(n<0||n>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){var e=this.useDevicePixelRatio&&P().devicePixelRatio||1;return t<0&&(t=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(t=n*this.systemBandwidth+(1-n)*t,i=this.systemBandwidth),Zd(this.playlists.master,t,parseInt(Ia(this.tech_.el(),"width"),10)*e,parseInt(Ia(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)}},comparePlaylistBandwidth:Lo,comparePlaylistResolution:function(n,t){var i,e;return n.attributes.RESOLUTION&&n.attributes.RESOLUTION.width&&(i=n.attributes.RESOLUTION.width),i=i||P().Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(e=t.attributes.RESOLUTION.width),i===(e=e||P().Number.MAX_VALUE)&&n.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?n.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-e},xhr:xd()};Object.keys(Dt).forEach(function(s){Object.defineProperty(Lt,s,{get:function(){return U.log.warn("using Vhs."+s+" is UNSAFE be sure you know what you are doing"),Dt[s]},set:function(t){U.log.warn("using Vhs."+s+" is UNSAFE be sure you know what you are doing"),"number"!=typeof t||t<0?U.log.warn("value of Vhs."+s+" must be greater than or equal to 0"):Dt[s]=t}})});var lc="videojs-vhs",dc=function(n,t){for(var i=t.media(),e=-1,r=0;r=g&&f>=g?Math.max(f,T):T}return f},set:function(f){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=f,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){return Math.floor(1/(1/(this.bandwidth||1)+(this.throughput>0?1/this.throughput:0)))},set:function(){U.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:function(){return a.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return a.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return a.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return a.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return a.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return a.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return a.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return a.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},mediaAppends:{get:function(){return a.masterPlaylistController_.mediaAppends_()||0},enumerable:!0},mainAppendsToLoadedData:{get:function(){return a.masterPlaylistController_.mainAppendsToLoadedData_()||0},enumerable:!0},audioAppendsToLoadedData:{get:function(){return a.masterPlaylistController_.audioAppendsToLoadedData_()||0},enumerable:!0},appendsToLoadedData:{get:function(){return a.masterPlaylistController_.appendsToLoadedData_()||0},enumerable:!0},timeToLoadedData:{get:function(){return a.masterPlaylistController_.timeToLoadedData_()||0},enumerable:!0},buffered:{get:function(){return cr(a.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return a.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return a.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return a.tech_.name_},enumerable:!0},duration:{get:function(){return a.tech_.duration()},enumerable:!0},master:{get:function(){return a.playlists.master},enumerable:!0},playerDimensions:{get:function(){return a.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return cr(a.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return a.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.tech_.on("bandwidthupdate",function(){a.options_.useBandwidthFromLocalStorage&&function(n){if(!P().localStorage)return!1;var t=cc();t=t?U.mergeOptions(t,n):n;try{P().localStorage.setItem(lc,JSON.stringify(t))}catch{return!1}}({bandwidth:a.bandwidth,throughput:Math.round(a.throughput)})}),this.masterPlaylistController_.on("selectedinitialmedia",function(){!function(n){n.representations=function(){var t=n.masterPlaylistController_.master(),i=Cn(t)?n.masterPlaylistController_.getAudioTrackPlaylists_():t.playlists;return i?i.filter(function(e){return!To(e)}).map(function(e,r){return new iv(n,e,e.id)}):[]}}(a)}),this.masterPlaylistController_.sourceUpdater_.on("createdsourcebuffers",function(){a.setupEme_()}),this.on(this.masterPlaylistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.masterPlaylistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=P().URL.createObjectURL(this.masterPlaylistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}},t.createKeySessions_=function(){var e=this,r=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),function(n){var t=n.player,i=n.sourceKeySystems,e=n.audioMedia,r=n.mainPlaylists;if(!t.eme.initializeMediaKeys)return Promise.resolve();var o=function(n,t){return n.reduce(function(i,e){if(!e.contentProtection)return i;var r=t.reduce(function(a,o){var l=e.contentProtection[o];return l&&l.pssh&&(a[o]={pssh:l.pssh}),a},{});return Object.keys(r).length&&i.push(r),i},[])}(e?r.concat([e]):r,Object.keys(i)),l=[],d=[];return o.forEach(function(f){d.push(new Promise(function(v,g){t.tech_.one("keysessioncreated",v)})),l.push(new Promise(function(v,g){t.eme.initializeMediaKeys({keySystems:f},function(T){T?g(T):v()})}))}),Promise.race([Promise.all(l),Promise.race(d)])}({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:r&&r.media(),mainPlaylists:this.playlists.master.playlists}).then(function(){e.logger_("created EME key session"),e.masterPlaylistController_.sourceUpdater_.initializedEme()}).catch(function(a){e.logger_("error while creating EME key session",a),e.player_.error({message:"Failed to initialize media keys for EME",code:3})})},t.handleWaitingForKey_=function(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()},t.setupEme_=function(){var e=this,r=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,a=function(n){var t=n.player,a=function(n,t,i){if(!n)return n;var e={};t&&t.attributes&&t.attributes.CODECS&&(e=Aa(Xe(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(e.audio=i.attributes.CODECS);var r=$t(e.video),a=$t(e.audio),o={};for(var l in n)o[l]={},a&&(o[l].audioContentType=a),r&&(o[l].videoContentType=r),t.contentProtection&&t.contentProtection[l]&&t.contentProtection[l].pssh&&(o[l].pssh=t.contentProtection[l].pssh),"string"==typeof n[l]&&(o[l].url=n[l]);return U.mergeOptions(n,o)}(n.sourceKeySystems,n.media,n.audioMedia);return!(!a||(t.currentSource().keySystems=a,a&&!t.eme&&(U.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),1)))}({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:r&&r.media()});this.player_.tech_.on("keystatuschange",function(o){"output-restricted"===o.status&&e.masterPlaylistController_.blacklistCurrentPlaylist({playlist:e.masterPlaylistController_.media(),message:"DRM keystatus changed to "+o.status+". Playlist will fail to play. Check for HDCP content.",blacklistDuration:1/0})}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),11!==U.browser.IE_VERSION&&a?this.createKeySessions_():this.masterPlaylistController_.sourceUpdater_.initializedEme()},t.setupQualityLevels_=function(){var e=this,r=U.players[this.tech_.options_.playerId];!r||!r.qualityLevels||this.qualityLevels_||(this.qualityLevels_=r.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",function(){!function(n,t){t.representations().forEach(function(i){n.addQualityLevel(i)}),dc(n,t.playlists)}(e.qualityLevels_,e)}),this.playlists.on("mediachange",function(){dc(e.qualityLevels_,e.playlists)}))},n.version=function(){return{"@videojs/http-streaming":"2.13.1","mux.js":"6.0.1","mpd-parser":"0.21.0","m3u8-parser":"4.7.0","aes-decrypter":"3.1.2"}},t.version=function(){return this.constructor.version()},t.canChangeType=function(){return ic.canChangeType()},t.play=function(){this.masterPlaylistController_.play()},t.setCurrentTime=function(e){this.masterPlaylistController_.setCurrentTime(e)},t.duration=function(){return this.masterPlaylistController_.duration()},t.seekable=function(){return this.masterPlaylistController_.seekable()},t.dispose=function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.player_&&(delete this.player_.vhs,delete this.player_.dash,delete this.player_.hls),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.tech_&&delete this.tech_.hls,this.mediaSourceUrl_&&P().URL.revokeObjectURL&&(P().URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),s.prototype.dispose.call(this)},t.convertToProgramTime=function(e,r){return function(n){var t=n.playlist,i=n.time,e=void 0===i?void 0:i,r=n.callback;if(!r)throw new Error("getProgramTime: callback must be provided");if(!t||void 0===e)return r({message:"getProgramTime: playlist and time must be provided"});var a=function(n,t){if(!t||!t.segments||0===t.segments.length)return null;for(var e,i=0,r=0;ri){if(n>i+.25*a.duration)return null;e=a}return{segment:e,estimatedStart:e.videoTimingInfo?e.videoTimingInfo.transmuxedPresentationStart:i-e.duration,type:e.videoTimingInfo?"accurate":"estimate"}}(e,t);if(!a)return r({message:"valid programTime was not found"});if("estimate"===a.type)return r({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:a.estimatedStart});var o={mediaSeconds:e},l=function(n,t){if(!t.dateTimeObject)return null;var a=n-(t.videoTimingInfo.transmuxedPresentationStart+t.videoTimingInfo.transmuxerPrependedSeconds);return new Date(t.dateTimeObject.getTime()+1e3*a)}(e,a.segment);return l&&(o.programDateTime=l.toISOString()),r(null,o)}({playlist:this.masterPlaylistController_.media(),time:e,callback:r})},t.seekToProgramTime=function(e,r,a,o){return void 0===a&&(a=!0),void 0===o&&(o=2),Pm({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:o,pauseAfterSeek:a,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:r})},n}(U.getComponent("Component")),La={name:"videojs-http-streaming",VERSION:"2.13.1",canHandleSource:function(n,t){void 0===t&&(t={});var i=U.mergeOptions(U.options,t);return La.canPlayType(n.type,i)},handleSource:function(n,t,i){void 0===i&&(i={});var e=U.mergeOptions(U.options,i);return t.vhs=new Fo(n,t,e),U.hasOwnProperty("hls")||Object.defineProperty(t,"hls",{get:function(){return U.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."),t.vhs},configurable:!0}),t.vhs.xhr=xd(),t.vhs.src(n.src,n.type),t.vhs},canPlayType:function(n,t){void 0===t&&(t={});var i=U.mergeOptions(U.options,t),e=i.vhs,r=(e=void 0===e?{}:e).overrideNative,a=void 0===r?!U.browser.IS_ANY_SAFARI:r,o=i.hls,l=(o=void 0===o?{}:o).overrideNative,d=void 0!==l&&l,f=sn(n);return f&&(!Lt.supportsTypeNatively(f)||d||a)?"maybe":""}};ii("avc1.4d400d,mp4a.40.2")&&U.getTech("Html5").registerSourceHandler(La,0),U.VhsHandler=Fo,Object.defineProperty(U,"HlsHandler",{get:function(){return U.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),Fo},configurable:!0}),U.VhsSourceHandler=La,Object.defineProperty(U,"HlsSourceHandler",{get:function(){return U.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),La},configurable:!0}),U.Vhs=Lt,Object.defineProperty(U,"Hls",{get:function(){return U.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."),Lt},configurable:!0}),U.use||(U.registerComponent("Hls",Lt),U.registerComponent("Vhs",Lt)),U.options.vhs=U.options.vhs||{},U.options.hls=U.options.hls||{},U.getPlugin&&U.getPlugin("reloadSourceOnError")||(U.registerPlugin||U.plugin)("reloadSourceOnError",function(n){sv(this,n)});const xv=U,Sv=["target"];let Ev=(()=>{class s{constructor(t){this.gs=t,this.subtitlesOctopus=null,this.videoUrl=null,this.videoThumb=null,this.subtitleUrl=null,this.subtitleFonts=[]}ngOnInit(){this.gs.isBrowser&&this.target&&this.videoUrl&&(this.gs.log("[VIDEO-JS_INIT_URL]",this.videoUrl),this.player=xv(this.target.nativeElement,{autoplay:!1,controls:!0,fluid:!0,muted:!1,sources:[{src:this.videoUrl,type:"video/mp4"}],poster:this.videoThumb},()=>{this.gs.log("[VIDEO-JS_READY]",this.player),this.initSubtitle()}))}ngOnDestroy(){this.subtitlesOctopus?.dispose(),this.player?.dispose()}ngOnChanges(){this.subtitlesOctopus?this.subtitleUrl&&this.subtitlesOctopus.setTrackByUrl(this.subtitleUrl):this.initSubtitle()}initSubtitle(){this.subtitleUrl&&(this.subtitlesOctopus=new SubtitlesOctopus({video:this.target.nativeElement,subUrl:this.subtitleUrl,fonts:this.subtitleFonts,workerUrl:"/assets/lib/subtitles-octopus-worker.js",legacyWorkerUrl:"/assets/lib/subtitles-octopus-worker-legacy.js"}),this.gs.log("[SUBTITLE_INIT]",this.subtitlesOctopus))}}return s.\u0275fac=function(t){return new(t||s)(u.Y36(ke.U))},s.\u0275cmp=u.Xpm({type:s,selectors:[["app-vjs-player"]],viewQuery:function(t,i){if(1&t&&u.Gf(Sv,7),2&t){let e;u.iGM(e=u.CRH())&&(i.target=e.first)}},inputs:{videoUrl:"videoUrl",videoThumb:"videoThumb",subtitleUrl:"subtitleUrl",subtitleFonts:"subtitleFonts"},features:[u.TTD],decls:2,vars:0,consts:[["controls","","muted","","playsinline","","preload","none",1,"video-js","w-100"],["target",""]],template:function(t,i){1&t&&u._UZ(0,"video",0,1)}}),s})();var Cv=H(9461),kv=H(325),fc=H(3626);function Av(s,n){if(1&s&&(u.TgZ(0,"mat-list-option",22),u._UZ(1,"img",23),u.TgZ(2,"h4"),u._uU(3),u.qZA()()),2&s){const t=u.oxw(2);u.hYB("routerLink","/anime/",t.berkasData.anime_.id,"-",t.animeName,""),u.xp6(1),u.s9C("src",t.berkasData.anime_.image_url,u.LSH),u.xp6(2),u.Oqu(t.berkasData.anime_.name)}}function wv(s,n){if(1&s&&(u.TgZ(0,"mat-list-option",22),u._UZ(1,"img",23),u.TgZ(2,"h4"),u._uU(3),u.qZA()()),2&s){const t=u.oxw(2);u.MGl("routerLink","/dorama/",t.berkasData.dorama_.slug,""),u.xp6(1),u.s9C("src",t.berkasData.dorama_.image_url,u.LSH),u.xp6(2),u.Oqu(t.berkasData.dorama_.name)}}function Iv(s,n){if(1&s&&(u.TgZ(0,"mat-list-option",22),u._UZ(1,"img",23),u.TgZ(2,"h4"),u._uU(3),u.qZA()()),2&s){const t=n.$implicit;u.MGl("routerLink","/fansub/",t.slug,""),u.xp6(1),u.s9C("src",t.image_url,u.LSH),u.xp6(2),u.Oqu(t.name)}}function Dv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",38),u.NdJ("click",function(){u.CHM(t);const e=u.oxw(4);return u.KtG(e.ddl(e.berkasData.attachment_.id))}),u._UZ(1,"mat-icon",39),u._uU(2),u.ALo(3,"slice"),u.ALo(4,"bytes"),u.qZA()}if(2&s){const t=u.oxw(4);u.hYB("matTooltip","",t.lampiran.orig||t.lampiran.name+"."+t.lampiran.ext," :: ",t.lampiran.download_count,"x Unduhan"),u.xp6(2),u.lnq(" ",u.Dn7(3,5,(null==t.lampiran.orig?null:t.lampiran.orig.split(".")[0])||t.lampiran.name,0,5),".....",t.lampiran.ext," (",u.lcZ(4,9,t.lampiran.size),") ")}}function Pv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",40),u.NdJ("click",function(){u.CHM(t);const e=u.oxw(4);return u.KtG(e.cancel_dl(e.berkasData.attachment_.id))}),u._UZ(1,"mat-icon",41),u._uU(2," Batal Unduh "),u.qZA()}if(2&s){const t=u.oxw(4);u.hYB("matTooltip","",t.lampiran.orig||t.lampiran.name+"."+t.lampiran.ext," :: ",t.lampiran.download_count,"x Unduhan")}}function Ov(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",38),u.NdJ("click",function(){u.CHM(t);const e=u.oxw(4);return u.KtG(e.saveFileAs(e.berkasData.attachment_.id))}),u._UZ(1,"mat-icon",42),u._uU(2),u.ALo(3,"slice"),u.ALo(4,"bytes"),u.qZA()}if(2&s){const t=u.oxw(4);u.hYB("matTooltip","",t.lampiran.orig||t.lampiran.name+"."+t.lampiran.ext," :: ",t.lampiran.download_count,"x Unduhan"),u.xp6(2),u.lnq(" ",u.Dn7(3,5,(null==t.lampiran.orig?null:t.lampiran.orig.split(".")[0])||t.lampiran.name,0,5),".....",t.lampiran.ext," (",u.lcZ(4,9,t.lampiran.size),") ")}}function Lv(s,n){if(1&s&&(u.TgZ(0,"div",31),u._uU(1),u._UZ(2,"br"),u._uU(3),u._UZ(4,"br")(5,"mat-progress-bar",43),u.qZA()),2&s){const t=u.oxw(4);u.xp6(1),u.AsE(" ",t.lampiran.percentage>=100?"Selesai Mengunduh ... ":"Sedang Mengunduh ... "," ",t.lampiran.totals," Bytes "),u.xp6(2),u.AsE(" ",t.lampiran.percentage,"% @ ",t.lampiran.speed," KB/s "),u.xp6(2),u.Q6J("mode",t.lampiran.mode)("value",t.lampiran.percentage)}}function Rv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"div",45),u.NdJ("click",function(){u.CHM(t);const e=u.oxw(5);return u.KtG(e.standardDdlVideo(e.berkasData.attachment_.id))}),u._uU(1," Unduhan Macet? "),u.TgZ(2,"i")(3,"u"),u._uU(4,"Coba Gunakan Unduhan Biasa~"),u.qZA()()()}}function Mv(s,n){if(1&s&&(u.TgZ(0,"div",18),u.YNc(1,Rv,5,0,"div",44),u.qZA()),2&s){const t=u.oxw(4);u.xp6(1),u.Q6J("ngIf",t.lampiran.isDownloading)}}function Uv(s,n){1&s&&(u.TgZ(0,"div",46),u._UZ(1,"hr",47),u.qZA())}function Nv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",40),u.NdJ("click",function(){const r=u.CHM(t).$implicit,a=u.oxw(4);return u.KtG(a.standardDdlSubsFont(r.id))}),u._UZ(1,"mat-icon",48),u._uU(2),u.ALo(3,"slice"),u.ALo(4,"bytes"),u.qZA()}if(2&s){const t=n.$implicit;u.hYB("matTooltip","",t.orig||t.name+"."+t.ext," :: ",t.download_count,"x Unduhan"),u.xp6(2),u.lnq(" ",u.Dn7(3,5,(null==t.orig?null:t.orig.split(".")[0])||t.name,0,5),".....",t.ext," (",u.lcZ(4,9,t.size),") ")}}function Fv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",40),u.NdJ("click",function(){const r=u.CHM(t).$implicit,a=u.oxw(4);return u.KtG(a.standardDdlSubsFont(r.id))}),u._UZ(1,"mat-icon",49),u._uU(2),u.ALo(3,"slice"),u.ALo(4,"bytes"),u.qZA()}if(2&s){const t=n.$implicit;u.hYB("matTooltip","",t.orig||t.name+"."+t.ext," :: ",t.download_count,"x Unduhan"),u.xp6(2),u.lnq(" ",u.Dn7(3,5,(null==t.orig?null:t.orig.split(".")[0])||t.name,0,5),".....",t.ext," (",u.lcZ(4,9,t.size),") ")}}function Bv(s,n){if(1&s&&(u.TgZ(0,"div",30)(1,"div",31),u.YNc(2,Dv,5,11,"button",32),u.YNc(3,Pv,3,2,"button",33),u.YNc(4,Ov,5,11,"button",32),u.TgZ(5,"div",13),u.YNc(6,Lv,6,6,"div",34),u.qZA(),u.YNc(7,Mv,2,1,"div",35),u.YNc(8,Uv,2,0,"div",36),u.YNc(9,Nv,5,11,"button",37),u.YNc(10,Fv,5,11,"button",37),u.qZA()()),2&s){const t=u.oxw(3);u.xp6(2),u.Q6J("ngIf",!t.lampiran.data&&!t.lampiran.isDownloading&&!t.lampiran.isCompleted),u.xp6(1),u.Q6J("ngIf",!t.lampiran.data&&t.lampiran.isDownloading),u.xp6(1),u.Q6J("ngIf",t.lampiran.data),u.xp6(2),u.Q6J("ngIf",t.lampiran.isDownloading&&!t.lampiran.isCompleted),u.xp6(1),u.Q6J("ngIf",t.isHaveDDL&&!t.isDiscord),u.xp6(1),u.Q6J("ngIf",(null==t.berkasData.attachment_||null==t.berkasData.attachment_.subtitles_?null:t.berkasData.attachment_.subtitles_.length)>0||(null==t.berkasData.attachment_||null==t.berkasData.attachment_.fonts_?null:t.berkasData.attachment_.fonts_.length)>0),u.xp6(1),u.Q6J("ngForOf",t.berkasData.attachment_.subtitles_),u.xp6(1),u.Q6J("ngForOf",t.berkasData.attachment_.fonts_)}}function jv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"div",30)(1,"div",31)(2,"button",50),u.NdJ("click",function(){u.CHM(t);const e=u.oxw(3);return u.KtG(e.verify())}),u._UZ(3,"mat-icon",51),u._uU(4),u.qZA()()()}if(2&s){const t=u.oxw(3);u.xp6(4),u.hij(" ",t.berkasData.attachment_," ")}}function Hv(s,n){if(1&s&&(u.TgZ(0,"div",14)(1,"div",15)(2,"h2",16)(3,"b",17)(4,"i"),u._uU(5,"Direct Download"),u.qZA()()()(),u.YNc(6,Bv,11,8,"div",29),u.YNc(7,jv,5,1,"div",29),u.qZA()),2&s){const t=u.oxw(2);u.xp6(6),u.Q6J("ngIf",t.isHaveDDL),u.xp6(1),u.Q6J("ngIf",!t.isHaveDDL)}}function Vv(s,n){if(1&s&&(u.TgZ(0,"a",53),u._UZ(1,"mat-icon",54),u._uU(2),u.qZA()),2&s){const t=n.$implicit;u.s9C("href",t.url,u.LSH),u.xp6(2),u.hij(" ",t.name," ")}}function qv(s,n){if(1&s&&(u.TgZ(0,"div",30),u.YNc(1,Vv,3,2,"a",52),u.qZA()),2&s){const t=u.oxw(3);u.xp6(1),u.Q6J("ngForOf",t.berkasData.download_url)}}function Wv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"div",30)(1,"button",55),u.NdJ("click",function(){u.CHM(t);const e=u.oxw(3);return u.KtG(e.login())}),u._UZ(2,"mat-icon",56),u._uU(3," Klik Untuk Login "),u.qZA()()}}function Gv(s,n){if(1&s&&(u.TgZ(0,"div",14)(1,"div",15)(2,"h2",16)(3,"b",17),u._uU(4),u.qZA()()(),u.YNc(5,qv,2,1,"div",29),u.YNc(6,Wv,4,0,"div",29),u.qZA()),2&s){const t=u.oxw(2);u.xp6(4),u.hij("Tautan Unduhan ",null!=t.AS.currentUserSubject&&t.AS.currentUserSubject.value?"External":"",""),u.xp6(1),u.Q6J("ngIf",null==t.AS.currentUserSubject?null:t.AS.currentUserSubject.value),u.xp6(1),u.Q6J("ngIf",!(null!=t.AS.currentUserSubject&&t.AS.currentUserSubject.value))}}function Zv(s,n){if(1&s&&(u.TgZ(0,"div",14)(1,"div",15)(2,"h2",16)(3,"b",17),u._uU(4,"Deskripsi & Informasi"),u.qZA()()(),u.TgZ(5,"div",18),u._UZ(6,"div",57),u.qZA()()),2&s){const t=u.oxw(2);u.xp6(6),u.Q6J("innerHTML",t.berkasData.description,u.oJD)}}function Kv(s,n){if(1&s&&(u.TgZ(0,"mat-option",69),u._uU(1),u.qZA()),2&s){const t=n.$implicit;u.Q6J("value",t.url),u.xp6(1),u.Oqu(t.name)}}function zv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"mat-form-field",66)(1,"mat-label"),u._uU(2,"Pilih Subtitle / Takarir (.ASS Saja)"),u.qZA(),u.TgZ(3,"mat-select",67),u.NdJ("valueChange",function(e){u.CHM(t);const r=u.oxw(3);return u.KtG(r.selectedSubsUrl=e)}),u.YNc(4,Kv,2,2,"mat-option",68),u.qZA()()}if(2&s){const t=u.oxw(3);u.Q6J("color","accent"),u.xp6(3),u.Q6J("value",t.selectedSubsUrl),u.xp6(1),u.Q6J("ngForOf",t.subtitles)}}function Yv(s,n){1&s&&u._UZ(0,"mat-progress-bar",70)}function $v(s,n){1&s&&(u.TgZ(0,"span"),u._uU(1,"Mulai Streaming Video"),u.qZA())}function Qv(s,n){1&s&&(u.TgZ(0,"span"),u._uU(1," Loading ... "),u.qZA())}function Xv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",71),u.NdJ("click",function(){u.CHM(t);const e=u.oxw(3);return u.KtG(e.watchDdl())}),u._UZ(1,"mat-icon",72),u.YNc(2,$v,2,0,"span",73),u.YNc(3,Qv,2,0,"span",73),u.qZA()}if(2&s){const t=u.oxw(3);u.Q6J("disabled",t.vjsInit),u.xp6(2),u.Q6J("ngIf",!t.vjsInit),u.xp6(1),u.Q6J("ngIf",t.vjsInit)}}function Jv(s,n){if(1&s&&u._UZ(0,"app-vjs-player",74),2&s){const t=u.oxw(3);u.Q6J("videoUrl",t.ddlVideo)("videoThumb",t.videoThumb)("subtitleUrl",t.selectedSubsUrl)("subtitleFonts",t.ddlFonts)}}function e_(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",75),u.NdJ("click",function(){u.CHM(t);const e=u.oxw(3);return u.KtG(e.verify())}),u._UZ(1,"mat-icon",51),u._uU(2),u.qZA()}if(2&s){const t=u.oxw(3);u.xp6(2),u.hij(" ",t.berkasData.attachment_," ")}}function t_(s,n){if(1&s&&(u.TgZ(0,"div",14)(1,"div",15)(2,"h2",16)(3,"b",17),u._uU(4,"Video Stream (Browser Tertentu T.T)"),u.qZA()()(),u.TgZ(5,"div",18)(6,"div",58),u._uU(7," Dapat digunakan sebagai referensi untuk pratinjau namun kemungkinan jenis huruf tulisan gagal dimuat sehingga nantinya akan muncul huruf dengan gambar \u{1f533} misalnya kanji. Lalu juga memungkinkan terjadinya gerakan patah - patah jika browser tidak kuat untuk render .ASS subtitle dengan efek yang terlalu banyak. "),u.TgZ(8,"span",59)(9,"i"),u._uU(10,"Player"),u.qZA(),u._uU(11," ini mungkin tidak dapat memutar video HEVC-x265 (belum support semua "),u.TgZ(12,"i"),u._uU(13,"web browser"),u.qZA(),u._uU(14,") dan audio AC3 (atau ekstensi lain yang masih memiliki lisensi paten belum "),u.TgZ(15,"i"),u._uU(16,"open source"),u.qZA(),u._uU(17,"). Takarir / "),u.TgZ(18,"i"),u._uU(19,"subtitle"),u.qZA(),u._uU(20," yang dapat ditampilkan jenis .ASS saja, itupun jika tersedia di dalam video internalnya. "),u.qZA(),u.TgZ(21,"a",60),u._uU(22," * Browser Firefox sudah pasti tidak bisa memutar .MKV "),u.qZA()(),u.TgZ(23,"div",31),u.YNc(24,zv,5,3,"mat-form-field",61),u.YNc(25,Yv,1,0,"mat-progress-bar",62),u.YNc(26,Xv,4,3,"button",63),u.YNc(27,Jv,1,4,"app-vjs-player",64),u.YNc(28,e_,3,1,"button",65),u.qZA()()()),2&s){const t=u.oxw(2);u.xp6(24),u.Q6J("ngIf",t.subtitles.length>0),u.xp6(1),u.Q6J("ngIf",t.isHaveDDL&&t.vjsInit&&!t.vjsReady),u.xp6(1),u.Q6J("ngIf",t.isHaveDDL&&!t.vjsReady),u.xp6(1),u.Q6J("ngIf",t.isHaveDDL&&t.vjsInit&&t.vjsReady),u.xp6(1),u.Q6J("ngIf",!t.isHaveDDL)}}function i_(s,n){1&s&&(u.TgZ(0,"div",14)(1,"div",18),u._UZ(2,"app-report"),u.qZA()())}function r_(s,n){if(1&s&&(u.TgZ(0,"div",1)(1,"div",2)(2,"div",3)(3,"ul",4),u._UZ(4,"li")(5,"li")(6,"li")(7,"li")(8,"li")(9,"li")(10,"li")(11,"li")(12,"li")(13,"li"),u.TgZ(14,"div",5)(15,"h2",6),u._uU(16),u.qZA(),u.TgZ(17,"p",7),u._uU(18),u.qZA(),u.TgZ(19,"p",8),u._uU(20),u.ALo(21,"date"),u.qZA()()()()(),u._UZ(22,"app-notifications"),u.TgZ(23,"div",9)(24,"div",10)(25,"div",11)(26,"div",12)(27,"div",13)(28,"div",14)(29,"div",15)(30,"h2",16)(31,"b",17),u._uU(32,"Rujukan"),u.qZA()()(),u.TgZ(33,"div",18)(34,"mat-selection-list",19),u.YNc(35,Av,4,4,"mat-list-option",20),u.YNc(36,wv,4,3,"mat-list-option",20),u.YNc(37,Iv,4,3,"mat-list-option",21),u.TgZ(38,"mat-list-option",22),u._UZ(39,"img",23),u.TgZ(40,"h4"),u._uU(41),u.qZA()()()()(),u.YNc(42,Hv,8,2,"div",24),u.YNc(43,Gv,7,3,"div",24),u.qZA()()(),u.TgZ(44,"div",25)(45,"div",12)(46,"div",13),u.YNc(47,Zv,7,1,"div",24),u.YNc(48,t_,29,5,"div",24),u.YNc(49,i_,3,0,"div",24),u.TgZ(50,"div",14)(51,"div",26)(52,"h2",27)(53,"b",17),u._uU(54,"Komentar"),u.qZA()()(),u.TgZ(55,"div",18)(56,"div",28),u._UZ(57,"app-discussion"),u.qZA()()()()()()()()()),2&s){const t=u.oxw();u.xp6(2),u.Udp("background","url(/assets/img/banner/berkas-detail.png), linear-gradient(to bottom, "+(t.GS.isDarkMode?"#673ab7":"#3f51b5")+" 0%, #ee0dfd 100%)"),u.xp6(14),u.hij(" ",t.berkasData.name," "),u.xp6(2),u.AsE(" ",t.berkasData.view_count,"x Dilihat :: ",t.berkasData.like_count," Orang Suka "),u.xp6(2),u.hij(" ",u.xi3(21,18,t.berkasData.created_at,"d MMMM y, hh:mm:ss a z")," "),u.xp6(14),u.Q6J("multiple",!1),u.xp6(1),u.Q6J("ngIf",t.berkasData.anime_),u.xp6(1),u.Q6J("ngIf",t.berkasData.dorama_),u.xp6(1),u.Q6J("ngForOf",t.berkasData.fansub_),u.xp6(1),u.MGl("routerLink","/user/",t.berkasData.user_.username,""),u.xp6(1),u.s9C("src",t.berkasData.user_.image_url,u.LSH),u.xp6(2),u.Oqu(t.berkasData.user_.username),u.xp6(1),u.Q6J("ngIf",(null==t.AS.currentUserSubject?null:t.AS.currentUserSubject.value)&&t.berkasData.attachment_),u.xp6(1),u.Q6J("ngIf",!(null!=t.AS.currentUserSubject&&t.AS.currentUserSubject.value)||(null==t.AS.currentUserSubject?null:t.AS.currentUserSubject.value)&&(null==t.berkasData.download_url?null:t.berkasData.download_url.length)>0),u.xp6(4),u.Q6J("ngIf",t.berkasData.description),u.xp6(1),u.Q6J("ngIf",t.berkasData.attachment_&&t.isStreamable),u.xp6(1),u.Q6J("ngIf",null==t.SS.mySocket?null:t.SS.mySocket.id)}}let n_=(()=>{class s{constructor(t,i,e,r,a,o,l,d,f,v,g,T){this.router=t,this.activatedRoute=i,this.gs=e,this.bs=r,this.pi=a,this.berkas=o,this.fs=l,this.as=d,this.dm=f,this.wb=v,this.ss=g,this.dls=T,this.berkasId="",this.berkasData=null,this.subsBerkas=null,this.subsParam=null,this.subsDialog=null,this.subsSubtitlesFonts=null,this.subtitles=[],this.fonts=[],this.selectedSubsUrl=null,this.vjsInit=!1,this.vjsReady=!1,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get GS(){return this.gs}get AS(){return this.as}get SS(){return this.ss}ngOnDestroy(){this.subsBerkas?.unsubscribe(),this.subsParam?.unsubscribe(),this.subsDialog?.unsubscribe(),this.subsSubtitlesFonts?.unsubscribe()}ngOnInit(){this.subsParam=this.activatedRoute.params.subscribe({next:t=>{this.berkasId=t.berkasId,this.bs.busy(),this.subsBerkas=this.berkas.getBerkas(this.berkasId).subscribe({next:i=>{this.gs.log("[BERKAS_DETAIL_SUCCESS]",i),this.berkasData=i.result,this.pi.updatePageMetaData(`${this.berkasData.name}`,`${this.berkasData.description}`,`${this.berkasData.name}`,this.berkasData.image_url,this.berkasData.user_.username),this.pi.updatePageHeader(this.berkasData.project_type_.name),this.bs.idle(),this.gs.isBrowser&&this.fs.initializeFab("edit",null,"Ubah Data Berkas",`/berkas/${this.berkasId}/edit`,!1)},error:i=>{this.gs.log("[BERKAS_DETAIL_ERROR]",i,"error"),this.bs.idle(),this.router.navigate(["/error"],{queryParams:{returnUrl:"/berkas"}})}})}})}watchDdl(){this.vjsInit=!0,this.setupVjs()}login(){this.router.navigate(["/login"],{queryParams:{returnUrl:this.router.url.split("?")[0]}})}verify(){this.router.navigate(["/verify"],{queryParams:{returnUrl:this.router.url.split("?")[0]}})}get animeName(){return this.berkasData.anime_.name.replace(/[^a-zA-Z0-9]/g,"-")}get lampiran(){return this.dm.getAttachmentDownloadFile(this.berkasData.attachment_)}get ddlVideo(){return this.ddlUrlLinkVideo(this.berkasData.attachment_.id)}get videoThumb(){return this.berkasData.image_url}get ddlFonts(){return this.fonts.length>0?this.fonts:[]}get isHaveDDL(){return!(!("attachment_"in this.berkasData)||!this.berkasData.attachment_)&&"string"!=typeof this.berkasData.attachment_}get isDiscord(){return this.isHaveDDL&&this.berkasData.attachment_?.discord}get isStreamable(){return this.isHaveDDL&&this.gs.includesOneOf(this.berkasData.attachment_?.ext,Q.t.fileTypeAttachmentStreamable)}ddl(t){var i=this;return(0,oe.Z)(function*(){i.isDiscord?i.dm.startDownload(t,!1):i.dm.startDownload(t)})()}cancel_dl(t){this.dm.cancelDownload(t)}saveFileAs(t){this.dm.saveFileAs(t)}standardDdlVideo(t){this.wb.winboxOpenUri(this.ddlUrlLinkVideo(t))}ddlUrlLinkVideo(t){return this.isDiscord?`${Ge.N.apiUrl}/ddl-seek/${t}?ngsw-bypass=true`:`${Ge.N.apiUrl}/attachment/${t}?ngsw-bypass=true`}standardDdlSubsFont(t){this.wb.winboxOpenUri(this.ddlUrlLinkSubsFont(t))}ddlUrlLinkSubsFont(t){return`${Ge.N.apiUrl}/attachment/${t}?ngsw-bypass=true`}setupVjs(){if(this.isHaveDDL){const t=[],i=[],e=[];if("subtitles_"in this.berkasData.attachment_&&this.berkasData.attachment_.subtitles_)for(const r of this.berkasData.attachment_.subtitles_){const a=this.dls.downloadLampiran(r.id).pipe((0,me.b)(o=>{o.type===Le.dt.Response&&(this.gs.log("[DOWNLOAD_COMPLETED]",o),i.push({name:r.name,url:URL.createObjectURL(new Blob([o.body]))}))}));t.push(a)}if("fonts_"in this.berkasData.attachment_&&this.berkasData.attachment_.fonts_)for(const r of this.berkasData.attachment_.fonts_){const a=this.dls.downloadLampiran(r.id).pipe((0,me.b)(o=>{o.type===Le.dt.Response&&(this.gs.log("[DOWNLOAD_COMPLETED]",o),e.push(URL.createObjectURL(new Blob([o.body]))))}));t.push(a)}this.subsSubtitlesFonts=(0,Oe.z)(...t).subscribe({next:r=>{r.type===Le.dt.DownloadProgress&&this.gs.log("[DOWNLOAD_PROGRESS]",r),r.type===Le.dt.Response&&this.gs.log("[DOWNLOAD_COMPLETED]",r)},error:r=>{this.gs.log("[DOWNLOAD_ERROR]",r,"error")},complete:()=>{this.subtitles=i,this.fonts=e,this.vjsReady=!0}})}}}return s.\u0275fac=function(t){return new(t||s)(u.Y36(_e.F0),u.Y36(_e.gz),u.Y36(ke.U),u.Y36(Ue.z),u.Y36(je.Z),u.Y36(rt.A),u.Y36(w.r),u.Y36(D.e),u.Y36(de),u.Y36(le.N),u.Y36(xe.R),u.Y36($.v))},s.\u0275cmp=u.Xpm({type:s,selectors:[["app-berkas-detail"]],decls:1,vars:1,consts:[["class","p-0 m-0",4,"ngIf"],[1,"p-0","m-0"],[1,"container-fluid","p-0"],[1,"wrapper"],[1,"bg-bubbles","align-items-center","p-0"],[1,"container","align-items-center","h-100","p-3","text-light",2,"overflow-y","auto"],["_ngcontent-serverapp-c311","",1,"mb-0",2,"line-height","normal"],[1,"mt-3","mb-0"],[1,"mb-0"],[1,"container"],[1,"row"],[1,"col-md-5","col-xl-4","p-3"],[1,"row","sticky-top"],[1,"col"],[1,"row","py-3"],[1,"col-12","pt-3","sticky-top","bg-bifeldy"],[1,"border-bottom-dotted"],[1,"text-bifeldy"],[1,"col-12"],[3,"multiple"],[3,"routerLink",4,"ngIf"],[3,"routerLink",4,"ngFor","ngForOf"],[3,"routerLink"],["matListAvatar","",1,"ms-3",2,"border-radius","0",3,"src"],["class","row py-3",4,"ngIf"],[1,"col-md-7","col-xl-8","p-3","sticky-top"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"p-3"],["class","col-12 text-center",4,"ngIf"],[1,"col-12","text-center"],[1,"px-3"],["type","button","class","m-1 w-100 shiny","mat-stroked-button","","color","accent",3,"matTooltip","click",4,"ngIf"],["type","button","class","m-1 w-100","mat-stroked-button","","color","accent",3,"matTooltip","click",4,"ngIf"],["class","px-3",4,"ngIf"],["class","col-12",4,"ngIf"],["class","col-12 m-1",4,"ngIf"],["type","button","class","m-1 w-100","mat-stroked-button","","color","accent",3,"matTooltip","click",4,"ngFor","ngForOf"],["type","button","mat-stroked-button","","color","accent",1,"m-1","w-100","shiny",3,"matTooltip","click"],["fontIcon","movie",1,"me-1"],["type","button","mat-stroked-button","","color","accent",1,"m-1","w-100",3,"matTooltip","click"],["fontIcon","close",1,"me-1"],["fontIcon","save",1,"me-1"],["color","accent",3,"mode","value"],["class","px-3 text-danger","style","cursor: pointer;",3,"click",4,"ngIf"],[1,"px-3","text-danger",2,"cursor","pointer",3,"click"],[1,"col-12","m-1"],[1,"my-3","border-bottom-dotted",2,"height","4px","background","url('/assets/img/stripe.png')"],["fontIcon","notes",1,"me-1"],["fontIcon","font_download",1,"me-1"],["type","button","mat-stroked-button","","color","accent","matTooltip","Direct Download Link Berkas",1,"m-1",3,"click"],["fontIcon","enhanced_encryption",1,"me-1"],["class","m-1","target","_blank","mat-stroked-button","","color","accent",3,"href",4,"ngFor","ngForOf"],["target","_blank","mat-stroked-button","","color","accent",1,"m-1",3,"href"],["fontIcon","cloud_download",1,"me-1"],["type","button","mat-stroked-button","","color","accent",1,"m-1",3,"click"],["fontIcon","vpn_key",1,"me-1"],[1,"py-2","px-3",2,"white-space","pre-line !important",3,"innerHTML"],[1,"py-2","px-3"],[1,"text-success"],["href","https://bugzilla.mozilla.org/show_bug.cgi?id=1422891",1,"text-warning","text-decoration-none"],["appearance","outline","class","pt-3 col-12",3,"color",4,"ngIf"],["color","warn","mode","buffer","class","mb-3",4,"ngIf"],["type","button","class","w-100","mat-stroked-button","","color","warn",3,"disabled","click",4,"ngIf"],[3,"videoUrl","videoThumb","subtitleUrl","subtitleFonts",4,"ngIf"],["type","button","class","w-100","mat-stroked-button","","color","accent",3,"click",4,"ngIf"],["appearance","outline",1,"pt-3","col-12",3,"color"],["placeholder","Pilih Salah Satu",3,"value","valueChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["color","warn","mode","buffer",1,"mb-3"],["type","button","mat-stroked-button","","color","warn",1,"w-100",3,"disabled","click"],["fontIcon","play_arrow",1,"me-1"],[4,"ngIf"],[3,"videoUrl","videoThumb","subtitleUrl","subtitleFonts"],["type","button","mat-stroked-button","","color","accent",1,"w-100",3,"click"]],template:function(t,i){1&t&&u.YNc(0,r_,58,21,"div",0),2&t&&u.Q6J("ngIf",i.berkasData)},dependencies:[X.sg,X.O5,_e.rH,J.ey,ue.lW,ue.zs,ee.Hw,ie.KE,ie.hX,Ae.eA,Ae.Ub,Ae.vS,Ze.pW,We.gD,qe.gM,Me.t,Ev,Cv.S,kv.Y,X.OU,X.uU,fc.$],styles:[".wrapper[_ngcontent-%COMP%]{position:sticky;left:0;width:100%;height:128px;overflow:hidden;background-size:168px,auto!important;background-repeat:no-repeat,repeat!important;background-position-x:100%,0%!important}.bg-bubbles[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{position:absolute;list-style:none;display:block;width:40px;height:40px;background-color:#ffffff26;bottom:-160px;animation:square 25s infinite;transition-timing-function:linear}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(1){left:10%}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(2){left:20%;width:80px;height:80px;animation-delay:2s;animation-duration:17s}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(3){left:25%;animation-delay:4s}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(4){left:40%;width:60px;height:60px;animation-duration:22s;background-color:#ffffff40}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(5){left:70%}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(6){left:80%;width:120px;height:120px;animation-delay:3s;background-color:#fff3}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(7){left:32%;width:160px;height:160px;animation-delay:7s}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(8){left:55%;width:20px;height:20px;animation-delay:15s;animation-duration:40s}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(9){left:25%;width:10px;height:10px;animation-delay:2s;animation-duration:40s;background-color:#ffffff4d}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(10){left:90%;width:160px;height:160px;animation-delay:11s}@keyframes square{0%{transform:translateY(0)}to{transform:translateY(-512px) rotate(512deg)}}"]}),s})();var Ra=H(8372),Ma=H(9094),Bo=H(3900),jo=H(8746),Ua=H(5625),a_=H(519),s_=H(8439),o_=H(5679),u_=H(6781),l_=H(7902),d_=H(6493),hc=H(7957),c_=H(4850),f_=H(4144),pc=H(455);function h_(s,n){if(1&s&&(u.TgZ(0,"div"),u._uU(1),u.ALo(2,"bytes"),u.qZA()),2&s){const t=u.oxw(2);u.xp6(1),u.hij("Ukuran Upload Melebihi Batas ",u.lcZ(2,1,t.imageLimitExceeded)," !")}}function p_(s,n){if(1&s&&(u.TgZ(0,"div"),u._uU(1),u.qZA()),2&s){const t=u.oxw(2);u.xp6(1),u.Oqu(t.imageErrorText)}}function m_(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"div",50)(1,"button",29),u.NdJ("click",function(){u.CHM(t);const e=u.oxw(2);return u.KtG(e.submitImage())}),u._UZ(2,"mat-icon",51),u._uU(3," Unggah "),u.qZA()()}if(2&s){const t=u.oxw(2);u.xp6(1),u.Q6J("disabled",t.submitted)}}function g_(s,n){1&s&&(u.TgZ(0,"div",20)(1,"mat-slide-toggle",52)(2,"i"),u._uU(3,"Private"),u.qZA(),u._uU(4," Akses Hanya Dengan URL "),u.qZA()())}function v_(s,n){if(1&s&&(u.TgZ(0,"mat-option",53),u._uU(1),u.qZA()),2&s){const t=n.$implicit;u.Q6J("value",t.id),u.xp6(1),u.Oqu(t.name)}}function __(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"Jenis Tidak Boleh Kosong"),u.qZA())}function y_(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"Jenis Hanya Boleh Huruf Standar Papan Ketik"),u.qZA())}function T_(s,n){1&s&&(u.TgZ(0,"mat-option",60),u._UZ(1,"mat-progress-bar",61),u.qZA())}function b_(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"mat-option",63),u.NdJ("click",function(){const r=u.CHM(t).$implicit,a=u.oxw(4);return u.KtG(a.filterAnimeSelected(r))}),u._UZ(1,"img",64),u.TgZ(2,"span",65),u._uU(3),u.qZA()()}if(2&s){const t=n.$implicit;u.Q6J("value",t.id),u.xp6(1),u.s9C("src",t.image_url,u.LSH),u.xp6(2),u.lnq("",t.id," :: ",null==t.media_type?null:t.media_type.toUpperCase()," :: ",t.title,"")}}function x_(s,n){if(1&s&&(u.ynx(0),u.YNc(1,b_,4,5,"mat-option",62),u.BQk()),2&s){const t=u.oxw(3);u.xp6(1),u.Q6J("ngForOf",t.filteredAnime)}}function S_(s,n){if(1&s&&(u.TgZ(0,"small",66),u._uU(1),u.qZA()),2&s){const t=u.oxw(3);u.xp6(1),u.Oqu(t.fg.get("anime_name").value)}}function E_(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"ID Anime Tidak Boleh Kosong"),u.qZA())}function C_(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"ID Anime Hanya Boleh Angka"),u.qZA())}function k_(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"mat-form-field",54)(1,"mat-label"),u._uU(2,"Anime Terkait"),u.qZA(),u.TgZ(3,"input",55),u.NdJ("keyup",function(){u.CHM(t);const e=u.oxw(2);return u.KtG(e.resetSelectedAnime())}),u.qZA(),u._UZ(4,"mat-icon",56),u.TgZ(5,"mat-autocomplete",null,57),u.YNc(7,T_,2,0,"mat-option",58),u.YNc(8,x_,2,1,"ng-container",17),u.qZA(),u.YNc(9,S_,2,1,"small",59),u.TgZ(10,"mat-error"),u.YNc(11,E_,2,0,"div",17),u.YNc(12,C_,2,0,"div",17),u.qZA()()}if(2&s){const t=u.MAs(6),i=u.oxw(2);u.Q6J("color","accent"),u.xp6(3),u.Q6J("matAutocomplete",t),u.xp6(4),u.Q6J("ngIf",i.isLoading),u.xp6(1),u.Q6J("ngIf",!i.isLoading),u.xp6(1),u.Q6J("ngIf",i.fg.get("anime_name").value),u.xp6(2),u.Q6J("ngIf",i.fg.get("anime_id").hasError("required")),u.xp6(1),u.Q6J("ngIf",i.fg.get("anime_id").hasError("pattern"))}}function A_(s,n){1&s&&(u.TgZ(0,"mat-option",60),u._UZ(1,"mat-progress-bar",61),u.qZA())}function w_(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"mat-option",63),u.NdJ("click",function(){const r=u.CHM(t).$implicit,a=u.oxw(4);return u.KtG(a.filterDoramaSelected(r))}),u._UZ(1,"img",64),u.TgZ(2,"span",65),u._uU(3),u.qZA()()}if(2&s){const t=n.$implicit;u.Q6J("value",t.mdl_id),u.xp6(1),u.s9C("src",t.image_url,u.LSH),u.xp6(2),u.AsE("",t.mdl_id," :: ",t.title,"")}}function I_(s,n){if(1&s&&(u.ynx(0),u.YNc(1,w_,4,4,"mat-option",62),u.BQk()),2&s){const t=u.oxw(3);u.xp6(1),u.Q6J("ngForOf",t.filteredDorama)}}function D_(s,n){if(1&s&&(u.TgZ(0,"small",66),u._uU(1),u.qZA()),2&s){const t=u.oxw(3);u.xp6(1),u.Oqu(t.fg.get("dorama_name").value)}}function P_(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"ID Dorama Tidak Boleh Kosong"),u.qZA())}function O_(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"ID Dorama Hanya Boleh Angka"),u.qZA())}function L_(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"mat-form-field",54)(1,"mat-label"),u._uU(2,"Dorama Terkait"),u.qZA(),u.TgZ(3,"input",67),u.NdJ("keyup",function(){u.CHM(t);const e=u.oxw(2);return u.KtG(e.resetSelectedDorama())}),u.qZA(),u._UZ(4,"mat-icon",56),u.TgZ(5,"mat-autocomplete",null,68),u.YNc(7,A_,2,0,"mat-option",58),u.YNc(8,I_,2,1,"ng-container",17),u.qZA(),u.YNc(9,D_,2,1,"small",59),u.TgZ(10,"mat-error"),u.YNc(11,P_,2,0,"div",17),u.YNc(12,O_,2,0,"div",17),u.qZA()()}if(2&s){const t=u.MAs(6),i=u.oxw(2);u.Q6J("color","accent"),u.xp6(3),u.Q6J("matAutocomplete",t),u.xp6(4),u.Q6J("ngIf",i.isLoading),u.xp6(1),u.Q6J("ngIf",!i.isLoading),u.xp6(1),u.Q6J("ngIf",i.fg.get("dorama_name").value),u.xp6(2),u.Q6J("ngIf",i.fg.get("dorama_id").hasError("required")),u.xp6(1),u.Q6J("ngIf",i.fg.get("dorama_id").hasError("pattern"))}}function R_(s,n){1&s&&u._UZ(0,"mat-icon",56)}function M_(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",75),u.NdJ("click",function(){u.CHM(t);const e=u.oxw().index,r=u.oxw(2);return u.KtG(r.removeFansub(e))}),u._UZ(1,"mat-icon",76),u.qZA()}}function U_(s,n){1&s&&(u.TgZ(0,"mat-option",60),u._UZ(1,"mat-progress-bar",61),u.qZA())}function N_(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"mat-option",63),u.NdJ("click",function(){const r=u.CHM(t).$implicit,a=u.oxw(2).index,o=u.oxw(2);return u.KtG(o.filterFansubSelected(r,a))}),u._UZ(1,"img",77),u.TgZ(2,"span",65),u._uU(3),u.qZA()()}if(2&s){const t=n.$implicit;u.Q6J("value",t.id),u.xp6(1),u.s9C("src",t.image_url,u.LSH),u.xp6(2),u.AsE("",t.slug," :: ",t.name,"")}}function F_(s,n){if(1&s&&(u.ynx(0),u.YNc(1,N_,4,4,"mat-option",62),u.BQk()),2&s){const t=u.oxw(3);u.xp6(1),u.Q6J("ngForOf",t.filteredFansub)}}function B_(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"ID Fansub Tidak Boleh Kosong"),u.qZA())}function j_(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"ID Fansub Hanya Boleh Angka"),u.qZA())}function H_(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"div")(1,"div",69)(2,"mat-form-field",70)(3,"mat-label"),u._uU(4,"Fansub Terkait"),u.qZA(),u.TgZ(5,"input",71),u.NdJ("keyup",function(){const r=u.CHM(t).index,a=u.oxw(2);return u.KtG(a.resetSelectedFansub(r))}),u.qZA(),u.YNc(6,R_,1,0,"mat-icon",72),u.YNc(7,M_,2,0,"button",73),u.TgZ(8,"mat-autocomplete",null,74),u.YNc(10,U_,2,0,"mat-option",58),u.YNc(11,F_,2,1,"ng-container",17),u.qZA(),u.TgZ(12,"small",66),u._uU(13),u.qZA(),u.TgZ(14,"mat-error"),u.YNc(15,B_,2,0,"div",17),u.YNc(16,j_,2,0,"div",17),u.qZA()()()()}if(2&s){const t=n.$implicit,i=n.index,e=u.MAs(9),r=u.oxw(2);u.xp6(1),u.Q6J("formGroupName",i),u.xp6(1),u.Q6J("color","accent"),u.xp6(3),u.Q6J("matAutocomplete",e),u.xp6(1),u.Q6J("ngIf",t.get("fansub_id").value||0===i),u.xp6(1),u.Q6J("ngIf",!t.get("fansub_id").value&&i>0),u.xp6(3),u.Q6J("ngIf",r.isLoading),u.xp6(1),u.Q6J("ngIf",!r.isLoading),u.xp6(2),u.Oqu(t.get("fansub_name").value),u.xp6(2),u.Q6J("ngIf",t.get("fansub_id").hasError("required")),u.xp6(1),u.Q6J("ngIf",t.get("fansub_id").hasError("pattern"))}}function V_(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"Nama Berkas Tidak Boleh Kosong"),u.qZA())}function q_(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"Nama Berkas Hanya Boleh Huruf Standar Papan Ketik"),u.qZA())}function W_(s,n){1&s&&u._UZ(0,"div")}function G_(s,n){if(1&s&&(u.TgZ(0,"p",82),u._uU(1),u.qZA()),2&s){const t=u.oxw(3);u.xp6(1),u.Oqu(t.attachmentFontSubtitle.join(", ").toLowerCase())}}function Z_(s,n){if(1&s&&(u.TgZ(0,"div",9)(1,"mat-list")(2,"div",78),u._uU(3,"Berkas yang terlampir tidak boleh diubah."),u.qZA(),u.TgZ(4,"mat-list-item"),u._UZ(5,"mat-icon",79),u.TgZ(6,"div",80),u._uU(7),u.qZA(),u.TgZ(8,"div",80),u._uU(9),u.ALo(10,"bytes"),u.qZA()(),u.YNc(11,G_,2,1,"p",81),u.qZA()()),2&s){const t=u.oxw(2);u.xp6(7),u.AsE("",t.attachmentFile.name,".",t.attachmentFile.ext,""),u.xp6(2),u.Oqu(u.lcZ(10,4,t.attachmentFile.size)),u.xp6(2),u.Q6J("ngIf",t.attachmentFontSubtitle.length>0)}}function K_(s,n){1&s&&u._UZ(0,"div")}function z_(s,n){if(1&s&&(u.TgZ(0,"div"),u._uU(1),u.ALo(2,"bytes"),u.qZA()),2&s){const t=u.oxw(4);u.xp6(1),u.hij("Ukuran Upload Melebihi Batas ",u.lcZ(2,1,t.attachmentLimitExceeded)," !")}}function Y_(s,n){if(1&s&&(u.TgZ(0,"div"),u._uU(1),u.qZA()),2&s){const t=u.oxw(4);u.xp6(1),u.Oqu(t.attachmentErrorText)}}function $_(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"div",41)(1,"div",93)(2,"div",94),u._uU(3),u.ALo(4,"bytes"),u._UZ(5,"br")(6,"mat-progress-bar",95),u.qZA()(),u.TgZ(7,"div",96)(8,"button",29),u.NdJ("click",function(){const r=u.CHM(t).$implicit,a=u.oxw(4);return u.KtG(a.submitAttachment(r))}),u._UZ(9,"mat-icon",97),u._uU(10," Unggah "),u.qZA()()()}if(2&s){const t=n.$implicit,i=u.oxw(4);u.xp6(3),u.HOy(" ",t.status," :: ",t.progress,"% @ ",u.lcZ(4,7,t.speed),"/s # ",t.remaining," detik "),u.xp6(3),u.Q6J("mode","determinate")("value",t.progress),u.xp6(2),u.Q6J("disabled",i.submitted||"complete"===t.status||"uploading"===t.status)}}function Q_(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"div",9)(1,"div",85)(2,"small",86),u._uU(3," * "),u.TgZ(4,"i"),u._uU(5,"Resume-able Upload"),u.qZA(),u._uU(6," (Tidak wajib, jika sudah ada URL eksternal, misal alamat webmu gdrive mediafire mega dan lain sebagainya). Mohon ditunggu dan jangan di tinggal, berkas lampiran akan "),u.TgZ(7,"i"),u._uU(8,"expired"),u.qZA(),u._uU(9),u.TgZ(10,"i"),u._uU(11,"upload"),u.qZA(),u._uU(12,". Lalu kemudian saat berkas berhasil dibuat, lampiran tidak akan bisa di modifikasi. "),u.qZA()(),u.TgZ(13,"mat-form-field",87)(14,"mat-label"),u._uU(15,"Upload Lampiran Berkas -- DDL"),u.qZA(),u.TgZ(16,"ngx-mat-file-input",88,89),u.NdJ("change",function(e){u.CHM(t);const r=u.MAs(17),a=u.oxw(3);return u.KtG(a.uploadAttachment(e,r))}),u.qZA(),u._UZ(18,"mat-icon",90),u.qZA(),u.TgZ(19,"mat-error",91)(20,"small"),u.YNc(21,z_,3,3,"div",17),u.YNc(22,Y_,2,1,"div",17),u.qZA()()(),u.YNc(23,$_,11,9,"div",92),u.ALo(24,"async")}if(2&s){const t=u.oxw(3);u.xp6(9),u.hij(" apabila tidak disimpan dalam ",t.CONSTANTS.timeoutDeleteTempAttachmentTime/60/1e3," menit setelah berhasil "),u.xp6(4),u.Q6J("color","accent"),u.xp6(3),u.Q6J("disabled",null!==t.attachmentSelected)("accept",t.fileTypeAttachmentAllowed),u.xp6(5),u.Q6J("ngIf",t.attachmentLimitExceeded),u.xp6(1),u.Q6J("ngIf",t.attachmentErrorText),u.xp6(1),u.Q6J("ngForOf",u.lcZ(24,7,t.uploads$))}}function X_(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",98),u.NdJ("click",function(){u.CHM(t);const e=u.oxw(3);return u.KtG(e.verify())}),u._UZ(1,"mat-icon",99),u._uU(2," Verifikasi Akun Untuk Upload DDL! "),u.qZA()}}function J_(s,n){if(1&s&&(u.YNc(0,K_,1,0,"div",37),u.YNc(1,Q_,25,9,"ng-template",null,83,u.W1O),u.YNc(3,X_,3,0,"ng-template",null,84,u.W1O)),2&s){const t=u.MAs(2),i=u.MAs(4),e=u.oxw(2);u.Q6J("ngIf",null==e.AS.currentUserSubject||null==e.AS.currentUserSubject.value?null:e.AS.currentUserSubject.value.verified)("ngIfThen",t)("ngIfElse",i)}}function e0(s,n){1&s&&(u.TgZ(0,"div",85)(1,"small",86),u._uU(2,"* "),u.TgZ(3,"i"),u._uU(4,"Gunakan tombol (X) untuk menghapus URL Eksternal jika ingin hanya menggunakan lampiran "),u.TgZ(5,"i"),u._uU(6,"upload"),u.qZA(),u._uU(7," DDL saja"),u.qZA()()())}function t0(s,n){1&s&&u._UZ(0,"mat-icon",108)}function i0(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",75),u.NdJ("click",function(){u.CHM(t);const e=u.oxw().index,r=u.oxw(2);return u.KtG(r.removeDownloadLink(e))}),u._UZ(1,"mat-icon",76),u.qZA()}}function r0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"Web Tidak Boleh Kosong"),u.qZA())}function n0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"Web Hanya Boleh Huruf Standar Papan Ketik"),u.qZA())}function a0(s,n){1&s&&u._UZ(0,"mat-icon",109)}function s0(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",75),u.NdJ("click",function(){u.CHM(t);const e=u.oxw().index,r=u.oxw(2);return u.KtG(r.removeDownloadLink(e))}),u._UZ(1,"mat-icon",76),u.qZA()}}function o0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"Tautan Tidak Boleh Kosong"),u.qZA())}function u0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"Tautan Link Tidak Valid"),u.qZA())}function l0(s,n){if(1&s&&(u.ynx(0),u.TgZ(1,"div",100),u.YNc(2,e0,8,0,"div",101),u.TgZ(3,"mat-form-field",102)(4,"mat-label"),u._uU(5,"Nama Website"),u.qZA(),u._UZ(6,"input",103),u.YNc(7,t0,1,0,"mat-icon",104),u.YNc(8,i0,2,0,"button",73),u.TgZ(9,"mat-error"),u.YNc(10,r0,2,0,"div",17),u.YNc(11,n0,2,0,"div",17),u.qZA()(),u.TgZ(12,"mat-form-field",105)(13,"mat-label"),u._uU(14,"Tautan Link"),u.qZA(),u._UZ(15,"input",106),u.YNc(16,a0,1,0,"mat-icon",107),u.YNc(17,s0,2,0,"button",73),u.TgZ(18,"mat-error"),u.YNc(19,o0,2,0,"div",17),u.YNc(20,u0,2,0,"div",17),u.qZA()()(),u.BQk()),2&s){const t=n.$implicit,i=n.index,e=u.oxw(2);u.xp6(1),u.Q6J("formGroupName",i),u.xp6(1),u.Q6J("ngIf",(null==e.AS.currentUserSubject||null==e.AS.currentUserSubject.value?null:e.AS.currentUserSubject.value.verified)&&0===i),u.xp6(1),u.Q6J("color","accent"),u.xp6(4),u.Q6J("ngIf",t.get("name").value||0===i&&!(null!=e.AS.currentUserSubject&&null!=e.AS.currentUserSubject.value&&e.AS.currentUserSubject.value.verified)),u.xp6(1),u.Q6J("ngIf",!t.get("name").value&&(i>0||(null==e.AS.currentUserSubject||null==e.AS.currentUserSubject.value?null:e.AS.currentUserSubject.value.verified))),u.xp6(2),u.Q6J("ngIf",t.get("name").hasError("required")),u.xp6(1),u.Q6J("ngIf",t.get("name").hasError("pattern")),u.xp6(1),u.Q6J("color","accent"),u.xp6(4),u.Q6J("ngIf",t.get("url").value||0===i&&!(null!=e.AS.currentUserSubject&&null!=e.AS.currentUserSubject.value&&e.AS.currentUserSubject.value.verified)),u.xp6(1),u.Q6J("ngIf",!t.get("url").value&&(i>0||(null==e.AS.currentUserSubject||null==e.AS.currentUserSubject.value?null:e.AS.currentUserSubject.value.verified))),u.xp6(2),u.Q6J("ngIf",t.get("url").hasError("required")),u.xp6(1),u.Q6J("ngIf",t.get("url").hasError("pattern"))}}function d0(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"form",4),u.NdJ("submit",function(){u.CHM(t);const e=u.oxw();return u.KtG(e.onSubmit())}),u.TgZ(1,"div",5)(2,"div",6)(3,"h2",7)(4,"b",8),u._uU(5,"Ubah Berkas"),u.qZA()()(),u.TgZ(6,"div",2)(7,"div",9)(8,"div",10)(9,"div",9)(10,"div",2),u._UZ(11,"img",11),u.TgZ(12,"mat-form-field",12)(13,"mat-label"),u._uU(14,"Gambar Untuk Embed SEO"),u.qZA(),u.TgZ(15,"ngx-mat-file-input",13,14),u.NdJ("change",function(e){u.CHM(t);const r=u.MAs(16),a=u.oxw();return u.KtG(a.uploadImage(e,r))}),u.qZA(),u._UZ(17,"mat-icon",15),u.qZA(),u.TgZ(18,"mat-error",16)(19,"small"),u.YNc(20,h_,3,3,"div",17),u.YNc(21,p_,2,1,"div",17),u.qZA()()(),u.YNc(22,m_,4,1,"div",18),u.YNc(23,g_,5,0,"div",19),u.TgZ(24,"div",20)(25,"mat-slide-toggle",21),u._uU(26," R-18+ Konten Eksplisit "),u.qZA()(),u.TgZ(27,"mat-form-field",22)(28,"mat-label"),u._uU(29,"Jenis Proyek"),u.qZA(),u.TgZ(30,"mat-select",23),u.YNc(31,v_,2,2,"mat-option",24),u.qZA(),u.TgZ(32,"mat-error"),u.YNc(33,__,2,0,"div",17),u.YNc(34,y_,2,0,"div",17),u.qZA()(),u.YNc(35,k_,13,7,"mat-form-field",25),u.YNc(36,L_,13,7,"mat-form-field",25),u.TgZ(37,"div",20),u._UZ(38,"mat-divider"),u.qZA(),u.TgZ(39,"div",26),u.YNc(40,H_,17,10,"div",27),u.qZA(),u.TgZ(41,"div",2)(42,"div",9),u._UZ(43,"div",28),u.TgZ(44,"div",28)(45,"button",29),u.NdJ("click",function(){u.CHM(t);const e=u.oxw();return u.KtG(e.addFansub())}),u._UZ(46,"mat-icon",30),u._uU(47," Tambah Fansub "),u.qZA()()()(),u.TgZ(48,"div",20)(49,"a",31),u._uU(50," * Jika pencarian tidak ditemukan, silahkan membuat halaman Fansub baru terlebih dahulu "),u.qZA()()()(),u.TgZ(51,"div",32)(52,"div",9)(53,"mat-form-field",33)(54,"mat-label"),u._uU(55,"Nama Berkas"),u.qZA(),u._UZ(56,"input",34)(57,"mat-icon",35),u.TgZ(58,"mat-error"),u.YNc(59,V_,2,0,"div",17),u.YNc(60,q_,2,0,"div",17),u.qZA()(),u._UZ(61,"angular-editor",36),u.qZA(),u.TgZ(62,"div",9)(63,"div",20),u._UZ(64,"mat-divider"),u.qZA()(),u.YNc(65,W_,1,0,"div",37),u.YNc(66,Z_,12,6,"ng-template",null,38,u.W1O),u.YNc(68,J_,5,3,"ng-template",null,39,u.W1O),u.TgZ(70,"div",9)(71,"div",20),u._UZ(72,"mat-divider"),u.qZA()(),u.ynx(73,40),u.YNc(74,l0,21,12,"ng-container",27),u.BQk(),u.TgZ(75,"div",41),u._UZ(76,"div",28)(77,"div",28)(78,"div",28),u.TgZ(79,"div",28)(80,"button",29),u.NdJ("click",function(){u.CHM(t);const e=u.oxw();return u.KtG(e.addDownloadLink())}),u._UZ(81,"mat-icon",30),u._uU(82," Tambah URL Eksternal "),u.qZA()()()()(),u.TgZ(83,"div",9)(84,"div",42)(85,"div",43),u._UZ(86,"div",44),u.TgZ(87,"div",45)(88,"a",46),u._UZ(89,"mat-icon",47),u._uU(90," Batal "),u.qZA()(),u.TgZ(91,"div",45)(92,"button",48),u._uU(93," Simpan "),u._UZ(94,"mat-icon",49),u.qZA()()()()()()()()}if(2&s){const t=u.MAs(67),i=u.MAs(69),e=u.oxw();u.Q6J("formGroup",e.fg),u.xp6(11),u.Q6J("src",e.image_url,u.LSH),u.xp6(1),u.Q6J("color","accent"),u.xp6(3),u.Q6J("disabled",e.fg.value.image)("accept","image/gif, image/jpeg, image/jpg, image/png"),u.xp6(5),u.Q6J("ngIf",e.imageLimitExceeded),u.xp6(1),u.Q6J("ngIf",e.imageErrorText),u.xp6(1),u.Q6J("ngIf",e.image&&!e.fg.value.image),u.xp6(1),u.Q6J("ngIf",null==e.AS.currentUserSubject||null==e.AS.currentUserSubject.value?null:e.AS.currentUserSubject.value.verified),u.xp6(4),u.Q6J("color","accent"),u.xp6(4),u.Q6J("ngForOf",e.projectList),u.xp6(2),u.Q6J("ngIf",e.fg.get("projectType_id").hasError("required")),u.xp6(1),u.Q6J("ngIf",e.fg.get("projectType_id").hasError("pattern")),u.xp6(1),u.Q6J("ngIf",e.berkasType.toLowerCase().includes("anime")),u.xp6(1),u.Q6J("ngIf",e.berkasType.toLowerCase().includes("dorama")),u.xp6(4),u.Q6J("ngForOf",e.getFansubControl.controls),u.xp6(5),u.Q6J("disabled",e.submitted),u.xp6(8),u.Q6J("color","accent"),u.xp6(6),u.Q6J("ngIf",e.fg.get("name").hasError("required")),u.xp6(1),u.Q6J("ngIf",e.fg.get("name").hasError("pattern")),u.xp6(1),u.Q6J("config",e.GS.angularEditorConfig),u.xp6(4),u.Q6J("ngIf",e.attachmentFile)("ngIfThen",t)("ngIfElse",i),u.xp6(9),u.Q6J("ngForOf",e.getDownloadUrlControl.controls),u.xp6(6),u.Q6J("disabled",e.submitted),u.xp6(8),u.Q6J("disabled",e.submitted),u.xp6(4),u.Q6J("disabled",e.submitted||e.fg.invalid||!e.fg.dirty)}}let c0=(()=>{class s{constructor(t,i,e,r,a,o,l,d,f,v,g,T,E,x,S){this.router=t,this.activatedRoute=i,this.fb=e,this.bs=r,this.pi=a,this.anime=o,this.dorama=l,this.project=d,this.fansub=f,this.berkas=v,this.toast=g,this.imgbb=T,this.gs=E,this.as=x,this.uploadService=S,this.berkasId="",this.attachmentSelected=null,this.attachmentErrorText=null,this.attachmentLimitExceeded=null,this.timerTimeout=null,this.submitted=!1,this.projectList=[],this.uploadToast=null,this.gambar=null,this.ddl=null,this.image=null,this.imageErrorText=null,this.imageLimitExceeded=null,this.image_url="/assets/img/form/no-image.png",this.image_url_original=null,this.filteredAnime=[],this.filteredDorama=[],this.filteredFansub=[],this.isLoading=!1,this.animeCheckOrAddResponse=null,this.doramaCheckOrAddResponse=null,this.attachmentFile=null,this.attachmentFontSubtitle=[],this.subsProject=null,this.subsFansub=null,this.subsAnimeDetail=null,this.subsDoramaDetail=null,this.subsProjectDetail=null,this.subsFansubDetail=[],this.subsAnimeNew=null,this.subsDoramaNew=null,this.subsImgbb=null,this.subsBerkasDetail=null,this.subsBerkasUpdate=null,this.subsUpload=null,this.berkasType="",this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get CONSTANTS(){return Q.t}get AS(){return this.as}get GS(){return this.gs}get fileTypeAttachmentAllowed(){return Q.t.fileTypeAttachmentAllowed.join(", ")}ngOnInit(){this.pi.updatePageMetaData("Berkas - Ubah Berkas","Halaman Pembaharuan Data Berkas","Ubah Berkas"),this.gs.isBrowser&&(this.berkasId=this.activatedRoute.snapshot.paramMap.get("berkasId"),this.bs.busy(),this.subsBerkasDetail=this.berkas.getBerkas(this.berkasId).subscribe({next:t=>{this.gs.log("[BERKAS_DETAIL_SUCCESS]",t),this.bs.idle(),this.as.currentUserSubject?.value?.id!==t.result.user_.id&&(this.toast.warning("Berkas Ini Bukan Milikmu","Whoops!",null,!0),this.router.navigateByUrl(`/berkas/${t.result.id}`)),!this.as.currentUserSubject?.value?.verified&&t.result.attachment_?(this.toast.warning("string"==typeof t.result.attachment_?t.result.attachment_:"Harap Verifikasi Akun Terlebih Dahulu","Whoops!",null,!0),this.router.navigateByUrl(`/berkas/${t.result.id}`)):(this.loadProjectList(),this.initForm(t.result),this.uploads$=this.uploadService.connect(),this.subsUpload=this.uploadService.events.subscribe({next:i=>{this.gs.log("[UPLOAD_EVENTS]",i),("uploading"===i.status||"complete"===i.status)&&(this.attachmentSelected=i),"complete"===i.status?(this.gs.log("[UPLOAD_COMPLETED]",i.response),this.fg.controls.attachment_id.patchValue(i.response.result.id),this.fg.controls.attachment_id.markAsDirty(),this.uploadToast=this.toast.warning("Segera Kirim Data Berkas!","Lampiran Akan Dihapus ...",{closeButton:!1,timeOut:Q.t.timeoutDeleteTempAttachmentTime,disableTimeOut:"extendedTimeOut",tapToDismiss:!1,progressAnimation:"decreasing"},!0),this.timerTimeout=setTimeout(()=>{this.gs.log("[UPLOAD_TIMEOUT]",Q.t.timeoutDeleteTempAttachmentTime),this.failOrCancelUpload({info:"Expired, Silahkan Upload Ulang!"})},Q.t.timeoutDeleteTempAttachmentTime)):"error"===i.status&&(this.gs.log("[UPLOAD_ERROR]",i.response,"error"),this.failOrCancelUpload(i.response))},error:i=>{this.gs.log("[UPLOAD_ERROR]",i,"error"),this.failOrCancelUpload(i)}}))},error:t=>{this.gs.log("[BERKAS_DETAIL_ERROR]",t,"error"),this.bs.idle(),this.router.navigate(["/error"],{queryParams:{returnUrl:`/berkas/${this.berkasId}`}})}}))}ngOnDestroy(){this.uploadToast&&this.toast.remove(this.uploadToast.toastId),this.timerTimeout&&(clearTimeout(this.timerTimeout),this.timerTimeout=null),this.subsProject?.unsubscribe(),this.subsFansub?.unsubscribe(),this.subsAnimeDetail?.unsubscribe(),this.subsDoramaDetail?.unsubscribe(),this.subsProjectDetail?.unsubscribe();for(const t of this.subsFansubDetail)t?.unsubscribe();this.subsAnimeNew?.unsubscribe(),this.subsDoramaNew?.unsubscribe(),this.subsImgbb?.unsubscribe(),this.subsBerkasDetail?.unsubscribe(),this.subsBerkasUpdate?.unsubscribe(),this.subsUpload?.unsubscribe()}uploadAttachment(t,i){this.ddl=i;const e=t.target.files[0];this.attachmentLimitExceeded=null,this.attachmentErrorText=null,this.gs.log("[ATTACHMENT_SELECTED]",e),this.fg.controls.attachment_id.patchValue(null),this.uploadService.disconnect();try{e.size<=Q.t.fileSizeAttachmentTotalLimit?this.uploadService.handleFiles(e):(this.attachmentLimitExceeded=Q.t.fileSizeAttachmentTotalLimit,this.ddl.clear(t))}catch{this.ddl.clear(t)}}submitAttachment(t){const i=this.uploadService.state().find(e=>e.uploadId===t.uploadId);i&&(this.attachmentSelected=i,t.status="queue")}failOrCancelUpload(t=null){this.attachmentSelected=null,this.attachmentErrorText=t?.result?.message||t?.info||t?.error?.message||"Terjadi Kesalahan, Harap Reload Halaman!",this.uploadService.disconnect(),this.fg.controls.attachment_id.patchValue(null),this.fg.controls.attachment_id.markAsPristine(),this.fg.controls.attachment_id.markAsUntouched(),this.uploadToast&&this.toast.remove(this.uploadToast.toastId),this.ddl.clear()}verify(){this.router.navigate(["/verify"],{queryParams:{returnUrl:this.router.url.split("?")[0]},state:{bypassCanDeactivate:!0}})}loadProjectList(){this.bs.busy(),this.subsProject=this.project.getProject().subscribe({next:t=>{this.gs.log("[PROJECT_LOAD_SUCCESS]",t),this.projectList=t.results,this.bs.idle()},error:t=>{this.gs.log("[PROJECT_LOAD_ERROR]",t,"error"),this.bs.idle()}})}hasRequiredField(t,i){return t.get(i).hasValidator(B.kI.required)}initForm(t){"attachment_"in t&&t.attachment_&&(this.attachmentFile=t.attachment_,t.attachment_.fonts_&&t.attachment_.fonts_.forEach(i=>{this.attachmentFontSubtitle.push(`${i.name}.${i.ext}`)}),t.attachment_.subtitles_&&t.attachment_.subtitles_.forEach(i=>{this.attachmentFontSubtitle.push(`${i.name}.${i.ext}`)})),this.fg=this.fb.group({name:[t.name,B.kI.compose([B.kI.required,B.kI.pattern(Q.t.regexEnglishKeyboardKeys)])],description:[t.description,B.kI.compose([B.kI.pattern(Q.t.regexEnglishKeyboardKeys)])],projectType_id:[t.project_type_.id,B.kI.compose([B.kI.required,B.kI.pattern(Q.t.regexEnglishKeyboardKeys)])],anime_id:[t.anime_?.id||null,B.kI.compose([])],anime_name:[t.anime_?.name||null,B.kI.compose([])],dorama_id:[t.dorama_?.id||null,B.kI.compose([])],dorama_name:[t.dorama_?.name||null,B.kI.compose([])],fansub_list:this.fb.array([]),image:[null,B.kI.compose([B.kI.pattern(Q.t.regexUrl)])],attachment_id:[t.attachment_?.id,B.kI.compose([B.kI.pattern(Q.t.regexEnglishKeyboardKeys)])],download_url:this.fb.array([]),private:[t.private,B.kI.compose([B.kI.required])],r18:[t.r18,B.kI.compose([B.kI.required])]}),this.image_url=t.image_url,this.image_url_original=this.image_url,this.berkasType=t.project_type_.name,t.anime_&&(this.fg.controls.anime_id.setValidators([B.kI.required,B.kI.pattern(/^\d+$/)]),this.fg.controls.anime_name.setValidators([B.kI.required])),t.dorama_&&(this.fg.controls.dorama_id.setValidators([B.kI.required,B.kI.pattern(/^\d+$/)]),this.fg.controls.dorama_name.setValidators([B.kI.required]));for(const i of t.download_url)this.addDownloadLink(i);for(const i of t.fansub_)this.addFansub(i);this.subsAnimeDetail=this.fg.get("anime_id").valueChanges.pipe((0,Ra.b)(500),(0,Ma.x)(),(0,me.b)(()=>this.isLoading=!0),(0,Bo.w)(i=>this.anime.searchAnime(i).pipe((0,jo.x)(()=>this.isLoading=!1))),(0,Ua.X)(-1)).subscribe({next:i=>{this.gs.log("[BERKAS_EDIT_SEARCH_ANIME_RESULT_SUCCESS]",i),this.filteredAnime=i.results},error:i=>{this.gs.log("[BERKAS_EDIT_SEARCH_ANIME_RESULT_ERROR]",i,"error")}}),this.subsDoramaDetail=this.fg.get("dorama_id").valueChanges.pipe((0,Ra.b)(500),(0,Ma.x)(),(0,me.b)(()=>this.isLoading=!0),(0,Bo.w)(i=>this.dorama.searchDorama(i).pipe((0,jo.x)(()=>this.isLoading=!1))),(0,Ua.X)(-1)).subscribe({next:i=>{this.gs.log("[BERKAS_EDIT_SEARCH_DORAMA_RESULT_SUCCESS]",i);for(const e of i.results)e.mdl_id=e.mdl_id.split("-")[1],e.image_url=e.thumb;this.filteredDorama=i.results},error:i=>{this.gs.log("[BERKAS_EDIT_SEARCH_DORAMA_RESULT_ERROR]",i,"error")}}),this.subsProjectDetail=this.fg.get("projectType_id").valueChanges.pipe((0,Ra.b)(500),(0,Ma.x)(),(0,Ua.X)(-1)).subscribe({next:i=>{this.gs.log("[BERKAS_EDIT_PROJECT_CHANGED]",i);const e=this.projectList.find(r=>r.id===i);this.fg.controls.anime_id.patchValue(null),this.fg.controls.anime_name.patchValue(null),this.fg.controls.dorama_id.patchValue(null),this.fg.controls.dorama_name.patchValue(null),this.fg.controls.anime_id.setErrors(null),this.fg.controls.anime_name.setErrors(null),this.fg.controls.dorama_id.setErrors(null),this.fg.controls.dorama_name.setErrors(null),this.fg.controls.anime_id.clearValidators(),this.fg.controls.anime_name.clearValidators(),this.fg.controls.dorama_id.clearValidators(),this.fg.controls.dorama_name.clearValidators(),this.fg.controls.anime_id.markAsPristine(),this.fg.controls.anime_name.markAsPristine(),this.fg.controls.dorama_id.markAsPristine(),this.fg.controls.dorama_name.markAsPristine(),this.fg.controls.anime_id.markAsUntouched(),this.fg.controls.anime_name.markAsUntouched(),this.fg.controls.dorama_id.markAsUntouched(),this.fg.controls.dorama_name.markAsUntouched(),e.name.toLowerCase().includes("anime")?(this.berkasType=e.name,this.fg.controls.anime_id.setValidators([B.kI.required,B.kI.pattern(/^\d+$/)]),this.fg.controls.anime_name.setValidators([B.kI.required])):e.name.toLowerCase().includes("dorama")?(this.berkasType=e.name,this.fg.controls.dorama_id.setValidators([B.kI.required,B.kI.pattern(/^\d+$/)]),this.fg.controls.dorama_name.setValidators([B.kI.required])):this.berkasType="",this.fg.controls.anime_id.updateValueAndValidity(),this.fg.controls.anime_name.updateValueAndValidity(),this.fg.controls.dorama_id.updateValueAndValidity(),this.fg.controls.dorama_name.updateValueAndValidity()}})}get getDownloadUrlControl(){return this.fg.get("download_url")}createDownloadLink(t=null,i=null){return this.fb.group({name:[t,B.kI.compose([B.kI.required,B.kI.pattern(Q.t.regexEnglishKeyboardKeys)])],url:[i,B.kI.compose([B.kI.required,B.kI.pattern(Q.t.regexUrl)])]})}addDownloadLink(t=null){this.getDownloadUrlControl.push(t?this.createDownloadLink(t.name,t.url):this.createDownloadLink())}removeDownloadLink(t){this.getDownloadUrlControl.removeAt(t)}get getFansubControl(){return this.fg.get("fansub_list")}createFansub(t=null){const i=this.fb.group({fansub_id:[t?.id||null,B.kI.compose([B.kI.required,B.kI.pattern(/^\d+$/)])],fansub_name:[t?.name||null,B.kI.compose([B.kI.required])]});return this.subsFansubDetail.push(i.get("fansub_id").valueChanges.pipe((0,Ra.b)(500),(0,Ma.x)(),(0,me.b)(()=>this.isLoading=!0),(0,Bo.w)(e=>this.fansub.searchFansub(e).pipe((0,jo.x)(()=>this.isLoading=!1))),(0,Ua.X)(-1)).subscribe({next:e=>{this.gs.log("[BERKAS_EDIT_SEARCH_FANSUB_RESULT]",e),this.filteredFansub=e.results}})),i}removeFansub(t){this.getFansubControl.removeAt(t),this.subsFansubDetail[t]?.unsubscribe(),this.subsFansubDetail.splice(t,1)}addFansub(t=null){this.getFansubControl.push(t?this.createFansub(t):this.createFansub())}resetSelectedAnime(){this.fg.controls.anime_name.patchValue(null)}resetSelectedDorama(){this.fg.controls.dorama_name.patchValue(null)}resetSelectedFansub(t){this.getFansubControl.controls[t].get("fansub_name").patchValue(null)}filterAnimeSelected(t){this.gs.log("[ANIME_FILTER_CLICK]",t),this.submitted=!0,this.subsAnimeNew=this.anime.addNewAnime({id:t.id,name:t.title,image_url:t.image_url,type:t.media_type?.toUpperCase()}).subscribe({next:i=>{this.gs.log("[ANIME_CHECK_ADD_SUCCESS]",i),this.animeCheckOrAddResponse=i.result,this.submitted=!1,this.fg.controls.anime_id.patchValue(i.result.id),this.fg.controls.anime_name.patchValue(i.result.name)},error:i=>{this.gs.log("[ANIME_CHECK_ADD_ERROR]",i,"error"),this.submitted=!1,this.resetSelectedAnime(),this.fg.controls.anime_id.patchValue(null),this.fg.controls.anime_name.patchValue(null)}})}filterDoramaSelected(t){this.gs.log("[DORAMA_FILTER_CLICK]",t),this.submitted=!0,this.subsDoramaNew=this.dorama.addNewDorama({id:parseInt(t.mdl_id,10),slug:t.slug,name:t.title,image_url:t.image_url,type:t.type}).subscribe({next:i=>{this.gs.log("[DORAMA_CHECK_ADD_SUCCESS]",i),this.doramaCheckOrAddResponse=i.result,this.submitted=!1,this.fg.controls.dorama_id.patchValue(i.result.id),this.fg.controls.dorama_name.patchValue(i.result.name)},error:i=>{this.gs.log("[DORAMA_CHECK_ADD_ERROR]",i,"error"),this.submitted=!1,this.resetSelectedDorama(),this.fg.controls.dorama_id.patchValue(null),this.fg.controls.dorama_name.patchValue(null)}})}filterFansubSelected(t,i){this.gs.log("[FANSUB_FILTER_CLICK]",t),this.getFansubControl.controls[i].get("fansub_id").patchValue(t.id),this.getFansubControl.controls[i].get("fansub_name").patchValue(t.name)}uploadImage(t,i){this.gambar=i,this.image=null,this.imageLimitExceeded=null,this.imageErrorText=null,this.fg.controls.image.patchValue(null),this.fg.controls.image.markAsPristine(),this.fg.controls.image.markAsUntouched();const e=t.target.files[0];try{const r=new FileReader;r.readAsDataURL(e),r.onload=a=>{if(this.gs.log("[IMAGE_SELECTED]",a),e.size<=Q.t.fileSizeImageLimit){const o=this.gs.document.createElement("img");o.onload=()=>{this.image=e,this.image_url=r.result.toString()},o.src=r.result.toString()}else this.image=null,this.image_url="/assets/img/form/image-error.png",this.imageLimitExceeded=Q.t.fileSizeImageLimit,this.gambar.clear(t)}}catch{this.image=null,this.image_url=this.image_url_original,this.gambar.clear(t)}}submitImage(){this.submitted=!0,this.subsImgbb=this.imgbb.uploadImage({file:this.image}).subscribe({next:t=>{this.gs.log("[IMAGE_SUCCESS]",t),this.fg.controls.image.patchValue(t.result.url),this.fg.controls.image.markAsDirty(),this.submitted=!1},error:t=>{this.gs.log("[IMAGE_ERROR]",t,"error"),this.fg.controls.image.patchValue(null),this.fg.controls.image.markAsPristine(),this.fg.controls.image.markAsUntouched(),this.submitted=!1,this.imageErrorText=t.result?.message||t.info}})}onSubmit(){this.bs.busy();const t=this.gs.getDirtyValues(this.fg);if("fansub_list"in t){const i=[];for(const e of this.fg.value.fansub_list)i.push(e.fansub_id);t.fansub_id=i,delete t.fansub_list}return null===this.fg.value.attachment_id&&0===this.fg.value.download_url.lenth?(this.submitted=!1,this.uploadToast=this.toast.warning("Lampiran DDL / URL Eksternal!","Harap Mengisi Setidaknya Salah Satu ..."),void this.bs.idle()):(this.gs.log("[BERKAS_EDIT_DIRTY]",t),this.submitted=!0,this.fg.invalid?(this.submitted=!1,void this.bs.idle()):void(this.subsBerkasUpdate=this.berkas.updateBerkas(this.berkasId,{...t}).subscribe({next:i=>{this.gs.log("[BERKAS_EDIT_SUCCESS]",i),this.submitted=!1,this.bs.idle(),this.router.navigateByUrl(`/berkas/${this.berkasId}`)},error:i=>{this.gs.log("[BERKAS_EDIT_ERROR]",i,"error"),this.submitted=!1,this.bs.idle()}})))}}return s.\u0275fac=function(t){return new(t||s)(u.Y36(_e.F0),u.Y36(_e.gz),u.Y36(B.QS),u.Y36(Ue.z),u.Y36(je.Z),u.Y36(a_.o),u.Y36(s_.X),u.Y36(o_.Y),u.Y36(u_.T),u.Y36(rt.A),u.Y36(te.k),u.Y36(l_.X),u.Y36(ke.U),u.Y36(D.e),u.Y36(d_.Lz))},s.\u0275cmp=u.Xpm({type:s,selectors:[["app-berkas-edit"]],decls:5,vars:1,consts:[[1,"container"],[1,"row","px-3"],[1,"col-12"],[3,"formGroup","submit",4,"ngIf"],[3,"formGroup","submit"],[1,"row","mt-3","mb-3"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"row"],[1,"col-12","col-md-5","col-xl-4","p-3"],[1,"w-100","border",3,"src"],["appearance","outline",1,"pt-3","w-100",3,"color"],[1,"w-100",3,"disabled","accept","change"],["gambar",""],["fontIcon","image","matSuffix",""],[1,"px-3","w-100"],[4,"ngIf"],["class","col-12 mb-4",4,"ngIf"],["class","col-12 p-3",4,"ngIf"],[1,"col-12","p-3"],["formControlName","r18","matTooltip","Konten Eksplisit"],["appearance","outline",1,"px-3","pt-3","col-12",3,"color"],["formControlName","projectType_id","placeholder","Anime / Drama"],[3,"value",4,"ngFor","ngForOf"],["appearance","outline","class","p-3 w-100",3,"color",4,"ngIf"],["formArrayName","fansub_list","matTooltip","Silahkan Buat Terlebih Dahulu Jika Tidak Ada"],[4,"ngFor","ngForOf"],[1,"col","px-3"],["type","button","mat-raised-button","","color","primary",1,"w-100",3,"disabled","click"],["fontIcon","add",1,"me-1"],["routerLink","/create/fansub",1,"text-warning","text-decoration-none"],[1,"col-12","col-md-7","col-xl-8","pt-3"],["appearance","outline",1,"p-3","col-12",3,"color"],["matInput","","formControlName","name","placeholder","[Fansub] Judul Anime - 00 [BD 4K x265 FLAC][CRC32].mkv"],["fontIcon","wysiwyg","matSuffix",""],["formControlName","description",1,"p-3","w-100",3,"config"],[4,"ngIf","ngIfThen","ngIfElse"],["ddlExist",""],["ddlNotExist",""],["formArrayName","download_url"],[1,"row","mb-4"],[1,"col-12","py-3"],[1,"row","gy-3"],[1,"col","g-0"],[1,"col-12","col-md-3"],["mat-stroked-button","","routerLink","../",1,"w-100",3,"disabled"],["fontIcon","undo",1,"me-1"],["type","submit","mat-flat-button","","color","accent",1,"w-100",3,"disabled"],["fontIcon","save",1,"ms-1"],[1,"col-12","mb-4"],["fontIcon","add_photo_alternate",1,"me-1"],["formControlName","private","matTooltip","Hanya Dapat Di Akses Melalui URL"],[3,"value"],["appearance","outline",1,"p-3","w-100",3,"color"],["matInput","","formControlName","anime_id","placeholder","Full Metal Alchemist",3,"matAutocomplete","keyup"],["fontIcon","short_text","matSuffix",""],["autoCompleteAnime","matAutocomplete"],["class","is-loading",4,"ngIf"],["class","text-warning",4,"ngIf"],[1,"is-loading"],["mode","indeterminate"],["class","px-1",3,"value","click",4,"ngFor","ngForOf"],[1,"px-1",3,"value","click"],[1,"me-1",2,"height","40px","width","30px","object-fit","cover",3,"src"],[1,"ms-1"],[1,"text-warning"],["matInput","","formControlName","dorama_id","placeholder","Flying Colors",3,"matAutocomplete","keyup"],["autoCompleteDorama","matAutocomplete"],[1,"row",3,"formGroupName"],["appearance","outline",1,"px-3","pt-3","w-100",3,"color"],["matInput","","formControlName","fansub_id","placeholder","NamaFansub",3,"matAutocomplete","keyup"],["fontIcon","short_text","matSuffix","",4,"ngIf"],["type","button","mat-button","","matSuffix","","mat-icon-button","",3,"click",4,"ngIf"],["autoCompleteFansub","matAutocomplete"],["type","button","mat-button","","matSuffix","","mat-icon-button","",3,"click"],["fontIcon","close"],[1,"me-1",2,"height","40px","width","40px","object-fit","cover",3,"src"],["mat-subheader","",1,"text-warning"],["fontIcon","attach_file","mat-list-icon",""],["mat-line",""],["class","p-3 m-0",4,"ngIf"],[1,"p-3","m-0"],["ddlVerified",""],["ddlNotVerified",""],[1,"col-12","px-3"],[1,"text-success"],["appearance","outline",1,"px-3","pt-3","col",3,"color"],["uploadx","",1,"w-100",3,"disabled","accept","change"],["ddl",""],["fontIcon","attach_file","matSuffix",""],[1,"px-4","w-100"],["class","row mb-4",4,"ngFor","ngForOf"],[1,"col"],[1,"ps-3"],[3,"mode","value"],[1,"col-6","col-lg-4","px-3"],["fontIcon","attachment",1,"me-1"],["type","button","mat-stroked-button","","color","accent",1,"w-100",3,"click"],["fontIcon","enhanced_encryption",1,"me-1"],["matTooltip","Silahkan Isi Alamat Website Kamu Jika Ingin Mendapatkan Traffic Pengunjung",1,"row",3,"formGroupName"],["class","col-12 px-3",4,"ngIf"],["appearance","outline",1,"px-3","pt-3","col-12","col-md-5",3,"color"],["matInput","","formControlName","name","placeholder","Web Shit","required",""],["fontIcon","web","matSuffix","",4,"ngIf"],["appearance","outline",1,"px-3","pt-3","col-12","col-md-7",3,"color"],["matInput","","formControlName","url","placeholder","https://drive.google.com/drive/u/2/folders/1KYTJZsmH9dyyHBXnQD4N0SjSBXcs8qD-","required",""],["fontIcon","link","matSuffix","",4,"ngIf"],["fontIcon","web","matSuffix",""],["fontIcon","link","matSuffix",""]],template:function(t,i){1&t&&(u._UZ(0,"app-notifications"),u.TgZ(1,"div",0)(2,"div",1)(3,"div",2),u.YNc(4,d0,95,28,"form",3),u.qZA()()()),2&t&&(u.xp6(4),u.Q6J("ngIf",i.fg))},dependencies:[X.sg,X.O5,_e.yS,hc.XC,hc.ZL,J.ey,ue.lW,ue.zs,c_.d,J.X2,ee.Hw,ie.TO,ie.KE,ie.hX,ie.R9,f_.Nt,Ae.i$,Ae.Tg,Ae.Nh,Ae.gs,Ze.pW,We.gD,pc.Rr,qe.gM,B._Y,B.Fj,B.JJ,B.JL,B.Q7,B.sg,B.u,B.x0,B.CE,ve.Yh,Me.t,we.s6,X.Ov,fc.$]}),s})();var f0=H(3379),h0=H(8757);function p0(s,n){1&s&&(u.TgZ(0,"div",10),u._uU(1," * Berkas "),u.TgZ(2,"i"),u._uU(3,"Private"),u.qZA(),u._uU(4," Dari Seluruh Pengguna Tidak Di Tampilkan "),u.qZA())}function m0(s,n){1&s&&(u.TgZ(0,"div",10),u._uU(1," * Berkas "),u.TgZ(2,"i"),u._uU(3,"Private"),u.qZA(),u._uU(4," Dari Pengguna "),u.TgZ(5,"i"),u._uU(6,"Private"),u.qZA(),u._uU(7," Tidak Di Tampilkan "),u.qZA())}function g0(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"div",1)(1,"div",2)(2,"div",3),u.YNc(3,p0,5,0,"div",4),u.YNc(4,m0,8,0,"div",4),u.TgZ(5,"div",5),u._uU(6," * Berkas Dari Anggota Fansub => Warna - Warni "),u.qZA()()(),u.TgZ(7,"div",2)(8,"div",6)(9,"mat-slide-toggle",7),u.NdJ("ngModelChange",function(e){u.CHM(t);const r=u.oxw();return u.KtG(r.r18=e)})("change",function(){u.CHM(t);const e=u.oxw();return u.KtG(e.r18Changed())}),u._uU(10," Tampilkan R-18+ "),u.qZA()()(),u.TgZ(11,"div",8)(12,"app-material-tab",9),u.NdJ("tableRowClicked",function(e){u.CHM(t);const r=u.oxw();return u.KtG(r.openBerkas(e))})("paginatorClicked",function(e){u.CHM(t);const r=u.oxw();return u.KtG(r.onPaginatorClicked(e))})("serverSideFilter",function(e){u.CHM(t);const r=u.oxw();return u.KtG(r.onServerSideFilter(e))})("serverSideOrder",function(e){u.CHM(t);const r=u.oxw();return u.KtG(r.onServerSideOrder(e))}),u.qZA()()()}if(2&s){const t=u.oxw();u.xp6(3),u.Q6J("ngIf",!(null!=t.AS.currentUserSubject&&null!=t.AS.currentUserSubject.value&&t.AS.currentUserSubject.value.verified)),u.xp6(1),u.Q6J("ngIf",(null==t.AS.currentUserSubject?null:t.AS.currentUserSubject.value)&&(null==t.AS.currentUserSubject||null==t.AS.currentUserSubject.value?null:t.AS.currentUserSubject.value.verified)&&!t.showTruelyPrivate),u.xp6(5),u.Q6J("ngModel",t.r18),u.xp6(3),u.Q6J("tablePageSizeOptions",t.tablePageSizeOptions)("tabData",t.tabData)("count",t.count)("serverSide",!0)}}let v0=(()=>{class s{constructor(t,i,e,r,a,o,l){this.router=t,this.gs=i,this.ls=e,this.bs=r,this.berkas=a,this.fs=o,this.as=l,this.allBerkasId=[],this.berkasData=[],this.tabData=[{name:"Berkas Terkini",icon:"file_copy",type:"table",data:{column:["Proyek","Nama Berkas","Tanggal","Kunjungan","Pemilik"],row:[]}}],this.count=0,this.page=1,this.row=50,this.tablePageSizeOptions=[50,75,100,125,150],this.q="",this.sort="",this.order="",this.subsBerkas=null,this.subsTrusted=null,this.r18=!1,this.gs.bannerImg="/assets/img/banner/berkas.jpg",this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get AS(){return this.as}get showTruelyPrivate(){return this.as.currentUserSubject?.value?.role===Ce.yS.ADMIN||this.as.currentUserSubject?.value?.role===Ce.yS.MODERATOR||this.as.currentUserSubject?.value?.role===Ce.yS.FANSUBBER}ngOnDestroy(){this.subsBerkas?.unsubscribe(),this.subsTrusted?.unsubscribe()}ngOnInit(){this.gs.isBrowser&&(this.r18="true"===this.ls.getItem(this.gs.localStorageKeys.R18)||!1,this.gs.isDesktop||(this.tablePageSizeOptions=[10,25,50,75,100]),this.row=this.tablePageSizeOptions[0],this.getBerkas())}r18Changed(){this.ls.setItem(this.gs.localStorageKeys.R18,JSON.stringify(this.r18)),this.getBerkas()}getBerkas(){this.bs.busy(),this.subsBerkas&&(this.subsBerkas.unsubscribe(),this.bs.idle()),this.subsBerkas=this.berkas.getAllBerkas(this.q,this.page,this.row,this.sort,this.order,this.r18).subscribe({next:t=>{this.gs.log("[BERKAS_LIST_SUCCESS]",t),this.count=t.count,this.berkasData=[];for(const i of t.results)this.allBerkasId.push(i.id),this.berkasData.push({id:i.id,private:i.private,foto:i.user_.image_url,Proyek:i.project_type_.name,Tanggal:i.created_at,Kunjungan:i.view_count,Pemilik:i.user_.username,"Nama Berkas":i.name});this.tabData[0].data.row=this.berkasData,this.allBerkasId.length>0&&this.checkTrusted(),this.fs.initializeFab("add",null,"Tambah Berkas Baru","/create/berkas",!1),this.bs.idle()},error:t=>{this.gs.log("[BERKAS_LIST_ERROR]",t,"error"),this.bs.idle()}})}checkTrusted(){this.bs.busy(),this.subsTrusted=this.berkas.checkTrusted(this.allBerkasId).subscribe({next:t=>{this.gs.log("[BERKAS_TRUSTED_SUCCESS]",t);for(const i of this.berkasData)i.trusted=t.results[i.id];this.bs.idle()},error:t=>{this.gs.log("[BERKAS_TRUSTED_ERROR]",t,"error"),this.bs.idle()}})}openBerkas(t){this.gs.log("[BERKAS_LIST_CLICK_BERKAS]",t),this.router.navigateByUrl(`/berkas/${t.id}`)}onPaginatorClicked(t){this.gs.log("[BERKAS_LIST_CLICK_PAGINATOR]",t),this.page=t.pageIndex+1,this.row=t.pageSize,this.getBerkas()}onServerSideFilter(t){this.gs.log("[BERKAS_LIST_ENTER_FILTER]",t),this.q=t,this.getBerkas()}onServerSideOrder(t){this.gs.log("[BERKAS_LIST_CLICK_ORDER]",t),this.q=t.q,this.sort=t.active,this.order=t.direction,this.getBerkas()}}return s.\u0275fac=function(t){return new(t||s)(u.Y36(_e.F0),u.Y36(ke.U),u.Y36(f0.n),u.Y36(Ue.z),u.Y36(rt.A),u.Y36(w.r),u.Y36(D.e))},s.\u0275cmp=u.Xpm({type:s,selectors:[["app-berkas-list"]],decls:2,vars:1,consts:[["class","container",4,"ngIf"],[1,"container"],[1,"row","my-4"],[1,"col-12"],["class","text-danger text-end",4,"ngIf"],[1,"text-success","text-end"],[1,"col-12","text-end","text-warning"],["labelPosition","before",3,"ngModel","ngModelChange","change"],[1,"row"],[3,"tablePageSizeOptions","tabData","count","serverSide","tableRowClicked","paginatorClicked","serverSideFilter","serverSideOrder"],[1,"text-danger","text-end"]],template:function(t,i){1&t&&(u._UZ(0,"app-notifications"),u.YNc(1,g0,13,7,"div",0)),2&t&&(u.xp6(1),u.Q6J("ngIf",i.berkasData))},dependencies:[X.O5,pc.Rr,h0.H,B.JJ,B.On,Me.t]}),s})();var _0=H(2438);const y0=[{path:"",pathMatch:"full",component:v0},{path:":berkasId",children:[{path:"",pathMatch:"full",component:n_},{path:"edit",component:c0,canActivate:[yt.t],data:{title:"Berkas - Ubah Data",description:"Halaman Pembaharuan Data Fansub",keywords:"Ubah Berkas",[Q.t.decoratorRoles]:[Ce.yS.ADMIN,Ce.yS.MODERATOR,Ce.yS.FANSUBBER,Ce.yS.USER]}}]}];let T0=(()=>{class s{}return s.\u0275fac=function(t){return new(t||s)},s.\u0275mod=u.oAB({type:s}),s.\u0275inj=u.cJS({imports:[X.ez,_e.Bz.forChild(y0),Ee.m,Te.L,B.u5,B.UX,ve.Ad,pe.F,we.UM,se,Fe.R,Ve.b,it.T,_0.d]}),s})()},3992:(He,Ie,H)=>{"use strict";var X=H(9226);He.exports=function(ve,Q){return void 0===Q&&(Q=!1),function(Ce,Ee,Te){if(Ce)ve(Ce);else if(Ee.statusCode>=400&&Ee.statusCode<=599){var pe=Te;if(Q)if(X.TextDecoder){var u=function B(we){return void 0===we&&(we=""),we.toLowerCase().split(";").reduce(function(ve,Q){var Ce=Q.split("="),Te=Ce[1];return"charset"===Ce[0].trim()?Te.trim():ve},"utf-8")}(Ee.headers&&Ee.headers["content-type"]);try{pe=new TextDecoder(u).decode(Te)}catch{}}else pe=String.fromCharCode.apply(null,new Uint8Array(Te));ve({cause:pe})}else ve(null,Te)}}},745:(He,Ie,H)=>{"use strict";var X=H(9226),_e=H(434),B=H(2703);function Ce(se,Fe,Ve){var it=se;return B(Fe)?(Ve=Fe,"string"==typeof se&&(it={uri:se})):it=_e({},Fe,{uri:se}),it.callback=Ve,it}function Ee(se,Fe,Ve){return Te(Fe=Ce(se,Fe,Ve))}function Te(se){if(typeof se.callback>"u")throw new Error("callback argument missing");var Fe=!1,Ve=function(de,le,xe){Fe||(Fe=!0,se.callback(de,le,xe))};function yt(){var $=void 0;if($=me.response?me.response:me.responseText||function pe(se){try{if("document"===se.responseType)return se.responseXML;if(""===se.responseType&&(!se.responseXML||"parsererror"!==se.responseXML.documentElement.nodeName))return se.responseXML}catch{}return null}(me),D)try{$=JSON.parse($)}catch{}return $}function oe($){return clearTimeout(V),$ instanceof Error||($=new Error(""+($||"Unknown XMLHttpRequest Error"))),$.statusCode=0,Ve($,te)}function Le(){if(!Ge){var $;clearTimeout(V);var de=te,le=null;return 0!==($=se.useXDR&&void 0===me.status?200:1223===me.status?204:me.status)?(de={body:yt(),statusCode:$,method:Ue,headers:{},url:ke,rawRequest:me},me.getAllResponseHeaders&&(de.headers=function(Fe){var Ve={};return Fe&&Fe.trim().split("\n").forEach(function(it){var yt=it.indexOf(":"),oe=it.slice(0,yt).trim().toLowerCase(),Le=it.slice(yt+1).trim();typeof Ve[oe]>"u"?Ve[oe]=Le:Array.isArray(Ve[oe])?Ve[oe].push(Le):Ve[oe]=[Ve[oe],Le]}),Ve}(me.getAllResponseHeaders()))):le=new Error("Internal XMLHttpRequest Error"),Ve(le,de,de.body)}}var me=se.xhr||null;me||(me=se.cors||se.useXDR?new Ee.XDomainRequest:new Ee.XMLHttpRequest);var Oe,Ge,V,ke=me.url=se.uri||se.url,Ue=me.method=se.method||"GET",je=se.body||se.data,rt=me.headers=se.headers||{},w=!!se.sync,D=!1,te={body:void 0,headers:{},statusCode:0,method:Ue,url:ke,rawRequest:me};if("json"in se&&!1!==se.json&&(D=!0,rt.accept||rt.Accept||(rt.Accept="application/json"),"GET"!==Ue&&"HEAD"!==Ue&&(rt["content-type"]||rt["Content-Type"]||(rt["Content-Type"]="application/json"),je=JSON.stringify(!0===se.json?je:se.json))),me.onreadystatechange=function it(){4===me.readyState&&setTimeout(Le,0)},me.onload=Le,me.onerror=oe,me.onprogress=function(){},me.onabort=function(){Ge=!0},me.ontimeout=oe,me.open(Ue,ke,!w,se.username,se.password),w||(me.withCredentials=!!se.withCredentials),!w&&se.timeout>0&&(V=setTimeout(function(){if(!Ge){Ge=!0,me.abort("timeout");var $=new Error("XMLHttpRequest timeout");$.code="ETIMEDOUT",oe($)}},se.timeout)),me.setRequestHeader)for(Oe in rt)rt.hasOwnProperty(Oe)&&me.setRequestHeader(Oe,rt[Oe]);else if(se.headers&&!function Q(se){for(var Fe in se)if(se.hasOwnProperty(Fe))return!1;return!0}(se.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in se&&(me.responseType=se.responseType),"beforeSend"in se&&"function"==typeof se.beforeSend&&se.beforeSend(me),me.send(je||null),me}Ee.httpHandler=H(3992),He.exports=Ee,He.exports.default=Ee,Ee.XMLHttpRequest=X.XMLHttpRequest||function u(){},Ee.XDomainRequest="withCredentials"in new Ee.XMLHttpRequest?Ee.XMLHttpRequest:X.XDomainRequest,function ve(se,Fe){for(var Ve=0;Ve{"use strict";function H(B,we){return void 0===we&&(we=Object),we&&"function"==typeof we.freeze?we.freeze(B):B}var X=H({HTML:"text/html",isHTML:function(B){return B===X.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),_e=H({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(B){return B===_e.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});Ie.freeze=H,Ie.MIME_TYPE=X,Ie.NAMESPACE=_e},1991:(He,Ie,H)=>{var _e=H(9401),B=H(6853),we=H(4436),ve=H(8702),Q=B.DOMImplementation,Ce=_e.NAMESPACE,Ee=ve.ParseError,Te=ve.XMLReader;function pe(oe){this.options=oe||{locator:{}}}function se(){this.cdata=!1}function Fe(oe,Le){Le.lineNumber=oe.lineNumber,Le.columnNumber=oe.columnNumber}function Ve(oe){if(oe)return"\n@"+(oe.systemId||"")+"#[line:"+oe.lineNumber+",col:"+oe.columnNumber+"]"}function it(oe,Le,me){return"string"==typeof oe?oe.substr(Le,me):oe.length>=Le+me||Le?new java.lang.String(oe,Le,me)+"":oe}function yt(oe,Le){oe.currentElement?oe.currentElement.appendChild(Le):oe.doc.appendChild(Le)}pe.prototype.parseFromString=function(oe,Le){var me=this.options,Oe=new Te,Ge=me.domBuilder||new se,ke=me.errorHandler,Ue=me.locator,je=me.xmlns||{},rt=/\/x?html?$/.test(Le),w=rt?we.HTML_ENTITIES:we.XML_ENTITIES;return Ue&&Ge.setDocumentLocator(Ue),Oe.errorHandler=function u(oe,Le,me){if(!oe){if(Le instanceof se)return Le;oe=Le}var Oe={},Ge=oe instanceof Function;function ke(Ue){var je=oe[Ue];!je&&Ge&&(je=2==oe.length?function(rt){oe(Ue,rt)}:oe),Oe[Ue]=je&&function(rt){je("[xmldom "+Ue+"]\t"+rt+Ve(me))}||function(){}}return me=me||{},ke("warning"),ke("error"),ke("fatalError"),Oe}(ke,Ge,Ue),Oe.domBuilder=me.domBuilder||Ge,rt&&(je[""]=Ce.HTML),je.xml=je.xml||Ce.XML,oe&&"string"==typeof oe?Oe.parse(oe,je,w):Oe.errorHandler.error("invalid doc source"),Ge.doc},se.prototype={startDocument:function(){this.doc=(new Q).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(oe,Le,me,Oe){var Ge=this.doc,ke=Ge.createElementNS(oe,me||Le),Ue=Oe.length;yt(this,ke),this.currentElement=ke,this.locator&&Fe(this.locator,ke);for(var je=0;je{var _e=H(9401).NAMESPACE;function B(C){return""!==C}function ve(C,A){return C.hasOwnProperty(A)||(C[A]=!0),C}function Q(C){if(!C)return[];var A=function we(C){return C?C.split(/[\t\n\f\r ]+/).filter(B):[]}(C);return Object.keys(A.reduce(ve,{}))}function Ee(C,A){for(var R in C)A[R]=C[R]}function Te(C,A){var R=C.prototype;if(!(R instanceof A)){let ce=function(){};ce.prototype=A.prototype,ce=new ce,Ee(R,ce),C.prototype=R=ce}R.constructor!=C&&("function"!=typeof C&&console.error("unknown Class:"+C),R.constructor=C)}var pe={},u=pe.ELEMENT_NODE=1,se=pe.ATTRIBUTE_NODE=2,Fe=pe.TEXT_NODE=3,Ve=pe.CDATA_SECTION_NODE=4,it=pe.ENTITY_REFERENCE_NODE=5,yt=pe.ENTITY_NODE=6,oe=pe.PROCESSING_INSTRUCTION_NODE=7,Le=pe.COMMENT_NODE=8,me=pe.DOCUMENT_NODE=9,Oe=pe.DOCUMENT_TYPE_NODE=10,Ge=pe.DOCUMENT_FRAGMENT_NODE=11,ke=pe.NOTATION_NODE=12,Ue={},je={},D=(Ue.INDEX_SIZE_ERR=(je[1]="Index size error",1),Ue.DOMSTRING_SIZE_ERR=(je[2]="DOMString size error",2),Ue.HIERARCHY_REQUEST_ERR=(je[3]="Hierarchy request error",3)),le=(Ue.WRONG_DOCUMENT_ERR=(je[4]="Wrong document",4),Ue.INVALID_CHARACTER_ERR=(je[5]="Invalid character",5),Ue.NO_DATA_ALLOWED_ERR=(je[6]="No data allowed",6),Ue.NO_MODIFICATION_ALLOWED_ERR=(je[7]="No modification allowed",7),Ue.NOT_FOUND_ERR=(je[8]="Not found",8)),J=(Ue.NOT_SUPPORTED_ERR=(je[9]="Not supported",9),Ue.INUSE_ATTRIBUTE_ERR=(je[10]="Attribute in use",10));function We(C,A){if(A instanceof Error)var R=A;else R=this,Error.call(this,je[C]),this.message=je[C],Error.captureStackTrace&&Error.captureStackTrace(this,We);return R.code=C,A&&(this.message=this.message+": "+A),R}function qe(){}function Me(C,A){this._node=C,this._refresh=A,Pt(this)}function Pt(C){var A=C._node._inc||C._node.ownerDocument._inc;if(C._inc!=A){var R=C._refresh(C._node);Ar(C,"length",R.length),Ee(R,C),C._inc=A}}function P(){}function St(C,A){for(var R=C.length;R--;)if(C[R]===A)return R}function z(C,A,R,Z){if(Z?A[St(A,Z)]=R:A[A.length++]=R,C){R.ownerElement=C;var ce=C.ownerDocument;ce&&(Z&&Yi(ce,C,Z),function Ct(C,A,R){C&&C._inc++,R.namespaceURI===_e.XMLNS&&(A._nsMap[R.prefix?R.localName:""]=R.value)}(ce,C,R))}}function gt(C,A,R){var Z=St(A,R);if(!(Z>=0))throw We(le,new Error(C.tagName+"@"+R));for(var ce=A.length-1;Z"==C&&">")||"&"==C&&"&"||'"'==C&&"""||"&#"+C.charCodeAt()+";"}function lt(C,A){if(A(C))return!0;if(C=C.firstChild)do{if(lt(C,A))return!0}while(C=C.nextSibling)}function re(){}function Yi(C,A,R,Z){C&&C._inc++,R.namespaceURI===_e.XMLNS&&delete A._nsMap[R.prefix?R.localName:""]}function $i(C,A,R){if(C&&C._inc){C._inc++;var Z=A.childNodes;if(R)Z[Z.length++]=R;else{for(var ce=A.firstChild,ze=0;ce;)Z[ze++]=ce,ce=ce.nextSibling;Z.length=ze}}}function ki(C,A){var R=A.previousSibling,Z=A.nextSibling;return R?R.nextSibling=Z:C.firstChild=Z,Z?Z.previousSibling=R:C.lastChild=R,$i(C.ownerDocument,C),A}function Qi(C,A,R){var Z=A.parentNode;if(Z&&Z.removeChild(A),A.nodeType===Ge){var ce=A.firstChild;if(null==ce)return A;var ze=A.lastChild}else ce=ze=A;var Xe=R?R.previousSibling:C.lastChild;ce.previousSibling=Xe,ze.nextSibling=R,Xe?Xe.nextSibling=ce:C.firstChild=ce,null==R?C.lastChild=ze:R.previousSibling=ze;do{ce.parentNode=C}while(ce!==ze&&(ce=ce.nextSibling));return $i(C.ownerDocument||C,C),A.nodeType==Ge&&(A.firstChild=A.lastChild=null),A}function vt(){this._nsMap={}}function oi(){}function Xi(){}function rn(){}function xr(){}function Sr(){}function Er(){}function Ji(){}function Cr(){}function nn(){}function er(){}function an(){}function Bn(){}function kr(C,A){var R=[],Z=9==this.nodeType&&this.documentElement||this,ce=Z.prefix,ze=Z.namespaceURI;if(ze&&null==ce&&null==(ce=Z.lookupPrefix(ze)))var Xe=[{namespace:ze,prefix:null}];return Vi(this,R,C,A,Xe),R.join("")}function jn(C,A,R){var Z=C.prefix||"",ce=C.namespaceURI;if(!ce||"xml"===Z&&ce===_e.XML||ce===_e.XMLNS)return!1;for(var ze=R.length;ze--;){var Xe=R[ze];if(Xe.prefix===Z)return Xe.namespace!==ce}return!0}function Ft(C,A,R){C.push(" ",A,'="',R.replace(/[<&"]/g,Ne),'"')}function Vi(C,A,R,Z,ce){if(ce||(ce=[]),Z){if(!(C=Z(C)))return;if("string"==typeof C)return void A.push(C)}switch(C.nodeType){case u:var ze=C.attributes,Xe=ze.length,At=C.firstChild,ui=C.tagName,tr=ui;if(!(R=_e.isHTML(C.namespaceURI)||R)&&!C.prefix&&C.namespaceURI){for(var li,di=0;di=0;$t--)if(""===(ii=ce[$t]).prefix&&ii.namespace===C.namespaceURI){li=ii.namespace;break}if(li!==C.namespaceURI)for($t=ce.length-1;$t>=0;$t--){var ii;if((ii=ce[$t]).namespace===C.namespaceURI){ii.prefix&&(tr=ii.prefix+":"+ui);break}}}A.push("<",tr);for(var ci=0;ci"),R&&/^script$/i.test(ui))for(;At;)At.data?A.push(At.data):Vi(At,A,R,Z,ce.slice()),At=At.nextSibling;else for(;At;)Vi(At,A,R,Z,ce.slice()),At=At.nextSibling;A.push("")}else A.push("/>");return;case me:case Ge:for(At=C.firstChild;At;)Vi(At,A,R,Z,ce.slice()),At=At.nextSibling;return;case se:return Ft(A,C.name,C.value);case Fe:return A.push(C.data.replace(/[<&]/g,Ne).replace(/]]>/g,"]]>"));case Ve:return A.push("");case Le:return A.push("\x3c!--",C.data,"--\x3e");case Oe:var sn=C.publicId,qi=C.systemId;if(A.push("");else if(qi&&"."!=qi)A.push(" SYSTEM ",qi,">");else{var Vn=C.internalSubset;Vn&&A.push(" [",Vn,"]"),A.push(">")}return;case oe:return A.push("");case it:return A.push("&",C.nodeName,";");default:A.push("??",C.nodeName)}}function Hn(C,A,R){var Z;switch(A.nodeType){case u:(Z=A.cloneNode(!1)).ownerDocument=C;case Ge:break;case se:R=!0}if(Z||(Z=A.cloneNode(!1)),Z.ownerDocument=C,Z.parentNode=null,R)for(var ce=A.firstChild;ce;)Z.appendChild(Hn(C,ce,R)),ce=ce.nextSibling;return Z}function _i(C,A,R){var Z=new A.constructor;for(var ce in A){var ze=A[ce];"object"!=typeof ze&&ze!=Z[ce]&&(Z[ce]=ze)}switch(A.childNodes&&(Z.childNodes=new qe),Z.ownerDocument=C,Z.nodeType){case u:var Xe=A.attributes,ui=Z.attributes=new P,tr=Xe.length;ui._ownerElement=Z;for(var li=0;li0},lookupPrefix:function(C){for(var A=this;A;){var R=A._nsMap;if(R)for(var Z in R)if(R[Z]==C)return Z;A=A.nodeType==se?A.ownerDocument:A.parentNode}return null},lookupNamespaceURI:function(C){for(var A=this;A;){var R=A._nsMap;if(R&&C in R)return R[C];A=A.nodeType==se?A.ownerDocument:A.parentNode}return null},isDefaultNamespace:function(C){return null==this.lookupPrefix(C)}},Ee(pe,De),Ee(pe,De.prototype),re.prototype={nodeName:"#document",nodeType:me,doctype:null,documentElement:null,_inc:1,insertBefore:function(C,A){if(C.nodeType==Ge){for(var R=C.firstChild;R;){var Z=R.nextSibling;this.insertBefore(R,A),R=Z}return C}return null==this.documentElement&&C.nodeType==u&&(this.documentElement=C),Qi(this,C,A),C.ownerDocument=this,C},removeChild:function(C){return this.documentElement==C&&(this.documentElement=null),ki(this,C)},importNode:function(C,A){return Hn(this,C,A)},getElementById:function(C){var A=null;return lt(this.documentElement,function(R){if(R.nodeType==u&&R.getAttribute("id")==C)return A=R,!0}),A},getElementsByClassName:function(C){var A=Q(C);return new Me(this,function(R){var Z=[];return A.length>0&<(R.documentElement,function(ce){if(ce!==R&&ce.nodeType===u){var ze=ce.getAttribute("class");if(ze){var Xe=C===ze;if(!Xe){var ui=Q(ze);Xe=A.every(function Ce(C){return function(A){return C&&-1!==C.indexOf(A)}}(ui))}Xe&&Z.push(ce)}}}),Z})},createElement:function(C){var A=new vt;return A.ownerDocument=this,A.nodeName=C,A.tagName=C,A.localName=C,A.childNodes=new qe,(A.attributes=new P)._ownerElement=A,A},createDocumentFragment:function(){var C=new er;return C.ownerDocument=this,C.childNodes=new qe,C},createTextNode:function(C){var A=new rn;return A.ownerDocument=this,A.appendData(C),A},createComment:function(C){var A=new xr;return A.ownerDocument=this,A.appendData(C),A},createCDATASection:function(C){var A=new Sr;return A.ownerDocument=this,A.appendData(C),A},createProcessingInstruction:function(C,A){var R=new an;return R.ownerDocument=this,R.tagName=R.target=C,R.nodeValue=R.data=A,R},createAttribute:function(C){var A=new oi;return A.ownerDocument=this,A.name=C,A.nodeName=C,A.localName=C,A.specified=!0,A},createEntityReference:function(C){var A=new nn;return A.ownerDocument=this,A.nodeName=C,A},createElementNS:function(C,A){var R=new vt,Z=A.split(":"),ce=R.attributes=new P;return R.childNodes=new qe,R.ownerDocument=this,R.nodeName=A,R.tagName=A,R.namespaceURI=C,2==Z.length?(R.prefix=Z[0],R.localName=Z[1]):R.localName=A,ce._ownerElement=R,R},createAttributeNS:function(C,A){var R=new oi,Z=A.split(":");return R.ownerDocument=this,R.nodeName=A,R.name=A,R.namespaceURI=C,R.specified=!0,2==Z.length?(R.prefix=Z[0],R.localName=Z[1]):R.localName=A,R}},Te(re,De),re.prototype.getElementsByTagName=(vt.prototype={nodeType:u,hasAttribute:function(C){return null!=this.getAttributeNode(C)},getAttribute:function(C){var A=this.getAttributeNode(C);return A&&A.value||""},getAttributeNode:function(C){return this.attributes.getNamedItem(C)},setAttribute:function(C,A){var R=this.ownerDocument.createAttribute(C);R.value=R.nodeValue=""+A,this.setAttributeNode(R)},removeAttribute:function(C){var A=this.getAttributeNode(C);A&&this.removeAttributeNode(A)},appendChild:function(C){return C.nodeType===Ge?this.insertBefore(C,null):function nt(C,A){var R=A.parentNode;if(R){var Z=C.lastChild;R.removeChild(A),Z=C.lastChild}return Z=C.lastChild,A.parentNode=C,A.previousSibling=Z,A.nextSibling=null,Z?Z.nextSibling=A:C.firstChild=A,C.lastChild=A,$i(C.ownerDocument,C,A),A}(this,C)},setAttributeNode:function(C){return this.attributes.setNamedItem(C)},setAttributeNodeNS:function(C){return this.attributes.setNamedItemNS(C)},removeAttributeNode:function(C){return this.attributes.removeNamedItem(C.nodeName)},removeAttributeNS:function(C,A){var R=this.getAttributeNodeNS(C,A);R&&this.removeAttributeNode(R)},hasAttributeNS:function(C,A){return null!=this.getAttributeNodeNS(C,A)},getAttributeNS:function(C,A){var R=this.getAttributeNodeNS(C,A);return R&&R.value||""},setAttributeNS:function(C,A,R){var Z=this.ownerDocument.createAttributeNS(C,A);Z.value=Z.nodeValue=""+R,this.setAttributeNode(Z)},getAttributeNodeNS:function(C,A){return this.attributes.getNamedItemNS(C,A)},getElementsByTagName:function(C){return new Me(this,function(A){var R=[];return lt(A,function(Z){Z!==A&&Z.nodeType==u&&("*"===C||Z.tagName==C)&&R.push(Z)}),R})},getElementsByTagNameNS:function(C,A){return new Me(this,function(R){var Z=[];return lt(R,function(ce){ce!==R&&ce.nodeType===u&&("*"===C||ce.namespaceURI===C)&&("*"===A||ce.localName==A)&&Z.push(ce)}),Z})}}).getElementsByTagName,re.prototype.getElementsByTagNameNS=vt.prototype.getElementsByTagNameNS,Te(vt,De),oi.prototype.nodeType=se,Te(oi,De),Xi.prototype={data:"",substringData:function(C,A){return this.data.substring(C,C+A)},appendData:function(C){this.nodeValue=this.data=C=this.data+C,this.length=C.length},insertData:function(C,A){this.replaceData(C,0,A)},appendChild:function(C){throw new Error(je[D])},deleteData:function(C,A){this.replaceData(C,A,"")},replaceData:function(C,A,R){var Z=this.data.substring(0,C),ce=this.data.substring(C+A);this.nodeValue=this.data=R=Z+R+ce,this.length=R.length}},Te(Xi,De),rn.prototype={nodeName:"#text",nodeType:Fe,splitText:function(C){var A=this.data,R=A.substring(C);A=A.substring(0,C),this.data=this.nodeValue=A,this.length=A.length;var Z=this.ownerDocument.createTextNode(R);return this.parentNode&&this.parentNode.insertBefore(Z,this.nextSibling),Z}},Te(rn,Xi),xr.prototype={nodeName:"#comment",nodeType:Le},Te(xr,Xi),Sr.prototype={nodeName:"#cdata-section",nodeType:Ve},Te(Sr,Xi),Er.prototype.nodeType=Oe,Te(Er,De),Ji.prototype.nodeType=ke,Te(Ji,De),Cr.prototype.nodeType=yt,Te(Cr,De),nn.prototype.nodeType=it,Te(nn,De),er.prototype.nodeName="#document-fragment",er.prototype.nodeType=Ge,Te(er,De),an.prototype.nodeType=oe,Te(an,De),Bn.prototype.serializeToString=function(C,A,R){return kr.call(C,A,R)},De.prototype.toString=kr;try{if(Object.defineProperty){let C=function(A){switch(A.nodeType){case u:case Ge:var R=[];for(A=A.firstChild;A;)7!==A.nodeType&&8!==A.nodeType&&R.push(C(A)),A=A.nextSibling;return R.join("");default:return A.nodeValue}};Object.defineProperty(Me.prototype,"length",{get:function(){return Pt(this),this.$$length}}),Object.defineProperty(De.prototype,"textContent",{get:function(){return C(this)},set:function(A){switch(this.nodeType){case u:case Ge:for(;this.firstChild;)this.removeChild(this.firstChild);(A||String(A))&&this.appendChild(this.ownerDocument.createTextNode(A));break;default:this.data=A,this.value=A,this.nodeValue=A}}}),Ar=function(A,R,Z){A["$$"+R]=Z}}}catch{}Ie.DocumentType=Er,Ie.DOMException=We,Ie.DOMImplementation=vi,Ie.Element=vt,Ie.Node=De,Ie.NodeList=qe,Ie.XMLSerializer=Bn},4436:(He,Ie,H)=>{var X=H(9401).freeze;Ie.XML_ENTITIES=X({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),Ie.HTML_ENTITIES=X({lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"\xc0",Aacute:"\xc1",Acirc:"\xc2",Atilde:"\xc3",Auml:"\xc4",Aring:"\xc5",AElig:"\xc6",Ccedil:"\xc7",Egrave:"\xc8",Eacute:"\xc9",Ecirc:"\xca",Euml:"\xcb",Igrave:"\xcc",Iacute:"\xcd",Icirc:"\xce",Iuml:"\xcf",ETH:"\xd0",Ntilde:"\xd1",Ograve:"\xd2",Oacute:"\xd3",Ocirc:"\xd4",Otilde:"\xd5",Ouml:"\xd6",Oslash:"\xd8",Ugrave:"\xd9",Uacute:"\xda",Ucirc:"\xdb",Uuml:"\xdc",Yacute:"\xdd",THORN:"\xde",szlig:"\xdf",agrave:"\xe0",aacute:"\xe1",acirc:"\xe2",atilde:"\xe3",auml:"\xe4",aring:"\xe5",aelig:"\xe6",ccedil:"\xe7",egrave:"\xe8",eacute:"\xe9",ecirc:"\xea",euml:"\xeb",igrave:"\xec",iacute:"\xed",icirc:"\xee",iuml:"\xef",eth:"\xf0",ntilde:"\xf1",ograve:"\xf2",oacute:"\xf3",ocirc:"\xf4",otilde:"\xf5",ouml:"\xf6",oslash:"\xf8",ugrave:"\xf9",uacute:"\xfa",ucirc:"\xfb",uuml:"\xfc",yacute:"\xfd",thorn:"\xfe",yuml:"\xff",nbsp:"\xa0",iexcl:"\xa1",cent:"\xa2",pound:"\xa3",curren:"\xa4",yen:"\xa5",brvbar:"\xa6",sect:"\xa7",uml:"\xa8",copy:"\xa9",ordf:"\xaa",laquo:"\xab",not:"\xac",shy:"\xad\xad",reg:"\xae",macr:"\xaf",deg:"\xb0",plusmn:"\xb1",sup2:"\xb2",sup3:"\xb3",acute:"\xb4",micro:"\xb5",para:"\xb6",middot:"\xb7",cedil:"\xb8",sup1:"\xb9",ordm:"\xba",raquo:"\xbb",frac14:"\xbc",frac12:"\xbd",frac34:"\xbe",iquest:"\xbf",times:"\xd7",divide:"\xf7",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220b",prod:"\u220f",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221a",prop:"\u221d",infin:"\u221e",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222a",int:"\u222b",there4:"\u2234",sim:"\u223c",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22a5",sdot:"\u22c5",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039a",Lambda:"\u039b",Mu:"\u039c",Nu:"\u039d",Xi:"\u039e",Omicron:"\u039f",Pi:"\u03a0",Rho:"\u03a1",Sigma:"\u03a3",Tau:"\u03a4",Upsilon:"\u03a5",Phi:"\u03a6",Chi:"\u03a7",Psi:"\u03a8",Omega:"\u03a9",alpha:"\u03b1",beta:"\u03b2",gamma:"\u03b3",delta:"\u03b4",epsilon:"\u03b5",zeta:"\u03b6",eta:"\u03b7",theta:"\u03b8",iota:"\u03b9",kappa:"\u03ba",lambda:"\u03bb",mu:"\u03bc",nu:"\u03bd",xi:"\u03be",omicron:"\u03bf",pi:"\u03c0",rho:"\u03c1",sigmaf:"\u03c2",sigma:"\u03c3",tau:"\u03c4",upsilon:"\u03c5",phi:"\u03c6",chi:"\u03c7",psi:"\u03c8",omega:"\u03c9",thetasym:"\u03d1",upsih:"\u03d2",piv:"\u03d6",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02c6",tilde:"\u02dc",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200c",zwj:"\u200d",lrm:"\u200e",rlm:"\u200f",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201a",ldquo:"\u201c",rdquo:"\u201d",bdquo:"\u201e",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203a",oline:"\u203e",euro:"\u20ac",trade:"\u2122",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21b5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230a",rfloor:"\u230b",loz:"\u25ca",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"}),Ie.entityMap=Ie.HTML_ENTITIES},978:(He,Ie,H)=>{H(6853);Ie.DOMParser=H(1991).DOMParser},8702:(He,Ie,H)=>{var X=H(9401).NAMESPACE,_e=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,B=new RegExp("[\\-\\.0-9"+_e.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),we=new RegExp("^"+_e.source+B.source+"*(?::"+_e.source+B.source+"*)?$");function Fe(w,D){this.message=w,this.locator=D,Error.captureStackTrace&&Error.captureStackTrace(this,Fe)}function Ve(){}function yt(w,D){return D.lineNumber=w.lineNumber,D.columnNumber=w.columnNumber,D}function oe(w,D,V,te,$,de){function le(Ze,We,qe){V.attributeNames.hasOwnProperty(Ze)&&de.fatalError("Attribute "+Ze+" redefined"),V.addValue(Ze,We,qe)}for(var xe,ue=++D,ee=0;;){var ie=w.charAt(ue);switch(ie){case"=":if(1===ee)xe=w.slice(D,ue),ee=3;else{if(2!==ee)throw new Error("attribute equal must after attrName");ee=3}break;case"'":case'"':if(3===ee||1===ee){if(1===ee&&(de.warning('attribute value must after "="'),xe=w.slice(D,ue)),!((ue=w.indexOf(ie,D=ue+1))>0))throw new Error("attribute value no end '"+ie+"' match");le(xe,J=w.slice(D,ue).replace(/&#?\w+;/g,$),D-1),ee=5}else{if(4!=ee)throw new Error('attribute value must after "="');le(xe,J=w.slice(D,ue).replace(/&#?\w+;/g,$),D),de.warning('attribute "'+xe+'" missed start quot('+ie+")!!"),D=ue+1,ee=5}break;case"/":switch(ee){case 0:V.setTagName(w.slice(D,ue));case 5:case 6:case 7:ee=7,V.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return de.error("unexpected end of input"),0==ee&&V.setTagName(w.slice(D,ue)),ue;case">":switch(ee){case 0:V.setTagName(w.slice(D,ue));case 5:case 6:case 7:break;case 4:case 1:"/"===(J=w.slice(D,ue)).slice(-1)&&(V.closed=!0,J=J.slice(0,-1));case 2:2===ee&&(J=xe),4==ee?(de.warning('attribute "'+J+'" missed quot(")!'),le(xe,J.replace(/&#?\w+;/g,$),D)):((!X.isHTML(te[""])||!J.match(/^(?:disabled|checked|selected)$/i))&&de.warning('attribute "'+J+'" missed value!! "'+J+'" instead!!'),le(J,J,D));break;case 3:throw new Error("attribute value missed!!")}return ue;case"\x80":ie=" ";default:if(ie<=" ")switch(ee){case 0:V.setTagName(w.slice(D,ue)),ee=6;break;case 1:xe=w.slice(D,ue),ee=2;break;case 4:var J=w.slice(D,ue).replace(/&#?\w+;/g,$);de.warning('attribute "'+J+'" missed quot(")!!'),le(xe,J,D);case 5:ee=6}else switch(ee){case 2:(!X.isHTML(te[""])||!xe.match(/^(?:disabled|checked|selected)$/i))&&de.warning('attribute "'+xe+'" missed value!! "'+xe+'" instead2!!'),le(xe,xe,D),D=ue,ee=1;break;case 5:de.warning('attribute space is required"'+xe+'"!!');case 6:ee=1,D=ue;break;case 3:ee=4,D=ue;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}ue++}}function Le(w,D,V){for(var te=w.tagName,$=null,ie=w.length;ie--;){var de=w[ie],le=de.qName,xe=de.value;if((Ae=le.indexOf(":"))>0)var J=de.prefix=le.slice(0,Ae),ue=le.slice(Ae+1),ee="xmlns"===J&&ue;else ue=le,J=null,ee="xmlns"===le&&"";de.localName=ue,!1!==ee&&(null==$&&($={},Ge(V,V={})),V[ee]=$[ee]=xe,de.uri=X.XMLNS,D.startPrefixMapping(ee,xe))}for(ie=w.length;ie--;)(J=(de=w[ie]).prefix)&&("xml"===J&&(de.uri=X.XML),"xmlns"!==J&&(de.uri=V[J||""]));var Ae;(Ae=te.indexOf(":"))>0?(J=w.prefix=te.slice(0,Ae),ue=w.localName=te.slice(Ae+1)):(J=null,ue=w.localName=te);var Ze=w.uri=V[J||""];if(D.startElement(Ze,ue,te,w),!w.closed)return w.currentNSMap=V,w.localNSMap=$,!0;if(D.endElement(Ze,ue,te),$)for(J in $)D.endPrefixMapping(J)}function me(w,D,V,te,$){if(/^(?:script|textarea)$/i.test(V)){var de=w.indexOf("",D),le=w.substring(D+1,de);if(/[&<]/.test(le))return/^script$/i.test(V)?($.characters(le,0,le.length),de):(le=le.replace(/&#?\w+;/g,te),$.characters(le,0,le.length),de)}return D+1}function Oe(w,D,V,te){var $=te[V];return null==$&&(($=w.lastIndexOf(""))D?(V.comment(w,D+4,de-D-4),de+3):(te.error("Unclosed comment"),-1):-1;if("CDATA["==w.substr(D+3,6)){var de=w.indexOf("]]>",D+9);return V.startCDATA(),V.characters(w,D+9,de-D-9),V.endCDATA(),de+3}var le=function rt(w,D){var V,te=[],$=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for($.lastIndex=D,$.exec(w);V=$.exec(w);)if(te.push(V),V[1])return te}(w,D),xe=le.length;if(xe>1&&/!doctype/i.test(le[0][0])){var J=le[1][0],ue=!1,ee=!1;xe>3&&(/^public$/i.test(le[2][0])?(ue=le[3][0],ee=xe>4&&le[4][0]):/^system$/i.test(le[2][0])&&(ee=le[3][0]));var ie=le[xe-1];return V.startDTD(J,ue,ee),V.endDTD(),ie.index+ie[0].length}return-1}function Ue(w,D,V){var te=w.indexOf("?>",D);if(te){var $=w.substring(D,te).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return $?(V.processingInstruction($[1],$[2]),te+2):-1}return-1}function je(){this.attributeNames={}}(Fe.prototype=new Error).name=Fe.name,Ve.prototype={parse:function(w,D,V){var te=this.domBuilder;te.startDocument(),Ge(D,D={}),function it(w,D,V,te,$){function le(nt){var vt=nt.slice(1,-1);return vt in V?V[vt]:"#"===vt.charAt(0)?function de(nt){return nt>65535?(nt-=65536,String.fromCharCode(55296+(nt>>10),56320+(1023&nt))):String.fromCharCode(nt)}(parseInt(vt.substr(1).replace("x","0x"))):($.error("entity not found:"+nt),nt)}function xe(nt){if(nt>qe){var vt=w.substring(qe,nt).replace(/&#?\w+;/g,le);Ae&&J(qe),te.characters(vt,0,nt-qe),qe=nt}}function J(nt,vt){for(;nt>=ee&&(vt=ie.exec(w));)ee=(ue=vt.index)+vt[0].length,Ae.lineNumber++;Ae.columnNumber=nt-ue+1}for(var ue=0,ee=0,ie=/.*(?:\r\n?|\n)|.*$/g,Ae=te.locator,Ze=[{currentNSMap:D}],We={},qe=0;;){try{var Me=w.indexOf("<",qe);if(Me<0){if(!w.substr(qe).match(/^\s*$/)){var Pt=te.doc,P=Pt.createTextNode(w.substr(qe));Pt.appendChild(P),te.currentElement=P}return}switch(Me>qe&&xe(Me),w.charAt(Me+1)){case"/":var Ct=w.indexOf(">",Me+3),St=w.substring(Me+2,Ct).replace(/[ \t\n\r]+$/g,""),z=Ze.pop();Ct<0?(St=w.substring(Me+2).replace(/[\s<].*/,""),$.error("end tag name: "+St+" is not complete:"+z.tagName),Ct=Me+1+St.length):St.match(/\sqe?qe=Ct:xe(Math.max(Me,qe)+1)}}(w,D,V,te,this.errorHandler),te.endDocument()}},je.prototype={setTagName:function(w){if(!we.test(w))throw new Error("invalid tagName:"+w);this.tagName=w},addValue:function(w,D,V){if(!we.test(w))throw new Error("invalid attribute:"+w);this.attributeNames[w]=this.length,this[this.length++]={qName:w,value:D,offset:V}},length:0,getLocalName:function(w){return this[w].localName},getLocator:function(w){return this[w].locator},getQName:function(w){return this[w].qName},getURI:function(w){return this[w].uri},getValue:function(w){return this[w].value}},Ie.XMLReader=Ve,Ie.ParseError=Fe},1421:(He,Ie,H)=>{var B,X=typeof global<"u"?global:typeof window<"u"?window:{},_e=H(5893);typeof document<"u"?B=document:(B=X["__GLOBAL_DOCUMENT_CACHE@4"])||(B=X["__GLOBAL_DOCUMENT_CACHE@4"]=_e),He.exports=B},9226:He=>{var Ie;Ie=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},He.exports=Ie},2703:He=>{He.exports=function H(X){if(!X)return!1;var _e=Ie.call(X);return"[object Function]"===_e||"function"==typeof X&&"[object RegExp]"!==_e||typeof window<"u"&&(X===window.setTimeout||X===window.alert||X===window.confirm||X===window.prompt)};var Ie=Object.prototype.toString},1234:(He,Ie)=>{function H(Q){if(Q&&"object"==typeof Q){var Ce=Q.which||Q.keyCode||Q.charCode;Ce&&(Q=Ce)}if("number"==typeof Q)return we[Q];var Te,Ee=String(Q);return(Te=X[Ee.toLowerCase()])?Te:(Te=_e[Ee.toLowerCase()])||(1===Ee.length?Ee.charCodeAt(0):void 0)}H.isEventKey=function(Ce,Ee){if(Ce&&"object"==typeof Ce){var Te=Ce.which||Ce.keyCode||Ce.charCode;if(null==Te)return!1;if("string"==typeof Ee){var pe;if(pe=X[Ee.toLowerCase()])return pe===Te;if(pe=_e[Ee.toLowerCase()])return pe===Te}else if("number"==typeof Ee)return Ee===Te;return!1}};var X=(Ie=He.exports=H).code=Ie.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},_e=Ie.aliases={windows:91,"\u21e7":16,"\u2325":18,"\u2303":17,"\u2318":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};for(B=97;B<123;B++)X[String.fromCharCode(B)]=B-32;for(var B=48;B<58;B++)X[B-48]=B;for(B=1;B<13;B++)X["f"+B]=B+111;for(B=0;B<10;B++)X["numpad "+B]=B+96;var we=Ie.names=Ie.title={};for(B in X)we[X[B]]=B;for(var ve in _e)X[ve]=_e[ve]},7459:(He,Ie,H)=>{var X=H(3357).getUint64;He.exports=function(B){var we=new DataView(B.buffer,B.byteOffset,B.byteLength),ve={version:B[0],flags:new Uint8Array(B.subarray(1,4)),references:[],referenceId:we.getUint32(4),timescale:we.getUint32(8)},Q=12;0===ve.version?(ve.earliestPresentationTime=we.getUint32(Q),ve.firstOffset=we.getUint32(Q+4),Q+=8):(ve.earliestPresentationTime=X(B.subarray(Q)),ve.firstOffset=X(B.subarray(Q+8)),Q+=16);var Ce=we.getUint16(Q+=2);for(Q+=2;Ce>0;Q+=12,Ce--)ve.references.push({referenceType:(128&B[Q])>>>7,referencedSize:2147483647&we.getUint32(Q),subsegmentDuration:we.getUint32(Q+4),startsWithSap:!!(128&B[Q+8]),sapType:(112&B[Q+8])>>>4,sapDeltaTime:268435455&we.getUint32(Q+8)});return ve}},6277:He=>{var H,X,_e,B,we,ve,Q;we=function(Ce,Ee){return H(B(Ce,Ee))},ve=function(Ce,Ee){return X(_e(Ce),Ee)},Q=function(Ce,Ee,Te){return _e(Te?Ce:Ce-Ee)},He.exports={ONE_SECOND_IN_TS:9e4,secondsToVideoTs:H=function(Ce){return 9e4*Ce},secondsToAudioTs:X=function(Ce,Ee){return Ce*Ee},videoTsToSeconds:_e=function(Ce){return Ce/9e4},audioTsToSeconds:B=function(Ce,Ee){return Ce/Ee},audioTsToVideoTs:we,videoTsToAudioTs:ve,metadataTsToSeconds:Q}},3357:He=>{var Ie=Math.pow(2,32);He.exports={getUint64:function(X){var B,_e=new DataView(X.buffer,X.byteOffset,X.byteLength);return _e.getBigUint64?(B=_e.getBigUint64(0)){He.exports=function Ie(H,X){var _e,B=null;try{_e=JSON.parse(H,X)}catch(we){B=we}return[B,_e]}},3871:function(He){var H,X,_e,B,we;H=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,X=/^(?=([^\/?#]*))\1([^]*)$/,_e=/(?:\/|^)\.(?=\/)/g,B=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,He.exports=we={buildAbsoluteURL:function(ve,Q,Ce){if(Ce=Ce||{},ve=ve.trim(),!(Q=Q.trim())){if(!Ce.alwaysNormalize)return ve;var Ee=we.parseURL(ve);if(!Ee)throw new Error("Error trying to parse base URL.");return Ee.path=we.normalizePath(Ee.path),we.buildURLFromParts(Ee)}var Te=we.parseURL(Q);if(!Te)throw new Error("Error trying to parse relative URL.");if(Te.scheme)return Ce.alwaysNormalize?(Te.path=we.normalizePath(Te.path),we.buildURLFromParts(Te)):Q;var pe=we.parseURL(ve);if(!pe)throw new Error("Error trying to parse base URL.");if(!pe.netLoc&&pe.path&&"/"!==pe.path[0]){var u=X.exec(pe.path);pe.netLoc=u[1],pe.path=u[2]}pe.netLoc&&!pe.path&&(pe.path="/");var se={scheme:pe.scheme,netLoc:Te.netLoc,path:null,params:Te.params,query:Te.query,fragment:Te.fragment};if(!Te.netLoc&&(se.netLoc=pe.netLoc,"/"!==Te.path[0]))if(Te.path){var Fe=pe.path,Ve=Fe.substring(0,Fe.lastIndexOf("/")+1)+Te.path;se.path=we.normalizePath(Ve)}else se.path=pe.path,Te.params||(se.params=pe.params,Te.query||(se.query=pe.query));return null===se.path&&(se.path=Ce.alwaysNormalize?we.normalizePath(Te.path):Te.path),we.buildURLFromParts(se)},parseURL:function(ve){var Q=H.exec(ve);return Q?{scheme:Q[1]||"",netLoc:Q[2]||"",path:Q[3]||"",params:Q[4]||"",query:Q[5]||"",fragment:Q[6]||""}:null},normalizePath:function(ve){for(ve=ve.split("").reverse().join("").replace(_e,"");ve.length!==(ve=ve.replace(B,"")).length;);return ve.split("").reverse().join("")},buildURLFromParts:function(ve){return ve.scheme+ve.netLoc+ve.path+ve.params+ve.query+ve.fragment}}},3629:(He,Ie,H)=>{var X=H(9226),_e=He.exports={WebVTT:H(8318),VTTCue:H(5713),VTTRegion:H(3872)};X.vttjs=_e,X.WebVTT=_e.WebVTT;var B=_e.VTTCue,we=_e.VTTRegion,ve=X.VTTCue,Q=X.VTTRegion;_e.shim=function(){X.VTTCue=B,X.VTTRegion=we},_e.restore=function(){X.VTTCue=ve,X.VTTRegion=Q},X.VTTCue||_e.shim()},8318:(He,Ie,H)=>{var X=H(1421),_e=Object.create||function(){function w(){}return function(D){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return w.prototype=D,new w}}();function B(w,D){this.name="ParsingError",this.code=w.code,this.message=D||w.message}function we(w){function D(te,$,de,le){return 3600*(0|te)+60*(0|$)+(0|de)+(0|le)/1e3}var V=w.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return V?V[3]?D(V[1],V[2],V[3].replace(":",""),V[4]):V[1]>59?D(V[1],V[2],0,V[4]):D(0,V[1],V[2],V[4]):null}function ve(){this.values=_e(null)}function Q(w,D,V,te){var $=te?w.split(te):[w];for(var de in $)if("string"==typeof $[de]){var le=$[de].split(V);2===le.length&&D(le[0],le[1])}}function Ce(w,D,V){var te=w;function $(){var xe=we(w);if(null===xe)throw new B(B.Errors.BadTimeStamp,"Malformed timestamp: "+te);return w=w.replace(/^[^\sa-zA-Z-]+/,""),xe}function le(){w=w.replace(/^\s+/,"")}if(le(),D.startTime=$(),le(),"--\x3e"!==w.substr(0,3))throw new B(B.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+te);w=w.substr(3),le(),D.endTime=$(),le(),function de(xe,J){var ue=new ve;Q(xe,function(ee,ie){switch(ee){case"region":for(var Ae=V.length-1;Ae>=0;Ae--)if(V[Ae].id===ie){ue.set(ee,V[Ae].region);break}break;case"vertical":ue.alt(ee,ie,["rl","lr"]);break;case"line":var Ze=ie.split(","),We=Ze[0];ue.integer(ee,We),ue.percent(ee,We)&&ue.set("snapToLines",!1),ue.alt(ee,We,["auto"]),2===Ze.length&&ue.alt("lineAlign",Ze[1],["start","center","end"]);break;case"position":Ze=ie.split(","),ue.percent(ee,Ze[0]),2===Ze.length&&ue.alt("positionAlign",Ze[1],["start","center","end"]);break;case"size":ue.percent(ee,ie);break;case"align":ue.alt(ee,ie,["start","center","end","left","right"])}},/:/,/\s/),J.region=ue.get("region",null),J.vertical=ue.get("vertical","");try{J.line=ue.get("line","auto")}catch{}J.lineAlign=ue.get("lineAlign","start"),J.snapToLines=ue.get("snapToLines",!0),J.size=ue.get("size",100);try{J.align=ue.get("align","center")}catch{J.align=ue.get("align","middle")}try{J.position=ue.get("position","auto")}catch{J.position=ue.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},J.align)}J.positionAlign=ue.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},J.align)}(w,D)}(B.prototype=_e(Error.prototype)).constructor=B,B.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},ve.prototype={set:function(w,D){!this.get(w)&&""!==D&&(this.values[w]=D)},get:function(w,D,V){return V?this.has(w)?this.values[w]:D[V]:this.has(w)?this.values[w]:D},has:function(w){return w in this.values},alt:function(w,D,V){for(var te=0;te=0&&D<=100))&&(this.set(w,D),!0)}};var Ee=X.createElement&&X.createElement("textarea"),Te={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},pe={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},u={v:"title",lang:"lang"},se={rt:"ruby"};function Fe(w,D){function V(){if(!D)return null;var qe=D.match(/^([^<]*)(<[^>]*>?)?/);return function We(Me){return D=D.substr(Me.length),Me}(qe[1]?qe[1]:qe[2])}function te(We){return Ee.innerHTML=We,We=Ee.textContent,Ee.textContent="",We}function de(We,qe){var Me=Te[We];if(!Me)return null;var Pt=w.document.createElement(Me),P=u[We];return P&&qe&&(Pt[P]=qe.trim()),Pt}for(var J,le=w.document.createElement("div"),xe=le,ue=[];null!==(J=V());)if("<"!==J[0])xe.appendChild(w.document.createTextNode(te(J)));else{if("/"===J[1]){ue.length&&ue[ue.length-1]===J.substr(2).replace(">","")&&(ue.pop(),xe=xe.parentNode);continue}var ie,ee=we(J.substr(1,J.length-2));if(ee){ie=w.document.createProcessingInstruction("timestamp",ee),xe.appendChild(ie);continue}var Ae=J.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!Ae||!(ie=de(Ae[1],Ae[3]))||se[(qe=ie).localName]&&se[qe.localName]!==xe.localName)continue;if(Ae[2]){var Ze=Ae[2].split(".");Ze.forEach(function(We){var qe=/^bg_/.test(We),Me=qe?We.slice(3):We;pe.hasOwnProperty(Me)&&(ie.style[qe?"background-color":"color"]=pe[Me])}),ie.className=Ze.join(" ")}ue.push(Ae[1]),xe.appendChild(ie),xe=ie}var qe;return le}var Ve=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function it(w){for(var D=0;D=V[0]&&w<=V[1])return!0}return!1}function yt(w){var D=[],V="";if(!w||!w.childNodes)return"ltr";function $(xe,J){for(var ue=J.childNodes.length-1;ue>=0;ue--)xe.push(J.childNodes[ue])}function de(xe){if(!xe||!xe.length)return null;var J=xe.pop(),ue=J.textContent||J.innerText;if(ue){var ee=ue.match(/^.*(\n|\r)/);return ee?(xe.length=0,ee[0]):ue}return"ruby"===J.tagName?de(xe):J.childNodes?($(xe,J),de(xe)):void 0}for($(D,w);V=de(D);)for(var le=0;le=0&&w.line<=100))return w.line;if(!w.track||!w.track.textTrackList||!w.track.textTrackList.mediaElement)return-1;for(var D=w.track,V=D.textTrackList,te=0,$=0;$Ae&&(ie=ie<0?-1:1,ie*=Math.ceil(Ae/ee)*ee),xe<0&&(ie+=""===le.vertical?V.height:V.width,J=J.reverse()),de.move(Ze,ie)}else{var We=de.lineHeight/V.height*100;switch(le.lineAlign){case"center":xe-=We/2;break;case"end":xe-=We}switch(le.vertical){case"":D.applyStyles({top:D.formatStyle(xe,"%")});break;case"rl":D.applyStyles({left:D.formatStyle(xe,"%")});break;case"lr":D.applyStyles({right:D.formatStyle(xe,"%")})}J=["+y","-x","+x","-y"],de=new Oe(D)}var qe=function $(Me,Pt){for(var P,St=new Oe(Me),z=1,gt=0;gtvi&&(P=new Oe(Me),z=vi),Me=new Oe(St)}return P||St}(de,J);D.move(qe.toCSSCompatValues(V))}function ke(){}Le.prototype.applyStyles=function(w,D){for(var V in D=D||this.div,w)w.hasOwnProperty(V)&&(D.style[V]=w[V])},Le.prototype.formatStyle=function(w,D){return 0===w?0:w+D},(me.prototype=_e(Le.prototype)).constructor=me,Oe.prototype.move=function(w,D){switch(D=void 0!==D?D:this.lineHeight,w){case"+x":this.left+=D,this.right+=D;break;case"-x":this.left-=D,this.right-=D;break;case"+y":this.top+=D,this.bottom+=D;break;case"-y":this.top-=D,this.bottom-=D}},Oe.prototype.overlaps=function(w){return this.leftw.left&&this.topw.top},Oe.prototype.overlapsAny=function(w){for(var D=0;D=w.top&&this.bottom<=w.bottom&&this.left>=w.left&&this.right<=w.right},Oe.prototype.overlapsOppositeAxis=function(w,D){switch(D){case"+x":return this.leftw.right;case"+y":return this.topw.bottom}},Oe.prototype.intersectPercentage=function(w){return Math.max(0,Math.min(this.right,w.right)-Math.max(this.left,w.left))*Math.max(0,Math.min(this.bottom,w.bottom)-Math.max(this.top,w.top))/(this.height*this.width)},Oe.prototype.toCSSCompatValues=function(w){return{top:this.top-w.top,bottom:w.bottom-this.bottom,left:this.left-w.left,right:w.right-this.right,height:this.height,width:this.width}},Oe.getSimpleBoxPosition=function(w){var D=w.div?w.div.offsetHeight:w.tagName?w.offsetHeight:0,V=w.div?w.div.offsetWidth:w.tagName?w.offsetWidth:0,te=w.div?w.div.offsetTop:w.tagName?w.offsetTop:0;return{left:(w=w.div?w.div.getBoundingClientRect():w.tagName?w.getBoundingClientRect():w).left,right:w.right,top:w.top||te,height:w.height||D,bottom:w.bottom||te+(w.height||D),width:w.width||V}},ke.StringDecoder=function(){return{decode:function(w){if(!w)return"";if("string"!=typeof w)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(w))}}},ke.convertCueToDOMTree=function(w,D){return w&&D?Fe(w,D):null},ke.processCues=function(w,D,V){if(!w||!D||!V)return null;for(;V.firstChild;)V.removeChild(V.firstChild);var te=w.document.createElement("div");if(te.style.position="absolute",te.style.left="0",te.style.right="0",te.style.top="0",te.style.bottom="0",te.style.margin="1.5%",V.appendChild(te),function $(ee){for(var ie=0;ie{var H={"":1,lr:1,rl:1},X={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function B(ve){return"string"==typeof ve&&!!X[ve.toLowerCase()]&&ve.toLowerCase()}function we(ve,Q,Ce){this.hasBeenReset=!1;var Ee="",Te=!1,pe=ve,u=Q,se=Ce,Fe=null,Ve="",it=!0,yt="auto",oe="start",Le="auto",me="auto",Oe=100,Ge="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return Ee},set:function(ke){Ee=""+ke}},pauseOnExit:{enumerable:!0,get:function(){return Te},set:function(ke){Te=!!ke}},startTime:{enumerable:!0,get:function(){return pe},set:function(ke){if("number"!=typeof ke)throw new TypeError("Start time must be set to a number.");pe=ke,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return u},set:function(ke){if("number"!=typeof ke)throw new TypeError("End time must be set to a number.");u=ke,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return se},set:function(ke){se=""+ke,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return Fe},set:function(ke){Fe=ke,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return Ve},set:function(ke){var Ue=function _e(ve){return"string"==typeof ve&&!!H[ve.toLowerCase()]&&ve.toLowerCase()}(ke);if(!1===Ue)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");Ve=Ue,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return it},set:function(ke){it=!!ke,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return yt},set:function(ke){if("number"!=typeof ke&&"auto"!==ke)throw new SyntaxError("Line: an invalid number or illegal string was specified.");yt=ke,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return oe},set:function(ke){var Ue=B(ke);Ue?(oe=Ue,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return Le},set:function(ke){if(ke<0||ke>100)throw new Error("Position must be between 0 and 100.");Le=ke,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return me},set:function(ke){var Ue=B(ke);Ue?(me=Ue,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return Oe},set:function(ke){if(ke<0||ke>100)throw new Error("Size must be between 0 and 100.");Oe=ke,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return Ge},set:function(ke){var Ue=B(ke);if(!Ue)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");Ge=Ue,this.hasBeenReset=!0}}}),this.displayState=void 0}we.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},He.exports=we},3872:He=>{var Ie={"":!0,up:!0};function X(B){return"number"==typeof B&&B>=0&&B<=100}He.exports=function _e(){var B=100,we=3,ve=0,Q=100,Ce=0,Ee=100,Te="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return B},set:function(pe){if(!X(pe))throw new Error("Width must be between 0 and 100.");B=pe}},lines:{enumerable:!0,get:function(){return we},set:function(pe){if("number"!=typeof pe)throw new TypeError("Lines must be set to a number.");we=pe}},regionAnchorY:{enumerable:!0,get:function(){return Q},set:function(pe){if(!X(pe))throw new Error("RegionAnchorX must be between 0 and 100.");Q=pe}},regionAnchorX:{enumerable:!0,get:function(){return ve},set:function(pe){if(!X(pe))throw new Error("RegionAnchorY must be between 0 and 100.");ve=pe}},viewportAnchorY:{enumerable:!0,get:function(){return Ee},set:function(pe){if(!X(pe))throw new Error("ViewportAnchorY must be between 0 and 100.");Ee=pe}},viewportAnchorX:{enumerable:!0,get:function(){return Ce},set:function(pe){if(!X(pe))throw new Error("ViewportAnchorX must be between 0 and 100.");Ce=pe}},scroll:{enumerable:!0,get:function(){return Te},set:function(pe){var u=function H(B){return"string"==typeof B&&!!Ie[B.toLowerCase()]&&B.toLowerCase()}(pe);!1===u?console.warn("Scroll: an invalid or illegal string was specified."):Te=u}}})}},5893:()=>{},434:He=>{function Ie(){return He.exports=Ie=Object.assign?Object.assign.bind():function(H){for(var X=1;X{"use strict";H.r(Ie),H.d(Ie,{BerkasModule:()=>w0});var X=H(6895),_e=H(1390),B=H(4006),we=H(7375),ve=H(3170),Q=H(6271),Ce=H(4249),Ee=H(210),Te=H(6436),pe=H(8613),u=H(4650);let se=(()=>{class s{}return s.\u0275fac=function(t){return new(t||s)},s.\u0275mod=u.oAB({type:s}),s.\u0275inj=u.cJS({imports:[X.ez]}),s})();var Fe=H(8764),Ve=H(4167),it=H(7355),yt=H(2777),oe=H(5861),Le=H(529),me=H(8505),Oe=H(7272),We=H(5934),ke=H(257),Ne=H(3e3),je=H(8745),rt=H(8987),w=H(6382),D=H(4137),V=H(4327),te=H(6925),$=H(197);let de=(()=>{class s{constructor(t,i,e){this.gs=t,this.toast=i,this.dls=e,this.attachmentsDownload={}}getAttachmentDownloadFile(t){return this.attachmentsDownload[t.id]||(this.attachmentsDownload[t.id]={},this.attachmentsDownload[t.id].name=t.name,this.attachmentsDownload[t.id].orig=t.orig,this.attachmentsDownload[t.id].size=t.size,this.attachmentsDownload[t.id].ext=t.ext,this.attachmentsDownload[t.id].download_count=t.download_count,this.attachmentsDownload[t.id].google_drive=t.google_drive,this.attachmentsDownload[t.id].discord=t.discord,this.attachmentsDownload[t.id].mode="indeterminate",this.attachmentsDownload[t.id].isDownloading=!1,this.attachmentsDownload[t.id].isCompleted=!1,this.attachmentsDownload[t.id].data=null,this.attachmentsDownload[t.id].handler=null,this.attachmentsDownload[t.id].toast=null,this.attachmentsDownload[t.id].totals=0,this.attachmentsDownload[t.id].percentage=0,this.attachmentsDownload[t.id].speed=0,this.attachmentsDownload[t.id].loaded=0),this.attachmentsDownload[t.id]}stopFail(t){t.isDownloading=!1,t.isCompleted=!1,t.toast&&this.toast.remove(t.toast.toastId)}onProgress(t,i){if(i.loaded){this.gs.log("[DOWNLOAD_PROGRESS]",i),t.mode="determinate";const e=i.loaded-t.loaded;t.totals+=e,t.speed=e/1e3,t.percentage=Math.round(t.totals/t.size*100),t.loaded=i.loaded,t.toast.toastRef.componentInstance.message=`${t.percentage}% @ ${t.speed} KB/s`}}startDownload(t,i=!0){var e=this;const r=this.attachmentsDownload[t];var a;r.toast=this.toast.warning(`${r.percentage}% @ ${r.speed} KB/s`,"Mengunduh ...",{closeButton:!1,timeOut:0,disableTimeOut:"extendedTimeOut",tapToDismiss:!1}),r.isCompleted?this.saveFileAs(t):(r.isDownloading=!0,r.discord?this.dls.getListDdl(t).subscribe({next:(a=(0,oe.Z)(function*(o){e.gs.log("[DOWNLOAD_LIST_DDL]",o);const l=o.results.sort((v,g)=>v.chunk_idx-g.chunk_idx),d=[];for(const v of l){let g=null;g=i&&v.url?e.dls.downloadDdlDirect(v.url):e.dls.downloadDdlProxy(v.id),d.push(g)}const f=[];var v;r.handler=(0,Oe.z)(...d).subscribe({next:(v=(0,oe.Z)(function*(g){if(g.type===Le.dt.DownloadProgress&&e.onProgress(r,g),g.type===Le.dt.Response){r.loaded=0;const E=yield g.body.arrayBuffer(),x=new Uint8Array(E);e.gs.log("[DOWNLOAD_CHUNK_APPEND]",E.byteLength),f.push(x)}if(g.type===Le.dt.Response&&f.length===l.length){e.gs.log("[DOWNLOAD_CHUNK_COMPLETED]",f);const T=new Blob(f);r.mode="determinate",r.isDownloading=!1,r.isCompleted=!0,r.data=T,e.toast.remove(r.toast.toastId),e.saveFileAs(t)}}),function(T){return v.apply(this,arguments)}),error:v=>{e.gs.log("[DOWNLOAD_CHUNK_ERROR]",v,"error"),e.stopFail(r)}})}),function(l){return a.apply(this,arguments)}),error:a=>{this.gs.log("[DOWNLOAD_ERROR]",a,"error"),this.stopFail(r)}}):r.handler=this.dls.downloadLampiran(t).subscribe({next:a=>{a.type===Le.dt.DownloadProgress&&this.onProgress(r,a),a.type===Le.dt.Response&&(this.gs.log("[DOWNLOAD_COMPLETED]",a),r.mode="determinate",r.isDownloading=!1,r.isCompleted=!0,r.data=a.body,this.toast.remove(r.toast.toastId),this.saveFileAs(t))},error:a=>{this.gs.log("[DOWNLOAD_ERROR]",a,"error"),this.stopFail(r)}}))}cancelDownload(t){const i=this.attachmentsDownload[t];i.mode="indeterminate",i.percentage=0,i.speed=0,i.totals=0,i.loaded=0,i.isDownloading=!1,i.isCompleted=!1,i.handler&&i.handler.unsubscribe(),i.toast&&this.toast.remove(i.toast.toastId)}saveFileAs(t){this.gs.log("[SAVE_FILE]",t);const i=this.attachmentsDownload[t];(0,V.saveAs)(i.data,`${i.orig||i.name+"."+i.ext}`)}}return s.\u0275fac=function(t){return new(t||s)(u.LFG(ke.U),u.LFG(te.k),u.LFG($.v))},s.\u0275prov=u.Yz7({token:s,factory:s.\u0275fac,providedIn:"root"}),s})();var le=H(8020),xe=H(8381),J=H(3238),ue=H(4859),ee=H(7392),ie=H(9549),Ae=H(6338),Ze=H(3162),Ge=H(4385),qe=H(266),Me=H(8616),Pt=H(9226),P=H.n(Pt),St=H(1421),z=H.n(St);function gt(){return gt=Object.assign?Object.assign.bind():function(s){for(var n=1;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function oi(s,n,t){return(oi=vt()?Reflect.construct.bind():function(e,r,a){var o=[null];o.push.apply(o,r);var d=new(Function.bind.apply(e,o));return a&<(d,a.prototype),d}).apply(null,arguments)}var rn=H(3871),xr=H.n(rn),Sr="http://example.com";const Ji=function(n,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(n)&&(n=P().location&&P().location.href||"");var i="function"==typeof P().URL,e=/^\/\//.test(n),r=!P().location&&!/\/\//i.test(n);if(i?n=new(P().URL)(n,P().location||Sr):/\/\//i.test(n)||(n=xr().buildAbsoluteURL(P().location&&P().location.href||"",n)),i){var a=new URL(t,n);return r?a.href.slice(Sr.length):e?a.href.slice(a.protocol.length):a.href}return xr().buildAbsoluteURL(n,t)};var Cr=function(){function s(){this.listeners={}}var n=s.prototype;return n.on=function(i,e){this.listeners[i]||(this.listeners[i]=[]),this.listeners[i].push(e)},n.off=function(i,e){if(!this.listeners[i])return!1;var r=this.listeners[i].indexOf(e);return this.listeners[i]=this.listeners[i].slice(0),this.listeners[i].splice(r,1),r>-1},n.trigger=function(i){var e=this.listeners[i];if(e)if(2===arguments.length)for(var r=e.length,a=0;a-1;r=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,r)),this.buffer=this.buffer.substring(r+1)},n}(Cr),Bn=String.fromCharCode(9),kr=function(n){var t=/([0-9.]*)?@?([0-9.]*)?/.exec(n||""),i={};return t[1]&&(i.length=parseInt(t[1],10)),t[2]&&(i.offset=parseInt(t[2],10)),i},Ft=function(n){for(var r,t=n.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),i={},e=t.length;e--;)""!==t[e]&&((r=/([^=]*)=(.*)/.exec(t[e]).slice(1))[0]=r[0].replace(/^\s+|\s+$/g,""),r[1]=r[1].replace(/^\s+|\s+$/g,""),r[1]=r[1].replace(/^['"](.*)['"]$/g,"$1"),i[r[0]]=r[1]);return i},Vi=function(s){function n(){var i;return(i=s.call(this)||this).customParsers=[],i.tagMappers=[],i}re(n,s);var t=n.prototype;return t.push=function(e){var a,o,r=this;if(0!==(e=e.trim()).length){if("#"!==e[0])return void this.trigger("data",{type:"uri",uri:e});this.tagMappers.reduce(function(d,f){var v=f(e);return v===e?d:d.concat([v])},[e]).forEach(function(d){for(var f=0;f0&&(a.duration=S.duration),0===S.duration&&(a.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=r},key:function(){if(S.attributes)if("NONE"!==S.attributes.METHOD)if(S.attributes.URI){if("com.apple.streamingkeydelivery"===S.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:S.attributes});if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===S.attributes.KEYFORMAT)return-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(S.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===S.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==S.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):S.attributes.KEYID&&"0x"===S.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:S.attributes.KEYFORMAT,keyId:S.attributes.KEYID.substring(2)},pssh:er(S.attributes.URI.split(",")[1])})):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}));S.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),l={method:S.attributes.METHOD||"AES-128",uri:S.attributes.URI},typeof S.attributes.IV<"u"&&(l.iv=S.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else l=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(S.number)?this.manifest.mediaSequence=S.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+S.number})},"discontinuity-sequence":function(){isFinite(S.number)?(this.manifest.discontinuitySequence=S.number,T=S.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+S.number})},"playlist-type":function(){/VOD|EVENT/.test(S.playlistType)?this.manifest.playlistType=S.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+S.playlist})},map:function(){o={},S.uri&&(o.uri=S.uri),S.byterange&&(o.byterange=S.byterange),l&&(o.key=l)},"stream-inf":function(){this.manifest.playlists=r,this.manifest.mediaGroups=this.manifest.mediaGroups||v,S.attributes?(a.attributes||(a.attributes={}),gt(a.attributes,S.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||v,S.attributes&&S.attributes.TYPE&&S.attributes["GROUP-ID"]&&S.attributes.NAME){var q=this.manifest.mediaGroups[S.attributes.TYPE];q[S.attributes["GROUP-ID"]]=q[S.attributes["GROUP-ID"]]||{},U=q[S.attributes["GROUP-ID"]],(F={default:/yes/i.test(S.attributes.DEFAULT)}).autoselect=!!F.default||/yes/i.test(S.attributes.AUTOSELECT),S.attributes.LANGUAGE&&(F.language=S.attributes.LANGUAGE),S.attributes.URI&&(F.uri=S.attributes.URI),S.attributes["INSTREAM-ID"]&&(F.instreamId=S.attributes["INSTREAM-ID"]),S.attributes.CHARACTERISTICS&&(F.characteristics=S.attributes.CHARACTERISTICS),S.attributes.FORCED&&(F.forced=/yes/i.test(S.attributes.FORCED)),U[S.attributes.NAME]=F}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){T+=1,a.discontinuity=!0,this.manifest.discontinuityStarts.push(r.length)},"program-date-time":function(){typeof this.manifest.dateTimeString>"u"&&(this.manifest.dateTimeString=S.dateTimeString,this.manifest.dateTimeObject=S.dateTimeObject),a.dateTimeString=S.dateTimeString,a.dateTimeObject=S.dateTimeObject},targetduration:function(){!isFinite(S.duration)||S.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+S.duration}):(this.manifest.targetDuration=S.duration,Ar.call(this,this.manifest))},start:function(){S.attributes&&!isNaN(S.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:S.attributes["TIME-OFFSET"],precise:S.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out":function(){a.cueOut=S.data},"cue-out-cont":function(){a.cueOutCont=S.data},"cue-in":function(){a.cueIn=S.data},skip:function(){this.manifest.skip=_i(S.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",S.attributes,["SKIPPED-SEGMENTS"])},part:function(){var q=this;d=!0;var ne=this.manifest.segments.length,he=_i(S.attributes);a.parts=a.parts||[],a.parts.push(he),he.byterange&&(he.byterange.hasOwnProperty("offset")||(he.byterange.offset=x),x=he.byterange.offset+he.byterange.length),this.warnOnMissingAttributes_("#EXT-X-PART #"+(a.parts.length-1)+" for segment #"+ne,S.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach(function(ye,ge){ye.hasOwnProperty("lastPart")||q.trigger("warn",{message:"#EXT-X-RENDITION-REPORT #"+ge+" lacks required attribute(s): LAST-PART"})})},"server-control":function(){var q=this.manifest.serverControl=_i(S.attributes);q.hasOwnProperty("canBlockReload")||(q.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),Ar.call(this,this.manifest),q.canSkipDateranges&&!q.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint":function(){var q=this.manifest.segments.length,ne=_i(S.attributes),he=ne.type&&"PART"===ne.type;a.preloadHints=a.preloadHints||[],a.preloadHints.push(ne),ne.byterange&&(ne.byterange.hasOwnProperty("offset")||(ne.byterange.offset=he?x:0,he&&(x=ne.byterange.offset+ne.byterange.length)));var K=a.preloadHints.length-1;if(this.warnOnMissingAttributes_("#EXT-X-PRELOAD-HINT #"+K+" for segment #"+q,S.attributes,["TYPE","URI"]),ne.type)for(var ye=0;yei.timeline?1:-1})},lu=function(n){var t=[];return function(n,t,i){t.forEach(function(e){for(var r in n.mediaGroups[e])for(var a in n.mediaGroups[e][r])i(n.mediaGroups[e][r][a])})}(n,uf,function(i,e,r,a){t=t.concat(i.playlists||[])}),t},du=function(n){var t=n.playlist;t.mediaSequence=n.mediaSequence,t.segments.forEach(function(e,r){e.number=t.mediaSequence+r})},Wn=function(n){return n&&n.uri+"-"+function(n){var t;return t="bigint"==typeof n.offset||"bigint"==typeof n.length?P().BigInt(n.offset)+P().BigInt(n.length)-P().BigInt(1):n.offset+n.length-1,n.offset+"-"+t}(n.byterange)},os=function(n){return nu(n.reduce(function(i,e){var a,r=e.attributes.id+(e.attributes.lang||"");i[r]?(e.segments&&(e.segments[0]&&(e.segments[0].discontinuity=!0),(a=i[r].segments).push.apply(a,e.segments)),e.attributes.contentProtection&&(i[r].attributes.contentProtection=e.attributes.contentProtection)):(i[r]=e,i[r].attributes.timelineStarts=[]);return i[r].attributes.timelineStarts.push({start:e.attributes.periodStart,timeline:e.attributes.periodStart}),i},{})).map(function(i){return i.discontinuityStarts=function(n,t){return n.reduce(function(i,e,r){return e.discontinuity&&i.push(r),i},[])}(i.segments||[]),i})},us=function(n,t){var i=Wn(n.sidx),e=i&&t[i]&&t[i].sidx;return e&&ss(n,e,n.sidx.resolvedUri),n},hf=function(n,t){if(void 0===t&&(t={}),!Object.keys(t).length)return n;for(var i in n)n[i]=us(n[i],t);return n},yf=function(n){var t,i=n.attributes,e=n.segments,r=n.sidx,a=n.discontinuityStarts,o={attributes:(t={NAME:i.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:i.width,height:i.height},CODECS:i.codecs,BANDWIDTH:i.bandwidth},t["PROGRAM-ID"]=1,t),uri:"",endList:"static"===i.type,timeline:i.periodStart,resolvedUri:"",targetDuration:i.duration,discontinuityStarts:a,timelineStarts:i.timelineStarts,segments:e};return i.contentProtection&&(o.contentProtection=i.contentProtection),r&&(o.sidx=r),o},Tf=function(n){var t=n.attributes;return"video/mp4"===t.mimeType||"video/webm"===t.mimeType||"video"===t.contentType},bf=function(n){var t=n.attributes;return"audio/mp4"===t.mimeType||"audio/webm"===t.mimeType||"audio"===t.contentType},xf=function(n){var t=n.attributes;return"text/vtt"===t.mimeType||"text"===t.contentType},cu=function(n){return n?Object.keys(n).reduce(function(t,i){return t.concat(n[i].playlists)},[]):[]},Ef=function(n){var t,i=n.dashPlaylists,e=n.locations,r=n.sidxMapping,a=void 0===r?{}:r,o=n.previousManifest;if(!i.length)return{};var l=i[0].attributes,d=l.sourceDuration,f=l.type,v=l.suggestedPresentationDelay,g=l.minimumUpdatePeriod,T=os(i.filter(Tf)).map(yf),E=os(i.filter(bf)),x=os(i.filter(xf)),S=i.map(function(he){return he.attributes.captionServices}).filter(Boolean),U={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(t={AUDIO:{},VIDEO:{}},t["CLOSED-CAPTIONS"]={},t.SUBTITLES={},t),uri:"",duration:d,playlists:hf(T,a)};g>=0&&(U.minimumUpdatePeriod=1e3*g),e&&(U.locations=e),"dynamic"===f&&(U.suggestedPresentationDelay=v);var j=E.length?function(n,t,i){void 0===t&&(t={}),void 0===i&&(i=!1);var e,r=n.reduce(function(o,l){var d=l.attributes.role&&l.attributes.role.value||"",f=l.attributes.lang||"",v=l.attributes.label||"main";f&&!l.attributes.label&&(v=l.attributes.lang+(d?" ("+d+")":"")),o[v]||(o[v]={language:f,autoselect:!0,default:"main"===d,playlists:[],uri:""});var T=us(function(n,t){var i,e=n.attributes,r=n.segments,a=n.sidx,o=n.mediaSequence,l=n.discontinuitySequence,d=n.discontinuityStarts,f={attributes:(i={NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs},i["PROGRAM-ID"]=1,i),uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:"",targetDuration:e.duration,discontinuitySequence:l,discontinuityStarts:d,timelineStarts:e.timelineStarts,mediaSequence:o,segments:r};return e.contentProtection&&(f.contentProtection=e.contentProtection),a&&(f.sidx=a),t&&(f.attributes.AUDIO="audio",f.attributes.SUBTITLES="subs"),f}(l,i),t);return o[v].playlists.push(T),typeof e>"u"&&"main"===d&&((e=l).default=!0),o},{});return e||(r[Object.keys(r)[0]].default=!0),r}(E,a,0===U.playlists.length):null,W=x.length?function(n,t){return void 0===t&&(t={}),n.reduce(function(i,e){var r=e.attributes.lang||"text";return i[r]||(i[r]={language:r,default:!1,autoselect:!1,playlists:[],uri:""}),i[r].playlists.push(us(function(n){var t,i=n.attributes,e=n.segments,r=n.mediaSequence,a=n.discontinuityStarts,o=n.discontinuitySequence;typeof e>"u"&&(e=[{uri:i.baseUrl,timeline:i.periodStart,resolvedUri:i.baseUrl||"",duration:i.sourceDuration,number:0}],i.duration=i.sourceDuration);var l=((t={NAME:i.id,BANDWIDTH:i.bandwidth})["PROGRAM-ID"]=1,t);return i.codecs&&(l.CODECS=i.codecs),{attributes:l,uri:"",endList:"static"===i.type,timeline:i.periodStart,resolvedUri:i.baseUrl||"",targetDuration:i.duration,timelineStarts:i.timelineStarts,discontinuityStarts:a,discontinuitySequence:o,mediaSequence:r,segments:e}}(e),t)),i},{})}(x,a):null,q=T.concat(cu(j),cu(W)),ne=q.map(function(he){return he.timelineStarts});return U.timelineStarts=uu(ne),function(n,t){n.forEach(function(i){i.mediaSequence=0,i.discontinuitySequence=ns(t,function(e){return e.timeline===i.timeline}),i.segments&&i.segments.forEach(function(e,r){e.number=r})})}(q,U.timelineStarts),j&&(U.mediaGroups.AUDIO.audio=j),W&&(U.mediaGroups.SUBTITLES.subs=W),S.length&&(U.mediaGroups["CLOSED-CAPTIONS"].cc=function(n){return n.reduce(function(t,i){return i&&i.forEach(function(e){var a=e.language;t[a]={autoselect:!1,default:!1,instreamId:e.channel,language:a},e.hasOwnProperty("aspectRatio")&&(t[a].aspectRatio=e.aspectRatio),e.hasOwnProperty("easyReader")&&(t[a].easyReader=e.easyReader),e.hasOwnProperty("3D")&&(t[a]["3D"]=e["3D"])}),t},{})}(S)),o?function(n){var t=n.oldManifest,i=n.newManifest,e=t.playlists.concat(lu(t)),r=i.playlists.concat(lu(i));return i.timelineStarts=uu([t.timelineStarts,i.timelineStarts]),function(n){var t=n.oldPlaylists,e=n.timelineStarts;n.newPlaylists.forEach(function(r){r.discontinuitySequence=ns(e,function(f){return f.timeline===r.timeline});var a=function(n,t){for(var i=0;ia.timeline||a.segments.length&&r.timeline>a.segments[a.segments.length-1].timeline)&&r.discontinuitySequence--);a.segments[l].discontinuity&&!o.discontinuity&&(o.discontinuity=!0,r.discontinuityStarts.unshift(0),r.discontinuitySequence--),du({playlist:r,mediaSequence:a.segments[l].number})}})}({oldPlaylists:e,newPlaylists:r,timelineStarts:i.timelineStarts}),i}({oldManifest:o,newManifest:U}):U},Cf=function(n,t,i){var o=n.timescale,d=n.periodStart,v=n.minimumUpdatePeriod;return Math.ceil((((n.NOW+n.clientOffset)/1e3+(void 0===v?0:v)-(n.availabilityStartTime+(void 0===d?0:d)))*(void 0===o?1:o)-t)/i)},fu=function(n,t){for(var i=n.type,e=n.minimumUpdatePeriod,r=void 0===e?0:e,a=n.media,o=void 0===a?"":a,l=n.sourceDuration,d=n.timescale,f=void 0===d?1:d,v=n.startNumber,g=void 0===v?1:v,T=n.periodStart,E=[],x=-1,S=0;Sx&&(x=W);var q=void 0;if(j<0){var ne=S+1;q=ne===t.length?"dynamic"===i&&r>0&&o.indexOf("$Number$")>0?Cf(n,x,F):(l*f-x)/F:(t[ne].t-x)/F}else q=j+1;for(var he=g+E.length+q,K=g+E.length;K"u")return t;var a=""+n[i];return"RepresentationID"===i||(r=e?parseInt(r,10):1,a.length>=r)?a:""+new Array(r-a.length+1).join("0")+a}}(t))},If=function(n,t){var i={RepresentationID:n.id,Bandwidth:n.bandwidth||0},e=n.initialization,r=void 0===e?{sourceURL:"",range:""}:e,a=on({baseUrl:n.baseUrl,source:hu(r.sourceURL,i),range:r.range}),o=function(n,t){return n.duration||t?n.duration?as(n):fu(n,t):[{number:n.startNumber||1,duration:n.sourceDuration,time:0,timeline:n.periodStart}]}(n,t);return o.map(function(l){i.Number=l.number,i.Time=l.time;var d=hu(n.media||"",i),g=n.periodStart+(l.time-(n.presentationTimeOffset||0))/(n.timescale||1);return{uri:d,timeline:l.timeline,duration:l.duration,resolvedUri:Ji(n.baseUrl||"",d),map:a,number:l.number,presentationTime:g}})},Pf=function(n,t){var i=n.duration,e=n.segmentUrls,r=void 0===e?[]:e,a=n.periodStart;if(!i&&!t||i&&t)throw new Error("SEGMENT_TIME_UNSPECIFIED");var l,o=r.map(function(f){return function(n,t){var i=n.baseUrl,e=n.initialization,r=void 0===e?{}:e,a=on({baseUrl:i,source:r.sourceURL,range:r.range}),o=on({baseUrl:i,source:t.media,range:t.mediaRange});return o.map=a,o}(n,f)});return i&&(l=as(n)),t&&(l=fu(n,t)),l.map(function(f,v){if(o[v]){var g=o[v],T=n.timescale||1,E=n.presentationTimeOffset||0;return g.timeline=f.timeline,g.duration=f.duration,g.number=f.number,g.presentationTime=a+(f.time-E)/T,g}}).filter(function(f){return f})},Of=function(n){var e,r,t=n.attributes,i=n.segmentInfo;i.template?(r=If,e=Bt(t,i.template)):i.base?(r=ou,e=Bt(t,i.base)):i.list&&(r=Pf,e=Bt(t,i.list));var a={attributes:t};if(!r)return a;var o=r(e,i.segmentTimeline);if(e.duration){var f=e.timescale;e.duration=e.duration/(void 0===f?1:f)}else e.duration=o.length?o.reduce(function(g,T){return Math.max(g,Math.ceil(T.duration))},0):0;return a.attributes=e,a.segments=o,i.base&&e.indexRange&&(a.sidx=o[0],a.segments=[]),a},Tt=function(n,t){return au(n.childNodes).filter(function(i){return i.tagName===t})},ls=function(n){return n.textContent.trim()},Ir=function(n){var l=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(n);if(!l)return 0;var d=l.slice(1),v=d[1],g=d[2],T=d[3],E=d[4],x=d[5];return 31536e3*parseFloat(d[0]||0)+2592e3*parseFloat(v||0)+86400*parseFloat(g||0)+3600*parseFloat(T||0)+60*parseFloat(E||0)+parseFloat(x||0)},pu={mediaPresentationDuration:function(n){return Ir(n)},availabilityStartTime:function(n){return function(n){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(n)&&(n+="Z"),Date.parse(n)}(n)/1e3},minimumUpdatePeriod:function(n){return Ir(n)},suggestedPresentationDelay:function(n){return Ir(n)},type:function(n){return n},timeShiftBufferDepth:function(n){return Ir(n)},start:function(n){return Ir(n)},width:function(n){return parseInt(n,10)},height:function(n){return parseInt(n,10)},bandwidth:function(n){return parseInt(n,10)},startNumber:function(n){return parseInt(n,10)},timescale:function(n){return parseInt(n,10)},presentationTimeOffset:function(n){return parseInt(n,10)},duration:function(n){var t=parseInt(n,10);return isNaN(t)?Ir(n):t},d:function(n){return parseInt(n,10)},t:function(n){return parseInt(n,10)},r:function(n){return parseInt(n,10)},DEFAULT:function(n){return n}},Mt=function(n){return n&&n.attributes?au(n.attributes).reduce(function(t,i){return t[i.name]=(pu[i.name]||pu.DEFAULT)(i.value),t},{}):{}},Mf={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},Gn=function(n,t){return t.length?qn(n.map(function(i){return t.map(function(e){return Ji(i,ls(e))})})):n},ds=function(n){var t=Tt(n,"SegmentTemplate")[0],i=Tt(n,"SegmentList")[0],e=i&&Tt(i,"SegmentURL").map(function(g){return Bt({tag:"SegmentURL"},Mt(g))}),r=Tt(n,"SegmentBase")[0],a=i||t,o=a&&Tt(a,"SegmentTimeline")[0],l=i||r||t,d=l&&Tt(l,"Initialization")[0],f=t&&Mt(t);f&&d?f.initialization=d&&Mt(d):f&&f.initialization&&(f.initialization={sourceURL:f.initialization});var v={template:f,segmentTimeline:o&&Tt(o,"S").map(function(g){return Mt(g)}),list:i&&Bt(Mt(i),{segmentUrls:e,initialization:Mt(d)}),base:r&&Bt(Mt(r),{initialization:Mt(d)})};return Object.keys(v).forEach(function(g){v[g]||delete v[g]}),v},jf=function(n,t){return function(i,e){var r=Gn(t,Tt(i.node,"BaseURL")),a=Bt(n,{periodStart:i.attributes.start});"number"==typeof i.attributes.duration&&(a.periodDuration=i.attributes.duration);var o=Tt(i.node,"AdaptationSet"),l=ds(i.node);return qn(o.map(function(n,t,i){return function(e){var r=Mt(e),a=Gn(t,Tt(e,"BaseURL")),o=Tt(e,"Role")[0],l={role:Mt(o)},d=Bt(n,r,l),f=Tt(e,"Accessibility")[0],v=function(n){return"urn:scte:dash:cc:cea-608:2015"===n.schemeIdUri?("string"!=typeof n.value?[]:n.value.split(";")).map(function(e){var r,a;if(a=e,/^CC\d=/.test(e)){var o=e.split("=");r=o[0],a=o[1]}else/^CC\d$/.test(e)&&(r=e);return{channel:r,language:a}}):"urn:scte:dash:cc:cea-708:2015"===n.schemeIdUri?("string"!=typeof n.value?[]:n.value.split(";")).map(function(e){var r={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(e)){var a=e.split("="),l=a[1],d=void 0===l?"":l;r.channel=a[0],r.language=e,d.split(",").forEach(function(f){var v=f.split(":"),g=v[0],T=v[1];"lang"===g?r.language=T:"er"===g?r.easyReader=Number(T):"war"===g?r.aspectRatio=Number(T):"3D"===g&&(r["3D"]=Number(T))})}else r.language=e;return r.channel&&(r.channel="SERVICE"+r.channel),r}):void 0}(Mt(f));v&&(d=Bt(d,{captionServices:v}));var g=Tt(e,"Label")[0];if(g&&g.childNodes.length){var T=g.childNodes[0].nodeValue.trim();d=Bt(d,{label:T})}var E=function(n){return n.reduce(function(t,i){var e=Mt(i),r=Mf[e.schemeIdUri];if(r){t[r]={attributes:e};var a=Tt(i,"cenc:pssh")[0];if(a){var o=ls(a),l=o&&er(o);t[r].pssh=l}}return t},{})}(Tt(e,"ContentProtection"));Object.keys(E).length&&(d=Bt(d,{contentProtection:E}));var x=ds(e),S=Tt(e,"Representation"),U=Bt(i,x);return qn(S.map(function(n,t,i){return function(e){var r=Tt(e,"BaseURL"),a=Gn(t,r),o=Bt(n,Mt(e)),l=ds(e);return a.map(function(d){return{segmentInfo:Bt(i,l),attributes:Bt(o,{baseUrl:d})}})}}(d,a,U)))}}(a,r,l)))}},mu=function(n){if(""===n)throw new Error("DASH_EMPTY_MANIFEST");var i,e,t=new Vn.DOMParser;try{e=(i=t.parseFromString(n,"application/xml"))&&"MPD"===i.documentElement.tagName?i.documentElement:null}catch{}if(!e||e&&e.getElementsByTagName("parsererror").length>0)throw new Error("DASH_INVALID_XML");return e},Zf=H(7459),Kf=H.n(Zf),Re=function(n){return n instanceof Uint8Array?n:(!Array.isArray(n)&&!function(n){return function(n){return"function"===ArrayBuffer.isView?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer}(n)}(n)&&!(n instanceof ArrayBuffer)&&(n="number"!=typeof n||"number"==typeof n&&n!=n?0:[n]),new Uint8Array(n&&n.buffer||n,n&&n.byteOffset||0,n&&n.byteLength||0))},Ot=P().BigInt||Number,cs=[Ot("0x1"),Ot("0x100"),Ot("0x10000"),Ot("0x1000000"),Ot("0x100000000"),Ot("0x10000000000"),Ot("0x1000000000000"),Ot("0x100000000000000"),Ot("0x10000000000000000")],Jf=(s=new Uint16Array([65484]),new Uint8Array(s.buffer,s.byteOffset,s.byteLength),function(n,t){var i=void 0===t?{}:t,e=i.signed,r=void 0!==e&&e,a=i.le,o=void 0!==a&&a;n=Re(n);var l=o?"reduce":"reduceRight",f=(n[l]?n[l]:Array.prototype[l]).call(n,function(g,T,E){var x=o?E:Math.abs(E+1-n.length);return g+Ot(T)*cs[x]},Ot(0));if(r){var v=cs[n.length]/Ot(2)-Ot(1);(f=Ot(f))>v&&(f-=v,f-=v,f-=Ot(2))}return Number(f)}),_u=function(n,t){if("string"!=typeof n&&n&&"function"==typeof n.toString&&(n=n.toString()),"string"!=typeof n)return new Uint8Array;t||(n=unescape(encodeURIComponent(n)));for(var i=new Uint8Array(n.length),e=0;e=t.length&&(t.every?t.every:Array.prototype.every).call(t,function(f,v){return f===(l[v]?l[v]&n[a+v]:n[a+v])})},rh=Re([73,68,51]),un=function s(n,t){return void 0===t&&(t=0),(n=Re(n)).length-t<10||!ht(n,rh,{offset:t})?t:(t+=function(n,t){void 0===t&&(t=0);var e=(n=Re(n))[t+6]<<21|n[t+7]<<14|n[t+8]<<7|n[t+9];return(16&n[t+5])>>4?e+20:e+10}(n,t),s(n,t))},fs=(new Uint8Array([79,112,117,115,72,101,97,100]),function(n){return"string"==typeof n?_u(n):n}),ps=function(n){n=Re(n);for(var t=[],i=0;n.length>i;){var e=n[i],r=0,a=0,o=n[++a];for(a++;128&o;)r=(127&o)<<7,o=n[a],a++;r+=127&o;for(var l=0;l>>0,o=n.subarray(r+4,r+8);if(0===a)break;var l=r+a;if(l>n.length){if(i)break;l=n.length}var d=n.subarray(r+8,l);ht(o,t[0])&&(1===t.length?e.push(d):e.push.apply(e,s(d,t.slice(1),i))),r=l}return e},dt={EBML:Re([26,69,223,163]),DocType:Re([66,130]),Segment:Re([24,83,128,103]),SegmentInfo:Re([21,73,169,102]),Tracks:Re([22,84,174,107]),Track:Re([174]),TrackNumber:Re([215]),DefaultDuration:Re([35,227,131]),TrackEntry:Re([174]),TrackType:Re([131]),FlagDefault:Re([136]),CodecID:Re([134]),CodecPrivate:Re([99,162]),VideoTrack:Re([224]),AudioTrack:Re([225]),Cluster:Re([31,67,182,117]),Timestamp:Re([231]),TimestampScale:Re([42,215,177]),BlockGroup:Re([160]),BlockDuration:Re([155]),Block:Re([161]),SimpleBlock:Re([163])},ms=[128,64,32,16,8,4,2,1],rr=function(n,t,i,e){void 0===i&&(i=!0),void 0===e&&(e=!1);var r=function(n){for(var t=1,i=0;i=t.length)return t.length;var e=rr(t,i,!1);if(ht(n.bytes,e.bytes))return i;var r=rr(t,i+e.length);return s(n,t,i+r.length+r.value+e.length)},pt=function s(n,t){t=function(n){return Array.isArray(n)?n.map(function(t){return yu(t)}):[yu(n)]}(t),n=Re(n);var i=[];if(!t.length)return i;for(var e=0;en.length?n.length:o+a.value);ht(t[0],r.bytes)&&(1===t.length?i.push(d):i=i.concat(s(d,t.slice(1)))),e+=r.length+a.length+d.length}return i},ph=Re([0,0,0,1]),mh=Re([0,0,1]),gh=Re([0,0,3]),vh=function(n){for(var t=[],i=1;i>1&63),-1!==i.indexOf(d)&&(a=r+l),r+=l+("h264"===t?1:2)}else r++}return n.subarray(0,0)},jt={webm:Re([119,101,98,109]),matroska:Re([109,97,116,114,111,115,107,97]),flac:Re([102,76,97,67]),ogg:Re([79,103,103,83]),ac3:Re([11,119]),riff:Re([82,73,70,70]),avi:Re([65,86,73]),wav:Re([87,65,86,69]),"3gp":Re([102,116,121,112,51,103]),mp4:Re([102,116,121,112]),fmp4:Re([115,116,121,112]),mov:Re([102,116,121,112,113,116]),moov:Re([109,111,111,118]),moof:Re([109,111,111,102])},Pr={aac:function(n){var t=un(n);return ht(n,[255,16],{offset:t,mask:[255,22]})},mp3:function(n){var t=un(n);return ht(n,[255,2],{offset:t,mask:[255,6]})},webm:function(n){var t=pt(n,[dt.EBML,dt.DocType])[0];return ht(t,jt.webm)},mkv:function(n){var t=pt(n,[dt.EBML,dt.DocType])[0];return ht(t,jt.matroska)},mp4:function(n){return!Pr["3gp"](n)&&!Pr.mov(n)&&(!!(ht(n,jt.mp4,{offset:4})||ht(n,jt.fmp4,{offset:4})||ht(n,jt.moof,{offset:4})||ht(n,jt.moov,{offset:4}))||void 0)},mov:function(n){return ht(n,jt.mov,{offset:4})},"3gp":function(n){return ht(n,jt["3gp"],{offset:4})},ac3:function(n){var t=un(n);return ht(n,jt.ac3,{offset:t})},ts:function(n){if(n.length<189&&n.length>=1)return 71===n[0];for(var t=0;t+1880?l:0)}if(P().console){var d=P().console[i];!d&&"debug"===i&&(d=P().console.info||P().console.log),d&&a&&o.test(i)&&d[Array.isArray(r)?"apply":"call"](P().console,r)}}}(s,i),i.createLogger=function(e){return Eu(s+": "+e)},i.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:n},i.level=function(e){if("string"==typeof e){if(!i.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');n=e}return n},(i.history=function(){return zt?[].concat(zt):[]}).filter=function(e){return(zt||[]).filter(function(r){return new RegExp(".*"+e+".*").test(r[0])})},i.history.clear=function(){zt&&(zt.length=0)},i.history.disable=function(){null!==zt&&(zt.length=0,zt=null)},i.history.enable=function(){null===zt&&(zt=[])},i.error=function(){for(var e=arguments.length,r=new Array(e),a=0;a1?n-1:0),i=1;i=0)throw new Error("class has illegal whitespace characters")}function Rr(){return z()===P().document}function Mr(s){return Ii(s)&&1===s.nodeType}function Mu(){try{return P().parent!==P().self}catch{return!0}}function Nu(s){return function(n,t){if(!Lu(n))return z()[s](null);Lu(t)&&(t=z().querySelector(t));var i=Mr(t)?t:z();return i[s]&&i[s](n)}}function Ye(s,n,t,i){void 0===s&&(s="div"),void 0===n&&(n={}),void 0===t&&(t={});var e=z().createElement(s);return Object.getOwnPropertyNames(n).forEach(function(r){var a=n[r];-1!==r.indexOf("aria-")||"role"===r||"type"===r?(Ke.warn("Setting attributes in the second argument of createEl()\nhas been deprecated. Use the third argument instead.\ncreateEl(type, properties, attributes). Attempting to set "+r+" to "+a+"."),e.setAttribute(r,a)):"textContent"===r?nr(e,a):(e[r]!==a||"tabIndex"===r)&&(e[r]=a)}),Object.getOwnPropertyNames(t).forEach(function(r){e.setAttribute(r,t[r])}),i&&Es(e,i),e}function nr(s,n){return typeof s.textContent>"u"?s.innerText=n:s.textContent=n,s}function xs(s,n){n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s)}function ar(s,n){return Ru(n),s.classList?s.classList.contains(n):function Dh(s){return new RegExp("(^|\\s)"+s+"($|\\s)")}(n).test(s.className)}function Oi(s,n){return s.classList?s.classList.add(n):ar(s,n)||(s.className=(s.className+" "+n).trim()),s}function mn(s,n){return s?(s.classList?s.classList.remove(n):(Ru(n),s.className=s.className.split(/\s+/).filter(function(t){return t!==n}).join(" ")),s):(Ke.warn("removeClass was called with an element that doesn't exist"),null)}function Uu(s,n,t){var i=ar(s,n);if("function"==typeof t&&(t=t(s,n)),"boolean"!=typeof t&&(t=!i),t!==i)return t?Oi(s,n):mn(s,n),s}function Fu(s,n){Object.getOwnPropertyNames(n).forEach(function(t){var i=n[t];null===i||typeof i>"u"||!1===i?s.removeAttribute(t):s.setAttribute(t,!0===i?"":i)})}function Li(s){var n={};if(s&&s.attributes&&s.attributes.length>0)for(var i=s.attributes,e=i.length-1;e>=0;e--){var r=i[e].name,a=i[e].value;("boolean"==typeof s[r]||-1!==",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+r+","))&&(a=null!==a),n[r]=a}return n}function Bu(s,n){return s.getAttribute(n)}function Nr(s,n,t){s.setAttribute(n,t)}function Xn(s,n){s.removeAttribute(n)}function ju(){z().body.focus(),z().onselectstart=function(){return!1}}function Hu(){z().onselectstart=function(){return!0}}function Ur(s){if(s&&s.getBoundingClientRect&&s.parentNode){var n=s.getBoundingClientRect(),t={};return["bottom","height","left","right","top","width"].forEach(function(i){void 0!==n[i]&&(t[i]=n[i])}),t.height||(t.height=parseFloat(fn(s,"height"))),t.width||(t.width=parseFloat(fn(s,"width"))),t}}function gn(s){if(!s||s&&!s.offsetParent)return{left:0,top:0,width:0,height:0};for(var n=s.offsetWidth,t=s.offsetHeight,i=0,e=0;s.offsetParent&&s!==z()[Kn.fullscreenElement];)i+=s.offsetLeft,e+=s.offsetTop,s=s.offsetParent;return{left:i,top:e,width:n,height:t}}function Jn(s,n){var t={x:0,y:0};if(Ht)for(var i=s;i&&"html"!==i.nodeName.toLowerCase();){var e=fn(i,"transform");if(/^matrix/.test(e)){var r=e.slice(7,-1).split(/,\s/).map(Number);t.x+=r[4],t.y+=r[5]}else if(/^matrix3d/.test(e)){var a=e.slice(9,-1).split(/,\s/).map(Number);t.x+=a[12],t.y+=a[13]}i=i.parentNode}var o={},l=gn(n.target),d=gn(s),f=d.width,g=n.offsetY-(d.top-l.top),T=n.offsetX-(d.left-l.left);return n.changedTouches&&(T=n.changedTouches[0].pageX-d.left,g=n.changedTouches[0].pageY+d.top,Ht&&(T-=t.x,g-=t.y)),o.y=1-Math.max(0,Math.min(1,g/d.height)),o.x=Math.max(0,Math.min(1,T/f)),o}function Vu(s){return Ii(s)&&3===s.nodeType}function Ss(s){for(;s.firstChild;)s.removeChild(s.firstChild);return s}function qu(s){return"function"==typeof s&&(s=s()),(Array.isArray(s)?s:[s]).map(function(n){return"function"==typeof n&&(n=n()),Mr(n)||Vu(n)?n:"string"==typeof n&&/\S/.test(n)?z().createTextNode(n):void 0}).filter(function(n){return n})}function Es(s,n){return qu(n).forEach(function(t){return s.appendChild(t)}),s}function Wu(s,n){return Es(Ss(s),n)}function vn(s){return void 0===s.button&&void 0===s.buttons||0===s.button&&void 0===s.buttons||"mouseup"===s.type&&0===s.button&&0===s.buttons||!(0!==s.button||1!==s.buttons)}var Cs,Gi=Nu("querySelector"),Gu=Nu("querySelectorAll"),Zu=Object.freeze({__proto__:null,isReal:Rr,isEl:Mr,isInFrame:Mu,createEl:Ye,textContent:nr,prependTo:xs,hasClass:ar,addClass:Oi,removeClass:mn,toggleClass:Uu,setAttributes:Fu,getAttributes:Li,getAttribute:Bu,setAttribute:Nr,removeAttribute:Xn,blockTextSelection:ju,unblockTextSelection:Hu,getBoundingClientRect:Ur,findPosition:gn,getPointerPosition:Jn,isTextNode:Vu,emptyEl:Ss,normalizeContent:qu,appendContent:Es,insertContent:Wu,isSingleLeftClick:vn,$:Gi,$$:Gu}),Ku=!1,Ph=function(){if(!1!==Cs.options.autoSetup){var n=Array.prototype.slice.call(z().getElementsByTagName("video")),t=Array.prototype.slice.call(z().getElementsByTagName("audio")),i=Array.prototype.slice.call(z().getElementsByTagName("video-js")),e=n.concat(t,i);if(e&&e.length>0)for(var r=0,a=e.length;r-1&&(e={passive:!0}),s.addEventListener(n,i.dispatcher,e)}else s.attachEvent&&s.attachEvent("on"+n,i.dispatcher)}function Nt(s,n,t){if(Vt.has(s)){var i=Vt.get(s);if(i.handlers){if(Array.isArray(n))return ws(Nt,s,n,t);var e=function(d,f){i.handlers[f]=[],Qu(d,f)};if(void 0===n){for(var r in i.handlers)Object.prototype.hasOwnProperty.call(i.handlers||{},r)&&e(s,r);return}var a=i.handlers[n];if(a){if(!t)return void e(s,n);if(t.guid)for(var o=0;o=t&&(n.apply(void 0,arguments),i=a)}},It=function(){};It.prototype.allowedEvents_={},It.prototype.addEventListener=It.prototype.on=function(s,n){var t=this.addEventListener;this.addEventListener=function(){},Xt(this,s,n),this.addEventListener=t},It.prototype.removeEventListener=It.prototype.off=function(s,n){Nt(this,s,n)},It.prototype.one=function(s,n){var t=this.addEventListener;this.addEventListener=function(){},ia(this,s,n),this.addEventListener=t},It.prototype.any=function(s,n){var t=this.addEventListener;this.addEventListener=function(){},Xu(this,s,n),this.addEventListener=t},It.prototype.dispatchEvent=It.prototype.trigger=function(s){var n=s.type||s;"string"==typeof s&&(s={type:n}),s=ea(s),this.allowedEvents_[n]&&this["on"+n]&&this["on"+n](s),Fr(this,s)},It.prototype.queueTrigger=function(s){var n=this;_n||(_n=new Map);var t=s.type||s,i=_n.get(this);i||_n.set(this,i=new Map);var e=i.get(t);i.delete(t),P().clearTimeout(e);var r=P().setTimeout(function(){0===i.size&&(i=null,_n.delete(n)),n.trigger(s)},0);i.set(t,r)};var ra=function(n){return"function"==typeof n.name?n.name():"string"==typeof n.name?n.name:n.name_?n.name_:n.constructor&&n.constructor.name?n.constructor.name:typeof n},Mi=function(n){return n instanceof It||!!n.eventBusEl_&&["on","one","off","trigger"].every(function(t){return"function"==typeof n[t]})},Is=function(n){return"string"==typeof n&&/\S/.test(n)||Array.isArray(n)&&!!n.length},na=function(n,t,i){if(!n||!n.nodeName&&!Mi(n))throw new Error("Invalid target for "+ra(t)+"#"+i+"; must be a DOM node or evented object.")},Ju=function(n,t,i){if(!Is(n))throw new Error("Invalid event type for "+ra(t)+"#"+i+"; must be a non-empty string or array.")},el=function(n,t,i){if("function"!=typeof n)throw new Error("Invalid listener for "+ra(t)+"#"+i+"; must be a function.")},Ds=function(n,t,i){var r,a,o,e=t.length<3||t[0]===n||t[0]===n.eventBusEl_;return e?(r=n.eventBusEl_,t.length>=3&&t.shift(),a=t[0],o=t[1]):(r=t[0],a=t[1],o=t[2]),na(r,n,i),Ju(a,n,i),el(o,n,i),{isTargetingSelf:e,target:r,type:a,listener:o=at(n,o)}},sr=function(n,t,i,e){na(n,n,t),n.nodeName?Nh[t](n,i,e):n[t](i,e)},Bh={on:function(){for(var n=this,t=arguments.length,i=new Array(t),e=0;e=0;i--)this.children_[i].dispose&&this.children_[i].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),this.el_=null),this.player_=null}},n.isDisposed=function(){return Boolean(this.isDisposed_)},n.player=function(){return this.player_},n.options=function(i){return i?(this.options_=ct(this.options_,i),this.options_):this.options_},n.el=function(){return this.el_},n.createEl=function(i,e,r){return Ye(i,e,r)},n.localize=function(i,e,r){void 0===r&&(r=i);var a=this.player_.language&&this.player_.language(),o=this.player_.languages&&this.player_.languages(),l=o&&o[a],d=a&&a.split("-")[0],f=o&&o[d],v=r;return l&&l[i]?v=l[i]:f&&f[i]&&(v=f[i]),e&&(v=v.replace(/\{(\d+)\}/g,function(g,T){var E=e[T-1],x=E;return typeof E>"u"&&(x=g),x})),v},n.handleLanguagechange=function(){},n.contentEl=function(){return this.contentEl_||this.el_},n.id=function(){return this.id_},n.name=function(){return this.name_},n.children=function(){return this.children_},n.getChildById=function(i){return this.childIndex_[i]},n.getChild=function(i){if(i)return this.childNameIndex_[i]},n.getDescendant=function(){for(var i=arguments.length,e=new Array(i),r=0;r=0;r--)if(this.children_[r]===i){e=!0,this.children_.splice(r,1);break}if(e){i.parentComponent_=null,this.childIndex_[i.id()]=null,this.childNameIndex_[bt(i.name())]=null,this.childNameIndex_[aa(i.name())]=null;var a=i.el();a&&a.parentNode===this.contentEl()&&this.contentEl().removeChild(i.el())}}},n.initChildren=function(){var i=this,e=this.options_.children;if(e){var o,r=this.options_,l=s.getComponent("Tech");(o=Array.isArray(e)?e:Object.keys(e)).concat(Object.keys(this.options_).filter(function(d){return!o.some(function(f){return"string"==typeof f?d===f:d===f.name})})).map(function(d){var f,v;return"string"==typeof d?v=e[f=d]||i.options_[f]||{}:(f=d.name,v=d),{name:f,opts:v}}).filter(function(d){var f=s.getComponent(d.opts.componentClass||bt(d.name));return f&&!l.isTech(f)}).forEach(function(f){var v=f.name,g=f.opts;if(void 0!==r[v]&&(g=r[v]),!1!==g){!0===g&&(g={}),g.playerOptions=i.options_.playerOptions;var T=i.addChild(v,g);T&&(i[v]=T)}})}},n.buildCSSClass=function(){return""},n.ready=function(i,e){if(void 0===e&&(e=!1),i){if(!this.isReady_)return this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(i);e?i.call(this):this.setTimeout(i,1)}},n.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var i=this.readyQueue_;this.readyQueue_=[],i&&i.length>0&&i.forEach(function(e){e.call(this)},this),this.trigger("ready")},1)},n.$=function(i,e){return Gi(i,e||this.contentEl())},n.$$=function(i,e){return Gu(i,e||this.contentEl())},n.hasClass=function(i){return ar(this.el_,i)},n.addClass=function(i){Oi(this.el_,i)},n.removeClass=function(i){mn(this.el_,i)},n.toggleClass=function(i,e){Uu(this.el_,i,e)},n.show=function(){this.removeClass("vjs-hidden")},n.hide=function(){this.addClass("vjs-hidden")},n.lockShowing=function(){this.addClass("vjs-lock-showing")},n.unlockShowing=function(){this.removeClass("vjs-lock-showing")},n.getAttribute=function(i){return Bu(this.el_,i)},n.setAttribute=function(i,e){Nr(this.el_,i,e)},n.removeAttribute=function(i){Xn(this.el_,i)},n.width=function(i,e){return this.dimension("width",i,e)},n.height=function(i,e){return this.dimension("height",i,e)},n.dimensions=function(i,e){this.width(i,!0),this.height(e)},n.dimension=function(i,e,r){if(void 0!==e)return(null===e||e!=e)&&(e=0),this.el_.style[i]=-1!==(""+e).indexOf("%")||-1!==(""+e).indexOf("px")?e:"auto"===e?"":e+"px",void(r||this.trigger("componentresize"));if(!this.el_)return 0;var a=this.el_.style[i],o=a.indexOf("px");return parseInt(-1!==o?a.slice(0,o):this.el_["offset"+bt(i)],10)},n.currentDimension=function(i){var e=0;if("width"!==i&&"height"!==i)throw new Error("currentDimension only accepts width or height value");if(e=fn(this.el_,i),0===(e=parseFloat(e))||isNaN(e)){var r="offset"+bt(i);e=this.el_[r]}return e},n.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},n.currentWidth=function(){return this.currentDimension("width")},n.currentHeight=function(){return this.currentDimension("height")},n.focus=function(){this.el_.focus()},n.blur=function(){this.el_.blur()},n.handleKeyDown=function(i){this.player_&&(De().isEventKey(i,"Tab")||i.stopPropagation(),this.player_.handleKeyDown(i))},n.handleKeyPress=function(i){this.handleKeyDown(i)},n.emitTapEvents=function(){var o,i=0,e=null;this.on("touchstart",function(d){1===d.touches.length&&(e={pageX:d.touches[0].pageX,pageY:d.touches[0].pageY},i=P().performance.now(),o=!0)}),this.on("touchmove",function(d){if(d.touches.length>1)o=!1;else if(e){var f=d.touches[0].pageX-e.pageX,v=d.touches[0].pageY-e.pageY;Math.sqrt(f*f+v*v)>10&&(o=!1)}});var l=function(){o=!1};this.on("touchleave",l),this.on("touchcancel",l),this.on("touchend",function(d){e=null,!0===o&&P().performance.now()-i<200&&(d.preventDefault(),this.trigger("tap"))})},n.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e,i=at(this.player(),this.player().reportUserActivity);this.on("touchstart",function(){i(),this.clearInterval(e),e=this.setInterval(i,250)});var r=function(o){i(),this.clearInterval(e)};this.on("touchmove",i),this.on("touchend",r),this.on("touchcancel",r)}},n.setTimeout=function(i,e){var a,r=this;return i=at(this,i),this.clearTimersOnDispose_(),a=P().setTimeout(function(){r.setTimeoutIds_.has(a)&&r.setTimeoutIds_.delete(a),i()},e),this.setTimeoutIds_.add(a),a},n.clearTimeout=function(i){return this.setTimeoutIds_.has(i)&&(this.setTimeoutIds_.delete(i),P().clearTimeout(i)),i},n.setInterval=function(i,e){i=at(this,i),this.clearTimersOnDispose_();var r=P().setInterval(i,e);return this.setIntervalIds_.add(r),r},n.clearInterval=function(i){return this.setIntervalIds_.has(i)&&(this.setIntervalIds_.delete(i),P().clearInterval(i)),i},n.requestAnimationFrame=function(i){var r,e=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),i=at(this,i),r=P().requestAnimationFrame(function(){e.rafIds_.has(r)&&e.rafIds_.delete(r),i()}),this.rafIds_.add(r),r):this.setTimeout(i,1e3/60)},n.requestNamedAnimationFrame=function(i,e){var r=this;if(!this.namedRafs_.has(i)){this.clearTimersOnDispose_(),e=at(this,e);var a=this.requestAnimationFrame(function(){e(),r.namedRafs_.has(i)&&r.namedRafs_.delete(i)});return this.namedRafs_.set(i,a),i}},n.cancelNamedAnimationFrame=function(i){!this.namedRafs_.has(i)||(this.cancelAnimationFrame(this.namedRafs_.get(i)),this.namedRafs_.delete(i))},n.cancelAnimationFrame=function(i){return this.supportsRaf_?(this.rafIds_.has(i)&&(this.rafIds_.delete(i),P().cancelAnimationFrame(i)),i):this.clearTimeout(i)},n.clearTimersOnDispose_=function(){var i=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",function(){[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(function(e){var a=e[1];i[e[0]].forEach(function(o,l){return i[a](l)})}),i.clearingTimersOnDispose_=!1}))},s.registerComponent=function(i,e){if("string"!=typeof i||!i)throw new Error('Illegal component name, "'+i+'"; must be a non-empty string.');var r=s.getComponent("Tech"),a=r&&r.isTech(e),o=s===e||s.prototype.isPrototypeOf(e.prototype);if(a||!o)throw new Error('Illegal component, "'+i+'"; '+(a?"techs must be registered using Tech.registerTech()":"must be a Component subclass")+".");i=bt(i),s.components_||(s.components_={});var d=s.getComponent("Player");if("Player"===i&&d&&d.players){var f=d.players,v=Object.keys(f);if(f&&v.length>0&&v.map(function(g){return f[g]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return s.components_[i]=e,s.components_[aa(i)]=e,e},s.getComponent=function(i){if(i&&s.components_)return s.components_[i]},s}();function il(s,n,t,i){return function Gh(s,n,t){if("number"!=typeof n||n<0||n>t)throw new Error("Failed to execute '"+s+"' on 'TimeRanges': The index provided ("+n+") is non-numeric or out of bounds (0-"+t+").")}(s,i,t.length-1),t[i][n]}function Ls(s){var n;return n=void 0===s||0===s.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:s.length,start:il.bind(null,"start",0,s),end:il.bind(null,"end",1,s)},P().Symbol&&P().Symbol.iterator&&(n[P().Symbol.iterator]=function(){return(s||[]).values()}),n}function or(s,n){return Array.isArray(s)?Ls(s):void 0===s||void 0===n?Ls():Ls([[s,n]])}function rl(s,n){var i,e,t=0;if(!n)return 0;(!s||!s.length)&&(s=or(0,0));for(var r=0;rn&&(e=n),t+=e-i;return t/n}function qt(s){if(s instanceof qt)return s;"number"==typeof s?this.code=s:"string"==typeof s?this.message=s:Ii(s)&&("number"==typeof s.code&&(this.code=s.code),_t(this,s)),this.message||(this.message=qt.defaultMessages[this.code]||"")}Y.prototype.supportsRaf_="function"==typeof P().requestAnimationFrame&&"function"==typeof P().cancelAnimationFrame,Y.registerComponent("Component",Y),qt.prototype.code=0,qt.prototype.message="",qt.prototype.status=null,qt.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],qt.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var Br=0;Br=0;r--)if(i[r].enabled){Ns(i,i[r]);break}return(e=s.call(this,i)||this).changing_=!1,e}re(n,s);var t=n.prototype;return t.addTrack=function(e){var r=this;e.enabled&&Ns(this,e),s.prototype.addTrack.call(this,e),e.addEventListener&&(e.enabledChange_=function(){r.changing_||(r.changing_=!0,Ns(r,e),r.changing_=!1,r.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))},t.removeTrack=function(e){s.prototype.removeTrack.call(this,e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)},n}(Hr),Us=function(n,t){for(var i=0;i=0;r--)if(i[r].selected){Us(i,i[r]);break}return(e=s.call(this,i)||this).changing_=!1,Object.defineProperty(Ue(e),"selectedIndex",{get:function(){for(var o=0;o0&&(P().console&&P().console.groupCollapsed&&P().console.groupCollapsed("Text Track parsing errors for "+t.src),e.forEach(function(r){return Ke.error(r)}),P().console&&P().console.groupEnd&&P().console.groupEnd()),i.flush()},dl=function(n,t){var i={uri:n},e=sa(n);e&&(i.cors=e);var r="use-credentials"===t.tech_.crossOrigin();r&&(i.withCredentials=r),ki()(i,at(this,function(a,o,l){if(a)return Ke.error(a,o);t.loaded_=!0,"function"!=typeof P().WebVTT?t.tech_&&t.tech_.any(["vttjsloaded","vttjserror"],function(d){if("vttjserror"!==d.type)return ll(l,t);Ke.error("vttjs failed to load, stopping trying to process "+t.src)}):ll(l,t)}))},Tn=function(s){function n(i){var e;if(void 0===i&&(i={}),!i.tech)throw new Error("A tech was not provided.");var r=ct(i,{kind:ep[i.kind]||"subtitles",language:i.language||i.srclang||""}),a=ol[r.mode]||"disabled",o=r.default;("metadata"===r.kind||"chapters"===r.kind)&&(a="hidden"),(e=s.call(this,r)||this).tech_=r.tech,e.cues_=[],e.activeCues_=[],e.preload_=!1!==e.tech_.preloadTextTracks;var l=new sl(e.cues_),d=new sl(e.activeCues_),f=!1,v=at(Ue(e),function(){!this.tech_.isReady_||this.tech_.isDisposed()||(this.activeCues=this.activeCues,f&&(this.trigger("cuechange"),f=!1))});return e.tech_.one("dispose",function(){e.tech_.off("timeupdate",v)}),"disabled"!==a&&e.tech_.on("timeupdate",v),Object.defineProperties(Ue(e),{default:{get:function(){return o},set:function(){}},mode:{get:function(){return a},set:function(E){!ol[E]||a!==E&&(a=E,!this.preload_&&"disabled"!==a&&0===this.cues.length&&dl(this.src,this),this.tech_.off("timeupdate",v),"disabled"!==a&&this.tech_.on("timeupdate",v),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?l:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return d;for(var E=this.tech_.currentTime(),x=[],S=0,U=this.cues.length;S=E||F.startTime===F.endTime&&F.startTime<=E&&F.startTime+.5>=E)&&x.push(F)}if(f=!1,x.length!==this.activeCues_.length)f=!0;else for(var j=0;j0)return void this.trigger("vttjsloaded");var r=z().createElement("script");r.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",r.onload=function(){e.trigger("vttjsloaded")},r.onerror=function(){e.trigger("vttjserror")},this.on("dispose",function(){r.onload=null,r.onerror=null}),P().WebVTT=!0,this.el().parentNode.appendChild(r)}else this.ready(this.addWebVttScript_)},t.emulateTextTracks=function(){var e=this,r=this.textTracks(),a=this.remoteTextTracks(),o=function(g){return r.addTrack(g.track)},l=function(g){return r.removeTrack(g.track)};a.on("addtrack",o),a.on("removetrack",l),this.addWebVttScript_();var d=function(){return e.trigger("texttrackchange")},f=function(){d();for(var g=0;g=0;e--){var r=s[e];r[n]&&r[n](i,t)}}(s,t,o,a),o}var dp={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},cp={setCurrentTime:1,setMuted:1,setVolume:1},gl={play:1,pause:1};function Vs(s){return function(n,t){return n===oa?oa:t[s]?t[s](n):n}}function lr(s,n,t,i,e,r){void 0===s&&(s={}),void 0===n&&(n=[]),void 0===e&&(e=[]),void 0===r&&(r=!1);var o=n[0],l=n.slice(1);if("string"==typeof o)lr(s,ur[o],t,i,e,r);else if(o){var d=function pp(s,n){var t=Hs[s.id()],i=null;if(null==t)return i=n(s),Hs[s.id()]=[[n,i]],i;for(var e=0;e0;this.player_.tech(!0)&&!((pn||hn)&&r)&&this.player_.tech(!0).focus(),this.player_.paused()?yi(this.player_.play()):this.player_.pause()}},n}(la);Y.registerComponent("PosterImage",yp);var ni="#222",Tp={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function qs(s,n){var t;if(4===s.length)t=s[1]+s[1]+s[2]+s[2]+s[3]+s[3];else{if(7!==s.length)throw new Error("Invalid color code provided, "+s+"; must be formatted as e.g. #f0e or #f604e2.");t=s.slice(1)}return"rgba("+parseInt(t.slice(0,2),16)+","+parseInt(t.slice(2,4),16)+","+parseInt(t.slice(4,6),16)+","+n+")"}function Ws(s,n,t){try{s.style[n]=t}catch{return}}var bp=function(s){function n(i,e,r){var a;a=s.call(this,i,e,r)||this;var o=function(d){return a.updateDisplay(d)};return i.on("loadstart",function(l){return a.toggleDisplay(l)}),i.on("texttrackchange",o),i.on("loadedmetadata",function(l){return a.preselectTrack(l)}),i.ready(at(Ue(a),function(){if(i.tech_&&i.tech_.featuresNativeTextTracks)this.hide();else{i.on("fullscreenchange",o),i.on("playerresize",o),P().addEventListener("orientationchange",o),i.on("dispose",function(){return P().removeEventListener("orientationchange",o)});for(var l=this.options_.playerOptions.tracks||[],d=0;d0;return yi(r),void(this.player_.tech(!0)&&(!pn&&!hn||!a)&&this.player_.tech(!0).focus())}var o=this.player_.getChild("controlBar"),l=o&&o.getChild("playToggle");if(l){var d=function(){return l.focus()};yn(r)?r.then(d,function(){}):this.setTimeout(d,1)}else this.player_.tech(!0).focus()},t.handleKeyDown=function(e){this.mouseused_=!1,s.prototype.handleKeyDown.call(this,e)},t.handleMouseDown=function(e){this.mouseused_=!0},n}(hi);yl.prototype.controlText_="Play Video",Y.registerComponent("BigPlayButton",yl);var Sp=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).controlText(e&&e.controlText||r.localize("Close")),r}re(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-close-button "+s.prototype.buildCSSClass.call(this)},t.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},t.handleKeyDown=function(e){De().isEventKey(e,"Esc")?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):s.prototype.handleKeyDown.call(this,e)},n}(hi);Y.registerComponent("CloseButton",Sp);var Tl=function(s){function n(i,e){var r;return void 0===e&&(e={}),r=s.call(this,i,e)||this,e.replay=void 0===e.replay||e.replay,r.on(i,"play",function(a){return r.handlePlay(a)}),r.on(i,"pause",function(a){return r.handlePause(a)}),e.replay&&r.on(i,"ended",function(a){return r.handleEnded(a)}),r}re(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-play-control "+s.prototype.buildCSSClass.call(this)},t.handleClick=function(e){this.player_.paused()?yi(this.player_.play()):this.player_.pause()},t.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},t.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},t.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},t.handleEnded=function(e){var r=this;this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",function(a){return r.handleSeeked(a)})},n}(hi);Tl.prototype.controlText_="Play",Y.registerComponent("PlayToggle",Tl);var bl=function(n,t){n=n<0?0:n;var i=Math.floor(n%60),e=Math.floor(n/60%60),r=Math.floor(n/3600),a=Math.floor(t/60%60),o=Math.floor(t/3600);return(isNaN(n)||n===1/0)&&(r=e=i="-"),(r=r>0||o>0?r+":":"")+(e=((r||a>=10)&&e<10?"0"+e:e)+":")+(i<10?"0"+i:i)},Gs=bl;function Wr(s,n){return void 0===n&&(n=s),Gs(s,n)}var Gr=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).on(i,["timeupdate","ended"],function(a){return r.updateContent(a)}),r.updateTextNode_(),r}re(n,s);var t=n.prototype;return t.createEl=function(){var e=this.buildCSSClass(),r=s.prototype.createEl.call(this,"div",{className:e+" vjs-time-control vjs-control"}),a=Ye("span",{className:"vjs-control-text",textContent:this.localize(this.labelText_)+"\xa0"},{role:"presentation"});return r.appendChild(a),this.contentEl_=Ye("span",{className:e+"-display"},{"aria-live":"off",role:"presentation"}),r.appendChild(this.contentEl_),r},t.dispose=function(){this.contentEl_=null,this.textNode_=null,s.prototype.dispose.call(this)},t.updateTextNode_=function(e){var r=this;void 0===e&&(e=0),e=Wr(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",function(){if(r.contentEl_){var a=r.textNode_;a&&r.contentEl_.firstChild!==a&&(a=null,Ke.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),r.textNode_=z().createTextNode(r.formattedTime_),r.textNode_&&(a?r.contentEl_.replaceChild(r.textNode_,a):r.contentEl_.appendChild(r.textNode_))}}))},t.updateContent=function(e){},n}(Y);Gr.prototype.labelText_="Time",Gr.prototype.controlText_="Time",Y.registerComponent("TimeDisplay",Gr);var Zs=function(s){function n(){return s.apply(this,arguments)||this}re(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-current-time"},t.updateContent=function(e){var r;r=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(r)},n}(Gr);Zs.prototype.labelText_="Current Time",Zs.prototype.controlText_="Current Time",Y.registerComponent("CurrentTimeDisplay",Zs);var Ks=function(s){function n(i,e){var r,a=function(l){return r.updateContent(l)};return(r=s.call(this,i,e)||this).on(i,"durationchange",a),r.on(i,"loadstart",a),r.on(i,"loadedmetadata",a),r}re(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-duration"},t.updateContent=function(e){var r=this.player_.duration();this.updateTextNode_(r)},n}(Gr);Ks.prototype.labelText_="Duration",Ks.prototype.controlText_="Duration",Y.registerComponent("DurationDisplay",Ks);var kp=function(s){function n(){return s.apply(this,arguments)||this}return re(n,s),n.prototype.createEl=function(){var e=s.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),r=s.prototype.createEl.call(this,"div"),a=s.prototype.createEl.call(this,"span",{textContent:"/"});return r.appendChild(a),e.appendChild(r),e},n}(Y);Y.registerComponent("TimeDivider",kp);var zs=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).on(i,"durationchange",function(a){return r.updateContent(a)}),r}re(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-remaining-time"},t.createEl=function(){var e=s.prototype.createEl.call(this);return!1!==this.options_.displayNegative&&e.insertBefore(Ye("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e},t.updateContent=function(e){var r;"number"==typeof this.player_.duration()&&(r=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(r))},n}(Gr);zs.prototype.labelText_="Remaining Time",zs.prototype.controlText_="Remaining Time",Y.registerComponent("RemainingTimeDisplay",zs);var Ap=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).updateShowing(),r.on(r.player(),"durationchange",function(a){return r.updateShowing(a)}),r}re(n,s);var t=n.prototype;return t.createEl=function(){var e=s.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=Ye("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(Ye("span",{className:"vjs-control-text",textContent:this.localize("Stream Type")+"\xa0"})),this.contentEl_.appendChild(z().createTextNode(this.localize("LIVE"))),e.appendChild(this.contentEl_),e},t.dispose=function(){this.contentEl_=null,s.prototype.dispose.call(this)},t.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},n}(Y);Y.registerComponent("LiveDisplay",Ap);var xl=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).updateLiveEdgeStatus(),r.player_.liveTracker&&(r.updateLiveEdgeStatusHandler_=function(a){return r.updateLiveEdgeStatus(a)},r.on(r.player_.liveTracker,"liveedgechange",r.updateLiveEdgeStatusHandler_)),r}re(n,s);var t=n.prototype;return t.createEl=function(){var e=s.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=Ye("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e},t.updateLiveEdgeStatus=function(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))},t.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},t.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,s.prototype.dispose.call(this)},n}(hi);xl.prototype.controlText_="Seek to live, currently playing live",Y.registerComponent("SeekToLive",xl);var da=function(n,t,i){return n=Number(n),Math.min(i,Math.max(t,isNaN(n)?t:n))},Ys=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).handleMouseDown_=function(a){return r.handleMouseDown(a)},r.handleMouseUp_=function(a){return r.handleMouseUp(a)},r.handleKeyDown_=function(a){return r.handleKeyDown(a)},r.handleClick_=function(a){return r.handleClick(a)},r.handleMouseMove_=function(a){return r.handleMouseMove(a)},r.update_=function(a){return r.update(a)},r.bar=r.getChild(r.options_.barName),r.vertical(!!r.options_.vertical),r.enable(),r}re(n,s);var t=n.prototype;return t.enabled=function(){return this.enabled_},t.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},t.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},t.createEl=function(e,r,a){return void 0===r&&(r={}),void 0===a&&(a={}),r.className=r.className+" vjs-slider",r=_t({tabIndex:0},r),a=_t({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},a),s.prototype.createEl.call(this,e,r,a)},t.handleMouseDown=function(e){var r=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"===e.type&&!Pi&&e.preventDefault(),ju(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(r,"mousemove",this.handleMouseMove_),this.on(r,"mouseup",this.handleMouseUp_),this.on(r,"touchmove",this.handleMouseMove_),this.on(r,"touchend",this.handleMouseUp_),this.handleMouseMove(e,!0)},t.handleMouseMove=function(e){},t.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;Hu(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.update()},t.update=function(){var e=this;if(this.el_&&this.bar){var r=this.getProgress();return r===this.progress_||(this.progress_=r,this.requestNamedAnimationFrame("Slider#update",function(){var a=e.vertical()?"height":"width";e.bar.el().style[a]=(100*r).toFixed(2)+"%"})),r}},t.getProgress=function(){return Number(da(this.getPercent(),0,1).toFixed(4))},t.calculateDistance=function(e){var r=Jn(this.el_,e);return this.vertical()?r.y:r.x},t.handleKeyDown=function(e){De().isEventKey(e,"Left")||De().isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepBack()):De().isEventKey(e,"Right")||De().isEventKey(e,"Up")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):s.prototype.handleKeyDown.call(this,e)},t.handleClick=function(e){e.stopPropagation(),e.preventDefault()},t.vertical=function(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.addClass(this.vertical_?"vjs-slider-vertical":"vjs-slider-horizontal")},n}(Y);Y.registerComponent("Slider",Ys);var $s=function(n,t){return da(n/t*100,0,100).toFixed(2)+"%"},wp=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).partEls_=[],r.on(i,"progress",function(a){return r.update(a)}),r}re(n,s);var t=n.prototype;return t.createEl=function(){var e=s.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),r=Ye("span",{className:"vjs-control-text"}),a=Ye("span",{textContent:this.localize("Loaded")}),o=z().createTextNode(": ");return this.percentageEl_=Ye("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(r),r.appendChild(a),r.appendChild(o),r.appendChild(this.percentageEl_),e},t.dispose=function(){this.partEls_=null,this.percentageEl_=null,s.prototype.dispose.call(this)},t.update=function(e){var r=this;this.requestNamedAnimationFrame("LoadProgressBar#update",function(){var a=r.player_.liveTracker,o=r.player_.buffered(),l=a&&a.isLive()?a.seekableEnd():r.player_.duration(),d=r.player_.bufferedEnd(),f=r.partEls_,v=$s(d,l);r.percent_!==v&&(r.el_.style.width=v,nr(r.percentageEl_,v),r.percent_=v);for(var g=0;go.length;S--)r.el_.removeChild(f[S-1]);f.length=o.length})},n}(Y);Y.registerComponent("LoadProgressBar",wp);var Ip=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).update=Ri(at(Ue(r),r.update),30),r}re(n,s);var t=n.prototype;return t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},t.update=function(e,r,a){var o=gn(this.el_),l=Ur(this.player_.el()),d=e.width*r;if(l&&o){var f=e.left-l.left+d,v=e.width-d+(l.right-e.right),g=o.width/2;fo.width&&(g=o.width),g=Math.round(g),this.el_.style.right="-"+g+"px",this.write(a)}},t.write=function(e){nr(this.el_,e)},t.updateTime=function(e,r,a,o){var l=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",function(){var d,f=l.player_.duration();if(l.player_.liveTracker&&l.player_.liveTracker.isLive()){var v=l.player_.liveTracker.liveWindow(),g=v-r*v;d=(g<1?"":"-")+Wr(g,v)}else d=Wr(a,f);l.update(e,r,d),o&&o()})},n}(Y);Y.registerComponent("TimeTooltip",Ip);var Qs=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).update=Ri(at(Ue(r),r.update),30),r}re(n,s);var t=n.prototype;return t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},t.update=function(e,r){var a=this.getChild("timeTooltip");if(a){var o=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();a.updateTime(e,r,o)}},n}(Y);Qs.prototype.options_={children:[]},!Ht&&!Di&&Qs.prototype.options_.children.push("timeTooltip"),Y.registerComponent("PlayProgressBar",Qs);var Sl=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).update=Ri(at(Ue(r),r.update),30),r}re(n,s);var t=n.prototype;return t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},t.update=function(e,r){var a=this,o=r*this.player_.duration();this.getChild("timeTooltip").updateTime(e,r,o,function(){a.el_.style.left=e.width*r+"px"})},n}(Y);Sl.prototype.options_={children:["timeTooltip"]},Y.registerComponent("MouseTimeDisplay",Sl);var Xs=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).setEventHandlers_(),r}re(n,s);var t=n.prototype;return t.setEventHandlers_=function(){var e=this;this.update_=at(this,this.update),this.update=Ri(this.update_,30),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=function(r){return e.enableInterval_(r)},this.disableIntervalHandler_=function(r){return e.disableInterval_(r)},this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in z()&&"visibilityState"in z()&&this.on(z(),"visibilitychange",this.toggleVisibility_)},t.toggleVisibility_=function(e){"hidden"===z().visibilityState?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(!this.player_.ended()&&!this.player_.paused()&&this.enableInterval_(),this.update())},t.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,30))},t.disableInterval_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type||!this.updateInterval||(this.clearInterval(this.updateInterval),this.updateInterval=null)},t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},t.update=function(e){var r=this;if("hidden"!==z().visibilityState){var a=s.prototype.update.call(this);return this.requestNamedAnimationFrame("SeekBar#update",function(){var o=r.player_.ended()?r.player_.duration():r.getCurrentTime_(),l=r.player_.liveTracker,d=r.player_.duration();l&&l.isLive()&&(d=r.player_.liveTracker.liveCurrentTime()),r.percent_!==a&&(r.el_.setAttribute("aria-valuenow",(100*a).toFixed(2)),r.percent_=a),(r.currentTime_!==o||r.duration_!==d)&&(r.el_.setAttribute("aria-valuetext",r.localize("progress bar timing: currentTime={1} duration={2}",[Wr(o,d),Wr(d,d)],"{1} of {2}")),r.currentTime_=o,r.duration_=d),r.bar&&r.bar.update(Ur(r.el()),r.getProgress())}),a}},t.userSeek_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)},t.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},t.getPercent=function(){var r,e=this.getCurrentTime_(),a=this.player_.liveTracker;return a&&a.isLive()?(r=(e-a.seekableStart())/a.liveWindow(),a.atLiveEdge()&&(r=1)):r=e/this.player_.duration(),r},t.handleMouseDown=function(e){!vn(e)||(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),s.prototype.handleMouseDown.call(this,e))},t.handleMouseMove=function(e,r){if(void 0===r&&(r=!1),vn(e)){!r&&!this.player_.scrubbing()&&this.player_.scrubbing(!0);var a,o=this.calculateDistance(e),l=this.player_.liveTracker;if(l&&l.isLive()){if(o>=.99)return void l.seekToLiveEdge();var d=l.seekableStart(),f=l.liveCurrentTime();if((a=d+o*l.liveWindow())>=f&&(a=f),a<=d&&(a=d+.1),a===1/0)return}else(a=o*this.player_.duration())===this.player_.duration()&&(a-=.1);this.userSeek_(a)}},t.enable=function(){s.prototype.enable.call(this);var e=this.getChild("mouseTimeDisplay");!e||e.show()},t.disable=function(){s.prototype.disable.call(this);var e=this.getChild("mouseTimeDisplay");!e||e.hide()},t.handleMouseUp=function(e){s.prototype.handleMouseUp.call(this,e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?yi(this.player_.play()):this.update_()},t.stepForward=function(){this.userSeek_(this.player_.currentTime()+5)},t.stepBack=function(){this.userSeek_(this.player_.currentTime()-5)},t.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.handleKeyDown=function(e){var r=this.player_.liveTracker;if(De().isEventKey(e,"Space")||De().isEventKey(e,"Enter"))e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(De().isEventKey(e,"Home"))e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(De().isEventKey(e,"End"))e.preventDefault(),e.stopPropagation(),r&&r.isLive()?this.userSeek_(r.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(De()(e))){e.preventDefault(),e.stopPropagation();var a=10*(De().codes[De()(e)]-De().codes[0])/100;r&&r.isLive()?this.userSeek_(r.seekableStart()+r.liveWindow()*a):this.userSeek_(this.player_.duration()*a)}else De().isEventKey(e,"PgDn")?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-60)):De().isEventKey(e,"PgUp")?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+60)):s.prototype.handleKeyDown.call(this,e)},t.dispose=function(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in z()&&"visibilityState"in z()&&this.off(z(),"visibilitychange",this.toggleVisibility_),s.prototype.dispose.call(this)},n}(Ys);Xs.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},!Ht&&!Di&&Xs.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Y.registerComponent("SeekBar",Xs);var Cl=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).handleMouseMove=Ri(at(Ue(r),r.handleMouseMove),30),r.throttledHandleMouseSeek=Ri(at(Ue(r),r.handleMouseSeek),30),r.handleMouseUpHandler_=function(a){return r.handleMouseUp(a)},r.handleMouseDownHandler_=function(a){return r.handleMouseDown(a)},r.enable(),r}re(n,s);var t=n.prototype;return t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},t.handleMouseMove=function(e){var r=this.getChild("seekBar");if(r){var a=r.getChild("playProgressBar"),o=r.getChild("mouseTimeDisplay");if(a||o){var l=r.el(),d=gn(l),f=Jn(l,e).x;f=da(f,0,1),o&&o.update(d,f),a&&a.update(d,r.getProgress())}}},t.handleMouseSeek=function(e){var r=this.getChild("seekBar");r&&r.handleMouseMove(e)},t.enabled=function(){return this.enabled_},t.disable=function(){if(this.children().forEach(function(r){return r.disable&&r.disable()}),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,"mousemove",this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){var e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&yi(this.player_.play())}},t.enable=function(){this.children().forEach(function(e){return e.enable&&e.enable()}),!this.enabled()&&(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},t.removeListenersAddedOnMousedownAndTouchstart=function(){var e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)},t.handleMouseDown=function(e){var r=this.el_.ownerDocument,a=this.getChild("seekBar");a&&a.handleMouseDown(e),this.on(r,"mousemove",this.throttledHandleMouseSeek),this.on(r,"touchmove",this.throttledHandleMouseSeek),this.on(r,"mouseup",this.handleMouseUpHandler_),this.on(r,"touchend",this.handleMouseUpHandler_)},t.handleMouseUp=function(e){var r=this.getChild("seekBar");r&&r.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()},n}(Y);Cl.prototype.options_={children:["seekBar"]},Y.registerComponent("ProgressControl",Cl);var kl=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).on(i,["enterpictureinpicture","leavepictureinpicture"],function(a){return r.handlePictureInPictureChange(a)}),r.on(i,["disablepictureinpicturechanged","loadedmetadata"],function(a){return r.handlePictureInPictureEnabledChange(a)}),r.disable(),r}re(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-picture-in-picture-control "+s.prototype.buildCSSClass.call(this)},t.handlePictureInPictureEnabledChange=function(){z().pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()?this.enable():this.disable()},t.handlePictureInPictureChange=function(e){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture"),this.handlePictureInPictureEnabledChange()},t.handleClick=function(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},n}(hi);kl.prototype.controlText_="Picture-in-Picture",Y.registerComponent("PictureInPictureToggle",kl);var Al=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).on(i,"fullscreenchange",function(a){return r.handleFullscreenChange(a)}),!1===z()[i.fsApi_.fullscreenEnabled]&&r.disable(),r}re(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-fullscreen-control "+s.prototype.buildCSSClass.call(this)},t.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},t.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},n}(hi);Al.prototype.controlText_="Fullscreen",Y.registerComponent("FullscreenToggle",Al);var Pp=function(s){function n(){return s.apply(this,arguments)||this}return re(n,s),n.prototype.createEl=function(){var e=s.prototype.createEl.call(this,"div",{className:"vjs-volume-level"});return e.appendChild(s.prototype.createEl.call(this,"span",{className:"vjs-control-text"})),e},n}(Y);Y.registerComponent("VolumeLevel",Pp);var Op=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).update=Ri(at(Ue(r),r.update),30),r}re(n,s);var t=n.prototype;return t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})},t.update=function(e,r,a,o){if(!a){var l=Ur(this.el_),d=Ur(this.player_.el()),f=e.width*r;if(!d||!l)return;var v=e.left-d.left+f,g=e.width-f+(d.right-e.right),T=l.width/2;vl.width&&(T=l.width),this.el_.style.right="-"+T+"px"}this.write(o+"%")},t.write=function(e){nr(this.el_,e)},t.updateVolume=function(e,r,a,o,l){var d=this;this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",function(){d.update(e,r,a,o.toFixed(0)),l&&l()})},n}(Y);Y.registerComponent("VolumeLevelTooltip",Op);var wl=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).update=Ri(at(Ue(r),r.update),30),r}re(n,s);var t=n.prototype;return t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},t.update=function(e,r,a){var o=this,l=100*r;this.getChild("volumeLevelTooltip").updateVolume(e,r,a,l,function(){a?o.el_.style.bottom=e.height*r+"px":o.el_.style.left=e.width*r+"px"})},n}(Y);wl.prototype.options_={children:["volumeLevelTooltip"]},Y.registerComponent("MouseVolumeLevelDisplay",wl);var fa=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).on("slideractive",function(a){return r.updateLastVolume_(a)}),r.on(i,"volumechange",function(a){return r.updateARIAAttributes(a)}),i.ready(function(){return r.updateARIAAttributes()}),r}re(n,s);var t=n.prototype;return t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},t.handleMouseDown=function(e){!vn(e)||s.prototype.handleMouseDown.call(this,e)},t.handleMouseMove=function(e){var r=this.getChild("mouseVolumeLevelDisplay");if(r){var a=this.el(),o=Ur(a),l=this.vertical(),d=Jn(a,e);d=da(d=l?d.y:d.x,0,1),r.update(o,d,l)}!vn(e)||(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},t.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},t.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},t.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},t.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},t.updateARIAAttributes=function(e){var r=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",r),this.el_.setAttribute("aria-valuetext",r+"%")},t.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},t.updateLastVolume_=function(){var e=this,r=this.player_.volume();this.one("sliderinactive",function(){0===e.player_.volume()&&e.player_.lastVolume_(r)})},n}(Ys);fa.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},!Ht&&!Di&&fa.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),fa.prototype.playerEvent="volumechange",Y.registerComponent("VolumeBar",fa);var Il=function(s){function n(i,e){var r;return void 0===e&&(e={}),e.vertical=e.vertical||!1,(typeof e.volumeBar>"u"||cn(e.volumeBar))&&(e.volumeBar=e.volumeBar||{},e.volumeBar.vertical=e.vertical),function(n,t){t.tech_&&!t.tech_.featuresVolumeControl&&n.addClass("vjs-hidden"),n.on(t,"loadstart",function(){t.tech_.featuresVolumeControl?n.removeClass("vjs-hidden"):n.addClass("vjs-hidden")})}(Ue(r=s.call(this,i,e)||this),i),r.throttledHandleMouseMove=Ri(at(Ue(r),r.handleMouseMove),30),r.handleMouseUpHandler_=function(a){return r.handleMouseUp(a)},r.on("mousedown",function(a){return r.handleMouseDown(a)}),r.on("touchstart",function(a){return r.handleMouseDown(a)}),r.on("mousemove",function(a){return r.handleMouseMove(a)}),r.on(r.volumeBar,["focus","slideractive"],function(){r.volumeBar.addClass("vjs-slider-active"),r.addClass("vjs-slider-active"),r.trigger("slideractive")}),r.on(r.volumeBar,["blur","sliderinactive"],function(){r.volumeBar.removeClass("vjs-slider-active"),r.removeClass("vjs-slider-active"),r.trigger("sliderinactive")}),r}re(n,s);var t=n.prototype;return t.createEl=function(){var e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),s.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+e})},t.handleMouseDown=function(e){var r=this.el_.ownerDocument;this.on(r,"mousemove",this.throttledHandleMouseMove),this.on(r,"touchmove",this.throttledHandleMouseMove),this.on(r,"mouseup",this.handleMouseUpHandler_),this.on(r,"touchend",this.handleMouseUpHandler_)},t.handleMouseUp=function(e){var r=this.el_.ownerDocument;this.off(r,"mousemove",this.throttledHandleMouseMove),this.off(r,"touchmove",this.throttledHandleMouseMove),this.off(r,"mouseup",this.handleMouseUpHandler_),this.off(r,"touchend",this.handleMouseUpHandler_)},t.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},n}(Y);Il.prototype.options_={children:["volumeBar"]},Y.registerComponent("VolumeControl",Il);var Dl=function(s){function n(i,e){var r;return function(n,t){t.tech_&&!t.tech_.featuresMuteControl&&n.addClass("vjs-hidden"),n.on(t,"loadstart",function(){t.tech_.featuresMuteControl?n.removeClass("vjs-hidden"):n.addClass("vjs-hidden")})}(Ue(r=s.call(this,i,e)||this),i),r.on(i,["loadstart","volumechange"],function(a){return r.update(a)}),r}re(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-mute-control "+s.prototype.buildCSSClass.call(this)},t.handleClick=function(e){var r=this.player_.volume(),a=this.player_.lastVolume_();0===r?(this.player_.volume(a<.1?.1:a),this.player_.muted(!1)):this.player_.muted(!this.player_.muted())},t.update=function(e){this.updateIcon_(),this.updateControlText_()},t.updateIcon_=function(){var e=this.player_.volume(),r=3;Ht&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?r=0:e<.33?r=1:e<.67&&(r=2);for(var a=0;a<4;a++)mn(this.el_,"vjs-vol-"+a);Oi(this.el_,"vjs-vol-"+r)},t.updateControlText_=function(){var r=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==r&&this.controlText(r)},n}(hi);Dl.prototype.controlText_="Mute",Y.registerComponent("MuteToggle",Dl);var Pl=function(s){function n(i,e){var r;return void 0===e&&(e={}),e.inline=!(typeof e.inline<"u")||e.inline,(typeof e.volumeControl>"u"||cn(e.volumeControl))&&(e.volumeControl=e.volumeControl||{},e.volumeControl.vertical=!e.inline),(r=s.call(this,i,e)||this).handleKeyPressHandler_=function(a){return r.handleKeyPress(a)},r.on(i,["loadstart"],function(a){return r.volumePanelState_(a)}),r.on(r.muteToggle,"keyup",function(a){return r.handleKeyPress(a)}),r.on(r.volumeControl,"keyup",function(a){return r.handleVolumeControlKeyUp(a)}),r.on("keydown",function(a){return r.handleKeyPress(a)}),r.on("mouseover",function(a){return r.handleMouseOver(a)}),r.on("mouseout",function(a){return r.handleMouseOut(a)}),r.on(r.volumeControl,["slideractive"],r.sliderActive_),r.on(r.volumeControl,["sliderinactive"],r.sliderInactive_),r}re(n,s);var t=n.prototype;return t.sliderActive_=function(){this.addClass("vjs-slider-active")},t.sliderInactive_=function(){this.removeClass("vjs-slider-active")},t.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},t.createEl=function(){var e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),s.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+e})},t.dispose=function(){this.handleMouseOut(),s.prototype.dispose.call(this)},t.handleVolumeControlKeyUp=function(e){De().isEventKey(e,"Esc")&&this.muteToggle.focus()},t.handleMouseOver=function(e){this.addClass("vjs-hover"),Xt(z(),"keyup",this.handleKeyPressHandler_)},t.handleMouseOut=function(e){this.removeClass("vjs-hover"),Nt(z(),"keyup",this.handleKeyPressHandler_)},t.handleKeyPress=function(e){De().isEventKey(e,"Esc")&&this.handleMouseOut()},n}(Y);Pl.prototype.options_={children:["muteToggle","volumeControl"]},Y.registerComponent("VolumePanel",Pl);var Ol=function(s){function n(i,e){var r;return r=s.call(this,i,e)||this,e&&(r.menuButton_=e.menuButton),r.focusedChild_=-1,r.on("keydown",function(a){return r.handleKeyDown(a)}),r.boundHandleBlur_=function(a){return r.handleBlur(a)},r.boundHandleTapClick_=function(a){return r.handleTapClick(a)},r}re(n,s);var t=n.prototype;return t.addEventListenerForItem=function(e){e instanceof Y&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},t.removeEventListenerForItem=function(e){e instanceof Y&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))},t.removeChild=function(e){"string"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),s.prototype.removeChild.call(this,e)},t.addItem=function(e){var r=this.addChild(e);r&&this.addEventListenerForItem(r)},t.createEl=function(){this.contentEl_=Ye(this.options_.contentElType||"ul",{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var r=s.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return r.appendChild(this.contentEl_),Xt(r,"click",function(a){a.preventDefault(),a.stopImmediatePropagation()}),r},t.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,s.prototype.dispose.call(this)},t.handleBlur=function(e){var r=e.relatedTarget||z().activeElement;if(!this.children().some(function(o){return o.el()===r})){var a=this.menuButton_;a&&a.buttonPressed_&&r!==a.el().firstChild&&a.unpressButton()}},t.handleTapClick=function(e){if(this.menuButton_){this.menuButton_.unpressButton();var r=this.children();if(!Array.isArray(r))return;var a=r.filter(function(o){return o.el()===e.target})[0];if(!a)return;"CaptionSettingsMenuItem"!==a.name()&&this.menuButton_.focus()}},t.handleKeyDown=function(e){De().isEventKey(e,"Left")||De().isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(De().isEventKey(e,"Right")||De().isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())},t.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},t.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},t.focus=function(e){void 0===e&&(e=0);var r=this.children().slice();r.length&&r[0].hasClass("vjs-menu-title")&&r.shift(),r.length>0&&(e<0?e=0:e>=r.length&&(e=r.length-1),this.focusedChild_=e,r[e].el_.focus())},n}(Y);Y.registerComponent("Menu",Ol);var Js=function(s){function n(i,e){var r;void 0===e&&(e={}),(r=s.call(this,i,e)||this).menuButton_=new hi(i,e),r.menuButton_.controlText(r.controlText_),r.menuButton_.el_.setAttribute("aria-haspopup","true");var a=hi.prototype.buildCSSClass();r.menuButton_.el_.className=r.buildCSSClass()+" "+a,r.menuButton_.removeClass("vjs-control"),r.addChild(r.menuButton_),r.update(),r.enabled_=!0;var o=function(d){return r.handleClick(d)};return r.handleMenuKeyUp_=function(l){return r.handleMenuKeyUp(l)},r.on(r.menuButton_,"tap",o),r.on(r.menuButton_,"click",o),r.on(r.menuButton_,"keydown",function(l){return r.handleKeyDown(l)}),r.on(r.menuButton_,"mouseenter",function(){r.addClass("vjs-hover"),r.menu.show(),Xt(z(),"keyup",r.handleMenuKeyUp_)}),r.on("mouseleave",function(l){return r.handleMouseLeave(l)}),r.on("keydown",function(l){return r.handleSubmenuKeyDown(l)}),r}re(n,s);var t=n.prototype;return t.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},t.createMenu=function(){var e=new Ol(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var r=Ye("li",{className:"vjs-menu-title",textContent:bt(this.options_.title),tabIndex:-1}),a=new Y(this.player_,{el:r});e.addItem(a)}if(this.items=this.createItems(),this.items)for(var o=0;o-1&&"showing"===d.mode){a=!1;break}}a!==this.isSelected_&&this.selected(a)},t.handleSelectedLanguageChange=function(e){for(var r=this.player().textTracks(),a=!0,o=0,l=r.length;o-1&&"showing"===d.mode){a=!1;break}}a&&(this.player_.cache_.selectedLanguage={enabled:!1})},n}(xn);Y.registerComponent("OffTextTrackMenuItem",Ll);var Zr=function(s){function n(i,e){return void 0===e&&(e={}),e.tracks=i.textTracks(),s.call(this,i,e)||this}return re(n,s),n.prototype.createItems=function(e,r){var a;void 0===e&&(e=[]),void 0===r&&(r=xn),this.label_&&(a=this.label_+" off"),e.push(new Ll(this.player_,{kinds:this.kinds_,kind:this.kind_,label:a})),this.hideThreshold_+=1;var o=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var l=0;l-1){var f=new r(this.player_,{track:d,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});f.addClass("vjs-"+d.kind+"-menu-item"),e.push(f)}}return e},n}(eo);Y.registerComponent("TextTrackButton",Zr);var Rl=function(s){function n(i,e){var r,a=e.track,o=e.cue,l=i.currentTime();return e.selectable=!0,e.multiSelectable=!1,e.label=o.text,e.selected=o.startTime<=l&&l=0;r--){var a=e[r];if(a.kind===this.kind_)return a}},t.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(bt(this.kind_))},t.createMenu=function(){return this.options_.title=this.getMenuCaption(),s.prototype.createMenu.call(this)},t.createItems=function(){var e=[];if(!this.track_)return e;var r=this.track_.cues;if(!r)return e;for(var a=0,o=r.length;a-1&&(r.label_="captions"),r.menuButton_.controlText(bt(r.label_)),r}re(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-subs-caps-button "+s.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+s.prototype.buildWrapperCSSClass.call(this)},t.createItems=function(){var e=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(e.push(new no(this.player_,{kind:this.label_})),this.hideThreshold_+=1),s.prototype.createItems.call(this,e,Ml)},n}(Zr);so.prototype.kinds_=["captions","subtitles"],so.prototype.controlText_="Subtitles",Y.registerComponent("SubsCapsButton",so);var Nl=function(s){function n(i,e){var r,a=e.track,o=i.audioTracks();e.label=a.label||a.language||"Unknown",e.selected=a.enabled,(r=s.call(this,i,e)||this).track=a,r.addClass("vjs-"+a.kind+"-menu-item");var l=function(){for(var f=arguments.length,v=new Array(f),g=0;g=0;a--)r.push(new oo(this.player(),{rate:e[a]+"x"}));return r},t.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},t.handleClick=function(e){var r=this.player().playbackRate(),a=this.playbackRates(),l=(a.indexOf(r)+1)%a.length;this.player().playbackRate(a[l])},t.handlePlaybackRateschange=function(e){this.update()},t.playbackRates=function(){var e=this.player();return e.playbackRates&&e.playbackRates()||[]},t.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},t.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},t.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")},n}(Js);Fl.prototype.controlText_="Playback Rate",Y.registerComponent("PlaybackRateMenuButton",Fl);var Bl=function(s){function n(){return s.apply(this,arguments)||this}re(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-spacer "+s.prototype.buildCSSClass.call(this)},t.createEl=function(e,r,a){return void 0===e&&(e="div"),void 0===r&&(r={}),void 0===a&&(a={}),r.className||(r.className=this.buildCSSClass()),s.prototype.createEl.call(this,e,r,a)},n}(Y);Y.registerComponent("Spacer",Bl);var Mp=function(s){function n(){return s.apply(this,arguments)||this}re(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-custom-control-spacer "+s.prototype.buildCSSClass.call(this)},t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),textContent:"\xa0"})},n}(Bl);Y.registerComponent("CustomControlSpacer",Mp);var ha=function(s){function n(){return s.apply(this,arguments)||this}return re(n,s),n.prototype.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},n}(Y);ha.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture"in z()&&ha.prototype.options_.children.splice(ha.prototype.options_.children.length-1,0,"pictureInPictureToggle"),Y.registerComponent("ControlBar",ha);var jl=function(s){function n(i,e){var r;return(r=s.call(this,i,e)||this).on(i,"error",function(a){return r.open(a)}),r}re(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-error-display "+s.prototype.buildCSSClass.call(this)},t.content=function(){var e=this.player().error();return e?this.localize(e.message):""},n}(jr);jl.prototype.options_=gt({},jr.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),Y.registerComponent("ErrorDisplay",jl);var uo="vjs-text-track-settings",Hl=["#000","Black"],Vl=["#00F","Blue"],ql=["#0FF","Cyan"],Wl=["#0F0","Green"],Gl=["#F0F","Magenta"],Zl=["#F00","Red"],Kl=["#FFF","White"],zl=["#FF0","Yellow"],lo=["1","Opaque"],co=["0.5","Semi-Transparent"],Yl=["0","Transparent"],dr={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Hl,Kl,Zl,Wl,Vl,zl,Gl,ql]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[lo,co,Yl]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Kl,Hl,Zl,Wl,Vl,zl,Gl,ql]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(n){return"1.00"===n?null:Number(n)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[lo,co]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[Yl,co,lo]}};function $l(s,n){if(n&&(s=n(s)),s&&"none"!==s)return s}dr.windowColor.options=dr.backgroundColor.options;var Fp=function(s){function n(i,e){var r;return e.temporary=!1,(r=s.call(this,i,e)||this).updateDisplay=r.updateDisplay.bind(Ue(r)),r.fill(),r.hasBeenOpened_=r.hasBeenFilled_=!0,r.endDialog=Ye("p",{className:"vjs-control-text",textContent:r.localize("End of dialog window.")}),r.el().appendChild(r.endDialog),r.setDefaults(),void 0===e.persistTextTrackSettings&&(r.options_.persistTextTrackSettings=r.options_.playerOptions.persistTextTrackSettings),r.on(r.$(".vjs-done-button"),"click",function(){r.saveSettings(),r.close()}),r.on(r.$(".vjs-default-button"),"click",function(){r.setDefaults(),r.updateDisplay()}),Or(dr,function(a){r.on(r.$(a.selector),"change",r.updateDisplay)}),r.options_.persistTextTrackSettings&&r.restoreSettings(),r}re(n,s);var t=n.prototype;return t.dispose=function(){this.endDialog=null,s.prototype.dispose.call(this)},t.createElSelect_=function(e,r,a){var o=this;void 0===r&&(r=""),void 0===a&&(a="label");var l=dr[e],d=l.id.replace("%s",this.id_),f=[r,d].join(" ").trim();return["<"+a+' id="'+d+'" class="'+("label"===a?"vjs-label":"")+'">',this.localize(l.label),"",'").join("")},t.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['
','',this.localize("Text"),"",this.createElSelect_("color",e),'',this.createElSelect_("textOpacity",e),"","
"].join("")},t.createElBgColor_=function(){var e="captions-background-"+this.id_;return['
','',this.localize("Background"),"",this.createElSelect_("backgroundColor",e),'',this.createElSelect_("backgroundOpacity",e),"","
"].join("")},t.createElWinColor_=function(){var e="captions-window-"+this.id_;return['
','',this.localize("Window"),"",this.createElSelect_("windowColor",e),'',this.createElSelect_("windowOpacity",e),"","
"].join("")},t.createElColors_=function(){return Ye("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},t.createElFont_=function(){return Ye("div",{className:"vjs-track-settings-font",innerHTML:['
',this.createElSelect_("fontPercent","","legend"),"
",'
',this.createElSelect_("edgeStyle","","legend"),"
",'
',this.createElSelect_("fontFamily","","legend"),"
"].join("")})},t.createElControls_=function(){var e=this.localize("restore all settings to the default values");return Ye("div",{className:"vjs-track-settings-controls",innerHTML:['",'"].join("")})},t.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},t.label=function(){return this.localize("Caption Settings Dialog")},t.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},t.buildCSSClass=function(){return s.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},t.getValues=function(){var e=this;return function kh(s,n,t){return void 0===t&&(t=0),ku(s).reduce(function(i,e){return n(i,s[e],e)},t)}(dr,function(r,a,o){var l=function Np(s,n){return $l(s.options[s.options.selectedIndex].value,n)}(e.$(a.selector),a.parser);return void 0!==l&&(r[o]=l),r},{})},t.setValues=function(e){var r=this;Or(dr,function(a,o){!function Up(s,n,t){if(n)for(var i=0;ithis.options_.liveTolerance;(!this.timeupdateSeen_||o===1/0)&&(d=!1),d!==this.behindLiveEdge_&&(this.behindLiveEdge_=d,this.trigger("liveedgechange"))}},t.handleDurationchange=function(){this.toggleTracking()},t.toggleTracking=function(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())},t.startTracking=function(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,30),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))},t.handleFirstTimeupdate=function(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)},t.handleSeeked=function(){var e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()},t.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)},t.reset_=function(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)},t.nextSeekedFromUser=function(){this.nextSeekedFromUser_=!0},t.stopTracking=function(){!this.isTracking()||(this.reset_(),this.trigger("liveedgechange"))},t.seekableEnd=function(){for(var e=this.player_.seekable(),r=[],a=e?e.length:0;a--;)r.push(e.end(a));return r.length?r.sort()[r.length-1]:1/0},t.seekableStart=function(){for(var e=this.player_.seekable(),r=[],a=e?e.length:0;a--;)r.push(e.start(a));return r.length?r.sort()[0]:0},t.liveWindow=function(){var e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()},t.isLive=function(){return this.isTracking()},t.atLiveEdge=function(){return!this.behindLiveEdge()},t.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},t.pastSeekEnd=function(){var e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_},t.behindLiveEdge=function(){return this.behindLiveEdge_},t.isTracking=function(){return"number"==typeof this.trackingInterval_},t.seekToLiveEdge=function(){this.seekedBehindLive_=!1,!this.atLiveEdge()&&(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))},t.dispose=function(){this.off(z(),"visibilitychange",this.handleVisibilityChange_),this.stopTracking(),s.prototype.dispose.call(this)},n}(Y);Y.registerComponent("LiveTracker",Hp);var pa,fo=function(n){var t=n.el();if(t.hasAttribute("src"))return n.triggerSourceset(t.src),!0;var i=n.$$("source"),e=[],r="";if(!i.length)return!1;for(var a=0;a=2&&l.push("loadeddata"),e.readyState>=3&&l.push("canplay"),e.readyState>=4&&l.push("canplaythrough"),this.ready(function(){l.forEach(function(d){this.trigger(d)},this)})}},t.setScrubbing=function(e){this.isScrubbing_=e},t.scrubbing=function(){return this.isScrubbing_},t.setCurrentTime=function(e){try{this.isScrubbing_&&this.el_.fastSeek&&Qn?this.el_.fastSeek(e):this.el_.currentTime=e}catch(r){Ke(r,"Video is not ready. (Video.js)")}},t.duration=function(){var e=this;return this.el_.duration===1/0&&Di&&Pi&&0===this.el_.currentTime?(this.on("timeupdate",function a(){e.el_.currentTime>0&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",a))}),NaN):this.el_.duration||NaN},t.width=function(){return this.el_.offsetWidth},t.height=function(){return this.el_.offsetHeight},t.proxyWebkitFullscreen_=function(){var e=this;if("webkitDisplayingFullscreen"in this.el_){var r=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},a=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",r),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",a),this.on("dispose",function(){e.off("webkitbeginfullscreen",a),e.off("webkitendfullscreen",r)})}},t.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var e=P().navigator&&P().navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},t.enterFullScreen=function(){var e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)yi(this.el_.play()),this.setTimeout(function(){e.pause();try{e.webkitEnterFullScreen()}catch(r){this.trigger("fullscreenerror",r)}},0);else try{e.webkitEnterFullScreen()}catch(r){this.trigger("fullscreenerror",r)}},t.exitFullScreen=function(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))},t.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()},t.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},t.reset=function(){n.resetMediaElement(this.el_)},t.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},t.setControls=function(e){this.el_.controls=!!e},t.addTextTrack=function(e,r,a){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,r,a):s.prototype.addTextTrack.call(this,e,r,a)},t.createRemoteTextTrack=function(e){if(!this.featuresNativeTextTracks)return s.prototype.createRemoteTextTrack.call(this,e);var r=z().createElement("track");return e.kind&&(r.kind=e.kind),e.label&&(r.label=e.label),(e.language||e.srclang)&&(r.srclang=e.language||e.srclang),e.default&&(r.default=e.default),e.id&&(r.id=e.id),e.src&&(r.src=e.src),r},t.addRemoteTextTrack=function(e,r){var a=s.prototype.addRemoteTextTrack.call(this,e,r);return this.featuresNativeTextTracks&&this.el().appendChild(a),a},t.removeRemoteTextTrack=function(e){if(s.prototype.removeRemoteTextTrack.call(this,e),this.featuresNativeTextTracks)for(var r=this.$$("track"),a=r.length;a--;)(e===r[a]||e===r[a].track)&&this.el().removeChild(r[a])},t.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var e={};return typeof this.el().webkitDroppedFrameCount<"u"&&typeof this.el().webkitDecodedFrameCount<"u"&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),P().performance&&"function"==typeof P().performance.now?e.creationTime=P().performance.now():P().performance&&P().performance.timing&&"number"==typeof P().performance.timing.navigationStart&&(e.creationTime=P().Date.now()-P().performance.timing.navigationStart),e},n}(st);ho(be,"TEST_VID",function(){if(Rr()){var s=z().createElement("video"),n=z().createElement("track");return n.kind="captions",n.srclang="en",n.label="English",s.appendChild(n),s}}),be.isSupported=function(){try{be.TEST_VID.volume=.5}catch{return!1}return!(!be.TEST_VID||!be.TEST_VID.canPlayType)},be.canPlayType=function(s){return be.TEST_VID.canPlayType(s)},be.canPlaySource=function(s,n){return be.canPlayType(s.type)},be.canControlVolume=function(){try{var s=be.TEST_VID.volume;be.TEST_VID.volume=s/2+.1;var n=s!==be.TEST_VID.volume;return n&&Ht?(P().setTimeout(function(){be&&be.prototype&&(be.prototype.featuresVolumeControl=s!==be.TEST_VID.volume)}),!1):n}catch{return!1}},be.canMuteVolume=function(){try{var s=be.TEST_VID.muted;return be.TEST_VID.muted=!s,be.TEST_VID.muted?Nr(be.TEST_VID,"muted","muted"):Xn(be.TEST_VID,"muted"),s!==be.TEST_VID.muted}catch{return!1}},be.canControlPlaybackRate=function(){if(Di&&Pi&&Pu<58)return!1;try{var s=be.TEST_VID.playbackRate;return be.TEST_VID.playbackRate=s/2+.1,s!==be.TEST_VID.playbackRate}catch{return!1}},be.canOverrideAttributes=function(){try{var s=function(){};Object.defineProperty(z().createElement("video"),"src",{get:s,set:s}),Object.defineProperty(z().createElement("audio"),"src",{get:s,set:s}),Object.defineProperty(z().createElement("video"),"innerHTML",{get:s,set:s}),Object.defineProperty(z().createElement("audio"),"innerHTML",{get:s,set:s})}catch{return!1}return!0},be.supportsNativeTextTracks=function(){return Qn||Ht&&Pi},be.supportsNativeVideoTracks=function(){return!(!be.TEST_VID||!be.TEST_VID.videoTracks)},be.supportsNativeAudioTracks=function(){return!(!be.TEST_VID||!be.TEST_VID.audioTracks)},be.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach(function(s){var t=s[1];ho(be.prototype,s[0],function(){return be[t]()},!0)}),be.prototype.featuresVolumeControl=be.canControlVolume(),be.prototype.movingMediaElementInDOM=!Ht,be.prototype.featuresFullscreenResize=!0,be.prototype.featuresProgressEvents=!0,be.prototype.featuresTimeupdateEvents=!0,be.patchCanPlayType=function(){_s>=4&&!Du&&!Pi&&(pa=be.TEST_VID&&be.TEST_VID.constructor.prototype.canPlayType,be.TEST_VID.constructor.prototype.canPlayType=function(s){return s&&/^application\/(?:x-|vnd\.apple\.)mpegurl/i.test(s)?"maybe":pa.call(this,s)})},be.unpatchCanPlayType=function(){var s=be.TEST_VID.constructor.prototype.canPlayType;return pa&&(be.TEST_VID.constructor.prototype.canPlayType=pa),s},be.patchCanPlayType(),be.disposeMediaElement=function(s){if(s){for(s.parentNode&&s.parentNode.removeChild(s);s.hasChildNodes();)s.removeChild(s.firstChild);s.removeAttribute("src"),"function"==typeof s.load&&function(){try{s.load()}catch{}}()}},be.resetMediaElement=function(s){if(s){for(var n=s.querySelectorAll("source"),t=n.length;t--;)s.removeChild(n[t]);s.removeAttribute("src"),"function"==typeof s.load&&function(){try{s.load()}catch{}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(s){be.prototype[s]=function(){return this.el_[s]||this.el_.hasAttribute(s)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(s){be.prototype["set"+bt(s)]=function(n){this.el_[s]=n,n?this.el_.setAttribute(s,s):this.el_.removeAttribute(s)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach(function(s){be.prototype[s]=function(){return this.el_[s]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(s){be.prototype["set"+bt(s)]=function(n){this.el_[s]=n}}),["pause","load","play"].forEach(function(s){be.prototype[s]=function(){return this.el_[s]()}}),st.withSourceHandlers(be),be.nativeSourceHandler={},be.nativeSourceHandler.canPlayType=function(s){try{return be.TEST_VID.canPlayType(s)}catch{return""}},be.nativeSourceHandler.canHandleSource=function(s,n){if(s.type)return be.nativeSourceHandler.canPlayType(s.type);if(s.src){var t=js(s.src);return be.nativeSourceHandler.canPlayType("video/"+t)}return""},be.nativeSourceHandler.handleSource=function(s,n,t){n.setSrc(s.src)},be.nativeSourceHandler.dispose=function(){},be.registerSourceHandler(be.nativeSourceHandler),st.registerTech("Html5",be);var Jl=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],po={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},mo=["tiny","xsmall","small","medium","large","xlarge","huge"],ma={};mo.forEach(function(s){var n="x"===s.charAt(0)?"x-"+s.substring(1):s;ma[s]="vjs-layout-"+n});var Kp={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},Et=function(s){function n(i,e,r){var a;if(i.id=i.id||e.id||"vjs_video_"+Zi(),(e=_t(n.getTagSettings(i),e)).initChildren=!1,e.createEl=!1,e.evented=!1,e.reportTouchActivity=!1,!e.language)if("function"==typeof i.closest){var o=i.closest("[lang]");o&&o.getAttribute&&(e.language=o.getAttribute("lang"))}else for(var l=i;l&&1===l.nodeType;){if(Li(l).hasOwnProperty("lang")){e.language=l.getAttribute("lang");break}l=l.parentNode}if((a=s.call(this,null,e,r)||this).boundDocumentFullscreenChange_=function(g){return a.documentFullscreenChange_(g)},a.boundFullWindowOnEscKey_=function(g){return a.fullWindowOnEscKey(g)},a.boundUpdateStyleEl_=function(g){return a.updateStyleEl_(g)},a.boundApplyInitTime_=function(g){return a.applyInitTime_(g)},a.boundUpdateCurrentBreakpoint_=function(g){return a.updateCurrentBreakpoint_(g)},a.boundHandleTechClick_=function(g){return a.handleTechClick_(g)},a.boundHandleTechDoubleClick_=function(g){return a.handleTechDoubleClick_(g)},a.boundHandleTechTouchStart_=function(g){return a.handleTechTouchStart_(g)},a.boundHandleTechTouchMove_=function(g){return a.handleTechTouchMove_(g)},a.boundHandleTechTouchEnd_=function(g){return a.handleTechTouchEnd_(g)},a.boundHandleTechTap_=function(g){return a.handleTechTap_(g)},a.isFullscreen_=!1,a.log=Cu(a.id_),a.fsApi_=Kn,a.isPosterFromTech_=!1,a.queuedCallbacks_=[],a.isReady_=!1,a.hasStarted_=!1,a.userActive_=!1,a.debugEnabled_=!1,!a.options_||!a.options_.techOrder||!a.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(a.tag=i,a.tagAttributes=i&&Li(i),a.language(a.options_.language),e.languages){var d={};Object.getOwnPropertyNames(e.languages).forEach(function(g){d[g.toLowerCase()]=e.languages[g]}),a.languages_=d}else a.languages_=n.prototype.options_.languages;a.resetCache_(),a.poster_=e.poster||"",a.controls_=!!e.controls,i.controls=!1,i.removeAttribute("controls"),a.changingSrc_=!1,a.playCallbacks_=[],a.playTerminatedQueue_=[],i.hasAttribute("autoplay")?a.autoplay(!0):a.autoplay(a.options_.autoplay),e.plugins&&Object.keys(e.plugins).forEach(function(g){if("function"!=typeof a[g])throw new Error('plugin "'+g+'" does not exist')}),a.scrubbing_=!1,a.el_=a.createEl(),Ps(Ue(a),{eventBusKey:"el_"}),a.fsApi_.requestFullscreen&&(Xt(z(),a.fsApi_.fullscreenchange,a.boundDocumentFullscreenChange_),a.on(a.fsApi_.fullscreenchange,a.boundDocumentFullscreenChange_)),a.fluid_&&a.on(["playerreset","resize"],a.boundUpdateStyleEl_);var f=ct(a.options_);e.plugins&&Object.keys(e.plugins).forEach(function(g){a[g](e.plugins[g])}),e.debug&&a.debug(!0),a.options_.playerOptions=f,a.middleware_=[],a.playbackRates(e.playbackRates),a.initChildren(),a.isAudio("audio"===i.nodeName.toLowerCase()),a.controls()?a.addClass("vjs-controls-enabled"):a.addClass("vjs-controls-disabled"),a.el_.setAttribute("role","region"),a.isAudio()?a.el_.setAttribute("aria-label",a.localize("Audio Player")):a.el_.setAttribute("aria-label",a.localize("Video Player")),a.isAudio()&&a.addClass("vjs-audio"),a.flexNotSupported_()&&a.addClass("vjs-no-flex"),Lr&&a.addClass("vjs-touch-enabled"),Ht||a.addClass("vjs-workinghover"),n.players[a.id_]=Ue(a);var v="7.18.1".split(".")[0];return a.addClass("vjs-v"+v),a.userActive(!0),a.reportUserActivity(),a.one("play",function(g){return a.listenForUserActivity_(g)}),a.on("stageclick",function(g){return a.handleStageClick_(g)}),a.on("keydown",function(g){return a.handleKeyDown(g)}),a.on("languagechange",function(g){return a.handleLanguagechange(g)}),a.breakpoints(a.options_.breakpoints),a.responsive(a.options_.responsive),a}re(n,s);var t=n.prototype;return t.dispose=function(){var e=this;this.trigger("dispose"),this.off("dispose"),Nt(z(),this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),Nt(z(),"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),n.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),function hp(s){Hs[s.id()]=null}(this),Wt.names.forEach(function(r){var o=e[Wt[r].getterName]();o&&o.off&&o.off()}),s.prototype.dispose.call(this)},t.createEl=function(){var r,e=this.tag,a=this.playerElIngest_=e.parentNode&&e.parentNode.hasAttribute&&e.parentNode.hasAttribute("data-vjs-player"),o="video-js"===this.tag.tagName.toLowerCase();a?r=this.el_=e.parentNode:o||(r=this.el_=s.prototype.createEl.call(this,"div"));var l=Li(e);if(o){for(r=this.el_=e,e=this.tag=z().createElement("video");r.children.length;)e.appendChild(r.firstChild);ar(r,"video-js")||Oi(r,"video-js"),r.appendChild(e),a=this.playerElIngest_=r,Object.keys(r).forEach(function(E){try{e[E]=r[E]}catch{}})}if(e.setAttribute("tabindex","-1"),l.tabindex="-1",(pn||Pi&&Ou)&&(e.setAttribute("role","application"),l.role="application"),e.removeAttribute("width"),e.removeAttribute("height"),"width"in l&&delete l.width,"height"in l&&delete l.height,Object.getOwnPropertyNames(l).forEach(function(E){o&&"class"===E||r.setAttribute(E,l[E]),o&&e.setAttribute(E,l[E])}),e.playerId=e.id,e.id+="_html5_api",e.className="vjs-tech",e.player=r.player=this,this.addClass("vjs-paused"),!0!==P().VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=zu("vjs-styles-dimensions");var d=Gi(".vjs-styles-defaults"),f=Gi("head");f.insertBefore(this.styleEl_,d?d.nextSibling:f.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);for(var v=e.getElementsByTagName("a"),g=0;g0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),g=v[1]/v[0];o=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/g:this.videoWidth()||300,l=void 0!==this.height_?this.height_:o*g,f=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(f),Yu(this.styleEl_,"\n ."+f+" {\n width: "+o+"px;\n height: "+l+"px;\n }\n\n ."+f+".vjs-fluid {\n padding-top: "+100*g+"%;\n }\n ")}else{var e="number"==typeof this.width_?this.width_:this.options_.width,r="number"==typeof this.height_?this.height_:this.options_.height,a=this.tech_&&this.tech_.el();a&&(e>=0&&(a.width=e),r>=0&&(a.height=r))}},t.loadTech_=function(e,r){var a=this;this.tech_&&this.unloadTech_();var o=bt(e),l=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==o&&this.tag&&(st.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=o,this.isReady_=!1;var d=this.autoplay();("string"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(d=!1);var f={source:r,autoplay:d,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+l+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset,Promise:this.options_.Promise};Wt.names.forEach(function(g){var T=Wt[g];f[T.getterName]=a[T.privateName]}),_t(f,this.options_[o]),_t(f,this.options_[l]),_t(f,this.options_[e.toLowerCase()]),this.tag&&(f.tag=this.tag),r&&r.src===this.cache_.src&&this.cache_.currentTime>0&&(f.startTime=this.cache_.currentTime);var v=st.getTech(e);if(!v)throw new Error("No Tech named '"+o+"' exists! '"+o+"' should be registered using videojs.registerTech()'");this.tech_=new v(f),this.tech_.ready(at(this,this.handleTechReady_),!0),function(n,t){n.forEach(function(i){var e=t.addRemoteTextTrack(i).track;!i.src&&i.cues&&i.cues.forEach(function(r){return e.addCue(r)})}),t.textTracks()}(this.textTracksJson_||[],this.tech_),Jl.forEach(function(g){a.on(a.tech_,g,function(T){return a["handleTech"+bt(g)+"_"](T)})}),Object.keys(po).forEach(function(g){a.on(a.tech_,g,function(T){0===a.tech_.playbackRate()&&a.tech_.seeking()?a.queuedCallbacks_.push({callback:a["handleTech"+po[g]+"_"].bind(a),event:T}):a["handleTech"+po[g]+"_"](T)})}),this.on(this.tech_,"loadstart",function(g){return a.handleTechLoadStart_(g)}),this.on(this.tech_,"sourceset",function(g){return a.handleTechSourceset_(g)}),this.on(this.tech_,"waiting",function(g){return a.handleTechWaiting_(g)}),this.on(this.tech_,"ended",function(g){return a.handleTechEnded_(g)}),this.on(this.tech_,"seeking",function(g){return a.handleTechSeeking_(g)}),this.on(this.tech_,"play",function(g){return a.handleTechPlay_(g)}),this.on(this.tech_,"firstplay",function(g){return a.handleTechFirstPlay_(g)}),this.on(this.tech_,"pause",function(g){return a.handleTechPause_(g)}),this.on(this.tech_,"durationchange",function(g){return a.handleTechDurationChange_(g)}),this.on(this.tech_,"fullscreenchange",function(g,T){return a.handleTechFullscreenChange_(g,T)}),this.on(this.tech_,"fullscreenerror",function(g,T){return a.handleTechFullscreenError_(g,T)}),this.on(this.tech_,"enterpictureinpicture",function(g){return a.handleTechEnterPictureInPicture_(g)}),this.on(this.tech_,"leavepictureinpicture",function(g){return a.handleTechLeavePictureInPicture_(g)}),this.on(this.tech_,"error",function(g){return a.handleTechError_(g)}),this.on(this.tech_,"posterchange",function(g){return a.handleTechPosterChange_(g)}),this.on(this.tech_,"textdata",function(g){return a.handleTechTextData_(g)}),this.on(this.tech_,"ratechange",function(g){return a.handleTechRateChange_(g)}),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode!==this.el()&&("Html5"!==o||!this.tag)&&xs(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},t.unloadTech_=function(){var e=this;Wt.names.forEach(function(r){var a=Wt[r];e[a.privateName]=e[a.getterName]()}),this.textTracksJson_=function(n){var t=n.$$("track"),i=Array.prototype.map.call(t,function(r){return r.track});return Array.prototype.map.call(t,function(r){var a=Rs(r.track);return r.src&&(a.src=r.src),a}).concat(Array.prototype.filter.call(n.textTracks(),function(r){return-1===i.indexOf(r)}).map(Rs))}(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},t.tech=function(e){return void 0===e&&Ke.warn("Using the tech directly can be dangerous. I hope you know what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"),this.tech_},t.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)},t.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)},t.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},t.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?"play":this.autoplay())},t.manualAutoplay_=function(e){var r=this;if(this.tech_&&"string"==typeof e){var o,a=function(){var d=r.muted();r.muted(!0);var f=function(){r.muted(d)};r.playTerminatedQueue_.push(f);var v=r.play();if(yn(v))return v.catch(function(g){throw f(),new Error("Rejection at manualAutoplay. Restoring muted value. "+(g||""))})};if("any"!==e||this.muted()?o="muted"!==e||this.muted()?this.play():a():yn(o=this.play())&&(o=o.catch(a)),yn(o))return o.then(function(){r.trigger({type:"autoplay-success",autoplay:e})}).catch(function(){r.trigger({type:"autoplay-failure",autoplay:e})})}},t.updateSourceCaches_=function(e){void 0===e&&(e="");var r=e,a="";"string"!=typeof r&&(r=e.src,a=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],r&&!a&&(a=function(n,t){if(!t)return"";if(n.cache_.source.src===t&&n.cache_.source.type)return n.cache_.source.type;var i=n.cache_.sources.filter(function(o){return o.src===t});if(i.length)return i[0].type;for(var e=n.$$("source"),r=0;r0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach(function(e){return e.callback(e.event)}),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},t.handleTechWaiting_=function(){var e=this;this.addClass("vjs-waiting"),this.trigger("waiting");var r=this.currentTime();this.on("timeupdate",function o(){r!==e.currentTime()&&(e.removeClass("vjs-waiting"),e.off("timeupdate",o))})},t.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},t.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},t.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},t.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},t.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.removeClass("vjs-ended"),this.trigger("seeked")},t.handleTechFirstPlay_=function(){this.options_.starttime&&(Ke.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},t.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},t.handleTechEnded_=function(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},t.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},t.handleTechClick_=function(e){!this.controls_||(void 0===this.options_||void 0===this.options_.userActions||void 0===this.options_.userActions.click||!1!==this.options_.userActions.click)&&(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?yi(this.play()):this.pause())},t.handleTechDoubleClick_=function(e){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),function(a){return a.contains(e.target)})||(void 0===this.options_||void 0===this.options_.userActions||void 0===this.options_.userActions.doubleClick||!1!==this.options_.userActions.doubleClick)&&(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))},t.handleTechTap_=function(){this.userActive(!this.userActive())},t.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},t.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},t.handleTechTouchEnd_=function(e){e.cancelable&&e.preventDefault()},t.handleStageClick_=function(){this.reportUserActivity()},t.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},t.documentFullscreenChange_=function(e){var r=e.target.player;if(!r||r===this){var a=this.el(),o=z()[this.fsApi_.fullscreenElement]===a;!o&&a.matches?o=a.matches(":"+this.fsApi_.fullscreen):!o&&a.msMatchesSelector&&(o=a.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(o)}},t.handleTechFullscreenChange_=function(e,r){var a=this;r&&(r.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",function(){a.removeClass("vjs-ios-native-fs")})),this.isFullscreen(r.isFullscreen))},t.handleTechFullscreenError_=function(e,r){this.trigger("fullscreenerror",r)},t.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},t.handleTechEnterPictureInPicture_=function(e){this.isInPictureInPicture(!0)},t.handleTechLeavePictureInPicture_=function(e){this.isInPictureInPicture(!1)},t.handleTechError_=function(){var e=this.tech_.error();this.error(e)},t.handleTechTextData_=function(){var e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},t.getCache=function(){return this.cache_},t.resetCache_=function(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}},t.techCall_=function(e,r){this.ready(function(){if(e in cp)return function lp(s,n,t,i){return n[t](s.reduce(Vs(t),i))}(this.middleware_,this.tech_,e,r);if(e in gl)return ml(this.middleware_,this.tech_,e,r);try{this.tech_&&this.tech_[e](r)}catch(a){throw Ke(a),a}},!0)},t.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in dp)return function up(s,n,t){return s.reduceRight(Vs(t),n[t]())}(this.middleware_,this.tech_,e);if(e in gl)return ml(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(r){throw void 0===this.tech_[e]?(Ke("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",r),r):"TypeError"===r.name?(Ke("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",r),this.tech_.isReady_=!1,r):(Ke(r),r)}}},t.play=function(){var e=this,r=this.options_.Promise||P().Promise;return r?new r(function(a){e.play_(a)}):this.play_()},t.play_=function(e){var r=this;void 0===e&&(e=yi),this.playCallbacks_.push(e);var a=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc()));if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!a)return this.waitToPlay_=function(l){r.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(!a&&(Qn||Ht)&&this.load());var o=this.techGet_("play");null===o?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(o)},t.runPlayTerminatedQueue_=function(){var e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(r){r()})},t.runPlayCallbacks_=function(e){var r=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],r.forEach(function(a){a(e)})},t.pause=function(){this.techCall_("pause")},t.paused=function(){return!1!==this.techGet_("paused")},t.played=function(){return this.techGet_("played")||or(0,0)},t.scrubbing=function(e){if(typeof e>"u")return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},t.currentTime=function(e){return typeof e<"u"?(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",e),void(this.cache_.initTime=0)):(this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),void this.one("canplay",this.boundApplyInitTime_))):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},t.applyInitTime_=function(){this.currentTime(this.cache_.initTime)},t.duration=function(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))},t.remainingTime=function(){return this.duration()-this.currentTime()},t.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},t.buffered=function(){var e=this.techGet_("buffered");return(!e||!e.length)&&(e=or(0,0)),e},t.bufferedPercent=function(){return rl(this.buffered(),this.duration())},t.bufferedEnd=function(){var e=this.buffered(),r=this.duration(),a=e.end(e.length-1);return a>r&&(a=r),a},t.volume=function(e){var r;return void 0!==e?(r=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=r,this.techCall_("setVolume",r),void(r>0&&this.lastVolume_(r))):(r=parseFloat(this.techGet_("volume")),isNaN(r)?1:r)},t.muted=function(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)},t.defaultMuted=function(e){return void 0!==e?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},t.lastVolume_=function(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e},t.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},t.isFullscreen=function(e){if(void 0!==e){var r=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==r&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),void this.toggleFullscreenClass_()}return this.isFullscreen_},t.requestFullscreen=function(e){var r=this.options_.Promise||P().Promise;if(r){var a=this;return new r(function(o,l){function d(){a.off("fullscreenerror",v),a.off("fullscreenchange",f)}function f(){d(),o()}function v(T,E){d(),l(E)}a.one("fullscreenchange",f),a.one("fullscreenerror",v);var g=a.requestFullscreenHelper_(e);g&&(g.then(d,d),g.then(o,l))})}return this.requestFullscreenHelper_()},t.requestFullscreenHelper_=function(e){var a,r=this;if(this.fsApi_.prefixed||(a=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(a=e)),this.fsApi_.requestFullscreen){var o=this.el_[this.fsApi_.requestFullscreen](a);return o&&o.then(function(){return r.isFullscreen(!0)},function(){return r.isFullscreen(!1)}),o}this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()},t.exitFullscreen=function(){var e=this.options_.Promise||P().Promise;if(e){var r=this;return new e(function(a,o){function l(){r.off("fullscreenerror",f),r.off("fullscreenchange",d)}function d(){l(),a()}function f(g,T){l(),o(T)}r.one("fullscreenchange",d),r.one("fullscreenerror",f);var v=r.exitFullscreenHelper_();v&&(v.then(l,l),v.then(a,o))})}return this.exitFullscreenHelper_()},t.exitFullscreenHelper_=function(){var e=this;if(this.fsApi_.requestFullscreen){var r=z()[this.fsApi_.exitFullscreen]();return r&&yi(r.then(function(){return e.isFullscreen(!1)})),r}this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()},t.enterFullWindow=function(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=z().documentElement.style.overflow,Xt(z(),"keydown",this.boundFullWindowOnEscKey_),z().documentElement.style.overflow="hidden",Oi(z().body,"vjs-full-window"),this.trigger("enterFullWindow")},t.fullWindowOnEscKey=function(e){De().isEventKey(e,"Esc")&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())},t.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,Nt(z(),"keydown",this.boundFullWindowOnEscKey_),z().documentElement.style.overflow=this.docOrigOverflow,mn(z().body,"vjs-full-window"),this.trigger("exitFullWindow")},t.disablePictureInPicture=function(e){if(void 0===e)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")},t.isInPictureInPicture=function(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_},t.requestPictureInPicture=function(){if("pictureInPictureEnabled"in z()&&!1===this.disablePictureInPicture())return this.techGet_("requestPictureInPicture")},t.exitPictureInPicture=function(){if("pictureInPictureEnabled"in z())return z().exitPictureInPicture()},t.handleKeyDown=function(e){var l,d,r=this.options_.userActions;r&&r.hotkeys&&(d=(l=this.el_.ownerDocument.activeElement).tagName.toLowerCase(),l.isContentEditable||("input"===d?-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(l.type):-1!==["textarea"].indexOf(d))||("function"==typeof r.hotkeys?r.hotkeys.call(this,e):this.handleHotkeys(e)))},t.handleHotkeys=function(e){var r=this.options_.userActions?this.options_.userActions.hotkeys:{},a=r.fullscreenKey,l=r.muteKey,d=void 0===l?function(x){return De().isEventKey(x,"m")}:l,f=r.playPauseKey,v=void 0===f?function(x){return De().isEventKey(x,"k")||De().isEventKey(x,"Space")}:f;if((void 0===a?function(x){return De().isEventKey(x,"f")}:a).call(this,e)){e.preventDefault(),e.stopPropagation();var g=Y.getComponent("FullscreenToggle");!1!==z()[this.fsApi_.fullscreenEnabled]&&g.prototype.handleClick.call(this,e)}else d.call(this,e)?(e.preventDefault(),e.stopPropagation(),Y.getComponent("MuteToggle").prototype.handleClick.call(this,e)):v.call(this,e)&&(e.preventDefault(),e.stopPropagation(),Y.getComponent("PlayToggle").prototype.handleClick.call(this,e))},t.canPlayType=function(e){for(var r,a=0,o=this.options_.techOrder;a"u")return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();var o=vp(e);if(o.length){if(this.changingSrc_=!0,r||(this.cache_.sources=o),this.updateSourceCaches_(o[0]),sp(this,o[0],function(f,v){if(a.middleware_=v,r||(a.cache_.sources=o),a.updateSourceCaches_(f),a.src_(f))return o.length>1?a.handleSrc_(o.slice(1)):(a.changingSrc_=!1,a.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0),void a.triggerReady());!function op(s,n){s.forEach(function(t){return t.setTech&&t.setTech(n)})}(v,a.tech_)}),this.options_.retryOnError&&o.length>1){var l=function(){a.error(null),a.handleSrc_(o.slice(1),!0)},d=function(){a.off("error",l)};this.one("error",l),this.one("playing",d),this.resetRetryOnError_=function(){a.off("error",l),a.off("playing",d)}}}else this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0)},t.src=function(e){return this.handleSrc_(e,!1)},t.src_=function(e){var r=this,a=this.selectSource([e]);return!a||(function(n,t){return bt(n)===bt(t)}(a.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1},!0),!1):(this.changingSrc_=!0,this.loadTech_(a.tech,a.source),this.tech_.ready(function(){r.changingSrc_=!1}),!1))},t.load=function(){this.techCall_("load")},t.reset=function(){var e=this,r=this.options_.Promise||P().Promise;this.paused()||!r?this.doReset_():yi(this.play().then(function(){return e.doReset_()}))},t.doReset_=function(){this.tech_&&this.tech_.clearTracks("text"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),Mi(this)&&this.trigger("playerreset")},t.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},t.resetProgressBar_=function(){this.currentTime(0);var e=this.controlBar,r=e.durationDisplay,a=e.remainingTimeDisplay;r&&r.updateContent(),a&&a.updateContent()},t.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()},t.resetVolumeBar_=function(){this.volume(1),this.trigger("volumechange")},t.currentSources=function(){var e=this.currentSource(),r=[];return 0!==Object.keys(e).length&&r.push(e),this.cache_.sources||r},t.currentSource=function(){return this.cache_.source||{}},t.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},t.currentType=function(){return this.currentSource()&&this.currentSource().type||""},t.preload=function(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},t.autoplay=function(e){if(void 0===e)return this.options_.autoplay||!1;var r;"string"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_("string"==typeof e?e:"play"),r=!1):this.options_.autoplay=!!e,r=typeof r>"u"?this.options_.autoplay:r,this.tech_&&this.techCall_("setAutoplay",r)},t.playsinline=function(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},t.loop=function(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},t.poster=function(e){if(void 0===e)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))},t.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},t.controls=function(e){if(void 0===e)return!!this.controls_;this.controls_!==(e=!!e)&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},t.usingNativeControls=function(e){if(void 0===e)return!!this.usingNativeControls_;this.usingNativeControls_!==(e=!!e)&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},t.error=function(e){var r=this;if(void 0===e)return this.error_||null;if(Wi("beforeerror").forEach(function(o){var l=o(r,e);Ii(l)&&!Array.isArray(l)||"string"==typeof l||"number"==typeof l||null===l?e=l:r.log.error("please return a value that MediaError expects in beforeerror hooks")}),this.options_.suppressNotSupportedError&&e&&4===e.code){var a=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],a),void this.one("loadstart",function(){this.off(["click","touchstart"],a)})}if(null===e)return this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new qt(e),this.addClass("vjs-error"),Ke.error("(CODE:"+this.error_.code+" "+qt.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error"),Wi("error").forEach(function(o){return o(r,r.error_)})},t.reportUserActivity=function(e){this.userActivity_=!0},t.userActive=function(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",function(r){r.stopPropagation(),r.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},t.listenForUserActivity_=function(){var e,r,a,o=at(this,this.reportUserActivity),f=function(E){o(),this.clearInterval(e)};this.on("mousedown",function(){o(),this.clearInterval(e),e=this.setInterval(o,250)}),this.on("mousemove",function(E){(E.screenX!==r||E.screenY!==a)&&(r=E.screenX,a=E.screenY,o())}),this.on("mouseup",f),this.on("mouseleave",f);var g,v=this.getChild("controlBar");v&&!Ht&&!Di&&(v.on("mouseenter",function(T){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),v.on("mouseleave",function(T){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",o),this.on("keyup",o),this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(g);var T=this.options_.inactivityTimeout;T<=0||(g=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},T))}},250)},t.playbackRate=function(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)},t.defaultPlaybackRate=function(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},t.isAudio=function(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e},t.addTextTrack=function(e,r,a){if(this.tech_)return this.tech_.addTextTrack(e,r,a)},t.addRemoteTextTrack=function(e,r){if(this.tech_)return this.tech_.addRemoteTextTrack(e,r)},t.removeRemoteTextTrack=function(e){void 0===e&&(e={});var a=e.track;if(a||(a=e),this.tech_)return this.tech_.removeRemoteTextTrack(a)},t.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},t.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},t.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},t.language=function(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),Mi(this)&&this.trigger("languagechange"))},t.languages=function(){return ct(n.prototype.options_.languages,this.languages_)},t.toJSON=function(){var e=ct(this.options_),r=e.tracks;e.tracks=[];for(var a=0;a"):function(){}},Ki=1/30,bi=.1,rd=function(n,t){var e,i=[];if(n&&n.length)for(e=0;e=t})},xa=function(n,t){return rd(n,function(i){return i-Ki>=t})},nd=function(n){var t=[];if(!n||!n.length)return"";for(var i=0;i "+n.end(i));return t.join(", ")},cr=function(n){for(var t=[],i=0;ia)){if(t>r&&t<=a){i+=a-t;continue}i+=a-r}}return i},sd=N.createTimeRange,_o=function(n,t){if(!t.preload)return t.duration;var i=0;return(t.parts||[]).forEach(function(e){i+=e.duration}),(t.preloadHints||[]).forEach(function(e){"PART"===e.type&&(i+=n.partTargetDuration)}),i},yo=function(n){return(n.segments||[]).reduce(function(t,i,e){return i.parts?i.parts.forEach(function(r,a){t.push({duration:r.duration,segmentIndex:e,partIndex:a,part:r,segment:i})}):t.push({duration:i.duration,segmentIndex:e,partIndex:null,segment:i,part:null}),t},[])},od=function(n){var t=n.segments&&n.segments.length&&n.segments[n.segments.length-1];return t&&t.parts||[]},ud=function(n){var t=n.preloadSegment;if(t){var i=t.parts;return(t.preloadHints||[]).reduce(function(a,o){return a+("PART"===o.type?1:0)},0)+(i&&i.length?i.length:0)}},ld=function(n,t){if(t.endList)return 0;if(n&&n.suggestedPresentationDelay)return n.suggestedPresentationDelay;var i=od(t).length>0;return i&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:i&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},dd=function(n,t,i){if(typeof t>"u"&&(t=n.mediaSequence+n.segments.length),t"u"){if(n.totalDuration)return n.totalDuration;if(!n.endList)return P()[1/0]}return dd(n,t,i)},En=function(n){var t=n.defaultDuration,i=n.durationList,e=n.startIndex,r=n.endIndex,a=0;if(e>r){var o=[r,e];e=o[0],r=o[1]}if(e<0){for(var l=e;lDate.now()},To=function(n){return n.excludeUntil&&n.excludeUntil===1/0},Sa=function(n){var t=hd(n);return!n.disabled&&!t},pd=function(n,t){return t.attributes&&t.attributes[n]},bo=function(n,t){if(1===n.playlists.length)return!0;var i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===n.playlists.filter(function(e){return!!Sa(e)&&(e.attributes.BANDWIDTH||0)0)for(var T=f-1;T>=0;T--){var E=d[T];if(l+=E.duration,o){if(l<0)continue}else if(l+Ki<=0)continue;return{partIndex:E.partIndex,segmentIndex:E.segmentIndex,startTime:a-En({defaultDuration:t.targetDuration,durationList:d,startIndex:f,endIndex:T})}}return{partIndex:d[0]&&d[0].partIndex||null,segmentIndex:d[0]&&d[0].segmentIndex||0,startTime:i}}if(f<0){for(var x=f;x<0;x++)if((l-=t.targetDuration)<0)return{partIndex:d[0]&&d[0].partIndex||null,segmentIndex:d[0]&&d[0].segmentIndex||0,startTime:i};f=0}for(var S=f;S0)continue}else if(l-Ki>=0)continue;return{partIndex:U.partIndex,segmentIndex:U.segmentIndex,startTime:a+En({defaultDuration:t.targetDuration,durationList:d,startIndex:f,endIndex:S})}}return{segmentIndex:d[d.length-1].segmentIndex,partIndex:d[d.length-1].partIndex,startTime:i}},isEnabled:Sa,isDisabled:function(n){return n.disabled},isBlacklisted:hd,isIncompatible:To,playlistEnd:fd,isAes:function(n){for(var t=0;t-1&&o!==a.length-1&&(i._HLS_part=o),(o>-1||a.length)&&r--}i._HLS_msn=r}if(t.serverControl&&t.serverControl.canSkipUntil&&(i._HLS_skip=t.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(i).length){var l=new(P().URL)(n);["_HLS_skip","_HLS_msn","_HLS_part"].forEach(function(d){!i.hasOwnProperty(d)||l.searchParams.set(d,i[d])}),n=l.toString()}return n}(a,r)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:a,withCredentials:this.withCredentials},function(o,l){if(e.request){if(o)return e.playlistRequestError(e.request,e.media(),"HAVE_METADATA");e.haveMetadata({playlistString:e.request.responseText,url:e.media().uri,id:e.media().id})}})}},t.playlistRequestError=function(e,r,a){var o=r.uri,l=r.id;this.request=null,a&&(this.state=a),this.error={playlist:this.master.playlists[l],status:e.status,message:"HLS playlist request error at URL: "+o+".",responseText:e.responseText,code:e.status>=500?4:2},this.trigger("error")},t.parseManifest_=function(e){var r=this,a=e.url;return function(n){var t=n.onwarn,i=n.oninfo,e=n.manifestString,r=n.customTagParsers,a=void 0===r?[]:r,o=n.customTagMappers,l=void 0===o?[]:o,d=n.experimentalLLHLS,f=new ef;t&&f.on("warn",t),i&&f.on("info",i),a.forEach(function(x){return f.addParser(x)}),l.forEach(function(x){return f.addTagMapper(x)}),f.push(e),f.end();var v=f.manifest;if(d||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(x){v.hasOwnProperty(x)&&delete v[x]}),v.segments&&v.segments.forEach(function(x){["parts","preloadHints"].forEach(function(S){x.hasOwnProperty(S)&&delete x[S]})})),!v.targetDuration){var g=10;v.segments&&v.segments.length&&(g=v.segments.reduce(function(x,S){return Math.max(x,S.duration)},0)),t&&t("manifest has no targetDuration defaulting to "+g),v.targetDuration=g}var T=od(v);if(T.length&&!v.partTargetDuration){var E=T.reduce(function(x,S){return Math.max(x,S.duration)},0);t&&(t("manifest has no partTargetDuration defaulting to "+E),gd.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),v.partTargetDuration=E}return v}({onwarn:function(d){return r.logger_("m3u8-parser warn for "+a+": "+d.message)},oninfo:function(d){return r.logger_("m3u8-parser info for "+a+": "+d.message)},manifestString:e.manifestString,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,experimentalLLHLS:this.experimentalLLHLS})},t.haveMetadata=function(e){var r=e.playlistString,a=e.playlistObject,o=e.url,l=e.id;this.request=null,this.state="HAVE_METADATA";var d=a||this.parseManifest_({url:o,manifestString:r});d.lastRequest=Date.now(),vd({playlist:d,uri:o,id:l});var f=Eo(this.master,d);this.targetDuration=d.partTargetDuration||d.targetDuration,this.pendingMedia_=null,f?(this.master=f,this.media_=this.master.playlists[l]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(Co(this.media(),!!f)),this.trigger("loadedplaylist")},t.dispose=function(){this.trigger("dispose"),this.stopRequest(),P().clearTimeout(this.mediaUpdateTimeout),P().clearTimeout(this.finalRenditionTimeout),this.off()},t.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},t.media=function(e,r){var a=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"==typeof e){if(!this.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.master.playlists[e]}if(P().clearTimeout(this.finalRenditionTimeout),r){var o=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=P().setTimeout(this.media.bind(this,e,!1),o)}else{var l=this.state,d=!this.media_||e.id!==this.media_.id,f=this.master.playlists[e.id];if(f&&f.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(d&&(this.trigger("mediachanging"),this.trigger("HAVE_MASTER"===l?"loadedmetadata":"mediachange")));if(this.updateMediaUpdateTimeout_(Co(e,!0)),d){if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=e,this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials},function(v,g){if(a.request){if(e.lastRequest=Date.now(),e.resolvedUri=ba(a.handleManifestRedirects,e.resolvedUri,g),v)return a.playlistRequestError(a.request,e,l);a.haveMetadata({playlistString:g.responseText,url:e.uri,id:e.id}),a.trigger("HAVE_MASTER"===l?"loadedmetadata":"mediachange")}})}}},t.pause=function(){this.mediaUpdateTimeout&&(P().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.state=this.media_?"HAVE_METADATA":"HAVE_MASTER":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")},t.load=function(e){var r=this;this.mediaUpdateTimeout&&(P().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);var a=this.media();if(e){var o=a?(a.partTargetDuration||a.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=P().setTimeout(function(){r.mediaUpdateTimeout=null,r.load()},o)}else this.started?this.trigger(a&&!a.endList?"mediaupdatetimeout":"loadedplaylist"):this.start()},t.updateMediaUpdateTimeout_=function(e){var r=this;this.mediaUpdateTimeout&&(P().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=P().setTimeout(function(){r.mediaUpdateTimeout=null,r.trigger("mediaupdatetimeout"),r.updateMediaUpdateTimeout_(e)},e))},t.start=function(){var e=this;if(this.started=!0,"object"==typeof this.src)return this.src.uri||(this.src.uri=P().location.href),this.src.resolvedUri=this.src.uri,void setTimeout(function(){e.setupInitialPlaylist(e.src)},0);this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},function(r,a){if(e.request){if(e.request=null,r)return e.error={status:a.status,message:"HLS playlist request error at URL: "+e.src+".",responseText:a.responseText,code:2},"HAVE_NOTHING"===e.state&&(e.started=!1),e.trigger("error");e.src=ba(e.handleManifestRedirects,e.src,a);var o=e.parseManifest_({manifestString:a.responseText,url:e.src});e.setupInitialPlaylist(o)}})},t.srcUri=function(){return"string"==typeof this.src?this.src:this.src.uri},t.setupInitialPlaylist=function(e){if(this.state="HAVE_MASTER",e.playlists)return this.master=e,_d(this.master,this.srcUri()),e.playlists.forEach(function(a){a.segments=Td(a),a.segments.forEach(function(o){yd(o,a.resolvedUri)})}),this.trigger("loadedplaylist"),void(this.request||this.media(this.master.playlists[0]));var r=this.srcUri()||P().location.href;this.master=function(n,t){var i=So(0,t),e={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:P().location.href,resolvedUri:P().location.href,playlists:[{uri:t,id:i,resolvedUri:t,attributes:{}}]};return e.playlists[i]=e.playlists[0],e.playlists[t]=e.playlists[0],e}(0,r),this.haveMetadata({playlistObject:e,url:r,id:this.master.playlists[0].id}),this.trigger("loadedmetadata")},n}(N.EventTarget),mm=N.xhr,gm=N.mergeOptions,ko=function(n,t,i,e){var r="arraybuffer"===n.responseType?n.response:n.responseText;!t&&r&&(n.responseTime=Date.now(),n.roundTripTime=n.responseTime-n.requestTime,n.bytesReceived=r.byteLength||r.length,n.bandwidth||(n.bandwidth=Math.floor(n.bytesReceived/n.roundTripTime*8*1e3))),i.headers&&(n.responseHeaders=i.headers),t&&"ETIMEDOUT"===t.code&&(n.timedout=!0),!t&&!n.aborted&&200!==i.statusCode&&206!==i.statusCode&&0!==i.statusCode&&(t=new Error("XHR Failed with a response of: "+(n&&(r||n.responseText)))),e(t,n)},xd=function(){var n=function t(i,e){i=gm({timeout:45e3},i);var r=t.beforeRequest||N.Vhs.xhr.beforeRequest;if(r&&"function"==typeof r){var a=r(i);a&&(i=a)}var l=(!0===N.Vhs.xhr.original?mm:N.Vhs.xhr)(i,function(f,v){return ko(l,f,v,e)}),d=l.abort;return l.abort=function(){return l.aborted=!0,d.apply(l,arguments)},l.uri=i.uri,l.requestTime=Date.now(),l};return n.original=!0,n},Ao=function(n){var t={};return n.byterange&&(t.Range=function(n){return"bytes="+n.offset+"-"+("bigint"==typeof n.offset||"bigint"==typeof n.length?P().BigInt(n.offset)+P().BigInt(n.length)-P().BigInt(1):n.offset+n.length-1)}(n.byterange)),t},_m=function(n,t){return n.start(t)+"-"+n.end(t)},ym=function(n,t){var i=n.toString(16);return"00".substring(0,2-i.length)+i+(t%2?" ":"")},Tm=function(n){return n>=32&&n<126?String.fromCharCode(n):"."},Sd=function(n){var t={};return Object.keys(n).forEach(function(i){var e=n[i];t[i]=ArrayBuffer.isView(e)?{bytes:e.buffer,byteOffset:e.byteOffset,byteLength:e.byteLength}:e}),t},Ca=function(n){var t=n.byterange||{length:1/0,offset:0};return[t.length,t.offset,n.resolvedUri].join(",")},Ed=function(n){return n.resolvedUri},Cd=function(n){for(var t=Array.prototype.slice.call(n),i=16,e="",o=0;o"u"||!i||!a)return f({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!i.endList&&!d.hasStarted_)return f({message:"player must be playing a live stream to start buffering"});if(!function(n){if(!n.segments||0===n.segments.length)return!1;for(var t=0;tnew Date(l.getTime()+1e3*d)?null:(i>l&&(e=o),{segment:e,estimatedStart:e.videoTimingInfo?e.videoTimingInfo.transmuxedPresentationStart:Yt.duration(t,t.mediaSequence+t.segments.indexOf(e)),type:e.videoTimingInfo?"accurate":"estimate"})}(t,i);if(!v)return f({message:t+" was not found in the stream"});var g=v.segment,T=function(n,t){var i,e;try{i=new Date(n),e=new Date(t)}catch{}var r=i.getTime();return(e.getTime()-r)/1e3}(g.dateTimeObject,t);if("estimate"===v.type)return 0===r?f({message:t+" is not buffered yet. Try again"}):(a(v.estimatedStart+T),void d.one("seeked",function(){s({programTime:t,playlist:i,retryCount:r-1,seekTo:a,pauseAfterSeek:l,tech:d,callback:f})}));var E=g.start+T;d.one("seeked",function(){return f(null,d.currentTime())}),l&&d.pause(),a(E)},wo=function(n,t){if(4===n.readyState)return t()},Ad=N.mergeOptions,wd=function(n,t){if(!bd(n,t)||n.sidx&&t.sidx&&(n.sidx.offset!==t.sidx.offset||n.sidx.length!==t.sidx.length))return!1;if(!n.sidx&&t.sidx||n.sidx&&!t.sidx||n.segments&&!t.segments||!n.segments&&t.segments)return!1;if(!n.segments&&!t.segments)return!0;for(var i=0;i=U+S)return f(v,{response:E.subarray(S,S+U),status:g.status,uri:g.uri});o.request=o.vhs_.xhr({uri:d,responseType:"arraybuffer",headers:Ao({byterange:e.sidx.byterange})},f)})}else this.mediaRequest_=P().setTimeout(function(){return a(!1)},0)},t.dispose=function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},P().clearTimeout(this.minimumUpdatePeriodTimeout_),P().clearTimeout(this.mediaRequest_),P().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.off()},t.hasPendingRequest=function(){return this.request||this.mediaRequest_},t.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},t.media=function(e){var r=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var a=this.state;if("string"==typeof e){if(!this.masterPlaylistLoader_.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.masterPlaylistLoader_.master.playlists[e]}var o=!this.media_||e.id!==this.media_.id;if(o&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state="HAVE_METADATA",this.media_=e,void(o&&(this.trigger("mediachanging"),this.trigger("mediachange")));!o||(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,a,function(l){r.haveMetadata({startingState:a,playlist:e})}))},t.haveMetadata=function(e){var r=e.startingState,a=e.playlist;this.state="HAVE_METADATA",this.loadedPlaylists_[a.id]=a,this.mediaRequest_=null,this.refreshMedia_(a.id),this.trigger("HAVE_MASTER"===r?"loadedmetadata":"mediachange")},t.pause=function(){this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),P().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMaster_&&(P().clearTimeout(this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_),this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_=null),"HAVE_NOTHING"===this.state&&(this.started=!1)},t.load=function(e){var r=this;P().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;var a=this.media();if(e){var o=a?a.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=P().setTimeout(function(){return r.load()},o)}else this.started?a&&!a.endList?(this.isMaster_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start()},t.start=function(){var e=this;this.started=!0,this.isMaster_?this.requestMaster_(function(r,a){e.haveMaster_(),!e.hasPendingRequest()&&!e.media_&&e.media(e.masterPlaylistLoader_.master.playlists[0])}):this.mediaRequest_=P().setTimeout(function(){return e.haveMaster_()},0)},t.requestMaster_=function(e){var r=this;this.request=this.vhs_.xhr({uri:this.masterPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},function(a,o){if(!r.requestErrored_(a,o)){var l=o.responseText!==r.masterPlaylistLoader_.masterXml_;return r.masterPlaylistLoader_.masterXml_=o.responseText,r.masterLoaded_=o.responseHeaders&&o.responseHeaders.date?Date.parse(o.responseHeaders.date):Date.now(),r.masterPlaylistLoader_.srcUrl=ba(r.handleManifestRedirects,r.masterPlaylistLoader_.srcUrl,o),l?(r.handleMaster_(),void r.syncClientServerClock_(function(){return e(o,l)})):e(o,l)}"HAVE_NOTHING"===r.state&&(r.started=!1)})},t.syncClientServerClock_=function(e){var r=this,a=function(n){return function(n){var t=Tt(n,"UTCTiming")[0];if(!t)return null;var i=Mt(t);switch(i.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":i.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":i.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":i.method="DIRECT",i.value=Date.parse(i.value);break;default:throw new Error("UNSUPPORTED_UTC_TIMING_SCHEME")}return i}(mu(n))}(this.masterPlaylistLoader_.masterXml_);return null===a?(this.masterPlaylistLoader_.clientOffset_=this.masterLoaded_-Date.now(),e()):"DIRECT"===a.method?(this.masterPlaylistLoader_.clientOffset_=a.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:pi(this.masterPlaylistLoader_.srcUrl,a.value),method:a.method,withCredentials:this.withCredentials},function(o,l){if(r.request){if(o)return r.masterPlaylistLoader_.clientOffset_=r.masterLoaded_-Date.now(),e();var d;d="HEAD"===a.method?l.responseHeaders&&l.responseHeaders.date?Date.parse(l.responseHeaders.date):r.masterLoaded_:Date.parse(l.responseText),r.masterPlaylistLoader_.clientOffset_=d-Date.now(),e()}}))},t.haveMaster_=function(){this.state="HAVE_MASTER",this.isMaster_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)},t.handleMaster_=function(){this.mediaRequest_=null;var e=this.masterPlaylistLoader_.master,r=function(n){var i=n.srcUrl,o=function(n,t){void 0===t&&(t={});var i=function(n,t){void 0===t&&(t={});var i=t,e=i.manifestUri,r=void 0===e?"":e,a=i.NOW,o=void 0===a?Date.now():a,l=i.clientOffset,d=void 0===l?0:l,f=Tt(n,"Period");if(!f.length)throw new Error("INVALID_NUMBER_OF_PERIOD");var v=Tt(n,"Location"),g=Mt(n),T=Gn([r],Tt(n,"BaseURL"));g.type=g.type||"static",g.sourceDuration=g.mediaPresentationDuration||0,g.NOW=o,g.clientOffset=d,v.length&&(g.locations=v.map(ls));var E=[];return f.forEach(function(x,S){var U=Mt(x),F=E[S-1];U.start=function(n){var t=n.attributes,i=n.priorPeriodAttributes;return"number"==typeof t.start?t.start:i&&"number"==typeof i.start&&"number"==typeof i.duration?i.start+i.duration:i||"static"!==n.mpdType?null:0}({attributes:U,priorPeriodAttributes:F?F.attributes:null,mpdType:g.type}),E.push({node:x,attributes:U})}),{locations:g.locations,representationInfo:qn(E.map(jf(g,T)))}}(mu(n),t),e=function(n){return n.map(Of)}(i.representationInfo);return Ef({dashPlaylists:e,locations:i.locations,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest})}(n.masterXml,{manifestUri:i,clientOffset:n.clientOffset,sidxMapping:n.sidxMapping,previousManifest:n.previousManifest});return _d(o,i),o}({masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_,previousManifest:e});e&&(r=function(n,t,i){for(var e=!0,r=Ad(n,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts}),a=0;a-1)},this.trigger=function(p){var h,m,_,y;if(h=c[p])if(2===arguments.length)for(_=h.length,m=0;m<_;++m)h[m].call(this,arguments[1]);else{for(y=[],m=arguments.length,m=1;m"u")){for(b in Pe)Pe.hasOwnProperty(b)&&(Pe[b]=[b.charCodeAt(0),b.charCodeAt(1),b.charCodeAt(2),b.charCodeAt(3)]);ot=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),Je=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),Ut=new Uint8Array([0,0,0,1]),fr=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),ai=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),si={video:fr,audio:ai},hr=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Fi=new Uint8Array([0,0,0,0,0,0,0,0]),Bi=new Uint8Array([0,0,0,0,0,0,0,0]),pr=Bi,mr=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),mc=Bi,Ei=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),a=function(c){var m,_,p=[],h=0;for(m=1;m>>1,c.samplingfrequencyindex<<7|c.channelcount<<3,6,1,2]))},d=function(){return a(Pe.ftyp,ot,Ut,ot,Je)},q=function(c){return a(Pe.hdlr,si[c])},f=function(c){return a(Pe.mdat,c)},W=function(c){var p=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,c.duration>>>24&255,c.duration>>>16&255,c.duration>>>8&255,255&c.duration,85,196,0,0]);return c.samplerate&&(p[12]=c.samplerate>>>24&255,p[13]=c.samplerate>>>16&255,p[14]=c.samplerate>>>8&255,p[15]=255&c.samplerate),a(Pe.mdhd,p)},j=function(c){return a(Pe.mdia,W(c),q(c.type),g(c))},v=function(c){return a(Pe.mfhd,new Uint8Array([0,0,0,0,(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c]))},g=function(c){return a(Pe.minf,"video"===c.type?a(Pe.vmhd,Ei):a(Pe.smhd,Fi),o(),he(c))},T=function(c,p){for(var h=[],m=p.length;m--;)h[m]=ye(p[m]);return a.apply(null,[Pe.moof,v(c)].concat(h))},E=function(c){for(var p=c.length,h=[];p--;)h[p]=U(c[p]);return a.apply(null,[Pe.moov,S(4294967295)].concat(h).concat(x(c)))},x=function(c){for(var p=c.length,h=[];p--;)h[p]=ge(c[p]);return a.apply(null,[Pe.mvex].concat(h))},S=function(c){var p=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return a(Pe.mvhd,p)},ne=function(c){var m,_,p=c.samples||[],h=new Uint8Array(4+p.length);for(_=0;_>>8),y.push(255&m[I].byteLength),y=y.concat(Array.prototype.slice.call(m[I]));for(I=0;I<_.length;I++)k.push((65280&_[I].byteLength)>>>8),k.push(255&_[I].byteLength),k=k.concat(Array.prototype.slice.call(_[I]));if(L=[Pe.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&h.width)>>8,255&h.width,(65280&h.height)>>8,255&h.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),a(Pe.avcC,new Uint8Array([1,h.profileIdc,h.profileCompatibility,h.levelIdc,255].concat([m.length],y,[_.length],k))),a(Pe.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],h.sarRatio){var O=h.sarRatio[0],M=h.sarRatio[1];L.push(a(Pe.pasp,new Uint8Array([(4278190080&O)>>24,(16711680&O)>>16,(65280&O)>>8,255&O,(4278190080&M)>>24,(16711680&M)>>16,(65280&M)>>8,255&M])))}return a.apply(null,L)},c=function(h){return a(Pe.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&h.channelcount)>>8,255&h.channelcount,(65280&h.samplesize)>>8,255&h.samplesize,0,0,0,0,(65280&h.samplerate)>>8,255&h.samplerate,0,0]),l(h))},F=function(c){var p=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&c.id)>>24,(16711680&c.id)>>16,(65280&c.id)>>8,255&c.id,0,0,0,0,(4278190080&c.duration)>>24,(16711680&c.duration)>>16,(65280&c.duration)>>8,255&c.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&c.width)>>8,255&c.width,0,0,(65280&c.height)>>8,255&c.height,0,0]);return a(Pe.tkhd,p)},ye=function(c){var p,h,m,_,k,I;return p=a(Pe.tfhd,new Uint8Array([0,0,0,58,(4278190080&c.id)>>24,(16711680&c.id)>>16,(65280&c.id)>>8,255&c.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),k=Math.floor(c.baseMediaDecodeTime/r),I=Math.floor(c.baseMediaDecodeTime%r),h=a(Pe.tfdt,new Uint8Array([1,0,0,0,k>>>24&255,k>>>16&255,k>>>8&255,255&k,I>>>24&255,I>>>16&255,I>>>8&255,255&I])),"audio"===c.type?(m=$e(c,92),a(Pe.traf,p,h,m)):(_=ne(c),m=$e(c,_.length+92),a(Pe.traf,p,h,m,_))},U=function(c){return c.duration=c.duration||4294967295,a(Pe.trak,F(c),j(c))},ge=function(c){var p=new Uint8Array([0,0,0,0,(4278190080&c.id)>>24,(16711680&c.id)>>16,(65280&c.id)>>8,255&c.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==c.type&&(p[p.length-1]=0),a(Pe.trex,p)},function(){var b,c,p;p=function(m,_){var y=0,k=0,I=0,L=0;return m.length&&(void 0!==m[0].duration&&(y=1),void 0!==m[0].size&&(k=2),void 0!==m[0].flags&&(I=4),void 0!==m[0].compositionTimeOffset&&(L=8)),[0,0,y|k|I|L,1,(4278190080&m.length)>>>24,(16711680&m.length)>>>16,(65280&m.length)>>>8,255&m.length,(4278190080&_)>>>24,(16711680&_)>>>16,(65280&_)>>>8,255&_]},c=function(m,_){var y,k,I,L,O,M;for(I=p(L=m.samples||[],_+=20+16*L.length),(k=new Uint8Array(I.length+16*L.length)).set(I),y=I.length,M=0;M>>24,k[y++]=(16711680&O.duration)>>>16,k[y++]=(65280&O.duration)>>>8,k[y++]=255&O.duration,k[y++]=(4278190080&O.size)>>>24,k[y++]=(16711680&O.size)>>>16,k[y++]=(65280&O.size)>>>8,k[y++]=255&O.size,k[y++]=O.flags.isLeading<<2|O.flags.dependsOn,k[y++]=O.flags.isDependedOn<<6|O.flags.hasRedundancy<<4|O.flags.paddingValue<<1|O.flags.isNonSyncSample,k[y++]=61440&O.flags.degradationPriority,k[y++]=15&O.flags.degradationPriority,k[y++]=(4278190080&O.compositionTimeOffset)>>>24,k[y++]=(16711680&O.compositionTimeOffset)>>>16,k[y++]=(65280&O.compositionTimeOffset)>>>8,k[y++]=255&O.compositionTimeOffset;return a(Pe.trun,k)},b=function(m,_){var y,k,I,L,O,M;for(I=p(L=m.samples||[],_+=20+8*L.length),(y=new Uint8Array(I.length+8*L.length)).set(I),k=I.length,M=0;M>>24,y[k++]=(16711680&O.duration)>>>16,y[k++]=(65280&O.duration)>>>8,y[k++]=255&O.duration,y[k++]=(4278190080&O.size)>>>24,y[k++]=(16711680&O.size)>>>16,y[k++]=(65280&O.size)>>>8,y[k++]=255&O.size;return a(Pe.trun,y)},$e=function(m,_){return"audio"===m.type?b(m,_):c(m,_)}}();var Vo,Wo,Go,Ua,Zo,vc,_c,yc,Dn_mdat=f,Dn_moof=T,gc=function(c,p){var h={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return h.dataOffset=p,h.compositionTimeOffset=c.pts-c.dts,h.duration=c.duration,h.size=4*c.length,h.size+=c.byteLength,c.keyFrame&&(h.flags.dependsOn=2,h.flags.isNonSyncSample=0),h},zi=[33,16,5,32,164,27],Ho=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],et=function(c){for(var p=[];c--;)p.push(0);return p};Wo=function(c){return 9e4*c},Go=function(c,p){return c*p},Ua=function(c){return c/9e4},Zo=function(c,p){return c/p},vc=function(c,p){return Wo(Zo(c,p))},_c=function(c,p){return Go(Ua(c),p)},yc=function(c,p,h){return Ua(h?c:c-p)};var Qe_secondsToVideoTs=Wo,Qe_videoTsToSeconds=Ua,Qe_audioTsToVideoTs=vc,Qe_videoTsToAudioTs=_c,Qe_metadataTsToSeconds=yc,Fa_prefixWithSilence=function(c,p,h,m){var _,O,M,G,y=0,k=0,I=0,L=0;if(p.length&&(_=Qe_audioTsToVideoTs(c.baseMediaDecodeTime,c.samplerate),y=Math.ceil(9e4/(c.samplerate/1024)),h&&m&&(k=_-Math.max(h,m),L=(I=Math.floor(k/y))*y),!(I<1||L>45e3))){for((O=function(){if(!Vo){var c={96e3:[zi,[227,64],et(154),[56]],88200:[zi,[231],et(170),[56]],64e3:[zi,[248,192],et(240),[56]],48e3:[zi,[255,192],et(268),[55,148,128],et(54),[112]],44100:[zi,[255,192],et(268),[55,163,128],et(84),[112]],32e3:[zi,[255,192],et(268),[55,234],et(226),[112]],24e3:[zi,[255,192],et(268),[55,255,128],et(268),[111,112],et(126),[224]],16e3:[zi,[255,192],et(268),[55,255,128],et(268),[111,255],et(269),[223,108],et(195),[1,192]],12e3:[Ho,et(268),[3,127,248],et(268),[6,255,240],et(268),[13,255,224],et(268),[27,253,128],et(259),[56]],11025:[Ho,et(268),[3,127,248],et(268),[6,255,240],et(268),[13,255,224],et(268),[27,255,192],et(268),[55,175,128],et(108),[112]],8e3:[Ho,et(268),[3,121,16],et(47),[7]]};Vo=function(c){return Object.keys(c).reduce(function(p,h){return p[h]=new Uint8Array(c[h].reduce(function(m,_){return m.concat(_)},[])),p},{})}(c)}return Vo}()[c.samplerate])||(O=p[0].data),M=0;M=this.virtualRowCount&&"function"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(b),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},ji.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},ji.prototype.addText=function(b){this.rows[this.rowIdx]+=b},ji.prototype.backspace=function(){if(!this.isEmpty()){var b=this.rows[this.rowIdx];this.rows[this.rowIdx]=b.substr(0,b.length-1)}};var ja=function(c,p,h){this.serviceNum=c,this.text="",this.currentWindow=new ji(-1),this.windows=[],this.stream=h,"string"==typeof p&&this.createTextDecoder(p)};ja.prototype.init=function(b,c){this.startPts=b;for(var p=0;p<8;p++)this.windows[p]=new ji(p),"function"==typeof c&&(this.windows[p].beforeRowOverflow=c)},ja.prototype.setCurrentWindow=function(b){this.currentWindow=this.windows[b]},ja.prototype.createTextDecoder=function(b){if(typeof TextDecoder>"u")this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(b)}catch(c){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+b+" encoding. "+c})}};var ut=function b(c){c=c||{},b.prototype.init.call(this);var _,p=this,h=c.captionServices||{},m={};Object.keys(h).forEach(function(y){_=h[y],/^SERVICE/.test(y)&&(m[y]=_.encoding)}),this.serviceEncodings=m,this.current708Packet=null,this.services={},this.push=function(y){3===y.type?(p.new708Packet(),p.add708Bytes(y)):(null===p.current708Packet&&p.new708Packet(),p.add708Bytes(y))}};ut.prototype=new n,ut.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},ut.prototype.add708Bytes=function(b){var c=b.ccData,p=c>>>8,h=255&c;this.current708Packet.ptsVals.push(b.pts),this.current708Packet.data.push(p),this.current708Packet.data.push(h)},ut.prototype.push708Packet=function(){var b=this.current708Packet,c=b.data,p=null,h=null,m=0,_=c[m++];for(b.seq=_>>6,b.sizeCode=63&_;m>5)&&h>0&&(p=_=c[m++]),this.pushServiceBlock(p,m,h),h>0&&(m+=h-1)},ut.prototype.pushServiceBlock=function(b,c,p){var h,m=c,_=this.current708Packet.data,y=this.services[b];for(y||(y=this.initService(b,m));m>5,_.rowLock=(16&h)>>4,_.columnLock=(8&h)>>3,_.priority=7&h,h=p[++b],_.relativePositioning=(128&h)>>7,_.anchorVertical=127&h,h=p[++b],_.anchorHorizontal=h,h=p[++b],_.anchorPoint=(240&h)>>4,_.rowCount=15&h,h=p[++b],_.columnCount=63&h,h=p[++b],_.windowStyle=(56&h)>>3,_.penStyle=7&h,_.virtualRowCount=_.rowCount+1,b},ut.prototype.setWindowAttributes=function(b,c){var p=this.current708Packet.data,h=p[b],m=c.currentWindow.winAttr;return h=p[++b],m.fillOpacity=(192&h)>>6,m.fillRed=(48&h)>>4,m.fillGreen=(12&h)>>2,m.fillBlue=3&h,h=p[++b],m.borderType=(192&h)>>6,m.borderRed=(48&h)>>4,m.borderGreen=(12&h)>>2,m.borderBlue=3&h,h=p[++b],m.borderType+=(128&h)>>5,m.wordWrap=(64&h)>>6,m.printDirection=(48&h)>>4,m.scrollDirection=(12&h)>>2,m.justify=3&h,h=p[++b],m.effectSpeed=(240&h)>>4,m.effectDirection=(12&h)>>2,m.displayEffect=3&h,b},ut.prototype.flushDisplayed=function(b,c){for(var p=[],h=0;h<8;h++)c.windows[h].visible&&!c.windows[h].isEmpty()&&p.push(c.windows[h].getText());c.endPts=b,c.text=p.join("\n\n"),this.pushCaption(c),c.startPts=b},ut.prototype.pushCaption=function(b){""!==b.text&&(this.trigger("data",{startPts:b.startPts,endPts:b.endPts,text:b.text,stream:"cc708_"+b.serviceNum}),b.text="",b.startPts=b.endPts)},ut.prototype.displayWindows=function(b,c){var h=this.current708Packet.data[++b],m=this.getPts(b);this.flushDisplayed(m,c);for(var _=0;_<8;_++)h&1<<_&&(c.windows[_].visible=1);return b},ut.prototype.hideWindows=function(b,c){var h=this.current708Packet.data[++b],m=this.getPts(b);this.flushDisplayed(m,c);for(var _=0;_<8;_++)h&1<<_&&(c.windows[_].visible=0);return b},ut.prototype.toggleWindows=function(b,c){var h=this.current708Packet.data[++b],m=this.getPts(b);this.flushDisplayed(m,c);for(var _=0;_<8;_++)h&1<<_&&(c.windows[_].visible^=1);return b},ut.prototype.clearWindows=function(b,c){var h=this.current708Packet.data[++b],m=this.getPts(b);this.flushDisplayed(m,c);for(var _=0;_<8;_++)h&1<<_&&c.windows[_].clearText();return b},ut.prototype.deleteWindows=function(b,c){var h=this.current708Packet.data[++b],m=this.getPts(b);this.flushDisplayed(m,c);for(var _=0;_<8;_++)h&1<<_&&c.windows[_].reset();return b},ut.prototype.setPenAttributes=function(b,c){var p=this.current708Packet.data,h=p[b],m=c.currentWindow.penAttr;return h=p[++b],m.textTag=(240&h)>>4,m.offset=(12&h)>>2,m.penSize=3&h,h=p[++b],m.italics=(128&h)>>7,m.underline=(64&h)>>6,m.edgeType=(56&h)>>3,m.fontStyle=7&h,b},ut.prototype.setPenColor=function(b,c){var p=this.current708Packet.data,h=p[b],m=c.currentWindow.penColor;return h=p[++b],m.fgOpacity=(192&h)>>6,m.fgRed=(48&h)>>4,m.fgGreen=(12&h)>>2,m.fgBlue=3&h,h=p[++b],m.bgOpacity=(192&h)>>6,m.bgRed=(48&h)>>4,m.bgGreen=(12&h)>>2,m.bgBlue=3&h,h=p[++b],m.edgeRed=(48&h)>>4,m.edgeGreen=(12&h)>>2,m.edgeBlue=3&h,b},ut.prototype.setPenLocation=function(b,c){var p=this.current708Packet.data,h=p[b],m=c.currentWindow.penLoc;return c.currentWindow.pendingNewLine=!0,h=p[++b],m.row=15&h,h=p[++b],m.column=63&h,b},ut.prototype.reset=function(b,c){var p=this.getPts(b);return this.flushDisplayed(p,c),this.initService(c.serviceNum,b)};var ty={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Ha=function(c){return null===c?"":(c=ty[c]||c,String.fromCharCode(c))},iy=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],gr=function(){for(var c=[],p=15;p--;)c.push("");return c},mt=function b(c,p){b.prototype.init.call(this),this.field_=c||0,this.dataChannel_=p||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(h){var m,_,y,k,I;if((m=32639&h.ccData)!==this.lastControlCode_){if(4096==(61440&m)?this.lastControlCode_=m:m!==this.PADDING_&&(this.lastControlCode_=null),y=m>>>8,k=255&m,m!==this.PADDING_)if(m===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(m===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(h.pts),this.flushDisplayed(h.pts),_=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=_,this.startPts_=h.pts;else if(m===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(h.pts);else if(m===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(h.pts);else if(m===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(h.pts);else if(m===this.CARRIAGE_RETURN_)this.clearFormatting(h.pts),this.flushDisplayed(h.pts),this.shiftRowsUp_(),this.startPts_=h.pts;else if(m===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(m===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(h.pts),this.displayed_=gr();else if(m===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=gr();else if(m===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(h.pts),this.displayed_=gr()),this.mode_="paintOn",this.startPts_=h.pts;else if(this.isSpecialCharacter(y,k))I=Ha((y=(3&y)<<8)|k),this[this.mode_](h.pts,I),this.column_++;else if(this.isExtCharacter(y,k))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),I=Ha((y=(3&y)<<8)|k),this[this.mode_](h.pts,I),this.column_++;else if(this.isMidRowCode(y,k))this.clearFormatting(h.pts),this[this.mode_](h.pts," "),this.column_++,14==(14&k)&&this.addFormatting(h.pts,["i"]),1==(1&k)&&this.addFormatting(h.pts,["u"]);else if(this.isOffsetControlCode(y,k))this.column_+=3&k;else if(this.isPAC(y,k)){var L=iy.indexOf(7968&m);"rollUp"===this.mode_&&(L-this.rollUpRows_+1<0&&(L=this.rollUpRows_-1),this.setRollUp(h.pts,L)),L!==this.row_&&(this.clearFormatting(h.pts),this.row_=L),1&k&&-1===this.formatting_.indexOf("u")&&this.addFormatting(h.pts,["u"]),16==(16&m)&&(this.column_=4*((14&m)>>1)),this.isColorPAC(k)&&14==(14&k)&&this.addFormatting(h.pts,["i"])}else this.isNormalChar(y)&&(0===k&&(k=null),I=Ha(y),I+=Ha(k),this[this.mode_](h.pts,I),this.column_+=I.length)}else this.lastControlCode_=null}};mt.prototype=new n,mt.prototype.flushDisplayed=function(b){var c=this.displayed_.map(function(p,h){try{return p.trim()}catch{return this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+h+"."}),""}},this).join("\n").replace(/^\n+|\n+$/g,"");c.length&&this.trigger("data",{startPts:this.startPts_,endPts:b,text:c,stream:this.name_})},mt.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=gr(),this.nonDisplayed_=gr(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},mt.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},mt.prototype.isSpecialCharacter=function(b,c){return b===this.EXT_&&c>=48&&c<=63},mt.prototype.isExtCharacter=function(b,c){return(b===this.EXT_+1||b===this.EXT_+2)&&c>=32&&c<=63},mt.prototype.isMidRowCode=function(b,c){return b===this.EXT_&&c>=32&&c<=47},mt.prototype.isOffsetControlCode=function(b,c){return b===this.OFFSET_&&c>=33&&c<=35},mt.prototype.isPAC=function(b,c){return b>=this.BASE_&&b=64&&c<=127},mt.prototype.isColorPAC=function(b){return b>=64&&b<=79||b>=96&&b<=127},mt.prototype.isNormalChar=function(b){return b>=32&&b<=127},mt.prototype.setRollUp=function(b,c){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(b),this.nonDisplayed_=gr(),this.displayed_=gr()),void 0!==c&&c!==this.row_)for(var p=0;p"},"");this[this.mode_](b,p)},mt.prototype.clearFormatting=function(b){if(this.formatting_.length){var c=this.formatting_.reverse().reduce(function(p,h){return p+""},"");this.formatting_=[],this[this.mode_](b,c)}},mt.prototype.popOn=function(b,c){var p=this.nonDisplayed_[this.row_];this.nonDisplayed_[this.row_]=p+=c},mt.prototype.rollUp=function(b,c){var p=this.displayed_[this.row_];this.displayed_[this.row_]=p+=c},mt.prototype.shiftRowsUp_=function(){var b;for(b=0;bp&&(h=-1);Math.abs(p-c)>4294967296;)c+=8589934592*h;return c},xc=function b(c){var p,h;b.prototype.init.call(this),this.type_=c||"shared",this.push=function(m){"shared"!==this.type_&&m.type!==this.type_||(void 0===h&&(h=m.dts),m.dts=Ko(m.dts,h),m.pts=Ko(m.pts,h),p=m.dts,this.trigger("data",m))},this.flush=function(){h=p,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){h=void 0,p=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};xc.prototype=new n;var Za,Sc_TimestampRolloverStream=xc,Sc_handleRollover=Ko,Ec=function(c,p,h){var m,_="";for(m=p;m>>2;ae*=4,M.timeStamp=ae+=3&Se[7],void 0===I.pts&&void 0===I.dts&&(I.pts=M.timeStamp,I.dts=M.timeStamp),this.trigger("timestamp",M)}I.frames.push(M),L+=10,L+=O}while(L>>4>1&&(k+=_[k]+1),0===y.pid)y.type="pat",c(_.subarray(k),y),this.trigger("data",y);else if(y.pid===this.pmtPid)for(y.type="pmt",c(_.subarray(k),y),this.trigger("data",y);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([_,k,y]):this.processPes_(_,k,y)},this.processPes_=function(_,y,k){k.streamType=k.pid===this.programMapTable.video?Rt.H264_STREAM_TYPE:k.pid===this.programMapTable.audio?Rt.ADTS_STREAM_TYPE:this.programMapTable["timed-metadata"][k.pid],k.type="pes",k.data=_.subarray(y),this.trigger("data",k)}},Ln.prototype=new n,Ln.STREAM_TYPES={h264:27,adts:15},za=function(){var y,c=this,p=!1,h={data:[],size:0},m={data:[],size:0},_={data:[],size:0},I=function(O,M,G){var Zt,fe=new Uint8Array(O.size),Se={type:M},ae=0,Be=0,kt=!1;if(O.data.length&&!(O.size<9)){for(Se.trackId=O.data[0].pid,ae=0;ae>>3,M.pts*=4,M.pts+=(6&O[13])>>>1,M.dts=M.pts,64&G&&(M.dts=(14&O[14])<<27|(255&O[15])<<20|(254&O[16])<<12|(255&O[17])<<5|(254&O[18])>>>3,M.dts*=4,M.dts+=(6&O[18])>>>1)),M.data=O.subarray(9+O[8]))})(fe,Se),kt="video"===M||Se.packetLength<=O.size,(G||kt)&&(O.size=0,O.data.length=0),kt&&c.trigger("data",Se)}};za.prototype.init.call(this),this.push=function(L){({pat:function(){},pes:function(){var M,G;switch(L.streamType){case Rt.H264_STREAM_TYPE:M=h,G="video";break;case Rt.ADTS_STREAM_TYPE:M=m,G="audio";break;case Rt.METADATA_STREAM_TYPE:M=_,G="timed-metadata";break;default:return}L.payloadUnitStartIndicator&&I(M,G,!0),M.data.push(L),M.size+=L.data.byteLength},pmt:function(){var M={type:"metadata",tracks:[]};null!==(y=L.programMapTable).video&&M.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.video,codec:"avc",type:"video"}),null!==y.audio&&M.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.audio,codec:"adts",type:"audio"}),p=!0,c.trigger("data",M)}})[L.type]()},this.reset=function(){h.size=0,h.data.length=0,m.size=0,m.data.length=0,this.trigger("reset")},this.flushStreams_=function(){I(h,"video"),I(m,"audio"),I(_,"timed-metadata")},this.flush=function(){if(!p&&y){var L={type:"metadata",tracks:[]};null!==y.video&&L.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.video,codec:"avc",type:"video"}),null!==y.audio&&L.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.audio,codec:"adts",type:"audio"}),c.trigger("data",L)}p=!1,this.flushStreams_(),this.trigger("done")}},za.prototype=new n;var kc={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:Ka,TransportParseStream:Ln,ElementaryStream:za,TimestampRolloverStream:oy,CaptionStream:qa.CaptionStream,Cea608Stream:qa.Cea608Stream,Cea708Stream:qa.Cea708Stream,MetadataStream:sy};for(var Yo in Rt)Rt.hasOwnProperty(Yo)&&(kc[Yo]=Rt[Yo]);var Ya,Hi=kc,Ac=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];Ya=function(c){var p,h=0;Ya.prototype.init.call(this),this.skipWarn_=function(m,_){this.trigger("log",{level:"warn",message:"adts skiping bytes "+m+" to "+_+" in frame "+h+" outside syncword"})},this.push=function(m){var y,k,I,L,O,_=0;if(c||(h=0),"audio"===m.type){p&&p.length?(I=p,(p=new Uint8Array(I.byteLength+m.data.byteLength)).set(I),p.set(m.data,I.byteLength)):p=m.data;for(var M;_+7>>2],p.byteLength-_<(y=(3&p[_+3])<<11|p[_+4]<<3|(224&p[_+5])>>5))break;this.trigger("data",{pts:m.pts+h*O,dts:m.dts+h*O,sampleCount:L,audioobjecttype:1+(p[_+2]>>>6&3),channelcount:(1&p[_+2])<<2|(192&p[_+3])>>>6,samplerate:Ac[(60&p[_+2])>>>2],samplingfrequencyindex:(60&p[_+2])>>>2,samplesize:16,data:p.subarray(_+7+k,_+y)}),h++,_+=y}else"number"!=typeof M&&(M=_),_++;"number"==typeof M&&(this.skipWarn_(M,_),M=null),p=p.subarray(_)}},this.flush=function(){h=0,this.trigger("done")},this.reset=function(){p=void 0,this.trigger("reset")},this.endTimeline=function(){p=void 0,this.trigger("endedtimeline")}},Ya.prototype=new n;var Ic,wc=Ya;Ic=function(c){var p=c.byteLength,h=0,m=0;this.length=function(){return 8*p},this.bitsAvailable=function(){return 8*p+m},this.loadWord=function(){var _=c.byteLength-p,y=new Uint8Array(4),k=Math.min(4,p);if(0===k)throw new Error("no bytes available");y.set(c.subarray(_,_+k)),h=new DataView(y.buffer).getUint32(0),m=8*k,p-=k},this.skipBits=function(_){var y;m>_?(h<<=_,m-=_):(_-=m,_-=8*(y=Math.floor(_/8)),p-=y,this.loadWord(),h<<=_,m-=_)},this.readBits=function(_){var y=Math.min(m,_),k=h>>>32-y;return(m-=y)>0?h<<=y:p>0&&this.loadWord(),(y=_-y)>0?k<>>_))return h<<=_,m-=_,_;return this.loadWord(),_+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var _=this.skipLeadingZeros();return this.readBits(_+1)-1},this.readExpGolomb=function(){var _=this.readUnsignedExpGolomb();return 1&_?1+_>>>1:-1*(_>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var $a,Rn,Dc,ly=Ic;Rn=function(){var p,h,c=0;Rn.prototype.init.call(this),this.push=function(m){var _;h?((_=new Uint8Array(h.byteLength+m.data.byteLength)).set(h),_.set(m.data,h.byteLength),h=_):h=m.data;for(var y=h.byteLength;c3&&this.trigger("data",h.subarray(c+3)),h=null,c=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},Rn.prototype=new n,Dc={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},$a=function(){var p,h,m,_,y,k,I,c=new Rn;$a.prototype.init.call(this),p=this,this.push=function(L){"video"===L.type&&(h=L.trackId,m=L.pts,_=L.dts,c.push(L))},c.on("data",function(L){var O={trackId:h,pts:m,dts:_,data:L,nalUnitTypeCode:31&L[0]};switch(O.nalUnitTypeCode){case 5:O.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:O.nalUnitType="sei_rbsp",O.escapedRBSP=y(L.subarray(1));break;case 7:O.nalUnitType="seq_parameter_set_rbsp",O.escapedRBSP=y(L.subarray(1)),O.config=k(O.escapedRBSP);break;case 8:O.nalUnitType="pic_parameter_set_rbsp";break;case 9:O.nalUnitType="access_unit_delimiter_rbsp"}p.trigger("data",O)}),c.on("done",function(){p.trigger("done")}),c.on("partialdone",function(){p.trigger("partialdone")}),c.on("reset",function(){p.trigger("reset")}),c.on("endedtimeline",function(){p.trigger("endedtimeline")}),this.flush=function(){c.flush()},this.partialFlush=function(){c.partialFlush()},this.reset=function(){c.reset()},this.endTimeline=function(){c.endTimeline()},I=function(O,M){var Se,G=8,fe=8;for(Se=0;Se=0?h:0,(16&c[p+5])>>4?h+20:h+10},fy=function b(c,p){return c.length-p<10||c[p]!=="I".charCodeAt(0)||c[p+1]!=="D".charCodeAt(0)||c[p+2]!=="3".charCodeAt(0)?p:b(c,p+=Pc(c,p))},Oc=function(c){return c[0]<<21|c[1]<<14|c[2]<<7|c[3]},my=function(c,p,h){return unescape(function(c,p,h){var m,_="";for(m=p;m=p+2&&255==(255&c[p])&&240==(240&c[p+1])&&16==(22&c[p+1])},parseId3TagSize:Pc,parseAdtsSize:function(c,p){return 6144&c[p+3]|c[p+4]<<3|(224&c[p+5])>>5},parseType:function(c,p){return c[p]==="I".charCodeAt(0)&&c[p+1]==="D".charCodeAt(0)&&c[p+2]==="3".charCodeAt(0)?"timed-metadata":!0&c[p]&&240==(240&c[p+1])?"audio":null},parseSampleRate:function(c){for(var p=0;p+5>>2];p++}return null},parseAacTimestamp:function(c){var p,h,m;p=10,64&c[5]&&(p+=4,p+=Oc(c.subarray(10,14)));do{if((h=Oc(c.subarray(p+4,p+8)))<1)return null;if("PRIV"===String.fromCharCode(c[p],c[p+1],c[p+2],c[p+3])){m=c.subarray(p+10,p+h+10);for(var y=0;y>>2;return(L*=4)+(3&I[7])}break}}p+=10,p+=h}while(p=3;)if(c[_]!=="I".charCodeAt(0)||c[_+1]!=="D".charCodeAt(0)||c[_+2]!=="3".charCodeAt(0))if(255!=(255&c[_])||240!=(240&c[_+1]))_++;else{if(c.length-_<7||_+(m=Qa.parseAdtsSize(c,_))>c.length)break;I={type:"audio",data:c.subarray(_,_+m),pts:p,dts:p},this.trigger("data",I),_+=m}else{if(c.length-_<10||_+(m=Qa.parseId3TagSize(c,_))>c.length)break;k={type:"timed-metadata",data:c.subarray(_,_+m)},this.trigger("data",k),_+=m}c=c.length-_>0?c.subarray(_):new Uint8Array},this.reset=function(){c=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){c=new Uint8Array,this.trigger("endedtimeline")}},Xa.prototype=new n;var Mn,en,Ja,vr,Ty=Xa,$o=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],Qo=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Sy=dy.H264Stream,Ey=Qa.isLikelyAacData,ky=function(c,p){p.stream=c,this.trigger("log",p)},Lc=function(c,p){for(var h=Object.keys(p),m=0;m=h?c:(p.minSegmentDts=1/0,c.filter(function(m){return m.dts>=h&&(p.minSegmentDts=Math.min(p.minSegmentDts,m.dts),p.minSegmentPts=p.minSegmentDts,!0)}))}(h,c,_),c.baseMediaDecodeTime=gi_calculateTrackBaseMediaDecodeTime(c,p.keepOriginalTimestamps),Se=Fa_prefixWithSilence(c,I,y,k),c.samples=function(c){var p,m=[];for(p=0;p1&&(p=c.shift(),c.byteLength-=p.byteLength,c.nalCount-=p.nalCount,c[0][0].dts=p.dts,c[0][0].pts=p.pts,c[0][0].duration+=p.duration),c}(O)),_.length){var kt;if(!(kt=p.alignGopsAtEnd?this.alignGopsAtEnd_(O):this.alignGopsAtStart_(O)))return this.gopCache_.unshift({gop:O.pop(),pps:c.pps,sps:c.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),m=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");gi_clearDtsInfo(c),O=kt}gi_collectDtsInfo(c,O),c.samples=function(c,p){var h,m,_,y,I=p||0,L=[];for(h=0;h=-1e4&&G<=45e3&&(!fe||M>G)&&(fe=ae,M=G));return fe?fe.gop:null},this.alignGopsAtStart_=function(I){var L,O,M,G,fe,Se,ae,Be;for(fe=I.byteLength,Se=I.nalCount,ae=I.duration,L=O=0;L<_.length&&OM.pts?L++:(O++,fe-=G.byteLength,Se-=G.nalCount,ae-=G.duration);return 0===O?I:O===I.length?null:((Be=I.slice(O)).byteLength=fe,Be.duration=ae,Be.nalCount=Se,Be.pts=Be[0].pts,Be.dts=Be[0].dts,Be)},this.alignGopsAtEnd_=function(I){var L,O,M,G,fe,Se,ae;for(L=_.length-1,O=I.length-1,fe=null,Se=!1;L>=0&&O>=0;){if((M=_[L]).pts===(G=I[O]).pts){Se=!0;break}M.pts>G.pts?L--:(L===_.length-1&&(fe=O),O--)}if(!Se&&null===fe)return null;if(0===(ae=Se?O:fe))return I;var Be=I.slice(ae),kt=Be.reduce(function(Zt,Tr){return Zt.byteLength+=Tr.byteLength,Zt.duration+=Tr.duration,Zt.nalCount+=Tr.nalCount,Zt},{byteLength:0,duration:0,nalCount:0});return Be.byteLength=kt.byteLength,Be.duration=kt.duration,Be.nalCount=kt.nalCount,Be.pts=Be[0].pts,Be.dts=Be[0].dts,Be},this.alignGopsWith=function(I){_=I}},Mn.prototype=new n,vr=function(c,p){this.numberOfTracks=0,this.metadataStream=p,this.remuxTracks=!(typeof(c=c||{}).remux<"u"&&!c.remux),this.keepOriginalTimestamps="boolean"==typeof c.keepOriginalTimestamps&&c.keepOriginalTimestamps,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,vr.prototype.init.call(this),this.push=function(h){return h.text?this.pendingCaptions.push(h):h.frames?this.pendingMetadata.push(h):(this.pendingTracks.push(h.track),this.pendingBytes+=h.boxes.byteLength,"video"===h.track.type&&(this.videoTrack=h.track,this.pendingBoxes.push(h.boxes)),void("audio"===h.track.type&&(this.audioTrack=h.track,this.pendingBoxes.unshift(h.boxes))))}},vr.prototype=new n,vr.prototype.flush=function(b){var h,m,_,k,c=0,p={captions:[],captionStreams:{},metadata:[],info:{}},y=0;if(this.pendingTracks.length=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(y=this.videoTrack.timelineStartInfo.pts,Qo.forEach(function(I){p.info[I]=this.videoTrack[I]},this)):this.audioTrack&&(y=this.audioTrack.timelineStartInfo.pts,$o.forEach(function(I){p.info[I]=this.audioTrack[I]},this)),this.videoTrack||this.audioTrack){for(p.type=1===this.pendingTracks.length?this.pendingTracks[0].type:"combined",this.emittedTracks+=this.pendingTracks.length,_=function(c){var m,p=d(),h=E(c);return(m=new Uint8Array(p.byteLength+h.byteLength)).set(p),m.set(h,p.byteLength),m}(this.pendingTracks),p.initSegment=new Uint8Array(_.byteLength),p.initSegment.set(_),p.data=new Uint8Array(this.pendingBytes),k=0;k=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},vr.prototype.setRemux=function(b){this.remuxTracks=b},Ja=function(c){var m,_,p=this,h=!0;Ja.prototype.init.call(this),this.baseMediaDecodeTime=(c=c||{}).baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var y={};this.transmuxPipeline_=y,y.type="aac",y.metadataStream=new Hi.MetadataStream,y.aacStream=new Ty,y.audioTimestampRolloverStream=new Hi.TimestampRolloverStream("audio"),y.timedMetadataTimestampRolloverStream=new Hi.TimestampRolloverStream("timed-metadata"),y.adtsStream=new wc,y.coalesceStream=new vr(c,y.metadataStream),y.headOfPipeline=y.aacStream,y.aacStream.pipe(y.audioTimestampRolloverStream).pipe(y.adtsStream),y.aacStream.pipe(y.timedMetadataTimestampRolloverStream).pipe(y.metadataStream).pipe(y.coalesceStream),y.metadataStream.on("timestamp",function(k){y.aacStream.setTimestamp(k.timeStamp)}),y.aacStream.on("data",function(k){"timed-metadata"!==k.type&&"audio"!==k.type||y.audioSegmentStream||(_=_||{timelineStartInfo:{baseMediaDecodeTime:p.baseMediaDecodeTime},codec:"adts",type:"audio"},y.coalesceStream.numberOfTracks++,y.audioSegmentStream=new en(_,c),y.audioSegmentStream.on("log",p.getLogTrigger_("audioSegmentStream")),y.audioSegmentStream.on("timingInfo",p.trigger.bind(p,"audioTimingInfo")),y.adtsStream.pipe(y.audioSegmentStream).pipe(y.coalesceStream),p.trigger("trackinfo",{hasAudio:!!_,hasVideo:!!m}))}),y.coalesceStream.on("data",this.trigger.bind(this,"data")),y.coalesceStream.on("done",this.trigger.bind(this,"done")),Lc(this,y)},this.setupTsPipeline=function(){var y={};this.transmuxPipeline_=y,y.type="ts",y.metadataStream=new Hi.MetadataStream,y.packetStream=new Hi.TransportPacketStream,y.parseStream=new Hi.TransportParseStream,y.elementaryStream=new Hi.ElementaryStream,y.timestampRolloverStream=new Hi.TimestampRolloverStream,y.adtsStream=new wc,y.h264Stream=new Sy,y.captionStream=new Hi.CaptionStream(c),y.coalesceStream=new vr(c,y.metadataStream),y.headOfPipeline=y.packetStream,y.packetStream.pipe(y.parseStream).pipe(y.elementaryStream).pipe(y.timestampRolloverStream),y.timestampRolloverStream.pipe(y.h264Stream),y.timestampRolloverStream.pipe(y.adtsStream),y.timestampRolloverStream.pipe(y.metadataStream).pipe(y.coalesceStream),y.h264Stream.pipe(y.captionStream).pipe(y.coalesceStream),y.elementaryStream.on("data",function(k){var I;if("metadata"===k.type){for(I=k.tracks.length;I--;)m||"video"!==k.tracks[I].type?!_&&"audio"===k.tracks[I].type&&((_=k.tracks[I]).timelineStartInfo.baseMediaDecodeTime=p.baseMediaDecodeTime):(m=k.tracks[I]).timelineStartInfo.baseMediaDecodeTime=p.baseMediaDecodeTime;m&&!y.videoSegmentStream&&(y.coalesceStream.numberOfTracks++,y.videoSegmentStream=new Mn(m,c),y.videoSegmentStream.on("log",p.getLogTrigger_("videoSegmentStream")),y.videoSegmentStream.on("timelineStartInfo",function(L){_&&!c.keepOriginalTimestamps&&(_.timelineStartInfo=L,y.audioSegmentStream.setEarliestDts(L.dts-p.baseMediaDecodeTime))}),y.videoSegmentStream.on("processedGopsInfo",p.trigger.bind(p,"gopInfo")),y.videoSegmentStream.on("segmentTimingInfo",p.trigger.bind(p,"videoSegmentTimingInfo")),y.videoSegmentStream.on("baseMediaDecodeTime",function(L){_&&y.audioSegmentStream.setVideoBaseMediaDecodeTime(L)}),y.videoSegmentStream.on("timingInfo",p.trigger.bind(p,"videoTimingInfo")),y.h264Stream.pipe(y.videoSegmentStream).pipe(y.coalesceStream)),_&&!y.audioSegmentStream&&(y.coalesceStream.numberOfTracks++,y.audioSegmentStream=new en(_,c),y.audioSegmentStream.on("log",p.getLogTrigger_("audioSegmentStream")),y.audioSegmentStream.on("timingInfo",p.trigger.bind(p,"audioTimingInfo")),y.audioSegmentStream.on("segmentTimingInfo",p.trigger.bind(p,"audioSegmentTimingInfo")),y.adtsStream.pipe(y.audioSegmentStream).pipe(y.coalesceStream)),p.trigger("trackinfo",{hasAudio:!!_,hasVideo:!!m})}}),y.coalesceStream.on("data",this.trigger.bind(this,"data")),y.coalesceStream.on("id3Frame",function(k){k.dispatchType=y.metadataStream.dispatchType,p.trigger("id3Frame",k)}),y.coalesceStream.on("caption",this.trigger.bind(this,"caption")),y.coalesceStream.on("done",this.trigger.bind(this,"done")),Lc(this,y)},this.setBaseMediaDecodeTime=function(y){var k=this.transmuxPipeline_;c.keepOriginalTimestamps||(this.baseMediaDecodeTime=y),_&&(_.timelineStartInfo.dts=void 0,_.timelineStartInfo.pts=void 0,gi_clearDtsInfo(_),k.audioTimestampRolloverStream&&k.audioTimestampRolloverStream.discontinuity()),m&&(k.videoSegmentStream&&(k.videoSegmentStream.gopCache_=[]),m.timelineStartInfo.dts=void 0,m.timelineStartInfo.pts=void 0,gi_clearDtsInfo(m),k.captionStream.reset()),k.timestampRolloverStream&&k.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(y){_&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(y)},this.setRemux=function(y){var k=this.transmuxPipeline_;c.remux=y,k&&k.coalesceStream&&k.coalesceStream.setRemux(y)},this.alignGopsWith=function(y){m&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(y)},this.getLogTrigger_=function(y){var k=this;return function(I){I.stream=y,k.trigger("log",I)}},this.push=function(y){if(h){var k=Ey(y);k&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():!k&&"ts"!==this.transmuxPipeline_.type&&this.setupTsPipeline(),h=!1}this.transmuxPipeline_.headOfPipeline.push(y)},this.flush=function(){h=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},Ja.prototype=new n;var Hc,Wc,Jo,Ay={Transmuxer:Ja,VideoSegmentStream:Mn,AudioSegmentStream:en,AUDIO_PROPERTIES:$o,VIDEO_PROPERTIES:Qo,generateSegmentTimingInfo:Xo},es_toUnsigned=function(c){return c>>>0},_r=function(c){var p="";return p+=String.fromCharCode(c[0]),p+=String.fromCharCode(c[1]),(p+=String.fromCharCode(c[2]))+String.fromCharCode(c[3])},Py=es_toUnsigned,ft=function b(c,p){var m,_,y,k,I,h=[];if(!p.length)return null;for(m=0;m1?m+_:c.byteLength,y===p[0]&&(1===p.length?h.push(c.subarray(m+8,k)):(I=b(c.subarray(m+8,k),p.slice(1))).length&&(h=h.concat(I))),m=k;return h},Ly=es_toUnsigned,Ry=e.getUint64,Nc=function(c){return{isLeading:(12&c[0])>>>2,dependsOn:3&c[0],isDependedOn:(192&c[1])>>>6,hasRedundancy:(48&c[1])>>>4,paddingValue:(14&c[1])>>>1,isNonSyncSample:1&c[1],degradationPriority:c[2]<<8|c[3]}},Bc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Un=typeof window<"u"?window:typeof Bc<"u"?Bc:typeof self<"u"?self:{},By=function(c){for(var _,y,p=c.byteLength,h=[],m=1;m0?function(c){var p={version:c[0],flags:new Uint8Array(c.subarray(1,4))};return p.baseMediaDecodeTime=1===p.version?Ry(c.subarray(4)):Ly(c[4]<<24|c[5]<<16|c[6]<<8|c[7]),p}(fe[0]).baseMediaDecodeTime:0,ae=ft(L,["trun"]);p===G&&ae.length>0&&(Be=function(c,p,h){var m=p,_=h.defaultSampleDuration||0,y=h.defaultSampleSize||0,k=h.trackId,I=[];return c.forEach(function(L){var M=function(c){var G,p={version:c[0],flags:new Uint8Array(c.subarray(1,4)),samples:[]},h=new DataView(c.buffer,c.byteOffset,c.byteLength),m=1&p.flags[2],_=4&p.flags[2],y=1&p.flags[1],k=2&p.flags[1],I=4&p.flags[1],L=8&p.flags[1],O=h.getUint32(4),M=8;for(m&&(p.dataOffset=h.getInt32(M),M+=4),_&&O&&(G={flags:Nc(c.subarray(M,M+4))},M+=4,y&&(G.duration=h.getUint32(M),M+=4),k&&(G.size=h.getUint32(M),M+=4),L&&(G.compositionTimeOffset=1===p.version?h.getInt32(M):h.getUint32(M),M+=4),p.samples.push(G),O--);O--;)G={},y&&(G.duration=h.getUint32(M),M+=4),k&&(G.size=h.getUint32(M),M+=4),I&&(G.flags=Nc(c.subarray(M,M+4)),M+=4),L&&(G.compositionTimeOffset=1===p.version?h.getInt32(M):h.getUint32(M),M+=4),p.samples.push(G);return p}(L).samples;M.forEach(function(G){void 0===G.duration&&(G.duration=_),void 0===G.size&&(G.size=y),G.trackId=k,G.dts=m,void 0===G.compositionTimeOffset&&(G.compositionTimeOffset=0),"bigint"==typeof m?(G.pts=m+Un.BigInt(G.compositionTimeOffset),m+=Un.BigInt(G.duration)):(G.pts=m+G.compositionTimeOffset,m+=G.duration)}),I=I.concat(M)}),I}(ae,Se,M),kt=function(c,p,h){var y,k,I,L,m=new DataView(c.buffer,c.byteOffset,c.byteLength),_={logs:[],seiNals:[]};for(k=0;k+40;){var G=h.shift();this.parse(G,L,O)}return M=function(c,p,h){if(null===p)return null;var _=Wy(c,p)[p]||{};return{seiNals:_.seiNals,logs:_.logs,timescale:h}}(I,m,_),M&&M.logs&&(y.logs=y.logs.concat(M.logs)),null!==M&&M.seiNals?(this.pushNals(M.seiNals),this.flushStream(),y):y.logs.length?{logs:y.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(I){if(!this.isInitialized()||!I||0===I.length)return null;I.forEach(function(L){p.push(L)})},this.flushStream=function(){if(!this.isInitialized())return null;k?p.partialFlush():p.flush()},this.clearParsedCaptions=function(){y.captions=[],y.captionStreams={},y.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;p.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){h=[],m=null,_=null,y?this.clearParsedCaptions():y={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},ts=es_toUnsigned,Fn=function(c){return("00"+c.toString(16)).slice(-2)},zy=e.getUint64;Hc=function(c,p){var m=ft(p,["moof","traf"]).reduce(function(_,y){var G,fe,k=ft(y,["tfhd"])[0],I=ts(k[4]<<24|k[5]<<16|k[6]<<8|k[7]),L=c[I]||9e4,O=ft(y,["tfdt"])[0],M=new DataView(O.buffer,O.byteOffset,O.byteLength);return"bigint"==typeof(G=1===O[0]?zy(O.subarray(4,12)):M.getUint32(4))?fe=G/Un.BigInt(L):"number"==typeof G&&!isNaN(G)&&(fe=G/L),fe11?(_.codec+=".",_.codec+=Fn(Se[9]),_.codec+=Fn(Se[10]),_.codec+=Fn(Se[11])):_.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(_.codec)?(Se=fe.subarray(28),"esds"===_r(Se.subarray(4,8))&&Se.length>20&&0!==Se[19]?(_.codec+="."+Fn(Se[19]),_.codec+="."+Fn(Se[20]>>>2&63).replace(/^0/,"")):_.codec="mp4a.40.2"):_.codec=_.codec.toLowerCase())}var Be=ft(m,["mdia","mdhd"])[0];Be&&(_.timescale=Jo(Be)),h.push(_)}),h};var Gc_startTime=Hc,Gc_tracks=Wc,Zc=function(c){var p=31&c[1];return(p<<=8)|c[2]},is=function(c){return!!(64&c[1])},rs=function(c){var p=0;return(48&c[3])>>>4>1&&(p+=c[4]+1),p},eu=function(c){switch(c){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},tT={parseType:function(c,p){var h=Zc(c);return 0===h?"pat":h===p?"pmt":p?"pes":null},parsePat:function(c){var p=is(c),h=4+rs(c);return p&&(h+=c[h]+1),(31&c[h+10])<<8|c[h+11]},parsePmt:function(c){var p={},h=is(c),m=4+rs(c);if(h&&(m+=c[m]+1),1&c[m+5]){var y;y=3+((15&c[m+1])<<8|c[m+2])-4;for(var I=12+((15&c[m+10])<<8|c[m+11]);I=c.byteLength)return null;var _,m=null;return 192&(_=c[h+7])&&((m={}).pts=(14&c[h+9])<<27|(255&c[h+10])<<20|(254&c[h+11])<<12|(255&c[h+12])<<5|(254&c[h+13])>>>3,m.pts*=4,m.pts+=(6&c[h+13])>>>1,m.dts=m.pts,64&_&&(m.dts=(14&c[h+14])<<27|(255&c[h+15])<<20|(254&c[h+16])<<12|(255&c[h+17])<<5|(254&c[h+18])>>>3,m.dts*=4,m.dts+=(6&c[h+18])>>>1)),m},videoPacketContainsKeyFrame:function(c){for(var p=4+rs(c),h=c.subarray(p),m=0,_=0,y=!1;_3&&"slice_layer_without_partitioning_rbsp_idr"===eu(31&h[_+3])&&(y=!0),y}},tn=Sc_handleRollover,tt={};tt.ts=tT,tt.aac=Qa;var yr=9e4,Gt=188,Kc=function(c,p,h){for(var y,I,L,O,m=0,_=Gt,M=!1;_<=c.byteLength;)if(71!==c[m]||71!==c[_]&&_!==c.byteLength)m++,_++;else{if("pes"===(y=c.subarray(m,_),tt.ts.parseType(y,p.pid))&&(I=tt.ts.parsePesType(y,p.table),L=tt.ts.parsePayloadUnitStartIndicator(y),"audio"===I&&L&&(O=tt.ts.parsePesTime(y))&&(O.type="audio",h.audio.push(O),M=!0)),M)break;m+=Gt,_+=Gt}for(m=(_=c.byteLength)-Gt,M=!1;m>=0;)if(71!==c[m]||71!==c[_]&&_!==c.byteLength)m--,_--;else{if("pes"===(y=c.subarray(m,_),tt.ts.parseType(y,p.pid))&&(I=tt.ts.parsePesType(y,p.table),L=tt.ts.parsePayloadUnitStartIndicator(y),"audio"===I&&L&&(O=tt.ts.parsePesTime(y))&&(O.type="audio",h.audio.push(O),M=!0)),M)break;m-=Gt,_-=Gt}},rT=function(c,p,h){for(var y,I,L,O,M,G,fe,m=0,_=Gt,Se=!1,ae={data:[],size:0};_=0;)if(71!==c[m]||71!==c[_])m--,_--;else{if("pes"===(y=c.subarray(m,_),tt.ts.parseType(y,p.pid))&&(I=tt.ts.parsePesType(y,p.table),L=tt.ts.parsePayloadUnitStartIndicator(y),"video"===I&&L&&(O=tt.ts.parsePesTime(y))&&(O.type="video",h.video.push(O),Se=!0)),Se)break;m-=Gt,_-=Gt}},uT_inspect=function(c,p){var m;return m=tt.aac.isLikelyAacData(c)?function(c){for(var I,p=!1,h=0,m=null,_=null,y=0,k=0;c.length-k>=3;){switch(tt.aac.parseType(c,k)){case"timed-metadata":if(c.length-k<10){p=!0;break}if((y=tt.aac.parseId3TagSize(c,k))>c.length){p=!0;break}null===_&&(I=c.subarray(k,k+y),_=tt.aac.parseAacTimestamp(I)),k+=y;break;case"audio":if(c.length-k<7){p=!0;break}if((y=tt.aac.parseAdtsSize(c,k))>c.length){p=!0;break}null===m&&(I=c.subarray(k,k+y),m=tt.aac.parseSampleRate(I)),h++,k+=y;break;default:k++}if(p)return null}if(null===m||null===_)return null;var O=yr/m;return{audio:[{type:"audio",dts:_,pts:_},{type:"audio",dts:_+1024*h*O,pts:_+1024*h*O}]}}(c):function(c){var p={pid:null,table:null},h={};for(var m in function(c,p){for(var _,h=0,m=Gt;m"u"||isNaN(h))&&(h=c.audio[0].dts),c.audio.forEach(function(y){y.dts=tn(y.dts,h),y.pts=tn(y.pts,h),y.dtsTime=y.dts/yr,y.ptsTime=y.pts/yr})}if(c.video&&c.video.length){var m=p;if((typeof m>"u"||isNaN(m))&&(m=c.video[0].dts),c.video.forEach(function(y){y.dts=tn(y.dts,m),y.pts=tn(y.pts,m),y.dtsTime=y.dts/yr,y.ptsTime=y.pts/yr}),c.firstKeyFrame){var _=c.firstKeyFrame;_.dts=tn(_.dts,m),_.pts=tn(_.pts,m),_.dtsTime=_.dts/yr,_.ptsTime=_.pts/yr}}}(m,p),m):null},zc=function(){function b(p,h){this.options=h||{},this.self=p,this.init()}var c=b.prototype;return c.init=function(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Ay.Transmuxer(this.options),function(c,p){p.on("data",function(h){var m=h.initSegment;h.initSegment={data:m.buffer,byteOffset:m.byteOffset,byteLength:m.byteLength};var _=h.data;h.data=_.buffer,c.postMessage({action:"data",segment:h,byteOffset:_.byteOffset,byteLength:_.byteLength},[h.data])}),p.on("done",function(h){c.postMessage({action:"done"})}),p.on("gopInfo",function(h){c.postMessage({action:"gopInfo",gopInfo:h})}),p.on("videoSegmentTimingInfo",function(h){var m={start:{decode:Qe_videoTsToSeconds(h.start.dts),presentation:Qe_videoTsToSeconds(h.start.pts)},end:{decode:Qe_videoTsToSeconds(h.end.dts),presentation:Qe_videoTsToSeconds(h.end.pts)},baseMediaDecodeTime:Qe_videoTsToSeconds(h.baseMediaDecodeTime)};h.prependedContentDuration&&(m.prependedContentDuration=Qe_videoTsToSeconds(h.prependedContentDuration)),c.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:m})}),p.on("audioSegmentTimingInfo",function(h){var m={start:{decode:Qe_videoTsToSeconds(h.start.dts),presentation:Qe_videoTsToSeconds(h.start.pts)},end:{decode:Qe_videoTsToSeconds(h.end.dts),presentation:Qe_videoTsToSeconds(h.end.pts)},baseMediaDecodeTime:Qe_videoTsToSeconds(h.baseMediaDecodeTime)};h.prependedContentDuration&&(m.prependedContentDuration=Qe_videoTsToSeconds(h.prependedContentDuration)),c.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:m})}),p.on("id3Frame",function(h){c.postMessage({action:"id3Frame",id3Frame:h})}),p.on("caption",function(h){c.postMessage({action:"caption",caption:h})}),p.on("trackinfo",function(h){c.postMessage({action:"trackinfo",trackInfo:h})}),p.on("audioTimingInfo",function(h){c.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:Qe_videoTsToSeconds(h.start),end:Qe_videoTsToSeconds(h.end)}})}),p.on("videoTimingInfo",function(h){c.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:Qe_videoTsToSeconds(h.start),end:Qe_videoTsToSeconds(h.end)}})}),p.on("log",function(h){c.postMessage({action:"log",log:h})})}(this.self,this.transmuxer)},c.pushMp4Captions=function(h){this.captionParser||(this.captionParser=new Ky,this.captionParser.init());var m=new Uint8Array(h.data,h.byteOffset,h.byteLength),_=this.captionParser.parse(m,h.trackIds,h.timescales);this.self.postMessage({action:"mp4Captions",captions:_&&_.captions||[],logs:_&&_.logs||[],data:m.buffer},[m.buffer])},c.probeMp4StartTime=function(h){var _=h.data,y=Gc_startTime(h.timescales,_);this.self.postMessage({action:"probeMp4StartTime",startTime:y,data:_},[_.buffer])},c.probeMp4Tracks=function(h){var m=h.data,_=Gc_tracks(m);this.self.postMessage({action:"probeMp4Tracks",tracks:_,data:m},[m.buffer])},c.probeTs=function(h){var m=h.data,_=h.baseStartTime,y="number"!=typeof _||isNaN(_)?void 0:9e4*_,k=uT_inspect(m,y),I=null;k&&((I={hasVideo:k.video&&2===k.video.length||!1,hasAudio:k.audio&&2===k.audio.length||!1}).hasVideo&&(I.videoStart=k.video[0].ptsTime),I.hasAudio&&(I.audioStart=k.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:I,data:m},[m.buffer])},c.clearAllMp4Captions=function(){this.captionParser&&this.captionParser.clearAllCaptions()},c.clearParsedMp4Captions=function(){this.captionParser&&this.captionParser.clearParsedCaptions()},c.push=function(h){var m=new Uint8Array(h.data,h.byteOffset,h.byteLength);this.transmuxer.push(m)},c.reset=function(){this.transmuxer.reset()},c.setTimestampOffset=function(h){this.transmuxer.setBaseMediaDecodeTime(Math.round(Qe_secondsToVideoTs(h.timestampOffset||0)))},c.setAudioAppendStart=function(h){this.transmuxer.setAudioAppendStart(Math.ceil(Qe_secondsToVideoTs(h.appendStart)))},c.setRemux=function(h){this.transmuxer.setRemux(h.remux)},c.flush=function(h){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})},c.endTimeline=function(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})},c.alignGopsWith=function(h){this.transmuxer.alignGopsWith(h.gopsToAlignWith.slice())},b}();self.onmessage=function(b){"init"===b.data.action&&b.data.options?this.messageHandlers=new zc(self,b.data.options):(this.messageHandlers||(this.messageHandlers=new zc(self)),b.data&&b.data.action&&"init"!==b.data.action&&this.messageHandlers[b.data.action]&&this.messageHandlers[b.data.action](b.data))}})),Hm=Pd(jm),Rd=function(n){var t=n.transmuxer,i=n.bytes,e=n.audioAppendStart,r=n.gopsToAlignWith,a=n.remux,o=n.onData,l=n.onTrackInfo,d=n.onAudioTimingInfo,f=n.onVideoTimingInfo,v=n.onVideoSegmentTimingInfo,g=n.onAudioSegmentTimingInfo,T=n.onId3,E=n.onCaptions,x=n.onDone,S=n.onEndedTimeline,U=n.onTransmuxerLog,F=n.isEndOfTimeline,j={buffer:[]},W=F;if(t.onmessage=function(ye){t.currentTransmux===n&&("data"===ye.data.action&&function(n,t,i){var e=n.data.segment,r=e.type,a=e.initSegment,f=e.videoFrameDtsTime,v=e.videoFramePtsTime;t.buffer.push({captions:e.captions,captionStreams:e.captionStreams,metadata:e.metadata});var g=n.data.segment.boxes||{data:n.data.segment.data},T={type:r,data:new Uint8Array(g.data,g.data.byteOffset,g.data.byteLength),initSegment:new Uint8Array(a.data,a.byteOffset,a.byteLength)};typeof f<"u"&&(T.videoFrameDtsTime=f),typeof v<"u"&&(T.videoFramePtsTime=v),i(T)}(ye,j,o),"trackinfo"===ye.data.action&&l(ye.data.trackInfo),"gopInfo"===ye.data.action&&function(n,t){t.gopInfo=n.data.gopInfo}(ye,j),"audioTimingInfo"===ye.data.action&&d(ye.data.audioTimingInfo),"videoTimingInfo"===ye.data.action&&f(ye.data.videoTimingInfo),"videoSegmentTimingInfo"===ye.data.action&&v(ye.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===ye.data.action&&g(ye.data.audioSegmentTimingInfo),"id3Frame"===ye.data.action&&T([ye.data.id3Frame],ye.data.id3Frame.dispatchType),"caption"===ye.data.action&&E(ye.data.caption),"endedtimeline"===ye.data.action&&(W=!1,S()),"log"===ye.data.action&&U(ye.data.log),"transmuxed"===ye.data.type&&(W||(t.onmessage=null,function(n){var t=n.transmuxedData,i=n.callback;t.buffer=[],i(t)}({transmuxedData:j,callback:x}),Md(t))))},e&&t.postMessage({action:"setAudioAppendStart",appendStart:e}),Array.isArray(r)&&t.postMessage({action:"alignGopsWith",gopsToAlignWith:r}),typeof a<"u"&&t.postMessage({action:"setRemux",remux:a}),i.byteLength){var ne=i instanceof ArrayBuffer?i:i.buffer,he=i instanceof ArrayBuffer?0:i.byteOffset;t.postMessage({action:"push",data:ne,byteOffset:he,byteLength:i.byteLength},[ne])}F&&t.postMessage({action:"endTimeline"}),t.postMessage({action:"flush"})},Md=function(n){n.currentTransmux=null,n.transmuxQueue.length&&(n.currentTransmux=n.transmuxQueue.shift(),"function"==typeof n.currentTransmux?n.currentTransmux():Rd(n.currentTransmux))},Nd=function(n,t){n.postMessage({action:t}),Md(n)},Do_reset=function(n){!function(n,t){if(!t.currentTransmux)return t.currentTransmux=n,void Nd(t,n);t.transmuxQueue.push(Nd.bind(null,t,n))}("reset",n)},ka=function(n){var t=n.transmuxer,i=n.endAction||n.action,e=n.callback,r=gt({},n,{endAction:null,transmuxer:null,callback:null});if(t.addEventListener("message",function d(f){f.data.action===i&&(t.removeEventListener("message",d),f.data.data&&(f.data.data=new Uint8Array(f.data.data,n.byteOffset||0,n.byteLength||f.data.data.byteLength),n.data&&(n.data=f.data.data)),e(f.data))}),n.data){var o=n.data instanceof ArrayBuffer;r.byteOffset=o?0:n.data.byteOffset,r.byteLength=n.data.byteLength,t.postMessage(r,[o?n.data:n.data.buffer])}else t.postMessage(r)},Po=function(n){n.forEach(function(t){t.abort()})},Oo=function(n,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:-101,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:-102,xhr:t}:n?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:2,xhr:t}:"arraybuffer"===t.responseType&&0===t.response.byteLength?{status:t.status,message:"Empty HLS response at URL: "+t.uri,code:2,xhr:t}:null},Bd=function(n,t,i){return function(e,r){var a=r.response,o=Oo(e,r);if(o)return i(o,n);if(16!==a.byteLength)return i({status:r.status,message:"Invalid HLS key at URL: "+r.uri,code:2,xhr:r},n);for(var l=new DataView(a),d=new Uint32Array([l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12)]),f=0;f0}(x)){t.isFmp4=!0;var S=t.map.tracks,U={isFmp4:!0,hasVideo:!!S.video,hasAudio:!!S.audio};S.audio&&S.audio.codec&&"enca"!==S.audio.codec&&(U.audioCodec=S.audio.codec),S.video&&S.video.codec&&"encv"!==S.video.codec&&(U.videoCodec=S.video.codec),S.video&&S.audio&&(U.isMuxed=!0),e(t,U);var F=function(W){g(t,{data:x,type:U.hasAudio&&!U.isMuxed?"audio":"video"}),W&&W.length&&d(t,W),T(null,t,{})};ka({action:"probeMp4StartTime",timescales:t.map.timescales,data:x,transmuxer:t.transmuxer,callback:function(W){var q=W.data,ne=W.startTime;i=q.buffer,t.bytes=x=q,U.hasAudio&&!U.isMuxed&&r(t,"audio","start",ne),U.hasVideo&&r(t,"video","start",ne),S.video&&q.byteLength&&t.transmuxer?ka({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:t.transmuxer,data:x,timescales:t.map.timescales,trackIds:[S.video.id],callback:function(K){i=K.data.buffer,t.bytes=x=K.data,K.logs.forEach(function(ye){E(N.mergeOptions(ye,{stream:"mp4CaptionParser"}))}),F(K.captions)}}):F()}})}else{if(t.transmuxer)return typeof t.container>"u"&&(t.container=vs(x)),"ts"!==t.container&&"aac"!==t.container?(e(t,{hasAudio:!1,hasVideo:!1}),void T(null,t,{})):void Xm({segment:t,bytes:i,trackInfoFn:e,timingInfoFn:r,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:l,captionsFn:d,isEndOfTimeline:f,endedTimelineFn:v,dataFn:g,doneFn:T,onTransmuxerLog:E});T(null,t,{})}},Vd=function(n,t){var l,i=n.id,e=n.key,r=n.encryptedBytes,a=n.decryptionWorker;a.addEventListener("message",function d(f){if(f.data.source===i){a.removeEventListener("message",d);var v=f.data.decrypted;t(new Uint8Array(v.bytes,v.byteOffset,v.byteLength))}}),l=e.bytes.slice?e.bytes.slice():new Uint32Array(Array.prototype.slice.call(e.bytes)),a.postMessage(Sd({source:i,encrypted:r,key:l,iv:e.iv}),[r.buffer,l.buffer])},rg=function(n){var t=n.xhr,i=n.xhrOptions,r=n.segment,a=n.abortFn,o=n.progressFn,l=n.trackInfoFn,d=n.timingInfoFn,f=n.videoSegmentTimingInfoFn,v=n.audioSegmentTimingInfoFn,g=n.id3Fn,T=n.captionsFn,E=n.isEndOfTimeline,x=n.endedTimelineFn,S=n.dataFn,j=[],W=function(n){var t=n.activeXhrs,i=n.decryptionWorker,e=n.trackInfoFn,r=n.timingInfoFn,a=n.videoSegmentTimingInfoFn,o=n.audioSegmentTimingInfoFn,l=n.id3Fn,d=n.captionsFn,f=n.isEndOfTimeline,v=n.endedTimelineFn,g=n.dataFn,T=n.doneFn,E=n.onTransmuxerLog,x=0,S=!1;return function(U,F){if(!S){if(U)return S=!0,Po(t),T(U,F);if((x+=1)===t.length){var j=function(){if(F.encryptedBytes)return function(n){var i=n.segment,e=n.trackInfoFn,r=n.timingInfoFn,a=n.videoSegmentTimingInfoFn,o=n.audioSegmentTimingInfoFn,l=n.id3Fn,d=n.captionsFn,f=n.isEndOfTimeline,v=n.endedTimelineFn,g=n.dataFn,T=n.doneFn,E=n.onTransmuxerLog;Vd({id:i.requestId,key:i.key,encryptedBytes:i.encryptedBytes,decryptionWorker:n.decryptionWorker},function(x){i.bytes=x,Hd({segment:i,bytes:i.bytes,trackInfoFn:e,timingInfoFn:r,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:l,captionsFn:d,isEndOfTimeline:f,endedTimelineFn:v,dataFn:g,doneFn:T,onTransmuxerLog:E})})}({decryptionWorker:i,segment:F,trackInfoFn:e,timingInfoFn:r,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:l,captionsFn:d,isEndOfTimeline:f,endedTimelineFn:v,dataFn:g,doneFn:T,onTransmuxerLog:E});Hd({segment:F,bytes:F.bytes,trackInfoFn:e,timingInfoFn:r,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:l,captionsFn:d,isEndOfTimeline:f,endedTimelineFn:v,dataFn:g,doneFn:T,onTransmuxerLog:E})};if(F.endOfAllRequests=Date.now(),F.map&&F.map.encryptedBytes&&!F.map.bytes)return Vd({decryptionWorker:i,id:F.requestId+"-init",encryptedBytes:F.map.encryptedBytes,key:F.map.key},function(W){F.map.bytes=W,jd(F,function(q){if(q)return Po(t),T(q,F);j()})});j()}}}}({activeXhrs:j,decryptionWorker:n.decryptionWorker,trackInfoFn:l,timingInfoFn:d,videoSegmentTimingInfoFn:f,audioSegmentTimingInfoFn:v,id3Fn:g,captionsFn:T,isEndOfTimeline:E,endedTimelineFn:x,dataFn:S,doneFn:n.doneFn,onTransmuxerLog:n.onTransmuxerLog});if(r.key&&!r.key.bytes){var q=[r.key];r.map&&!r.map.bytes&&r.map.key&&r.map.key.resolvedUri===r.key.resolvedUri&&q.push(r.map.key);var K=t(N.mergeOptions(i,{uri:r.key.resolvedUri,responseType:"arraybuffer"}),Bd(r,q,W));j.push(K)}if(r.map&&!r.map.bytes){if(r.map.key&&(!r.key||r.key.resolvedUri!==r.map.key.resolvedUri)){var Pe=t(N.mergeOptions(i,{uri:r.map.key.resolvedUri,responseType:"arraybuffer"}),Bd(r,[r.map.key],W));j.push(Pe)}var ot=N.mergeOptions(i,{uri:r.map.resolvedUri,responseType:"arraybuffer",headers:Ao(r.map)}),Ut=function(n){var t=n.segment,i=n.finishProcessingFn;return function(e,r){var a=Oo(e,r);if(a)return i(a,t);var o=new Uint8Array(r.response);if(t.map.key)return t.map.encryptedBytes=o,i(null,t);t.map.bytes=o,jd(t,function(l){if(l)return l.xhr=r,l.status=r.status,i(l,t);i(null,t)})}}({segment:r,finishProcessingFn:W}),Je=t(ot,Ut);j.push(Je)}var fr=N.mergeOptions(i,{uri:r.part&&r.part.resolvedUri||r.resolvedUri,responseType:"arraybuffer",headers:Ao(r)}),si=t(fr,function(n){var t=n.segment,i=n.finishProcessingFn,e=n.responseType;return function(r,a){var o=Oo(r,a);if(o)return i(o,t);var l="arraybuffer"!==e&&a.responseText?function(n){for(var t=new Uint8Array(new ArrayBuffer(n.length)),i=0;i1)return ng("multiple "+i+" codecs found as attributes: "+t[i].join(", ")+". Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs."),void(t[i]=null);t[i]=t[i][0]}),t},Wd=function(n){var t=0;return n.audio&&t++,n.video&&t++,t},An=function(n,t){var i=t.attributes||{},e=Aa(function(n){var t=n.attributes||{};if(t.CODECS)return Xe(t.CODECS)}(t)||[]);if(qd(n,t)&&!e.audio&&!function(n,t){if(!qd(n,t))return!0;var e=n.mediaGroups.AUDIO[(t.attributes||{}).AUDIO];for(var r in e)if(!e[r].uri&&!e[r].playlists)return!0;return!1}(n,t)){var r=Aa(function(n,t){if(!n.mediaGroups.AUDIO||!t)return null;var i=n.mediaGroups.AUDIO[t];if(!i)return null;for(var e in i){var r=i[e];if(r.default&&r.playlists)return Xe(r.playlists[0].attributes.CODECS)}return null}(n,i.AUDIO)||[]);r.audio&&(e.audio=r.audio)}return e},wa=mi("PlaylistSelector"),Gd=function(n){if(n&&n.playlist){var t=n.playlist;return JSON.stringify({id:t.id,bandwidth:n.bandwidth,width:n.width,height:n.height,codecs:t.attributes&&t.attributes.CODECS||""})}},Ia=function(n,t){if(!n)return"";var i=P().getComputedStyle(n);return i?i[t]:""},Qr=function(n,t){var i=n.slice();n.sort(function(e,r){var a=t(e,r);return 0===a?i.indexOf(e)-i.indexOf(r):a})},Lo=function(n,t){var i,e;return n.attributes.BANDWIDTH&&(i=n.attributes.BANDWIDTH),i=i||P().Number.MAX_VALUE,t.attributes.BANDWIDTH&&(e=t.attributes.BANDWIDTH),i-(e||P().Number.MAX_VALUE)},Zd=function(n,t,i,e,r,a){if(n){var o={bandwidth:t,width:i,height:e,limitRenditionByPlayerDimensions:r},l=n.playlists;Yt.isAudioOnly(n)&&(l=a.getAudioTrackPlaylists_(),o.audioOnly=!0);var d=l.map(function(ge){var Pe=ge.attributes&&ge.attributes.RESOLUTION&&ge.attributes.RESOLUTION.width,ot=ge.attributes&&ge.attributes.RESOLUTION&&ge.attributes.RESOLUTION.height;return{bandwidth:ge.attributes&&ge.attributes.BANDWIDTH||P().Number.MAX_VALUE,width:Pe,height:ot,playlist:ge}});Qr(d,function(ge,$e){return ge.bandwidth-$e.bandwidth});var f=(d=d.filter(function(ge){return!Yt.isIncompatible(ge.playlist)})).filter(function(ge){return Yt.isEnabled(ge.playlist)});f.length||(f=d.filter(function(ge){return!Yt.isDisabled(ge.playlist)}));var v=f.filter(function(ge){return ge.bandwidth*Dt.BANDWIDTH_VARIANCEi||ge.height>e})).filter(function(ge){return ge.width===j[0].width&&ge.height===j[0].height}),g=W[W.length-1],q=W.filter(function(ge){return ge.bandwidth===g.bandwidth})[0]),a.experimentalLeastPixelDiffSelector){var he=S.map(function(ge){return ge.pixelDiff=Math.abs(ge.width-i)+Math.abs(ge.height-e),ge});Qr(he,function(ge,$e){return ge.pixelDiff===$e.pixelDiff?$e.bandwidth-ge.bandwidth:ge.pixelDiff-$e.pixelDiff}),ne=he[0]}var K=ne||q||F||T||f[0]||d[0];if(K&&K.playlist){var ye="sortedPlaylistReps";return ne?ye="leastPixelDiffRep":q?ye="resolutionPlusOneRep":F?ye="resolutionBestRep":T?ye="bandwidthBestRep":f[0]&&(ye="enabledPlaylistReps"),wa("choosing "+Gd(K)+" using "+ye+" with options",o),K.playlist}return wa("could not choose a playlist with options",o),null}},Kd=function(){var n=this.useDevicePixelRatio&&P().devicePixelRatio||1;return Zd(this.playlists.master,this.systemBandwidth,parseInt(Ia(this.tech_.el(),"width"),10)*n,parseInt(Ia(this.tech_.el(),"height"),10)*n,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)},wn=function(n,t,i){var e,r;if(i&&i.cues)for(e=i.cues.length;e--;)(r=i.cues[e]).startTime>=n&&r.endTime<=t&&i.removeCue(r)},Yd=function(n){return"number"==typeof n&&isFinite(n)},Da=1/60,Xr=function(n){var t=n.startOfSegment,i=n.duration,e=n.segment,r=n.part,a=n.playlist,o=a.mediaSequence,l=a.id,d=a.segments,v=n.mediaIndex,g=n.partIndex,T=n.timeline,E=(void 0===d?[]:d).length-1,x="mediaIndex/partIndex increment";n.getMediaInfoForTime?x="getMediaInfoForTime ("+n.getMediaInfoForTime+")":n.isSyncRequest&&(x="getSyncSegmentCandidate (isSyncRequest)"),n.independent&&(x+=" with independent "+n.independent);var S="number"==typeof g,U=n.segment.uri?"segment":"pre-segment",F=S?ud({preloadSegment:e})-1:0;return U+" ["+(o+v)+"/"+(o+E)+"]"+(S?" part ["+g+"/"+F+"]":"")+" segment start/end ["+e.start+" => "+e.end+"]"+(S?" part start/end ["+r.start+" => "+r.end+"]":"")+" startOfSegment ["+t+"] duration ["+i+"] timeline ["+T+"] selected by ["+x+"] playlist ["+l+"]"},$d=function(n){return n+"TimingInfo"},Qd=function(n){var t=n.timelineChangeController,e=n.segmentTimeline,r=n.loaderType,a=n.audioDisabled;if(n.currentTimeline===e)return!1;if("audio"===r){var o=t.lastTimelineChange({type:"main"});return!o||o.to!==e}if("main"===r&&a){var l=t.pendingTimelineChange({type:"audio"});return!(l&&l.to===e)}return!1},Xd=function(n){var t=n.segmentDuration,i=n.maxDuration;return!!t&&Math.round(t)>i+Ki},Ro=function(s){function n(i,e){var r;if(r=s.call(this)||this,!i)throw new TypeError("Initialization settings are required");if("function"!=typeof i.currentTime)throw new TypeError("No currentTime getter specified");if(!i.mediaSource)throw new TypeError("No MediaSource specified");return r.bandwidth=i.bandwidth,r.throughput={rate:0,count:0},r.roundTrip=NaN,r.resetStats_(),r.mediaIndex=null,r.partIndex=null,r.hasPlayed_=i.hasPlayed,r.currentTime_=i.currentTime,r.seekable_=i.seekable,r.seeking_=i.seeking,r.duration_=i.duration,r.mediaSource_=i.mediaSource,r.vhs_=i.vhs,r.loaderType_=i.loaderType,r.currentMediaInfo_=void 0,r.startingMediaInfo_=void 0,r.segmentMetadataTrack_=i.segmentMetadataTrack,r.goalBufferLength_=i.goalBufferLength,r.sourceType_=i.sourceType,r.sourceUpdater_=i.sourceUpdater,r.inbandTextTracks_=i.inbandTextTracks,r.state_="INIT",r.timelineChangeController_=i.timelineChangeController,r.shouldSaveSegmentTimingInfo_=!0,r.parse708captions_=i.parse708captions,r.captionServices_=i.captionServices,r.experimentalExactManifestTimings=i.experimentalExactManifestTimings,r.checkBufferTimeout_=null,r.error_=void 0,r.currentTimeline_=-1,r.pendingSegment_=null,r.xhrOptions_=null,r.pendingSegments_=[],r.audioDisabled_=!1,r.isPendingTimestampOffset_=!1,r.gopBuffer_=[],r.timeMapping_=0,r.safeAppend_=N.browser.IE_VERSION>=11,r.appendInitSegment_={audio:!0,video:!0},r.playlistOfLastInitSegment_={audio:null,video:null},r.callQueue_=[],r.loadQueue_=[],r.metadataQueue_={id3:[],caption:[]},r.waitingOnRemove_=!1,r.quotaExceededErrorRetryTimeout_=null,r.activeInitSegmentId_=null,r.initSegments_={},r.cacheEncryptionKeys_=i.cacheEncryptionKeys,r.keyCache_={},r.decrypter_=i.decrypter,r.syncController_=i.syncController,r.syncPoint_={segmentIndex:0,time:0},r.transmuxer_=r.createTransmuxer_(),r.triggerSyncInfoUpdate_=function(){return r.trigger("syncinfoupdate")},r.syncController_.on("syncinfoupdate",r.triggerSyncInfoUpdate_),r.mediaSource_.addEventListener("sourceopen",function(){r.isEndOfStream_()||(r.ended_=!1)}),r.fetchAtBuffer_=!1,r.logger_=mi("SegmentLoader["+r.loaderType_+"]"),Object.defineProperty(Ue(r),"state",{get:function(){return this.state_},set:function(o){o!==this.state_&&(this.logger_(this.state_+" -> "+o),this.state_=o,this.trigger("statechange"))}}),r.sourceUpdater_.on("ready",function(){r.hasEnoughInfoToAppend_()&&r.processCallQueue_()}),"main"===r.loaderType_&&r.timelineChangeController_.on("pendingtimelinechange",function(){r.hasEnoughInfoToAppend_()&&r.processCallQueue_()}),"audio"===r.loaderType_&&r.timelineChangeController_.on("timelinechange",function(){r.hasEnoughInfoToLoad_()&&r.processLoadQueue_(),r.hasEnoughInfoToAppend_()&&r.processCallQueue_()}),r}re(n,s);var t=n.prototype;return t.createTransmuxer_=function(){return function(n){var t=new Hm;t.currentTransmux=null,t.transmuxQueue=[];var i=t.terminate;return t.terminate=function(){return t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)},t.postMessage({action:"init",options:n}),t}({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})},t.resetStats_=function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0},t.dispose=function(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&P().clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()},t.setAudio=function(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())},t.abort=function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)},t.abort_=function(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,P().clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null},t.checkForAbort_=function(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state="READY",!0)},t.error=function(e){return typeof e<"u"&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_},t.endOfStream=function(){this.ended_=!0,this.transmuxer_&&Do_reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")},t.buffered_=function(){var e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return N.createTimeRanges();if("main"===this.loaderType_){var a=e.hasVideo;if(a&&e.hasAudio&&!this.audioDisabled_&&!e.isMuxed)return this.sourceUpdater_.buffered();if(a)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()},t.initSegmentForMap=function(e,r){if(void 0===r&&(r=!1),!e)return null;var a=Ca(e),o=this.initSegments_[a];return r&&!o&&e.bytes&&(this.initSegments_[a]=o={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),o||e},t.segmentKey=function(e,r){if(void 0===r&&(r=!1),!e)return null;var a=Ed(e),o=this.keyCache_[a];this.cacheEncryptionKeys_&&r&&!o&&e.bytes&&(this.keyCache_[a]=o={resolvedUri:e.resolvedUri,bytes:e.bytes});var l={resolvedUri:(o||e).resolvedUri};return o&&(l.bytes=o.bytes),l},t.couldBeginLoading_=function(){return this.playlist_&&!this.paused()},t.load=function(){if(this.monitorBuffer_(),this.playlist_){if("INIT"===this.state&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY")}},t.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},t.playlist=function(e,r){if(void 0===r&&(r={}),e){var a=this.playlist_,o=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=r,"INIT"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},"main"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));var l=null;if(a&&(a.id?l=a.id:a.uri&&(l=a.uri)),this.logger_("playlist update ["+l+" => "+(e.id||e.uri)+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!a||a.uri!==e.uri)return null!==this.mediaIndex&&(e.endList?this.resyncLoader():this.resetLoader()),this.currentMediaInfo_=void 0,void this.trigger("playlistupdate");var d=e.mediaSequence-a.mediaSequence;if(this.logger_("live window shift ["+d+"]"),null!==this.mediaIndex)if(this.mediaIndex-=d,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{var f=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!f.parts||!f.parts.length||!f.parts[this.partIndex])){var v=this.mediaIndex;this.logger_("currently processing part (index "+this.partIndex+") no longer exists."),this.resetLoader(),this.mediaIndex=v}}o&&(o.mediaIndex-=d,o.mediaIndex<0?(o.mediaIndex=null,o.partIndex=null):(o.mediaIndex>=0&&(o.segment=e.segments[o.mediaIndex]),o.partIndex>=0&&o.segment.parts&&(o.part=o.segment.parts[o.partIndex]))),this.syncController_.saveExpiredSegmentInfo(a,e)}},t.pause=function(){this.checkBufferTimeout_&&(P().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)},t.paused=function(){return null===this.checkBufferTimeout_},t.resetEverything=function(e){this.ended_=!1,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))},t.resetLoader=function(){this.fetchAtBuffer_=!1,this.resyncLoader()},t.resyncLoader=function(){this.transmuxer_&&Do_reset(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})},t.remove=function(e,r,a,o){if(void 0===a&&(a=function(){}),void 0===o&&(o=!1),r===1/0&&(r=this.duration_()),r<=e)this.logger_("skipping remove because end ${end} is <= start ${start}");else if(this.sourceUpdater_&&this.getMediaInfo_()){var l=1,d=function(){0==--l&&a()};for(var f in(o||!this.audioDisabled_)&&(l++,this.sourceUpdater_.removeAudio(e,r,d)),(o||"main"===this.loaderType_)&&(this.gopBuffer_=function(n,t,i,e){for(var r=Math.ceil((t-e)*Zn.ONE_SECOND_IN_TS),a=Math.ceil((i-e)*Zn.ONE_SECOND_IN_TS),o=n.slice(),l=n.length;l--&&!(n[l].pts<=a););if(-1===l)return o;for(var d=l+1;d--&&!(n[d].pts<=r););return d=Math.max(d,0),o.splice(d,l-d+1),o}(this.gopBuffer_,e,r,this.timeMapping_),l++,this.sourceUpdater_.removeVideo(e,r,d)),this.inbandTextTracks_)wn(e,r,this.inbandTextTracks_[f]);wn(e,r,this.segmentMetadataTrack_),d()}else this.logger_("skipping remove because no source updater or starting media info")},t.monitorBuffer_=function(){this.checkBufferTimeout_&&P().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=P().setTimeout(this.monitorBufferTick_.bind(this),1)},t.monitorBufferTick_=function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&P().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=P().setTimeout(this.monitorBufferTick_.bind(this),500)},t.fillBuffer_=function(){if(!this.sourceUpdater_.updating()){var e=this.chooseNextRequest_();!e||("number"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e))}},t.isEndOfStream_=function(e,r,a){if(void 0===e&&(e=this.mediaIndex),void 0===r&&(r=this.playlist_),void 0===a&&(a=this.partIndex),!r||!this.mediaSource_)return!1;var o="number"==typeof e&&r.segments[e];return r.endList&&"open"===this.mediaSource_.readyState&&e+1===r.segments.length&&(!o||!o.parts||a+1===o.parts.length)},t.chooseNextRequest_=function(){var e=this.buffered_(),r=ad(e)||0,a=vo(e,this.currentTime_()),o=!this.hasPlayed_()&&a>=1,l=a>=this.goalBufferLength_(),d=this.playlist_.segments;if(!d.length||o||l)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_());var f={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(f.isSyncRequest)f.mediaIndex=function(n,t,i){t=t||[];for(var e=[],r=0,a=0;ai))return a}return 0===e.length?0:e[e.length-1]}(this.currentTimeline_,d,r);else if(null!==this.mediaIndex){var v=d[this.mediaIndex],g="number"==typeof this.partIndex?this.partIndex:-1;f.startOfSegment=v.end?v.end:r,v.parts&&v.parts[g+1]?(f.mediaIndex=this.mediaIndex,f.partIndex=g+1):f.mediaIndex=this.mediaIndex+1}else{var T=Yt.getMediaInfoForTime({experimentalExactManifestTimings:this.experimentalExactManifestTimings,playlist:this.playlist_,currentTime:this.fetchAtBuffer_?r:this.currentTime_(),startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time}),E=T.segmentIndex,x=T.startTime,S=T.partIndex;f.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd "+r:"currentTime "+this.currentTime_(),f.mediaIndex=E,f.startOfSegment=x,f.partIndex=S}var U=d[f.mediaIndex],F=U&&"number"==typeof f.partIndex&&U.parts&&U.parts[f.partIndex];if(!U||"number"==typeof f.partIndex&&!F)return null;if("number"!=typeof f.partIndex&&U.parts&&(f.partIndex=0,F=U.parts[0]),!a&&F&&!F.independent)if(0===f.partIndex){var j=d[f.mediaIndex-1],W=j.parts&&j.parts.length&&j.parts[j.parts.length-1];W&&W.independent&&(f.mediaIndex-=1,f.partIndex=j.parts.length-1,f.independent="previous segment")}else U.parts[f.partIndex-1].independent&&(f.partIndex-=1,f.independent="previous part");return f.mediaIndex>=d.length-1&&this.mediaSource_&&"ended"===this.mediaSource_.readyState&&!this.seeking_()?null:this.generateSegmentInfo_(f)},t.generateSegmentInfo_=function(e){var r=e.independent,a=e.playlist,o=e.mediaIndex,l=e.startOfSegment,d=e.isSyncRequest,f=e.partIndex,v=e.forceTimestampOffset,g=e.getMediaInfoForTime,T=a.segments[o],E="number"==typeof f&&T.parts[f],x={requestId:"segment-loader-"+Math.random(),uri:E&&E.resolvedUri||T.resolvedUri,mediaIndex:o,partIndex:E?f:null,isSyncRequest:d,startOfSegment:l,playlist:a,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:T.timeline,duration:E&&E.duration||T.duration,segment:T,part:E,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:g,independent:r},S=typeof v<"u"?v:this.isPendingTimestampOffset_;x.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:T.timeline,currentTimeline:this.currentTimeline_,startOfSegment:l,buffered:this.buffered_(),overrideCheck:S});var U=ad(this.sourceUpdater_.audioBuffered());return"number"==typeof U&&(x.audioAppendStart=U-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(x.gopsToAlignWith=function(n,t,i){if(typeof t>"u"||null===t||!n.length)return[];var r,e=Math.ceil((t-i+3)*Zn.ONE_SECOND_IN_TS);for(r=0;re);r++);return n.slice(r)}(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),x},t.timestampOffsetForSegment_=function(e){return function(n){var t=n.segmentTimeline,i=n.currentTimeline,e=n.startOfSegment,r=n.buffered;return n.overrideCheck||t!==i?t "+T+" for "+f),function(n,t,i){if(!n[i]){t.trigger({type:"usage",name:"vhs-608"}),t.trigger({type:"usage",name:"hls-608"});var e=i;/^cc708_/.test(i)&&(e="SERVICE"+i.split("_")[1]);var r=t.textTracks().getTrackById(e);if(r)n[i]=r;else{var o=i,l=i,d=!1,f=(t.options_.vhs&&t.options_.vhs.captionServices||{})[e];f&&(o=f.label,l=f.language,d=f.default),n[i]=t.addRemoteTextTrack({kind:"captions",id:e,default:d,label:o,language:l},!1).track}}}(x,a.vhs_.tech_,f),wn(g,T,x[f]),function(n){var t=n.inbandTextTracks,i=n.captionArray,e=n.timestampOffset;if(i){var r=P().WebKitDataCue||P().VTTCue;i.forEach(function(a){t[a.stream].addCue(new r(a.startTime+e,a.endTime+e,a.text))})}}({captionArray:E,inbandTextTracks:x,timestampOffset:l})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}},t.handleId3_=function(e,r,a){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)){if(!this.pendingSegment_.hasAppendedData_)return void this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,r,a));var l=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();(function(n,t,i){n.metadataTrack_||(n.metadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,n.metadataTrack_.inBandMetadataTrackDispatchType=t)})(this.inbandTextTracks_,a,this.vhs_.tech_),function(n){var t=n.inbandTextTracks,i=n.metadataArray,e=n.timestampOffset,r=n.videoDuration;if(i){var a=P().WebKitDataCue||P().VTTCue,o=t.metadataTrack_;if(o&&(i.forEach(function(T){var E=T.cueTime+e;"number"!=typeof E||P().isNaN(E)||E<0||!(E<1/0)||T.frames.forEach(function(x){var S=new a(E,E,x.value||x.url||x.data||"");S.frame=x,S.value=x,function(n){Object.defineProperties(n.frame,{id:{get:function(){return N.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),n.value.key}},value:{get:function(){return N.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),n.value.data}},privateData:{get:function(){return N.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),n.value.data}}})}(S),o.addCue(S)})}),o.cues&&o.cues.length)){for(var l=o.cues,d=[],f=0;f1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+cr(f).join(", ")),v.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+cr(v).join(", "));var g=f.length?f.start(0):0,T=f.length?f.end(f.length-1):0,E=v.length?v.start(0):0,x=v.length?v.end(v.length-1):0;if(T-g<=1&&x-E<=1)return this.logger_("On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: "+d.byteLength+", audio buffer: "+cr(f).join(", ")+", video buffer: "+cr(v).join(", ")+", "),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),void this.trigger("error");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:o,type:l,bytes:d}));var U=this.currentTime_()-1;this.logger_("On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to "+U),this.remove(0,U,function(){a.logger_("On QUOTA_EXCEEDED_ERR, retrying append in 1s"),a.waitingOnRemove_=!1,a.quotaExceededErrorRetryTimeout_=P().setTimeout(function(){a.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),a.quotaExceededErrorRetryTimeout_=null,a.processCallQueue_()},1e3)},!0)},t.handleAppendError_=function(e,r){var a=e.segmentInfo,o=e.type,l=e.bytes;if(r){if(22===r.code)return void this.handleQuotaExceededError_({segmentInfo:a,type:o,bytes:l});this.logger_("Received non QUOTA_EXCEEDED_ERR on append",r),this.error(o+" append of "+l.length+"b failed for segment #"+a.mediaIndex+" in playlist "+a.playlist.id),this.trigger("appenderror")}},t.appendToSourceBuffer_=function(e){var r=e.segmentInfo,a=e.type,o=e.initSegment,l=e.data,d=e.bytes;if(!d){var f=[l],v=l.byteLength;o&&(f.unshift(o),v+=o.byteLength),d=function(n){var i,t=0;return n.bytes&&(i=new Uint8Array(n.bytes),n.segments.forEach(function(e){i.set(e,t),t+=e.byteLength})),i}({bytes:v,segments:f})}this.sourceUpdater_.appendBuffer({segmentInfo:r,type:a,bytes:d},this.handleAppendError_.bind(this,{segmentInfo:r,type:a,bytes:d}))},t.handleSegmentTimingInfo_=function(e,r,a){if(this.pendingSegment_&&r===this.pendingSegment_.requestId){var o=this.pendingSegment_.segment,l=e+"TimingInfo";o[l]||(o[l]={}),o[l].transmuxerPrependedSeconds=a.prependedContentDuration||0,o[l].transmuxedPresentationStart=a.start.presentation,o[l].transmuxedDecodeStart=a.start.decode,o[l].transmuxedPresentationEnd=a.end.presentation,o[l].transmuxedDecodeEnd=a.end.decode,o[l].baseMediaDecodeTime=a.baseMediaDecodeTime}},t.appendData_=function(e,r){var a=r.type,o=r.data;if(o&&o.byteLength&&("audio"!==a||!this.audioDisabled_)){var l=this.getInitSegmentAndUpdateState_({type:a,initSegment:r.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:a,initSegment:l,data:o})}},t.loadSegment_=function(e){var r=this;this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),"number"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.hasEnoughInfoToLoad_()?this.updateTransmuxerAndRequestSegment_(e):this.loadQueue_.push(function(){var a=gt({},e,{forceTimestampOffset:!0});gt(e,r.generateSegmentInfo_(a)),r.isPendingTimestampOffset_=!1,r.updateTransmuxerAndRequestSegment_(e)})},t.updateTransmuxerAndRequestSegment_=function(e){var r=this;this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));var a=this.createSimplifiedSegmentObj_(e),f=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)||null!==this.mediaIndex&&e.timeline!==this.currentTimeline_&&e.timeline>0;this.logger_("Requesting "+Xr(e)),a.map&&!a.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=rg({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:a,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:f,endedTimelineFn:function(){r.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:function(g){var T=g.message,E=g.level,x=g.stream;r.logger_(Xr(e)+" logged from transmuxer stream "+x+" as a "+E+": "+T)}})},t.trimBackBuffer_=function(e){var r=function(n,t,i){var e=t-Dt.BACK_BUFFER_LENGTH;return n.length&&(e=Math.max(e,n.start(0))),Math.min(t-i,e)}(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);r>0&&this.remove(0,r)},t.createSimplifiedSegmentObj_=function(e){var r=e.segment,a=e.part,o={resolvedUri:a?a.resolvedUri:r.resolvedUri,byterange:a?a.byterange:r.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part},l=e.playlist.segments[e.mediaIndex-1];if(l&&l.timeline===r.timeline&&(l.videoTimingInfo?o.baseStartTime=l.videoTimingInfo.transmuxedDecodeEnd:l.audioTimingInfo&&(o.baseStartTime=l.audioTimingInfo.transmuxedDecodeEnd)),r.key){var d=r.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);o.key=this.segmentKey(r.key),o.key.iv=d}return r.map&&(o.map=this.initSegmentForMap(r.map)),o},t.saveTransferStats_=function(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)},t.saveBandwidthRelatedStats_=function(e,r){this.pendingSegment_.byteLength=r.bytesReceived,e=e);r++);return n.slice(0,r).concat(t)}(this.gopBuffer_,a.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(o)}},t.setTimeMapping_=function(e){var r=this.syncController_.mappingForTimeline(e);null!==r&&(this.timeMapping_=r)},t.updateMediaSecondsLoaded_=function(e){this.mediaSecondsLoaded+="number"==typeof e.start&&"number"==typeof e.end?e.end-e.start:e.duration},t.shouldUpdateTransmuxerTimestampOffset_=function(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())},t.trueSegmentStart_=function(e){var r=e.currentStart,o=e.mediaIndex,l=e.firstVideoFrameTimeForData;if(typeof r<"u")return r;if(!e.useVideoTimingInfo)return e.audioTimingInfo.start;var T=e.playlist.segments[o-1];return 0===o||!T||typeof T.start>"u"||T.end!==l+e.currentVideoTimestampOffset?l:e.videoTimingInfo.start},t.waitForAppendsToComplete_=function(e){var r=this.getCurrentMediaInfo_(e);if(!r)return this.error({message:"No starting media returned, likely due to an unsupported media format.",blacklistDuration:1/0}),void this.trigger("error");var d="main"===this.loaderType_&&r.hasVideo,f=!this.audioDisabled_&&r.hasAudio&&!r.isMuxed;if(e.waitingOnAppends=0,!e.hasAppendedData_)return!e.timingInfo&&"number"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);d&&e.waitingOnAppends++,f&&e.waitingOnAppends++,d&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),f&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))},t.checkAppendsDone_=function(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())},t.checkForIllegalMediaSwitch=function(e){var r=function(n,t,i){return"main"===n&&t&&i?i.hasAudio||i.hasVideo?t.hasVideo&&!i.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!t.hasVideo&&i.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null}(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!r&&(this.error({message:r,blacklistDuration:1/0}),this.trigger("error"),!0)},t.updateSourceBufferTimestampOffset_=function(e){if(null!==e.timestampOffset&&"number"==typeof e.timingInfo.start&&!e.changedTimestampOffset&&"main"===this.loaderType_){var r=!1;e.timestampOffset-=e.timingInfo.start,e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),r=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),r=!0),r&&this.trigger("timestampoffset")}},t.updateTimingInfoEnd_=function(e){e.timingInfo=e.timingInfo||{};var r=this.getMediaInfo_(),o="main"===this.loaderType_&&r&&r.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;!o||(e.timingInfo.end="number"==typeof o.end?o.end:o.start+e.duration)},t.handleAppendsDone_=function(){if(this.pendingSegment_&&this.trigger("appendsdone"),!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var e=this.pendingSegment_;this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:"main"===this.loaderType_});var r=function(n,t){if("hls"!==t)return null;var i=function(n){var t=0;return["video","audio"].forEach(function(i){var e=n[i+"TimingInfo"];if(e){var o,r=e.start,a=e.end;"bigint"==typeof r||"bigint"==typeof a?o=P().BigInt(a)-P().BigInt(r):"number"==typeof r&&"number"==typeof a&&(o=a-r),typeof o<"u"&&o>t&&(t=o)}}),"bigint"==typeof t&&t3*e.playlist.targetDuration,d=o&&o.end&&this.currentTime_()-o.end>3*e.playlist.partTargetDuration;if(l||d)return this.logger_("bad "+(l?"segment":"part")+" "+Xr(e)),void this.resetEverything();null!==this.mediaIndex&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}else this.logger_("Throwing away un-appended sync request "+Xr(e))},t.recordThroughput_=function(e){if(e.duration"u"||(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_},t.remove=function(e,r){wn(e,r,this.subtitlesTrack_)},t.fillBuffer_=function(){var e=this,r=this.chooseNextRequest_();if(r){if(null===this.syncController_.timestampOffsetForTimeline(r.timeline))return this.syncController_.one("timestampoffset",function(){e.state="READY",e.paused()||e.monitorBuffer_()}),void(this.state="WAITING_ON_TIMELINE");this.loadSegment_(r)}},t.timestampOffsetForSegment_=function(){return null},t.chooseNextRequest_=function(){return this.skipEmptySegments_(s.prototype.chooseNextRequest_.call(this))},t.skipEmptySegments_=function(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e},t.stopForError=function(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")},t.segmentRequestFinished_=function(e,r,a){var o=this;if(this.subtitlesTrack_){if(this.saveTransferStats_(r.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return-101===e.code&&this.handleTimeout_(),-102===e.code?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);var l=this.pendingSegment_;this.saveBandwidthRelatedStats_(l.duration,r.stats),this.state="APPENDING",this.trigger("appending");var d=l.segment;if(d.map&&(d.map.bytes=r.map.bytes),l.bytes=r.bytes,"function"!=typeof P().WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var f,v=function(){o.subtitlesTrack_.tech_.off("vttjsloaded",f),o.stopForError({message:"Error loading vtt.js"})};return f=function(){o.subtitlesTrack_.tech_.off("vttjserror",v),o.segmentRequestFinished_(e,r,a)},this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",f),void this.subtitlesTrack_.tech_.one("vttjserror",v)}d.requested=!0;try{this.parseVTTCues_(l)}catch(g){return void this.stopForError({message:g.message})}if(this.updateTimeMapping_(l,this.syncController_.timelines[l.timeline],this.playlist_),l.timingInfo=l.cues.length?{start:l.cues[0].startTime,end:l.cues[l.cues.length-1].endTime}:{start:l.startOfSegment,end:l.startOfSegment+l.duration},l.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");l.byteLength=l.bytes.byteLength,this.mediaSecondsLoaded+=d.duration,l.cues.forEach(function(g){o.subtitlesTrack_.addCue(o.featuresNativeTextTracks_?new(P().VTTCue)(g.startTime,g.endTime,g.text):g)}),function(n){var t=n.cues;if(t)for(var i=0;i1&&e.push(t[a]);e.length&&e.forEach(function(o){return n.removeCue(o)})}}(this.subtitlesTrack_),this.handleAppendsDone_()}else this.state="READY"},t.handleData_=function(){},t.updateTimingInfoEnd_=function(){},t.parseVTTCues_=function(e){var r,a=!1;"function"==typeof P().TextDecoder?r=new(P().TextDecoder)("utf8"):(r=P().WebVTT.StringDecoder(),a=!0);var o=new(P().WebVTT.Parser)(P(),P().vttjs,r);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},o.oncue=e.cues.push.bind(e.cues),o.ontimestampmap=function(f){e.timestampmap=f},o.onparsingerror=function(f){N.log.warn("Error encountered when parsing cues: "+f.message)},e.segment.map){var l=e.segment.map.bytes;a&&(l=rc(l)),o.parse(l)}var d=e.bytes;a&&(d=rc(d)),o.parse(d),o.flush()},t.updateTimeMapping_=function(e,r,a){var o=e.segment;if(r){if(!e.cues.length)return void(o.empty=!0);var l=e.timestampmap,d=l.MPEGTS/Zn.ONE_SECOND_IN_TS-l.LOCAL+r.mapping;e.cues.forEach(function(g){g.startTime+=d,g.endTime+=d}),a.syncInfo||(a.syncInfo={mediaSequence:a.mediaSequence+e.mediaIndex,time:Math.min(e.cues[0].startTime,e.cues[e.cues.length-1].startTime-o.duration)})}},n}(Ro),Og=function(n,t){for(var i=n.cues,e=0;e=r.adStartTime&&t<=r.adEndTime)return r}return null},ac=[{name:"VOD",run:function(n,t,i,e,r){return i!==1/0?{time:0,segmentIndex:0,partIndex:null}:null}},{name:"ProgramDateTime",run:function(n,t,i,e,r){if(!Object.keys(n.timelineToDatetimeMappings).length)return null;var a=null,o=null,l=yo(t);r=r||0;for(var d=0;d=E)&&(o=E,a={time:T,segmentIndex:v.segmentIndex,partIndex:v.partIndex})}}return a}},{name:"Discontinuity",run:function(n,t,i,e,r){var a=null;if(r=r||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(var o=null,l=0;l=g)&&(o=g,a={time:v.time,segmentIndex:d,partIndex:null})}}return a}},{name:"Playlist",run:function(n,t,i,e,r){return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}:null}}],Mg=function(s){function n(i){var e;return(e=s.call(this)||this).timelines=[],e.discontinuities=[],e.timelineToDatetimeMappings={},e.logger_=mi("SyncController"),e}re(n,s);var t=n.prototype;return t.getSyncPoint=function(e,r,a,o){var l=this.runStrategies_(e,r,a,o);return l.length?this.selectSyncPoint_(l,{key:"time",value:o}):null},t.getExpiredTime=function(e,r){if(!e||!e.segments)return null;var a=this.runStrategies_(e,r,e.discontinuitySequence,0);if(!a.length)return null;var o=this.selectSyncPoint_(a,{key:"segmentIndex",value:0});return o.segmentIndex>0&&(o.time*=-1),Math.abs(o.time+En({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:o.segmentIndex,endIndex:0}))},t.runStrategies_=function(e,r,a,o){for(var l=[],d=0;d86400)N.log.warn("Not saving expired segment info. Media sequence gap "+a+" is too large.");else for(var o=a-1;o>=0;o--){var l=e.segments[o];if(l&&typeof l.start<"u"){r.syncInfo={mediaSequence:e.mediaSequence+o,time:l.start},this.logger_("playlist refresh sync: [time:"+r.syncInfo.time+", mediaSequence: "+r.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break}}},t.setDateTimeMappingForStart=function(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){var r=e.segments[0],a=r.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[r.timeline]=-a}},t.saveSegmentTimingInfo=function(e){var r=e.segmentInfo,a=e.shouldSaveTimelineMapping,o=this.calculateSegmentTimeMapping_(r,r.timingInfo,a),l=r.segment;o&&(this.saveDiscontinuitySyncInfo_(r),r.playlist.syncInfo||(r.playlist.syncInfo={mediaSequence:r.playlist.mediaSequence+r.mediaIndex,time:l.start}));var d=l.dateTimeObject;l.discontinuity&&a&&d&&(this.timelineToDatetimeMappings[l.timeline]=-d.getTime()/1e3)},t.timestampOffsetForTimeline=function(e){return typeof this.timelines[e]>"u"?null:this.timelines[e].time},t.mappingForTimeline=function(e){return typeof this.timelines[e]>"u"?null:this.timelines[e].mapping},t.calculateSegmentTimeMapping_=function(e,r,a){var f,v,o=e.segment,l=e.part,d=this.timelines[e.timeline];if("number"==typeof e.timestampOffset)d={time:e.startOfSegment,mapping:e.startOfSegment-r.start},a&&(this.timelines[e.timeline]=d,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+e.timeline+": [time: "+d.time+"] [mapping: "+d.mapping+"]")),f=e.startOfSegment,v=r.end+d.mapping;else{if(!d)return!1;f=r.start+d.mapping,v=r.end+d.mapping}return l&&(l.start=f,l.end=v),(!o.start||fv){var g;g=f<0?a.start-En({defaultDuration:r.targetDuration,durationList:r.segments,startIndex:e.mediaIndex,endIndex:l}):a.end+En({defaultDuration:r.targetDuration,durationList:r.segments,startIndex:e.mediaIndex+1,endIndex:l}),this.discontinuities[d]={time:g,accuracy:v}}}},t.dispose=function(){this.trigger("dispose"),this.off()},n}(N.EventTarget),Ng=function(s){function n(){var i;return(i=s.call(this)||this).pendingTimelineChanges_={},i.lastTimelineChanges_={},i}re(n,s);var t=n.prototype;return t.clearPendingTimelineChange=function(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")},t.pendingTimelineChange=function(e){var r=e.type,a=e.from,o=e.to;return"number"==typeof a&&"number"==typeof o&&(this.pendingTimelineChanges_[r]={type:r,from:a,to:o},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[r]},t.lastTimelineChange=function(e){var r=e.type,a=e.from,o=e.to;return"number"==typeof a&&"number"==typeof o&&(this.lastTimelineChanges_[r]={type:r,from:a,to:o},delete this.pendingTimelineChanges_[r],this.trigger("timelinechange")),this.lastTimelineChanges_[r]},t.dispose=function(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()},n}(N.EventTarget),Ug=Od(Ld(function(){function s(x,S,U){return x(U={path:S,exports:{},require:function(j,W){return function n(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},U.exports),U.exports}var t=s(function(x){function S(F,j){for(var W=0;W-1},S.trigger=function(F){var j=this.listeners[F];if(j)if(2===arguments.length)for(var W=j.length,q=0;q>7))^q]=q;for(ne=he=0;!j[ne];ne^=ge||1,he=ye[he]||1)for(j[ne]=ot=(ot=he^he<<1^he<<2^he<<3^he<<4)>>8^255&ot^99,W[ot]=ne,Je=16843009*K[$e=K[ge=K[ne]]]^65537*$e^257*ge^16843008*ne,Ut=257*K[ot]^16843008*ot,q=0;q<4;q++)U[q][ne]=Ut=Ut<<24^Ut>>>8,F[q][ot]=Je=Je<<24^Je>>>8;for(q=0;q<5;q++)U[q]=U[q].slice(0),F[q]=F[q].slice(0);return S}()),this._tables=[[l[0][0].slice(),l[0][1].slice(),l[0][2].slice(),l[0][3].slice(),l[0][4].slice()],[l[1][0].slice(),l[1][1].slice(),l[1][2].slice(),l[1][3].slice(),l[1][4].slice()]];var F,j,W,q=this._tables[0][4],ne=this._tables[1],he=U.length,K=1;if(4!==he&&6!==he&&8!==he)throw new Error("Invalid aes key size");var ye=U.slice(0),ge=[];for(this._key=[ye,ge],F=he;F<4*he+28;F++)W=ye[F-1],(F%he==0||8===he&&F%he==4)&&(W=q[W>>>24]<<24^q[W>>16&255]<<16^q[W>>8&255]<<8^q[255&W],F%he==0&&(W=W<<8^W>>>24^K<<24,K=K<<1^283*(K>>7))),ye[F]=ye[F-he]^W;for(j=0;F;j++,F--)W=ye[3&j?F:F-4],ge[j]=F<=4||j<4?W:ne[0][q[W>>>24]]^ne[1][q[W>>16&255]]^ne[2][q[W>>8&255]]^ne[3][q[255&W]]}return x.prototype.decrypt=function(F,j,W,q,ne,he){var ot,Ut,Je,ai,K=this._key[1],ye=F^K[0],ge=q^K[1],$e=W^K[2],Pe=j^K[3],fr=K.length/4-2,si=4,Ei=this._tables[1],Fi=Ei[0],hr=Ei[1],Bi=Ei[2],pr=Ei[3],mr=Ei[4];for(ai=0;ai>>24]^hr[ge>>16&255]^Bi[$e>>8&255]^pr[255&Pe]^K[si],Ut=Fi[ge>>>24]^hr[$e>>16&255]^Bi[Pe>>8&255]^pr[255&ye]^K[si+1],Je=Fi[$e>>>24]^hr[Pe>>16&255]^Bi[ye>>8&255]^pr[255&ge]^K[si+2],Pe=Fi[Pe>>>24]^hr[ye>>16&255]^Bi[ge>>8&255]^pr[255&$e]^K[si+3],si+=4,ye=ot,ge=Ut,$e=Je;for(ai=0;ai<4;ai++)ne[(3&-ai)+he]=mr[ye>>>24]<<24^mr[ge>>16&255]<<16^mr[$e>>8&255]<<8^mr[255&Pe]^K[si++],ot=ye,ye=ge,ge=$e,$e=Pe,Pe=ot},x}(),f=function(x){function S(){var F;return(F=x.call(this,r)||this).jobs=[],F.delay=1,F.timeout_=null,F}e(S,x);var U=S.prototype;return U.processJob_=function(){this.jobs.shift()(),this.timeout_=this.jobs.length?setTimeout(this.processJob_.bind(this),this.delay):null},U.push=function(j){this.jobs.push(j),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},S}(r),v=function(S){return S<<24|(65280&S)<<8|(16711680&S)>>8|S>>>24},T=function(){function x(U,F,j,W){var q=x.STEP,ne=new Int32Array(U.buffer),he=new Uint8Array(U.byteLength),K=0;for(this.asyncStream_=new f,this.asyncStream_.push(this.decryptChunk_(ne.subarray(K,K+q),F,j,he)),K=q;K>2),W=new d(Array.prototype.slice.call(U)),q=new Uint8Array(S.byteLength),ne=new Int32Array(q.buffer);for(he=F[0],K=F[1],ye=F[2],ge=F[3],Je=0;Je=0&&(t="main-desc"),t},Pa=function(n,t){n.abort(),n.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Uo=function(n,t){t.activePlaylistLoader=n,n.load()},Oa={AUDIO:function(n,t){return function(){var e=t.mediaTypes[n],r=t.blacklistCurrentPlaylist;Pa(t.segmentLoaders[n],e);var a=e.activeTrack(),o=e.activeGroup(),l=(o.filter(function(v){return v.default})[0]||o[0]).id,d=e.tracks[l];if(a!==d){for(var f in N.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),e.tracks)e.tracks[f].enabled=e.tracks[f]===d;e.onTrackChanged()}else r({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(n,t){return function(){var i=t.segmentLoaders[n],e=t.mediaTypes[n];N.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),Pa(i,e);var r=e.activeTrack();r&&(r.mode="disabled"),e.onTrackChanged()}}},sc={AUDIO:function(n,t,i){if(t){var e=i.tech,r=i.requestOptions,a=i.segmentLoaders[n];t.on("loadedmetadata",function(){var o=t.media();a.playlist(o,r),(!e.paused()||o.endList&&"none"!==e.preload())&&a.load()}),t.on("loadedplaylist",function(){a.playlist(t.media(),r),e.paused()||a.load()}),t.on("error",Oa[n](n,i))}},SUBTITLES:function(n,t,i){var e=i.tech,r=i.requestOptions,a=i.segmentLoaders[n],o=i.mediaTypes[n];t.on("loadedmetadata",function(){var l=t.media();a.playlist(l,r),a.track(o.activeTrack()),(!e.paused()||l.endList&&"none"!==e.preload())&&a.load()}),t.on("loadedplaylist",function(){a.playlist(t.media(),r),e.paused()||a.load()}),t.on("error",Oa[n](n,i))}},qg={AUDIO:function(n,t){var i=t.vhs,e=t.sourceType,r=t.segmentLoaders[n],a=t.requestOptions,o=t.master.mediaGroups,l=t.mediaTypes[n],d=l.groups,f=l.tracks,v=l.logger_,g=t.masterPlaylistLoader,T=Cn(g.master);for(var E in(!o[n]||0===Object.keys(o[n]).length)&&(o[n]={main:{default:{default:!0}}},T&&(o[n].main.default.playlists=g.master.playlists)),o[n])for(var x in d[E]||(d[E]=[]),o[n][E]){var S=o[n][E][x],U=void 0;if(T?(v("AUDIO group '"+E+"' label '"+x+"' is a master playlist"),S.isMasterPlaylist=!0,U=null):U="vhs-json"===e&&S.playlists?new $r(S.playlists[0],i,a):S.resolvedUri?new $r(S.resolvedUri,i,a):S.playlists&&"dash"===e?new Io(S.playlists[0],i,a,g):null,S=N.mergeOptions({id:x,playlistLoader:U},S),sc[n](n,S.playlistLoader,t),d[E].push(S),typeof f[x]>"u"){var F=new N.AudioTrack({id:x,kind:Bg(S),enabled:!1,language:S.language,default:S.default,label:x});f[x]=F}}r.on("error",Oa[n](n,t))},SUBTITLES:function(n,t){var i=t.tech,e=t.vhs,r=t.sourceType,a=t.segmentLoaders[n],o=t.requestOptions,l=t.master.mediaGroups,d=t.mediaTypes[n],f=d.groups,v=d.tracks,g=t.masterPlaylistLoader;for(var T in l[n])for(var E in f[T]||(f[T]=[]),l[n][T])if(!l[n][T][E].forced){var x=l[n][T][E],S=void 0;if("hls"===r)S=new $r(x.resolvedUri,e,o);else if("dash"===r){if(!x.playlists.filter(function(j){return j.excludeUntil!==1/0}).length)return;S=new Io(x.playlists[0],e,o,g)}else"vhs-json"===r&&(S=new $r(x.playlists?x.playlists[0]:x.resolvedUri,e,o));if(x=N.mergeOptions({id:E,playlistLoader:S},x),sc[n](n,x.playlistLoader,t),f[T].push(x),typeof v[E]>"u"){var F=i.addRemoteTextTrack({id:E,kind:"subtitles",default:x.default&&x.autoselect,language:x.language,label:E},!1).track;v[E]=F}}a.on("error",Oa[n](n,t))},"CLOSED-CAPTIONS":function(n,t){var i=t.tech,e=t.master.mediaGroups,r=t.mediaTypes[n],a=r.groups,o=r.tracks;for(var l in e[n])for(var d in a[l]||(a[l]=[]),e[n][l]){var f=e[n][l][d];if(/^(?:CC|SERVICE)/.test(f.instreamId)){var v=i.options_.vhs&&i.options_.vhs.captionServices||{},g={label:d,language:f.language,instreamId:f.instreamId,default:f.default&&f.autoselect};if(v[g.instreamId]&&(g=N.mergeOptions(g,v[g.instreamId])),void 0===g.default&&delete g.default,a[l].push(N.mergeOptions({id:d},f)),typeof o[d]>"u"){var T=i.addRemoteTextTrack({id:g.instreamId,kind:"captions",default:g.default,language:g.language,label:g.label},!1).track;o[d]=T}}}}},Wg=function s(n,t){for(var i=0;i"u")&&(j=1/0),Ui=f,e.experimentalBufferBasedABR=Boolean(S),e.experimentalLeastPixelDiffSelector=Boolean(U),e.withCredentials=o,e.tech_=l,e.vhs_=l.vhs,e.sourceType_=E,e.useCueTags_=v,e.blacklistDuration=g,e.maxPlaylistRetries=j,e.enableLowInitialPlaylist=T,e.useCueTags_&&(e.cueTagsTrack_=e.tech_.addTextTrack("metadata","ad-cues"),e.cueTagsTrack_.inBandMetadataTrackDispatchType=""),e.requestOptions_={withCredentials:o,handleManifestRedirects:a,maxPlaylistRetries:j,timeout:null},e.on("error",e.pauseLoading),e.mediaTypes_=function(){var n={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(t){n[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Ni,activeTrack:Ni,getActiveGroup:Ni,onGroupChanged:Ni,onTrackChanged:Ni,lastTrack_:null,logger_:mi("MediaGroups["+t+"]")}}),n}(),e.mediaSource=new(P().MediaSource),e.handleDurationChange_=e.handleDurationChange_.bind(Ue(e)),e.handleSourceOpen_=e.handleSourceOpen_.bind(Ue(e)),e.handleSourceEnded_=e.handleSourceEnded_.bind(Ue(e)),e.mediaSource.addEventListener("durationchange",e.handleDurationChange_),e.mediaSource.addEventListener("sourceopen",e.handleSourceOpen_),e.mediaSource.addEventListener("sourceended",e.handleSourceEnded_),e.seekable_=N.createTimeRanges(),e.hasPlayed_=!1,e.syncController_=new Mg(i),e.segmentMetadataTrack_=l.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,e.decrypter_=new Fg,e.sourceUpdater_=new ic(e.mediaSource),e.inbandTextTracks_={},e.timelineChangeController_=new Ng;var W={vhs:e.vhs_,parse708captions:i.parse708captions,captionServices:F,mediaSource:e.mediaSource,currentTime:e.tech_.currentTime.bind(e.tech_),seekable:function(){return e.seekable()},seeking:function(){return e.tech_.seeking()},duration:function(){return e.duration()},hasPlayed:function(){return e.hasPlayed_},goalBufferLength:function(){return e.goalBufferLength()},bandwidth:d,syncController:e.syncController_,decrypter:e.decrypter_,sourceType:e.sourceType_,inbandTextTracks:e.inbandTextTracks_,cacheEncryptionKeys:x,sourceUpdater:e.sourceUpdater_,timelineChangeController:e.timelineChangeController_,experimentalExactManifestTimings:i.experimentalExactManifestTimings};e.masterPlaylistLoader_="dash"===e.sourceType_?new Io(r,e.vhs_,e.requestOptions_):new $r(r,e.vhs_,e.requestOptions_),e.setupMasterPlaylistLoaderListeners_(),e.mainSegmentLoader_=new Ro(N.mergeOptions(W,{segmentMetadataTrack:e.segmentMetadataTrack_,loaderType:"main"}),i),e.audioSegmentLoader_=new Ro(N.mergeOptions(W,{loaderType:"audio"}),i),e.subtitleSegmentLoader_=new Pg(N.mergeOptions(W,{loaderType:"vtt",featuresNativeTextTracks:e.tech_.featuresNativeTextTracks}),i),e.setupSegmentLoaderListeners_(),e.experimentalBufferBasedABR&&(e.masterPlaylistLoader_.one("loadedplaylist",function(){return e.startABRTimer_()}),e.tech_.on("pause",function(){return e.stopABRTimer_()}),e.tech_.on("play",function(){return e.startABRTimer_()})),Qg.forEach(function(ne){e[ne+"_"]=Xg.bind(Ue(e),ne)}),e.logger_=mi("MPC"),e.triggeredFmp4Usage=!1,"none"===e.tech_.preload()?(e.loadOnPlay_=function(){e.loadOnPlay_=null,e.masterPlaylistLoader_.load()},e.tech_.one("play",e.loadOnPlay_)):e.masterPlaylistLoader_.load(),e.timeToLoadedData__=-1,e.mainAppendsToLoadedData__=-1,e.audioAppendsToLoadedData__=-1;var q="none"===e.tech_.preload()?"play":"loadstart";return e.tech_.one(q,function(){var ne=Date.now();e.tech_.one("loadeddata",function(){e.timeToLoadedData__=Date.now()-ne,e.mainAppendsToLoadedData__=e.mainSegmentLoader_.mediaAppends,e.audioAppendsToLoadedData__=e.audioSegmentLoader_.mediaAppends})}),e}re(n,s);var t=n.prototype;return t.mainAppendsToLoadedData_=function(){return this.mainAppendsToLoadedData__},t.audioAppendsToLoadedData_=function(){return this.audioAppendsToLoadedData__},t.appendsToLoadedData_=function(){var e=this.mainAppendsToLoadedData_(),r=this.audioAppendsToLoadedData_();return-1===e||-1===r?-1:e+r},t.timeToLoadedData_=function(){return this.timeToLoadedData__},t.checkABR_=function(){var e=this.selectPlaylist();e&&this.shouldSwitchToMedia_(e)&&this.switchMedia_(e,"abr")},t.switchMedia_=function(e,r,a){var o=this.media(),l=o&&(o.id||o.uri),d=e.id||e.uri;l&&l!==d&&(this.logger_("switch media "+l+" -> "+d+" from "+r),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-"+r})),this.masterPlaylistLoader_.media(e,a)},t.startABRTimer_=function(){var e=this;this.stopABRTimer_(),this.abrTimer_=P().setInterval(function(){return e.checkABR_()},250)},t.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(P().clearInterval(this.abrTimer_),this.abrTimer_=null)},t.getAudioTrackPlaylists_=function(){var e=this.master(),r=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return r;var l,a=e.mediaGroups.AUDIO,o=Object.keys(a);if(Object.keys(this.mediaTypes_.AUDIO.groups).length)l=this.mediaTypes_.AUDIO.activeTrack();else{var d=a.main||o.length&&a[o[0]];for(var f in d)if(d[f].default){l={label:f};break}}if(!l)return r;var v=[];for(var g in a)if(a[g][l.label]){var T=a[g][l.label];if(T.playlists&&T.playlists.length)v.push.apply(v,T.playlists);else if(T.uri)v.push(T);else if(e.playlists.length)for(var E=0;E1&&Cn(t.master))for(var d=0;d"u"?o:null!==i&&o&&o.filter(function(v){return v.id===i.id})[0]||null}}(E,n),t[E].activeTrack=Zg[E](E,n),t[E].onGroupChanged=function(n,t){return function(){var i=t.segmentLoaders,e=i[n],r=i.main,a=t.mediaTypes[n],o=a.activeTrack(),l=a.getActiveGroup(),d=a.activePlaylistLoader,f=a.lastGroup_;if((!l||!f||l.id!==f.id)&&(a.lastGroup_=l,a.lastTrack_=o,Pa(e,a),l&&!l.isMasterPlaylist)){if(!l.playlistLoader)return void(d&&r.resetEverything());e.resyncLoader(),Uo(l.playlistLoader,a)}}}(E,n),t[E].onGroupChanging=function(n,t){return function(){var i=t.segmentLoaders[n];t.mediaTypes[n].lastGroup_=null,i.abort(),i.pause()}}(E,n),t[E].onTrackChanged=function(n,t){return function(){var i=t.masterPlaylistLoader,e=t.segmentLoaders,r=e[n],a=e.main,o=t.mediaTypes[n],l=o.activeTrack(),d=o.getActiveGroup(),f=o.activePlaylistLoader,v=o.lastTrack_;if((!v||!l||v.id!==l.id)&&(o.lastGroup_=d,o.lastTrack_=l,Pa(r,o),d)){if(d.isMasterPlaylist){if(!l||!v||l.id===v.id)return;var g=t.vhs.masterPlaylistController_,T=g.selectPlaylist();if(g.media()===T)return;return o.logger_("track change. Switching master audio from "+v.id+" to "+l.id),i.pause(),a.resetEverything(),void g.fastQualityChange_(T)}if("AUDIO"===n){if(!d.playlistLoader)return a.setAudio(!0),void a.resetEverything();r.setAudio(!0),a.setAudio(!1)}if(f===d.playlistLoader)return void Uo(d.playlistLoader,o);r.track&&r.track(l),r.resetEverything(),Uo(d.playlistLoader,o)}}}(E,n),t[E].getActiveGroup=function(n,t){var i=t.mediaTypes;return function(){var e=i[n].activeTrack();return e?i[n].activeGroup(e):null}}(E,n)});var d=t.AUDIO.activeGroup();if(d){var f=(d.filter(function(E){return E.default})[0]||d[0]).id;t.AUDIO.tracks[f].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged(),t.AUDIO.getActiveGroup().playlistLoader?(l.setAudio(!1),o.setAudio(!0)):l.setAudio(!0)}i.on("mediachange",function(){["AUDIO","SUBTITLES"].forEach(function(E){return t[E].onGroupChanged()})}),i.on("mediachanging",function(){["AUDIO","SUBTITLES"].forEach(function(E){return t[E].onGroupChanging()})});var g=function(){t.AUDIO.onTrackChanged(),e.trigger({type:"usage",name:"vhs-audio-change"}),e.trigger({type:"usage",name:"hls-audio-change"})};for(var T in e.audioTracks().addEventListener("change",g),e.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),r.on("dispose",function(){e.audioTracks().removeEventListener("change",g),e.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)}),e.clearTracks("audio"),t.AUDIO.tracks)e.audioTracks().addTrack(t.AUDIO.tracks[T])}({sourceType:e.sourceType_,segmentLoaders:{AUDIO:e.audioSegmentLoader_,SUBTITLES:e.subtitleSegmentLoader_,main:e.mainSegmentLoader_},tech:e.tech_,requestOptions:e.requestOptions_,masterPlaylistLoader:e.masterPlaylistLoader_,vhs:e.vhs_,master:e.master(),mediaTypes:e.mediaTypes_,blacklistCurrentPlaylist:e.blacklistCurrentPlaylist.bind(e)}),e.triggerPresenceUsage_(e.master(),r),e.setupFirstPlay(),!e.mediaTypes_.AUDIO.activePlaylistLoader||e.mediaTypes_.AUDIO.activePlaylistLoader.media()?e.trigger("selectedinitialmedia"):e.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",function(){e.trigger("selectedinitialmedia")})}),this.masterPlaylistLoader_.on("loadedplaylist",function(){e.loadOnPlay_&&e.tech_.off("play",e.loadOnPlay_);var r=e.masterPlaylistLoader_.media();if(!r){var a;if(e.excludeUnsupportedVariants_(),e.enableLowInitialPlaylist&&(a=e.selectInitialPlaylist()),a||(a=e.selectPlaylist()),!a||!e.shouldSwitchToMedia_(a))return;if(e.initialMedia_=a,e.switchMedia_(e.initialMedia_,"initial"),"vhs-json"!==e.sourceType_||!e.initialMedia_.segments)return;r=e.initialMedia_}e.handleUpdatedMediaPlaylist(r)}),this.masterPlaylistLoader_.on("error",function(){e.blacklistCurrentPlaylist(e.masterPlaylistLoader_.error)}),this.masterPlaylistLoader_.on("mediachanging",function(){e.mainSegmentLoader_.abort(),e.mainSegmentLoader_.pause()}),this.masterPlaylistLoader_.on("mediachange",function(){var r=e.masterPlaylistLoader_.media(),a=1.5*r.targetDuration*1e3;e.requestOptions_.timeout=bo(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?0:a,e.mainSegmentLoader_.playlist(r,e.requestOptions_),e.mainSegmentLoader_.load(),e.tech_.trigger({type:"mediachange",bubbles:!0})}),this.masterPlaylistLoader_.on("playlistunchanged",function(){var r=e.masterPlaylistLoader_.media();"playlist-unchanged"!==r.lastExcludeReason_&&e.stuckAtPlaylistEnd_(r)&&(e.blacklistCurrentPlaylist({message:"Playlist no longer updating.",reason:"playlist-unchanged"}),e.tech_.trigger("playliststuck"))}),this.masterPlaylistLoader_.on("renditiondisabled",function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})}),this.masterPlaylistLoader_.on("renditionenabled",function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})})},t.handleUpdatedMediaPlaylist=function(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())},t.triggerPresenceUsage_=function(e,r){var a=e.mediaGroups||{},o=!0,l=Object.keys(a.AUDIO);for(var d in a.AUDIO)for(var f in a.AUDIO[d])a.AUDIO[d][f].uri||(o=!1);o&&(this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),this.tech_.trigger({type:"usage",name:"hls-demuxed"})),Object.keys(a.SUBTITLES).length&&(this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),this.tech_.trigger({type:"usage",name:"hls-webvtt"})),Ui.Playlist.isAes(r)&&(this.tech_.trigger({type:"usage",name:"vhs-aes"}),this.tech_.trigger({type:"usage",name:"hls-aes"})),l.length&&Object.keys(a.AUDIO[l[0]]).length>1&&(this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.tech_.trigger({type:"usage",name:"hls-alternate-audio"})),this.useCueTags_&&(this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"}),this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"}))},t.shouldSwitchToMedia_=function(e){var r=this.masterPlaylistLoader_.media()||this.masterPlaylistLoader_.pendingMedia_,a=this.tech_.currentTime(),o=this.bufferLowWaterLine(),l=this.bufferHighWaterLine();return function(n){var t=n.currentPlaylist,i=n.buffered,e=n.currentTime,r=n.nextPlaylist,a=n.bufferLowWaterLine,o=n.bufferHighWaterLine,l=n.duration,d=n.experimentalBufferBasedABR,f=n.log;if(!r)return N.log.warn("We received no playlist to switch to. Please check your stream."),!1;var v="allowing switch "+(t&&t.id||"null")+" -> "+r.id;if(!t)return f(v+" as current playlist is not set"),!0;if(r.id===t.id)return!1;var g=Boolean(Yr(i,e).length);if(!t.endList)return g||"number"!=typeof t.partTargetDuration?(f(v+" as current playlist is live"),!0):(f("not "+v+" as current playlist is live llhls, but currentTime isn't in buffered."),!1);var T=vo(i,e),E=d?Dt.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Dt.MAX_BUFFER_LOW_WATER_LINE;if(lS)&&T>=a){var F=v+" as forwardBuffer >= bufferLowWaterLine ("+T+" >= "+a+")";return d&&(F+=" and next bandwidth > current bandwidth ("+x+" > "+S+")"),f(F),!0}return f("not "+v+" as no switching criteria met"),!1}({buffered:this.tech_.buffered(),currentTime:a,currentPlaylist:r,nextPlaylist:e,bufferLowWaterLine:o,bufferHighWaterLine:l,duration:this.duration(),experimentalBufferBasedABR:this.experimentalBufferBasedABR,log:this.logger_})},t.setupSegmentLoaderListeners_=function(){var e=this;this.experimentalBufferBasedABR||(this.mainSegmentLoader_.on("bandwidthupdate",function(){var a=e.selectPlaylist();e.shouldSwitchToMedia_(a)&&e.switchMedia_(a,"bandwidthupdate"),e.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("progress",function(){e.trigger("progress")})),this.mainSegmentLoader_.on("error",function(){e.blacklistCurrentPlaylist(e.mainSegmentLoader_.error())}),this.mainSegmentLoader_.on("appenderror",function(){e.error=e.mainSegmentLoader_.error_,e.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",function(){e.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",function(){e.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"}),e.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",function(){e.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",function(){e.error=e.audioSegmentLoader_.error_,e.trigger("error")}),this.mainSegmentLoader_.on("ended",function(){e.logger_("main segment loader ended"),e.onEndOfStream()}),this.mainSegmentLoader_.on("earlyabort",function(a){e.experimentalBufferBasedABR||(e.delegateLoaders_("all",["abort"]),e.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120))});var r=function(){if(!e.sourceUpdater_.hasCreatedSourceBuffers())return e.tryToCreateSourceBuffers_();var o=e.getCodecsOrExclude_();!o||e.sourceUpdater_.addOrChangeSourceBuffers(o)};this.mainSegmentLoader_.on("trackinfo",r),this.audioSegmentLoader_.on("trackinfo",r),this.mainSegmentLoader_.on("fmp4",function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",function(){e.logger_("audioSegmentLoader ended"),e.onEndOfStream()})},t.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)},t.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()},t.smoothQualityChange_=function(e){void 0===e&&(e=this.selectPlaylist()),this.fastQualityChange_(e)},t.fastQualityChange_=function(e){var r=this;void 0===e&&(e=this.selectPlaylist()),e!==this.masterPlaylistLoader_.media()?(this.switchMedia_(e,"fast-quality"),this.mainSegmentLoader_.resetEverything(function(){r.tech_.setCurrentTime(N.browser.IE_VERSION||N.browser.IS_EDGE?r.tech_.currentTime()+.04:r.tech_.currentTime())})):this.logger_("skipping fastQualityChange because new media is same as old")},t.play=function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();var e=this.tech_.seekable();if(this.tech_.duration()===1/0&&this.tech_.currentTime()this.maxPlaylistRetries?1/0:Date.now()+1e3*r,a.excludeUntil=v,e.reason&&(a.lastExcludeReason_=e.reason),this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-blacklisted"}),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});var g=this.selectPlaylist();if(!g)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");(e.internal?this.logger_:N.log.warn)((e.internal?"Internal problem":"Problem")+" encountered with playlist "+a.id+"."+(e.message?" "+e.message:"")+" Switching to playlist "+g.id+"."),g.attributes.AUDIO!==a.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),g.attributes.SUBTITLES!==a.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);var x=g.targetDuration/2*1e3||5e3,S="number"==typeof g.lastRequest&&Date.now()-g.lastRequest<=x;return this.switchMedia_(g,"exclude",d||S)},t.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()},t.delegateLoaders_=function(e,r){var a=this,o=[],l="all"===e;(l||"main"===e)&&o.push(this.masterPlaylistLoader_);var d=[];(l||"audio"===e)&&d.push("AUDIO"),(l||"subtitle"===e)&&(d.push("CLOSED-CAPTIONS"),d.push("SUBTITLES")),d.forEach(function(f){var v=a.mediaTypes_[f]&&a.mediaTypes_[f].activePlaylistLoader;v&&o.push(v)}),["main","audio","subtitle"].forEach(function(f){var v=a[f+"SegmentLoader_"];v&&(e===f||"all"===e)&&o.push(v)}),o.forEach(function(f){return r.forEach(function(v){"function"==typeof f[v]&&f[v]()})})},t.setCurrentTime=function(e){var r=Yr(this.tech_.buffered(),e);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?r&&r.length?e:(this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),void this.load()):0},t.duration=function(){if(!this.masterPlaylistLoader_)return 0;var e=this.masterPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Ui.Playlist.duration(e):1/0:0},t.seekable=function(){return this.seekable_},t.onSyncInfoUpdate_=function(){var e;if(this.masterPlaylistLoader_){var r=this.masterPlaylistLoader_.media();if(r){var a=this.syncController_.getExpiredTime(r,this.duration());if(null!==a){var d,f,o=this.masterPlaylistLoader_.master,l=Ui.Playlist.seekable(r,a,Ui.Playlist.liveEdgeDelay(o,r));0===l.length||this.mediaTypes_.AUDIO.activePlaylistLoader&&(r=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(a=this.syncController_.getExpiredTime(r,this.duration()))||0===(e=Ui.Playlist.seekable(r,a,Ui.Playlist.liveEdgeDelay(o,r))).length)||(this.seekable_&&this.seekable_.length&&(d=this.seekable_.end(0),f=this.seekable_.start(0)),this.seekable_=e?e.start(0)>l.end(0)||l.start(0)>e.end(0)?l:N.createTimeRanges([[e.start(0)>l.start(0)?e.start(0):l.start(0),e.end(0)0&&(o=Math.max(o,a.end(a.length-1))),this.mediaSource.duration!==o&&this.sourceUpdater_.setDuration(o)}},t.dispose=function(){var e=this;this.trigger("dispose"),this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(function(r){var a=e.mediaTypes_[r].groups;for(var o in a)a[o].forEach(function(l){l.playlistLoader&&l.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()},t.master=function(){return this.masterPlaylistLoader_.master},t.media=function(){return this.masterPlaylistLoader_.media()||this.initialMedia_},t.areMediaTypesKnown_=function(){var e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,r=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),a=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!r||!a)},t.getCodecsOrExclude_=function(){var e=this,r={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}};r.video=r.main;var a=An(this.master(),this.media()),o={},l=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(r.main.hasVideo&&(o.video=a.video||r.main.videoCodec||"avc1.4d400d"),r.main.isMuxed&&(o.video+=","+(a.audio||r.main.audioCodec||Qt)),(r.main.hasAudio&&!r.main.isMuxed||r.audio.hasAudio||l)&&(o.audio=a.audio||r.main.audioCodec||r.audio.audioCodec||Qt,r.audio.isFmp4=r.main.hasAudio&&!r.main.isMuxed?r.main.isFmp4:r.audio.isFmp4),o.audio||o.video){var v,f={};if(["video","audio"].forEach(function(x){if(o.hasOwnProperty(x)&&!function(S,U){return S?ii(U):ci(U)}(r[x].isFmp4,o[x])){var S=r[x].isFmp4?"browser":"muxer";f[S]=f[S]||[],f[S].push(o[x]),"audio"===x&&(v=S)}}),l&&v&&this.media().attributes.AUDIO){var g=this.media().attributes.AUDIO;this.master().playlists.forEach(function(x){(x.attributes&&x.attributes.AUDIO)===g&&x!==e.media()&&(x.excludeUntil=1/0)}),this.logger_("excluding audio group "+g+" as "+v+' does not support codec(s): "'+o.audio+'"')}if(!Object.keys(f).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var E=[];if(["video","audio"].forEach(function(x){var S=(Xe(e.sourceUpdater_.codecs[x]||"")[0]||{}).type,U=(Xe(o[x]||"")[0]||{}).type;S&&U&&S.toLowerCase()!==U.toLowerCase()&&E.push('"'+e.sourceUpdater_.codecs[x]+'" -> "'+o[x]+'"')}),E.length)return void this.blacklistCurrentPlaylist({playlist:this.media(),message:"Codec switching not supported: "+E.join(", ")+".",blacklistDuration:1/0,internal:!0})}return o}var T=Object.keys(f).reduce(function(x,S){return x&&(x+=", "),x+(S+' does not support codec(s): "')+f[S].join(",")+'"'},"")+".";this.blacklistCurrentPlaylist({playlist:this.media(),internal:!0,message:T,blacklistDuration:1/0})}else this.blacklistCurrentPlaylist({playlist:this.media(),message:"Could not determine codecs for playlist.",blacklistDuration:1/0})},t.tryToCreateSourceBuffers_=function(){if("open"===this.mediaSource.readyState&&!this.sourceUpdater_.hasCreatedSourceBuffers()&&this.areMediaTypesKnown_()){var e=this.getCodecsOrExclude_();if(e){this.sourceUpdater_.createSourceBuffers(e);var r=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(r)}}},t.excludeUnsupportedVariants_=function(){var e=this,r=this.master().playlists,a=[];Object.keys(r).forEach(function(o){var l=r[o];if(-1===a.indexOf(l.id)){a.push(l.id);var d=An(e.master,l),f=[];d.audio&&!ci(d.audio)&&!ii(d.audio)&&f.push("audio codec "+d.audio),d.video&&!ci(d.video)&&!ii(d.video)&&f.push("video codec "+d.video),d.text&&"stpp.ttml.im1t"===d.text&&f.push("text codec "+d.text),f.length&&(l.excludeUntil=1/0,e.logger_("excluding "+l.id+" for unsupported: "+f.join(", ")))}})},t.excludeIncompatibleVariants_=function(e){var r=this,a=[],o=this.master().playlists,l=Aa(Xe(e)),d=Wd(l),f=l.video&&Xe(l.video)[0]||null,v=l.audio&&Xe(l.audio)[0]||null;Object.keys(o).forEach(function(g){var T=o[g];if(-1===a.indexOf(T.id)&&T.excludeUntil!==1/0){a.push(T.id);var E=[],x=An(r.masterPlaylistLoader_.master,T),S=Wd(x);if(x.audio||x.video){if(S!==d&&E.push('codec count "'+S+'" !== "'+d+'"'),!r.sourceUpdater_.canChangeType()){var U=x.video&&Xe(x.video)[0]||null,F=x.audio&&Xe(x.audio)[0]||null;U&&f&&U.type.toLowerCase()!==f.type.toLowerCase()&&E.push('video codec "'+U.type+'" !== "'+f.type+'"'),F&&v&&F.type.toLowerCase()!==v.type.toLowerCase()&&E.push('audio codec "'+F.type+'" !== "'+v.type+'"')}E.length&&(T.excludeUntil=1/0,r.logger_("blacklisting "+T.id+": "+E.join(" && ")))}}})},t.updateAdCues_=function(e){var r=0,a=this.seekable();a.length&&(r=a.start(0)),function(n,t,i){if(void 0===i&&(i=0),n.segments)for(var r,e=i,a=0;a"u"?o:(e?delete r.disabled:r.disabled=!0,e!==o&&!a&&(i(),n.trigger(e?"renditionenabled":"renditiondisabled")),e)}}(n.playlists,t.id,o)},oc=["seeking","seeked","pause","playing","error"],nv=function(){function s(t){var i=this;this.masterPlaylistController_=t.masterPlaylistController,this.tech_=t.tech,this.seekable=t.seekable,this.allowSeeksWithinUnsafeLiveWindow=t.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=t.liveRangeSafeTimeDelta,this.media=t.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=mi("PlaybackWatcher"),this.logger_("initialize");var e=function(){return i.monitorCurrentTime_()},r=function(){return i.monitorCurrentTime_()},a=function(){return i.techWaiting_()},o=function(){return i.cancelTimer_()},l=this.masterPlaylistController_,d=["main","subtitle","audio"],f={};d.forEach(function(g){f[g]={reset:function(){return i.resetSegmentDownloads_(g)},updateend:function(){return i.checkSegmentDownloads_(g)}},l[g+"SegmentLoader_"].on("appendsdone",f[g].updateend),l[g+"SegmentLoader_"].on("playlistupdate",f[g].reset),i.tech_.on(["seeked","seeking"],f[g].reset)});var v=function(T){["main","audio"].forEach(function(E){l[E+"SegmentLoader_"][T]("appended",i.seekingAppendCheck_)})};this.seekingAppendCheck_=function(){i.fixesBadSeeks_()&&(i.consecutiveUpdates=0,i.lastRecordedTime=i.tech_.currentTime(),v("off"))},this.clearSeekingAppendCheck_=function(){return v("off")},this.watchForBadSeeking_=function(){i.clearSeekingAppendCheck_(),v("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",a),this.tech_.on(oc,o),this.tech_.on("canplay",r),this.tech_.one("play",e),this.dispose=function(){i.clearSeekingAppendCheck_(),i.logger_("dispose"),i.tech_.off("waiting",a),i.tech_.off(oc,o),i.tech_.off("canplay",r),i.tech_.off("play",e),i.tech_.off("seeking",i.watchForBadSeeking_),i.tech_.off("seeked",i.clearSeekingAppendCheck_),d.forEach(function(g){l[g+"SegmentLoader_"].off("appendsdone",f[g].updateend),l[g+"SegmentLoader_"].off("playlistupdate",f[g].reset),i.tech_.off(["seeked","seeking"],f[g].reset)}),i.checkCurrentTimeTimeout_&&P().clearTimeout(i.checkCurrentTimeTimeout_),i.cancelTimer_()}}var n=s.prototype;return n.monitorCurrentTime_=function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&P().clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=P().setTimeout(this.monitorCurrentTime_.bind(this),250)},n.resetSegmentDownloads_=function(i){var e=this.masterPlaylistController_[i+"SegmentLoader_"];this[i+"StalledDownloads_"]>0&&this.logger_("resetting possible stalled download count for "+i+" loader"),this[i+"StalledDownloads_"]=0,this[i+"Buffered_"]=e.buffered_()},n.checkSegmentDownloads_=function(i){var e=this.masterPlaylistController_,r=e[i+"SegmentLoader_"],a=r.buffered_(),o=function(n,t){if(n===t)return!1;if(!n&&t||!t&&n||n.length!==t.length)return!0;for(var i=0;i=e.end(e.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&i===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):i===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=i)}},n.cancelTimer_=function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null},n.fixesBadSeeks_=function(){if(!this.tech_.seeking())return!1;var o,e=this.seekable(),r=this.tech_.currentTime();if(this.afterSeekableWindow_(e,r,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(o=e.end(e.length-1)),this.beforeSeekableWindow_(e,r)){var d=e.start(0);o=d+(d===e.end(0)?0:bi)}if(typeof o<"u")return this.logger_("Trying to seek outside of seekable at time "+r+" with seekable range "+nd(e)+". Seeking to "+o+"."),this.tech_.setCurrentTime(o),!0;for(var f=this.masterPlaylistController_.sourceUpdater_,v=this.tech_.buffered(),g=f.audioBuffer?f.audioBuffered():null,T=f.videoBuffer?f.videoBuffered():null,E=this.media(),x=E.partTargetDuration?E.partTargetDuration:2*(E.targetDuration-Ki),S=[g,T],U=0;U "+r.end(0)+"]. Attempting to resume playback by seeking to the current time."),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"}),void this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})}},n.techWaiting_=function(){var i=this.seekable(),e=this.tech_.currentTime();if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(i,e)){var r=i.end(i.length-1);return this.logger_("Fell out of live window at time "+e+". Seeking to live point (seekable end) "+r),this.cancelTimer_(),this.tech_.setCurrentTime(r),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var a=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,o=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:a.audioBuffered(),videoBuffered:a.videoBuffered(),currentTime:e}))return this.cancelTimer_(),this.tech_.setCurrentTime(e),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;var d=xa(o,e);if(d.length>0){var f=d.start(0)-e;return this.logger_("Stopped at "+e+", setting timer for "+f+", seeking to "+d.start(0)),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*f,e),!0}return!1},n.afterSeekableWindow_=function(i,e,r,a){if(void 0===a&&(a=!1),!i.length)return!1;var o=i.end(i.length-1)+bi;return!r.endList&&a&&(o=i.end(i.length-1)+3*r.targetDuration),e>o},n.beforeSeekableWindow_=function(i,e){return!!(i.length&&i.start(0)>0&&e2)return{start:o,end:l}}return null},s}(),av={errorInterval:30,getSource:function(n){return n(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},sv=function s(n,t){var i=0,e=0,r=N.mergeOptions(av,t);n.ready(function(){n.trigger({type:"usage",name:"vhs-error-reload-initialized"}),n.trigger({type:"usage",name:"hls-error-reload-initialized"})});var a=function(){e&&n.currentTime(e)},o=function(g){null!=g&&(e=n.duration()!==1/0&&n.currentTime()||0,n.one("loadedmetadata",a),n.src(g),n.trigger({type:"usage",name:"vhs-error-reload"}),n.trigger({type:"usage",name:"hls-error-reload"}),n.play())},l=function(){return Date.now()-i<1e3*r.errorInterval?(n.trigger({type:"usage",name:"vhs-error-reload-canceled"}),void n.trigger({type:"usage",name:"hls-error-reload-canceled"})):r.getSource&&"function"==typeof r.getSource?(i=Date.now(),r.getSource.call(n,o)):void N.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")},d=function v(){n.off("loadedmetadata",a),n.off("error",l),n.off("dispose",v)};n.on("error",l),n.on("dispose",d),n.reloadSourceOnError=function(g){d(),s(n,g)}},Lt={PlaylistLoader:$r,Playlist:Yt,utils:Sm,STANDARD_PLAYLIST_SELECTOR:Kd,INITIAL_PLAYLIST_SELECTOR:function(){var n=this,t=this.playlists.master.playlists.filter(Yt.isEnabled);return Qr(t,function(e,r){return Lo(e,r)}),t.filter(function(e){return!!An(n.playlists.master,e).video})[0]||null},lastBandwidthSelector:Kd,movingAverageBandwidthSelector:function(n){var t=-1,i=-1;if(n<0||n>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){var e=this.useDevicePixelRatio&&P().devicePixelRatio||1;return t<0&&(t=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(t=n*this.systemBandwidth+(1-n)*t,i=this.systemBandwidth),Zd(this.playlists.master,t,parseInt(Ia(this.tech_.el(),"width"),10)*e,parseInt(Ia(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)}},comparePlaylistBandwidth:Lo,comparePlaylistResolution:function(n,t){var i,e;return n.attributes.RESOLUTION&&n.attributes.RESOLUTION.width&&(i=n.attributes.RESOLUTION.width),i=i||P().Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(e=t.attributes.RESOLUTION.width),i===(e=e||P().Number.MAX_VALUE)&&n.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?n.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-e},xhr:xd()};Object.keys(Dt).forEach(function(s){Object.defineProperty(Lt,s,{get:function(){return N.log.warn("using Vhs."+s+" is UNSAFE be sure you know what you are doing"),Dt[s]},set:function(t){N.log.warn("using Vhs."+s+" is UNSAFE be sure you know what you are doing"),"number"!=typeof t||t<0?N.log.warn("value of Vhs."+s+" must be greater than or equal to 0"):Dt[s]=t}})});var lc="videojs-vhs",dc=function(n,t){for(var i=t.media(),e=-1,r=0;r=g&&f>=g?Math.max(f,T):T}return f},set:function(f){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=f,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){return Math.floor(1/(1/(this.bandwidth||1)+(this.throughput>0?1/this.throughput:0)))},set:function(){N.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:function(){return a.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return a.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return a.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return a.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return a.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return a.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return a.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return a.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},mediaAppends:{get:function(){return a.masterPlaylistController_.mediaAppends_()||0},enumerable:!0},mainAppendsToLoadedData:{get:function(){return a.masterPlaylistController_.mainAppendsToLoadedData_()||0},enumerable:!0},audioAppendsToLoadedData:{get:function(){return a.masterPlaylistController_.audioAppendsToLoadedData_()||0},enumerable:!0},appendsToLoadedData:{get:function(){return a.masterPlaylistController_.appendsToLoadedData_()||0},enumerable:!0},timeToLoadedData:{get:function(){return a.masterPlaylistController_.timeToLoadedData_()||0},enumerable:!0},buffered:{get:function(){return cr(a.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return a.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return a.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return a.tech_.name_},enumerable:!0},duration:{get:function(){return a.tech_.duration()},enumerable:!0},master:{get:function(){return a.playlists.master},enumerable:!0},playerDimensions:{get:function(){return a.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return cr(a.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return a.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.tech_.on("bandwidthupdate",function(){a.options_.useBandwidthFromLocalStorage&&function(n){if(!P().localStorage)return!1;var t=cc();t=t?N.mergeOptions(t,n):n;try{P().localStorage.setItem(lc,JSON.stringify(t))}catch{return!1}}({bandwidth:a.bandwidth,throughput:Math.round(a.throughput)})}),this.masterPlaylistController_.on("selectedinitialmedia",function(){!function(n){n.representations=function(){var t=n.masterPlaylistController_.master(),i=Cn(t)?n.masterPlaylistController_.getAudioTrackPlaylists_():t.playlists;return i?i.filter(function(e){return!To(e)}).map(function(e,r){return new iv(n,e,e.id)}):[]}}(a)}),this.masterPlaylistController_.sourceUpdater_.on("createdsourcebuffers",function(){a.setupEme_()}),this.on(this.masterPlaylistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.masterPlaylistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=P().URL.createObjectURL(this.masterPlaylistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}},t.createKeySessions_=function(){var e=this,r=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),function(n){var t=n.player,i=n.sourceKeySystems,e=n.audioMedia,r=n.mainPlaylists;if(!t.eme.initializeMediaKeys)return Promise.resolve();var o=function(n,t){return n.reduce(function(i,e){if(!e.contentProtection)return i;var r=t.reduce(function(a,o){var l=e.contentProtection[o];return l&&l.pssh&&(a[o]={pssh:l.pssh}),a},{});return Object.keys(r).length&&i.push(r),i},[])}(e?r.concat([e]):r,Object.keys(i)),l=[],d=[];return o.forEach(function(f){d.push(new Promise(function(v,g){t.tech_.one("keysessioncreated",v)})),l.push(new Promise(function(v,g){t.eme.initializeMediaKeys({keySystems:f},function(T){T?g(T):v()})}))}),Promise.race([Promise.all(l),Promise.race(d)])}({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:r&&r.media(),mainPlaylists:this.playlists.master.playlists}).then(function(){e.logger_("created EME key session"),e.masterPlaylistController_.sourceUpdater_.initializedEme()}).catch(function(a){e.logger_("error while creating EME key session",a),e.player_.error({message:"Failed to initialize media keys for EME",code:3})})},t.handleWaitingForKey_=function(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()},t.setupEme_=function(){var e=this,r=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,a=function(n){var t=n.player,a=function(n,t,i){if(!n)return n;var e={};t&&t.attributes&&t.attributes.CODECS&&(e=Aa(Xe(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(e.audio=i.attributes.CODECS);var r=$t(e.video),a=$t(e.audio),o={};for(var l in n)o[l]={},a&&(o[l].audioContentType=a),r&&(o[l].videoContentType=r),t.contentProtection&&t.contentProtection[l]&&t.contentProtection[l].pssh&&(o[l].pssh=t.contentProtection[l].pssh),"string"==typeof n[l]&&(o[l].url=n[l]);return N.mergeOptions(n,o)}(n.sourceKeySystems,n.media,n.audioMedia);return!(!a||(t.currentSource().keySystems=a,a&&!t.eme&&(N.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),1)))}({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:r&&r.media()});this.player_.tech_.on("keystatuschange",function(o){"output-restricted"===o.status&&e.masterPlaylistController_.blacklistCurrentPlaylist({playlist:e.masterPlaylistController_.media(),message:"DRM keystatus changed to "+o.status+". Playlist will fail to play. Check for HDCP content.",blacklistDuration:1/0})}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),11!==N.browser.IE_VERSION&&a?this.createKeySessions_():this.masterPlaylistController_.sourceUpdater_.initializedEme()},t.setupQualityLevels_=function(){var e=this,r=N.players[this.tech_.options_.playerId];!r||!r.qualityLevels||this.qualityLevels_||(this.qualityLevels_=r.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",function(){!function(n,t){t.representations().forEach(function(i){n.addQualityLevel(i)}),dc(n,t.playlists)}(e.qualityLevels_,e)}),this.playlists.on("mediachange",function(){dc(e.qualityLevels_,e.playlists)}))},n.version=function(){return{"@videojs/http-streaming":"2.13.1","mux.js":"6.0.1","mpd-parser":"0.21.0","m3u8-parser":"4.7.0","aes-decrypter":"3.1.2"}},t.version=function(){return this.constructor.version()},t.canChangeType=function(){return ic.canChangeType()},t.play=function(){this.masterPlaylistController_.play()},t.setCurrentTime=function(e){this.masterPlaylistController_.setCurrentTime(e)},t.duration=function(){return this.masterPlaylistController_.duration()},t.seekable=function(){return this.masterPlaylistController_.seekable()},t.dispose=function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.player_&&(delete this.player_.vhs,delete this.player_.dash,delete this.player_.hls),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.tech_&&delete this.tech_.hls,this.mediaSourceUrl_&&P().URL.revokeObjectURL&&(P().URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),s.prototype.dispose.call(this)},t.convertToProgramTime=function(e,r){return function(n){var t=n.playlist,i=n.time,e=void 0===i?void 0:i,r=n.callback;if(!r)throw new Error("getProgramTime: callback must be provided");if(!t||void 0===e)return r({message:"getProgramTime: playlist and time must be provided"});var a=function(n,t){if(!t||!t.segments||0===t.segments.length)return null;for(var e,i=0,r=0;ri){if(n>i+.25*a.duration)return null;e=a}return{segment:e,estimatedStart:e.videoTimingInfo?e.videoTimingInfo.transmuxedPresentationStart:i-e.duration,type:e.videoTimingInfo?"accurate":"estimate"}}(e,t);if(!a)return r({message:"valid programTime was not found"});if("estimate"===a.type)return r({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:a.estimatedStart});var o={mediaSeconds:e},l=function(n,t){if(!t.dateTimeObject)return null;var a=n-(t.videoTimingInfo.transmuxedPresentationStart+t.videoTimingInfo.transmuxerPrependedSeconds);return new Date(t.dateTimeObject.getTime()+1e3*a)}(e,a.segment);return l&&(o.programDateTime=l.toISOString()),r(null,o)}({playlist:this.masterPlaylistController_.media(),time:e,callback:r})},t.seekToProgramTime=function(e,r,a,o){return void 0===a&&(a=!0),void 0===o&&(o=2),Pm({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:o,pauseAfterSeek:a,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:r})},n}(N.getComponent("Component")),La={name:"videojs-http-streaming",VERSION:"2.13.1",canHandleSource:function(n,t){void 0===t&&(t={});var i=N.mergeOptions(N.options,t);return La.canPlayType(n.type,i)},handleSource:function(n,t,i){void 0===i&&(i={});var e=N.mergeOptions(N.options,i);return t.vhs=new Fo(n,t,e),N.hasOwnProperty("hls")||Object.defineProperty(t,"hls",{get:function(){return N.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."),t.vhs},configurable:!0}),t.vhs.xhr=xd(),t.vhs.src(n.src,n.type),t.vhs},canPlayType:function(n,t){void 0===t&&(t={});var i=N.mergeOptions(N.options,t),e=i.vhs,r=(e=void 0===e?{}:e).overrideNative,a=void 0===r?!N.browser.IS_ANY_SAFARI:r,o=i.hls,l=(o=void 0===o?{}:o).overrideNative,d=void 0!==l&&l,f=sn(n);return f&&(!Lt.supportsTypeNatively(f)||d||a)?"maybe":""}};ii("avc1.4d400d,mp4a.40.2")&&N.getTech("Html5").registerSourceHandler(La,0),N.VhsHandler=Fo,Object.defineProperty(N,"HlsHandler",{get:function(){return N.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),Fo},configurable:!0}),N.VhsSourceHandler=La,Object.defineProperty(N,"HlsSourceHandler",{get:function(){return N.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),La},configurable:!0}),N.Vhs=Lt,Object.defineProperty(N,"Hls",{get:function(){return N.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."),Lt},configurable:!0}),N.use||(N.registerComponent("Hls",Lt),N.registerComponent("Vhs",Lt)),N.options.vhs=N.options.vhs||{},N.options.hls=N.options.hls||{},N.getPlugin&&N.getPlugin("reloadSourceOnError")||(N.registerPlugin||N.plugin)("reloadSourceOnError",function(n){sv(this,n)});const xv=N,Sv=["target"];let Ev=(()=>{class s{constructor(t){this.gs=t,this.subtitlesOctopus=null,this.videoUrl=null,this.videoThumb=null,this.subtitleUrl=null,this.subtitleFonts=[]}ngOnInit(){this.gs.isBrowser&&this.target&&this.videoUrl&&(this.gs.log("[VIDEO-JS_INIT_URL]",this.videoUrl),this.player=xv(this.target.nativeElement,{autoplay:!1,controls:!0,fluid:!0,muted:!1,sources:[{src:this.videoUrl,type:"video/mp4"}],poster:this.videoThumb},()=>{this.gs.log("[VIDEO-JS_READY]",this.player),this.initSubtitle()}))}ngOnDestroy(){this.subtitlesOctopus?.dispose(),this.player?.dispose()}ngOnChanges(){this.subtitlesOctopus?this.subtitleUrl&&this.subtitlesOctopus.setTrackByUrl(this.subtitleUrl):this.initSubtitle()}initSubtitle(){this.subtitleUrl&&(this.subtitlesOctopus=new SubtitlesOctopus({video:this.target.nativeElement,subUrl:this.subtitleUrl,fonts:this.subtitleFonts,workerUrl:"/assets/lib/subtitles-octopus-worker.js",legacyWorkerUrl:"/assets/lib/subtitles-octopus-worker-legacy.js"}),this.gs.log("[SUBTITLE_INIT]",this.subtitlesOctopus))}}return s.\u0275fac=function(t){return new(t||s)(u.Y36(ke.U))},s.\u0275cmp=u.Xpm({type:s,selectors:[["app-vjs-player"]],viewQuery:function(t,i){if(1&t&&u.Gf(Sv,7),2&t){let e;u.iGM(e=u.CRH())&&(i.target=e.first)}},inputs:{videoUrl:"videoUrl",videoThumb:"videoThumb",subtitleUrl:"subtitleUrl",subtitleFonts:"subtitleFonts"},features:[u.TTD],decls:2,vars:0,consts:[["controls","","muted","","playsinline","","preload","none",1,"video-js","w-100"],["target",""]],template:function(t,i){1&t&&u._UZ(0,"video",0,1)}}),s})();var Cv=H(9461),kv=H(325),fc=H(3626);function Av(s,n){if(1&s&&(u.TgZ(0,"mat-list-option",23),u._UZ(1,"img",24),u.TgZ(2,"h4",25),u._uU(3),u.qZA()()),2&s){const t=u.oxw(2);u.hYB("routerLink","/anime/",t.berkasData.anime_.id,"-",t.animeName,""),u.xp6(1),u.s9C("src",t.berkasData.anime_.image_url,u.LSH),u.xp6(2),u.Oqu(t.berkasData.anime_.name)}}function wv(s,n){if(1&s&&(u.TgZ(0,"mat-list-option",23),u._UZ(1,"img",24),u.TgZ(2,"h4",25),u._uU(3),u.qZA()()),2&s){const t=u.oxw(2);u.MGl("routerLink","/dorama/",t.berkasData.dorama_.slug,""),u.xp6(1),u.s9C("src",t.berkasData.dorama_.image_url,u.LSH),u.xp6(2),u.Oqu(t.berkasData.dorama_.name)}}function Iv(s,n){if(1&s&&(u.TgZ(0,"mat-list-option"),u._UZ(1,"img",24),u.TgZ(2,"h4",25),u._uU(3),u.qZA()()),2&s){const t=u.oxw(2);u.xp6(1),u.MGl("src","",t.ENV.baseUrl,"/assets/img/favicon.png",u.LSH),u.xp6(2),u.Oqu(t.berkasData.sn_code)}}function Dv(s,n){if(1&s&&(u.TgZ(0,"mat-list-option",23),u._UZ(1,"img",24),u.TgZ(2,"h4",25),u._uU(3),u.qZA()()),2&s){const t=n.$implicit;u.MGl("routerLink","/fansub/",t.slug,""),u.xp6(1),u.s9C("src",t.image_url,u.LSH),u.xp6(2),u.Oqu(t.name)}}function Pv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",40),u.NdJ("click",function(){u.CHM(t);const e=u.oxw(4);return u.KtG(e.ddl(e.berkasData.attachment_.id))}),u._UZ(1,"mat-icon",41),u._uU(2),u.ALo(3,"slice"),u.ALo(4,"bytes"),u.qZA()}if(2&s){const t=u.oxw(4);u.hYB("matTooltip","",t.lampiran.orig||t.lampiran.name+"."+t.lampiran.ext," :: ",t.lampiran.download_count,"x Unduhan"),u.xp6(2),u.lnq(" ",u.Dn7(3,5,(null==t.lampiran.orig?null:t.lampiran.orig.split(".")[0])||t.lampiran.name,0,5),".....",t.lampiran.ext," (",u.lcZ(4,9,t.lampiran.size),") ")}}function Ov(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",42),u.NdJ("click",function(){u.CHM(t);const e=u.oxw(4);return u.KtG(e.cancel_dl(e.berkasData.attachment_.id))}),u._UZ(1,"mat-icon",43),u._uU(2," Batal Unduh "),u.qZA()}if(2&s){const t=u.oxw(4);u.hYB("matTooltip","",t.lampiran.orig||t.lampiran.name+"."+t.lampiran.ext," :: ",t.lampiran.download_count,"x Unduhan")}}function Lv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",40),u.NdJ("click",function(){u.CHM(t);const e=u.oxw(4);return u.KtG(e.saveFileAs(e.berkasData.attachment_.id))}),u._UZ(1,"mat-icon",44),u._uU(2),u.ALo(3,"slice"),u.ALo(4,"bytes"),u.qZA()}if(2&s){const t=u.oxw(4);u.hYB("matTooltip","",t.lampiran.orig||t.lampiran.name+"."+t.lampiran.ext," :: ",t.lampiran.download_count,"x Unduhan"),u.xp6(2),u.lnq(" ",u.Dn7(3,5,(null==t.lampiran.orig?null:t.lampiran.orig.split(".")[0])||t.lampiran.name,0,5),".....",t.lampiran.ext," (",u.lcZ(4,9,t.lampiran.size),") ")}}function Rv(s,n){if(1&s&&(u.TgZ(0,"div",33),u._uU(1),u._UZ(2,"br"),u._uU(3),u._UZ(4,"br")(5,"mat-progress-bar",45),u.qZA()),2&s){const t=u.oxw(4);u.xp6(1),u.AsE(" ",t.lampiran.percentage>=100?"Selesai Mengunduh ... ":"Sedang Mengunduh ... "," ",t.lampiran.totals," Bytes "),u.xp6(2),u.AsE(" ",t.lampiran.percentage,"% @ ",t.lampiran.speed," KB/s "),u.xp6(2),u.Q6J("mode",t.lampiran.mode)("value",t.lampiran.percentage)}}function Mv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"div",47),u.NdJ("click",function(){u.CHM(t);const e=u.oxw(5);return u.KtG(e.standardDdlVideo(e.berkasData.attachment_.id))}),u._uU(1," Unduhan Macet? "),u.TgZ(2,"i")(3,"u"),u._uU(4,"Coba Gunakan Unduhan Biasa~"),u.qZA()()()}}function Nv(s,n){if(1&s&&(u.TgZ(0,"div",18),u.YNc(1,Mv,5,0,"div",46),u.qZA()),2&s){const t=u.oxw(4);u.xp6(1),u.Q6J("ngIf",t.lampiran.isDownloading)}}function Uv(s,n){1&s&&(u.TgZ(0,"div",48),u._UZ(1,"hr",49),u.qZA())}function Fv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",42),u.NdJ("click",function(){const r=u.CHM(t).$implicit,a=u.oxw(4);return u.KtG(a.standardDdlSubsFont(r.id))}),u._UZ(1,"mat-icon",50),u._uU(2),u.ALo(3,"slice"),u.ALo(4,"bytes"),u.qZA()}if(2&s){const t=n.$implicit;u.hYB("matTooltip","",t.orig||t.name+"."+t.ext," :: ",t.download_count,"x Unduhan"),u.xp6(2),u.lnq(" ",u.Dn7(3,5,(null==t.orig?null:t.orig.split(".")[0])||t.name,0,5),".....",t.ext," (",u.lcZ(4,9,t.size),") ")}}function Bv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",42),u.NdJ("click",function(){const r=u.CHM(t).$implicit,a=u.oxw(4);return u.KtG(a.standardDdlSubsFont(r.id))}),u._UZ(1,"mat-icon",51),u._uU(2),u.ALo(3,"slice"),u.ALo(4,"bytes"),u.qZA()}if(2&s){const t=n.$implicit;u.hYB("matTooltip","",t.orig||t.name+"."+t.ext," :: ",t.download_count,"x Unduhan"),u.xp6(2),u.lnq(" ",u.Dn7(3,5,(null==t.orig?null:t.orig.split(".")[0])||t.name,0,5),".....",t.ext," (",u.lcZ(4,9,t.size),") ")}}function jv(s,n){if(1&s&&(u.TgZ(0,"div",32)(1,"div",33),u.YNc(2,Pv,5,11,"button",34),u.YNc(3,Ov,3,2,"button",35),u.YNc(4,Lv,5,11,"button",34),u.TgZ(5,"div",13),u.YNc(6,Rv,6,6,"div",36),u.qZA(),u.YNc(7,Nv,2,1,"div",37),u.YNc(8,Uv,2,0,"div",38),u.YNc(9,Fv,5,11,"button",39),u.YNc(10,Bv,5,11,"button",39),u.qZA()()),2&s){const t=u.oxw(3);u.xp6(2),u.Q6J("ngIf",!t.lampiran.data&&!t.lampiran.isDownloading&&!t.lampiran.isCompleted),u.xp6(1),u.Q6J("ngIf",!t.lampiran.data&&t.lampiran.isDownloading),u.xp6(1),u.Q6J("ngIf",t.lampiran.data),u.xp6(2),u.Q6J("ngIf",t.lampiran.isDownloading&&!t.lampiran.isCompleted),u.xp6(1),u.Q6J("ngIf",t.isHaveDDL&&!t.isDiscord),u.xp6(1),u.Q6J("ngIf",(null==t.berkasData.attachment_||null==t.berkasData.attachment_.subtitles_?null:t.berkasData.attachment_.subtitles_.length)>0||(null==t.berkasData.attachment_||null==t.berkasData.attachment_.fonts_?null:t.berkasData.attachment_.fonts_.length)>0),u.xp6(1),u.Q6J("ngForOf",t.berkasData.attachment_.subtitles_),u.xp6(1),u.Q6J("ngForOf",t.berkasData.attachment_.fonts_)}}function Hv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"div",32)(1,"div",33)(2,"button",52),u.NdJ("click",function(){u.CHM(t);const e=u.oxw(3);return u.KtG(e.verify())}),u._UZ(3,"mat-icon",53),u._uU(4),u.qZA()()()}if(2&s){const t=u.oxw(3);u.xp6(4),u.hij(" ",t.berkasData.attachment_," ")}}function Vv(s,n){if(1&s&&(u.TgZ(0,"div",14)(1,"div",15)(2,"h2",16)(3,"b",17)(4,"i"),u._uU(5,"Direct Download"),u.qZA()()()(),u.YNc(6,jv,11,8,"div",31),u.YNc(7,Hv,5,1,"div",31),u.qZA()),2&s){const t=u.oxw(2);u.xp6(6),u.Q6J("ngIf",t.isHaveDDL),u.xp6(1),u.Q6J("ngIf",!t.isHaveDDL)}}function qv(s,n){if(1&s&&(u.TgZ(0,"a",55),u._UZ(1,"mat-icon",56),u._uU(2),u.qZA()),2&s){const t=n.$implicit;u.s9C("href",t.url,u.LSH),u.xp6(2),u.hij(" ",t.name," ")}}function Wv(s,n){if(1&s&&(u.TgZ(0,"div",32),u.YNc(1,qv,3,2,"a",54),u.qZA()),2&s){const t=u.oxw(3);u.xp6(1),u.Q6J("ngForOf",t.berkasData.download_url)}}function Gv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"div",32)(1,"button",57),u.NdJ("click",function(){u.CHM(t);const e=u.oxw(3);return u.KtG(e.login())}),u._UZ(2,"mat-icon",58),u._uU(3," Klik Untuk Login "),u.qZA()()}}function Zv(s,n){if(1&s&&(u.TgZ(0,"div",14)(1,"div",15)(2,"h2",16)(3,"b",17),u._uU(4),u.qZA()()(),u.YNc(5,Wv,2,1,"div",31),u.YNc(6,Gv,4,0,"div",31),u.qZA()),2&s){const t=u.oxw(2);u.xp6(4),u.hij("Tautan Unduhan ",null!=t.AS.currentUserSubject&&t.AS.currentUserSubject.value?"External":"",""),u.xp6(1),u.Q6J("ngIf",null==t.AS.currentUserSubject?null:t.AS.currentUserSubject.value),u.xp6(1),u.Q6J("ngIf",!(null!=t.AS.currentUserSubject&&t.AS.currentUserSubject.value))}}function Kv(s,n){if(1&s&&(u.TgZ(0,"div",14)(1,"div",15)(2,"h2",16)(3,"b",17),u._uU(4,"Deskripsi & Informasi"),u.qZA()()(),u.TgZ(5,"div",18),u._UZ(6,"div",59),u.qZA()()),2&s){const t=u.oxw(2);u.xp6(6),u.Q6J("innerHTML",t.berkasData.description,u.oJD)}}function zv(s,n){if(1&s&&(u.TgZ(0,"mat-option",71),u._uU(1),u.qZA()),2&s){const t=n.$implicit;u.Q6J("value",t.url),u.xp6(1),u.Oqu(t.name)}}function Yv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"mat-form-field",68)(1,"mat-label"),u._uU(2,"Pilih Subtitle / Takarir (.ASS Saja)"),u.qZA(),u.TgZ(3,"mat-select",69),u.NdJ("valueChange",function(e){u.CHM(t);const r=u.oxw(3);return u.KtG(r.selectedSubsUrl=e)}),u.YNc(4,zv,2,2,"mat-option",70),u.qZA()()}if(2&s){const t=u.oxw(3);u.Q6J("color","accent"),u.xp6(3),u.Q6J("value",t.selectedSubsUrl),u.xp6(1),u.Q6J("ngForOf",t.subtitles)}}function $v(s,n){1&s&&u._UZ(0,"mat-progress-bar",72)}function Qv(s,n){1&s&&(u.TgZ(0,"span"),u._uU(1,"Mulai Streaming Video"),u.qZA())}function Xv(s,n){1&s&&(u.TgZ(0,"span"),u._uU(1," Loading ... "),u.qZA())}function Jv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",73),u.NdJ("click",function(){u.CHM(t);const e=u.oxw(3);return u.KtG(e.watchDdl())}),u._UZ(1,"mat-icon",74),u.YNc(2,Qv,2,0,"span",21),u.YNc(3,Xv,2,0,"span",21),u.qZA()}if(2&s){const t=u.oxw(3);u.Q6J("disabled",t.vjsInit),u.xp6(2),u.Q6J("ngIf",!t.vjsInit),u.xp6(1),u.Q6J("ngIf",t.vjsInit)}}function e_(s,n){if(1&s&&u._UZ(0,"app-vjs-player",75),2&s){const t=u.oxw(3);u.Q6J("videoUrl",t.ddlVideo)("videoThumb",t.videoThumb)("subtitleUrl",t.selectedSubsUrl)("subtitleFonts",t.ddlFonts)}}function t_(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",76),u.NdJ("click",function(){u.CHM(t);const e=u.oxw(3);return u.KtG(e.verify())}),u._UZ(1,"mat-icon",53),u._uU(2),u.qZA()}if(2&s){const t=u.oxw(3);u.xp6(2),u.hij(" ",t.berkasData.attachment_," ")}}function i_(s,n){if(1&s&&(u.TgZ(0,"div",14)(1,"div",15)(2,"h2",16)(3,"b",17),u._uU(4,"Video Stream (Browser Tertentu T.T)"),u.qZA()()(),u.TgZ(5,"div",18)(6,"div",60),u._uU(7," Dapat digunakan sebagai referensi untuk pratinjau namun kemungkinan jenis huruf tulisan gagal dimuat sehingga nantinya akan muncul huruf dengan gambar \u{1f533} misalnya kanji. Lalu juga memungkinkan terjadinya gerakan patah - patah jika browser tidak kuat untuk render .ASS subtitle dengan efek yang terlalu banyak. "),u.TgZ(8,"span",61)(9,"i"),u._uU(10,"Player"),u.qZA(),u._uU(11," ini mungkin tidak dapat memutar video HEVC-x265 (belum support semua "),u.TgZ(12,"i"),u._uU(13,"web browser"),u.qZA(),u._uU(14,") dan audio AC3 (atau ekstensi lain yang masih memiliki lisensi paten belum "),u.TgZ(15,"i"),u._uU(16,"open source"),u.qZA(),u._uU(17,"). Takarir / "),u.TgZ(18,"i"),u._uU(19,"subtitle"),u.qZA(),u._uU(20," yang dapat ditampilkan jenis .ASS saja, itupun jika tersedia di dalam video internalnya. "),u.qZA(),u.TgZ(21,"a",62),u._uU(22," * Browser Firefox sudah pasti tidak bisa memutar .MKV "),u.qZA()(),u.TgZ(23,"div",33),u.YNc(24,Yv,5,3,"mat-form-field",63),u.YNc(25,$v,1,0,"mat-progress-bar",64),u.YNc(26,Jv,4,3,"button",65),u.YNc(27,e_,1,4,"app-vjs-player",66),u.YNc(28,t_,3,1,"button",67),u.qZA()()()),2&s){const t=u.oxw(2);u.xp6(24),u.Q6J("ngIf",t.subtitles.length>0),u.xp6(1),u.Q6J("ngIf",t.isHaveDDL&&t.vjsInit&&!t.vjsReady),u.xp6(1),u.Q6J("ngIf",t.isHaveDDL&&!t.vjsReady),u.xp6(1),u.Q6J("ngIf",t.isHaveDDL&&t.vjsInit&&t.vjsReady),u.xp6(1),u.Q6J("ngIf",!t.isHaveDDL)}}function r_(s,n){1&s&&(u.TgZ(0,"div",14)(1,"div",18),u._UZ(2,"app-report"),u.qZA()())}function n_(s,n){if(1&s&&(u.TgZ(0,"div",1)(1,"div",2)(2,"div",3)(3,"ul",4),u._UZ(4,"li")(5,"li")(6,"li")(7,"li")(8,"li")(9,"li")(10,"li")(11,"li")(12,"li")(13,"li"),u.TgZ(14,"div",5)(15,"h2",6),u._uU(16),u.qZA(),u.TgZ(17,"p",7),u._uU(18),u.qZA(),u.TgZ(19,"p",8),u._uU(20),u.ALo(21,"date"),u.qZA()()()()(),u._UZ(22,"app-notifications"),u.TgZ(23,"div",9)(24,"div",10)(25,"div",11)(26,"div",12)(27,"div",13)(28,"div",14)(29,"div",15)(30,"h2",16)(31,"b",17),u._uU(32,"Rujukan"),u.qZA()()(),u.TgZ(33,"div",18)(34,"mat-selection-list",19),u.YNc(35,Av,4,4,"mat-list-option",20),u.YNc(36,wv,4,3,"mat-list-option",20),u.YNc(37,Iv,4,2,"mat-list-option",21),u.YNc(38,Dv,4,3,"mat-list-option",22),u.TgZ(39,"mat-list-option",23),u._UZ(40,"img",24),u.TgZ(41,"h4",25),u._uU(42),u.qZA()()()()(),u.YNc(43,Vv,8,2,"div",26),u.YNc(44,Zv,7,3,"div",26),u.qZA()()(),u.TgZ(45,"div",27)(46,"div",12)(47,"div",13),u.YNc(48,Kv,7,1,"div",26),u.YNc(49,i_,29,5,"div",26),u.YNc(50,r_,3,0,"div",26),u.TgZ(51,"div",14)(52,"div",28)(53,"h2",29)(54,"b",17),u._uU(55,"Komentar"),u.qZA()()(),u.TgZ(56,"div",18)(57,"div",30),u._UZ(58,"app-discussion"),u.qZA()()()()()()()()()),2&s){const t=u.oxw();u.xp6(2),u.Udp("background","url(/assets/img/banner/berkas-detail.png), linear-gradient(to bottom, "+(t.GS.isDarkMode?"#673ab7":"#3f51b5")+" 0%, #ee0dfd 100%)"),u.xp6(14),u.hij(" ",t.berkasData.name," "),u.xp6(2),u.AsE(" ",t.berkasData.view_count,"x Dilihat :: ",t.berkasData.like_count," Orang Suka "),u.xp6(2),u.hij(" ",u.xi3(21,19,t.berkasData.created_at,"d MMMM y, hh:mm:ss a z")," "),u.xp6(14),u.Q6J("multiple",!1),u.xp6(1),u.Q6J("ngIf",t.berkasData.anime_),u.xp6(1),u.Q6J("ngIf",t.berkasData.dorama_),u.xp6(1),u.Q6J("ngIf",t.berkasData.sn_code),u.xp6(1),u.Q6J("ngForOf",t.berkasData.fansub_),u.xp6(1),u.MGl("routerLink","/user/",t.berkasData.user_.username,""),u.xp6(1),u.s9C("src",t.berkasData.user_.image_url,u.LSH),u.xp6(2),u.Oqu(t.berkasData.user_.username),u.xp6(1),u.Q6J("ngIf",(null==t.AS.currentUserSubject?null:t.AS.currentUserSubject.value)&&t.berkasData.attachment_),u.xp6(1),u.Q6J("ngIf",!(null!=t.AS.currentUserSubject&&t.AS.currentUserSubject.value)||(null==t.AS.currentUserSubject?null:t.AS.currentUserSubject.value)&&(null==t.berkasData.download_url?null:t.berkasData.download_url.length)>0),u.xp6(4),u.Q6J("ngIf",t.berkasData.description),u.xp6(1),u.Q6J("ngIf",t.berkasData.attachment_&&t.isStreamable),u.xp6(1),u.Q6J("ngIf",null==t.SS.mySocket?null:t.SS.mySocket.id)}}let a_=(()=>{class s{constructor(t,i,e,r,a,o,l,d,f,v,g,T){this.router=t,this.activatedRoute=i,this.gs=e,this.bs=r,this.pi=a,this.berkas=o,this.fs=l,this.as=d,this.dm=f,this.wb=v,this.ss=g,this.dls=T,this.berkasId="",this.berkasData=null,this.subsBerkas=null,this.subsParam=null,this.subsDialog=null,this.subsSubtitlesFonts=null,this.subtitles=[],this.fonts=[],this.selectedSubsUrl=null,this.vjsInit=!1,this.vjsReady=!1,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get ENV(){return We.N}get GS(){return this.gs}get AS(){return this.as}get SS(){return this.ss}ngOnDestroy(){this.subsBerkas?.unsubscribe(),this.subsParam?.unsubscribe(),this.subsDialog?.unsubscribe(),this.subsSubtitlesFonts?.unsubscribe()}ngOnInit(){this.subsParam=this.activatedRoute.params.subscribe({next:t=>{this.berkasId=t.berkasId,this.bs.busy(),this.subsBerkas=this.berkas.getBerkas(this.berkasId).subscribe({next:i=>{this.gs.log("[BERKAS_DETAIL_SUCCESS]",i),this.berkasData=i.result,this.pi.updatePageMetaData(`${this.berkasData.name}`,`${this.berkasData.description}`,`${this.berkasData.name}`,this.berkasData.image_url,this.berkasData.user_.username),this.pi.updatePageHeader(this.berkasData.project_type_.name),this.bs.idle(),this.gs.isBrowser&&this.fs.initializeFab("edit",null,"Ubah Data Berkas",`/berkas/${this.berkasId}/edit`,!1)},error:i=>{this.gs.log("[BERKAS_DETAIL_ERROR]",i,"error"),this.bs.idle(),this.router.navigate(["/error"],{queryParams:{returnUrl:"/berkas"}})}})}})}watchDdl(){this.vjsInit=!0,this.setupVjs()}login(){this.router.navigate(["/login"],{queryParams:{returnUrl:this.router.url.split("?")[0]}})}verify(){this.router.navigate(["/verify"],{queryParams:{returnUrl:this.router.url.split("?")[0]}})}get animeName(){return this.berkasData.anime_.name.replace(/[^a-zA-Z0-9]/g,"-")}get lampiran(){return this.dm.getAttachmentDownloadFile(this.berkasData.attachment_)}get ddlVideo(){return this.ddlUrlLinkVideo(this.berkasData.attachment_.id)}get videoThumb(){return this.berkasData.image_url}get ddlFonts(){return this.fonts.length>0?this.fonts:[]}get isHaveDDL(){return!(!("attachment_"in this.berkasData)||!this.berkasData.attachment_)&&"string"!=typeof this.berkasData.attachment_}get isDiscord(){return this.isHaveDDL&&this.berkasData.attachment_?.discord}get isStreamable(){return this.isHaveDDL&&this.gs.includesOneOf(this.berkasData.attachment_?.ext,Q.t.fileTypeAttachmentStreamable)}ddl(t){var i=this;return(0,oe.Z)(function*(){i.isDiscord?i.dm.startDownload(t,!1):i.dm.startDownload(t)})()}cancel_dl(t){this.dm.cancelDownload(t)}saveFileAs(t){this.dm.saveFileAs(t)}standardDdlVideo(t){this.wb.winboxOpenUri(this.ddlUrlLinkVideo(t))}ddlUrlLinkVideo(t){return this.isDiscord?`${We.N.apiUrl}/ddl-seek/${t}?ngsw-bypass=true`:`${We.N.apiUrl}/attachment/${t}?ngsw-bypass=true`}standardDdlSubsFont(t){this.wb.winboxOpenUri(this.ddlUrlLinkSubsFont(t))}ddlUrlLinkSubsFont(t){return`${We.N.apiUrl}/attachment/${t}?ngsw-bypass=true`}setupVjs(){if(this.isHaveDDL){const t=[],i=[],e=[];if("subtitles_"in this.berkasData.attachment_&&this.berkasData.attachment_.subtitles_)for(const r of this.berkasData.attachment_.subtitles_){const a=this.dls.downloadLampiran(r.id).pipe((0,me.b)(o=>{o.type===Le.dt.Response&&(this.gs.log("[DOWNLOAD_COMPLETED]",o),i.push({name:r.name,url:URL.createObjectURL(new Blob([o.body]))}))}));t.push(a)}if("fonts_"in this.berkasData.attachment_&&this.berkasData.attachment_.fonts_)for(const r of this.berkasData.attachment_.fonts_){const a=this.dls.downloadLampiran(r.id).pipe((0,me.b)(o=>{o.type===Le.dt.Response&&(this.gs.log("[DOWNLOAD_COMPLETED]",o),e.push(URL.createObjectURL(new Blob([o.body]))))}));t.push(a)}this.subsSubtitlesFonts=(0,Oe.z)(...t).subscribe({next:r=>{r.type===Le.dt.DownloadProgress&&this.gs.log("[DOWNLOAD_PROGRESS]",r),r.type===Le.dt.Response&&this.gs.log("[DOWNLOAD_COMPLETED]",r)},error:r=>{this.gs.log("[DOWNLOAD_ERROR]",r,"error")},complete:()=>{this.subtitles=i,this.fonts=e,this.vjsReady=!0}})}}}return s.\u0275fac=function(t){return new(t||s)(u.Y36(_e.F0),u.Y36(_e.gz),u.Y36(ke.U),u.Y36(Ne.z),u.Y36(je.Z),u.Y36(rt.A),u.Y36(w.r),u.Y36(D.e),u.Y36(de),u.Y36(le.N),u.Y36(xe.R),u.Y36($.v))},s.\u0275cmp=u.Xpm({type:s,selectors:[["app-berkas-detail"]],decls:1,vars:1,consts:[["class","p-0 m-0",4,"ngIf"],[1,"p-0","m-0"],[1,"container-fluid","p-0"],[1,"wrapper"],[1,"bg-bubbles","align-items-center","p-0"],[1,"container","align-items-center","h-100","p-3","text-light",2,"overflow-y","auto"],["_ngcontent-serverapp-c311","",1,"mb-0",2,"line-height","normal"],[1,"mt-3","mb-0"],[1,"mb-0"],[1,"container"],[1,"row"],[1,"col-md-5","col-xl-4","p-3"],[1,"row","sticky-top"],[1,"col"],[1,"row","py-3"],[1,"col-12","pt-3","sticky-top","bg-bifeldy"],[1,"border-bottom-dotted"],[1,"text-bifeldy"],[1,"col-12"],[3,"multiple"],[3,"routerLink",4,"ngIf"],[4,"ngIf"],[3,"routerLink",4,"ngFor","ngForOf"],[3,"routerLink"],["matListAvatar","",1,"ms-3",2,"border-radius","0",3,"src"],[1,"text-truncate"],["class","row py-3",4,"ngIf"],[1,"col-md-7","col-xl-8","p-3","sticky-top"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"p-3"],["class","col-12 text-center",4,"ngIf"],[1,"col-12","text-center"],[1,"px-3"],["type","button","class","m-1 w-100 shiny","mat-stroked-button","","color","accent",3,"matTooltip","click",4,"ngIf"],["type","button","class","m-1 w-100","mat-stroked-button","","color","accent",3,"matTooltip","click",4,"ngIf"],["class","px-3",4,"ngIf"],["class","col-12",4,"ngIf"],["class","col-12 m-1",4,"ngIf"],["type","button","class","m-1 w-100","mat-stroked-button","","color","accent",3,"matTooltip","click",4,"ngFor","ngForOf"],["type","button","mat-stroked-button","","color","accent",1,"m-1","w-100","shiny",3,"matTooltip","click"],["fontIcon","movie",1,"me-1"],["type","button","mat-stroked-button","","color","accent",1,"m-1","w-100",3,"matTooltip","click"],["fontIcon","close",1,"me-1"],["fontIcon","save",1,"me-1"],["color","accent",3,"mode","value"],["class","px-3 text-danger","style","cursor: pointer;",3,"click",4,"ngIf"],[1,"px-3","text-danger",2,"cursor","pointer",3,"click"],[1,"col-12","m-1"],[1,"my-3","border-bottom-dotted",2,"height","4px","background","url('/assets/img/stripe.png')"],["fontIcon","notes",1,"me-1"],["fontIcon","font_download",1,"me-1"],["type","button","mat-stroked-button","","color","accent","matTooltip","Direct Download Link Berkas",1,"m-1",3,"click"],["fontIcon","enhanced_encryption",1,"me-1"],["class","m-1","target","_blank","mat-stroked-button","","color","accent",3,"href",4,"ngFor","ngForOf"],["target","_blank","mat-stroked-button","","color","accent",1,"m-1",3,"href"],["fontIcon","cloud_download",1,"me-1"],["type","button","mat-stroked-button","","color","accent",1,"m-1",3,"click"],["fontIcon","vpn_key",1,"me-1"],[1,"py-2","px-3",2,"white-space","pre-line !important",3,"innerHTML"],[1,"py-2","px-3"],[1,"text-success"],["href","https://bugzilla.mozilla.org/show_bug.cgi?id=1422891",1,"text-warning","text-decoration-none"],["appearance","outline","class","pt-3 col-12",3,"color",4,"ngIf"],["color","warn","mode","buffer","class","mb-3",4,"ngIf"],["type","button","class","w-100","mat-stroked-button","","color","warn",3,"disabled","click",4,"ngIf"],[3,"videoUrl","videoThumb","subtitleUrl","subtitleFonts",4,"ngIf"],["type","button","class","w-100","mat-stroked-button","","color","accent",3,"click",4,"ngIf"],["appearance","outline",1,"pt-3","col-12",3,"color"],["placeholder","Pilih Salah Satu",3,"value","valueChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["color","warn","mode","buffer",1,"mb-3"],["type","button","mat-stroked-button","","color","warn",1,"w-100",3,"disabled","click"],["fontIcon","play_arrow",1,"me-1"],[3,"videoUrl","videoThumb","subtitleUrl","subtitleFonts"],["type","button","mat-stroked-button","","color","accent",1,"w-100",3,"click"]],template:function(t,i){1&t&&u.YNc(0,n_,59,22,"div",0),2&t&&u.Q6J("ngIf",i.berkasData)},dependencies:[X.sg,X.O5,_e.rH,J.ey,ue.lW,ue.zs,ee.Hw,ie.KE,ie.hX,Ae.eA,Ae.Ub,Ae.vS,Ze.pW,Ge.gD,qe.gM,Me.t,Ev,Cv.S,kv.Y,X.OU,X.uU,fc.$],styles:[".wrapper[_ngcontent-%COMP%]{position:sticky;left:0;width:100%;height:128px;overflow:hidden;background-size:168px,auto!important;background-repeat:no-repeat,repeat!important;background-position-x:100%,0%!important}.bg-bubbles[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{position:absolute;list-style:none;display:block;width:40px;height:40px;background-color:#ffffff26;bottom:-160px;animation:square 25s infinite;transition-timing-function:linear}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(1){left:10%}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(2){left:20%;width:80px;height:80px;animation-delay:2s;animation-duration:17s}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(3){left:25%;animation-delay:4s}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(4){left:40%;width:60px;height:60px;animation-duration:22s;background-color:#ffffff40}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(5){left:70%}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(6){left:80%;width:120px;height:120px;animation-delay:3s;background-color:#fff3}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(7){left:32%;width:160px;height:160px;animation-delay:7s}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(8){left:55%;width:20px;height:20px;animation-delay:15s;animation-duration:40s}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(9){left:25%;width:10px;height:10px;animation-delay:2s;animation-duration:40s;background-color:#ffffff4d}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(10){left:90%;width:160px;height:160px;animation-delay:11s}@keyframes square{0%{transform:translateY(0)}to{transform:translateY(-512px) rotate(512deg)}}"]}),s})();var Ra=H(8372),Ma=H(9094),Bo=H(3900),jo=H(8746),Na=H(5625),s_=H(519),o_=H(8439),u_=H(5679),l_=H(6781),d_=H(7902),c_=H(6493),hc=H(7957),f_=H(4850),h_=H(4144),pc=H(455);function p_(s,n){if(1&s&&(u.TgZ(0,"div"),u._uU(1),u.ALo(2,"bytes"),u.qZA()),2&s){const t=u.oxw(2);u.xp6(1),u.hij("Ukuran Upload Melebihi Batas ",u.lcZ(2,1,t.imageLimitExceeded)," !")}}function m_(s,n){if(1&s&&(u.TgZ(0,"div"),u._uU(1),u.qZA()),2&s){const t=u.oxw(2);u.xp6(1),u.Oqu(t.imageErrorText)}}function g_(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"div",51)(1,"button",31),u.NdJ("click",function(){u.CHM(t);const e=u.oxw(2);return u.KtG(e.submitImage())}),u._UZ(2,"mat-icon",52),u._uU(3," Unggah "),u.qZA()()}if(2&s){const t=u.oxw(2);u.xp6(1),u.Q6J("disabled",t.submitted)}}function v_(s,n){1&s&&(u.TgZ(0,"div",20)(1,"mat-slide-toggle",53)(2,"i"),u._uU(3,"Private"),u.qZA(),u._uU(4," Akses Hanya Dengan URL "),u.qZA()())}function __(s,n){if(1&s&&(u.TgZ(0,"mat-option",54),u._uU(1),u.qZA()),2&s){const t=n.$implicit;u.Q6J("value",t.id),u.xp6(1),u.Oqu(t.name)}}function y_(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"Jenis Tidak Boleh Kosong"),u.qZA())}function T_(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"Jenis Hanya Boleh Huruf Standar Papan Ketik"),u.qZA())}function b_(s,n){1&s&&u.GkF(0)}function x_(s,n){1&s&&(u.TgZ(0,"mat-option",61),u._UZ(1,"mat-progress-bar",62),u.qZA())}function S_(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"mat-option",64),u.NdJ("click",function(){const r=u.CHM(t).$implicit,a=u.oxw(4);return u.KtG(a.filterAnimeSelected(r))}),u._UZ(1,"img",65),u.TgZ(2,"span",66),u._uU(3),u.qZA()()}if(2&s){const t=n.$implicit;u.Q6J("value",t.id),u.xp6(1),u.s9C("src",t.image_url,u.LSH),u.xp6(2),u.lnq("",t.id," :: ",null==t.media_type?null:t.media_type.toUpperCase()," :: ",t.title,"")}}function E_(s,n){if(1&s&&(u.ynx(0),u.YNc(1,S_,4,5,"mat-option",63),u.BQk()),2&s){const t=u.oxw(3);u.xp6(1),u.Q6J("ngForOf",t.filteredAnime)}}function C_(s,n){if(1&s&&(u.TgZ(0,"small",67),u._uU(1),u.qZA()),2&s){const t=u.oxw(3);u.xp6(1),u.Oqu(t.fg.get("anime_name").value)}}function k_(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"ID Anime Tidak Boleh Kosong"),u.qZA())}function A_(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"ID Anime Hanya Boleh Angka"),u.qZA())}function w_(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"mat-form-field",55)(1,"mat-label"),u._uU(2,"Anime Terkait"),u.qZA(),u.TgZ(3,"input",56),u.NdJ("keyup",function(){u.CHM(t);const e=u.oxw(2);return u.KtG(e.resetSelectedAnime())}),u.qZA(),u._UZ(4,"mat-icon",57),u.TgZ(5,"mat-autocomplete",null,58),u.YNc(7,x_,2,0,"mat-option",59),u.YNc(8,E_,2,1,"ng-container",17),u.qZA(),u.YNc(9,C_,2,1,"small",60),u.TgZ(10,"mat-error"),u.YNc(11,k_,2,0,"div",17),u.YNc(12,A_,2,0,"div",17),u.qZA()()}if(2&s){const t=u.MAs(6),i=u.oxw(2);u.Q6J("color","accent"),u.xp6(3),u.Q6J("matAutocomplete",t),u.xp6(4),u.Q6J("ngIf",i.isLoading),u.xp6(1),u.Q6J("ngIf",!i.isLoading),u.xp6(1),u.Q6J("ngIf",i.fg.get("anime_name").value),u.xp6(2),u.Q6J("ngIf",i.fg.get("anime_id").hasError("required")),u.xp6(1),u.Q6J("ngIf",i.fg.get("anime_id").hasError("pattern"))}}function I_(s,n){1&s&&u.GkF(0)}function D_(s,n){1&s&&(u.TgZ(0,"mat-option",61),u._UZ(1,"mat-progress-bar",62),u.qZA())}function P_(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"mat-option",64),u.NdJ("click",function(){const r=u.CHM(t).$implicit,a=u.oxw(5);return u.KtG(a.filterDoramaSelected(r))}),u._UZ(1,"img",65),u.TgZ(2,"span",66),u._uU(3),u.qZA()()}if(2&s){const t=n.$implicit;u.Q6J("value",t.mdl_id),u.xp6(1),u.s9C("src",t.image_url,u.LSH),u.xp6(2),u.AsE("",t.mdl_id," :: ",t.title,"")}}function O_(s,n){if(1&s&&(u.ynx(0),u.YNc(1,P_,4,4,"mat-option",63),u.BQk()),2&s){const t=u.oxw(4);u.xp6(1),u.Q6J("ngForOf",t.filteredDorama)}}function L_(s,n){if(1&s&&(u.TgZ(0,"small",67),u._uU(1),u.qZA()),2&s){const t=u.oxw(4);u.xp6(1),u.Oqu(t.fg.get("dorama_name").value)}}function R_(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"ID Dorama Tidak Boleh Kosong"),u.qZA())}function M_(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"ID Dorama Hanya Boleh Angka"),u.qZA())}function N_(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"mat-form-field",55)(1,"mat-label"),u._uU(2,"Dorama Terkait"),u.qZA(),u.TgZ(3,"input",70),u.NdJ("keyup",function(){u.CHM(t);const e=u.oxw(3);return u.KtG(e.resetSelectedDorama())}),u.qZA(),u._UZ(4,"mat-icon",57),u.TgZ(5,"mat-autocomplete",null,71),u.YNc(7,D_,2,0,"mat-option",59),u.YNc(8,O_,2,1,"ng-container",17),u.qZA(),u.YNc(9,L_,2,1,"small",60),u.TgZ(10,"mat-error"),u.YNc(11,R_,2,0,"div",17),u.YNc(12,M_,2,0,"div",17),u.qZA()()}if(2&s){const t=u.MAs(6),i=u.oxw(3);u.Q6J("color","accent"),u.xp6(3),u.Q6J("matAutocomplete",t),u.xp6(4),u.Q6J("ngIf",i.isLoading),u.xp6(1),u.Q6J("ngIf",!i.isLoading),u.xp6(1),u.Q6J("ngIf",i.fg.get("dorama_name").value),u.xp6(2),u.Q6J("ngIf",i.fg.get("dorama_id").hasError("required")),u.xp6(1),u.Q6J("ngIf",i.fg.get("dorama_id").hasError("pattern"))}}function U_(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"Kode Serial Tidak Boleh Kosong"),u.qZA())}function F_(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"Kode Serial Hanya Boleh Huruf Besar, Strip, Dan Angka"),u.qZA())}function B_(s,n){if(1&s&&(u.TgZ(0,"mat-form-field",35)(1,"mat-label"),u._uU(2,"Kode / Serial Number"),u.qZA(),u._UZ(3,"input",73)(4,"mat-icon",74),u.TgZ(5,"mat-error"),u.YNc(6,U_,2,0,"div",17),u.YNc(7,F_,2,0,"div",17),u.qZA()()),2&s){const t=u.oxw(4);u.Q6J("color","accent"),u.xp6(6),u.Q6J("ngIf",t.fg.get("sn_code").hasError("required")),u.xp6(1),u.Q6J("ngIf",t.fg.get("sn_code").hasError("pattern"))}}function j_(s,n){if(1&s&&u.YNc(0,B_,8,3,"mat-form-field",72),2&s){const t=u.oxw(3);u.Q6J("ngIf",t.berkasType)}}function H_(s,n){if(1&s&&(u.YNc(0,I_,1,0,"ng-container",25),u.YNc(1,N_,13,7,"ng-template",null,68,u.W1O),u.YNc(3,j_,1,1,"ng-template",null,69,u.W1O)),2&s){const t=u.MAs(2),i=u.MAs(4),e=u.oxw(2);u.Q6J("ngIf",e.berkasType.toLowerCase().includes("dorama_"))("ngIfThen",t)("ngIfElse",i)}}function V_(s,n){1&s&&u._UZ(0,"mat-icon",57)}function q_(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",81),u.NdJ("click",function(){u.CHM(t);const e=u.oxw().index,r=u.oxw(2);return u.KtG(r.removeFansub(e))}),u._UZ(1,"mat-icon",82),u.qZA()}}function W_(s,n){1&s&&(u.TgZ(0,"mat-option",61),u._UZ(1,"mat-progress-bar",62),u.qZA())}function G_(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"mat-option",64),u.NdJ("click",function(){const r=u.CHM(t).$implicit,a=u.oxw(2).index,o=u.oxw(2);return u.KtG(o.filterFansubSelected(r,a))}),u._UZ(1,"img",83),u.TgZ(2,"span",66),u._uU(3),u.qZA()()}if(2&s){const t=n.$implicit;u.Q6J("value",t.id),u.xp6(1),u.s9C("src",t.image_url,u.LSH),u.xp6(2),u.AsE("",t.slug," :: ",t.name,"")}}function Z_(s,n){if(1&s&&(u.ynx(0),u.YNc(1,G_,4,4,"mat-option",63),u.BQk()),2&s){const t=u.oxw(3);u.xp6(1),u.Q6J("ngForOf",t.filteredFansub)}}function K_(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"ID Fansub Tidak Boleh Kosong"),u.qZA())}function z_(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"ID Fansub Hanya Boleh Angka"),u.qZA())}function Y_(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"div")(1,"div",75)(2,"mat-form-field",76)(3,"mat-label"),u._uU(4,"Fansub Terkait"),u.qZA(),u.TgZ(5,"input",77),u.NdJ("keyup",function(){const r=u.CHM(t).index,a=u.oxw(2);return u.KtG(a.resetSelectedFansub(r))}),u.qZA(),u.YNc(6,V_,1,0,"mat-icon",78),u.YNc(7,q_,2,0,"button",79),u.TgZ(8,"mat-autocomplete",null,80),u.YNc(10,W_,2,0,"mat-option",59),u.YNc(11,Z_,2,1,"ng-container",17),u.qZA(),u.TgZ(12,"small",67),u._uU(13),u.qZA(),u.TgZ(14,"mat-error"),u.YNc(15,K_,2,0,"div",17),u.YNc(16,z_,2,0,"div",17),u.qZA()()()()}if(2&s){const t=n.$implicit,i=n.index,e=u.MAs(9),r=u.oxw(2);u.xp6(1),u.Q6J("formGroupName",i),u.xp6(1),u.Q6J("color","accent"),u.xp6(3),u.Q6J("matAutocomplete",e),u.xp6(1),u.Q6J("ngIf",t.get("fansub_id").value||0===i),u.xp6(1),u.Q6J("ngIf",!t.get("fansub_id").value&&i>0),u.xp6(3),u.Q6J("ngIf",r.isLoading),u.xp6(1),u.Q6J("ngIf",!r.isLoading),u.xp6(2),u.Oqu(t.get("fansub_name").value),u.xp6(2),u.Q6J("ngIf",t.get("fansub_id").hasError("required")),u.xp6(1),u.Q6J("ngIf",t.get("fansub_id").hasError("pattern"))}}function $_(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"Nama Berkas Tidak Boleh Kosong"),u.qZA())}function Q_(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"Nama Berkas Hanya Boleh Huruf Standar Papan Ketik"),u.qZA())}function X_(s,n){1&s&&u.GkF(0)}function J_(s,n){if(1&s&&(u.TgZ(0,"p",88),u._uU(1),u.qZA()),2&s){const t=u.oxw(3);u.xp6(1),u.Oqu(t.attachmentFontSubtitle.join(", ").toLowerCase())}}function e0(s,n){if(1&s&&(u.TgZ(0,"div",9)(1,"mat-list")(2,"div",84),u._uU(3,"Berkas yang terlampir tidak boleh diubah."),u.qZA(),u.TgZ(4,"mat-list-item"),u._UZ(5,"mat-icon",85),u.TgZ(6,"div",86),u._uU(7),u.qZA(),u.TgZ(8,"div",86),u._uU(9),u.ALo(10,"bytes"),u.qZA()(),u.YNc(11,J_,2,1,"p",87),u.qZA()()),2&s){const t=u.oxw(2);u.xp6(7),u.AsE("",t.attachmentFile.name,".",t.attachmentFile.ext,""),u.xp6(2),u.Oqu(u.lcZ(10,4,t.attachmentFile.size)),u.xp6(2),u.Q6J("ngIf",t.attachmentFontSubtitle.length>0)}}function t0(s,n){1&s&&u.GkF(0)}function i0(s,n){if(1&s&&(u.TgZ(0,"div"),u._uU(1),u.ALo(2,"bytes"),u.qZA()),2&s){const t=u.oxw(4);u.xp6(1),u.hij("Ukuran Upload Melebihi Batas ",u.lcZ(2,1,t.attachmentLimitExceeded)," !")}}function r0(s,n){if(1&s&&(u.TgZ(0,"div"),u._uU(1),u.qZA()),2&s){const t=u.oxw(4);u.xp6(1),u.Oqu(t.attachmentErrorText)}}function n0(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"div",42)(1,"div",99)(2,"div",100),u._uU(3),u.ALo(4,"bytes"),u._UZ(5,"br")(6,"mat-progress-bar",101),u.qZA()(),u.TgZ(7,"div",102)(8,"button",31),u.NdJ("click",function(){const r=u.CHM(t).$implicit,a=u.oxw(4);return u.KtG(a.submitAttachment(r))}),u._UZ(9,"mat-icon",103),u._uU(10," Unggah "),u.qZA()()()}if(2&s){const t=n.$implicit,i=u.oxw(4);u.xp6(3),u.HOy(" ",t.status," :: ",t.progress,"% @ ",u.lcZ(4,7,t.speed),"/s # ",t.remaining," detik "),u.xp6(3),u.Q6J("mode","determinate")("value",t.progress),u.xp6(2),u.Q6J("disabled",i.submitted||"complete"===t.status||"uploading"===t.status)}}function a0(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"div",9)(1,"div",91)(2,"small",92),u._uU(3," * "),u.TgZ(4,"i"),u._uU(5,"Resume-able Upload"),u.qZA(),u._uU(6," (Tidak wajib, jika sudah ada URL eksternal, misal alamat webmu gdrive mediafire mega dan lain sebagainya). Mohon ditunggu dan jangan di tinggal, berkas lampiran akan "),u.TgZ(7,"i"),u._uU(8,"expired"),u.qZA(),u._uU(9),u.TgZ(10,"i"),u._uU(11,"upload"),u.qZA(),u._uU(12,". Lalu kemudian saat berkas berhasil dibuat, lampiran tidak akan bisa di modifikasi. "),u.qZA()(),u.TgZ(13,"mat-form-field",93)(14,"mat-label"),u._uU(15,"Upload Lampiran Berkas -- DDL"),u.qZA(),u.TgZ(16,"ngx-mat-file-input",94,95),u.NdJ("change",function(e){u.CHM(t);const r=u.MAs(17),a=u.oxw(3);return u.KtG(a.uploadAttachment(e,r))}),u.qZA(),u._UZ(18,"mat-icon",96),u.qZA(),u.TgZ(19,"mat-error",97)(20,"small"),u.YNc(21,i0,3,3,"div",17),u.YNc(22,r0,2,1,"div",17),u.qZA()()(),u.YNc(23,n0,11,9,"div",98),u.ALo(24,"async")}if(2&s){const t=u.oxw(3);u.xp6(9),u.hij(" apabila tidak disimpan dalam ",t.CONSTANTS.timeoutDeleteTempAttachmentTime/60/1e3," menit setelah berhasil "),u.xp6(4),u.Q6J("color","accent"),u.xp6(3),u.Q6J("disabled",null!==t.attachmentSelected)("accept",t.fileTypeAttachmentAllowed),u.xp6(5),u.Q6J("ngIf",t.attachmentLimitExceeded),u.xp6(1),u.Q6J("ngIf",t.attachmentErrorText),u.xp6(1),u.Q6J("ngForOf",u.lcZ(24,7,t.uploads$))}}function s0(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",104),u.NdJ("click",function(){u.CHM(t);const e=u.oxw(3);return u.KtG(e.verify())}),u._UZ(1,"mat-icon",105),u._uU(2," Verifikasi Akun Untuk Upload DDL! "),u.qZA()}}function o0(s,n){if(1&s&&(u.YNc(0,t0,1,0,"ng-container",25),u.YNc(1,a0,25,9,"ng-template",null,89,u.W1O),u.YNc(3,s0,3,0,"ng-template",null,90,u.W1O)),2&s){const t=u.MAs(2),i=u.MAs(4),e=u.oxw(2);u.Q6J("ngIf",null==e.AS.currentUserSubject||null==e.AS.currentUserSubject.value?null:e.AS.currentUserSubject.value.verified)("ngIfThen",t)("ngIfElse",i)}}function u0(s,n){1&s&&(u.TgZ(0,"div",91)(1,"small",92),u._uU(2,"* "),u.TgZ(3,"i"),u._uU(4,"Gunakan tombol (X) untuk menghapus URL Eksternal jika ingin hanya menggunakan lampiran "),u.TgZ(5,"i"),u._uU(6,"upload"),u.qZA(),u._uU(7," DDL saja"),u.qZA()()())}function l0(s,n){1&s&&u._UZ(0,"mat-icon",114)}function d0(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",81),u.NdJ("click",function(){u.CHM(t);const e=u.oxw().index,r=u.oxw(2);return u.KtG(r.removeDownloadLink(e))}),u._UZ(1,"mat-icon",82),u.qZA()}}function c0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"Web Tidak Boleh Kosong"),u.qZA())}function f0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"Web Hanya Boleh Huruf Standar Papan Ketik"),u.qZA())}function h0(s,n){1&s&&u._UZ(0,"mat-icon",115)}function p0(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",81),u.NdJ("click",function(){u.CHM(t);const e=u.oxw().index,r=u.oxw(2);return u.KtG(r.removeDownloadLink(e))}),u._UZ(1,"mat-icon",82),u.qZA()}}function m0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"Tautan Tidak Boleh Kosong"),u.qZA())}function g0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"Tautan Link Tidak Valid"),u.qZA())}function v0(s,n){if(1&s&&(u.ynx(0),u.TgZ(1,"div",106),u.YNc(2,u0,8,0,"div",107),u.TgZ(3,"mat-form-field",108)(4,"mat-label"),u._uU(5,"Nama Website"),u.qZA(),u._UZ(6,"input",109),u.YNc(7,l0,1,0,"mat-icon",110),u.YNc(8,d0,2,0,"button",79),u.TgZ(9,"mat-error"),u.YNc(10,c0,2,0,"div",17),u.YNc(11,f0,2,0,"div",17),u.qZA()(),u.TgZ(12,"mat-form-field",111)(13,"mat-label"),u._uU(14,"Tautan Link"),u.qZA(),u._UZ(15,"input",112),u.YNc(16,h0,1,0,"mat-icon",113),u.YNc(17,p0,2,0,"button",79),u.TgZ(18,"mat-error"),u.YNc(19,m0,2,0,"div",17),u.YNc(20,g0,2,0,"div",17),u.qZA()()(),u.BQk()),2&s){const t=n.$implicit,i=n.index,e=u.oxw(2);u.xp6(1),u.Q6J("formGroupName",i),u.xp6(1),u.Q6J("ngIf",(null==e.AS.currentUserSubject||null==e.AS.currentUserSubject.value?null:e.AS.currentUserSubject.value.verified)&&0===i),u.xp6(1),u.Q6J("color","accent"),u.xp6(4),u.Q6J("ngIf",t.get("name").value||0===i&&!(null!=e.AS.currentUserSubject&&null!=e.AS.currentUserSubject.value&&e.AS.currentUserSubject.value.verified)),u.xp6(1),u.Q6J("ngIf",!t.get("name").value&&(i>0||(null==e.AS.currentUserSubject||null==e.AS.currentUserSubject.value?null:e.AS.currentUserSubject.value.verified))),u.xp6(2),u.Q6J("ngIf",t.get("name").hasError("required")),u.xp6(1),u.Q6J("ngIf",t.get("name").hasError("pattern")),u.xp6(1),u.Q6J("color","accent"),u.xp6(4),u.Q6J("ngIf",t.get("url").value||0===i&&!(null!=e.AS.currentUserSubject&&null!=e.AS.currentUserSubject.value&&e.AS.currentUserSubject.value.verified)),u.xp6(1),u.Q6J("ngIf",!t.get("url").value&&(i>0||(null==e.AS.currentUserSubject||null==e.AS.currentUserSubject.value?null:e.AS.currentUserSubject.value.verified))),u.xp6(2),u.Q6J("ngIf",t.get("url").hasError("required")),u.xp6(1),u.Q6J("ngIf",t.get("url").hasError("pattern"))}}function _0(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"form",4),u.NdJ("submit",function(){u.CHM(t);const e=u.oxw();return u.KtG(e.onSubmit())}),u.TgZ(1,"div",5)(2,"div",6)(3,"h2",7)(4,"b",8),u._uU(5,"Ubah Berkas"),u.qZA()()(),u.TgZ(6,"div",2)(7,"div",9)(8,"div",10)(9,"div",9)(10,"div",2),u._UZ(11,"img",11),u.TgZ(12,"mat-form-field",12)(13,"mat-label"),u._uU(14,"Gambar Untuk Embed SEO"),u.qZA(),u.TgZ(15,"ngx-mat-file-input",13,14),u.NdJ("change",function(e){u.CHM(t);const r=u.MAs(16),a=u.oxw();return u.KtG(a.uploadImage(e,r))}),u.qZA(),u._UZ(17,"mat-icon",15),u.qZA(),u.TgZ(18,"mat-error",16)(19,"small"),u.YNc(20,p_,3,3,"div",17),u.YNc(21,m_,2,1,"div",17),u.qZA()()(),u.YNc(22,g_,4,1,"div",18),u.YNc(23,v_,5,0,"div",19),u.TgZ(24,"div",20)(25,"mat-slide-toggle",21),u._uU(26," R-18+ Konten Eksplisit "),u.qZA()(),u.TgZ(27,"mat-form-field",22)(28,"mat-label"),u._uU(29,"Jenis Proyek"),u.qZA(),u.TgZ(30,"mat-select",23),u.YNc(31,__,2,2,"mat-option",24),u.qZA(),u.TgZ(32,"mat-error"),u.YNc(33,y_,2,0,"div",17),u.YNc(34,T_,2,0,"div",17),u.qZA()(),u.YNc(35,b_,1,0,"ng-container",25),u.YNc(36,w_,13,7,"ng-template",null,26,u.W1O),u.YNc(38,H_,5,3,"ng-template",null,27,u.W1O),u.TgZ(40,"div",20),u._UZ(41,"mat-divider"),u.qZA(),u.TgZ(42,"div",28),u.YNc(43,Y_,17,10,"div",29),u.qZA(),u.TgZ(44,"div",2)(45,"div",9),u._UZ(46,"div",30),u.TgZ(47,"div",30)(48,"button",31),u.NdJ("click",function(){u.CHM(t);const e=u.oxw();return u.KtG(e.addFansub())}),u._UZ(49,"mat-icon",32),u._uU(50," Tambah Fansub "),u.qZA()()()(),u.TgZ(51,"div",20)(52,"a",33),u._uU(53," * Jika pencarian tidak ditemukan, silahkan membuat halaman Fansub baru terlebih dahulu "),u.qZA()()()(),u.TgZ(54,"div",34)(55,"div",9)(56,"mat-form-field",35)(57,"mat-label"),u._uU(58,"Nama Berkas"),u.qZA(),u._UZ(59,"input",36)(60,"mat-icon",37),u.TgZ(61,"mat-error"),u.YNc(62,$_,2,0,"div",17),u.YNc(63,Q_,2,0,"div",17),u.qZA()(),u._UZ(64,"angular-editor",38),u.qZA(),u.TgZ(65,"div",9)(66,"div",20),u._UZ(67,"mat-divider"),u.qZA()(),u.YNc(68,X_,1,0,"ng-container",25),u.YNc(69,e0,12,6,"ng-template",null,39,u.W1O),u.YNc(71,o0,5,3,"ng-template",null,40,u.W1O),u.TgZ(73,"div",9)(74,"div",20),u._UZ(75,"mat-divider"),u.qZA()(),u.ynx(76,41),u.YNc(77,v0,21,12,"ng-container",29),u.BQk(),u.TgZ(78,"div",42),u._UZ(79,"div",30)(80,"div",30)(81,"div",30),u.TgZ(82,"div",30)(83,"button",31),u.NdJ("click",function(){u.CHM(t);const e=u.oxw();return u.KtG(e.addDownloadLink())}),u._UZ(84,"mat-icon",32),u._uU(85," Tambah URL Eksternal "),u.qZA()()()()(),u.TgZ(86,"div",9)(87,"div",43)(88,"div",44),u._UZ(89,"div",45),u.TgZ(90,"div",46)(91,"a",47),u._UZ(92,"mat-icon",48),u._uU(93," Batal "),u.qZA()(),u.TgZ(94,"div",46)(95,"button",49),u._uU(96," Simpan "),u._UZ(97,"mat-icon",50),u.qZA()()()()()()()()}if(2&s){const t=u.MAs(37),i=u.MAs(39),e=u.MAs(70),r=u.MAs(72),a=u.oxw();u.Q6J("formGroup",a.fg),u.xp6(11),u.Q6J("src",a.image_url,u.LSH),u.xp6(1),u.Q6J("color","accent"),u.xp6(3),u.Q6J("disabled",a.fg.value.image)("accept","image/gif, image/jpeg, image/jpg, image/png"),u.xp6(5),u.Q6J("ngIf",a.imageLimitExceeded),u.xp6(1),u.Q6J("ngIf",a.imageErrorText),u.xp6(1),u.Q6J("ngIf",a.image&&!a.fg.value.image),u.xp6(1),u.Q6J("ngIf",null==a.AS.currentUserSubject||null==a.AS.currentUserSubject.value?null:a.AS.currentUserSubject.value.verified),u.xp6(4),u.Q6J("color","accent"),u.xp6(4),u.Q6J("ngForOf",a.projectList),u.xp6(2),u.Q6J("ngIf",a.fg.get("projectType_id").hasError("required")),u.xp6(1),u.Q6J("ngIf",a.fg.get("projectType_id").hasError("pattern")),u.xp6(1),u.Q6J("ngIf",a.berkasType.toLowerCase().includes("anime_"))("ngIfThen",t)("ngIfElse",i),u.xp6(8),u.Q6J("ngForOf",a.getFansubControl.controls),u.xp6(5),u.Q6J("disabled",a.submitted),u.xp6(8),u.Q6J("color","accent"),u.xp6(6),u.Q6J("ngIf",a.fg.get("name").hasError("required")),u.xp6(1),u.Q6J("ngIf",a.fg.get("name").hasError("pattern")),u.xp6(1),u.Q6J("config",a.GS.angularEditorConfig),u.xp6(4),u.Q6J("ngIf",a.attachmentFile)("ngIfThen",e)("ngIfElse",r),u.xp6(9),u.Q6J("ngForOf",a.getDownloadUrlControl.controls),u.xp6(6),u.Q6J("disabled",a.submitted),u.xp6(8),u.Q6J("disabled",a.submitted),u.xp6(4),u.Q6J("disabled",a.submitted||a.fg.invalid||!a.fg.dirty)}}let y0=(()=>{class s{constructor(t,i,e,r,a,o,l,d,f,v,g,T,E,x,S){this.router=t,this.activatedRoute=i,this.fb=e,this.bs=r,this.pi=a,this.anime=o,this.dorama=l,this.project=d,this.fansub=f,this.berkas=v,this.toast=g,this.imgbb=T,this.gs=E,this.as=x,this.uploadService=S,this.berkasId="",this.attachmentSelected=null,this.attachmentErrorText=null,this.attachmentLimitExceeded=null,this.timerTimeout=null,this.submitted=!1,this.projectList=[],this.uploadToast=null,this.gambar=null,this.ddl=null,this.image=null,this.imageErrorText=null,this.imageLimitExceeded=null,this.image_url="/assets/img/form/no-image.png",this.image_url_original=null,this.filteredAnime=[],this.filteredDorama=[],this.filteredFansub=[],this.isLoading=!1,this.animeCheckOrAddResponse=null,this.doramaCheckOrAddResponse=null,this.attachmentFile=null,this.attachmentFontSubtitle=[],this.subsProject=null,this.subsFansub=null,this.subsAnimeDetail=null,this.subsDoramaDetail=null,this.subsProjectDetail=null,this.subsFansubDetail=[],this.subsAnimeNew=null,this.subsDoramaNew=null,this.subsImgbb=null,this.subsBerkasDetail=null,this.subsBerkasUpdate=null,this.subsUpload=null,this.berkasType="",this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get CONSTANTS(){return Q.t}get AS(){return this.as}get GS(){return this.gs}get fileTypeAttachmentAllowed(){return Q.t.fileTypeAttachmentAllowed.join(", ")}ngOnInit(){this.pi.updatePageMetaData("Berkas - Ubah Berkas","Halaman Pembaharuan Data Berkas","Ubah Berkas"),this.gs.isBrowser&&(this.berkasId=this.activatedRoute.snapshot.paramMap.get("berkasId"),this.bs.busy(),this.subsBerkasDetail=this.berkas.getBerkas(this.berkasId).subscribe({next:t=>{this.gs.log("[BERKAS_DETAIL_SUCCESS]",t),this.bs.idle(),this.as.currentUserSubject?.value?.id!==t.result.user_.id&&(this.toast.warning("Berkas Ini Bukan Milikmu","Whoops!",null,!0),this.router.navigateByUrl(`/berkas/${t.result.id}`)),!this.as.currentUserSubject?.value?.verified&&t.result.attachment_?(this.toast.warning("string"==typeof t.result.attachment_?t.result.attachment_:"Harap Verifikasi Akun Terlebih Dahulu","Whoops!",null,!0),this.router.navigateByUrl(`/berkas/${t.result.id}`)):(this.loadProjectList(),this.initForm(t.result),this.uploads$=this.uploadService.connect(),this.subsUpload=this.uploadService.events.subscribe({next:i=>{this.gs.log("[UPLOAD_EVENTS]",i),("uploading"===i.status||"complete"===i.status)&&(this.attachmentSelected=i),"complete"===i.status?(this.gs.log("[UPLOAD_COMPLETED]",i.response),this.fg.controls.attachment_id.patchValue(i.response.result.id),this.fg.controls.attachment_id.markAsDirty(),this.uploadToast=this.toast.warning("Segera Kirim Data Berkas!","Lampiran Akan Dihapus ...",{closeButton:!1,timeOut:Q.t.timeoutDeleteTempAttachmentTime,disableTimeOut:"extendedTimeOut",tapToDismiss:!1,progressAnimation:"decreasing"},!0),this.timerTimeout=setTimeout(()=>{this.gs.log("[UPLOAD_TIMEOUT]",Q.t.timeoutDeleteTempAttachmentTime),this.failOrCancelUpload({info:"Expired, Silahkan Upload Ulang!"})},Q.t.timeoutDeleteTempAttachmentTime)):"error"===i.status&&(this.gs.log("[UPLOAD_ERROR]",i.response,"error"),this.failOrCancelUpload(i.response))},error:i=>{this.gs.log("[UPLOAD_ERROR]",i,"error"),this.failOrCancelUpload(i)}}))},error:t=>{this.gs.log("[BERKAS_DETAIL_ERROR]",t,"error"),this.bs.idle(),this.router.navigate(["/error"],{queryParams:{returnUrl:`/berkas/${this.berkasId}`}})}}))}ngOnDestroy(){this.uploadToast&&this.toast.remove(this.uploadToast.toastId),this.timerTimeout&&(clearTimeout(this.timerTimeout),this.timerTimeout=null),this.subsProject?.unsubscribe(),this.subsFansub?.unsubscribe(),this.subsAnimeDetail?.unsubscribe(),this.subsDoramaDetail?.unsubscribe(),this.subsProjectDetail?.unsubscribe();for(const t of this.subsFansubDetail)t?.unsubscribe();this.subsAnimeNew?.unsubscribe(),this.subsDoramaNew?.unsubscribe(),this.subsImgbb?.unsubscribe(),this.subsBerkasDetail?.unsubscribe(),this.subsBerkasUpdate?.unsubscribe(),this.subsUpload?.unsubscribe()}uploadAttachment(t,i){this.ddl=i;const e=t.target.files[0];this.attachmentLimitExceeded=null,this.attachmentErrorText=null,this.gs.log("[ATTACHMENT_SELECTED]",e),this.fg.controls.attachment_id.patchValue(null),this.uploadService.disconnect();try{e.size<=Q.t.fileSizeAttachmentTotalLimit?this.uploadService.handleFiles(e):(this.attachmentLimitExceeded=Q.t.fileSizeAttachmentTotalLimit,this.ddl.clear(t))}catch{this.ddl.clear(t)}}submitAttachment(t){const i=this.uploadService.state().find(e=>e.uploadId===t.uploadId);i&&(this.attachmentSelected=i,t.status="queue")}failOrCancelUpload(t=null){this.attachmentSelected=null,this.attachmentErrorText=t?.result?.message||t?.info||t?.error?.message||"Terjadi Kesalahan, Harap Reload Halaman!",this.uploadService.disconnect(),this.fg.controls.attachment_id.patchValue(null),this.fg.controls.attachment_id.markAsPristine(),this.fg.controls.attachment_id.markAsUntouched(),this.uploadToast&&this.toast.remove(this.uploadToast.toastId),this.ddl.clear()}verify(){this.router.navigate(["/verify"],{queryParams:{returnUrl:this.router.url.split("?")[0]},state:{bypassCanDeactivate:!0}})}loadProjectList(){this.bs.busy(),this.subsProject=this.project.getProject().subscribe({next:t=>{this.gs.log("[PROJECT_LOAD_SUCCESS]",t),this.projectList=t.results,this.bs.idle()},error:t=>{this.gs.log("[PROJECT_LOAD_ERROR]",t,"error"),this.bs.idle()}})}hasRequiredField(t,i){return t.get(i).hasValidator(B.kI.required)}initForm(t){"attachment_"in t&&t.attachment_&&(this.attachmentFile=t.attachment_,t.attachment_.fonts_&&t.attachment_.fonts_.forEach(i=>{this.attachmentFontSubtitle.push(`${i.name}.${i.ext}`)}),t.attachment_.subtitles_&&t.attachment_.subtitles_.forEach(i=>{this.attachmentFontSubtitle.push(`${i.name}.${i.ext}`)})),this.fg=this.fb.group({name:[t.name,B.kI.compose([B.kI.required,B.kI.pattern(Q.t.regexEnglishKeyboardKeys)])],description:[t.description,B.kI.compose([B.kI.pattern(Q.t.regexEnglishKeyboardKeys)])],projectType_id:[t.project_type_.id,B.kI.compose([B.kI.required,B.kI.pattern(Q.t.regexEnglishKeyboardKeys)])],anime_id:[t.anime_?.id||null,B.kI.compose([])],anime_name:[t.anime_?.name||null,B.kI.compose([])],dorama_id:[t.dorama_?.id||null,B.kI.compose([])],dorama_name:[t.dorama_?.name||null,B.kI.compose([])],fansub_list:this.fb.array([]),image:[null,B.kI.compose([B.kI.pattern(Q.t.regexUrl)])],sn_code:[t.sn_code,B.kI.compose([])],attachment_id:[t.attachment_?.id,B.kI.compose([B.kI.pattern(Q.t.regexEnglishKeyboardKeys)])],download_url:this.fb.array([]),private:[t.private,B.kI.compose([B.kI.required])],r18:[t.r18,B.kI.compose([B.kI.required])]}),this.image_url=t.image_url,this.image_url_original=this.image_url,this.berkasType=t.project_type_.name,t.anime_&&(this.fg.controls.anime_id.setValidators([B.kI.required,B.kI.pattern(/^\d+$/)]),this.fg.controls.anime_name.setValidators([B.kI.required])),t.dorama_&&(this.fg.controls.dorama_id.setValidators([B.kI.required,B.kI.pattern(/^\d+$/)]),this.fg.controls.dorama_name.setValidators([B.kI.required]));for(const i of t.download_url)this.addDownloadLink(i);for(const i of t.fansub_)this.addFansub(i);this.subsAnimeDetail=this.fg.get("anime_id").valueChanges.pipe((0,Ra.b)(500),(0,Ma.x)(),(0,me.b)(()=>this.isLoading=!0),(0,Bo.w)(i=>this.anime.searchAnime(i).pipe((0,jo.x)(()=>this.isLoading=!1))),(0,Na.X)(-1)).subscribe({next:i=>{this.gs.log("[BERKAS_EDIT_SEARCH_ANIME_RESULT_SUCCESS]",i),this.filteredAnime=i.results},error:i=>{this.gs.log("[BERKAS_EDIT_SEARCH_ANIME_RESULT_ERROR]",i,"error")}}),this.subsDoramaDetail=this.fg.get("dorama_id").valueChanges.pipe((0,Ra.b)(500),(0,Ma.x)(),(0,me.b)(()=>this.isLoading=!0),(0,Bo.w)(i=>this.dorama.searchDorama(i).pipe((0,jo.x)(()=>this.isLoading=!1))),(0,Na.X)(-1)).subscribe({next:i=>{this.gs.log("[BERKAS_EDIT_SEARCH_DORAMA_RESULT_SUCCESS]",i);for(const e of i.results)e.mdl_id=e.mdl_id.split("-")[1],e.image_url=e.thumb;this.filteredDorama=i.results},error:i=>{this.gs.log("[BERKAS_EDIT_SEARCH_DORAMA_RESULT_ERROR]",i,"error")}}),this.subsProjectDetail=this.fg.get("projectType_id").valueChanges.pipe((0,Ra.b)(500),(0,Ma.x)(),(0,Na.X)(-1)).subscribe({next:i=>{this.gs.log("[BERKAS_CREATE_PROJECT_CHANGED]",i),this.fg.controls.anime_id.patchValue(null),this.fg.controls.anime_name.patchValue(null),this.fg.controls.dorama_id.patchValue(null),this.fg.controls.dorama_name.patchValue(null),this.fg.controls.sn_code.patchValue(null),this.fg.controls.anime_id.setErrors(null),this.fg.controls.anime_name.setErrors(null),this.fg.controls.dorama_id.setErrors(null),this.fg.controls.dorama_name.setErrors(null),this.fg.controls.sn_code.setErrors(null),this.fg.controls.anime_id.clearValidators(),this.fg.controls.anime_name.clearValidators(),this.fg.controls.dorama_id.clearValidators(),this.fg.controls.dorama_name.clearValidators(),this.fg.controls.sn_code.clearValidators(),this.fg.controls.anime_id.markAsPristine(),this.fg.controls.anime_name.markAsPristine(),this.fg.controls.dorama_id.markAsPristine(),this.fg.controls.dorama_name.markAsPristine(),this.fg.controls.sn_code.markAsPristine(),this.fg.controls.anime_id.markAsUntouched(),this.fg.controls.anime_name.markAsUntouched(),this.fg.controls.dorama_id.markAsUntouched(),this.fg.controls.dorama_name.markAsUntouched(),this.fg.controls.sn_code.markAsUntouched();const e=this.projectList.find(r=>r.id===i);e&&(this.berkasType=e.name,e.name.toLowerCase().includes("anime_")?(this.fg.controls.anime_id.setValidators([B.kI.required,B.kI.pattern(/^\d+$/)]),this.fg.controls.anime_name.setValidators([B.kI.required])):e.name.toLowerCase().includes("dorama_")?(this.fg.controls.dorama_id.setValidators([B.kI.required,B.kI.pattern(/^\d+$/)]),this.fg.controls.dorama_name.setValidators([B.kI.required])):this.fg.controls.sn_code.setValidators([B.kI.required,B.kI.pattern(/^[A-Z0-9\-]+$/)])),this.fg.controls.anime_id.updateValueAndValidity(),this.fg.controls.anime_name.updateValueAndValidity(),this.fg.controls.dorama_id.updateValueAndValidity(),this.fg.controls.dorama_name.updateValueAndValidity(),this.fg.controls.sn_code.updateValueAndValidity()}})}get getDownloadUrlControl(){return this.fg.get("download_url")}createDownloadLink(t=null,i=null){return this.fb.group({name:[t,B.kI.compose([B.kI.required,B.kI.pattern(Q.t.regexEnglishKeyboardKeys)])],url:[i,B.kI.compose([B.kI.required,B.kI.pattern(Q.t.regexUrl)])]})}addDownloadLink(t=null){this.getDownloadUrlControl.push(t?this.createDownloadLink(t.name,t.url):this.createDownloadLink())}removeDownloadLink(t){this.getDownloadUrlControl.removeAt(t)}get getFansubControl(){return this.fg.get("fansub_list")}createFansub(t=null){const i=this.fb.group({fansub_id:[t?.id||null,B.kI.compose([B.kI.required,B.kI.pattern(/^\d+$/)])],fansub_name:[t?.name||null,B.kI.compose([B.kI.required])]});return this.subsFansubDetail.push(i.get("fansub_id").valueChanges.pipe((0,Ra.b)(500),(0,Ma.x)(),(0,me.b)(()=>this.isLoading=!0),(0,Bo.w)(e=>this.fansub.searchFansub(e).pipe((0,jo.x)(()=>this.isLoading=!1))),(0,Na.X)(-1)).subscribe({next:e=>{this.gs.log("[BERKAS_EDIT_SEARCH_FANSUB_RESULT]",e),this.filteredFansub=e.results}})),i}removeFansub(t){this.getFansubControl.removeAt(t),this.subsFansubDetail[t]?.unsubscribe(),this.subsFansubDetail.splice(t,1)}addFansub(t=null){this.getFansubControl.push(t?this.createFansub(t):this.createFansub())}resetSelectedAnime(){this.fg.controls.anime_name.patchValue(null)}resetSelectedDorama(){this.fg.controls.dorama_name.patchValue(null)}resetSelectedFansub(t){this.getFansubControl.controls[t].get("fansub_name").patchValue(null)}filterAnimeSelected(t){this.gs.log("[ANIME_FILTER_CLICK]",t),this.submitted=!0,this.subsAnimeNew=this.anime.addNewAnime({id:t.id,name:t.title,image_url:t.image_url,type:t.media_type?.toUpperCase()}).subscribe({next:i=>{this.gs.log("[ANIME_CHECK_ADD_SUCCESS]",i),this.animeCheckOrAddResponse=i.result,this.submitted=!1,this.fg.controls.anime_id.patchValue(i.result.id),this.fg.controls.anime_name.patchValue(i.result.name)},error:i=>{this.gs.log("[ANIME_CHECK_ADD_ERROR]",i,"error"),this.submitted=!1,this.resetSelectedAnime(),this.fg.controls.anime_id.patchValue(null),this.fg.controls.anime_name.patchValue(null)}})}filterDoramaSelected(t){this.gs.log("[DORAMA_FILTER_CLICK]",t),this.submitted=!0,this.subsDoramaNew=this.dorama.addNewDorama({id:parseInt(t.mdl_id,10),slug:t.slug,name:t.title,image_url:t.image_url,type:t.type}).subscribe({next:i=>{this.gs.log("[DORAMA_CHECK_ADD_SUCCESS]",i),this.doramaCheckOrAddResponse=i.result,this.submitted=!1,this.fg.controls.dorama_id.patchValue(i.result.id),this.fg.controls.dorama_name.patchValue(i.result.name)},error:i=>{this.gs.log("[DORAMA_CHECK_ADD_ERROR]",i,"error"),this.submitted=!1,this.resetSelectedDorama(),this.fg.controls.dorama_id.patchValue(null),this.fg.controls.dorama_name.patchValue(null)}})}filterFansubSelected(t,i){this.gs.log("[FANSUB_FILTER_CLICK]",t),this.getFansubControl.controls[i].get("fansub_id").patchValue(t.id),this.getFansubControl.controls[i].get("fansub_name").patchValue(t.name)}uploadImage(t,i){this.gambar=i,this.image=null,this.imageLimitExceeded=null,this.imageErrorText=null,this.fg.controls.image.patchValue(null),this.fg.controls.image.markAsPristine(),this.fg.controls.image.markAsUntouched();const e=t.target.files[0];try{const r=new FileReader;r.readAsDataURL(e),r.onload=a=>{if(this.gs.log("[IMAGE_SELECTED]",a),e.size<=Q.t.fileSizeImageLimit){const o=this.gs.document.createElement("img");o.onload=()=>{this.image=e,this.image_url=r.result.toString()},o.src=r.result.toString()}else this.image=null,this.image_url="/assets/img/form/image-error.png",this.imageLimitExceeded=Q.t.fileSizeImageLimit,this.gambar.clear(t)}}catch{this.image=null,this.image_url=this.image_url_original,this.gambar.clear(t)}}submitImage(){this.submitted=!0,this.subsImgbb=this.imgbb.uploadImage({file:this.image}).subscribe({next:t=>{this.gs.log("[IMAGE_SUCCESS]",t),this.fg.controls.image.patchValue(t.result.url),this.fg.controls.image.markAsDirty(),this.submitted=!1},error:t=>{this.gs.log("[IMAGE_ERROR]",t,"error"),this.fg.controls.image.patchValue(null),this.fg.controls.image.markAsPristine(),this.fg.controls.image.markAsUntouched(),this.submitted=!1,this.imageErrorText=t.result?.message||t.info}})}onSubmit(){this.bs.busy();const t=this.gs.getDirtyValues(this.fg);if("fansub_list"in t){const i=[];for(const e of this.fg.value.fansub_list)i.push(e.fansub_id);t.fansub_id=i,delete t.fansub_list}return null===this.fg.value.attachment_id&&0===this.fg.value.download_url.lenth?(this.submitted=!1,this.uploadToast=this.toast.warning("Lampiran DDL / URL Eksternal!","Harap Mengisi Setidaknya Salah Satu ..."),void this.bs.idle()):(this.gs.log("[BERKAS_EDIT_DIRTY]",t),this.submitted=!0,this.fg.invalid?(this.submitted=!1,void this.bs.idle()):void(this.subsBerkasUpdate=this.berkas.updateBerkas(this.berkasId,{...t}).subscribe({next:i=>{this.gs.log("[BERKAS_EDIT_SUCCESS]",i),this.submitted=!1,this.bs.idle(),this.router.navigateByUrl(`/berkas/${this.berkasId}`)},error:i=>{this.gs.log("[BERKAS_EDIT_ERROR]",i,"error"),this.submitted=!1,this.bs.idle()}})))}}return s.\u0275fac=function(t){return new(t||s)(u.Y36(_e.F0),u.Y36(_e.gz),u.Y36(B.QS),u.Y36(Ne.z),u.Y36(je.Z),u.Y36(s_.o),u.Y36(o_.X),u.Y36(u_.Y),u.Y36(l_.T),u.Y36(rt.A),u.Y36(te.k),u.Y36(d_.X),u.Y36(ke.U),u.Y36(D.e),u.Y36(c_.Lz))},s.\u0275cmp=u.Xpm({type:s,selectors:[["app-berkas-edit"]],decls:5,vars:1,consts:[[1,"container"],[1,"row","px-3"],[1,"col-12"],[3,"formGroup","submit",4,"ngIf"],[3,"formGroup","submit"],[1,"row","mt-3","mb-3"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"row"],[1,"col-12","col-md-5","col-xl-4","p-3"],[1,"w-100","border",3,"src"],["appearance","outline",1,"pt-3","w-100",3,"color"],[1,"w-100",3,"disabled","accept","change"],["gambar",""],["fontIcon","image","matSuffix",""],[1,"px-3","w-100"],[4,"ngIf"],["class","col-12 mb-4",4,"ngIf"],["class","col-12 p-3",4,"ngIf"],[1,"col-12","p-3"],["formControlName","r18","matTooltip","Konten Eksplisit"],["appearance","outline",1,"px-3","pt-3","col-12",3,"color"],["formControlName","projectType_id","placeholder","Anime / Drama"],[3,"value",4,"ngFor","ngForOf"],[4,"ngIf","ngIfThen","ngIfElse"],["anime_",""],["notAnime_",""],["formArrayName","fansub_list","matTooltip","Silahkan Buat Terlebih Dahulu Jika Tidak Ada"],[4,"ngFor","ngForOf"],[1,"col","px-3"],["type","button","mat-raised-button","","color","primary",1,"w-100",3,"disabled","click"],["fontIcon","add",1,"me-1"],["routerLink","/create/fansub",1,"text-warning","text-decoration-none"],[1,"col-12","col-md-7","col-xl-8","pt-3"],["appearance","outline",1,"p-3","col-12",3,"color"],["matInput","","formControlName","name","placeholder","[Fansub] Judul Anime - 00 [BD 4K x265 FLAC][CRC32].mkv"],["fontIcon","wysiwyg","matSuffix",""],["formControlName","description",1,"p-3","w-100",3,"config"],["ddlExist",""],["ddlNotExist",""],["formArrayName","download_url"],[1,"row","mb-4"],[1,"col-12","py-3"],[1,"row","gy-3"],[1,"col","g-0"],[1,"col-12","col-md-3"],["mat-stroked-button","","routerLink","../",1,"w-100",3,"disabled"],["fontIcon","undo",1,"me-1"],["type","submit","mat-flat-button","","color","accent",1,"w-100",3,"disabled"],["fontIcon","save",1,"ms-1"],[1,"col-12","mb-4"],["fontIcon","add_photo_alternate",1,"me-1"],["formControlName","private","matTooltip","Hanya Dapat Di Akses Melalui URL"],[3,"value"],["appearance","outline",1,"p-3","w-100",3,"color"],["matInput","","formControlName","anime_id","placeholder","Full Metal Alchemist",3,"matAutocomplete","keyup"],["fontIcon","short_text","matSuffix",""],["autoCompleteAnime","matAutocomplete"],["class","is-loading",4,"ngIf"],["class","text-warning",4,"ngIf"],[1,"is-loading"],["mode","indeterminate"],["class","px-1",3,"value","click",4,"ngFor","ngForOf"],[1,"px-1",3,"value","click"],[1,"me-1",2,"height","40px","width","30px","object-fit","cover",3,"src"],[1,"ms-1"],[1,"text-warning"],["dorama_",""],["notDorama_",""],["matInput","","formControlName","dorama_id","placeholder","Flying Colors",3,"matAutocomplete","keyup"],["autoCompleteDorama","matAutocomplete"],["appearance","outline","class","p-3 col-12",3,"color",4,"ngIf"],["matInput","","formControlName","sn_code","placeholder","XXX-999","required",""],["fontIcon","tag","matSuffix",""],[1,"row",3,"formGroupName"],["appearance","outline",1,"px-3","pt-3","w-100",3,"color"],["matInput","","formControlName","fansub_id","placeholder","NamaFansub",3,"matAutocomplete","keyup"],["fontIcon","short_text","matSuffix","",4,"ngIf"],["type","button","mat-button","","matSuffix","","mat-icon-button","",3,"click",4,"ngIf"],["autoCompleteFansub","matAutocomplete"],["type","button","mat-button","","matSuffix","","mat-icon-button","",3,"click"],["fontIcon","close"],[1,"me-1",2,"height","40px","width","40px","object-fit","cover",3,"src"],["mat-subheader","",1,"text-warning"],["fontIcon","attach_file","mat-list-icon",""],["mat-line",""],["class","p-3 m-0",4,"ngIf"],[1,"p-3","m-0"],["ddlVerified",""],["ddlNotVerified",""],[1,"col-12","px-3"],[1,"text-success"],["appearance","outline",1,"px-3","pt-3","col",3,"color"],["uploadx","",1,"w-100",3,"disabled","accept","change"],["ddl",""],["fontIcon","attach_file","matSuffix",""],[1,"px-4","w-100"],["class","row mb-4",4,"ngFor","ngForOf"],[1,"col"],[1,"ps-3"],[3,"mode","value"],[1,"col-6","col-lg-4","px-3"],["fontIcon","attachment",1,"me-1"],["type","button","mat-stroked-button","","color","accent",1,"w-100",3,"click"],["fontIcon","enhanced_encryption",1,"me-1"],["matTooltip","Silahkan Isi Alamat Website Kamu Jika Ingin Mendapatkan Traffic Pengunjung",1,"row",3,"formGroupName"],["class","col-12 px-3",4,"ngIf"],["appearance","outline",1,"px-3","pt-3","col-12","col-md-5",3,"color"],["matInput","","formControlName","name","placeholder","Web Shit","required",""],["fontIcon","web","matSuffix","",4,"ngIf"],["appearance","outline",1,"px-3","pt-3","col-12","col-md-7",3,"color"],["matInput","","formControlName","url","placeholder","https://drive.google.com/drive/u/2/folders/1KYTJZsmH9dyyHBXnQD4N0SjSBXcs8qD-","required",""],["fontIcon","link","matSuffix","",4,"ngIf"],["fontIcon","web","matSuffix",""],["fontIcon","link","matSuffix",""]],template:function(t,i){1&t&&(u._UZ(0,"app-notifications"),u.TgZ(1,"div",0)(2,"div",1)(3,"div",2),u.YNc(4,_0,98,29,"form",3),u.qZA()()()),2&t&&(u.xp6(4),u.Q6J("ngIf",i.fg))},dependencies:[X.sg,X.O5,_e.yS,hc.XC,hc.ZL,J.ey,ue.lW,ue.zs,f_.d,J.X2,ee.Hw,ie.TO,ie.KE,ie.hX,ie.R9,h_.Nt,Ae.i$,Ae.Tg,Ae.Nh,Ae.gs,Ze.pW,Ge.gD,pc.Rr,qe.gM,B._Y,B.Fj,B.JJ,B.JL,B.Q7,B.sg,B.u,B.x0,B.CE,ve.Yh,Me.t,we.s6,X.Ov,fc.$]}),s})();var T0=H(3379),b0=H(8757);function x0(s,n){1&s&&(u.TgZ(0,"div",10),u._uU(1," * Berkas "),u.TgZ(2,"i"),u._uU(3,"Private"),u.qZA(),u._uU(4," Dari Seluruh Pengguna Tidak Di Tampilkan "),u.qZA())}function S0(s,n){1&s&&(u.TgZ(0,"div",10),u._uU(1," * Berkas "),u.TgZ(2,"i"),u._uU(3,"Private"),u.qZA(),u._uU(4," Dari Pengguna "),u.TgZ(5,"i"),u._uU(6,"Private"),u.qZA(),u._uU(7," Tidak Di Tampilkan "),u.qZA())}function E0(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"div",1)(1,"div",2)(2,"div",3),u.YNc(3,x0,5,0,"div",4),u.YNc(4,S0,8,0,"div",4),u.TgZ(5,"div",5),u._uU(6," * Berkas Dari Anggota Fansub => Warna - Warni "),u.qZA()()(),u.TgZ(7,"div",2)(8,"div",6)(9,"mat-slide-toggle",7),u.NdJ("ngModelChange",function(e){u.CHM(t);const r=u.oxw();return u.KtG(r.r18=e)})("change",function(){u.CHM(t);const e=u.oxw();return u.KtG(e.r18Changed())}),u._uU(10," Tampilkan R-18+ "),u.qZA()()(),u.TgZ(11,"div",8)(12,"app-material-tab",9),u.NdJ("tableRowClicked",function(e){u.CHM(t);const r=u.oxw();return u.KtG(r.openBerkas(e))})("paginatorClicked",function(e){u.CHM(t);const r=u.oxw();return u.KtG(r.onPaginatorClicked(e))})("serverSideFilter",function(e){u.CHM(t);const r=u.oxw();return u.KtG(r.onServerSideFilter(e))})("serverSideOrder",function(e){u.CHM(t);const r=u.oxw();return u.KtG(r.onServerSideOrder(e))}),u.qZA()()()}if(2&s){const t=u.oxw();u.xp6(3),u.Q6J("ngIf",!(null!=t.AS.currentUserSubject&&null!=t.AS.currentUserSubject.value&&t.AS.currentUserSubject.value.verified)),u.xp6(1),u.Q6J("ngIf",(null==t.AS.currentUserSubject?null:t.AS.currentUserSubject.value)&&(null==t.AS.currentUserSubject||null==t.AS.currentUserSubject.value?null:t.AS.currentUserSubject.value.verified)&&!t.showTruelyPrivate),u.xp6(5),u.Q6J("ngModel",t.r18),u.xp6(3),u.Q6J("tablePageSizeOptions",t.tablePageSizeOptions)("tabData",t.tabData)("count",t.count)("serverSide",!0)}}let C0=(()=>{class s{constructor(t,i,e,r,a,o,l){this.router=t,this.gs=i,this.ls=e,this.bs=r,this.berkas=a,this.fs=o,this.as=l,this.allBerkasId=[],this.berkasData=[],this.tabData=[{name:"Berkas Terkini",icon:"file_copy",type:"table",data:{column:["Proyek","Nama Berkas","Tanggal","Kunjungan","Pemilik"],row:[]}}],this.count=0,this.page=1,this.row=50,this.tablePageSizeOptions=[50,75,100,125,150],this.q="",this.sort="",this.order="",this.subsBerkas=null,this.subsTrusted=null,this.r18=!1,this.gs.bannerImg="/assets/img/banner/berkas.jpg",this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get AS(){return this.as}get showTruelyPrivate(){return this.as.currentUserSubject?.value?.role===Ce.yS.ADMIN||this.as.currentUserSubject?.value?.role===Ce.yS.MODERATOR||this.as.currentUserSubject?.value?.role===Ce.yS.FANSUBBER}ngOnDestroy(){this.subsBerkas?.unsubscribe(),this.subsTrusted?.unsubscribe()}ngOnInit(){this.gs.isBrowser&&(this.r18="true"===this.ls.getItem(this.gs.localStorageKeys.R18)||!1,this.gs.isDesktop||(this.tablePageSizeOptions=[10,25,50,75,100]),this.row=this.tablePageSizeOptions[0],this.getBerkas())}r18Changed(){this.ls.setItem(this.gs.localStorageKeys.R18,JSON.stringify(this.r18)),this.getBerkas()}getBerkas(){this.bs.busy(),this.subsBerkas&&(this.subsBerkas.unsubscribe(),this.bs.idle()),this.subsBerkas=this.berkas.getAllBerkas(this.q,this.page,this.row,this.sort,this.order,this.r18).subscribe({next:t=>{this.gs.log("[BERKAS_LIST_SUCCESS]",t),this.count=t.count,this.berkasData=[];for(const i of t.results)this.allBerkasId.push(i.id),this.berkasData.push({id:i.id,private:i.private,foto:i.user_.image_url,Proyek:i.project_type_.name,Tanggal:i.created_at,Kunjungan:i.view_count,Pemilik:i.user_.username,"Nama Berkas":i.name});this.tabData[0].data.row=this.berkasData,this.allBerkasId.length>0&&this.checkTrusted(),this.fs.initializeFab("add",null,"Tambah Berkas Baru","/create/berkas",!1),this.bs.idle()},error:t=>{this.gs.log("[BERKAS_LIST_ERROR]",t,"error"),this.bs.idle()}})}checkTrusted(){this.bs.busy(),this.subsTrusted=this.berkas.checkTrusted(this.allBerkasId).subscribe({next:t=>{this.gs.log("[BERKAS_TRUSTED_SUCCESS]",t);for(const i of this.berkasData)i.trusted=t.results[i.id];this.bs.idle()},error:t=>{this.gs.log("[BERKAS_TRUSTED_ERROR]",t,"error"),this.bs.idle()}})}openBerkas(t){this.gs.log("[BERKAS_LIST_CLICK_BERKAS]",t),this.router.navigateByUrl(`/berkas/${t.id}`)}onPaginatorClicked(t){this.gs.log("[BERKAS_LIST_CLICK_PAGINATOR]",t),this.page=t.pageIndex+1,this.row=t.pageSize,this.getBerkas()}onServerSideFilter(t){this.gs.log("[BERKAS_LIST_ENTER_FILTER]",t),this.q=t,this.getBerkas()}onServerSideOrder(t){this.gs.log("[BERKAS_LIST_CLICK_ORDER]",t),this.q=t.q,this.sort=t.active,this.order=t.direction,this.getBerkas()}}return s.\u0275fac=function(t){return new(t||s)(u.Y36(_e.F0),u.Y36(ke.U),u.Y36(T0.n),u.Y36(Ne.z),u.Y36(rt.A),u.Y36(w.r),u.Y36(D.e))},s.\u0275cmp=u.Xpm({type:s,selectors:[["app-berkas-list"]],decls:2,vars:1,consts:[["class","container",4,"ngIf"],[1,"container"],[1,"row","my-4"],[1,"col-12"],["class","text-danger text-end",4,"ngIf"],[1,"text-success","text-end"],[1,"col-12","text-end","text-warning"],["labelPosition","before",3,"ngModel","ngModelChange","change"],[1,"row"],[3,"tablePageSizeOptions","tabData","count","serverSide","tableRowClicked","paginatorClicked","serverSideFilter","serverSideOrder"],[1,"text-danger","text-end"]],template:function(t,i){1&t&&(u._UZ(0,"app-notifications"),u.YNc(1,E0,13,7,"div",0)),2&t&&(u.xp6(1),u.Q6J("ngIf",i.berkasData))},dependencies:[X.O5,pc.Rr,b0.H,B.JJ,B.On,Me.t]}),s})();var k0=H(2438);const A0=[{path:"",pathMatch:"full",component:C0},{path:":berkasId",children:[{path:"",pathMatch:"full",component:a_},{path:"edit",component:y0,canActivate:[yt.t],data:{title:"Berkas - Ubah Data",description:"Halaman Pembaharuan Data Fansub",keywords:"Ubah Berkas",[Q.t.decoratorRoles]:[Ce.yS.ADMIN,Ce.yS.MODERATOR,Ce.yS.FANSUBBER,Ce.yS.USER]}}]}];let w0=(()=>{class s{}return s.\u0275fac=function(t){return new(t||s)},s.\u0275mod=u.oAB({type:s}),s.\u0275inj=u.cJS({imports:[X.ez,_e.Bz.forChild(A0),Ee.m,Te.L,B.u5,B.UX,ve.Ad,pe.F,we.UM,se,Fe.R,Ve.b,it.T,k0.d]}),s})()},3992:(He,Ie,H)=>{"use strict";var X=H(9226);He.exports=function(ve,Q){return void 0===Q&&(Q=!1),function(Ce,Ee,Te){if(Ce)ve(Ce);else if(Ee.statusCode>=400&&Ee.statusCode<=599){var pe=Te;if(Q)if(X.TextDecoder){var u=function B(we){return void 0===we&&(we=""),we.toLowerCase().split(";").reduce(function(ve,Q){var Ce=Q.split("="),Te=Ce[1];return"charset"===Ce[0].trim()?Te.trim():ve},"utf-8")}(Ee.headers&&Ee.headers["content-type"]);try{pe=new TextDecoder(u).decode(Te)}catch{}}else pe=String.fromCharCode.apply(null,new Uint8Array(Te));ve({cause:pe})}else ve(null,Te)}}},745:(He,Ie,H)=>{"use strict";var X=H(9226),_e=H(434),B=H(2703);function Ce(se,Fe,Ve){var it=se;return B(Fe)?(Ve=Fe,"string"==typeof se&&(it={uri:se})):it=_e({},Fe,{uri:se}),it.callback=Ve,it}function Ee(se,Fe,Ve){return Te(Fe=Ce(se,Fe,Ve))}function Te(se){if(typeof se.callback>"u")throw new Error("callback argument missing");var Fe=!1,Ve=function(de,le,xe){Fe||(Fe=!0,se.callback(de,le,xe))};function yt(){var $=void 0;if($=me.response?me.response:me.responseText||function pe(se){try{if("document"===se.responseType)return se.responseXML;if(""===se.responseType&&(!se.responseXML||"parsererror"!==se.responseXML.documentElement.nodeName))return se.responseXML}catch{}return null}(me),D)try{$=JSON.parse($)}catch{}return $}function oe($){return clearTimeout(V),$ instanceof Error||($=new Error(""+($||"Unknown XMLHttpRequest Error"))),$.statusCode=0,Ve($,te)}function Le(){if(!We){var $;clearTimeout(V);var de=te,le=null;return 0!==($=se.useXDR&&void 0===me.status?200:1223===me.status?204:me.status)?(de={body:yt(),statusCode:$,method:Ne,headers:{},url:ke,rawRequest:me},me.getAllResponseHeaders&&(de.headers=function(Fe){var Ve={};return Fe&&Fe.trim().split("\n").forEach(function(it){var yt=it.indexOf(":"),oe=it.slice(0,yt).trim().toLowerCase(),Le=it.slice(yt+1).trim();typeof Ve[oe]>"u"?Ve[oe]=Le:Array.isArray(Ve[oe])?Ve[oe].push(Le):Ve[oe]=[Ve[oe],Le]}),Ve}(me.getAllResponseHeaders()))):le=new Error("Internal XMLHttpRequest Error"),Ve(le,de,de.body)}}var me=se.xhr||null;me||(me=se.cors||se.useXDR?new Ee.XDomainRequest:new Ee.XMLHttpRequest);var Oe,We,V,ke=me.url=se.uri||se.url,Ne=me.method=se.method||"GET",je=se.body||se.data,rt=me.headers=se.headers||{},w=!!se.sync,D=!1,te={body:void 0,headers:{},statusCode:0,method:Ne,url:ke,rawRequest:me};if("json"in se&&!1!==se.json&&(D=!0,rt.accept||rt.Accept||(rt.Accept="application/json"),"GET"!==Ne&&"HEAD"!==Ne&&(rt["content-type"]||rt["Content-Type"]||(rt["Content-Type"]="application/json"),je=JSON.stringify(!0===se.json?je:se.json))),me.onreadystatechange=function it(){4===me.readyState&&setTimeout(Le,0)},me.onload=Le,me.onerror=oe,me.onprogress=function(){},me.onabort=function(){We=!0},me.ontimeout=oe,me.open(Ne,ke,!w,se.username,se.password),w||(me.withCredentials=!!se.withCredentials),!w&&se.timeout>0&&(V=setTimeout(function(){if(!We){We=!0,me.abort("timeout");var $=new Error("XMLHttpRequest timeout");$.code="ETIMEDOUT",oe($)}},se.timeout)),me.setRequestHeader)for(Oe in rt)rt.hasOwnProperty(Oe)&&me.setRequestHeader(Oe,rt[Oe]);else if(se.headers&&!function Q(se){for(var Fe in se)if(se.hasOwnProperty(Fe))return!1;return!0}(se.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in se&&(me.responseType=se.responseType),"beforeSend"in se&&"function"==typeof se.beforeSend&&se.beforeSend(me),me.send(je||null),me}Ee.httpHandler=H(3992),He.exports=Ee,He.exports.default=Ee,Ee.XMLHttpRequest=X.XMLHttpRequest||function u(){},Ee.XDomainRequest="withCredentials"in new Ee.XMLHttpRequest?Ee.XMLHttpRequest:X.XDomainRequest,function ve(se,Fe){for(var Ve=0;Ve{"use strict";function H(B,we){return void 0===we&&(we=Object),we&&"function"==typeof we.freeze?we.freeze(B):B}var X=H({HTML:"text/html",isHTML:function(B){return B===X.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),_e=H({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(B){return B===_e.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});Ie.freeze=H,Ie.MIME_TYPE=X,Ie.NAMESPACE=_e},1991:(He,Ie,H)=>{var _e=H(9401),B=H(6853),we=H(4436),ve=H(8702),Q=B.DOMImplementation,Ce=_e.NAMESPACE,Ee=ve.ParseError,Te=ve.XMLReader;function pe(oe){this.options=oe||{locator:{}}}function se(){this.cdata=!1}function Fe(oe,Le){Le.lineNumber=oe.lineNumber,Le.columnNumber=oe.columnNumber}function Ve(oe){if(oe)return"\n@"+(oe.systemId||"")+"#[line:"+oe.lineNumber+",col:"+oe.columnNumber+"]"}function it(oe,Le,me){return"string"==typeof oe?oe.substr(Le,me):oe.length>=Le+me||Le?new java.lang.String(oe,Le,me)+"":oe}function yt(oe,Le){oe.currentElement?oe.currentElement.appendChild(Le):oe.doc.appendChild(Le)}pe.prototype.parseFromString=function(oe,Le){var me=this.options,Oe=new Te,We=me.domBuilder||new se,ke=me.errorHandler,Ne=me.locator,je=me.xmlns||{},rt=/\/x?html?$/.test(Le),w=rt?we.HTML_ENTITIES:we.XML_ENTITIES;return Ne&&We.setDocumentLocator(Ne),Oe.errorHandler=function u(oe,Le,me){if(!oe){if(Le instanceof se)return Le;oe=Le}var Oe={},We=oe instanceof Function;function ke(Ne){var je=oe[Ne];!je&&We&&(je=2==oe.length?function(rt){oe(Ne,rt)}:oe),Oe[Ne]=je&&function(rt){je("[xmldom "+Ne+"]\t"+rt+Ve(me))}||function(){}}return me=me||{},ke("warning"),ke("error"),ke("fatalError"),Oe}(ke,We,Ne),Oe.domBuilder=me.domBuilder||We,rt&&(je[""]=Ce.HTML),je.xml=je.xml||Ce.XML,oe&&"string"==typeof oe?Oe.parse(oe,je,w):Oe.errorHandler.error("invalid doc source"),We.doc},se.prototype={startDocument:function(){this.doc=(new Q).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(oe,Le,me,Oe){var We=this.doc,ke=We.createElementNS(oe,me||Le),Ne=Oe.length;yt(this,ke),this.currentElement=ke,this.locator&&Fe(this.locator,ke);for(var je=0;je{var _e=H(9401).NAMESPACE;function B(C){return""!==C}function ve(C,A){return C.hasOwnProperty(A)||(C[A]=!0),C}function Q(C){if(!C)return[];var A=function we(C){return C?C.split(/[\t\n\f\r ]+/).filter(B):[]}(C);return Object.keys(A.reduce(ve,{}))}function Ee(C,A){for(var R in C)A[R]=C[R]}function Te(C,A){var R=C.prototype;if(!(R instanceof A)){let ce=function(){};ce.prototype=A.prototype,ce=new ce,Ee(R,ce),C.prototype=R=ce}R.constructor!=C&&("function"!=typeof C&&console.error("unknown Class:"+C),R.constructor=C)}var pe={},u=pe.ELEMENT_NODE=1,se=pe.ATTRIBUTE_NODE=2,Fe=pe.TEXT_NODE=3,Ve=pe.CDATA_SECTION_NODE=4,it=pe.ENTITY_REFERENCE_NODE=5,yt=pe.ENTITY_NODE=6,oe=pe.PROCESSING_INSTRUCTION_NODE=7,Le=pe.COMMENT_NODE=8,me=pe.DOCUMENT_NODE=9,Oe=pe.DOCUMENT_TYPE_NODE=10,We=pe.DOCUMENT_FRAGMENT_NODE=11,ke=pe.NOTATION_NODE=12,Ne={},je={},D=(Ne.INDEX_SIZE_ERR=(je[1]="Index size error",1),Ne.DOMSTRING_SIZE_ERR=(je[2]="DOMString size error",2),Ne.HIERARCHY_REQUEST_ERR=(je[3]="Hierarchy request error",3)),le=(Ne.WRONG_DOCUMENT_ERR=(je[4]="Wrong document",4),Ne.INVALID_CHARACTER_ERR=(je[5]="Invalid character",5),Ne.NO_DATA_ALLOWED_ERR=(je[6]="No data allowed",6),Ne.NO_MODIFICATION_ALLOWED_ERR=(je[7]="No modification allowed",7),Ne.NOT_FOUND_ERR=(je[8]="Not found",8)),J=(Ne.NOT_SUPPORTED_ERR=(je[9]="Not supported",9),Ne.INUSE_ATTRIBUTE_ERR=(je[10]="Attribute in use",10));function Ge(C,A){if(A instanceof Error)var R=A;else R=this,Error.call(this,je[C]),this.message=je[C],Error.captureStackTrace&&Error.captureStackTrace(this,Ge);return R.code=C,A&&(this.message=this.message+": "+A),R}function qe(){}function Me(C,A){this._node=C,this._refresh=A,Pt(this)}function Pt(C){var A=C._node._inc||C._node.ownerDocument._inc;if(C._inc!=A){var R=C._refresh(C._node);Ar(C,"length",R.length),Ee(R,C),C._inc=A}}function P(){}function St(C,A){for(var R=C.length;R--;)if(C[R]===A)return R}function z(C,A,R,Z){if(Z?A[St(A,Z)]=R:A[A.length++]=R,C){R.ownerElement=C;var ce=C.ownerDocument;ce&&(Z&&Yi(ce,C,Z),function Ct(C,A,R){C&&C._inc++,R.namespaceURI===_e.XMLNS&&(A._nsMap[R.prefix?R.localName:""]=R.value)}(ce,C,R))}}function gt(C,A,R){var Z=St(A,R);if(!(Z>=0))throw Ge(le,new Error(C.tagName+"@"+R));for(var ce=A.length-1;Z"==C&&">")||"&"==C&&"&"||'"'==C&&"""||"&#"+C.charCodeAt()+";"}function lt(C,A){if(A(C))return!0;if(C=C.firstChild)do{if(lt(C,A))return!0}while(C=C.nextSibling)}function re(){}function Yi(C,A,R,Z){C&&C._inc++,R.namespaceURI===_e.XMLNS&&delete A._nsMap[R.prefix?R.localName:""]}function $i(C,A,R){if(C&&C._inc){C._inc++;var Z=A.childNodes;if(R)Z[Z.length++]=R;else{for(var ce=A.firstChild,ze=0;ce;)Z[ze++]=ce,ce=ce.nextSibling;Z.length=ze}}}function ki(C,A){var R=A.previousSibling,Z=A.nextSibling;return R?R.nextSibling=Z:C.firstChild=Z,Z?Z.previousSibling=R:C.lastChild=R,$i(C.ownerDocument,C),A}function Qi(C,A,R){var Z=A.parentNode;if(Z&&Z.removeChild(A),A.nodeType===We){var ce=A.firstChild;if(null==ce)return A;var ze=A.lastChild}else ce=ze=A;var Xe=R?R.previousSibling:C.lastChild;ce.previousSibling=Xe,ze.nextSibling=R,Xe?Xe.nextSibling=ce:C.firstChild=ce,null==R?C.lastChild=ze:R.previousSibling=ze;do{ce.parentNode=C}while(ce!==ze&&(ce=ce.nextSibling));return $i(C.ownerDocument||C,C),A.nodeType==We&&(A.firstChild=A.lastChild=null),A}function vt(){this._nsMap={}}function oi(){}function Xi(){}function rn(){}function xr(){}function Sr(){}function Er(){}function Ji(){}function Cr(){}function nn(){}function er(){}function an(){}function Bn(){}function kr(C,A){var R=[],Z=9==this.nodeType&&this.documentElement||this,ce=Z.prefix,ze=Z.namespaceURI;if(ze&&null==ce&&null==(ce=Z.lookupPrefix(ze)))var Xe=[{namespace:ze,prefix:null}];return Vi(this,R,C,A,Xe),R.join("")}function jn(C,A,R){var Z=C.prefix||"",ce=C.namespaceURI;if(!ce||"xml"===Z&&ce===_e.XML||ce===_e.XMLNS)return!1;for(var ze=R.length;ze--;){var Xe=R[ze];if(Xe.prefix===Z)return Xe.namespace!==ce}return!0}function Ft(C,A,R){C.push(" ",A,'="',R.replace(/[<&"]/g,Ue),'"')}function Vi(C,A,R,Z,ce){if(ce||(ce=[]),Z){if(!(C=Z(C)))return;if("string"==typeof C)return void A.push(C)}switch(C.nodeType){case u:var ze=C.attributes,Xe=ze.length,At=C.firstChild,ui=C.tagName,tr=ui;if(!(R=_e.isHTML(C.namespaceURI)||R)&&!C.prefix&&C.namespaceURI){for(var li,di=0;di=0;$t--)if(""===(ii=ce[$t]).prefix&&ii.namespace===C.namespaceURI){li=ii.namespace;break}if(li!==C.namespaceURI)for($t=ce.length-1;$t>=0;$t--){var ii;if((ii=ce[$t]).namespace===C.namespaceURI){ii.prefix&&(tr=ii.prefix+":"+ui);break}}}A.push("<",tr);for(var ci=0;ci"),R&&/^script$/i.test(ui))for(;At;)At.data?A.push(At.data):Vi(At,A,R,Z,ce.slice()),At=At.nextSibling;else for(;At;)Vi(At,A,R,Z,ce.slice()),At=At.nextSibling;A.push("")}else A.push("/>");return;case me:case We:for(At=C.firstChild;At;)Vi(At,A,R,Z,ce.slice()),At=At.nextSibling;return;case se:return Ft(A,C.name,C.value);case Fe:return A.push(C.data.replace(/[<&]/g,Ue).replace(/]]>/g,"]]>"));case Ve:return A.push("");case Le:return A.push("\x3c!--",C.data,"--\x3e");case Oe:var sn=C.publicId,qi=C.systemId;if(A.push("");else if(qi&&"."!=qi)A.push(" SYSTEM ",qi,">");else{var Vn=C.internalSubset;Vn&&A.push(" [",Vn,"]"),A.push(">")}return;case oe:return A.push("");case it:return A.push("&",C.nodeName,";");default:A.push("??",C.nodeName)}}function Hn(C,A,R){var Z;switch(A.nodeType){case u:(Z=A.cloneNode(!1)).ownerDocument=C;case We:break;case se:R=!0}if(Z||(Z=A.cloneNode(!1)),Z.ownerDocument=C,Z.parentNode=null,R)for(var ce=A.firstChild;ce;)Z.appendChild(Hn(C,ce,R)),ce=ce.nextSibling;return Z}function _i(C,A,R){var Z=new A.constructor;for(var ce in A){var ze=A[ce];"object"!=typeof ze&&ze!=Z[ce]&&(Z[ce]=ze)}switch(A.childNodes&&(Z.childNodes=new qe),Z.ownerDocument=C,Z.nodeType){case u:var Xe=A.attributes,ui=Z.attributes=new P,tr=Xe.length;ui._ownerElement=Z;for(var li=0;li0},lookupPrefix:function(C){for(var A=this;A;){var R=A._nsMap;if(R)for(var Z in R)if(R[Z]==C)return Z;A=A.nodeType==se?A.ownerDocument:A.parentNode}return null},lookupNamespaceURI:function(C){for(var A=this;A;){var R=A._nsMap;if(R&&C in R)return R[C];A=A.nodeType==se?A.ownerDocument:A.parentNode}return null},isDefaultNamespace:function(C){return null==this.lookupPrefix(C)}},Ee(pe,De),Ee(pe,De.prototype),re.prototype={nodeName:"#document",nodeType:me,doctype:null,documentElement:null,_inc:1,insertBefore:function(C,A){if(C.nodeType==We){for(var R=C.firstChild;R;){var Z=R.nextSibling;this.insertBefore(R,A),R=Z}return C}return null==this.documentElement&&C.nodeType==u&&(this.documentElement=C),Qi(this,C,A),C.ownerDocument=this,C},removeChild:function(C){return this.documentElement==C&&(this.documentElement=null),ki(this,C)},importNode:function(C,A){return Hn(this,C,A)},getElementById:function(C){var A=null;return lt(this.documentElement,function(R){if(R.nodeType==u&&R.getAttribute("id")==C)return A=R,!0}),A},getElementsByClassName:function(C){var A=Q(C);return new Me(this,function(R){var Z=[];return A.length>0&<(R.documentElement,function(ce){if(ce!==R&&ce.nodeType===u){var ze=ce.getAttribute("class");if(ze){var Xe=C===ze;if(!Xe){var ui=Q(ze);Xe=A.every(function Ce(C){return function(A){return C&&-1!==C.indexOf(A)}}(ui))}Xe&&Z.push(ce)}}}),Z})},createElement:function(C){var A=new vt;return A.ownerDocument=this,A.nodeName=C,A.tagName=C,A.localName=C,A.childNodes=new qe,(A.attributes=new P)._ownerElement=A,A},createDocumentFragment:function(){var C=new er;return C.ownerDocument=this,C.childNodes=new qe,C},createTextNode:function(C){var A=new rn;return A.ownerDocument=this,A.appendData(C),A},createComment:function(C){var A=new xr;return A.ownerDocument=this,A.appendData(C),A},createCDATASection:function(C){var A=new Sr;return A.ownerDocument=this,A.appendData(C),A},createProcessingInstruction:function(C,A){var R=new an;return R.ownerDocument=this,R.tagName=R.target=C,R.nodeValue=R.data=A,R},createAttribute:function(C){var A=new oi;return A.ownerDocument=this,A.name=C,A.nodeName=C,A.localName=C,A.specified=!0,A},createEntityReference:function(C){var A=new nn;return A.ownerDocument=this,A.nodeName=C,A},createElementNS:function(C,A){var R=new vt,Z=A.split(":"),ce=R.attributes=new P;return R.childNodes=new qe,R.ownerDocument=this,R.nodeName=A,R.tagName=A,R.namespaceURI=C,2==Z.length?(R.prefix=Z[0],R.localName=Z[1]):R.localName=A,ce._ownerElement=R,R},createAttributeNS:function(C,A){var R=new oi,Z=A.split(":");return R.ownerDocument=this,R.nodeName=A,R.name=A,R.namespaceURI=C,R.specified=!0,2==Z.length?(R.prefix=Z[0],R.localName=Z[1]):R.localName=A,R}},Te(re,De),re.prototype.getElementsByTagName=(vt.prototype={nodeType:u,hasAttribute:function(C){return null!=this.getAttributeNode(C)},getAttribute:function(C){var A=this.getAttributeNode(C);return A&&A.value||""},getAttributeNode:function(C){return this.attributes.getNamedItem(C)},setAttribute:function(C,A){var R=this.ownerDocument.createAttribute(C);R.value=R.nodeValue=""+A,this.setAttributeNode(R)},removeAttribute:function(C){var A=this.getAttributeNode(C);A&&this.removeAttributeNode(A)},appendChild:function(C){return C.nodeType===We?this.insertBefore(C,null):function nt(C,A){var R=A.parentNode;if(R){var Z=C.lastChild;R.removeChild(A),Z=C.lastChild}return Z=C.lastChild,A.parentNode=C,A.previousSibling=Z,A.nextSibling=null,Z?Z.nextSibling=A:C.firstChild=A,C.lastChild=A,$i(C.ownerDocument,C,A),A}(this,C)},setAttributeNode:function(C){return this.attributes.setNamedItem(C)},setAttributeNodeNS:function(C){return this.attributes.setNamedItemNS(C)},removeAttributeNode:function(C){return this.attributes.removeNamedItem(C.nodeName)},removeAttributeNS:function(C,A){var R=this.getAttributeNodeNS(C,A);R&&this.removeAttributeNode(R)},hasAttributeNS:function(C,A){return null!=this.getAttributeNodeNS(C,A)},getAttributeNS:function(C,A){var R=this.getAttributeNodeNS(C,A);return R&&R.value||""},setAttributeNS:function(C,A,R){var Z=this.ownerDocument.createAttributeNS(C,A);Z.value=Z.nodeValue=""+R,this.setAttributeNode(Z)},getAttributeNodeNS:function(C,A){return this.attributes.getNamedItemNS(C,A)},getElementsByTagName:function(C){return new Me(this,function(A){var R=[];return lt(A,function(Z){Z!==A&&Z.nodeType==u&&("*"===C||Z.tagName==C)&&R.push(Z)}),R})},getElementsByTagNameNS:function(C,A){return new Me(this,function(R){var Z=[];return lt(R,function(ce){ce!==R&&ce.nodeType===u&&("*"===C||ce.namespaceURI===C)&&("*"===A||ce.localName==A)&&Z.push(ce)}),Z})}}).getElementsByTagName,re.prototype.getElementsByTagNameNS=vt.prototype.getElementsByTagNameNS,Te(vt,De),oi.prototype.nodeType=se,Te(oi,De),Xi.prototype={data:"",substringData:function(C,A){return this.data.substring(C,C+A)},appendData:function(C){this.nodeValue=this.data=C=this.data+C,this.length=C.length},insertData:function(C,A){this.replaceData(C,0,A)},appendChild:function(C){throw new Error(je[D])},deleteData:function(C,A){this.replaceData(C,A,"")},replaceData:function(C,A,R){var Z=this.data.substring(0,C),ce=this.data.substring(C+A);this.nodeValue=this.data=R=Z+R+ce,this.length=R.length}},Te(Xi,De),rn.prototype={nodeName:"#text",nodeType:Fe,splitText:function(C){var A=this.data,R=A.substring(C);A=A.substring(0,C),this.data=this.nodeValue=A,this.length=A.length;var Z=this.ownerDocument.createTextNode(R);return this.parentNode&&this.parentNode.insertBefore(Z,this.nextSibling),Z}},Te(rn,Xi),xr.prototype={nodeName:"#comment",nodeType:Le},Te(xr,Xi),Sr.prototype={nodeName:"#cdata-section",nodeType:Ve},Te(Sr,Xi),Er.prototype.nodeType=Oe,Te(Er,De),Ji.prototype.nodeType=ke,Te(Ji,De),Cr.prototype.nodeType=yt,Te(Cr,De),nn.prototype.nodeType=it,Te(nn,De),er.prototype.nodeName="#document-fragment",er.prototype.nodeType=We,Te(er,De),an.prototype.nodeType=oe,Te(an,De),Bn.prototype.serializeToString=function(C,A,R){return kr.call(C,A,R)},De.prototype.toString=kr;try{if(Object.defineProperty){let C=function(A){switch(A.nodeType){case u:case We:var R=[];for(A=A.firstChild;A;)7!==A.nodeType&&8!==A.nodeType&&R.push(C(A)),A=A.nextSibling;return R.join("");default:return A.nodeValue}};Object.defineProperty(Me.prototype,"length",{get:function(){return Pt(this),this.$$length}}),Object.defineProperty(De.prototype,"textContent",{get:function(){return C(this)},set:function(A){switch(this.nodeType){case u:case We:for(;this.firstChild;)this.removeChild(this.firstChild);(A||String(A))&&this.appendChild(this.ownerDocument.createTextNode(A));break;default:this.data=A,this.value=A,this.nodeValue=A}}}),Ar=function(A,R,Z){A["$$"+R]=Z}}}catch{}Ie.DocumentType=Er,Ie.DOMException=Ge,Ie.DOMImplementation=vi,Ie.Element=vt,Ie.Node=De,Ie.NodeList=qe,Ie.XMLSerializer=Bn},4436:(He,Ie,H)=>{var X=H(9401).freeze;Ie.XML_ENTITIES=X({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),Ie.HTML_ENTITIES=X({lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"\xc0",Aacute:"\xc1",Acirc:"\xc2",Atilde:"\xc3",Auml:"\xc4",Aring:"\xc5",AElig:"\xc6",Ccedil:"\xc7",Egrave:"\xc8",Eacute:"\xc9",Ecirc:"\xca",Euml:"\xcb",Igrave:"\xcc",Iacute:"\xcd",Icirc:"\xce",Iuml:"\xcf",ETH:"\xd0",Ntilde:"\xd1",Ograve:"\xd2",Oacute:"\xd3",Ocirc:"\xd4",Otilde:"\xd5",Ouml:"\xd6",Oslash:"\xd8",Ugrave:"\xd9",Uacute:"\xda",Ucirc:"\xdb",Uuml:"\xdc",Yacute:"\xdd",THORN:"\xde",szlig:"\xdf",agrave:"\xe0",aacute:"\xe1",acirc:"\xe2",atilde:"\xe3",auml:"\xe4",aring:"\xe5",aelig:"\xe6",ccedil:"\xe7",egrave:"\xe8",eacute:"\xe9",ecirc:"\xea",euml:"\xeb",igrave:"\xec",iacute:"\xed",icirc:"\xee",iuml:"\xef",eth:"\xf0",ntilde:"\xf1",ograve:"\xf2",oacute:"\xf3",ocirc:"\xf4",otilde:"\xf5",ouml:"\xf6",oslash:"\xf8",ugrave:"\xf9",uacute:"\xfa",ucirc:"\xfb",uuml:"\xfc",yacute:"\xfd",thorn:"\xfe",yuml:"\xff",nbsp:"\xa0",iexcl:"\xa1",cent:"\xa2",pound:"\xa3",curren:"\xa4",yen:"\xa5",brvbar:"\xa6",sect:"\xa7",uml:"\xa8",copy:"\xa9",ordf:"\xaa",laquo:"\xab",not:"\xac",shy:"\xad\xad",reg:"\xae",macr:"\xaf",deg:"\xb0",plusmn:"\xb1",sup2:"\xb2",sup3:"\xb3",acute:"\xb4",micro:"\xb5",para:"\xb6",middot:"\xb7",cedil:"\xb8",sup1:"\xb9",ordm:"\xba",raquo:"\xbb",frac14:"\xbc",frac12:"\xbd",frac34:"\xbe",iquest:"\xbf",times:"\xd7",divide:"\xf7",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220b",prod:"\u220f",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221a",prop:"\u221d",infin:"\u221e",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222a",int:"\u222b",there4:"\u2234",sim:"\u223c",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22a5",sdot:"\u22c5",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039a",Lambda:"\u039b",Mu:"\u039c",Nu:"\u039d",Xi:"\u039e",Omicron:"\u039f",Pi:"\u03a0",Rho:"\u03a1",Sigma:"\u03a3",Tau:"\u03a4",Upsilon:"\u03a5",Phi:"\u03a6",Chi:"\u03a7",Psi:"\u03a8",Omega:"\u03a9",alpha:"\u03b1",beta:"\u03b2",gamma:"\u03b3",delta:"\u03b4",epsilon:"\u03b5",zeta:"\u03b6",eta:"\u03b7",theta:"\u03b8",iota:"\u03b9",kappa:"\u03ba",lambda:"\u03bb",mu:"\u03bc",nu:"\u03bd",xi:"\u03be",omicron:"\u03bf",pi:"\u03c0",rho:"\u03c1",sigmaf:"\u03c2",sigma:"\u03c3",tau:"\u03c4",upsilon:"\u03c5",phi:"\u03c6",chi:"\u03c7",psi:"\u03c8",omega:"\u03c9",thetasym:"\u03d1",upsih:"\u03d2",piv:"\u03d6",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02c6",tilde:"\u02dc",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200c",zwj:"\u200d",lrm:"\u200e",rlm:"\u200f",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201a",ldquo:"\u201c",rdquo:"\u201d",bdquo:"\u201e",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203a",oline:"\u203e",euro:"\u20ac",trade:"\u2122",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21b5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230a",rfloor:"\u230b",loz:"\u25ca",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"}),Ie.entityMap=Ie.HTML_ENTITIES},978:(He,Ie,H)=>{H(6853);Ie.DOMParser=H(1991).DOMParser},8702:(He,Ie,H)=>{var X=H(9401).NAMESPACE,_e=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,B=new RegExp("[\\-\\.0-9"+_e.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),we=new RegExp("^"+_e.source+B.source+"*(?::"+_e.source+B.source+"*)?$");function Fe(w,D){this.message=w,this.locator=D,Error.captureStackTrace&&Error.captureStackTrace(this,Fe)}function Ve(){}function yt(w,D){return D.lineNumber=w.lineNumber,D.columnNumber=w.columnNumber,D}function oe(w,D,V,te,$,de){function le(Ze,Ge,qe){V.attributeNames.hasOwnProperty(Ze)&&de.fatalError("Attribute "+Ze+" redefined"),V.addValue(Ze,Ge,qe)}for(var xe,ue=++D,ee=0;;){var ie=w.charAt(ue);switch(ie){case"=":if(1===ee)xe=w.slice(D,ue),ee=3;else{if(2!==ee)throw new Error("attribute equal must after attrName");ee=3}break;case"'":case'"':if(3===ee||1===ee){if(1===ee&&(de.warning('attribute value must after "="'),xe=w.slice(D,ue)),!((ue=w.indexOf(ie,D=ue+1))>0))throw new Error("attribute value no end '"+ie+"' match");le(xe,J=w.slice(D,ue).replace(/&#?\w+;/g,$),D-1),ee=5}else{if(4!=ee)throw new Error('attribute value must after "="');le(xe,J=w.slice(D,ue).replace(/&#?\w+;/g,$),D),de.warning('attribute "'+xe+'" missed start quot('+ie+")!!"),D=ue+1,ee=5}break;case"/":switch(ee){case 0:V.setTagName(w.slice(D,ue));case 5:case 6:case 7:ee=7,V.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return de.error("unexpected end of input"),0==ee&&V.setTagName(w.slice(D,ue)),ue;case">":switch(ee){case 0:V.setTagName(w.slice(D,ue));case 5:case 6:case 7:break;case 4:case 1:"/"===(J=w.slice(D,ue)).slice(-1)&&(V.closed=!0,J=J.slice(0,-1));case 2:2===ee&&(J=xe),4==ee?(de.warning('attribute "'+J+'" missed quot(")!'),le(xe,J.replace(/&#?\w+;/g,$),D)):((!X.isHTML(te[""])||!J.match(/^(?:disabled|checked|selected)$/i))&&de.warning('attribute "'+J+'" missed value!! "'+J+'" instead!!'),le(J,J,D));break;case 3:throw new Error("attribute value missed!!")}return ue;case"\x80":ie=" ";default:if(ie<=" ")switch(ee){case 0:V.setTagName(w.slice(D,ue)),ee=6;break;case 1:xe=w.slice(D,ue),ee=2;break;case 4:var J=w.slice(D,ue).replace(/&#?\w+;/g,$);de.warning('attribute "'+J+'" missed quot(")!!'),le(xe,J,D);case 5:ee=6}else switch(ee){case 2:(!X.isHTML(te[""])||!xe.match(/^(?:disabled|checked|selected)$/i))&&de.warning('attribute "'+xe+'" missed value!! "'+xe+'" instead2!!'),le(xe,xe,D),D=ue,ee=1;break;case 5:de.warning('attribute space is required"'+xe+'"!!');case 6:ee=1,D=ue;break;case 3:ee=4,D=ue;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}ue++}}function Le(w,D,V){for(var te=w.tagName,$=null,ie=w.length;ie--;){var de=w[ie],le=de.qName,xe=de.value;if((Ae=le.indexOf(":"))>0)var J=de.prefix=le.slice(0,Ae),ue=le.slice(Ae+1),ee="xmlns"===J&&ue;else ue=le,J=null,ee="xmlns"===le&&"";de.localName=ue,!1!==ee&&(null==$&&($={},We(V,V={})),V[ee]=$[ee]=xe,de.uri=X.XMLNS,D.startPrefixMapping(ee,xe))}for(ie=w.length;ie--;)(J=(de=w[ie]).prefix)&&("xml"===J&&(de.uri=X.XML),"xmlns"!==J&&(de.uri=V[J||""]));var Ae;(Ae=te.indexOf(":"))>0?(J=w.prefix=te.slice(0,Ae),ue=w.localName=te.slice(Ae+1)):(J=null,ue=w.localName=te);var Ze=w.uri=V[J||""];if(D.startElement(Ze,ue,te,w),!w.closed)return w.currentNSMap=V,w.localNSMap=$,!0;if(D.endElement(Ze,ue,te),$)for(J in $)D.endPrefixMapping(J)}function me(w,D,V,te,$){if(/^(?:script|textarea)$/i.test(V)){var de=w.indexOf("",D),le=w.substring(D+1,de);if(/[&<]/.test(le))return/^script$/i.test(V)?($.characters(le,0,le.length),de):(le=le.replace(/&#?\w+;/g,te),$.characters(le,0,le.length),de)}return D+1}function Oe(w,D,V,te){var $=te[V];return null==$&&(($=w.lastIndexOf(""))D?(V.comment(w,D+4,de-D-4),de+3):(te.error("Unclosed comment"),-1):-1;if("CDATA["==w.substr(D+3,6)){var de=w.indexOf("]]>",D+9);return V.startCDATA(),V.characters(w,D+9,de-D-9),V.endCDATA(),de+3}var le=function rt(w,D){var V,te=[],$=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for($.lastIndex=D,$.exec(w);V=$.exec(w);)if(te.push(V),V[1])return te}(w,D),xe=le.length;if(xe>1&&/!doctype/i.test(le[0][0])){var J=le[1][0],ue=!1,ee=!1;xe>3&&(/^public$/i.test(le[2][0])?(ue=le[3][0],ee=xe>4&&le[4][0]):/^system$/i.test(le[2][0])&&(ee=le[3][0]));var ie=le[xe-1];return V.startDTD(J,ue,ee),V.endDTD(),ie.index+ie[0].length}return-1}function Ne(w,D,V){var te=w.indexOf("?>",D);if(te){var $=w.substring(D,te).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return $?(V.processingInstruction($[1],$[2]),te+2):-1}return-1}function je(){this.attributeNames={}}(Fe.prototype=new Error).name=Fe.name,Ve.prototype={parse:function(w,D,V){var te=this.domBuilder;te.startDocument(),We(D,D={}),function it(w,D,V,te,$){function le(nt){var vt=nt.slice(1,-1);return vt in V?V[vt]:"#"===vt.charAt(0)?function de(nt){return nt>65535?(nt-=65536,String.fromCharCode(55296+(nt>>10),56320+(1023&nt))):String.fromCharCode(nt)}(parseInt(vt.substr(1).replace("x","0x"))):($.error("entity not found:"+nt),nt)}function xe(nt){if(nt>qe){var vt=w.substring(qe,nt).replace(/&#?\w+;/g,le);Ae&&J(qe),te.characters(vt,0,nt-qe),qe=nt}}function J(nt,vt){for(;nt>=ee&&(vt=ie.exec(w));)ee=(ue=vt.index)+vt[0].length,Ae.lineNumber++;Ae.columnNumber=nt-ue+1}for(var ue=0,ee=0,ie=/.*(?:\r\n?|\n)|.*$/g,Ae=te.locator,Ze=[{currentNSMap:D}],Ge={},qe=0;;){try{var Me=w.indexOf("<",qe);if(Me<0){if(!w.substr(qe).match(/^\s*$/)){var Pt=te.doc,P=Pt.createTextNode(w.substr(qe));Pt.appendChild(P),te.currentElement=P}return}switch(Me>qe&&xe(Me),w.charAt(Me+1)){case"/":var Ct=w.indexOf(">",Me+3),St=w.substring(Me+2,Ct).replace(/[ \t\n\r]+$/g,""),z=Ze.pop();Ct<0?(St=w.substring(Me+2).replace(/[\s<].*/,""),$.error("end tag name: "+St+" is not complete:"+z.tagName),Ct=Me+1+St.length):St.match(/\sqe?qe=Ct:xe(Math.max(Me,qe)+1)}}(w,D,V,te,this.errorHandler),te.endDocument()}},je.prototype={setTagName:function(w){if(!we.test(w))throw new Error("invalid tagName:"+w);this.tagName=w},addValue:function(w,D,V){if(!we.test(w))throw new Error("invalid attribute:"+w);this.attributeNames[w]=this.length,this[this.length++]={qName:w,value:D,offset:V}},length:0,getLocalName:function(w){return this[w].localName},getLocator:function(w){return this[w].locator},getQName:function(w){return this[w].qName},getURI:function(w){return this[w].uri},getValue:function(w){return this[w].value}},Ie.XMLReader=Ve,Ie.ParseError=Fe},1421:(He,Ie,H)=>{var B,X=typeof global<"u"?global:typeof window<"u"?window:{},_e=H(5893);typeof document<"u"?B=document:(B=X["__GLOBAL_DOCUMENT_CACHE@4"])||(B=X["__GLOBAL_DOCUMENT_CACHE@4"]=_e),He.exports=B},9226:He=>{var Ie;Ie=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},He.exports=Ie},2703:He=>{He.exports=function H(X){if(!X)return!1;var _e=Ie.call(X);return"[object Function]"===_e||"function"==typeof X&&"[object RegExp]"!==_e||typeof window<"u"&&(X===window.setTimeout||X===window.alert||X===window.confirm||X===window.prompt)};var Ie=Object.prototype.toString},1234:(He,Ie)=>{function H(Q){if(Q&&"object"==typeof Q){var Ce=Q.which||Q.keyCode||Q.charCode;Ce&&(Q=Ce)}if("number"==typeof Q)return we[Q];var Te,Ee=String(Q);return(Te=X[Ee.toLowerCase()])?Te:(Te=_e[Ee.toLowerCase()])||(1===Ee.length?Ee.charCodeAt(0):void 0)}H.isEventKey=function(Ce,Ee){if(Ce&&"object"==typeof Ce){var Te=Ce.which||Ce.keyCode||Ce.charCode;if(null==Te)return!1;if("string"==typeof Ee){var pe;if(pe=X[Ee.toLowerCase()])return pe===Te;if(pe=_e[Ee.toLowerCase()])return pe===Te}else if("number"==typeof Ee)return Ee===Te;return!1}};var X=(Ie=He.exports=H).code=Ie.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},_e=Ie.aliases={windows:91,"\u21e7":16,"\u2325":18,"\u2303":17,"\u2318":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};for(B=97;B<123;B++)X[String.fromCharCode(B)]=B-32;for(var B=48;B<58;B++)X[B-48]=B;for(B=1;B<13;B++)X["f"+B]=B+111;for(B=0;B<10;B++)X["numpad "+B]=B+96;var we=Ie.names=Ie.title={};for(B in X)we[X[B]]=B;for(var ve in _e)X[ve]=_e[ve]},7459:(He,Ie,H)=>{var X=H(3357).getUint64;He.exports=function(B){var we=new DataView(B.buffer,B.byteOffset,B.byteLength),ve={version:B[0],flags:new Uint8Array(B.subarray(1,4)),references:[],referenceId:we.getUint32(4),timescale:we.getUint32(8)},Q=12;0===ve.version?(ve.earliestPresentationTime=we.getUint32(Q),ve.firstOffset=we.getUint32(Q+4),Q+=8):(ve.earliestPresentationTime=X(B.subarray(Q)),ve.firstOffset=X(B.subarray(Q+8)),Q+=16);var Ce=we.getUint16(Q+=2);for(Q+=2;Ce>0;Q+=12,Ce--)ve.references.push({referenceType:(128&B[Q])>>>7,referencedSize:2147483647&we.getUint32(Q),subsegmentDuration:we.getUint32(Q+4),startsWithSap:!!(128&B[Q+8]),sapType:(112&B[Q+8])>>>4,sapDeltaTime:268435455&we.getUint32(Q+8)});return ve}},6277:He=>{var H,X,_e,B,we,ve,Q;we=function(Ce,Ee){return H(B(Ce,Ee))},ve=function(Ce,Ee){return X(_e(Ce),Ee)},Q=function(Ce,Ee,Te){return _e(Te?Ce:Ce-Ee)},He.exports={ONE_SECOND_IN_TS:9e4,secondsToVideoTs:H=function(Ce){return 9e4*Ce},secondsToAudioTs:X=function(Ce,Ee){return Ce*Ee},videoTsToSeconds:_e=function(Ce){return Ce/9e4},audioTsToSeconds:B=function(Ce,Ee){return Ce/Ee},audioTsToVideoTs:we,videoTsToAudioTs:ve,metadataTsToSeconds:Q}},3357:He=>{var Ie=Math.pow(2,32);He.exports={getUint64:function(X){var B,_e=new DataView(X.buffer,X.byteOffset,X.byteLength);return _e.getBigUint64?(B=_e.getBigUint64(0)){He.exports=function Ie(H,X){var _e,B=null;try{_e=JSON.parse(H,X)}catch(we){B=we}return[B,_e]}},3871:function(He){var H,X,_e,B,we;H=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,X=/^(?=([^\/?#]*))\1([^]*)$/,_e=/(?:\/|^)\.(?=\/)/g,B=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,He.exports=we={buildAbsoluteURL:function(ve,Q,Ce){if(Ce=Ce||{},ve=ve.trim(),!(Q=Q.trim())){if(!Ce.alwaysNormalize)return ve;var Ee=we.parseURL(ve);if(!Ee)throw new Error("Error trying to parse base URL.");return Ee.path=we.normalizePath(Ee.path),we.buildURLFromParts(Ee)}var Te=we.parseURL(Q);if(!Te)throw new Error("Error trying to parse relative URL.");if(Te.scheme)return Ce.alwaysNormalize?(Te.path=we.normalizePath(Te.path),we.buildURLFromParts(Te)):Q;var pe=we.parseURL(ve);if(!pe)throw new Error("Error trying to parse base URL.");if(!pe.netLoc&&pe.path&&"/"!==pe.path[0]){var u=X.exec(pe.path);pe.netLoc=u[1],pe.path=u[2]}pe.netLoc&&!pe.path&&(pe.path="/");var se={scheme:pe.scheme,netLoc:Te.netLoc,path:null,params:Te.params,query:Te.query,fragment:Te.fragment};if(!Te.netLoc&&(se.netLoc=pe.netLoc,"/"!==Te.path[0]))if(Te.path){var Fe=pe.path,Ve=Fe.substring(0,Fe.lastIndexOf("/")+1)+Te.path;se.path=we.normalizePath(Ve)}else se.path=pe.path,Te.params||(se.params=pe.params,Te.query||(se.query=pe.query));return null===se.path&&(se.path=Ce.alwaysNormalize?we.normalizePath(Te.path):Te.path),we.buildURLFromParts(se)},parseURL:function(ve){var Q=H.exec(ve);return Q?{scheme:Q[1]||"",netLoc:Q[2]||"",path:Q[3]||"",params:Q[4]||"",query:Q[5]||"",fragment:Q[6]||""}:null},normalizePath:function(ve){for(ve=ve.split("").reverse().join("").replace(_e,"");ve.length!==(ve=ve.replace(B,"")).length;);return ve.split("").reverse().join("")},buildURLFromParts:function(ve){return ve.scheme+ve.netLoc+ve.path+ve.params+ve.query+ve.fragment}}},3629:(He,Ie,H)=>{var X=H(9226),_e=He.exports={WebVTT:H(8318),VTTCue:H(5713),VTTRegion:H(3872)};X.vttjs=_e,X.WebVTT=_e.WebVTT;var B=_e.VTTCue,we=_e.VTTRegion,ve=X.VTTCue,Q=X.VTTRegion;_e.shim=function(){X.VTTCue=B,X.VTTRegion=we},_e.restore=function(){X.VTTCue=ve,X.VTTRegion=Q},X.VTTCue||_e.shim()},8318:(He,Ie,H)=>{var X=H(1421),_e=Object.create||function(){function w(){}return function(D){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return w.prototype=D,new w}}();function B(w,D){this.name="ParsingError",this.code=w.code,this.message=D||w.message}function we(w){function D(te,$,de,le){return 3600*(0|te)+60*(0|$)+(0|de)+(0|le)/1e3}var V=w.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return V?V[3]?D(V[1],V[2],V[3].replace(":",""),V[4]):V[1]>59?D(V[1],V[2],0,V[4]):D(0,V[1],V[2],V[4]):null}function ve(){this.values=_e(null)}function Q(w,D,V,te){var $=te?w.split(te):[w];for(var de in $)if("string"==typeof $[de]){var le=$[de].split(V);2===le.length&&D(le[0],le[1])}}function Ce(w,D,V){var te=w;function $(){var xe=we(w);if(null===xe)throw new B(B.Errors.BadTimeStamp,"Malformed timestamp: "+te);return w=w.replace(/^[^\sa-zA-Z-]+/,""),xe}function le(){w=w.replace(/^\s+/,"")}if(le(),D.startTime=$(),le(),"--\x3e"!==w.substr(0,3))throw new B(B.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+te);w=w.substr(3),le(),D.endTime=$(),le(),function de(xe,J){var ue=new ve;Q(xe,function(ee,ie){switch(ee){case"region":for(var Ae=V.length-1;Ae>=0;Ae--)if(V[Ae].id===ie){ue.set(ee,V[Ae].region);break}break;case"vertical":ue.alt(ee,ie,["rl","lr"]);break;case"line":var Ze=ie.split(","),Ge=Ze[0];ue.integer(ee,Ge),ue.percent(ee,Ge)&&ue.set("snapToLines",!1),ue.alt(ee,Ge,["auto"]),2===Ze.length&&ue.alt("lineAlign",Ze[1],["start","center","end"]);break;case"position":Ze=ie.split(","),ue.percent(ee,Ze[0]),2===Ze.length&&ue.alt("positionAlign",Ze[1],["start","center","end"]);break;case"size":ue.percent(ee,ie);break;case"align":ue.alt(ee,ie,["start","center","end","left","right"])}},/:/,/\s/),J.region=ue.get("region",null),J.vertical=ue.get("vertical","");try{J.line=ue.get("line","auto")}catch{}J.lineAlign=ue.get("lineAlign","start"),J.snapToLines=ue.get("snapToLines",!0),J.size=ue.get("size",100);try{J.align=ue.get("align","center")}catch{J.align=ue.get("align","middle")}try{J.position=ue.get("position","auto")}catch{J.position=ue.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},J.align)}J.positionAlign=ue.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},J.align)}(w,D)}(B.prototype=_e(Error.prototype)).constructor=B,B.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},ve.prototype={set:function(w,D){!this.get(w)&&""!==D&&(this.values[w]=D)},get:function(w,D,V){return V?this.has(w)?this.values[w]:D[V]:this.has(w)?this.values[w]:D},has:function(w){return w in this.values},alt:function(w,D,V){for(var te=0;te=0&&D<=100))&&(this.set(w,D),!0)}};var Ee=X.createElement&&X.createElement("textarea"),Te={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},pe={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},u={v:"title",lang:"lang"},se={rt:"ruby"};function Fe(w,D){function V(){if(!D)return null;var qe=D.match(/^([^<]*)(<[^>]*>?)?/);return function Ge(Me){return D=D.substr(Me.length),Me}(qe[1]?qe[1]:qe[2])}function te(Ge){return Ee.innerHTML=Ge,Ge=Ee.textContent,Ee.textContent="",Ge}function de(Ge,qe){var Me=Te[Ge];if(!Me)return null;var Pt=w.document.createElement(Me),P=u[Ge];return P&&qe&&(Pt[P]=qe.trim()),Pt}for(var J,le=w.document.createElement("div"),xe=le,ue=[];null!==(J=V());)if("<"!==J[0])xe.appendChild(w.document.createTextNode(te(J)));else{if("/"===J[1]){ue.length&&ue[ue.length-1]===J.substr(2).replace(">","")&&(ue.pop(),xe=xe.parentNode);continue}var ie,ee=we(J.substr(1,J.length-2));if(ee){ie=w.document.createProcessingInstruction("timestamp",ee),xe.appendChild(ie);continue}var Ae=J.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!Ae||!(ie=de(Ae[1],Ae[3]))||se[(qe=ie).localName]&&se[qe.localName]!==xe.localName)continue;if(Ae[2]){var Ze=Ae[2].split(".");Ze.forEach(function(Ge){var qe=/^bg_/.test(Ge),Me=qe?Ge.slice(3):Ge;pe.hasOwnProperty(Me)&&(ie.style[qe?"background-color":"color"]=pe[Me])}),ie.className=Ze.join(" ")}ue.push(Ae[1]),xe.appendChild(ie),xe=ie}var qe;return le}var Ve=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function it(w){for(var D=0;D=V[0]&&w<=V[1])return!0}return!1}function yt(w){var D=[],V="";if(!w||!w.childNodes)return"ltr";function $(xe,J){for(var ue=J.childNodes.length-1;ue>=0;ue--)xe.push(J.childNodes[ue])}function de(xe){if(!xe||!xe.length)return null;var J=xe.pop(),ue=J.textContent||J.innerText;if(ue){var ee=ue.match(/^.*(\n|\r)/);return ee?(xe.length=0,ee[0]):ue}return"ruby"===J.tagName?de(xe):J.childNodes?($(xe,J),de(xe)):void 0}for($(D,w);V=de(D);)for(var le=0;le=0&&w.line<=100))return w.line;if(!w.track||!w.track.textTrackList||!w.track.textTrackList.mediaElement)return-1;for(var D=w.track,V=D.textTrackList,te=0,$=0;$Ae&&(ie=ie<0?-1:1,ie*=Math.ceil(Ae/ee)*ee),xe<0&&(ie+=""===le.vertical?V.height:V.width,J=J.reverse()),de.move(Ze,ie)}else{var Ge=de.lineHeight/V.height*100;switch(le.lineAlign){case"center":xe-=Ge/2;break;case"end":xe-=Ge}switch(le.vertical){case"":D.applyStyles({top:D.formatStyle(xe,"%")});break;case"rl":D.applyStyles({left:D.formatStyle(xe,"%")});break;case"lr":D.applyStyles({right:D.formatStyle(xe,"%")})}J=["+y","-x","+x","-y"],de=new Oe(D)}var qe=function $(Me,Pt){for(var P,St=new Oe(Me),z=1,gt=0;gtvi&&(P=new Oe(Me),z=vi),Me=new Oe(St)}return P||St}(de,J);D.move(qe.toCSSCompatValues(V))}function ke(){}Le.prototype.applyStyles=function(w,D){for(var V in D=D||this.div,w)w.hasOwnProperty(V)&&(D.style[V]=w[V])},Le.prototype.formatStyle=function(w,D){return 0===w?0:w+D},(me.prototype=_e(Le.prototype)).constructor=me,Oe.prototype.move=function(w,D){switch(D=void 0!==D?D:this.lineHeight,w){case"+x":this.left+=D,this.right+=D;break;case"-x":this.left-=D,this.right-=D;break;case"+y":this.top+=D,this.bottom+=D;break;case"-y":this.top-=D,this.bottom-=D}},Oe.prototype.overlaps=function(w){return this.leftw.left&&this.topw.top},Oe.prototype.overlapsAny=function(w){for(var D=0;D=w.top&&this.bottom<=w.bottom&&this.left>=w.left&&this.right<=w.right},Oe.prototype.overlapsOppositeAxis=function(w,D){switch(D){case"+x":return this.leftw.right;case"+y":return this.topw.bottom}},Oe.prototype.intersectPercentage=function(w){return Math.max(0,Math.min(this.right,w.right)-Math.max(this.left,w.left))*Math.max(0,Math.min(this.bottom,w.bottom)-Math.max(this.top,w.top))/(this.height*this.width)},Oe.prototype.toCSSCompatValues=function(w){return{top:this.top-w.top,bottom:w.bottom-this.bottom,left:this.left-w.left,right:w.right-this.right,height:this.height,width:this.width}},Oe.getSimpleBoxPosition=function(w){var D=w.div?w.div.offsetHeight:w.tagName?w.offsetHeight:0,V=w.div?w.div.offsetWidth:w.tagName?w.offsetWidth:0,te=w.div?w.div.offsetTop:w.tagName?w.offsetTop:0;return{left:(w=w.div?w.div.getBoundingClientRect():w.tagName?w.getBoundingClientRect():w).left,right:w.right,top:w.top||te,height:w.height||D,bottom:w.bottom||te+(w.height||D),width:w.width||V}},ke.StringDecoder=function(){return{decode:function(w){if(!w)return"";if("string"!=typeof w)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(w))}}},ke.convertCueToDOMTree=function(w,D){return w&&D?Fe(w,D):null},ke.processCues=function(w,D,V){if(!w||!D||!V)return null;for(;V.firstChild;)V.removeChild(V.firstChild);var te=w.document.createElement("div");if(te.style.position="absolute",te.style.left="0",te.style.right="0",te.style.top="0",te.style.bottom="0",te.style.margin="1.5%",V.appendChild(te),function $(ee){for(var ie=0;ie{var H={"":1,lr:1,rl:1},X={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function B(ve){return"string"==typeof ve&&!!X[ve.toLowerCase()]&&ve.toLowerCase()}function we(ve,Q,Ce){this.hasBeenReset=!1;var Ee="",Te=!1,pe=ve,u=Q,se=Ce,Fe=null,Ve="",it=!0,yt="auto",oe="start",Le="auto",me="auto",Oe=100,We="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return Ee},set:function(ke){Ee=""+ke}},pauseOnExit:{enumerable:!0,get:function(){return Te},set:function(ke){Te=!!ke}},startTime:{enumerable:!0,get:function(){return pe},set:function(ke){if("number"!=typeof ke)throw new TypeError("Start time must be set to a number.");pe=ke,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return u},set:function(ke){if("number"!=typeof ke)throw new TypeError("End time must be set to a number.");u=ke,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return se},set:function(ke){se=""+ke,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return Fe},set:function(ke){Fe=ke,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return Ve},set:function(ke){var Ne=function _e(ve){return"string"==typeof ve&&!!H[ve.toLowerCase()]&&ve.toLowerCase()}(ke);if(!1===Ne)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");Ve=Ne,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return it},set:function(ke){it=!!ke,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return yt},set:function(ke){if("number"!=typeof ke&&"auto"!==ke)throw new SyntaxError("Line: an invalid number or illegal string was specified.");yt=ke,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return oe},set:function(ke){var Ne=B(ke);Ne?(oe=Ne,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return Le},set:function(ke){if(ke<0||ke>100)throw new Error("Position must be between 0 and 100.");Le=ke,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return me},set:function(ke){var Ne=B(ke);Ne?(me=Ne,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return Oe},set:function(ke){if(ke<0||ke>100)throw new Error("Size must be between 0 and 100.");Oe=ke,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return We},set:function(ke){var Ne=B(ke);if(!Ne)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");We=Ne,this.hasBeenReset=!0}}}),this.displayState=void 0}we.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},He.exports=we},3872:He=>{var Ie={"":!0,up:!0};function X(B){return"number"==typeof B&&B>=0&&B<=100}He.exports=function _e(){var B=100,we=3,ve=0,Q=100,Ce=0,Ee=100,Te="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return B},set:function(pe){if(!X(pe))throw new Error("Width must be between 0 and 100.");B=pe}},lines:{enumerable:!0,get:function(){return we},set:function(pe){if("number"!=typeof pe)throw new TypeError("Lines must be set to a number.");we=pe}},regionAnchorY:{enumerable:!0,get:function(){return Q},set:function(pe){if(!X(pe))throw new Error("RegionAnchorX must be between 0 and 100.");Q=pe}},regionAnchorX:{enumerable:!0,get:function(){return ve},set:function(pe){if(!X(pe))throw new Error("RegionAnchorY must be between 0 and 100.");ve=pe}},viewportAnchorY:{enumerable:!0,get:function(){return Ee},set:function(pe){if(!X(pe))throw new Error("ViewportAnchorY must be between 0 and 100.");Ee=pe}},viewportAnchorX:{enumerable:!0,get:function(){return Ce},set:function(pe){if(!X(pe))throw new Error("ViewportAnchorX must be between 0 and 100.");Ce=pe}},scroll:{enumerable:!0,get:function(){return Te},set:function(pe){var u=function H(B){return"string"==typeof B&&!!Ie[B.toLowerCase()]&&B.toLowerCase()}(pe);!1===u?console.warn("Scroll: an invalid or illegal string was specified."):Te=u}}})}},5893:()=>{},434:He=>{function Ie(){return He.exports=Ie=Object.assign?Object.assign.bind():function(H){for(var X=1;X{l.r(U),l.d(U,{NihongoModule:()=>ha});var c=l(6895),h=l(1390),_=l(4006),H=l(7375),F=l(3170),g=l(6271),r=l(4249),u=l(2777),N=l(210),t=l(4650),f=l(257),y=l(3e3),C=l(2663),k=l(8616),R=l(9530),O=l(3331),m=l(3546);function z(n,i){if(1&n&&(t.TgZ(0,"div",4)(1,"mat-card",5),t._UZ(2,"img",6),t.TgZ(3,"mat-card-content",7)(4,"h3")(5,"b"),t._uU(6),t.qZA()()()()()),2&n){const a=i.$implicit;t.xp6(2),t.MGl("routerLink","/nihongo/",a.url,""),t.Q6J("src",a.image_url,t.LSH),t.xp6(1),t.MGl("routerLink","/nihongo/",a.url,""),t.xp6(3),t.Oqu(a.title)}}let Y=(()=>{class n{constructor(a){this.gs=a,this.nihongoMenu=[{url:"belajar",title:"Pengenalan Aksara",image_url:"/assets/img/nihongo/hirakata.png"},{url:"kanji",title:"Pengayaan Kanji (* JP-EN)",image_url:"/assets/img/nihongo/jlpt.png"}]}ngOnInit(){}}return n.\u0275fac=function(a){return new(a||n)(t.Y36(f.U))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-banner-nihongo"]],decls:4,vars:1,consts:[[1,"row"],[1,"col-12"],[1,"row","px-3"],["class","col-12 col-md-6 p-2",4,"ngFor","ngForOf"],[1,"col-12","col-md-6","p-2"],[1,"gradient-border","rgb-border"],["mat-card-image","",2,"height","128px","object-fit","cover","cursor","pointer",3,"src","routerLink"],[2,"cursor","pointer",3,"routerLink"]],template:function(a,e){1&a&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t.YNc(3,z,7,4,"div",3),t.qZA()()()),2&a&&(t.xp6(3),t.Q6J("ngForOf",e.nihongoMenu))},dependencies:[c.sg,h.rH,m.a8,m.dn,m.G2]}),n})();var G=l(8757),b=l(7392),E=l(8921),P=l(9731),J=l(8381);let D=(()=>{class n{constructor(a,e,o){this.api=a,this.gs=e,this.ss=o}getCurrentQuizRoom(){return this.ss.currentRoom}getCurrentQuizQuestion(a){return this.ss.quizRoom[a]}answerQuestion(a){this.ss.socketEmit("quiz-answer",a)}getQuizLeaderboard(a="",e=1,o=10,s="",d=""){return this.api.getData(`/quiz-leaderboard?q=${a}&page=${e}&row=${o}&sort=${s}&order=${d}`)}}return n.\u0275fac=function(a){return new(a||n)(t.LFG(P.s),t.LFG(f.U),t.LFG(J.R))},n.\u0275prov=t.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();var B=l(4859),S=l(6338);function $(n,i){if(1&n&&(t.TgZ(0,"mat-list-option",12),t._UZ(1,"img",13),t.TgZ(2,"a",14)(3,"span",15),t._uU(4),t.qZA(),t.TgZ(5,"span",16),t._uU(6),t.qZA(),t.TgZ(7,"span",17),t._uU(8),t.qZA()()()),2&n){const a=i.$implicit;t.MGl("routerLink","/user/",a.username,""),t.xp6(1),t.s9C("src",a.image_url,t.LSH),t.xp6(3),t.hij(" ",a.points," "),t.xp6(2),t.Oqu(a.rank),t.xp6(2),t.Oqu(a.username)}}let W=(()=>{class n{constructor(a,e){this.gs=a,this.qs=e,this.leaderboardData=[],this.leaderBoardTotalPages=1,this.leaderboardPage=1,this.subsLeaderboard=null}ngOnInit(){this.gs.isBrowser&&this.getLeaderboard()}ngOnDestroy(){this.subsLeaderboard?.unsubscribe()}getLeaderboard(){this.subsLeaderboard=this.qs.getQuizLeaderboard("",this.leaderboardPage).subscribe({next:a=>{this.gs.log("[LEADERBOARD_LIST_SUCCESS]",a),this.leaderBoardTotalPages=a.pages,this.leaderboardData=a.results},error:a=>{this.gs.log("[LEADERBOARD_LIST_ERROR]",a,"error")}})}prevBoard(){this.leaderboardPage--,this.leaderboardPage<=0&&(this.leaderboardPage=1),this.getLeaderboard()}nextBoard(){this.leaderboardPage++,this.getLeaderboard()}}return n.\u0275fac=function(a){return new(a||n)(t.Y36(f.U),t.Y36(D))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-leaderboard"]],decls:17,vars:8,consts:[[1,"row"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"float-end","text-warning",2,"font-size","small","cursor","pointer",3,"click"],[1,"text-bifeldy"],[1,"col-12"],[3,"multiple"],["class","h-100",3,"routerLink",4,"ngFor","ngForOf"],[1,"col-12","text-end"],["type","button","mat-button","","color","accent",3,"disabled","click"],["fontIcon","navigate_before"],["fontIcon","navigate_next"],[1,"h-100",3,"routerLink"],["matListAvatar","",1,"ms-3",2,"border-radius","0",3,"src"],[1,"text-truncate","text-decoration-none"],[1,"bg-bifeldy","px-2","me-1","text-warning",2,"position","absolute","right","0"],[1,"me-3","text-danger"],[1,"text-success"]],template:function(a,e){1&a&&(t.TgZ(0,"div",0)(1,"div",1)(2,"h2",2)(3,"span",3),t.NdJ("click",function(){return e.getLeaderboard()}),t._uU(4," Refresh "),t.qZA(),t.TgZ(5,"b",4),t._uU(6,"Rank Points"),t.qZA()()(),t.TgZ(7,"div",5)(8,"mat-selection-list",6),t.YNc(9,$,9,5,"mat-list-option",7),t.ALo(10,"slice"),t.qZA(),t.TgZ(11,"div",0)(12,"div",8)(13,"button",9),t.NdJ("click",function(){return e.prevBoard()}),t._UZ(14,"mat-icon",10),t.qZA(),t.TgZ(15,"button",9),t.NdJ("click",function(){return e.nextBoard()}),t._UZ(16,"mat-icon",11),t.qZA()()()()()),2&a&&(t.xp6(8),t.Q6J("multiple",!1),t.xp6(1),t.Q6J("ngForOf",t.Dn7(10,4,e.leaderboardData,0,10)),t.xp6(4),t.Q6J("disabled",e.leaderboardPage<=1),t.xp6(2),t.Q6J("disabled",e.leaderboardPage>=e.leaderBoardTotalPages))},dependencies:[c.sg,B.lW,b.Hw,S.eA,S.Ub,S.vS,h.rH,c.OU]}),n})();function X(n,i){if(1&n&&t._UZ(0,"mat-icon",22),2&n){const a=t.oxw().$implicit;t.Q6J("fontIcon",a.icon)}}function V(n,i){if(1&n&&(t.TgZ(0,"div",15)(1,"mat-card",16)(2,"mat-card-header",17)(3,"div",18),t.YNc(4,X,1,1,"mat-icon",19),t.qZA(),t.TgZ(5,"mat-card-title",20)(6,"h3",21),t._uU(7),t.qZA()(),t.TgZ(8,"mat-card-subtitle",21),t._uU(9),t.qZA()()()()),2&n){const a=i.$implicit;t.xp6(2),t.MGl("routerLink","/nihongo/",a.url,""),t.xp6(1),t.Udp("background-image","url("+(a.image_url||"")+")"),t.xp6(1),t.Q6J("ngIf",a.icon),t.xp6(3),t.Oqu(a.name),t.xp6(2),t.Oqu(a.letter)}}function tt(n,i){if(1&n&&t._UZ(0,"mat-icon",22),2&n){const a=t.oxw().$implicit;t.Q6J("fontIcon",a.icon)}}function at(n,i){if(1&n&&(t.TgZ(0,"div",15)(1,"mat-card")(2,"mat-card-header",17)(3,"div",18),t.YNc(4,tt,1,1,"mat-icon",19),t.qZA(),t.TgZ(5,"mat-card-title",20)(6,"h3",21),t._uU(7),t.qZA()(),t.TgZ(8,"mat-card-subtitle",21),t._uU(9),t.qZA()()()()),2&n){const a=i.$implicit;t.xp6(2),t.MGl("routerLink","/nihongo/",a.url,""),t.xp6(1),t.Udp("background-image","url("+(a.image_url||"")+")"),t.xp6(1),t.Q6J("ngIf",a.icon),t.xp6(3),t.Oqu(a.name),t.xp6(2),t.Oqu(a.letter)}}function nt(n,i){if(1&n&&(t.TgZ(0,"div",3)(1,"div",4)(2,"h2",5)(3,"b",6),t._uU(4,"Latihan Menengah"),t.qZA()()(),t.TgZ(5,"div",7)(6,"div",8),t.YNc(7,at,10,6,"div",9),t.qZA()()()),2&n){const a=t.oxw();t.xp6(7),t.Q6J("ngForOf",a.testMenengah)}}function et(n,i){if(1&n&&t._UZ(0,"mat-icon",22),2&n){const a=t.oxw().$implicit;t.Q6J("fontIcon",a.icon)}}function it(n,i){if(1&n&&(t.TgZ(0,"div",15)(1,"mat-card")(2,"mat-card-header",17)(3,"div",18),t.YNc(4,et,1,1,"mat-icon",19),t.qZA(),t.TgZ(5,"mat-card-title",20)(6,"h3",21),t._uU(7),t.qZA()(),t.TgZ(8,"mat-card-subtitle",21),t._uU(9),t.qZA()()()()),2&n){const a=i.$implicit;t.xp6(1),t.Tol(a.name.startsWith("JLPT")?"rgb-border":"All Kanji"===a.name?"gradient-border rgb-border":""),t.xp6(1),t.MGl("routerLink","/nihongo/",a.url,""),t.xp6(1),t.Udp("background-image","url("+(a.image_url||"")+")"),t.xp6(1),t.Q6J("ngIf",a.icon),t.xp6(3),t.Oqu(a.name),t.xp6(2),t.Oqu(a.letter)}}let ot=(()=>{class n{constructor(a,e,o,s){this.router=a,this.gs=e,this.bs=o,this.nihon=s,this.testDasar=[{url:"hiragana",name:"Hiragana",image_url:"/assets/img/nihongo/hiragana.png",icon:null,letter:"~46 Unik"},{url:"katakana",name:"Katakana",image_url:"/assets/img/nihongo/katakana.png",icon:null,letter:"~46 Unik"},{url:"angka",name:"Angka",image_url:null,icon:"plus_one",letter:"~\u221e Unik"}],this.testMenengah=[],this.testLanjutan=[{url:"kelas-1",name:"Kelas 1",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~80 Unik"},{url:"kelas-2",name:"Kelas 2",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~160 Unik"},{url:"kelas-3",name:"Kelas 3",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~200 Unik"},{url:"kelas-4",name:"Kelas 4",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~200 Unik"},{url:"kelas-5",name:"Kelas 5",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~185 Unik"},{url:"kelas-6",name:"Kelas 6",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~181 Unik"},{url:"kelas-lanjutan-1",name:"Lanjutan 1",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~1139 Unik"},{url:"kelas-lanjutan-2",name:"Lanjutan 2",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~349 Unik"},{url:"jlpt-n5",name:"JLPT N5",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~79 Unik"},{url:"jlpt-n4",name:"JLPT N4",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~166 Unik"},{url:"jlpt-n3",name:"JLPT N3",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~367 Unik"},{url:"jlpt-n2",name:"JLPT N2",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~367 Unik"},{url:"jlpt-n1",name:"JLPT N1",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~1231 Unik"},{url:"semua-kanji",name:"All Kanji",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~2494 Unik"}],this.tabData=[{name:"JLPT Roadmap",icon:"pin_drop",type:"html",data:'\n
\n \n \n
\n

Sumber gambar dan informasi: KawaKawa

\n

\u201cJLPT\u201d adalah singkatan dari Japanese-Language Proficiency Test (Tes Kemampuan Bahasa Jepang). JLPT adalah salah satu ujian kecakapan bahasa Jepang internasional yang paling terkenal. Ini memiliki lima level, dengan level lima (secara resmi disebut N5) menjadi yang termudah dan level satu (N1) menjadi yang paling sulit.

\n

JLPT dulu memiliki empat level tetapi sekarang dibagi menjadi lima (N5, N4, N3, N2, dan N1). Level mana yang ingin diambil dibebaskan untuk memilih. Contoh pertanyaan dapat diakses pada halaman New Japanese-Language Proficiency Test Sample Questions.

\n
    \n
  • Untuk lulus N5, perlu mengetahui sekitar 100 kanji dan sekitar 800 kosakata.
  • \n
  • Untuk lulus N4, perlu mengetahui sekitar 300 kanji dan sekitar 1.500 kosakata.
  • \n
  • Untuk lulus N3, perlu mengetahui sekitar 650 kanji dan sekitar 3.700 kosakata.
  • \n
  • Untuk lulus N2, perlu mengetahui sekitar 1.000 kanji dan sekitar 6.000 kosakata.
  • \n
  • Untuk lulus N1, perlu mengetahui sekitar 2.000 kanji dan sekitar 10.000 kosakata.
  • \n
\n

Untuk informasi skoring & penilaian dapat dilihat pada Scoring Sections, Pass or Fail, Score Report.

\n

N5 dan N4 adalah level termudah untuk diselesaikan dalam tes tetapi jika ingin menyelesaikan level yang lebih tinggi seperti N3, N2 dan N1 maka harus menghadiri pusat pembinaan di mana mereka menyediakan bahan pelajaran yang baik dan memiliki pelatih berpengalaman akan membantu belajar bahasa jepang dengan mudah.

\n

Informasi lebih lanjut, silahkan kunjungi https://www.jlpt.jp/e/index.html.

\n '}],this.count=0,this.page=1,this.row=10,this.q="",this.sort="",this.order="",this.subsAllKategori=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}ngOnInit(){this.gs.isBrowser&&this.getKategori()}ngOnDestroy(){this.subsAllKategori?.unsubscribe()}getKategori(){this.bs.busy(),this.subsAllKategori=this.nihon.getAllKategori().subscribe({next:a=>{this.gs.log("[BELAJAR_KANA_KATEGORI_SUCCESS]",a);const e=[];for(const o of a.results)e.push({url:`latihan-${o.id}`,name:o.name,image_url:null,icon:"switch_access_shortcut",letter:`~${o.jumlah} Unik`});this.testMenengah=e,this.bs.idle()},error:a=>{this.gs.log("[BELAJAR_KANA_KATEGORI_ERROR]",a,"error"),this.bs.idle()}})}getBook(){}openModule(a){this.gs.log("[NIHONGO_CLICK_MODUL]",a),this.router.navigateByUrl(`/nihongo/${a.id}`)}onPaginatorClicked(a){this.gs.log("[NIHONGO_CLICK_PAGINATOR]",a),this.page=a.pageIndex+1,this.row=a.pageSize,this.getBook()}onServerSideFilter(a){this.gs.log("[NIHONGO_ENTER_FILTER]",a),this.q=a,this.getBook()}onServerSideOrder(a){this.gs.log("[NIHONGO_CLICK_ORDER]",a),this.q=a.q,this.sort=a.active,this.order=a.direction,this.getBook()}}return n.\u0275fac=function(a){return new(a||n)(t.Y36(h.F0),t.Y36(f.U),t.Y36(y.z),t.Y36(C.a))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-nihongo-list"]],decls:38,vars:6,consts:[[1,"container"],[1,"row","pb-3","px-0"],[1,"col-lg-8","col-xl-9"],[1,"row"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"col-12"],[1,"row","px-3"],["class","col-12 col-sm-6 col-md-4 col-lg-6 col-xl-3 p-2",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],[1,"row","mt-3"],[3,"tabData","count","serverSide","tableRowClicked","paginatorClicked","serverSideFilter","serverSideOrder"],[1,"col-lg-4","col-xl-3"],[1,"row","sticky-top"],[1,"col-12","col-sm-6","col-md-4","col-lg-6","col-xl-3","p-2"],[1,"gradient-border"],[1,"me-0",2,"cursor","pointer",3,"routerLink"],["mat-card-avatar","",2,"background-size","cover","background-color","whitesmoke","border-radius","0"],["style","font-size: 300%; color: black",3,"fontIcon",4,"ngIf"],[1,"text-warning","mb-1",2,"cursor","pointer"],[1,"mb-0"],[2,"font-size","300%","color","black",3,"fontIcon"]],template:function(a,e){1&a&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4)(6,"h2",5)(7,"b",6),t._uU(8,"Belajar Bahasa Jepang"),t.qZA()()(),t.TgZ(9,"div",7),t._UZ(10,"app-banner-nihongo"),t.qZA()(),t.TgZ(11,"div",3)(12,"div",4)(13,"h2",5)(14,"b",6),t._uU(15,"Latihan Dasar"),t.qZA()()(),t.TgZ(16,"div",7)(17,"div",8),t.YNc(18,V,10,6,"div",9),t.qZA()()(),t.YNc(19,nt,8,1,"div",10),t.TgZ(20,"div",3)(21,"div",4)(22,"h2",5)(23,"b",6),t._uU(24,"Latihan Lanjutan"),t.qZA()()(),t.TgZ(25,"div",7)(26,"div",8),t.YNc(27,it,10,9,"div",9),t.qZA()()(),t.TgZ(28,"div",11)(29,"div",7)(30,"app-material-tab",12),t.NdJ("tableRowClicked",function(s){return e.openModule(s)})("paginatorClicked",function(s){return e.onPaginatorClicked(s)})("serverSideFilter",function(s){return e.onServerSideFilter(s)})("serverSideOrder",function(s){return e.onServerSideOrder(s)}),t.qZA()()()(),t.TgZ(31,"div",13)(32,"div",14)(33,"div",7),t._UZ(34,"app-leaderboard")(35,"app-banner-donasi")(36,"app-banner-discord")(37,"app-stats-server"),t.qZA()()()()()),2&a&&(t.xp6(18),t.Q6J("ngForOf",e.testDasar),t.xp6(1),t.Q6J("ngIf",e.testMenengah.length>0),t.xp6(8),t.Q6J("ngForOf",e.testLanjutan),t.xp6(3),t.Q6J("tabData",e.tabData)("count",e.count)("serverSide",!0))},dependencies:[c.sg,c.O5,h.rH,k.t,R.u,O.B,Y,G.H,m.a8,m.dk,m.n5,m.$j,m.kc,b.Hw,E.X,W]}),n})();var T=l(8739),L=l(6925),rt=l(4137),j=l(7845),Z=l(3238),v=l(9549),w=l(4144),I=l(4385),q=l(266),st=l(578),K=l(201),M=l(192);function lt(n,i){if(1&n&&(t.TgZ(0,"mat-option",20),t._uU(1),t.qZA()),2&n){const a=i.$implicit;t.s9C("value",a.id),t.xp6(1),t.Oqu(a.name)}}function ct(n,i){if(1&n){const a=t.EpF();t.TgZ(0,"mat-form-field",21)(1,"mat-label"),t._uU(2,"Cari ..."),t.qZA(),t.TgZ(3,"input",22),t.NdJ("keyup.enter",function(o){t.CHM(a);const s=t.oxw();return t.KtG(s.applyFilter(o))})("ngModelChange",function(o){t.CHM(a);const s=t.oxw();return t.KtG(s.q=o)}),t.qZA(),t._UZ(4,"mat-icon",23),t.qZA()}if(2&n){const a=t.oxw();t.Q6J("color","accent"),t.xp6(3),t.Q6J("ngModel",a.q)}}function gt(n,i){1&n&&t.GkF(0)}function ut(n,i){if(1&n){const a=t.EpF();t.TgZ(0,"img",32),t.NdJ("click",function(){t.CHM(a);const o=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.openDmak(o))}),t.qZA()}if(2&n){const a=t.oxw().$implicit,e=t.oxw(3);t.hYB("src","/assets/",e.modeTampilan,"/",a.romaji,".png",t.LSH)}}function pt(n,i){if(1&n&&(t.TgZ(0,"div",30),t.YNc(1,ut,1,2,"img",31),t.qZA()),2&n){const a=i.$implicit;t.xp6(1),t.Q6J("ngIf",a.hiragana&&a.katakana)}}function mt(n,i){if(1&n&&(t.TgZ(0,"div",28),t.YNc(1,pt,2,1,"div",29),t.qZA()),2&n){const a=i.$implicit;t.xp6(1),t.Q6J("ngForOf",a.value)}}function dt(n,i){if(1&n){const a=t.EpF();t.TgZ(0,"img",32),t.NdJ("click",function(){t.CHM(a);const o=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.openDmak(o))}),t.qZA()}if(2&n){const a=t.oxw().$implicit,e=t.oxw(3);t.hYB("src","/assets/",e.modeTampilan,"/",a.romaji,".png",t.LSH)}}function ht(n,i){if(1&n&&(t.TgZ(0,"div",30),t.YNc(1,dt,1,2,"img",31),t.qZA()),2&n){const a=i.$implicit;t.xp6(1),t.Q6J("ngIf",a.hiragana&&a.katakana)}}function _t(n,i){if(1&n&&(t.TgZ(0,"div",28),t.YNc(1,ht,2,1,"div",29),t.qZA()),2&n){const a=i.$implicit;t.xp6(1),t.Q6J("ngForOf",a.value)}}function ft(n,i){if(1&n){const a=t.EpF();t.TgZ(0,"img",32),t.NdJ("click",function(){t.CHM(a);const o=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.openDmak(o))}),t.qZA()}if(2&n){const a=t.oxw().$implicit,e=t.oxw(3);t.hYB("src","/assets/",e.modeTampilan,"/",a.romaji,".png",t.LSH)}}function vt(n,i){if(1&n&&(t.TgZ(0,"div",30),t.YNc(1,ft,1,2,"img",31),t.qZA()),2&n){const a=i.$implicit;t.xp6(1),t.Q6J("ngIf",a.hiragana&&a.katakana)}}function kt(n,i){if(1&n&&(t.TgZ(0,"div",28),t.YNc(1,vt,2,1,"div",29),t.qZA()),2&n){const a=i.$implicit;t.xp6(1),t.Q6J("ngForOf",a.value)}}function bt(n,i){if(1&n){const a=t.EpF();t.TgZ(0,"img",32),t.NdJ("click",function(){t.CHM(a);const o=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.openDmak(o))}),t.qZA()}if(2&n){const a=t.oxw().$implicit,e=t.oxw(3);t.hYB("src","/assets/",e.modeTampilan,"/",a.romaji,".png",t.LSH)}}function Tt(n,i){if(1&n&&(t.TgZ(0,"div",30),t.YNc(1,bt,1,2,"img",31),t.qZA()),2&n){const a=i.$implicit;t.xp6(1),t.Q6J("ngIf",a.hiragana&&a.katakana)}}function At(n,i){if(1&n&&(t.TgZ(0,"div",28),t.YNc(1,Tt,2,1,"div",29),t.qZA()),2&n){const a=i.$implicit;t.xp6(1),t.Q6J("ngForOf",a.value)}}function xt(n,i){if(1&n){const a=t.EpF();t.TgZ(0,"img",32),t.NdJ("click",function(){t.CHM(a);const o=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.openDmak(o))}),t.qZA()}if(2&n){const a=t.oxw().$implicit,e=t.oxw(3);t.hYB("src","/assets/",e.modeTampilan,"/",a.romaji,".png",t.LSH)}}function Nt(n,i){if(1&n&&(t.TgZ(0,"div",30),t.YNc(1,xt,1,2,"img",31),t.qZA()),2&n){const a=i.$implicit;t.xp6(1),t.Q6J("ngIf",a.hiragana&&a.katakana)}}function yt(n,i){if(1&n&&(t.TgZ(0,"div",28),t.YNc(1,Nt,2,1,"div",29),t.qZA()),2&n){const a=i.$implicit;t.xp6(1),t.Q6J("ngForOf",a.value)}}function Ct(n,i){if(1&n&&(t.TgZ(0,"div",17)(1,"div",3)(2,"div",24)(3,"div",3)(4,"div",17)(5,"h2",25)(6,"b",26),t._uU(7,"Standar"),t.qZA()()(),t.TgZ(8,"div",17),t.YNc(9,mt,2,1,"div",27),t.ALo(10,"keyvalue"),t.qZA()(),t.TgZ(11,"div",3)(12,"div",17)(13,"h2",25)(14,"b",26),t._uU(15,"Lainnya"),t.qZA()()(),t.TgZ(16,"div",17),t.YNc(17,_t,2,1,"div",27),t.ALo(18,"keyvalue"),t.qZA()()(),t.TgZ(19,"div",24)(20,"div",3)(21,"div",17)(22,"h2",25)(23,"b",26),t._uU(24,"Dakuon"),t.qZA()()(),t.TgZ(25,"div",17),t.YNc(26,kt,2,1,"div",27),t.ALo(27,"keyvalue"),t.qZA()(),t.TgZ(28,"div",3)(29,"div",17)(30,"h2",25)(31,"b",26),t._uU(32,"Handakuon"),t.qZA()()(),t.TgZ(33,"div",17),t.YNc(34,At,2,1,"div",27),t.ALo(35,"keyvalue"),t.qZA()(),t.TgZ(36,"div",3)(37,"div",17)(38,"h2",25)(39,"b",26),t._uU(40,"Yuon"),t.qZA()()(),t.TgZ(41,"div",17),t.YNc(42,yt,2,1,"div",27),t.ALo(43,"keyvalue"),t.qZA()()()()()),2&n){const a=t.oxw();t.xp6(9),t.Q6J("ngForOf",t.lcZ(10,5,a.daftarHuruf.standard)),t.xp6(8),t.Q6J("ngForOf",t.lcZ(18,7,a.daftarHuruf.other)),t.xp6(9),t.Q6J("ngForOf",t.lcZ(27,9,a.daftarHuruf.dakuon)),t.xp6(8),t.Q6J("ngForOf",t.lcZ(35,11,a.daftarHuruf.handakuon)),t.xp6(8),t.Q6J("ngForOf",t.lcZ(43,13,a.daftarHuruf.yuon))}}function St(n,i){1&n&&t.GkF(0)}function jt(n,i){if(1&n&&(t.TgZ(0,"div",35),t._UZ(1,"app-material-table",36),t.qZA()),2&n){const a=t.oxw(2);t.xp6(1),t.Q6J("tableDataColumn",a.daftarAngka.column)("tableDataRow",a.daftarAngka.row)}}function Zt(n,i){if(1&n){const a=t.EpF();t.TgZ(0,"div",40)(1,"mat-card",41),t.NdJ("click",function(){const s=t.CHM(a).$implicit,d=t.oxw(4);return t.KtG(d.editDataset(s))}),t.TgZ(2,"mat-card-header",42),t._UZ(3,"div",43),t.TgZ(4,"mat-card-title",44)(5,"h3",45),t._uU(6),t.qZA()(),t.TgZ(7,"mat-card-subtitle",46)(8,"p",47),t._uU(9),t.qZA(),t.TgZ(10,"p",48),t._uU(11),t.qZA()()()()()}if(2&n){const a=i.$implicit;t.xp6(3),t.Udp("background-image","url("+a.image_url+")"),t.xp6(3),t.Oqu(a.kana),t.xp6(3),t.Oqu(a.romaji),t.xp6(2),t.Oqu(a.meaning)}}function Ut(n,i){if(1&n&&(t.TgZ(0,"div",17)(1,"div",38),t.YNc(2,Zt,12,5,"div",39),t.qZA()()),2&n){const a=t.oxw(3);t.xp6(2),t.Q6J("ngForOf",a.daftarNihongo)}}function Rt(n,i){if(1&n&&t.YNc(0,Ut,3,1,"div",37),2&n){const a=t.oxw(2),e=t.MAs(27);t.Q6J("ngIf",a.daftarNihongo.length>0)("ngIfElse",e)}}function Ot(n,i){if(1&n&&(t.YNc(0,St,1,0,"ng-container",10),t.YNc(1,jt,2,2,"ng-template",null,33,t.W1O),t.YNc(3,Rt,1,2,"ng-template",null,34,t.W1O)),2&n){const a=t.MAs(2),e=t.MAs(4),o=t.oxw();t.Q6J("ngIf","angka"===o.modeTampilan)("ngIfThen",a)("ngIfElse",e)}}function Et(n,i){1&n&&t._UZ(0,"app-no-data",49)}function Jt(n,i){if(1&n){const a=t.EpF();t.TgZ(0,"button",50),t.NdJ("click",function(){t.CHM(a);const o=t.oxw();return t.KtG(o.addDataset())}),t._UZ(1,"mat-icon",51),t.qZA()}}let Dt=(()=>{class n{constructor(a,e,o,s,d,A,x){this.router=a,this.toast=e,this.as=o,this.gs=s,this.bs=d,this.ds=A,this.nihon=x,this.pageSizeOptions=[50,75,100,125,150],this.kategori=[{id:"hiragana",name:"Hiragana"},{id:"katakana",name:"Katakana"},{id:"angka",name:"Angka"}],this.modeTampilan="hiragana",this.daftarHuruf=null,this.daftarNihongo=[],this.daftarAngka={column:["Angka","Kana","Romaji"],row:[]},this.count=0,this.page=1,this.row=50,this.q="",this.subsDialog=null,this.subsHirakata=null,this.subsAllNihongo=null,this.subsAllKategori=null,this.dummyDataset=[{category:"number",meaning:0,kana:"\u96f6\uff0f\u30bc\u30ed",romaji:"Rei/Zero"},{category:"number",meaning:1,kana:"\u4e00",romaji:"Ichi"},{category:"number",meaning:2,kana:"\u4e8c",romaji:"Ni"},{category:"number",meaning:3,kana:"\u4e09",romaji:"San"},{category:"number",meaning:4,kana:"\u56db",romaji:"Yon/Shi"},{category:"number",meaning:5,kana:"\u4e94",romaji:"Go"},{category:"number",meaning:6,kana:"\u516d",romaji:"Roku"},{category:"number",meaning:7,kana:"\u4e03",romaji:"Nana"},{category:"number",meaning:8,kana:"\u516b",romaji:"Hachi"},{category:"number",meaning:9,kana:"\u4e5d",romaji:"Kyuu/Ku"},{category:"number",meaning:10,kana:"\u5341",romaji:"Jyuu"},{category:"number",meaning:11,kana:"\u5341\u4e00",romaji:"Jyuu Ichi"},{category:"number",meaning:12,kana:"\u5341\u4e8c",romaji:"Jyuu Ni"},{category:"number",meaning:20,kana:"\u4e8c\u5341",romaji:"Ni Jyuu"},{category:"number",meaning:21,kana:"\u4e8c\u5341\u4e00",romaji:"Ni Jyuu Ichi"},{category:"number",meaning:30,kana:"\u4e09\u5341",romaji:"San Jyuu"},{category:"number",meaning:100,kana:"\u767e",romaji:"Hyaku"},{category:"number",meaning:101,kana:"\u767e\u4e00",romaji:"Hyaku Ichi"},{category:"number",meaning:123,kana:"\u767e\u4e8c\u5341\u4e09",romaji:"Hyaku Ni Jyuu San"},{category:"number",meaning:300,kana:"\u4e09\u767e",romaji:"San Byaku"},{category:"number",meaning:600,kana:"\u516d\u767e",romaji:"Roppyaku"},{category:"number",meaning:800,kana:"\u516b\u767e",romaji:"Happyaku"},{category:"number",meaning:1e3,kana:"\u5343",romaji:"Sen"},{category:"number",meaning:3e3,kana:"\u4e09\u5343",romaji:"San Zen"},{category:"number",meaning:8e3,kana:"\u516b\u5343",romaji:"Hassen"},{category:"number",meaning:1e4,kana:"\u4e00\u4e07",romaji:"Ichi-Man"},{category:"number",meaning:1e5,kana:"\u5341\u4e07",romaji:"Jyuu-Man"},{category:"number",meaning:1e6,kana:"\u767e\u4e07",romaji:"Hyaku-Man"}],this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}ngOnInit(){this.gs.isBrowser&&(this.getHirakata(),this.getAngka(),this.getKategori(),this.gs.isDarkMode||this.gs.toggleDarkTheme())}ngOnDestroy(){this.subsDialog?.unsubscribe(),this.subsHirakata?.unsubscribe(),this.subsAllNihongo?.unsubscribe(),this.subsAllKategori?.unsubscribe()}changeModeTampilan(a){this.gs.log("[BELAJAR_CHANGE_KANA]",a),this.modeTampilan=a,this.count=0,this.page=1,this.row=50,this.q="",this.resetPaginator()}applyFilter(a){this.gs.log("[BELAJAR_SEARCH_VALUE_CHANGED]",a),this.q=a.target.value.trim().toLowerCase(),this.resetPaginator()}paginatorChanged(a){this.gs.log("[BELAJAR_PAGINATOR_VALUE_CHANGED]",a),this.page=a.pageIndex+1,this.row=a.pageSize,this.gs.includesOneOf(this.modeTampilan,["hiragana","katakana","angka"])||(this.daftarNihongo=[],this.getData())}resetPaginator(){this.paginator?._changePageSize(this.pageSizeOptions[0]),this.paginator?.firstPage()}openDmak(a){this.gs.log("[BELAJAR_OPEN_DMAK]",a),this.subsDialog=this.ds.openDmakDialog({data:{romaji:a.romaji,hiragana_katakana_kanji:"hiragana"===this.modeTampilan?a.hiragana:a.katakana},disableClose:!1}).afterClosed().subscribe({next:e=>{this.gs.log("[BELAJAR_DMAK_DIALOG_CLOSED]",e),this.subsDialog.unsubscribe()}})}getHirakata(){this.bs.busy(),this.subsHirakata=this.nihon.getHirakata().subscribe({next:a=>{this.gs.log("[BELAJAR_HIRAKATA_SUCCESS]",a);const e={};for(const o of a.results)e[o.category]||(e[o.category]={}),e[o.category][o.segment]||(e[o.category][o.segment]=[]),e[o.category][o.segment].push({romaji:o.romaji,hiragana:o.hiragana,katakana:o.katakana});this.daftarHuruf=e,this.bs.idle()},error:a=>{this.gs.log("[BELAJAR_HIRAKATA_ERROR]",a,"error"),this.bs.idle()}})}getAngka(){const a=[];for(const e of this.dummyDataset)a.push({Angka:e.meaning,Kana:e.kana,Romaji:e.romaji});this.daftarAngka.row=a}getKategori(){this.bs.busy(),this.subsAllKategori=this.nihon.getAllKategori().subscribe({next:a=>{this.gs.log("[BELAJAR_KANA_KATEGORI_SUCCESS]",a),this.kategori=[...this.kategori,...a.results],this.bs.idle()},error:a=>{this.gs.log("[BELAJAR_KANA_KATEGORI_ERROR]",a,"error"),this.bs.idle()}})}getData(){this.bs.busy(),this.subsAllNihongo=this.nihon.getAllNihongo(this.modeTampilan,this.q,this.page,this.row).subscribe({next:a=>{this.gs.log("[BELAJAR_KANA_LIST_SUCCESS]",a),this.count=a.count,this.daftarNihongo=a.results,this.bs.idle()},error:a=>{this.gs.log("[BELAJAR_KANA_LIST_ERROR]",a,"error"),this.bs.idle()}})}editDataset(a){this.gs.log("[BELAJAR_DATASET_ADD_OR_EDIT_CLICK]",a),(!a&&this.as.currentUserSubject?.value?.verified||a&&(this.as.currentUserSubject?.value?.role===r.yS.ADMIN||this.as.currentUserSubject?.value?.role===r.yS.MODERATOR))&&(this.subsDialog=this.ds.openBelajarDialog({data:{title:a?"Edit Data":"Tambah Dataset",modeTampilan:this.modeTampilan,dataset:a,confirmText:"Simpan",cancelText:"Tutup"}}).afterClosed().subscribe({next:e=>{this.gs.log("[BELAJAR_DATASET_DIALOG_CLOSED]",e),this.getData(),this.subsDialog.unsubscribe()}}))}addDataset(){this.as.currentUserSubject?.value?this.as.currentUserSubject?.value?.verified?this.editDataset(null):(this.toast.warning("Khusus Pengguna Terverifikasi","Whoops!",null,!0),this.router.navigate(["/verify"],{queryParams:{returnUrl:this.router.url.split("?")[0]}})):this.router.navigate(["/login"],{queryParams:{returnUrl:"/nihongo/belajar"}})}}return n.\u0275fac=function(a){return new(a||n)(t.Y36(h.F0),t.Y36(L.k),t.Y36(rt.e),t.Y36(f.U),t.Y36(y.z),t.Y36(j.x),t.Y36(C.a))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-belajar"]],viewQuery:function(a,e){if(1&a&&t.Gf(T.NW,7),2&a){let o;t.iGM(o=t.CRH())&&(e.paginator=o.first)}},decls:29,vars:13,consts:[[1,"container"],[1,"row","pb-3","px-0"],[1,"col-lg-8","col-xl-9"],[1,"row"],[1,"col-12","sticky-top","bg-bifeldy","pb-3"],[1,"m-0","border-bottom","border-primary","row"],[1,"pt-3","col-6","col-lg-4",3,"color"],[3,"value","valueChange"],[3,"value",4,"ngFor","ngForOf"],["class","ms-auto pt-3 col-6 col-lg-4",3,"color",4,"ngIf"],[4,"ngIf","ngIfThen","ngIfElse"],["hirakata",""],["kataBendaLainnya",""],[1,"position-sticky","bottom-0"],["showFirstLastButtons","",1,"bg-bifeldy",3,"color","length","pageSizeOptions","page"],[1,"col-lg-4","col-xl-3"],[1,"row","sticky-top"],[1,"col-12"],["noData",""],["type","button","mat-fab","","color","warn","class","me-3 mb-5 fab-button animate__animated animate__bounce animate__infinite animate__slow","matTooltip","Tambah Dataset","style","position: fixed; bottom: 0; right: 0; z-index: 999999;",3,"click",4,"ngIf"],[3,"value"],[1,"ms-auto","pt-3","col-6","col-lg-4",3,"color"],["matInput","","maxlength","200","placeholder","Ex. \u81ea\u8ee2\u8eca\u3001\u30de\u30de\u30c1\u30e3\u30ea",3,"ngModel","keyup.enter","ngModelChange"],["fontIcon","search","matSuffix",""],[1,"col-12","col-md-6"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],["class","row text-center px-3",4,"ngFor","ngForOf"],[1,"row","text-center","px-3"],["class","col p-1",4,"ngFor","ngForOf"],[1,"col","p-1"],["class","rounded img-thumbnail","style","cursor: pointer;",3,"src","click",4,"ngIf"],[1,"rounded","img-thumbnail",2,"cursor","pointer",3,"src","click"],["angka",""],["selainAngka",""],[1,"p-3"],[3,"tableDataColumn","tableDataRow"],["class","col-12",4,"ngIf","ngIfElse"],["appDomChange","",1,"row","px-3"],["class","col-12 col-md-6 col-lg-4 col-xl-3 p-2",4,"ngFor","ngForOf"],[1,"col-12","col-md-6","col-lg-4","col-xl-3","p-2"],[1,"card",3,"click"],[1,"me-0",2,"cursor","pointer"],["mat-card-avatar","",2,"background-size","contain","border-radius","0","background-position","center","background-repeat","no-repeat"],[1,"text-warning","mb-1",2,"cursor","pointer"],["matLine","",1,"mb-0"],[1,"mb-0"],["matLine","",1,"m-0","text-success"],["matLine","",1,"m-0"],[1,"col-12","p-3"],["type","button","mat-fab","","color","warn","matTooltip","Tambah Dataset",1,"me-3","mb-5","fab-button","animate__animated","animate__bounce","animate__infinite","animate__slow",2,"position","fixed","bottom","0","right","0","z-index","999999",3,"click"],["fontIcon","add"]],template:function(a,e){if(1&a&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4)(6,"h3",5)(7,"mat-form-field",6)(8,"mat-label"),t._uU(9,"Pilih Kategori"),t.qZA(),t.TgZ(10,"mat-select",7),t.NdJ("valueChange",function(s){return e.modeTampilan=s})("valueChange",function(s){return e.changeModeTampilan(s)}),t.YNc(11,lt,2,2,"mat-option",8),t.qZA()(),t.YNc(12,ct,5,2,"mat-form-field",9),t.qZA()(),t.YNc(13,gt,1,0,"ng-container",10),t.YNc(14,Ct,44,15,"ng-template",null,11,t.W1O),t.YNc(16,Ot,5,3,"ng-template",null,12,t.W1O),t.qZA(),t.TgZ(18,"div",13)(19,"mat-paginator",14),t.NdJ("page",function(s){return e.paginatorChanged(s)}),t.qZA()()(),t.TgZ(20,"div",15)(21,"div",16)(22,"div",17),t._UZ(23,"app-banner-donasi")(24,"app-banner-discord")(25,"app-stats-server"),t.qZA()()()()(),t.YNc(26,Et,1,0,"ng-template",null,18,t.W1O),t.YNc(28,Jt,2,0,"button",19)),2&a){const o=t.MAs(15),s=t.MAs(17);t.xp6(7),t.Q6J("color","accent"),t.xp6(3),t.Q6J("value",e.modeTampilan),t.xp6(1),t.Q6J("ngForOf",e.kategori),t.xp6(1),t.Q6J("ngIf","hiragana"!==e.modeTampilan&&"katakana"!==e.modeTampilan&&"angka"!==e.modeTampilan),t.xp6(1),t.Q6J("ngIf",("hiragana"===e.modeTampilan||"katakana"===e.modeTampilan)&&e.daftarHuruf)("ngIfThen",o)("ngIfElse",s),t.xp6(5),t.Udp("display","hiragana"!==e.modeTampilan&&"katakana"!==e.modeTampilan&&"angka"!==e.modeTampilan?"block":"none"),t.xp6(1),t.Q6J("color","accent")("length",e.count)("pageSizeOptions",e.pageSizeOptions),t.xp6(9),t.Q6J("ngIf","hiragana"!==e.modeTampilan&&"katakana"!==e.modeTampilan&&"angka"!==e.modeTampilan)}},dependencies:[c.sg,c.O5,_.Fj,_.JJ,_.nD,_.On,k.t,R.u,O.B,Z.ey,B.lW,m.a8,m.dk,m.n5,m.$j,m.kc,Z.X2,b.Hw,v.KE,v.hX,v.R9,w.Nt,T.NW,I.gD,q.gM,E.X,st.I,K.S,M.d,c.Nd]}),n})();function Bt(n,i){if(1&n&&(t.TgZ(0,"mat-option",17),t._uU(1),t.qZA()),2&n){const a=i.$implicit;t.s9C("value",a),t.xp6(1),t.hij("N",a,"")}}function Lt(n,i){if(1&n&&(t.TgZ(0,"mat-option",17),t._uU(1),t.qZA()),2&n){const a=i.$implicit;t.s9C("value",a),t.xp6(1),t.hij("Kelas ",a,"")}}function wt(n,i){1&n&&t._UZ(0,"app-no-data",18)}function It(n,i){if(1&n){const a=t.EpF();t.TgZ(0,"div",21)(1,"div",22),t.NdJ("click",function(){const s=t.CHM(a).$implicit,d=t.oxw(2);return t.KtG(d.openEdict(s))}),t.TgZ(2,"div",23)(3,"h5",24),t._uU(4),t.qZA(),t.TgZ(5,"div"),t._uU(6),t.qZA()(),t.TgZ(7,"div",25)(8,"span",26),t._uU(9),t.qZA(),t.TgZ(10,"span"),t._uU(11," - "),t.qZA(),t.TgZ(12,"span",27),t._uU(13),t.qZA()()()()}if(2&n){const a=i.$implicit;t.xp6(4),t.Oqu(a.character),t.xp6(2),t.Oqu(a.translate),t.xp6(3),t.hij("N",a.jlpt,""),t.xp6(4),t.hij("S",a.school,"")}}function qt(n,i){if(1&n&&(t.TgZ(0,"div",11)(1,"div",19),t.YNc(2,It,14,4,"div",20),t.qZA()()),2&n){const a=t.oxw();t.xp6(2),t.Q6J("ngForOf",a.kanjiData)}}const Kt=function(){return[5,4,3,2,1]},Mt=function(){return[1,2,3,4,5,6,7,8,9]};let Qt=(()=>{class n{constructor(a,e,o,s){this.gs=a,this.bs=e,this.nihon=o,this.ds=s,this.pageSizeOptions=[50,75,100,125,150],this.jlpt="",this.school="",this.count=0,this.page=1,this.row=50,this.q="",this.sort="",this.order="",this.kanjiData=[],this.subsKanji=null,this.subsDialog=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}ngOnInit(){this.gs.isBrowser&&(this.getKanji(),this.gs.isDarkMode||this.gs.toggleDarkTheme())}ngOnDestroy(){this.subsKanji?.unsubscribe(),this.subsDialog?.unsubscribe()}changeJlpt(a){this.gs.log("[JLPT_CHANGED]",a),this.jlpt=a,this.resetPaginator()}changeSchool(a){this.gs.log("[SCHOOL_CHANGED]",a),this.school=a,this.resetPaginator()}applyFilter(a){this.gs.log("[SEARCH_VALUE_CHANGED]",a),this.q=a.target.value.trim().toLowerCase(),this.resetPaginator()}paginatorChanged(a){this.gs.log("[PAGINATOR_VALUE_CHANGED]",a),this.page=a.pageIndex+1,this.row=a.pageSize,this.getKanji()}resetPaginator(){this.paginator._changePageSize(this.pageSizeOptions[0]),this.paginator.firstPage()}getKanji(){this.bs.busy(),this.subsKanji&&(this.subsKanji.unsubscribe(),this.bs.idle()),this.subsKanji=this.nihon.getAllKanji(this.jlpt,this.school,this.q,this.page,this.row,"context","asc").subscribe({next:a=>{this.gs.log("[KANJI_LIST_SUCCESS]",a),this.count=a.count,this.kanjiData=a.results,this.bs.idle()},error:a=>{this.gs.log("[KANJI_LIST_ERROR]",a,"error"),this.bs.idle()}})}openEdict(a){this.gs.log("[HIRAKATA_OPEN_EDICT]",a),this.subsDialog=this.ds.openEdictDialog({data:{character:a.character,context:a.context,freq:a.freq,gakken:a.gakken,harlpern_kkld:a.harlpern_kkld,harlpern_njecd:a.harlpern_njecd,jlpt:a.jlpt,maniette:a.maniette,nelson_c:a.nelson_c,nelson_n:a.nelson_n,remember:a.remember,school:a.school,skip:a.skip,stroke:a.stroke,translate:a.translate,v_kunyomi:a.v_kunyomi,v_onyomi:a.v_onyomi},disableClose:!1}).afterClosed().subscribe({next:e=>{this.gs.log("[EDICT_DIALOG_CLOSED]",e),this.subsDialog.unsubscribe()}})}}return n.\u0275fac=function(a){return new(a||n)(t.Y36(f.U),t.Y36(y.z),t.Y36(C.a),t.Y36(j.x))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-kanji"]],viewQuery:function(a,e){if(1&a&&t.Gf(T.NW,7),2&a){let o;t.iGM(o=t.CRH())&&(e.paginator=o.first)}},decls:30,vars:15,consts:[[1,"container"],[1,"row","pb-3","px-0"],[1,"col-12","sticky-top","bg-bifeldy","pb-3"],[1,"m-0","border-bottom","border-primary","row"],[1,"pt-3","col-4","col-lg-2",3,"color"],[3,"value","valueChange"],["value",""],[3,"value",4,"ngFor","ngForOf"],[1,"ms-auto","pt-3","col-4","col-lg-4",3,"color"],["matInput","","maxlength","200","placeholder","Ex. \u79c1",3,"ngModel","keyup.enter","ngModelChange"],["fontIcon","search","matSuffix",""],[1,"col-12"],[1,"row"],["class","col-12 p-3",4,"ngIf"],["class","col-12",4,"ngIf"],[1,"container","position-sticky","bottom-0"],["showFirstLastButtons","",1,"bg-bifeldy",3,"color","length","pageSizeOptions","page"],[3,"value"],[1,"col-12","p-3"],["appDomChange","",1,"row","px-3"],["class","col-6 col-md-3 col-lg-2 p-2",4,"ngFor","ngForOf"],[1,"col-6","col-md-3","col-lg-2","p-2"],[1,"card","text-center","p-3",2,"cursor","pointer",3,"click"],[1,"card-body","p-0"],[1,"card-title","py-3",2,"font-size","300%"],[1,"position-absolute","top-0","end-0",2,"margin-right","3px","font-size","x-small"],[1,"text-warning"],[1,"text-info"]],template:function(a,e){1&a&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1)(3,"div",2)(4,"h3",3)(5,"mat-form-field",4)(6,"mat-label"),t._uU(7,"JLPT"),t.qZA(),t.TgZ(8,"mat-select",5),t.NdJ("valueChange",function(s){return e.jlpt=s})("valueChange",function(s){return e.changeJlpt(s)}),t.TgZ(9,"mat-option",6),t._uU(10,"Semua"),t.qZA(),t.YNc(11,Bt,2,2,"mat-option",7),t.qZA()(),t.TgZ(12,"mat-form-field",4)(13,"mat-label"),t._uU(14,"Sekolah"),t.qZA(),t.TgZ(15,"mat-select",5),t.NdJ("valueChange",function(s){return e.school=s})("valueChange",function(s){return e.changeSchool(s)}),t.TgZ(16,"mat-option",6),t._uU(17,"Semua"),t.qZA(),t.YNc(18,Lt,2,2,"mat-option",7),t.qZA()(),t.TgZ(19,"mat-form-field",8)(20,"mat-label"),t._uU(21,"Cari ..."),t.qZA(),t.TgZ(22,"input",9),t.NdJ("keyup.enter",function(s){return e.applyFilter(s)})("ngModelChange",function(s){return e.q=s}),t.qZA(),t._UZ(23,"mat-icon",10),t.qZA()()(),t.TgZ(24,"div",11)(25,"div",12),t.YNc(26,wt,1,0,"app-no-data",13),t.YNc(27,qt,3,1,"div",14),t.qZA()()()(),t.TgZ(28,"div",15)(29,"mat-paginator",16),t.NdJ("page",function(s){return e.paginatorChanged(s)}),t.qZA()()),2&a&&(t.xp6(5),t.Q6J("color","accent"),t.xp6(3),t.Q6J("value",e.jlpt),t.xp6(3),t.Q6J("ngForOf",t.DdM(13,Kt)),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("value",e.school),t.xp6(3),t.Q6J("ngForOf",t.DdM(14,Mt)),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("ngModel",e.q),t.xp6(4),t.Q6J("ngIf",e.kanjiData.length<=0),t.xp6(1),t.Q6J("ngIf",e.kanjiData.length>0),t.xp6(2),t.Q6J("color","accent")("length",e.count)("pageSizeOptions",e.pageSizeOptions))},dependencies:[c.sg,c.O5,_.Fj,_.JJ,_.nD,_.On,k.t,Z.ey,b.Hw,v.KE,v.hX,v.R9,w.Nt,T.NW,I.gD,K.S,M.d]}),n})();var Ht=l(5934),Ft=l(7814),zt=l(2673),Yt=l(1617);function Gt(n,i){if(1&n){const a=t.EpF();t.TgZ(0,"div",23)(1,"div",6)(2,"div",7),t.NdJ("click",function(){const s=t.CHM(a).$implicit,d=t.oxw(2);return t.KtG(d.openProfile(s.value.username))}),t._UZ(3,"div",24),t.TgZ(4,"div"),t._uU(5),t.qZA()()()()}if(2&n){const a=i.$implicit,e=i.index;t.xp6(3),t.Jzz("\n background-image: url('",a.value.image_url,"');\n width: 64px;\n height: 64px;\n background-size: cover;\n background-position: center;\n "),t.Q6J("matBadge",null==a||null==a.value?null:a.value.profile_.points)("matBadgeColor",0===e?"warn":1===e?"primary":"accent"),t.xp6(1),t.Gre("pt-1 ",0===e?"gradient-text":"",""),t.xp6(1),t.Oqu(a.value.username)}}function Pt(n,i){1&n&&t._UZ(0,"div")}function $t(n,i){if(1&n&&t._UZ(0,"div",25),2&n){const a=t.oxw(2);t.Jzz("\n background-size: contain;\n background-position: center center;\n background-repeat: no-repeat;\n background-image: url('",a.getQuiz.question[a.question],"');\n ")}}function Wt(n,i){if(1&n){const a=t.EpF();t.TgZ(0,"div",26),t.NdJ("click",function(){t.CHM(a);const o=t.oxw(2);return t.KtG(o.openEdict())}),t._uU(1),t.qZA()}if(2&n){const a=t.oxw(2);t.xp6(1),t.hij(" ",a.swapOptions?a.getQuiz.question[a.question]:a.getQuiz.question[a.options]," ")}}function Xt(n,i){if(1&n){const a=t.EpF();t.TgZ(0,"div")(1,"div",27),t.NdJ("click",function(){const s=t.CHM(a).$implicit,d=t.oxw(2);return t.KtG(d.selectAnswer(s))}),t.TgZ(2,"div"),t._uU(3),t.qZA()()()}if(2&n){const a=i.$implicit,e=t.oxw(2);t.Gre("",e.ROUTER.url.startsWith("/nihongo/kelas-")||e.ROUTER.url.startsWith("/nihongo/jlpt-")||e.ROUTER.url.startsWith("/nihongo/semua-kanji")||e.ROUTER.url.startsWith("/nihongo/latihan-")?"col-md-6 col-12":"col-md-4 col-6"," p-2"),t.xp6(2),t.Gre("card-body ",e.ROUTER.url.startsWith("/nihongo/kelas-")||e.ROUTER.url.startsWith("/nihongo/jlpt-")||e.ROUTER.url.startsWith("/nihongo/semua-kanji")?"p-0":"px-0",""),t.Udp("font-size",e.ROUTER.url.startsWith("/nihongo/kelas-")||e.ROUTER.url.startsWith("/nihongo/jlpt-")||e.ROUTER.url.startsWith("/nihongo/semua-kanji")?"100%":"250%"),t.xp6(1),t.hij(" ",e.swapOptions?a[e.options]:a[e.question]," ")}}function Vt(n,i){if(1&n){const a=t.EpF();t.TgZ(0,"div",28)(1,"div",29),t.NdJ("click",function(){t.CHM(a);const o=t.oxw(2);return t.KtG(o.swapCharacter())}),t.TgZ(2,"div",30),t._uU(3,"\u{1f38c}"),t.qZA()()()}}function ta(n,i){if(1&n){const a=t.EpF();t.TgZ(0,"div",1)(1,"div",2)(2,"div",3),t.YNc(3,Gt,6,9,"div",4),t.ALo(4,"keyvalue"),t.TgZ(5,"div",5)(6,"div",6)(7,"div",7),t.NdJ("click",function(){t.CHM(a);const o=t.oxw();return t.KtG(o.openLiveChat())}),t._UZ(8,"div",8),t.TgZ(9,"div",9),t._uU(10,"Semua Peserta"),t.qZA()()()()(),t.TgZ(11,"div",10)(12,"div",2),t._UZ(13,"hr",11),t.qZA()(),t.TgZ(14,"div",10)(15,"div",12)(16,"div",10)(17,"div",13)(18,"div",14),t.YNc(19,Pt,1,0,"div",15),t.YNc(20,$t,1,3,"ng-template",null,16,t.W1O),t.YNc(22,Wt,2,1,"ng-template",null,17,t.W1O),t.qZA()()(),t.TgZ(24,"div",10)(25,"div",13)(26,"div",18),t.YNc(27,Xt,4,9,"div",19),t.YNc(28,Vt,4,0,"div",20),t.qZA()()()(),t.TgZ(29,"div",21),t._UZ(30,"app-live-chat",22),t.qZA()()()()}if(2&n){const a=t.MAs(21),e=t.MAs(23),o=t.oxw();t.xp6(3),t.Q6J("ngForOf",t.xi3(4,10,o.participants,o.scoreOrder)),t.xp6(5),t.Jzz("\n background-image: url('",o.ENV.baseUrl,"/assets/img/favicon.png');\n width: 64px;\n height: 64px;\n background-size: cover;\n background-position: center;\n "),t.xp6(11),t.Q6J("ngIf","image_url"===o.question)("ngIfThen",a)("ngIfElse",e),t.xp6(8),t.Q6J("ngForOf",o.getQuiz.options),t.xp6(1),t.Q6J("ngIf",!(o.ROUTER.url.startsWith("/nihongo/kelas-")||o.ROUTER.url.startsWith("/nihongo/jlpt-")||o.ROUTER.url.startsWith("/nihongo/semua-kanji")||o.ROUTER.url.startsWith("/nihongo/latihan-"))),t.xp6(2),t.Q6J("chatOnly",!0)}}let aa=(()=>{class n{constructor(a,e,o,s,d){this.router=a,this.gs=e,this.rps=o,this.quiz=s,this.ds=d,this.question="hiragana",this.options="romaji",this.swapOptions=!0,this.participants=null,this.subsParticipant=null,this.subsDialog=null,this.scoreOrder=(A,x)=>A.value.profile_.points>x.value.profile_.points?-1:x.value.profile_.points>A.value.profile_.points?1:0}get ENV(){return Ht.N}get ROUTER(){return this.router}get getQuiz(){return this.quiz.getCurrentQuizQuestion(this.router.url.split("?")[0])}ngOnDestroy(){this.subsParticipant?.unsubscribe(),this.subsDialog?.unsubscribe()}ngOnInit(){this.gs.isBrowser&&(this.subsParticipant=this.quiz.getCurrentQuizRoom().subscribe({next:a=>{this.participants=a?.member_list}}))}selectAnswer(a){this.quiz.answerQuestion({roomId:this.router.url.split("?")[0],randomInteger:this.getQuiz.randomInteger,answer:a})}swapCharacter(){this.swapOptions=!this.swapOptions}openLiveChat(){this.rps.toggleSidePanel("LiveChatComponent")}openProfile(a){this.router.navigateByUrl(`/user/${a}`)}openEdict(){this.gs.log("[QUIZ_OPEN_EDICT]",this.getQuiz),this.getQuiz.question.character&&(this.subsDialog=this.ds.openEdictDialog({data:this.getQuiz.question,disableClose:!1}).afterClosed().subscribe({next:a=>{this.gs.log("[EDICT_DIALOG_CLOSED]",a),this.subsDialog.unsubscribe()}}))}}return n.\u0275fac=function(a){return new(a||n)(t.Y36(h.F0),t.Y36(f.U),t.Y36(Ft.C),t.Y36(D),t.Y36(j.x))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-quiz"]],inputs:{question:"question",options:"options"},decls:1,vars:1,consts:[["class","row px-0",4,"ngIf"],[1,"row","px-0"],[1,"col-12"],[1,"row","w-100","ps-3",2,"display","inline-flex","flex-wrap","nowrap","overflow-x","hidden"],["class","p-2","style","width: auto;",4,"ngFor","ngForOf"],[1,"ms-auto","p-2","bg-bifeldy",2,"width","auto","position","sticky","right","0"],[1,"card","text-center","border-0",2,"width","64px","background","transparent !important"],[1,"card-body","p-0",2,"cursor","pointer",3,"click"],[1,"rounded-3"],[1,"pt-1"],[1,"row"],[1,"my-1","border-bottom-dotted",2,"height","4px","background","url('/assets/img/stripe.png')"],[1,"col-lg-8","col-xl-9","p-3","text-center"],[1,"col-12","p-4"],[1,"mx-auto","card","p-3"],[4,"ngIf","ngIfThen","ngIfElse"],["menengah",""],["bukanMenengah",""],[1,"row","text-center"],[3,"class",4,"ngFor","ngForOf"],["class","col-6 col-md-4 p-2",4,"ngIf"],[1,"col-lg-4","col-xl-3","d-none","d-lg-block","d-xl-block"],[3,"chatOnly"],[1,"p-2",2,"width","auto"],["matBadgePosition","below",1,"rounded-3",3,"matBadge","matBadgeColor"],[1,"card-body","p-3","py-5"],[1,"card-body","p-3","py-5",2,"cursor","pointer","font-size","500%",3,"click"],[1,"card","p-3","m-1",2,"cursor","pointer",3,"click"],[1,"col-6","col-md-4","p-2"],["matTooltip","Tukar Huruf",1,"card","p-3","m-1",2,"cursor","pointer",3,"click"],[1,"card-body","px-0",2,"font-size","250%"]],template:function(a,e){1&a&&t.YNc(0,ta,31,13,"div",0),2&a&&t.Q6J("ngIf",e.getQuiz)},dependencies:[c.sg,c.O5,zt.k,q.gM,Yt.u,c.Nd]}),n})();function na(n,i){if(1&n&&t._UZ(0,"app-quiz",2),2&n){const a=t.oxw();t.Q6J("question",a.GS.routerData.question)("options",a.GS.routerData.options)}}let p=(()=>{class n{constructor(a,e,o,s){this.router=a,this.toast=e,this.gs=o,this.ss=s,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get GS(){return this.gs}ngOnInit(){this.gs.isBrowser&&(this.ss.mySocket?.id||(this.toast.warning("Tidak Dapat Terhubung Melalui Web Socket","Gagal Menyambung Ke Jaringan!",null,!0),this.router.navigateByUrl("/nihongo")),this.gs.isDarkMode||this.gs.toggleDarkTheme())}}return n.\u0275fac=function(a){return new(a||n)(t.Y36(h.F0),t.Y36(L.k),t.Y36(f.U),t.Y36(J.R))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-tes"]],decls:3,vars:1,consts:[[1,"container"],[3,"question","options",4,"ngIf"],[3,"question","options"]],template:function(a,e){1&a&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0),t.YNc(2,na,1,2,"app-quiz",1),t.qZA()),2&a&&(t.xp6(2),t.Q6J("ngIf",e.GS.routerData.question&&e.GS.routerData.options))},dependencies:[c.O5,k.t,aa]}),n})();var ea=l(8613),ia=l(4854),oa=l(669),ra=l(913),sa=l(6436),Q=l(5116);let la=(()=>{class n{}return n.\u0275fac=function(a){return new(a||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({imports:[c.ez,h.Bz,N.m,Q.d]}),n})();var ca=l(617);let ga=(()=>{class n{}return n.\u0275fac=function(a){return new(a||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({imports:[c.ez,N.m,h.Bz]}),n})();var ua=l(2438),pa=l(1838),ma=l(7956);const da=[{path:"",pathMatch:"full",component:ot},{path:"belajar",component:Dt,data:{title:"Huruf, Angka, Warna, Buah & Sayur, Dan Lingkungan Sekitar",description:"Mengenal Sambil Belajar Berbagai Macam",keywords:"Sesuatu Yang Sering Kita Temukan",question:null,options:null}},{path:"kanji",component:Qt,data:{title:"Huruf Kanji",description:"Mengenal Huruf Kanji Sesuai Rank JLPT & Sekolah",keywords:"Kanji",question:null,options:null}},{path:"hiragana",component:p,canActivate:[u.t],data:{title:"Tes Huruf Hiragana",description:"Uji Kemampuan Huruf Hiragana",keywords:"Hiragana",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"hiragana",options:"romaji"}},{path:"katakana",component:p,canActivate:[u.t],data:{title:"Tes Huruf Katakana",description:"Uji Kemampuan Huruf Katakana",keywords:"Katakana",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"katakana",options:"romaji"}},{path:"jlpt-n5",component:p,canActivate:[u.t],data:{title:"Tes Huruf N5",description:"Uji Kemampuan Huruf N5",keywords:"N5",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"jlpt-n4",component:p,canActivate:[u.t],data:{title:"Tes Huruf N4",description:"Uji Kemampuan Huruf N4",keywords:"N4",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"jlpt-n3",component:p,canActivate:[u.t],data:{title:"Tes Huruf N3",description:"Uji Kemampuan Huruf N3",keywords:"N3",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"jlpt-n2",component:p,canActivate:[u.t],data:{title:"Tes Huruf N2",description:"Uji Kemampuan Huruf N2",keywords:"N2",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"jlpt-n1",component:p,canActivate:[u.t],data:{title:"Tes Huruf N1",description:"Uji Kemampuan Huruf N1",keywords:"N1",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"kelas-1",component:p,canActivate:[u.t],data:{title:"Tes Huruf Kelas 1",description:"Uji Kemampuan Huruf Kelas 1",keywords:"Kelas 1",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"kelas-2",component:p,canActivate:[u.t],data:{title:"Tes Huruf Kelas 2",description:"Uji Kemampuan Huruf Kelas 2",keywords:"Kelas 2",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"kelas-3",component:p,canActivate:[u.t],data:{title:"Tes Huruf Kelas 3",description:"Uji Kemampuan Huruf Kelas 3",keywords:"Kelas 3",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"kelas-4",component:p,canActivate:[u.t],data:{title:"Tes Huruf Kelas 4",description:"Uji Kemampuan Huruf Kelas 4",keywords:"Kelas 4",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"kelas-5",component:p,canActivate:[u.t],data:{title:"Tes Huruf Kelas 5",description:"Uji Kemampuan Huruf Kelas 5",keywords:"Kelas 5",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"kelas-6",component:p,canActivate:[u.t],data:{title:"Tes Huruf Kelas 6",description:"Uji Kemampuan Huruf Kelas 6",keywords:"Kelas 6",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"kelas-lanjutan-1",component:p,canActivate:[u.t],data:{title:"Tes Huruf Lanjutan 1",description:"Uji Kemampuan Huruf Lanjutan 1",keywords:"Lanjutan 1",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"kelas-lanjutan-2",component:p,canActivate:[u.t],data:{title:"Tes Huruf Lanjutan 2",description:"Uji Kemampuan Huruf Lanjutan 2",keywords:"Lanjutan 2",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"semua-kanji",component:p,canActivate:[u.t],data:{title:"Tes Huruf Semua Kanji",description:"Uji Kemampuan Huruf Semua Kanji",keywords:"Semua Kanji",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:":category",component:p,canActivate:[u.t],data:{title:"Tes Kategori Lainnya",description:"Uji Kemampuan Kategori Lainnya",keywords:"Kategori Lainnya",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"image_url",options:"kana"}}];let ha=(()=>{class n{}return n.\u0275fac=function(a){return new(a||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({imports:[c.ez,h.Bz.forChild(da),_.u5,_.UX,ea.F,pa.R,ia.R,ra.g,sa.L,N.m,F.Ad,H.UM,oa.A,Q.d,la,ca.H,ma.C,ga,ua.d]}),n})()}}]); \ No newline at end of file diff --git a/dist/fansubid/browser/750.ebd8141ed453be68.js b/dist/fansubid/browser/750.ebd8141ed453be68.js deleted file mode 100644 index e040db862..000000000 --- a/dist/fansubid/browser/750.ebd8141ed453be68.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfansubid=self.webpackChunkfansubid||[]).push([[750],{6750:(_a,U,l)=>{l.r(U),l.d(U,{NihongoModule:()=>ha});var c=l(6895),h=l(1390),_=l(4006),H=l(7375),F=l(3170),g=l(6271),r=l(4249),u=l(2777),N=l(210),t=l(4650),f=l(257),y=l(3e3),C=l(2663),k=l(8616),R=l(9530),O=l(3331),m=l(3546);function z(n,i){if(1&n&&(t.TgZ(0,"div",4)(1,"mat-card",5),t._UZ(2,"img",6),t.TgZ(3,"mat-card-content",7)(4,"h3")(5,"b"),t._uU(6),t.qZA()()()()()),2&n){const a=i.$implicit;t.xp6(2),t.MGl("routerLink","/nihongo/",a.url,""),t.Q6J("src",a.image_url,t.LSH),t.xp6(1),t.MGl("routerLink","/nihongo/",a.url,""),t.xp6(3),t.Oqu(a.title)}}let Y=(()=>{class n{constructor(a){this.gs=a,this.nihongoMenu=[{url:"belajar",title:"Pengenalan Aksara",image_url:"/assets/img/nihongo/hirakata.png"},{url:"kanji",title:"Pengayaan Kanji (* JP-EN)",image_url:"/assets/img/nihongo/jlpt.png"}]}ngOnInit(){}}return n.\u0275fac=function(a){return new(a||n)(t.Y36(f.U))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-banner-nihongo"]],decls:4,vars:1,consts:[[1,"row"],[1,"col-12"],[1,"row","px-3"],["class","col-12 col-md-6 p-2",4,"ngFor","ngForOf"],[1,"col-12","col-md-6","p-2"],[1,"gradient-border","rgb-border"],["mat-card-image","",2,"height","128px","object-fit","cover","cursor","pointer",3,"src","routerLink"],[2,"cursor","pointer",3,"routerLink"]],template:function(a,e){1&a&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t.YNc(3,z,7,4,"div",3),t.qZA()()()),2&a&&(t.xp6(3),t.Q6J("ngForOf",e.nihongoMenu))},dependencies:[c.sg,h.rH,m.a8,m.dn,m.G2]}),n})();var P=l(8757),b=l(7392),E=l(8921),G=l(9731),J=l(8381);let D=(()=>{class n{constructor(a,e,o){this.api=a,this.gs=e,this.ss=o}getCurrentQuizRoom(){return this.ss.currentRoom}getCurrentQuizQuestion(a){return this.ss.quizRoom[a]}answerQuestion(a){this.ss.socketEmit("quiz-answer",a)}getQuizLeaderboard(a="",e=1,o=10,s="",d=""){return this.api.getData(`/quiz-leaderboard?q=${a}&page=${e}&row=${o}&sort=${s}&order=${d}`)}}return n.\u0275fac=function(a){return new(a||n)(t.LFG(G.s),t.LFG(f.U),t.LFG(J.R))},n.\u0275prov=t.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();var B=l(4859),S=l(6338);function $(n,i){if(1&n&&(t.TgZ(0,"mat-list-option",12),t._UZ(1,"img",13),t.TgZ(2,"a",14)(3,"span",15),t._uU(4),t.qZA(),t.TgZ(5,"span",16),t._uU(6),t.qZA(),t.TgZ(7,"span",17),t._uU(8),t.qZA()()()),2&n){const a=i.$implicit;t.MGl("routerLink","/user/",a.username,""),t.xp6(1),t.s9C("src",a.image_url,t.LSH),t.xp6(3),t.hij(" ",a.points," "),t.xp6(2),t.Oqu(a.rank),t.xp6(2),t.Oqu(a.username)}}let W=(()=>{class n{constructor(a,e){this.gs=a,this.qs=e,this.leaderboardData=[],this.leaderBoardTotalPages=1,this.leaderboardPage=1,this.subsLeaderboard=null}ngOnInit(){this.gs.isBrowser&&this.getLeaderboard()}ngOnDestroy(){this.subsLeaderboard?.unsubscribe()}getLeaderboard(){this.subsLeaderboard=this.qs.getQuizLeaderboard("",this.leaderboardPage).subscribe({next:a=>{this.gs.log("[LEADERBOARD_LIST_SUCCESS]",a),this.leaderBoardTotalPages=a.pages,this.leaderboardData=a.results},error:a=>{this.gs.log("[LEADERBOARD_LIST_ERROR]",a,"error")}})}prevBoard(){this.leaderboardPage--,this.leaderboardPage<=0&&(this.leaderboardPage=1),this.getLeaderboard()}nextBoard(){this.leaderboardPage++,this.getLeaderboard()}}return n.\u0275fac=function(a){return new(a||n)(t.Y36(f.U),t.Y36(D))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-leaderboard"]],decls:17,vars:8,consts:[[1,"row"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"float-end","text-warning",2,"font-size","small","cursor","pointer",3,"click"],[1,"text-bifeldy"],[1,"col-12"],[3,"multiple"],["class","h-100",3,"routerLink",4,"ngFor","ngForOf"],[1,"col-12","text-end"],["type","button","mat-button","","color","accent",3,"disabled","click"],["fontIcon","navigate_before"],["fontIcon","navigate_next"],[1,"h-100",3,"routerLink"],["matListAvatar","",1,"ms-3",2,"border-radius","0",3,"src"],[1,"text-truncate","text-decoration-none"],[1,"bg-bifeldy","px-2","me-1","text-warning",2,"position","absolute","right","0"],[1,"me-3","text-danger"],[1,"text-success"]],template:function(a,e){1&a&&(t.TgZ(0,"div",0)(1,"div",1)(2,"h2",2)(3,"span",3),t.NdJ("click",function(){return e.getLeaderboard()}),t._uU(4," Refresh "),t.qZA(),t.TgZ(5,"b",4),t._uU(6,"Rank Points"),t.qZA()()(),t.TgZ(7,"div",5)(8,"mat-selection-list",6),t.YNc(9,$,9,5,"mat-list-option",7),t.ALo(10,"slice"),t.qZA(),t.TgZ(11,"div",0)(12,"div",8)(13,"button",9),t.NdJ("click",function(){return e.prevBoard()}),t._UZ(14,"mat-icon",10),t.qZA(),t.TgZ(15,"button",9),t.NdJ("click",function(){return e.nextBoard()}),t._UZ(16,"mat-icon",11),t.qZA()()()()()),2&a&&(t.xp6(8),t.Q6J("multiple",!1),t.xp6(1),t.Q6J("ngForOf",t.Dn7(10,4,e.leaderboardData,0,10)),t.xp6(4),t.Q6J("disabled",e.leaderboardPage<=1),t.xp6(2),t.Q6J("disabled",e.leaderboardPage>=e.leaderBoardTotalPages))},dependencies:[c.sg,B.lW,b.Hw,S.eA,S.Ub,S.vS,h.rH,c.OU]}),n})();function X(n,i){if(1&n&&t._UZ(0,"mat-icon",22),2&n){const a=t.oxw().$implicit;t.Q6J("fontIcon",a.icon)}}function V(n,i){if(1&n&&(t.TgZ(0,"div",15)(1,"mat-card",16)(2,"mat-card-header",17)(3,"div",18),t.YNc(4,X,1,1,"mat-icon",19),t.qZA(),t.TgZ(5,"mat-card-title",20)(6,"h3",21),t._uU(7),t.qZA()(),t.TgZ(8,"mat-card-subtitle",21),t._uU(9),t.qZA()()()()),2&n){const a=i.$implicit;t.xp6(2),t.MGl("routerLink","/nihongo/",a.url,""),t.xp6(1),t.Udp("background-image","url("+(a.image_url||"")+")"),t.xp6(1),t.Q6J("ngIf",a.icon),t.xp6(3),t.Oqu(a.name),t.xp6(2),t.Oqu(a.letter)}}function tt(n,i){if(1&n&&t._UZ(0,"mat-icon",22),2&n){const a=t.oxw().$implicit;t.Q6J("fontIcon",a.icon)}}function at(n,i){if(1&n&&(t.TgZ(0,"div",15)(1,"mat-card")(2,"mat-card-header",17)(3,"div",18),t.YNc(4,tt,1,1,"mat-icon",19),t.qZA(),t.TgZ(5,"mat-card-title",20)(6,"h3",21),t._uU(7),t.qZA()(),t.TgZ(8,"mat-card-subtitle",21),t._uU(9),t.qZA()()()()),2&n){const a=i.$implicit;t.xp6(2),t.MGl("routerLink","/nihongo/",a.url,""),t.xp6(1),t.Udp("background-image","url("+(a.image_url||"")+")"),t.xp6(1),t.Q6J("ngIf",a.icon),t.xp6(3),t.Oqu(a.name),t.xp6(2),t.Oqu(a.letter)}}function nt(n,i){if(1&n&&(t.TgZ(0,"div",3)(1,"div",4)(2,"h2",5)(3,"b",6),t._uU(4,"Latihan Menengah"),t.qZA()()(),t.TgZ(5,"div",7)(6,"div",8),t.YNc(7,at,10,6,"div",9),t.qZA()()()),2&n){const a=t.oxw();t.xp6(7),t.Q6J("ngForOf",a.testMenengah)}}function et(n,i){if(1&n&&t._UZ(0,"mat-icon",22),2&n){const a=t.oxw().$implicit;t.Q6J("fontIcon",a.icon)}}function it(n,i){if(1&n&&(t.TgZ(0,"div",15)(1,"mat-card")(2,"mat-card-header",17)(3,"div",18),t.YNc(4,et,1,1,"mat-icon",19),t.qZA(),t.TgZ(5,"mat-card-title",20)(6,"h3",21),t._uU(7),t.qZA()(),t.TgZ(8,"mat-card-subtitle",21),t._uU(9),t.qZA()()()()),2&n){const a=i.$implicit;t.xp6(1),t.Tol(a.name.startsWith("JLPT")?"rgb-border":"All Kanji"===a.name?"gradient-border rgb-border":""),t.xp6(1),t.MGl("routerLink","/nihongo/",a.url,""),t.xp6(1),t.Udp("background-image","url("+(a.image_url||"")+")"),t.xp6(1),t.Q6J("ngIf",a.icon),t.xp6(3),t.Oqu(a.name),t.xp6(2),t.Oqu(a.letter)}}let ot=(()=>{class n{constructor(a,e,o,s){this.router=a,this.gs=e,this.bs=o,this.nihon=s,this.testDasar=[{url:"hiragana",name:"Hiragana",image_url:"/assets/img/nihongo/hiragana.png",icon:null,letter:"~46 Unik"},{url:"katakana",name:"Katakana",image_url:"/assets/img/nihongo/katakana.png",icon:null,letter:"~46 Unik"},{url:"angka",name:"Angka",image_url:null,icon:"plus_one",letter:"~\u221e Unik"}],this.testMenengah=[],this.testLanjutan=[{url:"kelas-1",name:"Kelas 1",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~80 Unik"},{url:"kelas-2",name:"Kelas 2",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~160 Unik"},{url:"kelas-3",name:"Kelas 3",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~200 Unik"},{url:"kelas-4",name:"Kelas 4",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~200 Unik"},{url:"kelas-5",name:"Kelas 5",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~185 Unik"},{url:"kelas-6",name:"Kelas 6",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~181 Unik"},{url:"kelas-lanjutan-1",name:"Lanjutan 1",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~1139 Unik"},{url:"kelas-lanjutan-2",name:"Lanjutan 2",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~349 Unik"},{url:"jlpt-n5",name:"JLPT N5",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~79 Unik"},{url:"jlpt-n4",name:"JLPT N4",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~166 Unik"},{url:"jlpt-n3",name:"JLPT N3",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~367 Unik"},{url:"jlpt-n2",name:"JLPT N2",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~367 Unik"},{url:"jlpt-n1",name:"JLPT N1",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~1231 Unik"},{url:"semua-kanji",name:"All Kanji",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~2494 Unik"}],this.tabData=[{name:"JLPT Roadmap",icon:"pin_drop",type:"html",data:'\n
\n \n \n
\n

Sumber gambar dan informasi: KawaKawa

\n

\u201cJLPT\u201d adalah singkatan dari Japanese-Language Proficiency Test (Tes Kemampuan Bahasa Jepang). JLPT adalah salah satu ujian kecakapan bahasa Jepang internasional yang paling terkenal. Ini memiliki lima level, dengan level lima (secara resmi disebut N5) menjadi yang termudah dan level satu (N1) menjadi yang paling sulit.

\n

JLPT dulu memiliki empat level tetapi sekarang dibagi menjadi lima (N5, N4, N3, N2, dan N1). Level mana yang ingin diambil dibebaskan untuk memilih. Contoh pertanyaan dapat diakses pada halaman New Japanese-Language Proficiency Test Sample Questions.

\n
    \n
  • Untuk lulus N5, perlu mengetahui sekitar 100 kanji dan sekitar 800 kosakata.
  • \n
  • Untuk lulus N4, perlu mengetahui sekitar 300 kanji dan sekitar 1.500 kosakata.
  • \n
  • Untuk lulus N3, perlu mengetahui sekitar 650 kanji dan sekitar 3.700 kosakata.
  • \n
  • Untuk lulus N2, perlu mengetahui sekitar 1.000 kanji dan sekitar 6.000 kosakata.
  • \n
  • Untuk lulus N1, perlu mengetahui sekitar 2.000 kanji dan sekitar 10.000 kosakata.
  • \n
\n

Untuk informasi skoring & penilaian dapat dilihat pada Scoring Sections, Pass or Fail, Score Report.

\n

N5 dan N4 adalah level termudah untuk diselesaikan dalam tes tetapi jika ingin menyelesaikan level yang lebih tinggi seperti N3, N2 dan N1 maka harus menghadiri pusat pembinaan di mana mereka menyediakan bahan pelajaran yang baik dan memiliki pelatih berpengalaman akan membantu belajar bahasa jepang dengan mudah.

\n

Informasi lebih lanjut, silahkan kunjungi https://www.jlpt.jp/e/index.html.

\n '}],this.count=0,this.page=1,this.row=10,this.q="",this.sort="",this.order="",this.subsAllKategori=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}ngOnInit(){this.gs.isBrowser&&this.getKategori()}ngOnDestroy(){this.subsAllKategori?.unsubscribe()}getKategori(){this.bs.busy(),this.subsAllKategori=this.nihon.getAllKategori().subscribe({next:a=>{this.gs.log("[BELAJAR_KANA_KATEGORI_SUCCESS]",a);const e=[];for(const o of a.results)e.push({url:`latihan-${o.id}`,name:o.name,image_url:null,icon:"switch_access_shortcut",letter:`~${o.jumlah} Unik`});this.testMenengah=e,this.bs.idle()},error:a=>{this.gs.log("[BELAJAR_KANA_KATEGORI_ERROR]",a,"error"),this.bs.idle()}})}getBook(){}openModule(a){this.gs.log("[NIHONGO_CLICK_MODUL]",a),this.router.navigateByUrl(`/nihongo/${a.id}`)}onPaginatorClicked(a){this.gs.log("[NIHONGO_CLICK_PAGINATOR]",a),this.page=a.pageIndex+1,this.row=a.pageSize,this.getBook()}onServerSideFilter(a){this.gs.log("[NIHONGO_ENTER_FILTER]",a),this.q=a,this.getBook()}onServerSideOrder(a){this.gs.log("[NIHONGO_CLICK_ORDER]",a),this.q=a.q,this.sort=a.active,this.order=a.direction,this.getBook()}}return n.\u0275fac=function(a){return new(a||n)(t.Y36(h.F0),t.Y36(f.U),t.Y36(y.z),t.Y36(C.a))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-nihongo-list"]],decls:38,vars:6,consts:[[1,"container"],[1,"row","pb-3","px-0"],[1,"col-lg-8","col-xl-9"],[1,"row"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"col-12"],[1,"row","px-3"],["class","col-12 col-sm-6 col-md-4 col-lg-6 col-xl-3 p-2",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],[1,"row","mt-3"],[3,"tabData","count","serverSide","tableRowClicked","paginatorClicked","serverSideFilter","serverSideOrder"],[1,"col-lg-4","col-xl-3"],[1,"row","sticky-top"],[1,"col-12","col-sm-6","col-md-4","col-lg-6","col-xl-3","p-2"],[1,"gradient-border"],[1,"me-0",2,"cursor","pointer",3,"routerLink"],["mat-card-avatar","",2,"background-size","cover","background-color","whitesmoke","border-radius","0"],["style","font-size: 300%; color: black",3,"fontIcon",4,"ngIf"],[1,"text-warning","mb-1",2,"cursor","pointer"],[1,"mb-0"],[2,"font-size","300%","color","black",3,"fontIcon"]],template:function(a,e){1&a&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4)(6,"h2",5)(7,"b",6),t._uU(8,"Belajar Bahasa Jepang"),t.qZA()()(),t.TgZ(9,"div",7),t._UZ(10,"app-banner-nihongo"),t.qZA()(),t.TgZ(11,"div",3)(12,"div",4)(13,"h2",5)(14,"b",6),t._uU(15,"Latihan Dasar"),t.qZA()()(),t.TgZ(16,"div",7)(17,"div",8),t.YNc(18,V,10,6,"div",9),t.qZA()()(),t.YNc(19,nt,8,1,"div",10),t.TgZ(20,"div",3)(21,"div",4)(22,"h2",5)(23,"b",6),t._uU(24,"Latihan Lanjutan"),t.qZA()()(),t.TgZ(25,"div",7)(26,"div",8),t.YNc(27,it,10,9,"div",9),t.qZA()()(),t.TgZ(28,"div",11)(29,"div",7)(30,"app-material-tab",12),t.NdJ("tableRowClicked",function(s){return e.openModule(s)})("paginatorClicked",function(s){return e.onPaginatorClicked(s)})("serverSideFilter",function(s){return e.onServerSideFilter(s)})("serverSideOrder",function(s){return e.onServerSideOrder(s)}),t.qZA()()()(),t.TgZ(31,"div",13)(32,"div",14)(33,"div",7),t._UZ(34,"app-leaderboard")(35,"app-banner-donasi")(36,"app-banner-discord")(37,"app-stats-server"),t.qZA()()()()()),2&a&&(t.xp6(18),t.Q6J("ngForOf",e.testDasar),t.xp6(1),t.Q6J("ngIf",e.testMenengah.length>0),t.xp6(8),t.Q6J("ngForOf",e.testLanjutan),t.xp6(3),t.Q6J("tabData",e.tabData)("count",e.count)("serverSide",!0))},dependencies:[c.sg,c.O5,h.rH,k.t,R.u,O.B,Y,P.H,m.a8,m.dk,m.n5,m.$j,m.kc,b.Hw,E.X,W]}),n})();var T=l(8739),L=l(6925),rt=l(4137),j=l(7845),Z=l(3238),v=l(9549),w=l(4144),I=l(4385),q=l(266),st=l(578),K=l(201),M=l(192);function lt(n,i){if(1&n&&(t.TgZ(0,"mat-option",20),t._uU(1),t.qZA()),2&n){const a=i.$implicit;t.s9C("value",a.id),t.xp6(1),t.Oqu(a.name)}}function ct(n,i){if(1&n){const a=t.EpF();t.TgZ(0,"mat-form-field",21)(1,"mat-label"),t._uU(2,"Cari ..."),t.qZA(),t.TgZ(3,"input",22),t.NdJ("keyup.enter",function(o){t.CHM(a);const s=t.oxw();return t.KtG(s.applyFilter(o))})("ngModelChange",function(o){t.CHM(a);const s=t.oxw();return t.KtG(s.q=o)}),t.qZA(),t._UZ(4,"mat-icon",23),t.qZA()}if(2&n){const a=t.oxw();t.Q6J("color","accent"),t.xp6(3),t.Q6J("ngModel",a.q)}}function gt(n,i){1&n&&t._UZ(0,"div")}function ut(n,i){if(1&n){const a=t.EpF();t.TgZ(0,"img",32),t.NdJ("click",function(){t.CHM(a);const o=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.openDmak(o))}),t.qZA()}if(2&n){const a=t.oxw().$implicit,e=t.oxw(3);t.hYB("src","/assets/",e.modeTampilan,"/",a.romaji,".png",t.LSH)}}function pt(n,i){if(1&n&&(t.TgZ(0,"div",30),t.YNc(1,ut,1,2,"img",31),t.qZA()),2&n){const a=i.$implicit;t.xp6(1),t.Q6J("ngIf",a.hiragana&&a.katakana)}}function mt(n,i){if(1&n&&(t.TgZ(0,"div",28),t.YNc(1,pt,2,1,"div",29),t.qZA()),2&n){const a=i.$implicit;t.xp6(1),t.Q6J("ngForOf",a.value)}}function dt(n,i){if(1&n){const a=t.EpF();t.TgZ(0,"img",32),t.NdJ("click",function(){t.CHM(a);const o=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.openDmak(o))}),t.qZA()}if(2&n){const a=t.oxw().$implicit,e=t.oxw(3);t.hYB("src","/assets/",e.modeTampilan,"/",a.romaji,".png",t.LSH)}}function ht(n,i){if(1&n&&(t.TgZ(0,"div",30),t.YNc(1,dt,1,2,"img",31),t.qZA()),2&n){const a=i.$implicit;t.xp6(1),t.Q6J("ngIf",a.hiragana&&a.katakana)}}function _t(n,i){if(1&n&&(t.TgZ(0,"div",28),t.YNc(1,ht,2,1,"div",29),t.qZA()),2&n){const a=i.$implicit;t.xp6(1),t.Q6J("ngForOf",a.value)}}function ft(n,i){if(1&n){const a=t.EpF();t.TgZ(0,"img",32),t.NdJ("click",function(){t.CHM(a);const o=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.openDmak(o))}),t.qZA()}if(2&n){const a=t.oxw().$implicit,e=t.oxw(3);t.hYB("src","/assets/",e.modeTampilan,"/",a.romaji,".png",t.LSH)}}function vt(n,i){if(1&n&&(t.TgZ(0,"div",30),t.YNc(1,ft,1,2,"img",31),t.qZA()),2&n){const a=i.$implicit;t.xp6(1),t.Q6J("ngIf",a.hiragana&&a.katakana)}}function kt(n,i){if(1&n&&(t.TgZ(0,"div",28),t.YNc(1,vt,2,1,"div",29),t.qZA()),2&n){const a=i.$implicit;t.xp6(1),t.Q6J("ngForOf",a.value)}}function bt(n,i){if(1&n){const a=t.EpF();t.TgZ(0,"img",32),t.NdJ("click",function(){t.CHM(a);const o=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.openDmak(o))}),t.qZA()}if(2&n){const a=t.oxw().$implicit,e=t.oxw(3);t.hYB("src","/assets/",e.modeTampilan,"/",a.romaji,".png",t.LSH)}}function Tt(n,i){if(1&n&&(t.TgZ(0,"div",30),t.YNc(1,bt,1,2,"img",31),t.qZA()),2&n){const a=i.$implicit;t.xp6(1),t.Q6J("ngIf",a.hiragana&&a.katakana)}}function At(n,i){if(1&n&&(t.TgZ(0,"div",28),t.YNc(1,Tt,2,1,"div",29),t.qZA()),2&n){const a=i.$implicit;t.xp6(1),t.Q6J("ngForOf",a.value)}}function xt(n,i){if(1&n){const a=t.EpF();t.TgZ(0,"img",32),t.NdJ("click",function(){t.CHM(a);const o=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.openDmak(o))}),t.qZA()}if(2&n){const a=t.oxw().$implicit,e=t.oxw(3);t.hYB("src","/assets/",e.modeTampilan,"/",a.romaji,".png",t.LSH)}}function Nt(n,i){if(1&n&&(t.TgZ(0,"div",30),t.YNc(1,xt,1,2,"img",31),t.qZA()),2&n){const a=i.$implicit;t.xp6(1),t.Q6J("ngIf",a.hiragana&&a.katakana)}}function yt(n,i){if(1&n&&(t.TgZ(0,"div",28),t.YNc(1,Nt,2,1,"div",29),t.qZA()),2&n){const a=i.$implicit;t.xp6(1),t.Q6J("ngForOf",a.value)}}function Ct(n,i){if(1&n&&(t.TgZ(0,"div",17)(1,"div",3)(2,"div",24)(3,"div",3)(4,"div",17)(5,"h2",25)(6,"b",26),t._uU(7,"Standar"),t.qZA()()(),t.TgZ(8,"div",17),t.YNc(9,mt,2,1,"div",27),t.ALo(10,"keyvalue"),t.qZA()(),t.TgZ(11,"div",3)(12,"div",17)(13,"h2",25)(14,"b",26),t._uU(15,"Lainnya"),t.qZA()()(),t.TgZ(16,"div",17),t.YNc(17,_t,2,1,"div",27),t.ALo(18,"keyvalue"),t.qZA()()(),t.TgZ(19,"div",24)(20,"div",3)(21,"div",17)(22,"h2",25)(23,"b",26),t._uU(24,"Dakuon"),t.qZA()()(),t.TgZ(25,"div",17),t.YNc(26,kt,2,1,"div",27),t.ALo(27,"keyvalue"),t.qZA()(),t.TgZ(28,"div",3)(29,"div",17)(30,"h2",25)(31,"b",26),t._uU(32,"Handakuon"),t.qZA()()(),t.TgZ(33,"div",17),t.YNc(34,At,2,1,"div",27),t.ALo(35,"keyvalue"),t.qZA()(),t.TgZ(36,"div",3)(37,"div",17)(38,"h2",25)(39,"b",26),t._uU(40,"Yuon"),t.qZA()()(),t.TgZ(41,"div",17),t.YNc(42,yt,2,1,"div",27),t.ALo(43,"keyvalue"),t.qZA()()()()()),2&n){const a=t.oxw();t.xp6(9),t.Q6J("ngForOf",t.lcZ(10,5,a.daftarHuruf.standard)),t.xp6(8),t.Q6J("ngForOf",t.lcZ(18,7,a.daftarHuruf.other)),t.xp6(9),t.Q6J("ngForOf",t.lcZ(27,9,a.daftarHuruf.dakuon)),t.xp6(8),t.Q6J("ngForOf",t.lcZ(35,11,a.daftarHuruf.handakuon)),t.xp6(8),t.Q6J("ngForOf",t.lcZ(43,13,a.daftarHuruf.yuon))}}function St(n,i){1&n&&t._UZ(0,"div")}function jt(n,i){if(1&n&&(t.TgZ(0,"div",35),t._UZ(1,"app-material-table",36),t.qZA()),2&n){const a=t.oxw(2);t.xp6(1),t.Q6J("tableDataColumn",a.daftarAngka.column)("tableDataRow",a.daftarAngka.row)}}function Zt(n,i){if(1&n){const a=t.EpF();t.TgZ(0,"div",40)(1,"mat-card",41),t.NdJ("click",function(){const s=t.CHM(a).$implicit,d=t.oxw(4);return t.KtG(d.editDataset(s))}),t.TgZ(2,"mat-card-header",42),t._UZ(3,"div",43),t.TgZ(4,"mat-card-title",44)(5,"h3",45),t._uU(6),t.qZA()(),t.TgZ(7,"mat-card-subtitle",46)(8,"p",47),t._uU(9),t.qZA(),t.TgZ(10,"p",48),t._uU(11),t.qZA()()()()()}if(2&n){const a=i.$implicit;t.xp6(3),t.Udp("background-image","url("+a.image_url+")"),t.xp6(3),t.Oqu(a.kana),t.xp6(3),t.Oqu(a.romaji),t.xp6(2),t.Oqu(a.meaning)}}function Ut(n,i){if(1&n&&(t.TgZ(0,"div",17)(1,"div",38),t.YNc(2,Zt,12,5,"div",39),t.qZA()()),2&n){const a=t.oxw(3);t.xp6(2),t.Q6J("ngForOf",a.daftarNihongo)}}function Rt(n,i){if(1&n&&t.YNc(0,Ut,3,1,"div",37),2&n){const a=t.oxw(2),e=t.MAs(27);t.Q6J("ngIf",a.daftarNihongo.length>0)("ngIfElse",e)}}function Ot(n,i){if(1&n&&(t.YNc(0,St,1,0,"div",10),t.YNc(1,jt,2,2,"ng-template",null,33,t.W1O),t.YNc(3,Rt,1,2,"ng-template",null,34,t.W1O)),2&n){const a=t.MAs(2),e=t.MAs(4),o=t.oxw();t.Q6J("ngIf","angka"===o.modeTampilan)("ngIfThen",a)("ngIfElse",e)}}function Et(n,i){1&n&&t._UZ(0,"app-no-data",49)}function Jt(n,i){if(1&n){const a=t.EpF();t.TgZ(0,"button",50),t.NdJ("click",function(){t.CHM(a);const o=t.oxw();return t.KtG(o.addDataset())}),t._UZ(1,"mat-icon",51),t.qZA()}}let Dt=(()=>{class n{constructor(a,e,o,s,d,A,x){this.router=a,this.toast=e,this.as=o,this.gs=s,this.bs=d,this.ds=A,this.nihon=x,this.pageSizeOptions=[50,75,100,125,150],this.kategori=[{id:"hiragana",name:"Hiragana"},{id:"katakana",name:"Katakana"},{id:"angka",name:"Angka"}],this.modeTampilan="hiragana",this.daftarHuruf=null,this.daftarNihongo=[],this.daftarAngka={column:["Angka","Kana","Romaji"],row:[]},this.count=0,this.page=1,this.row=50,this.q="",this.subsDialog=null,this.subsHirakata=null,this.subsAllNihongo=null,this.subsAllKategori=null,this.dummyDataset=[{category:"number",meaning:0,kana:"\u96f6\uff0f\u30bc\u30ed",romaji:"Rei/Zero"},{category:"number",meaning:1,kana:"\u4e00",romaji:"Ichi"},{category:"number",meaning:2,kana:"\u4e8c",romaji:"Ni"},{category:"number",meaning:3,kana:"\u4e09",romaji:"San"},{category:"number",meaning:4,kana:"\u56db",romaji:"Yon/Shi"},{category:"number",meaning:5,kana:"\u4e94",romaji:"Go"},{category:"number",meaning:6,kana:"\u516d",romaji:"Roku"},{category:"number",meaning:7,kana:"\u4e03",romaji:"Nana"},{category:"number",meaning:8,kana:"\u516b",romaji:"Hachi"},{category:"number",meaning:9,kana:"\u4e5d",romaji:"Kyuu/Ku"},{category:"number",meaning:10,kana:"\u5341",romaji:"Jyuu"},{category:"number",meaning:11,kana:"\u5341\u4e00",romaji:"Jyuu Ichi"},{category:"number",meaning:12,kana:"\u5341\u4e8c",romaji:"Jyuu Ni"},{category:"number",meaning:20,kana:"\u4e8c\u5341",romaji:"Ni Jyuu"},{category:"number",meaning:21,kana:"\u4e8c\u5341\u4e00",romaji:"Ni Jyuu Ichi"},{category:"number",meaning:30,kana:"\u4e09\u5341",romaji:"San Jyuu"},{category:"number",meaning:100,kana:"\u767e",romaji:"Hyaku"},{category:"number",meaning:101,kana:"\u767e\u4e00",romaji:"Hyaku Ichi"},{category:"number",meaning:123,kana:"\u767e\u4e8c\u5341\u4e09",romaji:"Hyaku Ni Jyuu San"},{category:"number",meaning:300,kana:"\u4e09\u767e",romaji:"San Byaku"},{category:"number",meaning:600,kana:"\u516d\u767e",romaji:"Roppyaku"},{category:"number",meaning:800,kana:"\u516b\u767e",romaji:"Happyaku"},{category:"number",meaning:1e3,kana:"\u5343",romaji:"Sen"},{category:"number",meaning:3e3,kana:"\u4e09\u5343",romaji:"San Zen"},{category:"number",meaning:8e3,kana:"\u516b\u5343",romaji:"Hassen"},{category:"number",meaning:1e4,kana:"\u4e00\u4e07",romaji:"Ichi-Man"},{category:"number",meaning:1e5,kana:"\u5341\u4e07",romaji:"Jyuu-Man"},{category:"number",meaning:1e6,kana:"\u767e\u4e07",romaji:"Hyaku-Man"}],this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}ngOnInit(){this.gs.isBrowser&&(this.getHirakata(),this.getAngka(),this.getKategori(),this.gs.isDarkMode||this.gs.toggleDarkTheme())}ngOnDestroy(){this.subsDialog?.unsubscribe(),this.subsHirakata?.unsubscribe(),this.subsAllNihongo?.unsubscribe(),this.subsAllKategori?.unsubscribe()}changeModeTampilan(a){this.gs.log("[BELAJAR_CHANGE_KANA]",a),this.modeTampilan=a,this.count=0,this.page=1,this.row=50,this.q="",this.resetPaginator()}applyFilter(a){this.gs.log("[BELAJAR_SEARCH_VALUE_CHANGED]",a),this.q=a.target.value.trim().toLowerCase(),this.resetPaginator()}paginatorChanged(a){this.gs.log("[BELAJAR_PAGINATOR_VALUE_CHANGED]",a),this.page=a.pageIndex+1,this.row=a.pageSize,this.gs.includesOneOf(this.modeTampilan,["hiragana","katakana","angka"])||(this.daftarNihongo=[],this.getData())}resetPaginator(){this.paginator?._changePageSize(this.pageSizeOptions[0]),this.paginator?.firstPage()}openDmak(a){this.gs.log("[BELAJAR_OPEN_DMAK]",a),this.subsDialog=this.ds.openDmakDialog({data:{romaji:a.romaji,hiragana_katakana_kanji:"hiragana"===this.modeTampilan?a.hiragana:a.katakana},disableClose:!1}).afterClosed().subscribe({next:e=>{this.gs.log("[BELAJAR_DMAK_DIALOG_CLOSED]",e),this.subsDialog.unsubscribe()}})}getHirakata(){this.bs.busy(),this.subsHirakata=this.nihon.getHirakata().subscribe({next:a=>{this.gs.log("[BELAJAR_HIRAKATA_SUCCESS]",a);const e={};for(const o of a.results)e[o.category]||(e[o.category]={}),e[o.category][o.segment]||(e[o.category][o.segment]=[]),e[o.category][o.segment].push({romaji:o.romaji,hiragana:o.hiragana,katakana:o.katakana});this.daftarHuruf=e,this.bs.idle()},error:a=>{this.gs.log("[BELAJAR_HIRAKATA_ERROR]",a,"error"),this.bs.idle()}})}getAngka(){const a=[];for(const e of this.dummyDataset)a.push({Angka:e.meaning,Kana:e.kana,Romaji:e.romaji});this.daftarAngka.row=a}getKategori(){this.bs.busy(),this.subsAllKategori=this.nihon.getAllKategori().subscribe({next:a=>{this.gs.log("[BELAJAR_KANA_KATEGORI_SUCCESS]",a),this.kategori=[...this.kategori,...a.results],this.bs.idle()},error:a=>{this.gs.log("[BELAJAR_KANA_KATEGORI_ERROR]",a,"error"),this.bs.idle()}})}getData(){this.bs.busy(),this.subsAllNihongo=this.nihon.getAllNihongo(this.modeTampilan,this.q,this.page,this.row).subscribe({next:a=>{this.gs.log("[BELAJAR_KANA_LIST_SUCCESS]",a),this.count=a.count,this.daftarNihongo=a.results,this.bs.idle()},error:a=>{this.gs.log("[BELAJAR_KANA_LIST_ERROR]",a,"error"),this.bs.idle()}})}editDataset(a){this.gs.log("[BELAJAR_DATASET_ADD_OR_EDIT_CLICK]",a),(!a&&this.as.currentUserSubject?.value?.verified||a&&(this.as.currentUserSubject?.value?.role===r.yS.ADMIN||this.as.currentUserSubject?.value?.role===r.yS.MODERATOR))&&(this.subsDialog=this.ds.openBelajarDialog({data:{title:a?"Edit Data":"Tambah Dataset",modeTampilan:this.modeTampilan,dataset:a,confirmText:"Simpan",cancelText:"Tutup"}}).afterClosed().subscribe({next:e=>{this.gs.log("[BELAJAR_DATASET_DIALOG_CLOSED]",e),this.getData(),this.subsDialog.unsubscribe()}}))}addDataset(){this.as.currentUserSubject?.value?this.as.currentUserSubject?.value?.verified?this.editDataset(null):(this.toast.warning("Khusus Pengguna Terverifikasi","Whoops!",null,!0),this.router.navigate(["/verify"],{queryParams:{returnUrl:this.router.url.split("?")[0]}})):this.router.navigate(["/login"],{queryParams:{returnUrl:"/nihongo/belajar"}})}}return n.\u0275fac=function(a){return new(a||n)(t.Y36(h.F0),t.Y36(L.k),t.Y36(rt.e),t.Y36(f.U),t.Y36(y.z),t.Y36(j.x),t.Y36(C.a))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-belajar"]],viewQuery:function(a,e){if(1&a&&t.Gf(T.NW,7),2&a){let o;t.iGM(o=t.CRH())&&(e.paginator=o.first)}},decls:29,vars:13,consts:[[1,"container"],[1,"row","pb-3","px-0"],[1,"col-lg-8","col-xl-9"],[1,"row"],[1,"col-12","sticky-top","bg-bifeldy","pb-3"],[1,"m-0","border-bottom","border-primary","row"],[1,"pt-3","col-6","col-lg-4",3,"color"],[3,"value","valueChange"],[3,"value",4,"ngFor","ngForOf"],["class","ms-auto pt-3 col-6 col-lg-4",3,"color",4,"ngIf"],[4,"ngIf","ngIfThen","ngIfElse"],["hirakata",""],["kataBendaLainnya",""],[1,"position-sticky","bottom-0"],["showFirstLastButtons","",1,"bg-bifeldy",3,"color","length","pageSizeOptions","page"],[1,"col-lg-4","col-xl-3"],[1,"row","sticky-top"],[1,"col-12"],["noData",""],["type","button","mat-fab","","color","warn","class","me-3 mb-5 fab-button animate__animated animate__bounce animate__infinite animate__slow","matTooltip","Tambah Dataset","style","position: fixed; bottom: 0; right: 0; z-index: 999999;",3,"click",4,"ngIf"],[3,"value"],[1,"ms-auto","pt-3","col-6","col-lg-4",3,"color"],["matInput","","maxlength","200","placeholder","Ex. \u81ea\u8ee2\u8eca\u3001\u30de\u30de\u30c1\u30e3\u30ea",3,"ngModel","keyup.enter","ngModelChange"],["fontIcon","search","matSuffix",""],[1,"col-12","col-md-6"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],["class","row text-center px-3",4,"ngFor","ngForOf"],[1,"row","text-center","px-3"],["class","col p-1",4,"ngFor","ngForOf"],[1,"col","p-1"],["class","rounded img-thumbnail","style","cursor: pointer;",3,"src","click",4,"ngIf"],[1,"rounded","img-thumbnail",2,"cursor","pointer",3,"src","click"],["angka",""],["selainAngka",""],[1,"p-3"],[3,"tableDataColumn","tableDataRow"],["class","col-12",4,"ngIf","ngIfElse"],["appDomChange","",1,"row","px-3"],["class","col-12 col-md-6 col-lg-4 col-xl-3 p-2",4,"ngFor","ngForOf"],[1,"col-12","col-md-6","col-lg-4","col-xl-3","p-2"],[1,"card",3,"click"],[1,"me-0",2,"cursor","pointer"],["mat-card-avatar","",2,"background-size","contain","border-radius","0","background-position","center","background-repeat","no-repeat"],[1,"text-warning","mb-1",2,"cursor","pointer"],["matLine","",1,"mb-0"],[1,"mb-0"],["matLine","",1,"m-0","text-success"],["matLine","",1,"m-0"],[1,"col-12","p-3"],["type","button","mat-fab","","color","warn","matTooltip","Tambah Dataset",1,"me-3","mb-5","fab-button","animate__animated","animate__bounce","animate__infinite","animate__slow",2,"position","fixed","bottom","0","right","0","z-index","999999",3,"click"],["fontIcon","add"]],template:function(a,e){if(1&a&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4)(6,"h3",5)(7,"mat-form-field",6)(8,"mat-label"),t._uU(9,"Pilih Kategori"),t.qZA(),t.TgZ(10,"mat-select",7),t.NdJ("valueChange",function(s){return e.modeTampilan=s})("valueChange",function(s){return e.changeModeTampilan(s)}),t.YNc(11,lt,2,2,"mat-option",8),t.qZA()(),t.YNc(12,ct,5,2,"mat-form-field",9),t.qZA()(),t.YNc(13,gt,1,0,"div",10),t.YNc(14,Ct,44,15,"ng-template",null,11,t.W1O),t.YNc(16,Ot,5,3,"ng-template",null,12,t.W1O),t.qZA(),t.TgZ(18,"div",13)(19,"mat-paginator",14),t.NdJ("page",function(s){return e.paginatorChanged(s)}),t.qZA()()(),t.TgZ(20,"div",15)(21,"div",16)(22,"div",17),t._UZ(23,"app-banner-donasi")(24,"app-banner-discord")(25,"app-stats-server"),t.qZA()()()()(),t.YNc(26,Et,1,0,"ng-template",null,18,t.W1O),t.YNc(28,Jt,2,0,"button",19)),2&a){const o=t.MAs(15),s=t.MAs(17);t.xp6(7),t.Q6J("color","accent"),t.xp6(3),t.Q6J("value",e.modeTampilan),t.xp6(1),t.Q6J("ngForOf",e.kategori),t.xp6(1),t.Q6J("ngIf","hiragana"!==e.modeTampilan&&"katakana"!==e.modeTampilan&&"angka"!==e.modeTampilan),t.xp6(1),t.Q6J("ngIf",("hiragana"===e.modeTampilan||"katakana"===e.modeTampilan)&&e.daftarHuruf)("ngIfThen",o)("ngIfElse",s),t.xp6(5),t.Udp("display","hiragana"!==e.modeTampilan&&"katakana"!==e.modeTampilan&&"angka"!==e.modeTampilan?"block":"none"),t.xp6(1),t.Q6J("color","accent")("length",e.count)("pageSizeOptions",e.pageSizeOptions),t.xp6(9),t.Q6J("ngIf","hiragana"!==e.modeTampilan&&"katakana"!==e.modeTampilan&&"angka"!==e.modeTampilan)}},dependencies:[c.sg,c.O5,_.Fj,_.JJ,_.nD,_.On,k.t,R.u,O.B,Z.ey,B.lW,m.a8,m.dk,m.n5,m.$j,m.kc,Z.X2,b.Hw,v.KE,v.hX,v.R9,w.Nt,T.NW,I.gD,q.gM,E.X,st.I,K.S,M.d,c.Nd]}),n})();function Bt(n,i){if(1&n&&(t.TgZ(0,"mat-option",17),t._uU(1),t.qZA()),2&n){const a=i.$implicit;t.s9C("value",a),t.xp6(1),t.hij("N",a,"")}}function Lt(n,i){if(1&n&&(t.TgZ(0,"mat-option",17),t._uU(1),t.qZA()),2&n){const a=i.$implicit;t.s9C("value",a),t.xp6(1),t.hij("Kelas ",a,"")}}function wt(n,i){1&n&&t._UZ(0,"app-no-data",18)}function It(n,i){if(1&n){const a=t.EpF();t.TgZ(0,"div",21)(1,"div",22),t.NdJ("click",function(){const s=t.CHM(a).$implicit,d=t.oxw(2);return t.KtG(d.openEdict(s))}),t.TgZ(2,"div",23)(3,"h5",24),t._uU(4),t.qZA(),t.TgZ(5,"div"),t._uU(6),t.qZA()(),t.TgZ(7,"div",25)(8,"span",26),t._uU(9),t.qZA(),t.TgZ(10,"span"),t._uU(11," - "),t.qZA(),t.TgZ(12,"span",27),t._uU(13),t.qZA()()()()}if(2&n){const a=i.$implicit;t.xp6(4),t.Oqu(a.character),t.xp6(2),t.Oqu(a.translate),t.xp6(3),t.hij("N",a.jlpt,""),t.xp6(4),t.hij("S",a.school,"")}}function qt(n,i){if(1&n&&(t.TgZ(0,"div",11)(1,"div",19),t.YNc(2,It,14,4,"div",20),t.qZA()()),2&n){const a=t.oxw();t.xp6(2),t.Q6J("ngForOf",a.kanjiData)}}const Kt=function(){return[5,4,3,2,1]},Mt=function(){return[1,2,3,4,5,6,7,8,9]};let Qt=(()=>{class n{constructor(a,e,o,s){this.gs=a,this.bs=e,this.nihon=o,this.ds=s,this.pageSizeOptions=[50,75,100,125,150],this.jlpt="",this.school="",this.count=0,this.page=1,this.row=50,this.q="",this.sort="",this.order="",this.kanjiData=[],this.subsKanji=null,this.subsDialog=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}ngOnInit(){this.gs.isBrowser&&(this.getKanji(),this.gs.isDarkMode||this.gs.toggleDarkTheme())}ngOnDestroy(){this.subsKanji?.unsubscribe(),this.subsDialog?.unsubscribe()}changeJlpt(a){this.gs.log("[JLPT_CHANGED]",a),this.jlpt=a,this.resetPaginator()}changeSchool(a){this.gs.log("[SCHOOL_CHANGED]",a),this.school=a,this.resetPaginator()}applyFilter(a){this.gs.log("[SEARCH_VALUE_CHANGED]",a),this.q=a.target.value.trim().toLowerCase(),this.resetPaginator()}paginatorChanged(a){this.gs.log("[PAGINATOR_VALUE_CHANGED]",a),this.page=a.pageIndex+1,this.row=a.pageSize,this.getKanji()}resetPaginator(){this.paginator._changePageSize(this.pageSizeOptions[0]),this.paginator.firstPage()}getKanji(){this.bs.busy(),this.subsKanji&&(this.subsKanji.unsubscribe(),this.bs.idle()),this.subsKanji=this.nihon.getAllKanji(this.jlpt,this.school,this.q,this.page,this.row,"context","asc").subscribe({next:a=>{this.gs.log("[KANJI_LIST_SUCCESS]",a),this.count=a.count,this.kanjiData=a.results,this.bs.idle()},error:a=>{this.gs.log("[KANJI_LIST_ERROR]",a,"error"),this.bs.idle()}})}openEdict(a){this.gs.log("[HIRAKATA_OPEN_EDICT]",a),this.subsDialog=this.ds.openEdictDialog({data:{character:a.character,context:a.context,freq:a.freq,gakken:a.gakken,harlpern_kkld:a.harlpern_kkld,harlpern_njecd:a.harlpern_njecd,jlpt:a.jlpt,maniette:a.maniette,nelson_c:a.nelson_c,nelson_n:a.nelson_n,remember:a.remember,school:a.school,skip:a.skip,stroke:a.stroke,translate:a.translate,v_kunyomi:a.v_kunyomi,v_onyomi:a.v_onyomi},disableClose:!1}).afterClosed().subscribe({next:e=>{this.gs.log("[EDICT_DIALOG_CLOSED]",e),this.subsDialog.unsubscribe()}})}}return n.\u0275fac=function(a){return new(a||n)(t.Y36(f.U),t.Y36(y.z),t.Y36(C.a),t.Y36(j.x))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-kanji"]],viewQuery:function(a,e){if(1&a&&t.Gf(T.NW,7),2&a){let o;t.iGM(o=t.CRH())&&(e.paginator=o.first)}},decls:30,vars:15,consts:[[1,"container"],[1,"row","pb-3","px-0"],[1,"col-12","sticky-top","bg-bifeldy","pb-3"],[1,"m-0","border-bottom","border-primary","row"],[1,"pt-3","col-4","col-lg-2",3,"color"],[3,"value","valueChange"],["value",""],[3,"value",4,"ngFor","ngForOf"],[1,"ms-auto","pt-3","col-4","col-lg-4",3,"color"],["matInput","","maxlength","200","placeholder","Ex. \u79c1",3,"ngModel","keyup.enter","ngModelChange"],["fontIcon","search","matSuffix",""],[1,"col-12"],[1,"row"],["class","col-12 p-3",4,"ngIf"],["class","col-12",4,"ngIf"],[1,"container","position-sticky","bottom-0"],["showFirstLastButtons","",1,"bg-bifeldy",3,"color","length","pageSizeOptions","page"],[3,"value"],[1,"col-12","p-3"],["appDomChange","",1,"row","px-3"],["class","col-6 col-md-3 col-lg-2 p-2",4,"ngFor","ngForOf"],[1,"col-6","col-md-3","col-lg-2","p-2"],[1,"card","text-center","p-3",2,"cursor","pointer",3,"click"],[1,"card-body","p-0"],[1,"card-title","py-3",2,"font-size","300%"],[1,"position-absolute","top-0","end-0",2,"margin-right","3px","font-size","x-small"],[1,"text-warning"],[1,"text-info"]],template:function(a,e){1&a&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1)(3,"div",2)(4,"h3",3)(5,"mat-form-field",4)(6,"mat-label"),t._uU(7,"JLPT"),t.qZA(),t.TgZ(8,"mat-select",5),t.NdJ("valueChange",function(s){return e.jlpt=s})("valueChange",function(s){return e.changeJlpt(s)}),t.TgZ(9,"mat-option",6),t._uU(10,"Semua"),t.qZA(),t.YNc(11,Bt,2,2,"mat-option",7),t.qZA()(),t.TgZ(12,"mat-form-field",4)(13,"mat-label"),t._uU(14,"Sekolah"),t.qZA(),t.TgZ(15,"mat-select",5),t.NdJ("valueChange",function(s){return e.school=s})("valueChange",function(s){return e.changeSchool(s)}),t.TgZ(16,"mat-option",6),t._uU(17,"Semua"),t.qZA(),t.YNc(18,Lt,2,2,"mat-option",7),t.qZA()(),t.TgZ(19,"mat-form-field",8)(20,"mat-label"),t._uU(21,"Cari ..."),t.qZA(),t.TgZ(22,"input",9),t.NdJ("keyup.enter",function(s){return e.applyFilter(s)})("ngModelChange",function(s){return e.q=s}),t.qZA(),t._UZ(23,"mat-icon",10),t.qZA()()(),t.TgZ(24,"div",11)(25,"div",12),t.YNc(26,wt,1,0,"app-no-data",13),t.YNc(27,qt,3,1,"div",14),t.qZA()()()(),t.TgZ(28,"div",15)(29,"mat-paginator",16),t.NdJ("page",function(s){return e.paginatorChanged(s)}),t.qZA()()),2&a&&(t.xp6(5),t.Q6J("color","accent"),t.xp6(3),t.Q6J("value",e.jlpt),t.xp6(3),t.Q6J("ngForOf",t.DdM(13,Kt)),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("value",e.school),t.xp6(3),t.Q6J("ngForOf",t.DdM(14,Mt)),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("ngModel",e.q),t.xp6(4),t.Q6J("ngIf",e.kanjiData.length<=0),t.xp6(1),t.Q6J("ngIf",e.kanjiData.length>0),t.xp6(2),t.Q6J("color","accent")("length",e.count)("pageSizeOptions",e.pageSizeOptions))},dependencies:[c.sg,c.O5,_.Fj,_.JJ,_.nD,_.On,k.t,Z.ey,b.Hw,v.KE,v.hX,v.R9,w.Nt,T.NW,I.gD,K.S,M.d]}),n})();var Ht=l(5934),Ft=l(7814),zt=l(2673),Yt=l(1617);function Pt(n,i){if(1&n){const a=t.EpF();t.TgZ(0,"div",23)(1,"div",6)(2,"div",7),t.NdJ("click",function(){const s=t.CHM(a).$implicit,d=t.oxw(2);return t.KtG(d.openProfile(s.value.username))}),t._UZ(3,"div",24),t.TgZ(4,"div"),t._uU(5),t.qZA()()()()}if(2&n){const a=i.$implicit,e=i.index;t.xp6(3),t.Jzz("\n background-image: url('",a.value.image_url,"');\n width: 64px;\n height: 64px;\n background-size: cover;\n background-position: center;\n "),t.Q6J("matBadge",null==a||null==a.value?null:a.value.profile_.points)("matBadgeColor",0===e?"warn":1===e?"primary":"accent"),t.xp6(1),t.Gre("pt-1 ",0===e?"gradient-text":"",""),t.xp6(1),t.Oqu(a.value.username)}}function Gt(n,i){1&n&&t._UZ(0,"div")}function $t(n,i){if(1&n&&t._UZ(0,"div",25),2&n){const a=t.oxw(2);t.Jzz("\n background-size: contain;\n background-position: center center;\n background-repeat: no-repeat;\n background-image: url('",a.getQuiz.question[a.question],"');\n ")}}function Wt(n,i){if(1&n){const a=t.EpF();t.TgZ(0,"div",26),t.NdJ("click",function(){t.CHM(a);const o=t.oxw(2);return t.KtG(o.openEdict())}),t._uU(1),t.qZA()}if(2&n){const a=t.oxw(2);t.xp6(1),t.hij(" ",a.swapOptions?a.getQuiz.question[a.question]:a.getQuiz.question[a.options]," ")}}function Xt(n,i){if(1&n){const a=t.EpF();t.TgZ(0,"div")(1,"div",27),t.NdJ("click",function(){const s=t.CHM(a).$implicit,d=t.oxw(2);return t.KtG(d.selectAnswer(s))}),t.TgZ(2,"div"),t._uU(3),t.qZA()()()}if(2&n){const a=i.$implicit,e=t.oxw(2);t.Gre("",e.ROUTER.url.startsWith("/nihongo/kelas-")||e.ROUTER.url.startsWith("/nihongo/jlpt-")||e.ROUTER.url.startsWith("/nihongo/semua-kanji")||e.ROUTER.url.startsWith("/nihongo/latihan-")?"col-md-6 col-12":"col-md-4 col-6"," p-2"),t.xp6(2),t.Gre("card-body ",e.ROUTER.url.startsWith("/nihongo/kelas-")||e.ROUTER.url.startsWith("/nihongo/jlpt-")||e.ROUTER.url.startsWith("/nihongo/semua-kanji")?"p-0":"px-0",""),t.Udp("font-size",e.ROUTER.url.startsWith("/nihongo/kelas-")||e.ROUTER.url.startsWith("/nihongo/jlpt-")||e.ROUTER.url.startsWith("/nihongo/semua-kanji")?"100%":"250%"),t.xp6(1),t.hij(" ",e.swapOptions?a[e.options]:a[e.question]," ")}}function Vt(n,i){if(1&n){const a=t.EpF();t.TgZ(0,"div",28)(1,"div",29),t.NdJ("click",function(){t.CHM(a);const o=t.oxw(2);return t.KtG(o.swapCharacter())}),t.TgZ(2,"div",30),t._uU(3,"\u{1f38c}"),t.qZA()()()}}function ta(n,i){if(1&n){const a=t.EpF();t.TgZ(0,"div",1)(1,"div",2)(2,"div",3),t.YNc(3,Pt,6,9,"div",4),t.ALo(4,"keyvalue"),t.TgZ(5,"div",5)(6,"div",6)(7,"div",7),t.NdJ("click",function(){t.CHM(a);const o=t.oxw();return t.KtG(o.openLiveChat())}),t._UZ(8,"div",8),t.TgZ(9,"div",9),t._uU(10,"Semua Peserta"),t.qZA()()()()(),t.TgZ(11,"div",10)(12,"div",2),t._UZ(13,"hr",11),t.qZA()(),t.TgZ(14,"div",10)(15,"div",12)(16,"div",10)(17,"div",13)(18,"div",14),t.YNc(19,Gt,1,0,"div",15),t.YNc(20,$t,1,3,"ng-template",null,16,t.W1O),t.YNc(22,Wt,2,1,"ng-template",null,17,t.W1O),t.qZA()()(),t.TgZ(24,"div",10)(25,"div",13)(26,"div",18),t.YNc(27,Xt,4,9,"div",19),t.YNc(28,Vt,4,0,"div",20),t.qZA()()()(),t.TgZ(29,"div",21),t._UZ(30,"app-live-chat",22),t.qZA()()()()}if(2&n){const a=t.MAs(21),e=t.MAs(23),o=t.oxw();t.xp6(3),t.Q6J("ngForOf",t.xi3(4,10,o.participants,o.scoreOrder)),t.xp6(5),t.Jzz("\n background-image: url('",o.ENV.baseUrl,"/assets/img/favicon.png');\n width: 64px;\n height: 64px;\n background-size: cover;\n background-position: center;\n "),t.xp6(11),t.Q6J("ngIf","image_url"===o.question)("ngIfThen",a)("ngIfElse",e),t.xp6(8),t.Q6J("ngForOf",o.getQuiz.options),t.xp6(1),t.Q6J("ngIf",!(o.ROUTER.url.startsWith("/nihongo/kelas-")||o.ROUTER.url.startsWith("/nihongo/jlpt-")||o.ROUTER.url.startsWith("/nihongo/semua-kanji")||o.ROUTER.url.startsWith("/nihongo/latihan-"))),t.xp6(2),t.Q6J("chatOnly",!0)}}let aa=(()=>{class n{constructor(a,e,o,s,d){this.router=a,this.gs=e,this.rps=o,this.quiz=s,this.ds=d,this.question="hiragana",this.options="romaji",this.swapOptions=!0,this.participants=null,this.subsParticipant=null,this.subsDialog=null,this.scoreOrder=(A,x)=>A.value.profile_.points>x.value.profile_.points?-1:x.value.profile_.points>A.value.profile_.points?1:0}get ENV(){return Ht.N}get ROUTER(){return this.router}get getQuiz(){return this.quiz.getCurrentQuizQuestion(this.router.url.split("?")[0])}ngOnDestroy(){this.subsParticipant?.unsubscribe(),this.subsDialog?.unsubscribe()}ngOnInit(){this.gs.isBrowser&&(this.subsParticipant=this.quiz.getCurrentQuizRoom().subscribe({next:a=>{this.participants=a?.member_list}}))}selectAnswer(a){this.quiz.answerQuestion({roomId:this.router.url.split("?")[0],randomInteger:this.getQuiz.randomInteger,answer:a})}swapCharacter(){this.swapOptions=!this.swapOptions}openLiveChat(){this.rps.toggleSidePanel("LiveChatComponent")}openProfile(a){this.router.navigateByUrl(`/user/${a}`)}openEdict(){this.gs.log("[QUIZ_OPEN_EDICT]",this.getQuiz),this.getQuiz.question.character&&(this.subsDialog=this.ds.openEdictDialog({data:this.getQuiz.question,disableClose:!1}).afterClosed().subscribe({next:a=>{this.gs.log("[EDICT_DIALOG_CLOSED]",a),this.subsDialog.unsubscribe()}}))}}return n.\u0275fac=function(a){return new(a||n)(t.Y36(h.F0),t.Y36(f.U),t.Y36(Ft.C),t.Y36(D),t.Y36(j.x))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-quiz"]],inputs:{question:"question",options:"options"},decls:1,vars:1,consts:[["class","row px-0",4,"ngIf"],[1,"row","px-0"],[1,"col-12"],[1,"row","w-100","ps-3",2,"display","inline-flex","flex-wrap","nowrap","overflow-x","hidden"],["class","p-2","style","width: auto;",4,"ngFor","ngForOf"],[1,"ms-auto","p-2","bg-bifeldy",2,"width","auto","position","sticky","right","0"],[1,"card","text-center","border-0",2,"width","64px","background","transparent !important"],[1,"card-body","p-0",2,"cursor","pointer",3,"click"],[1,"rounded-3"],[1,"pt-1"],[1,"row"],[1,"my-1","border-bottom-dotted",2,"height","4px","background","url('/assets/img/stripe.png')"],[1,"col-lg-8","col-xl-9","p-3","text-center"],[1,"col-12","p-4"],[1,"mx-auto","card","p-3"],[4,"ngIf","ngIfThen","ngIfElse"],["menengah",""],["bukanMenengah",""],[1,"row","text-center"],[3,"class",4,"ngFor","ngForOf"],["class","col-6 col-md-4 p-2",4,"ngIf"],[1,"col-lg-4","col-xl-3","d-none","d-lg-block","d-xl-block"],[3,"chatOnly"],[1,"p-2",2,"width","auto"],["matBadgePosition","below",1,"rounded-3",3,"matBadge","matBadgeColor"],[1,"card-body","p-3","py-5"],[1,"card-body","p-3","py-5",2,"cursor","pointer","font-size","500%",3,"click"],[1,"card","p-3","m-1",2,"cursor","pointer",3,"click"],[1,"col-6","col-md-4","p-2"],["matTooltip","Tukar Huruf",1,"card","p-3","m-1",2,"cursor","pointer",3,"click"],[1,"card-body","px-0",2,"font-size","250%"]],template:function(a,e){1&a&&t.YNc(0,ta,31,13,"div",0),2&a&&t.Q6J("ngIf",e.getQuiz)},dependencies:[c.sg,c.O5,zt.k,q.gM,Yt.u,c.Nd]}),n})();function na(n,i){if(1&n&&t._UZ(0,"app-quiz",2),2&n){const a=t.oxw();t.Q6J("question",a.GS.routerData.question)("options",a.GS.routerData.options)}}let p=(()=>{class n{constructor(a,e,o,s){this.router=a,this.toast=e,this.gs=o,this.ss=s,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get GS(){return this.gs}ngOnInit(){this.gs.isBrowser&&(this.ss.mySocket?.id||(this.toast.warning("Tidak Dapat Terhubung Melalui Web Socket","Gagal Menyambung Ke Jaringan!",null,!0),this.router.navigateByUrl("/nihongo")),this.gs.isDarkMode||this.gs.toggleDarkTheme())}}return n.\u0275fac=function(a){return new(a||n)(t.Y36(h.F0),t.Y36(L.k),t.Y36(f.U),t.Y36(J.R))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-tes"]],decls:3,vars:1,consts:[[1,"container"],[3,"question","options",4,"ngIf"],[3,"question","options"]],template:function(a,e){1&a&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0),t.YNc(2,na,1,2,"app-quiz",1),t.qZA()),2&a&&(t.xp6(2),t.Q6J("ngIf",e.GS.routerData.question&&e.GS.routerData.options))},dependencies:[c.O5,k.t,aa]}),n})();var ea=l(8613),ia=l(4854),oa=l(669),ra=l(913),sa=l(6436),Q=l(5116);let la=(()=>{class n{}return n.\u0275fac=function(a){return new(a||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({imports:[c.ez,h.Bz,N.m,Q.d]}),n})();var ca=l(617);let ga=(()=>{class n{}return n.\u0275fac=function(a){return new(a||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({imports:[c.ez,N.m,h.Bz]}),n})();var ua=l(2438),pa=l(1838),ma=l(7956);const da=[{path:"",pathMatch:"full",component:ot},{path:"belajar",component:Dt,data:{title:"Huruf, Angka, Warna, Buah & Sayur, Dan Lingkungan Sekitar",description:"Mengenal Sambil Belajar Berbagai Macam",keywords:"Sesuatu Yang Sering Kita Temukan",question:null,options:null}},{path:"kanji",component:Qt,data:{title:"Huruf Kanji",description:"Mengenal Huruf Kanji Sesuai Rank JLPT & Sekolah",keywords:"Kanji",question:null,options:null}},{path:"hiragana",component:p,canActivate:[u.t],data:{title:"Tes Huruf Hiragana",description:"Uji Kemampuan Huruf Hiragana",keywords:"Hiragana",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"hiragana",options:"romaji"}},{path:"katakana",component:p,canActivate:[u.t],data:{title:"Tes Huruf Katakana",description:"Uji Kemampuan Huruf Katakana",keywords:"Katakana",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"katakana",options:"romaji"}},{path:"jlpt-n5",component:p,canActivate:[u.t],data:{title:"Tes Huruf N5",description:"Uji Kemampuan Huruf N5",keywords:"N5",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"jlpt-n4",component:p,canActivate:[u.t],data:{title:"Tes Huruf N4",description:"Uji Kemampuan Huruf N4",keywords:"N4",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"jlpt-n3",component:p,canActivate:[u.t],data:{title:"Tes Huruf N3",description:"Uji Kemampuan Huruf N3",keywords:"N3",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"jlpt-n2",component:p,canActivate:[u.t],data:{title:"Tes Huruf N2",description:"Uji Kemampuan Huruf N2",keywords:"N2",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"jlpt-n1",component:p,canActivate:[u.t],data:{title:"Tes Huruf N1",description:"Uji Kemampuan Huruf N1",keywords:"N1",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"kelas-1",component:p,canActivate:[u.t],data:{title:"Tes Huruf Kelas 1",description:"Uji Kemampuan Huruf Kelas 1",keywords:"Kelas 1",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"kelas-2",component:p,canActivate:[u.t],data:{title:"Tes Huruf Kelas 2",description:"Uji Kemampuan Huruf Kelas 2",keywords:"Kelas 2",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"kelas-3",component:p,canActivate:[u.t],data:{title:"Tes Huruf Kelas 3",description:"Uji Kemampuan Huruf Kelas 3",keywords:"Kelas 3",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"kelas-4",component:p,canActivate:[u.t],data:{title:"Tes Huruf Kelas 4",description:"Uji Kemampuan Huruf Kelas 4",keywords:"Kelas 4",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"kelas-5",component:p,canActivate:[u.t],data:{title:"Tes Huruf Kelas 5",description:"Uji Kemampuan Huruf Kelas 5",keywords:"Kelas 5",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"kelas-6",component:p,canActivate:[u.t],data:{title:"Tes Huruf Kelas 6",description:"Uji Kemampuan Huruf Kelas 6",keywords:"Kelas 6",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"kelas-lanjutan-1",component:p,canActivate:[u.t],data:{title:"Tes Huruf Lanjutan 1",description:"Uji Kemampuan Huruf Lanjutan 1",keywords:"Lanjutan 1",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"kelas-lanjutan-2",component:p,canActivate:[u.t],data:{title:"Tes Huruf Lanjutan 2",description:"Uji Kemampuan Huruf Lanjutan 2",keywords:"Lanjutan 2",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"semua-kanji",component:p,canActivate:[u.t],data:{title:"Tes Huruf Semua Kanji",description:"Uji Kemampuan Huruf Semua Kanji",keywords:"Semua Kanji",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:":category",component:p,canActivate:[u.t],data:{title:"Tes Kategori Lainnya",description:"Uji Kemampuan Kategori Lainnya",keywords:"Kategori Lainnya",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"image_url",options:"kana"}}];let ha=(()=>{class n{}return n.\u0275fac=function(a){return new(a||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({imports:[c.ez,h.Bz.forChild(da),_.u5,_.UX,ea.F,pa.R,ia.R,ra.g,sa.L,N.m,F.Ad,H.UM,oa.A,Q.d,la,ca.H,ma.C,ga,ua.d]}),n})()}}]); \ No newline at end of file diff --git a/dist/fansubid/browser/794.e9d71d70da4f14f5.js b/dist/fansubid/browser/794.489ee51efe96d202.js similarity index 99% rename from dist/fansubid/browser/794.e9d71d70da4f14f5.js rename to dist/fansubid/browser/794.489ee51efe96d202.js index e55d06d6c..5da8710c2 100644 --- a/dist/fansubid/browser/794.e9d71d70da4f14f5.js +++ b/dist/fansubid/browser/794.489ee51efe96d202.js @@ -1 +1 @@ -"use strict";(self.webpackChunkfansubid=self.webpackChunkfansubid||[]).push([[794],{2794:(B,C,o)=>{o.r(C),o.d(C,{UserModule:()=>ee});var m=o(6895),r=o(1390),u=o(4006),U=o(7375),f=o(3170),g=o(6271),d=o(4249),D=o(2777),P=o(7355),w=o(210),_=o(6020),b=o(6436),p=o(4167),x=o(8613),T=o(2438),v=o(5934),t=o(4650),F=o(7009),Z=o(257),O=o(3e3),J=o(6382),Y=o(8745),L=o(8058),q=o(8381),Q=o(8987),y=o(4859),H=o(3238),K=o(7392),E=o(6338),N=o(266),V=o(7567),j=o(8757),$=o(325);function z(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-icon",31),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.badgeClicked(n.userData.role))}),t.qZA()}if(2&i){const e=t.oxw(2);t.s9C("matTooltip",e.userData.role)}}function W(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-icon",32),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.badgeClicked(n.userData.role))}),t.qZA()}if(2&i){const e=t.oxw(2);t.s9C("matTooltip",e.userData.role)}}function X(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-icon",33),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.badgeClicked(n.userData.role))}),t.qZA()}if(2&i){const e=t.oxw(2);t.s9C("matTooltip",e.userData.role)}}function tt(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-icon",34),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.badgeClicked("Terverifikasi"))}),t.qZA()}}function et(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-icon",35),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.badgeClicked("Banned :: "+n.userBanned.reason))}),t.qZA()}if(2&i){const e=t.oxw(2);t.MGl("matTooltip","Banned :: ",e.userBanned.reason,"")}}function it(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-icon",36),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.badgeClicked(n.accountAge+" Years of Service"))}),t.qZA()}if(2&i){const e=t.oxw(2);t.MGl("matTooltip","",e.accountAge," Years of Service")}}function st(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-icon",37),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.badgeClicked("Sharing is Caring"))}),t.qZA()}}function nt(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-icon",38),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.badgeClicked("Akun Private"))}),t.qZA()}}function ot(i,a){if(1&i&&(t.TgZ(0,"mat-list-option",47),t._UZ(1,"img",48),t.TgZ(2,"a",49)(3,"span",50),t._uU(4),t.qZA(),t.TgZ(5,"span",51),t._uU(6),t.qZA()()()),2&i){const e=a.$implicit;t.MGl("routerLink","/fansub/",e.fansub_.slug,""),t.xp6(1),t.s9C("src",e.fansub_.image_url,t.LSH),t.xp6(3),t.hij(" ",e.keterangan," "),t.xp6(2),t.Oqu(e.fansub_.slug)}}function at(i,a){if(1&i&&(t.TgZ(0,"div",6)(1,"div",39)(2,"div",40)(3,"h2",41)(4,"b",42),t._uU(5,"Group Fansub"),t.qZA()()(),t.TgZ(6,"div",43)(7,"div",44)(8,"mat-selection-list",45),t.YNc(9,ot,7,4,"mat-list-option",46),t.qZA()()()()()),2&i){const e=t.oxw(2);t.xp6(8),t.Q6J("multiple",!1),t.xp6(1),t.Q6J("ngForOf",e.groupFansub)}}function rt(i,a){if(1&i&&(t.TgZ(0,"button",52),t._UZ(1,"mat-icon",53),t._uU(2),t.qZA()),2&i){const e=t.oxw(2);t.xp6(2),t.hij(" ",e.userData.id," ")}}function lt(i,a){if(1&i&&(t.TgZ(0,"button",54),t._UZ(1,"mat-icon",55),t._uU(2),t.ALo(3,"date"),t.qZA()),2&i){const e=t.oxw(2);t.xp6(2),t.hij(" ",t.xi3(3,1,e.userData.created_at,"d/M/yyyy, hh:mm:ss a z")," ")}}function ut(i,a){if(1&i&&(t.TgZ(0,"div",39),t._UZ(1,"app-material-expansion-panel",56),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("panelData",e.panelData)}}function ct(i,a){1&i&&(t.TgZ(0,"div",39)(1,"div",6),t._UZ(2,"app-report"),t.qZA()())}function pt(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"div",6),t._UZ(6,"img",7),t.qZA(),t.TgZ(7,"div",8),t.YNc(8,z,1,1,"mat-icon",9),t.YNc(9,W,1,1,"mat-icon",10),t.YNc(10,X,1,1,"mat-icon",11),t.YNc(11,tt,1,0,"mat-icon",12),t.YNc(12,et,1,1,"mat-icon",13),t.YNc(13,it,1,1,"mat-icon",14),t.YNc(14,st,1,0,"mat-icon",15),t.YNc(15,nt,1,0,"mat-icon",16),t.qZA(),t.YNc(16,at,10,2,"div",17),t.qZA()(),t.TgZ(17,"div",18)(18,"div",19)(19,"h1",20)(20,"b"),t._uU(21),t.qZA()()(),t.TgZ(22,"div",21),t.YNc(23,rt,3,1,"button",22),t.YNc(24,lt,4,4,"button",23),t.TgZ(25,"button",24),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.createMailbox())}),t._UZ(26,"mat-icon",25),t._uU(27),t.qZA()(),t.YNc(28,ut,2,1,"div",26),t.YNc(29,ct,3,0,"div",26),t.qZA()(),t.TgZ(30,"div",27)(31,"div",6)(32,"app-material-tab",28),t.NdJ("tableRowClicked",function(n){t.CHM(e);const l=t.oxw();return t.KtG(l.openBerkas(n))})("paginatorClicked",function(n){t.CHM(e);const l=t.oxw();return t.KtG(l.onPaginatorClicked(n))})("serverSideFilter",function(n){t.CHM(e);const l=t.oxw();return t.KtG(l.onServerSideFilter(n))})("serverSideOrder",function(n){t.CHM(e);const l=t.oxw();return t.KtG(l.onServerSideOrder(n))}),t.qZA()()()(),t._UZ(33,"div",29)(34,"div",30),t.qZA()}if(2&i){const e=t.oxw();t.xp6(6),t.s9C("src",e.userData.image_url,t.LSH),t.xp6(2),t.Q6J("ngIf",e.userData.role===e.ADMIN),t.xp6(1),t.Q6J("ngIf",e.userData.role===e.MODERATOR),t.xp6(1),t.Q6J("ngIf",e.userData.role===e.FANSUBBER),t.xp6(1),t.Q6J("ngIf",e.userData.verified),t.xp6(1),t.Q6J("ngIf",e.userBanned),t.xp6(1),t.Q6J("ngIf",e.accountAge>0),t.xp6(1),t.Q6J("ngIf",e.count>0),t.xp6(1),t.Q6J("ngIf",e.userData.private),t.xp6(1),t.Q6J("ngIf",e.groupFansub.length>0),t.xp6(5),t.Oqu(e.userData.kartu_tanda_penduduk_.nama),t.xp6(2),t.Q6J("ngIf",e.userData.id),t.xp6(1),t.Q6J("ngIf",e.userData.created_at),t.xp6(3),t.AsE(" ",e.userData.username,"@",e.ENV.domain," "),t.xp6(1),t.Q6J("ngIf",e.panelData.length>0),t.xp6(1),t.Q6J("ngIf",null==e.SS.mySocket?null:e.SS.mySocket.id),t.xp6(3),t.Q6J("tabData",e.tabData)("count",e.count)("serverSide",!0),t.xp6(1),t.Udp("background-image","url("+e.userData.profile_.cover_url+")")}}let mt=(()=>{class i{constructor(e,s,n,l,c,h,A,k,S,I){this.snackBar=e,this.router=s,this.activatedRoute=n,this.gs=l,this.bs=c,this.fs=h,this.pi=A,this.us=k,this.ss=S,this.berkas=I,this.username="",this.userData=null,this.userBanned=null,this.groupFansub=[],this.berkasUser=[],this.allBerkasUserId=[],this.panelData=[],this.tabData=[{name:"Berkas",icon:"file_copy",type:"table",data:{column:["Proyek","Nama Berkas","Tanggal","Kunjungan","Pemilik"],row:[]}}],this.count=0,this.page=1,this.row=10,this.q="",this.sort="",this.order="",this.subsUser=null,this.subsBerkas=null,this.subsBanned=null,this.subsParam=null,this.subsGroupGet=null,this.subsTrusted=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get SS(){return this.ss}ngOnDestroy(){this.subsUser?.unsubscribe(),this.subsBerkas?.unsubscribe(),this.subsBanned?.unsubscribe(),this.subsParam?.unsubscribe(),this.subsGroupGet?.unsubscribe(),this.subsTrusted?.unsubscribe()}get ADMIN(){return d.yS.ADMIN}get MODERATOR(){return d.yS.MODERATOR}get FANSUBBER(){return d.yS.FANSUBBER}get accountAge(){return Math.abs(new Date(Date.now()-new Date(this.userData.created_at).getTime()).getUTCFullYear()-1970)}get ENV(){return v.N}ngOnInit(){this.subsParam=this.activatedRoute.params.subscribe({next:e=>{this.username=e.username,this.bs.busy(),this.subsUser=this.us.getUserData(this.username).subscribe({next:s=>{this.gs.log("[USER_DETAIL_SUCCESS]",s),this.userData=s.result,this.pi.updatePageMetaData(`${this.userData.kartu_tanda_penduduk_.nama}`,`${this.userData.profile_.description}`,`${this.userData.username}`,this.userData.image_url,this.userData.username),this.bs.idle(),this.gs.isBrowser&&(this.panelData=[],this.panelData.push({title:"Tentang Saya",icon:"info",text:this.userData.profile_.description}),this.fs.initializeFab("edit",null,"Ubah Profil",`/user/${this.username}/edit`,!1),this.checkBanned(),this.getUserGroup(),this.getUserBerkas())},error:s=>{this.gs.log("[USER_DETAIL_ERROR]",s,"error"),this.bs.idle(),this.router.navigate(["/error"],{queryParams:{returnUrl:"/"}})}})}})}checkBanned(){this.bs.busy(),this.subsBanned=this.us.checkBanned(this.userData.username).subscribe({next:e=>{this.gs.log("[USER_CHECK_BANNED_SUCCESS]",e),Object.keys(e.results[this.userData.username]).length>0&&(this.userBanned=e.results[this.userData.username]),this.bs.idle()},error:e=>{this.gs.log("[USER_CHECK_BANNED_ERROR]",e,"error"),this.bs.idle()}})}getUserBerkas(){this.bs.busy(),this.subsBerkas&&(this.subsBerkas.unsubscribe(),this.bs.idle()),this.subsBerkas=this.us.getUserBerkas(this.username,this.q,this.page,this.row,this.sort,this.order).subscribe({next:e=>{this.gs.log("[USER_BERKAS_LIST_SUCCESS]",e),this.count=e.count,this.berkasUser=[];for(const s of e.results)this.allBerkasUserId.push(s.id),this.berkasUser.push({id:s.id,private:s.private,foto:s.user_.image_url,Proyek:s.project_type_.name,Tanggal:s.created_at,Kunjungan:s.view_count,Pemilik:s.user_.username,"Nama Berkas":s.name});this.tabData[0].data.row=this.berkasUser,this.allBerkasUserId.length>0&&this.checkTrusted(),this.bs.idle()},error:e=>{this.gs.log("[USER_BERKAS_LIST_ERROR]",e,"error"),this.bs.idle()}})}checkTrusted(){this.bs.busy(),this.subsTrusted&&(this.subsTrusted.unsubscribe(),this.bs.idle()),this.subsTrusted=this.berkas.checkTrusted(this.allBerkasUserId).subscribe({next:e=>{this.gs.log("[USER_BERKAS_TRUSTED_SUCCESS]",e);for(const s of this.berkasUser)s.trusted=e.results[s.id];this.bs.idle()},error:e=>{this.gs.log("[USER_BERKAS_TRUSTED_ERROR]",e,"error"),this.bs.idle()}})}openBerkas(e){this.gs.log("[USER_BERKAS_LIST_CLICK_BERKAS]",e),this.router.navigateByUrl(`/berkas/${e.id}`)}onPaginatorClicked(e){this.gs.log("[USER_BERKAS_LIST_CLICK_PAGINATOR]",e),this.page=e.pageIndex+1,this.row=e.pageSize,this.getUserBerkas()}onServerSideFilter(e){this.gs.log("[USER_BERKAS_LIST_ENTER_FILTER]",e),this.q=e,this.getUserBerkas()}onServerSideOrder(e){this.gs.log("[USER_BERKAS_CLICK_ORDER]",e),this.q=e.q,this.sort=e.active,this.order=e.direction,this.getUserBerkas()}getUserGroup(){this.bs.busy(),this.subsGroupGet=this.us.getUserGroup(this.username).subscribe({next:e=>{this.gs.log("[USER_DETAIL_GROUP_LIST_SUCCESS]",e),this.groupFansub=e.results,this.bs.idle()},error:e=>{this.gs.log("[USER_DETAIL_GROUP_LIST_ERROR]",e,"error"),this.bs.idle()}})}createMailbox(){this.router.navigate(["/create/mailbox"],{queryParams:{to:`${this.userData.username}@${v.N.domain}`}})}badgeClicked(e){this.snackBar.open(e,"Ok")}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(F.ux),t.Y36(r.F0),t.Y36(r.gz),t.Y36(Z.U),t.Y36(O.z),t.Y36(J.r),t.Y36(Y.Z),t.Y36(L.K),t.Y36(q.R),t.Y36(Q.A))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-user-detail"]],decls:1,vars:1,consts:[["class","container",4,"ngIf"],[1,"container"],[1,"profile-info","align-items-center",2,"top","64px","position","relative"],[1,"row","py-3","px-2"],[1,"col-md-4","col-xl-3","px-3"],[1,"row","sticky-top","pt-3"],[1,"col-12"],[1,"profile-image",3,"src"],[1,"col-12","my-3"],["fontIcon","handyman","class","mx-1","style","cursor: pointer;",3,"matTooltip","click",4,"ngIf"],["fontIcon","security","class","mx-1","style","cursor: pointer;",3,"matTooltip","click",4,"ngIf"],["fontIcon","rate_review","class","mx-1","style","cursor: pointer;",3,"matTooltip","click",4,"ngIf"],["fontIcon","verified","class","mx-1","matTooltip","Terverifikasi","style","cursor: pointer;",3,"click",4,"ngIf"],["fontIcon","lock","class","mx-1","style","cursor: pointer;",3,"matTooltip","click",4,"ngIf"],["fontIcon","military_tech","class","mx-1","style","cursor: pointer;",3,"matTooltip","click",4,"ngIf"],["fontIcon","volunteer_activism","class","mx-1","matTooltip","Sharing is Caring","style","cursor: pointer;",3,"click",4,"ngIf"],["fontIcon","sensor_occupied","class","mx-1","matTooltip","Akun Private","style","cursor: pointer;",3,"click",4,"ngIf"],["class","col-12",4,"ngIf"],[1,"col-md-8","col-xl-9","pt-3"],[1,"row","py-3","px-0","profile-height-large"],[1,"m-0","mt-auto"],[1,"row","p-3"],["type","button","mat-stroked-button","","matLine","","class","col-12 col-md-4 text-truncate","matTooltip","Nomor ID Pengguna","color","accent","style","overflow: hidden;",4,"ngIf"],["type","button","mat-stroked-button","","matLine","","class","col-12 col-md-8 text-truncate","matTooltip","Tanggal Bergabung","color","accent","style","overflow: hidden;",4,"ngIf"],["type","button","mat-stroked-button","","matLine","","matTooltip","Alamat Surel","color","accent",1,"col","text-truncate",2,"overflow","hidden",3,"click"],["fontIcon","email",1,"me-1"],["class","row py-3",4,"ngIf"],[1,"row"],[3,"tabData","count","serverSide","tableRowClicked","paginatorClicked","serverSideFilter","serverSideOrder"],[1,"profile-banner","profile-banner-1","align-items-center"],[1,"profile-banner","profile-banner-2","align-items-center"],["fontIcon","handyman",1,"mx-1",2,"cursor","pointer",3,"matTooltip","click"],["fontIcon","security",1,"mx-1",2,"cursor","pointer",3,"matTooltip","click"],["fontIcon","rate_review",1,"mx-1",2,"cursor","pointer",3,"matTooltip","click"],["fontIcon","verified","matTooltip","Terverifikasi",1,"mx-1",2,"cursor","pointer",3,"click"],["fontIcon","lock",1,"mx-1",2,"cursor","pointer",3,"matTooltip","click"],["fontIcon","military_tech",1,"mx-1",2,"cursor","pointer",3,"matTooltip","click"],["fontIcon","volunteer_activism","matTooltip","Sharing is Caring",1,"mx-1",2,"cursor","pointer",3,"click"],["fontIcon","sensor_occupied","matTooltip","Akun Private",1,"mx-1",2,"cursor","pointer",3,"click"],[1,"row","py-3"],[1,"col-12","pt-3","sticky-top","bg-bifeldy"],[1,"border-bottom-dotted"],[1,"text-bifeldy"],[1,"col-12",2,"max-height","288px"],[1,"h-100",2,"overflow-y","auto"],[3,"multiple"],["class","h-100",3,"routerLink",4,"ngFor","ngForOf"],[1,"h-100",3,"routerLink"],["matListAvatar","",1,"ms-3",2,"border-radius","0",3,"src"],[1,"text-truncate","text-decoration-none"],[1,"bg-bifeldy","px-2","me-1","text-warning",2,"position","absolute","right","0"],[1,"text-success"],["type","button","mat-stroked-button","","matLine","","matTooltip","Nomor ID Pengguna","color","accent",1,"col-12","col-md-4","text-truncate",2,"overflow","hidden"],["fontIcon","accessibility_new",1,"me-1"],["type","button","mat-stroked-button","","matLine","","matTooltip","Tanggal Bergabung","color","accent",1,"col-12","col-md-8","text-truncate",2,"overflow","hidden"],["fontIcon","access_time",1,"me-1"],[3,"panelData"]],template:function(e,s){1&e&&t.YNc(0,pt,35,22,"div",0),2&e&&t.Q6J("ngIf",s.userData)},dependencies:[m.sg,m.O5,r.rH,y.lW,H.X2,K.Hw,E.eA,E.Ub,E.vS,N.gM,V.Q,j.H,$.Y,m.uU],styles:[".profile-banner[_ngcontent-%COMP%]{height:192px;width:100%;background-size:cover;background-position:center;background-repeat:no-repeat;opacity:.75}.profile-banner-1[_ngcontent-%COMP%]{position:absolute;top:0;left:0}.profile-banner-2[_ngcontent-%COMP%]{position:absolute;top:192px;left:0}.profile-info[_ngcontent-%COMP%]{position:relative;height:256px;z-index:1}.profile-image[_ngcontent-%COMP%]{width:50%}@media only screen and (min-width: 769px){.profile-height-large[_ngcontent-%COMP%]{height:100px}.profile-image[_ngcontent-%COMP%]{width:100%}}@media only screen and (max-width: 768px){.profile-image[_ngcontent-%COMP%]{padding-top:3rem}}"]}),i})();var _t=o(4425),G=o(4137),gt=o(7845),dt=o(6781),ht=o(9731);let ft=(()=>{class i{constructor(e,s){this.api=e,this.gs=s}getUserApiKey(e){return this.api.getData(`/api-key?username=${e}`)}createApiKey(e){return this.api.postData("/api-key",e)}editApiKey(e,s){return this.api.putData(`/api-key/${e}`,s)}revokeApiKey(e){return this.api.deleteData(`/api-key/${e}`)}}return i.\u0275fac=function(e){return new(e||i)(t.LFG(ht.s),t.LFG(Z.U))},i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var bt=o(8020),xt=o(8616),vt=o(192),Ut=o(6766);function Tt(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-list-option",27),t._UZ(1,"mat-icon",28),t.TgZ(2,"a",29),t.NdJ("click",function(){const l=t.CHM(e).$implicit,c=t.oxw(2);return t.KtG(c.openComment(l))}),t.TgZ(3,"span",30),t._uU(4),t.ALo(5,"dateAgo"),t.qZA(),t.TgZ(6,"span",31),t._uU(7),t.qZA()()()}if(2&i){const e=a.$implicit;t.xp6(4),t.Oqu(t.lcZ(5,2,e.created_at)),t.xp6(3),t.Oqu(e.comment)}}function Et(i,a){if(1&i&&(t.TgZ(0,"div",11)(1,"mat-selection-list",25),t.YNc(2,Tt,8,4,"mat-list-option",26),t.ALo(3,"slice"),t.qZA()()),2&i){const e=t.oxw();t.xp6(1),t.Q6J("multiple",!1),t.xp6(1),t.Q6J("ngForOf",t.Dn7(3,2,e.feedKomentarData,0,5))}}function Ct(i,a){if(1&i&&(t.TgZ(0,"mat-list-option",27),t._UZ(1,"mat-icon",32),t.TgZ(2,"a",33)(3,"span",30),t._uU(4),t.ALo(5,"dateAgo"),t.qZA(),t.TgZ(6,"span",34),t._uU(7),t.qZA(),t.TgZ(8,"span",35),t._uU(9),t.qZA(),t.TgZ(10,"span",31),t._uU(11),t.qZA()()()),2&i){const e=a.$implicit;t.xp6(2),t.Q6J("routerLink",e.berkas_?"/berkas/"+(null==e.berkas_?null:e.berkas_.id):e.fansub_?"/fansub/"+(null==e.fansub_?null:e.fansub_.slug):e.user_?"/user/"+(null==e.user_?null:e.user_.username):e.news_?"/news/"+(null==e.news_?null:e.news_.id):""),t.xp6(2),t.Oqu(t.lcZ(5,5,e.created_at)),t.xp6(3),t.Oqu(e.type),t.xp6(2),t.Oqu(e.berkas_?"Berkas":e.fansub_?"Fansub":e.user_?"User":e.news_?"News":""),t.xp6(2),t.Oqu((null==e.berkas_?null:e.berkas_.name)||(null==e.fansub_?null:e.fansub_.name)||(null==e.user_||null==e.user_.kartu_tanda_penduduk_?null:e.user_.kartu_tanda_penduduk_.nama)||(null==e.news_?null:e.news_.title))}}function At(i,a){if(1&i&&(t.TgZ(0,"div",11)(1,"mat-selection-list",25),t.YNc(2,Ct,12,7,"mat-list-option",26),t.ALo(3,"slice"),t.qZA()()),2&i){const e=t.oxw();t.xp6(1),t.Q6J("multiple",!1),t.xp6(1),t.Q6J("ngForOf",t.Dn7(3,2,e.feedLikeDislikeData,0,5))}}function kt(i,a){if(1&i&&(t.TgZ(0,"mat-list-option",27),t._UZ(1,"mat-icon",36),t.TgZ(2,"a",33)(3,"span",30),t._uU(4),t.ALo(5,"dateAgo"),t.qZA(),t.TgZ(6,"span",35),t._uU(7),t.qZA(),t.TgZ(8,"span",31),t._uU(9),t.qZA()()()),2&i){const e=a.$implicit;t.xp6(2),t.Q6J("routerLink",e.berkas_?"/berkas/"+(null==e.berkas_?null:e.berkas_.id):e.fansub_?"/fansub/"+(null==e.fansub_?null:e.fansub_.slug):e.user_?"/user/"+(null==e.user_?null:e.user_.username):e.news_?"/news/"+(null==e.news_?null:e.news_.id):""),t.xp6(2),t.Oqu(t.lcZ(5,4,e.created_at)),t.xp6(3),t.Oqu(e.berkas_?"Berkas":e.fansub_?"Fansub":e.user_?"User":e.news_?"News":""),t.xp6(2),t.Oqu((null==e.berkas_?null:e.berkas_.name)||(null==e.fansub_?null:e.fansub_.name)||(null==e.user_||null==e.user_.kartu_tanda_penduduk_?null:e.user_.kartu_tanda_penduduk_.nama)||(null==e.news_?null:e.news_.title))}}function St(i,a){if(1&i&&(t.TgZ(0,"div",11)(1,"mat-selection-list",25),t.YNc(2,kt,10,6,"mat-list-option",26),t.ALo(3,"slice"),t.qZA()()),2&i){const e=t.oxw();t.xp6(1),t.Q6J("multiple",!1),t.xp6(1),t.Q6J("ngForOf",t.Dn7(3,2,e.feedVisitData,0,5))}}function It(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",37),t.NdJ("click",function(){const l=t.CHM(e).$implicit,c=t.oxw();return c.copyApiKey(l),t.KtG(c.editApiKey(l))}),t.TgZ(1,"p",38),t._uU(2," Nama :: "),t.TgZ(3,"span",39),t._uU(4),t.qZA()(),t.TgZ(5,"p",40),t._uU(6," Origin :: "),t.TgZ(7,"span",39),t._uU(8),t.qZA()(),t.TgZ(9,"p",41),t._uU(10," Key :: "),t.TgZ(11,"span",39),t._uU(12),t.qZA()(),t.TgZ(13,"a",17),t.NdJ("click",function(n){const c=t.CHM(e).$implicit,h=t.oxw();return n.stopPropagation(),t.KtG(h.revokeApiKey(c))}),t._UZ(14,"mat-icon",42),t._uU(15," Hapus Akses "),t.qZA()()}if(2&i){const e=a.$implicit;t.xp6(4),t.hij(" ",e.name," "),t.xp6(4),t.hij(" ",e.ip_domain," "),t.xp6(4),t.hij(" ",e.api_key," ")}}function Dt(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-list-option",46),t.NdJ("click",function(){const l=t.CHM(e).$implicit,c=t.oxw(2);return t.KtG(c.editSubDomain(l.fansub_))}),t._UZ(1,"img",47),t.TgZ(2,"a",48)(3,"span",49),t._uU(4),t.ALo(5,"date"),t.qZA(),t.TgZ(6,"span",39),t._uU(7),t.qZA()()()}if(2&i){const e=a.$implicit;t.xp6(1),t.s9C("src",e.fansub_.image_url,t.LSH),t.xp6(3),t.hij(" ",t.xi3(5,3,e.updated_at,"d-MM-y")," "),t.xp6(3),t.Oqu(e.fansub_.slug)}}function Zt(i,a){if(1&i&&(t.TgZ(0,"div",43)(1,"div",44)(2,"mat-selection-list",25),t.YNc(3,Dt,8,6,"mat-list-option",45),t.qZA()()()),2&i){const e=t.oxw();t.xp6(2),t.Q6J("multiple",!1),t.xp6(1),t.Q6J("ngForOf",e.groupFansub)}}function yt(i,a){1&i&&t._UZ(0,"app-no-data",50)}let Rt=(()=>{class i{constructor(e,s,n,l,c,h,A,k,S,I,M,ie){this.clipboard=e,this.router=s,this.snackBar=n,this.as=l,this.ds=c,this.gs=h,this.fs=A,this.bs=k,this.us=S,this.fansub=I,this.aks=M,this.wb=ie,this.feedKomentarData=[],this.feedLikeDislikeData=[],this.feedVisitData=[],this.subsFeedKomentar=null,this.subsFeedLikeDislike=null,this.subsFeedVisit=null,this.subsGetApiKey=null,this.subsDialog=null,this.subsCreateApiKey=null,this.subsEditApiKey=null,this.subsRevokeApiKey=null,this.subsGroupGet=null,this.subsUpdateSubDomain=null,this.subsGetSubDomain=null,this.apiKey=[],this.groupFansub=[],this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get AS(){return this.as}get ENV(){return v.N}ngOnInit(){this.gs.isBrowser&&(this.getUserFeedComment(),this.getUserFeedLikeDislike(),this.getUserFeedVisit(),this.getUserApiKey(),this.getUserGroup(),this.fs.initializeFab("arrow_forward",null,"Menuju Halaman Profile",`/user/${this.as.currentUserSubject?.value?.username}`,!1))}ngOnDestroy(){this.subsFeedKomentar?.unsubscribe(),this.subsFeedLikeDislike?.unsubscribe(),this.subsFeedVisit?.unsubscribe(),this.subsGetApiKey?.unsubscribe(),this.subsDialog?.unsubscribe(),this.subsCreateApiKey?.unsubscribe(),this.subsEditApiKey?.unsubscribe(),this.subsRevokeApiKey?.unsubscribe(),this.subsGroupGet?.unsubscribe(),this.subsUpdateSubDomain?.unsubscribe(),this.subsGetSubDomain?.unsubscribe()}getUserFeedComment(){this.bs.busy(),this.subsFeedKomentar=this.us.getUserFeedComment(this.as.currentUserSubject?.value?.username,"",1,5).subscribe({next:e=>{this.gs.log("[USER_FEED_COMMENT_SUCCESS]",e),this.feedKomentarData=e.results,this.bs.idle()},error:e=>{this.gs.log("[USER_FEED_COMMENT_ERROR]",e,"error"),this.bs.idle()}})}getUserFeedLikeDislike(){this.bs.busy(),this.subsFeedLikeDislike=this.us.getUserFeedLikeDislike(this.as.currentUserSubject?.value?.username,"",1,5).subscribe({next:e=>{this.gs.log("[USER_FEED_LIKEDISLIKE_SUCCESS]",e),this.feedLikeDislikeData=e.results,this.bs.idle()},error:e=>{this.gs.log("[USER_FEED_LIKEDISLIKE_ERROR]",e,"error"),this.bs.idle()}})}getUserFeedVisit(){this.bs.busy(),this.subsFeedVisit=this.us.getUserFeedVisit(this.as.currentUserSubject?.value?.username,"",1,5).subscribe({next:e=>{this.gs.log("[USER_FEED_VISIT_SUCCESS]",e),this.feedVisitData=e.results,this.bs.idle()},error:e=>{this.gs.log("[USER_FEED_VISIT_ERROR]",e,"error"),this.bs.idle()}})}getUserApiKey(){this.bs.busy(),this.subsGetApiKey=this.aks.getUserApiKey(this.as.currentUserSubject?.value?.username).subscribe({next:e=>{this.gs.log("[USER_FEED_VISIT_SUCCESS]",e),this.apiKey=e.results[this.as.currentUserSubject?.value?.username],this.bs.idle()},error:e=>{this.gs.log("[USER_FEED_VISIT_ERROR]",e,"error"),this.bs.idle()}})}copyApiKey(e){this.clipboard.copy(e.api_key)&&this.snackBar.open("API Key :: Telah Di Salin Pada Clipboard","Ok")}generateNewApiKey(){this.subsDialog=this.ds.openInputDialog({data:{title:"Tambah API Key Baru",input:{name:{inputLabel:"Nama / Deskripsi",inputPlaceholder:`${this.as.currentUserSubject?.value?.username}_${Date.now()}`,inputValue:null,inputRequired:!0},ip_domain:{inputLabel:"Origin Tanpa http://",inputPlaceholder:"example.com; 1.1.1.1; *",inputValue:null,inputRequired:!0}},confirmText:"OK",cancelText:"Batal",infoText:"Gunakan * Saja Untuk Perbolehkan Semua Dan Titik Koma ; Untuk Lebih Dari Satu"}}).afterClosed().subscribe({next:e=>{this.gs.log("[INPUT_DIALOG_CLOSED]",e),e&&(this.bs.busy(),this.subsCreateApiKey=this.aks.createApiKey({name:e.name,ip_domain:e.ip_domain}).subscribe({next:s=>{this.gs.log("[USER_CREATE_APIKEY_SUCCESS]",s),this.bs.idle(),this.getUserApiKey()},error:s=>{this.gs.log("[USER_CREATE_APIKEY_ERROR]",s,"error"),this.bs.idle(),this.getUserApiKey()}})),this.subsDialog.unsubscribe()}})}editApiKey(e){this.subsDialog=this.ds.openInputDialog({data:{title:"Ubah API Key",input:{name:{inputLabel:"Nama / Deskripsi",inputPlaceholder:e.name,inputValue:e.name,inputRequired:!0},ip_domain:{inputLabel:"Origin Tanpa http://",inputPlaceholder:e.ip_domain,inputValue:e.ip_domain,inputRequired:!0}},confirmText:"OK",cancelText:"Batal",infoText:"Gunakan * Saja Untuk Perbolehkan Semua Dan Titik Koma ; Untuk Lebih Dari Satu"}}).afterClosed().subscribe({next:s=>{this.gs.log("[INPUT_DIALOG_CLOSED]",s),s&&(this.bs.busy(),this.subsEditApiKey=this.aks.editApiKey(e.id,{name:s.name,ip_domain:s.ip_domain}).subscribe({next:n=>{this.gs.log("[USER_EDIT_APIKEY_SUCCESS]",n),this.bs.idle(),this.getUserApiKey()},error:n=>{this.gs.log("[USER_EDIT_APIKEY_ERROR]",n,"error"),this.bs.idle(),this.getUserApiKey()}})),this.subsDialog.unsubscribe()}})}revokeApiKey(e){this.bs.busy(),this.subsRevokeApiKey=this.aks.revokeApiKey(e.id).subscribe({next:s=>{this.gs.log("[USER_REVOKE_APIKEY_SUCCESS]",s),this.bs.idle(),this.getUserApiKey()},error:s=>{this.gs.log("[USER_REVOKE_APIKEY_ERROR]",s,"error"),this.bs.idle(),this.getUserApiKey()}})}getUserGroup(){this.bs.busy(),this.subsGroupGet=this.us.getUserGroup(this.as.currentUserSubject?.value?.username).subscribe({next:e=>{this.gs.log("[USER_GROUP_LIST_SUCCESS]",e),this.groupFansub=e.results,this.bs.idle()},error:e=>{this.gs.log("[USER_GROUP_LIST_ERROR]",e,"error"),this.bs.idle()}})}editSubDomain(e){this.bs.busy(),this.subsGetSubDomain=this.fansub.getSubDomain(e.slug).subscribe({next:s=>{this.gs.log("[USER_FANSUB_SUBDOMAIN_SUCCESS]",s),this.bs.idle();const n=s.result;this.subsDialog=this.ds.openInputDialog({data:{title:`Ubah CNAME / A Record IP v4 v6 :: '${e.slug}'`,input:{server_target:{inputLabel:"Server Target",inputPlaceholder:"ghs.google.com",inputValue:n.dns_id.content,inputRequired:!0},verification_name:{inputLabel:"Tambahan Khusus Blogger :: Name",inputPlaceholder:"blablabla-name",inputValue:n.dns_id_alt?.name,inputRequired:!1},verification_target:{inputLabel:"Tambahan Khusus Blogger :: Target",inputPlaceholder:"blablabla-target.dv.googlehosted.com",inputValue:n.dns_id_alt?.content,inputRequired:!1}},confirmText:"OK",cancelText:"Batal",infoText:"Abaikan 2 Input Terakhir Jika Bukan Blogger"}}).afterClosed().subscribe({next:l=>{this.gs.log("[INPUT_DIALOG_CLOSED]",l),l&&(this.bs.busy(),this.subsUpdateSubDomain=this.fansub.updateSubDomain(e.slug,{server_target:l.server_target,verification_name:l.verification_name,verification_target:l.verification_target}).subscribe({next:c=>{this.gs.log("[FANSUB_UPDATE_SUBDOMAIN_SUCCESS]",c),this.bs.idle(),this.getUserGroup()},error:c=>{this.gs.log("[FANSUB_UPDATE_SUBDOMAIN_ERROR]",c,"error"),this.bs.idle(),this.getUserGroup()}})),this.subsDialog.unsubscribe()}})},error:s=>{this.gs.log("[USER_FANSUB_SUBDOMAIN_ERROR]",s,"error"),this.bs.idle(),this.subsDialog=this.ds.openInfoDialog({data:{title:`Sepertinya Sub-Domain '${e.slug}' Belum Di Klaim`,htmlMessage:"Silahkan ambil sub-domain pada halaman fansub, ingin ke sana sekarang?",confirmText:"Ya",cancelText:"Tidak"},disableClose:!1}).afterClosed().subscribe({next:n=>{this.gs.log("[INFO_DIALOG_CLOSED]",n),!0===n?this.router.navigateByUrl(`/fansub/${e.slug}`):this.getUserGroup(),this.subsDialog.unsubscribe()}})}})}openComment(e){this.router.navigate([e.path],{queryParams:{comment:e.id}})}openApiDocs(){this.wb.winboxOpenUri(`${v.N.baseUrl}/api`,"_self",!0)}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(_t.TU),t.Y36(r.F0),t.Y36(F.ux),t.Y36(G.e),t.Y36(gt.x),t.Y36(Z.U),t.Y36(J.r),t.Y36(O.z),t.Y36(L.K),t.Y36(dt.T),t.Y36(ft),t.Y36(bt.N))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-user-list"]],decls:65,vars:12,consts:[[1,"container"],[1,"row","pb-3","px-0"],[1,"col-lg-8","col-xl-9"],[1,"row"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"float-end","text-warning",2,"font-size","small","cursor","pointer",3,"click"],[1,"text-bifeldy"],["class","col-12",4,"ngIf","ngIfElse"],[1,"col-lg-4","col-xl-3"],[1,"row","sticky-top"],[1,"col-12"],["matTooltip","Khusus Pengguna Terverifikasi",1,"text-bifeldy"],[1,"col-12","mb-2"],["mat-button","","color","accent","matTooltip","Buka Kotak Pesan","routerLink","/mailbox",1,"w-100"],["fontIcon","email",1,"me-1"],[1,"text-bifeldy",3,"matTooltip"],["mat-button","","color","accent",1,"w-100",3,"click"],["fontIcon","api",1,"me-1"],["fontIcon","webhook",1,"me-1"],["class","my-2 gradient-border",3,"click",4,"ngFor","ngForOf"],[1,"row","mt-4"],[1,"border-bottom-dotted"],["class","col-12 mb-2","style","max-height: 288px;",4,"ngIf","ngIfElse"],["noData",""],[3,"multiple"],["class","h-100",4,"ngFor","ngForOf"],[1,"h-100"],["fontIcon","add_comment","mat-list-icon","",1,"ps-3"],[1,"text-truncate","text-decoration-none",3,"click"],[1,"bg-bifeldy","px-2","me-1","text-danger",2,"position","absolute","right","0"],[1,"text-warning"],["fontIcon","volunteer_activism","mat-list-icon","",1,"ps-3"],[1,"text-truncate","text-decoration-none",3,"routerLink"],[1,"me-3","text-success"],[1,"me-3","text-info"],["fontIcon","directions_run","mat-list-icon","",1,"ps-3"],[1,"my-2","gradient-border",3,"click"],[1,"ps-2","pe-2","pt-2","text-truncate","my-0"],[1,"text-success"],[1,"ps-2","pe-2","pt-0","text-truncate","my-0"],[1,"ps-2","pe-2","pb-2","text-truncate","my-0"],["fontIcon","delete_sweep",1,"me-1"],[1,"col-12","mb-2",2,"max-height","288px"],[1,"h-100",2,"overflow-y","auto"],["class","h-100",3,"click",4,"ngFor","ngForOf"],[1,"h-100",3,"click"],["matListAvatar","",1,"ms-3",2,"border-radius","0",3,"src"],[1,"text-truncate","text-decoration-none"],[1,"bg-bifeldy","px-2","me-1","text-warning",2,"position","absolute","right","0"],[1,"col-12","p-3"]],template:function(e,s){if(1&e&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4)(6,"h2",5)(7,"span",6),t.NdJ("click",function(){return s.getUserFeedComment()}),t._uU(8," Refresh "),t.qZA(),t.TgZ(9,"b",7),t._uU(10,"Riwayat Komentar"),t.qZA()()(),t.YNc(11,Et,4,6,"div",8),t.qZA(),t.TgZ(12,"div",3)(13,"div",4)(14,"h2",5)(15,"span",6),t.NdJ("click",function(){return s.getUserFeedLikeDislike()}),t._uU(16," Refresh "),t.qZA(),t.TgZ(17,"b",7),t._uU(18,"Riwayat Like & Dislike"),t.qZA()()(),t.YNc(19,At,4,6,"div",8),t.qZA(),t.TgZ(20,"div",3)(21,"div",4)(22,"h2",5)(23,"span",6),t.NdJ("click",function(){return s.getUserFeedVisit()}),t._uU(24," Refresh "),t.qZA(),t.TgZ(25,"b",7),t._uU(26,"Riwayat Kunjungan"),t.qZA()()(),t.YNc(27,St,4,6,"div",8),t.qZA()(),t.TgZ(28,"div",9)(29,"div",10)(30,"div",11)(31,"div",3)(32,"div",4)(33,"h2",5)(34,"b",12),t._uU(35,"Alamat Email"),t.qZA()()(),t.TgZ(36,"div",13)(37,"a",14),t._UZ(38,"mat-icon",15),t._uU(39),t.qZA()()(),t.TgZ(40,"div",3)(41,"div",4)(42,"h2",5)(43,"span",6),t.NdJ("click",function(){return s.getUserApiKey()}),t._uU(44," Refresh "),t.qZA(),t.TgZ(45,"b",16),t._uU(46,"API Key"),t.qZA()()(),t.TgZ(47,"div",13)(48,"a",17),t.NdJ("click",function(){return s.openApiDocs()}),t._UZ(49,"mat-icon",18),t._uU(50," Lihat API Endpoint "),t.qZA(),t.TgZ(51,"a",17),t.NdJ("click",function(){return s.generateNewApiKey()}),t._UZ(52,"mat-icon",19),t._uU(53," Buat API Key Baru "),t.qZA(),t.YNc(54,It,16,3,"div",20),t.qZA()(),t.TgZ(55,"div",21)(56,"div",4)(57,"h2",22)(58,"span",6),t.NdJ("click",function(){return s.getUserGroup()}),t._uU(59," Refresh "),t.qZA(),t.TgZ(60,"b",7),t._uU(61,"DNS Fansub"),t.qZA()()(),t.YNc(62,Zt,4,2,"div",23),t.qZA()()()()()(),t.YNc(63,yt,1,0,"ng-template",null,24,t.W1O)),2&e){const n=t.MAs(64);t.xp6(11),t.Q6J("ngIf",s.feedKomentarData.length>0)("ngIfElse",n),t.xp6(8),t.Q6J("ngIf",s.feedLikeDislikeData.length>0)("ngIfElse",n),t.xp6(8),t.Q6J("ngIf",s.feedVisitData.length>0)("ngIfElse",n),t.xp6(12),t.AsE(" '",null==s.AS.currentUserSubject||null==s.AS.currentUserSubject.value?null:s.AS.currentUserSubject.value.username,"@",s.ENV.domain,"' "),t.xp6(6),t.MGl("matTooltip","Aktivitas Terakhir :: ",null==s.AS.currentUserSubject||null==s.AS.currentUserSubject.value?null:s.AS.currentUserSubject.value._session_origin,""),t.xp6(9),t.Q6J("ngForOf",s.apiKey),t.xp6(8),t.Q6J("ngIf",s.groupFansub.length>0)("ngIfElse",n)}},dependencies:[m.sg,m.O5,r.yS,y.zs,K.Hw,E.eA,E.Nh,E.Ub,E.vS,N.gM,xt.t,vt.d,m.OU,m.uU,Ut.R]}),i})();var Pt=o(6925),wt=o(7902),Ot=o(8379),R=o(9549),Lt=o(4144),Kt=o(455),Nt=o(3626);function Mt(i,a){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.imagePhotoLimitExceeded)," !")}}function Bt(i,a){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Oqu(e.imagePhotoErrorText)}}function Ft(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",46)(1,"button",47),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.submitPhotoImage())}),t._UZ(2,"mat-icon",48),t._uU(3," Unggah "),t.qZA()()}if(2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("disabled",e.submitted)}}function Jt(i,a){1&i&&(t.TgZ(0,"div"),t._uU(1,"Nama Tidak Boleh Kosong"),t.qZA())}function Yt(i,a){1&i&&(t.TgZ(0,"div"),t._uU(1,"Nama Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function Gt(i,a){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.imageCoverLimitExceeded)," !")}}function qt(i,a){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Oqu(e.imageCoverErrorText)}}function Qt(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",16)(1,"button",47),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.submitCoverImage())}),t._UZ(2,"mat-icon",48),t._uU(3," Unggah "),t.qZA()()}if(2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("disabled",e.submitted)}}function Ht(i,a){1&i&&(t.TgZ(0,"div"),t._uU(1,"Password Tidak Boleh Kosong"),t.qZA())}function Vt(i,a){1&i&&(t.TgZ(0,"div"),t._uU(1,"Password Minimal 8 Huruf"),t.qZA())}function jt(i,a){1&i&&(t.TgZ(0,"div"),t._uU(1,"Password Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function $t(i,a){1&i&&(t.TgZ(0,"div"),t._uU(1,"Password Minimal 8 Huruf"),t.qZA())}function zt(i,a){1&i&&(t.TgZ(0,"div"),t._uU(1,"Password Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function Wt(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"form",1),t.NdJ("submit",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.onSubmit())}),t.TgZ(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"div",6)(6,"div",7),t._UZ(7,"img",8),t.TgZ(8,"mat-form-field",9)(9,"mat-label"),t._uU(10,"Profile Image"),t.qZA(),t.TgZ(11,"ngx-mat-file-input",10,11),t.NdJ("change",function(n){t.CHM(e);const l=t.MAs(12),c=t.oxw();return t.KtG(c.uploadPhotoImage(n,l))}),t.qZA(),t._UZ(13,"mat-icon",12),t.qZA(),t.TgZ(14,"mat-error",13)(15,"small"),t.YNc(16,Mt,3,3,"div",14),t.YNc(17,Bt,2,1,"div",14),t.qZA()()(),t.YNc(18,Ft,4,1,"div",15),t.TgZ(19,"div",16)(20,"mat-slide-toggle",17),t._uU(21," Jadikan Private, Sembunyikan Aktivitas "),t.qZA()(),t.TgZ(22,"div",18),t._uU(23," * Jika ingin mengubah "),t.TgZ(24,"i"),t._uU(25,"username"),t.qZA(),t._uU(26," silahkan menghubungi Admin menggunakan surel "),t.TgZ(27,"span",19),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.changeUname())}),t._uU(28),t.qZA()()()(),t.TgZ(29,"div",20),t._UZ(30,"div",21),t.TgZ(31,"div",22)(32,"mat-form-field",23)(33,"mat-label"),t._uU(34,"Nama Lengkap"),t.qZA(),t._UZ(35,"input",24)(36,"mat-icon",25),t.TgZ(37,"mat-error"),t.YNc(38,Jt,2,0,"div",14),t.YNc(39,Yt,2,0,"div",14),t.qZA()(),t.TgZ(40,"mat-form-field",26)(41,"mat-label"),t._uU(42,"Cover Image"),t.qZA(),t.TgZ(43,"ngx-mat-file-input",27,28),t.NdJ("change",function(n){t.CHM(e);const l=t.MAs(44),c=t.oxw();return t.KtG(c.uploadCoverImage(n,l))}),t.qZA(),t._UZ(45,"mat-icon",12),t.qZA(),t.TgZ(46,"mat-error",13)(47,"small"),t.YNc(48,Gt,3,3,"div",14),t.YNc(49,qt,2,1,"div",14),t.qZA()(),t.YNc(50,Qt,4,1,"div",29),t._UZ(51,"angular-editor",30),t.TgZ(52,"mat-form-field",31)(53,"mat-label"),t._uU(54,"Konfirmasi Kata Sandi"),t.qZA(),t._UZ(55,"input",32),t.TgZ(56,"button",33),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.togglePassword())}),t._UZ(57,"mat-icon",34),t.qZA(),t.TgZ(58,"mat-error"),t.YNc(59,Ht,2,0,"div",14),t.YNc(60,Vt,2,0,"div",14),t.YNc(61,jt,2,0,"div",14),t.qZA()(),t.TgZ(62,"mat-form-field",31)(63,"mat-label"),t._uU(64,"Ubah Kata Sandi"),t.qZA(),t._UZ(65,"input",35),t.TgZ(66,"button",33),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.togglePassword())}),t._UZ(67,"mat-icon",34),t.qZA(),t.TgZ(68,"mat-error"),t.YNc(69,$t,2,0,"div",14),t.YNc(70,zt,2,0,"div",14),t.qZA()()(),t.TgZ(71,"div",36)(72,"div",7)(73,"div",37),t._UZ(74,"div",38),t.TgZ(75,"div",39)(76,"a",40),t._UZ(77,"mat-icon",41),t._uU(78," Batal "),t.qZA()(),t.TgZ(79,"div",39)(80,"button",42),t._uU(81," Simpan "),t._UZ(82,"mat-icon",43),t.qZA()()()()()()()(),t._UZ(83,"div",44)(84,"div",45),t.qZA()()}if(2&i){const e=t.oxw();t.Q6J("formGroup",e.fg),t.xp6(7),t.s9C("src",e.image_photo,t.LSH),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(5),t.Q6J("ngIf",e.imagePhotoLimitExceeded),t.xp6(1),t.Q6J("ngIf",e.imagePhotoErrorText),t.xp6(1),t.Q6J("ngIf",e.imagePhoto&&!e.fg.value.image_photo),t.xp6(10),t.AsE("",e.userData.username,"@",e.ENV.domain,""),t.xp6(4),t.Q6J("color","accent"),t.xp6(6),t.Q6J("ngIf",e.fg.get("nama").hasError("required")),t.xp6(1),t.Q6J("ngIf",e.fg.get("nama").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(5),t.Q6J("ngIf",e.imageCoverLimitExceeded),t.xp6(1),t.Q6J("ngIf",e.imageCoverErrorText),t.xp6(1),t.Q6J("ngIf",e.imageCover&&!e.fg.value.image_cover),t.xp6(1),t.Q6J("config",e.GS.angularEditorConfig),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("type",e.passwordHide?"password":"text"),t.xp6(2),t.Q6J("fontIcon",e.passwordHide?"visibility_off":"visibility"),t.xp6(2),t.Q6J("ngIf",e.fg.get("old_password").hasError("required")),t.xp6(1),t.Q6J("ngIf",e.fg.get("old_password").hasError("minlength")),t.xp6(1),t.Q6J("ngIf",e.fg.get("old_password").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("type",e.passwordHide?"password":"text"),t.xp6(2),t.Q6J("fontIcon",e.passwordHide?"visibility_off":"visibility"),t.xp6(2),t.Q6J("ngIf",e.fg.get("new_password").hasError("minlength")),t.xp6(1),t.Q6J("ngIf",e.fg.get("new_password").hasError("pattern")),t.xp6(6),t.Q6J("disabled",e.submitted),t.xp6(4),t.Q6J("disabled",e.submitted||e.fg.invalid||!e.fg.dirty),t.xp6(3),t.Udp("background-image","url("+e.image_cover+")")}}const te=[{path:"",pathMatch:"full",component:Rt,canActivate:[D.t],data:{title:"User - Dashboard Overview",description:"Halaman Informasi Pengguna",keywords:"User",[g.t.decoratorRoles]:[d.yS.ADMIN,d.yS.MODERATOR,d.yS.FANSUBBER,d.yS.USER]}},{path:":username",children:[{path:"",pathMatch:"full",component:mt},{path:"edit",component:(()=>{class i{constructor(e,s,n,l,c,h,A,k,S,I,M){this.router=e,this.activatedRoute=s,this.toast=n,this.bs=l,this.us=c,this.pi=h,this.fb=A,this.imgbb=k,this.gs=S,this.as=I,this.cs=M,this.submitted=!1,this.username=null,this.userData=null,this.imagePhoto=null,this.imagePhotoErrorText=null,this.imagePhotoLimitExceeded=null,this.image_photo=null,this.image_photo_original=null,this.imageCover=null,this.imageCoverErrorText=null,this.imageCoverLimitExceeded=null,this.image_cover=null,this.image_cover_original=null,this.passwordHide=!0,this.photoImage=null,this.coverImage=null,this.subsUserDetail=null,this.subsImgbb1=null,this.subsImgbb2=null,this.subsUserUpdate=null,this.subsVerify=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get ENV(){return v.N}get GS(){return this.gs}togglePassword(){this.passwordHide=!this.passwordHide}ngOnDestroy(){this.subsUserDetail?.unsubscribe(),this.subsImgbb1?.unsubscribe(),this.subsImgbb2?.unsubscribe(),this.subsUserUpdate?.unsubscribe(),this.subsVerify?.unsubscribe()}ngOnInit(){this.pi.updatePageMetaData("User - Ubah Profile","Halaman Pembaharuan Profile","Ubah Profile"),this.gs.isBrowser&&(this.username=this.activatedRoute.snapshot.paramMap.get("username"),this.bs.busy(),this.subsUserDetail=this.us.getUserData(this.username).subscribe({next:e=>{this.gs.log("[USER_DETAIL_SUCCESS]",e),this.bs.idle(),this.as.currentUserSubject?.value?.id!==e.result.id?(this.toast.warning("Profile Ini Milik Orang Lain","Whoops!",null,!0),this.router.navigateByUrl(`/user/${this.username}`)):this.initForm(e.result)},error:e=>{this.gs.log("[USER_DETAIL_ERROR]",e,"error"),this.bs.idle(),this.router.navigate(["/error"],{queryParams:{returnUrl:`/user/${this.username}`}})}}))}initForm(e){this.fg=this.fb.group({nama:[e.kartu_tanda_penduduk_.nama,[u.kI.required,u.kI.pattern("^[a-zA-Z. ]+$")]],description:[e.profile_.description,u.kI.compose([u.kI.pattern(g.t.regexEnglishKeyboardKeys)])],old_password:[null,u.kI.compose([u.kI.required,u.kI.minLength(8),u.kI.pattern(g.t.regexEnglishKeyboardKeys)])],new_password:[null,u.kI.compose([u.kI.minLength(8),u.kI.pattern(g.t.regexEnglishKeyboardKeys)])],image_photo:[null,u.kI.compose([u.kI.pattern(g.t.regexUrl)])],image_cover:[null,u.kI.compose([u.kI.pattern(g.t.regexUrl)])],private:[e.private,u.kI.compose([u.kI.required])]}),this.image_photo=e.image_url,this.image_photo_original=this.image_photo,this.image_cover=e.profile_.cover_url,this.image_cover_original=this.image_cover,this.userData=e}uploadPhotoImage(e,s){this.photoImage=s,this.imagePhoto=null,this.imagePhotoLimitExceeded=null,this.imagePhotoErrorText=null,this.fg.controls.image_photo.patchValue(null),this.fg.controls.image_photo.markAsPristine();const n=e.target.files[0];try{const l=new FileReader;l.readAsDataURL(n),l.onload=c=>{if(this.gs.log("[IMAGE_PHOTO_SELECTED]",c),n.size<=g.t.fileSizeImageLimit){const h=this.gs.document.createElement("img");h.onload=()=>{this.imagePhoto=n,this.image_photo=l.result.toString()},h.src=l.result.toString()}else this.imagePhoto=null,this.image_photo="/assets/img/form/image-error.png",this.imagePhotoLimitExceeded=g.t.fileSizeImageLimit,this.photoImage.clear(e)}}catch{this.imagePhoto=null,this.image_photo=this.image_photo_original,this.photoImage.clear(e)}}submitPhotoImage(){this.submitted=!0,this.subsImgbb1=this.imgbb.uploadImage({file:this.imagePhoto}).subscribe({next:e=>{this.gs.log("[IMAGE_PHOTO_SUCCESS]",e),this.fg.controls.image_photo.patchValue(e.result.url),this.fg.controls.image_photo.markAsDirty(),this.submitted=!1},error:e=>{this.gs.log("[IMAGE_PHOTO_ERROR]",e,"error"),this.fg.controls.image_photo.patchValue(null),this.fg.controls.image_photo.markAsPristine(),this.submitted=!1,this.imagePhotoErrorText=e.result?.message||e.info}})}uploadCoverImage(e,s){this.coverImage=s,this.imageCover=null,this.imageCoverLimitExceeded=null,this.imageCoverErrorText=null,this.fg.controls.image_cover.patchValue(null),this.fg.controls.image_cover.markAsPristine();const n=e.target.files[0];try{const l=new FileReader;l.readAsDataURL(n),l.onload=c=>{if(this.gs.log("[IMAGE_COVER_SELECTED]",c),n.size<=g.t.fileSizeImageLimit){const h=this.gs.document.createElement("img");h.onload=()=>{this.imageCover=n,this.image_cover=l.result.toString()},h.src=l.result.toString()}else this.imageCover=null,this.image_cover="/assets/img/form/image-error.png",this.imageCoverLimitExceeded=g.t.fileSizeImageLimit,this.coverImage.clear(e)}}catch{this.imageCover=null,this.image_cover=this.image_cover_original,this.coverImage.clear(e)}}submitCoverImage(){this.submitted=!0,this.subsImgbb2=this.imgbb.uploadImage({file:this.imageCover}).subscribe({next:e=>{this.gs.log("[IMAGE_COVER_SUCCESS]",e),this.fg.controls.image_cover.patchValue(e.result.url),this.fg.controls.image_cover.markAsDirty(),this.submitted=!1},error:e=>{this.gs.log("[IMAGE_COVER_ERROR]",e,"error"),this.fg.controls.image_cover.patchValue(null),this.fg.controls.image_cover.markAsPristine(),this.submitted=!1,this.imageCoverErrorText=e.result?.message||e.info}})}onSubmit(){this.bs.busy();const e=this.gs.getDirtyValues(this.fg);if(e.old_password=this.cs.hashPassword(this.fg.value.old_password),"new_password"in e&&e.new_password&&(e.new_password=this.cs.hashPassword(this.fg.value.new_password)),this.gs.log("[USER_EDIT_DIRTY]",e),this.submitted=!0,this.fg.invalid)return this.submitted=!1,void this.bs.idle();this.subsUserUpdate=this.us.updateUser(this.username,{...e}).subscribe({next:s=>{this.gs.log("[USER_EDIT_SUCCESS]",s),this.submitted=!1,this.bs.idle(),this.as.removeUser(),this.bs.busy(),this.subsVerify=this.as.verify(this.as.token).subscribe({next:n=>{this.gs.log("[VERIFY_LOGIN_SUCCESS]",n),this.bs.idle(),this.router.navigateByUrl(`/user/${this.username}`)},error:n=>{this.gs.log("[VERIFY_LOGIN_ERROR]",n,"error"),this.bs.idle(),this.as.removeUser(),this.router.navigateByUrl(`/user/${this.username}`)}})},error:s=>{this.gs.log("[USER_EDIT_ERROR]",s,"error"),this.submitted=!1,this.bs.idle()}})}changeUname(){this.router.navigate(["/create/mailbox"],{queryParams:{subject:"[ReqUName] Pengajuan Ganti Username",to:["bifeldy"].map(s=>`${s}@${v.N.domain}`).join(",")}})}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(r.F0),t.Y36(r.gz),t.Y36(Pt.k),t.Y36(O.z),t.Y36(L.K),t.Y36(Y.Z),t.Y36(u.QS),t.Y36(wt.X),t.Y36(Z.U),t.Y36(G.e),t.Y36(Ot.$))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-user-edit"]],decls:1,vars:1,consts:[[3,"formGroup","submit",4,"ngIf"],[3,"formGroup","submit"],[1,"container"],[1,"profile-info","align-items-center",2,"top","64px","position","relative"],[1,"row","py-3","px-2"],[1,"col-md-4","col-xl-3","px-3"],[1,"row","sticky-top","pt-3"],[1,"col-12"],[1,"w-100",3,"src"],["appearance","outline",1,"pt-3","w-100",3,"color"],[1,"w-100",3,"accept","change"],["photoImage",""],["fontIcon","image","matSuffix",""],[1,"px-3","w-100"],[4,"ngIf"],["class","col-12 mb-4",4,"ngIf"],[1,"col-12","p-3"],["formControlName","private","matTooltip","Hanya Tampilkan Informasi Profil"],[1,"col-12","p-3","text-warning"],[1,"text-success",2,"cursor","pointer",3,"click"],[1,"col-md-8","col-xl-9","pt-3"],[1,"row","py-3","px-0","profile-height-large"],[1,"row","py-3"],["appearance","outline",1,"p-3","col-12",3,"color"],["matInput","","formControlName","nama","placeholder","Nama Lengkap"],["fontIcon","wysiwyg","matSuffix",""],["appearance","outline",1,"px-3","pt-3","w-100",3,"color"],["placeholder","Basic Input",1,"w-100",3,"accept","change"],["coverImage",""],["class","col-12 p-3",4,"ngIf"],["formControlName","description",1,"p-3","w-100",3,"config"],["appearance","outline",1,"p-3","w-100",3,"color"],["matInput","","formControlName","old_password","required","","placeholder","Password Sekarang","autocomplete","current-password",3,"type"],["type","button","mat-icon-button","","matSuffix","",3,"click"],[3,"fontIcon"],["matInput","","formControlName","new_password","placeholder","Isi Jika Ingin Ubah Password Baru","autocomplete","new-password",3,"type"],[1,"row"],[1,"row","gy-3"],[1,"col","g-0"],[1,"col-12","col-md-3"],["mat-stroked-button","","routerLink","../",1,"w-100",3,"disabled"],["fontIcon","undo",1,"me-1"],["type","submit","mat-flat-button","","color","accent",1,"w-100",3,"disabled"],["fontIcon","save",1,"ms-1"],[1,"profile-banner","profile-banner-1","align-items-center"],[1,"profile-banner","profile-banner-2","align-items-center"],[1,"col-12","mb-4"],["type","button","mat-raised-button","","color","primary",1,"w-100",3,"disabled","click"],["fontIcon","add_photo_alternate",1,"me-1"]],template:function(e,s){1&e&&t.YNc(0,Wt,85,33,"form",0),2&e&&t.Q6J("ngIf",s.fg)},dependencies:[m.O5,r.yS,y.lW,y.zs,K.Hw,R.TO,R.KE,R.hX,R.R9,Lt.Nt,Kt.Rr,N.gM,u._Y,u.Fj,u.JJ,u.JL,u.Q7,u.sg,u.u,f.Yh,U.s6,Nt.$],styles:[".profile-banner[_ngcontent-%COMP%]{height:192px;width:100%;background-size:cover;background-position:center;background-repeat:no-repeat;opacity:.75}.profile-banner-1[_ngcontent-%COMP%]{position:absolute;top:0;left:0}.profile-banner-2[_ngcontent-%COMP%]{position:absolute;top:192px;left:0}.profile-info[_ngcontent-%COMP%]{position:relative;height:256px;z-index:1}@media only screen and (min-width: 769px){.profile-height-large[_ngcontent-%COMP%]{height:100px}}@media only screen and (max-width: 768px){.profile-image[_ngcontent-%COMP%]{padding-top:3rem}}"]}),i})(),canActivate:[D.t],data:{title:"User - Ubah Profil",description:"Halaman Pembaharuan Profil Pengguna",keywords:"Ubah Profil",[g.t.decoratorRoles]:[d.yS.ADMIN,d.yS.MODERATOR,d.yS.FANSUBBER,d.yS.USER]}}]}];let ee=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=t.oAB({type:i}),i.\u0275inj=t.cJS({imports:[m.ez,r.Bz.forChild(te),w.m,_.$,b.L,u.u5,u.UX,f.Ad,U.UM,p.b,x.F,P.T,T.d]}),i})()},7567:(B,C,o)=>{o.d(C,{Q:()=>w});var m=o(7084),r=o(4650),u=o(257),U=o(6895),f=o(7392),g=o(266);function d(_,b){if(1&_&&r._UZ(0,"h3",8),2&_){const p=r.oxw().$implicit;r.Q6J("innerHTML",p.text,r.oJD)}}function D(_,b){if(1&_&&(r.TgZ(0,"mat-expansion-panel",3)(1,"mat-expansion-panel-header")(2,"mat-panel-title",4)(3,"span",5),r._uU(4),r.qZA()(),r.TgZ(5,"mat-panel-description"),r._UZ(6,"mat-icon",6),r.qZA()(),r.YNc(7,d,1,1,"ng-template",7),r.qZA()),2&_){const p=b.$implicit,x=b.first,T=r.oxw(2);r.Q6J("expanded",T.GS.isDesktop&&x),r.xp6(3),r.s9C("matTooltip",p.tooltip),r.Q6J("matTooltipPosition","above"),r.xp6(1),r.hij(" ",p.title," "),r.xp6(2),r.Q6J("fontIcon",p.icon)}}function P(_,b){if(1&_&&(r.TgZ(0,"mat-accordion",1),r.YNc(1,D,8,5,"mat-expansion-panel",2),r.qZA()),2&_){const p=r.oxw();r.xp6(1),r.Q6J("ngForOf",p.panelData)}}let w=(()=>{class _{constructor(p){this.gs=p,this.panelData=[{title:"Title",icon:"warning",text:"Lorem ipsum ...",tooltip:"Info"}]}onResize(p){this.gs.onResize(p,"MATERIAL_EXPANSION_PANEL"),this.gs.isDesktop?this.accordion.openAll():this.accordion.closeAll()}get GS(){return this.gs}ngOnInit(){}}return _.\u0275fac=function(p){return new(p||_)(r.Y36(u.U))},_.\u0275cmp=r.Xpm({type:_,selectors:[["app-material-expansion-panel"]],viewQuery:function(p,x){if(1&p&&r.Gf(m.pp,5),2&p){let T;r.iGM(T=r.CRH())&&(x.accordion=T.first)}},hostBindings:function(p,x){1&p&&r.NdJ("resize",function(v){return x.onResize(v)},!1,r.Jf7)},inputs:{panelData:"panelData"},decls:1,vars:1,consts:[["class","example-headers-align","multi","",4,"ngIf"],["multi","",1,"example-headers-align"],[3,"expanded",4,"ngFor","ngForOf"],[3,"expanded"],[1,"font-weight-bold"],[3,"matTooltip","matTooltipPosition"],[1,"ms-auto",3,"fontIcon"],["matExpansionPanelContent",""],[1,"m-0","text-justify",2,"white-space","pre-line !important",3,"innerHTML"]],template:function(p,x){1&p&&r.YNc(0,P,2,1,"mat-accordion",0),2&p&&r.Q6J("ngIf",x.panelData.length>0)},dependencies:[U.sg,U.O5,m.pp,m.ib,m.yz,m.yK,m.u4,m.HS,f.Hw,g.gM]}),_})()},6020:(B,C,o)=>{o.d(C,{$:()=>U});var m=o(6895),r=o(210),u=o(4650);let U=(()=>{class f{}return f.\u0275fac=function(d){return new(d||f)},f.\u0275mod=u.oAB({type:f}),f.\u0275inj=u.cJS({imports:[m.ez,r.m]}),f})()}}]); \ No newline at end of file +"use strict";(self.webpackChunkfansubid=self.webpackChunkfansubid||[]).push([[794],{2794:(B,C,o)=>{o.r(C),o.d(C,{UserModule:()=>ee});var m=o(6895),r=o(1390),u=o(4006),U=o(7375),f=o(3170),g=o(6271),d=o(4249),D=o(2777),P=o(7355),w=o(210),_=o(6020),b=o(6436),p=o(4167),x=o(8613),T=o(2438),v=o(5934),t=o(4650),F=o(7009),Z=o(257),O=o(3e3),J=o(6382),Y=o(8745),L=o(8058),q=o(8381),Q=o(8987),y=o(4859),H=o(3238),K=o(7392),E=o(6338),N=o(266),V=o(7567),j=o(8757),$=o(325);function z(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-icon",31),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.badgeClicked(n.userData.role))}),t.qZA()}if(2&i){const e=t.oxw(2);t.s9C("matTooltip",e.userData.role)}}function W(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-icon",32),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.badgeClicked(n.userData.role))}),t.qZA()}if(2&i){const e=t.oxw(2);t.s9C("matTooltip",e.userData.role)}}function X(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-icon",33),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.badgeClicked(n.userData.role))}),t.qZA()}if(2&i){const e=t.oxw(2);t.s9C("matTooltip",e.userData.role)}}function tt(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-icon",34),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.badgeClicked("Terverifikasi"))}),t.qZA()}}function et(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-icon",35),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.badgeClicked("Banned :: "+n.userBanned.reason))}),t.qZA()}if(2&i){const e=t.oxw(2);t.MGl("matTooltip","Banned :: ",e.userBanned.reason,"")}}function it(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-icon",36),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.badgeClicked(n.accountAge+" Years of Service"))}),t.qZA()}if(2&i){const e=t.oxw(2);t.MGl("matTooltip","",e.accountAge," Years of Service")}}function st(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-icon",37),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.badgeClicked("Sharing is Caring"))}),t.qZA()}}function nt(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-icon",38),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.badgeClicked("Akun Private"))}),t.qZA()}}function ot(i,a){if(1&i&&(t.TgZ(0,"mat-list-option",47),t._UZ(1,"img",48),t.TgZ(2,"a",49)(3,"span",50),t._uU(4),t.qZA(),t.TgZ(5,"span",51),t._uU(6),t.qZA()()()),2&i){const e=a.$implicit;t.MGl("routerLink","/fansub/",e.fansub_.slug,""),t.xp6(1),t.s9C("src",e.fansub_.image_url,t.LSH),t.xp6(3),t.hij(" ",e.keterangan," "),t.xp6(2),t.Oqu(e.fansub_.slug)}}function at(i,a){if(1&i&&(t.TgZ(0,"div",6)(1,"div",39)(2,"div",40)(3,"h2",41)(4,"b",42),t._uU(5,"Group Fansub"),t.qZA()()(),t.TgZ(6,"div",43)(7,"div",44)(8,"mat-selection-list",45),t.YNc(9,ot,7,4,"mat-list-option",46),t.qZA()()()()()),2&i){const e=t.oxw(2);t.xp6(8),t.Q6J("multiple",!1),t.xp6(1),t.Q6J("ngForOf",e.groupFansub)}}function rt(i,a){if(1&i&&(t.TgZ(0,"button",52),t._UZ(1,"mat-icon",53),t._uU(2),t.qZA()),2&i){const e=t.oxw(2);t.xp6(2),t.hij(" ",e.userData.id," ")}}function lt(i,a){if(1&i&&(t.TgZ(0,"button",54),t._UZ(1,"mat-icon",55),t._uU(2),t.ALo(3,"date"),t.qZA()),2&i){const e=t.oxw(2);t.xp6(2),t.hij(" ",t.xi3(3,1,e.userData.created_at,"d/M/yyyy, hh:mm:ss a z")," ")}}function ut(i,a){if(1&i&&(t.TgZ(0,"div",39),t._UZ(1,"app-material-expansion-panel",56),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("panelData",e.panelData)}}function ct(i,a){1&i&&(t.TgZ(0,"div",39)(1,"div",6),t._UZ(2,"app-report"),t.qZA()())}function pt(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"div",6),t._UZ(6,"img",7),t.qZA(),t.TgZ(7,"div",8),t.YNc(8,z,1,1,"mat-icon",9),t.YNc(9,W,1,1,"mat-icon",10),t.YNc(10,X,1,1,"mat-icon",11),t.YNc(11,tt,1,0,"mat-icon",12),t.YNc(12,et,1,1,"mat-icon",13),t.YNc(13,it,1,1,"mat-icon",14),t.YNc(14,st,1,0,"mat-icon",15),t.YNc(15,nt,1,0,"mat-icon",16),t.qZA(),t.YNc(16,at,10,2,"div",17),t.qZA()(),t.TgZ(17,"div",18)(18,"div",19)(19,"h1",20)(20,"b"),t._uU(21),t.qZA()()(),t.TgZ(22,"div",21),t.YNc(23,rt,3,1,"button",22),t.YNc(24,lt,4,4,"button",23),t.TgZ(25,"button",24),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.createMailbox())}),t._UZ(26,"mat-icon",25),t._uU(27),t.qZA()(),t.YNc(28,ut,2,1,"div",26),t.YNc(29,ct,3,0,"div",26),t.qZA()(),t.TgZ(30,"div",27)(31,"div",6)(32,"app-material-tab",28),t.NdJ("tableRowClicked",function(n){t.CHM(e);const l=t.oxw();return t.KtG(l.openBerkas(n))})("paginatorClicked",function(n){t.CHM(e);const l=t.oxw();return t.KtG(l.onPaginatorClicked(n))})("serverSideFilter",function(n){t.CHM(e);const l=t.oxw();return t.KtG(l.onServerSideFilter(n))})("serverSideOrder",function(n){t.CHM(e);const l=t.oxw();return t.KtG(l.onServerSideOrder(n))}),t.qZA()()()(),t._UZ(33,"div",29)(34,"div",30),t.qZA()}if(2&i){const e=t.oxw();t.xp6(6),t.s9C("src",e.userData.image_url,t.LSH),t.xp6(2),t.Q6J("ngIf",e.userData.role===e.ADMIN),t.xp6(1),t.Q6J("ngIf",e.userData.role===e.MODERATOR),t.xp6(1),t.Q6J("ngIf",e.userData.role===e.FANSUBBER),t.xp6(1),t.Q6J("ngIf",e.userData.verified),t.xp6(1),t.Q6J("ngIf",e.userBanned),t.xp6(1),t.Q6J("ngIf",e.accountAge>0),t.xp6(1),t.Q6J("ngIf",e.count>0),t.xp6(1),t.Q6J("ngIf",e.userData.private),t.xp6(1),t.Q6J("ngIf",e.groupFansub.length>0),t.xp6(5),t.Oqu(e.userData.kartu_tanda_penduduk_.nama),t.xp6(2),t.Q6J("ngIf",e.userData.id),t.xp6(1),t.Q6J("ngIf",e.userData.created_at),t.xp6(3),t.AsE(" ",e.userData.username,"@",e.ENV.domain," "),t.xp6(1),t.Q6J("ngIf",e.panelData.length>0),t.xp6(1),t.Q6J("ngIf",null==e.SS.mySocket?null:e.SS.mySocket.id),t.xp6(3),t.Q6J("tabData",e.tabData)("count",e.count)("serverSide",!0),t.xp6(1),t.Udp("background-image","url("+e.userData.profile_.cover_url+")")}}let mt=(()=>{class i{constructor(e,s,n,l,c,h,A,k,S,I){this.snackBar=e,this.router=s,this.activatedRoute=n,this.gs=l,this.bs=c,this.fs=h,this.pi=A,this.us=k,this.ss=S,this.berkas=I,this.username="",this.userData=null,this.userBanned=null,this.groupFansub=[],this.berkasUser=[],this.allBerkasUserId=[],this.panelData=[],this.tabData=[{name:"Berkas",icon:"file_copy",type:"table",data:{column:["Proyek","Nama Berkas","Tanggal","Kunjungan","Pemilik"],row:[]}}],this.count=0,this.page=1,this.row=10,this.q="",this.sort="",this.order="",this.subsUser=null,this.subsBerkas=null,this.subsBanned=null,this.subsParam=null,this.subsGroupGet=null,this.subsTrusted=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get SS(){return this.ss}ngOnDestroy(){this.subsUser?.unsubscribe(),this.subsBerkas?.unsubscribe(),this.subsBanned?.unsubscribe(),this.subsParam?.unsubscribe(),this.subsGroupGet?.unsubscribe(),this.subsTrusted?.unsubscribe()}get ADMIN(){return d.yS.ADMIN}get MODERATOR(){return d.yS.MODERATOR}get FANSUBBER(){return d.yS.FANSUBBER}get accountAge(){return Math.abs(new Date(Date.now()-new Date(this.userData.created_at).getTime()).getUTCFullYear()-1970)}get ENV(){return v.N}ngOnInit(){this.subsParam=this.activatedRoute.params.subscribe({next:e=>{this.username=e.username,this.bs.busy(),this.subsUser=this.us.getUserData(this.username).subscribe({next:s=>{this.gs.log("[USER_DETAIL_SUCCESS]",s),this.userData=s.result,this.pi.updatePageMetaData(`${this.userData.kartu_tanda_penduduk_.nama}`,`${this.userData.profile_.description}`,`${this.userData.username}`,this.userData.image_url,this.userData.username),this.bs.idle(),this.gs.isBrowser&&(this.panelData=[],this.panelData.push({title:"Tentang Saya",icon:"info",text:this.userData.profile_.description}),this.fs.initializeFab("edit",null,"Ubah Profil",`/user/${this.username}/edit`,!1),this.checkBanned(),this.getUserGroup(),this.getUserBerkas())},error:s=>{this.gs.log("[USER_DETAIL_ERROR]",s,"error"),this.bs.idle(),this.router.navigate(["/error"],{queryParams:{returnUrl:"/"}})}})}})}checkBanned(){this.bs.busy(),this.subsBanned=this.us.checkBanned(this.userData.username).subscribe({next:e=>{this.gs.log("[USER_CHECK_BANNED_SUCCESS]",e),Object.keys(e.results[this.userData.username]).length>0&&(this.userBanned=e.results[this.userData.username]),this.bs.idle()},error:e=>{this.gs.log("[USER_CHECK_BANNED_ERROR]",e,"error"),this.bs.idle()}})}getUserBerkas(){this.bs.busy(),this.subsBerkas&&(this.subsBerkas.unsubscribe(),this.bs.idle()),this.subsBerkas=this.us.getUserBerkas(this.username,this.q,this.page,this.row,this.sort,this.order).subscribe({next:e=>{this.gs.log("[USER_BERKAS_LIST_SUCCESS]",e),this.count=e.count,this.berkasUser=[];for(const s of e.results)this.allBerkasUserId.push(s.id),this.berkasUser.push({id:s.id,private:s.private,foto:s.user_.image_url,Proyek:s.project_type_.name,Tanggal:s.created_at,Kunjungan:s.view_count,Pemilik:s.user_.username,"Nama Berkas":s.name});this.tabData[0].data.row=this.berkasUser,this.allBerkasUserId.length>0&&this.checkTrusted(),this.bs.idle()},error:e=>{this.gs.log("[USER_BERKAS_LIST_ERROR]",e,"error"),this.bs.idle()}})}checkTrusted(){this.bs.busy(),this.subsTrusted&&(this.subsTrusted.unsubscribe(),this.bs.idle()),this.subsTrusted=this.berkas.checkTrusted(this.allBerkasUserId).subscribe({next:e=>{this.gs.log("[USER_BERKAS_TRUSTED_SUCCESS]",e);for(const s of this.berkasUser)s.trusted=e.results[s.id];this.bs.idle()},error:e=>{this.gs.log("[USER_BERKAS_TRUSTED_ERROR]",e,"error"),this.bs.idle()}})}openBerkas(e){this.gs.log("[USER_BERKAS_LIST_CLICK_BERKAS]",e),this.router.navigateByUrl(`/berkas/${e.id}`)}onPaginatorClicked(e){this.gs.log("[USER_BERKAS_LIST_CLICK_PAGINATOR]",e),this.page=e.pageIndex+1,this.row=e.pageSize,this.getUserBerkas()}onServerSideFilter(e){this.gs.log("[USER_BERKAS_LIST_ENTER_FILTER]",e),this.q=e,this.getUserBerkas()}onServerSideOrder(e){this.gs.log("[USER_BERKAS_CLICK_ORDER]",e),this.q=e.q,this.sort=e.active,this.order=e.direction,this.getUserBerkas()}getUserGroup(){this.bs.busy(),this.subsGroupGet=this.us.getUserGroup(this.username).subscribe({next:e=>{this.gs.log("[USER_DETAIL_GROUP_LIST_SUCCESS]",e),this.groupFansub=e.results,this.bs.idle()},error:e=>{this.gs.log("[USER_DETAIL_GROUP_LIST_ERROR]",e,"error"),this.bs.idle()}})}createMailbox(){this.router.navigate(["/create/mailbox"],{queryParams:{to:`${this.userData.username}@${v.N.domain}`}})}badgeClicked(e){this.snackBar.open(e,"Ok")}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(F.ux),t.Y36(r.F0),t.Y36(r.gz),t.Y36(Z.U),t.Y36(O.z),t.Y36(J.r),t.Y36(Y.Z),t.Y36(L.K),t.Y36(q.R),t.Y36(Q.A))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-user-detail"]],decls:1,vars:1,consts:[["class","container",4,"ngIf"],[1,"container"],[1,"profile-info","align-items-center",2,"top","64px","position","relative"],[1,"row","py-3","px-2"],[1,"col-md-4","col-xl-3","px-3"],[1,"row","sticky-top","pt-3"],[1,"col-12"],[1,"profile-image",3,"src"],[1,"col-12","my-3"],["fontIcon","handyman","class","mx-1","style","cursor: pointer;",3,"matTooltip","click",4,"ngIf"],["fontIcon","security","class","mx-1","style","cursor: pointer;",3,"matTooltip","click",4,"ngIf"],["fontIcon","rate_review","class","mx-1","style","cursor: pointer;",3,"matTooltip","click",4,"ngIf"],["fontIcon","verified","class","mx-1","matTooltip","Terverifikasi","style","cursor: pointer;",3,"click",4,"ngIf"],["fontIcon","lock","class","mx-1","style","cursor: pointer;",3,"matTooltip","click",4,"ngIf"],["fontIcon","military_tech","class","mx-1","style","cursor: pointer;",3,"matTooltip","click",4,"ngIf"],["fontIcon","volunteer_activism","class","mx-1","matTooltip","Sharing is Caring","style","cursor: pointer;",3,"click",4,"ngIf"],["fontIcon","sensor_occupied","class","mx-1","matTooltip","Akun Private","style","cursor: pointer;",3,"click",4,"ngIf"],["class","col-12",4,"ngIf"],[1,"col-md-8","col-xl-9","pt-3"],[1,"row","py-3","px-0","profile-height-large"],[1,"m-0","mt-auto"],[1,"row","p-3"],["type","button","mat-stroked-button","","matLine","","class","col-12 col-md-4 text-truncate","matTooltip","Nomor ID Pengguna","color","accent","style","overflow: hidden;",4,"ngIf"],["type","button","mat-stroked-button","","matLine","","class","col-12 col-md-8 text-truncate","matTooltip","Tanggal Bergabung","color","accent","style","overflow: hidden;",4,"ngIf"],["type","button","mat-stroked-button","","matLine","","matTooltip","Alamat Surel","color","accent",1,"col","text-truncate",2,"overflow","hidden",3,"click"],["fontIcon","email",1,"me-1"],["class","row py-3",4,"ngIf"],[1,"row"],[3,"tabData","count","serverSide","tableRowClicked","paginatorClicked","serverSideFilter","serverSideOrder"],[1,"profile-banner","profile-banner-1","align-items-center"],[1,"profile-banner","profile-banner-2","align-items-center"],["fontIcon","handyman",1,"mx-1",2,"cursor","pointer",3,"matTooltip","click"],["fontIcon","security",1,"mx-1",2,"cursor","pointer",3,"matTooltip","click"],["fontIcon","rate_review",1,"mx-1",2,"cursor","pointer",3,"matTooltip","click"],["fontIcon","verified","matTooltip","Terverifikasi",1,"mx-1",2,"cursor","pointer",3,"click"],["fontIcon","lock",1,"mx-1",2,"cursor","pointer",3,"matTooltip","click"],["fontIcon","military_tech",1,"mx-1",2,"cursor","pointer",3,"matTooltip","click"],["fontIcon","volunteer_activism","matTooltip","Sharing is Caring",1,"mx-1",2,"cursor","pointer",3,"click"],["fontIcon","sensor_occupied","matTooltip","Akun Private",1,"mx-1",2,"cursor","pointer",3,"click"],[1,"row","py-3"],[1,"col-12","pt-3","sticky-top","bg-bifeldy"],[1,"border-bottom-dotted"],[1,"text-bifeldy"],[1,"col-12",2,"max-height","288px"],[1,"h-100",2,"overflow-y","auto"],[3,"multiple"],["class","h-100",3,"routerLink",4,"ngFor","ngForOf"],[1,"h-100",3,"routerLink"],["matListAvatar","",1,"ms-3",2,"border-radius","0",3,"src"],[1,"text-truncate","text-decoration-none"],[1,"bg-bifeldy","px-2","me-1","text-warning",2,"position","absolute","right","0"],[1,"text-success"],["type","button","mat-stroked-button","","matLine","","matTooltip","Nomor ID Pengguna","color","accent",1,"col-12","col-md-4","text-truncate",2,"overflow","hidden"],["fontIcon","accessibility_new",1,"me-1"],["type","button","mat-stroked-button","","matLine","","matTooltip","Tanggal Bergabung","color","accent",1,"col-12","col-md-8","text-truncate",2,"overflow","hidden"],["fontIcon","access_time",1,"me-1"],[3,"panelData"]],template:function(e,s){1&e&&t.YNc(0,pt,35,22,"div",0),2&e&&t.Q6J("ngIf",s.userData)},dependencies:[m.sg,m.O5,r.rH,y.lW,H.X2,K.Hw,E.eA,E.Ub,E.vS,N.gM,V.Q,j.H,$.Y,m.uU],styles:[".profile-banner[_ngcontent-%COMP%]{height:192px;width:100%;background-size:cover;background-position:center;background-repeat:no-repeat;opacity:.75}.profile-banner-1[_ngcontent-%COMP%]{position:absolute;top:0;left:0}.profile-banner-2[_ngcontent-%COMP%]{position:absolute;top:192px;left:0}.profile-info[_ngcontent-%COMP%]{position:relative;height:256px;z-index:1}.profile-image[_ngcontent-%COMP%]{width:50%}@media only screen and (min-width: 769px){.profile-height-large[_ngcontent-%COMP%]{height:100px}.profile-image[_ngcontent-%COMP%]{width:100%}}@media only screen and (max-width: 768px){.profile-image[_ngcontent-%COMP%]{padding-top:3rem}}"]}),i})();var _t=o(4425),G=o(4137),gt=o(7845),dt=o(6781),ht=o(9731);let ft=(()=>{class i{constructor(e,s){this.api=e,this.gs=s}getUserApiKey(e){return this.api.getData(`/api-key?username=${e}`)}createApiKey(e){return this.api.postData("/api-key",e)}editApiKey(e,s){return this.api.putData(`/api-key/${e}`,s)}revokeApiKey(e){return this.api.deleteData(`/api-key/${e}`)}}return i.\u0275fac=function(e){return new(e||i)(t.LFG(ht.s),t.LFG(Z.U))},i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var bt=o(8020),xt=o(8616),vt=o(192),Ut=o(6766);function Tt(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-list-option",27),t._UZ(1,"mat-icon",28),t.TgZ(2,"a",29),t.NdJ("click",function(){const l=t.CHM(e).$implicit,c=t.oxw(2);return t.KtG(c.openComment(l))}),t.TgZ(3,"span",30),t._uU(4),t.ALo(5,"dateAgo"),t.qZA(),t.TgZ(6,"span",31),t._uU(7),t.qZA()()()}if(2&i){const e=a.$implicit;t.xp6(4),t.Oqu(t.lcZ(5,2,e.created_at)),t.xp6(3),t.Oqu(e.comment)}}function Et(i,a){if(1&i&&(t.TgZ(0,"div",11)(1,"mat-selection-list",25),t.YNc(2,Tt,8,4,"mat-list-option",26),t.ALo(3,"slice"),t.qZA()()),2&i){const e=t.oxw();t.xp6(1),t.Q6J("multiple",!1),t.xp6(1),t.Q6J("ngForOf",t.Dn7(3,2,e.feedKomentarData,0,5))}}function Ct(i,a){if(1&i&&(t.TgZ(0,"mat-list-option",27),t._UZ(1,"mat-icon",32),t.TgZ(2,"a",33)(3,"span",30),t._uU(4),t.ALo(5,"dateAgo"),t.qZA(),t.TgZ(6,"span",34),t._uU(7),t.qZA(),t.TgZ(8,"span",35),t._uU(9),t.qZA(),t.TgZ(10,"span",31),t._uU(11),t.qZA()()()),2&i){const e=a.$implicit;t.xp6(2),t.Q6J("routerLink",e.berkas_?"/berkas/"+(null==e.berkas_?null:e.berkas_.id):e.fansub_?"/fansub/"+(null==e.fansub_?null:e.fansub_.slug):e.user_?"/user/"+(null==e.user_?null:e.user_.username):e.news_?"/news/"+(null==e.news_?null:e.news_.id):""),t.xp6(2),t.Oqu(t.lcZ(5,5,e.created_at)),t.xp6(3),t.Oqu(e.type),t.xp6(2),t.Oqu(e.berkas_?"Berkas":e.fansub_?"Fansub":e.user_?"User":e.news_?"News":""),t.xp6(2),t.Oqu((null==e.berkas_?null:e.berkas_.name)||(null==e.fansub_?null:e.fansub_.name)||(null==e.user_||null==e.user_.kartu_tanda_penduduk_?null:e.user_.kartu_tanda_penduduk_.nama)||(null==e.news_?null:e.news_.title))}}function At(i,a){if(1&i&&(t.TgZ(0,"div",11)(1,"mat-selection-list",25),t.YNc(2,Ct,12,7,"mat-list-option",26),t.ALo(3,"slice"),t.qZA()()),2&i){const e=t.oxw();t.xp6(1),t.Q6J("multiple",!1),t.xp6(1),t.Q6J("ngForOf",t.Dn7(3,2,e.feedLikeDislikeData,0,5))}}function kt(i,a){if(1&i&&(t.TgZ(0,"mat-list-option",27),t._UZ(1,"mat-icon",36),t.TgZ(2,"a",33)(3,"span",30),t._uU(4),t.ALo(5,"dateAgo"),t.qZA(),t.TgZ(6,"span",35),t._uU(7),t.qZA(),t.TgZ(8,"span",31),t._uU(9),t.qZA()()()),2&i){const e=a.$implicit;t.xp6(2),t.Q6J("routerLink",e.berkas_?"/berkas/"+(null==e.berkas_?null:e.berkas_.id):e.fansub_?"/fansub/"+(null==e.fansub_?null:e.fansub_.slug):e.user_?"/user/"+(null==e.user_?null:e.user_.username):e.news_?"/news/"+(null==e.news_?null:e.news_.id):""),t.xp6(2),t.Oqu(t.lcZ(5,4,e.created_at)),t.xp6(3),t.Oqu(e.berkas_?"Berkas":e.fansub_?"Fansub":e.user_?"User":e.news_?"News":""),t.xp6(2),t.Oqu((null==e.berkas_?null:e.berkas_.name)||(null==e.fansub_?null:e.fansub_.name)||(null==e.user_||null==e.user_.kartu_tanda_penduduk_?null:e.user_.kartu_tanda_penduduk_.nama)||(null==e.news_?null:e.news_.title))}}function St(i,a){if(1&i&&(t.TgZ(0,"div",11)(1,"mat-selection-list",25),t.YNc(2,kt,10,6,"mat-list-option",26),t.ALo(3,"slice"),t.qZA()()),2&i){const e=t.oxw();t.xp6(1),t.Q6J("multiple",!1),t.xp6(1),t.Q6J("ngForOf",t.Dn7(3,2,e.feedVisitData,0,5))}}function It(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",37),t.NdJ("click",function(){const l=t.CHM(e).$implicit,c=t.oxw();return c.copyApiKey(l),t.KtG(c.editApiKey(l))}),t.TgZ(1,"p",38),t._uU(2," Nama :: "),t.TgZ(3,"span",39),t._uU(4),t.qZA()(),t.TgZ(5,"p",40),t._uU(6," Origin :: "),t.TgZ(7,"span",39),t._uU(8),t.qZA()(),t.TgZ(9,"p",41),t._uU(10," Key :: "),t.TgZ(11,"span",39),t._uU(12),t.qZA()(),t.TgZ(13,"a",17),t.NdJ("click",function(n){const c=t.CHM(e).$implicit,h=t.oxw();return n.stopPropagation(),t.KtG(h.revokeApiKey(c))}),t._UZ(14,"mat-icon",42),t._uU(15," Hapus Akses "),t.qZA()()}if(2&i){const e=a.$implicit;t.xp6(4),t.hij(" ",e.name," "),t.xp6(4),t.hij(" ",e.ip_domain," "),t.xp6(4),t.hij(" ",e.api_key," ")}}function Dt(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-list-option",46),t.NdJ("click",function(){const l=t.CHM(e).$implicit,c=t.oxw(2);return t.KtG(c.editSubDomain(l.fansub_))}),t._UZ(1,"img",47),t.TgZ(2,"a",48)(3,"span",49),t._uU(4),t.ALo(5,"date"),t.qZA(),t.TgZ(6,"span",39),t._uU(7),t.qZA()()()}if(2&i){const e=a.$implicit;t.xp6(1),t.s9C("src",e.fansub_.image_url,t.LSH),t.xp6(3),t.hij(" ",t.xi3(5,3,e.updated_at,"d-MM-y")," "),t.xp6(3),t.Oqu(e.fansub_.slug)}}function Zt(i,a){if(1&i&&(t.TgZ(0,"div",43)(1,"div",44)(2,"mat-selection-list",25),t.YNc(3,Dt,8,6,"mat-list-option",45),t.qZA()()()),2&i){const e=t.oxw();t.xp6(2),t.Q6J("multiple",!1),t.xp6(1),t.Q6J("ngForOf",e.groupFansub)}}function yt(i,a){1&i&&t._UZ(0,"app-no-data",50)}let Rt=(()=>{class i{constructor(e,s,n,l,c,h,A,k,S,I,M,ie){this.clipboard=e,this.router=s,this.snackBar=n,this.as=l,this.ds=c,this.gs=h,this.fs=A,this.bs=k,this.us=S,this.fansub=I,this.aks=M,this.wb=ie,this.feedKomentarData=[],this.feedLikeDislikeData=[],this.feedVisitData=[],this.subsFeedKomentar=null,this.subsFeedLikeDislike=null,this.subsFeedVisit=null,this.subsGetApiKey=null,this.subsDialog=null,this.subsCreateApiKey=null,this.subsEditApiKey=null,this.subsRevokeApiKey=null,this.subsGroupGet=null,this.subsUpdateSubDomain=null,this.subsGetSubDomain=null,this.apiKey=[],this.groupFansub=[],this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get AS(){return this.as}get ENV(){return v.N}ngOnInit(){this.gs.isBrowser&&(this.getUserFeedComment(),this.getUserFeedLikeDislike(),this.getUserFeedVisit(),this.getUserApiKey(),this.getUserGroup(),this.fs.initializeFab("arrow_forward",null,"Menuju Halaman Profile",`/user/${this.as.currentUserSubject?.value?.username}`,!1))}ngOnDestroy(){this.subsFeedKomentar?.unsubscribe(),this.subsFeedLikeDislike?.unsubscribe(),this.subsFeedVisit?.unsubscribe(),this.subsGetApiKey?.unsubscribe(),this.subsDialog?.unsubscribe(),this.subsCreateApiKey?.unsubscribe(),this.subsEditApiKey?.unsubscribe(),this.subsRevokeApiKey?.unsubscribe(),this.subsGroupGet?.unsubscribe(),this.subsUpdateSubDomain?.unsubscribe(),this.subsGetSubDomain?.unsubscribe()}getUserFeedComment(){this.bs.busy(),this.subsFeedKomentar=this.us.getUserFeedComment(this.as.currentUserSubject?.value?.username,"",1,5).subscribe({next:e=>{this.gs.log("[USER_FEED_COMMENT_SUCCESS]",e),this.feedKomentarData=e.results,this.bs.idle()},error:e=>{this.gs.log("[USER_FEED_COMMENT_ERROR]",e,"error"),this.bs.idle()}})}getUserFeedLikeDislike(){this.bs.busy(),this.subsFeedLikeDislike=this.us.getUserFeedLikeDislike(this.as.currentUserSubject?.value?.username,"",1,5).subscribe({next:e=>{this.gs.log("[USER_FEED_LIKEDISLIKE_SUCCESS]",e),this.feedLikeDislikeData=e.results,this.bs.idle()},error:e=>{this.gs.log("[USER_FEED_LIKEDISLIKE_ERROR]",e,"error"),this.bs.idle()}})}getUserFeedVisit(){this.bs.busy(),this.subsFeedVisit=this.us.getUserFeedVisit(this.as.currentUserSubject?.value?.username,"",1,5).subscribe({next:e=>{this.gs.log("[USER_FEED_VISIT_SUCCESS]",e),this.feedVisitData=e.results,this.bs.idle()},error:e=>{this.gs.log("[USER_FEED_VISIT_ERROR]",e,"error"),this.bs.idle()}})}getUserApiKey(){this.bs.busy(),this.subsGetApiKey=this.aks.getUserApiKey(this.as.currentUserSubject?.value?.username).subscribe({next:e=>{this.gs.log("[USER_FEED_VISIT_SUCCESS]",e),this.apiKey=e.results[this.as.currentUserSubject?.value?.username],this.bs.idle()},error:e=>{this.gs.log("[USER_FEED_VISIT_ERROR]",e,"error"),this.bs.idle()}})}copyApiKey(e){this.clipboard.copy(e.api_key)&&this.snackBar.open("API Key :: Telah Di Salin Pada Clipboard","Ok")}generateNewApiKey(){this.subsDialog=this.ds.openInputDialog({data:{title:"Tambah API Key Baru",input:{name:{inputLabel:"Nama / Deskripsi",inputPlaceholder:`${this.as.currentUserSubject?.value?.username}_${Date.now()}`,inputValue:null,inputRequired:!0},ip_domain:{inputLabel:"Origin Tanpa http://",inputPlaceholder:"example.com; 1.1.1.1; *",inputValue:null,inputRequired:!0}},confirmText:"OK",cancelText:"Batal",infoText:"Gunakan * Saja Untuk Perbolehkan Semua Dan Titik Koma ; Untuk Lebih Dari Satu"}}).afterClosed().subscribe({next:e=>{this.gs.log("[INPUT_DIALOG_CLOSED]",e),e&&(this.bs.busy(),this.subsCreateApiKey=this.aks.createApiKey({name:e.name,ip_domain:e.ip_domain}).subscribe({next:s=>{this.gs.log("[USER_CREATE_APIKEY_SUCCESS]",s),this.bs.idle(),this.getUserApiKey()},error:s=>{this.gs.log("[USER_CREATE_APIKEY_ERROR]",s,"error"),this.bs.idle(),this.getUserApiKey()}})),this.subsDialog.unsubscribe()}})}editApiKey(e){this.subsDialog=this.ds.openInputDialog({data:{title:"Ubah API Key",input:{name:{inputLabel:"Nama / Deskripsi",inputPlaceholder:e.name,inputValue:e.name,inputRequired:!0},ip_domain:{inputLabel:"Origin Tanpa http://",inputPlaceholder:e.ip_domain,inputValue:e.ip_domain,inputRequired:!0}},confirmText:"OK",cancelText:"Batal",infoText:"Gunakan * Saja Untuk Perbolehkan Semua Dan Titik Koma ; Untuk Lebih Dari Satu"}}).afterClosed().subscribe({next:s=>{this.gs.log("[INPUT_DIALOG_CLOSED]",s),s&&(this.bs.busy(),this.subsEditApiKey=this.aks.editApiKey(e.id,{name:s.name,ip_domain:s.ip_domain}).subscribe({next:n=>{this.gs.log("[USER_EDIT_APIKEY_SUCCESS]",n),this.bs.idle(),this.getUserApiKey()},error:n=>{this.gs.log("[USER_EDIT_APIKEY_ERROR]",n,"error"),this.bs.idle(),this.getUserApiKey()}})),this.subsDialog.unsubscribe()}})}revokeApiKey(e){this.bs.busy(),this.subsRevokeApiKey=this.aks.revokeApiKey(e.id).subscribe({next:s=>{this.gs.log("[USER_REVOKE_APIKEY_SUCCESS]",s),this.bs.idle(),this.getUserApiKey()},error:s=>{this.gs.log("[USER_REVOKE_APIKEY_ERROR]",s,"error"),this.bs.idle(),this.getUserApiKey()}})}getUserGroup(){this.bs.busy(),this.subsGroupGet=this.us.getUserGroup(this.as.currentUserSubject?.value?.username).subscribe({next:e=>{this.gs.log("[USER_GROUP_LIST_SUCCESS]",e),this.groupFansub=e.results,this.bs.idle()},error:e=>{this.gs.log("[USER_GROUP_LIST_ERROR]",e,"error"),this.bs.idle()}})}editSubDomain(e){this.bs.busy(),this.subsGetSubDomain=this.fansub.getSubDomain(e.slug).subscribe({next:s=>{this.gs.log("[USER_FANSUB_SUBDOMAIN_SUCCESS]",s),this.bs.idle();const n=s.result;this.subsDialog=this.ds.openInputDialog({data:{title:`Ubah CNAME / A Record IP v4 v6 :: '${e.slug}'`,input:{server_target:{inputLabel:"Server Target",inputPlaceholder:"ghs.google.com",inputValue:n.dns_id.content,inputRequired:!0},verification_name:{inputLabel:"Tambahan Khusus Blogger :: Name",inputPlaceholder:"blablabla-name",inputValue:n.dns_id_alt?.name,inputRequired:!1},verification_target:{inputLabel:"Tambahan Khusus Blogger :: Target",inputPlaceholder:"blablabla-target.dv.googlehosted.com",inputValue:n.dns_id_alt?.content,inputRequired:!1}},confirmText:"OK",cancelText:"Batal",infoText:"Abaikan 2 Input Terakhir Jika Bukan Blogger"}}).afterClosed().subscribe({next:l=>{this.gs.log("[INPUT_DIALOG_CLOSED]",l),l&&(this.bs.busy(),this.subsUpdateSubDomain=this.fansub.updateSubDomain(e.slug,{server_target:l.server_target,verification_name:l.verification_name,verification_target:l.verification_target}).subscribe({next:c=>{this.gs.log("[FANSUB_UPDATE_SUBDOMAIN_SUCCESS]",c),this.bs.idle(),this.getUserGroup()},error:c=>{this.gs.log("[FANSUB_UPDATE_SUBDOMAIN_ERROR]",c,"error"),this.bs.idle(),this.getUserGroup()}})),this.subsDialog.unsubscribe()}})},error:s=>{this.gs.log("[USER_FANSUB_SUBDOMAIN_ERROR]",s,"error"),this.bs.idle(),this.subsDialog=this.ds.openInfoDialog({data:{title:`Sepertinya Sub-Domain '${e.slug}' Belum Di Klaim`,htmlMessage:"Silahkan ambil sub-domain pada halaman fansub, ingin ke sana sekarang?",confirmText:"Ya",cancelText:"Tidak"},disableClose:!1}).afterClosed().subscribe({next:n=>{this.gs.log("[INFO_DIALOG_CLOSED]",n),!0===n?this.router.navigateByUrl(`/fansub/${e.slug}`):this.getUserGroup(),this.subsDialog.unsubscribe()}})}})}openComment(e){this.router.navigate([e.path],{queryParams:{comment:e.id}})}openApiDocs(){this.wb.winboxOpenUri(`${v.N.baseUrl}/api`,"_self",!0)}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(_t.TU),t.Y36(r.F0),t.Y36(F.ux),t.Y36(G.e),t.Y36(gt.x),t.Y36(Z.U),t.Y36(J.r),t.Y36(O.z),t.Y36(L.K),t.Y36(dt.T),t.Y36(ft),t.Y36(bt.N))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-user-list"]],decls:65,vars:12,consts:[[1,"container"],[1,"row","pb-3","px-0"],[1,"col-lg-8","col-xl-9"],[1,"row"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"float-end","text-warning",2,"font-size","small","cursor","pointer",3,"click"],[1,"text-bifeldy"],["class","col-12",4,"ngIf","ngIfElse"],[1,"col-lg-4","col-xl-3"],[1,"row","sticky-top"],[1,"col-12"],["matTooltip","Khusus Pengguna Terverifikasi",1,"text-bifeldy"],[1,"col-12","mb-2"],["mat-button","","color","accent","matTooltip","Buka Kotak Pesan","routerLink","/mailbox",1,"w-100"],["fontIcon","email",1,"me-1"],[1,"text-bifeldy",3,"matTooltip"],["mat-button","","color","accent",1,"w-100",3,"click"],["fontIcon","api",1,"me-1"],["fontIcon","webhook",1,"me-1"],["class","my-2 gradient-border",3,"click",4,"ngFor","ngForOf"],[1,"row","mt-4"],[1,"border-bottom-dotted"],["class","col-12 mb-2","style","max-height: 288px;",4,"ngIf","ngIfElse"],["noData",""],[3,"multiple"],["class","h-100",4,"ngFor","ngForOf"],[1,"h-100"],["fontIcon","add_comment","mat-list-icon","",1,"ps-3"],[1,"text-truncate","text-decoration-none",3,"click"],[1,"bg-bifeldy","px-2","me-1","text-danger",2,"position","absolute","right","0"],[1,"text-warning"],["fontIcon","volunteer_activism","mat-list-icon","",1,"ps-3"],[1,"text-truncate","text-decoration-none",3,"routerLink"],[1,"me-3","text-success"],[1,"me-3","text-info"],["fontIcon","directions_run","mat-list-icon","",1,"ps-3"],[1,"my-2","gradient-border",3,"click"],[1,"ps-2","pe-2","pt-2","text-truncate","my-0"],[1,"text-success"],[1,"ps-2","pe-2","pt-0","text-truncate","my-0"],[1,"ps-2","pe-2","pb-2","text-truncate","my-0"],["fontIcon","delete_sweep",1,"me-1"],[1,"col-12","mb-2",2,"max-height","288px"],[1,"h-100",2,"overflow-y","auto"],["class","h-100",3,"click",4,"ngFor","ngForOf"],[1,"h-100",3,"click"],["matListAvatar","",1,"ms-3",2,"border-radius","0",3,"src"],[1,"text-truncate","text-decoration-none"],[1,"bg-bifeldy","px-2","me-1","text-warning",2,"position","absolute","right","0"],[1,"col-12","p-3"]],template:function(e,s){if(1&e&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4)(6,"h2",5)(7,"span",6),t.NdJ("click",function(){return s.getUserFeedComment()}),t._uU(8," Refresh "),t.qZA(),t.TgZ(9,"b",7),t._uU(10,"Riwayat Komentar"),t.qZA()()(),t.YNc(11,Et,4,6,"div",8),t.qZA(),t.TgZ(12,"div",3)(13,"div",4)(14,"h2",5)(15,"span",6),t.NdJ("click",function(){return s.getUserFeedLikeDislike()}),t._uU(16," Refresh "),t.qZA(),t.TgZ(17,"b",7),t._uU(18,"Riwayat Like & Dislike"),t.qZA()()(),t.YNc(19,At,4,6,"div",8),t.qZA(),t.TgZ(20,"div",3)(21,"div",4)(22,"h2",5)(23,"span",6),t.NdJ("click",function(){return s.getUserFeedVisit()}),t._uU(24," Refresh "),t.qZA(),t.TgZ(25,"b",7),t._uU(26,"Riwayat Kunjungan"),t.qZA()()(),t.YNc(27,St,4,6,"div",8),t.qZA()(),t.TgZ(28,"div",9)(29,"div",10)(30,"div",11)(31,"div",3)(32,"div",4)(33,"h2",5)(34,"b",12),t._uU(35,"Alamat Email"),t.qZA()()(),t.TgZ(36,"div",13)(37,"a",14),t._UZ(38,"mat-icon",15),t._uU(39),t.qZA()()(),t.TgZ(40,"div",3)(41,"div",4)(42,"h2",5)(43,"span",6),t.NdJ("click",function(){return s.getUserApiKey()}),t._uU(44," Refresh "),t.qZA(),t.TgZ(45,"b",16),t._uU(46,"API Key"),t.qZA()()(),t.TgZ(47,"div",13)(48,"a",17),t.NdJ("click",function(){return s.openApiDocs()}),t._UZ(49,"mat-icon",18),t._uU(50," Lihat API Endpoint "),t.qZA(),t.TgZ(51,"a",17),t.NdJ("click",function(){return s.generateNewApiKey()}),t._UZ(52,"mat-icon",19),t._uU(53," Buat API Key Baru "),t.qZA(),t.YNc(54,It,16,3,"div",20),t.qZA()(),t.TgZ(55,"div",21)(56,"div",4)(57,"h2",22)(58,"span",6),t.NdJ("click",function(){return s.getUserGroup()}),t._uU(59," Refresh "),t.qZA(),t.TgZ(60,"b",7),t._uU(61,"DNS Fansub"),t.qZA()()(),t.YNc(62,Zt,4,2,"div",23),t.qZA()()()()()(),t.YNc(63,yt,1,0,"ng-template",null,24,t.W1O)),2&e){const n=t.MAs(64);t.xp6(11),t.Q6J("ngIf",s.feedKomentarData.length>0)("ngIfElse",n),t.xp6(8),t.Q6J("ngIf",s.feedLikeDislikeData.length>0)("ngIfElse",n),t.xp6(8),t.Q6J("ngIf",s.feedVisitData.length>0)("ngIfElse",n),t.xp6(12),t.AsE(" '",null==s.AS.currentUserSubject||null==s.AS.currentUserSubject.value?null:s.AS.currentUserSubject.value.username,"@",s.ENV.domain,"' "),t.xp6(6),t.MGl("matTooltip","Aktivitas Terakhir :: ",null==s.AS.currentUserSubject||null==s.AS.currentUserSubject.value?null:s.AS.currentUserSubject.value._session_origin,""),t.xp6(9),t.Q6J("ngForOf",s.apiKey),t.xp6(8),t.Q6J("ngIf",s.groupFansub.length>0)("ngIfElse",n)}},dependencies:[m.sg,m.O5,r.yS,y.zs,K.Hw,E.eA,E.Nh,E.Ub,E.vS,N.gM,xt.t,vt.d,m.OU,m.uU,Ut.R]}),i})();var Pt=o(6925),wt=o(7902),Ot=o(8379),R=o(9549),Lt=o(4144),Kt=o(455),Nt=o(3626);function Mt(i,a){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.imagePhotoLimitExceeded)," !")}}function Bt(i,a){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Oqu(e.imagePhotoErrorText)}}function Ft(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",46)(1,"button",47),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.submitPhotoImage())}),t._UZ(2,"mat-icon",48),t._uU(3," Unggah "),t.qZA()()}if(2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("disabled",e.submitted)}}function Jt(i,a){1&i&&(t.TgZ(0,"div"),t._uU(1,"Nama Tidak Boleh Kosong"),t.qZA())}function Yt(i,a){1&i&&(t.TgZ(0,"div"),t._uU(1,"Nama Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function Gt(i,a){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.imageCoverLimitExceeded)," !")}}function qt(i,a){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Oqu(e.imageCoverErrorText)}}function Qt(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",16)(1,"button",47),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.submitCoverImage())}),t._UZ(2,"mat-icon",48),t._uU(3," Unggah "),t.qZA()()}if(2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("disabled",e.submitted)}}function Ht(i,a){1&i&&(t.TgZ(0,"div"),t._uU(1,"Password Tidak Boleh Kosong"),t.qZA())}function Vt(i,a){1&i&&(t.TgZ(0,"div"),t._uU(1,"Password Minimal 8 Huruf"),t.qZA())}function jt(i,a){1&i&&(t.TgZ(0,"div"),t._uU(1,"Password Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function $t(i,a){1&i&&(t.TgZ(0,"div"),t._uU(1,"Password Minimal 8 Huruf"),t.qZA())}function zt(i,a){1&i&&(t.TgZ(0,"div"),t._uU(1,"Password Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function Wt(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"form",1),t.NdJ("submit",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.onSubmit())}),t.TgZ(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"div",6)(6,"div",7),t._UZ(7,"img",8),t.TgZ(8,"mat-form-field",9)(9,"mat-label"),t._uU(10,"Profile Image"),t.qZA(),t.TgZ(11,"ngx-mat-file-input",10,11),t.NdJ("change",function(n){t.CHM(e);const l=t.MAs(12),c=t.oxw();return t.KtG(c.uploadPhotoImage(n,l))}),t.qZA(),t._UZ(13,"mat-icon",12),t.qZA(),t.TgZ(14,"mat-error",13)(15,"small"),t.YNc(16,Mt,3,3,"div",14),t.YNc(17,Bt,2,1,"div",14),t.qZA()()(),t.YNc(18,Ft,4,1,"div",15),t.TgZ(19,"div",16)(20,"mat-slide-toggle",17),t._uU(21," Jadikan Private, Sembunyikan Aktivitas "),t.qZA()(),t.TgZ(22,"div",18),t._uU(23," * Jika ingin mengubah "),t.TgZ(24,"i"),t._uU(25,"username"),t.qZA(),t._uU(26," silahkan menghubungi Admin menggunakan surel "),t.TgZ(27,"span",19),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.changeUname())}),t._uU(28),t.qZA()()()(),t.TgZ(29,"div",20),t._UZ(30,"div",21),t.TgZ(31,"div",22)(32,"mat-form-field",23)(33,"mat-label"),t._uU(34,"Nama Lengkap"),t.qZA(),t._UZ(35,"input",24)(36,"mat-icon",25),t.TgZ(37,"mat-error"),t.YNc(38,Jt,2,0,"div",14),t.YNc(39,Yt,2,0,"div",14),t.qZA()(),t.TgZ(40,"mat-form-field",26)(41,"mat-label"),t._uU(42,"Cover Image"),t.qZA(),t.TgZ(43,"ngx-mat-file-input",27,28),t.NdJ("change",function(n){t.CHM(e);const l=t.MAs(44),c=t.oxw();return t.KtG(c.uploadCoverImage(n,l))}),t.qZA(),t._UZ(45,"mat-icon",12),t.qZA(),t.TgZ(46,"mat-error",13)(47,"small"),t.YNc(48,Gt,3,3,"div",14),t.YNc(49,qt,2,1,"div",14),t.qZA()(),t.YNc(50,Qt,4,1,"div",29),t._UZ(51,"angular-editor",30),t.TgZ(52,"mat-form-field",31)(53,"mat-label"),t._uU(54,"Konfirmasi Kata Sandi"),t.qZA(),t._UZ(55,"input",32),t.TgZ(56,"button",33),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.togglePassword())}),t._UZ(57,"mat-icon",34),t.qZA(),t.TgZ(58,"mat-error"),t.YNc(59,Ht,2,0,"div",14),t.YNc(60,Vt,2,0,"div",14),t.YNc(61,jt,2,0,"div",14),t.qZA()(),t.TgZ(62,"mat-form-field",31)(63,"mat-label"),t._uU(64,"Ubah Kata Sandi"),t.qZA(),t._UZ(65,"input",35),t.TgZ(66,"button",33),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.togglePassword())}),t._UZ(67,"mat-icon",34),t.qZA(),t.TgZ(68,"mat-error"),t.YNc(69,$t,2,0,"div",14),t.YNc(70,zt,2,0,"div",14),t.qZA()()(),t.TgZ(71,"div",36)(72,"div",7)(73,"div",37),t._UZ(74,"div",38),t.TgZ(75,"div",39)(76,"a",40),t._UZ(77,"mat-icon",41),t._uU(78," Batal "),t.qZA()(),t.TgZ(79,"div",39)(80,"button",42),t._uU(81," Simpan "),t._UZ(82,"mat-icon",43),t.qZA()()()()()()()(),t._UZ(83,"div",44)(84,"div",45),t.qZA()()}if(2&i){const e=t.oxw();t.Q6J("formGroup",e.fg),t.xp6(7),t.s9C("src",e.image_photo,t.LSH),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(5),t.Q6J("ngIf",e.imagePhotoLimitExceeded),t.xp6(1),t.Q6J("ngIf",e.imagePhotoErrorText),t.xp6(1),t.Q6J("ngIf",e.imagePhoto&&!e.fg.value.image_photo),t.xp6(10),t.AsE("",e.userData.username,"@",e.ENV.domain,""),t.xp6(4),t.Q6J("color","accent"),t.xp6(6),t.Q6J("ngIf",e.fg.get("nama").hasError("required")),t.xp6(1),t.Q6J("ngIf",e.fg.get("nama").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(5),t.Q6J("ngIf",e.imageCoverLimitExceeded),t.xp6(1),t.Q6J("ngIf",e.imageCoverErrorText),t.xp6(1),t.Q6J("ngIf",e.imageCover&&!e.fg.value.image_cover),t.xp6(1),t.Q6J("config",e.GS.angularEditorConfig),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("type",e.passwordHide?"password":"text"),t.xp6(2),t.Q6J("fontIcon",e.passwordHide?"visibility_off":"visibility"),t.xp6(2),t.Q6J("ngIf",e.fg.get("old_password").hasError("required")),t.xp6(1),t.Q6J("ngIf",e.fg.get("old_password").hasError("minlength")),t.xp6(1),t.Q6J("ngIf",e.fg.get("old_password").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("type",e.passwordHide?"password":"text"),t.xp6(2),t.Q6J("fontIcon",e.passwordHide?"visibility_off":"visibility"),t.xp6(2),t.Q6J("ngIf",e.fg.get("new_password").hasError("minlength")),t.xp6(1),t.Q6J("ngIf",e.fg.get("new_password").hasError("pattern")),t.xp6(6),t.Q6J("disabled",e.submitted),t.xp6(4),t.Q6J("disabled",e.submitted||e.fg.invalid||!e.fg.dirty),t.xp6(3),t.Udp("background-image","url("+e.image_cover+")")}}const te=[{path:"",pathMatch:"full",component:Rt,canActivate:[D.t],data:{title:"User - Dashboard Overview",description:"Halaman Informasi Pengguna",keywords:"User",[g.t.decoratorRoles]:[d.yS.ADMIN,d.yS.MODERATOR,d.yS.FANSUBBER,d.yS.USER]}},{path:":username",children:[{path:"",pathMatch:"full",component:mt},{path:"edit",component:(()=>{class i{constructor(e,s,n,l,c,h,A,k,S,I,M){this.router=e,this.activatedRoute=s,this.toast=n,this.bs=l,this.us=c,this.pi=h,this.fb=A,this.imgbb=k,this.gs=S,this.as=I,this.cs=M,this.submitted=!1,this.username=null,this.userData=null,this.imagePhoto=null,this.imagePhotoErrorText=null,this.imagePhotoLimitExceeded=null,this.image_photo=null,this.image_photo_original=null,this.imageCover=null,this.imageCoverErrorText=null,this.imageCoverLimitExceeded=null,this.image_cover=null,this.image_cover_original=null,this.passwordHide=!0,this.photoImage=null,this.coverImage=null,this.subsUserDetail=null,this.subsImgbb1=null,this.subsImgbb2=null,this.subsUserUpdate=null,this.subsVerify=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get ENV(){return v.N}get GS(){return this.gs}togglePassword(){this.passwordHide=!this.passwordHide}ngOnDestroy(){this.subsUserDetail?.unsubscribe(),this.subsImgbb1?.unsubscribe(),this.subsImgbb2?.unsubscribe(),this.subsUserUpdate?.unsubscribe(),this.subsVerify?.unsubscribe()}ngOnInit(){this.pi.updatePageMetaData("User - Ubah Profile","Halaman Pembaharuan Profile","Ubah Profile"),this.gs.isBrowser&&(this.username=this.activatedRoute.snapshot.paramMap.get("username"),this.bs.busy(),this.subsUserDetail=this.us.getUserData(this.username).subscribe({next:e=>{this.gs.log("[USER_DETAIL_SUCCESS]",e),this.bs.idle(),this.as.currentUserSubject?.value?.id!==e.result.id?(this.toast.warning("Profile Ini Milik Orang Lain","Whoops!",null,!0),this.router.navigateByUrl(`/user/${this.username}`)):this.initForm(e.result)},error:e=>{this.gs.log("[USER_DETAIL_ERROR]",e,"error"),this.bs.idle(),this.router.navigate(["/error"],{queryParams:{returnUrl:`/user/${this.username}`}})}}))}initForm(e){this.fg=this.fb.group({nama:[e.kartu_tanda_penduduk_.nama,[u.kI.required,u.kI.pattern(/^[a-zA-Z. ]+$/)]],description:[e.profile_.description,u.kI.compose([u.kI.pattern(g.t.regexEnglishKeyboardKeys)])],old_password:[null,u.kI.compose([u.kI.required,u.kI.minLength(8),u.kI.pattern(g.t.regexEnglishKeyboardKeys)])],new_password:[null,u.kI.compose([u.kI.minLength(8),u.kI.pattern(g.t.regexEnglishKeyboardKeys)])],image_photo:[null,u.kI.compose([u.kI.pattern(g.t.regexUrl)])],image_cover:[null,u.kI.compose([u.kI.pattern(g.t.regexUrl)])],private:[e.private,u.kI.compose([u.kI.required])]}),this.image_photo=e.image_url,this.image_photo_original=this.image_photo,this.image_cover=e.profile_.cover_url,this.image_cover_original=this.image_cover,this.userData=e}uploadPhotoImage(e,s){this.photoImage=s,this.imagePhoto=null,this.imagePhotoLimitExceeded=null,this.imagePhotoErrorText=null,this.fg.controls.image_photo.patchValue(null),this.fg.controls.image_photo.markAsPristine();const n=e.target.files[0];try{const l=new FileReader;l.readAsDataURL(n),l.onload=c=>{if(this.gs.log("[IMAGE_PHOTO_SELECTED]",c),n.size<=g.t.fileSizeImageLimit){const h=this.gs.document.createElement("img");h.onload=()=>{this.imagePhoto=n,this.image_photo=l.result.toString()},h.src=l.result.toString()}else this.imagePhoto=null,this.image_photo="/assets/img/form/image-error.png",this.imagePhotoLimitExceeded=g.t.fileSizeImageLimit,this.photoImage.clear(e)}}catch{this.imagePhoto=null,this.image_photo=this.image_photo_original,this.photoImage.clear(e)}}submitPhotoImage(){this.submitted=!0,this.subsImgbb1=this.imgbb.uploadImage({file:this.imagePhoto}).subscribe({next:e=>{this.gs.log("[IMAGE_PHOTO_SUCCESS]",e),this.fg.controls.image_photo.patchValue(e.result.url),this.fg.controls.image_photo.markAsDirty(),this.submitted=!1},error:e=>{this.gs.log("[IMAGE_PHOTO_ERROR]",e,"error"),this.fg.controls.image_photo.patchValue(null),this.fg.controls.image_photo.markAsPristine(),this.submitted=!1,this.imagePhotoErrorText=e.result?.message||e.info}})}uploadCoverImage(e,s){this.coverImage=s,this.imageCover=null,this.imageCoverLimitExceeded=null,this.imageCoverErrorText=null,this.fg.controls.image_cover.patchValue(null),this.fg.controls.image_cover.markAsPristine();const n=e.target.files[0];try{const l=new FileReader;l.readAsDataURL(n),l.onload=c=>{if(this.gs.log("[IMAGE_COVER_SELECTED]",c),n.size<=g.t.fileSizeImageLimit){const h=this.gs.document.createElement("img");h.onload=()=>{this.imageCover=n,this.image_cover=l.result.toString()},h.src=l.result.toString()}else this.imageCover=null,this.image_cover="/assets/img/form/image-error.png",this.imageCoverLimitExceeded=g.t.fileSizeImageLimit,this.coverImage.clear(e)}}catch{this.imageCover=null,this.image_cover=this.image_cover_original,this.coverImage.clear(e)}}submitCoverImage(){this.submitted=!0,this.subsImgbb2=this.imgbb.uploadImage({file:this.imageCover}).subscribe({next:e=>{this.gs.log("[IMAGE_COVER_SUCCESS]",e),this.fg.controls.image_cover.patchValue(e.result.url),this.fg.controls.image_cover.markAsDirty(),this.submitted=!1},error:e=>{this.gs.log("[IMAGE_COVER_ERROR]",e,"error"),this.fg.controls.image_cover.patchValue(null),this.fg.controls.image_cover.markAsPristine(),this.submitted=!1,this.imageCoverErrorText=e.result?.message||e.info}})}onSubmit(){this.bs.busy();const e=this.gs.getDirtyValues(this.fg);if(e.old_password=this.cs.hashPassword(this.fg.value.old_password),"new_password"in e&&e.new_password&&(e.new_password=this.cs.hashPassword(this.fg.value.new_password)),this.gs.log("[USER_EDIT_DIRTY]",e),this.submitted=!0,this.fg.invalid)return this.submitted=!1,void this.bs.idle();this.subsUserUpdate=this.us.updateUser(this.username,{...e}).subscribe({next:s=>{this.gs.log("[USER_EDIT_SUCCESS]",s),this.submitted=!1,this.bs.idle(),this.as.removeUser(),this.bs.busy(),this.subsVerify=this.as.verify(this.as.token).subscribe({next:n=>{this.gs.log("[VERIFY_LOGIN_SUCCESS]",n),this.bs.idle(),this.router.navigateByUrl(`/user/${this.username}`)},error:n=>{this.gs.log("[VERIFY_LOGIN_ERROR]",n,"error"),this.bs.idle(),this.as.removeUser(),this.router.navigateByUrl(`/user/${this.username}`)}})},error:s=>{this.gs.log("[USER_EDIT_ERROR]",s,"error"),this.submitted=!1,this.bs.idle()}})}changeUname(){this.router.navigate(["/create/mailbox"],{queryParams:{subject:"[ReqUName] Pengajuan Ganti Username",to:["bifeldy"].map(s=>`${s}@${v.N.domain}`).join(",")}})}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(r.F0),t.Y36(r.gz),t.Y36(Pt.k),t.Y36(O.z),t.Y36(L.K),t.Y36(Y.Z),t.Y36(u.QS),t.Y36(wt.X),t.Y36(Z.U),t.Y36(G.e),t.Y36(Ot.$))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-user-edit"]],decls:1,vars:1,consts:[[3,"formGroup","submit",4,"ngIf"],[3,"formGroup","submit"],[1,"container"],[1,"profile-info","align-items-center",2,"top","64px","position","relative"],[1,"row","py-3","px-2"],[1,"col-md-4","col-xl-3","px-3"],[1,"row","sticky-top","pt-3"],[1,"col-12"],[1,"w-100",3,"src"],["appearance","outline",1,"pt-3","w-100",3,"color"],[1,"w-100",3,"accept","change"],["photoImage",""],["fontIcon","image","matSuffix",""],[1,"px-3","w-100"],[4,"ngIf"],["class","col-12 mb-4",4,"ngIf"],[1,"col-12","p-3"],["formControlName","private","matTooltip","Hanya Tampilkan Informasi Profil"],[1,"col-12","p-3","text-warning"],[1,"text-success",2,"cursor","pointer",3,"click"],[1,"col-md-8","col-xl-9","pt-3"],[1,"row","py-3","px-0","profile-height-large"],[1,"row","py-3"],["appearance","outline",1,"p-3","col-12",3,"color"],["matInput","","formControlName","nama","placeholder","Nama Lengkap"],["fontIcon","wysiwyg","matSuffix",""],["appearance","outline",1,"px-3","pt-3","w-100",3,"color"],["placeholder","Basic Input",1,"w-100",3,"accept","change"],["coverImage",""],["class","col-12 p-3",4,"ngIf"],["formControlName","description",1,"p-3","w-100",3,"config"],["appearance","outline",1,"p-3","w-100",3,"color"],["matInput","","formControlName","old_password","required","","placeholder","Password Sekarang","autocomplete","current-password",3,"type"],["type","button","mat-icon-button","","matSuffix","",3,"click"],[3,"fontIcon"],["matInput","","formControlName","new_password","placeholder","Isi Jika Ingin Ubah Password Baru","autocomplete","new-password",3,"type"],[1,"row"],[1,"row","gy-3"],[1,"col","g-0"],[1,"col-12","col-md-3"],["mat-stroked-button","","routerLink","../",1,"w-100",3,"disabled"],["fontIcon","undo",1,"me-1"],["type","submit","mat-flat-button","","color","accent",1,"w-100",3,"disabled"],["fontIcon","save",1,"ms-1"],[1,"profile-banner","profile-banner-1","align-items-center"],[1,"profile-banner","profile-banner-2","align-items-center"],[1,"col-12","mb-4"],["type","button","mat-raised-button","","color","primary",1,"w-100",3,"disabled","click"],["fontIcon","add_photo_alternate",1,"me-1"]],template:function(e,s){1&e&&t.YNc(0,Wt,85,33,"form",0),2&e&&t.Q6J("ngIf",s.fg)},dependencies:[m.O5,r.yS,y.lW,y.zs,K.Hw,R.TO,R.KE,R.hX,R.R9,Lt.Nt,Kt.Rr,N.gM,u._Y,u.Fj,u.JJ,u.JL,u.Q7,u.sg,u.u,f.Yh,U.s6,Nt.$],styles:[".profile-banner[_ngcontent-%COMP%]{height:192px;width:100%;background-size:cover;background-position:center;background-repeat:no-repeat;opacity:.75}.profile-banner-1[_ngcontent-%COMP%]{position:absolute;top:0;left:0}.profile-banner-2[_ngcontent-%COMP%]{position:absolute;top:192px;left:0}.profile-info[_ngcontent-%COMP%]{position:relative;height:256px;z-index:1}@media only screen and (min-width: 769px){.profile-height-large[_ngcontent-%COMP%]{height:100px}}@media only screen and (max-width: 768px){.profile-image[_ngcontent-%COMP%]{padding-top:3rem}}"]}),i})(),canActivate:[D.t],data:{title:"User - Ubah Profil",description:"Halaman Pembaharuan Profil Pengguna",keywords:"Ubah Profil",[g.t.decoratorRoles]:[d.yS.ADMIN,d.yS.MODERATOR,d.yS.FANSUBBER,d.yS.USER]}}]}];let ee=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=t.oAB({type:i}),i.\u0275inj=t.cJS({imports:[m.ez,r.Bz.forChild(te),w.m,_.$,b.L,u.u5,u.UX,f.Ad,U.UM,p.b,x.F,P.T,T.d]}),i})()},7567:(B,C,o)=>{o.d(C,{Q:()=>w});var m=o(7084),r=o(4650),u=o(257),U=o(6895),f=o(7392),g=o(266);function d(_,b){if(1&_&&r._UZ(0,"h3",8),2&_){const p=r.oxw().$implicit;r.Q6J("innerHTML",p.text,r.oJD)}}function D(_,b){if(1&_&&(r.TgZ(0,"mat-expansion-panel",3)(1,"mat-expansion-panel-header")(2,"mat-panel-title",4)(3,"span",5),r._uU(4),r.qZA()(),r.TgZ(5,"mat-panel-description"),r._UZ(6,"mat-icon",6),r.qZA()(),r.YNc(7,d,1,1,"ng-template",7),r.qZA()),2&_){const p=b.$implicit,x=b.first,T=r.oxw(2);r.Q6J("expanded",T.GS.isDesktop&&x),r.xp6(3),r.s9C("matTooltip",p.tooltip),r.Q6J("matTooltipPosition","above"),r.xp6(1),r.hij(" ",p.title," "),r.xp6(2),r.Q6J("fontIcon",p.icon)}}function P(_,b){if(1&_&&(r.TgZ(0,"mat-accordion",1),r.YNc(1,D,8,5,"mat-expansion-panel",2),r.qZA()),2&_){const p=r.oxw();r.xp6(1),r.Q6J("ngForOf",p.panelData)}}let w=(()=>{class _{constructor(p){this.gs=p,this.panelData=[{title:"Title",icon:"warning",text:"Lorem ipsum ...",tooltip:"Info"}]}onResize(p){this.gs.onResize(p,"MATERIAL_EXPANSION_PANEL"),this.gs.isDesktop?this.accordion.openAll():this.accordion.closeAll()}get GS(){return this.gs}ngOnInit(){}}return _.\u0275fac=function(p){return new(p||_)(r.Y36(u.U))},_.\u0275cmp=r.Xpm({type:_,selectors:[["app-material-expansion-panel"]],viewQuery:function(p,x){if(1&p&&r.Gf(m.pp,5),2&p){let T;r.iGM(T=r.CRH())&&(x.accordion=T.first)}},hostBindings:function(p,x){1&p&&r.NdJ("resize",function(v){return x.onResize(v)},!1,r.Jf7)},inputs:{panelData:"panelData"},decls:1,vars:1,consts:[["class","example-headers-align","multi","",4,"ngIf"],["multi","",1,"example-headers-align"],[3,"expanded",4,"ngFor","ngForOf"],[3,"expanded"],[1,"font-weight-bold"],[3,"matTooltip","matTooltipPosition"],[1,"ms-auto",3,"fontIcon"],["matExpansionPanelContent",""],[1,"m-0","text-justify",2,"white-space","pre-line !important",3,"innerHTML"]],template:function(p,x){1&p&&r.YNc(0,P,2,1,"mat-accordion",0),2&p&&r.Q6J("ngIf",x.panelData.length>0)},dependencies:[U.sg,U.O5,m.pp,m.ib,m.yz,m.yK,m.u4,m.HS,f.Hw,g.gM]}),_})()},6020:(B,C,o)=>{o.d(C,{$:()=>U});var m=o(6895),r=o(210),u=o(4650);let U=(()=>{class f{}return f.\u0275fac=function(d){return new(d||f)},f.\u0275mod=u.oAB({type:f}),f.\u0275inj=u.cJS({imports:[m.ez,r.m]}),f})()}}]); \ No newline at end of file diff --git a/dist/fansubid/browser/839.12157b2c1e13d577.js b/dist/fansubid/browser/839.20303174f083f134.js similarity index 99% rename from dist/fansubid/browser/839.12157b2c1e13d577.js rename to dist/fansubid/browser/839.20303174f083f134.js index 5cb4c8c3b..f3362d078 100644 --- a/dist/fansubid/browser/839.12157b2c1e13d577.js +++ b/dist/fansubid/browser/839.20303174f083f134.js @@ -1 +1 @@ -"use strict";(self.webpackChunkfansubid=self.webpackChunkfansubid||[]).push([[839],{3839:(V,f,a)=>{a.r(f),a.d(f,{RegisterModule:()=>O});var m=a(6895),g=a(1390),s=a(4006),l=a(4700),_=a(210),p=a(5861),b=a(5934),u=a(6271),e=a(4650),v=a(257),T=a(3e3),Z=a(4137),x=a(7845),A=a(8379),h=a(4859),U=a(7392);function I(r,n){1&r&&(e.TgZ(0,"strong"),e._uU(1," Username Tidak Boleh Kosong "),e._UZ(2,"br"),e.qZA())}function C(r,n){1&r&&(e.TgZ(0,"strong"),e._uU(1," Username Minimal 8 Huruf "),e._UZ(2,"br"),e.qZA())}function R(r,n){1&r&&(e.TgZ(0,"strong"),e._uU(1," Username Hanya Boleh Huruf Kecil Dan Angka "),e._UZ(2,"br"),e.qZA())}function y(r,n){if(1&r&&(e.TgZ(0,"strong"),e._uU(1),e.qZA()),2&r){const t=e.oxw(3);e.xp6(1),e.Oqu(t.usernameUsed)}}function E(r,n){1&r&&(e.TgZ(0,"strong"),e._uU(1," Nama Tidak Boleh Kosong "),e._UZ(2,"br"),e.qZA())}function k(r,n){1&r&&(e.TgZ(0,"strong"),e._uU(1," Nama Tidak Valid "),e._UZ(2,"br"),e.qZA())}function N(r,n){1&r&&(e.TgZ(0,"strong"),e._uU(1," Email Tidak Boleh Kosong "),e._UZ(2,"br"),e.qZA())}function S(r,n){1&r&&(e.TgZ(0,"strong"),e._uU(1," Email Tidak Valid "),e._UZ(2,"br"),e.qZA())}function q(r,n){if(1&r&&(e.TgZ(0,"strong"),e._uU(1),e._UZ(2,"br"),e.qZA()),2&r){const t=e.oxw(3);e.xp6(1),e.hij(" ",t.emailUsed," ")}}function Y(r,n){1&r&&(e.TgZ(0,"strong"),e._uU(1," Password Tidak Boleh Kosong "),e._UZ(2,"br"),e.qZA())}function D(r,n){1&r&&(e.TgZ(0,"strong"),e._uU(1," Password Minimal 8 Huruf "),e._UZ(2,"br"),e.qZA())}function M(r,n){1&r&&(e.TgZ(0,"strong"),e._uU(1," Password Hanya Boleh Huruf Standar Papan Ketik "),e._UZ(2,"br"),e.qZA())}function w(r,n){if(1&r){const t=e.EpF();e.TgZ(0,"form",10),e.NdJ("ngSubmit",function(){e.CHM(t);const i=e.oxw(2);return e.KtG(i.onClickedSubmit())}),e.TgZ(1,"div",11),e._UZ(2,"img",12),e.TgZ(3,"h1",13),e._uU(4,'Hai, Selamat Datang! >_<"'),e.qZA(),e.TgZ(5,"p",14),e._uU(6),e.qZA()(),e.TgZ(7,"div",15)(8,"label",16),e._uU(9,"Nama Pengguna"),e.qZA(),e.TgZ(10,"div",17),e._UZ(11,"input",18),e.TgZ(12,"span",19),e.YNc(13,I,3,0,"strong",20),e.YNc(14,C,3,0,"strong",20),e.YNc(15,R,3,0,"strong",20),e.qZA(),e.TgZ(16,"small",21),e.YNc(17,y,2,1,"strong",20),e.qZA()()(),e.TgZ(18,"div",15)(19,"label",22),e._uU(20,"Nama Lengkap"),e.qZA(),e.TgZ(21,"div",17),e._UZ(22,"input",23),e.TgZ(23,"span",19),e.YNc(24,E,3,0,"strong",20),e.YNc(25,k,3,0,"strong",20),e.qZA()()(),e.TgZ(26,"div",15)(27,"label",24),e._uU(28,"Alamat Surel"),e.qZA(),e.TgZ(29,"div",17),e._UZ(30,"input",25),e.TgZ(31,"span",19),e.YNc(32,N,3,0,"strong",20),e.YNc(33,S,3,0,"strong",20),e.qZA(),e.TgZ(34,"small",21),e.YNc(35,q,3,1,"strong",20),e.qZA()()(),e.TgZ(36,"div",15)(37,"label",26),e._uU(38,"Kata Sandi"),e.qZA(),e.TgZ(39,"div",17),e._UZ(40,"input",27),e.TgZ(41,"span",19),e.YNc(42,Y,3,0,"strong",20),e.YNc(43,D,3,0,"strong",20),e.YNc(44,M,3,0,"strong",20),e.qZA()()(),e.TgZ(45,"div",15)(46,"div",28)(47,"div",29)(48,"input",30),e.NdJ("change",function(){e.CHM(t);const i=e.oxw(2);return e.KtG(i.openAturanTatib())}),e.qZA(),e.TgZ(49,"label",31),e._uU(50," Saya Telah Membaca & Setuju Dengan "),e.TgZ(51,"u",32),e._uU(52," Aturan & Tata Tertib "),e.qZA(),e._uU(53," Yang Ada "),e.qZA()()()(),e.TgZ(54,"div",15)(55,"div",28)(56,"div",29)(57,"input",33),e.NdJ("change",function(){e.CHM(t);const i=e.oxw(2);return e.KtG(i.openPrivacyPolicy())}),e.qZA(),e.TgZ(58,"label",34),e._uU(59," Saya Telah Membaca & Setuju Dengan "),e.TgZ(60,"u",32),e._uU(61," Kebijakan Privasi "),e.qZA(),e._uU(62," Yang Ada "),e.qZA()()()(),e.TgZ(63,"div",15)(64,"div",28)(65,"re-captcha",35,36),e.NdJ("resolved",function(i){e.CHM(t);const d=e.MAs(66),c=e.oxw(2);return e.KtG(c.captcha(i,d))}),e.qZA()()(),e.TgZ(67,"div",37)(68,"div",38)(69,"div",39)(70,"div",40)(71,"button",41),e._uU(72," Daftar "),e._UZ(73,"mat-icon",42),e.qZA()(),e.TgZ(74,"div",40)(75,"a",43),e._uU(76," Masuk ~ "),e.qZA()()()()()()}if(2&r){const t=e.oxw(2);e.Q6J("formGroup",t.fg),e.xp6(2),e.MGl("src","",t.ENV.baseUrl,"/assets/img/logo/register.png",e.LSH),e.xp6(4),e.Oqu(t.registerInfo),e.xp6(5),e.Gre("text-bifeldy form-control ",!t.fg.get("username").valid&&t.fg.get("username").touched?"is-invalid":"",""),e.xp6(2),e.Q6J("ngIf",t.fg.get("username").hasError("required")),e.xp6(1),e.Q6J("ngIf",t.fg.get("username").hasError("minlength")),e.xp6(1),e.Q6J("ngIf",t.fg.get("username").hasError("pattern")),e.xp6(2),e.Q6J("ngIf",t.usernameUsed),e.xp6(5),e.Gre("text-bifeldy form-control ",!t.fg.get("name").valid&&t.fg.get("name").touched?"is-invalid":"",""),e.xp6(2),e.Q6J("ngIf",t.fg.get("name").hasError("required")),e.xp6(1),e.Q6J("ngIf",t.fg.get("name").hasError("pattern")),e.xp6(5),e.Gre("text-bifeldy form-control ",!t.fg.get("email").valid&&t.fg.get("email").touched?"is-invalid":"",""),e.xp6(2),e.Q6J("ngIf",t.fg.get("email").hasError("required")),e.xp6(1),e.Q6J("ngIf",t.fg.get("email").hasError("email")||t.fg.get("email").hasError("pattern")),e.xp6(2),e.Q6J("ngIf",t.emailUsed),e.xp6(5),e.Gre("text-bifeldy form-control ",!t.fg.get("password").valid&&t.fg.get("password").touched?"is-invalid":"",""),e.xp6(2),e.Q6J("ngIf",t.fg.get("password").hasError("required")),e.xp6(1),e.Q6J("ngIf",t.fg.get("password").hasError("minlength")),e.xp6(1),e.Q6J("ngIf",t.fg.get("password").hasError("pattern")),e.xp6(21),e.Q6J("siteKey",t.G_CAPTCHA_SITE_KEY),e.xp6(6),e.Q6J("disabled",t.submitted||t.fg.invalid||!1===t.fg.get("agree_tatib").value||!1===t.fg.get("agree_pp").value),e.xp6(4),e.Q6J("disabled",t.submitted)}}const K=function(r){return{"background-position":"center","background-size":"cover","background-image":r}};function J(r,n){if(1&r&&(e.TgZ(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"div",6)(6,"div",7),e.YNc(7,w,77,30,"form",8),e.qZA()()(),e._UZ(8,"div",9),e.qZA()()()()),2&r){const t=e.oxw();e.xp6(7),e.Q6J("ngIf",t.fg),e.xp6(1),e.Q6J("ngStyle",e.VKq(2,K,"url("+t.registerImg+")"))}}const G=[{path:"",pathMatch:"full",component:(()=>{class r{constructor(t,o,i,d,c,P,Q,H){this.fb=t,this.gs=o,this.router=i,this.bs=d,this.activatedRoute=c,this.as=P,this.ds=Q,this.cs=H,this.usernameUsed=null,this.emailUsed=null,this.captchaRef=null,this.submitted=!1,this.returnUrl="/",this.registerImg="/assets/img/login-register.png",this.registerInfo="Ayo bergabung dan masuk dalam komunitas~",this.subsUser=null,this.subsRegister=null,this.subsVerify=null,this.subsDialog=null,this.subsResendActivation=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}ngOnDestroy(){this.subsRegister?.unsubscribe(),this.subsVerify?.unsubscribe(),this.subsUser?.unsubscribe(),this.subsDialog?.unsubscribe(),this.subsResendActivation?.unsubscribe()}ngOnInit(){this.returnUrl=this.activatedRoute.snapshot.queryParamMap.get("returnUrl")||"/",this.gs.isBrowser&&(this.subsUser=this.as.currentUser.subscribe({next:t=>{t?this.router.navigateByUrl(this.returnUrl):this.initForm()}}))}get G_CAPTCHA_SITE_KEY(){return u.t.gCaptchaSiteKey}get ENV(){return b.N}get registerFormVal(){return this.fg.controls}initForm(){this.fg=this.fb.group({username:[null,[s.kI.required,s.kI.minLength(8),s.kI.pattern("^[a-z0-9]+$")]],name:[null,[s.kI.required,s.kI.pattern("^[a-zA-Z. ]+$")]],email:[null,[s.kI.required,s.kI.email,s.kI.pattern(u.t.regexEmail)]],password:[null,[s.kI.required,s.kI.minLength(8),s.kI.pattern(u.t.regexEnglishKeyboardKeys)]],agree_tatib:[null,[s.kI.required]],agree_pp:[null,[s.kI.required]],"g-recaptcha-response":[null,[s.kI.required,s.kI.pattern(u.t.regexEnglishKeyboardKeys)]]})}onClickedSubmit(){if(this.bs.busy(),this.submitted=!0,this.registerInfo="Harap Menunggu ...",this.usernameUsed=null,this.emailUsed=null,this.gs.log("[REGISTER_FORM_REQUEST]",this.fg.value),this.fg.invalid)return this.registerInfo="Periksa Dan Isi Kembali Data!",this.submitted=!1,void this.bs.idle();this.fg.valid&&(this.submitted=!0,this.subsRegister=this.as.register({username:this.fg.value.username,name:this.fg.value.name,email:this.fg.value.email,password:this.cs.hashPassword(this.fg.value.password),agree_tatib:this.fg.value.agree_tatib,agree_pp:this.fg.value.agree_pp,"g-recaptcha-response":this.fg.value["g-recaptcha-response"]}).subscribe({next:t=>{this.gs.log("[REGISTER_FORM_SUCCESS]",t),this.bs.idle(),this.submitted=!1,this.captchaRef.reset(),this.registerInfo=t.info,this.activationDialog(t)},error:t=>{this.gs.log("[REGISTER_FORM_ERROR]",t,"error"),this.bs.idle(),this.submitted=!1,this.captchaRef.reset(),this.registerInfo=t.result?.message||t.info,this.usernameUsed=t.result.username,this.emailUsed=t.result.email}}))}activationDialog(t){this.subsDialog=this.ds.openInfoDialog({data:{title:t.result.title,htmlMessage:t.result.message,confirmText:"Kirim Ulang Email",infoText:t.result.id}}).afterClosed().subscribe({next:o=>{this.gs.log("[INFO_DIALOG_CLOSED]",o),!0===o&&(this.bs.busy(),this.subsResendActivation=this.as.resendActivation(t.result.id).subscribe({next:i=>{this.gs.log("[RESEND_ACTIVATION_SUCCESS]",i),this.bs.idle(),this.registerInfo=t.info,this.activationDialog(i)},error:i=>{this.gs.log("[RESEND_ACTIVATION_ERROR]",i,"error"),this.bs.idle(),this.registerInfo=i.result?.message||i.info}})),this.subsDialog.unsubscribe()}})}captcha(t,o){this.gs.log(`[GOOGLE_CAPTCHA] ${t}`),t?(this.captchaRef=o,this.fg.controls["g-recaptcha-response"].patchValue(t)):this.fg.value["g-recaptcha-response"]&&this.fg.controls["g-recaptcha-response"].patchValue(null)}openAturanTatib(){var t=this;return(0,p.Z)(function*(){if(t.fg.value.agree_tatib){const o={id:"ATURAN-TATA-TERTIB",data:{title:"Aturan Dan Tata Tertib Komunitas",htmlMessage:"Gagal Memuat Aturan Dan Tata Tertib Komunitas",confirmText:"Ok, Saya Mengerti!",cancelText:null},disableClose:!1,maxWidth:t.ds.maxWidth};t.subsDialog=(yield t.ds.fetchInformationRegisterMode(o,!0)).afterClosed().subscribe({next:i=>{t.gs.log("[ATURAN_TATA_TERTIB_DIALOG_CLOSED]",i),t.fg.controls.agree_tatib.patchValue(i),t.subsDialog.unsubscribe()}})}})()}openPrivacyPolicy(){var t=this;return(0,p.Z)(function*(){if(t.fg.value.agree_pp){const o={id:"PRIVACY-POLICY",data:{title:"Kebijakan Privasi",htmlMessage:"Gagal Memuat Aturan Dan Tata Tertib Komunitas",confirmText:"Ok, Saya Mengerti!",cancelText:null},disableClose:!1,maxWidth:t.ds.maxWidth};t.subsDialog=(yield t.ds.fetchInformationRegisterMode(o,!0)).afterClosed().subscribe({next:i=>{t.gs.log("[PRIVACY_POLICY_DIALOG_CLOSED]",i),t.fg.controls.agree_pp.patchValue(i),t.subsDialog.unsubscribe()}})}})()}}return r.\u0275fac=function(t){return new(t||r)(e.Y36(s.QS),e.Y36(v.U),e.Y36(g.F0),e.Y36(T.z),e.Y36(g.gz),e.Y36(Z.e),e.Y36(x.x),e.Y36(A.$))},r.\u0275cmp=e.Xpm({type:r,selectors:[["app-register"]],decls:1,vars:1,consts:[["class","container-fluid align-items-center w-100 h-100","style","background-size: cover; background-repeat: repeat; background-position: center; transform: rotateY(180deg);",4,"ngIf"],[1,"container-fluid","align-items-center","w-100","h-100",2,"background-size","cover","background-repeat","repeat","background-position","center","transform","rotateY(180deg)"],[1,"row","align-items-center","h-100","m-0",2,"transform","rotateY(180deg)"],[1,"col-12","col-md-10","m-auto","py-3"],[1,"row","rgb-border","rounded","bg-bifeldy"],[1,"col-lg-7","col-md-9","me-auto","p-0"],[1,"card","bg-transparent","border-0"],[1,"card-body"],["class","m-2",3,"formGroup","ngSubmit",4,"ngIf"],[1,"col-lg-5","col-md-3","ms-auto","p-0",2,"transform","rotateY(180deg)",3,"ngStyle"],[1,"m-2",3,"formGroup","ngSubmit"],[1,"text-center","mb-4"],[1,"mb-4",2,"max-width","128px",3,"src"],[1,"h3","mb-3","font-weight-normal"],[1,"text-warning"],[1,"form-group","row","py-2"],["for","username",1,"col-md-4","col-form-label","text-md-end"],[1,"col-md-8"],["type","text","id","username","placeholder","Username Minimal 8 Huruf","required","","formControlName","username","autocomplete","username"],["role","alert",1,"invalid-feedback"],[4,"ngIf"],[2,"font-size","80%","color","#dc3545"],["for","name",1,"col-md-4","col-form-label","text-md-end"],["type","text","id","name","placeholder","Nama Lengkap","required","","formControlName","name","autocomplete","name"],["for","email",1,"col-md-4","col-form-label","text-md-end"],["type","email","id","email","placeholder","Alamat E-Mail","required","","formControlName","email","autocomplete","email"],["for","password",1,"col-md-4","col-form-label","text-md-end"],["type","password","id","password","placeholder","Password Minimal 8 Huruf","required","","formControlName","password","autocomplete","current-password, new-password"],[1,"col","offset-md-4"],[1,"form-check"],["id","agree_tatib","type","checkbox","formControlName","agree_tatib",1,"form-check-input",3,"change"],["for","agree_tatib",1,"form-check-label",2,"padding-top","0.125rem !important"],[1,"text-warning",2,"cursor","pointer"],["id","agree_pp","type","checkbox","formControlName","agree_pp",1,"form-check-input",3,"change"],["for","agree_pp",1,"form-check-label",2,"padding-top","0.125rem !important"],["formControlName","g-recaptcha-response",3,"siteKey","resolved"],["captchaRef",""],[1,"form-group","row","mb-0","py-2"],[1,"col-md-8","offset-md-4"],[1,"row","gy-3"],[1,"col-lg-6","col-12"],["type","submit","mat-flat-button","","color","primary",1,"w-100",3,"disabled"],["fontIcon","emoji_people",1,"ms-1"],["mat-stroked-button","","color","accent","routerLink","/login",1,"w-100",3,"disabled"]],template:function(t,o){1&t&&e.YNc(0,J,9,4,"div",0),2&t&&e.Q6J("ngIf",o.fg)},dependencies:[m.O5,m.PC,g.yS,h.lW,h.zs,U.Hw,s._Y,s.Fj,s.Wl,s.JJ,s.JL,s.Q7,s.sg,s.u,l.wT,l.Vd]}),r})()}];let O=(()=>{class r{}return r.\u0275fac=function(t){return new(t||r)},r.\u0275mod=e.oAB({type:r}),r.\u0275inj=e.cJS({imports:[m.ez,g.Bz.forChild(G),_.m,s.u5,s.UX,l.a,l.lQ]}),r})()}}]); \ No newline at end of file +"use strict";(self.webpackChunkfansubid=self.webpackChunkfansubid||[]).push([[839],{3839:(V,f,a)=>{a.r(f),a.d(f,{RegisterModule:()=>O});var m=a(6895),g=a(1390),s=a(4006),l=a(4700),_=a(210),p=a(5861),b=a(5934),u=a(6271),e=a(4650),v=a(257),T=a(3e3),Z=a(4137),x=a(7845),A=a(8379),h=a(4859),U=a(7392);function I(r,n){1&r&&(e.TgZ(0,"strong"),e._uU(1," Username Tidak Boleh Kosong "),e._UZ(2,"br"),e.qZA())}function C(r,n){1&r&&(e.TgZ(0,"strong"),e._uU(1," Username Minimal 8 Huruf "),e._UZ(2,"br"),e.qZA())}function R(r,n){1&r&&(e.TgZ(0,"strong"),e._uU(1," Username Hanya Boleh Huruf Kecil Dan Angka "),e._UZ(2,"br"),e.qZA())}function y(r,n){if(1&r&&(e.TgZ(0,"strong"),e._uU(1),e.qZA()),2&r){const t=e.oxw(3);e.xp6(1),e.Oqu(t.usernameUsed)}}function E(r,n){1&r&&(e.TgZ(0,"strong"),e._uU(1," Nama Tidak Boleh Kosong "),e._UZ(2,"br"),e.qZA())}function k(r,n){1&r&&(e.TgZ(0,"strong"),e._uU(1," Nama Tidak Valid "),e._UZ(2,"br"),e.qZA())}function N(r,n){1&r&&(e.TgZ(0,"strong"),e._uU(1," Email Tidak Boleh Kosong "),e._UZ(2,"br"),e.qZA())}function S(r,n){1&r&&(e.TgZ(0,"strong"),e._uU(1," Email Tidak Valid "),e._UZ(2,"br"),e.qZA())}function q(r,n){if(1&r&&(e.TgZ(0,"strong"),e._uU(1),e._UZ(2,"br"),e.qZA()),2&r){const t=e.oxw(3);e.xp6(1),e.hij(" ",t.emailUsed," ")}}function Y(r,n){1&r&&(e.TgZ(0,"strong"),e._uU(1," Password Tidak Boleh Kosong "),e._UZ(2,"br"),e.qZA())}function D(r,n){1&r&&(e.TgZ(0,"strong"),e._uU(1," Password Minimal 8 Huruf "),e._UZ(2,"br"),e.qZA())}function M(r,n){1&r&&(e.TgZ(0,"strong"),e._uU(1," Password Hanya Boleh Huruf Standar Papan Ketik "),e._UZ(2,"br"),e.qZA())}function w(r,n){if(1&r){const t=e.EpF();e.TgZ(0,"form",10),e.NdJ("ngSubmit",function(){e.CHM(t);const i=e.oxw(2);return e.KtG(i.onClickedSubmit())}),e.TgZ(1,"div",11),e._UZ(2,"img",12),e.TgZ(3,"h1",13),e._uU(4,'Hai, Selamat Datang! >_<"'),e.qZA(),e.TgZ(5,"p",14),e._uU(6),e.qZA()(),e.TgZ(7,"div",15)(8,"label",16),e._uU(9,"Nama Pengguna"),e.qZA(),e.TgZ(10,"div",17),e._UZ(11,"input",18),e.TgZ(12,"span",19),e.YNc(13,I,3,0,"strong",20),e.YNc(14,C,3,0,"strong",20),e.YNc(15,R,3,0,"strong",20),e.qZA(),e.TgZ(16,"small",21),e.YNc(17,y,2,1,"strong",20),e.qZA()()(),e.TgZ(18,"div",15)(19,"label",22),e._uU(20,"Nama Lengkap"),e.qZA(),e.TgZ(21,"div",17),e._UZ(22,"input",23),e.TgZ(23,"span",19),e.YNc(24,E,3,0,"strong",20),e.YNc(25,k,3,0,"strong",20),e.qZA()()(),e.TgZ(26,"div",15)(27,"label",24),e._uU(28,"Alamat Surel"),e.qZA(),e.TgZ(29,"div",17),e._UZ(30,"input",25),e.TgZ(31,"span",19),e.YNc(32,N,3,0,"strong",20),e.YNc(33,S,3,0,"strong",20),e.qZA(),e.TgZ(34,"small",21),e.YNc(35,q,3,1,"strong",20),e.qZA()()(),e.TgZ(36,"div",15)(37,"label",26),e._uU(38,"Kata Sandi"),e.qZA(),e.TgZ(39,"div",17),e._UZ(40,"input",27),e.TgZ(41,"span",19),e.YNc(42,Y,3,0,"strong",20),e.YNc(43,D,3,0,"strong",20),e.YNc(44,M,3,0,"strong",20),e.qZA()()(),e.TgZ(45,"div",15)(46,"div",28)(47,"div",29)(48,"input",30),e.NdJ("change",function(){e.CHM(t);const i=e.oxw(2);return e.KtG(i.openAturanTatib())}),e.qZA(),e.TgZ(49,"label",31),e._uU(50," Saya Telah Membaca & Setuju Dengan "),e.TgZ(51,"u",32),e._uU(52," Aturan & Tata Tertib "),e.qZA(),e._uU(53," Yang Ada "),e.qZA()()()(),e.TgZ(54,"div",15)(55,"div",28)(56,"div",29)(57,"input",33),e.NdJ("change",function(){e.CHM(t);const i=e.oxw(2);return e.KtG(i.openPrivacyPolicy())}),e.qZA(),e.TgZ(58,"label",34),e._uU(59," Saya Telah Membaca & Setuju Dengan "),e.TgZ(60,"u",32),e._uU(61," Kebijakan Privasi "),e.qZA(),e._uU(62," Yang Ada "),e.qZA()()()(),e.TgZ(63,"div",15)(64,"div",28)(65,"re-captcha",35,36),e.NdJ("resolved",function(i){e.CHM(t);const d=e.MAs(66),c=e.oxw(2);return e.KtG(c.captcha(i,d))}),e.qZA()()(),e.TgZ(67,"div",37)(68,"div",38)(69,"div",39)(70,"div",40)(71,"button",41),e._uU(72," Daftar "),e._UZ(73,"mat-icon",42),e.qZA()(),e.TgZ(74,"div",40)(75,"a",43),e._uU(76," Masuk ~ "),e.qZA()()()()()()}if(2&r){const t=e.oxw(2);e.Q6J("formGroup",t.fg),e.xp6(2),e.MGl("src","",t.ENV.baseUrl,"/assets/img/logo/register.png",e.LSH),e.xp6(4),e.Oqu(t.registerInfo),e.xp6(5),e.Gre("text-bifeldy form-control ",!t.fg.get("username").valid&&t.fg.get("username").touched?"is-invalid":"",""),e.xp6(2),e.Q6J("ngIf",t.fg.get("username").hasError("required")),e.xp6(1),e.Q6J("ngIf",t.fg.get("username").hasError("minlength")),e.xp6(1),e.Q6J("ngIf",t.fg.get("username").hasError("pattern")),e.xp6(2),e.Q6J("ngIf",t.usernameUsed),e.xp6(5),e.Gre("text-bifeldy form-control ",!t.fg.get("name").valid&&t.fg.get("name").touched?"is-invalid":"",""),e.xp6(2),e.Q6J("ngIf",t.fg.get("name").hasError("required")),e.xp6(1),e.Q6J("ngIf",t.fg.get("name").hasError("pattern")),e.xp6(5),e.Gre("text-bifeldy form-control ",!t.fg.get("email").valid&&t.fg.get("email").touched?"is-invalid":"",""),e.xp6(2),e.Q6J("ngIf",t.fg.get("email").hasError("required")),e.xp6(1),e.Q6J("ngIf",t.fg.get("email").hasError("email")||t.fg.get("email").hasError("pattern")),e.xp6(2),e.Q6J("ngIf",t.emailUsed),e.xp6(5),e.Gre("text-bifeldy form-control ",!t.fg.get("password").valid&&t.fg.get("password").touched?"is-invalid":"",""),e.xp6(2),e.Q6J("ngIf",t.fg.get("password").hasError("required")),e.xp6(1),e.Q6J("ngIf",t.fg.get("password").hasError("minlength")),e.xp6(1),e.Q6J("ngIf",t.fg.get("password").hasError("pattern")),e.xp6(21),e.Q6J("siteKey",t.G_CAPTCHA_SITE_KEY),e.xp6(6),e.Q6J("disabled",t.submitted||t.fg.invalid||!1===t.fg.get("agree_tatib").value||!1===t.fg.get("agree_pp").value),e.xp6(4),e.Q6J("disabled",t.submitted)}}const K=function(r){return{"background-position":"center","background-size":"cover","background-image":r}};function J(r,n){if(1&r&&(e.TgZ(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"div",6)(6,"div",7),e.YNc(7,w,77,30,"form",8),e.qZA()()(),e._UZ(8,"div",9),e.qZA()()()()),2&r){const t=e.oxw();e.xp6(7),e.Q6J("ngIf",t.fg),e.xp6(1),e.Q6J("ngStyle",e.VKq(2,K,"url("+t.registerImg+")"))}}const G=[{path:"",pathMatch:"full",component:(()=>{class r{constructor(t,o,i,d,c,P,Q,H){this.fb=t,this.gs=o,this.router=i,this.bs=d,this.activatedRoute=c,this.as=P,this.ds=Q,this.cs=H,this.usernameUsed=null,this.emailUsed=null,this.captchaRef=null,this.submitted=!1,this.returnUrl="/",this.registerImg="/assets/img/login-register.png",this.registerInfo="Ayo bergabung dan masuk dalam komunitas~",this.subsUser=null,this.subsRegister=null,this.subsVerify=null,this.subsDialog=null,this.subsResendActivation=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}ngOnDestroy(){this.subsRegister?.unsubscribe(),this.subsVerify?.unsubscribe(),this.subsUser?.unsubscribe(),this.subsDialog?.unsubscribe(),this.subsResendActivation?.unsubscribe()}ngOnInit(){this.returnUrl=this.activatedRoute.snapshot.queryParamMap.get("returnUrl")||"/",this.gs.isBrowser&&(this.subsUser=this.as.currentUser.subscribe({next:t=>{t?this.router.navigateByUrl(this.returnUrl):this.initForm()}}))}get G_CAPTCHA_SITE_KEY(){return u.t.gCaptchaSiteKey}get ENV(){return b.N}get registerFormVal(){return this.fg.controls}initForm(){this.fg=this.fb.group({username:[null,[s.kI.required,s.kI.minLength(8),s.kI.pattern(/^[a-z0-9]+$/)]],name:[null,[s.kI.required,s.kI.pattern(/^[a-zA-Z. ]+$/)]],email:[null,[s.kI.required,s.kI.email,s.kI.pattern(u.t.regexEmail)]],password:[null,[s.kI.required,s.kI.minLength(8),s.kI.pattern(u.t.regexEnglishKeyboardKeys)]],agree_tatib:[null,[s.kI.required]],agree_pp:[null,[s.kI.required]],"g-recaptcha-response":[null,[s.kI.required,s.kI.pattern(u.t.regexEnglishKeyboardKeys)]]})}onClickedSubmit(){if(this.bs.busy(),this.submitted=!0,this.registerInfo="Harap Menunggu ...",this.usernameUsed=null,this.emailUsed=null,this.gs.log("[REGISTER_FORM_REQUEST]",this.fg.value),this.fg.invalid)return this.registerInfo="Periksa Dan Isi Kembali Data!",this.submitted=!1,void this.bs.idle();this.fg.valid&&(this.submitted=!0,this.subsRegister=this.as.register({username:this.fg.value.username,name:this.fg.value.name,email:this.fg.value.email,password:this.cs.hashPassword(this.fg.value.password),agree_tatib:this.fg.value.agree_tatib,agree_pp:this.fg.value.agree_pp,"g-recaptcha-response":this.fg.value["g-recaptcha-response"]}).subscribe({next:t=>{this.gs.log("[REGISTER_FORM_SUCCESS]",t),this.bs.idle(),this.submitted=!1,this.captchaRef.reset(),this.registerInfo=t.info,this.activationDialog(t)},error:t=>{this.gs.log("[REGISTER_FORM_ERROR]",t,"error"),this.bs.idle(),this.submitted=!1,this.captchaRef.reset(),this.registerInfo=t.result?.message||t.info,this.usernameUsed=t.result.username,this.emailUsed=t.result.email}}))}activationDialog(t){this.subsDialog=this.ds.openInfoDialog({data:{title:t.result.title,htmlMessage:t.result.message,confirmText:"Kirim Ulang Email",infoText:t.result.id}}).afterClosed().subscribe({next:o=>{this.gs.log("[INFO_DIALOG_CLOSED]",o),!0===o&&(this.bs.busy(),this.subsResendActivation=this.as.resendActivation(t.result.id).subscribe({next:i=>{this.gs.log("[RESEND_ACTIVATION_SUCCESS]",i),this.bs.idle(),this.registerInfo=t.info,this.activationDialog(i)},error:i=>{this.gs.log("[RESEND_ACTIVATION_ERROR]",i,"error"),this.bs.idle(),this.registerInfo=i.result?.message||i.info}})),this.subsDialog.unsubscribe()}})}captcha(t,o){this.gs.log(`[GOOGLE_CAPTCHA] ${t}`),t?(this.captchaRef=o,this.fg.controls["g-recaptcha-response"].patchValue(t)):this.fg.value["g-recaptcha-response"]&&this.fg.controls["g-recaptcha-response"].patchValue(null)}openAturanTatib(){var t=this;return(0,p.Z)(function*(){if(t.fg.value.agree_tatib){const o={id:"ATURAN-TATA-TERTIB",data:{title:"Aturan Dan Tata Tertib Komunitas",htmlMessage:"Gagal Memuat Aturan Dan Tata Tertib Komunitas",confirmText:"Ok, Saya Mengerti!",cancelText:null},disableClose:!1,maxWidth:t.ds.maxWidth};t.subsDialog=(yield t.ds.fetchInformationRegisterMode(o,!0)).afterClosed().subscribe({next:i=>{t.gs.log("[ATURAN_TATA_TERTIB_DIALOG_CLOSED]",i),t.fg.controls.agree_tatib.patchValue(i),t.subsDialog.unsubscribe()}})}})()}openPrivacyPolicy(){var t=this;return(0,p.Z)(function*(){if(t.fg.value.agree_pp){const o={id:"PRIVACY-POLICY",data:{title:"Kebijakan Privasi",htmlMessage:"Gagal Memuat Aturan Dan Tata Tertib Komunitas",confirmText:"Ok, Saya Mengerti!",cancelText:null},disableClose:!1,maxWidth:t.ds.maxWidth};t.subsDialog=(yield t.ds.fetchInformationRegisterMode(o,!0)).afterClosed().subscribe({next:i=>{t.gs.log("[PRIVACY_POLICY_DIALOG_CLOSED]",i),t.fg.controls.agree_pp.patchValue(i),t.subsDialog.unsubscribe()}})}})()}}return r.\u0275fac=function(t){return new(t||r)(e.Y36(s.QS),e.Y36(v.U),e.Y36(g.F0),e.Y36(T.z),e.Y36(g.gz),e.Y36(Z.e),e.Y36(x.x),e.Y36(A.$))},r.\u0275cmp=e.Xpm({type:r,selectors:[["app-register"]],decls:1,vars:1,consts:[["class","container-fluid align-items-center w-100 h-100","style","background-size: cover; background-repeat: repeat; background-position: center; transform: rotateY(180deg);",4,"ngIf"],[1,"container-fluid","align-items-center","w-100","h-100",2,"background-size","cover","background-repeat","repeat","background-position","center","transform","rotateY(180deg)"],[1,"row","align-items-center","h-100","m-0",2,"transform","rotateY(180deg)"],[1,"col-12","col-md-10","m-auto","py-3"],[1,"row","rgb-border","rounded","bg-bifeldy"],[1,"col-lg-7","col-md-9","me-auto","p-0"],[1,"card","bg-transparent","border-0"],[1,"card-body"],["class","m-2",3,"formGroup","ngSubmit",4,"ngIf"],[1,"col-lg-5","col-md-3","ms-auto","p-0",2,"transform","rotateY(180deg)",3,"ngStyle"],[1,"m-2",3,"formGroup","ngSubmit"],[1,"text-center","mb-4"],[1,"mb-4",2,"max-width","128px",3,"src"],[1,"h3","mb-3","font-weight-normal"],[1,"text-warning"],[1,"form-group","row","py-2"],["for","username",1,"col-md-4","col-form-label","text-md-end"],[1,"col-md-8"],["type","text","id","username","placeholder","Username Minimal 8 Huruf","required","","formControlName","username","autocomplete","username"],["role","alert",1,"invalid-feedback"],[4,"ngIf"],[2,"font-size","80%","color","#dc3545"],["for","name",1,"col-md-4","col-form-label","text-md-end"],["type","text","id","name","placeholder","Nama Lengkap","required","","formControlName","name","autocomplete","name"],["for","email",1,"col-md-4","col-form-label","text-md-end"],["type","email","id","email","placeholder","Alamat E-Mail","required","","formControlName","email","autocomplete","email"],["for","password",1,"col-md-4","col-form-label","text-md-end"],["type","password","id","password","placeholder","Password Minimal 8 Huruf","required","","formControlName","password","autocomplete","current-password, new-password"],[1,"col","offset-md-4"],[1,"form-check"],["id","agree_tatib","type","checkbox","formControlName","agree_tatib",1,"form-check-input",3,"change"],["for","agree_tatib",1,"form-check-label",2,"padding-top","0.125rem !important"],[1,"text-warning",2,"cursor","pointer"],["id","agree_pp","type","checkbox","formControlName","agree_pp",1,"form-check-input",3,"change"],["for","agree_pp",1,"form-check-label",2,"padding-top","0.125rem !important"],["formControlName","g-recaptcha-response",3,"siteKey","resolved"],["captchaRef",""],[1,"form-group","row","mb-0","py-2"],[1,"col-md-8","offset-md-4"],[1,"row","gy-3"],[1,"col-lg-6","col-12"],["type","submit","mat-flat-button","","color","primary",1,"w-100",3,"disabled"],["fontIcon","emoji_people",1,"ms-1"],["mat-stroked-button","","color","accent","routerLink","/login",1,"w-100",3,"disabled"]],template:function(t,o){1&t&&e.YNc(0,J,9,4,"div",0),2&t&&e.Q6J("ngIf",o.fg)},dependencies:[m.O5,m.PC,g.yS,h.lW,h.zs,U.Hw,s._Y,s.Fj,s.Wl,s.JJ,s.JL,s.Q7,s.sg,s.u,l.wT,l.Vd]}),r})()}];let O=(()=>{class r{}return r.\u0275fac=function(t){return new(t||r)},r.\u0275mod=e.oAB({type:r}),r.\u0275inj=e.cJS({imports:[m.ez,g.Bz.forChild(G),_.m,s.u5,s.UX,l.a,l.lQ]}),r})()}}]); \ No newline at end of file diff --git a/dist/fansubid/browser/915.580f18c13dada6ab.js b/dist/fansubid/browser/915.580f18c13dada6ab.js new file mode 100644 index 000000000..b9632ee1c --- /dev/null +++ b/dist/fansubid/browser/915.580f18c13dada6ab.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfansubid=self.webpackChunkfansubid||[]).push([[915],{2915:(U,_,e)=>{e.r(_),e.d(_,{HomeModule:()=>X});var o=e(6895),u=e(1390),d=e(7355),v=e(8613),r=e(669),p=e(210),a=e(4854),l=e(913),g=e(1838),f=e(2438),T=e(5934),t=e(4650),x=e(257),s=e(7),h=e(9618),E=e(7559),C=e(6781),D=e(3e3),R=e(8020),L=e(6382),N=e(9530),F=e(3331),I=e(8921),S=e(8616),k=e(4859),b=e(3546),y=e(3238),H=e(7392),M=e(6338),w=e(266),P=e(192),K=e(6766);function Y(i,m){if(1&i&&(t.TgZ(0,"a",31),t._UZ(1,"mat-icon",32),t._uU(2),t.qZA()),2&i){const n=m.$implicit;t.Gre("m-1 ","/berkas"===n.link?"shiny":"",""),t.s9C("routerLink",n.link),t.xp6(1),t.Q6J("fontIcon",n.icon),t.xp6(1),t.hij(" ",n.name," ")}}function $(i,m){1&i&&t._UZ(0,"app-no-data",33)}function B(i,m){if(1&i&&(t.TgZ(0,"div",36)(1,"mat-card"),t._UZ(2,"img",37),t.TgZ(3,"mat-card-content",38)(4,"h3",39),t._uU(5),t.qZA()(),t.TgZ(6,"mat-card-header"),t._UZ(7,"div",40),t.TgZ(8,"mat-card-title",41)(9,"h3",42),t._uU(10),t.qZA()(),t.TgZ(11,"mat-card-subtitle",42),t._uU(12),t.ALo(13,"date"),t.qZA()()()()),2&i){const n=m.$implicit;t.xp6(2),t.MGl("routerLink","/news/",n.id,""),t.Q6J("src",n.image_url,t.LSH),t.xp6(1),t.MGl("routerLink","/news/",n.id,""),t.xp6(2),t.hij(" ",n.title," "),t.xp6(2),t.Udp("background-image","url("+n.user_.image_url+")"),t.xp6(1),t.MGl("routerLink","/user/",n.user_.username,""),t.xp6(2),t.Oqu(n.user_.username),t.xp6(2),t.Oqu(t.xi3(13,9,n.created_at,"d MMMM y, HH:mm:ss z"))}}function J(i,m){if(1&i&&(t.TgZ(0,"div",25)(1,"div",34),t.YNc(2,B,14,12,"div",35),t.ALo(3,"slice"),t.qZA()()),2&i){const n=t.oxw();t.xp6(2),t.Q6J("ngForOf",t.Dn7(3,1,n.newsData,0,3===n.GS.gridListBreakpoint?2:n.GS.gridListBreakpoint))}}function G(i,m){if(1&i){const n=t.EpF();t.TgZ(0,"mat-list-option",47),t._UZ(1,"mat-icon",48),t.TgZ(2,"a",49),t.NdJ("click",function(){const Z=t.CHM(n).$implicit,O=t.oxw(2);return t.KtG(O.openRssFeed(null==Z.item?null:Z.item.link))}),t.TgZ(3,"span",50),t.ALo(4,"date"),t._uU(5),t.ALo(6,"dateAgo"),t.qZA(),t.TgZ(7,"span",51),t._uU(8),t.qZA(),t._UZ(9,"span",52),t.qZA()()}if(2&i){const n=m.$implicit;t.xp6(3),t.s9C("matTooltip",t.xi3(4,4,(null==n.item?null:n.item.created)||(null==n.item?null:n.item.published),"d MMMM y, hh:mm:ss a z")),t.xp6(2),t.hij(" ",t.lcZ(6,7,(null==n.item?null:n.item.created)||(null==n.item?null:n.item.published))," "),t.xp6(3),t.Oqu(n.slug),t.xp6(1),t.Q6J("innerHtml",null==n.item?null:n.item.title,t.oJD)}}function W(i,m){if(1&i&&(t.TgZ(0,"div",1)(1,"div",21)(2,"h2",22)(3,"a",43),t._uU(4," Lainnya "),t.qZA(),t.TgZ(5,"b",44),t._uU(6," RSS Feed Fansub Aktif "),t.qZA()()(),t.TgZ(7,"div",25)(8,"mat-selection-list",45),t.YNc(9,G,10,9,"mat-list-option",46),t.ALo(10,"slice"),t.qZA()()()),2&i){const n=t.oxw();t.xp6(8),t.Q6J("multiple",!1),t.xp6(1),t.Q6J("ngForOf",t.Dn7(10,2,n.rssFeedData,0,10))}}function z(i,m){if(1&i){const n=t.EpF();t.TgZ(0,"mat-list-option",47),t._UZ(1,"mat-icon",54),t.TgZ(2,"a",49),t.NdJ("click",function(){const Z=t.CHM(n).$implicit,O=t.oxw(2);return t.KtG(O.openComment(Z))}),t.TgZ(3,"span",50),t.ALo(4,"date"),t._uU(5),t.ALo(6,"dateAgo"),t.qZA(),t.TgZ(7,"span",51),t._uU(8),t.qZA(),t.TgZ(9,"span",55),t._uU(10),t.qZA()()()}if(2&i){const n=m.$implicit;t.xp6(3),t.s9C("matTooltip",t.xi3(4,4,n.created_at,"d MMMM y, hh:mm:ss a z")),t.xp6(2),t.hij(" ",t.lcZ(6,7,n.created_at)," "),t.xp6(3),t.Oqu(n.user_.username),t.xp6(2),t.Oqu(n.comment)}}function Q(i,m){if(1&i){const n=t.EpF();t.TgZ(0,"div",1)(1,"div",21)(2,"h2",22)(3,"span",53),t.NdJ("click",function(){t.CHM(n);const A=t.oxw();return t.KtG(A.getComment())}),t._uU(4," Refresh "),t.qZA(),t.TgZ(5,"b",24),t._uU(6,"Komentar Terbaru"),t.qZA()()(),t.TgZ(7,"div",25)(8,"mat-selection-list",45),t.YNc(9,z,11,9,"mat-list-option",46),t.qZA()()()}if(2&i){const n=t.oxw();t.xp6(8),t.Q6J("multiple",!1),t.xp6(1),t.Q6J("ngForOf",n.komentarData)}}const j=[{path:"",pathMatch:"full",component:(()=>{class i{constructor(n,c,A,Z,O,V,q,tt,nt){this.router=n,this.gs=c,this.lms=A,this.news=Z,this.komen=O,this.fansub=V,this.bs=q,this.wb=tt,this.fs=nt,this.newsData=[],this.komentarData=[],this.rssFeedData=[],this.subsNews=null,this.subsKomenGet=null,this.subsRssFeed=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get ENV(){return T.N}get GS(){return this.gs}get contentMenus(){return this.lms.contentMenus}ngOnDestroy(){this.subsNews?.unsubscribe(),this.subsKomenGet?.unsubscribe(),this.subsRssFeed?.unsubscribe()}ngOnInit(){this.gs.isBrowser&&(this.getNews(),this.getComment(),this.getRssFeedAll(),this.fs.initializeFab(null,"/assets/img/discord/pink.png","Discord Server",T.N.discord.join_url,!0))}getNews(){this.bs.busy(),this.subsNews=this.news.getAllNews("",1,3).subscribe({next:n=>{this.gs.log("[HOME_NEWS_LIST_SUCCESS]",n),this.newsData=n.results,this.bs.idle()},error:n=>{this.gs.log("[HOME_NEWS_LIST_ERROR]",n,"error"),this.bs.idle()}})}getComment(){this.bs.busy(),this.subsKomenGet=this.komen.getAllComment().subscribe({next:n=>{this.gs.log("[HOME_KOMENTAR_LIST_SUCCESS]",n),this.komentarData=n.results;for(const c of this.komentarData)c.comment=this.gs.htmlToText(c.comment);this.bs.idle()},error:n=>{this.gs.log("[HOME_KOMENTAR_LIST_ERROR]",n,"error"),this.bs.idle()}})}getRssFeedAll(){this.bs.busy(),this.subsRssFeed=this.fansub.getRssFeedFansubAllActiveOnly().subscribe({next:n=>{this.gs.log("[HOME_RSS_FEED_LIST_SUCCESS]",n),this.rssFeedData=n.results,this.bs.idle()},error:n=>{this.gs.log("[HOME_RSS_FEED_LIST_ERROR]",n,"error"),this.bs.idle()}})}openRssFeed(n){this.wb.winboxOpenUri(this.gs.rssLink(n))}openComment(n){this.router.navigate([n.path],{queryParams:{comment:n.id}})}}return i.\u0275fac=function(n){return new(n||i)(t.Y36(u.F0),t.Y36(x.U),t.Y36(s.S),t.Y36(h.Y),t.Y36(E.k),t.Y36(C.T),t.Y36(D.z),t.Y36(R.N),t.Y36(L.r))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-home"]],decls:56,vars:7,consts:[[1,"container"],[1,"row"],[1,"col-12","align-items-center"],[1,"text-center","my-3","mx-auto"],["href","https://www.pixiv.net/en/users/1688603","target","_blank"],[1,"p-5",3,"src"],[1,"h3","font-weight-normal","gradient-text"],[1,"text-warning","pt-3"],[1,"col-12","col-lg-8","mx-auto"],["matTooltip","Khusus Berkas Yang Upload DDL",1,"text-success"],[1,"row","pb-3"],["mat-stroked-button","","color","warn",3,"class","routerLink",4,"ngFor","ngForOf"],[1,"row","mb-3"],[1,"mouse_scroll"],[1,"mouse"],[1,"wheel"],[1,"m_scroll_arrows","unu"],[1,"m_scroll_arrows","doi"],[1,"m_scroll_arrows","trei"],[1,"row","pb-3","px-0"],[1,"col-lg-8","col-xl-9"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],["routerLink","/news",1,"float-end","text-decoration-none","text-warning",2,"font-size","small"],[1,"text-bifeldy"],[1,"col-12"],["class","col-12 p-3",4,"ngIf"],["class","col-12",4,"ngIf"],["class","row",4,"ngIf"],[1,"col-lg-4","col-xl-3"],[1,"row","sticky-top"],["mat-stroked-button","","color","warn",3,"routerLink"],[1,"me-1",3,"fontIcon"],[1,"col-12","p-3"],[1,"row","px-3"],["class","col-12 col-md-6 col-xl-4 p-2",4,"ngFor","ngForOf"],[1,"col-12","col-md-6","col-xl-4","p-2"],["mat-card-image","",2,"height","128px","object-fit","cover","cursor","pointer",3,"src","routerLink"],[2,"cursor","pointer",3,"routerLink"],["matLine","",2,"text-overflow","ellipsis","overflow","hidden","white-space","nowrap"],["mat-card-avatar","",2,"background-size","cover","border-radius","0"],[1,"text-warning","mb-1",2,"cursor","pointer",3,"routerLink"],[1,"mb-0"],["routerLink","/rss-feed",1,"float-end","text-decoration-none","text-warning",2,"font-size","small"],["matTooltip","Diperbaharui Beberapa Menit Sekali",1,"text-bifeldy"],[3,"multiple"],["class","h-100",4,"ngFor","ngForOf"],[1,"h-100"],["fontIcon","rss_feed","mat-list-icon","",1,"ps-3"],[1,"text-truncate","text-decoration-none",3,"click"],[1,"bg-bifeldy","px-2","me-1","text-danger",2,"position","absolute","right","0",3,"matTooltip"],[1,"me-3","text-success"],[1,"text-warning",3,"innerHtml"],[1,"float-end","text-warning",2,"font-size","small","cursor","pointer",3,"click"],["fontIcon","add_comment","mat-list-icon","",1,"ps-3"],[1,"text-warning"]],template:function(n,c){1&n&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"a",4),t._UZ(5,"img",5),t.qZA(),t.TgZ(6,"h1",6),t._uU(7),t.qZA(),t.TgZ(8,"h2",7)(9,"p",8),t._uU(10," Tempat berbagi (+ "),t.TgZ(11,"i"),t._uU(12,"backup"),t.qZA(),t._uU(13,") dan melacak sekaligus mengabadikan berkas proyek garapan animasi maupun film drama dari, oleh, untuk siapa saja. "),t.qZA()(),t.TgZ(14,"h3",9)(15,"p",8),t._uU(16," * Tempat arsip abadi :: Anti "),t.TgZ(17,"i")(18,"u"),t._uU(19,"link"),t.qZA()(),t._uU(20," mati ~ "),t.qZA()(),t.TgZ(21,"div",10)(22,"div",8),t.YNc(23,Y,3,6,"a",11),t.qZA()()()()(),t.TgZ(24,"div",12)(25,"div",2)(26,"div",13)(27,"div",14),t._UZ(28,"div",15),t.qZA(),t.TgZ(29,"div"),t._UZ(30,"span",16)(31,"span",17)(32,"span",18),t.qZA()()()()(),t._UZ(33,"app-notifications"),t.TgZ(34,"div",0)(35,"div",19)(36,"div",20)(37,"div",1)(38,"div",21)(39,"h2",22)(40,"a",23),t._uU(41," Selengkapnya "),t.qZA(),t.TgZ(42,"b",24),t._uU(43,"Papan Pengumuman"),t.qZA()()(),t.TgZ(44,"div",25)(45,"div",1),t.YNc(46,$,1,0,"app-no-data",26),t.YNc(47,J,4,5,"div",27),t.qZA()()(),t.YNc(48,W,11,6,"div",28),t.YNc(49,Q,10,2,"div",28),t.qZA(),t.TgZ(50,"div",29)(51,"div",30)(52,"div",25),t._UZ(53,"app-banner-donasi")(54,"app-banner-discord")(55,"app-stats-server"),t.qZA()()()()()),2&n&&(t.xp6(5),t.MGl("src","",c.ENV.baseUrl,"/assets/img/favicon.png",t.LSH),t.xp6(2),t.Oqu(c.ENV.siteName),t.xp6(16),t.Q6J("ngForOf",c.contentMenus),t.xp6(23),t.Q6J("ngIf",c.newsData.length<=0),t.xp6(1),t.Q6J("ngIf",c.newsData.length>0),t.xp6(1),t.Q6J("ngIf",c.rssFeedData.length>0),t.xp6(1),t.Q6J("ngIf",c.komentarData.length>0))},dependencies:[o.sg,o.O5,u.rH,u.yS,N.u,F.B,I.X,S.t,k.zs,b.a8,b.dk,b.dn,b.n5,b.$j,b.G2,b.kc,y.X2,H.Hw,M.Nh,M.Ub,M.vS,w.gM,P.d,o.OU,o.uU,K.R]}),i})()}];let X=(()=>{class i{}return i.\u0275fac=function(n){return new(n||i)},i.\u0275mod=t.oAB({type:i}),i.\u0275inj=t.cJS({imports:[o.ez,u.Bz.forChild(j),g.R,a.R,l.g,r.A,v.F,p.m,d.T,f.d]}),i})()},8616:(U,_,e)=>{e.d(_,{t:()=>T});var o=e(4650),u=e(1390),d=e(257),v=e(7140),r=e(6895),p=e(1861);function a(t,x){if(1&t&&o._UZ(0,"div",4),2&t){const s=o.oxw();o.Udp("background-size",s.GS.sizeContain?"contain":"cover")("background-image","url("+s.GS.bannerImg+")")("background-repeat",s.GS.bgRepeat?"repeat-x":"no-repeat")("height",s.ROUTER.url.startsWith("/news")||s.ROUTER.url.startsWith("/berkas")||s.ROUTER.url.startsWith("/fansub")?"192px":"128px")("background-position-y",s.ROUTER.url.startsWith("/berkas")?"22.5%":"")}}function l(t,x){if(1&t&&(o.TgZ(0,"strong",10),o._uU(1," -- "),o.TgZ(2,"i")(3,"a",11),o._uU(4),o.qZA()()()),2&t){const s=o.oxw().$implicit;o.xp6(3),o.MGl("routerLink","/user/",s.notifCreator,""),o.xp6(1),o.hij(" ",s.notifCreator," ")}}function g(t,x){if(1&t){const s=o.EpF();o.TgZ(0,"button",12),o.NdJ("click",function(){o.CHM(s);const E=o.oxw().$implicit,C=o.oxw();return o.KtG(C.removeNotif(E.notifData.id))}),o.qZA()}}function f(t,x){if(1&t&&(o.TgZ(0,"div",5)(1,"div")(2,"strong",6),o._uU(3),o.qZA(),o._UZ(4,"span",7),o.ALo(5,"safeInnerHtml"),o.YNc(6,l,5,2,"strong",8),o.YNc(7,g,1,0,"button",9),o.qZA()()),2&t){const s=x.$implicit;o.xp6(1),o.Gre("alert alert-",s.notifData.type," alert-dismissible fade show"),o.xp6(2),o.Oqu(s.notifData.title),o.xp6(1),o.Q6J("innerHTML",o.lcZ(5,7,s.notifData.content),o.oJD),o.xp6(2),o.Q6J("ngIf",s.notifCreator),o.xp6(1),o.Q6J("ngIf",s.notifData.dismissible)}}let T=(()=>{class t{constructor(s,h,E){this.router=s,this.gs=h,this.notif=E}ngOnInit(){}get GS(){return this.gs}get ROUTER(){return this.router}get NOTIF(){return this.notif}removeNotif(s){this.notif.removeNotif(s)}}return t.\u0275fac=function(s){return new(s||t)(o.Y36(u.F0),o.Y36(d.U),o.Y36(v.T))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-notifications"]],decls:4,vars:2,consts:[["class","container-fluid notif-banner align-items-center",3,"background-size","background-image","background-repeat","height","background-position-y",4,"ngIf"],[1,"container"],[1,"row","pt-3"],["class","col-12",4,"ngFor","ngForOf"],[1,"container-fluid","notif-banner","align-items-center"],[1,"col-12"],[1,"me-1"],[3,"innerHTML"],["class","ms-1",4,"ngIf"],["type","button","class","btn-close","data-dismiss","alert",3,"click",4,"ngIf"],[1,"ms-1"],[1,"text-decoration-none",3,"routerLink"],["type","button","data-dismiss","alert",1,"btn-close",3,"click"]],template:function(s,h){1&s&&(o.YNc(0,a,1,10,"div",0),o.TgZ(1,"div",1)(2,"div",2),o.YNc(3,f,8,9,"div",3),o.qZA()()),2&s&&(o.Q6J("ngIf",h.GS.bannerImg&&(h.ROUTER.url.startsWith("/news")||h.ROUTER.url.startsWith("/berkas")||h.ROUTER.url.startsWith("/fansub")||h.ROUTER.url.startsWith("/anime")||h.ROUTER.url.startsWith("/dorama"))),o.xp6(3),o.Q6J("ngForOf",h.NOTIF.notifications))},dependencies:[r.sg,r.O5,u.yS,p.H],styles:[".notif-banner[_ngcontent-%COMP%]{width:100%;background-size:cover;background-position:75% 50%}"]}),t})()},8613:(U,_,e)=>{e.d(_,{F:()=>r});var o=e(6895),u=e(1390),d=e(7355),v=e(4650);let r=(()=>{class p{}return p.\u0275fac=function(l){return new(l||p)},p.\u0275mod=v.oAB({type:p}),p.\u0275inj=v.cJS({imports:[o.ez,u.Bz,d.T]}),p})()},6766:(U,_,e)=>{e.d(_,{R:()=>u});var o=e(4650);let u=(()=>{class d{transform(r,p){if(r){const a=Math.floor((+new Date-+new Date(r))/1e3),l={tahun:31536e3,bulan:2592e3,minggu:604800,hari:86400,jam:3600,menit:60,detik:1};let g;for(const f of Object.keys(l))if(g=Math.floor(a/l[f]),g>0)return g+" "+f+" lalu"}return r}}return d.\u0275fac=function(r){return new(r||d)},d.\u0275pipe=o.Yjl({name:"dateAgo",type:d,pure:!0}),d})()},7559:(U,_,e)=>{e.d(_,{k:()=>v});var o=e(4650),u=e(9731),d=e(257);let v=(()=>{class r{constructor(a,l){this.api=a,this.gs=l}getAllComment(a="",l=1,g=10,f="",T=""){return this.api.getData(`/comment?q=${a}&page=${l}&row=${g}&sort=${f}&order=${T}`)}getComment(a="",l="",g=1,f=10,T="",t=""){return this.api.getData(`/comment?path=${a}&q=${l}&page=${g}&row=${f}&sort=${T}&order=${t}`)}getReply(a,l="",g=1,f=10,T="",t=""){return this.api.getData(`/comment/${a}?q=${l}&page=${g}&row=${f}&sort=${T}&order=${t}`)}sendComment(a){return this.api.postData("/comment",a)}getHighlight(a){return this.api.patchData("/comment",a)}deleteComment(a){return this.api.deleteData(`/comment/${a}`)}}return r.\u0275fac=function(a){return new(a||r)(o.LFG(u.s),o.LFG(d.U))},r.\u0275prov=o.Yz7({token:r,factory:r.\u0275fac,providedIn:"root"}),r})()}}]); \ No newline at end of file diff --git a/dist/fansubid/browser/915.963bdeecbe73cd07.js b/dist/fansubid/browser/915.963bdeecbe73cd07.js deleted file mode 100644 index 3f794aacb..000000000 --- a/dist/fansubid/browser/915.963bdeecbe73cd07.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfansubid=self.webpackChunkfansubid||[]).push([[915],{2915:(U,_,e)=>{e.r(_),e.d(_,{HomeModule:()=>X});var o=e(6895),u=e(1390),d=e(7355),v=e(8613),r=e(669),p=e(210),a=e(4854),l=e(913),g=e(1838),f=e(2438),T=e(5934),t=e(4650),x=e(257),s=e(7),h=e(9618),E=e(7559),C=e(6781),D=e(3e3),R=e(8020),L=e(6382),N=e(9530),F=e(3331),I=e(8921),S=e(8616),H=e(4859),Z=e(3546),k=e(3238),y=e(7392),M=e(6338),w=e(266),P=e(192),K=e(6766);function Y(i,m){if(1&i&&(t.TgZ(0,"a",31),t._UZ(1,"mat-icon",32),t._uU(2),t.qZA()),2&i){const n=m.$implicit;t.s9C("routerLink",n.link),t.xp6(1),t.Q6J("fontIcon",n.icon),t.xp6(1),t.hij(" ",n.name," ")}}function $(i,m){1&i&&t._UZ(0,"app-no-data",33)}function B(i,m){if(1&i&&(t.TgZ(0,"div",36)(1,"mat-card"),t._UZ(2,"img",37),t.TgZ(3,"mat-card-content",38)(4,"h3",39),t._uU(5),t.qZA()(),t.TgZ(6,"mat-card-header"),t._UZ(7,"div",40),t.TgZ(8,"mat-card-title",41)(9,"h3",42),t._uU(10),t.qZA()(),t.TgZ(11,"mat-card-subtitle",42),t._uU(12),t.ALo(13,"date"),t.qZA()()()()),2&i){const n=m.$implicit;t.xp6(2),t.MGl("routerLink","/news/",n.id,""),t.Q6J("src",n.image_url,t.LSH),t.xp6(1),t.MGl("routerLink","/news/",n.id,""),t.xp6(2),t.hij(" ",n.title," "),t.xp6(2),t.Udp("background-image","url("+n.user_.image_url+")"),t.xp6(1),t.MGl("routerLink","/user/",n.user_.username,""),t.xp6(2),t.Oqu(n.user_.username),t.xp6(2),t.Oqu(t.xi3(13,9,n.created_at,"d MMMM y, HH:mm:ss z"))}}function J(i,m){if(1&i&&(t.TgZ(0,"div",25)(1,"div",34),t.YNc(2,B,14,12,"div",35),t.ALo(3,"slice"),t.qZA()()),2&i){const n=t.oxw();t.xp6(2),t.Q6J("ngForOf",t.Dn7(3,1,n.newsData,0,3===n.GS.gridListBreakpoint?2:n.GS.gridListBreakpoint))}}function W(i,m){if(1&i){const n=t.EpF();t.TgZ(0,"mat-list-option",47),t._UZ(1,"mat-icon",48),t.TgZ(2,"a",49),t.NdJ("click",function(){const b=t.CHM(n).$implicit,O=t.oxw(2);return t.KtG(O.openRssFeed(null==b.item?null:b.item.link))}),t.TgZ(3,"span",50),t.ALo(4,"date"),t._uU(5),t.ALo(6,"dateAgo"),t.qZA(),t.TgZ(7,"span",51),t._uU(8),t.qZA(),t._UZ(9,"span",52),t.qZA()()}if(2&i){const n=m.$implicit;t.xp6(3),t.s9C("matTooltip",t.xi3(4,4,(null==n.item?null:n.item.created)||(null==n.item?null:n.item.published),"d MMMM y, hh:mm:ss a z")),t.xp6(2),t.hij(" ",t.lcZ(6,7,(null==n.item?null:n.item.created)||(null==n.item?null:n.item.published))," "),t.xp6(3),t.Oqu(n.slug),t.xp6(1),t.Q6J("innerHtml",null==n.item?null:n.item.title,t.oJD)}}function G(i,m){if(1&i&&(t.TgZ(0,"div",1)(1,"div",21)(2,"h2",22)(3,"a",43),t._uU(4," Lainnya "),t.qZA(),t.TgZ(5,"b",44),t._uU(6," RSS Feed Fansub Aktif "),t.qZA()()(),t.TgZ(7,"div",25)(8,"mat-selection-list",45),t.YNc(9,W,10,9,"mat-list-option",46),t.ALo(10,"slice"),t.qZA()()()),2&i){const n=t.oxw();t.xp6(8),t.Q6J("multiple",!1),t.xp6(1),t.Q6J("ngForOf",t.Dn7(10,2,n.rssFeedData,0,10))}}function z(i,m){if(1&i){const n=t.EpF();t.TgZ(0,"mat-list-option",47),t._UZ(1,"mat-icon",54),t.TgZ(2,"a",49),t.NdJ("click",function(){const b=t.CHM(n).$implicit,O=t.oxw(2);return t.KtG(O.openComment(b))}),t.TgZ(3,"span",50),t.ALo(4,"date"),t._uU(5),t.ALo(6,"dateAgo"),t.qZA(),t.TgZ(7,"span",51),t._uU(8),t.qZA(),t.TgZ(9,"span",55),t._uU(10),t.qZA()()()}if(2&i){const n=m.$implicit;t.xp6(3),t.s9C("matTooltip",t.xi3(4,4,n.created_at,"d MMMM y, hh:mm:ss a z")),t.xp6(2),t.hij(" ",t.lcZ(6,7,n.created_at)," "),t.xp6(3),t.Oqu(n.user_.username),t.xp6(2),t.Oqu(n.comment)}}function Q(i,m){if(1&i){const n=t.EpF();t.TgZ(0,"div",1)(1,"div",21)(2,"h2",22)(3,"span",53),t.NdJ("click",function(){t.CHM(n);const A=t.oxw();return t.KtG(A.getComment())}),t._uU(4," Refresh "),t.qZA(),t.TgZ(5,"b",24),t._uU(6,"Komentar Terbaru"),t.qZA()()(),t.TgZ(7,"div",25)(8,"mat-selection-list",45),t.YNc(9,z,11,9,"mat-list-option",46),t.qZA()()()}if(2&i){const n=t.oxw();t.xp6(8),t.Q6J("multiple",!1),t.xp6(1),t.Q6J("ngForOf",n.komentarData)}}const j=[{path:"",pathMatch:"full",component:(()=>{class i{constructor(n,c,A,b,O,V,q,tt,nt){this.router=n,this.gs=c,this.lms=A,this.news=b,this.komen=O,this.fansub=V,this.bs=q,this.wb=tt,this.fs=nt,this.newsData=[],this.komentarData=[],this.rssFeedData=[],this.subsNews=null,this.subsKomenGet=null,this.subsRssFeed=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get ENV(){return T.N}get GS(){return this.gs}get contentMenus(){return this.lms.contentMenus}ngOnDestroy(){this.subsNews?.unsubscribe(),this.subsKomenGet?.unsubscribe(),this.subsRssFeed?.unsubscribe()}ngOnInit(){this.gs.isBrowser&&(this.getNews(),this.getComment(),this.getRssFeedAll(),this.fs.initializeFab(null,"/assets/img/discord/pink.png","Discord Server",T.N.discord.join_url,!0))}getNews(){this.bs.busy(),this.subsNews=this.news.getAllNews("",1,3).subscribe({next:n=>{this.gs.log("[HOME_NEWS_LIST_SUCCESS]",n),this.newsData=n.results,this.bs.idle()},error:n=>{this.gs.log("[HOME_NEWS_LIST_ERROR]",n,"error"),this.bs.idle()}})}getComment(){this.bs.busy(),this.subsKomenGet=this.komen.getAllComment().subscribe({next:n=>{this.gs.log("[HOME_KOMENTAR_LIST_SUCCESS]",n),this.komentarData=n.results;for(const c of this.komentarData)c.comment=this.gs.htmlToText(c.comment);this.bs.idle()},error:n=>{this.gs.log("[HOME_KOMENTAR_LIST_ERROR]",n,"error"),this.bs.idle()}})}getRssFeedAll(){this.bs.busy(),this.subsRssFeed=this.fansub.getRssFeedFansubAllActiveOnly().subscribe({next:n=>{this.gs.log("[HOME_RSS_FEED_LIST_SUCCESS]",n),this.rssFeedData=n.results,this.bs.idle()},error:n=>{this.gs.log("[HOME_RSS_FEED_LIST_ERROR]",n,"error"),this.bs.idle()}})}openRssFeed(n){this.wb.winboxOpenUri(this.gs.rssLink(n))}openComment(n){this.router.navigate([n.path],{queryParams:{comment:n.id}})}}return i.\u0275fac=function(n){return new(n||i)(t.Y36(u.F0),t.Y36(x.U),t.Y36(s.S),t.Y36(h.Y),t.Y36(E.k),t.Y36(C.T),t.Y36(D.z),t.Y36(R.N),t.Y36(L.r))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-home"]],decls:56,vars:7,consts:[[1,"container"],[1,"row"],[1,"col-12","align-items-center"],[1,"text-center","my-3","mx-auto"],["href","https://www.pixiv.net/en/users/1688603","target","_blank"],[1,"p-5",3,"src"],[1,"h3","font-weight-normal","gradient-text"],[1,"text-warning","pt-3"],[1,"col-12","col-lg-8","mx-auto"],["matTooltip","Khusus Berkas Yang Upload DDL",1,"text-success"],[1,"row","pb-3"],["class","m-1","mat-stroked-button","","color","warn",3,"routerLink",4,"ngFor","ngForOf"],[1,"row","mb-3"],[1,"mouse_scroll"],[1,"mouse"],[1,"wheel"],[1,"m_scroll_arrows","unu"],[1,"m_scroll_arrows","doi"],[1,"m_scroll_arrows","trei"],[1,"row","pb-3","px-0"],[1,"col-lg-8","col-xl-9"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],["routerLink","/news",1,"float-end","text-decoration-none","text-warning",2,"font-size","small"],[1,"text-bifeldy"],[1,"col-12"],["class","col-12 p-3",4,"ngIf"],["class","col-12",4,"ngIf"],["class","row",4,"ngIf"],[1,"col-lg-4","col-xl-3"],[1,"row","sticky-top"],["mat-stroked-button","","color","warn",1,"m-1",3,"routerLink"],[1,"me-1",3,"fontIcon"],[1,"col-12","p-3"],[1,"row","px-3"],["class","col-12 col-md-6 col-xl-4 p-2",4,"ngFor","ngForOf"],[1,"col-12","col-md-6","col-xl-4","p-2"],["mat-card-image","",2,"height","128px","object-fit","cover","cursor","pointer",3,"src","routerLink"],[2,"cursor","pointer",3,"routerLink"],["matLine","",2,"text-overflow","ellipsis","overflow","hidden","white-space","nowrap"],["mat-card-avatar","",2,"background-size","cover","border-radius","0"],[1,"text-warning","mb-1",2,"cursor","pointer",3,"routerLink"],[1,"mb-0"],["routerLink","/rss-feed",1,"float-end","text-decoration-none","text-warning",2,"font-size","small"],["matTooltip","Diperbaharui Beberapa Menit Sekali",1,"text-bifeldy"],[3,"multiple"],["class","h-100",4,"ngFor","ngForOf"],[1,"h-100"],["fontIcon","rss_feed","mat-list-icon","",1,"ps-3"],[1,"text-truncate","text-decoration-none",3,"click"],[1,"bg-bifeldy","px-2","me-1","text-danger",2,"position","absolute","right","0",3,"matTooltip"],[1,"me-3","text-success"],[1,"text-warning",3,"innerHtml"],[1,"float-end","text-warning",2,"font-size","small","cursor","pointer",3,"click"],["fontIcon","add_comment","mat-list-icon","",1,"ps-3"],[1,"text-warning"]],template:function(n,c){1&n&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"a",4),t._UZ(5,"img",5),t.qZA(),t.TgZ(6,"h1",6),t._uU(7),t.qZA(),t.TgZ(8,"h2",7)(9,"p",8),t._uU(10," Tempat berbagi (+ "),t.TgZ(11,"i"),t._uU(12,"backup"),t.qZA(),t._uU(13,") dan melacak sekaligus mengabadikan berkas proyek garapan animasi maupun film drama dari, oleh, untuk siapa saja. "),t.qZA()(),t.TgZ(14,"h3",9)(15,"p",8),t._uU(16," * Tempat arsip abadi :: Anti "),t.TgZ(17,"i")(18,"u"),t._uU(19,"link"),t.qZA()(),t._uU(20," mati ~ "),t.qZA()(),t.TgZ(21,"div",10)(22,"div",8),t.YNc(23,Y,3,3,"a",11),t.qZA()()()()(),t.TgZ(24,"div",12)(25,"div",2)(26,"div",13)(27,"div",14),t._UZ(28,"div",15),t.qZA(),t.TgZ(29,"div"),t._UZ(30,"span",16)(31,"span",17)(32,"span",18),t.qZA()()()()(),t._UZ(33,"app-notifications"),t.TgZ(34,"div",0)(35,"div",19)(36,"div",20)(37,"div",1)(38,"div",21)(39,"h2",22)(40,"a",23),t._uU(41," Selengkapnya "),t.qZA(),t.TgZ(42,"b",24),t._uU(43,"Papan Pengumuman"),t.qZA()()(),t.TgZ(44,"div",25)(45,"div",1),t.YNc(46,$,1,0,"app-no-data",26),t.YNc(47,J,4,5,"div",27),t.qZA()()(),t.YNc(48,G,11,6,"div",28),t.YNc(49,Q,10,2,"div",28),t.qZA(),t.TgZ(50,"div",29)(51,"div",30)(52,"div",25),t._UZ(53,"app-banner-donasi")(54,"app-banner-discord")(55,"app-stats-server"),t.qZA()()()()()),2&n&&(t.xp6(5),t.MGl("src","",c.ENV.baseUrl,"/assets/img/favicon.png",t.LSH),t.xp6(2),t.Oqu(c.ENV.siteName),t.xp6(16),t.Q6J("ngForOf",c.contentMenus),t.xp6(23),t.Q6J("ngIf",c.newsData.length<=0),t.xp6(1),t.Q6J("ngIf",c.newsData.length>0),t.xp6(1),t.Q6J("ngIf",c.rssFeedData.length>0),t.xp6(1),t.Q6J("ngIf",c.komentarData.length>0))},dependencies:[o.sg,o.O5,u.rH,u.yS,N.u,F.B,I.X,S.t,H.zs,Z.a8,Z.dk,Z.dn,Z.n5,Z.$j,Z.G2,Z.kc,k.X2,y.Hw,M.Nh,M.Ub,M.vS,w.gM,P.d,o.OU,o.uU,K.R]}),i})()}];let X=(()=>{class i{}return i.\u0275fac=function(n){return new(n||i)},i.\u0275mod=t.oAB({type:i}),i.\u0275inj=t.cJS({imports:[o.ez,u.Bz.forChild(j),g.R,a.R,l.g,r.A,v.F,p.m,d.T,f.d]}),i})()},8616:(U,_,e)=>{e.d(_,{t:()=>T});var o=e(4650),u=e(1390),d=e(257),v=e(7140),r=e(6895),p=e(1861);function a(t,x){if(1&t&&o._UZ(0,"div",4),2&t){const s=o.oxw();o.Udp("background-size",s.GS.sizeContain?"contain":"cover")("background-image","url("+s.GS.bannerImg+")")("background-repeat",s.GS.bgRepeat?"repeat-x":"no-repeat")("height",s.ROUTER.url.startsWith("/news")||s.ROUTER.url.startsWith("/berkas")||s.ROUTER.url.startsWith("/fansub")?"192px":"128px")("background-position-y",s.ROUTER.url.startsWith("/berkas")?"22.5%":"")}}function l(t,x){if(1&t&&(o.TgZ(0,"strong",10),o._uU(1," -- "),o.TgZ(2,"i")(3,"a",11),o._uU(4),o.qZA()()()),2&t){const s=o.oxw().$implicit;o.xp6(3),o.MGl("routerLink","/user/",s.notifCreator,""),o.xp6(1),o.hij(" ",s.notifCreator," ")}}function g(t,x){if(1&t){const s=o.EpF();o.TgZ(0,"button",12),o.NdJ("click",function(){o.CHM(s);const E=o.oxw().$implicit,C=o.oxw();return o.KtG(C.removeNotif(E.notifData.id))}),o.qZA()}}function f(t,x){if(1&t&&(o.TgZ(0,"div",5)(1,"div")(2,"strong",6),o._uU(3),o.qZA(),o._UZ(4,"span",7),o.ALo(5,"safeInnerHtml"),o.YNc(6,l,5,2,"strong",8),o.YNc(7,g,1,0,"button",9),o.qZA()()),2&t){const s=x.$implicit;o.xp6(1),o.Gre("alert alert-",s.notifData.type," alert-dismissible fade show"),o.xp6(2),o.Oqu(s.notifData.title),o.xp6(1),o.Q6J("innerHTML",o.lcZ(5,7,s.notifData.content),o.oJD),o.xp6(2),o.Q6J("ngIf",s.notifCreator),o.xp6(1),o.Q6J("ngIf",s.notifData.dismissible)}}let T=(()=>{class t{constructor(s,h,E){this.router=s,this.gs=h,this.notif=E}ngOnInit(){}get GS(){return this.gs}get ROUTER(){return this.router}get NOTIF(){return this.notif}removeNotif(s){this.notif.removeNotif(s)}}return t.\u0275fac=function(s){return new(s||t)(o.Y36(u.F0),o.Y36(d.U),o.Y36(v.T))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-notifications"]],decls:4,vars:2,consts:[["class","container-fluid notif-banner align-items-center",3,"background-size","background-image","background-repeat","height","background-position-y",4,"ngIf"],[1,"container"],[1,"row","pt-3"],["class","col-12",4,"ngFor","ngForOf"],[1,"container-fluid","notif-banner","align-items-center"],[1,"col-12"],[1,"me-1"],[3,"innerHTML"],["class","ms-1",4,"ngIf"],["type","button","class","btn-close","data-dismiss","alert",3,"click",4,"ngIf"],[1,"ms-1"],[1,"text-decoration-none",3,"routerLink"],["type","button","data-dismiss","alert",1,"btn-close",3,"click"]],template:function(s,h){1&s&&(o.YNc(0,a,1,10,"div",0),o.TgZ(1,"div",1)(2,"div",2),o.YNc(3,f,8,9,"div",3),o.qZA()()),2&s&&(o.Q6J("ngIf",h.GS.bannerImg&&(h.ROUTER.url.startsWith("/news")||h.ROUTER.url.startsWith("/berkas")||h.ROUTER.url.startsWith("/fansub")||h.ROUTER.url.startsWith("/anime")||h.ROUTER.url.startsWith("/dorama"))),o.xp6(3),o.Q6J("ngForOf",h.NOTIF.notifications))},dependencies:[r.sg,r.O5,u.yS,p.H],styles:[".notif-banner[_ngcontent-%COMP%]{width:100%;background-size:cover;background-position:75% 50%}"]}),t})()},8613:(U,_,e)=>{e.d(_,{F:()=>r});var o=e(6895),u=e(1390),d=e(7355),v=e(4650);let r=(()=>{class p{}return p.\u0275fac=function(l){return new(l||p)},p.\u0275mod=v.oAB({type:p}),p.\u0275inj=v.cJS({imports:[o.ez,u.Bz,d.T]}),p})()},6766:(U,_,e)=>{e.d(_,{R:()=>u});var o=e(4650);let u=(()=>{class d{transform(r,p){if(r){const a=Math.floor((+new Date-+new Date(r))/1e3),l={tahun:31536e3,bulan:2592e3,minggu:604800,hari:86400,jam:3600,menit:60,detik:1};let g;for(const f of Object.keys(l))if(g=Math.floor(a/l[f]),g>0)return g+" "+f+" lalu"}return r}}return d.\u0275fac=function(r){return new(r||d)},d.\u0275pipe=o.Yjl({name:"dateAgo",type:d,pure:!0}),d})()},7559:(U,_,e)=>{e.d(_,{k:()=>v});var o=e(4650),u=e(9731),d=e(257);let v=(()=>{class r{constructor(a,l){this.api=a,this.gs=l}getAllComment(a="",l=1,g=10,f="",T=""){return this.api.getData(`/comment?q=${a}&page=${l}&row=${g}&sort=${f}&order=${T}`)}getComment(a="",l="",g=1,f=10,T="",t=""){return this.api.getData(`/comment?path=${a}&q=${l}&page=${g}&row=${f}&sort=${T}&order=${t}`)}getReply(a,l="",g=1,f=10,T="",t=""){return this.api.getData(`/comment/${a}?q=${l}&page=${g}&row=${f}&sort=${T}&order=${t}`)}sendComment(a){return this.api.postData("/comment",a)}getHighlight(a){return this.api.patchData("/comment",a)}deleteComment(a){return this.api.deleteData(`/comment/${a}`)}}return r.\u0275fac=function(a){return new(a||r)(o.LFG(u.s),o.LFG(d.U))},r.\u0275prov=o.Yz7({token:r,factory:r.\u0275fac,providedIn:"root"}),r})()}}]); \ No newline at end of file diff --git a/dist/fansubid/browser/939.e9d5bead82343605.js b/dist/fansubid/browser/939.e9d5bead82343605.js new file mode 100644 index 000000000..fd3262fce --- /dev/null +++ b/dist/fansubid/browser/939.e9d5bead82343605.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfansubid=self.webpackChunkfansubid||[]).push([[939],{9939:($,E,c)=>{c.r(E),c.d(E,{CreateModule:()=>da});var m=c(6895),h=c(1390),o=c(4006),C=c(7375),T=c(3170),u=c(6271),x=c(4249),S=c(2777),N=c(5094),t=c(4650),k=c(257);let p=(()=>{class a{constructor(e,i){this.gs=e,this.router=i}canDeactivate(e){return!!this.router.getCurrentNavigation()?.extras?.state?.bypassCanDeactivate||!e.canDeactivate||e.canDeactivate()}}return a.\u0275fac=function(e){return new(e||a)(t.LFG(k.U),t.LFG(h.F0))},a.\u0275prov=t.Yz7({token:a,factory:a.\u0275fac,providedIn:"root"}),a})();var Z=c(210),d=c(7355),b=c(8613),A=c(5861),K=c(6805),rt=c(930);function q(a,r){const e="object"==typeof r;return new Promise((i,n)=>{const s=new rt.Hp({next:l=>{i(l),s.unsubscribe()},error:n,complete:()=>{e?i(r.defaultValue):n(new K.K)}});a.subscribe(s)})}var y=c(8372),J=c(9094),F=c(8505),M=c(3900),H=c(8746),w=c(5625),D=c(3e3),Q=c(8745),st=c(519),lt=c(8439),ct=c(5679),X=c(6781),mt=c(8987),G=c(7902),tt=c(6925),j=c(4137),ut=c(6493),L=c(7845),et=c(7957),at=c(3238),I=c(4859),_t=c(4850),R=c(7392),g=c(9549),O=c(4144),dt=c(3162),it=c(4385),nt=c(455),P=c(266),Y=c(8616),V=c(3626);function pt(a,r){if(1&a&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&a){const e=t.oxw(3);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.imageLimitExceeded)," !")}}function gt(a,r){if(1&a&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&a){const e=t.oxw(3);t.xp6(1),t.Oqu(e.imageErrorText)}}function ft(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"div",2),t._UZ(1,"img",47),t.TgZ(2,"mat-form-field",48)(3,"mat-label"),t._uU(4,"Gambar Untuk Embed SEO"),t.qZA(),t.TgZ(5,"ngx-mat-file-input",49,50),t.NdJ("change",function(n){t.CHM(e);const s=t.MAs(6),l=t.oxw(2);return t.KtG(l.uploadImage(n,s))}),t.qZA(),t._UZ(7,"mat-icon",51),t.qZA(),t.TgZ(8,"mat-error",52)(9,"small"),t.YNc(10,pt,3,3,"div",20),t.YNc(11,gt,2,1,"div",20),t.qZA()()()}if(2&a){const e=t.oxw(2);t.xp6(1),t.Q6J("src",e.image_url,t.LSH),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("disabled",e.fg.value.image)("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(5),t.Q6J("ngIf",e.imageLimitExceeded),t.xp6(1),t.Q6J("ngIf",e.imageErrorText)}}function ht(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"div",53)(1,"button",27),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.submitImage())}),t._UZ(2,"mat-icon",54),t._uU(3," Unggah "),t.qZA()()}if(2&a){const e=t.oxw(2);t.xp6(1),t.Q6J("disabled",e.submitted)}}function bt(a,r){1&a&&(t.TgZ(0,"div",15)(1,"mat-slide-toggle",55)(2,"i"),t._uU(3,"Private"),t.qZA(),t._uU(4," Akses Hanya Dengan URL "),t.qZA()())}function vt(a,r){if(1&a&&(t.TgZ(0,"mat-option",56),t._uU(1),t.qZA()),2&a){const e=r.$implicit;t.Q6J("value",e.id),t.xp6(1),t.Oqu(e.name)}}function xt(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Jenis Tidak Boleh Kosong"),t.qZA())}function Ct(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Jenis Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function Tt(a,r){1&a&&t.GkF(0)}function Zt(a,r){1&a&&(t.TgZ(0,"mat-option",63),t._UZ(1,"mat-progress-bar",64),t.qZA())}function At(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"mat-option",66),t.NdJ("click",function(){const s=t.CHM(e).$implicit,l=t.oxw(4);return t.KtG(l.filterAnimeSelected(s))}),t._UZ(1,"img",67),t.TgZ(2,"span",68),t._uU(3),t.qZA()()}if(2&a){const e=r.$implicit;t.Q6J("value",e.id),t.xp6(1),t.s9C("src",e.image_url,t.LSH),t.xp6(2),t.lnq("",e.id," :: ",null==e.media_type?null:e.media_type.toUpperCase()," :: ",e.title,"")}}function It(a,r){if(1&a&&(t.ynx(0),t.YNc(1,At,4,5,"mat-option",65),t.BQk()),2&a){const e=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",e.filteredAnime)}}function kt(a,r){if(1&a&&(t.TgZ(0,"small",69),t._uU(1),t.qZA()),2&a){const e=t.oxw(3);t.xp6(1),t.Oqu(e.fg.get("anime_name").value)}}function Ut(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"ID Anime Tidak Boleh Kosong"),t.qZA())}function Et(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"ID Anime Hanya Boleh Angka"),t.qZA())}function St(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"mat-form-field",57)(1,"mat-label"),t._uU(2,"Anime Terkait"),t.qZA(),t.TgZ(3,"input",58),t.NdJ("keyup",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.resetSelectedAnime())}),t.qZA(),t._UZ(4,"mat-icon",59),t.TgZ(5,"mat-autocomplete",null,60),t.YNc(7,Zt,2,0,"mat-option",61),t.YNc(8,It,2,1,"ng-container",20),t.qZA(),t.YNc(9,kt,2,1,"small",62),t.TgZ(10,"mat-error"),t.YNc(11,Ut,2,0,"div",20),t.YNc(12,Et,2,0,"div",20),t.qZA()()}if(2&a){const e=t.MAs(6),i=t.oxw(2);t.Q6J("color","accent"),t.xp6(3),t.Q6J("matAutocomplete",e),t.xp6(4),t.Q6J("ngIf",i.isLoading),t.xp6(1),t.Q6J("ngIf",!i.isLoading),t.xp6(1),t.Q6J("ngIf",i.fg.get("anime_name").value),t.xp6(2),t.Q6J("ngIf",i.fg.get("anime_id").hasError("required")),t.xp6(1),t.Q6J("ngIf",i.fg.get("anime_id").hasError("pattern"))}}function Nt(a,r){1&a&&t.GkF(0)}function yt(a,r){1&a&&(t.TgZ(0,"mat-option",63),t._UZ(1,"mat-progress-bar",64),t.qZA())}function Jt(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"mat-option",66),t.NdJ("click",function(){const s=t.CHM(e).$implicit,l=t.oxw(5);return t.KtG(l.filterDoramaSelected(s))}),t._UZ(1,"img",67),t.TgZ(2,"span",68),t._uU(3),t.qZA()()}if(2&a){const e=r.$implicit;t.Q6J("value",e.mdl_id),t.xp6(1),t.s9C("src",e.image_url,t.LSH),t.xp6(2),t.AsE("",e.mdl_id," :: ",e.title,"")}}function wt(a,r){if(1&a&&(t.ynx(0),t.YNc(1,Jt,4,4,"mat-option",65),t.BQk()),2&a){const e=t.oxw(4);t.xp6(1),t.Q6J("ngForOf",e.filteredDorama)}}function Bt(a,r){if(1&a&&(t.TgZ(0,"small",69),t._uU(1),t.qZA()),2&a){const e=t.oxw(4);t.xp6(1),t.Oqu(e.fg.get("dorama_name").value)}}function qt(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"ID Dorama Tidak Boleh Kosong"),t.qZA())}function Ft(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"ID Dorama Hanya Boleh Angka"),t.qZA())}function Mt(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"mat-form-field",57)(1,"mat-label"),t._uU(2,"Dorama Terkait"),t.qZA(),t.TgZ(3,"input",72),t.NdJ("keyup",function(){t.CHM(e);const n=t.oxw(3);return t.KtG(n.resetSelectedDorama())}),t.qZA(),t._UZ(4,"mat-icon",59),t.TgZ(5,"mat-autocomplete",null,73),t.YNc(7,yt,2,0,"mat-option",61),t.YNc(8,wt,2,1,"ng-container",20),t.qZA(),t.YNc(9,Bt,2,1,"small",62),t.TgZ(10,"mat-error"),t.YNc(11,qt,2,0,"div",20),t.YNc(12,Ft,2,0,"div",20),t.qZA()()}if(2&a){const e=t.MAs(6),i=t.oxw(3);t.Q6J("color","accent"),t.xp6(3),t.Q6J("matAutocomplete",e),t.xp6(4),t.Q6J("ngIf",i.isLoading),t.xp6(1),t.Q6J("ngIf",!i.isLoading),t.xp6(1),t.Q6J("ngIf",i.fg.get("dorama_name").value),t.xp6(2),t.Q6J("ngIf",i.fg.get("dorama_id").hasError("required")),t.xp6(1),t.Q6J("ngIf",i.fg.get("dorama_id").hasError("pattern"))}}function Dt(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Kode Serial Tidak Boleh Kosong"),t.qZA())}function Qt(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Kode Serial Hanya Boleh Huruf Besar, Strip, Dan Angka"),t.qZA())}function Lt(a,r){if(1&a&&(t.TgZ(0,"mat-form-field",31)(1,"mat-label"),t._uU(2,"Kode / Serial Number"),t.qZA(),t._UZ(3,"input",75)(4,"mat-icon",76),t.TgZ(5,"mat-error"),t.YNc(6,Dt,2,0,"div",20),t.YNc(7,Qt,2,0,"div",20),t.qZA()()),2&a){const e=t.oxw(4);t.Q6J("color","accent"),t.xp6(6),t.Q6J("ngIf",e.fg.get("sn_code").hasError("required")),t.xp6(1),t.Q6J("ngIf",e.fg.get("sn_code").hasError("pattern"))}}function Rt(a,r){if(1&a&&t.YNc(0,Lt,8,3,"mat-form-field",74),2&a){const e=t.oxw(3);t.Q6J("ngIf",e.berkasType)}}function Ot(a,r){if(1&a&&(t.YNc(0,Nt,1,0,"ng-container",21),t.YNc(1,Mt,13,7,"ng-template",null,70,t.W1O),t.YNc(3,Rt,1,1,"ng-template",null,71,t.W1O)),2&a){const e=t.MAs(2),i=t.MAs(4),n=t.oxw(2);t.Q6J("ngIf",n.berkasType.toLowerCase().includes("dorama_"))("ngIfThen",e)("ngIfElse",i)}}function Yt(a,r){1&a&&t._UZ(0,"mat-icon",59)}function Kt(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"button",83),t.NdJ("click",function(){t.CHM(e);const n=t.oxw().index,s=t.oxw(2);return t.KtG(s.removeFansub(n))}),t._UZ(1,"mat-icon",84),t.qZA()}}function Ht(a,r){1&a&&(t.TgZ(0,"mat-option",63),t._UZ(1,"mat-progress-bar",64),t.qZA())}function Gt(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"mat-option",66),t.NdJ("click",function(){const s=t.CHM(e).$implicit,l=t.oxw(2).index,_=t.oxw(2);return t.KtG(_.filterFansubSelected(s,l))}),t._UZ(1,"img",85),t.TgZ(2,"span",68),t._uU(3),t.qZA()()}if(2&a){const e=r.$implicit;t.Q6J("value",e.id),t.xp6(1),t.s9C("src",e.image_url,t.LSH),t.xp6(2),t.AsE("",e.slug," :: ",e.name,"")}}function jt(a,r){if(1&a&&(t.ynx(0),t.YNc(1,Gt,4,4,"mat-option",65),t.BQk()),2&a){const e=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",e.filteredFansub)}}function Pt(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"ID Fansub Tidak Boleh Kosong"),t.qZA())}function Vt(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"ID Fansub Hanya Boleh Angka"),t.qZA())}function zt(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"div")(1,"div",77)(2,"mat-form-field",78)(3,"mat-label"),t._uU(4,"Fansub Terkait"),t.qZA(),t.TgZ(5,"input",79),t.NdJ("keyup",function(){const s=t.CHM(e).index,l=t.oxw(2);return t.KtG(l.resetSelectedFansub(s))}),t.qZA(),t.YNc(6,Yt,1,0,"mat-icon",80),t.YNc(7,Kt,2,0,"button",81),t.TgZ(8,"mat-autocomplete",null,82),t.YNc(10,Ht,2,0,"mat-option",61),t.YNc(11,jt,2,1,"ng-container",20),t.qZA(),t.TgZ(12,"small",69),t._uU(13),t.qZA(),t.TgZ(14,"mat-error"),t.YNc(15,Pt,2,0,"div",20),t.YNc(16,Vt,2,0,"div",20),t.qZA()()()()}if(2&a){const e=r.$implicit,i=r.index,n=t.MAs(9),s=t.oxw(2);t.xp6(1),t.Q6J("formGroupName",i),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("matAutocomplete",n),t.xp6(1),t.Q6J("ngIf",e.get("fansub_id").value||0===i),t.xp6(1),t.Q6J("ngIf",!e.get("fansub_id").value&&i>0),t.xp6(3),t.Q6J("ngIf",s.isLoading),t.xp6(1),t.Q6J("ngIf",!s.isLoading),t.xp6(2),t.Oqu(e.get("fansub_name").value),t.xp6(2),t.Q6J("ngIf",e.get("fansub_id").hasError("required")),t.xp6(1),t.Q6J("ngIf",e.get("fansub_id").hasError("pattern"))}}function Wt(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Nama Berkas Tidak Boleh Kosong"),t.qZA())}function $t(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Nama Berkas Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function Xt(a,r){if(1&a&&t._UZ(0,"angular-editor",86),2&a){const e=t.oxw(2);t.Q6J("config",e.GS.angularEditorConfig)}}function te(a,r){1&a&&t.GkF(0)}function ee(a,r){if(1&a&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&a){const e=t.oxw(3);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.attachmentLimitExceeded)," !")}}function ae(a,r){if(1&a&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&a){const e=t.oxw(3);t.xp6(1),t.Oqu(e.attachmentErrorText)}}function ie(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"div",38)(1,"div",95)(2,"div",96),t._uU(3),t.ALo(4,"bytes"),t._UZ(5,"br")(6,"mat-progress-bar",97),t.qZA()(),t.TgZ(7,"div",98)(8,"button",27),t.NdJ("click",function(){const s=t.CHM(e).$implicit,l=t.oxw(3);return t.KtG(l.submitAttachment(s))}),t._UZ(9,"mat-icon",99),t._uU(10," Unggah "),t.qZA()()()}if(2&a){const e=r.$implicit,i=t.oxw(3);t.xp6(3),t.HOy(" ",e.status," :: ",e.progress,"% @ ",t.lcZ(4,7,e.speed),"/s # ",e.remaining," detik "),t.xp6(3),t.Q6J("mode","determinate")("value",e.progress),t.xp6(2),t.Q6J("disabled",i.submitted||"complete"===e.status||"uploading"===e.status)}}function ne(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"div",10)(1,"div",87)(2,"small",88),t._uU(3," * "),t.TgZ(4,"i"),t._uU(5,"Resume-able Upload"),t.qZA(),t._uU(6," (Tidak wajib, jika sudah ada URL eksternal, misal alamat webmu gdrive mediafire mega dan lain sebagainya). Mohon ditunggu dan jangan di tinggal, berkas lampiran akan "),t.TgZ(7,"i"),t._uU(8,"expired"),t.qZA(),t._uU(9),t.TgZ(10,"i"),t._uU(11,"upload"),t.qZA(),t._uU(12,". Lalu kemudian saat berkas berhasil dibuat, lampiran tidak akan bisa di modifikasi. "),t.qZA()(),t.TgZ(13,"mat-form-field",89)(14,"mat-label"),t._uU(15,"Upload Lampiran Berkas -- DDL"),t.qZA(),t.TgZ(16,"ngx-mat-file-input",90,91),t.NdJ("change",function(n){t.CHM(e);const s=t.MAs(17),l=t.oxw(2);return t.KtG(l.uploadAttachment(n,s))}),t.qZA(),t._UZ(18,"mat-icon",92),t.qZA(),t.TgZ(19,"mat-error",93)(20,"small"),t.YNc(21,ee,3,3,"div",20),t.YNc(22,ae,2,1,"div",20),t.qZA()()(),t.YNc(23,ie,11,9,"div",94),t.ALo(24,"async")}if(2&a){const e=t.oxw(2);t.xp6(9),t.hij(" apabila tidak disimpan dalam ",e.CONSTANTS.timeoutDeleteTempAttachmentTime/60/1e3," menit setelah berhasil "),t.xp6(4),t.Q6J("color","accent"),t.xp6(3),t.Q6J("disabled",null!==e.attachmentSelected)("accept",e.fileTypeAttachmentAllowed),t.xp6(5),t.Q6J("ngIf",e.attachmentLimitExceeded),t.xp6(1),t.Q6J("ngIf",e.attachmentErrorText),t.xp6(1),t.Q6J("ngForOf",t.lcZ(24,7,e.uploads$))}}function oe(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"button",100),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.verify())}),t._UZ(1,"mat-icon",101),t._uU(2," Verifikasi Akun Untuk Upload DDL! "),t.qZA()}}function re(a,r){1&a&&(t.TgZ(0,"div",87)(1,"small",88),t._uU(2,"* Gunakan tombol (X) untuk menghapus URL Eksternal jika ingin hanya menggunakan lampiran "),t.TgZ(3,"i"),t._uU(4,"upload"),t.qZA(),t._uU(5," DDL saja"),t.qZA()())}function se(a,r){1&a&&t._UZ(0,"mat-icon",110)}function le(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"button",83),t.NdJ("click",function(){t.CHM(e);const n=t.oxw().index,s=t.oxw(2);return t.KtG(s.removeDownloadLink(n))}),t._UZ(1,"mat-icon",84),t.qZA()}}function ce(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Web Tidak Boleh Kosong"),t.qZA())}function me(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Web Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function ue(a,r){1&a&&t._UZ(0,"mat-icon",111)}function _e(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"button",83),t.NdJ("click",function(){t.CHM(e);const n=t.oxw().index,s=t.oxw(2);return t.KtG(s.removeDownloadLink(n))}),t._UZ(1,"mat-icon",84),t.qZA()}}function de(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Tautan Tidak Boleh Kosong"),t.qZA())}function pe(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Tautan Link Tidak Valid"),t.qZA())}function ge(a,r){if(1&a&&(t.ynx(0),t.TgZ(1,"div",102),t.YNc(2,re,6,0,"div",103),t.TgZ(3,"mat-form-field",104)(4,"mat-label"),t._uU(5,"Nama Website"),t.qZA(),t._UZ(6,"input",105),t.YNc(7,se,1,0,"mat-icon",106),t.YNc(8,le,2,0,"button",81),t.TgZ(9,"mat-error"),t.YNc(10,ce,2,0,"div",20),t.YNc(11,me,2,0,"div",20),t.qZA()(),t.TgZ(12,"mat-form-field",107)(13,"mat-label"),t._uU(14,"Tautan Link"),t.qZA(),t._UZ(15,"input",108),t.YNc(16,ue,1,0,"mat-icon",109),t.YNc(17,_e,2,0,"button",81),t.TgZ(18,"mat-error"),t.YNc(19,de,2,0,"div",20),t.YNc(20,pe,2,0,"div",20),t.qZA()()(),t.BQk()),2&a){const e=r.$implicit,i=r.index,n=t.oxw(2);t.xp6(1),t.Q6J("formGroupName",i),t.xp6(1),t.Q6J("ngIf",(null==n.AS.currentUserSubject||null==n.AS.currentUserSubject.value?null:n.AS.currentUserSubject.value.verified)&&0===i),t.xp6(1),t.Q6J("color","accent"),t.xp6(4),t.Q6J("ngIf",e.get("name").value||0===i&&!(null!=n.AS.currentUserSubject&&null!=n.AS.currentUserSubject.value&&n.AS.currentUserSubject.value.verified)),t.xp6(1),t.Q6J("ngIf",!e.get("name").value&&(i>0||(null==n.AS.currentUserSubject||null==n.AS.currentUserSubject.value?null:n.AS.currentUserSubject.value.verified))),t.xp6(2),t.Q6J("ngIf",e.get("name").hasError("required")),t.xp6(1),t.Q6J("ngIf",e.get("name").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(4),t.Q6J("ngIf",e.get("url").value||0===i&&!(null!=n.AS.currentUserSubject&&null!=n.AS.currentUserSubject.value&&n.AS.currentUserSubject.value.verified)),t.xp6(1),t.Q6J("ngIf",!e.get("url").value&&(i>0||(null==n.AS.currentUserSubject||null==n.AS.currentUserSubject.value?null:n.AS.currentUserSubject.value.verified))),t.xp6(2),t.Q6J("ngIf",e.get("url").hasError("required")),t.xp6(1),t.Q6J("ngIf",e.get("url").hasError("pattern"))}}function fe(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"form",4),t.NdJ("submit",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.onSubmit())}),t.TgZ(1,"div",5)(2,"div",6)(3,"h2",7)(4,"span",8),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.toggleDetailMode())}),t._uU(5),t.qZA(),t.TgZ(6,"b",9),t._uU(7,"Tambah Berkas Baru"),t.qZA()()(),t.TgZ(8,"div",2)(9,"div",10)(10,"div",11)(11,"div",10),t.YNc(12,ft,12,6,"div",12),t.YNc(13,ht,4,1,"div",13),t.YNc(14,bt,5,0,"div",14),t.TgZ(15,"div",15)(16,"mat-slide-toggle",16),t._uU(17," R-18+ Konten Eksplisit "),t.qZA()(),t.TgZ(18,"mat-form-field",17)(19,"mat-label"),t._uU(20,"Jenis Proyek"),t.qZA(),t.TgZ(21,"mat-select",18),t.YNc(22,vt,2,2,"mat-option",19),t.qZA(),t.TgZ(23,"mat-error"),t.YNc(24,xt,2,0,"div",20),t.YNc(25,Ct,2,0,"div",20),t.qZA()(),t.YNc(26,Tt,1,0,"ng-container",21),t.YNc(27,St,13,7,"ng-template",null,22,t.W1O),t.YNc(29,Ot,5,3,"ng-template",null,23,t.W1O),t.TgZ(31,"div",15),t._UZ(32,"mat-divider"),t.qZA(),t.TgZ(33,"div",24),t.YNc(34,zt,17,10,"div",25),t.qZA(),t.TgZ(35,"div",2)(36,"div",10),t._UZ(37,"div",26),t.TgZ(38,"div",26)(39,"button",27),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.addFansub())}),t._UZ(40,"mat-icon",28),t._uU(41," Tambah Fansub "),t.qZA()()()(),t.TgZ(42,"div",15)(43,"a",29),t._uU(44," * Jika pencarian tidak ditemukan, silahkan membuat halaman Fansub baru terlebih dahulu "),t.qZA()()()(),t.TgZ(45,"div",30)(46,"div",10)(47,"mat-form-field",31)(48,"mat-label"),t._uU(49,"Nama Berkas"),t.qZA(),t._UZ(50,"input",32)(51,"mat-icon",33),t.TgZ(52,"mat-error"),t.YNc(53,Wt,2,0,"div",20),t.YNc(54,$t,2,0,"div",20),t.qZA()(),t.YNc(55,Xt,1,1,"angular-editor",34),t.qZA(),t.TgZ(56,"div",10)(57,"div",15),t._UZ(58,"mat-divider"),t.qZA()(),t.YNc(59,te,1,0,"ng-container",21),t.YNc(60,ne,25,9,"ng-template",null,35,t.W1O),t.YNc(62,oe,3,0,"ng-template",null,36,t.W1O),t.TgZ(64,"div",10)(65,"div",15),t._UZ(66,"mat-divider"),t.qZA()(),t.ynx(67,37),t.YNc(68,ge,21,12,"ng-container",25),t.BQk(),t.TgZ(69,"div",38),t._UZ(70,"div",26)(71,"div",26)(72,"div",26),t.TgZ(73,"div",26)(74,"button",27),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.addDownloadLink())}),t._UZ(75,"mat-icon",28),t._uU(76," Tambah URL Eksternal "),t.qZA()()()()(),t.TgZ(77,"div",10)(78,"div",39)(79,"div",40),t._UZ(80,"div",41),t.TgZ(81,"div",42)(82,"a",43),t._UZ(83,"mat-icon",44),t._uU(84," Batal "),t.qZA()(),t.TgZ(85,"div",42)(86,"button",45),t._uU(87," Simpan "),t._UZ(88,"mat-icon",46),t.qZA()()()()()()()()}if(2&a){const e=t.MAs(28),i=t.MAs(30),n=t.MAs(61),s=t.MAs(63),l=t.oxw();t.Q6J("formGroup",l.fg),t.xp6(5),t.hij(" ",l.detailMode?"Sederhana":"Lengkap"," "),t.xp6(7),t.Q6J("ngIf",l.detailMode),t.xp6(1),t.Q6J("ngIf",l.image&&!l.fg.value.image&&l.detailMode),t.xp6(1),t.Q6J("ngIf",null==l.AS.currentUserSubject||null==l.AS.currentUserSubject.value?null:l.AS.currentUserSubject.value.verified),t.xp6(4),t.Q6J("color","accent"),t.xp6(4),t.Q6J("ngForOf",l.projectList),t.xp6(2),t.Q6J("ngIf",l.fg.get("projectType_id").hasError("required")),t.xp6(1),t.Q6J("ngIf",l.fg.get("projectType_id").hasError("pattern")),t.xp6(1),t.Q6J("ngIf",l.berkasType.toLowerCase().includes("anime_"))("ngIfThen",e)("ngIfElse",i),t.xp6(8),t.Q6J("ngForOf",l.getFansubControl.controls),t.xp6(5),t.Q6J("disabled",l.submitted),t.xp6(8),t.Q6J("color","accent"),t.xp6(6),t.Q6J("ngIf",l.fg.get("name").hasError("required")),t.xp6(1),t.Q6J("ngIf",l.fg.get("name").hasError("pattern")),t.xp6(1),t.Q6J("ngIf",l.detailMode),t.xp6(4),t.Q6J("ngIf",null==l.AS.currentUserSubject||null==l.AS.currentUserSubject.value?null:l.AS.currentUserSubject.value.verified)("ngIfThen",n)("ngIfElse",s),t.xp6(9),t.Q6J("ngForOf",l.getDownloadUrlControl.controls),t.xp6(6),t.Q6J("disabled",l.submitted),t.xp6(8),t.Q6J("disabled",l.submitted),t.xp6(4),t.Q6J("disabled",l.submitted||l.fg.invalid||"uploading"===(null==l.attachmentSelected?null:l.attachmentSelected.status))}}let he=(()=>{class a{constructor(e,i,n,s,l,_,f,U,B,W,pa,ga,fa,ha,ba){this.router=e,this.fb=i,this.bs=n,this.pi=s,this.anime=l,this.dorama=_,this.project=f,this.fansub=U,this.berkas=B,this.imgbb=W,this.toast=pa,this.gs=ga,this.as=fa,this.uploadService=ha,this.ds=ba,this.detailMode=!1,this.submitted=!1,this.projectList=[],this.image=null,this.imageErrorText=null,this.imageLimitExceeded=null,this.image_url="/assets/img/form/no-image.png",this.filteredAnime=[],this.filteredDorama=[],this.filteredFansub=[],this.isLoading=!1,this.animeCheckOrAddResponse=null,this.doramaCheckOrAddResponse=null,this.attachmentSelected=null,this.attachmentErrorText=null,this.attachmentLimitExceeded=null,this.uploadToast=null,this.timerTimeout=null,this.gambar=null,this.ddl=null,this.subsProject=null,this.subsFansub=null,this.subsAnimeDetail=null,this.subsDoramaDetail=null,this.subsProjectDetail=null,this.subsFansubDetail=[],this.subsAnimeNew=null,this.subsDoramaNew=null,this.subsImgbb=null,this.subsBerkasCreate=null,this.subsUpload=null,this.berkasType="",this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get CONSTANTS(){return u.t}get AS(){return this.as}get GS(){return this.gs}get fileTypeAttachmentAllowed(){return u.t.fileTypeAttachmentAllowed.join(", ")}ngOnInit(){this.pi.updatePageMetaData("Berkas - Buat Baru","Halaman Membuat Berkas Baru","Create Berkas"),this.gs.isBrowser&&(this.loadProjectList(),this.initForm(),this.uploads$=this.uploadService.connect(),this.subsUpload=this.uploadService.events.subscribe({next:e=>{this.gs.log("[UPLOAD_EVENTS]",e),("uploading"===e.status||"complete"===e.status)&&(this.attachmentSelected=e),"complete"===e.status?(this.gs.log("[UPLOAD_COMPLETED]",e.response),this.fg.controls.attachment_id.patchValue(e.response.result.id),this.uploadToast=this.toast.warning("Segera Kirim Data Berkas!","Lampiran Akan Dihapus ...",{closeButton:!1,timeOut:u.t.timeoutDeleteTempAttachmentTime,disableTimeOut:"extendedTimeOut",tapToDismiss:!1,progressAnimation:"decreasing"},!0),this.timerTimeout=setTimeout(()=>{this.gs.log("[UPLOAD_TIMEOUT]",u.t.timeoutDeleteTempAttachmentTime),this.failOrCancelUpload({info:"Expired, Silahkan Upload Ulang!"})},u.t.timeoutDeleteTempAttachmentTime)):"error"===e.status&&(this.gs.log("[UPLOAD_ERROR]",e.response,"error"),this.failOrCancelUpload(e.response))},error:e=>{this.gs.log("[UPLOAD_ERROR]",e,"error"),this.failOrCancelUpload(e)}}))}ngOnDestroy(){this.uploadToast&&this.toast.remove(this.uploadToast.toastId),this.timerTimeout&&(clearTimeout(this.timerTimeout),this.timerTimeout=null),this.subsProject?.unsubscribe(),this.subsFansub?.unsubscribe(),this.subsAnimeDetail?.unsubscribe(),this.subsDoramaDetail?.unsubscribe(),this.subsProjectDetail?.unsubscribe();for(const e of this.subsFansubDetail)e?.unsubscribe();this.subsAnimeNew?.unsubscribe(),this.subsDoramaNew?.unsubscribe(),this.subsImgbb?.unsubscribe(),this.subsBerkasCreate?.unsubscribe(),this.uploadService.disconnect(),this.subsUpload?.unsubscribe()}canDeactivate(){var e=this;return(0,A.Z)(function*(){const i=yield e.ds.leavePageDialog();return yield q(i)})()}toggleDetailMode(){this.detailMode=!this.detailMode}loadProjectList(){this.bs.busy(),this.subsProject=this.project.getProject().subscribe({next:e=>{this.gs.log("[PROJECT_LOAD_SUCCESS]",e),this.projectList=e.results,this.bs.idle()},error:e=>{this.gs.log("[PROJECT_LOAD_ERROR]",e,"error"),this.bs.idle()}})}hasRequiredField(e,i){return e.get(i).hasValidator(o.kI.required)}initForm(){this.fg=this.fb.group({name:[null,o.kI.compose([o.kI.required,o.kI.pattern(u.t.regexEnglishKeyboardKeys)])],description:[null,o.kI.compose([o.kI.pattern(u.t.regexEnglishKeyboardKeys)])],projectType_id:[null,o.kI.compose([o.kI.required,o.kI.pattern(u.t.regexEnglishKeyboardKeys)])],anime_id:[null,o.kI.compose([])],anime_name:[null,o.kI.compose([])],dorama_id:[null,o.kI.compose([])],dorama_name:[null,o.kI.compose([])],fansub_list:this.fb.array([this.createFansub()]),image:[null,o.kI.compose([o.kI.pattern(u.t.regexUrl)])],sn_code:[null,o.kI.compose([])],attachment_id:[null,o.kI.compose([o.kI.pattern(u.t.regexEnglishKeyboardKeys)])],download_url:this.fb.array([this.createDownloadLink()]),private:[!1,o.kI.compose([o.kI.required])],r18:[!1,o.kI.compose([o.kI.required])]}),this.subsAnimeDetail=this.fg.get("anime_id").valueChanges.pipe((0,y.b)(500),(0,J.x)(),(0,F.b)(()=>this.isLoading=!0),(0,M.w)(e=>this.anime.searchAnime(e).pipe((0,H.x)(()=>this.isLoading=!1))),(0,w.X)(-1)).subscribe({next:e=>{this.gs.log("[BERKAS_CREATE_SEARCH_ANIME_RESULT_SUCCESS]",e),this.filteredAnime=e.results},error:e=>{this.gs.log("[BERKAS_CREATE_SEARCH_ANIME_RESULT_ERROR]",e,"error")}}),this.subsDoramaDetail=this.fg.get("dorama_id").valueChanges.pipe((0,y.b)(500),(0,J.x)(),(0,F.b)(()=>this.isLoading=!0),(0,M.w)(e=>this.dorama.searchDorama(e).pipe((0,H.x)(()=>this.isLoading=!1))),(0,w.X)(-1)).subscribe({next:e=>{this.gs.log("[BERKAS_CREATE_SEARCH_DORAMA_RESULT_SUCCESS]",e);for(const i of e.results)i.mdl_id=i.mdl_id.split("-")[1],i.image_url=i.thumb;this.filteredDorama=e.results},error:e=>{this.gs.log("[BERKAS_CREATE_SEARCH_DORAMA_RESULT_ERROR]",e,"error")}}),this.subsProjectDetail=this.fg.get("projectType_id").valueChanges.pipe((0,y.b)(500),(0,J.x)(),(0,w.X)(-1)).subscribe({next:e=>{this.gs.log("[BERKAS_CREATE_PROJECT_CHANGED]",e),this.fg.controls.anime_id.patchValue(null),this.fg.controls.anime_name.patchValue(null),this.fg.controls.dorama_id.patchValue(null),this.fg.controls.dorama_name.patchValue(null),this.fg.controls.sn_code.patchValue(null),this.fg.controls.anime_id.setErrors(null),this.fg.controls.anime_name.setErrors(null),this.fg.controls.dorama_id.setErrors(null),this.fg.controls.dorama_name.setErrors(null),this.fg.controls.sn_code.setErrors(null),this.fg.controls.anime_id.clearValidators(),this.fg.controls.anime_name.clearValidators(),this.fg.controls.dorama_id.clearValidators(),this.fg.controls.dorama_name.clearValidators(),this.fg.controls.sn_code.clearValidators(),this.fg.controls.anime_id.markAsPristine(),this.fg.controls.anime_name.markAsPristine(),this.fg.controls.dorama_id.markAsPristine(),this.fg.controls.dorama_name.markAsPristine(),this.fg.controls.sn_code.markAsPristine(),this.fg.controls.anime_id.markAsUntouched(),this.fg.controls.anime_name.markAsUntouched(),this.fg.controls.dorama_id.markAsUntouched(),this.fg.controls.dorama_name.markAsUntouched(),this.fg.controls.sn_code.markAsUntouched();const i=this.projectList.find(n=>n.id===e);i&&(this.berkasType=i.name,i.name.toLowerCase().includes("anime_")?(this.fg.controls.anime_id.setValidators([o.kI.required,o.kI.pattern(/^\d+$/)]),this.fg.controls.anime_name.setValidators([o.kI.required])):i.name.toLowerCase().includes("dorama_")?(this.fg.controls.dorama_id.setValidators([o.kI.required,o.kI.pattern(/^\d+$/)]),this.fg.controls.dorama_name.setValidators([o.kI.required])):this.fg.controls.sn_code.setValidators([o.kI.required,o.kI.pattern(/^[A-Z0-9\-]+$/)])),this.fg.controls.anime_id.updateValueAndValidity(),this.fg.controls.anime_name.updateValueAndValidity(),this.fg.controls.dorama_id.updateValueAndValidity(),this.fg.controls.dorama_name.updateValueAndValidity(),this.fg.controls.sn_code.updateValueAndValidity()}})}get getDownloadUrlControl(){return this.fg.get("download_url")}createDownloadLink(){return this.fb.group({name:[null,o.kI.compose([o.kI.required,o.kI.pattern(u.t.regexEnglishKeyboardKeys)])],url:[null,o.kI.compose([o.kI.required,o.kI.pattern(u.t.regexUrl)])]})}removeDownloadLink(e){this.getDownloadUrlControl.removeAt(e)}addDownloadLink(){this.getDownloadUrlControl.push(this.createDownloadLink())}get getFansubControl(){return this.fg.get("fansub_list")}createFansub(){const e=this.fb.group({fansub_id:[null,o.kI.compose([o.kI.required,o.kI.pattern(/^\d+$/)])],fansub_name:[null,o.kI.compose([o.kI.required])]});return this.subsFansubDetail.push(e.get("fansub_id").valueChanges.pipe((0,y.b)(500),(0,J.x)(),(0,F.b)(()=>this.isLoading=!0),(0,M.w)(i=>this.fansub.searchFansub(i).pipe((0,H.x)(()=>this.isLoading=!1))),(0,w.X)(-1)).subscribe({next:i=>{this.gs.log("[BERKAS_CREATE_SEARCH_FANSUB_RESULT]",i),this.filteredFansub=i.results}})),e}removeFansub(e){this.getFansubControl.removeAt(e),this.subsFansubDetail[e]?.unsubscribe(),this.subsFansubDetail.splice(e,1)}addFansub(){this.getFansubControl.push(this.createFansub())}resetSelectedAnime(){this.fg.controls.anime_name.patchValue(null)}resetSelectedDorama(){this.fg.controls.dorama_name.patchValue(null)}resetSelectedFansub(e){this.getFansubControl.controls[e].get("fansub_name").patchValue(null)}filterAnimeSelected(e){this.gs.log("[ANIME_FILTER_CLICK]",e),this.submitted=!0,this.subsAnimeNew=this.anime.addNewAnime({id:e.id,name:e.title,image_url:e.image_url,type:e.media_type?.toUpperCase()}).subscribe({next:i=>{this.gs.log("[ANIME_CHECK_ADD_SUCCESS]",i),this.animeCheckOrAddResponse=i.result,this.submitted=!1,this.fg.controls.anime_id.patchValue(i.result.id),this.fg.controls.anime_name.patchValue(i.result.name)},error:i=>{this.gs.log("[ANIME_CHECK_ADD_ERROR]",i,"error"),this.submitted=!1,this.resetSelectedAnime(),this.fg.controls.anime_id.patchValue(null),this.fg.controls.anime_name.patchValue(null)}})}filterDoramaSelected(e){this.gs.log("[DORAMA_FILTER_CLICK]",e),this.submitted=!0,this.subsDoramaNew=this.dorama.addNewDorama({id:parseInt(e.mdl_id,10),slug:e.slug,name:e.title,image_url:e.image_url,type:e.type}).subscribe({next:i=>{this.gs.log("[DORAMA_CHECK_ADD_SUCCESS]",i),this.doramaCheckOrAddResponse=i.result,this.submitted=!1,this.fg.controls.dorama_id.patchValue(i.result.id),this.fg.controls.dorama_name.patchValue(i.result.name)},error:i=>{this.gs.log("[DORAMA_CHECK_ADD_ERROR]",i,"error"),this.submitted=!1,this.resetSelectedDorama(),this.fg.controls.dorama_id.patchValue(null),this.fg.controls.dorama_name.patchValue(null)}})}filterFansubSelected(e,i){this.gs.log("[FANSUB_FILTER_CLICK]",e),this.getFansubControl.controls[i].get("fansub_id").patchValue(e.id),this.getFansubControl.controls[i].get("fansub_name").patchValue(e.name)}uploadImage(e,i){this.gambar=i,this.image=null,this.imageLimitExceeded=null,this.imageErrorText=null,this.fg.controls.image.patchValue(null);const n=e.target.files[0];try{const s=new FileReader;s.readAsDataURL(n),s.onload=l=>{if(this.gs.log("[IMAGE_SELECTED]",l),n.size<=u.t.fileSizeImageLimit){const _=this.gs.document.createElement("img");_.onload=()=>{this.image=n,this.image_url=s.result.toString()},_.src=s.result.toString()}else this.image=null,this.image_url="/assets/img/form/image-error.png",this.imageLimitExceeded=u.t.fileSizeImageLimit,this.gambar.clear(e)}}catch{this.image=null,this.image_url="/assets/img/form/no-image.png",this.gambar.clear(e)}}submitImage(){this.submitted=!0,this.subsImgbb=this.imgbb.uploadImage({file:this.image}).subscribe({next:e=>{this.gs.log("[IMAGE_SUCCESS]",e),this.fg.controls.image.patchValue(e.result.url),this.submitted=!1},error:e=>{this.gs.log("[IMAGE_ERROR]",e,"error"),this.fg.controls.image.patchValue(null),this.submitted=!1,this.imageErrorText=e.result?.message||e.info}})}onSubmit(){if(this.bs.busy(),this.submitted=!0,this.fg.invalid||"uploading"===this.attachmentSelected?.status)return this.submitted=!1,void this.bs.idle();if(null===this.fg.value.attachment_id&&0===this.fg.value.download_url.lenth)return this.submitted=!1,this.uploadToast=this.toast.warning("Lampiran DDL / URL Eksternal!","Harap Mengisi Setidaknya Salah Satu ..."),void this.bs.idle();const e=[];for(const i of this.fg.value.fansub_list)e.push(i.fansub_id);this.subsBerkasCreate=this.berkas.createBerkas({image:this.fg.value.image,name:this.fg.value.name,description:this.fg.value.description,private:this.fg.value.private,r18:this.fg.value.r18,projectType_id:this.fg.value.projectType_id,anime_id:this.fg.value.anime_id,dorama_id:this.fg.value.dorama_id,sn_code:this.fg.value.sn_code,fansub_id:e,download_url:this.fg.value.download_url,attachment_id:this.fg.value.attachment_id}).subscribe({next:i=>{this.gs.log("[BERKAS_CREATE_SUCCESS]",i),this.submitted=!1,this.bs.idle(),this.router.navigateByUrl("/berkas",{state:{bypassCanDeactivate:!0}})},error:i=>{this.gs.log("[BERKAS_CREATE_ERROR]",i,"error"),this.submitted=!1,this.bs.idle()}})}uploadAttachment(e,i){this.ddl=i;const n=e.target.files[0];this.attachmentLimitExceeded=null,this.attachmentErrorText=null,this.gs.log("[ATTACHMENT_SELECTED]",n),this.fg.controls.attachment_id.patchValue(null),this.uploadService.disconnect();try{n.size<=u.t.fileSizeAttachmentTotalLimit?this.uploadService.handleFiles(n):(this.attachmentLimitExceeded=u.t.fileSizeAttachmentTotalLimit,this.ddl.clear(e))}catch{this.ddl.clear(e)}}submitAttachment(e){const i=this.uploadService.state().find(n=>n.uploadId===e.uploadId);i&&(this.attachmentSelected=i,e.status="queue")}failOrCancelUpload(e=null){this.attachmentSelected=null,this.attachmentErrorText=e?.result?.message||e?.info||e?.error?.message||"Terjadi Kesalahan, Harap Reload Halaman!",this.uploadService.disconnect(),this.fg.controls.attachment_id.patchValue(null),this.uploadToast&&this.toast.remove(this.uploadToast.toastId),this.ddl.clear()}verify(){this.router.navigate(["/verify"],{queryParams:{returnUrl:this.router.url.split("?")[0]},state:{bypassCanDeactivate:!0}})}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(h.F0),t.Y36(o.QS),t.Y36(D.z),t.Y36(Q.Z),t.Y36(st.o),t.Y36(lt.X),t.Y36(ct.Y),t.Y36(X.T),t.Y36(mt.A),t.Y36(G.X),t.Y36(tt.k),t.Y36(k.U),t.Y36(j.e),t.Y36(ut.Lz),t.Y36(L.x))},a.\u0275cmp=t.Xpm({type:a,selectors:[["app-berkas-create"]],decls:5,vars:1,consts:[[1,"container"],[1,"row","px-3"],[1,"col-12"],[3,"formGroup","submit",4,"ngIf"],[3,"formGroup","submit"],[1,"row","mt-3","mb-3"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"float-end","text-decoration-none","text-warning",2,"font-size","small","cursor","pointer",3,"click"],[1,"text-bifeldy"],[1,"row"],[1,"col-12","col-md-5","col-xl-4","p-3"],["class","col-12",4,"ngIf"],["class","col-12 mb-4",4,"ngIf"],["class","col-12 p-3",4,"ngIf"],[1,"col-12","p-3"],["formControlName","r18","matTooltip","Konten Eksplisit"],["appearance","outline",1,"px-3","pt-3","col-12",3,"color"],["formControlName","projectType_id","placeholder","Anime / Drama","required",""],[3,"value",4,"ngFor","ngForOf"],[4,"ngIf"],[4,"ngIf","ngIfThen","ngIfElse"],["anime_",""],["notAnime_",""],["formArrayName","fansub_list","matTooltip","Silahkan Buat Terlebih Dahulu Jika Tidak Ada"],[4,"ngFor","ngForOf"],[1,"col","px-3"],["type","button","mat-raised-button","","color","primary",1,"w-100",3,"disabled","click"],["fontIcon","add",1,"me-1"],["routerLink","/create/fansub",1,"text-warning","text-decoration-none"],[1,"col-12","col-md-7","col-xl-8","pt-3"],["appearance","outline",1,"p-3","col-12",3,"color"],["matInput","","formControlName","name","placeholder","[Fansub] Judul Anime - 00 [BD 4K x265 FLAC][CRC32].mkv","required",""],["fontIcon","wysiwyg","matSuffix",""],["class","p-3 w-100","formControlName","description",3,"config",4,"ngIf"],["ddlVerified",""],["ddlNotVerified",""],["formArrayName","download_url"],[1,"row","mb-4"],[1,"col-12","py-3"],[1,"row","gy-3"],[1,"col","g-0"],[1,"col-12","col-md-3"],["mat-stroked-button","","routerLink","/berkas",1,"w-100",3,"disabled"],["fontIcon","undo",1,"me-1"],["type","submit","mat-flat-button","","color","accent",1,"w-100",3,"disabled"],["fontIcon","save",1,"ms-1"],[1,"w-100","border",3,"src"],["appearance","outline",1,"pt-3","w-100",3,"color"],[1,"w-100",3,"disabled","accept","change"],["gambar",""],["fontIcon","image","matSuffix",""],[1,"px-3","w-100"],[1,"col-12","mb-4"],["fontIcon","add_photo_alternate",1,"me-1"],["formControlName","private","matTooltip","Hanya Dapat Di Akses Melalui URL"],[3,"value"],["appearance","outline",1,"p-3","w-100",3,"color"],["matInput","","formControlName","anime_id","placeholder","Full Metal Alchemist",3,"matAutocomplete","keyup"],["fontIcon","short_text","matSuffix",""],["autoCompleteAnime","matAutocomplete"],["class","is-loading",4,"ngIf"],["class","text-warning",4,"ngIf"],[1,"is-loading"],["mode","indeterminate"],["class","px-1",3,"value","click",4,"ngFor","ngForOf"],[1,"px-1",3,"value","click"],[1,"me-1",2,"height","40px","width","30px","object-fit","cover",3,"src"],[1,"ms-1"],[1,"text-warning"],["dorama_",""],["notDorama_",""],["matInput","","formControlName","dorama_id","placeholder","Flying Colors",3,"matAutocomplete","keyup"],["autoCompleteDorama","matAutocomplete"],["appearance","outline","class","p-3 col-12",3,"color",4,"ngIf"],["matInput","","formControlName","sn_code","placeholder","XXX-999","required",""],["fontIcon","tag","matSuffix",""],[1,"row",3,"formGroupName"],["appearance","outline",1,"px-3","pt-3","w-100",3,"color"],["matInput","","formControlName","fansub_id","placeholder","NamaFansub","required","",3,"matAutocomplete","keyup"],["fontIcon","short_text","matSuffix","",4,"ngIf"],["type","button","mat-button","","matSuffix","","mat-icon-button","",3,"click",4,"ngIf"],["autoCompleteFansub","matAutocomplete"],["type","button","mat-button","","matSuffix","","mat-icon-button","",3,"click"],["fontIcon","close"],[1,"me-1",2,"height","40px","width","40px","object-fit","cover",3,"src"],["formControlName","description",1,"p-3","w-100",3,"config"],[1,"col-12","px-3"],[1,"text-success"],["appearance","outline",1,"px-3","pt-3","col",3,"color"],["uploadx","",1,"w-100",3,"disabled","accept","change"],["ddl",""],["fontIcon","attach_file","matSuffix",""],[1,"px-4","w-100"],["class","row mb-4",4,"ngFor","ngForOf"],[1,"col"],[1,"ps-3"],[3,"mode","value"],[1,"col-6","col-lg-4","px-3"],["fontIcon","attachment",1,"me-1"],["type","button","mat-stroked-button","","color","accent",1,"w-100",3,"click"],["fontIcon","enhanced_encryption",1,"me-1"],["matTooltip","Silahkan Isi Alamat Website Kamu Jika Ingin Mendapatkan Traffic Pengunjung",1,"row",3,"formGroupName"],["class","col-12 px-3",4,"ngIf"],["appearance","outline",1,"px-3","pt-3","col-12","col-md-5",3,"color"],["matInput","","formControlName","name","placeholder","Google Drive","required",""],["fontIcon","web","matSuffix","",4,"ngIf"],["appearance","outline",1,"px-3","pt-3","col-12","col-md-7",3,"color"],["matInput","","formControlName","url","placeholder","https://webshit.saya.com/01/02/halaman-post-download.html","required",""],["fontIcon","link","matSuffix","",4,"ngIf"],["fontIcon","web","matSuffix",""],["fontIcon","link","matSuffix",""]],template:function(e,i){1&e&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1)(3,"div",2),t.YNc(4,fe,89,25,"form",3),t.qZA()()()),2&e&&(t.xp6(4),t.Q6J("ngIf",i.fg))},dependencies:[m.sg,m.O5,h.yS,et.XC,et.ZL,at.ey,I.lW,I.zs,_t.d,R.Hw,g.TO,g.KE,g.hX,g.R9,O.Nt,dt.pW,it.gD,nt.Rr,P.gM,o._Y,o.Fj,o.JJ,o.JL,o.Q7,o.sg,o.u,o.x0,o.CE,T.Yh,Y.t,C.s6,m.Ov,V.$]}),a})();var v=c(7331),z=c(9602);function be(a,r){if(1&a&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&a){const e=t.oxw(3);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.imageLimitExceeded)," !")}}function ve(a,r){if(1&a&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&a){const e=t.oxw(3);t.xp6(1),t.Oqu(e.imageErrorText)}}function xe(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"div",6)(1,"button",66),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(3);return t.KtG(n.submitImage())}),t._UZ(2,"mat-icon",67),t._uU(3," Unggah "),t.qZA()()}if(2&a){const e=t.oxw(3);t.xp6(1),t.Q6J("disabled",e.submitted)}}function Ce(a,r){if(1&a&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&a){const e=t.oxw(3);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.coverLimitExceeded)," !")}}function Te(a,r){if(1&a&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&a){const e=t.oxw(3);t.xp6(1),t.Oqu(e.coverErrorText)}}function Ze(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"div",68)(1,"button",66),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(3);return t.KtG(n.submitCover())}),t._UZ(2,"mat-icon",67),t._uU(3," Unggah "),t.qZA()()}if(2&a){const e=t.oxw(3);t.xp6(1),t.Q6J("disabled",e.submitted)}}function Ae(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Nama Fansub Tidak Boleh Kosong"),t.qZA())}function Ie(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Nama Fansub Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function ke(a,r){if(1&a&&(t.TgZ(0,"small",69)(1,"div"),t._uU(2),t.qZA()()),2&a){const e=t.oxw(3);t.xp6(2),t.Oqu(e.slugInfo)}}function Ue(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Singkatan Tidak Boleh Kosong"),t.qZA())}function Ee(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Singkatan Hanya Boleh Huruf Dan \u4e00"),t.qZA())}function Se(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Tanggal Harus Diisi Secara Valid"),t.qZA())}function Ne(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Tanggal Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function ye(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Mohon Pilih Salah Satu"),t.qZA())}function Je(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Status Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function we(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"mat-chip",70),t.NdJ("removed",function(){const s=t.CHM(e).$implicit,l=t.oxw(3);return t.KtG(l.removeTag(s))}),t._uU(1),t._UZ(2,"mat-icon",71),t.qZA()}if(2&a){const e=r.$implicit;t.Q6J("removable",!0),t.xp6(1),t.hij(" ",e," ")}}function Be(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Website Tidak Boleh Kosong"),t.qZA())}function qe(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Website Link Tidak Valid"),t.qZA())}function Fe(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Facebook Link Tidak Valid"),t.qZA())}function Me(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Discord Link Tidak Valid"),t.qZA())}function De(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Twitter Link Tidak Valid"),t.qZA())}function Qe(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"RSS Link Tidak Valid"),t.qZA())}function Le(a,r){if(1&a&&(t.TgZ(0,"div",13)(1,"mat-form-field",44)(2,"mat-label"),t._uU(3,"URI / URL RSS v2.0 Feed"),t.qZA(),t._UZ(4,"input",72)(5,"mat-icon",73),t.TgZ(6,"mat-error"),t.YNc(7,Qe,2,0,"div",21),t.qZA()()()),2&a){const e=t.oxw(3);t.xp6(1),t.Q6J("color","accent"),t.xp6(6),t.Q6J("ngIf",e.fg.get("rss_feed").hasError("pattern"))}}function Re(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"form",8),t.NdJ("submit",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.onSubmit())}),t.TgZ(1,"div",9)(2,"div",10)(3,"h2",11)(4,"b",12),t._uU(5,"Tambah Data Fansub Baru"),t.qZA()()(),t.TgZ(6,"div",6)(7,"div",13)(8,"div",14)(9,"div",13)(10,"div",6),t._UZ(11,"img",15),t.TgZ(12,"mat-form-field",16)(13,"mat-label"),t._uU(14,"Foto"),t.qZA(),t.TgZ(15,"ngx-mat-file-input",17,18),t.NdJ("change",function(n){t.CHM(e);const s=t.MAs(16),l=t.oxw(2);return t.KtG(l.uploadImage(n,s))}),t.qZA(),t._UZ(17,"mat-icon",19),t.qZA(),t.TgZ(18,"mat-error",20)(19,"small"),t.YNc(20,be,3,3,"div",21),t.YNc(21,ve,2,1,"div",21),t.qZA()()(),t.YNc(22,xe,4,1,"div",22),t.qZA()(),t.TgZ(23,"div",23)(24,"div",13)(25,"mat-form-field",24)(26,"mat-label"),t._uU(27,"Cover"),t.qZA(),t.TgZ(28,"ngx-mat-file-input",17,25),t.NdJ("change",function(n){t.CHM(e);const s=t.MAs(29),l=t.oxw(2);return t.KtG(l.uploadCover(n,s))}),t.qZA(),t._UZ(30,"mat-icon",19),t.qZA(),t.TgZ(31,"mat-error",20)(32,"small"),t.YNc(33,Ce,3,3,"div",21),t.YNc(34,Te,2,1,"div",21),t.qZA()(),t.YNc(35,Ze,4,1,"div",26),t.TgZ(36,"mat-form-field",27)(37,"mat-label"),t._uU(38,"Nama Fansub"),t.qZA(),t._UZ(39,"input",28)(40,"mat-icon",29),t.TgZ(41,"mat-error"),t.YNc(42,Ae,2,0,"div",21),t.YNc(43,Ie,2,0,"div",21),t.qZA()(),t.TgZ(44,"mat-form-field",30)(45,"mat-label"),t._uU(46,"Singkatan"),t.qZA(),t._UZ(47,"input",31)(48,"mat-icon",32),t.YNc(49,ke,3,1,"small",33),t.TgZ(50,"mat-error"),t.YNc(51,Ue,2,0,"div",21),t.YNc(52,Ee,2,0,"div",21),t.qZA()(),t._UZ(53,"angular-editor",34),t.TgZ(54,"mat-form-field",35)(55,"mat-label"),t._uU(56,"Mulai Ada Sejak"),t.qZA(),t.TgZ(57,"input",36),t.NdJ("focus",function(){t.CHM(e);const n=t.MAs(61);return t.KtG(n.open())}),t.ALo(58,"date"),t.qZA(),t._UZ(59,"mat-datepicker-toggle",37)(60,"mat-datepicker",38,39),t.TgZ(62,"mat-error"),t.YNc(63,Se,2,0,"div",21),t.YNc(64,Ne,2,0,"div",21),t.qZA()(),t.TgZ(65,"mat-form-field",35)(66,"mat-label"),t._uU(67,"Status"),t.qZA(),t.TgZ(68,"mat-select",40)(69,"mat-option",41),t._uU(70,"Tidak Aktif"),t.qZA(),t.TgZ(71,"mat-option",42),t._uU(72,"Aktif"),t.qZA()(),t.TgZ(73,"mat-hint",43),t._uU(74,"Status Kehidupan Fansub Saat Ini"),t.qZA(),t.TgZ(75,"mat-error"),t.YNc(76,ye,2,0,"div",21),t.YNc(77,Je,2,0,"div",21),t.qZA()()()()(),t.TgZ(78,"div",13)(79,"div",6)(80,"div",13)(81,"mat-form-field",44)(82,"mat-label"),t._uU(83,"Tags & Kategori"),t.qZA(),t.TgZ(84,"mat-chip-list",null,45),t.YNc(86,we,3,2,"mat-chip",46),t.TgZ(87,"input",47),t.NdJ("matChipInputTokenEnd",function(n){t.CHM(e);const s=t.oxw(2);return t.KtG(s.addTag(n))}),t.qZA(),t._UZ(88,"mat-icon",48),t.qZA(),t.TgZ(89,"mat-hint",43),t._uU(90,"Isi Dengan Bebas, Pisahkan Dengan Koma"),t.qZA()()()()(),t.TgZ(91,"div",13)(92,"div",6)(93,"div",13)(94,"mat-form-field",49)(95,"mat-label"),t._uU(96,"Tautan Website"),t.qZA(),t._UZ(97,"input",50)(98,"mat-icon",51),t.TgZ(99,"mat-error"),t.YNc(100,Be,2,0,"div",21),t.YNc(101,qe,2,0,"div",21),t.qZA()(),t.TgZ(102,"mat-form-field",49)(103,"mat-label"),t._uU(104,"Facebook Fanpage"),t.qZA(),t._UZ(105,"input",52)(106,"mat-icon",53),t.TgZ(107,"mat-error"),t.YNc(108,Fe,2,0,"div",21),t.qZA()(),t.TgZ(109,"mat-form-field",49)(110,"mat-label"),t._uU(111,"Tautan Discord"),t.qZA(),t._UZ(112,"input",54),t.TgZ(113,"mat-icon",55),t._UZ(114,"img",56),t.qZA(),t.TgZ(115,"mat-error"),t.YNc(116,Me,2,0,"div",21),t.qZA()(),t.TgZ(117,"mat-form-field",49)(118,"mat-label"),t._uU(119,"Cuitan Twitter"),t.qZA(),t._UZ(120,"input",57),t.TgZ(121,"mat-icon",55),t._UZ(122,"img",56),t.qZA(),t.TgZ(123,"mat-error"),t.YNc(124,De,2,0,"div",21),t.qZA()()()()(),t.YNc(125,Le,8,2,"div",58),t.TgZ(126,"div",13)(127,"div",6)(128,"div",59),t._UZ(129,"div",60),t.TgZ(130,"div",61)(131,"a",62),t._UZ(132,"mat-icon",63),t._uU(133," Batal "),t.qZA()(),t.TgZ(134,"div",61)(135,"button",64),t._uU(136," Simpan "),t._UZ(137,"mat-icon",65),t.qZA()()()()()()()()}if(2&a){const e=t.MAs(61),i=t.MAs(85),n=t.oxw(2);t.Q6J("formGroup",n.fg),t.xp6(11),t.Q6J("src",n.image_url,t.LSH),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("disabled",n.fg.value.image)("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(5),t.Q6J("ngIf",n.imageLimitExceeded),t.xp6(1),t.Q6J("ngIf",n.imageErrorText),t.xp6(1),t.Q6J("ngIf",n.image&&!n.fg.value.image),t.xp6(3),t.Q6J("color","accent"),t.xp6(3),t.Q6J("disabled",n.fg.value.cover)("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(5),t.Q6J("ngIf",n.coverLimitExceeded),t.xp6(1),t.Q6J("ngIf",n.coverErrorText),t.xp6(1),t.Q6J("ngIf",n.cover&&!n.fg.value.cover),t.xp6(1),t.Q6J("color","accent"),t.xp6(6),t.Q6J("ngIf",n.fg.get("name").hasError("required")),t.xp6(1),t.Q6J("ngIf",n.fg.get("name").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(5),t.Q6J("ngIf",n.slugInfo),t.xp6(2),t.Q6J("ngIf",n.fg.get("slug").hasError("required")),t.xp6(1),t.Q6J("ngIf",n.fg.get("slug").hasError("pattern")),t.xp6(1),t.Q6J("config",n.GS.angularEditorConfig),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.s9C("placeholder",t.xi3(58,50,n.currentDate,"d MMMM y")),t.Q6J("matDatepicker",e),t.xp6(2),t.Q6J("for",e),t.xp6(4),t.Q6J("ngIf",n.fg.get("born").hasError("required")||n.fg.get("born").hasError("matDatepickerParse")),t.xp6(1),t.Q6J("ngIf",n.fg.get("born").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(11),t.Q6J("ngIf",n.fg.get("active").hasError("required")),t.xp6(1),t.Q6J("ngIf",n.fg.get("active").hasError("pattern")),t.xp6(4),t.Q6J("color","accent"),t.xp6(5),t.Q6J("ngForOf",n.fg.value.tags),t.xp6(1),t.Q6J("matChipInputSeparatorKeyCodes",n.GS.separatorKeysCodes)("matChipInputFor",i)("matChipInputAddOnBlur",!0),t.xp6(7),t.Q6J("color","accent"),t.xp6(6),t.Q6J("ngIf",n.fg.get("web").hasError("required")),t.xp6(1),t.Q6J("ngIf",n.fg.get("web").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(6),t.Q6J("ngIf",n.fg.get("facebook").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(5),t.MGl("src","/assets/img/discord/",n.GS.isDarkMode?"white":"black",".png",t.LSH),t.xp6(2),t.Q6J("ngIf",n.fg.get("discord").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(5),t.MGl("src","/assets/img/twitter/",n.GS.isDarkMode?"white":"black",".png",t.LSH),t.xp6(2),t.Q6J("ngIf",n.fg.get("twitter").hasError("pattern")),t.xp6(1),t.Q6J("ngIf",n.rssFeedAllowed),t.xp6(6),t.Q6J("disabled",n.submitted),t.xp6(4),t.Q6J("disabled",n.submitted||n.fg.invalid)}}function Oe(a,r){if(1&a&&(t.TgZ(0,"div",1),t._UZ(1,"div",2)(2,"div",3)(3,"div",4)(4,"app-notifications"),t.TgZ(5,"div",5)(6,"div",6),t.YNc(7,Re,138,53,"form",7),t.qZA()()()),2&a){const e=t.oxw();t.xp6(1),t.Udp("background-image","url("+e.cover_url+")"),t.xp6(6),t.Q6J("ngIf",e.fg)}}let Ye=(()=>{class a{constructor(e,i,n,s,l,_,f,U,B,W){this.fb=e,this.router=i,this.as=n,this.bs=s,this.pi=l,this.imgbb=_,this.fansub=f,this.toast=U,this.gs=B,this.ds=W,this.submitted=!1,this.image=null,this.imageLimitExceeded=null,this.imageErrorText=null,this.image_url="/assets/img/form/no-image.png",this.cover=null,this.coverLimitExceeded=null,this.coverErrorText=null,this.cover_url="/assets/img/form/no-image.png",this.urls=[],this.currentDate=new Date,this.gambar=null,this.gambar_=null,this.subsImgbb=null,this.subsFansub=null,this.subsCekFansubSlug=null,this.slugInfo="",this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get GS(){return this.gs}get rssFeedAllowed(){return this.as.currentUserSubject?.value?.role===x.yS.ADMIN||this.as.currentUserSubject?.value?.role===x.yS.MODERATOR||this.as.currentUserSubject?.value?.role===x.yS.FANSUBBER}ngOnDestroy(){this.subsImgbb?.unsubscribe(),this.subsFansub?.unsubscribe()}ngOnInit(){this.pi.updatePageMetaData("Fansub - Buat Baru","Halaman Menambahkan Fansub Baru","Create Fansub"),this.gs.isBrowser&&this.initForm()}canDeactivate(){var e=this;return(0,A.Z)(function*(){const i=yield e.ds.leavePageDialog();return yield q(i)})()}initForm(){this.fg=this.fb.group({name:[null,o.kI.compose([o.kI.required,o.kI.pattern(u.t.regexEnglishKeyboardKeys)])],description:[null,o.kI.compose([o.kI.required,o.kI.pattern(u.t.regexEnglishKeyboardKeys)])],born:[null,o.kI.compose([o.kI.required,o.kI.pattern(u.t.regexEnglishKeyboardKeys)])],active:[null,o.kI.compose([o.kI.required,o.kI.pattern(u.t.regexEnglishKeyboardKeys)])],slug:[null,o.kI.compose([o.kI.required,o.kI.pattern(/^[0-9a-zA-Z-]*$/)])],tags:[[],o.kI.compose([])],image:[null,o.kI.compose([o.kI.pattern(u.t.regexUrl)])],cover:[null,o.kI.compose([o.kI.pattern(u.t.regexUrl)])],web:[null,o.kI.compose([o.kI.pattern(u.t.regexUrl)])],facebook:[null,o.kI.compose([o.kI.pattern(u.t.regexUrl)])],discord:[null,o.kI.compose([o.kI.pattern(u.t.regexUrl)])],twitter:[null,o.kI.compose([o.kI.pattern(u.t.regexUrl)])],rss_feed:[null,o.kI.compose([o.kI.pattern(u.t.regexUrl)])]}),this.subsCekFansubSlug=this.fg.get("slug").valueChanges.pipe((0,y.b)(500),(0,J.x)(),(0,F.b)(()=>this.slugInfo="Mengecek ..."),(0,M.w)(e=>this.fansub.cekSlug({slug:e})),(0,w.X)(-1)).subscribe({next:e=>{this.gs.log("[FANSUB_CEK_SLUG_RESULT]",e),this.slugInfo=e.result.message}})}addTag(e){const i=e.input,n=e.value;(n||"").trim()&&this.fg.value.tags.push(n.trim()),i&&(i.value=""),this.fg.controls.tags.patchValue(this.fg.value.tags.filter((s,l,_)=>_.findIndex(f=>f===s)===l))}removeTag(e){const i=this.fg.value.tags.indexOf(e);i>=0&&this.fg.value.tags.splice(i,1)}uploadImage(e,i){this.gambar=i,this.image=null,this.imageLimitExceeded=null,this.imageErrorText=null,this.fg.controls.image.patchValue(null);const n=e.target.files[0];try{const s=new FileReader;s.readAsDataURL(n),s.onload=l=>{if(this.gs.log("[IMAGE_SELECTED]",l),n.size<=u.t.fileSizeImageLimit){const _=this.gs.document.createElement("img");_.onload=()=>{this.image=n,this.image_url=s.result.toString()},_.src=s.result.toString()}else this.image=null,this.image_url="/assets/img/form/image-error.png",this.imageLimitExceeded=u.t.fileSizeImageLimit,this.gambar.clear(e)}}catch{this.image=null,this.image_url="/assets/img/form/no-image.png",this.gambar.clear(e)}}submitImage(){this.submitted=!0,this.subsImgbb=this.imgbb.uploadImage({file:this.image}).subscribe({next:e=>{this.gs.log("[IMAGE_SUCCESS]",e),this.fg.controls.image.patchValue(e.result.url),this.submitted=!1},error:e=>{this.gs.log("[IMAGE_ERROR]",e,"error"),this.fg.controls.image.patchValue(null),this.submitted=!1,this.imageErrorText=e.result?.message||e.info}})}uploadCover(e,i){this.gambar_=i,this.cover=null,this.coverLimitExceeded=null,this.coverErrorText=null,this.fg.controls.cover.patchValue(null);const n=e.target.files[0];try{const s=new FileReader;s.readAsDataURL(n),s.onload=l=>{if(this.gs.log("[COVER_SELECTED]",l),n.size<=u.t.fileSizeImageLimit){const _=this.gs.document.createElement("img");_.onload=()=>{this.cover=n,this.cover_url=s.result.toString()},_.src=s.result.toString()}else this.cover=null,this.cover_url="/assets/img/form/image-error.png",this.coverLimitExceeded=u.t.fileSizeImageLimit,this.gambar_.clear(e)}}catch{this.cover=null,this.cover_url="/assets/img/form/no-image.png",this.gambar_.clear(e)}}submitCover(){this.submitted=!0,this.subsImgbb=this.imgbb.uploadImage({file:this.cover}).subscribe({next:e=>{this.gs.log("[COVER_SUCCESS]",e),this.fg.controls.cover.patchValue(e.result.url),this.submitted=!1},error:e=>{this.gs.log("[COVER_ERROR]",e,"error"),this.fg.controls.cover.patchValue(null),this.submitted=!1,this.coverErrorText=e.result?.message||e.info}})}onSubmit(){this.bs.busy();const e=[];if(this.fg.value.web&&e.push({name:"web",url:this.fg.value.web}),this.fg.value.facebook&&e.push({name:"facebook",url:this.fg.value.facebook}),this.fg.value.discord&&e.push({name:"discord",url:this.fg.value.discord}),this.fg.value.twitter&&e.push({name:"twitter",url:this.fg.value.twitter}),this.submitted=!0,this.fg.invalid||0===e.length)return 0===e.length&&this.toast.warning("Harap Isi Salah Satu URL","Form Tidak lengkap (Web/FB/DC)",null,!0),this.submitted=!1,void this.bs.idle();this.subsFansub=this.fansub.createFansub({image:this.fg.value.image,cover:this.fg.value.cover,name:this.fg.value.name,description:this.fg.value.description,born:this.fg.value.born.getTime(),active:this.fg.value.active,tags:this.fg.value.tags,slug:this.fg.value.slug,urls:e,rss_feed:this.fg.value.rss_feed}).subscribe({next:i=>{this.gs.log("[FANSUB_CREATE_SUCCESS]",i),this.submitted=!1,this.bs.idle(),this.router.navigateByUrl("/fansub",{state:{bypassCanDeactivate:!0}})},error:i=>{this.gs.log("[FANSUB_CREATE_ERROR]",i,"error"),this.submitted=!1,this.bs.idle()}})}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(o.QS),t.Y36(h.F0),t.Y36(j.e),t.Y36(D.z),t.Y36(Q.Z),t.Y36(G.X),t.Y36(X.T),t.Y36(tt.k),t.Y36(k.U),t.Y36(L.x))},a.\u0275cmp=t.Xpm({type:a,selectors:[["app-fansub-create"]],decls:1,vars:1,consts:[["class","container",4,"ngIf"],[1,"container"],[1,"fansub-banner","fansub-banner-1","align-items-center"],[1,"fansub-banner","fansub-banner-2","align-items-center"],[2,"padding-top","160px"],[1,"row","px-3"],[1,"col-12"],[3,"formGroup","submit",4,"ngIf"],[3,"formGroup","submit"],[1,"row","mt-3","mb-3"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"row"],[1,"col-12","col-md-5","col-xl-4","p-3"],[1,"w-100","border",3,"src"],["appearance","outline",1,"pt-3","w-100",3,"color"],[1,"w-100",3,"disabled","accept","change"],["gambar",""],["fontIcon","image","matSuffix",""],[1,"px-3","w-100"],[4,"ngIf"],["class","col-12",4,"ngIf"],[1,"col-12","col-md-7","col-xl-8","pt-3"],["appearance","outline",1,"px-3","pt-3","w-100",3,"color"],["gambar_",""],["class","col-12 p-3",4,"ngIf"],["appearance","outline",1,"p-3","col-12","col-md-7",3,"color"],["matInput","","formControlName","name","placeholder","Fansub Jalanan","required",""],["fontIcon","wysiwyg","matSuffix",""],["appearance","outline","matTooltip","Digunakan Juga Untuk Sub-Domain",1,"p-3","col-12","col-md-5",3,"color"],["matInput","","formControlName","slug","placeholder","Jalsub","required",""],["fontIcon","short_text","matSuffix",""],["class","text-info",4,"ngIf"],["formControlName","description","required","",1,"p-3","w-100",3,"config"],["appearance","outline",1,"p-3","col-12","col-md-6",3,"color"],["matInput","","formControlName","born","required","",3,"matDatepicker","placeholder","focus"],["matSuffix","",3,"for"],["disabled","false"],["kalender",""],["formControlName","active","placeholder","Aktif / Non-Aktif","required",""],["value","0"],["value","1"],["align","end"],["appearance","outline",1,"p-3","col-12",3,"color"],["tag",""],["color","accent","selected","",3,"removable","removed",4,"ngFor","ngForOf"],["placeholder","Label Tag / Kategori",3,"matChipInputSeparatorKeyCodes","matChipInputFor","matChipInputAddOnBlur","matChipInputTokenEnd"],["fontIcon","loyalty","matSuffix",""],["appearance","outline",1,"p-3","col-12","col-md-3",3,"color"],["matInput","","formControlName","web","placeholder","http://www.domain.id"],["fontIcon","web","matSuffix",""],["matInput","","formControlName","facebook","placeholder","http://www.facebook.com"],["fontIcon","facebook","matSuffix",""],["matInput","","formControlName","discord","placeholder","http://www.discord.gg"],["matSuffix",""],["width","24px",2,"vertical-align","baseline",3,"src"],["matInput","","formControlName","twitter","placeholder","http://www.twitter.com"],["class","row",4,"ngIf"],[1,"row","gy-3"],[1,"col","g-0"],[1,"col-12","col-md-3"],["mat-stroked-button","","routerLink","/fansub",1,"w-100",3,"disabled"],["fontIcon","undo",1,"me-1"],["type","submit","mat-flat-button","","color","accent",1,"w-100",3,"disabled"],["fontIcon","save",1,"ms-1"],["type","button","mat-raised-button","","color","primary",1,"w-100",3,"disabled","click"],["fontIcon","add_photo_alternate",1,"me-1"],[1,"col-12","p-3"],[1,"text-info"],["color","accent","selected","",3,"removable","removed"],["fontIcon","cancel","matChipRemove",""],["matInput","","formControlName","rss_feed","placeholder","http://my-site.blogspot.com/feeds/posts/default?alt=rss"],["fontIcon","rss_feed","matSuffix",""]],template:function(e,i){1&e&&t.YNc(0,Oe,8,3,"div",0),2&e&&t.Q6J("ngIf",i.fg)},dependencies:[m.sg,m.O5,h.yS,at.ey,I.lW,I.zs,v.qn,v.HS,v.oH,v.qH,z.Mq,z.hl,z.nW,R.Hw,g.TO,g.KE,g.bx,g.hX,g.R9,O.Nt,it.gD,P.gM,o._Y,o.Fj,o.JJ,o.JL,o.Q7,o.sg,o.u,T.Yh,Y.t,C.s6,m.uU,V.$],styles:[".fansub-banner[_ngcontent-%COMP%]{height:128px;width:100%;background-size:cover;background-position:center;background-repeat:no-repeat;filter:blur(5px) brightness(100%);opacity:.5}.fansub-banner-1[_ngcontent-%COMP%]{position:absolute;top:0;left:0}.fansub-banner-2[_ngcontent-%COMP%]{position:absolute;top:128px;left:0}.fansub-info[_ngcontent-%COMP%]{position:relative;height:256px;z-index:1}"]}),a})();var ot=c(5934),Ke=c(7358);function He(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"mat-chip",34),t.NdJ("removed",function(){const s=t.CHM(e).$implicit,l=t.oxw(2);return t.KtG(l.removeTo(s))}),t._uU(1),t._UZ(2,"mat-icon",35),t.qZA()}if(2&a){const e=r.$implicit;t.Q6J("removable",!0),t.xp6(1),t.hij(" ",e," ")}}function Ge(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Alamat Surel Tidak Boleh Kosong"),t.qZA())}function je(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Alamat Surel Tidak Valid"),t.qZA())}function Pe(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"mat-chip",34),t.NdJ("removed",function(){const s=t.CHM(e).$implicit,l=t.oxw(2);return t.KtG(l.removeCc(s))}),t._uU(1),t._UZ(2,"mat-icon",35),t.qZA()}if(2&a){const e=r.$implicit;t.Q6J("removable",!0),t.xp6(1),t.hij(" ",e," ")}}function Ve(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Alamat Surel Tidak Valid"),t.qZA())}function ze(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"mat-chip",34),t.NdJ("removed",function(){const s=t.CHM(e).$implicit,l=t.oxw(2);return t.KtG(l.removeBcc(s))}),t._uU(1),t._UZ(2,"mat-icon",35),t.qZA()}if(2&a){const e=r.$implicit;t.Q6J("removable",!0),t.xp6(1),t.hij(" ",e," ")}}function We(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Alamat Surel Tidak Valid"),t.qZA())}function $e(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"div",36)(1,"mat-slide-toggle",37),t.NdJ("change",function(n){t.CHM(e);const s=t.oxw(2);return t.KtG(s.noReplyMode(n))}),t._uU(2),t.qZA()()}if(2&a){const e=t.oxw(2);t.xp6(1),t.MGl("matTooltip","Kirim sebagai noreply@",e.ENV.domain,""),t.xp6(1),t.hij(" Kirim sebagai noreply@",e.ENV.domain," ")}}function Xe(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Judul Pesan Tidak Boleh Kosong"),t.qZA())}function ta(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Judul Pesan Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function ea(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"form",4),t.NdJ("submit",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.onSubmit())}),t.TgZ(1,"div",5)(2,"div",6)(3,"h2",7)(4,"b",8),t._uU(5,"Buat Email Baru & Kirim"),t.qZA()()(),t.TgZ(6,"div",2)(7,"div",9)(8,"div",10)(9,"div",9)(10,"mat-form-field",11)(11,"mat-label"),t._uU(12,"Penerima"),t.qZA(),t.TgZ(13,"mat-chip-list",null,12),t.YNc(15,He,3,2,"mat-chip",13),t.qZA(),t.TgZ(16,"input",14),t.NdJ("matChipInputTokenEnd",function(n){t.CHM(e);const s=t.oxw();return t.KtG(s.addTo(n))}),t.qZA(),t._UZ(17,"mat-icon",15),t.TgZ(18,"mat-hint",16)(19,"mat-error"),t.YNc(20,Ge,2,0,"div",17),t.YNc(21,je,2,0,"div",17),t.qZA()()(),t.TgZ(22,"mat-form-field",11)(23,"mat-label"),t._uU(24,"Carbon Copy"),t.qZA(),t.TgZ(25,"mat-chip-list",null,18),t.YNc(27,Pe,3,2,"mat-chip",13),t.qZA(),t.TgZ(28,"input",19),t.NdJ("matChipInputTokenEnd",function(n){t.CHM(e);const s=t.oxw();return t.KtG(s.addCc(n))}),t.qZA(),t._UZ(29,"mat-icon",15),t.TgZ(30,"mat-hint",16)(31,"mat-error"),t.YNc(32,Ve,2,0,"div",17),t.qZA()()(),t.TgZ(33,"mat-form-field",11)(34,"mat-label"),t._uU(35,"Blind Carbon Copy"),t.qZA(),t.TgZ(36,"mat-chip-list",null,20),t.YNc(38,ze,3,2,"mat-chip",13),t.qZA(),t.TgZ(39,"input",19),t.NdJ("matChipInputTokenEnd",function(n){t.CHM(e);const s=t.oxw();return t.KtG(s.addBcc(n))}),t.qZA(),t._UZ(40,"mat-icon",15),t.TgZ(41,"mat-hint",16)(42,"mat-error"),t.YNc(43,We,2,0,"div",17),t.qZA()()(),t.YNc(44,$e,3,2,"div",21),t.qZA()(),t.TgZ(45,"div",22)(46,"div",9)(47,"mat-form-field",23)(48,"mat-label"),t._uU(49,"Judul"),t.qZA(),t._UZ(50,"input",24)(51,"mat-icon",25),t.TgZ(52,"mat-error"),t.YNc(53,Xe,2,0,"div",17),t.YNc(54,ta,2,0,"div",17),t.qZA()(),t._UZ(55,"angular-editor",26),t.qZA()()(),t.TgZ(56,"div",9)(57,"div",2)(58,"div",27),t._UZ(59,"div",28),t.TgZ(60,"div",29)(61,"a",30),t._UZ(62,"mat-icon",31),t._uU(63," Batal "),t.qZA()(),t.TgZ(64,"div",29)(65,"button",32),t._uU(66," Simpan "),t._UZ(67,"mat-icon",33),t.qZA()()()()()()()()}if(2&a){const e=t.MAs(14),i=t.MAs(26),n=t.MAs(37),s=t.oxw();t.Q6J("formGroup",s.fg),t.xp6(10),t.Q6J("color","accent"),t.xp6(5),t.Q6J("ngForOf",s.fg.value.to),t.xp6(1),t.Q6J("matChipInputSeparatorKeyCodes",s.GS.separatorKeysCodes)("matChipInputFor",e)("matChipInputAddOnBlur",!0),t.xp6(4),t.Q6J("ngIf",s.fg.get("to").hasError("required")),t.xp6(1),t.Q6J("ngIf",s.fg.get("to").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(5),t.Q6J("ngForOf",s.fg.value.cc),t.xp6(1),t.Q6J("matChipInputSeparatorKeyCodes",s.GS.separatorKeysCodes)("matChipInputFor",i)("matChipInputAddOnBlur",!0),t.xp6(4),t.Q6J("ngIf",s.fg.get("cc").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(5),t.Q6J("ngForOf",s.fg.value.bcc),t.xp6(1),t.Q6J("matChipInputSeparatorKeyCodes",s.GS.separatorKeysCodes)("matChipInputFor",n)("matChipInputAddOnBlur",!0),t.xp6(4),t.Q6J("ngIf",s.fg.get("bcc").hasError("pattern")),t.xp6(1),t.Q6J("ngIf",s.canSendAsNoReply),t.xp6(3),t.Q6J("color","accent"),t.xp6(6),t.Q6J("ngIf",s.fg.get("subject").hasError("required")),t.xp6(1),t.Q6J("ngIf",s.fg.get("subject").hasError("pattern")),t.xp6(1),t.Q6J("config",s.GS.angularEditorConfig),t.xp6(6),t.Q6J("disabled",s.submitted),t.xp6(4),t.Q6J("disabled",s.submitted||s.fg.invalid)}}let aa=(()=>{class a{constructor(e,i,n,s,l,_,f,U,B){this.activatedRoute=e,this.fb=i,this.router=n,this.bs=s,this.pi=l,this.gs=_,this.as=f,this.ms=U,this.ds=B,this.submitted=!1,this.subsMail=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get ENV(){return ot.N}get GS(){return this.gs}get canSendAsNoReply(){const e=this.as.currentUserSubject?.value?.role;return e===x.yS.ADMIN||e===x.yS.MODERATOR}ngOnInit(){this.pi.updatePageMetaData("Mailbox - Buat Baru","Halaman Membuat Surel Baru","Create Email"),this.gs.isBrowser&&this.initForm()}ngOnDestroy(){this.subsMail?.unsubscribe()}canDeactivate(){var e=this;return(0,A.Z)(function*(){const i=yield e.ds.leavePageDialog();return yield q(i)})()}initForm(){const e=this.activatedRoute.snapshot.queryParamMap.get("to")?.split(",").map(l=>l.toLowerCase().trim())||[],i=this.activatedRoute.snapshot.queryParamMap.get("cc")?.split(",").map(l=>l.toLowerCase().trim())||[],n=this.activatedRoute.snapshot.queryParamMap.get("bcc")?.split(",").map(l=>l.toLowerCase().trim())||[];this.as.currentUserSubject?.value&&(n.includes(`${this.as.currentUserSubject.value._email.toLowerCase().trim()}`)||n.push(`${this.as.currentUserSubject.value._email.toLowerCase().trim()}`));const s=this.activatedRoute.snapshot.queryParamMap.get("subject")||"";this.fg=this.fb.group({to:[e,o.kI.compose([o.kI.required,o.kI.pattern(u.t.regexEmailMulti)])],cc:[i,o.kI.compose([o.kI.pattern(u.t.regexEmailMulti)])],bcc:[n,o.kI.compose([o.kI.pattern(u.t.regexEmailMulti)])],subject:[s,o.kI.compose([o.kI.required,o.kI.pattern(u.t.regexEnglishKeyboardKeys)])],message:[null,o.kI.compose([o.kI.required,o.kI.pattern(u.t.regexEnglishKeyboardKeys)])],no_reply:[!1,o.kI.compose([o.kI.required])]})}onSubmit(){if(this.bs.busy(),this.submitted=!0,this.fg.invalid)return this.submitted=!1,void this.bs.idle();this.subsMail=this.ms.sendMail(this.fg.value).subscribe({next:e=>{this.gs.log("[MAIL_SEND_SUCCESS]",e),this.submitted=!1,this.bs.idle(),this.router.navigateByUrl("/mailbox",{state:{bypassCanDeactivate:!0}})},error:e=>{this.gs.log("[MAIL_SEND_ERROR]",e,"error"),this.submitted=!1,this.bs.idle()}})}addTo(e){const i=e.chipInput.inputElement,n=e.value;(n||"").toLowerCase().trim()&&this.fg.value.to.push(n.toLowerCase().trim()),i&&(i.value=""),this.fg.controls.to.patchValue(this.fg.value.to.filter((s,l,_)=>_.findIndex(f=>f===s)===l))}removeTo(e){const i=this.fg.value.to.indexOf(e);i>=0&&this.fg.value.to.splice(i,1)}addCc(e){const i=e.chipInput.inputElement,n=e.value;(n||"").toLowerCase().trim()&&this.fg.value.cc.push(n.toLowerCase().trim()),i&&(i.value=""),this.fg.controls.cc.patchValue(this.fg.value.cc.filter((s,l,_)=>_.findIndex(f=>f===s)===l))}removeCc(e){const i=this.fg.value.cc.indexOf(e);i>=0&&this.fg.value.cc.splice(i,1)}addBcc(e){const i=e.chipInput.inputElement,n=e.value;(n||"").toLowerCase().trim()&&this.fg.value.bcc.push(n.toLowerCase().trim()),i&&(i.value=""),this.fg.controls.bcc.patchValue(this.fg.value.bcc.filter((s,l,_)=>_.findIndex(f=>f===s)===l))}removeBcc(e){const i=this.fg.value.bcc.indexOf(e);i>=0&&this.fg.value.bcc.splice(i,1)}noReplyMode(e){e.checked?(this.fg.controls.subject.patchValue(`${ot.N.siteName} | Informasi`),this.fg.controls.subject.disable()):this.fg.controls.subject.enable()}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(h.gz),t.Y36(o.QS),t.Y36(h.F0),t.Y36(D.z),t.Y36(Q.Z),t.Y36(k.U),t.Y36(j.e),t.Y36(Ke.Y),t.Y36(L.x))},a.\u0275cmp=t.Xpm({type:a,selectors:[["app-mailbox-create"]],decls:5,vars:1,consts:[[1,"container"],[1,"row","px-3"],[1,"col-12"],[3,"formGroup","submit",4,"ngIf"],[3,"formGroup","submit"],[1,"row","mt-3","mb-3"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"row"],[1,"col-12","col-md-5","col-xl-4","p-3"],["hintLabel","Gunakan , Jika Lebih Dari 1","appearance","outline",1,"p-3","col-12",3,"color"],["to",""],["color","accent","selected","",3,"removable","removed",4,"ngFor","ngForOf"],["placeholder","user@domain.tld","required","",3,"matChipInputSeparatorKeyCodes","matChipInputFor","matChipInputAddOnBlur","matChipInputTokenEnd"],["fontIcon","short_text","matSuffix",""],["align","end"],[4,"ngIf"],["cc",""],["placeholder","user@domain.tld",3,"matChipInputSeparatorKeyCodes","matChipInputFor","matChipInputAddOnBlur","matChipInputTokenEnd"],["bcc",""],["class","col-12 p-3",4,"ngIf"],[1,"col-12","col-md-7","col-xl-8","pt-3"],["appearance","outline",1,"p-3","col-12",3,"color"],["matInput","","formControlName","subject","placeholder","Judul Pesan Blablabla ...","required",""],["fontIcon","wysiwyg","matSuffix",""],["formControlName","message","required","",1,"p-3","w-100",3,"config"],[1,"row","gy-3"],[1,"col","g-0"],[1,"col-12","col-md-3"],["mat-stroked-button","","routerLink","/mailbox",1,"w-100",3,"disabled"],["fontIcon","undo",1,"me-1"],["type","submit","mat-flat-button","","color","accent",1,"w-100",3,"disabled"],["fontIcon","save",1,"ms-1"],["color","accent","selected","",3,"removable","removed"],["fontIcon","cancel","matChipRemove",""],[1,"col-12","p-3"],["formControlName","no_reply",3,"matTooltip","change"]],template:function(e,i){1&e&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1)(3,"div",2),t.YNc(4,ea,68,27,"form",3),t.qZA()()()),2&e&&(t.xp6(4),t.Q6J("ngIf",i.fg))},dependencies:[m.sg,m.O5,h.yS,I.lW,I.zs,v.qn,v.HS,v.oH,v.qH,R.Hw,g.TO,g.KE,g.bx,g.hX,g.R9,O.Nt,nt.Rr,P.gM,o._Y,o.Fj,o.JJ,o.JL,o.Q7,o.sg,o.u,Y.t,C.s6]}),a})();var ia=c(9618);function na(a,r){if(1&a&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.imageLimitExceeded)," !")}}function oa(a,r){if(1&a&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.Oqu(e.imageErrorText)}}function ra(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"div",2)(1,"button",36),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.submitImage())}),t._UZ(2,"mat-icon",37),t._uU(3," Unggah "),t.qZA()()}if(2&a){const e=t.oxw(2);t.xp6(1),t.Q6J("disabled",e.submitted)}}function sa(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Judul Berita Tidak Boleh Kosong"),t.qZA())}function la(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Judul Berita Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function ca(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"mat-chip",38),t.NdJ("removed",function(){const s=t.CHM(e).$implicit,l=t.oxw(2);return t.KtG(l.removeTag(s))}),t._uU(1),t._UZ(2,"mat-icon",39),t.qZA()}if(2&a){const e=r.$implicit;t.Q6J("removable",!0),t.xp6(1),t.hij(" ",e," ")}}function ma(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"form",4),t.NdJ("submit",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.onSubmit())}),t.TgZ(1,"div",5)(2,"div",6)(3,"h2",7)(4,"b",8),t._uU(5,"Tambah Data Berita & Informasi Baru"),t.qZA()()(),t.TgZ(6,"div",2)(7,"div",9)(8,"div",10)(9,"div",9)(10,"div",2),t._UZ(11,"img",11),t.TgZ(12,"mat-form-field",12)(13,"mat-label"),t._uU(14,"Gambar"),t.qZA(),t.TgZ(15,"ngx-mat-file-input",13,14),t.NdJ("change",function(n){t.CHM(e);const s=t.MAs(16),l=t.oxw();return t.KtG(l.uploadImage(n,s))}),t.qZA(),t._UZ(17,"mat-icon",15),t.qZA(),t.TgZ(18,"mat-error",16)(19,"small"),t.YNc(20,na,3,3,"div",17),t.YNc(21,oa,2,1,"div",17),t.qZA()()(),t.YNc(22,ra,4,1,"div",18),t.qZA()(),t.TgZ(23,"div",19)(24,"div",9)(25,"mat-form-field",20)(26,"mat-label"),t._uU(27,"Judul"),t.qZA(),t._UZ(28,"input",21)(29,"mat-icon",22),t.TgZ(30,"mat-error"),t.YNc(31,sa,2,0,"div",17),t.YNc(32,la,2,0,"div",17),t.qZA()(),t.TgZ(33,"mat-form-field",20)(34,"mat-label"),t._uU(35,"Tags & Kategori"),t.qZA(),t.TgZ(36,"mat-chip-list",null,23),t.YNc(38,ca,3,2,"mat-chip",24),t.TgZ(39,"input",25),t.NdJ("matChipInputTokenEnd",function(n){t.CHM(e);const s=t.oxw();return t.KtG(s.addTag(n))}),t.qZA(),t._UZ(40,"mat-icon",26),t.qZA(),t.TgZ(41,"mat-hint",27),t._uU(42,"Isi Dengan Bebas, Pisahkan Dengan Koma"),t.qZA()(),t._UZ(43,"angular-editor",28),t.qZA()()(),t.TgZ(44,"div",9)(45,"div",2)(46,"div",29),t._UZ(47,"div",30),t.TgZ(48,"div",31)(49,"a",32),t._UZ(50,"mat-icon",33),t._uU(51," Batal "),t.qZA()(),t.TgZ(52,"div",31)(53,"button",34),t._uU(54," Simpan "),t._UZ(55,"mat-icon",35),t.qZA()()()()()()()()}if(2&a){const e=t.MAs(37),i=t.oxw();t.Q6J("formGroup",i.fg),t.xp6(11),t.Q6J("src",i.image_url,t.LSH),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("disabled",i.fg.value.image)("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(5),t.Q6J("ngIf",i.imageLimitExceeded),t.xp6(1),t.Q6J("ngIf",i.imageErrorText),t.xp6(1),t.Q6J("ngIf",i.image&&!i.fg.value.image),t.xp6(3),t.Q6J("color","accent"),t.xp6(6),t.Q6J("ngIf",i.fg.get("title").hasError("required")),t.xp6(1),t.Q6J("ngIf",i.fg.get("title").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(5),t.Q6J("ngForOf",i.fg.value.tags),t.xp6(1),t.Q6J("matChipInputSeparatorKeyCodes",i.GS.separatorKeysCodes)("matChipInputFor",e)("matChipInputAddOnBlur",!0),t.xp6(4),t.Q6J("config",i.GS.angularEditorConfig),t.xp6(6),t.Q6J("disabled",i.submitted),t.xp6(4),t.Q6J("disabled",i.submitted||i.fg.invalid)}}const _a=[{path:"",pathMatch:"full",redirectTo:"/home"},{path:"berkas",component:he,canDeactivate:[p],data:{title:"Berkas - Buat Baru",description:"Halaman Unggah Berkas Baru",keywords:"Tambah Berkas Baru"}},{path:"fansub",component:Ye,canActivate:[N.H],canDeactivate:[p],data:{title:"Fansub - Buat Baru",description:"Halaman Menambahkan Fansub Baru",keywords:"Create Fansub",[u.t.decoratorVerifiedOnly]:!0}},{path:"mailbox",component:aa,canActivate:[N.H],canDeactivate:[p],data:{title:"Surel - Buat Baru",description:"Halaman Kirim Surel Baru",keywords:"Buat Surel Baru",[u.t.decoratorVerifiedOnly]:!0}},{path:"news",component:(()=>{class a{constructor(e,i,n,s,l,_,f,U){this.fb=e,this.router=i,this.bs=n,this.pi=s,this.imgbb=l,this.news=_,this.gs=f,this.ds=U,this.submitted=!1,this.image=null,this.imageErrorText=null,this.imageLimitExceeded=null,this.image_url="/assets/img/form/no-image.png",this.gambar=null,this.subsNews=null,this.subsImgbb=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get GS(){return this.gs}ngOnInit(){this.pi.updatePageMetaData("Informasi - Buat Baru","Halaman Menambahkan Berita Baru","Create News"),this.gs.isBrowser&&this.initForm()}ngOnDestroy(){this.subsImgbb?.unsubscribe(),this.subsNews?.unsubscribe()}canDeactivate(){var e=this;return(0,A.Z)(function*(){const i=yield e.ds.leavePageDialog();return yield q(i)})()}initForm(){this.fg=this.fb.group({title:[null,o.kI.compose([o.kI.required,o.kI.pattern(u.t.regexEnglishKeyboardKeys)])],content:[null,o.kI.compose([o.kI.required,o.kI.pattern(u.t.regexEnglishKeyboardKeys)])],image:[null,o.kI.compose([o.kI.pattern(u.t.regexUrl)])],tags:[[],o.kI.compose([])]})}uploadImage(e,i){this.gambar=i,this.image=null,this.imageLimitExceeded=null,this.imageErrorText=null,this.fg.controls.image.patchValue(null);const n=e.target.files[0];try{const s=new FileReader;s.readAsDataURL(n),s.onload=l=>{if(this.gs.log("[IMAGE_SELECTED]",l),n.size<=u.t.fileSizeImageLimit){const _=this.gs.document.createElement("img");_.onload=()=>{this.image=n,this.image_url=s.result.toString()},_.src=s.result.toString()}else this.image=null,this.image_url="/assets/img/form/image-error.png",this.imageLimitExceeded=u.t.fileSizeImageLimit,this.gambar.clear(e)}}catch{this.image=null,this.image_url="/assets/img/form/no-image.png",this.gambar.clear(e)}}submitImage(){this.submitted=!0,this.subsImgbb=this.imgbb.uploadImage({file:this.image}).subscribe({next:e=>{this.gs.log("[IMAGE_SUCCESS]",e),this.fg.controls.image.patchValue(e.result.url),this.submitted=!1},error:e=>{this.gs.log("[IMAGE_ERROR]",e,"error"),this.fg.controls.image.patchValue(null),this.submitted=!1,this.imageErrorText=e.result?.message||e.info}})}onSubmit(){if(this.bs.busy(),this.submitted=!0,this.fg.invalid)return this.submitted=!1,void this.bs.idle();this.subsNews=this.news.createNews({image:this.fg.value.image,title:this.fg.value.title,content:this.fg.value.content,tags:this.fg.value.tags}).subscribe({next:e=>{this.gs.log("[NEWS_CREATE_SUCCESS]",e),this.submitted=!1,this.bs.idle(),this.router.navigateByUrl("/news",{state:{bypassCanDeactivate:!0}})},error:e=>{this.gs.log("[NEWS_CREATE_ERROR]",e,"error"),this.submitted=!1,this.bs.idle()}})}addTag(e){const i=e.input,n=e.value;(n||"").trim()&&this.fg.value.tags.push(n.trim()),i&&(i.value=""),this.fg.controls.tags.patchValue(this.fg.value.tags.filter((s,l,_)=>_.findIndex(f=>f===s)===l))}removeTag(e){const i=this.fg.value.tags.indexOf(e);i>=0&&this.fg.value.tags.splice(i,1)}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(o.QS),t.Y36(h.F0),t.Y36(D.z),t.Y36(Q.Z),t.Y36(G.X),t.Y36(ia.Y),t.Y36(k.U),t.Y36(L.x))},a.\u0275cmp=t.Xpm({type:a,selectors:[["app-news-create"]],decls:5,vars:1,consts:[[1,"container"],[1,"row","px-3"],[1,"col-12"],[3,"formGroup","submit",4,"ngIf"],[3,"formGroup","submit"],[1,"row","mt-3","mb-3"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"row"],[1,"col-12","col-md-5","col-xl-4","p-3"],[1,"w-100","border",3,"src"],["appearance","outline",1,"pt-3","w-100",3,"color"],[1,"w-100",3,"disabled","accept","change"],["gambar",""],["fontIcon","image","matSuffix",""],[1,"px-3","w-100"],[4,"ngIf"],["class","col-12",4,"ngIf"],[1,"col-12","col-md-7","col-xl-8","pt-3"],["appearance","outline",1,"p-3","col-12",3,"color"],["matInput","","formControlName","title","placeholder","Berita Terkini Blablabla ...","required",""],["fontIcon","wysiwyg","matSuffix",""],["tag",""],["color","accent","selected","",3,"removable","removed",4,"ngFor","ngForOf"],["placeholder","Label Tag / Kategori",3,"matChipInputSeparatorKeyCodes","matChipInputFor","matChipInputAddOnBlur","matChipInputTokenEnd"],["fontIcon","loyalty","matSuffix",""],["align","end"],["formControlName","content","required","",1,"p-3","w-100",3,"config"],[1,"row","gy-3"],[1,"col","g-0"],[1,"col-12","col-md-3"],["mat-stroked-button","","routerLink","/news",1,"w-100",3,"disabled"],["fontIcon","undo",1,"me-1"],["type","submit","mat-flat-button","","color","accent",1,"w-100",3,"disabled"],["fontIcon","save",1,"ms-1"],["type","button","mat-raised-button","","color","primary",1,"w-100",3,"disabled","click"],["fontIcon","add_photo_alternate",1,"me-1"],["color","accent","selected","",3,"removable","removed"],["fontIcon","cancel","matChipRemove",""]],template:function(e,i){1&e&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1)(3,"div",2),t.YNc(4,ma,56,19,"form",3),t.qZA()()()),2&e&&(t.xp6(4),t.Q6J("ngIf",i.fg))},dependencies:[m.sg,m.O5,h.yS,I.lW,I.zs,v.qn,v.HS,v.oH,v.qH,R.Hw,g.TO,g.KE,g.bx,g.hX,g.R9,O.Nt,o._Y,o.Fj,o.JJ,o.JL,o.Q7,o.sg,o.u,T.Yh,Y.t,C.s6,V.$]}),a})(),canActivate:[N.H,S.t],canDeactivate:[p],data:{title:"Berita - Buat Baru",description:"Halaman Unggah Berita Baru",keywords:"Tambah Berita Baru",[u.t.decoratorVerifiedOnly]:!0,[u.t.decoratorRoles]:[x.yS.ADMIN,x.yS.MODERATOR]}}];let da=(()=>{class a{}return a.\u0275fac=function(e){return new(e||a)},a.\u0275mod=t.oAB({type:a}),a.\u0275inj=t.cJS({imports:[m.ez,h.Bz.forChild(_a),Z.m,o.u5,o.UX,T.Ad,b.F,C.UM,d.T]}),a})()},8616:($,E,c)=>{c.d(E,{t:()=>k});var m=c(4650),h=c(1390),o=c(257),C=c(7140),T=c(6895),u=c(1861);function x(p,Z){if(1&p&&m._UZ(0,"div",4),2&p){const d=m.oxw();m.Udp("background-size",d.GS.sizeContain?"contain":"cover")("background-image","url("+d.GS.bannerImg+")")("background-repeat",d.GS.bgRepeat?"repeat-x":"no-repeat")("height",d.ROUTER.url.startsWith("/news")||d.ROUTER.url.startsWith("/berkas")||d.ROUTER.url.startsWith("/fansub")?"192px":"128px")("background-position-y",d.ROUTER.url.startsWith("/berkas")?"22.5%":"")}}function S(p,Z){if(1&p&&(m.TgZ(0,"strong",10),m._uU(1," -- "),m.TgZ(2,"i")(3,"a",11),m._uU(4),m.qZA()()()),2&p){const d=m.oxw().$implicit;m.xp6(3),m.MGl("routerLink","/user/",d.notifCreator,""),m.xp6(1),m.hij(" ",d.notifCreator," ")}}function N(p,Z){if(1&p){const d=m.EpF();m.TgZ(0,"button",12),m.NdJ("click",function(){m.CHM(d);const A=m.oxw().$implicit,K=m.oxw();return m.KtG(K.removeNotif(A.notifData.id))}),m.qZA()}}function t(p,Z){if(1&p&&(m.TgZ(0,"div",5)(1,"div")(2,"strong",6),m._uU(3),m.qZA(),m._UZ(4,"span",7),m.ALo(5,"safeInnerHtml"),m.YNc(6,S,5,2,"strong",8),m.YNc(7,N,1,0,"button",9),m.qZA()()),2&p){const d=Z.$implicit;m.xp6(1),m.Gre("alert alert-",d.notifData.type," alert-dismissible fade show"),m.xp6(2),m.Oqu(d.notifData.title),m.xp6(1),m.Q6J("innerHTML",m.lcZ(5,7,d.notifData.content),m.oJD),m.xp6(2),m.Q6J("ngIf",d.notifCreator),m.xp6(1),m.Q6J("ngIf",d.notifData.dismissible)}}let k=(()=>{class p{constructor(d,b,A){this.router=d,this.gs=b,this.notif=A}ngOnInit(){}get GS(){return this.gs}get ROUTER(){return this.router}get NOTIF(){return this.notif}removeNotif(d){this.notif.removeNotif(d)}}return p.\u0275fac=function(d){return new(d||p)(m.Y36(h.F0),m.Y36(o.U),m.Y36(C.T))},p.\u0275cmp=m.Xpm({type:p,selectors:[["app-notifications"]],decls:4,vars:2,consts:[["class","container-fluid notif-banner align-items-center",3,"background-size","background-image","background-repeat","height","background-position-y",4,"ngIf"],[1,"container"],[1,"row","pt-3"],["class","col-12",4,"ngFor","ngForOf"],[1,"container-fluid","notif-banner","align-items-center"],[1,"col-12"],[1,"me-1"],[3,"innerHTML"],["class","ms-1",4,"ngIf"],["type","button","class","btn-close","data-dismiss","alert",3,"click",4,"ngIf"],[1,"ms-1"],[1,"text-decoration-none",3,"routerLink"],["type","button","data-dismiss","alert",1,"btn-close",3,"click"]],template:function(d,b){1&d&&(m.YNc(0,x,1,10,"div",0),m.TgZ(1,"div",1)(2,"div",2),m.YNc(3,t,8,9,"div",3),m.qZA()()),2&d&&(m.Q6J("ngIf",b.GS.bannerImg&&(b.ROUTER.url.startsWith("/news")||b.ROUTER.url.startsWith("/berkas")||b.ROUTER.url.startsWith("/fansub")||b.ROUTER.url.startsWith("/anime")||b.ROUTER.url.startsWith("/dorama"))),m.xp6(3),m.Q6J("ngForOf",b.NOTIF.notifications))},dependencies:[T.sg,T.O5,h.yS,u.H],styles:[".notif-banner[_ngcontent-%COMP%]{width:100%;background-size:cover;background-position:75% 50%}"]}),p})()},8613:($,E,c)=>{c.d(E,{F:()=>T});var m=c(6895),h=c(1390),o=c(7355),C=c(4650);let T=(()=>{class u{}return u.\u0275fac=function(S){return new(S||u)},u.\u0275mod=C.oAB({type:u}),u.\u0275inj=C.cJS({imports:[m.ez,h.Bz,o.T]}),u})()}}]); \ No newline at end of file diff --git a/dist/fansubid/browser/939.fd2a3249d749666c.js b/dist/fansubid/browser/939.fd2a3249d749666c.js deleted file mode 100644 index 6a0eb1e02..000000000 --- a/dist/fansubid/browser/939.fd2a3249d749666c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfansubid=self.webpackChunkfansubid||[]).push([[939],{9939:($,E,l)=>{l.r(E),l.d(E,{CreateModule:()=>ra});var c=l(6895),h=l(1390),n=l(4006),C=l(7375),T=l(3170),u=l(6271),x=l(4249),S=l(2777),N=l(5094),t=l(4650),k=l(257);let p=(()=>{class a{constructor(e,o){this.gs=e,this.router=o}canDeactivate(e){return!!this.router.getCurrentNavigation()?.extras?.state?.bypassCanDeactivate||!e.canDeactivate||e.canDeactivate()}}return a.\u0275fac=function(e){return new(e||a)(t.LFG(k.U),t.LFG(h.F0))},a.\u0275prov=t.Yz7({token:a,factory:a.\u0275fac,providedIn:"root"}),a})();var Z=l(210),_=l(7355),b=l(8613),A=l(5861),K=l(6805),rt=l(930);function q(a,r){const e="object"==typeof r;return new Promise((o,i)=>{const s=new rt.Hp({next:m=>{o(m),s.unsubscribe()},error:i,complete:()=>{e?o(r.defaultValue):i(new K.K)}});a.subscribe(s)})}var y=l(8372),J=l(9094),F=l(8505),M=l(3900),H=l(8746),w=l(5625),D=l(3e3),Q=l(8745),st=l(519),lt=l(8439),ct=l(5679),X=l(6781),mt=l(8987),G=l(7902),tt=l(6925),j=l(4137),ut=l(6493),L=l(7845),et=l(7957),at=l(3238),I=l(4859),dt=l(4850),R=l(7392),g=l(9549),O=l(4144),_t=l(3162),it=l(4385),ot=l(455),P=l(266),Y=l(8616),V=l(3626);function pt(a,r){if(1&a&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&a){const e=t.oxw(3);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.imageLimitExceeded)," !")}}function gt(a,r){if(1&a&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&a){const e=t.oxw(3);t.xp6(1),t.Oqu(e.imageErrorText)}}function ft(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"div",2),t._UZ(1,"img",46),t.TgZ(2,"mat-form-field",47)(3,"mat-label"),t._uU(4,"Gambar Untuk Embed SEO"),t.qZA(),t.TgZ(5,"ngx-mat-file-input",48,49),t.NdJ("change",function(i){t.CHM(e);const s=t.MAs(6),m=t.oxw(2);return t.KtG(m.uploadImage(i,s))}),t.qZA(),t._UZ(7,"mat-icon",50),t.qZA(),t.TgZ(8,"mat-error",51)(9,"small"),t.YNc(10,pt,3,3,"div",20),t.YNc(11,gt,2,1,"div",20),t.qZA()()()}if(2&a){const e=t.oxw(2);t.xp6(1),t.Q6J("src",e.image_url,t.LSH),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("disabled",e.fg.value.image)("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(5),t.Q6J("ngIf",e.imageLimitExceeded),t.xp6(1),t.Q6J("ngIf",e.imageErrorText)}}function ht(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"div",52)(1,"button",25),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.submitImage())}),t._UZ(2,"mat-icon",53),t._uU(3," Unggah "),t.qZA()()}if(2&a){const e=t.oxw(2);t.xp6(1),t.Q6J("disabled",e.submitted)}}function bt(a,r){1&a&&(t.TgZ(0,"div",15)(1,"mat-slide-toggle",54)(2,"i"),t._uU(3,"Private"),t.qZA(),t._uU(4," Akses Hanya Dengan URL "),t.qZA()())}function vt(a,r){if(1&a&&(t.TgZ(0,"mat-option",55),t._uU(1),t.qZA()),2&a){const e=r.$implicit;t.Q6J("value",e.id),t.xp6(1),t.Oqu(e.name)}}function xt(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Jenis Tidak Boleh Kosong"),t.qZA())}function Ct(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Jenis Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function Tt(a,r){1&a&&(t.TgZ(0,"mat-option",62),t._UZ(1,"mat-progress-bar",63),t.qZA())}function Zt(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"mat-option",65),t.NdJ("click",function(){const s=t.CHM(e).$implicit,m=t.oxw(4);return t.KtG(m.filterAnimeSelected(s))}),t._UZ(1,"img",66),t.TgZ(2,"span",67),t._uU(3),t.qZA()()}if(2&a){const e=r.$implicit;t.Q6J("value",e.id),t.xp6(1),t.s9C("src",e.image_url,t.LSH),t.xp6(2),t.lnq("",e.id," :: ",null==e.media_type?null:e.media_type.toUpperCase()," :: ",e.title,"")}}function At(a,r){if(1&a&&(t.ynx(0),t.YNc(1,Zt,4,5,"mat-option",64),t.BQk()),2&a){const e=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",e.filteredAnime)}}function It(a,r){if(1&a&&(t.TgZ(0,"small",68),t._uU(1),t.qZA()),2&a){const e=t.oxw(3);t.xp6(1),t.Oqu(e.fg.get("anime_name").value)}}function kt(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"ID Anime Tidak Boleh Kosong"),t.qZA())}function Ut(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"ID Anime Hanya Boleh Angka"),t.qZA())}function Et(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"mat-form-field",56)(1,"mat-label"),t._uU(2,"Anime Terkait"),t.qZA(),t.TgZ(3,"input",57),t.NdJ("keyup",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.resetSelectedAnime())}),t.qZA(),t._UZ(4,"mat-icon",58),t.TgZ(5,"mat-autocomplete",null,59),t.YNc(7,Tt,2,0,"mat-option",60),t.YNc(8,At,2,1,"ng-container",20),t.qZA(),t.YNc(9,It,2,1,"small",61),t.TgZ(10,"mat-error"),t.YNc(11,kt,2,0,"div",20),t.YNc(12,Ut,2,0,"div",20),t.qZA()()}if(2&a){const e=t.MAs(6),o=t.oxw(2);t.Q6J("color","accent"),t.xp6(3),t.Q6J("matAutocomplete",e),t.xp6(4),t.Q6J("ngIf",o.isLoading),t.xp6(1),t.Q6J("ngIf",!o.isLoading),t.xp6(1),t.Q6J("ngIf",o.fg.get("anime_name").value),t.xp6(2),t.Q6J("ngIf",o.fg.get("anime_id").hasError("required")),t.xp6(1),t.Q6J("ngIf",o.fg.get("anime_id").hasError("pattern"))}}function St(a,r){1&a&&(t.TgZ(0,"mat-option",62),t._UZ(1,"mat-progress-bar",63),t.qZA())}function Nt(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"mat-option",65),t.NdJ("click",function(){const s=t.CHM(e).$implicit,m=t.oxw(4);return t.KtG(m.filterDoramaSelected(s))}),t._UZ(1,"img",66),t.TgZ(2,"span",67),t._uU(3),t.qZA()()}if(2&a){const e=r.$implicit;t.Q6J("value",e.mdl_id),t.xp6(1),t.s9C("src",e.image_url,t.LSH),t.xp6(2),t.AsE("",e.mdl_id," :: ",e.title,"")}}function yt(a,r){if(1&a&&(t.ynx(0),t.YNc(1,Nt,4,4,"mat-option",64),t.BQk()),2&a){const e=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",e.filteredDorama)}}function Jt(a,r){if(1&a&&(t.TgZ(0,"small",68),t._uU(1),t.qZA()),2&a){const e=t.oxw(3);t.xp6(1),t.Oqu(e.fg.get("dorama_name").value)}}function wt(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"ID Dorama Tidak Boleh Kosong"),t.qZA())}function Bt(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"ID Dorama Hanya Boleh Angka"),t.qZA())}function qt(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"mat-form-field",56)(1,"mat-label"),t._uU(2,"Dorama Terkait"),t.qZA(),t.TgZ(3,"input",69),t.NdJ("keyup",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.resetSelectedDorama())}),t.qZA(),t._UZ(4,"mat-icon",58),t.TgZ(5,"mat-autocomplete",null,70),t.YNc(7,St,2,0,"mat-option",60),t.YNc(8,yt,2,1,"ng-container",20),t.qZA(),t.YNc(9,Jt,2,1,"small",61),t.TgZ(10,"mat-error"),t.YNc(11,wt,2,0,"div",20),t.YNc(12,Bt,2,0,"div",20),t.qZA()()}if(2&a){const e=t.MAs(6),o=t.oxw(2);t.Q6J("color","accent"),t.xp6(3),t.Q6J("matAutocomplete",e),t.xp6(4),t.Q6J("ngIf",o.isLoading),t.xp6(1),t.Q6J("ngIf",!o.isLoading),t.xp6(1),t.Q6J("ngIf",o.fg.get("dorama_name").value),t.xp6(2),t.Q6J("ngIf",o.fg.get("dorama_id").hasError("required")),t.xp6(1),t.Q6J("ngIf",o.fg.get("dorama_id").hasError("pattern"))}}function Ft(a,r){1&a&&t._UZ(0,"mat-icon",58)}function Mt(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"button",77),t.NdJ("click",function(){t.CHM(e);const i=t.oxw().index,s=t.oxw(2);return t.KtG(s.removeFansub(i))}),t._UZ(1,"mat-icon",78),t.qZA()}}function Dt(a,r){1&a&&(t.TgZ(0,"mat-option",62),t._UZ(1,"mat-progress-bar",63),t.qZA())}function Qt(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"mat-option",65),t.NdJ("click",function(){const s=t.CHM(e).$implicit,m=t.oxw(2).index,d=t.oxw(2);return t.KtG(d.filterFansubSelected(s,m))}),t._UZ(1,"img",79),t.TgZ(2,"span",67),t._uU(3),t.qZA()()}if(2&a){const e=r.$implicit;t.Q6J("value",e.id),t.xp6(1),t.s9C("src",e.image_url,t.LSH),t.xp6(2),t.AsE("",e.slug," :: ",e.name,"")}}function Lt(a,r){if(1&a&&(t.ynx(0),t.YNc(1,Qt,4,4,"mat-option",64),t.BQk()),2&a){const e=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",e.filteredFansub)}}function Rt(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"ID Fansub Tidak Boleh Kosong"),t.qZA())}function Ot(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"ID Fansub Hanya Boleh Angka"),t.qZA())}function Yt(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"div")(1,"div",71)(2,"mat-form-field",72)(3,"mat-label"),t._uU(4,"Fansub Terkait"),t.qZA(),t.TgZ(5,"input",73),t.NdJ("keyup",function(){const s=t.CHM(e).index,m=t.oxw(2);return t.KtG(m.resetSelectedFansub(s))}),t.qZA(),t.YNc(6,Ft,1,0,"mat-icon",74),t.YNc(7,Mt,2,0,"button",75),t.TgZ(8,"mat-autocomplete",null,76),t.YNc(10,Dt,2,0,"mat-option",60),t.YNc(11,Lt,2,1,"ng-container",20),t.qZA(),t.TgZ(12,"small",68),t._uU(13),t.qZA(),t.TgZ(14,"mat-error"),t.YNc(15,Rt,2,0,"div",20),t.YNc(16,Ot,2,0,"div",20),t.qZA()()()()}if(2&a){const e=r.$implicit,o=r.index,i=t.MAs(9),s=t.oxw(2);t.xp6(1),t.Q6J("formGroupName",o),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("matAutocomplete",i),t.xp6(1),t.Q6J("ngIf",e.get("fansub_id").value||0===o),t.xp6(1),t.Q6J("ngIf",!e.get("fansub_id").value&&o>0),t.xp6(3),t.Q6J("ngIf",s.isLoading),t.xp6(1),t.Q6J("ngIf",!s.isLoading),t.xp6(2),t.Oqu(e.get("fansub_name").value),t.xp6(2),t.Q6J("ngIf",e.get("fansub_id").hasError("required")),t.xp6(1),t.Q6J("ngIf",e.get("fansub_id").hasError("pattern"))}}function Kt(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Nama Berkas Tidak Boleh Kosong"),t.qZA())}function Ht(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Nama Berkas Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function Gt(a,r){if(1&a&&t._UZ(0,"angular-editor",80),2&a){const e=t.oxw(2);t.Q6J("config",e.GS.angularEditorConfig)}}function jt(a,r){1&a&&t._UZ(0,"div")}function Pt(a,r){if(1&a&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&a){const e=t.oxw(3);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.attachmentLimitExceeded)," !")}}function Vt(a,r){if(1&a&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&a){const e=t.oxw(3);t.xp6(1),t.Oqu(e.attachmentErrorText)}}function zt(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"div",37)(1,"div",89)(2,"div",90),t._uU(3),t.ALo(4,"bytes"),t._UZ(5,"br")(6,"mat-progress-bar",91),t.qZA()(),t.TgZ(7,"div",92)(8,"button",25),t.NdJ("click",function(){const s=t.CHM(e).$implicit,m=t.oxw(3);return t.KtG(m.submitAttachment(s))}),t._UZ(9,"mat-icon",93),t._uU(10," Unggah "),t.qZA()()()}if(2&a){const e=r.$implicit,o=t.oxw(3);t.xp6(3),t.HOy(" ",e.status," :: ",e.progress,"% @ ",t.lcZ(4,7,e.speed),"/s # ",e.remaining," detik "),t.xp6(3),t.Q6J("mode","determinate")("value",e.progress),t.xp6(2),t.Q6J("disabled",o.submitted||"complete"===e.status||"uploading"===e.status)}}function Wt(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"div",10)(1,"div",81)(2,"small",82),t._uU(3," * "),t.TgZ(4,"i"),t._uU(5,"Resume-able Upload"),t.qZA(),t._uU(6," (Tidak wajib, jika sudah ada URL eksternal, misal alamat webmu gdrive mediafire mega dan lain sebagainya). Mohon ditunggu dan jangan di tinggal, berkas lampiran akan "),t.TgZ(7,"i"),t._uU(8,"expired"),t.qZA(),t._uU(9),t.TgZ(10,"i"),t._uU(11,"upload"),t.qZA(),t._uU(12,". Lalu kemudian saat berkas berhasil dibuat, lampiran tidak akan bisa di modifikasi. "),t.qZA()(),t.TgZ(13,"mat-form-field",83)(14,"mat-label"),t._uU(15,"Upload Lampiran Berkas -- DDL"),t.qZA(),t.TgZ(16,"ngx-mat-file-input",84,85),t.NdJ("change",function(i){t.CHM(e);const s=t.MAs(17),m=t.oxw(2);return t.KtG(m.uploadAttachment(i,s))}),t.qZA(),t._UZ(18,"mat-icon",86),t.qZA(),t.TgZ(19,"mat-error",87)(20,"small"),t.YNc(21,Pt,3,3,"div",20),t.YNc(22,Vt,2,1,"div",20),t.qZA()()(),t.YNc(23,zt,11,9,"div",88),t.ALo(24,"async")}if(2&a){const e=t.oxw(2);t.xp6(9),t.hij(" apabila tidak disimpan dalam ",e.CONSTANTS.timeoutDeleteTempAttachmentTime/60/1e3," menit setelah berhasil "),t.xp6(4),t.Q6J("color","accent"),t.xp6(3),t.Q6J("disabled",null!==e.attachmentSelected)("accept",e.fileTypeAttachmentAllowed),t.xp6(5),t.Q6J("ngIf",e.attachmentLimitExceeded),t.xp6(1),t.Q6J("ngIf",e.attachmentErrorText),t.xp6(1),t.Q6J("ngForOf",t.lcZ(24,7,e.uploads$))}}function $t(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"button",94),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.verify())}),t._UZ(1,"mat-icon",95),t._uU(2," Verifikasi Akun Untuk Upload DDL! "),t.qZA()}}function Xt(a,r){1&a&&(t.TgZ(0,"div",81)(1,"small",82),t._uU(2,"* Gunakan tombol (X) untuk menghapus URL Eksternal jika ingin hanya menggunakan lampiran "),t.TgZ(3,"i"),t._uU(4,"upload"),t.qZA(),t._uU(5," DDL saja"),t.qZA()())}function te(a,r){1&a&&t._UZ(0,"mat-icon",104)}function ee(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"button",77),t.NdJ("click",function(){t.CHM(e);const i=t.oxw().index,s=t.oxw(2);return t.KtG(s.removeDownloadLink(i))}),t._UZ(1,"mat-icon",78),t.qZA()}}function ae(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Web Tidak Boleh Kosong"),t.qZA())}function ie(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Web Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function oe(a,r){1&a&&t._UZ(0,"mat-icon",105)}function ne(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"button",77),t.NdJ("click",function(){t.CHM(e);const i=t.oxw().index,s=t.oxw(2);return t.KtG(s.removeDownloadLink(i))}),t._UZ(1,"mat-icon",78),t.qZA()}}function re(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Tautan Tidak Boleh Kosong"),t.qZA())}function se(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Tautan Link Tidak Valid"),t.qZA())}function le(a,r){if(1&a&&(t.ynx(0),t.TgZ(1,"div",96),t.YNc(2,Xt,6,0,"div",97),t.TgZ(3,"mat-form-field",98)(4,"mat-label"),t._uU(5,"Nama Website"),t.qZA(),t._UZ(6,"input",99),t.YNc(7,te,1,0,"mat-icon",100),t.YNc(8,ee,2,0,"button",75),t.TgZ(9,"mat-error"),t.YNc(10,ae,2,0,"div",20),t.YNc(11,ie,2,0,"div",20),t.qZA()(),t.TgZ(12,"mat-form-field",101)(13,"mat-label"),t._uU(14,"Tautan Link"),t.qZA(),t._UZ(15,"input",102),t.YNc(16,oe,1,0,"mat-icon",103),t.YNc(17,ne,2,0,"button",75),t.TgZ(18,"mat-error"),t.YNc(19,re,2,0,"div",20),t.YNc(20,se,2,0,"div",20),t.qZA()()(),t.BQk()),2&a){const e=r.$implicit,o=r.index,i=t.oxw(2);t.xp6(1),t.Q6J("formGroupName",o),t.xp6(1),t.Q6J("ngIf",(null==i.AS.currentUserSubject||null==i.AS.currentUserSubject.value?null:i.AS.currentUserSubject.value.verified)&&0===o),t.xp6(1),t.Q6J("color","accent"),t.xp6(4),t.Q6J("ngIf",e.get("name").value||0===o&&!(null!=i.AS.currentUserSubject&&null!=i.AS.currentUserSubject.value&&i.AS.currentUserSubject.value.verified)),t.xp6(1),t.Q6J("ngIf",!e.get("name").value&&(o>0||(null==i.AS.currentUserSubject||null==i.AS.currentUserSubject.value?null:i.AS.currentUserSubject.value.verified))),t.xp6(2),t.Q6J("ngIf",e.get("name").hasError("required")),t.xp6(1),t.Q6J("ngIf",e.get("name").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(4),t.Q6J("ngIf",e.get("url").value||0===o&&!(null!=i.AS.currentUserSubject&&null!=i.AS.currentUserSubject.value&&i.AS.currentUserSubject.value.verified)),t.xp6(1),t.Q6J("ngIf",!e.get("url").value&&(o>0||(null==i.AS.currentUserSubject||null==i.AS.currentUserSubject.value?null:i.AS.currentUserSubject.value.verified))),t.xp6(2),t.Q6J("ngIf",e.get("url").hasError("required")),t.xp6(1),t.Q6J("ngIf",e.get("url").hasError("pattern"))}}function ce(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"form",4),t.NdJ("submit",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.onSubmit())}),t.TgZ(1,"div",5)(2,"div",6)(3,"h2",7)(4,"span",8),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.toggleDetailMode())}),t._uU(5),t.qZA(),t.TgZ(6,"b",9),t._uU(7,"Tambah Berkas Baru"),t.qZA()()(),t.TgZ(8,"div",2)(9,"div",10)(10,"div",11)(11,"div",10),t.YNc(12,ft,12,6,"div",12),t.YNc(13,ht,4,1,"div",13),t.YNc(14,bt,5,0,"div",14),t.TgZ(15,"div",15)(16,"mat-slide-toggle",16),t._uU(17," R-18+ Konten Eksplisit "),t.qZA()(),t.TgZ(18,"mat-form-field",17)(19,"mat-label"),t._uU(20,"Jenis Proyek"),t.qZA(),t.TgZ(21,"mat-select",18),t.YNc(22,vt,2,2,"mat-option",19),t.qZA(),t.TgZ(23,"mat-error"),t.YNc(24,xt,2,0,"div",20),t.YNc(25,Ct,2,0,"div",20),t.qZA()(),t.YNc(26,Et,13,7,"mat-form-field",21),t.YNc(27,qt,13,7,"mat-form-field",21),t.TgZ(28,"div",15),t._UZ(29,"mat-divider"),t.qZA(),t.TgZ(30,"div",22),t.YNc(31,Yt,17,10,"div",23),t.qZA(),t.TgZ(32,"div",2)(33,"div",10),t._UZ(34,"div",24),t.TgZ(35,"div",24)(36,"button",25),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.addFansub())}),t._UZ(37,"mat-icon",26),t._uU(38," Tambah Fansub "),t.qZA()()()(),t.TgZ(39,"div",15)(40,"a",27),t._uU(41," * Jika pencarian tidak ditemukan, silahkan membuat halaman Fansub baru terlebih dahulu "),t.qZA()()()(),t.TgZ(42,"div",28)(43,"div",10)(44,"mat-form-field",29)(45,"mat-label"),t._uU(46,"Nama Berkas"),t.qZA(),t._UZ(47,"input",30)(48,"mat-icon",31),t.TgZ(49,"mat-error"),t.YNc(50,Kt,2,0,"div",20),t.YNc(51,Ht,2,0,"div",20),t.qZA()(),t.YNc(52,Gt,1,1,"angular-editor",32),t.qZA(),t.TgZ(53,"div",10)(54,"div",15),t._UZ(55,"mat-divider"),t.qZA()(),t.YNc(56,jt,1,0,"div",33),t.YNc(57,Wt,25,9,"ng-template",null,34,t.W1O),t.YNc(59,$t,3,0,"ng-template",null,35,t.W1O),t.TgZ(61,"div",10)(62,"div",15),t._UZ(63,"mat-divider"),t.qZA()(),t.ynx(64,36),t.YNc(65,le,21,12,"ng-container",23),t.BQk(),t.TgZ(66,"div",37),t._UZ(67,"div",24)(68,"div",24)(69,"div",24),t.TgZ(70,"div",24)(71,"button",25),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.addDownloadLink())}),t._UZ(72,"mat-icon",26),t._uU(73," Tambah URL Eksternal "),t.qZA()()()()(),t.TgZ(74,"div",10)(75,"div",38)(76,"div",39),t._UZ(77,"div",40),t.TgZ(78,"div",41)(79,"a",42),t._UZ(80,"mat-icon",43),t._uU(81," Batal "),t.qZA()(),t.TgZ(82,"div",41)(83,"button",44),t._uU(84," Simpan "),t._UZ(85,"mat-icon",45),t.qZA()()()()()()()()}if(2&a){const e=t.MAs(58),o=t.MAs(60),i=t.oxw();t.Q6J("formGroup",i.fg),t.xp6(5),t.hij(" ",i.detailMode?"Sederhana":"Lengkap"," "),t.xp6(7),t.Q6J("ngIf",i.detailMode),t.xp6(1),t.Q6J("ngIf",i.image&&!i.fg.value.image&&i.detailMode),t.xp6(1),t.Q6J("ngIf",null==i.AS.currentUserSubject||null==i.AS.currentUserSubject.value?null:i.AS.currentUserSubject.value.verified),t.xp6(4),t.Q6J("color","accent"),t.xp6(4),t.Q6J("ngForOf",i.projectList),t.xp6(2),t.Q6J("ngIf",i.fg.get("projectType_id").hasError("required")),t.xp6(1),t.Q6J("ngIf",i.fg.get("projectType_id").hasError("pattern")),t.xp6(1),t.Q6J("ngIf",i.berkasType.toLowerCase().includes("anime")),t.xp6(1),t.Q6J("ngIf",i.berkasType.toLowerCase().includes("dorama")),t.xp6(4),t.Q6J("ngForOf",i.getFansubControl.controls),t.xp6(5),t.Q6J("disabled",i.submitted),t.xp6(8),t.Q6J("color","accent"),t.xp6(6),t.Q6J("ngIf",i.fg.get("name").hasError("required")),t.xp6(1),t.Q6J("ngIf",i.fg.get("name").hasError("pattern")),t.xp6(1),t.Q6J("ngIf",i.detailMode),t.xp6(4),t.Q6J("ngIf",null==i.AS.currentUserSubject||null==i.AS.currentUserSubject.value?null:i.AS.currentUserSubject.value.verified)("ngIfThen",e)("ngIfElse",o),t.xp6(9),t.Q6J("ngForOf",i.getDownloadUrlControl.controls),t.xp6(6),t.Q6J("disabled",i.submitted),t.xp6(8),t.Q6J("disabled",i.submitted),t.xp6(4),t.Q6J("disabled",i.submitted||i.fg.invalid||"uploading"===(null==i.attachmentSelected?null:i.attachmentSelected.status))}}let me=(()=>{class a{constructor(e,o,i,s,m,d,f,U,B,W,sa,la,ca,ma,ua){this.router=e,this.fb=o,this.bs=i,this.pi=s,this.anime=m,this.dorama=d,this.project=f,this.fansub=U,this.berkas=B,this.imgbb=W,this.toast=sa,this.gs=la,this.as=ca,this.uploadService=ma,this.ds=ua,this.detailMode=!1,this.submitted=!1,this.projectList=[],this.image=null,this.imageErrorText=null,this.imageLimitExceeded=null,this.image_url="/assets/img/form/no-image.png",this.filteredAnime=[],this.filteredDorama=[],this.filteredFansub=[],this.isLoading=!1,this.animeCheckOrAddResponse=null,this.doramaCheckOrAddResponse=null,this.attachmentSelected=null,this.attachmentErrorText=null,this.attachmentLimitExceeded=null,this.uploadToast=null,this.timerTimeout=null,this.gambar=null,this.ddl=null,this.subsProject=null,this.subsFansub=null,this.subsAnimeDetail=null,this.subsDoramaDetail=null,this.subsProjectDetail=null,this.subsFansubDetail=[],this.subsAnimeNew=null,this.subsDoramaNew=null,this.subsImgbb=null,this.subsBerkasCreate=null,this.subsUpload=null,this.berkasType="",this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get CONSTANTS(){return u.t}get AS(){return this.as}get GS(){return this.gs}get fileTypeAttachmentAllowed(){return u.t.fileTypeAttachmentAllowed.join(", ")}ngOnInit(){this.pi.updatePageMetaData("Berkas - Buat Baru","Halaman Membuat Berkas Baru","Create Berkas"),this.gs.isBrowser&&(this.loadProjectList(),this.initForm(),this.uploads$=this.uploadService.connect(),this.subsUpload=this.uploadService.events.subscribe({next:e=>{this.gs.log("[UPLOAD_EVENTS]",e),("uploading"===e.status||"complete"===e.status)&&(this.attachmentSelected=e),"complete"===e.status?(this.gs.log("[UPLOAD_COMPLETED]",e.response),this.fg.controls.attachment_id.patchValue(e.response.result.id),this.uploadToast=this.toast.warning("Segera Kirim Data Berkas!","Lampiran Akan Dihapus ...",{closeButton:!1,timeOut:u.t.timeoutDeleteTempAttachmentTime,disableTimeOut:"extendedTimeOut",tapToDismiss:!1,progressAnimation:"decreasing"},!0),this.timerTimeout=setTimeout(()=>{this.gs.log("[UPLOAD_TIMEOUT]",u.t.timeoutDeleteTempAttachmentTime),this.failOrCancelUpload({info:"Expired, Silahkan Upload Ulang!"})},u.t.timeoutDeleteTempAttachmentTime)):"error"===e.status&&(this.gs.log("[UPLOAD_ERROR]",e.response,"error"),this.failOrCancelUpload(e.response))},error:e=>{this.gs.log("[UPLOAD_ERROR]",e,"error"),this.failOrCancelUpload(e)}}))}ngOnDestroy(){this.uploadToast&&this.toast.remove(this.uploadToast.toastId),this.timerTimeout&&(clearTimeout(this.timerTimeout),this.timerTimeout=null),this.subsProject?.unsubscribe(),this.subsFansub?.unsubscribe(),this.subsAnimeDetail?.unsubscribe(),this.subsDoramaDetail?.unsubscribe(),this.subsProjectDetail?.unsubscribe();for(const e of this.subsFansubDetail)e?.unsubscribe();this.subsAnimeNew?.unsubscribe(),this.subsDoramaNew?.unsubscribe(),this.subsImgbb?.unsubscribe(),this.subsBerkasCreate?.unsubscribe(),this.uploadService.disconnect(),this.subsUpload?.unsubscribe()}canDeactivate(){var e=this;return(0,A.Z)(function*(){const o=yield e.ds.leavePageDialog();return yield q(o)})()}toggleDetailMode(){this.detailMode=!this.detailMode}loadProjectList(){this.bs.busy(),this.subsProject=this.project.getProject().subscribe({next:e=>{this.gs.log("[PROJECT_LOAD_SUCCESS]",e),this.projectList=e.results,this.bs.idle()},error:e=>{this.gs.log("[PROJECT_LOAD_ERROR]",e,"error"),this.bs.idle()}})}hasRequiredField(e,o){return e.get(o).hasValidator(n.kI.required)}initForm(){this.fg=this.fb.group({name:[null,n.kI.compose([n.kI.required,n.kI.pattern(u.t.regexEnglishKeyboardKeys)])],description:[null,n.kI.compose([n.kI.pattern(u.t.regexEnglishKeyboardKeys)])],projectType_id:[null,n.kI.compose([n.kI.required,n.kI.pattern(u.t.regexEnglishKeyboardKeys)])],anime_id:[null,n.kI.compose([])],anime_name:[null,n.kI.compose([])],dorama_id:[null,n.kI.compose([])],dorama_name:[null,n.kI.compose([])],fansub_list:this.fb.array([this.createFansub()]),image:[null,n.kI.compose([n.kI.pattern(u.t.regexUrl)])],attachment_id:[null,n.kI.compose([n.kI.pattern(u.t.regexEnglishKeyboardKeys)])],download_url:this.fb.array([this.createDownloadLink()]),private:[!1,n.kI.compose([n.kI.required])],r18:[!1,n.kI.compose([n.kI.required])]}),this.subsAnimeDetail=this.fg.get("anime_id").valueChanges.pipe((0,y.b)(500),(0,J.x)(),(0,F.b)(()=>this.isLoading=!0),(0,M.w)(e=>this.anime.searchAnime(e).pipe((0,H.x)(()=>this.isLoading=!1))),(0,w.X)(-1)).subscribe({next:e=>{this.gs.log("[BERKAS_CREATE_SEARCH_ANIME_RESULT_SUCCESS]",e),this.filteredAnime=e.results},error:e=>{this.gs.log("[BERKAS_CREATE_SEARCH_ANIME_RESULT_ERROR]",e,"error")}}),this.subsDoramaDetail=this.fg.get("dorama_id").valueChanges.pipe((0,y.b)(500),(0,J.x)(),(0,F.b)(()=>this.isLoading=!0),(0,M.w)(e=>this.dorama.searchDorama(e).pipe((0,H.x)(()=>this.isLoading=!1))),(0,w.X)(-1)).subscribe({next:e=>{this.gs.log("[BERKAS_CREATE_SEARCH_DORAMA_RESULT_SUCCESS]",e);for(const o of e.results)o.mdl_id=o.mdl_id.split("-")[1],o.image_url=o.thumb;this.filteredDorama=e.results},error:e=>{this.gs.log("[BERKAS_CREATE_SEARCH_DORAMA_RESULT_ERROR]",e,"error")}}),this.subsProjectDetail=this.fg.get("projectType_id").valueChanges.pipe((0,y.b)(500),(0,J.x)(),(0,w.X)(-1)).subscribe({next:e=>{this.gs.log("[BERKAS_CREATE_PROJECT_CHANGED]",e);const o=this.projectList.find(i=>i.id===e);this.fg.controls.anime_id.patchValue(null),this.fg.controls.anime_name.patchValue(null),this.fg.controls.dorama_id.patchValue(null),this.fg.controls.dorama_name.patchValue(null),this.fg.controls.anime_id.setErrors(null),this.fg.controls.anime_name.setErrors(null),this.fg.controls.dorama_id.setErrors(null),this.fg.controls.dorama_name.setErrors(null),this.fg.controls.anime_id.clearValidators(),this.fg.controls.anime_name.clearValidators(),this.fg.controls.dorama_id.clearValidators(),this.fg.controls.dorama_name.clearValidators(),this.fg.controls.anime_id.markAsPristine(),this.fg.controls.anime_name.markAsPristine(),this.fg.controls.dorama_id.markAsPristine(),this.fg.controls.dorama_name.markAsPristine(),this.fg.controls.anime_id.markAsUntouched(),this.fg.controls.anime_name.markAsUntouched(),this.fg.controls.dorama_id.markAsUntouched(),this.fg.controls.dorama_name.markAsUntouched(),o.name.toLowerCase().includes("anime")?(this.berkasType=o.name,this.fg.controls.anime_id.setValidators([n.kI.required,n.kI.pattern(/^\d+$/)]),this.fg.controls.anime_name.setValidators([n.kI.required])):o.name.toLowerCase().includes("dorama")?(this.berkasType=o.name,this.fg.controls.dorama_id.setValidators([n.kI.required,n.kI.pattern(/^\d+$/)]),this.fg.controls.dorama_name.setValidators([n.kI.required])):this.berkasType="",this.fg.controls.anime_id.updateValueAndValidity(),this.fg.controls.anime_name.updateValueAndValidity(),this.fg.controls.dorama_id.updateValueAndValidity(),this.fg.controls.dorama_name.updateValueAndValidity()}})}get getDownloadUrlControl(){return this.fg.get("download_url")}createDownloadLink(){return this.fb.group({name:[null,n.kI.compose([n.kI.required,n.kI.pattern(u.t.regexEnglishKeyboardKeys)])],url:[null,n.kI.compose([n.kI.required,n.kI.pattern(u.t.regexUrl)])]})}removeDownloadLink(e){this.getDownloadUrlControl.removeAt(e)}addDownloadLink(){this.getDownloadUrlControl.push(this.createDownloadLink())}get getFansubControl(){return this.fg.get("fansub_list")}createFansub(){const e=this.fb.group({fansub_id:[null,n.kI.compose([n.kI.required,n.kI.pattern(/^\d+$/)])],fansub_name:[null,n.kI.compose([n.kI.required])]});return this.subsFansubDetail.push(e.get("fansub_id").valueChanges.pipe((0,y.b)(500),(0,J.x)(),(0,F.b)(()=>this.isLoading=!0),(0,M.w)(o=>this.fansub.searchFansub(o).pipe((0,H.x)(()=>this.isLoading=!1))),(0,w.X)(-1)).subscribe({next:o=>{this.gs.log("[BERKAS_CREATE_SEARCH_FANSUB_RESULT]",o),this.filteredFansub=o.results}})),e}removeFansub(e){this.getFansubControl.removeAt(e),this.subsFansubDetail[e]?.unsubscribe(),this.subsFansubDetail.splice(e,1)}addFansub(){this.getFansubControl.push(this.createFansub())}resetSelectedAnime(){this.fg.controls.anime_name.patchValue(null)}resetSelectedDorama(){this.fg.controls.dorama_name.patchValue(null)}resetSelectedFansub(e){this.getFansubControl.controls[e].get("fansub_name").patchValue(null)}filterAnimeSelected(e){this.gs.log("[ANIME_FILTER_CLICK]",e),this.submitted=!0,this.subsAnimeNew=this.anime.addNewAnime({id:e.id,name:e.title,image_url:e.image_url,type:e.media_type?.toUpperCase()}).subscribe({next:o=>{this.gs.log("[ANIME_CHECK_ADD_SUCCESS]",o),this.animeCheckOrAddResponse=o.result,this.submitted=!1,this.fg.controls.anime_id.patchValue(o.result.id),this.fg.controls.anime_name.patchValue(o.result.name)},error:o=>{this.gs.log("[ANIME_CHECK_ADD_ERROR]",o,"error"),this.submitted=!1,this.resetSelectedAnime(),this.fg.controls.anime_id.patchValue(null),this.fg.controls.anime_name.patchValue(null)}})}filterDoramaSelected(e){this.gs.log("[DORAMA_FILTER_CLICK]",e),this.submitted=!0,this.subsDoramaNew=this.dorama.addNewDorama({id:parseInt(e.mdl_id,10),slug:e.slug,name:e.title,image_url:e.image_url,type:e.type}).subscribe({next:o=>{this.gs.log("[DORAMA_CHECK_ADD_SUCCESS]",o),this.doramaCheckOrAddResponse=o.result,this.submitted=!1,this.fg.controls.dorama_id.patchValue(o.result.id),this.fg.controls.dorama_name.patchValue(o.result.name)},error:o=>{this.gs.log("[DORAMA_CHECK_ADD_ERROR]",o,"error"),this.submitted=!1,this.resetSelectedDorama(),this.fg.controls.dorama_id.patchValue(null),this.fg.controls.dorama_name.patchValue(null)}})}filterFansubSelected(e,o){this.gs.log("[FANSUB_FILTER_CLICK]",e),this.getFansubControl.controls[o].get("fansub_id").patchValue(e.id),this.getFansubControl.controls[o].get("fansub_name").patchValue(e.name)}uploadImage(e,o){this.gambar=o,this.image=null,this.imageLimitExceeded=null,this.imageErrorText=null,this.fg.controls.image.patchValue(null);const i=e.target.files[0];try{const s=new FileReader;s.readAsDataURL(i),s.onload=m=>{if(this.gs.log("[IMAGE_SELECTED]",m),i.size<=u.t.fileSizeImageLimit){const d=this.gs.document.createElement("img");d.onload=()=>{this.image=i,this.image_url=s.result.toString()},d.src=s.result.toString()}else this.image=null,this.image_url="/assets/img/form/image-error.png",this.imageLimitExceeded=u.t.fileSizeImageLimit,this.gambar.clear(e)}}catch{this.image=null,this.image_url="/assets/img/form/no-image.png",this.gambar.clear(e)}}submitImage(){this.submitted=!0,this.subsImgbb=this.imgbb.uploadImage({file:this.image}).subscribe({next:e=>{this.gs.log("[IMAGE_SUCCESS]",e),this.fg.controls.image.patchValue(e.result.url),this.submitted=!1},error:e=>{this.gs.log("[IMAGE_ERROR]",e,"error"),this.fg.controls.image.patchValue(null),this.submitted=!1,this.imageErrorText=e.result?.message||e.info}})}onSubmit(){if(this.bs.busy(),this.submitted=!0,this.fg.invalid||"uploading"===this.attachmentSelected?.status)return this.submitted=!1,void this.bs.idle();if(null===this.fg.value.attachment_id&&0===this.fg.value.download_url.lenth)return this.submitted=!1,this.uploadToast=this.toast.warning("Lampiran DDL / URL Eksternal!","Harap Mengisi Setidaknya Salah Satu ..."),void this.bs.idle();const e=[];for(const o of this.fg.value.fansub_list)e.push(o.fansub_id);this.subsBerkasCreate=this.berkas.createBerkas({image:this.fg.value.image,name:this.fg.value.name,description:this.fg.value.description,private:this.fg.value.private,r18:this.fg.value.r18,projectType_id:this.fg.value.projectType_id,anime_id:this.fg.value.anime_id,dorama_id:this.fg.value.dorama_id,fansub_id:e,download_url:this.fg.value.download_url,attachment_id:this.fg.value.attachment_id}).subscribe({next:o=>{this.gs.log("[BERKAS_CREATE_SUCCESS]",o),this.submitted=!1,this.bs.idle(),this.router.navigateByUrl("/berkas",{state:{bypassCanDeactivate:!0}})},error:o=>{this.gs.log("[BERKAS_CREATE_ERROR]",o,"error"),this.submitted=!1,this.bs.idle()}})}uploadAttachment(e,o){this.ddl=o;const i=e.target.files[0];this.attachmentLimitExceeded=null,this.attachmentErrorText=null,this.gs.log("[ATTACHMENT_SELECTED]",i),this.fg.controls.attachment_id.patchValue(null),this.uploadService.disconnect();try{i.size<=u.t.fileSizeAttachmentTotalLimit?this.uploadService.handleFiles(i):(this.attachmentLimitExceeded=u.t.fileSizeAttachmentTotalLimit,this.ddl.clear(e))}catch{this.ddl.clear(e)}}submitAttachment(e){const o=this.uploadService.state().find(i=>i.uploadId===e.uploadId);o&&(this.attachmentSelected=o,e.status="queue")}failOrCancelUpload(e=null){this.attachmentSelected=null,this.attachmentErrorText=e?.result?.message||e?.info||e?.error?.message||"Terjadi Kesalahan, Harap Reload Halaman!",this.uploadService.disconnect(),this.fg.controls.attachment_id.patchValue(null),this.uploadToast&&this.toast.remove(this.uploadToast.toastId),this.ddl.clear()}verify(){this.router.navigate(["/verify"],{queryParams:{returnUrl:this.router.url.split("?")[0]},state:{bypassCanDeactivate:!0}})}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(h.F0),t.Y36(n.QS),t.Y36(D.z),t.Y36(Q.Z),t.Y36(st.o),t.Y36(lt.X),t.Y36(ct.Y),t.Y36(X.T),t.Y36(mt.A),t.Y36(G.X),t.Y36(tt.k),t.Y36(k.U),t.Y36(j.e),t.Y36(ut.Lz),t.Y36(L.x))},a.\u0275cmp=t.Xpm({type:a,selectors:[["app-berkas-create"]],decls:5,vars:1,consts:[[1,"container"],[1,"row","px-3"],[1,"col-12"],[3,"formGroup","submit",4,"ngIf"],[3,"formGroup","submit"],[1,"row","mt-3","mb-3"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"float-end","text-decoration-none","text-warning",2,"font-size","small","cursor","pointer",3,"click"],[1,"text-bifeldy"],[1,"row"],[1,"col-12","col-md-5","col-xl-4","p-3"],["class","col-12",4,"ngIf"],["class","col-12 mb-4",4,"ngIf"],["class","col-12 p-3",4,"ngIf"],[1,"col-12","p-3"],["formControlName","r18","matTooltip","Konten Eksplisit"],["appearance","outline",1,"px-3","pt-3","col-12",3,"color"],["formControlName","projectType_id","placeholder","Anime / Drama","required",""],[3,"value",4,"ngFor","ngForOf"],[4,"ngIf"],["appearance","outline","class","p-3 w-100",3,"color",4,"ngIf"],["formArrayName","fansub_list","matTooltip","Silahkan Buat Terlebih Dahulu Jika Tidak Ada"],[4,"ngFor","ngForOf"],[1,"col","px-3"],["type","button","mat-raised-button","","color","primary",1,"w-100",3,"disabled","click"],["fontIcon","add",1,"me-1"],["routerLink","/create/fansub",1,"text-warning","text-decoration-none"],[1,"col-12","col-md-7","col-xl-8","pt-3"],["appearance","outline",1,"p-3","col-12",3,"color"],["matInput","","formControlName","name","placeholder","[Fansub] Judul Anime - 00 [BD 4K x265 FLAC][CRC32].mkv","required",""],["fontIcon","wysiwyg","matSuffix",""],["class","p-3 w-100","formControlName","description",3,"config",4,"ngIf"],[4,"ngIf","ngIfThen","ngIfElse"],["ddlVerified",""],["ddlNotVerified",""],["formArrayName","download_url"],[1,"row","mb-4"],[1,"col-12","py-3"],[1,"row","gy-3"],[1,"col","g-0"],[1,"col-12","col-md-3"],["mat-stroked-button","","routerLink","/berkas",1,"w-100",3,"disabled"],["fontIcon","undo",1,"me-1"],["type","submit","mat-flat-button","","color","accent",1,"w-100",3,"disabled"],["fontIcon","save",1,"ms-1"],[1,"w-100","border",3,"src"],["appearance","outline",1,"pt-3","w-100",3,"color"],[1,"w-100",3,"disabled","accept","change"],["gambar",""],["fontIcon","image","matSuffix",""],[1,"px-3","w-100"],[1,"col-12","mb-4"],["fontIcon","add_photo_alternate",1,"me-1"],["formControlName","private","matTooltip","Hanya Dapat Di Akses Melalui URL"],[3,"value"],["appearance","outline",1,"p-3","w-100",3,"color"],["matInput","","formControlName","anime_id","placeholder","Full Metal Alchemist",3,"matAutocomplete","keyup"],["fontIcon","short_text","matSuffix",""],["autoCompleteAnime","matAutocomplete"],["class","is-loading",4,"ngIf"],["class","text-warning",4,"ngIf"],[1,"is-loading"],["mode","indeterminate"],["class","px-1",3,"value","click",4,"ngFor","ngForOf"],[1,"px-1",3,"value","click"],[1,"me-1",2,"height","40px","width","30px","object-fit","cover",3,"src"],[1,"ms-1"],[1,"text-warning"],["matInput","","formControlName","dorama_id","placeholder","Flying Colors",3,"matAutocomplete","keyup"],["autoCompleteDorama","matAutocomplete"],[1,"row",3,"formGroupName"],["appearance","outline",1,"px-3","pt-3","w-100",3,"color"],["matInput","","formControlName","fansub_id","placeholder","NamaFansub","required","",3,"matAutocomplete","keyup"],["fontIcon","short_text","matSuffix","",4,"ngIf"],["type","button","mat-button","","matSuffix","","mat-icon-button","",3,"click",4,"ngIf"],["autoCompleteFansub","matAutocomplete"],["type","button","mat-button","","matSuffix","","mat-icon-button","",3,"click"],["fontIcon","close"],[1,"me-1",2,"height","40px","width","40px","object-fit","cover",3,"src"],["formControlName","description",1,"p-3","w-100",3,"config"],[1,"col-12","px-3"],[1,"text-success"],["appearance","outline",1,"px-3","pt-3","col",3,"color"],["uploadx","",1,"w-100",3,"disabled","accept","change"],["ddl",""],["fontIcon","attach_file","matSuffix",""],[1,"px-4","w-100"],["class","row mb-4",4,"ngFor","ngForOf"],[1,"col"],[1,"ps-3"],[3,"mode","value"],[1,"col-6","col-lg-4","px-3"],["fontIcon","attachment",1,"me-1"],["type","button","mat-stroked-button","","color","accent",1,"w-100",3,"click"],["fontIcon","enhanced_encryption",1,"me-1"],["matTooltip","Silahkan Isi Alamat Website Kamu Jika Ingin Mendapatkan Traffic Pengunjung",1,"row",3,"formGroupName"],["class","col-12 px-3",4,"ngIf"],["appearance","outline",1,"px-3","pt-3","col-12","col-md-5",3,"color"],["matInput","","formControlName","name","placeholder","Google Drive","required",""],["fontIcon","web","matSuffix","",4,"ngIf"],["appearance","outline",1,"px-3","pt-3","col-12","col-md-7",3,"color"],["matInput","","formControlName","url","placeholder","https://webshit.saya.com/01/02/halaman-post-download.html","required",""],["fontIcon","link","matSuffix","",4,"ngIf"],["fontIcon","web","matSuffix",""],["fontIcon","link","matSuffix",""]],template:function(e,o){1&e&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1)(3,"div",2),t.YNc(4,ce,86,24,"form",3),t.qZA()()()),2&e&&(t.xp6(4),t.Q6J("ngIf",o.fg))},dependencies:[c.sg,c.O5,h.yS,et.XC,et.ZL,at.ey,I.lW,I.zs,dt.d,R.Hw,g.TO,g.KE,g.hX,g.R9,O.Nt,_t.pW,it.gD,ot.Rr,P.gM,n._Y,n.Fj,n.JJ,n.JL,n.Q7,n.sg,n.u,n.x0,n.CE,T.Yh,Y.t,C.s6,c.Ov,V.$]}),a})();var v=l(7331),z=l(9602);function ue(a,r){if(1&a&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&a){const e=t.oxw(3);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.imageLimitExceeded)," !")}}function de(a,r){if(1&a&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&a){const e=t.oxw(3);t.xp6(1),t.Oqu(e.imageErrorText)}}function _e(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"div",6)(1,"button",66),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(3);return t.KtG(i.submitImage())}),t._UZ(2,"mat-icon",67),t._uU(3," Unggah "),t.qZA()()}if(2&a){const e=t.oxw(3);t.xp6(1),t.Q6J("disabled",e.submitted)}}function pe(a,r){if(1&a&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&a){const e=t.oxw(3);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.coverLimitExceeded)," !")}}function ge(a,r){if(1&a&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&a){const e=t.oxw(3);t.xp6(1),t.Oqu(e.coverErrorText)}}function fe(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"div",68)(1,"button",66),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(3);return t.KtG(i.submitCover())}),t._UZ(2,"mat-icon",67),t._uU(3," Unggah "),t.qZA()()}if(2&a){const e=t.oxw(3);t.xp6(1),t.Q6J("disabled",e.submitted)}}function he(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Nama Fansub Tidak Boleh Kosong"),t.qZA())}function be(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Nama Fansub Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function ve(a,r){if(1&a&&(t.TgZ(0,"small",69)(1,"div"),t._uU(2),t.qZA()()),2&a){const e=t.oxw(3);t.xp6(2),t.Oqu(e.slugInfo)}}function xe(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Singkatan Tidak Boleh Kosong"),t.qZA())}function Ce(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Singkatan Hanya Boleh Huruf Dan \u4e00"),t.qZA())}function Te(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Tanggal Harus Diisi Secara Valid"),t.qZA())}function Ze(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Tanggal Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function Ae(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Mohon Pilih Salah Satu"),t.qZA())}function Ie(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Status Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function ke(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"mat-chip",70),t.NdJ("removed",function(){const s=t.CHM(e).$implicit,m=t.oxw(3);return t.KtG(m.removeTag(s))}),t._uU(1),t._UZ(2,"mat-icon",71),t.qZA()}if(2&a){const e=r.$implicit;t.Q6J("removable",!0),t.xp6(1),t.hij(" ",e," ")}}function Ue(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Website Tidak Boleh Kosong"),t.qZA())}function Ee(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Website Link Tidak Valid"),t.qZA())}function Se(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Facebook Link Tidak Valid"),t.qZA())}function Ne(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Discord Link Tidak Valid"),t.qZA())}function ye(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Twitter Link Tidak Valid"),t.qZA())}function Je(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"RSS Link Tidak Valid"),t.qZA())}function we(a,r){if(1&a&&(t.TgZ(0,"div",13)(1,"mat-form-field",44)(2,"mat-label"),t._uU(3,"URI / URL RSS v2.0 Feed"),t.qZA(),t._UZ(4,"input",72)(5,"mat-icon",73),t.TgZ(6,"mat-error"),t.YNc(7,Je,2,0,"div",21),t.qZA()()()),2&a){const e=t.oxw(3);t.xp6(1),t.Q6J("color","accent"),t.xp6(6),t.Q6J("ngIf",e.fg.get("rss_feed").hasError("pattern"))}}function Be(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"form",8),t.NdJ("submit",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.onSubmit())}),t.TgZ(1,"div",9)(2,"div",10)(3,"h2",11)(4,"b",12),t._uU(5,"Tambah Data Fansub Baru"),t.qZA()()(),t.TgZ(6,"div",6)(7,"div",13)(8,"div",14)(9,"div",13)(10,"div",6),t._UZ(11,"img",15),t.TgZ(12,"mat-form-field",16)(13,"mat-label"),t._uU(14,"Foto"),t.qZA(),t.TgZ(15,"ngx-mat-file-input",17,18),t.NdJ("change",function(i){t.CHM(e);const s=t.MAs(16),m=t.oxw(2);return t.KtG(m.uploadImage(i,s))}),t.qZA(),t._UZ(17,"mat-icon",19),t.qZA(),t.TgZ(18,"mat-error",20)(19,"small"),t.YNc(20,ue,3,3,"div",21),t.YNc(21,de,2,1,"div",21),t.qZA()()(),t.YNc(22,_e,4,1,"div",22),t.qZA()(),t.TgZ(23,"div",23)(24,"div",13)(25,"mat-form-field",24)(26,"mat-label"),t._uU(27,"Cover"),t.qZA(),t.TgZ(28,"ngx-mat-file-input",17,25),t.NdJ("change",function(i){t.CHM(e);const s=t.MAs(29),m=t.oxw(2);return t.KtG(m.uploadCover(i,s))}),t.qZA(),t._UZ(30,"mat-icon",19),t.qZA(),t.TgZ(31,"mat-error",20)(32,"small"),t.YNc(33,pe,3,3,"div",21),t.YNc(34,ge,2,1,"div",21),t.qZA()(),t.YNc(35,fe,4,1,"div",26),t.TgZ(36,"mat-form-field",27)(37,"mat-label"),t._uU(38,"Nama Fansub"),t.qZA(),t._UZ(39,"input",28)(40,"mat-icon",29),t.TgZ(41,"mat-error"),t.YNc(42,he,2,0,"div",21),t.YNc(43,be,2,0,"div",21),t.qZA()(),t.TgZ(44,"mat-form-field",30)(45,"mat-label"),t._uU(46,"Singkatan"),t.qZA(),t._UZ(47,"input",31)(48,"mat-icon",32),t.YNc(49,ve,3,1,"small",33),t.TgZ(50,"mat-error"),t.YNc(51,xe,2,0,"div",21),t.YNc(52,Ce,2,0,"div",21),t.qZA()(),t._UZ(53,"angular-editor",34),t.TgZ(54,"mat-form-field",35)(55,"mat-label"),t._uU(56,"Mulai Ada Sejak"),t.qZA(),t.TgZ(57,"input",36),t.NdJ("focus",function(){t.CHM(e);const i=t.MAs(61);return t.KtG(i.open())}),t.ALo(58,"date"),t.qZA(),t._UZ(59,"mat-datepicker-toggle",37)(60,"mat-datepicker",38,39),t.TgZ(62,"mat-error"),t.YNc(63,Te,2,0,"div",21),t.YNc(64,Ze,2,0,"div",21),t.qZA()(),t.TgZ(65,"mat-form-field",35)(66,"mat-label"),t._uU(67,"Status"),t.qZA(),t.TgZ(68,"mat-select",40)(69,"mat-option",41),t._uU(70,"Tidak Aktif"),t.qZA(),t.TgZ(71,"mat-option",42),t._uU(72,"Aktif"),t.qZA()(),t.TgZ(73,"mat-hint",43),t._uU(74,"Status Kehidupan Fansub Saat Ini"),t.qZA(),t.TgZ(75,"mat-error"),t.YNc(76,Ae,2,0,"div",21),t.YNc(77,Ie,2,0,"div",21),t.qZA()()()()(),t.TgZ(78,"div",13)(79,"div",6)(80,"div",13)(81,"mat-form-field",44)(82,"mat-label"),t._uU(83,"Tags & Kategori"),t.qZA(),t.TgZ(84,"mat-chip-list",null,45),t.YNc(86,ke,3,2,"mat-chip",46),t.TgZ(87,"input",47),t.NdJ("matChipInputTokenEnd",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s.addTag(i))}),t.qZA(),t._UZ(88,"mat-icon",48),t.qZA(),t.TgZ(89,"mat-hint",43),t._uU(90,"Isi Dengan Bebas, Pisahkan Dengan Koma"),t.qZA()()()()(),t.TgZ(91,"div",13)(92,"div",6)(93,"div",13)(94,"mat-form-field",49)(95,"mat-label"),t._uU(96,"Tautan Website"),t.qZA(),t._UZ(97,"input",50)(98,"mat-icon",51),t.TgZ(99,"mat-error"),t.YNc(100,Ue,2,0,"div",21),t.YNc(101,Ee,2,0,"div",21),t.qZA()(),t.TgZ(102,"mat-form-field",49)(103,"mat-label"),t._uU(104,"Facebook Fanpage"),t.qZA(),t._UZ(105,"input",52)(106,"mat-icon",53),t.TgZ(107,"mat-error"),t.YNc(108,Se,2,0,"div",21),t.qZA()(),t.TgZ(109,"mat-form-field",49)(110,"mat-label"),t._uU(111,"Tautan Discord"),t.qZA(),t._UZ(112,"input",54),t.TgZ(113,"mat-icon",55),t._UZ(114,"img",56),t.qZA(),t.TgZ(115,"mat-error"),t.YNc(116,Ne,2,0,"div",21),t.qZA()(),t.TgZ(117,"mat-form-field",49)(118,"mat-label"),t._uU(119,"Cuitan Twitter"),t.qZA(),t._UZ(120,"input",57),t.TgZ(121,"mat-icon",55),t._UZ(122,"img",56),t.qZA(),t.TgZ(123,"mat-error"),t.YNc(124,ye,2,0,"div",21),t.qZA()()()()(),t.YNc(125,we,8,2,"div",58),t.TgZ(126,"div",13)(127,"div",6)(128,"div",59),t._UZ(129,"div",60),t.TgZ(130,"div",61)(131,"a",62),t._UZ(132,"mat-icon",63),t._uU(133," Batal "),t.qZA()(),t.TgZ(134,"div",61)(135,"button",64),t._uU(136," Simpan "),t._UZ(137,"mat-icon",65),t.qZA()()()()()()()()}if(2&a){const e=t.MAs(61),o=t.MAs(85),i=t.oxw(2);t.Q6J("formGroup",i.fg),t.xp6(11),t.Q6J("src",i.image_url,t.LSH),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("disabled",i.fg.value.image)("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(5),t.Q6J("ngIf",i.imageLimitExceeded),t.xp6(1),t.Q6J("ngIf",i.imageErrorText),t.xp6(1),t.Q6J("ngIf",i.image&&!i.fg.value.image),t.xp6(3),t.Q6J("color","accent"),t.xp6(3),t.Q6J("disabled",i.fg.value.cover)("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(5),t.Q6J("ngIf",i.coverLimitExceeded),t.xp6(1),t.Q6J("ngIf",i.coverErrorText),t.xp6(1),t.Q6J("ngIf",i.cover&&!i.fg.value.cover),t.xp6(1),t.Q6J("color","accent"),t.xp6(6),t.Q6J("ngIf",i.fg.get("name").hasError("required")),t.xp6(1),t.Q6J("ngIf",i.fg.get("name").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(5),t.Q6J("ngIf",i.slugInfo),t.xp6(2),t.Q6J("ngIf",i.fg.get("slug").hasError("required")),t.xp6(1),t.Q6J("ngIf",i.fg.get("slug").hasError("pattern")),t.xp6(1),t.Q6J("config",i.GS.angularEditorConfig),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.s9C("placeholder",t.xi3(58,50,i.currentDate,"d MMMM y")),t.Q6J("matDatepicker",e),t.xp6(2),t.Q6J("for",e),t.xp6(4),t.Q6J("ngIf",i.fg.get("born").hasError("required")||i.fg.get("born").hasError("matDatepickerParse")),t.xp6(1),t.Q6J("ngIf",i.fg.get("born").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(11),t.Q6J("ngIf",i.fg.get("active").hasError("required")),t.xp6(1),t.Q6J("ngIf",i.fg.get("active").hasError("pattern")),t.xp6(4),t.Q6J("color","accent"),t.xp6(5),t.Q6J("ngForOf",i.fg.value.tags),t.xp6(1),t.Q6J("matChipInputSeparatorKeyCodes",i.GS.separatorKeysCodes)("matChipInputFor",o)("matChipInputAddOnBlur",!0),t.xp6(7),t.Q6J("color","accent"),t.xp6(6),t.Q6J("ngIf",i.fg.get("web").hasError("required")),t.xp6(1),t.Q6J("ngIf",i.fg.get("web").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(6),t.Q6J("ngIf",i.fg.get("facebook").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(5),t.MGl("src","/assets/img/discord/",i.GS.isDarkMode?"white":"black",".png",t.LSH),t.xp6(2),t.Q6J("ngIf",i.fg.get("discord").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(5),t.MGl("src","/assets/img/twitter/",i.GS.isDarkMode?"white":"black",".png",t.LSH),t.xp6(2),t.Q6J("ngIf",i.fg.get("twitter").hasError("pattern")),t.xp6(1),t.Q6J("ngIf",i.rssFeedAllowed),t.xp6(6),t.Q6J("disabled",i.submitted),t.xp6(4),t.Q6J("disabled",i.submitted||i.fg.invalid)}}function qe(a,r){if(1&a&&(t.TgZ(0,"div",1),t._UZ(1,"div",2)(2,"div",3)(3,"div",4)(4,"app-notifications"),t.TgZ(5,"div",5)(6,"div",6),t.YNc(7,Be,138,53,"form",7),t.qZA()()()),2&a){const e=t.oxw();t.xp6(1),t.Udp("background-image","url("+e.cover_url+")"),t.xp6(6),t.Q6J("ngIf",e.fg)}}let Fe=(()=>{class a{constructor(e,o,i,s,m,d,f,U,B,W){this.fb=e,this.router=o,this.as=i,this.bs=s,this.pi=m,this.imgbb=d,this.fansub=f,this.toast=U,this.gs=B,this.ds=W,this.submitted=!1,this.image=null,this.imageLimitExceeded=null,this.imageErrorText=null,this.image_url="/assets/img/form/no-image.png",this.cover=null,this.coverLimitExceeded=null,this.coverErrorText=null,this.cover_url="/assets/img/form/no-image.png",this.urls=[],this.currentDate=new Date,this.gambar=null,this.gambar_=null,this.subsImgbb=null,this.subsFansub=null,this.subsCekFansubSlug=null,this.slugInfo="",this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get GS(){return this.gs}get rssFeedAllowed(){return this.as.currentUserSubject?.value?.role===x.yS.ADMIN||this.as.currentUserSubject?.value?.role===x.yS.MODERATOR||this.as.currentUserSubject?.value?.role===x.yS.FANSUBBER}ngOnDestroy(){this.subsImgbb?.unsubscribe(),this.subsFansub?.unsubscribe()}ngOnInit(){this.pi.updatePageMetaData("Fansub - Buat Baru","Halaman Menambahkan Fansub Baru","Create Fansub"),this.gs.isBrowser&&this.initForm()}canDeactivate(){var e=this;return(0,A.Z)(function*(){const o=yield e.ds.leavePageDialog();return yield q(o)})()}initForm(){this.fg=this.fb.group({name:[null,n.kI.compose([n.kI.required,n.kI.pattern(u.t.regexEnglishKeyboardKeys)])],description:[null,n.kI.compose([n.kI.required,n.kI.pattern(u.t.regexEnglishKeyboardKeys)])],born:[null,n.kI.compose([n.kI.required,n.kI.pattern(u.t.regexEnglishKeyboardKeys)])],active:[null,n.kI.compose([n.kI.required,n.kI.pattern(u.t.regexEnglishKeyboardKeys)])],slug:[null,n.kI.compose([n.kI.required,n.kI.pattern(/^[0-9a-zA-Z-]*$/)])],tags:[[],n.kI.compose([])],image:[null,n.kI.compose([n.kI.pattern(u.t.regexUrl)])],cover:[null,n.kI.compose([n.kI.pattern(u.t.regexUrl)])],web:[null,n.kI.compose([n.kI.pattern(u.t.regexUrl)])],facebook:[null,n.kI.compose([n.kI.pattern(u.t.regexUrl)])],discord:[null,n.kI.compose([n.kI.pattern(u.t.regexUrl)])],twitter:[null,n.kI.compose([n.kI.pattern(u.t.regexUrl)])],rss_feed:[null,n.kI.compose([n.kI.pattern(u.t.regexUrl)])]}),this.subsCekFansubSlug=this.fg.get("slug").valueChanges.pipe((0,y.b)(500),(0,J.x)(),(0,F.b)(()=>this.slugInfo="Mengecek ..."),(0,M.w)(e=>this.fansub.cekSlug({slug:e})),(0,w.X)(-1)).subscribe({next:e=>{this.gs.log("[FANSUB_CEK_SLUG_RESULT]",e),this.slugInfo=e.result.message}})}addTag(e){const o=e.input,i=e.value;(i||"").trim()&&this.fg.value.tags.push(i.trim()),o&&(o.value=""),this.fg.controls.tags.patchValue(this.fg.value.tags.filter((s,m,d)=>d.findIndex(f=>f===s)===m))}removeTag(e){const o=this.fg.value.tags.indexOf(e);o>=0&&this.fg.value.tags.splice(o,1)}uploadImage(e,o){this.gambar=o,this.image=null,this.imageLimitExceeded=null,this.imageErrorText=null,this.fg.controls.image.patchValue(null);const i=e.target.files[0];try{const s=new FileReader;s.readAsDataURL(i),s.onload=m=>{if(this.gs.log("[IMAGE_SELECTED]",m),i.size<=u.t.fileSizeImageLimit){const d=this.gs.document.createElement("img");d.onload=()=>{this.image=i,this.image_url=s.result.toString()},d.src=s.result.toString()}else this.image=null,this.image_url="/assets/img/form/image-error.png",this.imageLimitExceeded=u.t.fileSizeImageLimit,this.gambar.clear(e)}}catch{this.image=null,this.image_url="/assets/img/form/no-image.png",this.gambar.clear(e)}}submitImage(){this.submitted=!0,this.subsImgbb=this.imgbb.uploadImage({file:this.image}).subscribe({next:e=>{this.gs.log("[IMAGE_SUCCESS]",e),this.fg.controls.image.patchValue(e.result.url),this.submitted=!1},error:e=>{this.gs.log("[IMAGE_ERROR]",e,"error"),this.fg.controls.image.patchValue(null),this.submitted=!1,this.imageErrorText=e.result?.message||e.info}})}uploadCover(e,o){this.gambar_=o,this.cover=null,this.coverLimitExceeded=null,this.coverErrorText=null,this.fg.controls.cover.patchValue(null);const i=e.target.files[0];try{const s=new FileReader;s.readAsDataURL(i),s.onload=m=>{if(this.gs.log("[COVER_SELECTED]",m),i.size<=u.t.fileSizeImageLimit){const d=this.gs.document.createElement("img");d.onload=()=>{this.cover=i,this.cover_url=s.result.toString()},d.src=s.result.toString()}else this.cover=null,this.cover_url="/assets/img/form/image-error.png",this.coverLimitExceeded=u.t.fileSizeImageLimit,this.gambar_.clear(e)}}catch{this.cover=null,this.cover_url="/assets/img/form/no-image.png",this.gambar_.clear(e)}}submitCover(){this.submitted=!0,this.subsImgbb=this.imgbb.uploadImage({file:this.cover}).subscribe({next:e=>{this.gs.log("[COVER_SUCCESS]",e),this.fg.controls.cover.patchValue(e.result.url),this.submitted=!1},error:e=>{this.gs.log("[COVER_ERROR]",e,"error"),this.fg.controls.cover.patchValue(null),this.submitted=!1,this.coverErrorText=e.result?.message||e.info}})}onSubmit(){this.bs.busy();const e=[];if(this.fg.value.web&&e.push({name:"web",url:this.fg.value.web}),this.fg.value.facebook&&e.push({name:"facebook",url:this.fg.value.facebook}),this.fg.value.discord&&e.push({name:"discord",url:this.fg.value.discord}),this.fg.value.twitter&&e.push({name:"twitter",url:this.fg.value.twitter}),this.submitted=!0,this.fg.invalid||0===e.length)return 0===e.length&&this.toast.warning("Harap Isi Salah Satu URL","Form Tidak lengkap (Web/FB/DC)",null,!0),this.submitted=!1,void this.bs.idle();this.subsFansub=this.fansub.createFansub({image:this.fg.value.image,cover:this.fg.value.cover,name:this.fg.value.name,description:this.fg.value.description,born:this.fg.value.born.getTime(),active:this.fg.value.active,tags:this.fg.value.tags,slug:this.fg.value.slug,urls:e,rss_feed:this.fg.value.rss_feed}).subscribe({next:o=>{this.gs.log("[FANSUB_CREATE_SUCCESS]",o),this.submitted=!1,this.bs.idle(),this.router.navigateByUrl("/fansub",{state:{bypassCanDeactivate:!0}})},error:o=>{this.gs.log("[FANSUB_CREATE_ERROR]",o,"error"),this.submitted=!1,this.bs.idle()}})}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(n.QS),t.Y36(h.F0),t.Y36(j.e),t.Y36(D.z),t.Y36(Q.Z),t.Y36(G.X),t.Y36(X.T),t.Y36(tt.k),t.Y36(k.U),t.Y36(L.x))},a.\u0275cmp=t.Xpm({type:a,selectors:[["app-fansub-create"]],decls:1,vars:1,consts:[["class","container",4,"ngIf"],[1,"container"],[1,"fansub-banner","fansub-banner-1","align-items-center"],[1,"fansub-banner","fansub-banner-2","align-items-center"],[2,"padding-top","160px"],[1,"row","px-3"],[1,"col-12"],[3,"formGroup","submit",4,"ngIf"],[3,"formGroup","submit"],[1,"row","mt-3","mb-3"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"row"],[1,"col-12","col-md-5","col-xl-4","p-3"],[1,"w-100","border",3,"src"],["appearance","outline",1,"pt-3","w-100",3,"color"],[1,"w-100",3,"disabled","accept","change"],["gambar",""],["fontIcon","image","matSuffix",""],[1,"px-3","w-100"],[4,"ngIf"],["class","col-12",4,"ngIf"],[1,"col-12","col-md-7","col-xl-8","pt-3"],["appearance","outline",1,"px-3","pt-3","w-100",3,"color"],["gambar_",""],["class","col-12 p-3",4,"ngIf"],["appearance","outline",1,"p-3","col-12","col-md-7",3,"color"],["matInput","","formControlName","name","placeholder","Fansub Jalanan","required",""],["fontIcon","wysiwyg","matSuffix",""],["appearance","outline","matTooltip","Digunakan Juga Untuk Sub-Domain",1,"p-3","col-12","col-md-5",3,"color"],["matInput","","formControlName","slug","placeholder","Jalsub","required",""],["fontIcon","short_text","matSuffix",""],["class","text-info",4,"ngIf"],["formControlName","description","required","",1,"p-3","w-100",3,"config"],["appearance","outline",1,"p-3","col-12","col-md-6",3,"color"],["matInput","","formControlName","born","required","",3,"matDatepicker","placeholder","focus"],["matSuffix","",3,"for"],["disabled","false"],["kalender",""],["formControlName","active","placeholder","Aktif / Non-Aktif","required",""],["value","0"],["value","1"],["align","end"],["appearance","outline",1,"p-3","col-12",3,"color"],["tag",""],["color","accent","selected","",3,"removable","removed",4,"ngFor","ngForOf"],["placeholder","Label Tag / Kategori",3,"matChipInputSeparatorKeyCodes","matChipInputFor","matChipInputAddOnBlur","matChipInputTokenEnd"],["fontIcon","loyalty","matSuffix",""],["appearance","outline",1,"p-3","col-12","col-md-3",3,"color"],["matInput","","formControlName","web","placeholder","http://www.domain.id"],["fontIcon","web","matSuffix",""],["matInput","","formControlName","facebook","placeholder","http://www.facebook.com"],["fontIcon","facebook","matSuffix",""],["matInput","","formControlName","discord","placeholder","http://www.discord.gg"],["matSuffix",""],["width","24px",2,"vertical-align","baseline",3,"src"],["matInput","","formControlName","twitter","placeholder","http://www.twitter.com"],["class","row",4,"ngIf"],[1,"row","gy-3"],[1,"col","g-0"],[1,"col-12","col-md-3"],["mat-stroked-button","","routerLink","/fansub",1,"w-100",3,"disabled"],["fontIcon","undo",1,"me-1"],["type","submit","mat-flat-button","","color","accent",1,"w-100",3,"disabled"],["fontIcon","save",1,"ms-1"],["type","button","mat-raised-button","","color","primary",1,"w-100",3,"disabled","click"],["fontIcon","add_photo_alternate",1,"me-1"],[1,"col-12","p-3"],[1,"text-info"],["color","accent","selected","",3,"removable","removed"],["fontIcon","cancel","matChipRemove",""],["matInput","","formControlName","rss_feed","placeholder","http://my-site.blogspot.com/feeds/posts/default?alt=rss"],["fontIcon","rss_feed","matSuffix",""]],template:function(e,o){1&e&&t.YNc(0,qe,8,3,"div",0),2&e&&t.Q6J("ngIf",o.fg)},dependencies:[c.sg,c.O5,h.yS,at.ey,I.lW,I.zs,v.qn,v.HS,v.oH,v.qH,z.Mq,z.hl,z.nW,R.Hw,g.TO,g.KE,g.bx,g.hX,g.R9,O.Nt,it.gD,P.gM,n._Y,n.Fj,n.JJ,n.JL,n.Q7,n.sg,n.u,T.Yh,Y.t,C.s6,c.uU,V.$],styles:[".fansub-banner[_ngcontent-%COMP%]{height:128px;width:100%;background-size:cover;background-position:center;background-repeat:no-repeat;filter:blur(5px) brightness(100%);opacity:.5}.fansub-banner-1[_ngcontent-%COMP%]{position:absolute;top:0;left:0}.fansub-banner-2[_ngcontent-%COMP%]{position:absolute;top:128px;left:0}.fansub-info[_ngcontent-%COMP%]{position:relative;height:256px;z-index:1}"]}),a})();var nt=l(5934),Me=l(7358);function De(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"mat-chip",34),t.NdJ("removed",function(){const s=t.CHM(e).$implicit,m=t.oxw(2);return t.KtG(m.removeTo(s))}),t._uU(1),t._UZ(2,"mat-icon",35),t.qZA()}if(2&a){const e=r.$implicit;t.Q6J("removable",!0),t.xp6(1),t.hij(" ",e," ")}}function Qe(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Alamat Surel Tidak Boleh Kosong"),t.qZA())}function Le(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Alamat Surel Tidak Valid"),t.qZA())}function Re(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"mat-chip",34),t.NdJ("removed",function(){const s=t.CHM(e).$implicit,m=t.oxw(2);return t.KtG(m.removeCc(s))}),t._uU(1),t._UZ(2,"mat-icon",35),t.qZA()}if(2&a){const e=r.$implicit;t.Q6J("removable",!0),t.xp6(1),t.hij(" ",e," ")}}function Oe(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Alamat Surel Tidak Valid"),t.qZA())}function Ye(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"mat-chip",34),t.NdJ("removed",function(){const s=t.CHM(e).$implicit,m=t.oxw(2);return t.KtG(m.removeBcc(s))}),t._uU(1),t._UZ(2,"mat-icon",35),t.qZA()}if(2&a){const e=r.$implicit;t.Q6J("removable",!0),t.xp6(1),t.hij(" ",e," ")}}function Ke(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Alamat Surel Tidak Valid"),t.qZA())}function He(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"div",36)(1,"mat-slide-toggle",37),t.NdJ("change",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s.noReplyMode(i))}),t._uU(2),t.qZA()()}if(2&a){const e=t.oxw(2);t.xp6(1),t.MGl("matTooltip","Kirim sebagai noreply@",e.ENV.domain,""),t.xp6(1),t.hij(" Kirim sebagai noreply@",e.ENV.domain," ")}}function Ge(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Judul Pesan Tidak Boleh Kosong"),t.qZA())}function je(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Judul Pesan Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function Pe(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"form",4),t.NdJ("submit",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.onSubmit())}),t.TgZ(1,"div",5)(2,"div",6)(3,"h2",7)(4,"b",8),t._uU(5,"Buat Email Baru & Kirim"),t.qZA()()(),t.TgZ(6,"div",2)(7,"div",9)(8,"div",10)(9,"div",9)(10,"mat-form-field",11)(11,"mat-label"),t._uU(12,"Penerima"),t.qZA(),t.TgZ(13,"mat-chip-list",null,12),t.YNc(15,De,3,2,"mat-chip",13),t.qZA(),t.TgZ(16,"input",14),t.NdJ("matChipInputTokenEnd",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.addTo(i))}),t.qZA(),t._UZ(17,"mat-icon",15),t.TgZ(18,"mat-hint",16)(19,"mat-error"),t.YNc(20,Qe,2,0,"div",17),t.YNc(21,Le,2,0,"div",17),t.qZA()()(),t.TgZ(22,"mat-form-field",11)(23,"mat-label"),t._uU(24,"Carbon Copy"),t.qZA(),t.TgZ(25,"mat-chip-list",null,18),t.YNc(27,Re,3,2,"mat-chip",13),t.qZA(),t.TgZ(28,"input",19),t.NdJ("matChipInputTokenEnd",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.addCc(i))}),t.qZA(),t._UZ(29,"mat-icon",15),t.TgZ(30,"mat-hint",16)(31,"mat-error"),t.YNc(32,Oe,2,0,"div",17),t.qZA()()(),t.TgZ(33,"mat-form-field",11)(34,"mat-label"),t._uU(35,"Blind Carbon Copy"),t.qZA(),t.TgZ(36,"mat-chip-list",null,20),t.YNc(38,Ye,3,2,"mat-chip",13),t.qZA(),t.TgZ(39,"input",19),t.NdJ("matChipInputTokenEnd",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.addBcc(i))}),t.qZA(),t._UZ(40,"mat-icon",15),t.TgZ(41,"mat-hint",16)(42,"mat-error"),t.YNc(43,Ke,2,0,"div",17),t.qZA()()(),t.YNc(44,He,3,2,"div",21),t.qZA()(),t.TgZ(45,"div",22)(46,"div",9)(47,"mat-form-field",23)(48,"mat-label"),t._uU(49,"Judul"),t.qZA(),t._UZ(50,"input",24)(51,"mat-icon",25),t.TgZ(52,"mat-error"),t.YNc(53,Ge,2,0,"div",17),t.YNc(54,je,2,0,"div",17),t.qZA()(),t._UZ(55,"angular-editor",26),t.qZA()()(),t.TgZ(56,"div",9)(57,"div",2)(58,"div",27),t._UZ(59,"div",28),t.TgZ(60,"div",29)(61,"a",30),t._UZ(62,"mat-icon",31),t._uU(63," Batal "),t.qZA()(),t.TgZ(64,"div",29)(65,"button",32),t._uU(66," Simpan "),t._UZ(67,"mat-icon",33),t.qZA()()()()()()()()}if(2&a){const e=t.MAs(14),o=t.MAs(26),i=t.MAs(37),s=t.oxw();t.Q6J("formGroup",s.fg),t.xp6(10),t.Q6J("color","accent"),t.xp6(5),t.Q6J("ngForOf",s.fg.value.to),t.xp6(1),t.Q6J("matChipInputSeparatorKeyCodes",s.GS.separatorKeysCodes)("matChipInputFor",e)("matChipInputAddOnBlur",!0),t.xp6(4),t.Q6J("ngIf",s.fg.get("to").hasError("required")),t.xp6(1),t.Q6J("ngIf",s.fg.get("to").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(5),t.Q6J("ngForOf",s.fg.value.cc),t.xp6(1),t.Q6J("matChipInputSeparatorKeyCodes",s.GS.separatorKeysCodes)("matChipInputFor",o)("matChipInputAddOnBlur",!0),t.xp6(4),t.Q6J("ngIf",s.fg.get("cc").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(5),t.Q6J("ngForOf",s.fg.value.bcc),t.xp6(1),t.Q6J("matChipInputSeparatorKeyCodes",s.GS.separatorKeysCodes)("matChipInputFor",i)("matChipInputAddOnBlur",!0),t.xp6(4),t.Q6J("ngIf",s.fg.get("bcc").hasError("pattern")),t.xp6(1),t.Q6J("ngIf",s.canSendAsNoReply),t.xp6(3),t.Q6J("color","accent"),t.xp6(6),t.Q6J("ngIf",s.fg.get("subject").hasError("required")),t.xp6(1),t.Q6J("ngIf",s.fg.get("subject").hasError("pattern")),t.xp6(1),t.Q6J("config",s.GS.angularEditorConfig),t.xp6(6),t.Q6J("disabled",s.submitted),t.xp6(4),t.Q6J("disabled",s.submitted||s.fg.invalid)}}let Ve=(()=>{class a{constructor(e,o,i,s,m,d,f,U,B){this.activatedRoute=e,this.fb=o,this.router=i,this.bs=s,this.pi=m,this.gs=d,this.as=f,this.ms=U,this.ds=B,this.submitted=!1,this.subsMail=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get ENV(){return nt.N}get GS(){return this.gs}get canSendAsNoReply(){const e=this.as.currentUserSubject?.value?.role;return e===x.yS.ADMIN||e===x.yS.MODERATOR}ngOnInit(){this.pi.updatePageMetaData("Mailbox - Buat Baru","Halaman Membuat Surel Baru","Create Email"),this.gs.isBrowser&&this.initForm()}ngOnDestroy(){this.subsMail?.unsubscribe()}canDeactivate(){var e=this;return(0,A.Z)(function*(){const o=yield e.ds.leavePageDialog();return yield q(o)})()}initForm(){const e=this.activatedRoute.snapshot.queryParamMap.get("to")?.split(",").map(m=>m.toLowerCase().trim())||[],o=this.activatedRoute.snapshot.queryParamMap.get("cc")?.split(",").map(m=>m.toLowerCase().trim())||[],i=this.activatedRoute.snapshot.queryParamMap.get("bcc")?.split(",").map(m=>m.toLowerCase().trim())||[];this.as.currentUserSubject?.value&&(i.includes(`${this.as.currentUserSubject.value._email.toLowerCase().trim()}`)||i.push(`${this.as.currentUserSubject.value._email.toLowerCase().trim()}`));const s=this.activatedRoute.snapshot.queryParamMap.get("subject")||"";this.fg=this.fb.group({to:[e,n.kI.compose([n.kI.required,n.kI.pattern(u.t.regexEmailMulti)])],cc:[o,n.kI.compose([n.kI.pattern(u.t.regexEmailMulti)])],bcc:[i,n.kI.compose([n.kI.pattern(u.t.regexEmailMulti)])],subject:[s,n.kI.compose([n.kI.required,n.kI.pattern(u.t.regexEnglishKeyboardKeys)])],message:[null,n.kI.compose([n.kI.required,n.kI.pattern(u.t.regexEnglishKeyboardKeys)])],no_reply:[!1,n.kI.compose([n.kI.required])]})}onSubmit(){if(this.bs.busy(),this.submitted=!0,this.fg.invalid)return this.submitted=!1,void this.bs.idle();this.subsMail=this.ms.sendMail(this.fg.value).subscribe({next:e=>{this.gs.log("[MAIL_SEND_SUCCESS]",e),this.submitted=!1,this.bs.idle(),this.router.navigateByUrl("/mailbox",{state:{bypassCanDeactivate:!0}})},error:e=>{this.gs.log("[MAIL_SEND_ERROR]",e,"error"),this.submitted=!1,this.bs.idle()}})}addTo(e){const o=e.chipInput.inputElement,i=e.value;(i||"").toLowerCase().trim()&&this.fg.value.to.push(i.toLowerCase().trim()),o&&(o.value=""),this.fg.controls.to.patchValue(this.fg.value.to.filter((s,m,d)=>d.findIndex(f=>f===s)===m))}removeTo(e){const o=this.fg.value.to.indexOf(e);o>=0&&this.fg.value.to.splice(o,1)}addCc(e){const o=e.chipInput.inputElement,i=e.value;(i||"").toLowerCase().trim()&&this.fg.value.cc.push(i.toLowerCase().trim()),o&&(o.value=""),this.fg.controls.cc.patchValue(this.fg.value.cc.filter((s,m,d)=>d.findIndex(f=>f===s)===m))}removeCc(e){const o=this.fg.value.cc.indexOf(e);o>=0&&this.fg.value.cc.splice(o,1)}addBcc(e){const o=e.chipInput.inputElement,i=e.value;(i||"").toLowerCase().trim()&&this.fg.value.bcc.push(i.toLowerCase().trim()),o&&(o.value=""),this.fg.controls.bcc.patchValue(this.fg.value.bcc.filter((s,m,d)=>d.findIndex(f=>f===s)===m))}removeBcc(e){const o=this.fg.value.bcc.indexOf(e);o>=0&&this.fg.value.bcc.splice(o,1)}noReplyMode(e){e.checked?(this.fg.controls.subject.patchValue(`${nt.N.siteName} | Informasi`),this.fg.controls.subject.disable()):this.fg.controls.subject.enable()}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(h.gz),t.Y36(n.QS),t.Y36(h.F0),t.Y36(D.z),t.Y36(Q.Z),t.Y36(k.U),t.Y36(j.e),t.Y36(Me.Y),t.Y36(L.x))},a.\u0275cmp=t.Xpm({type:a,selectors:[["app-mailbox-create"]],decls:5,vars:1,consts:[[1,"container"],[1,"row","px-3"],[1,"col-12"],[3,"formGroup","submit",4,"ngIf"],[3,"formGroup","submit"],[1,"row","mt-3","mb-3"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"row"],[1,"col-12","col-md-5","col-xl-4","p-3"],["hintLabel","Gunakan , Jika Lebih Dari 1","appearance","outline",1,"p-3","col-12",3,"color"],["to",""],["color","accent","selected","",3,"removable","removed",4,"ngFor","ngForOf"],["placeholder","user@domain.tld","required","",3,"matChipInputSeparatorKeyCodes","matChipInputFor","matChipInputAddOnBlur","matChipInputTokenEnd"],["fontIcon","short_text","matSuffix",""],["align","end"],[4,"ngIf"],["cc",""],["placeholder","user@domain.tld",3,"matChipInputSeparatorKeyCodes","matChipInputFor","matChipInputAddOnBlur","matChipInputTokenEnd"],["bcc",""],["class","col-12 p-3",4,"ngIf"],[1,"col-12","col-md-7","col-xl-8","pt-3"],["appearance","outline",1,"p-3","col-12",3,"color"],["matInput","","formControlName","subject","placeholder","Judul Pesan Blablabla ...","required",""],["fontIcon","wysiwyg","matSuffix",""],["formControlName","message","required","",1,"p-3","w-100",3,"config"],[1,"row","gy-3"],[1,"col","g-0"],[1,"col-12","col-md-3"],["mat-stroked-button","","routerLink","/mailbox",1,"w-100",3,"disabled"],["fontIcon","undo",1,"me-1"],["type","submit","mat-flat-button","","color","accent",1,"w-100",3,"disabled"],["fontIcon","save",1,"ms-1"],["color","accent","selected","",3,"removable","removed"],["fontIcon","cancel","matChipRemove",""],[1,"col-12","p-3"],["formControlName","no_reply",3,"matTooltip","change"]],template:function(e,o){1&e&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1)(3,"div",2),t.YNc(4,Pe,68,27,"form",3),t.qZA()()()),2&e&&(t.xp6(4),t.Q6J("ngIf",o.fg))},dependencies:[c.sg,c.O5,h.yS,I.lW,I.zs,v.qn,v.HS,v.oH,v.qH,R.Hw,g.TO,g.KE,g.bx,g.hX,g.R9,O.Nt,ot.Rr,P.gM,n._Y,n.Fj,n.JJ,n.JL,n.Q7,n.sg,n.u,Y.t,C.s6]}),a})();var ze=l(9618);function We(a,r){if(1&a&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.imageLimitExceeded)," !")}}function $e(a,r){if(1&a&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.Oqu(e.imageErrorText)}}function Xe(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"div",2)(1,"button",36),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.submitImage())}),t._UZ(2,"mat-icon",37),t._uU(3," Unggah "),t.qZA()()}if(2&a){const e=t.oxw(2);t.xp6(1),t.Q6J("disabled",e.submitted)}}function ta(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Judul Berita Tidak Boleh Kosong"),t.qZA())}function ea(a,r){1&a&&(t.TgZ(0,"div"),t._uU(1,"Judul Berita Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function aa(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"mat-chip",38),t.NdJ("removed",function(){const s=t.CHM(e).$implicit,m=t.oxw(2);return t.KtG(m.removeTag(s))}),t._uU(1),t._UZ(2,"mat-icon",39),t.qZA()}if(2&a){const e=r.$implicit;t.Q6J("removable",!0),t.xp6(1),t.hij(" ",e," ")}}function ia(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"form",4),t.NdJ("submit",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.onSubmit())}),t.TgZ(1,"div",5)(2,"div",6)(3,"h2",7)(4,"b",8),t._uU(5,"Tambah Data Berita & Informasi Baru"),t.qZA()()(),t.TgZ(6,"div",2)(7,"div",9)(8,"div",10)(9,"div",9)(10,"div",2),t._UZ(11,"img",11),t.TgZ(12,"mat-form-field",12)(13,"mat-label"),t._uU(14,"Gambar"),t.qZA(),t.TgZ(15,"ngx-mat-file-input",13,14),t.NdJ("change",function(i){t.CHM(e);const s=t.MAs(16),m=t.oxw();return t.KtG(m.uploadImage(i,s))}),t.qZA(),t._UZ(17,"mat-icon",15),t.qZA(),t.TgZ(18,"mat-error",16)(19,"small"),t.YNc(20,We,3,3,"div",17),t.YNc(21,$e,2,1,"div",17),t.qZA()()(),t.YNc(22,Xe,4,1,"div",18),t.qZA()(),t.TgZ(23,"div",19)(24,"div",9)(25,"mat-form-field",20)(26,"mat-label"),t._uU(27,"Judul"),t.qZA(),t._UZ(28,"input",21)(29,"mat-icon",22),t.TgZ(30,"mat-error"),t.YNc(31,ta,2,0,"div",17),t.YNc(32,ea,2,0,"div",17),t.qZA()(),t.TgZ(33,"mat-form-field",20)(34,"mat-label"),t._uU(35,"Tags & Kategori"),t.qZA(),t.TgZ(36,"mat-chip-list",null,23),t.YNc(38,aa,3,2,"mat-chip",24),t.TgZ(39,"input",25),t.NdJ("matChipInputTokenEnd",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.addTag(i))}),t.qZA(),t._UZ(40,"mat-icon",26),t.qZA(),t.TgZ(41,"mat-hint",27),t._uU(42,"Isi Dengan Bebas, Pisahkan Dengan Koma"),t.qZA()(),t._UZ(43,"angular-editor",28),t.qZA()()(),t.TgZ(44,"div",9)(45,"div",2)(46,"div",29),t._UZ(47,"div",30),t.TgZ(48,"div",31)(49,"a",32),t._UZ(50,"mat-icon",33),t._uU(51," Batal "),t.qZA()(),t.TgZ(52,"div",31)(53,"button",34),t._uU(54," Simpan "),t._UZ(55,"mat-icon",35),t.qZA()()()()()()()()}if(2&a){const e=t.MAs(37),o=t.oxw();t.Q6J("formGroup",o.fg),t.xp6(11),t.Q6J("src",o.image_url,t.LSH),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("disabled",o.fg.value.image)("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(5),t.Q6J("ngIf",o.imageLimitExceeded),t.xp6(1),t.Q6J("ngIf",o.imageErrorText),t.xp6(1),t.Q6J("ngIf",o.image&&!o.fg.value.image),t.xp6(3),t.Q6J("color","accent"),t.xp6(6),t.Q6J("ngIf",o.fg.get("title").hasError("required")),t.xp6(1),t.Q6J("ngIf",o.fg.get("title").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(5),t.Q6J("ngForOf",o.fg.value.tags),t.xp6(1),t.Q6J("matChipInputSeparatorKeyCodes",o.GS.separatorKeysCodes)("matChipInputFor",e)("matChipInputAddOnBlur",!0),t.xp6(4),t.Q6J("config",o.GS.angularEditorConfig),t.xp6(6),t.Q6J("disabled",o.submitted),t.xp6(4),t.Q6J("disabled",o.submitted||o.fg.invalid)}}const na=[{path:"",pathMatch:"full",redirectTo:"/home"},{path:"berkas",component:me,canDeactivate:[p],data:{title:"Berkas - Buat Baru",description:"Halaman Unggah Berkas Baru",keywords:"Tambah Berkas Baru"}},{path:"fansub",component:Fe,canActivate:[N.H],canDeactivate:[p],data:{title:"Fansub - Buat Baru",description:"Halaman Menambahkan Fansub Baru",keywords:"Create Fansub",[u.t.decoratorVerifiedOnly]:!0}},{path:"mailbox",component:Ve,canActivate:[N.H],canDeactivate:[p],data:{title:"Surel - Buat Baru",description:"Halaman Kirim Surel Baru",keywords:"Buat Surel Baru",[u.t.decoratorVerifiedOnly]:!0}},{path:"news",component:(()=>{class a{constructor(e,o,i,s,m,d,f,U){this.fb=e,this.router=o,this.bs=i,this.pi=s,this.imgbb=m,this.news=d,this.gs=f,this.ds=U,this.submitted=!1,this.image=null,this.imageErrorText=null,this.imageLimitExceeded=null,this.image_url="/assets/img/form/no-image.png",this.gambar=null,this.subsNews=null,this.subsImgbb=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get GS(){return this.gs}ngOnInit(){this.pi.updatePageMetaData("Informasi - Buat Baru","Halaman Menambahkan Berita Baru","Create News"),this.gs.isBrowser&&this.initForm()}ngOnDestroy(){this.subsImgbb?.unsubscribe(),this.subsNews?.unsubscribe()}canDeactivate(){var e=this;return(0,A.Z)(function*(){const o=yield e.ds.leavePageDialog();return yield q(o)})()}initForm(){this.fg=this.fb.group({title:[null,n.kI.compose([n.kI.required,n.kI.pattern(u.t.regexEnglishKeyboardKeys)])],content:[null,n.kI.compose([n.kI.required,n.kI.pattern(u.t.regexEnglishKeyboardKeys)])],image:[null,n.kI.compose([n.kI.pattern(u.t.regexUrl)])],tags:[[],n.kI.compose([])]})}uploadImage(e,o){this.gambar=o,this.image=null,this.imageLimitExceeded=null,this.imageErrorText=null,this.fg.controls.image.patchValue(null);const i=e.target.files[0];try{const s=new FileReader;s.readAsDataURL(i),s.onload=m=>{if(this.gs.log("[IMAGE_SELECTED]",m),i.size<=u.t.fileSizeImageLimit){const d=this.gs.document.createElement("img");d.onload=()=>{this.image=i,this.image_url=s.result.toString()},d.src=s.result.toString()}else this.image=null,this.image_url="/assets/img/form/image-error.png",this.imageLimitExceeded=u.t.fileSizeImageLimit,this.gambar.clear(e)}}catch{this.image=null,this.image_url="/assets/img/form/no-image.png",this.gambar.clear(e)}}submitImage(){this.submitted=!0,this.subsImgbb=this.imgbb.uploadImage({file:this.image}).subscribe({next:e=>{this.gs.log("[IMAGE_SUCCESS]",e),this.fg.controls.image.patchValue(e.result.url),this.submitted=!1},error:e=>{this.gs.log("[IMAGE_ERROR]",e,"error"),this.fg.controls.image.patchValue(null),this.submitted=!1,this.imageErrorText=e.result?.message||e.info}})}onSubmit(){if(this.bs.busy(),this.submitted=!0,this.fg.invalid)return this.submitted=!1,void this.bs.idle();this.subsNews=this.news.createNews({image:this.fg.value.image,title:this.fg.value.title,content:this.fg.value.content,tags:this.fg.value.tags}).subscribe({next:e=>{this.gs.log("[NEWS_CREATE_SUCCESS]",e),this.submitted=!1,this.bs.idle(),this.router.navigateByUrl("/news",{state:{bypassCanDeactivate:!0}})},error:e=>{this.gs.log("[NEWS_CREATE_ERROR]",e,"error"),this.submitted=!1,this.bs.idle()}})}addTag(e){const o=e.input,i=e.value;(i||"").trim()&&this.fg.value.tags.push(i.trim()),o&&(o.value=""),this.fg.controls.tags.patchValue(this.fg.value.tags.filter((s,m,d)=>d.findIndex(f=>f===s)===m))}removeTag(e){const o=this.fg.value.tags.indexOf(e);o>=0&&this.fg.value.tags.splice(o,1)}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(n.QS),t.Y36(h.F0),t.Y36(D.z),t.Y36(Q.Z),t.Y36(G.X),t.Y36(ze.Y),t.Y36(k.U),t.Y36(L.x))},a.\u0275cmp=t.Xpm({type:a,selectors:[["app-news-create"]],decls:5,vars:1,consts:[[1,"container"],[1,"row","px-3"],[1,"col-12"],[3,"formGroup","submit",4,"ngIf"],[3,"formGroup","submit"],[1,"row","mt-3","mb-3"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"row"],[1,"col-12","col-md-5","col-xl-4","p-3"],[1,"w-100","border",3,"src"],["appearance","outline",1,"pt-3","w-100",3,"color"],[1,"w-100",3,"disabled","accept","change"],["gambar",""],["fontIcon","image","matSuffix",""],[1,"px-3","w-100"],[4,"ngIf"],["class","col-12",4,"ngIf"],[1,"col-12","col-md-7","col-xl-8","pt-3"],["appearance","outline",1,"p-3","col-12",3,"color"],["matInput","","formControlName","title","placeholder","Berita Terkini Blablabla ...","required",""],["fontIcon","wysiwyg","matSuffix",""],["tag",""],["color","accent","selected","",3,"removable","removed",4,"ngFor","ngForOf"],["placeholder","Label Tag / Kategori",3,"matChipInputSeparatorKeyCodes","matChipInputFor","matChipInputAddOnBlur","matChipInputTokenEnd"],["fontIcon","loyalty","matSuffix",""],["align","end"],["formControlName","content","required","",1,"p-3","w-100",3,"config"],[1,"row","gy-3"],[1,"col","g-0"],[1,"col-12","col-md-3"],["mat-stroked-button","","routerLink","/news",1,"w-100",3,"disabled"],["fontIcon","undo",1,"me-1"],["type","submit","mat-flat-button","","color","accent",1,"w-100",3,"disabled"],["fontIcon","save",1,"ms-1"],["type","button","mat-raised-button","","color","primary",1,"w-100",3,"disabled","click"],["fontIcon","add_photo_alternate",1,"me-1"],["color","accent","selected","",3,"removable","removed"],["fontIcon","cancel","matChipRemove",""]],template:function(e,o){1&e&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1)(3,"div",2),t.YNc(4,ia,56,19,"form",3),t.qZA()()()),2&e&&(t.xp6(4),t.Q6J("ngIf",o.fg))},dependencies:[c.sg,c.O5,h.yS,I.lW,I.zs,v.qn,v.HS,v.oH,v.qH,R.Hw,g.TO,g.KE,g.bx,g.hX,g.R9,O.Nt,n._Y,n.Fj,n.JJ,n.JL,n.Q7,n.sg,n.u,T.Yh,Y.t,C.s6,V.$]}),a})(),canActivate:[N.H,S.t],canDeactivate:[p],data:{title:"Berita - Buat Baru",description:"Halaman Unggah Berita Baru",keywords:"Tambah Berita Baru",[u.t.decoratorVerifiedOnly]:!0,[u.t.decoratorRoles]:[x.yS.ADMIN,x.yS.MODERATOR]}}];let ra=(()=>{class a{}return a.\u0275fac=function(e){return new(e||a)},a.\u0275mod=t.oAB({type:a}),a.\u0275inj=t.cJS({imports:[c.ez,h.Bz.forChild(na),Z.m,n.u5,n.UX,T.Ad,b.F,C.UM,_.T]}),a})()},8616:($,E,l)=>{l.d(E,{t:()=>k});var c=l(4650),h=l(1390),n=l(257),C=l(7140),T=l(6895),u=l(1861);function x(p,Z){if(1&p&&c._UZ(0,"div",4),2&p){const _=c.oxw();c.Udp("background-size",_.GS.sizeContain?"contain":"cover")("background-image","url("+_.GS.bannerImg+")")("background-repeat",_.GS.bgRepeat?"repeat-x":"no-repeat")("height",_.ROUTER.url.startsWith("/news")||_.ROUTER.url.startsWith("/berkas")||_.ROUTER.url.startsWith("/fansub")?"192px":"128px")("background-position-y",_.ROUTER.url.startsWith("/berkas")?"22.5%":"")}}function S(p,Z){if(1&p&&(c.TgZ(0,"strong",10),c._uU(1," -- "),c.TgZ(2,"i")(3,"a",11),c._uU(4),c.qZA()()()),2&p){const _=c.oxw().$implicit;c.xp6(3),c.MGl("routerLink","/user/",_.notifCreator,""),c.xp6(1),c.hij(" ",_.notifCreator," ")}}function N(p,Z){if(1&p){const _=c.EpF();c.TgZ(0,"button",12),c.NdJ("click",function(){c.CHM(_);const A=c.oxw().$implicit,K=c.oxw();return c.KtG(K.removeNotif(A.notifData.id))}),c.qZA()}}function t(p,Z){if(1&p&&(c.TgZ(0,"div",5)(1,"div")(2,"strong",6),c._uU(3),c.qZA(),c._UZ(4,"span",7),c.ALo(5,"safeInnerHtml"),c.YNc(6,S,5,2,"strong",8),c.YNc(7,N,1,0,"button",9),c.qZA()()),2&p){const _=Z.$implicit;c.xp6(1),c.Gre("alert alert-",_.notifData.type," alert-dismissible fade show"),c.xp6(2),c.Oqu(_.notifData.title),c.xp6(1),c.Q6J("innerHTML",c.lcZ(5,7,_.notifData.content),c.oJD),c.xp6(2),c.Q6J("ngIf",_.notifCreator),c.xp6(1),c.Q6J("ngIf",_.notifData.dismissible)}}let k=(()=>{class p{constructor(_,b,A){this.router=_,this.gs=b,this.notif=A}ngOnInit(){}get GS(){return this.gs}get ROUTER(){return this.router}get NOTIF(){return this.notif}removeNotif(_){this.notif.removeNotif(_)}}return p.\u0275fac=function(_){return new(_||p)(c.Y36(h.F0),c.Y36(n.U),c.Y36(C.T))},p.\u0275cmp=c.Xpm({type:p,selectors:[["app-notifications"]],decls:4,vars:2,consts:[["class","container-fluid notif-banner align-items-center",3,"background-size","background-image","background-repeat","height","background-position-y",4,"ngIf"],[1,"container"],[1,"row","pt-3"],["class","col-12",4,"ngFor","ngForOf"],[1,"container-fluid","notif-banner","align-items-center"],[1,"col-12"],[1,"me-1"],[3,"innerHTML"],["class","ms-1",4,"ngIf"],["type","button","class","btn-close","data-dismiss","alert",3,"click",4,"ngIf"],[1,"ms-1"],[1,"text-decoration-none",3,"routerLink"],["type","button","data-dismiss","alert",1,"btn-close",3,"click"]],template:function(_,b){1&_&&(c.YNc(0,x,1,10,"div",0),c.TgZ(1,"div",1)(2,"div",2),c.YNc(3,t,8,9,"div",3),c.qZA()()),2&_&&(c.Q6J("ngIf",b.GS.bannerImg&&(b.ROUTER.url.startsWith("/news")||b.ROUTER.url.startsWith("/berkas")||b.ROUTER.url.startsWith("/fansub")||b.ROUTER.url.startsWith("/anime")||b.ROUTER.url.startsWith("/dorama"))),c.xp6(3),c.Q6J("ngForOf",b.NOTIF.notifications))},dependencies:[T.sg,T.O5,h.yS,u.H],styles:[".notif-banner[_ngcontent-%COMP%]{width:100%;background-size:cover;background-position:75% 50%}"]}),p})()},8613:($,E,l)=>{l.d(E,{F:()=>T});var c=l(6895),h=l(1390),n=l(7355),C=l(4650);let T=(()=>{class u{}return u.\u0275fac=function(S){return new(S||u)},u.\u0275mod=C.oAB({type:u}),u.\u0275inj=C.cJS({imports:[c.ez,h.Bz,n.T]}),u})()}}]); \ No newline at end of file diff --git a/dist/fansubid/browser/index.html b/dist/fansubid/browser/index.html index 08db52db8..e7490ab2a 100644 --- a/dist/fansubid/browser/index.html +++ b/dist/fansubid/browser/index.html @@ -63,7 +63,7 @@ - + \ No newline at end of file diff --git a/dist/fansubid/browser/main.3de35e27ffd93d42.js b/dist/fansubid/browser/main.3de35e27ffd93d42.js deleted file mode 100644 index 3deb9a984..000000000 --- a/dist/fansubid/browser/main.3de35e27ffd93d42.js +++ /dev/null @@ -1 +0,0 @@ -var BD=Object.defineProperty,ND=(Je,F,s)=>F in Je?BD(Je,F,{enumerable:!0,configurable:!0,writable:!0,value:s}):Je[F]=s,th=(Je,F,s)=>(ND(Je,"symbol"!=typeof F?F+"":F,s),s);(self.webpackChunkfansubid=self.webpackChunkfansubid||[]).push([[179],{192:(Je,F,s)=>{"use strict";s.d(F,{d:()=>o});var n=s(4650),r=s(257),l=s(6895);function u(E,x){1&E&&n._UZ(0,"br")}let o=(()=>{class E{constructor(d){this.gs=d}ngOnInit(){}get GS(){return this.gs}}return E.\u0275fac=function(d){return new(d||E)(n.Y36(r.U))},E.\u0275cmp=n.Xpm({type:E,selectors:[["app-no-data"]],decls:7,vars:1,consts:[[2,"background-image","url('/assets/img/404/no-data.png')","background-size","contain","background-position","center","background-repeat","no-repeat","height","256px","overflow","hidden"],[1,"row","align-items-center","h-100"],[1,"col-8","mx-auto","text-light","text-center","rounded","py-3",2,"background-color","rgba(128, 128, 128, 0.875)"],[1,"m-0"],[4,"ngIf"]],template:function(d,g){1&d&&(n.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"h3",3),n._uU(4," Tidak Ada Data "),n.YNc(5,u,1,0,"br",4),n._uU(6," \xaf\\_(\u30c4)_/\xaf "),n.qZA()()()()),2&d&&(n.xp6(5),n.Q6J("ngIf",!g.GS.isDesktop))},dependencies:[l.O5]}),E})()},2438:(Je,F,s)=>{"use strict";s.d(F,{d:()=>l});var n=s(6895),r=s(4650);let l=(()=>{class u{}return u.\u0275fac=function(E){return new(E||u)},u.\u0275mod=r.oAB({type:u}),u.\u0275inj=r.cJS({imports:[n.ez]}),u})()},1617:(Je,F,s)=>{"use strict";s.d(F,{u:()=>Z});var n=s(6271),r=s(4249),l=s(4650),u=s(4137),o=s(257),E=s(8381),x=s(3379),d=s(1390),g=s(6895),v=s(4006),_=s(3238),m=s(4859),C=s(7392),O=s(9549),V=s(4144),G=s(4385),Y=s(266);const H=["liveChatScroll"];function ne(de,q){if(1&de&&(l.TgZ(0,"mat-option",17),l._uU(1,"Global Fansubber"),l.qZA()),2&de){const Ve=l.oxw(2);l.Q6J("value",Ve.CONSTANTS.socketRoomNameGlobalFansub)}}function fe(de,q){if(1&de&&(l.TgZ(0,"div",26)(1,"div",27),l._UZ(2,"img",28),l.qZA(),l.TgZ(3,"div",29)(4,"h4",30)(5,"span"),l._uU(6),l.qZA()()()()),2&de){const Ve=l.oxw().$implicit;l.MGl("routerLink","/user/",Ve.value.username,""),l.s9C("matTooltip",Ve.value.username),l.xp6(2),l.s9C("src",Ve.value.image_url,l.LSH),l.xp6(4),l.Oqu(Ve.value.username)}}function j(de,q){if(1&de&&(l.TgZ(0,"div",24),l.YNc(1,fe,7,4,"div",25),l.qZA()),2&de){const Ve=q.$implicit;l.xp6(1),l.Q6J("ngIf",Ve.value)}}function $(de,q){if(1&de&&(l.TgZ(0,"div",22),l.YNc(1,j,2,1,"div",23),l.ALo(2,"keyvalue"),l.qZA()),2&de){const Ve=l.oxw(2);l.xp6(1),l.Q6J("ngForOf",l.lcZ(2,1,Ve.roomCurrentOrGlobal.member_list))}}function N(de,q){if(1&de){const Ve=l.EpF();l.TgZ(0,"div",13)(1,"div",3)(2,"h3",14)(3,"mat-form-field",15)(4,"mat-label"),l._uU(5,"Ruang Obrolan"),l.qZA(),l.TgZ(6,"mat-select",16),l.NdJ("valueChange",function(Ft){l.CHM(Ve);const Lt=l.oxw();return l.KtG(Lt.liveChatResult.roomId=Ft)})("valueChange",function(Ft){l.CHM(Ve);const Lt=l.oxw();return l.KtG(Lt.changeRoom(Ft))}),l.TgZ(7,"mat-option",17),l._uU(8,"Halaman Ini"),l.qZA(),l.TgZ(9,"mat-option",17),l._uU(10,"Global Publik"),l.qZA(),l.YNc(11,ne,2,1,"mat-option",18),l.qZA()()()(),l.TgZ(12,"div",19)(13,"div",20),l.YNc(14,$,3,3,"div",21),l.qZA()()()}if(2&de){const Ve=l.oxw();l.xp6(3),l.Q6J("color","accent"),l.xp6(3),l.Q6J("value",Ve.liveChatResult.roomId),l.xp6(1),l.Q6J("value",Ve.ROUTER.url.split("?")[0]),l.xp6(2),l.Q6J("value",Ve.CONSTANTS.socketRoomNameGlobalPublic),l.xp6(2),l.Q6J("ngIf",Ve.isAdminModFansubber),l.xp6(3),l.Q6J("ngIf",Ve.roomCurrentOrGlobal)}}function ee(de,q){if(1&de&&(l.TgZ(0,"div",27),l._UZ(1,"img",28),l.qZA()),2&de){const Ve=l.oxw().$implicit;l.xp6(1),l.s9C("src",Ve.sender.image_url,l.LSH)}}function ue(de,q){if(1&de){const Ve=l.EpF();l.TgZ(0,"div"),l.YNc(1,ee,2,1,"div",31),l.TgZ(2,"div",32)(3,"h5",33)(4,"span",34),l.NdJ("click",function(){const Lt=l.CHM(Ve).$implicit,xt=l.oxw();return l.KtG(xt.openUserProfile(Lt.sender.username))}),l._uU(5),l.qZA(),l._UZ(6,"span",35),l.qZA()()()}if(2&de){const Ve=q.$implicit,qe=q.index,Ft=l.oxw();l.Gre("d-flex py-1 ",qe===Ft.chatCurrentOrGlobal.length-Ft.SS.messageChatUnreadCount?"border-top":"",""),l.xp6(1),l.Q6J("ngIf",Ve.sender.image_url),l.xp6(4),l.hij(" ",Ve.sender.username," "),l.xp6(1),l.Q6J("innerHtml",Ft.innerHtml(Ve.message),l.oJD)}}function se(de,q){if(1&de){const Ve=l.EpF();l.TgZ(0,"mat-form-field",36)(1,"mat-label"),l._uU(2,"Kirim Pesan Obrolan Disini ..."),l.qZA(),l.TgZ(3,"input",37),l.NdJ("keyup.enter",function(Ft){l.CHM(Ve);const Lt=l.oxw();return l.KtG(Lt.applyFilter(Ft))})("ngModelChange",function(Ft){l.CHM(Ve);const Lt=l.oxw();return l.KtG(Lt.liveChatResult.messageToSend=Ft)}),l.qZA(),l._UZ(4,"mat-icon",38),l.qZA()}if(2&de){const Ve=l.oxw();l.Q6J("color","accent"),l.xp6(3),l.Q6J("ngModel",Ve.liveChatResult.messageToSend)("disabled",!Ve.canChat)}}function Oe(de,q){if(1&de){const Ve=l.EpF();l.TgZ(0,"button",39),l.NdJ("click",function(){l.CHM(Ve);const Ft=l.oxw();return l.KtG(Ft.login())}),l._UZ(1,"mat-icon",40),l._uU(2," Login Untuk Bisa Mengobrol "),l.qZA()}}const oe=function(de){return{height:de}};let Z=(()=>{class de{constructor(Ve,qe,Ft,Lt,xt){this.as=Ve,this.gs=qe,this.ss=Ft,this.ls=Lt,this.router=xt,this.chatOnly=!1,this.liveChatResult={messageToSend:"",roomId:""},this.globalRoom=null,this.fansubRoom=null,this.currentRoom=null,this.messageHistory=[],this.subsCurrentRoom=null,this.subsGlobalRoom=null,this.subsFansubRoom=null,this.firstTimeOpen=!0,this.timedOut=null}get AS(){return this.as}get ROUTER(){return this.router}get SS(){return this.ss}ngOnInit(){this.gs.isBrowser&&(this.liveChatResult=this.ls.getItem(this.gs.localStorageKeys.LiveChatResults,!0)||this.liveChatResult,this.liveChatResult.roomId=this.router.url.split("?")[0],this.subsCurrentRoom=this.ss.currentRoom.subscribe({next:Ve=>{this.currentRoom=Ve}}),this.subsGlobalRoom=this.ss.globalRoom.subscribe({next:Ve=>{this.globalRoom=Ve}}),this.subsFansubRoom=this.ss.fansubRoom.subscribe({next:Ve=>{this.fansubRoom=Ve}}))}get CONSTANTS(){return n.t}get isAdminModFansubber(){return!(!this.as.currentUserSubject?.value||this.as.currentUserSubject?.value?.role!==r.yS.ADMIN&&this.as.currentUserSubject?.value?.role!==r.yS.MODERATOR&&this.as.currentUserSubject?.value?.role!==r.yS.FANSUBBER)}get roomCurrentOrGlobal(){return this.liveChatResult.roomId===n.t.socketRoomNameGlobalPublic?this.globalRoom:this.liveChatResult.roomId===n.t.socketRoomNameGlobalFansub?this.fansubRoom:this.currentRoom}get chatCurrentOrGlobal(){return this.messageHistory=this.liveChatResult.roomId===n.t.socketRoomNameGlobalPublic?this.ss.globalChatRoom:this.liveChatResult.roomId===n.t.socketRoomNameGlobalFansub?this.ss.fansubChatRoom:this.ss.currentChatRoom,this.ss.messageChatUnreadCount>0&&this.scrollMessage(),this.messageHistory}get canChat(){return!!this.as.currentUserSubject?.value&&(this.liveChatResult.roomId!==n.t.socketRoomNameGlobalFansub||this.isAdminModFansubber)}ngAfterViewInit(){this.gs.isBrowser&&this.scrollMessage()}ngOnDestroy(){this.ls.setItem(this.gs.localStorageKeys.LiveChatResults,this.liveChatResult),this.subsCurrentRoom?.unsubscribe(),this.subsGlobalRoom?.unsubscribe(),this.timedOut&&(clearTimeout(this.timedOut),this.timedOut=null)}innerHtml(Ve){return this.gs.linkify(this.gs.htmlToText(Ve))}scrollToBottom(){this.timedOut=setTimeout(()=>{this.ss.messageChatUnreadCount=0,this.liveChatScroll.nativeElement.scrollTop=this.liveChatScroll.nativeElement.scrollHeight},0)}scrollMessage(){this.liveChatScroll&&(this.firstTimeOpen?(this.firstTimeOpen=!1,this.scrollToBottom()):this.liveChatScroll.nativeElement.scrollTop+this.liveChatScroll.nativeElement.clientHeight===this.liveChatScroll.nativeElement.scrollHeight&&this.scrollToBottom())}sendMessage(){this.ss.socketEmit("send-chat",{roomId:this.roomCurrentOrGlobal.room_id,message:this.gs.htmlToText(this.liveChatResult.messageToSend)}),this.liveChatResult.messageToSend=null}applyFilter(Ve){this.gs.log("[MESSAGE_VALUE_CHANGED]",Ve),this.liveChatResult.messageToSend=Ve.target.value.trim().toLowerCase(),this.liveChatResult.messageToSend&&this.sendMessage()}changeRoom(Ve){this.gs.log("[MESSAGE_ROOM_CHANGED]",Ve),this.liveChatResult.roomId=Ve,this.scrollMessage()}login(){this.router.navigate(["/login"],{queryParams:{returnUrl:this.router.url.split("?")[0]}})}openUserProfile(Ve){this.router.navigateByUrl(`/user/${Ve}`)}}return de.\u0275fac=function(Ve){return new(Ve||de)(l.Y36(u.e),l.Y36(o.U),l.Y36(E.R),l.Y36(x.n),l.Y36(d.F0))},de.\u0275cmp=l.Xpm({type:de,selectors:[["app-live-chat"]],viewQuery:function(Ve,qe){if(1&Ve&&l.Gf(H,5),2&Ve){let Ft;l.iGM(Ft=l.CRH())&&(qe.liveChatScroll=Ft.first)}},inputs:{chatOnly:"chatOnly"},decls:15,vars:13,consts:[[1,"row",3,"ngStyle"],[1,"col-12","h-100"],["class","row","style","height: 40%!important;",4,"ngIf"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"col-12"],[2,"overflow-y","auto",3,"ngStyle"],["liveChatScroll",""],[3,"class",4,"ngFor","ngForOf"],[1,"col-12","mt-auto"],["class","mt-3 col-12",3,"color",4,"ngIf"],["type","button","class","mt-4 col-12 text-light","mat-flat-button","","color","accent",3,"click",4,"ngIf"],[1,"row",2,"height","40%!important"],[1,"border-bottom-dotted","row"],[1,"pt-3","col-12",3,"color"],[3,"value","valueChange"],[3,"value"],[3,"value",4,"ngIf"],[1,"col-12",2,"height","calc(100% - 105px)"],[1,"h-100",2,"overflow-y","auto"],["class","row m-0",4,"ngIf"],[1,"row","m-0"],["class","col-6 p-0",4,"ngFor","ngForOf"],[1,"col-6","p-0"],["class","card d-flex py-1 align-items-center p-1 text-success",3,"routerLink","matTooltip",4,"ngIf"],[1,"card","d-flex","py-1","align-items-center","p-1","text-success",3,"routerLink","matTooltip"],[1,"flex-shrink-0"],["height","24","width","24",1,"ms-1","mt-1",2,"object-fit","cover",3,"src"],[1,"flex-grow-1","mx-1","text-truncate"],["matLine","",1,"m-0","text-truncate"],["class","flex-shrink-0",4,"ngIf"],[1,"flex-grow-1","mx-1","my-auto"],["matLine","",1,"m-0"],[1,"me-1","text-success",2,"cursor","pointer",3,"click"],[1,"text-warning",2,"word-break","break-word",3,"innerHtml"],[1,"mt-3","col-12",3,"color"],["matInput","","maxlength","200","placeholder","Ex. Hello \u4e16\u754c\uff01",3,"ngModel","disabled","keyup.enter","ngModelChange"],["fontIcon","send","matSuffix",""],["type","button","mat-flat-button","","color","accent",1,"mt-4","col-12","text-light",3,"click"],["fontIcon","vpn_key",1,"me-1"]],template:function(Ve,qe){1&Ve&&(l.TgZ(0,"div",0)(1,"div",1),l.YNc(2,N,15,6,"div",2),l.TgZ(3,"div",0)(4,"div",3)(5,"h2",4)(6,"b",5),l._uU(7,"Obrolan"),l.qZA()()(),l.TgZ(8,"div",6)(9,"div",7,8),l.YNc(11,ue,7,6,"div",9),l.qZA()(),l.TgZ(12,"div",10),l.YNc(13,se,5,3,"mat-form-field",11),l.YNc(14,Oe,3,0,"button",12),l.qZA()()()()),2&Ve&&(l.Q6J("ngStyle",l.VKq(7,oe,qe.chatOnly?"":"calc(100vh - 120px)")),l.xp6(2),l.Q6J("ngIf",!qe.chatOnly),l.xp6(1),l.Q6J("ngStyle",l.VKq(9,oe,qe.chatOnly?"100%!important":"60%!important")),l.xp6(6),l.Q6J("ngStyle",l.VKq(11,oe,qe.chatOnly?"320px":"calc(50vh - 139px)")),l.xp6(2),l.Q6J("ngForOf",qe.chatCurrentOrGlobal),l.xp6(2),l.Q6J("ngIf",null==qe.AS.currentUserSubject?null:qe.AS.currentUserSubject.value),l.xp6(1),l.Q6J("ngIf",!(null!=qe.AS.currentUserSubject&&qe.AS.currentUserSubject.value)))},dependencies:[g.sg,g.O5,g.PC,d.rH,v.Fj,v.JJ,v.nD,v.On,_.ey,m.lW,_.X2,C.Hw,O.KE,O.hX,O.R9,V.Nt,G.gD,Y.gM,g.Nd],styles:[".card[_ngcontent-%COMP%]{position:inherit;display:flex;flex-direction:row;min-width:0;overflow-wrap:anywhere;background-color:#0000!important;background-clip:border-box;border:none;border-radius:.25rem;cursor:pointer}.card[_ngcontent-%COMP%]:hover{color:#ffc107!important}"]}),de})()},5116:(Je,F,s)=>{"use strict";s.d(F,{d:()=>E});var n=s(6895),r=s(1390),l=s(4006),u=s(210),o=s(4650);let E=(()=>{class x{}return x.\u0275fac=function(g){return new(g||x)},x.\u0275mod=o.oAB({type:x}),x.\u0275inj=o.cJS({imports:[n.ez,r.Bz,l.u5,u.m]}),x})()},2777:(Je,F,s)=>{"use strict";s.d(F,{t:()=>d});var n=s(6271),r=s(4650),l=s(1390),u=s(4137),o=s(6925),E=s(257),x=s(3e3);let d=(()=>{class g{constructor(_,m,C,O,V){this.router=_,this.as=m,this.toast=C,this.gs=O,this.bs=V}canActivate(_,m){const C=_.data[n.t.decoratorRoles];if(!C)return!0;if(this.gs.isBrowser){const O=this.as.currentUserSubject?.value;if(O)return!!C.includes(O.role)||(this.bs.clear(),this.toast.error(`Membutuhkan Role :: ${C.join(" / ")}`,"Whoops, Akses Ditolak!",null,!0),this.router.navigateByUrl(this.gs.previousUrl||"/"),!1);this.bs.clear(),this.toast.error("Harap Login Terlebih Dahulu~","Whoops, Akses Ditolak!",null,!0)}return this.router.navigate(["/login"],{queryParams:{returnUrl:m.url}}),!1}}return g.\u0275fac=function(_){return new(_||g)(r.LFG(l.F0),r.LFG(u.e),r.LFG(o.k),r.LFG(E.U),r.LFG(x.z))},g.\u0275prov=r.Yz7({token:g,factory:g.\u0275fac,providedIn:"root"}),g})()},5094:(Je,F,s)=>{"use strict";s.d(F,{H:()=>d});var n=s(6271),r=s(4650),l=s(1390),u=s(4137),o=s(6925),E=s(257),x=s(3e3);let d=(()=>{class g{constructor(_,m,C,O,V){this.router=_,this.as=m,this.toast=C,this.gs=O,this.bs=V}canActivate(_,m){if(!_.data[n.t.decoratorVerifiedOnly])return!0;if(this.gs.isBrowser){const O=this.as.currentUserSubject?.value;if(O)return!!O.verified||(this.bs.clear(),this.toast.error("Khusus Pengguna Terverifikasi","Whoops, Akses Ditolak!",null,!0),this.router.navigateByUrl("/verify"),!1);this.bs.clear(),this.toast.error("Harap Login Terlebih Dahulu~","Whoops, Akses Ditolak!",null,!0)}return this.router.navigate(["/login"],{queryParams:{returnUrl:m.url}}),!1}}return g.\u0275fac=function(_){return new(_||g)(r.LFG(l.F0),r.LFG(u.e),r.LFG(o.k),r.LFG(E.U),r.LFG(x.z))},g.\u0275prov=r.Yz7({token:g,factory:g.\u0275fac,providedIn:"root"}),g})()},210:(Je,F,s)=>{"use strict";s.d(F,{m:()=>de});var n=s(2138),r=s(7957),l=s(2673),u=s(4859),o=s(3546),E=s(7331),x=s(9602),d=s(5412),g=s(4850),v=s(7084),_=s(782),m=s(7392),C=s(4144),O=s(6338),V=s(8255),G=s(3238),Y=s(8739),H=s(3162),ne=s(4385),fe=s(3267),j=s(455),$=s(8425),N=s(7155),ee=s(3848),ue=s(3683),se=s(266),Oe=s(7009),oe=s(6308),Z=s(4650);let de=(()=>{class q{}return q.\u0275fac=function(qe){return new(qe||q)},q.\u0275mod=Z.oAB({type:q}),q.\u0275inj=Z.cJS({imports:[n.U5,r.Bb,l.g,u.ot,o.QW,E.Hi,x.FA,d.Is,g.t,v.To,_.N6,m.Ps,C.c,O.ie,V.Tx,G.XK,Y.TU,H.Cv,G.si,ne.LD,fe.SJ,j.rP,$.T5,N.p0,ee.Nh,ue.g0,se.AV,Oe.ZX,oe.JX]}),q})()},3626:(Je,F,s)=>{"use strict";s.d(F,{$:()=>r});var n=s(4650);class r{static formatResult(u,o){return`${u} ${o}`}static calculateResult(u,o){const E=u.prev?r.formats[u.prev]:void 0;return E?o/E.max:o}isNumber(u){return"number"==typeof u}isNumberFinite(u){return this.isNumber(u)&&isFinite(u)}isPositive(u){return u>=0}isInteger(u){return u%1==0}toDecimal(u,o){return Math.round(u*Math.pow(10,o))/Math.pow(10,o)}transform(u,o=2,E="B",x){if(!(this.isNumberFinite(u)&&this.isNumberFinite(o)&&this.isInteger(o)&&this.isPositive(o)))return u;let d=u,g=E;for(;"B"!==g;)d*=1024,g=r.formats[g].prev;if(x){const _=this.toDecimal(r.calculateResult(r.formats[x],d),o);return r.formatResult(_,x)}for(const v in r.formats)if(r.formats.hasOwnProperty(v)){const _=r.formats[v];if(d<_.max){const m=this.toDecimal(r.calculateResult(_,d),o);return r.formatResult(m,v)}}}}r.formats={B:{max:1024},kB:{max:Math.pow(1024,2),prev:"B"},KB:{max:Math.pow(1024,2),prev:"B"},MB:{max:Math.pow(1024,3),prev:"kB"},GB:{max:Math.pow(1024,4),prev:"MB"},TB:{max:Number.MAX_SAFE_INTEGER,prev:"GB"}},r.\u0275fac=function(u){return new(u||r)},r.\u0275pipe=n.Yjl({name:"bytes",type:r,pure:!0})},7355:(Je,F,s)=>{"use strict";s.d(F,{T:()=>l});var n=s(6895),r=s(4650);let l=(()=>{class u{}return u.\u0275fac=function(E){return new(E||u)},u.\u0275mod=r.oAB({type:u}),u.\u0275inj=r.cJS({imports:[n.ez]}),u})()},1861:(Je,F,s)=>{"use strict";s.d(F,{H:()=>l});var n=s(4650),r=s(1481);let l=(()=>{class u{constructor(E){this.domSanitizer=E}transform(E){return this.domSanitizer.bypassSecurityTrustHtml(E)}}return u.\u0275fac=function(E){return new(E||u)(n.Y36(r.H7,16))},u.\u0275pipe=n.Yjl({name:"safeInnerHtml",type:u,pure:!0}),u})()},466:(Je,F,s)=>{"use strict";s.d(F,{l:()=>o});var n=s(5934),r=s(4650),l=s(9731),u=s(257);let o=(()=>{class E{constructor(d,g){this.api=d,this.gs=g,this.menuList=[{url:"banned-list",name:"Banned List",image_url:null,icon:"lock_open",deskripsi:"Kelola Banned User"},{url:"ddl-list",name:"DDL Lampiran",image_url:null,icon:"insert_drive_file",deskripsi:"Kelola DDL Lampiran"},{url:"dns",name:"CNAME / A Record",image_url:null,icon:"badge",deskripsi:`sub-domain.${n.N.domain}`},{url:"cors-list",name:"CORS & API Key",image_url:null,icon:"privacy_tip",deskripsi:"Cross-Origin API"},{url:"email",name:"Email",image_url:null,icon:"alternate_email",deskripsi:`email.address@${n.N.domain}`},{url:"fansub-member",name:"Fansub Members",image_url:null,icon:"stars",deskripsi:"Keanggotaan Fansub"},{url:"information",name:"Informasi Dialog",image_url:null,icon:"live_help",deskripsi:"Popup Info Dialog"},{url:"project-type",name:"Project Type",image_url:null,icon:"loyalty",deskripsi:"Kategori Garapan"},{url:"push-notification",name:"Push Notification",image_url:null,icon:"notifications_active",deskripsi:"Pengumuman Dadakan"},{url:"user-list",name:"User List",image_url:null,icon:"supervisor_account",deskripsi:"Seluruh Member"}]}getAllNotif(d="",g=1,v=10,_="",m=""){return this.api.getData(`/notification?q=${d}&page=${g}&row=${v}&sort=${_}&order=${m}`)}createNotif(d){return this.api.postData("/notification",d)}deleteNotif(d){return this.api.deleteData(`/notification/${d}`)}getAllBanned(d="",g=1,v=10,_="",m=""){return this.api.getData(`/banned?q=${d}&page=${g}&row=${v}&sort=${_}&order=${m}`)}getBanned(d){return this.api.patchData("/banned",d)}unBan(d){return this.api.deleteData(`/banned/${d}`)}ban(d){return this.api.postData("/banned",d)}proDemote(d){return this.api.postData("/promote",d)}getAllCors(d="",g=1,v=10,_="",m=""){return this.api.getData(`/api-key?q=${d}&page=${g}&row=${v}&sort=${_}&order=${m}`)}revokeCors(d){return this.api.deleteData(`/api-key/${d}`)}}return E.\u0275fac=function(d){return new(d||E)(r.LFG(l.s),r.LFG(u.U))},E.\u0275prov=r.Yz7({token:E,factory:E.\u0275fac,providedIn:"root"}),E})()},519:(Je,F,s)=>{"use strict";s.d(F,{o:()=>u});var n=s(4650),r=s(9731),l=s(257);let u=(()=>{class o{constructor(x,d){this.api=x,this.gs=d}searchAnime(x){return this.api.getData(`/anime?q=${x}`)}getAnime(x){return this.api.getData(`/anime/${x}`)}addNewAnime(x){return this.api.patchData("/anime",x)}getSeasonalAnime(x,d){return this.api.getData(`/anime-seasonal?year=${x}&season=${d}`)}getBerkasAnime(x=[],d="",g=1,v=10,_="",m=""){return this.api.patchData(`/anime-berkas?q=${d}&page=${g}&row=${v}&sort=${_}&order=${m}`,{id:x})}getFansubAnime(x=[],d=1,g=10){return this.api.patchData(`/anime-fansub?page=${d}&row=${g}`,{id:x})}}return o.\u0275fac=function(x){return new(x||o)(n.LFG(r.s),n.LFG(l.U))},o.\u0275prov=n.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})()},9731:(Je,F,s)=>{"use strict";s.d(F,{s:()=>G});var n=s(529),r=s(4986),l=s(1165),u=s(4482),o=s(8421),E=s(3888),x=s(5403),d=s(9672);const g=(0,E.d)(Y=>function(ne=null){Y(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=ne});function v(Y,H){const{first:ne,each:fe,with:j=_,scheduler:$=H??r.z,meta:N=null}=(0,l.q)(Y)?{first:Y}:"number"==typeof Y?{each:Y}:Y;if(null==ne&&null==fe)throw new TypeError("No timeout provided.");return(0,u.e)((ee,ue)=>{let se,Oe,oe=null,Z=0;const de=q=>{Oe=(0,d.f)(ue,$,()=>{try{se.unsubscribe(),(0,o.Xf)(j({meta:N,lastValue:oe,seen:Z})).subscribe(ue)}catch(Ve){ue.error(Ve)}},q)};se=ee.subscribe((0,x.x)(ue,q=>{Oe?.unsubscribe(),Z++,ue.next(oe=q),fe>0&&de(fe)},void 0,void 0,()=>{Oe?.closed||Oe?.unsubscribe(),oe=null})),!Z&&de(null!=ne?"number"==typeof ne?ne:+ne-$.now():fe)})}function _(Y){throw new g(Y)}var m=s(5625),C=s(5934),O=s(4650),V=s(257);let G=(()=>{class Y{constructor(ne,fe){this.http=ne,this.gs=fe}HTTP_REQ_URL(ne){if(ne.startsWith("/")){let fe=C.N.baseUrl;ne.startsWith("/api/")||(fe+=C.N.apiUrl),ne=fe+ne}return ne}getData(ne,fe={},j=2e4,$=3){return this.gs.log("[API_GET]",ne),this.prepareOptions(fe),this.http.get(this.HTTP_REQ_URL(ne),fe).pipe(v(j),(0,m.X)($))}postData(ne,fe={},j=!1,$={},N=3e4){this.gs.log("[API_POST]",ne);let ee=fe;return j&&(ee=this.prepareFormData(fe)),this.prepareOptions($),this.http.post(this.HTTP_REQ_URL(ne),ee,$).pipe(v(N))}putData(ne,fe={},j=!1,$={},N=3e4){this.gs.log("[API_PUT]",ne);let ee=fe;return j&&(ee=this.prepareFormData(fe)),this.prepareOptions($),this.http.put(this.HTTP_REQ_URL(ne),ee,$).pipe(v(N))}patchData(ne,fe={},j=!1,$={},N=3e4){this.gs.log("[API_PATCH]",ne);let ee=fe;return j&&(ee=this.prepareFormData(fe)),this.prepareOptions($),this.http.patch(this.HTTP_REQ_URL(ne),ee,$).pipe(v(N))}deleteData(ne,fe={},j=2e4,$=3){return this.gs.log("[API_DELETE]",ne),this.prepareOptions(fe),this.http.delete(this.HTTP_REQ_URL(ne),fe).pipe(v(j),(0,m.X)($))}prepareOptions(ne){ne.headers instanceof n.WM||(ne.headers=new n.WM(ne.headers))}prepareFormData(ne){const fe=new FormData;for(const j in ne)ne.hasOwnProperty(j)&&fe.append(j,ne[j]);return fe}}return Y.\u0275fac=function(ne){return new(ne||Y)(O.LFG(n.eN),O.LFG(V.U))},Y.\u0275prov=O.Yz7({token:Y,factory:Y.\u0275fac,providedIn:"root"}),Y})()},4137:(Je,F,s)=>{"use strict";s.d(F,{e:()=>_});var n=s(1135),r=s(8505),l=s(4650),u=s(1390),o=s(257),E=s(3e3),x=s(3379),d=s(9731),g=s(8379),v=s(6925);let _=(()=>{class m{constructor(O,V,G,Y,H,ne,fe){this.router=O,this.gs=V,this.bs=G,this.ls=Y,this.api=H,this.cs=ne,this.toast=fe,this.currentUserSubject=new n.X(null),this.currentUser=this.currentUserSubject?.asObservable(),this.token=null,this.timeoutNotif=null,this.timeoutToast=null,this.logoutTimerText="",this.intervalLogout=null,this.gs.isBrowser&&(this.token=this.ls.getItem(this.gs.localStorageKeys.Token)||null,this.ls.removeItem(this.gs.localStorageKeys.Token))}verify(O){return this.gs.log("[AUTH_VERIFY]",O),this.api.patchData("/verify",{token:O}).pipe((0,r.b)(V=>{if(this.currentUserSubject?.next(V.result),this.token=V.token,this.token){const Y=new Date(1e3*this.cs.jwtView(this.token).exp).getTime(),H=Y-3e5;this.cleanUpTimeoutInterval(),this.timeoutNotif=setTimeout(()=>{this.timeoutToast=this.toast.warning("Sesi Akun Akan Habis!","Silahkan Logout & Login Ulang ...",{closeButton:!1,timeOut:Y-Date.now(),disableTimeOut:"extendedTimeOut",tapToDismiss:!1,progressAnimation:"decreasing"},!0)},H-Date.now()),this.intervalLogout=setInterval(()=>{const ne=Y-Date.now(),fe=Math.floor(ne/864e5),j=Math.floor(ne%864e5/36e5),$=Math.floor(ne%36e5/6e4),N=Math.floor(ne%6e4/1e3);this.logoutTimerText=`(${fe}:${String(j).padStart(2,"0")}:${String($).padStart(2,"0")}:${String(N).padStart(2,"0")})`,ne<0&&(clearInterval(this.intervalLogout),this.intervalLogout=null,this.logoutTimerText="")},1e3)}}))}resendActivation(O){return this.gs.log("[AUTH_ACTIVATION]",O),this.api.postData("/aktivasi",{id:O})}login(O){return this.gs.log("[AUTH_LOGIN]",O),this.api.postData("/login",O).pipe((0,r.b)(V=>{this.token=V.result.token}))}register(O){return this.gs.log("[AUTH_REGISTER]",O),this.api.postData("/register",O)}removeUser(){this.currentUserSubject?.next(null),this.token=null,this.cleanUpTimeoutInterval()}logout(O="/",V=null){this.gs.log("[AUTH_LOGOUT]",this.token),this.bs.busy(),this.api.deleteData("/logout").subscribe({next:G=>{this.gs.log("[LOGOUT_SUCCESS]",G),this.bs.idle(),this.removeUser(),this.ls.clear(),this.router.navigate([O],V)},error:G=>{this.gs.log("[LOGOUT_ERROR]",G,"error"),this.cleanUpTimeoutInterval(),this.bs.idle()}})}cleanUpTimeoutInterval(){this.timeoutNotif&&(clearTimeout(this.timeoutNotif),this.timeoutNotif=null),this.timeoutToast&&(this.toast.remove(this.timeoutToast.toastId),this.timeoutToast=null),this.intervalLogout&&(clearInterval(this.intervalLogout),this.intervalLogout=null,this.logoutTimerText="")}}return m.\u0275fac=function(O){return new(O||m)(l.LFG(u.F0),l.LFG(o.U),l.LFG(E.z),l.LFG(x.n),l.LFG(d.s),l.LFG(g.$),l.LFG(v.k))},m.\u0275prov=l.Yz7({token:m,factory:m.\u0275fac,providedIn:"root"}),m})()},8987:(Je,F,s)=>{"use strict";s.d(F,{A:()=>u});var n=s(4650),r=s(9731),l=s(257);let u=(()=>{class o{constructor(x,d){this.api=x,this.gs=d}delete(x){return this.api.deleteData(`/berkas/${x}`)}getAllBerkas(x="",d=1,g=10,v="",_="",m){return this.api.getData(`/berkas?q=${x}&page=${d}&row=${g}&sort=${v}&order=${_}${m?"&r18=true":""}`)}getBerkas(x){return this.api.getData(`/berkas/${x}`)}createBerkas(x){return this.api.postData("/berkas",x)}updateBerkas(x,d){return this.api.putData(`/berkas/${x}`,d)}checkTrusted(x=[]){return this.api.patchData("/berkas-trusted",{id:x})}}return o.\u0275fac=function(x){return new(x||o)(n.LFG(r.s),n.LFG(l.U))},o.\u0275prov=n.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})()},3e3:(Je,F,s)=>{"use strict";s.d(F,{z:()=>o});var n=s(7579),r=s(4650),l=s(8423),u=s(257);let o=(()=>{class E{constructor(d,g){this.spinnerService=d,this.gs=g,this.cancelPendingRequests$=new n.x,this.busyRequestCount=0,this.timedOut=null}get onCancelPendingRequests(){return this.cancelPendingRequests$.asObservable()}busy(){this.gs.isBrowser&&(this.busyRequestCount<=0&&this.spinnerService.show(),this.busyRequestCount++,this.gs.log("[BUSY_STATE_COUNTER_BUSY]",this.busyRequestCount),this.timedOut&&clearTimeout(this.timedOut),this.timedOut=setTimeout(()=>{this.clear(),this.timedOut=null},6e4))}idle(){this.gs.isBrowser&&(this.busyRequestCount--,this.busyRequestCount<=0&&(this.busyRequestCount=0,this.spinnerService.hide()),this.gs.log("[BUSY_STATE_COUNTER_IDLE]",this.busyRequestCount))}clear(){if(this.gs.isBrowser)for(;this.busyRequestCount>0;)this.idle(),this.cancelPendingRequests$.next()}}return E.\u0275fac=function(d){return new(d||E)(r.LFG(l.t2),r.LFG(u.U))},E.\u0275prov=r.Yz7({token:E,factory:E.\u0275fac,providedIn:"root"}),E})()},8379:(Je,F,s)=>{"use strict";s.d(F,{$:()=>x});var n=s(3172),r=s(7206),u=s(5934),o=s(4650),E=s(257);let x=(()=>{class d{constructor(v){this.gs=v,this.keySize=256,this.ivSize=128,this.iterations=100}universalBtoa(v){return this.convertToBase64(v)}universalAtob(v){return this.convertFromBase64(v)}convertToBase64(v){return this.convertEncoding(v).toString("base64")}convertFromBase64(v){return this.convertEncoding(v,"base64").toString()}convertEncoding(v,_=null){return _?n.lW.from(v,_):n.lW.from(v)}msgEncrypt(v,_=u.N.apiKey){const m=r.lib.WordArray.random(16),C=(0,r.PBKDF2)(_,m,{keySize:this.keySize/32,iterations:this.iterations}),O=r.lib.WordArray.random(16),V=r.AES.encrypt(v,C,{iv:O,padding:r.pad.Pkcs7,mode:r.mode.CBC});return m.toString()+O.toString()+V.toString()}msgDecrypt(v,_=u.N.apiKey){const m=r.enc.Hex.parse(v.substr(0,32)),C=r.enc.Hex.parse(v.substr(32,32)),O=v.substring(64),V=(0,r.PBKDF2)(_,m,{keySize:this.keySize/32,iterations:this.iterations});return r.AES.decrypt(O,V,{iv:C,padding:r.pad.Pkcs7,mode:r.mode.CBC}).toString(r.enc.Utf8)}hashPassword(v){return(0,r.SHA512)(v).toString()}jwtView(v){const m=v.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),C=decodeURIComponent(this.universalAtob(m).split("").map(O=>"%"+("00"+O.charCodeAt(0).toString(16)).slice(-2)).join(""));return JSON.parse(C)}}return d.\u0275fac=function(v){return new(v||d)(o.LFG(E.U))},d.\u0275prov=o.Yz7({token:d,factory:d.\u0275fac,providedIn:"root"}),d})()},7845:(Je,F,s)=>{"use strict";s.d(F,{x:()=>Js});var n=s(5861),r=s(6805);function l(Fe,Et){const Ue="object"==typeof Et;return new Promise((bt,Vt)=>{let yn,cn=!1;Fe.subscribe({next:In=>{yn=In,cn=!0},error:Vt,complete:()=>{cn?bt(yn):Ue?bt(Et.defaultValue):Vt(new r.K)}})})}var u=s(5412),o=s(4650),E=s(257),x=s(6895),d=s(4859),g=s(1861);function v(Fe,Et){if(1&Fe&&(o.TgZ(0,"small",6)(1,"i"),o._uU(2),o.qZA()()),2&Fe){const Ue=o.oxw();o.xp6(2),o.hij("* ",Ue.DATA.infoText,"")}}function _(Fe,Et){if(1&Fe&&(o.TgZ(0,"button",7),o._uU(1),o.qZA()),2&Fe){const Ue=o.oxw();o.Q6J("mat-dialog-close",!1),o.xp6(1),o.hij(" ",Ue.DATA.cancelText," ")}}let m=(()=>{class Fe{constructor(Ue,bt){this.data=Ue,this.gs=bt}get DATA(){return this.data}ngOnInit(){this.gs.log("[DIALOG_DATA_IN]",this.data)}}return Fe.\u0275fac=function(Ue){return new(Ue||Fe)(o.Y36(u.WI),o.Y36(E.U))},Fe.\u0275cmp=o.Xpm({type:Fe,selectors:[["app-material-dialog-info"]],decls:9,vars:8,consts:[["mat-dialog-title",""],["mat-dialog-content","",1,"text-break","text-warning",3,"innerHTML"],["mat-dialog-actions",""],["class","text-start m-2",4,"ngIf"],["type","button","mat-button","",1,"ms-auto","text-success","shiny",3,"mat-dialog-close"],["type","button","mat-button","",3,"mat-dialog-close",4,"ngIf"],[1,"text-start","m-2"],["type","button","mat-button","",3,"mat-dialog-close"]],template:function(Ue,bt){1&Ue&&(o.TgZ(0,"h1",0),o._uU(1),o.qZA(),o._UZ(2,"div",1),o.ALo(3,"safeInnerHtml"),o.TgZ(4,"div",2),o.YNc(5,v,3,1,"small",3),o.TgZ(6,"button",4),o._uU(7),o.qZA(),o.YNc(8,_,2,2,"button",5),o.qZA()),2&Ue&&(o.xp6(1),o.Oqu(bt.DATA.title),o.xp6(1),o.Q6J("innerHTML",o.lcZ(3,6,bt.DATA.htmlMessage),o.oJD),o.xp6(3),o.Q6J("ngIf",bt.DATA.infoText),o.xp6(1),o.Q6J("mat-dialog-close",!0),o.xp6(1),o.hij(" ",bt.DATA.confirmText," "),o.xp6(1),o.Q6J("ngIf",bt.DATA.cancelText))},dependencies:[x.O5,d.lW,u.ZT,u.uh,u.xY,u.H8,g.H]}),Fe})();var C=s(7392),O=s(266);const V=["dmakElement"];let G=(()=>{class Fe{constructor(Ue,bt){this.data=Ue,this.gs=bt,this.dmak=null,this.dmakUrl="/assets/kanji/",this.charToDraw="NO DATA"}get DATA(){return this.data}ngOnInit(){this.gs.log("[DIALOG_DATA_IN]",this.data),"hiragana_katakana_kanji"in this.data&&this.data.hiragana_katakana_kanji&&(this.charToDraw=this.data.hiragana_katakana_kanji)}ngAfterViewInit(){this.dmak=new Dmak(this.charToDraw,{element:"dmakElement",uri:this.dmakUrl,stroke:{order:{visible:!0},attr:{active:"#f44336",stroke:"#28a745"}}})}play(){this.dmak.render()}pause(){this.dmak.pause()}next(){this.pause(),this.dmak.renderNextStrokes(1)}back(){this.pause(),this.dmak.eraseLastStrokes(1)}reset(){this.pause(),this.dmak.erase()}}return Fe.\u0275fac=function(Ue){return new(Ue||Fe)(o.Y36(u.WI),o.Y36(E.U))},Fe.\u0275cmp=o.Xpm({type:Fe,selectors:[["app-material-dialog-dmak"]],viewQuery:function(Ue,bt){if(1&Ue&&o.Gf(V,5),2&Ue){let Vt;o.iGM(Vt=o.CRH())&&(bt.dmakElement=Vt.first)}},decls:10,vars:1,consts:[["mat-dialog-title",""],["mat-dialog-content","",1,"text-break"],["id","dmakElement",1,"text-center"],["dmakElement",""],["mat-dialog-actions",""],["type","button","mat-button","","matTooltip","Back",1,"ms-auto",3,"click"],["fontIcon","chevron_left"],["type","button","mat-button","","matTooltip","Next",3,"click"],["fontIcon","chevron_right"]],template:function(Ue,bt){1&Ue&&(o.TgZ(0,"h1",0),o._uU(1),o.qZA(),o.TgZ(2,"div",1),o._UZ(3,"div",2,3),o.qZA(),o.TgZ(5,"div",4)(6,"button",5),o.NdJ("click",function(){return bt.back()}),o._UZ(7,"mat-icon",6),o.qZA(),o.TgZ(8,"button",7),o.NdJ("click",function(){return bt.next()}),o._UZ(9,"mat-icon",8),o.qZA()()),2&Ue&&(o.xp6(1),o.hij("Cara Penulisan '",bt.DATA.romaji,"'"))},dependencies:[d.lW,u.uh,u.xY,u.H8,C.Hw,O.gM]}),Fe})();function Y(Fe){return null===Fe?"null":Fe!==Object(Fe)?typeof Fe:{}.toString.call(Fe).slice(8,-1).toLowerCase()}function H(Fe){return"string"!==Y(Fe)||!Fe.length}const N={useObsoleteKana:!1,passRomaji:!1,upcaseKatakana:!1,IMEMode:!1,convertLongVowelMark:!0,romanization:"hepburn"};var le=Number.isNaN||function(Et){return"number"==typeof Et&&Et!=Et};function P(Fe,Et){return!!(Fe===Et||le(Fe)&&le(Et))}function z(Fe,Et){if(Fe.length!==Et.length)return!1;for(var Ue=0;Ue{const Vt="string"===Y(bt);return Et[Ue]=Vt?{"":bt}:gn(bt),Et},{})}function Ot(Fe,Et){return Et.split("").reduce((Ue,bt)=>(void 0===Ue[bt]&&(Ue[bt]={}),Ue[bt]),Fe)}function pt(Fe={}){const Et={};return"object"===Y(Fe)&&Object.entries(Fe).forEach(([Ue,bt])=>{let Vt=Et;Ue.split("").forEach(cn=>{void 0===Vt[cn]&&(Vt[cn]={}),Vt=Vt[cn]}),Vt[""]=bt}),function(bt){return function cn(yn,In){return void 0===yn||"string"===Y(yn)?In:Object.entries(In).reduce((ei,[Ci,Ii])=>(ei[Ci]=cn(yn[Ci],Ii),ei),yn)}(JSON.parse(JSON.stringify(bt)),Et)}}function ut(Fe,Et){return Et?"function"===Y(Et)?Et(Fe):pt(Et)(Fe):Fe}const st={a:"\u3042",i:"\u3044",u:"\u3046",e:"\u3048",o:"\u304a",k:{a:"\u304b",i:"\u304d",u:"\u304f",e:"\u3051",o:"\u3053"},s:{a:"\u3055",i:"\u3057",u:"\u3059",e:"\u305b",o:"\u305d"},t:{a:"\u305f",i:"\u3061",u:"\u3064",e:"\u3066",o:"\u3068"},n:{a:"\u306a",i:"\u306b",u:"\u306c",e:"\u306d",o:"\u306e"},h:{a:"\u306f",i:"\u3072",u:"\u3075",e:"\u3078",o:"\u307b"},m:{a:"\u307e",i:"\u307f",u:"\u3080",e:"\u3081",o:"\u3082"},y:{a:"\u3084",u:"\u3086",o:"\u3088"},r:{a:"\u3089",i:"\u308a",u:"\u308b",e:"\u308c",o:"\u308d"},w:{a:"\u308f",i:"\u3090",e:"\u3091",o:"\u3092"},g:{a:"\u304c",i:"\u304e",u:"\u3050",e:"\u3052",o:"\u3054"},z:{a:"\u3056",i:"\u3058",u:"\u305a",e:"\u305c",o:"\u305e"},d:{a:"\u3060",i:"\u3062",u:"\u3065",e:"\u3067",o:"\u3069"},b:{a:"\u3070",i:"\u3073",u:"\u3076",e:"\u3079",o:"\u307c"},p:{a:"\u3071",i:"\u3074",u:"\u3077",e:"\u307a",o:"\u307d"},v:{a:"\u3094\u3041",i:"\u3094\u3043",u:"\u3094",e:"\u3094\u3047",o:"\u3094\u3049"}},dt={".":"\u3002",",":"\u3001",":":"\uff1a","/":"\u30fb","!":"\uff01","?":"\uff1f","~":"\u301c","-":"\u30fc","\u2018":"\u300c","\u2019":"\u300d","\u201c":"\u300e","\u201d":"\u300f","[":"\uff3b","]":"\uff3d","(":"\uff08",")":"\uff09","{":"\uff5b","}":"\uff5d"},rt={k:"\u304d",s:"\u3057",t:"\u3061",n:"\u306b",h:"\u3072",m:"\u307f",r:"\u308a",g:"\u304e",z:"\u3058",d:"\u3062",b:"\u3073",p:"\u3074",v:"\u3094",q:"\u304f",f:"\u3075"},Rt={ya:"\u3083",yi:"\u3043",yu:"\u3085",ye:"\u3047",yo:"\u3087"},jt={a:"\u3041",i:"\u3043",u:"\u3045",e:"\u3047",o:"\u3049"},un={sh:"sy",ch:"ty",cy:"ty",chy:"ty",shy:"sy",j:"zy",jy:"zy",shi:"si",chi:"ti",tsu:"tu",ji:"zi",fu:"hu"},Mn=Object.assign({tu:"\u3063",wa:"\u308e",ka:"\u30f5",ke:"\u30f6"},jt,Rt),zt={yi:"\u3044",wu:"\u3046",ye:"\u3044\u3047",wi:"\u3046\u3043",we:"\u3046\u3047",kwa:"\u304f\u3041",whu:"\u3046",tha:"\u3066\u3083",thu:"\u3066\u3085",tho:"\u3066\u3087",dha:"\u3067\u3083",dhu:"\u3067\u3085",dho:"\u3067\u3087"},ln={wh:"\u3046",qw:"\u304f",q:"\u304f",gw:"\u3050",sw:"\u3059",ts:"\u3064",th:"\u3066",tw:"\u3068",dh:"\u3067",dw:"\u3069",fw:"\u3075",f:"\u3075"},Ze={kwi:"\u304f\u3043",kuxi:"\u304f\u3043",kuli:"\u304f\u3043",kwe:"\u304f\u3047",kuxe:"\u304f\u3047",kule:"\u304f\u3047",kwo:"\u304f\u3049",kuxo:"\u304f\u3049",kulo:"\u304f\u3049"};function Ct(){const Fe=gn(st),Et=Vt=>Ot(Fe,Vt);function bt(Vt){return Object.entries(Vt).reduce((cn,[yn,In])=>(cn[yn]=yn?bt(In):`\u3063${In}`,cn),{})}return Object.entries(rt).forEach(([Vt,cn])=>{Object.entries(Rt).forEach(([yn,In])=>{Et(Vt+yn)[""]=cn+In})}),Object.entries(dt).forEach(([Vt,cn])=>{Et(Vt)[""]=cn}),Object.entries(Ze).forEach(([Vt,cn])=>{Et(Vt)[""]=cn}),Object.entries(ln).forEach(([Vt,cn])=>{Object.entries(jt).forEach(([yn,In])=>{Et(Vt+yn)[""]=cn+In})}),["n","n'","xn"].forEach(Vt=>{Et(Vt)[""]="\u3093"}),Fe.c=JSON.parse(JSON.stringify(Fe.k)),Object.entries(un).forEach(([Vt,cn])=>{const yn=Vt.slice(0,Vt.length-1),In=Vt.charAt(Vt.length-1);Et(yn)[In]=JSON.parse(JSON.stringify(Et(cn)))}),Object.entries(Mn).forEach(([Vt,cn])=>{const yn=Ri=>Ri.charAt(Ri.length-1),In=Ri=>Ri.slice(0,Ri.length-1),Ci=Et(`x${Vt}`);Ci[""]=cn,Et(`l${In(Vt)}`)[yn(Vt)]=Ci,function Ue(Vt){return[...Object.entries(un),["c","k"]].reduce((cn,[yn,In])=>Vt.startsWith(In)?cn.concat(Vt.replace(In,yn)):cn,[])}(Vt).forEach(Ri=>{["l","x"].forEach(Vr=>{Et(Vr+In(Ri))[yn(Ri)]=Et(Vr+Vt)})})}),Object.entries(zt).forEach(([Vt,cn])=>{Et(Vt)[""]=cn}),[...Object.keys(rt),"c","y","w","j"].forEach(Vt=>{const cn=Fe[Vt];cn[Vt]=bt(cn)}),delete Fe.n.n,Object.freeze(JSON.parse(JSON.stringify(Fe)))}let Ht=null;const Nn=pt({wi:"\u3090",we:"\u3091"});function gt(Fe=""){return!H(Fe)&&12540===Fe.charCodeAt(0)}function or(Fe=""){return function ne(Fe="",Et,Ue){if(H(Fe))return!1;const bt=Fe.charCodeAt(0);return Et<=bt&&bt<=Ue}(Fe,12449,12540)}Re((Fe,Et,Ue)=>{let bt=function rn(){return null==Ht&&(Ht=Ct()),Ht}();return bt=Fe?function Wn(Fe){const Et=JSON.parse(JSON.stringify(Fe));return Et.n.n={"":"\u3093"},Et.n[" "]={"":"\u3093"},Et}(bt):bt,bt=Et?Nn(bt):bt,Ue&&(bt=ut(bt,Ue)),bt},Nt);const $t={a:"\u3042",i:"\u3044",u:"\u3046",e:"\u3048",o:"\u3046"};function dn(Fe="",Et,{isDestinationRomaji:Ue,convertLongVowelMark:bt}={}){let Vt="";return Fe.split("").reduce((cn,yn,In)=>{if(function Ye(Fe=""){return!H(Fe)&&12539===Fe.charCodeAt(0)}(yn)||((Fe,Et)=>gt(Fe)&&Et<1)(yn,In)||(Fe=>["\u30f6","\u30f5"].includes(Fe))(yn))return cn.concat(yn);if(bt&&Vt&&((Fe,Et)=>gt(Fe)&&Et>0)(yn,In)){const ei=Et(Vt).slice(-1);return or(Fe[In-1])&&"o"===ei&&Ue?cn.concat("\u304a"):cn.concat($t[ei])}if(!gt(yn)&&or(yn)){const ei=yn.charCodeAt(0)+-96,Ci=String.fromCharCode(ei);return Vt=Ci,cn.concat(Ci)}return Vt="",cn.concat(yn)},[]).join("")}let Cn=null;const Kn={\u3042:"a",\u3044:"i",\u3046:"u",\u3048:"e",\u304a:"o",\u304b:"ka",\u304d:"ki",\u304f:"ku",\u3051:"ke",\u3053:"ko",\u3055:"sa",\u3057:"shi",\u3059:"su",\u305b:"se",\u305d:"so",\u305f:"ta",\u3061:"chi",\u3064:"tsu",\u3066:"te",\u3068:"to",\u306a:"na",\u306b:"ni",\u306c:"nu",\u306d:"ne",\u306e:"no",\u306f:"ha",\u3072:"hi",\u3075:"fu",\u3078:"he",\u307b:"ho",\u307e:"ma",\u307f:"mi",\u3080:"mu",\u3081:"me",\u3082:"mo",\u3089:"ra",\u308a:"ri",\u308b:"ru",\u308c:"re",\u308d:"ro",\u3084:"ya",\u3086:"yu",\u3088:"yo",\u308f:"wa",\u3090:"wi",\u3091:"we",\u3092:"wo",\u3093:"n",\u304c:"ga",\u304e:"gi",\u3050:"gu",\u3052:"ge",\u3054:"go",\u3056:"za",\u3058:"ji",\u305a:"zu",\u305c:"ze",\u305e:"zo",\u3060:"da",\u3062:"ji",\u3065:"zu",\u3067:"de",\u3069:"do",\u3070:"ba",\u3073:"bi",\u3076:"bu",\u3079:"be",\u307c:"bo",\u3071:"pa",\u3074:"pi",\u3077:"pu",\u307a:"pe",\u307d:"po",\u3094\u3041:"va",\u3094\u3043:"vi",\u3094:"vu",\u3094\u3047:"ve",\u3094\u3049:"vo"},Hi={"\u3002":".","\u3001":",","\uff1a":":","\u30fb":"/","\uff01":"!","\uff1f":"?","\u301c":"~",\u30fc:"-","\u300c":"\u2018","\u300d":"\u2019","\u300e":"\u201c","\u300f":"\u201d","\uff3b":"[","\uff3d":"]","\uff08":"(","\uff09":")","\uff5b":"{","\uff5d":"}","\u3000":" "},Ti=["\u3042","\u3044","\u3046","\u3048","\u304a","\u3084","\u3086","\u3088"],Oi={\u3083:"ya",\u3085:"yu",\u3087:"yo"},pr={\u3043:"yi",\u3047:"ye"},Rs={\u3041:"a",\u3043:"i",\u3045:"u",\u3047:"e",\u3049:"o"},Es=["\u304d","\u306b","\u3072","\u307f","\u308a","\u304e","\u3073","\u3074","\u3094","\u304f","\u3075"],Cr={\u3057:"sh",\u3061:"ch",\u3058:"j",\u3062:"j"},Yr={\u3063:"",\u3083:"ya",\u3085:"yu",\u3087:"yo",\u3041:"a",\u3043:"i",\u3045:"u",\u3047:"e",\u3049:"o"},Dr={b:"b",c:"t",d:"d",f:"f",g:"g",h:"h",j:"j",k:"k",m:"m",p:"p",q:"q",r:"r",s:"s",t:"t",v:"v",w:"w",x:"x",z:"z"};function Kr(){return null==Cn&&(Cn=function is(){const Fe=gn(Kn),Et=bt=>Ot(Fe,bt),Ue=(bt,Vt)=>{Et(bt)[""]=Vt};return Object.entries(Hi).forEach(([bt,Vt])=>{Et(bt)[""]=Vt}),[...Object.entries(Oi),...Object.entries(Rs)].forEach(([bt,Vt])=>{Ue(bt,Vt)}),Es.forEach(bt=>{const Vt=Et(bt)[""][0];Object.entries(Oi).forEach(([cn,yn])=>{Ue(bt+cn,Vt+yn)}),Object.entries(pr).forEach(([cn,yn])=>{Ue(bt+cn,Vt+yn)})}),Object.entries(Cr).forEach(([bt,Vt])=>{Object.entries(Oi).forEach(([cn,yn])=>{Ue(bt+cn,Vt+yn[1])}),Ue(`${bt}\u3043`,`${Vt}yi`),Ue(`${bt}\u3047`,`${Vt}e`)}),Fe.\u3063=Er(Fe),Object.entries(Yr).forEach(([bt,Vt])=>{Ue(bt,Vt)}),Ti.forEach(bt=>{Ue(`\u3093${bt}`,`n'${Et(bt)[""]}`)}),Object.freeze(JSON.parse(JSON.stringify(Fe)))}()),Cn}function Er(Fe){return Object.entries(Fe).reduce((Et,[Ue,bt])=>{if(Ue)Et[Ue]=Er(bt);else{const Vt=bt.charAt(0);Et[Ue]=Object.keys(Dr).includes(Vt)?Dr[Vt]+bt:bt}return Et},{})}const Zr=Re((Fe,Et)=>{let Ue=function hs(Fe){return"hepburn"===Fe?Kr():{}}(Fe);return Et&&(Ue=ut(Ue,Et)),Ue},Nt);function _r(Fe="",Et={},Ue){const bt=((Fe={})=>Object.assign({},N,Fe))(Et);return Ue||(Ue=Zr(bt.romanization,bt.customRomajiMapping)),function rs(Fe,Et,Ue){Ue||(Ue=Zr(Et.romanization,Et.customRomajiMapping));return Rn(dn(Fe,_r,Object.assign({},{isDestinationRomaji:!0},Et)),Ue,!Et.IMEMode)}(Fe,bt,Ue).map(Vt=>{const[cn,yn,In]=Vt;return bt.upcaseKatakana&&function Rr(Fe=""){return!H(Fe)&&[...Fe].every(or)}(Fe.slice(cn,yn))?In.toUpperCase():In}).join("")}var os=s(2663),ms=s(3238),ar=s(6338),ks=s(192);const as=["dmakElement"];function Fr(Fe,Et){if(1&Fe&&(o.TgZ(0,"li"),o._uU(1),o.qZA()),2&Fe){const Ue=Et.$implicit,bt=o.oxw();o.xp6(1),o.AsE(" ",Ue," (",bt.getRomaji(Ue),") ")}}function lr(Fe,Et){if(1&Fe&&(o.TgZ(0,"li"),o._uU(1),o.qZA()),2&Fe){const Ue=Et.$implicit,bt=o.oxw();o.xp6(1),o.AsE(" ",Ue," (",bt.getRomaji(Ue),") ")}}function Qs(Fe,Et){if(1&Fe){const Ue=o.EpF();o.TgZ(0,"mat-list-option",25),o.NdJ("click",function(){const cn=o.CHM(Ue).$implicit,yn=o.oxw(2);return o.KtG(yn.openVocab(cn))}),o.TgZ(1,"h4",26),o._uU(2),o.qZA(),o.TgZ(3,"h5",27),o._uU(4),o.qZA(),o.TgZ(5,"p",28),o._uU(6),o.qZA()()}if(2&Fe){const Ue=Et.$implicit,bt=o.oxw(2);o.xp6(2),o.Oqu(Ue.kanji),o.xp6(2),o.AsE("",Ue.reading," (",bt.getRomaji(Ue.reading),")"),o.xp6(2),o.Oqu(Ue.meaning)}}function ls(Fe,Et){if(1&Fe&&(o.TgZ(0,"div")(1,"mat-selection-list",23),o.YNc(2,Qs,7,4,"mat-list-option",24),o.qZA()()),2&Fe){const Ue=o.oxw();o.xp6(1),o.Q6J("multiple",!1),o.xp6(1),o.Q6J("ngForOf",Ue.edict)}}function qi(Fe,Et){1&Fe&&o._UZ(0,"app-no-data")}function Bi(Fe,Et){if(1&Fe){const Ue=o.EpF();o.TgZ(0,"div",29)(1,"button",30),o.NdJ("click",function(){o.CHM(Ue);const Vt=o.oxw();return o.KtG(Vt.loadNextPage())}),o._uU(2,"Load More ..."),o.qZA()()}}let Tr=(()=>{class Fe{constructor(Ue,bt,Vt){this.data=Ue,this.nihon=bt,this.gs=Vt,this.dmak=null,this.dmakUrl="/assets/kanji/",this.charToDraw="NO DATA",this.edict=[],this.page=1,this.pageFinished=!1,this.subsEdict=null}get DATA(){return this.data}getRomaji(Ue){return _r(Ue)}ngOnInit(){this.gs.log("[DIALOG_DATA_IN]",this.data),"character"in this.data&&this.data.character&&(this.charToDraw=this.data.character),this.loadEdict()}ngOnDestroy(){this.subsEdict?.unsubscribe()}ngAfterViewInit(){this.dmak=new Dmak(this.charToDraw,{element:"dmakElement",uri:this.dmakUrl,stroke:{order:{visible:!0},attr:{active:"#f44336",stroke:"#28a745"}}})}loadEdict(){this.subsEdict=this.nihon.getAllEdict(this.charToDraw,this.page).subscribe({next:Ue=>{this.gs.log("[EDICT_LIST_SUCCESS]",Ue),this.edict=[...this.edict,...Ue.results],Ue.results.length<=0&&(this.pageFinished=!0)},error:Ue=>{this.gs.log("[EDICT_LIST_ERROR]",Ue,"error")}})}loadNextPage(){this.pageFinished||(this.page++,this.loadEdict())}openVocab(Ue){this.gs.log("[EDICT_LIST_CLICK_VOCAB]",Ue)}}return Fe.\u0275fac=function(Ue){return new(Ue||Fe)(o.Y36(u.WI),o.Y36(os.a),o.Y36(E.U))},Fe.\u0275cmp=o.Xpm({type:Fe,selectors:[["app-material-dialog-edict"]],viewQuery:function(Ue,bt){if(1&Ue&&o.Gf(as,5),2&Ue){let Vt;o.iGM(Vt=o.CRH())&&(bt.dmakElement=Vt.first)}},decls:42,vars:10,consts:[["mat-dialog-title",""],["mat-dialog-content","",1,"text-break"],[1,"row"],[1,"col-md-4","col-xl-3"],[1,"row","sticky-top","p-3"],[1,"col-12"],["id","dmakElement",1,"text-center"],["dmakElement",""],[1,"col-12","mt-3"],[1,"text-warning"],[1,"text-truncate"],[1,"text-success"],[1,"text-truncate","mt-3"],[1,"text-success","m-0"],[4,"ngFor","ngForOf"],[1,"col-md-8","col-xl-9"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"border-bottom-dotted"],[1,"text-bifeldy"],[4,"ngIf"],["class","col-12 text-center p-3",4,"ngIf"],["mat-dialog-actions",""],["type","button","mat-button","",1,"ms-auto",3,"mat-dialog-close"],[3,"multiple"],[3,"click",4,"ngFor","ngForOf"],[3,"click"],["matLine","",1,"px-3"],["matLine","",1,"px-3","text-success"],["matLine","",1,"px-3","text-warning"],[1,"col-12","text-center","p-3"],["type","button","mat-button","",3,"click"]],template:function(Ue,bt){1&Ue&&(o.TgZ(0,"h1",0),o._uU(1),o.qZA(),o.TgZ(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4)(6,"div",5),o._UZ(7,"div",6,7),o.qZA(),o.TgZ(9,"div",8)(10,"p",9),o._uU(11),o.qZA()(),o.TgZ(12,"div",5)(13,"div",10),o._uU(14," JLPT Level :: "),o.TgZ(15,"span",11),o._uU(16),o.qZA()(),o.TgZ(17,"div",10),o._uU(18," School Level :: "),o.TgZ(19,"span",11),o._uU(20),o.qZA()(),o.TgZ(21,"div",12),o._uU(22," Kunyomi :: "),o.TgZ(23,"ul",13),o.YNc(24,Fr,2,2,"li",14),o.qZA()(),o.TgZ(25,"div",10),o._uU(26," Onyomi :: "),o.TgZ(27,"ul",13),o.YNc(28,lr,2,2,"li",14),o.qZA()()()()(),o.TgZ(29,"div",15)(30,"div",2)(31,"div",16)(32,"h2",17)(33,"b",18),o._uU(34,"Kosa Kata"),o.qZA()()(),o.TgZ(35,"div",5),o.YNc(36,ls,3,2,"div",19),o.YNc(37,qi,1,0,"app-no-data",19),o.qZA(),o.YNc(38,Bi,3,0,"div",20),o.qZA()()()(),o.TgZ(39,"div",21)(40,"button",22),o._uU(41,"Tutup"),o.qZA()()),2&Ue&&(o.xp6(1),o.hij("Kamus Dictionary '",bt.DATA.character,"'"),o.xp6(10),o.Oqu(bt.DATA.translate),o.xp6(5),o.hij("N",bt.DATA.jlpt,""),o.xp6(4),o.Oqu(bt.DATA.school),o.xp6(4),o.Q6J("ngForOf",bt.DATA.v_kunyomi.split(",")),o.xp6(4),o.Q6J("ngForOf",bt.DATA.v_onyomi.split(",")),o.xp6(8),o.Q6J("ngIf",bt.edict.length>0),o.xp6(1),o.Q6J("ngIf",bt.edict.length<=0),o.xp6(1),o.Q6J("ngIf",!bt.pageFinished),o.xp6(2),o.Q6J("mat-dialog-close",!0))},dependencies:[x.sg,x.O5,d.lW,u.ZT,u.uh,u.xY,u.H8,ms.X2,ar.Ub,ar.vS,ks.d]}),Fe})();var Zn=s(4006),Hn=s(6271),Us=s(3e3),gs=s(7902),_s=s(1390),Hr=s(9549),Jr=s(4144),Lr=s(3170),vs=s(3626);function so(Fe,Et){if(1&Fe&&(o.TgZ(0,"div"),o._uU(1),o.ALo(2,"bytes"),o.qZA()),2&Fe){const Ue=o.oxw(2);o.xp6(1),o.hij("Ukuran Upload Melebihi Batas ",o.lcZ(2,1,Ue.imageLimitExceeded)," !")}}function an(Fe,Et){if(1&Fe&&(o.TgZ(0,"div"),o._uU(1),o.qZA()),2&Fe){const Ue=o.oxw(2);o.xp6(1),o.Oqu(Ue.imageErrorText)}}function Gn(Fe,Et){1&Fe&&(o.TgZ(0,"div"),o._uU(1,"Gambar Wajib Ada!"),o.qZA())}function vr(Fe,Et){if(1&Fe){const Ue=o.EpF();o.TgZ(0,"div",7)(1,"button",25),o.NdJ("click",function(){o.CHM(Ue);const Vt=o.oxw(2);return o.KtG(Vt.submitImage())}),o._UZ(2,"mat-icon",26),o._uU(3," Unggah "),o.qZA()()}if(2&Fe){const Ue=o.oxw(2);o.xp6(1),o.Q6J("disabled",Ue.submitted)}}function Fs(Fe,Et){1&Fe&&(o.TgZ(0,"div"),o._uU(1,"Kana Tidak Boleh Kosong"),o.qZA())}function rr(Fe,Et){1&Fe&&(o.TgZ(0,"div"),o._uU(1,"Kana Hanya Boleh Huruf Jepang"),o.qZA())}function _e(Fe,Et){1&Fe&&(o.TgZ(0,"div"),o._uU(1,"Romaji Tidak Boleh Kosong"),o.qZA())}function ce(Fe,Et){1&Fe&&(o.TgZ(0,"div"),o._uU(1,"Romaji Hanya Boleh Huruf Standar Papan Ketik"),o.qZA())}function Q(Fe,Et){1&Fe&&(o.TgZ(0,"div"),o._uU(1,"Arti Tidak Boleh Kosong"),o.qZA())}function We(Fe,Et){1&Fe&&(o.TgZ(0,"div"),o._uU(1,"Arti Hanya Boleh Huruf Standar Papan Ketik"),o.qZA())}function Qt(Fe,Et){if(1&Fe&&(o.TgZ(0,"div",5)(1,"div",27),o._uU(2," Last Edit By :: "),o.TgZ(3,"a",28),o._uU(4),o.qZA()()()),2&Fe){const Ue=o.oxw(2);o.xp6(3),o.MGl("routerLink","/user/",null==Ue.DATA.dataset||null==Ue.DATA.dataset.user_?null:Ue.DATA.dataset.user_.username,""),o.xp6(1),o.hij(" ",null==Ue.DATA.dataset||null==Ue.DATA.dataset.user_?null:Ue.DATA.dataset.user_.username," ")}}function wn(Fe,Et){if(1&Fe){const Ue=o.EpF();o.TgZ(0,"form",4)(1,"div",5)(2,"div",6)(3,"div",5)(4,"div",7),o._UZ(5,"img",8),o.TgZ(6,"mat-form-field",9)(7,"mat-label"),o._uU(8,"Gambar"),o.qZA(),o.TgZ(9,"ngx-mat-file-input",10,11),o.NdJ("change",function(Vt){o.CHM(Ue);const cn=o.MAs(10),yn=o.oxw();return o.KtG(yn.uploadImage(Vt,cn))}),o.qZA(),o._UZ(11,"mat-icon",12),o.qZA(),o.TgZ(12,"mat-error",13)(13,"small"),o.YNc(14,so,3,3,"div",14),o.YNc(15,an,2,1,"div",14),o.YNc(16,Gn,2,0,"div",14),o.qZA()()(),o.YNc(17,vr,4,1,"div",15),o.qZA()(),o.TgZ(18,"div",16)(19,"div",5)(20,"mat-form-field",17)(21,"mat-label"),o._uU(22,"Kana"),o.qZA(),o._UZ(23,"input",18)(24,"mat-icon",19),o.TgZ(25,"mat-error"),o.YNc(26,Fs,2,0,"div",14),o.YNc(27,rr,2,0,"div",14),o.qZA()(),o.TgZ(28,"mat-form-field",17)(29,"mat-label"),o._uU(30,"Romaji"),o.qZA(),o._UZ(31,"input",20)(32,"mat-icon",21),o.TgZ(33,"mat-error"),o.YNc(34,_e,2,0,"div",14),o.YNc(35,ce,2,0,"div",14),o.qZA()(),o.TgZ(36,"mat-form-field",17)(37,"mat-label"),o._uU(38,"Arti Terjemahan"),o.qZA(),o._UZ(39,"input",22)(40,"mat-icon",23),o.TgZ(41,"mat-error"),o.YNc(42,Q,2,0,"div",14),o.YNc(43,We,2,0,"div",14),o.qZA()()(),o.YNc(44,Qt,5,2,"div",24),o.qZA()()()}if(2&Fe){const Ue=o.oxw();o.Q6J("formGroup",Ue.fg),o.xp6(5),o.Q6J("src",Ue.image_url,o.LSH),o.xp6(1),o.Q6J("color","accent"),o.xp6(3),o.Q6J("disabled",Ue.fg.value.image)("accept","image/gif, image/jpeg, image/jpg, image/png"),o.xp6(5),o.Q6J("ngIf",Ue.imageLimitExceeded),o.xp6(1),o.Q6J("ngIf",Ue.imageErrorText),o.xp6(1),o.Q6J("ngIf",Ue.fg.get("image").hasError("required")),o.xp6(1),o.Q6J("ngIf",Ue.image&&!Ue.fg.value.image),o.xp6(3),o.Q6J("color","accent"),o.xp6(6),o.Q6J("ngIf",Ue.fg.get("kana").hasError("required")),o.xp6(1),o.Q6J("ngIf",Ue.fg.get("kana").hasError("pattern")),o.xp6(1),o.Q6J("color","accent"),o.xp6(6),o.Q6J("ngIf",Ue.fg.get("romaji").hasError("required")),o.xp6(1),o.Q6J("ngIf",Ue.fg.get("romaji").hasError("pattern")),o.xp6(1),o.Q6J("color","accent"),o.xp6(6),o.Q6J("ngIf",Ue.fg.get("meaning").hasError("required")),o.xp6(1),o.Q6J("ngIf",Ue.fg.get("meaning").hasError("pattern")),o.xp6(1),o.Q6J("ngIf",null==Ue.DATA.dataset?null:Ue.DATA.dataset.user_)}}function Xn(Fe,Et){if(1&Fe&&(o.TgZ(0,"button",32),o._uU(1),o.qZA()),2&Fe){const Ue=o.oxw(2);o.Q6J("mat-dialog-close",null),o.xp6(1),o.hij(" ",Ue.DATA.cancelText," ")}}function Mr(Fe,Et){if(1&Fe){const Ue=o.EpF();o.TgZ(0,"div",29)(1,"button",30),o.NdJ("click",function(){o.CHM(Ue);const Vt=o.oxw();return o.KtG(Vt.saveData())}),o._uU(2),o.qZA(),o.YNc(3,Xn,2,2,"button",31),o.qZA()}if(2&Fe){const Ue=o.oxw();o.xp6(1),o.Q6J("disabled",Ue.submitted||Ue.fg.invalid||!Ue.fg.dirty),o.xp6(1),o.hij(" ",Ue.DATA.confirmText," "),o.xp6(1),o.Q6J("ngIf",Ue.DATA.cancelText)}}let Ni=(()=>{class Fe{constructor(Ue,bt,Vt,cn,yn,In,ei){this.fb=Ue,this.bs=bt,this.imgbb=Vt,this.nihongo=cn,this.dialogRef=yn,this.data=In,this.gs=ei,this.submitted=!1,this.image=null,this.imageErrorText=null,this.imageLimitExceeded=null,this.image_url="/assets/img/form/no-image.png",this.image_url_original=null,this.gambar=null,this.subsNihongo=null,this.subsImgbb=null}get DATA(){return this.data}ngOnInit(){this.gs.isBrowser&&(this.gs.log("[DIALOG_DATA_IN]",this.data),this.initForm(this.data?.dataset))}ngOnDestroy(){this.subsImgbb?.unsubscribe(),this.subsNihongo?.unsubscribe()}initForm(Ue){this.fg=this.fb.group({kana:[Ue?.kana,Zn.kI.compose([Zn.kI.required,Zn.kI.pattern(Hn.t.regexJapaneseKeyboardKeys)])],romaji:[Ue?.romaji,Zn.kI.compose([Zn.kI.required,Zn.kI.pattern(Hn.t.regexEnglishKeyboardKeys)])],meaning:[Ue?.meaning,Zn.kI.compose([Zn.kI.required,Zn.kI.pattern(Hn.t.regexEnglishKeyboardKeys)])],category:[Ue?.category||this.data.modeTampilan,Zn.kI.compose([Zn.kI.required,Zn.kI.pattern(Hn.t.regexEnglishKeyboardKeys)])],image:[null,Zn.kI.compose([Zn.kI.pattern(Hn.t.regexUrl)])]}),Ue?this.image_url=Ue?.image_url:this.fg.controls.image.setValidators([Zn.kI.required,Zn.kI.pattern(Hn.t.regexEnglishKeyboardKeys)]),this.image_url_original=this.image_url}uploadImage(Ue,bt){this.gambar=bt,this.image=null,this.imageLimitExceeded=null,this.imageErrorText=null,this.fg.controls.image.patchValue(null),this.fg.controls.image.markAsPristine();const Vt=Ue.target.files[0];try{const cn=new FileReader;cn.readAsDataURL(Vt),cn.onload=yn=>{if(this.gs.log("[IMAGE_SELECTED]",yn),Vt.size<=Hn.t.fileSizeImageLimit){const In=this.gs.document.createElement("img");In.onload=()=>{this.image=Vt,this.image_url=cn.result.toString()},In.src=cn.result.toString()}else this.image=null,this.image_url="/assets/img/form/image-error.png",this.imageLimitExceeded=Hn.t.fileSizeImageLimit,this.gambar.clear(Ue)}}catch{this.image=null,this.image_url=this.image_url_original,this.gambar.clear(Ue)}}submitImage(){this.submitted=!0,this.subsImgbb=this.imgbb.uploadImage({file:this.image}).subscribe({next:Ue=>{this.gs.log("[IMAGE_SUCCESS]",Ue),this.fg.controls.image.patchValue(Ue.result.url),this.fg.controls.image.markAsDirty(),this.submitted=!1},error:Ue=>{this.gs.log("[IMAGE_ERROR]",Ue,"error"),this.fg.controls.image.patchValue(null),this.fg.controls.image.markAsPristine(),this.submitted=!1,this.imageErrorText=Ue.result?.message||Ue.info}})}saveData(){this.bs.busy(),this.submitted=!0;let Ue=null;if(this.data?.dataset&&(Ue=this.gs.getDirtyValues(this.fg),this.gs.log("[NIHONGO_ADD_OR_EDIT_DIRTY]",Ue)),this.fg.invalid)return this.submitted=!1,void this.bs.idle();this.subsNihongo=Ue?this.nihongo.updateNihongo(this.data.dataset.id,{...Ue}):this.nihongo.createNihongo({image:this.fg.value.image,kana:this.fg.value.kana,romaji:this.fg.value.romaji,meaning:this.fg.value.meaning,category:this.fg.value.category}),this.subsNihongo=this.subsNihongo.subscribe({next:bt=>{this.gs.log("[NIHONGO_ADD_OR_EDIT_SUCCESS]",bt),this.submitted=!1,this.bs.idle(),this.dialogRef.close(bt)},error:bt=>{this.gs.log("[NIHONGO_ADD_OR_EDIT_ERROR]",bt,"error"),this.submitted=!1,this.bs.idle()}})}}return Fe.\u0275fac=function(Ue){return new(Ue||Fe)(o.Y36(Zn.QS),o.Y36(Us.z),o.Y36(gs.X),o.Y36(os.a),o.Y36(u.so),o.Y36(u.WI),o.Y36(E.U))},Fe.\u0275cmp=o.Xpm({type:Fe,selectors:[["app-material-dialog-belajar"]],decls:5,vars:4,consts:[["mat-dialog-title",""],["mat-dialog-content","",1,"text-break","text-warning"],[3,"formGroup",4,"ngIf"],["mat-dialog-actions","",4,"ngIf"],[3,"formGroup"],[1,"row"],[1,"col-12","col-md-5","col-xl-4","p-3"],[1,"col-12"],[1,"w-100","border",3,"src"],["appearance","outline",1,"pt-3","w-100",3,"color"],[1,"w-100",3,"disabled","accept","change"],["gambar",""],["fontIcon","image","matSuffix",""],[1,"px-3","pb-3","w-100"],[4,"ngIf"],["class","col-12",4,"ngIf"],[1,"col-12","col-md-7","col-xl-8","pt-3"],["appearance","outline",1,"p-3","col-12",3,"color"],["matInput","","formControlName","kana","placeholder","\u8910\u8272"],["fontIcon","translate","matSuffix",""],["matInput","","formControlName","romaji","placeholder","Kasshoku"],["fontIcon","text_fields","matSuffix",""],["matInput","","formControlName","meaning","placeholder","Coklat"],["fontIcon","g_translate","matSuffix",""],["class","row",4,"ngIf"],["type","button","mat-raised-button","","color","primary","type","button",1,"w-100",3,"disabled","click"],["fontIcon","add_photo_alternate",1,"me-1"],[1,"col","text-end"],[1,"text-success",2,"text-decoration","none",3,"routerLink"],["mat-dialog-actions",""],["type","button","mat-button","",1,"ms-auto","text-success",3,"disabled","click"],["type","button","mat-button","",3,"mat-dialog-close",4,"ngIf"],["type","button","mat-button","",3,"mat-dialog-close"]],template:function(Ue,bt){1&Ue&&(o.TgZ(0,"h1",0),o._uU(1),o.qZA(),o.TgZ(2,"div",1),o.YNc(3,wn,45,19,"form",2),o.qZA(),o.YNc(4,Mr,4,3,"div",3)),2&Ue&&(o.xp6(1),o.AsE("",bt.DATA.title," '",bt.DATA.dataset?bt.DATA.dataset.kana:bt.DATA.modeTampilan,"'"),o.xp6(2),o.Q6J("ngIf",bt.fg),o.xp6(1),o.Q6J("ngIf",bt.fg))},dependencies:[x.O5,_s.yS,d.lW,u.ZT,u.uh,u.xY,u.H8,C.Hw,Hr.TO,Hr.KE,Hr.hX,Hr.R9,Jr.Nt,Zn._Y,Zn.Fj,Zn.JJ,Zn.JL,Zn.sg,Zn.u,Lr.Yh,vs.$]}),Fe})();function cr(Fe,Et){if(1&Fe&&(o.TgZ(0,"div"),o._uU(1),o.qZA()),2&Fe){const Ue=o.oxw().$implicit;o.xp6(1),o.hij("",Ue.value.inputLabel," Tidak Boleh Kosong")}}function Ai(Fe,Et){if(1&Fe&&(o.TgZ(0,"div"),o._uU(1),o.qZA()),2&Fe){const Ue=o.oxw().$implicit;o.xp6(1),o.hij("",Ue.value.inputLabel," Hanya Boleh Huruf Standar Papan Ketik")}}function Hs(Fe,Et){if(1&Fe&&(o.TgZ(0,"mat-form-field",9)(1,"mat-label"),o._uU(2),o.qZA(),o._UZ(3,"input",10)(4,"mat-icon",11),o.TgZ(5,"mat-error"),o.YNc(6,cr,2,1,"div",12),o.YNc(7,Ai,2,1,"div",12),o.qZA()()),2&Fe){const Ue=Et.$implicit,bt=o.oxw(2);o.Q6J("color","accent"),o.xp6(2),o.Oqu(Ue.value.inputLabel),o.xp6(1),o.s9C("placeholder",Ue.value.inputPlaceholder),o.Q6J("formControlName",Ue.key)("required",Ue.value.inputRequired),o.xp6(3),o.Q6J("ngIf",bt.fg.get(Ue.key).hasError("required")),o.xp6(1),o.Q6J("ngIf",bt.fg.get(Ue.key).hasError("pattern"))}}function cs(Fe,Et){if(1&Fe&&(o.TgZ(0,"form",7),o.YNc(1,Hs,8,7,"mat-form-field",8),o.ALo(2,"keyvalue"),o.qZA()),2&Fe){const Ue=o.oxw();o.Q6J("formGroup",Ue.fg),o.xp6(1),o.Q6J("ngForOf",o.lcZ(2,2,Ue.DATA.input))}}function qr(Fe,Et){if(1&Fe&&(o.TgZ(0,"small",13)(1,"i"),o._uU(2),o.qZA()()),2&Fe){const Ue=o.oxw();o.xp6(2),o.hij("* ",Ue.DATA.infoText,"")}}function go(Fe,Et){if(1&Fe&&(o.TgZ(0,"button",14),o._uU(1),o.qZA()),2&Fe){const Ue=o.oxw();o.Q6J("mat-dialog-close",!1),o.xp6(1),o.hij(" ",Ue.DATA.cancelText," ")}}let ws=(()=>{class Fe{constructor(Ue,bt,Vt){this.data=Ue,this.fb=bt,this.gs=Vt}get DATA(){return this.data}get BALIKAN(){return this.fg.value}ngOnInit(){this.gs.log("[DIALOG_DATA_IN]",this.data);const Ue={};for(const[bt,Vt]of Object.entries(this.data.input)){const cn=[Zn.kI.pattern(Hn.t.regexEnglishKeyboardKeys)];Vt.inputRequired&&cn.push(Zn.kI.required),Ue[bt]=[Vt.inputValue,Zn.kI.compose(cn)]}this.fg=this.fb.group(Ue)}}return Fe.\u0275fac=function(Ue){return new(Ue||Fe)(o.Y36(u.WI),o.Y36(Zn.QS),o.Y36(E.U))},Fe.\u0275cmp=o.Xpm({type:Fe,selectors:[["app-material-dialog-input"]],decls:9,vars:7,consts:[["mat-dialog-title",""],["mat-dialog-content","",1,"text-break","text-warning"],[3,"formGroup",4,"ngIf"],["mat-dialog-actions",""],["class","text-start m-2",4,"ngIf"],["type","button","mat-button","",1,"ms-auto","text-success","shiny",3,"mat-dialog-close","disabled"],["type","button","mat-button","",3,"mat-dialog-close",4,"ngIf"],[3,"formGroup"],["appearance","outline","class","p-3 col-12",3,"color",4,"ngFor","ngForOf"],["appearance","outline",1,"p-3","col-12",3,"color"],["matInput","",3,"formControlName","placeholder","required"],["fontIcon","wysiwyg","matSuffix",""],[4,"ngIf"],[1,"text-start","m-2"],["type","button","mat-button","",3,"mat-dialog-close"]],template:function(Ue,bt){1&Ue&&(o.TgZ(0,"h1",0),o._uU(1),o.qZA(),o.TgZ(2,"div",1),o.YNc(3,cs,3,4,"form",2),o.qZA(),o.TgZ(4,"div",3),o.YNc(5,qr,3,1,"small",4),o.TgZ(6,"button",5),o._uU(7),o.qZA(),o.YNc(8,go,2,2,"button",6),o.qZA()),2&Ue&&(o.xp6(1),o.Oqu(bt.DATA.title),o.xp6(2),o.Q6J("ngIf",bt.fg),o.xp6(2),o.Q6J("ngIf",bt.DATA.infoText),o.xp6(1),o.Q6J("mat-dialog-close",bt.BALIKAN)("disabled",bt.fg.invalid),o.xp6(1),o.hij(" ",bt.DATA.confirmText," "),o.xp6(1),o.Q6J("ngIf",bt.DATA.cancelText))},dependencies:[x.sg,x.O5,d.lW,u.ZT,u.uh,u.xY,u.H8,C.Hw,Hr.TO,Hr.KE,Hr.hX,Hr.R9,Jr.Nt,Zn._Y,Zn.Fj,Zn.JJ,Zn.JL,Zn.Q7,Zn.sg,Zn.u,x.Nd]}),Fe})();var Ls=s(7745);let Js=(()=>{class Fe{constructor(Ue,bt,Vt){this.dialog=Ue,this.gs=bt,this.info=Vt,this.maxWidth="80vw",this.gs.isBrowser&&(this.maxWidth=4===this.gs.gridListBreakpoint?"45vw":3===this.gs.gridListBreakpoint?"50vw":2===this.gs.gridListBreakpoint?"60vw":"80vw")}openInputDialog(Ue){return"disableClose"in Ue||(Ue.disableClose=!0),this.dialog.open(ws,Ue)}openInfoDialog(Ue){return"disableClose"in Ue||(Ue.disableClose=!0),"maxWidth"in Ue||(Ue.maxWidth=this.maxWidth),this.dialog.open(m,Ue)}openDmakDialog(Ue){return"disableClose"in Ue||(Ue.disableClose=!0),this.dialog.open(G,Ue)}openEdictDialog(Ue){return"disableClose"in Ue||(Ue.disableClose=!0),this.dialog.open(Tr,Ue)}openBelajarDialog(Ue){return"disableClose"in Ue||(Ue.disableClose=!0),this.dialog.open(Ni,Ue)}leavePageDialog(){var Ue=this;return(0,n.Z)(function*(){return(yield Ue.openKonfirmasiDialog("Batal & Keluar","Apakah Yakin Meninggalkan Halaman Ini ?")).afterClosed()})()}openKonfirmasiDialog(Ue,bt,Vt=!0){var cn=this;return(0,n.Z)(function*(){return cn.openInfoDialog({data:{title:Ue,htmlMessage:bt,confirmText:"Ya",cancelText:"Tidak"},disableClose:Vt,maxWidth:cn.maxWidth})})()}fetchInformationRegisterMode(Ue,bt=!1){var Vt=this;return(0,n.Z)(function*(){try{const cn=yield l(Vt.info.getInfo(Ue.id));Ue.data.title=cn.result.title,Ue.data.htmlMessage=cn.result.content,Ue.disableClose=cn.result.close,bt&&(Ue.data.confirmText=cn.result.confirm,Ue.data.cancelText=cn.result.cancel,Ue.disableClose=!0)}catch(cn){Vt.gs.log("[DIALOG_SERVICE-FETCH_DIALOG_ERROR]",cn.error,"error")}return Vt.openInfoDialog(Ue)})()}fetchInformation(Ue){var bt=this;return(0,n.Z)(function*(){try{const Vt=yield l(bt.info.getInfo(Ue.id));Ue.data.title=Vt.result.title,Ue.data.htmlMessage=Vt.result.content,Ue.data.confirmText=Vt.result.confirm,Ue.data.cancelText=Vt.result.cancel,Ue.disableClose=Vt.result.close}catch(Vt){bt.gs.log("[DIALOG_SERVICE-FETCH_DIALOG_ERROR]",Vt.error,"error")}})()}openMaintenanceDialog(){var Ue=this;return(0,n.Z)(function*(){const bt={id:"MAINTENANCE",data:{title:"Informasi Perbaikan Web & Server",htmlMessage:"Gagal Memuat Perbaikan Web & Server",confirmText:"Ok, Saya Mengerti!",cancelText:null},disableClose:!1,maxWidth:Ue.maxWidth};return yield Ue.fetchInformation(bt),Ue.openInfoDialog(bt)})()}openCorsExtension(){var Ue=this;return(0,n.Z)(function*(){const bt={id:"CORS-EXTENSION",data:{title:"Ekstensi CORS Unblock",htmlMessage:"Gagal Memuat Metode Verifikasi",confirmText:"Ya",cancelText:"Tidak"},disableClose:!1,maxWidth:Ue.maxWidth};return yield Ue.fetchInformation(bt),Ue.openInfoDialog(bt)})()}openDonation(){var Ue=this;return(0,n.Z)(function*(){const bt={id:"DONASI",data:{title:"Donasi Perawatan Server",htmlMessage:"Gagal Memuat Rincian Donasi",confirmText:"Tutup",cancelText:null},disableClose:!1,maxWidth:Ue.maxWidth};return yield Ue.fetchInformation(bt),Ue.openInfoDialog(bt)})()}}return Fe.\u0275fac=function(Ue){return new(Ue||Fe)(o.LFG(u.uw),o.LFG(E.U),o.LFG(Ls.O))},Fe.\u0275prov=o.Yz7({token:Fe,factory:Fe.\u0275fac,providedIn:"root"}),Fe})()},8439:(Je,F,s)=>{"use strict";s.d(F,{X:()=>u});var n=s(4650),r=s(9731),l=s(257);let u=(()=>{class o{constructor(x,d){this.api=x,this.gs=d}searchDorama(x,d=""){return this.api.getData(`/dorama?q=${x}&type=${d}`)}getDorama(x){return this.api.getData(`/dorama/${x}`)}addNewDorama(x){return this.api.patchData("/dorama",x)}getSeasonalDorama(x,d){return this.api.getData(`/dorama-seasonal?year=${x}&season=${d}`)}getBerkasDorama(x=[],d="",g=1,v=10,_="",m=""){return this.api.patchData(`/dorama-berkas?q=${d}&page=${g}&row=${v}&sort=${_}&order=${m}`,{id:x})}getFansubDorama(x=[],d=1,g=10){return this.api.patchData(`/dorama-fansub?page=${d}&row=${g}`,{id:x})}}return o.\u0275fac=function(x){return new(x||o)(n.LFG(r.s),n.LFG(l.U))},o.\u0275prov=n.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})()},6382:(Je,F,s)=>{"use strict";s.d(F,{r:()=>o});var n=s(4650),r=s(1390),l=s(257),u=s(8020);let o=(()=>{class E{constructor(d,g,v){this.router=d,this.gs=g,this.wb=v,this.isHidden=!0,this.newTab=!0,this.targetUrl=null,this.backgroundImage=null,this.backgroundIcon=null,this.tooltipText=null}toggleFab(){this.isHidden=!this.isHidden}showFab(){this.isHidden=!1}hideFab(){this.isHidden=!0}removeFab(){this.isHidden=!0,this.tooltipText=null,this.backgroundIcon=null,this.backgroundImage=null,this.targetUrl=null,this.newTab=null}initializeFab(d,g,v,_,m){this.backgroundIcon=d,this.backgroundImage=g,this.tooltipText=v,this.targetUrl=_,this.newTab=m,this.isHidden=!1}setTooltipText(d){this.tooltipText=d}setNewTab(d){this.newTab=d}setTargetUrl(d){this.targetUrl=d}setBackgroundImage(d){this.backgroundImage=d}setBackgroundIcon(d){this.backgroundIcon=d}buttonClicked(){this.newTab?this.wb.winboxOpenUri(this.targetUrl):this.router.navigateByUrl(this.targetUrl)}}return E.\u0275fac=function(d){return new(d||E)(n.LFG(r.F0),n.LFG(l.U),n.LFG(u.N))},E.\u0275prov=n.Yz7({token:E,factory:E.\u0275fac,providedIn:"root"}),E})()},6781:(Je,F,s)=>{"use strict";s.d(F,{T:()=>u});var n=s(4650),r=s(9731),l=s(257);let u=(()=>{class o{constructor(x,d){this.api=x,this.gs=d}delete(x){return this.api.deleteData(`/fansub/${x}`)}searchFansub(x="",d=1,g=10,v="",_=""){return this.api.getData(`/fansub?q=${x}&page=${d}&row=${g}&sort=${v}&order=${_}`)}createFansub(x){return this.api.postData("/fansub",x)}updateFansub(x,d){return this.api.putData(`/fansub/${x}`,d)}getFansub(x){return this.api.getData(`/fansub/${x}`)}getAllFansub(){return this.api.getData("/fansub-all")}cekSlug(x){return this.api.patchData("/fansub-slug",x)}getBerkasFansub(x=[],d="",g=1,v=10,_="",m=""){return this.api.patchData(`/fansub-berkas?q=${d}&page=${g}&row=${v}&sort=${_}&order=${m}`,{id:x})}getAnimeFansub(x=[],d=1,g=10){return this.api.patchData(`/fansub-anime?page=${d}&row=${g}`,{id:x})}getDoramaFansub(x=[],d=1,g=10){return this.api.patchData(`/fansub-dorama?page=${d}&row=${g}`,{id:x})}getRssFeedFansubAllActiveOnly(){return this.api.getData("/fansub-rss-feed-active")}getRssFeedFansubAll(){return this.api.getData("/fansub-rss-feed-all")}getRssFeedFansub(x){return this.api.getData(`/fansub/${x}/rss`)}getFansubMember(x){return this.api.getData(`/fansub/${x}/member`)}getAllFansubMember(x="",d=1,g=10,v="",_=""){return this.api.getData(`/fansub-member?q=${x}&page=${d}&row=${g}&sort=${v}&order=${_}`)}requestJoinFansubMember(x){return this.api.postData("/fansub-member",x)}approveRejectFansubMember(x,d){return this.api.putData(`/fansub-member/${x}`,d)}leaveFansubMember(x){return this.api.deleteData(`/fansub-member/${x}`)}getAllSubDomain(x="",d=1,g=12,v="",_=""){return this.api.getData(`/fansub-dns?q=${x}&page=${d}&row=${g}&sort=${v}&order=${_}`)}claimSubDomain(x){return this.api.postData("/fansub-dns",x)}getSubDomain(x){return this.api.getData(`/fansub-dns/${x}`)}updateSubDomain(x,d){return this.api.putData(`/fansub-dns/${x}`,d)}}return o.\u0275fac=function(x){return new(x||o)(n.LFG(r.s),n.LFG(l.U))},o.\u0275prov=n.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})()},257:(Je,F,s)=>{"use strict";s.d(F,{U:()=>Uo});var n=s(4650),r=s(6895),l=s(9521),u=s(5126);function Lt(ie){if(null==ie||"object"!=typeof ie)return!1;let tt=Object.getPrototypeOf(ie);return!(null!==tt&&tt!==Object.prototype&&null!==Object.getPrototypeOf(tt)||Symbol.iterator in ie||Symbol.toStringTag in ie)}function Pe(ie){return"string"==typeof ie}function ae(ie){return Number.isSafeInteger(ie)&&ie>=0}function ke(ie){return null!=ie}u();var me=s(3639);function xe(ie){var tt=-1,Mt=null==ie?0:ie.length;for(this.__data__=new me.Z;++tt-1},pt=function Ot(ie,tt,Mt){for(var kt=-1,Jt=null==ie?0:ie.length;++kt0){if(++tt>=800)return arguments[0]}else tt=0;return ie.apply(void 0,arguments)}}(gt.Z?function(ie,tt){return(0,gt.Z)(ie,"toString",{configurable:!0,enumerable:!1,value:ot(tt),writable:!0})}:ln);var we=s(8706),ve=s(214);const et=function Si(ie,tt){return kn(function rn(ie,tt,Mt){return tt=Ht(void 0===tt?ie.length-1:tt,0),function(){for(var kt=arguments,Jt=-1,Ut=Ht(kt.length-tt,0),mn=Array(Ut);++Jt=200&&(Ut=Rt,mn=!1,tt=new Ne(tt));e:for(;++Jt=kt?ie:function ir(ie,tt,Mt){var kt=-1,Jt=ie.length;tt<0&&(tt=-tt>Jt?0:Jt+tt),(Mt=Mt>Jt?Jt:Mt)<0&&(Mt+=Jt),Jt=tt>Mt?0:Mt-tt>>>0,tt>>>=0;for(var Ut=Array(Jt);++kt-1;);return Mt}(kt,Jt),mn=function $r(ie,tt){for(var Mt=ie.length;Mt--&&nn(tt,ie[Mt],0)>-1;);return Mt}(kt,Jt)+1;return Pr(kt,Ut,mn).join("")};var Fr=s(2221),ls={strictlyTwoElementsInRangeArrays:!1,progressFn:null};function qi(ie,tt){if(!Array.isArray(ie)||!ie.length)return ie;let kt,Jt,Mt={...ls,...tt};if(Mt.strictlyTwoElementsInRangeArrays&&!ie.every((lt,An)=>!(!Array.isArray(lt)||2!==lt.length)||(kt=An,Jt=lt.length,!1)))throw new TypeError(`ranges-sort: [THROW_ID_03] The first argument should be an array and must consist of arrays which are natural number indexes representing TWO string index ranges. However, ${kt}th range (${JSON.stringify(ie[kt],null,4)}) has not two but ${Jt} elements!`);if(!ie.every((lt,An)=>!(!Array.isArray(lt)||!Number.isInteger(lt[0])||lt[0]<0||!Number.isInteger(lt[1])||lt[1]<0)||(kt=An,!1)))throw new TypeError(`ranges-sort: [THROW_ID_04] The first argument should be an array and must consist of arrays which are natural number indexes representing string index ranges. However, ${kt}th range (${JSON.stringify(ie[kt],null,4)}) does not consist of only natural numbers!`);let Ut=ie.length**2,mn=0;return Array.from(ie).sort((lt,An)=>(Mt.progressFn&&(mn+=1,Mt.progressFn(Math.floor(100*mn/Ut))),lt[0]===An[0]?lt[1]An[1]?1:0:lt[0]Array.isArray(qt)).map(qt=>[...qt]).filter(qt=>void 0!==qt[2]||qt[0]!==qt[1]);Ut=kt.progressFn?qi(Jt,{progressFn:qt=>{lt=Math.floor(qt/5),lt!==mn&&(mn=lt,kt.progressFn(lt))}}):qi(Jt);let An=Ut.length-1;for(let qt=An;qt>0;qt--)kt.progressFn&&(lt=Math.floor(78*(1-qt/An))+21,lt!==mn&<>mn&&(mn=lt,kt.progressFn(lt))),(Ut[qt][0]<=Ut[qt-1][0]||!kt.joinRangesThatTouchEdges&&Ut[qt][0]=Ut[qt][0]||Ut[qt-1][1]<=Ut[qt][1])&&null!==Ut[qt-1][2]&&(null===Ut[qt][2]&&null!==Ut[qt-1][2]?Ut[qt-1][2]=null:null!=Ut[qt-1][2]?2==+kt.mergeType&&Ut[qt-1][0]===Ut[qt][0]?Ut[qt-1][2]=Ut[qt][2]:Ut[qt-1][2]+=Ut[qt][2]:Ut[qt-1][2]=Ut[qt][2]),Ut.splice(qt,1),qt=Ut.length);return Ut.length?Ut:null}function _s(ie,tt){if(!ie)throw new Error("Invariant failed")}function Lr(ie,tt,Mt){let Ut,kt=0,Jt=0;if(0===arguments.length)throw new Error("ranges-apply: [THROW_ID_01] inputs missing!");if("string"!=typeof ie)throw new TypeError(`ranges-apply: [THROW_ID_02] first input argument must be a string! Currently it's: ${typeof ie}, equal to: ${JSON.stringify(ie,null,4)}`);if(tt&&!Array.isArray(tt))throw new TypeError(`ranges-apply: [THROW_ID_03] second input argument must be an array (or null)! Currently it's: ${typeof tt}, equal to: ${JSON.stringify(tt,null,4)}`);if(Mt&&"function"!=typeof Mt)throw new TypeError(`ranges-apply: [THROW_ID_04] the third input argument must be a function (or falsey)! Currently it's: ${typeof Mt}, equal to: ${JSON.stringify(Mt,null,4)}`);if(!tt?.filter(jn=>jn).length)return ie;Ut=Array.isArray(tt)&&Number.isInteger(tt[0])&&Number.isInteger(tt[1])?[Array.from(tt)]:Array.from(tt);let mn=Ut.length,lt=0;Ut.filter(jn=>jn).forEach((jn,Mi)=>{if(Mt&&(kt=Math.floor(lt/mn*10),kt!==Jt&&(Jt=kt,Mt(kt))),!Array.isArray(jn))throw new TypeError(`ranges-apply: [THROW_ID_05] ranges array, second input arg., has ${Mi}th element not an array: ${JSON.stringify(jn,null,4)}, which is ${typeof jn}`);if(!Number.isInteger(jn[0])){if(!Number.isInteger(+jn[0])||+jn[0]<0)throw new TypeError(`ranges-apply: [THROW_ID_06] ranges array, second input arg. has ${Mi}th element, array ${JSON.stringify(jn,null,0)}. Its first element is not an integer, string index, but ${typeof jn[0]}, equal to: ${JSON.stringify(jn[0],null,4)}.`);Ut[Mi][0]=+Ut[Mi][0]}if(!Number.isInteger(jn[1])){if(!Number.isInteger(+jn[1])||+jn[1]<0)throw new TypeError(`ranges-apply: [THROW_ID_07] ranges array, second input arg. has ${Mi}th element, array ${JSON.stringify(jn,null,0)}. Its second element is not an integer, string index, but ${typeof jn[1]}, equal to: ${JSON.stringify(jn[1],null,4)}.`);Ut[Mi][1]=+Ut[Mi][1]}lt+=1});let An=Hn(Ut,{progressFn:jn=>{Mt&&(kt=10+Math.floor(jn/10),kt!==Jt&&(Jt=kt,Mt(kt)))}});_s(An);let qt=An.length;if(qt>0){let jn=ie.slice(An[qt-1][1]);ie=An.reduce((Mi,Zi,hn,Di)=>(Mt&&(kt=20+Math.floor(hn/qt*80),kt!==Jt&&(Jt=kt,Mt(kt))),`${Mi}${ie.slice(0===hn?0:Di[hn-1][1],Di[hn][0])}${Di[hn][2]||""}`),""),ie+=jn}return ie}function an(ie,tt=1){function kt(Ut){return Array.from(Ut).reverse().join("")}function Jt(Ut,mn,lt){let An=lt?"\n":"\r",qt=lt?"\r":"\n";if(!Ut)return Ut;let jn=0,Mi=0,Zi="";for(let hn=0,Di=Ut.length;hn=0&&(Ut=+tt);let mn="",lt="";if(ie.trim()){if(!ie[0].trim())for(let An=0,qt=ie.length;An"string"==typeof Mt&&Mt.trim());if("string"==typeof ie)return ie.trim()?[ie]:[];throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_05] ${tt} must be array containing zero or more strings or something falsey. Currently it's equal to: ${ie}, that a type of ${typeof ie}.`)}function yn(ie,tt,Mt,kt){for(let Jt=tt,Ut=ie.length;Jt"),yn(tt,ie?.quotes?.next-1,ie?.quotes?.value,">"),!ie?.quotes||!yn(tt,Mt+1,ie.quotes.value,">")&&-1!==ie?.quotes?.next&&yn(tt,ie?.quotes?.next-1,ie?.quotes?.value,">")}function ei(ie,tt){return(tt.match(new RegExp(ie,"g"))||[]).length}u();var Ci=new Set(["!doctype","abbr","address","area","article","aside","audio","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","doctype","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","param","picture","pre","progress","rb","rp","rt","rtc","ruby","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","ul","var","video","wbr","xml"]),Ii=new Set(["a","b","i","p","q","s","u"]),Ri=new Set([".",",",";","!","?"]),Vr=new Set([".",",","?",";",")","\u2026",'"',"\xbb"]),qs=new Set(["a","abbr","acronym","audio","b","bdi","bdo","big","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","input","ins","kbd","label","map","mark","meter","noscript","object","output","picture","progress","q","ruby","s","samp","select","slot","small","span","strong","sub","sup","svg","template","textarea","time","u","tt","var","video","wbr"]),ki={ignoreTags:[],ignoreTagsWithTheirContents:[],onlyStripTags:[],stripTogetherWithTheirContents:["script","style","xml"],skipHtmlDecoding:!1,trimOnlySpaces:!1,stripRecognisedHTMLOnly:!1,dumpLinkHrefsNearby:{enabled:!1,putOnNewLine:!1,wrapHeads:"",wrapTails:""},ignoreIndentations:!1,cb:null,reportProgressFunc:null,reportProgressFuncFrom:0,reportProgressFuncTo:100};function Vs(ie,tt){let Mt=Date.now(),kt=[],Jt=[],Ut=[],mn=[],lt={};!function An(){lt={attributes:[]}}();let qt=null,jn=null,Mi=null,Zi=!1,hn={},Di={tagName:"",hrefValue:"",openingTagEnds:void 0},W="",Ee=!1,X=null,je=!0;function St(Dt,_n,Un){if(Array.isArray(_n.stripTogetherWithTheirContents)&&(_n.stripTogetherWithTheirContents.includes(lt.name)||_n.stripTogetherWithTheirContents.includes("*")))if(lt.slashPresent&&Array.isArray(kt)&&kt.some(Ln=>Ln.name===lt.name)){for(let Ln=kt.length;Ln--;)if(kt[Ln].name===lt.name){mn=mn.filter(([_i,dr])=>(_i=Dt+1)&&(dr<=kt[Ln].lastOpeningBracketAt||dr>Dt+1));let li=Dt+1;lt.lastClosingBracketAt&&(li=lt.lastClosingBracketAt+1),mn.push([kt[Ln].lastOpeningBracketAt,li]),Vr.has(ie[Dt])&&_n.cb?_n.cb({tag:lt,deleteFrom:kt[Ln].lastOpeningBracketAt,deleteTo:Dt+1,insert:null,rangesArr:Un,proposedReturn:[kt[Ln].lastOpeningBracketAt,Dt,null]}):_n.cb&&_n.cb({tag:lt,deleteFrom:kt[Ln].lastOpeningBracketAt,deleteTo:Dt,insert:"",rangesArr:Un,proposedReturn:[kt[Ln].lastOpeningBracketAt,Dt,""]}),kt.splice(Ln,1);break}}else lt.slashPresent||kt.push(lt);else Array.isArray(_n.ignoreTagsWithTheirContents)&&hi(Dt,_n,lt)&&(je=!1)}function Kt(Dt,_n,Un,Ln,li,_i){if(Array.isArray($n.current())&&"number"==typeof Un&&0===$n.current()[0][0]&&$n.current()[0][1]>=Un)return"";if(ie.length===Ln&&_i&&!en?.dumpLinkHrefsNearby?.enabled)return null;let dr="";if(Number.isInteger(Un)&&Un_i+1){let es=Dt.slice(_i+1,Ln);Ln&&!Ni(ie,Ln-1)&&(es=es.trimEnd()),es.includes("\n")&&Tn(Ln,Dt)?dr+=" ":dr+=es}let Ui=!Vr.has(Dt[_n]),er=">"!==Dt[Ln-1]||!Dt[Un].trim(),Bs=!['"',"("].includes(Dt[li-1]),Xs=![";",".",":","!"].includes(Dt[_n]);if((Ui||er&&Bs&&Xs)&&(er||Bs)&&"!"!==Dt[_n]&&(!qs.has(lt.name)||"number"==typeof Un&&Un_i+1)){let es=dr.match(/\n/g);return Array.isArray(es)&&es.length?1===es.length?"\n":2===es.length?"\n\n":"\n\n\n":" "}return""}function sn(Dt,_n){if(Dt.dumpLinkHrefsNearby?.enabled&&Di.tagName&&Di.tagName===lt.name&<.lastOpeningBracketAt&&(Di.openingTagEnds&<.lastOpeningBracketAt>Di.openingTagEnds||!Di.openingTagEnds)&&(Ee=!0),Ee){let Un=Dt.dumpLinkHrefsNearby?.putOnNewLine?"\n\n":"";W=`${Un}${Di.hrefValue}`,("number"!=typeof _n||Ni(ie,_n-1))&&(W+=Un)}}function Tn(Dt,_n){return _n?"<"===_n[Dt]&&"%"!==_n[Dt+1]:"<"===ie[Dt]&&"%"!==ie[Dt+1]}function di(Dt){return">"===ie[Dt]&&"%"!==ie[Dt-1]}function hi(Dt,_n,Un){if(_n.ignoreTagsWithTheirContents.includes("*"))return!0;let Ln=ie.indexOf(`<${Un.name}`,Dt),li=ie.indexOf(`_i.name===Un.name)||li>-1&&Ln>-1&&Ln"string"==typeof Dt||(Ei.el=Dt,Ei.i=_n,!1)))throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_08] Optional Options Object's key stripTogetherWithTheirContents was set to contain not just string elements! For example, element at index ${Ei.i} has a value ${Ei.el} which is not string but ${(typeof Ei.el).toLowerCase()}.`);en.cb||(en.cb=({rangesArr:Dt,proposedReturn:_n})=>{_n&&Dt.push(..._n)});let $n=new class{constructor(ie){th(this,"ranges"),th(this,"opts");let tt={..._e,...ie};if(tt.mergeType&&1!==tt.mergeType&&2!==tt.mergeType)if(Pe(tt.mergeType)&&"1"===tt.mergeType.trim())tt.mergeType=1;else{if(!Pe(tt.mergeType)||"2"!==tt.mergeType.trim())throw new Error(`ranges-push: [THROW_ID_02] opts.mergeType was customised to a wrong thing! It was given of a type: "${typeof tt.mergeType}", equal to ${JSON.stringify(tt.mergeType,null,4)}`);tt.mergeType=2}this.opts=tt,this.ranges=[]}add(ie,tt,Mt){if(null==ie&&null==tt)return;if(ke(ie)&&!ke(tt)){if(Array.isArray(ie)){if(ie.length){if(ie.some(Ut=>Array.isArray(Ut)))return void ie.forEach(Ut=>{Array.isArray(Ut)&&this.add(...Ut)});ie.length&&ae(+ie[0])&&ae(+ie[1])&&this.add(...ie)}return}throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_12] the first input argument, "from" is set (${JSON.stringify(ie,null,0)}) but second-one, "to" is not (${JSON.stringify(tt,null,0)})`)}if(!ke(ie)&&ke(tt))throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_13] the second input argument, "to" is set (${JSON.stringify(tt,null,0)}) but first-one, "from" is not (${JSON.stringify(ie,null,0)})`);let kt=+ie,Jt=+tt;if(ae(Mt)&&(Mt=String(Mt)),!ae(kt)||!ae(Jt))throw ae(kt)&&kt>=0?new TypeError(`ranges-push/Ranges/add(): [THROW_ID_10] "to" value, the second input argument, must be a natural number or zero! Currently it's of a type "${typeof Jt}" equal to: ${JSON.stringify(Jt,null,4)}`):new TypeError(`ranges-push/Ranges/add(): [THROW_ID_09] "from" value, the first input argument, must be a natural number or zero! Currently it's of a type "${typeof kt}" equal to: ${JSON.stringify(kt,null,4)}`);if(ke(Mt)&&!Pe(Mt)&&!ae(Mt))throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_08] The third argument, the value to add, was given not as string but ${typeof Mt}, equal to:\n${JSON.stringify(Mt,null,4)}`);if(ke(this.ranges)&&Array.isArray(this.last())&&kt===this.last()[1]){if(this.last()[1]=Jt,this.last(),null!==this.last()[2]&&ke(Mt)){let Ut=!this.last()[2]||!this.last()[2].length||this.opts?.mergeType&&1!==this.opts.mergeType?Mt:`${this.last()[2]}${Mt}`;this.opts.limitToBeAddedWhitespace&&(Ut=an(Ut,this.opts.limitLinebreaksCount)),Pe(Ut)&&!Ut.length||(this.last()[2]=Ut)}}else{this.ranges||(this.ranges=[]);let Ut=void 0===Mt||Pe(Mt)&&!Mt.length?[kt,Jt]:[kt,Jt,Mt&&this.opts.limitToBeAddedWhitespace?an(Mt,this.opts.limitLinebreaksCount):Mt];this.ranges.push(Ut)}}push(ie,tt,Mt){this.add(ie,tt,Mt)}current(){return Array.isArray(this.ranges)&&this.ranges.length?(this.ranges=function Fs(ie,tt){function Mt(qt){return!!qt&&"object"==typeof qt&&!Array.isArray(qt)}if(!Array.isArray(ie)||!ie.length)return null;let kt;if(tt){if(!Mt(tt))throw new Error(`emlint: [THROW_ID_03] the second input argument must be a plain object. It was given as:\n${JSON.stringify(tt,null,4)} (type ${typeof tt})`);if(kt={...vr,...tt},kt.progressFn&&Mt(kt.progressFn)&&!Object.keys(kt.progressFn).length)kt.progressFn=null;else if(kt.progressFn&&"function"!=typeof kt.progressFn)throw new Error(`ranges-merge: [THROW_ID_01] resolvedOpts.progressFn must be a function! It was given of a type: "${typeof kt.progressFn}", equal to ${JSON.stringify(kt.progressFn,null,4)}`);if(![1,2,"1","2"].includes(kt.mergeType))throw new Error(`ranges-merge: [THROW_ID_02] resolvedOpts.mergeType was customised to a wrong thing! It was given of a type: "${typeof kt.mergeType}", equal to ${JSON.stringify(kt.mergeType,null,4)}`);if("boolean"!=typeof kt.joinRangesThatTouchEdges)throw new Error(`ranges-merge: [THROW_ID_04] resolvedOpts.joinRangesThatTouchEdges was customised to a wrong thing! It was given of a type: "${typeof kt.joinRangesThatTouchEdges}", equal to ${JSON.stringify(kt.joinRangesThatTouchEdges,null,4)}`)}else kt={...vr};let Ut,mn,lt,Jt=ie.filter(qt=>Array.isArray(qt)).map(qt=>[...qt]).filter(qt=>void 0!==qt[2]||qt[0]!==qt[1]);Ut=kt.progressFn?qi(Jt,{progressFn:qt=>{lt=Math.floor(qt/5),lt!==mn&&(mn=lt,kt.progressFn(lt))}}):qi(Jt);let An=Ut.length-1;for(let qt=An;qt>0;qt--)kt.progressFn&&(lt=Math.floor(78*(1-qt/An))+21,lt!==mn&<>mn&&(mn=lt,kt.progressFn(lt))),(Ut[qt][0]<=Ut[qt-1][0]||!kt.joinRangesThatTouchEdges&&Ut[qt][0]=Ut[qt][0]||Ut[qt-1][1]<=Ut[qt][1])&&null!==Ut[qt-1][2]&&(null===Ut[qt][2]&&null!==Ut[qt-1][2]?Ut[qt-1][2]=null:null!=Ut[qt-1][2]?2==+kt.mergeType&&Ut[qt-1][0]===Ut[qt][0]?Ut[qt-1][2]=Ut[qt][2]:Ut[qt-1][2]+=Ut[qt][2]:Ut[qt-1][2]=Ut[qt][2]),Ut.splice(qt,1),qt=Ut.length);return Ut.length?Ut:null}(this.ranges,{mergeType:this.opts.mergeType}),this.ranges&&this.opts.limitToBeAddedWhitespace?this.ranges.map(ie=>ke(ie[2])?[ie[0],ie[1],an(ie[2],this.opts.limitLinebreaksCount)]:ie):this.ranges):null}wipe(){this.ranges=[]}replace(ie){if(Array.isArray(ie)&&ie.length){if(!Array.isArray(ie[0])||!ae(ie[0][0]))throw new Error(`ranges-push/Ranges/replace(): [THROW_ID_11] Single range was given but we expected array of arrays! The first element, ${JSON.stringify(ie[0],null,4)} should be an array and its first element should be an integer, a string index.`);this.ranges=Array.from(ie)}else this.ranges=[]}last(){return Array.isArray(this.ranges)&&this.ranges.length?this.ranges[this.ranges.length-1]:null}}({limitToBeAddedWhitespace:!0,limitLinebreaksCount:2});if(!en.skipHtmlDecoding)for(;ie!==(0,Fr.decode)(ie,{scope:"strict"});)ie=(0,Fr.decode)(ie,{scope:"strict"});let xr=!1,Wi=!1,gi=0,bi=0,ur=ie.length,Xr=Math.floor(ur/2);for(let Dt=0;Dt1e3&&ur<2e3?Dt===Xr&&en.reportProgressFunc(Math.floor((en.reportProgressFuncTo-en.reportProgressFuncFrom)/2)):ur>=2e3&&(gi=en.reportProgressFuncFrom+Math.floor(Dt/ur*(en.reportProgressFuncTo-en.reportProgressFuncFrom)),gi!==bi&&(bi=gi,en.reportProgressFunc(gi)))),Object.keys(lt).length>1&<.lastClosingBracketAt&<.lastClosingBracketAtDt){Dt=_n;continue}}if(!xr&&di(Dt)&&(!lt||Object.keys(lt).length<2)&&Dt>1)for(let _n=Dt;_n--;)if(void 0===ie[_n-1]||di(_n)){let Un=void 0===ie[_n-1]?_n:_n+1,Ln=ie.slice(Un,Dt+1)||"";if((Ln.includes("/>")||Ln.includes("/ >")||Ln.includes('="')||Ln.includes("='"))&&ie!==`<${as(Ln.trim(),"/>")}>`&&[...Ci].some(li=>as(Ln.trim().split(/\s+/).filter(_i=>_i.trim()).filter((_i,dr)=>0===dr),"/>").toLowerCase()===li)&&""===Vs(`<${Ln.trim()}>`,en).result){(!Ut.length||Ut[Ut.length-1][0]!==lt.lastOpeningBracketAt)&&Ut.push([Un,Dt+1]),(!mn.length||mn[mn.length-1][0]!==lt.lastOpeningBracketAt)&&mn.push([Un,Dt+1]);let li=Kt(ie,Dt,Un,Dt+1,Un,Dt+1),_i=Dt+1;if(ie[_i]&&!ie[_i].trim())for(let dr=_i;dr{if("string"==typeof Un.name&&"href"===Un.name.toLowerCase())return _n=`${en.dumpLinkHrefsNearby?.wrapHeads||""}${Un.value}${en.dumpLinkHrefsNearby?.wrapTails||""}`,!0})&&(Di={tagName:lt.name,hrefValue:_n,openingTagEnds:void 0})}else!Wi&&!lt.quotes&<.nameStarts&&(lt.quotes={},lt.quotes.value=ie[Dt],lt.quotes.start=Dt,lt.quotes.next=ie.indexOf(ie[Dt],Dt+1),hn.nameStarts&&hn.nameEnds&&hn.nameEnds!(Un===lt.leftOuterWhitespace&&Ln===Dt))),en.cb({tag:lt,deleteFrom:lt.leftOuterWhitespace,deleteTo:Dt,insert:`${_n}${W}${_n}`,rangesArr:$n,proposedReturn:[lt.leftOuterWhitespace,Dt,`${_n}${W}${_n}`]}),xi(),St(Dt,en,$n)}}if(lt.quotes?.start&<.quotes.start/!".includes(ie[Dt])&&!hn.nameStarts&&!lt.lastClosingBracketAt&&(hn.nameStarts=Dt),null!==lt.lastOpeningBracketAt&<.lastOpeningBracketAt"))&&void 0!==lt.lastOpeningBracketAt&&(lt.lastClosingBracketAt=Dt,X=null,Object.keys(hn).length&&(lt.attributes.push(hn),hn={}),en.dumpLinkHrefsNearby?.enabled&&Di.tagName&&!Di.openingTagEnds&&(Di.openingTagEnds=Dt)),(!Wi||">"===ie[Dt])&&void 0!==lt.lastOpeningBracketAt){if(void 0===lt.lastClosingBracketAt){if(lt.lastOpeningBracketAtUn!==_n.lastOpeningBracketAt),mn.push([_n.lastOpeningBracketAt,Dt+1])):mn.push([lt.lastOpeningBracketAt,Dt+1])}else mn.push([lt.lastOpeningBracketAt,Dt+1])}}else if(Dt>lt.lastClosingBracketAt&&ie[Dt].trim()||void 0===ie[Dt+1]||en.ignoreIndentations&&"\r\n".includes(ie[Dt])){let _n=lt.lastClosingBracketAt===Dt?Dt+1:Dt;en.trimOnlySpaces&&_n===ur-1&&null!==X&&Xli.equalsAt)){(!mn.length||mn[mn.length-1][0]!==lt.lastOpeningBracketAt)&&mn.push([lt.lastOpeningBracketAt,lt.lastClosingBracketAt+1]);let _i,li=Kt(ie,Dt,lt.leftOuterWhitespace,_n,lt.lastOpeningBracketAt,lt.lastClosingBracketAt);W="",Ee=!1,sn(en,_n),"string"==typeof W&&W.length?(_i=`${li}${W}${"\n\n"===li?"\n":li}`,_n===lt.lastClosingBracketAt+1&&(!ie[_n]||!Ri.has(ie[_n]))&&(_i+=" "),lt.leftOuterWhitespace===lt.lastOpeningBracketAt&&$n.last()&&$n.last()[1]Dt)&&dr++}en.cb({tag:lt,deleteFrom:lt.leftOuterWhitespace,deleteTo:_n+dr,insert:_i,rangesArr:$n,proposedReturn:[lt.leftOuterWhitespace,_n+dr,_i]}),xi(),St(Dt,en,$n)}else lt={};di(Dt)||(lt={})}Wi&&(Wi=!1)}if((!xr||"<"===ie[Dt]&&Ni(ie,Ni(ie,Dt))&&"/"===ie[Ni(ie,Dt)]&&ie.startsWith("script",Ni(ie,Ni(ie,Dt))))&&Tn(Dt)&&!Tn(Dt-1)&&!"'\"".includes(ie[Dt+1])&&(!"'\"".includes(ie[Dt+2])||/\w/.test(ie[Dt+1]))&&("c"!==ie[Dt+1]||":"!==ie[Dt+2])&&("f"!==ie[Dt+1]||"m"!==ie[Dt+2]||"t"!==ie[Dt+3]||":"!==ie[Dt+4])&&("s"!==ie[Dt+1]||"q"!==ie[Dt+2]||"l"!==ie[Dt+3]||":"!==ie[Dt+4])&&("x"!==ie[Dt+1]||":"!==ie[Dt+2])&&("f"!==ie[Dt+1]||"n"!==ie[Dt+2]||":"!==ie[Dt+3])&&In(lt,ie,Dt)){if(di(Ni(ie,Dt)))continue;if(lt.nameEnds&<.nameEnds"==`${ie[Ln-2]}${ie[Ln-1]}${ie[Ln]}`||!_n&&"--\x3e"==`${ie[Ln-2]}${ie[Ln-1]}${ie[Ln]}`)&&(Un=Ln),Un&&(Un"===ie[Ln])&&(li+=1),(!Ut.length||Ut[Ut.length-1][0]!==lt.lastOpeningBracketAt)&&Ut.push([lt.lastOpeningBracketAt,Un+1]),(!mn.length||mn[mn.length-1][0]!==lt.lastOpeningBracketAt)&&mn.push([lt.lastOpeningBracketAt,Un+1]);let _i=Kt(ie,Ln,lt.leftOuterWhitespace,li,lt.lastOpeningBracketAt,Un);en.cb({tag:lt,deleteFrom:lt.leftOuterWhitespace,deleteTo:li,insert:_i,rangesArr:$n,proposedReturn:[lt.leftOuterWhitespace,li,_i]}),Dt=Ln-1,">"===ie[Ln]&&(Dt=Ln),lt={},hn={};break}}}ie[Dt].trim()&&847!==ie[Dt].charCodeAt(0)?(null!==qt&&(!lt.quotes&&hn.equalsAt>qt-1&&hn.nameEnds&&hn.equalsAt>hn.nameEnds&&'"'!==ie[Dt]&&"'"!==ie[Dt]&&(Lt(hn)&<.attributes.push(hn),hn={},lt.equalsSpottedAt=void 0),qt=null),Zi||(Zi=!0,je&&!xr&&"number"==typeof Mi&&Dt&&Mi_n.name===lt.name)&&(lt.onlyPlausible=!0,lt.name=void 0,lt.nameStarts=void 0)),("\n"===ie[Dt]||"\r"===ie[Dt])&&(Mi=Dt,Zi&&(Zi=!1)))," "===ie[Dt]?null===jn&&(jn=Dt):null!==jn&&(jn=null),"script"===lt.name&&(xr=!lt.slashPresent)}if(ie&&!en.ignoreIndentations&&(en.trimOnlySpaces&&" "===ie[0]||!en.trimOnlySpaces&&!ie[0].trim()))for(let Dt=0;Dt{class ie{constructor(Mt,kt){this.localStorageKeys={AturanTatib:`${ys.N.siteName}_AturanTatib`,DebugLogs:`${ys.N.siteName}_DebugLogs`,DarkMode:`${ys.N.siteName}_DarkMode`,Token:`${ys.N.siteName}_Token`,LiveChatResults:`${ys.N.siteName}_LiveChatResults`,R18:`${ys.N.siteName}_R18`,SearchResults:`${ys.N.siteName}_SearchResults`,Torrents:`${ys.N.siteName}_Torrents`},this.forceEnableDebugLog=null,this.separatorKeysCodes=[l.K5,l.OC],this.routerData=null,this.previousUrl=null,this.bgImgUrlPath=null,this.bannerImg=null,this.sizeContain=!1,this.bgRepeat=!1,this.leftMenuImage=null,this.rightMenuImage=null,this.isBrowser=null,this.document=null,this.gridListBreakpoint=1,this.isDesktop=!0,this.isDevMode=!0,this.isDarkMode=!1,this.weatherEffect=null,this.weatherRunning=!1,this.angularEditorConfig={editable:!0,minHeight:"256px",placeholder:"Deskripsi, Informasi, Atau Keterangan Lainnya ...",uploadUrl:`${ys.N.apiUrl}/image`,uploadWithCredentials:!0,defaultParagraphSeparator:"div",toolbarHiddenButtons:[[],[]],customClasses:[{name:"white-space-normal-important",class:"white-space-normal-important"},{name:"text-decoration-none",class:"text-decoration-none"}]},this.seasonalWeather=[{id:1,name:js.F.WINTER,cssClassName:"snow",img:"/assets/img/season/winter.png"},{id:2,name:js.F.SPRING,cssClassName:"sakura",img:"/assets/img/season/spring.png"},{id:3,name:js.F.SUMMER,cssClassName:null,img:"/assets/img/season/summer.png"},{id:4,name:js.F.FALL,cssClassName:"fall",img:"/assets/img/season/fall.png"}],this.isBrowser=(0,r.NF)(Mt),this.document=kt,this.isDevMode=(0,n.X6Q)(),this.isBrowser&&(this.onResize(null),this.weatherJS())}log(Mt,kt=null,Jt="log"){if(this.isBrowser&&(this.forceEnableDebugLog="true"===localStorage.getItem(this.localStorageKeys.DebugLogs)),this.isDevMode||this.forceEnableDebugLog){let Ut=null;Ut="warn"===Jt?console.warn:"error"===Jt?console.error:"table"===Jt?console.table:console.log,kt?Ut(Mt,kt):Ut(Mt)}}getDirtyValues(Mt){const kt={};for(const Jt of Object.keys(Mt.controls)){const Ut=Mt.get(Jt);Ut.dirty&&(kt[Jt]=Ut.value)}return kt}get randomColor(){return(16777215*Math.random()<<0).toString(16)}get bgImgUrl(){return this.isDesktop?this.bgImgUrlPath:null}onResize(Mt,kt="APP_COMPONENT"){if(Mt&&this.log(`[WINDOW_RESIZE-${kt}]`,Mt),this.isBrowser){const Jt=Mt?.target?.window||window;this.leftMenuImage="/assets/img/background/left-menu.png",this.rightMenuImage="/assets/img/background/right-panel.png",Jt.innerWidth>1200?(this.isDesktop=!0,this.gridListBreakpoint=4):Jt.innerWidth>992?(this.isDesktop=!0,this.gridListBreakpoint=3):Jt.innerWidth>768?(this.isDesktop=!1,this.gridListBreakpoint=2):(this.isDesktop=!1,this.gridListBreakpoint=1,this.leftMenuImage=null,this.rightMenuImage="")}}htmlToText(Mt){return Mt?Vs(Mt).result:""}shuffle(Mt){let kt=Mt.length,Jt=0,Ut=0;for(;0!==kt;)Ut=Math.floor(Math.random()*kt),kt-=1,Jt=Mt[kt],Mt[kt]=Mt[Ut],Mt[Ut]=Jt;return Mt}cleanObject(Mt){for(const kt in Mt)Mt[kt]||delete Mt[kt]}includesOneOf(Mt,kt){for(const Jt of kt)if(Mt?.includes(Jt))return!0;return!1}linkify(Mt){if(Mt){const Jt=/(^|[^\/])(www\.[\S]+(\b|$))/gim,Ut=/[\w.]+@[a-zA-Z_-]+?(?:\.[a-zA-Z]{2,6})+/gim;return Mt.replace(/\b(?:https?|ftp):\/\/[a-z0-9-+&@#\/%?=~_|!:,.;]*[a-z0-9-+&@#\/%=~_|]/gim,'$&').replace(Jt,'$1$2').replace(Ut,'$&')}return""}toggleDarkTheme(Mt=!1){Mt?this.isDarkMode?this.document.body.classList.add("bifeldy-dark-theme"):this.document.body.classList.remove("bifeldy-dark-theme"):this.isDarkMode?(this.isDarkMode=!1,this.document.body.classList.remove("bifeldy-dark-theme")):(this.isDarkMode=!0,this.document.body.classList.add("bifeldy-dark-theme"))}rssLink(Mt){if("string"==typeof Mt)return Mt;let kt=Mt.findIndex(Jt=>"alternate"===Jt.rel&&"text/html"===Jt.type);return kt<0?Mt.length>0?Mt[Mt.length-1].href:"":Mt[kt].href}weatherJS(){const Mt=(new Date).getMonth()+1,kt=this.seasonalWeather.find(Jt=>Jt.id===Math.ceil(Mt/3));kt?.cssClassName&&(this.weatherEffect=new Sakura("body",{className:kt.cssClassName,lifeTime:5e3}),this.weatherRunning=!0)}weatherToggle(){this.weatherRunning?(this.weatherEffect.stop(!0),this.weatherRunning=!1):(this.weatherEffect.start(),this.weatherRunning=!0)}}return ie.\u0275fac=function(Mt){return new(Mt||ie)(n.LFG(n.Lbi),n.LFG(r.K0))},ie.\u0275prov=n.Yz7({token:ie,factory:ie.\u0275fac,providedIn:"root"}),ie})()},7902:(Je,F,s)=>{"use strict";s.d(F,{X:()=>u});var n=s(4650),r=s(9731),l=s(257);let u=(()=>{class o{constructor(x,d){this.api=x,this.gs=d}uploadImage(x){return this.api.postData("/image",x,!0,{headers:{"ngsw-bypass":"true"}})}}return o.\u0275fac=function(x){return new(x||o)(n.LFG(r.s),n.LFG(l.U))},o.\u0275prov=n.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})()},7745:(Je,F,s)=>{"use strict";s.d(F,{O:()=>u});var n=s(4650),r=s(9731),l=s(257);let u=(()=>{class o{constructor(x,d){this.api=x,this.gs=d}getAllInfo(x,d,g,v,_){return this.api.getData(`/information?q=${x}&page=${d}&row=${g}&sort=${v}&order=${_}`)}getInfo(x){return this.api.getData(`/information/${x}`)}createUpdateInfo(x){return this.api.postData("/information",x)}deleteInfo(x){return this.api.deleteData(`/information/${x}`)}}return o.\u0275fac=function(x){return new(x||o)(n.LFG(r.s),n.LFG(l.U))},o.\u0275prov=n.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})()},7:(Je,F,s)=>{"use strict";s.d(F,{S:()=>l});var n=s(4650),r=s(257);let l=(()=>{class u{constructor(E){this.gs=E,this.sideNav=null,this.sideNavExpanded=!1,this.linkText=!1,this.opened=!0,this.mainMenus=[{name:"Beranda",link:"/home",icon:"dashboard",badge:null},{name:"Berita & Informasi",link:"/news",icon:"receipt_long",badge:null}],this.contentMenus=[{name:"Anime Musiman",link:"/anime",icon:"live_tv",badge:null},{name:"Film Drama",link:"/dorama",icon:"movie",badge:null},{name:"Katalog Fansub",link:"/fansub",icon:"closed_caption",badge:null},{name:"Berbagi Garapan",link:"/berkas",icon:"file_copy",badge:null}],this.additionalMenus=[{name:"E-Mail@FanSub.ID",link:"/mailbox",icon:"mail_outline",badge:null},{name:"Nihongo \u65e5\u672c\u8a9e",link:"/nihongo",icon:"translate",badge:null},{name:"Admin & Mod Panel",link:"/admin-mod",icon:"admin_panel_settings",badge:null}],this.miscMenus=[{name:"RSS Feed",link:"/rss-feed",icon:"rss_feed",badge:null}],this.otherMenus=[{name:"Kebijakan Privasi",link:"/privacy-policy",icon:"policy",badge:null}],this.gs.isBrowser&&(this.opened=window.innerWidth>=992)}changeSideNavState(){this.linkText=this.sideNavExpanded}forceCloseSideNav(){!this.gs.isDesktop&&this.sideNav.opened&&this.sideNav.close(),this.onMouseHoverOut()}onSideNavToggleView(){this.sideNav.opened?(this.sideNav.close(),this.gs.isDesktop||this.onMouseHoverOut()):(this.sideNav.open(),this.gs.isDesktop||this.onMouseHoverIn())}onSideNavToggleExpanded(){this.sideNavExpanded=!this.sideNavExpanded,this.changeSideNavState()}onMouseHoverIn(){!1===this.sideNavExpanded&&(this.sideNavExpanded=!0,this.changeSideNavState())}onMouseHoverOut(){!0===this.sideNavExpanded&&(this.sideNavExpanded=!1,this.changeSideNavState())}}return u.\u0275fac=function(E){return new(E||u)(n.LFG(r.U))},u.\u0275prov=n.Yz7({token:u,factory:u.\u0275fac,providedIn:"root"}),u})()},3379:(Je,F,s)=>{"use strict";s.d(F,{n:()=>u});var n=s(4650),r=s(8379),l=s(257);let u=(()=>{class o{constructor(x,d){this.cs=x,this.gs=d}getItem(x,d=!1){if(!this.gs.isBrowser)return null;if(!d)return localStorage.getItem(x);try{const g=localStorage.getItem(x),v=this.cs.msgDecrypt(g);return JSON.parse(v)}catch{return this.removeItem(x),null}}setItem(x,d){if(this.gs.isBrowser)if("string"==typeof d)localStorage.setItem(x,d);else{const g=JSON.stringify(d),v=this.cs.msgEncrypt(g);localStorage.setItem(x,v)}}removeItem(x){this.gs.isBrowser&&localStorage.removeItem(x)}clear(){if(this.gs.isBrowser)for(const x of Object.keys(this.gs.localStorageKeys))"Torrents"!==x&&this.removeItem(this.gs.localStorageKeys[x])}}return o.\u0275fac=function(x){return new(x||o)(n.LFG(r.$),n.LFG(l.U))},o.\u0275prov=n.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})()},9618:(Je,F,s)=>{"use strict";s.d(F,{Y:()=>u});var n=s(4650),r=s(9731),l=s(257);let u=(()=>{class o{constructor(x,d){this.api=x,this.gs=d}delete(x){return this.api.deleteData(`/news/${x}`)}getAllNews(x="",d=1,g=10,v="",_=""){return this.api.getData(`/news?q=${x}&page=${d}&row=${g}&sort=${v}&order=${_}`)}createNews(x){return this.api.postData("/news",x)}updateNews(x,d){return this.api.putData(`/news/${x}`,d)}getNews(x){return this.api.getData(`/news/${x}`)}}return o.\u0275fac=function(x){return new(x||o)(n.LFG(r.s),n.LFG(l.U))},o.\u0275prov=n.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})()},2663:(Je,F,s)=>{"use strict";s.d(F,{a:()=>u});var n=s(4650),r=s(9731),l=s(257);let u=(()=>{class o{constructor(x,d){this.api=x,this.gs=d}getAllNihongo(x="",d="",g=1,v=10,_="",m=""){return this.api.getData(`/nihongo?category=${x}&q=${d}&page=${g}&row=${v}&sort=${_}&order=${m}`)}getAllKategori(){return this.api.patchData("/nihongo")}createNihongo(x){return this.api.postData("/nihongo",x)}updateNihongo(x,d){return this.api.putData(`/nihongo/${x}`,d)}getHirakata(){return this.api.getData("/nihongo-hirakata-all")}getAllKanji(x="",d="",g="",v=1,_=10,m="",C=""){return this.api.getData(`/nihongo-kanji?jlpt=${x}&school=${d}&q=${g}&page=${v}&row=${_}&sort=${m}&order=${C}`)}getAllEdict(x="",d=1,g=10,v="",_=""){return this.api.getData(`/nihongo-edict?q=${x}&page=${d}&row=${g}&sort=${v}&order=${_}`)}}return o.\u0275fac=function(x){return new(x||o)(n.LFG(r.s),n.LFG(l.U))},o.\u0275prov=n.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})()},7140:(Je,F,s)=>{"use strict";s.d(F,{T:()=>u});var n=s(5934),r=s(4650),l=s(257);let u=(()=>{class o{constructor(x){this.gs=x,this.notifications=[],this.dissmissTimeout={},this.timedOut=null,this.gs.isBrowser&&this.notifications.push({notifCreator:null,notifData:{id:`${n.N.siteName.toUpperCase()}_UNDER_DEVELOPMENT`,type:"info",title:"Pemberitahuan!",content:'\n Jika ingin request fitur baru ataupun melaporkan Bug dapat menulis pesan di kanal\n \'#dev-prog\'.\n Termasuk juga melihat dan mencari semua log aktivitas secara transparan ada di kanal\n \'#aktivitas\'.\n Terima kasih. ^_^\n ',dismissible:!0}})}addNotif(x,d,g,v,_,m=!0){m&&(this.dissmissTimeout[d]=setTimeout(()=>this.removeNotif(d),1e4)),this.notifications.splice(0,0,{notifCreator:x,notifData:{id:d,type:g,title:v,content:_,dismissible:m}})}removeNotif(x){this.dissmissTimeout[x]&&(clearTimeout(this.dissmissTimeout[x]),this.dissmissTimeout[x]=null,delete this.dissmissTimeout[x]),this.timedOut=setTimeout(()=>{const d=this.notifications.findIndex(g=>g.notifData.id===x);d>=0&&(this.notifications=this.notifications.slice(0,d).concat(this.notifications.slice(d+1,this.notifications.length)))},500)}}return o.\u0275fac=function(x){return new(x||o)(r.LFG(l.U))},o.\u0275prov=r.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})()},8745:(Je,F,s)=>{"use strict";s.d(F,{Z:()=>E});var n=s(5934),r=s(4650),l=s(1481),u=s(257),o=s(1390);let E=(()=>{class x{constructor(g,v,_,m){this.t=g,this.m=v,this.gs=_,this.router=m,this.siteName=n.N.siteName,this.title="",this.description="",this.keywords="",this.image="",this.author="",this.header=""}get getHeaderTitle(){return this.header!==this.title?this.header:this.title}get getDescription(){return this.description}get getKeywords(){return this.keywords}updatePageMetaData(g,v,_,m=`${n.N.baseUrl}/assets/img/favicon.png`,C="\u300c\u{1f4a4} Fansub \u2728 ID \u{1f31e}\u300d"){this.title=g,this.updatePageHeader(),this.description=this.gs.htmlToText(v),this.keywords=_,this.image=m.startsWith("/")?n.N.baseUrl+m:m,this.author=C,this.t.setTitle(`${this.title} | ${this.siteName}`),this.m.updateTag({name:"keywords",content:this.keywords}),this.m.updateTag({name:"author",content:this.author}),this.m.updateTag({property:"og:title",content:`${this.title} | ${this.siteName}`}),this.m.updateTag({property:"og:image",content:this.image}),this.m.updateTag({name:"twitter:title",content:`${this.title} | ${this.siteName}`}),this.description&&(this.m.updateTag({name:"description",content:this.description}),this.m.updateTag({property:"og:description",content:this.description}),this.m.updateTag({name:"twitter:description",content:this.description})),this.m.updateTag({name:"twitter:image",content:this.image}),this.router.url.split("?")[0].includes("/berkas/")&&!this.image.includes(n.N.baseUrl)&&this.m.updateTag({name:"twitter:card",content:"summary_large_image"})}updateStatusBarTheme(g){this.m.updateTag(g?{name:"theme-color",content:"#673ab7"}:{name:"theme-color",content:"#3f51b5"})}updatePageHeader(g=null){this.header=g||this.title}}return x.\u0275fac=function(g){return new(g||x)(r.LFG(l.Dx),r.LFG(l.h_),r.LFG(u.U),r.LFG(o.F0))},x.\u0275prov=r.Yz7({token:x,factory:x.\u0275fac,providedIn:"root"}),x})()},7814:(Je,F,s)=>{"use strict";s.d(F,{C:()=>Be});var n=s(4650),r=s(257),l=s(9618),u=s(7845),o=s(2663),E=s(519),x=s(8439),d=s(6781),g=s(8987),v=s(8058),_=s(3379),m=s(6895),C=s(1390),O=s(4006),V=s(3238),G=s(7392),Y=s(9549),H=s(4144),ne=s(6338);function fe(Ce,nt){if(1&Ce&&(n.TgZ(0,"mat-list-option",11),n._UZ(1,"img",12),n.TgZ(2,"h4",13),n._uU(3),n.qZA(),n.TgZ(4,"h5",13)(5,"span",14),n._uU(6),n.qZA(),n._uU(7," \xa0 "),n.TgZ(8,"span",15),n._uU(9),n.ALo(10,"date"),n.qZA()()()),2&Ce){const ke=nt.$implicit;n.MGl("routerLink","/news/",ke.id,""),n.xp6(1),n.s9C("src",ke.image_url,n.LSH),n.xp6(2),n.Oqu(ke.title),n.xp6(3),n.Oqu(ke.user_.username),n.xp6(3),n.Oqu(n.xi3(10,5,ke.created_at,"d-MM-y"))}}function j(Ce,nt){if(1&Ce&&(n.TgZ(0,"div",0)(1,"div",5)(2,"h2",7)(3,"b",8),n._uU(4,"Berita"),n.qZA()()(),n.TgZ(5,"div",5)(6,"mat-selection-list",9),n.YNc(7,fe,11,8,"mat-list-option",10),n.ALo(8,"slice"),n.qZA()()()),2&Ce){const ke=n.oxw();n.xp6(6),n.Q6J("multiple",!1),n.xp6(1),n.Q6J("ngForOf",n.Dn7(8,2,ke.searchResult.beritaResults,0,5))}}function $(Ce,nt){if(1&Ce){const ke=n.EpF();n.TgZ(0,"mat-list-option",17),n.NdJ("click",function(){const Ie=n.CHM(ke).$implicit,ye=n.oxw(2);return n.KtG(ye.openEdict(Ie))}),n.TgZ(1,"h4",18),n._uU(2),n.qZA(),n.TgZ(3,"h5",18)(4,"span",14),n._uU(5),n.qZA(),n._uU(6," \xa0 "),n.TgZ(7,"span",15),n._uU(8),n.qZA()()()}if(2&Ce){const ke=nt.$implicit;n.xp6(2),n.lnq(" ",ke.character," | ",ke.v_kunyomi,"| ",ke.v_onyomi," "),n.xp6(3),n.hij("N",ke.jlpt,""),n.xp6(3),n.Oqu(ke.translate)}}function N(Ce,nt){if(1&Ce&&(n.TgZ(0,"div",0)(1,"div",5)(2,"h2",7)(3,"b",8),n._uU(4,"Kanji"),n.qZA()()(),n.TgZ(5,"div",5)(6,"mat-selection-list",9),n.YNc(7,$,9,5,"mat-list-option",16),n.ALo(8,"slice"),n.qZA()()()),2&Ce){const ke=n.oxw();n.xp6(6),n.Q6J("multiple",!1),n.xp6(1),n.Q6J("ngForOf",n.Dn7(8,2,ke.searchResult.kanjiResults,0,5))}}function ee(Ce,nt){if(1&Ce&&(n.TgZ(0,"mat-list-option",11),n._UZ(1,"img",12),n.TgZ(2,"h4",13),n._uU(3),n.qZA(),n.TgZ(4,"h5",13)(5,"span",14),n._uU(6),n.qZA(),n._uU(7," \xa0 "),n.TgZ(8,"span",15),n._uU(9),n.qZA()()()),2&Ce){const ke=nt.$implicit,wt=n.oxw(2);n.hYB("routerLink","/anime/",ke.id,"-",wt.getAnimeTitle(ke.title),""),n.xp6(1),n.s9C("src",ke.image_url,n.LSH),n.xp6(2),n.Oqu(ke.title),n.xp6(3),n.Oqu(ke.id),n.xp6(3),n.AsE("",ke.num_episodes," Eps ",null==ke.media_type?null:ke.media_type.toUpperCase(),"")}}function ue(Ce,nt){if(1&Ce&&(n.TgZ(0,"div",0)(1,"div",5)(2,"h2",7)(3,"b",8),n._uU(4,"Anime"),n.qZA()()(),n.TgZ(5,"div",5)(6,"mat-selection-list",9),n.YNc(7,ee,10,7,"mat-list-option",10),n.ALo(8,"slice"),n.qZA()()()),2&Ce){const ke=n.oxw();n.xp6(6),n.Q6J("multiple",!1),n.xp6(1),n.Q6J("ngForOf",n.Dn7(8,2,ke.searchResult.animeResults,0,5))}}function se(Ce,nt){if(1&Ce&&(n.TgZ(0,"mat-list-option",11),n._UZ(1,"img",12),n.TgZ(2,"h4",13),n._uU(3),n.qZA(),n.TgZ(4,"h5",13)(5,"span",14),n._uU(6),n.qZA(),n._uU(7," \xa0 "),n.TgZ(8,"span",15),n._uU(9),n.qZA()()()),2&Ce){const ke=nt.$implicit;n.MGl("routerLink","/dorama/",ke.slug,""),n.xp6(1),n.s9C("src",ke.thumb,n.LSH),n.xp6(2),n.Oqu(ke.title),n.xp6(3),n.Oqu(ke.mdl_id),n.xp6(3),n.Oqu(ke.type)}}function Oe(Ce,nt){if(1&Ce&&(n.TgZ(0,"div",0)(1,"div",5)(2,"h2",7)(3,"b",8),n._uU(4,"Dorama"),n.qZA()()(),n.TgZ(5,"div",5)(6,"mat-selection-list",9),n.YNc(7,se,10,5,"mat-list-option",10),n.ALo(8,"slice"),n.qZA()()()),2&Ce){const ke=n.oxw();n.xp6(6),n.Q6J("multiple",!1),n.xp6(1),n.Q6J("ngForOf",n.Dn7(8,2,ke.searchResult.doramaResults,0,5))}}function oe(Ce,nt){if(1&Ce&&(n.TgZ(0,"mat-list-option",11),n._UZ(1,"img",12),n.TgZ(2,"h4",13),n._uU(3),n.qZA(),n.TgZ(4,"h5",13)(5,"span",14),n._uU(6),n.qZA(),n._uU(7," \xa0 "),n.TgZ(8,"span",15),n._uU(9),n.ALo(10,"date"),n.qZA()()()),2&Ce){const ke=nt.$implicit;n.MGl("routerLink","/fansub/",ke.slug,""),n.xp6(1),n.s9C("src",ke.image_url,n.LSH),n.xp6(2),n.Oqu(ke.name),n.xp6(3),n.Oqu(ke.active?"Aktif":"Tidak Aktif"),n.xp6(3),n.Oqu(n.xi3(10,5,ke.born,"d-MM-y"))}}function Z(Ce,nt){if(1&Ce&&(n.TgZ(0,"div",0)(1,"div",5)(2,"h2",7)(3,"b",8),n._uU(4,"Fansub"),n.qZA()()(),n.TgZ(5,"div",5)(6,"mat-selection-list",9),n.YNc(7,oe,11,8,"mat-list-option",10),n.ALo(8,"slice"),n.qZA()()()),2&Ce){const ke=n.oxw();n.xp6(6),n.Q6J("multiple",!1),n.xp6(1),n.Q6J("ngForOf",n.Dn7(8,2,ke.searchResult.fansubResults,0,5))}}function de(Ce,nt){if(1&Ce&&(n.TgZ(0,"mat-list-option",11),n._UZ(1,"img",12),n.TgZ(2,"h4",13),n._uU(3),n.qZA(),n.TgZ(4,"h5",13)(5,"span",14),n._uU(6),n.qZA(),n._uU(7," \xa0 "),n.TgZ(8,"span",15),n._uU(9),n.ALo(10,"date"),n.qZA()()()),2&Ce){const ke=nt.$implicit;n.MGl("routerLink","/berkas/",ke.id,""),n.xp6(1),n.s9C("src",ke.image_url,n.LSH),n.xp6(2),n.Oqu(ke.name),n.xp6(3),n.Oqu(ke.user_.username),n.xp6(3),n.Oqu(n.xi3(10,5,ke.created_at,"d-MM-y"))}}function q(Ce,nt){if(1&Ce&&(n.TgZ(0,"div",0)(1,"div",5)(2,"h2",7)(3,"b",8),n._uU(4,"Berkas"),n.qZA()()(),n.TgZ(5,"div",5)(6,"mat-selection-list",9),n.YNc(7,de,11,8,"mat-list-option",10),n.ALo(8,"slice"),n.qZA()()()),2&Ce){const ke=n.oxw();n.xp6(6),n.Q6J("multiple",!1),n.xp6(1),n.Q6J("ngForOf",n.Dn7(8,2,ke.searchResult.berkasResults,0,5))}}function Ve(Ce,nt){if(1&Ce&&(n.TgZ(0,"mat-list-option",11),n._UZ(1,"img",12),n.TgZ(2,"h4",13),n._uU(3),n.qZA(),n.TgZ(4,"h5",13)(5,"span",14),n._uU(6),n.qZA(),n._uU(7," \xa0 "),n.TgZ(8,"span",15),n._uU(9),n.ALo(10,"date"),n.qZA()()()),2&Ce){const ke=nt.$implicit;n.MGl("routerLink","/user/",ke.username,""),n.xp6(1),n.s9C("src",ke.image_url,n.LSH),n.xp6(2),n.Oqu(ke.kartu_tanda_penduduk_.nama),n.xp6(3),n.Oqu(ke.id),n.xp6(3),n.Oqu(n.xi3(10,5,ke.created_at,"d-MM-y"))}}function qe(Ce,nt){if(1&Ce&&(n.TgZ(0,"div",0)(1,"div",5)(2,"h2",7)(3,"b",8),n._uU(4,"Pengguna"),n.qZA()()(),n.TgZ(5,"div",5)(6,"mat-selection-list",9),n.YNc(7,Ve,11,8,"mat-list-option",10),n.ALo(8,"slice"),n.qZA()()()),2&Ce){const ke=n.oxw();n.xp6(6),n.Q6J("multiple",!1),n.xp6(1),n.Q6J("ngForOf",n.Dn7(8,2,ke.searchResult.penggunaResults,0,5))}}let Ft=(()=>{class Ce{constructor(ke,wt,ge,Ie,ye,Le,at,Xe,vt,Tt){this.gs=ke,this.news=wt,this.ds=ge,this.nihon=Ie,this.anime=ye,this.dorama=Le,this.fansub=at,this.berkas=Xe,this.user=vt,this.ls=Tt,this.searchResult={q:"",beritaResults:[],kanjiResults:[],animeResults:[],doramaResults:[],fansubResults:[],berkasResults:[],penggunaResults:[]},this.subsBerita=null,this.subsKanji=null,this.subsAnime=null,this.subsDorama=null,this.subsFansub=null,this.subsBerkas=null,this.subsPengguna=null,this.subsDialog=null,this.timedOut1=null,this.timedOut2=null,this.timedOut3=null,this.timedOut4=null,this.timedOut5=null,this.timedOut6=null,this.timedOut7=null}ngOnInit(){this.gs.isBrowser&&(this.searchResult=this.ls.getItem(this.gs.localStorageKeys.SearchResults,!0)||this.searchResult)}ngOnDestroy(){this.ls.setItem(this.gs.localStorageKeys.SearchResults,this.searchResult),this.subsBerita?.unsubscribe(),this.subsKanji?.unsubscribe(),this.subsAnime?.unsubscribe(),this.subsDorama?.unsubscribe(),this.subsFansub?.unsubscribe(),this.subsBerkas?.unsubscribe(),this.subsPengguna?.unsubscribe(),this.subsDialog?.unsubscribe(),this.timedOut1&&(clearTimeout(this.timedOut1),this.timedOut1=null),this.timedOut2&&(clearTimeout(this.timedOut2),this.timedOut2=null),this.timedOut3&&(clearTimeout(this.timedOut3),this.timedOut3=null),this.timedOut4&&(clearTimeout(this.timedOut4),this.timedOut4=null),this.timedOut5&&(clearTimeout(this.timedOut5),this.timedOut5=null),this.timedOut6&&(clearTimeout(this.timedOut6),this.timedOut6=null),this.timedOut7&&(clearTimeout(this.timedOut7),this.timedOut7=null)}applyFilter(ke){this.gs.log("[SEARCH_VALUE_CHANGED]",ke),this.searchResult.q=ke.target.value.trim().toLowerCase(),this.searchResult.beritaResults=[],this.searchResult.kanjiResults=[],this.searchResult.animeResults=[],this.searchResult.doramaResults=[],this.searchResult.fansubResults=[],this.searchResult.berkasResults=[],this.searchResult.penggunaResults=[],this.searchResult.q&&(this.timedOut1=setTimeout(()=>{this.getNews()},250),this.timedOut2=setTimeout(()=>{this.getKanji()},500),this.timedOut3=setTimeout(()=>{this.getAnime()},750),this.timedOut4=setTimeout(()=>{this.getDorama()},1e3),this.timedOut5=setTimeout(()=>{this.getFansub()},1250),this.timedOut6=setTimeout(()=>{this.getBerkas()},1500),this.timedOut7=setTimeout(()=>{this.getPengguna()},1750))}openEdict(ke){this.gs.log("[HIRAKATA_OPEN_EDICT]",ke),this.subsDialog=this.ds.openEdictDialog({data:{character:ke.character,context:ke.context,freq:ke.freq,gakken:ke.gakken,harlpern_kkld:ke.harlpern_kkld,harlpern_njecd:ke.harlpern_njecd,jlpt:ke.jlpt,maniette:ke.maniette,nelson_c:ke.nelson_c,nelson_n:ke.nelson_n,remember:ke.remember,school:ke.school,skip:ke.skip,stroke:ke.stroke,translate:ke.translate,v_kunyomi:ke.v_kunyomi,v_onyomi:ke.v_onyomi},disableClose:!1}).afterClosed().subscribe({next:wt=>{this.gs.log("[EDICT_DIALOG_CLOSED]",wt),this.subsDialog.unsubscribe()}})}getNews(){this.subsBerita&&this.subsBerita.unsubscribe(),this.subsBerita=this.news.getAllNews(this.searchResult.q,1,5).subscribe({next:ke=>{this.gs.log("[NEWS_SEARCH_SUCCESS]",ke),this.searchResult.beritaResults=ke.results},error:ke=>{this.gs.log("[NEWS_SEARCH_ERROR]",ke,"error")}})}getKanji(){this.subsKanji&&this.subsKanji.unsubscribe(),this.subsKanji=this.nihon.getAllKanji("","",this.searchResult.q,1,5).subscribe({next:ke=>{this.gs.log("[KANJI_SEARCH_SUCCESS]",ke),this.searchResult.kanjiResults=ke.results},error:ke=>{this.gs.log("[KANJI_SEARCH_ERROR]",ke,"error")}})}getAnimeTitle(ke){return ke.replace(/[^a-zA-Z0-9]/g,"-")}getAnime(){this.subsAnime&&this.subsAnime.unsubscribe(),this.subsAnime=this.anime.searchAnime(this.searchResult.q).subscribe({next:ke=>{this.gs.log("[ANIME_SEARCH_SUCCESS]",ke),this.searchResult.animeResults=ke.results},error:ke=>{this.gs.log("[ANIME_SEARCH_ERROR]",ke,"error")}})}getDorama(){this.subsDorama&&this.subsDorama.unsubscribe(),this.subsDorama=this.dorama.searchDorama(this.searchResult.q).subscribe({next:ke=>{this.gs.log("[DORAMA_SEARCH_SUCCESS]",ke),this.searchResult.doramaResults=ke.results},error:ke=>{this.gs.log("[DORAMA_SEARCH_ERROR]",ke,"error")}})}getFansub(){this.subsFansub&&this.subsFansub.unsubscribe(),this.subsFansub=this.fansub.searchFansub(this.searchResult.q,1,5).subscribe({next:ke=>{this.gs.log("[FANSUB_SEARCH_SUCCESS]",ke),this.searchResult.fansubResults=ke.results},error:ke=>{this.gs.log("[FANSUB_SEARCH_ERROR]",ke,"error")}})}getBerkas(){this.subsBerkas&&this.subsBerkas.unsubscribe(),this.subsBerkas=this.berkas.getAllBerkas(this.searchResult.q,1,5,"","",!0).subscribe({next:ke=>{this.gs.log("[BERKAS_SEARCH_SUCCESS]",ke),this.searchResult.berkasResults=ke.results},error:ke=>{this.gs.log("[BERKAS_SEARCH_ERROR]",ke,"error")}})}getPengguna(){this.subsPengguna&&this.subsPengguna.unsubscribe(),this.subsPengguna=this.user.getAllUser(this.searchResult.q,1,5).subscribe({next:ke=>{this.gs.log("[PENGGUNA_SEARCH_SUCCESS]",ke),this.searchResult.penggunaResults=ke.results},error:ke=>{this.gs.log("[PENGGUNA_SEARCH_ERROR]",ke,"error")}})}}return Ce.\u0275fac=function(ke){return new(ke||Ce)(n.Y36(r.U),n.Y36(l.Y),n.Y36(u.x),n.Y36(o.a),n.Y36(E.o),n.Y36(x.X),n.Y36(d.T),n.Y36(g.A),n.Y36(v.K),n.Y36(_.n))},Ce.\u0275cmp=n.Xpm({type:Ce,selectors:[["app-search-all"]],decls:15,vars:9,consts:[[1,"row"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"ms-auto","pt-3","col-12",3,"color"],["matInput","","maxlength","200","placeholder","Ex. \u3070\u30fc\u304b\u30fc\uff01",3,"ngModel","keyup.enter","ngModelChange"],["fontIcon","search","matSuffix",""],[1,"col-12"],["class","row",4,"ngIf"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"pt-0",3,"multiple"],[3,"routerLink",4,"ngFor","ngForOf"],[3,"routerLink"],["matListAvatar","",1,"ms-3",2,"border-radius","0",3,"src"],["matLine",""],[1,"text-warning"],[1,"text-success"],[3,"click",4,"ngFor","ngForOf"],[3,"click"],["matLine","",1,"ms-3"]],template:function(ke,wt){1&ke&&(n.TgZ(0,"div",0)(1,"div",1)(2,"mat-form-field",2)(3,"mat-label"),n._uU(4,"Cari Apapun Di Sini ..."),n.qZA(),n.TgZ(5,"input",3),n.NdJ("keyup.enter",function(Ie){return wt.applyFilter(Ie)})("ngModelChange",function(Ie){return wt.searchResult.q=Ie}),n.qZA(),n._UZ(6,"mat-icon",4),n.qZA()(),n.TgZ(7,"div",5),n.YNc(8,j,9,6,"div",6),n.YNc(9,N,9,6,"div",6),n.YNc(10,ue,9,6,"div",6),n.YNc(11,Oe,9,6,"div",6),n.YNc(12,Z,9,6,"div",6),n.YNc(13,q,9,6,"div",6),n.YNc(14,qe,9,6,"div",6),n.qZA()()),2&ke&&(n.xp6(2),n.Q6J("color","accent"),n.xp6(3),n.Q6J("ngModel",wt.searchResult.q),n.xp6(3),n.Q6J("ngIf",wt.searchResult.beritaResults.length>0),n.xp6(1),n.Q6J("ngIf",wt.searchResult.kanjiResults.length>0),n.xp6(1),n.Q6J("ngIf",wt.searchResult.animeResults.length>0),n.xp6(1),n.Q6J("ngIf",wt.searchResult.doramaResults.length>0),n.xp6(1),n.Q6J("ngIf",wt.searchResult.fansubResults.length>0),n.xp6(1),n.Q6J("ngIf",wt.searchResult.berkasResults.length>0),n.xp6(1),n.Q6J("ngIf",wt.searchResult.penggunaResults.length>0))},dependencies:[m.sg,m.O5,C.rH,O.Fj,O.JJ,O.nD,O.On,V.X2,G.Hw,Y.KE,Y.hX,Y.R9,H.Nt,ne.eA,ne.Ub,ne.vS,m.OU,m.uU]}),Ce})();var Lt=s(466),xt=s(3546);function Pe(Ce,nt){if(1&Ce&&n._UZ(0,"mat-icon",12),2&Ce){const ke=n.oxw().$implicit;n.Q6J("fontIcon",ke.icon)}}function He(Ce,nt){if(1&Ce&&(n.TgZ(0,"div",6)(1,"mat-card")(2,"mat-card-header",7)(3,"div",8),n.YNc(4,Pe,1,1,"mat-icon",9),n.qZA(),n.TgZ(5,"mat-card-title",10)(6,"h3",11),n._uU(7),n.qZA()(),n.TgZ(8,"mat-card-subtitle",11),n._uU(9),n.qZA()()()()),2&Ce){const ke=nt.$implicit;n.xp6(2),n.MGl("routerLink","/admin-mod/",ke.url,""),n.xp6(1),n.Udp("background-image","url("+(ke.image_url?ke.image_url:"")+")"),n.xp6(1),n.Q6J("ngIf",ke.icon),n.xp6(3),n.Oqu(ke.name),n.xp6(2),n.Oqu(ke.deskripsi)}}let ae=(()=>{class Ce{constructor(ke,wt){this.gs=ke,this.adm=wt}get ADM(){return this.adm}ngOnInit(){}}return Ce.\u0275fac=function(ke){return new(ke||Ce)(n.Y36(r.U),n.Y36(Lt.l))},Ce.\u0275cmp=n.Xpm({type:Ce,selectors:[["app-admin-navigation"]],decls:7,vars:1,consts:[[1,"row"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"col-12","px-3"],["class","col-12 p-2",4,"ngFor","ngForOf"],[1,"col-12","p-2"],[2,"cursor","pointer",3,"routerLink"],["mat-card-avatar","",2,"background-size","cover","border-radius","0"],["style","font-size: 300%;",3,"fontIcon",4,"ngIf"],[1,"text-warning","mb-1",2,"cursor","pointer"],[1,"mb-0"],[2,"font-size","300%",3,"fontIcon"]],template:function(ke,wt){1&ke&&(n.TgZ(0,"div",0)(1,"div",1)(2,"h2",2)(3,"b",3),n._uU(4,"Menu Admin Lainnya"),n.qZA()()(),n.TgZ(5,"div",4),n.YNc(6,He,10,6,"div",5),n.qZA()()),2&ke&&(n.xp6(6),n.Q6J("ngForOf",wt.ADM.menuList))},dependencies:[m.sg,m.O5,C.rH,xt.a8,xt.dk,xt.n5,xt.$j,xt.kc,G.Hw]}),Ce})();var be=s(1617),he=s(8381);let Be=(()=>{class Ce{constructor(ke,wt){this.gs=ke,this.ss=wt,this.sidePanel=null,this.componentView=null}toggleSidePanel(ke){this.componentView?this.closeSidePanel():this.openSidePanel(ke)}closeSidePanel(){this.sidePanel.close()}onClose(){this.componentView=null}openSidePanel(ke){if("string"!=typeof ke)this.componentView=ke;else if("SearchAllComponent"===ke)this.componentView=Ft;else if("AdminNavigationComponent"===ke)this.componentView=ae;else if("LiveChatComponent"===ke){if(!this.ss.mySocket.id)return;this.componentView=be.u}this.sidePanel.open()}}return Ce.\u0275fac=function(ke){return new(ke||Ce)(n.LFG(r.U),n.LFG(he.R))},Ce.\u0275prov=n.Yz7({token:Ce,factory:Ce.\u0275fac,providedIn:"root"}),Ce})()},9775:(Je,F,s)=>{"use strict";s.d(F,{H:()=>E});var n=s(5861),r=s(4650),l=s(9784),u=s(257),o=s(7845);let E=(()=>{class x{constructor(g,v,_,m){this.su=g,this.sp=v,this.gs=_,this.ds=m,this.isUpdateAvailable=!1,this.swuVerUpd=null,this.swuUnRecv=null,this.dialogRef=null,this.subsDialog=null,this.gs.isBrowser&&this.initialize()}get swEnabled(){return this.su.isEnabled&&this.sp.isEnabled}checkForUpdate(){var g=this;return(0,n.Z)(function*(){if(!g.isUpdateAvailable){g.isUpdateAvailable=!0;try{g.isUpdateAvailable=yield g.su.checkForUpdate()}catch(v){g.gs.log("[SERVICE_WORKER_CHECK_FOR_UPDATE_ERROR]",v,"error")}}return g.gs.log("[SERVICE_WORKER_UPDATE_AVAILABLE]",g.isUpdateAvailable),g.isUpdateAvailable})()}activateUpdate(){var g=this;return(0,n.Z)(function*(){let v=!1;if(g.isUpdateAvailable)try{v=yield g.su.activateUpdate(),g.isUpdateAvailable=!1,g.dialogRef?.close(null),g.subsDialog?.unsubscribe(),g.dialogRef=g.ds.openInfoDialog({data:{title:"Pembaharuan "+(v?"Berhasil":"Gagal"),htmlMessage:"Ingin Refresh Halaman (?)",confirmText:"Ya",cancelText:"Tidak"}}),g.subsDialog=g.dialogRef?.afterClosed().subscribe({next:_=>{g.gs.log("[INFO_DIALOG_CLOSED]",_),g.dialogRef=null,g.subsDialog.unsubscribe(),!0===_&&window.location.reload()}})}catch(_){g.gs.log("[SERVICE_WORKER_ACTIVATE_UPDATE_ERROR]",_,"error")}return g.gs.log("[SERVICE_WORKER_UPDATE_FINISH]",v),v})()}initialize(){var g=this;return(0,n.Z)(function*(){var v;g.swuVerUpd=g.su.versionUpdates.subscribe({next:(v=(0,n.Z)(function*(_){g.gs.log(`[SERVICE_WORKER_${_.type}]`,_),"VERSION_DETECTED"===_.type&&(g.dialogRef?.close(null),g.subsDialog?.unsubscribe()),"VERSION_READY"===_.type&&(g.dialogRef=g.ds.openInfoDialog({data:{title:"Ada Pembaharuan Tersedia",htmlMessage:`\n
Sekarang :: ${_.currentVersion?.hash?.slice(0,8)}
\n
Tersedia :: ${_.latestVersion?.hash?.slice(0,8)}
\n `,confirmText:"OK"}})),"VERSION_INSTALLATION_FAILED"===_.type&&(g.dialogRef=g.ds.openInfoDialog({data:{title:"Pembaharuan Gagal",htmlMessage:`\n
Versi :: ${_.version?.hash?.slice(0,8)}
\n
Error :: ${_.error}
\n `,confirmText:"Ulangi",cancelText:"Lewati"}})),g.subsDialog=g.dialogRef?.afterClosed().subscribe({next:m=>{g.gs.log("[INFO_DIALOG_CLOSED]",m),!0===m&&g.activateUpdate(),g.dialogRef=null,g.subsDialog.unsubscribe()}})}),function(m){return v.apply(this,arguments)})}),g.swuUnRecv=g.su.unrecoverable.subscribe({next:v=>{g.gs.log(`[SERVICE_WORKER_${v.type}]`,v.reason),g.dialogRef?.close(null),g.subsDialog?.unsubscribe(),g.dialogRef=g.ds.openInfoDialog({data:{title:"Service Worker Bermasalah",htmlMessage:`Kesalahan :: ${v.reason}`,confirmText:"Refresh Halaman"}}),g.subsDialog=g.dialogRef?.afterClosed().subscribe({next:_=>{g.gs.log("[INFO_DIALOG_CLOSED]",_),g.dialogRef=null,g.subsDialog.unsubscribe(),window.location.reload()}})}})})()}}return x.\u0275fac=function(g){return new(g||x)(r.LFG(l.yO),r.LFG(l.Mk),r.LFG(u.U),r.LFG(o.x))},x.\u0275prov=r.Yz7({token:x,factory:x.\u0275fac,providedIn:"root"}),x})()},8381:(Je,F,s)=>{"use strict";s.d(F,{R:()=>Y});var n=s(5861),r=s(685),l=s.n(r),u=s(1135),o=s(6271),E=s(5934),x=s(4650),d=s(4137),g=s(1390),v=s(257),_=s(3e3),m=s(7140),C=s(7),O=s(6925),V=s(7845),G=s(9775);let Y=(()=>{class H{constructor(fe,j,$,N,ee,ue,se,Oe,oe){this.as=fe,this.router=j,this.gs=$,this.bs=N,this.notif=ee,this.lms=ue,this.toast=se,this.ds=Oe,this.sw=oe,this.mySocket=null,this.visitor=0,this.latency=0,this.statsServer={cpus:0,mem_ram:0,disk_io:0,net_tx:0,net_rx:0,billing:0},this.messageChatUnreadCount=0,this.badgeNews=[],this.badgeBerkas=[],this.badgeFansub=[],this.github=null,this.currentServerSubject=new u.X(null),this.currentServer=this.currentServerSubject.asObservable(),this.currentServerValue=null,this.currentRoomSubject=new u.X(null),this.currentRoom=this.currentRoomSubject.asObservable(),this.currentChatRoom=[],this.globalRoomSubject=new u.X(null),this.globalRoom=this.globalRoomSubject.asObservable(),this.globalChatRoom=[],this.fansubRoomSubject=new u.X(null),this.fansubRoom=this.fansubRoomSubject.asObservable(),this.fansubChatRoom=[],this.serverLog="// Tidak Ada Catatan Log~",this.quizRoom={},this.subsServer=null,this.subsDialog=null,this.timedOut=null,this.gs.isBrowser&&(this.mySocket=l()("//",{query:{"ngsw-bypass":!0,token:this.as.token},transports:["websocket","polling"],transportOptions:{polling:{extraHeaders:{"x-access-token":this.as.token}}}}),this.socketListen(),this.checkServerMaintenance())}get currentRoomValue(){return this.currentRoomSubject?.value||null}get globalRoomValue(){return this.globalRoomSubject?.value||null}checkServerMaintenance(){var j,fe=this;this.subsServer=this.currentServer.subscribe({next:(j=(0,n.Z)(function*($){$&&$.isMaintenance&&fe.currentServerValue?.isMaintenance!==$.isMaintenance&&(fe.subsDialog=(yield fe.ds.openMaintenanceDialog()).afterClosed().subscribe({next:N=>{fe.gs.log("[INFO_DIALOG_CLOSED]",N),fe.subsDialog.unsubscribe()}})),fe.currentServerValue=$}),function(N){return j.apply(this,arguments)})})}pingPong(){this.socketEmitVolatile("ping-pong",{},fe=>{this.gs.log("[SOCKET_PING_PONG]",fe),"github"in fe&&fe.github&&(this.github=fe.github),"visitor"in fe&&fe.visitor&&(this.visitor=fe.visitor),"server"in fe&&fe.server&&this.currentServerSubject.next(fe.server)}),this.socketEmitVolatile("stats-server",{},fe=>{this.gs.log("[SOCKET_STATS_SERVER]",fe),this.statsServer=fe})}socketListen(){var fe=this;this.mySocket.on("connect",()=>{this.gs.log("[SOCKET_CONNECTED]",this.mySocket.id),this.pingPong(),this.notif.removeNotif(`${E.N.siteName.toUpperCase()}_SOCKET_DISCONNECTED`),this.timedOut=setTimeout(()=>{this.socketLeaveAndJoinNewRoom(null,this.router.url.split("?")[0])},1234)}),this.mySocket.on("connect_error",()=>{this.gs.log("[SOCKET_CONNECT_ERROR]",this.mySocket.io.opts,"error"),this.mySocket.io.opts.transports=["polling","websocket"]}),this.mySocket.on("disconnect",j=>{this.gs.log("[SOCKET_DISCONNECTED]",j),this.notif.addNotif(null,`${E.N.siteName.toUpperCase()}_SOCKET_DISCONNECTED`,"warning","Sambungan Terputus","Tidak dapat terhubung dengan Server melalui WebSocket !!",!1),this.sw.isUpdateAvailable=!1}),this.mySocket.on("ping",()=>{this.gs.log("[SOCKET_PING]",Date.now())}),this.mySocket.on("server-config",j=>{this.currentServerSubject.next(j)}),this.mySocket.on("pong",j=>{this.latency=j,this.gs.log("[SOCKET_PONG]",`${Date.now()} => ${j} ms`),this.pingPong(),this.sw.checkForUpdate()}),this.mySocket.on("visitor",j=>{this.gs.log("[SOCKET_VISITOR]",j),this.visitor=j}),this.mySocket.on("console-log",j=>{this.gs.log("[SOCKET_CONSOLE_LOG]",j),this.serverLog=`${j}\r\n${this.serverLog}`}),this.mySocket.on("force-redirect",j=>{this.gs.log("[SOCKET_REDIRECT]",j.message),this.toast.info(j.message,j.title,null,!0),this.router.navigateByUrl(j.url)}),this.mySocket.on("force-logout",j=>{this.gs.log("[SOCKET_EXIT]",j),this.toast.info(j,"Keluar Paksa!",null,!0),this.as.logout()}),this.mySocket.on("new-notification",j=>{this.gs.log("[SOCKET_NOTIFICATION]",j),this.notif.addNotif(j.notifCreator,j.notifData.id,j.notifData.type,j.notifData.title,j.notifData.content,j.notifData.dismissible)}),this.mySocket.on("new-information",function(){var j=(0,n.Z)(function*($){fe.gs.log("[SOCKET_INFORMATION]",$),fe.subsDialog=fe.ds.openInfoDialog({data:{title:$.infoData.title,htmlMessage:$.infoData.content,confirmText:$.infoData.confirm,cancelText:$.infoData.cancel},disableClose:$.infoData.close}).afterClosed().subscribe({next:N=>{fe.gs.log("[INFO_DIALOG_CLOSED]",N),fe.subsDialog.unsubscribe()}})});return function($){return j.apply(this,arguments)}}()),this.mySocket.on("new-berkas",j=>{this.gs.log("[SOCKET_BERKAS]",j),this.badgeBerkas.push(j);const $=this.lms.contentMenus.find(N=>"/berkas"===N.link);$&&($.badge=this.badgeBerkas.length>0?this.badgeBerkas.length:null)}),this.mySocket.on("new-fansub",j=>{this.gs.log("[SOCKET_FANSUB]",j),this.badgeFansub.push(j);const $=this.lms.contentMenus.find(N=>"/fansub"===N.link);$&&($.badge=this.badgeFansub.length>0?this.badgeFansub.length:null)}),this.mySocket.on("new-news",j=>{this.gs.log("[SOCKET_NEWS]",j),this.badgeNews.push(j);const $=this.lms.mainMenus.find(N=>"/news"===N.link);$&&($.badge=this.badgeNews.length>0?this.badgeNews.length:null)}),this.mySocket.on("receive-chat",j=>{this.gs.log("[SOCKET_RECEIVE-CHAT]",j),j.room_id===o.t.socketRoomNameGlobalPublic?this.globalChatRoom.push(j):j.room_id===o.t.socketRoomNameGlobalFansub?this.fansubChatRoom.push(j):j.room_id!==o.t.socketRoomNameServerLogs&&this.currentChatRoom.push(j),this.messageChatUnreadCount++}),this.mySocket.on("room-info",j=>{this.gs.log("[SOCKET_ROOM-INFO]",j),this.gs.cleanObject(j?.member_list),j.room_id===o.t.socketRoomNameGlobalPublic?this.globalRoomSubject.next(j):j.room_id===o.t.socketRoomNameGlobalFansub?this.fansubRoomSubject.next(j):j.room_id!==o.t.socketRoomNameServerLogs&&this.currentRoomSubject.next(j)}),this.mySocket.on("multiple-connection",(j,$)=>{this.gs.log("[SOCKET_MULTIPLE-CONNECTION]",j),this.toast.warning("Sesi lain telah aktif!","Koneksi Duplikat",null,!0),this.mySocket.io.reconnection(!1),this.bs.clear(),$&&$()}),this.mySocket.on("quiz-question",j=>{if(this.gs.log("[SOCKET_QUIZ]",j),this.gs.routerData.question&&this.gs.routerData.options){const{room_id:$,...N}=j;this.quizRoom[$]=N,this.quizRoom[$].options=this.gs.shuffle(this.quizRoom[$].options)}})}socketEmit(fe,j={},$=null){this.as.token&&(j.token=this.as.token),$?this.mySocket?.emit(fe,j,$):this.mySocket?.emit(fe,j)}socketEmitVolatile(fe,j={},$=null){this.socketEmit(fe,j,$)}socketLeaveAndJoinNewRoom(fe,j){this.gs.log(`[SOCKET_LEAVE-JOIN-ROOM] ${fe} => ${j}`),this.socketEmit("leave-join-room",{oldRoom:fe,newRoom:j})}}return H.\u0275fac=function(fe){return new(fe||H)(x.LFG(d.e),x.LFG(g.F0),x.LFG(v.U),x.LFG(_.z),x.LFG(m.T),x.LFG(C.S),x.LFG(O.k),x.LFG(V.x),x.LFG(G.H))},H.\u0275prov=x.Yz7({token:H,factory:H.\u0275fac,providedIn:"root"}),H})()},6925:(Je,F,s)=>{"use strict";s.d(F,{k:()=>o});var n=s(4650),r=s(257),l=s(7185),u=s(7140);let o=(()=>{class E{constructor(d,g,v){this.gs=d,this.toast=g,this.notif=v}remove(d){return this.toast.remove(d)}success(d,g,v,_=!1){return _&&this.notif.addNotif(null,Date.now(),"success",g,d),this.gs.isDesktop||_?this.toast.success(d,g,v):null}warning(d,g,v,_=!1){return _&&this.notif.addNotif(null,Date.now(),"warning",g,d),this.gs.isDesktop||_?this.toast.warning(d,g,v):null}info(d,g,v,_=!1){return _&&this.notif.addNotif(null,Date.now(),"info",g,d),this.gs.isDesktop||_?this.toast.info(d,g,v):null}error(d,g,v,_=!1){return _&&this.notif.addNotif(null,Date.now(),"danger",g,d),this.gs.isDesktop||_?this.toast.error(d,g,v):null}}return E.\u0275fac=function(d){return new(d||E)(n.LFG(r.U),n.LFG(l._W),n.LFG(u.T))},E.\u0275prov=n.Yz7({token:E,factory:E.\u0275fac,providedIn:"root"}),E})()},8058:(Je,F,s)=>{"use strict";s.d(F,{K:()=>E});var n=s(8505),r=s(4650),l=s(9731),u=s(4137),o=s(257);let E=(()=>{class x{constructor(g,v,_){this.api=g,this.as=v,this.gs=_}delete(g){return this.api.deleteData(`/user/${g}`)}checkBanned(g){return this.api.getData(`/banned?username=${g}`)}getAllUser(g="",v=1,_=10,m="",C=""){return this.api.getData(`/user?q=${g}&page=${v}&row=${_}&sort=${m}&order=${C}`)}getUserData(g){return this.api.getData(`/user/${g}`)}updateUser(g,v){return this.api.putData(`/user/${g}`,v).pipe((0,n.b)(_=>{this.as.token=_.result.token}))}getUserBerkas(g,v="",_=1,m=10,C="",O=""){return this.api.getData(`/user/${g}/feed-berkas?q=${v}&page=${_}&row=${m}&sort=${C}&order=${O}`)}getUserFeedComment(g,v="",_=1,m=10,C="",O=""){return this.api.getData(`/user/${g}/feed-comment?q=${v}&page=${_}&row=${m}&sort=${C}&order=${O}`)}getUserFeedLikeDislike(g,v="",_=1,m=10,C="",O=""){return this.api.getData(`/user/${g}/feed-likedislike?q=${v}&page=${_}&row=${m}&sort=${C}&order=${O}`)}getUserFeedVisit(g,v="",_=1,m=10,C="",O=""){return this.api.getData(`/user/${g}/feed-visit?q=${v}&page=${_}&row=${m}&sort=${C}&order=${O}`)}sosmedLogin(g){return this.api.postData("/verify-sosmed",g)}getUserGroup(g){return this.api.getData(`/user/${g}/group`)}findLostAccount(g){return this.api.postData("/lost-account-find",g)}resetLostAccount(g){return this.api.postData("/lost-account-reset",g)}}return x.\u0275fac=function(g){return new(g||x)(r.LFG(l.s),r.LFG(u.e),r.LFG(o.U))},x.\u0275prov=r.Yz7({token:x,factory:x.\u0275fac,providedIn:"root"}),x})()},8020:(Je,F,s)=>{"use strict";s.d(F,{N:()=>E});var n=s(5861),r=s(4650),l=s(257),u=s(7845),o=s(8381);let E=(()=>{class x{constructor(g,v,_){this.gs=g,this.ds=v,this.ss=_,this.currentServer=null,this.openedWindow={},this.subsDialog=null,this.subsServer=null,this.gs.isBrowser&&(this.subsServer=this.ss.currentServer.subscribe({next:m=>this.currentServer=m}))}confirmationOpenUrl(g,v){var _=this;return(0,n.Z)(function*(){_.subsDialog=(yield _.ds.openKonfirmasiDialog(`Ingin Buka Di Tab ${"_self"===v?"Ini":"Baru"} ?`,g,!1)).afterClosed().subscribe({next:m=>{_.gs.log("[INFO_DIALOG_CLOSED]",m),!0===m&&window.open(g,v),_.subsDialog.unsubscribe()}})})()}winboxOpenUri(g,v="_blank",_=!1){if(g.startsWith("http://")&&(g="https://"+g.slice(7,g.length)),g.startsWith("/api/"))this.confirmationOpenUrl(g,"_self");else if(this.currentServer?.winboxOpenLink&&!this.gs.includesOneOf(g,["ftp://","mailto:"])||_){const m=Date.now();this.openedWindow[m]=new WinBox(g,{id:m,title:g,url:g,class:"no-full no-shadow no-max",background:"#7b1fa2",x:"center",y:"center",top:56,right:0,bottom:32,left:64,onclose:C=>(this.confirmationOpenUrl(g,v),!1)})}else this.confirmationOpenUrl(g,v)}}return x.\u0275fac=function(g){return new(g||x)(r.LFG(l.U),r.LFG(u.x),r.LFG(o.R))},x.\u0275prov=r.Yz7({token:x,factory:x.\u0275fac,providedIn:"root"}),x})()},6271:(Je,F,s)=>{"use strict";s.d(F,{t:()=>n});const n={apiTagAnime:"Anime",apiTagApiKey:"API Key",apiTagAttachment:"Attachment",apiTagBanned:"Banned",apiTagBerkas:"Berkas",apiTagDorama:"Dorama",apiTagDdlFile:"DDL File",apiTagFansub:"Fansub",apiTagMail:"Surat Elektronik",apiTagNews:"News",apiTagNihongo:"Nihongo",apiTagQuiz:"Quiz",apiTagSession:"Session",apiTagUser:"User",attachmentSpeedLimiterBps:256e3,blacklistedWords:["*","www","fansub","fansub.id","fansubid","fansub-id","crawl","crawler","localhost","mail","email","e-mail","tracker","fansub","fansubber","ferdion","bifeldy","dev","api","docs","cs","help","support","proxy","admin","administrator","info","information","noreply","mod","moderator"],cronFansubRssFeed:"CRON_FANSUB_RSS_FEED",cronTrackerStatistics:"CRON_TRACKER_STATISTICS",cronSitemap:"CRON_SITEMAP",cronStatsServer:"CRON_STATS_SERVER",cronUpload:"CRON_UPLOAD",cronVpsBilling:"CRON_VPS_BILLING",decoratorFilterApiKeyAccess:"filter-api-key-access",decoratorRoles:"roles",decoratorVerifiedOnly:"verified-only",extAttachment:["avi","mkv","mp4","zip"],extFonts:["ttf","otf","woff","woff2"],extSubs:["ass","srt"],externalApiCacheTime:900,fileTypeAttachmentAllowed:["video/x-msvideo","video/x-matroska","video/mp4","application/zip","application/zip-compressed","application/x-zip","application/x-zip-compressed"],fileSizeAttachmentChunkCloudflareLimit:64e6,fileSizeAttachmentChunkDiscordLimit:8e6,fileTypeAttachmentStreamable:["mkv","mp4"],fileSizeAttachmentTotalLimit:2e9,fileSizeImageLimit:512e3,freeTimeStart:"02:00:00",freeTimeEnd:"02:30:00",gCaptchaSiteKey:"6Ld4Bt4UAAAAAKJQ_jfqtWdsq9BuARLHag2DBvqK",jwtAlgorithm:"HS512",jwtExpiredIn:86400,quizOptionsCountHirakata:5,quizOptionsCountCategory:6,quizOptionsCountKanji:6,regexIpAddress:/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,regexAllKeyboardKeys:/^[\P{Cc}\P{Cn}\P{Cs}]*$/,regexEmail:/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$/,regexEmailMulti:/^[^a-z0-9_]*([a-z0-9_+\-.%]+@[a-z0-9_\-.]+\.[a-z]+[^a-z0-9_]*,{1}[^a-z0-9_]*)*([a-z0-9_+\-.%]+@[a-z0-9_\-.]+\.[a-z]+)[^a-z0-9_]*$/,regexEnglishKeyboardKeys:/^[a-zA-Z0-9~`!@#\$%\^&\*\(\)_\-\+={\[\}\]\|\\:;"'<,>\.\?\/ \n]*$/,regexIllegalFileName:/[/\\?%*:|"<>]/g,regexJapaneseKeyboardKeys:/[\u4e00-\u9fa0\u3041-\u3094\u30a1-\u30f4\u30fc\uff41-\uff5a\uff21-\uff3a\uff10-\uff19\u3005\u3006\u3024\u3001\u3002]+/u,regexUrl:/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/,retryDdlUploadMaxCount:5,socketRoomNameGlobalPublic:"GLOBAL_PUBLIK",socketRoomNameGlobalFansub:"GLOBAL_FANSUB",socketRoomNameServerLogs:"SERVER_LOGS",timeoutCancelRegisterKey:"TIMEOUT_CANCEL_REGISTER",timeoutCancelRegisterTime:3e5,timeoutDeleteTempAttachmentKey:"TIMEOUT_DELETE_TEMP_ATTACHMENT",timeoutDeleteTempAttachmentTime:6e5,timeoutMailWebhookTime:6e4,timeoutReconnectSocketKey:"TIMEOUT_RECONNECT_SOCKET",timeoutReconnectSocketTime:5e3,timeJwtEncryption:180,timeLoginRememberMe:604800,timeResetAccount:300,timeMaxDaysNotification:6048e5,verificationDomain:["ghs.google.com"]}},5934:(Je,F,s)=>{"use strict";s.d(F,{N:()=>n});const n={production:!0,siteName:"FansubID",siteDescription:"Di Kamar Saja!",author:"Bifeldy",domain:"fansub.id",baseUrl:"https://www.fansub.id",apiUrl:"/api",apiKey:"00000000-0000-0000-0000-000000000000",discord:{client_id:"789831990433153034",join_url:"https://discord.gg/xGWdExk",guild_id:"342220398022098944"},torrent:{trackerAnnounce:["wss://tracker.fansub.id","wss://tracker.btorrent.xyz","wss://tracker.openwebtorrent.com"],iceServers:[{urls:["stun:tracker.fansub.id:11111","stun:openrelay.metered.ca:80","stun:stun.l.google.com:19302"]}]}}},1141:(Je,F,s)=>{"use strict";var n=s(1481),r=s(4650),l=s(529),u=s(9646),o=s(9300),E=s(5698),x=s(8505);function d(L){const y={};for(const h of L.keys()){const A=L.getAll(h);null!==A&&(y[h]=A)}return y}let g=(()=>{class L{constructor(h,A){this.transferState=A,this.isCacheActive=!0,h.isStable.pipe((0,o.h)(re=>re),(0,E.q)(1)).subscribe(()=>{this.isCacheActive=!1})}invalidateCacheEntry(h){Object.keys(this.transferState.store).forEach(A=>A.includes(h)?this.transferState.remove((0,n.Cb)(A)):null)}makeCacheKey(h,A,re){const Se=re.keys().sort().map(yt=>`${yt}=${re.getAll(yt)}`).join("&");return(0,n.Cb)(("GET"===h?"G.":"H.")+A+"?"+Se)}intercept(h,A){if("GET"!==h.method&&"HEAD"!==h.method&&(this.isCacheActive=!1,this.invalidateCacheEntry(h.url)),!this.isCacheActive)return A.handle(h);const re=this.makeCacheKey(h.method,h.url,h.params);if(this.transferState.hasKey(re)){const Se=this.transferState.get(re,{});return(0,u.of)(new l.Zn({body:Se.body,headers:new l.WM(Se.headers),status:Se.status,statusText:Se.statusText,url:Se.url}))}return A.handle(h).pipe((0,x.b)(ht=>{ht instanceof l.Zn&&this.transferState.set(re,{body:ht.body,headers:d(ht.headers),status:ht.status,statusText:ht.statusText,url:ht.url||""})}))}}return L.\u0275fac=function(h){return new(h||L)(r.LFG(r.z2F),r.LFG(n.ki))},L.\u0275prov=r.Yz7({token:L,factory:L.\u0275fac}),L})(),v=(()=>{class L{}return L.\u0275fac=function(h){return new(h||L)},L.\u0275mod=r.oAB({type:L}),L.\u0275inj=r.cJS({providers:[g,{provide:l.TP,useExisting:g,multi:!0}],imports:[n.Cu]}),L})();var C=s(7340);function V(L){return new r.vHH(3e3,!1)}function Xe(){return typeof window<"u"&&typeof window.document<"u"}function vt(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function Tt(L){switch(L.length){case 0:return new C.ZN;case 1:return L[0];default:return new C.ZE(L)}}function ze(L,y,h,A,re=new Map,Se=new Map){const ht=[],yt=[];let Wt=-1,tn=null;if(A.forEach(En=>{const On=En.get("offset"),pi=On==Wt,fi=pi&&tn||new Map;En.forEach((Qn,ti)=>{let Gi=ti,$i=Qn;if("offset"!==ti)switch(Gi=y.normalizePropertyName(Gi,ht),$i){case C.k1:$i=re.get(ti);break;case C.l3:$i=Se.get(ti);break;default:$i=y.normalizeStyleValue(ti,Gi,$i,ht)}fi.set(Gi,$i)}),pi||yt.push(fi),tn=fi,Wt=On}),ht.length)throw function ae(L){return new r.vHH(3502,!1)}();return yt}function me(L,y,h,A){switch(y){case"start":L.onStart(()=>A(h&&w(h,"start",L)));break;case"done":L.onDone(()=>A(h&&w(h,"done",L)));break;case"destroy":L.onDestroy(()=>A(h&&w(h,"destroy",L)))}}function w(L,y,h){const Se=T(L.element,L.triggerName,L.fromState,L.toState,y||L.phaseName,h.totalTime??L.totalTime,!!h.disabled),ht=L._data;return null!=ht&&(Se._data=ht),Se}function T(L,y,h,A,re="",Se=0,ht){return{element:L,triggerName:y,fromState:h,toState:A,phaseName:re,totalTime:Se,disabled:!!ht}}function U(L,y,h){let A=L.get(y);return A||L.set(y,A=h),A}function Ae(L){const y=L.indexOf(":");return[L.substring(1,y),L.slice(y+1)]}let Me=(L,y)=>!1,xe=(L,y,h)=>[],Ne=null;function le(L){const y=L.parentNode||L.host;return y===Ne?null:y}(vt()||typeof Element<"u")&&(Xe()?(Ne=(()=>document.documentElement)(),Me=(L,y)=>{for(;y;){if(y===L)return!0;y=le(y)}return!1}):Me=(L,y)=>L.contains(y),xe=(L,y,h)=>{if(h)return Array.from(L.querySelectorAll(y));const A=L.querySelector(y);return A?[A]:[]});let Re=null,_t=!1;const Rn=Me,gn=xe;let pt=(()=>{class L{validateStyleProperty(h){return function ft(L){Re||(Re=function nn(){return typeof document<"u"?document.body:null}()||{},_t=!!Re.style&&"WebkitAppearance"in Re.style);let y=!0;return Re.style&&!function z(L){return"ebkit"==L.substring(1,6)}(L)&&(y=L in Re.style,!y&&_t&&(y="Webkit"+L.charAt(0).toUpperCase()+L.slice(1)in Re.style)),y}(h)}matchesElement(h,A){return!1}containsElement(h,A){return Rn(h,A)}getParentElement(h){return le(h)}query(h,A,re){return gn(h,A,re)}computeStyle(h,A,re){return re||""}animate(h,A,re,Se,ht,yt=[],Wt){return new C.ZN(re,Se)}}return L.\u0275fac=function(h){return new(h||L)},L.\u0275prov=r.Yz7({token:L,factory:L.\u0275fac}),L})(),ut=(()=>{class L{}return L.NOOP=new pt,L})();const Rt="ng-enter",jt="ng-leave",un="ng-trigger",Mn=".ng-trigger",zt="ng-animating",ln=".ng-animating";function Ze(L){if("number"==typeof L)return L;const y=L.match(/^(-?[\.\d]+)(m?s)/);return!y||y.length<2?0:Ct(parseFloat(y[1]),y[2])}function Ct(L,y){return"s"===y?1e3*L:L}function Ht(L,y,h){return L.hasOwnProperty("duration")?L:function rn(L,y,h){let re,Se=0,ht="";if("string"==typeof L){const yt=L.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===yt)return y.push(V()),{duration:0,delay:0,easing:""};re=Ct(parseFloat(yt[1]),yt[2]);const Wt=yt[3];null!=Wt&&(Se=Ct(parseFloat(Wt),yt[4]));const tn=yt[5];tn&&(ht=tn)}else re=L;if(!h){let yt=!1,Wt=y.length;re<0&&(y.push(function G(){return new r.vHH(3100,!1)}()),yt=!0),Se<0&&(y.push(function Y(){return new r.vHH(3101,!1)}()),yt=!0),yt&&y.splice(Wt,0,V())}return{duration:re,delay:Se,easing:ht}}(L,y,h)}function Nn(L,y={}){return Object.keys(L).forEach(h=>{y[h]=L[h]}),y}function Wn(L){const y=new Map;return Object.keys(L).forEach(h=>{y.set(h,L[h])}),y}function Ye(L,y=new Map,h){if(h)for(let[A,re]of h)y.set(A,re);for(let[A,re]of L)y.set(A,re);return y}function Pt(L,y,h){return h?y+":"+h+";":""}function Yt(L){let y="";for(let h=0;h{const Se=ve(re);h&&!h.has(re)&&h.set(re,L.style[Se]),L.style[Se]=A}),vt()&&Yt(L))}function Sn(L,y){L.style&&(y.forEach((h,A)=>{const re=ve(A);L.style[re]=""}),vt()&&Yt(L))}function Bn(L){return Array.isArray(L)?1==L.length?L[0]:(0,C.vP)(L):L}const Fi=new RegExp("{{\\s*(.+?)\\s*}}","g");function kn(L){let y=[];if("string"==typeof L){let h;for(;h=Fi.exec(L);)y.push(h[1]);Fi.lastIndex=0}return y}function Si(L,y,h){const A=L.toString(),re=A.replace(Fi,(Se,ht)=>{let yt=y[ht];return null==yt&&(h.push(function ne(L){return new r.vHH(3003,!1)}()),yt=""),yt.toString()});return re==A?L:re}function Ke(L){const y=[];let h=L.next();for(;!h.done;)y.push(h.value),h=L.next();return y}const we=/-+([a-z0-9])/g;function ve(L){return L.replace(we,(...y)=>y[1].toUpperCase())}function D(L){return L.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function et(L,y,h){switch(y.type){case 7:return L.visitTrigger(y,h);case 0:return L.visitState(y,h);case 1:return L.visitTransition(y,h);case 2:return L.visitSequence(y,h);case 3:return L.visitGroup(y,h);case 4:return L.visitAnimate(y,h);case 5:return L.visitKeyframes(y,h);case 6:return L.visitStyle(y,h);case 8:return L.visitReference(y,h);case 9:return L.visitAnimateChild(y,h);case 10:return L.visitAnimateRef(y,h);case 11:return L.visitQuery(y,h);case 12:return L.visitStagger(y,h);default:throw function fe(L){return new r.vHH(3004,!1)}()}}function Zt(L,y){return window.getComputedStyle(L)[y]}function oi(L,y){const h=[];return"string"==typeof L?L.split(/\s*,\s*/).forEach(A=>function mi(L,y,h){if(":"==L[0]){const Wt=function sr(L,y){switch(L){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(h,A)=>parseFloat(A)>parseFloat(h);case":decrement":return(h,A)=>parseFloat(A) *"}}(L,h);if("function"==typeof Wt)return void y.push(Wt);L=Wt}const A=L.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==A||A.length<4)return h.push(function Ft(L){return new r.vHH(3015,!1)}()),y;const re=A[1],Se=A[2],ht=A[3];y.push(or(re,ht));"<"==Se[0]&&!("*"==re&&"*"==ht)&&y.push(or(ht,re))}(A,h,y)):h.push(L),h}const wi=new Set(["true","1"]),Li=new Set(["false","0"]);function or(L,y){const h=wi.has(L)||Li.has(L),A=wi.has(y)||Li.has(y);return(re,Se)=>{let ht="*"==L||L==re,yt="*"==y||y==Se;return!ht&&h&&"boolean"==typeof re&&(ht=re?wi.has(L):Li.has(L)),!yt&&A&&"boolean"==typeof Se&&(yt=Se?wi.has(y):Li.has(y)),ht&&yt}}const br=new RegExp("s*:selfs*,?","g");function ir(L,y,h,A){return new Gr(L).build(y,h,A)}class Gr{constructor(y){this._driver=y}build(y,h,A){const re=new Qe(h);return this._resetContextStyleTimingState(re),et(this,Bn(y),re)}_resetContextStyleTimingState(y){y.currentQuerySelector="",y.collectedStyles=new Map,y.collectedStyles.set("",new Map),y.currentTime=0}visitTrigger(y,h){let A=h.queryCount=0,re=h.depCount=0;const Se=[],ht=[];return"@"==y.name.charAt(0)&&h.errors.push(function $(){return new r.vHH(3006,!1)}()),y.definitions.forEach(yt=>{if(this._resetContextStyleTimingState(h),0==yt.type){const Wt=yt,tn=Wt.name;tn.toString().split(/\s*,\s*/).forEach(En=>{Wt.name=En,Se.push(this.visitState(Wt,h))}),Wt.name=tn}else if(1==yt.type){const Wt=this.visitTransition(yt,h);A+=Wt.queryCount,re+=Wt.depCount,ht.push(Wt)}else h.errors.push(function N(){return new r.vHH(3007,!1)}())}),{type:7,name:y.name,states:Se,transitions:ht,queryCount:A,depCount:re,options:null}}visitState(y,h){const A=this.visitStyle(y.styles,h),re=y.options&&y.options.params||null;if(A.containsDynamicStyles){const Se=new Set,ht=re||{};A.styles.forEach(yt=>{yt instanceof Map&&yt.forEach(Wt=>{kn(Wt).forEach(tn=>{ht.hasOwnProperty(tn)||Se.add(tn)})})}),Se.size&&(Ke(Se.values()),h.errors.push(function ee(L,y){return new r.vHH(3008,!1)}()))}return{type:0,name:y.name,style:A,options:re?{params:re}:null}}visitTransition(y,h){h.queryCount=0,h.depCount=0;const A=et(this,Bn(y.animation),h);return{type:1,matchers:oi(y.expr,h.errors),animation:A,queryCount:h.queryCount,depCount:h.depCount,options:$t(y.options)}}visitSequence(y,h){return{type:2,steps:y.steps.map(A=>et(this,A,h)),options:$t(y.options)}}visitGroup(y,h){const A=h.currentTime;let re=0;const Se=y.steps.map(ht=>{h.currentTime=A;const yt=et(this,ht,h);return re=Math.max(re,h.currentTime),yt});return h.currentTime=re,{type:3,steps:Se,options:$t(y.options)}}visitAnimate(y,h){const A=function It(L,y){if(L.hasOwnProperty("duration"))return L;if("number"==typeof L)return dn(Ht(L,y).duration,0,"");const h=L;if(h.split(/\s+/).some(Se=>"{"==Se.charAt(0)&&"{"==Se.charAt(1))){const Se=dn(0,0,"");return Se.dynamic=!0,Se.strValue=h,Se}const re=Ht(h,y);return dn(re.duration,re.delay,re.easing)}(y.timings,h.errors);h.currentAnimateTimings=A;let re,Se=y.styles?y.styles:(0,C.oB)({});if(5==Se.type)re=this.visitKeyframes(Se,h);else{let ht=y.styles,yt=!1;if(!ht){yt=!0;const tn={};A.easing&&(tn.easing=A.easing),ht=(0,C.oB)(tn)}h.currentTime+=A.duration+A.delay;const Wt=this.visitStyle(ht,h);Wt.isEmptyStep=yt,re=Wt}return h.currentAnimateTimings=null,{type:4,timings:A,style:re,options:null}}visitStyle(y,h){const A=this._makeStyleAst(y,h);return this._validateStyleAst(A,h),A}_makeStyleAst(y,h){const A=[],re=Array.isArray(y.styles)?y.styles:[y.styles];for(let yt of re)"string"==typeof yt?yt===C.l3?A.push(yt):h.errors.push(new r.vHH(3002,!1)):A.push(Wn(yt));let Se=!1,ht=null;return A.forEach(yt=>{if(yt instanceof Map&&(yt.has("easing")&&(ht=yt.get("easing"),yt.delete("easing")),!Se))for(let Wt of yt.values())if(Wt.toString().indexOf("{{")>=0){Se=!0;break}}),{type:6,styles:A,easing:ht,offset:y.offset,containsDynamicStyles:Se,options:null}}_validateStyleAst(y,h){const A=h.currentAnimateTimings;let re=h.currentTime,Se=h.currentTime;A&&Se>0&&(Se-=A.duration+A.delay),y.styles.forEach(ht=>{"string"!=typeof ht&&ht.forEach((yt,Wt)=>{const tn=h.collectedStyles.get(h.currentQuerySelector),En=tn.get(Wt);let On=!0;En&&(Se!=re&&Se>=En.startTime&&re<=En.endTime&&(h.errors.push(function Oe(L,y,h,A,re){return new r.vHH(3010,!1)}()),On=!1),Se=En.startTime),On&&tn.set(Wt,{startTime:Se,endTime:re}),h.options&&function vi(L,y,h){const A=y.params||{},re=kn(L);re.length&&re.forEach(Se=>{A.hasOwnProperty(Se)||h.push(function H(L){return new r.vHH(3001,!1)}())})}(yt,h.options,h.errors)})})}visitKeyframes(y,h){const A={type:5,styles:[],options:null};if(!h.currentAnimateTimings)return h.errors.push(function oe(){return new r.vHH(3011,!1)}()),A;let Se=0;const ht=[];let yt=!1,Wt=!1,tn=0;const En=y.steps.map($i=>{const Or=this._makeStyleAst($i,h);let ds=null!=Or.offset?Or.offset:function it(L){if("string"==typeof L)return null;let y=null;if(Array.isArray(L))L.forEach(h=>{if(h instanceof Map&&h.has("offset")){const A=h;y=parseFloat(A.get("offset")),A.delete("offset")}});else if(L instanceof Map&&L.has("offset")){const h=L;y=parseFloat(h.get("offset")),h.delete("offset")}return y}(Or.styles),zr=0;return null!=ds&&(Se++,zr=Or.offset=ds),Wt=Wt||zr<0||zr>1,yt=yt||zr0&&Se{const ds=pi>0?Or==fi?1:pi*Or:ht[Or],zr=ds*Gi;h.currentTime=Qn+ti.delay+zr,ti.duration=zr,this._validateStyleAst($i,h),$i.offset=ds,A.styles.push($i)}),A}visitReference(y,h){return{type:8,animation:et(this,Bn(y.animation),h),options:$t(y.options)}}visitAnimateChild(y,h){return h.depCount++,{type:9,options:$t(y.options)}}visitAnimateRef(y,h){return{type:10,animation:this.visitReference(y.animation,h),options:$t(y.options)}}visitQuery(y,h){const A=h.currentQuerySelector,re=y.options||{};h.queryCount++,h.currentQuery=y;const[Se,ht]=function Pr(L){const y=!!L.split(/\s*,\s*/).find(h=>":self"==h);return y&&(L=L.replace(br,"")),L=L.replace(/@\*/g,Mn).replace(/@\w+/g,h=>Mn+"-"+h.slice(1)).replace(/:animating/g,ln),[L,y]}(y.selector);h.currentQuerySelector=A.length?A+" "+Se:Se,U(h.collectedStyles,h.currentQuerySelector,new Map);const yt=et(this,Bn(y.animation),h);return h.currentQuery=null,h.currentQuerySelector=A,{type:11,selector:Se,limit:re.limit||0,optional:!!re.optional,includeSelf:ht,animation:yt,originalSelector:y.selector,options:$t(y.options)}}visitStagger(y,h){h.currentQuery||h.errors.push(function Ve(){return new r.vHH(3013,!1)}());const A="full"===y.timings?{duration:0,delay:0,easing:"full"}:Ht(y.timings,h.errors,!0);return{type:12,animation:et(this,Bn(y.animation),h),timings:A,options:null}}}class Qe{constructor(y){this.errors=y,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function $t(L){return L?(L=Nn(L)).params&&(L.params=function $r(L){return L?Nn(L):null}(L.params)):L={},L}function dn(L,y,h){return{duration:L,delay:y,easing:h}}function Cn(L,y,h,A,re,Se,ht=null,yt=!1){return{type:1,element:L,keyframes:y,preStyleProps:h,postStyleProps:A,duration:re,delay:Se,totalTime:re+Se,easing:ht,subTimeline:yt}}class Kn{constructor(){this._map=new Map}get(y){return this._map.get(y)||[]}append(y,h){let A=this._map.get(y);A||this._map.set(y,A=[]),A.push(...h)}has(y){return this._map.has(y)}clear(){this._map.clear()}}const Oi=new RegExp(":enter","g"),Rs=new RegExp(":leave","g");function Es(L,y,h,A,re,Se=new Map,ht=new Map,yt,Wt,tn=[]){return(new Cr).buildKeyframes(L,y,h,A,re,Se,ht,yt,Wt,tn)}class Cr{buildKeyframes(y,h,A,re,Se,ht,yt,Wt,tn,En=[]){tn=tn||new Kn;const On=new Dr(y,h,tn,re,Se,En,[]);On.options=Wt;const pi=Wt.delay?Ze(Wt.delay):0;On.currentTimeline.delayNextStep(pi),On.currentTimeline.setStyles([ht],null,On.errors,Wt),et(this,A,On);const fi=On.timelines.filter(Qn=>Qn.containsAnimation());if(fi.length&&yt.size){let Qn;for(let ti=fi.length-1;ti>=0;ti--){const Gi=fi[ti];if(Gi.element===h){Qn=Gi;break}}Qn&&!Qn.allowOnlyTimelineStyles()&&Qn.setStyles([yt],null,On.errors,Wt)}return fi.length?fi.map(Qn=>Qn.buildKeyframes()):[Cn(h,[],[],[],0,pi,"",!1)]}visitTrigger(y,h){}visitState(y,h){}visitTransition(y,h){}visitAnimateChild(y,h){const A=h.subInstructions.get(h.element);if(A){const re=h.createSubContext(y.options),Se=h.currentTimeline.currentTime,ht=this._visitSubInstructions(A,re,re.options);Se!=ht&&h.transformIntoNewTimeline(ht)}h.previousNode=y}visitAnimateRef(y,h){const A=h.createSubContext(y.options);A.transformIntoNewTimeline(),this._applyAnimationRefDelays([y.options,y.animation.options],h,A),this.visitReference(y.animation,A),h.transformIntoNewTimeline(A.currentTimeline.currentTime),h.previousNode=y}_applyAnimationRefDelays(y,h,A){for(const re of y){const Se=re?.delay;if(Se){const ht="number"==typeof Se?Se:Ze(Si(Se,re?.params??{},h.errors));A.delayNextStep(ht)}}}_visitSubInstructions(y,h,A){let Se=h.currentTimeline.currentTime;const ht=null!=A.duration?Ze(A.duration):null,yt=null!=A.delay?Ze(A.delay):null;return 0!==ht&&y.forEach(Wt=>{const tn=h.appendInstructionToTimeline(Wt,ht,yt);Se=Math.max(Se,tn.duration+tn.delay)}),Se}visitReference(y,h){h.updateOptions(y.options,!0),et(this,y.animation,h),h.previousNode=y}visitSequence(y,h){const A=h.subContextCount;let re=h;const Se=y.options;if(Se&&(Se.params||Se.delay)&&(re=h.createSubContext(Se),re.transformIntoNewTimeline(),null!=Se.delay)){6==re.previousNode.type&&(re.currentTimeline.snapshotCurrentStyles(),re.previousNode=Yr);const ht=Ze(Se.delay);re.delayNextStep(ht)}y.steps.length&&(y.steps.forEach(ht=>et(this,ht,re)),re.currentTimeline.applyStylesToKeyframe(),re.subContextCount>A&&re.transformIntoNewTimeline()),h.previousNode=y}visitGroup(y,h){const A=[];let re=h.currentTimeline.currentTime;const Se=y.options&&y.options.delay?Ze(y.options.delay):0;y.steps.forEach(ht=>{const yt=h.createSubContext(y.options);Se&&yt.delayNextStep(Se),et(this,ht,yt),re=Math.max(re,yt.currentTimeline.currentTime),A.push(yt.currentTimeline)}),A.forEach(ht=>h.currentTimeline.mergeTimelineCollectedStyles(ht)),h.transformIntoNewTimeline(re),h.previousNode=y}_visitTiming(y,h){if(y.dynamic){const A=y.strValue;return Ht(h.params?Si(A,h.params,h.errors):A,h.errors)}return{duration:y.duration,delay:y.delay,easing:y.easing}}visitAnimate(y,h){const A=h.currentAnimateTimings=this._visitTiming(y.timings,h),re=h.currentTimeline;A.delay&&(h.incrementTime(A.delay),re.snapshotCurrentStyles());const Se=y.style;5==Se.type?this.visitKeyframes(Se,h):(h.incrementTime(A.duration),this.visitStyle(Se,h),re.applyStylesToKeyframe()),h.currentAnimateTimings=null,h.previousNode=y}visitStyle(y,h){const A=h.currentTimeline,re=h.currentAnimateTimings;!re&&A.hasCurrentStyleProperties()&&A.forwardFrame();const Se=re&&re.easing||y.easing;y.isEmptyStep?A.applyEmptyStep(Se):A.setStyles(y.styles,Se,h.errors,h.options),h.previousNode=y}visitKeyframes(y,h){const A=h.currentAnimateTimings,re=h.currentTimeline.duration,Se=A.duration,yt=h.createSubContext().currentTimeline;yt.easing=A.easing,y.styles.forEach(Wt=>{yt.forwardTime((Wt.offset||0)*Se),yt.setStyles(Wt.styles,Wt.easing,h.errors,h.options),yt.applyStylesToKeyframe()}),h.currentTimeline.mergeTimelineCollectedStyles(yt),h.transformIntoNewTimeline(re+Se),h.previousNode=y}visitQuery(y,h){const A=h.currentTimeline.currentTime,re=y.options||{},Se=re.delay?Ze(re.delay):0;Se&&(6===h.previousNode.type||0==A&&h.currentTimeline.hasCurrentStyleProperties())&&(h.currentTimeline.snapshotCurrentStyles(),h.previousNode=Yr);let ht=A;const yt=h.invokeQuery(y.selector,y.originalSelector,y.limit,y.includeSelf,!!re.optional,h.errors);h.currentQueryTotal=yt.length;let Wt=null;yt.forEach((tn,En)=>{h.currentQueryIndex=En;const On=h.createSubContext(y.options,tn);Se&&On.delayNextStep(Se),tn===h.element&&(Wt=On.currentTimeline),et(this,y.animation,On),On.currentTimeline.applyStylesToKeyframe(),ht=Math.max(ht,On.currentTimeline.currentTime)}),h.currentQueryIndex=0,h.currentQueryTotal=0,h.transformIntoNewTimeline(ht),Wt&&(h.currentTimeline.mergeTimelineCollectedStyles(Wt),h.currentTimeline.snapshotCurrentStyles()),h.previousNode=y}visitStagger(y,h){const A=h.parentContext,re=h.currentTimeline,Se=y.timings,ht=Math.abs(Se.duration),yt=ht*(h.currentQueryTotal-1);let Wt=ht*h.currentQueryIndex;switch(Se.duration<0?"reverse":Se.easing){case"reverse":Wt=yt-Wt;break;case"full":Wt=A.currentStaggerTime}const En=h.currentTimeline;Wt&&En.delayNextStep(Wt);const On=En.currentTime;et(this,y.animation,h),h.previousNode=y,A.currentStaggerTime=re.currentTime-On+(re.startTime-A.currentTimeline.startTime)}}const Yr={};class Dr{constructor(y,h,A,re,Se,ht,yt,Wt){this._driver=y,this.element=h,this.subInstructions=A,this._enterClassName=re,this._leaveClassName=Se,this.errors=ht,this.timelines=yt,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Yr,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=Wt||new Kr(this._driver,h,0),yt.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(y,h){if(!y)return;const A=y;let re=this.options;null!=A.duration&&(re.duration=Ze(A.duration)),null!=A.delay&&(re.delay=Ze(A.delay));const Se=A.params;if(Se){let ht=re.params;ht||(ht=this.options.params={}),Object.keys(Se).forEach(yt=>{(!h||!ht.hasOwnProperty(yt))&&(ht[yt]=Si(Se[yt],ht,this.errors))})}}_copyOptions(){const y={};if(this.options){const h=this.options.params;if(h){const A=y.params={};Object.keys(h).forEach(re=>{A[re]=h[re]})}}return y}createSubContext(y=null,h,A){const re=h||this.element,Se=new Dr(this._driver,re,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(re,A||0));return Se.previousNode=this.previousNode,Se.currentAnimateTimings=this.currentAnimateTimings,Se.options=this._copyOptions(),Se.updateOptions(y),Se.currentQueryIndex=this.currentQueryIndex,Se.currentQueryTotal=this.currentQueryTotal,Se.parentContext=this,this.subContextCount++,Se}transformIntoNewTimeline(y){return this.previousNode=Yr,this.currentTimeline=this.currentTimeline.fork(this.element,y),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(y,h,A){const re={duration:h??y.duration,delay:this.currentTimeline.currentTime+(A??0)+y.delay,easing:""},Se=new hs(this._driver,y.element,y.keyframes,y.preStyleProps,y.postStyleProps,re,y.stretchStartingKeyframe);return this.timelines.push(Se),re}incrementTime(y){this.currentTimeline.forwardTime(this.currentTimeline.duration+y)}delayNextStep(y){y>0&&this.currentTimeline.delayNextStep(y)}invokeQuery(y,h,A,re,Se,ht){let yt=[];if(re&&yt.push(this.element),y.length>0){y=(y=y.replace(Oi,"."+this._enterClassName)).replace(Rs,"."+this._leaveClassName);let tn=this._driver.query(this.element,y,1!=A);0!==A&&(tn=A<0?tn.slice(tn.length+A,tn.length):tn.slice(0,A)),yt.push(...tn)}return!Se&&0==yt.length&&ht.push(function qe(L){return new r.vHH(3014,!1)}()),yt}}class Kr{constructor(y,h,A,re){this._driver=y,this.element=h,this.startTime=A,this._elementTimelineStylesLookup=re,this.duration=0,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(h),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(h,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(y){const h=1===this._keyframes.size&&this._pendingStyles.size;this.duration||h?(this.forwardTime(this.currentTime+y),h&&this.snapshotCurrentStyles()):this.startTime+=y}fork(y,h){return this.applyStylesToKeyframe(),new Kr(this._driver,y,h||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(y){this.applyStylesToKeyframe(),this.duration=y,this._loadKeyframe()}_updateStyle(y,h){this._localTimelineStyles.set(y,h),this._globalTimelineStyles.set(y,h),this._styleSummary.set(y,{time:this.currentTime,value:h})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(y){y&&this._previousKeyframe.set("easing",y);for(let[h,A]of this._globalTimelineStyles)this._backFill.set(h,A||C.l3),this._currentKeyframe.set(h,C.l3);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(y,h,A,re){h&&this._previousKeyframe.set("easing",h);const Se=re&&re.params||{},ht=function Er(L,y){const h=new Map;let A;return L.forEach(re=>{if("*"===re){A=A||y.keys();for(let Se of A)h.set(Se,C.l3)}else Ye(re,h)}),h}(y,this._globalTimelineStyles);for(let[yt,Wt]of ht){const tn=Si(Wt,Se,A);this._pendingStyles.set(yt,tn),this._localTimelineStyles.has(yt)||this._backFill.set(yt,this._globalTimelineStyles.get(yt)??C.l3),this._updateStyle(yt,tn)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((y,h)=>{this._currentKeyframe.set(h,y)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((y,h)=>{this._currentKeyframe.has(h)||this._currentKeyframe.set(h,y)}))}snapshotCurrentStyles(){for(let[y,h]of this._localTimelineStyles)this._pendingStyles.set(y,h),this._updateStyle(y,h)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const y=[];for(let h in this._currentKeyframe)y.push(h);return y}mergeTimelineCollectedStyles(y){y._styleSummary.forEach((h,A)=>{const re=this._styleSummary.get(A);(!re||h.time>re.time)&&this._updateStyle(A,h.value)})}buildKeyframes(){this.applyStylesToKeyframe();const y=new Set,h=new Set,A=1===this._keyframes.size&&0===this.duration;let re=[];this._keyframes.forEach((yt,Wt)=>{const tn=Ye(yt,new Map,this._backFill);tn.forEach((En,On)=>{En===C.k1?y.add(On):En===C.l3&&h.add(On)}),A||tn.set("offset",Wt/this.duration),re.push(tn)});const Se=y.size?Ke(y.values()):[],ht=h.size?Ke(h.values()):[];if(A){const yt=re[0],Wt=new Map(yt);yt.set("offset",0),Wt.set("offset",1),re=[yt,Wt]}return Cn(this.element,re,Se,ht,this.duration,this.startTime,this.easing,!1)}}class hs extends Kr{constructor(y,h,A,re,Se,ht,yt=!1){super(y,h,ht.delay),this.keyframes=A,this.preStyleProps=re,this.postStyleProps=Se,this._stretchStartingKeyframe=yt,this.timings={duration:ht.duration,delay:ht.delay,easing:ht.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let y=this.keyframes,{delay:h,duration:A,easing:re}=this.timings;if(this._stretchStartingKeyframe&&h){const Se=[],ht=A+h,yt=h/ht,Wt=Ye(y[0]);Wt.set("offset",0),Se.push(Wt);const tn=Ye(y[0]);tn.set("offset",is(yt)),Se.push(tn);const En=y.length-1;for(let On=1;On<=En;On++){let pi=Ye(y[On]);const fi=pi.get("offset");pi.set("offset",is((h+fi*A)/ht)),Se.push(pi)}A=ht,h=0,re="",y=Se}return Cn(this.element,y,this.preStyleProps,this.postStyleProps,A,h,re,!0)}}function is(L,y=3){const h=Math.pow(10,y-1);return Math.round(L*h)/h}class _r{}const mr=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class fs extends _r{normalizePropertyName(y,h){return ve(y)}normalizeStyleValue(y,h,A,re){let Se="";const ht=A.toString().trim();if(mr.has(h)&&0!==A&&"0"!==A)if("number"==typeof A)Se="px";else{const yt=A.match(/^[+-]?[\d\.]+([a-z]*)$/);yt&&0==yt[1].length&&re.push(function j(L,y){return new r.vHH(3005,!1)}())}return ht+Se}}function ps(L,y,h,A,re,Se,ht,yt,Wt,tn,En,On,pi){return{type:0,element:L,triggerName:y,isRemovalTransition:re,fromState:h,fromStyles:Se,toState:A,toStyles:ht,timelines:yt,queriedElements:Wt,preStyleProps:tn,postStyleProps:En,totalTime:On,errors:pi}}const Br={};class Qr{constructor(y,h,A){this._triggerName=y,this.ast=h,this._stateStyles=A}match(y,h,A,re){return function Ms(L,y,h,A,re){return L.some(Se=>Se(y,h,A,re))}(this.ast.matchers,y,h,A,re)}buildStyles(y,h,A){let re=this._stateStyles.get("*");return void 0!==y&&(re=this._stateStyles.get(y?.toString())||re),re?re.buildStyles(h,A):new Map}build(y,h,A,re,Se,ht,yt,Wt,tn,En){const On=[],pi=this.ast.options&&this.ast.options.params||Br,Qn=this.buildStyles(A,yt&&yt.params||Br,On),ti=Wt&&Wt.params||Br,Gi=this.buildStyles(re,ti,On),$i=new Set,Or=new Map,ds=new Map,zr="void"===re,_o={params:Ji(ti,pi),delay:this.ast.options?.delay},co=En?[]:Es(y,h,this.ast.animation,Se,ht,Qn,Gi,_o,tn,On);let bs=0;if(co.forEach(vo=>{bs=Math.max(vo.duration+vo.delay,bs)}),On.length)return ps(h,this._triggerName,A,re,zr,Qn,Gi,[],[],Or,ds,bs,On);co.forEach(vo=>{const yo=vo.element,Nc=U(Or,yo,new Set);vo.preStyleProps.forEach($o=>Nc.add($o));const Ea=U(ds,yo,new Set);vo.postStyleProps.forEach($o=>Ea.add($o)),yo!==h&&$i.add(yo)});const Ys=Ke($i.values());return ps(h,this._triggerName,A,re,zr,Qn,Gi,co,Ys,Or,ds,bs)}}function Ji(L,y){const h=Nn(y);for(const A in L)L.hasOwnProperty(A)&&null!=L[A]&&(h[A]=L[A]);return h}class xs{constructor(y,h,A){this.styles=y,this.defaultParams=h,this.normalizer=A}buildStyles(y,h){const A=new Map,re=Nn(this.defaultParams);return Object.keys(y).forEach(Se=>{const ht=y[Se];null!==ht&&(re[Se]=ht)}),this.styles.styles.forEach(Se=>{"string"!=typeof Se&&Se.forEach((ht,yt)=>{ht&&(ht=Si(ht,re,h));const Wt=this.normalizer.normalizePropertyName(yt,h);ht=this.normalizer.normalizeStyleValue(yt,Wt,ht,h),A.set(Wt,ht)})}),A}}class Ur{constructor(y,h,A){this.name=y,this.ast=h,this._normalizer=A,this.transitionFactories=[],this.states=new Map,h.states.forEach(re=>{this.states.set(re.name,new xs(re.style,re.options&&re.options.params||{},A))}),Zs(this.states,"true","1"),Zs(this.states,"false","0"),h.transitions.forEach(re=>{this.transitionFactories.push(new Qr(y,re,this.states))}),this.fallbackTransition=function kr(L,y,h){return new Qr(L,{type:1,animation:{type:2,steps:[],options:null},matchers:[(ht,yt)=>!0],options:null,queryCount:0,depCount:0},y)}(y,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(y,h,A,re){return this.transitionFactories.find(ht=>ht.match(y,h,A,re))||null}matchStyles(y,h,A){return this.fallbackTransition.buildStyles(y,h,A)}}function Zs(L,y,h){L.has(y)?L.has(h)||L.set(h,L.get(y)):L.has(h)&&L.set(y,L.get(h))}const zi=new Kn;class Ps{constructor(y,h,A){this.bodyNode=y,this._driver=h,this._normalizer=A,this._animations=new Map,this._playersById=new Map,this.players=[]}register(y,h){const A=[],Se=ir(this._driver,h,A,[]);if(A.length)throw function be(L){return new r.vHH(3503,!1)}();this._animations.set(y,Se)}_buildPlayer(y,h,A){const re=y.element,Se=ze(0,this._normalizer,0,y.keyframes,h,A);return this._driver.animate(re,Se,y.duration,y.delay,y.easing,[],!0)}create(y,h,A={}){const re=[],Se=this._animations.get(y);let ht;const yt=new Map;if(Se?(ht=Es(this._driver,h,Se,Rt,jt,new Map,new Map,A,zi,re),ht.forEach(En=>{const On=U(yt,En.element,new Map);En.postStyleProps.forEach(pi=>On.set(pi,null))})):(re.push(function he(){return new r.vHH(3300,!1)}()),ht=[]),re.length)throw function Be(L){return new r.vHH(3504,!1)}();yt.forEach((En,On)=>{En.forEach((pi,fi)=>{En.set(fi,this._driver.computeStyle(On,fi,C.l3))})});const tn=Tt(ht.map(En=>{const On=yt.get(En.element);return this._buildPlayer(En,new Map,On)}));return this._playersById.set(y,tn),tn.onDestroy(()=>this.destroy(y)),this.players.push(tn),tn}destroy(y){const h=this._getPlayer(y);h.destroy(),this._playersById.delete(y);const A=this.players.indexOf(h);A>=0&&this.players.splice(A,1)}_getPlayer(y){const h=this._playersById.get(y);if(!h)throw function Ce(L){return new r.vHH(3301,!1)}();return h}listen(y,h,A,re){const Se=T(h,"","","");return me(this._getPlayer(y),A,Se,re),()=>{}}command(y,h,A,re){if("register"==A)return void this.register(y,re[0]);if("create"==A)return void this.create(y,h,re[0]||{});const Se=this._getPlayer(y);switch(A){case"play":Se.play();break;case"pause":Se.pause();break;case"reset":Se.reset();break;case"restart":Se.restart();break;case"finish":Se.finish();break;case"init":Se.init();break;case"setPosition":Se.setPosition(parseFloat(re[0]));break;case"destroy":this.destroy(y)}}}const os="ng-animate-queued",ar="ng-animate-disabled",lr=[],Qs={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},ls={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},qi="__ng_removed";class Bi{constructor(y,h=""){this.namespaceId=h;const A=y&&y.hasOwnProperty("value");if(this.value=function Hr(L){return L??null}(A?y.value:y),A){const Se=Nn(y);delete Se.value,this.options=Se}else this.options={};this.options.params||(this.options.params={})}get params(){return this.options.params}absorbOptions(y){const h=y.params;if(h){const A=this.options.params;Object.keys(h).forEach(re=>{null==A[re]&&(A[re]=h[re])})}}}const Tr="void",Zn=new Bi(Tr);class Hn{constructor(y,h,A){this.id=y,this.hostElement=h,this._engine=A,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+y,Gn(h,this._hostClassName)}listen(y,h,A,re){if(!this._triggers.has(h))throw function nt(L,y){return new r.vHH(3302,!1)}();if(null==A||0==A.length)throw function ke(L){return new r.vHH(3303,!1)}();if(!function Lr(L){return"start"==L||"done"==L}(A))throw function wt(L,y){return new r.vHH(3400,!1)}();const Se=U(this._elementListeners,y,[]),ht={name:h,phase:A,callback:re};Se.push(ht);const yt=U(this._engine.statesByElement,y,new Map);return yt.has(h)||(Gn(y,un),Gn(y,un+"-"+h),yt.set(h,Zn)),()=>{this._engine.afterFlush(()=>{const Wt=Se.indexOf(ht);Wt>=0&&Se.splice(Wt,1),this._triggers.has(h)||yt.delete(h)})}}register(y,h){return!this._triggers.has(y)&&(this._triggers.set(y,h),!0)}_getTrigger(y){const h=this._triggers.get(y);if(!h)throw function ge(L){return new r.vHH(3401,!1)}();return h}trigger(y,h,A,re=!0){const Se=this._getTrigger(h),ht=new gs(this.id,h,y);let yt=this._engine.statesByElement.get(y);yt||(Gn(y,un),Gn(y,un+"-"+h),this._engine.statesByElement.set(y,yt=new Map));let Wt=yt.get(h);const tn=new Bi(A,this.id);if(!(A&&A.hasOwnProperty("value"))&&Wt&&tn.absorbOptions(Wt.options),yt.set(h,tn),Wt||(Wt=Zn),tn.value!==Tr&&Wt.value===tn.value){if(!function ce(L,y){const h=Object.keys(L),A=Object.keys(y);if(h.length!=A.length)return!1;for(let re=0;re{Sn(y,Gi),fn(y,$i)})}return}const pi=U(this._engine.playersByElement,y,[]);pi.forEach(ti=>{ti.namespaceId==this.id&&ti.triggerName==h&&ti.queued&&ti.destroy()});let fi=Se.matchTransition(Wt.value,tn.value,y,tn.params),Qn=!1;if(!fi){if(!re)return;fi=Se.fallbackTransition,Qn=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:y,triggerName:h,transition:fi,fromState:Wt,toState:tn,player:ht,isFallbackTransition:Qn}),Qn||(Gn(y,os),ht.onStart(()=>{vr(y,os)})),ht.onDone(()=>{let ti=this.players.indexOf(ht);ti>=0&&this.players.splice(ti,1);const Gi=this._engine.playersByElement.get(y);if(Gi){let $i=Gi.indexOf(ht);$i>=0&&Gi.splice($i,1)}}),this.players.push(ht),pi.push(ht),ht}deregister(y){this._triggers.delete(y),this._engine.statesByElement.forEach(h=>h.delete(y)),this._elementListeners.forEach((h,A)=>{this._elementListeners.set(A,h.filter(re=>re.name!=y))})}clearElementCache(y){this._engine.statesByElement.delete(y),this._elementListeners.delete(y);const h=this._engine.playersByElement.get(y);h&&(h.forEach(A=>A.destroy()),this._engine.playersByElement.delete(y))}_signalRemovalForInnerTriggers(y,h){const A=this._engine.driver.query(y,Mn,!0);A.forEach(re=>{if(re[qi])return;const Se=this._engine.fetchNamespacesByElement(re);Se.size?Se.forEach(ht=>ht.triggerLeaveAnimation(re,h,!1,!0)):this.clearElementCache(re)}),this._engine.afterFlushAnimationsDone(()=>A.forEach(re=>this.clearElementCache(re)))}triggerLeaveAnimation(y,h,A,re){const Se=this._engine.statesByElement.get(y),ht=new Map;if(Se){const yt=[];if(Se.forEach((Wt,tn)=>{if(ht.set(tn,Wt.value),this._triggers.has(tn)){const En=this.trigger(y,tn,Tr,re);En&&yt.push(En)}}),yt.length)return this._engine.markElementAsRemoved(this.id,y,!0,h,ht),A&&Tt(yt).onDone(()=>this._engine.processLeaveNode(y)),!0}return!1}prepareLeaveAnimationListeners(y){const h=this._elementListeners.get(y),A=this._engine.statesByElement.get(y);if(h&&A){const re=new Set;h.forEach(Se=>{const ht=Se.name;if(re.has(ht))return;re.add(ht);const Wt=this._triggers.get(ht).fallbackTransition,tn=A.get(ht)||Zn,En=new Bi(Tr),On=new gs(this.id,ht,y);this._engine.totalQueuedPlayers++,this._queue.push({element:y,triggerName:ht,transition:Wt,fromState:tn,toState:En,player:On,isFallbackTransition:!0})})}}removeNode(y,h){const A=this._engine;if(y.childElementCount&&this._signalRemovalForInnerTriggers(y,h),this.triggerLeaveAnimation(y,h,!0))return;let re=!1;if(A.totalAnimations){const Se=A.players.length?A.playersByQueriedElement.get(y):[];if(Se&&Se.length)re=!0;else{let ht=y;for(;ht=ht.parentNode;)if(A.statesByElement.get(ht)){re=!0;break}}}if(this.prepareLeaveAnimationListeners(y),re)A.markElementAsRemoved(this.id,y,!1,h);else{const Se=y[qi];(!Se||Se===Qs)&&(A.afterFlush(()=>this.clearElementCache(y)),A.destroyInnerAnimations(y),A._onRemovalComplete(y,h))}}insertNode(y,h){Gn(y,this._hostClassName)}drainQueuedTransitions(y){const h=[];return this._queue.forEach(A=>{const re=A.player;if(re.destroyed)return;const Se=A.element,ht=this._elementListeners.get(Se);ht&&ht.forEach(yt=>{if(yt.name==A.triggerName){const Wt=T(Se,A.triggerName,A.fromState.value,A.toState.value);Wt._data=y,me(A.player,yt.phase,Wt,yt.callback)}}),re.markedForDestroy?this._engine.afterFlush(()=>{re.destroy()}):h.push(A)}),this._queue=[],h.sort((A,re)=>{const Se=A.transition.ast.depCount,ht=re.transition.ast.depCount;return 0==Se||0==ht?Se-ht:this._engine.driver.containsElement(A.element,re.element)?1:-1})}destroy(y){this.players.forEach(h=>h.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,y)}elementContainsData(y){let h=!1;return this._elementListeners.has(y)&&(h=!0),h=!!this._queue.find(A=>A.element===y)||h,h}}class Us{constructor(y,h,A){this.bodyNode=y,this.driver=h,this._normalizer=A,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(re,Se)=>{}}_onRemovalComplete(y,h){this.onRemovalComplete(y,h)}get queuedPlayers(){const y=[];return this._namespaceList.forEach(h=>{h.players.forEach(A=>{A.queued&&y.push(A)})}),y}createNamespace(y,h){const A=new Hn(y,h,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,h)?this._balanceNamespaceList(A,h):(this.newHostElements.set(h,A),this.collectEnterElement(h)),this._namespaceLookup[y]=A}_balanceNamespaceList(y,h){const A=this._namespaceList,re=this.namespacesByHostElement;if(A.length-1>=0){let ht=!1,yt=this.driver.getParentElement(h);for(;yt;){const Wt=re.get(yt);if(Wt){const tn=A.indexOf(Wt);A.splice(tn+1,0,y),ht=!0;break}yt=this.driver.getParentElement(yt)}ht||A.unshift(y)}else A.push(y);return re.set(h,y),y}register(y,h){let A=this._namespaceLookup[y];return A||(A=this.createNamespace(y,h)),A}registerTrigger(y,h,A){let re=this._namespaceLookup[y];re&&re.register(h,A)&&this.totalAnimations++}destroy(y,h){if(!y)return;const A=this._fetchNamespace(y);this.afterFlush(()=>{this.namespacesByHostElement.delete(A.hostElement),delete this._namespaceLookup[y];const re=this._namespaceList.indexOf(A);re>=0&&this._namespaceList.splice(re,1)}),this.afterFlushAnimationsDone(()=>A.destroy(h))}_fetchNamespace(y){return this._namespaceLookup[y]}fetchNamespacesByElement(y){const h=new Set,A=this.statesByElement.get(y);if(A)for(let re of A.values())if(re.namespaceId){const Se=this._fetchNamespace(re.namespaceId);Se&&h.add(Se)}return h}trigger(y,h,A,re){if(Jr(h)){const Se=this._fetchNamespace(y);if(Se)return Se.trigger(h,A,re),!0}return!1}insertNode(y,h,A,re){if(!Jr(h))return;const Se=h[qi];if(Se&&Se.setForRemoval){Se.setForRemoval=!1,Se.setForMove=!0;const ht=this.collectedLeaveElements.indexOf(h);ht>=0&&this.collectedLeaveElements.splice(ht,1)}if(y){const ht=this._fetchNamespace(y);ht&&ht.insertNode(h,A)}re&&this.collectEnterElement(h)}collectEnterElement(y){this.collectedEnterElements.push(y)}markElementAsDisabled(y,h){h?this.disabledNodes.has(y)||(this.disabledNodes.add(y),Gn(y,ar)):this.disabledNodes.has(y)&&(this.disabledNodes.delete(y),vr(y,ar))}removeNode(y,h,A,re){if(Jr(h)){const Se=y?this._fetchNamespace(y):null;if(Se?Se.removeNode(h,re):this.markElementAsRemoved(y,h,!1,re),A){const ht=this.namespacesByHostElement.get(h);ht&&ht.id!==y&&ht.removeNode(h,re)}}else this._onRemovalComplete(h,re)}markElementAsRemoved(y,h,A,re,Se){this.collectedLeaveElements.push(h),h[qi]={namespaceId:y,setForRemoval:re,hasAnimation:A,removedBeforeQueried:!1,previousTriggersValues:Se}}listen(y,h,A,re,Se){return Jr(h)?this._fetchNamespace(y).listen(h,A,re,Se):()=>{}}_buildInstruction(y,h,A,re,Se){return y.transition.build(this.driver,y.element,y.fromState.value,y.toState.value,A,re,y.fromState.options,y.toState.options,h,Se)}destroyInnerAnimations(y){let h=this.driver.query(y,Mn,!0);h.forEach(A=>this.destroyActiveAnimationsForElement(A)),0!=this.playersByQueriedElement.size&&(h=this.driver.query(y,ln,!0),h.forEach(A=>this.finishActiveQueriedAnimationOnElement(A)))}destroyActiveAnimationsForElement(y){const h=this.playersByElement.get(y);h&&h.forEach(A=>{A.queued?A.markedForDestroy=!0:A.destroy()})}finishActiveQueriedAnimationOnElement(y){const h=this.playersByQueriedElement.get(y);h&&h.forEach(A=>A.finish())}whenRenderingDone(){return new Promise(y=>{if(this.players.length)return Tt(this.players).onDone(()=>y());y()})}processLeaveNode(y){const h=y[qi];if(h&&h.setForRemoval){if(y[qi]=Qs,h.namespaceId){this.destroyInnerAnimations(y);const A=this._fetchNamespace(h.namespaceId);A&&A.clearElementCache(y)}this._onRemovalComplete(y,h.setForRemoval)}y.classList?.contains(ar)&&this.markElementAsDisabled(y,!1),this.driver.query(y,".ng-animate-disabled",!0).forEach(A=>{this.markElementAsDisabled(A,!1)})}flush(y=-1){let h=[];if(this.newHostElements.size&&(this.newHostElements.forEach((A,re)=>this._balanceNamespaceList(A,re)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let A=0;AA()),this._flushFns=[],this._whenQuietFns.length){const A=this._whenQuietFns;this._whenQuietFns=[],h.length?Tt(h).onDone(()=>{A.forEach(re=>re())}):A.forEach(re=>re())}}reportError(y){throw function Ie(L){return new r.vHH(3402,!1)}()}_flushAnimations(y,h){const A=new Kn,re=[],Se=new Map,ht=[],yt=new Map,Wt=new Map,tn=new Map,En=new Set;this.disabledNodes.forEach(Vn=>{En.add(Vn);const Jn=this.driver.query(Vn,".ng-animate-queued",!0);for(let ni=0;ni{const ni=Rt+ti++;Qn.set(Jn,ni),Vn.forEach(Pi=>Gn(Pi,ni))});const Gi=[],$i=new Set,Or=new Set;for(let Vn=0;Vn$i.add(Pi)):Or.add(Jn))}const ds=new Map,zr=an(pi,Array.from($i));zr.forEach((Vn,Jn)=>{const ni=jt+ti++;ds.set(Jn,ni),Vn.forEach(Pi=>Gn(Pi,ni))}),y.push(()=>{fi.forEach((Vn,Jn)=>{const ni=Qn.get(Jn);Vn.forEach(Pi=>vr(Pi,ni))}),zr.forEach((Vn,Jn)=>{const ni=ds.get(Jn);Vn.forEach(Pi=>vr(Pi,ni))}),Gi.forEach(Vn=>{this.processLeaveNode(Vn)})});const _o=[],co=[];for(let Vn=this._namespaceList.length-1;Vn>=0;Vn--)this._namespaceList[Vn].drainQueuedTransitions(h).forEach(ni=>{const Pi=ni.player,tr=ni.element;if(_o.push(Pi),this.collectedEnterElements.length){const ns=tr[qi];if(ns&&ns.setForMove){if(ns.previousTriggersValues&&ns.previousTriggersValues.has(ni.triggerName)){const Ro=ns.previousTriggersValues.get(ni.triggerName),Ss=this.statesByElement.get(ni.element);if(Ss&&Ss.has(ni.triggerName)){const xa=Ss.get(ni.triggerName);xa.value=Ro,Ss.set(ni.triggerName,xa)}}return void Pi.destroy()}}const no=!On||!this.driver.containsElement(On,tr),Ts=ds.get(tr),bo=Qn.get(tr),hr=this._buildInstruction(ni,A,bo,Ts,no);if(hr.errors&&hr.errors.length)return void co.push(hr);if(no)return Pi.onStart(()=>Sn(tr,hr.fromStyles)),Pi.onDestroy(()=>fn(tr,hr.toStyles)),void re.push(Pi);if(ni.isFallbackTransition)return Pi.onStart(()=>Sn(tr,hr.fromStyles)),Pi.onDestroy(()=>fn(tr,hr.toStyles)),void re.push(Pi);const Ma=[];hr.timelines.forEach(ns=>{ns.stretchStartingKeyframe=!0,this.disabledNodes.has(ns.element)||Ma.push(ns)}),hr.timelines=Ma,A.append(tr,hr.timelines),ht.push({instruction:hr,player:Pi,element:tr}),hr.queriedElements.forEach(ns=>U(yt,ns,[]).push(Pi)),hr.preStyleProps.forEach((ns,Ro)=>{if(ns.size){let Ss=Wt.get(Ro);Ss||Wt.set(Ro,Ss=new Set),ns.forEach((xa,ol)=>Ss.add(ol))}}),hr.postStyleProps.forEach((ns,Ro)=>{let Ss=tn.get(Ro);Ss||tn.set(Ro,Ss=new Set),ns.forEach((xa,ol)=>Ss.add(ol))})});if(co.length){const Vn=[];co.forEach(Jn=>{Vn.push(function Le(L,y){return new r.vHH(3505,!1)}())}),_o.forEach(Jn=>Jn.destroy()),this.reportError(Vn)}const bs=new Map,Ys=new Map;ht.forEach(Vn=>{const Jn=Vn.element;A.has(Jn)&&(Ys.set(Jn,Jn),this._beforeAnimationBuild(Vn.player.namespaceId,Vn.instruction,bs))}),re.forEach(Vn=>{const Jn=Vn.element;this._getPreviousPlayers(Jn,!1,Vn.namespaceId,Vn.triggerName,null).forEach(Pi=>{U(bs,Jn,[]).push(Pi),Pi.destroy()})});const vo=Gi.filter(Vn=>Q(Vn,Wt,tn)),yo=new Map;so(yo,this.driver,Or,tn,C.l3).forEach(Vn=>{Q(Vn,Wt,tn)&&vo.push(Vn)});const Ea=new Map;fi.forEach((Vn,Jn)=>{so(Ea,this.driver,new Set(Vn),Wt,C.k1)}),vo.forEach(Vn=>{const Jn=yo.get(Vn),ni=Ea.get(Vn);yo.set(Vn,new Map([...Array.from(Jn?.entries()??[]),...Array.from(ni?.entries()??[])]))});const $o=[],Vl=[],sl={};ht.forEach(Vn=>{const{element:Jn,player:ni,instruction:Pi}=Vn;if(A.has(Jn)){if(En.has(Jn))return ni.onDestroy(()=>fn(Jn,Pi.toStyles)),ni.disabled=!0,ni.overrideTotalTime(Pi.totalTime),void re.push(ni);let tr=sl;if(Ys.size>1){let Ts=Jn;const bo=[];for(;Ts=Ts.parentNode;){const hr=Ys.get(Ts);if(hr){tr=hr;break}bo.push(Ts)}bo.forEach(hr=>Ys.set(hr,tr))}const no=this._buildAnimation(ni.namespaceId,Pi,bs,Se,Ea,yo);if(ni.setRealPlayer(no),tr===sl)$o.push(ni);else{const Ts=this.playersByElement.get(tr);Ts&&Ts.length&&(ni.parentPlayer=Tt(Ts)),re.push(ni)}}else Sn(Jn,Pi.fromStyles),ni.onDestroy(()=>fn(Jn,Pi.toStyles)),Vl.push(ni),En.has(Jn)&&re.push(ni)}),Vl.forEach(Vn=>{const Jn=Se.get(Vn.element);if(Jn&&Jn.length){const ni=Tt(Jn);Vn.setRealPlayer(ni)}}),re.forEach(Vn=>{Vn.parentPlayer?Vn.syncPlayerEvents(Vn.parentPlayer):Vn.destroy()});for(let Vn=0;Vn!no.destroyed);tr.length?Fs(this,Jn,tr):this.processLeaveNode(Jn)}return Gi.length=0,$o.forEach(Vn=>{this.players.push(Vn),Vn.onDone(()=>{Vn.destroy();const Jn=this.players.indexOf(Vn);this.players.splice(Jn,1)}),Vn.play()}),$o}elementContainsData(y,h){let A=!1;const re=h[qi];return re&&re.setForRemoval&&(A=!0),this.playersByElement.has(h)&&(A=!0),this.playersByQueriedElement.has(h)&&(A=!0),this.statesByElement.has(h)&&(A=!0),this._fetchNamespace(y).elementContainsData(h)||A}afterFlush(y){this._flushFns.push(y)}afterFlushAnimationsDone(y){this._whenQuietFns.push(y)}_getPreviousPlayers(y,h,A,re,Se){let ht=[];if(h){const yt=this.playersByQueriedElement.get(y);yt&&(ht=yt)}else{const yt=this.playersByElement.get(y);if(yt){const Wt=!Se||Se==Tr;yt.forEach(tn=>{tn.queued||!Wt&&tn.triggerName!=re||ht.push(tn)})}}return(A||re)&&(ht=ht.filter(yt=>!(A&&A!=yt.namespaceId||re&&re!=yt.triggerName))),ht}_beforeAnimationBuild(y,h,A){const Se=h.element,ht=h.isRemovalTransition?void 0:y,yt=h.isRemovalTransition?void 0:h.triggerName;for(const Wt of h.timelines){const tn=Wt.element,En=tn!==Se,On=U(A,tn,[]);this._getPreviousPlayers(tn,En,ht,yt,h.toState).forEach(fi=>{const Qn=fi.getRealPlayer();Qn.beforeDestroy&&Qn.beforeDestroy(),fi.destroy(),On.push(fi)})}Sn(Se,h.fromStyles)}_buildAnimation(y,h,A,re,Se,ht){const yt=h.triggerName,Wt=h.element,tn=[],En=new Set,On=new Set,pi=h.timelines.map(Qn=>{const ti=Qn.element;En.add(ti);const Gi=ti[qi];if(Gi&&Gi.removedBeforeQueried)return new C.ZN(Qn.duration,Qn.delay);const $i=ti!==Wt,Or=function rr(L){const y=[];return _e(L,y),y}((A.get(ti)||lr).map(bs=>bs.getRealPlayer())).filter(bs=>!!bs.element&&bs.element===ti),ds=Se.get(ti),zr=ht.get(ti),_o=ze(0,this._normalizer,0,Qn.keyframes,ds,zr),co=this._buildPlayer(Qn,_o,Or);if(Qn.subTimeline&&re&&On.add(ti),$i){const bs=new gs(y,yt,ti);bs.setRealPlayer(co),tn.push(bs)}return co});tn.forEach(Qn=>{U(this.playersByQueriedElement,Qn.element,[]).push(Qn),Qn.onDone(()=>function _s(L,y,h){let A=L.get(y);if(A){if(A.length){const re=A.indexOf(h);A.splice(re,1)}0==A.length&&L.delete(y)}return A}(this.playersByQueriedElement,Qn.element,Qn))}),En.forEach(Qn=>Gn(Qn,zt));const fi=Tt(pi);return fi.onDestroy(()=>{En.forEach(Qn=>vr(Qn,zt)),fn(Wt,h.toStyles)}),On.forEach(Qn=>{U(re,Qn,[]).push(fi)}),fi}_buildPlayer(y,h,A){return h.length>0?this.driver.animate(y.element,h,y.duration,y.delay,y.easing,A):new C.ZN(y.duration,y.delay)}}class gs{constructor(y,h,A){this.namespaceId=y,this.triggerName=h,this.element=A,this._player=new C.ZN,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(y){this._containsRealPlayer||(this._player=y,this._queuedCallbacks.forEach((h,A)=>{h.forEach(re=>me(y,A,void 0,re))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(y.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(y){this.totalTime=y}syncPlayerEvents(y){const h=this._player;h.triggerCallback&&y.onStart(()=>h.triggerCallback("start")),y.onDone(()=>this.finish()),y.onDestroy(()=>this.destroy())}_queueEvent(y,h){U(this._queuedCallbacks,y,[]).push(h)}onDone(y){this.queued&&this._queueEvent("done",y),this._player.onDone(y)}onStart(y){this.queued&&this._queueEvent("start",y),this._player.onStart(y)}onDestroy(y){this.queued&&this._queueEvent("destroy",y),this._player.onDestroy(y)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(y){this.queued||this._player.setPosition(y)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(y){const h=this._player;h.triggerCallback&&h.triggerCallback(y)}}function Jr(L){return L&&1===L.nodeType}function vs(L,y){const h=L.style.display;return L.style.display=y??"none",h}function so(L,y,h,A,re){const Se=[];h.forEach(Wt=>Se.push(vs(Wt)));const ht=[];A.forEach((Wt,tn)=>{const En=new Map;Wt.forEach(On=>{const pi=y.computeStyle(tn,On,re);En.set(On,pi),(!pi||0==pi.length)&&(tn[qi]=ls,ht.push(tn))}),L.set(tn,En)});let yt=0;return h.forEach(Wt=>vs(Wt,Se[yt++])),ht}function an(L,y){const h=new Map;if(L.forEach(yt=>h.set(yt,[])),0==y.length)return h;const re=new Set(y),Se=new Map;function ht(yt){if(!yt)return 1;let Wt=Se.get(yt);if(Wt)return Wt;const tn=yt.parentNode;return Wt=h.has(tn)?tn:re.has(tn)?1:ht(tn),Se.set(yt,Wt),Wt}return y.forEach(yt=>{const Wt=ht(yt);1!==Wt&&h.get(Wt).push(yt)}),h}function Gn(L,y){L.classList?.add(y)}function vr(L,y){L.classList?.remove(y)}function Fs(L,y,h){Tt(h).onDone(()=>L.processLeaveNode(y))}function _e(L,y){for(let h=0;hre.add(Se)):y.set(L,A),h.delete(L),!0}class We{constructor(y,h,A){this.bodyNode=y,this._driver=h,this._normalizer=A,this._triggerCache={},this.onRemovalComplete=(re,Se)=>{},this._transitionEngine=new Us(y,h,A),this._timelineEngine=new Ps(y,h,A),this._transitionEngine.onRemovalComplete=(re,Se)=>this.onRemovalComplete(re,Se)}registerTrigger(y,h,A,re,Se){const ht=y+"-"+re;let yt=this._triggerCache[ht];if(!yt){const Wt=[],En=ir(this._driver,Se,Wt,[]);if(Wt.length)throw function He(L,y){return new r.vHH(3404,!1)}();yt=function Nr(L,y,h){return new Ur(L,y,h)}(re,En,this._normalizer),this._triggerCache[ht]=yt}this._transitionEngine.registerTrigger(h,re,yt)}register(y,h){this._transitionEngine.register(y,h)}destroy(y,h){this._transitionEngine.destroy(y,h)}onInsert(y,h,A,re){this._transitionEngine.insertNode(y,h,A,re)}onRemove(y,h,A,re){this._transitionEngine.removeNode(y,h,re||!1,A)}disableAnimations(y,h){this._transitionEngine.markElementAsDisabled(y,h)}process(y,h,A,re){if("@"==A.charAt(0)){const[Se,ht]=Ae(A);this._timelineEngine.command(Se,h,ht,re)}else this._transitionEngine.trigger(y,h,A,re)}listen(y,h,A,re,Se){if("@"==A.charAt(0)){const[ht,yt]=Ae(A);return this._timelineEngine.listen(ht,h,yt,Se)}return this._transitionEngine.listen(y,h,A,re,Se)}flush(y=-1){this._transitionEngine.flush(y)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}let wn=(()=>{class L{constructor(h,A,re){this._element=h,this._startStyles=A,this._endStyles=re,this._state=0;let Se=L.initialStylesByElement.get(h);Se||L.initialStylesByElement.set(h,Se=new Map),this._initialStyles=Se}start(){this._state<1&&(this._startStyles&&fn(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(fn(this._element,this._initialStyles),this._endStyles&&(fn(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(L.initialStylesByElement.delete(this._element),this._startStyles&&(Sn(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Sn(this._element,this._endStyles),this._endStyles=null),fn(this._element,this._initialStyles),this._state=3)}}return L.initialStylesByElement=new WeakMap,L})();function Xn(L){let y=null;return L.forEach((h,A)=>{(function Mr(L){return"display"===L||"position"===L})(A)&&(y=y||new Map,y.set(A,h))}),y}class Ni{constructor(y,h,A,re){this.element=y,this.keyframes=h,this.options=A,this._specialStyles=re,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=A.duration,this._delay=A.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(y=>y()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const y=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,y,this.options),this._finalKeyframe=y.length?y[y.length-1]:new Map,this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(y){const h=[];return y.forEach(A=>{h.push(Object.fromEntries(A))}),h}_triggerWebAnimation(y,h,A){return y.animate(this._convertKeyframesToObject(h),A)}onStart(y){this._originalOnStartFns.push(y),this._onStartFns.push(y)}onDone(y){this._originalOnDoneFns.push(y),this._onDoneFns.push(y)}onDestroy(y){this._onDestroyFns.push(y)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(y=>y()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(y=>y()),this._onDestroyFns=[])}setPosition(y){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=y*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const y=new Map;this.hasStarted()&&this._finalKeyframe.forEach((A,re)=>{"offset"!==re&&y.set(re,this._finished?A:Zt(this.element,re))}),this.currentSnapshot=y}triggerCallback(y){const h="start"===y?this._onStartFns:this._onDoneFns;h.forEach(A=>A()),h.length=0}}class cr{validateStyleProperty(y){return!0}validateAnimatableStyleProperty(y){return!0}matchesElement(y,h){return!1}containsElement(y,h){return Rn(y,h)}getParentElement(y){return le(y)}query(y,h,A){return gn(y,h,A)}computeStyle(y,h,A){return window.getComputedStyle(y)[h]}animate(y,h,A,re,Se,ht=[]){const Wt={duration:A,delay:re,fill:0==re?"both":"forwards"};Se&&(Wt.easing=Se);const tn=new Map,En=ht.filter(fi=>fi instanceof Ni);(function te(L,y){return 0===L||0===y})(A,re)&&En.forEach(fi=>{fi.currentSnapshot.forEach((Qn,ti)=>tn.set(ti,Qn))});let On=function ot(L){return L.length?L[0]instanceof Map?L:L.map(y=>Wn(y)):[]}(h).map(fi=>Ye(fi));On=function Te(L,y,h){if(h.size&&y.length){let A=y[0],re=[];if(h.forEach((Se,ht)=>{A.has(ht)||re.push(ht),A.set(ht,Se)}),re.length)for(let Se=1;Seht.set(yt,Zt(L,yt)))}}return y}(y,On,tn);const pi=function Qt(L,y){let h=null,A=null;return Array.isArray(y)&&y.length?(h=Xn(y[0]),y.length>1&&(A=Xn(y[y.length-1]))):y instanceof Map&&(h=Xn(y)),h||A?new wn(L,h,A):null}(y,On);return new Ni(y,On,Wt,pi)}}var Ai=s(6895);let Hs=(()=>{class L extends C._j{constructor(h,A){super(),this._nextAnimationId=0,this._renderer=h.createRenderer(A.body,{id:"0",encapsulation:r.ifc.None,styles:[],data:{animation:[]}})}build(h){const A=this._nextAnimationId.toString();this._nextAnimationId++;const re=Array.isArray(h)?(0,C.vP)(h):h;return go(this._renderer,null,A,"register",[re]),new cs(A,this._renderer)}}return L.\u0275fac=function(h){return new(h||L)(r.LFG(r.FYo),r.LFG(Ai.K0))},L.\u0275prov=r.Yz7({token:L,factory:L.\u0275fac}),L})();class cs extends C.LC{constructor(y,h){super(),this._id=y,this._renderer=h}create(y,h){return new qr(this._id,y,h||{},this._renderer)}}class qr{constructor(y,h,A,re){this.id=y,this.element=h,this._renderer=re,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",A)}_listen(y,h){return this._renderer.listen(this.element,`@@${this.id}:${y}`,h)}_command(y,...h){return go(this._renderer,this.element,this.id,y,h)}onDone(y){this._listen("done",y)}onStart(y){this._listen("start",y)}onDestroy(y){this._listen("destroy",y)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(y){this._command("setPosition",y)}getPosition(){return this._renderer.engine.players[+this.id]?.getPosition()??0}}function go(L,y,h,A,re){return L.setProperty(y,`@@${h}:${A}`,re)}const Ls="@.disabled";let Js=(()=>{class L{constructor(h,A,re){this.delegate=h,this.engine=A,this._zone=re,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),A.onRemovalComplete=(Se,ht)=>{const yt=ht?.parentNode(Se);yt&&ht.removeChild(yt,Se)}}createRenderer(h,A){const Se=this.delegate.createRenderer(h,A);if(!(h&&A&&A.data&&A.data.animation)){let En=this._rendererCache.get(Se);return En||(En=new Fe("",Se,this.engine,()=>this._rendererCache.delete(Se)),this._rendererCache.set(Se,En)),En}const ht=A.id,yt=A.id+"-"+this._currentId;this._currentId++,this.engine.register(yt,h);const Wt=En=>{Array.isArray(En)?En.forEach(Wt):this.engine.registerTrigger(ht,yt,h,En.name,En)};return A.data.animation.forEach(Wt),new Et(this,yt,Se,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(h,A,re){h>=0&&hA(re)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(Se=>{const[ht,yt]=Se;ht(yt)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([A,re]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return L.\u0275fac=function(h){return new(h||L)(r.LFG(r.FYo),r.LFG(We),r.LFG(r.R0b))},L.\u0275prov=r.Yz7({token:L,factory:L.\u0275fac}),L})();class Fe{constructor(y,h,A,re){this.namespaceId=y,this.delegate=h,this.engine=A,this._onDestroy=re,this.destroyNode=this.delegate.destroyNode?Se=>h.destroyNode(Se):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy(),this._onDestroy?.()}createElement(y,h){return this.delegate.createElement(y,h)}createComment(y){return this.delegate.createComment(y)}createText(y){return this.delegate.createText(y)}appendChild(y,h){this.delegate.appendChild(y,h),this.engine.onInsert(this.namespaceId,h,y,!1)}insertBefore(y,h,A,re=!0){this.delegate.insertBefore(y,h,A),this.engine.onInsert(this.namespaceId,h,y,re)}removeChild(y,h,A){this.engine.onRemove(this.namespaceId,h,this.delegate,A)}selectRootElement(y,h){return this.delegate.selectRootElement(y,h)}parentNode(y){return this.delegate.parentNode(y)}nextSibling(y){return this.delegate.nextSibling(y)}setAttribute(y,h,A,re){this.delegate.setAttribute(y,h,A,re)}removeAttribute(y,h,A){this.delegate.removeAttribute(y,h,A)}addClass(y,h){this.delegate.addClass(y,h)}removeClass(y,h){this.delegate.removeClass(y,h)}setStyle(y,h,A,re){this.delegate.setStyle(y,h,A,re)}removeStyle(y,h,A){this.delegate.removeStyle(y,h,A)}setProperty(y,h,A){"@"==h.charAt(0)&&h==Ls?this.disableAnimations(y,!!A):this.delegate.setProperty(y,h,A)}setValue(y,h){this.delegate.setValue(y,h)}listen(y,h,A){return this.delegate.listen(y,h,A)}disableAnimations(y,h){this.engine.disableAnimations(y,h)}}class Et extends Fe{constructor(y,h,A,re,Se){super(h,A,re,Se),this.factory=y,this.namespaceId=h}setProperty(y,h,A){"@"==h.charAt(0)?"."==h.charAt(1)&&h==Ls?this.disableAnimations(y,A=void 0===A||!!A):this.engine.process(this.namespaceId,y,h.slice(1),A):this.delegate.setProperty(y,h,A)}listen(y,h,A){if("@"==h.charAt(0)){const re=function Ue(L){switch(L){case"body":return document.body;case"document":return document;case"window":return window;default:return L}}(y);let Se=h.slice(1),ht="";return"@"!=Se.charAt(0)&&([Se,ht]=function bt(L){const y=L.indexOf(".");return[L.substring(0,y),L.slice(y+1)]}(Se)),this.engine.listen(this.namespaceId,re,Se,ht,yt=>{this.factory.scheduleListenerCallback(yt._data||-1,A,yt)})}return this.delegate.listen(y,h,A)}}const In=[{provide:C._j,useClass:Hs},{provide:_r,useFactory:function cn(){return new fs}},{provide:We,useClass:(()=>{class L extends We{constructor(h,A,re,Se){super(h.body,A,re)}ngOnDestroy(){this.flush()}}return L.\u0275fac=function(h){return new(h||L)(r.LFG(Ai.K0),r.LFG(ut),r.LFG(_r),r.LFG(r.z2F))},L.\u0275prov=r.Yz7({token:L,factory:L.\u0275fac}),L})()},{provide:r.FYo,useFactory:function yn(L,y,h){return new Js(L,y,h)},deps:[n.se,We,r.R0b]}],ei=[{provide:ut,useFactory:()=>new cr},{provide:r.QbO,useValue:"BrowserAnimations"},...In],Ci=[{provide:ut,useClass:pt},{provide:r.QbO,useValue:"NoopAnimations"},...In];let Ii=(()=>{class L{static withConfig(h){return{ngModule:L,providers:h.disableAnimations?Ci:ei}}}return L.\u0275fac=function(h){return new(h||L)},L.\u0275mod=r.oAB({type:L}),L.\u0275inj=r.cJS({providers:ei,imports:[n.b2]}),L})();var Xi=s(4006),us=s(7009),ki=s(9549),Vs=s(266),ys=s(9784),js=s(8423),Uo=s(7185),ie=s(7579),tt=s(727),Mt=s(1135),kt=s(9841),Jt=s(2805),Ut=s(515),mn=s(4482),lt=s(5032),An=s(5403),qt=s(8421),Mi=s(3900),Zi=s(1005),hn=s(8746),Di=s(2722),W=s(4004);function Ee(L,y){if(1&L&&r._UZ(0,"div",6),2&L){const h=r.oxw(2);r.Udp("box-shadow","0 0 10px "+h.color+", 0 0 5px "+h.color)}}function X(L,y){if(1&L&&(r.TgZ(0,"div",7),r._UZ(1,"div",8),r.qZA()),2&L){const h=r.oxw(2);r.xp6(1),r.Udp("border-top-color",h.color)("border-left-color",h.color)}}function je(L,y){if(1&L&&(r.ynx(0),r.TgZ(1,"div",1)(2,"div",2)(3,"div",3),r.YNc(4,Ee,1,2,"div",4),r.qZA()(),r.YNc(5,X,2,4,"div",5),r.qZA(),r.BQk()),2&L){const h=y.$implicit,A=r.oxw();r.xp6(1),r.Udp("transition","opacity "+A.speed+"ms "+A.ease),r.uIk("active",h.active),r.xp6(2),r.Udp("transform",h.transform)("background-color",A.color)("transition",h.active?"all "+A.speed+"ms "+A.ease:"none"),r.xp6(1),r.Q6J("ngIf",A.meteor),r.xp6(1),r.Q6J("ngIf",A.spinner)}}class St{constructor(y,h){this._onDestroyCallback=h,this._started=new ie.x,this.started=this._started.pipe((0,o.h)(()=>!this.isStarted)),this._completed=new ie.x,this.completed=this._completed.pipe((0,o.h)(()=>this.isStarted)),this._trickling=new ie.x,this._worker=tt.w0.EMPTY,this._state=new Mt.X({active:!1,value:0}),this._config=new Mt.X(y),this.state=this._state.asObservable(),this.config=this._config.asObservable(),this._worker=(0,kt.a)([this._trickling,this._config]).pipe(function jn(L){return(0,mn.e)((y,h)=>{let A=!1,re=null,Se=null;const ht=()=>{if(Se?.unsubscribe(),Se=null,A){A=!1;const yt=re;re=null,h.next(yt)}};y.subscribe((0,An.x)(h,yt=>{Se?.unsubscribe(),A=!0,re=yt,Se=(0,An.x)(h,ht,lt.Z),(0,qt.Xf)(L(yt)).subscribe(Se)},()=>{ht(),h.complete()},void 0,()=>{re=Se=null}))})}(([A,re])=>(0,Jt.H)(A?re.debounceTime:0)),(0,Mi.w)(([A,re])=>A?this.onTrickling(re):this.onComplete(re))).subscribe()}get snapshot(){return this._state.value}get isStarted(){return this.snapshot.active}start(){this._started.next(),this._trickling.next(!0)}complete(){this._trickling.next(!1)}inc(y){const h=this.snapshot.value;this.isStarted?("number"!=typeof y&&(y=this._config.value.trickleFunc(h)),this.set(h+y)):this.start()}set(y){this.setState({value:this.clamp(y),active:!0})}setConfig(y){this._config.next({...this._config.value,...y})}destroy(){this._worker.unsubscribe(),this._trickling.complete(),this._state.complete(),this._config.complete(),this._started.complete(),this._completed.complete(),this._onDestroyCallback()}setState(y){this._state.next({...this.snapshot,...y})}clamp(y){return Math.max(this._config.value.min,Math.min(this._config.value.max,y))}onTrickling(y){return this.isStarted||this.set(this._config.value.min),(0,Jt.H)(0,y.trickleSpeed).pipe((0,x.b)(()=>this.inc()))}onComplete(y){return this._completed.next(),this.isStarted?(0,u.of)({}).pipe((0,x.b)(()=>this.setState({value:100})),(0,Zi.g)(1.7*y.speed),(0,x.b)(()=>this.setState({active:!1})),(0,Zi.g)(y.speed),(0,hn.x)(()=>this.setState({value:0})),(0,Di.R)(this._started)):Ut.E}}const Kt=new r.OlP("ngProgressConfig"),sn={min:8,max:100,speed:200,debounceTime:0,trickleSpeed:300,fixed:!0,meteor:!0,thick:!1,spinner:!0,ease:"linear",color:"#1B95E0",direction:"ltr+",spinnerPosition:"right",trickleFunc:L=>L>=0&&L<20?10:L>=20&&L<50?4:L>=50&&L<80?2:L>=80&&L<99?.5:0};let Tn=(()=>{class L{constructor(h){this._instances=new Map,this.config=h?{...sn,...h}:sn}ref(h="root",A){if(this._instances.has(h)){const re=this._instances.get(h);return A&&re.setConfig({...this.config,...A}),re}{const re=new St({...this.config,...A},this.deleteInstance(h));return this._instances.set(h,re).get(h)}}destroyAll(){this._instances.forEach(h=>h.destroy())}deleteInstance(h){return()=>{this._instances.delete(h)}}}return L.\u0275fac=function(h){return new(h||L)(r.LFG(Kt,8))},L.\u0275prov=r.Yz7({token:L,factory:L.\u0275fac,providedIn:"root"}),L})(),di=(()=>{class L{constructor(h){this._ngProgress=h,this.id="root",this.min=this._ngProgress.config.min,this.max=this._ngProgress.config.max,this.ease=this._ngProgress.config.ease,this.color=this._ngProgress.config.color,this.speed=this._ngProgress.config.speed,this.thick=this._ngProgress.config.thick,this.fixed=this._ngProgress.config.fixed,this.meteor=this._ngProgress.config.meteor,this.spinner=this._ngProgress.config.spinner,this.trickleSpeed=this._ngProgress.config.trickleSpeed,this.debounceTime=this._ngProgress.config.debounceTime,this.trickleFunc=this._ngProgress.config.trickleFunc,this.spinnerPosition=this._ngProgress.config.spinnerPosition,this.direction=this._ngProgress.config.direction,this.started=new r.vpe,this.completed=new r.vpe}get isStarted(){return this.progressRef?.isStarted}ngOnChanges(){this.progressRef?.setConfig({max:this.max>0&&this.max<=100?this.max:100,min:this.min<100&&this.min>=0?this.min:0,speed:this.speed,trickleSpeed:this.trickleSpeed,trickleFunc:this.trickleFunc,debounceTime:this.debounceTime})}ngOnInit(){this.progressRef=this._ngProgress.ref(this.id,{max:this.max,min:this.min,speed:this.speed,trickleSpeed:this.trickleSpeed,debounceTime:this.debounceTime}),this.state$=this.progressRef.state.pipe((0,W.U)(h=>({active:h.active,transform:`translate3d(${h.value}%,0,0)`}))),this.started.observed&&(this._started=this.progressRef.started.subscribe(()=>this.started.emit())),this.completed.observed&&(this._completed=this.progressRef.completed.subscribe(()=>this.completed.emit()))}ngOnDestroy(){this._started?.unsubscribe(),this._completed?.unsubscribe(),this.progressRef?.destroy()}start(){this.progressRef.start()}complete(){this.progressRef.complete()}inc(h){this.progressRef.inc(h)}set(h){this.progressRef.set(h)}}return L.\u0275fac=function(h){return new(h||L)(r.Y36(Tn))},L.\u0275cmp=r.Xpm({type:L,selectors:[["ng-progress"]],hostAttrs:["role","progressbar"],hostVars:4,hostBindings:function(h,A){2&h&&r.uIk("spinnerPosition",A.spinnerPosition)("direction",A.direction)("thick",A.thick)("fixed",A.fixed)},inputs:{id:"id",min:"min",max:"max",ease:"ease",color:"color",speed:"speed",thick:"thick",fixed:"fixed",meteor:"meteor",spinner:"spinner",trickleSpeed:"trickleSpeed",debounceTime:"debounceTime",trickleFunc:"trickleFunc",spinnerPosition:"spinnerPosition",direction:"direction"},outputs:{started:"started",completed:"completed"},features:[r.TTD],decls:2,vars:3,consts:[[4,"ngIf"],[1,"ng-progress-bar"],[1,"ng-bar-placeholder"],[1,"ng-bar"],["class","ng-meteor",3,"boxShadow",4,"ngIf"],["class","ng-spinner",4,"ngIf"],[1,"ng-meteor"],[1,"ng-spinner"],[1,"ng-spinner-icon"]],template:function(h,A){1&h&&(r.YNc(0,je,6,11,"ng-container",0),r.ALo(1,"async")),2&h&&r.Q6J("ngIf",r.lcZ(1,1,A.state$))},dependencies:[Ai.O5,Ai.Ov],styles:['[_nghost-%COMP%]{z-index:999999;pointer-events:none}[fixed=true][_nghost-%COMP%] .ng-progress-bar[_ngcontent-%COMP%], [fixed=true][_nghost-%COMP%] .ng-spinner[_ngcontent-%COMP%]{position:fixed}[fixed=true][_nghost-%COMP%] .ng-spinner[_ngcontent-%COMP%]{top:15px}[fixed=true][spinnerPosition=left][_nghost-%COMP%] .ng-spinner[_ngcontent-%COMP%]{left:15px}[fixed=true][spinnerPosition=right][_nghost-%COMP%] .ng-spinner[_ngcontent-%COMP%]{right:15px}[thick=true][_nghost-%COMP%] .ng-spinner-icon[_ngcontent-%COMP%]{width:24px;height:24px;border-width:3px}[thick=true][_nghost-%COMP%] .ng-bar-placeholder[_ngcontent-%COMP%]{height:3px!important}[direction="ltr+"][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%], [direction=ltr-][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%]{transform:rotate(3deg)}[direction="ltr+"][thick=true][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%], [direction=ltr-][thick=true][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%]{transform:rotate(4deg)}[direction="ltr+"][_nghost-%COMP%] .ng-bar[_ngcontent-%COMP%], [direction="rtl+"][_nghost-%COMP%] .ng-bar[_ngcontent-%COMP%]{margin-left:-100%}[direction="ltr+"][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%], [direction="rtl+"][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%]{right:0}[direction="ltr+"][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%], [direction=rtl-][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%]{top:-3px}[direction="ltr+"][thick=true][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%], [direction=rtl-][thick=true][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%]{top:-4px}[direction=ltr-][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%], [direction="rtl+"][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%]{bottom:-3px}[direction=ltr-][thick=true][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%], [direction="rtl+"][thick=true][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%]{bottom:-4px}[direction=ltr-][_nghost-%COMP%] .ng-bar-placeholder[_ngcontent-%COMP%], [direction="rtl+"][_nghost-%COMP%] .ng-bar-placeholder[_ngcontent-%COMP%]{transform:rotate(180deg)}[direction=ltr-][_nghost-%COMP%] .ng-spinner-icon[_ngcontent-%COMP%], [direction="rtl+"][_nghost-%COMP%] .ng-spinner-icon[_ngcontent-%COMP%]{animation-directionection:reverse}[direction="rtl+"][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%], [direction=rtl-][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%]{transform:rotate(-3deg)}[direction="rtl+"][thick=true][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%], [direction=rtl-][thick=true][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%]{transform:rotate(-4deg)}[spinnerPosition=left][_nghost-%COMP%] .ng-spinner[_ngcontent-%COMP%]{left:10px}[spinnerPosition=right][_nghost-%COMP%] .ng-spinner[_ngcontent-%COMP%]{right:10px}.ng-progress-bar[_ngcontent-%COMP%]{position:relative;z-index:999999;top:0;left:0;width:100%;transform:scale(1);filter:alpha(opacity=0);opacity:0}.ng-progress-bar[active=true][_ngcontent-%COMP%]{filter:alpha(opacity=100);opacity:1;transition:none}.ng-bar-placeholder[_ngcontent-%COMP%]{position:absolute;height:2px;width:100%}.ng-bar[_ngcontent-%COMP%]{width:100%;height:100%;transform:translate(-100%,0,0)}.ng-meteor[_ngcontent-%COMP%]{display:block;position:absolute;width:100px;height:100%;opacity:1}.ng-spinner[_ngcontent-%COMP%]{position:absolute;display:block;z-index:1031;top:10px}.ng-spinner-icon[_ngcontent-%COMP%]{width:18px;height:18px;box-sizing:border-box;-webkit-animation:spinner-animation .25s linear infinite;animation:spinner-animation .25s linear infinite;border:2px solid transparent;border-radius:50%}@-webkit-keyframes spinner-animation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes spinner-animation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}'],changeDetection:0}),L})(),hi=(()=>{class L{static withConfig(h){return{ngModule:L,providers:[{provide:Kt,useValue:h}]}}}return L.\u0275fac=function(h){return new(h||L)},L.\u0275mod=r.oAB({type:L}),L.\u0275inj=r.cJS({imports:[[Ai.ez]]}),L})();const xi=new r.OlP("ngProgressHttpConfig");let en=(()=>{class L{constructor(h,A){this.ngProgress=h,this._inProgressCount=0,this._config={id:"root",silentApis:[],matcher:void 0},this._config=A?{...this._config,...A}:this._config}intercept(h,A){return h.headers.has("ignoreProgressBar")?A.handle(h.clone({headers:h.headers.delete("ignoreProgressBar")})):this.checkUrl(h)?A.handle(h):(this._inProgressCount++,this._progressRef=this.ngProgress.ref(this._config.id),this._progressRef.isStarted||this._progressRef.start(),A.handle(h).pipe((0,hn.x)(()=>{this._inProgressCount--,0===this._inProgressCount&&this._progressRef.complete()})))}checkUrl(h){const A=h.url.toLowerCase();return this._config.matcher&&this._config.silentApis?.length?Ei(A,this._config.matcher)&&Qi(A,this._config.silentApis):this._config.silentApis?.length?Qi(A,this._config.silentApis):!!this._config.matcher&&Ei(A,this._config.matcher)}}return L.\u0275fac=function(h){return new(h||L)(r.LFG(Tn),r.LFG(xi,8))},L.\u0275prov=r.Yz7({token:L,factory:L.\u0275fac}),L})();function Qi(L,y){return!!y.find(h=>L.includes(h.toLowerCase()))}function Ei(L,y){return!!L.match(y)}let $n=(()=>{class L{static withConfig(h){return{ngModule:L,providers:[{provide:xi,useValue:h}]}}}return L.\u0275fac=function(h){return new(h||L)},L.\u0275mod=r.oAB({type:L}),L.\u0275inj=r.cJS({providers:[{provide:l.TP,useClass:en,multi:!0}]}),L})();var xr=s(6493),Wi=s(6271),gi=s(1390),bi=s(4249),ur=s(2777),Xr=s(5094);const Sr=[{path:"",pathMatch:"full",redirectTo:"home"},{path:"admin-mod",loadChildren:()=>Promise.all([s.e(471),s.e(375),s.e(592),s.e(734)]).then(s.bind(s,7734)).then(L=>L.AdminModule),canActivate:[Xr.H,ur.t],data:{title:"Admin & Moderator Panel Management",description:"Halaman Khusus Untuk Administrasi & Moderasi",keywords:"Admin Moderator Fansub Database",[Wi.t.decoratorVerifiedOnly]:!0,[Wi.t.decoratorRoles]:[bi.yS.ADMIN,bi.yS.MODERATOR]}},{path:"create",loadChildren:()=>Promise.all([s.e(375),s.e(592),s.e(939)]).then(s.bind(s,9939)).then(L=>L.CreateModule),canActivate:[ur.t],data:{title:"Membuat Konten Baru",description:"Membuat Konten Baru",keywords:"Add New Content",[Wi.t.decoratorRoles]:[bi.yS.ADMIN,bi.yS.MODERATOR,bi.yS.FANSUBBER,bi.yS.USER]}},{path:"login",loadChildren:()=>s.e(146).then(s.bind(s,8146)).then(L=>L.LoginModule),data:{title:"Masuk",description:"Halaman Login",keywords:"Login"}},{path:"register",loadChildren:()=>Promise.all([s.e(592),s.e(839)]).then(s.bind(s,3839)).then(L=>L.RegisterModule),data:{title:"Pendaftaran",description:"Halaman Pembuatan Akun Baru",keywords:"Register"}},{path:"reset-password",loadChildren:()=>Promise.all([s.e(592),s.e(960)]).then(s.bind(s,5960)).then(L=>L.ResetPasswordModule),data:{title:"Reset Akun",description:"Halaman Atur Ulang Kata Sandi",keywords:"Reset Password"}},{path:"privacy-policy",loadChildren:()=>s.e(772).then(s.bind(s,5772)).then(L=>L.PrivacyPolicyModule),data:{title:"Privacy Policy",description:"Halaman Kebijakan Privasi",keywords:"privacy-policy"}},{path:"verify",loadChildren:()=>Promise.all([s.e(592),s.e(628)]).then(s.bind(s,7628)).then(L=>L.VerifyModule),canActivate:[ur.t],data:{title:"Verifikasi",description:"Halaman Verifikasi Akun",keywords:"Verify",[Wi.t.decoratorRoles]:[bi.yS.ADMIN,bi.yS.MODERATOR,bi.yS.FANSUBBER,bi.yS.USER]}},{path:"home",loadChildren:()=>Promise.all([s.e(592),s.e(915)]).then(s.bind(s,2915)).then(L=>L.HomeModule),data:{title:"Database Fansub Indonesia",description:"Database Fansub Indonesia",keywords:"Fansub DB"}},{path:"news",loadChildren:()=>Promise.all([s.e(471),s.e(847),s.e(375),s.e(592),s.e(108)]).then(s.bind(s,6108)).then(L=>L.NewsModule),data:{title:"Berita & Informasi",description:"Papan Pengumuman",keywords:"News"}},{path:"mailbox",loadChildren:()=>Promise.all([s.e(471),s.e(592),s.e(297)]).then(s.bind(s,2297)).then(L=>L.MailboxModule),canActivate:[ur.t,Xr.H],data:{title:"Surat Elektronik",description:"E-Mail & DM's",keywords:"Surel Email DM",[Wi.t.decoratorVerifiedOnly]:!0,[Wi.t.decoratorRoles]:[bi.yS.ADMIN,bi.yS.MODERATOR,bi.yS.FANSUBBER,bi.yS.USER]}},{path:"nihongo",loadChildren:()=>Promise.all([s.e(471),s.e(847),s.e(375),s.e(592),s.e(750)]).then(s.bind(s,6750)).then(L=>L.NihongoModule),data:{title:"Belajar Bahasa Jepang",description:"Jejepangan Lebih Seru Dengan Bahasa Aslinya",keywords:"Bahasa Jepang"}},{path:"berkas",loadChildren:()=>Promise.all([s.e(471),s.e(847),s.e(375),s.e(268),s.e(219),s.e(592),s.e(635)]).then(s.bind(s,8635)).then(L=>L.BerkasModule),data:{title:"Semua Berkas",description:"Kelola Arsip Berkas",keywords:"Berkas File"}},{path:"anime",loadChildren:()=>Promise.all([s.e(471),s.e(847),s.e(268),s.e(650),s.e(32)]).then(s.bind(s,32)).then(L=>L.AnimeModule),data:{title:"List Anime & Garapan Musiman",description:"Daftar Isi Anime Musiman Yang Baru Saja Rilis Subtitle Indonesianya",keywords:"Anime Subtitle Indonesia"}},{path:"dorama",loadChildren:()=>Promise.all([s.e(471),s.e(847),s.e(268),s.e(650),s.e(469)]).then(s.bind(s,8469)).then(L=>L.DoramaModule),data:{title:"List Dorama & Garapan Musiman",description:"Daftar Isi Dorama Musiman Yang Baru Saja Rilis Subtitle Indonesianya",keywords:"Dorama Subtitle Indonesia"}},{path:"fansub",loadChildren:()=>Promise.all([s.e(471),s.e(847),s.e(375),s.e(268),s.e(219),s.e(478)]).then(s.bind(s,8478)).then(L=>L.FansubModule),data:{title:"Katalog Informasi Seluruh Fansub Indonesia",description:"Daftar Isi Seluruh Fansub Indonesia",keywords:"Fansub Indonesia"}},{path:"user",loadChildren:()=>Promise.all([s.e(471),s.e(847),s.e(375),s.e(268),s.e(219),s.e(794)]).then(s.bind(s,2794)).then(L=>L.UserModule),data:{title:"User Profile",description:"Halaman Informasi Pengguna",keywords:"User"}},{path:"rss-feed",loadChildren:()=>Promise.all([s.e(471),s.e(847),s.e(592),s.e(534)]).then(s.bind(s,6534)).then(L=>L.RssFeedModule),data:{title:"Loper Koran RSS Feed",description:"Halaman Rangkuman Berita Acara Fansub Indonesia",keywords:"RSS Feed"}},{path:"torrent",loadChildren:()=>Promise.all([s.e(592),s.e(58)]).then(s.bind(s,4058)).then(L=>L.TorrentModule),data:{title:"Web-SocketRTC Torrent",description:"Halaman Peer-to-Peer Berbagi Berkas",keywords:"Web Torrent"}},{path:"docs",loadChildren:()=>Promise.all([s.e(592),s.e(114)]).then(s.bind(s,7114)).then(L=>L.DocsModule),data:{title:"Developers Documentation",description:"For Developers Only",keywords:"Domain & API Keys"}},{path:"error",loadChildren:()=>s.e(358).then(s.bind(s,1358)).then(L=>L.NotFoundModule),data:{title:"Error - 404",description:"Whoops! Halaman Tidak Ditemukan",keywords:"404 - Not Found"}},{path:"**",redirectTo:"error"}];let Dt=(()=>{class L{}return L.\u0275fac=function(h){return new(h||L)},L.\u0275mod=r.oAB({type:L}),L.\u0275inj=r.cJS({imports:[gi.Bz.forRoot(Sr,{initialNavigation:"enabledBlocking",scrollPositionRestoration:"enabled",relativeLinkResolution:"corrected"}),gi.Bz]}),L})(),_n=(()=>{class L extends n.hm{constructor(){super(...arguments),this.overrides={pinch:{enable:!1},rotate:{enable:!1}}}}return L.\u0275fac=function(){let y;return function(A){return(y||(y=r.n5z(L)))(A||L)}}(),L.\u0275prov=r.Yz7({token:L,factory:L.\u0275fac,providedIn:"root"}),L})();const Un={showDelay:250,hideDelay:0,touchendHideDelay:0,touchGestures:"off"};var Ln=s(210),li=s(257),_i=s(3e3);let dr=(()=>{class L{constructor(h,A){this.gs=h,this.bs=A}intercept(h,A){return A.handle(h).pipe((0,Di.R)(this.bs.onCancelPendingRequests))}}return L.\u0275fac=function(h){return new(h||L)(r.LFG(li.U),r.LFG(_i.z))},L.\u0275prov=r.Yz7({token:L,factory:L.\u0275fac}),L})();var Ui=s(5934),er=s(8381),Bs=s(4137);let Xs=(()=>{class L{constructor(h,A,re){this.gs=h,this.ss=A,this.as=re}intercept(h,A){const re=h.url,Se=re.startsWith(Ui.N.baseUrl)||re.startsWith(Ui.N.apiUrl);if(this.gs.isBrowser&&Se){if(h=h.clone({withCredentials:!this.gs.isDevMode}),this.as.token){const ht=this.as.token.length,yt=this.as.token.slice(0,5)+"....."+this.as.token.slice(ht-5,ht);this.gs.log("[INTERCEPT_JWT]",yt),h=h.clone({headers:h.headers.append("Authorization",`Bearer ${this.as.token}`)})}this.ss.mySocket?.id&&(this.gs.log("[INTERCEPT_SOCKET]",this.ss.mySocket.id),h=h.clone({headers:h.headers.append("x-socket-id",this.ss.mySocket.id)}))}return A.handle(h)}}return L.\u0275fac=function(h){return new(h||L)(r.LFG(li.U),r.LFG(er.R),r.LFG(Bs.e))},L.\u0275prov=r.Yz7({token:L,factory:L.\u0275fac}),L})();var es=s(262),wo=s(2843),Qo=s(6925),zs=s(3379);let ga=(()=>{class L{constructor(h,A,re,Se,ht,yt,Wt,tn){this.gs=h,this.router=A,this.as=re,this.toast=Se,this.bs=ht,this.ss=yt,this.ls=Wt,this.activatedRoute=tn}intercept(h,A){return A.handle(h).pipe((0,x.b)(re=>{if(re instanceof l.Zn&&this.gs.isBrowser){let Se="UwUu~ Berhasil~",ht="Yeay, Selesai!";switch(re&&re.body&&(re.body.info&&(ht=re.body.info),re.body.result&&re.body.result.message&&(Se=re.body.result.message)),re.status){case 200:this.toast.success(Se,ht);break;case 201:case 202:this.toast.info(Se,ht);break;default:this.toast.warning(Se,ht)}if("GET"===h.method){this.gs.log("[SOCKET_TRACK-SET]",h.url);let yt=h.url;yt.startsWith(Ui.N.baseUrl)&&(yt=yt.slice(Ui.N.baseUrl.length)),yt.startsWith(Ui.N.apiUrl)&&(yt=yt.slice(Ui.N.apiUrl.length)),this.ss.socketEmitVolatile("track-set",{pathUrl:yt.split("?")[0]})}}}),(0,es.K)(re=>{if(this.gs.log(`[INTERCEPT_ERROR-${re.status}]`,re.statusText,"error"),this.gs.isBrowser){let Se="Terjadi Kesalahan Pada Jaringan~",ht="Whoops, Server Sibuk T.T";switch(re&&re.error&&(re.error.info&&(ht=re.error.info),re.error.result&&re.error.result.message&&(Se=re.error.result.message)),this.toast.error(Se,ht,null,!0),re.status){case 401:this.as.removeUser(),this.ls.clear(),this.bs.idle(),this.router.navigate(["/login"],{queryParams:{returnUrl:this.router.url.split("?")[0]||"/"}});break;case 404:this.bs.idle(),this.router.navigate(["/error"],{queryParams:{returnUrl:this.activatedRoute.snapshot.parent?.url||"/"}});break;case 418:this.bs.idle(),this.router.navigate(["/verify"],{queryParams:{returnUrl:this.router.url.split("?")[0]||"/"}})}}return(0,wo._)(()=>re.error)}))}}return L.\u0275fac=function(h){return new(h||L)(r.LFG(li.U),r.LFG(gi.F0),r.LFG(Bs.e),r.LFG(Qo.k),r.LFG(_i.z),r.LFG(er.R),r.LFG(zs.n),r.LFG(gi.gz))},L.\u0275prov=r.Yz7({token:L,factory:L.\u0275fac}),L})();var _a=s(5861);const va=(0,C.X$)("onSideNavChange",[(0,C.SB)("close",(0,C.oB)({"min-width":"50px"})),(0,C.SB)("open",(0,C.oB)({"min-width":"200px"})),(0,C.eR)("close => open",(0,C.jt)("250ms ease-in")),(0,C.eR)("open => close",(0,C.jt)("250ms ease-out"))]),Qa=(0,C.X$)("onMainContentChange",[(0,C.SB)("close",(0,C.oB)({"margin-left":"62px"})),(0,C.SB)("open",(0,C.oB)({"margin-left":"200px"})),(0,C.eR)("close => open",(0,C.jt)("250ms ease-in")),(0,C.eR)("open => close",(0,C.jt)("250ms ease-out"))]),Ho=(0,C.X$)("animateText",[(0,C.SB)("hide",(0,C.oB)({display:"none",opacity:0})),(0,C.SB)("show",(0,C.oB)({display:"block",opacity:1})),(0,C.eR)("close => open",(0,C.jt)("350ms ease-in")),(0,C.eR)("open => close",(0,C.jt)("200ms ease-out"))]);var Ao=s(8745),Ns=s(6382),oo=s(7),Ws=s(7814),eo=s(8020),ao=s(7845),To=s(9775);let Ja=(()=>{class L{constructor(h){this.gs=h,this.currentViewer=null}viewImage(h){this.currentViewer=new Viewer(h,{url:"src",navbar:!1,title:!0,toolbar:{zoomIn:!0,zoomOut:!0,oneToOne:!0,reset:!0,prev:!1,play:{show:!1,size:"large"},next:!1,rotateLeft:!0,rotateRight:!0,flipHorizontal:!0,flipVertical:!0},ready:A=>{this.gs.log("[VIEWERJS]",A.type),this.currentViewer.show()},show:A=>{this.gs.log("[VIEWERJS]",A.type)},shown:A=>{this.gs.log("[VIEWERJS]",A.type)},view:A=>{this.gs.log("[VIEWERJS]",A.type)},viewed:A=>{this.gs.log("[VIEWERJS]",A.type)},move:A=>{this.gs.log("[VIEWERJS]",A.type)},moved:A=>{this.gs.log("[VIEWERJS]",A.type)},rotate:A=>{this.gs.log("[VIEWERJS]",A.type)},rotated:A=>{this.gs.log("[VIEWERJS]",A.type)},scale:A=>{this.gs.log("[VIEWERJS]",A.type)},scaled:A=>{this.gs.log("[VIEWERJS]",A.type)},play:A=>{this.gs.log("[VIEWERJS]",A.type)},stop:A=>{this.gs.log("[VIEWERJS]",A.type)},hide:A=>{this.gs.log("[VIEWERJS]",A.type)},zoom:A=>{this.gs.log("[VIEWERJS]",A.type)},zoomed:A=>{this.gs.log("[VIEWERJS]",A.type)},hidden:A=>{this.gs.log("[VIEWERJS]",A.type),this.currentViewer.destroy(),this.currentViewer=null}})}}return L.\u0275fac=function(h){return new(h||L)(r.LFG(li.U))},L.\u0275prov=r.Yz7({token:L,factory:L.\u0275fac,providedIn:"root"}),L})();var Vo=s(3267),Vi=s(8987),Sl=s(6781),Ol=s(9618),Il=s(8058),ya=s(2673),qa=s(4859),Ic=s(3238),So=s(7392),Oo=s(3683);function Xa(L,y){if(1&L&&(r.TgZ(0,"button",16),r._UZ(1,"mat-icon",17),r._uU(2),r.qZA()),2&L){const h=r.oxw();r.xp6(2),r.hij(" ",h.myPoints," ")}}function Rl(L,y){if(1&L){const h=r.EpF();r.TgZ(0,"button",18),r.NdJ("click",function(){r.CHM(h);const re=r.oxw();return r.KtG(re.toggleDelete())}),r._UZ(1,"mat-icon",19),r.qZA()}}function yr(L,y){if(1&L){const h=r.EpF();r.TgZ(0,"button",20),r.NdJ("click",function(){r.CHM(h);const re=r.oxw();return r.KtG(re.toggleWeather())}),r._UZ(1,"mat-icon",21),r.qZA()}}function Jo(L,y){if(1&L){const h=r.EpF();r.TgZ(0,"button",22),r.NdJ("click",function(){r.CHM(h);const re=r.oxw();return r.KtG(re.openAdminNavigation())}),r._UZ(1,"mat-icon",23),r.qZA()}}function Io(L,y){if(1&L){const h=r.EpF();r.TgZ(0,"button",24),r.NdJ("click",function(){r.CHM(h);const re=r.oxw();return r.KtG(re.reloadPage())}),r._UZ(1,"mat-icon",25),r.qZA()}}let Pl=(()=>{class L{constructor(h,A,re,Se,ht,yt,Wt,tn,En,On,pi,fi,Qn,ti){this.snackBar=h,this.lms=A,this.rps=re,this.router=Se,this.pi=ht,this.gs=yt,this.ss=Wt,this.bs=tn,this.ls=En,this.ds=On,this.berkas=pi,this.fansub=fi,this.news=Qn,this.user=ti,this.myPoints=0,this.subsGlobalRoom=null,this.subsDialog=null,this.subsDelete=null,this.deleteHandle={},this.gs.isBrowser&&(this.deleteHandle.berkas=this.berkas,this.deleteHandle.fansub=this.fansub,this.deleteHandle.news=this.news,this.deleteHandle.user=this.user)}get GS(){return this.gs}get ROUTER(){return this.router}get PI(){return this.pi}get SS(){return this.ss}get canDelete(){return this.router.url.startsWith("/berkas/")||this.router.url.startsWith("/fansub/")||this.router.url.startsWith("/news/")||this.router.url.startsWith("/user/")}ngOnInit(){if(this.gs.isBrowser){const h=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches;this.gs.isDarkMode=h||"true"===this.ls.getItem(this.gs.localStorageKeys.DarkMode),this.toggleDarkTheme(!0),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",A=>{this.gs.isDarkMode=A.matches,this.toggleDarkTheme(!0)}),this.subsGlobalRoom=this.ss.globalRoom.subscribe({next:A=>{this.myPoints=A?.member_list[this.ss.mySocket.id]?.profile_?.points||0}})}}ngOnDestroy(){this.subsGlobalRoom?.unsubscribe(),this.subsDialog?.unsubscribe(),this.subsDelete?.unsubscribe()}get discordUrl(){return Ui.N.discord.join_url}toggleSideNav(){this.lms.onSideNavToggleView()}toggleWeather(){this.gs.weatherToggle(),this.snackBar.open(`Berhasil ${this.gs.weatherRunning?"Menyalakan":"Mematikan"} Efek Musiman`,"Ok")}reloadPage(){this.bs.busy(),window.location.reload()}openSearch(){this.rps.toggleSidePanel("SearchAllComponent")}openLiveChat(){this.rps.toggleSidePanel("LiveChatComponent")}openAdminNavigation(){this.rps.toggleSidePanel("AdminNavigationComponent")}toggleDarkTheme(h=!1){this.gs.toggleDarkTheme(h),this.ls.setItem(this.gs.localStorageKeys.DarkMode,JSON.stringify(this.gs.isDarkMode)),this.pi.updateStatusBarTheme(this.gs.isDarkMode),this.snackBar.open("Menggunakan Mode "+(this.gs.isDarkMode?"Gelap":"Terang"),"Ok")}toggleDelete(){var h=this;return(0,_a.Z)(function*(){const A=h.router.url.split("?")[0];if(A.startsWith("/berkas/")||A.startsWith("/fansub/")||A.startsWith("/news/")||A.startsWith("/user/")){const re=A.split("/")[1],Se=A.split("/")[2];h.subsDialog=(yield h.ds.openKonfirmasiDialog("Konfirmasi Hapus",`Yakin Akan Menghapus ${re[0].toUpperCase()}${re.slice(1)} -- '${Se}' ?`,!0)).afterClosed().subscribe({next:ht=>{h.gs.log("[INFO_DIALOG_CLOSED]",ht),!0===ht&&(h.bs.busy(),h.subsDelete=h.deleteHandle[re].delete(Se).subscribe({next:yt=>{h.gs.log(`[${re.toUpperCase()}_CLICK_DELETE_SUCCESS]`,yt),h.bs.idle(),h.router.navigateByUrl(`/${re}`)},error:yt=>{h.gs.log(`[${re.toUpperCase()}_CLICK_DELETE_ERROR]`,yt,"error"),h.bs.idle()}})),h.subsDialog.unsubscribe()}})}})()}}return L.\u0275fac=function(h){return new(h||L)(r.Y36(us.ux),r.Y36(oo.S),r.Y36(Ws.C),r.Y36(gi.F0),r.Y36(Ao.Z),r.Y36(li.U),r.Y36(er.R),r.Y36(_i.z),r.Y36(zs.n),r.Y36(ao.x),r.Y36(Vi.A),r.Y36(Sl.T),r.Y36(Ol.Y),r.Y36(Il.K))},L.\u0275cmp=r.Xpm({type:L,selectors:[["app-header"]],decls:17,vars:8,consts:[["color","primary",2,"height","56px","padding","0 12px"],["type","button","mat-icon-button","","matTooltip","Menu",1,"shiny",3,"click"],["fontIcon","menu"],["matLine","",1,"text-truncate",2,"margin-left","1rem","margin-right","1rem"],[1,"spacer"],["type","button","mat-stroked-button","","matTooltip","Points",4,"ngIf"],["type","button","class","animate__animated animate__rubberBand animate__infinite animate__slower","mat-icon-button","","matTooltip","Hapus Data",3,"click",4,"ngIf"],["type","button","class","animate__animated animate__tada animate__infinite animate__slower","mat-icon-button","","matTooltip","Weather Effect",3,"click",4,"ngIf"],["type","button","mat-icon-button","","matTooltip","Ganti Warna",1,"animate__animated","animate__flash","animate__infinite","animate__slower",3,"click"],["fontIcon","nights_stay"],["type","button","mat-icon-button","","matTooltip","Obrolan",3,"click"],["fontIcon","forum","matBadgePosition","before",3,"matBadge","matBadgeColor"],["type","button","mat-icon-button","",3,"click",4,"ngIf"],["type","button","mat-icon-button","","matTooltip","Pencarian",1,"animate__animated","animate__heartBeat","animate__infinite","animate__slower",3,"click"],["fontIcon","search"],["type","button","mat-icon-button","","matTooltip","Refresh",3,"click",4,"ngIf"],["type","button","mat-stroked-button","","matTooltip","Points"],["fontIcon","sports_score",1,"me-1"],["type","button","mat-icon-button","","matTooltip","Hapus Data",1,"animate__animated","animate__rubberBand","animate__infinite","animate__slower",3,"click"],["fontIcon","delete"],["type","button","mat-icon-button","","matTooltip","Weather Effect",1,"animate__animated","animate__tada","animate__infinite","animate__slower",3,"click"],["fontIcon","filter_vintage"],["type","button","mat-icon-button","",3,"click"],["fontIcon","apps"],["type","button","mat-icon-button","","matTooltip","Refresh",3,"click"],["fontIcon","replay"]],template:function(h,A){1&h&&(r.TgZ(0,"mat-toolbar",0)(1,"button",1),r.NdJ("click",function(){return A.toggleSideNav()}),r._UZ(2,"mat-icon",2),r.qZA(),r.TgZ(3,"span",3),r._uU(4),r.qZA(),r._UZ(5,"span",4),r.YNc(6,Xa,3,1,"button",5),r.YNc(7,Rl,2,0,"button",6),r.YNc(8,yr,2,0,"button",7),r.TgZ(9,"button",8),r.NdJ("click",function(){return A.toggleDarkTheme()}),r._UZ(10,"mat-icon",9),r.qZA(),r.TgZ(11,"button",10),r.NdJ("click",function(){return A.openLiveChat()}),r._UZ(12,"mat-icon",11),r.qZA(),r.YNc(13,Jo,2,0,"button",12),r.TgZ(14,"button",13),r.NdJ("click",function(){return A.openSearch()}),r._UZ(15,"mat-icon",14),r.qZA(),r.YNc(16,Io,2,0,"button",15),r.qZA()),2&h&&(r.xp6(4),r.hij(" ",A.PI.getHeaderTitle," "),r.xp6(2),r.Q6J("ngIf",A.ROUTER.url.startsWith("/nihongo")&&A.GS.isDesktop),r.xp6(1),r.Q6J("ngIf",A.canDelete),r.xp6(1),r.Q6J("ngIf",A.GS.weatherEffect),r.xp6(4),r.Q6J("matBadge",A.SS.messageChatUnreadCount)("matBadgeColor","warn"),r.xp6(1),r.Q6J("ngIf",A.ROUTER.url.startsWith("/admin-mod/")),r.xp6(3),r.Q6J("ngIf",!(null!=A.SS.mySocket&&A.SS.mySocket.id)))},dependencies:[Ai.O5,ya.k,qa.lW,Ic.X2,So.Hw,Oo.Ye,Vs.gM]}),L})();var el=s(4850),ts=s(6338),Gs=s(455);function qo(L,y){1&L&&r._UZ(0,"div")}function jo(L,y){if(1&L){const h=r.EpF();r.TgZ(0,"a",12),r.NdJ("click",function(){r.CHM(h);const re=r.oxw();return r.KtG(re.forceCloseSideNav())}),r._UZ(1,"img",13),r.TgZ(2,"span",14),r._uU(3),r._UZ(4,"br"),r._uU(5),r.qZA()(),r.TgZ(6,"a",15),r.NdJ("click",function(){r.CHM(h);const re=r.oxw();return r.KtG(re.logout())}),r._UZ(7,"mat-icon",16),r.TgZ(8,"span",8),r._uU(9),r.qZA()()}if(2&L){const h=r.oxw();r.Tol(h.TRUSTED?"gradient-border":""),r.xp6(1),r.s9C("src",null==h.AS.currentUserSubject||null==h.AS.currentUserSubject.value?null:h.AS.currentUserSubject.value.image_url,r.LSH),r.xp6(1),r.Q6J("@animateText",h.linkText?"show":"hide"),r.xp6(1),r.hij(" ",null==h.AS.currentUserSubject||null==h.AS.currentUserSubject.value?null:h.AS.currentUserSubject.value.kartu_tanda_penduduk_.nama," "),r.xp6(2),r.hij(" ",null==h.AS.currentUserSubject||null==h.AS.currentUserSubject.value?null:h.AS.currentUserSubject.value._email," "),r.xp6(3),r.Q6J("@animateText",h.linkText?"show":"hide"),r.xp6(1),r.hij(" Keluar ",h.AS.logoutTimerText," ")}}function zo(L,y){if(1&L){const h=r.EpF();r.TgZ(0,"a",17),r.NdJ("click",function(){r.CHM(h);const re=r.oxw();return r.KtG(re.forceCloseSideNav())}),r._UZ(1,"mat-icon",18),r.TgZ(2,"span",8),r._uU(3,"Masuk"),r.qZA()(),r.TgZ(4,"a",19),r.NdJ("click",function(){r.CHM(h);const re=r.oxw();return r.KtG(re.forceCloseSideNav())}),r._UZ(5,"mat-icon",20),r.TgZ(6,"span",8),r._uU(7,"Daftar"),r.qZA()()}if(2&L){const h=r.oxw();r.xp6(2),r.Q6J("@animateText",h.linkText?"show":"hide"),r.xp6(4),r.Q6J("@animateText",h.linkText?"show":"hide")}}function I(L,y){if(1&L){const h=r.EpF();r.TgZ(0,"a",21),r.NdJ("click",function(){r.CHM(h);const re=r.oxw();return r.KtG(re.forceCloseSideNav())}),r._UZ(1,"mat-icon",22),r.TgZ(2,"span",8),r._uU(3),r.qZA()()}if(2&L){const h=y.$implicit,A=r.oxw();r.s9C("routerLink",h.link),r.xp6(1),r.Q6J("fontIcon",h.icon)("matBadge",h.badge),r.xp6(1),r.Q6J("@animateText",A.linkText?"show":"hide"),r.xp6(1),r.Oqu(h.name)}}function k(L,y){if(1&L){const h=r.EpF();r.TgZ(0,"a",21),r.NdJ("click",function(){r.CHM(h);const re=r.oxw();return r.KtG(re.forceCloseSideNav())}),r._UZ(1,"mat-icon",22),r.TgZ(2,"span",8),r._uU(3),r.qZA()()}if(2&L){const h=y.$implicit,A=r.oxw();r.s9C("routerLink",h.link),r.xp6(1),r.Q6J("fontIcon",h.icon)("matBadge",h.badge),r.xp6(1),r.Q6J("@animateText",A.linkText?"show":"hide"),r.xp6(1),r.Oqu(h.name)}}function S(L,y){if(1&L){const h=r.EpF();r.TgZ(0,"a",21),r.NdJ("click",function(){r.CHM(h);const re=r.oxw();return r.KtG(re.forceCloseSideNav())}),r._UZ(1,"mat-icon",22),r.TgZ(2,"span",8),r._uU(3),r.qZA()()}if(2&L){const h=y.$implicit,A=r.oxw();r.s9C("routerLink",h.link),r.xp6(1),r.Q6J("fontIcon",h.icon)("matBadge",h.badge),r.xp6(1),r.Q6J("@animateText",A.linkText?"show":"hide"),r.xp6(1),r.Oqu(h.name)}}function J(L,y){if(1&L){const h=r.EpF();r.TgZ(0,"a",21),r.NdJ("click",function(){r.CHM(h);const re=r.oxw();return r.KtG(re.forceCloseSideNav())}),r._UZ(1,"mat-icon",22),r.TgZ(2,"span",8),r._uU(3),r.qZA()()}if(2&L){const h=y.$implicit,A=r.oxw();r.s9C("routerLink",h.link),r.xp6(1),r.Q6J("fontIcon",h.icon)("matBadge",h.badge),r.xp6(1),r.Q6J("@animateText",A.linkText?"show":"hide"),r.xp6(1),r.Oqu(h.name)}}function pe(L,y){if(1&L){const h=r.EpF();r.TgZ(0,"a",21),r.NdJ("click",function(){r.CHM(h);const re=r.oxw();return r.KtG(re.forceCloseSideNav())}),r._UZ(1,"mat-icon",22),r.TgZ(2,"span",8),r._uU(3),r.qZA()()}if(2&L){const h=y.$implicit,A=r.oxw();r.s9C("routerLink",h.link),r.xp6(1),r.Q6J("fontIcon",h.icon)("matBadge",h.badge),r.xp6(1),r.Q6J("@animateText",A.linkText?"show":"hide"),r.xp6(1),r.Oqu(h.name)}}const Ge=function(L){return{"overflow-y":L,"overflow-x":"hidden"}};let mt=(()=>{class L{constructor(h,A,re,Se,ht,yt){this.router=h,this.lms=A,this.as=re,this.gs=Se,this.ds=ht,this.ls=yt,this.subsDialog=null}get AS(){return this.as}get GS(){return this.gs}get mainMenus(){return this.lms.mainMenus}get contentMenus(){return this.lms.contentMenus}get additionalMenus(){return this.lms.additionalMenus}get miscMenus(){return this.lms.miscMenus}get otherMenus(){return this.lms.otherMenus}get TRUSTED(){return!!this.as.currentUserSubject?.value&&(this.as.currentUserSubject.value.role===bi.yS.ADMIN||this.as.currentUserSubject.value.role===bi.yS.MODERATOR||this.as.currentUserSubject.value.role===bi.yS.FANSUBBER)}ngOnDestroy(){this.subsDialog?.unsubscribe()}ngOnInit(){}get sideNavExpanded(){return this.lms.sideNavExpanded}get linkText(){return this.lms.linkText}onMouseHoverIn(){this.gs.isDesktop&&this.lms.onMouseHoverIn()}onMouseHoverOut(){this.gs.isDesktop&&this.lms.onMouseHoverOut()}forceCloseSideNav(){this.lms.forceCloseSideNav()}logout(){this.as.logout()}openDocumentation(){this.forceCloseSideNav(),this.router.navigateByUrl("/docs")}openWebTorrent(){this.forceCloseSideNav(),this.gs.isDesktop?this.router.navigateByUrl("/torrent"):this.subsDialog=this.ds.openInfoDialog({data:{title:".: Web-Torrent :.",htmlMessage:"Fitur Ini Tergolong Cukup Berat Karena Dikhususkan Untuk Pengguna Desktop, Akan Ada Kemungkinan Juga Tampilan Menjadi Berantakan, Yakin Ingin Melanjutkan ?",confirmText:"Ya, Lanjutkan",cancelText:"Tidak, Batal"},disableClose:!1}).afterClosed().subscribe({next:h=>{this.gs.log("[INFO_DIALOG_CLOSED]",h),!0===h&&this.router.navigateByUrl("/torrent"),this.subsDialog.unsubscribe()}})}toggleDebugLog(h){this.gs.forceEnableDebugLog=h.checked,this.ls.setItem(this.gs.localStorageKeys.DebugLogs,JSON.stringify(h.checked))}}return L.\u0275fac=function(h){return new(h||L)(r.Y36(gi.F0),r.Y36(oo.S),r.Y36(Bs.e),r.Y36(li.U),r.Y36(ao.x),r.Y36(zs.n))},L.\u0275cmp=r.Xpm({type:L,selectors:[["app-left-menu"]],decls:33,vars:15,consts:[[1,"sidenav_container",3,"ngStyle","mouseenter","mouseleave"],[4,"ngIf","ngIfThen","ngIfElse"],["sudahLogin",""],["belumLogin",""],[2,"margin-top","8px"],["mat-list-item","","routerLinkActive","side-menu-link-active",3,"routerLink","click",4,"ngFor","ngForOf"],["mat-list-item","","routerLinkActive","side-menu-link-active",3,"click"],["fontIcon","sailing",2,"padding-left","0.2em"],[2,"padding-left","1.75em","padding-right","0.2em"],["fontIcon","settings_ethernet",2,"padding-left","0.2em"],[2,"right","1em !important","position","absolute"],[3,"ngModel","ngModelChange","click","change"],["mat-list-item","","routerLink","/user","routerLinkActive","side-menu-link-active",3,"click"],[1,"jim",3,"src"],[1,"text-truncate",2,"padding-left","1.2em","padding-right","0.2em"],["mat-list-item","",3,"click"],["fontIcon","power_settings_new",2,"padding-left","0.2em"],["mat-list-item","","routerLink","/login","routerLinkActive","side-menu-link-active",3,"click"],["fontIcon","login",2,"padding-left","0.2em"],["mat-list-item","","routerLink","/register","routerLinkActive","side-menu-link-active",3,"click"],["fontIcon","group_add",2,"padding-left","0.2em"],["mat-list-item","","routerLinkActive","side-menu-link-active",3,"routerLink","click"],["matBadgeColor","warn","matBadgePosition","before",2,"padding-left","0.2em",3,"fontIcon","matBadge"]],template:function(h,A){if(1&h&&(r.TgZ(0,"div",0),r.NdJ("mouseenter",function(){return A.onMouseHoverIn()})("mouseleave",function(){return A.onMouseHoverOut()}),r.TgZ(1,"mat-nav-list"),r.YNc(2,qo,1,0,"div",1),r.YNc(3,jo,10,9,"ng-template",null,2,r.W1O),r.YNc(5,zo,8,2,"ng-template",null,3,r.W1O),r.qZA(),r._UZ(7,"mat-divider",4),r.TgZ(8,"mat-nav-list"),r.YNc(9,I,4,5,"a",5),r.qZA(),r._UZ(10,"mat-divider",4),r.TgZ(11,"mat-nav-list"),r.YNc(12,k,4,5,"a",5),r.qZA(),r._UZ(13,"mat-divider",4),r.TgZ(14,"mat-nav-list"),r.YNc(15,S,4,5,"a",5),r.qZA(),r._UZ(16,"mat-divider",4),r.TgZ(17,"mat-nav-list")(18,"a",6),r.NdJ("click",function(){return A.openWebTorrent()}),r._UZ(19,"mat-icon",7),r.TgZ(20,"span",8),r._uU(21,"Web Torrent"),r.qZA()(),r.YNc(22,J,4,5,"a",5),r.qZA(),r._UZ(23,"mat-divider",4),r.TgZ(24,"mat-nav-list"),r.YNc(25,pe,4,5,"a",5),r.TgZ(26,"a",6),r.NdJ("click",function(){return A.openDocumentation()}),r._UZ(27,"mat-icon",9),r.TgZ(28,"span",8),r._uU(29," Dev. Mode "),r.TgZ(30,"span",10)(31,"mat-slide-toggle",11),r.NdJ("ngModelChange",function(Se){return A.GS.forceEnableDebugLog=Se})("click",function(Se){return Se.stopPropagation()})("change",function(Se){return A.toggleDebugLog(Se)}),r.qZA()()()()(),r._UZ(32,"div",4),r.qZA()),2&h){const re=r.MAs(4),Se=r.MAs(6);r.Q6J("@onSideNavChange",A.sideNavExpanded?"open":"close")("ngStyle",r.VKq(13,Ge,A.sideNavExpanded?"auto":"hidden")),r.xp6(2),r.Q6J("ngIf",null==A.AS.currentUserSubject?null:A.AS.currentUserSubject.value)("ngIfThen",re)("ngIfElse",Se),r.xp6(7),r.Q6J("ngForOf",A.mainMenus),r.xp6(3),r.Q6J("ngForOf",A.contentMenus),r.xp6(3),r.Q6J("ngForOf",A.additionalMenus),r.xp6(5),r.Q6J("@animateText",A.linkText?"show":"hide"),r.xp6(2),r.Q6J("ngForOf",A.miscMenus),r.xp6(3),r.Q6J("ngForOf",A.otherMenus),r.xp6(3),r.Q6J("@animateText",A.linkText?"show":"hide"),r.xp6(3),r.Q6J("ngModel",A.GS.forceEnableDebugLog)}},dependencies:[Ai.sg,Ai.O5,Ai.PC,gi.yS,gi.Od,ya.k,el.d,So.Hw,ts.Hk,ts.Tg,Gs.Rr,Xi.JJ,Xi.On],styles:[".sidenav_container[_ngcontent-%COMP%]{min-width:64px!important;max-width:320px;height:calc(100vh - 88px)}.jim[_ngcontent-%COMP%]{width:32px;height:32px;object-fit:cover;border-radius:50%}.side-menu-link-active[_ngcontent-%COMP%]{background:rgba(255,64,129,.15);color:#ff4081!important;font-weight:700}.mat-list-item-content[_ngcontent-%COMP%]{padding:0!important}"],data:{animation:[va,Ho]}}),L})();function At(L,y){1&L&&r.GkF(0,4)}let Xt=(()=>{class L{constructor(h,A){this.rps=h,this.gs=A}get RPS(){return this.rps}ngOnInit(){}}return L.\u0275fac=function(h){return new(h||L)(r.Y36(Ws.C),r.Y36(li.U))},L.\u0275cmp=r.Xpm({type:L,selectors:[["app-right-panel"]],decls:4,vars:1,consts:[[1,"sidepanel_container","p-3"],[1,"row"],[1,"col-12"],["ngIf","rps.component",4,"ngComponentOutlet"],["ngIf","rps.component"]],template:function(h,A){1&h&&(r.TgZ(0,"div",0)(1,"div",1)(2,"div",2),r.YNc(3,At,1,0,"ng-container",3),r.qZA()()()),2&h&&(r.xp6(3),r.Q6J("ngComponentOutlet",A.RPS.componentView))},dependencies:[Ai.$G,Ai.O5],styles:[".sidepanel_container[_ngcontent-%COMP%]{max-width:320px}.mat-list-item-content[_ngcontent-%COMP%]{padding:0!important}"]}),L})(),Dn=(()=>{class L{constructor(h,A){this.fs=h,this.gs=A}ngOnInit(){}get isHidden(){return this.fs.isHidden}get tooltipText(){return this.fs.tooltipText}get backgroundImage(){return this.fs.backgroundImage}get backgroundIcon(){return this.fs.backgroundIcon}buttonClicked(){this.fs.buttonClicked()}}return L.\u0275fac=function(h){return new(h||L)(r.Y36(Ns.r),r.Y36(li.U))},L.\u0275cmp=r.Xpm({type:L,selectors:[["app-material-fab"]],decls:2,vars:6,consts:[["type","button","mat-fab","","color","warn",1,"me-3","mb-5","fab-button","animate__animated","animate__bounce","animate__infinite","animate__slow",3,"matTooltip","click"],[3,"fontIcon"]],template:function(h,A){1&h&&(r.TgZ(0,"button",0),r.NdJ("click",function(){return A.buttonClicked()}),r._UZ(1,"mat-icon",1),r.qZA()),2&h&&(r.Udp("display",A.isHidden?"none":"")("background-image",A.backgroundImage?"url("+A.backgroundImage+")":""),r.s9C("matTooltip",A.tooltipText),r.xp6(1),r.Q6J("fontIcon",A.backgroundIcon))},dependencies:[qa.lW,So.Hw,Vs.gM],styles:[".fab-button[_ngcontent-%COMP%]{z-index:9999;position:fixed;bottom:0;right:0;background-size:contain;background-position:center}"]}),L})();function ci(L,y){1&L&&r.GkF(0)}function Fn(L,y){if(1&L&&(r.ynx(0),r._uU(1),r.BQk()),2&L){const h=r.oxw(2).$implicit;r.xp6(1),r.Oqu(h.label)}}const ji=function(L){return{"xng-breadcrumb-link-disabled":L}},jr=function(L,y,h,A,re,Se){return{$implicit:L,info:y,last:h,first:A,index:re,count:Se}};function $s(L,y){if(1&L&&(r.TgZ(0,"a",7),r.YNc(1,ci,1,0,"ng-container",8),r.YNc(2,Fn,2,1,"ng-container",9),r.qZA()),2&L){const h=r.oxw(),A=h.$implicit,re=h.last,Se=h.first,ht=h.index,yt=h.count,Wt=r.oxw();r.Q6J("ngClass",r.VKq(10,ji,A.disable))("routerLink",A.routeInterceptor?A.routeInterceptor(A.routeLink,A):A.routeLink)("queryParams",Wt.preserveQueryParams?A.queryParams:void 0)("fragment",Wt.preserveFragment?A.fragment:void 0)("target",Wt.anchorTarget?Wt.anchorTarget:"_self"),r.uIk("aria-disabled",A.disable)("tabIndex",A.disable?-1:0),r.xp6(1),r.Q6J("ngTemplateOutlet",Wt.itemTemplate)("ngTemplateOutletContext",r.HTZ(12,jr,A.label,A.info,re,Se,ht,yt)),r.xp6(1),r.Q6J("ngIf",!Wt.itemTemplate)}}function lo(L,y){1&L&&r.GkF(0)}function As(L,y){if(1&L&&(r.ynx(0),r._uU(1),r.BQk()),2&L){const h=r.oxw(2).$implicit;r.xp6(1),r.Oqu(h.label)}}function Wo(L,y){if(1&L&&(r.TgZ(0,"label",10),r.YNc(1,lo,1,0,"ng-container",8),r.YNc(2,As,2,1,"ng-container",9),r.qZA()),2&L){const h=r.oxw(),A=h.$implicit,re=h.last,Se=h.first,ht=h.index,yt=h.count,Wt=r.oxw();r.xp6(1),r.Q6J("ngTemplateOutlet",Wt.itemTemplate)("ngTemplateOutletContext",r.HTZ(3,jr,A.label,A.info,re,Se,ht,yt)),r.xp6(1),r.Q6J("ngIf",!Wt.itemTemplate)}}function to(L,y){1&L&&r.GkF(0)}function kl(L,y){if(1&L&&(r.ynx(0),r._uU(1),r.BQk()),2&L){const h=r.oxw(3);r.xp6(1),r.Oqu(h.separator)}}function Xo(L,y){if(1&L&&(r.TgZ(0,"li",11),r.YNc(1,to,1,0,"ng-container",12),r.YNc(2,kl,2,1,"ng-container",9),r.qZA()),2&L){const h=r.oxw(2);r.xp6(1),r.Q6J("ngTemplateOutlet",h.separatorTemplate),r.xp6(1),r.Q6J("ngIf",!h.separatorTemplate)}}function tl(L,y){if(1&L&&(r.ynx(0),r.TgZ(1,"li",3),r.YNc(2,$s,3,19,"a",4),r.YNc(3,Wo,3,10,"label",5),r.qZA(),r.YNc(4,Xo,3,2,"li",6),r.BQk()),2&L){const h=y.last;r.xp6(2),r.Q6J("ngIf",!h),r.xp6(1),r.Q6J("ngIf",h),r.xp6(1),r.Q6J("ngIf",!h)}}let ba=(()=>{class L{}return L.\u0275fac=function(h){return new(h||L)},L.\u0275dir=r.lG2({type:L,selectors:[["","xngBreadcrumbItem",""]]}),L})();const Fl=L=>L&&Object.keys(L).length>0;let Ll=(()=>{class L{constructor(h,A){this.activatedRoute=h,this.router=A,this.baseHref="/",this.dynamicBreadcrumbStore=[],this.currentBreadcrumbs=[],this.previousBreadcrumbs=[],this.breadcrumbs=new Mt.X([]),this.breadcrumbs$=this.breadcrumbs.asObservable(),this.detectRouteChanges()}detectRouteChanges(){this.setupBreadcrumbs(this.activatedRoute.snapshot),this.router.events.pipe((0,o.h)(h=>h instanceof gi.c9)).subscribe(h=>{h instanceof gi.c9&&h.shouldActivate&&this.setupBreadcrumbs(h.state.root)})}setupBreadcrumbs(h){this.previousBreadcrumbs=this.currentBreadcrumbs;const A=this.getRootBreadcrumb();this.currentBreadcrumbs=A?[A]:[],this.prepareBreadcrumbList(h,this.baseHref)}getRootBreadcrumb(){const h=this.router.config.find(Se=>""===Se.path),A=this.extractObject(h?.data?.breadcrumb),re=this.getFromStore(A.alias,"/");if(Fl(A)||Fl(re))return{...re,...A,routeLink:this.baseHref,...this.getQueryParamsFromPreviousList("/")}}prepareBreadcrumbItem(h,A){const{path:re,breadcrumb:Se}=this.parseRouteData(h.routeConfig),ht=this.resolvePathSegment(re,h),yt=`${A}${ht}`,Wt=this.getFromStore(Se.alias,yt),tn=this.extractLabel(Wt?.label||Se?.label,ht);let En=!1,On="";return tn||(En=!0,On=ht),{...Wt,...Se,label:En?On:tn,routeLink:yt,isAutoGeneratedLabel:En,...this.getQueryParamsFromPreviousList(yt)}}prepareBreadcrumbList(h,A){if(h.routeConfig?.path){const ht=this.prepareBreadcrumbItem(h,A);if(this.currentBreadcrumbs.push(ht),h.firstChild)return this.prepareBreadcrumbList(h.firstChild,ht.routeLink+"/")}else if(h.firstChild)return this.prepareBreadcrumbList(h.firstChild,A);this.setQueryParamsForActiveBreadcrumb(this.currentBreadcrumbs[this.currentBreadcrumbs.length-1],h);const Se=this.currentBreadcrumbs.filter(ht=>!ht.skip);this.breadcrumbs.next(Se)}getFromStore(h,A){return this.dynamicBreadcrumbStore.find(re=>h&&h===re.alias||A&&A===re.routeLink||this.matchRegex(A,re.routeRegex))}matchRegex(h,A){return h.match(new RegExp(A))?.[0]===h}resolvePathSegment(h,A){return h.includes(":")&&Object.entries(A.params).forEach(([re,Se])=>{h=h.replace(`:${re}`,`${Se}`)}),h}getQueryParamsFromPreviousList(h){const{queryParams:A,fragment:re}=this.previousBreadcrumbs.find(Se=>Se.routeLink===h)||{};return{queryParams:A,fragment:re}}setQueryParamsForActiveBreadcrumb(h,A){if(h){const{queryParams:re,fragment:Se}=A;h.queryParams=re?{...re}:void 0,h.fragment=Se}}parseRouteData(h){const{path:A,data:re}=h;return{path:A,breadcrumb:this.mergeWithBaseChildData(h,re?.breadcrumb)}}mergeWithBaseChildData(h,A){if(!h)return this.extractObject(A);let re;h.loadChildren?re=h._loadedRoutes.find(ht=>""===ht.path):h.children&&(re=h.children.find(ht=>""===ht.path));const Se=re?.data?.breadcrumb;return Se?this.mergeWithBaseChildData(re,{...this.extractObject(A),...this.extractObject(Se)}):this.extractObject(A)}set(h,A){const re=this.extractObject(A);let Se;Se=h.startsWith("@")?["alias",{...re,alias:h.slice(1)}]:h.includes(":")?["routeRegex",{...re,routeRegex:this.buildRegex(h)}]:["routeLink",{...re,routeLink:this.ensureLeadingSlash(h)}],Se[1].isAutoGeneratedLabel=!1,this.updateStore(...Se),this.updateCurrentBreadcrumbs(...Se)}updateStore(h,A){const re=this.dynamicBreadcrumbStore.findIndex(Se=>A[h]===Se[h]);re>-1?this.dynamicBreadcrumbStore[re]={...this.dynamicBreadcrumbStore[re],...A}:this.dynamicBreadcrumbStore.push({...A})}updateCurrentBreadcrumbs(h,A){const re=this.currentBreadcrumbs.findIndex(Se=>"routeRegex"===h?this.matchRegex(Se.routeLink,A[h]):A[h]===Se[h]);if(re>-1){this.currentBreadcrumbs[re]={...this.currentBreadcrumbs[re],...A};const Se=this.currentBreadcrumbs.filter(ht=>!ht.skip);this.breadcrumbs.next([...Se])}}buildRegex(h){return this.ensureLeadingSlash(h).replace(new RegExp("/:[^/]+","g"),"/[^/]+")}ensureLeadingSlash(h){return h.startsWith("/")?h:`/${h}`}extractLabel(h,A){const re="object"==typeof h?h.label:h;return"function"==typeof re?re(A):re}extractObject(h){return!h||"string"!=typeof h&&"function"!=typeof h?h||{}:{label:h}}}return L.\u0275fac=function(h){return new(h||L)(r.LFG(gi.gz),r.LFG(gi.F0))},L.\u0275prov=r.Yz7({token:L,factory:L.\u0275fac,providedIn:"root"}),L})(),ea=(()=>{class L{constructor(h,A){this.breadcrumbService=h,this._separator="/",this.autoGenerate=!0,this.preserveQueryParams=!0,this.preserveFragment=!0,this.class="",this.setupMessage="not set up yet",this.someParameterValue=null,A.params.subscribe(re=>{this.setupComponent(re.someParam)})}set separator(h){h instanceof r.Rgc?(this.separatorTemplate=h,this._separator=void 0):(this.separatorTemplate=void 0,this._separator=h||"/")}get separator(){return this._separator}setupComponent(h){this.setupMessage="set up at "+new Date,this.someParameterValue=h}ngOnInit(){this.breadcrumbs$=this.breadcrumbService.breadcrumbs$.pipe((0,W.U)(h=>h.filter(A=>!!this.autoGenerate||!A.isAutoGeneratedLabel).map(A=>{const{routeInterceptor:re,routeLink:Se}=A;return{...A,routeLink:re?.(Se,A)||Se}})))}}return L.\u0275fac=function(h){return new(h||L)(r.Y36(Ll),r.Y36(gi.gz))},L.\u0275cmp=r.Xpm({type:L,selectors:[["xng-breadcrumb"]],contentQueries:function(h,A,re){if(1&h&&r.Suo(re,ba,5,r.Rgc),2&h){let Se;r.iGM(Se=r.CRH())&&(A.itemTemplate=Se.first)}},inputs:{autoGenerate:"autoGenerate",preserveQueryParams:"preserveQueryParams",preserveFragment:"preserveFragment",class:"class",anchorTarget:"anchorTarget",separator:"separator"},decls:4,vars:4,consts:[["aria-label","breadcrumb",1,"xng-breadcrumb-root",3,"ngClass"],[1,"xng-breadcrumb-list"],[4,"ngFor","ngForOf"],[1,"xng-breadcrumb-item"],["class","xng-breadcrumb-link","role","button","rel","noopener noreferrer",3,"ngClass","routerLink","queryParams","fragment","target",4,"ngIf"],["class","xng-breadcrumb-trail",4,"ngIf"],["class","xng-breadcrumb-separator","aria-hidden","true",4,"ngIf"],["role","button","rel","noopener noreferrer",1,"xng-breadcrumb-link",3,"ngClass","routerLink","queryParams","fragment","target"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngIf"],[1,"xng-breadcrumb-trail"],["aria-hidden","true",1,"xng-breadcrumb-separator"],[4,"ngTemplateOutlet"]],template:function(h,A){1&h&&(r.TgZ(0,"nav",0)(1,"ol",1),r.YNc(2,tl,5,3,"ng-container",2),r.ALo(3,"async"),r.qZA()()),2&h&&(r.Q6J("ngClass",A.class),r.xp6(2),r.Q6J("ngForOf",r.lcZ(3,2,A.breadcrumbs$)))},dependencies:[Ai.mk,Ai.sg,Ai.O5,Ai.tP,gi.yS,Ai.Ov],styles:[".xng-breadcrumb-root{margin:0;color:#0009}.xng-breadcrumb-list{display:flex;align-items:center;flex-wrap:wrap;margin:0;padding:0}.xng-breadcrumb-item{list-style:none}.xng-breadcrumb-trail{display:flex;align-items:center;color:#000000e6}.xng-breadcrumb-link{display:flex;align-items:center;white-space:nowrap;color:inherit;text-decoration:none;transition:-webkit-text-decoration .3s;transition:text-decoration .3s;transition:text-decoration .3s,-webkit-text-decoration .3s;cursor:pointer}.xng-breadcrumb-link:hover{text-decoration:underline}.xng-breadcrumb-link-disabled{pointer-events:none;cursor:disabled}.xng-breadcrumb-separator{display:flex;-webkit-user-select:none;user-select:none;margin-left:8px;margin-right:8px}\n"],encapsulation:2}),L})(),Go=(()=>{class L{}return L.\u0275fac=function(h){return new(h||L)},L.\u0275mod=r.oAB({type:L}),L.\u0275inj=r.cJS({imports:[Ai.ez,gi.Bz]}),L})(),Pc=(()=>{class L{constructor(h,A,re){this.gs=h,this.ss=A,this.wb=re}get SS(){return this.ss}ngOnInit(){}get discordUrl(){return Ui.N.discord.join_url}get author(){return Ui.N.author}get siteName(){return Ui.N.siteName}openGithub(){this.wb.winboxOpenUri(`https://github.com/${this.author}/${this.siteName}`)}}return L.\u0275fac=function(h){return new(h||L)(r.Y36(li.U),r.Y36(er.R),r.Y36(eo.N))},L.\u0275cmp=r.Xpm({type:L,selectors:[["app-footer"]],decls:14,vars:6,consts:[["color","primary",2,"height","32px","padding","0 12px"],[2,"font-size","small"],[2,"text-decoration","none","color","whitesmoke","cursor","pointer",3,"click"],[2,"display","inline-block","transform","rotateY(180deg)"],[2,"display","inline-block"],[1,"spacer","px-1"],["target","_blank",2,"text-decoration","none","color","whitesmoke",3,"href"]],template:function(h,A){1&h&&(r.TgZ(0,"mat-toolbar",0)(1,"span",1)(2,"div",2),r.NdJ("click",function(){return A.openGithub()}),r.TgZ(3,"div",3),r._uU(4,"\xa9"),r.qZA(),r.TgZ(5,"div",4),r._uU(6),r.ALo(7,"slice"),r.qZA()()(),r._UZ(8,"span",5)(9,"xng-breadcrumb")(10,"span",5),r.TgZ(11,"span",1)(12,"a",6),r._uU(13," With \u{1f498} Just For You~ "),r.qZA()()()),2&h&&(r.xp6(6),r.hij("\xa0 2013 | ",r.Dn7(7,2,null==A.SS.github?null:A.SS.github.sha,0,7),""),r.xp6(6),r.s9C("href",A.discordUrl,r.LSH))},dependencies:[Oo.Ye,ea,Ai.OU]}),L})();const wr=["leftSideNav"],Bl=["rightSidePanel"],Nl=["siteContent"],Da=function(L){return{"background-image":L}};let ta=(()=>{class L{constructor(h,A,re,Se,ht,yt,Wt,tn,En,On,pi,fi,Qn,ti,Gi,$i,Or){this.snackBar=h,this.renderer=A,this.router=re,this.activatedRoute=Se,this.bs=ht,this.pi=yt,this.as=Wt,this.fs=tn,this.ls=En,this.gs=On,this.lms=pi,this.rps=fi,this.ss=Qn,this.wb=ti,this.ds=Gi,this.sw=$i,this.viewer=Or,this.subsRouter=null,this.subsRouterChild=null,this.subsUrl=null,this.subsVerify=null,this.subsDialog=null,this.timedOut=null}get sideNavType(){return this.gs.isDesktop?"side":"over"}onResize(h){this.gs.onResize(h)}get ROUTER(){return this.router}get GS(){return this.gs}get LMS(){return this.lms}get RPS(){return this.rps}ngOnDestroy(){this.subsRouter?.unsubscribe(),this.subsRouterChild?.unsubscribe(),this.subsUrl?.unsubscribe(),this.subsVerify?.unsubscribe(),this.subsDialog?.unsubscribe(),this.timedOut&&(clearTimeout(this.timedOut),this.timedOut=null)}ngAfterViewInit(){if(this.lms.sideNav=this.leftSideNav,this.rps.sidePanel=this.rightSidePanel,this.gs.isBrowser){const h=this.renderer.selectRootElement("#app-loading");h&&(h.style.visibility="hidden",h.style.opacity=0)}}ngOnInit(){var h=this;this.gs.log(`[APP_BUILD_STATUS] \u{1f498} ${Ui.N.siteName} :: ${Ui.N.production?"Production":"Development"} With Logging Enabled \u{1f4cc}`),this.gs.log(`[SERVICE_WORKER_STATUS] \u{1f498} isEnabled :: ${this.sw.swEnabled} \u{1f4cc}`),this.pi.updatePageMetaData(`\u300c\u{1f4a4} ${Ui.N.siteName}\u300d`,`\u300c\u2728 ${Ui.N.siteDescription}\u300d`,`\u300c\u{1f4a4} ${Ui.N.siteName} \u2728\u{1f31e}\u300d`,`${Ui.N.baseUrl}/assets/img/favicon.png`),this.subsRouter=this.router.events.subscribe({next:A=>{if(A instanceof gi.xV)this.gs.isBrowser&&this.bs.busy();else if(A instanceof gi.GH)this.gs.isBrowser&&this.bs.idle();else if(A instanceof gi.OD){if(this.gs.isBrowser&&A.url){const re=A.url.split("/")[1];if(re){const Se=`badge${re[0].toUpperCase()}${re.slice(1)}`;if(this.ss[Se]){this.ss[Se]=[];const ht=this.lms.mainMenus.find(tn=>tn.link===A.url),yt=this.lms.contentMenus.find(tn=>tn.link===A.url),Wt=this.lms.miscMenus.find(tn=>tn.link===A.url);ht&&(ht.badge=null),yt&&(yt.badge=null),Wt&&(Wt.badge=null)}}this.gs.previousUrl=this.router.url.split("?")[0]}}else if(A instanceof gi.m2){let re=this.activatedRoute.firstChild;for(const Se of re.children)re=Se;this.subsRouterChild=re.data.subscribe({next:Se=>{if(this.updateBackgroundImage(),this.gs.routerData=Se,this.pi.updatePageMetaData(Se.title,Se.description,Se.keywords,this.gs.bgImgUrl||`${Ui.N.baseUrl}/assets/img/favicon.png`),this.fs.removeFab(),this.gs.isBrowser){this.siteContent&&(this.siteContent.elementRef.nativeElement.scrollTop=0);const ht=A.url.split("?")[0];this.gs.previousUrl!==ht&&(this.ss.currentChatRoom=[]),this.ss.socketLeaveAndJoinNewRoom(this.gs.previousUrl,ht)}}})}}}),this.gs.isBrowser&&(this.checkStorage(),this.windowRightClick=this.onWindowRightClick,this.windowLeftClick=this.onWindowLeftClick,this.windowDoubleClick=this.onWindowDoubleClick,this.windowBeforeUnloaded=this.onWindowBeforeUnloaded,this.timedOut=setTimeout((0,_a.Z)(function*(){if("true"!==h.ls.getItem(h.gs.localStorageKeys.AturanTatib)){const re={id:"ATURAN-TATA-TERTIB",data:{title:"Aturan Dan Tata Tertib Komunitas",htmlMessage:"Gagal Memuat Aturan Dan Tata Tertib Komunitas",confirmText:"Ok, Saya Mengerti!",cancelText:null},disableClose:!1,maxWidth:h.ds.maxWidth};h.subsDialog=(yield h.ds.fetchInformationRegisterMode(re)).afterClosed().subscribe({next:Se=>{h.gs.log("[ATURAN_TATA_TERTIB_DIALOG_CLOSED]",Se),"boolean"==typeof Se&&h.ls.setItem(h.gs.localStorageKeys.AturanTatib,JSON.stringify(Se)),h.subsDialog.unsubscribe()}})}h.injectServerTimeClock(),h.gs.weatherEffect&&h.snackBar.open("Gunakan Menu Di Kanan Atas (Gambar Bunga) Untuk Mematikan Animasi Efek Musiman!","Ok")}),1234))}updateBackgroundImage(){const h=this.router.url.split("?")[0].substring(1).split("/")[0];this.gs.bgImgUrlPath=h?`/assets/img/router/${h}.png`:""}checkStorage(){this.bs.busy(),this.subsVerify=this.as.verify(this.as.token).subscribe({next:h=>{this.gs.log("[VERIFY_SUCCESS]",h),this.ss.socketLeaveAndJoinNewRoom(this.gs.previousUrl,this.router.url.split("?")[0]),this.bs.idle()},error:h=>{this.gs.log("[VERIFY_ERROR]",h,"error"),this.bs.idle(),this.as.removeUser()}})}resetLoading(){this.bs.clear()}onWindowRightClick(h){this.gs.log("[MOUSE_RIGHT_CLICK]",h)}onWindowLeftClick(h){this.gs.log("[MOUSE_LEFT_CLICK]",h);const A=h||window.event;let re=A.target||A.srcElement;if(re){let Se=5;const ht=["A","a"];for(;![...ht].includes(re.tagName)&&Se>0;)if(re=re.parentElement||re.parentNode,Se--,!re)return!0;if(ht.includes(re.tagName)){const yt=re.getAttribute("href");if(yt&&this.gs.isDesktop&&this.gs.includesOneOf(yt,["http","ftp","mailto"])&&!yt.includes(Ui.N.baseUrl))return A.preventDefault(),A.stopPropagation(),this.winboxOpenUri(yt),!1}}return!0}onWindowDoubleClick(h){this.gs.log("[MOUSE_DOUBLE_CLICK]",h);const A=h||window.event,re=A.target||A.srcElement;("IMG"===re.tagName||"img"===re.tagName)&&this.gs.isDesktop&&this.viewer.viewImage(re)}onWindowBeforeUnloaded(h){this.as.token&&(this.gs.log("[BROWSER_EXIT_CLOSE_SAVE_JWT]",this.as.token),this.ls.setItem(this.gs.localStorageKeys.Token,this.as.token))}winboxOpenUri(h){this.wb.winboxOpenUri(h)}injectServerTimeClock(){if(this.gs.isDesktop){const h=this.gs.document.getElementsByClassName("mat-drawer-backdrop");if(h.length>0){h[0].innerHTML='\n
\n
\n

~ Kalender (\uff61>\ufe4f<\uff61) Server ~

\n

\n

\n
\n
\n ';const re=this.gs.document.createElement("script");re.type="text/javascript",re.textContent="\n function runCalendar() {\n const calendar = new Date();\n const serverTime = document.getElementById('serverTime');\n serverTime.innerHTML = calendar.toLocaleTimeString('ja-JP', {\n timeZone: 'Asia/Tokyo',\n timeZoneName: 'longGeneric'\n });\n const serverDate = document.getElementById('serverDate');\n serverDate.innerHTML = calendar.toLocaleDateString('id-ID', {\n weekday: 'long',\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n timeZone: 'Asia/Tokyo'\n });\n setTimeout(runCalendar, 1000);\n }\n runCalendar();\n ",this.gs.document.head.appendChild(re)}}}}return L.\u0275fac=function(h){return new(h||L)(r.Y36(us.ux),r.Y36(r.Qsj),r.Y36(gi.F0),r.Y36(gi.gz),r.Y36(_i.z),r.Y36(Ao.Z),r.Y36(Bs.e),r.Y36(Ns.r),r.Y36(zs.n),r.Y36(li.U),r.Y36(oo.S),r.Y36(Ws.C),r.Y36(er.R),r.Y36(eo.N),r.Y36(ao.x),r.Y36(To.H),r.Y36(Ja))},L.\u0275cmp=r.Xpm({type:L,selectors:[["app-root"]],viewQuery:function(h,A){if(1&h&&(r.Gf(wr,7),r.Gf(Bl,7),r.Gf(Nl,7)),2&h){let re;r.iGM(re=r.CRH())&&(A.leftSideNav=re.first),r.iGM(re=r.CRH())&&(A.rightSidePanel=re.first),r.iGM(re=r.CRH())&&(A.siteContent=re.first)}},hostBindings:function(h,A){1&h&&r.NdJ("contextmenu",function(Se){return A.windowRightClick(Se)},!1,r.Jf7)("click",function(Se){return A.windowLeftClick(Se)},!1,r.Jf7)("dblclick",function(Se){return A.windowDoubleClick(Se)},!1,r.Jf7)("beforeunload",function(Se){return A.windowBeforeUnloaded(Se)},!1,r.Jf7)("resize",function(Se){return A.onResize(Se)},!1,r.Jf7)},decls:24,vars:27,consts:[[3,"color","fixed","meteor","thick"],[1,"sidenav-container",3,"hasBackdrop"],["disableClose","",2,"background-position","bottom center","background-size","128px","background-repeat","no-repeat",3,"mode","opened","ngStyle"],["leftSideNav",""],["position","end",1,"bg-bifeldy",2,"background-position","bottom center","background-size","128px","background-repeat","no-repeat",3,"mode","opened","ngStyle","closedStart"],["rightSidePanel",""],["siteContent",""],[1,"main_content"],[3,"bdColor","type","size","color"],[1,"text-light","text-center"],[1,"text-info","text-decoration-none",3,"click"],[2,"cursor","pointer"]],template:function(h,A){if(1&h&&(r._UZ(0,"app-header")(1,"ng-progress",0),r.TgZ(2,"mat-sidenav-container",1)(3,"mat-sidenav",2,3),r._UZ(5,"app-left-menu"),r.qZA(),r.TgZ(6,"mat-sidenav",4,5),r.NdJ("closedStart",function(){return A.RPS.onClose()}),r._UZ(8,"app-right-panel"),r.qZA(),r.TgZ(9,"mat-sidenav-content",null,6)(11,"div",7),r._UZ(12,"router-outlet"),r.qZA(),r._UZ(13,"app-material-fab"),r.qZA()(),r._UZ(14,"app-footer"),r.TgZ(15,"ngx-spinner",8)(16,"p",9),r._uU(17," Sedang Memuat Data ^_^ "),r._UZ(18,"br"),r._uU(19," Mohon Menunggu ... "),r._UZ(20,"br"),r.TgZ(21,"span",10),r.NdJ("click",function(){return A.resetLoading()}),r.TgZ(22,"b",11),r._uU(23,"Batalkan"),r.qZA()()()()),2&h){const re=r.MAs(7);r.xp6(1),r.Q6J("color","#ff4081")("fixed",!1)("meteor",!1)("thick",!0),r.xp6(1),r.Q6J("hasBackdrop",A.LMS.sideNavExpanded||re.isOpen),r.xp6(1),r.Q6J("mode",A.sideNavType)("opened",A.LMS.opened)("ngStyle",r.VKq(23,Da,"url("+A.GS.leftMenuImage+")")),r.xp6(3),r.Q6J("mode","over")("opened",!1)("ngStyle",r.VKq(25,Da,"url("+A.GS.rightMenuImage+")")),r.xp6(3),r.Udp("background-repeat","no-repeat")("background-size","128px"+(A.ROUTER.url.startsWith("/login")||A.ROUTER.url.startsWith("/register")||A.ROUTER.url.startsWith("/home")||A.ROUTER.url.startsWith("/verify")||A.ROUTER.url.startsWith("/privacy-policy")||A.ROUTER.url.startsWith("/reset-password")?", cover":""))("background-position","bottom right"+(A.ROUTER.url.startsWith("/login")||A.ROUTER.url.startsWith("/register")||A.ROUTER.url.startsWith("/home")||A.ROUTER.url.startsWith("/verify")||A.ROUTER.url.startsWith("/privacy-policy")||A.ROUTER.url.startsWith("/reset-password")?", center":""))("background-image","url("+A.GS.bgImgUrl+")"+(A.ROUTER.url.startsWith("/login")||A.ROUTER.url.startsWith("/register")||A.ROUTER.url.startsWith("/home")||A.ROUTER.url.startsWith("/verify")||A.ROUTER.url.startsWith("/privacy-policy")||A.ROUTER.url.startsWith("/reset-password")?", url('/assets/img/background/paint.svg')":"")),r.xp6(6),r.Q6J("bdColor","#0000007f")("type","square-jelly-box")("size","medium")("color","#e84360")}},dependencies:[Ai.PC,gi.lC,Vo.JX,Vo.TM,Vo.Rh,js.Ro,di,Pl,mt,Xt,Dn,Pc],styles:[".main_content[_ngcontent-%COMP%]{width:100%;height:calc(100vh - 88px)}"],data:{animation:[Qa]}}),L})(),kc=(()=>{class L{}return L.\u0275fac=function(h){return new(h||L)},L.\u0275mod=r.oAB({type:L}),L.\u0275inj=r.cJS({imports:[Ai.ez,gi.Bz,Ln.m]}),L})(),Fc=(()=>{class L{}return L.\u0275fac=function(h){return new(h||L)},L.\u0275mod=r.oAB({type:L}),L.\u0275inj=r.cJS({imports:[Ai.ez,gi.Bz,Ln.m,Xi.u5]}),L})();var Lc=s(5116);let nl=(()=>{class L{}return L.\u0275fac=function(h){return new(h||L)},L.\u0275mod=r.oAB({type:L}),L.\u0275inj=r.cJS({imports:[Ai.ez,Ln.m]}),L})(),na=(()=>{class L{}return L.\u0275fac=function(h){return new(h||L)},L.\u0275mod=r.oAB({type:L}),L.\u0275inj=r.cJS({imports:[Ai.ez,Ln.m,Go]}),L})();var Ul=s(3170),ia=s(7355),Bc=s(2438);let Hl=(()=>{class L{}return L.\u0275fac=function(h){return new(h||L)},L.\u0275mod=r.oAB({type:L}),L.\u0275inj=r.cJS({imports:[Ai.ez,gi.Bz,Ln.m,Xi.u5,Xi.UX,Ul.Ad,Bc.d,ia.T]}),L})(),ra=(()=>{class L{}return L.\u0275fac=function(h){return new(h||L)},L.\u0275mod=r.oAB({type:L,bootstrap:[ta]}),L.\u0275inj=r.cJS({providers:[{provide:n.ok,useClass:_n},{provide:Vs.Jm,useValue:Un},{provide:ki.o2,useValue:{floatLabel:"always"}},{provide:us.Ve,useValue:{duration:1e4}},{provide:l.TP,useClass:Xs,multi:!0},{provide:l.TP,useClass:ga,multi:!0},{provide:l.TP,useClass:dr,multi:!0}],imports:[n.b2.withServerTransition({appId:"serverApp"}),Dt,Ii,v,Xi.UX,l.JF,Ln.m,n.t6,js.ef,Uo.Rh.forRoot({timeOut:3e3,positionClass:"toast-top-right",closeButton:!0,progressBar:!0,progressAnimation:"increasing"}),hi,$n,kc,Fc,Lc.d,nl,na,Hl,ys.Wr.register("/ngsw-worker.js",{enabled:Ui.N.production,registrationStrategy:"registerWhenStable:30000"}),xr.zO.withConfig({autoUpload:!1,concurrency:1,endpoint:`${Ui.N.apiUrl}/attachment`,headers:{"ngsw-bypass":"true"},retryConfig:{maxAttempts:3},maxChunkSize:Wi.t.fileSizeAttachmentChunkCloudflareLimit})]}),L})();function rl(){n.q6().bootstrapModule(ra).catch(L=>console.error(L))}s(5386),Ui.N.production&&(0,r.G48)(),"complete"===document.readyState?rl():document.addEventListener("DOMContentLoaded",rl)},4249:(Je,F,s)=>{"use strict";s.d(F,{Bp:()=>x,eK:()=>E,yS:()=>n});var n=(()=>{return(d=n||(n={})).ADMIN="ADMIN",d.MODERATOR="MODERATOR",d.FANSUBBER="FANSUBBER",d.USER="USER",n;var d})(),E=(()=>{return(d=E||(E={})).LIKE="LIKE",d.DISLIKE="DISLIKE",E;var d})(),x=(()=>{return(d=x||(x={})).DISCORD="DISCORD",d.DISQUS="DISQUS",d.FACEBOOK="FACEBOOK",d.GOOGLE="GOOGLE",x;var d})()},6022:(Je,F,s)=>{"use strict";s.d(F,{F:()=>n});var n=(()=>{return(r=n||(n={})).WINTER="winter",r.SPRING="spring",r.SUMMER="summer",r.FALL="fall",n;var r})()},8498:Je=>{function s(){}Je.exports=function F(n,r,l){var u=!1;return l=l||s,o.count=n,0===n?r():o;function o(E,x){if(o.count<=0)throw new Error("after called too many times");--o.count,E?(u=!0,r(E),r=l):0===o.count&&!u&&r(null,x)}}},9933:Je=>{Je.exports=function(F,s,n){var r=F.byteLength;if(s=s||0,n=n||r,F.slice)return F.slice(s,n);if(s<0&&(s+=r),n<0&&(n+=r),n>r&&(n=r),s>=r||s>=n||0===r)return new ArrayBuffer(0);for(var l=new Uint8Array(F),u=new Uint8Array(n-s),o=s,E=0;o{function F(s){this.ms=(s=s||{}).min||100,this.max=s.max||1e4,this.factor=s.factor||2,this.jitter=s.jitter>0&&s.jitter<=1?s.jitter:0,this.attempts=0}Je.exports=F,F.prototype.duration=function(){var s=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var n=Math.random(),r=Math.floor(n*this.jitter*s);s=0==(1&Math.floor(10*n))?s-r:s+r}return 0|Math.min(s,this.max)},F.prototype.reset=function(){this.attempts=0},F.prototype.setMin=function(s){this.ms=s},F.prototype.setMax=function(s){this.max=s},F.prototype.setJitter=function(s){this.jitter=s}},390:(Je,F)=>{!function(s){"use strict";F.encode=function(n){var l,r=new Uint8Array(n),u=r.length,o="";for(l=0;l>2],o+=s[(3&r[l])<<4|r[l+1]>>4],o+=s[(15&r[l+1])<<2|r[l+2]>>6],o+=s[63&r[l+2]];return u%3==2?o=o.substring(0,o.length-1)+"=":u%3==1&&(o=o.substring(0,o.length-2)+"=="),o},F.decode=function(n){var u,E,x,d,g,r=.75*n.length,l=n.length,o=0;"="===n[n.length-1]&&(r--,"="===n[n.length-2]&&r--);var v=new ArrayBuffer(r),_=new Uint8Array(v);for(u=0;u>4,_[o++]=(15&x)<<4|d>>2,_[o++]=(3&d)<<6|63&g;return v}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},5343:(Je,F)=>{"use strict";F.byteLength=function x(C){var O=E(C),G=O[1];return 3*(O[0]+G)/4-G},F.toByteArray=function g(C){var O,j,V=E(C),G=V[0],Y=V[1],H=new r(function d(C,O,V){return 3*(O+V)/4-V}(0,G,Y)),ne=0,fe=Y>0?G-4:G;for(j=0;j>16&255,H[ne++]=O>>8&255,H[ne++]=255&O;return 2===Y&&(O=n[C.charCodeAt(j)]<<2|n[C.charCodeAt(j+1)]>>4,H[ne++]=255&O),1===Y&&(O=n[C.charCodeAt(j)]<<10|n[C.charCodeAt(j+1)]<<4|n[C.charCodeAt(j+2)]>>2,H[ne++]=O>>8&255,H[ne++]=255&O),H},F.fromByteArray=function m(C){for(var O,V=C.length,G=V%3,Y=[],H=16383,ne=0,fe=V-G;nefe?fe:ne+H));return 1===G?Y.push(s[(O=C[V-1])>>2]+s[O<<4&63]+"=="):2===G&&Y.push(s[(O=(C[V-2]<<8)+C[V-1])>>10]+s[O>>4&63]+s[O<<2&63]+"="),Y.join("")};for(var s=[],n=[],r=typeof Uint8Array<"u"?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,o=l.length;u0)throw new Error("Invalid string. Length must be a multiple of 4");var V=C.indexOf("=");return-1===V&&(V=O),[V,V===O?0:4-V%4]}function v(C){return s[C>>18&63]+s[C>>12&63]+s[C>>6&63]+s[63&C]}function _(C,O,V){for(var Y=[],H=O;H{var F=typeof F<"u"?F:typeof WebKitBlobBuilder<"u"?WebKitBlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"&&MozBlobBuilder,s=function(){try{return 2===new Blob(["hi"]).size}catch{return!1}}(),n=s&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch{return!1}}(),r=F&&F.prototype.append&&F.prototype.getBlob;function l(E){return E.map(function(x){if(x.buffer instanceof ArrayBuffer){var d=x.buffer;if(x.byteLength!==d.byteLength){var g=new Uint8Array(x.byteLength);g.set(new Uint8Array(d,x.byteOffset,x.byteLength)),d=g.buffer}return d}return x})}function u(E,x){x=x||{};var d=new F;return l(E).forEach(function(g){d.append(g)}),x.type?d.getBlob(x.type):d.getBlob()}function o(E,x){return new Blob(l(E),x||{})}typeof Blob<"u"&&(u.prototype=Blob.prototype,o.prototype=Blob.prototype),Je.exports=s?n?Blob:o:r?u:void 0},3172:(Je,F,s)=>{"use strict";const r=s(5343),l=s(8461),u="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;F.lW=d,F.h2=50;const o=2147483647;function x(le){if(le>o)throw new RangeError('The value "'+le+'" is invalid for option "size"');const P=new Uint8Array(le);return Object.setPrototypeOf(P,d.prototype),P}function d(le,P,z){if("number"==typeof le){if("string"==typeof P)throw new TypeError('The "string" argument must be of type string. Received type number');return m(le)}return g(le,P,z)}function g(le,P,z){if("string"==typeof le)return function C(le,P){if(("string"!=typeof P||""===P)&&(P="utf8"),!d.isEncoding(P))throw new TypeError("Unknown encoding: "+P);const z=0|fe(le,P);let Re=x(z);const _t=Re.write(le,P);return _t!==z&&(Re=Re.slice(0,_t)),Re}(le,P);if(ArrayBuffer.isView(le))return function V(le){if(U(le,Uint8Array)){const P=new Uint8Array(le);return G(P.buffer,P.byteOffset,P.byteLength)}return O(le)}(le);if(null==le)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof le);if(U(le,ArrayBuffer)||le&&U(le.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(U(le,SharedArrayBuffer)||le&&U(le.buffer,SharedArrayBuffer)))return G(le,P,z);if("number"==typeof le)throw new TypeError('The "value" argument must not be of type number. Received type number');const Re=le.valueOf&&le.valueOf();if(null!=Re&&Re!==le)return d.from(Re,P,z);const _t=function Y(le){if(d.isBuffer(le)){const P=0|H(le.length),z=x(P);return 0===z.length||le.copy(z,0,0,P),z}return void 0!==le.length?"number"!=typeof le.length||Ae(le.length)?x(0):O(le):"Buffer"===le.type&&Array.isArray(le.data)?O(le.data):void 0}(le);if(_t)return _t;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof le[Symbol.toPrimitive])return d.from(le[Symbol.toPrimitive]("string"),P,z);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof le)}function v(le){if("number"!=typeof le)throw new TypeError('"size" argument must be of type number');if(le<0)throw new RangeError('The value "'+le+'" is invalid for option "size"')}function m(le){return v(le),x(le<0?0:0|H(le))}function O(le){const P=le.length<0?0:0|H(le.length),z=x(P);for(let Re=0;Re=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|le}function fe(le,P){if(d.isBuffer(le))return le.length;if(ArrayBuffer.isView(le)||U(le,ArrayBuffer))return le.byteLength;if("string"!=typeof le)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof le);const z=le.length,Re=arguments.length>2&&!0===arguments[2];if(!Re&&0===z)return 0;let _t=!1;for(;;)switch(P){case"ascii":case"latin1":case"binary":return z;case"utf8":case"utf-8":return Tt(le).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*z;case"hex":return z>>>1;case"base64":return w(le).length;default:if(_t)return Re?-1:Tt(le).length;P=(""+P).toLowerCase(),_t=!0}}function j(le,P,z){let Re=!1;if((void 0===P||P<0)&&(P=0),P>this.length||((void 0===z||z>this.length)&&(z=this.length),z<=0)||(z>>>=0)<=(P>>>=0))return"";for(le||(le="utf8");;)switch(le){case"hex":return xt(this,P,z);case"utf8":case"utf-8":return q(this,P,z);case"ascii":return Ft(this,P,z);case"latin1":case"binary":return Lt(this,P,z);case"base64":return de(this,P,z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Pe(this,P,z);default:if(Re)throw new TypeError("Unknown encoding: "+le);le=(le+"").toLowerCase(),Re=!0}}function $(le,P,z){const Re=le[P];le[P]=le[z],le[z]=Re}function N(le,P,z,Re,_t){if(0===le.length)return-1;if("string"==typeof z?(Re=z,z=0):z>2147483647?z=2147483647:z<-2147483648&&(z=-2147483648),Ae(z=+z)&&(z=_t?0:le.length-1),z<0&&(z=le.length+z),z>=le.length){if(_t)return-1;z=le.length-1}else if(z<0){if(!_t)return-1;z=0}if("string"==typeof P&&(P=d.from(P,Re)),d.isBuffer(P))return 0===P.length?-1:ee(le,P,z,Re,_t);if("number"==typeof P)return P&=255,"function"==typeof Uint8Array.prototype.indexOf?_t?Uint8Array.prototype.indexOf.call(le,P,z):Uint8Array.prototype.lastIndexOf.call(le,P,z):ee(le,[P],z,Re,_t);throw new TypeError("val must be string, number or Buffer")}function ee(le,P,z,Re,_t){let gn,ft=1,Nt=le.length,nn=P.length;if(void 0!==Re&&("ucs2"===(Re=String(Re).toLowerCase())||"ucs-2"===Re||"utf16le"===Re||"utf-16le"===Re)){if(le.length<2||P.length<2)return-1;ft=2,Nt/=2,nn/=2,z/=2}function Rn(Ot,pt){return 1===ft?Ot[pt]:Ot.readUInt16BE(pt*ft)}if(_t){let Ot=-1;for(gn=z;gnNt&&(z=Nt-nn),gn=z;gn>=0;gn--){let Ot=!0;for(let pt=0;pt_t&&(Re=_t):Re=_t;const ft=P.length;let Nt;for(Re>ft/2&&(Re=ft/2),Nt=0;Nt>8,_t=z%256,ft.push(_t),ft.push(Re);return ft}(P,le.length-z),le,z,Re)}function de(le,P,z){return r.fromByteArray(0===P&&z===le.length?le:le.slice(P,z))}function q(le,P,z){z=Math.min(le.length,z);const Re=[];let _t=P;for(;_t239?4:ft>223?3:ft>191?2:1;if(_t+nn<=z){let Rn,gn,Ot,pt;switch(nn){case 1:ft<128&&(Nt=ft);break;case 2:Rn=le[_t+1],128==(192&Rn)&&(pt=(31&ft)<<6|63&Rn,pt>127&&(Nt=pt));break;case 3:Rn=le[_t+1],gn=le[_t+2],128==(192&Rn)&&128==(192&gn)&&(pt=(15&ft)<<12|(63&Rn)<<6|63&gn,pt>2047&&(pt<55296||pt>57343)&&(Nt=pt));break;case 4:Rn=le[_t+1],gn=le[_t+2],Ot=le[_t+3],128==(192&Rn)&&128==(192&gn)&&128==(192&Ot)&&(pt=(15&ft)<<18|(63&Rn)<<12|(63&gn)<<6|63&Ot,pt>65535&&pt<1114112&&(Nt=pt))}}null===Nt?(Nt=65533,nn=1):Nt>65535&&(Nt-=65536,Re.push(Nt>>>10&1023|55296),Nt=56320|1023&Nt),Re.push(Nt),_t+=nn}return function qe(le){const P=le.length;if(P<=4096)return String.fromCharCode.apply(String,le);let z="",Re=0;for(;ReRe)&&(z=Re);let _t="";for(let ft=P;ftz)throw new RangeError("Trying to access beyond buffer length")}function ae(le,P,z,Re,_t,ft){if(!d.isBuffer(le))throw new TypeError('"buffer" argument must be a Buffer instance');if(P>_t||Ple.length)throw new RangeError("Index out of range")}function be(le,P,z,Re,_t){ye(P,Re,_t,le,z,7);let ft=Number(P&BigInt(4294967295));le[z++]=ft,ft>>=8,le[z++]=ft,ft>>=8,le[z++]=ft,ft>>=8,le[z++]=ft;let Nt=Number(P>>BigInt(32)&BigInt(4294967295));return le[z++]=Nt,Nt>>=8,le[z++]=Nt,Nt>>=8,le[z++]=Nt,Nt>>=8,le[z++]=Nt,z}function he(le,P,z,Re,_t){ye(P,Re,_t,le,z,7);let ft=Number(P&BigInt(4294967295));le[z+7]=ft,ft>>=8,le[z+6]=ft,ft>>=8,le[z+5]=ft,ft>>=8,le[z+4]=ft;let Nt=Number(P>>BigInt(32)&BigInt(4294967295));return le[z+3]=Nt,Nt>>=8,le[z+2]=Nt,Nt>>=8,le[z+1]=Nt,Nt>>=8,le[z]=Nt,z+8}function Be(le,P,z,Re,_t,ft){if(z+Re>le.length)throw new RangeError("Index out of range");if(z<0)throw new RangeError("Index out of range")}function Ce(le,P,z,Re,_t){return P=+P,z>>>=0,_t||Be(le,0,z,4),l.write(le,P,z,Re,23,4),z+4}function nt(le,P,z,Re,_t){return P=+P,z>>>=0,_t||Be(le,0,z,8),l.write(le,P,z,Re,52,8),z+8}!(d.TYPED_ARRAY_SUPPORT=function E(){try{const le=new Uint8Array(1),P={foo:function(){return 42}};return Object.setPrototypeOf(P,Uint8Array.prototype),Object.setPrototypeOf(le,P),42===le.foo()}catch{return!1}}())&&typeof console<"u"&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(d.prototype,"parent",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.buffer}}),Object.defineProperty(d.prototype,"offset",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.byteOffset}}),d.poolSize=8192,d.from=function(le,P,z){return g(le,P,z)},Object.setPrototypeOf(d.prototype,Uint8Array.prototype),Object.setPrototypeOf(d,Uint8Array),d.alloc=function(le,P,z){return function _(le,P,z){return v(le),le<=0?x(le):void 0!==P?"string"==typeof z?x(le).fill(P,z):x(le).fill(P):x(le)}(le,P,z)},d.allocUnsafe=function(le){return m(le)},d.allocUnsafeSlow=function(le){return m(le)},d.isBuffer=function(P){return null!=P&&!0===P._isBuffer&&P!==d.prototype},d.compare=function(P,z){if(U(P,Uint8Array)&&(P=d.from(P,P.offset,P.byteLength)),U(z,Uint8Array)&&(z=d.from(z,z.offset,z.byteLength)),!d.isBuffer(P)||!d.isBuffer(z))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(P===z)return 0;let Re=P.length,_t=z.length;for(let ft=0,Nt=Math.min(Re,_t);ft_t.length?(d.isBuffer(Nt)||(Nt=d.from(Nt)),Nt.copy(_t,ft)):Uint8Array.prototype.set.call(_t,Nt,ft);else{if(!d.isBuffer(Nt))throw new TypeError('"list" argument must be an Array of Buffers');Nt.copy(_t,ft)}ft+=Nt.length}return _t},d.byteLength=fe,d.prototype._isBuffer=!0,d.prototype.swap16=function(){const P=this.length;if(P%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let z=0;zz&&(P+=" ... "),""},u&&(d.prototype[u]=d.prototype.inspect),d.prototype.compare=function(P,z,Re,_t,ft){if(U(P,Uint8Array)&&(P=d.from(P,P.offset,P.byteLength)),!d.isBuffer(P))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof P);if(void 0===z&&(z=0),void 0===Re&&(Re=P?P.length:0),void 0===_t&&(_t=0),void 0===ft&&(ft=this.length),z<0||Re>P.length||_t<0||ft>this.length)throw new RangeError("out of range index");if(_t>=ft&&z>=Re)return 0;if(_t>=ft)return-1;if(z>=Re)return 1;if(this===P)return 0;let Nt=(ft>>>=0)-(_t>>>=0),nn=(Re>>>=0)-(z>>>=0);const Rn=Math.min(Nt,nn),gn=this.slice(_t,ft),Ot=P.slice(z,Re);for(let pt=0;pt>>=0,isFinite(Re)?(Re>>>=0,void 0===_t&&(_t="utf8")):(_t=Re,Re=void 0)}const ft=this.length-z;if((void 0===Re||Re>ft)&&(Re=ft),P.length>0&&(Re<0||z<0)||z>this.length)throw new RangeError("Attempt to write outside buffer bounds");_t||(_t="utf8");let Nt=!1;for(;;)switch(_t){case"hex":return ue(this,P,z,Re);case"utf8":case"utf-8":return se(this,P,z,Re);case"ascii":case"latin1":case"binary":return Oe(this,P,z,Re);case"base64":return oe(this,P,z,Re);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Z(this,P,z,Re);default:if(Nt)throw new TypeError("Unknown encoding: "+_t);_t=(""+_t).toLowerCase(),Nt=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},d.prototype.slice=function(P,z){const Re=this.length;(P=~~P)<0?(P+=Re)<0&&(P=0):P>Re&&(P=Re),(z=void 0===z?Re:~~z)<0?(z+=Re)<0&&(z=0):z>Re&&(z=Re),z>>=0,z>>>=0,Re||He(P,z,this.length);let _t=this[P],ft=1,Nt=0;for(;++Nt>>=0,z>>>=0,Re||He(P,z,this.length);let _t=this[P+--z],ft=1;for(;z>0&&(ft*=256);)_t+=this[P+--z]*ft;return _t},d.prototype.readUint8=d.prototype.readUInt8=function(P,z){return P>>>=0,z||He(P,1,this.length),this[P]},d.prototype.readUint16LE=d.prototype.readUInt16LE=function(P,z){return P>>>=0,z||He(P,2,this.length),this[P]|this[P+1]<<8},d.prototype.readUint16BE=d.prototype.readUInt16BE=function(P,z){return P>>>=0,z||He(P,2,this.length),this[P]<<8|this[P+1]},d.prototype.readUint32LE=d.prototype.readUInt32LE=function(P,z){return P>>>=0,z||He(P,4,this.length),(this[P]|this[P+1]<<8|this[P+2]<<16)+16777216*this[P+3]},d.prototype.readUint32BE=d.prototype.readUInt32BE=function(P,z){return P>>>=0,z||He(P,4,this.length),16777216*this[P]+(this[P+1]<<16|this[P+2]<<8|this[P+3])},d.prototype.readBigUInt64LE=xe(function(P){Le(P>>>=0,"offset");const z=this[P],Re=this[P+7];(void 0===z||void 0===Re)&&at(P,this.length-8);const _t=z+256*this[++P]+65536*this[++P]+this[++P]*2**24,ft=this[++P]+256*this[++P]+65536*this[++P]+Re*2**24;return BigInt(_t)+(BigInt(ft)<>>=0,"offset");const z=this[P],Re=this[P+7];(void 0===z||void 0===Re)&&at(P,this.length-8);const _t=z*2**24+65536*this[++P]+256*this[++P]+this[++P],ft=this[++P]*2**24+65536*this[++P]+256*this[++P]+Re;return(BigInt(_t)<>>=0,z>>>=0,Re||He(P,z,this.length);let _t=this[P],ft=1,Nt=0;for(;++Nt=ft&&(_t-=Math.pow(2,8*z)),_t},d.prototype.readIntBE=function(P,z,Re){P>>>=0,z>>>=0,Re||He(P,z,this.length);let _t=z,ft=1,Nt=this[P+--_t];for(;_t>0&&(ft*=256);)Nt+=this[P+--_t]*ft;return ft*=128,Nt>=ft&&(Nt-=Math.pow(2,8*z)),Nt},d.prototype.readInt8=function(P,z){return P>>>=0,z||He(P,1,this.length),128&this[P]?-1*(255-this[P]+1):this[P]},d.prototype.readInt16LE=function(P,z){P>>>=0,z||He(P,2,this.length);const Re=this[P]|this[P+1]<<8;return 32768&Re?4294901760|Re:Re},d.prototype.readInt16BE=function(P,z){P>>>=0,z||He(P,2,this.length);const Re=this[P+1]|this[P]<<8;return 32768&Re?4294901760|Re:Re},d.prototype.readInt32LE=function(P,z){return P>>>=0,z||He(P,4,this.length),this[P]|this[P+1]<<8|this[P+2]<<16|this[P+3]<<24},d.prototype.readInt32BE=function(P,z){return P>>>=0,z||He(P,4,this.length),this[P]<<24|this[P+1]<<16|this[P+2]<<8|this[P+3]},d.prototype.readBigInt64LE=xe(function(P){Le(P>>>=0,"offset");const z=this[P],Re=this[P+7];return(void 0===z||void 0===Re)&&at(P,this.length-8),(BigInt(this[P+4]+256*this[P+5]+65536*this[P+6]+(Re<<24))<>>=0,"offset");const z=this[P],Re=this[P+7];(void 0===z||void 0===Re)&&at(P,this.length-8);const _t=(z<<24)+65536*this[++P]+256*this[++P]+this[++P];return(BigInt(_t)<>>=0,z||He(P,4,this.length),l.read(this,P,!0,23,4)},d.prototype.readFloatBE=function(P,z){return P>>>=0,z||He(P,4,this.length),l.read(this,P,!1,23,4)},d.prototype.readDoubleLE=function(P,z){return P>>>=0,z||He(P,8,this.length),l.read(this,P,!0,52,8)},d.prototype.readDoubleBE=function(P,z){return P>>>=0,z||He(P,8,this.length),l.read(this,P,!1,52,8)},d.prototype.writeUintLE=d.prototype.writeUIntLE=function(P,z,Re,_t){P=+P,z>>>=0,Re>>>=0,_t||ae(this,P,z,Re,Math.pow(2,8*Re)-1,0);let ft=1,Nt=0;for(this[z]=255&P;++Nt>>=0,Re>>>=0,_t||ae(this,P,z,Re,Math.pow(2,8*Re)-1,0);let ft=Re-1,Nt=1;for(this[z+ft]=255&P;--ft>=0&&(Nt*=256);)this[z+ft]=P/Nt&255;return z+Re},d.prototype.writeUint8=d.prototype.writeUInt8=function(P,z,Re){return P=+P,z>>>=0,Re||ae(this,P,z,1,255,0),this[z]=255&P,z+1},d.prototype.writeUint16LE=d.prototype.writeUInt16LE=function(P,z,Re){return P=+P,z>>>=0,Re||ae(this,P,z,2,65535,0),this[z]=255&P,this[z+1]=P>>>8,z+2},d.prototype.writeUint16BE=d.prototype.writeUInt16BE=function(P,z,Re){return P=+P,z>>>=0,Re||ae(this,P,z,2,65535,0),this[z]=P>>>8,this[z+1]=255&P,z+2},d.prototype.writeUint32LE=d.prototype.writeUInt32LE=function(P,z,Re){return P=+P,z>>>=0,Re||ae(this,P,z,4,4294967295,0),this[z+3]=P>>>24,this[z+2]=P>>>16,this[z+1]=P>>>8,this[z]=255&P,z+4},d.prototype.writeUint32BE=d.prototype.writeUInt32BE=function(P,z,Re){return P=+P,z>>>=0,Re||ae(this,P,z,4,4294967295,0),this[z]=P>>>24,this[z+1]=P>>>16,this[z+2]=P>>>8,this[z+3]=255&P,z+4},d.prototype.writeBigUInt64LE=xe(function(P,z=0){return be(this,P,z,BigInt(0),BigInt("0xffffffffffffffff"))}),d.prototype.writeBigUInt64BE=xe(function(P,z=0){return he(this,P,z,BigInt(0),BigInt("0xffffffffffffffff"))}),d.prototype.writeIntLE=function(P,z,Re,_t){if(P=+P,z>>>=0,!_t){const Rn=Math.pow(2,8*Re-1);ae(this,P,z,Re,Rn-1,-Rn)}let ft=0,Nt=1,nn=0;for(this[z]=255&P;++ft>0)-nn&255;return z+Re},d.prototype.writeIntBE=function(P,z,Re,_t){if(P=+P,z>>>=0,!_t){const Rn=Math.pow(2,8*Re-1);ae(this,P,z,Re,Rn-1,-Rn)}let ft=Re-1,Nt=1,nn=0;for(this[z+ft]=255&P;--ft>=0&&(Nt*=256);)P<0&&0===nn&&0!==this[z+ft+1]&&(nn=1),this[z+ft]=(P/Nt>>0)-nn&255;return z+Re},d.prototype.writeInt8=function(P,z,Re){return P=+P,z>>>=0,Re||ae(this,P,z,1,127,-128),P<0&&(P=255+P+1),this[z]=255&P,z+1},d.prototype.writeInt16LE=function(P,z,Re){return P=+P,z>>>=0,Re||ae(this,P,z,2,32767,-32768),this[z]=255&P,this[z+1]=P>>>8,z+2},d.prototype.writeInt16BE=function(P,z,Re){return P=+P,z>>>=0,Re||ae(this,P,z,2,32767,-32768),this[z]=P>>>8,this[z+1]=255&P,z+2},d.prototype.writeInt32LE=function(P,z,Re){return P=+P,z>>>=0,Re||ae(this,P,z,4,2147483647,-2147483648),this[z]=255&P,this[z+1]=P>>>8,this[z+2]=P>>>16,this[z+3]=P>>>24,z+4},d.prototype.writeInt32BE=function(P,z,Re){return P=+P,z>>>=0,Re||ae(this,P,z,4,2147483647,-2147483648),P<0&&(P=4294967295+P+1),this[z]=P>>>24,this[z+1]=P>>>16,this[z+2]=P>>>8,this[z+3]=255&P,z+4},d.prototype.writeBigInt64LE=xe(function(P,z=0){return be(this,P,z,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),d.prototype.writeBigInt64BE=xe(function(P,z=0){return he(this,P,z,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),d.prototype.writeFloatLE=function(P,z,Re){return Ce(this,P,z,!0,Re)},d.prototype.writeFloatBE=function(P,z,Re){return Ce(this,P,z,!1,Re)},d.prototype.writeDoubleLE=function(P,z,Re){return nt(this,P,z,!0,Re)},d.prototype.writeDoubleBE=function(P,z,Re){return nt(this,P,z,!1,Re)},d.prototype.copy=function(P,z,Re,_t){if(!d.isBuffer(P))throw new TypeError("argument should be a Buffer");if(Re||(Re=0),!_t&&0!==_t&&(_t=this.length),z>=P.length&&(z=P.length),z||(z=0),_t>0&&_t=this.length)throw new RangeError("Index out of range");if(_t<0)throw new RangeError("sourceEnd out of bounds");_t>this.length&&(_t=this.length),P.length-z<_t-Re&&(_t=P.length-z+Re);const ft=_t-Re;return this===P&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(z,Re,_t):Uint8Array.prototype.set.call(P,this.subarray(Re,_t),z),ft},d.prototype.fill=function(P,z,Re,_t){if("string"==typeof P){if("string"==typeof z?(_t=z,z=0,Re=this.length):"string"==typeof Re&&(_t=Re,Re=this.length),void 0!==_t&&"string"!=typeof _t)throw new TypeError("encoding must be a string");if("string"==typeof _t&&!d.isEncoding(_t))throw new TypeError("Unknown encoding: "+_t);if(1===P.length){const Nt=P.charCodeAt(0);("utf8"===_t&&Nt<128||"latin1"===_t)&&(P=Nt)}}else"number"==typeof P?P&=255:"boolean"==typeof P&&(P=Number(P));if(z<0||this.length>>=0,Re=void 0===Re?this.length:Re>>>0,P||(P=0),"number"==typeof P)for(ft=z;ft=Re+4;z-=3)P=`_${le.slice(z-3,z)}${P}`;return`${le.slice(0,z)}${P}`}function ye(le,P,z,Re,_t,ft){if(le>z||le3?0===P||P===BigInt(0)?`>= 0${Nt} and < 2${Nt} ** ${8*(ft+1)}${Nt}`:`>= -(2${Nt} ** ${8*(ft+1)-1}${Nt}) and < 2 ** ${8*(ft+1)-1}${Nt}`:`>= ${P}${Nt} and <= ${z}${Nt}`,new ke.ERR_OUT_OF_RANGE("value",nn,le)}!function Ie(le,P,z){Le(P,"offset"),(void 0===le[P]||void 0===le[P+z])&&at(P,le.length-(z+1))}(Re,_t,ft)}function Le(le,P){if("number"!=typeof le)throw new ke.ERR_INVALID_ARG_TYPE(P,"number",le)}function at(le,P,z){throw Math.floor(le)!==le?(Le(le,z),new ke.ERR_OUT_OF_RANGE(z||"offset","an integer",le)):P<0?new ke.ERR_BUFFER_OUT_OF_BOUNDS:new ke.ERR_OUT_OF_RANGE(z||"offset",`>= ${z?1:0} and <= ${P}`,le)}wt("ERR_BUFFER_OUT_OF_BOUNDS",function(le){return le?`${le} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),wt("ERR_INVALID_ARG_TYPE",function(le,P){return`The "${le}" argument must be of type number. Received type ${typeof P}`},TypeError),wt("ERR_OUT_OF_RANGE",function(le,P,z){let Re=`The value of "${le}" is out of range.`,_t=z;return Number.isInteger(z)&&Math.abs(z)>2**32?_t=ge(String(z)):"bigint"==typeof z&&(_t=String(z),(z>BigInt(2)**BigInt(32)||z<-(BigInt(2)**BigInt(32)))&&(_t=ge(_t)),_t+="n"),Re+=` It must be ${P}. Received ${_t}`,Re},RangeError);const Xe=/[^+/0-9A-Za-z-_]/g;function Tt(le,P){let z;P=P||1/0;const Re=le.length;let _t=null;const ft=[];for(let Nt=0;Nt55295&&z<57344){if(!_t){if(z>56319){(P-=3)>-1&&ft.push(239,191,189);continue}if(Nt+1===Re){(P-=3)>-1&&ft.push(239,191,189);continue}_t=z;continue}if(z<56320){(P-=3)>-1&&ft.push(239,191,189),_t=z;continue}z=65536+(_t-55296<<10|z-56320)}else _t&&(P-=3)>-1&&ft.push(239,191,189);if(_t=null,z<128){if((P-=1)<0)break;ft.push(z)}else if(z<2048){if((P-=2)<0)break;ft.push(z>>6|192,63&z|128)}else if(z<65536){if((P-=3)<0)break;ft.push(z>>12|224,z>>6&63|128,63&z|128)}else{if(!(z<1114112))throw new Error("Invalid code point");if((P-=4)<0)break;ft.push(z>>18|240,z>>12&63|128,z>>6&63|128,63&z|128)}}return ft}function w(le){return r.toByteArray(function vt(le){if((le=(le=le.split("=")[0]).trim().replace(Xe,"")).length<2)return"";for(;le.length%4!=0;)le+="=";return le}(le))}function T(le,P,z,Re){let _t;for(_t=0;_t=P.length||_t>=le.length);++_t)P[_t+z]=le[_t];return _t}function U(le,P){return le instanceof P||null!=le&&null!=le.constructor&&null!=le.constructor.name&&le.constructor.name===P.name}function Ae(le){return le!=le}const Me=function(){const le="0123456789abcdef",P=new Array(256);for(let z=0;z<16;++z){const Re=16*z;for(let _t=0;_t<16;++_t)P[Re+_t]=le[z]+le[_t]}return P}();function xe(le){return typeof BigInt>"u"?Ne:le}function Ne(){throw new Error("BigInt not supported")}},1213:Je=>{var F=[].slice;Je.exports=function(s,n){if("string"==typeof n&&(n=s[n]),"function"!=typeof n)throw new Error("bind() requires a function");var r=F.call(arguments,2);return function(){return n.apply(s,r.concat(F.call(arguments)))}}},1264:Je=>{function F(n){if(n)return function s(n){for(var r in F.prototype)n[r]=F.prototype[r];return n}(n)}Je.exports=F,F.prototype.on=F.prototype.addEventListener=function(n,r){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(r),this},F.prototype.once=function(n,r){function l(){this.off(n,l),r.apply(this,arguments)}return l.fn=r,this.on(n,l),this},F.prototype.off=F.prototype.removeListener=F.prototype.removeAllListeners=F.prototype.removeEventListener=function(n,r){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var l=this._callbacks["$"+n];if(!l)return this;if(1==arguments.length)return delete this._callbacks["$"+n],this;for(var u,o=0;o{Je.exports=function(F,s){var n=function(){};n.prototype=s.prototype,F.prototype=new n,F.prototype.constructor=F}},7466:function(Je,F,s){var n;Je.exports=(n=s(7585),s(8319),s(9493),s(7865),s(3057),function(){var r=n,u=r.lib.BlockCipher,o=r.algo,E=[],x=[],d=[],g=[],v=[],_=[],m=[],C=[],O=[],V=[];!function(){for(var H=[],ne=0;ne<256;ne++)H[ne]=ne<128?ne<<1:ne<<1^283;var fe=0,j=0;for(ne=0;ne<256;ne++){var $=j^j<<1^j<<2^j<<3^j<<4;E[fe]=$=$>>>8^255&$^99,x[$]=fe;var se,N=H[fe],ee=H[N],ue=H[ee];d[fe]=(se=257*H[$]^16843008*$)<<24|se>>>8,g[fe]=se<<16|se>>>16,v[fe]=se<<8|se>>>24,_[fe]=se,m[$]=(se=16843009*ue^65537*ee^257*N^16843008*fe)<<24|se>>>8,C[$]=se<<16|se>>>16,O[$]=se<<8|se>>>24,V[$]=se,fe?(fe=N^H[H[H[ue^N]]],j^=H[H[j]]):fe=j=1}}();var G=[0,1,2,4,8,16,32,64,128,27,54],Y=o.AES=u.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var ne=this._keyPriorReset=this._key,fe=ne.words,j=ne.sigBytes/4,N=4*((this._nRounds=j+6)+1),ee=this._keySchedule=[],ue=0;ue6&&ue%j==4&&(H=E[H>>>24]<<24|E[H>>>16&255]<<16|E[H>>>8&255]<<8|E[255&H]):(H=E[(H=H<<8|H>>>24)>>>24]<<24|E[H>>>16&255]<<16|E[H>>>8&255]<<8|E[255&H],H^=G[ue/j|0]<<24),ee[ue]=ee[ue-j]^H);for(var se=this._invKeySchedule=[],Oe=0;Oe>>24]]^C[E[H>>>16&255]]^O[E[H>>>8&255]]^V[E[255&H]]}}},encryptBlock:function(H,ne){this._doCryptBlock(H,ne,this._keySchedule,d,g,v,_,E)},decryptBlock:function(H,ne){var fe=H[ne+1];H[ne+1]=H[ne+3],H[ne+3]=fe,this._doCryptBlock(H,ne,this._invKeySchedule,m,C,O,V,x),fe=H[ne+1],H[ne+1]=H[ne+3],H[ne+3]=fe},_doCryptBlock:function(H,ne,fe,j,$,N,ee,ue){for(var se=this._nRounds,Oe=H[ne]^fe[0],oe=H[ne+1]^fe[1],Z=H[ne+2]^fe[2],de=H[ne+3]^fe[3],q=4,Ve=1;Ve>>24]^$[oe>>>16&255]^N[Z>>>8&255]^ee[255&de]^fe[q++],Ft=j[oe>>>24]^$[Z>>>16&255]^N[de>>>8&255]^ee[255&Oe]^fe[q++],Lt=j[Z>>>24]^$[de>>>16&255]^N[Oe>>>8&255]^ee[255&oe]^fe[q++],xt=j[de>>>24]^$[Oe>>>16&255]^N[oe>>>8&255]^ee[255&Z]^fe[q++];Oe=qe,oe=Ft,Z=Lt,de=xt}qe=(ue[Oe>>>24]<<24|ue[oe>>>16&255]<<16|ue[Z>>>8&255]<<8|ue[255&de])^fe[q++],Ft=(ue[oe>>>24]<<24|ue[Z>>>16&255]<<16|ue[de>>>8&255]<<8|ue[255&Oe])^fe[q++],Lt=(ue[Z>>>24]<<24|ue[de>>>16&255]<<16|ue[Oe>>>8&255]<<8|ue[255&oe])^fe[q++],xt=(ue[de>>>24]<<24|ue[Oe>>>16&255]<<16|ue[oe>>>8&255]<<8|ue[255&Z])^fe[q++],H[ne]=qe,H[ne+1]=Ft,H[ne+2]=Lt,H[ne+3]=xt},keySize:8});r.AES=u._createHelper(Y)}(),n.AES)},3057:function(Je,F,s){var l,u,o,E,x,d,v,m,C,V,G,Y,ne,j,N,ee,se,Oe,n;Je.exports=(n=s(7585),s(7865),void(n.lib.Cipher||(l=n,u=l.lib,o=u.Base,E=u.WordArray,x=u.BufferedBlockAlgorithm,d=l.enc,v=d.Base64,m=l.algo.EvpKDF,C=u.Cipher=x.extend({cfg:o.extend(),createEncryptor:function(oe,Z){return this.create(this._ENC_XFORM_MODE,oe,Z)},createDecryptor:function(oe,Z){return this.create(this._DEC_XFORM_MODE,oe,Z)},init:function(oe,Z,de){this.cfg=this.cfg.extend(de),this._xformMode=oe,this._key=Z,this.reset()},reset:function(){x.reset.call(this),this._doReset()},process:function(oe){return this._append(oe),this._process()},finalize:function(oe){return oe&&this._append(oe),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function oe(Z){return"string"==typeof Z?Oe:ee}return function(Z){return{encrypt:function(de,q,Ve){return oe(q).encrypt(Z,de,q,Ve)},decrypt:function(de,q,Ve){return oe(q).decrypt(Z,de,q,Ve)}}}}()}),u.StreamCipher=C.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),V=l.mode={},G=u.BlockCipherMode=o.extend({createEncryptor:function(oe,Z){return this.Encryptor.create(oe,Z)},createDecryptor:function(oe,Z){return this.Decryptor.create(oe,Z)},init:function(oe,Z){this._cipher=oe,this._iv=Z}}),Y=V.CBC=function(){var oe=G.extend();function Z(de,q,Ve){var qe,Ft=this._iv;Ft?(qe=Ft,this._iv=undefined):qe=this._prevBlock;for(var Lt=0;Lt>>2]}},u.BlockCipher=C.extend({cfg:C.cfg.extend({mode:Y,padding:ne}),reset:function(){var oe;C.reset.call(this);var Z=this.cfg,de=Z.iv,q=Z.mode;this._xformMode==this._ENC_XFORM_MODE?oe=q.createEncryptor:(oe=q.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==oe?this._mode.init(this,de&&de.words):(this._mode=oe.call(q,this,de&&de.words),this._mode.__creator=oe)},_doProcessBlock:function(oe,Z){this._mode.processBlock(oe,Z)},_doFinalize:function(){var oe,Z=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(Z.pad(this._data,this.blockSize),oe=this._process(!0)):(oe=this._process(!0),Z.unpad(oe)),oe},blockSize:4}),j=u.CipherParams=o.extend({init:function(oe){this.mixIn(oe)},toString:function(oe){return(oe||this.formatter).stringify(this)}}),N=(l.format={}).OpenSSL={stringify:function(oe){var de=oe.ciphertext,q=oe.salt;return(q?E.create([1398893684,1701076831]).concat(q).concat(de):de).toString(v)},parse:function(oe){var Z,de=v.parse(oe),q=de.words;return 1398893684==q[0]&&1701076831==q[1]&&(Z=E.create(q.slice(2,4)),q.splice(0,4),de.sigBytes-=16),j.create({ciphertext:de,salt:Z})}},ee=u.SerializableCipher=o.extend({cfg:o.extend({format:N}),encrypt:function(oe,Z,de,q){q=this.cfg.extend(q);var Ve=oe.createEncryptor(de,q),qe=Ve.finalize(Z),Ft=Ve.cfg;return j.create({ciphertext:qe,key:de,iv:Ft.iv,algorithm:oe,mode:Ft.mode,padding:Ft.padding,blockSize:oe.blockSize,formatter:q.format})},decrypt:function(oe,Z,de,q){return q=this.cfg.extend(q),Z=this._parse(Z,q.format),oe.createDecryptor(de,q).finalize(Z.ciphertext)},_parse:function(oe,Z){return"string"==typeof oe?Z.parse(oe,this):oe}}),se=(l.kdf={}).OpenSSL={execute:function(oe,Z,de,q){q||(q=E.random(8));var Ve=m.create({keySize:Z+de}).compute(oe,q),qe=E.create(Ve.words.slice(Z),4*de);return Ve.sigBytes=4*Z,j.create({key:Ve,iv:qe,salt:q})}},Oe=u.PasswordBasedCipher=ee.extend({cfg:ee.cfg.extend({kdf:se}),encrypt:function(oe,Z,de,q){var Ve=(q=this.cfg.extend(q)).kdf.execute(de,oe.keySize,oe.ivSize);q.iv=Ve.iv;var qe=ee.encrypt.call(this,oe,Z,Ve.key,q);return qe.mixIn(Ve),qe},decrypt:function(oe,Z,de,q){q=this.cfg.extend(q),Z=this._parse(Z,q.format);var Ve=q.kdf.execute(de,oe.keySize,oe.ivSize,Z.salt);return q.iv=Ve.iv,ee.decrypt.call(this,oe,Z,Ve.key,q)}}))))},7585:function(Je,F,s){var n;Je.exports=(n=n||function(r,l){var u;if(typeof window<"u"&&window.crypto&&(u=window.crypto),typeof self<"u"&&self.crypto&&(u=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(u=globalThis.crypto),!u&&typeof window<"u"&&window.msCrypto&&(u=window.msCrypto),!u&&typeof global<"u"&&global.crypto&&(u=global.crypto),!u)try{u=s(2480)}catch{}var o=function(){if(u){if("function"==typeof u.getRandomValues)try{return u.getRandomValues(new Uint32Array(1))[0]}catch{}if("function"==typeof u.randomBytes)try{return u.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},E=Object.create||function(){function H(){}return function(ne){var fe;return H.prototype=ne,fe=new H,H.prototype=null,fe}}(),x={},d=x.lib={},g=d.Base={extend:function(H){var ne=E(this);return H&&ne.mixIn(H),(!ne.hasOwnProperty("init")||this.init===ne.init)&&(ne.init=function(){ne.$super.init.apply(this,arguments)}),ne.init.prototype=ne,ne.$super=this,ne},create:function(){var H=this.extend();return H.init.apply(H,arguments),H},init:function(){},mixIn:function(H){for(var ne in H)H.hasOwnProperty(ne)&&(this[ne]=H[ne]);H.hasOwnProperty("toString")&&(this.toString=H.toString)},clone:function(){return this.init.prototype.extend(this)}},v=d.WordArray=g.extend({init:function(H,ne){H=this.words=H||[],this.sigBytes=null!=ne?ne:4*H.length},toString:function(H){return(H||m).stringify(this)},concat:function(H){var ne=this.words,fe=H.words,j=this.sigBytes,$=H.sigBytes;if(this.clamp(),j%4)for(var N=0;N<$;N++)ne[j+N>>>2]|=(fe[N>>>2]>>>24-N%4*8&255)<<24-(j+N)%4*8;else for(var ue=0;ue<$;ue+=4)ne[j+ue>>>2]=fe[ue>>>2];return this.sigBytes+=$,this},clamp:function(){var H=this.words,ne=this.sigBytes;H[ne>>>2]&=4294967295<<32-ne%4*8,H.length=r.ceil(ne/4)},clone:function(){var H=g.clone.call(this);return H.words=this.words.slice(0),H},random:function(H){for(var ne=[],fe=0;fe>>2]>>>24-$%4*8&255;j.push((N>>>4).toString(16)),j.push((15&N).toString(16))}return j.join("")},parse:function(H){for(var ne=H.length,fe=[],j=0;j>>3]|=parseInt(H.substr(j,2),16)<<24-j%8*4;return new v.init(fe,ne/2)}},C=_.Latin1={stringify:function(H){for(var ne=H.words,fe=H.sigBytes,j=[],$=0;$>>2]>>>24-$%4*8&255));return j.join("")},parse:function(H){for(var ne=H.length,fe=[],j=0;j>>2]|=(255&H.charCodeAt(j))<<24-j%4*8;return new v.init(fe,ne)}},O=_.Utf8={stringify:function(H){try{return decodeURIComponent(escape(C.stringify(H)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(H){return C.parse(unescape(encodeURIComponent(H)))}},V=d.BufferedBlockAlgorithm=g.extend({reset:function(){this._data=new v.init,this._nDataBytes=0},_append:function(H){"string"==typeof H&&(H=O.parse(H)),this._data.concat(H),this._nDataBytes+=H.sigBytes},_process:function(H){var ne,fe=this._data,j=fe.words,$=fe.sigBytes,N=this.blockSize,ue=$/(4*N),se=(ue=H?r.ceil(ue):r.max((0|ue)-this._minBufferSize,0))*N,Oe=r.min(4*se,$);if(se){for(var oe=0;oe>>2]>>>24-C%4*8&255)<<16|(g[C+1>>>2]>>>24-(C+1)%4*8&255)<<8|g[C+2>>>2]>>>24-(C+2)%4*8&255,H=0;H<4&&C+.75*H>>6*(3-H)&63));var ne=_.charAt(64);if(ne)for(;m.length%4;)m.push(ne);return m.join("")},parse:function(d){var g=d.length,v=this._map,_=this._reverseMap;if(!_){_=this._reverseMap=[];for(var m=0;m>>6-C%4*2;_[m>>>2]|=(O|V)<<24-m%4*8,m++}return u.create(_,m)}(d,g,_)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},n.enc.Base64)},4410:function(Je,F,s){var n,u;Je.exports=(n=s(7585),u=n.lib.WordArray,n.enc.Base64url={stringify:function(d,g=!0){var v=d.words,_=d.sigBytes,m=g?this._safe_map:this._map;d.clamp();for(var C=[],O=0;O<_;O+=3)for(var H=(v[O>>>2]>>>24-O%4*8&255)<<16|(v[O+1>>>2]>>>24-(O+1)%4*8&255)<<8|v[O+2>>>2]>>>24-(O+2)%4*8&255,ne=0;ne<4&&O+.75*ne<_;ne++)C.push(m.charAt(H>>>6*(3-ne)&63));var fe=m.charAt(64);if(fe)for(;C.length%4;)C.push(fe);return C.join("")},parse:function(d,g=!0){var v=d.length,_=g?this._safe_map:this._map,m=this._reverseMap;if(!m){m=this._reverseMap=[];for(var C=0;C<_.length;C++)m[_.charCodeAt(C)]=C}var O=_.charAt(64);if(O){var V=d.indexOf(O);-1!==V&&(v=V)}return function x(d,g,v){for(var _=[],m=0,C=0;C>>6-C%4*2;_[m>>>2]|=(O|V)<<24-m%4*8,m++}return u.create(_,m)}(d,v,m)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"},n.enc.Base64url)},9012:function(Je,F,s){var n;Je.exports=(n=s(7585),function(){var u=n.lib.WordArray,o=n.enc;function x(d){return d<<8&4278255360|d>>>8&16711935}o.Utf16=o.Utf16BE={stringify:function(d){for(var g=d.words,v=d.sigBytes,_=[],m=0;m>>2]>>>16-m%4*8&65535));return _.join("")},parse:function(d){for(var g=d.length,v=[],_=0;_>>1]|=d.charCodeAt(_)<<16-_%2*16;return u.create(v,2*g)}},o.Utf16LE={stringify:function(d){for(var g=d.words,v=d.sigBytes,_=[],m=0;m>>2]>>>16-m%4*8&65535);_.push(String.fromCharCode(C))}return _.join("")},parse:function(d){for(var g=d.length,v=[],_=0;_>>1]|=x(d.charCodeAt(_)<<16-_%2*16);return u.create(v,2*g)}}}(),n.enc.Utf16)},7865:function(Je,F,s){var r,l,u,o,E,d,n;Je.exports=(n=s(7585),s(5162),s(3764),o=(l=(r=n).lib).WordArray,d=(E=r.algo).EvpKDF=(u=l.Base).extend({cfg:u.extend({keySize:4,hasher:E.MD5,iterations:1}),init:function(g){this.cfg=this.cfg.extend(g)},compute:function(g,v){for(var _,m=this.cfg,C=m.hasher.create(),O=o.create(),V=O.words,G=m.keySize,Y=m.iterations;V.lengthm&&(v=g.finalize(v)),v.clamp();for(var C=this._oKey=v.clone(),O=this._iKey=v.clone(),V=C.words,G=O.words,Y=0;Y<_;Y++)V[Y]^=1549556828,G[Y]^=909522486;C.sigBytes=O.sigBytes=m,this.reset()},reset:function(){var g=this._hasher;g.reset(),g.update(this._iKey)},update:function(g){return this._hasher.update(g),this},finalize:function(g){var v=this._hasher,_=v.finalize(g);return v.reset(),v.finalize(this._oKey.clone().concat(_))}})))},7206:function(Je,F,s){var n;Je.exports=(n=s(7585),s(401),s(7412),s(9012),s(8319),s(4410),s(9493),s(5162),s(1817),s(8769),s(3351),s(6787),s(1971),s(4973),s(3764),s(8812),s(7865),s(3057),s(4424),s(6635),s(3592),s(9354),s(7934),s(4413),s(4630),s(187),s(1691),s(3237),s(1847),s(7466),s(7243),s(486),s(8182),s(3544),n)},7412:function(Je,F,s){var n;Je.exports=(n=s(7585),function(){if("function"==typeof ArrayBuffer){var u=n.lib.WordArray,o=u.init,E=u.init=function(x){if(x instanceof ArrayBuffer&&(x=new Uint8Array(x)),(x instanceof Int8Array||typeof Uint8ClampedArray<"u"&&x instanceof Uint8ClampedArray||x instanceof Int16Array||x instanceof Uint16Array||x instanceof Int32Array||x instanceof Uint32Array||x instanceof Float32Array||x instanceof Float64Array)&&(x=new Uint8Array(x.buffer,x.byteOffset,x.byteLength)),x instanceof Uint8Array){for(var d=x.byteLength,g=[],v=0;v>>2]|=x[v]<<24-v%4*8;o.call(this,g,d)}else o.apply(this,arguments)};E.prototype=u}}(),n.lib.WordArray)},9493:function(Je,F,s){var n;Je.exports=(n=s(7585),function(r){var l=n,u=l.lib,o=u.WordArray,E=u.Hasher,x=l.algo,d=[];!function(){for(var O=0;O<64;O++)d[O]=4294967296*r.abs(r.sin(O+1))|0}();var g=x.MD5=E.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(O,V){for(var G=0;G<16;G++){var Y=V+G,H=O[Y];O[Y]=16711935&(H<<8|H>>>24)|4278255360&(H<<24|H>>>8)}var ne=this._hash.words,fe=O[V+0],j=O[V+1],$=O[V+2],N=O[V+3],ee=O[V+4],ue=O[V+5],se=O[V+6],Oe=O[V+7],oe=O[V+8],Z=O[V+9],de=O[V+10],q=O[V+11],Ve=O[V+12],qe=O[V+13],Ft=O[V+14],Lt=O[V+15],xt=ne[0],Pe=ne[1],He=ne[2],ae=ne[3];xt=v(xt,Pe,He,ae,fe,7,d[0]),ae=v(ae,xt,Pe,He,j,12,d[1]),He=v(He,ae,xt,Pe,$,17,d[2]),Pe=v(Pe,He,ae,xt,N,22,d[3]),xt=v(xt,Pe,He,ae,ee,7,d[4]),ae=v(ae,xt,Pe,He,ue,12,d[5]),He=v(He,ae,xt,Pe,se,17,d[6]),Pe=v(Pe,He,ae,xt,Oe,22,d[7]),xt=v(xt,Pe,He,ae,oe,7,d[8]),ae=v(ae,xt,Pe,He,Z,12,d[9]),He=v(He,ae,xt,Pe,de,17,d[10]),Pe=v(Pe,He,ae,xt,q,22,d[11]),xt=v(xt,Pe,He,ae,Ve,7,d[12]),ae=v(ae,xt,Pe,He,qe,12,d[13]),He=v(He,ae,xt,Pe,Ft,17,d[14]),xt=_(xt,Pe=v(Pe,He,ae,xt,Lt,22,d[15]),He,ae,j,5,d[16]),ae=_(ae,xt,Pe,He,se,9,d[17]),He=_(He,ae,xt,Pe,q,14,d[18]),Pe=_(Pe,He,ae,xt,fe,20,d[19]),xt=_(xt,Pe,He,ae,ue,5,d[20]),ae=_(ae,xt,Pe,He,de,9,d[21]),He=_(He,ae,xt,Pe,Lt,14,d[22]),Pe=_(Pe,He,ae,xt,ee,20,d[23]),xt=_(xt,Pe,He,ae,Z,5,d[24]),ae=_(ae,xt,Pe,He,Ft,9,d[25]),He=_(He,ae,xt,Pe,N,14,d[26]),Pe=_(Pe,He,ae,xt,oe,20,d[27]),xt=_(xt,Pe,He,ae,qe,5,d[28]),ae=_(ae,xt,Pe,He,$,9,d[29]),He=_(He,ae,xt,Pe,Oe,14,d[30]),xt=m(xt,Pe=_(Pe,He,ae,xt,Ve,20,d[31]),He,ae,ue,4,d[32]),ae=m(ae,xt,Pe,He,oe,11,d[33]),He=m(He,ae,xt,Pe,q,16,d[34]),Pe=m(Pe,He,ae,xt,Ft,23,d[35]),xt=m(xt,Pe,He,ae,j,4,d[36]),ae=m(ae,xt,Pe,He,ee,11,d[37]),He=m(He,ae,xt,Pe,Oe,16,d[38]),Pe=m(Pe,He,ae,xt,de,23,d[39]),xt=m(xt,Pe,He,ae,qe,4,d[40]),ae=m(ae,xt,Pe,He,fe,11,d[41]),He=m(He,ae,xt,Pe,N,16,d[42]),Pe=m(Pe,He,ae,xt,se,23,d[43]),xt=m(xt,Pe,He,ae,Z,4,d[44]),ae=m(ae,xt,Pe,He,Ve,11,d[45]),He=m(He,ae,xt,Pe,Lt,16,d[46]),xt=C(xt,Pe=m(Pe,He,ae,xt,$,23,d[47]),He,ae,fe,6,d[48]),ae=C(ae,xt,Pe,He,Oe,10,d[49]),He=C(He,ae,xt,Pe,Ft,15,d[50]),Pe=C(Pe,He,ae,xt,ue,21,d[51]),xt=C(xt,Pe,He,ae,Ve,6,d[52]),ae=C(ae,xt,Pe,He,N,10,d[53]),He=C(He,ae,xt,Pe,de,15,d[54]),Pe=C(Pe,He,ae,xt,j,21,d[55]),xt=C(xt,Pe,He,ae,oe,6,d[56]),ae=C(ae,xt,Pe,He,Lt,10,d[57]),He=C(He,ae,xt,Pe,se,15,d[58]),Pe=C(Pe,He,ae,xt,qe,21,d[59]),xt=C(xt,Pe,He,ae,ee,6,d[60]),ae=C(ae,xt,Pe,He,q,10,d[61]),He=C(He,ae,xt,Pe,$,15,d[62]),Pe=C(Pe,He,ae,xt,Z,21,d[63]),ne[0]=ne[0]+xt|0,ne[1]=ne[1]+Pe|0,ne[2]=ne[2]+He|0,ne[3]=ne[3]+ae|0},_doFinalize:function(){var O=this._data,V=O.words,G=8*this._nDataBytes,Y=8*O.sigBytes;V[Y>>>5]|=128<<24-Y%32;var H=r.floor(G/4294967296),ne=G;V[15+(Y+64>>>9<<4)]=16711935&(H<<8|H>>>24)|4278255360&(H<<24|H>>>8),V[14+(Y+64>>>9<<4)]=16711935&(ne<<8|ne>>>24)|4278255360&(ne<<24|ne>>>8),O.sigBytes=4*(V.length+1),this._process();for(var fe=this._hash,j=fe.words,$=0;$<4;$++){var N=j[$];j[$]=16711935&(N<<8|N>>>24)|4278255360&(N<<24|N>>>8)}return fe},clone:function(){var O=E.clone.call(this);return O._hash=this._hash.clone(),O}});function v(O,V,G,Y,H,ne,fe){var j=O+(V&G|~V&Y)+H+fe;return(j<>>32-ne)+V}function _(O,V,G,Y,H,ne,fe){var j=O+(V&Y|G&~Y)+H+fe;return(j<>>32-ne)+V}function m(O,V,G,Y,H,ne,fe){var j=O+(V^G^Y)+H+fe;return(j<>>32-ne)+V}function C(O,V,G,Y,H,ne,fe){var j=O+(G^(V|~Y))+H+fe;return(j<>>32-ne)+V}l.MD5=E._createHelper(g),l.HmacMD5=E._createHmacHelper(g)}(Math),n.MD5)},4424:function(Je,F,s){var n;Je.exports=(n=s(7585),s(3057),n.mode.CFB=function(){var r=n.lib.BlockCipherMode.extend();function l(u,o,E,x){var d,g=this._iv;g?(d=g.slice(0),this._iv=void 0):d=this._prevBlock,x.encryptBlock(d,0);for(var v=0;v>24&255)){var x=E>>16&255,d=E>>8&255,g=255&E;255===x?(x=0,255===d?(d=0,255===g?g=0:++g):++d):++x,E=0,E+=x<<16,E+=d<<8,E+=g}else E+=1<<24;return E}var o=r.Encryptor=r.extend({processBlock:function(E,x){var d=this._cipher,g=d.blockSize,v=this._iv,_=this._counter;v&&(_=this._counter=v.slice(0),this._iv=void 0),function u(E){return 0===(E[0]=l(E[0]))&&(E[1]=l(E[1])),E}(_);var m=_.slice(0);d.encryptBlock(m,0);for(var C=0;C>>2]|=E<<24-x%4*8,r.sigBytes+=E},unpad:function(r){r.sigBytes-=255&r.words[r.sigBytes-1>>>2]}},n.pad.Ansix923)},4630:function(Je,F,s){var n;Je.exports=(n=s(7585),s(3057),n.pad.Iso10126={pad:function(r,l){var u=4*l,o=u-r.sigBytes%u;r.concat(n.lib.WordArray.random(o-1)).concat(n.lib.WordArray.create([o<<24],1))},unpad:function(r){r.sigBytes-=255&r.words[r.sigBytes-1>>>2]}},n.pad.Iso10126)},187:function(Je,F,s){var n;Je.exports=(n=s(7585),s(3057),n.pad.Iso97971={pad:function(r,l){r.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(r,l)},unpad:function(r){n.pad.ZeroPadding.unpad(r),r.sigBytes--}},n.pad.Iso97971)},3237:function(Je,F,s){var n;Je.exports=(n=s(7585),s(3057),n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding)},1691:function(Je,F,s){var n;Je.exports=(n=s(7585),s(3057),n.pad.ZeroPadding={pad:function(r,l){var u=4*l;r.clamp(),r.sigBytes+=u-(r.sigBytes%u||u)},unpad:function(r){var l=r.words,u=r.sigBytes-1;for(u=r.sigBytes-1;u>=0;u--)if(l[u>>>2]>>>24-u%4*8&255){r.sigBytes=u+1;break}}},n.pad.ZeroPadding)},8812:function(Je,F,s){var r,l,u,o,E,d,g,n;Je.exports=(n=s(7585),s(5162),s(3764),o=(l=(r=n).lib).WordArray,d=(E=r.algo).HMAC,g=E.PBKDF2=(u=l.Base).extend({cfg:u.extend({keySize:4,hasher:E.SHA1,iterations:1}),init:function(v){this.cfg=this.cfg.extend(v)},compute:function(v,_){for(var m=this.cfg,C=d.create(m.hasher,v),O=o.create(),V=o.create([1]),G=O.words,Y=V.words,H=m.keySize,ne=m.iterations;G.length>>16,_[1],_[0]<<16|_[3]>>>16,_[2],_[1]<<16|_[0]>>>16,_[3],_[2]<<16|_[1]>>>16],O=this._C=[_[2]<<16|_[2]>>>16,4294901760&_[0]|65535&_[1],_[3]<<16|_[3]>>>16,4294901760&_[1]|65535&_[2],_[0]<<16|_[0]>>>16,4294901760&_[2]|65535&_[3],_[1]<<16|_[1]>>>16,4294901760&_[3]|65535&_[0]];this._b=0;for(var V=0;V<4;V++)v.call(this);for(V=0;V<8;V++)O[V]^=C[V+4&7];if(m){var G=m.words,Y=G[0],H=G[1],ne=16711935&(Y<<8|Y>>>24)|4278255360&(Y<<24|Y>>>8),fe=16711935&(H<<8|H>>>24)|4278255360&(H<<24|H>>>8),j=ne>>>16|4294901760&fe,$=fe<<16|65535≠for(O[0]^=ne,O[1]^=j,O[2]^=fe,O[3]^=$,O[4]^=ne,O[5]^=j,O[6]^=fe,O[7]^=$,V=0;V<4;V++)v.call(this)}},_doProcessBlock:function(_,m){var C=this._X;v.call(this),E[0]=C[0]^C[5]>>>16^C[3]<<16,E[1]=C[2]^C[7]>>>16^C[5]<<16,E[2]=C[4]^C[1]>>>16^C[7]<<16,E[3]=C[6]^C[3]>>>16^C[1]<<16;for(var O=0;O<4;O++)E[O]=16711935&(E[O]<<8|E[O]>>>24)|4278255360&(E[O]<<24|E[O]>>>8),_[m+O]^=E[O]},blockSize:4,ivSize:2});function v(){for(var _=this._X,m=this._C,C=0;C<8;C++)x[C]=m[C];for(m[0]=m[0]+1295307597+this._b|0,m[1]=m[1]+3545052371+(m[0]>>>0>>0?1:0)|0,m[2]=m[2]+886263092+(m[1]>>>0>>0?1:0)|0,m[3]=m[3]+1295307597+(m[2]>>>0>>0?1:0)|0,m[4]=m[4]+3545052371+(m[3]>>>0>>0?1:0)|0,m[5]=m[5]+886263092+(m[4]>>>0>>0?1:0)|0,m[6]=m[6]+1295307597+(m[5]>>>0>>0?1:0)|0,m[7]=m[7]+3545052371+(m[6]>>>0>>0?1:0)|0,this._b=m[7]>>>0>>0?1:0,C=0;C<8;C++){var O=_[C]+m[C],V=65535&O,G=O>>>16;d[C]=((V*V>>>17)+V*G>>>15)+G*G^((4294901760&O)*O|0)+((65535&O)*O|0)}_[0]=d[0]+(d[7]<<16|d[7]>>>16)+(d[6]<<16|d[6]>>>16)|0,_[1]=d[1]+(d[0]<<8|d[0]>>>24)+d[7]|0,_[2]=d[2]+(d[1]<<16|d[1]>>>16)+(d[0]<<16|d[0]>>>16)|0,_[3]=d[3]+(d[2]<<8|d[2]>>>24)+d[1]|0,_[4]=d[4]+(d[3]<<16|d[3]>>>16)+(d[2]<<16|d[2]>>>16)|0,_[5]=d[5]+(d[4]<<8|d[4]>>>24)+d[3]|0,_[6]=d[6]+(d[5]<<16|d[5]>>>16)+(d[4]<<16|d[4]>>>16)|0,_[7]=d[7]+(d[6]<<8|d[6]>>>24)+d[5]|0}r.RabbitLegacy=u._createHelper(g)}(),n.RabbitLegacy)},8182:function(Je,F,s){var n;Je.exports=(n=s(7585),s(8319),s(9493),s(7865),s(3057),function(){var r=n,u=r.lib.StreamCipher,E=[],x=[],d=[],g=r.algo.Rabbit=u.extend({_doReset:function(){for(var _=this._key.words,m=this.cfg.iv,C=0;C<4;C++)_[C]=16711935&(_[C]<<8|_[C]>>>24)|4278255360&(_[C]<<24|_[C]>>>8);var O=this._X=[_[0],_[3]<<16|_[2]>>>16,_[1],_[0]<<16|_[3]>>>16,_[2],_[1]<<16|_[0]>>>16,_[3],_[2]<<16|_[1]>>>16],V=this._C=[_[2]<<16|_[2]>>>16,4294901760&_[0]|65535&_[1],_[3]<<16|_[3]>>>16,4294901760&_[1]|65535&_[2],_[0]<<16|_[0]>>>16,4294901760&_[2]|65535&_[3],_[1]<<16|_[1]>>>16,4294901760&_[3]|65535&_[0]];for(this._b=0,C=0;C<4;C++)v.call(this);for(C=0;C<8;C++)V[C]^=O[C+4&7];if(m){var G=m.words,Y=G[0],H=G[1],ne=16711935&(Y<<8|Y>>>24)|4278255360&(Y<<24|Y>>>8),fe=16711935&(H<<8|H>>>24)|4278255360&(H<<24|H>>>8),j=ne>>>16|4294901760&fe,$=fe<<16|65535≠for(V[0]^=ne,V[1]^=j,V[2]^=fe,V[3]^=$,V[4]^=ne,V[5]^=j,V[6]^=fe,V[7]^=$,C=0;C<4;C++)v.call(this)}},_doProcessBlock:function(_,m){var C=this._X;v.call(this),E[0]=C[0]^C[5]>>>16^C[3]<<16,E[1]=C[2]^C[7]>>>16^C[5]<<16,E[2]=C[4]^C[1]>>>16^C[7]<<16,E[3]=C[6]^C[3]>>>16^C[1]<<16;for(var O=0;O<4;O++)E[O]=16711935&(E[O]<<8|E[O]>>>24)|4278255360&(E[O]<<24|E[O]>>>8),_[m+O]^=E[O]},blockSize:4,ivSize:2});function v(){for(var _=this._X,m=this._C,C=0;C<8;C++)x[C]=m[C];for(m[0]=m[0]+1295307597+this._b|0,m[1]=m[1]+3545052371+(m[0]>>>0>>0?1:0)|0,m[2]=m[2]+886263092+(m[1]>>>0>>0?1:0)|0,m[3]=m[3]+1295307597+(m[2]>>>0>>0?1:0)|0,m[4]=m[4]+3545052371+(m[3]>>>0>>0?1:0)|0,m[5]=m[5]+886263092+(m[4]>>>0>>0?1:0)|0,m[6]=m[6]+1295307597+(m[5]>>>0>>0?1:0)|0,m[7]=m[7]+3545052371+(m[6]>>>0>>0?1:0)|0,this._b=m[7]>>>0>>0?1:0,C=0;C<8;C++){var O=_[C]+m[C],V=65535&O,G=O>>>16;d[C]=((V*V>>>17)+V*G>>>15)+G*G^((4294901760&O)*O|0)+((65535&O)*O|0)}_[0]=d[0]+(d[7]<<16|d[7]>>>16)+(d[6]<<16|d[6]>>>16)|0,_[1]=d[1]+(d[0]<<8|d[0]>>>24)+d[7]|0,_[2]=d[2]+(d[1]<<16|d[1]>>>16)+(d[0]<<16|d[0]>>>16)|0,_[3]=d[3]+(d[2]<<8|d[2]>>>24)+d[1]|0,_[4]=d[4]+(d[3]<<16|d[3]>>>16)+(d[2]<<16|d[2]>>>16)|0,_[5]=d[5]+(d[4]<<8|d[4]>>>24)+d[3]|0,_[6]=d[6]+(d[5]<<16|d[5]>>>16)+(d[4]<<16|d[4]>>>16)|0,_[7]=d[7]+(d[6]<<8|d[6]>>>24)+d[5]|0}r.Rabbit=u._createHelper(g)}(),n.Rabbit)},486:function(Je,F,s){var n;Je.exports=(n=s(7585),s(8319),s(9493),s(7865),s(3057),function(){var r=n,u=r.lib.StreamCipher,o=r.algo,E=o.RC4=u.extend({_doReset:function(){for(var g=this._key,v=g.words,_=g.sigBytes,m=this._S=[],C=0;C<256;C++)m[C]=C;C=0;for(var O=0;C<256;C++){var V=C%_,Y=m[C];m[C]=m[O=(O+m[C]+(v[V>>>2]>>>24-V%4*8&255))%256],m[O]=Y}this._i=this._j=0},_doProcessBlock:function(g,v){g[v]^=x.call(this)},keySize:8,ivSize:0});function x(){for(var g=this._S,v=this._i,_=this._j,m=0,C=0;C<4;C++){var O=g[v=(v+1)%256];g[v]=g[_=(_+g[v])%256],g[_]=O,m|=g[(g[v]+g[_])%256]<<24-8*C}return this._i=v,this._j=_,m}r.RC4=u._createHelper(E);var d=o.RC4Drop=E.extend({cfg:E.cfg.extend({drop:192}),_doReset:function(){E._doReset.call(this);for(var g=this.cfg.drop;g>0;g--)x.call(this)}});r.RC4Drop=u._createHelper(d)}(),n.RC4)},4973:function(Je,F,s){var n;Je.exports=(n=s(7585),function(r){var l=n,u=l.lib,o=u.WordArray,E=u.Hasher,x=l.algo,d=o.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),g=o.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),v=o.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),_=o.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),m=o.create([0,1518500249,1859775393,2400959708,2840853838]),C=o.create([1352829926,1548603684,1836072691,2053994217,0]),O=x.RIPEMD160=E.extend({_doReset:function(){this._hash=o.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(j,$){for(var N=0;N<16;N++){var ee=$+N,ue=j[ee];j[ee]=16711935&(ue<<8|ue>>>24)|4278255360&(ue<<24|ue>>>8)}var qe,Ft,Lt,xt,Pe,He,ae,be,he,Be,Ce,se=this._hash.words,Oe=m.words,oe=C.words,Z=d.words,de=g.words,q=v.words,Ve=_.words;for(He=qe=se[0],ae=Ft=se[1],be=Lt=se[2],he=xt=se[3],Be=Pe=se[4],N=0;N<80;N+=1)Ce=qe+j[$+Z[N]]|0,Ce+=N<16?V(Ft,Lt,xt)+Oe[0]:N<32?G(Ft,Lt,xt)+Oe[1]:N<48?Y(Ft,Lt,xt)+Oe[2]:N<64?H(Ft,Lt,xt)+Oe[3]:ne(Ft,Lt,xt)+Oe[4],Ce=(Ce=fe(Ce|=0,q[N]))+Pe|0,qe=Pe,Pe=xt,xt=fe(Lt,10),Lt=Ft,Ft=Ce,Ce=He+j[$+de[N]]|0,Ce+=N<16?ne(ae,be,he)+oe[0]:N<32?H(ae,be,he)+oe[1]:N<48?Y(ae,be,he)+oe[2]:N<64?G(ae,be,he)+oe[3]:V(ae,be,he)+oe[4],Ce=(Ce=fe(Ce|=0,Ve[N]))+Be|0,He=Be,Be=he,he=fe(be,10),be=ae,ae=Ce;Ce=se[1]+Lt+he|0,se[1]=se[2]+xt+Be|0,se[2]=se[3]+Pe+He|0,se[3]=se[4]+qe+ae|0,se[4]=se[0]+Ft+be|0,se[0]=Ce},_doFinalize:function(){var j=this._data,$=j.words,N=8*this._nDataBytes,ee=8*j.sigBytes;$[ee>>>5]|=128<<24-ee%32,$[14+(ee+64>>>9<<4)]=16711935&(N<<8|N>>>24)|4278255360&(N<<24|N>>>8),j.sigBytes=4*($.length+1),this._process();for(var ue=this._hash,se=ue.words,Oe=0;Oe<5;Oe++){var oe=se[Oe];se[Oe]=16711935&(oe<<8|oe>>>24)|4278255360&(oe<<24|oe>>>8)}return ue},clone:function(){var j=E.clone.call(this);return j._hash=this._hash.clone(),j}});function V(j,$,N){return j^$^N}function G(j,$,N){return j&$|~j&N}function Y(j,$,N){return(j|~$)^N}function H(j,$,N){return j&N|$&~N}function ne(j,$,N){return j^($|~N)}function fe(j,$){return j<<$|j>>>32-$}l.RIPEMD160=E._createHelper(O),l.HmacRIPEMD160=E._createHmacHelper(O)}(Math),n.RIPEMD160)},5162:function(Je,F,s){var r,l,u,o,x,d,n;Je.exports=(n=s(7585),u=(l=(r=n).lib).WordArray,x=[],d=r.algo.SHA1=(o=l.Hasher).extend({_doReset:function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(g,v){for(var _=this._hash.words,m=_[0],C=_[1],O=_[2],V=_[3],G=_[4],Y=0;Y<80;Y++){if(Y<16)x[Y]=0|g[v+Y];else{var H=x[Y-3]^x[Y-8]^x[Y-14]^x[Y-16];x[Y]=H<<1|H>>>31}var ne=(m<<5|m>>>27)+G+x[Y];ne+=Y<20?1518500249+(C&O|~C&V):Y<40?1859775393+(C^O^V):Y<60?(C&O|C&V|O&V)-1894007588:(C^O^V)-899497514,G=V,V=O,O=C<<30|C>>>2,C=m,m=ne}_[0]=_[0]+m|0,_[1]=_[1]+C|0,_[2]=_[2]+O|0,_[3]=_[3]+V|0,_[4]=_[4]+G|0},_doFinalize:function(){var g=this._data,v=g.words,_=8*this._nDataBytes,m=8*g.sigBytes;return v[m>>>5]|=128<<24-m%32,v[14+(m+64>>>9<<4)]=Math.floor(_/4294967296),v[15+(m+64>>>9<<4)]=_,g.sigBytes=4*v.length,this._process(),this._hash},clone:function(){var g=o.clone.call(this);return g._hash=this._hash.clone(),g}}),r.SHA1=o._createHelper(d),r.HmacSHA1=o._createHmacHelper(d),n.SHA1)},8769:function(Je,F,s){var r,u,o,E,x,n;Je.exports=(n=s(7585),s(1817),u=(r=n).lib.WordArray,x=(o=r.algo).SHA224=(E=o.SHA256).extend({_doReset:function(){this._hash=new u.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var d=E._doFinalize.call(this);return d.sigBytes-=4,d}}),r.SHA224=E._createHelper(x),r.HmacSHA224=E._createHmacHelper(x),n.SHA224)},1817:function(Je,F,s){var n;Je.exports=(n=s(7585),function(r){var l=n,u=l.lib,o=u.WordArray,E=u.Hasher,x=l.algo,d=[],g=[];!function(){function m(G){for(var Y=r.sqrt(G),H=2;H<=Y;H++)if(!(G%H))return!1;return!0}function C(G){return 4294967296*(G-(0|G))|0}for(var O=2,V=0;V<64;)m(O)&&(V<8&&(d[V]=C(r.pow(O,.5))),g[V]=C(r.pow(O,1/3)),V++),O++}();var v=[],_=x.SHA256=E.extend({_doReset:function(){this._hash=new o.init(d.slice(0))},_doProcessBlock:function(m,C){for(var O=this._hash.words,V=O[0],G=O[1],Y=O[2],H=O[3],ne=O[4],fe=O[5],j=O[6],$=O[7],N=0;N<64;N++){if(N<16)v[N]=0|m[C+N];else{var ee=v[N-15],se=v[N-2];v[N]=((ee<<25|ee>>>7)^(ee<<14|ee>>>18)^ee>>>3)+v[N-7]+((se<<15|se>>>17)^(se<<13|se>>>19)^se>>>10)+v[N-16]}var Z=V&G^V&Y^G&Y,Ve=$+((ne<<26|ne>>>6)^(ne<<21|ne>>>11)^(ne<<7|ne>>>25))+(ne&fe^~ne&j)+g[N]+v[N];$=j,j=fe,fe=ne,ne=H+Ve|0,H=Y,Y=G,G=V,V=Ve+(((V<<30|V>>>2)^(V<<19|V>>>13)^(V<<10|V>>>22))+Z)|0}O[0]=O[0]+V|0,O[1]=O[1]+G|0,O[2]=O[2]+Y|0,O[3]=O[3]+H|0,O[4]=O[4]+ne|0,O[5]=O[5]+fe|0,O[6]=O[6]+j|0,O[7]=O[7]+$|0},_doFinalize:function(){var m=this._data,C=m.words,O=8*this._nDataBytes,V=8*m.sigBytes;return C[V>>>5]|=128<<24-V%32,C[14+(V+64>>>9<<4)]=r.floor(O/4294967296),C[15+(V+64>>>9<<4)]=O,m.sigBytes=4*C.length,this._process(),this._hash},clone:function(){var m=E.clone.call(this);return m._hash=this._hash.clone(),m}});l.SHA256=E._createHelper(_),l.HmacSHA256=E._createHmacHelper(_)}(Math),n.SHA256)},1971:function(Je,F,s){var n;Je.exports=(n=s(7585),s(401),function(r){var l=n,u=l.lib,o=u.WordArray,E=u.Hasher,d=l.x64.Word,g=l.algo,v=[],_=[],m=[];!function(){for(var V=1,G=0,Y=0;Y<24;Y++){v[V+5*G]=(Y+1)*(Y+2)/2%64;var ne=(2*V+3*G)%5;V=G%5,G=ne}for(V=0;V<5;V++)for(G=0;G<5;G++)_[V+5*G]=G+(2*V+3*G)%5*5;for(var fe=1,j=0;j<24;j++){for(var $=0,N=0,ee=0;ee<7;ee++){if(1&fe){var ue=(1<>>24)|4278255360&(fe<<24|fe>>>8),($=Y[ne]).high^=j=16711935&(j<<8|j>>>24)|4278255360&(j<<24|j>>>8),$.low^=fe}for(var N=0;N<24;N++){for(var ee=0;ee<5;ee++){for(var ue=0,se=0,Oe=0;Oe<5;Oe++)ue^=($=Y[ee+5*Oe]).high,se^=$.low;var oe=C[ee];oe.high=ue,oe.low=se}for(ee=0;ee<5;ee++){var Z=C[(ee+4)%5],de=C[(ee+1)%5],q=de.high,Ve=de.low;for(ue=Z.high^(q<<1|Ve>>>31),se=Z.low^(Ve<<1|q>>>31),Oe=0;Oe<5;Oe++)($=Y[ee+5*Oe]).high^=ue,$.low^=se}for(var qe=1;qe<25;qe++){var Ft=($=Y[qe]).high,Lt=$.low,xt=v[qe];xt<32?(ue=Ft<>>32-xt,se=Lt<>>32-xt):(ue=Lt<>>64-xt,se=Ft<>>64-xt);var Pe=C[_[qe]];Pe.high=ue,Pe.low=se}var He=C[0],ae=Y[0];for(He.high=ae.high,He.low=ae.low,ee=0;ee<5;ee++)for(Oe=0;Oe<5;Oe++){var be=C[qe=ee+5*Oe],he=C[(ee+1)%5+5*Oe],Be=C[(ee+2)%5+5*Oe];($=Y[qe]).high=be.high^~he.high&Be.high,$.low=be.low^~he.low&Be.low}var $,Ce=m[N];($=Y[0]).high^=Ce.high,$.low^=Ce.low}},_doFinalize:function(){var V=this._data,G=V.words,H=8*V.sigBytes,ne=32*this.blockSize;G[H>>>5]|=1<<24-H%32,G[(r.ceil((H+1)/ne)*ne>>>5)-1]|=128,V.sigBytes=4*G.length,this._process();for(var fe=this._state,j=this.cfg.outputLength/8,$=j/8,N=[],ee=0;ee<$;ee++){var ue=fe[ee],se=ue.high,Oe=ue.low;se=16711935&(se<<8|se>>>24)|4278255360&(se<<24|se>>>8),N.push(Oe=16711935&(Oe<<8|Oe>>>24)|4278255360&(Oe<<24|Oe>>>8)),N.push(se)}return new o.init(N,j)},clone:function(){for(var V=E.clone.call(this),G=V._state=this._state.slice(0),Y=0;Y<25;Y++)G[Y]=G[Y].clone();return V}});l.SHA3=E._createHelper(O),l.HmacSHA3=E._createHmacHelper(O)}(Math),n.SHA3)},6787:function(Je,F,s){var r,l,u,o,E,x,d,n;Je.exports=(n=s(7585),s(401),s(3351),u=(l=(r=n).x64).Word,o=l.WordArray,d=(E=r.algo).SHA384=(x=E.SHA512).extend({_doReset:function(){this._hash=new o.init([new u.init(3418070365,3238371032),new u.init(1654270250,914150663),new u.init(2438529370,812702999),new u.init(355462360,4144912697),new u.init(1731405415,4290775857),new u.init(2394180231,1750603025),new u.init(3675008525,1694076839),new u.init(1203062813,3204075428)])},_doFinalize:function(){var g=x._doFinalize.call(this);return g.sigBytes-=16,g}}),r.SHA384=x._createHelper(d),r.HmacSHA384=x._createHmacHelper(d),n.SHA384)},3351:function(Je,F,s){var n;Je.exports=(n=s(7585),s(401),function(){var r=n,u=r.lib.Hasher,o=r.x64,E=o.Word,x=o.WordArray,d=r.algo;function g(){return E.create.apply(E,arguments)}var v=[g(1116352408,3609767458),g(1899447441,602891725),g(3049323471,3964484399),g(3921009573,2173295548),g(961987163,4081628472),g(1508970993,3053834265),g(2453635748,2937671579),g(2870763221,3664609560),g(3624381080,2734883394),g(310598401,1164996542),g(607225278,1323610764),g(1426881987,3590304994),g(1925078388,4068182383),g(2162078206,991336113),g(2614888103,633803317),g(3248222580,3479774868),g(3835390401,2666613458),g(4022224774,944711139),g(264347078,2341262773),g(604807628,2007800933),g(770255983,1495990901),g(1249150122,1856431235),g(1555081692,3175218132),g(1996064986,2198950837),g(2554220882,3999719339),g(2821834349,766784016),g(2952996808,2566594879),g(3210313671,3203337956),g(3336571891,1034457026),g(3584528711,2466948901),g(113926993,3758326383),g(338241895,168717936),g(666307205,1188179964),g(773529912,1546045734),g(1294757372,1522805485),g(1396182291,2643833823),g(1695183700,2343527390),g(1986661051,1014477480),g(2177026350,1206759142),g(2456956037,344077627),g(2730485921,1290863460),g(2820302411,3158454273),g(3259730800,3505952657),g(3345764771,106217008),g(3516065817,3606008344),g(3600352804,1432725776),g(4094571909,1467031594),g(275423344,851169720),g(430227734,3100823752),g(506948616,1363258195),g(659060556,3750685593),g(883997877,3785050280),g(958139571,3318307427),g(1322822218,3812723403),g(1537002063,2003034995),g(1747873779,3602036899),g(1955562222,1575990012),g(2024104815,1125592928),g(2227730452,2716904306),g(2361852424,442776044),g(2428436474,593698344),g(2756734187,3733110249),g(3204031479,2999351573),g(3329325298,3815920427),g(3391569614,3928383900),g(3515267271,566280711),g(3940187606,3454069534),g(4118630271,4000239992),g(116418474,1914138554),g(174292421,2731055270),g(289380356,3203993006),g(460393269,320620315),g(685471733,587496836),g(852142971,1086792851),g(1017036298,365543100),g(1126000580,2618297676),g(1288033470,3409855158),g(1501505948,4234509866),g(1607167915,987167468),g(1816402316,1246189591)],_=[];!function(){for(var C=0;C<80;C++)_[C]=g()}();var m=d.SHA512=u.extend({_doReset:function(){this._hash=new x.init([new E.init(1779033703,4089235720),new E.init(3144134277,2227873595),new E.init(1013904242,4271175723),new E.init(2773480762,1595750129),new E.init(1359893119,2917565137),new E.init(2600822924,725511199),new E.init(528734635,4215389547),new E.init(1541459225,327033209)])},_doProcessBlock:function(C,O){for(var V=this._hash.words,G=V[0],Y=V[1],H=V[2],ne=V[3],fe=V[4],j=V[5],$=V[6],N=V[7],ee=G.high,ue=G.low,se=Y.high,Oe=Y.low,oe=H.high,Z=H.low,de=ne.high,q=ne.low,Ve=fe.high,qe=fe.low,Ft=j.high,Lt=j.low,xt=$.high,Pe=$.low,He=N.high,ae=N.low,be=ee,he=ue,Be=se,Ce=Oe,nt=oe,ke=Z,wt=de,ge=q,Ie=Ve,ye=qe,Le=Ft,at=Lt,Xe=xt,vt=Pe,Tt=He,ze=ae,me=0;me<80;me++){var w,T,U=_[me];if(me<16)T=U.high=0|C[O+2*me],w=U.low=0|C[O+2*me+1];else{var Ae=_[me-15],Me=Ae.high,xe=Ae.low,le=(xe>>>1|Me<<31)^(xe>>>8|Me<<24)^(xe>>>7|Me<<25),P=_[me-2],z=P.high,Re=P.low,ft=(Re>>>19|z<<13)^(Re<<3|z>>>29)^(Re>>>6|z<<26),Nt=_[me-7],gn=_[me-16],pt=gn.low;U.high=T=(T=(T=((Me>>>1|xe<<31)^(Me>>>8|xe<<24)^Me>>>7)+Nt.high+((w=le+Nt.low)>>>0>>0?1:0))+((z>>>19|Re<<13)^(z<<3|Re>>>29)^z>>>6)+((w+=ft)>>>0>>0?1:0))+gn.high+((w+=pt)>>>0>>0?1:0),U.low=w}var Ct,ut=Ie&Le^~Ie&Xe,st=ye&at^~ye&vt,dt=be&Be^be&nt^Be&nt,jt=(he>>>28|be<<4)^(he<<30|be>>>2)^(he<<25|be>>>7),zt=v[me],Ze=zt.low,Ht=Tt+((Ie>>>14|ye<<18)^(Ie>>>18|ye<<14)^(Ie<<23|ye>>>9))+((Ct=ze+((ye>>>14|Ie<<18)^(ye>>>18|Ie<<14)^(ye<<23|Ie>>>9)))>>>0>>0?1:0),rn=jt+(he&Ce^he&ke^Ce&ke);Tt=Xe,ze=vt,Xe=Le,vt=at,Le=Ie,at=ye,Ie=wt+(Ht=(Ht=(Ht=Ht+ut+((Ct+=st)>>>0>>0?1:0))+zt.high+((Ct+=Ze)>>>0>>0?1:0))+T+((Ct+=w)>>>0>>0?1:0))+((ye=ge+Ct|0)>>>0>>0?1:0)|0,wt=nt,ge=ke,nt=Be,ke=Ce,Be=be,Ce=he,be=Ht+(((be>>>28|he<<4)^(be<<30|he>>>2)^(be<<25|he>>>7))+dt+(rn>>>0>>0?1:0))+((he=Ct+rn|0)>>>0>>0?1:0)|0}ue=G.low=ue+he,G.high=ee+be+(ue>>>0>>0?1:0),Oe=Y.low=Oe+Ce,Y.high=se+Be+(Oe>>>0>>0?1:0),Z=H.low=Z+ke,H.high=oe+nt+(Z>>>0>>0?1:0),q=ne.low=q+ge,ne.high=de+wt+(q>>>0>>0?1:0),qe=fe.low=qe+ye,fe.high=Ve+Ie+(qe>>>0>>0?1:0),Lt=j.low=Lt+at,j.high=Ft+Le+(Lt>>>0>>0?1:0),Pe=$.low=Pe+vt,$.high=xt+Xe+(Pe>>>0>>0?1:0),ae=N.low=ae+ze,N.high=He+Tt+(ae>>>0>>0?1:0)},_doFinalize:function(){var C=this._data,O=C.words,V=8*this._nDataBytes,G=8*C.sigBytes;return O[G>>>5]|=128<<24-G%32,O[30+(G+128>>>10<<5)]=Math.floor(V/4294967296),O[31+(G+128>>>10<<5)]=V,C.sigBytes=4*O.length,this._process(),this._hash.toX32()},clone:function(){var C=u.clone.call(this);return C._hash=this._hash.clone(),C},blockSize:32});r.SHA512=u._createHelper(m),r.HmacSHA512=u._createHmacHelper(m)}(),n.SHA512)},7243:function(Je,F,s){var n;Je.exports=(n=s(7585),s(8319),s(9493),s(7865),s(3057),function(){var r=n,l=r.lib,u=l.WordArray,o=l.BlockCipher,E=r.algo,x=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],d=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],g=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],v=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],_=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],m=E.DES=o.extend({_doReset:function(){for(var Y=this._key.words,H=[],ne=0;ne<56;ne++){var fe=x[ne]-1;H[ne]=Y[fe>>>5]>>>31-fe%32&1}for(var j=this._subKeys=[],$=0;$<16;$++){var N=j[$]=[],ee=g[$];for(ne=0;ne<24;ne++)N[ne/6|0]|=H[(d[ne]-1+ee)%28]<<31-ne%6,N[4+(ne/6|0)]|=H[28+(d[ne+24]-1+ee)%28]<<31-ne%6;for(N[0]=N[0]<<1|N[0]>>>31,ne=1;ne<7;ne++)N[ne]=N[ne]>>>4*(ne-1)+3;N[7]=N[7]<<5|N[7]>>>27}var ue=this._invSubKeys=[];for(ne=0;ne<16;ne++)ue[ne]=j[15-ne]},encryptBlock:function(G,Y){this._doCryptBlock(G,Y,this._subKeys)},decryptBlock:function(G,Y){this._doCryptBlock(G,Y,this._invSubKeys)},_doCryptBlock:function(G,Y,H){this._lBlock=G[Y],this._rBlock=G[Y+1],C.call(this,4,252645135),C.call(this,16,65535),O.call(this,2,858993459),O.call(this,8,16711935),C.call(this,1,1431655765);for(var ne=0;ne<16;ne++){for(var fe=H[ne],j=this._lBlock,$=this._rBlock,N=0,ee=0;ee<8;ee++)N|=v[ee][(($^fe[ee])&_[ee])>>>0];this._lBlock=$,this._rBlock=j^N}var ue=this._lBlock;this._lBlock=this._rBlock,this._rBlock=ue,C.call(this,1,1431655765),O.call(this,8,16711935),O.call(this,2,858993459),C.call(this,16,65535),C.call(this,4,252645135),G[Y]=this._lBlock,G[Y+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function C(G,Y){var H=(this._lBlock>>>G^this._rBlock)&Y;this._rBlock^=H,this._lBlock^=H<>>G^this._lBlock)&Y;this._lBlock^=H,this._rBlock^=H<192.");var H=Y.slice(0,2),ne=Y.length<4?Y.slice(0,2):Y.slice(2,4),fe=Y.length<6?Y.slice(0,2):Y.slice(4,6);this._des1=m.createEncryptor(u.create(H)),this._des2=m.createEncryptor(u.create(ne)),this._des3=m.createEncryptor(u.create(fe))},encryptBlock:function(G,Y){this._des1.encryptBlock(G,Y),this._des2.decryptBlock(G,Y),this._des3.encryptBlock(G,Y)},decryptBlock:function(G,Y){this._des3.decryptBlock(G,Y),this._des2.encryptBlock(G,Y),this._des1.decryptBlock(G,Y)},keySize:6,ivSize:2,blockSize:2});r.TripleDES=o._createHelper(V)}(),n.TripleDES)},401:function(Je,F,s){var u,o,E,x,n;Je.exports=(n=s(7585),o=(u=n.lib).Base,E=u.WordArray,(x=n.x64={}).Word=o.extend({init:function(v,_){this.high=v,this.low=_}}),x.WordArray=o.extend({init:function(v,_){v=this.words=v||[],this.sigBytes=null!=_?_:8*v.length},toX32:function(){for(var v=this.words,_=v.length,m=[],C=0;C<_;C++){var O=v[C];m.push(O.high),m.push(O.low)}return E.create(m,this.sigBytes)},clone:function(){for(var v=o.clone.call(this),_=v.words=this.words.slice(0),m=_.length,C=0;C{Je.exports=typeof self<"u"?self:typeof window<"u"?window:Function("return this")()},7410:(Je,F,s)=>{Je.exports=s(3213),Je.exports.parser=s(552)},3213:(Je,F,s)=>{var n=s(1497),r=s(1264),l=s(2534)("engine.io-client:socket"),u=s(4068),o=s(552),E=s(1884),x=s(3257);function d(v,_){if(!(this instanceof d))return new d(v,_);_=_||{},v&&"object"==typeof v&&(_=v,v=null),v?(v=E(v),_.hostname=v.host,_.secure="https"===v.protocol||"wss"===v.protocol,_.port=v.port,v.query&&(_.query=v.query)):_.host&&(_.hostname=E(_.host).host),this.secure=null!=_.secure?_.secure:typeof location<"u"&&"https:"===location.protocol,_.hostname&&!_.port&&(_.port=this.secure?"443":"80"),this.agent=_.agent||!1,this.hostname=_.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=_.port||(typeof location<"u"&&location.port?location.port:this.secure?443:80),this.query=_.query||{},"string"==typeof this.query&&(this.query=x.decode(this.query)),this.upgrade=!1!==_.upgrade,this.path=(_.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!_.forceJSONP,this.jsonp=!1!==_.jsonp,this.forceBase64=!!_.forceBase64,this.enablesXDR=!!_.enablesXDR,this.withCredentials=!1!==_.withCredentials,this.timestampParam=_.timestampParam||"t",this.timestampRequests=_.timestampRequests,this.transports=_.transports||["polling","websocket"],this.transportOptions=_.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=_.policyPort||843,this.rememberUpgrade=_.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=_.onlyBinaryUpgrades,this.perMessageDeflate=!1!==_.perMessageDeflate&&(_.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=_.pfx||void 0,this.key=_.key||void 0,this.passphrase=_.passphrase||void 0,this.cert=_.cert||void 0,this.ca=_.ca||void 0,this.ciphers=_.ciphers||void 0,this.rejectUnauthorized=void 0===_.rejectUnauthorized||_.rejectUnauthorized,this.forceNode=!!_.forceNode,this.isReactNative=typeof navigator<"u"&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),(typeof self>"u"||this.isReactNative)&&(_.extraHeaders&&Object.keys(_.extraHeaders).length>0&&(this.extraHeaders=_.extraHeaders),_.localAddress&&(this.localAddress=_.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}Je.exports=d,d.priorWebsocketSuccess=!1,r(d.prototype),d.protocol=o.protocol,d.Socket=d,d.Transport=s(3330),d.transports=s(1497),d.parser=s(552),d.prototype.createTransport=function(v){l('creating transport "%s"',v);var _=function g(v){var _={};for(var m in v)v.hasOwnProperty(m)&&(_[m]=v[m]);return _}(this.query);_.EIO=o.protocol,_.transport=v;var m=this.transportOptions[v]||{};return this.id&&(_.sid=this.id),new n[v]({query:_,socket:this,agent:m.agent||this.agent,hostname:m.hostname||this.hostname,port:m.port||this.port,secure:m.secure||this.secure,path:m.path||this.path,forceJSONP:m.forceJSONP||this.forceJSONP,jsonp:m.jsonp||this.jsonp,forceBase64:m.forceBase64||this.forceBase64,enablesXDR:m.enablesXDR||this.enablesXDR,withCredentials:m.withCredentials||this.withCredentials,timestampRequests:m.timestampRequests||this.timestampRequests,timestampParam:m.timestampParam||this.timestampParam,policyPort:m.policyPort||this.policyPort,pfx:m.pfx||this.pfx,key:m.key||this.key,passphrase:m.passphrase||this.passphrase,cert:m.cert||this.cert,ca:m.ca||this.ca,ciphers:m.ciphers||this.ciphers,rejectUnauthorized:m.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:m.perMessageDeflate||this.perMessageDeflate,extraHeaders:m.extraHeaders||this.extraHeaders,forceNode:m.forceNode||this.forceNode,localAddress:m.localAddress||this.localAddress,requestTimeout:m.requestTimeout||this.requestTimeout,protocols:m.protocols||void 0,isReactNative:this.isReactNative})},d.prototype.open=function(){var v;if(this.rememberUpgrade&&d.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))v="websocket";else{if(0===this.transports.length){var _=this;return void setTimeout(function(){_.emit("error","No transports available")},0)}v=this.transports[0]}this.readyState="opening";try{v=this.createTransport(v)}catch{return this.transports.shift(),void this.open()}v.open(),this.setTransport(v)},d.prototype.setTransport=function(v){l("setting transport %s",v.name);var _=this;this.transport&&(l("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=v,v.on("drain",function(){_.onDrain()}).on("packet",function(m){_.onPacket(m)}).on("error",function(m){_.onError(m)}).on("close",function(){_.onClose("transport close")})},d.prototype.probe=function(v){l('probing transport "%s"',v);var _=this.createTransport(v,{probe:1}),m=!1,C=this;function O(){C.onlyBinaryUpgrades&&(m=m||!this.supportsBinary&&C.transport.supportsBinary),m||(l('probe transport "%s" opened',v),_.send([{type:"ping",data:"probe"}]),_.once("packet",function($){if(!m)if("pong"===$.type&&"probe"===$.data){if(l('probe transport "%s" pong',v),C.upgrading=!0,C.emit("upgrading",_),!_)return;d.priorWebsocketSuccess="websocket"===_.name,l('pausing current transport "%s"',C.transport.name),C.transport.pause(function(){m||"closed"!==C.readyState&&(l("changing transport and sending upgrade packet"),fe(),C.setTransport(_),_.send([{type:"upgrade"}]),C.emit("upgrade",_),_=null,C.upgrading=!1,C.flush())})}else{l('probe transport "%s" failed',v);var N=new Error("probe error");N.transport=_.name,C.emit("upgradeError",N)}}))}function V(){m||(m=!0,fe(),_.close(),_=null)}function G(j){var $=new Error("probe error: "+j);$.transport=_.name,V(),l('probe transport "%s" failed because of error: %s',v,j),C.emit("upgradeError",$)}function Y(){G("transport closed")}function H(){G("socket closed")}function ne(j){_&&j.name!==_.name&&(l('"%s" works - aborting "%s"',j.name,_.name),V())}function fe(){_.removeListener("open",O),_.removeListener("error",G),_.removeListener("close",Y),C.removeListener("close",H),C.removeListener("upgrading",ne)}d.priorWebsocketSuccess=!1,_.once("open",O),_.once("error",G),_.once("close",Y),this.once("close",H),this.once("upgrading",ne),_.open()},d.prototype.onOpen=function(){if(l("socket open"),this.readyState="open",d.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){l("starting upgrade probes");for(var v=0,_=this.upgrades.length;v<_;v++)this.probe(this.upgrades[v])}},d.prototype.onPacket=function(v){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(l('socket receive: type "%s", data "%s"',v.type,v.data),this.emit("packet",v),this.emit("heartbeat"),v.type){case"open":this.onHandshake(JSON.parse(v.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var _=new Error("server error");_.code=v.data,this.onError(_);break;case"message":this.emit("data",v.data),this.emit("message",v.data)}else l('packet received with socket readyState "%s"',this.readyState)},d.prototype.onHandshake=function(v){this.emit("handshake",v),this.id=v.sid,this.transport.query.sid=v.sid,this.upgrades=this.filterUpgrades(v.upgrades),this.pingInterval=v.pingInterval,this.pingTimeout=v.pingTimeout,this.onOpen(),"closed"!==this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},d.prototype.onHeartbeat=function(v){clearTimeout(this.pingTimeoutTimer);var _=this;_.pingTimeoutTimer=setTimeout(function(){"closed"!==_.readyState&&_.onClose("ping timeout")},v||_.pingInterval+_.pingTimeout)},d.prototype.setPing=function(){var v=this;clearTimeout(v.pingIntervalTimer),v.pingIntervalTimer=setTimeout(function(){l("writing ping packet - expecting pong within %sms",v.pingTimeout),v.ping(),v.onHeartbeat(v.pingTimeout)},v.pingInterval)},d.prototype.ping=function(){var v=this;this.sendPacket("ping",function(){v.emit("ping")})},d.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},d.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(l("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},d.prototype.write=d.prototype.send=function(v,_,m){return this.sendPacket("message",v,_,m),this},d.prototype.sendPacket=function(v,_,m,C){if("function"==typeof _&&(C=_,_=void 0),"function"==typeof m&&(C=m,m=null),"closing"!==this.readyState&&"closed"!==this.readyState){(m=m||{}).compress=!1!==m.compress;var O={type:v,data:_,options:m};this.emit("packetCreate",O),this.writeBuffer.push(O),C&&this.once("flush",C),this.flush()}},d.prototype.close=function(){if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var v=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?C():_()}):this.upgrading?C():_()}function _(){v.onClose("forced close"),l("socket closing - telling transport to close"),v.transport.close()}function m(){v.removeListener("upgrade",m),v.removeListener("upgradeError",m),_()}function C(){v.once("upgrade",m),v.once("upgradeError",m)}return this},d.prototype.onError=function(v){l("socket error %j",v),d.priorWebsocketSuccess=!1,this.emit("error",v),this.onClose("transport error",v)},d.prototype.onClose=function(v,_){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(l('socket close with reason: "%s"',v),clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",v,_),this.writeBuffer=[],this.prevBufferLen=0)},d.prototype.filterUpgrades=function(v){for(var _=[],m=0,C=v.length;m{var n=s(552),r=s(1264);function l(u){this.path=u.path,this.hostname=u.hostname,this.port=u.port,this.secure=u.secure,this.query=u.query,this.timestampParam=u.timestampParam,this.timestampRequests=u.timestampRequests,this.readyState="",this.agent=u.agent||!1,this.socket=u.socket,this.enablesXDR=u.enablesXDR,this.withCredentials=u.withCredentials,this.pfx=u.pfx,this.key=u.key,this.passphrase=u.passphrase,this.cert=u.cert,this.ca=u.ca,this.ciphers=u.ciphers,this.rejectUnauthorized=u.rejectUnauthorized,this.forceNode=u.forceNode,this.isReactNative=u.isReactNative,this.extraHeaders=u.extraHeaders,this.localAddress=u.localAddress}Je.exports=l,r(l.prototype),l.prototype.onError=function(u,o){var E=new Error(u);return E.type="TransportError",E.description=o,this.emit("error",E),this},l.prototype.open=function(){return("closed"===this.readyState||""===this.readyState)&&(this.readyState="opening",this.doOpen()),this},l.prototype.close=function(){return("opening"===this.readyState||"open"===this.readyState)&&(this.doClose(),this.onClose()),this},l.prototype.send=function(u){if("open"!==this.readyState)throw new Error("Transport not open");this.write(u)},l.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},l.prototype.onData=function(u){var o=n.decodePacket(u,this.socket.binaryType);this.onPacket(o)},l.prototype.onPacket=function(u){this.emit("packet",u)},l.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},1497:(Je,F,s)=>{var n=s(3035),r=s(2889),l=s(6029),u=s(3909);F.polling=function o(E){var d=!1,g=!1,v=!1!==E.jsonp;if(typeof location<"u"){var _="https:"===location.protocol,m=location.port;m||(m=_?443:80),d=E.hostname!==location.hostname||m!==E.port,g=E.secure!==_}if(E.xdomain=d,E.xscheme=g,"open"in new n(E)&&!E.forceJSONP)return new r(E);if(!v)throw new Error("JSONP disabled");return new l(E)},F.websocket=u},6029:(Je,F,s)=>{var n=s(3904),r=s(9471),l=s(851);Je.exports=d;var E,u=/\n/g,o=/\\n/g;function x(){}function d(g){n.call(this,g),this.query=this.query||{},E||(E=l.___eio=l.___eio||[]),this.index=E.length;var v=this;E.push(function(_){v.onData(_)}),this.query.j=this.index,"function"==typeof addEventListener&&addEventListener("beforeunload",function(){v.script&&(v.script.onerror=x)},!1)}r(d,n),d.prototype.supportsBinary=!1,d.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),n.prototype.doClose.call(this)},d.prototype.doPoll=function(){var g=this,v=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),v.async=!0,v.src=this.uri(),v.onerror=function(C){g.onError("jsonp poll error",C)};var _=document.getElementsByTagName("script")[0];_?_.parentNode.insertBefore(v,_):(document.head||document.body).appendChild(v),this.script=v,typeof navigator<"u"&&/gecko/i.test(navigator.userAgent)&&setTimeout(function(){var C=document.createElement("iframe");document.body.appendChild(C),document.body.removeChild(C)},100)},d.prototype.doWrite=function(g,v){var _=this;if(!this.form){var V,m=document.createElement("form"),C=document.createElement("textarea"),O=this.iframeId="eio_iframe_"+this.index;m.className="socketio",m.style.position="absolute",m.style.top="-1000px",m.style.left="-1000px",m.target=O,m.method="POST",m.setAttribute("accept-charset","utf-8"),C.name="d",m.appendChild(C),document.body.appendChild(m),this.form=m,this.area=C}function G(){Y(),v()}function Y(){if(_.iframe)try{_.form.removeChild(_.iframe)}catch(ne){_.onError("jsonp polling iframe removal error",ne)}try{V=document.createElement('