Version Description
- 2018-11-27 =
- Improved: plugin ZIP file size is considerably reduced;
- Fixed: sent and scheduled welcome email counts are displayed correctly;
- Fixed: hidden honeypot field in subscription form now also hidden in editor;
- Fixed: email listing renders consistently in PHP 7.0.32;
- Removed: pluggable.php requirement to avoid conflicts with other plugins.
Download this release
Release Info
Developer | wysija |
Plugin | MailPoet Newsletters (New) |
Version | 3.15.0 |
Comparing to | |
See all releases |
Code changes from version 3.14.1 to 3.15.0
- assets/img/in_app_announcements/hello-illustration-for-welcome-emails.png +0 -0
- assets/img/in_app_announcements/new-subscriber-notification.png +0 -0
- assets/img/newsletter/congrat-illu-success.png +0 -0
- assets/img/newsletter/congratulation-page-illustration-transparent-LQ.png +0 -0
- assets/img/newsletter_editor/background-image-demo.mp4 +0 -0
- assets/img/newsletter_editor/editor-drag-demo.mp4 +0 -0
- assets/img/welcome_wizard/mailpoet-logo.png +0 -0
- assets/img/welcome_wizard/woocommerce-auto-emails-tilted.png +0 -0
- assets/js/admin.21ec0663.js +17 -0
- assets/js/admin.ca411beb.js +0 -10441
assets/img/in_app_announcements/hello-illustration-for-welcome-emails.png
DELETED
Binary file
|
assets/img/in_app_announcements/new-subscriber-notification.png
DELETED
Binary file
|
assets/img/newsletter/congrat-illu-success.png
DELETED
Binary file
|
assets/img/newsletter/congratulation-page-illustration-transparent-LQ.png
DELETED
Binary file
|
assets/img/newsletter_editor/background-image-demo.mp4
DELETED
Binary file
|
assets/img/newsletter_editor/editor-drag-demo.mp4
DELETED
Binary file
|
assets/img/welcome_wizard/mailpoet-logo.png
DELETED
Binary file
|
assets/img/welcome_wizard/woocommerce-auto-emails-tilted.png
DELETED
Binary file
|
assets/js/admin.21ec0663.js
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
webpackJsonp([2],Array(22).concat([function(module,exports){"function"==typeof Object.create?module.exports=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})}:module.exports=function(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}},,,,,,,,,,function(module,exports,__webpack_require__){"use strict";function Duplex(options){if(!(this instanceof Duplex))return new Duplex(options);Readable.call(this,options),Writable.call(this,options),options&&!1===options.readable&&(this.readable=!1),options&&!1===options.writable&&(this.writable=!1),this.allowHalfOpen=!0,options&&!1===options.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",onend)}function onend(){this.allowHalfOpen||this._writableState.ended||processNextTick(onEndNT,this)}function onEndNT(self){self.end()}var processNextTick=__webpack_require__(56),objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)keys.push(key);return keys};module.exports=Duplex;var util=__webpack_require__(46);util.inherits=__webpack_require__(22);var Readable=__webpack_require__(264),Writable=__webpack_require__(90);util.inherits(Duplex,Readable);for(var keys=objectKeys(Writable.prototype),v=0;v<keys.length;v++){var method=keys[v];Duplex.prototype[method]||(Duplex.prototype[method]=Writable.prototype[method])}Object.defineProperty(Duplex.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(value){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=value,this._writableState.destroyed=value)}}),Duplex.prototype._destroy=function(err,cb){this.push(null),this.end(),processNextTick(cb,err)}},,,,,,function(module,exports,__webpack_require__){function defineProp(name,value){return delete module.exports[name],module.exports[name]=value,value}var Parser=__webpack_require__(258),DomHandler=__webpack_require__(420);module.exports={Parser:Parser,Tokenizer:__webpack_require__(259),ElementType:__webpack_require__(45),DomHandler:DomHandler,get FeedHandler(){return defineProp("FeedHandler",__webpack_require__(422))},get Stream(){return defineProp("Stream",__webpack_require__(423))},get WritableStream(){return defineProp("WritableStream",__webpack_require__(263))},get ProxyHandler(){return defineProp("ProxyHandler",__webpack_require__(437))},get DomUtils(){return defineProp("DomUtils",__webpack_require__(438))},get CollectingHandler(){return defineProp("CollectingHandler",__webpack_require__(450))},DefaultHandler:DomHandler,get RssHandler(){return defineProp("RssHandler",this.FeedHandler)},parseDOM:function(data,options){var handler=new DomHandler(options);return new Parser(handler,options).end(data),handler.dom},parseFeed:function(feed,options){var handler=new module.exports.FeedHandler(options);return new Parser(handler,options).end(feed),handler.dom},createDomStream:function(cb,options,elementCb){var handler=new DomHandler(cb,options,elementCb);return new Parser(handler,options)},EVENTS:{attribute:2,cdatastart:0,cdataend:0,text:1,processinginstruction:2,comment:1,commentend:0,closetag:1,opentag:2,opentagname:1,error:1,end:0}}},function(module,exports,__webpack_require__){(function(global){module.exports=global.Backbone=__webpack_require__(483)}).call(exports,__webpack_require__(9))},,,,,,function(module,exports){module.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",Doctype:"doctype",isTag:function(elem){return"tag"===elem.type||"script"===elem.type||"style"===elem.type}}},function(module,exports,__webpack_require__){(function(Buffer){function isArray(arg){return Array.isArray?Array.isArray(arg):"[object Array]"===objectToString(arg)}function isBoolean(arg){return"boolean"==typeof arg}function isNull(arg){return null===arg}function isNullOrUndefined(arg){return null==arg}function isNumber(arg){return"number"==typeof arg}function isString(arg){return"string"==typeof arg}function isSymbol(arg){return"symbol"==typeof arg}function isUndefined(arg){return void 0===arg}function isRegExp(re){return"[object RegExp]"===objectToString(re)}function isObject(arg){return"object"==typeof arg&&null!==arg}function isDate(d){return"[object Date]"===objectToString(d)}function isError(e){return"[object Error]"===objectToString(e)||e instanceof Error}function isFunction(arg){return"function"==typeof arg}function isPrimitive(arg){return null===arg||"boolean"==typeof arg||"number"==typeof arg||"string"==typeof arg||"symbol"==typeof arg||void 0===arg}function objectToString(o){return Object.prototype.toString.call(o)}exports.isArray=isArray,exports.isBoolean=isBoolean,exports.isNull=isNull,exports.isNullOrUndefined=isNullOrUndefined,exports.isNumber=isNumber,exports.isString=isString,exports.isSymbol=isSymbol,exports.isUndefined=isUndefined,exports.isRegExp=isRegExp,exports.isObject=isObject,exports.isDate=isDate,exports.isError=isError,exports.isFunction=isFunction,exports.isPrimitive=isPrimitive,exports.isBuffer=Buffer.isBuffer}).call(exports,__webpack_require__(89).Buffer)},,,,,,,,,function(module,exports){function EventEmitter(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function isFunction(arg){return"function"==typeof arg}function isNumber(arg){return"number"==typeof arg}function isObject(arg){return"object"==typeof arg&&null!==arg}function isUndefined(arg){return void 0===arg}module.exports=EventEmitter,EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._maxListeners=void 0,EventEmitter.defaultMaxListeners=10,EventEmitter.prototype.setMaxListeners=function(n){if(!isNumber(n)||n<0||isNaN(n))throw TypeError("n must be a positive number");return this._maxListeners=n,this},EventEmitter.prototype.emit=function(type){var er,handler,len,args,i,listeners;if(this._events||(this._events={}),"error"===type&&(!this._events.error||isObject(this._events.error)&&!this._events.error.length)){if((er=arguments[1])instanceof Error)throw er;var err=new Error('Uncaught, unspecified "error" event. ('+er+")");throw err.context=er,err}if(handler=this._events[type],isUndefined(handler))return!1;if(isFunction(handler))switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:args=Array.prototype.slice.call(arguments,1),handler.apply(this,args)}else if(isObject(handler))for(args=Array.prototype.slice.call(arguments,1),listeners=handler.slice(),len=listeners.length,i=0;i<len;i++)listeners[i].apply(this,args);return!0},EventEmitter.prototype.addListener=function(type,listener){var m;if(!isFunction(listener))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",type,isFunction(listener.listener)?listener.listener:listener),this._events[type]?isObject(this._events[type])?this._events[type].push(listener):this._events[type]=[this._events[type],listener]:this._events[type]=listener,isObject(this._events[type])&&!this._events[type].warned&&(m=isUndefined(this._maxListeners)?EventEmitter.defaultMaxListeners:this._maxListeners)&&m>0&&this._events[type].length>m&&(this._events[type].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[type].length),"function"==typeof console.trace&&console.trace()),this},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.once=function(type,listener){function g(){this.removeListener(type,g),fired||(fired=!0,listener.apply(this,arguments))}if(!isFunction(listener))throw TypeError("listener must be a function");var fired=!1;return g.listener=listener,this.on(type,g),this},EventEmitter.prototype.removeListener=function(type,listener){var list,position,length,i;if(!isFunction(listener))throw TypeError("listener must be a function");if(!this._events||!this._events[type])return this;if(list=this._events[type],length=list.length,position=-1,list===listener||isFunction(list.listener)&&list.listener===listener)delete this._events[type],this._events.removeListener&&this.emit("removeListener",type,listener);else if(isObject(list)){for(i=length;i-- >0;)if(list[i]===listener||list[i].listener&&list[i].listener===listener){position=i;break}if(position<0)return this;1===list.length?(list.length=0,delete this._events[type]):list.splice(position,1),this._events.removeListener&&this.emit("removeListener",type,listener)}return this},EventEmitter.prototype.removeAllListeners=function(type){var key,listeners;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[type]&&delete this._events[type],this;if(0===arguments.length){for(key in this._events)"removeListener"!==key&&this.removeAllListeners(key);return this.removeAllListeners("removeListener"),this._events={},this}if(listeners=this._events[type],isFunction(listeners))this.removeListener(type,listeners);else if(listeners)for(;listeners.length;)this.removeListener(type,listeners[listeners.length-1]);return delete this._events[type],this},EventEmitter.prototype.listeners=function(type){return this._events&&this._events[type]?isFunction(this._events[type])?[this._events[type]]:this._events[type].slice():[]},EventEmitter.prototype.listenerCount=function(type){if(this._events){var evlistener=this._events[type];if(isFunction(evlistener))return 1;if(evlistener)return evlistener.length}return 0},EventEmitter.listenerCount=function(emitter,type){return emitter.listenerCount(type)}},function(module,exports,__webpack_require__){"use strict";(function(process){function nextTick(fn,arg1,arg2,arg3){if("function"!=typeof fn)throw new TypeError('"callback" argument must be a function');var args,i,len=arguments.length;switch(len){case 0:case 1:return process.nextTick(fn);case 2:return process.nextTick(function(){fn.call(null,arg1)});case 3:return process.nextTick(function(){fn.call(null,arg1,arg2)});case 4:return process.nextTick(function(){fn.call(null,arg1,arg2,arg3)});default:for(args=new Array(len-1),i=0;i<args.length;)args[i++]=arguments[i];return process.nextTick(function(){fn.apply(null,args)})}}!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?module.exports=nextTick:module.exports=process.nextTick}).call(exports,__webpack_require__(1))},function(module,exports,__webpack_require__){function copyProps(src,dst){for(var key in src)dst[key]=src[key]}function SafeBuffer(arg,encodingOrOffset,length){return Buffer(arg,encodingOrOffset,length)}var buffer=__webpack_require__(89),Buffer=buffer.Buffer;Buffer.from&&Buffer.alloc&&Buffer.allocUnsafe&&Buffer.allocUnsafeSlow?module.exports=buffer:(copyProps(buffer,exports),exports.Buffer=SafeBuffer),copyProps(Buffer,SafeBuffer),SafeBuffer.from=function(arg,encodingOrOffset,length){if("number"==typeof arg)throw new TypeError("Argument must not be a number");return Buffer(arg,encodingOrOffset,length)},SafeBuffer.alloc=function(size,fill,encoding){if("number"!=typeof size)throw new TypeError("Argument must be a number");var buf=Buffer(size);return void 0!==fill?"string"==typeof encoding?buf.fill(fill,encoding):buf.fill(fill):buf.fill(0),buf},SafeBuffer.allocUnsafe=function(size){if("number"!=typeof size)throw new TypeError("Argument must be a number");return Buffer(size)},SafeBuffer.allocUnsafeSlow=function(size){if("number"!=typeof size)throw new TypeError("Argument must be a number");return buffer.SlowBuffer(size)}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(module,exports){module.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""}},function(module,exports){module.exports={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}},function(module,exports,__webpack_require__){exports=module.exports=__webpack_require__(264),exports.Stream=exports,exports.Readable=exports,exports.Writable=__webpack_require__(90),exports.Duplex=__webpack_require__(32),exports.Transform=__webpack_require__(269),exports.PassThrough=__webpack_require__(431)},function(module,exports,__webpack_require__){"use strict";(function(global){function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(that,length){if(kMaxLength()<length)throw new RangeError("Invalid typed array length");return Buffer.TYPED_ARRAY_SUPPORT?(that=new Uint8Array(length),that.__proto__=Buffer.prototype):(null===that&&(that=new Buffer(length)),that.length=length),that}function Buffer(arg,encodingOrOffset,length){if(!(Buffer.TYPED_ARRAY_SUPPORT||this instanceof Buffer))return new Buffer(arg,encodingOrOffset,length);if("number"==typeof arg){if("string"==typeof encodingOrOffset)throw new Error("If encoding is specified then the first argument must be a string");return allocUnsafe(this,arg)}return from(this,arg,encodingOrOffset,length)}function from(that,value,encodingOrOffset,length){if("number"==typeof value)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&value instanceof ArrayBuffer?fromArrayBuffer(that,value,encodingOrOffset,length):"string"==typeof value?fromString(that,value,encodingOrOffset):fromObject(that,value)}function assertSize(size){if("number"!=typeof size)throw new TypeError('"size" argument must be a number');if(size<0)throw new RangeError('"size" argument must not be negative')}function alloc(that,size,fill,encoding){return assertSize(size),size<=0?createBuffer(that,size):void 0!==fill?"string"==typeof encoding?createBuffer(that,size).fill(fill,encoding):createBuffer(that,size).fill(fill):createBuffer(that,size)}function allocUnsafe(that,size){if(assertSize(size),that=createBuffer(that,size<0?0:0|checked(size)),!Buffer.TYPED_ARRAY_SUPPORT)for(var i=0;i<size;++i)that[i]=0;return that}function fromString(that,string,encoding){if("string"==typeof encoding&&""!==encoding||(encoding="utf8"),!Buffer.isEncoding(encoding))throw new TypeError('"encoding" must be a valid string encoding');var length=0|byteLength(string,encoding);that=createBuffer(that,length);var actual=that.write(string,encoding);return actual!==length&&(that=that.slice(0,actual)),that}function fromArrayLike(that,array){var length=array.length<0?0:0|checked(array.length);that=createBuffer(that,length);for(var i=0;i<length;i+=1)that[i]=255&array[i];return that}function fromArrayBuffer(that,array,byteOffset,length){if(array.byteLength,byteOffset<0||array.byteLength<byteOffset)throw new RangeError("'offset' is out of bounds");if(array.byteLength<byteOffset+(length||0))throw new RangeError("'length' is out of bounds");return array=void 0===byteOffset&&void 0===length?new Uint8Array(array):void 0===length?new Uint8Array(array,byteOffset):new Uint8Array(array,byteOffset,length),Buffer.TYPED_ARRAY_SUPPORT?(that=array,that.__proto__=Buffer.prototype):that=fromArrayLike(that,array),that}function fromObject(that,obj){if(Buffer.isBuffer(obj)){var len=0|checked(obj.length);return that=createBuffer(that,len),0===that.length?that:(obj.copy(that,0,0,len),that)}if(obj){if("undefined"!=typeof ArrayBuffer&&obj.buffer instanceof ArrayBuffer||"length"in obj)return"number"!=typeof obj.length||isnan(obj.length)?createBuffer(that,0):fromArrayLike(that,obj);if("Buffer"===obj.type&&isArray(obj.data))return fromArrayLike(that,obj.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function checked(length){if(length>=kMaxLength())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return 0|length}function SlowBuffer(length){return+length!=length&&(length=0),Buffer.alloc(+length)}function byteLength(string,encoding){if(Buffer.isBuffer(string))return string.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(string)||string instanceof ArrayBuffer))return string.byteLength;"string"!=typeof string&&(string=""+string);var len=string.length;if(0===len)return 0;for(var loweredCase=!1;;)switch(encoding){case"ascii":case"latin1":case"binary":return len;case"utf8":case"utf-8":case void 0:return utf8ToBytes(string).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*len;case"hex":return len>>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase(),loweredCase=!0}}function slowToString(encoding,start,end){var loweredCase=!1;if((void 0===start||start<0)&&(start=0),start>this.length)return"";if((void 0===end||end>this.length)&&(end=this.length),end<=0)return"";if(end>>>=0,start>>>=0,end<=start)return"";for(encoding||(encoding="utf8");;)switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"latin1":case"binary":return latin1Slice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase(),loweredCase=!0}}function swap(b,n,m){var i=b[n];b[n]=b[m],b[m]=i}function bidirectionalIndexOf(buffer,val,byteOffset,encoding,dir){if(0===buffer.length)return-1;if("string"==typeof byteOffset?(encoding=byteOffset,byteOffset=0):byteOffset>2147483647?byteOffset=2147483647:byteOffset<-2147483648&&(byteOffset=-2147483648),byteOffset=+byteOffset,isNaN(byteOffset)&&(byteOffset=dir?0:buffer.length-1),byteOffset<0&&(byteOffset=buffer.length+byteOffset),byteOffset>=buffer.length){if(dir)return-1;byteOffset=buffer.length-1}else if(byteOffset<0){if(!dir)return-1;byteOffset=0}if("string"==typeof val&&(val=Buffer.from(val,encoding)),Buffer.isBuffer(val))return 0===val.length?-1:arrayIndexOf(buffer,val,byteOffset,encoding,dir);if("number"==typeof val)return val&=255,Buffer.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?dir?Uint8Array.prototype.indexOf.call(buffer,val,byteOffset):Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset):arrayIndexOf(buffer,[val],byteOffset,encoding,dir);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(arr,val,byteOffset,encoding,dir){function read(buf,i){return 1===indexSize?buf[i]:buf.readUInt16BE(i*indexSize)}var indexSize=1,arrLength=arr.length,valLength=val.length;if(void 0!==encoding&&("ucs2"===(encoding=String(encoding).toLowerCase())||"ucs-2"===encoding||"utf16le"===encoding||"utf-16le"===encoding)){if(arr.length<2||val.length<2)return-1;indexSize=2,arrLength/=2,valLength/=2,byteOffset/=2}var i;if(dir){var foundIndex=-1;for(i=byteOffset;i<arrLength;i++)if(read(arr,i)===read(val,-1===foundIndex?0:i-foundIndex)){if(-1===foundIndex&&(foundIndex=i),i-foundIndex+1===valLength)return foundIndex*indexSize}else-1!==foundIndex&&(i-=i-foundIndex),foundIndex=-1}else for(byteOffset+valLength>arrLength&&(byteOffset=arrLength-valLength),i=byteOffset;i>=0;i--){for(var found=!0,j=0;j<valLength;j++)if(read(arr,i+j)!==read(val,j)){found=!1;break}if(found)return i}return-1}function hexWrite(buf,string,offset,length){offset=Number(offset)||0;var remaining=buf.length-offset;length?(length=Number(length))>remaining&&(length=remaining):length=remaining;var strLen=string.length;if(strLen%2!=0)throw new TypeError("Invalid hex string");length>strLen/2&&(length=strLen/2);for(var i=0;i<length;++i){var parsed=parseInt(string.substr(2*i,2),16);if(isNaN(parsed))return i;buf[offset+i]=parsed}return i}function utf8Write(buf,string,offset,length){return blitBuffer(utf8ToBytes(string,buf.length-offset),buf,offset,length)}function asciiWrite(buf,string,offset,length){return blitBuffer(asciiToBytes(string),buf,offset,length)}function latin1Write(buf,string,offset,length){return asciiWrite(buf,string,offset,length)}function base64Write(buf,string,offset,length){return blitBuffer(base64ToBytes(string),buf,offset,length)}function ucs2Write(buf,string,offset,length){return blitBuffer(utf16leToBytes(string,buf.length-offset),buf,offset,length)}function base64Slice(buf,start,end){return 0===start&&end===buf.length?base64.fromByteArray(buf):base64.fromByteArray(buf.slice(start,end))}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);for(var res=[],i=start;i<end;){var firstByte=buf[i],codePoint=null,bytesPerSequence=firstByte>239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=end){var secondByte,thirdByte,fourthByte,tempCodePoint;switch(bytesPerSequence){case 1:firstByte<128&&(codePoint=firstByte);break;case 2:secondByte=buf[i+1],128==(192&secondByte)&&(tempCodePoint=(31&firstByte)<<6|63&secondByte)>127&&(codePoint=tempCodePoint);break;case 3:secondByte=buf[i+1],thirdByte=buf[i+2],128==(192&secondByte)&&128==(192&thirdByte)&&(tempCodePoint=(15&firstByte)<<12|(63&secondByte)<<6|63&thirdByte)>2047&&(tempCodePoint<55296||tempCodePoint>57343)&&(codePoint=tempCodePoint);break;case 4:secondByte=buf[i+1],thirdByte=buf[i+2],fourthByte=buf[i+3],128==(192&secondByte)&&128==(192&thirdByte)&&128==(192&fourthByte)&&(tempCodePoint=(15&firstByte)<<18|(63&secondByte)<<12|(63&thirdByte)<<6|63&fourthByte)>65535&&tempCodePoint<1114112&&(codePoint=tempCodePoint)}}null===codePoint?(codePoint=65533,bytesPerSequence=1):codePoint>65535&&(codePoint-=65536,res.push(codePoint>>>10&1023|55296),codePoint=56320|1023&codePoint),res.push(codePoint),i+=bytesPerSequence}return decodeCodePointsArray(res)}function decodeCodePointsArray(codePoints){var len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH)return String.fromCharCode.apply(String,codePoints);for(var res="",i=0;i<len;)res+=String.fromCharCode.apply(String,codePoints.slice(i,i+=MAX_ARGUMENTS_LENGTH));return res}function asciiSlice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;i<end;++i)ret+=String.fromCharCode(127&buf[i]);return ret}function latin1Slice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;i<end;++i)ret+=String.fromCharCode(buf[i]);return ret}function hexSlice(buf,start,end){var len=buf.length;(!start||start<0)&&(start=0),(!end||end<0||end>len)&&(end=len);for(var out="",i=start;i<end;++i)out+=toHex(buf[i]);return out}function utf16leSlice(buf,start,end){for(var bytes=buf.slice(start,end),res="",i=0;i<bytes.length;i+=2)res+=String.fromCharCode(bytes[i]+256*bytes[i+1]);return res}function checkOffset(offset,ext,length){if(offset%1!=0||offset<0)throw new RangeError("offset is not uint");if(offset+ext>length)throw new RangeError("Trying to access beyond buffer length")}function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError('"buffer" argument must be a Buffer instance');if(value>max||value<min)throw new RangeError('"value" argument is out of bounds');if(offset+ext>buf.length)throw new RangeError("Index out of range")}function objectWriteUInt16(buf,value,offset,littleEndian){value<0&&(value=65535+value+1);for(var i=0,j=Math.min(buf.length-offset,2);i<j;++i)buf[offset+i]=(value&255<<8*(littleEndian?i:1-i))>>>8*(littleEndian?i:1-i)}function objectWriteUInt32(buf,value,offset,littleEndian){value<0&&(value=4294967295+value+1);for(var i=0,j=Math.min(buf.length-offset,4);i<j;++i)buf[offset+i]=value>>>8*(littleEndian?i:3-i)&255}function checkIEEE754(buf,value,offset,ext,max,min){if(offset+ext>buf.length)throw new RangeError("Index out of range");if(offset<0)throw new RangeError("Index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){return noAssert||checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38),ieee754.write(buf,value,offset,littleEndian,23,4),offset+4}function writeDouble(buf,value,offset,littleEndian,noAssert){return noAssert||checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308),ieee754.write(buf,value,offset,littleEndian,52,8),offset+8}function base64clean(str){if(str=stringtrim(str).replace(INVALID_BASE64_RE,""),str.length<2)return"";for(;str.length%4!=0;)str+="=";return str}function stringtrim(str){return str.trim?str.trim():str.replace(/^\s+|\s+$/g,"")}function toHex(n){return n<16?"0"+n.toString(16):n.toString(16)}function utf8ToBytes(string,units){units=units||1/0;for(var codePoint,length=string.length,leadSurrogate=null,bytes=[],i=0;i<length;++i){if((codePoint=string.charCodeAt(i))>55295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){(units-=3)>-1&&bytes.push(239,191,189);continue}if(i+1===length){(units-=3)>-1&&bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){(units-=3)>-1&&bytes.push(239,191,189),leadSurrogate=codePoint;continue}codePoint=65536+(leadSurrogate-55296<<10|codePoint-56320)}else leadSurrogate&&(units-=3)>-1&&bytes.push(239,191,189);if(leadSurrogate=null,codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,63&codePoint|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,63&codePoint|128)}else{if(!(codePoint<1114112))throw new Error("Invalid code point");if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,63&codePoint|128)}}return bytes}function asciiToBytes(str){for(var byteArray=[],i=0;i<str.length;++i)byteArray.push(255&str.charCodeAt(i));return byteArray}function utf16leToBytes(str,units){for(var c,hi,lo,byteArray=[],i=0;i<str.length&&!((units-=2)<0);++i)c=str.charCodeAt(i),hi=c>>8,lo=c%256,byteArray.push(lo),byteArray.push(hi);return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i<length&&!(i+offset>=dst.length||i>=src.length);++i)dst[i+offset]=src[i];return i}function isnan(val){return val!==val}/*!
|
2 |
+
* The buffer module from node.js, for the browser.
|
3 |
+
*
|
4 |
+
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
5 |
+
* @license MIT
|
6 |
+
*/
|
7 |
+
var base64=__webpack_require__(425),ieee754=__webpack_require__(426),isArray=__webpack_require__(265);exports.Buffer=Buffer,exports.SlowBuffer=SlowBuffer,exports.INSPECT_MAX_BYTES=50,Buffer.TYPED_ARRAY_SUPPORT=void 0!==global.TYPED_ARRAY_SUPPORT?global.TYPED_ARRAY_SUPPORT:function(){try{var arr=new Uint8Array(1);return arr.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===arr.foo()&&"function"==typeof arr.subarray&&0===arr.subarray(1,1).byteLength}catch(e){return!1}}(),exports.kMaxLength=kMaxLength(),Buffer.poolSize=8192,Buffer._augment=function(arr){return arr.__proto__=Buffer.prototype,arr},Buffer.from=function(value,encodingOrOffset,length){return from(null,value,encodingOrOffset,length)},Buffer.TYPED_ARRAY_SUPPORT&&(Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&Buffer[Symbol.species]===Buffer&&Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:!0})),Buffer.alloc=function(size,fill,encoding){return alloc(null,size,fill,encoding)},Buffer.allocUnsafe=function(size){return allocUnsafe(null,size)},Buffer.allocUnsafeSlow=function(size){return allocUnsafe(null,size)},Buffer.isBuffer=function(b){return!(null==b||!b._isBuffer)},Buffer.compare=function(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b))throw new TypeError("Arguments must be Buffers");if(a===b)return 0;for(var x=a.length,y=b.length,i=0,len=Math.min(x,y);i<len;++i)if(a[i]!==b[i]){x=a[i],y=b[i];break}return x<y?-1:y<x?1:0},Buffer.isEncoding=function(encoding){switch(String(encoding).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Buffer.concat=function(list,length){if(!isArray(list))throw new TypeError('"list" argument must be an Array of Buffers');if(0===list.length)return Buffer.alloc(0);var i;if(void 0===length)for(length=0,i=0;i<list.length;++i)length+=list[i].length;var buffer=Buffer.allocUnsafe(length),pos=0;for(i=0;i<list.length;++i){var buf=list[i];if(!Buffer.isBuffer(buf))throw new TypeError('"list" argument must be an Array of Buffers');buf.copy(buffer,pos),pos+=buf.length}return buffer},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function(){var len=this.length;if(len%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var i=0;i<len;i+=2)swap(this,i,i+1);return this},Buffer.prototype.swap32=function(){var len=this.length;if(len%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var i=0;i<len;i+=4)swap(this,i,i+3),swap(this,i+1,i+2);return this},Buffer.prototype.swap64=function(){var len=this.length;if(len%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var i=0;i<len;i+=8)swap(this,i,i+7),swap(this,i+1,i+6),swap(this,i+2,i+5),swap(this,i+3,i+4);return this},Buffer.prototype.toString=function(){var length=0|this.length;return 0===length?"":0===arguments.length?utf8Slice(this,0,length):slowToString.apply(this,arguments)},Buffer.prototype.equals=function(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");return this===b||0===Buffer.compare(this,b)},Buffer.prototype.inspect=function(){var str="",max=exports.INSPECT_MAX_BYTES;return this.length>0&&(str=this.toString("hex",0,max).match(/.{2}/g).join(" "),this.length>max&&(str+=" ... ")),"<Buffer "+str+">"},Buffer.prototype.compare=function(target,start,end,thisStart,thisEnd){if(!Buffer.isBuffer(target))throw new TypeError("Argument must be a Buffer");if(void 0===start&&(start=0),void 0===end&&(end=target?target.length:0),void 0===thisStart&&(thisStart=0),void 0===thisEnd&&(thisEnd=this.length),start<0||end>target.length||thisStart<0||thisEnd>this.length)throw new RangeError("out of range index");if(thisStart>=thisEnd&&start>=end)return 0;if(thisStart>=thisEnd)return-1;if(start>=end)return 1;if(start>>>=0,end>>>=0,thisStart>>>=0,thisEnd>>>=0,this===target)return 0;for(var x=thisEnd-thisStart,y=end-start,len=Math.min(x,y),thisCopy=this.slice(thisStart,thisEnd),targetCopy=target.slice(start,end),i=0;i<len;++i)if(thisCopy[i]!==targetCopy[i]){x=thisCopy[i],y=targetCopy[i];break}return x<y?-1:y<x?1:0},Buffer.prototype.includes=function(val,byteOffset,encoding){return-1!==this.indexOf(val,byteOffset,encoding)},Buffer.prototype.indexOf=function(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,!0)},Buffer.prototype.lastIndexOf=function(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,!1)},Buffer.prototype.write=function(string,offset,length,encoding){if(void 0===offset)encoding="utf8",length=this.length,offset=0;else if(void 0===length&&"string"==typeof offset)encoding=offset,length=this.length,offset=0;else{if(!isFinite(offset))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");offset|=0,isFinite(length)?(length|=0,void 0===encoding&&(encoding="utf8")):(encoding=length,length=void 0)}var remaining=this.length-offset;if((void 0===length||length>remaining)&&(length=remaining),string.length>0&&(length<0||offset<0)||offset>this.length)throw new RangeError("Attempt to write outside buffer bounds");encoding||(encoding="utf8");for(var loweredCase=!1;;)switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"latin1":case"binary":return latin1Write(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase(),loweredCase=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var MAX_ARGUMENTS_LENGTH=4096;Buffer.prototype.slice=function(start,end){var len=this.length;start=~~start,end=void 0===end?len:~~end,start<0?(start+=len)<0&&(start=0):start>len&&(start=len),end<0?(end+=len)<0&&(end=0):end>len&&(end=len),end<start&&(end=start);var newBuf;if(Buffer.TYPED_ARRAY_SUPPORT)newBuf=this.subarray(start,end),newBuf.__proto__=Buffer.prototype;else{var sliceLen=end-start;newBuf=new Buffer(sliceLen,void 0);for(var i=0;i<sliceLen;++i)newBuf[i]=this[i+start]}return newBuf},Buffer.prototype.readUIntLE=function(offset,byteLength,noAssert){offset|=0,byteLength|=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i<byteLength&&(mul*=256);)val+=this[offset+i]*mul;return val},Buffer.prototype.readUIntBE=function(offset,byteLength,noAssert){offset|=0,byteLength|=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset+--byteLength],mul=1;byteLength>0&&(mul*=256);)val+=this[offset+--byteLength]*mul;return val},Buffer.prototype.readUInt8=function(offset,noAssert){return noAssert||checkOffset(offset,1,this.length),this[offset]},Buffer.prototype.readUInt16LE=function(offset,noAssert){return noAssert||checkOffset(offset,2,this.length),this[offset]|this[offset+1]<<8},Buffer.prototype.readUInt16BE=function(offset,noAssert){return noAssert||checkOffset(offset,2,this.length),this[offset]<<8|this[offset+1]},Buffer.prototype.readUInt32LE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+16777216*this[offset+3]},Buffer.prototype.readUInt32BE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),16777216*this[offset]+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])},Buffer.prototype.readIntLE=function(offset,byteLength,noAssert){offset|=0,byteLength|=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i<byteLength&&(mul*=256);)val+=this[offset+i]*mul;return mul*=128,val>=mul&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readIntBE=function(offset,byteLength,noAssert){offset|=0,byteLength|=0,noAssert||checkOffset(offset,byteLength,this.length);for(var i=byteLength,mul=1,val=this[offset+--i];i>0&&(mul*=256);)val+=this[offset+--i]*mul;return mul*=128,val>=mul&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readInt8=function(offset,noAssert){return noAssert||checkOffset(offset,1,this.length),128&this[offset]?-1*(255-this[offset]+1):this[offset]},Buffer.prototype.readInt16LE=function(offset,noAssert){noAssert||checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt16BE=function(offset,noAssert){noAssert||checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt32LE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24},Buffer.prototype.readInt32BE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]},Buffer.prototype.readFloatLE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!0,23,4)},Buffer.prototype.readFloatBE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!1,23,4)},Buffer.prototype.readDoubleLE=function(offset,noAssert){return noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!0,52,8)},Buffer.prototype.readDoubleBE=function(offset,noAssert){return noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!1,52,8)},Buffer.prototype.writeUIntLE=function(value,offset,byteLength,noAssert){if(value=+value,offset|=0,byteLength|=0,!noAssert){checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength)-1,0)}var mul=1,i=0;for(this[offset]=255&value;++i<byteLength&&(mul*=256);)this[offset+i]=value/mul&255;return offset+byteLength},Buffer.prototype.writeUIntBE=function(value,offset,byteLength,noAssert){if(value=+value,offset|=0,byteLength|=0,!noAssert){checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength)-1,0)}var i=byteLength-1,mul=1;for(this[offset+i]=255&value;--i>=0&&(mul*=256);)this[offset+i]=value/mul&255;return offset+byteLength},Buffer.prototype.writeUInt8=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,1,255,0),Buffer.TYPED_ARRAY_SUPPORT||(value=Math.floor(value)),this[offset]=255&value,offset+1},Buffer.prototype.writeUInt16LE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=255&value,this[offset+1]=value>>>8):objectWriteUInt16(this,value,offset,!0),offset+2},Buffer.prototype.writeUInt16BE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>8,this[offset+1]=255&value):objectWriteUInt16(this,value,offset,!1),offset+2},Buffer.prototype.writeUInt32LE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset+3]=value>>>24,this[offset+2]=value>>>16,this[offset+1]=value>>>8,this[offset]=255&value):objectWriteUInt32(this,value,offset,!0),offset+4},Buffer.prototype.writeUInt32BE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value):objectWriteUInt32(this,value,offset,!1),offset+4},Buffer.prototype.writeIntLE=function(value,offset,byteLength,noAssert){if(value=+value,offset|=0,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0,mul=1,sub=0;for(this[offset]=255&value;++i<byteLength&&(mul*=256);)value<0&&0===sub&&0!==this[offset+i-1]&&(sub=1),this[offset+i]=(value/mul>>0)-sub&255;return offset+byteLength},Buffer.prototype.writeIntBE=function(value,offset,byteLength,noAssert){if(value=+value,offset|=0,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1,mul=1,sub=0;for(this[offset+i]=255&value;--i>=0&&(mul*=256);)value<0&&0===sub&&0!==this[offset+i+1]&&(sub=1),this[offset+i]=(value/mul>>0)-sub&255;return offset+byteLength},Buffer.prototype.writeInt8=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,1,127,-128),Buffer.TYPED_ARRAY_SUPPORT||(value=Math.floor(value)),value<0&&(value=255+value+1),this[offset]=255&value,offset+1},Buffer.prototype.writeInt16LE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=255&value,this[offset+1]=value>>>8):objectWriteUInt16(this,value,offset,!0),offset+2},Buffer.prototype.writeInt16BE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>8,this[offset+1]=255&value):objectWriteUInt16(this,value,offset,!1),offset+2},Buffer.prototype.writeInt32LE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=255&value,this[offset+1]=value>>>8,this[offset+2]=value>>>16,this[offset+3]=value>>>24):objectWriteUInt32(this,value,offset,!0),offset+4},Buffer.prototype.writeInt32BE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),value<0&&(value=4294967295+value+1),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value):objectWriteUInt32(this,value,offset,!1),offset+4},Buffer.prototype.writeFloatLE=function(value,offset,noAssert){return writeFloat(this,value,offset,!0,noAssert)},Buffer.prototype.writeFloatBE=function(value,offset,noAssert){return writeFloat(this,value,offset,!1,noAssert)},Buffer.prototype.writeDoubleLE=function(value,offset,noAssert){return writeDouble(this,value,offset,!0,noAssert)},Buffer.prototype.writeDoubleBE=function(value,offset,noAssert){return writeDouble(this,value,offset,!1,noAssert)},Buffer.prototype.copy=function(target,targetStart,start,end){if(start||(start=0),end||0===end||(end=this.length),targetStart>=target.length&&(targetStart=target.length),targetStart||(targetStart=0),end>0&&end<start&&(end=start),end===start)return 0;if(0===target.length||0===this.length)return 0;if(targetStart<0)throw new RangeError("targetStart out of bounds");if(start<0||start>=this.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");end>this.length&&(end=this.length),target.length-targetStart<end-start&&(end=target.length-targetStart+start);var i,len=end-start;if(this===target&&start<targetStart&&targetStart<end)for(i=len-1;i>=0;--i)target[i+targetStart]=this[i+start];else if(len<1e3||!Buffer.TYPED_ARRAY_SUPPORT)for(i=0;i<len;++i)target[i+targetStart]=this[i+start];else Uint8Array.prototype.set.call(target,this.subarray(start,start+len),targetStart);return len},Buffer.prototype.fill=function(val,start,end,encoding){if("string"==typeof val){if("string"==typeof start?(encoding=start,start=0,end=this.length):"string"==typeof end&&(encoding=end,end=this.length),1===val.length){var code=val.charCodeAt(0);code<256&&(val=code)}if(void 0!==encoding&&"string"!=typeof encoding)throw new TypeError("encoding must be a string");if("string"==typeof encoding&&!Buffer.isEncoding(encoding))throw new TypeError("Unknown encoding: "+encoding)}else"number"==typeof val&&(val&=255);if(start<0||this.length<start||this.length<end)throw new RangeError("Out of range index");if(end<=start)return this;start>>>=0,end=void 0===end?this.length:end>>>0,val||(val=0);var i;if("number"==typeof val)for(i=start;i<end;++i)this[i]=val;else{var bytes=Buffer.isBuffer(val)?val:utf8ToBytes(new Buffer(val,encoding).toString()),len=bytes.length;for(i=0;i<end-start;++i)this[i+start]=bytes[i%len]}return this};var INVALID_BASE64_RE=/[^+\/0-9A-Za-z-_]/g}).call(exports,__webpack_require__(9))},function(module,exports,__webpack_require__){"use strict";(function(process,setImmediate,global){function CorkedRequest(state){var _this=this;this.next=null,this.entry=null,this.finish=function(){onCorkedFinish(_this,state)}}function _uint8ArrayToBuffer(chunk){return Buffer.from(chunk)}function _isUint8Array(obj){return Buffer.isBuffer(obj)||obj instanceof OurUint8Array}function nop(){}function WritableState(options,stream){Duplex=Duplex||__webpack_require__(32),options=options||{},this.objectMode=!!options.objectMode,stream instanceof Duplex&&(this.objectMode=this.objectMode||!!options.writableObjectMode);var hwm=options.highWaterMark,defaultHwm=this.objectMode?16:16384;this.highWaterMark=hwm||0===hwm?hwm:defaultHwm,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var noDecode=!1===options.decodeStrings;this.decodeStrings=!noDecode,this.defaultEncoding=options.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(er){onwrite(stream,er)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this)}function Writable(options){if(Duplex=Duplex||__webpack_require__(32),!(realHasInstance.call(Writable,this)||this instanceof Duplex))return new Writable(options);this._writableState=new WritableState(options,this),this.writable=!0,options&&("function"==typeof options.write&&(this._write=options.write),"function"==typeof options.writev&&(this._writev=options.writev),"function"==typeof options.destroy&&(this._destroy=options.destroy),"function"==typeof options.final&&(this._final=options.final)),Stream.call(this)}function writeAfterEnd(stream,cb){var er=new Error("write after end");stream.emit("error",er),processNextTick(cb,er)}function validChunk(stream,state,chunk,cb){var valid=!0,er=!1;return null===chunk?er=new TypeError("May not write null values to stream"):"string"==typeof chunk||void 0===chunk||state.objectMode||(er=new TypeError("Invalid non-string/buffer chunk")),er&&(stream.emit("error",er),processNextTick(cb,er),valid=!1),valid}function decodeChunk(state,chunk,encoding){return state.objectMode||!1===state.decodeStrings||"string"!=typeof chunk||(chunk=Buffer.from(chunk,encoding)),chunk}function writeOrBuffer(stream,state,isBuf,chunk,encoding,cb){if(!isBuf){var newChunk=decodeChunk(state,chunk,encoding);chunk!==newChunk&&(isBuf=!0,encoding="buffer",chunk=newChunk)}var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length<state.highWaterMark;if(ret||(state.needDrain=!0),state.writing||state.corked){var last=state.lastBufferedRequest;state.lastBufferedRequest={chunk:chunk,encoding:encoding,isBuf:isBuf,callback:cb,next:null},last?last.next=state.lastBufferedRequest:state.bufferedRequest=state.lastBufferedRequest,state.bufferedRequestCount+=1}else doWrite(stream,state,!1,len,chunk,encoding,cb);return ret}function doWrite(stream,state,writev,len,chunk,encoding,cb){state.writelen=len,state.writecb=cb,state.writing=!0,state.sync=!0,writev?stream._writev(chunk,state.onwrite):stream._write(chunk,encoding,state.onwrite),state.sync=!1}function onwriteError(stream,state,sync,er,cb){--state.pendingcb,sync?(processNextTick(cb,er),processNextTick(finishMaybe,stream,state),stream._writableState.errorEmitted=!0,stream.emit("error",er)):(cb(er),stream._writableState.errorEmitted=!0,stream.emit("error",er),finishMaybe(stream,state))}function onwriteStateUpdate(state){state.writing=!1,state.writecb=null,state.length-=state.writelen,state.writelen=0}function onwrite(stream,er){var state=stream._writableState,sync=state.sync,cb=state.writecb;if(onwriteStateUpdate(state),er)onwriteError(stream,state,sync,er,cb);else{var finished=needFinish(state);finished||state.corked||state.bufferProcessing||!state.bufferedRequest||clearBuffer(stream,state),sync?asyncWrite(afterWrite,stream,state,finished,cb):afterWrite(stream,state,finished,cb)}}function afterWrite(stream,state,finished,cb){finished||onwriteDrain(stream,state),state.pendingcb--,cb(),finishMaybe(stream,state)}function onwriteDrain(stream,state){0===state.length&&state.needDrain&&(state.needDrain=!1,stream.emit("drain"))}function clearBuffer(stream,state){state.bufferProcessing=!0;var entry=state.bufferedRequest;if(stream._writev&&entry&&entry.next){var l=state.bufferedRequestCount,buffer=new Array(l),holder=state.corkedRequestsFree;holder.entry=entry;for(var count=0,allBuffers=!0;entry;)buffer[count]=entry,entry.isBuf||(allBuffers=!1),entry=entry.next,count+=1;buffer.allBuffers=allBuffers,doWrite(stream,state,!0,state.length,buffer,"",holder.finish),state.pendingcb++,state.lastBufferedRequest=null,holder.next?(state.corkedRequestsFree=holder.next,holder.next=null):state.corkedRequestsFree=new CorkedRequest(state)}else{for(;entry;){var chunk=entry.chunk,encoding=entry.encoding,cb=entry.callback;if(doWrite(stream,state,!1,state.objectMode?1:chunk.length,chunk,encoding,cb),entry=entry.next,state.writing)break}null===entry&&(state.lastBufferedRequest=null)}state.bufferedRequestCount=0,state.bufferedRequest=entry,state.bufferProcessing=!1}function needFinish(state){return state.ending&&0===state.length&&null===state.bufferedRequest&&!state.finished&&!state.writing}function callFinal(stream,state){stream._final(function(err){state.pendingcb--,err&&stream.emit("error",err),state.prefinished=!0,stream.emit("prefinish"),finishMaybe(stream,state)})}function prefinish(stream,state){state.prefinished||state.finalCalled||("function"==typeof stream._final?(state.pendingcb++,state.finalCalled=!0,processNextTick(callFinal,stream,state)):(state.prefinished=!0,stream.emit("prefinish")))}function finishMaybe(stream,state){var need=needFinish(state);return need&&(prefinish(stream,state),0===state.pendingcb&&(state.finished=!0,stream.emit("finish"))),need}function endWritable(stream,state,cb){state.ending=!0,finishMaybe(stream,state),cb&&(state.finished?processNextTick(cb):stream.once("finish",cb)),state.ended=!0,stream.writable=!1}function onCorkedFinish(corkReq,state,err){var entry=corkReq.entry;for(corkReq.entry=null;entry;){var cb=entry.callback;state.pendingcb--,cb(err),entry=entry.next}state.corkedRequestsFree?state.corkedRequestsFree.next=corkReq:state.corkedRequestsFree=corkReq}var processNextTick=__webpack_require__(56);module.exports=Writable;var Duplex,asyncWrite=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:processNextTick;Writable.WritableState=WritableState;var util=__webpack_require__(46);util.inherits=__webpack_require__(22);var internalUtil={deprecate:__webpack_require__(430)},Stream=__webpack_require__(266),Buffer=__webpack_require__(57).Buffer,OurUint8Array=global.Uint8Array||function(){},destroyImpl=__webpack_require__(267);util.inherits(Writable,Stream),WritableState.prototype.getBuffer=function(){for(var current=this.bufferedRequest,out=[];current;)out.push(current),current=current.next;return out},function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(_){}}();var realHasInstance;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(realHasInstance=Function.prototype[Symbol.hasInstance],Object.defineProperty(Writable,Symbol.hasInstance,{value:function(object){return!!realHasInstance.call(this,object)||object&&object._writableState instanceof WritableState}})):realHasInstance=function(object){return object instanceof this},Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState,ret=!1,isBuf=_isUint8Array(chunk)&&!state.objectMode;return isBuf&&!Buffer.isBuffer(chunk)&&(chunk=_uint8ArrayToBuffer(chunk)),"function"==typeof encoding&&(cb=encoding,encoding=null),isBuf?encoding="buffer":encoding||(encoding=state.defaultEncoding),"function"!=typeof cb&&(cb=nop),state.ended?writeAfterEnd(this,cb):(isBuf||validChunk(this,state,chunk,cb))&&(state.pendingcb++,ret=writeOrBuffer(this,state,isBuf,chunk,encoding,cb)),ret},Writable.prototype.cork=function(){this._writableState.corked++},Writable.prototype.uncork=function(){var state=this._writableState;state.corked&&(state.corked--,state.writing||state.corked||state.finished||state.bufferProcessing||!state.bufferedRequest||clearBuffer(this,state))},Writable.prototype.setDefaultEncoding=function(encoding){if("string"==typeof encoding&&(encoding=encoding.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((encoding+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+encoding);return this._writableState.defaultEncoding=encoding,this},Writable.prototype._write=function(chunk,encoding,cb){cb(new Error("_write() is not implemented"))},Writable.prototype._writev=null,Writable.prototype.end=function(chunk,encoding,cb){var state=this._writableState;"function"==typeof chunk?(cb=chunk,chunk=null,encoding=null):"function"==typeof encoding&&(cb=encoding,encoding=null),null!==chunk&&void 0!==chunk&&this.write(chunk,encoding),state.corked&&(state.corked=1,this.uncork()),state.ending||state.finished||endWritable(this,state,cb)},Object.defineProperty(Writable.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(value){this._writableState&&(this._writableState.destroyed=value)}}),Writable.prototype.destroy=destroyImpl.destroy,Writable.prototype._undestroy=destroyImpl.undestroy,Writable.prototype._destroy=function(err,cb){this.end(),cb(err)}}).call(exports,__webpack_require__(1),__webpack_require__(268).setImmediate,__webpack_require__(9))},function(module,exports,__webpack_require__){"use strict";function _normalizeEncoding(enc){if(!enc)return"utf8";for(var retried;;)switch(enc){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return enc;default:if(retried)return;enc=(""+enc).toLowerCase(),retried=!0}}function normalizeEncoding(enc){var nenc=_normalizeEncoding(enc);if("string"!=typeof nenc&&(Buffer.isEncoding===isEncoding||!isEncoding(enc)))throw new Error("Unknown encoding: "+enc);return nenc||enc}function StringDecoder(encoding){this.encoding=normalizeEncoding(encoding);var nb;switch(this.encoding){case"utf16le":this.text=utf16Text,this.end=utf16End,nb=4;break;case"utf8":this.fillLast=utf8FillLast,nb=4;break;case"base64":this.text=base64Text,this.end=base64End,nb=3;break;default:return this.write=simpleWrite,void(this.end=simpleEnd)}this.lastNeed=0,this.lastTotal=0,this.lastChar=Buffer.allocUnsafe(nb)}function utf8CheckByte(byte){return byte<=127?0:byte>>5==6?2:byte>>4==14?3:byte>>3==30?4:-1}function utf8CheckIncomplete(self,buf,i){var j=buf.length-1;if(j<i)return 0;var nb=utf8CheckByte(buf[j]);return nb>=0?(nb>0&&(self.lastNeed=nb-1),nb):--j<i?0:(nb=utf8CheckByte(buf[j]))>=0?(nb>0&&(self.lastNeed=nb-2),nb):--j<i?0:(nb=utf8CheckByte(buf[j]),nb>=0?(nb>0&&(2===nb?nb=0:self.lastNeed=nb-3),nb):0)}function utf8CheckExtraBytes(self,buf,p){if(128!=(192&buf[0]))return self.lastNeed=0,"�".repeat(p);if(self.lastNeed>1&&buf.length>1){if(128!=(192&buf[1]))return self.lastNeed=1,"�".repeat(p+1);if(self.lastNeed>2&&buf.length>2&&128!=(192&buf[2]))return self.lastNeed=2,"�".repeat(p+2)}}function utf8FillLast(buf){var p=this.lastTotal-this.lastNeed,r=utf8CheckExtraBytes(this,buf,p);return void 0!==r?r:this.lastNeed<=buf.length?(buf.copy(this.lastChar,p,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(buf.copy(this.lastChar,p,0,buf.length),void(this.lastNeed-=buf.length))}function utf8Text(buf,i){var total=utf8CheckIncomplete(this,buf,i);if(!this.lastNeed)return buf.toString("utf8",i);this.lastTotal=total;var end=buf.length-(total-this.lastNeed);return buf.copy(this.lastChar,0,end),buf.toString("utf8",i,end)}function utf8End(buf){var r=buf&&buf.length?this.write(buf):"";return this.lastNeed?r+"�".repeat(this.lastTotal-this.lastNeed):r}function utf16Text(buf,i){if((buf.length-i)%2==0){var r=buf.toString("utf16le",i);if(r){var c=r.charCodeAt(r.length-1);if(c>=55296&&c<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=buf[buf.length-1],buf.toString("utf16le",i,buf.length-1)}function utf16End(buf){var r=buf&&buf.length?this.write(buf):"";if(this.lastNeed){var end=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,end)}return r}function base64Text(buf,i){var n=(buf.length-i)%3;return 0===n?buf.toString("base64",i):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=buf[buf.length-1]:(this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1]),buf.toString("base64",i,buf.length-n))}function base64End(buf){var r=buf&&buf.length?this.write(buf):"";return this.lastNeed?r+this.lastChar.toString("base64",0,3-this.lastNeed):r}function simpleWrite(buf){return buf.toString(this.encoding)}function simpleEnd(buf){return buf&&buf.length?this.write(buf):""}var Buffer=__webpack_require__(57).Buffer,isEncoding=Buffer.isEncoding||function(encoding){switch((encoding=""+encoding)&&encoding.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};exports.StringDecoder=StringDecoder,StringDecoder.prototype.write=function(buf){if(0===buf.length)return"";var r,i;if(this.lastNeed){if(void 0===(r=this.fillLast(buf)))return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i<buf.length?r?r+this.text(buf,i):this.text(buf,i):r||""},StringDecoder.prototype.end=utf8End,StringDecoder.prototype.text=utf8Text,StringDecoder.prototype.fillLast=function(buf){if(this.lastNeed<=buf.length)return buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,buf.length),this.lastNeed-=buf.length}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function Tooltip(props){var tooltipId=props.tooltipId,tooltip=props.tooltip;return props.tooltipId||"string"!=typeof props.tooltip||(tooltipId=props.tooltip),"string"==typeof props.tooltip&&(tooltip=_react2.default.createElement("span",{style:{pointerEvents:"all",maxWidth:"400px",display:"inline-block"}},(0,_reactHtmlParser2.default)(props.tooltip))),_react2.default.createElement("span",{className:props.className},_react2.default.createElement("span",{style:{cursor:"pointer"},className:"tooltip dashicons dashicons-editor-help","data-event":"click","data-tip":!0,"data-for":tooltipId}),_react2.default.createElement(_reactTooltip2.default,{globalEventOff:"click",multiline:!0,id:tooltipId,efect:"solid",place:props.place},tooltip))}var _propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_reactTooltip=__webpack_require__(232),_reactTooltip2=_interopRequireDefault(_reactTooltip),_reactHtmlParser=__webpack_require__(417),_reactHtmlParser2=_interopRequireDefault(_reactHtmlParser);Tooltip.propTypes={tooltipId:_propTypes2.default.string,tooltip:_propTypes2.default.node.isRequired,place:_propTypes2.default.string,className:_propTypes2.default.string},Tooltip.defaultProps={tooltipId:void 0,place:void 0,className:void 0},module.exports=Tooltip},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(module,exports,__webpack_require__){function Parser(cbs,options){this._options=options||{},this._cbs=cbs||{},this._tagname="",this._attribname="",this._attribvalue="",this._attribs=null,this._stack=[],this.startIndex=0,this.endIndex=null,this._lowerCaseTagNames="lowerCaseTags"in this._options?!!this._options.lowerCaseTags:!this._options.xmlMode,this._lowerCaseAttributeNames="lowerCaseAttributeNames"in this._options?!!this._options.lowerCaseAttributeNames:!this._options.xmlMode,this._options.Tokenizer&&(Tokenizer=this._options.Tokenizer),this._tokenizer=new Tokenizer(this._options,this),this._cbs.onparserinit&&this._cbs.onparserinit(this)}var Tokenizer=__webpack_require__(259),formTags={input:!0,option:!0,optgroup:!0,select:!0,button:!0,datalist:!0,textarea:!0},openImpliesClose={tr:{tr:!0,th:!0,td:!0},th:{th:!0},td:{thead:!0,th:!0,td:!0},body:{head:!0,link:!0,script:!0},li:{li:!0},p:{p:!0},h1:{p:!0},h2:{p:!0},h3:{p:!0},h4:{p:!0},h5:{p:!0},h6:{p:!0},select:formTags,input:formTags,output:formTags,button:formTags,datalist:formTags,textarea:formTags,option:{option:!0},optgroup:{optgroup:!0}},voidElements={__proto__:null,area:!0,base:!0,basefont:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,isindex:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,path:!0,circle:!0,ellipse:!0,line:!0,rect:!0,use:!0,stop:!0,polyline:!0,polygon:!0},re_nameEnd=/\s|\//;__webpack_require__(22)(Parser,__webpack_require__(55).EventEmitter),Parser.prototype._updatePosition=function(initialOffset){null===this.endIndex?this._tokenizer._sectionStart<=initialOffset?this.startIndex=0:this.startIndex=this._tokenizer._sectionStart-initialOffset:this.startIndex=this.endIndex+1,this.endIndex=this._tokenizer.getAbsoluteIndex()},Parser.prototype.ontext=function(data){this._updatePosition(1),this.endIndex--,this._cbs.ontext&&this._cbs.ontext(data)},Parser.prototype.onopentagname=function(name){if(this._lowerCaseTagNames&&(name=name.toLowerCase()),this._tagname=name,!this._options.xmlMode&&name in openImpliesClose)for(var el;(el=this._stack[this._stack.length-1])in openImpliesClose[name];this.onclosetag(el));!this._options.xmlMode&&name in voidElements||this._stack.push(name),this._cbs.onopentagname&&this._cbs.onopentagname(name),this._cbs.onopentag&&(this._attribs={})},Parser.prototype.onopentagend=function(){this._updatePosition(1),this._attribs&&(this._cbs.onopentag&&this._cbs.onopentag(this._tagname,this._attribs),this._attribs=null),!this._options.xmlMode&&this._cbs.onclosetag&&this._tagname in voidElements&&this._cbs.onclosetag(this._tagname),this._tagname=""},Parser.prototype.onclosetag=function(name){if(this._updatePosition(1),this._lowerCaseTagNames&&(name=name.toLowerCase()),!this._stack.length||name in voidElements&&!this._options.xmlMode)this._options.xmlMode||"br"!==name&&"p"!==name||(this.onopentagname(name),this._closeCurrentTag());else{var pos=this._stack.lastIndexOf(name);if(-1!==pos)if(this._cbs.onclosetag)for(pos=this._stack.length-pos;pos--;)this._cbs.onclosetag(this._stack.pop());else this._stack.length=pos;else"p"!==name||this._options.xmlMode||(this.onopentagname(name),this._closeCurrentTag())}},Parser.prototype.onselfclosingtag=function(){this._options.xmlMode||this._options.recognizeSelfClosing?this._closeCurrentTag():this.onopentagend()},Parser.prototype._closeCurrentTag=function(){var name=this._tagname;this.onopentagend(),this._stack[this._stack.length-1]===name&&(this._cbs.onclosetag&&this._cbs.onclosetag(name),this._stack.pop())},Parser.prototype.onattribname=function(name){this._lowerCaseAttributeNames&&(name=name.toLowerCase()),this._attribname=name},Parser.prototype.onattribdata=function(value){this._attribvalue+=value},Parser.prototype.onattribend=function(){this._cbs.onattribute&&this._cbs.onattribute(this._attribname,this._attribvalue),this._attribs&&!Object.prototype.hasOwnProperty.call(this._attribs,this._attribname)&&(this._attribs[this._attribname]=this._attribvalue),this._attribname="",this._attribvalue=""},Parser.prototype._getInstructionName=function(value){var idx=value.search(re_nameEnd),name=idx<0?value:value.substr(0,idx);return this._lowerCaseTagNames&&(name=name.toLowerCase()),name},Parser.prototype.ondeclaration=function(value){if(this._cbs.onprocessinginstruction){var name=this._getInstructionName(value);this._cbs.onprocessinginstruction("!"+name,"!"+value)}},Parser.prototype.onprocessinginstruction=function(value){if(this._cbs.onprocessinginstruction){var name=this._getInstructionName(value);this._cbs.onprocessinginstruction("?"+name,"?"+value)}},Parser.prototype.oncomment=function(value){this._updatePosition(4),this._cbs.oncomment&&this._cbs.oncomment(value),this._cbs.oncommentend&&this._cbs.oncommentend()},Parser.prototype.oncdata=function(value){this._updatePosition(1),this._options.xmlMode||this._options.recognizeCDATA?(this._cbs.oncdatastart&&this._cbs.oncdatastart(),this._cbs.ontext&&this._cbs.ontext(value),this._cbs.oncdataend&&this._cbs.oncdataend()):this.oncomment("[CDATA["+value+"]]")},Parser.prototype.onerror=function(err){this._cbs.onerror&&this._cbs.onerror(err)},Parser.prototype.onend=function(){if(this._cbs.onclosetag)for(var i=this._stack.length;i>0;this._cbs.onclosetag(this._stack[--i]));this._cbs.onend&&this._cbs.onend()},Parser.prototype.reset=function(){this._cbs.onreset&&this._cbs.onreset(),this._tokenizer.reset(),this._tagname="",this._attribname="",this._attribs=null,this._stack=[],this._cbs.onparserinit&&this._cbs.onparserinit(this)},Parser.prototype.parseComplete=function(data){this.reset(),this.end(data)},Parser.prototype.write=function(chunk){this._tokenizer.write(chunk)},Parser.prototype.end=function(chunk){this._tokenizer.end(chunk)},Parser.prototype.pause=function(){this._tokenizer.pause()},Parser.prototype.resume=function(){this._tokenizer.resume()},Parser.prototype.parseChunk=Parser.prototype.write,Parser.prototype.done=Parser.prototype.end,module.exports=Parser},function(module,exports,__webpack_require__){function whitespace(c){return" "===c||"\n"===c||"\t"===c||"\f"===c||"\r"===c}function ifElseState(upper,SUCCESS,FAILURE){var lower=upper.toLowerCase();return upper===lower?function(c){c===lower?this._state=SUCCESS:(this._state=FAILURE,this._index--)}:function(c){c===lower||c===upper?this._state=SUCCESS:(this._state=FAILURE,this._index--)}}function consumeSpecialNameChar(upper,NEXT_STATE){var lower=upper.toLowerCase();return function(c){c===lower||c===upper?this._state=NEXT_STATE:(this._state=IN_TAG_NAME,this._index--)}}function Tokenizer(options,cbs){this._state=TEXT,this._buffer="",this._sectionStart=0,this._index=0,this._bufferOffset=0,this._baseState=TEXT,this._special=SPECIAL_NONE,this._cbs=cbs,this._running=!0,this._ended=!1,this._xmlMode=!(!options||!options.xmlMode),this._decodeEntities=!(!options||!options.decodeEntities)}module.exports=Tokenizer;var decodeCodePoint=__webpack_require__(260),entityMap=__webpack_require__(86),legacyMap=__webpack_require__(261),xmlMap=__webpack_require__(87),i=0,TEXT=i++,BEFORE_TAG_NAME=i++,IN_TAG_NAME=i++,IN_SELF_CLOSING_TAG=i++,BEFORE_CLOSING_TAG_NAME=i++,IN_CLOSING_TAG_NAME=i++,AFTER_CLOSING_TAG_NAME=i++,BEFORE_ATTRIBUTE_NAME=i++,IN_ATTRIBUTE_NAME=i++,AFTER_ATTRIBUTE_NAME=i++,BEFORE_ATTRIBUTE_VALUE=i++,IN_ATTRIBUTE_VALUE_DQ=i++,IN_ATTRIBUTE_VALUE_SQ=i++,IN_ATTRIBUTE_VALUE_NQ=i++,BEFORE_DECLARATION=i++,IN_DECLARATION=i++,IN_PROCESSING_INSTRUCTION=i++,BEFORE_COMMENT=i++,IN_COMMENT=i++,AFTER_COMMENT_1=i++,AFTER_COMMENT_2=i++,BEFORE_CDATA_1=i++,BEFORE_CDATA_2=i++,BEFORE_CDATA_3=i++,BEFORE_CDATA_4=i++,BEFORE_CDATA_5=i++,BEFORE_CDATA_6=i++,IN_CDATA=i++,AFTER_CDATA_1=i++,AFTER_CDATA_2=i++,BEFORE_SPECIAL=i++,BEFORE_SPECIAL_END=i++,BEFORE_SCRIPT_1=i++,BEFORE_SCRIPT_2=i++,BEFORE_SCRIPT_3=i++,BEFORE_SCRIPT_4=i++,BEFORE_SCRIPT_5=i++,AFTER_SCRIPT_1=i++,AFTER_SCRIPT_2=i++,AFTER_SCRIPT_3=i++,AFTER_SCRIPT_4=i++,AFTER_SCRIPT_5=i++,BEFORE_STYLE_1=i++,BEFORE_STYLE_2=i++,BEFORE_STYLE_3=i++,BEFORE_STYLE_4=i++,AFTER_STYLE_1=i++,AFTER_STYLE_2=i++,AFTER_STYLE_3=i++,AFTER_STYLE_4=i++,BEFORE_ENTITY=i++,BEFORE_NUMERIC_ENTITY=i++,IN_NAMED_ENTITY=i++,IN_NUMERIC_ENTITY=i++,IN_HEX_ENTITY=i++,j=0,SPECIAL_NONE=j++,SPECIAL_SCRIPT=j++,SPECIAL_STYLE=j++;Tokenizer.prototype._stateText=function(c){"<"===c?(this._index>this._sectionStart&&this._cbs.ontext(this._getSection()),this._state=BEFORE_TAG_NAME,this._sectionStart=this._index):this._decodeEntities&&this._special===SPECIAL_NONE&&"&"===c&&(this._index>this._sectionStart&&this._cbs.ontext(this._getSection()),this._baseState=TEXT,this._state=BEFORE_ENTITY,this._sectionStart=this._index)},Tokenizer.prototype._stateBeforeTagName=function(c){"/"===c?this._state=BEFORE_CLOSING_TAG_NAME:"<"===c?(this._cbs.ontext(this._getSection()),this._sectionStart=this._index):">"===c||this._special!==SPECIAL_NONE||whitespace(c)?this._state=TEXT:"!"===c?(this._state=BEFORE_DECLARATION,this._sectionStart=this._index+1):"?"===c?(this._state=IN_PROCESSING_INSTRUCTION,this._sectionStart=this._index+1):(this._state=this._xmlMode||"s"!==c&&"S"!==c?IN_TAG_NAME:BEFORE_SPECIAL,this._sectionStart=this._index)},Tokenizer.prototype._stateInTagName=function(c){("/"===c||">"===c||whitespace(c))&&(this._emitToken("onopentagname"),this._state=BEFORE_ATTRIBUTE_NAME,this._index--)},Tokenizer.prototype._stateBeforeCloseingTagName=function(c){whitespace(c)||(">"===c?this._state=TEXT:this._special!==SPECIAL_NONE?"s"===c||"S"===c?this._state=BEFORE_SPECIAL_END:(this._state=TEXT,this._index--):(this._state=IN_CLOSING_TAG_NAME,this._sectionStart=this._index))},Tokenizer.prototype._stateInCloseingTagName=function(c){(">"===c||whitespace(c))&&(this._emitToken("onclosetag"),this._state=AFTER_CLOSING_TAG_NAME,this._index--)},Tokenizer.prototype._stateAfterCloseingTagName=function(c){">"===c&&(this._state=TEXT,this._sectionStart=this._index+1)},Tokenizer.prototype._stateBeforeAttributeName=function(c){">"===c?(this._cbs.onopentagend(),this._state=TEXT,this._sectionStart=this._index+1):"/"===c?this._state=IN_SELF_CLOSING_TAG:whitespace(c)||(this._state=IN_ATTRIBUTE_NAME,this._sectionStart=this._index)},Tokenizer.prototype._stateInSelfClosingTag=function(c){">"===c?(this._cbs.onselfclosingtag(),this._state=TEXT,this._sectionStart=this._index+1):whitespace(c)||(this._state=BEFORE_ATTRIBUTE_NAME,this._index--)},Tokenizer.prototype._stateInAttributeName=function(c){("="===c||"/"===c||">"===c||whitespace(c))&&(this._cbs.onattribname(this._getSection()),this._sectionStart=-1,this._state=AFTER_ATTRIBUTE_NAME,this._index--)},Tokenizer.prototype._stateAfterAttributeName=function(c){"="===c?this._state=BEFORE_ATTRIBUTE_VALUE:"/"===c||">"===c?(this._cbs.onattribend(),this._state=BEFORE_ATTRIBUTE_NAME,this._index--):whitespace(c)||(this._cbs.onattribend(),this._state=IN_ATTRIBUTE_NAME,this._sectionStart=this._index)},Tokenizer.prototype._stateBeforeAttributeValue=function(c){'"'===c?(this._state=IN_ATTRIBUTE_VALUE_DQ,this._sectionStart=this._index+1):"'"===c?(this._state=IN_ATTRIBUTE_VALUE_SQ,this._sectionStart=this._index+1):whitespace(c)||(this._state=IN_ATTRIBUTE_VALUE_NQ,this._sectionStart=this._index,this._index--)},Tokenizer.prototype._stateInAttributeValueDoubleQuotes=function(c){'"'===c?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=BEFORE_ATTRIBUTE_NAME):this._decodeEntities&&"&"===c&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=BEFORE_ENTITY,this._sectionStart=this._index)},Tokenizer.prototype._stateInAttributeValueSingleQuotes=function(c){"'"===c?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=BEFORE_ATTRIBUTE_NAME):this._decodeEntities&&"&"===c&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=BEFORE_ENTITY,this._sectionStart=this._index)},Tokenizer.prototype._stateInAttributeValueNoQuotes=function(c){whitespace(c)||">"===c?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=BEFORE_ATTRIBUTE_NAME,this._index--):this._decodeEntities&&"&"===c&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=BEFORE_ENTITY,this._sectionStart=this._index)},Tokenizer.prototype._stateBeforeDeclaration=function(c){this._state="["===c?BEFORE_CDATA_1:"-"===c?BEFORE_COMMENT:IN_DECLARATION},Tokenizer.prototype._stateInDeclaration=function(c){">"===c&&(this._cbs.ondeclaration(this._getSection()),this._state=TEXT,this._sectionStart=this._index+1)},Tokenizer.prototype._stateInProcessingInstruction=function(c){">"===c&&(this._cbs.onprocessinginstruction(this._getSection()),this._state=TEXT,this._sectionStart=this._index+1)},Tokenizer.prototype._stateBeforeComment=function(c){"-"===c?(this._state=IN_COMMENT,this._sectionStart=this._index+1):this._state=IN_DECLARATION},Tokenizer.prototype._stateInComment=function(c){"-"===c&&(this._state=AFTER_COMMENT_1)},Tokenizer.prototype._stateAfterComment1=function(c){this._state="-"===c?AFTER_COMMENT_2:IN_COMMENT},Tokenizer.prototype._stateAfterComment2=function(c){">"===c?(this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2)),this._state=TEXT,this._sectionStart=this._index+1):"-"!==c&&(this._state=IN_COMMENT)},Tokenizer.prototype._stateBeforeCdata1=ifElseState("C",BEFORE_CDATA_2,IN_DECLARATION),Tokenizer.prototype._stateBeforeCdata2=ifElseState("D",BEFORE_CDATA_3,IN_DECLARATION),Tokenizer.prototype._stateBeforeCdata3=ifElseState("A",BEFORE_CDATA_4,IN_DECLARATION),Tokenizer.prototype._stateBeforeCdata4=ifElseState("T",BEFORE_CDATA_5,IN_DECLARATION),Tokenizer.prototype._stateBeforeCdata5=ifElseState("A",BEFORE_CDATA_6,IN_DECLARATION),Tokenizer.prototype._stateBeforeCdata6=function(c){"["===c?(this._state=IN_CDATA,this._sectionStart=this._index+1):(this._state=IN_DECLARATION,this._index--)},Tokenizer.prototype._stateInCdata=function(c){"]"===c&&(this._state=AFTER_CDATA_1)},Tokenizer.prototype._stateAfterCdata1=function(char,SUCCESS){return function(c){c===char&&(this._state=SUCCESS)}}("]",AFTER_CDATA_2),Tokenizer.prototype._stateAfterCdata2=function(c){">"===c?(this._cbs.oncdata(this._buffer.substring(this._sectionStart,this._index-2)),this._state=TEXT,this._sectionStart=this._index+1):"]"!==c&&(this._state=IN_CDATA)},Tokenizer.prototype._stateBeforeSpecial=function(c){"c"===c||"C"===c?this._state=BEFORE_SCRIPT_1:"t"===c||"T"===c?this._state=BEFORE_STYLE_1:(this._state=IN_TAG_NAME,this._index--)},Tokenizer.prototype._stateBeforeSpecialEnd=function(c){this._special!==SPECIAL_SCRIPT||"c"!==c&&"C"!==c?this._special!==SPECIAL_STYLE||"t"!==c&&"T"!==c?this._state=TEXT:this._state=AFTER_STYLE_1:this._state=AFTER_SCRIPT_1},Tokenizer.prototype._stateBeforeScript1=consumeSpecialNameChar("R",BEFORE_SCRIPT_2),Tokenizer.prototype._stateBeforeScript2=consumeSpecialNameChar("I",BEFORE_SCRIPT_3),Tokenizer.prototype._stateBeforeScript3=consumeSpecialNameChar("P",BEFORE_SCRIPT_4),Tokenizer.prototype._stateBeforeScript4=consumeSpecialNameChar("T",BEFORE_SCRIPT_5),Tokenizer.prototype._stateBeforeScript5=function(c){("/"===c||">"===c||whitespace(c))&&(this._special=SPECIAL_SCRIPT),this._state=IN_TAG_NAME,this._index--},Tokenizer.prototype._stateAfterScript1=ifElseState("R",AFTER_SCRIPT_2,TEXT),Tokenizer.prototype._stateAfterScript2=ifElseState("I",AFTER_SCRIPT_3,TEXT),Tokenizer.prototype._stateAfterScript3=ifElseState("P",AFTER_SCRIPT_4,TEXT),Tokenizer.prototype._stateAfterScript4=ifElseState("T",AFTER_SCRIPT_5,TEXT),Tokenizer.prototype._stateAfterScript5=function(c){">"===c||whitespace(c)?(this._special=SPECIAL_NONE,this._state=IN_CLOSING_TAG_NAME,this._sectionStart=this._index-6,this._index--):this._state=TEXT},Tokenizer.prototype._stateBeforeStyle1=consumeSpecialNameChar("Y",BEFORE_STYLE_2),Tokenizer.prototype._stateBeforeStyle2=consumeSpecialNameChar("L",BEFORE_STYLE_3),Tokenizer.prototype._stateBeforeStyle3=consumeSpecialNameChar("E",BEFORE_STYLE_4),Tokenizer.prototype._stateBeforeStyle4=function(c){("/"===c||">"===c||whitespace(c))&&(this._special=SPECIAL_STYLE),this._state=IN_TAG_NAME,this._index--},Tokenizer.prototype._stateAfterStyle1=ifElseState("Y",AFTER_STYLE_2,TEXT),Tokenizer.prototype._stateAfterStyle2=ifElseState("L",AFTER_STYLE_3,TEXT),Tokenizer.prototype._stateAfterStyle3=ifElseState("E",AFTER_STYLE_4,TEXT),Tokenizer.prototype._stateAfterStyle4=function(c){">"===c||whitespace(c)?(this._special=SPECIAL_NONE,this._state=IN_CLOSING_TAG_NAME,this._sectionStart=this._index-5,this._index--):this._state=TEXT},Tokenizer.prototype._stateBeforeEntity=ifElseState("#",BEFORE_NUMERIC_ENTITY,IN_NAMED_ENTITY),Tokenizer.prototype._stateBeforeNumericEntity=ifElseState("X",IN_HEX_ENTITY,IN_NUMERIC_ENTITY),Tokenizer.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+1<this._index){var entity=this._buffer.substring(this._sectionStart+1,this._index),map=this._xmlMode?xmlMap:entityMap;map.hasOwnProperty(entity)&&(this._emitPartial(map[entity]),this._sectionStart=this._index+1)}},Tokenizer.prototype._parseLegacyEntity=function(){var start=this._sectionStart+1,limit=this._index-start;for(limit>6&&(limit=6);limit>=2;){var entity=this._buffer.substr(start,limit);if(legacyMap.hasOwnProperty(entity))return this._emitPartial(legacyMap[entity]),void(this._sectionStart+=limit+1);limit--}},Tokenizer.prototype._stateInNamedEntity=function(c){";"===c?(this._parseNamedEntityStrict(),this._sectionStart+1<this._index&&!this._xmlMode&&this._parseLegacyEntity(),this._state=this._baseState):(c<"a"||c>"z")&&(c<"A"||c>"Z")&&(c<"0"||c>"9")&&(this._xmlMode||this._sectionStart+1===this._index||(this._baseState!==TEXT?"="!==c&&this._parseNamedEntityStrict():this._parseLegacyEntity()),this._state=this._baseState,this._index--)},Tokenizer.prototype._decodeNumericEntity=function(offset,base){var sectionStart=this._sectionStart+offset;if(sectionStart!==this._index){var entity=this._buffer.substring(sectionStart,this._index),parsed=parseInt(entity,base);this._emitPartial(decodeCodePoint(parsed)),this._sectionStart=this._index}else this._sectionStart--;this._state=this._baseState},Tokenizer.prototype._stateInNumericEntity=function(c){";"===c?(this._decodeNumericEntity(2,10),this._sectionStart++):(c<"0"||c>"9")&&(this._xmlMode?this._state=this._baseState:this._decodeNumericEntity(2,10),this._index--)},Tokenizer.prototype._stateInHexEntity=function(c){";"===c?(this._decodeNumericEntity(3,16),this._sectionStart++):(c<"a"||c>"f")&&(c<"A"||c>"F")&&(c<"0"||c>"9")&&(this._xmlMode?this._state=this._baseState:this._decodeNumericEntity(3,16),this._index--)},Tokenizer.prototype._cleanup=function(){this._sectionStart<0?(this._buffer="",this._bufferOffset+=this._index,this._index=0):this._running&&(this._state===TEXT?(this._sectionStart!==this._index&&this._cbs.ontext(this._buffer.substr(this._sectionStart)),this._buffer="",this._bufferOffset+=this._index,this._index=0):this._sectionStart===this._index?(this._buffer="",this._bufferOffset+=this._index,this._index=0):(this._buffer=this._buffer.substr(this._sectionStart),this._index-=this._sectionStart,this._bufferOffset+=this._sectionStart),this._sectionStart=0)},Tokenizer.prototype.write=function(chunk){this._ended&&this._cbs.onerror(Error(".write() after done!")),this._buffer+=chunk,this._parse()},Tokenizer.prototype._parse=function(){for(;this._index<this._buffer.length&&this._running;){var c=this._buffer.charAt(this._index);this._state===TEXT?this._stateText(c):this._state===BEFORE_TAG_NAME?this._stateBeforeTagName(c):this._state===IN_TAG_NAME?this._stateInTagName(c):this._state===BEFORE_CLOSING_TAG_NAME?this._stateBeforeCloseingTagName(c):this._state===IN_CLOSING_TAG_NAME?this._stateInCloseingTagName(c):this._state===AFTER_CLOSING_TAG_NAME?this._stateAfterCloseingTagName(c):this._state===IN_SELF_CLOSING_TAG?this._stateInSelfClosingTag(c):this._state===BEFORE_ATTRIBUTE_NAME?this._stateBeforeAttributeName(c):this._state===IN_ATTRIBUTE_NAME?this._stateInAttributeName(c):this._state===AFTER_ATTRIBUTE_NAME?this._stateAfterAttributeName(c):this._state===BEFORE_ATTRIBUTE_VALUE?this._stateBeforeAttributeValue(c):this._state===IN_ATTRIBUTE_VALUE_DQ?this._stateInAttributeValueDoubleQuotes(c):this._state===IN_ATTRIBUTE_VALUE_SQ?this._stateInAttributeValueSingleQuotes(c):this._state===IN_ATTRIBUTE_VALUE_NQ?this._stateInAttributeValueNoQuotes(c):this._state===BEFORE_DECLARATION?this._stateBeforeDeclaration(c):this._state===IN_DECLARATION?this._stateInDeclaration(c):this._state===IN_PROCESSING_INSTRUCTION?this._stateInProcessingInstruction(c):this._state===BEFORE_COMMENT?this._stateBeforeComment(c):this._state===IN_COMMENT?this._stateInComment(c):this._state===AFTER_COMMENT_1?this._stateAfterComment1(c):this._state===AFTER_COMMENT_2?this._stateAfterComment2(c):this._state===BEFORE_CDATA_1?this._stateBeforeCdata1(c):this._state===BEFORE_CDATA_2?this._stateBeforeCdata2(c):this._state===BEFORE_CDATA_3?this._stateBeforeCdata3(c):this._state===BEFORE_CDATA_4?this._stateBeforeCdata4(c):this._state===BEFORE_CDATA_5?this._stateBeforeCdata5(c):this._state===BEFORE_CDATA_6?this._stateBeforeCdata6(c):this._state===IN_CDATA?this._stateInCdata(c):this._state===AFTER_CDATA_1?this._stateAfterCdata1(c):this._state===AFTER_CDATA_2?this._stateAfterCdata2(c):this._state===BEFORE_SPECIAL?this._stateBeforeSpecial(c):this._state===BEFORE_SPECIAL_END?this._stateBeforeSpecialEnd(c):this._state===BEFORE_SCRIPT_1?this._stateBeforeScript1(c):this._state===BEFORE_SCRIPT_2?this._stateBeforeScript2(c):this._state===BEFORE_SCRIPT_3?this._stateBeforeScript3(c):this._state===BEFORE_SCRIPT_4?this._stateBeforeScript4(c):this._state===BEFORE_SCRIPT_5?this._stateBeforeScript5(c):this._state===AFTER_SCRIPT_1?this._stateAfterScript1(c):this._state===AFTER_SCRIPT_2?this._stateAfterScript2(c):this._state===AFTER_SCRIPT_3?this._stateAfterScript3(c):this._state===AFTER_SCRIPT_4?this._stateAfterScript4(c):this._state===AFTER_SCRIPT_5?this._stateAfterScript5(c):this._state===BEFORE_STYLE_1?this._stateBeforeStyle1(c):this._state===BEFORE_STYLE_2?this._stateBeforeStyle2(c):this._state===BEFORE_STYLE_3?this._stateBeforeStyle3(c):this._state===BEFORE_STYLE_4?this._stateBeforeStyle4(c):this._state===AFTER_STYLE_1?this._stateAfterStyle1(c):this._state===AFTER_STYLE_2?this._stateAfterStyle2(c):this._state===AFTER_STYLE_3?this._stateAfterStyle3(c):this._state===AFTER_STYLE_4?this._stateAfterStyle4(c):this._state===BEFORE_ENTITY?this._stateBeforeEntity(c):this._state===BEFORE_NUMERIC_ENTITY?this._stateBeforeNumericEntity(c):this._state===IN_NAMED_ENTITY?this._stateInNamedEntity(c):this._state===IN_NUMERIC_ENTITY?this._stateInNumericEntity(c):this._state===IN_HEX_ENTITY?this._stateInHexEntity(c):this._cbs.onerror(Error("unknown _state"),this._state),this._index++}this._cleanup()},Tokenizer.prototype.pause=function(){this._running=!1},Tokenizer.prototype.resume=function(){this._running=!0,this._index<this._buffer.length&&this._parse(),this._ended&&this._finish()},Tokenizer.prototype.end=function(chunk){this._ended&&this._cbs.onerror(Error(".end() after done!")),chunk&&this.write(chunk),this._ended=!0,this._running&&this._finish()},Tokenizer.prototype._finish=function(){this._sectionStart<this._index&&this._handleTrailingData(),this._cbs.onend()},Tokenizer.prototype._handleTrailingData=function(){var data=this._buffer.substr(this._sectionStart);this._state===IN_CDATA||this._state===AFTER_CDATA_1||this._state===AFTER_CDATA_2?this._cbs.oncdata(data):this._state===IN_COMMENT||this._state===AFTER_COMMENT_1||this._state===AFTER_COMMENT_2?this._cbs.oncomment(data):this._state!==IN_NAMED_ENTITY||this._xmlMode?this._state!==IN_NUMERIC_ENTITY||this._xmlMode?this._state!==IN_HEX_ENTITY||this._xmlMode?this._state!==IN_TAG_NAME&&this._state!==BEFORE_ATTRIBUTE_NAME&&this._state!==BEFORE_ATTRIBUTE_VALUE&&this._state!==AFTER_ATTRIBUTE_NAME&&this._state!==IN_ATTRIBUTE_NAME&&this._state!==IN_ATTRIBUTE_VALUE_SQ&&this._state!==IN_ATTRIBUTE_VALUE_DQ&&this._state!==IN_ATTRIBUTE_VALUE_NQ&&this._state!==IN_CLOSING_TAG_NAME&&this._cbs.ontext(data):(this._decodeNumericEntity(3,16),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._decodeNumericEntity(2,10),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._parseLegacyEntity(),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData()))},Tokenizer.prototype.reset=function(){Tokenizer.call(this,{xmlMode:this._xmlMode,decodeEntities:this._decodeEntities},this._cbs)},Tokenizer.prototype.getAbsoluteIndex=function(){return this._bufferOffset+this._index},Tokenizer.prototype._getSection=function(){return this._buffer.substring(this._sectionStart,this._index)},Tokenizer.prototype._emitToken=function(name){this._cbs[name](this._getSection()),this._sectionStart=-1},Tokenizer.prototype._emitPartial=function(value){this._baseState!==TEXT?this._cbs.onattribdata(value):this._cbs.ontext(value)}},function(module,exports,__webpack_require__){function decodeCodePoint(codePoint){if(codePoint>=55296&&codePoint<=57343||codePoint>1114111)return"�";codePoint in decodeMap&&(codePoint=decodeMap[codePoint]);var output="";return codePoint>65535&&(codePoint-=65536,output+=String.fromCharCode(codePoint>>>10&1023|55296),codePoint=56320|1023&codePoint),output+=String.fromCharCode(codePoint)}var decodeMap=__webpack_require__(419);module.exports=decodeCodePoint},function(module,exports){module.exports={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ"}},function(module,exports){var NodePrototype=module.exports={get firstChild(){var children=this.children;return children&&children[0]||null},get lastChild(){var children=this.children;return children&&children[children.length-1]||null},get nodeType(){return nodeTypes[this.type]||nodeTypes.element}},domLvl1={tagName:"name",childNodes:"children",parentNode:"parent",previousSibling:"prev",nextSibling:"next",nodeValue:"data"},nodeTypes={element:1,text:3,cdata:4,comment:8};Object.keys(domLvl1).forEach(function(key){var shorthand=domLvl1[key];Object.defineProperty(NodePrototype,key,{get:function(){return this[shorthand]||null},set:function(val){return this[shorthand]=val,val}})})},function(module,exports,__webpack_require__){function Stream(cbs,options){var parser=this._parser=new Parser(cbs,options),decoder=this._decoder=new StringDecoder;WritableStream.call(this,{decodeStrings:!1}),this.once("finish",function(){parser.end(decoder.end())})}module.exports=Stream;var Parser=__webpack_require__(258),WritableStream=__webpack_require__(424).Writable||__webpack_require__(436).Writable,StringDecoder=__webpack_require__(91).StringDecoder,Buffer=__webpack_require__(89).Buffer;__webpack_require__(22)(Stream,WritableStream),WritableStream.prototype._write=function(chunk,encoding,cb){chunk instanceof Buffer&&(chunk=this._decoder.write(chunk)),this._parser.write(chunk),cb()}},function(module,exports,__webpack_require__){"use strict";(function(global,process){function _uint8ArrayToBuffer(chunk){return Buffer.from(chunk)}function _isUint8Array(obj){return Buffer.isBuffer(obj)||obj instanceof OurUint8Array}function prependListener(emitter,event,fn){if("function"==typeof emitter.prependListener)return emitter.prependListener(event,fn);emitter._events&&emitter._events[event]?isArray(emitter._events[event])?emitter._events[event].unshift(fn):emitter._events[event]=[fn,emitter._events[event]]:emitter.on(event,fn)}function ReadableState(options,stream){Duplex=Duplex||__webpack_require__(32),options=options||{},this.objectMode=!!options.objectMode,stream instanceof Duplex&&(this.objectMode=this.objectMode||!!options.readableObjectMode);var hwm=options.highWaterMark,defaultHwm=this.objectMode?16:16384;this.highWaterMark=hwm||0===hwm?hwm:defaultHwm,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new BufferList,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=options.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,options.encoding&&(StringDecoder||(StringDecoder=__webpack_require__(91).StringDecoder),this.decoder=new StringDecoder(options.encoding),this.encoding=options.encoding)}function Readable(options){if(Duplex=Duplex||__webpack_require__(32),!(this instanceof Readable))return new Readable(options);this._readableState=new ReadableState(options,this),this.readable=!0,options&&("function"==typeof options.read&&(this._read=options.read),"function"==typeof options.destroy&&(this._destroy=options.destroy)),Stream.call(this)}function readableAddChunk(stream,chunk,encoding,addToFront,skipChunkCheck){var state=stream._readableState;if(null===chunk)state.reading=!1,onEofChunk(stream,state);else{var er;skipChunkCheck||(er=chunkInvalid(state,chunk)),er?stream.emit("error",er):state.objectMode||chunk&&chunk.length>0?("string"==typeof chunk||state.objectMode||Object.getPrototypeOf(chunk)===Buffer.prototype||(chunk=_uint8ArrayToBuffer(chunk)),addToFront?state.endEmitted?stream.emit("error",new Error("stream.unshift() after end event")):addChunk(stream,state,chunk,!0):state.ended?stream.emit("error",new Error("stream.push() after EOF")):(state.reading=!1,state.decoder&&!encoding?(chunk=state.decoder.write(chunk),state.objectMode||0!==chunk.length?addChunk(stream,state,chunk,!1):maybeReadMore(stream,state)):addChunk(stream,state,chunk,!1))):addToFront||(state.reading=!1)}return needMoreData(state)}function addChunk(stream,state,chunk,addToFront){state.flowing&&0===state.length&&!state.sync?(stream.emit("data",chunk),stream.read(0)):(state.length+=state.objectMode?1:chunk.length,addToFront?state.buffer.unshift(chunk):state.buffer.push(chunk),state.needReadable&&emitReadable(stream)),maybeReadMore(stream,state)}function chunkInvalid(state,chunk){var er;return _isUint8Array(chunk)||"string"==typeof chunk||void 0===chunk||state.objectMode||(er=new TypeError("Invalid non-string/buffer chunk")),er}function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||0===state.length)}function computeNewHighWaterMark(n){return n>=MAX_HWM?n=MAX_HWM:(n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++),n}function howMuchToRead(n,state){return n<=0||0===state.length&&state.ended?0:state.objectMode?1:n!==n?state.flowing&&state.length?state.buffer.head.data.length:state.length:(n>state.highWaterMark&&(state.highWaterMark=computeNewHighWaterMark(n)),n<=state.length?n:state.ended?state.length:(state.needReadable=!0,0))}function onEofChunk(stream,state){if(!state.ended){if(state.decoder){var chunk=state.decoder.end();chunk&&chunk.length&&(state.buffer.push(chunk),state.length+=state.objectMode?1:chunk.length)}state.ended=!0,emitReadable(stream)}}function emitReadable(stream){var state=stream._readableState;state.needReadable=!1,state.emittedReadable||(debug("emitReadable",state.flowing),state.emittedReadable=!0,state.sync?processNextTick(emitReadable_,stream):emitReadable_(stream))}function emitReadable_(stream){debug("emit readable"),stream.emit("readable"),flow(stream)}function maybeReadMore(stream,state){state.readingMore||(state.readingMore=!0,processNextTick(maybeReadMore_,stream,state))}function maybeReadMore_(stream,state){for(var len=state.length;!state.reading&&!state.flowing&&!state.ended&&state.length<state.highWaterMark&&(debug("maybeReadMore read 0"),stream.read(0),len!==state.length);)len=state.length;state.readingMore=!1}function pipeOnDrain(src){return function(){var state=src._readableState;debug("pipeOnDrain",state.awaitDrain),state.awaitDrain&&state.awaitDrain--,0===state.awaitDrain&&EElistenerCount(src,"data")&&(state.flowing=!0,flow(src))}}function nReadingNextTick(self){debug("readable nexttick read 0"),self.read(0)}function resume(stream,state){state.resumeScheduled||(state.resumeScheduled=!0,processNextTick(resume_,stream,state))}function resume_(stream,state){state.reading||(debug("resume read 0"),stream.read(0)),state.resumeScheduled=!1,state.awaitDrain=0,stream.emit("resume"),flow(stream),state.flowing&&!state.reading&&stream.read(0)}function flow(stream){var state=stream._readableState;for(debug("flow",state.flowing);state.flowing&&null!==stream.read(););}function fromList(n,state){if(0===state.length)return null;var ret;return state.objectMode?ret=state.buffer.shift():!n||n>=state.length?(ret=state.decoder?state.buffer.join(""):1===state.buffer.length?state.buffer.head.data:state.buffer.concat(state.length),state.buffer.clear()):ret=fromListPartial(n,state.buffer,state.decoder),ret}function fromListPartial(n,list,hasStrings){var ret;return n<list.head.data.length?(ret=list.head.data.slice(0,n),list.head.data=list.head.data.slice(n)):ret=n===list.head.data.length?list.shift():hasStrings?copyFromBufferString(n,list):copyFromBuffer(n,list),ret}function copyFromBufferString(n,list){var p=list.head,c=1,ret=p.data;for(n-=ret.length;p=p.next;){var str=p.data,nb=n>str.length?str.length:n;if(nb===str.length?ret+=str:ret+=str.slice(0,n),0===(n-=nb)){nb===str.length?(++c,p.next?list.head=p.next:list.head=list.tail=null):(list.head=p,p.data=str.slice(nb));break}++c}return list.length-=c,ret}function copyFromBuffer(n,list){var ret=Buffer.allocUnsafe(n),p=list.head,c=1;for(p.data.copy(ret),n-=p.data.length;p=p.next;){var buf=p.data,nb=n>buf.length?buf.length:n;if(buf.copy(ret,ret.length-n,0,nb),0===(n-=nb)){nb===buf.length?(++c,p.next?list.head=p.next:list.head=list.tail=null):(list.head=p,p.data=buf.slice(nb));break}++c}return list.length-=c,ret}function endReadable(stream){var state=stream._readableState;if(state.length>0)throw new Error('"endReadable()" called on non-empty stream');state.endEmitted||(state.ended=!0,processNextTick(endReadableNT,state,stream))}function endReadableNT(state,stream){state.endEmitted||0!==state.length||(state.endEmitted=!0,stream.readable=!1,stream.emit("end"))}function indexOf(xs,x){for(var i=0,l=xs.length;i<l;i++)if(xs[i]===x)return i;return-1}var processNextTick=__webpack_require__(56);module.exports=Readable;var Duplex,isArray=__webpack_require__(265);Readable.ReadableState=ReadableState;var EElistenerCount=(__webpack_require__(55).EventEmitter,function(emitter,type){return emitter.listeners(type).length}),Stream=__webpack_require__(266),Buffer=__webpack_require__(57).Buffer,OurUint8Array=global.Uint8Array||function(){},util=__webpack_require__(46);util.inherits=__webpack_require__(22);var debugUtil=__webpack_require__(427),debug=void 0;debug=debugUtil&&debugUtil.debuglog?debugUtil.debuglog("stream"):function(){};var StringDecoder,BufferList=__webpack_require__(428),destroyImpl=__webpack_require__(267);util.inherits(Readable,Stream);var kProxyEvents=["error","close","destroy","pause","resume"];Object.defineProperty(Readable.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(value){this._readableState&&(this._readableState.destroyed=value)}}),Readable.prototype.destroy=destroyImpl.destroy,Readable.prototype._undestroy=destroyImpl.undestroy,Readable.prototype._destroy=function(err,cb){this.push(null),cb(err)},Readable.prototype.push=function(chunk,encoding){var skipChunkCheck,state=this._readableState;return state.objectMode?skipChunkCheck=!0:"string"==typeof chunk&&(encoding=encoding||state.defaultEncoding,encoding!==state.encoding&&(chunk=Buffer.from(chunk,encoding),encoding=""),skipChunkCheck=!0),readableAddChunk(this,chunk,encoding,!1,skipChunkCheck)},Readable.prototype.unshift=function(chunk){return readableAddChunk(this,chunk,null,!0,!1)},Readable.prototype.isPaused=function(){return!1===this._readableState.flowing},Readable.prototype.setEncoding=function(enc){return StringDecoder||(StringDecoder=__webpack_require__(91).StringDecoder),this._readableState.decoder=new StringDecoder(enc),this._readableState.encoding=enc,this};var MAX_HWM=8388608;Readable.prototype.read=function(n){debug("read",n),n=parseInt(n,10);var state=this._readableState,nOrig=n;if(0!==n&&(state.emittedReadable=!1),0===n&&state.needReadable&&(state.length>=state.highWaterMark||state.ended))return debug("read: emitReadable",state.length,state.ended),0===state.length&&state.ended?endReadable(this):emitReadable(this),null;if(0===(n=howMuchToRead(n,state))&&state.ended)return 0===state.length&&endReadable(this),null;var doRead=state.needReadable;debug("need readable",doRead),(0===state.length||state.length-n<state.highWaterMark)&&(doRead=!0,debug("length less than watermark",doRead)),state.ended||state.reading?(doRead=!1,debug("reading or ended",doRead)):doRead&&(debug("do read"),state.reading=!0,state.sync=!0,0===state.length&&(state.needReadable=!0),this._read(state.highWaterMark),state.sync=!1,state.reading||(n=howMuchToRead(nOrig,state)));var ret;return ret=n>0?fromList(n,state):null,null===ret?(state.needReadable=!0,n=0):state.length-=n,0===state.length&&(state.ended||(state.needReadable=!0),nOrig!==n&&state.ended&&endReadable(this)),null!==ret&&this.emit("data",ret),ret},Readable.prototype._read=function(n){this.emit("error",new Error("_read() is not implemented"))},Readable.prototype.pipe=function(dest,pipeOpts){function onunpipe(readable,unpipeInfo){debug("onunpipe"),readable===src&&unpipeInfo&&!1===unpipeInfo.hasUnpiped&&(unpipeInfo.hasUnpiped=!0,cleanup())}function onend(){debug("onend"),dest.end()}function cleanup(){debug("cleanup"),dest.removeListener("close",onclose),dest.removeListener("finish",onfinish),dest.removeListener("drain",ondrain),dest.removeListener("error",onerror),dest.removeListener("unpipe",onunpipe),src.removeListener("end",onend),src.removeListener("end",unpipe),src.removeListener("data",ondata),cleanedUp=!0,!state.awaitDrain||dest._writableState&&!dest._writableState.needDrain||ondrain()}function ondata(chunk){debug("ondata"),increasedAwaitDrain=!1,!1!==dest.write(chunk)||increasedAwaitDrain||((1===state.pipesCount&&state.pipes===dest||state.pipesCount>1&&-1!==indexOf(state.pipes,dest))&&!cleanedUp&&(debug("false write response, pause",src._readableState.awaitDrain),src._readableState.awaitDrain++,increasedAwaitDrain=!0),src.pause())}function onerror(er){debug("onerror",er),unpipe(),dest.removeListener("error",onerror),0===EElistenerCount(dest,"error")&&dest.emit("error",er)}function onclose(){dest.removeListener("finish",onfinish),unpipe()}function onfinish(){debug("onfinish"),dest.removeListener("close",onclose),unpipe()}function unpipe(){debug("unpipe"),src.unpipe(dest)}var src=this,state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest)}state.pipesCount+=1,debug("pipe count=%d opts=%j",state.pipesCount,pipeOpts);var doEnd=(!pipeOpts||!1!==pipeOpts.end)&&dest!==process.stdout&&dest!==process.stderr,endFn=doEnd?onend:unpipe;state.endEmitted?processNextTick(endFn):src.once("end",endFn),dest.on("unpipe",onunpipe);var ondrain=pipeOnDrain(src);dest.on("drain",ondrain);var cleanedUp=!1,increasedAwaitDrain=!1;return src.on("data",ondata),prependListener(dest,"error",onerror),dest.once("close",onclose),dest.once("finish",onfinish),dest.emit("pipe",src),state.flowing||(debug("pipe resume"),src.resume()),dest},Readable.prototype.unpipe=function(dest){var state=this._readableState,unpipeInfo={hasUnpiped:!1};if(0===state.pipesCount)return this;if(1===state.pipesCount)return dest&&dest!==state.pipes?this:(dest||(dest=state.pipes),state.pipes=null,state.pipesCount=0,state.flowing=!1,dest&&dest.emit("unpipe",this,unpipeInfo),this);if(!dest){var dests=state.pipes,len=state.pipesCount;state.pipes=null,state.pipesCount=0,state.flowing=!1;for(var i=0;i<len;i++)dests[i].emit("unpipe",this,unpipeInfo);return this}var index=indexOf(state.pipes,dest);return-1===index?this:(state.pipes.splice(index,1),state.pipesCount-=1,1===state.pipesCount&&(state.pipes=state.pipes[0]),dest.emit("unpipe",this,unpipeInfo),this)},Readable.prototype.on=function(ev,fn){var res=Stream.prototype.on.call(this,ev,fn);if("data"===ev)!1!==this._readableState.flowing&&this.resume();else if("readable"===ev){var state=this._readableState;state.endEmitted||state.readableListening||(state.readableListening=state.needReadable=!0,state.emittedReadable=!1,state.reading?state.length&&emitReadable(this):processNextTick(nReadingNextTick,this))}return res},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.resume=function(){var state=this._readableState;return state.flowing||(debug("resume"),state.flowing=!0,resume(this,state)),this},Readable.prototype.pause=function(){return debug("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(debug("pause"),this._readableState.flowing=!1,this.emit("pause")),this},Readable.prototype.wrap=function(stream){var state=this._readableState,paused=!1,self=this;stream.on("end",function(){if(debug("wrapped end"),state.decoder&&!state.ended){var chunk=state.decoder.end();chunk&&chunk.length&&self.push(chunk)}self.push(null)}),stream.on("data",function(chunk){if(debug("wrapped data"),state.decoder&&(chunk=state.decoder.write(chunk)),(!state.objectMode||null!==chunk&&void 0!==chunk)&&(state.objectMode||chunk&&chunk.length)){self.push(chunk)||(paused=!0,stream.pause())}});for(var i in stream)void 0===this[i]&&"function"==typeof stream[i]&&(this[i]=function(method){return function(){return stream[method].apply(stream,arguments)}}(i));for(var n=0;n<kProxyEvents.length;n++)stream.on(kProxyEvents[n],self.emit.bind(self,kProxyEvents[n]));return self._read=function(n){debug("wrapped _read",n),paused&&(paused=!1,stream.resume())},self},Readable._fromList=fromList}).call(exports,__webpack_require__(9),__webpack_require__(1))},function(module,exports){var toString={}.toString;module.exports=Array.isArray||function(arr){return"[object Array]"==toString.call(arr)}},function(module,exports,__webpack_require__){module.exports=__webpack_require__(55).EventEmitter},function(module,exports,__webpack_require__){"use strict";function destroy(err,cb){var _this=this,readableDestroyed=this._readableState&&this._readableState.destroyed,writableDestroyed=this._writableState&&this._writableState.destroyed;if(readableDestroyed||writableDestroyed)return void(cb?cb(err):!err||this._writableState&&this._writableState.errorEmitted||processNextTick(emitErrorNT,this,err));this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(err||null,function(err){!cb&&err?(processNextTick(emitErrorNT,_this,err),_this._writableState&&(_this._writableState.errorEmitted=!0)):cb&&cb(err)})}function undestroy(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function emitErrorNT(self,err){self.emit("error",err)}var processNextTick=__webpack_require__(56);module.exports={destroy:destroy,undestroy:undestroy}},,function(module,exports,__webpack_require__){"use strict";function TransformState(stream){this.afterTransform=function(er,data){return afterTransform(stream,er,data)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function afterTransform(stream,er,data){var ts=stream._transformState;ts.transforming=!1;var cb=ts.writecb;if(!cb)return stream.emit("error",new Error("write callback called multiple times"));ts.writechunk=null,ts.writecb=null,null!==data&&void 0!==data&&stream.push(data),cb(er);var rs=stream._readableState;rs.reading=!1,(rs.needReadable||rs.length<rs.highWaterMark)&&stream._read(rs.highWaterMark)}function Transform(options){if(!(this instanceof Transform))return new Transform(options);Duplex.call(this,options),this._transformState=new TransformState(this);var stream=this;this._readableState.needReadable=!0,this._readableState.sync=!1,options&&("function"==typeof options.transform&&(this._transform=options.transform),"function"==typeof options.flush&&(this._flush=options.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(er,data){done(stream,er,data)}):done(stream)})}function done(stream,er,data){if(er)return stream.emit("error",er);null!==data&&void 0!==data&&stream.push(data);var ws=stream._writableState,ts=stream._transformState;if(ws.length)throw new Error("Calling transform done when ws.length != 0");if(ts.transforming)throw new Error("Calling transform done when still transforming");return stream.push(null)}module.exports=Transform;var Duplex=__webpack_require__(32),util=__webpack_require__(46);util.inherits=__webpack_require__(22),util.inherits(Transform,Duplex),Transform.prototype.push=function(chunk,encoding){return this._transformState.needTransform=!1,Duplex.prototype.push.call(this,chunk,encoding)},Transform.prototype._transform=function(chunk,encoding,cb){throw new Error("_transform() is not implemented")},Transform.prototype._write=function(chunk,encoding,cb){var ts=this._transformState;if(ts.writecb=cb,ts.writechunk=chunk,ts.writeencoding=encoding,!ts.transforming){var rs=this._readableState;(ts.needTransform||rs.needReadable||rs.length<rs.highWaterMark)&&this._read(rs.highWaterMark)}},Transform.prototype._read=function(n){var ts=this._transformState;null!==ts.writechunk&&ts.writecb&&!ts.transforming?(ts.transforming=!0,this._transform(ts.writechunk,ts.writeencoding,ts.afterTransform)):ts.needTransform=!0},Transform.prototype._destroy=function(err,cb){var _this=this;Duplex.prototype._destroy.call(this,err,function(err2){cb(err2),_this.emit("close")})}},function(module,exports,__webpack_require__){"use strict";function ProcessNodes(nodes){return nodes.filter(filterOutEmptyTextNodes).map(function(node,index){return convertNodeToElement(node,index)})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=ProcessNodes;var _elementTypes=__webpack_require__(451),_elementTypes2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_elementTypes),filterOutEmptyTextNodes=function(node){return!("text"===node.type&&/\r?\n/.test(node.data)&&""===node.data.trim())},convertNodeToElement=function(node,index){var key="rhp-"+index;return _elementTypes2.default[node.type](node,key)}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function GeneratePropsFromAttributes(attributes,key){var props=_extends({},(0,_HtmlAttributesToReact2.default)(attributes),{key:key});return props.style&&(props.style=(0,_InlineStyleToObject2.default)(props.style)),props}Object.defineProperty(exports,"__esModule",{value:!0});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target};exports.default=GeneratePropsFromAttributes;var _HtmlAttributesToReact=__webpack_require__(454),_HtmlAttributesToReact2=_interopRequireDefault(_HtmlAttributesToReact),_InlineStyleToObject=__webpack_require__(457),_InlineStyleToObject2=_interopRequireDefault(_InlineStyleToObject)},,,,,,,,,,,,,,,,,,,,,,,function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function Tabs(props){var tabLinks=tabs.map(function(tab){var tabClasses=(0,_classnames2.default)("nav-tab",{"nav-tab-active":props.tab===tab.name});return _react2.default.createElement(_reactRouter.Link,{key:"tab-"+tab.name,className:tabClasses,to:tab.link},tab.label)});return _react2.default.createElement("h2",{className:"nav-tab-wrapper"},tabLinks)}var _propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_reactRouter=__webpack_require__(26),_classnames=__webpack_require__(18),_classnames2=_interopRequireDefault(_classnames),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),tabs=[{name:"knowledgeBase",label:_mailpoet2.default.I18n.t("tabKnowledgeBaseTitle"),link:"/knowledgeBase"},{name:"systemStatus",label:_mailpoet2.default.I18n.t("tabSystemStatusTitle"),link:"/systemStatus"},{name:"systemInfo",label:_mailpoet2.default.I18n.t("tabSystemInfoTitle"),link:"/systemInfo"},{name:"yourPrivacy",label:_mailpoet2.default.I18n.t("tabYourPrivacyTitle"),link:"/yourPrivacy"}];Tabs.propTypes={tab:_propTypes2.default.string},Tabs.defaultProps={tab:"knowledgeBase"},module.exports=Tabs},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _HtmlParser=__webpack_require__(418),_HtmlParser2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_HtmlParser);exports.default=_HtmlParser2.default},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function HtmlParser(html){var nodes=_htmlparser2.default.parseDOM(html);return(0,_ProcessNodes2.default)(nodes)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=HtmlParser;var _htmlparser=__webpack_require__(38),_htmlparser2=_interopRequireDefault(_htmlparser),_ProcessNodes=__webpack_require__(270),_ProcessNodes2=_interopRequireDefault(_ProcessNodes)},function(module,exports){module.exports={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}},function(module,exports,__webpack_require__){function DomHandler(callback,options,elementCB){"object"==typeof callback?(elementCB=options,options=callback,callback=null):"function"==typeof options&&(elementCB=options,options=defaultOpts),this._callback=callback,this._options=options||defaultOpts,this._elementCB=elementCB,this.dom=[],this._done=!1,this._tagStack=[],this._parser=this._parser||null}var ElementType=__webpack_require__(45),re_whitespace=/\s+/g,NodePrototype=__webpack_require__(262),ElementPrototype=__webpack_require__(421),defaultOpts={normalizeWhitespace:!1,withStartIndices:!1,withEndIndices:!1};DomHandler.prototype.onparserinit=function(parser){this._parser=parser},DomHandler.prototype.onreset=function(){DomHandler.call(this,this._callback,this._options,this._elementCB)},DomHandler.prototype.onend=function(){this._done||(this._done=!0,this._parser=null,this._handleCallback(null))},DomHandler.prototype._handleCallback=DomHandler.prototype.onerror=function(error){if("function"==typeof this._callback)this._callback(error,this.dom);else if(error)throw error},DomHandler.prototype.onclosetag=function(){var elem=this._tagStack.pop();this._options.withEndIndices&&(elem.endIndex=this._parser.endIndex),this._elementCB&&this._elementCB(elem)},DomHandler.prototype._createDomElement=function(properties){if(!this._options.withDomLvl1)return properties;var element;element="tag"===properties.type?Object.create(ElementPrototype):Object.create(NodePrototype);for(var key in properties)properties.hasOwnProperty(key)&&(element[key]=properties[key]);return element},DomHandler.prototype._addDomElement=function(element){var parent=this._tagStack[this._tagStack.length-1],siblings=parent?parent.children:this.dom,previousSibling=siblings[siblings.length-1];element.next=null,this._options.withStartIndices&&(element.startIndex=this._parser.startIndex),this._options.withEndIndices&&(element.endIndex=this._parser.endIndex),previousSibling?(element.prev=previousSibling,previousSibling.next=element):element.prev=null,siblings.push(element),element.parent=parent||null},DomHandler.prototype.onopentag=function(name,attribs){var properties={type:"script"===name?ElementType.Script:"style"===name?ElementType.Style:ElementType.Tag,name:name,attribs:attribs,children:[]},element=this._createDomElement(properties);this._addDomElement(element),this._tagStack.push(element)},DomHandler.prototype.ontext=function(data){var lastTag,normalize=this._options.normalizeWhitespace||this._options.ignoreWhitespace;if(!this._tagStack.length&&this.dom.length&&(lastTag=this.dom[this.dom.length-1]).type===ElementType.Text)normalize?lastTag.data=(lastTag.data+data).replace(re_whitespace," "):lastTag.data+=data;else if(this._tagStack.length&&(lastTag=this._tagStack[this._tagStack.length-1])&&(lastTag=lastTag.children[lastTag.children.length-1])&&lastTag.type===ElementType.Text)normalize?lastTag.data=(lastTag.data+data).replace(re_whitespace," "):lastTag.data+=data;else{normalize&&(data=data.replace(re_whitespace," "));var element=this._createDomElement({data:data,type:ElementType.Text});this._addDomElement(element)}},DomHandler.prototype.oncomment=function(data){var lastTag=this._tagStack[this._tagStack.length-1];if(lastTag&&lastTag.type===ElementType.Comment)return void(lastTag.data+=data);var properties={data:data,type:ElementType.Comment},element=this._createDomElement(properties);this._addDomElement(element),this._tagStack.push(element)},DomHandler.prototype.oncdatastart=function(){var properties={children:[{data:"",type:ElementType.Text}],type:ElementType.CDATA},element=this._createDomElement(properties);this._addDomElement(element),this._tagStack.push(element)},DomHandler.prototype.oncommentend=DomHandler.prototype.oncdataend=function(){this._tagStack.pop()},DomHandler.prototype.onprocessinginstruction=function(name,data){var element=this._createDomElement({name:name,data:data,type:ElementType.Directive});this._addDomElement(element)},module.exports=DomHandler},function(module,exports,__webpack_require__){var NodePrototype=__webpack_require__(262),ElementPrototype=module.exports=Object.create(NodePrototype),domLvl1={tagName:"name"};Object.keys(domLvl1).forEach(function(key){var shorthand=domLvl1[key];Object.defineProperty(ElementPrototype,key,{get:function(){return this[shorthand]||null},set:function(val){return this[shorthand]=val,val}})})},function(module,exports,__webpack_require__){function FeedHandler(callback,options){this.init(callback,options)}function getElements(what,where){return DomUtils.getElementsByTagName(what,where,!0)}function getOneElement(what,where){return DomUtils.getElementsByTagName(what,where,!0,1)[0]}function fetch(what,where,recurse){return DomUtils.getText(DomUtils.getElementsByTagName(what,where,recurse,1)).trim()}function addConditionally(obj,prop,what,where,recurse){var tmp=fetch(what,where,recurse);tmp&&(obj[prop]=tmp)}var index=__webpack_require__(38),DomHandler=index.DomHandler,DomUtils=index.DomUtils;__webpack_require__(22)(FeedHandler,DomHandler),FeedHandler.prototype.init=DomHandler;var isValidFeed=function(value){return"rss"===value||"feed"===value||"rdf:RDF"===value};FeedHandler.prototype.onend=function(){var tmp,childs,feed={},feedRoot=getOneElement(isValidFeed,this.dom);feedRoot&&("feed"===feedRoot.name?(childs=feedRoot.children,feed.type="atom",addConditionally(feed,"id","id",childs),addConditionally(feed,"title","title",childs),(tmp=getOneElement("link",childs))&&(tmp=tmp.attribs)&&(tmp=tmp.href)&&(feed.link=tmp),addConditionally(feed,"description","subtitle",childs),(tmp=fetch("updated",childs))&&(feed.updated=new Date(tmp)),addConditionally(feed,"author","email",childs,!0),feed.items=getElements("entry",childs).map(function(item){var tmp,entry={};return item=item.children,addConditionally(entry,"id","id",item),addConditionally(entry,"title","title",item),(tmp=getOneElement("link",item))&&(tmp=tmp.attribs)&&(tmp=tmp.href)&&(entry.link=tmp),(tmp=fetch("summary",item)||fetch("content",item))&&(entry.description=tmp),(tmp=fetch("updated",item))&&(entry.pubDate=new Date(tmp)),entry})):(childs=getOneElement("channel",feedRoot.children).children,feed.type=feedRoot.name.substr(0,3),feed.id="",addConditionally(feed,"title","title",childs),addConditionally(feed,"link","link",childs),addConditionally(feed,"description","description",childs),(tmp=fetch("lastBuildDate",childs))&&(feed.updated=new Date(tmp)),addConditionally(feed,"author","managingEditor",childs,!0),feed.items=getElements("item",feedRoot.children).map(function(item){var tmp,entry={};return item=item.children,addConditionally(entry,"id","guid",item),addConditionally(entry,"title","title",item),addConditionally(entry,"link","link",item),addConditionally(entry,"description","description",item),(tmp=fetch("pubDate",item))&&(entry.pubDate=new Date(tmp)),entry}))),this.dom=feed,DomHandler.prototype._handleCallback.call(this,feedRoot?null:Error("couldn't find root of feed"))},module.exports=FeedHandler},function(module,exports,__webpack_require__){function Stream(options){Parser.call(this,new Cbs(this),options)}function Cbs(scope){this.scope=scope}module.exports=Stream;var Parser=__webpack_require__(263);__webpack_require__(22)(Stream,Parser),Stream.prototype.readable=!0;var EVENTS=__webpack_require__(38).EVENTS;Object.keys(EVENTS).forEach(function(name){if(0===EVENTS[name])Cbs.prototype["on"+name]=function(){this.scope.emit(name)};else if(1===EVENTS[name])Cbs.prototype["on"+name]=function(a){this.scope.emit(name,a)};else{if(2!==EVENTS[name])throw Error("wrong number of arguments!");Cbs.prototype["on"+name]=function(a,b){this.scope.emit(name,a,b)}}})},function(module,exports,__webpack_require__){function Stream(){EE.call(this)}module.exports=Stream;var EE=__webpack_require__(55).EventEmitter;__webpack_require__(22)(Stream,EE),Stream.Readable=__webpack_require__(88),Stream.Writable=__webpack_require__(432),Stream.Duplex=__webpack_require__(433),Stream.Transform=__webpack_require__(434),Stream.PassThrough=__webpack_require__(435),Stream.Stream=Stream,Stream.prototype.pipe=function(dest,options){function ondata(chunk){dest.writable&&!1===dest.write(chunk)&&source.pause&&source.pause()}function ondrain(){source.readable&&source.resume&&source.resume()}function onend(){didOnEnd||(didOnEnd=!0,dest.end())}function onclose(){didOnEnd||(didOnEnd=!0,"function"==typeof dest.destroy&&dest.destroy())}function onerror(er){if(cleanup(),0===EE.listenerCount(this,"error"))throw er}function cleanup(){source.removeListener("data",ondata),dest.removeListener("drain",ondrain),source.removeListener("end",onend),source.removeListener("close",onclose),source.removeListener("error",onerror),dest.removeListener("error",onerror),source.removeListener("end",cleanup),source.removeListener("close",cleanup),dest.removeListener("close",cleanup)}var source=this;source.on("data",ondata),dest.on("drain",ondrain),dest._isStdio||options&&!1===options.end||(source.on("end",onend),source.on("close",onclose));var didOnEnd=!1;return source.on("error",onerror),dest.on("error",onerror),source.on("end",cleanup),source.on("close",cleanup),dest.on("close",cleanup),dest.emit("pipe",source),dest}},function(module,exports,__webpack_require__){"use strict";function placeHoldersCount(b64){var len=b64.length;if(len%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===b64[len-2]?2:"="===b64[len-1]?1:0}function byteLength(b64){return 3*b64.length/4-placeHoldersCount(b64)}function toByteArray(b64){var i,l,tmp,placeHolders,arr,len=b64.length;placeHolders=placeHoldersCount(b64),arr=new Arr(3*len/4-placeHolders),l=placeHolders>0?len-4:len;var L=0;for(i=0;i<l;i+=4)tmp=revLookup[b64.charCodeAt(i)]<<18|revLookup[b64.charCodeAt(i+1)]<<12|revLookup[b64.charCodeAt(i+2)]<<6|revLookup[b64.charCodeAt(i+3)],arr[L++]=tmp>>16&255,arr[L++]=tmp>>8&255,arr[L++]=255&tmp;return 2===placeHolders?(tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4,arr[L++]=255&tmp):1===placeHolders&&(tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2,arr[L++]=tmp>>8&255,arr[L++]=255&tmp),arr}function tripletToBase64(num){return lookup[num>>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[63&num]}function encodeChunk(uint8,start,end){for(var tmp,output=[],i=start;i<end;i+=3)tmp=(uint8[i]<<16)+(uint8[i+1]<<8)+uint8[i+2],output.push(tripletToBase64(tmp));return output.join("")}function fromByteArray(uint8){for(var tmp,len=uint8.length,extraBytes=len%3,output="",parts=[],i=0,len2=len-extraBytes;i<len2;i+=16383)parts.push(encodeChunk(uint8,i,i+16383>len2?len2:i+16383));return 1===extraBytes?(tmp=uint8[len-1],output+=lookup[tmp>>2],output+=lookup[tmp<<4&63],output+="=="):2===extraBytes&&(tmp=(uint8[len-2]<<8)+uint8[len-1],output+=lookup[tmp>>10],output+=lookup[tmp>>4&63],output+=lookup[tmp<<2&63],output+="="),parts.push(output),parts.join("")}exports.byteLength=byteLength,exports.toByteArray=toByteArray,exports.fromByteArray=fromByteArray;for(var lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,len=code.length;i<len;++i)lookup[i]=code[i],revLookup[code.charCodeAt(i)]=i;revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63},function(module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m,eLen=8*nBytes-mLen-1,eMax=(1<<eLen)-1,eBias=eMax>>1,nBits=-7,i=isLE?nBytes-1:0,d=isLE?-1:1,s=buffer[offset+i];for(i+=d,e=s&(1<<-nBits)-1,s>>=-nBits,nBits+=eLen;nBits>0;e=256*e+buffer[offset+i],i+=d,nBits-=8);for(m=e&(1<<-nBits)-1,e>>=-nBits,nBits+=mLen;nBits>0;m=256*m+buffer[offset+i],i+=d,nBits-=8);if(0===e)e=1-eBias;else{if(e===eMax)return m?NaN:1/0*(s?-1:1);m+=Math.pow(2,mLen),e-=eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)},exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c,eLen=8*nBytes-mLen-1,eMax=(1<<eLen)-1,eBias=eMax>>1,rt=23===mLen?Math.pow(2,-24)-Math.pow(2,-77):0,i=isLE?0:nBytes-1,d=isLE?1:-1,s=value<0||0===value&&1/value<0?1:0;for(value=Math.abs(value),isNaN(value)||value===1/0?(m=isNaN(value)?1:0,e=eMax):(e=Math.floor(Math.log(value)/Math.LN2),value*(c=Math.pow(2,-e))<1&&(e--,c*=2),value+=e+eBias>=1?rt/c:rt*Math.pow(2,1-eBias),value*c>=2&&(e++,c/=2),e+eBias>=eMax?(m=0,e=eMax):e+eBias>=1?(m=(value*c-1)*Math.pow(2,mLen),e+=eBias):(m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen),e=0));mLen>=8;buffer[offset+i]=255&m,i+=d,m/=256,mLen-=8);for(e=e<<mLen|m,eLen+=mLen;eLen>0;buffer[offset+i]=255&e,i+=d,e/=256,eLen-=8);buffer[offset+i-d]|=128*s}},function(module,exports){},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function copyBuffer(src,target,offset){src.copy(target,offset)}var Buffer=__webpack_require__(57).Buffer;module.exports=function(){function BufferList(){_classCallCheck(this,BufferList),this.head=null,this.tail=null,this.length=0}return BufferList.prototype.push=function(v){var entry={data:v,next:null};this.length>0?this.tail.next=entry:this.head=entry,this.tail=entry,++this.length},BufferList.prototype.unshift=function(v){var entry={data:v,next:this.head};0===this.length&&(this.tail=entry),this.head=entry,++this.length},BufferList.prototype.shift=function(){if(0!==this.length){var ret=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,ret}},BufferList.prototype.clear=function(){this.head=this.tail=null,this.length=0},BufferList.prototype.join=function(s){if(0===this.length)return"";for(var p=this.head,ret=""+p.data;p=p.next;)ret+=s+p.data;return ret},BufferList.prototype.concat=function(n){if(0===this.length)return Buffer.alloc(0);if(1===this.length)return this.head.data;for(var ret=Buffer.allocUnsafe(n>>>0),p=this.head,i=0;p;)copyBuffer(p.data,ret,i),i+=p.data.length,p=p.next;return ret},BufferList}()},,function(module,exports,__webpack_require__){(function(global){function deprecate(fn,msg){function deprecated(){if(!warned){if(config("throwDeprecation"))throw new Error(msg);config("traceDeprecation")?console.trace(msg):console.warn(msg),warned=!0}return fn.apply(this,arguments)}if(config("noDeprecation"))return fn;var warned=!1;return deprecated}function config(name){try{if(!global.localStorage)return!1}catch(_){return!1}var val=global.localStorage[name];return null!=val&&"true"===String(val).toLowerCase()}module.exports=deprecate}).call(exports,__webpack_require__(9))},function(module,exports,__webpack_require__){"use strict";function PassThrough(options){if(!(this instanceof PassThrough))return new PassThrough(options);Transform.call(this,options)}module.exports=PassThrough;var Transform=__webpack_require__(269),util=__webpack_require__(46);util.inherits=__webpack_require__(22),util.inherits(PassThrough,Transform),PassThrough.prototype._transform=function(chunk,encoding,cb){cb(null,chunk)}},function(module,exports,__webpack_require__){module.exports=__webpack_require__(90)},function(module,exports,__webpack_require__){module.exports=__webpack_require__(32)},function(module,exports,__webpack_require__){module.exports=__webpack_require__(88).Transform},function(module,exports,__webpack_require__){module.exports=__webpack_require__(88).PassThrough},function(module,exports){},function(module,exports,__webpack_require__){function ProxyHandler(cbs){this._cbs=cbs||{}}module.exports=ProxyHandler;var EVENTS=__webpack_require__(38).EVENTS;Object.keys(EVENTS).forEach(function(name){if(0===EVENTS[name])name="on"+name,ProxyHandler.prototype[name]=function(){this._cbs[name]&&this._cbs[name]()};else if(1===EVENTS[name])name="on"+name,ProxyHandler.prototype[name]=function(a){this._cbs[name]&&this._cbs[name](a)};else{if(2!==EVENTS[name])throw Error("wrong number of arguments");name="on"+name,ProxyHandler.prototype[name]=function(a,b){this._cbs[name]&&this._cbs[name](a,b)}}})},function(module,exports,__webpack_require__){var DomUtils=module.exports;[__webpack_require__(439),__webpack_require__(445),__webpack_require__(446),__webpack_require__(447),__webpack_require__(448),__webpack_require__(449)].forEach(function(ext){Object.keys(ext).forEach(function(key){DomUtils[key]=ext[key].bind(DomUtils)})})},function(module,exports,__webpack_require__){function getInnerHTML(elem,opts){return elem.children?elem.children.map(function(elem){return getOuterHTML(elem,opts)}).join(""):""}function getText(elem){return Array.isArray(elem)?elem.map(getText).join(""):isTag(elem)?"br"===elem.name?"\n":getText(elem.children):elem.type===ElementType.CDATA?getText(elem.children):elem.type===ElementType.Text?elem.data:""}var ElementType=__webpack_require__(45),getOuterHTML=__webpack_require__(440),isTag=ElementType.isTag;module.exports={getInnerHTML:getInnerHTML,getOuterHTML:getOuterHTML,getText:getText}},function(module,exports,__webpack_require__){function formatAttrs(attributes,opts){if(attributes){var value,output="";for(var key in attributes)value=attributes[key],output&&(output+=" "),!value&&booleanAttributes[key]?output+=key:output+=key+'="'+(opts.decodeEntities?entities.encodeXML(value):value)+'"';return output}}function renderTag(elem,opts){"svg"===elem.name&&(opts={decodeEntities:opts.decodeEntities,xmlMode:!0});var tag="<"+elem.name,attribs=formatAttrs(elem.attribs,opts);return attribs&&(tag+=" "+attribs),!opts.xmlMode||elem.children&&0!==elem.children.length?(tag+=">",elem.children&&(tag+=render(elem.children,opts)),singleTag[elem.name]&&!opts.xmlMode||(tag+="</"+elem.name+">")):tag+="/>",tag}function renderDirective(elem){return"<"+elem.data+">"}function renderText(elem,opts){var data=elem.data||"";return!opts.decodeEntities||elem.parent&&elem.parent.name in unencodedElements||(data=entities.encodeXML(data)),data}function renderCdata(elem){return"<![CDATA["+elem.children[0].data+"]]>"}function renderComment(elem){return"\x3c!--"+elem.data+"--\x3e"}var ElementType=__webpack_require__(441),entities=__webpack_require__(442),booleanAttributes={__proto__:null,allowfullscreen:!0,async:!0,autofocus:!0,autoplay:!0,checked:!0,controls:!0,default:!0,defer:!0,disabled:!0,hidden:!0,ismap:!0,loop:!0,multiple:!0,muted:!0,open:!0,readonly:!0,required:!0,reversed:!0,scoped:!0,seamless:!0,selected:!0,typemustmatch:!0},unencodedElements={__proto__:null,style:!0,script:!0,xmp:!0,iframe:!0,noembed:!0,noframes:!0,plaintext:!0,noscript:!0},singleTag={__proto__:null,area:!0,base:!0,basefont:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,isindex:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},render=module.exports=function(dom,opts){Array.isArray(dom)||dom.cheerio||(dom=[dom]),opts=opts||{};for(var output="",i=0;i<dom.length;i++){var elem=dom[i];"root"===elem.type?output+=render(elem.children,opts):ElementType.isTag(elem)?output+=renderTag(elem,opts):elem.type===ElementType.Directive?output+=renderDirective(elem):elem.type===ElementType.Comment?output+=renderComment(elem):elem.type===ElementType.CDATA?output+=renderCdata(elem):output+=renderText(elem,opts)}return output}},function(module,exports){module.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",isTag:function(elem){return"tag"===elem.type||"script"===elem.type||"style"===elem.type}}},function(module,exports,__webpack_require__){var encode=__webpack_require__(443),decode=__webpack_require__(444);exports.decode=function(data,level){return(!level||level<=0?decode.XML:decode.HTML)(data)},exports.decodeStrict=function(data,level){return(!level||level<=0?decode.XML:decode.HTMLStrict)(data)},exports.encode=function(data,level){return(!level||level<=0?encode.XML:encode.HTML)(data)},exports.encodeXML=encode.XML,exports.encodeHTML4=exports.encodeHTML5=exports.encodeHTML=encode.HTML,exports.decodeXML=exports.decodeXMLStrict=decode.XML,exports.decodeHTML4=exports.decodeHTML5=exports.decodeHTML=decode.HTML,exports.decodeHTML4Strict=exports.decodeHTML5Strict=exports.decodeHTMLStrict=decode.HTMLStrict,exports.escape=encode.escape},function(module,exports,__webpack_require__){function getInverseObj(obj){return Object.keys(obj).sort().reduce(function(inverse,name){return inverse[obj[name]]="&"+name+";",inverse},{})}function getInverseReplacer(inverse){var single=[],multiple=[];return Object.keys(inverse).forEach(function(k){1===k.length?single.push("\\"+k):multiple.push(k)}),multiple.unshift("["+single.join("")+"]"),new RegExp(multiple.join("|"),"g")}function singleCharReplacer(c){return"&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"}function astralReplacer(c){return"&#x"+(1024*(c.charCodeAt(0)-55296)+c.charCodeAt(1)-56320+65536).toString(16).toUpperCase()+";"}function getInverse(inverse,re){function func(name){return inverse[name]}return function(data){return data.replace(re,func).replace(re_astralSymbols,astralReplacer).replace(re_nonASCII,singleCharReplacer)}}function escapeXML(data){return data.replace(re_xmlChars,singleCharReplacer).replace(re_astralSymbols,astralReplacer).replace(re_nonASCII,singleCharReplacer)}var inverseXML=getInverseObj(__webpack_require__(87)),xmlReplacer=getInverseReplacer(inverseXML);exports.XML=getInverse(inverseXML,xmlReplacer);var inverseHTML=getInverseObj(__webpack_require__(86)),htmlReplacer=getInverseReplacer(inverseHTML);exports.HTML=getInverse(inverseHTML,htmlReplacer);var re_nonASCII=/[^\0-\x7F]/g,re_astralSymbols=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,re_xmlChars=getInverseReplacer(inverseXML);exports.escape=escapeXML},function(module,exports,__webpack_require__){function getStrictDecoder(map){var keys=Object.keys(map).join("|"),replace=getReplacer(map);keys+="|#[xX][\\da-fA-F]+|#\\d+";var re=new RegExp("&(?:"+keys+");","g");return function(str){return String(str).replace(re,replace)}}function sorter(a,b){return a<b?1:-1}function getReplacer(map){return function(str){return"#"===str.charAt(1)?decodeCodePoint("X"===str.charAt(2)||"x"===str.charAt(2)?parseInt(str.substr(3),16):parseInt(str.substr(2),10)):map[str.slice(1,-1)]}}var entityMap=__webpack_require__(86),legacyMap=__webpack_require__(261),xmlMap=__webpack_require__(87),decodeCodePoint=__webpack_require__(260),decodeXMLStrict=getStrictDecoder(xmlMap),decodeHTMLStrict=getStrictDecoder(entityMap),decodeHTML=function(){function replacer(str){return";"!==str.substr(-1)&&(str+=";"),replace(str)}for(var legacy=Object.keys(legacyMap).sort(sorter),keys=Object.keys(entityMap).sort(sorter),i=0,j=0;i<keys.length;i++)legacy[j]===keys[i]?(keys[i]+=";?",j++):keys[i]+=";";var re=new RegExp("&(?:"+keys.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),replace=getReplacer(entityMap);return function(str){return String(str).replace(re,replacer)}}();module.exports={XML:decodeXMLStrict,HTML:decodeHTML,HTMLStrict:decodeHTMLStrict}},function(module,exports){var getChildren=exports.getChildren=function(elem){return elem.children},getParent=exports.getParent=function(elem){return elem.parent};exports.getSiblings=function(elem){var parent=getParent(elem);return parent?getChildren(parent):[elem]},exports.getAttributeValue=function(elem,name){return elem.attribs&&elem.attribs[name]},exports.hasAttrib=function(elem,name){return!!elem.attribs&&hasOwnProperty.call(elem.attribs,name)},exports.getName=function(elem){return elem.name}},function(module,exports){exports.removeElement=function(elem){if(elem.prev&&(elem.prev.next=elem.next),elem.next&&(elem.next.prev=elem.prev),elem.parent){var childs=elem.parent.children;childs.splice(childs.lastIndexOf(elem),1)}},exports.replaceElement=function(elem,replacement){var prev=replacement.prev=elem.prev;prev&&(prev.next=replacement);var next=replacement.next=elem.next;next&&(next.prev=replacement);var parent=replacement.parent=elem.parent;if(parent){var childs=parent.children;childs[childs.lastIndexOf(elem)]=replacement}},exports.appendChild=function(elem,child){if(child.parent=elem,1!==elem.children.push(child)){var sibling=elem.children[elem.children.length-2];sibling.next=child,child.prev=sibling,child.next=null}},exports.append=function(elem,next){var parent=elem.parent,currNext=elem.next;if(next.next=currNext,next.prev=elem,elem.next=next,next.parent=parent,currNext){if(currNext.prev=next,parent){var childs=parent.children;childs.splice(childs.lastIndexOf(currNext),0,next)}}else parent&&parent.children.push(next)},exports.prepend=function(elem,prev){var parent=elem.parent;if(parent){var childs=parent.children;childs.splice(childs.lastIndexOf(elem),0,prev)}elem.prev&&(elem.prev.next=prev),prev.parent=parent,prev.prev=elem.prev,prev.next=elem,elem.prev=prev}},function(module,exports,__webpack_require__){function filter(test,element,recurse,limit){return Array.isArray(element)||(element=[element]),"number"==typeof limit&&isFinite(limit)||(limit=1/0),find(test,element,!1!==recurse,limit)}function find(test,elems,recurse,limit){for(var childs,result=[],i=0,j=elems.length;i<j&&!(test(elems[i])&&(result.push(elems[i]),--limit<=0))&&(childs=elems[i].children,!(recurse&&childs&&childs.length>0&&(childs=find(test,childs,recurse,limit),result=result.concat(childs),(limit-=childs.length)<=0)));i++);return result}function findOneChild(test,elems){for(var i=0,l=elems.length;i<l;i++)if(test(elems[i]))return elems[i];return null}function findOne(test,elems){for(var elem=null,i=0,l=elems.length;i<l&&!elem;i++)isTag(elems[i])&&(test(elems[i])?elem=elems[i]:elems[i].children.length>0&&(elem=findOne(test,elems[i].children)));return elem}function existsOne(test,elems){for(var i=0,l=elems.length;i<l;i++)if(isTag(elems[i])&&(test(elems[i])||elems[i].children.length>0&&existsOne(test,elems[i].children)))return!0;return!1}function findAll(test,rootElems){for(var result=[],stack=[rootElems];stack.length;){for(var elems=stack.pop(),i=0,j=elems.length;i<j;i++)isTag(elems[i])&&test(elems[i])&&result.push(elems[i]);for(;j-- >0;)elems[j].children&&elems[j].children.length>0&&stack.push(elems[j].children)}return result}var isTag=__webpack_require__(45).isTag;module.exports={filter:filter,find:find,findOneChild:findOneChild,findOne:findOne,existsOne:existsOne,findAll:findAll}},function(module,exports,__webpack_require__){function getAttribCheck(attrib,value){return"function"==typeof value?function(elem){return elem.attribs&&value(elem.attribs[attrib])}:function(elem){return elem.attribs&&elem.attribs[attrib]===value}}function combineFuncs(a,b){return function(elem){return a(elem)||b(elem)}}var ElementType=__webpack_require__(45),isTag=exports.isTag=ElementType.isTag;exports.testElement=function(options,element){for(var key in options)if(options.hasOwnProperty(key)){if("tag_name"===key){if(!isTag(element)||!options.tag_name(element.name))return!1}else if("tag_type"===key){if(!options.tag_type(element.type))return!1}else if("tag_contains"===key){if(isTag(element)||!options.tag_contains(element.data))return!1}else if(!element.attribs||!options[key](element.attribs[key]))return!1}else;return!0};var Checks={tag_name:function(name){return"function"==typeof name?function(elem){return isTag(elem)&&name(elem.name)}:"*"===name?isTag:function(elem){return isTag(elem)&&elem.name===name}},tag_type:function(type){return"function"==typeof type?function(elem){return type(elem.type)}:function(elem){return elem.type===type}},tag_contains:function(data){return"function"==typeof data?function(elem){return!isTag(elem)&&data(elem.data)}:function(elem){return!isTag(elem)&&elem.data===data}}};exports.getElements=function(options,element,recurse,limit){var funcs=Object.keys(options).map(function(key){var value=options[key];return key in Checks?Checks[key](value):getAttribCheck(key,value)});return 0===funcs.length?[]:this.filter(funcs.reduce(combineFuncs),element,recurse,limit)},exports.getElementById=function(id,element,recurse){return Array.isArray(element)||(element=[element]),this.findOne(getAttribCheck("id",id),element,!1!==recurse)},exports.getElementsByTagName=function(name,element,recurse,limit){return this.filter(Checks.tag_name(name),element,recurse,limit)},exports.getElementsByTagType=function(type,element,recurse,limit){return this.filter(Checks.tag_type(type),element,recurse,limit)}},function(module,exports){exports.removeSubsets=function(nodes){for(var node,ancestor,replace,idx=nodes.length;--idx>-1;){for(node=ancestor=nodes[idx],nodes[idx]=null,replace=!0;ancestor;){if(nodes.indexOf(ancestor)>-1){replace=!1,nodes.splice(idx,1);break}ancestor=ancestor.parent}replace&&(nodes[idx]=node)}return nodes};var POSITION={DISCONNECTED:1,PRECEDING:2,FOLLOWING:4,CONTAINS:8,CONTAINED_BY:16},comparePos=exports.compareDocumentPosition=function(nodeA,nodeB){var current,sharedParent,siblings,aSibling,bSibling,idx,aParents=[],bParents=[];if(nodeA===nodeB)return 0;for(current=nodeA;current;)aParents.unshift(current),current=current.parent;for(current=nodeB;current;)bParents.unshift(current),current=current.parent;for(idx=0;aParents[idx]===bParents[idx];)idx++;return 0===idx?POSITION.DISCONNECTED:(sharedParent=aParents[idx-1],siblings=sharedParent.children,aSibling=aParents[idx],bSibling=bParents[idx],siblings.indexOf(aSibling)>siblings.indexOf(bSibling)?sharedParent===nodeB?POSITION.FOLLOWING|POSITION.CONTAINED_BY:POSITION.FOLLOWING:sharedParent===nodeA?POSITION.PRECEDING|POSITION.CONTAINS:POSITION.PRECEDING)};exports.uniqueSort=function(nodes){var node,position,idx=nodes.length;for(nodes=nodes.slice();--idx>-1;)node=nodes[idx],(position=nodes.indexOf(node))>-1&&position<idx&&nodes.splice(idx,1);return nodes.sort(function(a,b){var relative=comparePos(a,b);return relative&POSITION.PRECEDING?-1:relative&POSITION.FOLLOWING?1:0}),nodes}},function(module,exports,__webpack_require__){function CollectingHandler(cbs){this._cbs=cbs||{},this.events=[]}module.exports=CollectingHandler;var EVENTS=__webpack_require__(38).EVENTS;Object.keys(EVENTS).forEach(function(name){if(0===EVENTS[name])name="on"+name,CollectingHandler.prototype[name]=function(){this.events.push([name]),this._cbs[name]&&this._cbs[name]()};else if(1===EVENTS[name])name="on"+name,CollectingHandler.prototype[name]=function(a){this.events.push([name,a]),this._cbs[name]&&this._cbs[name](a)};else{if(2!==EVENTS[name])throw Error("wrong number of arguments");name="on"+name,CollectingHandler.prototype[name]=function(a,b){this.events.push([name,a,b]),this._cbs[name]&&this._cbs[name](a,b)}}}),CollectingHandler.prototype.onreset=function(){this.events=[],this._cbs.onreset&&this._cbs.onreset()},CollectingHandler.prototype.restart=function(){this._cbs.onreset&&this._cbs.onreset();for(var i=0,len=this.events.length;i<len;i++)if(this._cbs[this.events[i][0]]){var num=this.events[i].length;1===num?this._cbs[this.events[i][0]]():2===num?this._cbs[this.events[i][0]](this.events[i][1]):this._cbs[this.events[i][0]](this.events[i][1],this.events[i][2])}}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}Object.defineProperty(exports,"__esModule",{value:!0});var _ElementType$Text$Ele,_htmlparser=__webpack_require__(38),_TextElementType=__webpack_require__(452),_TextElementType2=_interopRequireDefault(_TextElementType),_TagElementType=__webpack_require__(453),_TagElementType2=_interopRequireDefault(_TagElementType),_StyleElementType=__webpack_require__(460),_StyleElementType2=_interopRequireDefault(_StyleElementType),_UnsupportedElementType=__webpack_require__(461),_UnsupportedElementType2=_interopRequireDefault(_UnsupportedElementType);exports.default=(_ElementType$Text$Ele={},_defineProperty(_ElementType$Text$Ele,_htmlparser.ElementType.Text,_TextElementType2.default),_defineProperty(_ElementType$Text$Ele,_htmlparser.ElementType.Tag,_TagElementType2.default),_defineProperty(_ElementType$Text$Ele,_htmlparser.ElementType.Style,_StyleElementType2.default),_defineProperty(_ElementType$Text$Ele,_htmlparser.ElementType.Directive,_UnsupportedElementType2.default),_defineProperty(_ElementType$Text$Ele,_htmlparser.ElementType.Comment,_UnsupportedElementType2.default),_defineProperty(_ElementType$Text$Ele,_htmlparser.ElementType.Script,_UnsupportedElementType2.default),_defineProperty(_ElementType$Text$Ele,_htmlparser.ElementType.CDATA,_UnsupportedElementType2.default),_defineProperty(_ElementType$Text$Ele,_htmlparser.ElementType.Doctype,_UnsupportedElementType2.default),_ElementType$Text$Ele)},function(module,exports,__webpack_require__){"use strict";function TextElementType(node){return node.data}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=TextElementType},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function TagElementType(node,key){var props=(0,_GeneratePropsFromAttributes2.default)(node.attribs,key),tagName=(0,_TransformTagName2.default)(node.name),children=null;return-1===_VoidElements2.default.indexOf(tagName)&&(children=(0,_ProcessNodes2.default)(node.children)),_react2.default.createElement(tagName,props,children)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=TagElementType;var _react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_ProcessNodes=__webpack_require__(270),_ProcessNodes2=_interopRequireDefault(_ProcessNodes),_GeneratePropsFromAttributes=__webpack_require__(271),_GeneratePropsFromAttributes2=_interopRequireDefault(_GeneratePropsFromAttributes),_TransformTagName=__webpack_require__(458),_TransformTagName2=_interopRequireDefault(_TransformTagName),_VoidElements=__webpack_require__(459),_VoidElements2=_interopRequireDefault(_VoidElements)},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function HtmlAttributesToReact(attributes){return Object.keys(attributes).reduce(function(mappedAttributes,attribute){var lowerCaseAttribute=attribute.toLowerCase(),name=_ReactAttributes2.default[lowerCaseAttribute]||lowerCaseAttribute;return mappedAttributes[name]=getParsedAttributeValue(name,attributes[attribute]),mappedAttributes},{})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=HtmlAttributesToReact;var _BooleanAttributes=__webpack_require__(455),_BooleanAttributes2=_interopRequireDefault(_BooleanAttributes),_ReactAttributes=__webpack_require__(456),_ReactAttributes2=_interopRequireDefault(_ReactAttributes),getParsedAttributeValue=function(attribute,value){return _BooleanAttributes2.default.map(function(attr){return attr.toLowerCase()}).indexOf(attribute.toLowerCase())>=0&&(value=attribute),value}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=["allowfullScreen","async","autoplay","capture","checked","controls","default","defer","disabled","formnovalidate","hidden","loop","multiple","muted","novalidate","open","readonly","required","reversed","scoped","seamless","selected","itemscope"]},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={accept:"accept","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",allowtransparency:"allowTransparency",alt:"alt",async:"async",autocomplete:"autoComplete",autoplay:"autoPlay",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",charset:"charSet",challenge:"challenge",checked:"checked",classid:"classID",class:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",coords:"coords",crossorigin:"crossOrigin",data:"data",datetime:"dateTime",default:"default",defer:"defer",dir:"dir",disabled:"disabled",download:"download",draggable:"draggable",enctype:"encType",form:"form",formaction:"formAction",formenctype:"formEncType",formmethod:"formMethod",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",for:"htmlFor","http-equiv":"httpEquiv",icon:"icon",id:"id",inputmode:"inputMode",integrity:"integrity",is:"is",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginheight:"marginHeight",marginwidth:"marginWidth",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",poster:"poster",preload:"preload",radiogroup:"radioGroup",readonly:"readOnly",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",datatype:"datatype",inlist:"inlist",prefix:"prefix",property:"property",resource:"resource",typeof:"typeof",vocab:"vocab",autocapitalize:"autoCapitalize",autocorrect:"autoCorrect",autosave:"autoSave",color:"color",itemprop:"itemProp",itemscope:"itemScope",itemtype:"itemType",itemid:"itemID",itemref:"itemRef",results:"results",security:"security",unselectable:"unselectable",autofocus:"autoFocus"}},function(module,exports,__webpack_require__){"use strict";function InlineStyleToObject(){var inlineStyle=arguments.length<=0||void 0===arguments[0]?"":arguments[0];return""===inlineStyle?{}:inlineStyle.split(";").reduce(function(styleObject,stylePropertyValue){var _stylePropertyValue$s=stylePropertyValue.split(":").map(function(item){return item.trim().toLowerCase()}),_stylePropertyValue$s2=_slicedToArray(_stylePropertyValue$s,2),property=_stylePropertyValue$s2[0],value=_stylePropertyValue$s2[1];return void 0===value?styleObject:(property=property.replace(/^-ms-/,"ms-").replace(/-(.)/g,function(_,character){return character.toUpperCase()}),styleObject[property]=value,styleObject)},{})}Object.defineProperty(exports,"__esModule",{value:!0});var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();exports.default=InlineStyleToObject},function(module,exports,__webpack_require__){"use strict";function TransformTagName(tagName){return TAGS_TO_TRANSFORM.hasOwnProperty(tagName)?TAGS_TO_TRANSFORM[tagName]:tagName}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=TransformTagName;var TAGS_TO_TRANSFORM={html:"div",head:"div",body:"div"}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function StyleElementType(node,key){var styles=void 0;node.children.length>0&&(styles=node.children[0].data);var props=(0,_GeneratePropsFromAttributes2.default)(node.attribs,key);return _react2.default.createElement("style",props,styles)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=StyleElementType;var _react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_GeneratePropsFromAttributes=__webpack_require__(271),_GeneratePropsFromAttributes2=_interopRequireDefault(_GeneratePropsFromAttributes)},function(module,exports,__webpack_require__){"use strict";function UnsupportedElementType(){return null}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=UnsupportedElementType},,,,,,,,,,,,,,,,,,,function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.fromNewsletter=exports.fromUrl=exports.fromDom=void 0;var _underscore=__webpack_require__(8),_underscore2=_interopRequireDefault(_underscore),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_html2canvas=__webpack_require__(481),_html2canvas2=_interopRequireDefault(_html2canvas),fromDom=exports.fromDom=function(element){return(0,_html2canvas2.default)(element,{logging:!1}).then(function(canvas){return canvas.toDataURL("image/jpeg")})},fromUrl=exports.fromUrl=function(url){return new Promise(function(resolve,reject){var iframe=document.createElement("iframe"),protocol=location.href.startsWith("https://")?"https:":"http:";iframe.src=protocol+url.replace(/^https?:/,""),iframe.style.opacity=0,iframe.scrolling="no",iframe.onload=function(){fromDom(iframe.contentDocument.documentElement).then(function(image){document.body.removeChild(iframe),resolve(image)}).catch(function(){document.body.removeChild(iframe),reject(_mailpoet2.default.I18n.t("errorWhileTakingScreenshot"))})};var onError=function(){document.body.removeChild(iframe),reject(_mailpoet2.default.I18n.t("errorWhileTakingScreenshot"))};iframe.onerror=onError,iframe.onError=onError,iframe.className="mailpoet_template_iframe";try{document.body.appendChild(iframe)}catch(err){onError()}})};exports.fromNewsletter=function(data){return new Promise(function(resolve,reject){var json=data;_underscore2.default.isUndefined(json.body)||(json.body=JSON.stringify(json.body)),_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"showPreview",data:json}).done(function(response){return fromUrl(response.meta.preview_url).then(resolve).catch(reject)}).fail(function(response){return reject(response.errors)})})}},function(module,exports,__webpack_require__){(function(global){module.exports=global.html2canvas=__webpack_require__(482)}).call(exports,__webpack_require__(9))},function(module,exports,__webpack_require__){/*!
|
8 |
+
* html2canvas 1.0.0-alpha.12 <https://html2canvas.hertzen.com>
|
9 |
+
* Copyright (c) 2018 Niklas von Hertzen <https://hertzen.com>
|
10 |
+
* Released under MIT License
|
11 |
+
*/
|
12 |
+
!function(root,factory){module.exports=factory()}(0,function(){return function(modules){function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={i:moduleId,l:!1,exports:{}};return modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.l=!0,module.exports}var installedModules={};return __webpack_require__.m=modules,__webpack_require__.c=installedModules,__webpack_require__.d=function(exports,name,getter){__webpack_require__.o(exports,name)||Object.defineProperty(exports,name,{configurable:!1,enumerable:!0,get:getter})},__webpack_require__.n=function(module){var getter=module&&module.__esModule?function(){return module.default}:function(){return module};return __webpack_require__.d(getter,"a",getter),getter},__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=27)}([function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),HEX3=/^#([a-f0-9]{3})$/i,hex3=function(value){var match=value.match(HEX3);return!!match&&[parseInt(match[1][0]+match[1][0],16),parseInt(match[1][1]+match[1][1],16),parseInt(match[1][2]+match[1][2],16),null]},HEX6=/^#([a-f0-9]{6})$/i,hex6=function(value){var match=value.match(HEX6);return!!match&&[parseInt(match[1].substring(0,2),16),parseInt(match[1].substring(2,4),16),parseInt(match[1].substring(4,6),16),null]},RGB=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/,rgb=function(value){var match=value.match(RGB);return!!match&&[Number(match[1]),Number(match[2]),Number(match[3]),null]},RGBA=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d?\.?\d+)\s*\)$/,rgba=function(value){var match=value.match(RGBA);return!!(match&&match.length>4)&&[Number(match[1]),Number(match[2]),Number(match[3]),Number(match[4])]},fromArray=function(array){return[Math.min(array[0],255),Math.min(array[1],255),Math.min(array[2],255),array.length>3?array[3]:null]},namedColor=function(name){var color=NAMED_COLORS[name.toLowerCase()];return color||!1},Color=function(){function Color(value){_classCallCheck(this,Color);var _ref=Array.isArray(value)?fromArray(value):hex3(value)||rgb(value)||rgba(value)||namedColor(value)||hex6(value)||[0,0,0,null],_ref2=_slicedToArray(_ref,4),r=_ref2[0],g=_ref2[1],b=_ref2[2],a=_ref2[3];this.r=r,this.g=g,this.b=b,this.a=a}return _createClass(Color,[{key:"isTransparent",value:function(){return 0===this.a}},{key:"toString",value:function(){return null!==this.a&&1!==this.a?"rgba("+this.r+","+this.g+","+this.b+","+this.a+")":"rgb("+this.r+","+this.g+","+this.b+")"}}]),Color}();exports.default=Color;var NAMED_COLORS={transparent:[0,0,0,0],aliceblue:[240,248,255,null],antiquewhite:[250,235,215,null],aqua:[0,255,255,null],aquamarine:[127,255,212,null],azure:[240,255,255,null],beige:[245,245,220,null],bisque:[255,228,196,null],black:[0,0,0,null],blanchedalmond:[255,235,205,null],blue:[0,0,255,null],blueviolet:[138,43,226,null],brown:[165,42,42,null],burlywood:[222,184,135,null],cadetblue:[95,158,160,null],chartreuse:[127,255,0,null],chocolate:[210,105,30,null],coral:[255,127,80,null],cornflowerblue:[100,149,237,null],cornsilk:[255,248,220,null],crimson:[220,20,60,null],cyan:[0,255,255,null],darkblue:[0,0,139,null],darkcyan:[0,139,139,null],darkgoldenrod:[184,134,11,null],darkgray:[169,169,169,null],darkgreen:[0,100,0,null],darkgrey:[169,169,169,null],darkkhaki:[189,183,107,null],darkmagenta:[139,0,139,null],darkolivegreen:[85,107,47,null],darkorange:[255,140,0,null],darkorchid:[153,50,204,null],darkred:[139,0,0,null],darksalmon:[233,150,122,null],darkseagreen:[143,188,143,null],darkslateblue:[72,61,139,null],darkslategray:[47,79,79,null],darkslategrey:[47,79,79,null],darkturquoise:[0,206,209,null],darkviolet:[148,0,211,null],deeppink:[255,20,147,null],deepskyblue:[0,191,255,null],dimgray:[105,105,105,null],dimgrey:[105,105,105,null],dodgerblue:[30,144,255,null],firebrick:[178,34,34,null],floralwhite:[255,250,240,null],forestgreen:[34,139,34,null],fuchsia:[255,0,255,null],gainsboro:[220,220,220,null],ghostwhite:[248,248,255,null],gold:[255,215,0,null],goldenrod:[218,165,32,null],gray:[128,128,128,null],green:[0,128,0,null],greenyellow:[173,255,47,null],grey:[128,128,128,null],honeydew:[240,255,240,null],hotpink:[255,105,180,null],indianred:[205,92,92,null],indigo:[75,0,130,null],ivory:[255,255,240,null],khaki:[240,230,140,null],lavender:[230,230,250,null],lavenderblush:[255,240,245,null],lawngreen:[124,252,0,null],lemonchiffon:[255,250,205,null],lightblue:[173,216,230,null],lightcoral:[240,128,128,null],lightcyan:[224,255,255,null],lightgoldenrodyellow:[250,250,210,null],lightgray:[211,211,211,null],lightgreen:[144,238,144,null],lightgrey:[211,211,211,null],lightpink:[255,182,193,null],lightsalmon:[255,160,122,null],lightseagreen:[32,178,170,null],lightskyblue:[135,206,250,null],lightslategray:[119,136,153,null],lightslategrey:[119,136,153,null],lightsteelblue:[176,196,222,null],lightyellow:[255,255,224,null],lime:[0,255,0,null],limegreen:[50,205,50,null],linen:[250,240,230,null],magenta:[255,0,255,null],maroon:[128,0,0,null],mediumaquamarine:[102,205,170,null],mediumblue:[0,0,205,null],mediumorchid:[186,85,211,null],mediumpurple:[147,112,219,null],mediumseagreen:[60,179,113,null],mediumslateblue:[123,104,238,null],mediumspringgreen:[0,250,154,null],mediumturquoise:[72,209,204,null],mediumvioletred:[199,21,133,null],midnightblue:[25,25,112,null],mintcream:[245,255,250,null],mistyrose:[255,228,225,null],moccasin:[255,228,181,null],navajowhite:[255,222,173,null],navy:[0,0,128,null],oldlace:[253,245,230,null],olive:[128,128,0,null],olivedrab:[107,142,35,null],orange:[255,165,0,null],orangered:[255,69,0,null],orchid:[218,112,214,null],palegoldenrod:[238,232,170,null],palegreen:[152,251,152,null],paleturquoise:[175,238,238,null],palevioletred:[219,112,147,null],papayawhip:[255,239,213,null],peachpuff:[255,218,185,null],peru:[205,133,63,null],pink:[255,192,203,null],plum:[221,160,221,null],powderblue:[176,224,230,null],purple:[128,0,128,null],rebeccapurple:[102,51,153,null],red:[255,0,0,null],rosybrown:[188,143,143,null],royalblue:[65,105,225,null],saddlebrown:[139,69,19,null],salmon:[250,128,114,null],sandybrown:[244,164,96,null],seagreen:[46,139,87,null],seashell:[255,245,238,null],sienna:[160,82,45,null],silver:[192,192,192,null],skyblue:[135,206,235,null],slateblue:[106,90,205,null],slategray:[112,128,144,null],slategrey:[112,128,144,null],snow:[255,250,250,null],springgreen:[0,255,127,null],steelblue:[70,130,180,null],tan:[210,180,140,null],teal:[0,128,128,null],thistle:[216,191,216,null],tomato:[255,99,71,null],turquoise:[64,224,208,null],violet:[238,130,238,null],wheat:[245,222,179,null],white:[255,255,255,null],whitesmoke:[245,245,245,null],yellow:[255,255,0,null],yellowgreen:[154,205,50,null]};exports.TRANSPARENT=new Color([0,0,0,0])},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.calculateLengthFromValueWithUnit=exports.LENGTH_TYPE=void 0;var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_NodeContainer=__webpack_require__(3),LENGTH_TYPE=(function(obj){obj&&obj.__esModule}(_NodeContainer),exports.LENGTH_TYPE={PX:0,PERCENTAGE:1}),Length=function(){function Length(value){_classCallCheck(this,Length),this.type="%"===value.substr(value.length-1)?LENGTH_TYPE.PERCENTAGE:LENGTH_TYPE.PX;var parsedValue=parseFloat(value);isNaN(parsedValue)&&console.error('Invalid value given for Length: "'+value+'"'),this.value=isNaN(parsedValue)?0:parsedValue}return _createClass(Length,[{key:"isPercentage",value:function(){return this.type===LENGTH_TYPE.PERCENTAGE}},{key:"getAbsoluteValue",value:function(parentLength){return this.isPercentage()?parentLength*(this.value/100):this.value}}],[{key:"create",value:function(v){return new Length(v)}}]),Length}();exports.default=Length;var getRootFontSize=function getRootFontSize(container){var parent=container.parent;return parent?getRootFontSize(parent):parseFloat(container.style.font.fontSize)};exports.calculateLengthFromValueWithUnit=function(container,value,unit){switch(unit){case"px":case"%":return new Length(value+unit);case"em":case"rem":var length=new Length(value);return length.value*="em"===unit?parseFloat(container.style.font.fontSize):getRootFontSize(container),length;default:return new Length("0")}}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.parseBoundCurves=exports.calculatePaddingBoxPath=exports.calculateBorderBoxPath=exports.parsePathForBorder=exports.parseDocumentSize=exports.calculateContentBox=exports.calculatePaddingBox=exports.parseBounds=exports.Bounds=void 0;var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_Vector=__webpack_require__(7),_Vector2=_interopRequireDefault(_Vector),_BezierCurve=__webpack_require__(32),_BezierCurve2=_interopRequireDefault(_BezierCurve),Bounds=exports.Bounds=function(){function Bounds(x,y,w,h){_classCallCheck(this,Bounds),this.left=x,this.top=y,this.width=w,this.height=h}return _createClass(Bounds,null,[{key:"fromClientRect",value:function(clientRect,scrollX,scrollY){return new Bounds(clientRect.left+scrollX,clientRect.top+scrollY,clientRect.width,clientRect.height)}}]),Bounds}(),createPathFromCurves=(exports.parseBounds=function(node,scrollX,scrollY){return Bounds.fromClientRect(node.getBoundingClientRect(),scrollX,scrollY)},exports.calculatePaddingBox=function(bounds,borders){return new Bounds(bounds.left+borders[3].borderWidth,bounds.top+borders[0].borderWidth,bounds.width-(borders[1].borderWidth+borders[3].borderWidth),bounds.height-(borders[0].borderWidth+borders[2].borderWidth))},exports.calculateContentBox=function(bounds,padding,borders){var paddingTop=padding[0].value,paddingRight=padding[1].value,paddingBottom=padding[2].value,paddingLeft=padding[3].value;return new Bounds(bounds.left+paddingLeft+borders[3].borderWidth,bounds.top+paddingTop+borders[0].borderWidth,bounds.width-(borders[1].borderWidth+borders[3].borderWidth+paddingLeft+paddingRight),bounds.height-(borders[0].borderWidth+borders[2].borderWidth+paddingTop+paddingBottom))},exports.parseDocumentSize=function(document){var body=document.body,documentElement=document.documentElement;if(!body||!documentElement)throw new Error("Unable to get document size");var width=Math.max(Math.max(body.scrollWidth,documentElement.scrollWidth),Math.max(body.offsetWidth,documentElement.offsetWidth),Math.max(body.clientWidth,documentElement.clientWidth)),height=Math.max(Math.max(body.scrollHeight,documentElement.scrollHeight),Math.max(body.offsetHeight,documentElement.offsetHeight),Math.max(body.clientHeight,documentElement.clientHeight));return new Bounds(0,0,width,height)},exports.parsePathForBorder=function(curves,borderSide){switch(borderSide){case 0:return createPathFromCurves(curves.topLeftOuter,curves.topLeftInner,curves.topRightOuter,curves.topRightInner);case 1:return createPathFromCurves(curves.topRightOuter,curves.topRightInner,curves.bottomRightOuter,curves.bottomRightInner);case 2:return createPathFromCurves(curves.bottomRightOuter,curves.bottomRightInner,curves.bottomLeftOuter,curves.bottomLeftInner);case 3:default:return createPathFromCurves(curves.bottomLeftOuter,curves.bottomLeftInner,curves.topLeftOuter,curves.topLeftInner)}},function(outer1,inner1,outer2,inner2){var path=[];return outer1 instanceof _BezierCurve2.default?path.push(outer1.subdivide(.5,!1)):path.push(outer1),outer2 instanceof _BezierCurve2.default?path.push(outer2.subdivide(.5,!0)):path.push(outer2),inner2 instanceof _BezierCurve2.default?path.push(inner2.subdivide(.5,!0).reverse()):path.push(inner2),inner1 instanceof _BezierCurve2.default?path.push(inner1.subdivide(.5,!1).reverse()):path.push(inner1),path}),CORNER=(exports.calculateBorderBoxPath=function(curves){return[curves.topLeftOuter,curves.topRightOuter,curves.bottomRightOuter,curves.bottomLeftOuter]},exports.calculatePaddingBoxPath=function(curves){return[curves.topLeftInner,curves.topRightInner,curves.bottomRightInner,curves.bottomLeftInner]},exports.parseBoundCurves=function(bounds,borders,borderRadius){var tlh=borderRadius[CORNER.TOP_LEFT][0].getAbsoluteValue(bounds.width),tlv=borderRadius[CORNER.TOP_LEFT][1].getAbsoluteValue(bounds.height),trh=borderRadius[CORNER.TOP_RIGHT][0].getAbsoluteValue(bounds.width),trv=borderRadius[CORNER.TOP_RIGHT][1].getAbsoluteValue(bounds.height),brh=borderRadius[CORNER.BOTTOM_RIGHT][0].getAbsoluteValue(bounds.width),brv=borderRadius[CORNER.BOTTOM_RIGHT][1].getAbsoluteValue(bounds.height),blh=borderRadius[CORNER.BOTTOM_LEFT][0].getAbsoluteValue(bounds.width),blv=borderRadius[CORNER.BOTTOM_LEFT][1].getAbsoluteValue(bounds.height),factors=[];factors.push((tlh+trh)/bounds.width),factors.push((blh+brh)/bounds.width),factors.push((tlv+blv)/bounds.height),factors.push((trv+brv)/bounds.height);var maxFactor=Math.max.apply(Math,factors);maxFactor>1&&(tlh/=maxFactor,tlv/=maxFactor,trh/=maxFactor,trv/=maxFactor,brh/=maxFactor,brv/=maxFactor,blh/=maxFactor,blv/=maxFactor);var topWidth=bounds.width-trh,rightHeight=bounds.height-brv,bottomWidth=bounds.width-brh,leftHeight=bounds.height-blv;return{topLeftOuter:tlh>0||tlv>0?getCurvePoints(bounds.left,bounds.top,tlh,tlv,CORNER.TOP_LEFT):new _Vector2.default(bounds.left,bounds.top),topLeftInner:tlh>0||tlv>0?getCurvePoints(bounds.left+borders[3].borderWidth,bounds.top+borders[0].borderWidth,Math.max(0,tlh-borders[3].borderWidth),Math.max(0,tlv-borders[0].borderWidth),CORNER.TOP_LEFT):new _Vector2.default(bounds.left+borders[3].borderWidth,bounds.top+borders[0].borderWidth),topRightOuter:trh>0||trv>0?getCurvePoints(bounds.left+topWidth,bounds.top,trh,trv,CORNER.TOP_RIGHT):new _Vector2.default(bounds.left+bounds.width,bounds.top),topRightInner:trh>0||trv>0?getCurvePoints(bounds.left+Math.min(topWidth,bounds.width+borders[3].borderWidth),bounds.top+borders[0].borderWidth,topWidth>bounds.width+borders[3].borderWidth?0:trh-borders[3].borderWidth,trv-borders[0].borderWidth,CORNER.TOP_RIGHT):new _Vector2.default(bounds.left+bounds.width-borders[1].borderWidth,bounds.top+borders[0].borderWidth),bottomRightOuter:brh>0||brv>0?getCurvePoints(bounds.left+bottomWidth,bounds.top+rightHeight,brh,brv,CORNER.BOTTOM_RIGHT):new _Vector2.default(bounds.left+bounds.width,bounds.top+bounds.height),bottomRightInner:brh>0||brv>0?getCurvePoints(bounds.left+Math.min(bottomWidth,bounds.width-borders[3].borderWidth),bounds.top+Math.min(rightHeight,bounds.height+borders[0].borderWidth),Math.max(0,brh-borders[1].borderWidth),brv-borders[2].borderWidth,CORNER.BOTTOM_RIGHT):new _Vector2.default(bounds.left+bounds.width-borders[1].borderWidth,bounds.top+bounds.height-borders[2].borderWidth),bottomLeftOuter:blh>0||blv>0?getCurvePoints(bounds.left,bounds.top+leftHeight,blh,blv,CORNER.BOTTOM_LEFT):new _Vector2.default(bounds.left,bounds.top+bounds.height),bottomLeftInner:blh>0||blv>0?getCurvePoints(bounds.left+borders[3].borderWidth,bounds.top+leftHeight,Math.max(0,blh-borders[3].borderWidth),blv-borders[2].borderWidth,CORNER.BOTTOM_LEFT):new _Vector2.default(bounds.left+borders[3].borderWidth,bounds.top+bounds.height-borders[2].borderWidth)}},{TOP_LEFT:0,TOP_RIGHT:1,BOTTOM_RIGHT:2,BOTTOM_LEFT:3}),getCurvePoints=function(x,y,r1,r2,position){var kappa=(Math.sqrt(2)-1)/3*4,ox=r1*kappa,oy=r2*kappa,xm=x+r1,ym=y+r2;switch(position){case CORNER.TOP_LEFT:return new _BezierCurve2.default(new _Vector2.default(x,ym),new _Vector2.default(x,ym-oy),new _Vector2.default(xm-ox,y),new _Vector2.default(xm,y));case CORNER.TOP_RIGHT:return new _BezierCurve2.default(new _Vector2.default(x,y),new _Vector2.default(x+ox,y),new _Vector2.default(xm,ym-oy),new _Vector2.default(xm,ym));case CORNER.BOTTOM_RIGHT:return new _BezierCurve2.default(new _Vector2.default(xm,y),new _Vector2.default(xm,y+oy),new _Vector2.default(x+ox,ym),new _Vector2.default(x,ym));case CORNER.BOTTOM_LEFT:default:return new _BezierCurve2.default(new _Vector2.default(xm,ym),new _Vector2.default(xm-ox,ym),new _Vector2.default(x,y+oy),new _Vector2.default(x,y))}}},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_Color=__webpack_require__(0),_Color2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_Color),_Util=__webpack_require__(4),_background=__webpack_require__(5),_border=__webpack_require__(12),_borderRadius=__webpack_require__(33),_display=__webpack_require__(34),_float=__webpack_require__(35),_font=__webpack_require__(36),_letterSpacing=__webpack_require__(37),_lineBreak=__webpack_require__(38),_listStyle=__webpack_require__(8),_margin=__webpack_require__(39),_overflow=__webpack_require__(40),_overflowWrap=__webpack_require__(18),_padding=__webpack_require__(17),_position=__webpack_require__(19),_textDecoration=__webpack_require__(11),_textShadow=__webpack_require__(41),_textTransform=__webpack_require__(20),_transform=__webpack_require__(42),_visibility=__webpack_require__(43),_wordBreak=__webpack_require__(44),_zIndex=__webpack_require__(45),_Bounds=__webpack_require__(2),_Input=__webpack_require__(21),_ListItem=__webpack_require__(14),INPUT_TAGS=["INPUT","TEXTAREA","SELECT"],NodeContainer=function(){function NodeContainer(node,parent,resourceLoader,index){var _this=this;_classCallCheck(this,NodeContainer),this.parent=parent,this.tagName=node.tagName,this.index=index,this.childNodes=[],this.listItems=[],"number"==typeof node.start&&(this.listStart=node.start);var defaultView=node.ownerDocument.defaultView,scrollX=defaultView.pageXOffset,scrollY=defaultView.pageYOffset,style=defaultView.getComputedStyle(node,null),display=(0,_display.parseDisplay)(style.display),IS_INPUT="radio"===node.type||"checkbox"===node.type,position=(0,_position.parsePosition)(style.position);if(this.style={background:IS_INPUT?_Input.INPUT_BACKGROUND:(0,_background.parseBackground)(style,resourceLoader),border:IS_INPUT?_Input.INPUT_BORDERS:(0,_border.parseBorder)(style),borderRadius:(node instanceof defaultView.HTMLInputElement||node instanceof HTMLInputElement)&&IS_INPUT?(0,_Input.getInputBorderRadius)(node):(0,_borderRadius.parseBorderRadius)(style),color:IS_INPUT?_Input.INPUT_COLOR:new _Color2.default(style.color),display:display,float:(0,_float.parseCSSFloat)(style.float),font:(0,_font.parseFont)(style),letterSpacing:(0,_letterSpacing.parseLetterSpacing)(style.letterSpacing),listStyle:display===_display.DISPLAY.LIST_ITEM?(0,_listStyle.parseListStyle)(style):null,lineBreak:(0,_lineBreak.parseLineBreak)(style.lineBreak),margin:(0,_margin.parseMargin)(style),opacity:parseFloat(style.opacity),overflow:-1===INPUT_TAGS.indexOf(node.tagName)?(0,_overflow.parseOverflow)(style.overflow):_overflow.OVERFLOW.HIDDEN,overflowWrap:(0,_overflowWrap.parseOverflowWrap)(style.overflowWrap?style.overflowWrap:style.wordWrap),padding:(0,_padding.parsePadding)(style),position:position,textDecoration:(0,_textDecoration.parseTextDecoration)(style),textShadow:(0,_textShadow.parseTextShadow)(style.textShadow),textTransform:(0,_textTransform.parseTextTransform)(style.textTransform),transform:(0,_transform.parseTransform)(style),visibility:(0,_visibility.parseVisibility)(style.visibility),wordBreak:(0,_wordBreak.parseWordBreak)(style.wordBreak),zIndex:(0,_zIndex.parseZIndex)(position!==_position.POSITION.STATIC?style.zIndex:"auto")},this.isTransformed()&&(node.style.transform="matrix(1,0,0,1,0,0)"),display===_display.DISPLAY.LIST_ITEM){var listOwner=(0,_ListItem.getListOwner)(this);if(listOwner){var listIndex=listOwner.listItems.length;listOwner.listItems.push(this),this.listIndex=node.hasAttribute("value")&&"number"==typeof node.value?node.value:0===listIndex?"number"==typeof listOwner.listStart?listOwner.listStart:1:listOwner.listItems[listIndex-1].listIndex+1}}"IMG"===node.tagName&&node.addEventListener("load",function(){_this.bounds=(0,_Bounds.parseBounds)(node,scrollX,scrollY),_this.curvedBounds=(0,_Bounds.parseBoundCurves)(_this.bounds,_this.style.border,_this.style.borderRadius)}),this.image=getImage(node,resourceLoader),this.bounds=IS_INPUT?(0,_Input.reformatInputBounds)((0,_Bounds.parseBounds)(node,scrollX,scrollY)):(0,_Bounds.parseBounds)(node,scrollX,scrollY),this.curvedBounds=(0,_Bounds.parseBoundCurves)(this.bounds,this.style.border,this.style.borderRadius),this.name=node.tagName.toLowerCase()+(node.id?"#"+node.id:"")+node.className.toString().split(" ").map(function(s){return s.length?"."+s:""}).join("")}return _createClass(NodeContainer,[{key:"getClipPaths",value:function(){var parentClips=this.parent?this.parent.getClipPaths():[];return this.style.overflow!==_overflow.OVERFLOW.VISIBLE?parentClips.concat([(0,_Bounds.calculatePaddingBoxPath)(this.curvedBounds)]):parentClips}},{key:"isInFlow",value:function(){return this.isRootElement()&&!this.isFloating()&&!this.isAbsolutelyPositioned()}},{key:"isVisible",value:function(){return!(0,_Util.contains)(this.style.display,_display.DISPLAY.NONE)&&this.style.opacity>0&&this.style.visibility===_visibility.VISIBILITY.VISIBLE}},{key:"isAbsolutelyPositioned",value:function(){return this.style.position!==_position.POSITION.STATIC&&this.style.position!==_position.POSITION.RELATIVE}},{key:"isPositioned",value:function(){return this.style.position!==_position.POSITION.STATIC}},{key:"isFloating",value:function(){return this.style.float!==_float.FLOAT.NONE}},{key:"isRootElement",value:function(){return null===this.parent}},{key:"isTransformed",value:function(){return null!==this.style.transform}},{key:"isPositionedWithZIndex",value:function(){return this.isPositioned()&&!this.style.zIndex.auto}},{key:"isInlineLevel",value:function(){return(0,_Util.contains)(this.style.display,_display.DISPLAY.INLINE)||(0,_Util.contains)(this.style.display,_display.DISPLAY.INLINE_BLOCK)||(0,_Util.contains)(this.style.display,_display.DISPLAY.INLINE_FLEX)||(0,_Util.contains)(this.style.display,_display.DISPLAY.INLINE_GRID)||(0,_Util.contains)(this.style.display,_display.DISPLAY.INLINE_LIST_ITEM)||(0,_Util.contains)(this.style.display,_display.DISPLAY.INLINE_TABLE)}},{key:"isInlineBlockOrInlineTable",value:function(){return(0,_Util.contains)(this.style.display,_display.DISPLAY.INLINE_BLOCK)||(0,_Util.contains)(this.style.display,_display.DISPLAY.INLINE_TABLE)}}]),NodeContainer}();exports.default=NodeContainer;var getImage=function(node,resourceLoader){if(node instanceof node.ownerDocument.defaultView.SVGSVGElement||node instanceof SVGSVGElement){var s=new XMLSerializer;return resourceLoader.loadImage("data:image/svg+xml,"+encodeURIComponent(s.serializeToString(node)))}switch(node.tagName){case"IMG":var img=node;return resourceLoader.loadImage(img.currentSrc||img.src);case"CANVAS":var canvas=node;return resourceLoader.loadCanvas(canvas);case"IFRAME":var iframeKey=node.getAttribute("data-html2canvas-internal-iframe-key");if(iframeKey)return iframeKey}return null}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.contains=function(bit,value){return 0!=(bit&value)},exports.distance=function(a,b){return Math.sqrt(a*a+b*b)},exports.copyCSSStyles=function(style,target){for(var i=style.length-1;i>=0;i--){var property=style.item(i);"content"!==property&&target.style.setProperty(property,style.getPropertyValue(property))}return target},exports.SMALL_IMAGE="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.parseBackgroundImage=exports.parseBackground=exports.calculateBackgroundRepeatPath=exports.calculateBackgroundPosition=exports.calculateBackgroungPositioningArea=exports.calculateBackgroungPaintingArea=exports.calculateGradientBackgroundSize=exports.calculateBackgroundSize=exports.BACKGROUND_ORIGIN=exports.BACKGROUND_CLIP=exports.BACKGROUND_SIZE=exports.BACKGROUND_REPEAT=void 0;var _Color=__webpack_require__(0),_Color2=_interopRequireDefault(_Color),_Length=__webpack_require__(1),_Length2=_interopRequireDefault(_Length),_Size=__webpack_require__(31),_Size2=_interopRequireDefault(_Size),_Vector=__webpack_require__(7),_Vector2=_interopRequireDefault(_Vector),_Bounds=__webpack_require__(2),_padding=__webpack_require__(17),BACKGROUND_REPEAT=exports.BACKGROUND_REPEAT={REPEAT:0,NO_REPEAT:1,REPEAT_X:2,REPEAT_Y:3},BACKGROUND_SIZE=exports.BACKGROUND_SIZE={AUTO:0,CONTAIN:1,COVER:2,LENGTH:3},BACKGROUND_CLIP=exports.BACKGROUND_CLIP={BORDER_BOX:0,PADDING_BOX:1,CONTENT_BOX:2},BACKGROUND_ORIGIN=exports.BACKGROUND_ORIGIN=BACKGROUND_CLIP,BackgroundSize=function BackgroundSize(size){switch(_classCallCheck(this,BackgroundSize),size){case"contain":this.size=BACKGROUND_SIZE.CONTAIN;break;case"cover":this.size=BACKGROUND_SIZE.COVER;break;case"auto":this.size=BACKGROUND_SIZE.AUTO;break;default:this.value=new _Length2.default(size)}},AUTO_SIZE=(exports.calculateBackgroundSize=function(backgroundImage,image,bounds){var width=0,height=0,size=backgroundImage.size;if(size[0].size===BACKGROUND_SIZE.CONTAIN||size[0].size===BACKGROUND_SIZE.COVER){var targetRatio=bounds.width/bounds.height,currentRatio=image.width/image.height;return targetRatio<currentRatio!=(size[0].size===BACKGROUND_SIZE.COVER)?new _Size2.default(bounds.width,bounds.width/currentRatio):new _Size2.default(bounds.height*currentRatio,bounds.height)}return size[0].value&&(width=size[0].value.getAbsoluteValue(bounds.width)),size[0].size===BACKGROUND_SIZE.AUTO&&size[1].size===BACKGROUND_SIZE.AUTO?height=image.height:size[1].size===BACKGROUND_SIZE.AUTO?height=width/image.width*image.height:size[1].value&&(height=size[1].value.getAbsoluteValue(bounds.height)),size[0].size===BACKGROUND_SIZE.AUTO&&(width=height/image.height*image.width),new _Size2.default(width,height)},exports.calculateGradientBackgroundSize=function(backgroundImage,bounds){var size=backgroundImage.size,width=size[0].value?size[0].value.getAbsoluteValue(bounds.width):bounds.width,height=size[1].value?size[1].value.getAbsoluteValue(bounds.height):size[0].value?width:bounds.height;return new _Size2.default(width,height)},new BackgroundSize("auto")),parseBackgroundClip=(exports.calculateBackgroungPaintingArea=function(curves,clip){switch(clip){case BACKGROUND_CLIP.BORDER_BOX:return(0,_Bounds.calculateBorderBoxPath)(curves);case BACKGROUND_CLIP.PADDING_BOX:default:return(0,_Bounds.calculatePaddingBoxPath)(curves)}},exports.calculateBackgroungPositioningArea=function(backgroundOrigin,bounds,padding,border){var paddingBox=(0,_Bounds.calculatePaddingBox)(bounds,border);switch(backgroundOrigin){case BACKGROUND_ORIGIN.BORDER_BOX:return bounds;case BACKGROUND_ORIGIN.CONTENT_BOX:var paddingLeft=padding[_padding.PADDING_SIDES.LEFT].getAbsoluteValue(bounds.width),paddingRight=padding[_padding.PADDING_SIDES.RIGHT].getAbsoluteValue(bounds.width),paddingTop=padding[_padding.PADDING_SIDES.TOP].getAbsoluteValue(bounds.width),paddingBottom=padding[_padding.PADDING_SIDES.BOTTOM].getAbsoluteValue(bounds.width);return new _Bounds.Bounds(paddingBox.left+paddingLeft,paddingBox.top+paddingTop,paddingBox.width-paddingLeft-paddingRight,paddingBox.height-paddingTop-paddingBottom);case BACKGROUND_ORIGIN.PADDING_BOX:default:return paddingBox}},exports.calculateBackgroundPosition=function(position,size,bounds){return new _Vector2.default(position[0].getAbsoluteValue(bounds.width-size.width),position[1].getAbsoluteValue(bounds.height-size.height))},exports.calculateBackgroundRepeatPath=function(background,position,size,backgroundPositioningArea,bounds){switch(background.repeat){case BACKGROUND_REPEAT.REPEAT_X:return[new _Vector2.default(Math.round(bounds.left),Math.round(backgroundPositioningArea.top+position.y)),new _Vector2.default(Math.round(bounds.left+bounds.width),Math.round(backgroundPositioningArea.top+position.y)),new _Vector2.default(Math.round(bounds.left+bounds.width),Math.round(size.height+backgroundPositioningArea.top+position.y)),new _Vector2.default(Math.round(bounds.left),Math.round(size.height+backgroundPositioningArea.top+position.y))];case BACKGROUND_REPEAT.REPEAT_Y:return[new _Vector2.default(Math.round(backgroundPositioningArea.left+position.x),Math.round(bounds.top)),new _Vector2.default(Math.round(backgroundPositioningArea.left+position.x+size.width),Math.round(bounds.top)),new _Vector2.default(Math.round(backgroundPositioningArea.left+position.x+size.width),Math.round(bounds.height+bounds.top)),new _Vector2.default(Math.round(backgroundPositioningArea.left+position.x),Math.round(bounds.height+bounds.top))];case BACKGROUND_REPEAT.NO_REPEAT:return[new _Vector2.default(Math.round(backgroundPositioningArea.left+position.x),Math.round(backgroundPositioningArea.top+position.y)),new _Vector2.default(Math.round(backgroundPositioningArea.left+position.x+size.width),Math.round(backgroundPositioningArea.top+position.y)),new _Vector2.default(Math.round(backgroundPositioningArea.left+position.x+size.width),Math.round(backgroundPositioningArea.top+position.y+size.height)),new _Vector2.default(Math.round(backgroundPositioningArea.left+position.x),Math.round(backgroundPositioningArea.top+position.y+size.height))];default:return[new _Vector2.default(Math.round(bounds.left),Math.round(bounds.top)),new _Vector2.default(Math.round(bounds.left+bounds.width),Math.round(bounds.top)),new _Vector2.default(Math.round(bounds.left+bounds.width),Math.round(bounds.height+bounds.top)),new _Vector2.default(Math.round(bounds.left),Math.round(bounds.height+bounds.top))]}},exports.parseBackground=function(style,resourceLoader){return{backgroundColor:new _Color2.default(style.backgroundColor),backgroundImage:parseBackgroundImages(style,resourceLoader),backgroundClip:parseBackgroundClip(style.backgroundClip),backgroundOrigin:parseBackgroundOrigin(style.backgroundOrigin)}},function(backgroundClip){switch(backgroundClip){case"padding-box":return BACKGROUND_CLIP.PADDING_BOX;case"content-box":return BACKGROUND_CLIP.CONTENT_BOX}return BACKGROUND_CLIP.BORDER_BOX}),parseBackgroundOrigin=function(backgroundOrigin){switch(backgroundOrigin){case"padding-box":return BACKGROUND_ORIGIN.PADDING_BOX;case"content-box":return BACKGROUND_ORIGIN.CONTENT_BOX}return BACKGROUND_ORIGIN.BORDER_BOX},parseBackgroundRepeat=function(backgroundRepeat){switch(backgroundRepeat.trim()){case"no-repeat":return BACKGROUND_REPEAT.NO_REPEAT;case"repeat-x":case"repeat no-repeat":return BACKGROUND_REPEAT.REPEAT_X;case"repeat-y":case"no-repeat repeat":return BACKGROUND_REPEAT.REPEAT_Y;case"repeat":return BACKGROUND_REPEAT.REPEAT}return console.error('Invalid background-repeat value "'+backgroundRepeat+'"'),BACKGROUND_REPEAT.REPEAT},parseBackgroundImages=function(style,resourceLoader){var sources=parseBackgroundImage(style.backgroundImage).map(function(backgroundImage){if("url"===backgroundImage.method){var key=resourceLoader.loadImage(backgroundImage.args[0]);backgroundImage.args=key?[key]:[]}return backgroundImage}),positions=style.backgroundPosition.split(","),repeats=style.backgroundRepeat.split(","),sizes=style.backgroundSize.split(",");return sources.map(function(source,index){var size=(sizes[index]||"auto").trim().split(" ").map(parseBackgroundSize),position=(positions[index]||"auto").trim().split(" ").map(parseBackgoundPosition);return{source:source,repeat:parseBackgroundRepeat("string"==typeof repeats[index]?repeats[index]:repeats[0]),size:size.length<2?[size[0],AUTO_SIZE]:[size[0],size[1]],position:position.length<2?[position[0],position[0]]:[position[0],position[1]]}})},parseBackgroundSize=function(size){return"auto"===size?AUTO_SIZE:new BackgroundSize(size)},parseBackgoundPosition=function(position){switch(position){case"bottom":case"right":return new _Length2.default("100%");case"left":case"top":return new _Length2.default("0%");case"auto":return new _Length2.default("0")}return new _Length2.default(position)},parseBackgroundImage=exports.parseBackgroundImage=function(image){var whitespace=/^\s$/,results=[],args=[],method="",quote=null,definition="",mode=0,numParen=0,appendResult=function(){var prefix="";if(method){'"'===definition.substr(0,1)&&(definition=definition.substr(1,definition.length-2)),definition&&args.push(definition.trim());var prefix_i=method.indexOf("-",1)+1;"-"===method.substr(0,1)&&prefix_i>0&&(prefix=method.substr(0,prefix_i).toLowerCase(),method=method.substr(prefix_i)),method=method.toLowerCase(),"none"!==method&&results.push({prefix:prefix,method:method,args:args})}args=[],method=definition=""};return image.split("").forEach(function(c){if(0!==mode||!whitespace.test(c)){switch(c){case'"':quote?quote===c&&(quote=null):quote=c;break;case"(":if(quote)break;if(0===mode)return void(mode=1);numParen++;break;case")":if(quote)break;if(1===mode){if(0===numParen)return mode=0,void appendResult();numParen--}break;case",":if(quote)break;if(0===mode)return void appendResult();if(1===mode&&0===numParen&&!method.match(/^url$/i))return args.push(definition.trim()),void(definition="")}0===mode?method+=c:definition+=c}}),appendResult(),results}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.PATH={VECTOR:0,BEZIER_CURVE:1,CIRCLE:2}},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _Path=__webpack_require__(6),Vector=function Vector(x,y){_classCallCheck(this,Vector),this.type=_Path.PATH.VECTOR,this.x=x,this.y=y,isNaN(x)&&console.error("Invalid x value given for Vector"),isNaN(y)&&console.error("Invalid y value given for Vector")};exports.default=Vector},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.parseListStyle=exports.parseListStyleType=exports.LIST_STYLE_TYPE=exports.LIST_STYLE_POSITION=void 0;var _background=__webpack_require__(5),LIST_STYLE_POSITION=exports.LIST_STYLE_POSITION={INSIDE:0,OUTSIDE:1},LIST_STYLE_TYPE=exports.LIST_STYLE_TYPE={NONE:-1,DISC:0,CIRCLE:1,SQUARE:2,DECIMAL:3,CJK_DECIMAL:4,DECIMAL_LEADING_ZERO:5,LOWER_ROMAN:6,UPPER_ROMAN:7,LOWER_GREEK:8,LOWER_ALPHA:9,UPPER_ALPHA:10,ARABIC_INDIC:11,ARMENIAN:12,BENGALI:13,CAMBODIAN:14,CJK_EARTHLY_BRANCH:15,CJK_HEAVENLY_STEM:16,CJK_IDEOGRAPHIC:17,DEVANAGARI:18,ETHIOPIC_NUMERIC:19,GEORGIAN:20,GUJARATI:21,GURMUKHI:22,HEBREW:22,HIRAGANA:23,HIRAGANA_IROHA:24,JAPANESE_FORMAL:25,JAPANESE_INFORMAL:26,KANNADA:27,KATAKANA:28,KATAKANA_IROHA:29,KHMER:30,KOREAN_HANGUL_FORMAL:31,KOREAN_HANJA_FORMAL:32,KOREAN_HANJA_INFORMAL:33,LAO:34,LOWER_ARMENIAN:35,MALAYALAM:36,MONGOLIAN:37,MYANMAR:38,ORIYA:39,PERSIAN:40,SIMP_CHINESE_FORMAL:41,SIMP_CHINESE_INFORMAL:42,TAMIL:43,TELUGU:44,THAI:45,TIBETAN:46,TRAD_CHINESE_FORMAL:47,TRAD_CHINESE_INFORMAL:48,UPPER_ARMENIAN:49,DISCLOSURE_OPEN:50,DISCLOSURE_CLOSED:51},parseListStyleType=exports.parseListStyleType=function(type){switch(type){case"disc":return LIST_STYLE_TYPE.DISC;case"circle":return LIST_STYLE_TYPE.CIRCLE;case"square":return LIST_STYLE_TYPE.SQUARE;case"decimal":return LIST_STYLE_TYPE.DECIMAL;case"cjk-decimal":return LIST_STYLE_TYPE.CJK_DECIMAL;case"decimal-leading-zero":return LIST_STYLE_TYPE.DECIMAL_LEADING_ZERO;case"lower-roman":return LIST_STYLE_TYPE.LOWER_ROMAN;case"upper-roman":return LIST_STYLE_TYPE.UPPER_ROMAN;case"lower-greek":return LIST_STYLE_TYPE.LOWER_GREEK;case"lower-alpha":return LIST_STYLE_TYPE.LOWER_ALPHA;case"upper-alpha":return LIST_STYLE_TYPE.UPPER_ALPHA;case"arabic-indic":return LIST_STYLE_TYPE.ARABIC_INDIC;case"armenian":return LIST_STYLE_TYPE.ARMENIAN;case"bengali":return LIST_STYLE_TYPE.BENGALI;case"cambodian":return LIST_STYLE_TYPE.CAMBODIAN;case"cjk-earthly-branch":return LIST_STYLE_TYPE.CJK_EARTHLY_BRANCH;case"cjk-heavenly-stem":return LIST_STYLE_TYPE.CJK_HEAVENLY_STEM;case"cjk-ideographic":return LIST_STYLE_TYPE.CJK_IDEOGRAPHIC;case"devanagari":return LIST_STYLE_TYPE.DEVANAGARI;case"ethiopic-numeric":return LIST_STYLE_TYPE.ETHIOPIC_NUMERIC;case"georgian":return LIST_STYLE_TYPE.GEORGIAN;case"gujarati":return LIST_STYLE_TYPE.GUJARATI;case"gurmukhi":return LIST_STYLE_TYPE.GURMUKHI;case"hebrew":return LIST_STYLE_TYPE.HEBREW;case"hiragana":return LIST_STYLE_TYPE.HIRAGANA;case"hiragana-iroha":return LIST_STYLE_TYPE.HIRAGANA_IROHA;case"japanese-formal":return LIST_STYLE_TYPE.JAPANESE_FORMAL;case"japanese-informal":return LIST_STYLE_TYPE.JAPANESE_INFORMAL;case"kannada":return LIST_STYLE_TYPE.KANNADA;case"katakana":return LIST_STYLE_TYPE.KATAKANA;case"katakana-iroha":return LIST_STYLE_TYPE.KATAKANA_IROHA;case"khmer":return LIST_STYLE_TYPE.KHMER;case"korean-hangul-formal":return LIST_STYLE_TYPE.KOREAN_HANGUL_FORMAL;case"korean-hanja-formal":return LIST_STYLE_TYPE.KOREAN_HANJA_FORMAL;case"korean-hanja-informal":return LIST_STYLE_TYPE.KOREAN_HANJA_INFORMAL;case"lao":return LIST_STYLE_TYPE.LAO;case"lower-armenian":return LIST_STYLE_TYPE.LOWER_ARMENIAN;case"malayalam":return LIST_STYLE_TYPE.MALAYALAM;case"mongolian":return LIST_STYLE_TYPE.MONGOLIAN;case"myanmar":return LIST_STYLE_TYPE.MYANMAR;case"oriya":return LIST_STYLE_TYPE.ORIYA;case"persian":return LIST_STYLE_TYPE.PERSIAN;case"simp-chinese-formal":return LIST_STYLE_TYPE.SIMP_CHINESE_FORMAL;case"simp-chinese-informal":return LIST_STYLE_TYPE.SIMP_CHINESE_INFORMAL;case"tamil":return LIST_STYLE_TYPE.TAMIL;case"telugu":return LIST_STYLE_TYPE.TELUGU;case"thai":return LIST_STYLE_TYPE.THAI;case"tibetan":return LIST_STYLE_TYPE.TIBETAN;case"trad-chinese-formal":return LIST_STYLE_TYPE.TRAD_CHINESE_FORMAL;case"trad-chinese-informal":return LIST_STYLE_TYPE.TRAD_CHINESE_INFORMAL;case"upper-armenian":return LIST_STYLE_TYPE.UPPER_ARMENIAN;case"disclosure-open":return LIST_STYLE_TYPE.DISCLOSURE_OPEN;case"disclosure-closed":return LIST_STYLE_TYPE.DISCLOSURE_CLOSED;case"none":default:return LIST_STYLE_TYPE.NONE}},parseListStylePosition=(exports.parseListStyle=function(style){var listStyleImage=(0,_background.parseBackgroundImage)(style.getPropertyValue("list-style-image"));return{listStyleType:parseListStyleType(style.getPropertyValue("list-style-type")),listStyleImage:listStyleImage.length?listStyleImage[0]:null,listStylePosition:parseListStylePosition(style.getPropertyValue("list-style-position"))}},function(position){switch(position){case"inside":return LIST_STYLE_POSITION.INSIDE;case"outside":default:return LIST_STYLE_POSITION.OUTSIDE}})},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function capitalize(m,p1,p2){return m.length>0?p1+p2.toUpperCase():m}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_textTransform=__webpack_require__(20),_TextBounds=__webpack_require__(22),TextContainer=function(){function TextContainer(text,parent,bounds){_classCallCheck(this,TextContainer),this.text=text,this.parent=parent,this.bounds=bounds}return _createClass(TextContainer,null,[{key:"fromTextNode",value:function(node,parent){var text=transform(node.data,parent.style.textTransform);return new TextContainer(text,parent,(0,_TextBounds.parseTextBounds)(text,parent,node))}}]),TextContainer}();exports.default=TextContainer;var CAPITALIZE=/(^|\s|:|-|\(|\))([a-z])/g,transform=function(text,_transform){switch(_transform){case _textTransform.TEXT_TRANSFORM.LOWERCASE:return text.toLowerCase();case _textTransform.TEXT_TRANSFORM.CAPITALIZE:return text.replace(CAPITALIZE,capitalize);case _textTransform.TEXT_TRANSFORM.UPPERCASE:return text.toUpperCase();default:return text}}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _ForeignObjectRenderer=__webpack_require__(23),testRangeBounds=function(document){if(document.createRange){var range=document.createRange();if(range.getBoundingClientRect){var testElement=document.createElement("boundtest");testElement.style.height="123px",testElement.style.display="block",document.body.appendChild(testElement),range.selectNode(testElement);var rangeBounds=range.getBoundingClientRect(),rangeHeight=Math.round(rangeBounds.height);if(document.body.removeChild(testElement),123===rangeHeight)return!0}}return!1},testBase64=function(document,src){var img=new Image,canvas=document.createElement("canvas"),ctx=canvas.getContext("2d");return new Promise(function(resolve){img.src=src;var onload=function(){try{ctx.drawImage(img,0,0),canvas.toDataURL()}catch(e){return resolve(!1)}return resolve(!0)};img.onload=onload,img.onerror=function(){return resolve(!1)},!0===img.complete&&setTimeout(function(){onload()},500)})},testCORS=function(){return void 0!==(new Image).crossOrigin},testResponseType=function(){return"string"==typeof(new XMLHttpRequest).responseType},testSVG=function(document){var img=new Image,canvas=document.createElement("canvas"),ctx=canvas.getContext("2d");img.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{ctx.drawImage(img,0,0),canvas.toDataURL()}catch(e){return!1}return!0},isGreenPixel=function(data){return 0===data[0]&&255===data[1]&&0===data[2]&&255===data[3]},testForeignObject=function(document){var canvas=document.createElement("canvas");canvas.width=100,canvas.height=100;var ctx=canvas.getContext("2d");ctx.fillStyle="rgb(0, 255, 0)",ctx.fillRect(0,0,100,100);var img=new Image,greenImageSrc=canvas.toDataURL();img.src=greenImageSrc;var svg=(0,_ForeignObjectRenderer.createForeignObjectSVG)(100,100,0,0,img);return ctx.fillStyle="red",ctx.fillRect(0,0,100,100),(0,_ForeignObjectRenderer.loadSerializedSVG)(svg).then(function(img){ctx.drawImage(img,0,0);var data=ctx.getImageData(0,0,100,100).data;ctx.fillStyle="red",ctx.fillRect(0,0,100,100);var node=document.createElement("div");return node.style.backgroundImage="url("+greenImageSrc+")",node.style.height="100px",isGreenPixel(data)?(0,_ForeignObjectRenderer.loadSerializedSVG)((0,_ForeignObjectRenderer.createForeignObjectSVG)(100,100,0,0,node)):Promise.reject(!1)}).then(function(img){return ctx.drawImage(img,0,0),isGreenPixel(ctx.getImageData(0,0,100,100).data)}).catch(function(e){return!1})},FEATURES={get SUPPORT_RANGE_BOUNDS(){var value=testRangeBounds(document);return Object.defineProperty(FEATURES,"SUPPORT_RANGE_BOUNDS",{value:value}),value},get SUPPORT_SVG_DRAWING(){var value=testSVG(document);return Object.defineProperty(FEATURES,"SUPPORT_SVG_DRAWING",{value:value}),value},get SUPPORT_BASE64_DRAWING(){return function(src){var _value=testBase64(document,src);return Object.defineProperty(FEATURES,"SUPPORT_BASE64_DRAWING",{value:function(){return _value}}),_value}},get SUPPORT_FOREIGNOBJECT_DRAWING(){var value="function"==typeof Array.from&&"function"==typeof window.fetch?testForeignObject(document):Promise.resolve(!1);return Object.defineProperty(FEATURES,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:value}),value},get SUPPORT_CORS_IMAGES(){var value=testCORS();return Object.defineProperty(FEATURES,"SUPPORT_CORS_IMAGES",{value:value}),value},get SUPPORT_RESPONSE_TYPE(){var value=testResponseType();return Object.defineProperty(FEATURES,"SUPPORT_RESPONSE_TYPE",{value:value}),value},get SUPPORT_CORS_XHR(){var value="withCredentials"in new XMLHttpRequest;return Object.defineProperty(FEATURES,"SUPPORT_CORS_XHR",{value:value}),value}};exports.default=FEATURES},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.parseTextDecoration=exports.TEXT_DECORATION_LINE=exports.TEXT_DECORATION=exports.TEXT_DECORATION_STYLE=void 0;var _Color=__webpack_require__(0),_Color2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_Color),TEXT_DECORATION_STYLE=exports.TEXT_DECORATION_STYLE={SOLID:0,DOUBLE:1,DOTTED:2,DASHED:3,WAVY:4},TEXT_DECORATION=exports.TEXT_DECORATION={NONE:null},TEXT_DECORATION_LINE=exports.TEXT_DECORATION_LINE={UNDERLINE:1,OVERLINE:2,LINE_THROUGH:3,BLINK:4},parseLine=function(line){switch(line){case"underline":return TEXT_DECORATION_LINE.UNDERLINE;case"overline":return TEXT_DECORATION_LINE.OVERLINE;case"line-through":return TEXT_DECORATION_LINE.LINE_THROUGH}return TEXT_DECORATION_LINE.BLINK},parseTextDecorationLine=function(line){return"none"===line?null:line.split(" ").map(parseLine)},parseTextDecorationStyle=function(style){switch(style){case"double":return TEXT_DECORATION_STYLE.DOUBLE;case"dotted":return TEXT_DECORATION_STYLE.DOTTED;case"dashed":return TEXT_DECORATION_STYLE.DASHED;case"wavy":return TEXT_DECORATION_STYLE.WAVY}return TEXT_DECORATION_STYLE.SOLID};exports.parseTextDecoration=function(style){var textDecorationLine=parseTextDecorationLine(style.textDecorationLine?style.textDecorationLine:style.textDecoration);return null===textDecorationLine?TEXT_DECORATION.NONE:{textDecorationLine:textDecorationLine,textDecorationColor:style.textDecorationColor?new _Color2.default(style.textDecorationColor):null,textDecorationStyle:parseTextDecorationStyle(style.textDecorationStyle)}}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.parseBorder=exports.BORDER_SIDES=exports.BORDER_STYLE=void 0;var _Color=__webpack_require__(0),_Color2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_Color),BORDER_STYLE=exports.BORDER_STYLE={NONE:0,SOLID:1},BORDER_SIDES=exports.BORDER_SIDES={TOP:0,RIGHT:1,BOTTOM:2,LEFT:3},SIDES=Object.keys(BORDER_SIDES).map(function(s){return s.toLowerCase()}),parseBorderStyle=function(style){switch(style){case"none":return BORDER_STYLE.NONE}return BORDER_STYLE.SOLID};exports.parseBorder=function(style){return SIDES.map(function(side){var borderColor=new _Color2.default(style.getPropertyValue("border-"+side+"-color")),borderStyle=parseBorderStyle(style.getPropertyValue("border-"+side+"-style")),borderWidth=parseFloat(style.getPropertyValue("border-"+side+"-width"));return{borderColor:borderColor,borderStyle:borderStyle,borderWidth:isNaN(borderWidth)?0:borderWidth}})}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});for(var chars=(exports.toCodePoints=function(str){for(var codePoints=[],i=0,length=str.length;i<length;){var value=str.charCodeAt(i++);if(value>=55296&&value<=56319&&i<length){var extra=str.charCodeAt(i++);56320==(64512&extra)?codePoints.push(((1023&value)<<10)+(1023&extra)+65536):(codePoints.push(value),i--)}else codePoints.push(value)}return codePoints},exports.fromCodePoint=function(){if(String.fromCodePoint)return String.fromCodePoint.apply(String,arguments);var length=arguments.length;if(!length)return"";for(var codeUnits=[],index=-1,result="";++index<length;){var codePoint=arguments.length<=index?void 0:arguments[index];codePoint<=65535?codeUnits.push(codePoint):(codePoint-=65536,codeUnits.push(55296+(codePoint>>10),codePoint%1024+56320)),(index+1===length||codeUnits.length>16384)&&(result+=String.fromCharCode.apply(String,codeUnits),codeUnits.length=0)}return result},"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),lookup="undefined"==typeof Uint8Array?[]:new Uint8Array(256),i=0;i<chars.length;i++)lookup[chars.charCodeAt(i)]=i;exports.decode=function(base64){var bufferLength=.75*base64.length,len=base64.length,i=void 0,p=0,encoded1=void 0,encoded2=void 0,encoded3=void 0,encoded4=void 0;"="===base64[base64.length-1]&&(bufferLength--,"="===base64[base64.length-2]&&bufferLength--);var buffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(bufferLength):new Array(bufferLength),bytes=Array.isArray(buffer)?buffer:new Uint8Array(buffer);for(i=0;i<len;i+=4)encoded1=lookup[base64.charCodeAt(i)],encoded2=lookup[base64.charCodeAt(i+1)],encoded3=lookup[base64.charCodeAt(i+2)],encoded4=lookup[base64.charCodeAt(i+3)],bytes[p++]=encoded1<<2|encoded2>>4,bytes[p++]=(15&encoded2)<<4|encoded3>>2,bytes[p++]=(3&encoded3)<<6|63&encoded4;return buffer},exports.polyUint16Array=function(buffer){for(var length=buffer.length,bytes=[],_i=0;_i<length;_i+=2)bytes.push(buffer[_i+1]<<8|buffer[_i]);return bytes},exports.polyUint32Array=function(buffer){for(var length=buffer.length,bytes=[],_i2=0;_i2<length;_i2+=4)bytes.push(buffer[_i2+3]<<24|buffer[_i2+2]<<16|buffer[_i2+1]<<8|buffer[_i2]);return bytes}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.createCounterText=exports.inlineListItemElement=exports.getListOwner=void 0;var _Util=__webpack_require__(4),_NodeContainer=__webpack_require__(3),_NodeContainer2=_interopRequireDefault(_NodeContainer),_TextContainer=__webpack_require__(9),_TextContainer2=_interopRequireDefault(_TextContainer),_listStyle=__webpack_require__(8),_Unicode=__webpack_require__(24),ancestorTypes=["OL","UL","MENU"],ROMAN_UPPER=(exports.getListOwner=function(container){var parent=container.parent;if(!parent)return null;do{if(-1!==ancestorTypes.indexOf(parent.tagName))return parent;parent=parent.parent}while(parent);return container.parent},exports.inlineListItemElement=function(node,container,resourceLoader){var listStyle=container.style.listStyle;if(listStyle){var style=node.ownerDocument.defaultView.getComputedStyle(node,null),wrapper=node.ownerDocument.createElement("html2canvaswrapper");switch((0,_Util.copyCSSStyles)(style,wrapper),wrapper.style.position="absolute",wrapper.style.bottom="auto",wrapper.style.display="block",wrapper.style.letterSpacing="normal",listStyle.listStylePosition){case _listStyle.LIST_STYLE_POSITION.OUTSIDE:wrapper.style.left="auto",wrapper.style.right=node.ownerDocument.defaultView.innerWidth-container.bounds.left-container.style.margin[1].getAbsoluteValue(container.bounds.width)+7+"px",wrapper.style.textAlign="right";break;case _listStyle.LIST_STYLE_POSITION.INSIDE:wrapper.style.left=container.bounds.left-container.style.margin[3].getAbsoluteValue(container.bounds.width)+"px",wrapper.style.right="auto",wrapper.style.textAlign="left"}var text=void 0,MARGIN_TOP=container.style.margin[0].getAbsoluteValue(container.bounds.width),styleImage=listStyle.listStyleImage;if(styleImage)if("url"===styleImage.method){var image=node.ownerDocument.createElement("img");image.src=styleImage.args[0],wrapper.style.top=container.bounds.top-MARGIN_TOP+"px",wrapper.style.width="auto",wrapper.style.height="auto",wrapper.appendChild(image)}else{var size=.5*parseFloat(container.style.font.fontSize);wrapper.style.top=container.bounds.top-MARGIN_TOP+container.bounds.height-1.5*size+"px",wrapper.style.width=size+"px",wrapper.style.height=size+"px",wrapper.style.backgroundImage=style.listStyleImage}else"number"==typeof container.listIndex&&(text=node.ownerDocument.createTextNode(createCounterText(container.listIndex,listStyle.listStyleType,!0)),wrapper.appendChild(text),wrapper.style.top=container.bounds.top-MARGIN_TOP+"px");var body=node.ownerDocument.body;body.appendChild(wrapper),text?(container.childNodes.push(_TextContainer2.default.fromTextNode(text,container)),body.removeChild(wrapper)):container.childNodes.push(new _NodeContainer2.default(wrapper,container,resourceLoader,0))}},{integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]}),ARMENIAN={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},HEBREW={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},GEORGIAN={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},createAdditiveCounter=function(value,min,max,symbols,fallback,suffix){return value<min||value>max?createCounterText(value,fallback,suffix.length>0):symbols.integers.reduce(function(string,integer,index){for(;value>=integer;)value-=integer,string+=symbols.values[index];return string},"")+suffix},createCounterStyleWithSymbolResolver=function(value,codePointRangeLength,isNumeric,resolver){var string="";do{isNumeric||value--,string=resolver(value)+string,value/=codePointRangeLength}while(value*codePointRangeLength>=codePointRangeLength);return string},createCounterStyleFromRange=function(value,codePointRangeStart,codePointRangeEnd,isNumeric,suffix){var codePointRangeLength=codePointRangeEnd-codePointRangeStart+1;return(value<0?"-":"")+(createCounterStyleWithSymbolResolver(Math.abs(value),codePointRangeLength,isNumeric,function(codePoint){return(0,_Unicode.fromCodePoint)(Math.floor(codePoint%codePointRangeLength)+codePointRangeStart)})+suffix)},createCounterStyleFromSymbols=function(value,symbols){var suffix=arguments.length>2&&void 0!==arguments[2]?arguments[2]:". ",codePointRangeLength=symbols.length;return createCounterStyleWithSymbolResolver(Math.abs(value),codePointRangeLength,!1,function(codePoint){return symbols[Math.floor(codePoint%codePointRangeLength)]})+suffix},createCJKCounter=function(value,numbers,multipliers,negativeSign,suffix,flags){if(value<-9999||value>9999)return createCounterText(value,_listStyle.LIST_STYLE_TYPE.CJK_DECIMAL,suffix.length>0);var tmp=Math.abs(value),string=suffix;if(0===tmp)return numbers[0]+string;for(var digit=0;tmp>0&&digit<=4;digit++){var coefficient=tmp%10;0===coefficient&&(0,_Util.contains)(flags,1)&&""!==string?string=numbers[coefficient]+string:coefficient>1||1===coefficient&&0===digit||1===coefficient&&1===digit&&(0,_Util.contains)(flags,2)||1===coefficient&&1===digit&&(0,_Util.contains)(flags,4)&&value>100||1===coefficient&&digit>1&&(0,_Util.contains)(flags,8)?string=numbers[coefficient]+(digit>0?multipliers[digit-1]:"")+string:1===coefficient&&digit>0&&(string=multipliers[digit-1]+string),tmp=Math.floor(tmp/10)}return(value<0?negativeSign:"")+string},createCounterText=exports.createCounterText=function(value,type,appendSuffix){var defaultSuffix=appendSuffix?". ":"",cjkSuffix=appendSuffix?"、":"",koreanSuffix=appendSuffix?", ":"";switch(type){case _listStyle.LIST_STYLE_TYPE.DISC:return"•";case _listStyle.LIST_STYLE_TYPE.CIRCLE:return"◦";case _listStyle.LIST_STYLE_TYPE.SQUARE:return"◾";case _listStyle.LIST_STYLE_TYPE.DECIMAL_LEADING_ZERO:var string=createCounterStyleFromRange(value,48,57,!0,defaultSuffix);return string.length<4?"0"+string:string;case _listStyle.LIST_STYLE_TYPE.CJK_DECIMAL:return createCounterStyleFromSymbols(value,"〇一二三四五六七八九",cjkSuffix);case _listStyle.LIST_STYLE_TYPE.LOWER_ROMAN:return createAdditiveCounter(value,1,3999,ROMAN_UPPER,_listStyle.LIST_STYLE_TYPE.DECIMAL,defaultSuffix).toLowerCase();case _listStyle.LIST_STYLE_TYPE.UPPER_ROMAN:return createAdditiveCounter(value,1,3999,ROMAN_UPPER,_listStyle.LIST_STYLE_TYPE.DECIMAL,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.LOWER_GREEK:return createCounterStyleFromRange(value,945,969,!1,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.LOWER_ALPHA:return createCounterStyleFromRange(value,97,122,!1,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.UPPER_ALPHA:return createCounterStyleFromRange(value,65,90,!1,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.ARABIC_INDIC:return createCounterStyleFromRange(value,1632,1641,!0,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.ARMENIAN:case _listStyle.LIST_STYLE_TYPE.UPPER_ARMENIAN:return createAdditiveCounter(value,1,9999,ARMENIAN,_listStyle.LIST_STYLE_TYPE.DECIMAL,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.LOWER_ARMENIAN:return createAdditiveCounter(value,1,9999,ARMENIAN,_listStyle.LIST_STYLE_TYPE.DECIMAL,defaultSuffix).toLowerCase();case _listStyle.LIST_STYLE_TYPE.BENGALI:return createCounterStyleFromRange(value,2534,2543,!0,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.CAMBODIAN:case _listStyle.LIST_STYLE_TYPE.KHMER:return createCounterStyleFromRange(value,6112,6121,!0,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.CJK_EARTHLY_BRANCH:return createCounterStyleFromSymbols(value,"子丑寅卯辰巳午未申酉戌亥",cjkSuffix);case _listStyle.LIST_STYLE_TYPE.CJK_HEAVENLY_STEM:return createCounterStyleFromSymbols(value,"甲乙丙丁戊己庚辛壬癸",cjkSuffix);case _listStyle.LIST_STYLE_TYPE.CJK_IDEOGRAPHIC:case _listStyle.LIST_STYLE_TYPE.TRAD_CHINESE_INFORMAL:return createCJKCounter(value,"零一二三四五六七八九","十百千萬","負",cjkSuffix,14);case _listStyle.LIST_STYLE_TYPE.TRAD_CHINESE_FORMAL:return createCJKCounter(value,"零壹貳參肆伍陸柒捌玖","拾佰仟萬","負",cjkSuffix,15);case _listStyle.LIST_STYLE_TYPE.SIMP_CHINESE_INFORMAL:return createCJKCounter(value,"零一二三四五六七八九","十百千萬","负",cjkSuffix,14);case _listStyle.LIST_STYLE_TYPE.SIMP_CHINESE_FORMAL:return createCJKCounter(value,"零壹贰叁肆伍陆柒捌玖","拾佰仟萬","负",cjkSuffix,15);case _listStyle.LIST_STYLE_TYPE.JAPANESE_INFORMAL:return createCJKCounter(value,"〇一二三四五六七八九","十百千万","マイナス",cjkSuffix,0);case _listStyle.LIST_STYLE_TYPE.JAPANESE_FORMAL:return createCJKCounter(value,"零壱弐参四伍六七八九","拾百千万","マイナス",cjkSuffix,7);case _listStyle.LIST_STYLE_TYPE.KOREAN_HANGUL_FORMAL:return createCJKCounter(value,"영일이삼사오육칠팔구","십백천만","마이너스 ",koreanSuffix,7);case _listStyle.LIST_STYLE_TYPE.KOREAN_HANJA_INFORMAL:return createCJKCounter(value,"零一二三四五六七八九","十百千萬","마이너스 ",koreanSuffix,0);case _listStyle.LIST_STYLE_TYPE.KOREAN_HANJA_FORMAL:return createCJKCounter(value,"零壹貳參四五六七八九","拾百千","마이너스 ",koreanSuffix,7);case _listStyle.LIST_STYLE_TYPE.DEVANAGARI:return createCounterStyleFromRange(value,2406,2415,!0,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.GEORGIAN:return createAdditiveCounter(value,1,19999,GEORGIAN,_listStyle.LIST_STYLE_TYPE.DECIMAL,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.GUJARATI:return createCounterStyleFromRange(value,2790,2799,!0,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.GURMUKHI:return createCounterStyleFromRange(value,2662,2671,!0,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.HEBREW:return createAdditiveCounter(value,1,10999,HEBREW,_listStyle.LIST_STYLE_TYPE.DECIMAL,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.HIRAGANA:return createCounterStyleFromSymbols(value,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case _listStyle.LIST_STYLE_TYPE.HIRAGANA_IROHA:return createCounterStyleFromSymbols(value,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case _listStyle.LIST_STYLE_TYPE.KANNADA:return createCounterStyleFromRange(value,3302,3311,!0,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.KATAKANA:return createCounterStyleFromSymbols(value,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",cjkSuffix);case _listStyle.LIST_STYLE_TYPE.KATAKANA_IROHA:return createCounterStyleFromSymbols(value,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",cjkSuffix);case _listStyle.LIST_STYLE_TYPE.LAO:return createCounterStyleFromRange(value,3792,3801,!0,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.MONGOLIAN:return createCounterStyleFromRange(value,6160,6169,!0,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.MYANMAR:return createCounterStyleFromRange(value,4160,4169,!0,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.ORIYA:return createCounterStyleFromRange(value,2918,2927,!0,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.PERSIAN:return createCounterStyleFromRange(value,1776,1785,!0,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.TAMIL:return createCounterStyleFromRange(value,3046,3055,!0,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.TELUGU:return createCounterStyleFromRange(value,3174,3183,!0,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.THAI:return createCounterStyleFromRange(value,3664,3673,!0,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.TIBETAN:return createCounterStyleFromRange(value,3872,3881,!0,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.DECIMAL:default:return createCounterStyleFromRange(value,48,57,!0,defaultSuffix)}}},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_Path=__webpack_require__(6),_textDecoration=__webpack_require__(11),addColorStops=function(gradient,canvasGradient){var maxStop=Math.max.apply(null,gradient.colorStops.map(function(colorStop){return colorStop.stop})),f=1/Math.max(1,maxStop);gradient.colorStops.forEach(function(colorStop){canvasGradient.addColorStop(f*colorStop.stop,colorStop.color.toString())})},CanvasRenderer=function(){function CanvasRenderer(canvas){_classCallCheck(this,CanvasRenderer),this.canvas=canvas||document.createElement("canvas")}return _createClass(CanvasRenderer,[{key:"render",value:function(options){this.ctx=this.canvas.getContext("2d"),this.options=options,this.canvas.width=Math.floor(options.width*options.scale),this.canvas.height=Math.floor(options.height*options.scale),this.canvas.style.width=options.width+"px",this.canvas.style.height=options.height+"px",this.ctx.scale(this.options.scale,this.options.scale),this.ctx.translate(-options.x,-options.y),this.ctx.textBaseline="bottom",options.logger.log("Canvas renderer initialized ("+options.width+"x"+options.height+" at "+options.x+","+options.y+") with scale "+this.options.scale)}},{key:"clip",value:function(clipPaths,callback){var _this=this;clipPaths.length&&(this.ctx.save(),clipPaths.forEach(function(path){_this.path(path),_this.ctx.clip()})),callback(),clipPaths.length&&this.ctx.restore()}},{key:"drawImage",value:function(image,source,destination){this.ctx.drawImage(image,source.left,source.top,source.width,source.height,destination.left,destination.top,destination.width,destination.height)}},{key:"drawShape",value:function(path,color){this.path(path),this.ctx.fillStyle=color.toString(),this.ctx.fill()}},{key:"fill",value:function(color){this.ctx.fillStyle=color.toString(),this.ctx.fill()}},{key:"getTarget",value:function(){return this.canvas.getContext("2d").setTransform(1,0,0,1,0,0),Promise.resolve(this.canvas)}},{key:"path",value:function(_path){var _this2=this;this.ctx.beginPath(),Array.isArray(_path)?_path.forEach(function(point,index){var start=point.type===_Path.PATH.VECTOR?point:point.start;0===index?_this2.ctx.moveTo(start.x,start.y):_this2.ctx.lineTo(start.x,start.y),point.type===_Path.PATH.BEZIER_CURVE&&_this2.ctx.bezierCurveTo(point.startControl.x,point.startControl.y,point.endControl.x,point.endControl.y,point.end.x,point.end.y)}):this.ctx.arc(_path.x+_path.radius,_path.y+_path.radius,_path.radius,0,2*Math.PI,!0),this.ctx.closePath()}},{key:"rectangle",value:function(x,y,width,height,color){this.ctx.fillStyle=color.toString(),this.ctx.fillRect(x,y,width,height)}},{key:"renderLinearGradient",value:function(bounds,gradient){var linearGradient=this.ctx.createLinearGradient(bounds.left+gradient.direction.x1,bounds.top+gradient.direction.y1,bounds.left+gradient.direction.x0,bounds.top+gradient.direction.y0);addColorStops(gradient,linearGradient),this.ctx.fillStyle=linearGradient,this.ctx.fillRect(bounds.left,bounds.top,bounds.width,bounds.height)}},{key:"renderRadialGradient",value:function(bounds,gradient){var _this3=this,x=bounds.left+gradient.center.x,y=bounds.top+gradient.center.y,radialGradient=this.ctx.createRadialGradient(x,y,0,x,y,gradient.radius.x);if(radialGradient)if(addColorStops(gradient,radialGradient),this.ctx.fillStyle=radialGradient,gradient.radius.x!==gradient.radius.y){var midX=bounds.left+.5*bounds.width,midY=bounds.top+.5*bounds.height,f=gradient.radius.y/gradient.radius.x,invF=1/f;this.transform(midX,midY,[1,0,0,f,0,0],function(){return _this3.ctx.fillRect(bounds.left,invF*(bounds.top-midY)+midY,bounds.width,bounds.height*invF)})}else this.ctx.fillRect(bounds.left,bounds.top,bounds.width,bounds.height)}},{key:"renderRepeat",value:function(path,image,imageSize,offsetX,offsetY){this.path(path),this.ctx.fillStyle=this.ctx.createPattern(this.resizeImage(image,imageSize),"repeat"),this.ctx.translate(offsetX,offsetY),this.ctx.fill(),this.ctx.translate(-offsetX,-offsetY)}},{key:"renderTextNode",value:function(textBounds,color,font,textDecoration,textShadows){var _this4=this;this.ctx.font=[font.fontStyle,font.fontVariant,font.fontWeight,font.fontSize,font.fontFamily].join(" "),textBounds.forEach(function(text){if(_this4.ctx.fillStyle=color.toString(),textShadows&&text.text.trim().length?textShadows.slice(0).reverse().forEach(function(textShadow){_this4.ctx.shadowColor=textShadow.color.toString(),_this4.ctx.shadowOffsetX=textShadow.offsetX*_this4.options.scale,_this4.ctx.shadowOffsetY=textShadow.offsetY*_this4.options.scale,_this4.ctx.shadowBlur=textShadow.blur,_this4.ctx.fillText(text.text,text.bounds.left,text.bounds.top+text.bounds.height)}):_this4.ctx.fillText(text.text,text.bounds.left,text.bounds.top+text.bounds.height),null!==textDecoration){var textDecorationColor=textDecoration.textDecorationColor||color;textDecoration.textDecorationLine.forEach(function(textDecorationLine){switch(textDecorationLine){case _textDecoration.TEXT_DECORATION_LINE.UNDERLINE:var _options$fontMetrics$=_this4.options.fontMetrics.getMetrics(font),baseline=_options$fontMetrics$.baseline;_this4.rectangle(text.bounds.left,Math.round(text.bounds.top+baseline),text.bounds.width,1,textDecorationColor);break;case _textDecoration.TEXT_DECORATION_LINE.OVERLINE:_this4.rectangle(text.bounds.left,Math.round(text.bounds.top),text.bounds.width,1,textDecorationColor);break;case _textDecoration.TEXT_DECORATION_LINE.LINE_THROUGH:var _options$fontMetrics$2=_this4.options.fontMetrics.getMetrics(font),middle=_options$fontMetrics$2.middle;_this4.rectangle(text.bounds.left,Math.ceil(text.bounds.top+middle),text.bounds.width,1,textDecorationColor)}})}})}},{key:"resizeImage",value:function(image,size){if(image.width===size.width&&image.height===size.height)return image;var canvas=this.canvas.ownerDocument.createElement("canvas");return canvas.width=size.width,canvas.height=size.height,canvas.getContext("2d").drawImage(image,0,0,image.width,image.height,0,0,size.width,size.height),canvas}},{key:"setOpacity",value:function(opacity){this.ctx.globalAlpha=opacity}},{key:"transform",value:function(offsetX,offsetY,matrix,callback){this.ctx.save(),this.ctx.translate(offsetX,offsetY),this.ctx.transform(matrix[0],matrix[1],matrix[2],matrix[3],matrix[4],matrix[5]),this.ctx.translate(-offsetX,-offsetY),callback(),this.ctx.restore()}}]),CanvasRenderer}();exports.default=CanvasRenderer},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),Logger=function(){function Logger(enabled,id,start){_classCallCheck(this,Logger),this.enabled="undefined"!=typeof window&&enabled,this.start=start||Date.now(),this.id=id}return _createClass(Logger,[{key:"child",value:function(id){return new Logger(this.enabled,id,this.start)}},{key:"log",value:function(){if(this.enabled&&window.console&&window.console.log){for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];Function.prototype.bind.call(window.console.log,window.console).apply(window.console,[Date.now()-this.start+"ms",this.id?"html2canvas ("+this.id+"):":"html2canvas:"].concat([].slice.call(args,0)))}}},{key:"error",value:function(){if(this.enabled&&window.console&&window.console.error){for(var _len2=arguments.length,args=Array(_len2),_key2=0;_key2<_len2;_key2++)args[_key2]=arguments[_key2];Function.prototype.bind.call(window.console.error,window.console).apply(window.console,[Date.now()-this.start+"ms",this.id?"html2canvas ("+this.id+"):":"html2canvas:"].concat([].slice.call(args,0)))}}}]),Logger}();exports.default=Logger},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.parsePadding=exports.PADDING_SIDES=void 0;var _Length=__webpack_require__(1),_Length2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_Length),SIDES=(exports.PADDING_SIDES={TOP:0,RIGHT:1,BOTTOM:2,LEFT:3},["top","right","bottom","left"]);exports.parsePadding=function(style){return SIDES.map(function(side){return new _Length2.default(style.getPropertyValue("padding-"+side))})}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var OVERFLOW_WRAP=exports.OVERFLOW_WRAP={NORMAL:0,BREAK_WORD:1};exports.parseOverflowWrap=function(overflow){switch(overflow){case"break-word":return OVERFLOW_WRAP.BREAK_WORD;case"normal":default:return OVERFLOW_WRAP.NORMAL}}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var POSITION=exports.POSITION={STATIC:0,RELATIVE:1,ABSOLUTE:2,FIXED:3,STICKY:4};exports.parsePosition=function(position){switch(position){case"relative":return POSITION.RELATIVE;case"absolute":return POSITION.ABSOLUTE;case"fixed":return POSITION.FIXED;case"sticky":return POSITION.STICKY}return POSITION.STATIC}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var TEXT_TRANSFORM=exports.TEXT_TRANSFORM={NONE:0,LOWERCASE:1,UPPERCASE:2,CAPITALIZE:3};exports.parseTextTransform=function(textTransform){switch(textTransform){case"uppercase":return TEXT_TRANSFORM.UPPERCASE;case"lowercase":return TEXT_TRANSFORM.LOWERCASE;case"capitalize":return TEXT_TRANSFORM.CAPITALIZE}return TEXT_TRANSFORM.NONE}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.reformatInputBounds=exports.inlineSelectElement=exports.inlineTextAreaElement=exports.inlineInputElement=exports.getInputBorderRadius=exports.INPUT_BACKGROUND=exports.INPUT_BORDERS=exports.INPUT_COLOR=void 0;var _TextContainer=__webpack_require__(9),_TextContainer2=_interopRequireDefault(_TextContainer),_background=__webpack_require__(5),_border=__webpack_require__(12),_Circle=__webpack_require__(50),_Circle2=_interopRequireDefault(_Circle),_Vector=__webpack_require__(7),_Vector2=_interopRequireDefault(_Vector),_Color=__webpack_require__(0),_Color2=_interopRequireDefault(_Color),_Length=__webpack_require__(1),_Length2=_interopRequireDefault(_Length),_Util=(__webpack_require__(2),__webpack_require__(22),__webpack_require__(4)),INPUT_BORDER_COLOR=(exports.INPUT_COLOR=new _Color2.default([42,42,42]),new _Color2.default([165,165,165])),INPUT_BACKGROUND_COLOR=new _Color2.default([222,222,222]),INPUT_BORDER={borderWidth:1,borderColor:INPUT_BORDER_COLOR,borderStyle:_border.BORDER_STYLE.SOLID},RADIO_BORDER_RADIUS=(exports.INPUT_BORDERS=[INPUT_BORDER,INPUT_BORDER,INPUT_BORDER,INPUT_BORDER],exports.INPUT_BACKGROUND={backgroundColor:INPUT_BACKGROUND_COLOR,backgroundImage:[],backgroundClip:_background.BACKGROUND_CLIP.PADDING_BOX,backgroundOrigin:_background.BACKGROUND_ORIGIN.PADDING_BOX},new _Length2.default("50%")),RADIO_BORDER_RADIUS_TUPLE=[RADIO_BORDER_RADIUS,RADIO_BORDER_RADIUS],INPUT_RADIO_BORDER_RADIUS=[RADIO_BORDER_RADIUS_TUPLE,RADIO_BORDER_RADIUS_TUPLE,RADIO_BORDER_RADIUS_TUPLE,RADIO_BORDER_RADIUS_TUPLE],CHECKBOX_BORDER_RADIUS=new _Length2.default("3px"),CHECKBOX_BORDER_RADIUS_TUPLE=[CHECKBOX_BORDER_RADIUS,CHECKBOX_BORDER_RADIUS],INPUT_CHECKBOX_BORDER_RADIUS=[CHECKBOX_BORDER_RADIUS_TUPLE,CHECKBOX_BORDER_RADIUS_TUPLE,CHECKBOX_BORDER_RADIUS_TUPLE,CHECKBOX_BORDER_RADIUS_TUPLE],inlineFormElement=(exports.getInputBorderRadius=function(node){return"radio"===node.type?INPUT_RADIO_BORDER_RADIUS:INPUT_CHECKBOX_BORDER_RADIUS},exports.inlineInputElement=function(node,container){if("radio"===node.type||"checkbox"===node.type){if(node.checked){var size=Math.min(container.bounds.width,container.bounds.height);container.childNodes.push("checkbox"===node.type?[new _Vector2.default(container.bounds.left+.39363*size,container.bounds.top+.79*size),new _Vector2.default(container.bounds.left+.16*size,container.bounds.top+.5549*size),new _Vector2.default(container.bounds.left+.27347*size,container.bounds.top+.44071*size),new _Vector2.default(container.bounds.left+.39694*size,container.bounds.top+.5649*size),new _Vector2.default(container.bounds.left+.72983*size,container.bounds.top+.23*size),new _Vector2.default(container.bounds.left+.84*size,container.bounds.top+.34085*size),new _Vector2.default(container.bounds.left+.39363*size,container.bounds.top+.79*size)]:new _Circle2.default(container.bounds.left+size/4,container.bounds.top+size/4,size/4))}}else inlineFormElement(getInputValue(node),node,container,!1)},exports.inlineTextAreaElement=function(node,container){inlineFormElement(node.value,node,container,!0)},exports.inlineSelectElement=function(node,container){var option=node.options[node.selectedIndex||0];inlineFormElement(option?option.text||"":"",node,container,!1)},exports.reformatInputBounds=function(bounds){return bounds.width>bounds.height?(bounds.left+=(bounds.width-bounds.height)/2,bounds.width=bounds.height):bounds.width<bounds.height&&(bounds.top+=(bounds.height-bounds.width)/2,bounds.height=bounds.width),bounds},function(value,node,container,allowLinebreak){var body=node.ownerDocument.body;if(value.length>0&&body){var wrapper=node.ownerDocument.createElement("html2canvaswrapper");(0,_Util.copyCSSStyles)(node.ownerDocument.defaultView.getComputedStyle(node,null),wrapper),wrapper.style.position="absolute",wrapper.style.left=container.bounds.left+"px",wrapper.style.top=container.bounds.top+"px",allowLinebreak||(wrapper.style.whiteSpace="nowrap");var text=node.ownerDocument.createTextNode(value);wrapper.appendChild(text),body.appendChild(wrapper),container.childNodes.push(_TextContainer2.default.fromTextNode(text,container)),body.removeChild(wrapper)}}),getInputValue=function(node){var value="password"===node.type?new Array(node.value.length+1).join("•"):node.value;return 0===value.length?node.placeholder||"":value}},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.parseTextBounds=exports.TextBounds=void 0;var _Bounds=__webpack_require__(2),_textDecoration=__webpack_require__(11),_Feature=__webpack_require__(10),_Feature2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_Feature),_Unicode=__webpack_require__(24),TextBounds=exports.TextBounds=function TextBounds(text,bounds){_classCallCheck(this,TextBounds),this.text=text,this.bounds=bounds},getWrapperBounds=(exports.parseTextBounds=function(value,parent,node){for(var letterRendering=0!==parent.style.letterSpacing,textList=letterRendering?(0,_Unicode.toCodePoints)(value).map(function(i){return(0,_Unicode.fromCodePoint)(i)}):(0,_Unicode.breakWords)(value,parent),length=textList.length,defaultView=node.parentNode?node.parentNode.ownerDocument.defaultView:null,scrollX=defaultView?defaultView.pageXOffset:0,scrollY=defaultView?defaultView.pageYOffset:0,textBounds=[],offset=0,i=0;i<length;i++){var text=textList[i];if(parent.style.textDecoration!==_textDecoration.TEXT_DECORATION.NONE||text.trim().length>0)if(_Feature2.default.SUPPORT_RANGE_BOUNDS)textBounds.push(new TextBounds(text,getRangeBounds(node,offset,text.length,scrollX,scrollY)));else{var replacementNode=node.splitText(text.length);textBounds.push(new TextBounds(text,getWrapperBounds(node,scrollX,scrollY))),node=replacementNode}else _Feature2.default.SUPPORT_RANGE_BOUNDS||(node=node.splitText(text.length));offset+=text.length}return textBounds},function(node,scrollX,scrollY){var wrapper=node.ownerDocument.createElement("html2canvaswrapper");wrapper.appendChild(node.cloneNode(!0));var parentNode=node.parentNode;if(parentNode){parentNode.replaceChild(wrapper,node);var bounds=(0,_Bounds.parseBounds)(wrapper,scrollX,scrollY);return wrapper.firstChild&&parentNode.replaceChild(wrapper.firstChild,wrapper),bounds}return new _Bounds.Bounds(0,0,0,0)}),getRangeBounds=function(node,offset,length,scrollX,scrollY){var range=node.ownerDocument.createRange();return range.setStart(node,offset),range.setEnd(node,offset+length),_Bounds.Bounds.fromClientRect(range.getBoundingClientRect(),scrollX,scrollY)}},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),ForeignObjectRenderer=function(){function ForeignObjectRenderer(element){_classCallCheck(this,ForeignObjectRenderer),this.element=element}return _createClass(ForeignObjectRenderer,[{key:"render",value:function(options){var _this=this;this.options=options,this.canvas=document.createElement("canvas"),this.ctx=this.canvas.getContext("2d"),this.canvas.width=Math.floor(options.width)*options.scale,this.canvas.height=Math.floor(options.height)*options.scale,this.canvas.style.width=options.width+"px",this.canvas.style.height=options.height+"px",options.logger.log("ForeignObject renderer initialized ("+options.width+"x"+options.height+" at "+options.x+","+options.y+") with scale "+options.scale);var svg=createForeignObjectSVG(Math.max(options.windowWidth,options.width)*options.scale,Math.max(options.windowHeight,options.height)*options.scale,options.scrollX*options.scale,options.scrollY*options.scale,this.element);return loadSerializedSVG(svg).then(function(img){return options.backgroundColor&&(_this.ctx.fillStyle=options.backgroundColor.toString(),_this.ctx.fillRect(0,0,options.width*options.scale,options.height*options.scale)),_this.ctx.drawImage(img,-options.x*options.scale,-options.y*options.scale),_this.canvas})}}]),ForeignObjectRenderer}();exports.default=ForeignObjectRenderer;var createForeignObjectSVG=exports.createForeignObjectSVG=function(width,height,x,y,node){var xmlns="http://www.w3.org/2000/svg",svg=document.createElementNS(xmlns,"svg"),foreignObject=document.createElementNS(xmlns,"foreignObject");return svg.setAttributeNS(null,"width",width),svg.setAttributeNS(null,"height",height),foreignObject.setAttributeNS(null,"width","100%"),foreignObject.setAttributeNS(null,"height","100%"),foreignObject.setAttributeNS(null,"x",x),foreignObject.setAttributeNS(null,"y",y),foreignObject.setAttributeNS(null,"externalResourcesRequired","true"),svg.appendChild(foreignObject),foreignObject.appendChild(node),svg},loadSerializedSVG=exports.loadSerializedSVG=function(svg){return new Promise(function(resolve,reject){var img=new Image;img.onload=function(){return resolve(img)},img.onerror=reject,img.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(svg))})}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.breakWords=exports.fromCodePoint=exports.toCodePoints=void 0;var _cssLineBreak=__webpack_require__(46);Object.defineProperty(exports,"toCodePoints",{enumerable:!0,get:function(){return _cssLineBreak.toCodePoints}}),Object.defineProperty(exports,"fromCodePoint",{enumerable:!0,get:function(){return _cssLineBreak.fromCodePoint}});var _NodeContainer=__webpack_require__(3),_overflowWrap=(function(obj){obj&&obj.__esModule}(_NodeContainer),__webpack_require__(18));exports.breakWords=function(str,parent){for(var breaker=(0,_cssLineBreak.LineBreaker)(str,{lineBreak:parent.style.lineBreak,wordBreak:parent.style.overflowWrap===_overflowWrap.OVERFLOW_WRAP.BREAK_WORD?"break-word":parent.style.wordBreak}),words=[],bk=void 0;!(bk=breaker.next()).done;)words.push(bk.value.slice());return words}},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.FontMetrics=void 0;var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_Util=__webpack_require__(4);exports.FontMetrics=function(){function FontMetrics(document){_classCallCheck(this,FontMetrics),this._data={},this._document=document}return _createClass(FontMetrics,[{key:"_parseMetrics",value:function(font){var container=this._document.createElement("div"),img=this._document.createElement("img"),span=this._document.createElement("span"),body=this._document.body;if(!body)throw new Error("No document found for font metrics");container.style.visibility="hidden",container.style.fontFamily=font.fontFamily,container.style.fontSize=font.fontSize,container.style.margin="0",container.style.padding="0",body.appendChild(container),img.src=_Util.SMALL_IMAGE,img.width=1,img.height=1,img.style.margin="0",img.style.padding="0",img.style.verticalAlign="baseline",span.style.fontFamily=font.fontFamily,span.style.fontSize=font.fontSize,span.style.margin="0",span.style.padding="0",span.appendChild(this._document.createTextNode("Hidden Text")),container.appendChild(span),container.appendChild(img);var baseline=img.offsetTop-span.offsetTop+2;container.removeChild(span),container.appendChild(this._document.createTextNode("Hidden Text")),container.style.lineHeight="normal",img.style.verticalAlign="super";var middle=img.offsetTop-container.offsetTop+2;return body.removeChild(container),{baseline:baseline,middle:middle}}},{key:"getMetrics",value:function(font){var key=font.fontFamily+" "+font.fontSize;return void 0===this._data[key]&&(this._data[key]=this._parseMetrics(font)),this._data[key]}}]),FontMetrics}()},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Proxy=void 0;var _Feature=__webpack_require__(10),_Feature2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_Feature);exports.Proxy=function(src,options){if(!options.proxy)return Promise.reject("No proxy defined");var proxy=options.proxy;return new Promise(function(resolve,reject){var responseType=_Feature2.default.SUPPORT_CORS_XHR&&_Feature2.default.SUPPORT_RESPONSE_TYPE?"blob":"text",xhr=_Feature2.default.SUPPORT_CORS_XHR?new XMLHttpRequest:new XDomainRequest;if(xhr.onload=function(){if(xhr instanceof XMLHttpRequest)if(200===xhr.status)if("text"===responseType)resolve(xhr.response);else{var reader=new FileReader;reader.addEventListener("load",function(){return resolve(reader.result)},!1),reader.addEventListener("error",function(e){return reject(e)},!1),reader.readAsDataURL(xhr.response)}else reject("Failed to proxy resource "+src.substring(0,256)+" with status code "+xhr.status);else resolve(xhr.responseText)},xhr.onerror=reject,xhr.open("GET",proxy+"?url="+encodeURIComponent(src)+"&responseType="+responseType),"text"!==responseType&&xhr instanceof XMLHttpRequest&&(xhr.responseType=responseType),options.imageTimeout){var timeout=options.imageTimeout;xhr.timeout=timeout,xhr.ontimeout=function(){return reject("Timed out ("+timeout+"ms) proxying "+src.substring(0,256))}}xhr.send()})}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_CanvasRenderer=__webpack_require__(15),_CanvasRenderer2=_interopRequireDefault(_CanvasRenderer),_Logger=__webpack_require__(16),_Logger2=_interopRequireDefault(_Logger),_Window=__webpack_require__(28),html2canvas=function(element,conf){var config=conf||{},logger=new _Logger2.default("boolean"!=typeof config.logging||config.logging);logger.log("html2canvas 1.0.0-alpha.12"),"function"==typeof config.onrendered&&logger.error("onrendered option is deprecated, html2canvas returns a Promise with the canvas as the value");var ownerDocument=element.ownerDocument;if(!ownerDocument)return Promise.reject("Provided element is not within a Document");var defaultView=ownerDocument.defaultView,defaultOptions={async:!0,allowTaint:!1,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,scale:defaultView.devicePixelRatio||1,target:new _CanvasRenderer2.default(config.canvas),useCORS:!1,windowWidth:defaultView.innerWidth,windowHeight:defaultView.innerHeight,scrollX:defaultView.pageXOffset,scrollY:defaultView.pageYOffset},result=(0,_Window.renderElement)(element,_extends({},defaultOptions,config),logger);return result.catch(function(e){throw logger.error(e),e})};html2canvas.CanvasRenderer=_CanvasRenderer2.default,module.exports=html2canvas},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.renderElement=void 0;var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_Logger=__webpack_require__(16),_NodeParser=(_interopRequireDefault(_Logger),__webpack_require__(29)),_Renderer=__webpack_require__(51),_Renderer2=_interopRequireDefault(_Renderer),_ForeignObjectRenderer=__webpack_require__(23),_ForeignObjectRenderer2=_interopRequireDefault(_ForeignObjectRenderer),_Feature=__webpack_require__(10),_Feature2=_interopRequireDefault(_Feature),_Bounds=__webpack_require__(2),_Clone=__webpack_require__(54),_Font=__webpack_require__(25),_Color=__webpack_require__(0),_Color2=_interopRequireDefault(_Color);exports.renderElement=function renderElement(element,options,logger){var ownerDocument=element.ownerDocument,windowBounds=new _Bounds.Bounds(options.scrollX,options.scrollY,options.windowWidth,options.windowHeight),documentBackgroundColor=ownerDocument.documentElement?new _Color2.default(getComputedStyle(ownerDocument.documentElement).backgroundColor):_Color.TRANSPARENT,bodyBackgroundColor=ownerDocument.body?new _Color2.default(getComputedStyle(ownerDocument.body).backgroundColor):_Color.TRANSPARENT,backgroundColor=element===ownerDocument.documentElement?documentBackgroundColor.isTransparent()?bodyBackgroundColor.isTransparent()?options.backgroundColor?new _Color2.default(options.backgroundColor):null:bodyBackgroundColor:documentBackgroundColor:options.backgroundColor?new _Color2.default(options.backgroundColor):null;return(options.foreignObjectRendering?_Feature2.default.SUPPORT_FOREIGNOBJECT_DRAWING:Promise.resolve(!1)).then(function(supportForeignObject){return supportForeignObject?function(cloner){return logger.log("Document cloned, using foreignObject rendering"),cloner.inlineFonts(ownerDocument).then(function(){return cloner.resourceLoader.ready()}).then(function(){var renderer=new _ForeignObjectRenderer2.default(cloner.documentElement),defaultView=ownerDocument.defaultView,scrollX=defaultView.pageXOffset,scrollY=defaultView.pageYOffset,isDocument="HTML"===element.tagName||"BODY"===element.tagName,_ref=isDocument?(0,_Bounds.parseDocumentSize)(ownerDocument):(0,_Bounds.parseBounds)(element,scrollX,scrollY),width=_ref.width,height=_ref.height,left=_ref.left,top=_ref.top;return renderer.render({backgroundColor:backgroundColor,logger:logger,scale:options.scale,x:"number"==typeof options.x?options.x:left,y:"number"==typeof options.y?options.y:top,width:"number"==typeof options.width?options.width:Math.ceil(width),height:"number"==typeof options.height?options.height:Math.ceil(height),windowWidth:options.windowWidth,windowHeight:options.windowHeight,scrollX:options.scrollX,scrollY:options.scrollY})})}(new _Clone.DocumentCloner(element,options,logger,!0,renderElement)):(0,_Clone.cloneWindow)(ownerDocument,windowBounds,element,options,logger,renderElement).then(function(_ref2){var _ref3=_slicedToArray(_ref2,3),container=_ref3[0],clonedElement=_ref3[1],resourceLoader=_ref3[2];logger.log("Document cloned, using computed rendering");var stack=(0,_NodeParser.NodeParser)(clonedElement,resourceLoader,logger),clonedDocument=clonedElement.ownerDocument;return backgroundColor===stack.container.style.background.backgroundColor&&(stack.container.style.background.backgroundColor=_Color.TRANSPARENT),resourceLoader.ready().then(function(imageStore){var fontMetrics=new _Font.FontMetrics(clonedDocument);logger.log("Starting renderer");var defaultView=clonedDocument.defaultView,scrollX=defaultView.pageXOffset,scrollY=defaultView.pageYOffset,isDocument="HTML"===clonedElement.tagName||"BODY"===clonedElement.tagName,_ref4=isDocument?(0,_Bounds.parseDocumentSize)(ownerDocument):(0,_Bounds.parseBounds)(clonedElement,scrollX,scrollY),width=_ref4.width,height=_ref4.height,left=_ref4.left,top=_ref4.top,renderOptions={backgroundColor:backgroundColor,fontMetrics:fontMetrics,imageStore:imageStore,logger:logger,scale:options.scale,x:"number"==typeof options.x?options.x:left,y:"number"==typeof options.y?options.y:top,width:"number"==typeof options.width?options.width:Math.ceil(width),height:"number"==typeof options.height?options.height:Math.ceil(height)};if(Array.isArray(options.target))return Promise.all(options.target.map(function(target){return new _Renderer2.default(target,renderOptions).render(stack)}));var renderer=new _Renderer2.default(options.target,renderOptions),canvas=renderer.render(stack);return!0===options.removeContainer&&(container.parentNode?container.parentNode.removeChild(container):logger.log("Cannot detach cloned iframe as it is not in the DOM anymore")),canvas})})})}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.NodeParser=void 0;var _StackingContext=__webpack_require__(30),_StackingContext2=_interopRequireDefault(_StackingContext),_NodeContainer=__webpack_require__(3),_NodeContainer2=_interopRequireDefault(_NodeContainer),_TextContainer=__webpack_require__(9),_TextContainer2=_interopRequireDefault(_TextContainer),_Input=__webpack_require__(21),_ListItem=__webpack_require__(14),_listStyle=__webpack_require__(8),IGNORED_NODE_NAMES=(exports.NodeParser=function(node,resourceLoader,logger){logger.log("Starting node parsing");var index=0,container=new _NodeContainer2.default(node,null,resourceLoader,index++),stack=new _StackingContext2.default(container,null,!0);return parseNodeTree(node,container,stack,resourceLoader,index),logger.log("Finished parsing node tree"),stack},["SCRIPT","HEAD","TITLE","OBJECT","BR","OPTION"]),parseNodeTree=function parseNodeTree(node,parent,stack,resourceLoader,index){if(index>5e4)throw new Error("Recursion error while parsing node tree");for(var nextNode,childNode=node.firstChild;childNode;childNode=nextNode){nextNode=childNode.nextSibling;var defaultView=childNode.ownerDocument.defaultView;if(childNode instanceof defaultView.Text||childNode instanceof Text||defaultView.parent&&childNode instanceof defaultView.parent.Text)childNode.data.trim().length>0&&parent.childNodes.push(_TextContainer2.default.fromTextNode(childNode,parent));else if(childNode instanceof defaultView.HTMLElement||childNode instanceof HTMLElement||defaultView.parent&&childNode instanceof defaultView.parent.HTMLElement){if(-1===IGNORED_NODE_NAMES.indexOf(childNode.nodeName)){var container=new _NodeContainer2.default(childNode,parent,resourceLoader,index++);if(container.isVisible()){"INPUT"===childNode.tagName?(0,_Input.inlineInputElement)(childNode,container):"TEXTAREA"===childNode.tagName?(0,_Input.inlineTextAreaElement)(childNode,container):"SELECT"===childNode.tagName?(0,_Input.inlineSelectElement)(childNode,container):container.style.listStyle&&container.style.listStyle.listStyleType!==_listStyle.LIST_STYLE_TYPE.NONE&&(0,_ListItem.inlineListItemElement)(childNode,container,resourceLoader);var SHOULD_TRAVERSE_CHILDREN="TEXTAREA"!==childNode.tagName,treatAsRealStackingContext=createsRealStackingContext(container,childNode);if(treatAsRealStackingContext||createsStackingContext(container)){var parentStack=treatAsRealStackingContext||container.isPositioned()?stack.getRealParentStackingContext():stack,childStack=new _StackingContext2.default(container,parentStack,treatAsRealStackingContext);parentStack.contexts.push(childStack),SHOULD_TRAVERSE_CHILDREN&&parseNodeTree(childNode,container,childStack,resourceLoader,index)}else stack.children.push(container),SHOULD_TRAVERSE_CHILDREN&&parseNodeTree(childNode,container,stack,resourceLoader,index)}}}else if(childNode instanceof defaultView.SVGSVGElement||childNode instanceof SVGSVGElement||defaultView.parent&&childNode instanceof defaultView.parent.SVGSVGElement){var _container=new _NodeContainer2.default(childNode,parent,resourceLoader,index++),_treatAsRealStackingContext=createsRealStackingContext(_container,childNode);if(_treatAsRealStackingContext||createsStackingContext(_container)){var _parentStack=_treatAsRealStackingContext||_container.isPositioned()?stack.getRealParentStackingContext():stack,_childStack=new _StackingContext2.default(_container,_parentStack,_treatAsRealStackingContext);_parentStack.contexts.push(_childStack)}else stack.children.push(_container)}}},createsRealStackingContext=function(container,node){return container.isRootElement()||container.isPositionedWithZIndex()||container.style.opacity<1||container.isTransformed()||isBodyWithTransparentRoot(container,node)},createsStackingContext=function(container){return container.isPositioned()||container.isFloating()},isBodyWithTransparentRoot=function(container,node){return"BODY"===node.nodeName&&container.parent instanceof _NodeContainer2.default&&container.parent.style.background.backgroundColor.isTransparent()}},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_NodeContainer=__webpack_require__(3),StackingContext=(function(obj){obj&&obj.__esModule}(_NodeContainer),__webpack_require__(19),function(){function StackingContext(container,parent,treatAsRealStackingContext){_classCallCheck(this,StackingContext),this.container=container,this.parent=parent,this.contexts=[],this.children=[],this.treatAsRealStackingContext=treatAsRealStackingContext}return _createClass(StackingContext,[{key:"getOpacity",value:function(){return this.parent?this.container.style.opacity*this.parent.getOpacity():this.container.style.opacity}},{key:"getRealParentStackingContext",value:function(){return!this.parent||this.treatAsRealStackingContext?this:this.parent.getRealParentStackingContext()}}]),StackingContext}());exports.default=StackingContext},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var Size=function Size(width,height){_classCallCheck(this,Size),this.width=width,this.height=height};exports.default=Size},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_Path=__webpack_require__(6),_Vector=__webpack_require__(7),_Vector2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_Vector),lerp=function(a,b,t){return new _Vector2.default(a.x+(b.x-a.x)*t,a.y+(b.y-a.y)*t)},BezierCurve=function(){function BezierCurve(start,startControl,endControl,end){_classCallCheck(this,BezierCurve),this.type=_Path.PATH.BEZIER_CURVE,this.start=start,this.startControl=startControl,this.endControl=endControl,this.end=end}return _createClass(BezierCurve,[{key:"subdivide",value:function(t,firstHalf){var ab=lerp(this.start,this.startControl,t),bc=lerp(this.startControl,this.endControl,t),cd=lerp(this.endControl,this.end,t),abbc=lerp(ab,bc,t),bccd=lerp(bc,cd,t),dest=lerp(abbc,bccd,t);return firstHalf?new BezierCurve(this.start,ab,abbc,dest):new BezierCurve(dest,bccd,cd,this.end)}},{key:"reverse",value:function(){return new BezierCurve(this.end,this.endControl,this.startControl,this.start)}}]),BezierCurve}();exports.default=BezierCurve},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.parseBorderRadius=void 0;var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_Length=__webpack_require__(1),_Length2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_Length),SIDES=["top-left","top-right","bottom-right","bottom-left"];exports.parseBorderRadius=function(style){return SIDES.map(function(side){var value=style.getPropertyValue("border-"+side+"-radius"),_value$split$map=value.split(" ").map(_Length2.default.create),_value$split$map2=_slicedToArray(_value$split$map,2),horizontal=_value$split$map2[0],vertical=_value$split$map2[1];return void 0===vertical?[horizontal,horizontal]:[horizontal,vertical]})}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var DISPLAY=exports.DISPLAY={NONE:1,BLOCK:2,INLINE:4,RUN_IN:8,FLOW:16,FLOW_ROOT:32,TABLE:64,FLEX:128,GRID:256,RUBY:512,SUBGRID:1024,LIST_ITEM:2048,TABLE_ROW_GROUP:4096,TABLE_HEADER_GROUP:8192,TABLE_FOOTER_GROUP:16384,TABLE_ROW:32768,TABLE_CELL:65536,TABLE_COLUMN_GROUP:1<<17,TABLE_COLUMN:1<<18,TABLE_CAPTION:1<<19,RUBY_BASE:1<<20,RUBY_TEXT:1<<21,RUBY_BASE_CONTAINER:1<<22,RUBY_TEXT_CONTAINER:1<<23,CONTENTS:1<<24,INLINE_BLOCK:1<<25,INLINE_LIST_ITEM:1<<26,INLINE_TABLE:1<<27,INLINE_FLEX:1<<28,INLINE_GRID:1<<29},parseDisplayValue=function(display){switch(display){case"block":return DISPLAY.BLOCK;case"inline":return DISPLAY.INLINE;case"run-in":return DISPLAY.RUN_IN;case"flow":return DISPLAY.FLOW;case"flow-root":return DISPLAY.FLOW_ROOT;case"table":return DISPLAY.TABLE;case"flex":return DISPLAY.FLEX;case"grid":return DISPLAY.GRID;case"ruby":return DISPLAY.RUBY;case"subgrid":return DISPLAY.SUBGRID;case"list-item":return DISPLAY.LIST_ITEM;case"table-row-group":return DISPLAY.TABLE_ROW_GROUP;case"table-header-group":return DISPLAY.TABLE_HEADER_GROUP;case"table-footer-group":return DISPLAY.TABLE_FOOTER_GROUP;case"table-row":return DISPLAY.TABLE_ROW;case"table-cell":return DISPLAY.TABLE_CELL;case"table-column-group":return DISPLAY.TABLE_COLUMN_GROUP;case"table-column":return DISPLAY.TABLE_COLUMN;case"table-caption":return DISPLAY.TABLE_CAPTION;case"ruby-base":return DISPLAY.RUBY_BASE;case"ruby-text":return DISPLAY.RUBY_TEXT;case"ruby-base-container":return DISPLAY.RUBY_BASE_CONTAINER;case"ruby-text-container":return DISPLAY.RUBY_TEXT_CONTAINER;case"contents":return DISPLAY.CONTENTS;case"inline-block":return DISPLAY.INLINE_BLOCK;case"inline-list-item":return DISPLAY.INLINE_LIST_ITEM;case"inline-table":return DISPLAY.INLINE_TABLE;case"inline-flex":return DISPLAY.INLINE_FLEX;case"inline-grid":return DISPLAY.INLINE_GRID}return DISPLAY.NONE},setDisplayBit=function(bit,display){return bit|parseDisplayValue(display)};exports.parseDisplay=function(display){return display.split(" ").reduce(setDisplayBit,0)}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var FLOAT=exports.FLOAT={NONE:0,LEFT:1,RIGHT:2,INLINE_START:3,INLINE_END:4};exports.parseCSSFloat=function(float){switch(float){case"left":return FLOAT.LEFT;case"right":return FLOAT.RIGHT;case"inline-start":return FLOAT.INLINE_START;case"inline-end":return FLOAT.INLINE_END}return FLOAT.NONE}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var parseFontWeight=function(weight){switch(weight){case"normal":return 400;case"bold":return 700}var value=parseInt(weight,10);return isNaN(value)?400:value};exports.parseFont=function(style){return{fontFamily:style.fontFamily,fontSize:style.fontSize,fontStyle:style.fontStyle,fontVariant:style.fontVariant,fontWeight:parseFontWeight(style.fontWeight)}}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.parseLetterSpacing=function(letterSpacing){if("normal"===letterSpacing)return 0;var value=parseFloat(letterSpacing);return isNaN(value)?0:value}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var LINE_BREAK=exports.LINE_BREAK={NORMAL:"normal",STRICT:"strict"};exports.parseLineBreak=function(wordBreak){switch(wordBreak){case"strict":return LINE_BREAK.STRICT;case"normal":default:return LINE_BREAK.NORMAL}}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.parseMargin=void 0;var _Length=__webpack_require__(1),_Length2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_Length),SIDES=["top","right","bottom","left"];exports.parseMargin=function(style){return SIDES.map(function(side){return new _Length2.default(style.getPropertyValue("margin-"+side))})}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var OVERFLOW=exports.OVERFLOW={VISIBLE:0,HIDDEN:1,SCROLL:2,AUTO:3};exports.parseOverflow=function(overflow){switch(overflow){case"hidden":return OVERFLOW.HIDDEN;case"scroll":return OVERFLOW.SCROLL;case"auto":return OVERFLOW.AUTO;case"visible":default:return OVERFLOW.VISIBLE}}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.parseTextShadow=void 0;var _Color=__webpack_require__(0),_Color2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_Color),NUMBER=/^([+-]|\d|\.)$/i;exports.parseTextShadow=function(textShadow){if("none"===textShadow||"string"!=typeof textShadow)return null;for(var currentValue="",isLength=!1,values=[],shadows=[],numParens=0,color=null,appendValue=function(){currentValue.length&&(isLength?values.push(parseFloat(currentValue)):color=new _Color2.default(currentValue)),isLength=!1,currentValue=""},appendShadow=function(){values.length&&null!==color&&shadows.push({color:color,offsetX:values[0]||0,offsetY:values[1]||0,blur:values[2]||0}),values.splice(0,values.length),color=null},i=0;i<textShadow.length;i++){var c=textShadow[i];switch(c){case"(":currentValue+=c,numParens++;break;case")":currentValue+=c,numParens--;break;case",":0===numParens?(appendValue(),appendShadow()):currentValue+=c;break;case" ":0===numParens?appendValue():currentValue+=c;break;default:0===currentValue.length&&NUMBER.test(c)&&(isLength=!0),currentValue+=c}}return appendValue(),appendShadow(),0===shadows.length?null:shadows}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.parseTransform=void 0;var _Length=__webpack_require__(1),_Length2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_Length),toFloat=function(s){return parseFloat(s.trim())},MATRIX=/(matrix|matrix3d)\((.+)\)/,parseTransformOrigin=(exports.parseTransform=function(style){var transform=parseTransformMatrix(style.transform||style.webkitTransform||style.mozTransform||style.msTransform||style.oTransform);return null===transform?null:{transform:transform,transformOrigin:parseTransformOrigin(style.transformOrigin||style.webkitTransformOrigin||style.mozTransformOrigin||style.msTransformOrigin||style.oTransformOrigin)}},function(origin){if("string"!=typeof origin){var v=new _Length2.default("0");return[v,v]}var values=origin.split(" ").map(_Length2.default.create);return[values[0],values[1]]}),parseTransformMatrix=function(transform){if("none"===transform||"string"!=typeof transform)return null;var match=transform.match(MATRIX);if(match){if("matrix"===match[1]){var matrix=match[2].split(",").map(toFloat);return[matrix[0],matrix[1],matrix[2],matrix[3],matrix[4],matrix[5]]}var matrix3d=match[2].split(",").map(toFloat);return[matrix3d[0],matrix3d[1],matrix3d[4],matrix3d[5],matrix3d[12],matrix3d[13]]}return null}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var VISIBILITY=exports.VISIBILITY={VISIBLE:0,HIDDEN:1,COLLAPSE:2};exports.parseVisibility=function(visibility){switch(visibility){case"hidden":return VISIBILITY.HIDDEN;case"collapse":return VISIBILITY.COLLAPSE;case"visible":default:return VISIBILITY.VISIBLE}}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var WORD_BREAK=exports.WORD_BREAK={NORMAL:"normal",BREAK_ALL:"break-all",KEEP_ALL:"keep-all"};exports.parseWordBreak=function(wordBreak){switch(wordBreak){case"break-all":return WORD_BREAK.BREAK_ALL;case"keep-all":return WORD_BREAK.KEEP_ALL;case"normal":default:return WORD_BREAK.NORMAL}}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.parseZIndex=function(zIndex){var auto="auto"===zIndex;return{auto:auto,order:auto?0:parseInt(zIndex,10)}}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _Util=__webpack_require__(13);Object.defineProperty(exports,"toCodePoints",{enumerable:!0,get:function(){return _Util.toCodePoints}}),Object.defineProperty(exports,"fromCodePoint",{enumerable:!0,get:function(){return _Util.fromCodePoint}});var _LineBreak=__webpack_require__(47);Object.defineProperty(exports,"LineBreaker",{enumerable:!0,get:function(){return _LineBreak.LineBreaker}})},function(module,exports,__webpack_require__){"use strict";function _toConsumableArray(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i<arr.length;i++)arr2[i]=arr[i];return arr2}return Array.from(arr)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.LineBreaker=exports.inlineBreakOpportunities=exports.lineBreakAtIndex=exports.codePointsToCharacterClasses=exports.UnicodeTrie=exports.BREAK_ALLOWED=exports.BREAK_NOT_ALLOWED=exports.BREAK_MANDATORY=exports.classes=exports.LETTER_NUMBER_MODIFIER=void 0;var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_Trie=__webpack_require__(48),_linebreakTrie=__webpack_require__(49),_linebreakTrie2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_linebreakTrie),_Util=__webpack_require__(13),LETTER_NUMBER_MODIFIER=exports.LETTER_NUMBER_MODIFIER=50,BREAK_MANDATORY=(exports.classes={BK:1,CR:2,LF:3,CM:4,NL:5,SG:6,WJ:7,ZW:8,GL:9,SP:10,ZWJ:11,B2:12,BA:13,BB:14,HY:15,CB:16,CL:17,CP:18,EX:19,IN:20,NS:21,OP:22,QU:23,IS:24,NU:25,PO:26,PR:27,SY:28,AI:29,AL:30,CJ:31,EB:32,EM:33,H2:34,H3:35,HL:36,ID:37,JL:38,JV:39,JT:40,RI:41,SA:42,XX:43},exports.BREAK_MANDATORY="!"),BREAK_NOT_ALLOWED=exports.BREAK_NOT_ALLOWED="×",BREAK_ALLOWED=exports.BREAK_ALLOWED="÷",UnicodeTrie=exports.UnicodeTrie=(0,_Trie.createTrieFromBase64)(_linebreakTrie2.default),ALPHABETICS=[30,36],HARD_LINE_BREAKS=[1,2,3,5],SPACE=[10,8],PREFIX_POSTFIX=[27,26],LINE_BREAKS=HARD_LINE_BREAKS.concat(SPACE),KOREAN_SYLLABLE_BLOCK=[38,39,40,34,35],HYPHEN=[15,13],codePointsToCharacterClasses=exports.codePointsToCharacterClasses=function(codePoints){var lineBreak=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"strict",types=[],indicies=[],categories=[];return codePoints.forEach(function(codePoint,index){var classType=UnicodeTrie.get(codePoint);if(classType>LETTER_NUMBER_MODIFIER?(categories.push(!0),classType-=LETTER_NUMBER_MODIFIER):categories.push(!1),-1!==["normal","auto","loose"].indexOf(lineBreak)&&-1!==[8208,8211,12316,12448].indexOf(codePoint))return indicies.push(index),types.push(16);if(4===classType||11===classType){if(0===index)return indicies.push(index),types.push(30);var prev=types[index-1];return-1===LINE_BREAKS.indexOf(prev)?(indicies.push(indicies[index-1]),types.push(prev)):(indicies.push(index),types.push(30))}return indicies.push(index),31===classType?types.push("strict"===lineBreak?21:37):42===classType?types.push(30):29===classType?types.push(30):43===classType?codePoint>=131072&&codePoint<=196605||codePoint>=196608&&codePoint<=262141?types.push(37):types.push(30):void types.push(classType)}),[indicies,types,categories]},isAdjacentWithSpaceIgnored=function(a,b,currentIndex,classTypes){var current=classTypes[currentIndex];if(Array.isArray(a)?-1!==a.indexOf(current):a===current)for(var i=currentIndex;i<=classTypes.length;){i++;var next=classTypes[i];if(next===b)return!0;if(10!==next)break}if(10===current)for(var _i=currentIndex;_i>0;){_i--;var prev=classTypes[_i];if(Array.isArray(a)?-1!==a.indexOf(prev):a===prev)for(var n=currentIndex;n<=classTypes.length;){n++;var _next=classTypes[n];if(_next===b)return!0;if(10!==_next)break}if(10!==prev)break}return!1},previousNonSpaceClassType=function(currentIndex,classTypes){for(var i=currentIndex;i>=0;){var type=classTypes[i];if(10!==type)return type;i--}return 0},_lineBreakAtIndex=function(codePoints,classTypes,indicies,index,forbiddenBreaks){if(0===indicies[index])return BREAK_NOT_ALLOWED;var currentIndex=index-1;if(Array.isArray(forbiddenBreaks)&&!0===forbiddenBreaks[currentIndex])return BREAK_NOT_ALLOWED;var beforeIndex=currentIndex-1,afterIndex=currentIndex+1,current=classTypes[currentIndex],before=beforeIndex>=0?classTypes[beforeIndex]:0,next=classTypes[afterIndex];if(2===current&&3===next)return BREAK_NOT_ALLOWED;if(-1!==HARD_LINE_BREAKS.indexOf(current))return BREAK_MANDATORY;if(-1!==HARD_LINE_BREAKS.indexOf(next))return BREAK_NOT_ALLOWED;if(-1!==SPACE.indexOf(next))return BREAK_NOT_ALLOWED;if(8===previousNonSpaceClassType(currentIndex,classTypes))return BREAK_ALLOWED;if(11===UnicodeTrie.get(codePoints[currentIndex])&&(37===next||32===next||33===next))return BREAK_NOT_ALLOWED;if(7===current||7===next)return BREAK_NOT_ALLOWED;if(9===current)return BREAK_NOT_ALLOWED;if(-1===[10,13,15].indexOf(current)&&9===next)return BREAK_NOT_ALLOWED;if(-1!==[17,18,19,24,28].indexOf(next))return BREAK_NOT_ALLOWED;if(22===previousNonSpaceClassType(currentIndex,classTypes))return BREAK_NOT_ALLOWED;if(isAdjacentWithSpaceIgnored(23,22,currentIndex,classTypes))return BREAK_NOT_ALLOWED;if(isAdjacentWithSpaceIgnored([17,18],21,currentIndex,classTypes))return BREAK_NOT_ALLOWED;if(isAdjacentWithSpaceIgnored(12,12,currentIndex,classTypes))return BREAK_NOT_ALLOWED;if(10===current)return BREAK_ALLOWED;if(23===current||23===next)return BREAK_NOT_ALLOWED;if(16===next||16===current)return BREAK_ALLOWED;if(-1!==[13,15,21].indexOf(next)||14===current)return BREAK_NOT_ALLOWED;if(36===before&&-1!==HYPHEN.indexOf(current))return BREAK_NOT_ALLOWED;if(28===current&&36===next)return BREAK_NOT_ALLOWED;if(20===next&&-1!==ALPHABETICS.concat(20,19,25,37,32,33).indexOf(current))return BREAK_NOT_ALLOWED;if(-1!==ALPHABETICS.indexOf(next)&&25===current||-1!==ALPHABETICS.indexOf(current)&&25===next)return BREAK_NOT_ALLOWED;if(27===current&&-1!==[37,32,33].indexOf(next)||-1!==[37,32,33].indexOf(current)&&26===next)return BREAK_NOT_ALLOWED;if(-1!==ALPHABETICS.indexOf(current)&&-1!==PREFIX_POSTFIX.indexOf(next)||-1!==PREFIX_POSTFIX.indexOf(current)&&-1!==ALPHABETICS.indexOf(next))return BREAK_NOT_ALLOWED;if(-1!==[27,26].indexOf(current)&&(25===next||-1!==[22,15].indexOf(next)&&25===classTypes[afterIndex+1])||-1!==[22,15].indexOf(current)&&25===next||25===current&&-1!==[25,28,24].indexOf(next))return BREAK_NOT_ALLOWED;if(-1!==[25,28,24,17,18].indexOf(next))for(var prevIndex=currentIndex;prevIndex>=0;){var type=classTypes[prevIndex];if(25===type)return BREAK_NOT_ALLOWED;if(-1===[28,24].indexOf(type))break;prevIndex--}if(-1!==[27,26].indexOf(next))for(var _prevIndex=-1!==[17,18].indexOf(current)?beforeIndex:currentIndex;_prevIndex>=0;){var _type=classTypes[_prevIndex];if(25===_type)return BREAK_NOT_ALLOWED;if(-1===[28,24].indexOf(_type))break;_prevIndex--}if(38===current&&-1!==[38,39,34,35].indexOf(next)||-1!==[39,34].indexOf(current)&&-1!==[39,40].indexOf(next)||-1!==[40,35].indexOf(current)&&40===next)return BREAK_NOT_ALLOWED;if(-1!==KOREAN_SYLLABLE_BLOCK.indexOf(current)&&-1!==[20,26].indexOf(next)||-1!==KOREAN_SYLLABLE_BLOCK.indexOf(next)&&27===current)return BREAK_NOT_ALLOWED;if(-1!==ALPHABETICS.indexOf(current)&&-1!==ALPHABETICS.indexOf(next))return BREAK_NOT_ALLOWED;if(24===current&&-1!==ALPHABETICS.indexOf(next))return BREAK_NOT_ALLOWED;if(-1!==ALPHABETICS.concat(25).indexOf(current)&&22===next||-1!==ALPHABETICS.concat(25).indexOf(next)&&18===current)return BREAK_NOT_ALLOWED;if(41===current&&41===next){for(var i=indicies[currentIndex],count=1;i>0&&(i--,41===classTypes[i]);)count++;if(count%2!=0)return BREAK_NOT_ALLOWED}return 32===current&&33===next?BREAK_NOT_ALLOWED:BREAK_ALLOWED},cssFormattedClasses=(exports.lineBreakAtIndex=function(codePoints,index){if(0===index)return BREAK_NOT_ALLOWED;if(index>=codePoints.length)return BREAK_MANDATORY;var _codePointsToCharacte=codePointsToCharacterClasses(codePoints),_codePointsToCharacte2=_slicedToArray(_codePointsToCharacte,2),indicies=_codePointsToCharacte2[0],classTypes=_codePointsToCharacte2[1];return _lineBreakAtIndex(codePoints,classTypes,indicies,index)},function(codePoints,options){options||(options={lineBreak:"normal",wordBreak:"normal"});var _codePointsToCharacte3=codePointsToCharacterClasses(codePoints,options.lineBreak),_codePointsToCharacte4=_slicedToArray(_codePointsToCharacte3,3),indicies=_codePointsToCharacte4[0],classTypes=_codePointsToCharacte4[1],isLetterNumber=_codePointsToCharacte4[2];return"break-all"!==options.wordBreak&&"break-word"!==options.wordBreak||(classTypes=classTypes.map(function(type){return-1!==[25,30,42].indexOf(type)?37:type})),[indicies,classTypes,"keep-all"===options.wordBreak?isLetterNumber.map(function(isLetterNumber,i){return isLetterNumber&&codePoints[i]>=19968&&codePoints[i]<=40959}):null]}),Break=(exports.inlineBreakOpportunities=function(str,options){var codePoints=(0,_Util.toCodePoints)(str),output=BREAK_NOT_ALLOWED,_cssFormattedClasses=cssFormattedClasses(codePoints,options),_cssFormattedClasses2=_slicedToArray(_cssFormattedClasses,3),indicies=_cssFormattedClasses2[0],classTypes=_cssFormattedClasses2[1],forbiddenBreakpoints=_cssFormattedClasses2[2];return codePoints.forEach(function(codePoint,i){output+=(0,_Util.fromCodePoint)(codePoint)+(i>=codePoints.length-1?BREAK_MANDATORY:_lineBreakAtIndex(codePoints,classTypes,indicies,i+1,forbiddenBreakpoints))}),output},function(){function Break(codePoints,lineBreak,start,end){_classCallCheck(this,Break),this._codePoints=codePoints,this.required=lineBreak===BREAK_MANDATORY,this.start=start,this.end=end}return _createClass(Break,[{key:"slice",value:function(){return _Util.fromCodePoint.apply(void 0,_toConsumableArray(this._codePoints.slice(this.start,this.end)))}}]),Break}());exports.LineBreaker=function(str,options){var codePoints=(0,_Util.toCodePoints)(str),_cssFormattedClasses3=cssFormattedClasses(codePoints,options),_cssFormattedClasses4=_slicedToArray(_cssFormattedClasses3,3),indicies=_cssFormattedClasses4[0],classTypes=_cssFormattedClasses4[1],forbiddenBreakpoints=_cssFormattedClasses4[2],length=codePoints.length,lastEnd=0,nextIndex=0;return{next:function(){if(nextIndex>=length)return{done:!0};for(var lineBreak=BREAK_NOT_ALLOWED;nextIndex<length&&(lineBreak=_lineBreakAtIndex(codePoints,classTypes,indicies,++nextIndex,forbiddenBreakpoints))===BREAK_NOT_ALLOWED;);if(lineBreak!==BREAK_NOT_ALLOWED||nextIndex===length){var value=new Break(codePoints,lineBreak,lastEnd,nextIndex);return lastEnd=nextIndex,{value:value,done:!1}}return{done:!0}}}}},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Trie=exports.createTrieFromBase64=exports.UTRIE2_INDEX_2_MASK=exports.UTRIE2_INDEX_2_BLOCK_LENGTH=exports.UTRIE2_OMITTED_BMP_INDEX_1_LENGTH=exports.UTRIE2_INDEX_1_OFFSET=exports.UTRIE2_UTF8_2B_INDEX_2_LENGTH=exports.UTRIE2_UTF8_2B_INDEX_2_OFFSET=exports.UTRIE2_INDEX_2_BMP_LENGTH=exports.UTRIE2_LSCP_INDEX_2_LENGTH=exports.UTRIE2_DATA_MASK=exports.UTRIE2_DATA_BLOCK_LENGTH=exports.UTRIE2_LSCP_INDEX_2_OFFSET=exports.UTRIE2_SHIFT_1_2=exports.UTRIE2_INDEX_SHIFT=exports.UTRIE2_SHIFT_1=exports.UTRIE2_SHIFT_2=void 0;var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_Util=__webpack_require__(13),UTRIE2_SHIFT_2=exports.UTRIE2_SHIFT_2=5,UTRIE2_SHIFT_1=exports.UTRIE2_SHIFT_1=11,UTRIE2_INDEX_SHIFT=exports.UTRIE2_INDEX_SHIFT=2,UTRIE2_SHIFT_1_2=exports.UTRIE2_SHIFT_1_2=UTRIE2_SHIFT_1-UTRIE2_SHIFT_2,UTRIE2_LSCP_INDEX_2_OFFSET=exports.UTRIE2_LSCP_INDEX_2_OFFSET=65536>>UTRIE2_SHIFT_2,UTRIE2_DATA_BLOCK_LENGTH=exports.UTRIE2_DATA_BLOCK_LENGTH=1<<UTRIE2_SHIFT_2,UTRIE2_DATA_MASK=exports.UTRIE2_DATA_MASK=UTRIE2_DATA_BLOCK_LENGTH-1,UTRIE2_LSCP_INDEX_2_LENGTH=exports.UTRIE2_LSCP_INDEX_2_LENGTH=1024>>UTRIE2_SHIFT_2,UTRIE2_INDEX_2_BMP_LENGTH=exports.UTRIE2_INDEX_2_BMP_LENGTH=UTRIE2_LSCP_INDEX_2_OFFSET+UTRIE2_LSCP_INDEX_2_LENGTH,UTRIE2_UTF8_2B_INDEX_2_OFFSET=exports.UTRIE2_UTF8_2B_INDEX_2_OFFSET=UTRIE2_INDEX_2_BMP_LENGTH,UTRIE2_UTF8_2B_INDEX_2_LENGTH=exports.UTRIE2_UTF8_2B_INDEX_2_LENGTH=32,UTRIE2_INDEX_1_OFFSET=exports.UTRIE2_INDEX_1_OFFSET=UTRIE2_UTF8_2B_INDEX_2_OFFSET+UTRIE2_UTF8_2B_INDEX_2_LENGTH,UTRIE2_OMITTED_BMP_INDEX_1_LENGTH=exports.UTRIE2_OMITTED_BMP_INDEX_1_LENGTH=65536>>UTRIE2_SHIFT_1,UTRIE2_INDEX_2_BLOCK_LENGTH=exports.UTRIE2_INDEX_2_BLOCK_LENGTH=1<<UTRIE2_SHIFT_1_2,UTRIE2_INDEX_2_MASK=exports.UTRIE2_INDEX_2_MASK=UTRIE2_INDEX_2_BLOCK_LENGTH-1,Trie=(exports.createTrieFromBase64=function(base64){var buffer=(0,_Util.decode)(base64),view32=Array.isArray(buffer)?(0,_Util.polyUint32Array)(buffer):new Uint32Array(buffer),view16=Array.isArray(buffer)?(0,_Util.polyUint16Array)(buffer):new Uint16Array(buffer),index=view16.slice(12,view32[4]/2),data=2===view32[5]?view16.slice((24+view32[4])/2):view32.slice(Math.ceil((24+view32[4])/4));return new Trie(view32[0],view32[1],view32[2],view32[3],index,data)},exports.Trie=function(){function Trie(initialValue,errorValue,highStart,highValueIndex,index,data){_classCallCheck(this,Trie),this.initialValue=initialValue,this.errorValue=errorValue,this.highStart=highStart,this.highValueIndex=highValueIndex,this.index=index,this.data=data}return _createClass(Trie,[{key:"get",value:function(codePoint){var ix=void 0;if(codePoint>=0){if(codePoint<55296||codePoint>56319&&codePoint<=65535)return ix=this.index[codePoint>>UTRIE2_SHIFT_2],ix=(ix<<UTRIE2_INDEX_SHIFT)+(codePoint&UTRIE2_DATA_MASK),this.data[ix];if(codePoint<=65535)return ix=this.index[UTRIE2_LSCP_INDEX_2_OFFSET+(codePoint-55296>>UTRIE2_SHIFT_2)],ix=(ix<<UTRIE2_INDEX_SHIFT)+(codePoint&UTRIE2_DATA_MASK),this.data[ix];if(codePoint<this.highStart)return ix=UTRIE2_INDEX_1_OFFSET-UTRIE2_OMITTED_BMP_INDEX_1_LENGTH+(codePoint>>UTRIE2_SHIFT_1),ix=this.index[ix],ix+=codePoint>>UTRIE2_SHIFT_2&UTRIE2_INDEX_2_MASK,ix=this.index[ix],ix=(ix<<UTRIE2_INDEX_SHIFT)+(codePoint&UTRIE2_DATA_MASK),this.data[ix];if(codePoint<=1114111)return this.data[this.highValueIndex]}return this.errorValue}}]),Trie}())},function(module,exports,__webpack_require__){"use strict";module.exports="KwAAAAAAAAAACA4AIDoAAPAfAAACAAAAAAAIABAAGABAAEgAUABYAF4AZgBeAGYAYABoAHAAeABeAGYAfACEAIAAiACQAJgAoACoAK0AtQC9AMUAXgBmAF4AZgBeAGYAzQDVAF4AZgDRANkA3gDmAOwA9AD8AAQBDAEUARoBIgGAAIgAJwEvATcBPwFFAU0BTAFUAVwBZAFsAXMBewGDATAAiwGTAZsBogGkAawBtAG8AcIBygHSAdoB4AHoAfAB+AH+AQYCDgIWAv4BHgImAi4CNgI+AkUCTQJTAlsCYwJrAnECeQKBAk0CiQKRApkCoQKoArACuALAAsQCzAIwANQC3ALkAjAA7AL0AvwCAQMJAxADGAMwACADJgMuAzYDPgOAAEYDSgNSA1IDUgNaA1oDYANiA2IDgACAAGoDgAByA3YDfgOAAIQDgACKA5IDmgOAAIAAogOqA4AAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAK8DtwOAAIAAvwPHA88D1wPfAyAD5wPsA/QD/AOAAIAABAQMBBIEgAAWBB4EJgQuBDMEIAM7BEEEXgBJBCADUQRZBGEEaQQwADAAcQQ+AXkEgQSJBJEEgACYBIAAoASoBK8EtwQwAL8ExQSAAIAAgACAAIAAgACgAM0EXgBeAF4AXgBeAF4AXgBeANUEXgDZBOEEXgDpBPEE+QQBBQkFEQUZBSEFKQUxBTUFPQVFBUwFVAVcBV4AYwVeAGsFcwV7BYMFiwWSBV4AmgWgBacFXgBeAF4AXgBeAKsFXgCyBbEFugW7BcIFwgXIBcIFwgXQBdQF3AXkBesF8wX7BQMGCwYTBhsGIwYrBjMGOwZeAD8GRwZNBl4AVAZbBl4AXgBeAF4AXgBeAF4AXgBeAF4AXgBeAGMGXgBqBnEGXgBeAF4AXgBeAF4AXgBeAF4AXgB5BoAG4wSGBo4GkwaAAIADHgR5AF4AXgBeAJsGgABGA4AAowarBrMGswagALsGwwbLBjAA0wbaBtoG3QbaBtoG2gbaBtoG2gblBusG8wb7BgMHCwcTBxsHCwcjBysHMAc1BzUHOgdCB9oGSgdSB1oHYAfaBloHaAfaBlIH2gbaBtoG2gbaBtoG2gbaBjUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHbQdeAF4ANQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQd1B30HNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B4MH2gaKB68EgACAAIAAgACAAIAAgACAAI8HlwdeAJ8HpweAAIAArwe3B14AXgC/B8UHygcwANAH2AfgB4AA6AfwBz4B+AcACFwBCAgPCBcIogEYAR8IJwiAAC8INwg/CCADRwhPCFcIXwhnCEoDGgSAAIAAgABvCHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIhAiLCI4IMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAANQc1BzUHNQc1BzUHNQc1BzUHNQc1B54INQc1B6II2gaqCLIIugiAAIAAvgjGCIAAgACAAIAAgACAAIAAgACAAIAAywiHAYAA0wiAANkI3QjlCO0I9Aj8CIAAgACAAAIJCgkSCRoJIgknCTYHLwk3CZYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiAAIAAAAFAAXgBeAGAAcABeAHwAQACQAKAArQC9AJ4AXgBeAE0A3gBRAN4A7AD8AMwBGgEAAKcBNwEFAUwBXAF4QkhCmEKnArcCgAHHAsABz4LAAcABwAHAAd+C6ABoAG+C/4LAAcABwAHAAc+DF4MAAcAB54M3gweDV4Nng3eDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEeDqABVg6WDqABoQ6gAaABoAHXDvcONw/3DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DncPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB7cPPwlGCU4JMACAAIAAgABWCV4JYQmAAGkJcAl4CXwJgAkwADAAMAAwAIgJgACLCZMJgACZCZ8JowmrCYAAswkwAF4AXgB8AIAAuwkABMMJyQmAAM4JgADVCTAAMAAwADAAgACAAIAAgACAAIAAgACAAIAAqwYWBNkIMAAwADAAMADdCeAJ6AnuCR4E9gkwAP4JBQoNCjAAMACAABUK0wiAAB0KJAosCjQKgAAwADwKQwqAAEsKvQmdCVMKWwowADAAgACAALcEMACAAGMKgABrCjAAMAAwADAAMAAwADAAMAAwADAAMAAeBDAAMAAwADAAMAAwADAAMAAwADAAMAAwAIkEPQFzCnoKiQSCCooKkAqJBJgKoAqkCokEGAGsCrQKvArBCjAAMADJCtEKFQHZCuEK/gHpCvEKMAAwADAAMACAAIwE+QowAIAAPwEBCzAAMAAwADAAMACAAAkLEQswAIAAPwEZCyELgAAOCCkLMAAxCzkLMAAwADAAMAAwADAAXgBeAEELMAAwADAAMAAwADAAMAAwAEkLTQtVC4AAXAtkC4AAiQkwADAAMAAwADAAMAAwADAAbAtxC3kLgAuFC4sLMAAwAJMLlwufCzAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAApwswADAAMACAAIAAgACvC4AAgACAAIAAgACAALcLMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAvwuAAMcLgACAAIAAgACAAIAAyguAAIAAgACAAIAA0QswADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAANkLgACAAIAA4AswADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACJCR4E6AswADAAhwHwC4AA+AsADAgMEAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMACAAIAAGAwdDCUMMAAwAC0MNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQw1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHPQwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADUHNQc1BzUHNQc1BzUHNQc2BzAAMAA5DDUHNQc1BzUHNQc1BzUHNQc1BzUHNQdFDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAgACAAIAATQxSDFoMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAF4AXgBeAF4AXgBeAF4AYgxeAGoMXgBxDHkMfwxeAIUMXgBeAI0MMAAwADAAMAAwAF4AXgCVDJ0MMAAwADAAMABeAF4ApQxeAKsMswy7DF4Awgy9DMoMXgBeAF4AXgBeAF4AXgBeAF4AXgDRDNkMeQBqCeAM3Ax8AOYM7Az0DPgMXgBeAF4AXgBeAF4AXgBeAF4AXgBeAF4AXgBeAF4AXgCgAAANoAAHDQ4NFg0wADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAeDSYNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIAAgACAAIAAgACAAC4NMABeAF4ANg0wADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAD4NRg1ODVYNXg1mDTAAbQ0wADAAMAAwADAAMAAwADAA2gbaBtoG2gbaBtoG2gbaBnUNeg3CBYANwgWFDdoGjA3aBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gaUDZwNpA2oDdoG2gawDbcNvw3HDdoG2gbPDdYN3A3fDeYN2gbsDfMN2gbaBvoN/g3aBgYODg7aBl4AXgBeABYOXgBeACUG2gYeDl4AJA5eACwO2w3aBtoGMQ45DtoG2gbaBtoGQQ7aBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gZJDjUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B1EO2gY1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQdZDjUHNQc1BzUHNQc1B2EONQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHaA41BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B3AO2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gY1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B2EO2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gZJDtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBkkOeA6gAKAAoAAwADAAMAAwAKAAoACgAKAAoACgAKAAgA4wADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAD//wQABAAEAAQABAAEAAQABAAEAA0AAwABAAEAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAKABMAFwAeABsAGgAeABcAFgASAB4AGwAYAA8AGAAcAEsASwBLAEsASwBLAEsASwBLAEsAGAAYAB4AHgAeABMAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAFgAbABIAHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYADQARAB4ABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkAFgAaABsAGwAbAB4AHQAdAB4ATwAXAB4ADQAeAB4AGgAbAE8ATwAOAFAAHQAdAB0ATwBPABcATwBPAE8AFgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwArAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAAQABAANAA0ASwBLAEsASwBLAEsASwBLAEsASwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUAArACsABABQAAQABAAEAAQABAAEAAQAKwArAAQABAArACsABAAEAAQAUAArACsAKwArACsAKwArACsABAArACsAKwArAFAAUAArAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAGgAaAFAAUABQAFAAUABMAB4AGwBQAB4AKwArACsABAAEAAQAKwBQAFAAUABQAFAAUAArACsAKwArAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUAArAFAAUAArACsABAArAAQABAAEAAQABAArACsAKwArAAQABAArACsABAAEAAQAKwArACsABAArACsAKwArACsAKwArAFAAUABQAFAAKwBQACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwAEAAQAUABQAFAABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUAArACsABABQAAQABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQAKwArAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwAeABsAKwArACsAKwArACsAKwBQAAQABAAEAAQABAAEACsABAAEAAQAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwArAAQABAArACsABAAEAAQAKwArACsAKwArACsAKwArAAQABAArACsAKwArAFAAUAArAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwAeAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwAEAFAAKwBQAFAAUABQAFAAUAArACsAKwBQAFAAUAArAFAAUABQAFAAKwArACsAUABQACsAUAArAFAAUAArACsAKwBQAFAAKwArACsAUABQAFAAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQAKwArACsABAAEAAQAKwAEAAQABAAEACsAKwBQACsAKwArACsAKwArAAQAKwArACsAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAB4AHgAeAB4AHgAeABsAHgArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABAArACsAKwArACsAKwArAAQABAArAFAAUABQACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAB4AUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABAArACsAKwArACsAKwArAAQABAArACsAKwArACsAKwArAFAAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwArAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAKwBcAFwAKwBcACsAKwBcACsAKwArACsAKwArAFwAXABcAFwAKwBcAFwAXABcAFwAXABcACsAXABcAFwAKwBcACsAXAArACsAXABcACsAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgArACoAKgBcACsAKwBcAFwAXABcAFwAKwBcACsAKgAqACoAKgAqACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAFwAXABcAFwAUAAOAA4ADgAOAB4ADgAOAAkADgAOAA0ACQATABMAEwATABMACQAeABMAHgAeAB4ABAAEAB4AHgAeAB4AHgAeAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUAANAAQAHgAEAB4ABAAWABEAFgARAAQABABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAAQABAAEAAQABAANAAQABABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsADQANAB4AHgAeAB4AHgAeAAQAHgAeAB4AHgAeAB4AKwAeAB4ADgAOAA0ADgAeAB4AHgAeAB4ACQAJACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgAeAB4AHgBcAFwAXABcAFwAXAAqACoAKgAqAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAKgAqACoAKgAqACoAKgBcAFwAXAAqACoAKgAqAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAXAAqAEsASwBLAEsASwBLAEsASwBLAEsAKgAqACoAKgAqACoAUABQAFAAUABQAFAAKwBQACsAKwArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQACsAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwAEAAQABAAeAA0AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAEQArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAADQANAA0AUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAA0ADQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoADQANABUAXAANAB4ADQAbAFwAKgArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAB4AHgATABMADQANAA4AHgATABMAHgAEAAQABAAJACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAUABQAFAAUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwAeACsAKwArABMAEwBLAEsASwBLAEsASwBLAEsASwBLAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwBcAFwAXABcAFwAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcACsAKwArACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwAeAB4AXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgArACsABABLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKgAqACoAKgAqACoAKgBcACoAKgAqACoAKgAqACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAUABQAFAAUABQAFAAUAArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4ADQANAA0ADQAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAHgAeAB4AHgBQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwANAA0ADQANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwBQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsABAAEAAQAHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAABABQAFAAUABQAAQABAAEAFAAUAAEAAQABAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAKwBQACsAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAKwArAB4AHgAeAB4AHgAeACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAUABQAFAAKwAeAB4AHgAeAB4AHgAeAA4AHgArAA0ADQANAA0ADQANAA0ACQANAA0ADQAIAAQACwAEAAQADQAJAA0ADQAMAB0AHQAeABcAFwAWABcAFwAXABYAFwAdAB0AHgAeABQAFAAUAA0AAQABAAQABAAEAAQABAAJABoAGgAaABoAGgAaABoAGgAeABcAFwAdABUAFQAeAB4AHgAeAB4AHgAYABYAEQAVABUAFQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgANAB4ADQANAA0ADQAeAA0ADQANAAcAHgAeAB4AHgArAAQABAAEAAQABAAEAAQABAAEAAQAUABQACsAKwBPAFAAUABQAFAAUAAeAB4AHgAWABEATwBQAE8ATwBPAE8AUABQAFAAUABQAB4AHgAeABYAEQArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAGwAbABsAGwAbABsAGwAaABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAaABsAGwAbABsAGgAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgBQABoAHgAdAB4AUAAeABoAHgAeAB4AHgAeAB4AHgAeAB4ATwAeAFAAGwAeAB4AUABQAFAAUABQAB4AHgAeAB0AHQAeAFAAHgBQAB4AUAAeAFAATwBQAFAAHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AUABQAFAAUABPAE8AUABQAFAAUABQAE8AUABQAE8AUABPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAE8ATwBPAE8ATwBPAE8ATwBPAE8AUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAATwAeAB4AKwArACsAKwAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB0AHQAeAB4AHgAdAB0AHgAeAB0AHgAeAB4AHQAeAB0AGwAbAB4AHQAeAB4AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB0AHgAdAB4AHQAdAB0AHQAdAB0AHgAdAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAdAB0AHQAdAB4AHgAdAB0AHgAeAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABQAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAlACUAHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBQAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAeAB4AHgAeAB0AHQAeAB4AHgAeAB0AHQAdAB4AHgAdAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB0AHQAeAB4AHQAeAB4AHgAeAB0AHQAeAB4AHgAeACUAJQAdAB0AJQAeACUAJQAlACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAHgAeAB4AHgAdAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHQAdAB0AHgAdACUAHQAdAB4AHQAdAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHQAdAB0AHQAlAB4AJQAlACUAHQAlACUAHQAdAB0AJQAlAB0AHQAlAB0AHQAlACUAJQAeAB0AHgAeAB4AHgAdAB0AJQAdAB0AHQAdAB0AHQAlACUAJQAlACUAHQAlACUAIAAlAB0AHQAlACUAJQAlACUAJQAlACUAHgAeAB4AJQAlACAAIAAgACAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeABcAFwAXABcAFwAXAB4AEwATACUAHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwArACUAJQBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAKwArACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAE8ATwBPAE8ATwBPAE8ATwAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeACsAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUAArACsAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQBQAFAAUABQACsAKwArACsAUABQAFAAUABQAFAAUABQAA0AUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQACsAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgBQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAABAAEAAQAKwAEAAQAKwArACsAKwArAAQABAAEAAQAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsABAAEAAQAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsADQANAA0ADQANAA0ADQANAB4AKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AUABQAFAAUABQAFAAUABQAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAUABQAFAAUABQAA0ADQANAA0ADQANABQAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwANAA0ADQANAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAeAAQABAAEAB4AKwArAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLACsADQArAB4AKwArAAQABAAEAAQAUABQAB4AUAArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwAEAAQABAAEAAQABAAEAAQABAAOAA0ADQATABMAHgAeAB4ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0AUABQAFAAUAAEAAQAKwArAAQADQANAB4AUAArACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXABcAA0ADQANACoASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUAArACsAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANACsADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEcARwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQACsAKwAeAAQABAANAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAEAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUAArACsAUAArACsAUABQACsAKwBQAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AKwArAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAeAB4ADQANAA0ADQAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAArAAQABAArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAEAAQABAAEAAQABAAEACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAFgAWAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAKwBQACsAKwArACsAKwArAFAAKwArACsAKwBQACsAUAArAFAAKwBQAFAAUAArAFAAUAArAFAAKwArAFAAKwBQACsAUAArAFAAKwBQACsAUABQACsAUAArACsAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAUABQAFAAUAArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUAArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAlACUAJQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeACUAJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeACUAJQAlACUAJQAeACUAJQAlACUAJQAgACAAIAAlACUAIAAlACUAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIQAhACEAIQAhACUAJQAgACAAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAgACAAIAAlACUAJQAlACAAJQAgACAAIAAgACAAIAAgACAAIAAlACUAJQAgACUAJQAlACUAIAAgACAAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeACUAHgAlAB4AJQAlACUAJQAlACAAJQAlACUAJQAeACUAHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAgACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAlACUAJQAlACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAIAAgACAAJQAlACUAIAAgACAAIAAgAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFwAXABcAFQAVABUAHgAeAB4AHgAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAgACAAJQAlACUAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAlACAAIAAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsA"},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _Path=__webpack_require__(6),Circle=function Circle(x,y,radius){_classCallCheck(this,Circle),this.type=_Path.PATH.CIRCLE,this.x=x,this.y=y,this.radius=radius,isNaN(x)&&console.error("Invalid x value given for Circle"),isNaN(y)&&console.error("Invalid y value given for Circle"),isNaN(radius)&&console.error("Invalid radius value given for Circle")};exports.default=Circle},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_Bounds=__webpack_require__(2),_Gradient=(__webpack_require__(25),__webpack_require__(52)),_TextContainer=__webpack_require__(9),_TextContainer2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_TextContainer),_background=__webpack_require__(5),_border=__webpack_require__(12),Renderer=function(){function Renderer(target,options){_classCallCheck(this,Renderer),this.target=target,this.options=options,target.render(options)}return _createClass(Renderer,[{key:"renderNode",value:function(container){container.isVisible()&&(this.renderNodeBackgroundAndBorders(container),this.renderNodeContent(container))}},{key:"renderNodeContent",value:function(container){var _this=this,callback=function(){if(container.childNodes.length&&container.childNodes.forEach(function(child){if(child instanceof _TextContainer2.default){var style=child.parent.style;_this.target.renderTextNode(child.bounds,style.color,style.font,style.textDecoration,style.textShadow)}else _this.target.drawShape(child,container.style.color)}),container.image){var _image=_this.options.imageStore.get(container.image);if(_image){var contentBox=(0,_Bounds.calculateContentBox)(container.bounds,container.style.padding,container.style.border),_width="number"==typeof _image.width&&_image.width>0?_image.width:contentBox.width,_height="number"==typeof _image.height&&_image.height>0?_image.height:contentBox.height;_width>0&&_height>0&&_this.target.clip([(0,_Bounds.calculatePaddingBoxPath)(container.curvedBounds)],function(){_this.target.drawImage(_image,new _Bounds.Bounds(0,0,_width,_height),contentBox)})}}},paths=container.getClipPaths();paths.length?this.target.clip(paths,callback):callback()}},{key:"renderNodeBackgroundAndBorders",value:function(container){var _this2=this,HAS_BACKGROUND=!container.style.background.backgroundColor.isTransparent()||container.style.background.backgroundImage.length,hasRenderableBorders=container.style.border.some(function(border){return border.borderStyle!==_border.BORDER_STYLE.NONE&&!border.borderColor.isTransparent()}),callback=function(){var backgroundPaintingArea=(0,_background.calculateBackgroungPaintingArea)(container.curvedBounds,container.style.background.backgroundClip);HAS_BACKGROUND&&_this2.target.clip([backgroundPaintingArea],function(){container.style.background.backgroundColor.isTransparent()||_this2.target.fill(container.style.background.backgroundColor),_this2.renderBackgroundImage(container)}),container.style.border.forEach(function(border,side){border.borderStyle===_border.BORDER_STYLE.NONE||border.borderColor.isTransparent()||_this2.renderBorder(border,side,container.curvedBounds)})};if(HAS_BACKGROUND||hasRenderableBorders){var paths=container.parent?container.parent.getClipPaths():[];paths.length?this.target.clip(paths,callback):callback()}}},{key:"renderBackgroundImage",value:function(container){var _this3=this;container.style.background.backgroundImage.slice(0).reverse().forEach(function(backgroundImage){"url"===backgroundImage.source.method&&backgroundImage.source.args.length?_this3.renderBackgroundRepeat(container,backgroundImage):/gradient/i.test(backgroundImage.source.method)&&_this3.renderBackgroundGradient(container,backgroundImage)})}},{key:"renderBackgroundRepeat",value:function(container,background){var image=this.options.imageStore.get(background.source.args[0]);if(image){var backgroundPositioningArea=(0,_background.calculateBackgroungPositioningArea)(container.style.background.backgroundOrigin,container.bounds,container.style.padding,container.style.border),backgroundImageSize=(0,_background.calculateBackgroundSize)(background,image,backgroundPositioningArea),position=(0,_background.calculateBackgroundPosition)(background.position,backgroundImageSize,backgroundPositioningArea),_path=(0,_background.calculateBackgroundRepeatPath)(background,position,backgroundImageSize,backgroundPositioningArea,container.bounds),_offsetX=Math.round(backgroundPositioningArea.left+position.x),_offsetY=Math.round(backgroundPositioningArea.top+position.y);this.target.renderRepeat(_path,image,backgroundImageSize,_offsetX,_offsetY)}}},{key:"renderBackgroundGradient",value:function(container,background){var backgroundPositioningArea=(0,_background.calculateBackgroungPositioningArea)(container.style.background.backgroundOrigin,container.bounds,container.style.padding,container.style.border),backgroundImageSize=(0,_background.calculateGradientBackgroundSize)(background,backgroundPositioningArea),position=(0,_background.calculateBackgroundPosition)(background.position,backgroundImageSize,backgroundPositioningArea),gradientBounds=new _Bounds.Bounds(Math.round(backgroundPositioningArea.left+position.x),Math.round(backgroundPositioningArea.top+position.y),backgroundImageSize.width,backgroundImageSize.height),gradient=(0,_Gradient.parseGradient)(container,background.source,gradientBounds);if(gradient)switch(gradient.type){case _Gradient.GRADIENT_TYPE.LINEAR_GRADIENT:this.target.renderLinearGradient(gradientBounds,gradient);break;case _Gradient.GRADIENT_TYPE.RADIAL_GRADIENT:this.target.renderRadialGradient(gradientBounds,gradient)}}},{key:"renderBorder",value:function(border,side,curvePoints){this.target.drawShape((0,_Bounds.parsePathForBorder)(curvePoints,side),border.borderColor)}},{key:"renderStack",value:function(stack){var _this4=this;if(stack.container.isVisible()){var _opacity=stack.getOpacity();_opacity!==this._opacity&&(this.target.setOpacity(stack.getOpacity()),this._opacity=_opacity);var _transform=stack.container.style.transform;null!==_transform?this.target.transform(stack.container.bounds.left+_transform.transformOrigin[0].value,stack.container.bounds.top+_transform.transformOrigin[1].value,_transform.transform,function(){return _this4.renderStackContent(stack)}):this.renderStackContent(stack)}}},{key:"renderStackContent",value:function(stack){var _splitStackingContext=splitStackingContexts(stack),_splitStackingContext2=_slicedToArray(_splitStackingContext,5),negativeZIndex=_splitStackingContext2[0],zeroOrAutoZIndexOrTransformedOrOpacity=_splitStackingContext2[1],positiveZIndex=_splitStackingContext2[2],nonPositionedFloats=_splitStackingContext2[3],nonPositionedInlineLevel=_splitStackingContext2[4],_splitDescendants=splitDescendants(stack),_splitDescendants2=_slicedToArray(_splitDescendants,2),inlineLevel=_splitDescendants2[0],nonInlineLevel=_splitDescendants2[1];this.renderNodeBackgroundAndBorders(stack.container),negativeZIndex.sort(sortByZIndex).forEach(this.renderStack,this),this.renderNodeContent(stack.container),nonInlineLevel.forEach(this.renderNode,this),nonPositionedFloats.forEach(this.renderStack,this),nonPositionedInlineLevel.forEach(this.renderStack,this),inlineLevel.forEach(this.renderNode,this),zeroOrAutoZIndexOrTransformedOrOpacity.forEach(this.renderStack,this),positiveZIndex.sort(sortByZIndex).forEach(this.renderStack,this)}},{key:"render",value:function(stack){var _this5=this;this.options.backgroundColor&&this.target.rectangle(this.options.x,this.options.y,this.options.width,this.options.height,this.options.backgroundColor),this.renderStack(stack);var target=this.target.getTarget();return target.then(function(output){return _this5.options.logger.log("Render completed"),output})}}]),Renderer}();exports.default=Renderer;var splitDescendants=function(stack){for(var inlineLevel=[],nonInlineLevel=[],length=stack.children.length,i=0;i<length;i++){var child=stack.children[i];child.isInlineLevel()?inlineLevel.push(child):nonInlineLevel.push(child)}return[inlineLevel,nonInlineLevel]},splitStackingContexts=function(stack){for(var negativeZIndex=[],zeroOrAutoZIndexOrTransformedOrOpacity=[],positiveZIndex=[],nonPositionedFloats=[],nonPositionedInlineLevel=[],length=stack.contexts.length,i=0;i<length;i++){var child=stack.contexts[i];child.container.isPositioned()||child.container.style.opacity<1||child.container.isTransformed()?child.container.style.zIndex.order<0?negativeZIndex.push(child):child.container.style.zIndex.order>0?positiveZIndex.push(child):zeroOrAutoZIndexOrTransformedOrOpacity.push(child):child.container.isFloating()?nonPositionedFloats.push(child):nonPositionedInlineLevel.push(child)}return[negativeZIndex,zeroOrAutoZIndexOrTransformedOrOpacity,positiveZIndex,nonPositionedFloats,nonPositionedInlineLevel]},sortByZIndex=function(a,b){return a.container.style.zIndex.order>b.container.style.zIndex.order?1:a.container.style.zIndex.order<b.container.style.zIndex.order?-1:a.container.index>b.container.index?1:-1}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.transformWebkitRadialGradientArgs=exports.parseGradient=exports.RadialGradient=exports.LinearGradient=exports.RADIAL_GRADIENT_SHAPE=exports.GRADIENT_TYPE=void 0;var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_NodeContainer=__webpack_require__(3),_Angle=(_interopRequireDefault(_NodeContainer),__webpack_require__(53)),_Color=__webpack_require__(0),_Color2=_interopRequireDefault(_Color),_Length=__webpack_require__(1),_Length2=_interopRequireDefault(_Length),_Util=__webpack_require__(4),SIDE_OR_CORNER=/^(to )?(left|top|right|bottom)( (left|top|right|bottom))?$/i,PERCENTAGE_ANGLES=/^([+-]?\d*\.?\d+)% ([+-]?\d*\.?\d+)%$/i,ENDS_WITH_LENGTH=/(px)|%|( 0)$/i,FROM_TO_COLORSTOP=/^(from|to|color-stop)\((?:([\d.]+)(%)?,\s*)?(.+?)\)$/i,RADIAL_SHAPE_DEFINITION=/^\s*(circle|ellipse)?\s*((?:([\d.]+)(px|r?em|%)\s*(?:([\d.]+)(px|r?em|%))?)|closest-side|closest-corner|farthest-side|farthest-corner)?\s*(?:at\s*(?:(left|center|right)|([\d.]+)(px|r?em|%))\s+(?:(top|center|bottom)|([\d.]+)(px|r?em|%)))?(?:\s|$)/i,GRADIENT_TYPE=exports.GRADIENT_TYPE={LINEAR_GRADIENT:0,RADIAL_GRADIENT:1},RADIAL_GRADIENT_SHAPE=exports.RADIAL_GRADIENT_SHAPE={CIRCLE:0,ELLIPSE:1},LENGTH_FOR_POSITION={left:new _Length2.default("0%"),top:new _Length2.default("0%"),center:new _Length2.default("50%"),right:new _Length2.default("100%"),bottom:new _Length2.default("100%")},LinearGradient=exports.LinearGradient=function LinearGradient(colorStops,direction){_classCallCheck(this,LinearGradient),this.type=GRADIENT_TYPE.LINEAR_GRADIENT,this.colorStops=colorStops,this.direction=direction},RadialGradient=exports.RadialGradient=function RadialGradient(colorStops,shape,center,radius){_classCallCheck(this,RadialGradient),this.type=GRADIENT_TYPE.RADIAL_GRADIENT,this.colorStops=colorStops,this.shape=shape,this.center=center,this.radius=radius},parseColorStops=(exports.parseGradient=function(container,_ref,bounds){var args=_ref.args,method=_ref.method,prefix=_ref.prefix;return"linear-gradient"===method?parseLinearGradient(args,bounds,!!prefix):"gradient"===method&&"linear"===args[0]?parseLinearGradient(["to bottom"].concat(transformObsoleteColorStops(args.slice(3))),bounds,!!prefix):"radial-gradient"===method?parseRadialGradient(container,"-webkit-"===prefix?transformWebkitRadialGradientArgs(args):args,bounds):"gradient"===method&&"radial"===args[0]?parseRadialGradient(container,transformObsoleteColorStops(transformWebkitRadialGradientArgs(args.slice(1))),bounds):void 0},function(args,firstColorStopIndex,lineLength){for(var colorStops=[],i=firstColorStopIndex;i<args.length;i++){var value=args[i],HAS_LENGTH=ENDS_WITH_LENGTH.test(value),lastSpaceIndex=value.lastIndexOf(" "),_color=new _Color2.default(HAS_LENGTH?value.substring(0,lastSpaceIndex):value),_stop=HAS_LENGTH?new _Length2.default(value.substring(lastSpaceIndex+1)):i===firstColorStopIndex?new _Length2.default("0%"):i===args.length-1?new _Length2.default("100%"):null;colorStops.push({color:_color,stop:_stop})}for(var absoluteValuedColorStops=colorStops.map(function(_ref2){var color=_ref2.color,stop=_ref2.stop;return{color:color,stop:0===lineLength?0:stop?stop.getAbsoluteValue(lineLength)/lineLength:null}}),previousColorStop=absoluteValuedColorStops[0].stop,_i=0;_i<absoluteValuedColorStops.length;_i++)if(null!==previousColorStop){var _stop2=absoluteValuedColorStops[_i].stop;if(null===_stop2){for(var n=_i;null===absoluteValuedColorStops[n].stop;)n++;for(var steps=n-_i+1,nextColorStep=absoluteValuedColorStops[n].stop,stepSize=(nextColorStep-previousColorStop)/steps;_i<n;_i++)previousColorStop=absoluteValuedColorStops[_i].stop=previousColorStop+stepSize}else previousColorStop=_stop2}return absoluteValuedColorStops}),parseLinearGradient=function(args,bounds,hasPrefix){var angle=(0,_Angle.parseAngle)(args[0]),HAS_SIDE_OR_CORNER=SIDE_OR_CORNER.test(args[0]),HAS_DIRECTION=HAS_SIDE_OR_CORNER||null!==angle||PERCENTAGE_ANGLES.test(args[0]),direction=HAS_DIRECTION?null!==angle?calculateGradientDirection(hasPrefix?angle-.5*Math.PI:angle,bounds):HAS_SIDE_OR_CORNER?parseSideOrCorner(args[0],bounds):parsePercentageAngle(args[0],bounds):calculateGradientDirection(Math.PI,bounds),firstColorStopIndex=HAS_DIRECTION?1:0,lineLength=Math.min((0,_Util.distance)(Math.abs(direction.x0)+Math.abs(direction.x1),Math.abs(direction.y0)+Math.abs(direction.y1)),2*bounds.width,2*bounds.height);return new LinearGradient(parseColorStops(args,firstColorStopIndex,lineLength),direction)},parseRadialGradient=function(container,args,bounds){var m=args[0].match(RADIAL_SHAPE_DEFINITION),shape=m&&("circle"===m[1]||void 0!==m[3]&&void 0===m[5])?RADIAL_GRADIENT_SHAPE.CIRCLE:RADIAL_GRADIENT_SHAPE.ELLIPSE,radius={},center={};m&&(void 0!==m[3]&&(radius.x=(0,_Length.calculateLengthFromValueWithUnit)(container,m[3],m[4]).getAbsoluteValue(bounds.width)),void 0!==m[5]&&(radius.y=(0,_Length.calculateLengthFromValueWithUnit)(container,m[5],m[6]).getAbsoluteValue(bounds.height)),m[7]?center.x=LENGTH_FOR_POSITION[m[7].toLowerCase()]:void 0!==m[8]&&(center.x=(0,_Length.calculateLengthFromValueWithUnit)(container,m[8],m[9])),m[10]?center.y=LENGTH_FOR_POSITION[m[10].toLowerCase()]:void 0!==m[11]&&(center.y=(0,_Length.calculateLengthFromValueWithUnit)(container,m[11],m[12])));var gradientCenter={x:void 0===center.x?bounds.width/2:center.x.getAbsoluteValue(bounds.width),y:void 0===center.y?bounds.height/2:center.y.getAbsoluteValue(bounds.height)},gradientRadius=calculateRadius(m&&m[2]||"farthest-corner",shape,gradientCenter,radius,bounds);return new RadialGradient(parseColorStops(args,m?1:0,Math.min(gradientRadius.x,gradientRadius.y)),shape,gradientCenter,gradientRadius)},calculateGradientDirection=function(radian,bounds){var width=bounds.width,height=bounds.height,HALF_WIDTH=.5*width,HALF_HEIGHT=.5*height,lineLength=Math.abs(width*Math.sin(radian))+Math.abs(height*Math.cos(radian)),HALF_LINE_LENGTH=lineLength/2,x0=HALF_WIDTH+Math.sin(radian)*HALF_LINE_LENGTH,y0=HALF_HEIGHT-Math.cos(radian)*HALF_LINE_LENGTH;return{x0:x0,x1:width-x0,y0:y0,y1:height-y0}},parseTopRight=function(bounds){return Math.acos(bounds.width/2/((0,_Util.distance)(bounds.width,bounds.height)/2))},parseSideOrCorner=function(side,bounds){switch(side){case"bottom":case"to top":return calculateGradientDirection(0,bounds);case"left":case"to right":return calculateGradientDirection(Math.PI/2,bounds);case"right":case"to left":return calculateGradientDirection(3*Math.PI/2,bounds);case"top right":case"right top":case"to bottom left":case"to left bottom":return calculateGradientDirection(Math.PI+parseTopRight(bounds),bounds);case"top left":case"left top":case"to bottom right":case"to right bottom":return calculateGradientDirection(Math.PI-parseTopRight(bounds),bounds);case"bottom left":case"left bottom":case"to top right":case"to right top":return calculateGradientDirection(parseTopRight(bounds),bounds);case"bottom right":case"right bottom":case"to top left":case"to left top":return calculateGradientDirection(2*Math.PI-parseTopRight(bounds),bounds);case"top":case"to bottom":default:return calculateGradientDirection(Math.PI,bounds)}},parsePercentageAngle=function(angle,bounds){var _angle$split$map=angle.split(" ").map(parseFloat),_angle$split$map2=_slicedToArray(_angle$split$map,2),left=_angle$split$map2[0],top=_angle$split$map2[1],ratio=left/100*bounds.width/(top/100*bounds.height);return calculateGradientDirection(Math.atan(isNaN(ratio)?1:ratio)+Math.PI/2,bounds)},findCorner=function(bounds,x,y,closest){return[{x:0,y:0},{x:0,y:bounds.height},{x:bounds.width,y:0},{x:bounds.width,y:bounds.height}].reduce(function(stat,corner){var d=(0,_Util.distance)(x-corner.x,y-corner.y);return(closest?d<stat.optimumDistance:d>stat.optimumDistance)?{optimumCorner:corner,optimumDistance:d}:stat},{optimumDistance:closest?1/0:-1/0,optimumCorner:null}).optimumCorner},calculateRadius=function(extent,shape,center,radius,bounds){var x=center.x,y=center.y,rx=0,ry=0;switch(extent){case"closest-side":shape===RADIAL_GRADIENT_SHAPE.CIRCLE?rx=ry=Math.min(Math.abs(x),Math.abs(x-bounds.width),Math.abs(y),Math.abs(y-bounds.height)):shape===RADIAL_GRADIENT_SHAPE.ELLIPSE&&(rx=Math.min(Math.abs(x),Math.abs(x-bounds.width)),ry=Math.min(Math.abs(y),Math.abs(y-bounds.height)));break;case"closest-corner":if(shape===RADIAL_GRADIENT_SHAPE.CIRCLE)rx=ry=Math.min((0,_Util.distance)(x,y),(0,_Util.distance)(x,y-bounds.height),(0,_Util.distance)(x-bounds.width,y),(0,_Util.distance)(x-bounds.width,y-bounds.height));else if(shape===RADIAL_GRADIENT_SHAPE.ELLIPSE){var c=Math.min(Math.abs(y),Math.abs(y-bounds.height))/Math.min(Math.abs(x),Math.abs(x-bounds.width)),corner=findCorner(bounds,x,y,!0);rx=(0,_Util.distance)(corner.x-x,(corner.y-y)/c),ry=c*rx}break;case"farthest-side":shape===RADIAL_GRADIENT_SHAPE.CIRCLE?rx=ry=Math.max(Math.abs(x),Math.abs(x-bounds.width),Math.abs(y),Math.abs(y-bounds.height)):shape===RADIAL_GRADIENT_SHAPE.ELLIPSE&&(rx=Math.max(Math.abs(x),Math.abs(x-bounds.width)),ry=Math.max(Math.abs(y),Math.abs(y-bounds.height)));break;case"farthest-corner":if(shape===RADIAL_GRADIENT_SHAPE.CIRCLE)rx=ry=Math.max((0,_Util.distance)(x,y),(0,_Util.distance)(x,y-bounds.height),(0,_Util.distance)(x-bounds.width,y),(0,_Util.distance)(x-bounds.width,y-bounds.height));else if(shape===RADIAL_GRADIENT_SHAPE.ELLIPSE){var _c=Math.max(Math.abs(y),Math.abs(y-bounds.height))/Math.max(Math.abs(x),Math.abs(x-bounds.width)),_corner=findCorner(bounds,x,y,!1);rx=(0,_Util.distance)(_corner.x-x,(_corner.y-y)/_c),ry=_c*rx}break;default:rx=radius.x||0,ry=void 0!==radius.y?radius.y:rx}return{x:rx,y:ry}},transformWebkitRadialGradientArgs=exports.transformWebkitRadialGradientArgs=function(args){var shape="",radius="",extent="",position="",idx=0,POSITION=/^(left|center|right|\d+(?:px|r?em|%)?)(?:\s+(top|center|bottom|\d+(?:px|r?em|%)?))?$/i,SHAPE_AND_EXTENT=/^(circle|ellipse)?\s*(closest-side|closest-corner|farthest-side|farthest-corner|contain|cover)?$/i,RADIUS=/^\d+(px|r?em|%)?(?:\s+\d+(px|r?em|%)?)?$/i,matchStartPosition=args[idx].match(POSITION);matchStartPosition&&idx++;var matchShapeExtent=args[idx].match(SHAPE_AND_EXTENT);matchShapeExtent&&(shape=matchShapeExtent[1]||"",extent=matchShapeExtent[2]||"","contain"===extent?extent="closest-side":"cover"===extent&&(extent="farthest-corner"),idx++);var matchStartRadius=args[idx].match(RADIUS);matchStartRadius&&idx++;var matchEndPosition=args[idx].match(POSITION);matchEndPosition&&idx++;var matchEndRadius=args[idx].match(RADIUS);matchEndRadius&&idx++;var matchPosition=matchEndPosition||matchStartPosition;matchPosition&&matchPosition[1]&&(position=matchPosition[1]+(/^\d+$/.test(matchPosition[1])?"px":""),matchPosition[2]&&(position+=" "+matchPosition[2]+(/^\d+$/.test(matchPosition[2])?"px":"")));var matchRadius=matchEndRadius||matchStartRadius;return matchRadius&&(radius=matchRadius[0],matchRadius[1]||(radius+="px")),!position||shape||radius||extent||(radius=position,position=""),position&&(position="at "+position),[[shape,extent,radius,position].filter(function(s){return!!s}).join(" ")].concat(args.slice(idx))},transformObsoleteColorStops=function(args){return args.map(function(color){return color.match(FROM_TO_COLORSTOP)}).map(function(v,index){if(!v)return args[index];switch(v[1]){case"from":return v[4]+" 0%";case"to":return v[4]+" 100%";case"color-stop":return"%"===v[3]?v[4]+" "+v[2]:v[4]+" "+100*parseFloat(v[2])+"%"}})}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var ANGLE=/([+-]?\d*\.?\d+)(deg|grad|rad|turn)/i;exports.parseAngle=function(angle){var match=angle.match(ANGLE);if(match){var value=parseFloat(match[1]);switch(match[2].toLowerCase()){case"deg":return Math.PI*value/180;case"grad":return Math.PI/200*value;case"rad":return value;case"turn":return 2*Math.PI*value}}return null}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.cloneWindow=exports.DocumentCloner=void 0;var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_Bounds=__webpack_require__(2),_Proxy=__webpack_require__(26),_ResourceLoader=__webpack_require__(55),_ResourceLoader2=_interopRequireDefault(_ResourceLoader),_Util=__webpack_require__(4),_background=__webpack_require__(5),_CanvasRenderer=__webpack_require__(15),_CanvasRenderer2=_interopRequireDefault(_CanvasRenderer),_PseudoNodeContent=__webpack_require__(56),DocumentCloner=exports.DocumentCloner=function(){function DocumentCloner(element,options,logger,copyInline,renderer){_classCallCheck(this,DocumentCloner),this.referenceElement=element,this.scrolledElements=[],this.copyStyles=copyInline,this.inlineImages=copyInline,this.logger=logger,this.options=options,this.renderer=renderer,this.resourceLoader=new _ResourceLoader2.default(options,logger,window),this.pseudoContentData={counters:{},quoteDepth:0},this.documentElement=this.cloneNode(element.ownerDocument.documentElement)}return _createClass(DocumentCloner,[{key:"inlineAllImages",value:function(node){var _this=this;if(this.inlineImages&&node){var style=node.style;Promise.all((0,_background.parseBackgroundImage)(style.backgroundImage).map(function(backgroundImage){return"url"===backgroundImage.method?_this.resourceLoader.inlineImage(backgroundImage.args[0]).then(function(img){return img&&"string"==typeof img.src?'url("'+img.src+'")':"none"}).catch(function(e){_this.logger.log("Unable to load image",e)}):Promise.resolve(""+backgroundImage.prefix+backgroundImage.method+"("+backgroundImage.args.join(",")+")")})).then(function(backgroundImages){backgroundImages.length>1&&(style.backgroundColor=""),style.backgroundImage=backgroundImages.join(",")}),node instanceof HTMLImageElement&&this.resourceLoader.inlineImage(node.src).then(function(img){if(img&&node instanceof HTMLImageElement&&node.parentNode){var parentNode=node.parentNode,clonedChild=(0,_Util.copyCSSStyles)(node.style,img.cloneNode(!1));parentNode.replaceChild(clonedChild,node)}}).catch(function(e){_this.logger.log("Unable to load image",e)})}}},{key:"inlineFonts",value:function(document){var _this2=this;return Promise.all(Array.from(document.styleSheets).map(function(sheet){return sheet.href?fetch(sheet.href).then(function(res){return res.text()}).then(function(text){return createStyleSheetFontsFromText(text,sheet.href)}).catch(function(e){return _this2.logger.log("Unable to load stylesheet",e),[]}):getSheetFonts(sheet,document)})).then(function(fonts){return fonts.reduce(function(acc,font){return acc.concat(font)},[])}).then(function(fonts){return Promise.all(fonts.map(function(font){return fetch(font.formats[0].src).then(function(response){return response.blob()}).then(function(blob){return new Promise(function(resolve,reject){var reader=new FileReader;reader.onerror=reject,reader.onload=function(){var result=reader.result;resolve(result)},reader.readAsDataURL(blob)})}).then(function(dataUri){return font.fontFace.setProperty("src",'url("'+dataUri+'")'),"@font-face {"+font.fontFace.cssText+" "})}))}).then(function(fontCss){var style=document.createElement("style");style.textContent=fontCss.join("\n"),_this2.documentElement.appendChild(style)})}},{key:"createElementClone",value:function(node){var _this3=this;if(this.copyStyles&&node instanceof HTMLCanvasElement){var img=node.ownerDocument.createElement("img");try{return img.src=node.toDataURL(),img}catch(e){this.logger.log("Unable to clone canvas contents, canvas is tainted")}}if(node instanceof HTMLIFrameElement){var tempIframe=node.cloneNode(!1),iframeKey=generateIframeKey();tempIframe.setAttribute("data-html2canvas-internal-iframe-key",iframeKey);var _parseBounds=(0,_Bounds.parseBounds)(node,0,0),width=_parseBounds.width,height=_parseBounds.height;return this.resourceLoader.cache[iframeKey]=getIframeDocumentElement(node,this.options).then(function(documentElement){return _this3.renderer(documentElement,{async:_this3.options.async,allowTaint:_this3.options.allowTaint,backgroundColor:"#ffffff",canvas:null,imageTimeout:_this3.options.imageTimeout,logging:_this3.options.logging,proxy:_this3.options.proxy,removeContainer:_this3.options.removeContainer,scale:_this3.options.scale,foreignObjectRendering:_this3.options.foreignObjectRendering,useCORS:_this3.options.useCORS,target:new _CanvasRenderer2.default,width:width,height:height,x:0,y:0,windowWidth:documentElement.ownerDocument.defaultView.innerWidth,windowHeight:documentElement.ownerDocument.defaultView.innerHeight,scrollX:documentElement.ownerDocument.defaultView.pageXOffset,scrollY:documentElement.ownerDocument.defaultView.pageYOffset},_this3.logger.child(iframeKey))}).then(function(canvas){return new Promise(function(resolve,reject){var iframeCanvas=document.createElement("img");iframeCanvas.onload=function(){return resolve(canvas)},iframeCanvas.onerror=reject,iframeCanvas.src=canvas.toDataURL(),tempIframe.parentNode&&tempIframe.parentNode.replaceChild((0,_Util.copyCSSStyles)(node.ownerDocument.defaultView.getComputedStyle(node),iframeCanvas),tempIframe)})}),tempIframe}if(node instanceof HTMLStyleElement&&node.sheet&&node.sheet.cssRules){var css=[].slice.call(node.sheet.cssRules,0).reduce(function(css,rule){try{return rule&&rule.cssText?css+rule.cssText:css}catch(err){return _this3.logger.log("Unable to access cssText property",rule.name),css}},""),style=node.cloneNode(!1);return style.textContent=css,style}return node.cloneNode(!1)}},{key:"cloneNode",value:function(node){var clone=node.nodeType===Node.TEXT_NODE?document.createTextNode(node.nodeValue):this.createElementClone(node),window=node.ownerDocument.defaultView,style=node instanceof window.HTMLElement?window.getComputedStyle(node):null,styleBefore=node instanceof window.HTMLElement?window.getComputedStyle(node,":before"):null,styleAfter=node instanceof window.HTMLElement?window.getComputedStyle(node,":after"):null;this.referenceElement===node&&clone instanceof window.HTMLElement&&(this.clonedReferenceElement=clone),clone instanceof window.HTMLBodyElement&&createPseudoHideStyles(clone);for(var counters=(0,_PseudoNodeContent.parseCounterReset)(style,this.pseudoContentData),contentBefore=(0,_PseudoNodeContent.resolvePseudoContent)(node,styleBefore,this.pseudoContentData),child=node.firstChild;child;child=child.nextSibling)child.nodeType===Node.ELEMENT_NODE&&("SCRIPT"===child.nodeName||child.hasAttribute("data-html2canvas-ignore")||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(child))||this.copyStyles&&"STYLE"===child.nodeName||clone.appendChild(this.cloneNode(child));var contentAfter=(0,_PseudoNodeContent.resolvePseudoContent)(node,styleAfter,this.pseudoContentData);if((0,_PseudoNodeContent.popCounters)(counters,this.pseudoContentData),node instanceof window.HTMLElement&&clone instanceof window.HTMLElement)switch(styleBefore&&this.inlineAllImages(inlinePseudoElement(node,clone,styleBefore,contentBefore,PSEUDO_BEFORE)),styleAfter&&this.inlineAllImages(inlinePseudoElement(node,clone,styleAfter,contentAfter,PSEUDO_AFTER)),!style||!this.copyStyles||node instanceof HTMLIFrameElement||(0,_Util.copyCSSStyles)(style,clone),this.inlineAllImages(clone),0===node.scrollTop&&0===node.scrollLeft||this.scrolledElements.push([clone,node.scrollLeft,node.scrollTop]),node.nodeName){case"CANVAS":this.copyStyles||cloneCanvasContents(node,clone);break;case"TEXTAREA":case"SELECT":clone.value=node.value}return clone}}]),DocumentCloner}(),getSheetFonts=function(sheet,document){return(sheet.cssRules?Array.from(sheet.cssRules):[]).filter(function(rule){return rule.type===CSSRule.FONT_FACE_RULE}).map(function(rule){for(var src=(0,_background.parseBackgroundImage)(rule.style.getPropertyValue("src")),formats=[],i=0;i<src.length;i++)if("url"===src[i].method&&src[i+1]&&"format"===src[i+1].method){var a=document.createElement("a");a.href=src[i].args[0],document.body&&document.body.appendChild(a);var font={src:a.href,format:src[i+1].args[0]};formats.push(font)}return{formats:formats.filter(function(font){return/^woff/i.test(font.format)}),fontFace:rule.style}}).filter(function(font){return font.formats.length})},createStyleSheetFontsFromText=function(text,baseHref){var doc=document.implementation.createHTMLDocument(""),base=document.createElement("base");base.href=baseHref;var style=document.createElement("style");return style.textContent=text,doc.head&&doc.head.appendChild(base),doc.body&&doc.body.appendChild(style),style.sheet?getSheetFonts(style.sheet,doc):[]},restoreOwnerScroll=function(ownerDocument,x,y){!ownerDocument.defaultView||x===ownerDocument.defaultView.pageXOffset&&y===ownerDocument.defaultView.pageYOffset||ownerDocument.defaultView.scrollTo(x,y)},cloneCanvasContents=function(canvas,clonedCanvas){try{if(clonedCanvas){clonedCanvas.width=canvas.width,clonedCanvas.height=canvas.height;var ctx=canvas.getContext("2d"),clonedCtx=clonedCanvas.getContext("2d");ctx?clonedCtx.putImageData(ctx.getImageData(0,0,canvas.width,canvas.height),0,0):clonedCtx.drawImage(canvas,0,0)}}catch(e){}},inlinePseudoElement=function(node,clone,style,contentItems,pseudoElt){if(style&&style.content&&"none"!==style.content&&"-moz-alt-content"!==style.content&&"none"!==style.display){var anonymousReplacedElement=clone.ownerDocument.createElement("html2canvaspseudoelement");if((0,_Util.copyCSSStyles)(style,anonymousReplacedElement),contentItems)for(var len=contentItems.length,i=0;i<len;i++){var item=contentItems[i];switch(item.type){case _PseudoNodeContent.PSEUDO_CONTENT_ITEM_TYPE.IMAGE:var img=clone.ownerDocument.createElement("img");img.src=(0,_background.parseBackgroundImage)("url("+item.value+")")[0].args[0],img.style.opacity="1",anonymousReplacedElement.appendChild(img);break;case _PseudoNodeContent.PSEUDO_CONTENT_ITEM_TYPE.TEXT:anonymousReplacedElement.appendChild(clone.ownerDocument.createTextNode(item.value))}}return anonymousReplacedElement.className=PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+" "+PSEUDO_HIDE_ELEMENT_CLASS_AFTER,clone.className+=pseudoElt===PSEUDO_BEFORE?" "+PSEUDO_HIDE_ELEMENT_CLASS_BEFORE:" "+PSEUDO_HIDE_ELEMENT_CLASS_AFTER,pseudoElt===PSEUDO_BEFORE?clone.insertBefore(anonymousReplacedElement,clone.firstChild):clone.appendChild(anonymousReplacedElement),anonymousReplacedElement}},PSEUDO_BEFORE=":before",PSEUDO_AFTER=":after",PSEUDO_HIDE_ELEMENT_CLASS_BEFORE="___html2canvas___pseudoelement_before",PSEUDO_HIDE_ELEMENT_CLASS_AFTER="___html2canvas___pseudoelement_after",createPseudoHideStyles=function(body){createStyles(body,"."+PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+PSEUDO_BEFORE+'{\n content: "" !important;\n display: none !important;\n}\n .'+PSEUDO_HIDE_ELEMENT_CLASS_AFTER+PSEUDO_AFTER+'{\n content: "" !important;\n display: none !important;\n}')},createStyles=function(body,styles){var style=body.ownerDocument.createElement("style");style.innerHTML=styles,body.appendChild(style)},initNode=function(_ref){var _ref2=_slicedToArray(_ref,3),element=_ref2[0],x=_ref2[1],y=_ref2[2];element.scrollLeft=x,element.scrollTop=y},generateIframeKey=function(){return Math.ceil(Date.now()+1e7*Math.random()).toString(16)},DATA_URI_REGEXP=/^data:text\/(.+);(base64)?,(.*)$/i,getIframeDocumentElement=function(node,options){try{return Promise.resolve(node.contentWindow.document.documentElement)}catch(e){return options.proxy?(0,_Proxy.Proxy)(node.src,options).then(function(html){var match=html.match(DATA_URI_REGEXP);return match?"base64"===match[2]?window.atob(decodeURIComponent(match[3])):decodeURIComponent(match[3]):Promise.reject()}).then(function(html){return createIframeContainer(node.ownerDocument,(0,_Bounds.parseBounds)(node,0,0)).then(function(cloneIframeContainer){var cloneWindow=cloneIframeContainer.contentWindow,documentClone=cloneWindow.document;documentClone.open(),documentClone.write(html);var iframeLoad=iframeLoader(cloneIframeContainer).then(function(){return documentClone.documentElement});return documentClone.close(),iframeLoad})}):Promise.reject()}},createIframeContainer=function(ownerDocument,bounds){var cloneIframeContainer=ownerDocument.createElement("iframe");return cloneIframeContainer.className="html2canvas-container",cloneIframeContainer.style.visibility="hidden",cloneIframeContainer.style.position="fixed",cloneIframeContainer.style.left="-10000px",cloneIframeContainer.style.top="0px",cloneIframeContainer.style.border="0",cloneIframeContainer.width=bounds.width.toString(),cloneIframeContainer.height=bounds.height.toString(),cloneIframeContainer.scrolling="no",cloneIframeContainer.setAttribute("data-html2canvas-ignore","true"),ownerDocument.body?(ownerDocument.body.appendChild(cloneIframeContainer),Promise.resolve(cloneIframeContainer)):Promise.reject("Body element not found in Document that is getting rendered")},iframeLoader=function(cloneIframeContainer){var cloneWindow=cloneIframeContainer.contentWindow,documentClone=cloneWindow.document;return new Promise(function(resolve,reject){cloneWindow.onload=cloneIframeContainer.onload=documentClone.onreadystatechange=function(){var interval=setInterval(function(){documentClone.body.childNodes.length>0&&"complete"===documentClone.readyState&&(clearInterval(interval),resolve(cloneIframeContainer))},50)}})},serializeDoctype=(exports.cloneWindow=function(ownerDocument,bounds,referenceElement,options,logger,renderer){var cloner=new DocumentCloner(referenceElement,options,logger,!1,renderer),scrollX=ownerDocument.defaultView.pageXOffset,scrollY=ownerDocument.defaultView.pageYOffset;return createIframeContainer(ownerDocument,bounds).then(function(cloneIframeContainer){var cloneWindow=cloneIframeContainer.contentWindow,documentClone=cloneWindow.document,iframeLoad=iframeLoader(cloneIframeContainer).then(function(){cloner.scrolledElements.forEach(initNode),cloneWindow.scrollTo(bounds.left,bounds.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||cloneWindow.scrollY===bounds.top&&cloneWindow.scrollX===bounds.left||(documentClone.documentElement.style.top=-bounds.top+"px",documentClone.documentElement.style.left=-bounds.left+"px",documentClone.documentElement.style.position="absolute");var result=Promise.resolve([cloneIframeContainer,cloner.clonedReferenceElement,cloner.resourceLoader]),onclone=options.onclone;return cloner.clonedReferenceElement instanceof cloneWindow.HTMLElement||cloner.clonedReferenceElement instanceof ownerDocument.defaultView.HTMLElement||cloner.clonedReferenceElement instanceof HTMLElement?"function"==typeof onclone?Promise.resolve().then(function(){return onclone(documentClone)}).then(function(){return result}):result:Promise.reject("Error finding the "+referenceElement.nodeName+" in the cloned document")});return documentClone.open(),documentClone.write(serializeDoctype(document.doctype)+"<html></html>"),restoreOwnerScroll(referenceElement.ownerDocument,scrollX,scrollY),documentClone.replaceChild(documentClone.adoptNode(cloner.documentElement),documentClone.documentElement),documentClone.close(),iframeLoad})},function(doctype){var str="";return doctype&&(str+="<!DOCTYPE ",doctype.name&&(str+=doctype.name),doctype.internalSubset&&(str+=doctype.internalSubset),doctype.publicId&&(str+='"'+doctype.publicId+'"'),doctype.systemId&&(str+='"'+doctype.systemId+'"'),str+=">"),str})},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.ResourceStore=void 0;var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_Feature=__webpack_require__(10),_Feature2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_Feature),_Proxy=__webpack_require__(26),ResourceLoader=function(){function ResourceLoader(options,logger,window){_classCallCheck(this,ResourceLoader),this.options=options,this._window=window,this.origin=this.getOrigin(window.location.href),this.cache={},this.logger=logger,this._index=0}return _createClass(ResourceLoader,[{key:"loadImage",value:function(src){var _this=this;if(this.hasResourceInCache(src))return src;if(isBlobImage(src))return this.cache[src]=_loadImage(src,this.options.imageTimeout||0),src;if(!isSVG(src)||_Feature2.default.SUPPORT_SVG_DRAWING){if(!0===this.options.allowTaint||isInlineImage(src)||this.isSameOrigin(src))return this.addImage(src,src,!1);if(!this.isSameOrigin(src)){if("string"==typeof this.options.proxy)return this.cache[src]=(0,_Proxy.Proxy)(src,this.options).then(function(src){return _loadImage(src,_this.options.imageTimeout||0)}),src;if(!0===this.options.useCORS&&_Feature2.default.SUPPORT_CORS_IMAGES)return this.addImage(src,src,!0)}}}},{key:"inlineImage",value:function(src){var _this2=this;return isInlineImage(src)?_loadImage(src,this.options.imageTimeout||0):this.hasResourceInCache(src)?this.cache[src]:this.isSameOrigin(src)||"string"!=typeof this.options.proxy?this.xhrImage(src):this.cache[src]=(0,_Proxy.Proxy)(src,this.options).then(function(src){return _loadImage(src,_this2.options.imageTimeout||0)})}},{key:"xhrImage",value:function(src){var _this3=this;return this.cache[src]=new Promise(function(resolve,reject){var xhr=new XMLHttpRequest;if(xhr.onreadystatechange=function(){if(4===xhr.readyState)if(200!==xhr.status)reject("Failed to fetch image "+src.substring(0,256)+" with status code "+xhr.status);else{var reader=new FileReader;reader.addEventListener("load",function(){var result=reader.result;resolve(result)},!1),reader.addEventListener("error",function(e){return reject(e)},!1),reader.readAsDataURL(xhr.response)}},xhr.responseType="blob",_this3.options.imageTimeout){var timeout=_this3.options.imageTimeout;xhr.timeout=timeout,xhr.ontimeout=function(){return reject("Timed out ("+timeout+"ms) fetching "+src.substring(0,256))}}xhr.open("GET",src,!0),xhr.send()}).then(function(src){return _loadImage(src,_this3.options.imageTimeout||0)}),this.cache[src]}},{key:"loadCanvas",value:function(node){var key=String(this._index++);return this.cache[key]=Promise.resolve(node),key}},{key:"hasResourceInCache",value:function(key){return void 0!==this.cache[key]}},{key:"addImage",value:function(key,src,useCORS){var _this4=this;this.logger.log("Added image "+key.substring(0,256));var imageLoadHandler=function(supportsDataImages){return new Promise(function(resolve,reject){var img=new Image;if(img.onload=function(){return resolve(img)},supportsDataImages&&!useCORS||(img.crossOrigin="anonymous"),img.onerror=reject,img.src=src,!0===img.complete&&setTimeout(function(){resolve(img)},500),_this4.options.imageTimeout){var timeout=_this4.options.imageTimeout;setTimeout(function(){return reject("Timed out ("+timeout+"ms) fetching "+src.substring(0,256))},timeout)}})};return this.cache[key]=isInlineBase64Image(src)&&!isSVG(src)?_Feature2.default.SUPPORT_BASE64_DRAWING(src).then(imageLoadHandler):imageLoadHandler(!0),key}},{key:"isSameOrigin",value:function(url){return this.getOrigin(url)===this.origin}},{key:"getOrigin",value:function(url){var link=this._link||(this._link=this._window.document.createElement("a"));return link.href=url,link.href=link.href,link.protocol+link.hostname+link.port}},{key:"ready",value:function(){var _this5=this,keys=Object.keys(this.cache),values=keys.map(function(str){return _this5.cache[str].catch(function(e){return _this5.logger.log("Unable to load image",e),null})});return Promise.all(values).then(function(images){return _this5.logger.log("Finished loading "+images.length+" images",images),new ResourceStore(keys,images)})}}]),ResourceLoader}();exports.default=ResourceLoader;var ResourceStore=exports.ResourceStore=function(){function ResourceStore(keys,resources){_classCallCheck(this,ResourceStore),this._keys=keys,this._resources=resources}return _createClass(ResourceStore,[{key:"get",value:function(key){var index=this._keys.indexOf(key);return-1===index?null:this._resources[index]}}]),ResourceStore}(),INLINE_SVG=/^data:image\/svg\+xml/i,INLINE_BASE64=/^data:image\/.*;base64,/i,INLINE_IMG=/^data:image\/.*/i,isInlineImage=function(src){return INLINE_IMG.test(src)},isInlineBase64Image=function(src){return INLINE_BASE64.test(src)},isBlobImage=function(src){return"blob"===src.substr(0,4)},isSVG=function(src){return"svg"===src.substr(-3).toLowerCase()||INLINE_SVG.test(src)},_loadImage=function(src,timeout){return new Promise(function(resolve,reject){var img=new Image;img.onload=function(){return resolve(img)},img.onerror=reject,img.src=src,!0===img.complete&&setTimeout(function(){resolve(img)},500),timeout&&setTimeout(function(){return reject("Timed out ("+timeout+"ms) loading image")},timeout)})}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.parseContent=exports.resolvePseudoContent=exports.popCounters=exports.parseCounterReset=exports.TOKEN_TYPE=exports.PSEUDO_CONTENT_ITEM_TYPE=void 0;var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_ListItem=__webpack_require__(14),_listStyle=__webpack_require__(8),PSEUDO_CONTENT_ITEM_TYPE=exports.PSEUDO_CONTENT_ITEM_TYPE={TEXT:0,IMAGE:1},TOKEN_TYPE=exports.TOKEN_TYPE={STRING:0,ATTRIBUTE:1,URL:2,COUNTER:3,COUNTERS:4,OPENQUOTE:5,CLOSEQUOTE:6},parseContent=(exports.parseCounterReset=function(style,data){if(!style||!style.counterReset||"none"===style.counterReset)return[];for(var counterNames=[],counterResets=style.counterReset.split(/\s*,\s*/),lenCounterResets=counterResets.length,i=0;i<lenCounterResets;i++){var _counterResets$i$spli=counterResets[i].split(/\s+/),_counterResets$i$spli2=_slicedToArray(_counterResets$i$spli,2),counterName=_counterResets$i$spli2[0],initialValue=_counterResets$i$spli2[1];counterNames.push(counterName);var counter=data.counters[counterName];counter||(counter=data.counters[counterName]=[]),counter.push(parseInt(initialValue||0,10))}return counterNames},exports.popCounters=function(counterNames,data){for(var lenCounters=counterNames.length,i=0;i<lenCounters;i++)data.counters[counterNames[i]].pop()},exports.resolvePseudoContent=function(node,style,data){if(!style||!style.content||"none"===style.content||"-moz-alt-content"===style.content||"none"===style.display)return null;var tokens=parseContent(style.content),len=tokens.length,contentItems=[],s="",counterIncrement=style.counterIncrement;if(counterIncrement&&"none"!==counterIncrement){var _counterIncrement$spl=counterIncrement.split(/\s+/),_counterIncrement$spl2=_slicedToArray(_counterIncrement$spl,2),counterName=_counterIncrement$spl2[0],incrementValue=_counterIncrement$spl2[1],counter=data.counters[counterName];counter&&(counter[counter.length-1]+=void 0===incrementValue?1:parseInt(incrementValue,10))}for(var i=0;i<len;i++){var token=tokens[i];switch(token.type){case TOKEN_TYPE.STRING:s+=token.value||"";break;case TOKEN_TYPE.ATTRIBUTE:node instanceof HTMLElement&&token.value&&(s+=node.getAttribute(token.value)||"");break;case TOKEN_TYPE.COUNTER:var _counter=data.counters[token.name||""];_counter&&(s+=formatCounterValue([_counter[_counter.length-1]],"",token.format));break;case TOKEN_TYPE.COUNTERS:var _counters=data.counters[token.name||""];_counters&&(s+=formatCounterValue(_counters,token.glue,token.format));break;case TOKEN_TYPE.OPENQUOTE:s+=getQuote(style,!0,data.quoteDepth),data.quoteDepth++;break;case TOKEN_TYPE.CLOSEQUOTE:data.quoteDepth--,s+=getQuote(style,!1,data.quoteDepth);break;case TOKEN_TYPE.URL:s&&(contentItems.push({type:PSEUDO_CONTENT_ITEM_TYPE.TEXT,value:s}),s=""),contentItems.push({type:PSEUDO_CONTENT_ITEM_TYPE.IMAGE,value:token.value||""})}}return s&&contentItems.push({type:PSEUDO_CONTENT_ITEM_TYPE.TEXT,value:s}),contentItems},exports.parseContent=function(content,cache){if(cache&&cache[content])return cache[content];for(var tokens=[],len=content.length,isString=!1,isEscaped=!1,isFunction=!1,str="",functionName="",args=[],i=0;i<len;i++){var c=content.charAt(i);switch(c){case"'":case'"':isEscaped?str+=c:(isString=!isString,isFunction||isString||(tokens.push({type:TOKEN_TYPE.STRING,value:str}),str=""));break;case"\\":isEscaped?(str+=c,isEscaped=!1):isEscaped=!0;break;case"(":isString?str+=c:(isFunction=!0,functionName=str,str="",args=[]);break;case")":if(isString)str+=c;else if(isFunction){switch(str&&args.push(str),functionName){case"attr":args.length>0&&tokens.push({type:TOKEN_TYPE.ATTRIBUTE,value:args[0]});break;case"counter":if(args.length>0){var counter={type:TOKEN_TYPE.COUNTER,name:args[0]};args.length>1&&(counter.format=args[1]),tokens.push(counter)}break;case"counters":if(args.length>0){var _counters2={type:TOKEN_TYPE.COUNTERS,name:args[0]};args.length>1&&(_counters2.glue=args[1]),args.length>2&&(_counters2.format=args[2]),tokens.push(_counters2)}break;case"url":args.length>0&&tokens.push({type:TOKEN_TYPE.URL,value:args[0]})}isFunction=!1,str=""}break;case",":isString?str+=c:isFunction&&(args.push(str),str="");break;case" ":case"\t":isString?str+=c:str&&(addOtherToken(tokens,str),str="");break;default:str+=c}"\\"!==c&&(isEscaped=!1)}return str&&addOtherToken(tokens,str),cache&&(cache[content]=tokens),tokens}),addOtherToken=function(tokens,identifier){switch(identifier){case"open-quote":tokens.push({type:TOKEN_TYPE.OPENQUOTE});break;case"close-quote":tokens.push({type:TOKEN_TYPE.CLOSEQUOTE})}},getQuote=function(style,isOpening,quoteDepth){var quotes=style.quotes?style.quotes.split(/\s+/):["'\"'","'\"'"],idx=2*quoteDepth;return idx>=quotes.length&&(idx=quotes.length-2),isOpening||++idx,quotes[idx].replace(/^["']|["']$/g,"")},formatCounterValue=function(counter,glue,format){for(var len=counter.length,result="",i=0;i<len;i++)i>0&&(result+=glue||""),result+=(0,_ListItem.createCounterText)(counter[i],(0,_listStyle.parseListStyleType)(format||"decimal"),!1);return result}}])})},function(module,exports,__webpack_require__){(function(global){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;!function(factory){var root="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global;__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(8),__webpack_require__(10),exports],void 0!==(__WEBPACK_AMD_DEFINE_RESULT__=function(_,$,exports){root.Backbone=factory(root,exports,_,$)}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__))&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)}(function(root,Backbone,_,$){var previousBackbone=root.Backbone,slice=Array.prototype.slice;Backbone.VERSION="1.3.3",Backbone.$=$,Backbone.noConflict=function(){return root.Backbone=previousBackbone,this},Backbone.emulateHTTP=!1,Backbone.emulateJSON=!1;var addMethod=function(length,method,attribute){switch(length){case 1:return function(){return _[method](this[attribute])};case 2:return function(value){return _[method](this[attribute],value)};case 3:return function(iteratee,context){return _[method](this[attribute],cb(iteratee,this),context)};case 4:return function(iteratee,defaultVal,context){return _[method](this[attribute],cb(iteratee,this),defaultVal,context)};default:return function(){var args=slice.call(arguments);return args.unshift(this[attribute]),_[method].apply(_,args)}}},addUnderscoreMethods=function(Class,methods,attribute){_.each(methods,function(length,method){_[method]&&(Class.prototype[method]=addMethod(length,method,attribute))})},cb=function(iteratee,instance){return _.isFunction(iteratee)?iteratee:_.isObject(iteratee)&&!instance._isModel(iteratee)?modelMatcher(iteratee):_.isString(iteratee)?function(model){return model.get(iteratee)}:iteratee},modelMatcher=function(attrs){var matcher=_.matches(attrs);return function(model){return matcher(model.attributes)}},Events=Backbone.Events={},eventSplitter=/\s+/,eventsApi=function(iteratee,events,name,callback,opts){var names,i=0;if(name&&"object"==typeof name){void 0!==callback&&"context"in opts&&void 0===opts.context&&(opts.context=callback);for(names=_.keys(name);i<names.length;i++)events=eventsApi(iteratee,events,names[i],name[names[i]],opts)}else if(name&&eventSplitter.test(name))for(names=name.split(eventSplitter);i<names.length;i++)events=iteratee(events,names[i],callback,opts);else events=iteratee(events,name,callback,opts);return events};Events.on=function(name,callback,context){return internalOn(this,name,callback,context)};var internalOn=function(obj,name,callback,context,listening){if(obj._events=eventsApi(onApi,obj._events||{},name,callback,{context:context,ctx:obj,listening:listening}),listening){(obj._listeners||(obj._listeners={}))[listening.id]=listening}return obj};Events.listenTo=function(obj,name,callback){if(!obj)return this;var id=obj._listenId||(obj._listenId=_.uniqueId("l")),listeningTo=this._listeningTo||(this._listeningTo={}),listening=listeningTo[id];if(!listening){var thisId=this._listenId||(this._listenId=_.uniqueId("l"));listening=listeningTo[id]={obj:obj,objId:id,id:thisId,listeningTo:listeningTo,count:0}}return internalOn(obj,name,callback,this,listening),this};var onApi=function(events,name,callback,options){if(callback){var handlers=events[name]||(events[name]=[]),context=options.context,ctx=options.ctx,listening=options.listening;listening&&listening.count++,handlers.push({callback:callback,context:context,ctx:context||ctx,listening:listening})}return events};Events.off=function(name,callback,context){return this._events?(this._events=eventsApi(offApi,this._events,name,callback,{context:context,listeners:this._listeners}),this):this},Events.stopListening=function(obj,name,callback){var listeningTo=this._listeningTo;if(!listeningTo)return this;for(var ids=obj?[obj._listenId]:_.keys(listeningTo),i=0;i<ids.length;i++){var listening=listeningTo[ids[i]];if(!listening)break;listening.obj.off(name,callback,this)}return this};var offApi=function(events,name,callback,options){if(events){var listening,i=0,context=options.context,listeners=options.listeners;if(name||callback||context){for(var names=name?[name]:_.keys(events);i<names.length;i++){name=names[i];var handlers=events[name];if(!handlers)break;for(var remaining=[],j=0;j<handlers.length;j++){var handler=handlers[j];callback&&callback!==handler.callback&&callback!==handler.callback._callback||context&&context!==handler.context?remaining.push(handler):(listening=handler.listening)&&0==--listening.count&&(delete listeners[listening.id],delete listening.listeningTo[listening.objId])}remaining.length?events[name]=remaining:delete events[name]}return events}for(var ids=_.keys(listeners);i<ids.length;i++)listening=listeners[ids[i]],delete listeners[listening.id],delete listening.listeningTo[listening.objId]}};Events.once=function(name,callback,context){var events=eventsApi(onceMap,{},name,callback,_.bind(this.off,this));return"string"==typeof name&&null==context&&(callback=void 0),this.on(events,callback,context)},Events.listenToOnce=function(obj,name,callback){var events=eventsApi(onceMap,{},name,callback,_.bind(this.stopListening,this,obj));return this.listenTo(obj,events)};var onceMap=function(map,name,callback,offer){if(callback){var once=map[name]=_.once(function(){offer(name,once),callback.apply(this,arguments)});once._callback=callback}return map};Events.trigger=function(name){if(!this._events)return this;for(var length=Math.max(0,arguments.length-1),args=Array(length),i=0;i<length;i++)args[i]=arguments[i+1];return eventsApi(triggerApi,this._events,name,void 0,args),this};var triggerApi=function(objEvents,name,callback,args){if(objEvents){var events=objEvents[name],allEvents=objEvents.all;events&&allEvents&&(allEvents=allEvents.slice()),events&&triggerEvents(events,args),allEvents&&triggerEvents(allEvents,[name].concat(args))}return objEvents},triggerEvents=function(events,args){var ev,i=-1,l=events.length,a1=args[0],a2=args[1],a3=args[2];switch(args.length){case 0:for(;++i<l;)(ev=events[i]).callback.call(ev.ctx);return;case 1:for(;++i<l;)(ev=events[i]).callback.call(ev.ctx,a1);return;case 2:for(;++i<l;)(ev=events[i]).callback.call(ev.ctx,a1,a2);return;case 3:for(;++i<l;)(ev=events[i]).callback.call(ev.ctx,a1,a2,a3);return;default:for(;++i<l;)(ev=events[i]).callback.apply(ev.ctx,args);return}};Events.bind=Events.on,Events.unbind=Events.off,_.extend(Backbone,Events);var Model=Backbone.Model=function(attributes,options){var attrs=attributes||{};options||(options={}),this.cid=_.uniqueId(this.cidPrefix),this.attributes={},options.collection&&(this.collection=options.collection),options.parse&&(attrs=this.parse(attrs,options)||{});var defaults=_.result(this,"defaults");attrs=_.defaults(_.extend({},defaults,attrs),defaults),this.set(attrs,options),this.changed={},this.initialize.apply(this,arguments)};_.extend(Model.prototype,Events,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",initialize:function(){},toJSON:function(options){return _.clone(this.attributes)},sync:function(){return Backbone.sync.apply(this,arguments)},get:function(attr){return this.attributes[attr]},escape:function(attr){return _.escape(this.get(attr))},has:function(attr){return null!=this.get(attr)},matches:function(attrs){return!!_.iteratee(attrs,this)(this.attributes)},set:function(key,val,options){if(null==key)return this;var attrs;if("object"==typeof key?(attrs=key,options=val):(attrs={})[key]=val,options||(options={}),!this._validate(attrs,options))return!1;var unset=options.unset,silent=options.silent,changes=[],changing=this._changing;this._changing=!0,changing||(this._previousAttributes=_.clone(this.attributes),this.changed={});var current=this.attributes,changed=this.changed,prev=this._previousAttributes;for(var attr in attrs)val=attrs[attr],_.isEqual(current[attr],val)||changes.push(attr),_.isEqual(prev[attr],val)?delete changed[attr]:changed[attr]=val,unset?delete current[attr]:current[attr]=val;if(this.idAttribute in attrs&&(this.id=this.get(this.idAttribute)),!silent){changes.length&&(this._pending=options);for(var i=0;i<changes.length;i++)this.trigger("change:"+changes[i],this,current[changes[i]],options)}if(changing)return this;if(!silent)for(;this._pending;)options=this._pending,this._pending=!1,this.trigger("change",this,options);return this._pending=!1,this._changing=!1,this},unset:function(attr,options){return this.set(attr,void 0,_.extend({},options,{unset:!0}))},clear:function(options){var attrs={};for(var key in this.attributes)attrs[key]=void 0;return this.set(attrs,_.extend({},options,{unset:!0}))},hasChanged:function(attr){return null==attr?!_.isEmpty(this.changed):_.has(this.changed,attr)},changedAttributes:function(diff){if(!diff)return!!this.hasChanged()&&_.clone(this.changed);var old=this._changing?this._previousAttributes:this.attributes,changed={};for(var attr in diff){var val=diff[attr];_.isEqual(old[attr],val)||(changed[attr]=val)}return!!_.size(changed)&&changed},previous:function(attr){return null!=attr&&this._previousAttributes?this._previousAttributes[attr]:null},previousAttributes:function(){return _.clone(this._previousAttributes)},fetch:function(options){options=_.extend({parse:!0},options);var model=this,success=options.success;return options.success=function(resp){var serverAttrs=options.parse?model.parse(resp,options):resp;if(!model.set(serverAttrs,options))return!1;success&&success.call(options.context,model,resp,options),model.trigger("sync",model,resp,options)},wrapError(this,options),this.sync("read",this,options)},save:function(key,val,options){var attrs;null==key||"object"==typeof key?(attrs=key,options=val):(attrs={})[key]=val,options=_.extend({validate:!0,parse:!0},options);var wait=options.wait;if(attrs&&!wait){if(!this.set(attrs,options))return!1}else if(!this._validate(attrs,options))return!1;var model=this,success=options.success,attributes=this.attributes;options.success=function(resp){model.attributes=attributes;var serverAttrs=options.parse?model.parse(resp,options):resp;if(wait&&(serverAttrs=_.extend({},attrs,serverAttrs)),serverAttrs&&!model.set(serverAttrs,options))return!1;success&&success.call(options.context,model,resp,options),model.trigger("sync",model,resp,options)},wrapError(this,options),attrs&&wait&&(this.attributes=_.extend({},attributes,attrs));var method=this.isNew()?"create":options.patch?"patch":"update";"patch"!==method||options.attrs||(options.attrs=attrs);var xhr=this.sync(method,this,options);return this.attributes=attributes,xhr},destroy:function(options){options=options?_.clone(options):{};var model=this,success=options.success,wait=options.wait,destroy=function(){model.stopListening(),model.trigger("destroy",model,model.collection,options)};options.success=function(resp){wait&&destroy(),success&&success.call(options.context,model,resp,options),model.isNew()||model.trigger("sync",model,resp,options)};var xhr=!1;return this.isNew()?_.defer(options.success):(wrapError(this,options),xhr=this.sync("delete",this,options)),wait||destroy(),xhr},url:function(){var base=_.result(this,"urlRoot")||_.result(this.collection,"url")||urlError();if(this.isNew())return base;var id=this.get(this.idAttribute);return base.replace(/[^\/]$/,"$&/")+encodeURIComponent(id)},parse:function(resp,options){return resp},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(options){return this._validate({},_.extend({},options,{validate:!0}))},_validate:function(attrs,options){if(!options.validate||!this.validate)return!0;attrs=_.extend({},this.attributes,attrs);var error=this.validationError=this.validate(attrs,options)||null;return!error||(this.trigger("invalid",this,error,_.extend(options,{validationError:error})),!1)}}),addUnderscoreMethods(Model,{keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1},"attributes");var Collection=Backbone.Collection=function(models,options){options||(options={}),options.model&&(this.model=options.model),void 0!==options.comparator&&(this.comparator=options.comparator),this._reset(),this.initialize.apply(this,arguments),models&&this.reset(models,_.extend({silent:!0},options))},setOptions={add:!0,remove:!0,merge:!0},addOptions={add:!0,remove:!1},splice=function(array,insert,at){at=Math.min(Math.max(at,0),array.length);var i,tail=Array(array.length-at),length=insert.length;for(i=0;i<tail.length;i++)tail[i]=array[i+at];for(i=0;i<length;i++)array[i+at]=insert[i];for(i=0;i<tail.length;i++)array[i+length+at]=tail[i]};_.extend(Collection.prototype,Events,{model:Model,initialize:function(){},toJSON:function(options){return this.map(function(model){return model.toJSON(options)})},sync:function(){return Backbone.sync.apply(this,arguments)},add:function(models,options){return this.set(models,_.extend({merge:!1},options,addOptions))},remove:function(models,options){options=_.extend({},options);var singular=!_.isArray(models);models=singular?[models]:models.slice();var removed=this._removeModels(models,options);return!options.silent&&removed.length&&(options.changes={added:[],merged:[],removed:removed},this.trigger("update",this,options)),singular?removed[0]:removed},set:function(models,options){if(null!=models){options=_.extend({},setOptions,options),options.parse&&!this._isModel(models)&&(models=this.parse(models,options)||[]);var singular=!_.isArray(models);models=singular?[models]:models.slice();var at=options.at;null!=at&&(at=+at),at>this.length&&(at=this.length),at<0&&(at+=this.length+1);var model,i,set=[],toAdd=[],toMerge=[],toRemove=[],modelMap={},add=options.add,merge=options.merge,remove=options.remove,sort=!1,sortable=this.comparator&&null==at&&!1!==options.sort,sortAttr=_.isString(this.comparator)?this.comparator:null;for(i=0;i<models.length;i++){model=models[i];var existing=this.get(model);if(existing){if(merge&&model!==existing){var attrs=this._isModel(model)?model.attributes:model;options.parse&&(attrs=existing.parse(attrs,options)),existing.set(attrs,options),toMerge.push(existing),sortable&&!sort&&(sort=existing.hasChanged(sortAttr))}modelMap[existing.cid]||(modelMap[existing.cid]=!0,set.push(existing)),models[i]=existing}else add&&(model=models[i]=this._prepareModel(model,options))&&(toAdd.push(model),this._addReference(model,options),modelMap[model.cid]=!0,set.push(model))}if(remove){for(i=0;i<this.length;i++)model=this.models[i],modelMap[model.cid]||toRemove.push(model);toRemove.length&&this._removeModels(toRemove,options)}var orderChanged=!1,replace=!sortable&&add&&remove;if(set.length&&replace?(orderChanged=this.length!==set.length||_.some(this.models,function(m,index){return m!==set[index]}),this.models.length=0,splice(this.models,set,0),this.length=this.models.length):toAdd.length&&(sortable&&(sort=!0),splice(this.models,toAdd,null==at?this.length:at),this.length=this.models.length),sort&&this.sort({silent:!0}),!options.silent){for(i=0;i<toAdd.length;i++)null!=at&&(options.index=at+i),model=toAdd[i],model.trigger("add",model,this,options);(sort||orderChanged)&&this.trigger("sort",this,options),(toAdd.length||toRemove.length||toMerge.length)&&(options.changes={added:toAdd,removed:toRemove,merged:toMerge},this.trigger("update",this,options))}return singular?models[0]:models}},reset:function(models,options){options=options?_.clone(options):{};for(var i=0;i<this.models.length;i++)this._removeReference(this.models[i],options);return options.previousModels=this.models,this._reset(),models=this.add(models,_.extend({silent:!0},options)),options.silent||this.trigger("reset",this,options),models},push:function(model,options){return this.add(model,_.extend({at:this.length},options))},pop:function(options){var model=this.at(this.length-1);return this.remove(model,options)},unshift:function(model,options){return this.add(model,_.extend({at:0},options))},shift:function(options){var model=this.at(0);return this.remove(model,options)},slice:function(){return slice.apply(this.models,arguments)},get:function(obj){if(null!=obj)return this._byId[obj]||this._byId[this.modelId(obj.attributes||obj)]||obj.cid&&this._byId[obj.cid]},has:function(obj){return null!=this.get(obj)},at:function(index){return index<0&&(index+=this.length),this.models[index]},where:function(attrs,first){return this[first?"find":"filter"](attrs)},findWhere:function(attrs){return this.where(attrs,!0)},sort:function(options){var comparator=this.comparator;if(!comparator)throw new Error("Cannot sort a set without a comparator");options||(options={});var length=comparator.length;return _.isFunction(comparator)&&(comparator=_.bind(comparator,this)),1===length||_.isString(comparator)?this.models=this.sortBy(comparator):this.models.sort(comparator),options.silent||this.trigger("sort",this,options),this},pluck:function(attr){return this.map(attr+"")},fetch:function(options){options=_.extend({parse:!0},options);var success=options.success,collection=this;return options.success=function(resp){var method=options.reset?"reset":"set";collection[method](resp,options),success&&success.call(options.context,collection,resp,options),collection.trigger("sync",collection,resp,options)},wrapError(this,options),this.sync("read",this,options)},create:function(model,options){options=options?_.clone(options):{};var wait=options.wait;if(!(model=this._prepareModel(model,options)))return!1;wait||this.add(model,options);var collection=this,success=options.success;return options.success=function(m,resp,callbackOpts){wait&&collection.add(m,callbackOpts),success&&success.call(callbackOpts.context,m,resp,callbackOpts)},model.save(null,options),model},parse:function(resp,options){return resp},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(attrs){return attrs[this.model.prototype.idAttribute||"id"]},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(attrs,options){if(this._isModel(attrs))return attrs.collection||(attrs.collection=this),attrs;options=options?_.clone(options):{},options.collection=this;var model=new this.model(attrs,options);return model.validationError?(this.trigger("invalid",this,model.validationError,options),!1):model},_removeModels:function(models,options){for(var removed=[],i=0;i<models.length;i++){var model=this.get(models[i]);if(model){var index=this.indexOf(model);this.models.splice(index,1),this.length--,delete this._byId[model.cid];var id=this.modelId(model.attributes);null!=id&&delete this._byId[id],options.silent||(options.index=index,model.trigger("remove",model,this,options)),removed.push(model),this._removeReference(model,options)}}return removed},_isModel:function(model){return model instanceof Model},_addReference:function(model,options){this._byId[model.cid]=model;var id=this.modelId(model.attributes);null!=id&&(this._byId[id]=model),model.on("all",this._onModelEvent,this)},_removeReference:function(model,options){delete this._byId[model.cid];var id=this.modelId(model.attributes);null!=id&&delete this._byId[id],this===model.collection&&delete model.collection,model.off("all",this._onModelEvent,this)},_onModelEvent:function(event,model,collection,options){if(model){if(("add"===event||"remove"===event)&&collection!==this)return;if("destroy"===event&&this.remove(model,options),"change"===event){var prevId=this.modelId(model.previousAttributes()),id=this.modelId(model.attributes);prevId!==id&&(null!=prevId&&delete this._byId[prevId],null!=id&&(this._byId[id]=model))}}this.trigger.apply(this,arguments)}}),addUnderscoreMethods(Collection,{forEach:3,each:3,map:3,collect:3,reduce:0,foldl:0,inject:0,reduceRight:0,foldr:0,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3,findIndex:3,findLastIndex:3},"models");var View=Backbone.View=function(options){this.cid=_.uniqueId("view"),_.extend(this,_.pick(options,viewOptions)),this._ensureElement(),this.initialize.apply(this,arguments)},delegateEventSplitter=/^(\S+)\s*(.*)$/,viewOptions=["model","collection","el","id","attributes","className","tagName","events"];_.extend(View.prototype,Events,{tagName:"div",$:function(selector){return this.$el.find(selector)},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(element){return this.undelegateEvents(),this._setElement(element),this.delegateEvents(),this},_setElement:function(el){this.$el=el instanceof Backbone.$?el:Backbone.$(el),this.el=this.$el[0]},delegateEvents:function(events){if(events||(events=_.result(this,"events")),!events)return this;this.undelegateEvents();for(var key in events){var method=events[key];if(_.isFunction(method)||(method=this[method]),method){var match=key.match(delegateEventSplitter);this.delegate(match[1],match[2],_.bind(method,this))}}return this},delegate:function(eventName,selector,listener){return this.$el.on(eventName+".delegateEvents"+this.cid,selector,listener),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(eventName,selector,listener){return this.$el.off(eventName+".delegateEvents"+this.cid,selector,listener),this},_createElement:function(tagName){return document.createElement(tagName)},_ensureElement:function(){if(this.el)this.setElement(_.result(this,"el"));else{var attrs=_.extend({},_.result(this,"attributes"));this.id&&(attrs.id=_.result(this,"id")),this.className&&(attrs.class=_.result(this,"className")),this.setElement(this._createElement(_.result(this,"tagName"))),this._setAttributes(attrs)}},_setAttributes:function(attributes){this.$el.attr(attributes)}}),Backbone.sync=function(method,model,options){var type=methodMap[method];_.defaults(options||(options={}),{emulateHTTP:Backbone.emulateHTTP,emulateJSON:Backbone.emulateJSON});var params={type:type,dataType:"json"};if(options.url||(params.url=_.result(model,"url")||urlError()),null!=options.data||!model||"create"!==method&&"update"!==method&&"patch"!==method||(params.contentType="application/json",params.data=JSON.stringify(options.attrs||model.toJSON(options))),options.emulateJSON&&(params.contentType="application/x-www-form-urlencoded",params.data=params.data?{model:params.data}:{}),options.emulateHTTP&&("PUT"===type||"DELETE"===type||"PATCH"===type)){params.type="POST",options.emulateJSON&&(params.data._method=type);var beforeSend=options.beforeSend;options.beforeSend=function(xhr){if(xhr.setRequestHeader("X-HTTP-Method-Override",type),beforeSend)return beforeSend.apply(this,arguments)}}"GET"===params.type||options.emulateJSON||(params.processData=!1);var error=options.error;options.error=function(xhr,textStatus,errorThrown){options.textStatus=textStatus,options.errorThrown=errorThrown,error&&error.call(options.context,xhr,textStatus,errorThrown)};var xhr=options.xhr=Backbone.ajax(_.extend(params,options));return model.trigger("request",model,xhr,options),xhr};var methodMap={create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"};Backbone.ajax=function(){return Backbone.$.ajax.apply(Backbone.$,arguments)};var Router=Backbone.Router=function(options){options||(options={}),options.routes&&(this.routes=options.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},optionalParam=/\((.*?)\)/g,namedParam=/(\(\?)?:\w+/g,splatParam=/\*\w+/g,escapeRegExp=/[\-{}\[\]+?.,\\\^$|#\s]/g;_.extend(Router.prototype,Events,{initialize:function(){},route:function(route,name,callback){_.isRegExp(route)||(route=this._routeToRegExp(route)),_.isFunction(name)&&(callback=name,name=""),callback||(callback=this[name]);var router=this;return Backbone.history.route(route,function(fragment){var args=router._extractParameters(route,fragment);!1!==router.execute(callback,args,name)&&(router.trigger.apply(router,["route:"+name].concat(args)),router.trigger("route",name,args),Backbone.history.trigger("route",router,name,args))}),this},execute:function(callback,args,name){callback&&callback.apply(this,args)},navigate:function(fragment,options){return Backbone.history.navigate(fragment,options),this},_bindRoutes:function(){if(this.routes){this.routes=_.result(this,"routes");for(var route,routes=_.keys(this.routes);null!=(route=routes.pop());)this.route(route,this.routes[route])}},_routeToRegExp:function(route){return route=route.replace(escapeRegExp,"\\$&").replace(optionalParam,"(?:$1)?").replace(namedParam,function(match,optional){return optional?match:"([^/?]+)"}).replace(splatParam,"([^?]*?)"),new RegExp("^"+route+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(route,fragment){var params=route.exec(fragment).slice(1);return _.map(params,function(param,i){return i===params.length-1?param||null:param?decodeURIComponent(param):null})}});var History=Backbone.History=function(){this.handlers=[],this.checkUrl=_.bind(this.checkUrl,this),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},routeStripper=/^[#\/]|\s+$/g,rootStripper=/^\/+|\/+$/g,pathStripper=/#.*$/;History.started=!1,_.extend(History.prototype,Events,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root&&!this.getSearch()},matchRoot:function(){return this.decodeFragment(this.location.pathname).slice(0,this.root.length-1)+"/"===this.root},decodeFragment:function(fragment){return decodeURI(fragment.replace(/%25/g,"%2525"))},getSearch:function(){var match=this.location.href.replace(/#.*/,"").match(/\?.+/);return match?match[0]:""},getHash:function(window){var match=(window||this).location.href.match(/#(.*)$/);return match?match[1]:""},getPath:function(){var path=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===path.charAt(0)?path.slice(1):path},getFragment:function(fragment){return null==fragment&&(fragment=this._usePushState||!this._wantsHashChange?this.getPath():this.getHash()),fragment.replace(routeStripper,"")},start:function(options){if(History.started)throw new Error("Backbone.history has already been started");if(History.started=!0,this.options=_.extend({root:"/"},this.options,options),this.root=this.options.root,this._wantsHashChange=!1!==this.options.hashChange,this._hasHashChange="onhashchange"in window&&(void 0===document.documentMode||document.documentMode>7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(rootStripper,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var rootPath=this.root.slice(0,-1)||"/";return this.location.replace(rootPath+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var body=document.body,iWindow=body.insertBefore(this.iframe,body.firstChild).contentWindow;iWindow.document.open(),iWindow.document.close(),iWindow.location.hash="#"+this.fragment}var addEventListener=window.addEventListener||function(eventName,listener){return attachEvent("on"+eventName,listener)};if(this._usePushState?addEventListener("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?addEventListener("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var removeEventListener=window.removeEventListener||function(eventName,listener){return detachEvent("on"+eventName,listener)};this._usePushState?removeEventListener("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&removeEventListener("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),History.started=!1},route:function(route,callback){this.handlers.unshift({route:route,callback:callback})},checkUrl:function(e){var current=this.getFragment();if(current===this.fragment&&this.iframe&&(current=this.getHash(this.iframe.contentWindow)),current===this.fragment)return!1;this.iframe&&this.navigate(current),this.loadUrl()},loadUrl:function(fragment){return!!this.matchRoot()&&(fragment=this.fragment=this.getFragment(fragment),_.some(this.handlers,function(handler){if(handler.route.test(fragment))return handler.callback(fragment),!0}))},navigate:function(fragment,options){if(!History.started)return!1;options&&!0!==options||(options={trigger:!!options}),fragment=this.getFragment(fragment||"");var rootPath=this.root;""!==fragment&&"?"!==fragment.charAt(0)||(rootPath=rootPath.slice(0,-1)||"/");var url=rootPath+fragment;if(fragment=this.decodeFragment(fragment.replace(pathStripper,"")),this.fragment!==fragment){if(this.fragment=fragment,this._usePushState)this.history[options.replace?"replaceState":"pushState"]({},document.title,url);else{if(!this._wantsHashChange)return this.location.assign(url);if(this._updateHash(this.location,fragment,options.replace),this.iframe&&fragment!==this.getHash(this.iframe.contentWindow)){var iWindow=this.iframe.contentWindow;options.replace||(iWindow.document.open(),iWindow.document.close()),this._updateHash(iWindow.location,fragment,options.replace)}}return options.trigger?this.loadUrl(fragment):void 0}},_updateHash:function(location,fragment,replace){if(replace){var href=location.href.replace(/(javascript:|#).*$/,"");location.replace(href+"#"+fragment)}else location.hash="#"+fragment}}),Backbone.history=new History;var extend=function(protoProps,staticProps){var child,parent=this;return child=protoProps&&_.has(protoProps,"constructor")?protoProps.constructor:function(){return parent.apply(this,arguments)},_.extend(child,parent,staticProps),child.prototype=_.create(parent.prototype,protoProps),child.prototype.constructor=child,child.__super__=parent.prototype,child};Model.extend=Collection.extend=Router.extend=View.extend=History.extend=extend;var urlError=function(){throw new Error('A "url" property or function must be specified')},wrapError=function(model,options){var error=options.error;options.error=function(resp){error&&error.call(options.context,model,resp,options),model.trigger("error",model,resp,options)}};return Backbone})}).call(exports,__webpack_require__(9))},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}function createSVGBlurReconfirm(){var svgNS="http://www.w3.org/2000/svg",feGaussianBlur=document.createElementNS(svgNS,"feGaussianBlur");feGaussianBlur.setAttribute("stdDeviation","0.7");var filter=document.createElementNS(svgNS,"filter");filter.setAttribute("id","gaussian-blur"),filter.appendChild(feGaussianBlur);var svgElem=document.createElementNS(svgNS,"svg");svgElem.setAttribute("id","react-confirm-alert-firm-svg"),svgElem.setAttribute("class","react-confirm-alert-svg"),svgElem.appendChild(filter),document.body.appendChild(svgElem)}function removeSVGBlurReconfirm(){var svg=document.getElementById("react-confirm-alert-firm-svg");svg.parentNode.removeChild(svg),document.body.children[0].classList.remove("react-confirm-alert-blur")}function createElementReconfirm(properties){document.body.children[0].classList.add("react-confirm-alert-blur");var divTarget=document.createElement("div");divTarget.id="react-confirm-alert",document.body.appendChild(divTarget),_reactDom.render(_react2.default.createElement(ReactConfirmAlert,properties),divTarget)}function removeElementReconfirm(){var target=document.getElementById("react-confirm-alert");_reactDom.unmountComponentAtNode(target),target.parentNode.removeChild(target)}function confirmAlert(properties){createSVGBlurReconfirm(),createElementReconfirm(properties)}exports.__esModule=!0;var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}();exports.confirmAlert=confirmAlert;var _react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_reactDom=__webpack_require__(28),ReactConfirmAlert=function(_Component){function ReactConfirmAlert(){var _this=this;_classCallCheck(this,ReactConfirmAlert),_Component.apply(this,arguments),this.onClickConfirm=function(){_this.props.onConfirm(),_this.close()},this.onClickCancel=function(){_this.props.onCancel(),_this.close()},this.close=function(){removeElementReconfirm(),removeSVGBlurReconfirm()}}return _inherits(ReactConfirmAlert,_Component),ReactConfirmAlert.prototype.render=function(){var _props=this.props,title=_props.title,message=_props.message,confirmLabel=_props.confirmLabel,cancelLabel=_props.cancelLabel,childrenElement=_props.childrenElement;return _react2.default.createElement("div",{className:"react-confirm-alert-overlay"},_react2.default.createElement("div",{className:"react-confirm-alert"},title&&_react2.default.createElement("h1",null,title),message&&_react2.default.createElement("h3",null,message),childrenElement(),_react2.default.createElement("div",{className:"react-confirm-alert-button-group"},cancelLabel&&_react2.default.createElement("button",{onClick:this.onClickCancel},cancelLabel),confirmLabel&&_react2.default.createElement("button",{onClick:this.onClickConfirm},confirmLabel))))},_createClass(ReactConfirmAlert,null,[{key:"propTypes",value:{title:_propTypes2.default.string,message:_propTypes2.default.string,confirmLabel:_propTypes2.default.string,cancelLabel:_propTypes2.default.string,onConfirm:_propTypes2.default.func,onCancel:_propTypes2.default.func,children:_propTypes2.default.node},enumerable:!0},{key:"defaultProps",value:{title:!1,message:!1,childrenElement:function(){return null},confirmLabel:!1,cancelLabel:!1,onConfirm:function(){return null},onCancel:function(){return null}},enumerable:!0}]),ReactConfirmAlert}(_react.Component);exports.default=ReactConfirmAlert},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_underscore=__webpack_require__(8),_underscore2=_interopRequireDefault(_underscore),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_select=__webpack_require__(474),_select2=_interopRequireDefault(_select),_common=__webpack_require__(477),intervalField={name:"intervalType",values:_common.intervalValues},timeOfDayField={name:"timeOfDay",values:_common.timeOfDayValues},weekDayField={name:"weekDay",values:_common.weekDayValues},monthDayField={name:"monthDay",values:_common.monthDayValues},nthWeekDayField={name:"nthWeekDay",values:_common.nthWeekDayValues},NotificationScheduling=function(_React$Component){function NotificationScheduling(){var _ref,_temp,_this,_ret;_classCallCheck(this,NotificationScheduling);for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _temp=_this=_possibleConstructorReturn(this,(_ref=NotificationScheduling.__proto__||Object.getPrototypeOf(NotificationScheduling)).call.apply(_ref,[this].concat(args))),_this.getCurrentValue=function(){return _this.props.item[_this.props.field.name]||{}},_this.handleValueChange=function(name,value){var oldValue=_this.getCurrentValue(),newValue={};return newValue[name]=value,_this.props.onValueChange({target:{name:_this.props.field.name,value:_underscore2.default.extend({},oldValue,newValue)}})},_this.handleIntervalChange=function(event){return _this.handleValueChange("intervalType",event.target.value)},_this.handleTimeOfDayChange=function(event){return _this.handleValueChange("timeOfDay",event.target.value)},_this.handleWeekDayChange=function(event){return _this.handleValueChange("weekDay",event.target.value)},_this.handleMonthDayChange=function(event){return _this.handleValueChange("monthDay",event.target.value)},_this.handleNthWeekDayChange=function(event){return _this.handleValueChange("nthWeekDay",event.target.value)},_ret=_temp,_possibleConstructorReturn(_this,_ret)}return _inherits(NotificationScheduling,_React$Component),_createClass(NotificationScheduling,[{key:"render",value:function(){var value=this.getCurrentValue(),timeOfDaySelection=void 0,weekDaySelection=void 0,monthDaySelection=void 0,nthWeekDaySelection=void 0;return"immediately"!==value.intervalType&&(timeOfDaySelection=_react2.default.createElement(_select2.default,{field:timeOfDayField,item:this.getCurrentValue(),onValueChange:this.handleTimeOfDayChange})),"weekly"!==value.intervalType&&"nthWeekDay"!==value.intervalType||(weekDaySelection=_react2.default.createElement(_select2.default,{field:weekDayField,item:this.getCurrentValue(),onValueChange:this.handleWeekDayChange})),"monthly"===value.intervalType&&(monthDaySelection=_react2.default.createElement(_select2.default,{field:monthDayField,item:this.getCurrentValue(),onValueChange:this.handleMonthDayChange})),"nthWeekDay"===value.intervalType&&(nthWeekDaySelection=_react2.default.createElement(_select2.default,{field:nthWeekDayField,item:this.getCurrentValue(),onValueChange:this.handleNthWeekDayChange})),_react2.default.createElement("div",null,_react2.default.createElement(_select2.default,{field:intervalField,item:this.getCurrentValue(),onValueChange:this.handleIntervalChange,automationId:"newsletter_interval_type"}),nthWeekDaySelection,monthDaySelection,weekDaySelection,timeOfDaySelection)}}]),NotificationScheduling}(_react2.default.Component);NotificationScheduling.propTypes={item:_propTypes2.default.object.isRequired,field:_propTypes2.default.shape({name:_propTypes2.default.string}).isRequired,onValueChange:_propTypes2.default.func.isRequired},module.exports=NotificationScheduling},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),KeyValueTable=function(props){return _react2.default.createElement("table",{className:"widefat fixed",style:{maxWidth:props.max_width}},_react2.default.createElement("tbody",null,props.rows.map(function(row){return _react2.default.createElement("tr",{key:"row_"+row.key},_react2.default.createElement("td",{className:"row-title"},row.key),_react2.default.createElement("td",null,row.value))})))};KeyValueTable.propTypes={max_width:_propTypes2.default.string,rows:_propTypes2.default.arrayOf(_propTypes2.default.shape({key:_propTypes2.default.string.isRequired,value:_propTypes2.default.oneOfType([_propTypes2.default.string,_propTypes2.default.number,_propTypes2.default.element]).isRequired})).isRequired},KeyValueTable.defaultProps={max_width:"auto"},module.exports=KeyValueTable},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),TasksListDataRow=function(props){return _react2.default.createElement("tr",null,_react2.default.createElement("td",{className:"column column-primary"},props.task.id),_react2.default.createElement("td",{className:"column"},props.task.type),_react2.default.createElement("td",{className:"column"},props.task.newsletter?_react2.default.createElement("a",{href:props.task.newsletter.preview_url,"data-newsletter-id":props.task.newsletter.newsletter_id,"data-queue-id":props.task.newsletter.queue_id,target:"_blank"},props.task.newsletter.subject||_mailpoet2.default.I18n.t("preview")):_mailpoet2.default.I18n.t("none")),_react2.default.createElement("td",{className:"column"},props.task.priority),props.show_scheduled_at?_react2.default.createElement("td",{className:"column-date"},_react2.default.createElement("abbr",null,_mailpoet2.default.Date.format(1e3*props.task.scheduled_at))):null,_react2.default.createElement("td",{className:"column-date"},_react2.default.createElement("abbr",null,_mailpoet2.default.Date.format(1e3*props.task.updated_at))))};TasksListDataRow.propTypes={show_scheduled_at:_propTypes2.default.bool,task:_propTypes2.default.shape({id:_propTypes2.default.number.isRequired,type:_propTypes2.default.string.isRequired,priority:_propTypes2.default.number.isRequired,updated_at:_propTypes2.default.number.isRequired,scheduled_at:_propTypes2.default.number,status:_propTypes2.default.string,newsletter:_propTypes2.default.shape({newsletter_id:_propTypes2.default.number.isRequired,queue_id:_propTypes2.default.number.isRequired,preview_url:_propTypes2.default.string.isRequired,subject:_propTypes2.default.string})}).isRequired},TasksListDataRow.defaultProps={show_scheduled_at:!1,task:{newsletter:null}},module.exports=TasksListDataRow},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(module,exports,__webpack_require__){__webpack_require__(636),__webpack_require__(640),__webpack_require__(666),__webpack_require__(670),__webpack_require__(672),__webpack_require__(673),__webpack_require__(683),__webpack_require__(684),__webpack_require__(685),__webpack_require__(688),__webpack_require__(689),__webpack_require__(698),module.exports=__webpack_require__(700)},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_reactDom=__webpack_require__(28),_reactDom2=_interopRequireDefault(_reactDom),_reactRouter=__webpack_require__(26),_history=__webpack_require__(92),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_list=__webpack_require__(637),_list2=_interopRequireDefault(_list),_form=__webpack_require__(638),_form2=_interopRequireDefault(_form),history=(0,_reactRouter.useRouterHistory)(_history.createHashHistory)({queryKey:!1}),App=function(_React$Component){function App(){return _classCallCheck(this,App),_possibleConstructorReturn(this,(App.__proto__||Object.getPrototypeOf(App)).apply(this,arguments))}return _inherits(App,_React$Component),_createClass(App,[{key:"render",value:function(){return this.props.children}}]),App}(_react2.default.Component);App.propTypes={children:_propTypes2.default.element.isRequired};var container=document.getElementById("subscribers_container");container&&_reactDom2.default.render(_react2.default.createElement(_reactRouter.Router,{history:history},_react2.default.createElement(_reactRouter.Route,{path:"/",component:App},_react2.default.createElement(_reactRouter.IndexRoute,{component:_list2.default}),_react2.default.createElement(_reactRouter.Route,{path:"new",component:_form2.default}),_react2.default.createElement(_reactRouter.Route,{path:"edit/:id",component:_form2.default}),_react2.default.createElement(_reactRouter.Route,{path:"*",component:_list2.default}))),container)},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_reactRouter=__webpack_require__(26),_jquery=__webpack_require__(10),_jquery2=_interopRequireDefault(_jquery),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_classnames=__webpack_require__(18),_classnames2=_interopRequireDefault(_classnames),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_listing=__webpack_require__(64),_listing2=_interopRequireDefault(_listing),_selection=__webpack_require__(506),_selection2=_interopRequireDefault(_selection),columns=[{name:"email",label:_mailpoet2.default.I18n.t("subscriber"),sortable:!0},{name:"status",label:_mailpoet2.default.I18n.t("status"),sortable:!0},{name:"segments",label:_mailpoet2.default.I18n.t("lists")},{name:"created_at",label:_mailpoet2.default.I18n.t("subscribedOn"),sortable:!0},{name:"updated_at",label:_mailpoet2.default.I18n.t("lastModifiedOn"),sortable:!0}],messages={onTrash:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneSubscriberTrashed"):_mailpoet2.default.I18n.t("multipleSubscribersTrashed").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onDelete:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneSubscriberDeleted"):_mailpoet2.default.I18n.t("multipleSubscribersDeleted").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onRestore:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneSubscriberRestored"):_mailpoet2.default.I18n.t("multipleSubscribersRestored").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onNoItemsFound:function(group){return"bounced"===group&&!window.mailpoet_premium_active&&!window.mss_active&&_react2.default.createElement("div",null,_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("bouncedSubscribersHelp")),_react2.default.createElement("p",null,_react2.default.createElement("a",{href:"admin.php?page=mailpoet-premium",className:"button-primary"},_mailpoet2.default.I18n.t("bouncedSubscribersPremiumButtonText"))))}},bulkActions=[{name:"moveToList",label:_mailpoet2.default.I18n.t("moveToList"),onSelect:function(){var field={id:"move_to_segment",api_version:window.mailpoet_api_version,endpoint:"segments",filter:function(segment){return!(segment.deleted_at||"default"!==segment.type)}};return _react2.default.createElement(_selection2.default,{field:field})},getData:function(){return{segment_id:Number((0,_jquery2.default)("#move_to_segment").val())}},onSuccess:function(response){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("multipleSubscribersMovedToList").replace("%$1d",Number(response.meta.count).toLocaleString()).replace("%$2s",response.meta.segment))}},{name:"addToList",label:_mailpoet2.default.I18n.t("addToList"),onSelect:function(){var field={id:"add_to_segment",api_version:window.mailpoet_api_version,endpoint:"segments",filter:function(segment){return!(segment.deleted_at||"default"!==segment.type)}};return _react2.default.createElement(_selection2.default,{field:field})},getData:function(){return{segment_id:Number((0,_jquery2.default)("#add_to_segment").val())}},onSuccess:function(response){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("multipleSubscribersAddedToList").replace("%$1d",Number(response.meta.count).toLocaleString()).replace("%$2s",response.meta.segment))}},{name:"removeFromList",label:_mailpoet2.default.I18n.t("removeFromList"),onSelect:function(){var field={id:"remove_from_segment",api_version:window.mailpoet_api_version,endpoint:"segments",filter:function(segment){return!("default"!==segment.type)}};return _react2.default.createElement(_selection2.default,{field:field})},getData:function(){return{segment_id:Number((0,_jquery2.default)("#remove_from_segment").val())}},onSuccess:function(response){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("multipleSubscribersRemovedFromList").replace("%$1d",Number(response.meta.count).toLocaleString()).replace("%$2s",response.meta.segment))}},{name:"removeFromAllLists",label:_mailpoet2.default.I18n.t("removeFromAllLists"),onSuccess:function(response){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("multipleSubscribersRemovedFromAllLists").replace("%$1d",Number(response.meta.count).toLocaleString()))}},{name:"sendConfirmationEmail",label:_mailpoet2.default.I18n.t("resendConfirmationEmail"),onSuccess:function(response){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("multipleConfirmationEmailsSent").replace("%$1d",Number(response.meta.count).toLocaleString()))}},{name:"trash",label:_mailpoet2.default.I18n.t("moveToTrash"),onSuccess:messages.onTrash}],itemActions=[{name:"edit",label:_mailpoet2.default.I18n.t("edit"),link:function(subscriber){return _react2.default.createElement(_reactRouter.Link,{to:"/edit/"+subscriber.id},_mailpoet2.default.I18n.t("edit"))}},{name:"trash",display:function(subscriber){return 0===Number(subscriber.wp_user_id)}}],SubscriberList=function(_React$Component){function SubscriberList(){var _ref,_temp,_this,_ret;_classCallCheck(this,SubscriberList);for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _temp=_this=_possibleConstructorReturn(this,(_ref=SubscriberList.__proto__||Object.getPrototypeOf(SubscriberList)).call.apply(_ref,[this].concat(args))),_this.getSegmentFromId=function(segmentId){var result=!1;return window.mailpoet_segments.forEach(function(segment){segment.id===segmentId&&(result=segment)}),result},_this.renderItem=function(subscriber,actions){var rowClasses=(0,_classnames2.default)("manage-column","column-primary","has-row-actions","column-username"),status="";switch(subscriber.status){case"subscribed":status=_mailpoet2.default.I18n.t("subscribed");break;case"unconfirmed":status=_mailpoet2.default.I18n.t("unconfirmed");break;case"unsubscribed":status=_mailpoet2.default.I18n.t("unsubscribed");break;case"bounced":status=_mailpoet2.default.I18n.t("bounced");break;default:status="Invalid"}var segments=!1;if(subscriber.subscriptions.length>0){var subscribedSegments=[];subscriber.subscriptions.forEach(function(subscription){var segment=_this.getSegmentFromId(subscription.segment_id);!1!==segment&&"subscribed"===subscription.status&&subscribedSegments.push(segment.name)}),segments=_react2.default.createElement("span",null,subscribedSegments.join(", "))}return _react2.default.createElement("div",null,_react2.default.createElement("td",{className:rowClasses},_react2.default.createElement("strong",null,_react2.default.createElement(_reactRouter.Link,{className:"row-title",to:"/edit/"+subscriber.id},subscriber.email)),_react2.default.createElement("p",{style:{margin:0}},subscriber.first_name," ",subscriber.last_name),actions),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("status")},status),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("lists")},segments),_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("subscribedOn")},_react2.default.createElement("abbr",null,_mailpoet2.default.Date.format(subscriber.created_at))),_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("lastModifiedOn")},_react2.default.createElement("abbr",null,_mailpoet2.default.Date.format(subscriber.updated_at))))},_ret=_temp,_possibleConstructorReturn(_this,_ret)}return _inherits(SubscriberList,_React$Component),_createClass(SubscriberList,[{key:"render",value:function(){return _react2.default.createElement("div",null,_react2.default.createElement("h1",{className:"title"},_mailpoet2.default.I18n.t("pageTitle")," ",_react2.default.createElement(_reactRouter.Link,{className:"page-title-action",to:"/new"},_mailpoet2.default.I18n.t("new")),_react2.default.createElement("a",{className:"page-title-action",href:"?page=mailpoet-import#step1"},_mailpoet2.default.I18n.t("import")),_react2.default.createElement("a",{id:"mailpoet_export_button",className:"page-title-action",href:"?page=mailpoet-export"},_mailpoet2.default.I18n.t("export"))),_react2.default.createElement(_listing2.default,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.params,endpoint:"subscribers",onRenderItem:this.renderItem,columns:columns,bulk_actions:bulkActions,item_actions:itemActions,messages:messages,sort_by:"created_at",sort_order:"desc"}))}}]),SubscriberList}(_react2.default.Component);SubscriberList.propTypes={location:_propTypes2.default.object.isRequired,params:_propTypes2.default.object.isRequired},module.exports=SubscriberList},function(module,exports,__webpack_require__){"use strict";(function(global){global.MailPoetLib||(global.MailPoetLib={}),module.exports=global.MailPoetLib.Form=__webpack_require__(639)}).call(exports,__webpack_require__(9))},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}function beforeFormContent(subscriber){if(Number(subscriber.wp_user_id)>0)return _react2.default.createElement("p",{className:"description"},(0,_reactStringReplace2.default)(_mailpoet2.default.I18n.t("WPUserEditNotice"),/\[link\](.*?)\[\/link\]/g,function(match,i){return _react2.default.createElement("a",{key:i,href:"user-edit.php?user_id="+subscriber.wp_user_id},match)}))}function afterFormContent(){return _react2.default.createElement("p",{className:"description"},_react2.default.createElement("strong",null,_mailpoet2.default.I18n.t("tip"))," ",_mailpoet2.default.I18n.t("customFieldsTip"))}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_reactRouter=__webpack_require__(26),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_form=__webpack_require__(290),_form2=_interopRequireDefault(_form),_reactStringReplace=__webpack_require__(63),_reactStringReplace2=_interopRequireDefault(_reactStringReplace),fields=[{name:"email",label:_mailpoet2.default.I18n.t("email"),type:"text",disabled:function(subscriber){return Number(subscriber.wp_user_id>0)}},{name:"first_name",label:_mailpoet2.default.I18n.t("firstname"),type:"text",disabled:function(subscriber){return Number(subscriber.wp_user_id>0)}},{name:"last_name",label:_mailpoet2.default.I18n.t("lastname"),type:"text",disabled:function(subscriber){return Number(subscriber.wp_user_id>0)}},{name:"status",label:_mailpoet2.default.I18n.t("status"),type:"select",values:{subscribed:_mailpoet2.default.I18n.t("subscribed"),unconfirmed:_mailpoet2.default.I18n.t("unconfirmed"),unsubscribed:_mailpoet2.default.I18n.t("unsubscribed"),bounced:_mailpoet2.default.I18n.t("bounced")},filter:function(subscriber,value){return!(Number(subscriber.wp_user_id)>0&&"unconfirmed"===value)}},{name:"segments",label:_mailpoet2.default.I18n.t("lists"),type:"selection",placeholder:_mailpoet2.default.I18n.t("selectList"),tip:_mailpoet2.default.I18n.t("welcomeEmailTip"),api_version:window.mailpoet_api_version,endpoint:"segments",multiple:!0,selected:function(subscriber){return!1===Array.isArray(subscriber.subscriptions)?null:subscriber.subscriptions.filter(function(subscription){return"subscribed"===subscription.status}).map(function(subscription){return subscription.segment_id})},filter:function(segment){return!segment.deleted_at&&"default"===segment.type},getLabel:function(segment){return segment.name+" ("+segment.subscribers+")"},getSearchLabel:function(segment,subscriber){var label="";return void 0!==subscriber.subscriptions&&subscriber.subscriptions.forEach(function(subscription){if(segment.id===subscription.segment_id&&(label=segment.name,"unsubscribed"===subscription.status)){var unsubscribedAt=_mailpoet2.default.Date.format(subscription.updated_at);label+=" (%$1s)".replace("%$1s",_mailpoet2.default.I18n.t("unsubscribedOn").replace("%$1s",unsubscribedAt))}}),label}}];(window.mailpoet_custom_fields||[]).forEach(function(customField){var field={name:"cf_"+customField.id,label:customField.name,type:customField.type};switch(customField.params&&(field.params=customField.params),customField.params.values&&(field.values=customField.params.values),customField.type){case"date":field.year_placeholder=_mailpoet2.default.I18n.t("year"),field.month_placeholder=_mailpoet2.default.I18n.t("month"),field.day_placeholder=_mailpoet2.default.I18n.t("day");break;case"select":field.placeholder="-";break;default:field.placeholder=""}fields.push(field)});var messages={onUpdate:function(){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("subscriberUpdated"))},onCreate:function(){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("subscriberAdded")),_mailpoet2.default.trackEvent("Subscribers > Add new",{"MailPoet Free version":window.mailpoet_version})}},SubscriberForm=function(_React$Component){function SubscriberForm(){return _classCallCheck(this,SubscriberForm),_possibleConstructorReturn(this,(SubscriberForm.__proto__||Object.getPrototypeOf(SubscriberForm)).apply(this,arguments))}return _inherits(SubscriberForm,_React$Component),_createClass(SubscriberForm,[{key:"render",value:function(){return _react2.default.createElement("div",null,_react2.default.createElement("h1",{className:"title"},_mailpoet2.default.I18n.t("subscriber"),_react2.default.createElement(_reactRouter.Link,{className:"page-title-action",to:"/"},_mailpoet2.default.I18n.t("backToList"))),_react2.default.createElement(_form2.default,{endpoint:"subscribers",fields:fields,params:this.props.params,messages:messages,beforeFormContent:beforeFormContent,afterFormContent:afterFormContent}))}}]),SubscriberForm}(_react2.default.Component);SubscriberForm.propTypes={params:_propTypes2.default.object.isRequired},module.exports=SubscriberForm},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _toConsumableArray(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i<arr.length;i++)arr2[i]=arr[i];return arr2}return Array.from(arr)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_reactDom=__webpack_require__(28),_reactDom2=_interopRequireDefault(_reactDom),_reactRouter=__webpack_require__(26),_history=__webpack_require__(92),_wpJsHooks=__webpack_require__(33),_wpJsHooks2=_interopRequireDefault(_wpJsHooks),_underscore=__webpack_require__(8),_underscore2=_interopRequireDefault(_underscore),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_types=__webpack_require__(641),_types2=_interopRequireDefault(_types),_templates=__webpack_require__(642),_templates2=_interopRequireDefault(_templates),_send=__webpack_require__(647),_send2=_interopRequireDefault(_send),_congratulate=__webpack_require__(654),_congratulate2=_interopRequireDefault(_congratulate),_standard=__webpack_require__(659),_standard2=_interopRequireDefault(_standard),_notification=__webpack_require__(660),_notification2=_interopRequireDefault(_notification),_welcome=__webpack_require__(661),_welcome2=_interopRequireDefault(_welcome),_events_list=__webpack_require__(509),_events_list2=_interopRequireDefault(_events_list),_standard3=__webpack_require__(662),_standard4=_interopRequireDefault(_standard3),_welcome3=__webpack_require__(663),_welcome4=_interopRequireDefault(_welcome3),_notification3=__webpack_require__(664),_notification4=_interopRequireDefault(_notification3),_notification_history=__webpack_require__(665),_notification_history2=_interopRequireDefault(_notification_history),history=(0,_reactRouter.useRouterHistory)(_history.createHashHistory)({queryKey:!1}),App=function(_React$Component){function App(){return _classCallCheck(this,App),_possibleConstructorReturn(this,(App.__proto__||Object.getPrototypeOf(App)).apply(this,arguments))}return _inherits(App,_React$Component),_createClass(App,[{key:"render",value:function(){return this.props.children}}]),App}(_react2.default.Component);App.propTypes={children:_propTypes2.default.element.isRequired};var container=document.getElementById("newsletters_container");if(container){var routes=[{path:"standard(/)**",params:{tab:"standard"},component:_standard4.default},{path:"welcome(/)**",component:_welcome4.default},{path:"notification/history/:parent_id(/)**",component:_notification_history2.default},{path:"notification(/)**",component:_notification4.default},{path:"new",component:_types2.default},{path:"new/standard",component:_standard2.default},{path:"new/notification",component:_notification2.default},{path:"new/welcome",component:_welcome2.default},{name:"template",path:"template/:id",component:_templates2.default},{path:"send/congratulate/:id",component:_congratulate2.default},{path:"send/:id",component:_send2.default}];routes=_wpJsHooks2.default.applyFilters("mailpoet_newsletters_before_router",[].concat(_toConsumableArray(routes),_toConsumableArray(function(){return window.mailpoet_automatic_emails?_underscore2.default.map(window.mailpoet_automatic_emails,function(automaticEmail){return{path:"new/"+automaticEmail.slug,name:automaticEmail.slug,component:_events_list2.default,data:{email:automaticEmail}}}):null}()))),window.mailpoet_listing=_reactDom2.default.render(_react2.default.createElement(_reactRouter.Router,{history:history},_react2.default.createElement(_reactRouter.Route,{path:"/",component:App},_react2.default.createElement(_reactRouter.IndexRedirect,{to:"standard"}),routes.map(function(route){return _react2.default.createElement(_reactRouter.Route,{key:route.path,path:route.path,component:route.component,name:route.name||null,params:route.params||null,data:route.data||null})}))),container)}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _toConsumableArray(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i<arr.length;i++)arr2[i]=arr[i];return arr2}return Array.from(arr)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_breadcrumb=__webpack_require__(59),_breadcrumb2=_interopRequireDefault(_breadcrumb),_wpJsHooks=__webpack_require__(33),_wpJsHooks2=_interopRequireDefault(_wpJsHooks),_underscore=__webpack_require__(8),_underscore2=_interopRequireDefault(_underscore);__webpack_require__(26);var NewsletterTypes=function(_React$Component){function NewsletterTypes(){var _ref,_temp,_this,_ret;_classCallCheck(this,NewsletterTypes);for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _temp=_this=_possibleConstructorReturn(this,(_ref=NewsletterTypes.__proto__||Object.getPrototypeOf(NewsletterTypes)).call.apply(_ref,[this].concat(args))),_this.setupNewsletter=function(type){void 0!==type&&(_this.context.router.push("/new/"+type),_mailpoet2.default.trackEvent("Emails > Type selected",{"MailPoet Free version":window.mailpoet_version,"Email type":type}))},_this.getAutomaticEmails=function(){return window.mailpoet_automatic_emails?_underscore2.default.map(window.mailpoet_automatic_emails,function(automaticEmail){var email=automaticEmail,onClick=_underscore2.default.partial(_this.setupNewsletter,automaticEmail.slug);return email.action=function(){return _react2.default.createElement("div",null,_react2.default.createElement("a",{className:"button button-primary",onClick:onClick,role:"button",tabIndex:0},_mailpoet2.default.I18n.t("setUp")))}(),email}):[]},_this.createNewsletter=function(type){_mailpoet2.default.trackEvent("Emails > Type selected",{"MailPoet Free version":window.mailpoet_version,"Email type":type}),_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"create",data:{type:type,subject:_mailpoet2.default.I18n.t("draftNewsletterTitle")}}).done(function(response){_this.context.router.push("/template/"+response.data.id)}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})},_ret=_temp,_possibleConstructorReturn(_this,_ret)}return _inherits(NewsletterTypes,_React$Component),_createClass(NewsletterTypes,[{key:"render",value:function(){var createStandardNewsletter=_underscore2.default.partial(this.createNewsletter,"standard"),createNotificationNewsletter=_underscore2.default.partial(this.setupNewsletter,"notification"),createWelcomeNewsletter=_underscore2.default.partial(this.setupNewsletter,"welcome"),defaultTypes=[{slug:"standard",title:_mailpoet2.default.I18n.t("regularNewsletterTypeTitle"),description:_mailpoet2.default.I18n.t("regularNewsletterTypeDescription"),action:function(){return _react2.default.createElement("a",{className:"button button-primary","data-automation-id":"create_standard",onClick:createStandardNewsletter,role:"button",tabIndex:0},_mailpoet2.default.I18n.t("create"))}()},{slug:"welcome",title:_mailpoet2.default.I18n.t("welcomeNewsletterTypeTitle"),description:_mailpoet2.default.I18n.t("welcomeNewsletterTypeDescription"),videoGuide:"https://beta.docs.mailpoet.com/article/254-video-guide-to-welcome-emails",action:function(){return _react2.default.createElement("a",{className:"button button-primary",onClick:createWelcomeNewsletter,"data-automation-id":"create_welcome",onKeyDown:function(event){["keydown","keypress"].includes(event.type)&&["Enter"," "].includes(event.key)&&(event.preventDefault(),createWelcomeNewsletter())},role:"button",tabIndex:0},_mailpoet2.default.I18n.t("setUp"))}()},{slug:"notification",title:_mailpoet2.default.I18n.t("postNotificationNewsletterTypeTitle"),description:_mailpoet2.default.I18n.t("postNotificationNewsletterTypeDescription"),videoGuide:"https://beta.docs.mailpoet.com/article/210-video-guide-to-post-notifications",action:function(){return _react2.default.createElement("a",{className:"button button-primary","data-automation-id":"create_notification",onClick:createNotificationNewsletter,role:"button",tabIndex:0},_mailpoet2.default.I18n.t("setUp"))}()}],types=_wpJsHooks2.default.applyFilters("mailpoet_newsletters_types",[].concat(defaultTypes,_toConsumableArray(this.getAutomaticEmails())),this),badgeClassName=!0===window.mailpoet_is_new_user?"mailpoet_badge mailpoet_badge_video":"mailpoet_badge mailpoet_badge_video mailpoet_badge_video_grey";return _react2.default.createElement("div",null,_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("pickCampaignType")),_react2.default.createElement(_breadcrumb2.default,{step:"type"}),_react2.default.createElement("ul",{className:"mailpoet_boxes clearfix"},types.map(function(type){return _react2.default.createElement("li",{key:type.slug,"data-type":type.slug,className:"mailpoet_newsletter_types"},_react2.default.createElement("div",null,_react2.default.createElement("div",{className:"mailpoet_thumbnail"},type.thumbnailImage?_react2.default.createElement("img",{src:type.thumbnailImage,alt:""}):null),_react2.default.createElement("div",{className:"mailpoet_description"},_react2.default.createElement("h3",null,type.title," ",type.beta?"("+_mailpoet2.default.I18n.t("beta")+")":""),_react2.default.createElement("p",null,type.description),type.videoGuide&&_react2.default.createElement("a",{className:badgeClassName,href:type.videoGuide,target:"_blank"},_react2.default.createElement("span",{className:"dashicons dashicons-format-video"}),_mailpoet2.default.I18n.t("seeVideoGuide"))),_react2.default.createElement("div",{className:"mailpoet_actions"},type.action)))},this)))}}]),NewsletterTypes}(_react2.default.Component);NewsletterTypes.contextTypes={router:_propTypes2.default.object.isRequired},module.exports=NewsletterTypes},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}Object.defineProperty(exports,"__esModule",{value:!0});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_breadcrumb=__webpack_require__(59),_breadcrumb2=_interopRequireDefault(_breadcrumb),_loading=__webpack_require__(643),_loading2=_interopRequireDefault(_loading),_tabs=__webpack_require__(644),_tabs2=_interopRequireDefault(_tabs),_template_box=__webpack_require__(645),_template_box2=_interopRequireDefault(_template_box),_import_template=__webpack_require__(646),_import_template2=_interopRequireDefault(_import_template),_wpJsHooks=__webpack_require__(33),_wpJsHooks2=_interopRequireDefault(_wpJsHooks),_underscore=__webpack_require__(8),_underscore2=_interopRequireDefault(_underscore),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),getEditorUrl=function(id){return"admin.php?page=mailpoet-newsletter-editor&id="+id},templatesCategories=[{name:"standard",label:_mailpoet2.default.I18n.t("tabStandardTitle")},{name:"welcome",label:_mailpoet2.default.I18n.t("tabWelcomeTitle")},{name:"notification",label:_mailpoet2.default.I18n.t("tabNotificationTitle")}];window.mailpoet_woocommerce_active&&templatesCategories.push({name:"woocommerce",label:_mailpoet2.default.I18n.t("tabWoocommerceTitle")}),templatesCategories.push.apply(templatesCategories,[{name:"all",label:_mailpoet2.default.I18n.t("allTemplates")},{name:"recent",label:_mailpoet2.default.I18n.t("recentlySent")},{name:"saved",label:_mailpoet2.default.I18n.t("savedTemplates")}]);var NewsletterTemplates=function(_React$Component){function NewsletterTemplates(props){_classCallCheck(this,NewsletterTemplates);var _this=_possibleConstructorReturn(this,(NewsletterTemplates.__proto__||Object.getPrototypeOf(NewsletterTemplates)).call(this,props));return _this.state={loading:!0,templates:{},emailType:null,selectedTab:""},_this.templates={},_this.addTemplate=_this.addTemplate.bind(_this),_this.afterTemplateDelete=_this.afterTemplateDelete.bind(_this),_this.afterTemplateSelect=_this.afterTemplateSelect.bind(_this),_this.afterTemplateImport=_this.afterTemplateImport.bind(_this),_this}return _inherits(NewsletterTemplates,_React$Component),_createClass(NewsletterTemplates,[{key:"componentWillMount",value:function(){var _this2=this;_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletterTemplates",action:"getAll"}).done(function(response){0===response.data.length&&(response.data=[{name:_mailpoet2.default.I18n.t("mailpoetGuideTemplateTitle"),categories:'["welcome", "notification", "standard", "woocommerce"]',readonly:"1"}]),response.data.forEach(_this2.addTemplate),_this2.sortTemplates()}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})}).always(function(){_this2.selectInitialTab()})}},{key:"addTemplate",value:function(template){var _this3=this,categoriesNames=templatesCategories.map(function(category){return category.name}),categories=void 0;try{categories=JSON.parse(template.categories).filter(function(name){return-1!==categoriesNames.indexOf(name)})}catch(err){categories=[]}0===categories.length&&categories.push("saved"),categories.forEach(function(category){void 0===_this3.templates[category]&&(_this3.templates[category]=[]),_this3.templates[category].unshift(template)})}},{key:"sortTemplates",value:function(){var _this4=this;Object.keys(this.templates).forEach(function(category){_this4.templates[category].sort(function(a,b){return parseInt(a.id,10)<parseInt(b.id,10)?1:-1})})}},{key:"selectInitialTab",value:function(){var _this5=this,emailType=void 0,selectedTab="standard";_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"get",data:{id:this.props.params.id}}).done(function(response){emailType=response.data.type,_underscore2.default.findWhere(templatesCategories,{name:response.data.type})&&(selectedTab=response.data.type)}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})}).always(function(){_this5.setState({templates:_this5.templates,emailType:emailType,selectedTab:selectedTab,loading:!1})})}},{key:"afterTemplateDelete",value:function(success,id){var _this6=this;success&&Object.keys(this.templates).forEach(function(category){_this6.templates[category]=_this6.templates[category].filter(function(template){return template.id!==id})}),this.setState({templates:this.templates,loading:!1})}},{key:"afterTemplateSelect",value:function(success,id){success?window.location=getEditorUrl(id):this.setState({loading:!1})}},{key:"afterTemplateImport",value:function(success,template){success&&this.addTemplate(template),this.setState({templates:this.templates,selectedTab:success?"saved":"import",loading:!1})}},{key:"render",value:function(){var _this7=this;if(this.state.loading)return _react2.default.createElement(_loading2.default,null);var tabs=templatesCategories.concat({name:"import",label:_mailpoet2.default.I18n.t("tabImportTitle")}),selectedTab=this.state.selectedTab,content=null;if("import"===selectedTab)content=_react2.default.createElement(_import_template2.default,{beforeImport:function(){return _this7.setState({loading:!0})},afterImport:this.afterTemplateImport});else{var templates=this.state.templates[this.state.selectedTab]||[];templates=0===templates.length?this.state.loading?null:_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("noTemplates")):templates.map(function(template,index){return _react2.default.createElement(_template_box2.default,_extends({key:template.id,index:index,newsletterId:_this7.props.params.id,beforeDelete:function(){return _this7.setState({loading:!0})},afterDelete:_this7.afterTemplateDelete,beforeSelect:function(){return _this7.setState({loading:!0})},afterSelect:_this7.afterTemplateSelect},template))}),content=_react2.default.createElement("ul",{className:"mailpoet_boxes clearfix"},templates)}var breadcrumb=_wpJsHooks2.default.applyFilters("mailpoet_newsletters_template_breadcrumb",_react2.default.createElement(_breadcrumb2.default,{step:"template"}),this.state.emailType,"template");return _react2.default.createElement("div",null,_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("selectTemplateTitle")),breadcrumb,_react2.default.createElement(_tabs2.default,{tabs:tabs,selected:this.state.selectedTab,select:function(name){return _this7.setState({selectedTab:name})}}),content)}}]),NewsletterTemplates}(_react2.default.Component);NewsletterTemplates.propTypes={params:_propTypes2.default.shape({id:_propTypes2.default.string.isRequired}).isRequired},exports.default=NewsletterTemplates},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),Loading=function(_React$Component){function Loading(){return _classCallCheck(this,Loading),_possibleConstructorReturn(this,(Loading.__proto__||Object.getPrototypeOf(Loading)).apply(this,arguments))}return _inherits(Loading,_React$Component),_createClass(Loading,[{key:"componentWillMount",value:function(){_mailpoet2.default.Modal.loading(!0)}},{key:"componentWillUnmount",value:function(){_mailpoet2.default.Modal.loading(!1)}},{key:"render",value:function(){return null}}]),Loading}(_react2.default.Component);exports.default=Loading},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(exports,"__esModule",{value:!0});var _react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_reactTooltip=__webpack_require__(232),_reactTooltip2=_interopRequireDefault(_reactTooltip),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_reactStringReplace=__webpack_require__(63),_reactStringReplace2=_interopRequireDefault(_reactStringReplace),tooltipText=(0,_reactStringReplace2.default)(_mailpoet2.default.I18n.t("tooltipTemplateTabs"),/\[link\](.*?)\[\/link\]/g,function(match){return _react2.default.createElement("a",{href:"https://mailpoet.polldaddy.com/s/select-template-feedback",key:"feedback",target:"_blank",rel:"noopener noreferrer"},match)}),Tabs=function(_ref){var tabs=_ref.tabs,selected=_ref.selected,select=_ref.select;return _react2.default.createElement("div",{className:"wp-filter hide-if-no-js"},_react2.default.createElement("ul",{className:"filter-links"},tabs.map(function(_ref2){var name=_ref2.name,label=_ref2.label;return _react2.default.createElement("li",{key:name},_react2.default.createElement("a",{href:"javascript:",className:selected===name?"current":"",onClick:function(){return select(name)}}," ",label))})),_react2.default.createElement("span",{className:"feedback-tooltip newsletter-templates-feedback","data-event":"click","data-tip":!0,"data-for":"feedback-newsletter-templates-tabs"},_mailpoet2.default.I18n.t("feedback")),_react2.default.createElement(_reactTooltip2.default,{globalEventOff:"click",multiline:!0,id:"feedback-newsletter-templates-tabs",efect:"solid",place:"bottom"},_react2.default.createElement("span",{style:{pointerEvents:"all",display:"inline-block"}},tooltipText)))};Tabs.propTypes={selected:_propTypes2.default.string.isRequired,select:_propTypes2.default.func.isRequired,tabs:_propTypes2.default.arrayOf(_propTypes2.default.shape({label:_propTypes2.default.string.isRequired,name:_propTypes2.default.string.isRequired}).isRequired).isRequired},exports.default=Tabs},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_reactConfirmAlert=__webpack_require__(519),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),TemplateBox=function(_React$Component){function TemplateBox(props){_classCallCheck(this,TemplateBox);var _this=_possibleConstructorReturn(this,(TemplateBox.__proto__||Object.getPrototypeOf(TemplateBox)).call(this,props));return _this.onPreview=_this.onPreview.bind(_this),_this.onDelete=_this.onDelete.bind(_this),_this.onSelect=_this.onSelect.bind(_this),_this}return _inherits(TemplateBox,_React$Component),_createClass(TemplateBox,[{key:"onDelete",value:function(){var _props=this.props,id=_props.id,name=_props.name,beforeDelete=_props.beforeDelete,afterDelete=_props.afterDelete,onConfirm=function(){beforeDelete(),_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletterTemplates",action:"delete",data:{id:id}}).done(function(){afterDelete(!0,id)}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0}),afterDelete(!1)})};(0,_reactConfirmAlert.confirmAlert)({title:_mailpoet2.default.I18n.t("confirmTitle"),message:_mailpoet2.default.I18n.t("confirmTemplateDeletion").replace("%$1s",name),confirmLabel:_mailpoet2.default.I18n.t("confirmLabel"),cancelLabel:_mailpoet2.default.I18n.t("cancelLabel"),onConfirm:onConfirm,onCancel:function(){}})}},{key:"onPreview",value:function(){_mailpoet2.default.Modal.popup({title:this.props.name,template:'<div class="mailpoet_boxes_preview" style="background-color: {{ body.globalStyles.body.backgroundColor }}"><img src="{{ thumbnail }}" /></div>',data:this.props})}},{key:"onSelect",value:function(){var _props2=this.props,newsletterId=_props2.newsletterId,name=_props2.name,beforeSelect=_props2.beforeSelect,afterSelect=_props2.afterSelect;beforeSelect(),_mailpoet2.default.trackEvent("Emails > Template selected",{"MailPoet Free version":window.mailpoet_version,"Email name":name}),_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"save",data:{id:newsletterId,template_id:this.props.id}}).done(function(response){afterSelect(!0,response.data.id)}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0}),afterSelect(!1)})}},{key:"render",value:function(){var _props3=this.props,index=_props3.index,name=_props3.name,thumbnail=_props3.thumbnail,readonly=_props3.readonly,deleteLink=_react2.default.createElement("div",{className:"mailpoet_delete button button-secondary"},_react2.default.createElement("a",{href:"javascript:;",onClick:this.onDelete},_mailpoet2.default.I18n.t("delete"))),preview="";return"string"==typeof thumbnail&&thumbnail.length>0&&(preview=_react2.default.createElement("a",{href:"javascript:;",onClick:this.onPreview},_react2.default.createElement("img",{src:thumbnail,alt:_mailpoet2.default.I18n.t("templatePreview")}),_react2.default.createElement("div",{className:"mailpoet_overlay"},_react2.default.createElement("p",{className:"mailpoet_more_details"},_mailpoet2.default.I18n.t("zoom"))))),_react2.default.createElement("li",{className:"mailpoet_template_boxes","data-automation-id":"select_template_box"},_react2.default.createElement("div",{className:"mailpoet_thumbnail"},preview),_react2.default.createElement("div",{className:"mailpoet_description"},_react2.default.createElement("h3",null,name)),_react2.default.createElement("div",{className:"mailpoet_actions"},"1"!==readonly&&deleteLink,_react2.default.createElement("a",{className:"button button-primary","data-automation-id":"select_template_"+index,onClick:this.onSelect,role:"button",tabIndex:0}," ",_mailpoet2.default.I18n.t("select")," ")))}}]),TemplateBox}(_react2.default.Component);TemplateBox.propTypes={index:_propTypes2.default.number.isRequired,id:_propTypes2.default.string.isRequired,newsletterId:_propTypes2.default.string.isRequired,name:_propTypes2.default.string.isRequired,thumbnail:_propTypes2.default.string.isRequired,readonly:_propTypes2.default.string.isRequired,beforeDelete:_propTypes2.default.func.isRequired,afterDelete:_propTypes2.default.func.isRequired,beforeSelect:_propTypes2.default.func.isRequired,afterSelect:_propTypes2.default.func.isRequired},exports.default=TemplateBox},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_underscore=__webpack_require__(8),_underscore2=_interopRequireDefault(_underscore),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_helpTooltip=__webpack_require__(226),_helpTooltip2=_interopRequireDefault(_helpTooltip),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),ImportTemplate=function(_React$Component){function ImportTemplate(props){_classCallCheck(this,ImportTemplate);var _this=_possibleConstructorReturn(this,(ImportTemplate.__proto__||Object.getPrototypeOf(ImportTemplate)).call(this,props));return _this.handleSubmit=_this.handleSubmit.bind(_this),_this}return _inherits(ImportTemplate,_React$Component),_createClass(ImportTemplate,[{key:"saveTemplate",value:function(_saveTemplate){var template=_saveTemplate,_props=this.props,beforeImport=_props.beforeImport,afterImport=_props.afterImport;_underscore2.default.isUndefined(template.body)||(template.body=JSON.stringify(template.body));try{template.categories=JSON.parse(template.categories)}catch(err){template.categories=[]}-1===template.categories.indexOf("saved")&&template.categories.push("saved"),-1===template.categories.indexOf("standard")&&-1===template.categories.indexOf("welcome")&&-1===template.categories.indexOf("notification")&&template.categories.push("standard"),template.categories=JSON.stringify(template.categories),beforeImport(),_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletterTemplates",action:"save",data:template}).done(function(response){afterImport(!0,response.data)}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0}),afterImport(!1)})}},{key:"handleSubmit",value:function(e){var _this2=this;if(e.preventDefault(),_underscore2.default.size(this.templateFile.files)<=0)return!1;var file=_underscore2.default.first(this.templateFile.files),reader=new FileReader;return reader.onload=function(evt){try{_this2.saveTemplate(JSON.parse(evt.target.result)),_mailpoet2.default.trackEvent("Emails > Template imported",{"MailPoet Free version":window.mailpoet_version})}catch(err){_mailpoet2.default.Notice.error(_mailpoet2.default.I18n.t("templateFileMalformedError"))}},reader.readAsText(file),!0}},{key:"render",value:function(){var _this3=this;return _react2.default.createElement("div",null,_react2.default.createElement("h2",null,_mailpoet2.default.I18n.t("importTemplateTitle"),_react2.default.createElement(_helpTooltip2.default,{tooltip:_mailpoet2.default.I18n.t("helpTooltipTemplateUpload"),place:"right",className:"tooltip-help-import-template"})),_react2.default.createElement("form",{onSubmit:this.handleSubmit},_react2.default.createElement("input",{type:"file",placeholder:_mailpoet2.default.I18n.t("selectJsonFileToUpload"),ref:function(c){_this3.templateFile=c}}),_react2.default.createElement("p",{className:"submit"},_react2.default.createElement("input",{className:"button button-primary",type:"submit",value:_mailpoet2.default.I18n.t("upload")}))))}}]),ImportTemplate}(_react2.default.Component);ImportTemplate.propTypes={beforeImport:_propTypes2.default.func.isRequired,afterImport:_propTypes2.default.func.isRequired},exports.default=ImportTemplate},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_createReactClass=__webpack_require__(19),_createReactClass2=_interopRequireDefault(_createReactClass),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_underscore=__webpack_require__(8),_underscore2=_interopRequireDefault(_underscore),_breadcrumb=__webpack_require__(59),_breadcrumb2=_interopRequireDefault(_breadcrumb),_form=__webpack_require__(290),_form2=_interopRequireDefault(_form),_standard=__webpack_require__(648),_standard2=_interopRequireDefault(_standard),_notification=__webpack_require__(652),_notification2=_interopRequireDefault(_notification),_welcome=__webpack_require__(653),_welcome2=_interopRequireDefault(_welcome),_helpTooltip=__webpack_require__(226),_helpTooltip2=_interopRequireDefault(_helpTooltip),_jquery=__webpack_require__(10),_jquery2=_interopRequireDefault(_jquery),_thumbnail=__webpack_require__(480),_wpJsHooks=__webpack_require__(33),_wpJsHooks2=_interopRequireDefault(_wpJsHooks),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),NewsletterSend=(0,_createReactClass2.default)({displayName:"NewsletterSend",propTypes:{params:_propTypes2.default.shape({id:_propTypes2.default.string}).isRequired},contextTypes:{router:_propTypes2.default.object.isRequired},getInitialState:function(){return{fields:[],item:{},loading:!0}},componentDidMount:function(){this.loadItem(this.props.params.id),(0,_jquery2.default)("#mailpoet_newsletter").parsley()},componentWillReceiveProps:function(props){this.loadItem(props.params.id)},getFieldsByNewsletter:function(newsletter){return this.getSubtype(newsletter).getFields(newsletter)},getSendButtonOptions:function(){return this.getSubtype(this.state.item).getSendButtonOptions(this.state.item)},getSubtype:function(newsletter){switch(newsletter.type){case"notification":return _notification2.default;case"welcome":return _welcome2.default;default:return _wpJsHooks2.default.applyFilters("mailpoet_newsletters_send_newsletter_fields",_standard2.default,newsletter)}},isValid:function(){return(0,_jquery2.default)("#mailpoet_newsletter").parsley().isValid()},loadItem:function(id){var _this=this;this.setState({loading:!0}),_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"get",data:{id:id}}).done(function(response){_this.setState({loading:!1,item:response.data,fields:_this.getFieldsByNewsletter(response.data)})}).fail(function(){_this.setState({loading:!1,item:{}},function(){_this.context.router.push("/new")})})},saveTemplate:function(response,done){var _this2=this;(0,_thumbnail.fromUrl)(response.meta.preview_url).then(function(thumbnail){_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletterTemplates",action:"save",data:{newsletter_id:response.data.id,name:response.data.subject,thumbnail:thumbnail,body:JSON.stringify(response.data.body),categories:'["recent"]'}}).then(done).fail(function(err){_this2.showError(err),_this2.setState({loading:!1}),_mailpoet2.default.Modal.loading(!1),done()})}).catch(function(err){_this2.showError({errors:[err]})})},handleSend:function(e){var _this3=this;return e.preventDefault(),this.isValid()?(_mailpoet2.default.Modal.loading(!0),this.saveNewsletter(e).done(function(){_this3.setState({loading:!0})}).done(function(response){switch(response.data.type){case"notification":case"welcome":return _this3.activateNewsletter(response);default:return _this3.sendNewsletter(response)}}).fail(function(err){_this3.showError(err),_this3.setState({loading:!1}),_mailpoet2.default.Modal.loading(!1)})):(0,_jquery2.default)("#mailpoet_newsletter").parsley().validate()},sendNewsletter:function(newsletter){var _this4=this;return _mailpoet2.default.Ajax.post(_wpJsHooks2.default.applyFilters("mailpoet_newsletters_send_server_request_parameters",{api_version:window.mailpoet_api_version,endpoint:"sendingQueue",action:"add",data:{newsletter_id:this.state.item.id}},this.state.item)).done(function(response){_this4.saveTemplate(newsletter,function(){if(window.mailpoet_show_congratulate_after_first_newsletter)return _mailpoet2.default.Modal.loading(!1),void _this4.context.router.push("/send/congratulate/"+_this4.state.item.id);_this4.context.router.push(_wpJsHooks2.default.applyFilters("mailpoet_newsletters_send_server_request_response_redirect","/"+(_this4.state.item.type||""),_this4.state.item));var customResponse=_wpJsHooks2.default.applyFilters("mailpoet_newsletters_send_server_request_response",_this4.state.item,response);_underscore2.default.isFunction(customResponse)?customResponse():"scheduled"===response.data.status?(_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("newsletterHasBeenScheduled")),_mailpoet2.default.trackEvent("Emails > Newsletter sent",{scheduled:!0,"MailPoet Free version":window.mailpoet_version})):(_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("newsletterBeingSent")),_mailpoet2.default.trackEvent("Emails > Newsletter sent",{scheduled:!1,"MailPoet Free version":window.mailpoet_version})),_mailpoet2.default.Modal.loading(!1)})}).fail(function(err){_this4.showError(err),_this4.setState({loading:!1}),_mailpoet2.default.Modal.loading(!1)})},activateNewsletter:function(newsletter){var _this5=this;return _mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"setStatus",data:{id:this.props.params.id,status:"active"}}).done(function(response){_this5.saveTemplate(newsletter,function(){if(window.mailpoet_show_congratulate_after_first_newsletter)return _mailpoet2.default.Modal.loading(!1),void _this5.context.router.push("/send/congratulate/"+_this5.state.item.id);_this5.context.router.push("/"+(_this5.state.item.type||""));var opts=_this5.state.item.options;"welcome"===response.data.type?(_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("welcomeEmailActivated")),_mailpoet2.default.trackEvent("Emails > Welcome email activated",{"MailPoet Free version":window.mailpoet_version,"List type":opts.event,Delay:opts.afterTimeNumber+" "+opts.afterTimeType})):"notification"===response.data.type&&(_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("postNotificationActivated")),_mailpoet2.default.trackEvent("Emails > Post notifications activated",{"MailPoet Free version":window.mailpoet_version,Frequency:opts.intervalType})),_mailpoet2.default.Modal.loading(!1)})}).fail(function(err){_this5.showError(err),_this5.setState({loading:!1}),_mailpoet2.default.Modal.loading(!1)})},handleResume:function(e){var _this6=this;return e.preventDefault(),this.isValid()?this.saveNewsletter(e).done(function(){_this6.setState({loading:!0})}).done(function(){_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"sendingQueue",action:"resume",data:{newsletter_id:_this6.state.item.id}}).done(function(){_this6.context.router.push("/"+(_this6.state.item.type||"")),_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("newsletterSendingHasBeenResumed"))}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}).fail(function(err){_this6.showError(err)}).always(function(){_this6.setState({loading:!1})}):(0,_jquery2.default)("#mailpoet_newsletter").parsley().validate(),!1},handleSave:function(e){var _this7=this;e.preventDefault(),this.saveNewsletter(e).done(function(){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("newsletterUpdated"))}).done(function(){_this7.context.router.push("/"+(_this7.state.item.type||""))}).fail(function(err){_this7.showError(err)})},handleRedirectToDesign:function(e){var _this8=this;e.preventDefault();var redirectTo=e.target.href;this.saveNewsletter(e).done(function(){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("newsletterUpdated"))}).done(function(){window.location=redirectTo}).fail(function(err){_this8.showError(err)})},saveNewsletter:function(){var data=this.state.item;data.queue=void 0,this.setState({loading:!0});var IGNORED_NEWSLETTER_PROPERTIES=["preheader","body","created_at","deleted_at","hash","status","updated_at","type"],newsletterData=_underscore2.default.omit(data,IGNORED_NEWSLETTER_PROPERTIES);return _mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"save",data:newsletterData})},showError:function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})},handleFormChange:function(e){var item=this.state.item;return item[e.target.name]=e.target.value,this.setState({item:item}),!0},render:function(){var isPaused="sending"===this.state.item.status&&this.state.item.queue&&"paused"===this.state.item.queue.status,fields=this.state.fields.map(function(field){var newField=field;return"segments"!==field.name&&"options"!==field.name||(newField.disabled=isPaused),newField}),sendButtonOptions=this.getSendButtonOptions(),breadcrumb=_wpJsHooks2.default.applyFilters("mailpoet_newsletters_send_breadcrumb",_react2.default.createElement(_breadcrumb2.default,{step:"send"}),this.state.item.type,"send");return _react2.default.createElement("div",null,_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("finalNewsletterStep")),breadcrumb,_react2.default.createElement(_form2.default,{id:"mailpoet_newsletter",fields:fields,automationId:"newsletter_send_form",item:this.state.item,loading:this.state.loading,onChange:this.handleFormChange,onSubmit:this.handleSave},_react2.default.createElement("p",{className:"submit"},isPaused?_react2.default.createElement("input",{className:"button button-primary",type:"button",onClick:this.handleResume,value:_mailpoet2.default.I18n.t("resume")}):_react2.default.createElement("input",_extends({className:"button button-primary",type:"button",onClick:this.handleSend,value:_mailpoet2.default.I18n.t("send")},sendButtonOptions))," ",_react2.default.createElement("input",{className:"button button-secondary",type:"submit",value:_mailpoet2.default.I18n.t("saveDraftAndClose")})," ",_mailpoet2.default.I18n.t("orSimply")," ",_react2.default.createElement("a",{href:"?page=mailpoet-newsletter-editor&id="+this.props.params.id,onClick:this.handleRedirectToDesign},_mailpoet2.default.I18n.t("goBackToDesign")),"."),!isPaused&&sendButtonOptions.disabled&&"disabled"===sendButtonOptions.disabled&&_react2.default.createElement(_helpTooltip2.default,{tooltip:_mailpoet2.default.I18n.t("helpTooltipSendEmail"),tooltipId:"helpTooltipSendEmail"})))}});module.exports=NewsletterSend},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_underscore=__webpack_require__(8),_underscore2=_interopRequireDefault(_underscore),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_wpJsHooks=__webpack_require__(33),_wpJsHooks2=_interopRequireDefault(_wpJsHooks),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_date_time=__webpack_require__(649),_date_time2=_interopRequireDefault(_date_time),currentTime=window.mailpoet_current_time||"00:00",defaultDateTime=window.mailpoet_current_date+" 00:00:00",timeOfDayItems=window.mailpoet_schedule_time_of_day,dateDisplayFormat=window.mailpoet_date_display_format,dateStorageFormat=window.mailpoet_date_storage_format,StandardScheduling=function(_React$Component){function StandardScheduling(){var _ref,_temp,_this,_ret;_classCallCheck(this,StandardScheduling);for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _temp=_this=_possibleConstructorReturn(this,(_ref=StandardScheduling.__proto__||Object.getPrototypeOf(StandardScheduling)).call.apply(_ref,[this].concat(args))),_this.getCurrentValue=function(){var schedulingOptions={isScheduled:"0",scheduledAt:defaultDateTime};return _underscore2.default.defaults(_this.props.item[_this.props.field.name]||{},schedulingOptions)},_this.getDateValidation=function(){return{"data-parsley-required":!0,"data-parsley-required-message":_mailpoet2.default.I18n.t("noScheduledDateError"),"data-parsley-errors-container":"#mailpoet_scheduling"}},_this.isScheduled=function(){return"1"===_this.getCurrentValue().isScheduled},_this.handleCheckboxChange=function(event){var changeEvent=event;return changeEvent.target.value=_this.isScheduledInput.checked?"1":"0",_this.handleValueChange(changeEvent)},_this.handleValueChange=function(event){var oldValue=_this.getCurrentValue(),newValue={};return newValue[event.target.name]=event.target.value,_this.props.onValueChange({target:{name:_this.props.field.name,value:_underscore2.default.extend({},oldValue,newValue)}})},_ret=_temp,_possibleConstructorReturn(_this,_ret)}return _inherits(StandardScheduling,_React$Component),_createClass(StandardScheduling,[{key:"render",value:function(){var _this2=this,schedulingOptions=void 0;return this.isScheduled()&&(schedulingOptions=_react2.default.createElement("span",{id:"mailpoet_scheduling"},_react2.default.createElement(_date_time2.default,{name:"scheduledAt",value:this.getCurrentValue().scheduledAt,onChange:this.handleValueChange,disabled:this.props.field.disabled,dateValidation:this.getDateValidation(),defaultDateTime:defaultDateTime,timeOfDayItems:timeOfDayItems,dateDisplayFormat:dateDisplayFormat,dateStorageFormat:dateStorageFormat})," ",_react2.default.createElement("span",null,_mailpoet2.default.I18n.t("websiteTimeIs")," ",_react2.default.createElement("code",null,currentTime)))),_react2.default.createElement("div",null,_react2.default.createElement("input",{ref:function(c){_this2.isScheduledInput=c},type:"checkbox",value:"1",checked:this.isScheduled(),disabled:this.props.field.disabled,name:"isScheduled",onChange:this.handleCheckboxChange}),schedulingOptions)}}]),StandardScheduling}(_react2.default.Component);StandardScheduling.propTypes={item:_propTypes2.default.object,field:_propTypes2.default.shape({name:_propTypes2.default.string.isRequired,disabled:_propTypes2.default.bool}).isRequired,onValueChange:_propTypes2.default.func.isRequired},StandardScheduling.defaultProps={item:{}};var fields=[{name:"subject",label:_mailpoet2.default.I18n.t("subjectLine"),tip:_mailpoet2.default.I18n.t("subjectLineTip"),type:"text",validation:{"data-parsley-required":!0,"data-parsley-required-message":_mailpoet2.default.I18n.t("emptySubjectLineError")}},{name:"segments",label:_mailpoet2.default.I18n.t("segments"),tip:_mailpoet2.default.I18n.t("segmentsTip"),type:"selection",placeholder:_mailpoet2.default.I18n.t("selectSegmentPlaceholder"),id:"mailpoet_segments",api_version:window.mailpoet_api_version,endpoint:"segments",multiple:!0,filter:function(segment){return!segment.deleted_at},getLabel:function(segment){return segment.name+" ("+parseInt(segment.subscribers,10).toLocaleString()+")"},transformChangedValue:function(segmentIds){var allSegments=this.getItems();return _underscore2.default.map(segmentIds,function(id){return _underscore2.default.find(allSegments,function(segment){return segment.id===id})})},validation:{"data-parsley-required":!0,"data-parsley-required-message":_mailpoet2.default.I18n.t("noSegmentsSelectedError")}},{name:"sender",label:_mailpoet2.default.I18n.t("sender"),tip:_mailpoet2.default.I18n.t("senderTip"),fields:[{name:"sender_name",type:"text",placeholder:_mailpoet2.default.I18n.t("senderNamePlaceholder"),validation:{"data-parsley-required":!0}},{name:"sender_address",type:"text",placeholder:_mailpoet2.default.I18n.t("senderAddressPlaceholder"),validation:{"data-parsley-required":!0,"data-parsley-type":"email"}}]},{name:"reply-to",label:_mailpoet2.default.I18n.t("replyTo"),tip:_mailpoet2.default.I18n.t("replyToTip"),inline:!0,fields:[{name:"reply_to_name",type:"text",placeholder:_mailpoet2.default.I18n.t("replyToNamePlaceholder")},{name:"reply_to_address",type:"text",placeholder:_mailpoet2.default.I18n.t("replyToAddressPlaceholder"),validation:{"data-parsley-type":"email"}}]},{name:"options",label:_mailpoet2.default.I18n.t("scheduleIt"),type:"reactComponent",component:StandardScheduling}];fields=_wpJsHooks2.default.applyFilters("mailpoet_newsletters_3rd_step_fields",fields),module.exports={getFields:function(){return fields},getSendButtonOptions:function(newsletter){var newsletterOptions=newsletter||{},isScheduled="object"===_typeof(newsletterOptions.options)&&"1"===newsletterOptions.options.isScheduled,options={value:isScheduled?_mailpoet2.default.I18n.t("schedule"):_mailpoet2.default.I18n.t("send")};return"sent"!==newsletterOptions.status&&"sending"!==newsletterOptions.status||(options.disabled="disabled"),options}}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_date_text=__webpack_require__(650),_date_text2=_interopRequireDefault(_date_text),_time_select=__webpack_require__(651),_time_select2=_interopRequireDefault(_time_select),DateTime=function(_React$Component){function DateTime(props){_classCallCheck(this,DateTime);var _this=_possibleConstructorReturn(this,(DateTime.__proto__||Object.getPrototypeOf(DateTime)).call(this,props));return _initialiseProps.call(_this),_this.state=_this.buildStateFromProps(props),_this}return _inherits(DateTime,_React$Component),_createClass(DateTime,[{key:"componentWillReceiveProps",value:function(nextProps){this.setState(this.buildStateFromProps(nextProps))}},{key:"render",value:function(){return _react2.default.createElement("span",null,_react2.default.createElement(_date_text2.default,{name:"date",value:this.state.date,onChange:this.handleChange,displayFormat:this.props.dateDisplayFormat,storageFormat:this.props.dateStorageFormat,disabled:this.props.disabled,validation:this.props.dateValidation}),_react2.default.createElement(_time_select2.default,{name:"time",value:this.state.time,onChange:this.handleChange,disabled:this.props.disabled,validation:this.props.timeValidation,timeOfDayItems:this.props.timeOfDayItems}))}}]),DateTime}(_react2.default.Component),_initialiseProps=function(){var _this2=this;this.getDateTime=function(){return[_this2.state.date,_this2.state.time].join(_this2.DATE_TIME_SEPARATOR)},this.DATE_TIME_SEPARATOR=" ",this.buildStateFromProps=function(props){var value=props.value||_this2.props.defaultDateTime,_value$split=value.split(_this2.DATE_TIME_SEPARATOR),_value$split2=_slicedToArray(_value$split,2);return{date:_value$split2[0],time:_value$split2[1]}},this.handleChange=function(event){var newState={};newState[event.target.name]=event.target.value,_this2.setState(newState,_this2.propagateChange)},this.propagateChange=function(){_this2.props.onChange&&_this2.props.onChange({target:{name:_this2.props.name||"",value:_this2.getDateTime()}})}};DateTime.propTypes={defaultDateTime:_propTypes2.default.string.isRequired,dateDisplayFormat:_propTypes2.default.string.isRequired,dateStorageFormat:_propTypes2.default.string.isRequired,onChange:_propTypes2.default.func,name:_propTypes2.default.string,disabled:_propTypes2.default.bool,dateValidation:_propTypes2.default.object.isRequired,timeValidation:_propTypes2.default.any,timeOfDayItems:_propTypes2.default.objectOf(_propTypes2.default.string).isRequired},DateTime.defaultProps={onChange:void 0,name:"",disabled:!1,timeValidation:void 0},module.exports=DateTime},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_jquery=__webpack_require__(10),_jquery2=_interopRequireDefault(_jquery),_underscore=__webpack_require__(8),_underscore2=_interopRequireDefault(_underscore),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),datepickerTranslations={closeText:_mailpoet2.default.I18n.t("close"),currentText:_mailpoet2.default.I18n.t("today"),nextText:_mailpoet2.default.I18n.t("next"),prevText:_mailpoet2.default.I18n.t("previous"),monthNames:[_mailpoet2.default.I18n.t("january"),_mailpoet2.default.I18n.t("february"),_mailpoet2.default.I18n.t("march"),_mailpoet2.default.I18n.t("april"),_mailpoet2.default.I18n.t("may"),_mailpoet2.default.I18n.t("june"),_mailpoet2.default.I18n.t("july"),_mailpoet2.default.I18n.t("august"),_mailpoet2.default.I18n.t("september"),_mailpoet2.default.I18n.t("october"),_mailpoet2.default.I18n.t("november"),_mailpoet2.default.I18n.t("december")],monthNamesShort:[_mailpoet2.default.I18n.t("januaryShort"),_mailpoet2.default.I18n.t("februaryShort"),_mailpoet2.default.I18n.t("marchShort"),_mailpoet2.default.I18n.t("aprilShort"),_mailpoet2.default.I18n.t("mayShort"),_mailpoet2.default.I18n.t("juneShort"),_mailpoet2.default.I18n.t("julyShort"),_mailpoet2.default.I18n.t("augustShort"),_mailpoet2.default.I18n.t("septemberShort"),_mailpoet2.default.I18n.t("octoberShort"),_mailpoet2.default.I18n.t("novemberShort"),_mailpoet2.default.I18n.t("decemberShort")],dayNames:[_mailpoet2.default.I18n.t("sunday"),_mailpoet2.default.I18n.t("monday"),_mailpoet2.default.I18n.t("tuesday"),_mailpoet2.default.I18n.t("wednesday"),_mailpoet2.default.I18n.t("thursday"),_mailpoet2.default.I18n.t("friday"),_mailpoet2.default.I18n.t("saturday")],dayNamesShort:[_mailpoet2.default.I18n.t("sundayShort"),_mailpoet2.default.I18n.t("mondayShort"),_mailpoet2.default.I18n.t("tuesdayShort"),_mailpoet2.default.I18n.t("wednesdayShort"),_mailpoet2.default.I18n.t("thursdayShort"),_mailpoet2.default.I18n.t("fridayShort"),_mailpoet2.default.I18n.t("saturdayShort")],dayNamesMin:[_mailpoet2.default.I18n.t("sundayMin"),_mailpoet2.default.I18n.t("mondayMin"),_mailpoet2.default.I18n.t("tuesdayMin"),_mailpoet2.default.I18n.t("wednesdayMin"),_mailpoet2.default.I18n.t("thursdayMin"),_mailpoet2.default.I18n.t("fridayMin"),_mailpoet2.default.I18n.t("saturdayMin")]},DateText=function(_React$Component){function DateText(){var _ref,_temp,_this,_ret;_classCallCheck(this,DateText);for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _temp=_this=_possibleConstructorReturn(this,(_ref=DateText.__proto__||Object.getPrototypeOf(DateText)).call.apply(_ref,[this].concat(args))),_this.onChange=function(event){var changeEvent=event,displayDate=changeEvent.target.value,storageDate=_this.getStorageDate(displayDate);changeEvent.target.value=storageDate,_this.props.onChange(changeEvent)},_this.getFieldName=function(){return _this.props.name||"date"},_this.getDisplayDate=function(date){var formatting={parseFormat:_this.props.storageFormat,format:_this.props.displayFormat};return _mailpoet2.default.Date.format(date,formatting)},_this.getStorageDate=function(date){var formatting={parseFormat:_this.props.displayFormat,format:_this.props.storageFormat};return _mailpoet2.default.Date.format(date,formatting)},_ret=_temp,_possibleConstructorReturn(_this,_ret)}return _inherits(DateText,_React$Component),_createClass(DateText,[{key:"componentDidMount",value:function(){var $element=(0,_jquery2.default)(this.dateInput),that=this;$element.datepicker&&(_jquery2.default.datepicker.parseDate=function(format,value){return _mailpoet2.default.Date.toDate(value,{parseFormat:this.props.displayFormat,format:format})},_jquery2.default.datepicker.formatDate=function(format,value){return _mailpoet2.default.Date.format(value,{format:format})},$element.datepicker(_underscore2.default.extend({dateFormat:this.props.displayFormat,isRTL:!1,onSelect:function(value){that.onChange({target:{name:that.getFieldName(),value:value}})}},datepickerTranslations)),this.datepickerInitialized=!0)}},{key:"componentWillUnmount",value:function(){this.datepickerInitialized&&(0,_jquery2.default)(this.dateInput).datepicker("destroy")}},{key:"render",value:function(){var _this2=this;return _react2.default.createElement("input",_extends({type:"text",size:"30",name:this.getFieldName(),value:this.getDisplayDate(this.props.value),readOnly:!0,disabled:this.props.disabled,onChange:this.onChange,ref:function(c){_this2.dateInput=c}},this.props.validation))}}]),DateText}(_react2.default.Component);DateText.propTypes={displayFormat:_propTypes2.default.string.isRequired,onChange:_propTypes2.default.func.isRequired,name:_propTypes2.default.string,storageFormat:_propTypes2.default.string.isRequired,value:_propTypes2.default.string.isRequired,disabled:_propTypes2.default.bool.isRequired,validation:_propTypes2.default.object.isRequired},DateText.defaultProps={name:"date"},module.exports=DateText},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),TimeSelect=function(_React$Component){function TimeSelect(){return _classCallCheck(this,TimeSelect),_possibleConstructorReturn(this,(TimeSelect.__proto__||Object.getPrototypeOf(TimeSelect)).apply(this,arguments))}return _inherits(TimeSelect,_React$Component),_createClass(TimeSelect,[{key:"render",value:function(){var _this2=this,options=Object.keys(this.props.timeOfDayItems).map(function(value){return _react2.default.createElement("option",{key:"option-"+_this2.props.timeOfDayItems[value],value:value},_this2.props.timeOfDayItems[value])});return _react2.default.createElement("select",_extends({name:this.props.name||"time",value:this.props.value,disabled:this.props.disabled,onChange:this.props.onChange},this.props.validation),options)}}]),TimeSelect}(_react2.default.Component);TimeSelect.propTypes={timeOfDayItems:_propTypes2.default.objectOf(_propTypes2.default.string).isRequired,name:_propTypes2.default.string,value:_propTypes2.default.string.isRequired,disabled:_propTypes2.default.bool,onChange:_propTypes2.default.func.isRequired,validation:_propTypes2.default.object},TimeSelect.defaultProps={name:"time",disabled:!1,validation:{}},module.exports=TimeSelect},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _underscore=__webpack_require__(8),_underscore2=_interopRequireDefault(_underscore),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_wpJsHooks=__webpack_require__(33),_wpJsHooks2=_interopRequireDefault(_wpJsHooks),_scheduling=__webpack_require__(520),_scheduling2=_interopRequireDefault(_scheduling),fields=[{name:"subject",label:_mailpoet2.default.I18n.t("subjectLine"),tip:_mailpoet2.default.I18n.t("postNotificationSubjectLineTip"),type:"text",validation:{"data-parsley-required":!0,"data-parsley-required-message":_mailpoet2.default.I18n.t("emptySubjectLineError")}},{name:"options",label:_mailpoet2.default.I18n.t("selectFrequency"),type:"reactComponent",component:_scheduling2.default},{name:"segments",label:_mailpoet2.default.I18n.t("segments"),tip:_mailpoet2.default.I18n.t("segmentsTip"),type:"selection",placeholder:_mailpoet2.default.I18n.t("selectSegmentPlaceholder"),id:"mailpoet_segments",api_version:window.mailpoet_api_version,endpoint:"segments",multiple:!0,filter:function(segment){return!segment.deleted_at},getLabel:function(segment){return segment.name+" ("+parseInt(segment.subscribers,10).toLocaleString()+")"},transformChangedValue:function(segmentIds){var allSegments=this.getItems();return _underscore2.default.map(segmentIds,function(id){return _underscore2.default.find(allSegments,function(segment){return segment.id===id})})},validation:{"data-parsley-required":!0,"data-parsley-required-message":_mailpoet2.default.I18n.t("noSegmentsSelectedError")}},{name:"sender",label:_mailpoet2.default.I18n.t("sender"),tip:_mailpoet2.default.I18n.t("senderTip"),fields:[{name:"sender_name",type:"text",placeholder:_mailpoet2.default.I18n.t("senderNamePlaceholder"),validation:{"data-parsley-required":!0}},{name:"sender_address",type:"text",placeholder:_mailpoet2.default.I18n.t("senderAddressPlaceholder"),validation:{"data-parsley-required":!0,"data-parsley-type":"email"}}]},{name:"reply-to",label:_mailpoet2.default.I18n.t("replyTo"),tip:_mailpoet2.default.I18n.t("replyToTip"),inline:!0,fields:[{name:"reply_to_name",type:"text",placeholder:_mailpoet2.default.I18n.t("replyToNamePlaceholder")},{name:"reply_to_address",type:"text",placeholder:_mailpoet2.default.I18n.t("replyToAddressPlaceholder"),validation:{"data-parsley-type":"email"}}]}];fields=_wpJsHooks2.default.applyFilters("mailpoet_newsletters_3rd_step_fields",fields),module.exports={getFields:function(){return fields},getSendButtonOptions:function(){return{value:_mailpoet2.default.I18n.t("activate")}}}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_wpJsHooks=__webpack_require__(33),_wpJsHooks2=_interopRequireDefault(_wpJsHooks),_scheduling=__webpack_require__(476),_scheduling2=_interopRequireDefault(_scheduling),fields=[{name:"subject",label:_mailpoet2.default.I18n.t("subjectLine"),tip:_mailpoet2.default.I18n.t("subjectLineTip"),type:"text",validation:{"data-parsley-required":!0,"data-parsley-required-message":_mailpoet2.default.I18n.t("emptySubjectLineError")}},{name:"options",label:_mailpoet2.default.I18n.t("sendWelcomeEmailWhen"),type:"reactComponent",component:_scheduling2.default},{name:"sender",label:_mailpoet2.default.I18n.t("sender"),tip:_mailpoet2.default.I18n.t("senderTip"),fields:[{name:"sender_name",type:"text",placeholder:_mailpoet2.default.I18n.t("senderNamePlaceholder"),validation:{"data-parsley-required":!0}},{name:"sender_address",type:"text",placeholder:_mailpoet2.default.I18n.t("senderAddressPlaceholder"),validation:{"data-parsley-required":!0,"data-parsley-type":"email"}}]},{name:"reply-to",label:_mailpoet2.default.I18n.t("replyTo"),tip:_mailpoet2.default.I18n.t("replyToTip"),inline:!0,fields:[{name:"reply_to_name",type:"text",placeholder:_mailpoet2.default.I18n.t("replyToNamePlaceholder")},{name:"reply_to_address",type:"text",placeholder:_mailpoet2.default.I18n.t("replyToAddressPlaceholder"),validation:{"data-parsley-type":"email"}}]}];fields=_wpJsHooks2.default.applyFilters("mailpoet_newsletters_3rd_step_fields",fields),module.exports={getFields:function(){return fields},getSendButtonOptions:function(){return{value:_mailpoet2.default.I18n.t("activate")}}}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}function successPageClosed(){return _mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"settings",action:"set",data:{show_congratulate_after_first_newsletter:!1}}).always(function(){window.location=window.mailpoet_main_page})}function renderSuccess(newsletter,testingPassed){return testingPassed&&_mailpoet2.default.trackEvent("Cron testing done",{"Cron is working":"true"}),_react2.default.createElement(_success2.default,{illustrationImageUrl:window.mailpoet_congratulations_success_image,successClicked:successPageClosed,newsletter:newsletter})}function renderFail(){return _mailpoet2.default.trackEvent("Cron testing done",{"Cron is working":"false"}),_react2.default.createElement(_fail2.default,{failClicked:function(){window.location=window.mailpoet_main_page}})}function renderLoading(showRichLoadingScreen){return _react2.default.createElement(_loading2.default,{illustrationImageUrl:window.mailpoet_congratulations_loading_image,successClicked:successPageClosed,showRichLoadingScreen:showRichLoadingScreen})}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_moment=__webpack_require__(0),_moment2=_interopRequireDefault(_moment),_success=__webpack_require__(655),_success2=_interopRequireDefault(_success),_fail=__webpack_require__(656),_fail2=_interopRequireDefault(_fail),_loading=__webpack_require__(657),_loading2=_interopRequireDefault(_loading),Congratulate=function(_React$Component){function Congratulate(props){_classCallCheck(this,Congratulate);var _this=_possibleConstructorReturn(this,(Congratulate.__proto__||Object.getPrototypeOf(Congratulate)).call(this,props));return _this.state={loading:!0,fail:!1,newsletter:null,testingPassed:!1,timeStart:(0,_moment2.default)(),minimumLoadingTimePassed:!1},_this.tick=_this.tick.bind(_this),_this}return _inherits(Congratulate,_React$Component),_createClass(Congratulate,[{key:"componentDidMount",value:function(){this.loadNewsletter(this.props.params.id),this.tick()}},{key:"componentWillReceiveProps",value:function(props){this.loadNewsletter(props.params.id)}},{key:"tick",value:function(){(0,_moment2.default)().subtract(20,"second").isAfter(this.state.timeStart)&&this.setState({error:!0,loading:!1}),this.state.loading&&this.loadNewsletter(this.props.params.id),(0,_moment2.default)().subtract(6,"seconds").isAfter(this.state.timeStart)&&this.setState({minimumLoadingTimePassed:!0}),!this.state.loading&&this.state.minimumLoadingTimePassed||setTimeout(this.tick,2e3)}},{key:"loadNewsletter",value:function(id){var _this2=this;_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"get",data:{id:id}}).done(function(response){return _this2.newsletterLoaded(response.data)})}},{key:"newsletterLoaded",value:function(newsletter){"standard"!==newsletter.type||"scheduled"===newsletter.status?this.setState({newsletter:newsletter,loading:!1,minimumLoadingTimePassed:!0}):"sent"===newsletter.status||"sending"===newsletter.status?this.setState({newsletter:newsletter,loading:!1,testingPassed:!0}):this.setState({newsletter:newsletter})}},{key:"renderContent",value:function(){return this.state.loading||!this.state.minimumLoadingTimePassed?renderLoading(!!this.state.newsletter):this.state.error?renderFail():renderSuccess(this.state.newsletter,this.state.testingPassed)}},{key:"render",value:function(){return _react2.default.createElement("div",{className:"newsletter_congratulate_page"},this.renderContent())}}]),Congratulate}(_react2.default.Component);Congratulate.propTypes={params:_propTypes2.default.shape({id:_propTypes2.default.string.isRequired}).isRequired},module.exports=Congratulate},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function renderHeader(newsletter){return"welcome"===newsletter.type?_mailpoet2.default.I18n.t("congratulationsWelcomeEmailSuccessHeader"):"notification"===newsletter.type?_mailpoet2.default.I18n.t("congratulationsPostNotificationSuccessHeader"):"automatic"===newsletter.type?_mailpoet2.default.I18n.t("congratulationsWooSuccessHeader"):"scheduled"===newsletter.status?_mailpoet2.default.I18n.t("congratulationsScheduleSuccessHeader"):_mailpoet2.default.I18n.t("congratulationsSendSuccessHeader")}function Success(props){return _react2.default.createElement("div",{className:"mailpoet_congratulate_success"},_react2.default.createElement("h1",null,renderHeader(props.newsletter)),_react2.default.createElement("img",{src:props.illustrationImageUrl,alt:"",width:"750",height:"250"}),_react2.default.createElement("button",{className:"button",onClick:props.successClicked},_mailpoet2.default.I18n.t("close")))}var _react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet);Success.propTypes={successClicked:_propTypes2.default.func.isRequired,illustrationImageUrl:_propTypes2.default.string.isRequired,newsletter:_propTypes2.default.shape({status:_propTypes2.default.string.isRequired,type:_propTypes2.default.string.isRequired}).isRequired},module.exports=Success},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function Fail(props){return _react2.default.createElement("div",{className:"mailpoet_centered"},_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("congratulationsSendFailHeader")),_react2.default.createElement("p",null,(0,_reactStringReplace2.default)(_mailpoet2.default.I18n.t("congratulationsSendFailExplain"),/\[link\](.*?)\[\/link\]/g,function(match,i){return _react2.default.createElement("a",{key:i,target:"_blank",rel:"noopener noreferrer",href:"https://kb.mailpoet.com/article/231-sending-does-not-work"},match)})),_react2.default.createElement("button",{className:"button",onClick:props.failClicked},_mailpoet2.default.I18n.t("close")))}var _react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_reactStringReplace=__webpack_require__(63),_reactStringReplace2=_interopRequireDefault(_reactStringReplace),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet);Fail.propTypes={failClicked:_propTypes2.default.func.isRequired},module.exports=Fail},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function renderRichData(showRichData,illustrationImageUrl){return showRichData?_react2.default.createElement("div",null,_react2.default.createElement("h1",{className:"mailpoet_newsletter_loading_header"},_mailpoet2.default.I18n.t("congratulationsLoadingHeader")),_react2.default.createElement("img",{src:illustrationImageUrl,alt:"",width:"800px",height:"266px"})):_react2.default.createElement("div",null)}function Loading(props){return _react2.default.createElement("div",{className:"mailpoet_newsletter_loading"},_react2.default.createElement(_loading2.default,null),renderRichData(props.showRichLoadingScreen,props.illustrationImageUrl))}var _react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_loading=__webpack_require__(658),_loading2=_interopRequireDefault(_loading);Loading.propTypes={illustrationImageUrl:_propTypes2.default.string.isRequired,showRichLoadingScreen:_propTypes2.default.bool.isRequired},module.exports=Loading},function(module,exports,__webpack_require__){"use strict";function Loading(){return _react2.default.createElement("div",{className:"mailpoet_loading"},_react2.default.createElement("div",{className:"mailpoet_modal_loading mailpoet_modal_loading_1"}),_react2.default.createElement("div",{className:"mailpoet_modal_loading mailpoet_modal_loading_2"}),_react2.default.createElement("div",{className:"mailpoet_modal_loading mailpoet_modal_loading_3"}))}var _react=__webpack_require__(2),_react2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_react);module.exports=Loading},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_breadcrumb=__webpack_require__(59),_breadcrumb2=_interopRequireDefault(_breadcrumb),NewsletterStandard=function(_React$Component){function NewsletterStandard(){var _ref,_temp,_this,_ret;_classCallCheck(this,NewsletterStandard);for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _temp=_this=_possibleConstructorReturn(this,(_ref=NewsletterStandard.__proto__||Object.getPrototypeOf(NewsletterStandard)).call.apply(_ref,[this].concat(args))),_this.showTemplateSelection=function(newsletterId){_this.context.router.push("/template/"+newsletterId)},_ret=_temp,_possibleConstructorReturn(_this,_ret)}return _inherits(NewsletterStandard,_React$Component),_createClass(NewsletterStandard,[{key:"componentDidMount",value:function(){var _this2=this;_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"create",data:{type:"standard"}}).done(function(response){_this2.showTemplateSelection(response.data.id)}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{key:"render",value:function(){return _react2.default.createElement("div",null,_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("regularNewsletterTypeTitle")),_react2.default.createElement(_breadcrumb2.default,{step:"type"}))}}]),NewsletterStandard}(_react2.default.Component);NewsletterStandard.contextTypes={router:_propTypes2.default.object.isRequired},module.exports=NewsletterStandard},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_breadcrumb=__webpack_require__(59),_breadcrumb2=_interopRequireDefault(_breadcrumb),_underscore=__webpack_require__(8),_underscore2=_interopRequireDefault(_underscore),_scheduling=__webpack_require__(520),_scheduling2=_interopRequireDefault(_scheduling),field={name:"options",type:"reactComponent",component:_scheduling2.default},NewsletterNotification=function(_React$Component){function NewsletterNotification(){var _ref,_temp,_this,_ret;_classCallCheck(this,NewsletterNotification);for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _temp=_this=_possibleConstructorReturn(this,(_ref=NewsletterNotification.__proto__||Object.getPrototypeOf(NewsletterNotification)).call.apply(_ref,[this].concat(args))),_this.state={options:{intervalType:"daily",timeOfDay:0,weekDay:1,monthDay:0,nthWeekDay:1}},_this.handleValueChange=function(event){var state=_this.state;state[event.target.name]=event.target.value,_this.setState(state)},_this.handleNext=function(){_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"create",data:_underscore2.default.extend({},_this.state,{type:"notification",subject:_mailpoet2.default.I18n.t("draftNewsletterTitle")})}).done(function(response){_this.showTemplateSelection(response.data.id)}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})},_this.showTemplateSelection=function(newsletterId){_this.context.router.push("/template/"+newsletterId)},_ret=_temp,_possibleConstructorReturn(_this,_ret)}return _inherits(NewsletterNotification,_React$Component),_createClass(NewsletterNotification,[{key:"render",value:function(){return _react2.default.createElement("div",null,_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("postNotificationNewsletterTypeTitle")),_react2.default.createElement(_breadcrumb2.default,{step:"type"}),_react2.default.createElement("h3",null,_mailpoet2.default.I18n.t("selectFrequency")),_react2.default.createElement(_scheduling2.default,{item:this.state,field:field,onValueChange:this.handleValueChange}),_react2.default.createElement("p",{className:"submit"},_react2.default.createElement("input",{className:"button button-primary",type:"button",onClick:this.handleNext,value:_mailpoet2.default.I18n.t("next")})))}}]),NewsletterNotification}(_react2.default.Component);NewsletterNotification.contextTypes={router:_propTypes2.default.object.isRequired},module.exports=NewsletterNotification},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_underscore=__webpack_require__(8),_underscore2=_interopRequireDefault(_underscore),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_breadcrumb=__webpack_require__(59),_breadcrumb2=_interopRequireDefault(_breadcrumb),_scheduling=__webpack_require__(476),_scheduling2=_interopRequireDefault(_scheduling),field={name:"options",label:"Event",type:"reactComponent",component:_scheduling2.default},NewsletterWelcome=function(_React$Component){function NewsletterWelcome(props){_classCallCheck(this,NewsletterWelcome);var _this=_possibleConstructorReturn(this,(NewsletterWelcome.__proto__||Object.getPrototypeOf(NewsletterWelcome)).call(this,props)),availableSegments=window.mailpoet_segments||[],defaultSegment=1;return availableSegments=availableSegments.filter(function(segment){return"default"===segment.type}),_underscore2.default.size(availableSegments)>0&&(defaultSegment=_underscore2.default.first(availableSegments).id),_this.state={options:{event:"segment",segment:defaultSegment,role:"subscriber",afterTimeNumber:1,afterTimeType:"immediate"}},_this.handleValueChange=_this.handleValueChange.bind(_this),_this.handleNext=_this.handleNext.bind(_this),_this}return _inherits(NewsletterWelcome,_React$Component),_createClass(NewsletterWelcome,[{key:"handleValueChange",value:function(event){var state=this.state;state[event.target.name]=event.target.value,this.setState(state)}},{key:"handleNext",value:function(){var _this2=this;_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"create",data:_underscore2.default.extend({},this.state,{type:"welcome",subject:_mailpoet2.default.I18n.t("draftNewsletterTitle")})}).done(function(response){_this2.showTemplateSelection(response.data.id)}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{key:"showTemplateSelection",value:function(newsletterId){this.props.router.push("/template/"+newsletterId)}},{key:"render",value:function(){return _react2.default.createElement("div",null,_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("welcomeNewsletterTypeTitle")),_react2.default.createElement(_breadcrumb2.default,{step:"type"}),_react2.default.createElement("h3",null,_mailpoet2.default.I18n.t("selectEventToSendWelcomeEmail")),_react2.default.createElement(_scheduling2.default,{item:this.state,field:field,onValueChange:this.handleValueChange}),_react2.default.createElement("p",{className:"submit"},_react2.default.createElement("input",{className:"button button-primary",type:"button",onClick:this.handleNext,value:_mailpoet2.default.I18n.t("next")})))}}]),NewsletterWelcome}(_react2.default.Component);NewsletterWelcome.propTypes={router:_propTypes2.default.shape({push:_propTypes2.default.func.isRequired}).isRequired},exports.default=NewsletterWelcome},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_createReactClass=__webpack_require__(19),_createReactClass2=_interopRequireDefault(_createReactClass),_reactConfirmAlert=__webpack_require__(519),_classnames=__webpack_require__(18),_classnames2=_interopRequireDefault(_classnames),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_wpJsHooks=__webpack_require__(33),_wpJsHooks2=_interopRequireDefault(_wpJsHooks),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_listing=__webpack_require__(64),_listing2=_interopRequireDefault(_listing),_tabs=__webpack_require__(275),_tabs2=_interopRequireDefault(_tabs),_heading=__webpack_require__(277),_heading2=_interopRequireDefault(_heading),_mixins=__webpack_require__(276),mailpoetTrackingEnabled=!!window.mailpoet_tracking_enabled,messages={onTrash:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneNewsletterTrashed"):_mailpoet2.default.I18n.t("multipleNewslettersTrashed").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onDelete:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneNewsletterDeleted"):_mailpoet2.default.I18n.t("multipleNewslettersDeleted").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onRestore:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneNewsletterRestored"):_mailpoet2.default.I18n.t("multipleNewslettersRestored").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)}},columns=[{name:"subject",label:_mailpoet2.default.I18n.t("subject"),sortable:!0},{name:"status",label:_mailpoet2.default.I18n.t("status")},{name:"segments",label:_mailpoet2.default.I18n.t("lists")},{name:"statistics",label:_mailpoet2.default.I18n.t("statistics"),display:mailpoetTrackingEnabled},{name:"sent_at",label:_mailpoet2.default.I18n.t("sentOn"),sortable:!0}],bulkActions=[{name:"trash",label:_mailpoet2.default.I18n.t("moveToTrash"),onSuccess:messages.onTrash}],confirmEdit=function(newsletter){var redirectToEditing=function(){window.location.href="?page=mailpoet-newsletter-editor&id="+newsletter.id};newsletter.queue&&"sending"===newsletter.status&&null===newsletter.queue.status?(0,_reactConfirmAlert.confirmAlert)({title:_mailpoet2.default.I18n.t("confirmTitle"),message:_mailpoet2.default.I18n.t("confirmEdit"),confirmLabel:_mailpoet2.default.I18n.t("confirmLabel"),cancelLabel:_mailpoet2.default.I18n.t("cancelLabel"),onConfirm:redirectToEditing}):redirectToEditing()},newsletterActions=[{name:"view",link:function(newsletter){return _react2.default.createElement("a",{href:newsletter.preview_url,target:"_blank"},_mailpoet2.default.I18n.t("preview"))}},{name:"edit",label:_mailpoet2.default.I18n.t("edit"),onClick:confirmEdit},{name:"duplicate",label:_mailpoet2.default.I18n.t("duplicate"),onClick:function(newsletter,refresh){return _mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"duplicate",data:{id:newsletter.id}}).done(function(response){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("newsletterDuplicated").replace("%$1s",response.data.subject)),refresh()}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{name:"trash"}];_wpJsHooks2.default.addFilter("mailpoet_newsletters_listings_standard_actions",_mixins.StatisticsMixin.addStatsCTAAction),newsletterActions=_wpJsHooks2.default.applyFilters("mailpoet_newsletters_listings_standard_actions",newsletterActions);var NewsletterListStandard=(0,_createReactClass2.default)({displayName:"NewsletterListStandard",propTypes:{location:_propTypes2.default.object.isRequired,params:_propTypes2.default.object.isRequired},mixins:[_mixins.QueueMixin,_mixins.StatisticsMixin,_mixins.MailerMixin,_mixins.CronMixin],renderItem:function(newsletter,actions,meta){var rowClasses=(0,_classnames2.default)("manage-column","column-primary","has-row-actions"),segments=newsletter.segments.map(function(segment){return segment.name}).join(", ");return _react2.default.createElement("div",null,_react2.default.createElement("td",{className:rowClasses},_react2.default.createElement("strong",null,_react2.default.createElement("a",{className:"row-title",href:"javascript:;",onClick:function(){return confirmEdit(newsletter)}},newsletter.queue.newsletter_rendered_subject||newsletter.subject)),actions),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("status")},this.renderQueueStatus(newsletter,meta.mta_log)),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("lists")},segments),!0===mailpoetTrackingEnabled?_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("statistics")},this.renderStatistics(newsletter,void 0,meta.current_time)):null,_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("sentOn")},_react2.default.createElement("abbr",null,newsletter.sent_at?_mailpoet2.default.Date.format(newsletter.sent_at):_mailpoet2.default.I18n.t("notSentYet"))))},render:function(){var _this=this;return _react2.default.createElement("div",null,_react2.default.createElement(_heading2.default,null),_react2.default.createElement(_tabs2.default,{tab:"standard"}),_react2.default.createElement(_listing2.default,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.params,endpoint:"newsletters",type:"standard",base_url:"standard",onRenderItem:this.renderItem,columns:columns,bulk_actions:bulkActions,item_actions:newsletterActions,messages:messages,auto_refresh:!0,sort_by:"sent_at",sort_order:"desc",afterGetItems:function(state){_this.checkMailerStatus(state),_this.checkCronStatus(state)}}))}});module.exports=NewsletterListStandard},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_createReactClass=__webpack_require__(19),_createReactClass2=_interopRequireDefault(_createReactClass),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_listing=__webpack_require__(64),_listing2=_interopRequireDefault(_listing),_tabs=__webpack_require__(275),_tabs2=_interopRequireDefault(_tabs),_heading=__webpack_require__(277),_heading2=_interopRequireDefault(_heading),_mixins=__webpack_require__(276),_classnames=__webpack_require__(18),_classnames2=_interopRequireDefault(_classnames),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_underscore=__webpack_require__(8),_underscore2=_interopRequireDefault(_underscore),_wpJsHooks=__webpack_require__(33),_wpJsHooks2=_interopRequireDefault(_wpJsHooks),mailpoetRoles=window.mailpoet_roles||{},mailpoetSegments=window.mailpoet_segments||{},mailpoetTrackingEnabled=!!window.mailpoet_tracking_enabled,messages={onTrash:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneNewsletterTrashed"):_mailpoet2.default.I18n.t("multipleNewslettersTrashed").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onDelete:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneNewsletterDeleted"):_mailpoet2.default.I18n.t("multipleNewslettersDeleted").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onRestore:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneNewsletterRestored"):_mailpoet2.default.I18n.t("multipleNewslettersRestored").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)}},columns=[{name:"subject",label:_mailpoet2.default.I18n.t("subject"),sortable:!0},{name:"status",label:_mailpoet2.default.I18n.t("status"),width:145},{name:"settings",label:_mailpoet2.default.I18n.t("settings")},{name:"statistics",label:_mailpoet2.default.I18n.t("statistics"),display:mailpoetTrackingEnabled},{name:"updated_at",label:_mailpoet2.default.I18n.t("lastModifiedOn"),sortable:!0}],bulkActions=[{name:"trash",label:_mailpoet2.default.I18n.t("moveToTrash"),onSuccess:messages.onTrash}],newsletterActions=[{name:"view",link:function(newsletter){return _react2.default.createElement("a",{href:newsletter.preview_url,target:"_blank"},_mailpoet2.default.I18n.t("preview"))}},{name:"duplicate",label:_mailpoet2.default.I18n.t("duplicate"),onClick:function(newsletter,refresh){return _mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"duplicate",data:{id:newsletter.id}}).done(function(response){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("newsletterDuplicated").replace("%$1s",response.data.subject)),refresh()}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{name:"edit",link:function(newsletter){return _react2.default.createElement("a",{href:"?page=mailpoet-newsletter-editor&id="+newsletter.id},_mailpoet2.default.I18n.t("edit"))}},{name:"trash"}];_wpJsHooks2.default.addFilter("mailpoet_newsletters_listings_welcome_notification_actions",_mixins.StatisticsMixin.addStatsCTAAction),newsletterActions=_wpJsHooks2.default.applyFilters("mailpoet_newsletters_listings_welcome_notification_actions",newsletterActions);var NewsletterListWelcome=(0,_createReactClass2.default)({displayName:"NewsletterListWelcome",propTypes:{location:_propTypes2.default.object.isRequired,params:_propTypes2.default.object.isRequired},mixins:[_mixins.StatisticsMixin,_mixins.MailerMixin,_mixins.CronMixin],updateStatus:function(e){var _this=this;e.persist(),_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"setStatus",data:{id:Number(e.target.getAttribute("data-id")),status:e.target.value}}).done(function(response){"active"===response.data.status&&_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("welcomeEmailActivated")),_this.forceUpdate()}).fail(function(response){_mailpoet2.default.Notice.error(_mailpoet2.default.I18n.t("welcomeEmailActivationFailed")),e.target.value=response.status})},renderStatus:function(newsletter){var totalSentMessage=_mailpoet2.default.I18n.t("sentToXSubscribers").replace("%$1d",newsletter.total_sent.toLocaleString()),totalScheduledMessage=_mailpoet2.default.I18n.t("scheduledToXSubscribers").replace("%$1d",newsletter.total_scheduled.toLocaleString());return _react2.default.createElement("div",null,_react2.default.createElement("p",null,_react2.default.createElement("select",{"data-id":newsletter.id,defaultValue:newsletter.status,onChange:this.updateStatus},_react2.default.createElement("option",{value:"active"},_mailpoet2.default.I18n.t("active")),_react2.default.createElement("option",{value:"draft"},_mailpoet2.default.I18n.t("inactive")))),_react2.default.createElement("p",null,totalSentMessage," ",_react2.default.createElement("br",null),totalScheduledMessage))},renderSettings:function(newsletter){var sendingEvent=void 0,sendingDelay=void 0,segment=void 0;switch(newsletter.options.event){case"user":sendingEvent="mailpoet_all"===newsletter.options.role?_mailpoet2.default.I18n.t("welcomeEventWPUserAnyRole"):_mailpoet2.default.I18n.t("welcomeEventWPUserWithRole").replace("%$1s",mailpoetRoles[newsletter.options.role]);break;default:if(void 0===(segment=_underscore2.default.find(mailpoetSegments,function(seg){return Number(seg.id)===Number(newsletter.options.segment)})))return _react2.default.createElement("span",{className:"mailpoet_error"},_mailpoet2.default.I18n.t("sendingToSegmentsNotSpecified"));sendingEvent=_mailpoet2.default.I18n.t("welcomeEventSegment").replace("%$1s",segment.name)}if(sendingEvent&&"immediate"!==newsletter.options.afterTimeType){switch(newsletter.options.afterTimeType){case"hours":sendingDelay=_mailpoet2.default.I18n.t("sendingDelayHours").replace("%$1d",newsletter.options.afterTimeNumber);break;case"days":sendingDelay=_mailpoet2.default.I18n.t("sendingDelayDays").replace("%$1d",newsletter.options.afterTimeNumber);break;case"weeks":sendingDelay=_mailpoet2.default.I18n.t("sendingDelayWeeks").replace("%$1d",newsletter.options.afterTimeNumber);break;default:sendingDelay=_mailpoet2.default.I18n.t("sendingDelayInvalid")}sendingEvent+=" ["+sendingDelay+"]."}return _react2.default.createElement("span",null,sendingEvent)},renderItem:function(newsletter,actions){var rowClasses=(0,_classnames2.default)("manage-column","column-primary","has-row-actions");return _react2.default.createElement("div",null,_react2.default.createElement("td",{className:rowClasses},_react2.default.createElement("strong",null,_react2.default.createElement("a",{className:"row-title",href:"?page=mailpoet-newsletter-editor&id="+newsletter.id},newsletter.subject)),actions),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("status")},this.renderStatus(newsletter)),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("settings")},this.renderSettings(newsletter)),!0===mailpoetTrackingEnabled?_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("statistics")},this.renderStatistics(newsletter,newsletter.total_sent>0&&newsletter.statistics)):null,_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("lastModifiedOn")},_react2.default.createElement("abbr",null,_mailpoet2.default.Date.format(newsletter.updated_at))))},render:function(){var _this2=this;return _react2.default.createElement("div",null,_react2.default.createElement(_heading2.default,null),_react2.default.createElement(_tabs2.default,{tab:"welcome"}),_react2.default.createElement(_listing2.default,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.params,endpoint:"newsletters",type:"welcome",base_url:"welcome",onRenderItem:this.renderItem,columns:columns,bulk_actions:bulkActions,item_actions:newsletterActions,messages:messages,auto_refresh:!0,sort_by:"updated_at",sort_order:"desc",afterGetItems:function(state){_this2.checkMailerStatus(state),_this2.checkCronStatus(state)}}))}});module.exports=NewsletterListWelcome},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_createReactClass=__webpack_require__(19),_createReactClass2=_interopRequireDefault(_createReactClass),_reactRouter=__webpack_require__(26),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_listing=__webpack_require__(64),_listing2=_interopRequireDefault(_listing),_tabs=__webpack_require__(275),_tabs2=_interopRequireDefault(_tabs),_heading=__webpack_require__(277),_heading2=_interopRequireDefault(_heading),_mixins=__webpack_require__(276),_classnames=__webpack_require__(18),_classnames2=_interopRequireDefault(_classnames),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_common=__webpack_require__(477),messages={onTrash:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneNewsletterTrashed"):_mailpoet2.default.I18n.t("multipleNewslettersTrashed").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onDelete:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneNewsletterDeleted"):_mailpoet2.default.I18n.t("multipleNewslettersDeleted").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onRestore:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneNewsletterRestored"):_mailpoet2.default.I18n.t("multipleNewslettersRestored").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)}},columns=[{name:"subject",label:_mailpoet2.default.I18n.t("subject"),sortable:!0},{name:"status",label:_mailpoet2.default.I18n.t("status"),width:100},{name:"settings",label:_mailpoet2.default.I18n.t("settings")},{name:"history",label:_mailpoet2.default.I18n.t("history"),width:100},{name:"updated_at",label:_mailpoet2.default.I18n.t("lastModifiedOn"),sortable:!0}],bulkActions=[{name:"trash",label:_mailpoet2.default.I18n.t("moveToTrash"),onSuccess:messages.onTrash}],newsletterActions=[{name:"view",link:function(newsletter){return _react2.default.createElement("a",{href:newsletter.preview_url,target:"_blank"},_mailpoet2.default.I18n.t("preview"))}},{name:"edit",link:function(newsletter){return _react2.default.createElement("a",{href:"?page=mailpoet-newsletter-editor&id="+newsletter.id},_mailpoet2.default.I18n.t("edit"))}},{name:"duplicate",label:_mailpoet2.default.I18n.t("duplicate"),onClick:function(newsletter,refresh){return _mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"duplicate",data:{id:newsletter.id}}).done(function(response){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("newsletterDuplicated").replace("%$1s",response.data.subject)),refresh()}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{name:"trash"}],NewsletterListNotification=(0,_createReactClass2.default)({displayName:"NewsletterListNotification",propTypes:{location:_propTypes2.default.object.isRequired,params:_propTypes2.default.object.isRequired},mixins:[_mixins.MailerMixin,_mixins.CronMixin],updateStatus:function(e){var _this=this;e.persist(),_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"setStatus",data:{id:Number(e.target.getAttribute("data-id")),status:e.target.value}}).done(function(response){"active"===response.data.status&&_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("postNotificationActivated")),_this.forceUpdate()}).fail(function(response){_mailpoet2.default.Notice.error(_mailpoet2.default.I18n.t("postNotificationActivationFailed")),e.target.value=response.status})},renderStatus:function(newsletter){return _react2.default.createElement("select",{"data-id":newsletter.id,defaultValue:newsletter.status,onChange:this.updateStatus},_react2.default.createElement("option",{value:"active"},_mailpoet2.default.I18n.t("active")),_react2.default.createElement("option",{value:"draft"},_mailpoet2.default.I18n.t("inactive")))},renderSettings:function(newsletter){var sendingFrequency=void 0,segments=newsletter.segments.map(function(segment){return segment.name}),sendingToSegments=_mailpoet2.default.I18n.t("ifNewContentToSegments").replace("%$1s",segments.join(", "));if(0===segments.length)return _react2.default.createElement("span",{className:"mailpoet_error"},_mailpoet2.default.I18n.t("sendingToSegmentsNotSpecified"));switch(newsletter.options.intervalType){case"daily":sendingFrequency=_mailpoet2.default.I18n.t("sendDaily").replace("%$1s",_common.timeOfDayValues[newsletter.options.timeOfDay]);break;case"weekly":sendingFrequency=_mailpoet2.default.I18n.t("sendWeekly").replace("%$1s",_common.weekDayValues[newsletter.options.weekDay]).replace("%$2s",_common.timeOfDayValues[newsletter.options.timeOfDay]);break;case"monthly":sendingFrequency=_mailpoet2.default.I18n.t("sendMonthly").replace("%$1s",_common.monthDayValues[newsletter.options.monthDay]).replace("%$2s",_common.timeOfDayValues[newsletter.options.timeOfDay]);break;case"nthWeekDay":sendingFrequency=_mailpoet2.default.I18n.t("sendNthWeekDay").replace("%$1s",_common.nthWeekDayValues[newsletter.options.nthWeekDay]).replace("%$2s",_common.weekDayValues[newsletter.options.weekDay]).replace("%$3s",_common.timeOfDayValues[newsletter.options.timeOfDay]);break;case"immediately":sendingFrequency=_mailpoet2.default.I18n.t("sendImmediately");break;default:sendingFrequency="Invalid sending frequency"}return _react2.default.createElement("span",null,sendingFrequency," ",sendingToSegments)},renderHistoryLink:function(newsletter){return 0===Number(newsletter.children_count)?_mailpoet2.default.I18n.t("notSentYet"):_react2.default.createElement(_reactRouter.Link,{"data-automation-id":"history-"+newsletter.id,to:"/notification/history/"+newsletter.id},_mailpoet2.default.I18n.t("viewHistory"))},renderItem:function(newsletter,actions){var rowClasses=(0,_classnames2.default)("manage-column","column-primary","has-row-actions");return _react2.default.createElement("div",null,_react2.default.createElement("td",{className:rowClasses},_react2.default.createElement("strong",null,_react2.default.createElement("a",{className:"row-title",href:"?page=mailpoet-newsletter-editor&id="+newsletter.id},newsletter.subject)),actions),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("status")},this.renderStatus(newsletter)),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("settings")},this.renderSettings(newsletter)),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("history")},this.renderHistoryLink(newsletter)),_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("lastModifiedOn")},_react2.default.createElement("abbr",null,_mailpoet2.default.Date.format(newsletter.updated_at))))},render:function(){var _this2=this;return _react2.default.createElement("div",null,_react2.default.createElement(_heading2.default,null),_react2.default.createElement(_tabs2.default,{tab:"notification"}),_react2.default.createElement(_listing2.default,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.params,endpoint:"newsletters",type:"notification",base_url:"notification",onRenderItem:this.renderItem,columns:columns,bulk_actions:bulkActions,item_actions:newsletterActions,messages:messages,auto_refresh:!0,sort_by:"updated_at",sort_order:"desc",afterGetItems:function(state){_this2.checkMailerStatus(state),_this2.checkCronStatus(state)}}))}});module.exports=NewsletterListNotification},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_createReactClass=__webpack_require__(19),_createReactClass2=_interopRequireDefault(_createReactClass),_reactRouter=__webpack_require__(26),_classnames=__webpack_require__(18),_classnames2=_interopRequireDefault(_classnames),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_wpJsHooks=__webpack_require__(33),_wpJsHooks2=_interopRequireDefault(_wpJsHooks),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_listing=__webpack_require__(64),_listing2=_interopRequireDefault(_listing),_tabs=__webpack_require__(275),_tabs2=_interopRequireDefault(_tabs),_heading=__webpack_require__(277),_heading2=_interopRequireDefault(_heading),_mixins=__webpack_require__(276),mailpoetTrackingEnabled=!!window.mailpoet_tracking_enabled,columns=[{name:"subject",label:_mailpoet2.default.I18n.t("subject")},{name:"status",label:_mailpoet2.default.I18n.t("status")},{name:"segments",label:_mailpoet2.default.I18n.t("lists")},{name:"statistics",label:_mailpoet2.default.I18n.t("statistics"),display:mailpoetTrackingEnabled},{name:"sent_at",label:_mailpoet2.default.I18n.t("sentOn")}],newsletterActions=[{name:"view",link:function(newsletter){return _react2.default.createElement("a",{href:newsletter.preview_url,target:"_blank"},_mailpoet2.default.I18n.t("preview"))}}];_wpJsHooks2.default.addFilter("mailpoet_newsletters_listings_notification_history_actions",_mixins.StatisticsMixin.addStatsCTAAction),newsletterActions=_wpJsHooks2.default.applyFilters("mailpoet_newsletters_listings_notification_history_actions",newsletterActions);var NewsletterListNotificationHistory=(0,_createReactClass2.default)({displayName:"NewsletterListNotificationHistory",propTypes:{location:_propTypes2.default.object.isRequired,params:_propTypes2.default.object.isRequired},mixins:[_mixins.QueueMixin,_mixins.StatisticsMixin,_mixins.MailerMixin,_mixins.CronMixin],renderItem:function(newsletter,actions,meta){var rowClasses=(0,_classnames2.default)("manage-column","column-primary","has-row-actions"),segments=newsletter.segments.map(function(segment){return segment.name}).join(", ");return _react2.default.createElement("div",null,_react2.default.createElement("td",{className:rowClasses},_react2.default.createElement("strong",null,_react2.default.createElement("a",{href:newsletter.preview_url,target:"_blank"},newsletter.queue.newsletter_rendered_subject||newsletter.subject)),actions),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("status")},this.renderQueueStatus(newsletter,meta.mta_log)),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("lists")},segments),!0===mailpoetTrackingEnabled?_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("statistics")},this.renderStatistics(newsletter,void 0,meta.current_time)):null,_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("sentOn")},newsletter.sent_at?_mailpoet2.default.Date.format(newsletter.sent_at):_mailpoet2.default.I18n.t("notSentYet")))},render:function(){var _this=this;return _react2.default.createElement("div",null,_react2.default.createElement(_heading2.default,null),_react2.default.createElement(_tabs2.default,{tab:"notification"}),_react2.default.createElement(_reactRouter.Link,{className:"page-title-action",to:"/notification"},_mailpoet2.default.I18n.t("backToPostNotifications")),_react2.default.createElement(_listing2.default,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.params,endpoint:"newsletters",type:"notification_history",base_url:"notification/history/:parent_id",onRenderItem:this.renderItem,columns:columns,item_actions:newsletterActions,auto_refresh:!0,sort_by:"sent_at",sort_order:"desc",afterGetItems:function(state){_this.checkMailerStatus(state),_this.checkCronStatus(state)}}))}});module.exports=NewsletterListNotificationHistory},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_reactDom=__webpack_require__(28),_reactDom2=_interopRequireDefault(_reactDom),_reactRouter=__webpack_require__(26),_history=__webpack_require__(92),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_list=__webpack_require__(667),_list2=_interopRequireDefault(_list),_form=__webpack_require__(668),_form2=_interopRequireDefault(_form),history=(0,_reactRouter.useRouterHistory)(_history.createHashHistory)({queryKey:!1}),App=function(_React$Component){function App(){return _classCallCheck(this,App),_possibleConstructorReturn(this,(App.__proto__||Object.getPrototypeOf(App)).apply(this,arguments))}return _inherits(App,_React$Component),_createClass(App,[{key:"render",value:function(){return this.props.children}}]),App}(_react2.default.Component);App.propTypes={children:_propTypes2.default.element.isRequired};var container=document.getElementById("segments_container");container&&_reactDom2.default.render(_react2.default.createElement(_reactRouter.Router,{history:history},_react2.default.createElement(_reactRouter.Route,{path:"/",component:App},_react2.default.createElement(_reactRouter.IndexRoute,{component:_list2.default}),_react2.default.createElement(_reactRouter.Route,{path:"new",component:_form2.default}),_react2.default.createElement(_reactRouter.Route,{path:"edit/:id",component:_form2.default}),_react2.default.createElement(_reactRouter.Route,{path:"*",component:_list2.default}))),container)},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_reactRouter=__webpack_require__(26),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_classnames=__webpack_require__(18),_classnames2=_interopRequireDefault(_classnames),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_listing=__webpack_require__(64),_listing2=_interopRequireDefault(_listing),columns=[{name:"name",label:_mailpoet2.default.I18n.t("name"),sortable:!0},{name:"description",label:_mailpoet2.default.I18n.t("description")},{name:"subscribed",label:_mailpoet2.default.I18n.t("subscribed")},{name:"unconfirmed",label:_mailpoet2.default.I18n.t("unconfirmed")},{name:"unsubscribed",label:_mailpoet2.default.I18n.t("unsubscribed")},{name:"bounced",label:_mailpoet2.default.I18n.t("bounced")},{name:"created_at",label:_mailpoet2.default.I18n.t("createdOn"),sortable:!0}],messages={onTrash:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneSegmentTrashed"):_mailpoet2.default.I18n.t("multipleSegmentsTrashed").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onDelete:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneSegmentDeleted"):_mailpoet2.default.I18n.t("multipleSegmentsDeleted").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onRestore:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneSegmentRestored"):_mailpoet2.default.I18n.t("multipleSegmentsRestored").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)}},bulkActions=[{name:"trash",label:_mailpoet2.default.I18n.t("moveToTrash"),onSuccess:messages.onTrash}],itemActions=[{name:"edit",link:function(item){return _react2.default.createElement(_reactRouter.Link,{to:"/edit/"+item.id},_mailpoet2.default.I18n.t("edit"))},display:function(segment){return"wp_users"!==segment.type}},{name:"duplicate_segment",label:_mailpoet2.default.I18n.t("duplicate"),onClick:function(item,refresh){return _mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"segments",action:"duplicate",data:{id:item.id}}).done(function(response){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("listDuplicated").replace("%$1s",response.data.name)),refresh()}).fail(function(response){_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})},display:function(segment){return"wp_users"!==segment.type}},{name:"read_more",link:function(){return _react2.default.createElement("a",{href:"http://docs.mailpoet.com/article/133-the-wordpress-users-list",target:"_blank",rel:"noopener noreferrer"},_mailpoet2.default.I18n.t("readMore"))},display:function(segment){return"wp_users"===segment.type}},{name:"synchronize_segment",label:_mailpoet2.default.I18n.t("forceSync"),onClick:function(item,refresh){_mailpoet2.default.Modal.loading(!0),_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"segments",action:"synchronize"}).done(function(){_mailpoet2.default.Modal.loading(!1),_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("listSynchronized").replace("%$1s",item.name)),refresh()}).fail(function(response){_mailpoet2.default.Modal.loading(!1),response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})},display:function(segment){return"wp_users"===segment.type}},{name:"view_subscribers",link:function(item){return _react2.default.createElement("a",{href:item.subscribers_url},_mailpoet2.default.I18n.t("viewSubscribers"))}},{name:"trash",display:function(segment){return"wp_users"!==segment.type}}],SegmentList=function(_React$Component){function SegmentList(){var _ref,_temp,_this,_ret;_classCallCheck(this,SegmentList);for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _temp=_this=_possibleConstructorReturn(this,(_ref=SegmentList.__proto__||Object.getPrototypeOf(SegmentList)).call.apply(_ref,[this].concat(args))),_this.renderItem=function(segment,actions){var rowClasses=(0,_classnames2.default)("manage-column","column-primary","has-row-actions"),subscribed=Number(segment.subscribers_count.subscribed||0),unconfirmed=Number(segment.subscribers_count.unconfirmed||0),unsubscribed=Number(segment.subscribers_count.unsubscribed||0),bounced=Number(segment.subscribers_count.bounced||0),segmentName=void 0;return segmentName="wp_users"===segment.type?_react2.default.createElement("span",{className:"row-title"},segment.name):_react2.default.createElement(_reactRouter.Link,{className:"row-title",to:"/edit/"+segment.id},segment.name),_react2.default.createElement("div",null,_react2.default.createElement("td",{className:rowClasses},_react2.default.createElement("strong",null,segmentName),actions),_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("description")},_react2.default.createElement("abbr",null,segment.description)),_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("subscribed")},_react2.default.createElement("abbr",null,subscribed.toLocaleString())),_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("unconfirmed")},_react2.default.createElement("abbr",null,unconfirmed.toLocaleString())),_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("unsubscribed")},_react2.default.createElement("abbr",null,unsubscribed.toLocaleString())),_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("bounced")},_react2.default.createElement("abbr",null,bounced.toLocaleString())),_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("createdOn")},_react2.default.createElement("abbr",null,_mailpoet2.default.Date.format(segment.created_at))))},_ret=_temp,_possibleConstructorReturn(_this,_ret)}return _inherits(SegmentList,_React$Component),_createClass(SegmentList,[{key:"render",value:function(){return _react2.default.createElement("div",null,_react2.default.createElement("h1",{className:"title"},_mailpoet2.default.I18n.t("pageTitle")," ",_react2.default.createElement(_reactRouter.Link,{className:"page-title-action",to:"/new"},_mailpoet2.default.I18n.t("new"))),_react2.default.createElement(_listing2.default,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.params,messages:messages,search:!1,endpoint:"segments",onRenderItem:this.renderItem,columns:columns,bulk_actions:bulkActions,item_actions:itemActions,sort_by:"name",sort_order:"asc"}))}}]),SegmentList}(_react2.default.Component);SegmentList.propTypes={location:_propTypes2.default.object.isRequired,params:_propTypes2.default.object.isRequired},module.exports=SegmentList},function(module,exports,__webpack_require__){"use strict";(function(global){global.MailPoetLib||(global.MailPoetLib={}),module.exports=global.MailPoetLib.Form=__webpack_require__(669)}).call(exports,__webpack_require__(9))},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(exports,"__esModule",{value:!0});var _react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_reactRouter=__webpack_require__(26),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_form=__webpack_require__(290),_form2=_interopRequireDefault(_form),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),fields=[{name:"name",label:_mailpoet2.default.I18n.t("name"),type:"text"},{name:"description",label:_mailpoet2.default.I18n.t("description"),type:"textarea",tip:_mailpoet2.default.I18n.t("segmentDescriptionTip")}],messages={onUpdate:function(){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("segmentUpdated"))},onCreate:function(){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("segmentAdded")),_mailpoet2.default.trackEvent("Lists > Add new",{"MailPoet Free version":window.mailpoet_version})}},SegmentForm=function(_ref){var params=_ref.params;return _react2.default.createElement("div",null,_react2.default.createElement("h1",{className:"title"},_mailpoet2.default.I18n.t("segment"),_react2.default.createElement(_reactRouter.Link,{className:"page-title-action",to:"/"},_mailpoet2.default.I18n.t("backToList"))),_react2.default.createElement(_form2.default,{endpoint:"segments",fields:fields,params:params,messages:messages}))};SegmentForm.propTypes={params:_propTypes2.default.shape({id:_propTypes2.default.string}).isRequired},exports.default=SegmentForm},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_reactDom=__webpack_require__(28),_reactDom2=_interopRequireDefault(_reactDom),_reactRouter=__webpack_require__(26),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_history=__webpack_require__(92),_list=__webpack_require__(671),_list2=_interopRequireDefault(_list),history=(0,_reactRouter.useRouterHistory)(_history.createHashHistory)({queryKey:!1}),App=function(_React$Component){function App(){return _classCallCheck(this,App),_possibleConstructorReturn(this,(App.__proto__||Object.getPrototypeOf(App)).apply(this,arguments))}return _inherits(App,_React$Component),_createClass(App,[{key:"render",value:function(){return this.props.children}}]),App}(_react2.default.Component);App.propTypes={children:_propTypes2.default.element.isRequired};var container=document.getElementById("forms_container");container&&_reactDom2.default.render(_react2.default.createElement(_reactRouter.Router,{history:history},_react2.default.createElement(_reactRouter.Route,{path:"/",component:App},_react2.default.createElement(_reactRouter.IndexRoute,{component:_list2.default}),_react2.default.createElement(_reactRouter.Route,{path:"*",component:_list2.default}))),container)},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_classnames=__webpack_require__(18),_classnames2=_interopRequireDefault(_classnames),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_jquery=__webpack_require__(10),_jquery2=_interopRequireDefault(_jquery),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_listing=__webpack_require__(64),_listing2=_interopRequireDefault(_listing),columns=[{name:"name",label:_mailpoet2.default.I18n.t("formName"),sortable:!0},{name:"segments",label:_mailpoet2.default.I18n.t("segments")},{name:"signups",label:_mailpoet2.default.I18n.t("signups")},{name:"created_at",label:_mailpoet2.default.I18n.t("createdOn"),sortable:!0}],messages={onTrash:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneFormTrashed"):_mailpoet2.default.I18n.t("multipleFormsTrashed").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onDelete:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneFormDeleted"):_mailpoet2.default.I18n.t("multipleFormsDeleted").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onRestore:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneFormRestored"):_mailpoet2.default.I18n.t("multipleFormsRestored").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)}},bulkActions=[{name:"trash",label:_mailpoet2.default.I18n.t("moveToTrash"),onSuccess:messages.onTrash}],itemActions=[{name:"edit",label:_mailpoet2.default.I18n.t("edit"),link:function(item){return _react2.default.createElement("a",{href:"admin.php?page=mailpoet-form-editor&id="+item.id},_mailpoet2.default.I18n.t("edit"))}},{name:"duplicate",label:_mailpoet2.default.I18n.t("duplicate"),onClick:function(item,refresh){return _mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"forms",action:"duplicate",data:{id:item.id}}).done(function(response){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("formDuplicated").replace("%$1s",response.data.name)),refresh()}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{name:"trash"}],FormList=function(_React$Component){function FormList(){var _ref,_temp,_this,_ret;_classCallCheck(this,FormList);for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _temp=_this=_possibleConstructorReturn(this,(_ref=FormList.__proto__||Object.getPrototypeOf(FormList)).call.apply(_ref,[this].concat(args))),_this.createForm=function(){_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"forms",action:"create"}).done(function(response){window.location=window.mailpoet_form_edit_url+response.data.id}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})},_this.renderItem=function(form,actions){var rowClasses=(0,_classnames2.default)("manage-column","column-primary","has-row-actions"),segments=window.mailpoet_segments.filter(function(segment){return-1!==_jquery2.default.inArray(segment.id,form.segments)}).map(function(segment){return segment.name}).join(", ");return"user"===form.settings.segments_selected_by&&(segments=_mailpoet2.default.I18n.t("userChoice")+" "+segments),_react2.default.createElement("div",null,_react2.default.createElement("td",{className:rowClasses},_react2.default.createElement("strong",null,_react2.default.createElement("a",{className:"row-title",href:"admin.php?page=mailpoet-form-editor&id="+form.id},form.name)),actions),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("segments")},segments),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("signups")},form.signups),_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("createdOn")},_react2.default.createElement("abbr",null,_mailpoet2.default.Date.format(form.created_at))))},_ret=_temp,_possibleConstructorReturn(_this,_ret)}return _inherits(FormList,_React$Component),_createClass(FormList,[{key:"render",value:function(){return _react2.default.createElement("div",null,_react2.default.createElement("h1",{className:"title"},_mailpoet2.default.I18n.t("pageTitle")," ",_react2.default.createElement("a",{className:"page-title-action",href:"javascript:;",onClick:this.createForm,"data-automation-id":"create_new_form"},_mailpoet2.default.I18n.t("new"))),_react2.default.createElement(_listing2.default,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.params,messages:messages,search:!1,endpoint:"forms",onRenderItem:this.renderItem,columns:columns,bulk_actions:bulkActions,item_actions:itemActions}))}}]),FormList}(_react2.default.Component);FormList.propTypes={location:_propTypes2.default.object.isRequired,params:_propTypes2.default.object.isRequired},module.exports=FormList},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(39),__webpack_require__(10),__webpack_require__(4)],void 0!==(__WEBPACK_AMD_DEFINE_RESULT__=function(Backbone,jQuery,mp){var MailPoet=mp;0!==jQuery("#mailpoet_settings").length&&(MailPoet.Router=new(Backbone.Router.extend({routes:{"":"defaultRoute","mta(/:group)":"sendingMethodGroup","(:tab)":"tabs"},defaultRoute:function(){this.tabs("basics")},sendingMethodGroup:function(group){this.tabs("mta"),jQuery("#mailpoet_sending_method_setup, .mailpoet_sending_method").hide(),jQuery(".mailpoet_settings_submit").hide(),null===group?jQuery(".mailpoet_sending_methods, .mailpoet_sending_methods_help").fadeIn():(jQuery("#mailpoet_mta_spf")["mailpoet"===group?"hide":"show"](),jQuery(".mailpoet_sending_methods, .mailpoet_sending_methods_help").hide(),jQuery('.mailpoet_sending_method[data-group="'+group+'"]').show(),jQuery("#mailpoet_sending_method_setup").fadeIn())},tabs:function(tab){jQuery(".nav-tab-wrapper a").removeClass("nav-tab-active"),jQuery(".mailpoet_panel, .mailpoet_section").hide(),jQuery('a.nav-tab[href="#'+tab+'"]').addClass("nav-tab-active").blur(),jQuery('.mailpoet_panel[data-tab="'+tab+'"]').length>0&&jQuery('.mailpoet_panel[data-tab="'+tab+'"]').show(),jQuery(".mailpoet_settings_submit").show(),MailPoet.trackEvent("User has clicked a tab in Settings",{"MailPoet Free version":window.mailpoet_version,"Tab ID":tab})}})),jQuery(document).ready(function(){Backbone.History.started||Backbone.history.start()}))}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__))&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_reactDom=__webpack_require__(28),_reactDom2=_interopRequireDefault(_reactDom),_reactRouter=__webpack_require__(26),_history=__webpack_require__(92),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_knowledge_base=__webpack_require__(674),_knowledge_base2=_interopRequireDefault(_knowledge_base),_system_info=__webpack_require__(675),_system_info2=_interopRequireDefault(_system_info),_system_status=__webpack_require__(676),_system_status2=_interopRequireDefault(_system_status),_your_privacy=__webpack_require__(682),_your_privacy2=_interopRequireDefault(_your_privacy),history=(0,_reactRouter.useRouterHistory)(_history.createHashHistory)({queryKey:!1}),App=function(_React$Component){function App(){return _classCallCheck(this,App),_possibleConstructorReturn(this,(App.__proto__||Object.getPrototypeOf(App)).apply(this,arguments))}return _inherits(App,_React$Component),_createClass(App,[{key:"render",value:function(){return this.props.children}}]),App}(_react2.default.Component);App.propTypes={children:_propTypes2.default.element.isRequired};var container=document.getElementById("help_container");container&&_reactDom2.default.render(_react2.default.createElement(_reactRouter.Router,{history:history},_react2.default.createElement(_reactRouter.Route,{path:"/",component:App},_react2.default.createElement(_reactRouter.IndexRedirect,{to:"knowledgeBase"}),_react2.default.createElement(_reactRouter.Route,{path:"knowledgeBase(/)**",params:{tab:"knowledgeBase"},component:_knowledge_base2.default}),_react2.default.createElement(_reactRouter.Route,{path:"systemStatus(/)**",params:{tab:"systemStatus"},component:_system_status2.default}),_react2.default.createElement(_reactRouter.Route,{path:"systemInfo(/)**",params:{tab:"systemInfo"},component:_system_info2.default}),_react2.default.createElement(_reactRouter.Route,{path:"yourPrivacy(/)**",params:{tab:"yourPrivacy"},component:_your_privacy2.default}))),container)},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function KnowledgeBase(){return _react2.default.createElement("div",null,_react2.default.createElement(_tabs2.default,{tab:"knowledgeBase"}),_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("knowledgeBaseIntro")),_react2.default.createElement("ul",null,_react2.default.createElement("li",null,_react2.default.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/116-common-problems"},"Common Problems")),_react2.default.createElement("li",null,_react2.default.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/165-newsletters"},"Newsletters")),_react2.default.createElement("li",null,_react2.default.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/156-migration-questions"},"Migration Questions")),_react2.default.createElement("li",null,_react2.default.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/149-sending-methods"},"Sending Methods")),_react2.default.createElement("li",null,_react2.default.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/139-subscription-forms"},"Subscription Forms")),_react2.default.createElement("li",null,_react2.default.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/114-getting-started"},"Getting Started")),_react2.default.createElement("li",null,_react2.default.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/123-newsletter-designer"},"Newsletter Designer")),_react2.default.createElement("li",null,_react2.default.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/121-subscribers-and-lists"},"Subscribers and Lists"))),_react2.default.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/",className:"button button-primary"},_mailpoet2.default.I18n.t("knowledgeBaseButton")))}var _react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_tabs=__webpack_require__(294),_tabs2=_interopRequireDefault(_tabs);module.exports=KnowledgeBase},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function handleFocus(event){event.target.select()}function printData(data){if(_underscore2.default.isObject(data)){var printableData=Object.keys(data).map(function(key){return key+": "+data[key]});return _react2.default.createElement("textarea",{readOnly:!0,onFocus:handleFocus,value:printableData.join("\n"),style:{width:"100%",height:"400px"}})}return _react2.default.createElement("p",null,_mailpoet2.default.I18n.t("systemInfoDataError"))}function SystemInfo(){var systemInfoData=window.systemInfoData;return _react2.default.createElement("div",null,_react2.default.createElement(_tabs2.default,{tab:"systemInfo"}),_react2.default.createElement("div",{className:"mailpoet_notice notice inline",style:{marginTop:"1em"}},_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("systemInfoIntro"))),printData(systemInfoData))}var _react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_underscore=__webpack_require__(8),_underscore2=_interopRequireDefault(_underscore),_tabs=__webpack_require__(294),_tabs2=_interopRequireDefault(_tabs);module.exports=SystemInfo},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function renderStatusMessage(status,error,link){var noticeType=status?"success":"error",noticeMessage=status?_mailpoet2.default.I18n.t("systemStatusConnectionSuccessful"):_mailpoet2.default.I18n.t("systemStatusConnectionUnsuccessful")+" "+error;return link&&(noticeMessage=(0,_reactStringReplace2.default)(noticeMessage,/\[link\](.*?)\[\/link\]/g,function(match){return _react2.default.createElement("a",{href:""+link,key:"kb-link"},match)})),_react2.default.createElement("div",{className:"mailpoet_notice notice inline notice-"+noticeType,style:{marginTop:"1em"}},_react2.default.createElement("p",null,noticeMessage))}function renderCronSection(data){var status=data.cron.isReachable,url=data.cron.url;return _react2.default.createElement("div",null,_react2.default.createElement("h2",null,_mailpoet2.default.I18n.t("systemStatusCronTitle")),_react2.default.createElement("p",null,_react2.default.createElement("a",{href:url,target:"_blank"},url)),renderStatusMessage(status,_mailpoet2.default.I18n.t("systemStatusCronConnectionUnsuccessfulInfo"),"//beta.docs.mailpoet.com/article/231-sending-does-not-work"))}function renderMSSSection(data){if(data.mss.enabled){var status=data.mss.enabled.isReachable;return _react2.default.createElement("div",null,_react2.default.createElement("h2",null,_mailpoet2.default.I18n.t("systemStatusMSSTitle")),renderStatusMessage(status,_mailpoet2.default.I18n.t("systemStatusMSSConnectionUnsuccessfulInfo"),!1))}}function SystemStatus(){var systemStatusData=window.systemStatusData;return _react2.default.createElement("div",null,_react2.default.createElement(_tabs2.default,{tab:"systemStatus"}),_react2.default.createElement("div",{className:"mailpoet_notice notice inline",style:{marginTop:"1em"}},_react2.default.createElement("p",null,systemStatusData.mss.enabled?_mailpoet2.default.I18n.t("systemStatusIntroCronMSS"):_mailpoet2.default.I18n.t("systemStatusIntroCron"))),renderCronSection(systemStatusData),renderMSSSection(systemStatusData),_react2.default.createElement(_cron_status2.default,{status_data:systemStatusData.cronStatus}),_react2.default.createElement(_queue_status2.default,{status_data:systemStatusData.queueStatus}))}var _mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_reactStringReplace=__webpack_require__(63),_reactStringReplace2=_interopRequireDefault(_reactStringReplace),_cron_status=__webpack_require__(677),_cron_status2=_interopRequireDefault(_cron_status),_queue_status=__webpack_require__(679),_queue_status2=_interopRequireDefault(_queue_status),_tabs=__webpack_require__(294),_tabs2=_interopRequireDefault(_tabs);module.exports=SystemStatus},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_key_value_table=__webpack_require__(521),_key_value_table2=_interopRequireDefault(_key_value_table),_print_boolean=__webpack_require__(678),_print_boolean2=_interopRequireDefault(_print_boolean),CronStatus=function(props){var status=props.status_data,activeStatusMapping={active:_mailpoet2.default.I18n.t("running"),inactive:_mailpoet2.default.I18n.t("cronWaiting")};return _react2.default.createElement("div",null,_react2.default.createElement("h2",null,_mailpoet2.default.I18n.t("systemStatusCronStatusTitle")),_react2.default.createElement(_key_value_table2.default,{max_width:"400px",rows:[{key:_mailpoet2.default.I18n.t("accessible"),value:_react2.default.createElement(_print_boolean2.default,null,status.accessible)},{key:_mailpoet2.default.I18n.t("status"),value:activeStatusMapping[status.status]?activeStatusMapping[status.status]:_mailpoet2.default.I18n.t("unknown")},{key:_mailpoet2.default.I18n.t("lastUpdated"),value:status.updated_at?_mailpoet2.default.Date.full(1e3*status.updated_at):_mailpoet2.default.I18n.t("unknown")},{key:_mailpoet2.default.I18n.t("lastRunStarted"),value:status.run_accessed_at?_mailpoet2.default.Date.full(1e3*status.run_started_at):_mailpoet2.default.I18n.t("unknown")},{key:_mailpoet2.default.I18n.t("lastRunCompleted"),value:status.run_completed_at?_mailpoet2.default.Date.full(1e3*status.run_completed_at):_mailpoet2.default.I18n.t("unknown")},{key:_mailpoet2.default.I18n.t("lastSeenError"),value:status.last_error||_mailpoet2.default.I18n.t("none")}]}))};CronStatus.propTypes={status_data:_propTypes2.default.shape({accessible:_propTypes2.default.bool,status:_propTypes2.default.string,updated_at:_propTypes2.default.number,run_accessed_at:_propTypes2.default.number,run_completed_at:_propTypes2.default.number}).isRequired},CronStatus.defaultProps={status_data:{accessible:null,status:null,updated_at:null,run_accessed_at:null,run_completed_at:null}},module.exports=CronStatus},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),PrintBoolean=function(props){return _react2.default.createElement("span",null,!0===props.children&&props.truthy||!1===props.children&&props.falsy||props.unknown)};PrintBoolean.propTypes={truthy:_propTypes2.default.string,falsy:_propTypes2.default.string,unknown:_propTypes2.default.string,children:_propTypes2.default.bool},PrintBoolean.defaultProps={truthy:_mailpoet2.default.I18n.t("yes"),falsy:_mailpoet2.default.I18n.t("no"),unknown:_mailpoet2.default.I18n.t("unknown"),children:null},module.exports=PrintBoolean},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_key_value_table=__webpack_require__(521),_key_value_table2=_interopRequireDefault(_key_value_table),_tasks_list=__webpack_require__(680),_tasks_list2=_interopRequireDefault(_tasks_list),_tasks_list_data_row=__webpack_require__(522),_tasks_list_data_row2=_interopRequireDefault(_tasks_list_data_row),QueueStatus=function(props){var status=props.status_data;return _react2.default.createElement("div",null,_react2.default.createElement("h2",null,_mailpoet2.default.I18n.t("systemStatusQueueTitle")),_react2.default.createElement(_key_value_table2.default,{max_width:"400px",rows:[{key:_mailpoet2.default.I18n.t("status"),value:"paused"===status.status?_mailpoet2.default.I18n.t("paused"):_mailpoet2.default.I18n.t("running")},{key:_mailpoet2.default.I18n.t("startedAt"),value:status.started?_mailpoet2.default.Date.full(1e3*status.started):_mailpoet2.default.I18n.t("unknown")},{key:_mailpoet2.default.I18n.t("sentEmails"),value:status.sent||0},{key:_mailpoet2.default.I18n.t("retryAttempt"),value:status.retry_attempt||_mailpoet2.default.I18n.t("none")},{key:_mailpoet2.default.I18n.t("retryAt"),value:status.retry_at?_mailpoet2.default.Date.full(1e3*status.retry_at):_mailpoet2.default.I18n.t("none")},{key:_mailpoet2.default.I18n.t("error"),value:status.error?status.error.error_message:_mailpoet2.default.I18n.t("none")},{key:_mailpoet2.default.I18n.t("totalCompletedTasks"),value:status.tasksStatusCounts.completed},{key:_mailpoet2.default.I18n.t("totalRunningTasks"),value:status.tasksStatusCounts.running},{key:_mailpoet2.default.I18n.t("totalPausedTasks"),value:status.tasksStatusCounts.paused},{key:_mailpoet2.default.I18n.t("totalScheduledTasks"),value:status.tasksStatusCounts.scheduled}]}),_react2.default.createElement("h4",null,_mailpoet2.default.I18n.t("scheduledTasks")),_react2.default.createElement(_tasks_list2.default,{show_scheduled_at:!0,tasks:status.latestTasks.filter(function(task){return"scheduled"===task.status})}),_react2.default.createElement("h4",null,_mailpoet2.default.I18n.t("runningTasks")),_react2.default.createElement(_tasks_list2.default,{tasks:status.latestTasks.filter(function(task){return null===task.status})}),_react2.default.createElement("h4",null,_mailpoet2.default.I18n.t("completedTasks")),_react2.default.createElement(_tasks_list2.default,{tasks:status.latestTasks.filter(function(task){return"completed"===task.status})}))};QueueStatus.propTypes={status_data:_propTypes2.default.shape({status:_propTypes2.default.string,started:_propTypes2.default.number,sent:_propTypes2.default.number,retry_attempt:_propTypes2.default.number,retry_at:_propTypes2.default.number,error:_propTypes2.default.shape({operation:_propTypes2.default.string,error_message:_propTypes2.default.string}),tasksStatusCounts:_propTypes2.default.shape({completed:_propTypes2.default.number.isRequired,running:_propTypes2.default.number.isRequired,paused:_propTypes2.default.number.isRequired,scheduled:_propTypes2.default.number.isRequired}).isRequired,latestTasks:_propTypes2.default.arrayOf(_tasks_list_data_row2.default.propTypes.task).isRequired}).isRequired},QueueStatus.defaultProps={status_data:{status:null,started:null,sent:null,retry_attempt:null,retry_at:null,error:null}},module.exports=QueueStatus},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_tasks_list_data_row=__webpack_require__(522),_tasks_list_data_row2=_interopRequireDefault(_tasks_list_data_row),_tasks_list_labels_row=__webpack_require__(681),_tasks_list_labels_row2=_interopRequireDefault(_tasks_list_labels_row),TasksList=function(props){var colsCount=props.show_scheduled_at?6:5;return _react2.default.createElement("table",{className:"widefat fixed striped"},_react2.default.createElement("thead",null,_react2.default.createElement(_tasks_list_labels_row2.default,{show_scheduled_at:props.show_scheduled_at})),_react2.default.createElement("tbody",null,props.tasks.length?props.tasks.map(function(task){return _react2.default.createElement(_tasks_list_data_row2.default,{key:task.id,task:task,show_scheduled_at:props.show_scheduled_at})}):_react2.default.createElement("tr",{className:"no-items"},_react2.default.createElement("td",{colSpan:colsCount},_mailpoet2.default.I18n.t("nothingToShow")))),_react2.default.createElement("tfoot",null,_react2.default.createElement(_tasks_list_labels_row2.default,{show_scheduled_at:props.show_scheduled_at})))};TasksList.propTypes={show_scheduled_at:_propTypes2.default.bool,tasks:_propTypes2.default.arrayOf(_tasks_list_data_row2.default.propTypes.task).isRequired},TasksList.defaultProps={show_scheduled_at:!1},module.exports=TasksList},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),TasksListLabelsRow=function(props){return _react2.default.createElement("tr",null,_react2.default.createElement("th",{className:"row-title"},"Id"),_react2.default.createElement("th",{className:"row-title"},_mailpoet2.default.I18n.t("type")),_react2.default.createElement("th",{className:"row-title"},_mailpoet2.default.I18n.t("email")),_react2.default.createElement("th",{className:"row-title"},_mailpoet2.default.I18n.t("priority")),props.show_scheduled_at?_react2.default.createElement("th",{className:"row-title"},_mailpoet2.default.I18n.t("scheduledAt")):null,_react2.default.createElement("th",{className:"row-title"},_mailpoet2.default.I18n.t("updatedAt")))};TasksListLabelsRow.propTypes={show_scheduled_at:_propTypes2.default.bool},TasksListLabelsRow.defaultProps={show_scheduled_at:!1},module.exports=TasksListLabelsRow},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function YourPrivacy(){return _react2.default.createElement("div",null,_react2.default.createElement(_tabs2.default,{tab:"yourPrivacy"}),_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("yourPrivacyContent1")),_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("yourPrivacyContent2")),_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("yourPrivacyContent3")),_react2.default.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"https://www.mailpoet.com/privacy-notice/",className:"button button-primary"},_mailpoet2.default.I18n.t("yourPrivacyButton")))}var _react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_tabs=__webpack_require__(294),_tabs2=_interopRequireDefault(_tabs);module.exports=YourPrivacy},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function Intro(){if(!(introActive||innerWidth<=960)){var intro=(0,_intro2.default)();intro.setOptions({steps:introSteps,nextLabel:_mailpoet2.default.I18n.t("introNext")+" →",prevLabel:"← "+_mailpoet2.default.I18n.t("introBack"),skipLabel:_mailpoet2.default.I18n.t("introSkip"),doneLabel:_mailpoet2.default.I18n.t("introDone"),positionPrecedence:["right","left","bottom","top"],buttonClass:"button",hidePrev:!0,hideNext:!0,helperElementPadding:12,scrollToElement:!1,showStepNumbers:!1,tooltipPosition:"auto"}),intro.onbeforechange(function(){var step=intro._currentStep,element=introSteps[step].element;intro._introItems[step].element="string"==typeof element?document.querySelector(element):element}),intro.onafterchange(function(targetElement){if("fixed"===getComputedStyle(targetElement).getPropertyValue("position")){var helperLayer=document.querySelector(".introjs-helperLayer"),referenceLayer=document.querySelector(".introjs-tooltipReferenceLayer");referenceLayer.style.top=parseInt(referenceLayer.style.top,10)-pageYOffset+"px",helperLayer.style.top=parseInt(helperLayer.style.top,10)-pageYOffset+"px"}}),intro.onexit(function(){introActive=!1,document.body.classList.remove("mailpoet-intro-active")}),intro.onskip(function(){_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"settings",action:"set",data:{show_intro:0}})}),intro.start(),introActive=!0,document.body.classList.add("mailpoet-intro-active")}}var _intro=__webpack_require__(507),_intro2=_interopRequireDefault(_intro),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),introSteps=[{element:document.querySelector("#toplevel_page_mailpoet-newsletters > ul > li > a[href*=mailpoet-segments]").parentNode,intro:_mailpoet2.default.I18n.t("introLists")},{element:document.querySelector("#toplevel_page_mailpoet-newsletters > ul > li > a[href*=mailpoet-forms]").parentNode,intro:_mailpoet2.default.I18n.t("introForms")},{element:"#hs-beacon:not(.hs-beacon-hidden) iframe, .olark-launch-button",intro:_mailpoet2.default.I18n.t("introChat")},{element:"#mailpoet-new-email",intro:_mailpoet2.default.I18n.t("introEmails")}],introActive=!1;_mailpoet2.default.showIntro=Intro},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(4)],void 0!==(__WEBPACK_AMD_DEFINE_RESULT__=function(MailPoet){function eventHandler(){return confirm(MailPoet.I18n.t("reinstallConfirmation"))&&(MailPoet.trackEvent("User has reinstalled MailPoet via Settings",{"MailPoet Free version":window.mailpoet_version}),MailPoet.Modal.loading(!0),MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"setup",action:"reset"}).always(function(){MailPoet.Modal.loading(!1)}).done(function(){window.location="admin.php?page=mailpoet-newsletters"}).fail(function(response){response.errors.length>0&&MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})),!1}var element;(element=document.getElementById("mailpoet_reinstall"))&&element.addEventListener("click",eventHandler,!1)}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__))&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(39),__webpack_require__(8),__webpack_require__(10),__webpack_require__(4),__webpack_require__(279),__webpack_require__(686),__webpack_require__(687),__webpack_require__(0)],void 0!==(__WEBPACK_AMD_DEFINE_RESULT__=function(Backbone,_,jQuery,MailPoet,Handlebars,Papa,AsyncQueue,Moment){jQuery("#mailpoet_subscribers_import").length&&jQuery(document).ready(function(){function showCurrentStep(){MailPoet.Notice.hide(),MailPoet.Modal.loading(!1),jQuery('#mailpoet_subscribers_import > div[id^="step"]').hide(),jQuery(location.hash).show()}var router;jQuery('input[name="select_method"]').attr("checked",!1),router=new(Backbone.Router.extend({routes:{"":"home",step1:"step1",step2:"step2",step3:"step3"},home:function(){this.navigate("step1",{trigger:!0})}})),router.on("route:step1",function(){function toggleNextStepButton(element,condition){if("on"===condition)return void element.closest("table a").removeClass("button-disabled");element.closest("table a").addClass("button-disabled")}function parseCSV(isFile){var processedSubscribers=[],parsedEmails=[],duplicateEmails=[],invalidEmails=[],emailColumnPosition=null,columnCount=null,isHeaderFound=!1,detectAndCleanupEmail=function(emailString){var test,email=jQuery("<div />").html(emailString).text();return email=email.toLowerCase().replace(/^["';.,\s]+|[^\x20-\x7E]+$|["';.,_\s]+$/g,"").replace(/\s+|%\d+|,+/g,""),test=/<(.*?)>/.exec(email),test&&(email=test[1].trim()),test=/mailto:(?:\s+)?(.*)/.exec(email),test&&(email=test[1].trim()),!!window.mailpoet_email_regex.test(email)&&email};return{skipEmptyLines:!0,delimiter:"",newline:"",comments:!1,error:function(){MailPoet.Notice.hide(),MailPoet.Notice.error(MailPoet.I18n.t("dataProcessingError"))},complete:function(CSV){var email,emailAddress,rowData,rowColumnCount,errorNotice;Object.keys(CSV.data).forEach(function(rowCount){rowData=CSV.data[rowCount].map(function(el){return el.trim()}),rowColumnCount=rowData.length,null===columnCount&&(columnCount=rowColumnCount),rowColumnCount===columnCount&&(null===emailColumnPosition?(Object.keys(rowData).forEach(function(column){emailAddress=detectAndCleanupEmail(rowData[column]),null===emailColumnPosition&&window.mailpoet_email_regex.test(emailAddress)&&(emailColumnPosition=column,parsedEmails[emailAddress]=!0,rowData[column]=emailAddress,processedSubscribers[emailAddress]=rowData)}),null===emailColumnPosition&&0===parseInt(rowCount,10)&&(isHeaderFound=!0,processedSubscribers[0]=rowData)):""!==rowData[emailColumnPosition]&&(email=detectAndCleanupEmail(rowData[emailColumnPosition]),_.has(parsedEmails,email)?duplicateEmails.push(email):window.mailpoet_email_regex.test(email)?(parsedEmails[email]=!0,rowData[emailColumnPosition]=email,processedSubscribers[email]=rowData):invalidEmails.push(rowData[emailColumnPosition])))}),processedSubscribers=_.values(processedSubscribers),processedSubscribers&&(isHeaderFound&&processedSubscribers.length>=2||!isHeaderFound&&processedSubscribers.length>=1)?(window.importData.step1={header:window.mailpoet_email_regex.test(processedSubscribers[0][emailColumnPosition])?null:processedSubscribers.shift(),subscribers:processedSubscribers,subscribersCount:processedSubscribers.length,duplicate:duplicateEmails,invalid:invalidEmails},MailPoet.trackEvent("Subscribers import started",{source:isFile?"file upload":"pasted data","MailPoet Free version":window.mailpoet_version}),router.navigate("step2",{trigger:!0})):(MailPoet.Modal.loading(!1),errorNotice=MailPoet.I18n.t("noValidRecords"),errorNotice=errorNotice.replace("[link]",MailPoet.I18n.t("csvKBLink")),errorNotice=errorNotice.replace("[/link]","</a>"),MailPoet.Notice.error(errorNotice))}}}function displayMailChimpLists(data){var listSelectElement=mailChimpListsContainerElement.find("select");listSelectElement.data("select2")?(listSelectElement.select2("data",data),listSelectElement.trigger("change")):listSelectElement.select2({data:data,width:"20em",templateResult:function(item){return item.name},templateSelection:function(item){return item.name}}).change(function(){null!==jQuery(this).val()?toggleNextStepButton(mailChimpProcessButtonElement,"on"):toggleNextStepButton(mailChimpProcessButtonElement,"off")}).trigger("change"),mailChimpListsContainerElement.show()}var methodProcessContainerTemplate,currentStepE,methodSelectionElement,pasteInputElement,pasteInputPlaceholderElement,pasteProcessButtonElement,mailChimpKeyInputElement,mailChimpKeyVerifyButtonElement,mailChimpListsContainerElement,mailChimpProcessButtonElement,uploadElement,uploadProcessButtonElement;if(window.mailpoetColumns=jQuery.map(window.mailpoetColumns,function(column){var col=column;return col.validation_rule=!1,col}),void 0!==window.importData.step1)return void showCurrentStep();methodProcessContainerTemplate=Handlebars.compile(jQuery("#method_process_template").html()),jQuery(".mailpoet_method_process").html(methodProcessContainerTemplate()),currentStepE=jQuery(location.hash),methodSelectionElement=jQuery("#select_method"),pasteInputElement=jQuery("#paste_input"),pasteInputPlaceholderElement=pasteInputElement.data("placeholder").replace(/\\n/g,"\n"),pasteProcessButtonElement=jQuery("#method_paste > div.mailpoet_method_process").find("a.mailpoet_process"),mailChimpKeyInputElement=jQuery("#mailchimp_key"),mailChimpKeyVerifyButtonElement=jQuery("#mailchimp_key_verify"),mailChimpListsContainerElement=jQuery("#mailchimp_lists"),mailChimpProcessButtonElement=jQuery("#method_mailchimp > div.mailpoet_method_process").find("a.mailpoet_process"),uploadElement=jQuery("#file_local"),uploadProcessButtonElement=jQuery("#method_file > div.mailpoet_method_process").find("a.mailpoet_process"),methodSelectionElement.change(function(){var availableMethods=jQuery(':radio[name="select_method"]'),selectedMethod=availableMethods.index(availableMethods.filter(":checked"));MailPoet.Notice.hide(),currentStepE.find(".inside").children('div[id^="method_"]').hide(),currentStepE.find(".inside").children('div[id^="method_"]:eq('+selectedMethod+")").show().find("table").show()}),showCurrentStep(),pasteInputElement.attr("value",pasteInputPlaceholderElement).css("color","#999").focus(function(){jQuery(this).val()===pasteInputPlaceholderElement&&jQuery(this).attr("value","").css("color","#222")}).blur(function(){""===jQuery(this).val()&&jQuery(this).attr("value",pasteInputPlaceholderElement).css("color","#999")}).keyup(function(){toggleNextStepButton(pasteProcessButtonElement,""!==this.value.trim()?"on":"off")}),pasteProcessButtonElement.click(function(){var pasteSize=encodeURI(pasteInputElement.val()).split(/%..|./).length-1;if(MailPoet.Notice.hide(),pasteSize>window.maxPostSizeBytes)return void MailPoet.Notice.error(MailPoet.I18n.t("maxPostSizeNotice"));MailPoet.Modal.loading(!0),setTimeout(function(){Papa.parse(pasteInputElement.val(),parseCSV(!1))},10)}),uploadElement.change(function(){var ext=this.value.match(/[^.]+$/);MailPoet.Notice.hide(),null!==ext&&"csv"===ext[0].toLowerCase()||(this.value="",MailPoet.Notice.error(MailPoet.I18n.t("wrongFileFormat"))),toggleNextStepButton(uploadProcessButtonElement,""!==this.value.trim()?"on":"off")}),uploadProcessButtonElement.click(function(){""!==uploadElement.val().trim()&&(MailPoet.Modal.loading(!0),setTimeout(function(){uploadElement.parse({config:parseCSV(!0)})},10))}),mailChimpKeyInputElement.keyup(function(){""!==this.value.trim()&&/[a-zA-Z0-9]{32}-/.exec(this.value.trim())||(mailChimpListsContainerElement.hide(),jQuery(".mailpoet_mailchimp-key-status").html("").removeClass("mailpoet_mailchimp-ok mailpoet_mailchimp-error"),toggleNextStepButton(mailChimpProcessButtonElement,"off"))}),mailChimpKeyVerifyButtonElement.click(function(){MailPoet.Modal.loading(!0),MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"importExport",action:"getMailChimpLists",data:{api_key:mailChimpKeyInputElement.val()}}).always(function(){MailPoet.Modal.loading(!1)}).done(function(response){jQuery(".mailpoet_mailchimp-key-status").html("").removeClass().addClass("mailpoet_mailchimp-key-status mailpoet_mailchimp-ok"),0===response.data.length?(jQuery(".mailpoet_mailchimp-key-status").html(MailPoet.I18n.t("noMailChimpLists")),mailChimpListsContainerElement.hide(),toggleNextStepButton(mailChimpProcessButtonElement,"off")):displayMailChimpLists(response.data)}).fail(function(response){response.errors.length>0&&MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}),mailChimpProcessButtonElement.click(function(){mailChimpProcessButtonElement.closest("table a").hasClass("button-disabled")||(MailPoet.Modal.loading(!0),MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"importExport",action:"getMailChimpSubscribers",data:{api_key:mailChimpKeyInputElement.val(),lists:mailChimpListsContainerElement.find("select").val()}}).always(function(){MailPoet.Modal.loading(!1)}).done(function(response){window.importData.step1=response.data,MailPoet.trackEvent("Subscribers import started",{source:"MailChimp","MailPoet Free version":window.mailpoet_version}),router.navigate("step2",{trigger:!0})}).fail(function(response){response.errors.length>0&&MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})}))})}),router.on("route:step2",function(){function toggleNextStepButton(condition){if("on"===condition)return void nextStepButton.removeClass("button-disabled");nextStepButton.addClass("button-disabled")}function enableSegmentSelection(segments){segmentSelectElement.data("select2")&&(segmentSelectElement.html("").select2("destroy"),toggleNextStepButton("off")),segmentSelectElement.select2({data:segments,width:"20em",templateResult:function(item){var i=item;return i.subscriberCount=parseInt(i.subscriberCount,10),i.name+" ("+i.subscriberCount.toLocaleString()+")"},templateSelection:function(item){var i=item;return i.subscriberCount=parseInt(i.subscriberCount,10),i.name+" ("+i.subscriberCount.toLocaleString()+")"}}).change(function(){var segmentSelectionNotice=jQuery('[data-id="notice_segmentSelection"]');this.value?(jQuery('[data-id="notice_segmentSelection"]').remove(),jQuery(".mailpoet_notice.error:visible").length||toggleNextStepButton("on")):(segmentSelectionNotice.length||MailPoet.Notice.error(MailPoet.I18n.t("segmentSelectionRequired"),{static:!0,scroll:!0,id:"notice_segmentSelection",hideClose:!0}),toggleNextStepButton("off"))})}function filterSubscribers(){var displayedColumns,subscribersClone=jQuery.extend(!0,{},subscribers),preventNextStep=!1;jQuery('[data-id="notice_invalidEmail"], [data-id="notice_invalidDate"]').remove(),displayedColumns=jQuery.map(jQuery(".mailpoet_subscribers_column_data_match"),function(element,elementIndex){var columnId=jQuery(element).data("column-id"),validationRule=jQuery(element).data("validation-rule");return jQuery(element).val(columnId).trigger("change"),{id:columnId,index:elementIndex,validationRule:validationRule,element:element}}),jQuery.map(window.mailpoetColumns,function(column){var firstRowData,validationRule,testedFormat,allowedDateFormats,matchedColumn=_.find(displayedColumns,function(data){return data.id===column.id});"email"===column.id&&(window.mailpoet_email_regex.test(subscribersClone.subscribers[0][matchedColumn.index])?MailPoet.Notice.hide("invalidEmail"):(preventNextStep=!0,jQuery('[data-id="notice_invalidEmail"]').length||MailPoet.Notice.error(MailPoet.I18n.t("columnContainsInvalidElement"),{static:!0,scroll:!0,hideClose:!0,id:"invalidEmail"}))),"date"===column.type&&matchedColumn&&(allowedDateFormats=[Moment.ISO_8601,"YYYY/MM/DD","MM/DD/YYYY","DD/MM/YYYY","YYYY/MM/DD","YYYY/DD/MM","MM/YYYY","YYYY/MM","YYYY"],firstRowData=subscribersClone.subscribers[0][matchedColumn.index],validationRule=!1,""===firstRowData.trim()?(subscribersClone.subscribers[0][matchedColumn.index]='<span class="mailpoet_data_match mailpoet_import_error" title="'+MailPoet.I18n.t("noDateFieldMatch")+'">'+MailPoet.I18n.t("emptyFirstRowDate")+"</span> ",preventNextStep=!0):Object.keys(allowedDateFormats).forEach(function(format){if(testedFormat=allowedDateFormats[format],Moment(firstRowData,testedFormat,!0).isValid())return validationRule="function"==typeof testedFormat?"datetime":testedFormat,void jQuery(matchedColumn.element).data("validation-rule",validationRule);"datetime"===validationRule&&(validationRule=Moment.ISO_8601)}),jQuery.map(subscribersClone.subscribers,function(dataSubscribers,index){var data=dataSubscribers,rowData=data[matchedColumn.index],date=Moment(rowData,testedFormat,!0);index!==fillerPosition&&""!==rowData.trim()&&(date.isValid()?data[matchedColumn.index]=new Handlebars.SafeString(Handlebars.Utils.escapeExpression(data[matchedColumn.index])+'<span class="mailpoet_data_match" title="'+MailPoet.I18n.t("verifyDateMatch")+'">'+MailPoet.Date.format(date)+"</span> "):(data[matchedColumn.index]=new Handlebars.SafeString(Handlebars.Utils.escapeExpression(data[matchedColumn.index])+'<span class="mailpoet_data_match mailpoet_import_error" title="'+MailPoet.I18n.t("noDateFieldMatch")+'">'+new Handlebars.SafeString(MailPoet.I18n.t("dateMatchError"))+"</span> "),preventNextStep=!0))}),preventNextStep&&!jQuery(".mailpoet_invalidDate").length&&MailPoet.Notice.error(MailPoet.I18n.t("columnContainsInvalidDate"),{static:!0,scroll:!0,hideClose:!0,id:"invalidDate"}))}),jQuery("#subscribers_data > table > tbody").html(subscribersDataTemplatePartial(subscribersClone)),preventNextStep?toggleNextStepButton("off"):!jQuery(".mailpoet_notice.error:visible").length&&segmentSelectElement.val()&&toggleNextStepButton("on")}var nextStepButton,previousStepButton,subscribers,subscribersDataTemplate,subscribersDataTemplatePartial,subscribersDataParseResultsTemplate,segmentSelectElement,maxRowsToShow,filler,fillerArray,fillerPosition,importResults,duplicates;if(void 0===window.importData.step1)return void router.navigate("step1",{trigger:!0});nextStepButton=jQuery("#step2_process"),previousStepButton=jQuery("#return_to_step1"),subscribers=jQuery.extend(!0,{},window.importData.step1),subscribersDataTemplate=Handlebars.compile(jQuery("#subscribers_data_template").html()),subscribersDataTemplatePartial=Handlebars.compile(jQuery("#subscribers_data_template_partial").html()),subscribersDataParseResultsTemplate=Handlebars.compile(jQuery("#subscribers_data_parse_results_template").html()),segmentSelectElement=jQuery("#mailpoet_segments_select"),maxRowsToShow=10,filler=". . .",fillerArray=Array.apply(null,new Array(subscribers.subscribers[0].length)).map(String.prototype.valueOf,filler),showCurrentStep(),jQuery("#subscribers_data_parse_results:visible").html(""),jQuery("#subscribers_data_import_results:visible").hide(),(subscribers.invalid.length||subscribers.duplicate.length)&&(duplicates={},subscribers.duplicate.forEach(function(subscriberEmail){duplicates[subscriberEmail]=(duplicates[subscriberEmail]||0)+1}),subscribers.duplicate=[],Object.keys(duplicates).forEach(function(email){duplicates[email]>1?subscribers.duplicate.push(email+" (x"+duplicates[email]+")"):subscribers.duplicate.push(email)}),importResults={notice:MailPoet.I18n.t("importNoticeSkipped").replace("%1$s","<strong>"+(subscribers.invalid.length+subscribers.duplicate.length)+"</strong>"),invalid:subscribers.invalid.length?MailPoet.I18n.t("importNoticeInvalid").replace("%1$s","<strong>"+subscribers.invalid.length.toLocaleString()+"</strong>").replace("%2$s",subscribers.invalid.join(", ")):null,duplicate:subscribers.duplicate.length?MailPoet.I18n.t("importNoticeDuplicate").replace("%1$s","<strong>"+subscribers.duplicate.length+"</strong>").replace("%2$s",subscribers.duplicate.join(", ")):null},jQuery("#subscribers_data_parse_results").html(subscribersDataParseResultsTemplate(importResults))),jQuery(".mailpoet_subscribers_data_parse_results_details_show").click(function(){var details=jQuery(".mailpoet_subscribers_data_parse_results_details");jQuery(details).toggle(),this.text=jQuery(details).is(":visible")?MailPoet.I18n.t("hideDetails"):MailPoet.I18n.t("showDetails")}),window.mailpoetSegments.length?jQuery(".mailpoet_segments").show():jQuery(".mailpoet_no_segments").show(),jQuery(".mailpoet_create_segment").click(function(){MailPoet.Modal.popup({title:MailPoet.I18n.t("addNewList"),template:jQuery("#new_segment_template").html()}),jQuery("#new_segment_name").keypress(function(e){13===e.which&&jQuery("#new_segment_process").click()}),jQuery("#new_segment_process").click(function(){var segmentName=jQuery("#new_segment_name").val().trim(),segmentDescription=jQuery("#new_segment_description").val().trim();MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"ImportExport",action:"addSegment",data:{name:segmentName,description:segmentDescription}}).done(function(response){var selectedValues;window.mailpoetSegments.push({id:response.data.id,name:response.data.name,subscriberCount:0}),selectedValues=segmentSelectElement.val(),null===selectedValues?selectedValues=[response.data.id]:selectedValues.push(response.data.id),enableSegmentSelection(window.mailpoetSegments),segmentSelectElement.val(selectedValues).trigger("change"),jQuery(".mailpoet_segments:hidden").show(),jQuery(".mailpoet_no_segments:visible").hide(),MailPoet.Modal.close()}).fail(function(response){response.errors.length>0&&(MailPoet.Notice.hide(),MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{positionAfter:"#new_segment_name"}))})}),jQuery("#new_segment_cancel").click(function(){MailPoet.Modal.close()})}),Handlebars.registerPartial("subscribers_data_template_partial",subscribersDataTemplatePartial),Handlebars.registerHelper("show_and_match_columns",function(helperSubscribers,options){var columnData,columnId,headerName,headerNameMatch,displayedColumns=[],displayedColumnsIds=[];return Object.keys(helperSubscribers.subscribers[0]).forEach(function(i){columnData=helperSubscribers.subscribers[0][i],columnId="ignore",columnData%1!=0&&window.mailpoet_email_regex.test(columnData)?columnId="email":helperSubscribers.header&&(headerName=helperSubscribers.header[i],headerNameMatch=window.mailpoetColumns.map(function(el){return el.name}).indexOf(headerName),-1!==headerNameMatch?columnId=window.mailpoetColumns[headerNameMatch].id:headerName&&(/first|first name|given name/i.test(headerName)?columnId="first_name":/last|last name/i.test(headerName)&&(columnId="last_name"))),columnId="ignore"!==columnId&&-1===displayedColumnsIds.indexOf(columnId)?columnId:"ignore",displayedColumns[i]={column_id:columnId},displayedColumnsIds.push(columnId)}),options.fn(displayedColumns)}),Handlebars.registerHelper("sanitize_data",function(data){return data instanceof Handlebars.SafeString?data:new Handlebars.SafeString(Handlebars.Utils.escapeExpression(data))}),Handlebars.registerHelper("calculate_index",function(rawIndex){var index=parseInt(rawIndex,10);return index===maxRowsToShow&&subscribers.subscribersCount>maxRowsToShow+1?(fillerPosition=index,filler):index===subscribers.subscribers.length-1?subscribers.subscribersCount.toLocaleString():index+1}),subscribers.subscribersCount>maxRowsToShow+1&&subscribers.subscribers.splice(maxRowsToShow,subscribers.subscribersCount-(maxRowsToShow+1),fillerArray),jQuery("#subscribers_data > table").html(subscribersDataTemplate(subscribers)),jQuery("select.mailpoet_subscribers_column_data_match").select2({data:window.mailpoetColumnsSelect2,width:"15em",templateResult:function(item){return item.name},templateSelection:function(item){return item.name}}).on("select2:selecting",function(selectEvent){var selectElement=this,selectedOptionId=selectEvent.params.args.data.id;"create"===selectedOptionId?(selectEvent.preventDefault(),jQuery(selectElement).select2("close"),MailPoet.Modal.popup({title:MailPoet.I18n.t("addNewField"),template:jQuery("#form_template_field_form").html()}),jQuery("#form_field_new").parsley().on("form:submit",function(){var data=jQuery(this.$element).mailpoetSerializeObject();return MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"customFields",action:"save",data:data}).done(function(response){var newColumnData={id:response.data.id,name:response.data.name,type:response.data.type,params:response.data.params,custom:!0};2===window.mailpoetColumnsSelect2.length&&window.mailpoetColumnsSelect2.push({name:MailPoet.I18n.t("userColumns"),children:[]}),window.mailpoetColumnsSelect2[2].children.push(newColumnData),window.mailpoetColumns.push(newColumnData),jQuery("select.mailpoet_subscribers_column_data_match").each(function(){jQuery(this).html("").select2("destroy").select2({data:window.mailpoetColumnsSelect2,width:"15em",templateResult:function(item){return item.name},templateSelection:function(item){return item.name}})}),jQuery(selectElement).data("column-id",newColumnData.id),jQuery(selectElement).data("validation-rule",!1),filterSubscribers(),MailPoet.Modal.close()}).fail(function(response){response.errors.length>0&&MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{positionAfter:"#field_name"})}),!1})):jQuery("select.mailpoet_subscribers_column_data_match").each(function(){var element=this,elementId=jQuery(element).val();elementId===selectedOptionId&&"ignore"!==elementId&&(confirm(MailPoet.I18n.t("selectedValueAlreadyMatched")+" "+MailPoet.I18n.t("confirmCorrespondingColumn"))?jQuery(element).data("column-id","ignore"):(selectEvent.preventDefault(),jQuery(selectElement).select2("close")))})}).on("select2:select",function(selectEvent){var selectElement=this,selectedOptionId=selectEvent.params.data.id;jQuery(selectElement).data("column-id",selectedOptionId),filterSubscribers()}),previousStepButton.off().on("click",function(){router.navigate("step1",{trigger:!0})}),nextStepButton.off().on("click",function(){var clickSubscribers,splitSubscribers,columns={},queue=new jQuery.AsyncQueue,batchNumber=0,timestamp=Date.now()/1e3,clickImportResults={created:0,updated:0,errors:[],segments:[]};jQuery(this).hasClass("button-disabled")||(MailPoet.Modal.loading(!0),splitSubscribers=function(localSubscribers,size){return localSubscribers.reduce(function(res,item,index){return index%size==0&&res.push([]),res[res.length-1].push(item),res},[])},clickSubscribers=splitSubscribers(window.importData.step1.subscribers,2e3),_.each(jQuery("select.mailpoet_subscribers_column_data_match"),function(column,columnIndex){var columnId=jQuery(column).data("column-id"),validationRule=jQuery(column).data("validation-rule");"ignore"!==columnId&&(columns[columnId]={index:columnIndex,validation_rule:validationRule})}),_.each(clickSubscribers,function(){queue.add(function(addQueue){addQueue.pause(),MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"ImportExport",action:"processImport",data:JSON.stringify({columns:columns,subscribers:clickSubscribers[batchNumber],timestamp:timestamp,segments:segmentSelectElement.val(),updateSubscribers:"yes"===jQuery(':radio[name="subscriber_update_option"]:checked').val()})}).done(function(response){clickImportResults.created+=response.data.created,clickImportResults.updated+=response.data.updated,clickImportResults.segments=response.data.segments,clickImportResults.added_to_segment_with_welcome_notification=response.data.added_to_segment_with_welcome_notification,addQueue.run()}).fail(function(response){MailPoet.Modal.loading(!1),response.errors.length>0&&MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})}),batchNumber+=1})}),queue.run(),queue.onComplete(function(){MailPoet.Modal.loading(!1),clickImportResults.errors.length>0&&!clickImportResults.updated&&!clickImportResults.created?MailPoet.Notice.error(_.flatten(clickImportResults.errors)):(window.mailpoetSegments=clickImportResults.segments,clickImportResults.segments=_.map(segmentSelectElement.select2("data"),function(data){return data.name}),window.importData.step2=clickImportResults,enableSegmentSelection(window.mailpoetSegments),router.navigate("step3",{trigger:!0}))}))}),filterSubscribers(),enableSegmentSelection(window.mailpoetSegments)}),router.on("route:step3",function(){var subscribersDataImportResultsTemplate,exportMenuElement,importResults;if(void 0===window.importData.step2)return void router.navigate("step2",{trigger:!0});showCurrentStep(),window.importData.step2.errors.length>0&&MailPoet.Notice.error(_.flatten(window.importData.step2.errors)),MailPoet.trackEvent("Subscribers import finished",{"Subscribers created":window.importData.step2.created,"Subscribers updated":window.importData.step2.updated,"MailPoet Free version":window.mailpoet_version}),subscribersDataImportResultsTemplate=Handlebars.compile(jQuery("#subscribers_data_import_results_template").html()),exportMenuElement=jQuery("span.mailpoet_export"),importResults={created:!!window.importData.step2.created&&MailPoet.I18n.t("subscribersCreated").replace("%1$s","<strong>"+window.importData.step2.created.toLocaleString()+"</strong>").replace("%2$s",'"'+window.importData.step2.segments.join('", "')+'"'),updated:!!window.importData.step2.updated&&MailPoet.I18n.t("subscribersUpdated").replace("%1$s","<strong>"+window.importData.step2.updated.toLocaleString()+"</strong>").replace("%2$s",'"'+window.importData.step2.segments.join('", "')+'"'),no_action:!window.importData.step2.created&&!window.importData.step2.updated,added_to_segment_with_welcome_notification:window.importData.step2.added_to_segment_with_welcome_notification},jQuery("#subscribers_data_import_results").html(subscribersDataImportResultsTemplate(importResults)).show(),jQuery("a.mailpoet_import_again").off().click(function(){jQuery("#subscribers_data_import_results").hide(),router.navigate("step1",{trigger:!0})}),jQuery("a.mailpoet_view_subscribers").off().click(function(){window.location.href="admin.php?page=mailpoet-subscribers"}),importResults.created&&exportMenuElement.not(":visible")&&exportMenuElement.show(),window.importData.step2=void 0}),Backbone.History.started||Backbone.history.start()})}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__))&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},function(module,exports){/*!
|
13 |
+
Papa Parse
|
14 |
+
v4.1.1
|
15 |
+
https://github.com/mholt/PapaParse
|
16 |
+
*/
|
17 |
+
!function(e){"use strict";function t(t,r){if(r=r||{},r.worker&&w.WORKERS_SUPPORTED){var n=h();return n.userStep=r.step,n.userChunk=r.chunk,n.userComplete=r.complete,n.userError=r.error,r.step=m(r.step),r.chunk=m(r.chunk),r.complete=m(r.complete),r.error=m(r.error),delete r.worker,void n.postMessage({input:t,config:r,workerId:n.id})}var o=null;return"string"==typeof t?o=r.download?new i(r):new a(r):(e.File&&t instanceof File||t instanceof Object)&&(o=new s(r)),o.stream(t)}function r(e,t){function n(e){if("object"!=typeof e)return[];var t=[];for(var r in e)t.push(r);return t}function i(e,t){var r="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var n=e instanceof Array&&e.length>0,i=!(t[0]instanceof Array);if(n){for(var a=0;a<e.length;a++)a>0&&(r+=u),r+=s(e[a],a);t.length>0&&(r+=f)}for(var o=0;o<t.length;o++){for(var h=n?e.length:t[o].length,d=0;h>d;d++){d>0&&(r+=u);var c=n&&i?e[d]:d;r+=s(t[o][c],d)}o<t.length-1&&(r+=f)}return r}function s(e,t){return void 0===e||null===e?"":(e=e.toString().replace(/"/g,'""'),"boolean"==typeof o&&o||o instanceof Array&&o[t]||a(e,w.BAD_DELIMITERS)||e.indexOf(u)>-1||" "==e.charAt(0)||" "==e.charAt(e.length-1)?'"'+e+'"':e)}function a(e,t){for(var r=0;r<t.length;r++)if(e.indexOf(t[r])>-1)return!0;return!1}var o=!1,u=",",f="\r\n";if(function(){"object"==typeof t&&("string"==typeof t.delimiter&&1==t.delimiter.length&&-1==w.BAD_DELIMITERS.indexOf(t.delimiter)&&(u=t.delimiter),("boolean"==typeof t.quotes||t.quotes instanceof Array)&&(o=t.quotes),"string"==typeof t.newline&&(f=t.newline))}(),"string"==typeof e&&(e=JSON.parse(e)),e instanceof Array){if(!e.length||e[0]instanceof Array)return i(null,e);if("object"==typeof e[0])return i(n(e[0]),e)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),e.data instanceof Array&&(e.fields||(e.fields=e.data[0]instanceof Array?e.fields:n(e.data[0])),e.data[0]instanceof Array||"object"==typeof e.data[0]||(e.data=[e.data])),i(e.fields||[],e.data||[]);throw"exception: Unable to serialize unrecognized input"}function n(t){function r(e){var t=_(e);t.chunkSize=parseInt(t.chunkSize),this._handle=new o(t),this._handle.streamer=this,this._config=t}this._handle=null,this._paused=!1,this._finished=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this._completeResults={data:[],errors:[],meta:{}},r.call(this,t),this.parseChunk=function(t){var r=this._partialLine+t;this._partialLine="";var n=this._handle.parse(r,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var i=n.meta.cursor;this._finished||(this._partialLine=r.substring(i-this._baseIndex),this._baseIndex=i),n&&n.data&&(this._rowCount+=n.data.length);var s=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(k)e.postMessage({results:n,workerId:w.WORKER_ID,finished:s});else if(m(this._config.chunk)){if(this._config.chunk(n,this._handle),this._paused)return;n=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(n.data),this._completeResults.errors=this._completeResults.errors.concat(n.errors),this._completeResults.meta=n.meta),!s||!m(this._config.complete)||n&&n.meta.aborted||this._config.complete(this._completeResults),s||n&&n.meta.paused||this._nextChunk(),n}},this._sendError=function(t){m(this._config.error)?this._config.error(t):k&&this._config.error&&e.postMessage({workerId:w.WORKER_ID,error:t,finished:!1})}}function i(e){function t(e){var t=e.getResponseHeader("Content-Range");return parseInt(t.substr(t.lastIndexOf("/")+1))}e=e||{},e.chunkSize||(e.chunkSize=w.RemoteChunkSize),n.call(this,e);var r;this._nextChunk=k?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)return void this._chunkLoaded();if(r=new XMLHttpRequest,k||(r.onload=g(this._chunkLoaded,this),r.onerror=g(this._chunkError,this)),r.open("GET",this._input,!k),this._config.chunkSize){var e=this._start+this._config.chunkSize-1;r.setRequestHeader("Range","bytes="+this._start+"-"+e),r.setRequestHeader("If-None-Match","webkit-no-cache")}try{r.send()}catch(t){this._chunkError(t.message)}k&&0==r.status?this._chunkError():this._start+=this._config.chunkSize},this._chunkLoaded=function(){if(4==r.readyState){if(r.status<200||r.status>=400)return void this._chunkError();this._finished=!this._config.chunkSize||this._start>t(r),this.parseChunk(r.responseText)}},this._chunkError=function(e){var t=r.statusText||e;this._sendError(t)}}function s(e){e=e||{},e.chunkSize||(e.chunkSize=w.LocalChunkSize),n.call(this,e);var t,r,i="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,r=e.slice||e.webkitSlice||e.mozSlice,i?(t=new FileReader,t.onload=g(this._chunkLoaded,this),t.onerror=g(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var n=Math.min(this._start+this._config.chunkSize,this._input.size);e=r.call(e,this._start,n)}var s=t.readAsText(e,this._config.encoding);i||this._chunkLoaded({target:{result:s}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function a(e){e=e||{},n.call(this,e);var t,r;this.stream=function(e){return t=e,r=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e=this._config.chunkSize,t=e?r.substr(0,e):r;return r=e?r.substr(e):"",this._finished=!r,this.parseChunk(t)}}}function o(e){function t(){if(b&&c&&(f("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+w.DefaultDelimiter+"'"),c=!1),e.skipEmptyLines)for(var t=0;t<b.data.length;t++)1==b.data[t].length&&""==b.data[t][0]&&b.data.splice(t--,1);return r()&&n(),i()}function r(){return e.header&&0==y.length}function n(){if(b){for(var e=0;r()&&e<b.data.length;e++)for(var t=0;t<b.data[e].length;t++)y.push(b.data[e][t]);b.data.splice(0,1)}}function i(){if(!b||!e.header&&!e.dynamicTyping)return b;for(var t=0;t<b.data.length;t++){for(var r={},n=0;n<b.data[t].length;n++){if(e.dynamicTyping){var i=b.data[t][n];b.data[t][n]="true"==i||"TRUE"==i||"false"!=i&&"FALSE"!=i&&o(i)}e.header&&(n>=y.length?(r.__parsed_extra||(r.__parsed_extra=[]),r.__parsed_extra.push(b.data[t][n])):r[y[n]]=b.data[t][n])}e.header&&(b.data[t]=r,n>y.length?f("FieldMismatch","TooManyFields","Too many fields: expected "+y.length+" fields but parsed "+n,t):n<y.length&&f("FieldMismatch","TooFewFields","Too few fields: expected "+y.length+" fields but parsed "+n,t))}return e.header&&b.meta&&(b.meta.fields=y),b}function s(t){for(var r,n,i,s=[",","\t","|",";",w.RECORD_SEP,w.UNIT_SEP],a=0;a<s.length;a++){var o=s[a],f=0,h=0;i=void 0;for(var d=new u({delimiter:o,preview:10}).parse(t),c=0;c<d.data.length;c++){var l=d.data[c].length;h+=l,void 0!==i?l>1&&(f+=Math.abs(l-i),i=l):i=l}h/=d.data.length,(void 0===n||n>f)&&h>1.99&&(n=f,r=o)}return e.delimiter=r,{successful:!!r,bestDelimiter:r}}function a(e){e=e.substr(0,1048576);var t=e.split("\r");if(1==t.length)return"\n";for(var r=0,n=0;n<t.length;n++)"\n"==t[n][0]&&r++;return r>=t.length/2?"\r\n":"\r"}function o(e){return l.test(e)?parseFloat(e):e}function f(e,t,r,n){b.errors.push({type:e,code:t,message:r,row:n})}var h,d,c,l=/^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i,p=this,g=0,v=!1,k=!1,y=[],b={data:[],errors:[],meta:{}};if(m(e.step)){var R=e.step;e.step=function(n){if(b=n,r())t();else{if(t(),0==b.data.length)return;g+=n.data.length,e.preview&&g>e.preview?d.abort():R(b,p)}}}this.parse=function(r,n,i){if(e.newline||(e.newline=a(r)),c=!1,!e.delimiter){var o=s(r);o.successful?e.delimiter=o.bestDelimiter:(c=!0,e.delimiter=w.DefaultDelimiter),b.meta.delimiter=e.delimiter}var f=_(e);return e.preview&&e.header&&f.preview++,h=r,d=new u(f),b=d.parse(h,n,i),t(),v?{meta:{paused:!0}}:b||{meta:{paused:!1}}},this.paused=function(){return v},this.pause=function(){v=!0,d.abort(),h=h.substr(d.getCharIndex())},this.resume=function(){v=!1,p.streamer.parseChunk(h)},this.aborted=function(){return k},this.abort=function(){k=!0,d.abort(),b.meta.aborted=!0,m(e.complete)&&e.complete(b),h=""}}function u(e){e=e||{};var t=e.delimiter,r=e.newline,n=e.comments,i=e.step,s=e.preview,a=e.fastMode;if(("string"!=typeof t||w.BAD_DELIMITERS.indexOf(t)>-1)&&(t=","),n===t)throw"Comment character same as delimiter";!0===n?n="#":("string"!=typeof n||w.BAD_DELIMITERS.indexOf(n)>-1)&&(n=!1),"\n"!=r&&"\r"!=r&&"\r\n"!=r&&(r="\n");var o=0,u=!1;this.parse=function(e,f,h){function d(e){b.push(e),S=o}function c(t){return h?p():(t||(t=e.substr(o)),w.push(t),o=g,d(w),y&&_(),p())}function l(t){o=t,d(w),w=[],O=e.indexOf(r,o)}function p(e){return{data:b,errors:R,meta:{delimiter:t,linebreak:r,aborted:u,truncated:!!e,cursor:S+(f||0)}}}function _(){i(p()),b=[],R=[]}if("string"!=typeof e)throw"Input must be a string";var g=e.length,m=t.length,v=r.length,k=n.length,y="function"==typeof i;o=0;var b=[],R=[],w=[],S=0;if(!e)return p();if(a||!1!==a&&-1===e.indexOf('"')){for(var E=e.split(r),C=0;C<E.length;C++){var w=E[C];if(o+=w.length,C!==E.length-1)o+=r.length;else if(h)return p();if(!n||w.substr(0,k)!=n){if(y){if(b=[],d(w.split(t)),_(),u)return p()}else d(w.split(t));if(s&&C>=s)return b=b.slice(0,s),p(!0)}}return p()}for(var x=e.indexOf(t,o),O=e.indexOf(r,o);;)if('"'!=e[o])if(n&&0===w.length&&e.substr(o,k)===n){if(-1==O)return p();o=O+v,O=e.indexOf(r,o),x=e.indexOf(t,o)}else if(-1!==x&&(O>x||-1===O))w.push(e.substring(o,x)),o=x+m,x=e.indexOf(t,o);else{if(-1===O)break;if(w.push(e.substring(o,O)),l(O+v),y&&(_(),u))return p();if(s&&b.length>=s)return p(!0)}else{var I=o;for(o++;;){var I=e.indexOf('"',I+1);if(-1===I)return h||R.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:b.length,index:o}),c();if(I===g-1){var D=e.substring(o,I).replace(/""/g,'"');return c(D)}if('"'!=e[I+1]){if(e[I+1]==t){w.push(e.substring(o,I).replace(/""/g,'"')),o=I+1+m,x=e.indexOf(t,o),O=e.indexOf(r,o);break}if(e.substr(I+1,v)===r){if(w.push(e.substring(o,I).replace(/""/g,'"')),l(I+1+v),x=e.indexOf(t,o),y&&(_(),u))return p();if(s&&b.length>=s)return p(!0);break}}else I++}}return c()},this.abort=function(){u=!0},this.getCharIndex=function(){return o}}function h(){if(!w.WORKERS_SUPPORTED)return!1;if(!y&&null===w.SCRIPT_PATH)throw new Error("Script path cannot be determined automatically when Papa Parse is loaded asynchronously. You need to set Papa.SCRIPT_PATH manually.");var t=new e.Worker(w.SCRIPT_PATH||v);return t.onmessage=d,t.id=R++,b[t.id]=t,t}function d(e){var t=e.data,r=b[t.workerId],n=!1;if(t.error)r.userError(t.error,t.file);else if(t.results&&t.results.data){var i=function(){n=!0,c(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},s={abort:i,pause:l,resume:l};if(m(r.userStep)){for(var a=0;a<t.results.data.length&&(r.userStep({data:[t.results.data[a]],errors:t.results.errors,meta:t.results.meta},s),!n);a++);delete t.results}else m(r.userChunk)&&(r.userChunk(t.results,s,t.file),delete t.results)}t.finished&&!n&&c(t.workerId,t.results)}function c(e,t){var r=b[e];m(r.userComplete)&&r.userComplete(t),r.terminate(),delete b[e]}function l(){throw"Not implemented."}function p(t){var r=t.data;if(void 0===w.WORKER_ID&&r&&(w.WORKER_ID=r.workerId),"string"==typeof r.input)e.postMessage({workerId:w.WORKER_ID,results:w.parse(r.input,r.config),finished:!0});else if(e.File&&r.input instanceof File||r.input instanceof Object){var n=w.parse(r.input,r.config);n&&e.postMessage({workerId:w.WORKER_ID,results:n,finished:!0})}}function _(e){if("object"!=typeof e)return e;var t=e instanceof Array?[]:{};for(var r in e)t[r]=_(e[r]);return t}function g(e,t){return function(){e.apply(t,arguments)}}function m(e){return"function"==typeof e}var v,k=!e.document&&!!e.postMessage,y=!1,b={},R=0,w={};if(w.parse=t,w.unparse=r,w.RECORD_SEP=String.fromCharCode(30),w.UNIT_SEP=String.fromCharCode(31),w.BYTE_ORDER_MARK="\ufeff",w.BAD_DELIMITERS=["\r","\n",'"',w.BYTE_ORDER_MARK],w.WORKERS_SUPPORTED=!!e.Worker,w.SCRIPT_PATH=null,w.LocalChunkSize=10485760,w.RemoteChunkSize=5242880,w.DefaultDelimiter=",",w.Parser=u,w.ParserHandle=o,w.NetworkStreamer=i,w.FileStreamer=s,w.StringStreamer=a,void 0!==module&&module.exports?module.exports=w:m(e.define)&&e.define.amd?e.define(function(){return w}):e.Papa=w,e.jQuery){var S=e.jQuery;S.fn.parse=function(t){function r(){if(0==a.length)return void(m(t.complete)&&t.complete());var e=a[0];if(m(t.before)){var r=t.before(e.file,e.inputElem);if("object"==typeof r){if("abort"==r.action)return void n("AbortError",e.file,e.inputElem,r.reason);if("skip"==r.action)return void i();"object"==typeof r.config&&(e.instanceConfig=S.extend(e.instanceConfig,r.config))}else if("skip"==r)return void i()}var s=e.instanceConfig.complete;e.instanceConfig.complete=function(t){m(s)&&s(t,e.file,e.inputElem),i()},w.parse(e.file,e.instanceConfig)}function n(e,r,n,i){m(t.error)&&t.error({name:e},r,n,i)}function i(){a.splice(0,1),r()}var s=t.config||{},a=[];return this.each(function(){if("INPUT"!=S(this).prop("tagName").toUpperCase()||"file"!=S(this).attr("type").toLowerCase()||!e.FileReader||!this.files||0==this.files.length)return!0;for(var r=0;r<this.files.length;r++)a.push({file:this.files[r],inputElem:this,instanceConfig:S.extend({},s)})}),r(),this}}k?e.onmessage=p:w.WORKERS_SUPPORTED&&(v=function(){var e=document.getElementsByTagName("script");return e.length?e[e.length-1].src:""}(),document.body?document.addEventListener("DOMContentLoaded",function(){y=!0},!0):y=!0),i.prototype=Object.create(n.prototype),i.prototype.constructor=i,s.prototype=Object.create(n.prototype),s.prototype.constructor=s,a.prototype=Object.create(a.prototype),a.prototype.constructor=a}("undefined"!=typeof window?window:this)},function(module,exports){!function($){$.AsyncQueue=function(){var failureFunc,completeFunc,lastCallbackData,_run,that=this,queue=[],paused=!1;return _run=function(){var f=queue.shift();f?(f.apply(that,[that]),!1===paused&&_run()):completeFunc&&completeFunc.apply(that)},this.onFailure=function(func){failureFunc=func},this.onComplete=function(func){completeFunc=func},this.add=function(func){return queue.push(func),this},this.storeData=function(dataObject){return lastCallbackData=dataObject,this},this.lastCallbackData=function(){return lastCallbackData},this.run=function(){paused=!1,_run()},this.pause=function(){return paused=!0,this},this.failure=function(){if(paused=!0,failureFunc){var args=[that];for(i=0;i<arguments.length;i++)args.push(arguments[i]);failureFunc.apply(that,args)}},this}}(jQuery)},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(8),__webpack_require__(10),__webpack_require__(4),__webpack_require__(279)],void 0!==(__WEBPACK_AMD_DEFINE_RESULT__=function(_,jQuery,MailPoet,Handlebars){jQuery("#mailpoet_subscribers_export").length&&jQuery(document).ready(function(){function toggleNextStepButton(condition){"on"===condition?nextStepButton.removeClass("button-disabled"):nextStepButton.addClass("button-disabled")}var segmentsContainerElement,subscriberFieldsContainerElement,nextStepButton,renderSegmentsAndFields,subscribersExportTemplate;window.exportData.segments&&(subscribersExportTemplate=Handlebars.compile(jQuery("#mailpoet_subscribers_export_template").html()),jQuery("#mailpoet_subscribers_export > div.inside").html(subscribersExportTemplate(window.exportData)),segmentsContainerElement=jQuery("#export_lists"),subscriberFieldsContainerElement=jQuery("#export_columns"),nextStepButton=jQuery("a.mailpoet_export_process"),renderSegmentsAndFields=function(container,data){container.data("select2")&&container.html("").select2("destroy"),container.select2({data:data,width:"20em",templateResult:function(item){return item.subscriberCount>0?item.name+" ("+parseInt(item.subscriberCount,10).toLocaleString()+")":item.name},templateSelection:function(item){return item.subscriberCount>0?item.name+" ("+parseInt(item.subscriberCount,10).toLocaleString()+")":item.name}}).on("select2:selecting",function(selectEvent){var allOptions,selectElement=this,selectedOptionId=selectEvent.params.args.data.id,fieldsToExclude=["select","deselect"];_.contains(fieldsToExclude,selectedOptionId)&&(selectEvent.preventDefault(),"deselect"===selectedOptionId?jQuery(selectElement).val("").trigger("change"):(allOptions=[],_.each(container.find("option"),function(field){_.contains(fieldsToExclude,field.value)||allOptions.push(field.value)}),jQuery(selectElement).val(allOptions).trigger("change")),jQuery(selectElement).select2("close"))}).on("change",function(){toggleNextStepButton(window.exportData.segments&&segmentsContainerElement.select2("data").length&&subscriberFieldsContainerElement.select2("data").length||!window.exportData.segments&&subscriberFieldsContainerElement.select2("data").length?"on":"off")})},window.segments.forEach(function(item){segmentsContainerElement.append(jQuery("<option></option>").attr("value",item.id).text(item.name))}),renderSegmentsAndFields(segmentsContainerElement,window.segments),renderSegmentsAndFields(subscriberFieldsContainerElement,window.subscriberFieldsSelect2),subscriberFieldsContainerElement.val(["email","first_name","last_name","list_status","global_status"]).trigger("change"),nextStepButton.click(function(){var exportFormat;jQuery(this).hasClass("button-disabled")||(MailPoet.Modal.loading(!0),exportFormat=jQuery(':radio[name="option_format"]:checked').val(),MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"ImportExport",action:"processExport",data:JSON.stringify({export_format_option:exportFormat,segments:!!window.exportData.segments&&segmentsContainerElement.val(),subscriber_fields:subscriberFieldsContainerElement.val()})}).always(function(){MailPoet.Modal.loading(!1)}).done(function(response){var resultMessage=MailPoet.I18n.t("exportMessage").replace("%1$s","<strong>"+parseInt(response.data.totalExported,10).toLocaleString()+"</strong>").replace("[link]",'<a href="'+response.data.exportFileURL+'" target="_blank" >').replace("[/link]","</a>");jQuery("#export_result_notice").html("<p>"+resultMessage+"</p>").show(),window.location.href=response.data.exportFileURL,MailPoet.trackEvent("Subscribers export completed",{"Total exported":response.data.totalExported,"File Format":exportFormat,"MailPoet Free version":window.mailpoet_version})}).fail(function(response){response.errors.length>0&&MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})}))}))})}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__))&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_reactDom=__webpack_require__(28),_reactDom2=_interopRequireDefault(_reactDom),_reactRouter=__webpack_require__(26),_history=__webpack_require__(92),_steps_controller=__webpack_require__(690),_steps_controller2=_interopRequireDefault(_steps_controller),container=document.getElementById("welcome_wizard_container");if(container){var history=(0,_reactRouter.useRouterHistory)(_history.createHashHistory)({queryKey:!1});_reactDom2.default.render(_react2.default.createElement(_reactRouter.Router,{history:history},_react2.default.createElement(_reactRouter.Route,{path:"/"},_react2.default.createElement(_reactRouter.IndexRedirect,{to:"steps/1"}),_react2.default.createElement(_reactRouter.Route,{path:"steps/:step",component:_steps_controller2.default}))),container)}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_header=__webpack_require__(691),_header2=_interopRequireDefault(_header),_sender_step=__webpack_require__(693),_sender_step2=_interopRequireDefault(_sender_step),_migrated_user_step=__webpack_require__(694),_migrated_user_step2=_interopRequireDefault(_migrated_user_step),_help_info_step=__webpack_require__(695),_help_info_step2=_interopRequireDefault(_help_info_step),_usage_tracking_step=__webpack_require__(696),_usage_tracking_step2=_interopRequireDefault(_usage_tracking_step),_woo_commerce_step=__webpack_require__(697),_woo_commerce_step2=_interopRequireDefault(_woo_commerce_step),WelcomeWizardStepsController=function(_React$Component){function WelcomeWizardStepsController(props){_classCallCheck(this,WelcomeWizardStepsController);var _this=_possibleConstructorReturn(this,(WelcomeWizardStepsController.__proto__||Object.getPrototypeOf(WelcomeWizardStepsController)).call(this,props));return _this.state={stepsCount:window.is_woocommerce_active?4:3,shouldSetSender:!window.is_mp2_migration_complete,loading:!1,sender:window.sender_data},_this.finishWizard=_this.finishWizard.bind(_this),_this.updateSettings=_this.updateSettings.bind(_this),_this.activateTracking=_this.activateTracking.bind(_this),_this.updateSender=_this.updateSender.bind(_this),_this.submitSender=_this.submitSender.bind(_this),_this.showWooCommerceStepOrFinish=_this.showWooCommerceStepOrFinish.bind(_this),_this.componentDidUpdate(),_this}return _inherits(WelcomeWizardStepsController,_React$Component),_createClass(WelcomeWizardStepsController,[{key:"componentDidUpdate",value:function(){var step=parseInt(this.props.params.step,10);(step>this.state.stepsCount||step<1)&&this.props.router.push("steps/1")}},{key:"finishWizard",value:function(){this.setState({loading:!0}),window.location=window.finish_wizard_url}},{key:"showWooCommerceStepOrFinish",value:function(){4===this.state.stepsCount?this.props.router.push("steps/4"):this.finishWizard()}},{key:"updateSettings",value:function(data){var _this2=this;return this.setState({loading:!0}),_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"settings",action:"set",data:data}).then(function(){return _this2.setState({loading:!1})}).fail(function(response){_this2.setState({loading:!1}),response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{key:"activateTracking",value:function(){var _this3=this;this.updateSettings({analytics:{enabled:!0}}).then(function(){return _this3.showWooCommerceStepOrFinish()})}},{key:"updateSender",value:function(data){this.setState({sender:Object.assign({},this.state.sender,data)})}},{key:"submitSender",value:function(){var _this4=this;this.updateSettings({sender:this.state.sender}).then(function(){return _this4.props.router.push("steps/2")})}},{key:"render",value:function(){var _this5=this,step=parseInt(this.props.params.step,10);return _react2.default.createElement("div",{className:"mailpoet_welcome_wizard_steps mailpoet_welcome_wizard_centered_column"},_react2.default.createElement(_header2.default,{current_step:step,steps_count:this.state.stepsCount,logo_src:window.mailpoet_logo_url}),1===step&&this.state.shouldSetSender?_react2.default.createElement(_sender_step2.default,{update_sender:this.updateSender,submit_sender:this.submitSender,finish:this.finishWizard,loading:this.state.loading,sender:this.state.sender}):null,1!==step||this.state.shouldSetSender?null:_react2.default.createElement(_migrated_user_step2.default,{next:function(){return _this5.props.router.push("steps/2")}}),2===step?_react2.default.createElement(_help_info_step2.default,{next:function(){return _this5.props.router.push("steps/3")}}):null,3===step?_react2.default.createElement(_usage_tracking_step2.default,{skip_action:this.showWooCommerceStepOrFinish,allow_action:this.activateTracking,allow_text:4===this.state.stepsCount?_mailpoet2.default.I18n.t("allowAndContinue"):_mailpoet2.default.I18n.t("allowAndFinish"),loading:this.state.loading}):null,4===step?_react2.default.createElement(_woo_commerce_step2.default,{next:this.finishWizard,screenshot_src:window.woocommerce_screenshot_url,loading:this.state.loading}):null)}}]),WelcomeWizardStepsController}(_react2.default.Component);WelcomeWizardStepsController.propTypes={params:_propTypes2.default.shape({step:_propTypes2.default.string.isRequired}).isRequired,router:_propTypes2.default.shape({push:_propTypes2.default.func.isRequired}).isRequired},module.exports=WelcomeWizardStepsController},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_stepped_progess_bar=__webpack_require__(692),_stepped_progess_bar2=_interopRequireDefault(_stepped_progess_bar),WelcomeWizardHeader=function(props){return _react2.default.createElement("div",{className:"mailpoet_welcome_wizard_centered_column mailpoet_welcome_wizard_header"},_react2.default.createElement("img",{src:props.logo_src,width:"200",alt:"MailPoet logo"}),props.current_step<=props.steps_count?_react2.default.createElement(_stepped_progess_bar2.default,{steps_count:props.steps_count,step:props.current_step}):null)};WelcomeWizardHeader.propTypes={current_step:_propTypes2.default.number.isRequired,steps_count:_propTypes2.default.number.isRequired,logo_src:_propTypes2.default.string.isRequired},module.exports=WelcomeWizardHeader},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _toConsumableArray(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i<arr.length;i++)arr2[i]=arr[i];return arr2}return Array.from(arr)}var _propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),SteppedProgressBar=function(props){return props.step>props.steps_count?null:_react2.default.createElement("div",{className:"mailpoet_stepped_progress_bar"},[].concat(_toConsumableArray(Array(props.steps_count).keys())).map(function(step){return _react2.default.createElement("div",{className:"mailpoet_stepped_progress_bar_step "+(step<props.step?"active":""),key:"step_"+step,style:{width:Math.floor(100/props.steps_count)+"%"}})}))};SteppedProgressBar.propTypes={steps_count:_propTypes2.default.number.isRequired,step:_propTypes2.default.number.isRequired},module.exports=SteppedProgressBar},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_jquery=__webpack_require__(10),_jquery2=_interopRequireDefault(_jquery),WelcomeWizardSenderStep=function(props){return _react2.default.createElement("div",{className:"mailpoet_welcome_wizard_step_content mailpoet_welcome_wizard_centered_column"},_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("welcomeWizardLetsStartTitle")),_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("welcomeWizardSenderText")),_react2.default.createElement("form",{id:"mailpoet_sender_form",className:"mailpoet_welcome_wizard_centered_column "+(props.loading?"mailpoet_sender_form_loading":""),onSubmit:function(e){e.preventDefault(),(0,_jquery2.default)("#mailpoet_sender_form").parsley().validate()&&props.submit_sender()}},_react2.default.createElement("label",{htmlFor:"senderName"},_mailpoet2.default.I18n.t("senderName"),":",_react2.default.createElement("input",{name:"senderName",type:"text",placeholder:"John Doe",value:props.sender?props.sender.name:"","data-parsley-required":!0,onChange:function(e){return props.update_sender({name:e.target.value})}})),_react2.default.createElement("label",{htmlFor:"senderAddress"},_mailpoet2.default.I18n.t("senderAddress"),":",_react2.default.createElement("input",{name:"senderAddress",type:"text",placeholder:"john@doe.com",value:props.sender?props.sender.address:"","data-parsley-required":!0,"data-parsley-type":"email",onChange:function(e){return props.update_sender({address:e.target.value})}})),_react2.default.createElement("input",{className:"button button-primary",type:"submit",value:_mailpoet2.default.I18n.t("next")}),_react2.default.createElement("a",{onClick:props.finish,href:"#finish"},_mailpoet2.default.I18n.t("noThanksSkip"))))};WelcomeWizardSenderStep.propTypes={finish:_propTypes2.default.func.isRequired,loading:_propTypes2.default.bool.isRequired,update_sender:_propTypes2.default.func.isRequired,submit_sender:_propTypes2.default.func.isRequired,sender:_propTypes2.default.shape({name:_propTypes2.default.string,address:_propTypes2.default.string})},WelcomeWizardSenderStep.defaultProps={sender:null},module.exports=WelcomeWizardSenderStep},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),WelcomeWizardMigratedUserStep=function(props){return _react2.default.createElement("div",{className:"mailpoet_welcome_wizard_step_content mailpoet_welcome_wizard_centered_column"},_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("welcomeWizardLetsStartTitle")),_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("welcomeWizardSenderMigratedUserText")),_react2.default.createElement("div",{className:"mailpoet_welcome_wizard_step_controls"},_react2.default.createElement("button",{className:"button button-primary",onClick:props.next},_mailpoet2.default.I18n.t("next"))))};WelcomeWizardMigratedUserStep.propTypes={next:_propTypes2.default.func.isRequired},module.exports=WelcomeWizardMigratedUserStep},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_reactStringReplace=__webpack_require__(63),_reactStringReplace2=_interopRequireDefault(_reactStringReplace),WelcomeWizardHelpInfoStep=function(props){return _react2.default.createElement("div",{className:"mailpoet_welcome_wizard_step_content mailpoet_welcome_wizard_centered_column"},_react2.default.createElement("div",{className:"mailpoet_welcome_wizard_help_info_block"},_react2.default.createElement("span",{className:"mailpoet_welcome_wizard_support_button"}),_react2.default.createElement("p",null,(0,_reactStringReplace2.default)(_mailpoet2.default.I18n.t("welcomeWizardYouCanContactText"),/\[strong\](.*?)\[\/strong\]/g,function(match){return _react2.default.createElement("strong",{key:match},match)}))),_react2.default.createElement("div",{className:"mailpoet_welcome_wizard_help_info_block"},_react2.default.createElement("span",{className:"mailpoet_badge mailpoet_badge_video mailpoet_welcome_wizard_video_badge"},_react2.default.createElement("span",{className:"dashicons dashicons-format-video"}),_mailpoet2.default.I18n.t("seeVideoGuide")),_react2.default.createElement("p",null,(0,_reactStringReplace2.default)(_mailpoet2.default.I18n.t("welcomeWizardAboutVideosText"),/\[strong\](.*?)\[\/strong\]/g,function(match){return _react2.default.createElement("strong",{key:match},match)}))),_react2.default.createElement("div",{className:"mailpoet_welcome_wizard_help_info_block"},_react2.default.createElement("span",{className:"mailpoet_welcome_wizard_mail_icon"}),_react2.default.createElement("p",null,(0,_reactStringReplace2.default)(_mailpoet2.default.I18n.t("welcomeWizardAboutCourseText"),/\[strong\](.*?)\[\/strong\]/g,function(match){return _react2.default.createElement("strong",{key:match},match)})),_react2.default.createElement("iframe",{id:"mailpoet_form_iframe",width:"100%",scrolling:"no",frameBorder:"0",title:"Apply to course",src:"https://newsletters.mailpoet.com?mailpoet_form_iframe=13",className:"mailpoet_form_iframe",marginWidth:"0",marginHeight:"0",allowTransparency:"true"})),_react2.default.createElement("button",{className:"button button-primary",onClick:props.next},_mailpoet2.default.I18n.t("next")))};module.exports=WelcomeWizardHelpInfoStep,WelcomeWizardHelpInfoStep.propTypes={next:_propTypes2.default.func.isRequired},module.exports=WelcomeWizardHelpInfoStep},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_reactStringReplace=__webpack_require__(63),_reactStringReplace2=_interopRequireDefault(_reactStringReplace),WelcomeWizardUsageTrackingStep=function(props){return _react2.default.createElement("div",{className:"mailpoet_welcome_wizard_step_content mailpoet_welcome_wizard_centered_column"},_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("welcomeWizardUsageTrackingStepTitle")),_react2.default.createElement("p",null,(0,_reactStringReplace2.default)(_mailpoet2.default.I18n.t("welcomeWizardTrackingText"),/\[link\](.*?)\[\/link\]/g,function(match){return _react2.default.createElement("a",{key:"docs_link",href:"https://beta.docs.mailpoet.com/article/130-sharing-your-data-with-us",target:"_blank",rel:"noopener noreferrer"},match)})),_react2.default.createElement("div",{className:"mailpoet_welcome_wizard_step_controls\n "+(props.loading?"mailpoet_welcome_wizard_step_controls_loading":"")},_react2.default.createElement("button",{className:"button",onClick:props.skip_action,disabled:props.loading},_mailpoet2.default.I18n.t("skip")),_react2.default.createElement("button",{className:"button button-primary",onClick:props.allow_action,disabled:props.loading},props.allow_text)))};module.exports=WelcomeWizardUsageTrackingStep,WelcomeWizardUsageTrackingStep.propTypes={allow_action:_propTypes2.default.func.isRequired,allow_text:_propTypes2.default.string.isRequired,skip_action:_propTypes2.default.func.isRequired,loading:_propTypes2.default.bool.isRequired}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),WelcomeWizardWooCommerceStep=function(props){return _react2.default.createElement("div",{className:"mailpoet_welcome_wizard_step_content mailpoet_welcome_wizard_centered_column"},_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("welcomeWizardWooCommerceStepTitle")),_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("welcomeWizardHelpingShopOwnersText")),_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("welcomeWizardWooCommerceEmailsText")),_react2.default.createElement("img",{src:props.screenshot_src,className:"mailpoet_welcome_wizard_woo_screenshot",alt:"WooCommerce email"}),_react2.default.createElement("div",{className:"mailpoet_welcome_wizard_step_controls\n "+(props.loading?"mailpoet_welcome_wizard_step_controls_loading":"")},_react2.default.createElement("button",{className:"button button-primary",onClick:props.next,disabled:props.loading},_mailpoet2.default.I18n.t("gotIt"))))};module.exports=WelcomeWizardWooCommerceStep,WelcomeWizardWooCommerceStep.propTypes={next:_propTypes2.default.func.isRequired,screenshot_src:_propTypes2.default.string.isRequired,loading:_propTypes2.default.bool.isRequired}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _reactDom=__webpack_require__(28),_reactDom2=_interopRequireDefault(_reactDom),_react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_new_subscriber_announcement=__webpack_require__(699),_new_subscriber_announcement2=_interopRequireDefault(_new_subscriber_announcement),container=document.getElementById("new_subscriber_announcement");container&&_reactDom2.default.render(_react2.default.createElement(_new_subscriber_announcement2.default,{installedAt:window.mailpoet_installed_at,imageUrl:window.mailpoet_new_subscriber_announcement_image}),container)},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _react=__webpack_require__(2),_react2=_interopRequireDefault(_react),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_mailpoet=__webpack_require__(4),_mailpoet2=_interopRequireDefault(_mailpoet),_moment=__webpack_require__(0),_moment2=_interopRequireDefault(_moment),_in_app_announcement=__webpack_require__(475),_in_app_announcement2=_interopRequireDefault(_in_app_announcement),NewSubscriberNotificationAnnouncement=function(props){return _react2.default.createElement(_in_app_announcement2.default,{validUntil:(0,_moment2.default)(props.installedAt).add(3,"months").toDate(),height:"700px",showOnlyOnceSlug:"new_subscriber_notification",showToNewUser:!1},_react2.default.createElement("div",{className:"new_subscriber_notification_announcement"},_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("announcementHeader")),_react2.default.createElement("img",{src:props.imageUrl,width:"600px",height:"460px",alt:""}),_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("announcementParagraph1"),_react2.default.createElement("br",null),_mailpoet2.default.I18n.t("announcementParagraph2"))))};NewSubscriberNotificationAnnouncement.propTypes={installedAt:_propTypes2.default.string.isRequired,imageUrl:_propTypes2.default.string.isRequired},module.exports=NewSubscriberNotificationAnnouncement},function(module,exports,__webpack_require__){"use strict";(function(setImmediate){function displayPoll(){window.mailpoet_display_nps_poll&&window.satismeter&&window.mailpoet_installed_at_isoFormat&&(window.satismeter({writeKey:"6L479eVPXk7pBn6S",userId:window.mailpoet_current_wp_user.ID+window.mailpoet_site_url,traits:{name:window.mailpoet_current_wp_user.user_nicename,email:window.mailpoet_current_wp_user.user_email,createdAt:window.mailpoet_installed_at_isoFormat}}),window.satismeter({writeKey:"k0aJAsQAWI2ERyGv",userId:window.mailpoet_current_wp_user.ID+window.mailpoet_site_url,traits:{name:window.mailpoet_current_wp_user.user_nicename,email:window.mailpoet_current_wp_user.user_email,createdAt:window.mailpoet_installed_at_isoFormat}}))}setImmediate(displayPoll)}).call(exports,__webpack_require__(268).setImmediate)}]),[635]);
|
assets/js/admin.ca411beb.js
DELETED
@@ -1,29430 +0,0 @@
|
|
1 |
-
webpackJsonp([2],Array(22).concat([
|
2 |
-
/* 22 */
|
3 |
-
/***/ (function(module, exports) {
|
4 |
-
|
5 |
-
if (typeof Object.create === 'function') {
|
6 |
-
// implementation from standard node.js 'util' module
|
7 |
-
module.exports = function inherits(ctor, superCtor) {
|
8 |
-
ctor.super_ = superCtor
|
9 |
-
ctor.prototype = Object.create(superCtor.prototype, {
|
10 |
-
constructor: {
|
11 |
-
value: ctor,
|
12 |
-
enumerable: false,
|
13 |
-
writable: true,
|
14 |
-
configurable: true
|
15 |
-
}
|
16 |
-
});
|
17 |
-
};
|
18 |
-
} else {
|
19 |
-
// old school shim for old browsers
|
20 |
-
module.exports = function inherits(ctor, superCtor) {
|
21 |
-
ctor.super_ = superCtor
|
22 |
-
var TempCtor = function () {}
|
23 |
-
TempCtor.prototype = superCtor.prototype
|
24 |
-
ctor.prototype = new TempCtor()
|
25 |
-
ctor.prototype.constructor = ctor
|
26 |
-
}
|
27 |
-
}
|
28 |
-
|
29 |
-
|
30 |
-
/***/ }),
|
31 |
-
/* 23 */,
|
32 |
-
/* 24 */,
|
33 |
-
/* 25 */,
|
34 |
-
/* 26 */,
|
35 |
-
/* 27 */,
|
36 |
-
/* 28 */,
|
37 |
-
/* 29 */,
|
38 |
-
/* 30 */,
|
39 |
-
/* 31 */,
|
40 |
-
/* 32 */
|
41 |
-
/***/ (function(module, exports, __webpack_require__) {
|
42 |
-
|
43 |
-
"use strict";
|
44 |
-
// Copyright Joyent, Inc. and other Node contributors.
|
45 |
-
//
|
46 |
-
// Permission is hereby granted, free of charge, to any person obtaining a
|
47 |
-
// copy of this software and associated documentation files (the
|
48 |
-
// "Software"), to deal in the Software without restriction, including
|
49 |
-
// without limitation the rights to use, copy, modify, merge, publish,
|
50 |
-
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
51 |
-
// persons to whom the Software is furnished to do so, subject to the
|
52 |
-
// following conditions:
|
53 |
-
//
|
54 |
-
// The above copyright notice and this permission notice shall be included
|
55 |
-
// in all copies or substantial portions of the Software.
|
56 |
-
//
|
57 |
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
58 |
-
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
59 |
-
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
60 |
-
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
61 |
-
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
62 |
-
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
63 |
-
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
64 |
-
|
65 |
-
// a duplex stream is just a stream that is both readable and writable.
|
66 |
-
// Since JS doesn't have multiple prototypal inheritance, this class
|
67 |
-
// prototypally inherits from Readable, and then parasitically from
|
68 |
-
// Writable.
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
/*<replacement>*/
|
73 |
-
|
74 |
-
var processNextTick = __webpack_require__(56);
|
75 |
-
/*</replacement>*/
|
76 |
-
|
77 |
-
/*<replacement>*/
|
78 |
-
var objectKeys = Object.keys || function (obj) {
|
79 |
-
var keys = [];
|
80 |
-
for (var key in obj) {
|
81 |
-
keys.push(key);
|
82 |
-
}return keys;
|
83 |
-
};
|
84 |
-
/*</replacement>*/
|
85 |
-
|
86 |
-
module.exports = Duplex;
|
87 |
-
|
88 |
-
/*<replacement>*/
|
89 |
-
var util = __webpack_require__(46);
|
90 |
-
util.inherits = __webpack_require__(22);
|
91 |
-
/*</replacement>*/
|
92 |
-
|
93 |
-
var Readable = __webpack_require__(264);
|
94 |
-
var Writable = __webpack_require__(90);
|
95 |
-
|
96 |
-
util.inherits(Duplex, Readable);
|
97 |
-
|
98 |
-
var keys = objectKeys(Writable.prototype);
|
99 |
-
for (var v = 0; v < keys.length; v++) {
|
100 |
-
var method = keys[v];
|
101 |
-
if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
|
102 |
-
}
|
103 |
-
|
104 |
-
function Duplex(options) {
|
105 |
-
if (!(this instanceof Duplex)) return new Duplex(options);
|
106 |
-
|
107 |
-
Readable.call(this, options);
|
108 |
-
Writable.call(this, options);
|
109 |
-
|
110 |
-
if (options && options.readable === false) this.readable = false;
|
111 |
-
|
112 |
-
if (options && options.writable === false) this.writable = false;
|
113 |
-
|
114 |
-
this.allowHalfOpen = true;
|
115 |
-
if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
|
116 |
-
|
117 |
-
this.once('end', onend);
|
118 |
-
}
|
119 |
-
|
120 |
-
// the no-half-open enforcer
|
121 |
-
function onend() {
|
122 |
-
// if we allow half-open state, or if the writable side ended,
|
123 |
-
// then we're ok.
|
124 |
-
if (this.allowHalfOpen || this._writableState.ended) return;
|
125 |
-
|
126 |
-
// no more data can be written.
|
127 |
-
// But allow more writes to happen in this tick.
|
128 |
-
processNextTick(onEndNT, this);
|
129 |
-
}
|
130 |
-
|
131 |
-
function onEndNT(self) {
|
132 |
-
self.end();
|
133 |
-
}
|
134 |
-
|
135 |
-
Object.defineProperty(Duplex.prototype, 'destroyed', {
|
136 |
-
get: function () {
|
137 |
-
if (this._readableState === undefined || this._writableState === undefined) {
|
138 |
-
return false;
|
139 |
-
}
|
140 |
-
return this._readableState.destroyed && this._writableState.destroyed;
|
141 |
-
},
|
142 |
-
set: function (value) {
|
143 |
-
// we ignore the value if the stream
|
144 |
-
// has not been initialized yet
|
145 |
-
if (this._readableState === undefined || this._writableState === undefined) {
|
146 |
-
return;
|
147 |
-
}
|
148 |
-
|
149 |
-
// backward compatibility, the user is explicitly
|
150 |
-
// managing destroyed
|
151 |
-
this._readableState.destroyed = value;
|
152 |
-
this._writableState.destroyed = value;
|
153 |
-
}
|
154 |
-
});
|
155 |
-
|
156 |
-
Duplex.prototype._destroy = function (err, cb) {
|
157 |
-
this.push(null);
|
158 |
-
this.end();
|
159 |
-
|
160 |
-
processNextTick(cb, err);
|
161 |
-
};
|
162 |
-
|
163 |
-
function forEach(xs, f) {
|
164 |
-
for (var i = 0, l = xs.length; i < l; i++) {
|
165 |
-
f(xs[i], i);
|
166 |
-
}
|
167 |
-
}
|
168 |
-
|
169 |
-
/***/ }),
|
170 |
-
/* 33 */,
|
171 |
-
/* 34 */,
|
172 |
-
/* 35 */,
|
173 |
-
/* 36 */,
|
174 |
-
/* 37 */,
|
175 |
-
/* 38 */
|
176 |
-
/***/ (function(module, exports, __webpack_require__) {
|
177 |
-
|
178 |
-
var Parser = __webpack_require__(258),
|
179 |
-
DomHandler = __webpack_require__(420);
|
180 |
-
|
181 |
-
function defineProp(name, value){
|
182 |
-
delete module.exports[name];
|
183 |
-
module.exports[name] = value;
|
184 |
-
return value;
|
185 |
-
}
|
186 |
-
|
187 |
-
module.exports = {
|
188 |
-
Parser: Parser,
|
189 |
-
Tokenizer: __webpack_require__(259),
|
190 |
-
ElementType: __webpack_require__(45),
|
191 |
-
DomHandler: DomHandler,
|
192 |
-
get FeedHandler(){
|
193 |
-
return defineProp("FeedHandler", __webpack_require__(422));
|
194 |
-
},
|
195 |
-
get Stream(){
|
196 |
-
return defineProp("Stream", __webpack_require__(423));
|
197 |
-
},
|
198 |
-
get WritableStream(){
|
199 |
-
return defineProp("WritableStream", __webpack_require__(263));
|
200 |
-
},
|
201 |
-
get ProxyHandler(){
|
202 |
-
return defineProp("ProxyHandler", __webpack_require__(437));
|
203 |
-
},
|
204 |
-
get DomUtils(){
|
205 |
-
return defineProp("DomUtils", __webpack_require__(438));
|
206 |
-
},
|
207 |
-
get CollectingHandler(){
|
208 |
-
return defineProp("CollectingHandler", __webpack_require__(450));
|
209 |
-
},
|
210 |
-
// For legacy support
|
211 |
-
DefaultHandler: DomHandler,
|
212 |
-
get RssHandler(){
|
213 |
-
return defineProp("RssHandler", this.FeedHandler);
|
214 |
-
},
|
215 |
-
//helper methods
|
216 |
-
parseDOM: function(data, options){
|
217 |
-
var handler = new DomHandler(options);
|
218 |
-
new Parser(handler, options).end(data);
|
219 |
-
return handler.dom;
|
220 |
-
},
|
221 |
-
parseFeed: function(feed, options){
|
222 |
-
var handler = new module.exports.FeedHandler(options);
|
223 |
-
new Parser(handler, options).end(feed);
|
224 |
-
return handler.dom;
|
225 |
-
},
|
226 |
-
createDomStream: function(cb, options, elementCb){
|
227 |
-
var handler = new DomHandler(cb, options, elementCb);
|
228 |
-
return new Parser(handler, options);
|
229 |
-
},
|
230 |
-
// List of all events that the parser emits
|
231 |
-
EVENTS: { /* Format: eventname: number of arguments */
|
232 |
-
attribute: 2,
|
233 |
-
cdatastart: 0,
|
234 |
-
cdataend: 0,
|
235 |
-
text: 1,
|
236 |
-
processinginstruction: 2,
|
237 |
-
comment: 1,
|
238 |
-
commentend: 0,
|
239 |
-
closetag: 1,
|
240 |
-
opentag: 2,
|
241 |
-
opentagname: 1,
|
242 |
-
error: 1,
|
243 |
-
end: 0
|
244 |
-
}
|
245 |
-
};
|
246 |
-
|
247 |
-
|
248 |
-
/***/ }),
|
249 |
-
/* 39 */
|
250 |
-
/***/ (function(module, exports, __webpack_require__) {
|
251 |
-
|
252 |
-
/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["Backbone"] = __webpack_require__(483);
|
253 |
-
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(9)))
|
254 |
-
|
255 |
-
/***/ }),
|
256 |
-
/* 40 */,
|
257 |
-
/* 41 */,
|
258 |
-
/* 42 */,
|
259 |
-
/* 43 */,
|
260 |
-
/* 44 */,
|
261 |
-
/* 45 */
|
262 |
-
/***/ (function(module, exports) {
|
263 |
-
|
264 |
-
//Types of elements found in the DOM
|
265 |
-
module.exports = {
|
266 |
-
Text: "text", //Text
|
267 |
-
Directive: "directive", //<? ... ?>
|
268 |
-
Comment: "comment", //<!-- ... -->
|
269 |
-
Script: "script", //<script> tags
|
270 |
-
Style: "style", //<style> tags
|
271 |
-
Tag: "tag", //Any tag
|
272 |
-
CDATA: "cdata", //<![CDATA[ ... ]]>
|
273 |
-
Doctype: "doctype",
|
274 |
-
|
275 |
-
isTag: function(elem){
|
276 |
-
return elem.type === "tag" || elem.type === "script" || elem.type === "style";
|
277 |
-
}
|
278 |
-
};
|
279 |
-
|
280 |
-
|
281 |
-
/***/ }),
|
282 |
-
/* 46 */
|
283 |
-
/***/ (function(module, exports, __webpack_require__) {
|
284 |
-
|
285 |
-
/* WEBPACK VAR INJECTION */(function(Buffer) {// Copyright Joyent, Inc. and other Node contributors.
|
286 |
-
//
|
287 |
-
// Permission is hereby granted, free of charge, to any person obtaining a
|
288 |
-
// copy of this software and associated documentation files (the
|
289 |
-
// "Software"), to deal in the Software without restriction, including
|
290 |
-
// without limitation the rights to use, copy, modify, merge, publish,
|
291 |
-
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
292 |
-
// persons to whom the Software is furnished to do so, subject to the
|
293 |
-
// following conditions:
|
294 |
-
//
|
295 |
-
// The above copyright notice and this permission notice shall be included
|
296 |
-
// in all copies or substantial portions of the Software.
|
297 |
-
//
|
298 |
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
299 |
-
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
300 |
-
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
301 |
-
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
302 |
-
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
303 |
-
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
304 |
-
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
305 |
-
|
306 |
-
// NOTE: These type checking functions intentionally don't use `instanceof`
|
307 |
-
// because it is fragile and can be easily faked with `Object.create()`.
|
308 |
-
|
309 |
-
function isArray(arg) {
|
310 |
-
if (Array.isArray) {
|
311 |
-
return Array.isArray(arg);
|
312 |
-
}
|
313 |
-
return objectToString(arg) === '[object Array]';
|
314 |
-
}
|
315 |
-
exports.isArray = isArray;
|
316 |
-
|
317 |
-
function isBoolean(arg) {
|
318 |
-
return typeof arg === 'boolean';
|
319 |
-
}
|
320 |
-
exports.isBoolean = isBoolean;
|
321 |
-
|
322 |
-
function isNull(arg) {
|
323 |
-
return arg === null;
|
324 |
-
}
|
325 |
-
exports.isNull = isNull;
|
326 |
-
|
327 |
-
function isNullOrUndefined(arg) {
|
328 |
-
return arg == null;
|
329 |
-
}
|
330 |
-
exports.isNullOrUndefined = isNullOrUndefined;
|
331 |
-
|
332 |
-
function isNumber(arg) {
|
333 |
-
return typeof arg === 'number';
|
334 |
-
}
|
335 |
-
exports.isNumber = isNumber;
|
336 |
-
|
337 |
-
function isString(arg) {
|
338 |
-
return typeof arg === 'string';
|
339 |
-
}
|
340 |
-
exports.isString = isString;
|
341 |
-
|
342 |
-
function isSymbol(arg) {
|
343 |
-
return typeof arg === 'symbol';
|
344 |
-
}
|
345 |
-
exports.isSymbol = isSymbol;
|
346 |
-
|
347 |
-
function isUndefined(arg) {
|
348 |
-
return arg === void 0;
|
349 |
-
}
|
350 |
-
exports.isUndefined = isUndefined;
|
351 |
-
|
352 |
-
function isRegExp(re) {
|
353 |
-
return objectToString(re) === '[object RegExp]';
|
354 |
-
}
|
355 |
-
exports.isRegExp = isRegExp;
|
356 |
-
|
357 |
-
function isObject(arg) {
|
358 |
-
return typeof arg === 'object' && arg !== null;
|
359 |
-
}
|
360 |
-
exports.isObject = isObject;
|
361 |
-
|
362 |
-
function isDate(d) {
|
363 |
-
return objectToString(d) === '[object Date]';
|
364 |
-
}
|
365 |
-
exports.isDate = isDate;
|
366 |
-
|
367 |
-
function isError(e) {
|
368 |
-
return (objectToString(e) === '[object Error]' || e instanceof Error);
|
369 |
-
}
|
370 |
-
exports.isError = isError;
|
371 |
-
|
372 |
-
function isFunction(arg) {
|
373 |
-
return typeof arg === 'function';
|
374 |
-
}
|
375 |
-
exports.isFunction = isFunction;
|
376 |
-
|
377 |
-
function isPrimitive(arg) {
|
378 |
-
return arg === null ||
|
379 |
-
typeof arg === 'boolean' ||
|
380 |
-
typeof arg === 'number' ||
|
381 |
-
typeof arg === 'string' ||
|
382 |
-
typeof arg === 'symbol' || // ES6 symbol
|
383 |
-
typeof arg === 'undefined';
|
384 |
-
}
|
385 |
-
exports.isPrimitive = isPrimitive;
|
386 |
-
|
387 |
-
exports.isBuffer = Buffer.isBuffer;
|
388 |
-
|
389 |
-
function objectToString(o) {
|
390 |
-
return Object.prototype.toString.call(o);
|
391 |
-
}
|
392 |
-
|
393 |
-
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(89).Buffer))
|
394 |
-
|
395 |
-
/***/ }),
|
396 |
-
/* 47 */,
|
397 |
-
/* 48 */,
|
398 |
-
/* 49 */,
|
399 |
-
/* 50 */,
|
400 |
-
/* 51 */,
|
401 |
-
/* 52 */,
|
402 |
-
/* 53 */,
|
403 |
-
/* 54 */,
|
404 |
-
/* 55 */
|
405 |
-
/***/ (function(module, exports) {
|
406 |
-
|
407 |
-
// Copyright Joyent, Inc. and other Node contributors.
|
408 |
-
//
|
409 |
-
// Permission is hereby granted, free of charge, to any person obtaining a
|
410 |
-
// copy of this software and associated documentation files (the
|
411 |
-
// "Software"), to deal in the Software without restriction, including
|
412 |
-
// without limitation the rights to use, copy, modify, merge, publish,
|
413 |
-
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
414 |
-
// persons to whom the Software is furnished to do so, subject to the
|
415 |
-
// following conditions:
|
416 |
-
//
|
417 |
-
// The above copyright notice and this permission notice shall be included
|
418 |
-
// in all copies or substantial portions of the Software.
|
419 |
-
//
|
420 |
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
421 |
-
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
422 |
-
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
423 |
-
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
424 |
-
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
425 |
-
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
426 |
-
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
427 |
-
|
428 |
-
function EventEmitter() {
|
429 |
-
this._events = this._events || {};
|
430 |
-
this._maxListeners = this._maxListeners || undefined;
|
431 |
-
}
|
432 |
-
module.exports = EventEmitter;
|
433 |
-
|
434 |
-
// Backwards-compat with node 0.10.x
|
435 |
-
EventEmitter.EventEmitter = EventEmitter;
|
436 |
-
|
437 |
-
EventEmitter.prototype._events = undefined;
|
438 |
-
EventEmitter.prototype._maxListeners = undefined;
|
439 |
-
|
440 |
-
// By default EventEmitters will print a warning if more than 10 listeners are
|
441 |
-
// added to it. This is a useful default which helps finding memory leaks.
|
442 |
-
EventEmitter.defaultMaxListeners = 10;
|
443 |
-
|
444 |
-
// Obviously not all Emitters should be limited to 10. This function allows
|
445 |
-
// that to be increased. Set to zero for unlimited.
|
446 |
-
EventEmitter.prototype.setMaxListeners = function(n) {
|
447 |
-
if (!isNumber(n) || n < 0 || isNaN(n))
|
448 |
-
throw TypeError('n must be a positive number');
|
449 |
-
this._maxListeners = n;
|
450 |
-
return this;
|
451 |
-
};
|
452 |
-
|
453 |
-
EventEmitter.prototype.emit = function(type) {
|
454 |
-
var er, handler, len, args, i, listeners;
|
455 |
-
|
456 |
-
if (!this._events)
|
457 |
-
this._events = {};
|
458 |
-
|
459 |
-
// If there is no 'error' event listener then throw.
|
460 |
-
if (type === 'error') {
|
461 |
-
if (!this._events.error ||
|
462 |
-
(isObject(this._events.error) && !this._events.error.length)) {
|
463 |
-
er = arguments[1];
|
464 |
-
if (er instanceof Error) {
|
465 |
-
throw er; // Unhandled 'error' event
|
466 |
-
} else {
|
467 |
-
// At least give some kind of context to the user
|
468 |
-
var err = new Error('Uncaught, unspecified "error" event. (' + er + ')');
|
469 |
-
err.context = er;
|
470 |
-
throw err;
|
471 |
-
}
|
472 |
-
}
|
473 |
-
}
|
474 |
-
|
475 |
-
handler = this._events[type];
|
476 |
-
|
477 |
-
if (isUndefined(handler))
|
478 |
-
return false;
|
479 |
-
|
480 |
-
if (isFunction(handler)) {
|
481 |
-
switch (arguments.length) {
|
482 |
-
// fast cases
|
483 |
-
case 1:
|
484 |
-
handler.call(this);
|
485 |
-
break;
|
486 |
-
case 2:
|
487 |
-
handler.call(this, arguments[1]);
|
488 |
-
break;
|
489 |
-
case 3:
|
490 |
-
handler.call(this, arguments[1], arguments[2]);
|
491 |
-
break;
|
492 |
-
// slower
|
493 |
-
default:
|
494 |
-
args = Array.prototype.slice.call(arguments, 1);
|
495 |
-
handler.apply(this, args);
|
496 |
-
}
|
497 |
-
} else if (isObject(handler)) {
|
498 |
-
args = Array.prototype.slice.call(arguments, 1);
|
499 |
-
listeners = handler.slice();
|
500 |
-
len = listeners.length;
|
501 |
-
for (i = 0; i < len; i++)
|
502 |
-
listeners[i].apply(this, args);
|
503 |
-
}
|
504 |
-
|
505 |
-
return true;
|
506 |
-
};
|
507 |
-
|
508 |
-
EventEmitter.prototype.addListener = function(type, listener) {
|
509 |
-
var m;
|
510 |
-
|
511 |
-
if (!isFunction(listener))
|
512 |
-
throw TypeError('listener must be a function');
|
513 |
-
|
514 |
-
if (!this._events)
|
515 |
-
this._events = {};
|
516 |
-
|
517 |
-
// To avoid recursion in the case that type === "newListener"! Before
|
518 |
-
// adding it to the listeners, first emit "newListener".
|
519 |
-
if (this._events.newListener)
|
520 |
-
this.emit('newListener', type,
|
521 |
-
isFunction(listener.listener) ?
|
522 |
-
listener.listener : listener);
|
523 |
-
|
524 |
-
if (!this._events[type])
|
525 |
-
// Optimize the case of one listener. Don't need the extra array object.
|
526 |
-
this._events[type] = listener;
|
527 |
-
else if (isObject(this._events[type]))
|
528 |
-
// If we've already got an array, just append.
|
529 |
-
this._events[type].push(listener);
|
530 |
-
else
|
531 |
-
// Adding the second element, need to change to array.
|
532 |
-
this._events[type] = [this._events[type], listener];
|
533 |
-
|
534 |
-
// Check for listener leak
|
535 |
-
if (isObject(this._events[type]) && !this._events[type].warned) {
|
536 |
-
if (!isUndefined(this._maxListeners)) {
|
537 |
-
m = this._maxListeners;
|
538 |
-
} else {
|
539 |
-
m = EventEmitter.defaultMaxListeners;
|
540 |
-
}
|
541 |
-
|
542 |
-
if (m && m > 0 && this._events[type].length > m) {
|
543 |
-
this._events[type].warned = true;
|
544 |
-
console.error('(node) warning: possible EventEmitter memory ' +
|
545 |
-
'leak detected. %d listeners added. ' +
|
546 |
-
'Use emitter.setMaxListeners() to increase limit.',
|
547 |
-
this._events[type].length);
|
548 |
-
if (typeof console.trace === 'function') {
|
549 |
-
// not supported in IE 10
|
550 |
-
console.trace();
|
551 |
-
}
|
552 |
-
}
|
553 |
-
}
|
554 |
-
|
555 |
-
return this;
|
556 |
-
};
|
557 |
-
|
558 |
-
EventEmitter.prototype.on = EventEmitter.prototype.addListener;
|
559 |
-
|
560 |
-
EventEmitter.prototype.once = function(type, listener) {
|
561 |
-
if (!isFunction(listener))
|
562 |
-
throw TypeError('listener must be a function');
|
563 |
-
|
564 |
-
var fired = false;
|
565 |
-
|
566 |
-
function g() {
|
567 |
-
this.removeListener(type, g);
|
568 |
-
|
569 |
-
if (!fired) {
|
570 |
-
fired = true;
|
571 |
-
listener.apply(this, arguments);
|
572 |
-
}
|
573 |
-
}
|
574 |
-
|
575 |
-
g.listener = listener;
|
576 |
-
this.on(type, g);
|
577 |
-
|
578 |
-
return this;
|
579 |
-
};
|
580 |
-
|
581 |
-
// emits a 'removeListener' event iff the listener was removed
|
582 |
-
EventEmitter.prototype.removeListener = function(type, listener) {
|
583 |
-
var list, position, length, i;
|
584 |
-
|
585 |
-
if (!isFunction(listener))
|
586 |
-
throw TypeError('listener must be a function');
|
587 |
-
|
588 |
-
if (!this._events || !this._events[type])
|
589 |
-
return this;
|
590 |
-
|
591 |
-
list = this._events[type];
|
592 |
-
length = list.length;
|
593 |
-
position = -1;
|
594 |
-
|
595 |
-
if (list === listener ||
|
596 |
-
(isFunction(list.listener) && list.listener === listener)) {
|
597 |
-
delete this._events[type];
|
598 |
-
if (this._events.removeListener)
|
599 |
-
this.emit('removeListener', type, listener);
|
600 |
-
|
601 |
-
} else if (isObject(list)) {
|
602 |
-
for (i = length; i-- > 0;) {
|
603 |
-
if (list[i] === listener ||
|
604 |
-
(list[i].listener && list[i].listener === listener)) {
|
605 |
-
position = i;
|
606 |
-
break;
|
607 |
-
}
|
608 |
-
}
|
609 |
-
|
610 |
-
if (position < 0)
|
611 |
-
return this;
|
612 |
-
|
613 |
-
if (list.length === 1) {
|
614 |
-
list.length = 0;
|
615 |
-
delete this._events[type];
|
616 |
-
} else {
|
617 |
-
list.splice(position, 1);
|
618 |
-
}
|
619 |
-
|
620 |
-
if (this._events.removeListener)
|
621 |
-
this.emit('removeListener', type, listener);
|
622 |
-
}
|
623 |
-
|
624 |
-
return this;
|
625 |
-
};
|
626 |
-
|
627 |
-
EventEmitter.prototype.removeAllListeners = function(type) {
|
628 |
-
var key, listeners;
|
629 |
-
|
630 |
-
if (!this._events)
|
631 |
-
return this;
|
632 |
-
|
633 |
-
// not listening for removeListener, no need to emit
|
634 |
-
if (!this._events.removeListener) {
|
635 |
-
if (arguments.length === 0)
|
636 |
-
this._events = {};
|
637 |
-
else if (this._events[type])
|
638 |
-
delete this._events[type];
|
639 |
-
return this;
|
640 |
-
}
|
641 |
-
|
642 |
-
// emit removeListener for all listeners on all events
|
643 |
-
if (arguments.length === 0) {
|
644 |
-
for (key in this._events) {
|
645 |
-
if (key === 'removeListener') continue;
|
646 |
-
this.removeAllListeners(key);
|
647 |
-
}
|
648 |
-
this.removeAllListeners('removeListener');
|
649 |
-
this._events = {};
|
650 |
-
return this;
|
651 |
-
}
|
652 |
-
|
653 |
-
listeners = this._events[type];
|
654 |
-
|
655 |
-
if (isFunction(listeners)) {
|
656 |
-
this.removeListener(type, listeners);
|
657 |
-
} else if (listeners) {
|
658 |
-
// LIFO order
|
659 |
-
while (listeners.length)
|
660 |
-
this.removeListener(type, listeners[listeners.length - 1]);
|
661 |
-
}
|
662 |
-
delete this._events[type];
|
663 |
-
|
664 |
-
return this;
|
665 |
-
};
|
666 |
-
|
667 |
-
EventEmitter.prototype.listeners = function(type) {
|
668 |
-
var ret;
|
669 |
-
if (!this._events || !this._events[type])
|
670 |
-
ret = [];
|
671 |
-
else if (isFunction(this._events[type]))
|
672 |
-
ret = [this._events[type]];
|
673 |
-
else
|
674 |
-
ret = this._events[type].slice();
|
675 |
-
return ret;
|
676 |
-
};
|
677 |
-
|
678 |
-
EventEmitter.prototype.listenerCount = function(type) {
|
679 |
-
if (this._events) {
|
680 |
-
var evlistener = this._events[type];
|
681 |
-
|
682 |
-
if (isFunction(evlistener))
|
683 |
-
return 1;
|
684 |
-
else if (evlistener)
|
685 |
-
return evlistener.length;
|
686 |
-
}
|
687 |
-
return 0;
|
688 |
-
};
|
689 |
-
|
690 |
-
EventEmitter.listenerCount = function(emitter, type) {
|
691 |
-
return emitter.listenerCount(type);
|
692 |
-
};
|
693 |
-
|
694 |
-
function isFunction(arg) {
|
695 |
-
return typeof arg === 'function';
|
696 |
-
}
|
697 |
-
|
698 |
-
function isNumber(arg) {
|
699 |
-
return typeof arg === 'number';
|
700 |
-
}
|
701 |
-
|
702 |
-
function isObject(arg) {
|
703 |
-
return typeof arg === 'object' && arg !== null;
|
704 |
-
}
|
705 |
-
|
706 |
-
function isUndefined(arg) {
|
707 |
-
return arg === void 0;
|
708 |
-
}
|
709 |
-
|
710 |
-
|
711 |
-
/***/ }),
|
712 |
-
/* 56 */
|
713 |
-
/***/ (function(module, exports, __webpack_require__) {
|
714 |
-
|
715 |
-
"use strict";
|
716 |
-
/* WEBPACK VAR INJECTION */(function(process) {
|
717 |
-
|
718 |
-
if (!process.version ||
|
719 |
-
process.version.indexOf('v0.') === 0 ||
|
720 |
-
process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {
|
721 |
-
module.exports = nextTick;
|
722 |
-
} else {
|
723 |
-
module.exports = process.nextTick;
|
724 |
-
}
|
725 |
-
|
726 |
-
function nextTick(fn, arg1, arg2, arg3) {
|
727 |
-
if (typeof fn !== 'function') {
|
728 |
-
throw new TypeError('"callback" argument must be a function');
|
729 |
-
}
|
730 |
-
var len = arguments.length;
|
731 |
-
var args, i;
|
732 |
-
switch (len) {
|
733 |
-
case 0:
|
734 |
-
case 1:
|
735 |
-
return process.nextTick(fn);
|
736 |
-
case 2:
|
737 |
-
return process.nextTick(function afterTickOne() {
|
738 |
-
fn.call(null, arg1);
|
739 |
-
});
|
740 |
-
case 3:
|
741 |
-
return process.nextTick(function afterTickTwo() {
|
742 |
-
fn.call(null, arg1, arg2);
|
743 |
-
});
|
744 |
-
case 4:
|
745 |
-
return process.nextTick(function afterTickThree() {
|
746 |
-
fn.call(null, arg1, arg2, arg3);
|
747 |
-
});
|
748 |
-
default:
|
749 |
-
args = new Array(len - 1);
|
750 |
-
i = 0;
|
751 |
-
while (i < args.length) {
|
752 |
-
args[i++] = arguments[i];
|
753 |
-
}
|
754 |
-
return process.nextTick(function afterTick() {
|
755 |
-
fn.apply(null, args);
|
756 |
-
});
|
757 |
-
}
|
758 |
-
}
|
759 |
-
|
760 |
-
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
761 |
-
|
762 |
-
/***/ }),
|
763 |
-
/* 57 */
|
764 |
-
/***/ (function(module, exports, __webpack_require__) {
|
765 |
-
|
766 |
-
/* eslint-disable node/no-deprecated-api */
|
767 |
-
var buffer = __webpack_require__(89)
|
768 |
-
var Buffer = buffer.Buffer
|
769 |
-
|
770 |
-
// alternative to using Object.keys for old browsers
|
771 |
-
function copyProps (src, dst) {
|
772 |
-
for (var key in src) {
|
773 |
-
dst[key] = src[key]
|
774 |
-
}
|
775 |
-
}
|
776 |
-
if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
|
777 |
-
module.exports = buffer
|
778 |
-
} else {
|
779 |
-
// Copy properties from require('buffer')
|
780 |
-
copyProps(buffer, exports)
|
781 |
-
exports.Buffer = SafeBuffer
|
782 |
-
}
|
783 |
-
|
784 |
-
function SafeBuffer (arg, encodingOrOffset, length) {
|
785 |
-
return Buffer(arg, encodingOrOffset, length)
|
786 |
-
}
|
787 |
-
|
788 |
-
// Copy static methods from Buffer
|
789 |
-
copyProps(Buffer, SafeBuffer)
|
790 |
-
|
791 |
-
SafeBuffer.from = function (arg, encodingOrOffset, length) {
|
792 |
-
if (typeof arg === 'number') {
|
793 |
-
throw new TypeError('Argument must not be a number')
|
794 |
-
}
|
795 |
-
return Buffer(arg, encodingOrOffset, length)
|
796 |
-
}
|
797 |
-
|
798 |
-
SafeBuffer.alloc = function (size, fill, encoding) {
|
799 |
-
if (typeof size !== 'number') {
|
800 |
-
throw new TypeError('Argument must be a number')
|
801 |
-
}
|
802 |
-
var buf = Buffer(size)
|
803 |
-
if (fill !== undefined) {
|
804 |
-
if (typeof encoding === 'string') {
|
805 |
-
buf.fill(fill, encoding)
|
806 |
-
} else {
|
807 |
-
buf.fill(fill)
|
808 |
-
}
|
809 |
-
} else {
|
810 |
-
buf.fill(0)
|
811 |
-
}
|
812 |
-
return buf
|
813 |
-
}
|
814 |
-
|
815 |
-
SafeBuffer.allocUnsafe = function (size) {
|
816 |
-
if (typeof size !== 'number') {
|
817 |
-
throw new TypeError('Argument must be a number')
|
818 |
-
}
|
819 |
-
return Buffer(size)
|
820 |
-
}
|
821 |
-
|
822 |
-
SafeBuffer.allocUnsafeSlow = function (size) {
|
823 |
-
if (typeof size !== 'number') {
|
824 |
-
throw new TypeError('Argument must be a number')
|
825 |
-
}
|
826 |
-
return buffer.SlowBuffer(size)
|
827 |
-
}
|
828 |
-
|
829 |
-
|
830 |
-
/***/ }),
|
831 |
-
/* 58 */,
|
832 |
-
/* 59 */,
|
833 |
-
/* 60 */,
|
834 |
-
/* 61 */,
|
835 |
-
/* 62 */,
|
836 |
-
/* 63 */,
|
837 |
-
/* 64 */,
|
838 |
-
/* 65 */,
|
839 |
-
/* 66 */,
|
840 |
-
/* 67 */,
|
841 |
-
/* 68 */,
|
842 |
-
/* 69 */,
|
843 |
-
/* 70 */,
|
844 |
-
/* 71 */,
|
845 |
-
/* 72 */,
|
846 |
-
/* 73 */,
|
847 |
-
/* 74 */,
|
848 |
-
/* 75 */,
|
849 |
-
/* 76 */,
|
850 |
-
/* 77 */,
|
851 |
-
/* 78 */,
|
852 |
-
/* 79 */,
|
853 |
-
/* 80 */,
|
854 |
-
/* 81 */,
|
855 |
-
/* 82 */,
|
856 |
-
/* 83 */,
|
857 |
-
/* 84 */,
|
858 |
-
/* 85 */,
|
859 |
-
/* 86 */
|
860 |
-
/***/ (function(module, exports) {
|
861 |
-
|
862 |
-
module.exports = {"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"'","ApplyFunction":"","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","Backslash":"∖","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","Bernoullis":"ℬ","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"‵","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"ℬ","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"ⅅ","caps":"∩︀","caret":"⁁","caron":"ˇ","Cayleys":"ℭ","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"ℭ","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"ℂ","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"⨯","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"∪","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"‐","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"ⅅ","dd":"ⅆ","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"ⅆ","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"⊤","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"ⅇ","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":" ","emsp14":" ","emsp":" ","ENG":"Ŋ","eng":"ŋ","ensp":" ","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"ℯ","Escr":"ℰ","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"ℰ","exponentiale":"ⅇ","ExponentialE":"ⅇ","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"ℱ","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","Fscr":"ℱ","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"","InvisibleTimes":"","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"","NegativeThickSpace":"","NegativeThinSpace":"","NegativeVeryThinSpace":"","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\"","QUOT":"\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":" ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"","zwnj":""}
|
863 |
-
|
864 |
-
/***/ }),
|
865 |
-
/* 87 */
|
866 |
-
/***/ (function(module, exports) {
|
867 |
-
|
868 |
-
module.exports = {"amp":"&","apos":"'","gt":">","lt":"<","quot":"\""}
|
869 |
-
|
870 |
-
/***/ }),
|
871 |
-
/* 88 */
|
872 |
-
/***/ (function(module, exports, __webpack_require__) {
|
873 |
-
|
874 |
-
exports = module.exports = __webpack_require__(264);
|
875 |
-
exports.Stream = exports;
|
876 |
-
exports.Readable = exports;
|
877 |
-
exports.Writable = __webpack_require__(90);
|
878 |
-
exports.Duplex = __webpack_require__(32);
|
879 |
-
exports.Transform = __webpack_require__(269);
|
880 |
-
exports.PassThrough = __webpack_require__(431);
|
881 |
-
|
882 |
-
|
883 |
-
/***/ }),
|
884 |
-
/* 89 */
|
885 |
-
/***/ (function(module, exports, __webpack_require__) {
|
886 |
-
|
887 |
-
"use strict";
|
888 |
-
/* WEBPACK VAR INJECTION */(function(global) {/*!
|
889 |
-
* The buffer module from node.js, for the browser.
|
890 |
-
*
|
891 |
-
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
892 |
-
* @license MIT
|
893 |
-
*/
|
894 |
-
/* eslint-disable no-proto */
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
var base64 = __webpack_require__(425)
|
899 |
-
var ieee754 = __webpack_require__(426)
|
900 |
-
var isArray = __webpack_require__(265)
|
901 |
-
|
902 |
-
exports.Buffer = Buffer
|
903 |
-
exports.SlowBuffer = SlowBuffer
|
904 |
-
exports.INSPECT_MAX_BYTES = 50
|
905 |
-
|
906 |
-
/**
|
907 |
-
* If `Buffer.TYPED_ARRAY_SUPPORT`:
|
908 |
-
* === true Use Uint8Array implementation (fastest)
|
909 |
-
* === false Use Object implementation (most compatible, even IE6)
|
910 |
-
*
|
911 |
-
* Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
|
912 |
-
* Opera 11.6+, iOS 4.2+.
|
913 |
-
*
|
914 |
-
* Due to various browser bugs, sometimes the Object implementation will be used even
|
915 |
-
* when the browser supports typed arrays.
|
916 |
-
*
|
917 |
-
* Note:
|
918 |
-
*
|
919 |
-
* - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
|
920 |
-
* See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
|
921 |
-
*
|
922 |
-
* - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
|
923 |
-
*
|
924 |
-
* - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
|
925 |
-
* incorrect length in some situations.
|
926 |
-
|
927 |
-
* We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
|
928 |
-
* get the Object implementation, which is slower but behaves correctly.
|
929 |
-
*/
|
930 |
-
Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined
|
931 |
-
? global.TYPED_ARRAY_SUPPORT
|
932 |
-
: typedArraySupport()
|
933 |
-
|
934 |
-
/*
|
935 |
-
* Export kMaxLength after typed array support is determined.
|
936 |
-
*/
|
937 |
-
exports.kMaxLength = kMaxLength()
|
938 |
-
|
939 |
-
function typedArraySupport () {
|
940 |
-
try {
|
941 |
-
var arr = new Uint8Array(1)
|
942 |
-
arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
|
943 |
-
return arr.foo() === 42 && // typed array instances can be augmented
|
944 |
-
typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
|
945 |
-
arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
|
946 |
-
} catch (e) {
|
947 |
-
return false
|
948 |
-
}
|
949 |
-
}
|
950 |
-
|
951 |
-
function kMaxLength () {
|
952 |
-
return Buffer.TYPED_ARRAY_SUPPORT
|
953 |
-
? 0x7fffffff
|
954 |
-
: 0x3fffffff
|
955 |
-
}
|
956 |
-
|
957 |
-
function createBuffer (that, length) {
|
958 |
-
if (kMaxLength() < length) {
|
959 |
-
throw new RangeError('Invalid typed array length')
|
960 |
-
}
|
961 |
-
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
962 |
-
// Return an augmented `Uint8Array` instance, for best performance
|
963 |
-
that = new Uint8Array(length)
|
964 |
-
that.__proto__ = Buffer.prototype
|
965 |
-
} else {
|
966 |
-
// Fallback: Return an object instance of the Buffer class
|
967 |
-
if (that === null) {
|
968 |
-
that = new Buffer(length)
|
969 |
-
}
|
970 |
-
that.length = length
|
971 |
-
}
|
972 |
-
|
973 |
-
return that
|
974 |
-
}
|
975 |
-
|
976 |
-
/**
|
977 |
-
* The Buffer constructor returns instances of `Uint8Array` that have their
|
978 |
-
* prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
|
979 |
-
* `Uint8Array`, so the returned instances will have all the node `Buffer` methods
|
980 |
-
* and the `Uint8Array` methods. Square bracket notation works as expected -- it
|
981 |
-
* returns a single octet.
|
982 |
-
*
|
983 |
-
* The `Uint8Array` prototype remains unmodified.
|
984 |
-
*/
|
985 |
-
|
986 |
-
function Buffer (arg, encodingOrOffset, length) {
|
987 |
-
if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
|
988 |
-
return new Buffer(arg, encodingOrOffset, length)
|
989 |
-
}
|
990 |
-
|
991 |
-
// Common case.
|
992 |
-
if (typeof arg === 'number') {
|
993 |
-
if (typeof encodingOrOffset === 'string') {
|
994 |
-
throw new Error(
|
995 |
-
'If encoding is specified then the first argument must be a string'
|
996 |
-
)
|
997 |
-
}
|
998 |
-
return allocUnsafe(this, arg)
|
999 |
-
}
|
1000 |
-
return from(this, arg, encodingOrOffset, length)
|
1001 |
-
}
|
1002 |
-
|
1003 |
-
Buffer.poolSize = 8192 // not used by this implementation
|
1004 |
-
|
1005 |
-
// TODO: Legacy, not needed anymore. Remove in next major version.
|
1006 |
-
Buffer._augment = function (arr) {
|
1007 |
-
arr.__proto__ = Buffer.prototype
|
1008 |
-
return arr
|
1009 |
-
}
|
1010 |
-
|
1011 |
-
function from (that, value, encodingOrOffset, length) {
|
1012 |
-
if (typeof value === 'number') {
|
1013 |
-
throw new TypeError('"value" argument must not be a number')
|
1014 |
-
}
|
1015 |
-
|
1016 |
-
if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
|
1017 |
-
return fromArrayBuffer(that, value, encodingOrOffset, length)
|
1018 |
-
}
|
1019 |
-
|
1020 |
-
if (typeof value === 'string') {
|
1021 |
-
return fromString(that, value, encodingOrOffset)
|
1022 |
-
}
|
1023 |
-
|
1024 |
-
return fromObject(that, value)
|
1025 |
-
}
|
1026 |
-
|
1027 |
-
/**
|
1028 |
-
* Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
|
1029 |
-
* if value is a number.
|
1030 |
-
* Buffer.from(str[, encoding])
|
1031 |
-
* Buffer.from(array)
|
1032 |
-
* Buffer.from(buffer)
|
1033 |
-
* Buffer.from(arrayBuffer[, byteOffset[, length]])
|
1034 |
-
**/
|
1035 |
-
Buffer.from = function (value, encodingOrOffset, length) {
|
1036 |
-
return from(null, value, encodingOrOffset, length)
|
1037 |
-
}
|
1038 |
-
|
1039 |
-
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
1040 |
-
Buffer.prototype.__proto__ = Uint8Array.prototype
|
1041 |
-
Buffer.__proto__ = Uint8Array
|
1042 |
-
if (typeof Symbol !== 'undefined' && Symbol.species &&
|
1043 |
-
Buffer[Symbol.species] === Buffer) {
|
1044 |
-
// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
|
1045 |
-
Object.defineProperty(Buffer, Symbol.species, {
|
1046 |
-
value: null,
|
1047 |
-
configurable: true
|
1048 |
-
})
|
1049 |
-
}
|
1050 |
-
}
|
1051 |
-
|
1052 |
-
function assertSize (size) {
|
1053 |
-
if (typeof size !== 'number') {
|
1054 |
-
throw new TypeError('"size" argument must be a number')
|
1055 |
-
} else if (size < 0) {
|
1056 |
-
throw new RangeError('"size" argument must not be negative')
|
1057 |
-
}
|
1058 |
-
}
|
1059 |
-
|
1060 |
-
function alloc (that, size, fill, encoding) {
|
1061 |
-
assertSize(size)
|
1062 |
-
if (size <= 0) {
|
1063 |
-
return createBuffer(that, size)
|
1064 |
-
}
|
1065 |
-
if (fill !== undefined) {
|
1066 |
-
// Only pay attention to encoding if it's a string. This
|
1067 |
-
// prevents accidentally sending in a number that would
|
1068 |
-
// be interpretted as a start offset.
|
1069 |
-
return typeof encoding === 'string'
|
1070 |
-
? createBuffer(that, size).fill(fill, encoding)
|
1071 |
-
: createBuffer(that, size).fill(fill)
|
1072 |
-
}
|
1073 |
-
return createBuffer(that, size)
|
1074 |
-
}
|
1075 |
-
|
1076 |
-
/**
|
1077 |
-
* Creates a new filled Buffer instance.
|
1078 |
-
* alloc(size[, fill[, encoding]])
|
1079 |
-
**/
|
1080 |
-
Buffer.alloc = function (size, fill, encoding) {
|
1081 |
-
return alloc(null, size, fill, encoding)
|
1082 |
-
}
|
1083 |
-
|
1084 |
-
function allocUnsafe (that, size) {
|
1085 |
-
assertSize(size)
|
1086 |
-
that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)
|
1087 |
-
if (!Buffer.TYPED_ARRAY_SUPPORT) {
|
1088 |
-
for (var i = 0; i < size; ++i) {
|
1089 |
-
that[i] = 0
|
1090 |
-
}
|
1091 |
-
}
|
1092 |
-
return that
|
1093 |
-
}
|
1094 |
-
|
1095 |
-
/**
|
1096 |
-
* Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
|
1097 |
-
* */
|
1098 |
-
Buffer.allocUnsafe = function (size) {
|
1099 |
-
return allocUnsafe(null, size)
|
1100 |
-
}
|
1101 |
-
/**
|
1102 |
-
* Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
|
1103 |
-
*/
|
1104 |
-
Buffer.allocUnsafeSlow = function (size) {
|
1105 |
-
return allocUnsafe(null, size)
|
1106 |
-
}
|
1107 |
-
|
1108 |
-
function fromString (that, string, encoding) {
|
1109 |
-
if (typeof encoding !== 'string' || encoding === '') {
|
1110 |
-
encoding = 'utf8'
|
1111 |
-
}
|
1112 |
-
|
1113 |
-
if (!Buffer.isEncoding(encoding)) {
|
1114 |
-
throw new TypeError('"encoding" must be a valid string encoding')
|
1115 |
-
}
|
1116 |
-
|
1117 |
-
var length = byteLength(string, encoding) | 0
|
1118 |
-
that = createBuffer(that, length)
|
1119 |
-
|
1120 |
-
var actual = that.write(string, encoding)
|
1121 |
-
|
1122 |
-
if (actual !== length) {
|
1123 |
-
// Writing a hex string, for example, that contains invalid characters will
|
1124 |
-
// cause everything after the first invalid character to be ignored. (e.g.
|
1125 |
-
// 'abxxcd' will be treated as 'ab')
|
1126 |
-
that = that.slice(0, actual)
|
1127 |
-
}
|
1128 |
-
|
1129 |
-
return that
|
1130 |
-
}
|
1131 |
-
|
1132 |
-
function fromArrayLike (that, array) {
|
1133 |
-
var length = array.length < 0 ? 0 : checked(array.length) | 0
|
1134 |
-
that = createBuffer(that, length)
|
1135 |
-
for (var i = 0; i < length; i += 1) {
|
1136 |
-
that[i] = array[i] & 255
|
1137 |
-
}
|
1138 |
-
return that
|
1139 |
-
}
|
1140 |
-
|
1141 |
-
function fromArrayBuffer (that, array, byteOffset, length) {
|
1142 |
-
array.byteLength // this throws if `array` is not a valid ArrayBuffer
|
1143 |
-
|
1144 |
-
if (byteOffset < 0 || array.byteLength < byteOffset) {
|
1145 |
-
throw new RangeError('\'offset\' is out of bounds')
|
1146 |
-
}
|
1147 |
-
|
1148 |
-
if (array.byteLength < byteOffset + (length || 0)) {
|
1149 |
-
throw new RangeError('\'length\' is out of bounds')
|
1150 |
-
}
|
1151 |
-
|
1152 |
-
if (byteOffset === undefined && length === undefined) {
|
1153 |
-
array = new Uint8Array(array)
|
1154 |
-
} else if (length === undefined) {
|
1155 |
-
array = new Uint8Array(array, byteOffset)
|
1156 |
-
} else {
|
1157 |
-
array = new Uint8Array(array, byteOffset, length)
|
1158 |
-
}
|
1159 |
-
|
1160 |
-
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
1161 |
-
// Return an augmented `Uint8Array` instance, for best performance
|
1162 |
-
that = array
|
1163 |
-
that.__proto__ = Buffer.prototype
|
1164 |
-
} else {
|
1165 |
-
// Fallback: Return an object instance of the Buffer class
|
1166 |
-
that = fromArrayLike(that, array)
|
1167 |
-
}
|
1168 |
-
return that
|
1169 |
-
}
|
1170 |
-
|
1171 |
-
function fromObject (that, obj) {
|
1172 |
-
if (Buffer.isBuffer(obj)) {
|
1173 |
-
var len = checked(obj.length) | 0
|
1174 |
-
that = createBuffer(that, len)
|
1175 |
-
|
1176 |
-
if (that.length === 0) {
|
1177 |
-
return that
|
1178 |
-
}
|
1179 |
-
|
1180 |
-
obj.copy(that, 0, 0, len)
|
1181 |
-
return that
|
1182 |
-
}
|
1183 |
-
|
1184 |
-
if (obj) {
|
1185 |
-
if ((typeof ArrayBuffer !== 'undefined' &&
|
1186 |
-
obj.buffer instanceof ArrayBuffer) || 'length' in obj) {
|
1187 |
-
if (typeof obj.length !== 'number' || isnan(obj.length)) {
|
1188 |
-
return createBuffer(that, 0)
|
1189 |
-
}
|
1190 |
-
return fromArrayLike(that, obj)
|
1191 |
-
}
|
1192 |
-
|
1193 |
-
if (obj.type === 'Buffer' && isArray(obj.data)) {
|
1194 |
-
return fromArrayLike(that, obj.data)
|
1195 |
-
}
|
1196 |
-
}
|
1197 |
-
|
1198 |
-
throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')
|
1199 |
-
}
|
1200 |
-
|
1201 |
-
function checked (length) {
|
1202 |
-
// Note: cannot use `length < kMaxLength()` here because that fails when
|
1203 |
-
// length is NaN (which is otherwise coerced to zero.)
|
1204 |
-
if (length >= kMaxLength()) {
|
1205 |
-
throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
|
1206 |
-
'size: 0x' + kMaxLength().toString(16) + ' bytes')
|
1207 |
-
}
|
1208 |
-
return length | 0
|
1209 |
-
}
|
1210 |
-
|
1211 |
-
function SlowBuffer (length) {
|
1212 |
-
if (+length != length) { // eslint-disable-line eqeqeq
|
1213 |
-
length = 0
|
1214 |
-
}
|
1215 |
-
return Buffer.alloc(+length)
|
1216 |
-
}
|
1217 |
-
|
1218 |
-
Buffer.isBuffer = function isBuffer (b) {
|
1219 |
-
return !!(b != null && b._isBuffer)
|
1220 |
-
}
|
1221 |
-
|
1222 |
-
Buffer.compare = function compare (a, b) {
|
1223 |
-
if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
|
1224 |
-
throw new TypeError('Arguments must be Buffers')
|
1225 |
-
}
|
1226 |
-
|
1227 |
-
if (a === b) return 0
|
1228 |
-
|
1229 |
-
var x = a.length
|
1230 |
-
var y = b.length
|
1231 |
-
|
1232 |
-
for (var i = 0, len = Math.min(x, y); i < len; ++i) {
|
1233 |
-
if (a[i] !== b[i]) {
|
1234 |
-
x = a[i]
|
1235 |
-
y = b[i]
|
1236 |
-
break
|
1237 |
-
}
|
1238 |
-
}
|
1239 |
-
|
1240 |
-
if (x < y) return -1
|
1241 |
-
if (y < x) return 1
|
1242 |
-
return 0
|
1243 |
-
}
|
1244 |
-
|
1245 |
-
Buffer.isEncoding = function isEncoding (encoding) {
|
1246 |
-
switch (String(encoding).toLowerCase()) {
|
1247 |
-
case 'hex':
|
1248 |
-
case 'utf8':
|
1249 |
-
case 'utf-8':
|
1250 |
-
case 'ascii':
|
1251 |
-
case 'latin1':
|
1252 |
-
case 'binary':
|
1253 |
-
case 'base64':
|
1254 |
-
case 'ucs2':
|
1255 |
-
case 'ucs-2':
|
1256 |
-
case 'utf16le':
|
1257 |
-
case 'utf-16le':
|
1258 |
-
return true
|
1259 |
-
default:
|
1260 |
-
return false
|
1261 |
-
}
|
1262 |
-
}
|
1263 |
-
|
1264 |
-
Buffer.concat = function concat (list, length) {
|
1265 |
-
if (!isArray(list)) {
|
1266 |
-
throw new TypeError('"list" argument must be an Array of Buffers')
|
1267 |
-
}
|
1268 |
-
|
1269 |
-
if (list.length === 0) {
|
1270 |
-
return Buffer.alloc(0)
|
1271 |
-
}
|
1272 |
-
|
1273 |
-
var i
|
1274 |
-
if (length === undefined) {
|
1275 |
-
length = 0
|
1276 |
-
for (i = 0; i < list.length; ++i) {
|
1277 |
-
length += list[i].length
|
1278 |
-
}
|
1279 |
-
}
|
1280 |
-
|
1281 |
-
var buffer = Buffer.allocUnsafe(length)
|
1282 |
-
var pos = 0
|
1283 |
-
for (i = 0; i < list.length; ++i) {
|
1284 |
-
var buf = list[i]
|
1285 |
-
if (!Buffer.isBuffer(buf)) {
|
1286 |
-
throw new TypeError('"list" argument must be an Array of Buffers')
|
1287 |
-
}
|
1288 |
-
buf.copy(buffer, pos)
|
1289 |
-
pos += buf.length
|
1290 |
-
}
|
1291 |
-
return buffer
|
1292 |
-
}
|
1293 |
-
|
1294 |
-
function byteLength (string, encoding) {
|
1295 |
-
if (Buffer.isBuffer(string)) {
|
1296 |
-
return string.length
|
1297 |
-
}
|
1298 |
-
if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&
|
1299 |
-
(ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
|
1300 |
-
return string.byteLength
|
1301 |
-
}
|
1302 |
-
if (typeof string !== 'string') {
|
1303 |
-
string = '' + string
|
1304 |
-
}
|
1305 |
-
|
1306 |
-
var len = string.length
|
1307 |
-
if (len === 0) return 0
|
1308 |
-
|
1309 |
-
// Use a for loop to avoid recursion
|
1310 |
-
var loweredCase = false
|
1311 |
-
for (;;) {
|
1312 |
-
switch (encoding) {
|
1313 |
-
case 'ascii':
|
1314 |
-
case 'latin1':
|
1315 |
-
case 'binary':
|
1316 |
-
return len
|
1317 |
-
case 'utf8':
|
1318 |
-
case 'utf-8':
|
1319 |
-
case undefined:
|
1320 |
-
return utf8ToBytes(string).length
|
1321 |
-
case 'ucs2':
|
1322 |
-
case 'ucs-2':
|
1323 |
-
case 'utf16le':
|
1324 |
-
case 'utf-16le':
|
1325 |
-
return len * 2
|
1326 |
-
case 'hex':
|
1327 |
-
return len >>> 1
|
1328 |
-
case 'base64':
|
1329 |
-
return base64ToBytes(string).length
|
1330 |
-
default:
|
1331 |
-
if (loweredCase) return utf8ToBytes(string).length // assume utf8
|
1332 |
-
encoding = ('' + encoding).toLowerCase()
|
1333 |
-
loweredCase = true
|
1334 |
-
}
|
1335 |
-
}
|
1336 |
-
}
|
1337 |
-
Buffer.byteLength = byteLength
|
1338 |
-
|
1339 |
-
function slowToString (encoding, start, end) {
|
1340 |
-
var loweredCase = false
|
1341 |
-
|
1342 |
-
// No need to verify that "this.length <= MAX_UINT32" since it's a read-only
|
1343 |
-
// property of a typed array.
|
1344 |
-
|
1345 |
-
// This behaves neither like String nor Uint8Array in that we set start/end
|
1346 |
-
// to their upper/lower bounds if the value passed is out of range.
|
1347 |
-
// undefined is handled specially as per ECMA-262 6th Edition,
|
1348 |
-
// Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
|
1349 |
-
if (start === undefined || start < 0) {
|
1350 |
-
start = 0
|
1351 |
-
}
|
1352 |
-
// Return early if start > this.length. Done here to prevent potential uint32
|
1353 |
-
// coercion fail below.
|
1354 |
-
if (start > this.length) {
|
1355 |
-
return ''
|
1356 |
-
}
|
1357 |
-
|
1358 |
-
if (end === undefined || end > this.length) {
|
1359 |
-
end = this.length
|
1360 |
-
}
|
1361 |
-
|
1362 |
-
if (end <= 0) {
|
1363 |
-
return ''
|
1364 |
-
}
|
1365 |
-
|
1366 |
-
// Force coersion to uint32. This will also coerce falsey/NaN values to 0.
|
1367 |
-
end >>>= 0
|
1368 |
-
start >>>= 0
|
1369 |
-
|
1370 |
-
if (end <= start) {
|
1371 |
-
return ''
|
1372 |
-
}
|
1373 |
-
|
1374 |
-
if (!encoding) encoding = 'utf8'
|
1375 |
-
|
1376 |
-
while (true) {
|
1377 |
-
switch (encoding) {
|
1378 |
-
case 'hex':
|
1379 |
-
return hexSlice(this, start, end)
|
1380 |
-
|
1381 |
-
case 'utf8':
|
1382 |
-
case 'utf-8':
|
1383 |
-
return utf8Slice(this, start, end)
|
1384 |
-
|
1385 |
-
case 'ascii':
|
1386 |
-
return asciiSlice(this, start, end)
|
1387 |
-
|
1388 |
-
case 'latin1':
|
1389 |
-
case 'binary':
|
1390 |
-
return latin1Slice(this, start, end)
|
1391 |
-
|
1392 |
-
case 'base64':
|
1393 |
-
return base64Slice(this, start, end)
|
1394 |
-
|
1395 |
-
case 'ucs2':
|
1396 |
-
case 'ucs-2':
|
1397 |
-
case 'utf16le':
|
1398 |
-
case 'utf-16le':
|
1399 |
-
return utf16leSlice(this, start, end)
|
1400 |
-
|
1401 |
-
default:
|
1402 |
-
if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
|
1403 |
-
encoding = (encoding + '').toLowerCase()
|
1404 |
-
loweredCase = true
|
1405 |
-
}
|
1406 |
-
}
|
1407 |
-
}
|
1408 |
-
|
1409 |
-
// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
|
1410 |
-
// Buffer instances.
|
1411 |
-
Buffer.prototype._isBuffer = true
|
1412 |
-
|
1413 |
-
function swap (b, n, m) {
|
1414 |
-
var i = b[n]
|
1415 |
-
b[n] = b[m]
|
1416 |
-
b[m] = i
|
1417 |
-
}
|
1418 |
-
|
1419 |
-
Buffer.prototype.swap16 = function swap16 () {
|
1420 |
-
var len = this.length
|
1421 |
-
if (len % 2 !== 0) {
|
1422 |
-
throw new RangeError('Buffer size must be a multiple of 16-bits')
|
1423 |
-
}
|
1424 |
-
for (var i = 0; i < len; i += 2) {
|
1425 |
-
swap(this, i, i + 1)
|
1426 |
-
}
|
1427 |
-
return this
|
1428 |
-
}
|
1429 |
-
|
1430 |
-
Buffer.prototype.swap32 = function swap32 () {
|
1431 |
-
var len = this.length
|
1432 |
-
if (len % 4 !== 0) {
|
1433 |
-
throw new RangeError('Buffer size must be a multiple of 32-bits')
|
1434 |
-
}
|
1435 |
-
for (var i = 0; i < len; i += 4) {
|
1436 |
-
swap(this, i, i + 3)
|
1437 |
-
swap(this, i + 1, i + 2)
|
1438 |
-
}
|
1439 |
-
return this
|
1440 |
-
}
|
1441 |
-
|
1442 |
-
Buffer.prototype.swap64 = function swap64 () {
|
1443 |
-
var len = this.length
|
1444 |
-
if (len % 8 !== 0) {
|
1445 |
-
throw new RangeError('Buffer size must be a multiple of 64-bits')
|
1446 |
-
}
|
1447 |
-
for (var i = 0; i < len; i += 8) {
|
1448 |
-
swap(this, i, i + 7)
|
1449 |
-
swap(this, i + 1, i + 6)
|
1450 |
-
swap(this, i + 2, i + 5)
|
1451 |
-
swap(this, i + 3, i + 4)
|
1452 |
-
}
|
1453 |
-
return this
|
1454 |
-
}
|
1455 |
-
|
1456 |
-
Buffer.prototype.toString = function toString () {
|
1457 |
-
var length = this.length | 0
|
1458 |
-
if (length === 0) return ''
|
1459 |
-
if (arguments.length === 0) return utf8Slice(this, 0, length)
|
1460 |
-
return slowToString.apply(this, arguments)
|
1461 |
-
}
|
1462 |
-
|
1463 |
-
Buffer.prototype.equals = function equals (b) {
|
1464 |
-
if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
|
1465 |
-
if (this === b) return true
|
1466 |
-
return Buffer.compare(this, b) === 0
|
1467 |
-
}
|
1468 |
-
|
1469 |
-
Buffer.prototype.inspect = function inspect () {
|
1470 |
-
var str = ''
|
1471 |
-
var max = exports.INSPECT_MAX_BYTES
|
1472 |
-
if (this.length > 0) {
|
1473 |
-
str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
|
1474 |
-
if (this.length > max) str += ' ... '
|
1475 |
-
}
|
1476 |
-
return '<Buffer ' + str + '>'
|
1477 |
-
}
|
1478 |
-
|
1479 |
-
Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
|
1480 |
-
if (!Buffer.isBuffer(target)) {
|
1481 |
-
throw new TypeError('Argument must be a Buffer')
|
1482 |
-
}
|
1483 |
-
|
1484 |
-
if (start === undefined) {
|
1485 |
-
start = 0
|
1486 |
-
}
|
1487 |
-
if (end === undefined) {
|
1488 |
-
end = target ? target.length : 0
|
1489 |
-
}
|
1490 |
-
if (thisStart === undefined) {
|
1491 |
-
thisStart = 0
|
1492 |
-
}
|
1493 |
-
if (thisEnd === undefined) {
|
1494 |
-
thisEnd = this.length
|
1495 |
-
}
|
1496 |
-
|
1497 |
-
if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
|
1498 |
-
throw new RangeError('out of range index')
|
1499 |
-
}
|
1500 |
-
|
1501 |
-
if (thisStart >= thisEnd && start >= end) {
|
1502 |
-
return 0
|
1503 |
-
}
|
1504 |
-
if (thisStart >= thisEnd) {
|
1505 |
-
return -1
|
1506 |
-
}
|
1507 |
-
if (start >= end) {
|
1508 |
-
return 1
|
1509 |
-
}
|
1510 |
-
|
1511 |
-
start >>>= 0
|
1512 |
-
end >>>= 0
|
1513 |
-
thisStart >>>= 0
|
1514 |
-
thisEnd >>>= 0
|
1515 |
-
|
1516 |
-
if (this === target) return 0
|
1517 |
-
|
1518 |
-
var x = thisEnd - thisStart
|
1519 |
-
var y = end - start
|
1520 |
-
var len = Math.min(x, y)
|
1521 |
-
|
1522 |
-
var thisCopy = this.slice(thisStart, thisEnd)
|
1523 |
-
var targetCopy = target.slice(start, end)
|
1524 |
-
|
1525 |
-
for (var i = 0; i < len; ++i) {
|
1526 |
-
if (thisCopy[i] !== targetCopy[i]) {
|
1527 |
-
x = thisCopy[i]
|
1528 |
-
y = targetCopy[i]
|
1529 |
-
break
|
1530 |
-
}
|
1531 |
-
}
|
1532 |
-
|
1533 |
-
if (x < y) return -1
|
1534 |
-
if (y < x) return 1
|
1535 |
-
return 0
|
1536 |
-
}
|
1537 |
-
|
1538 |
-
// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
|
1539 |
-
// OR the last index of `val` in `buffer` at offset <= `byteOffset`.
|
1540 |
-
//
|
1541 |
-
// Arguments:
|
1542 |
-
// - buffer - a Buffer to search
|
1543 |
-
// - val - a string, Buffer, or number
|
1544 |
-
// - byteOffset - an index into `buffer`; will be clamped to an int32
|
1545 |
-
// - encoding - an optional encoding, relevant is val is a string
|
1546 |
-
// - dir - true for indexOf, false for lastIndexOf
|
1547 |
-
function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
|
1548 |
-
// Empty buffer means no match
|
1549 |
-
if (buffer.length === 0) return -1
|
1550 |
-
|
1551 |
-
// Normalize byteOffset
|
1552 |
-
if (typeof byteOffset === 'string') {
|
1553 |
-
encoding = byteOffset
|
1554 |
-
byteOffset = 0
|
1555 |
-
} else if (byteOffset > 0x7fffffff) {
|
1556 |
-
byteOffset = 0x7fffffff
|
1557 |
-
} else if (byteOffset < -0x80000000) {
|
1558 |
-
byteOffset = -0x80000000
|
1559 |
-
}
|
1560 |
-
byteOffset = +byteOffset // Coerce to Number.
|
1561 |
-
if (isNaN(byteOffset)) {
|
1562 |
-
// byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
|
1563 |
-
byteOffset = dir ? 0 : (buffer.length - 1)
|
1564 |
-
}
|
1565 |
-
|
1566 |
-
// Normalize byteOffset: negative offsets start from the end of the buffer
|
1567 |
-
if (byteOffset < 0) byteOffset = buffer.length + byteOffset
|
1568 |
-
if (byteOffset >= buffer.length) {
|
1569 |
-
if (dir) return -1
|
1570 |
-
else byteOffset = buffer.length - 1
|
1571 |
-
} else if (byteOffset < 0) {
|
1572 |
-
if (dir) byteOffset = 0
|
1573 |
-
else return -1
|
1574 |
-
}
|
1575 |
-
|
1576 |
-
// Normalize val
|
1577 |
-
if (typeof val === 'string') {
|
1578 |
-
val = Buffer.from(val, encoding)
|
1579 |
-
}
|
1580 |
-
|
1581 |
-
// Finally, search either indexOf (if dir is true) or lastIndexOf
|
1582 |
-
if (Buffer.isBuffer(val)) {
|
1583 |
-
// Special case: looking for empty string/buffer always fails
|
1584 |
-
if (val.length === 0) {
|
1585 |
-
return -1
|
1586 |
-
}
|
1587 |
-
return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
|
1588 |
-
} else if (typeof val === 'number') {
|
1589 |
-
val = val & 0xFF // Search for a byte value [0-255]
|
1590 |
-
if (Buffer.TYPED_ARRAY_SUPPORT &&
|
1591 |
-
typeof Uint8Array.prototype.indexOf === 'function') {
|
1592 |
-
if (dir) {
|
1593 |
-
return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
|
1594 |
-
} else {
|
1595 |
-
return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
|
1596 |
-
}
|
1597 |
-
}
|
1598 |
-
return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
|
1599 |
-
}
|
1600 |
-
|
1601 |
-
throw new TypeError('val must be string, number or Buffer')
|
1602 |
-
}
|
1603 |
-
|
1604 |
-
function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
|
1605 |
-
var indexSize = 1
|
1606 |
-
var arrLength = arr.length
|
1607 |
-
var valLength = val.length
|
1608 |
-
|
1609 |
-
if (encoding !== undefined) {
|
1610 |
-
encoding = String(encoding).toLowerCase()
|
1611 |
-
if (encoding === 'ucs2' || encoding === 'ucs-2' ||
|
1612 |
-
encoding === 'utf16le' || encoding === 'utf-16le') {
|
1613 |
-
if (arr.length < 2 || val.length < 2) {
|
1614 |
-
return -1
|
1615 |
-
}
|
1616 |
-
indexSize = 2
|
1617 |
-
arrLength /= 2
|
1618 |
-
valLength /= 2
|
1619 |
-
byteOffset /= 2
|
1620 |
-
}
|
1621 |
-
}
|
1622 |
-
|
1623 |
-
function read (buf, i) {
|
1624 |
-
if (indexSize === 1) {
|
1625 |
-
return buf[i]
|
1626 |
-
} else {
|
1627 |
-
return buf.readUInt16BE(i * indexSize)
|
1628 |
-
}
|
1629 |
-
}
|
1630 |
-
|
1631 |
-
var i
|
1632 |
-
if (dir) {
|
1633 |
-
var foundIndex = -1
|
1634 |
-
for (i = byteOffset; i < arrLength; i++) {
|
1635 |
-
if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
|
1636 |
-
if (foundIndex === -1) foundIndex = i
|
1637 |
-
if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
|
1638 |
-
} else {
|
1639 |
-
if (foundIndex !== -1) i -= i - foundIndex
|
1640 |
-
foundIndex = -1
|
1641 |
-
}
|
1642 |
-
}
|
1643 |
-
} else {
|
1644 |
-
if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
|
1645 |
-
for (i = byteOffset; i >= 0; i--) {
|
1646 |
-
var found = true
|
1647 |
-
for (var j = 0; j < valLength; j++) {
|
1648 |
-
if (read(arr, i + j) !== read(val, j)) {
|
1649 |
-
found = false
|
1650 |
-
break
|
1651 |
-
}
|
1652 |
-
}
|
1653 |
-
if (found) return i
|
1654 |
-
}
|
1655 |
-
}
|
1656 |
-
|
1657 |
-
return -1
|
1658 |
-
}
|
1659 |
-
|
1660 |
-
Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
|
1661 |
-
return this.indexOf(val, byteOffset, encoding) !== -1
|
1662 |
-
}
|
1663 |
-
|
1664 |
-
Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
|
1665 |
-
return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
|
1666 |
-
}
|
1667 |
-
|
1668 |
-
Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
|
1669 |
-
return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
|
1670 |
-
}
|
1671 |
-
|
1672 |
-
function hexWrite (buf, string, offset, length) {
|
1673 |
-
offset = Number(offset) || 0
|
1674 |
-
var remaining = buf.length - offset
|
1675 |
-
if (!length) {
|
1676 |
-
length = remaining
|
1677 |
-
} else {
|
1678 |
-
length = Number(length)
|
1679 |
-
if (length > remaining) {
|
1680 |
-
length = remaining
|
1681 |
-
}
|
1682 |
-
}
|
1683 |
-
|
1684 |
-
// must be an even number of digits
|
1685 |
-
var strLen = string.length
|
1686 |
-
if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')
|
1687 |
-
|
1688 |
-
if (length > strLen / 2) {
|
1689 |
-
length = strLen / 2
|
1690 |
-
}
|
1691 |
-
for (var i = 0; i < length; ++i) {
|
1692 |
-
var parsed = parseInt(string.substr(i * 2, 2), 16)
|
1693 |
-
if (isNaN(parsed)) return i
|
1694 |
-
buf[offset + i] = parsed
|
1695 |
-
}
|
1696 |
-
return i
|
1697 |
-
}
|
1698 |
-
|
1699 |
-
function utf8Write (buf, string, offset, length) {
|
1700 |
-
return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
|
1701 |
-
}
|
1702 |
-
|
1703 |
-
function asciiWrite (buf, string, offset, length) {
|
1704 |
-
return blitBuffer(asciiToBytes(string), buf, offset, length)
|
1705 |
-
}
|
1706 |
-
|
1707 |
-
function latin1Write (buf, string, offset, length) {
|
1708 |
-
return asciiWrite(buf, string, offset, length)
|
1709 |
-
}
|
1710 |
-
|
1711 |
-
function base64Write (buf, string, offset, length) {
|
1712 |
-
return blitBuffer(base64ToBytes(string), buf, offset, length)
|
1713 |
-
}
|
1714 |
-
|
1715 |
-
function ucs2Write (buf, string, offset, length) {
|
1716 |
-
return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
|
1717 |
-
}
|
1718 |
-
|
1719 |
-
Buffer.prototype.write = function write (string, offset, length, encoding) {
|
1720 |
-
// Buffer#write(string)
|
1721 |
-
if (offset === undefined) {
|
1722 |
-
encoding = 'utf8'
|
1723 |
-
length = this.length
|
1724 |
-
offset = 0
|
1725 |
-
// Buffer#write(string, encoding)
|
1726 |
-
} else if (length === undefined && typeof offset === 'string') {
|
1727 |
-
encoding = offset
|
1728 |
-
length = this.length
|
1729 |
-
offset = 0
|
1730 |
-
// Buffer#write(string, offset[, length][, encoding])
|
1731 |
-
} else if (isFinite(offset)) {
|
1732 |
-
offset = offset | 0
|
1733 |
-
if (isFinite(length)) {
|
1734 |
-
length = length | 0
|
1735 |
-
if (encoding === undefined) encoding = 'utf8'
|
1736 |
-
} else {
|
1737 |
-
encoding = length
|
1738 |
-
length = undefined
|
1739 |
-
}
|
1740 |
-
// legacy write(string, encoding, offset, length) - remove in v0.13
|
1741 |
-
} else {
|
1742 |
-
throw new Error(
|
1743 |
-
'Buffer.write(string, encoding, offset[, length]) is no longer supported'
|
1744 |
-
)
|
1745 |
-
}
|
1746 |
-
|
1747 |
-
var remaining = this.length - offset
|
1748 |
-
if (length === undefined || length > remaining) length = remaining
|
1749 |
-
|
1750 |
-
if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
|
1751 |
-
throw new RangeError('Attempt to write outside buffer bounds')
|
1752 |
-
}
|
1753 |
-
|
1754 |
-
if (!encoding) encoding = 'utf8'
|
1755 |
-
|
1756 |
-
var loweredCase = false
|
1757 |
-
for (;;) {
|
1758 |
-
switch (encoding) {
|
1759 |
-
case 'hex':
|
1760 |
-
return hexWrite(this, string, offset, length)
|
1761 |
-
|
1762 |
-
case 'utf8':
|
1763 |
-
case 'utf-8':
|
1764 |
-
return utf8Write(this, string, offset, length)
|
1765 |
-
|
1766 |
-
case 'ascii':
|
1767 |
-
return asciiWrite(this, string, offset, length)
|
1768 |
-
|
1769 |
-
case 'latin1':
|
1770 |
-
case 'binary':
|
1771 |
-
return latin1Write(this, string, offset, length)
|
1772 |
-
|
1773 |
-
case 'base64':
|
1774 |
-
// Warning: maxLength not taken into account in base64Write
|
1775 |
-
return base64Write(this, string, offset, length)
|
1776 |
-
|
1777 |
-
case 'ucs2':
|
1778 |
-
case 'ucs-2':
|
1779 |
-
case 'utf16le':
|
1780 |
-
case 'utf-16le':
|
1781 |
-
return ucs2Write(this, string, offset, length)
|
1782 |
-
|
1783 |
-
default:
|
1784 |
-
if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
|
1785 |
-
encoding = ('' + encoding).toLowerCase()
|
1786 |
-
loweredCase = true
|
1787 |
-
}
|
1788 |
-
}
|
1789 |
-
}
|
1790 |
-
|
1791 |
-
Buffer.prototype.toJSON = function toJSON () {
|
1792 |
-
return {
|
1793 |
-
type: 'Buffer',
|
1794 |
-
data: Array.prototype.slice.call(this._arr || this, 0)
|
1795 |
-
}
|
1796 |
-
}
|
1797 |
-
|
1798 |
-
function base64Slice (buf, start, end) {
|
1799 |
-
if (start === 0 && end === buf.length) {
|
1800 |
-
return base64.fromByteArray(buf)
|
1801 |
-
} else {
|
1802 |
-
return base64.fromByteArray(buf.slice(start, end))
|
1803 |
-
}
|
1804 |
-
}
|
1805 |
-
|
1806 |
-
function utf8Slice (buf, start, end) {
|
1807 |
-
end = Math.min(buf.length, end)
|
1808 |
-
var res = []
|
1809 |
-
|
1810 |
-
var i = start
|
1811 |
-
while (i < end) {
|
1812 |
-
var firstByte = buf[i]
|
1813 |
-
var codePoint = null
|
1814 |
-
var bytesPerSequence = (firstByte > 0xEF) ? 4
|
1815 |
-
: (firstByte > 0xDF) ? 3
|
1816 |
-
: (firstByte > 0xBF) ? 2
|
1817 |
-
: 1
|
1818 |
-
|
1819 |
-
if (i + bytesPerSequence <= end) {
|
1820 |
-
var secondByte, thirdByte, fourthByte, tempCodePoint
|
1821 |
-
|
1822 |
-
switch (bytesPerSequence) {
|
1823 |
-
case 1:
|
1824 |
-
if (firstByte < 0x80) {
|
1825 |
-
codePoint = firstByte
|
1826 |
-
}
|
1827 |
-
break
|
1828 |
-
case 2:
|
1829 |
-
secondByte = buf[i + 1]
|
1830 |
-
if ((secondByte & 0xC0) === 0x80) {
|
1831 |
-
tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
|
1832 |
-
if (tempCodePoint > 0x7F) {
|
1833 |
-
codePoint = tempCodePoint
|
1834 |
-
}
|
1835 |
-
}
|
1836 |
-
break
|
1837 |
-
case 3:
|
1838 |
-
secondByte = buf[i + 1]
|
1839 |
-
thirdByte = buf[i + 2]
|
1840 |
-
if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
|
1841 |
-
tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
|
1842 |
-
if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
|
1843 |
-
codePoint = tempCodePoint
|
1844 |
-
}
|
1845 |
-
}
|
1846 |
-
break
|
1847 |
-
case 4:
|
1848 |
-
secondByte = buf[i + 1]
|
1849 |
-
thirdByte = buf[i + 2]
|
1850 |
-
fourthByte = buf[i + 3]
|
1851 |
-
if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
|
1852 |
-
tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
|
1853 |
-
if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
|
1854 |
-
codePoint = tempCodePoint
|
1855 |
-
}
|
1856 |
-
}
|
1857 |
-
}
|
1858 |
-
}
|
1859 |
-
|
1860 |
-
if (codePoint === null) {
|
1861 |
-
// we did not generate a valid codePoint so insert a
|
1862 |
-
// replacement char (U+FFFD) and advance only 1 byte
|
1863 |
-
codePoint = 0xFFFD
|
1864 |
-
bytesPerSequence = 1
|
1865 |
-
} else if (codePoint > 0xFFFF) {
|
1866 |
-
// encode to utf16 (surrogate pair dance)
|
1867 |
-
codePoint -= 0x10000
|
1868 |
-
res.push(codePoint >>> 10 & 0x3FF | 0xD800)
|
1869 |
-
codePoint = 0xDC00 | codePoint & 0x3FF
|
1870 |
-
}
|
1871 |
-
|
1872 |
-
res.push(codePoint)
|
1873 |
-
i += bytesPerSequence
|
1874 |
-
}
|
1875 |
-
|
1876 |
-
return decodeCodePointsArray(res)
|
1877 |
-
}
|
1878 |
-
|
1879 |
-
// Based on http://stackoverflow.com/a/22747272/680742, the browser with
|
1880 |
-
// the lowest limit is Chrome, with 0x10000 args.
|
1881 |
-
// We go 1 magnitude less, for safety
|
1882 |
-
var MAX_ARGUMENTS_LENGTH = 0x1000
|
1883 |
-
|
1884 |
-
function decodeCodePointsArray (codePoints) {
|
1885 |
-
var len = codePoints.length
|
1886 |
-
if (len <= MAX_ARGUMENTS_LENGTH) {
|
1887 |
-
return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
|
1888 |
-
}
|
1889 |
-
|
1890 |
-
// Decode in chunks to avoid "call stack size exceeded".
|
1891 |
-
var res = ''
|
1892 |
-
var i = 0
|
1893 |
-
while (i < len) {
|
1894 |
-
res += String.fromCharCode.apply(
|
1895 |
-
String,
|
1896 |
-
codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
|
1897 |
-
)
|
1898 |
-
}
|
1899 |
-
return res
|
1900 |
-
}
|
1901 |
-
|
1902 |
-
function asciiSlice (buf, start, end) {
|
1903 |
-
var ret = ''
|
1904 |
-
end = Math.min(buf.length, end)
|
1905 |
-
|
1906 |
-
for (var i = start; i < end; ++i) {
|
1907 |
-
ret += String.fromCharCode(buf[i] & 0x7F)
|
1908 |
-
}
|
1909 |
-
return ret
|
1910 |
-
}
|
1911 |
-
|
1912 |
-
function latin1Slice (buf, start, end) {
|
1913 |
-
var ret = ''
|
1914 |
-
end = Math.min(buf.length, end)
|
1915 |
-
|
1916 |
-
for (var i = start; i < end; ++i) {
|
1917 |
-
ret += String.fromCharCode(buf[i])
|
1918 |
-
}
|
1919 |
-
return ret
|
1920 |
-
}
|
1921 |
-
|
1922 |
-
function hexSlice (buf, start, end) {
|
1923 |
-
var len = buf.length
|
1924 |
-
|
1925 |
-
if (!start || start < 0) start = 0
|
1926 |
-
if (!end || end < 0 || end > len) end = len
|
1927 |
-
|
1928 |
-
var out = ''
|
1929 |
-
for (var i = start; i < end; ++i) {
|
1930 |
-
out += toHex(buf[i])
|
1931 |
-
}
|
1932 |
-
return out
|
1933 |
-
}
|
1934 |
-
|
1935 |
-
function utf16leSlice (buf, start, end) {
|
1936 |
-
var bytes = buf.slice(start, end)
|
1937 |
-
var res = ''
|
1938 |
-
for (var i = 0; i < bytes.length; i += 2) {
|
1939 |
-
res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
|
1940 |
-
}
|
1941 |
-
return res
|
1942 |
-
}
|
1943 |
-
|
1944 |
-
Buffer.prototype.slice = function slice (start, end) {
|
1945 |
-
var len = this.length
|
1946 |
-
start = ~~start
|
1947 |
-
end = end === undefined ? len : ~~end
|
1948 |
-
|
1949 |
-
if (start < 0) {
|
1950 |
-
start += len
|
1951 |
-
if (start < 0) start = 0
|
1952 |
-
} else if (start > len) {
|
1953 |
-
start = len
|
1954 |
-
}
|
1955 |
-
|
1956 |
-
if (end < 0) {
|
1957 |
-
end += len
|
1958 |
-
if (end < 0) end = 0
|
1959 |
-
} else if (end > len) {
|
1960 |
-
end = len
|
1961 |
-
}
|
1962 |
-
|
1963 |
-
if (end < start) end = start
|
1964 |
-
|
1965 |
-
var newBuf
|
1966 |
-
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
1967 |
-
newBuf = this.subarray(start, end)
|
1968 |
-
newBuf.__proto__ = Buffer.prototype
|
1969 |
-
} else {
|
1970 |
-
var sliceLen = end - start
|
1971 |
-
newBuf = new Buffer(sliceLen, undefined)
|
1972 |
-
for (var i = 0; i < sliceLen; ++i) {
|
1973 |
-
newBuf[i] = this[i + start]
|
1974 |
-
}
|
1975 |
-
}
|
1976 |
-
|
1977 |
-
return newBuf
|
1978 |
-
}
|
1979 |
-
|
1980 |
-
/*
|
1981 |
-
* Need to make sure that buffer isn't trying to write out of bounds.
|
1982 |
-
*/
|
1983 |
-
function checkOffset (offset, ext, length) {
|
1984 |
-
if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
|
1985 |
-
if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
|
1986 |
-
}
|
1987 |
-
|
1988 |
-
Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
|
1989 |
-
offset = offset | 0
|
1990 |
-
byteLength = byteLength | 0
|
1991 |
-
if (!noAssert) checkOffset(offset, byteLength, this.length)
|
1992 |
-
|
1993 |
-
var val = this[offset]
|
1994 |
-
var mul = 1
|
1995 |
-
var i = 0
|
1996 |
-
while (++i < byteLength && (mul *= 0x100)) {
|
1997 |
-
val += this[offset + i] * mul
|
1998 |
-
}
|
1999 |
-
|
2000 |
-
return val
|
2001 |
-
}
|
2002 |
-
|
2003 |
-
Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
|
2004 |
-
offset = offset | 0
|
2005 |
-
byteLength = byteLength | 0
|
2006 |
-
if (!noAssert) {
|
2007 |
-
checkOffset(offset, byteLength, this.length)
|
2008 |
-
}
|
2009 |
-
|
2010 |
-
var val = this[offset + --byteLength]
|
2011 |
-
var mul = 1
|
2012 |
-
while (byteLength > 0 && (mul *= 0x100)) {
|
2013 |
-
val += this[offset + --byteLength] * mul
|
2014 |
-
}
|
2015 |
-
|
2016 |
-
return val
|
2017 |
-
}
|
2018 |
-
|
2019 |
-
Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
|
2020 |
-
if (!noAssert) checkOffset(offset, 1, this.length)
|
2021 |
-
return this[offset]
|
2022 |
-
}
|
2023 |
-
|
2024 |
-
Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
|
2025 |
-
if (!noAssert) checkOffset(offset, 2, this.length)
|
2026 |
-
return this[offset] | (this[offset + 1] << 8)
|
2027 |
-
}
|
2028 |
-
|
2029 |
-
Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
|
2030 |
-
if (!noAssert) checkOffset(offset, 2, this.length)
|
2031 |
-
return (this[offset] << 8) | this[offset + 1]
|
2032 |
-
}
|
2033 |
-
|
2034 |
-
Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
|
2035 |
-
if (!noAssert) checkOffset(offset, 4, this.length)
|
2036 |
-
|
2037 |
-
return ((this[offset]) |
|
2038 |
-
(this[offset + 1] << 8) |
|
2039 |
-
(this[offset + 2] << 16)) +
|
2040 |
-
(this[offset + 3] * 0x1000000)
|
2041 |
-
}
|
2042 |
-
|
2043 |
-
Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
|
2044 |
-
if (!noAssert) checkOffset(offset, 4, this.length)
|
2045 |
-
|
2046 |
-
return (this[offset] * 0x1000000) +
|
2047 |
-
((this[offset + 1] << 16) |
|
2048 |
-
(this[offset + 2] << 8) |
|
2049 |
-
this[offset + 3])
|
2050 |
-
}
|
2051 |
-
|
2052 |
-
Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
|
2053 |
-
offset = offset | 0
|
2054 |
-
byteLength = byteLength | 0
|
2055 |
-
if (!noAssert) checkOffset(offset, byteLength, this.length)
|
2056 |
-
|
2057 |
-
var val = this[offset]
|
2058 |
-
var mul = 1
|
2059 |
-
var i = 0
|
2060 |
-
while (++i < byteLength && (mul *= 0x100)) {
|
2061 |
-
val += this[offset + i] * mul
|
2062 |
-
}
|
2063 |
-
mul *= 0x80
|
2064 |
-
|
2065 |
-
if (val >= mul) val -= Math.pow(2, 8 * byteLength)
|
2066 |
-
|
2067 |
-
return val
|
2068 |
-
}
|
2069 |
-
|
2070 |
-
Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
|
2071 |
-
offset = offset | 0
|
2072 |
-
byteLength = byteLength | 0
|
2073 |
-
if (!noAssert) checkOffset(offset, byteLength, this.length)
|
2074 |
-
|
2075 |
-
var i = byteLength
|
2076 |
-
var mul = 1
|
2077 |
-
var val = this[offset + --i]
|
2078 |
-
while (i > 0 && (mul *= 0x100)) {
|
2079 |
-
val += this[offset + --i] * mul
|
2080 |
-
}
|
2081 |
-
mul *= 0x80
|
2082 |
-
|
2083 |
-
if (val >= mul) val -= Math.pow(2, 8 * byteLength)
|
2084 |
-
|
2085 |
-
return val
|
2086 |
-
}
|
2087 |
-
|
2088 |
-
Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
|
2089 |
-
if (!noAssert) checkOffset(offset, 1, this.length)
|
2090 |
-
if (!(this[offset] & 0x80)) return (this[offset])
|
2091 |
-
return ((0xff - this[offset] + 1) * -1)
|
2092 |
-
}
|
2093 |
-
|
2094 |
-
Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
|
2095 |
-
if (!noAssert) checkOffset(offset, 2, this.length)
|
2096 |
-
var val = this[offset] | (this[offset + 1] << 8)
|
2097 |
-
return (val & 0x8000) ? val | 0xFFFF0000 : val
|
2098 |
-
}
|
2099 |
-
|
2100 |
-
Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
|
2101 |
-
if (!noAssert) checkOffset(offset, 2, this.length)
|
2102 |
-
var val = this[offset + 1] | (this[offset] << 8)
|
2103 |
-
return (val & 0x8000) ? val | 0xFFFF0000 : val
|
2104 |
-
}
|
2105 |
-
|
2106 |
-
Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
|
2107 |
-
if (!noAssert) checkOffset(offset, 4, this.length)
|
2108 |
-
|
2109 |
-
return (this[offset]) |
|
2110 |
-
(this[offset + 1] << 8) |
|
2111 |
-
(this[offset + 2] << 16) |
|
2112 |
-
(this[offset + 3] << 24)
|
2113 |
-
}
|
2114 |
-
|
2115 |
-
Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
|
2116 |
-
if (!noAssert) checkOffset(offset, 4, this.length)
|
2117 |
-
|
2118 |
-
return (this[offset] << 24) |
|
2119 |
-
(this[offset + 1] << 16) |
|
2120 |
-
(this[offset + 2] << 8) |
|
2121 |
-
(this[offset + 3])
|
2122 |
-
}
|
2123 |
-
|
2124 |
-
Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
|
2125 |
-
if (!noAssert) checkOffset(offset, 4, this.length)
|
2126 |
-
return ieee754.read(this, offset, true, 23, 4)
|
2127 |
-
}
|
2128 |
-
|
2129 |
-
Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
|
2130 |
-
if (!noAssert) checkOffset(offset, 4, this.length)
|
2131 |
-
return ieee754.read(this, offset, false, 23, 4)
|
2132 |
-
}
|
2133 |
-
|
2134 |
-
Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
|
2135 |
-
if (!noAssert) checkOffset(offset, 8, this.length)
|
2136 |
-
return ieee754.read(this, offset, true, 52, 8)
|
2137 |
-
}
|
2138 |
-
|
2139 |
-
Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
|
2140 |
-
if (!noAssert) checkOffset(offset, 8, this.length)
|
2141 |
-
return ieee754.read(this, offset, false, 52, 8)
|
2142 |
-
}
|
2143 |
-
|
2144 |
-
function checkInt (buf, value, offset, ext, max, min) {
|
2145 |
-
if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
|
2146 |
-
if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
|
2147 |
-
if (offset + ext > buf.length) throw new RangeError('Index out of range')
|
2148 |
-
}
|
2149 |
-
|
2150 |
-
Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
|
2151 |
-
value = +value
|
2152 |
-
offset = offset | 0
|
2153 |
-
byteLength = byteLength | 0
|
2154 |
-
if (!noAssert) {
|
2155 |
-
var maxBytes = Math.pow(2, 8 * byteLength) - 1
|
2156 |
-
checkInt(this, value, offset, byteLength, maxBytes, 0)
|
2157 |
-
}
|
2158 |
-
|
2159 |
-
var mul = 1
|
2160 |
-
var i = 0
|
2161 |
-
this[offset] = value & 0xFF
|
2162 |
-
while (++i < byteLength && (mul *= 0x100)) {
|
2163 |
-
this[offset + i] = (value / mul) & 0xFF
|
2164 |
-
}
|
2165 |
-
|
2166 |
-
return offset + byteLength
|
2167 |
-
}
|
2168 |
-
|
2169 |
-
Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
|
2170 |
-
value = +value
|
2171 |
-
offset = offset | 0
|
2172 |
-
byteLength = byteLength | 0
|
2173 |
-
if (!noAssert) {
|
2174 |
-
var maxBytes = Math.pow(2, 8 * byteLength) - 1
|
2175 |
-
checkInt(this, value, offset, byteLength, maxBytes, 0)
|
2176 |
-
}
|
2177 |
-
|
2178 |
-
var i = byteLength - 1
|
2179 |
-
var mul = 1
|
2180 |
-
this[offset + i] = value & 0xFF
|
2181 |
-
while (--i >= 0 && (mul *= 0x100)) {
|
2182 |
-
this[offset + i] = (value / mul) & 0xFF
|
2183 |
-
}
|
2184 |
-
|
2185 |
-
return offset + byteLength
|
2186 |
-
}
|
2187 |
-
|
2188 |
-
Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
|
2189 |
-
value = +value
|
2190 |
-
offset = offset | 0
|
2191 |
-
if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
|
2192 |
-
if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
|
2193 |
-
this[offset] = (value & 0xff)
|
2194 |
-
return offset + 1
|
2195 |
-
}
|
2196 |
-
|
2197 |
-
function objectWriteUInt16 (buf, value, offset, littleEndian) {
|
2198 |
-
if (value < 0) value = 0xffff + value + 1
|
2199 |
-
for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
|
2200 |
-
buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
|
2201 |
-
(littleEndian ? i : 1 - i) * 8
|
2202 |
-
}
|
2203 |
-
}
|
2204 |
-
|
2205 |
-
Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
|
2206 |
-
value = +value
|
2207 |
-
offset = offset | 0
|
2208 |
-
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
|
2209 |
-
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
2210 |
-
this[offset] = (value & 0xff)
|
2211 |
-
this[offset + 1] = (value >>> 8)
|
2212 |
-
} else {
|
2213 |
-
objectWriteUInt16(this, value, offset, true)
|
2214 |
-
}
|
2215 |
-
return offset + 2
|
2216 |
-
}
|
2217 |
-
|
2218 |
-
Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
|
2219 |
-
value = +value
|
2220 |
-
offset = offset | 0
|
2221 |
-
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
|
2222 |
-
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
2223 |
-
this[offset] = (value >>> 8)
|
2224 |
-
this[offset + 1] = (value & 0xff)
|
2225 |
-
} else {
|
2226 |
-
objectWriteUInt16(this, value, offset, false)
|
2227 |
-
}
|
2228 |
-
return offset + 2
|
2229 |
-
}
|
2230 |
-
|
2231 |
-
function objectWriteUInt32 (buf, value, offset, littleEndian) {
|
2232 |
-
if (value < 0) value = 0xffffffff + value + 1
|
2233 |
-
for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
|
2234 |
-
buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
|
2235 |
-
}
|
2236 |
-
}
|
2237 |
-
|
2238 |
-
Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
|
2239 |
-
value = +value
|
2240 |
-
offset = offset | 0
|
2241 |
-
if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
|
2242 |
-
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
2243 |
-
this[offset + 3] = (value >>> 24)
|
2244 |
-
this[offset + 2] = (value >>> 16)
|
2245 |
-
this[offset + 1] = (value >>> 8)
|
2246 |
-
this[offset] = (value & 0xff)
|
2247 |
-
} else {
|
2248 |
-
objectWriteUInt32(this, value, offset, true)
|
2249 |
-
}
|
2250 |
-
return offset + 4
|
2251 |
-
}
|
2252 |
-
|
2253 |
-
Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
|
2254 |
-
value = +value
|
2255 |
-
offset = offset | 0
|
2256 |
-
if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
|
2257 |
-
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
2258 |
-
this[offset] = (value >>> 24)
|
2259 |
-
this[offset + 1] = (value >>> 16)
|
2260 |
-
this[offset + 2] = (value >>> 8)
|
2261 |
-
this[offset + 3] = (value & 0xff)
|
2262 |
-
} else {
|
2263 |
-
objectWriteUInt32(this, value, offset, false)
|
2264 |
-
}
|
2265 |
-
return offset + 4
|
2266 |
-
}
|
2267 |
-
|
2268 |
-
Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
|
2269 |
-
value = +value
|
2270 |
-
offset = offset | 0
|
2271 |
-
if (!noAssert) {
|
2272 |
-
var limit = Math.pow(2, 8 * byteLength - 1)
|
2273 |
-
|
2274 |
-
checkInt(this, value, offset, byteLength, limit - 1, -limit)
|
2275 |
-
}
|
2276 |
-
|
2277 |
-
var i = 0
|
2278 |
-
var mul = 1
|
2279 |
-
var sub = 0
|
2280 |
-
this[offset] = value & 0xFF
|
2281 |
-
while (++i < byteLength && (mul *= 0x100)) {
|
2282 |
-
if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
|
2283 |
-
sub = 1
|
2284 |
-
}
|
2285 |
-
this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
|
2286 |
-
}
|
2287 |
-
|
2288 |
-
return offset + byteLength
|
2289 |
-
}
|
2290 |
-
|
2291 |
-
Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
|
2292 |
-
value = +value
|
2293 |
-
offset = offset | 0
|
2294 |
-
if (!noAssert) {
|
2295 |
-
var limit = Math.pow(2, 8 * byteLength - 1)
|
2296 |
-
|
2297 |
-
checkInt(this, value, offset, byteLength, limit - 1, -limit)
|
2298 |
-
}
|
2299 |
-
|
2300 |
-
var i = byteLength - 1
|
2301 |
-
var mul = 1
|
2302 |
-
var sub = 0
|
2303 |
-
this[offset + i] = value & 0xFF
|
2304 |
-
while (--i >= 0 && (mul *= 0x100)) {
|
2305 |
-
if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
|
2306 |
-
sub = 1
|
2307 |
-
}
|
2308 |
-
this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
|
2309 |
-
}
|
2310 |
-
|
2311 |
-
return offset + byteLength
|
2312 |
-
}
|
2313 |
-
|
2314 |
-
Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
|
2315 |
-
value = +value
|
2316 |
-
offset = offset | 0
|
2317 |
-
if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
|
2318 |
-
if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
|
2319 |
-
if (value < 0) value = 0xff + value + 1
|
2320 |
-
this[offset] = (value & 0xff)
|
2321 |
-
return offset + 1
|
2322 |
-
}
|
2323 |
-
|
2324 |
-
Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
|
2325 |
-
value = +value
|
2326 |
-
offset = offset | 0
|
2327 |
-
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
|
2328 |
-
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
2329 |
-
this[offset] = (value & 0xff)
|
2330 |
-
this[offset + 1] = (value >>> 8)
|
2331 |
-
} else {
|
2332 |
-
objectWriteUInt16(this, value, offset, true)
|
2333 |
-
}
|
2334 |
-
return offset + 2
|
2335 |
-
}
|
2336 |
-
|
2337 |
-
Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
|
2338 |
-
value = +value
|
2339 |
-
offset = offset | 0
|
2340 |
-
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
|
2341 |
-
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
2342 |
-
this[offset] = (value >>> 8)
|
2343 |
-
this[offset + 1] = (value & 0xff)
|
2344 |
-
} else {
|
2345 |
-
objectWriteUInt16(this, value, offset, false)
|
2346 |
-
}
|
2347 |
-
return offset + 2
|
2348 |
-
}
|
2349 |
-
|
2350 |
-
Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
|
2351 |
-
value = +value
|
2352 |
-
offset = offset | 0
|
2353 |
-
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
|
2354 |
-
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
2355 |
-
this[offset] = (value & 0xff)
|
2356 |
-
this[offset + 1] = (value >>> 8)
|
2357 |
-
this[offset + 2] = (value >>> 16)
|
2358 |
-
this[offset + 3] = (value >>> 24)
|
2359 |
-
} else {
|
2360 |
-
objectWriteUInt32(this, value, offset, true)
|
2361 |
-
}
|
2362 |
-
return offset + 4
|
2363 |
-
}
|
2364 |
-
|
2365 |
-
Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
|
2366 |
-
value = +value
|
2367 |
-
offset = offset | 0
|
2368 |
-
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
|
2369 |
-
if (value < 0) value = 0xffffffff + value + 1
|
2370 |
-
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
2371 |
-
this[offset] = (value >>> 24)
|
2372 |
-
this[offset + 1] = (value >>> 16)
|
2373 |
-
this[offset + 2] = (value >>> 8)
|
2374 |
-
this[offset + 3] = (value & 0xff)
|
2375 |
-
} else {
|
2376 |
-
objectWriteUInt32(this, value, offset, false)
|
2377 |
-
}
|
2378 |
-
return offset + 4
|
2379 |
-
}
|
2380 |
-
|
2381 |
-
function checkIEEE754 (buf, value, offset, ext, max, min) {
|
2382 |
-
if (offset + ext > buf.length) throw new RangeError('Index out of range')
|
2383 |
-
if (offset < 0) throw new RangeError('Index out of range')
|
2384 |
-
}
|
2385 |
-
|
2386 |
-
function writeFloat (buf, value, offset, littleEndian, noAssert) {
|
2387 |
-
if (!noAssert) {
|
2388 |
-
checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
|
2389 |
-
}
|
2390 |
-
ieee754.write(buf, value, offset, littleEndian, 23, 4)
|
2391 |
-
return offset + 4
|
2392 |
-
}
|
2393 |
-
|
2394 |
-
Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
|
2395 |
-
return writeFloat(this, value, offset, true, noAssert)
|
2396 |
-
}
|
2397 |
-
|
2398 |
-
Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
|
2399 |
-
return writeFloat(this, value, offset, false, noAssert)
|
2400 |
-
}
|
2401 |
-
|
2402 |
-
function writeDouble (buf, value, offset, littleEndian, noAssert) {
|
2403 |
-
if (!noAssert) {
|
2404 |
-
checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
|
2405 |
-
}
|
2406 |
-
ieee754.write(buf, value, offset, littleEndian, 52, 8)
|
2407 |
-
return offset + 8
|
2408 |
-
}
|
2409 |
-
|
2410 |
-
Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
|
2411 |
-
return writeDouble(this, value, offset, true, noAssert)
|
2412 |
-
}
|
2413 |
-
|
2414 |
-
Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
|
2415 |
-
return writeDouble(this, value, offset, false, noAssert)
|
2416 |
-
}
|
2417 |
-
|
2418 |
-
// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
|
2419 |
-
Buffer.prototype.copy = function copy (target, targetStart, start, end) {
|
2420 |
-
if (!start) start = 0
|
2421 |
-
if (!end && end !== 0) end = this.length
|
2422 |
-
if (targetStart >= target.length) targetStart = target.length
|
2423 |
-
if (!targetStart) targetStart = 0
|
2424 |
-
if (end > 0 && end < start) end = start
|
2425 |
-
|
2426 |
-
// Copy 0 bytes; we're done
|
2427 |
-
if (end === start) return 0
|
2428 |
-
if (target.length === 0 || this.length === 0) return 0
|
2429 |
-
|
2430 |
-
// Fatal error conditions
|
2431 |
-
if (targetStart < 0) {
|
2432 |
-
throw new RangeError('targetStart out of bounds')
|
2433 |
-
}
|
2434 |
-
if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
|
2435 |
-
if (end < 0) throw new RangeError('sourceEnd out of bounds')
|
2436 |
-
|
2437 |
-
// Are we oob?
|
2438 |
-
if (end > this.length) end = this.length
|
2439 |
-
if (target.length - targetStart < end - start) {
|
2440 |
-
end = target.length - targetStart + start
|
2441 |
-
}
|
2442 |
-
|
2443 |
-
var len = end - start
|
2444 |
-
var i
|
2445 |
-
|
2446 |
-
if (this === target && start < targetStart && targetStart < end) {
|
2447 |
-
// descending copy from end
|
2448 |
-
for (i = len - 1; i >= 0; --i) {
|
2449 |
-
target[i + targetStart] = this[i + start]
|
2450 |
-
}
|
2451 |
-
} else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
|
2452 |
-
// ascending copy from start
|
2453 |
-
for (i = 0; i < len; ++i) {
|
2454 |
-
target[i + targetStart] = this[i + start]
|
2455 |
-
}
|
2456 |
-
} else {
|
2457 |
-
Uint8Array.prototype.set.call(
|
2458 |
-
target,
|
2459 |
-
this.subarray(start, start + len),
|
2460 |
-
targetStart
|
2461 |
-
)
|
2462 |
-
}
|
2463 |
-
|
2464 |
-
return len
|
2465 |
-
}
|
2466 |
-
|
2467 |
-
// Usage:
|
2468 |
-
// buffer.fill(number[, offset[, end]])
|
2469 |
-
// buffer.fill(buffer[, offset[, end]])
|
2470 |
-
// buffer.fill(string[, offset[, end]][, encoding])
|
2471 |
-
Buffer.prototype.fill = function fill (val, start, end, encoding) {
|
2472 |
-
// Handle string cases:
|
2473 |
-
if (typeof val === 'string') {
|
2474 |
-
if (typeof start === 'string') {
|
2475 |
-
encoding = start
|
2476 |
-
start = 0
|
2477 |
-
end = this.length
|
2478 |
-
} else if (typeof end === 'string') {
|
2479 |
-
encoding = end
|
2480 |
-
end = this.length
|
2481 |
-
}
|
2482 |
-
if (val.length === 1) {
|
2483 |
-
var code = val.charCodeAt(0)
|
2484 |
-
if (code < 256) {
|
2485 |
-
val = code
|
2486 |
-
}
|
2487 |
-
}
|
2488 |
-
if (encoding !== undefined && typeof encoding !== 'string') {
|
2489 |
-
throw new TypeError('encoding must be a string')
|
2490 |
-
}
|
2491 |
-
if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
|
2492 |
-
throw new TypeError('Unknown encoding: ' + encoding)
|
2493 |
-
}
|
2494 |
-
} else if (typeof val === 'number') {
|
2495 |
-
val = val & 255
|
2496 |
-
}
|
2497 |
-
|
2498 |
-
// Invalid ranges are not set to a default, so can range check early.
|
2499 |
-
if (start < 0 || this.length < start || this.length < end) {
|
2500 |
-
throw new RangeError('Out of range index')
|
2501 |
-
}
|
2502 |
-
|
2503 |
-
if (end <= start) {
|
2504 |
-
return this
|
2505 |
-
}
|
2506 |
-
|
2507 |
-
start = start >>> 0
|
2508 |
-
end = end === undefined ? this.length : end >>> 0
|
2509 |
-
|
2510 |
-
if (!val) val = 0
|
2511 |
-
|
2512 |
-
var i
|
2513 |
-
if (typeof val === 'number') {
|
2514 |
-
for (i = start; i < end; ++i) {
|
2515 |
-
this[i] = val
|
2516 |
-
}
|
2517 |
-
} else {
|
2518 |
-
var bytes = Buffer.isBuffer(val)
|
2519 |
-
? val
|
2520 |
-
: utf8ToBytes(new Buffer(val, encoding).toString())
|
2521 |
-
var len = bytes.length
|
2522 |
-
for (i = 0; i < end - start; ++i) {
|
2523 |
-
this[i + start] = bytes[i % len]
|
2524 |
-
}
|
2525 |
-
}
|
2526 |
-
|
2527 |
-
return this
|
2528 |
-
}
|
2529 |
-
|
2530 |
-
// HELPER FUNCTIONS
|
2531 |
-
// ================
|
2532 |
-
|
2533 |
-
var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g
|
2534 |
-
|
2535 |
-
function base64clean (str) {
|
2536 |
-
// Node strips out invalid characters like \n and \t from the string, base64-js does not
|
2537 |
-
str = stringtrim(str).replace(INVALID_BASE64_RE, '')
|
2538 |
-
// Node converts strings with length < 2 to ''
|
2539 |
-
if (str.length < 2) return ''
|
2540 |
-
// Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
|
2541 |
-
while (str.length % 4 !== 0) {
|
2542 |
-
str = str + '='
|
2543 |
-
}
|
2544 |
-
return str
|
2545 |
-
}
|
2546 |
-
|
2547 |
-
function stringtrim (str) {
|
2548 |
-
if (str.trim) return str.trim()
|
2549 |
-
return str.replace(/^\s+|\s+$/g, '')
|
2550 |
-
}
|
2551 |
-
|
2552 |
-
function toHex (n) {
|
2553 |
-
if (n < 16) return '0' + n.toString(16)
|
2554 |
-
return n.toString(16)
|
2555 |
-
}
|
2556 |
-
|
2557 |
-
function utf8ToBytes (string, units) {
|
2558 |
-
units = units || Infinity
|
2559 |
-
var codePoint
|
2560 |
-
var length = string.length
|
2561 |
-
var leadSurrogate = null
|
2562 |
-
var bytes = []
|
2563 |
-
|
2564 |
-
for (var i = 0; i < length; ++i) {
|
2565 |
-
codePoint = string.charCodeAt(i)
|
2566 |
-
|
2567 |
-
// is surrogate component
|
2568 |
-
if (codePoint > 0xD7FF && codePoint < 0xE000) {
|
2569 |
-
// last char was a lead
|
2570 |
-
if (!leadSurrogate) {
|
2571 |
-
// no lead yet
|
2572 |
-
if (codePoint > 0xDBFF) {
|
2573 |
-
// unexpected trail
|
2574 |
-
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
|
2575 |
-
continue
|
2576 |
-
} else if (i + 1 === length) {
|
2577 |
-
// unpaired lead
|
2578 |
-
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
|
2579 |
-
continue
|
2580 |
-
}
|
2581 |
-
|
2582 |
-
// valid lead
|
2583 |
-
leadSurrogate = codePoint
|
2584 |
-
|
2585 |
-
continue
|
2586 |
-
}
|
2587 |
-
|
2588 |
-
// 2 leads in a row
|
2589 |
-
if (codePoint < 0xDC00) {
|
2590 |
-
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
|
2591 |
-
leadSurrogate = codePoint
|
2592 |
-
continue
|
2593 |
-
}
|
2594 |
-
|
2595 |
-
// valid surrogate pair
|
2596 |
-
codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
|
2597 |
-
} else if (leadSurrogate) {
|
2598 |
-
// valid bmp char, but last char was a lead
|
2599 |
-
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
|
2600 |
-
}
|
2601 |
-
|
2602 |
-
leadSurrogate = null
|
2603 |
-
|
2604 |
-
// encode utf8
|
2605 |
-
if (codePoint < 0x80) {
|
2606 |
-
if ((units -= 1) < 0) break
|
2607 |
-
bytes.push(codePoint)
|
2608 |
-
} else if (codePoint < 0x800) {
|
2609 |
-
if ((units -= 2) < 0) break
|
2610 |
-
bytes.push(
|
2611 |
-
codePoint >> 0x6 | 0xC0,
|
2612 |
-
codePoint & 0x3F | 0x80
|
2613 |
-
)
|
2614 |
-
} else if (codePoint < 0x10000) {
|
2615 |
-
if ((units -= 3) < 0) break
|
2616 |
-
bytes.push(
|
2617 |
-
codePoint >> 0xC | 0xE0,
|
2618 |
-
codePoint >> 0x6 & 0x3F | 0x80,
|
2619 |
-
codePoint & 0x3F | 0x80
|
2620 |
-
)
|
2621 |
-
} else if (codePoint < 0x110000) {
|
2622 |
-
if ((units -= 4) < 0) break
|
2623 |
-
bytes.push(
|
2624 |
-
codePoint >> 0x12 | 0xF0,
|
2625 |
-
codePoint >> 0xC & 0x3F | 0x80,
|
2626 |
-
codePoint >> 0x6 & 0x3F | 0x80,
|
2627 |
-
codePoint & 0x3F | 0x80
|
2628 |
-
)
|
2629 |
-
} else {
|
2630 |
-
throw new Error('Invalid code point')
|
2631 |
-
}
|
2632 |
-
}
|
2633 |
-
|
2634 |
-
return bytes
|
2635 |
-
}
|
2636 |
-
|
2637 |
-
function asciiToBytes (str) {
|
2638 |
-
var byteArray = []
|
2639 |
-
for (var i = 0; i < str.length; ++i) {
|
2640 |
-
// Node's code seems to be doing this and not & 0x7F..
|
2641 |
-
byteArray.push(str.charCodeAt(i) & 0xFF)
|
2642 |
-
}
|
2643 |
-
return byteArray
|
2644 |
-
}
|
2645 |
-
|
2646 |
-
function utf16leToBytes (str, units) {
|
2647 |
-
var c, hi, lo
|
2648 |
-
var byteArray = []
|
2649 |
-
for (var i = 0; i < str.length; ++i) {
|
2650 |
-
if ((units -= 2) < 0) break
|
2651 |
-
|
2652 |
-
c = str.charCodeAt(i)
|
2653 |
-
hi = c >> 8
|
2654 |
-
lo = c % 256
|
2655 |
-
byteArray.push(lo)
|
2656 |
-
byteArray.push(hi)
|
2657 |
-
}
|
2658 |
-
|
2659 |
-
return byteArray
|
2660 |
-
}
|
2661 |
-
|
2662 |
-
function base64ToBytes (str) {
|
2663 |
-
return base64.toByteArray(base64clean(str))
|
2664 |
-
}
|
2665 |
-
|
2666 |
-
function blitBuffer (src, dst, offset, length) {
|
2667 |
-
for (var i = 0; i < length; ++i) {
|
2668 |
-
if ((i + offset >= dst.length) || (i >= src.length)) break
|
2669 |
-
dst[i + offset] = src[i]
|
2670 |
-
}
|
2671 |
-
return i
|
2672 |
-
}
|
2673 |
-
|
2674 |
-
function isnan (val) {
|
2675 |
-
return val !== val // eslint-disable-line no-self-compare
|
2676 |
-
}
|
2677 |
-
|
2678 |
-
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(9)))
|
2679 |
-
|
2680 |
-
/***/ }),
|
2681 |
-
/* 90 */
|
2682 |
-
/***/ (function(module, exports, __webpack_require__) {
|
2683 |
-
|
2684 |
-
"use strict";
|
2685 |
-
/* WEBPACK VAR INJECTION */(function(process, setImmediate, global) {// Copyright Joyent, Inc. and other Node contributors.
|
2686 |
-
//
|
2687 |
-
// Permission is hereby granted, free of charge, to any person obtaining a
|
2688 |
-
// copy of this software and associated documentation files (the
|
2689 |
-
// "Software"), to deal in the Software without restriction, including
|
2690 |
-
// without limitation the rights to use, copy, modify, merge, publish,
|
2691 |
-
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
2692 |
-
// persons to whom the Software is furnished to do so, subject to the
|
2693 |
-
// following conditions:
|
2694 |
-
//
|
2695 |
-
// The above copyright notice and this permission notice shall be included
|
2696 |
-
// in all copies or substantial portions of the Software.
|
2697 |
-
//
|
2698 |
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
2699 |
-
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
2700 |
-
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
2701 |
-
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
2702 |
-
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
2703 |
-
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
2704 |
-
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
2705 |
-
|
2706 |
-
// A bit simpler than readable streams.
|
2707 |
-
// Implement an async ._write(chunk, encoding, cb), and it'll handle all
|
2708 |
-
// the drain event emission and buffering.
|
2709 |
-
|
2710 |
-
|
2711 |
-
|
2712 |
-
/*<replacement>*/
|
2713 |
-
|
2714 |
-
var processNextTick = __webpack_require__(56);
|
2715 |
-
/*</replacement>*/
|
2716 |
-
|
2717 |
-
module.exports = Writable;
|
2718 |
-
|
2719 |
-
/* <replacement> */
|
2720 |
-
function WriteReq(chunk, encoding, cb) {
|
2721 |
-
this.chunk = chunk;
|
2722 |
-
this.encoding = encoding;
|
2723 |
-
this.callback = cb;
|
2724 |
-
this.next = null;
|
2725 |
-
}
|
2726 |
-
|
2727 |
-
// It seems a linked list but it is not
|
2728 |
-
// there will be only 2 of these for each stream
|
2729 |
-
function CorkedRequest(state) {
|
2730 |
-
var _this = this;
|
2731 |
-
|
2732 |
-
this.next = null;
|
2733 |
-
this.entry = null;
|
2734 |
-
this.finish = function () {
|
2735 |
-
onCorkedFinish(_this, state);
|
2736 |
-
};
|
2737 |
-
}
|
2738 |
-
/* </replacement> */
|
2739 |
-
|
2740 |
-
/*<replacement>*/
|
2741 |
-
var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick;
|
2742 |
-
/*</replacement>*/
|
2743 |
-
|
2744 |
-
/*<replacement>*/
|
2745 |
-
var Duplex;
|
2746 |
-
/*</replacement>*/
|
2747 |
-
|
2748 |
-
Writable.WritableState = WritableState;
|
2749 |
-
|
2750 |
-
/*<replacement>*/
|
2751 |
-
var util = __webpack_require__(46);
|
2752 |
-
util.inherits = __webpack_require__(22);
|
2753 |
-
/*</replacement>*/
|
2754 |
-
|
2755 |
-
/*<replacement>*/
|
2756 |
-
var internalUtil = {
|
2757 |
-
deprecate: __webpack_require__(430)
|
2758 |
-
};
|
2759 |
-
/*</replacement>*/
|
2760 |
-
|
2761 |
-
/*<replacement>*/
|
2762 |
-
var Stream = __webpack_require__(266);
|
2763 |
-
/*</replacement>*/
|
2764 |
-
|
2765 |
-
/*<replacement>*/
|
2766 |
-
var Buffer = __webpack_require__(57).Buffer;
|
2767 |
-
var OurUint8Array = global.Uint8Array || function () {};
|
2768 |
-
function _uint8ArrayToBuffer(chunk) {
|
2769 |
-
return Buffer.from(chunk);
|
2770 |
-
}
|
2771 |
-
function _isUint8Array(obj) {
|
2772 |
-
return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
|
2773 |
-
}
|
2774 |
-
/*</replacement>*/
|
2775 |
-
|
2776 |
-
var destroyImpl = __webpack_require__(267);
|
2777 |
-
|
2778 |
-
util.inherits(Writable, Stream);
|
2779 |
-
|
2780 |
-
function nop() {}
|
2781 |
-
|
2782 |
-
function WritableState(options, stream) {
|
2783 |
-
Duplex = Duplex || __webpack_require__(32);
|
2784 |
-
|
2785 |
-
options = options || {};
|
2786 |
-
|
2787 |
-
// object stream flag to indicate whether or not this stream
|
2788 |
-
// contains buffers or objects.
|
2789 |
-
this.objectMode = !!options.objectMode;
|
2790 |
-
|
2791 |
-
if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
|
2792 |
-
|
2793 |
-
// the point at which write() starts returning false
|
2794 |
-
// Note: 0 is a valid value, means that we always return false if
|
2795 |
-
// the entire buffer is not flushed immediately on write()
|
2796 |
-
var hwm = options.highWaterMark;
|
2797 |
-
var defaultHwm = this.objectMode ? 16 : 16 * 1024;
|
2798 |
-
this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;
|
2799 |
-
|
2800 |
-
// cast to ints.
|
2801 |
-
this.highWaterMark = Math.floor(this.highWaterMark);
|
2802 |
-
|
2803 |
-
// if _final has been called
|
2804 |
-
this.finalCalled = false;
|
2805 |
-
|
2806 |
-
// drain event flag.
|
2807 |
-
this.needDrain = false;
|
2808 |
-
// at the start of calling end()
|
2809 |
-
this.ending = false;
|
2810 |
-
// when end() has been called, and returned
|
2811 |
-
this.ended = false;
|
2812 |
-
// when 'finish' is emitted
|
2813 |
-
this.finished = false;
|
2814 |
-
|
2815 |
-
// has it been destroyed
|
2816 |
-
this.destroyed = false;
|
2817 |
-
|
2818 |
-
// should we decode strings into buffers before passing to _write?
|
2819 |
-
// this is here so that some node-core streams can optimize string
|
2820 |
-
// handling at a lower level.
|
2821 |
-
var noDecode = options.decodeStrings === false;
|
2822 |
-
this.decodeStrings = !noDecode;
|
2823 |
-
|
2824 |
-
// Crypto is kind of old and crusty. Historically, its default string
|
2825 |
-
// encoding is 'binary' so we have to make this configurable.
|
2826 |
-
// Everything else in the universe uses 'utf8', though.
|
2827 |
-
this.defaultEncoding = options.defaultEncoding || 'utf8';
|
2828 |
-
|
2829 |
-
// not an actual buffer we keep track of, but a measurement
|
2830 |
-
// of how much we're waiting to get pushed to some underlying
|
2831 |
-
// socket or file.
|
2832 |
-
this.length = 0;
|
2833 |
-
|
2834 |
-
// a flag to see when we're in the middle of a write.
|
2835 |
-
this.writing = false;
|
2836 |
-
|
2837 |
-
// when true all writes will be buffered until .uncork() call
|
2838 |
-
this.corked = 0;
|
2839 |
-
|
2840 |
-
// a flag to be able to tell if the onwrite cb is called immediately,
|
2841 |
-
// or on a later tick. We set this to true at first, because any
|
2842 |
-
// actions that shouldn't happen until "later" should generally also
|
2843 |
-
// not happen before the first write call.
|
2844 |
-
this.sync = true;
|
2845 |
-
|
2846 |
-
// a flag to know if we're processing previously buffered items, which
|
2847 |
-
// may call the _write() callback in the same tick, so that we don't
|
2848 |
-
// end up in an overlapped onwrite situation.
|
2849 |
-
this.bufferProcessing = false;
|
2850 |
-
|
2851 |
-
// the callback that's passed to _write(chunk,cb)
|
2852 |
-
this.onwrite = function (er) {
|
2853 |
-
onwrite(stream, er);
|
2854 |
-
};
|
2855 |
-
|
2856 |
-
// the callback that the user supplies to write(chunk,encoding,cb)
|
2857 |
-
this.writecb = null;
|
2858 |
-
|
2859 |
-
// the amount that is being written when _write is called.
|
2860 |
-
this.writelen = 0;
|
2861 |
-
|
2862 |
-
this.bufferedRequest = null;
|
2863 |
-
this.lastBufferedRequest = null;
|
2864 |
-
|
2865 |
-
// number of pending user-supplied write callbacks
|
2866 |
-
// this must be 0 before 'finish' can be emitted
|
2867 |
-
this.pendingcb = 0;
|
2868 |
-
|
2869 |
-
// emit prefinish if the only thing we're waiting for is _write cbs
|
2870 |
-
// This is relevant for synchronous Transform streams
|
2871 |
-
this.prefinished = false;
|
2872 |
-
|
2873 |
-
// True if the error was already emitted and should not be thrown again
|
2874 |
-
this.errorEmitted = false;
|
2875 |
-
|
2876 |
-
// count buffered requests
|
2877 |
-
this.bufferedRequestCount = 0;
|
2878 |
-
|
2879 |
-
// allocate the first CorkedRequest, there is always
|
2880 |
-
// one allocated and free to use, and we maintain at most two
|
2881 |
-
this.corkedRequestsFree = new CorkedRequest(this);
|
2882 |
-
}
|
2883 |
-
|
2884 |
-
WritableState.prototype.getBuffer = function getBuffer() {
|
2885 |
-
var current = this.bufferedRequest;
|
2886 |
-
var out = [];
|
2887 |
-
while (current) {
|
2888 |
-
out.push(current);
|
2889 |
-
current = current.next;
|
2890 |
-
}
|
2891 |
-
return out;
|
2892 |
-
};
|
2893 |
-
|
2894 |
-
(function () {
|
2895 |
-
try {
|
2896 |
-
Object.defineProperty(WritableState.prototype, 'buffer', {
|
2897 |
-
get: internalUtil.deprecate(function () {
|
2898 |
-
return this.getBuffer();
|
2899 |
-
}, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
|
2900 |
-
});
|
2901 |
-
} catch (_) {}
|
2902 |
-
})();
|
2903 |
-
|
2904 |
-
// Test _writableState for inheritance to account for Duplex streams,
|
2905 |
-
// whose prototype chain only points to Readable.
|
2906 |
-
var realHasInstance;
|
2907 |
-
if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
|
2908 |
-
realHasInstance = Function.prototype[Symbol.hasInstance];
|
2909 |
-
Object.defineProperty(Writable, Symbol.hasInstance, {
|
2910 |
-
value: function (object) {
|
2911 |
-
if (realHasInstance.call(this, object)) return true;
|
2912 |
-
|
2913 |
-
return object && object._writableState instanceof WritableState;
|
2914 |
-
}
|
2915 |
-
});
|
2916 |
-
} else {
|
2917 |
-
realHasInstance = function (object) {
|
2918 |
-
return object instanceof this;
|
2919 |
-
};
|
2920 |
-
}
|
2921 |
-
|
2922 |
-
function Writable(options) {
|
2923 |
-
Duplex = Duplex || __webpack_require__(32);
|
2924 |
-
|
2925 |
-
// Writable ctor is applied to Duplexes, too.
|
2926 |
-
// `realHasInstance` is necessary because using plain `instanceof`
|
2927 |
-
// would return false, as no `_writableState` property is attached.
|
2928 |
-
|
2929 |
-
// Trying to use the custom `instanceof` for Writable here will also break the
|
2930 |
-
// Node.js LazyTransform implementation, which has a non-trivial getter for
|
2931 |
-
// `_writableState` that would lead to infinite recursion.
|
2932 |
-
if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {
|
2933 |
-
return new Writable(options);
|
2934 |
-
}
|
2935 |
-
|
2936 |
-
this._writableState = new WritableState(options, this);
|
2937 |
-
|
2938 |
-
// legacy.
|
2939 |
-
this.writable = true;
|
2940 |
-
|
2941 |
-
if (options) {
|
2942 |
-
if (typeof options.write === 'function') this._write = options.write;
|
2943 |
-
|
2944 |
-
if (typeof options.writev === 'function') this._writev = options.writev;
|
2945 |
-
|
2946 |
-
if (typeof options.destroy === 'function') this._destroy = options.destroy;
|
2947 |
-
|
2948 |
-
if (typeof options.final === 'function') this._final = options.final;
|
2949 |
-
}
|
2950 |
-
|
2951 |
-
Stream.call(this);
|
2952 |
-
}
|
2953 |
-
|
2954 |
-
// Otherwise people can pipe Writable streams, which is just wrong.
|
2955 |
-
Writable.prototype.pipe = function () {
|
2956 |
-
this.emit('error', new Error('Cannot pipe, not readable'));
|
2957 |
-
};
|
2958 |
-
|
2959 |
-
function writeAfterEnd(stream, cb) {
|
2960 |
-
var er = new Error('write after end');
|
2961 |
-
// TODO: defer error events consistently everywhere, not just the cb
|
2962 |
-
stream.emit('error', er);
|
2963 |
-
processNextTick(cb, er);
|
2964 |
-
}
|
2965 |
-
|
2966 |
-
// Checks that a user-supplied chunk is valid, especially for the particular
|
2967 |
-
// mode the stream is in. Currently this means that `null` is never accepted
|
2968 |
-
// and undefined/non-string values are only allowed in object mode.
|
2969 |
-
function validChunk(stream, state, chunk, cb) {
|
2970 |
-
var valid = true;
|
2971 |
-
var er = false;
|
2972 |
-
|
2973 |
-
if (chunk === null) {
|
2974 |
-
er = new TypeError('May not write null values to stream');
|
2975 |
-
} else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
|
2976 |
-
er = new TypeError('Invalid non-string/buffer chunk');
|
2977 |
-
}
|
2978 |
-
if (er) {
|
2979 |
-
stream.emit('error', er);
|
2980 |
-
processNextTick(cb, er);
|
2981 |
-
valid = false;
|
2982 |
-
}
|
2983 |
-
return valid;
|
2984 |
-
}
|
2985 |
-
|
2986 |
-
Writable.prototype.write = function (chunk, encoding, cb) {
|
2987 |
-
var state = this._writableState;
|
2988 |
-
var ret = false;
|
2989 |
-
var isBuf = _isUint8Array(chunk) && !state.objectMode;
|
2990 |
-
|
2991 |
-
if (isBuf && !Buffer.isBuffer(chunk)) {
|
2992 |
-
chunk = _uint8ArrayToBuffer(chunk);
|
2993 |
-
}
|
2994 |
-
|
2995 |
-
if (typeof encoding === 'function') {
|
2996 |
-
cb = encoding;
|
2997 |
-
encoding = null;
|
2998 |
-
}
|
2999 |
-
|
3000 |
-
if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
|
3001 |
-
|
3002 |
-
if (typeof cb !== 'function') cb = nop;
|
3003 |
-
|
3004 |
-
if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
|
3005 |
-
state.pendingcb++;
|
3006 |
-
ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
|
3007 |
-
}
|
3008 |
-
|
3009 |
-
return ret;
|
3010 |
-
};
|
3011 |
-
|
3012 |
-
Writable.prototype.cork = function () {
|
3013 |
-
var state = this._writableState;
|
3014 |
-
|
3015 |
-
state.corked++;
|
3016 |
-
};
|
3017 |
-
|
3018 |
-
Writable.prototype.uncork = function () {
|
3019 |
-
var state = this._writableState;
|
3020 |
-
|
3021 |
-
if (state.corked) {
|
3022 |
-
state.corked--;
|
3023 |
-
|
3024 |
-
if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
|
3025 |
-
}
|
3026 |
-
};
|
3027 |
-
|
3028 |
-
Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
|
3029 |
-
// node::ParseEncoding() requires lower case.
|
3030 |
-
if (typeof encoding === 'string') encoding = encoding.toLowerCase();
|
3031 |
-
if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
|
3032 |
-
this._writableState.defaultEncoding = encoding;
|
3033 |
-
return this;
|
3034 |
-
};
|
3035 |
-
|
3036 |
-
function decodeChunk(state, chunk, encoding) {
|
3037 |
-
if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
|
3038 |
-
chunk = Buffer.from(chunk, encoding);
|
3039 |
-
}
|
3040 |
-
return chunk;
|
3041 |
-
}
|
3042 |
-
|
3043 |
-
// if we're already writing something, then just put this
|
3044 |
-
// in the queue, and wait our turn. Otherwise, call _write
|
3045 |
-
// If we return false, then we need a drain event, so set that flag.
|
3046 |
-
function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
|
3047 |
-
if (!isBuf) {
|
3048 |
-
var newChunk = decodeChunk(state, chunk, encoding);
|
3049 |
-
if (chunk !== newChunk) {
|
3050 |
-
isBuf = true;
|
3051 |
-
encoding = 'buffer';
|
3052 |
-
chunk = newChunk;
|
3053 |
-
}
|
3054 |
-
}
|
3055 |
-
var len = state.objectMode ? 1 : chunk.length;
|
3056 |
-
|
3057 |
-
state.length += len;
|
3058 |
-
|
3059 |
-
var ret = state.length < state.highWaterMark;
|
3060 |
-
// we must ensure that previous needDrain will not be reset to false.
|
3061 |
-
if (!ret) state.needDrain = true;
|
3062 |
-
|
3063 |
-
if (state.writing || state.corked) {
|
3064 |
-
var last = state.lastBufferedRequest;
|
3065 |
-
state.lastBufferedRequest = {
|
3066 |
-
chunk: chunk,
|
3067 |
-
encoding: encoding,
|
3068 |
-
isBuf: isBuf,
|
3069 |
-
callback: cb,
|
3070 |
-
next: null
|
3071 |
-
};
|
3072 |
-
if (last) {
|
3073 |
-
last.next = state.lastBufferedRequest;
|
3074 |
-
} else {
|
3075 |
-
state.bufferedRequest = state.lastBufferedRequest;
|
3076 |
-
}
|
3077 |
-
state.bufferedRequestCount += 1;
|
3078 |
-
} else {
|
3079 |
-
doWrite(stream, state, false, len, chunk, encoding, cb);
|
3080 |
-
}
|
3081 |
-
|
3082 |
-
return ret;
|
3083 |
-
}
|
3084 |
-
|
3085 |
-
function doWrite(stream, state, writev, len, chunk, encoding, cb) {
|
3086 |
-
state.writelen = len;
|
3087 |
-
state.writecb = cb;
|
3088 |
-
state.writing = true;
|
3089 |
-
state.sync = true;
|
3090 |
-
if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
|
3091 |
-
state.sync = false;
|
3092 |
-
}
|
3093 |
-
|
3094 |
-
function onwriteError(stream, state, sync, er, cb) {
|
3095 |
-
--state.pendingcb;
|
3096 |
-
|
3097 |
-
if (sync) {
|
3098 |
-
// defer the callback if we are being called synchronously
|
3099 |
-
// to avoid piling up things on the stack
|
3100 |
-
processNextTick(cb, er);
|
3101 |
-
// this can emit finish, and it will always happen
|
3102 |
-
// after error
|
3103 |
-
processNextTick(finishMaybe, stream, state);
|
3104 |
-
stream._writableState.errorEmitted = true;
|
3105 |
-
stream.emit('error', er);
|
3106 |
-
} else {
|
3107 |
-
// the caller expect this to happen before if
|
3108 |
-
// it is async
|
3109 |
-
cb(er);
|
3110 |
-
stream._writableState.errorEmitted = true;
|
3111 |
-
stream.emit('error', er);
|
3112 |
-
// this can emit finish, but finish must
|
3113 |
-
// always follow error
|
3114 |
-
finishMaybe(stream, state);
|
3115 |
-
}
|
3116 |
-
}
|
3117 |
-
|
3118 |
-
function onwriteStateUpdate(state) {
|
3119 |
-
state.writing = false;
|
3120 |
-
state.writecb = null;
|
3121 |
-
state.length -= state.writelen;
|
3122 |
-
state.writelen = 0;
|
3123 |
-
}
|
3124 |
-
|
3125 |
-
function onwrite(stream, er) {
|
3126 |
-
var state = stream._writableState;
|
3127 |
-
var sync = state.sync;
|
3128 |
-
var cb = state.writecb;
|
3129 |
-
|
3130 |
-
onwriteStateUpdate(state);
|
3131 |
-
|
3132 |
-
if (er) onwriteError(stream, state, sync, er, cb);else {
|
3133 |
-
// Check if we're actually ready to finish, but don't emit yet
|
3134 |
-
var finished = needFinish(state);
|
3135 |
-
|
3136 |
-
if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
|
3137 |
-
clearBuffer(stream, state);
|
3138 |
-
}
|
3139 |
-
|
3140 |
-
if (sync) {
|
3141 |
-
/*<replacement>*/
|
3142 |
-
asyncWrite(afterWrite, stream, state, finished, cb);
|
3143 |
-
/*</replacement>*/
|
3144 |
-
} else {
|
3145 |
-
afterWrite(stream, state, finished, cb);
|
3146 |
-
}
|
3147 |
-
}
|
3148 |
-
}
|
3149 |
-
|
3150 |
-
function afterWrite(stream, state, finished, cb) {
|
3151 |
-
if (!finished) onwriteDrain(stream, state);
|
3152 |
-
state.pendingcb--;
|
3153 |
-
cb();
|
3154 |
-
finishMaybe(stream, state);
|
3155 |
-
}
|
3156 |
-
|
3157 |
-
// Must force callback to be called on nextTick, so that we don't
|
3158 |
-
// emit 'drain' before the write() consumer gets the 'false' return
|
3159 |
-
// value, and has a chance to attach a 'drain' listener.
|
3160 |
-
function onwriteDrain(stream, state) {
|
3161 |
-
if (state.length === 0 && state.needDrain) {
|
3162 |
-
state.needDrain = false;
|
3163 |
-
stream.emit('drain');
|
3164 |
-
}
|
3165 |
-
}
|
3166 |
-
|
3167 |
-
// if there's something in the buffer waiting, then process it
|
3168 |
-
function clearBuffer(stream, state) {
|
3169 |
-
state.bufferProcessing = true;
|
3170 |
-
var entry = state.bufferedRequest;
|
3171 |
-
|
3172 |
-
if (stream._writev && entry && entry.next) {
|
3173 |
-
// Fast case, write everything using _writev()
|
3174 |
-
var l = state.bufferedRequestCount;
|
3175 |
-
var buffer = new Array(l);
|
3176 |
-
var holder = state.corkedRequestsFree;
|
3177 |
-
holder.entry = entry;
|
3178 |
-
|
3179 |
-
var count = 0;
|
3180 |
-
var allBuffers = true;
|
3181 |
-
while (entry) {
|
3182 |
-
buffer[count] = entry;
|
3183 |
-
if (!entry.isBuf) allBuffers = false;
|
3184 |
-
entry = entry.next;
|
3185 |
-
count += 1;
|
3186 |
-
}
|
3187 |
-
buffer.allBuffers = allBuffers;
|
3188 |
-
|
3189 |
-
doWrite(stream, state, true, state.length, buffer, '', holder.finish);
|
3190 |
-
|
3191 |
-
// doWrite is almost always async, defer these to save a bit of time
|
3192 |
-
// as the hot path ends with doWrite
|
3193 |
-
state.pendingcb++;
|
3194 |
-
state.lastBufferedRequest = null;
|
3195 |
-
if (holder.next) {
|
3196 |
-
state.corkedRequestsFree = holder.next;
|
3197 |
-
holder.next = null;
|
3198 |
-
} else {
|
3199 |
-
state.corkedRequestsFree = new CorkedRequest(state);
|
3200 |
-
}
|
3201 |
-
} else {
|
3202 |
-
// Slow case, write chunks one-by-one
|
3203 |
-
while (entry) {
|
3204 |
-
var chunk = entry.chunk;
|
3205 |
-
var encoding = entry.encoding;
|
3206 |
-
var cb = entry.callback;
|
3207 |
-
var len = state.objectMode ? 1 : chunk.length;
|
3208 |
-
|
3209 |
-
doWrite(stream, state, false, len, chunk, encoding, cb);
|
3210 |
-
entry = entry.next;
|
3211 |
-
// if we didn't call the onwrite immediately, then
|
3212 |
-
// it means that we need to wait until it does.
|
3213 |
-
// also, that means that the chunk and cb are currently
|
3214 |
-
// being processed, so move the buffer counter past them.
|
3215 |
-
if (state.writing) {
|
3216 |
-
break;
|
3217 |
-
}
|
3218 |
-
}
|
3219 |
-
|
3220 |
-
if (entry === null) state.lastBufferedRequest = null;
|
3221 |
-
}
|
3222 |
-
|
3223 |
-
state.bufferedRequestCount = 0;
|
3224 |
-
state.bufferedRequest = entry;
|
3225 |
-
state.bufferProcessing = false;
|
3226 |
-
}
|
3227 |
-
|
3228 |
-
Writable.prototype._write = function (chunk, encoding, cb) {
|
3229 |
-
cb(new Error('_write() is not implemented'));
|
3230 |
-
};
|
3231 |
-
|
3232 |
-
Writable.prototype._writev = null;
|
3233 |
-
|
3234 |
-
Writable.prototype.end = function (chunk, encoding, cb) {
|
3235 |
-
var state = this._writableState;
|
3236 |
-
|
3237 |
-
if (typeof chunk === 'function') {
|
3238 |
-
cb = chunk;
|
3239 |
-
chunk = null;
|
3240 |
-
encoding = null;
|
3241 |
-
} else if (typeof encoding === 'function') {
|
3242 |
-
cb = encoding;
|
3243 |
-
encoding = null;
|
3244 |
-
}
|
3245 |
-
|
3246 |
-
if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);
|
3247 |
-
|
3248 |
-
// .end() fully uncorks
|
3249 |
-
if (state.corked) {
|
3250 |
-
state.corked = 1;
|
3251 |
-
this.uncork();
|
3252 |
-
}
|
3253 |
-
|
3254 |
-
// ignore unnecessary end() calls.
|
3255 |
-
if (!state.ending && !state.finished) endWritable(this, state, cb);
|
3256 |
-
};
|
3257 |
-
|
3258 |
-
function needFinish(state) {
|
3259 |
-
return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
|
3260 |
-
}
|
3261 |
-
function callFinal(stream, state) {
|
3262 |
-
stream._final(function (err) {
|
3263 |
-
state.pendingcb--;
|
3264 |
-
if (err) {
|
3265 |
-
stream.emit('error', err);
|
3266 |
-
}
|
3267 |
-
state.prefinished = true;
|
3268 |
-
stream.emit('prefinish');
|
3269 |
-
finishMaybe(stream, state);
|
3270 |
-
});
|
3271 |
-
}
|
3272 |
-
function prefinish(stream, state) {
|
3273 |
-
if (!state.prefinished && !state.finalCalled) {
|
3274 |
-
if (typeof stream._final === 'function') {
|
3275 |
-
state.pendingcb++;
|
3276 |
-
state.finalCalled = true;
|
3277 |
-
processNextTick(callFinal, stream, state);
|
3278 |
-
} else {
|
3279 |
-
state.prefinished = true;
|
3280 |
-
stream.emit('prefinish');
|
3281 |
-
}
|
3282 |
-
}
|
3283 |
-
}
|
3284 |
-
|
3285 |
-
function finishMaybe(stream, state) {
|
3286 |
-
var need = needFinish(state);
|
3287 |
-
if (need) {
|
3288 |
-
prefinish(stream, state);
|
3289 |
-
if (state.pendingcb === 0) {
|
3290 |
-
state.finished = true;
|
3291 |
-
stream.emit('finish');
|
3292 |
-
}
|
3293 |
-
}
|
3294 |
-
return need;
|
3295 |
-
}
|
3296 |
-
|
3297 |
-
function endWritable(stream, state, cb) {
|
3298 |
-
state.ending = true;
|
3299 |
-
finishMaybe(stream, state);
|
3300 |
-
if (cb) {
|
3301 |
-
if (state.finished) processNextTick(cb);else stream.once('finish', cb);
|
3302 |
-
}
|
3303 |
-
state.ended = true;
|
3304 |
-
stream.writable = false;
|
3305 |
-
}
|
3306 |
-
|
3307 |
-
function onCorkedFinish(corkReq, state, err) {
|
3308 |
-
var entry = corkReq.entry;
|
3309 |
-
corkReq.entry = null;
|
3310 |
-
while (entry) {
|
3311 |
-
var cb = entry.callback;
|
3312 |
-
state.pendingcb--;
|
3313 |
-
cb(err);
|
3314 |
-
entry = entry.next;
|
3315 |
-
}
|
3316 |
-
if (state.corkedRequestsFree) {
|
3317 |
-
state.corkedRequestsFree.next = corkReq;
|
3318 |
-
} else {
|
3319 |
-
state.corkedRequestsFree = corkReq;
|
3320 |
-
}
|
3321 |
-
}
|
3322 |
-
|
3323 |
-
Object.defineProperty(Writable.prototype, 'destroyed', {
|
3324 |
-
get: function () {
|
3325 |
-
if (this._writableState === undefined) {
|
3326 |
-
return false;
|
3327 |
-
}
|
3328 |
-
return this._writableState.destroyed;
|
3329 |
-
},
|
3330 |
-
set: function (value) {
|
3331 |
-
// we ignore the value if the stream
|
3332 |
-
// has not been initialized yet
|
3333 |
-
if (!this._writableState) {
|
3334 |
-
return;
|
3335 |
-
}
|
3336 |
-
|
3337 |
-
// backward compatibility, the user is explicitly
|
3338 |
-
// managing destroyed
|
3339 |
-
this._writableState.destroyed = value;
|
3340 |
-
}
|
3341 |
-
});
|
3342 |
-
|
3343 |
-
Writable.prototype.destroy = destroyImpl.destroy;
|
3344 |
-
Writable.prototype._undestroy = destroyImpl.undestroy;
|
3345 |
-
Writable.prototype._destroy = function (err, cb) {
|
3346 |
-
this.end();
|
3347 |
-
cb(err);
|
3348 |
-
};
|
3349 |
-
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(268).setImmediate, __webpack_require__(9)))
|
3350 |
-
|
3351 |
-
/***/ }),
|
3352 |
-
/* 91 */
|
3353 |
-
/***/ (function(module, exports, __webpack_require__) {
|
3354 |
-
|
3355 |
-
"use strict";
|
3356 |
-
|
3357 |
-
|
3358 |
-
var Buffer = __webpack_require__(57).Buffer;
|
3359 |
-
|
3360 |
-
var isEncoding = Buffer.isEncoding || function (encoding) {
|
3361 |
-
encoding = '' + encoding;
|
3362 |
-
switch (encoding && encoding.toLowerCase()) {
|
3363 |
-
case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':
|
3364 |
-
return true;
|
3365 |
-
default:
|
3366 |
-
return false;
|
3367 |
-
}
|
3368 |
-
};
|
3369 |
-
|
3370 |
-
function _normalizeEncoding(enc) {
|
3371 |
-
if (!enc) return 'utf8';
|
3372 |
-
var retried;
|
3373 |
-
while (true) {
|
3374 |
-
switch (enc) {
|
3375 |
-
case 'utf8':
|
3376 |
-
case 'utf-8':
|
3377 |
-
return 'utf8';
|
3378 |
-
case 'ucs2':
|
3379 |
-
case 'ucs-2':
|
3380 |
-
case 'utf16le':
|
3381 |
-
case 'utf-16le':
|
3382 |
-
return 'utf16le';
|
3383 |
-
case 'latin1':
|
3384 |
-
case 'binary':
|
3385 |
-
return 'latin1';
|
3386 |
-
case 'base64':
|
3387 |
-
case 'ascii':
|
3388 |
-
case 'hex':
|
3389 |
-
return enc;
|
3390 |
-
default:
|
3391 |
-
if (retried) return; // undefined
|
3392 |
-
enc = ('' + enc).toLowerCase();
|
3393 |
-
retried = true;
|
3394 |
-
}
|
3395 |
-
}
|
3396 |
-
};
|
3397 |
-
|
3398 |
-
// Do not cache `Buffer.isEncoding` when checking encoding names as some
|
3399 |
-
// modules monkey-patch it to support additional encodings
|
3400 |
-
function normalizeEncoding(enc) {
|
3401 |
-
var nenc = _normalizeEncoding(enc);
|
3402 |
-
if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
|
3403 |
-
return nenc || enc;
|
3404 |
-
}
|
3405 |
-
|
3406 |
-
// StringDecoder provides an interface for efficiently splitting a series of
|
3407 |
-
// buffers into a series of JS strings without breaking apart multi-byte
|
3408 |
-
// characters.
|
3409 |
-
exports.StringDecoder = StringDecoder;
|
3410 |
-
function StringDecoder(encoding) {
|
3411 |
-
this.encoding = normalizeEncoding(encoding);
|
3412 |
-
var nb;
|
3413 |
-
switch (this.encoding) {
|
3414 |
-
case 'utf16le':
|
3415 |
-
this.text = utf16Text;
|
3416 |
-
this.end = utf16End;
|
3417 |
-
nb = 4;
|
3418 |
-
break;
|
3419 |
-
case 'utf8':
|
3420 |
-
this.fillLast = utf8FillLast;
|
3421 |
-
nb = 4;
|
3422 |
-
break;
|
3423 |
-
case 'base64':
|
3424 |
-
this.text = base64Text;
|
3425 |
-
this.end = base64End;
|
3426 |
-
nb = 3;
|
3427 |
-
break;
|
3428 |
-
default:
|
3429 |
-
this.write = simpleWrite;
|
3430 |
-
this.end = simpleEnd;
|
3431 |
-
return;
|
3432 |
-
}
|
3433 |
-
this.lastNeed = 0;
|
3434 |
-
this.lastTotal = 0;
|
3435 |
-
this.lastChar = Buffer.allocUnsafe(nb);
|
3436 |
-
}
|
3437 |
-
|
3438 |
-
StringDecoder.prototype.write = function (buf) {
|
3439 |
-
if (buf.length === 0) return '';
|
3440 |
-
var r;
|
3441 |
-
var i;
|
3442 |
-
if (this.lastNeed) {
|
3443 |
-
r = this.fillLast(buf);
|
3444 |
-
if (r === undefined) return '';
|
3445 |
-
i = this.lastNeed;
|
3446 |
-
this.lastNeed = 0;
|
3447 |
-
} else {
|
3448 |
-
i = 0;
|
3449 |
-
}
|
3450 |
-
if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
|
3451 |
-
return r || '';
|
3452 |
-
};
|
3453 |
-
|
3454 |
-
StringDecoder.prototype.end = utf8End;
|
3455 |
-
|
3456 |
-
// Returns only complete characters in a Buffer
|
3457 |
-
StringDecoder.prototype.text = utf8Text;
|
3458 |
-
|
3459 |
-
// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
|
3460 |
-
StringDecoder.prototype.fillLast = function (buf) {
|
3461 |
-
if (this.lastNeed <= buf.length) {
|
3462 |
-
buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
|
3463 |
-
return this.lastChar.toString(this.encoding, 0, this.lastTotal);
|
3464 |
-
}
|
3465 |
-
buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
|
3466 |
-
this.lastNeed -= buf.length;
|
3467 |
-
};
|
3468 |
-
|
3469 |
-
// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
|
3470 |
-
// continuation byte.
|
3471 |
-
function utf8CheckByte(byte) {
|
3472 |
-
if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
|
3473 |
-
return -1;
|
3474 |
-
}
|
3475 |
-
|
3476 |
-
// Checks at most 3 bytes at the end of a Buffer in order to detect an
|
3477 |
-
// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
|
3478 |
-
// needed to complete the UTF-8 character (if applicable) are returned.
|
3479 |
-
function utf8CheckIncomplete(self, buf, i) {
|
3480 |
-
var j = buf.length - 1;
|
3481 |
-
if (j < i) return 0;
|
3482 |
-
var nb = utf8CheckByte(buf[j]);
|
3483 |
-
if (nb >= 0) {
|
3484 |
-
if (nb > 0) self.lastNeed = nb - 1;
|
3485 |
-
return nb;
|
3486 |
-
}
|
3487 |
-
if (--j < i) return 0;
|
3488 |
-
nb = utf8CheckByte(buf[j]);
|
3489 |
-
if (nb >= 0) {
|
3490 |
-
if (nb > 0) self.lastNeed = nb - 2;
|
3491 |
-
return nb;
|
3492 |
-
}
|
3493 |
-
if (--j < i) return 0;
|
3494 |
-
nb = utf8CheckByte(buf[j]);
|
3495 |
-
if (nb >= 0) {
|
3496 |
-
if (nb > 0) {
|
3497 |
-
if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
|
3498 |
-
}
|
3499 |
-
return nb;
|
3500 |
-
}
|
3501 |
-
return 0;
|
3502 |
-
}
|
3503 |
-
|
3504 |
-
// Validates as many continuation bytes for a multi-byte UTF-8 character as
|
3505 |
-
// needed or are available. If we see a non-continuation byte where we expect
|
3506 |
-
// one, we "replace" the validated continuation bytes we've seen so far with
|
3507 |
-
// UTF-8 replacement characters ('\ufffd'), to match v8's UTF-8 decoding
|
3508 |
-
// behavior. The continuation byte check is included three times in the case
|
3509 |
-
// where all of the continuation bytes for a character exist in the same buffer.
|
3510 |
-
// It is also done this way as a slight performance increase instead of using a
|
3511 |
-
// loop.
|
3512 |
-
function utf8CheckExtraBytes(self, buf, p) {
|
3513 |
-
if ((buf[0] & 0xC0) !== 0x80) {
|
3514 |
-
self.lastNeed = 0;
|
3515 |
-
return '\ufffd'.repeat(p);
|
3516 |
-
}
|
3517 |
-
if (self.lastNeed > 1 && buf.length > 1) {
|
3518 |
-
if ((buf[1] & 0xC0) !== 0x80) {
|
3519 |
-
self.lastNeed = 1;
|
3520 |
-
return '\ufffd'.repeat(p + 1);
|
3521 |
-
}
|
3522 |
-
if (self.lastNeed > 2 && buf.length > 2) {
|
3523 |
-
if ((buf[2] & 0xC0) !== 0x80) {
|
3524 |
-
self.lastNeed = 2;
|
3525 |
-
return '\ufffd'.repeat(p + 2);
|
3526 |
-
}
|
3527 |
-
}
|
3528 |
-
}
|
3529 |
-
}
|
3530 |
-
|
3531 |
-
// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
|
3532 |
-
function utf8FillLast(buf) {
|
3533 |
-
var p = this.lastTotal - this.lastNeed;
|
3534 |
-
var r = utf8CheckExtraBytes(this, buf, p);
|
3535 |
-
if (r !== undefined) return r;
|
3536 |
-
if (this.lastNeed <= buf.length) {
|
3537 |
-
buf.copy(this.lastChar, p, 0, this.lastNeed);
|
3538 |
-
return this.lastChar.toString(this.encoding, 0, this.lastTotal);
|
3539 |
-
}
|
3540 |
-
buf.copy(this.lastChar, p, 0, buf.length);
|
3541 |
-
this.lastNeed -= buf.length;
|
3542 |
-
}
|
3543 |
-
|
3544 |
-
// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
|
3545 |
-
// partial character, the character's bytes are buffered until the required
|
3546 |
-
// number of bytes are available.
|
3547 |
-
function utf8Text(buf, i) {
|
3548 |
-
var total = utf8CheckIncomplete(this, buf, i);
|
3549 |
-
if (!this.lastNeed) return buf.toString('utf8', i);
|
3550 |
-
this.lastTotal = total;
|
3551 |
-
var end = buf.length - (total - this.lastNeed);
|
3552 |
-
buf.copy(this.lastChar, 0, end);
|
3553 |
-
return buf.toString('utf8', i, end);
|
3554 |
-
}
|
3555 |
-
|
3556 |
-
// For UTF-8, a replacement character for each buffered byte of a (partial)
|
3557 |
-
// character needs to be added to the output.
|
3558 |
-
function utf8End(buf) {
|
3559 |
-
var r = buf && buf.length ? this.write(buf) : '';
|
3560 |
-
if (this.lastNeed) return r + '\ufffd'.repeat(this.lastTotal - this.lastNeed);
|
3561 |
-
return r;
|
3562 |
-
}
|
3563 |
-
|
3564 |
-
// UTF-16LE typically needs two bytes per character, but even if we have an even
|
3565 |
-
// number of bytes available, we need to check if we end on a leading/high
|
3566 |
-
// surrogate. In that case, we need to wait for the next two bytes in order to
|
3567 |
-
// decode the last character properly.
|
3568 |
-
function utf16Text(buf, i) {
|
3569 |
-
if ((buf.length - i) % 2 === 0) {
|
3570 |
-
var r = buf.toString('utf16le', i);
|
3571 |
-
if (r) {
|
3572 |
-
var c = r.charCodeAt(r.length - 1);
|
3573 |
-
if (c >= 0xD800 && c <= 0xDBFF) {
|
3574 |
-
this.lastNeed = 2;
|
3575 |
-
this.lastTotal = 4;
|
3576 |
-
this.lastChar[0] = buf[buf.length - 2];
|
3577 |
-
this.lastChar[1] = buf[buf.length - 1];
|
3578 |
-
return r.slice(0, -1);
|
3579 |
-
}
|
3580 |
-
}
|
3581 |
-
return r;
|
3582 |
-
}
|
3583 |
-
this.lastNeed = 1;
|
3584 |
-
this.lastTotal = 2;
|
3585 |
-
this.lastChar[0] = buf[buf.length - 1];
|
3586 |
-
return buf.toString('utf16le', i, buf.length - 1);
|
3587 |
-
}
|
3588 |
-
|
3589 |
-
// For UTF-16LE we do not explicitly append special replacement characters if we
|
3590 |
-
// end on a partial character, we simply let v8 handle that.
|
3591 |
-
function utf16End(buf) {
|
3592 |
-
var r = buf && buf.length ? this.write(buf) : '';
|
3593 |
-
if (this.lastNeed) {
|
3594 |
-
var end = this.lastTotal - this.lastNeed;
|
3595 |
-
return r + this.lastChar.toString('utf16le', 0, end);
|
3596 |
-
}
|
3597 |
-
return r;
|
3598 |
-
}
|
3599 |
-
|
3600 |
-
function base64Text(buf, i) {
|
3601 |
-
var n = (buf.length - i) % 3;
|
3602 |
-
if (n === 0) return buf.toString('base64', i);
|
3603 |
-
this.lastNeed = 3 - n;
|
3604 |
-
this.lastTotal = 3;
|
3605 |
-
if (n === 1) {
|
3606 |
-
this.lastChar[0] = buf[buf.length - 1];
|
3607 |
-
} else {
|
3608 |
-
this.lastChar[0] = buf[buf.length - 2];
|
3609 |
-
this.lastChar[1] = buf[buf.length - 1];
|
3610 |
-
}
|
3611 |
-
return buf.toString('base64', i, buf.length - n);
|
3612 |
-
}
|
3613 |
-
|
3614 |
-
function base64End(buf) {
|
3615 |
-
var r = buf && buf.length ? this.write(buf) : '';
|
3616 |
-
if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
|
3617 |
-
return r;
|
3618 |
-
}
|
3619 |
-
|
3620 |
-
// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
|
3621 |
-
function simpleWrite(buf) {
|
3622 |
-
return buf.toString(this.encoding);
|
3623 |
-
}
|
3624 |
-
|
3625 |
-
function simpleEnd(buf) {
|
3626 |
-
return buf && buf.length ? this.write(buf) : '';
|
3627 |
-
}
|
3628 |
-
|
3629 |
-
/***/ }),
|
3630 |
-
/* 92 */,
|
3631 |
-
/* 93 */,
|
3632 |
-
/* 94 */,
|
3633 |
-
/* 95 */,
|
3634 |
-
/* 96 */,
|
3635 |
-
/* 97 */,
|
3636 |
-
/* 98 */,
|
3637 |
-
/* 99 */,
|
3638 |
-
/* 100 */,
|
3639 |
-
/* 101 */,
|
3640 |
-
/* 102 */,
|
3641 |
-
/* 103 */,
|
3642 |
-
/* 104 */,
|
3643 |
-
/* 105 */,
|
3644 |
-
/* 106 */,
|
3645 |
-
/* 107 */,
|
3646 |
-
/* 108 */,
|
3647 |
-
/* 109 */,
|
3648 |
-
/* 110 */,
|
3649 |
-
/* 111 */,
|
3650 |
-
/* 112 */,
|
3651 |
-
/* 113 */,
|
3652 |
-
/* 114 */,
|
3653 |
-
/* 115 */,
|
3654 |
-
/* 116 */,
|
3655 |
-
/* 117 */,
|
3656 |
-
/* 118 */,
|
3657 |
-
/* 119 */,
|
3658 |
-
/* 120 */,
|
3659 |
-
/* 121 */,
|
3660 |
-
/* 122 */,
|
3661 |
-
/* 123 */,
|
3662 |
-
/* 124 */,
|
3663 |
-
/* 125 */,
|
3664 |
-
/* 126 */,
|
3665 |
-
/* 127 */,
|
3666 |
-
/* 128 */,
|
3667 |
-
/* 129 */,
|
3668 |
-
/* 130 */,
|
3669 |
-
/* 131 */,
|
3670 |
-
/* 132 */,
|
3671 |
-
/* 133 */,
|
3672 |
-
/* 134 */,
|
3673 |
-
/* 135 */,
|
3674 |
-
/* 136 */,
|
3675 |
-
/* 137 */,
|
3676 |
-
/* 138 */,
|
3677 |
-
/* 139 */,
|
3678 |
-
/* 140 */,
|
3679 |
-
/* 141 */,
|
3680 |
-
/* 142 */,
|
3681 |
-
/* 143 */,
|
3682 |
-
/* 144 */,
|
3683 |
-
/* 145 */,
|
3684 |
-
/* 146 */,
|
3685 |
-
/* 147 */,
|
3686 |
-
/* 148 */,
|
3687 |
-
/* 149 */,
|
3688 |
-
/* 150 */,
|
3689 |
-
/* 151 */,
|
3690 |
-
/* 152 */,
|
3691 |
-
/* 153 */,
|
3692 |
-
/* 154 */,
|
3693 |
-
/* 155 */,
|
3694 |
-
/* 156 */,
|
3695 |
-
/* 157 */,
|
3696 |
-
/* 158 */,
|
3697 |
-
/* 159 */,
|
3698 |
-
/* 160 */,
|
3699 |
-
/* 161 */,
|
3700 |
-
/* 162 */,
|
3701 |
-
/* 163 */,
|
3702 |
-
/* 164 */,
|
3703 |
-
/* 165 */,
|
3704 |
-
/* 166 */,
|
3705 |
-
/* 167 */,
|
3706 |
-
/* 168 */,
|
3707 |
-
/* 169 */,
|
3708 |
-
/* 170 */,
|
3709 |
-
/* 171 */,
|
3710 |
-
/* 172 */,
|
3711 |
-
/* 173 */,
|
3712 |
-
/* 174 */,
|
3713 |
-
/* 175 */,
|
3714 |
-
/* 176 */,
|
3715 |
-
/* 177 */,
|
3716 |
-
/* 178 */,
|
3717 |
-
/* 179 */,
|
3718 |
-
/* 180 */,
|
3719 |
-
/* 181 */,
|
3720 |
-
/* 182 */,
|
3721 |
-
/* 183 */,
|
3722 |
-
/* 184 */,
|
3723 |
-
/* 185 */,
|
3724 |
-
/* 186 */,
|
3725 |
-
/* 187 */,
|
3726 |
-
/* 188 */,
|
3727 |
-
/* 189 */,
|
3728 |
-
/* 190 */,
|
3729 |
-
/* 191 */,
|
3730 |
-
/* 192 */,
|
3731 |
-
/* 193 */,
|
3732 |
-
/* 194 */,
|
3733 |
-
/* 195 */,
|
3734 |
-
/* 196 */,
|
3735 |
-
/* 197 */,
|
3736 |
-
/* 198 */,
|
3737 |
-
/* 199 */,
|
3738 |
-
/* 200 */,
|
3739 |
-
/* 201 */,
|
3740 |
-
/* 202 */,
|
3741 |
-
/* 203 */,
|
3742 |
-
/* 204 */,
|
3743 |
-
/* 205 */,
|
3744 |
-
/* 206 */,
|
3745 |
-
/* 207 */,
|
3746 |
-
/* 208 */,
|
3747 |
-
/* 209 */,
|
3748 |
-
/* 210 */,
|
3749 |
-
/* 211 */,
|
3750 |
-
/* 212 */,
|
3751 |
-
/* 213 */,
|
3752 |
-
/* 214 */,
|
3753 |
-
/* 215 */,
|
3754 |
-
/* 216 */,
|
3755 |
-
/* 217 */,
|
3756 |
-
/* 218 */,
|
3757 |
-
/* 219 */,
|
3758 |
-
/* 220 */,
|
3759 |
-
/* 221 */,
|
3760 |
-
/* 222 */,
|
3761 |
-
/* 223 */,
|
3762 |
-
/* 224 */,
|
3763 |
-
/* 225 */,
|
3764 |
-
/* 226 */
|
3765 |
-
/***/ (function(module, exports, __webpack_require__) {
|
3766 |
-
|
3767 |
-
"use strict";
|
3768 |
-
|
3769 |
-
|
3770 |
-
var _propTypes = __webpack_require__(3);
|
3771 |
-
|
3772 |
-
var _propTypes2 = _interopRequireDefault(_propTypes);
|
3773 |
-
|
3774 |
-
var _react = __webpack_require__(2);
|
3775 |
-
|
3776 |
-
var _react2 = _interopRequireDefault(_react);
|
3777 |
-
|
3778 |
-
var _reactTooltip = __webpack_require__(232);
|
3779 |
-
|
3780 |
-
var _reactTooltip2 = _interopRequireDefault(_reactTooltip);
|
3781 |
-
|
3782 |
-
var _reactHtmlParser = __webpack_require__(417);
|
3783 |
-
|
3784 |
-
var _reactHtmlParser2 = _interopRequireDefault(_reactHtmlParser);
|
3785 |
-
|
3786 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
3787 |
-
|
3788 |
-
function Tooltip(props) {
|
3789 |
-
var tooltipId = props.tooltipId;
|
3790 |
-
var tooltip = props.tooltip;
|
3791 |
-
// tooltip ID must be unique, defaults to tooltip text
|
3792 |
-
if (!props.tooltipId && typeof props.tooltip === 'string') {
|
3793 |
-
tooltipId = props.tooltip;
|
3794 |
-
}
|
3795 |
-
|
3796 |
-
if (typeof props.tooltip === 'string') {
|
3797 |
-
tooltip = _react2.default.createElement(
|
3798 |
-
'span',
|
3799 |
-
{
|
3800 |
-
style: {
|
3801 |
-
pointerEvents: 'all',
|
3802 |
-
maxWidth: '400px',
|
3803 |
-
display: 'inline-block'
|
3804 |
-
}
|
3805 |
-
},
|
3806 |
-
(0, _reactHtmlParser2.default)(props.tooltip)
|
3807 |
-
);
|
3808 |
-
}
|
3809 |
-
|
3810 |
-
return _react2.default.createElement(
|
3811 |
-
'span',
|
3812 |
-
{ className: props.className },
|
3813 |
-
_react2.default.createElement('span', {
|
3814 |
-
style: {
|
3815 |
-
cursor: 'pointer'
|
3816 |
-
},
|
3817 |
-
className: 'tooltip dashicons dashicons-editor-help',
|
3818 |
-
'data-event': 'click',
|
3819 |
-
'data-tip': true,
|
3820 |
-
'data-for': tooltipId
|
3821 |
-
}),
|
3822 |
-
_react2.default.createElement(
|
3823 |
-
_reactTooltip2.default,
|
3824 |
-
{
|
3825 |
-
globalEventOff: 'click',
|
3826 |
-
multiline: true,
|
3827 |
-
id: tooltipId,
|
3828 |
-
efect: 'solid',
|
3829 |
-
place: props.place
|
3830 |
-
},
|
3831 |
-
tooltip
|
3832 |
-
)
|
3833 |
-
);
|
3834 |
-
}
|
3835 |
-
|
3836 |
-
Tooltip.propTypes = {
|
3837 |
-
tooltipId: _propTypes2.default.string,
|
3838 |
-
tooltip: _propTypes2.default.node.isRequired,
|
3839 |
-
place: _propTypes2.default.string,
|
3840 |
-
className: _propTypes2.default.string
|
3841 |
-
};
|
3842 |
-
|
3843 |
-
Tooltip.defaultProps = {
|
3844 |
-
tooltipId: undefined,
|
3845 |
-
place: undefined,
|
3846 |
-
className: undefined
|
3847 |
-
};
|
3848 |
-
|
3849 |
-
module.exports = Tooltip;
|
3850 |
-
|
3851 |
-
/***/ }),
|
3852 |
-
/* 227 */,
|
3853 |
-
/* 228 */,
|
3854 |
-
/* 229 */,
|
3855 |
-
/* 230 */,
|
3856 |
-
/* 231 */,
|
3857 |
-
/* 232 */,
|
3858 |
-
/* 233 */,
|
3859 |
-
/* 234 */,
|
3860 |
-
/* 235 */,
|
3861 |
-
/* 236 */,
|
3862 |
-
/* 237 */,
|
3863 |
-
/* 238 */,
|
3864 |
-
/* 239 */,
|
3865 |
-
/* 240 */,
|
3866 |
-
/* 241 */,
|
3867 |
-
/* 242 */,
|
3868 |
-
/* 243 */,
|
3869 |
-
/* 244 */,
|
3870 |
-
/* 245 */,
|
3871 |
-
/* 246 */,
|
3872 |
-
/* 247 */,
|
3873 |
-
/* 248 */,
|
3874 |
-
/* 249 */,
|
3875 |
-
/* 250 */,
|
3876 |
-
/* 251 */,
|
3877 |
-
/* 252 */,
|
3878 |
-
/* 253 */,
|
3879 |
-
/* 254 */,
|
3880 |
-
/* 255 */,
|
3881 |
-
/* 256 */,
|
3882 |
-
/* 257 */,
|
3883 |
-
/* 258 */
|
3884 |
-
/***/ (function(module, exports, __webpack_require__) {
|
3885 |
-
|
3886 |
-
var Tokenizer = __webpack_require__(259);
|
3887 |
-
|
3888 |
-
/*
|
3889 |
-
Options:
|
3890 |
-
|
3891 |
-
xmlMode: Disables the special behavior for script/style tags (false by default)
|
3892 |
-
lowerCaseAttributeNames: call .toLowerCase for each attribute name (true if xmlMode is `false`)
|
3893 |
-
lowerCaseTags: call .toLowerCase for each tag name (true if xmlMode is `false`)
|
3894 |
-
*/
|
3895 |
-
|
3896 |
-
/*
|
3897 |
-
Callbacks:
|
3898 |
-
|
3899 |
-
oncdataend,
|
3900 |
-
oncdatastart,
|
3901 |
-
onclosetag,
|
3902 |
-
oncomment,
|
3903 |
-
oncommentend,
|
3904 |
-
onerror,
|
3905 |
-
onopentag,
|
3906 |
-
onprocessinginstruction,
|
3907 |
-
onreset,
|
3908 |
-
ontext
|
3909 |
-
*/
|
3910 |
-
|
3911 |
-
var formTags = {
|
3912 |
-
input: true,
|
3913 |
-
option: true,
|
3914 |
-
optgroup: true,
|
3915 |
-
select: true,
|
3916 |
-
button: true,
|
3917 |
-
datalist: true,
|
3918 |
-
textarea: true
|
3919 |
-
};
|
3920 |
-
|
3921 |
-
var openImpliesClose = {
|
3922 |
-
tr : { tr:true, th:true, td:true },
|
3923 |
-
th : { th:true },
|
3924 |
-
td : { thead:true, th:true, td:true },
|
3925 |
-
body : { head:true, link:true, script:true },
|
3926 |
-
li : { li:true },
|
3927 |
-
p : { p:true },
|
3928 |
-
h1 : { p:true },
|
3929 |
-
h2 : { p:true },
|
3930 |
-
h3 : { p:true },
|
3931 |
-
h4 : { p:true },
|
3932 |
-
h5 : { p:true },
|
3933 |
-
h6 : { p:true },
|
3934 |
-
select : formTags,
|
3935 |
-
input : formTags,
|
3936 |
-
output : formTags,
|
3937 |
-
button : formTags,
|
3938 |
-
datalist: formTags,
|
3939 |
-
textarea: formTags,
|
3940 |
-
option : { option:true },
|
3941 |
-
optgroup: { optgroup:true }
|
3942 |
-
};
|
3943 |
-
|
3944 |
-
var voidElements = {
|
3945 |
-
__proto__: null,
|
3946 |
-
area: true,
|
3947 |
-
base: true,
|
3948 |
-
basefont: true,
|
3949 |
-
br: true,
|
3950 |
-
col: true,
|
3951 |
-
command: true,
|
3952 |
-
embed: true,
|
3953 |
-
frame: true,
|
3954 |
-
hr: true,
|
3955 |
-
img: true,
|
3956 |
-
input: true,
|
3957 |
-
isindex: true,
|
3958 |
-
keygen: true,
|
3959 |
-
link: true,
|
3960 |
-
meta: true,
|
3961 |
-
param: true,
|
3962 |
-
source: true,
|
3963 |
-
track: true,
|
3964 |
-
wbr: true,
|
3965 |
-
|
3966 |
-
//common self closing svg elements
|
3967 |
-
path: true,
|
3968 |
-
circle: true,
|
3969 |
-
ellipse: true,
|
3970 |
-
line: true,
|
3971 |
-
rect: true,
|
3972 |
-
use: true,
|
3973 |
-
stop: true,
|
3974 |
-
polyline: true,
|
3975 |
-
polygon: true
|
3976 |
-
};
|
3977 |
-
|
3978 |
-
var re_nameEnd = /\s|\//;
|
3979 |
-
|
3980 |
-
function Parser(cbs, options){
|
3981 |
-
this._options = options || {};
|
3982 |
-
this._cbs = cbs || {};
|
3983 |
-
|
3984 |
-
this._tagname = "";
|
3985 |
-
this._attribname = "";
|
3986 |
-
this._attribvalue = "";
|
3987 |
-
this._attribs = null;
|
3988 |
-
this._stack = [];
|
3989 |
-
|
3990 |
-
this.startIndex = 0;
|
3991 |
-
this.endIndex = null;
|
3992 |
-
|
3993 |
-
this._lowerCaseTagNames = "lowerCaseTags" in this._options ?
|
3994 |
-
!!this._options.lowerCaseTags :
|
3995 |
-
!this._options.xmlMode;
|
3996 |
-
this._lowerCaseAttributeNames = "lowerCaseAttributeNames" in this._options ?
|
3997 |
-
!!this._options.lowerCaseAttributeNames :
|
3998 |
-
!this._options.xmlMode;
|
3999 |
-
|
4000 |
-
if(this._options.Tokenizer) {
|
4001 |
-
Tokenizer = this._options.Tokenizer;
|
4002 |
-
}
|
4003 |
-
this._tokenizer = new Tokenizer(this._options, this);
|
4004 |
-
|
4005 |
-
if(this._cbs.onparserinit) this._cbs.onparserinit(this);
|
4006 |
-
}
|
4007 |
-
|
4008 |
-
__webpack_require__(22)(Parser, __webpack_require__(55).EventEmitter);
|
4009 |
-
|
4010 |
-
Parser.prototype._updatePosition = function(initialOffset){
|
4011 |
-
if(this.endIndex === null){
|
4012 |
-
if(this._tokenizer._sectionStart <= initialOffset){
|
4013 |
-
this.startIndex = 0;
|
4014 |
-
} else {
|
4015 |
-
this.startIndex = this._tokenizer._sectionStart - initialOffset;
|
4016 |
-
}
|
4017 |
-
}
|
4018 |
-
else this.startIndex = this.endIndex + 1;
|
4019 |
-
this.endIndex = this._tokenizer.getAbsoluteIndex();
|
4020 |
-
};
|
4021 |
-
|
4022 |
-
//Tokenizer event handlers
|
4023 |
-
Parser.prototype.ontext = function(data){
|
4024 |
-
this._updatePosition(1);
|
4025 |
-
this.endIndex--;
|
4026 |
-
|
4027 |
-
if(this._cbs.ontext) this._cbs.ontext(data);
|
4028 |
-
};
|
4029 |
-
|
4030 |
-
Parser.prototype.onopentagname = function(name){
|
4031 |
-
if(this._lowerCaseTagNames){
|
4032 |
-
name = name.toLowerCase();
|
4033 |
-
}
|
4034 |
-
|
4035 |
-
this._tagname = name;
|
4036 |
-
|
4037 |
-
if(!this._options.xmlMode && name in openImpliesClose) {
|
4038 |
-
for(
|
4039 |
-
var el;
|
4040 |
-
(el = this._stack[this._stack.length - 1]) in openImpliesClose[name];
|
4041 |
-
this.onclosetag(el)
|
4042 |
-
);
|
4043 |
-
}
|
4044 |
-
|
4045 |
-
if(this._options.xmlMode || !(name in voidElements)){
|
4046 |
-
this._stack.push(name);
|
4047 |
-
}
|
4048 |
-
|
4049 |
-
if(this._cbs.onopentagname) this._cbs.onopentagname(name);
|
4050 |
-
if(this._cbs.onopentag) this._attribs = {};
|
4051 |
-
};
|
4052 |
-
|
4053 |
-
Parser.prototype.onopentagend = function(){
|
4054 |
-
this._updatePosition(1);
|
4055 |
-
|
4056 |
-
if(this._attribs){
|
4057 |
-
if(this._cbs.onopentag) this._cbs.onopentag(this._tagname, this._attribs);
|
4058 |
-
this._attribs = null;
|
4059 |
-
}
|
4060 |
-
|
4061 |
-
if(!this._options.xmlMode && this._cbs.onclosetag && this._tagname in voidElements){
|
4062 |
-
this._cbs.onclosetag(this._tagname);
|
4063 |
-
}
|
4064 |
-
|
4065 |
-
this._tagname = "";
|
4066 |
-
};
|
4067 |
-
|
4068 |
-
Parser.prototype.onclosetag = function(name){
|
4069 |
-
this._updatePosition(1);
|
4070 |
-
|
4071 |
-
if(this._lowerCaseTagNames){
|
4072 |
-
name = name.toLowerCase();
|
4073 |
-
}
|
4074 |
-
|
4075 |
-
if(this._stack.length && (!(name in voidElements) || this._options.xmlMode)){
|
4076 |
-
var pos = this._stack.lastIndexOf(name);
|
4077 |
-
if(pos !== -1){
|
4078 |
-
if(this._cbs.onclosetag){
|
4079 |
-
pos = this._stack.length - pos;
|
4080 |
-
while(pos--) this._cbs.onclosetag(this._stack.pop());
|
4081 |
-
}
|
4082 |
-
else this._stack.length = pos;
|
4083 |
-
} else if(name === "p" && !this._options.xmlMode){
|
4084 |
-
this.onopentagname(name);
|
4085 |
-
this._closeCurrentTag();
|
4086 |
-
}
|
4087 |
-
} else if(!this._options.xmlMode && (name === "br" || name === "p")){
|
4088 |
-
this.onopentagname(name);
|
4089 |
-
this._closeCurrentTag();
|
4090 |
-
}
|
4091 |
-
};
|
4092 |
-
|
4093 |
-
Parser.prototype.onselfclosingtag = function(){
|
4094 |
-
if(this._options.xmlMode || this._options.recognizeSelfClosing){
|
4095 |
-
this._closeCurrentTag();
|
4096 |
-
} else {
|
4097 |
-
this.onopentagend();
|
4098 |
-
}
|
4099 |
-
};
|
4100 |
-
|
4101 |
-
Parser.prototype._closeCurrentTag = function(){
|
4102 |
-
var name = this._tagname;
|
4103 |
-
|
4104 |
-
this.onopentagend();
|
4105 |
-
|
4106 |
-
//self-closing tags will be on the top of the stack
|
4107 |
-
//(cheaper check than in onclosetag)
|
4108 |
-
if(this._stack[this._stack.length - 1] === name){
|
4109 |
-
if(this._cbs.onclosetag){
|
4110 |
-
this._cbs.onclosetag(name);
|
4111 |
-
}
|
4112 |
-
this._stack.pop();
|
4113 |
-
}
|
4114 |
-
};
|
4115 |
-
|
4116 |
-
Parser.prototype.onattribname = function(name){
|
4117 |
-
if(this._lowerCaseAttributeNames){
|
4118 |
-
name = name.toLowerCase();
|
4119 |
-
}
|
4120 |
-
this._attribname = name;
|
4121 |
-
};
|
4122 |
-
|
4123 |
-
Parser.prototype.onattribdata = function(value){
|
4124 |
-
this._attribvalue += value;
|
4125 |
-
};
|
4126 |
-
|
4127 |
-
Parser.prototype.onattribend = function(){
|
4128 |
-
if(this._cbs.onattribute) this._cbs.onattribute(this._attribname, this._attribvalue);
|
4129 |
-
if(
|
4130 |
-
this._attribs &&
|
4131 |
-
!Object.prototype.hasOwnProperty.call(this._attribs, this._attribname)
|
4132 |
-
){
|
4133 |
-
this._attribs[this._attribname] = this._attribvalue;
|
4134 |
-
}
|
4135 |
-
this._attribname = "";
|
4136 |
-
this._attribvalue = "";
|
4137 |
-
};
|
4138 |
-
|
4139 |
-
Parser.prototype._getInstructionName = function(value){
|
4140 |
-
var idx = value.search(re_nameEnd),
|
4141 |
-
name = idx < 0 ? value : value.substr(0, idx);
|
4142 |
-
|
4143 |
-
if(this._lowerCaseTagNames){
|
4144 |
-
name = name.toLowerCase();
|
4145 |
-
}
|
4146 |
-
|
4147 |
-
return name;
|
4148 |
-
};
|
4149 |
-
|
4150 |
-
Parser.prototype.ondeclaration = function(value){
|
4151 |
-
if(this._cbs.onprocessinginstruction){
|
4152 |
-
var name = this._getInstructionName(value);
|
4153 |
-
this._cbs.onprocessinginstruction("!" + name, "!" + value);
|
4154 |
-
}
|
4155 |
-
};
|
4156 |
-
|
4157 |
-
Parser.prototype.onprocessinginstruction = function(value){
|
4158 |
-
if(this._cbs.onprocessinginstruction){
|
4159 |
-
var name = this._getInstructionName(value);
|
4160 |
-
this._cbs.onprocessinginstruction("?" + name, "?" + value);
|
4161 |
-
}
|
4162 |
-
};
|
4163 |
-
|
4164 |
-
Parser.prototype.oncomment = function(value){
|
4165 |
-
this._updatePosition(4);
|
4166 |
-
|
4167 |
-
if(this._cbs.oncomment) this._cbs.oncomment(value);
|
4168 |
-
if(this._cbs.oncommentend) this._cbs.oncommentend();
|
4169 |
-
};
|
4170 |
-
|
4171 |
-
Parser.prototype.oncdata = function(value){
|
4172 |
-
this._updatePosition(1);
|
4173 |
-
|
4174 |
-
if(this._options.xmlMode || this._options.recognizeCDATA){
|
4175 |
-
if(this._cbs.oncdatastart) this._cbs.oncdatastart();
|
4176 |
-
if(this._cbs.ontext) this._cbs.ontext(value);
|
4177 |
-
if(this._cbs.oncdataend) this._cbs.oncdataend();
|
4178 |
-
} else {
|
4179 |
-
this.oncomment("[CDATA[" + value + "]]");
|
4180 |
-
}
|
4181 |
-
};
|
4182 |
-
|
4183 |
-
Parser.prototype.onerror = function(err){
|
4184 |
-
if(this._cbs.onerror) this._cbs.onerror(err);
|
4185 |
-
};
|
4186 |
-
|
4187 |
-
Parser.prototype.onend = function(){
|
4188 |
-
if(this._cbs.onclosetag){
|
4189 |
-
for(
|
4190 |
-
var i = this._stack.length;
|
4191 |
-
i > 0;
|
4192 |
-
this._cbs.onclosetag(this._stack[--i])
|
4193 |
-
);
|
4194 |
-
}
|
4195 |
-
if(this._cbs.onend) this._cbs.onend();
|
4196 |
-
};
|
4197 |
-
|
4198 |
-
|
4199 |
-
//Resets the parser to a blank state, ready to parse a new HTML document
|
4200 |
-
Parser.prototype.reset = function(){
|
4201 |
-
if(this._cbs.onreset) this._cbs.onreset();
|
4202 |
-
this._tokenizer.reset();
|
4203 |
-
|
4204 |
-
this._tagname = "";
|
4205 |
-
this._attribname = "";
|
4206 |
-
this._attribs = null;
|
4207 |
-
this._stack = [];
|
4208 |
-
|
4209 |
-
if(this._cbs.onparserinit) this._cbs.onparserinit(this);
|
4210 |
-
};
|
4211 |
-
|
4212 |
-
//Parses a complete HTML document and pushes it to the handler
|
4213 |
-
Parser.prototype.parseComplete = function(data){
|
4214 |
-
this.reset();
|
4215 |
-
this.end(data);
|
4216 |
-
};
|
4217 |
-
|
4218 |
-
Parser.prototype.write = function(chunk){
|
4219 |
-
this._tokenizer.write(chunk);
|
4220 |
-
};
|
4221 |
-
|
4222 |
-
Parser.prototype.end = function(chunk){
|
4223 |
-
this._tokenizer.end(chunk);
|
4224 |
-
};
|
4225 |
-
|
4226 |
-
Parser.prototype.pause = function(){
|
4227 |
-
this._tokenizer.pause();
|
4228 |
-
};
|
4229 |
-
|
4230 |
-
Parser.prototype.resume = function(){
|
4231 |
-
this._tokenizer.resume();
|
4232 |
-
};
|
4233 |
-
|
4234 |
-
//alias for backwards compat
|
4235 |
-
Parser.prototype.parseChunk = Parser.prototype.write;
|
4236 |
-
Parser.prototype.done = Parser.prototype.end;
|
4237 |
-
|
4238 |
-
module.exports = Parser;
|
4239 |
-
|
4240 |
-
|
4241 |
-
/***/ }),
|
4242 |
-
/* 259 */
|
4243 |
-
/***/ (function(module, exports, __webpack_require__) {
|
4244 |
-
|
4245 |
-
module.exports = Tokenizer;
|
4246 |
-
|
4247 |
-
var decodeCodePoint = __webpack_require__(260),
|
4248 |
-
entityMap = __webpack_require__(86),
|
4249 |
-
legacyMap = __webpack_require__(261),
|
4250 |
-
xmlMap = __webpack_require__(87),
|
4251 |
-
|
4252 |
-
i = 0,
|
4253 |
-
|
4254 |
-
TEXT = i++,
|
4255 |
-
BEFORE_TAG_NAME = i++, //after <
|
4256 |
-
IN_TAG_NAME = i++,
|
4257 |
-
IN_SELF_CLOSING_TAG = i++,
|
4258 |
-
BEFORE_CLOSING_TAG_NAME = i++,
|
4259 |
-
IN_CLOSING_TAG_NAME = i++,
|
4260 |
-
AFTER_CLOSING_TAG_NAME = i++,
|
4261 |
-
|
4262 |
-
//attributes
|
4263 |
-
BEFORE_ATTRIBUTE_NAME = i++,
|
4264 |
-
IN_ATTRIBUTE_NAME = i++,
|
4265 |
-
AFTER_ATTRIBUTE_NAME = i++,
|
4266 |
-
BEFORE_ATTRIBUTE_VALUE = i++,
|
4267 |
-
IN_ATTRIBUTE_VALUE_DQ = i++, // "
|
4268 |
-
IN_ATTRIBUTE_VALUE_SQ = i++, // '
|
4269 |
-
IN_ATTRIBUTE_VALUE_NQ = i++,
|
4270 |
-
|
4271 |
-
//declarations
|
4272 |
-
BEFORE_DECLARATION = i++, // !
|
4273 |
-
IN_DECLARATION = i++,
|
4274 |
-
|
4275 |
-
//processing instructions
|
4276 |
-
IN_PROCESSING_INSTRUCTION = i++, // ?
|
4277 |
-
|
4278 |
-
//comments
|
4279 |
-
BEFORE_COMMENT = i++,
|
4280 |
-
IN_COMMENT = i++,
|
4281 |
-
AFTER_COMMENT_1 = i++,
|
4282 |
-
AFTER_COMMENT_2 = i++,
|
4283 |
-
|
4284 |
-
//cdata
|
4285 |
-
BEFORE_CDATA_1 = i++, // [
|
4286 |
-
BEFORE_CDATA_2 = i++, // C
|
4287 |
-
BEFORE_CDATA_3 = i++, // D
|
4288 |
-
BEFORE_CDATA_4 = i++, // A
|
4289 |
-
BEFORE_CDATA_5 = i++, // T
|
4290 |
-
BEFORE_CDATA_6 = i++, // A
|
4291 |
-
IN_CDATA = i++, // [
|
4292 |
-
AFTER_CDATA_1 = i++, // ]
|
4293 |
-
AFTER_CDATA_2 = i++, // ]
|
4294 |
-
|
4295 |
-
//special tags
|
4296 |
-
BEFORE_SPECIAL = i++, //S
|
4297 |
-
BEFORE_SPECIAL_END = i++, //S
|
4298 |
-
|
4299 |
-
BEFORE_SCRIPT_1 = i++, //C
|
4300 |
-
BEFORE_SCRIPT_2 = i++, //R
|
4301 |
-
BEFORE_SCRIPT_3 = i++, //I
|
4302 |
-
BEFORE_SCRIPT_4 = i++, //P
|
4303 |
-
BEFORE_SCRIPT_5 = i++, //T
|
4304 |
-
AFTER_SCRIPT_1 = i++, //C
|
4305 |
-
AFTER_SCRIPT_2 = i++, //R
|
4306 |
-
AFTER_SCRIPT_3 = i++, //I
|
4307 |
-
AFTER_SCRIPT_4 = i++, //P
|
4308 |
-
AFTER_SCRIPT_5 = i++, //T
|
4309 |
-
|
4310 |
-
BEFORE_STYLE_1 = i++, //T
|
4311 |
-
BEFORE_STYLE_2 = i++, //Y
|
4312 |
-
BEFORE_STYLE_3 = i++, //L
|
4313 |
-
BEFORE_STYLE_4 = i++, //E
|
4314 |
-
AFTER_STYLE_1 = i++, //T
|
4315 |
-
AFTER_STYLE_2 = i++, //Y
|
4316 |
-
AFTER_STYLE_3 = i++, //L
|
4317 |
-
AFTER_STYLE_4 = i++, //E
|
4318 |
-
|
4319 |
-
BEFORE_ENTITY = i++, //&
|
4320 |
-
BEFORE_NUMERIC_ENTITY = i++, //#
|
4321 |
-
IN_NAMED_ENTITY = i++,
|
4322 |
-
IN_NUMERIC_ENTITY = i++,
|
4323 |
-
IN_HEX_ENTITY = i++, //X
|
4324 |
-
|
4325 |
-
j = 0,
|
4326 |
-
|
4327 |
-
SPECIAL_NONE = j++,
|
4328 |
-
SPECIAL_SCRIPT = j++,
|
4329 |
-
SPECIAL_STYLE = j++;
|
4330 |
-
|
4331 |
-
function whitespace(c){
|
4332 |
-
return c === " " || c === "\n" || c === "\t" || c === "\f" || c === "\r";
|
4333 |
-
}
|
4334 |
-
|
4335 |
-
function characterState(char, SUCCESS){
|
4336 |
-
return function(c){
|
4337 |
-
if(c === char) this._state = SUCCESS;
|
4338 |
-
};
|
4339 |
-
}
|
4340 |
-
|
4341 |
-
function ifElseState(upper, SUCCESS, FAILURE){
|
4342 |
-
var lower = upper.toLowerCase();
|
4343 |
-
|
4344 |
-
if(upper === lower){
|
4345 |
-
return function(c){
|
4346 |
-
if(c === lower){
|
4347 |
-
this._state = SUCCESS;
|
4348 |
-
} else {
|
4349 |
-
this._state = FAILURE;
|
4350 |
-
this._index--;
|
4351 |
-
}
|
4352 |
-
};
|
4353 |
-
} else {
|
4354 |
-
return function(c){
|
4355 |
-
if(c === lower || c === upper){
|
4356 |
-
this._state = SUCCESS;
|
4357 |
-
} else {
|
4358 |
-
this._state = FAILURE;
|
4359 |
-
this._index--;
|
4360 |
-
}
|
4361 |
-
};
|
4362 |
-
}
|
4363 |
-
}
|
4364 |
-
|
4365 |
-
function consumeSpecialNameChar(upper, NEXT_STATE){
|
4366 |
-
var lower = upper.toLowerCase();
|
4367 |
-
|
4368 |
-
return function(c){
|
4369 |
-
if(c === lower || c === upper){
|
4370 |
-
this._state = NEXT_STATE;
|
4371 |
-
} else {
|
4372 |
-
this._state = IN_TAG_NAME;
|
4373 |
-
this._index--; //consume the token again
|
4374 |
-
}
|
4375 |
-
};
|
4376 |
-
}
|
4377 |
-
|
4378 |
-
function Tokenizer(options, cbs){
|
4379 |
-
this._state = TEXT;
|
4380 |
-
this._buffer = "";
|
4381 |
-
this._sectionStart = 0;
|
4382 |
-
this._index = 0;
|
4383 |
-
this._bufferOffset = 0; //chars removed from _buffer
|
4384 |
-
this._baseState = TEXT;
|
4385 |
-
this._special = SPECIAL_NONE;
|
4386 |
-
this._cbs = cbs;
|
4387 |
-
this._running = true;
|
4388 |
-
this._ended = false;
|
4389 |
-
this._xmlMode = !!(options && options.xmlMode);
|
4390 |
-
this._decodeEntities = !!(options && options.decodeEntities);
|
4391 |
-
}
|
4392 |
-
|
4393 |
-
Tokenizer.prototype._stateText = function(c){
|
4394 |
-
if(c === "<"){
|
4395 |
-
if(this._index > this._sectionStart){
|
4396 |
-
this._cbs.ontext(this._getSection());
|
4397 |
-
}
|
4398 |
-
this._state = BEFORE_TAG_NAME;
|
4399 |
-
this._sectionStart = this._index;
|
4400 |
-
} else if(this._decodeEntities && this._special === SPECIAL_NONE && c === "&"){
|
4401 |
-
if(this._index > this._sectionStart){
|
4402 |
-
this._cbs.ontext(this._getSection());
|
4403 |
-
}
|
4404 |
-
this._baseState = TEXT;
|
4405 |
-
this._state = BEFORE_ENTITY;
|
4406 |
-
this._sectionStart = this._index;
|
4407 |
-
}
|
4408 |
-
};
|
4409 |
-
|
4410 |
-
Tokenizer.prototype._stateBeforeTagName = function(c){
|
4411 |
-
if(c === "/"){
|
4412 |
-
this._state = BEFORE_CLOSING_TAG_NAME;
|
4413 |
-
} else if(c === "<"){
|
4414 |
-
this._cbs.ontext(this._getSection());
|
4415 |
-
this._sectionStart = this._index;
|
4416 |
-
} else if(c === ">" || this._special !== SPECIAL_NONE || whitespace(c)) {
|
4417 |
-
this._state = TEXT;
|
4418 |
-
} else if(c === "!"){
|
4419 |
-
this._state = BEFORE_DECLARATION;
|
4420 |
-
this._sectionStart = this._index + 1;
|
4421 |
-
} else if(c === "?"){
|
4422 |
-
this._state = IN_PROCESSING_INSTRUCTION;
|
4423 |
-
this._sectionStart = this._index + 1;
|
4424 |
-
} else {
|
4425 |
-
this._state = (!this._xmlMode && (c === "s" || c === "S")) ?
|
4426 |
-
BEFORE_SPECIAL : IN_TAG_NAME;
|
4427 |
-
this._sectionStart = this._index;
|
4428 |
-
}
|
4429 |
-
};
|
4430 |
-
|
4431 |
-
Tokenizer.prototype._stateInTagName = function(c){
|
4432 |
-
if(c === "/" || c === ">" || whitespace(c)){
|
4433 |
-
this._emitToken("onopentagname");
|
4434 |
-
this._state = BEFORE_ATTRIBUTE_NAME;
|
4435 |
-
this._index--;
|
4436 |
-
}
|
4437 |
-
};
|
4438 |
-
|
4439 |
-
Tokenizer.prototype._stateBeforeCloseingTagName = function(c){
|
4440 |
-
if(whitespace(c));
|
4441 |
-
else if(c === ">"){
|
4442 |
-
this._state = TEXT;
|
4443 |
-
} else if(this._special !== SPECIAL_NONE){
|
4444 |
-
if(c === "s" || c === "S"){
|
4445 |
-
this._state = BEFORE_SPECIAL_END;
|
4446 |
-
} else {
|
4447 |
-
this._state = TEXT;
|
4448 |
-
this._index--;
|
4449 |
-
}
|
4450 |
-
} else {
|
4451 |
-
this._state = IN_CLOSING_TAG_NAME;
|
4452 |
-
this._sectionStart = this._index;
|
4453 |
-
}
|
4454 |
-
};
|
4455 |
-
|
4456 |
-
Tokenizer.prototype._stateInCloseingTagName = function(c){
|
4457 |
-
if(c === ">" || whitespace(c)){
|
4458 |
-
this._emitToken("onclosetag");
|
4459 |
-
this._state = AFTER_CLOSING_TAG_NAME;
|
4460 |
-
this._index--;
|
4461 |
-
}
|
4462 |
-
};
|
4463 |
-
|
4464 |
-
Tokenizer.prototype._stateAfterCloseingTagName = function(c){
|
4465 |
-
//skip everything until ">"
|
4466 |
-
if(c === ">"){
|
4467 |
-
this._state = TEXT;
|
4468 |
-
this._sectionStart = this._index + 1;
|
4469 |
-
}
|
4470 |
-
};
|
4471 |
-
|
4472 |
-
Tokenizer.prototype._stateBeforeAttributeName = function(c){
|
4473 |
-
if(c === ">"){
|
4474 |
-
this._cbs.onopentagend();
|
4475 |
-
this._state = TEXT;
|
4476 |
-
this._sectionStart = this._index + 1;
|
4477 |
-
} else if(c === "/"){
|
4478 |
-
this._state = IN_SELF_CLOSING_TAG;
|
4479 |
-
} else if(!whitespace(c)){
|
4480 |
-
this._state = IN_ATTRIBUTE_NAME;
|
4481 |
-
this._sectionStart = this._index;
|
4482 |
-
}
|
4483 |
-
};
|
4484 |
-
|
4485 |
-
Tokenizer.prototype._stateInSelfClosingTag = function(c){
|
4486 |
-
if(c === ">"){
|
4487 |
-
this._cbs.onselfclosingtag();
|
4488 |
-
this._state = TEXT;
|
4489 |
-
this._sectionStart = this._index + 1;
|
4490 |
-
} else if(!whitespace(c)){
|
4491 |
-
this._state = BEFORE_ATTRIBUTE_NAME;
|
4492 |
-
this._index--;
|
4493 |
-
}
|
4494 |
-
};
|
4495 |
-
|
4496 |
-
Tokenizer.prototype._stateInAttributeName = function(c){
|
4497 |
-
if(c === "=" || c === "/" || c === ">" || whitespace(c)){
|
4498 |
-
this._cbs.onattribname(this._getSection());
|
4499 |
-
this._sectionStart = -1;
|
4500 |
-
this._state = AFTER_ATTRIBUTE_NAME;
|
4501 |
-
this._index--;
|
4502 |
-
}
|
4503 |
-
};
|
4504 |
-
|
4505 |
-
Tokenizer.prototype._stateAfterAttributeName = function(c){
|
4506 |
-
if(c === "="){
|
4507 |
-
this._state = BEFORE_ATTRIBUTE_VALUE;
|
4508 |
-
} else if(c === "/" || c === ">"){
|
4509 |
-
this._cbs.onattribend();
|
4510 |
-
this._state = BEFORE_ATTRIBUTE_NAME;
|
4511 |
-
this._index--;
|
4512 |
-
} else if(!whitespace(c)){
|
4513 |
-
this._cbs.onattribend();
|
4514 |
-
this._state = IN_ATTRIBUTE_NAME;
|
4515 |
-
this._sectionStart = this._index;
|
4516 |
-
}
|
4517 |
-
};
|
4518 |
-
|
4519 |
-
Tokenizer.prototype._stateBeforeAttributeValue = function(c){
|
4520 |
-
if(c === "\""){
|
4521 |
-
this._state = IN_ATTRIBUTE_VALUE_DQ;
|
4522 |
-
this._sectionStart = this._index + 1;
|
4523 |
-
} else if(c === "'"){
|
4524 |
-
this._state = IN_ATTRIBUTE_VALUE_SQ;
|
4525 |
-
this._sectionStart = this._index + 1;
|
4526 |
-
} else if(!whitespace(c)){
|
4527 |
-
this._state = IN_ATTRIBUTE_VALUE_NQ;
|
4528 |
-
this._sectionStart = this._index;
|
4529 |
-
this._index--; //reconsume token
|
4530 |
-
}
|
4531 |
-
};
|
4532 |
-
|
4533 |
-
Tokenizer.prototype._stateInAttributeValueDoubleQuotes = function(c){
|
4534 |
-
if(c === "\""){
|
4535 |
-
this._emitToken("onattribdata");
|
4536 |
-
this._cbs.onattribend();
|
4537 |
-
this._state = BEFORE_ATTRIBUTE_NAME;
|
4538 |
-
} else if(this._decodeEntities && c === "&"){
|
4539 |
-
this._emitToken("onattribdata");
|
4540 |
-
this._baseState = this._state;
|
4541 |
-
this._state = BEFORE_ENTITY;
|
4542 |
-
this._sectionStart = this._index;
|
4543 |
-
}
|
4544 |
-
};
|
4545 |
-
|
4546 |
-
Tokenizer.prototype._stateInAttributeValueSingleQuotes = function(c){
|
4547 |
-
if(c === "'"){
|
4548 |
-
this._emitToken("onattribdata");
|
4549 |
-
this._cbs.onattribend();
|
4550 |
-
this._state = BEFORE_ATTRIBUTE_NAME;
|
4551 |
-
} else if(this._decodeEntities && c === "&"){
|
4552 |
-
this._emitToken("onattribdata");
|
4553 |
-
this._baseState = this._state;
|
4554 |
-
this._state = BEFORE_ENTITY;
|
4555 |
-
this._sectionStart = this._index;
|
4556 |
-
}
|
4557 |
-
};
|
4558 |
-
|
4559 |
-
Tokenizer.prototype._stateInAttributeValueNoQuotes = function(c){
|
4560 |
-
if(whitespace(c) || c === ">"){
|
4561 |
-
this._emitToken("onattribdata");
|
4562 |
-
this._cbs.onattribend();
|
4563 |
-
this._state = BEFORE_ATTRIBUTE_NAME;
|
4564 |
-
this._index--;
|
4565 |
-
} else if(this._decodeEntities && c === "&"){
|
4566 |
-
this._emitToken("onattribdata");
|
4567 |
-
this._baseState = this._state;
|
4568 |
-
this._state = BEFORE_ENTITY;
|
4569 |
-
this._sectionStart = this._index;
|
4570 |
-
}
|
4571 |
-
};
|
4572 |
-
|
4573 |
-
Tokenizer.prototype._stateBeforeDeclaration = function(c){
|
4574 |
-
this._state = c === "[" ? BEFORE_CDATA_1 :
|
4575 |
-
c === "-" ? BEFORE_COMMENT :
|
4576 |
-
IN_DECLARATION;
|
4577 |
-
};
|
4578 |
-
|
4579 |
-
Tokenizer.prototype._stateInDeclaration = function(c){
|
4580 |
-
if(c === ">"){
|
4581 |
-
this._cbs.ondeclaration(this._getSection());
|
4582 |
-
this._state = TEXT;
|
4583 |
-
this._sectionStart = this._index + 1;
|
4584 |
-
}
|
4585 |
-
};
|
4586 |
-
|
4587 |
-
Tokenizer.prototype._stateInProcessingInstruction = function(c){
|
4588 |
-
if(c === ">"){
|
4589 |
-
this._cbs.onprocessinginstruction(this._getSection());
|
4590 |
-
this._state = TEXT;
|
4591 |
-
this._sectionStart = this._index + 1;
|
4592 |
-
}
|
4593 |
-
};
|
4594 |
-
|
4595 |
-
Tokenizer.prototype._stateBeforeComment = function(c){
|
4596 |
-
if(c === "-"){
|
4597 |
-
this._state = IN_COMMENT;
|
4598 |
-
this._sectionStart = this._index + 1;
|
4599 |
-
} else {
|
4600 |
-
this._state = IN_DECLARATION;
|
4601 |
-
}
|
4602 |
-
};
|
4603 |
-
|
4604 |
-
Tokenizer.prototype._stateInComment = function(c){
|
4605 |
-
if(c === "-") this._state = AFTER_COMMENT_1;
|
4606 |
-
};
|
4607 |
-
|
4608 |
-
Tokenizer.prototype._stateAfterComment1 = function(c){
|
4609 |
-
if(c === "-"){
|
4610 |
-
this._state = AFTER_COMMENT_2;
|
4611 |
-
} else {
|
4612 |
-
this._state = IN_COMMENT;
|
4613 |
-
}
|
4614 |
-
};
|
4615 |
-
|
4616 |
-
Tokenizer.prototype._stateAfterComment2 = function(c){
|
4617 |
-
if(c === ">"){
|
4618 |
-
//remove 2 trailing chars
|
4619 |
-
this._cbs.oncomment(this._buffer.substring(this._sectionStart, this._index - 2));
|
4620 |
-
this._state = TEXT;
|
4621 |
-
this._sectionStart = this._index + 1;
|
4622 |
-
} else if(c !== "-"){
|
4623 |
-
this._state = IN_COMMENT;
|
4624 |
-
}
|
4625 |
-
// else: stay in AFTER_COMMENT_2 (`--->`)
|
4626 |
-
};
|
4627 |
-
|
4628 |
-
Tokenizer.prototype._stateBeforeCdata1 = ifElseState("C", BEFORE_CDATA_2, IN_DECLARATION);
|
4629 |
-
Tokenizer.prototype._stateBeforeCdata2 = ifElseState("D", BEFORE_CDATA_3, IN_DECLARATION);
|
4630 |
-
Tokenizer.prototype._stateBeforeCdata3 = ifElseState("A", BEFORE_CDATA_4, IN_DECLARATION);
|
4631 |
-
Tokenizer.prototype._stateBeforeCdata4 = ifElseState("T", BEFORE_CDATA_5, IN_DECLARATION);
|
4632 |
-
Tokenizer.prototype._stateBeforeCdata5 = ifElseState("A", BEFORE_CDATA_6, IN_DECLARATION);
|
4633 |
-
|
4634 |
-
Tokenizer.prototype._stateBeforeCdata6 = function(c){
|
4635 |
-
if(c === "["){
|
4636 |
-
this._state = IN_CDATA;
|
4637 |
-
this._sectionStart = this._index + 1;
|
4638 |
-
} else {
|
4639 |
-
this._state = IN_DECLARATION;
|
4640 |
-
this._index--;
|
4641 |
-
}
|
4642 |
-
};
|
4643 |
-
|
4644 |
-
Tokenizer.prototype._stateInCdata = function(c){
|
4645 |
-
if(c === "]") this._state = AFTER_CDATA_1;
|
4646 |
-
};
|
4647 |
-
|
4648 |
-
Tokenizer.prototype._stateAfterCdata1 = characterState("]", AFTER_CDATA_2);
|
4649 |
-
|
4650 |
-
Tokenizer.prototype._stateAfterCdata2 = function(c){
|
4651 |
-
if(c === ">"){
|
4652 |
-
//remove 2 trailing chars
|
4653 |
-
this._cbs.oncdata(this._buffer.substring(this._sectionStart, this._index - 2));
|
4654 |
-
this._state = TEXT;
|
4655 |
-
this._sectionStart = this._index + 1;
|
4656 |
-
} else if(c !== "]") {
|
4657 |
-
this._state = IN_CDATA;
|
4658 |
-
}
|
4659 |
-
//else: stay in AFTER_CDATA_2 (`]]]>`)
|
4660 |
-
};
|
4661 |
-
|
4662 |
-
Tokenizer.prototype._stateBeforeSpecial = function(c){
|
4663 |
-
if(c === "c" || c === "C"){
|
4664 |
-
this._state = BEFORE_SCRIPT_1;
|
4665 |
-
} else if(c === "t" || c === "T"){
|
4666 |
-
this._state = BEFORE_STYLE_1;
|
4667 |
-
} else {
|
4668 |
-
this._state = IN_TAG_NAME;
|
4669 |
-
this._index--; //consume the token again
|
4670 |
-
}
|
4671 |
-
};
|
4672 |
-
|
4673 |
-
Tokenizer.prototype._stateBeforeSpecialEnd = function(c){
|
4674 |
-
if(this._special === SPECIAL_SCRIPT && (c === "c" || c === "C")){
|
4675 |
-
this._state = AFTER_SCRIPT_1;
|
4676 |
-
} else if(this._special === SPECIAL_STYLE && (c === "t" || c === "T")){
|
4677 |
-
this._state = AFTER_STYLE_1;
|
4678 |
-
}
|
4679 |
-
else this._state = TEXT;
|
4680 |
-
};
|
4681 |
-
|
4682 |
-
Tokenizer.prototype._stateBeforeScript1 = consumeSpecialNameChar("R", BEFORE_SCRIPT_2);
|
4683 |
-
Tokenizer.prototype._stateBeforeScript2 = consumeSpecialNameChar("I", BEFORE_SCRIPT_3);
|
4684 |
-
Tokenizer.prototype._stateBeforeScript3 = consumeSpecialNameChar("P", BEFORE_SCRIPT_4);
|
4685 |
-
Tokenizer.prototype._stateBeforeScript4 = consumeSpecialNameChar("T", BEFORE_SCRIPT_5);
|
4686 |
-
|
4687 |
-
Tokenizer.prototype._stateBeforeScript5 = function(c){
|
4688 |
-
if(c === "/" || c === ">" || whitespace(c)){
|
4689 |
-
this._special = SPECIAL_SCRIPT;
|
4690 |
-
}
|
4691 |
-
this._state = IN_TAG_NAME;
|
4692 |
-
this._index--; //consume the token again
|
4693 |
-
};
|
4694 |
-
|
4695 |
-
Tokenizer.prototype._stateAfterScript1 = ifElseState("R", AFTER_SCRIPT_2, TEXT);
|
4696 |
-
Tokenizer.prototype._stateAfterScript2 = ifElseState("I", AFTER_SCRIPT_3, TEXT);
|
4697 |
-
Tokenizer.prototype._stateAfterScript3 = ifElseState("P", AFTER_SCRIPT_4, TEXT);
|
4698 |
-
Tokenizer.prototype._stateAfterScript4 = ifElseState("T", AFTER_SCRIPT_5, TEXT);
|
4699 |
-
|
4700 |
-
Tokenizer.prototype._stateAfterScript5 = function(c){
|
4701 |
-
if(c === ">" || whitespace(c)){
|
4702 |
-
this._special = SPECIAL_NONE;
|
4703 |
-
this._state = IN_CLOSING_TAG_NAME;
|
4704 |
-
this._sectionStart = this._index - 6;
|
4705 |
-
this._index--; //reconsume the token
|
4706 |
-
}
|
4707 |
-
else this._state = TEXT;
|
4708 |
-
};
|
4709 |
-
|
4710 |
-
Tokenizer.prototype._stateBeforeStyle1 = consumeSpecialNameChar("Y", BEFORE_STYLE_2);
|
4711 |
-
Tokenizer.prototype._stateBeforeStyle2 = consumeSpecialNameChar("L", BEFORE_STYLE_3);
|
4712 |
-
Tokenizer.prototype._stateBeforeStyle3 = consumeSpecialNameChar("E", BEFORE_STYLE_4);
|
4713 |
-
|
4714 |
-
Tokenizer.prototype._stateBeforeStyle4 = function(c){
|
4715 |
-
if(c === "/" || c === ">" || whitespace(c)){
|
4716 |
-
this._special = SPECIAL_STYLE;
|
4717 |
-
}
|
4718 |
-
this._state = IN_TAG_NAME;
|
4719 |
-
this._index--; //consume the token again
|
4720 |
-
};
|
4721 |
-
|
4722 |
-
Tokenizer.prototype._stateAfterStyle1 = ifElseState("Y", AFTER_STYLE_2, TEXT);
|
4723 |
-
Tokenizer.prototype._stateAfterStyle2 = ifElseState("L", AFTER_STYLE_3, TEXT);
|
4724 |
-
Tokenizer.prototype._stateAfterStyle3 = ifElseState("E", AFTER_STYLE_4, TEXT);
|
4725 |
-
|
4726 |
-
Tokenizer.prototype._stateAfterStyle4 = function(c){
|
4727 |
-
if(c === ">" || whitespace(c)){
|
4728 |
-
this._special = SPECIAL_NONE;
|
4729 |
-
this._state = IN_CLOSING_TAG_NAME;
|
4730 |
-
this._sectionStart = this._index - 5;
|
4731 |
-
this._index--; //reconsume the token
|
4732 |
-
}
|
4733 |
-
else this._state = TEXT;
|
4734 |
-
};
|
4735 |
-
|
4736 |
-
Tokenizer.prototype._stateBeforeEntity = ifElseState("#", BEFORE_NUMERIC_ENTITY, IN_NAMED_ENTITY);
|
4737 |
-
Tokenizer.prototype._stateBeforeNumericEntity = ifElseState("X", IN_HEX_ENTITY, IN_NUMERIC_ENTITY);
|
4738 |
-
|
4739 |
-
//for entities terminated with a semicolon
|
4740 |
-
Tokenizer.prototype._parseNamedEntityStrict = function(){
|
4741 |
-
//offset = 1
|
4742 |
-
if(this._sectionStart + 1 < this._index){
|
4743 |
-
var entity = this._buffer.substring(this._sectionStart + 1, this._index),
|
4744 |
-
map = this._xmlMode ? xmlMap : entityMap;
|
4745 |
-
|
4746 |
-
if(map.hasOwnProperty(entity)){
|
4747 |
-
this._emitPartial(map[entity]);
|
4748 |
-
this._sectionStart = this._index + 1;
|
4749 |
-
}
|
4750 |
-
}
|
4751 |
-
};
|
4752 |
-
|
4753 |
-
|
4754 |
-
//parses legacy entities (without trailing semicolon)
|
4755 |
-
Tokenizer.prototype._parseLegacyEntity = function(){
|
4756 |
-
var start = this._sectionStart + 1,
|
4757 |
-
limit = this._index - start;
|
4758 |
-
|
4759 |
-
if(limit > 6) limit = 6; //the max length of legacy entities is 6
|
4760 |
-
|
4761 |
-
while(limit >= 2){ //the min length of legacy entities is 2
|
4762 |
-
var entity = this._buffer.substr(start, limit);
|
4763 |
-
|
4764 |
-
if(legacyMap.hasOwnProperty(entity)){
|
4765 |
-
this._emitPartial(legacyMap[entity]);
|
4766 |
-
this._sectionStart += limit + 1;
|
4767 |
-
return;
|
4768 |
-
} else {
|
4769 |
-
limit--;
|
4770 |
-
}
|
4771 |
-
}
|
4772 |
-
};
|
4773 |
-
|
4774 |
-
Tokenizer.prototype._stateInNamedEntity = function(c){
|
4775 |
-
if(c === ";"){
|
4776 |
-
this._parseNamedEntityStrict();
|
4777 |
-
if(this._sectionStart + 1 < this._index && !this._xmlMode){
|
4778 |
-
this._parseLegacyEntity();
|
4779 |
-
}
|
4780 |
-
this._state = this._baseState;
|
4781 |
-
} else if((c < "a" || c > "z") && (c < "A" || c > "Z") && (c < "0" || c > "9")){
|
4782 |
-
if(this._xmlMode);
|
4783 |
-
else if(this._sectionStart + 1 === this._index);
|
4784 |
-
else if(this._baseState !== TEXT){
|
4785 |
-
if(c !== "="){
|
4786 |
-
this._parseNamedEntityStrict();
|
4787 |
-
}
|
4788 |
-
} else {
|
4789 |
-
this._parseLegacyEntity();
|
4790 |
-
}
|
4791 |
-
|
4792 |
-
this._state = this._baseState;
|
4793 |
-
this._index--;
|
4794 |
-
}
|
4795 |
-
};
|
4796 |
-
|
4797 |
-
Tokenizer.prototype._decodeNumericEntity = function(offset, base){
|
4798 |
-
var sectionStart = this._sectionStart + offset;
|
4799 |
-
|
4800 |
-
if(sectionStart !== this._index){
|
4801 |
-
//parse entity
|
4802 |
-
var entity = this._buffer.substring(sectionStart, this._index);
|
4803 |
-
var parsed = parseInt(entity, base);
|
4804 |
-
|
4805 |
-
this._emitPartial(decodeCodePoint(parsed));
|
4806 |
-
this._sectionStart = this._index;
|
4807 |
-
} else {
|
4808 |
-
this._sectionStart--;
|
4809 |
-
}
|
4810 |
-
|
4811 |
-
this._state = this._baseState;
|
4812 |
-
};
|
4813 |
-
|
4814 |
-
Tokenizer.prototype._stateInNumericEntity = function(c){
|
4815 |
-
if(c === ";"){
|
4816 |
-
this._decodeNumericEntity(2, 10);
|
4817 |
-
this._sectionStart++;
|
4818 |
-
} else if(c < "0" || c > "9"){
|
4819 |
-
if(!this._xmlMode){
|
4820 |
-
this._decodeNumericEntity(2, 10);
|
4821 |
-
} else {
|
4822 |
-
this._state = this._baseState;
|
4823 |
-
}
|
4824 |
-
this._index--;
|
4825 |
-
}
|
4826 |
-
};
|
4827 |
-
|
4828 |
-
Tokenizer.prototype._stateInHexEntity = function(c){
|
4829 |
-
if(c === ";"){
|
4830 |
-
this._decodeNumericEntity(3, 16);
|
4831 |
-
this._sectionStart++;
|
4832 |
-
} else if((c < "a" || c > "f") && (c < "A" || c > "F") && (c < "0" || c > "9")){
|
4833 |
-
if(!this._xmlMode){
|
4834 |
-
this._decodeNumericEntity(3, 16);
|
4835 |
-
} else {
|
4836 |
-
this._state = this._baseState;
|
4837 |
-
}
|
4838 |
-
this._index--;
|
4839 |
-
}
|
4840 |
-
};
|
4841 |
-
|
4842 |
-
Tokenizer.prototype._cleanup = function (){
|
4843 |
-
if(this._sectionStart < 0){
|
4844 |
-
this._buffer = "";
|
4845 |
-
this._bufferOffset += this._index;
|
4846 |
-
this._index = 0;
|
4847 |
-
} else if(this._running){
|
4848 |
-
if(this._state === TEXT){
|
4849 |
-
if(this._sectionStart !== this._index){
|
4850 |
-
this._cbs.ontext(this._buffer.substr(this._sectionStart));
|
4851 |
-
}
|
4852 |
-
this._buffer = "";
|
4853 |
-
this._bufferOffset += this._index;
|
4854 |
-
this._index = 0;
|
4855 |
-
} else if(this._sectionStart === this._index){
|
4856 |
-
//the section just started
|
4857 |
-
this._buffer = "";
|
4858 |
-
this._bufferOffset += this._index;
|
4859 |
-
this._index = 0;
|
4860 |
-
} else {
|
4861 |
-
//remove everything unnecessary
|
4862 |
-
this._buffer = this._buffer.substr(this._sectionStart);
|
4863 |
-
this._index -= this._sectionStart;
|
4864 |
-
this._bufferOffset += this._sectionStart;
|
4865 |
-
}
|
4866 |
-
|
4867 |
-
this._sectionStart = 0;
|
4868 |
-
}
|
4869 |
-
};
|
4870 |
-
|
4871 |
-
//TODO make events conditional
|
4872 |
-
Tokenizer.prototype.write = function(chunk){
|
4873 |
-
if(this._ended) this._cbs.onerror(Error(".write() after done!"));
|
4874 |
-
|
4875 |
-
this._buffer += chunk;
|
4876 |
-
this._parse();
|
4877 |
-
};
|
4878 |
-
|
4879 |
-
Tokenizer.prototype._parse = function(){
|
4880 |
-
while(this._index < this._buffer.length && this._running){
|
4881 |
-
var c = this._buffer.charAt(this._index);
|
4882 |
-
if(this._state === TEXT) {
|
4883 |
-
this._stateText(c);
|
4884 |
-
} else if(this._state === BEFORE_TAG_NAME){
|
4885 |
-
this._stateBeforeTagName(c);
|
4886 |
-
} else if(this._state === IN_TAG_NAME) {
|
4887 |
-
this._stateInTagName(c);
|
4888 |
-
} else if(this._state === BEFORE_CLOSING_TAG_NAME){
|
4889 |
-
this._stateBeforeCloseingTagName(c);
|
4890 |
-
} else if(this._state === IN_CLOSING_TAG_NAME){
|
4891 |
-
this._stateInCloseingTagName(c);
|
4892 |
-
} else if(this._state === AFTER_CLOSING_TAG_NAME){
|
4893 |
-
this._stateAfterCloseingTagName(c);
|
4894 |
-
} else if(this._state === IN_SELF_CLOSING_TAG){
|
4895 |
-
this._stateInSelfClosingTag(c);
|
4896 |
-
}
|
4897 |
-
|
4898 |
-
/*
|
4899 |
-
* attributes
|
4900 |
-
*/
|
4901 |
-
else if(this._state === BEFORE_ATTRIBUTE_NAME){
|
4902 |
-
this._stateBeforeAttributeName(c);
|
4903 |
-
} else if(this._state === IN_ATTRIBUTE_NAME){
|
4904 |
-
this._stateInAttributeName(c);
|
4905 |
-
} else if(this._state === AFTER_ATTRIBUTE_NAME){
|
4906 |
-
this._stateAfterAttributeName(c);
|
4907 |
-
} else if(this._state === BEFORE_ATTRIBUTE_VALUE){
|
4908 |
-
this._stateBeforeAttributeValue(c);
|
4909 |
-
} else if(this._state === IN_ATTRIBUTE_VALUE_DQ){
|
4910 |
-
this._stateInAttributeValueDoubleQuotes(c);
|
4911 |
-
} else if(this._state === IN_ATTRIBUTE_VALUE_SQ){
|
4912 |
-
this._stateInAttributeValueSingleQuotes(c);
|
4913 |
-
} else if(this._state === IN_ATTRIBUTE_VALUE_NQ){
|
4914 |
-
this._stateInAttributeValueNoQuotes(c);
|
4915 |
-
}
|
4916 |
-
|
4917 |
-
/*
|
4918 |
-
* declarations
|
4919 |
-
*/
|
4920 |
-
else if(this._state === BEFORE_DECLARATION){
|
4921 |
-
this._stateBeforeDeclaration(c);
|
4922 |
-
} else if(this._state === IN_DECLARATION){
|
4923 |
-
this._stateInDeclaration(c);
|
4924 |
-
}
|
4925 |
-
|
4926 |
-
/*
|
4927 |
-
* processing instructions
|
4928 |
-
*/
|
4929 |
-
else if(this._state === IN_PROCESSING_INSTRUCTION){
|
4930 |
-
this._stateInProcessingInstruction(c);
|
4931 |
-
}
|
4932 |
-
|
4933 |
-
/*
|
4934 |
-
* comments
|
4935 |
-
*/
|
4936 |
-
else if(this._state === BEFORE_COMMENT){
|
4937 |
-
this._stateBeforeComment(c);
|
4938 |
-
} else if(this._state === IN_COMMENT){
|
4939 |
-
this._stateInComment(c);
|
4940 |
-
} else if(this._state === AFTER_COMMENT_1){
|
4941 |
-
this._stateAfterComment1(c);
|
4942 |
-
} else if(this._state === AFTER_COMMENT_2){
|
4943 |
-
this._stateAfterComment2(c);
|
4944 |
-
}
|
4945 |
-
|
4946 |
-
/*
|
4947 |
-
* cdata
|
4948 |
-
*/
|
4949 |
-
else if(this._state === BEFORE_CDATA_1){
|
4950 |
-
this._stateBeforeCdata1(c);
|
4951 |
-
} else if(this._state === BEFORE_CDATA_2){
|
4952 |
-
this._stateBeforeCdata2(c);
|
4953 |
-
} else if(this._state === BEFORE_CDATA_3){
|
4954 |
-
this._stateBeforeCdata3(c);
|
4955 |
-
} else if(this._state === BEFORE_CDATA_4){
|
4956 |
-
this._stateBeforeCdata4(c);
|
4957 |
-
} else if(this._state === BEFORE_CDATA_5){
|
4958 |
-
this._stateBeforeCdata5(c);
|
4959 |
-
} else if(this._state === BEFORE_CDATA_6){
|
4960 |
-
this._stateBeforeCdata6(c);
|
4961 |
-
} else if(this._state === IN_CDATA){
|
4962 |
-
this._stateInCdata(c);
|
4963 |
-
} else if(this._state === AFTER_CDATA_1){
|
4964 |
-
this._stateAfterCdata1(c);
|
4965 |
-
} else if(this._state === AFTER_CDATA_2){
|
4966 |
-
this._stateAfterCdata2(c);
|
4967 |
-
}
|
4968 |
-
|
4969 |
-
/*
|
4970 |
-
* special tags
|
4971 |
-
*/
|
4972 |
-
else if(this._state === BEFORE_SPECIAL){
|
4973 |
-
this._stateBeforeSpecial(c);
|
4974 |
-
} else if(this._state === BEFORE_SPECIAL_END){
|
4975 |
-
this._stateBeforeSpecialEnd(c);
|
4976 |
-
}
|
4977 |
-
|
4978 |
-
/*
|
4979 |
-
* script
|
4980 |
-
*/
|
4981 |
-
else if(this._state === BEFORE_SCRIPT_1){
|
4982 |
-
this._stateBeforeScript1(c);
|
4983 |
-
} else if(this._state === BEFORE_SCRIPT_2){
|
4984 |
-
this._stateBeforeScript2(c);
|
4985 |
-
} else if(this._state === BEFORE_SCRIPT_3){
|
4986 |
-
this._stateBeforeScript3(c);
|
4987 |
-
} else if(this._state === BEFORE_SCRIPT_4){
|
4988 |
-
this._stateBeforeScript4(c);
|
4989 |
-
} else if(this._state === BEFORE_SCRIPT_5){
|
4990 |
-
this._stateBeforeScript5(c);
|
4991 |
-
}
|
4992 |
-
|
4993 |
-
else if(this._state === AFTER_SCRIPT_1){
|
4994 |
-
this._stateAfterScript1(c);
|
4995 |
-
} else if(this._state === AFTER_SCRIPT_2){
|
4996 |
-
this._stateAfterScript2(c);
|
4997 |
-
} else if(this._state === AFTER_SCRIPT_3){
|
4998 |
-
this._stateAfterScript3(c);
|
4999 |
-
} else if(this._state === AFTER_SCRIPT_4){
|
5000 |
-
this._stateAfterScript4(c);
|
5001 |
-
} else if(this._state === AFTER_SCRIPT_5){
|
5002 |
-
this._stateAfterScript5(c);
|
5003 |
-
}
|
5004 |
-
|
5005 |
-
/*
|
5006 |
-
* style
|
5007 |
-
*/
|
5008 |
-
else if(this._state === BEFORE_STYLE_1){
|
5009 |
-
this._stateBeforeStyle1(c);
|
5010 |
-
} else if(this._state === BEFORE_STYLE_2){
|
5011 |
-
this._stateBeforeStyle2(c);
|
5012 |
-
} else if(this._state === BEFORE_STYLE_3){
|
5013 |
-
this._stateBeforeStyle3(c);
|
5014 |
-
} else if(this._state === BEFORE_STYLE_4){
|
5015 |
-
this._stateBeforeStyle4(c);
|
5016 |
-
}
|
5017 |
-
|
5018 |
-
else if(this._state === AFTER_STYLE_1){
|
5019 |
-
this._stateAfterStyle1(c);
|
5020 |
-
} else if(this._state === AFTER_STYLE_2){
|
5021 |
-
this._stateAfterStyle2(c);
|
5022 |
-
} else if(this._state === AFTER_STYLE_3){
|
5023 |
-
this._stateAfterStyle3(c);
|
5024 |
-
} else if(this._state === AFTER_STYLE_4){
|
5025 |
-
this._stateAfterStyle4(c);
|
5026 |
-
}
|
5027 |
-
|
5028 |
-
/*
|
5029 |
-
* entities
|
5030 |
-
*/
|
5031 |
-
else if(this._state === BEFORE_ENTITY){
|
5032 |
-
this._stateBeforeEntity(c);
|
5033 |
-
} else if(this._state === BEFORE_NUMERIC_ENTITY){
|
5034 |
-
this._stateBeforeNumericEntity(c);
|
5035 |
-
} else if(this._state === IN_NAMED_ENTITY){
|
5036 |
-
this._stateInNamedEntity(c);
|
5037 |
-
} else if(this._state === IN_NUMERIC_ENTITY){
|
5038 |
-
this._stateInNumericEntity(c);
|
5039 |
-
} else if(this._state === IN_HEX_ENTITY){
|
5040 |
-
this._stateInHexEntity(c);
|
5041 |
-
}
|
5042 |
-
|
5043 |
-
else {
|
5044 |
-
this._cbs.onerror(Error("unknown _state"), this._state);
|
5045 |
-
}
|
5046 |
-
|
5047 |
-
this._index++;
|
5048 |
-
}
|
5049 |
-
|
5050 |
-
this._cleanup();
|
5051 |
-
};
|
5052 |
-
|
5053 |
-
Tokenizer.prototype.pause = function(){
|
5054 |
-
this._running = false;
|
5055 |
-
};
|
5056 |
-
Tokenizer.prototype.resume = function(){
|
5057 |
-
this._running = true;
|
5058 |
-
|
5059 |
-
if(this._index < this._buffer.length){
|
5060 |
-
this._parse();
|
5061 |
-
}
|
5062 |
-
if(this._ended){
|
5063 |
-
this._finish();
|
5064 |
-
}
|
5065 |
-
};
|
5066 |
-
|
5067 |
-
Tokenizer.prototype.end = function(chunk){
|
5068 |
-
if(this._ended) this._cbs.onerror(Error(".end() after done!"));
|
5069 |
-
if(chunk) this.write(chunk);
|
5070 |
-
|
5071 |
-
this._ended = true;
|
5072 |
-
|
5073 |
-
if(this._running) this._finish();
|
5074 |
-
};
|
5075 |
-
|
5076 |
-
Tokenizer.prototype._finish = function(){
|
5077 |
-
//if there is remaining data, emit it in a reasonable way
|
5078 |
-
if(this._sectionStart < this._index){
|
5079 |
-
this._handleTrailingData();
|
5080 |
-
}
|
5081 |
-
|
5082 |
-
this._cbs.onend();
|
5083 |
-
};
|
5084 |
-
|
5085 |
-
Tokenizer.prototype._handleTrailingData = function(){
|
5086 |
-
var data = this._buffer.substr(this._sectionStart);
|
5087 |
-
|
5088 |
-
if(this._state === IN_CDATA || this._state === AFTER_CDATA_1 || this._state === AFTER_CDATA_2){
|
5089 |
-
this._cbs.oncdata(data);
|
5090 |
-
} else if(this._state === IN_COMMENT || this._state === AFTER_COMMENT_1 || this._state === AFTER_COMMENT_2){
|
5091 |
-
this._cbs.oncomment(data);
|
5092 |
-
} else if(this._state === IN_NAMED_ENTITY && !this._xmlMode){
|
5093 |
-
this._parseLegacyEntity();
|
5094 |
-
if(this._sectionStart < this._index){
|
5095 |
-
this._state = this._baseState;
|
5096 |
-
this._handleTrailingData();
|
5097 |
-
}
|
5098 |
-
} else if(this._state === IN_NUMERIC_ENTITY && !this._xmlMode){
|
5099 |
-
this._decodeNumericEntity(2, 10);
|
5100 |
-
if(this._sectionStart < this._index){
|
5101 |
-
this._state = this._baseState;
|
5102 |
-
this._handleTrailingData();
|
5103 |
-
}
|
5104 |
-
} else if(this._state === IN_HEX_ENTITY && !this._xmlMode){
|
5105 |
-
this._decodeNumericEntity(3, 16);
|
5106 |
-
if(this._sectionStart < this._index){
|
5107 |
-
this._state = this._baseState;
|
5108 |
-
this._handleTrailingData();
|
5109 |
-
}
|
5110 |
-
} else if(
|
5111 |
-
this._state !== IN_TAG_NAME &&
|
5112 |
-
this._state !== BEFORE_ATTRIBUTE_NAME &&
|
5113 |
-
this._state !== BEFORE_ATTRIBUTE_VALUE &&
|
5114 |
-
this._state !== AFTER_ATTRIBUTE_NAME &&
|
5115 |
-
this._state !== IN_ATTRIBUTE_NAME &&
|
5116 |
-
this._state !== IN_ATTRIBUTE_VALUE_SQ &&
|
5117 |
-
this._state !== IN_ATTRIBUTE_VALUE_DQ &&
|
5118 |
-
this._state !== IN_ATTRIBUTE_VALUE_NQ &&
|
5119 |
-
this._state !== IN_CLOSING_TAG_NAME
|
5120 |
-
){
|
5121 |
-
this._cbs.ontext(data);
|
5122 |
-
}
|
5123 |
-
//else, ignore remaining data
|
5124 |
-
//TODO add a way to remove current tag
|
5125 |
-
};
|
5126 |
-
|
5127 |
-
Tokenizer.prototype.reset = function(){
|
5128 |
-
Tokenizer.call(this, {xmlMode: this._xmlMode, decodeEntities: this._decodeEntities}, this._cbs);
|
5129 |
-
};
|
5130 |
-
|
5131 |
-
Tokenizer.prototype.getAbsoluteIndex = function(){
|
5132 |
-
return this._bufferOffset + this._index;
|
5133 |
-
};
|
5134 |
-
|
5135 |
-
Tokenizer.prototype._getSection = function(){
|
5136 |
-
return this._buffer.substring(this._sectionStart, this._index);
|
5137 |
-
};
|
5138 |
-
|
5139 |
-
Tokenizer.prototype._emitToken = function(name){
|
5140 |
-
this._cbs[name](this._getSection());
|
5141 |
-
this._sectionStart = -1;
|
5142 |
-
};
|
5143 |
-
|
5144 |
-
Tokenizer.prototype._emitPartial = function(value){
|
5145 |
-
if(this._baseState !== TEXT){
|
5146 |
-
this._cbs.onattribdata(value); //TODO implement the new event
|
5147 |
-
} else {
|
5148 |
-
this._cbs.ontext(value);
|
5149 |
-
}
|
5150 |
-
};
|
5151 |
-
|
5152 |
-
|
5153 |
-
/***/ }),
|
5154 |
-
/* 260 */
|
5155 |
-
/***/ (function(module, exports, __webpack_require__) {
|
5156 |
-
|
5157 |
-
var decodeMap = __webpack_require__(419);
|
5158 |
-
|
5159 |
-
module.exports = decodeCodePoint;
|
5160 |
-
|
5161 |
-
// modified version of https://github.com/mathiasbynens/he/blob/master/src/he.js#L94-L119
|
5162 |
-
function decodeCodePoint(codePoint){
|
5163 |
-
|
5164 |
-
if((codePoint >= 0xD800 && codePoint <= 0xDFFF) || codePoint > 0x10FFFF){
|
5165 |
-
return "\uFFFD";
|
5166 |
-
}
|
5167 |
-
|
5168 |
-
if(codePoint in decodeMap){
|
5169 |
-
codePoint = decodeMap[codePoint];
|
5170 |
-
}
|
5171 |
-
|
5172 |
-
var output = "";
|
5173 |
-
|
5174 |
-
if(codePoint > 0xFFFF){
|
5175 |
-
codePoint -= 0x10000;
|
5176 |
-
output += String.fromCharCode(codePoint >>> 10 & 0x3FF | 0xD800);
|
5177 |
-
codePoint = 0xDC00 | codePoint & 0x3FF;
|
5178 |
-
}
|
5179 |
-
|
5180 |
-
output += String.fromCharCode(codePoint);
|
5181 |
-
return output;
|
5182 |
-
}
|
5183 |
-
|
5184 |
-
|
5185 |
-
/***/ }),
|
5186 |
-
/* 261 */
|
5187 |
-
/***/ (function(module, exports) {
|
5188 |
-
|
5189 |
-
module.exports = {"Aacute":"Á","aacute":"á","Acirc":"Â","acirc":"â","acute":"´","AElig":"Æ","aelig":"æ","Agrave":"À","agrave":"à","amp":"&","AMP":"&","Aring":"Å","aring":"å","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","brvbar":"¦","Ccedil":"Ç","ccedil":"ç","cedil":"¸","cent":"¢","copy":"©","COPY":"©","curren":"¤","deg":"°","divide":"÷","Eacute":"É","eacute":"é","Ecirc":"Ê","ecirc":"ê","Egrave":"È","egrave":"è","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","frac12":"½","frac14":"¼","frac34":"¾","gt":">","GT":">","Iacute":"Í","iacute":"í","Icirc":"Î","icirc":"î","iexcl":"¡","Igrave":"Ì","igrave":"ì","iquest":"¿","Iuml":"Ï","iuml":"ï","laquo":"«","lt":"<","LT":"<","macr":"¯","micro":"µ","middot":"·","nbsp":" ","not":"¬","Ntilde":"Ñ","ntilde":"ñ","Oacute":"Ó","oacute":"ó","Ocirc":"Ô","ocirc":"ô","Ograve":"Ò","ograve":"ò","ordf":"ª","ordm":"º","Oslash":"Ø","oslash":"ø","Otilde":"Õ","otilde":"õ","Ouml":"Ö","ouml":"ö","para":"¶","plusmn":"±","pound":"£","quot":"\"","QUOT":"\"","raquo":"»","reg":"®","REG":"®","sect":"§","shy":"","sup1":"¹","sup2":"²","sup3":"³","szlig":"ß","THORN":"Þ","thorn":"þ","times":"×","Uacute":"Ú","uacute":"ú","Ucirc":"Û","ucirc":"û","Ugrave":"Ù","ugrave":"ù","uml":"¨","Uuml":"Ü","uuml":"ü","Yacute":"Ý","yacute":"ý","yen":"¥","yuml":"ÿ"}
|
5190 |
-
|
5191 |
-
/***/ }),
|
5192 |
-
/* 262 */
|
5193 |
-
/***/ (function(module, exports) {
|
5194 |
-
|
5195 |
-
// This object will be used as the prototype for Nodes when creating a
|
5196 |
-
// DOM-Level-1-compliant structure.
|
5197 |
-
var NodePrototype = module.exports = {
|
5198 |
-
get firstChild() {
|
5199 |
-
var children = this.children;
|
5200 |
-
return children && children[0] || null;
|
5201 |
-
},
|
5202 |
-
get lastChild() {
|
5203 |
-
var children = this.children;
|
5204 |
-
return children && children[children.length - 1] || null;
|
5205 |
-
},
|
5206 |
-
get nodeType() {
|
5207 |
-
return nodeTypes[this.type] || nodeTypes.element;
|
5208 |
-
}
|
5209 |
-
};
|
5210 |
-
|
5211 |
-
var domLvl1 = {
|
5212 |
-
tagName: "name",
|
5213 |
-
childNodes: "children",
|
5214 |
-
parentNode: "parent",
|
5215 |
-
previousSibling: "prev",
|
5216 |
-
nextSibling: "next",
|
5217 |
-
nodeValue: "data"
|
5218 |
-
};
|
5219 |
-
|
5220 |
-
var nodeTypes = {
|
5221 |
-
element: 1,
|
5222 |
-
text: 3,
|
5223 |
-
cdata: 4,
|
5224 |
-
comment: 8
|
5225 |
-
};
|
5226 |
-
|
5227 |
-
Object.keys(domLvl1).forEach(function(key) {
|
5228 |
-
var shorthand = domLvl1[key];
|
5229 |
-
Object.defineProperty(NodePrototype, key, {
|
5230 |
-
get: function() {
|
5231 |
-
return this[shorthand] || null;
|
5232 |
-
},
|
5233 |
-
set: function(val) {
|
5234 |
-
this[shorthand] = val;
|
5235 |
-
return val;
|
5236 |
-
}
|
5237 |
-
});
|
5238 |
-
});
|
5239 |
-
|
5240 |
-
|
5241 |
-
/***/ }),
|
5242 |
-
/* 263 */
|
5243 |
-
/***/ (function(module, exports, __webpack_require__) {
|
5244 |
-
|
5245 |
-
module.exports = Stream;
|
5246 |
-
|
5247 |
-
var Parser = __webpack_require__(258),
|
5248 |
-
WritableStream = __webpack_require__(424).Writable || __webpack_require__(436).Writable,
|
5249 |
-
StringDecoder = __webpack_require__(91).StringDecoder,
|
5250 |
-
Buffer = __webpack_require__(89).Buffer;
|
5251 |
-
|
5252 |
-
function Stream(cbs, options){
|
5253 |
-
var parser = this._parser = new Parser(cbs, options);
|
5254 |
-
var decoder = this._decoder = new StringDecoder();
|
5255 |
-
|
5256 |
-
WritableStream.call(this, {decodeStrings: false});
|
5257 |
-
|
5258 |
-
this.once("finish", function(){
|
5259 |
-
parser.end(decoder.end());
|
5260 |
-
});
|
5261 |
-
}
|
5262 |
-
|
5263 |
-
__webpack_require__(22)(Stream, WritableStream);
|
5264 |
-
|
5265 |
-
WritableStream.prototype._write = function(chunk, encoding, cb){
|
5266 |
-
if(chunk instanceof Buffer) chunk = this._decoder.write(chunk);
|
5267 |
-
this._parser.write(chunk);
|
5268 |
-
cb();
|
5269 |
-
};
|
5270 |
-
|
5271 |
-
/***/ }),
|
5272 |
-
/* 264 */
|
5273 |
-
/***/ (function(module, exports, __webpack_require__) {
|
5274 |
-
|
5275 |
-
"use strict";
|
5276 |
-
/* WEBPACK VAR INJECTION */(function(global, process) {// Copyright Joyent, Inc. and other Node contributors.
|
5277 |
-
//
|
5278 |
-
// Permission is hereby granted, free of charge, to any person obtaining a
|
5279 |
-
// copy of this software and associated documentation files (the
|
5280 |
-
// "Software"), to deal in the Software without restriction, including
|
5281 |
-
// without limitation the rights to use, copy, modify, merge, publish,
|
5282 |
-
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
5283 |
-
// persons to whom the Software is furnished to do so, subject to the
|
5284 |
-
// following conditions:
|
5285 |
-
//
|
5286 |
-
// The above copyright notice and this permission notice shall be included
|
5287 |
-
// in all copies or substantial portions of the Software.
|
5288 |
-
//
|
5289 |
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
5290 |
-
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
5291 |
-
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
5292 |
-
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
5293 |
-
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
5294 |
-
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
5295 |
-
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
5296 |
-
|
5297 |
-
|
5298 |
-
|
5299 |
-
/*<replacement>*/
|
5300 |
-
|
5301 |
-
var processNextTick = __webpack_require__(56);
|
5302 |
-
/*</replacement>*/
|
5303 |
-
|
5304 |
-
module.exports = Readable;
|
5305 |
-
|
5306 |
-
/*<replacement>*/
|
5307 |
-
var isArray = __webpack_require__(265);
|
5308 |
-
/*</replacement>*/
|
5309 |
-
|
5310 |
-
/*<replacement>*/
|
5311 |
-
var Duplex;
|
5312 |
-
/*</replacement>*/
|
5313 |
-
|
5314 |
-
Readable.ReadableState = ReadableState;
|
5315 |
-
|
5316 |
-
/*<replacement>*/
|
5317 |
-
var EE = __webpack_require__(55).EventEmitter;
|
5318 |
-
|
5319 |
-
var EElistenerCount = function (emitter, type) {
|
5320 |
-
return emitter.listeners(type).length;
|
5321 |
-
};
|
5322 |
-
/*</replacement>*/
|
5323 |
-
|
5324 |
-
/*<replacement>*/
|
5325 |
-
var Stream = __webpack_require__(266);
|
5326 |
-
/*</replacement>*/
|
5327 |
-
|
5328 |
-
// TODO(bmeurer): Change this back to const once hole checks are
|
5329 |
-
// properly optimized away early in Ignition+TurboFan.
|
5330 |
-
/*<replacement>*/
|
5331 |
-
var Buffer = __webpack_require__(57).Buffer;
|
5332 |
-
var OurUint8Array = global.Uint8Array || function () {};
|
5333 |
-
function _uint8ArrayToBuffer(chunk) {
|
5334 |
-
return Buffer.from(chunk);
|
5335 |
-
}
|
5336 |
-
function _isUint8Array(obj) {
|
5337 |
-
return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
|
5338 |
-
}
|
5339 |
-
/*</replacement>*/
|
5340 |
-
|
5341 |
-
/*<replacement>*/
|
5342 |
-
var util = __webpack_require__(46);
|
5343 |
-
util.inherits = __webpack_require__(22);
|
5344 |
-
/*</replacement>*/
|
5345 |
-
|
5346 |
-
/*<replacement>*/
|
5347 |
-
var debugUtil = __webpack_require__(427);
|
5348 |
-
var debug = void 0;
|
5349 |
-
if (debugUtil && debugUtil.debuglog) {
|
5350 |
-
debug = debugUtil.debuglog('stream');
|
5351 |
-
} else {
|
5352 |
-
debug = function () {};
|
5353 |
-
}
|
5354 |
-
/*</replacement>*/
|
5355 |
-
|
5356 |
-
var BufferList = __webpack_require__(428);
|
5357 |
-
var destroyImpl = __webpack_require__(267);
|
5358 |
-
var StringDecoder;
|
5359 |
-
|
5360 |
-
util.inherits(Readable, Stream);
|
5361 |
-
|
5362 |
-
var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
|
5363 |
-
|
5364 |
-
function prependListener(emitter, event, fn) {
|
5365 |
-
// Sadly this is not cacheable as some libraries bundle their own
|
5366 |
-
// event emitter implementation with them.
|
5367 |
-
if (typeof emitter.prependListener === 'function') {
|
5368 |
-
return emitter.prependListener(event, fn);
|
5369 |
-
} else {
|
5370 |
-
// This is a hack to make sure that our error handler is attached before any
|
5371 |
-
// userland ones. NEVER DO THIS. This is here only because this code needs
|
5372 |
-
// to continue to work with older versions of Node.js that do not include
|
5373 |
-
// the prependListener() method. The goal is to eventually remove this hack.
|
5374 |
-
if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
|
5375 |
-
}
|
5376 |
-
}
|
5377 |
-
|
5378 |
-
function ReadableState(options, stream) {
|
5379 |
-
Duplex = Duplex || __webpack_require__(32);
|
5380 |
-
|
5381 |
-
options = options || {};
|
5382 |
-
|
5383 |
-
// object stream flag. Used to make read(n) ignore n and to
|
5384 |
-
// make all the buffer merging and length checks go away
|
5385 |
-
this.objectMode = !!options.objectMode;
|
5386 |
-
|
5387 |
-
if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
|
5388 |
-
|
5389 |
-
// the point at which it stops calling _read() to fill the buffer
|
5390 |
-
// Note: 0 is a valid value, means "don't call _read preemptively ever"
|
5391 |
-
var hwm = options.highWaterMark;
|
5392 |
-
var defaultHwm = this.objectMode ? 16 : 16 * 1024;
|
5393 |
-
this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;
|
5394 |
-
|
5395 |
-
// cast to ints.
|
5396 |
-
this.highWaterMark = Math.floor(this.highWaterMark);
|
5397 |
-
|
5398 |
-
// A linked list is used to store data chunks instead of an array because the
|
5399 |
-
// linked list can remove elements from the beginning faster than
|
5400 |
-
// array.shift()
|
5401 |
-
this.buffer = new BufferList();
|
5402 |
-
this.length = 0;
|
5403 |
-
this.pipes = null;
|
5404 |
-
this.pipesCount = 0;
|
5405 |
-
this.flowing = null;
|
5406 |
-
this.ended = false;
|
5407 |
-
this.endEmitted = false;
|
5408 |
-
this.reading = false;
|
5409 |
-
|
5410 |
-
// a flag to be able to tell if the event 'readable'/'data' is emitted
|
5411 |
-
// immediately, or on a later tick. We set this to true at first, because
|
5412 |
-
// any actions that shouldn't happen until "later" should generally also
|
5413 |
-
// not happen before the first read call.
|
5414 |
-
this.sync = true;
|
5415 |
-
|
5416 |
-
// whenever we return null, then we set a flag to say
|
5417 |
-
// that we're awaiting a 'readable' event emission.
|
5418 |
-
this.needReadable = false;
|
5419 |
-
this.emittedReadable = false;
|
5420 |
-
this.readableListening = false;
|
5421 |
-
this.resumeScheduled = false;
|
5422 |
-
|
5423 |
-
// has it been destroyed
|
5424 |
-
this.destroyed = false;
|
5425 |
-
|
5426 |
-
// Crypto is kind of old and crusty. Historically, its default string
|
5427 |
-
// encoding is 'binary' so we have to make this configurable.
|
5428 |
-
// Everything else in the universe uses 'utf8', though.
|
5429 |
-
this.defaultEncoding = options.defaultEncoding || 'utf8';
|
5430 |
-
|
5431 |
-
// the number of writers that are awaiting a drain event in .pipe()s
|
5432 |
-
this.awaitDrain = 0;
|
5433 |
-
|
5434 |
-
// if true, a maybeReadMore has been scheduled
|
5435 |
-
this.readingMore = false;
|
5436 |
-
|
5437 |
-
this.decoder = null;
|
5438 |
-
this.encoding = null;
|
5439 |
-
if (options.encoding) {
|
5440 |
-
if (!StringDecoder) StringDecoder = __webpack_require__(91).StringDecoder;
|
5441 |
-
this.decoder = new StringDecoder(options.encoding);
|
5442 |
-
this.encoding = options.encoding;
|
5443 |
-
}
|
5444 |
-
}
|
5445 |
-
|
5446 |
-
function Readable(options) {
|
5447 |
-
Duplex = Duplex || __webpack_require__(32);
|
5448 |
-
|
5449 |
-
if (!(this instanceof Readable)) return new Readable(options);
|
5450 |
-
|
5451 |
-
this._readableState = new ReadableState(options, this);
|
5452 |
-
|
5453 |
-
// legacy
|
5454 |
-
this.readable = true;
|
5455 |
-
|
5456 |
-
if (options) {
|
5457 |
-
if (typeof options.read === 'function') this._read = options.read;
|
5458 |
-
|
5459 |
-
if (typeof options.destroy === 'function') this._destroy = options.destroy;
|
5460 |
-
}
|
5461 |
-
|
5462 |
-
Stream.call(this);
|
5463 |
-
}
|
5464 |
-
|
5465 |
-
Object.defineProperty(Readable.prototype, 'destroyed', {
|
5466 |
-
get: function () {
|
5467 |
-
if (this._readableState === undefined) {
|
5468 |
-
return false;
|
5469 |
-
}
|
5470 |
-
return this._readableState.destroyed;
|
5471 |
-
},
|
5472 |
-
set: function (value) {
|
5473 |
-
// we ignore the value if the stream
|
5474 |
-
// has not been initialized yet
|
5475 |
-
if (!this._readableState) {
|
5476 |
-
return;
|
5477 |
-
}
|
5478 |
-
|
5479 |
-
// backward compatibility, the user is explicitly
|
5480 |
-
// managing destroyed
|
5481 |
-
this._readableState.destroyed = value;
|
5482 |
-
}
|
5483 |
-
});
|
5484 |
-
|
5485 |
-
Readable.prototype.destroy = destroyImpl.destroy;
|
5486 |
-
Readable.prototype._undestroy = destroyImpl.undestroy;
|
5487 |
-
Readable.prototype._destroy = function (err, cb) {
|
5488 |
-
this.push(null);
|
5489 |
-
cb(err);
|
5490 |
-
};
|
5491 |
-
|
5492 |
-
// Manually shove something into the read() buffer.
|
5493 |
-
// This returns true if the highWaterMark has not been hit yet,
|
5494 |
-
// similar to how Writable.write() returns true if you should
|
5495 |
-
// write() some more.
|
5496 |
-
Readable.prototype.push = function (chunk, encoding) {
|
5497 |
-
var state = this._readableState;
|
5498 |
-
var skipChunkCheck;
|
5499 |
-
|
5500 |
-
if (!state.objectMode) {
|
5501 |
-
if (typeof chunk === 'string') {
|
5502 |
-
encoding = encoding || state.defaultEncoding;
|
5503 |
-
if (encoding !== state.encoding) {
|
5504 |
-
chunk = Buffer.from(chunk, encoding);
|
5505 |
-
encoding = '';
|
5506 |
-
}
|
5507 |
-
skipChunkCheck = true;
|
5508 |
-
}
|
5509 |
-
} else {
|
5510 |
-
skipChunkCheck = true;
|
5511 |
-
}
|
5512 |
-
|
5513 |
-
return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
|
5514 |
-
};
|
5515 |
-
|
5516 |
-
// Unshift should *always* be something directly out of read()
|
5517 |
-
Readable.prototype.unshift = function (chunk) {
|
5518 |
-
return readableAddChunk(this, chunk, null, true, false);
|
5519 |
-
};
|
5520 |
-
|
5521 |
-
function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
|
5522 |
-
var state = stream._readableState;
|
5523 |
-
if (chunk === null) {
|
5524 |
-
state.reading = false;
|
5525 |
-
onEofChunk(stream, state);
|
5526 |
-
} else {
|
5527 |
-
var er;
|
5528 |
-
if (!skipChunkCheck) er = chunkInvalid(state, chunk);
|
5529 |
-
if (er) {
|
5530 |
-
stream.emit('error', er);
|
5531 |
-
} else if (state.objectMode || chunk && chunk.length > 0) {
|
5532 |
-
if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
|
5533 |
-
chunk = _uint8ArrayToBuffer(chunk);
|
5534 |
-
}
|
5535 |
-
|
5536 |
-
if (addToFront) {
|
5537 |
-
if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);
|
5538 |
-
} else if (state.ended) {
|
5539 |
-
stream.emit('error', new Error('stream.push() after EOF'));
|
5540 |
-
} else {
|
5541 |
-
state.reading = false;
|
5542 |
-
if (state.decoder && !encoding) {
|
5543 |
-
chunk = state.decoder.write(chunk);
|
5544 |
-
if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
|
5545 |
-
} else {
|
5546 |
-
addChunk(stream, state, chunk, false);
|
5547 |
-
}
|
5548 |
-
}
|
5549 |
-
} else if (!addToFront) {
|
5550 |
-
state.reading = false;
|
5551 |
-
}
|
5552 |
-
}
|
5553 |
-
|
5554 |
-
return needMoreData(state);
|
5555 |
-
}
|
5556 |
-
|
5557 |
-
function addChunk(stream, state, chunk, addToFront) {
|
5558 |
-
if (state.flowing && state.length === 0 && !state.sync) {
|
5559 |
-
stream.emit('data', chunk);
|
5560 |
-
stream.read(0);
|
5561 |
-
} else {
|
5562 |
-
// update the buffer info.
|
5563 |
-
state.length += state.objectMode ? 1 : chunk.length;
|
5564 |
-
if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
|
5565 |
-
|
5566 |
-
if (state.needReadable) emitReadable(stream);
|
5567 |
-
}
|
5568 |
-
maybeReadMore(stream, state);
|
5569 |
-
}
|
5570 |
-
|
5571 |
-
function chunkInvalid(state, chunk) {
|
5572 |
-
var er;
|
5573 |
-
if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
|
5574 |
-
er = new TypeError('Invalid non-string/buffer chunk');
|
5575 |
-
}
|
5576 |
-
return er;
|
5577 |
-
}
|
5578 |
-
|
5579 |
-
// if it's past the high water mark, we can push in some more.
|
5580 |
-
// Also, if we have no data yet, we can stand some
|
5581 |
-
// more bytes. This is to work around cases where hwm=0,
|
5582 |
-
// such as the repl. Also, if the push() triggered a
|
5583 |
-
// readable event, and the user called read(largeNumber) such that
|
5584 |
-
// needReadable was set, then we ought to push more, so that another
|
5585 |
-
// 'readable' event will be triggered.
|
5586 |
-
function needMoreData(state) {
|
5587 |
-
return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
|
5588 |
-
}
|
5589 |
-
|
5590 |
-
Readable.prototype.isPaused = function () {
|
5591 |
-
return this._readableState.flowing === false;
|
5592 |
-
};
|
5593 |
-
|
5594 |
-
// backwards compatibility.
|
5595 |
-
Readable.prototype.setEncoding = function (enc) {
|
5596 |
-
if (!StringDecoder) StringDecoder = __webpack_require__(91).StringDecoder;
|
5597 |
-
this._readableState.decoder = new StringDecoder(enc);
|
5598 |
-
this._readableState.encoding = enc;
|
5599 |
-
return this;
|
5600 |
-
};
|
5601 |
-
|
5602 |
-
// Don't raise the hwm > 8MB
|
5603 |
-
var MAX_HWM = 0x800000;
|
5604 |
-
function computeNewHighWaterMark(n) {
|
5605 |
-
if (n >= MAX_HWM) {
|
5606 |
-
n = MAX_HWM;
|
5607 |
-
} else {
|
5608 |
-
// Get the next highest power of 2 to prevent increasing hwm excessively in
|
5609 |
-
// tiny amounts
|
5610 |
-
n--;
|
5611 |
-
n |= n >>> 1;
|
5612 |
-
n |= n >>> 2;
|
5613 |
-
n |= n >>> 4;
|
5614 |
-
n |= n >>> 8;
|
5615 |
-
n |= n >>> 16;
|
5616 |
-
n++;
|
5617 |
-
}
|
5618 |
-
return n;
|
5619 |
-
}
|
5620 |
-
|
5621 |
-
// This function is designed to be inlinable, so please take care when making
|
5622 |
-
// changes to the function body.
|
5623 |
-
function howMuchToRead(n, state) {
|
5624 |
-
if (n <= 0 || state.length === 0 && state.ended) return 0;
|
5625 |
-
if (state.objectMode) return 1;
|
5626 |
-
if (n !== n) {
|
5627 |
-
// Only flow one buffer at a time
|
5628 |
-
if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
|
5629 |
-
}
|
5630 |
-
// If we're asking for more than the current hwm, then raise the hwm.
|
5631 |
-
if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
|
5632 |
-
if (n <= state.length) return n;
|
5633 |
-
// Don't have enough
|
5634 |
-
if (!state.ended) {
|
5635 |
-
state.needReadable = true;
|
5636 |
-
return 0;
|
5637 |
-
}
|
5638 |
-
return state.length;
|
5639 |
-
}
|
5640 |
-
|
5641 |
-
// you can override either this method, or the async _read(n) below.
|
5642 |
-
Readable.prototype.read = function (n) {
|
5643 |
-
debug('read', n);
|
5644 |
-
n = parseInt(n, 10);
|
5645 |
-
var state = this._readableState;
|
5646 |
-
var nOrig = n;
|
5647 |
-
|
5648 |
-
if (n !== 0) state.emittedReadable = false;
|
5649 |
-
|
5650 |
-
// if we're doing read(0) to trigger a readable event, but we
|
5651 |
-
// already have a bunch of data in the buffer, then just trigger
|
5652 |
-
// the 'readable' event and move on.
|
5653 |
-
if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
|
5654 |
-
debug('read: emitReadable', state.length, state.ended);
|
5655 |
-
if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
|
5656 |
-
return null;
|
5657 |
-
}
|
5658 |
-
|
5659 |
-
n = howMuchToRead(n, state);
|
5660 |
-
|
5661 |
-
// if we've ended, and we're now clear, then finish it up.
|
5662 |
-
if (n === 0 && state.ended) {
|
5663 |
-
if (state.length === 0) endReadable(this);
|
5664 |
-
return null;
|
5665 |
-
}
|
5666 |
-
|
5667 |
-
// All the actual chunk generation logic needs to be
|
5668 |
-
// *below* the call to _read. The reason is that in certain
|
5669 |
-
// synthetic stream cases, such as passthrough streams, _read
|
5670 |
-
// may be a completely synchronous operation which may change
|
5671 |
-
// the state of the read buffer, providing enough data when
|
5672 |
-
// before there was *not* enough.
|
5673 |
-
//
|
5674 |
-
// So, the steps are:
|
5675 |
-
// 1. Figure out what the state of things will be after we do
|
5676 |
-
// a read from the buffer.
|
5677 |
-
//
|
5678 |
-
// 2. If that resulting state will trigger a _read, then call _read.
|
5679 |
-
// Note that this may be asynchronous, or synchronous. Yes, it is
|
5680 |
-
// deeply ugly to write APIs this way, but that still doesn't mean
|
5681 |
-
// that the Readable class should behave improperly, as streams are
|
5682 |
-
// designed to be sync/async agnostic.
|
5683 |
-
// Take note if the _read call is sync or async (ie, if the read call
|
5684 |
-
// has returned yet), so that we know whether or not it's safe to emit
|
5685 |
-
// 'readable' etc.
|
5686 |
-
//
|
5687 |
-
// 3. Actually pull the requested chunks out of the buffer and return.
|
5688 |
-
|
5689 |
-
// if we need a readable event, then we need to do some reading.
|
5690 |
-
var doRead = state.needReadable;
|
5691 |
-
debug('need readable', doRead);
|
5692 |
-
|
5693 |
-
// if we currently have less than the highWaterMark, then also read some
|
5694 |
-
if (state.length === 0 || state.length - n < state.highWaterMark) {
|
5695 |
-
doRead = true;
|
5696 |
-
debug('length less than watermark', doRead);
|
5697 |
-
}
|
5698 |
-
|
5699 |
-
// however, if we've ended, then there's no point, and if we're already
|
5700 |
-
// reading, then it's unnecessary.
|
5701 |
-
if (state.ended || state.reading) {
|
5702 |
-
doRead = false;
|
5703 |
-
debug('reading or ended', doRead);
|
5704 |
-
} else if (doRead) {
|
5705 |
-
debug('do read');
|
5706 |
-
state.reading = true;
|
5707 |
-
state.sync = true;
|
5708 |
-
// if the length is currently zero, then we *need* a readable event.
|
5709 |
-
if (state.length === 0) state.needReadable = true;
|
5710 |
-
// call internal read method
|
5711 |
-
this._read(state.highWaterMark);
|
5712 |
-
state.sync = false;
|
5713 |
-
// If _read pushed data synchronously, then `reading` will be false,
|
5714 |
-
// and we need to re-evaluate how much data we can return to the user.
|
5715 |
-
if (!state.reading) n = howMuchToRead(nOrig, state);
|
5716 |
-
}
|
5717 |
-
|
5718 |
-
var ret;
|
5719 |
-
if (n > 0) ret = fromList(n, state);else ret = null;
|
5720 |
-
|
5721 |
-
if (ret === null) {
|
5722 |
-
state.needReadable = true;
|
5723 |
-
n = 0;
|
5724 |
-
} else {
|
5725 |
-
state.length -= n;
|
5726 |
-
}
|
5727 |
-
|
5728 |
-
if (state.length === 0) {
|
5729 |
-
// If we have nothing in the buffer, then we want to know
|
5730 |
-
// as soon as we *do* get something into the buffer.
|
5731 |
-
if (!state.ended) state.needReadable = true;
|
5732 |
-
|
5733 |
-
// If we tried to read() past the EOF, then emit end on the next tick.
|
5734 |
-
if (nOrig !== n && state.ended) endReadable(this);
|
5735 |
-
}
|
5736 |
-
|
5737 |
-
if (ret !== null) this.emit('data', ret);
|
5738 |
-
|
5739 |
-
return ret;
|
5740 |
-
};
|
5741 |
-
|
5742 |
-
function onEofChunk(stream, state) {
|
5743 |
-
if (state.ended) return;
|
5744 |
-
if (state.decoder) {
|
5745 |
-
var chunk = state.decoder.end();
|
5746 |
-
if (chunk && chunk.length) {
|
5747 |
-
state.buffer.push(chunk);
|
5748 |
-
state.length += state.objectMode ? 1 : chunk.length;
|
5749 |
-
}
|
5750 |
-
}
|
5751 |
-
state.ended = true;
|
5752 |
-
|
5753 |
-
// emit 'readable' now to make sure it gets picked up.
|
5754 |
-
emitReadable(stream);
|
5755 |
-
}
|
5756 |
-
|
5757 |
-
// Don't emit readable right away in sync mode, because this can trigger
|
5758 |
-
// another read() call => stack overflow. This way, it might trigger
|
5759 |
-
// a nextTick recursion warning, but that's not so bad.
|
5760 |
-
function emitReadable(stream) {
|
5761 |
-
var state = stream._readableState;
|
5762 |
-
state.needReadable = false;
|
5763 |
-
if (!state.emittedReadable) {
|
5764 |
-
debug('emitReadable', state.flowing);
|
5765 |
-
state.emittedReadable = true;
|
5766 |
-
if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);
|
5767 |
-
}
|
5768 |
-
}
|
5769 |
-
|
5770 |
-
function emitReadable_(stream) {
|
5771 |
-
debug('emit readable');
|
5772 |
-
stream.emit('readable');
|
5773 |
-
flow(stream);
|
5774 |
-
}
|
5775 |
-
|
5776 |
-
// at this point, the user has presumably seen the 'readable' event,
|
5777 |
-
// and called read() to consume some data. that may have triggered
|
5778 |
-
// in turn another _read(n) call, in which case reading = true if
|
5779 |
-
// it's in progress.
|
5780 |
-
// However, if we're not ended, or reading, and the length < hwm,
|
5781 |
-
// then go ahead and try to read some more preemptively.
|
5782 |
-
function maybeReadMore(stream, state) {
|
5783 |
-
if (!state.readingMore) {
|
5784 |
-
state.readingMore = true;
|
5785 |
-
processNextTick(maybeReadMore_, stream, state);
|
5786 |
-
}
|
5787 |
-
}
|
5788 |
-
|
5789 |
-
function maybeReadMore_(stream, state) {
|
5790 |
-
var len = state.length;
|
5791 |
-
while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
|
5792 |
-
debug('maybeReadMore read 0');
|
5793 |
-
stream.read(0);
|
5794 |
-
if (len === state.length)
|
5795 |
-
// didn't get any data, stop spinning.
|
5796 |
-
break;else len = state.length;
|
5797 |
-
}
|
5798 |
-
state.readingMore = false;
|
5799 |
-
}
|
5800 |
-
|
5801 |
-
// abstract method. to be overridden in specific implementation classes.
|
5802 |
-
// call cb(er, data) where data is <= n in length.
|
5803 |
-
// for virtual (non-string, non-buffer) streams, "length" is somewhat
|
5804 |
-
// arbitrary, and perhaps not very meaningful.
|
5805 |
-
Readable.prototype._read = function (n) {
|
5806 |
-
this.emit('error', new Error('_read() is not implemented'));
|
5807 |
-
};
|
5808 |
-
|
5809 |
-
Readable.prototype.pipe = function (dest, pipeOpts) {
|
5810 |
-
var src = this;
|
5811 |
-
var state = this._readableState;
|
5812 |
-
|
5813 |
-
switch (state.pipesCount) {
|
5814 |
-
case 0:
|
5815 |
-
state.pipes = dest;
|
5816 |
-
break;
|
5817 |
-
case 1:
|
5818 |
-
state.pipes = [state.pipes, dest];
|
5819 |
-
break;
|
5820 |
-
default:
|
5821 |
-
state.pipes.push(dest);
|
5822 |
-
break;
|
5823 |
-
}
|
5824 |
-
state.pipesCount += 1;
|
5825 |
-
debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
|
5826 |
-
|
5827 |
-
var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
|
5828 |
-
|
5829 |
-
var endFn = doEnd ? onend : unpipe;
|
5830 |
-
if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn);
|
5831 |
-
|
5832 |
-
dest.on('unpipe', onunpipe);
|
5833 |
-
function onunpipe(readable, unpipeInfo) {
|
5834 |
-
debug('onunpipe');
|
5835 |
-
if (readable === src) {
|
5836 |
-
if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
|
5837 |
-
unpipeInfo.hasUnpiped = true;
|
5838 |
-
cleanup();
|
5839 |
-
}
|
5840 |
-
}
|
5841 |
-
}
|
5842 |
-
|
5843 |
-
function onend() {
|
5844 |
-
debug('onend');
|
5845 |
-
dest.end();
|
5846 |
-
}
|
5847 |
-
|
5848 |
-
// when the dest drains, it reduces the awaitDrain counter
|
5849 |
-
// on the source. This would be more elegant with a .once()
|
5850 |
-
// handler in flow(), but adding and removing repeatedly is
|
5851 |
-
// too slow.
|
5852 |
-
var ondrain = pipeOnDrain(src);
|
5853 |
-
dest.on('drain', ondrain);
|
5854 |
-
|
5855 |
-
var cleanedUp = false;
|
5856 |
-
function cleanup() {
|
5857 |
-
debug('cleanup');
|
5858 |
-
// cleanup event handlers once the pipe is broken
|
5859 |
-
dest.removeListener('close', onclose);
|
5860 |
-
dest.removeListener('finish', onfinish);
|
5861 |
-
dest.removeListener('drain', ondrain);
|
5862 |
-
dest.removeListener('error', onerror);
|
5863 |
-
dest.removeListener('unpipe', onunpipe);
|
5864 |
-
src.removeListener('end', onend);
|
5865 |
-
src.removeListener('end', unpipe);
|
5866 |
-
src.removeListener('data', ondata);
|
5867 |
-
|
5868 |
-
cleanedUp = true;
|
5869 |
-
|
5870 |
-
// if the reader is waiting for a drain event from this
|
5871 |
-
// specific writer, then it would cause it to never start
|
5872 |
-
// flowing again.
|
5873 |
-
// So, if this is awaiting a drain, then we just call it now.
|
5874 |
-
// If we don't know, then assume that we are waiting for one.
|
5875 |
-
if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
|
5876 |
-
}
|
5877 |
-
|
5878 |
-
// If the user pushes more data while we're writing to dest then we'll end up
|
5879 |
-
// in ondata again. However, we only want to increase awaitDrain once because
|
5880 |
-
// dest will only emit one 'drain' event for the multiple writes.
|
5881 |
-
// => Introduce a guard on increasing awaitDrain.
|
5882 |
-
var increasedAwaitDrain = false;
|
5883 |
-
src.on('data', ondata);
|
5884 |
-
function ondata(chunk) {
|
5885 |
-
debug('ondata');
|
5886 |
-
increasedAwaitDrain = false;
|
5887 |
-
var ret = dest.write(chunk);
|
5888 |
-
if (false === ret && !increasedAwaitDrain) {
|
5889 |
-
// If the user unpiped during `dest.write()`, it is possible
|
5890 |
-
// to get stuck in a permanently paused state if that write
|
5891 |
-
// also returned false.
|
5892 |
-
// => Check whether `dest` is still a piping destination.
|
5893 |
-
if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
|
5894 |
-
debug('false write response, pause', src._readableState.awaitDrain);
|
5895 |
-
src._readableState.awaitDrain++;
|
5896 |
-
increasedAwaitDrain = true;
|
5897 |
-
}
|
5898 |
-
src.pause();
|
5899 |
-
}
|
5900 |
-
}
|
5901 |
-
|
5902 |
-
// if the dest has an error, then stop piping into it.
|
5903 |
-
// however, don't suppress the throwing behavior for this.
|
5904 |
-
function onerror(er) {
|
5905 |
-
debug('onerror', er);
|
5906 |
-
unpipe();
|
5907 |
-
dest.removeListener('error', onerror);
|
5908 |
-
if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
|
5909 |
-
}
|
5910 |
-
|
5911 |
-
// Make sure our error handler is attached before userland ones.
|
5912 |
-
prependListener(dest, 'error', onerror);
|
5913 |
-
|
5914 |
-
// Both close and finish should trigger unpipe, but only once.
|
5915 |
-
function onclose() {
|
5916 |
-
dest.removeListener('finish', onfinish);
|
5917 |
-
unpipe();
|
5918 |
-
}
|
5919 |
-
dest.once('close', onclose);
|
5920 |
-
function onfinish() {
|
5921 |
-
debug('onfinish');
|
5922 |
-
dest.removeListener('close', onclose);
|
5923 |
-
unpipe();
|
5924 |
-
}
|
5925 |
-
dest.once('finish', onfinish);
|
5926 |
-
|
5927 |
-
function unpipe() {
|
5928 |
-
debug('unpipe');
|
5929 |
-
src.unpipe(dest);
|
5930 |
-
}
|
5931 |
-
|
5932 |
-
// tell the dest that it's being piped to
|
5933 |
-
dest.emit('pipe', src);
|
5934 |
-
|
5935 |
-
// start the flow if it hasn't been started already.
|
5936 |
-
if (!state.flowing) {
|
5937 |
-
debug('pipe resume');
|
5938 |
-
src.resume();
|
5939 |
-
}
|
5940 |
-
|
5941 |
-
return dest;
|
5942 |
-
};
|
5943 |
-
|
5944 |
-
function pipeOnDrain(src) {
|
5945 |
-
return function () {
|
5946 |
-
var state = src._readableState;
|
5947 |
-
debug('pipeOnDrain', state.awaitDrain);
|
5948 |
-
if (state.awaitDrain) state.awaitDrain--;
|
5949 |
-
if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
|
5950 |
-
state.flowing = true;
|
5951 |
-
flow(src);
|
5952 |
-
}
|
5953 |
-
};
|
5954 |
-
}
|
5955 |
-
|
5956 |
-
Readable.prototype.unpipe = function (dest) {
|
5957 |
-
var state = this._readableState;
|
5958 |
-
var unpipeInfo = { hasUnpiped: false };
|
5959 |
-
|
5960 |
-
// if we're not piping anywhere, then do nothing.
|
5961 |
-
if (state.pipesCount === 0) return this;
|
5962 |
-
|
5963 |
-
// just one destination. most common case.
|
5964 |
-
if (state.pipesCount === 1) {
|
5965 |
-
// passed in one, but it's not the right one.
|
5966 |
-
if (dest && dest !== state.pipes) return this;
|
5967 |
-
|
5968 |
-
if (!dest) dest = state.pipes;
|
5969 |
-
|
5970 |
-
// got a match.
|
5971 |
-
state.pipes = null;
|
5972 |
-
state.pipesCount = 0;
|
5973 |
-
state.flowing = false;
|
5974 |
-
if (dest) dest.emit('unpipe', this, unpipeInfo);
|
5975 |
-
return this;
|
5976 |
-
}
|
5977 |
-
|
5978 |
-
// slow case. multiple pipe destinations.
|
5979 |
-
|
5980 |
-
if (!dest) {
|
5981 |
-
// remove all.
|
5982 |
-
var dests = state.pipes;
|
5983 |
-
var len = state.pipesCount;
|
5984 |
-
state.pipes = null;
|
5985 |
-
state.pipesCount = 0;
|
5986 |
-
state.flowing = false;
|
5987 |
-
|
5988 |
-
for (var i = 0; i < len; i++) {
|
5989 |
-
dests[i].emit('unpipe', this, unpipeInfo);
|
5990 |
-
}return this;
|
5991 |
-
}
|
5992 |
-
|
5993 |
-
// try to find the right one.
|
5994 |
-
var index = indexOf(state.pipes, dest);
|
5995 |
-
if (index === -1) return this;
|
5996 |
-
|
5997 |
-
state.pipes.splice(index, 1);
|
5998 |
-
state.pipesCount -= 1;
|
5999 |
-
if (state.pipesCount === 1) state.pipes = state.pipes[0];
|
6000 |
-
|
6001 |
-
dest.emit('unpipe', this, unpipeInfo);
|
6002 |
-
|
6003 |
-
return this;
|
6004 |
-
};
|
6005 |
-
|
6006 |
-
// set up data events if they are asked for
|
6007 |
-
// Ensure readable listeners eventually get something
|
6008 |
-
Readable.prototype.on = function (ev, fn) {
|
6009 |
-
var res = Stream.prototype.on.call(this, ev, fn);
|
6010 |
-
|
6011 |
-
if (ev === 'data') {
|
6012 |
-
// Start flowing on next tick if stream isn't explicitly paused
|
6013 |
-
if (this._readableState.flowing !== false) this.resume();
|
6014 |
-
} else if (ev === 'readable') {
|
6015 |
-
var state = this._readableState;
|
6016 |
-
if (!state.endEmitted && !state.readableListening) {
|
6017 |
-
state.readableListening = state.needReadable = true;
|
6018 |
-
state.emittedReadable = false;
|
6019 |
-
if (!state.reading) {
|
6020 |
-
processNextTick(nReadingNextTick, this);
|
6021 |
-
} else if (state.length) {
|
6022 |
-
emitReadable(this);
|
6023 |
-
}
|
6024 |
-
}
|
6025 |
-
}
|
6026 |
-
|
6027 |
-
return res;
|
6028 |
-
};
|
6029 |
-
Readable.prototype.addListener = Readable.prototype.on;
|
6030 |
-
|
6031 |
-
function nReadingNextTick(self) {
|
6032 |
-
debug('readable nexttick read 0');
|
6033 |
-
self.read(0);
|
6034 |
-
}
|
6035 |
-
|
6036 |
-
// pause() and resume() are remnants of the legacy readable stream API
|
6037 |
-
// If the user uses them, then switch into old mode.
|
6038 |
-
Readable.prototype.resume = function () {
|
6039 |
-
var state = this._readableState;
|
6040 |
-
if (!state.flowing) {
|
6041 |
-
debug('resume');
|
6042 |
-
state.flowing = true;
|
6043 |
-
resume(this, state);
|
6044 |
-
}
|
6045 |
-
return this;
|
6046 |
-
};
|
6047 |
-
|
6048 |
-
function resume(stream, state) {
|
6049 |
-
if (!state.resumeScheduled) {
|
6050 |
-
state.resumeScheduled = true;
|
6051 |
-
processNextTick(resume_, stream, state);
|
6052 |
-
}
|
6053 |
-
}
|
6054 |
-
|
6055 |
-
function resume_(stream, state) {
|
6056 |
-
if (!state.reading) {
|
6057 |
-
debug('resume read 0');
|
6058 |
-
stream.read(0);
|
6059 |
-
}
|
6060 |
-
|
6061 |
-
state.resumeScheduled = false;
|
6062 |
-
state.awaitDrain = 0;
|
6063 |
-
stream.emit('resume');
|
6064 |
-
flow(stream);
|
6065 |
-
if (state.flowing && !state.reading) stream.read(0);
|
6066 |
-
}
|
6067 |
-
|
6068 |
-
Readable.prototype.pause = function () {
|
6069 |
-
debug('call pause flowing=%j', this._readableState.flowing);
|
6070 |
-
if (false !== this._readableState.flowing) {
|
6071 |
-
debug('pause');
|
6072 |
-
this._readableState.flowing = false;
|
6073 |
-
this.emit('pause');
|
6074 |
-
}
|
6075 |
-
return this;
|
6076 |
-
};
|
6077 |
-
|
6078 |
-
function flow(stream) {
|
6079 |
-
var state = stream._readableState;
|
6080 |
-
debug('flow', state.flowing);
|
6081 |
-
while (state.flowing && stream.read() !== null) {}
|
6082 |
-
}
|
6083 |
-
|
6084 |
-
// wrap an old-style stream as the async data source.
|
6085 |
-
// This is *not* part of the readable stream interface.
|
6086 |
-
// It is an ugly unfortunate mess of history.
|
6087 |
-
Readable.prototype.wrap = function (stream) {
|
6088 |
-
var state = this._readableState;
|
6089 |
-
var paused = false;
|
6090 |
-
|
6091 |
-
var self = this;
|
6092 |
-
stream.on('end', function () {
|
6093 |
-
debug('wrapped end');
|
6094 |
-
if (state.decoder && !state.ended) {
|
6095 |
-
var chunk = state.decoder.end();
|
6096 |
-
if (chunk && chunk.length) self.push(chunk);
|
6097 |
-
}
|
6098 |
-
|
6099 |
-
self.push(null);
|
6100 |
-
});
|
6101 |
-
|
6102 |
-
stream.on('data', function (chunk) {
|
6103 |
-
debug('wrapped data');
|
6104 |
-
if (state.decoder) chunk = state.decoder.write(chunk);
|
6105 |
-
|
6106 |
-
// don't skip over falsy values in objectMode
|
6107 |
-
if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
|
6108 |
-
|
6109 |
-
var ret = self.push(chunk);
|
6110 |
-
if (!ret) {
|
6111 |
-
paused = true;
|
6112 |
-
stream.pause();
|
6113 |
-
}
|
6114 |
-
});
|
6115 |
-
|
6116 |
-
// proxy all the other methods.
|
6117 |
-
// important when wrapping filters and duplexes.
|
6118 |
-
for (var i in stream) {
|
6119 |
-
if (this[i] === undefined && typeof stream[i] === 'function') {
|
6120 |
-
this[i] = function (method) {
|
6121 |
-
return function () {
|
6122 |
-
return stream[method].apply(stream, arguments);
|
6123 |
-
};
|
6124 |
-
}(i);
|
6125 |
-
}
|
6126 |
-
}
|
6127 |
-
|
6128 |
-
// proxy certain important events.
|
6129 |
-
for (var n = 0; n < kProxyEvents.length; n++) {
|
6130 |
-
stream.on(kProxyEvents[n], self.emit.bind(self, kProxyEvents[n]));
|
6131 |
-
}
|
6132 |
-
|
6133 |
-
// when we try to consume some more bytes, simply unpause the
|
6134 |
-
// underlying stream.
|
6135 |
-
self._read = function (n) {
|
6136 |
-
debug('wrapped _read', n);
|
6137 |
-
if (paused) {
|
6138 |
-
paused = false;
|
6139 |
-
stream.resume();
|
6140 |
-
}
|
6141 |
-
};
|
6142 |
-
|
6143 |
-
return self;
|
6144 |
-
};
|
6145 |
-
|
6146 |
-
// exposed for testing purposes only.
|
6147 |
-
Readable._fromList = fromList;
|
6148 |
-
|
6149 |
-
// Pluck off n bytes from an array of buffers.
|
6150 |
-
// Length is the combined lengths of all the buffers in the list.
|
6151 |
-
// This function is designed to be inlinable, so please take care when making
|
6152 |
-
// changes to the function body.
|
6153 |
-
function fromList(n, state) {
|
6154 |
-
// nothing buffered
|
6155 |
-
if (state.length === 0) return null;
|
6156 |
-
|
6157 |
-
var ret;
|
6158 |
-
if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
|
6159 |
-
// read it all, truncate the list
|
6160 |
-
if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
|
6161 |
-
state.buffer.clear();
|
6162 |
-
} else {
|
6163 |
-
// read part of list
|
6164 |
-
ret = fromListPartial(n, state.buffer, state.decoder);
|
6165 |
-
}
|
6166 |
-
|
6167 |
-
return ret;
|
6168 |
-
}
|
6169 |
-
|
6170 |
-
// Extracts only enough buffered data to satisfy the amount requested.
|
6171 |
-
// This function is designed to be inlinable, so please take care when making
|
6172 |
-
// changes to the function body.
|
6173 |
-
function fromListPartial(n, list, hasStrings) {
|
6174 |
-
var ret;
|
6175 |
-
if (n < list.head.data.length) {
|
6176 |
-
// slice is the same for buffers and strings
|
6177 |
-
ret = list.head.data.slice(0, n);
|
6178 |
-
list.head.data = list.head.data.slice(n);
|
6179 |
-
} else if (n === list.head.data.length) {
|
6180 |
-
// first chunk is a perfect match
|
6181 |
-
ret = list.shift();
|
6182 |
-
} else {
|
6183 |
-
// result spans more than one buffer
|
6184 |
-
ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
|
6185 |
-
}
|
6186 |
-
return ret;
|
6187 |
-
}
|
6188 |
-
|
6189 |
-
// Copies a specified amount of characters from the list of buffered data
|
6190 |
-
// chunks.
|
6191 |
-
// This function is designed to be inlinable, so please take care when making
|
6192 |
-
// changes to the function body.
|
6193 |
-
function copyFromBufferString(n, list) {
|
6194 |
-
var p = list.head;
|
6195 |
-
var c = 1;
|
6196 |
-
var ret = p.data;
|
6197 |
-
n -= ret.length;
|
6198 |
-
while (p = p.next) {
|
6199 |
-
var str = p.data;
|
6200 |
-
var nb = n > str.length ? str.length : n;
|
6201 |
-
if (nb === str.length) ret += str;else ret += str.slice(0, n);
|
6202 |
-
n -= nb;
|
6203 |
-
if (n === 0) {
|
6204 |
-
if (nb === str.length) {
|
6205 |
-
++c;
|
6206 |
-
if (p.next) list.head = p.next;else list.head = list.tail = null;
|
6207 |
-
} else {
|
6208 |
-
list.head = p;
|
6209 |
-
p.data = str.slice(nb);
|
6210 |
-
}
|
6211 |
-
break;
|
6212 |
-
}
|
6213 |
-
++c;
|
6214 |
-
}
|
6215 |
-
list.length -= c;
|
6216 |
-
return ret;
|
6217 |
-
}
|
6218 |
-
|
6219 |
-
// Copies a specified amount of bytes from the list of buffered data chunks.
|
6220 |
-
// This function is designed to be inlinable, so please take care when making
|
6221 |
-
// changes to the function body.
|
6222 |
-
function copyFromBuffer(n, list) {
|
6223 |
-
var ret = Buffer.allocUnsafe(n);
|
6224 |
-
var p = list.head;
|
6225 |
-
var c = 1;
|
6226 |
-
p.data.copy(ret);
|
6227 |
-
n -= p.data.length;
|
6228 |
-
while (p = p.next) {
|
6229 |
-
var buf = p.data;
|
6230 |
-
var nb = n > buf.length ? buf.length : n;
|
6231 |
-
buf.copy(ret, ret.length - n, 0, nb);
|
6232 |
-
n -= nb;
|
6233 |
-
if (n === 0) {
|
6234 |
-
if (nb === buf.length) {
|
6235 |
-
++c;
|
6236 |
-
if (p.next) list.head = p.next;else list.head = list.tail = null;
|
6237 |
-
} else {
|
6238 |
-
list.head = p;
|
6239 |
-
p.data = buf.slice(nb);
|
6240 |
-
}
|
6241 |
-
break;
|
6242 |
-
}
|
6243 |
-
++c;
|
6244 |
-
}
|
6245 |
-
list.length -= c;
|
6246 |
-
return ret;
|
6247 |
-
}
|
6248 |
-
|
6249 |
-
function endReadable(stream) {
|
6250 |
-
var state = stream._readableState;
|
6251 |
-
|
6252 |
-
// If we get here before consuming all the bytes, then that is a
|
6253 |
-
// bug in node. Should never happen.
|
6254 |
-
if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
|
6255 |
-
|
6256 |
-
if (!state.endEmitted) {
|
6257 |
-
state.ended = true;
|
6258 |
-
processNextTick(endReadableNT, state, stream);
|
6259 |
-
}
|
6260 |
-
}
|
6261 |
-
|
6262 |
-
function endReadableNT(state, stream) {
|
6263 |
-
// Check that we didn't get one last unshift.
|
6264 |
-
if (!state.endEmitted && state.length === 0) {
|
6265 |
-
state.endEmitted = true;
|
6266 |
-
stream.readable = false;
|
6267 |
-
stream.emit('end');
|
6268 |
-
}
|
6269 |
-
}
|
6270 |
-
|
6271 |
-
function forEach(xs, f) {
|
6272 |
-
for (var i = 0, l = xs.length; i < l; i++) {
|
6273 |
-
f(xs[i], i);
|
6274 |
-
}
|
6275 |
-
}
|
6276 |
-
|
6277 |
-
function indexOf(xs, x) {
|
6278 |
-
for (var i = 0, l = xs.length; i < l; i++) {
|
6279 |
-
if (xs[i] === x) return i;
|
6280 |
-
}
|
6281 |
-
return -1;
|
6282 |
-
}
|
6283 |
-
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(9), __webpack_require__(1)))
|
6284 |
-
|
6285 |
-
/***/ }),
|
6286 |
-
/* 265 */
|
6287 |
-
/***/ (function(module, exports) {
|
6288 |
-
|
6289 |
-
var toString = {}.toString;
|
6290 |
-
|
6291 |
-
module.exports = Array.isArray || function (arr) {
|
6292 |
-
return toString.call(arr) == '[object Array]';
|
6293 |
-
};
|
6294 |
-
|
6295 |
-
|
6296 |
-
/***/ }),
|
6297 |
-
/* 266 */
|
6298 |
-
/***/ (function(module, exports, __webpack_require__) {
|
6299 |
-
|
6300 |
-
module.exports = __webpack_require__(55).EventEmitter;
|
6301 |
-
|
6302 |
-
|
6303 |
-
/***/ }),
|
6304 |
-
/* 267 */
|
6305 |
-
/***/ (function(module, exports, __webpack_require__) {
|
6306 |
-
|
6307 |
-
"use strict";
|
6308 |
-
|
6309 |
-
|
6310 |
-
/*<replacement>*/
|
6311 |
-
|
6312 |
-
var processNextTick = __webpack_require__(56);
|
6313 |
-
/*</replacement>*/
|
6314 |
-
|
6315 |
-
// undocumented cb() API, needed for core, not for public API
|
6316 |
-
function destroy(err, cb) {
|
6317 |
-
var _this = this;
|
6318 |
-
|
6319 |
-
var readableDestroyed = this._readableState && this._readableState.destroyed;
|
6320 |
-
var writableDestroyed = this._writableState && this._writableState.destroyed;
|
6321 |
-
|
6322 |
-
if (readableDestroyed || writableDestroyed) {
|
6323 |
-
if (cb) {
|
6324 |
-
cb(err);
|
6325 |
-
} else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
|
6326 |
-
processNextTick(emitErrorNT, this, err);
|
6327 |
-
}
|
6328 |
-
return;
|
6329 |
-
}
|
6330 |
-
|
6331 |
-
// we set destroyed to true before firing error callbacks in order
|
6332 |
-
// to make it re-entrance safe in case destroy() is called within callbacks
|
6333 |
-
|
6334 |
-
if (this._readableState) {
|
6335 |
-
this._readableState.destroyed = true;
|
6336 |
-
}
|
6337 |
-
|
6338 |
-
// if this is a duplex stream mark the writable part as destroyed as well
|
6339 |
-
if (this._writableState) {
|
6340 |
-
this._writableState.destroyed = true;
|
6341 |
-
}
|
6342 |
-
|
6343 |
-
this._destroy(err || null, function (err) {
|
6344 |
-
if (!cb && err) {
|
6345 |
-
processNextTick(emitErrorNT, _this, err);
|
6346 |
-
if (_this._writableState) {
|
6347 |
-
_this._writableState.errorEmitted = true;
|
6348 |
-
}
|
6349 |
-
} else if (cb) {
|
6350 |
-
cb(err);
|
6351 |
-
}
|
6352 |
-
});
|
6353 |
-
}
|
6354 |
-
|
6355 |
-
function undestroy() {
|
6356 |
-
if (this._readableState) {
|
6357 |
-
this._readableState.destroyed = false;
|
6358 |
-
this._readableState.reading = false;
|
6359 |
-
this._readableState.ended = false;
|
6360 |
-
this._readableState.endEmitted = false;
|
6361 |
-
}
|
6362 |
-
|
6363 |
-
if (this._writableState) {
|
6364 |
-
this._writableState.destroyed = false;
|
6365 |
-
this._writableState.ended = false;
|
6366 |
-
this._writableState.ending = false;
|
6367 |
-
this._writableState.finished = false;
|
6368 |
-
this._writableState.errorEmitted = false;
|
6369 |
-
}
|
6370 |
-
}
|
6371 |
-
|
6372 |
-
function emitErrorNT(self, err) {
|
6373 |
-
self.emit('error', err);
|
6374 |
-
}
|
6375 |
-
|
6376 |
-
module.exports = {
|
6377 |
-
destroy: destroy,
|
6378 |
-
undestroy: undestroy
|
6379 |
-
};
|
6380 |
-
|
6381 |
-
/***/ }),
|
6382 |
-
/* 268 */,
|
6383 |
-
/* 269 */
|
6384 |
-
/***/ (function(module, exports, __webpack_require__) {
|
6385 |
-
|
6386 |
-
"use strict";
|
6387 |
-
// Copyright Joyent, Inc. and other Node contributors.
|
6388 |
-
//
|
6389 |
-
// Permission is hereby granted, free of charge, to any person obtaining a
|
6390 |
-
// copy of this software and associated documentation files (the
|
6391 |
-
// "Software"), to deal in the Software without restriction, including
|
6392 |
-
// without limitation the rights to use, copy, modify, merge, publish,
|
6393 |
-
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
6394 |
-
// persons to whom the Software is furnished to do so, subject to the
|
6395 |
-
// following conditions:
|
6396 |
-
//
|
6397 |
-
// The above copyright notice and this permission notice shall be included
|
6398 |
-
// in all copies or substantial portions of the Software.
|
6399 |
-
//
|
6400 |
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
6401 |
-
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
6402 |
-
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
6403 |
-
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
6404 |
-
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
6405 |
-
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
6406 |
-
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
6407 |
-
|
6408 |
-
// a transform stream is a readable/writable stream where you do
|
6409 |
-
// something with the data. Sometimes it's called a "filter",
|
6410 |
-
// but that's not a great name for it, since that implies a thing where
|
6411 |
-
// some bits pass through, and others are simply ignored. (That would
|
6412 |
-
// be a valid example of a transform, of course.)
|
6413 |
-
//
|
6414 |
-
// While the output is causally related to the input, it's not a
|
6415 |
-
// necessarily symmetric or synchronous transformation. For example,
|
6416 |
-
// a zlib stream might take multiple plain-text writes(), and then
|
6417 |
-
// emit a single compressed chunk some time in the future.
|
6418 |
-
//
|
6419 |
-
// Here's how this works:
|
6420 |
-
//
|
6421 |
-
// The Transform stream has all the aspects of the readable and writable
|
6422 |
-
// stream classes. When you write(chunk), that calls _write(chunk,cb)
|
6423 |
-
// internally, and returns false if there's a lot of pending writes
|
6424 |
-
// buffered up. When you call read(), that calls _read(n) until
|
6425 |
-
// there's enough pending readable data buffered up.
|
6426 |
-
//
|
6427 |
-
// In a transform stream, the written data is placed in a buffer. When
|
6428 |
-
// _read(n) is called, it transforms the queued up data, calling the
|
6429 |
-
// buffered _write cb's as it consumes chunks. If consuming a single
|
6430 |
-
// written chunk would result in multiple output chunks, then the first
|
6431 |
-
// outputted bit calls the readcb, and subsequent chunks just go into
|
6432 |
-
// the read buffer, and will cause it to emit 'readable' if necessary.
|
6433 |
-
//
|
6434 |
-
// This way, back-pressure is actually determined by the reading side,
|
6435 |
-
// since _read has to be called to start processing a new chunk. However,
|
6436 |
-
// a pathological inflate type of transform can cause excessive buffering
|
6437 |
-
// here. For example, imagine a stream where every byte of input is
|
6438 |
-
// interpreted as an integer from 0-255, and then results in that many
|
6439 |
-
// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
|
6440 |
-
// 1kb of data being output. In this case, you could write a very small
|
6441 |
-
// amount of input, and end up with a very large amount of output. In
|
6442 |
-
// such a pathological inflating mechanism, there'd be no way to tell
|
6443 |
-
// the system to stop doing the transform. A single 4MB write could
|
6444 |
-
// cause the system to run out of memory.
|
6445 |
-
//
|
6446 |
-
// However, even in such a pathological case, only a single written chunk
|
6447 |
-
// would be consumed, and then the rest would wait (un-transformed) until
|
6448 |
-
// the results of the previous transformed chunk were consumed.
|
6449 |
-
|
6450 |
-
|
6451 |
-
|
6452 |
-
module.exports = Transform;
|
6453 |
-
|
6454 |
-
var Duplex = __webpack_require__(32);
|
6455 |
-
|
6456 |
-
/*<replacement>*/
|
6457 |
-
var util = __webpack_require__(46);
|
6458 |
-
util.inherits = __webpack_require__(22);
|
6459 |
-
/*</replacement>*/
|
6460 |
-
|
6461 |
-
util.inherits(Transform, Duplex);
|
6462 |
-
|
6463 |
-
function TransformState(stream) {
|
6464 |
-
this.afterTransform = function (er, data) {
|
6465 |
-
return afterTransform(stream, er, data);
|
6466 |
-
};
|
6467 |
-
|
6468 |
-
this.needTransform = false;
|
6469 |
-
this.transforming = false;
|
6470 |
-
this.writecb = null;
|
6471 |
-
this.writechunk = null;
|
6472 |
-
this.writeencoding = null;
|
6473 |
-
}
|
6474 |
-
|
6475 |
-
function afterTransform(stream, er, data) {
|
6476 |
-
var ts = stream._transformState;
|
6477 |
-
ts.transforming = false;
|
6478 |
-
|
6479 |
-
var cb = ts.writecb;
|
6480 |
-
|
6481 |
-
if (!cb) {
|
6482 |
-
return stream.emit('error', new Error('write callback called multiple times'));
|
6483 |
-
}
|
6484 |
-
|
6485 |
-
ts.writechunk = null;
|
6486 |
-
ts.writecb = null;
|
6487 |
-
|
6488 |
-
if (data !== null && data !== undefined) stream.push(data);
|
6489 |
-
|
6490 |
-
cb(er);
|
6491 |
-
|
6492 |
-
var rs = stream._readableState;
|
6493 |
-
rs.reading = false;
|
6494 |
-
if (rs.needReadable || rs.length < rs.highWaterMark) {
|
6495 |
-
stream._read(rs.highWaterMark);
|
6496 |
-
}
|
6497 |
-
}
|
6498 |
-
|
6499 |
-
function Transform(options) {
|
6500 |
-
if (!(this instanceof Transform)) return new Transform(options);
|
6501 |
-
|
6502 |
-
Duplex.call(this, options);
|
6503 |
-
|
6504 |
-
this._transformState = new TransformState(this);
|
6505 |
-
|
6506 |
-
var stream = this;
|
6507 |
-
|
6508 |
-
// start out asking for a readable event once data is transformed.
|
6509 |
-
this._readableState.needReadable = true;
|
6510 |
-
|
6511 |
-
// we have implemented the _read method, and done the other things
|
6512 |
-
// that Readable wants before the first _read call, so unset the
|
6513 |
-
// sync guard flag.
|
6514 |
-
this._readableState.sync = false;
|
6515 |
-
|
6516 |
-
if (options) {
|
6517 |
-
if (typeof options.transform === 'function') this._transform = options.transform;
|
6518 |
-
|
6519 |
-
if (typeof options.flush === 'function') this._flush = options.flush;
|
6520 |
-
}
|
6521 |
-
|
6522 |
-
// When the writable side finishes, then flush out anything remaining.
|
6523 |
-
this.once('prefinish', function () {
|
6524 |
-
if (typeof this._flush === 'function') this._flush(function (er, data) {
|
6525 |
-
done(stream, er, data);
|
6526 |
-
});else done(stream);
|
6527 |
-
});
|
6528 |
-
}
|
6529 |
-
|
6530 |
-
Transform.prototype.push = function (chunk, encoding) {
|
6531 |
-
this._transformState.needTransform = false;
|
6532 |
-
return Duplex.prototype.push.call(this, chunk, encoding);
|
6533 |
-
};
|
6534 |
-
|
6535 |
-
// This is the part where you do stuff!
|
6536 |
-
// override this function in implementation classes.
|
6537 |
-
// 'chunk' is an input chunk.
|
6538 |
-
//
|
6539 |
-
// Call `push(newChunk)` to pass along transformed output
|
6540 |
-
// to the readable side. You may call 'push' zero or more times.
|
6541 |
-
//
|
6542 |
-
// Call `cb(err)` when you are done with this chunk. If you pass
|
6543 |
-
// an error, then that'll put the hurt on the whole operation. If you
|
6544 |
-
// never call cb(), then you'll never get another chunk.
|
6545 |
-
Transform.prototype._transform = function (chunk, encoding, cb) {
|
6546 |
-
throw new Error('_transform() is not implemented');
|
6547 |
-
};
|
6548 |
-
|
6549 |
-
Transform.prototype._write = function (chunk, encoding, cb) {
|
6550 |
-
var ts = this._transformState;
|
6551 |
-
ts.writecb = cb;
|
6552 |
-
ts.writechunk = chunk;
|
6553 |
-
ts.writeencoding = encoding;
|
6554 |
-
if (!ts.transforming) {
|
6555 |
-
var rs = this._readableState;
|
6556 |
-
if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
|
6557 |
-
}
|
6558 |
-
};
|
6559 |
-
|
6560 |
-
// Doesn't matter what the args are here.
|
6561 |
-
// _transform does all the work.
|
6562 |
-
// That we got here means that the readable side wants more data.
|
6563 |
-
Transform.prototype._read = function (n) {
|
6564 |
-
var ts = this._transformState;
|
6565 |
-
|
6566 |
-
if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
|
6567 |
-
ts.transforming = true;
|
6568 |
-
this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
|
6569 |
-
} else {
|
6570 |
-
// mark that we need a transform, so that any data that comes in
|
6571 |
-
// will get processed, now that we've asked for it.
|
6572 |
-
ts.needTransform = true;
|
6573 |
-
}
|
6574 |
-
};
|
6575 |
-
|
6576 |
-
Transform.prototype._destroy = function (err, cb) {
|
6577 |
-
var _this = this;
|
6578 |
-
|
6579 |
-
Duplex.prototype._destroy.call(this, err, function (err2) {
|
6580 |
-
cb(err2);
|
6581 |
-
_this.emit('close');
|
6582 |
-
});
|
6583 |
-
};
|
6584 |
-
|
6585 |
-
function done(stream, er, data) {
|
6586 |
-
if (er) return stream.emit('error', er);
|
6587 |
-
|
6588 |
-
if (data !== null && data !== undefined) stream.push(data);
|
6589 |
-
|
6590 |
-
// if there's nothing in the write buffer, then that means
|
6591 |
-
// that nothing more will ever be provided
|
6592 |
-
var ws = stream._writableState;
|
6593 |
-
var ts = stream._transformState;
|
6594 |
-
|
6595 |
-
if (ws.length) throw new Error('Calling transform done when ws.length != 0');
|
6596 |
-
|
6597 |
-
if (ts.transforming) throw new Error('Calling transform done when still transforming');
|
6598 |
-
|
6599 |
-
return stream.push(null);
|
6600 |
-
}
|
6601 |
-
|
6602 |
-
/***/ }),
|
6603 |
-
/* 270 */
|
6604 |
-
/***/ (function(module, exports, __webpack_require__) {
|
6605 |
-
|
6606 |
-
"use strict";
|
6607 |
-
|
6608 |
-
|
6609 |
-
Object.defineProperty(exports, "__esModule", {
|
6610 |
-
value: true
|
6611 |
-
});
|
6612 |
-
exports.default = ProcessNodes;
|
6613 |
-
|
6614 |
-
var _elementTypes = __webpack_require__(451);
|
6615 |
-
|
6616 |
-
var _elementTypes2 = _interopRequireDefault(_elementTypes);
|
6617 |
-
|
6618 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
6619 |
-
|
6620 |
-
/**
|
6621 |
-
* Tests a htmlparser2 node and returns whether is it a text node at the start and end of the line containing only
|
6622 |
-
* white space. This allows these node types to be excluded from the rendering because they are unnecessary.
|
6623 |
-
*
|
6624 |
-
* @param {Object} node The element object as created by htmlparser2
|
6625 |
-
* @returns {boolean} Whether
|
6626 |
-
*/
|
6627 |
-
var filterOutEmptyTextNodes = function filterOutEmptyTextNodes(node) {
|
6628 |
-
return !(node.type === 'text' && /\r?\n/.test(node.data) && node.data.trim() === '');
|
6629 |
-
};
|
6630 |
-
|
6631 |
-
/**
|
6632 |
-
* Converts a htmlparser2 node to a React element
|
6633 |
-
*
|
6634 |
-
* @param {Object} node The htmlparser2 node to convert
|
6635 |
-
* @param {Number} index The index of the current node
|
6636 |
-
* @returns {React.Element}
|
6637 |
-
*/
|
6638 |
-
var convertNodeToElement = function convertNodeToElement(node, index) {
|
6639 |
-
var key = 'rhp-' + index;
|
6640 |
-
return _elementTypes2.default[node.type](node, key);
|
6641 |
-
};
|
6642 |
-
|
6643 |
-
/**
|
6644 |
-
* Processes the nodes generated by htmlparser2 and convert them all into React elements
|
6645 |
-
*
|
6646 |
-
* @param {Object[]} nodes List of nodes to process
|
6647 |
-
* @returns {React.Element[]} The list of processed React elements
|
6648 |
-
*/
|
6649 |
-
function ProcessNodes(nodes) {
|
6650 |
-
|
6651 |
-
return nodes.filter(filterOutEmptyTextNodes).map(function (node, index) {
|
6652 |
-
return convertNodeToElement(node, index);
|
6653 |
-
});
|
6654 |
-
}
|
6655 |
-
|
6656 |
-
/***/ }),
|
6657 |
-
/* 271 */
|
6658 |
-
/***/ (function(module, exports, __webpack_require__) {
|
6659 |
-
|
6660 |
-
"use strict";
|
6661 |
-
|
6662 |
-
|
6663 |
-
Object.defineProperty(exports, "__esModule", {
|
6664 |
-
value: true
|
6665 |
-
});
|
6666 |
-
|
6667 |
-
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
6668 |
-
|
6669 |
-
exports.default = GeneratePropsFromAttributes;
|
6670 |
-
|
6671 |
-
var _HtmlAttributesToReact = __webpack_require__(454);
|
6672 |
-
|
6673 |
-
var _HtmlAttributesToReact2 = _interopRequireDefault(_HtmlAttributesToReact);
|
6674 |
-
|
6675 |
-
var _InlineStyleToObject = __webpack_require__(457);
|
6676 |
-
|
6677 |
-
var _InlineStyleToObject2 = _interopRequireDefault(_InlineStyleToObject);
|
6678 |
-
|
6679 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
6680 |
-
|
6681 |
-
/**
|
6682 |
-
* Generates props for a React element from an object of HTML attributes
|
6683 |
-
*
|
6684 |
-
* @param {Object} attributes The HTML attributes
|
6685 |
-
* @param {String} key The key to give the react element
|
6686 |
-
*/
|
6687 |
-
function GeneratePropsFromAttributes(attributes, key) {
|
6688 |
-
|
6689 |
-
// generate props
|
6690 |
-
var props = _extends({}, (0, _HtmlAttributesToReact2.default)(attributes), { key: key });
|
6691 |
-
|
6692 |
-
// if there is a style prop then convert it to a React style object
|
6693 |
-
if (props.style) {
|
6694 |
-
props.style = (0, _InlineStyleToObject2.default)(props.style);
|
6695 |
-
}
|
6696 |
-
|
6697 |
-
return props;
|
6698 |
-
}
|
6699 |
-
|
6700 |
-
/***/ }),
|
6701 |
-
/* 272 */,
|
6702 |
-
/* 273 */,
|
6703 |
-
/* 274 */,
|
6704 |
-
/* 275 */,
|
6705 |
-
/* 276 */,
|
6706 |
-
/* 277 */,
|
6707 |
-
/* 278 */,
|
6708 |
-
/* 279 */,
|
6709 |
-
/* 280 */,
|
6710 |
-
/* 281 */,
|
6711 |
-
/* 282 */,
|
6712 |
-
/* 283 */,
|
6713 |
-
/* 284 */,
|
6714 |
-
/* 285 */,
|
6715 |
-
/* 286 */,
|
6716 |
-
/* 287 */,
|
6717 |
-
/* 288 */,
|
6718 |
-
/* 289 */,
|
6719 |
-
/* 290 */,
|
6720 |
-
/* 291 */,
|
6721 |
-
/* 292 */,
|
6722 |
-
/* 293 */,
|
6723 |
-
/* 294 */
|
6724 |
-
/***/ (function(module, exports, __webpack_require__) {
|
6725 |
-
|
6726 |
-
"use strict";
|
6727 |
-
|
6728 |
-
|
6729 |
-
var _propTypes = __webpack_require__(3);
|
6730 |
-
|
6731 |
-
var _propTypes2 = _interopRequireDefault(_propTypes);
|
6732 |
-
|
6733 |
-
var _react = __webpack_require__(2);
|
6734 |
-
|
6735 |
-
var _react2 = _interopRequireDefault(_react);
|
6736 |
-
|
6737 |
-
var _reactRouter = __webpack_require__(26);
|
6738 |
-
|
6739 |
-
var _classnames = __webpack_require__(18);
|
6740 |
-
|
6741 |
-
var _classnames2 = _interopRequireDefault(_classnames);
|
6742 |
-
|
6743 |
-
var _mailpoet = __webpack_require__(4);
|
6744 |
-
|
6745 |
-
var _mailpoet2 = _interopRequireDefault(_mailpoet);
|
6746 |
-
|
6747 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
6748 |
-
|
6749 |
-
var tabs = [{
|
6750 |
-
name: 'knowledgeBase',
|
6751 |
-
label: _mailpoet2.default.I18n.t('tabKnowledgeBaseTitle'),
|
6752 |
-
link: '/knowledgeBase'
|
6753 |
-
}, {
|
6754 |
-
name: 'systemStatus',
|
6755 |
-
label: _mailpoet2.default.I18n.t('tabSystemStatusTitle'),
|
6756 |
-
link: '/systemStatus'
|
6757 |
-
}, {
|
6758 |
-
name: 'systemInfo',
|
6759 |
-
label: _mailpoet2.default.I18n.t('tabSystemInfoTitle'),
|
6760 |
-
link: '/systemInfo'
|
6761 |
-
}, {
|
6762 |
-
name: 'yourPrivacy',
|
6763 |
-
label: _mailpoet2.default.I18n.t('tabYourPrivacyTitle'),
|
6764 |
-
link: '/yourPrivacy'
|
6765 |
-
}];
|
6766 |
-
|
6767 |
-
function Tabs(props) {
|
6768 |
-
var tabLinks = tabs.map(function (tab) {
|
6769 |
-
var tabClasses = (0, _classnames2.default)('nav-tab', { 'nav-tab-active': props.tab === tab.name });
|
6770 |
-
|
6771 |
-
return _react2.default.createElement(
|
6772 |
-
_reactRouter.Link,
|
6773 |
-
{
|
6774 |
-
key: 'tab-' + tab.name,
|
6775 |
-
className: tabClasses,
|
6776 |
-
to: tab.link
|
6777 |
-
},
|
6778 |
-
tab.label
|
6779 |
-
);
|
6780 |
-
});
|
6781 |
-
|
6782 |
-
return _react2.default.createElement(
|
6783 |
-
'h2',
|
6784 |
-
{ className: 'nav-tab-wrapper' },
|
6785 |
-
tabLinks
|
6786 |
-
);
|
6787 |
-
}
|
6788 |
-
|
6789 |
-
Tabs.propTypes = { tab: _propTypes2.default.string };
|
6790 |
-
Tabs.defaultProps = { tab: 'knowledgeBase' };
|
6791 |
-
|
6792 |
-
module.exports = Tabs;
|
6793 |
-
|
6794 |
-
/***/ }),
|
6795 |
-
/* 295 */,
|
6796 |
-
/* 296 */,
|
6797 |
-
/* 297 */,
|
6798 |
-
/* 298 */,
|
6799 |
-
/* 299 */,
|
6800 |
-
/* 300 */,
|
6801 |
-
/* 301 */,
|
6802 |
-
/* 302 */,
|
6803 |
-
/* 303 */,
|
6804 |
-
/* 304 */,
|
6805 |
-
/* 305 */,
|
6806 |
-
/* 306 */,
|
6807 |
-
/* 307 */,
|
6808 |
-
/* 308 */,
|
6809 |
-
/* 309 */,
|
6810 |
-
/* 310 */,
|
6811 |
-
/* 311 */,
|
6812 |
-
/* 312 */,
|
6813 |
-
/* 313 */,
|
6814 |
-
/* 314 */,
|
6815 |
-
/* 315 */,
|
6816 |
-
/* 316 */,
|
6817 |
-
/* 317 */,
|
6818 |
-
/* 318 */,
|
6819 |
-
/* 319 */,
|
6820 |
-
/* 320 */,
|
6821 |
-
/* 321 */,
|
6822 |
-
/* 322 */,
|
6823 |
-
/* 323 */,
|
6824 |
-
/* 324 */,
|
6825 |
-
/* 325 */,
|
6826 |
-
/* 326 */,
|
6827 |
-
/* 327 */,
|
6828 |
-
/* 328 */,
|
6829 |
-
/* 329 */,
|
6830 |
-
/* 330 */,
|
6831 |
-
/* 331 */,
|
6832 |
-
/* 332 */,
|
6833 |
-
/* 333 */,
|
6834 |
-
/* 334 */,
|
6835 |
-
/* 335 */,
|
6836 |
-
/* 336 */,
|
6837 |
-
/* 337 */,
|
6838 |
-
/* 338 */,
|
6839 |
-
/* 339 */,
|
6840 |
-
/* 340 */,
|
6841 |
-
/* 341 */,
|
6842 |
-
/* 342 */,
|
6843 |
-
/* 343 */,
|
6844 |
-
/* 344 */,
|
6845 |
-
/* 345 */,
|
6846 |
-
/* 346 */,
|
6847 |
-
/* 347 */,
|
6848 |
-
/* 348 */,
|
6849 |
-
/* 349 */,
|
6850 |
-
/* 350 */,
|
6851 |
-
/* 351 */,
|
6852 |
-
/* 352 */,
|
6853 |
-
/* 353 */,
|
6854 |
-
/* 354 */,
|
6855 |
-
/* 355 */,
|
6856 |
-
/* 356 */,
|
6857 |
-
/* 357 */,
|
6858 |
-
/* 358 */,
|
6859 |
-
/* 359 */,
|
6860 |
-
/* 360 */,
|
6861 |
-
/* 361 */,
|
6862 |
-
/* 362 */,
|
6863 |
-
/* 363 */,
|
6864 |
-
/* 364 */,
|
6865 |
-
/* 365 */,
|
6866 |
-
/* 366 */,
|
6867 |
-
/* 367 */,
|
6868 |
-
/* 368 */,
|
6869 |
-
/* 369 */,
|
6870 |
-
/* 370 */,
|
6871 |
-
/* 371 */,
|
6872 |
-
/* 372 */,
|
6873 |
-
/* 373 */,
|
6874 |
-
/* 374 */,
|
6875 |
-
/* 375 */,
|
6876 |
-
/* 376 */,
|
6877 |
-
/* 377 */,
|
6878 |
-
/* 378 */,
|
6879 |
-
/* 379 */,
|
6880 |
-
/* 380 */,
|
6881 |
-
/* 381 */,
|
6882 |
-
/* 382 */,
|
6883 |
-
/* 383 */,
|
6884 |
-
/* 384 */,
|
6885 |
-
/* 385 */,
|
6886 |
-
/* 386 */,
|
6887 |
-
/* 387 */,
|
6888 |
-
/* 388 */,
|
6889 |
-
/* 389 */,
|
6890 |
-
/* 390 */,
|
6891 |
-
/* 391 */,
|
6892 |
-
/* 392 */,
|
6893 |
-
/* 393 */,
|
6894 |
-
/* 394 */,
|
6895 |
-
/* 395 */,
|
6896 |
-
/* 396 */,
|
6897 |
-
/* 397 */,
|
6898 |
-
/* 398 */,
|
6899 |
-
/* 399 */,
|
6900 |
-
/* 400 */,
|
6901 |
-
/* 401 */,
|
6902 |
-
/* 402 */,
|
6903 |
-
/* 403 */,
|
6904 |
-
/* 404 */,
|
6905 |
-
/* 405 */,
|
6906 |
-
/* 406 */,
|
6907 |
-
/* 407 */,
|
6908 |
-
/* 408 */,
|
6909 |
-
/* 409 */,
|
6910 |
-
/* 410 */,
|
6911 |
-
/* 411 */,
|
6912 |
-
/* 412 */,
|
6913 |
-
/* 413 */,
|
6914 |
-
/* 414 */,
|
6915 |
-
/* 415 */,
|
6916 |
-
/* 416 */,
|
6917 |
-
/* 417 */
|
6918 |
-
/***/ (function(module, exports, __webpack_require__) {
|
6919 |
-
|
6920 |
-
"use strict";
|
6921 |
-
|
6922 |
-
|
6923 |
-
Object.defineProperty(exports, "__esModule", {
|
6924 |
-
value: true
|
6925 |
-
});
|
6926 |
-
|
6927 |
-
var _HtmlParser = __webpack_require__(418);
|
6928 |
-
|
6929 |
-
var _HtmlParser2 = _interopRequireDefault(_HtmlParser);
|
6930 |
-
|
6931 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
6932 |
-
|
6933 |
-
exports.default = _HtmlParser2.default;
|
6934 |
-
|
6935 |
-
/***/ }),
|
6936 |
-
/* 418 */
|
6937 |
-
/***/ (function(module, exports, __webpack_require__) {
|
6938 |
-
|
6939 |
-
"use strict";
|
6940 |
-
|
6941 |
-
|
6942 |
-
Object.defineProperty(exports, "__esModule", {
|
6943 |
-
value: true
|
6944 |
-
});
|
6945 |
-
exports.default = HtmlParser;
|
6946 |
-
|
6947 |
-
var _htmlparser = __webpack_require__(38);
|
6948 |
-
|
6949 |
-
var _htmlparser2 = _interopRequireDefault(_htmlparser);
|
6950 |
-
|
6951 |
-
var _ProcessNodes = __webpack_require__(270);
|
6952 |
-
|
6953 |
-
var _ProcessNodes2 = _interopRequireDefault(_ProcessNodes);
|
6954 |
-
|
6955 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
6956 |
-
|
6957 |
-
/**
|
6958 |
-
* Parses a HTML string and returns a list of React components generated from it
|
6959 |
-
*
|
6960 |
-
* @param {String} html The HTML to convert into React components
|
6961 |
-
* @returns {Array} List of top level React elements
|
6962 |
-
*/
|
6963 |
-
function HtmlParser(html) {
|
6964 |
-
var nodes = _htmlparser2.default.parseDOM(html);
|
6965 |
-
return (0, _ProcessNodes2.default)(nodes);
|
6966 |
-
}
|
6967 |
-
|
6968 |
-
/***/ }),
|
6969 |
-
/* 419 */
|
6970 |
-
/***/ (function(module, exports) {
|
6971 |
-
|
6972 |
-
module.exports = {"0":65533,"128":8364,"130":8218,"131":402,"132":8222,"133":8230,"134":8224,"135":8225,"136":710,"137":8240,"138":352,"139":8249,"140":338,"142":381,"145":8216,"146":8217,"147":8220,"148":8221,"149":8226,"150":8211,"151":8212,"152":732,"153":8482,"154":353,"155":8250,"156":339,"158":382,"159":376}
|
6973 |
-
|
6974 |
-
/***/ }),
|
6975 |
-
/* 420 */
|
6976 |
-
/***/ (function(module, exports, __webpack_require__) {
|
6977 |
-
|
6978 |
-
var ElementType = __webpack_require__(45);
|
6979 |
-
|
6980 |
-
var re_whitespace = /\s+/g;
|
6981 |
-
var NodePrototype = __webpack_require__(262);
|
6982 |
-
var ElementPrototype = __webpack_require__(421);
|
6983 |
-
|
6984 |
-
function DomHandler(callback, options, elementCB){
|
6985 |
-
if(typeof callback === "object"){
|
6986 |
-
elementCB = options;
|
6987 |
-
options = callback;
|
6988 |
-
callback = null;
|
6989 |
-
} else if(typeof options === "function"){
|
6990 |
-
elementCB = options;
|
6991 |
-
options = defaultOpts;
|
6992 |
-
}
|
6993 |
-
this._callback = callback;
|
6994 |
-
this._options = options || defaultOpts;
|
6995 |
-
this._elementCB = elementCB;
|
6996 |
-
this.dom = [];
|
6997 |
-
this._done = false;
|
6998 |
-
this._tagStack = [];
|
6999 |
-
this._parser = this._parser || null;
|
7000 |
-
}
|
7001 |
-
|
7002 |
-
//default options
|
7003 |
-
var defaultOpts = {
|
7004 |
-
normalizeWhitespace: false, //Replace all whitespace with single spaces
|
7005 |
-
withStartIndices: false, //Add startIndex properties to nodes
|
7006 |
-
withEndIndices: false, //Add endIndex properties to nodes
|
7007 |
-
};
|
7008 |
-
|
7009 |
-
DomHandler.prototype.onparserinit = function(parser){
|
7010 |
-
this._parser = parser;
|
7011 |
-
};
|
7012 |
-
|
7013 |
-
//Resets the handler back to starting state
|
7014 |
-
DomHandler.prototype.onreset = function(){
|
7015 |
-
DomHandler.call(this, this._callback, this._options, this._elementCB);
|
7016 |
-
};
|
7017 |
-
|
7018 |
-
//Signals the handler that parsing is done
|
7019 |
-
DomHandler.prototype.onend = function(){
|
7020 |
-
if(this._done) return;
|
7021 |
-
this._done = true;
|
7022 |
-
this._parser = null;
|
7023 |
-
this._handleCallback(null);
|
7024 |
-
};
|
7025 |
-
|
7026 |
-
DomHandler.prototype._handleCallback =
|
7027 |
-
DomHandler.prototype.onerror = function(error){
|
7028 |
-
if(typeof this._callback === "function"){
|
7029 |
-
this._callback(error, this.dom);
|
7030 |
-
} else {
|
7031 |
-
if(error) throw error;
|
7032 |
-
}
|
7033 |
-
};
|
7034 |
-
|
7035 |
-
DomHandler.prototype.onclosetag = function(){
|
7036 |
-
//if(this._tagStack.pop().name !== name) this._handleCallback(Error("Tagname didn't match!"));
|
7037 |
-
|
7038 |
-
var elem = this._tagStack.pop();
|
7039 |
-
|
7040 |
-
if(this._options.withEndIndices){
|
7041 |
-
elem.endIndex = this._parser.endIndex;
|
7042 |
-
}
|
7043 |
-
|
7044 |
-
if(this._elementCB) this._elementCB(elem);
|
7045 |
-
};
|
7046 |
-
|
7047 |
-
DomHandler.prototype._createDomElement = function(properties){
|
7048 |
-
if (!this._options.withDomLvl1) return properties;
|
7049 |
-
|
7050 |
-
var element;
|
7051 |
-
if (properties.type === "tag") {
|
7052 |
-
element = Object.create(ElementPrototype);
|
7053 |
-
} else {
|
7054 |
-
element = Object.create(NodePrototype);
|
7055 |
-
}
|
7056 |
-
|
7057 |
-
for (var key in properties) {
|
7058 |
-
if (properties.hasOwnProperty(key)) {
|
7059 |
-
element[key] = properties[key];
|
7060 |
-
}
|
7061 |
-
}
|
7062 |
-
|
7063 |
-
return element;
|
7064 |
-
};
|
7065 |
-
|
7066 |
-
DomHandler.prototype._addDomElement = function(element){
|
7067 |
-
var parent = this._tagStack[this._tagStack.length - 1];
|
7068 |
-
var siblings = parent ? parent.children : this.dom;
|
7069 |
-
var previousSibling = siblings[siblings.length - 1];
|
7070 |
-
|
7071 |
-
element.next = null;
|
7072 |
-
|
7073 |
-
if(this._options.withStartIndices){
|
7074 |
-
element.startIndex = this._parser.startIndex;
|
7075 |
-
}
|
7076 |
-
if(this._options.withEndIndices){
|
7077 |
-
element.endIndex = this._parser.endIndex;
|
7078 |
-
}
|
7079 |
-
|
7080 |
-
if(previousSibling){
|
7081 |
-
element.prev = previousSibling;
|
7082 |
-
previousSibling.next = element;
|
7083 |
-
} else {
|
7084 |
-
element.prev = null;
|
7085 |
-
}
|
7086 |
-
|
7087 |
-
siblings.push(element);
|
7088 |
-
element.parent = parent || null;
|
7089 |
-
};
|
7090 |
-
|
7091 |
-
DomHandler.prototype.onopentag = function(name, attribs){
|
7092 |
-
var properties = {
|
7093 |
-
type: name === "script" ? ElementType.Script : name === "style" ? ElementType.Style : ElementType.Tag,
|
7094 |
-
name: name,
|
7095 |
-
attribs: attribs,
|
7096 |
-
children: []
|
7097 |
-
};
|
7098 |
-
|
7099 |
-
var element = this._createDomElement(properties);
|
7100 |
-
|
7101 |
-
this._addDomElement(element);
|
7102 |
-
|
7103 |
-
this._tagStack.push(element);
|
7104 |
-
};
|
7105 |
-
|
7106 |
-
DomHandler.prototype.ontext = function(data){
|
7107 |
-
//the ignoreWhitespace is officially dropped, but for now,
|
7108 |
-
//it's an alias for normalizeWhitespace
|
7109 |
-
var normalize = this._options.normalizeWhitespace || this._options.ignoreWhitespace;
|
7110 |
-
|
7111 |
-
var lastTag;
|
7112 |
-
|
7113 |
-
if(!this._tagStack.length && this.dom.length && (lastTag = this.dom[this.dom.length-1]).type === ElementType.Text){
|
7114 |
-
if(normalize){
|
7115 |
-
lastTag.data = (lastTag.data + data).replace(re_whitespace, " ");
|
7116 |
-
} else {
|
7117 |
-
lastTag.data += data;
|
7118 |
-
}
|
7119 |
-
} else {
|
7120 |
-
if(
|
7121 |
-
this._tagStack.length &&
|
7122 |
-
(lastTag = this._tagStack[this._tagStack.length - 1]) &&
|
7123 |
-
(lastTag = lastTag.children[lastTag.children.length - 1]) &&
|
7124 |
-
lastTag.type === ElementType.Text
|
7125 |
-
){
|
7126 |
-
if(normalize){
|
7127 |
-
lastTag.data = (lastTag.data + data).replace(re_whitespace, " ");
|
7128 |
-
} else {
|
7129 |
-
lastTag.data += data;
|
7130 |
-
}
|
7131 |
-
} else {
|
7132 |
-
if(normalize){
|
7133 |
-
data = data.replace(re_whitespace, " ");
|
7134 |
-
}
|
7135 |
-
|
7136 |
-
var element = this._createDomElement({
|
7137 |
-
data: data,
|
7138 |
-
type: ElementType.Text
|
7139 |
-
});
|
7140 |
-
|
7141 |
-
this._addDomElement(element);
|
7142 |
-
}
|
7143 |
-
}
|
7144 |
-
};
|
7145 |
-
|
7146 |
-
DomHandler.prototype.oncomment = function(data){
|
7147 |
-
var lastTag = this._tagStack[this._tagStack.length - 1];
|
7148 |
-
|
7149 |
-
if(lastTag && lastTag.type === ElementType.Comment){
|
7150 |
-
lastTag.data += data;
|
7151 |
-
return;
|
7152 |
-
}
|
7153 |
-
|
7154 |
-
var properties = {
|
7155 |
-
data: data,
|
7156 |
-
type: ElementType.Comment
|
7157 |
-
};
|
7158 |
-
|
7159 |
-
var element = this._createDomElement(properties);
|
7160 |
-
|
7161 |
-
this._addDomElement(element);
|
7162 |
-
this._tagStack.push(element);
|
7163 |
-
};
|
7164 |
-
|
7165 |
-
DomHandler.prototype.oncdatastart = function(){
|
7166 |
-
var properties = {
|
7167 |
-
children: [{
|
7168 |
-
data: "",
|
7169 |
-
type: ElementType.Text
|
7170 |
-
}],
|
7171 |
-
type: ElementType.CDATA
|
7172 |
-
};
|
7173 |
-
|
7174 |
-
var element = this._createDomElement(properties);
|
7175 |
-
|
7176 |
-
this._addDomElement(element);
|
7177 |
-
this._tagStack.push(element);
|
7178 |
-
};
|
7179 |
-
|
7180 |
-
DomHandler.prototype.oncommentend = DomHandler.prototype.oncdataend = function(){
|
7181 |
-
this._tagStack.pop();
|
7182 |
-
};
|
7183 |
-
|
7184 |
-
DomHandler.prototype.onprocessinginstruction = function(name, data){
|
7185 |
-
var element = this._createDomElement({
|
7186 |
-
name: name,
|
7187 |
-
data: data,
|
7188 |
-
type: ElementType.Directive
|
7189 |
-
});
|
7190 |
-
|
7191 |
-
this._addDomElement(element);
|
7192 |
-
};
|
7193 |
-
|
7194 |
-
module.exports = DomHandler;
|
7195 |
-
|
7196 |
-
|
7197 |
-
/***/ }),
|
7198 |
-
/* 421 */
|
7199 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7200 |
-
|
7201 |
-
// DOM-Level-1-compliant structure
|
7202 |
-
var NodePrototype = __webpack_require__(262);
|
7203 |
-
var ElementPrototype = module.exports = Object.create(NodePrototype);
|
7204 |
-
|
7205 |
-
var domLvl1 = {
|
7206 |
-
tagName: "name"
|
7207 |
-
};
|
7208 |
-
|
7209 |
-
Object.keys(domLvl1).forEach(function(key) {
|
7210 |
-
var shorthand = domLvl1[key];
|
7211 |
-
Object.defineProperty(ElementPrototype, key, {
|
7212 |
-
get: function() {
|
7213 |
-
return this[shorthand] || null;
|
7214 |
-
},
|
7215 |
-
set: function(val) {
|
7216 |
-
this[shorthand] = val;
|
7217 |
-
return val;
|
7218 |
-
}
|
7219 |
-
});
|
7220 |
-
});
|
7221 |
-
|
7222 |
-
|
7223 |
-
/***/ }),
|
7224 |
-
/* 422 */
|
7225 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7226 |
-
|
7227 |
-
var index = __webpack_require__(38),
|
7228 |
-
DomHandler = index.DomHandler,
|
7229 |
-
DomUtils = index.DomUtils;
|
7230 |
-
|
7231 |
-
//TODO: make this a streamable handler
|
7232 |
-
function FeedHandler(callback, options){
|
7233 |
-
this.init(callback, options);
|
7234 |
-
}
|
7235 |
-
|
7236 |
-
__webpack_require__(22)(FeedHandler, DomHandler);
|
7237 |
-
|
7238 |
-
FeedHandler.prototype.init = DomHandler;
|
7239 |
-
|
7240 |
-
function getElements(what, where){
|
7241 |
-
return DomUtils.getElementsByTagName(what, where, true);
|
7242 |
-
}
|
7243 |
-
function getOneElement(what, where){
|
7244 |
-
return DomUtils.getElementsByTagName(what, where, true, 1)[0];
|
7245 |
-
}
|
7246 |
-
function fetch(what, where, recurse){
|
7247 |
-
return DomUtils.getText(
|
7248 |
-
DomUtils.getElementsByTagName(what, where, recurse, 1)
|
7249 |
-
).trim();
|
7250 |
-
}
|
7251 |
-
|
7252 |
-
function addConditionally(obj, prop, what, where, recurse){
|
7253 |
-
var tmp = fetch(what, where, recurse);
|
7254 |
-
if(tmp) obj[prop] = tmp;
|
7255 |
-
}
|
7256 |
-
|
7257 |
-
var isValidFeed = function(value){
|
7258 |
-
return value === "rss" || value === "feed" || value === "rdf:RDF";
|
7259 |
-
};
|
7260 |
-
|
7261 |
-
FeedHandler.prototype.onend = function(){
|
7262 |
-
var feed = {},
|
7263 |
-
feedRoot = getOneElement(isValidFeed, this.dom),
|
7264 |
-
tmp, childs;
|
7265 |
-
|
7266 |
-
if(feedRoot){
|
7267 |
-
if(feedRoot.name === "feed"){
|
7268 |
-
childs = feedRoot.children;
|
7269 |
-
|
7270 |
-
feed.type = "atom";
|
7271 |
-
addConditionally(feed, "id", "id", childs);
|
7272 |
-
addConditionally(feed, "title", "title", childs);
|
7273 |
-
if((tmp = getOneElement("link", childs)) && (tmp = tmp.attribs) && (tmp = tmp.href)) feed.link = tmp;
|
7274 |
-
addConditionally(feed, "description", "subtitle", childs);
|
7275 |
-
if((tmp = fetch("updated", childs))) feed.updated = new Date(tmp);
|
7276 |
-
addConditionally(feed, "author", "email", childs, true);
|
7277 |
-
|
7278 |
-
feed.items = getElements("entry", childs).map(function(item){
|
7279 |
-
var entry = {}, tmp;
|
7280 |
-
|
7281 |
-
item = item.children;
|
7282 |
-
|
7283 |
-
addConditionally(entry, "id", "id", item);
|
7284 |
-
addConditionally(entry, "title", "title", item);
|
7285 |
-
if((tmp = getOneElement("link", item)) && (tmp = tmp.attribs) && (tmp = tmp.href)) entry.link = tmp;
|
7286 |
-
if((tmp = fetch("summary", item) || fetch("content", item))) entry.description = tmp;
|
7287 |
-
if((tmp = fetch("updated", item))) entry.pubDate = new Date(tmp);
|
7288 |
-
return entry;
|
7289 |
-
});
|
7290 |
-
} else {
|
7291 |
-
childs = getOneElement("channel", feedRoot.children).children;
|
7292 |
-
|
7293 |
-
feed.type = feedRoot.name.substr(0, 3);
|
7294 |
-
feed.id = "";
|
7295 |
-
addConditionally(feed, "title", "title", childs);
|
7296 |
-
addConditionally(feed, "link", "link", childs);
|
7297 |
-
addConditionally(feed, "description", "description", childs);
|
7298 |
-
if((tmp = fetch("lastBuildDate", childs))) feed.updated = new Date(tmp);
|
7299 |
-
addConditionally(feed, "author", "managingEditor", childs, true);
|
7300 |
-
|
7301 |
-
feed.items = getElements("item", feedRoot.children).map(function(item){
|
7302 |
-
var entry = {}, tmp;
|
7303 |
-
|
7304 |
-
item = item.children;
|
7305 |
-
|
7306 |
-
addConditionally(entry, "id", "guid", item);
|
7307 |
-
addConditionally(entry, "title", "title", item);
|
7308 |
-
addConditionally(entry, "link", "link", item);
|
7309 |
-
addConditionally(entry, "description", "description", item);
|
7310 |
-
if((tmp = fetch("pubDate", item))) entry.pubDate = new Date(tmp);
|
7311 |
-
return entry;
|
7312 |
-
});
|
7313 |
-
}
|
7314 |
-
}
|
7315 |
-
this.dom = feed;
|
7316 |
-
DomHandler.prototype._handleCallback.call(
|
7317 |
-
this, feedRoot ? null : Error("couldn't find root of feed")
|
7318 |
-
);
|
7319 |
-
};
|
7320 |
-
|
7321 |
-
module.exports = FeedHandler;
|
7322 |
-
|
7323 |
-
|
7324 |
-
/***/ }),
|
7325 |
-
/* 423 */
|
7326 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7327 |
-
|
7328 |
-
module.exports = Stream;
|
7329 |
-
|
7330 |
-
var Parser = __webpack_require__(263);
|
7331 |
-
|
7332 |
-
function Stream(options){
|
7333 |
-
Parser.call(this, new Cbs(this), options);
|
7334 |
-
}
|
7335 |
-
|
7336 |
-
__webpack_require__(22)(Stream, Parser);
|
7337 |
-
|
7338 |
-
Stream.prototype.readable = true;
|
7339 |
-
|
7340 |
-
function Cbs(scope){
|
7341 |
-
this.scope = scope;
|
7342 |
-
}
|
7343 |
-
|
7344 |
-
var EVENTS = __webpack_require__(38).EVENTS;
|
7345 |
-
|
7346 |
-
Object.keys(EVENTS).forEach(function(name){
|
7347 |
-
if(EVENTS[name] === 0){
|
7348 |
-
Cbs.prototype["on" + name] = function(){
|
7349 |
-
this.scope.emit(name);
|
7350 |
-
};
|
7351 |
-
} else if(EVENTS[name] === 1){
|
7352 |
-
Cbs.prototype["on" + name] = function(a){
|
7353 |
-
this.scope.emit(name, a);
|
7354 |
-
};
|
7355 |
-
} else if(EVENTS[name] === 2){
|
7356 |
-
Cbs.prototype["on" + name] = function(a, b){
|
7357 |
-
this.scope.emit(name, a, b);
|
7358 |
-
};
|
7359 |
-
} else {
|
7360 |
-
throw Error("wrong number of arguments!");
|
7361 |
-
}
|
7362 |
-
});
|
7363 |
-
|
7364 |
-
/***/ }),
|
7365 |
-
/* 424 */
|
7366 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7367 |
-
|
7368 |
-
// Copyright Joyent, Inc. and other Node contributors.
|
7369 |
-
//
|
7370 |
-
// Permission is hereby granted, free of charge, to any person obtaining a
|
7371 |
-
// copy of this software and associated documentation files (the
|
7372 |
-
// "Software"), to deal in the Software without restriction, including
|
7373 |
-
// without limitation the rights to use, copy, modify, merge, publish,
|
7374 |
-
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
7375 |
-
// persons to whom the Software is furnished to do so, subject to the
|
7376 |
-
// following conditions:
|
7377 |
-
//
|
7378 |
-
// The above copyright notice and this permission notice shall be included
|
7379 |
-
// in all copies or substantial portions of the Software.
|
7380 |
-
//
|
7381 |
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
7382 |
-
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
7383 |
-
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
7384 |
-
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
7385 |
-
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
7386 |
-
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
7387 |
-
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
7388 |
-
|
7389 |
-
module.exports = Stream;
|
7390 |
-
|
7391 |
-
var EE = __webpack_require__(55).EventEmitter;
|
7392 |
-
var inherits = __webpack_require__(22);
|
7393 |
-
|
7394 |
-
inherits(Stream, EE);
|
7395 |
-
Stream.Readable = __webpack_require__(88);
|
7396 |
-
Stream.Writable = __webpack_require__(432);
|
7397 |
-
Stream.Duplex = __webpack_require__(433);
|
7398 |
-
Stream.Transform = __webpack_require__(434);
|
7399 |
-
Stream.PassThrough = __webpack_require__(435);
|
7400 |
-
|
7401 |
-
// Backwards-compat with node 0.4.x
|
7402 |
-
Stream.Stream = Stream;
|
7403 |
-
|
7404 |
-
|
7405 |
-
|
7406 |
-
// old-style streams. Note that the pipe method (the only relevant
|
7407 |
-
// part of this class) is overridden in the Readable class.
|
7408 |
-
|
7409 |
-
function Stream() {
|
7410 |
-
EE.call(this);
|
7411 |
-
}
|
7412 |
-
|
7413 |
-
Stream.prototype.pipe = function(dest, options) {
|
7414 |
-
var source = this;
|
7415 |
-
|
7416 |
-
function ondata(chunk) {
|
7417 |
-
if (dest.writable) {
|
7418 |
-
if (false === dest.write(chunk) && source.pause) {
|
7419 |
-
source.pause();
|
7420 |
-
}
|
7421 |
-
}
|
7422 |
-
}
|
7423 |
-
|
7424 |
-
source.on('data', ondata);
|
7425 |
-
|
7426 |
-
function ondrain() {
|
7427 |
-
if (source.readable && source.resume) {
|
7428 |
-
source.resume();
|
7429 |
-
}
|
7430 |
-
}
|
7431 |
-
|
7432 |
-
dest.on('drain', ondrain);
|
7433 |
-
|
7434 |
-
// If the 'end' option is not supplied, dest.end() will be called when
|
7435 |
-
// source gets the 'end' or 'close' events. Only dest.end() once.
|
7436 |
-
if (!dest._isStdio && (!options || options.end !== false)) {
|
7437 |
-
source.on('end', onend);
|
7438 |
-
source.on('close', onclose);
|
7439 |
-
}
|
7440 |
-
|
7441 |
-
var didOnEnd = false;
|
7442 |
-
function onend() {
|
7443 |
-
if (didOnEnd) return;
|
7444 |
-
didOnEnd = true;
|
7445 |
-
|
7446 |
-
dest.end();
|
7447 |
-
}
|
7448 |
-
|
7449 |
-
|
7450 |
-
function onclose() {
|
7451 |
-
if (didOnEnd) return;
|
7452 |
-
didOnEnd = true;
|
7453 |
-
|
7454 |
-
if (typeof dest.destroy === 'function') dest.destroy();
|
7455 |
-
}
|
7456 |
-
|
7457 |
-
// don't leave dangling pipes when there are errors.
|
7458 |
-
function onerror(er) {
|
7459 |
-
cleanup();
|
7460 |
-
if (EE.listenerCount(this, 'error') === 0) {
|
7461 |
-
throw er; // Unhandled stream error in pipe.
|
7462 |
-
}
|
7463 |
-
}
|
7464 |
-
|
7465 |
-
source.on('error', onerror);
|
7466 |
-
dest.on('error', onerror);
|
7467 |
-
|
7468 |
-
// remove all the event listeners that were added.
|
7469 |
-
function cleanup() {
|
7470 |
-
source.removeListener('data', ondata);
|
7471 |
-
dest.removeListener('drain', ondrain);
|
7472 |
-
|
7473 |
-
source.removeListener('end', onend);
|
7474 |
-
source.removeListener('close', onclose);
|
7475 |
-
|
7476 |
-
source.removeListener('error', onerror);
|
7477 |
-
dest.removeListener('error', onerror);
|
7478 |
-
|
7479 |
-
source.removeListener('end', cleanup);
|
7480 |
-
source.removeListener('close', cleanup);
|
7481 |
-
|
7482 |
-
dest.removeListener('close', cleanup);
|
7483 |
-
}
|
7484 |
-
|
7485 |
-
source.on('end', cleanup);
|
7486 |
-
source.on('close', cleanup);
|
7487 |
-
|
7488 |
-
dest.on('close', cleanup);
|
7489 |
-
|
7490 |
-
dest.emit('pipe', source);
|
7491 |
-
|
7492 |
-
// Allow for unix-like usage: A.pipe(B).pipe(C)
|
7493 |
-
return dest;
|
7494 |
-
};
|
7495 |
-
|
7496 |
-
|
7497 |
-
/***/ }),
|
7498 |
-
/* 425 */
|
7499 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7500 |
-
|
7501 |
-
"use strict";
|
7502 |
-
|
7503 |
-
|
7504 |
-
exports.byteLength = byteLength
|
7505 |
-
exports.toByteArray = toByteArray
|
7506 |
-
exports.fromByteArray = fromByteArray
|
7507 |
-
|
7508 |
-
var lookup = []
|
7509 |
-
var revLookup = []
|
7510 |
-
var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
|
7511 |
-
|
7512 |
-
var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
|
7513 |
-
for (var i = 0, len = code.length; i < len; ++i) {
|
7514 |
-
lookup[i] = code[i]
|
7515 |
-
revLookup[code.charCodeAt(i)] = i
|
7516 |
-
}
|
7517 |
-
|
7518 |
-
revLookup['-'.charCodeAt(0)] = 62
|
7519 |
-
revLookup['_'.charCodeAt(0)] = 63
|
7520 |
-
|
7521 |
-
function placeHoldersCount (b64) {
|
7522 |
-
var len = b64.length
|
7523 |
-
if (len % 4 > 0) {
|
7524 |
-
throw new Error('Invalid string. Length must be a multiple of 4')
|
7525 |
-
}
|
7526 |
-
|
7527 |
-
// the number of equal signs (place holders)
|
7528 |
-
// if there are two placeholders, than the two characters before it
|
7529 |
-
// represent one byte
|
7530 |
-
// if there is only one, then the three characters before it represent 2 bytes
|
7531 |
-
// this is just a cheap hack to not do indexOf twice
|
7532 |
-
return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0
|
7533 |
-
}
|
7534 |
-
|
7535 |
-
function byteLength (b64) {
|
7536 |
-
// base64 is 4/3 + up to two characters of the original data
|
7537 |
-
return (b64.length * 3 / 4) - placeHoldersCount(b64)
|
7538 |
-
}
|
7539 |
-
|
7540 |
-
function toByteArray (b64) {
|
7541 |
-
var i, l, tmp, placeHolders, arr
|
7542 |
-
var len = b64.length
|
7543 |
-
placeHolders = placeHoldersCount(b64)
|
7544 |
-
|
7545 |
-
arr = new Arr((len * 3 / 4) - placeHolders)
|
7546 |
-
|
7547 |
-
// if there are placeholders, only get up to the last complete 4 chars
|
7548 |
-
l = placeHolders > 0 ? len - 4 : len
|
7549 |
-
|
7550 |
-
var L = 0
|
7551 |
-
|
7552 |
-
for (i = 0; i < l; i += 4) {
|
7553 |
-
tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]
|
7554 |
-
arr[L++] = (tmp >> 16) & 0xFF
|
7555 |
-
arr[L++] = (tmp >> 8) & 0xFF
|
7556 |
-
arr[L++] = tmp & 0xFF
|
7557 |
-
}
|
7558 |
-
|
7559 |
-
if (placeHolders === 2) {
|
7560 |
-
tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)
|
7561 |
-
arr[L++] = tmp & 0xFF
|
7562 |
-
} else if (placeHolders === 1) {
|
7563 |
-
tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)
|
7564 |
-
arr[L++] = (tmp >> 8) & 0xFF
|
7565 |
-
arr[L++] = tmp & 0xFF
|
7566 |
-
}
|
7567 |
-
|
7568 |
-
return arr
|
7569 |
-
}
|
7570 |
-
|
7571 |
-
function tripletToBase64 (num) {
|
7572 |
-
return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]
|
7573 |
-
}
|
7574 |
-
|
7575 |
-
function encodeChunk (uint8, start, end) {
|
7576 |
-
var tmp
|
7577 |
-
var output = []
|
7578 |
-
for (var i = start; i < end; i += 3) {
|
7579 |
-
tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])
|
7580 |
-
output.push(tripletToBase64(tmp))
|
7581 |
-
}
|
7582 |
-
return output.join('')
|
7583 |
-
}
|
7584 |
-
|
7585 |
-
function fromByteArray (uint8) {
|
7586 |
-
var tmp
|
7587 |
-
var len = uint8.length
|
7588 |
-
var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
|
7589 |
-
var output = ''
|
7590 |
-
var parts = []
|
7591 |
-
var maxChunkLength = 16383 // must be multiple of 3
|
7592 |
-
|
7593 |
-
// go through the array every three bytes, we'll deal with trailing stuff later
|
7594 |
-
for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
|
7595 |
-
parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))
|
7596 |
-
}
|
7597 |
-
|
7598 |
-
// pad the end with zeros, but make sure to not forget the extra bytes
|
7599 |
-
if (extraBytes === 1) {
|
7600 |
-
tmp = uint8[len - 1]
|
7601 |
-
output += lookup[tmp >> 2]
|
7602 |
-
output += lookup[(tmp << 4) & 0x3F]
|
7603 |
-
output += '=='
|
7604 |
-
} else if (extraBytes === 2) {
|
7605 |
-
tmp = (uint8[len - 2] << 8) + (uint8[len - 1])
|
7606 |
-
output += lookup[tmp >> 10]
|
7607 |
-
output += lookup[(tmp >> 4) & 0x3F]
|
7608 |
-
output += lookup[(tmp << 2) & 0x3F]
|
7609 |
-
output += '='
|
7610 |
-
}
|
7611 |
-
|
7612 |
-
parts.push(output)
|
7613 |
-
|
7614 |
-
return parts.join('')
|
7615 |
-
}
|
7616 |
-
|
7617 |
-
|
7618 |
-
/***/ }),
|
7619 |
-
/* 426 */
|
7620 |
-
/***/ (function(module, exports) {
|
7621 |
-
|
7622 |
-
exports.read = function (buffer, offset, isLE, mLen, nBytes) {
|
7623 |
-
var e, m
|
7624 |
-
var eLen = nBytes * 8 - mLen - 1
|
7625 |
-
var eMax = (1 << eLen) - 1
|
7626 |
-
var eBias = eMax >> 1
|
7627 |
-
var nBits = -7
|
7628 |
-
var i = isLE ? (nBytes - 1) : 0
|
7629 |
-
var d = isLE ? -1 : 1
|
7630 |
-
var s = buffer[offset + i]
|
7631 |
-
|
7632 |
-
i += d
|
7633 |
-
|
7634 |
-
e = s & ((1 << (-nBits)) - 1)
|
7635 |
-
s >>= (-nBits)
|
7636 |
-
nBits += eLen
|
7637 |
-
for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}
|
7638 |
-
|
7639 |
-
m = e & ((1 << (-nBits)) - 1)
|
7640 |
-
e >>= (-nBits)
|
7641 |
-
nBits += mLen
|
7642 |
-
for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}
|
7643 |
-
|
7644 |
-
if (e === 0) {
|
7645 |
-
e = 1 - eBias
|
7646 |
-
} else if (e === eMax) {
|
7647 |
-
return m ? NaN : ((s ? -1 : 1) * Infinity)
|
7648 |
-
} else {
|
7649 |
-
m = m + Math.pow(2, mLen)
|
7650 |
-
e = e - eBias
|
7651 |
-
}
|
7652 |
-
return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
|
7653 |
-
}
|
7654 |
-
|
7655 |
-
exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
|
7656 |
-
var e, m, c
|
7657 |
-
var eLen = nBytes * 8 - mLen - 1
|
7658 |
-
var eMax = (1 << eLen) - 1
|
7659 |
-
var eBias = eMax >> 1
|
7660 |
-
var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
|
7661 |
-
var i = isLE ? 0 : (nBytes - 1)
|
7662 |
-
var d = isLE ? 1 : -1
|
7663 |
-
var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
|
7664 |
-
|
7665 |
-
value = Math.abs(value)
|
7666 |
-
|
7667 |
-
if (isNaN(value) || value === Infinity) {
|
7668 |
-
m = isNaN(value) ? 1 : 0
|
7669 |
-
e = eMax
|
7670 |
-
} else {
|
7671 |
-
e = Math.floor(Math.log(value) / Math.LN2)
|
7672 |
-
if (value * (c = Math.pow(2, -e)) < 1) {
|
7673 |
-
e--
|
7674 |
-
c *= 2
|
7675 |
-
}
|
7676 |
-
if (e + eBias >= 1) {
|
7677 |
-
value += rt / c
|
7678 |
-
} else {
|
7679 |
-
value += rt * Math.pow(2, 1 - eBias)
|
7680 |
-
}
|
7681 |
-
if (value * c >= 2) {
|
7682 |
-
e++
|
7683 |
-
c /= 2
|
7684 |
-
}
|
7685 |
-
|
7686 |
-
if (e + eBias >= eMax) {
|
7687 |
-
m = 0
|
7688 |
-
e = eMax
|
7689 |
-
} else if (e + eBias >= 1) {
|
7690 |
-
m = (value * c - 1) * Math.pow(2, mLen)
|
7691 |
-
e = e + eBias
|
7692 |
-
} else {
|
7693 |
-
m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
|
7694 |
-
e = 0
|
7695 |
-
}
|
7696 |
-
}
|
7697 |
-
|
7698 |
-
for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
|
7699 |
-
|
7700 |
-
e = (e << mLen) | m
|
7701 |
-
eLen += mLen
|
7702 |
-
for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
|
7703 |
-
|
7704 |
-
buffer[offset + i - d] |= s * 128
|
7705 |
-
}
|
7706 |
-
|
7707 |
-
|
7708 |
-
/***/ }),
|
7709 |
-
/* 427 */
|
7710 |
-
/***/ (function(module, exports) {
|
7711 |
-
|
7712 |
-
/* (ignored) */
|
7713 |
-
|
7714 |
-
/***/ }),
|
7715 |
-
/* 428 */
|
7716 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7717 |
-
|
7718 |
-
"use strict";
|
7719 |
-
|
7720 |
-
|
7721 |
-
/*<replacement>*/
|
7722 |
-
|
7723 |
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
7724 |
-
|
7725 |
-
var Buffer = __webpack_require__(57).Buffer;
|
7726 |
-
/*</replacement>*/
|
7727 |
-
|
7728 |
-
function copyBuffer(src, target, offset) {
|
7729 |
-
src.copy(target, offset);
|
7730 |
-
}
|
7731 |
-
|
7732 |
-
module.exports = function () {
|
7733 |
-
function BufferList() {
|
7734 |
-
_classCallCheck(this, BufferList);
|
7735 |
-
|
7736 |
-
this.head = null;
|
7737 |
-
this.tail = null;
|
7738 |
-
this.length = 0;
|
7739 |
-
}
|
7740 |
-
|
7741 |
-
BufferList.prototype.push = function push(v) {
|
7742 |
-
var entry = { data: v, next: null };
|
7743 |
-
if (this.length > 0) this.tail.next = entry;else this.head = entry;
|
7744 |
-
this.tail = entry;
|
7745 |
-
++this.length;
|
7746 |
-
};
|
7747 |
-
|
7748 |
-
BufferList.prototype.unshift = function unshift(v) {
|
7749 |
-
var entry = { data: v, next: this.head };
|
7750 |
-
if (this.length === 0) this.tail = entry;
|
7751 |
-
this.head = entry;
|
7752 |
-
++this.length;
|
7753 |
-
};
|
7754 |
-
|
7755 |
-
BufferList.prototype.shift = function shift() {
|
7756 |
-
if (this.length === 0) return;
|
7757 |
-
var ret = this.head.data;
|
7758 |
-
if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
|
7759 |
-
--this.length;
|
7760 |
-
return ret;
|
7761 |
-
};
|
7762 |
-
|
7763 |
-
BufferList.prototype.clear = function clear() {
|
7764 |
-
this.head = this.tail = null;
|
7765 |
-
this.length = 0;
|
7766 |
-
};
|
7767 |
-
|
7768 |
-
BufferList.prototype.join = function join(s) {
|
7769 |
-
if (this.length === 0) return '';
|
7770 |
-
var p = this.head;
|
7771 |
-
var ret = '' + p.data;
|
7772 |
-
while (p = p.next) {
|
7773 |
-
ret += s + p.data;
|
7774 |
-
}return ret;
|
7775 |
-
};
|
7776 |
-
|
7777 |
-
BufferList.prototype.concat = function concat(n) {
|
7778 |
-
if (this.length === 0) return Buffer.alloc(0);
|
7779 |
-
if (this.length === 1) return this.head.data;
|
7780 |
-
var ret = Buffer.allocUnsafe(n >>> 0);
|
7781 |
-
var p = this.head;
|
7782 |
-
var i = 0;
|
7783 |
-
while (p) {
|
7784 |
-
copyBuffer(p.data, ret, i);
|
7785 |
-
i += p.data.length;
|
7786 |
-
p = p.next;
|
7787 |
-
}
|
7788 |
-
return ret;
|
7789 |
-
};
|
7790 |
-
|
7791 |
-
return BufferList;
|
7792 |
-
}();
|
7793 |
-
|
7794 |
-
/***/ }),
|
7795 |
-
/* 429 */,
|
7796 |
-
/* 430 */
|
7797 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7798 |
-
|
7799 |
-
/* WEBPACK VAR INJECTION */(function(global) {
|
7800 |
-
/**
|
7801 |
-
* Module exports.
|
7802 |
-
*/
|
7803 |
-
|
7804 |
-
module.exports = deprecate;
|
7805 |
-
|
7806 |
-
/**
|
7807 |
-
* Mark that a method should not be used.
|
7808 |
-
* Returns a modified function which warns once by default.
|
7809 |
-
*
|
7810 |
-
* If `localStorage.noDeprecation = true` is set, then it is a no-op.
|
7811 |
-
*
|
7812 |
-
* If `localStorage.throwDeprecation = true` is set, then deprecated functions
|
7813 |
-
* will throw an Error when invoked.
|
7814 |
-
*
|
7815 |
-
* If `localStorage.traceDeprecation = true` is set, then deprecated functions
|
7816 |
-
* will invoke `console.trace()` instead of `console.error()`.
|
7817 |
-
*
|
7818 |
-
* @param {Function} fn - the function to deprecate
|
7819 |
-
* @param {String} msg - the string to print to the console when `fn` is invoked
|
7820 |
-
* @returns {Function} a new "deprecated" version of `fn`
|
7821 |
-
* @api public
|
7822 |
-
*/
|
7823 |
-
|
7824 |
-
function deprecate (fn, msg) {
|
7825 |
-
if (config('noDeprecation')) {
|
7826 |
-
return fn;
|
7827 |
-
}
|
7828 |
-
|
7829 |
-
var warned = false;
|
7830 |
-
function deprecated() {
|
7831 |
-
if (!warned) {
|
7832 |
-
if (config('throwDeprecation')) {
|
7833 |
-
throw new Error(msg);
|
7834 |
-
} else if (config('traceDeprecation')) {
|
7835 |
-
console.trace(msg);
|
7836 |
-
} else {
|
7837 |
-
console.warn(msg);
|
7838 |
-
}
|
7839 |
-
warned = true;
|
7840 |
-
}
|
7841 |
-
return fn.apply(this, arguments);
|
7842 |
-
}
|
7843 |
-
|
7844 |
-
return deprecated;
|
7845 |
-
}
|
7846 |
-
|
7847 |
-
/**
|
7848 |
-
* Checks `localStorage` for boolean values for the given `name`.
|
7849 |
-
*
|
7850 |
-
* @param {String} name
|
7851 |
-
* @returns {Boolean}
|
7852 |
-
* @api private
|
7853 |
-
*/
|
7854 |
-
|
7855 |
-
function config (name) {
|
7856 |
-
// accessing global.localStorage can trigger a DOMException in sandboxed iframes
|
7857 |
-
try {
|
7858 |
-
if (!global.localStorage) return false;
|
7859 |
-
} catch (_) {
|
7860 |
-
return false;
|
7861 |
-
}
|
7862 |
-
var val = global.localStorage[name];
|
7863 |
-
if (null == val) return false;
|
7864 |
-
return String(val).toLowerCase() === 'true';
|
7865 |
-
}
|
7866 |
-
|
7867 |
-
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(9)))
|
7868 |
-
|
7869 |
-
/***/ }),
|
7870 |
-
/* 431 */
|
7871 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7872 |
-
|
7873 |
-
"use strict";
|
7874 |
-
// Copyright Joyent, Inc. and other Node contributors.
|
7875 |
-
//
|
7876 |
-
// Permission is hereby granted, free of charge, to any person obtaining a
|
7877 |
-
// copy of this software and associated documentation files (the
|
7878 |
-
// "Software"), to deal in the Software without restriction, including
|
7879 |
-
// without limitation the rights to use, copy, modify, merge, publish,
|
7880 |
-
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
7881 |
-
// persons to whom the Software is furnished to do so, subject to the
|
7882 |
-
// following conditions:
|
7883 |
-
//
|
7884 |
-
// The above copyright notice and this permission notice shall be included
|
7885 |
-
// in all copies or substantial portions of the Software.
|
7886 |
-
//
|
7887 |
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
7888 |
-
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
7889 |
-
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
7890 |
-
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
7891 |
-
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
7892 |
-
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
7893 |
-
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
7894 |
-
|
7895 |
-
// a passthrough stream.
|
7896 |
-
// basically just the most minimal sort of Transform stream.
|
7897 |
-
// Every written chunk gets output as-is.
|
7898 |
-
|
7899 |
-
|
7900 |
-
|
7901 |
-
module.exports = PassThrough;
|
7902 |
-
|
7903 |
-
var Transform = __webpack_require__(269);
|
7904 |
-
|
7905 |
-
/*<replacement>*/
|
7906 |
-
var util = __webpack_require__(46);
|
7907 |
-
util.inherits = __webpack_require__(22);
|
7908 |
-
/*</replacement>*/
|
7909 |
-
|
7910 |
-
util.inherits(PassThrough, Transform);
|
7911 |
-
|
7912 |
-
function PassThrough(options) {
|
7913 |
-
if (!(this instanceof PassThrough)) return new PassThrough(options);
|
7914 |
-
|
7915 |
-
Transform.call(this, options);
|
7916 |
-
}
|
7917 |
-
|
7918 |
-
PassThrough.prototype._transform = function (chunk, encoding, cb) {
|
7919 |
-
cb(null, chunk);
|
7920 |
-
};
|
7921 |
-
|
7922 |
-
/***/ }),
|
7923 |
-
/* 432 */
|
7924 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7925 |
-
|
7926 |
-
module.exports = __webpack_require__(90);
|
7927 |
-
|
7928 |
-
|
7929 |
-
/***/ }),
|
7930 |
-
/* 433 */
|
7931 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7932 |
-
|
7933 |
-
module.exports = __webpack_require__(32);
|
7934 |
-
|
7935 |
-
|
7936 |
-
/***/ }),
|
7937 |
-
/* 434 */
|
7938 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7939 |
-
|
7940 |
-
module.exports = __webpack_require__(88).Transform
|
7941 |
-
|
7942 |
-
|
7943 |
-
/***/ }),
|
7944 |
-
/* 435 */
|
7945 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7946 |
-
|
7947 |
-
module.exports = __webpack_require__(88).PassThrough
|
7948 |
-
|
7949 |
-
|
7950 |
-
/***/ }),
|
7951 |
-
/* 436 */
|
7952 |
-
/***/ (function(module, exports) {
|
7953 |
-
|
7954 |
-
/* (ignored) */
|
7955 |
-
|
7956 |
-
/***/ }),
|
7957 |
-
/* 437 */
|
7958 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7959 |
-
|
7960 |
-
module.exports = ProxyHandler;
|
7961 |
-
|
7962 |
-
function ProxyHandler(cbs){
|
7963 |
-
this._cbs = cbs || {};
|
7964 |
-
}
|
7965 |
-
|
7966 |
-
var EVENTS = __webpack_require__(38).EVENTS;
|
7967 |
-
Object.keys(EVENTS).forEach(function(name){
|
7968 |
-
if(EVENTS[name] === 0){
|
7969 |
-
name = "on" + name;
|
7970 |
-
ProxyHandler.prototype[name] = function(){
|
7971 |
-
if(this._cbs[name]) this._cbs[name]();
|
7972 |
-
};
|
7973 |
-
} else if(EVENTS[name] === 1){
|
7974 |
-
name = "on" + name;
|
7975 |
-
ProxyHandler.prototype[name] = function(a){
|
7976 |
-
if(this._cbs[name]) this._cbs[name](a);
|
7977 |
-
};
|
7978 |
-
} else if(EVENTS[name] === 2){
|
7979 |
-
name = "on" + name;
|
7980 |
-
ProxyHandler.prototype[name] = function(a, b){
|
7981 |
-
if(this._cbs[name]) this._cbs[name](a, b);
|
7982 |
-
};
|
7983 |
-
} else {
|
7984 |
-
throw Error("wrong number of arguments");
|
7985 |
-
}
|
7986 |
-
});
|
7987 |
-
|
7988 |
-
/***/ }),
|
7989 |
-
/* 438 */
|
7990 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7991 |
-
|
7992 |
-
var DomUtils = module.exports;
|
7993 |
-
|
7994 |
-
[
|
7995 |
-
__webpack_require__(439),
|
7996 |
-
__webpack_require__(445),
|
7997 |
-
__webpack_require__(446),
|
7998 |
-
__webpack_require__(447),
|
7999 |
-
__webpack_require__(448),
|
8000 |
-
__webpack_require__(449)
|
8001 |
-
].forEach(function(ext){
|
8002 |
-
Object.keys(ext).forEach(function(key){
|
8003 |
-
DomUtils[key] = ext[key].bind(DomUtils);
|
8004 |
-
});
|
8005 |
-
});
|
8006 |
-
|
8007 |
-
|
8008 |
-
/***/ }),
|
8009 |
-
/* 439 */
|
8010 |
-
/***/ (function(module, exports, __webpack_require__) {
|
8011 |
-
|
8012 |
-
var ElementType = __webpack_require__(45),
|
8013 |
-
getOuterHTML = __webpack_require__(440),
|
8014 |
-
isTag = ElementType.isTag;
|
8015 |
-
|
8016 |
-
module.exports = {
|
8017 |
-
getInnerHTML: getInnerHTML,
|
8018 |
-
getOuterHTML: getOuterHTML,
|
8019 |
-
getText: getText
|
8020 |
-
};
|
8021 |
-
|
8022 |
-
function getInnerHTML(elem, opts){
|
8023 |
-
return elem.children ? elem.children.map(function(elem){
|
8024 |
-
return getOuterHTML(elem, opts);
|
8025 |
-
}).join("") : "";
|
8026 |
-
}
|
8027 |
-
|
8028 |
-
function getText(elem){
|
8029 |
-
if(Array.isArray(elem)) return elem.map(getText).join("");
|
8030 |
-
if(isTag(elem)) return elem.name === "br" ? "\n" : getText(elem.children);
|
8031 |
-
if(elem.type === ElementType.CDATA) return getText(elem.children);
|
8032 |
-
if(elem.type === ElementType.Text) return elem.data;
|
8033 |
-
return "";
|
8034 |
-
}
|
8035 |
-
|
8036 |
-
|
8037 |
-
/***/ }),
|
8038 |
-
/* 440 */
|
8039 |
-
/***/ (function(module, exports, __webpack_require__) {
|
8040 |
-
|
8041 |
-
/*
|
8042 |
-
Module dependencies
|
8043 |
-
*/
|
8044 |
-
var ElementType = __webpack_require__(441);
|
8045 |
-
var entities = __webpack_require__(442);
|
8046 |
-
|
8047 |
-
/*
|
8048 |
-
Boolean Attributes
|
8049 |
-
*/
|
8050 |
-
var booleanAttributes = {
|
8051 |
-
__proto__: null,
|
8052 |
-
allowfullscreen: true,
|
8053 |
-
async: true,
|
8054 |
-
autofocus: true,
|
8055 |
-
autoplay: true,
|
8056 |
-
checked: true,
|
8057 |
-
controls: true,
|
8058 |
-
default: true,
|
8059 |
-
defer: true,
|
8060 |
-
disabled: true,
|
8061 |
-
hidden: true,
|
8062 |
-
ismap: true,
|
8063 |
-
loop: true,
|
8064 |
-
multiple: true,
|
8065 |
-
muted: true,
|
8066 |
-
open: true,
|
8067 |
-
readonly: true,
|
8068 |
-
required: true,
|
8069 |
-
reversed: true,
|
8070 |
-
scoped: true,
|
8071 |
-
seamless: true,
|
8072 |
-
selected: true,
|
8073 |
-
typemustmatch: true
|
8074 |
-
};
|
8075 |
-
|
8076 |
-
var unencodedElements = {
|
8077 |
-
__proto__: null,
|
8078 |
-
style: true,
|
8079 |
-
script: true,
|
8080 |
-
xmp: true,
|
8081 |
-
iframe: true,
|
8082 |
-
noembed: true,
|
8083 |
-
noframes: true,
|
8084 |
-
plaintext: true,
|
8085 |
-
noscript: true
|
8086 |
-
};
|
8087 |
-
|
8088 |
-
/*
|
8089 |
-
Format attributes
|
8090 |
-
*/
|
8091 |
-
function formatAttrs(attributes, opts) {
|
8092 |
-
if (!attributes) return;
|
8093 |
-
|
8094 |
-
var output = '',
|
8095 |
-
value;
|
8096 |
-
|
8097 |
-
// Loop through the attributes
|
8098 |
-
for (var key in attributes) {
|
8099 |
-
value = attributes[key];
|
8100 |
-
if (output) {
|
8101 |
-
output += ' ';
|
8102 |
-
}
|
8103 |
-
|
8104 |
-
if (!value && booleanAttributes[key]) {
|
8105 |
-
output += key;
|
8106 |
-
} else {
|
8107 |
-
output += key + '="' + (opts.decodeEntities ? entities.encodeXML(value) : value) + '"';
|
8108 |
-
}
|
8109 |
-
}
|
8110 |
-
|
8111 |
-
return output;
|
8112 |
-
}
|
8113 |
-
|
8114 |
-
/*
|
8115 |
-
Self-enclosing tags (stolen from node-htmlparser)
|
8116 |
-
*/
|
8117 |
-
var singleTag = {
|
8118 |
-
__proto__: null,
|
8119 |
-
area: true,
|
8120 |
-
base: true,
|
8121 |
-
basefont: true,
|
8122 |
-
br: true,
|
8123 |
-
col: true,
|
8124 |
-
command: true,
|
8125 |
-
embed: true,
|
8126 |
-
frame: true,
|
8127 |
-
hr: true,
|
8128 |
-
img: true,
|
8129 |
-
input: true,
|
8130 |
-
isindex: true,
|
8131 |
-
keygen: true,
|
8132 |
-
link: true,
|
8133 |
-
meta: true,
|
8134 |
-
param: true,
|
8135 |
-
source: true,
|
8136 |
-
track: true,
|
8137 |
-
wbr: true,
|
8138 |
-
};
|
8139 |
-
|
8140 |
-
|
8141 |
-
var render = module.exports = function(dom, opts) {
|
8142 |
-
if (!Array.isArray(dom) && !dom.cheerio) dom = [dom];
|
8143 |
-
opts = opts || {};
|
8144 |
-
|
8145 |
-
var output = '';
|
8146 |
-
|
8147 |
-
for(var i = 0; i < dom.length; i++){
|
8148 |
-
var elem = dom[i];
|
8149 |
-
|
8150 |
-
if (elem.type === 'root')
|
8151 |
-
output += render(elem.children, opts);
|
8152 |
-
else if (ElementType.isTag(elem))
|
8153 |
-
output += renderTag(elem, opts);
|
8154 |
-
else if (elem.type === ElementType.Directive)
|
8155 |
-
output += renderDirective(elem);
|
8156 |
-
else if (elem.type === ElementType.Comment)
|
8157 |
-
output += renderComment(elem);
|
8158 |
-
else if (elem.type === ElementType.CDATA)
|
8159 |
-
output += renderCdata(elem);
|
8160 |
-
else
|
8161 |
-
output += renderText(elem, opts);
|
8162 |
-
}
|
8163 |
-
|
8164 |
-
return output;
|
8165 |
-
};
|
8166 |
-
|
8167 |
-
function renderTag(elem, opts) {
|
8168 |
-
// Handle SVG
|
8169 |
-
if (elem.name === "svg") opts = {decodeEntities: opts.decodeEntities, xmlMode: true};
|
8170 |
-
|
8171 |
-
var tag = '<' + elem.name,
|
8172 |
-
attribs = formatAttrs(elem.attribs, opts);
|
8173 |
-
|
8174 |
-
if (attribs) {
|
8175 |
-
tag += ' ' + attribs;
|
8176 |
-
}
|
8177 |
-
|
8178 |
-
if (
|
8179 |
-
opts.xmlMode
|
8180 |
-
&& (!elem.children || elem.children.length === 0)
|
8181 |
-
) {
|
8182 |
-
tag += '/>';
|
8183 |
-
} else {
|
8184 |
-
tag += '>';
|
8185 |
-
if (elem.children) {
|
8186 |
-
tag += render(elem.children, opts);
|
8187 |
-
}
|
8188 |
-
|
8189 |
-
if (!singleTag[elem.name] || opts.xmlMode) {
|
8190 |
-
tag += '</' + elem.name + '>';
|
8191 |
-
}
|
8192 |
-
}
|
8193 |
-
|
8194 |
-
return tag;
|
8195 |
-
}
|
8196 |
-
|
8197 |
-
function renderDirective(elem) {
|
8198 |
-
return '<' + elem.data + '>';
|
8199 |
-
}
|
8200 |
-
|
8201 |
-
function renderText(elem, opts) {
|
8202 |
-
var data = elem.data || '';
|
8203 |
-
|
8204 |
-
// if entities weren't decoded, no need to encode them back
|
8205 |
-
if (opts.decodeEntities && !(elem.parent && elem.parent.name in unencodedElements)) {
|
8206 |
-
data = entities.encodeXML(data);
|
8207 |
-
}
|
8208 |
-
|
8209 |
-
return data;
|
8210 |
-
}
|
8211 |
-
|
8212 |
-
function renderCdata(elem) {
|
8213 |
-
return '<![CDATA[' + elem.children[0].data + ']]>';
|
8214 |
-
}
|
8215 |
-
|
8216 |
-
function renderComment(elem) {
|
8217 |
-
return '<!--' + elem.data + '-->';
|
8218 |
-
}
|
8219 |
-
|
8220 |
-
|
8221 |
-
/***/ }),
|
8222 |
-
/* 441 */
|
8223 |
-
/***/ (function(module, exports) {
|
8224 |
-
|
8225 |
-
//Types of elements found in the DOM
|
8226 |
-
module.exports = {
|
8227 |
-
Text: "text", //Text
|
8228 |
-
Directive: "directive", //<? ... ?>
|
8229 |
-
Comment: "comment", //<!-- ... -->
|
8230 |
-
Script: "script", //<script> tags
|
8231 |
-
Style: "style", //<style> tags
|
8232 |
-
Tag: "tag", //Any tag
|
8233 |
-
CDATA: "cdata", //<![CDATA[ ... ]]>
|
8234 |
-
|
8235 |
-
isTag: function(elem){
|
8236 |
-
return elem.type === "tag" || elem.type === "script" || elem.type === "style";
|
8237 |
-
}
|
8238 |
-
};
|
8239 |
-
|
8240 |
-
/***/ }),
|
8241 |
-
/* 442 */
|
8242 |
-
/***/ (function(module, exports, __webpack_require__) {
|
8243 |
-
|
8244 |
-
var encode = __webpack_require__(443),
|
8245 |
-
decode = __webpack_require__(444);
|
8246 |
-
|
8247 |
-
exports.decode = function(data, level){
|
8248 |
-
return (!level || level <= 0 ? decode.XML : decode.HTML)(data);
|
8249 |
-
};
|
8250 |
-
|
8251 |
-
exports.decodeStrict = function(data, level){
|
8252 |
-
return (!level || level <= 0 ? decode.XML : decode.HTMLStrict)(data);
|
8253 |
-
};
|
8254 |
-
|
8255 |
-
exports.encode = function(data, level){
|
8256 |
-
return (!level || level <= 0 ? encode.XML : encode.HTML)(data);
|
8257 |
-
};
|
8258 |
-
|
8259 |
-
exports.encodeXML = encode.XML;
|
8260 |
-
|
8261 |
-
exports.encodeHTML4 =
|
8262 |
-
exports.encodeHTML5 =
|
8263 |
-
exports.encodeHTML = encode.HTML;
|
8264 |
-
|
8265 |
-
exports.decodeXML =
|
8266 |
-
exports.decodeXMLStrict = decode.XML;
|
8267 |
-
|
8268 |
-
exports.decodeHTML4 =
|
8269 |
-
exports.decodeHTML5 =
|
8270 |
-
exports.decodeHTML = decode.HTML;
|
8271 |
-
|
8272 |
-
exports.decodeHTML4Strict =
|
8273 |
-
exports.decodeHTML5Strict =
|
8274 |
-
exports.decodeHTMLStrict = decode.HTMLStrict;
|
8275 |
-
|
8276 |
-
exports.escape = encode.escape;
|
8277 |
-
|
8278 |
-
|
8279 |
-
/***/ }),
|
8280 |
-
/* 443 */
|
8281 |
-
/***/ (function(module, exports, __webpack_require__) {
|
8282 |
-
|
8283 |
-
var inverseXML = getInverseObj(__webpack_require__(87)),
|
8284 |
-
xmlReplacer = getInverseReplacer(inverseXML);
|
8285 |
-
|
8286 |
-
exports.XML = getInverse(inverseXML, xmlReplacer);
|
8287 |
-
|
8288 |
-
var inverseHTML = getInverseObj(__webpack_require__(86)),
|
8289 |
-
htmlReplacer = getInverseReplacer(inverseHTML);
|
8290 |
-
|
8291 |
-
exports.HTML = getInverse(inverseHTML, htmlReplacer);
|
8292 |
-
|
8293 |
-
function getInverseObj(obj){
|
8294 |
-
return Object.keys(obj).sort().reduce(function(inverse, name){
|
8295 |
-
inverse[obj[name]] = "&" + name + ";";
|
8296 |
-
return inverse;
|
8297 |
-
}, {});
|
8298 |
-
}
|
8299 |
-
|
8300 |
-
function getInverseReplacer(inverse){
|
8301 |
-
var single = [],
|
8302 |
-
multiple = [];
|
8303 |
-
|
8304 |
-
Object.keys(inverse).forEach(function(k){
|
8305 |
-
if(k.length === 1){
|
8306 |
-
single.push("\\" + k);
|
8307 |
-
} else {
|
8308 |
-
multiple.push(k);
|
8309 |
-
}
|
8310 |
-
});
|
8311 |
-
|
8312 |
-
//TODO add ranges
|
8313 |
-
multiple.unshift("[" + single.join("") + "]");
|
8314 |
-
|
8315 |
-
return new RegExp(multiple.join("|"), "g");
|
8316 |
-
}
|
8317 |
-
|
8318 |
-
var re_nonASCII = /[^\0-\x7F]/g,
|
8319 |
-
re_astralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
|
8320 |
-
|
8321 |
-
function singleCharReplacer(c){
|
8322 |
-
return "&#x" + c.charCodeAt(0).toString(16).toUpperCase() + ";";
|
8323 |
-
}
|
8324 |
-
|
8325 |
-
function astralReplacer(c){
|
8326 |
-
// http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
|
8327 |
-
var high = c.charCodeAt(0);
|
8328 |
-
var low = c.charCodeAt(1);
|
8329 |
-
var codePoint = (high - 0xD800) * 0x400 + low - 0xDC00 + 0x10000;
|
8330 |
-
return "&#x" + codePoint.toString(16).toUpperCase() + ";";
|
8331 |
-
}
|
8332 |
-
|
8333 |
-
function getInverse(inverse, re){
|
8334 |
-
function func(name){
|
8335 |
-
return inverse[name];
|
8336 |
-
}
|
8337 |
-
|
8338 |
-
return function(data){
|
8339 |
-
return data
|
8340 |
-
.replace(re, func)
|
8341 |
-
.replace(re_astralSymbols, astralReplacer)
|
8342 |
-
.replace(re_nonASCII, singleCharReplacer);
|
8343 |
-
};
|
8344 |
-
}
|
8345 |
-
|
8346 |
-
var re_xmlChars = getInverseReplacer(inverseXML);
|
8347 |
-
|
8348 |
-
function escapeXML(data){
|
8349 |
-
return data
|
8350 |
-
.replace(re_xmlChars, singleCharReplacer)
|
8351 |
-
.replace(re_astralSymbols, astralReplacer)
|
8352 |
-
.replace(re_nonASCII, singleCharReplacer);
|
8353 |
-
}
|
8354 |
-
|
8355 |
-
exports.escape = escapeXML;
|
8356 |
-
|
8357 |
-
|
8358 |
-
/***/ }),
|
8359 |
-
/* 444 */
|
8360 |
-
/***/ (function(module, exports, __webpack_require__) {
|
8361 |
-
|
8362 |
-
var entityMap = __webpack_require__(86),
|
8363 |
-
legacyMap = __webpack_require__(261),
|
8364 |
-
xmlMap = __webpack_require__(87),
|
8365 |
-
decodeCodePoint = __webpack_require__(260);
|
8366 |
-
|
8367 |
-
var decodeXMLStrict = getStrictDecoder(xmlMap),
|
8368 |
-
decodeHTMLStrict = getStrictDecoder(entityMap);
|
8369 |
-
|
8370 |
-
function getStrictDecoder(map){
|
8371 |
-
var keys = Object.keys(map).join("|"),
|
8372 |
-
replace = getReplacer(map);
|
8373 |
-
|
8374 |
-
keys += "|#[xX][\\da-fA-F]+|#\\d+";
|
8375 |
-
|
8376 |
-
var re = new RegExp("&(?:" + keys + ");", "g");
|
8377 |
-
|
8378 |
-
return function(str){
|
8379 |
-
return String(str).replace(re, replace);
|
8380 |
-
};
|
8381 |
-
}
|
8382 |
-
|
8383 |
-
var decodeHTML = (function(){
|
8384 |
-
var legacy = Object.keys(legacyMap)
|
8385 |
-
.sort(sorter);
|
8386 |
-
|
8387 |
-
var keys = Object.keys(entityMap)
|
8388 |
-
.sort(sorter);
|
8389 |
-
|
8390 |
-
for(var i = 0, j = 0; i < keys.length; i++){
|
8391 |
-
if(legacy[j] === keys[i]){
|
8392 |
-
keys[i] += ";?";
|
8393 |
-
j++;
|
8394 |
-
} else {
|
8395 |
-
keys[i] += ";";
|
8396 |
-
}
|
8397 |
-
}
|
8398 |
-
|
8399 |
-
var re = new RegExp("&(?:" + keys.join("|") + "|#[xX][\\da-fA-F]+;?|#\\d+;?)", "g"),
|
8400 |
-
replace = getReplacer(entityMap);
|
8401 |
-
|
8402 |
-
function replacer(str){
|
8403 |
-
if(str.substr(-1) !== ";") str += ";";
|
8404 |
-
return replace(str);
|
8405 |
-
}
|
8406 |
-
|
8407 |
-
//TODO consider creating a merged map
|
8408 |
-
return function(str){
|
8409 |
-
return String(str).replace(re, replacer);
|
8410 |
-
};
|
8411 |
-
}());
|
8412 |
-
|
8413 |
-
function sorter(a, b){
|
8414 |
-
return a < b ? 1 : -1;
|
8415 |
-
}
|
8416 |
-
|
8417 |
-
function getReplacer(map){
|
8418 |
-
return function replace(str){
|
8419 |
-
if(str.charAt(1) === "#"){
|
8420 |
-
if(str.charAt(2) === "X" || str.charAt(2) === "x"){
|
8421 |
-
return decodeCodePoint(parseInt(str.substr(3), 16));
|
8422 |
-
}
|
8423 |
-
return decodeCodePoint(parseInt(str.substr(2), 10));
|
8424 |
-
}
|
8425 |
-
return map[str.slice(1, -1)];
|
8426 |
-
};
|
8427 |
-
}
|
8428 |
-
|
8429 |
-
module.exports = {
|
8430 |
-
XML: decodeXMLStrict,
|
8431 |
-
HTML: decodeHTML,
|
8432 |
-
HTMLStrict: decodeHTMLStrict
|
8433 |
-
};
|
8434 |
-
|
8435 |
-
/***/ }),
|
8436 |
-
/* 445 */
|
8437 |
-
/***/ (function(module, exports) {
|
8438 |
-
|
8439 |
-
var getChildren = exports.getChildren = function(elem){
|
8440 |
-
return elem.children;
|
8441 |
-
};
|
8442 |
-
|
8443 |
-
var getParent = exports.getParent = function(elem){
|
8444 |
-
return elem.parent;
|
8445 |
-
};
|
8446 |
-
|
8447 |
-
exports.getSiblings = function(elem){
|
8448 |
-
var parent = getParent(elem);
|
8449 |
-
return parent ? getChildren(parent) : [elem];
|
8450 |
-
};
|
8451 |
-
|
8452 |
-
exports.getAttributeValue = function(elem, name){
|
8453 |
-
return elem.attribs && elem.attribs[name];
|
8454 |
-
};
|
8455 |
-
|
8456 |
-
exports.hasAttrib = function(elem, name){
|
8457 |
-
return !!elem.attribs && hasOwnProperty.call(elem.attribs, name);
|
8458 |
-
};
|
8459 |
-
|
8460 |
-
exports.getName = function(elem){
|
8461 |
-
return elem.name;
|
8462 |
-
};
|
8463 |
-
|
8464 |
-
|
8465 |
-
/***/ }),
|
8466 |
-
/* 446 */
|
8467 |
-
/***/ (function(module, exports) {
|
8468 |
-
|
8469 |
-
exports.removeElement = function(elem){
|
8470 |
-
if(elem.prev) elem.prev.next = elem.next;
|
8471 |
-
if(elem.next) elem.next.prev = elem.prev;
|
8472 |
-
|
8473 |
-
if(elem.parent){
|
8474 |
-
var childs = elem.parent.children;
|
8475 |
-
childs.splice(childs.lastIndexOf(elem), 1);
|
8476 |
-
}
|
8477 |
-
};
|
8478 |
-
|
8479 |
-
exports.replaceElement = function(elem, replacement){
|
8480 |
-
var prev = replacement.prev = elem.prev;
|
8481 |
-
if(prev){
|
8482 |
-
prev.next = replacement;
|
8483 |
-
}
|
8484 |
-
|
8485 |
-
var next = replacement.next = elem.next;
|
8486 |
-
if(next){
|
8487 |
-
next.prev = replacement;
|
8488 |
-
}
|
8489 |
-
|
8490 |
-
var parent = replacement.parent = elem.parent;
|
8491 |
-
if(parent){
|
8492 |
-
var childs = parent.children;
|
8493 |
-
childs[childs.lastIndexOf(elem)] = replacement;
|
8494 |
-
}
|
8495 |
-
};
|
8496 |
-
|
8497 |
-
exports.appendChild = function(elem, child){
|
8498 |
-
child.parent = elem;
|
8499 |
-
|
8500 |
-
if(elem.children.push(child) !== 1){
|
8501 |
-
var sibling = elem.children[elem.children.length - 2];
|
8502 |
-
sibling.next = child;
|
8503 |
-
child.prev = sibling;
|
8504 |
-
child.next = null;
|
8505 |
-
}
|
8506 |
-
};
|
8507 |
-
|
8508 |
-
exports.append = function(elem, next){
|
8509 |
-
var parent = elem.parent,
|
8510 |
-
currNext = elem.next;
|
8511 |
-
|
8512 |
-
next.next = currNext;
|
8513 |
-
next.prev = elem;
|
8514 |
-
elem.next = next;
|
8515 |
-
next.parent = parent;
|
8516 |
-
|
8517 |
-
if(currNext){
|
8518 |
-
currNext.prev = next;
|
8519 |
-
if(parent){
|
8520 |
-
var childs = parent.children;
|
8521 |
-
childs.splice(childs.lastIndexOf(currNext), 0, next);
|
8522 |
-
}
|
8523 |
-
} else if(parent){
|
8524 |
-
parent.children.push(next);
|
8525 |
-
}
|
8526 |
-
};
|
8527 |
-
|
8528 |
-
exports.prepend = function(elem, prev){
|
8529 |
-
var parent = elem.parent;
|
8530 |
-
if(parent){
|
8531 |
-
var childs = parent.children;
|
8532 |
-
childs.splice(childs.lastIndexOf(elem), 0, prev);
|
8533 |
-
}
|
8534 |
-
|
8535 |
-
if(elem.prev){
|
8536 |
-
elem.prev.next = prev;
|
8537 |
-
}
|
8538 |
-
|
8539 |
-
prev.parent = parent;
|
8540 |
-
prev.prev = elem.prev;
|
8541 |
-
prev.next = elem;
|
8542 |
-
elem.prev = prev;
|
8543 |
-
};
|
8544 |
-
|
8545 |
-
|
8546 |
-
|
8547 |
-
|
8548 |
-
/***/ }),
|
8549 |
-
/* 447 */
|
8550 |
-
/***/ (function(module, exports, __webpack_require__) {
|
8551 |
-
|
8552 |
-
var isTag = __webpack_require__(45).isTag;
|
8553 |
-
|
8554 |
-
module.exports = {
|
8555 |
-
filter: filter,
|
8556 |
-
find: find,
|
8557 |
-
findOneChild: findOneChild,
|
8558 |
-
findOne: findOne,
|
8559 |
-
existsOne: existsOne,
|
8560 |
-
findAll: findAll
|
8561 |
-
};
|
8562 |
-
|
8563 |
-
function filter(test, element, recurse, limit){
|
8564 |
-
if(!Array.isArray(element)) element = [element];
|
8565 |
-
|
8566 |
-
if(typeof limit !== "number" || !isFinite(limit)){
|
8567 |
-
limit = Infinity;
|
8568 |
-
}
|
8569 |
-
return find(test, element, recurse !== false, limit);
|
8570 |
-
}
|
8571 |
-
|
8572 |
-
function find(test, elems, recurse, limit){
|
8573 |
-
var result = [], childs;
|
8574 |
-
|
8575 |
-
for(var i = 0, j = elems.length; i < j; i++){
|
8576 |
-
if(test(elems[i])){
|
8577 |
-
result.push(elems[i]);
|
8578 |
-
if(--limit <= 0) break;
|
8579 |
-
}
|
8580 |
-
|
8581 |
-
childs = elems[i].children;
|
8582 |
-
if(recurse && childs && childs.length > 0){
|
8583 |
-
childs = find(test, childs, recurse, limit);
|
8584 |
-
result = result.concat(childs);
|
8585 |
-
limit -= childs.length;
|
8586 |
-
if(limit <= 0) break;
|
8587 |
-
}
|
8588 |
-
}
|
8589 |
-
|
8590 |
-
return result;
|
8591 |
-
}
|
8592 |
-
|
8593 |
-
function findOneChild(test, elems){
|
8594 |
-
for(var i = 0, l = elems.length; i < l; i++){
|
8595 |
-
if(test(elems[i])) return elems[i];
|
8596 |
-
}
|
8597 |
-
|
8598 |
-
return null;
|
8599 |
-
}
|
8600 |
-
|
8601 |
-
function findOne(test, elems){
|
8602 |
-
var elem = null;
|
8603 |
-
|
8604 |
-
for(var i = 0, l = elems.length; i < l && !elem; i++){
|
8605 |
-
if(!isTag(elems[i])){
|
8606 |
-
continue;
|
8607 |
-
} else if(test(elems[i])){
|
8608 |
-
elem = elems[i];
|
8609 |
-
} else if(elems[i].children.length > 0){
|
8610 |
-
elem = findOne(test, elems[i].children);
|
8611 |
-
}
|
8612 |
-
}
|
8613 |
-
|
8614 |
-
return elem;
|
8615 |
-
}
|
8616 |
-
|
8617 |
-
function existsOne(test, elems){
|
8618 |
-
for(var i = 0, l = elems.length; i < l; i++){
|
8619 |
-
if(
|
8620 |
-
isTag(elems[i]) && (
|
8621 |
-
test(elems[i]) || (
|
8622 |
-
elems[i].children.length > 0 &&
|
8623 |
-
existsOne(test, elems[i].children)
|
8624 |
-
)
|
8625 |
-
)
|
8626 |
-
){
|
8627 |
-
return true;
|
8628 |
-
}
|
8629 |
-
}
|
8630 |
-
|
8631 |
-
return false;
|
8632 |
-
}
|
8633 |
-
|
8634 |
-
function findAll(test, rootElems){
|
8635 |
-
var result = [];
|
8636 |
-
var stack = [rootElems];
|
8637 |
-
while(stack.length){
|
8638 |
-
var elems = stack.pop();
|
8639 |
-
for(var i = 0, j = elems.length; i < j; i++){
|
8640 |
-
if(!isTag(elems[i])) continue;
|
8641 |
-
if(test(elems[i])) result.push(elems[i]);
|
8642 |
-
}
|
8643 |
-
while(j-- > 0){
|
8644 |
-
if(elems[j].children && elems[j].children.length > 0){
|
8645 |
-
stack.push(elems[j].children);
|
8646 |
-
}
|
8647 |
-
}
|
8648 |
-
}
|
8649 |
-
return result;
|
8650 |
-
}
|
8651 |
-
|
8652 |
-
|
8653 |
-
/***/ }),
|
8654 |
-
/* 448 */
|
8655 |
-
/***/ (function(module, exports, __webpack_require__) {
|
8656 |
-
|
8657 |
-
var ElementType = __webpack_require__(45);
|
8658 |
-
var isTag = exports.isTag = ElementType.isTag;
|
8659 |
-
|
8660 |
-
exports.testElement = function(options, element){
|
8661 |
-
for(var key in options){
|
8662 |
-
if(!options.hasOwnProperty(key));
|
8663 |
-
else if(key === "tag_name"){
|
8664 |
-
if(!isTag(element) || !options.tag_name(element.name)){
|
8665 |
-
return false;
|
8666 |
-
}
|
8667 |
-
} else if(key === "tag_type"){
|
8668 |
-
if(!options.tag_type(element.type)) return false;
|
8669 |
-
} else if(key === "tag_contains"){
|
8670 |
-
if(isTag(element) || !options.tag_contains(element.data)){
|
8671 |
-
return false;
|
8672 |
-
}
|
8673 |
-
} else if(!element.attribs || !options[key](element.attribs[key])){
|
8674 |
-
return false;
|
8675 |
-
}
|
8676 |
-
}
|
8677 |
-
return true;
|
8678 |
-
};
|
8679 |
-
|
8680 |
-
var Checks = {
|
8681 |
-
tag_name: function(name){
|
8682 |
-
if(typeof name === "function"){
|
8683 |
-
return function(elem){ return isTag(elem) && name(elem.name); };
|
8684 |
-
} else if(name === "*"){
|
8685 |
-
return isTag;
|
8686 |
-
} else {
|
8687 |
-
return function(elem){ return isTag(elem) && elem.name === name; };
|
8688 |
-
}
|
8689 |
-
},
|
8690 |
-
tag_type: function(type){
|
8691 |
-
if(typeof type === "function"){
|
8692 |
-
return function(elem){ return type(elem.type); };
|
8693 |
-
} else {
|
8694 |
-
return function(elem){ return elem.type === type; };
|
8695 |
-
}
|
8696 |
-
},
|
8697 |
-
tag_contains: function(data){
|
8698 |
-
if(typeof data === "function"){
|
8699 |
-
return function(elem){ return !isTag(elem) && data(elem.data); };
|
8700 |
-
} else {
|
8701 |
-
return function(elem){ return !isTag(elem) && elem.data === data; };
|
8702 |
-
}
|
8703 |
-
}
|
8704 |
-
};
|
8705 |
-
|
8706 |
-
function getAttribCheck(attrib, value){
|
8707 |
-
if(typeof value === "function"){
|
8708 |
-
return function(elem){ return elem.attribs && value(elem.attribs[attrib]); };
|
8709 |
-
} else {
|
8710 |
-
return function(elem){ return elem.attribs && elem.attribs[attrib] === value; };
|
8711 |
-
}
|
8712 |
-
}
|
8713 |
-
|
8714 |
-
function combineFuncs(a, b){
|
8715 |
-
return function(elem){
|
8716 |
-
return a(elem) || b(elem);
|
8717 |
-
};
|
8718 |
-
}
|
8719 |
-
|
8720 |
-
exports.getElements = function(options, element, recurse, limit){
|
8721 |
-
var funcs = Object.keys(options).map(function(key){
|
8722 |
-
var value = options[key];
|
8723 |
-
return key in Checks ? Checks[key](value) : getAttribCheck(key, value);
|
8724 |
-
});
|
8725 |
-
|
8726 |
-
return funcs.length === 0 ? [] : this.filter(
|
8727 |
-
funcs.reduce(combineFuncs),
|
8728 |
-
element, recurse, limit
|
8729 |
-
);
|
8730 |
-
};
|
8731 |
-
|
8732 |
-
exports.getElementById = function(id, element, recurse){
|
8733 |
-
if(!Array.isArray(element)) element = [element];
|
8734 |
-
return this.findOne(getAttribCheck("id", id), element, recurse !== false);
|
8735 |
-
};
|
8736 |
-
|
8737 |
-
exports.getElementsByTagName = function(name, element, recurse, limit){
|
8738 |
-
return this.filter(Checks.tag_name(name), element, recurse, limit);
|
8739 |
-
};
|
8740 |
-
|
8741 |
-
exports.getElementsByTagType = function(type, element, recurse, limit){
|
8742 |
-
return this.filter(Checks.tag_type(type), element, recurse, limit);
|
8743 |
-
};
|
8744 |
-
|
8745 |
-
|
8746 |
-
/***/ }),
|
8747 |
-
/* 449 */
|
8748 |
-
/***/ (function(module, exports) {
|
8749 |
-
|
8750 |
-
// removeSubsets
|
8751 |
-
// Given an array of nodes, remove any member that is contained by another.
|
8752 |
-
exports.removeSubsets = function(nodes) {
|
8753 |
-
var idx = nodes.length, node, ancestor, replace;
|
8754 |
-
|
8755 |
-
// Check if each node (or one of its ancestors) is already contained in the
|
8756 |
-
// array.
|
8757 |
-
while (--idx > -1) {
|
8758 |
-
node = ancestor = nodes[idx];
|
8759 |
-
|
8760 |
-
// Temporarily remove the node under consideration
|
8761 |
-
nodes[idx] = null;
|
8762 |
-
replace = true;
|
8763 |
-
|
8764 |
-
while (ancestor) {
|
8765 |
-
if (nodes.indexOf(ancestor) > -1) {
|
8766 |
-
replace = false;
|
8767 |
-
nodes.splice(idx, 1);
|
8768 |
-
break;
|
8769 |
-
}
|
8770 |
-
ancestor = ancestor.parent;
|
8771 |
-
}
|
8772 |
-
|
8773 |
-
// If the node has been found to be unique, re-insert it.
|
8774 |
-
if (replace) {
|
8775 |
-
nodes[idx] = node;
|
8776 |
-
}
|
8777 |
-
}
|
8778 |
-
|
8779 |
-
return nodes;
|
8780 |
-
};
|
8781 |
-
|
8782 |
-
// Source: http://dom.spec.whatwg.org/#dom-node-comparedocumentposition
|
8783 |
-
var POSITION = {
|
8784 |
-
DISCONNECTED: 1,
|
8785 |
-
PRECEDING: 2,
|
8786 |
-
FOLLOWING: 4,
|
8787 |
-
CONTAINS: 8,
|
8788 |
-
CONTAINED_BY: 16
|
8789 |
-
};
|
8790 |
-
|
8791 |
-
// Compare the position of one node against another node in any other document.
|
8792 |
-
// The return value is a bitmask with the following values:
|
8793 |
-
//
|
8794 |
-
// document order:
|
8795 |
-
// > There is an ordering, document order, defined on all the nodes in the
|
8796 |
-
// > document corresponding to the order in which the first character of the
|
8797 |
-
// > XML representation of each node occurs in the XML representation of the
|
8798 |
-
// > document after expansion of general entities. Thus, the document element
|
8799 |
-
// > node will be the first node. Element nodes occur before their children.
|
8800 |
-
// > Thus, document order orders element nodes in order of the occurrence of
|
8801 |
-
// > their start-tag in the XML (after expansion of entities). The attribute
|
8802 |
-
// > nodes of an element occur after the element and before its children. The
|
8803 |
-
// > relative order of attribute nodes is implementation-dependent./
|
8804 |
-
// Source:
|
8805 |
-
// http://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-document-order
|
8806 |
-
//
|
8807 |
-
// @argument {Node} nodaA The first node to use in the comparison
|
8808 |
-
// @argument {Node} nodeB The second node to use in the comparison
|
8809 |
-
//
|
8810 |
-
// @return {Number} A bitmask describing the input nodes' relative position.
|
8811 |
-
// See http://dom.spec.whatwg.org/#dom-node-comparedocumentposition for
|
8812 |
-
// a description of these values.
|
8813 |
-
var comparePos = exports.compareDocumentPosition = function(nodeA, nodeB) {
|
8814 |
-
var aParents = [];
|
8815 |
-
var bParents = [];
|
8816 |
-
var current, sharedParent, siblings, aSibling, bSibling, idx;
|
8817 |
-
|
8818 |
-
if (nodeA === nodeB) {
|
8819 |
-
return 0;
|
8820 |
-
}
|
8821 |
-
|
8822 |
-
current = nodeA;
|
8823 |
-
while (current) {
|
8824 |
-
aParents.unshift(current);
|
8825 |
-
current = current.parent;
|
8826 |
-
}
|
8827 |
-
current = nodeB;
|
8828 |
-
while (current) {
|
8829 |
-
bParents.unshift(current);
|
8830 |
-
current = current.parent;
|
8831 |
-
}
|
8832 |
-
|
8833 |
-
idx = 0;
|
8834 |
-
while (aParents[idx] === bParents[idx]) {
|
8835 |
-
idx++;
|
8836 |
-
}
|
8837 |
-
|
8838 |
-
if (idx === 0) {
|
8839 |
-
return POSITION.DISCONNECTED;
|
8840 |
-
}
|
8841 |
-
|
8842 |
-
sharedParent = aParents[idx - 1];
|
8843 |
-
siblings = sharedParent.children;
|
8844 |
-
aSibling = aParents[idx];
|
8845 |
-
bSibling = bParents[idx];
|
8846 |
-
|
8847 |
-
if (siblings.indexOf(aSibling) > siblings.indexOf(bSibling)) {
|
8848 |
-
if (sharedParent === nodeB) {
|
8849 |
-
return POSITION.FOLLOWING | POSITION.CONTAINED_BY;
|
8850 |
-
}
|
8851 |
-
return POSITION.FOLLOWING;
|
8852 |
-
} else {
|
8853 |
-
if (sharedParent === nodeA) {
|
8854 |
-
return POSITION.PRECEDING | POSITION.CONTAINS;
|
8855 |
-
}
|
8856 |
-
return POSITION.PRECEDING;
|
8857 |
-
}
|
8858 |
-
};
|
8859 |
-
|
8860 |
-
// Sort an array of nodes based on their relative position in the document and
|
8861 |
-
// remove any duplicate nodes. If the array contains nodes that do not belong
|
8862 |
-
// to the same document, sort order is unspecified.
|
8863 |
-
//
|
8864 |
-
// @argument {Array} nodes Array of DOM nodes
|
8865 |
-
//
|
8866 |
-
// @returns {Array} collection of unique nodes, sorted in document order
|
8867 |
-
exports.uniqueSort = function(nodes) {
|
8868 |
-
var idx = nodes.length, node, position;
|
8869 |
-
|
8870 |
-
nodes = nodes.slice();
|
8871 |
-
|
8872 |
-
while (--idx > -1) {
|
8873 |
-
node = nodes[idx];
|
8874 |
-
position = nodes.indexOf(node);
|
8875 |
-
if (position > -1 && position < idx) {
|
8876 |
-
nodes.splice(idx, 1);
|
8877 |
-
}
|
8878 |
-
}
|
8879 |
-
nodes.sort(function(a, b) {
|
8880 |
-
var relative = comparePos(a, b);
|
8881 |
-
if (relative & POSITION.PRECEDING) {
|
8882 |
-
return -1;
|
8883 |
-
} else if (relative & POSITION.FOLLOWING) {
|
8884 |
-
return 1;
|
8885 |
-
}
|
8886 |
-
return 0;
|
8887 |
-
});
|
8888 |
-
|
8889 |
-
return nodes;
|
8890 |
-
};
|
8891 |
-
|
8892 |
-
|
8893 |
-
/***/ }),
|
8894 |
-
/* 450 */
|
8895 |
-
/***/ (function(module, exports, __webpack_require__) {
|
8896 |
-
|
8897 |
-
module.exports = CollectingHandler;
|
8898 |
-
|
8899 |
-
function CollectingHandler(cbs){
|
8900 |
-
this._cbs = cbs || {};
|
8901 |
-
this.events = [];
|
8902 |
-
}
|
8903 |
-
|
8904 |
-
var EVENTS = __webpack_require__(38).EVENTS;
|
8905 |
-
Object.keys(EVENTS).forEach(function(name){
|
8906 |
-
if(EVENTS[name] === 0){
|
8907 |
-
name = "on" + name;
|
8908 |
-
CollectingHandler.prototype[name] = function(){
|
8909 |
-
this.events.push([name]);
|
8910 |
-
if(this._cbs[name]) this._cbs[name]();
|
8911 |
-
};
|
8912 |
-
} else if(EVENTS[name] === 1){
|
8913 |
-
name = "on" + name;
|
8914 |
-
CollectingHandler.prototype[name] = function(a){
|
8915 |
-
this.events.push([name, a]);
|
8916 |
-
if(this._cbs[name]) this._cbs[name](a);
|
8917 |
-
};
|
8918 |
-
} else if(EVENTS[name] === 2){
|
8919 |
-
name = "on" + name;
|
8920 |
-
CollectingHandler.prototype[name] = function(a, b){
|
8921 |
-
this.events.push([name, a, b]);
|
8922 |
-
if(this._cbs[name]) this._cbs[name](a, b);
|
8923 |
-
};
|
8924 |
-
} else {
|
8925 |
-
throw Error("wrong number of arguments");
|
8926 |
-
}
|
8927 |
-
});
|
8928 |
-
|
8929 |
-
CollectingHandler.prototype.onreset = function(){
|
8930 |
-
this.events = [];
|
8931 |
-
if(this._cbs.onreset) this._cbs.onreset();
|
8932 |
-
};
|
8933 |
-
|
8934 |
-
CollectingHandler.prototype.restart = function(){
|
8935 |
-
if(this._cbs.onreset) this._cbs.onreset();
|
8936 |
-
|
8937 |
-
for(var i = 0, len = this.events.length; i < len; i++){
|
8938 |
-
if(this._cbs[this.events[i][0]]){
|
8939 |
-
|
8940 |
-
var num = this.events[i].length;
|
8941 |
-
|
8942 |
-
if(num === 1){
|
8943 |
-
this._cbs[this.events[i][0]]();
|
8944 |
-
} else if(num === 2){
|
8945 |
-
this._cbs[this.events[i][0]](this.events[i][1]);
|
8946 |
-
} else {
|
8947 |
-
this._cbs[this.events[i][0]](this.events[i][1], this.events[i][2]);
|
8948 |
-
}
|
8949 |
-
}
|
8950 |
-
}
|
8951 |
-
};
|
8952 |
-
|
8953 |
-
|
8954 |
-
/***/ }),
|
8955 |
-
/* 451 */
|
8956 |
-
/***/ (function(module, exports, __webpack_require__) {
|
8957 |
-
|
8958 |
-
"use strict";
|
8959 |
-
|
8960 |
-
|
8961 |
-
Object.defineProperty(exports, "__esModule", {
|
8962 |
-
value: true
|
8963 |
-
});
|
8964 |
-
|
8965 |
-
var _ElementType$Text$Ele;
|
8966 |
-
|
8967 |
-
var _htmlparser = __webpack_require__(38);
|
8968 |
-
|
8969 |
-
var _TextElementType = __webpack_require__(452);
|
8970 |
-
|
8971 |
-
var _TextElementType2 = _interopRequireDefault(_TextElementType);
|
8972 |
-
|
8973 |
-
var _TagElementType = __webpack_require__(453);
|
8974 |
-
|
8975 |
-
var _TagElementType2 = _interopRequireDefault(_TagElementType);
|
8976 |
-
|
8977 |
-
var _StyleElementType = __webpack_require__(460);
|
8978 |
-
|
8979 |
-
var _StyleElementType2 = _interopRequireDefault(_StyleElementType);
|
8980 |
-
|
8981 |
-
var _UnsupportedElementType = __webpack_require__(461);
|
8982 |
-
|
8983 |
-
var _UnsupportedElementType2 = _interopRequireDefault(_UnsupportedElementType);
|
8984 |
-
|
8985 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
8986 |
-
|
8987 |
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /*
|
8988 |
-
* Map each htmlparser2 element type to a function which will convert that element type to a React element
|
8989 |
-
* Not all of the element types are supported so the UnsupportedElementType is used for them which will not return any
|
8990 |
-
* value
|
8991 |
-
*/
|
8992 |
-
|
8993 |
-
exports.default = (_ElementType$Text$Ele = {}, _defineProperty(_ElementType$Text$Ele, _htmlparser.ElementType.Text, _TextElementType2.default), _defineProperty(_ElementType$Text$Ele, _htmlparser.ElementType.Tag, _TagElementType2.default), _defineProperty(_ElementType$Text$Ele, _htmlparser.ElementType.Style, _StyleElementType2.default), _defineProperty(_ElementType$Text$Ele, _htmlparser.ElementType.Directive, _UnsupportedElementType2.default), _defineProperty(_ElementType$Text$Ele, _htmlparser.ElementType.Comment, _UnsupportedElementType2.default), _defineProperty(_ElementType$Text$Ele, _htmlparser.ElementType.Script, _UnsupportedElementType2.default), _defineProperty(_ElementType$Text$Ele, _htmlparser.ElementType.CDATA, _UnsupportedElementType2.default), _defineProperty(_ElementType$Text$Ele, _htmlparser.ElementType.Doctype, _UnsupportedElementType2.default), _ElementType$Text$Ele);
|
8994 |
-
|
8995 |
-
/***/ }),
|
8996 |
-
/* 452 */
|
8997 |
-
/***/ (function(module, exports, __webpack_require__) {
|
8998 |
-
|
8999 |
-
"use strict";
|
9000 |
-
|
9001 |
-
|
9002 |
-
Object.defineProperty(exports, "__esModule", {
|
9003 |
-
value: true
|
9004 |
-
});
|
9005 |
-
exports.default = TextElementType;
|
9006 |
-
/**
|
9007 |
-
* Converts a text node to a React text element
|
9008 |
-
*
|
9009 |
-
* @param {Object} node The text node
|
9010 |
-
* @returns {String} The text
|
9011 |
-
*/
|
9012 |
-
function TextElementType(node) {
|
9013 |
-
|
9014 |
-
// React will accept plain text for rendering so just return the node data
|
9015 |
-
return node.data;
|
9016 |
-
}
|
9017 |
-
|
9018 |
-
/***/ }),
|
9019 |
-
/* 453 */
|
9020 |
-
/***/ (function(module, exports, __webpack_require__) {
|
9021 |
-
|
9022 |
-
"use strict";
|
9023 |
-
|
9024 |
-
|
9025 |
-
Object.defineProperty(exports, "__esModule", {
|
9026 |
-
value: true
|
9027 |
-
});
|
9028 |
-
exports.default = TagElementType;
|
9029 |
-
|
9030 |
-
var _react = __webpack_require__(2);
|
9031 |
-
|
9032 |
-
var _react2 = _interopRequireDefault(_react);
|
9033 |
-
|
9034 |
-
var _ProcessNodes = __webpack_require__(270);
|
9035 |
-
|
9036 |
-
var _ProcessNodes2 = _interopRequireDefault(_ProcessNodes);
|
9037 |
-
|
9038 |
-
var _GeneratePropsFromAttributes = __webpack_require__(271);
|
9039 |
-
|
9040 |
-
var _GeneratePropsFromAttributes2 = _interopRequireDefault(_GeneratePropsFromAttributes);
|
9041 |
-
|
9042 |
-
var _TransformTagName = __webpack_require__(458);
|
9043 |
-
|
9044 |
-
var _TransformTagName2 = _interopRequireDefault(_TransformTagName);
|
9045 |
-
|
9046 |
-
var _VoidElements = __webpack_require__(459);
|
9047 |
-
|
9048 |
-
var _VoidElements2 = _interopRequireDefault(_VoidElements);
|
9049 |
-
|
9050 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
9051 |
-
|
9052 |
-
/**
|
9053 |
-
* Converts any element (excluding style - see StyleElementType - and script) to a react element.
|
9054 |
-
*
|
9055 |
-
* @param {Object} node The tag node
|
9056 |
-
* @param {String} key The key to give the React element
|
9057 |
-
* @returns {React.Element} The React tag element
|
9058 |
-
*/
|
9059 |
-
function TagElementType(node, key) {
|
9060 |
-
|
9061 |
-
// generate props
|
9062 |
-
var props = (0, _GeneratePropsFromAttributes2.default)(node.attribs, key);
|
9063 |
-
|
9064 |
-
// transform the tag name if needed
|
9065 |
-
var tagName = (0, _TransformTagName2.default)(node.name);
|
9066 |
-
|
9067 |
-
// If the node is not a void element and has children then process them
|
9068 |
-
var children = null;
|
9069 |
-
if (_VoidElements2.default.indexOf(tagName) === -1) {
|
9070 |
-
children = (0, _ProcessNodes2.default)(node.children);
|
9071 |
-
}
|
9072 |
-
|
9073 |
-
// create and return the element
|
9074 |
-
return _react2.default.createElement(tagName, props, children);
|
9075 |
-
}
|
9076 |
-
|
9077 |
-
/***/ }),
|
9078 |
-
/* 454 */
|
9079 |
-
/***/ (function(module, exports, __webpack_require__) {
|
9080 |
-
|
9081 |
-
"use strict";
|
9082 |
-
|
9083 |
-
|
9084 |
-
Object.defineProperty(exports, "__esModule", {
|
9085 |
-
value: true
|
9086 |
-
});
|
9087 |
-
exports.default = HtmlAttributesToReact;
|
9088 |
-
|
9089 |
-
var _BooleanAttributes = __webpack_require__(455);
|
9090 |
-
|
9091 |
-
var _BooleanAttributes2 = _interopRequireDefault(_BooleanAttributes);
|
9092 |
-
|
9093 |
-
var _ReactAttributes = __webpack_require__(456);
|
9094 |
-
|
9095 |
-
var _ReactAttributes2 = _interopRequireDefault(_ReactAttributes);
|
9096 |
-
|
9097 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
9098 |
-
|
9099 |
-
/**
|
9100 |
-
* Returns the parsed attribute value taking into account things like boolean attributes
|
9101 |
-
*
|
9102 |
-
* @param {String} attribute The name of the attribute
|
9103 |
-
* @param {*} value The value of the attribute from the HTML
|
9104 |
-
* @returns {*} The parsed attribute value
|
9105 |
-
*/
|
9106 |
-
var getParsedAttributeValue = function getParsedAttributeValue(attribute, value) {
|
9107 |
-
|
9108 |
-
// if the attribute if a boolean then it's value should be the same as it's name
|
9109 |
-
// e.g. disabled="disabled"
|
9110 |
-
var lowerBooleanAttributes = _BooleanAttributes2.default.map(function (attr) {
|
9111 |
-
return attr.toLowerCase();
|
9112 |
-
});
|
9113 |
-
if (lowerBooleanAttributes.indexOf(attribute.toLowerCase()) >= 0) {
|
9114 |
-
value = attribute;
|
9115 |
-
}
|
9116 |
-
|
9117 |
-
return value;
|
9118 |
-
};
|
9119 |
-
|
9120 |
-
/**
|
9121 |
-
* Takes an object of standard HTML property names and converts them to their React counterpart. If the react
|
9122 |
-
* version does not exist for an attribute then just use it as it is
|
9123 |
-
*
|
9124 |
-
* @param {Object} attributes The HTML attributes to convert
|
9125 |
-
* @returns {Object} The React attributes
|
9126 |
-
*/
|
9127 |
-
function HtmlAttributesToReact(attributes) {
|
9128 |
-
|
9129 |
-
return Object.keys(attributes).reduce(function (mappedAttributes, attribute) {
|
9130 |
-
|
9131 |
-
// lowercase the attribute name and find it in the react attribute map
|
9132 |
-
var lowerCaseAttribute = attribute.toLowerCase();
|
9133 |
-
|
9134 |
-
// format the attribute name
|
9135 |
-
var name = _ReactAttributes2.default[lowerCaseAttribute] || lowerCaseAttribute;
|
9136 |
-
|
9137 |
-
// add the parsed attribute value to the mapped attributes
|
9138 |
-
mappedAttributes[name] = getParsedAttributeValue(name, attributes[attribute]);
|
9139 |
-
|
9140 |
-
return mappedAttributes;
|
9141 |
-
}, {});
|
9142 |
-
}
|
9143 |
-
|
9144 |
-
/***/ }),
|
9145 |
-
/* 455 */
|
9146 |
-
/***/ (function(module, exports, __webpack_require__) {
|
9147 |
-
|
9148 |
-
"use strict";
|
9149 |
-
|
9150 |
-
|
9151 |
-
Object.defineProperty(exports, "__esModule", {
|
9152 |
-
value: true
|
9153 |
-
});
|
9154 |
-
/**
|
9155 |
-
* List of boolean attributes
|
9156 |
-
* These attributes should have their React attribute value set to be the same as their name
|
9157 |
-
* E.g. <input disabled> = <input disabled>
|
9158 |
-
* <input disabled=""> = <input disabled>
|
9159 |
-
* <input disabled="disabled"> = <input disabled>
|
9160 |
-
* @type {Array}
|
9161 |
-
*/
|
9162 |
-
exports.default = ['allowfullScreen', 'async', 'autoplay', 'capture', 'checked', 'controls', 'default', 'defer', 'disabled', 'formnovalidate', 'hidden', 'loop', 'multiple', 'muted', 'novalidate', 'open', 'readonly', 'required', 'reversed', 'scoped', 'seamless', 'selected', 'itemscope'];
|
9163 |
-
|
9164 |
-
/***/ }),
|
9165 |
-
/* 456 */
|
9166 |
-
/***/ (function(module, exports, __webpack_require__) {
|
9167 |
-
|
9168 |
-
"use strict";
|
9169 |
-
|
9170 |
-
|
9171 |
-
Object.defineProperty(exports, "__esModule", {
|
9172 |
-
value: true
|
9173 |
-
});
|
9174 |
-
/**
|
9175 |
-
* Mapping of standard HTML attributes to their React counterparts
|
9176 |
-
* List taken and reversed from react/src/renderers/dom/shared/HTMLDOMPropertyConfig.js
|
9177 |
-
* https://github.com/facebook/react/blob/c9c3c339b757682f1154f1c915eb55e6a8766933/src/renderers/dom/shared/HTMLDOMPropertyConfig.js
|
9178 |
-
* @type {Object}
|
9179 |
-
*/
|
9180 |
-
exports.default = {
|
9181 |
-
/**
|
9182 |
-
* Standard Properties
|
9183 |
-
*/
|
9184 |
-
accept: 'accept',
|
9185 |
-
'accept-charset': 'acceptCharset',
|
9186 |
-
accesskey: 'accessKey',
|
9187 |
-
action: 'action',
|
9188 |
-
allowfullscreen: 'allowFullScreen',
|
9189 |
-
allowtransparency: 'allowTransparency',
|
9190 |
-
alt: 'alt',
|
9191 |
-
async: 'async',
|
9192 |
-
autocomplete: 'autoComplete',
|
9193 |
-
autoplay: 'autoPlay',
|
9194 |
-
capture: 'capture',
|
9195 |
-
cellpadding: 'cellPadding',
|
9196 |
-
cellspacing: 'cellSpacing',
|
9197 |
-
charset: 'charSet',
|
9198 |
-
challenge: 'challenge',
|
9199 |
-
checked: 'checked',
|
9200 |
-
classid: 'classID',
|
9201 |
-
class: 'className',
|
9202 |
-
cols: 'cols',
|
9203 |
-
colspan: 'colSpan',
|
9204 |
-
content: 'content',
|
9205 |
-
contenteditable: 'contentEditable',
|
9206 |
-
contextmenu: 'contextMenu',
|
9207 |
-
controls: 'controls',
|
9208 |
-
coords: 'coords',
|
9209 |
-
crossorigin: 'crossOrigin',
|
9210 |
-
data: 'data',
|
9211 |
-
datetime: 'dateTime',
|
9212 |
-
default: 'default',
|
9213 |
-
defer: 'defer',
|
9214 |
-
dir: 'dir',
|
9215 |
-
disabled: 'disabled',
|
9216 |
-
download: 'download',
|
9217 |
-
draggable: 'draggable',
|
9218 |
-
enctype: 'encType',
|
9219 |
-
form: 'form',
|
9220 |
-
formaction: 'formAction',
|
9221 |
-
formenctype: 'formEncType',
|
9222 |
-
formmethod: 'formMethod',
|
9223 |
-
formnovalidate: 'formNoValidate',
|
9224 |
-
formtarget: 'formTarget',
|
9225 |
-
frameborder: 'frameBorder',
|
9226 |
-
headers: 'headers',
|
9227 |
-
height: 'height',
|
9228 |
-
hidden: 'hidden',
|
9229 |
-
high: 'high',
|
9230 |
-
href: 'href',
|
9231 |
-
hreflang: 'hrefLang',
|
9232 |
-
for: 'htmlFor',
|
9233 |
-
'http-equiv': 'httpEquiv',
|
9234 |
-
icon: 'icon',
|
9235 |
-
id: 'id',
|
9236 |
-
inputmode: 'inputMode',
|
9237 |
-
integrity: 'integrity',
|
9238 |
-
is: 'is',
|
9239 |
-
keyparams: 'keyParams',
|
9240 |
-
keytype: 'keyType',
|
9241 |
-
kind: 'kind',
|
9242 |
-
label: 'label',
|
9243 |
-
lang: 'lang',
|
9244 |
-
list: 'list',
|
9245 |
-
loop: 'loop',
|
9246 |
-
low: 'low',
|
9247 |
-
manifest: 'manifest',
|
9248 |
-
marginheight: 'marginHeight',
|
9249 |
-
marginwidth: 'marginWidth',
|
9250 |
-
max: 'max',
|
9251 |
-
maxlength: 'maxLength',
|
9252 |
-
media: 'media',
|
9253 |
-
mediagroup: 'mediaGroup',
|
9254 |
-
method: 'method',
|
9255 |
-
min: 'min',
|
9256 |
-
minlength: 'minLength',
|
9257 |
-
multiple: 'multiple',
|
9258 |
-
muted: 'muted',
|
9259 |
-
name: 'name',
|
9260 |
-
nonce: 'nonce',
|
9261 |
-
novalidate: 'noValidate',
|
9262 |
-
open: 'open',
|
9263 |
-
optimum: 'optimum',
|
9264 |
-
pattern: 'pattern',
|
9265 |
-
placeholder: 'placeholder',
|
9266 |
-
poster: 'poster',
|
9267 |
-
preload: 'preload',
|
9268 |
-
radiogroup: 'radioGroup',
|
9269 |
-
readonly: 'readOnly',
|
9270 |
-
rel: 'rel',
|
9271 |
-
required: 'required',
|
9272 |
-
reversed: 'reversed',
|
9273 |
-
role: 'role',
|
9274 |
-
rows: 'rows',
|
9275 |
-
rowspan: 'rowSpan',
|
9276 |
-
sandbox: 'sandbox',
|
9277 |
-
scope: 'scope',
|
9278 |
-
scoped: 'scoped',
|
9279 |
-
scrolling: 'scrolling',
|
9280 |
-
seamless: 'seamless',
|
9281 |
-
selected: 'selected',
|
9282 |
-
shape: 'shape',
|
9283 |
-
size: 'size',
|
9284 |
-
sizes: 'sizes',
|
9285 |
-
span: 'span',
|
9286 |
-
spellcheck: 'spellCheck',
|
9287 |
-
src: 'src',
|
9288 |
-
srcdoc: 'srcDoc',
|
9289 |
-
srclang: 'srcLang',
|
9290 |
-
srcset: 'srcSet',
|
9291 |
-
start: 'start',
|
9292 |
-
step: 'step',
|
9293 |
-
style: 'style',
|
9294 |
-
summary: 'summary',
|
9295 |
-
tabindex: 'tabIndex',
|
9296 |
-
target: 'target',
|
9297 |
-
title: 'title',
|
9298 |
-
type: 'type',
|
9299 |
-
usemap: 'useMap',
|
9300 |
-
value: 'value',
|
9301 |
-
width: 'width',
|
9302 |
-
wmode: 'wmode',
|
9303 |
-
wrap: 'wrap',
|
9304 |
-
/**
|
9305 |
-
* RDFa Properties
|
9306 |
-
*/
|
9307 |
-
about: 'about',
|
9308 |
-
datatype: 'datatype',
|
9309 |
-
inlist: 'inlist',
|
9310 |
-
prefix: 'prefix',
|
9311 |
-
property: 'property',
|
9312 |
-
resource: 'resource',
|
9313 |
-
typeof: 'typeof',
|
9314 |
-
vocab: 'vocab',
|
9315 |
-
/**
|
9316 |
-
* Non-standard Properties
|
9317 |
-
*/
|
9318 |
-
autocapitalize: 'autoCapitalize',
|
9319 |
-
autocorrect: 'autoCorrect',
|
9320 |
-
autosave: 'autoSave',
|
9321 |
-
color: 'color',
|
9322 |
-
itemprop: 'itemProp',
|
9323 |
-
itemscope: 'itemScope',
|
9324 |
-
itemtype: 'itemType',
|
9325 |
-
itemid: 'itemID',
|
9326 |
-
itemref: 'itemRef',
|
9327 |
-
results: 'results',
|
9328 |
-
security: 'security',
|
9329 |
-
unselectable: 'unselectable',
|
9330 |
-
autofocus: 'autoFocus'
|
9331 |
-
};
|
9332 |
-
|
9333 |
-
/***/ }),
|
9334 |
-
/* 457 */
|
9335 |
-
/***/ (function(module, exports, __webpack_require__) {
|
9336 |
-
|
9337 |
-
"use strict";
|
9338 |
-
|
9339 |
-
|
9340 |
-
Object.defineProperty(exports, "__esModule", {
|
9341 |
-
value: true
|
9342 |
-
});
|
9343 |
-
|
9344 |
-
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
9345 |
-
|
9346 |
-
exports.default = InlineStyleToObject;
|
9347 |
-
/**
|
9348 |
-
* Converts an inline style string into an object of React style properties
|
9349 |
-
*
|
9350 |
-
* @param {String} inlineStyle='' The inline style to convert
|
9351 |
-
* @returns {Object} The converted style
|
9352 |
-
*/
|
9353 |
-
function InlineStyleToObject() {
|
9354 |
-
var inlineStyle = arguments.length <= 0 || arguments[0] === undefined ? '' : arguments[0];
|
9355 |
-
|
9356 |
-
|
9357 |
-
// just return empty object if the inlineStyle is empty
|
9358 |
-
if (inlineStyle === '') {
|
9359 |
-
return {};
|
9360 |
-
}
|
9361 |
-
|
9362 |
-
return inlineStyle.split(';').reduce(function (styleObject, stylePropertyValue) {
|
9363 |
-
|
9364 |
-
// extract the style property name and value
|
9365 |
-
|
9366 |
-
var _stylePropertyValue$s = stylePropertyValue.split(':').map(function (item) {
|
9367 |
-
return item.trim().toLowerCase();
|
9368 |
-
});
|
9369 |
-
|
9370 |
-
var _stylePropertyValue$s2 = _slicedToArray(_stylePropertyValue$s, 2);
|
9371 |
-
|
9372 |
-
var property = _stylePropertyValue$s2[0];
|
9373 |
-
var value = _stylePropertyValue$s2[1];
|
9374 |
-
|
9375 |
-
// if there is no value (i.e. no : in the style) then ignore it
|
9376 |
-
|
9377 |
-
if (value === undefined) {
|
9378 |
-
return styleObject;
|
9379 |
-
}
|
9380 |
-
|
9381 |
-
// convert the property name into the correct React format
|
9382 |
-
// remove all hyphens and convert the letter immediately after each hyphen to upper case
|
9383 |
-
// additionally don't uppercase any -ms- prefix
|
9384 |
-
// e.g. -ms-style-property = msStyleProperty
|
9385 |
-
// -webkit-style-property = WebkitStyleProperty
|
9386 |
-
property = property.replace(/^-ms-/, 'ms-').replace(/-(.)/g, function (_, character) {
|
9387 |
-
return character.toUpperCase();
|
9388 |
-
});
|
9389 |
-
|
9390 |
-
// add the new style property and value to the style object
|
9391 |
-
styleObject[property] = value;
|
9392 |
-
|
9393 |
-
return styleObject;
|
9394 |
-
}, {});
|
9395 |
-
}
|
9396 |
-
|
9397 |
-
/***/ }),
|
9398 |
-
/* 458 */
|
9399 |
-
/***/ (function(module, exports, __webpack_require__) {
|
9400 |
-
|
9401 |
-
"use strict";
|
9402 |
-
|
9403 |
-
|
9404 |
-
Object.defineProperty(exports, "__esModule", {
|
9405 |
-
value: true
|
9406 |
-
});
|
9407 |
-
exports.default = TransformTagName;
|
9408 |
-
var TAGS_TO_TRANSFORM = {
|
9409 |
-
'html': 'div',
|
9410 |
-
'head': 'div',
|
9411 |
-
'body': 'div'
|
9412 |
-
};
|
9413 |
-
|
9414 |
-
/**
|
9415 |
-
* Transforms the specified tag name to another tag name if needed
|
9416 |
-
*
|
9417 |
-
* @param {String} tagName The name of the tag
|
9418 |
-
* @returns {String} The transformed tag name or the original if it doesn't need to be transformed
|
9419 |
-
*/
|
9420 |
-
function TransformTagName(tagName) {
|
9421 |
-
if (TAGS_TO_TRANSFORM.hasOwnProperty(tagName)) {
|
9422 |
-
return TAGS_TO_TRANSFORM[tagName];
|
9423 |
-
} else {
|
9424 |
-
return tagName;
|
9425 |
-
}
|
9426 |
-
}
|
9427 |
-
|
9428 |
-
/***/ }),
|
9429 |
-
/* 459 */
|
9430 |
-
/***/ (function(module, exports, __webpack_require__) {
|
9431 |
-
|
9432 |
-
"use strict";
|
9433 |
-
|
9434 |
-
|
9435 |
-
Object.defineProperty(exports, "__esModule", {
|
9436 |
-
value: true
|
9437 |
-
});
|
9438 |
-
/**
|
9439 |
-
* List of void elements
|
9440 |
-
* These elements are not allowed to have children
|
9441 |
-
* @type {Array}
|
9442 |
-
*/
|
9443 |
-
exports.default = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'];
|
9444 |
-
|
9445 |
-
/***/ }),
|
9446 |
-
/* 460 */
|
9447 |
-
/***/ (function(module, exports, __webpack_require__) {
|
9448 |
-
|
9449 |
-
"use strict";
|
9450 |
-
|
9451 |
-
|
9452 |
-
Object.defineProperty(exports, "__esModule", {
|
9453 |
-
value: true
|
9454 |
-
});
|
9455 |
-
exports.default = StyleElementType;
|
9456 |
-
|
9457 |
-
var _react = __webpack_require__(2);
|
9458 |
-
|
9459 |
-
var _react2 = _interopRequireDefault(_react);
|
9460 |
-
|
9461 |
-
var _GeneratePropsFromAttributes = __webpack_require__(271);
|
9462 |
-
|
9463 |
-
var _GeneratePropsFromAttributes2 = _interopRequireDefault(_GeneratePropsFromAttributes);
|
9464 |
-
|
9465 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
9466 |
-
|
9467 |
-
/**
|
9468 |
-
* Converts a <style> element to a React element
|
9469 |
-
*
|
9470 |
-
* @param {Object} node The style node
|
9471 |
-
* @param {String} key The key to give the React element
|
9472 |
-
* @returns {React.Element} The React style element
|
9473 |
-
*/
|
9474 |
-
function StyleElementType(node, key) {
|
9475 |
-
|
9476 |
-
// The style element only ever has a single child which is the styles so try and find this to add as
|
9477 |
-
// a child to the style element that will be created
|
9478 |
-
var styles = void 0;
|
9479 |
-
if (node.children.length > 0) {
|
9480 |
-
styles = node.children[0].data;
|
9481 |
-
}
|
9482 |
-
|
9483 |
-
// generate props
|
9484 |
-
var props = (0, _GeneratePropsFromAttributes2.default)(node.attribs, key);
|
9485 |
-
|
9486 |
-
// create and return the element
|
9487 |
-
return _react2.default.createElement('style', props, styles);
|
9488 |
-
}
|
9489 |
-
|
9490 |
-
/***/ }),
|
9491 |
-
/* 461 */
|
9492 |
-
/***/ (function(module, exports, __webpack_require__) {
|
9493 |
-
|
9494 |
-
"use strict";
|
9495 |
-
|
9496 |
-
|
9497 |
-
Object.defineProperty(exports, "__esModule", {
|
9498 |
-
value: true
|
9499 |
-
});
|
9500 |
-
exports.default = UnsupportedElementType;
|
9501 |
-
/**
|
9502 |
-
* Handles an unsupported element type by returning null so nothing is rendered
|
9503 |
-
* @returns {null}
|
9504 |
-
*/
|
9505 |
-
function UnsupportedElementType() {
|
9506 |
-
|
9507 |
-
// do nothing because the element type is unsupported
|
9508 |
-
// comment, directive, script, cdata, doctype are all currently unsupported
|
9509 |
-
return null;
|
9510 |
-
}
|
9511 |
-
|
9512 |
-
/***/ }),
|
9513 |
-
/* 462 */,
|
9514 |
-
/* 463 */,
|
9515 |
-
/* 464 */,
|
9516 |
-
/* 465 */,
|
9517 |
-
/* 466 */,
|
9518 |
-
/* 467 */,
|
9519 |
-
/* 468 */,
|
9520 |
-
/* 469 */,
|
9521 |
-
/* 470 */,
|
9522 |
-
/* 471 */,
|
9523 |
-
/* 472 */,
|
9524 |
-
/* 473 */,
|
9525 |
-
/* 474 */,
|
9526 |
-
/* 475 */,
|
9527 |
-
/* 476 */,
|
9528 |
-
/* 477 */,
|
9529 |
-
/* 478 */,
|
9530 |
-
/* 479 */,
|
9531 |
-
/* 480 */
|
9532 |
-
/***/ (function(module, exports, __webpack_require__) {
|
9533 |
-
|
9534 |
-
"use strict";
|
9535 |
-
|
9536 |
-
|
9537 |
-
Object.defineProperty(exports, "__esModule", {
|
9538 |
-
value: true
|
9539 |
-
});
|
9540 |
-
exports.fromNewsletter = exports.fromUrl = exports.fromDom = undefined;
|
9541 |
-
|
9542 |
-
var _underscore = __webpack_require__(8);
|
9543 |
-
|
9544 |
-
var _underscore2 = _interopRequireDefault(_underscore);
|
9545 |
-
|
9546 |
-
var _mailpoet = __webpack_require__(4);
|
9547 |
-
|
9548 |
-
var _mailpoet2 = _interopRequireDefault(_mailpoet);
|
9549 |
-
|
9550 |
-
var _html2canvas = __webpack_require__(481);
|
9551 |
-
|
9552 |
-
var _html2canvas2 = _interopRequireDefault(_html2canvas);
|
9553 |
-
|
9554 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
9555 |
-
|
9556 |
-
/**
|
9557 |
-
* Generates a thumbnail from a DOM element.
|
9558 |
-
*
|
9559 |
-
* @param {DOMElement} element
|
9560 |
-
* @return {Promise<String>} DataURL of the generated image.
|
9561 |
-
*/
|
9562 |
-
var fromDom = exports.fromDom = function fromDom(element) {
|
9563 |
-
return (0, _html2canvas2.default)(element, {
|
9564 |
-
logging: false
|
9565 |
-
}).then(function (canvas) {
|
9566 |
-
return canvas.toDataURL('image/jpeg');
|
9567 |
-
});
|
9568 |
-
};
|
9569 |
-
|
9570 |
-
/**
|
9571 |
-
* Generates a thumbnail from an URL.
|
9572 |
-
*
|
9573 |
-
* @param {String} url
|
9574 |
-
* @return {Promise<String>} DataURL of the generated image.
|
9575 |
-
*/
|
9576 |
-
var fromUrl = exports.fromUrl = function fromUrl(url) {
|
9577 |
-
return new Promise(function (resolve, reject) {
|
9578 |
-
var iframe = document.createElement('iframe');
|
9579 |
-
var protocol = location.href.startsWith('https://') ? 'https:' : 'http:';
|
9580 |
-
iframe.src = protocol + url.replace(/^https?:/, '');
|
9581 |
-
iframe.style.opacity = 0;
|
9582 |
-
iframe.scrolling = 'no';
|
9583 |
-
iframe.onload = function () {
|
9584 |
-
fromDom(iframe.contentDocument.documentElement).then(function (image) {
|
9585 |
-
document.body.removeChild(iframe);
|
9586 |
-
resolve(image);
|
9587 |
-
}).catch(function () {
|
9588 |
-
document.body.removeChild(iframe);
|
9589 |
-
reject(_mailpoet2.default.I18n.t('errorWhileTakingScreenshot'));
|
9590 |
-
});
|
9591 |
-
};
|
9592 |
-
var onError = function onError() {
|
9593 |
-
document.body.removeChild(iframe);
|
9594 |
-
reject(_mailpoet2.default.I18n.t('errorWhileTakingScreenshot'));
|
9595 |
-
};
|
9596 |
-
iframe.onerror = onError;
|
9597 |
-
iframe.onError = onError;
|
9598 |
-
iframe.className = 'mailpoet_template_iframe';
|
9599 |
-
try {
|
9600 |
-
document.body.appendChild(iframe);
|
9601 |
-
} catch (err) {
|
9602 |
-
onError();
|
9603 |
-
}
|
9604 |
-
});
|
9605 |
-
};
|
9606 |
-
|
9607 |
-
/**
|
9608 |
-
* Generates a thumbnail from a newsletter's data.
|
9609 |
-
*
|
9610 |
-
* @param {Object} data
|
9611 |
-
* @return {Promise<String>} DataURL of the generated image.
|
9612 |
-
*/
|
9613 |
-
var fromNewsletter = exports.fromNewsletter = function fromNewsletter(data) {
|
9614 |
-
return new Promise(function (resolve, reject) {
|
9615 |
-
var json = data;
|
9616 |
-
if (!_underscore2.default.isUndefined(json.body)) {
|
9617 |
-
json.body = JSON.stringify(json.body);
|
9618 |
-
}
|
9619 |
-
_mailpoet2.default.Ajax.post({
|
9620 |
-
api_version: window.mailpoet_api_version,
|
9621 |
-
endpoint: 'newsletters',
|
9622 |
-
action: 'showPreview',
|
9623 |
-
data: json
|
9624 |
-
}).done(function (response) {
|
9625 |
-
return fromUrl(response.meta.preview_url).then(resolve).catch(reject);
|
9626 |
-
}).fail(function (response) {
|
9627 |
-
return reject(response.errors);
|
9628 |
-
});
|
9629 |
-
});
|
9630 |
-
};
|
9631 |
-
|
9632 |
-
/***/ }),
|
9633 |
-
/* 481 */
|
9634 |
-
/***/ (function(module, exports, __webpack_require__) {
|
9635 |
-
|
9636 |
-
/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["html2canvas"] = __webpack_require__(482);
|
9637 |
-
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(9)))
|
9638 |
-
|
9639 |
-
/***/ }),
|
9640 |
-
/* 482 */
|
9641 |
-
/***/ (function(module, exports, __webpack_require__) {
|
9642 |
-
|
9643 |
-
/*!
|
9644 |
-
* html2canvas 1.0.0-alpha.12 <https://html2canvas.hertzen.com>
|
9645 |
-
* Copyright (c) 2018 Niklas von Hertzen <https://hertzen.com>
|
9646 |
-
* Released under MIT License
|
9647 |
-
*/
|
9648 |
-
(function webpackUniversalModuleDefinition(root, factory) {
|
9649 |
-
if(true)
|
9650 |
-
module.exports = factory();
|
9651 |
-
else if(typeof define === 'function' && define.amd)
|
9652 |
-
define([], factory);
|
9653 |
-
else if(typeof exports === 'object')
|
9654 |
-
exports["html2canvas"] = factory();
|
9655 |
-
else
|
9656 |
-
root["html2canvas"] = factory();
|
9657 |
-
})(this, function() {
|
9658 |
-
return /******/ (function(modules) { // webpackBootstrap
|
9659 |
-
/******/ // The module cache
|
9660 |
-
/******/ var installedModules = {};
|
9661 |
-
/******/
|
9662 |
-
/******/ // The require function
|
9663 |
-
/******/ function __webpack_require__(moduleId) {
|
9664 |
-
/******/
|
9665 |
-
/******/ // Check if module is in cache
|
9666 |
-
/******/ if(installedModules[moduleId]) {
|
9667 |
-
/******/ return installedModules[moduleId].exports;
|
9668 |
-
/******/ }
|
9669 |
-
/******/ // Create a new module (and put it into the cache)
|
9670 |
-
/******/ var module = installedModules[moduleId] = {
|
9671 |
-
/******/ i: moduleId,
|
9672 |
-
/******/ l: false,
|
9673 |
-
/******/ exports: {}
|
9674 |
-
/******/ };
|
9675 |
-
/******/
|
9676 |
-
/******/ // Execute the module function
|
9677 |
-
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
9678 |
-
/******/
|
9679 |
-
/******/ // Flag the module as loaded
|
9680 |
-
/******/ module.l = true;
|
9681 |
-
/******/
|
9682 |
-
/******/ // Return the exports of the module
|
9683 |
-
/******/ return module.exports;
|
9684 |
-
/******/ }
|
9685 |
-
/******/
|
9686 |
-
/******/
|
9687 |
-
/******/ // expose the modules object (__webpack_modules__)
|
9688 |
-
/******/ __webpack_require__.m = modules;
|
9689 |
-
/******/
|
9690 |
-
/******/ // expose the module cache
|
9691 |
-
/******/ __webpack_require__.c = installedModules;
|
9692 |
-
/******/
|
9693 |
-
/******/ // define getter function for harmony exports
|
9694 |
-
/******/ __webpack_require__.d = function(exports, name, getter) {
|
9695 |
-
/******/ if(!__webpack_require__.o(exports, name)) {
|
9696 |
-
/******/ Object.defineProperty(exports, name, {
|
9697 |
-
/******/ configurable: false,
|
9698 |
-
/******/ enumerable: true,
|
9699 |
-
/******/ get: getter
|
9700 |
-
/******/ });
|
9701 |
-
/******/ }
|
9702 |
-
/******/ };
|
9703 |
-
/******/
|
9704 |
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
9705 |
-
/******/ __webpack_require__.n = function(module) {
|
9706 |
-
/******/ var getter = module && module.__esModule ?
|
9707 |
-
/******/ function getDefault() { return module['default']; } :
|
9708 |
-
/******/ function getModuleExports() { return module; };
|
9709 |
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
9710 |
-
/******/ return getter;
|
9711 |
-
/******/ };
|
9712 |
-
/******/
|
9713 |
-
/******/ // Object.prototype.hasOwnProperty.call
|
9714 |
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
9715 |
-
/******/
|
9716 |
-
/******/ // __webpack_public_path__
|
9717 |
-
/******/ __webpack_require__.p = "";
|
9718 |
-
/******/
|
9719 |
-
/******/ // Load entry module and return exports
|
9720 |
-
/******/ return __webpack_require__(__webpack_require__.s = 27);
|
9721 |
-
/******/ })
|
9722 |
-
/************************************************************************/
|
9723 |
-
/******/ ([
|
9724 |
-
/* 0 */
|
9725 |
-
/***/ (function(module, exports, __webpack_require__) {
|
9726 |
-
|
9727 |
-
"use strict";
|
9728 |
-
|
9729 |
-
|
9730 |
-
// http://dev.w3.org/csswg/css-color/
|
9731 |
-
|
9732 |
-
Object.defineProperty(exports, "__esModule", {
|
9733 |
-
value: true
|
9734 |
-
});
|
9735 |
-
|
9736 |
-
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
9737 |
-
|
9738 |
-
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
9739 |
-
|
9740 |
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
9741 |
-
|
9742 |
-
var HEX3 = /^#([a-f0-9]{3})$/i;
|
9743 |
-
var hex3 = function hex3(value) {
|
9744 |
-
var match = value.match(HEX3);
|
9745 |
-
if (match) {
|
9746 |
-
return [parseInt(match[1][0] + match[1][0], 16), parseInt(match[1][1] + match[1][1], 16), parseInt(match[1][2] + match[1][2], 16), null];
|
9747 |
-
}
|
9748 |
-
return false;
|
9749 |
-
};
|
9750 |
-
|
9751 |
-
var HEX6 = /^#([a-f0-9]{6})$/i;
|
9752 |
-
var hex6 = function hex6(value) {
|
9753 |
-
var match = value.match(HEX6);
|
9754 |
-
if (match) {
|
9755 |
-
return [parseInt(match[1].substring(0, 2), 16), parseInt(match[1].substring(2, 4), 16), parseInt(match[1].substring(4, 6), 16), null];
|
9756 |
-
}
|
9757 |
-
return false;
|
9758 |
-
};
|
9759 |
-
|
9760 |
-
var RGB = /^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/;
|
9761 |
-
var rgb = function rgb(value) {
|
9762 |
-
var match = value.match(RGB);
|
9763 |
-
if (match) {
|
9764 |
-
return [Number(match[1]), Number(match[2]), Number(match[3]), null];
|
9765 |
-
}
|
9766 |
-
return false;
|
9767 |
-
};
|
9768 |
-
|
9769 |
-
var RGBA = /^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d?\.?\d+)\s*\)$/;
|
9770 |
-
var rgba = function rgba(value) {
|
9771 |
-
var match = value.match(RGBA);
|
9772 |
-
if (match && match.length > 4) {
|
9773 |
-
return [Number(match[1]), Number(match[2]), Number(match[3]), Number(match[4])];
|
9774 |
-
}
|
9775 |
-
return false;
|
9776 |
-
};
|
9777 |
-
|
9778 |
-
var fromArray = function fromArray(array) {
|
9779 |
-
return [Math.min(array[0], 255), Math.min(array[1], 255), Math.min(array[2], 255), array.length > 3 ? array[3] : null];
|
9780 |
-
};
|
9781 |
-
|
9782 |
-
var namedColor = function namedColor(name) {
|
9783 |
-
var color = NAMED_COLORS[name.toLowerCase()];
|
9784 |
-
return color ? color : false;
|
9785 |
-
};
|
9786 |
-
|
9787 |
-
var Color = function () {
|
9788 |
-
function Color(value) {
|
9789 |
-
_classCallCheck(this, Color);
|
9790 |
-
|
9791 |
-
var _ref = Array.isArray(value) ? fromArray(value) : hex3(value) || rgb(value) || rgba(value) || namedColor(value) || hex6(value) || [0, 0, 0, null],
|
9792 |
-
_ref2 = _slicedToArray(_ref, 4),
|
9793 |
-
r = _ref2[0],
|
9794 |
-
g = _ref2[1],
|
9795 |
-
b = _ref2[2],
|
9796 |
-
a = _ref2[3];
|
9797 |
-
|
9798 |
-
this.r = r;
|
9799 |
-
this.g = g;
|
9800 |
-
this.b = b;
|
9801 |
-
this.a = a;
|
9802 |
-
}
|
9803 |
-
|
9804 |
-
_createClass(Color, [{
|
9805 |
-
key: 'isTransparent',
|
9806 |
-
value: function isTransparent() {
|
9807 |
-
return this.a === 0;
|
9808 |
-
}
|
9809 |
-
}, {
|
9810 |
-
key: 'toString',
|
9811 |
-
value: function toString() {
|
9812 |
-
return this.a !== null && this.a !== 1 ? 'rgba(' + this.r + ',' + this.g + ',' + this.b + ',' + this.a + ')' : 'rgb(' + this.r + ',' + this.g + ',' + this.b + ')';
|
9813 |
-
}
|
9814 |
-
}]);
|
9815 |
-
|
9816 |
-
return Color;
|
9817 |
-
}();
|
9818 |
-
|
9819 |
-
exports.default = Color;
|
9820 |
-
|
9821 |
-
|
9822 |
-
var NAMED_COLORS = {
|
9823 |
-
transparent: [0, 0, 0, 0],
|
9824 |
-
aliceblue: [240, 248, 255, null],
|
9825 |
-
antiquewhite: [250, 235, 215, null],
|
9826 |
-
aqua: [0, 255, 255, null],
|
9827 |
-
aquamarine: [127, 255, 212, null],
|
9828 |
-
azure: [240, 255, 255, null],
|
9829 |
-
beige: [245, 245, 220, null],
|
9830 |
-
bisque: [255, 228, 196, null],
|
9831 |
-
black: [0, 0, 0, null],
|
9832 |
-
blanchedalmond: [255, 235, 205, null],
|
9833 |
-
blue: [0, 0, 255, null],
|
9834 |
-
blueviolet: [138, 43, 226, null],
|
9835 |
-
brown: [165, 42, 42, null],
|
9836 |
-
burlywood: [222, 184, 135, null],
|
9837 |
-
cadetblue: [95, 158, 160, null],
|
9838 |
-
chartreuse: [127, 255, 0, null],
|
9839 |
-
chocolate: [210, 105, 30, null],
|
9840 |
-
coral: [255, 127, 80, null],
|
9841 |
-
cornflowerblue: [100, 149, 237, null],
|
9842 |
-
cornsilk: [255, 248, 220, null],
|
9843 |
-
crimson: [220, 20, 60, null],
|
9844 |
-
cyan: [0, 255, 255, null],
|
9845 |
-
darkblue: [0, 0, 139, null],
|
9846 |
-
darkcyan: [0, 139, 139, null],
|
9847 |
-
darkgoldenrod: [184, 134, 11, null],
|
9848 |
-
darkgray: [169, 169, 169, null],
|
9849 |
-
darkgreen: [0, 100, 0, null],
|
9850 |
-
darkgrey: [169, 169, 169, null],
|
9851 |
-
darkkhaki: [189, 183, 107, null],
|
9852 |
-
darkmagenta: [139, 0, 139, null],
|
9853 |
-
darkolivegreen: [85, 107, 47, null],
|
9854 |
-
darkorange: [255, 140, 0, null],
|
9855 |
-
darkorchid: [153, 50, 204, null],
|
9856 |
-
darkred: [139, 0, 0, null],
|
9857 |
-
darksalmon: [233, 150, 122, null],
|
9858 |
-
darkseagreen: [143, 188, 143, null],
|
9859 |
-
darkslateblue: [72, 61, 139, null],
|
9860 |
-
darkslategray: [47, 79, 79, null],
|
9861 |
-
darkslategrey: [47, 79, 79, null],
|
9862 |
-
darkturquoise: [0, 206, 209, null],
|
9863 |
-
darkviolet: [148, 0, 211, null],
|
9864 |
-
deeppink: [255, 20, 147, null],
|
9865 |
-
deepskyblue: [0, 191, 255, null],
|
9866 |
-
dimgray: [105, 105, 105, null],
|
9867 |
-
dimgrey: [105, 105, 105, null],
|
9868 |
-
dodgerblue: [30, 144, 255, null],
|
9869 |
-
firebrick: [178, 34, 34, null],
|
9870 |
-
floralwhite: [255, 250, 240, null],
|
9871 |
-
forestgreen: [34, 139, 34, null],
|
9872 |
-
fuchsia: [255, 0, 255, null],
|
9873 |
-
gainsboro: [220, 220, 220, null],
|
9874 |
-
ghostwhite: [248, 248, 255, null],
|
9875 |
-
gold: [255, 215, 0, null],
|
9876 |
-
goldenrod: [218, 165, 32, null],
|
9877 |
-
gray: [128, 128, 128, null],
|
9878 |
-
green: [0, 128, 0, null],
|
9879 |
-
greenyellow: [173, 255, 47, null],
|
9880 |
-
grey: [128, 128, 128, null],
|
9881 |
-
honeydew: [240, 255, 240, null],
|
9882 |
-
hotpink: [255, 105, 180, null],
|
9883 |
-
indianred: [205, 92, 92, null],
|
9884 |
-
indigo: [75, 0, 130, null],
|
9885 |
-
ivory: [255, 255, 240, null],
|
9886 |
-
khaki: [240, 230, 140, null],
|
9887 |
-
lavender: [230, 230, 250, null],
|
9888 |
-
lavenderblush: [255, 240, 245, null],
|
9889 |
-
lawngreen: [124, 252, 0, null],
|
9890 |
-
lemonchiffon: [255, 250, 205, null],
|
9891 |
-
lightblue: [173, 216, 230, null],
|
9892 |
-
lightcoral: [240, 128, 128, null],
|
9893 |
-
lightcyan: [224, 255, 255, null],
|
9894 |
-
lightgoldenrodyellow: [250, 250, 210, null],
|
9895 |
-
lightgray: [211, 211, 211, null],
|
9896 |
-
lightgreen: [144, 238, 144, null],
|
9897 |
-
lightgrey: [211, 211, 211, null],
|
9898 |
-
lightpink: [255, 182, 193, null],
|
9899 |
-
lightsalmon: [255, 160, 122, null],
|
9900 |
-
lightseagreen: [32, 178, 170, null],
|
9901 |
-
lightskyblue: [135, 206, 250, null],
|
9902 |
-
lightslategray: [119, 136, 153, null],
|
9903 |
-
lightslategrey: [119, 136, 153, null],
|
9904 |
-
lightsteelblue: [176, 196, 222, null],
|
9905 |
-
lightyellow: [255, 255, 224, null],
|
9906 |
-
lime: [0, 255, 0, null],
|
9907 |
-
limegreen: [50, 205, 50, null],
|
9908 |
-
linen: [250, 240, 230, null],
|
9909 |
-
magenta: [255, 0, 255, null],
|
9910 |
-
maroon: [128, 0, 0, null],
|
9911 |
-
mediumaquamarine: [102, 205, 170, null],
|
9912 |
-
mediumblue: [0, 0, 205, null],
|
9913 |
-
mediumorchid: [186, 85, 211, null],
|
9914 |
-
mediumpurple: [147, 112, 219, null],
|
9915 |
-
mediumseagreen: [60, 179, 113, null],
|
9916 |
-
mediumslateblue: [123, 104, 238, null],
|
9917 |
-
mediumspringgreen: [0, 250, 154, null],
|
9918 |
-
mediumturquoise: [72, 209, 204, null],
|
9919 |
-
mediumvioletred: [199, 21, 133, null],
|
9920 |
-
midnightblue: [25, 25, 112, null],
|
9921 |
-
mintcream: [245, 255, 250, null],
|
9922 |
-
mistyrose: [255, 228, 225, null],
|
9923 |
-
moccasin: [255, 228, 181, null],
|
9924 |
-
navajowhite: [255, 222, 173, null],
|
9925 |
-
navy: [0, 0, 128, null],
|
9926 |
-
oldlace: [253, 245, 230, null],
|
9927 |
-
olive: [128, 128, 0, null],
|
9928 |
-
olivedrab: [107, 142, 35, null],
|
9929 |
-
orange: [255, 165, 0, null],
|
9930 |
-
orangered: [255, 69, 0, null],
|
9931 |
-
orchid: [218, 112, 214, null],
|
9932 |
-
palegoldenrod: [238, 232, 170, null],
|
9933 |
-
palegreen: [152, 251, 152, null],
|
9934 |
-
paleturquoise: [175, 238, 238, null],
|
9935 |
-
palevioletred: [219, 112, 147, null],
|
9936 |
-
papayawhip: [255, 239, 213, null],
|
9937 |
-
peachpuff: [255, 218, 185, null],
|
9938 |
-
peru: [205, 133, 63, null],
|
9939 |
-
pink: [255, 192, 203, null],
|
9940 |
-
plum: [221, 160, 221, null],
|
9941 |
-
powderblue: [176, 224, 230, null],
|
9942 |
-
purple: [128, 0, 128, null],
|
9943 |
-
rebeccapurple: [102, 51, 153, null],
|
9944 |
-
red: [255, 0, 0, null],
|
9945 |
-
rosybrown: [188, 143, 143, null],
|
9946 |
-
royalblue: [65, 105, 225, null],
|
9947 |
-
saddlebrown: [139, 69, 19, null],
|
9948 |
-
salmon: [250, 128, 114, null],
|
9949 |
-
sandybrown: [244, 164, 96, null],
|
9950 |
-
seagreen: [46, 139, 87, null],
|
9951 |
-
seashell: [255, 245, 238, null],
|
9952 |
-
sienna: [160, 82, 45, null],
|
9953 |
-
silver: [192, 192, 192, null],
|
9954 |
-
skyblue: [135, 206, 235, null],
|
9955 |
-
slateblue: [106, 90, 205, null],
|
9956 |
-
slategray: [112, 128, 144, null],
|
9957 |
-
slategrey: [112, 128, 144, null],
|
9958 |
-
snow: [255, 250, 250, null],
|
9959 |
-
springgreen: [0, 255, 127, null],
|
9960 |
-
steelblue: [70, 130, 180, null],
|
9961 |
-
tan: [210, 180, 140, null],
|
9962 |
-
teal: [0, 128, 128, null],
|
9963 |
-
thistle: [216, 191, 216, null],
|
9964 |
-
tomato: [255, 99, 71, null],
|
9965 |
-
turquoise: [64, 224, 208, null],
|
9966 |
-
violet: [238, 130, 238, null],
|
9967 |
-
wheat: [245, 222, 179, null],
|
9968 |
-
white: [255, 255, 255, null],
|
9969 |
-
whitesmoke: [245, 245, 245, null],
|
9970 |
-
yellow: [255, 255, 0, null],
|
9971 |
-
yellowgreen: [154, 205, 50, null]
|
9972 |
-
};
|
9973 |
-
|
9974 |
-
var TRANSPARENT = exports.TRANSPARENT = new Color([0, 0, 0, 0]);
|
9975 |
-
|
9976 |
-
/***/ }),
|
9977 |
-
/* 1 */
|
9978 |
-
/***/ (function(module, exports, __webpack_require__) {
|
9979 |
-
|
9980 |
-
"use strict";
|
9981 |
-
|
9982 |
-
|
9983 |
-
Object.defineProperty(exports, "__esModule", {
|
9984 |
-
value: true
|
9985 |
-
});
|
9986 |
-
exports.calculateLengthFromValueWithUnit = exports.LENGTH_TYPE = undefined;
|
9987 |
-
|
9988 |
-
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
9989 |
-
|
9990 |
-
var _NodeContainer = __webpack_require__(3);
|
9991 |
-
|
9992 |
-
var _NodeContainer2 = _interopRequireDefault(_NodeContainer);
|
9993 |
-
|
9994 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
9995 |
-
|
9996 |
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
9997 |
-
|
9998 |
-
var LENGTH_WITH_UNIT = /([\d.]+)(px|r?em|%)/i;
|
9999 |
-
|
10000 |
-
var LENGTH_TYPE = exports.LENGTH_TYPE = {
|
10001 |
-
PX: 0,
|
10002 |
-
PERCENTAGE: 1
|
10003 |
-
};
|
10004 |
-
|
10005 |
-
var Length = function () {
|
10006 |
-
function Length(value) {
|
10007 |
-
_classCallCheck(this, Length);
|
10008 |
-
|
10009 |
-
this.type = value.substr(value.length - 1) === '%' ? LENGTH_TYPE.PERCENTAGE : LENGTH_TYPE.PX;
|
10010 |
-
var parsedValue = parseFloat(value);
|
10011 |
-
if (true && isNaN(parsedValue)) {
|
10012 |
-
console.error('Invalid value given for Length: "' + value + '"');
|
10013 |
-
}
|
10014 |
-
this.value = isNaN(parsedValue) ? 0 : parsedValue;
|
10015 |
-
}
|
10016 |
-
|
10017 |
-
_createClass(Length, [{
|
10018 |
-
key: 'isPercentage',
|
10019 |
-
value: function isPercentage() {
|
10020 |
-
return this.type === LENGTH_TYPE.PERCENTAGE;
|
10021 |
-
}
|
10022 |
-
}, {
|
10023 |
-
key: 'getAbsoluteValue',
|
10024 |
-
value: function getAbsoluteValue(parentLength) {
|
10025 |
-
return this.isPercentage() ? parentLength * (this.value / 100) : this.value;
|
10026 |
-
}
|
10027 |
-
}], [{
|
10028 |
-
key: 'create',
|
10029 |
-
value: function create(v) {
|
10030 |
-
return new Length(v);
|
10031 |
-
}
|
10032 |
-
}]);
|
10033 |
-
|
10034 |
-
return Length;
|
10035 |
-
}();
|
10036 |
-
|
10037 |
-
exports.default = Length;
|
10038 |
-
|
10039 |
-
|
10040 |
-
var getRootFontSize = function getRootFontSize(container) {
|
10041 |
-
var parent = container.parent;
|
10042 |
-
return parent ? getRootFontSize(parent) : parseFloat(container.style.font.fontSize);
|
10043 |
-
};
|
10044 |
-
|
10045 |
-
var calculateLengthFromValueWithUnit = exports.calculateLengthFromValueWithUnit = function calculateLengthFromValueWithUnit(container, value, unit) {
|
10046 |
-
switch (unit) {
|
10047 |
-
case 'px':
|
10048 |
-
case '%':
|
10049 |
-
return new Length(value + unit);
|
10050 |
-
case 'em':
|
10051 |
-
case 'rem':
|
10052 |
-
var length = new Length(value);
|
10053 |
-
length.value *= unit === 'em' ? parseFloat(container.style.font.fontSize) : getRootFontSize(container);
|
10054 |
-
return length;
|
10055 |
-
default:
|
10056 |
-
// TODO: handle correctly if unknown unit is used
|
10057 |
-
return new Length('0');
|
10058 |
-
}
|
10059 |
-
};
|
10060 |
-
|
10061 |
-
/***/ }),
|
10062 |
-
/* 2 */
|
10063 |
-
/***/ (function(module, exports, __webpack_require__) {
|
10064 |
-
|
10065 |
-
"use strict";
|
10066 |
-
|
10067 |
-
|
10068 |
-
Object.defineProperty(exports, "__esModule", {
|
10069 |
-
value: true
|
10070 |
-
});
|
10071 |
-
exports.parseBoundCurves = exports.calculatePaddingBoxPath = exports.calculateBorderBoxPath = exports.parsePathForBorder = exports.parseDocumentSize = exports.calculateContentBox = exports.calculatePaddingBox = exports.parseBounds = exports.Bounds = undefined;
|
10072 |
-
|
10073 |
-
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
10074 |
-
|
10075 |
-
var _Vector = __webpack_require__(7);
|
10076 |
-
|
10077 |
-
var _Vector2 = _interopRequireDefault(_Vector);
|
10078 |
-
|
10079 |
-
var _BezierCurve = __webpack_require__(32);
|
10080 |
-
|
10081 |
-
var _BezierCurve2 = _interopRequireDefault(_BezierCurve);
|
10082 |
-
|
10083 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
10084 |
-
|
10085 |
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
10086 |
-
|
10087 |
-
var TOP = 0;
|
10088 |
-
var RIGHT = 1;
|
10089 |
-
var BOTTOM = 2;
|
10090 |
-
var LEFT = 3;
|
10091 |
-
|
10092 |
-
var H = 0;
|
10093 |
-
var V = 1;
|
10094 |
-
|
10095 |
-
var Bounds = exports.Bounds = function () {
|
10096 |
-
function Bounds(x, y, w, h) {
|
10097 |
-
_classCallCheck(this, Bounds);
|
10098 |
-
|
10099 |
-
this.left = x;
|
10100 |
-
this.top = y;
|
10101 |
-
this.width = w;
|
10102 |
-
this.height = h;
|
10103 |
-
}
|
10104 |
-
|
10105 |
-
_createClass(Bounds, null, [{
|
10106 |
-
key: 'fromClientRect',
|
10107 |
-
value: function fromClientRect(clientRect, scrollX, scrollY) {
|
10108 |
-
return new Bounds(clientRect.left + scrollX, clientRect.top + scrollY, clientRect.width, clientRect.height);
|
10109 |
-
}
|
10110 |
-
}]);
|
10111 |
-
|
10112 |
-
return Bounds;
|
10113 |
-
}();
|
10114 |
-
|
10115 |
-
var parseBounds = exports.parseBounds = function parseBounds(node, scrollX, scrollY) {
|
10116 |
-
return Bounds.fromClientRect(node.getBoundingClientRect(), scrollX, scrollY);
|
10117 |
-
};
|
10118 |
-
|
10119 |
-
var calculatePaddingBox = exports.calculatePaddingBox = function calculatePaddingBox(bounds, borders) {
|
10120 |
-
return new Bounds(bounds.left + borders[LEFT].borderWidth, bounds.top + borders[TOP].borderWidth, bounds.width - (borders[RIGHT].borderWidth + borders[LEFT].borderWidth), bounds.height - (borders[TOP].borderWidth + borders[BOTTOM].borderWidth));
|
10121 |
-
};
|
10122 |
-
|
10123 |
-
var calculateContentBox = exports.calculateContentBox = function calculateContentBox(bounds, padding, borders) {
|
10124 |
-
// TODO support percentage paddings
|
10125 |
-
var paddingTop = padding[TOP].value;
|
10126 |
-
var paddingRight = padding[RIGHT].value;
|
10127 |
-
var paddingBottom = padding[BOTTOM].value;
|
10128 |
-
var paddingLeft = padding[LEFT].value;
|
10129 |
-
|
10130 |
-
return new Bounds(bounds.left + paddingLeft + borders[LEFT].borderWidth, bounds.top + paddingTop + borders[TOP].borderWidth, bounds.width - (borders[RIGHT].borderWidth + borders[LEFT].borderWidth + paddingLeft + paddingRight), bounds.height - (borders[TOP].borderWidth + borders[BOTTOM].borderWidth + paddingTop + paddingBottom));
|
10131 |
-
};
|
10132 |
-
|
10133 |
-
var parseDocumentSize = exports.parseDocumentSize = function parseDocumentSize(document) {
|
10134 |
-
var body = document.body;
|
10135 |
-
var documentElement = document.documentElement;
|
10136 |
-
|
10137 |
-
if (!body || !documentElement) {
|
10138 |
-
throw new Error( true ? 'Unable to get document size' : '');
|
10139 |
-
}
|
10140 |
-
var width = Math.max(Math.max(body.scrollWidth, documentElement.scrollWidth), Math.max(body.offsetWidth, documentElement.offsetWidth), Math.max(body.clientWidth, documentElement.clientWidth));
|
10141 |
-
|
10142 |
-
var height = Math.max(Math.max(body.scrollHeight, documentElement.scrollHeight), Math.max(body.offsetHeight, documentElement.offsetHeight), Math.max(body.clientHeight, documentElement.clientHeight));
|
10143 |
-
|
10144 |
-
return new Bounds(0, 0, width, height);
|
10145 |
-
};
|
10146 |
-
|
10147 |
-
var parsePathForBorder = exports.parsePathForBorder = function parsePathForBorder(curves, borderSide) {
|
10148 |
-
switch (borderSide) {
|
10149 |
-
case TOP:
|
10150 |
-
return createPathFromCurves(curves.topLeftOuter, curves.topLeftInner, curves.topRightOuter, curves.topRightInner);
|
10151 |
-
case RIGHT:
|
10152 |
-
return createPathFromCurves(curves.topRightOuter, curves.topRightInner, curves.bottomRightOuter, curves.bottomRightInner);
|
10153 |
-
case BOTTOM:
|
10154 |
-
return createPathFromCurves(curves.bottomRightOuter, curves.bottomRightInner, curves.bottomLeftOuter, curves.bottomLeftInner);
|
10155 |
-
case LEFT:
|
10156 |
-
default:
|
10157 |
-
return createPathFromCurves(curves.bottomLeftOuter, curves.bottomLeftInner, curves.topLeftOuter, curves.topLeftInner);
|
10158 |
-
}
|
10159 |
-
};
|
10160 |
-
|
10161 |
-
var createPathFromCurves = function createPathFromCurves(outer1, inner1, outer2, inner2) {
|
10162 |
-
var path = [];
|
10163 |
-
if (outer1 instanceof _BezierCurve2.default) {
|
10164 |
-
path.push(outer1.subdivide(0.5, false));
|
10165 |
-
} else {
|
10166 |
-
path.push(outer1);
|
10167 |
-
}
|
10168 |
-
|
10169 |
-
if (outer2 instanceof _BezierCurve2.default) {
|
10170 |
-
path.push(outer2.subdivide(0.5, true));
|
10171 |
-
} else {
|
10172 |
-
path.push(outer2);
|
10173 |
-
}
|
10174 |
-
|
10175 |
-
if (inner2 instanceof _BezierCurve2.default) {
|
10176 |
-
path.push(inner2.subdivide(0.5, true).reverse());
|
10177 |
-
} else {
|
10178 |
-
path.push(inner2);
|
10179 |
-
}
|
10180 |
-
|
10181 |
-
if (inner1 instanceof _BezierCurve2.default) {
|
10182 |
-
path.push(inner1.subdivide(0.5, false).reverse());
|
10183 |
-
} else {
|
10184 |
-
path.push(inner1);
|
10185 |
-
}
|
10186 |
-
|
10187 |
-
return path;
|
10188 |
-
};
|
10189 |
-
|
10190 |
-
var calculateBorderBoxPath = exports.calculateBorderBoxPath = function calculateBorderBoxPath(curves) {
|
10191 |
-
return [curves.topLeftOuter, curves.topRightOuter, curves.bottomRightOuter, curves.bottomLeftOuter];
|
10192 |
-
};
|
10193 |
-
|
10194 |
-
var calculatePaddingBoxPath = exports.calculatePaddingBoxPath = function calculatePaddingBoxPath(curves) {
|
10195 |
-
return [curves.topLeftInner, curves.topRightInner, curves.bottomRightInner, curves.bottomLeftInner];
|
10196 |
-
};
|
10197 |
-
|
10198 |
-
var parseBoundCurves = exports.parseBoundCurves = function parseBoundCurves(bounds, borders, borderRadius) {
|
10199 |
-
var tlh = borderRadius[CORNER.TOP_LEFT][H].getAbsoluteValue(bounds.width);
|
10200 |
-
var tlv = borderRadius[CORNER.TOP_LEFT][V].getAbsoluteValue(bounds.height);
|
10201 |
-
var trh = borderRadius[CORNER.TOP_RIGHT][H].getAbsoluteValue(bounds.width);
|
10202 |
-
var trv = borderRadius[CORNER.TOP_RIGHT][V].getAbsoluteValue(bounds.height);
|
10203 |
-
var brh = borderRadius[CORNER.BOTTOM_RIGHT][H].getAbsoluteValue(bounds.width);
|
10204 |
-
var brv = borderRadius[CORNER.BOTTOM_RIGHT][V].getAbsoluteValue(bounds.height);
|
10205 |
-
var blh = borderRadius[CORNER.BOTTOM_LEFT][H].getAbsoluteValue(bounds.width);
|
10206 |
-
var blv = borderRadius[CORNER.BOTTOM_LEFT][V].getAbsoluteValue(bounds.height);
|
10207 |
-
|
10208 |
-
var factors = [];
|
10209 |
-
factors.push((tlh + trh) / bounds.width);
|
10210 |
-
factors.push((blh + brh) / bounds.width);
|
10211 |
-
factors.push((tlv + blv) / bounds.height);
|
10212 |
-
factors.push((trv + brv) / bounds.height);
|
10213 |
-
var maxFactor = Math.max.apply(Math, factors);
|
10214 |
-
|
10215 |
-
if (maxFactor > 1) {
|
10216 |
-
tlh /= maxFactor;
|
10217 |
-
tlv /= maxFactor;
|
10218 |
-
trh /= maxFactor;
|
10219 |
-
trv /= maxFactor;
|
10220 |
-
brh /= maxFactor;
|
10221 |
-
brv /= maxFactor;
|
10222 |
-
blh /= maxFactor;
|
10223 |
-
blv /= maxFactor;
|
10224 |
-
}
|
10225 |
-
|
10226 |
-
var topWidth = bounds.width - trh;
|
10227 |
-
var rightHeight = bounds.height - brv;
|
10228 |
-
var bottomWidth = bounds.width - brh;
|
10229 |
-
var leftHeight = bounds.height - blv;
|
10230 |
-
|
10231 |
-
return {
|
10232 |
-
topLeftOuter: tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left, bounds.top, tlh, tlv, CORNER.TOP_LEFT) : new _Vector2.default(bounds.left, bounds.top),
|
10233 |
-
topLeftInner: tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left + borders[LEFT].borderWidth, bounds.top + borders[TOP].borderWidth, Math.max(0, tlh - borders[LEFT].borderWidth), Math.max(0, tlv - borders[TOP].borderWidth), CORNER.TOP_LEFT) : new _Vector2.default(bounds.left + borders[LEFT].borderWidth, bounds.top + borders[TOP].borderWidth),
|
10234 |
-
topRightOuter: trh > 0 || trv > 0 ? getCurvePoints(bounds.left + topWidth, bounds.top, trh, trv, CORNER.TOP_RIGHT) : new _Vector2.default(bounds.left + bounds.width, bounds.top),
|
10235 |
-
topRightInner: trh > 0 || trv > 0 ? getCurvePoints(bounds.left + Math.min(topWidth, bounds.width + borders[LEFT].borderWidth), bounds.top + borders[TOP].borderWidth, topWidth > bounds.width + borders[LEFT].borderWidth ? 0 : trh - borders[LEFT].borderWidth, trv - borders[TOP].borderWidth, CORNER.TOP_RIGHT) : new _Vector2.default(bounds.left + bounds.width - borders[RIGHT].borderWidth, bounds.top + borders[TOP].borderWidth),
|
10236 |
-
bottomRightOuter: brh > 0 || brv > 0 ? getCurvePoints(bounds.left + bottomWidth, bounds.top + rightHeight, brh, brv, CORNER.BOTTOM_RIGHT) : new _Vector2.default(bounds.left + bounds.width, bounds.top + bounds.height),
|
10237 |
-
bottomRightInner: brh > 0 || brv > 0 ? getCurvePoints(bounds.left + Math.min(bottomWidth, bounds.width - borders[LEFT].borderWidth), bounds.top + Math.min(rightHeight, bounds.height + borders[TOP].borderWidth), Math.max(0, brh - borders[RIGHT].borderWidth), brv - borders[BOTTOM].borderWidth, CORNER.BOTTOM_RIGHT) : new _Vector2.default(bounds.left + bounds.width - borders[RIGHT].borderWidth, bounds.top + bounds.height - borders[BOTTOM].borderWidth),
|
10238 |
-
bottomLeftOuter: blh > 0 || blv > 0 ? getCurvePoints(bounds.left, bounds.top + leftHeight, blh, blv, CORNER.BOTTOM_LEFT) : new _Vector2.default(bounds.left, bounds.top + bounds.height),
|
10239 |
-
bottomLeftInner: blh > 0 || blv > 0 ? getCurvePoints(bounds.left + borders[LEFT].borderWidth, bounds.top + leftHeight, Math.max(0, blh - borders[LEFT].borderWidth), blv - borders[BOTTOM].borderWidth, CORNER.BOTTOM_LEFT) : new _Vector2.default(bounds.left + borders[LEFT].borderWidth, bounds.top + bounds.height - borders[BOTTOM].borderWidth)
|
10240 |
-
};
|
10241 |
-
};
|
10242 |
-
|
10243 |
-
var CORNER = {
|
10244 |
-
TOP_LEFT: 0,
|
10245 |
-
TOP_RIGHT: 1,
|
10246 |
-
BOTTOM_RIGHT: 2,
|
10247 |
-
BOTTOM_LEFT: 3
|
10248 |
-
};
|
10249 |
-
|
10250 |
-
var getCurvePoints = function getCurvePoints(x, y, r1, r2, position) {
|
10251 |
-
var kappa = 4 * ((Math.sqrt(2) - 1) / 3);
|
10252 |
-
var ox = r1 * kappa; // control point offset horizontal
|
10253 |
-
var oy = r2 * kappa; // control point offset vertical
|
10254 |
-
var xm = x + r1; // x-middle
|
10255 |
-
var ym = y + r2; // y-middle
|
10256 |
-
|
10257 |
-
switch (position) {
|
10258 |
-
case CORNER.TOP_LEFT:
|
10259 |
-
return new _BezierCurve2.default(new _Vector2.default(x, ym), new _Vector2.default(x, ym - oy), new _Vector2.default(xm - ox, y), new _Vector2.default(xm, y));
|
10260 |
-
case CORNER.TOP_RIGHT:
|
10261 |
-
return new _BezierCurve2.default(new _Vector2.default(x, y), new _Vector2.default(x + ox, y), new _Vector2.default(xm, ym - oy), new _Vector2.default(xm, ym));
|
10262 |
-
case CORNER.BOTTOM_RIGHT:
|
10263 |
-
return new _BezierCurve2.default(new _Vector2.default(xm, y), new _Vector2.default(xm, y + oy), new _Vector2.default(x + ox, ym), new _Vector2.default(x, ym));
|
10264 |
-
case CORNER.BOTTOM_LEFT:
|
10265 |
-
default:
|
10266 |
-
return new _BezierCurve2.default(new _Vector2.default(xm, ym), new _Vector2.default(xm - ox, ym), new _Vector2.default(x, y + oy), new _Vector2.default(x, y));
|
10267 |
-
}
|
10268 |
-
};
|
10269 |
-
|
10270 |
-
/***/ }),
|
10271 |
-
/* 3 */
|
10272 |
-
/***/ (function(module, exports, __webpack_require__) {
|
10273 |
-
|
10274 |
-
"use strict";
|
10275 |
-
|
10276 |
-
|
10277 |
-
Object.defineProperty(exports, "__esModule", {
|
10278 |
-
value: true
|
10279 |
-
});
|
10280 |
-
|
10281 |
-
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
10282 |
-
|
10283 |
-
var _Color = __webpack_require__(0);
|
10284 |
-
|
10285 |
-
var _Color2 = _interopRequireDefault(_Color);
|
10286 |
-
|
10287 |
-
var _Util = __webpack_require__(4);
|
10288 |
-
|
10289 |
-
var _background = __webpack_require__(5);
|
10290 |
-
|
10291 |
-
var _border = __webpack_require__(12);
|
10292 |
-
|
10293 |
-
var _borderRadius = __webpack_require__(33);
|
10294 |
-
|
10295 |
-
var _display = __webpack_require__(34);
|
10296 |
-
|
10297 |
-
var _float = __webpack_require__(35);
|
10298 |
-
|
10299 |
-
var _font = __webpack_require__(36);
|
10300 |
-
|
10301 |
-
var _letterSpacing = __webpack_require__(37);
|
10302 |
-
|
10303 |
-
var _lineBreak = __webpack_require__(38);
|
10304 |
-
|
10305 |
-
var _listStyle = __webpack_require__(8);
|
10306 |
-
|
10307 |
-
var _margin = __webpack_require__(39);
|
10308 |
-
|
10309 |
-
var _overflow = __webpack_require__(40);
|
10310 |
-
|
10311 |
-
var _overflowWrap = __webpack_require__(18);
|
10312 |
-
|
10313 |
-
var _padding = __webpack_require__(17);
|
10314 |
-
|
10315 |
-
var _position = __webpack_require__(19);
|
10316 |
-
|
10317 |
-
var _textDecoration = __webpack_require__(11);
|
10318 |
-
|
10319 |
-
var _textShadow = __webpack_require__(41);
|
10320 |
-
|
10321 |
-
var _textTransform = __webpack_require__(20);
|
10322 |
-
|
10323 |
-
var _transform = __webpack_require__(42);
|
10324 |
-
|
10325 |
-
var _visibility = __webpack_require__(43);
|
10326 |
-
|
10327 |
-
var _wordBreak = __webpack_require__(44);
|
10328 |
-
|
10329 |
-
var _zIndex = __webpack_require__(45);
|
10330 |
-
|
10331 |
-
var _Bounds = __webpack_require__(2);
|
10332 |
-
|
10333 |
-
var _Input = __webpack_require__(21);
|
10334 |
-
|
10335 |
-
var _ListItem = __webpack_require__(14);
|
10336 |
-
|
10337 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
10338 |
-
|
10339 |
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
10340 |
-
|
10341 |
-
var INPUT_TAGS = ['INPUT', 'TEXTAREA', 'SELECT'];
|
10342 |
-
|
10343 |
-
var NodeContainer = function () {
|
10344 |
-
function NodeContainer(node, parent, resourceLoader, index) {
|
10345 |
-
var _this = this;
|
10346 |
-
|
10347 |
-
_classCallCheck(this, NodeContainer);
|
10348 |
-
|
10349 |
-
this.parent = parent;
|
10350 |
-
this.tagName = node.tagName;
|
10351 |
-
this.index = index;
|
10352 |
-
this.childNodes = [];
|
10353 |
-
this.listItems = [];
|
10354 |
-
if (typeof node.start === 'number') {
|
10355 |
-
this.listStart = node.start;
|
10356 |
-
}
|
10357 |
-
var defaultView = node.ownerDocument.defaultView;
|
10358 |
-
var scrollX = defaultView.pageXOffset;
|
10359 |
-
var scrollY = defaultView.pageYOffset;
|
10360 |
-
var style = defaultView.getComputedStyle(node, null);
|
10361 |
-
var display = (0, _display.parseDisplay)(style.display);
|
10362 |
-
|
10363 |
-
var IS_INPUT = node.type === 'radio' || node.type === 'checkbox';
|
10364 |
-
|
10365 |
-
var position = (0, _position.parsePosition)(style.position);
|
10366 |
-
|
10367 |
-
this.style = {
|
10368 |
-
background: IS_INPUT ? _Input.INPUT_BACKGROUND : (0, _background.parseBackground)(style, resourceLoader),
|
10369 |
-
border: IS_INPUT ? _Input.INPUT_BORDERS : (0, _border.parseBorder)(style),
|
10370 |
-
borderRadius: (node instanceof defaultView.HTMLInputElement || node instanceof HTMLInputElement) && IS_INPUT ? (0, _Input.getInputBorderRadius)(node) : (0, _borderRadius.parseBorderRadius)(style),
|
10371 |
-
color: IS_INPUT ? _Input.INPUT_COLOR : new _Color2.default(style.color),
|
10372 |
-
display: display,
|
10373 |
-
float: (0, _float.parseCSSFloat)(style.float),
|
10374 |
-
font: (0, _font.parseFont)(style),
|
10375 |
-
letterSpacing: (0, _letterSpacing.parseLetterSpacing)(style.letterSpacing),
|
10376 |
-
listStyle: display === _display.DISPLAY.LIST_ITEM ? (0, _listStyle.parseListStyle)(style) : null,
|
10377 |
-
lineBreak: (0, _lineBreak.parseLineBreak)(style.lineBreak),
|
10378 |
-
margin: (0, _margin.parseMargin)(style),
|
10379 |
-
opacity: parseFloat(style.opacity),
|
10380 |
-
overflow: INPUT_TAGS.indexOf(node.tagName) === -1 ? (0, _overflow.parseOverflow)(style.overflow) : _overflow.OVERFLOW.HIDDEN,
|
10381 |
-
overflowWrap: (0, _overflowWrap.parseOverflowWrap)(style.overflowWrap ? style.overflowWrap : style.wordWrap),
|
10382 |
-
padding: (0, _padding.parsePadding)(style),
|
10383 |
-
position: position,
|
10384 |
-
textDecoration: (0, _textDecoration.parseTextDecoration)(style),
|
10385 |
-
textShadow: (0, _textShadow.parseTextShadow)(style.textShadow),
|
10386 |
-
textTransform: (0, _textTransform.parseTextTransform)(style.textTransform),
|
10387 |
-
transform: (0, _transform.parseTransform)(style),
|
10388 |
-
visibility: (0, _visibility.parseVisibility)(style.visibility),
|
10389 |
-
wordBreak: (0, _wordBreak.parseWordBreak)(style.wordBreak),
|
10390 |
-
zIndex: (0, _zIndex.parseZIndex)(position !== _position.POSITION.STATIC ? style.zIndex : 'auto')
|
10391 |
-
};
|
10392 |
-
|
10393 |
-
if (this.isTransformed()) {
|
10394 |
-
// getBoundingClientRect provides values post-transform, we want them without the transformation
|
10395 |
-
node.style.transform = 'matrix(1,0,0,1,0,0)';
|
10396 |
-
}
|
10397 |
-
|
10398 |
-
if (display === _display.DISPLAY.LIST_ITEM) {
|
10399 |
-
var listOwner = (0, _ListItem.getListOwner)(this);
|
10400 |
-
if (listOwner) {
|
10401 |
-
var listIndex = listOwner.listItems.length;
|
10402 |
-
listOwner.listItems.push(this);
|
10403 |
-
this.listIndex = node.hasAttribute('value') && typeof node.value === 'number' ? node.value : listIndex === 0 ? typeof listOwner.listStart === 'number' ? listOwner.listStart : 1 : listOwner.listItems[listIndex - 1].listIndex + 1;
|
10404 |
-
}
|
10405 |
-
}
|
10406 |
-
|
10407 |
-
// TODO move bound retrieval for all nodes to a later stage?
|
10408 |
-
if (node.tagName === 'IMG') {
|
10409 |
-
node.addEventListener('load', function () {
|
10410 |
-
_this.bounds = (0, _Bounds.parseBounds)(node, scrollX, scrollY);
|
10411 |
-
_this.curvedBounds = (0, _Bounds.parseBoundCurves)(_this.bounds, _this.style.border, _this.style.borderRadius);
|
10412 |
-
});
|
10413 |
-
}
|
10414 |
-
this.image = getImage(node, resourceLoader);
|
10415 |
-
this.bounds = IS_INPUT ? (0, _Input.reformatInputBounds)((0, _Bounds.parseBounds)(node, scrollX, scrollY)) : (0, _Bounds.parseBounds)(node, scrollX, scrollY);
|
10416 |
-
this.curvedBounds = (0, _Bounds.parseBoundCurves)(this.bounds, this.style.border, this.style.borderRadius);
|
10417 |
-
|
10418 |
-
if (true) {
|
10419 |
-
this.name = '' + node.tagName.toLowerCase() + (node.id ? '#' + node.id : '') + node.className.toString().split(' ').map(function (s) {
|
10420 |
-
return s.length ? '.' + s : '';
|
10421 |
-
}).join('');
|
10422 |
-
}
|
10423 |
-
}
|
10424 |
-
|
10425 |
-
_createClass(NodeContainer, [{
|
10426 |
-
key: 'getClipPaths',
|
10427 |
-
value: function getClipPaths() {
|
10428 |
-
var parentClips = this.parent ? this.parent.getClipPaths() : [];
|
10429 |
-
var isClipped = this.style.overflow !== _overflow.OVERFLOW.VISIBLE;
|
10430 |
-
|
10431 |
-
return isClipped ? parentClips.concat([(0, _Bounds.calculatePaddingBoxPath)(this.curvedBounds)]) : parentClips;
|
10432 |
-
}
|
10433 |
-
}, {
|
10434 |
-
key: 'isInFlow',
|
10435 |
-
value: function isInFlow() {
|
10436 |
-
return this.isRootElement() && !this.isFloating() && !this.isAbsolutelyPositioned();
|
10437 |
-
}
|
10438 |
-
}, {
|
10439 |
-
key: 'isVisible',
|
10440 |
-
value: function isVisible() {
|
10441 |
-
return !(0, _Util.contains)(this.s
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|