/** Notice * This file contains works from many authors under various (but compatible) licenses. Please see core.txt for more information. **/
(function(){(window.wpCoreControlsBundle=window.wpCoreControlsBundle||[]).push([[14],{357:function(ha,ca,h){h.r(ca);var ba=h(3),aa=h(0);h.n(aa);var fa=h(1),da=h(119);ha=h(36);var z=h(75),y=h(202),f=h(50),e=h(201);h=h(303);var x=window,r=function(){function h(h,n,r){var w=-1===h.indexOf("?")?"?":"&";switch(n){case f.a.NEVER_CACHE:this.url=h+w+"_="+Object(aa.uniqueId)();break;default:this.url=h}this.zf=r;this.request=new XMLHttpRequest;this.request.open("GET",this.url,!0);this.request.setRequestHeader("X-Requested-With",
"XMLHttpRequest");this.request.overrideMimeType?this.request.overrideMimeType("text/plain; charset=x-user-defined"):this.request.setRequestHeader("Accept-Charset","x-user-defined");this.status=e.a.NOT_STARTED}h.prototype.start=function(f,n){var r=this,w=this,x=this.request,y;w.tu=0;f&&Object.keys(f).forEach(function(e){r.request.setRequestHeader(e,f[e])});n&&(this.request.withCredentials=n);this.rA=setInterval(function(){var f=0===window.document.URL.indexOf("file:///");f=200===x.status||f&&0===x.status;
if(x.readyState!==e.b.DONE||f){try{x.responseText}catch(ra){return}w.tu<x.responseText.length&&(y=w.K7())&&w.trigger(h.Events.DATA,[y]);0===x.readyState&&(clearInterval(w.rA),w.trigger(h.Events.DONE))}else clearInterval(w.rA),w.trigger(h.Events.DONE,["Error received return status "+x.status])},1E3);this.request.send(null);this.status=e.a.STARTED};h.prototype.K7=function(){var e=this.request,f=e.responseText;if(0!==f.length)if(this.tu===f.length)clearInterval(this.rA),this.trigger(h.Events.DONE);else return f=
Math.min(this.tu+3E6,f.length),e=x.sO(e,this.tu,!0,f),this.tu=f,e};h.prototype.abort=function(){clearInterval(this.rA);var f=this;this.request.onreadystatechange=function(){Object(fa.h)("StreamingRequest aborted");f.status=e.a.ABORTED;return f.trigger(h.Events.ABORTED)};this.request.abort()};h.prototype.finish=function(){var f=this;this.request.onreadystatechange=function(){f.status=e.a.SUCCESS;return f.trigger(h.Events.DONE)};this.request.abort()};h.Events={DONE:"done",DATA:"data",ABORTED:"aborted"};
return h}();Object(ha.b)(r);var w;(function(e){e[e.LOCAL_HEADER=0]="LOCAL_HEADER";e[e.FILE=1]="FILE";e[e.CENTRAL_DIR=2]="CENTRAL_DIR"})(w||(w={}));var n=function(e){function f(){var f=e.call(this)||this;f.buffer="";f.state=w.LOCAL_HEADER;f.dI=4;f.xk=null;f.Vq=da.c;f.Ml={};return f}Object(ba.c)(f,e);f.prototype.E7=function(e){var h;for(e=this.buffer+e;e.length>=this.Vq;)switch(this.state){case w.LOCAL_HEADER:this.xk=h=this.O7(e.slice(0,this.Vq));if(h.xr!==da.g)throw Error("Wrong signature in local header: "+
h.xr);e=e.slice(this.Vq);this.state=w.FILE;this.Vq=h.fD+h.uo+h.yt+this.dI;this.trigger(f.Events.HEADER,[h]);break;case w.FILE:this.xk.name=e.slice(0,this.xk.uo);this.Ml[this.xk.name]=this.xk;h=this.Vq-this.dI;var n=e.slice(this.xk.uo+this.xk.yt,h);this.trigger(f.Events.FILE,[this.xk.name,n,this.xk.wD]);e=e.slice(h);if(e.slice(0,this.dI)===da.h)this.state=w.LOCAL_HEADER,this.Vq=da.c;else return this.state=w.CENTRAL_DIR,!0}this.buffer=e;return!1};f.Events={HEADER:"header",FILE:"file"};return f}(y.a);
Object(ha.b)(n);ha=function(e){function f(f,h,w,x,y){w=e.call(this,f,w,x)||this;w.url=f;w.stream=new r(f,h);w.Gd=new n;w.YQ=window.createPromiseCapability();w.uR={};w.zf=y;return w}Object(ba.c)(f,e);f.prototype.hv=function(e){var f=this;this.request([this.ji,this.tj,this.ii]);this.stream.on(r.Events.DATA,function(h){try{if(f.Gd.E7(h))return f.stream.finish()}catch(la){throw f.stream.abort(),f.vt(la),e(la),la;}});this.stream.on(r.Events.DONE,function(h){f.m7=!0;f.YQ.resolve();h&&(f.vt(h),e(h))});this.Gd.on(n.Events.HEADER,
Object(aa.bind)(this.tR,this));this.Gd.on(n.Events.FILE,Object(aa.bind)(this.e8,this));return this.stream.start(this.zf,this.withCredentials)};f.prototype.pO=function(e){var f=this;this.YQ.promise.then(function(){e(Object.keys(f.Gd.Ml))})};f.prototype.om=function(){return!0};f.prototype.request=function(e){var f=this;this.m7&&e.forEach(function(e){f.uR[e]||f.iba(e)})};f.prototype.tR=function(){};f.prototype.abort=function(){this.stream&&this.stream.abort()};f.prototype.iba=function(e){this.trigger(z.a.Events.PART_READY,
[{$a:e,error:"Requested part not found",qh:!1,yf:!1}])};f.prototype.e8=function(e,f,h){this.uR[e]=!0;this.trigger(z.a.Events.PART_READY,[{$a:e,data:f,qh:!1,yf:!1,error:null,Qc:h}])};return f}(z.a);Object(h.a)(ha);Object(h.b)(ha);ca["default"]=ha}}]);}).call(this || window)
