2021-02-26 04:58:33 +01:00
! function ( e , t ) { "object" == typeof exports && "undefined" != typeof module ? module . exports = t ( ) : "function" == typeof define && define . amd ? define ( t ) : ( ( e = "undefined" != typeof globalThis ? globalThis : e || self ) . prettierPlugins = e . prettierPlugins || { } , e . prettierPlugins . markdown = t ( ) ) } ( this , ( function ( ) { "use strict" ; var e = function ( ) { for ( var e = { } , r = 0 ; r < arguments . length ; r ++ ) { var n = arguments [ r ] ; for ( var u in n ) t . call ( n , u ) && ( e [ u ] = n [ u ] ) } return e } , t = Object . prototype . hasOwnProperty ; function r ( e , t , r ) { return e ( r = { path : t , exports : { } , require : function ( e , t ) { return function ( ) { throw new Error ( "Dynamic requires are not currently supported by @rollup/plugin-commonjs" ) } ( null == t && r . path ) } } , r . exports ) , r . exports } function n ( e ) { return e && Object . prototype . hasOwnProperty . call ( e , "default" ) ? e . default : e } var u = Object . freeze ( { _ _proto _ _ : null , default : { } } ) , i = r ( ( function ( e ) { "function" == typeof Object . create ? e . exports = function ( e , t ) { t && ( e . super _ = t , e . prototype = Object . create ( t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) ) } : e . exports = function ( e , t ) { if ( t ) { e . super _ = t ; var r = function ( ) { } ; r . prototype = t . prototype , e . prototype = new r , e . prototype . constructor = e } } } ) ) , o = n ( u ) , a = r ( ( function ( e ) { try { var t = o ; if ( "function" != typeof t . inherits ) throw "" ; e . exports = t . inherits } catch ( t ) { e . exports = i } } ) ) , c = function ( t ) { var r , n , u ; for ( n in a ( o , t ) , a ( i , o ) , r = o . prototype ) ( u = r [ n ] ) && "object" == typeof u && ( r [ n ] = "concat" in u ? u . concat ( ) : e ( u ) ) ; return o ; function i ( e ) { return t . apply ( this , e ) } function o ( ) { return this instanceof o ? t . apply ( this , arguments ) : new i ( arguments ) } } ; var s = function ( e , t , r ) { return function ( ) { var n = r || this , u = n [ e ] ; return n [ e ] = ! t , i ; function i ( ) { n [ e ] = u } } } ; var l = function ( e ) { var t = function ( e ) { var t = [ ] , r = e . indexOf ( "\n" ) ; for ( ; - 1 !== r ; ) t . push ( r + 1 ) , r = e . indexOf ( "\n" , r + 1 ) ; return t . push ( e . length + 1 ) , t } ( String ( e ) ) ; return { toPosition : f ( t ) , toOffset : D ( t ) } } ; function f ( e ) { return function ( t ) { var r = - 1 , n = e . length ; if ( t < 0 ) return { } ; for ( ; ++ r < n ; ) if ( e [ r ] > t ) return { line : r + 1 , column : t - ( e [ r - 1 ] || 0 ) + 1 , offset : t } ; return { } } } function D ( e ) { return function ( t ) { var r = t && t . line , n = t && t . column ; if ( ! isNaN ( r ) && ! isNaN ( n ) && r - 1 in e ) return ( e [ r - 2 ] || 0 ) + n - 1 || 0 ; return - 1 } } var p = function ( e , t ) { return function ( r ) { var n , u = 0 , i = r . indexOf ( d ) , o = e [ t ] , a = [ ] ; for ( ; - 1 !== i ; ) a . push ( r . slice ( u , i ) ) , u = i + 1 , ( n = r . charAt ( u ) ) && - 1 !== o . indexOf ( n ) || a . push ( d ) , i = r . indexOf ( d , u + 1 ) ; return a . push ( r . slice ( u ) ) , a . join ( "" ) } } , d = "\\" ; var h = { AElig : "\xc6" , AMP : "&" , Aacute : "\xc1" , Acirc : "\xc2" , Agrave : "\xc0" , Aring : "\xc5" , Atilde : "\xc3" , Auml : "\xc4" , COPY : "\xa9" , Ccedil : "\xc7" , ETH : "\xd0" , Eacute : "\xc9" , Ecirc : "\xca" , Egrave : "\xc8" , Euml : "\xcb" , GT : ">" , Iacute : "\xcd" , Icirc : "\xce" , Igrave : "\xcc" , Iuml : "\xcf" , LT : "<" , Ntilde : "\xd1" , Oacute : "\xd3" , Ocirc : "\xd4" , Ograve : "\xd2" , Oslash : "\xd8" , Otilde : "\xd5" , Ouml : "\xd6" , QUOT : '"' , REG : "\xae" , THORN : "\xde" , Uacute : "\xda" , Ucirc : "\xdb" , Ugrave : "\xd9" , Uuml : "\xdc" , Yacute : "\xdd" , aacute : "\xe1" , acirc : "\xe2" , acute : "\xb4" , aelig : "\xe6" , agrave : "\xe0" , amp : "&" , aring : "\xe5" , atilde : "\xe3" , auml : "\xe4" , brvbar : "\xa6" , ccedil : "\xe7" , cedil : "\xb8" , cent : "\xa2" , copy : "\xa9" , curren : "\xa4" , deg : "\xb0" , divide : "\xf7" , eacute : "\xe9" , ecirc : "\xea" , egrave : "\xe8" , eth : "\xf0" , euml : "\xeb" , frac12 : "\xbd" , frac14 : "\xbc" , frac34 : "\xbe" , gt : ">" , iacute : "\xed" , icirc : "\xee" , iexcl : "\xa1" , igrave : "\xec" , iquest : "\xbf" , iuml : "\xef" , laquo : "\xab" , lt : "<" , macr : "\xaf" , micro : "\xb5" , middot : "\xb7" , nbsp : "\xa0" , not : "\xac" , ntilde : "\xf1" , oacute : "\xf3" , ocirc : "\xf4" , ograve : "\xf2" , ordf : "\xaa" , ordm : "\xba" , oslash : "\xf8" , otilde : "\xf5" , ouml : "\xf6" , para : "\xb6" , plusmn : "\xb1" , pound : "\xa3" , quot : '"' , raquo : "\xbb" , reg : "\xae" , sect : "\xa7" , shy : "\xad" , sup1 : "\xb9" , sup2 : "\xb2" , sup3 : "\xb3" , szlig : "\xdf" , thorn : "\xfe" , times : "\xd7" , uacute : "\xfa" , ucirc : "\xfb" , ugrave : "\xf9" , uml : "\xa8" , uuml : "\xfc" , yacute : "\xfd" , yen : "\xa5" , yuml : "\xff" } , g = { 0 : "\ufffd" , 128 : "\u20ac" , 130 : "\u201a" , 131 : "\u0192" , 132 : "\u201e" , 133 : "\u2026" , 134 : "\u2020" , 135 : "\u2021" , 136 : "\u02c6" , 137 : "\u2030" , 138 : "\u0160" , 139 : "\u2039" , 140 : "\u0152" , 142 : "\u017d" , 145 : "\u2018" , 146 : "\u2019" , 147 : "\u201c" , 148 : "\u201d" , 149 : "\u2022" , 150 : "\u2013" , 151 : "\u2014" , 152 : "\u02dc" , 153 : "\u2122" , 154 : "\u0161" , 155 : "\u203a" , 156 : "\u0153" , 158 : "\u017e" , 159 : "\u0178" } , m = function ( e ) { var t = "string" == typeof e ? e . charCodeAt ( 0 ) : e ; return t >= 48 && t <
2020-08-26 01:57:08 +02:00
/ * !
* repeat - string < https : //github.com/jonschlinkert/repeat-string>
*
* Copyright ( c ) 2014 - 2015 , Jon Schlinkert .
* Licensed under the MIT License .
2021-02-26 04:58:33 +01:00
* /;var me,Ee="",Ce=function(e,t){if("string"!=typeof e)throw new TypeError("expected a string");if(1===t)return e;if(2===t)return e+e;var r=e.length*t;if(me!==e||void 0===me)me=e,Ee="";else if(Ee.length>=r)return Ee.substr(0,r);for(;r>Ee.length&&t>1;)1&t&&(Ee+=e),t>>=1,e+=e;return Ee=(Ee+=e).substr(0,r)};var be=function(e){var t=String(e),r=t.length;for(;"\n"===t.charAt(--r););return t.slice(0,r+1)};var ve=function(e,t,r){var n,u,i,o=-1,a=t.length,c="",s="",l="",f="";for(;++o<a;)if(n=t.charAt(o),i)if(i=!1,c+=l,s+=f,l="",f="","\n"===n)l=n,f=n;else for(c+=n,s+=n;++o<a;){if(!(n=t.charAt(o))||"\n"===n){f=n,l=n;break}c+=n,s+=n}else if(" "===n&&t.charAt(o+1)===n&&t.charAt(o+2)===n&&t.charAt(o+3)===n)l+=Fe,o+=3,i=!0;else if("\t"===n)l+=n,i=!0;else{for(u="";"\t"===n||" "===n;)u+=n,n=t.charAt(++o);if("\n"!==n)break;l+=u+n,f+=n}if(s)return!!r||e(c)({type:"code",lang:null,meta:null,value:be(s)})},Fe=Ce(" ",4);var Ae=function(e,t,r){var n,u,i,o,a,c,s,l,f,D,p,d,h,g=this,m=g.options.gfm,E=t.length+1,C=0,b="";if(!m)return;for(;C<E&&((i=t.charAt(C))===ke||i===we);)b+=i,C++;if(d=C,"~"!==(i=t.charAt(C))&&"`"!==i)return;C++,u=i,n=1,b+=i;for(;C<E&&(i=t.charAt(C))===u;)b+=i,n++,C++;if(n<3)return;for(;C<E&&((i=t.charAt(C))===ke||i===we);)b+=i,C++;o="",s="";for(;C<E&&(i=t.charAt(C))!==ye&&("`"!==u||i!==u);)i===ke||i===we?s+=i:(o+=s+i,s=""),C++;if((i=t.charAt(C))&&i!==ye)return;if(r)return!0;(h=e.now()).column+=b.length,h.offset+=b.length,b+=o,o=g.decode.raw(g.unescape(o),h),s&&(b+=s);s="",D="",p="",l="",f="";var v=!0;for(;C<E;)if(i=t.charAt(C),l+=D,f+=p,D="",p="",i===ye){for(v?(b+=i,v=!1):(D+=i,p+=i),s="",C++;C<E&&(i=t.charAt(C))===ke;)s+=i,C++;if(D+=s,p+=s.slice(d),!(s.length>=4)){for(s="";C<E&&(i=t.charAt(C))===u;)s+=i,C++;if(D+=s,p+=s,!(s.length<n)){for(s="";C<E&&((i=t.charAt(C))===ke||i===we);)D+=i,p+=i,C++;if(!i||i===ye)break}}}else l+=i,p+=i,C++;b+=l+D,C=-1,E=o.length;for(;++C<E;)if((i=o.charAt(C))===ke||i===we)a||(a=o.slice(0,C));else if(a){c=o.slice(C);break}return e(b)({type:"code",lang:a||o||null,meta:c||null,value:f})},ye="\n",we="\t",ke=" ";var xe=r((function(e,t){(t=e.exports=function(e){return e.replace(/ ^ \ s * | \ s * $ / g , "" ) } ) . left = function ( e ) { return e . replace ( /^\s*/ , "" ) } , t . right = function ( e ) { return e . replace ( /\s*$/ , "" ) } } ) ) , Oe = function ( e , t , r , n ) { var u , i , o = e . length , a = - 1 ; for ( ; ++ a < o ; ) if ( u = e [ a ] , ( void 0 === ( i = u [ 1 ] || { } ) . pedantic || i . pedantic === r . options . pedantic ) && ( void 0 === i . commonmark || i . commonmark === r . options . commonmark ) && t [ u [ 0 ] ] . apply ( r , n ) ) return ! 0 ; return ! 1 } ; var Le = function ( e , t , r ) { var n , u , i , o , a , c , s , l , f , D = this , p = D . offset , d = D . blockTokenizers , h = D . interruptBlockquote , g = e . now ( ) , m = g . line , E = t . length , C = [ ] , b = [ ] , v = [ ] , F = 0 ; for ( ; F < E && ( " " === ( u = t . charAt ( F ) ) || "\t" === u ) ; ) F ++ ; if ( ">" !== t . charAt ( F ) ) return ; if ( r ) return ! 0 ; F = 0 ; for ( ; F < E ; ) { for ( o = t . indexOf ( "\n" , F ) , s = F , l = ! 1 , - 1 === o && ( o = E ) ; F < E && ( " " === ( u = t . charAt ( F ) ) || "\t" === u ) ; ) F ++ ; if ( ">" === t . charAt ( F ) ? ( F ++ , l = ! 0 , " " === t . charAt ( F ) && F ++ ) : F = s , a = t . slice ( F , o ) , ! l && ! xe ( a ) ) { F = s ; break } if ( ! l && ( i = t . slice ( F ) , Oe ( h , d , D , [ e , i , ! 0 ] ) ) ) break ; c = s === F ? a : t . slice ( s , o ) , v . push ( F - s ) , C . push ( c ) , b . push ( a ) , F = o + 1 } F = - 1 , E = v . length , n = e ( C . join ( "\n" ) ) ; for ( ; ++ F < E ; ) p [ m ] = ( p [ m ] || 0 ) + v [ F ] , m ++ ; return f = D . enterBlock ( ) , b = D . tokenizeBlock ( b . join ( "\n" ) , g ) , f ( ) , n ( { type : "blockquote" , children : b } ) } ; var Be = function ( e , t , r ) { var n , u , i , o = this . options . pedantic , a = t . length + 1 , c = - 1 , s = e . now ( ) , l = "" , f = "" ; for ( ; ++ c < a ; ) { if ( ( n = t . charAt ( c ) ) !== Ne && n !== Te ) { c -- ; break } l += n } i = 0 ; for ( ; ++ c <= a ; ) { if ( ( n = t . charAt ( c ) ) !== Se ) { c -- ; break } l += n , i ++ } if ( i > 6 ) return ; if ( ! i || ! o && t . charAt ( c + 1 ) === Se ) return ; a = t . length + 1 , u = "" ; for ( ; ++ c < a ; ) { if ( ( n = t . charAt ( c ) ) !== Ne && n !== Te ) { c -- ; break } u += n } if ( ! o && 0 === u . length && n && "\n" !== n ) return ; if ( r ) return ! 0 ; l += u , u = "" , f = "" ; for ( ; ++ c < a && ( n = t . charAt ( c ) ) && "\n" !== n ; ) if ( n === Ne || n === Te || n === Se ) { for ( ; n === Ne || n === Te ; ) u += n , n = t . charAt ( ++ c ) ; if ( o || ! f || u || n !== Se ) { for ( ; n === Se ; ) u += n , n = t . charAt ( ++ c ) ; for ( ; n === Ne || n === Te ; ) u += n , n = t . charAt ( ++ c ) ; c -- } else f += n } else f += u + n , u = "" ; return s . column += l . length , s . offset += l . length , e ( l += f + u ) ( { type : "heading" , depth : i , children : this . tokenizeInline ( f , s ) } ) } , Te = "\t" , Ne = " " , Se = "#" ; var Ie = function ( e , t , r ) { var n , u , i , o , a = - 1 , c = t . length + 1 , s = "" ; for ( ; ++ a < c && ( "\t" === ( n = t . charAt ( a )
2020-08-26 01:57:08 +02:00
/ * !
* Determine if an object is a Buffer
*
* @ author Feross Aboukhadijeh < https : //feross.org>
* @ license MIT
2021-02-26 04:58:33 +01:00
* / ; v a r P r = O b j e c t . p r o t o t y p e . h a s O w n P r o p e r t y , j r = O b j e c t . p r o t o t y p e . t o S t r i n g , z r = O b j e c t . d e f i n e P r o p e r t y , U r = O b j e c t . g e t O w n P r o p e r t y D e s c r i p t o r , M r = f u n c t i o n ( e ) { r e t u r n " f u n c t i o n " = = t y p e o f A r r a y . i s A r r a y ? A r r a y . i s A r r a y ( e ) : " [ o b j e c t A r r a y ] " = = = j r . c a l l ( e ) } , G r = f u n c t i o n ( e ) { i f ( ! e | | " [ o b j e c t O b j e c t ] " ! = = j r . c a l l ( e ) ) r e t u r n ! 1 ; v a r t , r = P r . c a l l ( e , " c o n s t r u c t o r " ) , n = e . c o n s t r u c t o r & & e . c o n s t r u c t o r . p r o t o t y p e & & P r . c a l l ( e . c o n s t r u c t o r . p r o t o t y p e , " i s P r o t o t y p e O f " ) ; i f ( e . c o n s t r u c t o r & & ! r & & ! n ) r e t u r n ! 1 ; f o r ( t i n e ) ; r e t u r n v o i d 0 = = = t | | P r . c a l l ( e , t ) } , V r = f u n c t i o n ( e , t ) { z r & & " _ _ p r o t o _ _ " = = = t . n a m e ? z r ( e , t . n a m e , { e n u m e r a b l e : ! 0 , c o n f i g u r a b l e : ! 0 , v a l u e : t . n e w V a l u e , w r i t a b l e : ! 0 } ) : e [ t . n a m e ] = t . n e w V a l u e } , _ r = f u n c t i o n ( e , t ) { i f ( " _ _ p r o t o _ _ " = = = t ) { i f ( ! P r . c a l l ( e , t ) ) r e t u r n ; i f ( U r ) r e t u r n U r ( e , t ) . v a l u e } r e t u r n e [ t ] } , $ r = f u n c t i o n e ( ) { v a r t , r , n , u , i , o , a = a r g u m e n t s [ 0 ] , c = 1 , s = a r g u m e n t s . l e n g t h , l = ! 1 ; f o r ( " b o o l e a n " = = t y p e o f a & & ( l = a , a = a r g u m e n t s [ 1 ] | | { } , c = 2 ) , ( n u l l = = a | | " o b j e c t " ! = t y p e o f a & & " f u n c t i o n " ! = t y p e o f a ) & & ( a = { } ) ; c < s ; + + c ) i f ( n u l l ! = ( t = a r g u m e n t s [ c ] ) ) f o r ( r i n t ) n = _ r ( a , r ) , a ! = = ( u = _ r ( t , r ) ) & & ( l & & u & & ( G r ( u ) | | ( i = M r ( u ) ) ) ? ( i ? ( i = ! 1 , o = n & & M r ( n ) ? n : [ ] ) : o = n & & G r ( n ) ? n : { } , V r ( a , { n a m e : r , n e w V a l u e : e ( l , o , u ) } ) ) : v o i d 0 ! = = u & & V r ( a , { n a m e : r , n e w V a l u e : u } ) ) ; r e t u r n a } , H r = e = > { i f ( " [ o b j e c t O b j e c t ] " ! = = O b j e c t . p r o t o t y p e . t o S t r i n g . c a l l ( e ) ) r e t u r n ! 1 ; c o n s t t = O b j e c t . g e t P r o t o t y p e O f ( e ) ; r e t u r n n u l l = = = t | | t = = = O b j e c t . p r o t o t y p e } , X r = [ ] . s l i c e , W r = f u n c t i o n ( e , t ) { v a r r ; r e t u r n f u n c t i o n ( ) { v a r t , i = X r . c a l l ( a r g u m e n t s , 0 ) , o = e . l e n g t h > i . l e n g t h ; o & & i . p u s h ( n ) ; t r y { t = e . a p p l y ( n u l l , i ) } c a t c h ( e ) { i f ( o & & r ) t h r o w e ; r e t u r n n ( e ) } o | | ( t & & " f u n c t i o n " = = t y p e o f t . t h e n ? t . t h e n ( u , n ) : t i n s t a n c e o f E r r o r ? n ( t ) : u ( t ) ) } ; f u n c t i o n n ( ) { r | | ( r = ! 0 , t . a p p l y ( n u l l , a r g u m e n t s ) ) } f u n c t i o n u ( e ) { n ( n u l l , e ) } } ; v a r Y r = J r ; J r . w r a p = W r ; v a r Z r = [ ] . s l i c e ; f u n c t i o n J r ( ) { v a r e = [ ] , t = { r u n : f u n c t i o n ( ) { v a r t = - 1 , r = Z r . c a l l ( a r g u m e n t s , 0 , - 1 ) , n = a r g u m e n t s [ a r g u m e n t s . l e n g t h - 1 ] ; i f ( " f u n c t i o n " ! = t y p e o f n ) t h r o w n e w E r r o r ( " E x p e c t e d f u n c t i o n a s l a s t a r g u m e n t , n o t " + n ) ; f u n c t i o n u ( i ) { v a r o = e [ + + t ] , a = Z r . c a l l ( a r g u m e n t s , 0 ) , c = a . s l i c e ( 1 ) , s = r . l e n g t h , l = - 1 ; i f ( i ) n ( i ) ; e l s e { f o r ( ; + + l < s ; ) n u l l ! = = c [ l ] & & v o i d 0 ! = = c [ l ] | | ( c [ l ] = r [ l ] ) ; r = c , o ? W r ( o , u ) . a p p l y ( n u l l , r ) : n . a p p l y ( n u l l , [ n u l l ] . c o n c a t ( r ) ) } } u . a p p l y ( n u l l , [ n u l l ] . c o n c a t ( r ) ) } , u s e : f u n c t i o n ( r ) { i f ( " f u n c t i o n " ! = t y p e o f r ) t h r o w n e w E r r o r ( " E x p e c t e d ` f n ` t o b e a f u n c t i o n , n o t " + r ) ; r e t u r n e . p u s h ( r ) , t } } ; r e t u r n t } v a r K r = { } . h a s O w n P r o p e r t y , Q r = f u n c t i o n ( e ) { i f ( ! e | | " o b j e c t " ! = t y p e o f e ) r e t u r n " " ; i f ( K r . c a l l ( e , " p o s i t i o n " ) | | K r . c a l l ( e , " t y p e " ) ) r e t u r n t n ( e . p o s i t i o n ) ; i f ( K r . c a l l ( e , " s t a r t " ) | | K r . c a l l ( e , " e n d " ) ) r e t u r n t n ( e ) ; i f ( K r . c a l l ( e , " l i n e " ) | | K r . c a l l ( e , " c o l u m n " ) ) r e t u r n e n ( e ) ; r e t u r n " " } ; f u n c t i o n e n ( e ) { r e t u r n e & & " o b j e c t " = = t y p e o f e | | ( e = { } ) , r n ( e . l i n e ) + " : " + r n ( e . c o l u m n ) } f u n c t i o n t n ( e ) { r e t u r n e & & " o b j e c t " = = t y p e o f e | | ( e = { } ) , e n ( e . s t a r t ) + " - " + e n ( e . e n d ) } f u n c t i o n r n ( e ) { r e t u r n e & & " n u m b e r " = = t y p e o f e ? e : 1 } v a r n n = a n ; f u n c t i o n u n ( ) { } u n . p r o t o t y p e = E r r o r . p r o t o t y p e , a n . p r o t o t y p e = n e w u n ; v a r o n = a n . p r o t o t y p e ; f u n c t i o n a n ( e , t , r ) { v a r n , u , i ; " s t r i n g " = = t y p e o f t & & ( r = t , t = n u l l ) , n = f u n c t i o n ( e ) { v a r t , r = [ n u l l , n u l l ] ; " s t r i n g " = = t y p e o f e & & ( - 1 = = = ( t = e . i n d e x O f ( " : " ) ) ? r [ 1 ] = e : ( r [ 0 ] = e . s l i c e ( 0 , t ) , r [ 1 ] = e . s l i c e ( t + 1 ) ) ) ; r e t u r n r } ( r ) , u = Q r ( t ) | | " 1 : 1 " , i = { s t a r t : { l i n e : n u l l , c o l u m n : n u l l } , e n d : { l i n e : n u l l , c o l u m n : n u l l } } , t & & t . p o s i t i o n & & ( t = t . p o s i t i o n ) , t & & ( t . s t a r t ? ( i = t , t = t . s t a r t ) : i . s t a r t = t ) , e . s t a c k & & ( t h i s . s t a c k = e . s t a c k , e = e . m e s s a g e ) , t h i s . m e s s a g e = e , t h i s . n a m e = u , t h i s . r e a s o n = e , t h i s . l i n e = t ? t . l i n e : n u l l , t h i s . c o l u m n = t ? t . c o l u m n : n u l l , t h i s . l o c a t i o n = i , t h i s . s o u r c e = n [ 0 ] , t h i s . r u l e I d = n [ 1 ] } o n . f i l e = " " , o n . n a m e = " " , o n . r e a s o n = " " , o n . m e s s a g e = " " , o n . s t a c k = " " , o n . f a t a l = n u l l , o n . c o l u m n = n u l l , o n . l i n e = n u l l ; v a r c n = " u n d e f i n e d " ! = t y p e o f g l o b a l ? g l o b a l : " u n d e f i n e d " ! = t y p e o f s e l f ? s e l f : " u n d e f i n e d " ! = t y p e o f w i n d o w ? w i n d o w : { } ; f u n c t i o n s n ( ) { t h r o w n e w E r r o r ( " s e t T i m e o u t h a s n o t b e e n d e f i n e d " ) } f u n c t i o n l n ( ) { t h r o w n e w E r r o r ( " c l e a r T i m e o u t h a s n o t b e e n d e f i n e d " ) } v a r f n = s n , D n = l n ; f u n c t i o n p n ( e ) { i f ( f n = = = s e t T i m e o u t ) r e t u r n s e t T i m e o u t ( e , 0 ) ; i f ( ( f n = = = s n | | ! f n ) & & s e t T i m e o u t ) r e t u r n f n = s e t T i m e o u t , s e t T i m e o u t ( e , 0 ) ; t r y { r e t u r n f n ( e , 0 ) } c a t c h ( t ) { t r y { r e t u r n f n . c a l l ( n u l l , e , 0 ) } c a t c h ( t ) { r e t u r n f n . c a l l ( t h i s , e , 0 ) } } } " f u n c t i o n " = = t y p e o f c n . s e t T i m e o u t & & ( f n = s e t T i m e o u t ) , " f u n c t i o n " = = t y p e o f c n . c l e a r T i m e o u t & & ( D n = c l e a r T i m e o u t ) ; v a r d n , h n = [ ] , g n = ! 1 , m n = - 1 ; f u n c t i o n E n ( ) { g n & & d n & & ( g n = ! 1 , d n . l e n g t h ? h n = d n . c o n c a t ( h n ) : m n = - 1 , h n . l e n g t h & & C n ( ) ) } f u
2020-08-26 01:57:08 +02:00
/ * !
* Determine if an object is a Buffer
*
* @ author Feross Aboukhadijeh < https : //feross.org>
* @ license MIT
2021-02-26 04:58:33 +01:00
* / f u n c t i o n _ n ( e ) { v a r t , r , n ; i f ( e ) { i f ( " s t r i n g " = = t y p e o f e | | z n ( e ) ) e = { c o n t e n t s : e } ; e l s e i f ( " m e s s a g e " i n e & & " m e s s a g e s " i n e ) r e t u r n e } e l s e e = { } ; i f ( ! ( t h i s i n s t a n c e o f _ n ) ) r e t u r n n e w _ n ( e ) ; f o r ( t h i s . d a t a = { } , t h i s . m e s s a g e s = [ ] , t h i s . h i s t o r y = [ ] , t h i s . c w d = N n . c w d ( ) , r = - 1 , n = V n . l e n g t h ; + + r < n ; ) t = V n [ r ] , M n . c a l l ( e , t ) & & ( t h i s [ t ] = e [ t ] ) ; f o r ( t i n e ) - 1 = = = V n . i n d e x O f ( t ) & & ( t h i s [ t ] = e [ t ] ) } f u n c t i o n $ n ( e , t ) { i f ( - 1 ! = = e . i n d e x O f ( P n . s e p ) ) t h r o w n e w E r r o r ( " ` " + t + " ` c a n n o t b e a p a t h : d i d n o t e x p e c t ` " + P n . s e p + " ` " ) } f u n c t i o n H n ( e , t ) { i f ( ! e ) t h r o w n e w E r r o r ( " ` " + t + " ` c a n n o t b e e m p t y " ) } f u n c t i o n X n ( e , t ) { i f ( ! e ) t h r o w n e w E r r o r ( " S e t t i n g ` " + t + " ` r e q u i r e s ` p a t h ` t o b e s e t t o o " ) } G n . t o S t r i n g = f u n c t i o n ( e ) { v a r t = t h i s . c o n t e n t s | | " " ; r e t u r n z n ( t ) ? t . t o S t r i n g ( e ) : S t r i n g ( t ) } , O b j e c t . d e f i n e P r o p e r t y ( G n , " p a t h " , { g e t : f u n c t i o n ( ) { r e t u r n t h i s . h i s t o r y [ t h i s . h i s t o r y . l e n g t h - 1 ] } , s e t : f u n c t i o n ( e ) { H n ( e , " p a t h " ) , e ! = = t h i s . p a t h & & t h i s . h i s t o r y . p u s h ( e ) } } ) , O b j e c t . d e f i n e P r o p e r t y ( G n , " d i r n a m e " , { g e t : f u n c t i o n ( ) { r e t u r n " s t r i n g " = = t y p e o f t h i s . p a t h ? P n . d i r n a m e ( t h i s . p a t h ) : v o i d 0 } , s e t : f u n c t i o n ( e ) { X n ( t h i s . p a t h , " d i r n a m e " ) , t h i s . p a t h = P n . j o i n ( e | | " " , t h i s . b a s e n a m e ) } } ) , O b j e c t . d e f i n e P r o p e r t y ( G n , " b a s e n a m e " , { g e t : f u n c t i o n ( ) { r e t u r n " s t r i n g " = = t y p e o f t h i s . p a t h ? P n . b a s e n a m e ( t h i s . p a t h ) : v o i d 0 } , s e t : f u n c t i o n ( e ) { H n ( e , " b a s e n a m e " ) , $ n ( e , " b a s e n a m e " ) , t h i s . p a t h = P n . j o i n ( t h i s . d i r n a m e | | " " , e ) } } ) , O b j e c t . d e f i n e P r o p e r t y ( G n , " e x t n a m e " , { g e t : f u n c t i o n ( ) { r e t u r n " s t r i n g " = = t y p e o f t h i s . p a t h ? P n . e x t n a m e ( t h i s . p a t h ) : v o i d 0 } , s e t : f u n c t i o n ( e ) { v a r t = e | | " " ; i f ( $ n ( t , " e x t n a m e " ) , X n ( t h i s . p a t h , " e x t n a m e " ) , t ) { i f ( " . " ! = = t . c h a r A t ( 0 ) ) t h r o w n e w E r r o r ( " ` e x t n a m e ` m u s t s t a r t w i t h ` . ` " ) ; i f ( - 1 ! = = t . i n d e x O f ( " . " , 1 ) ) t h r o w n e w E r r o r ( " ` e x t n a m e ` c a n n o t c o n t a i n m u l t i p l e d o t s " ) } t h i s . p a t h = j n ( t h i s . p a t h , t ) } } ) , O b j e c t . d e f i n e P r o p e r t y ( G n , " s t e m " , { g e t : f u n c t i o n ( ) { r e t u r n " s t r i n g " = = t y p e o f t h i s . p a t h ? P n . b a s e n a m e ( t h i s . p a t h , t h i s . e x t n a m e ) : v o i d 0 } , s e t : f u n c t i o n ( e ) { H n ( e , " s t e m " ) , $ n ( e , " s t e m " ) , t h i s . p a t h = P n . j o i n ( t h i s . d i r n a m e | | " " , e + ( t h i s . e x t n a m e | | " " ) ) } } ) ; v a r W n = U n , Y n = U n . p r o t o t y p e ; Y n . m e s s a g e = f u n c t i o n ( e , t , r ) { v a r n = t h i s . p a t h , u = n e w n n ( e , t , r ) ; n & & ( u . n a m e = n + " : " + u . n a m e , u . f i l e = n ) ; r e t u r n u . f a t a l = ! 1 , t h i s . m e s s a g e s . p u s h ( u ) , u } , Y n . i n f o = f u n c t i o n ( ) { v a r e = t h i s . m e s s a g e . a p p l y ( t h i s , a r g u m e n t s ) ; r e t u r n e . f a t a l = n u l l , e } , Y n . f a i l = f u n c t i o n ( ) { v a r e = t h i s . m e s s a g e . a p p l y ( t h i s , a r g u m e n t s ) ; t h r o w e . f a t a l = ! 0 , e } ; v a r Z n = f u n c t i o n e ( ) { v a r t = [ ] , r = Y r ( ) , n = { } , u = ! 1 , i = - 1 ; r e t u r n o . d a t a = f u n c t i o n ( e , t ) { i f ( " s t r i n g " = = t y p e o f e ) r e t u r n 2 = = = a r g u m e n t s . l e n g t h ? ( n u ( " d a t a " , u ) , n [ e ] = t , o ) : K n . c a l l ( n , e ) & & n [ e ] | | n u l l ; i f ( e ) r e t u r n n u ( " d a t a " , u ) , n = e , o ; r e t u r n n } , o . f r e e z e = a , o . a t t a c h e r s = t , o . u s e = f u n c t i o n ( e ) { v a r r ; i f ( n u ( " u s e " , u ) , n u l l = = e ) ; e l s e i f ( " f u n c t i o n " = = t y p e o f e ) l . a p p l y ( n u l l , a r g u m e n t s ) ; e l s e { i f ( " o b j e c t " ! = t y p e o f e ) t h r o w n e w E r r o r ( " E x p e c t e d u s a b l e v a l u e , n o t ` " + e + " ` " ) ; " l e n g t h " i n e ? s ( e ) : i ( e ) } r & & ( n . s e t t i n g s = $ r ( n . s e t t i n g s | | { } , r ) ) ; r e t u r n o ; f u n c t i o n i ( e ) { s ( e . p l u g i n s ) , e . s e t t i n g s & & ( r = $ r ( r | | { } , e . s e t t i n g s ) ) } f u n c t i o n a ( e ) { i f ( " f u n c t i o n " = = t y p e o f e ) l ( e ) ; e l s e { i f ( " o b j e c t " ! = t y p e o f e ) t h r o w n e w E r r o r ( " E x p e c t e d u s a b l e v a l u e , n o t ` " + e + " ` " ) ; " l e n g t h " i n e ? l . a p p l y ( n u l l , e ) : i ( e ) } } f u n c t i o n s ( e ) { v a r t , r ; i f ( n u l l = = e ) ; e l s e { i f ( " o b j e c t " ! = t y p e o f e | | ! ( " l e n g t h " i n e ) ) t h r o w n e w E r r o r ( " E x p e c t e d a l i s t o f p l u g i n s , n o t ` " + e + " ` " ) ; f o r ( t = e . l e n g t h , r = - 1 ; + + r < t ; ) a ( e [ r ] ) } } f u n c t i o n l ( e , r ) { v a r n = c ( e ) ; n ? ( H r ( n [ 1 ] ) & & H r ( r ) & & ( r = $ r ( n [ 1 ] , r ) ) , n [ 1 ] = r ) : t . p u s h ( J n . c a l l ( a r g u m e n t s ) ) } } , o . p a r s e = f u n c t i o n ( e ) { v a r t , r = W n ( e ) ; i f ( a ( ) , t u ( " p a r s e " , t = o . P a r s e r ) , e u ( t , " p a r s e " ) ) r e t u r n n e w t ( S t r i n g ( r ) , r ) . p a r s e ( ) ; r e t u r n t ( S t r i n g ( r ) , r ) } , o . s t r i n g i f y = f u n c t i o n ( e , t ) { v a r r , n = W n ( t ) ; i f ( a ( ) , r u ( " s t r i n g i f y " , r = o . C o m p i l e r ) , u u ( e ) , e u ( r , " c o m p i l e " ) ) r e t u r n n e w r ( e , n ) . c o m p i l e ( ) ; r e t u r n r ( e , n ) } , o . r u n = s , o . r u n S y n c = f u n c t i o n ( e , t ) { v a r r , n = ! 1 ; r e t u r n s ( e , t , u ) , i u ( " r u n S y n c " , " r u n " , n ) , r ; f u n c t i o n u ( e , t ) { n = ! 0 , q r ( e ) , r = t } } , o . p r o c e s s = l , o . p r o c e s s S y n c = f , o ; f u n c t i o n o ( ) { f o r ( v a r r = e ( ) , u = t . l e n g t h , i = - 1 ; + + i < u ; ) r . u s e . a p p l y ( n u l l , t [ i ] ) ; r e t u r n r . d a t a ( $ r ( ! 0 , { } , n ) ) , r } f u n c t i o n a ( ) { v a r e , n , a , c ; i f ( u ) r e t u r n o ; f o r ( ; + + i < t . l e n g t h ; ) n = ( e = t [ i ] ) [ 0 ] , n u l l , ! 1 ! = = ( a = e [ 1 ] ) & & ( ! 0 = = = a & & ( e [ 1 ] = v o i d 0 ) , " f u n c t i o n " = = t y p e o f ( c = n . a p p l y ( o , e . s l i c e ( 1 ) ) ) & & r . u s e ( c ) ) ; r e t u r n u = ! 0 , i = 1 / 0 , o } f u n c t i o n c ( e ) { f o r ( v a r r , n = t . l e n g t h , u = - 1 ; + + u < n ; ) i f ( ( r = t [ u ] ) [ 0 ] = = = e ) r e t u r n r } f u n c t i o n s ( e , t , n ) { i f ( u u ( e ) , a ( ) , n | | " f u n c t i o n " ! = t y p e o f t | | ( n = t , t = n u l l ) , ! n ) r e t u r n n e w P r o m i s e ( u ) ; f u n c t i o n u ( u , i ) { r . r u n ( e , W