2024-09-28 21:10:55 +08:00
const _ _vite _ _mapDeps = ( i , m = _ _vite _ _mapDeps , d = ( m . f || ( m . f = [ "assets/dagre-P3YPLUS5-sWOA2NL-.js" , "assets/graph-CwJvvfu_.js" , "assets/_baseUniq-BJtocV1B.js" , "assets/layout-B6yEu73k.js" , "assets/min-ndNfvMog.js" , "assets/json-BVinNWYU.js" , "assets/c4Diagram-THADGKDP-DxTaM75M.js" , "assets/chunk-XVOYOM2C-C6k95IsB.js" , "assets/flowDiagram-JSIZSE4D-BQxRgrT4.js" , "assets/chunk-DUMQOTYW-DoKqbLN4.js" , "assets/chunk-YWFND7JV-DVcQ9kpk.js" , "assets/channel-Biv3gQi8.js" , "assets/erDiagram-62CBQV5Y-Xhmv-ZOH.js" , "assets/gitGraphDiagram-UL5UFKDR-BUHqOkvc.js" , "assets/chunk-OQCM5LHU-DmNq-gEl.js" , "assets/chunk-2RYQ3QTB-B_qtVSkW.js" , "assets/gitGraph-YCYPL57B-Czywc9-q.js" , "assets/ganttDiagram-ASEIQ4P5-CulQjqwj.js" , "assets/linear-BUqFUPvt.js" , "assets/init-Gi6I4Gst.js" , "assets/infoDiagram-7APDZ6AT-DYLpEojO.js" , "assets/pieDiagram-OZX6XH5M-BBNXczbb.js" , "assets/arc-Q3l7J1lH.js" , "assets/ordinal-Cboi1Yqb.js" , "assets/quadrantDiagram-VG34DGKC-Dap_Vtw2.js" , "assets/xychartDiagram-LESROZAQ-Dl6_ErlD.js" , "assets/requirementDiagram-FPZB6IJI-CDW9I43Q.js" , "assets/sequenceDiagram-PQT5PN7B-Jg9FAZFh.js" , "assets/classDiagram-4BHYIK4I-BcnrSbPu.js" , "assets/chunk-BAVOGKFW-ByNf-3L9.js" , "assets/classDiagram-v2-FI7KE7WJ-DTDjs8Dq.js" , "assets/chunk-UGV5ZQQN-BAa6E7O8.js" , "assets/stateDiagram-TQSDS2D4-DqqkRBRZ.js" , "assets/chunk-2JBRQKJ5-DnXeqzUQ.js" , "assets/stateDiagram-v2-J5TZWJW5-BtIOExGE.js" , "assets/journeyDiagram-G5LC7W2K-BJWEgZtk.js" , "assets/timeline-definition-KYQAIZUX-ZeSNtck4.js" , "assets/mindmap-definition-FCEC46F3-DNGnOEa-.js" , "assets/cytoscape.esm-AYkLzDTC.js" , "assets/sankeyDiagram-KMMQDL5K-CMbkK5Db.js" , "assets/diagram-QS5GVLUX-IaYZswch.js" , "assets/blockDiagram-EN3ZKWFM-bHhhMzt-.js" , "assets/architectureDiagram-V6B76FHG-BhO6Ni6n.js" ] ) ) ) => i . map ( i => d [ i ] ) ;
2024-09-25 14:23:53 +08:00
var dw = Object . defineProperty ; var rS = Ra => { throw TypeError ( Ra ) } ; var pw = ( Ra , qa , td ) => qa in Ra ? dw ( Ra , qa , { enumerable : ! 0 , configurable : ! 0 , writable : ! 0 , value : td } ) : Ra [ qa ] = td ; var Qm = ( Ra , qa , td ) => pw ( Ra , typeof qa != "symbol" ? qa + "" : qa , td ) , fw = ( Ra , qa , td ) => qa . has ( Ra ) || rS ( "Cannot " + td ) ; var nS = ( Ra , qa , td ) => qa . has ( Ra ) ? rS ( "Cannot add the same private member more than once" ) : qa instanceof WeakSet ? qa . add ( Ra ) : qa . set ( Ra , td ) ; var wE = ( Ra , qa , td ) => ( fw ( Ra , qa , "access private method" ) , td ) ; ( function ( ) { const qa = document . createElement ( "link" ) . relList ; if ( qa && qa . supports && qa . supports ( "modulepreload" ) ) return ; for ( const nd of document . querySelectorAll ( 'link[rel="modulepreload"]' ) ) rd ( nd ) ; new MutationObserver ( nd => { for ( const ad of nd ) if ( ad . type === "childList" ) for ( const sd of ad . addedNodes ) sd . tagName === "LINK" && sd . rel === "modulepreload" && rd ( sd ) } ) . observe ( document , { childList : ! 0 , subtree : ! 0 } ) ; function td ( nd ) { const ad = { } ; return nd . integrity && ( ad . integrity = nd . integrity ) , nd . referrerPolicy && ( ad . referrerPolicy = nd . referrerPolicy ) , nd . crossOrigin === "use-credentials" ? ad . credentials = "include" : nd . crossOrigin === "anonymous" ? ad . credentials = "omit" : ad . credentials = "same-origin" , ad } function rd ( nd ) { if ( nd . ep ) return ; nd . ep = ! 0 ; const ad = td ( nd ) ; fetch ( nd . href , ad ) } } ) ( ) ; const global$1 = globalThis || void 0 || self ; / * *
* @ vue / shared v3 . 5.8
2024-09-18 09:46:23 +08:00
* ( c ) 2018 - present Yuxi ( Evan ) You and Vue contributors
* @ license MIT
2024-09-25 14:23:53 +08:00
* * //*! #__NO_SIDE_EFFECTS__ */function makeMap(Ra){const qa=Object.create(null);for(const td of Ra.split(","))qa[td]=1;return td=>td in qa}const EMPTY_OBJ={},EMPTY_ARR=[],NOOP=()=>{},NO=()=>!1,isOn=Ra=>Ra.charCodeAt(0)===111&&Ra.charCodeAt(1)===110&&(Ra.charCodeAt(2)>122||Ra.charCodeAt(2)<97),isModelListener=Ra=>Ra.startsWith("onUpdate:"),extend$3=Object.assign,remove$2=(Ra,qa)=>{const td=Ra.indexOf(qa);td>-1&&Ra.splice(td,1)},hasOwnProperty$i=Object.prototype.hasOwnProperty,hasOwn$2=(Ra,qa)=>hasOwnProperty$i.call(Ra,qa),isArray$2=Array.isArray,isMap$1=Ra=>toTypeString(Ra)==="[object Map]",isSet$1=Ra=>toTypeString(Ra)==="[object Set]",isDate$1=Ra=>toTypeString(Ra)==="[object Date]",isFunction$4=Ra=>typeof Ra=="function",isString$3=Ra=>typeof Ra=="string",isSymbol$1=Ra=>typeof Ra=="symbol",isObject$5=Ra=>Ra!==null&&typeof Ra=="object",isPromise=Ra=>(isObject$5(Ra)||isFunction$4(Ra))&&isFunction$4(Ra.then)&&isFunction$4(Ra.catch),objectToString$1=Object.prototype.toString,toTypeString=Ra=>objectToString$1.call(Ra),toRawType=Ra=>toTypeString(Ra).slice(8,-1),isPlainObject$3=Ra=>toTypeString(Ra)==="[object Object]",isIntegerKey=Ra=>isString$3(Ra)&&Ra!=="NaN"&&Ra[0]!=="-"&&""+parseInt(Ra,10)===Ra,isReservedProp=makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),cacheStringFunction=Ra=>{const qa=Object.create(null);return td=>qa[td]||(qa[td]=Ra(td))},camelizeRE=/-(\w)/g,camelize=cacheStringFunction(Ra=>Ra.replace(camelizeRE,(qa,td)=>td?td.toUpperCase():"")),hyphenateRE=/\B([A-Z])/g,hyphenate=cacheStringFunction(Ra=>Ra.replace(hyphenateRE,"-$1").toLowerCase()),capitalize$1=cacheStringFunction(Ra=>Ra.charAt(0).toUpperCase()+Ra.slice(1)),toHandlerKey=cacheStringFunction(Ra=>Ra?`on${capitalize$1(Ra)}`:""),hasChanged=(Ra,qa)=>!Object.is(Ra,qa),invokeArrayFns=(Ra,...qa)=>{for(let td=0;td<Ra.length;td++)Ra[td](...qa)},def$2=(Ra,qa,td,rd=!1)=>{Object.defineProperty(Ra,qa,{configurable:!0,enumerable:!1,writable:rd,value:td})},looseToNumber=Ra=>{const qa=parseFloat(Ra);return isNaN(qa)?Ra:qa},toNumber$3=Ra=>{const qa=isString$3(Ra)?Number(Ra):NaN;return isNaN(qa)?Ra:qa};let _globalThis;const getGlobalThis=()=>_globalThis||(_globalThis=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global$1<"u"?global$1:{});function normalizeStyle(Ra){if(isArray$2(Ra)){const qa={};for(let td=0;td<Ra.length;td++){const rd=Ra[td],nd=isString$3(rd)?parseStringStyle(rd):normalizeStyle(rd);if(nd)for(const ad in nd)qa[ad]=nd[ad]}return qa}else if(isString$3(Ra)||isObject$5(Ra))return Ra}const listDelimiterRE=/;(?![^(]*\))/g,propertyDelimiterRE=/:([^]+)/,styleCommentRE=/\/\*[^]*?\*\//g;function parseStringStyle(Ra){const qa={};return Ra.replace(styleCommentRE,"").split(listDelimiterRE).forEach(td=>{if(td){const rd=td.split(propertyDelimiterRE);rd.length>1&&(qa[rd[0].trim()]=rd[1].trim())}}),qa}function normalizeClass(Ra){let qa="";if(isString$3(Ra))qa=Ra;else if(isArray$2(Ra))for(let td=0;td<Ra.length;td++){const rd=normalizeClass(Ra[td]);rd&&(qa+=rd+" ")}else if(isObject$5(Ra))for(const td in Ra)Ra[td]&&(qa+=td+" ");return qa.trim()}function normalizeProps(Ra){if(!Ra)return null;let{class:qa,style:td}=Ra;return qa&&!isString$3(qa)&&(Ra.class=normalizeClass(qa)),td&&(Ra.style=normalizeStyle(td)),Ra}const specialBooleanAttrs="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",isSpecialBooleanAttr=makeMap(specialBooleanAttrs);function includeBooleanAttr(Ra){return!!Ra||Ra===""}function looseCompareArrays(Ra,qa){if(Ra.length!==qa.length)return!1;let td=!0;for(let rd=0;td&&rd<Ra.length;rd++)td=looseEqual(Ra[rd],qa[rd]);return td}function looseEqual(Ra,qa){if(Ra===qa)return!0;let td=isDate$1(Ra),rd=isDate$1(qa);if(td||rd)return td&&rd?Ra.getTime()===qa.getTime():!1;if(td=isSymbol$1(Ra),rd=isSymbol$1(qa),td||rd)return Ra===qa;if(td=isArray$2(Ra),rd=isArray$2(qa),td||rd)return td&&rd?looseCompareArrays(Ra,qa):!1;if(td=isObject$5(Ra),rd=isObject$5(qa),td||rd){if(!td||!rd)return!1;const nd=Object.keys(Ra).length,ad=
* @ vue / reactivity v3 . 5.8
2024-09-18 09:46:23 +08:00
* ( c ) 2018 - present Yuxi ( Evan ) You and Vue contributors
* @ license MIT
2024-09-28 20:51:35 +08:00
* * / l e t a c t i v e E f f e c t S c o p e ; c l a s s E f f e c t S c o p e { c o n s t r u c t o r ( q a = ! 1 ) { t h i s . d e t a c h e d = q a , t h i s . _ a c t i v e = ! 0 , t h i s . e f f e c t s = [ ] , t h i s . c l e a n u p s = [ ] , t h i s . _ i s P a u s e d = ! 1 , t h i s . p a r e n t = a c t i v e E f f e c t S c o p e , ! q a & & a c t i v e E f f e c t S c o p e & & ( t h i s . i n d e x = ( a c t i v e E f f e c t S c o p e . s c o p e s | | ( a c t i v e E f f e c t S c o p e . s c o p e s = [ ] ) ) . p u s h ( t h i s ) - 1 ) } g e t a c t i v e ( ) { r e t u r n t h i s . _ a c t i v e } p a u s e ( ) { i f ( t h i s . _ a c t i v e ) { t h i s . _ i s P a u s e d = ! 0 ; l e t q a , t d ; i f ( t h i s . s c o p e s ) f o r ( q a = 0 , t d = t h i s . s c o p e s . l e n g t h ; q a < t d ; q a + + ) t h i s . s c o p e s [ q a ] . p a u s e ( ) ; f o r ( q a = 0 , t d = t h i s . e f f e c t s . l e n g t h ; q a < t d ; q a + + ) t h i s . e f f e c t s [ q a ] . p a u s e ( ) } } r e s u m e ( ) { i f ( t h i s . _ a c t i v e & & t h i s . _ i s P a u s e d ) { t h i s . _ i s P a u s e d = ! 1 ; l e t q a , t d ; i f ( t h i s . s c o p e s ) f o r ( q a = 0 , t d = t h i s . s c o p e s . l e n g t h ; q a < t d ; q a + + ) t h i s . s c o p e s [ q a ] . r e s u m e ( ) ; f o r ( q a = 0 , t d = t h i s . e f f e c t s . l e n g t h ; q a < t d ; q a + + ) t h i s . e f f e c t s [ q a ] . r e s u m e ( ) } } r u n ( q a ) { i f ( t h i s . _ a c t i v e ) { c o n s t t d = a c t i v e E f f e c t S c o p e ; t r y { r e t u r n a c t i v e E f f e c t S c o p e = t h i s , q a ( ) } f i n a l l y { a c t i v e E f f e c t S c o p e = t d } } } o n ( ) { a c t i v e E f f e c t S c o p e = t h i s } o f f ( ) { a c t i v e E f f e c t S c o p e = t h i s . p a r e n t } s t o p ( q a ) { i f ( t h i s . _ a c t i v e ) { l e t t d , r d ; f o r ( t d = 0 , r d = t h i s . e f f e c t s . l e n g t h ; t d < r d ; t d + + ) t h i s . e f f e c t s [ t d ] . s t o p ( ) ; f o r ( t d = 0 , r d = t h i s . c l e a n u p s . l e n g t h ; t d < r d ; t d + + ) t h i s . c l e a n u p s [ t d ] ( ) ; i f ( t h i s . s c o p e s ) f o r ( t d = 0 , r d = t h i s . s c o p e s . l e n g t h ; t d < r d ; t d + + ) t h i s . s c o p e s [ t d ] . s t o p ( ! 0 ) ; i f ( ! t h i s . d e t a c h e d & & t h i s . p a r e n t & & ! q a ) { c o n s t n d = t h i s . p a r e n t . s c o p e s . p o p ( ) ; n d & & n d ! = = t h i s & & ( t h i s . p a r e n t . s c o p e s [ t h i s . i n d e x ] = n d , n d . i n d e x = t h i s . i n d e x ) } t h i s . p a r e n t = v o i d 0 , t h i s . _ a c t i v e = ! 1 } } } f u n c t i o n e f f e c t S c o p e ( R a ) { r e t u r n n e w E f f e c t S c o p e ( R a ) } f u n c t i o n g e t C u r r e n t S c o p e ( ) { r e t u r n a c t i v e E f f e c t S c o p e } f u n c t i o n o n S c o p e D i s p o s e ( R a , q a = ! 1 ) { a c t i v e E f f e c t S c o p e & & a c t i v e E f f e c t S c o p e . c l e a n u p s . p u s h ( R a ) } l e t a c t i v e S u b ; c o n s t p a u s e d Q u e u e E f f e c t s = n e w W e a k S e t ; c l a s s R e a c t i v e E f f e c t { c o n s t r u c t o r ( q a ) { t h i s . f n = q a , t h i s . d e p s = v o i d 0 , t h i s . d e p s T a i l = v o i d 0 , t h i s . f l a g s = 5 , t h i s . n e x t = v o i d 0 , t h i s . c l e a n u p = v o i d 0 , t h i s . s c h e d u l e r = v o i d 0 , a c t i v e E f f e c t S c o p e & & a c t i v e E f f e c t S c o p e . a c t i v e & & a c t i v e E f f e c t S c o p e . e f f e c t s . p u s h ( t h i s ) } p a u s e ( ) { t h i s . f l a g s | = 6 4 } r e s u m e ( ) { t h i s . f l a g s & 6 4 & & ( t h i s . f l a g s & = - 6 5 , p a u s e d Q u e u e E f f e c t s . h a s ( t h i s ) & & ( p a u s e d Q u e u e E f f e c t s . d e l e t e ( t h i s ) , t h i s . t r i g g e r ( ) ) ) } n o t i f y ( ) { t h i s . f l a g s & 2 & & ! ( t h i s . f l a g s & 3 2 ) | | t h i s . f l a g s & 8 | | b a t c h ( t h i s ) } r u n ( ) { i f ( ! ( t h i s . f l a g s & 1 ) ) r e t u r n t h i s . f n ( ) ; t h i s . f l a g s | = 2 , c l e a n u p E f f e c t ( t h i s ) , p r e p a r e D e p s ( t h i s ) ; c o n s t q a = a c t i v e S u b , t d = s h o u l d T r a c k ; a c t i v e S u b = t h i s , s h o u l d T r a c k = ! 0 ; t r y { r e t u r n t h i s . f n ( ) } f i n a l l y { c l e a n u p D e p s ( t h i s ) , a c t i v e S u b = q a , s h o u l d T r a c k = t d , t h i s . f l a g s & = - 3 } } s t o p ( ) { i f ( t h i s . f l a g s & 1 ) { f o r ( l e t q a = t h i s . d e p s ; q a ; q a = q a . n e x t D e p ) r e m o v e S u b ( q a ) ; t h i s . d e p s = t h i s . d e p s T a i l = v o i d 0 , c l e a n u p E f f e c t ( t h i s ) , t h i s . o n S t o p & & t h i s . o n S t o p ( ) , t h i s . f l a g s & = - 2 } } t r i g g e r ( ) { t h i s . f l a g s & 6 4 ? p a u s e d Q u e u e E f f e c t s . a d d ( t h i s ) : t h i s . s c h e d u l e r ? t h i s . s c h e d u l e r ( ) : t h i s . r u n I f D i r t y ( ) } r u n I f D i r t y ( ) { i s D i r t y ( t h i s ) & & t h i s . r u n ( ) } g e t d i r t y ( ) { r e t u r n i s D i r t y ( t h i s ) } } l e t b a t c h D e p t h = 0 , b a t c h e d S u b ; f u n c t i o n b a t c h ( R a ) { R a . f l a g s | = 8 , R a . n e x t = b a t c h e d S u b , b a t c h e d S u b = R a } f u n c t i o n s t a r t B a t c h ( ) { b a t c h D e p t h + + } f u n c t i o n e n d B a t c h ( ) { i f ( - - b a t c h D e p t h > 0 ) r e t u r n ; l e t R a ; f o r ( ; b a t c h e d S u b ; ) { l e t q a = b a t c h e d S u b ; f o r ( b a t c h e d S u b = v o i d 0 ; q a ; ) { c o n s t t d = q a . n e x t ; i f ( q a . n e x t = v o i d 0 , q a . f l a g s & = - 9 , q a . f l a g s & 1 ) t r y { q a . t r i g g e r ( ) } c a t c h ( r d ) { R a | | ( R a = r d ) } q a = t d } } i f ( R a ) t h r o w R a } f u n c t i o n p r e p a r e D e p s ( R a ) { f o r ( l e t q a = R a . d e p s ; q a ; q a = q a . n e x t D e p ) q a . v e r s i o n = - 1 , q a . p r e v A c t i v e L i n k = q a . d e p . a c t i v e L i n k , q a . d e p . a c t i v e L i n k = q a } f u n c t i o n c l e a n u p D e p s ( R a , q a = ! 1 ) { l e t t d , r d = R a . d e p s T a i l , n d = r d ; f o r ( ; n d ; ) { c o n s t a d = n d . p r e v D e p ; n d . v e r s i o n = = = - 1 ? ( n d = = = r d & & ( r d = a d ) , r e m o v e S u b ( n d , q a ) , r e m o v e D e p ( n d ) ) : t d = n d , n d . d e p . a c t i v e L i n k = n d . p r e v A c t i v e L i n k , n d . p r e v A c t i v e L i n k = v o i d 0 , n d = a d } R a . d e p s = t d , R a . d e p s T a i l = r d } f u n c t i o n i s D i r t y ( R a ) { f o r ( l e t q a = R a . d e p s ; q a ; q a = q a . n e x t D e p ) i f ( q a . d e p . v e r s i o n ! = = q a . v e r s i o n | | q a . d e p . c o m p u t e d & & ( r e f r e s h C o m p u t e d ( q a . d e p . c o m p u t e d ) | | q a . d e p . v e r s i o n ! = = q a . v e r s i o n ) ) r e t u r n ! 0 ; r e t u r n ! ! R a . _ d i r t y } f u n c t i o n r e f r e s h C o m p u t e d ( R a ) { i f ( R a . f l a g s & 4 & & ! ( R a . f l a g s & 1 6 ) | | ( R a . f l a g s & = - 1 7 , R a . g l o b a l V e r s i o n = = = g l o b a l V e r s i o n ) ) r e t u r n ; R a . g l o b a l V e r s i o n = g l o b a l V e r s i o n ; c o n s t q a = R a . d e p ; i f ( R a . f l a g s | = 2 , q a . v e r s i o n > 0 & & ! R a . i s S S R & & R a . d e p s & & ! i s D i r t y ( R a ) ) { R a . f l a g s & = - 3 ; r e t u r n } c o n s t t d = a c t i v e S u b , r d = s h o u l d T r a c k ; a c t i v e S u b = R a , s h o u l d T r a c k = ! 0 ; t r y { p r e p a r e D e p s ( R a ) ; c o n s t n d = R a . f n ( R a . _ v a l u e ) ; ( q a . v e r s i o n = = = 0 | | h a s C h a n g e d ( n d , R a . _ v a l u e ) ) & & ( R a . _ v a l u e = n d , q a . v e r s i o n + + ) } c a t c h ( n d ) { t h r o w q a . v e r s i o n + + , n d } f i n a l l y { a c t i v e S u b = t d , s h o u l d T r a c k = r d , c l e a n u p D e p
2024-09-25 14:23:53 +08:00
* @ vue / runtime - core v3 . 5.8
2024-09-18 09:46:23 +08:00
* ( c ) 2018 - present Yuxi ( Evan ) You and Vue contributors
* @ license MIT
2024-09-25 14:23:53 +08:00
* * / c o n s t s t a c k = [ ] ; l e t i s W a r n i n g = ! 1 ; f u n c t i o n w a r n $ 1 ( R a , . . . q a ) { i f ( i s W a r n i n g ) r e t u r n ; i s W a r n i n g = ! 0 , p a u s e T r a c k i n g ( ) ; c o n s t t d = s t a c k . l e n g t h ? s t a c k [ s t a c k . l e n g t h - 1 ] . c o m p o n e n t : n u l l , r d = t d & & t d . a p p C o n t e x t . c o n f i g . w a r n H a n d l e r , n d = g e t C o m p o n e n t T r a c e ( ) ; i f ( r d ) c a l l W i t h E r r o r H a n d l i n g ( r d , t d , 1 1 , [ R a + q a . m a p ( a d = > { v a r s d , u d ; r e t u r n ( u d = ( s d = a d . t o S t r i n g ) = = n u l l ? v o i d 0 : s d . c a l l ( a d ) ) ! = n u l l ? u d : J S O N . s t r i n g i f y ( a d ) } ) . j o i n ( " " ) , t d & & t d . p r o x y , n d . m a p ( ( { v n o d e : a d } ) = > ` a t < $ { f o r m a t C o m p o n e n t N a m e ( t d , a d . t y p e ) } > ` ) . j o i n ( `
` ),nd]);else{const ad=[ ` [ Vue warn ] : $ { Ra } ` ,...qa];nd.length&&ad.push( `
` ,...formatTrace(nd)),console.warn(...ad)}resetTracking(),isWarning=!1}function getComponentTrace(){let Ra=stack[stack.length-1];if(!Ra)return[];const qa=[];for(;Ra;){const td=qa[0];td&&td.vnode===Ra?td.recurseCount++:qa.push({vnode:Ra,recurseCount:0});const rd=Ra.component&&Ra.component.parent;Ra=rd&&rd.vnode}return qa}function formatTrace(Ra){const qa=[];return Ra.forEach((td,rd)=>{qa.push(...rd===0?[]:[ `
2024-09-28 20:51:35 +08:00
` ],...formatTraceEntry(td))}),qa}function formatTraceEntry({vnode:Ra,recurseCount:qa}){const td=qa>0? ` ... ( $ { qa } recursive calls ) ` :"",rd=Ra.component?Ra.component.parent==null:!1,nd= ` at < $ { formatComponentName ( Ra . component , Ra . type , rd ) } ` ,ad=">"+td;return Ra.props?[nd,...formatProps(Ra.props),ad]:[nd+ad]}function formatProps(Ra){const qa=[],td=Object.keys(Ra);return td.slice(0,3).forEach(rd=>{qa.push(...formatProp(rd,Ra[rd]))}),td.length>3&&qa.push(" ..."),qa}function formatProp(Ra,qa,td){return isString $ 3(qa)?(qa=JSON.stringify(qa),td?qa:[ ` $ { Ra } = $ { qa } ` ]):typeof qa=="number"||typeof qa=="boolean"||qa==null?td?qa:[ ` $ { Ra } = $ { qa } ` ]:isRef(qa)?(qa=formatProp(Ra,toRaw(qa.value),!0),td?qa:[ ` $ { Ra } = Ref < ` ,qa,">"]):isFunction $ 4(qa)?[ ` $ { Ra } = fn$ { qa . name ? ` < ${ qa . name } > ` : "" } ` ]:(qa=toRaw(qa),td?qa:[ ` $ { Ra } = ` ,qa])}function callWithErrorHandling(Ra,qa,td,rd){try{return rd?Ra(...rd):Ra()}catch(nd){handleError $ 1(nd,qa,td)}}function callWithAsyncErrorHandling(Ra,qa,td,rd){if(isFunction $ 4(Ra)){const nd=callWithErrorHandling(Ra,qa,td,rd);return nd&&isPromise(nd)&&nd.catch(ad=>{handleError $ 1(ad,qa,td)}),nd}if(isArray $ 2(Ra)){const nd=[];for(let ad=0;ad<Ra.length;ad++)nd.push(callWithAsyncErrorHandling(Ra[ad],qa,td,rd));return nd}}function handleError $ 1(Ra,qa,td,rd=!0){const nd=qa?qa.vnode:null,{errorHandler:ad,throwUnhandledErrorInProduction:sd}=qa&&qa.appContext.config||EMPTY_OBJ;if(qa){let ud=qa.parent;const cd=qa.proxy,dd= ` https : //vuejs.org/error-reference/#runtime-${td}`;for(;ud;){const pd=ud.ec;if(pd){for(let fd=0;fd<pd.length;fd++)if(pd[fd](Ra,cd,dd)===!1)return}ud=ud.parent}if(ad){pauseTracking(),callWithErrorHandling(ad,null,10,[Ra,cd,dd]),resetTracking();return}}logError(Ra,td,nd,rd,sd)}function logError(Ra,qa,td,rd=!0,nd=!1){if(nd)throw Ra;console.error(Ra)}let isFlushing=!1,isFlushPending=!1;const queue$2=[];let flushIndex=0;const pendingPostFlushCbs=[];let activePostFlushCbs=null,postFlushIndex=0;const resolvedPromise=Promise.resolve();let currentFlushPromise=null;function nextTick$1(Ra){const qa=currentFlushPromise||resolvedPromise;return Ra?qa.then(this?Ra.bind(this):Ra):qa}function findInsertionIndex(Ra){let qa=isFlushing?flushIndex+1:0,td=queue$2.length;for(;qa<td;){const rd=qa+td>>>1,nd=queue$2[rd],ad=getId(nd);ad<Ra||ad===Ra&&nd.flags&2?qa=rd+1:td=rd}return qa}function queueJob(Ra){if(!(Ra.flags&1)){const qa=getId(Ra),td=queue$2[queue$2.length-1];!td||!(Ra.flags&2)&&qa>=getId(td)?queue$2.push(Ra):queue$2.splice(findInsertionIndex(qa),0,Ra),Ra.flags|=1,queueFlush()}}function queueFlush(){!isFlushing&&!isFlushPending&&(isFlushPending=!0,currentFlushPromise=resolvedPromise.then(flushJobs))}function queuePostFlushCb(Ra){isArray$2(Ra)?pendingPostFlushCbs.push(...Ra):activePostFlushCbs&&Ra.id===-1?activePostFlushCbs.splice(postFlushIndex+1,0,Ra):Ra.flags&1||(pendingPostFlushCbs.push(Ra),Ra.flags|=1),queueFlush()}function flushPreFlushCbs(Ra,qa,td=isFlushing?flushIndex+1:0){for(;td<queue$2.length;td++){const rd=queue$2[td];if(rd&&rd.flags&2){if(Ra&&rd.id!==Ra.uid)continue;queue$2.splice(td,1),td--,rd.flags&4&&(rd.flags&=-2),rd(),rd.flags&4||(rd.flags&=-2)}}}function flushPostFlushCbs(Ra){if(pendingPostFlushCbs.length){const qa=[...new Set(pendingPostFlushCbs)].sort((td,rd)=>getId(td)-getId(rd));if(pendingPostFlushCbs.length=0,activePostFlushCbs){activePostFlushCbs.push(...qa);return}for(activePostFlushCbs=qa,postFlushIndex=0;postFlushIndex<activePostFlushCbs.length;postFlushIndex++){const td=activePostFlushCbs[postFlushIndex];td.flags&4&&(td.flags&=-2),td.flags&8||td(),td.flags&=-2}activePostFlushCbs=null,postFlushIndex=0}}const getId=Ra=>Ra.id==null?Ra.flags&2?-1:1/0:Ra.id;function flushJobs(Ra){isFlushPending=!1,isFlushing=!0;try{for(flushIndex=0;flushIndex<queue$2.length;flushIndex++){const qa=queue$2[flushIndex];qa&&!(qa.flags&8)&&(qa.flags&4&&(qa.flags&=-2),callWithErrorHandling(qa,qa.i,qa.i?15:14),qa.flags&4||(qa.flags&=-2))}}finally{for(;flushIndex<queue$2.length;flushIndex++){const qa=queue$2[flushIndex];qa&&(qa.flags&=-2)}flushIndex=0,queue$2.length=0,flushPostFlushCbs(),isFlushing=!1,currentFlushPromise=null,(queue$2.length||pen
2024-09-25 14:23:53 +08:00
* @ vue / runtime - dom v3 . 5.8
2024-09-18 09:46:23 +08:00
* ( c ) 2018 - present Yuxi ( Evan ) You and Vue contributors
* @ license MIT
2024-09-28 21:10:55 +08:00
* * /let policy;const tt$5=typeof window<"u"&&window.trustedTypes;if(tt$5)try{policy=tt$5.createPolicy("vue",{createHTML:Ra=>Ra})}catch{}const unsafeToTrustedHTML=policy?Ra=>policy.createHTML(Ra):Ra=>Ra,svgNS="http:/ / www . w3 . org / 2000 / svg ",mathmlNS=" http : //www.w3.org/1998/Math/MathML",doc=typeof document<"u"?document:null,templateContainer=doc&&doc.createElement("template"),nodeOps={insert:(Ra,qa,td)=>{qa.insertBefore(Ra,td||null)},remove:Ra=>{const qa=Ra.parentNode;qa&&qa.removeChild(Ra)},createElement:(Ra,qa,td,rd)=>{const nd=qa==="svg"?doc.createElementNS(svgNS,Ra):qa==="mathml"?doc.createElementNS(mathmlNS,Ra):td?doc.createElement(Ra,{is:td}):doc.createElement(Ra);return Ra==="select"&&rd&&rd.multiple!=null&&nd.setAttribute("multiple",rd.multiple),nd},createText:Ra=>doc.createTextNode(Ra),createComment:Ra=>doc.createComment(Ra),setText:(Ra,qa)=>{Ra.nodeValue=qa},setElementText:(Ra,qa)=>{Ra.textContent=qa},parentNode:Ra=>Ra.parentNode,nextSibling:Ra=>Ra.nextSibling,querySelector:Ra=>doc.querySelector(Ra),setScopeId(Ra,qa){Ra.setAttribute(qa,"")},insertStaticContent(Ra,qa,td,rd,nd,ad){const sd=td?td.previousSibling:qa.lastChild;if(nd&&(nd===ad||nd.nextSibling))for(;qa.insertBefore(nd.cloneNode(!0),td),!(nd===ad||!(nd=nd.nextSibling)););else{templateContainer.innerHTML=unsafeToTrustedHTML(rd==="svg"?`<svg>${Ra}</svg>`:rd==="mathml"?`<math>${Ra}</math>`:Ra);const ud=templateContainer.content;if(rd==="svg"||rd==="mathml"){const cd=ud.firstChild;for(;cd.firstChild;)ud.appendChild(cd.firstChild);ud.removeChild(cd)}qa.insertBefore(ud,td)}return[sd?sd.nextSibling:qa.firstChild,td?td.previousSibling:qa.lastChild]}},TRANSITION="transition",ANIMATION="animation",vtcKey=Symbol("_vtc"),DOMTransitionPropsValidators={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},TransitionPropsValidators=extend$3({},BaseTransitionPropsValidators,DOMTransitionPropsValidators),decorate$1=Ra=>(Ra.displayName="Transition",Ra.props=TransitionPropsValidators,Ra),Transition$1=decorate$1((Ra,{slots:qa})=>h$1(BaseTransition,resolveTransitionProps(Ra),qa)),callHook=(Ra,qa=[])=>{isArray$2(Ra)?Ra.forEach(td=>td(...qa)):Ra&&Ra(...qa)},hasExplicitCallback=Ra=>Ra?isArray$2(Ra)?Ra.some(qa=>qa.length>1):Ra.length>1:!1;function resolveTransitionProps(Ra){const qa={};for(const hf in Ra)hf in DOMTransitionPropsValidators||(qa[hf]=Ra[hf]);if(Ra.css===!1)return qa;const{name:td="v",type:rd,duration:nd,enterFromClass:ad=`${td}-enter-from`,enterActiveClass:sd=`${td}-enter-active`,enterToClass:ud=`${td}-enter-to`,appearFromClass:cd=ad,appearActiveClass:dd=sd,appearToClass:pd=ud,leaveFromClass:fd=`${td}-leave-from`,leaveActiveClass:Td=`${td}-leave-active`,leaveToClass:Ad=`${td}-leave-to`}=Ra,Sd=normalizeDuration(nd),Dd=Sd&&Sd[0],Ld=Sd&&Sd[1],{onBeforeEnter:Rd,onEnter:Od,onEnterCancelled:Md,onLeave:jd,onLeaveCancelled:Ud,onBeforeAppear:Hd=Rd,onAppear:Wd=Od,onAppearCancelled:Zd=Md}=qa,zd=(hf,vf,Tf)=>{removeTransitionClass(hf,vf?pd:ud),removeTransitionClass(hf,vf?dd:sd),Tf&&Tf()},Qd=(hf,vf)=>{hf._isLeaving=!1,removeTransitionClass(hf,fd),removeTransitionClass(hf,Ad),removeTransitionClass(hf,Td),vf&&vf()},Jd=hf=>(vf,Tf)=>{const _f=hf?Wd:Od,bf=()=>zd(vf,hf,Tf);callHook(_f,[vf,bf]),nextFrame(()=>{removeTransitionClass(vf,hf?cd:ad),addTransitionClass(vf,hf?pd:ud),hasExplicitCallback(_f)||whenTransitionEnds(vf,rd,Dd,bf)})};return extend$3(qa,{onBeforeEnter(hf){callHook(Rd,[hf]),addTransitionClass(hf,ad),addTransitionClass(hf,sd)},onBeforeAppear(hf){callHook(Hd,[hf]),addTransitionClass(hf,cd),addTransitionClass(hf,dd)},onEnter:Jd(!1),onAppear:Jd(!0),onLeave(hf,vf){hf._isLeaving=!0;const Tf=()=>Qd(hf,vf);addTransitionClass(hf,fd),addTransitionClass(hf,Td),forceReflow(),nextFrame(()=>{hf._isLeaving&&(removeTransitionClass(hf,fd),addTransitionClass(hf,Ad),hasExplicitCallback(jd)||whenTransitionEnds(hf,rd,Ld,Tf))}),callHook(jd,[hf,Tf])},onEnterCancelled
2024-09-18 09:46:23 +08:00
( ? :
2024-09-25 14:23:53 +08:00
( ? : ` +rd+":){7}(?:"+rd+ ` | : ) | // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
( ? : ` +rd+":){6}(?:"+td+"|:"+rd+ ` | : ) | // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
( ? : ` +rd+":){5}(?::"+td+"|(?::"+rd+ ` ) { 1 , 2 } | : ) | // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
( ? : ` +rd+":){4}(?:(?::"+rd+"){0,1}:"+td+"|(?::"+rd+ ` ) { 1 , 3 } | : ) | // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
( ? : ` +rd+":){3}(?:(?::"+rd+"){0,2}:"+td+"|(?::"+rd+ ` ) { 1 , 4 } | : ) | // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
( ? : ` +rd+":){2}(?:(?::"+rd+"){0,3}:"+td+"|(?::"+rd+ ` ) { 1 , 5 } | : ) | // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
( ? : ` +rd+":){1}(?:(?::"+rd+"){0,4}:"+td+"|(?::"+rd+ ` ) { 1 , 6 } | : ) | // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
( ? : : ( ? : ( ? : : ` +rd+"){0,5}:"+td+"|(?::"+rd+ ` ) { 1 , 7 } | : ) ) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
2024-09-18 09:46:23 +08:00
) ( ? : % [ 0 - 9 a - zA - Z ] { 1 , } ) ? // %eth0 %1
2024-09-28 20:51:35 +08:00
` ).replace(/ \s * \/ \/ .* $ /gm,"").replace(/ \n /g,"").trim(),ad=new RegExp("(?:^"+td+" $ )|(?:^"+nd+" $ )"),sd=new RegExp("^"+td+" $ "),ud=new RegExp("^"+nd+" $ "),cd=function(jd){return jd&&jd.exact?ad:new RegExp("(?:"+qa(jd)+td+qa(jd)+")|(?:"+qa(jd)+nd+qa(jd)+")","g")};cd.v4=function(Md){return Md&&Md.exact?sd:new RegExp(""+qa(Md)+td+qa(Md),"g")},cd.v6=function(Md){return Md&&Md.exact?ud:new RegExp(""+qa(Md)+nd+qa(Md),"g")};var dd="(?:(?:[a-z]+:)?//)",pd="(?: \\ S+(?:: \\ S*)?@)?",fd=cd.v4().source,Td=cd.v6().source,Ad="(?:(?:[a-z \\ u00a1- \\ uffff0-9][-_]*)*[a-z \\ u00a1- \\ uffff0-9]+)",Sd="(?: \\ .(?:[a-z \\ u00a1- \\ uffff0-9]-*)*[a-z \\ u00a1- \\ uffff0-9]+)*",Dd="(?: \\ .(?:[a-z \\ u00a1- \\ uffff]{2,}))",Ld="(?:: \\ d{2,5})?",Rd='(?:[/?#][^ \\ s"]*)?',Od="(?:"+dd+"|www \\ .)"+pd+"(?:localhost|"+fd+"|"+Td+"|"+Ad+Sd+Dd+")"+Ld+Rd;return urlReg=new RegExp("(?:^"+Od+" $ )","i"),urlReg},pattern $ 2={email:/^(([^<>() \[ \] \\ .,;: \s @"]+( \. [^<>() \[ \] \\ .,;: \s @"]+)*)|(".+"))@(( \[ [0-9]{1,3} \. [0-9]{1,3} \. [0-9]{1,3} \. [0-9]{1,3}])|(([a-zA-Z \- 0-9 \u 00A0- \u D7FF \u F900- \u FDCF \u FDF0- \u FFEF]+ \. )+[a-zA-Z \u 00A0- \u D7FF \u F900- \u FDCF \u FDF0- \u FFEF]{2,})) $ /,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3}) $ /i},types $ 1={integer:function(qa){return types $ 1.number(qa)&&parseInt(qa,10)===qa},float:function(qa){return types $ 1.number(qa)&&!types $ 1.integer(qa)},array:function(qa){return Array.isArray(qa)},regexp:function(qa){if(qa instanceof RegExp)return!0;try{return!!new RegExp(qa)}catch{return!1}},date:function(qa){return typeof qa.getTime=="function"&&typeof qa.getMonth=="function"&&typeof qa.getYear=="function"&&!isNaN(qa.getTime())},number:function(qa){return isNaN(qa)?!1:typeof qa=="number"},object:function(qa){return typeof qa=="object"&&!types $ 1.array(qa)},method:function(qa){return typeof qa=="function"},email:function(qa){return typeof qa=="string"&&qa.length<=320&&!!qa.match(pattern $ 2.email)},url:function(qa){return typeof qa=="string"&&qa.length<=2048&&!!qa.match(getUrlRegex())},hex:function(qa){return typeof qa=="string"&&!!qa.match(pattern $ 2.hex)}},type $ 1 $ 1=function(qa,td,rd,nd,ad){if(qa.required&&td===void 0){required $ 1(qa,td,rd,nd,ad);return}var sd=["integer","float","array","regexp","object","method","email","number","date","url","hex"],ud=qa.type;sd.indexOf(ud)>-1?types $ 1[ud](td)||nd.push(format $ 2(ad.messages.types[ud],qa.fullField,qa.type)):ud&&typeof td!==qa.type&&nd.push(format $ 2(ad.messages.types[ud],qa.fullField,qa.type))},range $ 2=function(qa,td,rd,nd,ad){var sd=typeof qa.len=="number",ud=typeof qa.min=="number",cd=typeof qa.max=="number",dd=/[ \u D800- \u DBFF][ \u DC00- \u DFFF]/g,pd=td,fd=null,Td=typeof td=="number",Ad=typeof td=="string",Sd=Array.isArray(td);if(Td?fd="number":Ad?fd="string":Sd&&(fd="array"),!fd)return!1;Sd&&(pd=td.length),Ad&&(pd=td.replace(dd,"_").length),sd?pd!==qa.len&&nd.push(format $ 2(ad.messages[fd].len,qa.fullField,qa.len)):ud&&!cd&&pd<qa.min?nd.push(format $ 2(ad.messages[fd].min,qa.fullField,qa.min)):cd&&!ud&&pd>qa.max?nd.push(format $ 2(ad.messages[fd].max,qa.fullField,qa.max)):ud&&cd&&(pd<qa.min||pd>qa.max)&&nd.push(format $ 2(ad.messages[fd].range,qa.fullField,qa.min,qa.max))},ENUM $ 1="enum",enumerable $ 1=function(qa,td,rd,nd,ad){qa[ENUM $ 1]=Array.isArray(qa[ENUM $ 1])?qa[ENUM $ 1]:[],qa[ENUM $ 1].indexOf(td)===-1&&nd.push(format $ 2(ad.messages[ENUM $ 1],qa.fullField,qa[ENUM $ 1].join(", ")))},pattern $ 1=function(qa,td,rd,nd,ad){if(qa.pattern){if(qa.pattern instanceof RegExp)qa.pattern.lastIndex=0,qa.pattern.test(td)||nd.push(format $ 2(ad.messages.pattern.mismatch,qa.fullField,td,qa.pattern));else if(typeof qa.pattern=="string"){var sd=new RegExp(qa.pattern);sd.test(td)||nd.push(format $ 2(ad.messages.pattern.mismatch,qa.fullField,td,qa.pattern))}}},rules={required:required $ 1,whitespace:whitespace $ 2,type:type $ 1 $ 1,range:range $ 2,enum:enumerable $ 1,pattern:pattern $ 1},string=function(qa,td,rd,nd,ad){var sd=[],ud=qa.required||!qa.required&&nd.hasOwnProperty(qa.field);if(ud){if(isEmptyValue(td,"string")&&!qa.required)return rd();rules.required(qa,td,nd,sd,ad,"string"),isEmptyValue(td,"string")||(rules.type(qa,td,nd,sd,ad),rules.range(qa,td,nd,sd,ad),rules.pattern(qa,td,nd,sd,ad),qa.whitespace===!0&
2024-09-18 09:46:23 +08:00
height : 0 ! important ;
visibility : hidden ! important ;
$ { isFirefox ( ) ? "" : "overflow:hidden !important;" }
position : absolute ! important ;
z - index : - 1000 ! important ;
top : 0 ! important ;
right : 0 ! important ;
2024-09-28 20:51:35 +08:00
` ,CONTEXT_STYLE=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function calculateNodeStyling(Ra){const qa=window.getComputedStyle(Ra),td=qa.getPropertyValue("box-sizing"),rd=Number.parseFloat(qa.getPropertyValue("padding-bottom"))+Number.parseFloat(qa.getPropertyValue("padding-top")),nd=Number.parseFloat(qa.getPropertyValue("border-bottom-width"))+Number.parseFloat(qa.getPropertyValue("border-top-width"));return{contextStyle:CONTEXT_STYLE.map(sd=> ` $ { sd } : $ { qa . getPropertyValue ( sd ) } ` ).join(";"),paddingSize:rd,borderSize:nd,boxSizing:td}}function calcTextareaHeight(Ra,qa=1,td){var rd;hiddenTextarea||(hiddenTextarea=document.createElement("textarea"),document.body.appendChild(hiddenTextarea));const{paddingSize:nd,borderSize:ad,boxSizing:sd,contextStyle:ud}=calculateNodeStyling(Ra);hiddenTextarea.setAttribute("style", ` $ { ud } ; $ { HIDDEN _STYLE } ` ),hiddenTextarea.value=Ra.value||Ra.placeholder||"";let cd=hiddenTextarea.scrollHeight;const dd={};sd==="border-box"?cd=cd+ad:sd==="content-box"&&(cd=cd-nd),hiddenTextarea.value="";const pd=hiddenTextarea.scrollHeight-nd;if(isNumber $ 4(qa)){let fd=pd*qa;sd==="border-box"&&(fd=fd+nd+ad),cd=Math.max(fd,cd),dd.minHeight= ` $ { fd } px ` }if(isNumber $ 4(td)){let fd=pd*td;sd==="border-box"&&(fd=fd+nd+ad),cd=Math.min(fd,cd)}return dd.height= ` $ { cd } px ` ,(rd=hiddenTextarea.parentNode)==null||rd.removeChild(hiddenTextarea),hiddenTextarea=void 0,dd}const inputProps=buildProps({id:{type:String,default:void 0},size:useSizeProp,disabled:Boolean,modelValue:{type:definePropType([String,Number,Object]),default:""},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:definePropType([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,showPassword:Boolean,showWordLimit:Boolean,suffixIcon:{type:iconPropType},prefixIcon:{type:iconPropType},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:definePropType([Object,Array,String]),default:()=>mutable({})},autofocus:Boolean,rows:{type:Number,default:2},...useAriaProps(["ariaLabel"])}),inputEmits={[UPDATE_MODEL_EVENT]:Ra=>isString $ 3(Ra),input:Ra=>isString $ 3(Ra),change:Ra=>isString $ 3(Ra),focus:Ra=>Ra instanceof FocusEvent,blur:Ra=>Ra instanceof FocusEvent,clear:()=>!0,mouseleave:Ra=>Ra instanceof MouseEvent,mouseenter:Ra=>Ra instanceof MouseEvent,keydown:Ra=>Ra instanceof Event,compositionstart:Ra=>Ra instanceof CompositionEvent,compositionupdate:Ra=>Ra instanceof CompositionEvent,compositionend:Ra=>Ra instanceof CompositionEvent},__default__ $ s=defineComponent({name:"ElInput",inheritAttrs:!1}),_sfc_main $ 1q=defineComponent({...__default__ $ s,props:inputProps,emits:inputEmits,setup(Ra,{expose:qa,emit:td}){const rd=Ra,nd=useAttrs $ 1(),ad=useSlots(),sd=computed(()=>{const Th={};return rd.containerRole==="combobox"&&(Th["aria-haspopup"]=nd["aria-haspopup"],Th["aria-owns"]=nd["aria-owns"],Th["aria-expanded"]=nd["aria-expanded"]),Th}),ud=computed(()=>[rd.type==="textarea"?Ld.b():Dd.b(),Dd.m(Ad.value),Dd.is("disabled",Sd.value),Dd.is("exceed",Df.value),{[Dd.b("group")]:ad.prepend||ad.append,[Dd.m("prefix")]:ad.prefix||rd.prefixIcon,[Dd.m("suffix")]:ad.suffix||rd.suffixIcon||rd.clearable||rd.showPassword,[Dd.bm("suffix","password-clear")]:Yf.value&&Zf.value,[Dd.b("hidden")]:rd.type==="hidden"},nd.class]),cd=computed(()=>[Dd.e("wrapper"),Dd.is("focus",zd.value)]),dd=useAttrs({excludeKeys:computed(()=>Object.keys(sd.value))}),{form:pd,formItem:fd}=useFormItem(),{inputId:Td}=useFormItemInputId(rd,{formItemContext:fd}),Ad=useFormSize(),Sd=useFormDisabled(),Dd=useNamespace("input"),Ld=useNamespace("textarea"),Rd=shallowRef(),Od=shallowRef(),Md=ref $ 1(!1),jd=ref $ 1(!1
2024-09-18 09:46:23 +08:00
M 50 50
2024-09-25 14:23:53 +08:00
m 0 $ { jd ? "" : "-" } $ { Md }
a $ { Md } $ { Md } 0 1 1 0 $ { jd ? "-" : "" } $ { Md * 2 }
a $ { Md } $ { Md } 0 1 1 0 $ { jd ? "" : "-" } $ { Md * 2 }
2024-09-28 20:51:35 +08:00
` }),cd=computed(()=>2*Math.PI*sd.value),dd=computed(()=>qa.type==="dashboard"?.75:1),pd=computed(()=> ` $ { - 1 * cd . value * ( 1 - dd . value ) / 2 } px ` ),fd=computed(()=>({strokeDasharray: ` $ { cd . value * dd . value } px , $ { cd . value } px ` ,strokeDashoffset:pd.value})),Td=computed(()=>({strokeDasharray: ` $ { cd . value * dd . value * ( qa . percentage / 100 ) } px , $ { cd . value } px ` ,strokeDashoffset:pd.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),Ad=computed(()=>{let Md;return qa.color?Md=Od(qa.percentage):Md=td[qa.status]||td.default,Md}),Sd=computed(()=>qa.status==="warning"?warning_filled_default:qa.type==="line"?qa.status==="success"?circle_check_default:circle_close_default:qa.status==="success"?check_default:close_default),Dd=computed(()=>qa.type==="line"?12+qa.strokeWidth*.4:qa.width*.111111+2),Ld=computed(()=>qa.format(qa.percentage));function Rd(Md){const jd=100/Md.length;return Md.map((Hd,Wd)=>isString $ 3(Hd)?{color:Hd,percentage:(Wd+1)*jd}:Hd).sort((Hd,Wd)=>Hd.percentage-Wd.percentage)}const Od=Md=>{var jd;const{color:Ud}=qa;if(isFunction $ 4(Ud))return Ud(Md);if(isString $ 3(Ud))return Ud;{const Hd=Rd(Ud);for(const Wd of Hd)if(Wd.percentage>Md)return Wd.color;return(jd=Hd[Hd.length-1])==null?void 0:jd.color}};return(Md,jd)=>(openBlock(),createElementBlock("div",{class:normalizeClass([unref(rd).b(),unref(rd).m(Md.type),unref(rd).is(Md.status),{[unref(rd).m("without-text")]:!Md.showText,[unref(rd).m("text-inside")]:Md.textInside}]),role:"progressbar","aria-valuenow":Md.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[Md.type==="line"?(openBlock(),createElementBlock("div",{key:0,class:normalizeClass(unref(rd).b("bar"))},[createBaseVNode("div",{class:normalizeClass(unref(rd).be("bar","outer")),style:normalizeStyle({height: ` $ { Md . strokeWidth } px ` })},[createBaseVNode("div",{class:normalizeClass([unref(rd).be("bar","inner"),{[unref(rd).bem("bar","inner","indeterminate")]:Md.indeterminate},{[unref(rd).bem("bar","inner","striped")]:Md.striped},{[unref(rd).bem("bar","inner","striped-flow")]:Md.stripedFlow}]),style:normalizeStyle(unref(nd))},[(Md.showText||Md. $ slots.default)&&Md.textInside?(openBlock(),createElementBlock("div",{key:0,class:normalizeClass(unref(rd).be("bar","innerText"))},[renderSlot(Md. $ slots,"default",{percentage:Md.percentage},()=>[createBaseVNode("span",null,toDisplayString(unref(Ld)),1)])],2)):createCommentVNode("v-if",!0)],6)],6)],2)):(openBlock(),createElementBlock("div",{key:1,class:normalizeClass(unref(rd).b("circle")),style:normalizeStyle({height: ` $ { Md . width } px ` ,width: ` $ { Md . width } px ` })},[(openBlock(),createElementBlock("svg",{viewBox:"0 0 100 100"},[createBaseVNode("path",{class:normalizeClass(unref(rd).be("circle","track")),d:unref(ud),stroke: ` var ( $ { unref ( rd ) . cssVarName ( "fill-color-light" ) } , # e5e9f2 ) ` ,"stroke-linecap":Md.strokeLinecap,"stroke-width":unref(ad),fill:"none",style:normalizeStyle(unref(fd))},null,14,["d","stroke","stroke-linecap","stroke-width"]),createBaseVNode("path",{class:normalizeClass(unref(rd).be("circle","path")),d:unref(ud),stroke:unref(Ad),fill:"none",opacity:Md.percentage?1:0,"stroke-linecap":Md.strokeLinecap,"stroke-width":unref(ad),style:normalizeStyle(unref(Td))},null,14,["d","stroke","opacity","stroke-linecap","stroke-width"])]))],6)),(Md.showText||Md. $ slots.default)&&!Md.textInside?(openBlock(),createElementBlock("div",{key:2,class:normalizeClass(unref(rd).e("text")),style:normalizeStyle({fontSize: ` $ { unref ( Dd ) } px ` })},[renderSlot(Md. $ slots,"default",{percentage:Md.percentage},()=>[Md.status?(openBlock(),createBlock(unref(ElIcon),{key:1},{default:withCtx(()=>[(openBlock(),createBlock(resolveDynamicComponent(unref(Sd))))]),_:1})):(openBlock(),createElementBlock("span",{key:0},toDisplayString(unref(Ld)),1))])],6)):createCommentVNode("v-if",!0)],10,["aria-valuenow"]))}});var Progress=_export_sfc $ 1(_sfc_main $ Y,[["__file","progress.vue"]]);const ElProgress=withInstall(Progress),switchProps=buildProps({modelValue:{type:[Boolean,String,Number],default:!1},disabled:Boolean,loading:Boolean,size:{type:String,validator:isValidComponentSize},width:{type:[String,Number],default:"
2024-09-18 09:46:23 +08:00
欢迎来到 Markdown 的奇妙世界 ! 无论你是写作爱好者 、 开发者 、 博主 , 还是想要简单记录点什么的人 , Markdown 都能成为你新的好伙伴 。 它不仅让写作变得简单明了 , 还能轻松地将内容转化为漂亮的网页格式 。 今天 , 我们将全面探讨 Markdown 的基础和进阶语法 , 让你在这个过程中充分享受写作的乐趣 !
Markdown 是一种轻量级标记语言 , 用于格式化纯文本 。 它以简单 、 直观的语法而著称 , 可以快速地生成 HTML 。 Markdown 是写作与代码的完美结合 , 既简单又强大 。
# # Markdown 基础语法
# # # 1. 标题 : 让你的内容层次分明
用 \ ` # \` 号来创建标题。标题从 \` # \` 开始,我们最多支持 4 个 \` # \` 号,对应 4 级标题。
\ ` \` \` markdown
# 一级标题
# # 二级标题
# # # 三级标题
# # # # 四级标题
\ ` \` \`
以上代码将渲染出一组层次分明的标题 , 使你的文章井井有条 。
> 标准 Markdown 支持 1 ~ 6 级标题 , 此编辑器也不例外 , 不过我们只准备了四个级别样式 , 同时也是不推荐文章超过四级标题 。
# # # 2. 段落与换行 : 自然流畅
Markdown 中的段落就是一行接一行的文本 。 要创建新段落 , 只需在两行文本之间空一行 。
# # # 3. 字体样式 : 强调你的文字
- * * 粗体 * * : 用两个星号或下划线包裹文字 , 如 \ ` **粗体** \` 或 \` __粗体__ \` 。
- _斜体 _ : 用一个星号或下划线包裹文字 , 如 \ ` *斜体* \` 或 \` _斜体_ \` 。
- ~ ~ 删除线 ~ ~ : 用两个波浪线包裹文字 , 如 \ ` ~~删除线~~ \` 。
这些简单的标记可以让你的内容更有层次感和重点突出 。
# # # 4. 列表 : 整洁有序
- * * 无序列表 * * : 用 \ ` - \` 、 \` * \` 或 \` + \` 加空格开始一行。
- * * 有序列表 * * : 使用数字加点号 ( \ ` 1. \` 、 \` 2. \` )开始一行。
在列表中嵌套其他内容 ? 只需缩进即可实现嵌套效果 。
- 无序列表项 1
1. 嵌套有序列表项 1
2. 嵌套有序列表项 2
- 无序列表项 2
1. 有序列表项 1
2. 有序列表项 2
# # # 5. 链接与图片 : 丰富内容
- * * 链接 * * : 用方括号和圆括号创建链接 \ ` [显示文本](链接地址) \` 。
- * * 图片 * * : 和链接类似 , 只需在前面加上 \ ` ! \` ,如 \` ![描述文本](图片链接) \` 。
[ 访问 Doocs ] ( https : //github.com/doocs)
! [ doocs ] ( https : //cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/logo-2.png)
轻松实现富媒体内容展示 !
> 因微信公众号平台不支持除公众号文章以外的链接 , 故其他平台的链接 , 会呈现链接色泽但不能点击 。
> 对于这些链接请注意明文书写 , 或点击左上角 「 格式 - > 微信外链接转底部引用 」 开启引用 , 这样就可以在底部观察到链接指向 。
# # # 6. 引用 : 引用名言或引人深思的句子
使用 \ ` > \` 来创建引用,只需在文本前面加上它。多层引用?在前一层 \` > \` 后再加一个就行。
> 这是一个引用
>
> > 这是一个嵌套引用
这让你的引用更加富有层次感 。
# # # 7. 代码块 : 展示你的代码
- * * 行内代码 * * : 用反引号包裹 , 如 \ ` code \` 。
- * * 代码块 * * : 用三个反引号包裹 , 并指定语言 , 如 :
\ ` \` \` js
console . log ( "Hello, Doocs!" ) ;
\ ` \` \`
语法高亮让你的代码更易读 。
# # # 8. 分割线 : 分割内容
用三个或更多的 \ ` - \` 、 \` * \` 或 \` _ \` 来创建分割线。
-- -
为你的内容添加视觉分隔 。
# # # 9. 表格 : 清晰展示数据
Markdown 支持简单的表格 , 用 \ ` | \` 和 \` - \` 分隔单元格和表头。
| 项目人员 | 邮箱 | 微信号 |
| -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - | -- -- -- -- -- -- -- -- -- -- -- | -- -- -- -- -- -- |
| [ yanglbme ] ( https : //github.com/yanglbme) | contact@yanglibin.info | YLB0109 |
| [ YangFong ] ( https : //github.com/YangFong) | yangfong2022@gmail.com | yq2419731931 |
| [ thinkasany ] ( https : //github.com/thinkasany) | thinkasany@gmail.com | thinkasany |
这样的表格让数据展示更为清爽 !
> 手动编写标记太麻烦 ? 我们提供了便捷方式 。 左上方点击 「 编辑 - > 插入表格 」 , 即可快速实现表格渲染 。
# # Markdown 进阶技巧
# # # 1. LaTeX 公式 : 完美展示数学表达式
Markdown 允许嵌入 LaTeX 语法展示数学公式 :
- * * 行内公式 * * : 用 \ ` $ \` 包裹公式,如 $ E = mc^2 $ 。
- * * 块级公式 * * : 用 \ ` $ $ \` 包裹公式,如:
$$
\ \ begin { aligned }
d _ { i , j } & \ \ leftarrow d _ { i , j } + 1 \ \ \ \
d _ { i , y + 1 } & \ \ leftarrow d _ { i , y + 1 } - 1 \ \ \ \
d _ { x + 1 , j } & \ \ leftarrow d _ { x + 1 , j } - 1 \ \ \ \
d _ { x + 1 , y + 1 } & \ \ leftarrow d _ { x + 1 , y + 1 } + 1
\ \ end { aligned }
$$
这是展示复杂数学表达的利器 !
# # # 2. Mermaid 流程图 : 可视化流程
Mermaid 是强大的可视化工具 , 可以在 Markdown 中创建流程图 、 时序图等 。
\ ` \` \` mermaid
graph TD ;
A -- > B ;
A -- > C ;
B -- > D ;
C -- > D ;
\ ` \` \`
\ ` \` \` mermaid
pie
title Key elements in Product X
"Calcium" : 42.96
"Potassium" : 50.05
"Magnesium" : 10.01
"Iron" : 5
\ ` \` \`
\ ` \` \` mermaid
pie
title 为什么总是宅在家里 ?
"喜欢宅" : 45
"天气太热" : 70
"穷" : 500
"没人约" : 95
\ ` \` \`
这种方式不仅能直观展示流程 , 还能提升文档的专业性 。
> 更多用法 , 参见 : [ Mermaid User Guide ] ( https : //mermaid.js.org/intro/getting-started.html)。
# # 结语
Markdown 是一种简单 、 强大且易于掌握的标记语言 , 通过学习基础和进阶语法 , 你可以快速创作内容并有效传达信息 。 无论是技术文档 、 个人博客还是项目说明 , Markdown 都是你的得力助手 。 希望这篇文章能够带你全面了解 Markdown 的潜力 , 让你的写作更加丰富多彩 !
现在 , 拿起 Markdown 编辑器 , 开始创作吧 ! 探索 Markdown 的世界 , 你会发现它远比想象中更精彩 !
# # # # 推荐阅读
- [ 阿里又一个 20 k + stars 开源项目诞生 , 恭喜 fastjson ! ] ( https : //mp.weixin.qq.com/s/RNKDCK2KoyeuMeEs6GUrow)
- [ 刷掉 90 % 候选人的互联网大厂海量数据面试题 ( 附题解 + 方法总结 ) ] ( https : //mp.weixin.qq.com/s/rjGqxUvrEqJNlo09GrT1Dw)
- [ 好用 ! 期待已久的文本块功能究竟如何在 Java 13 中发挥作用 ? ] ( https : //mp.weixin.qq.com/s/kalGv5T8AZGxTnLHr2wDsA)
- [ 2019 GitHub 开源贡献排行榜新鲜出炉 ! 微软谷歌领头 , 阿里跻身前 12 ! ] ( https : //mp.weixin.qq.com/s/_q812aGD1b9QvZ2WFI0Qgw)
-- -
< center >
< img src = "https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/1648303220922-7e14aefa-816e-44c1-8604-ade709ca1c69.png" style = "width: 100px;" >
< / c e n t e r >
` ,DEFAULT_CSS_CONTENT= ` / * *
* 按 Alt / Option + Shift + F 可格式化
* 如需使用主题色 , 请使用 var ( -- md - primary - color ) 代替颜色值
* 如 : color : var ( -- md - primary - color ) ;
*
* 召集令 : 如果你有好看的主题样式 , 欢迎分享 , 让更多人能够使用到你的主题 。
2024-09-25 14:23:53 +08:00
* 提交区 : https : //github.com/doocs/md/discussions/426
2024-09-18 09:46:23 +08:00
* /
/* 一级标题样式 */
h1 {
}
/* 二级标题样式 */
h2 {
}
/* 三级标题样式 */
h3 {
}
/* 四级标题样式 */
h4 {
}
/* 图片样式 */
image {
}
/* 引用样式 */
blockquote {
}
/* 引用段落样式 */
blockquote _p {
}
/* 段落样式 */
p {
}
/* 分割线样式 */
hr {
}
/* 行内代码样式 */
codespan {
}
/* 粗体样式 */
strong {
}
/* 链接样式 */
link {
}
/* 微信链接样式 */
wx _link {
}
/* 有序列表样式 */
ol {
}
/* 无序列表样式 */
ul {
}
/* 列表项样式 */
li {
}
/* 代码块样式 */
code {
}
/* 代码块外层样式 */
code _pre {
}
2024-09-25 14:23:53 +08:00
` ,githubConfig={username:"bucketio",repoList:Array.from({length:20},(Ra,qa)=> ` img$ { qa } ` ),branch:"main",accessTokenList:["ghp_sqQg5y7XC7Fy8XdoocsmdVEYRiRiTZPvbwzTL4MRjQc","ghp_jB5JXzBjpGbgzdoocsmdogWfSHhfCKGVstozw1cAsPv","ghp_zvy8wkHo259g7doocsmdJnUKOQd1WO1SPzZ9G0O9cJD","ghp_DnCJc2Ms0RVZ1doocsmdiWOAN78FurfSeD1Pv2Y28pO","ghp_EsMYDv9WVjXWP5doocsmd1nnDml2DEP95rOiz44bSo0","ghp_L4isHf01nllOOdoocsmdHBGoDG6jscCA09WV44QDvlg","ghp_qWciwYXHPakAUGdoocsmdBOBZdRcV08JThKey3mBZNJ","ghp_rxkvIO08wVL2DMdoocsmd2jDEhcatp2rfVyhd3A7RiS","ghp_1RvkWKboSxr0yVdoocsmd7OtBCpecYwoV6deh3utifJ","ghp_cduanDnAug60ngdoocsmdF1uDstXUi6S9RMhY1qdada","ghp_q6mxuJIkqAcsCXdoocsmdkkjWvzGlMVRuy5zI0IWNDx","ghp_Pv4npPeJpChKFMTdoocsmdCQneopUcqJrqrjl3vrt9A","ghp_gKMCFqMaQiLTqhjdoocsmd7BJE8RyK6AdRw4b42CutS","ghp_2oShgb33qFlqBmadoocsmdludmuLYxBFY5bao1XrsVo","ghp_eYyd3kxWTZmsV8doocsmdDFbAa7AEGQTJgmOd0GUmtY"]},giteeConfig={username:"filesss",repoList:Array.from({length:20},(Ra,qa)=> ` img$ { qa } ` ),branch:"main",accessTokenList:["ed5fc9866bd6c2fdoocsmddd433f806fd2f399c","5448ffebbbf1151doocsmdc4e337cf814fc8a62","25b05efd2557ca2doocsmd75b5c0835e3395911","11628c7a5aef015doocsmd2eeff9fb9566f0458","cb2f5145ed938dedoocsmdbd063b4ed244eecf8","d8c0b57500672c1doocsmd55f48b866b5ebcd98","78c56eadb88e453doocsmd43ddd95753351771a","03e1a688003948fdoocsmda16fcf41e6f03f1f0","c49121cf4d191fbdoocsmdd6a7877ed537e474a","adfeb2fadcdc4aadoocsmdfe1ee869ac9c968ff","116c94549ca4a0ddoocsmd192653af5c0694616","ecf30ed7f2eb184doocsmd51ea4ec8300371d9e","5837cf2bd5afd93doocsmd73904bed31934949e","b5b7e1c7d57e01fdoocsmd5266f552574297d78","684d55564ffbd0bdoocsmd7d747e5cc23aed6d6","3fc04a9d272ab71doocsmd010c56cb57d88d2ba"]},fontFamilyOptions=[{label:"无衬线",value:"-apple-system-font,BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB , Microsoft YaHei UI , Microsoft YaHei ,Arial,sans-serif",desc:"字体123Abc"},{label:"衬线",value:"Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif",desc:"字体123Abc"},{label:"等宽",value:"Menlo, Monaco, 'Courier New', monospace",desc:"字体123Abc"}],fontSizeOptions=[{label:"12px",value:"12px",desc:"更小"},{label:"13px",value:"13px",desc:"稍小"},{label:"14px",value:"14px",desc:"推荐"},{label:"15px",value:"15px",desc:"稍大"},{label:"16px",value:"16px",desc:"更大"}],colorOptions=[{label:"经典蓝",value:"#0F4C81",desc:"稳重冷静"},{label:"翡翠绿",value:"#009874",desc:"自然平衡"},{label:"活力橘",value:"#FA5151",desc:"热情活力"},{label:"柠檬黄",value:"#FECE00",desc:"明亮温暖"},{label:"薰衣紫",value:"#92617E",desc:"优雅神秘"},{label:"天空蓝",value:"#55C9EA",desc:"清爽自由"},{label:"玫瑰金",value:"#B76E79",desc:"奢华现代"},{label:"橄榄绿",value:"#556B2F",desc:"沉稳自然"},{label:"石墨黑",value:"#333333",desc:"内敛极简"},{label:"雾烟灰",value:"#A9A9A9",desc:"柔和低调"},{label:"樱花粉",value:"#FFB7C5",desc:"浪漫甜美"}],codeBlockUrlPrefix="https://cdn.bootcdn.net/ajax/libs/highlight.js/11.10.0/styles/",codeBlockThemeList=["1c-light.min.css","a11y-dark.min.css","a11y-light.min.css","agate.min.css","an-old-hope.min.css","androidstudio.min.css","arduino-light.min.css","arta.min.css","ascetic.min.css","atom-one-dark-reasonable.min.css","atom-one-dark.min.css","atom-one-light.min.css","brown-paper.min.css","codepen-embed.min.css","color-brewer.min.css","dark.min.css","default.min.css","devibeans.min.css","docco.min.css","far.min.css","felipec.min.css","foundation.min.css","github-dark-dimmed.min.css","github-dark.min.css","github.min.css","gml.min.css","googlecode.min.css","gradient-dark.min.css","gradient-light.min.css","grayscale.min.css","hybrid.min.css","idea.min.css","intellij-light.min.css","ir-black.min.css","isbl-editor-dark.min.css","isbl-editor-light.min.css","kimbie-dark.min.css","kimbie-light.min.css","lightfair.min.css","lioshi.min.css","magula.min.css","mono-blue.min.css","monokai-sublime.min.css","monokai.min.css","night-owl.min.css","nnfx-dark.min.css","nnfx-light.min.css","nord.min.css","
2024-09-18 09:46:23 +08:00
* The buffer module from node . js , for the browser .
*
* @ author Feross Aboukhadijeh < https : //feross.org>
* @ license MIT
2024-09-28 20:51:35 +08:00
* / ( f u n c t i o n ( R a ) { c o n s t q a = b a s e 6 4 J s $ 1 , t d = i e e e 7 5 4 $ 1 , r d = t y p e o f S y m b o l = = " f u n c t i o n " & & t y p e o f S y m b o l . f o r = = " f u n c t i o n " ? S y m b o l . f o r ( " n o d e j s . u t i l . i n s p e c t . c u s t o m " ) : n u l l ; R a . B u f f e r = p d , R a . S l o w B u f f e r = U d , R a . I N S P E C T _ M A X _ B Y T E S = 5 0 ; c o n s t n d = 2 1 4 7 4 8 3 6 4 7 ; R a . k M a x L e n g t h = n d ; c o n s t { U i n t 8 A r r a y : a d , A r r a y B u f f e r : s d , S h a r e d A r r a y B u f f e r : u d } = g l o b a l T h i s ; p d . T Y P E D _ A R R A Y _ S U P P O R T = c d ( ) , ! p d . T Y P E D _ A R R A Y _ S U P P O R T & & t y p e o f c o n s o l e < " u " & & t y p e o f c o n s o l e . e r r o r = = " f u n c t i o n " & & c o n s o l e . e r r o r ( " T h i s b r o w s e r l a c k s t y p e d a r r a y ( U i n t 8 A r r a y ) s u p p o r t w h i c h i s r e q u i r e d b y ` b u f f e r ` v 5 . x . U s e ` b u f f e r ` v 4 . x i f y o u r e q u i r e o l d b r o w s e r s u p p o r t . " ) ; f u n c t i o n c d ( ) { t r y { c o n s t r h = n e w a d ( 1 ) , I f = { f o o : f u n c t i o n ( ) { r e t u r n 4 2 } } ; r e t u r n O b j e c t . s e t P r o t o t y p e O f ( I f , a d . p r o t o t y p e ) , O b j e c t . s e t P r o t o t y p e O f ( r h , I f ) , r h . f o o ( ) = = = 4 2 } c a t c h { r e t u r n ! 1 } } O b j e c t . d e f i n e P r o p e r t y ( p d . p r o t o t y p e , " p a r e n t " , { e n u m e r a b l e : ! 0 , g e t : f u n c t i o n ( ) { i f ( p d . i s B u f f e r ( t h i s ) ) r e t u r n t h i s . b u f f e r } } ) , O b j e c t . d e f i n e P r o p e r t y ( p d . p r o t o t y p e , " o f f s e t " , { e n u m e r a b l e : ! 0 , g e t : f u n c t i o n ( ) { i f ( p d . i s B u f f e r ( t h i s ) ) r e t u r n t h i s . b y t e O f f s e t } } ) ; f u n c t i o n d d ( r h ) { i f ( r h > n d ) t h r o w n e w R a n g e E r r o r ( ' T h e v a l u e " ' + r h + ' " i s i n v a l i d f o r o p t i o n " s i z e " ' ) ; c o n s t I f = n e w a d ( r h ) ; r e t u r n O b j e c t . s e t P r o t o t y p e O f ( I f , p d . p r o t o t y p e ) , I f } f u n c t i o n p d ( r h , I f , N f ) { i f ( t y p e o f r h = = " n u m b e r " ) { i f ( t y p e o f I f = = " s t r i n g " ) t h r o w n e w T y p e E r r o r ( ' T h e " s t r i n g " a r g u m e n t m u s t b e o f t y p e s t r i n g . R e c e i v e d t y p e n u m b e r ' ) ; r e t u r n S d ( r h ) } r e t u r n f d ( r h , I f , N f ) } p d . p o o l S i z e = 8 1 9 2 ; f u n c t i o n f d ( r h , I f , N f ) { i f ( t y p e o f r h = = " s t r i n g " ) r e t u r n D d ( r h , I f ) ; i f ( s d . i s V i e w ( r h ) ) r e t u r n R d ( r h ) ; i f ( r h = = n u l l ) t h r o w n e w T y p e E r r o r ( " T h e f i r s t a r g u m e n t m u s t b e o n e o f t y p e s t r i n g , B u f f e r , A r r a y B u f f e r , A r r a y , o r A r r a y - l i k e O b j e c t . R e c e i v e d t y p e " + t y p e o f r h ) ; i f ( T h ( r h , s d ) | | r h & & T h ( r h . b u f f e r , s d ) | | t y p e o f u d < " u " & & ( T h ( r h , u d ) | | r h & & T h ( r h . b u f f e r , u d ) ) ) r e t u r n O d ( r h , I f , N f ) ; i f ( t y p e o f r h = = " n u m b e r " ) t h r o w n e w T y p e E r r o r ( ' T h e " v a l u e " a r g u m e n t m u s t n o t b e o f t y p e n u m b e r . R e c e i v e d t y p e n u m b e r ' ) ; c o n s t Q f = r h . v a l u e O f & & r h . v a l u e O f ( ) ; i f ( Q f ! = n u l l & & Q f ! = = r h ) r e t u r n p d . f r o m ( Q f , I f , N f ) ; c o n s t o h = M d ( r h ) ; i f ( o h ) r e t u r n o h ; i f ( t y p e o f S y m b o l < " u " & & S y m b o l . t o P r i m i t i v e ! = n u l l & & t y p e o f r h [ S y m b o l . t o P r i m i t i v e ] = = " f u n c t i o n " ) r e t u r n p d . f r o m ( r h [ S y m b o l . t o P r i m i t i v e ] ( " s t r i n g " ) , I f , N f ) ; t h r o w n e w T y p e E r r o r ( " T h e f i r s t a r g u m e n t m u s t b e o n e o f t y p e s t r i n g , B u f f e r , A r r a y B u f f e r , A r r a y , o r A r r a y - l i k e O b j e c t . R e c e i v e d t y p e " + t y p e o f r h ) } p d . f r o m = f u n c t i o n ( r h , I f , N f ) { r e t u r n f d ( r h , I f , N f ) } , O b j e c t . s e t P r o t o t y p e O f ( p d . p r o t o t y p e , a d . p r o t o t y p e ) , O b j e c t . s e t P r o t o t y p e O f ( p d , a d ) ; f u n c t i o n T d ( r h ) { i f ( t y p e o f r h ! = " n u m b e r " ) t h r o w n e w T y p e E r r o r ( ' " s i z e " a r g u m e n t m u s t b e o f t y p e n u m b e r ' ) ; i f ( r h < 0 ) t h r o w n e w R a n g e E r r o r ( ' T h e v a l u e " ' + r h + ' " i s i n v a l i d f o r o p t i o n " s i z e " ' ) } f u n c t i o n A d ( r h , I f , N f ) { r e t u r n T d ( r h ) , r h < = 0 ? d d ( r h ) : I f ! = = v o i d 0 ? t y p e o f N f = = " s t r i n g " ? d d ( r h ) . f i l l ( I f , N f ) : d d ( r h ) . f i l l ( I f ) : d d ( r h ) } p d . a l l o c = f u n c t i o n ( r h , I f , N f ) { r e t u r n A d ( r h , I f , N f ) } ; f u n c t i o n S d ( r h ) { r e t u r n T d ( r h ) , d d ( r h < 0 ? 0 : j d ( r h ) | 0 ) } p d . a l l o c U n s a f e = f u n c t i o n ( r h ) { r e t u r n S d ( r h ) } , p d . a l l o c U n s a f e S l o w = f u n c t i o n ( r h ) { r e t u r n S d ( r h ) } ; f u n c t i o n D d ( r h , I f ) { i f ( ( t y p e o f I f ! = " s t r i n g " | | I f = = = " " ) & & ( I f = " u t f 8 " ) , ! p d . i s E n c o d i n g ( I f ) ) t h r o w n e w T y p e E r r o r ( " U n k n o w n e n c o d i n g : " + I f ) ; c o n s t N f = H d ( r h , I f ) | 0 ; l e t Q f = d d ( N f ) ; c o n s t o h = Q f . w r i t e ( r h , I f ) ; r e t u r n o h ! = = N f & & ( Q f = Q f . s l i c e ( 0 , o h ) ) , Q f } f u n c t i o n L d ( r h ) { c o n s t I f = r h . l e n g t h < 0 ? 0 : j d ( r h . l e n g t h ) | 0 , N f = d d ( I f ) ; f o r ( l e t Q f = 0 ; Q f < I f ; Q f + = 1 ) N f [ Q f ] = r h [ Q f ] & 2 5 5 ; r e t u r n N f } f u n c t i o n R d ( r h ) { i f ( T h ( r h , a d ) ) { c o n s t I f = n e w a d ( r h ) ; r e t u r n O d ( I f . b u f f e r , I f . b y t e O f f s e t , I f . b y t e L e n g t h ) } r e t u r n L d ( r h ) } f u n c t i o n O d ( r h , I f , N f ) { i f ( I f < 0 | | r h . b y t e L e n g t h < I f ) t h r o w n e w R a n g e E r r o r ( ' " o f f s e t " i s o u t s i d e o f b u f f e r b o u n d s ' ) ; i f ( r h . b y t e L e n g t h < I f + ( N f | | 0 ) ) t h r o w n e w R a n g e E r r o r ( ' " l e n g t h " i s o u t s i d e o f b u f f e r b o u n d s ' ) ; l e t Q f ; r e t u r n I f = = = v o i d 0 & & N f = = = v o i d 0 ? Q f = n e w a d ( r h ) : N f = = = v o i d 0 ? Q f = n e w a d ( r h , I f ) : Q f = n e w a d ( r h , I f , N f ) , O b j e c t . s e t P r o t o t y p e O f ( Q f , p d . p r o t o t y p e ) , Q f } f u n c t i o n M d ( r h ) { i f ( p d . i s B u f f e r ( r h ) ) { c o n s t I f = j d ( r h . l e n g t h ) | 0 , N f = d d ( I f ) ; r e t u r n N f . l e n g t h = = = 0 | | r h . c o p y ( N f , 0 , 0 , I f ) , N f } i f ( r h . l e n g t h ! = = v o i d 0 ) r e t u r n t y p e o f r h . l e n g t h ! = " n u m b e r " | | V h ( r h . l e n g t h ) ? d d ( 0 ) : L d ( r h ) ; i f ( r h . t y p e = = = " B u f f e r " & & A r r a y . i s A r r a y ( r h . d a t a ) ) r e t u r n L d ( r h . d a t a ) } f u n c t i o n j d ( r h ) { i f ( r h > = n d ) t h r o w n e w R a n g e E r r o r ( " A t t e m p t t o a l l o c a t e B u f f e r l a r g e r t h a n m a x i m u m s i z e : 0 x " + n d . t o S t r i n g ( 1 6 ) + " b y t e s " ) ; r e t u r n r h | 0 } f u n c t i o n U d ( r h ) { r e t u r n + r h !
2024-09-25 14:23:53 +08:00
` :getText(Ra.children):isCDATA(Ra)?getText(Ra.children):isText(Ra)?Ra.data:""}function textContent(Ra){return Array.isArray(Ra)?Ra.map(textContent).join(""):hasChildren(Ra)&&!isComment $ 1(Ra)?textContent(Ra.children):isText(Ra)?Ra.data:""}function innerText(Ra){return Array.isArray(Ra)?Ra.map(innerText).join(""):hasChildren(Ra)&&(Ra.type===ElementType.Tag||isCDATA(Ra))?innerText(Ra.children):isText(Ra)?Ra.data:""}function getChildren(Ra){return hasChildren(Ra)?Ra.children:[]}function getParent(Ra){return Ra.parent||null}function getSiblings(Ra){const qa=getParent(Ra);if(qa!=null)return getChildren(qa);const td=[Ra];let{prev:rd,next:nd}=Ra;for(;rd!=null;)td.unshift(rd),{prev:rd}=rd;for(;nd!=null;)td.push(nd),{next:nd}=nd;return td}function getAttributeValue(Ra,qa){var td;return(td=Ra.attribs)===null||td===void 0?void 0:td[qa]}function hasAttrib(Ra,qa){return Ra.attribs!=null&&Object.prototype.hasOwnProperty.call(Ra.attribs,qa)&&Ra.attribs[qa]!=null}function getName(Ra){return Ra.name}function nextElementSibling(Ra){let{next:qa}=Ra;for(;qa!==null&&!isTag(qa);)({next:qa}=qa);return qa}function prevElementSibling(Ra){let{prev:qa}=Ra;for(;qa!==null&&!isTag(qa);)({prev:qa}=qa);return qa}function removeElement(Ra){if(Ra.prev&&(Ra.prev.next=Ra.next),Ra.next&&(Ra.next.prev=Ra.prev),Ra.parent){const qa=Ra.parent.children,td=qa.lastIndexOf(Ra);td>=0&&qa.splice(td,1)}Ra.next=null,Ra.prev=null,Ra.parent=null}function replaceElement(Ra,qa){const td=qa.prev=Ra.prev;td&&(td.next=qa);const rd=qa.next=Ra.next;rd&&(rd.prev=qa);const nd=qa.parent=Ra.parent;if(nd){const ad=nd.children;ad[ad.lastIndexOf(Ra)]=qa,Ra.parent=null}}function appendChild(Ra,qa){if(removeElement(qa),qa.next=null,qa.parent=Ra,Ra.children.push(qa)>1){const td=Ra.children[Ra.children.length-2];td.next=qa,qa.prev=td}else qa.prev=null}function append $ 3(Ra,qa){removeElement(qa);const{parent:td}=Ra,rd=Ra.next;if(qa.next=rd,qa.prev=Ra,Ra.next=qa,qa.parent=td,rd){if(rd.prev=qa,td){const nd=td.children;nd.splice(nd.lastIndexOf(rd),0,qa)}}else td&&td.children.push(qa)}function prependChild(Ra,qa){if(removeElement(qa),qa.parent=Ra,qa.prev=null,Ra.children.unshift(qa)!==1){const td=Ra.children[1];td.prev=qa,qa.next=td}else qa.next=null}function prepend $ 1(Ra,qa){removeElement(qa);const{parent:td}=Ra;if(td){const rd=td.children;rd.splice(rd.indexOf(Ra),0,qa)}Ra.prev&&(Ra.prev.next=qa),qa.parent=td,qa.prev=Ra.prev,qa.next=Ra,Ra.prev=qa}function filter $ 5(Ra,qa,td=!0,rd=1/0){return find $ 3(Ra,Array.isArray(qa)?qa:[qa],td,rd)}function find $ 3(Ra,qa,td,rd){const nd=[],ad=[qa],sd=[0];for(;;){if(sd[0]>=ad[0].length){if(sd.length===1)return nd;ad.shift(),sd.shift();continue}const ud=ad[0][sd[0]++];if(Ra(ud)&&(nd.push(ud),--rd<=0))return nd;td&&hasChildren(ud)&&ud.children.length>0&&(sd.unshift(0),ad.unshift(ud.children))}}function findOneChild(Ra,qa){return qa.find(Ra)}function findOne(Ra,qa,td=!0){let rd=null;for(let nd=0;nd<qa.length&&!rd;nd++){const ad=qa[nd];if(isTag(ad))Ra(ad)?rd=ad:td&&ad.children.length>0&&(rd=findOne(Ra,ad.children,!0));else continue}return rd}function existsOne(Ra,qa){return qa.some(td=>isTag(td)&&(Ra(td)||existsOne(Ra,td.children)))}function findAll(Ra,qa){const td=[],rd=[qa],nd=[0];for(;;){if(nd[0]>=rd[0].length){if(rd.length===1)return td;rd.shift(),nd.shift();continue}const ad=rd[0][nd[0]++];isTag(ad)&&(Ra(ad)&&td.push(ad),ad.children.length>0&&(nd.unshift(0),rd.unshift(ad.children)))}}const Checks={tag_name(Ra){return typeof Ra=="function"?qa=>isTag(qa)&&Ra(qa.name):Ra==="*"?isTag:qa=>isTag(qa)&&qa.name===Ra},tag_type(Ra){return typeof Ra=="function"?qa=>Ra(qa.type):qa=>qa.type===Ra},tag_contains(Ra){return typeof Ra=="function"?qa=>isText(qa)&&Ra(qa.data):qa=>isText(qa)&&qa.data===Ra}};function getAttribCheck(Ra,qa){return typeof qa=="function"?td=>isTag(td)&&qa(td.attribs[Ra]):td=>isTag(td)&&td.attribs[Ra]===qa}function combineFuncs(Ra,qa){return td=>Ra(td)||qa(td)}function compileTest(Ra){const qa=Object.keys(Ra).map(td=>{const rd=Ra[td];return Object.prototype.hasOwnProperty.call(Checks,td)?Checks[td](rd):getAttribCheck(td,rd)});return qa.length===0?null:qa
2024-09-18 09:46:23 +08:00
: is ( button , input , select , textarea , optgroup , option ) [ disabled ] ,
optgroup [ disabled ] > option ,
fieldset [ disabled ] : not ( fieldset [ disabled ] legend : first - of - type * )
2024-09-25 14:23:53 +08:00
) ` ,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"},PLACEHOLDER_ELEMENT={};function ensureIsTag(Ra,qa){return Ra===boolbase $ 1.falseFunc?boolbase $ 1.falseFunc:td=>qa.isTag(td)&&Ra(td)}function getNextSiblings(Ra,qa){const td=qa.getSiblings(Ra);if(td.length<=1)return[];const rd=td.indexOf(Ra);return rd<0||rd===td.length-1?[]:td.slice(rd+1).filter(qa.isTag)}function copyOptions(Ra){return{xmlMode:!!Ra.xmlMode,lowerCaseAttributeNames:!!Ra.lowerCaseAttributeNames,lowerCaseTags:!!Ra.lowerCaseTags,quirksMode:!!Ra.quirksMode,cacheResults:!!Ra.cacheResults,pseudos:Ra.pseudos,adapter:Ra.adapter,equals:Ra.equals}}const is $ 3=(Ra,qa,td,rd,nd)=>{const ad=nd(qa,copyOptions(td),rd);return ad===boolbase $ 1.trueFunc?Ra:ad===boolbase $ 1.falseFunc?boolbase $ 1.falseFunc:sd=>ad(sd)&&Ra(sd)},subselects={is:is $ 3,matches:is $ 3,where:is $ 3,not(Ra,qa,td,rd,nd){const ad=nd(qa,copyOptions(td),rd);return ad===boolbase $ 1.falseFunc?Ra:ad===boolbase $ 1.trueFunc?boolbase $ 1.falseFunc:sd=>!ad(sd)&&Ra(sd)},has(Ra,qa,td,rd,nd){const{adapter:ad}=td,sd=copyOptions(td);sd.relativeSelector=!0;const ud=qa.some(pd=>pd.some(isTraversal))?[PLACEHOLDER_ELEMENT]:void 0,cd=nd(qa,sd,ud);if(cd===boolbase $ 1.falseFunc)return boolbase $ 1.falseFunc;const dd=ensureIsTag(cd,ad);if(ud&&cd!==boolbase $ 1.trueFunc){const{shouldTestNextSiblings:pd=!1}=cd;return fd=>{if(!Ra(fd))return!1;ud[0]=fd;const Td=ad.getChildren(fd),Ad=pd?[...Td,...getNextSiblings(fd,ad)]:Td;return ad.existsOne(dd,Ad)}}return pd=>Ra(pd)&&ad.existsOne(dd,ad.getChildren(pd))}};function compilePseudoSelector(Ra,qa,td,rd,nd){var ad;const{name:sd,data:ud}=qa;if(Array.isArray(ud)){if(!(sd in subselects))throw new Error( ` Unknown pseudo - class : $ { sd } ( $ { ud } ) ` );return subselects[sd](Ra,ud,td,rd,nd)}const cd=(ad=td.pseudos)===null||ad===void 0?void 0:ad[sd],dd=typeof cd=="string"?cd:aliases[sd];if(typeof dd=="string"){if(ud!=null)throw new Error( ` Pseudo $ { sd } doesn ' t have any arguments ` );const pd=parse $ 7(dd);return subselects.is(Ra,pd,td,rd,nd)}if(typeof cd=="function")return verifyPseudoArgs(cd,sd,ud,1),pd=>cd(pd,ud)&&Ra(pd);if(sd in filters)return filters[sd](Ra,ud,td,rd);if(sd in pseudos){const pd=pseudos[sd];return verifyPseudoArgs(pd,sd,ud,2),fd=>pd(fd,td,ud)&&Ra(fd)}throw new Error( ` Unknown pseudo - class : $ { sd } ` )}function getElementParent(Ra,qa){const td=qa.getParent(Ra);return td&&qa.isTag(td)?td:null}function compileGeneralSelector(Ra,qa,td,rd,nd){const{adapter:ad,equals:sd}=td;switch(qa.type){case SelectorType.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case SelectorType.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case SelectorType.Attribute:{if(qa.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return(!td.xmlMode||td.lowerCaseAttributeNames)&&(qa.name=qa.name.toLowerCase()),attributeRules[qa.action](Ra,qa,td)}case SelectorType.Pseudo:return compilePseudoSelector(Ra,qa,td,rd,nd);case SelectorType.Tag:{if(qa.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:ud}=qa;return(!td.xmlMode||td.lowerCaseTags)&&(ud=ud.toLowerCase()),function(dd){return ad.getName(dd)===ud&&Ra(dd)}}case SelectorType.Descendant:{if(td.cacheResults===!1||typeof WeakSet>"u")return function(dd){let pd=dd;for(;pd=getElementParent(pd,ad);)if(Ra(pd))return!0;return!1};const ud=new WeakSet;return function(dd){let pd=dd;for(;pd=getElementParent(pd,ad);)if(!ud.has(
` )})):{name:nd,value:ad.replace(rCRLF, ` \ r
2024-09-28 21:10:55 +08:00
` )}}).toArray()}const Forms=Object.freeze(Object.defineProperty({__proto__:null,serialize:serialize $ 1,serializeArray},Symbol.toStringTag,{value:"Module"}));function getExtractDescr(Ra){var qa;return typeof Ra=="string"?{selector:Ra,value:"textContent"}:{selector:Ra.selector,value:(qa=Ra.value)!==null&&qa!==void 0?qa:"textContent"}}function extract(Ra){const qa={};for(const td in Ra){const rd=Ra[td],nd=Array.isArray(rd),{selector:ad,value:sd}=getExtractDescr(nd?rd[0]:rd),ud=typeof sd=="function"?sd:typeof sd=="string"?cd=>this._make(cd).prop(sd):cd=>this._make(cd).extract(sd);if(nd)qa[td]=this._findBySelector(ad,Number.POSITIVE_INFINITY).map((cd,dd)=>ud(dd,td,qa)).get();else{const cd=this._findBySelector(ad,1);qa[td]=cd.length>0?ud(cd[0],td,qa):void 0}}return qa}const Extract=Object.freeze(Object.defineProperty({__proto__:null,extract},Symbol.toStringTag,{value:"Module"}));class Cheerio{constructor(qa,td,rd){if(this.length=0,this.options=rd,this._root=td,qa){for(let nd=0;nd<qa.length;nd++)this[nd]=qa[nd];this.length=qa.length}}}Cheerio.prototype.cheerio="[cheerio object]";Cheerio.prototype.splice=Array.prototype.splice;Cheerio.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator];Object.assign(Cheerio.prototype,Attributes,Traversing,Manipulation,Css,Forms,Extract);function getLoad(Ra,qa){return function td(rd,nd,ad=!0){if(rd==null)throw new Error("cheerio.load() expects a string");const sd=flattenOptions(nd),ud=Ra(rd,sd,ad,null);class cd extends Cheerio{_make(fd,Td){const Ad=dd(fd,Td);return Ad.prevObject=this,Ad}_parse(fd,Td,Ad,Sd){return Ra(fd,Td,Ad,Sd)}_render(fd){return qa(fd,this.options)}}function dd(pd,fd,Td=ud,Ad){if(pd&&isCheerio(pd))return pd;const Sd=flattenOptions(Ad,sd),Dd=typeof Td=="string"?[Ra(Td,Sd,!1,null)]:"length"in Td?Td:[Td],Ld=isCheerio(Dd)?Dd:new cd(Dd,null,Sd);if(Ld._root=Ld,!pd)return new cd(void 0,Ld,Sd);const Rd=typeof pd=="string"&&isHtml(pd)?Ra(pd,Sd,!1,null).children:isNode $ 1(pd)?[pd]:Array.isArray(pd)?pd:void 0,Od=new cd(Rd,Ld,Sd);if(Rd)return Od;if(typeof pd!="string")throw new TypeError("Unexpected type of selector");let Md=pd;const jd=fd?typeof fd=="string"?isHtml(fd)?new cd([Ra(fd,Sd,!1,null)],Ld,Sd):(Md= ` $ { fd } $ { Md } ` ,Ld):isCheerio(fd)?fd:new cd(Array.isArray(fd)?fd:[fd],Ld,Sd):Ld;return jd?jd.find(Md):Od}return Object.assign(dd,staticMethods,{load:td,_root:ud,_options:sd,fn:cd.prototype,prototype:cd.prototype}),dd}}function isNode $ 1(Ra){return!!Ra.name||Ra.type==="root"||Ra.type==="text"||Ra.type==="comment"}const UNDEFINED_CODE_POINTS=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),REPLACEMENT_CHARACTER="<22> ";var CODE_POINTS;(function(Ra){Ra[Ra.EOF=-1]="EOF",Ra[Ra.NULL=0]="NULL",Ra[Ra.TABULATION=9]="TABULATION",Ra[Ra.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",Ra[Ra.LINE_FEED=10]="LINE_FEED",Ra[Ra.FORM_FEED=12]="FORM_FEED",Ra[Ra.SPACE=32]="SPACE",Ra[Ra.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",Ra[Ra.QUOTATION_MARK=34]="QUOTATION_MARK",Ra[Ra.NUMBER_SIGN=35]="NUMBER_SIGN",Ra[Ra.AMPERSAND=38]="AMPERSAND",Ra[Ra.APOSTROPHE=39]="APOSTROPHE",Ra[Ra.HYPHEN_MINUS=45]="HYPHEN_MINUS",Ra[Ra.SOLIDUS=47]="SOLIDUS",Ra[Ra.DIGIT_0=48]="DIGIT_0",Ra[Ra.DIGIT_9=57]="DIGIT_9",Ra[Ra.SEMICOLON=59]="SEMICOLON",Ra[Ra.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",Ra[Ra.EQUALS_SIGN=61]="EQUALS_SIGN",Ra[Ra.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",Ra[Ra.QUESTION_MARK=63]="QUESTION_MARK",Ra[Ra.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",Ra[Ra.LATIN_CAPITAL_F=70]="LATIN_CAPITAL_F",Ra[Ra.LATIN_CAPITAL_X=88]="LATIN_CAPITAL_X",Ra[Ra.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",Ra[Ra.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",Ra[Ra.GRAVE_ACCENT=96]="GRAVE_ACCENT",Ra[Ra.LATIN_SMALL_A=97]="LATIN_SMALL_A",Ra[Ra.LATIN_SMALL_F=102]="LATIN_SMALL_F",Ra[Ra.LATIN_SMALL_X=120]="LATIN_SMALL_X",Ra[Ra.LATIN_SMALL_Z=122]="LATIN_SMALL_Z",Ra[Ra.REPLACEMENT_CHARACTER=65533]="REPLACEMENT_CHARACTER"})(CODE_POINTS=CODE_POINTS||(CODE_POINTS={}));const SEQUENC
2024-09-28 20:51:35 +08:00
` )}})(debug);var debugExports=debug.exports;(function(Ra,qa){debugExports("lex"),Ra.exports=td;function td(rd){var nd="",ad,sd=0,ud=-1,cd=0,dd=1,pd="before-selector",fd=[pd],Td={},Ad=[],Sd=["media","keyframes",{name:"-webkit-keyframes",type:"keyframes",prefix:"-webkit-"},{name:"-moz-keyframes",type:"keyframes",prefix:"-moz-"},{name:"-ms-keyframes",type:"keyframes",prefix:"-ms-"},{name:"-o-keyframes",type:"keyframes",prefix:"-o-"},"font-face",{name:"import",state:"before-at-value"},{name:"charset",state:"before-at-value"},"supports","viewport",{name:"namespace",state:"before-at-value"},"document",{name:"-moz-document",type:"document",prefix:"-moz-"},"page"];function Dd(){return Zd(),rd[ud]}function Ld(xf){return xf?fd[fd.length-1-xf]:pd}function Rd(xf){var Bf=ud+1;return xf===rd.slice(Bf,Bf+xf.length)}function Od(xf){var Bf=rd.slice(ud).indexOf(xf);return Bf>0?Bf:!1}function Md(xf){return xf===jd(1)}function jd(xf){return rd[ud+(xf||1)]}function Ud(){var xf=fd.pop();return pd=fd[fd.length-1],xf}function Hd(xf){return pd=xf,fd.push(pd),fd.length}function Wd(xf){var Bf=pd;return fd[fd.length-1]=pd=xf,Bf}function Zd(xf){if((xf||1)==1)rd[ud]== `
2024-09-25 14:23:53 +08:00
` ?(dd++,sd=1):sd++,ud++;else{var Bf=rd.slice(ud,ud+xf).split( `
2024-09-28 20:51:35 +08:00
` );Bf.length>1&&(dd+=Bf.length-1,sd=1),sd+=Bf[Bf.length-1].length,ud=ud+xf}}function zd(){Td.end={line:dd,col:sd},Ad.push(Td),nd="",Td={}}function Qd(xf){Td={type:xf,start:{line:dd,col:sd}}}for(;ad=Dd();)switch(ad){case" ":switch(Ld()){case"selector":case"value":case"value-paren":case"at-group":case"at-value":case"comment":case"double-string":case"single-string":nd+=ad;break}break;case `
2024-09-25 14:23:53 +08:00
` :case" ":case" \r ":case" \f ":switch(Ld()){case"value":case"value-paren":case"at-group":case"comment":case"single-string":case"double-string":case"selector":nd+=ad;break;case"at-value":ad=== `
2024-09-28 20:51:35 +08:00
` &&(Td.value=nd.trim(),zd(),Ud());break}break;case":":switch(Ld()){case"name":Td.name=nd.trim(),nd="",Wd("before-value");break;case"before-selector":nd+=ad,Qd("selector"),Hd("selector");break;case"before-value":Wd("value"),nd+=ad;break;default:nd+=ad;break}break;case";":switch(Ld()){case"name":case"before-value":case"value":nd.trim().length>0&&(Td.value=nd.trim(),zd()),Wd("before-name");break;case"value-paren":nd+=ad;break;case"at-value":Td.value=nd.trim(),zd(),Ud();break;case"before-name":break;default:nd+=ad;break}break;case"{":switch(Ld()){case"selector":if(jd(-1)===" \\ "){nd+=ad;break}Td.text=nd.trim(),zd(),Wd("before-name"),cd=cd+1;break;case"at-group":switch(Td.name=nd.trim(),Td.type){case"font-face":case"viewport":case"page":Hd("before-name");break;default:Hd("before-selector")}zd(),cd=cd+1;break;case"name":case"at-rule":Td.name=nd.trim(),zd(),Hd("before-name"),cd=cd+1;break;case"comment":case"double-string":case"single-string":nd+=ad;break;case"before-value":Wd("value"),nd+=ad;break}break;case"}":switch(Ld()){case"before-name":case"name":case"before-value":case"value":nd&&(Td.value=nd.trim()),Td.name&&Td.value&&zd(),Qd("end"),zd(),Ud(),Ld()==="at-group"&&(Qd("at-group-end"),zd(),Ud()),cd>0&&(cd=cd-1);break;case"at-group":case"before-selector":case"selector":if(jd(-1)===" \\ "){nd+=ad;break}cd>0&&Ld(1)==="at-group"&&(Qd("at-group-end"),zd()),cd>1&&Ud(),cd>0&&(cd=cd-1);break;case"double-string":case"single-string":case"comment":nd+=ad;break}break;case'"':case"'":switch(Ld()){case"double-string":ad==='"'&&jd(-1)!==" \\ "&&Ud();break;case"single-string":ad==="'"&&jd(-1)!==" \\ "&&Ud();break;case"before-at-value":Wd("at-value"),Hd(ad==='"'?"double-string":"single-string");break;case"before-value":Wd("value"),Hd(ad==='"'?"double-string":"single-string");break;case"comment":break;default:jd(-1)!==" \\ "&&Hd(ad==='"'?"double-string":"single-string")}nd+=ad;break;case"/":switch(Ld()){case"comment":case"double-string":case"single-string":nd+=ad;break;case"before-value":case"selector":case"name":case"value":if(Md("*")){var Jd=Od("*/");Jd&&Zd(Jd+1)}else Ld()=="before-value"&&Wd("value"),nd+=ad;break;default:Md("*")?(Qd("comment"),Hd("comment"),Zd()):nd+=ad;break}break;case"*":switch(Ld()){case"comment":Md("/")?(Td.text=nd,Zd(),zd(),Ud()):nd+=ad;break;case"before-selector":nd+=ad,Qd("selector"),Hd("selector");break;case"before-value":Wd("value"),nd+=ad;break;default:nd+=ad}break;case"@":switch(Ld()){case"comment":case"double-string":case"single-string":nd+=ad;break;case"before-value":Wd("value"),nd+=ad;break;default:for(var hf=!1,vf,Tf,_f=0,bf=Sd.length;!hf&&_f<bf;++_f)Tf=Sd[_f],vf=Tf.name||Tf,Rd(vf)&&(hf=!0,Qd(vf),Hd(Tf.state||"at-group"),Zd(vf.length),Tf.prefix&&(Td.prefix=Tf.prefix),Tf.type&&(Td.type=Tf.type));hf||(nd+=ad);break}break;case"(":switch(Ld()){case"value":Hd("value-paren");break;case"before-value":Wd("value");break}nd+=ad;break;case")":switch(Ld()){case"value-paren":Ud();break;case"before-value":Wd("value");break}nd+=ad;break;default:switch(Ld()){case"before-selector":Qd("selector"),Hd("selector");break;case"before-name":Qd("property"),Wd("name");break;case"before-value":Wd("value");break;case"before-at-value":Wd("at-value");break}nd+=ad;break}return Ad}})(lexer);var lexerExports=lexer.exports,parser $ 2={exports:{}};(function(Ra,qa){debugExports("parse");var td=lexerExports;Ra.exports=ud;var rd,nd,ad,sd;function ud(Ud,Hd){Hd||(Hd={}),rd=!!Hd.comments,ad=!!Hd.position,nd=0,sd=Array.isArray(Ud)?Ud.slice():td(Ud);for(var Wd,Zd=[],zd;zd=dd();)Wd=Rd(zd),Wd&&Zd.push(Wd);return{type:"stylesheet",stylesheet:{rules:Zd}}}function cd(Ud,Hd){Hd||(Hd={});for(var Wd,Zd=["type","name","value"],zd={},Qd=0;Qd<Zd.length;++Qd)Wd=Zd[Qd],Ud[Wd]&&(zd[Wd]=Hd[Wd]||Ud[Wd]);for(Zd=Object.keys(Hd),Qd=0;Qd<Zd.length;++Qd)Wd=Zd[Qd],zd[Wd]||(zd[Wd]=Hd[Wd]);return ad&&(zd.position={start:Ud.start,end:Ud.end}),zd}function dd(){var Ud=sd.shift();return Ud}function pd(Ud){nd=nd+1;var Hd={};switch(Ud.type){case"font-face":case"viewport":Hd.declarations=Md();break;case"page":Hd.prefix=Ud.prefix,Hd.declarations=Md();break;default:Hd.prefix=Ud.prefix,Hd.rul
2024-09-25 14:23:53 +08:00
` ,ud=" ");var Hd=Sd(jd.stylesheet.rules,Od).join( `
2024-09-28 20:51:35 +08:00
` ).trim();return Hd}function dd(jd){if(jd){ad+=jd;return}return rd?"":Array(ad).join(nd||"")}function pd(jd){return"@"+jd.type+" "+jd.value+";"+sd}function fd(jd){var Ud="",Hd=jd.prefix||"";jd.name&&(Ud=" "+jd.name);var Wd=jd.type!=="page";return"@"+Hd+jd.type+Ud+ud+Dd(jd,Wd)+sd}function Td(jd){return td?"/*"+(jd.text||"")+"*/"+sd:""}function Ad(jd){var Ud;return jd.selectors?Ud=jd.selectors.join(","+sd):(Ud="@"+jd.type,Ud+=jd.name?" "+jd.name:""),dd()+Ud+ud+Dd(jd)+sd}function Sd(jd,Ud){return jd.reduce(function(Hd,Wd){var Zd=Wd.type==="comment"?Td(Wd):Ud(Wd);return Zd&&Hd.push(Zd),Hd},[])}function Dd(jd,Ud){var Hd=jd.declarations,Wd=Rd;return jd.rules&&(Hd=jd.rules,Wd=Ad),Hd=Ld(Hd,Wd),Hd&&(Hd=sd+Hd+(Ud?"":sd)),"{"+Hd+dd()+"}"}function Ld(jd,Ud){if(!jd)return"";dd(1);var Hd=Sd(jd,Ud);return dd(-1),Hd.length?Hd.join(sd):""}function Rd(jd){if(jd.type==="property")return Md(jd)}function Od(jd){switch(jd.type){case"rule":return Ad(jd);case"media":case"keyframes":return fd(jd);case"comment":return Td(jd);case"import":case"charset":case"namespace":return pd(jd);case"font-face":case"supports":case"viewport":case"document":case"page":return fd(jd)}}function Md(jd){var Ud=jd.name?jd.name+":"+ud:"";return dd()+Ud+jd.value+";"}})(stringify $ 2);var stringifyExports=stringify $ 2.exports,mensch={lex:lexerExports,parse:parserExports,stringify:stringifyExports},selector $ 1={exports:{}},escapeRe=/([-.*+?^ ${ } ()|[ \] \/ \\ ])/g,unescapeRe=/ \\ /g,escape $ 5=function(Ra){return(Ra+"").replace(escapeRe," \\ $ 1")},unescape $ 2=function(Ra){return(Ra+"").replace(unescapeRe,"")},slickRe=RegExp( ` ^ ( ? : \ \ s * ( , ) \ \ s * | \ \ s * ( < combinator > + ) \ \ s * | ( \ \ s + ) | ( < unicode > + | \ \ * ) | \ \ # ( < unicode > + ) | \ \ . ( < unicode > + ) | \ \ [ \ \ s * ( < unicode1 > + ) ( ? : \ \ s * ( [ * ^ $ ! ~ | ] ? = ) ( ? : \ \ s * ( ? : ( [ "']?)(.*?)\\9)))?\\s*\\](?!\\])|(:+)(<unicode>+)(?:\\((?:(?:([" '])([^\\13]*)\\13)|((?:\\([^)]+\\)|[^()]*)+))\\))?)`.replace(/<combinator>/,"["+escape$5(">+~`!@$%^&={}\\;</")+"]").replace(/<unicode>/g,"(?:[\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])").replace(/<unicode1>/g,"(?:[:\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])")),Part=function(qa){this.combinator=qa||" ",this.tag="*"};Part.prototype.toString=function(){if(!this.raw){var Ra="",qa,td;if(Ra+=this.tag||"*",this.id&&(Ra+="#"+this.id),this.classes&&(Ra+="."+this.classList.join(".")),this.attributes)for(qa=0;td=this.attributes[qa++];)Ra+="["+td.name+(td.operator?td.operator+' "'+td.value+'" ' : "" ) + "]" ; if ( this . pseudos ) for ( qa = 0 ; td = this . pseudos [ qa ++ ] ; ) Ra += ":" + td . name , td . value && ( Ra += "(" + td . value + ")" ) ; this . raw = Ra } return this . raw } ; var Expression = function ( ) { this . length = 0 } ; Expression . prototype . toString = function ( ) { if ( ! this . raw ) { for ( var Ra = "" , qa = 0 , td ; td = this [ qa ++ ] ; ) qa !== 1 && ( Ra += " " ) , td . combinator !== " " && ( Ra += td . combinator + " " ) , Ra += td ; this . raw = Ra } return this . raw } ; var replacer = function ( Ra , qa , td , rd , nd , ad , sd , ud , cd , dd , pd , fd , Td , Ad , Sd , Dd ) { var Ld , Rd ; if ( ( qa || ! this . length ) && ( Ld = this [ this . length ++ ] = new Expression , qa ) ) return "" ; if ( Ld || ( Ld = this [ this . length - 1 ] ) , ( td || rd || ! Ld . length ) && ( Rd = Ld [ Ld . length ++ ] = new Part ( td ) ) , Rd || ( Rd = Ld [ Ld . length - 1 ] ) , nd ) Rd . tag = unescape$2 ( nd ) ; else if ( ad ) Rd . id = unescape$2 ( ad ) ; else if ( sd ) { var Od = unescape$2 ( sd ) , Md = Rd . classes || ( Rd . classes = { } ) ; if ( ! Md [ Od ] ) { Md [ Od ] = escape$5 ( sd ) ; var jd = Rd . classList || ( Rd . classList = [ ] ) ; jd . push ( Od ) , jd . sort ( ) } } else Td ? ( Dd = Dd || Sd , ( Rd . pseudos || ( Rd . pseudos = [ ] ) ) . push ( { type : fd . length == 1 ? "class" : "element" , name : unescape$2 ( Td ) , escapedName : escape$5 ( Td ) , value : Dd ? unescape$2 ( Dd ) : null , escapedValue : Dd ? escape$5 ( Dd ) : null } ) ) : ud && ( pd = pd ? escape$5 ( pd ) : null , ( Rd . attributes || ( Rd . attributes = [ ] ) ) . push ( { operator : cd , name : unescape$2 ( ud ) , escapedName : escape$5 ( ud ) , value : pd ? unescape$2 ( pd ) : null , escapedValue : pd ? escape$5 ( pd ) : null } ) ) ; return "" } , Expressions = function ( qa ) { this . length = 0 ; for ( var td = this , rd = qa , nd ; qa ; ) { if ( nd = qa . replace ( slickRe , function ( ) { return replacer . apply ( td , arguments ) } ) , nd === qa ) throw new Error ( rd + " is an invalid expression" ) ; qa = nd } } ; Expressions . prototype . toString = function ( ) { if ( ! this . raw ) { for ( var Ra = [ ] , qa = 0 , td ; td = this [ qa ++ ] ; ) Ra . push ( td ) ; this . raw = Ra . join ( ", " ) } return this . raw } ; var cache$1 = { } , parse$2 = function ( Ra ) { return Ra == null ? null : ( Ra = ( "" + Ra ) . replace ( /^\s+|\s+$/g , "" ) , cache$1 [ Ra ] || ( cache
2024-09-18 09:46:23 +08:00
* Returns an array of the selectors .
*
* @ license Sizzle CSS Selector Engine - MIT
* @ param { String } selectorText from mensch
* @ api public
2024-09-25 14:23:53 +08:00
* / R a . e x t r a c t = f u n c t i o n ( a d ) { f o r ( v a r s d = 0 , u d = [ ] , c d = " " , d d = 0 , p d = a d . l e n g t h ; d d < p d ; d d + + ) { v a r f d = a d . c h a r A t ( d d ) ; s d ? ( ( f d = = = " ] " | | f d = = = " ) " ) & & s d - - , c d + = f d ) : f d = = = " , " ? ( u d . p u s h ( c d ) , c d = " " ) : ( ( f d = = = " [ " | | f d = = = " ( " ) & & s d + + , ( c d . l e n g t h | | f d ! = = " , " & & f d ! = = `
` &&fd!==" ")&&(cd+=fd))}return cd.length&&ud.push(cd),ud},Ra.parseCSS=function(nd){for(var ad=qa.parse(nd,{position:!0,comments:!0}),sd=typeof ad.stylesheet<"u"&&ad.stylesheet.rules?ad.stylesheet.rules:[],ud=[],cd=0,dd=sd.length;cd<dd;cd++)if(sd[cd].type=="rule")for(var pd=sd[cd],fd=pd.selectors,Td=0,Ad=fd.length;Td<Ad;Td++)ud.push([fd[Td],pd.declarations]);return ud},Ra.getPreservedText=function(nd,ad,sd){for(var ud=qa.parse(nd,{position:!0,comments:!0}),cd=typeof ud.stylesheet<"u"&&ud.stylesheet.rules?ud.stylesheet.rules:[],dd=[],pd=cd.length-1;pd>=0;pd--)(ad.fontFaces&&cd[pd].type==="font-face"||ad.mediaQueries&&cd[pd].type==="media"||ad.keyFrames&&cd[pd].type==="keyframes"||ad.pseudos&&cd[pd].selectors&&this.matchesPseudo(cd[pd].selectors[0],sd))&&dd.unshift(qa.stringify({stylesheet:{rules:[cd[pd]]}},{comments:!1,indentation:" "})),cd[pd].position.start;return dd.length===0?!1: `
` +dd.join( `
2024-09-18 09:46:23 +08:00
` )+ `
2024-09-25 14:23:53 +08:00
` },Ra.normalizeLineEndings=function(nd){return nd.replace(/ \r \n /g, `
2024-09-18 09:46:23 +08:00
` ).replace(/ \n /g, ` \ r
2024-09-28 20:51:35 +08:00
` )},Ra.matchesPseudo=function(nd,ad){return ad.find(function(sd){return nd.indexOf(sd)>-1})},Ra.compareFunc=function(nd,ad){for(var sd=Math.min(nd.length,ad.length),ud=0;ud<sd;ud++)if(nd[ud]!==ad[ud])return nd[ud]>ad[ud]?1:-1;return nd.length-ad.length},Ra.compare=function(nd,ad){return Ra.compareFunc(nd,ad)==1?nd:ad},Ra.getDefaultOptions=function(nd){var ad=Object.assign({extraCss:"",insertPreservedExtraCss:!0,applyStyleTags:!0,removeStyleTags:!0,preserveMediaQueries:!0,preserveFontFaces:!0,preserveKeyFrames:!0,preservePseudos:!0,applyWidthAttributes:!0,applyHeightAttributes:!0,applyAttributesTableElements:!0,resolveCSSVariables:!0,url:""},nd);return ad.webResources=ad.webResources||{},ad}}(utils $ 4)),utils $ 4}(function(Ra){var qa=require $ $ 0 $ 2;requireUtils $ 1();var td=function(nd,ad,sd){const{xmlMode:ud,...cd}=ad;return ad=Object.assign({xml:{decodeEntities:!1,xmlMode:ud}},cd),nd=sd(nd),qa.load(nd,ad)},rd=function(){var nd=[],ad=function(ud){var cd=Ra.exports.codeBlocks;return Object.keys(cd).forEach(function(dd){var pd=new RegExp(cd[dd].start+"([ \\ S \\ s]*?)"+cd[dd].end,"g");ud=ud.replace(pd,function(fd,Td){return nd.push(fd),"JUICE_CODE_BLOCK_"+(nd.length-1)+"_"})}),ud},sd=function(ud){for(var cd=0;cd<nd.length;cd++){var dd=new RegExp("JUICE_CODE_BLOCK_"+cd+'_(="")?',"gi");ud=ud.replace(dd,function(){return nd[cd]})}return ud};return{encodeEntities:ad,decodeEntities:sd}};Ra.exports=function(nd,ad,sd,ud){var cd=rd(),dd=td(nd,ad,cd.encodeEntities),pd=[dd];pd.push.apply(pd,ud);var fd=sd.apply(void 0,pd)||dd;return ad&&ad.xmlMode?cd.decodeEntities(fd.xml()):cd.decodeEntities(fd.html())},Ra.exports.codeBlocks={EJS:{start:"<%",end:"%>"},HBS:{start:"{{",end:"}}"}}})(cheerio $ 1);var cheerioExports=cheerio $ 1.exports,numbers $ 1={};numbers $ 1.romanize=function(Ra){if(isNaN(Ra))return NaN;for(var qa=String(+Ra).split(""),td=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"],rd="",nd=3;nd--;)rd=(td[+qa.pop()+nd*10]||"")+rd;return Array(+qa.join("")+1).join("M")+rd};numbers $ 1.alphanumeric=function(Ra){for(var qa="",td;Ra>0;)td=(Ra-1)%26,qa=String.fromCharCode(65+td)+qa,Ra=(Ra-td)/26|0;return qa||void 0};const uniqueString=Ra=>{let qa="";do qa=(Math.random()+1).toString(36).substring(2);while(Ra.indexOf(qa)!==-1);return qa},replaceVariables=(Ra,qa)=>{let td=/([a-z \- ]+) \s * \( \s *([^ \( \) ]*?) \s *(?:, \s *([^ \( \) ]*?) \s *)? \s * \) /i,rd=[],nd,ad=uniqueString(qa);for(;(nd=td.exec(qa))!==null;){let ud= ` $ { rd . length } ` ;if(nd[1].toLowerCase()=="var"){const dd=findVariableValue(Ra,nd[2]);if(dd){qa=qa.replace(nd[0],dd);continue}if(nd[3]){qa=qa.replace(nd[0],nd[3]);continue}}let cd= ` $ { ad } $ { ud . padStart ( 5 , "-" ) } ` ;qa=qa.replace(nd[0],cd),rd.push({placeholder:cd,replace:nd[0]})}for(var sd=rd.length-1;sd>=0;sd--){const ud=rd[sd];qa=qa.replace(ud.placeholder,ud.replace)}return qa},findVariableValue=(Ra,qa)=>{for(;Ra;){if(Ra.styleProps&&qa in Ra.styleProps)return Ra.styleProps[qa].value;var Ra=Ra.pseudoElementParent||Ra.parent}};var variables $ 1={replaceVariables,findVariableValue},utils $ 3=requireUtils $ 1(),numbers=numbers $ 1,variables=variables $ 1,inline $ 2=function(qa){qa.ignoredPseudos=["hover","active","focus","visited","link"],qa.widthElements=["TABLE","TD","TH","IMG"],qa.heightElements=["TABLE","TD","TH","IMG"],qa.tableElements=["TABLE","TH","TR","TD","CAPTION","COLGROUP","COL","THEAD","TBODY","TFOOT"],qa.nonVisualElements=["HEAD","TITLE","BASE","LINK","STYLE","META","SCRIPT","NOSCRIPT"],qa.styleToAttribute={"background-color":"bgcolor","background-image":"background","text-align":"align","vertical-align":"valign"},qa.excludedProperties=[],qa.juiceDocument=dd,qa.inlineDocument=td;function td(Td,Ad,Sd){Sd=Sd||{};var Dd=utils $ 3.parseCSS(Ad),Ld=[],Rd="style",Od={};if(Sd.styleAttributeName&&(Rd=Sd.styleAttributeName),Dd.forEach(Ud),Ld.forEach(Hd),Sd.inlinePseudoElements&&Ld.forEach(Wd),Sd.applyWidthAttributes&&Ld.forEach(function(Jd){Zd(Jd,"width")}),Sd.applyHeightAttributes&&Ld.forEach(function(Jd){Zd(Jd,"height")}),Sd.applyAttributesTableElements&&Ld.forEach(Qd),Sd.insert
2024-09-25 14:23:53 +08:00
` +Ad.extraCss,td(Td,Sd,Ad),Td}function pd(Td,Ad){var Sd=[],Dd=Td("style"),Ld,Rd,Od;return Dd.each(function(){if(Od=this,Ld=Od.childNodes,Ld.length!==1){Ad.removeStyleTags&&Td(Od).remove();return}if(Rd=Ld[0].data,Ad.applyStyleTags&&Td(Od).attr("data-embed")===void 0&&Sd.push(Rd),Ad.removeStyleTags&&Td(Od).attr("data-embed")===void 0){var Md=Od.childNodes[0].nodeValue,jd=utils $ 3.getPreservedText(Md,{mediaQueries:Ad.preserveMediaQueries,fontFaces:Ad.preserveFontFaces,keyFrames:Ad.preserveKeyFrames,pseudos:Ad.preservePseudos},qa.ignoredPseudos);jd?Od.childNodes[0].nodeValue=jd:Td(Od).remove()}Td(Od).removeAttr("data-embed")}),Sd}function fd(Td,Ad){var Sd=pd(Td,Ad),Dd=Sd.join( `
` );return Dd}return qa},cheerio=cheerioExports,makeJuiceClient=inline $ 2,juiceClient=makeJuiceClient(function(Ra,qa){return cheerio(Ra,{xmlMode:qa&&qa.xmlMode},juiceDocument,[qa])}),juiceDocument=function(Ra,qa){return juiceClient.juiceDocument(Ra,qa)};juiceClient.inlineContent=function(Ra,qa,td){return cheerio(Ra,{xmlMode:td&&td.xmlMode},juiceClient.inlineDocument,[qa,td])};juiceClient.codeBlocks=cheerio.codeBlocks;var client=juiceClient;const juice=getDefaultExportFromCjs(client);var $ s $ 2=Object.create,je $ 4=Object.defineProperty,Vs $ 1=Object.getOwnPropertyDescriptor,qs $ 2=Object.getOwnPropertyNames,zs $ 1=Object.getPrototypeOf,Ks $ 2=Object.prototype.hasOwnProperty,Hs $ 2=(Ra,qa)=>()=>(qa||Ra((qa={exports:{}}).exports,qa),qa.exports),Ws $ 1=(Ra,qa)=>{for(var td in qa)je $ 4(Ra,td,{get:qa[td],enumerable:!0})},Js $ 1=(Ra,qa,td,rd)=>{if(qa&&typeof qa=="object"||typeof qa=="function")for(let nd of qs $ 2(qa))!Ks $ 2.call(Ra,nd)&&nd!==td&&je $ 4(Ra,nd,{get:()=>qa[nd],enumerable:!(rd=Vs $ 1(qa,nd))||rd.enumerable});return Ra},vt $ 3=(Ra,qa,td)=>(td=Ra!=null? $ s $ 2(zs $ 1(Ra)):{},Js $ 1(je $ 4(td,"default",{value:Ra,enumerable:!0}),Ra)),At $ 5=Hs $ 2(Ra=>{Object.defineProperty(Ra,"__esModule",{value:!0});function qa(qd,kd){if(qd==null)return{};var Vd={},pf=Object.keys(qd),Af,zf;for(zf=0;zf<pf.length;zf++)Af=pf[zf],!(kd.indexOf(Af)>=0)&&(Vd[Af]=qd[Af]);return Vd}var td=class{constructor(qd,kd,Vd){this.line=void 0,this.column=void 0,this.index=void 0,this.line=qd,this.column=kd,this.index=Vd}},rd=class{constructor(qd,kd){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=qd,this.end=kd}};function nd(qd,kd){let{line:Vd,column:pf,index:Af}=qd;return new td(Vd,pf+kd,Af+kd)}var ad="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",sd={ImportMetaOutsideModule:{message: ` import . meta may appear only with 'sourceType: "module"' ` ,code:ad},ImportOutsideModule:{message: ` 'import' and 'export' may appear only with 'sourceType: "module"' ` ,code:ad}},ud={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},cd=qd=>qd.type==="UpdateExpression"?ud.UpdateExpression[ ` $ { qd . prefix } ` ]:ud[qd.type],dd={AccessorIsGenerator:({kind:qd})=> ` A $ { qd } ter cannot be a generator . ` ,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'."
- Did you mean \ ` export { ' ${ qd } ' as ' ${ kd } ' } from 'some-module' \` ? ` , ExportDefaultFromAsIdentifier : "'from' is not allowed as an identifier after 'export default'." , ForInOfLoopInitializer : ( { type : qd } ) => ` ' ${ qd === "ForInStatement" ? "for-in" : "for-of" } ' loop variable declaration may not have an initializer. ` , ForInUsing : "For-in loop may not start with 'using' declaration." , ForOfAsync : "The left-hand side of a for-of loop may not be 'async'." , ForOfLet : "The left-hand side of a for-of loop may not start with 'let'." , GeneratorInSingleStatementContext : "Generators can only be declared at the top level or inside a block." , IllegalBreakContinue : ( { type : qd } ) => ` Unsyntactic ${ qd === "BreakStatement" ? "break" : "continue" } . ` , IllegalLanguageModeDirective : "Illegal 'use strict' directive in function with non-simple parameter list." , IllegalReturn : "'return' outside of function." , ImportAttributesUseAssert : "The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedAssertSyntax: true` option in the import attributes plugin to suppress this error." , ImportBindingIsString : ( { importName : qd } ) => ` A string literal cannot be used as an imported binding.
2024-09-28 20:51:35 +08:00
- Did you mean \ ` import { " ${ qd } " as foo } \` ? ` , ImportCallArgumentTrailingComma : "Trailing comma is disallowed inside import(...) arguments." , ImportCallArity : ( { maxArgumentCount : qd } ) => ` \` import() \` requires exactly ${ qd === 1 ? "one argument" : "one or two arguments" } . ` , ImportCallNotNewExpression : "Cannot use new with import(...)." , ImportCallSpreadArgument : "`...` is not allowed in `import()`." , ImportJSONBindingNotDefault : "A JSON module can only be imported with `default`." , ImportReflectionHasAssertion : "`import module x` cannot have assertions." , ImportReflectionNotBinding : 'Only `import module x from "./module"` is valid.' , IncompatibleRegExpUVFlags : "The 'u' and 'v' regular expression flags cannot be enabled at the same time." , InvalidBigIntLiteral : "Invalid BigIntLiteral." , InvalidCodePoint : "Code point out of bounds." , InvalidCoverInitializedName : "Invalid shorthand property initializer." , InvalidDecimal : "Invalid decimal." , InvalidDigit : ( { radix : qd } ) => ` Expected number in radix ${ qd } . ` , InvalidEscapeSequence : "Bad character escape sequence." , InvalidEscapeSequenceTemplate : "Invalid escape sequence in template." , InvalidEscapedReservedWord : ( { reservedWord : qd } ) => ` Escape sequence in keyword ${ qd } . ` , InvalidIdentifier : ( { identifierName : qd } ) => ` Invalid identifier ${ qd } . ` , InvalidLhs : ( { ancestor : qd } ) => ` Invalid left-hand side in ${ cd ( qd ) } . ` , InvalidLhsBinding : ( { ancestor : qd } ) => ` Binding invalid left-hand side in ${ cd ( qd ) } . ` , InvalidLhsOptionalChaining : ( { ancestor : qd } ) => ` Invalid optional chaining in the left-hand side of ${ cd ( qd ) } . ` , InvalidNumber : "Invalid number." , InvalidOrMissingExponent : "Floating-point numbers require a valid exponent after the 'e'." , InvalidOrUnexpectedToken : ( { unexpected : qd } ) => ` Unexpected character ' ${ qd } '. ` , InvalidParenthesizedAssignment : "Invalid parenthesized assignment pattern." , InvalidPrivateFieldResolution : ( { identifierName : qd } ) => ` Private name # ${ qd } is not defined. ` , InvalidPropertyBindingPattern : "Binding member expression." , InvalidRecordProperty : "Only properties and spread elements are allowed in record definitions." , InvalidRestAssignmentPattern : "Invalid rest operator's argument." , LabelRedeclaration : ( { labelName : qd } ) => ` Label ' ${ qd } ' is already declared. ` , LetInLexicalBinding : "'let' is disallowed as a lexically bound name." , LineTerminatorBeforeArrow : "No line break is allowed before '=>'." , MalformedRegExpFlags : "Invalid regular expression flag." , MissingClassName : "A class name is required." , MissingEqInAssignment : "Only '=' operator can be used for specifying default value." , MissingSemicolon : "Missing semicolon." , MissingPlugin : ( { missingPlugin : qd } ) => ` This experimental syntax requires enabling the parser plugin: ${ qd . map ( kd => JSON . stringify ( kd ) ) . join ( ", " ) } . ` , MissingOneOfPlugins : ( { missingPlugin : qd } ) => ` This experimental syntax requires enabling one of the following parser plugin(s): ${ qd . map ( kd => JSON . stringify ( kd ) ) . join ( ", " ) } . ` , MissingUnicodeEscape : "Expecting Unicode escape sequence \\uXXXX." , MixingCoalesceWithLogical : "Nullish coalescing operator(??) requires parens when mixing with logical operators." , ModuleAttributeDifferentFromType : "The only accepted module attribute is `type`." , ModuleAttributeInvalidValue : "Only string literals are allowed as module attribute values." , ModuleAttributesWithDuplicateKeys : ( { key : qd } ) => ` Duplicate key " ${ qd } " is not allowed in module attributes. ` , ModuleExportNameHasLoneSurrogate : ( { surrogateCharCode : qd } ) => ` An export name cannot include a lone surrogate, found ' \\ u ${ qd . toString ( 16 ) } '. ` , ModuleExportUndefined : ( { localName : qd } ) => ` Export ' ${ qd } ' is not defined. ` , MultipleDefaultsInSwitch : "Multiple default clauses." , NewlineAfterThrow : "Illegal newline after throw." , NoCatchOrFinally : "Missing catch or finally clause." , NumberIdentifier : "Identifier directly after number." , NumericSeparatorInEscapeSequence : "Numeric separators are not allowed inside unicode escape sequences or hex escape sequences." , ObsoleteAwaitStar : "'await*' has been removed from the async functions proposal. Use Promise.all() instead." , OptionalChainingNoNew : "Constructors in/after an Optional Chain are not allowed." , OptionalChainingNoTemplate : " Tagged Template Literals ar
2024-09-25 14:23:53 +08:00
` ,++Vd,Xm===13&&kd.charCodeAt(Vd)===10&&++Vd,++Af,Lm=pf=Vd):zf.unterminated(sh,gh,Ih):++Vd}return{pos:Vd,str:Ch,firstInvalidLoc:hm,lineStart:pf,curLine:Af,containsInvalid:!!hm}}function S_(qd,kd,Vd,pf){return qd==="template"?kd===96||kd===36&&Vd.charCodeAt(pf+1)===123:kd===(qd==="double"?34:39)}function w_(qd,kd,Vd,pf,Af,zf){let sh=!Af;kd++;let gh=Ch=>({pos:kd,ch:Ch,lineStart:Vd,curLine:pf}),Ih=qd.charCodeAt(kd++);switch(Ih){case 110:return gh( `
2024-09-28 20:51:35 +08:00
` );case 114:return gh(" \r ");case 120:{let Ch;return{code:Ch,pos:kd}=p_(qd,kd,Vd,pf,2,!1,sh,zf),gh(Ch===null?null:String.fromCharCode(Ch))}case 117:{let Ch;return{code:Ch,pos:kd}=z_(qd,kd,Vd,pf,sh,zf),gh(Ch===null?null:String.fromCodePoint(Ch))}case 116:return gh(" ");case 98:return gh(" \b ");case 118:return gh(" \v ");case 102:return gh(" \f ");case 13:qd.charCodeAt(kd)===10&&++kd;case 10:Vd=kd,++pf;case 8232:case 8233:return gh("");case 56:case 57:if(Af)return gh(null);zf.strictNumericEscape(kd-1,Vd,pf);default:if(Ih>=48&&Ih<=55){let Ch=kd-1,hm=/^[0-7]+/.exec(qd.slice(Ch,kd+2))[0],Lm=parseInt(hm,8);Lm>255&&(hm=hm.slice(0,-1),Lm=parseInt(hm,8)),kd+=hm.length-1;let zm=qd.charCodeAt(kd);if(hm!=="0"||zm===56||zm===57){if(Af)return gh(null);zf.strictNumericEscape(Ch,Vd,pf)}return gh(String.fromCharCode(Lm))}return gh(String.fromCharCode(Ih))}}function p_(qd,kd,Vd,pf,Af,zf,sh,gh){let Ih=kd,Ch;return{n:Ch,pos:kd}=Om(qd,kd,Vd,pf,16,Af,zf,!1,gh,!sh),Ch===null&&(sh?gh.invalidEscapeSequence(Ih,Vd,pf):kd=Ih-1),{code:Ch,pos:kd}}function Om(qd,kd,Vd,pf,Af,zf,sh,gh,Ih,Ch){let hm=kd,Lm=Af===16?Gm.hex:Gm.decBinOct,zm=Af===16?Nm.hex:Af===10?Nm.dec:Af===8?Nm.oct:Nm.bin,Xm=!1,f_=0;for(let eg=0,T_=zf??1/0;eg<T_;++eg){let R_=qd.charCodeAt(kd),vg;if(R_===95&&gh!=="bail"){let kb=qd.charCodeAt(kd-1),lv=qd.charCodeAt(kd+1);if(gh){if(Number.isNaN(lv)||!zm(lv)||Lm.has(kb)||Lm.has(lv)){if(Ch)return{n:null,pos:kd};Ih.unexpectedNumericSeparator(kd,Vd,pf)}}else{if(Ch)return{n:null,pos:kd};Ih.numericSeparatorInEscapeSequence(kd,Vd,pf)}++kd;continue}if(R_>=97?vg=R_-97+10:R_>=65?vg=R_-65+10:fm(R_)?vg=R_-48:vg=1/0,vg>=Af){if(vg<=9&&Ch)return{n:null,pos:kd};if(vg<=9&&Ih.invalidDigit(kd,Vd,pf,Af))vg=0;else if(sh)vg=0,Xm=!0;else break}++kd,f_=f_*Af+vg}return kd===hm||zf!=null&&kd-hm!==zf||Xm?{n:null,pos:kd}:{n:f_,pos:kd}}function z_(qd,kd,Vd,pf,Af,zf){let sh=qd.charCodeAt(kd),gh;if(sh===123){if(++kd,{code:gh,pos:kd}=p_(qd,kd,Vd,pf,qd.indexOf("}",kd)-kd,!0,Af,zf),++kd,gh!==null&&gh>1114111)if(Af)zf.invalidCodePoint(kd,Vd,pf);else return{code:null,pos:kd}}else({code:gh,pos:kd}=p_(qd,kd,Vd,pf,4,!1,Af,zf));return{code:gh,pos:kd}}function m_(qd,kd,Vd){return new td(Vd,qd-kd,qd)}var a_=new Set([103,109,115,105,121,117,100,118]),Um=class{constructor(qd){this.type=qd.type,this.value=qd.value,this.start=qd.start,this.end=qd.end,this.loc=new rd(qd.startLoc,qd.endLoc)}},y_=class extends ch{constructor(qd,kd){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(Vd,pf,Af,zf)=>this.options.errorRecovery?(this.raise(Od.InvalidDigit,m_(Vd,pf,Af),{radix:zf}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(Od.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(Od.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(Od.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(Od.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(Vd,pf,Af)=>{this.recordStrictModeErrors(Od.StrictNumericEscape,m_(Vd,pf,Af))},unterminated:(Vd,pf,Af)=>{throw this.raise(Od.UnterminatedString,m_(Vd-1,pf,Af))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(Od.StrictNumericEscape),unterminated:(Vd,pf,Af)=>{throw this.raise(Od.UnterminatedTemplate,m_(Vd,pf,Af))}}),this.state=new im,this.state.init(qd),this.input=kd,this.length=kd.length,this.comments=[],this.isLookahead=!1}pushToken(qd){this.tokens.length=this.state.tokensLength,this.tokens.push(qd),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new Um(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(qd){return this.match(qd)?(this.next(),!0):!1}match(qd){return this.state.type===qd}createLookaheadState(qd){return{pos:qd.pos,value:null,type:qd.type,start:qd.start,end:qd.end,context:[this.curContext
2024-09-18 09:46:23 +08:00
` : ` \ r
2024-09-28 20:51:35 +08:00
` ):pf=String.fromCharCode(Vd),++this.state.curLine,this.state.lineStart=this.state.pos,pf}jsxReadString(kd){let Vd="",pf=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(Od.UnterminatedString,this.state.startLoc);let Af=this.input.charCodeAt(this.state.pos);if(Af===kd)break;Af===38?(Vd+=this.input.slice(pf,this.state.pos),Vd+=this.jsxReadEntity(),pf=this.state.pos):yh(Af)?(Vd+=this.input.slice(pf,this.state.pos),Vd+=this.jsxReadNewLine(!1),pf=this.state.pos):++this.state.pos}Vd+=this.input.slice(pf,this.state.pos++),this.finishToken(133,Vd)}jsxReadEntity(){let kd=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let Vd=10;this.codePointAtPos(this.state.pos)===120&&(Vd=16,++this.state.pos);let pf=this.readInt(Vd,void 0,!1,"bail");if(pf!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(pf)}else{let Vd=0,pf=!1;for(;Vd++<10&&this.state.pos<this.length&&!(pf=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(pf){this.input.slice(kd,this.state.pos);let Af;++this.state.pos}}return this.state.pos=kd,"&"}jsxReadWord(){let kd,Vd=this.state.pos;do kd=this.input.charCodeAt(++this.state.pos);while(Xh(kd)||kd===45);this.finishToken(140,this.input.slice(Vd,this.state.pos))}jsxParseIdentifier(){let kd=this.startNode();return this.match(140)?kd.name=this.state.value:Of(this.state.type)?kd.name=hh(this.state.type):this.unexpected(),this.next(),this.finishNode(kd,"JSXIdentifier")}jsxParseNamespacedName(){let kd=this.state.startLoc,Vd=this.jsxParseIdentifier();if(!this.eat(14))return Vd;let pf=this.startNodeAt(kd);return pf.namespace=Vd,pf.name=this.jsxParseIdentifier(),this.finishNode(pf,"JSXNamespacedName")}jsxParseElementName(){let kd=this.state.startLoc,Vd=this.jsxParseNamespacedName();if(Vd.type==="JSXNamespacedName")return Vd;for(;this.eat(16);){let pf=this.startNodeAt(kd);pf.object=Vd,pf.property=this.jsxParseIdentifier(),Vd=this.finishNode(pf,"JSXMemberExpression")}return Vd}jsxParseAttributeValue(){let kd;switch(this.state.type){case 5:return kd=this.startNode(),this.setContext(Zd.brace),this.next(),kd=this.jsxParseExpressionContainer(kd,Zd.j_oTag),kd.expression.type==="JSXEmptyExpression"&&this.raise(lg.AttributeIsEmpty,kd),kd;case 142:case 133:return this.parseExprAtom();default:throw this.raise(lg.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let kd=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(kd,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(kd){return this.next(),kd.expression=this.parseExpression(),this.setContext(Zd.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(kd,"JSXSpreadChild")}jsxParseExpressionContainer(kd,Vd){if(this.match(8))kd.expression=this.jsxParseEmptyExpression();else{let pf=this.parseExpression();kd.expression=pf}return this.setContext(Vd),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(kd,"JSXExpressionContainer")}jsxParseAttribute(){let kd=this.startNode();return this.match(5)?(this.setContext(Zd.brace),this.next(),this.expect(21),kd.argument=this.parseMaybeAssignAllowIn(),this.setContext(Zd.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(kd,"JSXSpreadAttribute")):(kd.name=this.jsxParseNamespacedName(),kd.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(kd,"JSXAttribute"))}jsxParseOpeningElementAt(kd){let Vd=this.startNodeAt(kd);return this.eat(143)?this.finishNode(Vd,"JSXOpeningFragment"):(Vd.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(Vd))}jsxParseOpeningElementAfterName(kd){let Vd=[];for(;!this.match(56)&&!this.match(143);)Vd.push(this.jsxParseAttribute());return kd.attributes=Vd,kd.selfClosing=this.eat(56),this.expect(143),this.finishNode(kd,"JSXOpeningElement")}jsxParseClosingElementAt(kd){let Vd=this.startNodeAt(kd);return this.eat(143)?this.finishNode(Vd,"JSXClosingFragment"):(Vd.name=this.jsxParseElementName(),this.expect(143),this.finishNode(Vd,"JSXClosingElement"))}jsxParseElementAt(kd){let Vd=this.startNodeAt(kd),pf=[],Af
` ),cooked:Af===null?null:Af.slice(1,Ih)},sh.tail=gh,this.next();let hm=this.finishNode(sh,"TemplateElement");return this.resetEndLocation(hm,nd(this.state.lastTokEndLoc,Ih)),hm}parseTemplate(qd){let kd=this.startNode(),Vd=this.parseTemplateElement(qd),pf=[Vd],Af=[];for(;!Vd.tail;)Af.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),pf.push(Vd=this.parseTemplateElement(qd));return kd.expressions=Af,kd.quasis=pf,this.finishNode(kd,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(qd,kd,Vd,pf){Vd&&this.expectPlugin("recordAndTuple");let Af=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let zf=Object.create(null),sh=!0,gh=this.startNode();for(gh.properties=[],this.next();!this.match(qd);){if(sh)sh=!1;else if(this.expect(12),this.match(qd)){this.addTrailingCommaExtraToNode(gh);break}let Ch;kd?Ch=this.parseBindingProperty():(Ch=this.parsePropertyDefinition(pf),this.checkProto(Ch,Vd,zf,pf)),Vd&&!this.isObjectProperty(Ch)&&Ch.type!=="SpreadElement"&&this.raise(Od.InvalidRecordProperty,Ch),Ch.shorthand&&this.addExtra(Ch,"shorthand",!0),gh.properties.push(Ch)}this.next(),this.state.inFSharpPipelineDirectBody=Af;let Ih="ObjectExpression";return kd?Ih="ObjectPattern":Vd&&(Ih="RecordExpression"),this.finishNode(gh,Ih)}addTrailingCommaExtraToNode(qd){this.addExtra(qd,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(qd,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(qd){return!qd.computed&&qd.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(qd){let kd=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(Od.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)kd.push(this.parseDecorator());let Vd=this.startNode(),pf=!1,Af=!1,zf;if(this.match(21))return kd.length&&this.unexpected(),this.parseSpread();kd.length&&(Vd.decorators=kd,kd=[]),Vd.method=!1,qd&&(zf=this.state.startLoc);let sh=this.eat(55);this.parsePropertyNamePrefixOperator(Vd);let gh=this.state.containsEsc;if(this.parsePropertyName(Vd,qd),!sh&&!gh&&this.maybeAsyncOrAccessorProp(Vd)){let{key:Ih}=Vd,Ch=Ih.name;Ch==="async"&&!this.hasPrecedingLineBreak()&&(pf=!0,this.resetPreviousNodeTrailingComments(Ih),sh=this.eat(55),this.parsePropertyName(Vd)),(Ch==="get"||Ch==="set")&&(Af=!0,this.resetPreviousNodeTrailingComments(Ih),Vd.kind=Ch,this.match(55)&&(sh=!0,this.raise(Od.AccessorIsGenerator,this.state.curPosition(),{kind:Ch}),this.next()),this.parsePropertyName(Vd))}return this.parseObjPropValue(Vd,zf,sh,pf,!1,Af,qd)}getGetterSetterExpectedParamCount(qd){return qd.kind==="get"?0:1}getObjectOrClassMethodParams(qd){return qd.params}checkGetterSetterParams(qd){var kd;let Vd=this.getGetterSetterExpectedParamCount(qd),pf=this.getObjectOrClassMethodParams(qd);pf.length!==Vd&&this.raise(qd.kind==="get"?Od.BadGetterArity:Od.BadSetterArity,qd),qd.kind==="set"&&((kd=pf[pf.length-1])==null?void 0:kd.type)==="RestElement"&&this.raise(Od.BadSetterRestParameter,qd)}parseObjectMethod(qd,kd,Vd,pf,Af){if(Af){let zf=this.parseMethod(qd,kd,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(zf),zf}if(Vd||kd||this.match(10))return pf&&this.unexpected(),qd.kind="method",qd.method=!0,this.parseMethod(qd,kd,Vd,!1,!1,"ObjectMethod")}parseObjectProperty(qd,kd,Vd,pf){if(qd.shorthand=!1,this.eat(14))return qd.value=Vd?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(pf),this.finishNode(qd,"ObjectProperty");if(!qd.computed&&qd.key.type==="Identifier"){if(this.checkReservedWord(qd.key.name,qd.key.loc.start,!0,!1),Vd)qd.value=this.parseMaybeDefault(kd,bg(qd.key));else if(this.match(29)){let Af=this.state.startLoc;pf!=null?pf.shorthandAssignLoc===null&&(pf.shorthandAssignLoc=Af):this.raise(Od.InvalidCoverInitializedName,Af),qd.value=this.parseMaybeDefault(kd,bg(qd.key))}else qd.value=bg(qd.key);return qd.shorthand=!0,this.finishNode(qd,"ObjectProperty")}}parseObjPropValue(qd,kd,Vd,pf,Af,zf,sh){let gh=this.parseObjectMethod(qd,Vd,pf,Af,zf)||this.parseObjectPr
2024-09-25 14:23:53 +08:00
` )return qa-2;if(nd=== `
` ||nd===" \r "||nd===" \u 2028"||nd===" \u 2029")return qa-1}else{if(nd===" \r "&&Ra.charAt(qa+1)=== `
` )return qa+2;if(nd=== `
` ||nd===" \r "||nd===" \u 2028"||nd===" \u 2029")return qa+1}return qa}var us $ 2=mr $ 2;function yr $ 2(Ra,qa){return qa===!1?!1:Ra.charAt(qa)==="/"&&Ra.charAt(qa+1)==="/"?cs $ 3(Ra,qa):qa}var fs $ 2=yr $ 2;function xr $ 3(Ra,qa){let td=null,rd=qa;for(;rd!==td;)td=rd,rd=ls $ 1(Ra,rd),rd=ps $ 1(Ra,rd),rd=fs $ 2(Ra,rd),rd=us $ 2(Ra,rd);return rd}var ds $ 1=xr $ 3;function Pr $ 3(Ra){let qa=[];for(let td of Ra)try{return td()}catch(rd){qa.push(rd)}throw Object.assign(new Error("All combinations failed"),{errors:qa})}var ms $ 3=Pr $ 3;function gr $ 2(Ra){if(!Ra.startsWith("#!"))return"";let qa=Ra.indexOf( `
` );return qa===-1?Ra:Ra.slice(0,qa)}var Oe $ 4=gr $ 2,Tr $ 3=(Ra,qa,td)=>{if(!(Ra&&qa==null))return Array.isArray(qa)||typeof qa=="string"?qa[td<0?qa.length+td:td]:qa.at(td)},St $ 3=Tr $ 3;function br $ 4(Ra){return Array.isArray(Ra)&&Ra.length>0}var Pe $ 4=br $ 4;function D $ 2(Ra){var qa,td,rd;let nd=((qa=Ra.range)==null?void 0:qa[0])??Ra.start,ad=(rd=((td=Ra.declaration)==null?void 0:td.decorators)??Ra.decorators)==null?void 0:rd[0];return ad?Math.min(D $ 2(ad),nd):nd}function B $ 2(Ra){var qa;return((qa=Ra.range)==null?void 0:qa[1])??Ra.end}function Ar $ 2(Ra){let qa=new Set(Ra);return td=>qa.has(td==null?void 0:td.type)}var ys $ 3=Ar $ 2,Sr $ 3=ys $ 3(["Block","CommentBlock","MultiLine"]),ge $ 4=Sr $ 3;function wr $ 3(Ra){let qa= ` * $ { Ra . value } * ` .split( `
` );return qa.length>1&&qa.every(td=>td.trimStart()[0]==="*")}var wt $ 2=wr $ 3;function Cr $ 1(Ra){return ge $ 4(Ra)&&Ra.value[0]==="*"&&/@(?:type|satisfies) \b /u.test(Ra.value)}var xs $ 2=Cr $ 1,Te $ 3=null;function be $ 5(Ra){if(Te $ 3!==null&&typeof Te $ 3.property){let qa=Te $ 3;return Te $ 3=be $ 5.prototype=null,qa}return Te $ 3=be $ 5.prototype=Ra??Object.create(null),new be $ 5}var Er $ 2=10;for(let Ra=0;Ra<=Er $ 2;Ra++)be $ 5();function Ct $ 4(Ra){return be $ 5(Ra)}function Ir $ 3(Ra,qa="type"){Ct $ 4(Ra);function td(rd){let nd=rd[qa],ad=Ra[nd];if(!Array.isArray(ad))throw Object.assign(new Error( ` Missing visitor keys for '${nd}' . ` ),{node:rd});return ad}return td}var Ps $ 1=Ir $ 3,gs $ 4={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","vari
` ;Ra=ie $ 3(!1,Ra.replace(Or $ 3,"").replace(Mr $ 3,""),Ur $ 3," $ 1");let td="";for(;td!==Ra;)td=Ra,Ra=ie $ 3(!1,Ra,Rr $ 2, ` $ { qa } $1 $2$ { qa } ` );Ra=Ra.replace(Ss $ 1,"").trimEnd();let rd=Object.create(null),nd=ie $ 3(!1,Ra,ws $ 2,"").replace(Ss $ 1,"").trimEnd(),ad;for(;ad=ws $ 2.exec(Ra);){let sd=ie $ 3(!1,ad[2],Br $ 4,"");if(typeof rd[ad[1]]=="string"||Array.isArray(rd[ad[1]])){let ud=rd[ad[1]];rd[ad[1]]=[..._r $ 3,...Array.isArray(ud)?ud:[ud],sd]}else rd[ad[1]]=sd}return{comments:nd,pragmas:rd}}function jr $ 3(Ra){let qa=Oe $ 4(Ra);qa&&(Ra=Ra.slice(qa.length+1));let td=Cs $ 1(Ra),{pragmas:rd,comments:nd}=Es $ 1(td);return{shebang:qa,text:Ra,pragmas:rd,comments:nd}}function Is $ 3(Ra){let{pragmas:qa}=jr $ 3(Ra);return Object.prototype.hasOwnProperty.call(qa,"prettier")||Object.prototype.hasOwnProperty.call(qa,"format")}function $ r $ 3(Ra){return Ra=typeof Ra=="function"?{parse:Ra}:Ra,{astFormat:"estree",hasPragma:Is $ 3,locStart:D $ 2,locEnd:B $ 2,...Ra}}var G $ 4= $ r $ 3;function Vr $ 3(Ra){let{filepath:qa}=Ra;if(qa){if(qa=qa.toLowerCase(),qa.endsWith(".cjs"))return"script";if(qa.endsWith(".mjs"))return"module"}}var Ns $ 1=Vr $ 3;function qr $ 3(Ra,qa){let{type:td="JsExpressionRoot",rootMarker:rd,text:nd}=qa,{tokens:ad,comments:sd}=Ra;return delete Ra.tokens,delete Ra.comments,{tokens:ad,comments:sd,type:td,node:Ra,range:[0,nd.length],rootMarker:rd}}var Ue $ 4=qr $ 3,re $ 4=Ra=>G $ 4(Jr $ 3(Ra)),zr $ 3={sourceType:"module",allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,createImportExpressions:!0,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions","partialApplication","decorators","decimal","moduleBlocks","asyncDoExpressions","destructuringPrivate","decoratorAutoAccessors","importReflection","explicitResourceManagement",["importAttributes",{deprecatedAssertSyntax:!0}],"sourcePhaseImports","deferredImportEvaluation",["optionalChainingAssign",{version:"2023-07"}],"recordAndTuple"],tokens:!0,ranges:!0},ks $ 1="v8intrinsic",vs $ 1=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"minimal"}],["pipelineOperator",{proposal:"fsharp"}]],V $ 5=(Ra,qa=zr $ 3)=>({...qa,plugins:[...qa.plugins,...Ra]}),Kr $ 4=/@(?:no)?flow \b /u;function Hr $ 4(Ra,qa){var td;if((td=qa.filepath)!=null&&td.endsWith(".js.flow"))return!0;let rd=Oe $ 4(Ra);rd&&(Ra=Ra.slice(rd.length));let nd=ds $ 1(Ra,0);return nd!==!1&&(Ra=Ra.slice(0,nd)),Kr $ 4.test(Ra)}function Wr $ 3(Ra,qa,td){let rd=Ra(qa,td),nd=rd.errors.find(ad=>!Xr $ 3.has(ad.reasonCode));if(nd)throw nd;return rd}function Jr $ 3({isExpression:Ra=!1,optionsCombinations:qa}){return(td,rd={})=>{if((rd.parser==="babel"||rd.parser==="__babel_estree")&&Hr $ 4(td,rd))return rd.parser="babel-flow",Bs $ 3.parse(td,rd);let nd=qa;(rd.__babelSourceType??Ns $ 1(rd))==="script"&&(nd=nd.map(cd=>({...cd,sourceType:"script"})));let ad=/%[A-Z]/u.test(td);td.includes("|>")?nd=(ad?[...vs $ 1,ks $ 1]:vs $ 1).flatMap(cd=>nd.map(dd=>V $ 5([cd],dd))):ad&&(nd=nd.map(cd=>V $ 5([ks $ 1],cd)));let sd=Ra?_e $ 4.parseExpression:_e $ 4.parse,ud;try{ud=ms $ 3(nd.map(cd=>()=>Wr $ 3(sd,td,cd)))}catch({errors:[cd]}){throw Re $ 5(cd)}return Ra&&(ud=Ue $ 4(ud,{text:td,rootMarker:rd.rootMarker})),As $ 2(ud,{parser:"babel",text:td})}}var Xr $ 3=new Set(["StrictNumericEscape","StrictWith","StrictOctalLiteral","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","ForInOfLoopInitializer","EmptyTypeArguments","EmptyTypeParameters","ConstructorHasTypeParameters","UnsupportedParameterPropertyKind","DecoratorExportClass","ParamDupe","InvalidDecimal","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","LineTerminatorBeforeArrow","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","OptionalTypeBeforeRequired","PatternIsOptional","OptionalBindingPattern","DeclareClassFieldHasInitializer","TypeImportCannotSpecifyDefaultAndNamed","ConstructorClassField","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport"]),Fs
` )return qa-2;if(nd=== `
` ||nd===" \r "||nd===" \u 2028"||nd===" \u 2029")return qa-1}else{if(nd===" \r "&&Ra.charAt(qa+1)=== `
` )return qa+2;if(nd=== `
` ||nd===" \r "||nd===" \u 2028"||nd===" \u 2029")return qa+1}return qa}var Ue $ 3= $ a $ 2;function Ka $ 1(Ra,qa,td={}){let rd=Ge $ 2(Ra,td.backwards?qa-1:qa,td),nd=Ue $ 3(Ra,rd,td);return rd!==nd}var te $ 3=Ka $ 1;function za(Ra,qa){if(qa===!1)return!1;if(Ra.charAt(qa)==="/"&&Ra.charAt(qa+1)==="*"){for(let td=qa+2;td<Ra.length;++td)if(Ra.charAt(td)==="*"&&Ra.charAt(td+1)==="/")return td+2}return qa}var Lt $ 2=za;function Qa(Ra,qa){return qa===!1?!1:Ra.charAt(qa)==="/"&&Ra.charAt(qa+1)==="/"?zs(Ra,qa):qa}var wt $ 1=Qa;function Za $ 1(Ra,qa){let td=null,rd=qa;for(;rd!==td;)td=rd,rd=Ks $ 1(Ra,rd),rd=Lt $ 2(Ra,rd),rd=Ge $ 2(Ra,rd);return rd=wt $ 1(Ra,rd),rd=Ue $ 3(Ra,rd),rd!==!1&&te $ 3(Ra,rd)}var Ot $ 3=Za $ 1;function eo $ 1(Ra){return Array.isArray(Ra)&&Ra.length>0}var w $ 1=eo $ 1,dr $ 1="'",Qs $ 1='"';function to $ 1(Ra,qa){let td=qa===!0||qa===dr $ 1?dr $ 1:Qs $ 1,rd=td===dr $ 1?Qs $ 1:dr $ 1,nd=0,ad=0;for(let sd of Ra)sd===td?nd++:sd===rd&&ad++;return nd>ad?rd:td}var xr $ 2=to $ 1;function ro $ 1(Ra,qa,td){let rd=qa==='"'?"'":'"',nd=N $ 4(!1,Ra,/ \\ (.)|(["'])/gsu,(ad,sd,ud)=>sd===rd?sd:ud===qa?" \\ "+ud:ud||(td&&/^[^ \n \r "'0-7 \\ bfnrt-vx \u 2028 \u 2029] $ /u.test(sd)?sd:" \\ "+sd));return qa+nd+qa}var Zs $ 1=ro $ 1;function no $ 2(Ra,qa){let td=Ra.slice(1,-1),rd=qa.parser==="json"||qa.parser==="jsonc"||qa.parser==="json5"&&qa.quoteProps==="preserve"&&!qa.singleQuote?'"':qa.__isInHtmlAttribute?"'":xr $ 2(td,qa.singleQuote);return Zs $ 1(td,rd,!(qa.parser==="css"||qa.parser==="less"||qa.parser==="scss"||qa.__embeddedInHtml))}var tt $ 3=no $ 2;function R $ 4(Ra){var qa,td,rd;let nd=((qa=Ra.range)==null?void 0:qa[0])??Ra.start,ad=(rd=((td=Ra.declaration)==null?void 0:td.decorators)??Ra.decorators)==null?void 0:rd[0];return ad?Math.min(R $ 4(ad),nd):nd}function k $ 1(Ra){var qa;return((qa=Ra.range)==null?void 0:qa[1])??Ra.end}function ht $ 3(Ra,qa){let td=R $ 4(Ra);return Number.isInteger(td)&&td===R $ 4(qa)}function so $ 2(Ra,qa){let td=k $ 1(Ra);return Number.isInteger(td)&&td===k $ 1(qa)}function eu $ 2(Ra,qa){return ht $ 3(Ra,qa)&&so $ 2(Ra,qa)}var Qt $ 2=null;function Zt $ 2(Ra){if(Qt $ 2!==null&&typeof Qt $ 2.property){let qa=Qt $ 2;return Qt $ 2=Zt $ 2.prototype=null,qa}return Qt $ 2=Zt $ 2.prototype=Ra??Object.create(null),new Zt $ 2}var uo $ 3=10;for(let Ra=0;Ra<=uo $ 3;Ra++)Zt $ 2();function In $ 1(Ra){return Zt $ 2(Ra)}function io $ 2(Ra,qa="type"){In $ 1(Ra);function td(rd){let nd=rd[qa],ad=Ra[nd];if(!Array.isArray(ad))throw Object.assign(new Error( ` Missing visitor keys for '${nd}' . ` ),{node:rd});return ad}return td}var hr $ 3=io $ 2,tu $ 3={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument
` ):Ra.type==="UnaryExpression"?rr $ 2(Ra.argument,{printWidth:td}):Ra.type==="CallExpression"&&Ra.arguments.length===0&&Ra.callee.type==="Identifier"?Ra.callee.name.length<=rd-2:kr $ 2(Ra)}function Oe $ 3(Ra,qa){return X $ 4(qa)?Bt $ 4(qa):d $ 1(qa,g $ 3.Leading,td=>te $ 3(Ra,k $ 1(td)))}function nu $ 4(Ra){return Ra.quasis.some(qa=>qa.value.raw.includes( `
` ))}function Lr $ 2(Ra,qa){return(Ra.type==="TemplateLiteral"&&nu $ 4(Ra)||Ra.type==="TaggedTemplateExpression"&&nu $ 4(Ra.quasi))&&!te $ 3(qa,R $ 4(Ra),{backwards:!0})}function wr $ 2(Ra){if(!d $ 1(Ra))return!1;let qa=O $ 3(!1,ct $ 1(Ra,g $ 3.Dangling),-1);return qa&&!re $ 3(qa)}function lu $ 3(Ra){if(Ra.length<=1)return!1;let qa=0;for(let td of Ra)if(_t $ 2(td)){if(qa+=1,qa>1)return!0}else if(L $ 4(td)){for(let rd of oe $ 3(td))if(_t $ 2(rd))return!0}return!1}function Or $ 2(Ra){let{node:qa,parent:td,key:rd}=Ra;return rd==="callee"&&L $ 4(qa)&&L $ 4(td)&&td.arguments.length>0&&qa.arguments.length>td.arguments.length}var xo $ 3=new Set(["!","-","+","~"]);function be $ 4(Ra,qa=2){if(qa<=0)return!1;if(Ra.type==="ChainExpression"||Ra.type==="TSNonNullExpression")return be $ 4(Ra.expression,qa);let td=rd=>be $ 4(rd,qa-1);if(vn $ 2(Ra))return et $ 4(Ra.pattern??Ra.regex.pattern)<=5;if(kr $ 2(Ra)||Do $ 2(Ra)||Ra.type==="ArgumentPlaceholder")return!0;if(Ra.type==="TemplateLiteral")return Ra.quasis.every(rd=>!rd.value.raw.includes( `
` ))&&Ra.expressions.every(td);if(se $ 2(Ra))return Ra.properties.every(rd=>!rd.computed&&(rd.shorthand||rd.value&&td(rd.value)));if(U $ 3(Ra))return Ra.elements.every(rd=>rd===null||td(rd));if(lt $ 2(Ra)){if(Ra.type==="ImportExpression"||be $ 4(Ra.callee,qa)){let rd=oe $ 3(Ra);return rd.length<=qa&&rd.every(td)}return!1}return q $ 3(Ra)?be $ 4(Ra.object,qa)&&be $ 4(Ra.property,qa):Ra.type==="UnaryExpression"&&xo $ 3.has(Ra.operator)||Ra.type==="UpdateExpression"?be $ 4(Ra.argument,qa):!1}function fe $ 3(Ra){var qa;return((qa=Ra.extra)==null?void 0:qa.raw)??Ra.raw}function mu $ 2(Ra){return Ra}function ae $ 1(Ra,qa="es5"){return Ra.trailingComma==="es5"&&qa==="es5"||Ra.trailingComma==="all"&&(qa==="all"||qa==="es5")}function ie $ 2(Ra,qa){switch(Ra.type){case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":case"NGPipeExpression":return ie $ 2(Ra.left,qa);case"MemberExpression":case"OptionalMemberExpression":return ie $ 2(Ra.object,qa);case"TaggedTemplateExpression":return Ra.tag.type==="FunctionExpression"?!1:ie $ 2(Ra.tag,qa);case"CallExpression":case"OptionalCallExpression":return Ra.callee.type==="FunctionExpression"?!1:ie $ 2(Ra.callee,qa);case"ConditionalExpression":return ie $ 2(Ra.test,qa);case"UpdateExpression":return!Ra.prefix&&ie $ 2(Ra.argument,qa);case"BindExpression":return Ra.object&&ie $ 2(Ra.object,qa);case"SequenceExpression":return ie $ 2(Ra.expressions[0],qa);case"ChainExpression":case"TSSatisfiesExpression":case"TSAsExpression":case"TSNonNullExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return ie $ 2(Ra.expression,qa);default:return qa(Ra)}}var su $ 3={"==":!0,"!=":!0,"===":!0,"!==":!0},br $ 3={"*":!0,"/":!0,"%":!0},_n $ 3={">>":!0,">>>":!0,"<<":!0};function nr $ 2(Ra,qa){return!(er $ 2(qa)!==er $ 2(Ra)||Ra==="**"||su $ 3[Ra]&&su $ 3[qa]||qa==="%"&&br $ 3[Ra]||Ra==="%"&&br $ 3[qa]||qa!==Ra&&br $ 3[qa]&&br $ 3[Ra]||_n $ 3[Ra]&&_n $ 3[qa])}var ho $ 2=new Map([["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].flatMap((Ra,qa)=>Ra.map(td=>[td,qa])));function er $ 2(Ra){return ho $ 2.get(Ra)}function yu $ 2(Ra){return!!_n $ 3[Ra]||Ra==="|"||Ra==="^"||Ra==="&"}function Du $ 2(Ra){var qa;if(Ra.rest)return!0;let td=K $ 3(Ra);return((qa=O $ 3(!1,td,-1))==null?void 0:qa.type)==="RestElement"}var wn $ 3=new WeakMap;function K $ 3(Ra){if(wn $ 3.has(Ra))return wn $ 3.get(Ra);let qa=[];return Ra.this&&qa.push(Ra.this),Array.isArray(Ra.parameters)?qa.push(...Ra.parameters):Array.isArray(Ra.params)&&qa.push(...Ra.params),Ra.rest&&qa.push(Ra.rest),wn $ 3.set(Ra,qa),qa}function fu $ 1(Ra,qa){let{node:td}=Ra,rd=0,nd=ad=>qa(ad,rd++);td.this&&Ra.call(nd,"this"),Array.isArray(td.parameters)?Ra.each(nd,"parameters"):Array.isArray(td.params)&&Ra.each(nd,"params"),td.rest&&Ra.call(nd,"rest")}var On $ 3=new WeakMap;function oe $ 3(Ra){if(On $ 3.has(Ra))return On $ 3.get(Ra);if(Ra.type==="ChainExpression")return oe $ 3(Ra.expression);let qa=Ra.arguments;return Ra.type==="ImportExpression"&&(qa=[Ra.source],Ra.attributes&&qa.push(Ra.attributes),Ra.options&&qa.push(Ra.options)),On $ 3.set(Ra,qa),qa}function Rt $ 4(Ra,qa){let{node:td}=Ra;if(td.type==="ChainExpression")return Ra.call(()=>Rt $ 4(Ra,qa),"expression");td.type==="ImportExpression"?(Ra.call(rd=>qa(rd,0),"source"),td.attributes&&Ra.call(rd=>qa(rd,1),"attributes"),td.options&&Ra.call(rd=>qa(rd,1),"options")):Ra.each(qa,"arguments")}function Rn $ 2(Ra,qa){let td=[];if(Ra.type==="ChainExpression"&&(Ra=Ra.expression,td.push("expression")),Ra.type==="ImportExpression"){if(qa===0||qa===(Ra.attributes||Ra.options?-2:-1))return[...td,"source"];if(Ra.attributes&&(qa===1||qa===-1))return[...td,"attributes"];if(Ra.options&&(qa===1||qa===-1))return[...td,"options"];throw new RangeError("Invalid argument index")}if(qa<0&&(qa=Ra.arguments.length+qa),qa<0||qa>=Ra.arguments.length)throw new RangeError("Invalid argument index");return[...td,"arguments",qa]}function sr $ 2(Ra){return Ra.value.trim()==="prettier-ignore"&&!Ra.unignore}function Bt $ 4(Ra){return(Ra==null?void 0:Ra.prettierIgnore)||d $ 1(Ra,g $ 3.PrettierIgnore)}var g $ 3={Leading:2,Trailing:4,
Expected it to be 'string' or 'object' . ` ;if(ut $ 1(Ra))throw new Error("doc is valid.");let td=Object.prototype.toString.call(Ra);if(td!=="[object Object]")return ` Unexpected doc '${td}' . ` ;let rd=Bo $ 2([...jr $ 2].map(nd=> ` '${nd}' ` ));return ` Unexpected doc . type '${Ra.type}' .
Expected it to be $ { rd } . ` }var Jn $ 4=class extends Error{constructor(td){super(bo $ 1(td));Qm(this,"name","InvalidDocError");this.doc=td}},Ct $ 3=Jn $ 4,Au $ 1={};function Po $ 1(Ra,qa,td,rd){let nd=[Ra];for(;nd.length>0;){let ad=nd.pop();if(ad===Au $ 1){td(nd.pop());continue}td&&nd.push(ad,Au $ 1);let sd=ut $ 1(ad);if(!sd)throw new Ct $ 3(ad);if((qa==null?void 0:qa(ad))!==!1)switch(sd){case _e $ 3:case Pe $ 3:{let ud=sd===_e $ 3?ad:ad.parts;for(let cd=ud.length,dd=cd-1;dd>=0;--dd)nd.push(ud[dd]);break}case xe $ 3:nd.push(ad.flatContents,ad.breakContents);break;case le $ 3:if(rd&&ad.expandedStates)for(let ud=ad.expandedStates.length,cd=ud-1;cd>=0;--cd)nd.push(ad.expandedStates[cd]);else nd.push(ad.contents);break;case Ye $ 2:case Xe $ 2:case He $ 2:case je $ 3:case Ve $ 3:nd.push(ad.contents);break;case rt $ 2:case nt $ 2:case st $ 2:case $ e $ 3:case me $ 1:case ve $ 3:break;default:throw new Ct $ 3(ad)}}}var qn $ 3=Po $ 1,Tu $ 2=()=>{},vr $ 1=Tu $ 2;function f $ 1(Ra){return{type:Xe $ 2,contents:Ra}}function he $ 2(Ra,qa){return{type:Ye $ 2,contents:qa,n:Ra}}function l $ 1(Ra,qa={}){return vr $ 1(qa.expandedStates),{type:le $ 3,id:qa.id,contents:Ra,break:!!qa.shouldBreak,expandedStates:qa.expandedStates}}function du $ 3(Ra){return he $ 2(Number.NEGATIVE_INFINITY,Ra)}function Mr $ 2(Ra){return he $ 2(-1,Ra)}function ze $ 3(Ra,qa){return l $ 1(Ra[0],{...qa,expandedStates:Ra})}function qt $ 2(Ra){return{type:Pe $ 3,parts:Ra}}function b $ 2(Ra,qa="",td={}){return{type:xe $ 3,breakContents:Ra,flatContents:qa,groupId:td.groupId}}function At $ 4(Ra,qa){return{type:He $ 2,contents:Ra,groupId:qa.groupId,negate:qa.negate}}function Wn $ 2(Ra){return{type:Ve $ 3,contents:Ra}}var ke $ 3={type: $ e $ 3},Ee $ 3={type:ve $ 3},Gn $ 4={type:me $ 1,hard:!0},ko $ 1={type:me $ 1,hard:!0,literal:!0},x $ 3={type:me $ 1},E $ 2={type:me $ 1,soft:!0},F $ 1=[Gn $ 4,Ee $ 3],Rr $ 1=[ko $ 1,Ee $ 3],Un $ 3={type:nt $ 2};function P $ 3(Ra,qa){let td=[];for(let rd=0;rd<qa.length;rd++)rd!==0&&td.push(Ra),td.push(qa[rd]);return td}function xu $ 1(Ra,qa,td){let rd=Ra;if(qa>0){for(let nd=0;nd<Math.floor(qa/td);++nd)rd=f $ 1(rd);rd=he $ 2(qa%td,rd),rd=he $ 2(Number.NEGATIVE_INFINITY,rd)}return rd}function it $ 2(Ra,qa){return Ra?{type:je $ 3,label:Ra,contents:qa}:qa}function mt $ 3(Ra,qa){if(typeof Ra=="string")return qa(Ra);let td=new Map;return rd(Ra);function rd(ad){if(td.has(ad))return td.get(ad);let sd=nd(ad);return td.set(ad,sd),sd}function nd(ad){switch(ut $ 1(ad)){case _e $ 3:return qa(ad.map(rd));case Pe $ 3:return qa({...ad,parts:ad.parts.map(rd)});case xe $ 3:return qa({...ad,breakContents:rd(ad.breakContents),flatContents:rd(ad.flatContents)});case le $ 3:{let{expandedStates:sd,contents:ud}=ad;return sd?(sd=sd.map(rd),ud=sd[0]):ud=rd(ud),qa({...ad,contents:ud,expandedStates:sd})}case Ye $ 2:case Xe $ 2:case He $ 2:case je $ 3:case Ve $ 3:return qa({...ad,contents:rd(ad.contents)});case rt $ 2:case nt $ 2:case st $ 2:case $ e $ 3:case me $ 1:case ve $ 3:return qa(ad);default:throw new Ct $ 3(ad)}}}function gu $ 2(Ra,qa,td){let rd=td,nd=!1;function ad(sd){if(nd)return!1;let ud=qa(sd);ud!==void 0&&(nd=!0,rd=ud)}return qn $ 3(Ra,ad),rd}function Io $ 1(Ra){if(Ra.type===le $ 3&&Ra.break||Ra.type===me $ 1&&Ra.hard||Ra.type===ve $ 3)return!0}function ne $ 3(Ra){return gu $ 2(Ra,Io $ 1,!1)}function hu $ 3(Ra){if(Ra.length>0){let qa=O $ 3(!1,Ra,-1);!qa.expandedStates&&!qa.break&&(qa.break="propagated")}return null}function Su $ 1(Ra){let qa=new Set,td=[];function rd(ad){if(ad.type===ve $ 3&&hu $ 3(td),ad.type===le $ 3){if(td.push(ad),qa.has(ad))return!1;qa.add(ad)}}function nd(ad){ad.type===le $ 3&&td.pop().break&&hu $ 3(td)}qn $ 3(Ra,rd,nd,!0)}function Lo $ 2(Ra){return Ra.type===me $ 1&&!Ra.hard?Ra.soft?"":" ":Ra.type===xe $ 3?Ra.flatContents:Ra}function ur $ 2(Ra){return mt $ 3(Ra,Lo $ 2)}function wo $ 2(Ra){switch(ut $ 1(Ra)){case Pe $ 3:if(Ra.parts.every(qa=>qa===""))return"";break;case le $ 3:if(!Ra.contents&&!Ra.id&&!Ra.break&&!Ra.expandedStates)return"";if(Ra.contents.type===le $ 3&&Ra.contents.id===Ra.id&&Ra.contents.break===Ra.break&&Ra.contents.expandedStates===Ra.expandedStates)return Ra.contents;break;case Ye $ 2:case Xe $ 2:case He $ 2:case Ve $ 3:if(!Ra.contents)return"";break;case xe $ 3:if(!Ra.flatContents&&!Ra.breakContents)return"";break;case _e $ 3:{let qa=[];for(let td of Ra){if(!td)continue;let[r
` )):td)}function Oo $ 1(Ra){if(Ra.type===me $ 1)return!0}function Bu $ 1(Ra){return gu $ 2(Ra,Oo $ 1,!1)}function ir $ 3(Ra,qa){return Ra.type===je $ 3?{...Ra,contents:qa(Ra.contents)}:qa(Ra)}function _o $ 2(Ra){let qa= ` * $ { Ra . value } * ` .split( `
` );return qa.length>1&&qa.every(td=>td.trimStart()[0]==="*")}var bu $ 2=_o $ 2;function Pu $ 1(Ra,qa){let td=Ra.node;if(vt $ 2(td))return qa.originalText.slice(R $ 4(td),k $ 1(td)).trimEnd();if(re $ 3(td))return bu $ 2(td)?jo $ 2(td):["/*",Ie $ 2(td.value),"*/"];throw new Error("Not a comment: "+JSON.stringify(td))}function jo $ 2(Ra){let qa=Ra.value.split( `
` );return["/*",P $ 3(F $ 1,qa.map((td,rd)=>rd===0?td.trimEnd():" "+(rd<qa.length-1?td.trim():td.trimStart()))),"*/"]}var Kn $ 3={};Ar $ 1(Kn $ 3,{endOfLine:()=>Go $ 2,ownLine:()=>Wo $ 2,remaining:()=>Uo $ 3});function vo(Ra){let qa=Ra.type||Ra.kind||"(unknown type)",td=String(Ra.name||Ra.id&&(typeof Ra.id=="object"?Ra.id.name:Ra.id)||Ra.key&&(typeof Ra.key=="object"?Ra.key.name:Ra.key)||Ra.value&&(typeof Ra.value=="object"?"":String(Ra.value))||Ra.operator||"");return td.length>20&&(td=td.slice(0,19)+"…"),qa+(td?" "+td:"")}function Nn $ 3(Ra,qa){(Ra.comments??(Ra.comments=[])).push(qa),qa.printed=!1,qa.nodeDescription=vo(Ra)}function ce $ 3(Ra,qa){qa.leading=!0,qa.trailing=!1,Nn $ 3(Ra,qa)}function Le $ 3(Ra,qa,td){qa.leading=!1,qa.trailing=!1,td&&(qa.marker=td),Nn $ 3(Ra,qa)}function z $ 3(Ra,qa){qa.leading=!1,qa.trailing=!0,Nn $ 3(Ra,qa)}function Mo $ 3(Ra,qa){let td=null,rd=qa;for(;rd!==td;)td=rd,rd=Ge $ 2(Ra,rd),rd=Lt $ 2(Ra,rd),rd=wt $ 1(Ra,rd),rd=Ue $ 3(Ra,rd);return rd}var yt $ 2=Mo $ 3;function Ro $ 1(Ra,qa){let td=yt $ 2(Ra,qa);return td===!1?"":Ra.charAt(td)}var ge $ 3=Ro $ 1;function Jo $ 2(Ra,qa,td){for(let rd=qa;rd<td;++rd)if(Ra.charAt(rd)=== `
` )return!0;return!1}var de $ 2=Jo $ 2;function qo $ 1(Ra){return re $ 3(Ra)&&Ra.value[0]==="*"&&/@(?:type|satisfies) \b /u.test(Ra.value)}var ku $ 1=qo $ 1;function Wo $ 2(Ra){return[Mu $ 2,Lu $ 1,_u $ 2,ep,Xo $ 1,Yn $ 3,Hn $ 2,Iu $ 2,wu $ 3,sp,rp, $ n $ 4,vu $ 2,up,Ou $ 2,ju $ 2,Vn $ 3,Yo $ 1,yp].some(qa=>qa(Ra))}function Go $ 2(Ra){return[No $ 1,_u $ 2,Lu $ 1,vu $ 2,Yn $ 3,Hn $ 2,Iu $ 2,wu $ 3,ju $ 2,tp,np, $ n $ 4,op $ 1,Vn $ 3,lp,mp].some(qa=>qa(Ra))}function Uo $ 3(Ra){return[Mu $ 2,Yn $ 3,Hn $ 2,Ho $ 3,Zo $ 2,Ou $ 2, $ n $ 4,Qo $ 2,zo $ 1,cp,Vn $ 3,pp].some(qa=>qa(Ra))}function bt $ 4(Ra,qa){let td=(Ra.body||Ra.properties).find(({type:rd})=>rd!=="EmptyStatement");td?ce $ 3(td,qa):Le $ 3(Ra,qa)}function Xn $ 4(Ra,qa){Ra.type==="BlockStatement"?bt $ 4(Ra,qa):ce $ 3(Ra,qa)}function No $ 1({comment:Ra,followingNode:qa}){return qa&&ku $ 1(Ra)?(ce $ 3(qa,Ra),!0):!1}function Yn $ 3({comment:Ra,precedingNode:qa,enclosingNode:td,followingNode:rd,text:nd}){if((td==null?void 0:td.type)!=="IfStatement"||!rd)return!1;if(ge $ 3(nd,k $ 1(Ra))===")")return z $ 3(qa,Ra),!0;if(qa===td.consequent&&rd===td.alternate){if(qa.type==="BlockStatement")z $ 3(qa,Ra);else{let ad=vt $ 2(Ra)||Ra.loc.start.line===Ra.loc.end.line,sd=Ra.loc.start.line===qa.loc.start.line;ad&&sd?z $ 3(qa,Ra):Le $ 3(td,Ra)}return!0}return rd.type==="BlockStatement"?(bt $ 4(rd,Ra),!0):rd.type==="IfStatement"?(Xn $ 4(rd.consequent,Ra),!0):td.consequent===rd?(ce $ 3(rd,Ra),!0):!1}function Hn $ 2({comment:Ra,precedingNode:qa,enclosingNode:td,followingNode:rd,text:nd}){return(td==null?void 0:td.type)!=="WhileStatement"||!rd?!1:ge $ 3(nd,k $ 1(Ra))===")"?(z $ 3(qa,Ra),!0):rd.type==="BlockStatement"?(bt $ 4(rd,Ra),!0):td.body===rd?(ce $ 3(rd,Ra),!0):!1}function Iu $ 2({comment:Ra,precedingNode:qa,enclosingNode:td,followingNode:rd}){return(td==null?void 0:td.type)!=="TryStatement"&&(td==null?void 0:td.type)!=="CatchClause"||!rd?!1:td.type==="CatchClause"&&qa?(z $ 3(qa,Ra),!0):rd.type==="BlockStatement"?(bt $ 4(rd,Ra),!0):rd.type==="TryStatement"?(Xn $ 4(rd.finalizer,Ra),!0):rd.type==="CatchClause"?(Xn $ 4(rd.body,Ra),!0):!1}function Xo $ 1({comment:Ra,enclosingNode:qa,followingNode:td}){return q $ 3(qa)&&(td==null?void 0:td.type)==="Identifier"?(ce $ 3(qa,Ra),!0):!1}function Yo $ 1({comment:Ra,enclosingNode:qa,followingNode:td,options:rd}){return!rd.experimentalTernaries||!((qa==null?void 0:qa.type)==="ConditionalExpression"||(qa==null?void 0:qa.type)==="ConditionalTypeAnnotation"||(qa==null?void 0:qa.type)==="TSConditionalType")?!1:(td==null?void 0:td.type)==="ConditionalExpression"||(td==null?void 0:td.type)==="ConditionalTypeAnnotation"||(td==null?void 0:td.type)==="TSConditionalType"?(Le $ 3(qa,Ra),!0):!1}function Lu $ 1({comment:Ra,precedingNode:qa,enclosingNode:td,followingNode:rd,text:nd,options:ad}){let sd=qa&&!de $ 2(nd,k $ 1(qa),R $ 4(Ra));return(!qa||!sd)&&((td==null?void 0:td.type)==="ConditionalExpression"||(td==null?void 0:td.type)==="ConditionalTypeAnnotation"||(td==null?void 0:td.type)==="TSConditionalType")&&rd?ad.experimentalTernaries&&td.alternate===rd&&!(re $ 3(Ra)&&!de $ 2(ad.originalText,R $ 4(Ra),k $ 1(Ra)))?(Le $ 3(td,Ra),!0):(ce $ 3(rd,Ra),!0):!1}function Ho $ 3({comment:Ra,precedingNode:qa,enclosingNode:td}){return Ae $ 2(td)&&td.shorthand&&td.key===qa&&td.value.type==="AssignmentPattern"?(z $ 3(td.value.left,Ra),!0):!1}var Vo $ 2=new Set(["ClassDeclaration","ClassExpression","DeclareClass","DeclareInterface","InterfaceDeclaration","TSInterfaceDeclaration"]);function wu $ 3({comment:Ra,precedingNode:qa,enclosingNode:td,followingNode:rd}){if(Vo $ 2.has(td==null?void 0:td.type)){if(w $ 1(td.decorators)&&(rd==null?void 0:rd.type)!=="Decorator")return z $ 3(O $ 3(!1,td.decorators,-1),Ra),!0;if(td.body&&rd===td.body)return bt $ 4(td.body,Ra),!0;if(rd){if(td.superClass&&rd===td.superClass&&qa&&(qa===td.id||qa===td.typeParameters))return z $ 3(qa,Ra),!0;for(let nd of["implements","extends","mixins"])if(td[nd]&&rd===td[nd][0])return qa&&(qa===td.id||qa===td.typeParameters||qa===td.superClass)?z $ 3(qa,Ra):Le $ 3(td,Ra,nd),!0}}return!1}var $ o $ 2=new Set(["ClassMethod","ClassProperty","PropertyDefinition","TSAbstractPropertyDefinition","TSAbstractMethodDefinition","TSDeclareMethod","MethodDefinition","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty
2024-09-18 09:46:23 +08:00
` ;default:return `
2024-09-25 14:23:53 +08:00
` }}var Se $ 3=Symbol("MODE_BREAK"),at $ 4=Symbol("MODE_FLAT"),ar $ 2=Symbol("cursor");function qu $ 2(){return{value:"",length:0,queue:[]}}function Cp(Ra,qa){return Qn $ 4(Ra,{type:"indent"},qa)}function Ap $ 1(Ra,qa,td){return qa===Number.NEGATIVE_INFINITY?Ra.root||qu $ 2():qa<0?Qn $ 4(Ra,{type:"dedent"},td):qa?qa.type==="root"?{...Ra,root:Ra}:Qn $ 4(Ra,{type:typeof qa=="string"?"stringAlign":"numberAlign",n:qa},td):Ra}function Qn $ 4(Ra,qa,td){let rd=qa.type==="dedent"?Ra.queue.slice(0,-1):[...Ra.queue,qa],nd="",ad=0,sd=0,ud=0;for(let Sd of rd)switch(Sd.type){case"indent":pd(),td.useTabs?cd(1):dd(td.tabWidth);break;case"stringAlign":pd(),nd+=Sd.n,ad+=Sd.n.length;break;case"numberAlign":sd+=1,ud+=Sd.n;break;default:throw new Error( ` Unexpected type '${Sd.type}' ` )}return Td(),{...Ra,value:nd,length:ad,queue:rd};function cd(Sd){nd+=" ".repeat(Sd),ad+=td.tabWidth*Sd}function dd(Sd){nd+=" ".repeat(Sd),ad+=Sd}function pd(){td.useTabs?fd():Td()}function fd(){sd>0&&cd(sd),Ad()}function Td(){ud>0&&dd(ud),Ad()}function Ad(){sd=0,ud=0}}function Zn $ 3(Ra){let qa=0,td=0,rd=Ra.length;e:for(;rd--;){let nd=Ra[rd];if(nd===ar $ 2){td++;continue}for(let ad=nd.length-1;ad>=0;ad--){let sd=nd[ad];if(sd===" "||sd===" ")qa++;else{Ra[rd]=nd.slice(0,ad+1);break e}}}if(qa>0||td>0)for(Ra.length=rd+1;td-- >0;)Ra.push(ar $ 2);return qa}function Jr $ 2(Ra,qa,td,rd,nd,ad){if(td===Number.POSITIVE_INFINITY)return!0;let sd=qa.length,ud=[Ra],cd=[];for(;td>=0;){if(ud.length===0){if(sd===0)return!0;ud.push(qa[--sd]);continue}let{mode:dd,doc:pd}=ud.pop(),fd=ut $ 1(pd);switch(fd){case rt $ 2:cd.push(pd),td-=et $ 4(pd);break;case _e $ 3:case Pe $ 3:{let Td=fd===_e $ 3?pd:pd.parts;for(let Ad=Td.length-1;Ad>=0;Ad--)ud.push({mode:dd,doc:Td[Ad]});break}case Xe $ 2:case Ye $ 2:case He $ 2:case je $ 3:ud.push({mode:dd,doc:pd.contents});break;case st $ 2:td+=Zn $ 3(cd);break;case le $ 3:{if(ad&&pd.break)return!1;let Td=pd.break?Se $ 3:dd,Ad=pd.expandedStates&&Td===Se $ 3?O $ 3(!1,pd.expandedStates,-1):pd.contents;ud.push({mode:Td,doc:Ad});break}case xe $ 3:{let Td=(pd.groupId?nd[pd.groupId]||at $ 4:dd)===Se $ 3?pd.breakContents:pd.flatContents;Td&&ud.push({mode:dd,doc:Td});break}case me $ 1:if(dd===Se $ 3||pd.hard)return!0;pd.soft||(cd.push(" "),td--);break;case Ve $ 3:rd=!0;break;case $ e $ 3:if(rd)return!1;break}}return!1}function es $ 2(Ra,qa){let td={},rd=qa.printWidth,nd=Ju $ 3(qa.endOfLine),ad=0,sd=[{ind:qu $ 2(),mode:Se $ 3,doc:Ra}],ud=[],cd=!1,dd=[],pd=0;for(Su $ 1(Ra);sd.length>0;){let{ind:Td,mode:Ad,doc:Sd}=sd.pop();switch(ut $ 1(Sd)){case rt $ 2:{let Dd=nd!== `
` ?N $ 4(!1,Sd, `
2024-09-28 20:51:35 +08:00
` ,nd):Sd;ud.push(Dd),sd.length>0&&(ad+=et $ 4(Dd));break}case _e $ 3:for(let Dd=Sd.length-1;Dd>=0;Dd--)sd.push({ind:Td,mode:Ad,doc:Sd[Dd]});break;case nt $ 2:if(pd>=2)throw new Error("There are too many 'cursor' in doc.");ud.push(ar $ 2),pd++;break;case Xe $ 2:sd.push({ind:Cp(Td,qa),mode:Ad,doc:Sd.contents});break;case Ye $ 2:sd.push({ind:Ap $ 1(Td,Sd.n,qa),mode:Ad,doc:Sd.contents});break;case st $ 2:ad-=Zn $ 3(ud);break;case le $ 3:switch(Ad){case at $ 4:if(!cd){sd.push({ind:Td,mode:Sd.break?Se $ 3:at $ 4,doc:Sd.contents});break}case Se $ 3:{cd=!1;let Dd={ind:Td,mode:at $ 4,doc:Sd.contents},Ld=rd-ad,Rd=dd.length>0;if(!Sd.break&&Jr $ 2(Dd,sd,Ld,Rd,td))sd.push(Dd);else if(Sd.expandedStates){let Od=O $ 3(!1,Sd.expandedStates,-1);if(Sd.break){sd.push({ind:Td,mode:Se $ 3,doc:Od});break}else for(let Md=1;Md<Sd.expandedStates.length+1;Md++)if(Md>=Sd.expandedStates.length){sd.push({ind:Td,mode:Se $ 3,doc:Od});break}else{let jd=Sd.expandedStates[Md],Ud={ind:Td,mode:at $ 4,doc:jd};if(Jr $ 2(Ud,sd,Ld,Rd,td)){sd.push(Ud);break}}}else sd.push({ind:Td,mode:Se $ 3,doc:Sd.contents});break}}Sd.id&&(td[Sd.id]=O $ 3(!1,sd,-1).mode);break;case Pe $ 3:{let Dd=rd-ad,{parts:Ld}=Sd;if(Ld.length===0)break;let[Rd,Od]=Ld,Md={ind:Td,mode:at $ 4,doc:Rd},jd={ind:Td,mode:Se $ 3,doc:Rd},Ud=Jr $ 2(Md,[],Dd,dd.length>0,td,!0);if(Ld.length===1){Ud?sd.push(Md):sd.push(jd);break}let Hd={ind:Td,mode:at $ 4,doc:Od},Wd={ind:Td,mode:Se $ 3,doc:Od};if(Ld.length===2){Ud?sd.push(Hd,Md):sd.push(Wd,jd);break}Ld.splice(0,2);let Zd={ind:Td,mode:Ad,doc:qt $ 2(Ld)},zd=Ld[0];Jr $ 2({ind:Td,mode:at $ 4,doc:[Rd,Od,zd]},[],Dd,dd.length>0,td,!0)?sd.push(Zd,Hd,Md):Ud?sd.push(Zd,Wd,Md):sd.push(Zd,Wd,jd);break}case xe $ 3:case He $ 2:{let Dd=Sd.groupId?td[Sd.groupId]:Ad;if(Dd===Se $ 3){let Ld=Sd.type===xe $ 3?Sd.breakContents:Sd.negate?Sd.contents:f $ 1(Sd.contents);Ld&&sd.push({ind:Td,mode:Ad,doc:Ld})}if(Dd===at $ 4){let Ld=Sd.type===xe $ 3?Sd.flatContents:Sd.negate?f $ 1(Sd.contents):Sd.contents;Ld&&sd.push({ind:Td,mode:Ad,doc:Ld})}break}case Ve $ 3:dd.push({ind:Td,mode:Ad,doc:Sd.contents});break;case $ e $ 3:dd.length>0&&sd.push({ind:Td,mode:Ad,doc:Gn $ 4});break;case me $ 1:switch(Ad){case at $ 4:if(Sd.hard)cd=!0;else{Sd.soft||(ud.push(" "),ad+=1);break}case Se $ 3:if(dd.length>0){sd.push({ind:Td,mode:Ad,doc:Sd},...dd.reverse()),dd.length=0;break}Sd.literal?Td.root?(ud.push(nd,Td.root.value),ad=Td.root.length):(ud.push(nd),ad=0):(ad-=Zn $ 3(ud),ud.push(nd+Td.value),ad=Td.length);break}break;case je $ 3:sd.push({ind:Td,mode:Ad,doc:Sd.contents});break;case ve $ 3:break;default:throw new Ct $ 3(Sd)}sd.length===0&&dd.length>0&&(sd.push(...dd.reverse()),dd.length=0)}let fd=ud.indexOf(ar $ 2);if(fd!==-1){let Td=ud.indexOf(ar $ 2,fd+1),Ad=ud.slice(0,fd).join(""),Sd=ud.slice(fd+1,Td).join(""),Dd=ud.slice(Td+1).join("");return{formatted:Ad+Sd+Dd,cursorNodeStart:Ad.length,cursorNodeText:Sd}}return{formatted:ud.join("")}}function Tp $ 1(Ra,qa,td=0){let rd=0;for(let nd=td;nd<Ra.length;++nd)Ra[nd]===" "?rd=rd+qa-rd%qa:rd++;return rd}var Wu $ 1=Tp $ 1;function dp(Ra,qa){let td=Ra.lastIndexOf( `
2024-09-25 14:23:53 +08:00
` );return td===-1?0:Wu $ 1(Ra.slice(td+1).match(/^[ \t ]*/u)[0],qa)}var Gu $ 2=dp;function qr $ 2(Ra,qa,td){let{node:rd}=Ra;if(rd.type==="TemplateLiteral"&&gp(Ra)){let cd=xp(Ra,td,qa);if(cd)return cd}let nd="expressions";rd.type==="TSTemplateLiteralType"&&(nd="types");let ad=[],sd=Ra.map(qa,nd);ad.push(ke $ 3," ` " ) ; let ud = 0 ; return Ra . each ( ( { index : cd , node : dd } ) => { if ( ad . push ( qa ( ) ) , dd . tail ) return ; let { tabWidth : pd } = td , fd = dd . value . raw , Td = fd . includes ( `
` )?Gu $ 2(fd,pd):ud;ud=Td;let Ad=sd[cd],Sd=rd[nd][cd],Dd=de $ 2(td.originalText,k $ 1(dd),R $ 4(rd.quasis[cd+1]));if(!Dd){let Rd=es $ 2(Ad,{...td,printWidth:Number.POSITIVE_INFINITY}).formatted;Rd.includes( `
` )?Dd=!0:Ad=Rd}Dd&&(d $ 1(Sd)||Sd.type==="Identifier"||q $ 3(Sd)||Sd.type==="ConditionalExpression"||Sd.type==="SequenceExpression"||Te $ 2(Sd)||De $ 2(Sd))&&(Ad=[f $ 1([E $ 2,Ad]),E $ 2]);let Ld=Td===0&&fd.endsWith( `
` )?he $ 2(Number.NEGATIVE_INFINITY,Ad):xu $ 1(Ad,Td,pd);ad.push(l $ 1([" ${ ",Ld,ke$3," } "]))},"quasis"),ad.push(" ` "),ad}function Uu$3(Ra,qa){let td=qa(" quasi ");return it$2(td.label&&{tagged:!0,...td.label},[qa(" tag "),qa(Ra.node.typeArguments?" typeArguments ":" typeParameters "),ke$3,td])}function xp(Ra,qa,td){let{node:rd}=Ra,nd=rd.quasis[0].value.raw.trim().split(/\s*\|\s*/u);if(nd.length>1||nd.some(ad=>ad.length>0)){qa.__inJestEach=!0;let ad=Ra.map(td," expressions ");qa.__inJestEach=!1;let sd=[],ud=ad.map(Td=>" $ { "+es$2(Td,{...qa,printWidth:Number.POSITIVE_INFINITY,endOfLine:" lf "}).formatted+" } " ) , cd = [ { hasLineBreak : ! 1 , cells : [ ] } ] ; for ( let Td = 1 ; Td < rd . quasis . length ; Td ++ ) { let Ad = O$3 ( ! 1 , cd , - 1 ) , Sd = ud [ Td - 1 ] ; Ad . cells . push ( Sd ) , Sd . includes ( `
` )&&(Ad.hasLineBreak=!0),rd.quasis[Td].value.raw.includes( `
` )&&cd.push({hasLineBreak:!1,cells:[]})}let dd=Math.max(nd.length,...cd.map(Td=>Td.cells.length)),pd=Array.from({length:dd}).fill(0),fd=[{cells:nd},...cd.filter(Td=>Td.cells.length>0)];for(let{cells:Td}of fd.filter(Ad=>!Ad.hasLineBreak))for(let[Ad,Sd]of Td.entries())pd[Ad]=Math.max(pd[Ad],et $ 4(Sd));return sd.push(ke $ 3," ` ",f$1([F$1,P$3(F$1,fd.map(Td=>P$3(" | ",Td.cells.map((Ad,Sd)=>Td.hasLineBreak?Ad:Ad+" ".repeat(pd[Sd]-et$4(Ad))))))]),F$1," ` "),sd}}function hp(Ra,qa){let{node:td}=Ra,rd=qa();return d $ 1(td)&&(rd=l $ 1([f $ 1([E $ 2,rd]),E $ 2])),[" ${ ",rd,ke$3," } "]}function Gt $ 3(Ra,qa){return Ra.map(td=>hp(td,qa),"expressions")}function Wr $ 2(Ra,qa){return mt $ 3(Ra,td=>typeof td=="string"?qa?N $ 4(!1,td,/( \\ *) ` / gu , "$1$1\\`" ) : ts$1 ( td ) : td ) } function ts$1 ( Ra ) { return N$4 ( ! 1 , Ra , /([\\`]|\$\{)/gu , String . raw ` \$ 1 ` ) } function gp ( { node : Ra , parent : qa } ) { let td = /^[fx]?(?:describe|it|test)$/u ; return qa . type === "TaggedTemplateExpression" && qa . quasi === Ra && qa . tag . type === "MemberExpression" && qa . tag . property . type === "Identifier" && qa . tag . property . name === "each" && ( qa . tag . object . type === "Identifier" && td . test ( qa . tag . object . name ) || qa . tag . object . type === "MemberExpression" && qa . tag . object . property . type === "Identifier" && ( qa . tag . object . property . name === "only" || qa . tag . object . property . name === "skip" ) && qa . tag . object . object . type === "Identifier" && td . test ( qa . tag . object . object . name ) ) } var ns$2 = [ ( Ra , qa ) => Ra . type === "ObjectExpression" && qa === "properties" , ( Ra , qa ) => Ra . type === "CallExpression" && Ra . callee . type === "Identifier" && Ra . callee . name === "Component" && qa === "arguments" , ( Ra , qa ) => Ra . type === "Decorator" && qa === "expression" ] ; function Nu$2 ( Ra ) { let qa = rd => rd . type === "TemplateLiteral" , td = ( rd , nd ) => Ae$2 ( rd ) && ! rd . computed && rd . key . type === "Identifier" && rd . key . name === "styles" && nd === "value" ; return Ra . match ( qa , ( rd , nd ) => U$3 ( rd ) && nd === "elements" , td , ... ns$2 ) || Ra . match ( qa , td , ... ns$2 ) } function Xu$3 ( Ra ) { return Ra . match ( qa => qa . type === "TemplateLiteral" , ( qa , td ) => Ae$2 ( qa ) && ! qa . computed && qa . key . type === "Identifier" && qa . key . name === "template" && td === "value" , ... ns$2 ) } function rs$1 ( Ra , qa ) { return d$1 ( Ra , g$3 . Block | g$3 . Leading , ( { value : td } ) => td === ` ${ qa } ` ) } function Gr$2 ( { node : Ra , parent : qa } , td ) { return rs$1 ( Ra , td ) || Sp ( qa ) && rs$1 ( qa , td ) || qa . type === "ExpressionStatement" && rs$1 ( qa , td ) } function Sp ( Ra ) { return Ra . type === "AsConstExpression" || Ra . type === "TSAsExpression" && Ra . typeAnnotation . type === "TSTypeReference" && Ra . typeAnnotation . typeName . type === "Identifier" && Ra . typeAnnotation . typeName . name === "const" } async function Bp ( Ra , qa , td ) { let { node : rd } = td , nd = rd . quasis . map ( pd => pd . value . raw ) , ad = 0 , sd = nd . reduce ( ( pd , fd , Td ) => Td === 0 ? fd : pd + "@prettier-placeholder-" + ad ++ + "-id" + fd , "" ) , ud = await Ra ( sd , { parser : "scss" } ) , cd = Gt$3 ( td , qa ) , dd = bp ( ud , cd ) ; if ( ! dd ) throw new Error ( "Couldn't insert all the expressions" ) ; return [ "`" , f$1 ( [ F$1 , dd ] ) , E$2 , "`" ] } function bp ( Ra , qa ) { if ( ! w$1 ( qa ) ) return Ra ; let td = 0 , rd = mt$3 ( Wt$1 ( Ra ) , nd => typeof nd != "string" || ! nd . includes ( "@prettier-placeholder" ) ? nd : nd . split ( /@prettier-placeholder-(\d+)-id/u ) . map ( ( ad , sd ) => sd % 2 === 0 ? Ie$2 ( ad ) : ( td ++ , qa [ ad ] ) ) ) ; return qa . length === td ? rd : null } function Pp ( { node : Ra , parent : qa , grandparent : td } ) { return td && Ra . quasis && qa . type === "JSXExpressionContainer" && td . type === "JSXElement" && td . openingElement . name . name === "style" && td . openingElement . attributes . some ( rd => rd . type === "JSXAttribute" && rd . name . name === "jsx" ) || ( qa == null ? void 0 : qa . type ) === "TaggedTemplateExpression" && qa . tag . type === "Identifier" && qa . tag . name === "css" || ( qa == null ? void 0 : qa . type ) === "TaggedTemplateExpression" && qa . tag . type === "MemberExpression" && qa . tag . object . name === "css" && ( qa . tag . property . name === "global" || qa . tag . property . name === "resolve" ) } function Ur$2 ( Ra ) { return Ra . type === "Identifier" && Ra . name === "styled" } function Yu$1 ( Ra ) { return /^[A-Z]/u . test ( Ra . object . name ) && Ra . property . name === "extend" } function kp$1 ( { parent : Ra } ) { if ( ! Ra || Ra . type !== "TaggedTemplateExpression" ) return ! 1 ; let qa = Ra . tag . type === "ParenthesizedExpression" ? Ra . tag . expression : Ra . tag ; switch ( qa . type ) { case "MemberExpression" : return Ur$2 ( qa . object ) || Yu$1 ( qa ) ; case "CallExpression" : return Ur$2 ( qa . callee ) || qa . callee . type === "MemberExpression" && ( qa . callee . object . type === "MemberExpression" && ( Ur$2 ( qa . callee . object . object ) || Yu$1 ( qa . calle
` ),Ad=Td.length,Sd=ad[ud],Dd=Ad>2&&Td[0].trim()===""&&Td[1].trim()==="",Ld=Ad>2&&Td[Ad-1].trim()===""&&Td[Ad-2].trim()==="",Rd=Td.every(Md=>/^ \s *(?:#[^ \n \r ]*)? $ /u.test(Md));if(!pd&&/#[^ \n \r ]* $ /u.test(Td[Ad-1]))return null;let Od=null;Rd?Od=Op $ 1(Td):Od=await Ra(fd,{parser:"graphql"}),Od?(Od=Wr $ 2(Od,!1),!dd&&Dd&&sd.push(""),sd.push(Od),!pd&&Ld&&sd.push("")):!dd&&!pd&&Dd&&sd.push(""),Sd&&sd.push(Sd)}return[" ` ",f$1([F$1,P$3(F$1,sd)]),F$1," ` "]}function Op $ 1(Ra){let qa=[],td=!1,rd=Ra.map(nd=>nd.trim());for(let[nd,ad]of rd.entries())ad!==""&&(rd[nd-1]===""&&td?qa.push([F $ 1,ad]):qa.push(ad),td=!0);return qa.length===0?null:P $ 3(F $ 1,qa)}function _p({node:Ra,parent:qa}){return Gr $ 2({node:Ra,parent:qa},"GraphQL")||qa&&(qa.type==="TaggedTemplateExpression"&&(qa.tag.type==="MemberExpression"&&qa.tag.object.name==="graphql"&&qa.tag.property.name==="experimental"||qa.tag.type==="Identifier"&&(qa.tag.name==="gql"||qa.tag.name==="graphql"))||qa.type==="CallExpression"&&qa.callee.type==="Identifier"&&qa.callee.name==="graphql")}function jp(Ra){if(_p(Ra))return wp}var Vu $ 3=jp,ss $ 1=0;async function $ u $ 2(Ra,qa,td,rd,nd){let{node:ad}=rd,sd=ss $ 1;ss $ 1=ss $ 1+1>>>0;let ud=Rd=> ` PRETTIER _HTML _PLACEHOLDER _$ { Rd } _$ { sd } _IN _JS ` ,cd=ad.quasis.map((Rd,Od,Md)=>Od===Md.length-1?Rd.value.cooked:Rd.value.cooked+ud(Od)).join(""),dd=Gt $ 3(rd,td),pd=new RegExp(ud(String.raw ` ( \ d + ) ` ),"gu"),fd=0,Td=await qa(cd,{parser:Ra,__onHtmlRoot(Rd){fd=Rd.children.length}}),Ad=mt $ 3(Td,Rd=>{if(typeof Rd!="string")return Rd;let Od=[],Md=Rd.split(pd);for(let jd=0;jd<Md.length;jd++){let Ud=Md[jd];if(jd%2===0){Ud&&(Ud=ts $ 1(Ud),nd.__embeddedInHtml&&(Ud=N $ 4(!1,Ud,/< \/ (?=script \b )/giu,String.raw ` < \ / ` )),Od.push(Ud));continue}let Hd=Number(Ud);Od.push(dd[Hd])}return Od}),Sd=/^ \s /u.test(cd)?" ":"",Dd=/ \s $ /u.test(cd)?" ":"",Ld=nd.htmlWhitespaceSensitivity==="ignore"?F $ 1:Sd&&Dd?x $ 3:null;return Ld?l $ 1([" ` ",f$1([Ld,l$1(Ad)]),Ld," ` "]):it $ 2({hug:!1},l $ 1([" ` ",Sd,fd>1?f$1(l$1(Ad)):l$1(Ad),Dd," ` "]))}function vp(Ra){return Gr $ 2(Ra,"HTML")||Ra.match(qa=>qa.type==="TemplateLiteral",(qa,td)=>qa.type==="TaggedTemplateExpression"&&qa.tag.type==="Identifier"&&qa.tag.name==="html"&&td==="quasi")}var Mp $ 1= $ u $ 2.bind(void 0,"html"),Rp $ 1= $ u $ 2.bind(void 0,"angular");function Jp(Ra){if(vp(Ra))return Mp $ 1;if(Xu $ 3(Ra))return Rp $ 1}var Ku $ 3=Jp;async function qp(Ra,qa,td){let{node:rd}=td,nd=N $ 4(!1,rd.quasis[0].value.raw,/((?: \\ \\ )*) \\ ` / gu , ( cd , dd ) => "\\" . repeat ( dd . length / 2 ) + "`" ) , ad = Wp$1 ( nd ) , sd = ad !== "" ; sd && ( nd = N$4 ( ! 1 , nd , new RegExp ( ` ^ ${ ad } ` , "gmu" ) , "" ) ) ; let ud = Wr$2 ( await Ra ( nd , { parser : "markdown" , _ _inJsTemplate : ! 0 } ) , ! 0 ) ; return [ "`" , sd ? f$1 ( [ E$2 , ud ] ) : [ Rr$1 , du$3 ( ud ) ] , E$2 , "`" ] } function Wp$1 ( Ra ) { let qa = Ra . match ( /^([^\S\n]*)\S/mu ) ; return qa === null ? "" : qa [ 1 ] } function Gp ( Ra ) { if ( Up ( Ra ) ) return qp } function Up ( { node : Ra , parent : qa } ) { return ( qa == null ? void 0 : qa . type ) === "TaggedTemplateExpression" && Ra . quasis . length === 1 && qa . tag . type === "Identifier" && ( qa . tag . name === "md" || qa . tag . name === "markdown" ) } var zu$1 = Gp ; function Np$1 ( Ra ) { let { node : qa } = Ra ; if ( qa . type !== "TemplateLiteral" || Xp ( qa ) ) return ; let td ; for ( let rd of [ Hu$3 , Vu$3 , Ku$3 , zu$1 ] ) if ( td = rd ( Ra ) , ! ! td ) return qa . quasis . length === 1 && qa . quasis [ 0 ] . value . raw . trim ( ) === "" ? "``" : async ( ... nd ) => { let ad = await td ( ... nd ) ; return ad && it$2 ( { embed : ! 0 , ... ad . label } , ad ) } } function Xp ( { quasis : Ra } ) { return Ra . some ( ( { value : { cooked : qa } } ) => qa === null ) } var Qu$3 = Np$1 , Yp = /\*\/$/ , Hp$1 = /^\/\*\*?/ , ri$4 = /^\s*(\/\*\*?(.|\r?\n)*?\*\/)/ , Vp$1 = /(^|\s+)\/\/([^\n\r]*)/g , Zu$4 = /^(\r?\n)+/ , $p = /(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g , ei$3 = /(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g , Kp$1 = /(\r?\n|^) *\* ?/g , ni$4 = [ ] ; function si$3 ( Ra ) { let qa = Ra . match ( ri$4 ) ; return qa ? qa [ 0 ] . trimStart ( ) : "" } function ui$4 ( Ra ) { let qa = Ra . match ( ri$4 ) , td = qa == null ? void 0 : qa [ 0 ] ; return td == null ? Ra : Ra . slice ( td . length ) } function ii$4 ( Ra ) { let qa = `
` ;Ra=N $ 4(!1,Ra.replace(Hp $ 1,"").replace(Yp,""),Kp $ 1," $ 1");let td="";for(;td!==Ra;)td=Ra,Ra=N $ 4(!1,Ra, $ p, ` $ { qa } $1 $2$ { qa } ` );Ra=Ra.replace(Zu $ 4,"").trimEnd();let rd=Object.create(null),nd=N $ 4(!1,Ra,ei $ 3,"").replace(Zu $ 4,"").trimEnd(),ad;for(;ad=ei $ 3.exec(Ra);){let sd=N $ 4(!1,ad[2],Vp $ 1,"");if(typeof rd[ad[1]]=="string"||Array.isArray(rd[ad[1]])){let ud=rd[ad[1]];rd[ad[1]]=[...ni $ 4,...Array.isArray(ud)?ud:[ud],sd]}else rd[ad[1]]=sd}return{comments:nd,pragmas:rd}}function ai $ 3({comments:Ra="",pragmas:qa={}}){let td= `
` ,rd="/**",nd=" *",ad=" */",sd=Object.keys(qa),ud=sd.flatMap(dd=>ti $ 4(dd,qa[dd])).map(dd=> ` $ { nd } $ { dd } $ { td } ` ).join("");if(!Ra){if(sd.length===0)return"";if(sd.length===1&&!Array.isArray(qa[sd[0]])){let dd=qa[sd[0]];return ` $ { rd } $ { ti$4 ( sd [ 0 ] , dd ) [ 0 ] } $ { ad } ` }}let cd=Ra.split(td).map(dd=> ` $ { nd } $ { dd } ` ).join(td)+td;return rd+td+(Ra?cd:"")+(Ra&&sd.length>0?nd+td:"")+ud+ad}function ti $ 4(Ra,qa){return[...ni $ 4,...Array.isArray(qa)?qa:[qa]].map(td=> ` @ $ { Ra } $ { td } ` .trim())}function zp $ 1(Ra){if(!Ra.startsWith("#!"))return"";let qa=Ra.indexOf( `
` );return qa===-1?Ra:Ra.slice(0,qa)}var oi $ 4=zp $ 1;function Qp(Ra){let qa=oi $ 4(Ra);qa&&(Ra=Ra.slice(qa.length+1));let td=si $ 3(Ra),{pragmas:rd,comments:nd}=ii $ 4(td);return{shebang:qa,text:Ra,pragmas:rd,comments:nd}}function pi $ 5(Ra){let{shebang:qa,text:td,pragmas:rd,comments:nd}=Qp(Ra),ad=ui $ 4(td),sd=ai $ 3({pragmas:{format:"",...rd},comments:nd.trimStart()});return(qa? ` $ { qa }
` :"")+sd+(ad.startsWith( `
2024-09-18 09:46:23 +08:00
` )? `
` : `
2024-09-25 14:23:53 +08:00
` )+ad}function Zp(Ra,qa){let{originalText:td,[Symbol.for("comments")]:rd,locStart:nd,locEnd:ad,[Symbol.for("printedComments")]:sd}=qa,{node:ud}=Ra,cd=nd(ud),dd=ad(ud);for(let pd of rd)nd(pd)>=cd&&ad(pd)<=dd&&sd.add(pd);return td.slice(cd,dd)}var ci $ 3=Zp;function us $ 1(Ra,qa){var td,rd,nd,ad,sd,ud,cd,dd,pd;if(Ra.isRoot)return!1;let{node:fd,key:Td,parent:Ad}=Ra;if(qa.__isInHtmlInterpolation&&!qa.bracketSpacing&&nc $ 2(fd)&&or $ 2(Ra))return!0;if(ec $ 1(fd))return!1;if(fd.type==="Identifier"){if((td=fd.extra)!=null&&td.parenthesized&&/^PRETTIER_HTML_PLACEHOLDER_ \d +_ \d +_IN_JS $ /u.test(fd.name)||Td==="left"&&(fd.name==="async"&&!Ad.await||fd.name==="let")&&Ad.type==="ForOfStatement")return!0;if(fd.name==="let"){let Sd=(rd=Ra.findAncestor(Dd=>Dd.type==="ForOfStatement"))==null?void 0:rd.left;if(Sd&&ie $ 2(Sd,Dd=>Dd===fd))return!0}if(Td==="object"&&fd.name==="let"&&Ad.type==="MemberExpression"&&Ad.computed&&!Ad.optional){let Sd=Ra.findAncestor(Ld=>Ld.type==="ExpressionStatement"||Ld.type==="ForStatement"||Ld.type==="ForInStatement"),Dd=Sd?Sd.type==="ExpressionStatement"?Sd.expression:Sd.type==="ForStatement"?Sd.init:Sd.left:void 0;if(Dd&&ie $ 2(Dd,Ld=>Ld===fd))return!0}if(Td==="expression")switch(fd.name){case"await":case"interface":case"module":case"using":case"yield":case"let":case"component":case"hook":case"type":{let Sd=Ra.findAncestor(Dd=>!Te $ 2(Dd));if(Sd!==Ad&&Sd.type==="ExpressionStatement")return!0}}return!1}if(fd.type==="ObjectExpression"||fd.type==="FunctionExpression"||fd.type==="ClassExpression"||fd.type==="DoExpression"){let Sd=(nd=Ra.findAncestor(Dd=>Dd.type==="ExpressionStatement"))==null?void 0:nd.expression;if(Sd&&ie $ 2(Sd,Dd=>Dd===fd))return!0}if(fd.type==="ObjectExpression"){let Sd=(ad=Ra.findAncestor(Dd=>Dd.type==="ArrowFunctionExpression"))==null?void 0:ad.body;if(Sd&&Sd.type!=="SequenceExpression"&&Sd.type!=="AssignmentExpression"&&ie $ 2(Sd,Dd=>Dd===fd))return!0}switch(Ad.type){case"ParenthesizedExpression":return!1;case"ClassDeclaration":case"ClassExpression":if(Td==="superClass"&&(fd.type==="ArrowFunctionExpression"||fd.type==="AssignmentExpression"||fd.type==="AwaitExpression"||fd.type==="BinaryExpression"||fd.type==="ConditionalExpression"||fd.type==="LogicalExpression"||fd.type==="NewExpression"||fd.type==="ObjectExpression"||fd.type==="SequenceExpression"||fd.type==="TaggedTemplateExpression"||fd.type==="UnaryExpression"||fd.type==="UpdateExpression"||fd.type==="YieldExpression"||fd.type==="TSNonNullExpression"||fd.type==="ClassExpression"&&w $ 1(fd.decorators)))return!0;break;case"ExportDefaultDeclaration":return li $ 4(Ra,qa)||fd.type==="SequenceExpression";case"Decorator":if(Td==="expression"&&!uc $ 2(fd))return!0;break;case"TypeAnnotation":if(Ra.match(void 0,void 0,(Sd,Dd)=>Dd==="returnType"&&Sd.type==="ArrowFunctionExpression")&&rc $ 3(fd))return!0;break;case"BinaryExpression":if(Td==="left"&&(Ad.operator==="in"||Ad.operator==="instanceof")&&fd.type==="UnaryExpression")return!0;break;case"VariableDeclarator":if(Td==="init"&&Ra.match(void 0,void 0,(Sd,Dd)=>Dd==="declarations"&&Sd.type==="VariableDeclaration",(Sd,Dd)=>Dd==="left"&&Sd.type==="ForInStatement"))return!0;break}switch(fd.type){case"UpdateExpression":if(Ad.type==="UnaryExpression")return fd.prefix&&(fd.operator==="++"&&Ad.operator==="+"||fd.operator==="--"&&Ad.operator==="-");case"UnaryExpression":switch(Ad.type){case"UnaryExpression":return fd.operator===Ad.operator&&(fd.operator==="+"||fd.operator==="-");case"BindExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return Td==="object";case"TaggedTemplateExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return Td==="callee";case"BinaryExpression":return Td==="left"&&Ad.operator==="**";case"TSNonNullExpression":return!0;default:return!1}case"BinaryExpression":if(Ad.type==="UpdateExpression"||fd.operator==="in"&&tc $ 1(Ra))return!0;if(fd.operator==="|>"&&(sd=fd.extra)!=null&&sd.parenthesized){let Sd=Ra.grandparent;if(Sd.type==="BinaryExpression"&&Sd.operator==="|>")return!0}case"TSTypeAssertion":case"TSAsExpression":case"TSSatisfiesExpression":cas
2024-09-28 20:51:35 +08:00
\ r ` ),ms $ 2=Ra=>Ra===""||Ra===x $ 3||Ra===F $ 1||Ra===E $ 2;function cc(Ra,qa,td){var rd,nd,ad;let{node:sd}=Ra;if(sd.type==="JSXElement"&&gc $ 1(sd))return[td("openingElement"),td("closingElement")];let ud=sd.type==="JSXElement"?td("openingElement"):td("openingFragment"),cd=sd.type==="JSXElement"?td("closingElement"):td("closingFragment");if(sd.children.length===1&&sd.children[0].type==="JSXExpressionContainer"&&(sd.children[0].expression.type==="TemplateLiteral"||sd.children[0].expression.type==="TaggedTemplateExpression"))return[ud,...Ra.map(td,"children"),cd];sd.children=sd.children.map(Hd=>Sc(Hd)?{type:"JSXText",value:" ",raw:" "}:Hd);let dd=sd.children.some(X $ 4),pd=sd.children.filter(Hd=>Hd.type==="JSXExpressionContainer").length>1,fd=sd.type==="JSXElement"&&sd.openingElement.attributes.length>1,Td=ne $ 3(ud)||dd||fd||pd,Ad=Ra.parent.rootMarker==="mdx",Sd=qa.singleQuote?"{' '}":'{" "}',Dd=Ad?" ":b $ 2([Sd,E $ 2]," "),Ld=((nd=(rd=sd.openingElement)==null?void 0:rd.name)==null?void 0:nd.name)==="fbt",Rd=lc $ 2(Ra,qa,td,Dd,Ld),Od=sd.children.some(Hd=>pr $ 2(Hd));for(let Hd=Rd.length-2;Hd>=0;Hd--){let Wd=Rd[Hd]===""&&Rd[Hd+1]==="",Zd=Rd[Hd]===F $ 1&&Rd[Hd+1]===""&&Rd[Hd+2]===F $ 1,zd=(Rd[Hd]===E $ 2||Rd[Hd]===F $ 1)&&Rd[Hd+1]===""&&Rd[Hd+2]===Dd,Qd=Rd[Hd]===Dd&&Rd[Hd+1]===""&&(Rd[Hd+2]===E $ 2||Rd[Hd+2]===F $ 1),Jd=Rd[Hd]===Dd&&Rd[Hd+1]===""&&Rd[Hd+2]===Dd,hf=Rd[Hd]===E $ 2&&Rd[Hd+1]===""&&Rd[Hd+2]===F $ 1||Rd[Hd]===F $ 1&&Rd[Hd+1]===""&&Rd[Hd+2]===E $ 2;Zd&&Od||Wd||zd||Jd||hf?Rd.splice(Hd,2):Qd&&Rd.splice(Hd+1,2)}for(;Rd.length>0&&ms $ 2(O $ 3(!1,Rd,-1));)Rd.pop();for(;Rd.length>1&&ms $ 2(Rd[0])&&ms $ 2(Rd[1]);)Rd.shift(),Rd.shift();let Md=[];for(let[Hd,Wd]of Rd.entries()){if(Wd===Dd){if(Hd===1&&Rd[Hd-1]===""){if(Rd.length===2){Md.push(Sd);continue}Md.push([Sd,F $ 1]);continue}else if(Hd===Rd.length-1){Md.push(Sd);continue}else if(Rd[Hd-1]===""&&Rd[Hd-2]===F $ 1){Md.push(Sd);continue}}Md.push(Wd),ne $ 3(Wd)&&(Td=!0)}let jd=Od?qt $ 2(Md):l $ 1(Md,{shouldBreak:!0});if(((ad=qa.cursorNode)==null?void 0:ad.type)==="JSXText"&&sd.children.includes(qa.cursorNode)&&(jd=[Un $ 3,jd,Un $ 3]),Ad)return jd;let Ud=l $ 1([ud,f $ 1([F $ 1,jd]),F $ 1,cd]);return Td?Ud:ze $ 3([l $ 1([ud,...Rd,cd]),Ud])}function lc $ 2(Ra,qa,td,rd,nd){let ad=[];return Ra.each(({node:sd,next:ud})=>{if(sd.type==="JSXText"){let cd=fe $ 3(sd);if(pr $ 2(sd)){let dd=Nr $ 2.split(cd,!0);dd[0]===""&&(ad.push(""),dd.shift(),/ \n /u.test(dd[0])?ad.push(fi $ 3(nd,dd[1],sd,ud)):ad.push(rd),dd.shift());let pd;if(O $ 3(!1,dd,-1)===""&&(dd.pop(),pd=dd.pop()),dd.length===0)return;for(let[fd,Td]of dd.entries())fd%2===1?ad.push(x $ 3):ad.push(Td);pd!==void 0?/ \n /u.test(pd)?ad.push(fi $ 3(nd,O $ 3(!1,ad,-1),sd,ud)):ad.push(rd):ad.push(Di $ 3(nd,O $ 3(!1,ad,-1),sd,ud))}else/ \n /u.test(cd)?cd.match(/ \n /gu).length>1&&ad.push("",F $ 1):ad.push("",rd)}else{let cd=td();if(ad.push(cd),ud&&pr $ 2(ud)){let dd=Nr $ 2.trim(fe $ 3(ud)),[pd]=Nr $ 2.split(dd);ad.push(Di $ 3(nd,pd,sd,ud))}else ad.push(F $ 1)}},"children"),ad}function Di $ 3(Ra,qa,td,rd){return Ra?"":td.type==="JSXElement"&&!td.closingElement||(rd==null?void 0:rd.type)==="JSXElement"&&!rd.closingElement?qa.length===1?E $ 2:F $ 1:E $ 2}function fi $ 3(Ra,qa,td,rd){return Ra?F $ 1:qa.length===1?td.type==="JSXElement"&&!td.closingElement||(rd==null?void 0:rd.type)==="JSXElement"&&!rd.closingElement?F $ 1:E $ 2:F $ 1}var mc=new Set(["ArrayExpression","TupleExpression","JSXAttribute","JSXElement","JSXExpressionContainer","JSXFragment","ExpressionStatement","CallExpression","OptionalCallExpression","ConditionalExpression","JsExpressionRoot"]);function yc $ 1(Ra,qa,td){let{parent:rd}=Ra;if(mc.has(rd.type))return qa;let nd=Ra.match(void 0,sd=>sd.type==="ArrowFunctionExpression",L $ 4,sd=>sd.type==="JSXExpressionContainer"),ad=Be $ 3(Ra,td);return l $ 1([ad?"":b $ 2("("),f $ 1([E $ 2,qa]),E $ 2,ad?"":b $ 2(")")],{shouldBreak:nd})}function Dc(Ra,qa,td){let{node:rd}=Ra,nd=[];if(nd.push(td("name")),rd.value){let ad;if(Q $ 4(rd.value)){let sd=fe $ 3(rd.value),ud=N $ 4(!1,N $ 4(!1,sd.slice(1,-1),"'","'"),""",'"'),cd=xr $ 2(ud,qa.jsxSingleQuote);ud=cd==='"'?N $ 4(!1,ud,'"',"""):N $ 4(!1,ud,"'","'"),ad=Ra.call(()=>ye $ 2(Ra,Ie $ 2(cd+ud+cd),qa),"value")}else ad=td("value");nd.push
2024-09-25 14:23:53 +08:00
` )&&!sd&&!d $ 1(ad.attributes[0]))return l $ 1(["<",td("name"),ad.typeArguments?td("typeArguments"):td("typeParameters")," ",...Ra.map(td,"attributes"),ad.selfClosing?" />":">"]);let ud=(nd=ad.attributes)==null?void 0:nd.some(dd=>Q $ 4(dd.value)&&dd.value.value.includes( `
2024-09-28 20:51:35 +08:00
` )),cd=qa.singleAttributePerLine&&ad.attributes.length>1?F $ 1:x $ 3;return l $ 1(["<",td("name"),ad.typeArguments?td("typeArguments"):td("typeParameters"),f $ 1(Ra.map(()=>[cd,td()],"attributes")),...Fc $ 1(ad,qa,sd)],{shouldBreak:ud})}function Fc $ 1(Ra,qa,td){return Ra.selfClosing?[x $ 3,"/>"]:Cc(Ra,qa,td)?[">"]:[E $ 2,">"]}function Cc(Ra,qa,td){let rd=Ra.attributes.length>0&&d $ 1(O $ 3(!1,Ra.attributes,-1),g $ 3.Trailing);return Ra.attributes.length===0&&!td||(qa.bracketSameLine||qa.jsxBracketSameLine)&&(!td||Ra.attributes.length>0)&&!rd}function Ac(Ra,qa,td){let{node:rd}=Ra,nd=[];nd.push("</");let ad=td("name");return d $ 1(rd.name,g $ 3.Leading|g $ 3.Line)?nd.push(f $ 1([F $ 1,ad]),F $ 1):d $ 1(rd.name,g $ 3.Leading|g $ 3.Block)?nd.push(" ",ad):nd.push(ad),nd.push(">"),nd}function Tc(Ra,qa){let{node:td}=Ra,rd=d $ 1(td),nd=d $ 1(td,g $ 3.Line),ad=td.type==="JSXOpeningFragment";return[ad?"<":"</",f $ 1([nd?F $ 1:rd&&!ad?" ":"",M $ 4(Ra,qa)]),nd?F $ 1:"",">"]}function dc $ 1(Ra,qa,td){let rd=ye $ 2(Ra,cc(Ra,qa,td),qa);return yc $ 1(Ra,rd,qa)}function xc $ 1(Ra,qa){let{node:td}=Ra,rd=d $ 1(td,g $ 3.Line);return[M $ 4(Ra,qa,{indent:rd}),rd?F $ 1:""]}function hc(Ra,qa,td){let{node:rd}=Ra;return["{",Ra.call(({node:nd})=>{let ad=["...",td()];return!d $ 1(nd)||!zn $ 3(Ra)?ad:[f $ 1([E $ 2,ye $ 2(Ra,ad,qa)]),E $ 2]},rd.type==="JSXSpreadAttribute"?"argument":"expression"),"}"]}function Ei $ 2(Ra,qa,td){let{node:rd}=Ra;if(rd.type.startsWith("JSX"))switch(rd.type){case"JSXAttribute":return Dc(Ra,qa,td);case"JSXIdentifier":return rd.name;case"JSXNamespacedName":return P $ 3(":",[td("namespace"),td("name")]);case"JSXMemberExpression":return P $ 3(".",[td("object"),td("property")]);case"JSXSpreadAttribute":case"JSXSpreadChild":return hc(Ra,qa,td);case"JSXExpressionContainer":return fc(Ra,qa,td);case"JSXFragment":case"JSXElement":return dc $ 1(Ra,qa,td);case"JSXOpeningElement":return Ec $ 1(Ra,qa,td);case"JSXClosingElement":return Ac(Ra,qa,td);case"JSXOpeningFragment":case"JSXClosingFragment":return Tc(Ra,qa);case"JSXEmptyExpression":return xc $ 1(Ra,qa);case"JSXText":throw new Error("JSXText should be handled by JSXElement");default:throw new Me $ 4(rd,"JSX")}}function gc $ 1(Ra){if(Ra.children.length===0)return!0;if(Ra.children.length>1)return!1;let qa=Ra.children[0];return qa.type==="JSXText"&&!pr $ 2(qa)}function pr $ 2(Ra){return Ra.type==="JSXText"&&(Nr $ 2.hasNonWhitespaceCharacter(fe $ 3(Ra))||!/ \n /u.test(fe $ 3(Ra)))}function Sc(Ra){return Ra.type==="JSXExpressionContainer"&&Q $ 4(Ra.expression)&&Ra.expression.value===" "&&!d $ 1(Ra.expression)}function Fi $ 1(Ra){let{node:qa,parent:td}=Ra;if(!X $ 4(qa)||!X $ 4(td))return!1;let{index:rd,siblings:nd}=Ra,ad;for(let sd=rd;sd>0;sd--){let ud=nd[sd-1];if(!(ud.type==="JSXText"&&!pr $ 2(ud))){ad=ud;break}}return(ad==null?void 0:ad.type)==="JSXExpressionContainer"&&ad.expression.type==="JSXEmptyExpression"&&Bt $ 4(ad.expression)}function Bc $ 1(Ra){return Bt $ 4(Ra.node)||Fi $ 1(Ra)}var Xr $ 2=Bc $ 1,bc=0;function Yr $ 2(Ra,qa,td){var rd;let{node:nd,parent:ad,grandparent:sd,key:ud}=Ra,cd=ud!=="body"&&(ad.type==="IfStatement"||ad.type==="WhileStatement"||ad.type==="SwitchStatement"||ad.type==="DoWhileStatement"),dd=nd.operator==="|>"&&((rd=Ra.root.extra)==null?void 0:rd.__isUsingHackPipeline),pd=ys $ 2(Ra,td,qa,!1,cd);if(cd)return pd;if(dd)return l $ 1(pd);if(L $ 4(ad)&&ad.callee===nd||ad.type==="UnaryExpression"||q $ 3(ad)&&!ad.computed)return l $ 1([f $ 1([E $ 2,...pd]),E $ 2]);let fd=ad.type==="ReturnStatement"||ad.type==="ThrowStatement"||ad.type==="JSXExpressionContainer"&&sd.type==="JSXAttribute"||nd.operator!=="|"&&ad.type==="JsExpressionRoot"||nd.type!=="NGPipeExpression"&&(ad.type==="NGRoot"&&qa.parser==="__ng_binding"||ad.type==="NGMicrosyntaxExpression"&&sd.type==="NGMicrosyntax"&&sd.body.length===1)||nd===ad.body&&ad.type==="ArrowFunctionExpression"||nd!==ad.body&&ad.type==="ForStatement"||ad.type==="ConditionalExpression"&&sd.type!=="ReturnStatement"&&sd.type!=="ThrowStatement"&&!L $ 4(sd)||ad.type==="TemplateLiteral",Td=ad.type==="AssignmentExpression"||ad.type==="VariableDeclarator"||ad.type==="ClassProperty"||ad.type==="PropertyDefinition"||ad.type==="TSAbstractPropertyDefinition"||ad.type==="ClassPrivateProperty"
2024-09-18 09:46:23 +08:00
` ).split( `
2024-09-28 20:51:35 +08:00
` ),vf=0,Tf=hf.length,_f;++vf<Tf;)_f=hf[vf],_f!==""&&(hf[vf]=Wd+_f);return"[^"+(Jd.label||Jd.identifier)+"]: "+hf.join( `
` )}}function Md(Ud,Hd,Wd){Ud.splice(Ud.indexOf(Hd),0,Wd)}function jd(Ud,Hd,Wd,Zd){for(var zd=Ud.length,Qd=-1;++Qd<zd;)if(Hd[Ud[Qd][0]].apply(Wd,Zd))return!0;return!1}}),Bt $ 3=C $ 1(Ra=>{Ra.isRemarkParser=qa,Ra.isRemarkCompiler=td;function qa(rd){return!!(rd&&rd.prototype&&rd.prototype.blockTokenizers)}function td(rd){return!!(rd&&rd.prototype&&rd.prototype.visitors)}}),Mi $ 1=C $ 1((Ra,qa)=>{var td=Bt $ 3();qa.exports=fd;var rd=9,nd=32,ad=36,sd=48,ud=57,cd=92,dd=["math","math-inline"],pd="math-display";function fd(Sd){let Dd=this.Parser,Ld=this.Compiler;td.isRemarkParser(Dd)&&Td(Dd,Sd),td.isRemarkCompiler(Ld)&&Ad(Ld)}function Td(Sd,Dd){let Ld=Sd.prototype,Rd=Ld.inlineMethods;Md.locator=Od,Ld.inlineTokenizers.math=Md,Rd.splice(Rd.indexOf("text"),0,"math");function Od(jd,Ud){return jd.indexOf(" $ ",Ud)}function Md(jd,Ud,Hd){let Wd=Ud.length,Zd=!1,zd=!1,Qd=0,Jd,hf,vf,Tf,_f,bf,xf;if(Ud.charCodeAt(Qd)===cd&&(zd=!0,Qd++),Ud.charCodeAt(Qd)===ad){if(Qd++,zd)return Hd?!0:jd(Ud.slice(0,Qd))({type:"text",value:" $ "});if(Ud.charCodeAt(Qd)===ad&&(Zd=!0,Qd++),vf=Ud.charCodeAt(Qd),!(vf===nd||vf===rd)){for(Tf=Qd;Qd<Wd;){if(hf=vf,vf=Ud.charCodeAt(Qd+1),hf===ad){if(Jd=Ud.charCodeAt(Qd-1),Jd!==nd&&Jd!==rd&&(vf!==vf||vf<sd||vf>ud)&&(!Zd||vf===ad)){_f=Qd-1,Qd++,Zd&&Qd++,bf=Qd;break}}else hf===cd&&(Qd++,vf=Ud.charCodeAt(Qd+1));Qd++}if(bf!==void 0)return Hd?!0:(xf=Ud.slice(Tf,_f+1),jd(Ud.slice(0,bf))({type:"inlineMath",value:xf,data:{hName:"span",hProperties:{className:dd.concat(Zd&&Dd.inlineMathDouble?[pd]:[])},hChildren:[{type:"text",value:xf}]}}))}}}}function Ad(Sd){let Dd=Sd.prototype;Dd.visitors.inlineMath=Ld;function Ld(Rd){let Od=" $ ";return(Rd.data&&Rd.data.hProperties&&Rd.data.hProperties.className||[]).includes(pd)&&(Od=" $ $ "),Od+Rd.value+Od}}}), $ i $ 1=C $ 1((Ra,qa)=>{var td=Bt $ 3();qa.exports=pd;var rd=10,nd=32,ad=36,sd= `
` ,ud=" $ ",cd=2,dd=["math","math-display"];function pd(){let Ad=this.Parser,Sd=this.Compiler;td.isRemarkParser(Ad)&&fd(Ad),td.isRemarkCompiler(Sd)&&Td(Sd)}function fd(Ad){let Sd=Ad.prototype,Dd=Sd.blockMethods,Ld=Sd.interruptParagraph,Rd=Sd.interruptList,Od=Sd.interruptBlockquote;Sd.blockTokenizers.math=Md,Dd.splice(Dd.indexOf("fencedCode")+1,0,"math"),Ld.splice(Ld.indexOf("fencedCode")+1,0,["math"]),Rd.splice(Rd.indexOf("fencedCode")+1,0,["math"]),Od.splice(Od.indexOf("fencedCode")+1,0,["math"]);function Md(jd,Ud,Hd){var Wd=Ud.length,Zd=0;let zd,Qd,Jd,hf,vf,Tf,_f,bf,xf,Bf,Yf;for(;Zd<Wd&&Ud.charCodeAt(Zd)===nd;)Zd++;for(vf=Zd;Zd<Wd&&Ud.charCodeAt(Zd)===ad;)Zd++;if(Tf=Zd-vf,!(Tf<cd)){for(;Zd<Wd&&Ud.charCodeAt(Zd)===nd;)Zd++;for(_f=Zd;Zd<Wd;){if(zd=Ud.charCodeAt(Zd),zd===ad)return;if(zd===rd)break;Zd++}if(Ud.charCodeAt(Zd)===rd){if(Hd)return!0;for(Qd=[],_f!==Zd&&Qd.push(Ud.slice(_f,Zd)),Zd++,Jd=Ud.indexOf(sd,Zd+1),Jd=Jd===-1?Wd:Jd;Zd<Wd;){for(bf=!1,Bf=Zd,Yf=Jd,hf=Jd,xf=0;hf>Bf&&Ud.charCodeAt(hf-1)===nd;)hf--;for(;hf>Bf&&Ud.charCodeAt(hf-1)===ad;)xf++,hf--;for(Tf<=xf&&Ud.indexOf(ud,Bf)===hf&&(bf=!0,Yf=hf);Bf<=Yf&&Bf-Zd<vf&&Ud.charCodeAt(Bf)===nd;)Bf++;if(bf)for(;Yf>Bf&&Ud.charCodeAt(Yf-1)===nd;)Yf--;if((!bf||Bf!==Yf)&&Qd.push(Ud.slice(Bf,Yf)),bf)break;Zd=Jd+1,Jd=Ud.indexOf(sd,Zd+1),Jd=Jd===-1?Wd:Jd}return Qd=Qd.join( `
2024-09-25 14:23:53 +08:00
` ),jd(Ud.slice(0,Jd))({type:"math",value:Qd,data:{hName:"div",hProperties:{className:dd.concat()},hChildren:[{type:"text",value:Qd}]}})}}}}function Td(Ad){let Sd=Ad.prototype;Sd.visitors.math=Dd;function Dd(Ld){return ` $$
` +Ld.value+ `
$$ ` }}}),Wi=C $ 1((Ra,qa)=>{var td=Mi $ 1(),rd= $ i $ 1();qa.exports=nd;function nd(ad){var sd=ad||{};rd.call(this,sd),td.call(this,sd)}}),Ie $ 1=C $ 1((Ra,qa)=>{qa.exports=rd;var td=Object.prototype.hasOwnProperty;function rd(){for(var nd={},ad=0;ad<arguments.length;ad++){var sd=arguments[ad];for(var ud in sd)td.call(sd,ud)&&(nd[ud]=sd[ud])}return nd}}),Ji $ 2=C $ 1((Ra,qa)=>{typeof Object.create=="function"?qa.exports=function(td,rd){rd&&(td.super_=rd,td.prototype=Object.create(rd.prototype,{constructor:{value:td,enumerable:!1,writable:!0,configurable:!0}}))}:qa.exports=function(td,rd){if(rd){td.super_=rd;var nd=function(){};nd.prototype=rd.prototype,td.prototype=new nd,td.prototype.constructor=td}}}),Zi $ 1=C $ 1((Ra,qa)=>{var td=Ie $ 1(),rd=Ji $ 2();qa.exports=nd;function nd(ad){var sd,ud,cd;rd(pd,ad),rd(dd,pd),sd=pd.prototype;for(ud in sd)cd=sd[ud],cd&&typeof cd=="object"&&(sd[ud]="concat"in cd?cd.concat():td(cd));return pd;function dd(fd){return ad.apply(this,fd)}function pd(){return this instanceof pd?ad.apply(this,arguments):new dd(arguments)}}}),ru $ 2=C $ 1((Ra,qa)=>{qa.exports=td;function td(rd,nd,ad){return sd;function sd(){var ud=ad||this,cd=ud[rd];return ud[rd]=!nd,dd;function dd(){ud[rd]=cd}}}}),nu $ 3=C $ 1((Ra,qa)=>{qa.exports=td;function td(rd){for(var nd=String(rd),ad=[],sd=/ \r ? \n | \r /g;sd.exec(nd);)ad.push(sd.lastIndex);return ad.push(nd.length+1),{toPoint:ud,toPosition:ud,toOffset:cd};function ud(dd){var pd=-1;if(dd>-1&&dd<ad[ad.length-1]){for(;++pd<ad.length;)if(ad[pd]>dd)return{line:pd+1,column:dd-(ad[pd-1]||0)+1,offset:dd}}return{}}function cd(dd){var pd=dd&&dd.line,fd=dd&&dd.column,Td;return!isNaN(pd)&&!isNaN(fd)&&pd-1 in ad&&(Td=(ad[pd-2]||0)+fd-1||0),Td>-1&&Td<ad[ad.length-1]?Td:-1}}}),uu $ 3=C $ 1((Ra,qa)=>{qa.exports=rd;var td=" \\ ";function rd(nd,ad){return sd;function sd(ud){for(var cd=0,dd=ud.indexOf(td),pd=nd[ad],fd=[],Td;dd!==-1;)fd.push(ud.slice(cd,dd)),cd=dd+1,Td=ud.charAt(cd),(!Td||pd.indexOf(Td)===-1)&&fd.push(td),dd=ud.indexOf(td,cd+1);return fd.push(ud.slice(cd)),fd.join("")}}}),au $ 2=C $ 1((Ra,qa)=>{qa.exports={AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´ ",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸ ",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:" ",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"× ",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ"}}),ou $ 2=C $ 1((Ra,qa)=>{qa.exports={0:"<22> ",128:"€",130:"‚ ",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ ",137:"‰",138:"Š",139:"‹ ",140:"Œ",142:"Ž",145:"‘ ",146:"’ ",147:"“",148:"”",149:"•",150:"– ",151:"—",152:"˜ ",153:"™",154:"š",155:"› ",156:"œ",158:"ž",159:"Ÿ"}}),Ne $ 1=C $ 1((Ra,qa)=>{qa.exports=td;function td(rd){var nd=typeof rd=="string"?rd.charCodeAt(0):rd;return nd>=48&&nd<=57}}),lu $ 2=C $ 1((Ra,qa)=>{qa.exports=td;function td(rd){var nd=typeof rd=="string"?rd.charCodeAt(0):rd;return nd>=97&&nd<=102||nd>=65&&nd<=70||nd>=48&&nd<=57}}),Ve $ 2=C $ 1((Ra,qa)=>{qa.exports=td;function td(rd){var nd=typeof rd=="string"?rd.charCodeAt(0):rd;return nd>=97&&nd<=122||nd>=65&&nd<=90}}),pu $ 2=C $ 1((Ra,qa)=>{var td=Ve $ 2(),rd=Ne $ 1();qa.exports=nd;function nd(ad){return td(ad)||rd(ad)}}),du $ 2=C $ 1((Ra,qa)=>{qa.exports={AEli:"Æ",AElig:"Æ",AM:"&",AMP:"&",Aacut:"Á",Aacute:"Á",Abr
2024-09-28 20:51:35 +08:00
` ,Nfr:"𝔑 ",NoBreak:" ",NonBreakingSpace:" ",Nopf:"ℕ ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩 ",Ntild:"Ñ",Ntilde:"Ñ",Nu:"Ν ",OElig:"Œ",Oacut:"Ó",Oacute:"Ó",Ocir:"Ô",Ocirc:"Ô",Ocy:"О ",Odblac:"Ő",Ofr:"𝔒 ",Ograv:"Ò",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο ",Oopf:"𝕆 ",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘ ",Or:"⩔",Oscr:"𝒪 ",Oslas:"Ø",Oslash:"Ø",Otild:"Õ",Otilde:"Õ",Otimes:"⨷",Oum:"Ö",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓 ",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ ",Popf:"ℙ ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫 ",Psi:"Ψ",QUO:'"',QUOT:'"',Qfr:"𝔔 ",Qopf:"ℚ ",Qscr:"𝒬 ",RBarr:"⤐",RE:"®",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р ",Re:"ℜ ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ ",Rho:"Ρ ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь ",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С ",Sfr:"𝔖 ",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊 ",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮 ",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THOR:"Þ",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:" ",Tau:"Τ ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т ",Tfr:"𝔗 ",Therefore:"∴",Theta:"Θ",ThickSpace:" ",ThinSpace:" ",Tilde:"∼ ",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋 ",TripleDot:"⃛",Tscr:"𝒯 ",Tstrok:"Ŧ",Uacut:"Ú",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucir:"Û",Ucirc:"Û",Ucy:"У ",Udblac:"Ű",Ufr:"𝔘 ",Ugrav:"Ù",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃ ",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌 ",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"
` );xf!==-1;)Dd++,bf=xf,xf=_f.indexOf( `
` ,xf+1);bf===-1?Ld+=_f.length:Ld=_f.length-bf,Dd in fd&&(bf!==-1?Ld+=fd[Dd]:Ld<=fd[Dd]&&(Ld=fd[Dd]+1))}function Zd(){var _f=[],bf=Dd+1;return function(){for(var xf=Dd+1;bf<xf;)_f.push((fd[bf]||0)+1),bf++;return _f}}function zd(){var _f={line:Dd,column:Ld};return _f.offset=pd.toOffset(_f),_f}function Qd(_f){this.start=_f,this.end=zd()}function Jd(_f){cd.slice(0,_f.length)!==_f&&pd.file.fail(new Error("Incorrectly eaten value: please report this warning on https://git.io/vg5Ft"),zd())}function hf(){var _f=zd();return bf;function bf(xf,Bf){var Yf=xf.position,Zf=Yf?Yf.start:_f,Vf=[],Pf=Yf&&Yf.end.line,Df=_f.line;if(xf.position=new Qd(Zf),Yf&&Bf&&Yf.indent){if(Vf=Yf.indent,Pf<Df){for(;++Pf<Df;)Vf.push((fd[Pf]||0)+1);Vf.push(_f.column)}Bf=Vf.concat(Bf)}return xf.position.indent=Bf||[],xf}}function vf(_f,bf){var xf=bf?bf.children:Td,Bf=xf[xf.length-1],Yf;return Bf&&_f.type===Bf.type&&(_f.type==="text"||_f.type==="blockquote")&&rd(Bf)&&rd(_f)&&(Yf=_f.type==="text"?nd:ad,_f=Yf.call(pd,Bf,_f)),_f!==Bf&&xf.push(_f),pd.atStart&&Td.length!==0&&pd.exitStart(),_f}function Tf(_f){var bf=Zd(),xf=hf(),Bf=zd();return Jd(_f),Yf.reset=Zf,Zf.test=Vf,Yf.test=Vf,cd=cd.slice(_f.length),Wd(_f),bf=bf(),Yf;function Yf(Pf,Df){return xf(vf(xf(Pf),Df),bf)}function Zf(){var Pf=Yf.apply(null,arguments);return Dd=Bf.line,Ld=Bf.column,cd=_f+cd,Pf}function Vf(){var Pf=xf({});return Dd=Bf.line,Ld=Bf.column,cd=_f+cd,Pf.position}}}}function rd(sd){var ud,cd;return sd.type!=="text"||!sd.position?!0:(ud=sd.position.start,cd=sd.position.end,ud.line!==cd.line||cd.column-ud.column===sd.value.length)}function nd(sd,ud){return sd.value+=ud.value,sd}function ad(sd,ud){return this.options.commonmark||this.options.gfm?ud:(sd.children=sd.children.concat(ud.children),sd)}}),Uu $ 2=C $ 1((Ra,qa)=>{qa.exports=ad;var td=[" \\ "," ` "," * "," { "," } "," [ "," ] "," ( "," ) "," # "," + "," - "," . "," ! "," _ "," > "],rd=td.concat([" ~ "," | " ] ) , nd = rd . concat ( [ `
` ,'"'," $ ","%","&","'",",","/",":",";","<","=","?","@","^"]);ad.default=td,ad.gfm=rd,ad.commonmark=nd;function ad(sd){var ud=sd||{};return ud.commonmark?nd:ud.gfm?rd:td}}),Mu $ 1=C $ 1((Ra,qa)=>{qa.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","legend","li","link","main","menu","menuitem","meta","nav","noframes","ol","optgroup","option","p","param","pre","section","source","title","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]}),Rt $ 3=C $ 1((Ra,qa)=>{qa.exports={position:!0,gfm:!0,commonmark:!1,pedantic:!1,blocks:Mu $ 1()}}),Vu $ 2=C $ 1((Ra,qa)=>{var td=Ie $ 1(),rd=Uu $ 2(),nd=Rt $ 3();qa.exports=ad;function ad(sd){var ud=this,cd=ud.options,dd,pd;if(sd==null)sd={};else if(typeof sd=="object")sd=td(sd);else throw new Error("Invalid value ` "+sd+" ` for setting ` options ` ");for(dd in nd){if(pd=sd[dd],pd==null&&(pd=cd[dd]),dd!=="blocks"&&typeof pd!="boolean"||dd==="blocks"&&typeof pd!="object")throw new Error("Invalid value ` "+pd+" ` for setting ` options . "+dd+" ` ");sd[dd]=pd}return ud.options=sd,ud.escape=rd(sd),ud}}),Hu $ 2=C $ 1((Ra,qa)=>{qa.exports=td;function td(ud){if(ud==null)return sd;if(typeof ud=="string")return ad(ud);if(typeof ud=="object")return"length"in ud?nd(ud):rd(ud);if(typeof ud=="function")return ud;throw new Error("Expected function, string, or object as test")}function rd(ud){return cd;function cd(dd){var pd;for(pd in ud)if(dd[pd]!==ud[pd])return!1;return!0}}function nd(ud){for(var cd=[],dd=-1;++dd<ud.length;)cd[dd]=td(ud[dd]);return pd;function pd(){for(var fd=-1;++fd<cd.length;)if(cd[fd].apply(this,arguments))return!0;return!1}}function ad(ud){return cd;function cd(dd){return!!(dd&&dd.type===ud)}}function sd(){return!0}}),Ku $ 2=C $ 1((Ra,qa)=>{qa.exports=td;function td(rd){return rd}}),Zu $ 3=C $ 1((Ra,qa)=>{qa.exports=ud;var td=Hu $ 2(),rd=Ku $ 2(),nd=!0,ad="skip",sd=!1;ud.CONTINUE=nd,ud.SKIP=ad,ud.EXIT=sd;function ud(dd,pd,fd,Td){var Ad,Sd;typeof pd=="function"&&typeof fd!="function"&&(Td=fd,fd=pd,pd=null),Sd=td(pd),Ad=Td?-1:1,Dd(dd,null,[])();function Dd(Ld,Rd,Od){var Md=typeof Ld=="object"&&Ld!==null?Ld:{},jd;return typeof Md.type=="string"&&(jd=typeof Md.tagName=="string"?Md.tagName:typeof Md.name=="string"?Md.name:void 0,Ud.displayName="node ("+rd(Md.type+(jd?"<"+jd+">":""))+")"),Ud;function Ud(){var Hd=Od.concat(Ld),Wd=[],Zd,zd;if((!pd||Sd(Ld,Rd,Od[Od.length-1]||null))&&(Wd=cd(fd(Ld,Od)),Wd[0]===sd))return Wd;if(Ld.children&&Wd[0]!==ad)for(zd=(Td?Ld.children.length:-1)+Ad;zd>-1&&zd<Ld.children.length;){if(Zd=Dd(Ld.children[zd],zd,Hd)(),Zd[0]===sd)return Zd;zd=typeof Zd[1]=="number"?Zd[1]:zd+Ad}return Wd}}}function cd(dd){return dd!==null&&typeof dd=="object"&&"length"in dd?dd:typeof dd=="number"?[nd,dd]:[dd]}}),ra $ 1=C $ 1((Ra,qa)=>{qa.exports=sd;var td=Zu $ 3(),rd=td.CONTINUE,nd=td.SKIP,ad=td.EXIT;sd.CONTINUE=rd,sd.SKIP=nd,sd.EXIT=ad;function sd(ud,cd,dd,pd){typeof cd=="function"&&typeof dd!="function"&&(pd=dd,dd=cd,cd=null),td(ud,cd,fd,pd);function fd(Td,Ad){var Sd=Ad[Ad.length-1],Dd=Sd?Sd.children.indexOf(Td):null;return dd(Td,Dd,Sd)}}}),na=C $ 1((Ra,qa)=>{var td=ra $ 1();qa.exports=rd;function rd(sd,ud){return td(sd,ud?nd:ad),sd}function nd(sd){delete sd.position}function ad(sd){sd.position=void 0}}),aa $ 2=C $ 1((Ra,qa)=>{var td=Ie $ 1(),rd=na();qa.exports=sd;var nd= `
2024-09-25 14:23:53 +08:00
` ,ad=/ \r \n | \r /g;function sd(){var ud=this,cd=String(ud.file),dd={line:1,column:1,offset:0},pd=td(dd),fd;return cd=cd.replace(ad,nd),cd.charCodeAt(0)===65279&&(cd=cd.slice(1),pd.column++,pd.offset++),fd={type:"root",children:ud.tokenizeBlock(cd,pd),position:{start:dd,end:ud.eof||td(dd)}},ud.options.position||rd(fd,!0),fd}}),sa=C $ 1((Ra,qa)=>{var td=/^[ \t ]*( \n | $ )/;qa.exports=rd;function rd(nd,ad,sd){for(var ud,cd="",dd=0,pd=ad.length;dd<pd&&(ud=td.exec(ad.slice(dd)),ud!=null);)dd+=ud[0].length,cd+=ud[0];if(cd!==""){if(sd)return!0;nd(cd)}}}),Hr $ 2=C $ 1((Ra,qa)=>{var td="",rd;qa.exports=nd;function nd(ad,sd){if(typeof ad!="string")throw new TypeError("expected a string");if(sd===1)return ad;if(sd===2)return ad+ad;var ud=ad.length*sd;if(rd!==ad||typeof rd>"u")rd=ad,td="";else if(td.length>=ud)return td.substr(0,ud);for(;ud>td.length&&sd>1;)sd&1&&(td+=ad),sd>>=1,ad+=ad;return td+=ad,td=td.substr(0,ud),td}}),Mt $ 2=C $ 1((Ra,qa)=>{qa.exports=td;function td(rd){return String(rd).replace(/ \n + $ /,"")}}),pa=C $ 1((Ra,qa)=>{var td=Hr $ 2(),rd=Mt $ 2();qa.exports=dd;var nd= `
` ,ad=" ",sd=" ",ud=4,cd=td(sd,ud);function dd(pd,fd,Td){for(var Ad=-1,Sd=fd.length,Dd="",Ld="",Rd="",Od="",Md,jd,Ud;++Ad<Sd;)if(Md=fd.charAt(Ad),Ud)if(Ud=!1,Dd+=Rd,Ld+=Od,Rd="",Od="",Md===nd)Rd=Md,Od=Md;else for(Dd+=Md,Ld+=Md;++Ad<Sd;){if(Md=fd.charAt(Ad),!Md||Md===nd){Od=Md,Rd=Md;break}Dd+=Md,Ld+=Md}else if(Md===sd&&fd.charAt(Ad+1)===Md&&fd.charAt(Ad+2)===Md&&fd.charAt(Ad+3)===Md)Rd+=cd,Ad+=3,Ud=!0;else if(Md===ad)Rd+=Md,Ud=!0;else{for(jd="";Md===ad||Md===sd;)jd+=Md,Md=fd.charAt(++Ad);if(Md!==nd)break;Rd+=jd+Md,Od+=Md}if(Ld)return Td?!0:pd(Dd)({type:"code",lang:null,meta:null,value:rd(Ld)})}}),ma=C $ 1((Ra,qa)=>{qa.exports=dd;var td= `
2024-09-28 20:51:35 +08:00
` ,rd=" ",nd=" ",ad="~",sd=" ` ",ud=3,cd=4;function dd(pd,fd,Td){var Ad=this,Sd=Ad.options.gfm,Dd=fd.length+1,Ld=0,Rd=" ",Od,Md,jd,Ud,Hd,Wd,Zd,zd,Qd,Jd,hf,vf,Tf;if(Sd){for(;Ld<Dd&&(jd=fd.charAt(Ld),!(jd!==nd&&jd!==rd));)Rd+=jd,Ld++;if(vf=Ld,jd=fd.charAt(Ld),!(jd!==ad&&jd!==sd)){for(Ld++,Md=jd,Od=1,Rd+=jd;Ld<Dd&&(jd=fd.charAt(Ld),jd===Md);)Rd+=jd,Od++,Ld++;if(!(Od<ud)){for(;Ld<Dd&&(jd=fd.charAt(Ld),!(jd!==nd&&jd!==rd));)Rd+=jd,Ld++;for(Ud=" ",Zd=" ";Ld<Dd&&(jd=fd.charAt(Ld),!(jd===td||Md===sd&&jd===Md));)jd===nd||jd===rd?Zd+=jd:(Ud+=Zd+jd,Zd=" "),Ld++;if(jd=fd.charAt(Ld),!(jd&&jd!==td)){if(Td)return!0;Tf=pd.now(),Tf.column+=Rd.length,Tf.offset+=Rd.length,Rd+=Ud,Ud=Ad.decode.raw(Ad.unescape(Ud),Tf),Zd&&(Rd+=Zd),Zd=" ",Jd=" ",hf=" ",zd=" ",Qd=" ";for(var _f=!0;Ld<Dd;){if(jd=fd.charAt(Ld),zd+=Jd,Qd+=hf,Jd=" ",hf=" ",jd!==td){zd+=jd,hf+=jd,Ld++;continue}for(_f?(Rd+=jd,_f=!1):(Jd+=jd,hf+=jd),Zd=" ",Ld++;Ld<Dd&&(jd=fd.charAt(Ld),jd===nd);)Zd+=jd,Ld++;if(Jd+=Zd,hf+=Zd.slice(vf),!(Zd.length>=cd)){for(Zd=" ";Ld<Dd&&(jd=fd.charAt(Ld),jd===Md);)Zd+=jd,Ld++;if(Jd+=Zd,hf+=Zd,!(Zd.length<Od)){for(Zd=" ";Ld<Dd&&(jd=fd.charAt(Ld),!(jd!==nd&&jd!==rd));)Jd+=jd,hf+=jd,Ld++;if(!jd||jd===td)break}}}for(Rd+=zd+Jd,Ld=-1,Dd=Ud.length;++Ld<Dd;)if(jd=Ud.charAt(Ld),jd===nd||jd===rd)Hd||(Hd=Ud.slice(0,Ld));else if(Hd){Wd=Ud.slice(Ld);break}return pd(Rd)({type:" code ",lang:Hd||Ud||null,meta:Wd||null,value:Qd})}}}}}}),Re$3=C$1((Ra,qa)=>{Ra=qa.exports=td;function td(rd){return rd.trim?rd.trim():Ra.right(Ra.left(rd))}Ra.left=function(rd){return rd.trimLeft?rd.trimLeft():rd.replace(/^\s\s*/," " ) } , Ra . right = function ( rd ) { if ( rd . trimRight ) return rd . trimRight ( ) ; for ( var nd = /\s/ , ad = rd . length ; nd . test ( rd . charAt ( -- ad ) ) ; ) ; return rd . slice ( 0 , ad + 1 ) } } ) , Kr$2 = C$1 ( ( Ra , qa ) => { qa . exports = td ; function td ( rd , nd , ad , sd ) { for ( var ud = rd . length , cd = - 1 , dd , pd ; ++ cd < ud ; ) if ( dd = rd [ cd ] , pd = dd [ 1 ] || { } , ! ( pd . pedantic !== void 0 && pd . pedantic !== ad . options . pedantic ) && ! ( pd . commonmark !== void 0 && pd . commonmark !== ad . options . commonmark ) && nd [ dd [ 0 ] ] . apply ( ad , sd ) ) return ! 0 ; return ! 1 } } ) , ba$1 = C$1 ( ( Ra , qa ) => { var td = Re$3 ( ) , rd = Kr$2 ( ) ; qa . exports = cd ; var nd = `
` ,ad=" ",sd=" ",ud=">";function cd(dd,pd,fd){for(var Td=this,Ad=Td.offset,Sd=Td.blockTokenizers,Dd=Td.interruptBlockquote,Ld=dd.now(),Rd=Ld.line,Od=pd.length,Md=[],jd=[],Ud=[],Hd,Wd=0,Zd,zd,Qd,Jd,hf,vf,Tf,_f;Wd<Od&&(Zd=pd.charAt(Wd),!(Zd!==sd&&Zd!==ad));)Wd++;if(pd.charAt(Wd)===ud){if(fd)return!0;for(Wd=0;Wd<Od;){for(Qd=pd.indexOf(nd,Wd),vf=Wd,Tf=!1,Qd===-1&&(Qd=Od);Wd<Od&&(Zd=pd.charAt(Wd),!(Zd!==sd&&Zd!==ad));)Wd++;if(pd.charAt(Wd)===ud?(Wd++,Tf=!0,pd.charAt(Wd)===sd&&Wd++):Wd=vf,Jd=pd.slice(Wd,Qd),!Tf&&!td(Jd)){Wd=vf;break}if(!Tf&&(zd=pd.slice(Wd),rd(Dd,Sd,Td,[dd,zd,!0])))break;hf=vf===Wd?Jd:pd.slice(vf,Qd),Ud.push(Wd-vf),Md.push(hf),jd.push(Jd),Wd=Qd+1}for(Wd=-1,Od=Ud.length,Hd=dd(Md.join(nd));++Wd<Od;)Ad[Rd]=(Ad[Rd]||0)+Ud[Wd],Rd++;return _f=Td.enterBlock(),jd=Td.tokenizeBlock(jd.join(nd),Ld),_f(),Hd({type:"blockquote",children:jd})}}}),xa $ 1=C $ 1((Ra,qa)=>{qa.exports=ud;var td= `
2024-09-25 14:23:53 +08:00
` ,rd=" ",nd=" ",ad="#",sd=6;function ud(cd,dd,pd){for(var fd=this,Td=fd.options.pedantic,Ad=dd.length+1,Sd=-1,Dd=cd.now(),Ld="",Rd="",Od,Md,jd;++Sd<Ad;){if(Od=dd.charAt(Sd),Od!==nd&&Od!==rd){Sd--;break}Ld+=Od}for(jd=0;++Sd<=Ad;){if(Od=dd.charAt(Sd),Od!==ad){Sd--;break}Ld+=Od,jd++}if(!(jd>sd)&&!(!jd||!Td&&dd.charAt(Sd+1)===ad)){for(Ad=dd.length+1,Md="";++Sd<Ad;){if(Od=dd.charAt(Sd),Od!==nd&&Od!==rd){Sd--;break}Md+=Od}if(!(!Td&&Md.length===0&&Od&&Od!==td)){if(pd)return!0;for(Ld+=Md,Md="",Rd="";++Sd<Ad&&(Od=dd.charAt(Sd),!(!Od||Od===td));){if(Od!==nd&&Od!==rd&&Od!==ad){Rd+=Md+Od,Md="";continue}for(;Od===nd||Od===rd;)Md+=Od,Od=dd.charAt(++Sd);if(!Td&&Rd&&!Md&&Od===ad){Rd+=Od;continue}for(;Od===ad;)Md+=Od,Od=dd.charAt(++Sd);for(;Od===nd||Od===rd;)Md+=Od,Od=dd.charAt(++Sd);Sd--}return Dd.column+=Ld.length,Dd.offset+=Ld.length,Ld+=Rd+Md,cd(Ld)({type:"heading",depth:jd,children:fd.tokenizeInline(Rd,Dd)})}}}}),Ba=C $ 1((Ra,qa)=>{qa.exports=dd;var td=" ",rd= `
` ,nd=" ",ad="*",sd="-",ud="_",cd=3;function dd(pd,fd,Td){for(var Ad=-1,Sd=fd.length+1,Dd="",Ld,Rd,Od,Md;++Ad<Sd&&(Ld=fd.charAt(Ad),!(Ld!==td&&Ld!==nd));)Dd+=Ld;if(!(Ld!==ad&&Ld!==sd&&Ld!==ud))for(Rd=Ld,Dd+=Ld,Od=1,Md="";++Ad<Sd;)if(Ld=fd.charAt(Ad),Ld===Rd)Od++,Dd+=Md+Rd,Md="";else if(Ld===nd)Md+=Ld;else return Od>=cd&&(!Ld||Ld===rd)?(Dd+=Md,Td?!0:pd(Dd)({type:"thematicBreak"})):void 0}}), $ t $ 3=C $ 1((Ra,qa)=>{qa.exports=sd;var td=" ",rd=" ",nd=1,ad=4;function sd(ud){for(var cd=0,dd=0,pd=ud.charAt(cd),fd={},Td,Ad=0;pd===td||pd===rd;){for(Td=pd===td?ad:nd,dd+=Td,Td>1&&(dd=Math.floor(dd/Td)*Td);Ad<dd;)fd[++Ad]=cd;pd=ud.charAt(++cd)}return{indent:dd,stops:fd}}}),Oa $ 2=C $ 1((Ra,qa)=>{var td=Re $ 3(),rd=Hr $ 2(),nd= $ t $ 3();qa.exports=cd;var ad= `
` ,sd=" ",ud="!";function cd(dd,pd){var fd=dd.split(ad),Td=fd.length+1,Ad=1/0,Sd=[],Dd,Ld,Rd;for(fd.unshift(rd(sd,pd)+ud);Td--;)if(Ld=nd(fd[Td]),Sd[Td]=Ld.stops,td(fd[Td]).length!==0)if(Ld.indent)Ld.indent>0&&Ld.indent<Ad&&(Ad=Ld.indent);else{Ad=1/0;break}if(Ad!==1/0)for(Td=fd.length;Td--;){for(Rd=Sd[Td],Dd=Ad;Dd&&!(Dd in Rd);)Dd--;fd[Td]=fd[Td].slice(Rd[Dd]+1)}return fd.shift(),fd.join(ad)}}),Ua $ 2=C $ 1((Ra,qa)=>{var td=Re $ 3(),rd=Hr $ 2(),nd=Ne $ 1(),ad= $ t $ 3(),sd=Oa $ 2(),ud=Kr $ 2();qa.exports=Zd;var cd="*",dd="_",pd="+",fd="-",Td=".",Ad=" ",Sd= `
2024-09-28 20:51:35 +08:00
` ,Dd=" ",Ld=")",Rd="x",Od=4,Md=/ \n \n (?! \s * $ )/,jd=/^ \[ ([ X \t x])][ \t ]/,Ud=/^([ \t ]*)([*+-]| \d +[.)])( {1,4}(?! )| | \t | $ |(?= \n ))([^ \n ]*)/,Hd=/^([ \t ]*)([*+-]| \d +[.)])([ \t ]+)/,Wd=/^( {1,4}| \t )?/gm;function Zd(hf,vf,Tf){for(var _f=this,bf=_f.options.commonmark,xf=_f.options.pedantic,Bf=_f.blockTokenizers,Yf=_f.interruptList,Zf=0,Vf=vf.length,Pf=null,Df, $ f,Jf,Xf,Ef,gf,Mf,Gf,ah,Wf,Rf,qf,lh,Uf,wf,Of,jf,uh,_h,nh=!1,wh,hh,Th,Vh;Zf<Vf&&(Xf=vf.charAt(Zf),!(Xf!==Dd&&Xf!==Ad));)Zf++;if(Xf=vf.charAt(Zf),Xf===cd||Xf===pd||Xf===fd)Ef=Xf,Jf=!1;else{for(Jf=!0, $ f="";Zf<Vf&&(Xf=vf.charAt(Zf),!!nd(Xf));) $ f+=Xf,Zf++;if(Xf=vf.charAt(Zf),! $ f||!(Xf===Td||bf&&Xf===Ld)||Tf&& $ f!=="1")return;Pf=parseInt( $ f,10),Ef=Xf}if(Xf=vf.charAt(++Zf),!(Xf!==Ad&&Xf!==Dd&&(xf||Xf!==Sd&&Xf!==""))){if(Tf)return!0;for(Zf=0,Uf=[],wf=[],Of=[];Zf<Vf;){for(gf=vf.indexOf(Sd,Zf),Mf=Zf,Gf=!1,Vh=!1,gf===-1&&(gf=Vf),Df=0;Zf<Vf;){if(Xf=vf.charAt(Zf),Xf===Dd)Df+=Od-Df%Od;else if(Xf===Ad)Df++;else break;Zf++}if(jf&&Df>=jf.indent&&(Vh=!0),Xf=vf.charAt(Zf),ah=null,!Vh){if(Xf===cd||Xf===pd||Xf===fd)ah=Xf,Zf++,Df++;else{for( $ f="";Zf<Vf&&(Xf=vf.charAt(Zf),!!nd(Xf));) $ f+=Xf,Zf++;Xf=vf.charAt(Zf),Zf++, $ f&&(Xf===Td||bf&&Xf===Ld)&&(ah=Xf,Df+= $ f.length+1)}if(ah)if(Xf=vf.charAt(Zf),Xf===Dd)Df+=Od-Df%Od,Zf++;else if(Xf===Ad){for(Th=Zf+Od;Zf<Th&&vf.charAt(Zf)===Ad;)Zf++,Df++;Zf===Th&&vf.charAt(Zf)===Ad&&(Zf-=Od-1,Df-=Od-1)}else Xf!==Sd&&Xf!==""&&(ah=null)}if(ah){if(!xf&&Ef!==ah)break;Gf=!0}else!bf&&!Vh&&vf.charAt(Mf)===Ad?Vh=!0:bf&&jf&&(Vh=Df>=jf.indent||Df>Od),Gf=!1,Zf=Mf;if(Rf=vf.slice(Mf,gf),Wf=Mf===Zf?Rf:vf.slice(Zf,gf),(ah===cd||ah===dd||ah===fd)&&Bf.thematicBreak.call(_f,hf,Rf,!0))break;if(qf=lh,lh=!Gf&&!td(Wf).length,Vh&&jf)jf.value=jf.value.concat(Of,Rf),wf=wf.concat(Of,Rf),Of=[];else if(Gf)Of.length!==0&&(nh=!0,jf.value.push(""),jf.trail=Of.concat()),jf={value:[Rf],indent:Df,trail:[]},Uf.push(jf),wf=wf.concat(Of,Rf),Of=[];else if(lh){if(qf&&!bf)break;Of.push(Rf)}else{if(qf||ud(Yf,Bf,_f,[hf,Rf,!0]))break;jf.value=jf.value.concat(Of,Rf),wf=wf.concat(Of,Rf),Of=[]}Zf=gf+1}for(wh=hf(wf.join(Sd)).reset({type:"list",ordered:Jf,start:Pf,spread:nh,children:[]}),uh=_f.enterList(),_h=_f.enterBlock(),Zf=-1,Vf=Uf.length;++Zf<Vf;)jf=Uf[Zf].value.join(Sd),hh=hf.now(),hf(jf)(zd(_f,jf,hh),wh),jf=Uf[Zf].trail.join(Sd),Zf!==Vf-1&&(jf+=Sd),hf(jf);return uh(),_h(),wh}}function zd(hf,vf,Tf){var _f=hf.offset,bf=hf.options.pedantic?Qd:Jd,xf=null,Bf,Yf;return vf=bf.apply(null,arguments),hf.options.gfm&&(Bf=vf.match(jd),Bf&&(Yf=Bf[0].length,xf=Bf[1].toLowerCase()===Rd,_f[Tf.line]+=Yf,vf=vf.slice(Yf))),{type:"listItem",spread:Md.test(vf),checked:xf,children:hf.tokenizeBlock(vf,Tf)}}function Qd(hf,vf,Tf){var _f=hf.offset,bf=Tf.line;return vf=vf.replace(Hd,xf),bf=Tf.line,vf.replace(Wd,xf);function xf(Bf){return _f[bf]=(_f[bf]||0)+Bf.length,bf++,""}}function Jd(hf,vf,Tf){var _f=hf.offset,bf=Tf.line,xf,Bf,Yf,Zf,Vf,Pf,Df;for(vf=vf.replace(Ud, $ f),Zf=vf.split(Sd),Vf=sd(vf,ad(xf).indent).split(Sd),Vf[0]=Yf,_f[bf]=(_f[bf]||0)+Bf.length,bf++,Pf=0,Df=Zf.length;++Pf<Df;)_f[bf]=(_f[bf]||0)+Zf[Pf].length-Vf[Pf].length,bf++;return Vf.join(Sd);function $ f(Jf,Xf,Ef,gf,Mf){return Bf=Xf+Ef+gf,Yf=Mf,Number(Ef)<10&&Bf.length%2===1&&(Ef=Ad+Ef),xf=Xf+rd(Ad,Ef.length)+gf,xf+Yf}}}),Ga $ 1=C $ 1((Ra,qa)=>{qa.exports=pd;var td= `
` ,rd=" ",nd=" ",ad="=",sd="-",ud=3,cd=1,dd=2;function pd(fd,Td,Ad){for(var Sd=this,Dd=fd.now(),Ld=Td.length,Rd=-1,Od="",Md,jd,Ud,Hd,Wd;++Rd<Ld;){if(Ud=Td.charAt(Rd),Ud!==nd||Rd>=ud){Rd--;break}Od+=Ud}for(Md="",jd="";++Rd<Ld;){if(Ud=Td.charAt(Rd),Ud===td){Rd--;break}Ud===nd||Ud===rd?jd+=Ud:(Md+=jd+Ud,jd="")}if(Dd.column+=Od.length,Dd.offset+=Od.length,Od+=Md+jd,Ud=Td.charAt(++Rd),Hd=Td.charAt(++Rd),!(Ud!==td||Hd!==ad&&Hd!==sd)){for(Od+=Ud,jd=Hd,Wd=Hd===ad?cd:dd;++Rd<Ld;){if(Ud=Td.charAt(Rd),Ud!==Hd){if(Ud!==td)return;Rd--;break}jd+=Ud}return Ad?!0:fd(Od+jd)({type:"heading",depth:Wd,children:Sd.tokenizeInline(Md,Dd)})}}}),Xt $ 2=C $ 1(Ra=>{var qa="[a-zA-Z_:][a-zA-Z0-9:._-]*",td="[^ \" '=<> ` \ \u0000 - \ \u0020 ] + ",rd=" '[^' ] * '",nd=' "[^" ] * "',ad=" ( ? : "+td+" | "+rd+" | "+nd+" ) ",sd=" ( ? : \ \ s + "+qa+" ( ? : \ \ s *= \ \ s * "+ad+" ) ? ) ",ud=" < [ A - Za - z ] [ A - Za - z0 - 9 \ \ - ] * "+sd+" * \ \ s * \ \ / ? > ",cd=" < \ \ / [ A - Za - z ] [ A - Za - z0 - 9 \ \ - ] * \ \ s * > ",dd=" <!-- -- > | <!-- ( ? : - ? [ ^ > - ] ) ( ? : - ? [ ^ - ] ) * -- > ",pd=" < [ ? ] . * ? [ ? ] > ",fd=" < ! [ A - Za - z ] + \ \ s + [ ^ > ] * > ",Td=" < ! \ \ [ CDATA \ \ [ [ \ \ s \ \ S ] * ? \ \ ] \ \ ] > ";Ra.openCloseTag=new RegExp(" ^ ( ? : "+ud+" | "+cd+" ) "),Ra.tag=new RegExp(" ^ ( ? : "+ud+" | "+cd+" | "+dd+" | "+pd+" | "+fd+" | "+Td+" ) ")}),Ka=C$1((Ra,qa)=>{var td=Xt$2().openCloseTag;qa.exports=Md;var rd=" ",nd=" " , ad = `
` ,sd="<",ud=/^<(script|pre|style)(?=( \s |>| $ ))/i,cd=/< \/ (script|pre|style)>/i,dd=/^<!--/,pd=/-->/,fd=/^< \? /,Td=/ \? >/,Ad=/^<![A-Za-z]/,Sd=/>/,Dd=/^<! \[ CDATA \[ /,Ld=/]]>/,Rd=/^ $ /,Od=new RegExp(td.source+" \\ s* $ ");function Md(jd,Ud,Hd){for(var Wd=this,Zd=Wd.options.blocks.join("|"),zd=new RegExp("^</?("+Zd+")(?=( \\ s|/?>| $ ))","i"),Qd=Ud.length,Jd=0,hf,vf,Tf,_f,bf,xf,Bf,Yf=[[ud,cd,!0],[dd,pd,!0],[fd,Td,!0],[Ad,Sd,!0],[Dd,Ld,!0],[zd,Rd,!0],[Od,Rd,!1]];Jd<Qd&&(_f=Ud.charAt(Jd),!(_f!==rd&&_f!==nd));)Jd++;if(Ud.charAt(Jd)===sd){for(hf=Ud.indexOf(ad,Jd+1),hf=hf===-1?Qd:hf,vf=Ud.slice(Jd,hf),Tf=-1,bf=Yf.length;++Tf<bf;)if(Yf[Tf][0].test(vf)){xf=Yf[Tf];break}if(xf){if(Hd)return xf[2];if(Jd=hf,!xf[1].test(vf))for(;Jd<Qd;){if(hf=Ud.indexOf(ad,Jd+1),hf=hf===-1?Qd:hf,vf=Ud.slice(Jd+1,hf),xf[1].test(vf)){vf&&(Jd=hf);break}Jd=hf}return Bf=Ud.slice(0,Jd),jd(Bf)({type:"html",value:Bf})}}}}),ue $ 2=C $ 1((Ra,qa)=>{qa.exports=nd;var td=String.fromCharCode,rd=/ \s /;function nd(ad){return rd.test(typeof ad=="number"?td(ad):ad.charAt(0))}}),Qt $ 1=C $ 1((Ra,qa)=>{var td=xr $ 1();qa.exports=rd;function rd(nd){return td(nd).toLowerCase()}}),io $ 1=C $ 1((Ra,qa)=>{var td=ue $ 2(),rd=Qt $ 1();qa.exports=Rd;var nd='"',ad="'",sd=" \\ ",ud= `
` ,cd=" ",dd=" ",pd="[",fd="]",Td="(",Ad=")",Sd=":",Dd="<",Ld=">";function Rd(jd,Ud,Hd){for(var Wd=this,Zd=Wd.options.commonmark,zd=0,Qd=Ud.length,Jd="",hf,vf,Tf,_f,bf,xf,Bf,Yf;zd<Qd&&(_f=Ud.charAt(zd),!(_f!==dd&&_f!==cd));)Jd+=_f,zd++;if(_f=Ud.charAt(zd),_f===pd){for(zd++,Jd+=_f,Tf="";zd<Qd&&(_f=Ud.charAt(zd),_f!==fd);)_f===sd&&(Tf+=_f,zd++,_f=Ud.charAt(zd)),Tf+=_f,zd++;if(!(!Tf||Ud.charAt(zd)!==fd||Ud.charAt(zd+1)!==Sd)){for(xf=Tf,Jd+=Tf+fd+Sd,zd=Jd.length,Tf="";zd<Qd&&(_f=Ud.charAt(zd),!(_f!==cd&&_f!==dd&&_f!==ud));)Jd+=_f,zd++;if(_f=Ud.charAt(zd),Tf="",hf=Jd,_f===Dd){for(zd++;zd<Qd&&(_f=Ud.charAt(zd),!!Od(_f));)Tf+=_f,zd++;if(_f=Ud.charAt(zd),_f===Od.delimiter)Jd+=Dd+Tf+_f,zd++;else{if(Zd)return;zd-=Tf.length+1,Tf=""}}if(!Tf){for(;zd<Qd&&(_f=Ud.charAt(zd),!!Md(_f));)Tf+=_f,zd++;Jd+=Tf}if(Tf){for(Bf=Tf,Tf="";zd<Qd&&(_f=Ud.charAt(zd),!(_f!==cd&&_f!==dd&&_f!==ud));)Tf+=_f,zd++;if(_f=Ud.charAt(zd),bf=null,_f===nd?bf=nd:_f===ad?bf=ad:_f===Td&&(bf=Ad),!bf)Tf="",zd=Jd.length;else if(Tf){for(Jd+=Tf+_f,zd=Jd.length,Tf="";zd<Qd&&(_f=Ud.charAt(zd),_f!==bf);){if(_f===ud){if(zd++,_f=Ud.charAt(zd),_f===ud||_f===bf)return;Tf+=ud}Tf+=_f,zd++}if(_f=Ud.charAt(zd),_f!==bf)return;vf=Jd,Jd+=Tf+_f,zd++,Yf=Tf,Tf=""}else return;for(;zd<Qd&&(_f=Ud.charAt(zd),!(_f!==cd&&_f!==dd));)Jd+=_f,zd++;if(_f=Ud.charAt(zd),!_f||_f===ud)return Hd?!0:(hf=jd(hf).test().end,Bf=Wd.decode.raw(Wd.unescape(Bf),hf,{nonTerminated:!1}),Yf&&(vf=jd(vf).test().end,Yf=Wd.decode.raw(Wd.unescape(Yf),vf)),jd(Jd)({type:"definition",identifier:rd(xf),label:xf,title:Yf||null,url:Bf}))}}}}function Od(jd){return jd!==Ld&&jd!==pd&&jd!==fd}Od.delimiter=Ld;function Md(jd){return jd!==pd&&jd!==fd&&!td(jd)}}),oo $ 3=C $ 1((Ra,qa)=>{var td=ue $ 2();qa.exports=Dd;var rd=" ",nd= `
` ,ad=" ",sd="-",ud=":",cd=" \\ ",dd="|",pd=1,fd=2,Td="left",Ad="center",Sd="right";function Dd(Ld,Rd,Od){var Md=this,jd,Ud,Hd,Wd,Zd,zd,Qd,Jd,hf,vf,Tf,_f,bf,xf,Bf,Yf,Zf,Vf,Pf,Df, $ f,Jf;if(Md.options.gfm){for(jd=0,Yf=0,zd=Rd.length+1,Qd=[];jd<zd;){if(Df=Rd.indexOf(nd,jd), $ f=Rd.indexOf(dd,jd+1),Df===-1&&(Df=Rd.length), $ f===-1|| $ f>Df){if(Yf<fd)return;break}Qd.push(Rd.slice(jd,Df)),Yf++,jd=Df+1}for(Wd=Qd.join(nd),Ud=Qd.splice(1,1)[0]||[],jd=0,zd=Ud.length,Yf--,Hd=!1,Tf=[];jd<zd;){if(hf=Ud.charAt(jd),hf===dd){if(vf=null,Hd===!1){if(Jf===!1)return}else Tf.push(Hd),Hd=!1;Jf=!1}else if(hf===sd)vf=!0,Hd=Hd||null;else if(hf===ud)Hd===Td?Hd=Ad:vf&&Hd===null?Hd=Sd:Hd=Td;else if(!td(hf))return;jd++}if(Hd!==!1&&Tf.push(Hd),!(Tf.length<pd)){if(Od)return!0;for(Bf=-1,Vf=[],Pf=Ld(Wd).reset({type:"table",align:Tf,children:Vf});++Bf<Yf;){for(Zf=Qd[Bf],Zd={type:"tableRow",children:[]},Bf&&Ld(nd),Ld(Zf).reset(Zd,Pf),zd=Zf.length+1,jd=0,Jd="",_f="",bf=!0;jd<zd;){if(hf=Zf.charAt(jd),hf===rd||hf===ad){_f?Jd+=hf:Ld(hf),jd++;continue}hf===""||hf===dd?bf?Ld(hf):((_f||hf)&&!bf&&(Wd=_f,Jd.length>1&&(hf?(Wd+=Jd.slice(0,-1),Jd=Jd.charAt(Jd.length-1)):(Wd+=Jd,Jd="")),xf=Ld.now(),Ld(Wd)({type:"tableCell",children:Md.tokenizeInline(_f,xf)},Zd)),Ld(Jd+hf),Jd="",_f=""):(Jd&&(_f+=Jd,Jd=""),_f+=hf,hf===cd&&jd!==zd-2&&(_f+=Zf.charAt(jd+1),jd++)),bf=!1,jd++}Bf||Ld(nd+Ud)}return Pf}}}}),lo $ 2=C $ 1((Ra,qa)=>{var td=Re $ 3(),rd=Mt $ 2(),nd=Kr $ 2();qa.exports=dd;var ad=" ",sd= `
` ,ud=" ",cd=4;function dd(pd,fd,Td){for(var Ad=this,Sd=Ad.options,Dd=Sd.commonmark,Ld=Ad.blockTokenizers,Rd=Ad.interruptParagraph,Od=fd.indexOf(sd),Md=fd.length,jd,Ud,Hd,Wd,Zd;Od<Md;){if(Od===-1){Od=Md;break}if(fd.charAt(Od+1)===sd)break;if(Dd){for(Wd=0,jd=Od+1;jd<Md;){if(Hd=fd.charAt(jd),Hd===ad){Wd=cd;break}else if(Hd===ud)Wd++;else break;jd++}if(Wd>=cd&&Hd!==sd){Od=fd.indexOf(sd,Od+1);continue}}if(Ud=fd.slice(Od+1),nd(Rd,Ld,Ad,[pd,Ud,!0]))break;if(jd=Od,Od=fd.indexOf(sd,Od+1),Od!==-1&&td(fd.slice(jd,Od))===""){Od=jd;break}}return Ud=fd.slice(0,Od),Td?!0:(Zd=pd.now(),Ud=rd(Ud),pd(Ud)({type:"paragraph",children:Ad.tokenizeInline(Ud,Zd)}))}}),Do $ 1=C $ 1((Ra,qa)=>{qa.exports=td;function td(rd,nd){return rd.indexOf(" \\ ",nd)}}),Fo $ 1=C $ 1((Ra,qa)=>{var td=Do $ 1();qa.exports=ad,ad.locator=td;var rd= `
` ,nd=" \\ ";function ad(sd,ud,cd){var dd=this,pd,fd;if(ud.charAt(0)===nd&&(pd=ud.charAt(1),dd.escape.indexOf(pd)!==-1))return cd?!0:(pd===rd?fd={type:"break"}:fd={type:"text",value:pd},sd(nd+pd)(fd))}}),tn $ 2=C $ 1((Ra,qa)=>{qa.exports=td;function td(rd,nd){return rd.indexOf("<",nd)}}),yo $ 2=C $ 1((Ra,qa)=>{var td=ue $ 2(),rd=pr $ 1(),nd=tn $ 2();qa.exports=fd,fd.locator=nd,fd.notInLink=!0;var ad="<",sd=">",ud="@",cd="/",dd="mailto:",pd=dd.length;function fd(Td,Ad,Sd){var Dd=this,Ld="",Rd=Ad.length,Od=0,Md="",jd=!1,Ud="",Hd,Wd,Zd,zd,Qd;if(Ad.charAt(0)===ad){for(Od++,Ld=ad;Od<Rd&&(Hd=Ad.charAt(Od),!(td(Hd)||Hd===sd||Hd===ud||Hd===":"&&Ad.charAt(Od+1)===cd));)Md+=Hd,Od++;if(Md){if(Ud+=Md,Md="",Hd=Ad.charAt(Od),Ud+=Hd,Od++,Hd===ud)jd=!0;else{if(Hd!==":"||Ad.charAt(Od+1)!==cd)return;Ud+=cd,Od++}for(;Od<Rd&&(Hd=Ad.charAt(Od),!(td(Hd)||Hd===sd));)Md+=Hd,Od++;if(Hd=Ad.charAt(Od),!(!Md||Hd!==sd))return Sd?!0:(Ud+=Md,Zd=Ud,Ld+=Ud+Hd,Wd=Td.now(),Wd.column++,Wd.offset++,jd&&(Ud.slice(0,pd).toLowerCase()===dd?(Zd=Zd.slice(pd),Wd.column+=pd,Wd.offset+=pd):Ud=dd+Ud),zd=Dd.inlineTokenizers,Dd.inlineTokenizers={text:zd.text},Qd=Dd.enterLink(),Zd=Dd.tokenizeInline(Zd,Wd),Dd.inlineTokenizers=zd,Qd(),Td(Ld)({type:"link",title:null,url:rd(Ud,{nonTerminated:!1}),children:Zd}))}}}}),xo $ 2=C $ 1((Ra,qa)=>{qa.exports=td;function td(rd,nd){var ad=String(rd),sd=0,ud;if(typeof nd!="string")throw new Error("Expected character");for(ud=ad.indexOf(nd);ud!==-1;)sd++,ud=ad.indexOf(nd,ud+nd.length);return sd}}),Bo $ 1=C $ 1((Ra,qa)=>{qa.exports=rd;var td=["www.","http://","https://"];function rd(nd,ad){var sd=-1,ud,cd,dd;if(!this.options.gfm)return sd;for(cd=td.length,ud=-1;++ud<cd;)dd=nd.indexOf(td[ud],ad),dd!==-1&&(sd===-1||dd<sd)&&(sd=dd);return sd}}),Oo=C $ 1((Ra,qa)=>{var td=xo $ 2(),rd=pr $ 1(),nd=Ne $ 1(),ad=Ve $ 2(),sd=ue $ 2(),ud=Bo $ 1();qa.exports=Wd,Wd.locator=ud,Wd.notInLink=!0;var cd=33,dd=38,pd=41,fd=42,Td=44,Ad=45,Sd=46,Dd=58,Ld=59,Rd=63,Od=60,Md=95,jd=126,Ud="(",Hd=")";function Wd(Zd,zd,Qd){var Jd=this,hf=Jd.options.gfm,vf=Jd.inlineTokenizers,Tf=zd.length,_f=-1,bf=!1,xf,Bf,Yf,Zf,Vf,Pf,Df, $ f,Jf,Xf,Ef,gf,Mf,Gf;if(hf){if(zd.slice(0,4)==="www.")bf=!0,Zf=4;else if(zd.slice(0,7).toLowerCase()==="http://")Zf=7;else if(zd.slice(0,8).toLowerCase()==="https://")Zf=8;else return;for(_f=Zf-1,Yf=Zf,xf=[];Zf<Tf;){if(Df=zd.charCodeAt(Zf),Df===Sd){if(_f===Zf-1)break;xf.push(Zf),_f=Zf,Zf++;continue}if(nd(Df)||ad(Df)||Df===Ad||Df===Md){Zf++;continue}break}if(Df===Sd&&(xf.pop(),Zf--),xf[0]!==void 0&&(Bf=xf.length<2?Yf:xf[xf.length-2]+1,zd.slice(Bf,Zf).indexOf("_")===-1)){if(Qd)return!0;for( $ f=Zf,Vf=Zf;Zf<Tf&&(Df=zd.charCodeAt(Zf),!(sd(Df)||Df===Od));)Zf++,Df===cd||Df===fd||Df===Td||Df===Sd||Df===Dd||Df===Rd||Df===Md||Df===jd||( $ f=Zf);if(Zf= $ f,zd.charCodeAt(Zf-1)===pd)for(Pf=zd.slice(Vf,Zf),Jf=td(Pf,Ud),Xf=td(Pf,Hd);Xf>Jf;)Zf=Vf+Pf.lastIndexOf(Hd),Pf=zd.slice(Vf,Zf),Xf--;if(zd.charCodeAt(Zf-1)===Ld&&(Zf--,ad(zd.charCodeAt(Zf-1)))){for( $ f=Zf-2;ad(zd.charCodeAt( $ f));) $ f--;zd.charCodeAt( $ f)===dd&&(Zf= $ f)}return Ef=zd.slice(0,Zf),Mf=rd(Ef,{nonTerminated:!1}),bf&&(Mf="http://"+Mf),Gf=Jd.enterLink(),Jd.inlineTokenizers={text:vf.text},gf=Jd.tokenizeInline(Ef,Zd.now()),Jd.inlineTokenizers=vf,Gf(),Zd(Ef)({type:"link",title:null,url:Mf,children:gf})}}}}),No=C $ 1((Ra,qa)=>{var td=Ne $ 1(),rd=Ve $ 2(),nd=43,ad=45,sd=46,ud=95;qa.exports=cd;function cd(pd,fd){var Td=this,Ad,Sd;if(!this.options.gfm||(Ad=pd.indexOf("@",fd),Ad===-1))return-1;if(Sd=Ad,Sd===fd||!dd(pd.charCodeAt(Sd-1)))return cd.call(Td,pd,Ad+1);for(;Sd>fd&&dd(pd.charCodeAt(Sd-1));)Sd--;return Sd}function dd(pd){return td(pd)||rd(pd)||pd===nd||pd===ad||pd===sd||pd===ud}}),Mo $ 2=C $ 1((Ra,qa)=>{var td=pr $ 1(),rd=Ne $ 1(),nd=Ve $ 2(),ad=No();qa.exports=fd,fd.locator=ad,fd.notInLink=!0;var sd=43,ud=45,cd=46,dd=64,pd=95;function fd(Td,Ad,Sd){var Dd=this,Ld=Dd.options.gfm,Rd=Dd.inlineTokenizers,Od=0,Md=Ad.length,jd=-1,Ud,Hd,Wd,Zd;if(Ld){for(Ud=Ad.charCodeAt(Od);rd(Ud)||nd(Ud)||Ud===sd||Ud===ud||Ud===cd||Ud===pd;)Ud=Ad.charCodeAt(++Od);if(Od!==0&&Ud===dd){for(Od++;Od<Md;){if(Ud=Ad.charCodeAt(Od),rd(Ud)||nd(Ud)||Ud===ud||Ud===cd||Ud===pd){Od++,jd===-1&&Ud===cd&
` ,ad="!",sd='"',ud="'",cd="(",dd=")",pd="<",fd=">",Td="[",Ad=" \\ ",Sd="]",Dd=" ` ";function Ld(Rd,Od,Md){var jd=this,Ud=" ",Hd=0,Wd=Od.charAt(0),Zd=jd.options.pedantic,zd=jd.options.commonmark,Qd=jd.options.gfm,Jd,hf,vf,Tf,_f,bf,xf,Bf,Yf,Zf,Vf,Pf,Df,$f,Jf,Xf,Ef,gf;if(Wd===ad&&(Bf=!0,Ud=Wd,Wd=Od.charAt(++Hd)),Wd===Td&&!(!Bf&&jd.inLink)){for(Ud+=Wd,$f=" ",Hd++,Vf=Od.length,Xf=Rd.now(),Df=0,Xf.column+=Hd,Xf.offset+=Hd;Hd<Vf;){if(Wd=Od.charAt(Hd),bf=Wd,Wd===Dd){for(hf=1;Od.charAt(Hd+1)===Dd;)bf+=Wd,Hd++,hf++;vf?hf>=vf&&(vf=0):vf=hf}else if(Wd===Ad)Hd++,bf+=Od.charAt(Hd);else if((!vf||Qd)&&Wd===Td)Df++;else if((!vf||Qd)&&Wd===Sd)if(Df)Df--;else{if(Od.charAt(Hd+1)!==cd)return;bf+=cd,Jd=!0,Hd++;break}$f+=bf,bf=" ",Hd++}if(Jd){for(Yf=$f,Ud+=$f+bf,Hd++;Hd<Vf&&(Wd=Od.charAt(Hd),!!td(Wd));)Ud+=Wd,Hd++;if(Wd=Od.charAt(Hd),$f=" ",Tf=Ud,Wd===pd){for(Hd++,Tf+=pd;Hd<Vf&&(Wd=Od.charAt(Hd),Wd!==fd);){if(zd&&Wd===nd)return;$f+=Wd,Hd++}if(Od.charAt(Hd)!==fd)return;Ud+=pd+$f+fd,Jf=$f,Hd++}else{for(Wd=null,bf=" ";Hd<Vf&&(Wd=Od.charAt(Hd),!(bf&&(Wd===sd||Wd===ud||zd&&Wd===cd)));){if(td(Wd)){if(!Zd)break;bf+=Wd}else{if(Wd===cd)Df++;else if(Wd===dd){if(Df===0)break;Df--}$f+=bf,bf=" ",Wd===Ad&&($f+=Ad,Wd=Od.charAt(++Hd)),$f+=Wd}Hd++}Ud+=$f,Jf=$f,Hd=Ud.length}for($f=" ";Hd<Vf&&(Wd=Od.charAt(Hd),!!td(Wd));)$f+=Wd,Hd++;if(Wd=Od.charAt(Hd),Ud+=$f,$f&&(Wd===sd||Wd===ud||zd&&Wd===cd))if(Hd++,Ud+=Wd,$f=" ",Zf=Wd===cd?dd:Wd,_f=Ud,zd){for(;Hd<Vf&&(Wd=Od.charAt(Hd),Wd!==Zf);)Wd===Ad&&($f+=Ad,Wd=Od.charAt(++Hd)),Hd++,$f+=Wd;if(Wd=Od.charAt(Hd),Wd!==Zf)return;for(Pf=$f,Ud+=$f+Wd,Hd++;Hd<Vf&&(Wd=Od.charAt(Hd),!!td(Wd));)Ud+=Wd,Hd++}else for(bf=" ";Hd<Vf;){if(Wd=Od.charAt(Hd),Wd===Zf)xf&&($f+=Zf+bf,bf=" "),xf=!0;else if(!xf)$f+=Wd;else if(Wd===dd){Ud+=$f+Zf+bf,Pf=$f;break}else td(Wd)?bf+=Wd:($f+=Zf+bf+Wd,bf=" ",xf=!1);Hd++}if(Od.charAt(Hd)===dd)return Md?!0:(Ud+=dd,Jf=jd.decode.raw(jd.unescape(Jf),Rd(Tf).test().end,{nonTerminated:!1}),Pf&&(_f=Rd(_f).test().end,Pf=jd.decode.raw(jd.unescape(Pf),_f)),gf={type:Bf?" image ":" link ",title:Pf||null,url:Jf},Bf?gf.alt=jd.decode.raw(jd.unescape(Yf),Xf)||null:(Ef=jd.enterLink(),gf.children=jd.tokenizeInline(Yf,Xf),Ef()),Rd(Ud)(gf))}}}}),rs=C$1((Ra,qa)=>{var td=ue$2(),rd=dn$2(),nd=Qt$1();qa.exports=Sd,Sd.locator=rd;var ad=" link ",sd=" image ",ud=" shortcut ",cd=" collapsed ",dd=" full ",pd=" ! ",fd=" [ ",Td=" \ \ ",Ad=" ] ";function Sd(Dd,Ld,Rd){var Od=this,Md=Od.options.commonmark,jd=Ld.charAt(0),Ud=0,Hd=Ld.length,Wd=" ",Zd=" ",zd=ad,Qd=ud,Jd,hf,vf,Tf,_f,bf,xf,Bf;if(jd===pd&&(zd=sd,Zd=jd,jd=Ld.charAt(++Ud)),jd===fd){for(Ud++,Zd+=jd,bf=" ",Bf=0;Ud<Hd;){if(jd=Ld.charAt(Ud),jd===fd)xf=!0,Bf++;else if(jd===Ad){if(!Bf)break;Bf--}jd===Td&&(bf+=Td,jd=Ld.charAt(++Ud)),bf+=jd,Ud++}if(Wd=bf,Jd=bf,jd=Ld.charAt(Ud),jd===Ad){if(Ud++,Wd+=jd,bf=" ",!Md)for(;Ud<Hd&&(jd=Ld.charAt(Ud),!!td(jd));)bf+=jd,Ud++;if(jd=Ld.charAt(Ud),jd===fd){for(hf=" ",bf+=jd,Ud++;Ud<Hd&&(jd=Ld.charAt(Ud),!(jd===fd||jd===Ad));)jd===Td&&(hf+=Td,jd=Ld.charAt(++Ud)),hf+=jd,Ud++;jd=Ld.charAt(Ud),jd===Ad?(Qd=hf?dd:cd,bf+=hf+jd,Ud++):hf=" ",Wd+=bf,bf=" "}else{if(!Jd)return;hf=Jd}if(!(Qd!==dd&&xf))return Wd=Zd+Wd,zd===ad&&Od.inLink?null:Rd?!0:(vf=Dd.now(),vf.column+=Zd.length,vf.offset+=Zd.length,hf=Qd===dd?hf:Jd,Tf={type:zd+" Reference ",identifier:nd(hf),label:hf,referenceType:Qd},zd===ad?(_f=Od.enterLink(),Tf.children=Od.tokenizeInline(Jd,vf),_f()):Tf.alt=Od.decode.raw(Od.unescape(Jd),vf)||null,Dd(Wd)(Tf))}}}}),ns$1=C$1((Ra,qa)=>{qa.exports=td;function td(rd,nd){var ad=rd.indexOf(" * * ",nd),sd=rd.indexOf(" _ _ ",nd);return sd===-1?ad:ad===-1||sd<ad?sd:ad}}),os$1=C$1((Ra,qa)=>{var td=Re$3(),rd=ue$2(),nd=ns$1();qa.exports=cd,cd.locator=nd;var ad=" \ \ ",sd=" * ",ud=" _ ";function cd(dd,pd,fd){var Td=this,Ad=0,Sd=pd.charAt(Ad),Dd,Ld,Rd,Od,Md,jd,Ud;if(!(Sd!==sd&&Sd!==ud||pd.charAt(++Ad)!==Sd)&&(Ld=Td.options.pedantic,Rd=Sd,Md=Rd+Rd,jd=pd.length,Ad++,Od=" ",Sd=" ",!(Ld&&rd(pd.charAt(Ad)))))for(;Ad<jd;){if(Ud=Sd,Sd=pd.charAt(Ad),Sd===Rd&&pd.charAt(Ad+1)===Rd&&(!Ld||!rd(Ud))&&(Sd=pd.charAt(Ad+2),Sd!==Rd))return td(Od)?fd?!0:(Dd=dd.now(),Dd.column+=2,Dd.offset+=2,dd(Md+Od+Md)({type:" strong " , children : Td . tokenizeInline ( Od , Dd ) } ) ) : v
2024-09-25 14:23:53 +08:00
` ,nd);ad>nd&&rd.charAt(ad-1)===" ";)ad--;return ad}}),Os $ 1=C $ 1((Ra,qa)=>{var td=Ts();qa.exports=sd,sd.locator=td;var rd=" ",nd= `
2024-09-28 20:51:35 +08:00
` ,ad=2;function sd(ud,cd,dd){for(var pd=cd.length,fd=-1,Td="",Ad;++fd<pd;){if(Ad=cd.charAt(fd),Ad===nd)return fd<ad?void 0:dd?!0:(Td+=Ad,ud(Td)({type:"break"}));if(Ad!==rd)return;Td+=Ad}}}),Ls $ 1=C $ 1((Ra,qa)=>{qa.exports=td;function td(rd,nd,ad){var sd=this,ud,cd,dd,pd,fd,Td,Ad,Sd,Dd,Ld;if(ad)return!0;for(ud=sd.inlineMethods,pd=ud.length,cd=sd.inlineTokenizers,dd=-1,Dd=nd.length;++dd<pd;)Sd=ud[dd],!(Sd==="text"||!cd[Sd])&&(Ad=cd[Sd].locator,Ad||rd.file.fail("Missing locator: ` "+Sd+" ` "),Td=Ad.call(sd,nd,1),Td!==-1&&Td<Dd&&(Dd=Td));fd=nd.slice(0,Dd),Ld=rd.now(),sd.decode(fd,Ld,Rd);function Rd(Od,Md,jd){rd(jd||Od)({type:"text",value:Od})}}}),Us=C $ 1((Ra,qa)=>{var td=Ie $ 1(),rd=ru $ 2(),nd=nu $ 3(),ad=uu $ 3(),sd=Ou $ 1(),ud=Iu $ 1();qa.exports=cd;function cd(fd,Td){this.file=Td,this.offset={},this.options=td(this.options),this.setOptions({}),this.inList=!1,this.inBlock=!1,this.inLink=!1,this.atStart=!0,this.toOffset=nd(Td).toOffset,this.unescape=ad(this,"escape"),this.decode=sd(this)}var dd=cd.prototype;dd.setOptions=Vu $ 2(),dd.parse=aa $ 2(),dd.options=Rt $ 3(),dd.exitStart=rd("atStart",!0),dd.enterList=rd("inList",!1),dd.enterLink=rd("inLink",!1),dd.enterBlock=rd("inBlock",!1),dd.interruptParagraph=[["thematicBreak"],["list"],["atxHeading"],["fencedCode"],["blockquote"],["html"],["setextHeading",{commonmark:!1}],["definition",{commonmark:!1}]],dd.interruptList=[["atxHeading",{pedantic:!1}],["fencedCode",{pedantic:!1}],["thematicBreak",{pedantic:!1}],["definition",{commonmark:!1}]],dd.interruptBlockquote=[["indentedCode",{commonmark:!0}],["fencedCode",{commonmark:!0}],["atxHeading",{commonmark:!0}],["setextHeading",{commonmark:!0}],["thematicBreak",{commonmark:!0}],["html",{commonmark:!0}],["list",{commonmark:!0}],["definition",{commonmark:!1}]],dd.blockTokenizers={blankLine:sa(),indentedCode:pa(),fencedCode:ma(),blockquote:ba $ 1(),atxHeading:xa $ 1(),thematicBreak:Ba(),list:Ua $ 2(),setextHeading:Ga $ 1(),html:Ka(),definition:io $ 1(),table:oo $ 3(),paragraph:lo $ 2()},dd.inlineTokenizers={escape:Fo $ 1(),autoLink:yo $ 2(),url:Oo(),email:Mo $ 2(),html:Vo $ 1(),link:Qo $ 1(),reference:rs(),strong:os $ 1(),emphasis:ms $ 1(),deletion:ys $ 1(),code:Bs $ 1(),break:Os $ 1(),text:Ls $ 1()},dd.blockMethods=pd(dd.blockTokenizers),dd.inlineMethods=pd(dd.inlineTokenizers),dd.tokenizeBlock=ud("block"),dd.tokenizeInline=ud("inline"),dd.tokenizeFactory=ud;function pd(fd){var Td=[],Ad;for(Ad in fd)Td.push(Ad);return Td}}),Gs=C $ 1((Ra,qa)=>{var td=Zi $ 1(),rd=Ie $ 1(),nd=Us();qa.exports=ad,ad.Parser=nd;function ad(sd){var ud=this.data("settings"),cd=td(nd);cd.prototype.options=rd(cd.prototype.options,ud,sd),this.Parser=cd}}),js $ 1=C $ 1((Ra,qa)=>{qa.exports=td;function td(rd){if(rd)throw rd}}),yn $ 2=C $ 1((Ra,qa)=>{qa.exports=function(td){return td!=null&&td.constructor!=null&&typeof td.constructor.isBuffer=="function"&&td.constructor.isBuffer(td)}}),rc $ 2=C $ 1((Ra,qa)=>{var td=Object.prototype.hasOwnProperty,rd=Object.prototype.toString,nd=Object.defineProperty,ad=Object.getOwnPropertyDescriptor,sd=function(pd){return typeof Array.isArray=="function"?Array.isArray(pd):rd.call(pd)==="[object Array]"},ud=function(pd){if(!pd||rd.call(pd)!=="[object Object]")return!1;var fd=td.call(pd,"constructor"),Td=pd.constructor&&pd.constructor.prototype&&td.call(pd.constructor.prototype,"isPrototypeOf");if(pd.constructor&&!fd&&!Td)return!1;var Ad;for(Ad in pd);return typeof Ad>"u"||td.call(pd,Ad)},cd=function(pd,fd){nd&&fd.name==="__proto__"?nd(pd,fd.name,{enumerable:!0,configurable:!0,value:fd.newValue,writable:!0}):pd[fd.name]=fd.newValue},dd=function(pd,fd){if(fd==="__proto__")if(td.call(pd,fd)){if(ad)return ad(pd,fd).value}else return;return pd[fd]};qa.exports=function pd(){var fd,Td,Ad,Sd,Dd,Ld,Rd=arguments[0],Od=1,Md=arguments.length,jd=!1;for(typeof Rd=="boolean"&&(jd=Rd,Rd=arguments[1]||{},Od=2),(Rd==null||typeof Rd!="object"&&typeof Rd!="function")&&(Rd={});Od<Md;++Od)if(fd=arguments[Od],fd!=null)for(Td in fd)Ad=dd(Rd,Td),Sd=dd(fd,Td),Rd!==Sd&&(jd&&Sd&&(ud(Sd)||(Dd=sd(Sd)))?(Dd?(Dd=!1,Ld=Ad&&sd(Ad)?Ad:[]):Ld=Ad&&ud(Ad)?Ad:{},cd(Rd,{name:Td,newValue:pd(jd,Ld,Sd)})):typeof Sd<"u"&&cd(Rd,{name:Td,newValue:Sd}
2024-09-25 14:23:53 +08:00
Expected it to be 'string' or 'object' . ` ;if(Y $ 2(Ra))throw new Error("doc is valid.");let td=Object.prototype.toString.call(Ra);if(td!=="[object Object]")return ` Unexpected doc '${td}' . ` ;let rd=ll $ 1([...wr $ 1].map(nd=> ` '${nd}' ` ));return ` Unexpected doc . type '${Ra.type}' .
Expected it to be $ { rd } . ` }var Dt $ 3=class extends Error{constructor(td){super(fl $ 1(td));Qm(this,"name","InvalidDocError");this.doc=td}},qe $ 3=Dt $ 3,Nn $ 2={};function Dl $ 2(Ra,qa,td,rd){let nd=[Ra];for(;nd.length>0;){let ad=nd.pop();if(ad===Nn $ 2){td(nd.pop());continue}td&&nd.push(ad,Nn $ 2);let sd=Y $ 2(ad);if(!sd)throw new qe $ 3(ad);if((qa==null?void 0:qa(ad))!==!1)switch(sd){case H $ 2:case J $ 3:{let ud=sd===H $ 2?ad:ad.parts;for(let cd=ud.length,dd=cd-1;dd>=0;--dd)nd.push(ud[dd]);break}case X $ 3:nd.push(ad.flatContents,ad.breakContents);break;case K $ 2:if(rd&&ad.expandedStates)for(let ud=ad.expandedStates.length,cd=ud-1;cd>=0;--cd)nd.push(ad.expandedStates[cd]);else nd.push(ad.contents);break;case re $ 2:case ee $ 2:case se $ 1:case fe $ 2:case ce $ 2:nd.push(ad.contents);break;case $ $ 1:case ge $ 2:case oe $ 2:case le $ 2:case W $ 3:case te $ 2:break;default:throw new qe $ 3(ad)}}}var Rn $ 1=Dl $ 2,Un $ 2=()=>{},kr $ 1=Un $ 2;function Ze $ 2(Ra){return{type:ee $ 2,contents:Ra}}function ve $ 2(Ra,qa){return{type:re $ 2,contents:qa,n:Ra}}function ze $ 2(Ra,qa={}){return kr $ 1(qa.expandedStates),{type:K $ 2,id:qa.id,contents:Ra,break:!!qa.shouldBreak,expandedStates:qa.expandedStates}}function _e $ 2(Ra){return ve $ 2({type:"root"},Ra)}function Ee $ 2(Ra){return{type:J $ 3,parts:Ra}}function zn $ 2(Ra,qa="",td={}){return{type:X $ 3,breakContents:Ra,flatContents:qa,groupId:td.groupId}}var er $ 1={type:te $ 2},rr $ 1={type:W $ 3,hard:!0},pl $ 1={type:W $ 3,hard:!0,literal:!0},Br $ 2={type:W $ 3},qr $ 1={type:W $ 3,soft:!0},L $ 3=[rr $ 1,er $ 1],tr $ 1=[pl $ 1,er $ 1];function Tr $ 1(Ra,qa){let td=[];for(let rd=0;rd<qa.length;rd++)rd!==0&&td.push(Ra),td.push(qa[rd]);return td}function dl $ 1(Ra,qa){if(typeof Ra=="string")return qa(Ra);let td=new Map;return rd(Ra);function rd(ad){if(td.has(ad))return td.get(ad);let sd=nd(ad);return td.set(ad,sd),sd}function nd(ad){switch(Y $ 2(ad)){case H $ 2:return qa(ad.map(rd));case J $ 3:return qa({...ad,parts:ad.parts.map(rd)});case X $ 3:return qa({...ad,breakContents:rd(ad.breakContents),flatContents:rd(ad.flatContents)});case K $ 2:{let{expandedStates:sd,contents:ud}=ad;return sd?(sd=sd.map(rd),ud=sd[0]):ud=rd(ud),qa({...ad,contents:ud,expandedStates:sd})}case re $ 2:case ee $ 2:case se $ 1:case fe $ 2:case ce $ 2:return qa({...ad,contents:rd(ad.contents)});case $ $ 1:case ge $ 2:case oe $ 2:case le $ 2:case W $ 3:case te $ 2:return qa(ad);default:throw new qe $ 3(ad)}}}function Mn $ 1(Ra){if(Ra.length>0){let qa=M $ 3(!1,Ra,-1);!qa.expandedStates&&!qa.break&&(qa.break="propagated")}return null}function Yn $ 2(Ra){let qa=new Set,td=[];function rd(ad){if(ad.type===te $ 2&&Mn $ 1(td),ad.type===K $ 2){if(td.push(ad),qa.has(ad))return!1;qa.add(ad)}}function nd(ad){ad.type===K $ 2&&td.pop().break&&Mn $ 1(td)}Rn $ 1(Ra,rd,nd,!0)}function Ce $ 1(Ra,qa=tr $ 1){return dl $ 1(Ra,td=>typeof td=="string"?Tr $ 1(qa,td.split( `
` )):td)}function hl $ 1(Ra,qa){let td=Ra.match(new RegExp( ` ( $ { Be$2 ( qa ) } ) + ` ,"gu"));return td===null?0:td.reduce((rd,nd)=>Math.max(rd,nd.length/qa.length),0)}var _r $ 1=hl $ 1;function ml $ 1(Ra,qa){let td=Ra.match(new RegExp( ` ( $ { Be$2 ( qa ) } ) + ` ,"gu"));if(td===null)return 0;let rd=new Map,nd=0;for(let ad of td){let sd=ad.length/qa.length;rd.set(sd,!0),sd>nd&&(nd=sd)}for(let ad=1;ad<nd;ad++)if(!rd.get(ad))return ad;return nd+1}var Gn $ 3=ml $ 1,Sr $ 1="'",Vn $ 2='"';function Fl $ 1(Ra,qa){let td=qa===!0||qa===Sr $ 1?Sr $ 1:Vn $ 2,rd=td===Sr $ 1?Vn $ 2:Sr $ 1,nd=0,ad=0;for(let sd of Ra)sd===td?nd++:sd===rd&&ad++;return nd>ad?rd:td}var jn $ 2=Fl $ 1,pt $ 2=class extends Error{constructor(td,rd,nd="type"){super( ` Unexpected $ { rd } node $ { nd } : $ { JSON . stringify ( td [ nd ] ) } . ` );Qm(this,"name","UnexpectedNodeError");this.node=td}}, $ n $ 3=pt $ 2,Xn $ 3=Ue $ 2(xr $ 1());function gl $ 1(Ra){return(Ra==null?void 0:Ra.type)==="front-matter"}var Hn $ 1=gl $ 1,nr $ 1=3;function vl $ 1(Ra){let qa=Ra.slice(0,nr $ 1);if(qa!=="---"&&qa!=="+++")return;let td=Ra.indexOf( `
` ,nr $ 1);if(td===-1)return;let rd=Ra.slice(nr $ 1,td).trim(),nd=Ra.indexOf( `
$ { qa } ` ,td),ad=rd;if(ad||(ad=qa==="+++"?"toml":"yaml"),nd===-1&&qa==="---"&&ad==="yaml"&&(nd=Ra.indexOf( `
... ` ,td)),nd===-1)return;let sd=nd+1+nr $ 1,ud=Ra.charAt(sd+1);if(!/ \s ?/u.test(ud))return;let cd=Ra.slice(0,sd);return{type:"front-matter",language:ad,explicitLanguage:rd,value:Ra.slice(td+1,nd),startDelimiter:qa,endDelimiter:cd.slice(-nr $ 1),raw:cd}}function El $ 2(Ra){let qa=vl $ 1(Ra);if(!qa)return{content:Ra};let{raw:td}=qa;return{frontMatter:qa,content:N $ 3(!1,td,/[^ \n ]/gu," ")+Ra.slice(td.length)}}var ir $ 2=El $ 2,Wn $ 1=["format","prettier"];function dt $ 2(Ra){let qa= ` @ ( $ { Wn$1 . join ( "|" ) } ) ` ,td=new RegExp([ ` <!-- \ \ s * $ { qa } \ \ s * -- > ` , ` \ \ { \ \ s * \ \ / \ \ * \ \ s * $ { qa } \ \ s * \ \ * \ \ / \ \ s * \ \ } ` , ` <!-- . * \ r ?
2024-09-18 09:46:23 +08:00
[ \ \ s \ \ S ] * ( ^ |
) [ ^ \ \ S
] * $ { qa } [ ^ \ \ S
] * ( $ |
) [ \ \ s \ \ S ] *
2024-09-25 14:23:53 +08:00
. * -- > ` ].join("|"),"mu"),rd=Ra.match(td);return(rd==null?void 0:rd.index)===0}var Kn $ 2=Ra=>dt $ 2(ir $ 2(Ra).content.trimStart()),Jn $ 3=Ra=>{let qa=ir $ 2(Ra),td= ` <!-- @ $ { Wn$1 [ 0 ] } -- > ` ;return qa.frontMatter? ` $ { qa . frontMatter . raw }
2024-09-18 09:46:23 +08:00
2024-09-25 14:23:53 +08:00
$ { td }
2024-09-18 09:46:23 +08:00
2024-09-25 14:23:53 +08:00
$ { qa . content } ` : ` $ { td }
2024-09-18 09:46:23 +08:00
2024-09-25 14:23:53 +08:00
$ { qa . content } ` },Cl $ 1=new Set(["position","raw"]);function Qn $ 3(Ra,qa,td){if((Ra.type==="front-matter"||Ra.type==="code"||Ra.type==="yaml"||Ra.type==="import"||Ra.type==="export"||Ra.type==="jsx")&&delete qa.value,Ra.type==="list"&&delete qa.isAligned,(Ra.type==="list"||Ra.type==="listItem")&&delete qa.spread,Ra.type==="text")return null;if(Ra.type==="inlineCode"&&(qa.value=N $ 3(!1,Ra.value, `
` ," ")),Ra.type==="wikiLink"&&(qa.value=N $ 3(!1,Ra.value.trim(),/[ \t \n ]+/gu," ")),(Ra.type==="definition"||Ra.type==="linkReference"||Ra.type==="imageReference")&&(qa.label=(0,Xn $ 3.default)(Ra.label)),(Ra.type==="link"||Ra.type==="image")&&Ra.url&&Ra.url.includes("("))for(let rd of"<>")qa.url=N $ 3(!1,Ra.url,rd,encodeURIComponent(rd));if((Ra.type==="definition"||Ra.type==="link"||Ra.type==="image")&&Ra.title&&(qa.title=N $ 3(!1,Ra.title,/ \\ (?=["')])/gu,"")),(td==null?void 0:td.type)==="root"&&td.children.length>0&&(td.children[0]===Ra||Hn $ 1(td.children[0])&&td.children[1]===Ra)&&Ra.type==="html"&&dt $ 2(Ra.value))return null}Qn $ 3.ignoredProperties=Cl $ 1;var Zn $ 2=Qn $ 3,ei $ 2=/(?:[ \u 02ea- \u 02eb \u 1100- \u 11ff \u 2e80- \u 2e99 \u 2e9b- \u 2ef3 \u 2f00- \u 2fd5 \u 2ff0- \u 303f \u 3041- \u 3096 \u 3099- \u 309f \u 30a1- \u 30fa \u 30fc- \u 30ff \u 3105- \u 312f \u 3131- \u 318e \u 3190- \u 4dbf \u 4e00- \u 9fff \u a700- \u a707 \u a960- \u a97c \u ac00- \u d7a3 \u d7b0- \u d7c6 \u d7cb- \u d7fb \u f900- \u fa6d \u fa70- \u fad9 \u fe10- \u fe1f \u fe30- \u fe6f \u ff00- \u ffef]|[ \u d840- \u d868 \u d86a- \u d86c \u d86f- \u d872 \u d874- \u d879 \u d880- \u d883 \u d885- \u d887][ \u dc00- \u dfff]| \u d81b[ \u dfe3]| \u d82b[ \u dff0- \u dff3 \u dff5- \u dffb \u dffd- \u dffe]| \u d82c[ \u dc00- \u dd22 \u dd32 \u dd50- \u dd52 \u dd55 \u dd64- \u dd67]| \u d83c[ \u de00 \u de50- \u de51]| \u d869[ \u dc00- \u dedf \u df00- \u dfff]| \u d86d[ \u dc00- \u df39 \u df40- \u dfff]| \u d86e[ \u dc00- \u dc1d \u dc20- \u dfff]| \u d873[ \u dc00- \u dea1 \u deb0- \u dfff]| \u d87a[ \u dc00- \u dfe0]| \u d87e[ \u dc00- \u de1d]| \u d884[ \u dc00- \u df4a \u df50- \u dfff]| \u d888[ \u dc00- \u dfaf])(?:[ \u fe00- \u fe0f]| \u db40[ \u dd00- \u ddef])?/u,Se $ 2=new RegExp("(?:[ \\ u0021- \\ u002f \\ u003a- \\ u0040 \\ u005b- \\ u0060 \\ u007b- \\ u007e]| \\ p{General_Category=Connector_Punctuation}| \\ p{General_Category=Dash_Punctuation}| \\ p{General_Category=Close_Punctuation}| \\ p{General_Category=Final_Punctuation}| \\ p{General_Category=Initial_Punctuation}| \\ p{General_Category=Other_Punctuation}| \\ p{General_Category=Open_Punctuation})","u");async function bl $ 1(Ra,qa){if(Ra.language==="yaml"){let td=Ra.value.trim(),rd=td?await qa(td,{parser:"yaml"}):"";return _e $ 2([Ra.startDelimiter,Ra.explicitLanguage,L $ 3,rd,rd?L $ 3:"",Ra.endDelimiter])}}var ri $ 3=bl $ 1,yl $ 1=Ra=>String(Ra).split(/[/ \\ ]/u).pop();function ti $ 3(Ra,qa){if(!qa)return;let td=yl $ 1(qa).toLowerCase();return Ra.find(({filenames:rd})=>rd==null?void 0:rd.some(nd=>nd.toLowerCase()===td))??Ra.find(({extensions:rd})=>rd==null?void 0:rd.some(nd=>td.endsWith(nd)))}function Al $ 2(Ra,qa){if(qa)return Ra.find(({name:td})=>td.toLowerCase()===qa)??Ra.find(({aliases:td})=>td==null?void 0:td.includes(qa))??Ra.find(({extensions:td})=>td==null?void 0:td.includes( ` . $ { qa } ` ))}function xl $ 2(Ra,qa){let td=Ra.plugins.flatMap(nd=>nd.languages??[]),rd=Al $ 2(td,qa.language)??ti $ 3(td,qa.physicalFile)??ti $ 3(td,qa.file)??(qa.physicalFile,void 0);return rd==null?void 0:rd.parsers[0]}var ni $ 3=xl $ 2,wl $ 1=new Proxy(()=>{},{get:()=>wl $ 1});function Oe $ 2(Ra){return Ra.position.start.offset}function Pe $ 2(Ra){return Ra.position.end.offset}var ht $ 2=new Set(["liquidNode","inlineCode","emphasis","esComment","strong","delete","wikiLink","link","linkReference","image","imageReference","footnote","footnoteReference","sentence","whitespace","word","break","inlineMath"]),Or $ 1=new Set([...ht $ 2,"tableCell","paragraph","heading"]),Le $ 2="non-cjk",De $ 1="cj-letter",be $ 3="k-letter",ur $ 1="cjk-punctuation",kl $ 2=new RegExp(" \\ p{Script_Extensions=Hangul}","u");function Pr $ 1(Ra){let qa=[],td=Ra.split(/([ \t \n ]+)/u);for(let[nd,ad]of td.entries()){if(nd%2===1){qa.push({type:"whitespace",value:/ \n /u.test(ad)? `
` :" "});continue}if((nd===0||nd===td.length-1)&&ad==="")continue;let sd=ad.split(new RegExp( ` ( $ { ei$2 . source } ) ` ,"u"));for(let[ud,cd]of sd.entries())if(!((ud===0||ud===sd.length-1)&&cd==="")){if(ud%2===0){cd!==""&&rd({type:"word",value:cd,kind:Le $ 2,hasLeadingPunctuation:Se $ 2.test(cd[0]),hasTrailingPunctuation:Se $ 2.test(M $ 3(!1,cd,-1))});continue}rd(Se $ 2.test(cd)?{type:"word",value:cd,kind:ur $ 1,hasLeadingPunctuation:!0,hasTrailingPunctuation:!0}:{type:"word",value:cd,kind:kl $ 2.test(cd)?be $ 3:De $ 1,hasLeadingPunctuation:!1,hasTrailingPunctuation:!1})}}return qa;function rd(nd){let ad=M $ 3(!1,qa,-1);(ad==null?void 0:ad.type)==="word"&&!sd(Le $ 2,ur $ 1)&&![ad.value,nd.value].some(ud=>/ \u 3000/u.test(ud))&&qa.push({type:"whitespace",value:""}),qa.push(nd);function sd(ud,cd){return ad.kind===ud&&nd.kind===cd||ad.kind===cd&&nd.kind===ud}}}function Me $ 3(Ra,qa){let td=qa.originalText.slice(Ra.position.start.offset,Ra.position.end.offset),{numberText:rd,leadingSpaces:nd}=td.match(/^ \s *(?<numberText> \d +)( \. | \) )(?<leadingSpaces> \s *)/u).groups;return{number:Number(rd),leadingSpaces:nd}}function ii $ 3(Ra,qa){return!Ra.ordered||Ra.children.length<2||Me $ 3(Ra.children[1],qa).number!==1?!1:Me $ 3(Ra.children[0],qa).number!==0?!0:Ra.children.length>2&&Me $ 3(Ra.children[2],qa).number===1}function Lr $ 1(Ra,qa){let{value:td}=Ra;return Ra.position.end.offset===qa.length&&td.endsWith( `
2024-09-18 09:46:23 +08:00
` )&&qa.endsWith( `
2024-09-25 14:23:53 +08:00
` )?td.slice(0,-1):td}function ye $ 1(Ra,qa){return function td(rd,nd,ad){let sd={...qa(rd,nd,ad)};return sd.children&&(sd.children=sd.children.map((ud,cd)=>td(ud,cd,[sd,...ad]))),sd}(Ra,null,[])}function mt $ 2(Ra){if((Ra==null?void 0:Ra.type)!=="link"||Ra.children.length!==1)return!1;let[qa]=Ra.children;return Oe $ 2(Ra)===Oe $ 2(qa)&&Pe $ 2(Ra)===Pe $ 2(qa)}function Bl $ 1(Ra,qa){let{node:td}=Ra;if(td.type==="code"&&td.lang!==null){let rd=ni $ 3(qa,{language:td.lang});if(rd)return async nd=>{let ad=qa.__inJsTemplate?"~":" ` ",sd=ad.repeat(Math.max(3,_r$1(td.value,ad)+1)),ud={parser:rd};td.lang===" ts "||td.lang===" typescript "?ud.filepath=" dummy . ts ":td.lang===" tsx "&&(ud.filepath=" dummy . tsx ");let cd=await nd(Lr$1(td,qa.originalText),ud);return _e$2([sd,td.lang,td.meta?" "+td.meta:" ",L$3,Ce$1(cd),L$3,sd])}}switch(td.type){case" front - matter ":return rd=>ri$3(td,rd);case" import ":case" export ":return rd=>rd(td.value,{parser:" babel "});case" jsx ":return rd=>rd(`<$>${td.value}</$>`,{parser:" _ _js _expression ",rootMarker:" mdx "})}return null}var ui$3=Bl$1,ar$1=null;function or$1(Ra){if(ar$1!==null&&typeof ar$1.property){let qa=ar$1;return ar$1=or$1.prototype=null,qa}return ar$1=or$1.prototype=Ra??Object.create(null),new or$1}var ql$1=10;for(let Ra=0;Ra<=ql$1;Ra++)or$1();function Ft$3(Ra){return or$1(Ra)}function Tl$1(Ra,qa=" type "){Ft$3(Ra);function td(rd){let nd=rd[qa],ad=Ra[nd];if(!Array.isArray(ad))throw Object.assign(new Error(`Missing visitor keys for '${nd}'.`),{node:rd});return ad}return td}var ai$2=Tl$1,_l$1={" front - matter ":[],root:[" children "],paragraph:[" children "],sentence:[" children "],word:[],whitespace:[],emphasis:[" children "],strong:[" children "],delete:[" children "],inlineCode:[],wikiLink:[],link:[" children "],image:[],blockquote:[" children "],heading:[" children "],code:[],html:[],list:[" children "],thematicBreak:[],linkReference:[" children "],imageReference:[],definition:[],footnote:[" children "],footnoteReference:[],footnoteDefinition:[" children "],table:[" children "],tableCell:[" children "],break:[],liquidNode:[],import:[],export:[],esComment:[],jsx:[],math:[],inlineMath:[],tableRow:[" children "],listItem:[" children "],text:[]},oi$3=_l$1,Sl$1=ai$2(oi$3),si$2=Sl$1;function ci$2(Ra){switch(Ra){case" cr ":return" \ r ";case" crlf " : return ` \r
2024-09-18 09:46:23 +08:00
` ;default:return `
2024-09-25 14:23:53 +08:00
` }}var li $ 3=()=>/[#*0-9] \u FE0F? \u 20E3|[ \x A9 \x AE \u 203C \u 2049 \u 2122 \u 2139 \u 2194- \u 2199 \u 21A9 \u 21AA \u 231A \u 231B \u 2328 \u 23CF \u 23ED- \u 23EF \u 23F1 \u 23F2 \u 23F8- \u 23FA \u 24C2 \u 25AA \u 25AB \u 25B6 \u 25C0 \u 25FB \u 25FC \u 25FE \u 2600- \u 2604 \u 260E \u 2611 \u 2614 \u 2615 \u 2618 \u 2620 \u 2622 \u 2623 \u 2626 \u 262A \u 262E \u 262F \u 2638- \u 263A \u 2640 \u 2642 \u 2648- \u 2653 \u 265F \u 2660 \u 2663 \u 2665 \u 2666 \u 2668 \u 267B \u 267E \u 267F \u 2692 \u 2694- \u 2697 \u 2699 \u 269B \u 269C \u 26A0 \u 26A7 \u 26AA \u 26B0 \u 26B1 \u 26BD \u 26BE \u 26C4 \u 26C8 \u 26CF \u 26D1 \u 26E9 \u 26F0- \u 26F5 \u 26F7 \u 26F8 \u 26FA \u 2702 \u 2708 \u 2709 \u 270F \u 2712 \u 2714 \u 2716 \u 271D \u 2721 \u 2733 \u 2734 \u 2744 \u 2747 \u 2757 \u 2763 \u 27A1 \u 2934 \u 2935 \u 2B05- \u 2B07 \u 2B1B \u 2B1C \u 2B55 \u 3030 \u 303D \u 3297 \u 3299] \u FE0F?|[ \u 261D \u 270C \u 270D](?: \u FE0F| \u D83C[ \u DFFB- \u DFFF])?|[ \u 270A \u 270B](?: \u D83C[ \u DFFB- \u DFFF])?|[ \u 23E9- \u 23EC \u 23F0 \u 23F3 \u 25FD \u 2693 \u 26A1 \u 26AB \u 26C5 \u 26CE \u 26D4 \u 26EA \u 26FD \u 2705 \u 2728 \u 274C \u 274E \u 2753- \u 2755 \u 2795- \u 2797 \u 27B0 \u 27BF \u 2B50]| \u 26D3 \u FE0F?(?: \u 200D \u D83D \u DCA5)?| \u 26F9(?: \u FE0F| \u D83C[ \u DFFB- \u DFFF])?(?: \u 200D[ \u 2640 \u 2642] \u FE0F?)?| \u 2764 \u FE0F?(?: \u 200D(?: \u D83D \u DD25| \u D83E \u DE79))?| \u D83C(?:[ \u DC04 \u DD70 \u DD71 \u DD7E \u DD7F \u DE02 \u DE37 \u DF21 \u DF24- \u DF2C \u DF36 \u DF7D \u DF96 \u DF97 \u DF99- \u DF9B \u DF9E \u DF9F \u DFCD \u DFCE \u DFD4- \u DFDF \u DFF5 \u DFF7] \u FE0F?|[ \u DF85 \u DFC2 \u DFC7](?: \u D83C[ \u DFFB- \u DFFF])?|[ \u DFC4 \u DFCA](?: \u D83C[ \u DFFB- \u DFFF])?(?: \u 200D[ \u 2640 \u 2642] \u FE0F?)?|[ \u DFCB \u DFCC](?: \u FE0F| \u D83C[ \u DFFB- \u DFFF])?(?: \u 200D[ \u 2640 \u 2642] \u FE0F?)?|[ \u DCCF \u DD8E \u DD91- \u DD9A \u DE01 \u DE1A \u DE2F \u DE32- \u DE36 \u DE38- \u DE3A \u DE50 \u DE51 \u DF00- \u DF20 \u DF2D- \u DF35 \u DF37- \u DF43 \u DF45- \u DF4A \u DF4C- \u DF7C \u DF7E- \u DF84 \u DF86- \u DF93 \u DFA0- \u DFC1 \u DFC5 \u DFC6 \u DFC8 \u DFC9 \u DFCF- \u DFD3 \u DFE0- \u DFF0 \u DFF8- \u DFFF]| \u DDE6 \u D83C[ \u DDE8- \u DDEC \u DDEE \u DDF1 \u DDF2 \u DDF4 \u DDF6- \u DDFA \u DDFC \u DDFD \u DDFF]| \u DDE7 \u D83C[ \u DDE6 \u DDE7 \u DDE9- \u DDEF \u DDF1- \u DDF4 \u DDF6- \u DDF9 \u DDFB \u DDFC \u DDFE \u DDFF]| \u DDE8 \u D83C[ \u DDE6 \u DDE8 \u DDE9 \u DDEB- \u DDEE \u DDF0- \u DDF5 \u DDF7 \u DDFA- \u DDFF]| \u DDE9 \u D83C[ \u DDEA \u DDEC \u DDEF \u DDF0 \u DDF2 \u DDF4 \u DDFF]| \u DDEA \u D83C[ \u DDE6 \u DDE8 \u DDEA \u DDEC \u DDED \u DDF7- \u DDFA]| \u DDEB \u D83C[ \u DDEE- \u DDF0 \u DDF2 \u DDF4 \u DDF7]| \u DDEC \u D83C[ \u DDE6 \u DDE7 \u DDE9- \u DDEE \u DDF1- \u DDF3 \u DDF5- \u DDFA \u DDFC \u DDFE]| \u DDED \u D83C[ \u DDF0 \u DDF2 \u DDF3 \u DDF7 \u DDF9 \u DDFA]| \u DDEE \u D83C[ \u DDE8- \u DDEA \u DDF1- \u DDF4 \u DDF6- \u DDF9]| \u DDEF \u D83C[ \u DDEA \u DDF2 \u DDF4 \u DDF5]| \u DDF0 \u D83C[ \u DDEA \u DDEC- \u DDEE \u DDF2 \u DDF3 \u DDF5 \u DDF7 \u DDFC \u DDFE \u DDFF]| \u DDF1 \u D83C[ \u DDE6- \u DDE8 \u DDEE \u DDF0 \u DDF7- \u DDFB \u DDFE]| \u DDF2 \u D83C[ \u DDE6 \u DDE8- \u DDED \u DDF0- \u DDFF]| \u DDF3 \u D83C[ \u DDE6 \u DDE8 \u DDEA- \u DDEC \u DDEE \u DDF1 \u DDF4 \u DDF5 \u DDF7 \u DDFA \u DDFF]| \u DDF4 \u D83C \u DDF2| \u DDF5 \u D83C[ \u DDE6 \u DDEA- \u DDED \u DDF0- \u DDF3 \u DDF7- \u DDF9 \u DDFC \u DDFE]| \u DDF6 \u D83C \u DDE6| \u DDF7 \u D83C[ \u DDEA \u DDF4 \u DDF8 \u DDFA \u DDFC]| \u DDF8 \u D83C[ \u DDE6- \u DDEA \u DDEC- \u DDF4 \u DDF7- \u DDF9 \u DDFB \u DDFD- \u DDFF]| \u DDF9 \u D83C[ \u DDE6 \u DDE8 \u DDE9 \u DDEB- \u DDED \u DDEF- \u DDF4 \u DDF7 \u DDF9 \u DDFB \u DDFC \u DDFF]| \u DDFA \u D83C[ \u DDE6 \u DDEC \u DDF2 \u DDF3 \u DDF8 \u DDFE \u DDFF]| \u DDFB \u D83C[ \u DDE6 \u DDE8 \u DDEA \u DDEC \u DDEE \u DDF3 \u DDFA]| \u DDFC \u D83C[ \u DDEB \u DDF8]| \u DDFD \u D83C \u DDF0| \u DDFE \u D83C[ \u DDEA \u DDF9]| \u DDFF \u D83C[ \u DDE6 \u DDF2 \u DDFC]| \u DF44(?: \u 200D \u D83D \u DFEB)?| \u DF4B(?: \u 200D \u D83D \u DFE9)?| \u DFC3(?: \u D83C[ \u DFFB- \u DFFF])?(?: \u 200D(?:[ \u 2640 \u 2642] \u FE0F?(?: \u 200D \u 27A1 \u FE0F?)?| \u 27A1 \u FE0F?))?| \u DFF3 \u FE0F?(?: \u 200D(?: \u 26A7 \u FE0F?| \u D83C \u DF08))?| \u DFF4(?: \u 200D \u 2620 \u FE0F?| \u DB40 \u DC67 \u DB40 \u DC62 \u DB40(?: \u DC65 \u DB40 \u DC6E \u DB40 \u DC67| \u DC73 \u DB40 \u DC63 \u DB40 \u DC74| \u DC77 \u DB40 \u DC6C \u DB40 \u DC73) \u DB40 \u DC7F)?)| \u D83D(?:[ \u DC3F \u DCFD \u DD49 \u DD4A \u DD6F \u DD70 \u DD73 \u DD76- \u DD79 \u DD87 \u DD8A- \u DD8D \u DDA5 \u DDA8 \u DDB1 \u DDB2 \u DDBC \u DDC2- \u DDC4 \u DDD1- \u DDD3 \u DDDC- \u DDDE \u DDE1 \u DDE3 \u DDE8 \u DDEF \u DDF3 \u DDFA \u DECB \u DECD- \u DECF \u DEE0- \u DEE5 \u DEE9 \u DEF0 \u DEF3] \u FE0F?|[ \u DC42 \u DC43 \u DC46- \u DC50 \u DC66 \u DC67 \u DC6B- \u DC6D \u DC72 \u DC74- \u DC76 \u DC78 \u DC7C \u DC83 \u DC85 \u DC8F \u DC91 \u DCAA \u DD7A \u DD95 \u DD96 \u DE4C \u DE4F \u DEC0 \u DECC](?: \u D83C[ \u DFFB- \u DFFF])?|[ \u DC6E \u DC70 \u DC71 \u DC73 \u DC77 \u DC81 \u DC82 \u DC86 \u DC87 \u DE45- \u DE47 \u DE4B \u DE4D \u DE4E \u DEA3 \u DEB4 \u DEB5](?: \u D83C[ \u
` ?N $ 3(!1,Sd, `
2024-09-28 20:51:35 +08:00
` ,nd):Sd;ud.push(Dd),sd.length>0&&(ad+=sr $ 1(Dd));break}case H $ 2:for(let Dd=Sd.length-1;Dd>=0;Dd--)sd.push({ind:Td,mode:Ad,doc:Sd[Dd]});break;case ge $ 2:if(pd>=2)throw new Error("There are too many 'cursor' in doc.");ud.push(cr $ 1),pd++;break;case ee $ 2:sd.push({ind:Ll $ 2(Td,qa),mode:Ad,doc:Sd.contents});break;case re $ 2:sd.push({ind:Il $ 1(Td,Sd.n,qa),mode:Ad,doc:Sd.contents});break;case oe $ 2:ad-=vt $ 1(ud);break;case K $ 2:switch(Ad){case ne $ 2:if(!cd){sd.push({ind:Td,mode:Sd.break?G $ 3:ne $ 2,doc:Sd.contents});break}case G $ 3:{cd=!1;let Dd={ind:Td,mode:ne $ 2,doc:Sd.contents},Ld=rd-ad,Rd=dd.length>0;if(!Sd.break&&Ir $ 1(Dd,sd,Ld,Rd,td))sd.push(Dd);else if(Sd.expandedStates){let Od=M $ 3(!1,Sd.expandedStates,-1);if(Sd.break){sd.push({ind:Td,mode:G $ 3,doc:Od});break}else for(let Md=1;Md<Sd.expandedStates.length+1;Md++)if(Md>=Sd.expandedStates.length){sd.push({ind:Td,mode:G $ 3,doc:Od});break}else{let jd=Sd.expandedStates[Md],Ud={ind:Td,mode:ne $ 2,doc:jd};if(Ir $ 1(Ud,sd,Ld,Rd,td)){sd.push(Ud);break}}}else sd.push({ind:Td,mode:G $ 3,doc:Sd.contents});break}}Sd.id&&(td[Sd.id]=M $ 3(!1,sd,-1).mode);break;case J $ 3:{let Dd=rd-ad,{parts:Ld}=Sd;if(Ld.length===0)break;let[Rd,Od]=Ld,Md={ind:Td,mode:ne $ 2,doc:Rd},jd={ind:Td,mode:G $ 3,doc:Rd},Ud=Ir $ 1(Md,[],Dd,dd.length>0,td,!0);if(Ld.length===1){Ud?sd.push(Md):sd.push(jd);break}let Hd={ind:Td,mode:ne $ 2,doc:Od},Wd={ind:Td,mode:G $ 3,doc:Od};if(Ld.length===2){Ud?sd.push(Hd,Md):sd.push(Wd,jd);break}Ld.splice(0,2);let Zd={ind:Td,mode:Ad,doc:Ee $ 2(Ld)},zd=Ld[0];Ir $ 1({ind:Td,mode:ne $ 2,doc:[Rd,Od,zd]},[],Dd,dd.length>0,td,!0)?sd.push(Zd,Hd,Md):Ud?sd.push(Zd,Wd,Md):sd.push(Zd,Wd,jd);break}case X $ 3:case se $ 1:{let Dd=Sd.groupId?td[Sd.groupId]:Ad;if(Dd===G $ 3){let Ld=Sd.type===X $ 3?Sd.breakContents:Sd.negate?Sd.contents:Ze $ 2(Sd.contents);Ld&&sd.push({ind:Td,mode:Ad,doc:Ld})}if(Dd===ne $ 2){let Ld=Sd.type===X $ 3?Sd.flatContents:Sd.negate?Ze $ 2(Sd.contents):Sd.contents;Ld&&sd.push({ind:Td,mode:Ad,doc:Ld})}break}case ce $ 2:dd.push({ind:Td,mode:Ad,doc:Sd.contents});break;case le $ 2:dd.length>0&&sd.push({ind:Td,mode:Ad,doc:rr $ 1});break;case W $ 3:switch(Ad){case ne $ 2:if(Sd.hard)cd=!0;else{Sd.soft||(ud.push(" "),ad+=1);break}case G $ 3:if(dd.length>0){sd.push({ind:Td,mode:Ad,doc:Sd},...dd.reverse()),dd.length=0;break}Sd.literal?Td.root?(ud.push(nd,Td.root.value),ad=Td.root.length):(ud.push(nd),ad=0):(ad-=vt $ 1(ud),ud.push(nd+Td.value),ad=Td.length);break}break;case fe $ 2:sd.push({ind:Td,mode:Ad,doc:Sd.contents});break;case te $ 2:break;default:throw new qe $ 3(Sd)}sd.length===0&&dd.length>0&&(sd.push(...dd.reverse()),dd.length=0)}let fd=ud.indexOf(cr $ 1);if(fd!==-1){let Td=ud.indexOf(cr $ 1,fd+1),Ad=ud.slice(0,fd).join(""),Sd=ud.slice(fd+1,Td).join(""),Dd=ud.slice(Td+1).join("");return{formatted:Ad+Sd+Dd,cursorNodeStart:Ad.length,cursorNodeText:Sd}}return{formatted:ud.join("")}}function mi(Ra,qa,td){let{node:rd}=Ra,nd=[],ad=Ra.map(()=>Ra.map(({index:fd})=>{let Td=hi $ 2(td(),qa).formatted,Ad=sr $ 1(Td);return nd[fd]=Math.max(nd[fd]??3,Ad),{text:Td,width:Ad}},"children"),"children"),sd=cd(!1);if(qa.proseWrap!=="never")return[er $ 1,sd];let ud=cd(!0);return[er $ 1,ze $ 2(zn $ 2(ud,sd))];function cd(fd){return Tr $ 1(rr $ 1,[pd(ad[0],fd),dd(fd),...ad.slice(1).map(Td=>pd(Td,fd))].map(Td=> ` | $ { Td . join ( " | " ) } | ` ))}function dd(fd){return nd.map((Td,Ad)=>{let Sd=rd.align[Ad],Dd=Sd==="center"||Sd==="left"?":":"-",Ld=Sd==="center"||Sd==="right"?":":"-",Rd=fd?"-":"-".repeat(Td-2);return ` $ { Dd } $ { Rd } $ { Ld } ` })}function pd(fd,Td){return fd.map(({text:Ad,width:Sd},Dd)=>{if(Td)return Ad;let Ld=nd[Dd]-Sd,Rd=rd.align[Dd],Od=0;Rd==="right"?Od=Ld:Rd==="center"&&(Od=Math.floor(Ld/2));let Md=Ld-Od;return ` $ { " " . repeat ( Od ) } $ { Ad } $ { " " . repeat ( Md ) } ` })}}function Fi(Ra,qa,td){let rd=Ra.map(td,"children");return Nl $ 1(rd)}function Nl $ 1(Ra){let qa=[""];return function td(rd){for(let nd of rd){let ad=Y $ 2(nd);if(ad===H $ 2){td(nd);continue}let sd=nd,ud=[];ad===J $ 3&&([sd,...ud]=nd.parts),qa.push([qa.pop(),sd],...ud)}}(Ra),Ee $ 2(qa)}var Rl $ 2=/^. $ /su;function Ul $ 1(Ra,qa){return Ra=zl $ 2(Ra,qa),Ra=Yl $ 2(Ra),Ra=Vl $ 1(Ra,qa),Ra=jl $ 2(Ra,qa),Ra=Gl $ 1(Ra),Ra}function zl $ 2(Ra,qa){return ye $ 1(Ra,td=>td.type!=="text"||td.va
2024-09-25 14:23:53 +08:00
` )return L $ 3;let nd=qa===" "||qa=== `
` &&Jl $ 2(Ra,rd);return Xl $ 2(Ra,qa,td,rd,nd)?nd?Br $ 2:qr $ 1:nd?" ":""}var Ql $ 2=new Set(["listItem","definition"]);function Zl $ 1(Ra,qa,td){var rd,nd;let{node:ad}=Ra;if(af(Ra)){let sd=[""],ud=Pr $ 1(qa.originalText.slice(ad.position.start.offset,ad.position.end.offset));for(let cd of ud){if(cd.type==="word"){sd.push([sd.pop(),cd.value]);continue}let dd=Et $ 2(Ra,cd.value,qa.proseWrap,!0);if(Y $ 2(dd)=== $ $ 1){sd.push([sd.pop(),dd]);continue}sd.push(dd)}return Ee $ 2(sd)}switch(ad.type){case"front-matter":return qa.originalText.slice(ad.position.start.offset,ad.position.end.offset);case"root":return ad.children.length===0?"":[tf(Ra,qa,td),L $ 3];case"paragraph":return Fi(Ra,qa,td);case"sentence":return vi $ 1(Ra,td);case"word":{let sd=N $ 3(!1,N $ 3(!1,ad.value,"*",String.raw ` \ * ` ),new RegExp([ ` ( ^ | $ { Se$2 . source } ) ( _ + ) ` , ` ( _ + ) ( $ { Se$2 . source } | $ ) ` ].join("|"),"gu"),(dd,pd,fd,Td,Ad)=>N $ 3(!1,fd? ` $ { pd } $ { fd } ` : ` $ { Td } $ { Ad } ` ,"_",String.raw ` \ _ ` )),ud=(dd,pd,fd)=>dd.type==="sentence"&&fd===0,cd=(dd,pd,fd)=>mt $ 2(dd.children[fd-1]);return sd!==ad.value&&(Ra.match(void 0,ud,cd)||Ra.match(void 0,ud,(dd,pd,fd)=>dd.type==="emphasis"&&fd===0,cd))&&(sd=sd.replace(/^( \\ ?[*_])+/u,dd=>N $ 3(!1,dd," \\ ",""))),sd}case"whitespace":{let{next:sd}=Ra,ud=sd&&/^>|^(?:[*+-]|#{1,6}| \d +[).]) $ /u.test(sd.value)?"never":qa.proseWrap;return Et $ 2(Ra,ad.value,ud)}case"emphasis":{let sd;if(mt $ 2(ad.children[0]))sd=qa.originalText[ad.position.start.offset];else{let{previous:ud,next:cd}=Ra;sd=(ud==null?void 0:ud.type)==="sentence"&&((rd=M $ 3(!1,ud.children,-1))==null?void 0:rd.type)==="word"&&!M $ 3(!1,ud.children,-1).hasTrailingPunctuation||(cd==null?void 0:cd.type)==="sentence"&&((nd=cd.children[0])==null?void 0:nd.type)==="word"&&!cd.children[0].hasLeadingPunctuation||Ra.hasAncestor(dd=>dd.type==="emphasis")?"*":"_"}return[sd,V $ 3(Ra,qa,td),sd]}case"strong":return["**",V $ 3(Ra,qa,td),"**"];case"delete":return["~~",V $ 3(Ra,qa,td),"~~"];case"inlineCode":{let sd=qa.proseWrap==="preserve"?ad.value:N $ 3(!1,ad.value, `
` ," "),ud=Gn $ 3(sd," ` "),cd=" ` ".repeat(ud||1),dd=sd.startsWith(" ` ")||sd.endsWith(" ` ")||/^[ \n ]/u.test(sd)&&/[ \n ] $ /u.test(sd)&&/[^ \n ]/u.test(sd)?" ":"";return[cd,dd,sd,dd,cd]}case"wikiLink":{let sd="";return qa.proseWrap==="preserve"?sd=ad.value:sd=N $ 3(!1,ad.value,/[ \t \n ]+/gu," "),["[[",sd,"]]"]}case"link":switch(qa.originalText[ad.position.start.offset]){case"<":{let sd="mailto:";return["<",ad.url.startsWith(sd)&&qa.originalText.slice(ad.position.start.offset+1,ad.position.start.offset+1+sd.length)!==sd?ad.url.slice(sd.length):ad.url,">"]}case"[":return["[",V $ 3(Ra,qa,td),"](",Ct $ 2(ad.url,")"),Nr $ 1(ad.title,qa),")"];default:return qa.originalText.slice(ad.position.start.offset,ad.position.end.offset)}case"image":return["![",ad.alt||"","](",Ct $ 2(ad.url,")"),Nr $ 1(ad.title,qa),")"];case"blockquote":return["> ",ve $ 2("> ",V $ 3(Ra,qa,td))];case"heading":return["#".repeat(ad.depth)+" ",V $ 3(Ra,qa,td)];case"code":{if(ad.isIndented){let cd=" ".repeat(4);return ve $ 2(cd,[cd,Ce $ 1(ad.value,L $ 3)])}let sd=qa.__inJsTemplate?"~":" ` ",ud=sd.repeat(Math.max(3,_r$1(ad.value,sd)+1));return[ud,ad.lang||" ",ad.meta?" "+ad.meta:" ",L$3,Ce$1(Lr$1(ad,qa.originalText),L$3),L$3,ud]}case" html ":{let{parent:sd,isLast:ud}=Ra,cd=sd.type===" root "&&ud?ad.value.trimEnd():ad.value,dd=/^<!--.*-->$/su.test(cd);return Ce$1(cd,dd?L$3:_e$2(tr$1))}case" list ":{let sd=Ai$1(ad,Ra.parent),ud=ii$3(ad,qa);return V$3(Ra,qa,td,{processor(cd){let dd=fd(),pd=cd.node;if(pd.children.length===2&&pd.children[1].type===" html "&&pd.children[0].position.start.column!==pd.children[1].position.start.column)return[dd,yi$1(cd,qa,td,dd)];return[dd,ve$2(" ".repeat(dd.length),yi$1(cd,qa,td,dd))];function fd(){let Td=ad.ordered?(cd.isFirst?ad.start:ud?1:ad.start+cd.index)+(sd%2===0?" . ":" ) "):sd%2===0?" - ":" * ";return ad.isAligned||ad.hasIndentedCodeblock?ef(Td,qa):Td}}})}case" thematicBreak ":{let{ancestors:sd}=Ra,ud=sd.findIndex(cd=>cd.type===" list ");return ud===-1?" -- - ":Ai$1(sd[ud],sd[ud+1])%2===0?" * * * ":" -- - "}case" linkReference ":return[" [ ",V$3(Ra,qa,td)," ] ",ad.referenceType===" full "?bt$3(ad):ad.referenceType===" collapsed "?" [ ] ":" "];case" imageReference ":switch(ad.referenceType){case" full ":return[" ! [ ",ad.alt||" "," ] ",bt$3(ad)];default:return[" ! [ ",ad.alt," ] ",ad.referenceType===" collapsed "?" [ ] ":" "]}case" definition ":{let sd=qa.proseWrap===" always "?Br$2:" ";return ze$2([bt$3(ad)," : ",Ze$2([sd,Ct$2(ad.url),ad.title===null?" ":[sd,Nr$1(ad.title,qa,!1)]])])}case" footnote ":return[" [ ^ ",V$3(Ra,qa,td)," ] "];case" footnoteReference ":return Bi$1(ad);case" footnoteDefinition ":{let sd=ad.children.length===1&&ad.children[0].type===" paragraph "&&(qa.proseWrap===" never "||qa.proseWrap===" preserve "&&ad.children[0].position.start.line===ad.children[0].position.end.line);return[Bi$1(ad)," : ",sd?V$3(Ra,qa,td):ze$2([ve$2(" ".repeat(4),V$3(Ra,qa,td,{processor:({isFirst:ud})=>ud?ze$2([qr$1,td()]):td()}))])]}case" table ":return mi(Ra,qa,td);case" tableCell ":return V$3(Ra,qa,td);case" break ":return/\s/u.test(qa.originalText[ad.position.start.offset])?[" ",_e$2(tr$1)]:[" \ \ ",L$3];case" liquidNode ":return Ce$1(ad.value,L$3);case" import ":case" export ":case" jsx ":return ad.value;case" esComment ":return[" { /* ",ad.value," */ } "];case" math ":return[" $$ ",L$3,ad.value?[Ce$1(ad.value,L$3),L$3]:" "," $$ "];case" inlineMath ":return qa.originalText.slice(Oe$2(ad),Pe$2(ad));case" tableRow ":case" listItem ":case" text ":default:throw new $n$3(ad," Markdown ")}}function yi$1(Ra,qa,td,rd){let{node:nd}=Ra,ad=nd.checked===null?" ":nd.checked?" [ x ] ":" [ ] ";return[ad,V$3(Ra,qa,td,{processor({node:sd,isFirst:ud}){if(ud&&sd.type!==" list ")return ve$2(" ".repeat(ad.length),td());let cd=" ".repeat(sf(qa.tabWidth-rd.length,0,3));return[cd,ve$2(cd,td())]}})]}function ef(Ra,qa){let td=rd();return Ra+" " . repeat ( td >= 4 ? 0 : td ) ; function rd ( ) { let nd = Ra . length % qa . tabWidth ; return nd === 0 ? 0 : qa . tabWidth - nd } } function Ai$1 ( Ra , qa ) { return rf ( Ra , qa , td => td . ordered === Ra . ordered ) } function rf ( Ra , qa , td ) { let rd = - 1 ; for ( let nd of qa . children ) if ( nd . type === Ra . type && td ( nd ) ? rd ++ : rd = - 1 , nd === Ra ) return rd } function tf ( Ra , qa , td ) { let rd = [ ] , nd = null , { children : ad } = Ra . node ; for ( let [ sd , ud ] of ad . entries ( ) ) switch ( yt$1 ( ud
` )}function uf({node:Ra,previous:qa,parent:td},rd){if(wi $ 1(qa,rd))return!0;let nd=qa.type===Ra.type&&Ql $ 2.has(Ra.type),ad=td.type==="listItem"&&!wi $ 1(td,rd),sd=yt $ 1(qa)==="next",ud=Ra.type==="html"&&qa.type==="html"&&qa.position.end.line+1===Ra.position.start.line,cd=Ra.type==="html"&&td.type==="listItem"&&qa.type==="paragraph"&&qa.position.end.line+1===Ra.position.start.line;return!(nd||ad||sd||ud||cd)}function ki $ 1({node:Ra,previous:qa}){let td=qa.type==="list",rd=Ra.type==="code"&&Ra.isIndented;return td&&rd}function af(Ra){let qa=Ra.findAncestor(td=>td.type==="linkReference"||td.type==="imageReference");return qa&&(qa.type!=="linkReference"||qa.referenceType!=="full")}var of=(Ra,qa)=>{for(let td of qa)Ra=N $ 3(!1,Ra,td,encodeURIComponent(td));return Ra};function Ct $ 2(Ra,qa=[]){let td=[" ",...Array.isArray(qa)?qa:[qa]];return new RegExp(td.map(rd=>Be $ 2(rd)).join("|"),"u").test(Ra)? ` < $ { of ( Ra , "<>" ) } > ` :Ra}function Nr $ 1(Ra,qa,td=!0){if(!Ra)return"";if(td)return" "+Nr $ 1(Ra,qa,!1);if(Ra=N $ 3(!1,Ra,/ \\ (?=["')])/gu,""),Ra.includes('"')&&Ra.includes("'")&&!Ra.includes(")"))return ` ( $ { Ra } ) ` ;let rd=jn $ 2(Ra,qa.singleQuote);return Ra=N $ 3(!1,Ra," \\ "," \\ \\ "),Ra=N $ 3(!1,Ra,rd, ` \ \ $ { rd } ` ), ` $ { rd } $ { Ra } $ { rd } ` }function sf(Ra,qa,td){return Ra<qa?qa:Ra>td?td:Ra}function cf(Ra){return Ra.index>0&&yt $ 1(Ra.previous)==="next"}function bt $ 3(Ra){return ` [ $ { ( 0 , qi$1 . default ) ( Ra . label ) } ] ` }function Bi $ 1(Ra){return ` [ ^ $ { Ra . label } ] ` }var lf={preprocess:gi,print:Zl $ 1,embed:ui $ 3,massageAstNode:Zn $ 2,hasPrettierIgnore:cf,insertPragma:Jn $ 3,getVisitorKeys:si $ 2},Ti $ 1=lf,_i $ 1=[{linguistLanguageId:222,name:"Markdown",type:"prose",color:"#083fa1",aliases:["md","pandoc"],aceMode:"markdown",codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",wrap:!0,extensions:[".md",".livemd",".markdown",".mdown",".mdwn",".mkd",".mkdn",".mkdown",".ronn",".scd",".workbook"],filenames:["contents.lr","README"],tmScope:"text.md",parsers:["markdown"],vscodeLanguageIds:["markdown"]},{linguistLanguageId:222,name:"MDX",type:"prose",color:"#083fa1",aliases:["md","pandoc"],aceMode:"markdown",codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",wrap:!0,extensions:[".mdx"],filenames:[],tmScope:"text.md",parsers:["mdx"],vscodeLanguageIds:["mdx"]}],At $ 3={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},ff={proseWrap:At $ 3.proseWrap,singleQuote:At $ 3.singleQuote},Si $ 1=ff,On $ 2={};Ln $ 1(On $ 2,{markdown:()=>km,mdx:()=>Bm,remark:()=>km});var Wc=Ue $ 2(Pi $ 1()),Kc=Ue $ 2(Wi()),Jc=Ue $ 2(Gs()),Xc=Ue $ 2(Ic()),vm=/^import \s /u,Em=/^export \s /u,Nc=String.raw ` [ a - z ] [ a - z0 - 9 ] * ( \ . [ a - z ] [ a - z0 - 9 ] * ) * | ` ,Rc=/<!---->|<!---?[^>-](?:-?[^-])*-->/u,Cm=/^ \{ \s * \/ \* (.*) \* \/ \s * \} /u,bm $ 1= `
` ,Uc $ 1=Ra=>vm.test(Ra),Sn $ 2=Ra=>Em.test(Ra),zc=(Ra,qa)=>{let td=qa.indexOf(bm $ 1),rd=qa.slice(0,td);if(Sn $ 2(rd)||Uc $ 1(rd))return Ra(rd)({type:Sn $ 2(rd)?"export":"import",value:rd})},Mc=(Ra,qa)=>{let td=Cm.exec(qa);if(td)return Ra(td[0])({type:"esComment",value:td[1].trim()})};zc.locator=Ra=>Sn $ 2(Ra)||Uc $ 1(Ra)?-1:1;Mc.locator=(Ra,qa)=>Ra.indexOf("{",qa);var Yc=function(){let{Parser:Ra}=this,{blockTokenizers:qa,blockMethods:td,inlineTokenizers:rd,inlineMethods:nd}=Ra.prototype;qa.esSyntax=zc,rd.esComment=Mc,td.splice(td.indexOf("paragraph"),0,"esSyntax"),nd.splice(nd.indexOf("text"),0,"esComment")},ym=function(){let Ra=this.Parser.prototype;Ra.blockMethods=["frontMatter",...Ra.blockMethods],Ra.blockTokenizers.frontMatter=qa;function qa(td,rd){let nd=ir $ 2(rd);if(nd.frontMatter)return td(nd.frontMatter.raw)(nd.frontMatter)}qa.onlyAtStart=!0},Gc $ 1=ym;function Am(){return Ra=>ye $ 1(Ra,(qa,td,[rd])=>qa.type!=="html"||Rc.test(qa.value)||Or $ 1.has(rd.type)?qa:{...qa,type:"jsx"})}var Vc=Am,xm=function(){let Ra=this.Parser.prototype,qa=Ra.inlineMethods;qa.splice(qa.indexOf("text"),0,"liquid"),Ra.inlineTokenizers.liquid=td;function td(rd,nd){let ad=nd.match(/^( \{ %.*?% \} | \{ \{ .*? \} \} )/su);if(ad)return rd(ad[0])({type:"liquidNode",value:ad[0]})}td.locator=function(rd,nd){return rd.indexOf("{",nd)}},jc $ 1=xm,wm=function(){let Ra="wikiLink",qa=/^ \[ \[ (?<linkContents>.+?) \] \] /su,td=this.Parser.prototype,rd=td.inlineMethods;rd.splice(rd.indexOf("link"),0,Ra),td.inlineTokenizers.wikiLink=nd;function nd(ad,sd){let ud=qa.exec(sd);if(ud){let cd=ud.groups.linkContents.trim();return ad(ud[0])({type:Ra,value:cd})}}nd.locator=function(ad,sd){return ad.indexOf("[",sd)}}, $ c $ 1=wm;function Qc({isMDX:Ra}){return qa=>{let td=(0,Xc.default)().use(Jc.default,{commonmark:!0,...Ra&&{blocks:[Nc]}}).use(Wc.default).use(Gc $ 1).use(Kc.default).use(Ra?Yc:Hc).use(jc $ 1).use(Ra?Vc:Hc).use( $ c $ 1);return td.run(td.parse(qa))}}function Hc(){}var Zc={astFormat:"mdast",hasPragma:Kn $ 2,locStart:Oe $ 2,locEnd:Pe $ 2},km={...Zc,parse:Qc({isMDX:!1})},Bm={...Zc,parse:Qc({isMDX:!0})},qm={mdast:Ti $ 1},fC=Pn $ 3;const prettierPluginMarkdown=Object.freeze(Object.defineProperty({__proto__:null,default:fC,languages:_i $ 1,options:Si $ 1,parsers:On $ 2,printers:qm},Symbol.toStringTag,{value:"Module"}));var al=Object.create,Ur $ 1=Object.defineProperty,ul=Object.getOwnPropertyDescriptor,ll=Object.getOwnPropertyNames,cl=Object.getPrototypeOf,fl=Object.prototype.hasOwnProperty,y $ 3=(Ra,qa)=>()=>(qa||Ra((qa={exports:{}}).exports,qa),qa.exports),Xs=(Ra,qa)=>{for(var td in qa)Ur $ 1(Ra,td,{get:qa[td],enumerable:!0})},pl=(Ra,qa,td,rd)=>{if(qa&&typeof qa=="object"||typeof qa=="function")for(let nd of ll(qa))!fl.call(Ra,nd)&&nd!==td&&Ur $ 1(Ra,nd,{get:()=>qa[nd],enumerable:!(rd=ul(qa,nd))||rd.enumerable});return Ra},ye=(Ra,qa,td)=>(td=Ra!=null?al(cl(Ra)):{},pl(Ur $ 1(td,"default",{value:Ra,enumerable:!0}),Ra)),Ut $ 1=y $ 3((Ra,qa)=>{qa.exports.isClean=Symbol("isClean"),qa.exports.my=Symbol("my")}),yi=y $ 3((Ra,qa)=>{var td=String,rd=function(){return{isColorSupported:!1,reset:td,bold:td,dim:td,italic:td,underline:td,inverse:td,hidden:td,strikethrough:td,black:td,red:td,green:td,yellow:td,blue:td,magenta:td,cyan:td,white:td,gray:td,bgBlack:td,bgRed:td,bgGreen:td,bgYellow:td,bgBlue:td,bgMagenta:td,bgCyan:td,bgWhite:td}};qa.exports=rd(),qa.exports.createColors=rd}),ss=y $ 3(()=>{}),Ft $ 2=y $ 3((Ra,qa)=>{var td=yi(),rd=ss(),nd=class aS extends Error{constructor(sd,ud,cd,dd,pd,fd){super(sd),this.name="CssSyntaxError",this.reason=sd,pd&&(this.file=pd),dd&&(this.source=dd),fd&&(this.plugin=fd),typeof ud<"u"&&typeof cd<"u"&&(typeof ud=="number"?(this.line=ud,this.column=cd):(this.line=ud.line,this.column=ud.column,this.endLine=cd.line,this.endColumn=cd.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,aS)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(sd){if(!this.source)return"";let ud=this.source;sd==null&&(sd=td.isColorSupported),rd&&s
` +Od+Td("^")}return" "+Ad(Rd)+Sd}).join( `
` )}toString(){let sd=this.showSourceCode();return sd&&(sd= `
` +sd+ `
` ),this.name+": "+this.message+sd}};qa.exports=nd,nd.default=nd}), $ t $ 2=y $ 3((Ra,qa)=>{var td={after: `
2024-09-18 09:46:23 +08:00
` ,beforeClose: `
` ,beforeComment: `
` ,beforeDecl: `
` ,beforeOpen:" ",beforeRule: `
2024-09-25 14:23:53 +08:00
` ,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function rd(ad){return ad[0].toUpperCase()+ad.slice(1)}var nd=class{constructor(ad){this.builder=ad}atrule(ad,sd){let ud="@"+ad.name,cd=ad.params?this.rawValue(ad,"params"):"";if(typeof ad.raws.afterName<"u"?ud+=ad.raws.afterName:cd&&(ud+=" "),ad.nodes)this.block(ad,ud+cd);else{let dd=(ad.raws.between||"")+(sd?";":"");this.builder(ud+cd+dd,ad)}}beforeAfter(ad,sd){let ud;ad.type==="decl"?ud=this.raw(ad,null,"beforeDecl"):ad.type==="comment"?ud=this.raw(ad,null,"beforeComment"):sd==="before"?ud=this.raw(ad,null,"beforeRule"):ud=this.raw(ad,null,"beforeClose");let cd=ad.parent,dd=0;for(;cd&&cd.type!=="root";)dd+=1,cd=cd.parent;if(ud.includes( `
` )){let pd=this.raw(ad,null,"indent");if(pd.length)for(let fd=0;fd<dd;fd++)ud+=pd}return ud}block(ad,sd){let ud=this.raw(ad,"between","beforeOpen");this.builder(sd+ud+"{",ad,"start");let cd;ad.nodes&&ad.nodes.length?(this.body(ad),cd=this.raw(ad,"after")):cd=this.raw(ad,"after","emptyBody"),cd&&this.builder(cd),this.builder("}",ad,"end")}body(ad){let sd=ad.nodes.length-1;for(;sd>0&&ad.nodes[sd].type==="comment";)sd-=1;let ud=this.raw(ad,"semicolon");for(let cd=0;cd<ad.nodes.length;cd++){let dd=ad.nodes[cd],pd=this.raw(dd,"before");pd&&this.builder(pd),this.stringify(dd,sd!==cd||ud)}}comment(ad){let sd=this.raw(ad,"left","commentLeft"),ud=this.raw(ad,"right","commentRight");this.builder("/*"+sd+ad.text+ud+"*/",ad)}decl(ad,sd){let ud=this.raw(ad,"between","colon"),cd=ad.prop+ud+this.rawValue(ad,"value");ad.important&&(cd+=ad.raws.important||" !important"),sd&&(cd+=";"),this.builder(cd,ad)}document(ad){this.body(ad)}raw(ad,sd,ud){let cd;if(ud||(ud=sd),sd&&(cd=ad.raws[sd],typeof cd<"u"))return cd;let dd=ad.parent;if(ud==="before"&&(!dd||dd.type==="root"&&dd.first===ad||dd&&dd.type==="document"))return"";if(!dd)return td[ud];let pd=ad.root();if(pd.rawCache||(pd.rawCache={}),typeof pd.rawCache[ud]<"u")return pd.rawCache[ud];if(ud==="before"||ud==="after")return this.beforeAfter(ad,ud);{let fd="raw"+rd(ud);this[fd]?cd=this[fd](pd,ad):pd.walk(Td=>{if(cd=Td.raws[sd],typeof cd<"u")return!1})}return typeof cd>"u"&&(cd=td[ud]),pd.rawCache[ud]=cd,cd}rawBeforeClose(ad){let sd;return ad.walk(ud=>{if(ud.nodes&&ud.nodes.length>0&&typeof ud.raws.after<"u")return sd=ud.raws.after,sd.includes( `
` )&&(sd=sd.replace(/[^ \n ]+ $ /,"")),!1}),sd&&(sd=sd.replace(/ \S /g,"")),sd}rawBeforeComment(ad,sd){let ud;return ad.walkComments(cd=>{if(typeof cd.raws.before<"u")return ud=cd.raws.before,ud.includes( `
` )&&(ud=ud.replace(/[^ \n ]+ $ /,"")),!1}),typeof ud>"u"?ud=this.raw(sd,null,"beforeDecl"):ud&&(ud=ud.replace(/ \S /g,"")),ud}rawBeforeDecl(ad,sd){let ud;return ad.walkDecls(cd=>{if(typeof cd.raws.before<"u")return ud=cd.raws.before,ud.includes( `
` )&&(ud=ud.replace(/[^ \n ]+ $ /,"")),!1}),typeof ud>"u"?ud=this.raw(sd,null,"beforeRule"):ud&&(ud=ud.replace(/ \S /g,"")),ud}rawBeforeOpen(ad){let sd;return ad.walk(ud=>{if(ud.type!=="decl"&&(sd=ud.raws.between,typeof sd<"u"))return!1}),sd}rawBeforeRule(ad){let sd;return ad.walk(ud=>{if(ud.nodes&&(ud.parent!==ad||ad.first!==ud)&&typeof ud.raws.before<"u")return sd=ud.raws.before,sd.includes( `
` )&&(sd=sd.replace(/[^ \n ]+ $ /,"")),!1}),sd&&(sd=sd.replace(/ \S /g,"")),sd}rawColon(ad){let sd;return ad.walkDecls(ud=>{if(typeof ud.raws.between<"u")return sd=ud.raws.between.replace(/[^ \s :]/g,""),!1}),sd}rawEmptyBody(ad){let sd;return ad.walk(ud=>{if(ud.nodes&&ud.nodes.length===0&&(sd=ud.raws.after,typeof sd<"u"))return!1}),sd}rawIndent(ad){if(ad.raws.indent)return ad.raws.indent;let sd;return ad.walk(ud=>{let cd=ud.parent;if(cd&&cd!==ad&&cd.parent&&cd.parent===ad&&typeof ud.raws.before<"u"){let dd=ud.raws.before.split( `
` );return sd=dd[dd.length-1],sd=sd.replace(/ \S /g,""),!1}}),sd}rawSemicolon(ad){let sd;return ad.walk(ud=>{if(ud.nodes&&ud.nodes.length&&ud.last.type==="decl"&&(sd=ud.raws.semicolon,typeof sd<"u"))return!1}),sd}rawValue(ad,sd){let ud=ad[sd],cd=ad.raws[sd];return cd&&cd.value===ud?cd.raw:ud}root(ad){this.body(ad),ad.raws.after&&this.builder(ad.raws.after)}rule(ad){this.block(ad,this.rawValue(ad,"selector")),ad.raws.ownSemicolon&&this.builder(ad.raws.ownSemicolon,ad,"end")}stringify(ad,sd){if(!this[ad.type])throw new Error("Unknown AST node type "+ad.type+". Maybe you need to change PostCSS stringifier.");this[ad.type](ad,sd)}};qa.exports=nd,nd.default=nd}),it $ 1=y $ 3((Ra,qa)=>{var td= $ t $ 2();function rd(nd,ad){new td(ad).stringify(nd)}qa.exports=rd,rd.default=rd}),at $ 3=y $ 3((Ra,qa)=>{var{isClean:td,my:rd}=Ut $ 1(),nd=Ft $ 2(),ad= $ t $ 2(),sd=it $ 1();function ud(dd,pd){let fd=new dd.constructor;for(let Td in dd){if(!Object.prototype.hasOwnProperty.call(dd,Td)||Td==="proxyCache")continue;let Ad=dd[Td],Sd=typeof Ad;Td==="parent"&&Sd==="object"?pd&&(fd[Td]=pd):Td==="source"?fd[Td]=Ad:Array.isArray(Ad)?fd[Td]=Ad.map(Dd=>ud(Dd,fd)):(Sd==="object"&&Ad!==null&&(Ad=ud(Ad)),fd[Td]=Ad)}return fd}var cd=class{constructor(dd={}){this.raws={},this[td]=!1,this[rd]=!0;for(let pd in dd)if(pd==="nodes"){this.nodes=[];for(let fd of dd[pd])typeof fd.clone=="function"?this.append(fd.clone()):this.append(fd)}else this[pd]=dd[pd]}addToError(dd){if(dd.postcssNode=this,dd.stack&&this.source&&/ \n \s {4}at /.test(dd.stack)){let pd=this.source;dd.stack=dd.stack.replace(/ \n \s {4}at /, ` $ & $ { pd . input . from } : $ { pd . start . line } : $ { pd . start . column } $ & ` )}return dd}after(dd){return this.parent.insertAfter(this,dd),this}assign(dd={}){for(let pd in dd)this[pd]=dd[pd];return this}before(dd){return this.parent.insertBefore(this,dd),this}cleanRaws(dd){delete this.raws.before,delete this.raws.after,dd||delete this.raws.between}clone(dd={}){let pd=ud(this);for(let fd in dd)pd[fd]=dd[fd];return pd}cloneAfter(dd={}){let pd=this.clone(dd);return this.parent.insertAfter(this,pd),pd}cloneBefore(dd={}){let pd=this.clone(dd);return this.parent.insertBefore(this,pd),pd}error(dd,pd={}){if(this.source){let{end:fd,start:Td}=this.rangeBy(pd);return this.source.input.error(dd,{column:Td.column,line:Td.line},{column:fd.column,line:fd.line},pd)}return new nd(dd)}getProxyProcessor(){return{get(dd,pd){return pd==="proxyOf"?dd:pd==="root"?()=>dd.root().toProxy():dd[pd]},set(dd,pd,fd){return dd[pd]===fd||(dd[pd]=fd,(pd==="prop"||pd==="value"||pd==="name"||pd==="params"||pd==="important"||pd==="text")&&dd.markDirty()),!0}}}markDirty(){if(this[td]){this[td]=!1;let dd=this;for(;dd=dd.parent;)dd[td]=!1}}next(){if(!this.parent)return;let dd=this.parent.index(this);return this.parent.nodes[dd+1]}positionBy(dd,pd){let fd=this.source.start;if(dd.index)fd=this.positionInside(dd.index,pd);else if(dd.word){pd=this.toString();let Td=pd.indexOf(dd.word);Td!==-1&&(fd=this.positionInside(Td,pd))}return fd}positionInside(dd,pd){let fd=pd||this.toString(),Td=this.source.start.column,Ad=this.source.start.line;for(let Sd=0;Sd<dd;Sd++)fd[Sd]=== `
2024-09-28 20:51:35 +08:00
` ?(Td=1,Ad+=1):Td+=1;return{column:Td,line:Ad}}prev(){if(!this.parent)return;let dd=this.parent.index(this);return this.parent.nodes[dd-1]}rangeBy(dd){let pd={column:this.source.start.column,line:this.source.start.line},fd=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:pd.column+1,line:pd.line};if(dd.word){let Td=this.toString(),Ad=Td.indexOf(dd.word);Ad!==-1&&(pd=this.positionInside(Ad,Td),fd=this.positionInside(Ad+dd.word.length,Td))}else dd.start?pd={column:dd.start.column,line:dd.start.line}:dd.index&&(pd=this.positionInside(dd.index)),dd.end?fd={column:dd.end.column,line:dd.end.line}:typeof dd.endIndex=="number"?fd=this.positionInside(dd.endIndex):dd.index&&(fd=this.positionInside(dd.index+1));return(fd.line<pd.line||fd.line===pd.line&&fd.column<=pd.column)&&(fd={column:pd.column+1,line:pd.line}),{end:fd,start:pd}}raw(dd,pd){return new ad().raw(this,dd,pd)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...dd){if(this.parent){let pd=this,fd=!1;for(let Td of dd)Td===this?fd=!0:fd?(this.parent.insertAfter(pd,Td),pd=Td):this.parent.insertBefore(pd,Td);fd||this.remove()}return this}root(){let dd=this;for(;dd.parent&&dd.parent.type!=="document";)dd=dd.parent;return dd}toJSON(dd,pd){let fd={},Td=pd==null;pd=pd||new Map;let Ad=0;for(let Sd in this){if(!Object.prototype.hasOwnProperty.call(this,Sd)||Sd==="parent"||Sd==="proxyCache")continue;let Dd=this[Sd];if(Array.isArray(Dd))fd[Sd]=Dd.map(Ld=>typeof Ld=="object"&&Ld.toJSON?Ld.toJSON(null,pd):Ld);else if(typeof Dd=="object"&&Dd.toJSON)fd[Sd]=Dd.toJSON(null,pd);else if(Sd==="source"){let Ld=pd.get(Dd.input);Ld==null&&(Ld=Ad,pd.set(Dd.input,Ad),Ad++),fd[Sd]={end:Dd.end,inputId:Ld,start:Dd.start}}else fd[Sd]=Dd}return Td&&(fd.inputs=[...pd.keys()].map(Sd=>Sd.toJSON())),fd}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(dd=sd){dd.stringify&&(dd=dd.stringify);let pd="";return dd(this,fd=>{pd+=fd}),pd}warn(dd,pd,fd){let Td={node:this};for(let Ad in fd)Td[Ad]=fd[Ad];return dd.warn(pd,Td)}get proxyOf(){return this}};qa.exports=cd,cd.default=cd}),lt $ 1=y $ 3((Ra,qa)=>{var td=at $ 3(),rd=class extends td{constructor(nd){nd&&typeof nd.value<"u"&&typeof nd.value!="string"&&(nd={...nd,value:String(nd.value)}),super(nd),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]===" $ "}};qa.exports=rd,rd.default=rd}),Oe $ 1=y $ 3((Ra,qa)=>{var td=at $ 3(),rd=class extends td{constructor(nd){super(nd),this.type="comment"}};qa.exports=rd,rd.default=rd}),re $ 1=y $ 3((Ra,qa)=>{var{isClean:td,my:rd}=Ut $ 1(),nd=lt $ 1(),ad=Oe $ 1(),sd=at $ 3(),ud,cd,dd,pd;function fd(Sd){return Sd.map(Dd=>(Dd.nodes&&(Dd.nodes=fd(Dd.nodes)),delete Dd.source,Dd))}function Td(Sd){if(Sd[td]=!1,Sd.proxyOf.nodes)for(let Dd of Sd.proxyOf.nodes)Td(Dd)}var Ad=class sS extends sd{append(...Dd){for(let Ld of Dd){let Rd=this.normalize(Ld,this.last);for(let Od of Rd)this.proxyOf.nodes.push(Od)}return this.markDirty(),this}cleanRaws(Dd){if(super.cleanRaws(Dd),this.nodes)for(let Ld of this.nodes)Ld.cleanRaws(Dd)}each(Dd){if(!this.proxyOf.nodes)return;let Ld=this.getIterator(),Rd,Od;for(;this.indexes[Ld]<this.proxyOf.nodes.length&&(Rd=this.indexes[Ld],Od=Dd(this.proxyOf.nodes[Rd],Rd),Od!==!1);)this.indexes[Ld]+=1;return delete this.indexes[Ld],Od}every(Dd){return this.nodes.every(Dd)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let Dd=this.lastEach;return this.indexes[Dd]=0,Dd}getProxyProcessor(){return{get(Dd,Ld){return Ld==="proxyOf"?Dd:Dd[Ld]?Ld==="each"||typeof Ld=="string"&&Ld.startsWith("walk")?(...Rd)=>Dd[Ld](...Rd.map(Od=>typeof Od=="function"?(Md,jd)=>Od(Md.toProxy(),jd):Od)):Ld==="every"||Ld==="some"?Rd=>Dd[Ld]((Od,...Md)=>Rd(Od.toProxy(),...Md)):Ld==="root"?()=>Dd.root().toProxy():Ld==="nodes"?Dd.nodes.map(Rd=>Rd.toProxy()):Ld==="first"||Ld==="last"?Dd[Ld].toProxy():Dd[Ld]:Dd[Ld]},set(Dd,Ld,Rd){return Dd[Ld]===Rd||(Dd[Ld]=Rd,(Ld==="name"||Ld==="params"||Ld==="selector")&&Dd.markDirty()),!0}}}index(Dd){return typeo
` ," "];return td.split(rd,nd)},split(rd,nd,ad){let sd=[],ud="",cd=!1,dd=0,pd=!1,fd="",Td=!1;for(let Ad of rd)Td?Td=!1:Ad===" \\ "?Td=!0:pd?Ad===fd&&(pd=!1):Ad==='"'||Ad==="'"?(pd=!0,fd=Ad):Ad==="("?dd+=1:Ad===")"?dd>0&&(dd-=1):dd===0&&nd.includes(Ad)&&(cd=!0),cd?(ud!==""&&sd.push(ud.trim()),ud="",cd=!1):ud+=Ad;return(ad||ud!=="")&&sd.push(ud.trim()),sd}};qa.exports=td,td.default=td}),jt $ 1=y $ 3((Ra,qa)=>{var td=re $ 1(),rd=us(),nd=class extends td{constructor(ad){super(ad),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return rd.comma(this.selector)}set selectors(ad){let sd=this.selector?this.selector.match(/, \s */):null,ud=sd?sd[0]:","+this.raw("between","beforeOpen");this.selector=ad.join(ud)}};qa.exports=nd,nd.default=nd,td.registerRule(nd)}),Ht $ 2=y $ 3((Ra,qa)=>{var td=lt $ 1(),rd=Vt $ 2(),nd=Oe $ 1(),ad=Gt $ 2(),sd=Ae $ 1(),ud=jt $ 1(),cd={empty:!0,space:!0};function dd(fd){for(let Td=fd.length-1;Td>=0;Td--){let Ad=fd[Td],Sd=Ad[3]||Ad[2];if(Sd)return Sd}}var pd=class{constructor(fd){this.input=fd,this.root=new sd,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:fd,start:{column:1,line:1,offset:0}}}atrule(fd){let Td=new ad;Td.name=fd[1].slice(1),Td.name===""&&this.unnamedAtrule(Td,fd),this.init(Td,fd[2]);let Ad,Sd,Dd,Ld=!1,Rd=!1,Od=[],Md=[];for(;!this.tokenizer.endOfFile();){if(fd=this.tokenizer.nextToken(),Ad=fd[0],Ad==="("||Ad==="["?Md.push(Ad==="("?")":"]"):Ad==="{"&&Md.length>0?Md.push("}"):Ad===Md[Md.length-1]&&Md.pop(),Md.length===0)if(Ad===";"){Td.source.end=this.getPosition(fd[2]),Td.source.end.offset++,this.semicolon=!0;break}else if(Ad==="{"){Rd=!0;break}else if(Ad==="}"){if(Od.length>0){for(Dd=Od.length-1,Sd=Od[Dd];Sd&&Sd[0]==="space";)Sd=Od[--Dd];Sd&&(Td.source.end=this.getPosition(Sd[3]||Sd[2]),Td.source.end.offset++)}this.end(fd);break}else Od.push(fd);else Od.push(fd);if(this.tokenizer.endOfFile()){Ld=!0;break}}Td.raws.between=this.spacesAndCommentsFromEnd(Od),Od.length?(Td.raws.afterName=this.spacesAndCommentsFromStart(Od),this.raw(Td,"params",Od),Ld&&(fd=Od[Od.length-1],Td.source.end=this.getPosition(fd[3]||fd[2]),Td.source.end.offset++,this.spaces=Td.raws.between,Td.raws.between="")):(Td.raws.afterName="",Td.params=""),Rd&&(Td.nodes=[],this.current=Td)}checkMissedSemicolon(fd){let Td=this.colon(fd);if(Td===!1)return;let Ad=0,Sd;for(let Dd=Td-1;Dd>=0&&(Sd=fd[Dd],!(Sd[0]!=="space"&&(Ad+=1,Ad===2)));Dd--);throw this.input.error("Missed semicolon",Sd[0]==="word"?Sd[3]+1:Sd[2])}colon(fd){let Td=0,Ad,Sd,Dd;for(let[Ld,Rd]of fd.entries()){if(Ad=Rd,Sd=Ad[0],Sd==="("&&(Td+=1),Sd===")"&&(Td-=1),Td===0&&Sd===":")if(!Dd)this.doubleColon(Ad);else{if(Dd[0]==="word"&&Dd[1]==="progid")continue;return Ld}Dd=Ad}return!1}comment(fd){let Td=new nd;this.init(Td,fd[2]),Td.source.end=this.getPosition(fd[3]||fd[2]),Td.source.end.offset++;let Ad=fd[1].slice(2,-2);if(/^ \s * $ /.test(Ad))Td.text="",Td.raws.left=Ad,Td.raws.right="";else{let Sd=Ad.match(/^( \s *)([^]* \S )( \s *) $ /);Td.text=Sd[2],Td.raws.left=Sd[1],Td.raws.right=Sd[3]}}createTokenizer(){this.tokenizer=rd(this.input)}decl(fd,Td){let Ad=new td;this.init(Ad,fd[0][2]);let Sd=fd[fd.length-1];for(Sd[0]===";"&&(this.semicolon=!0,fd.pop()),Ad.source.end=this.getPosition(Sd[3]||Sd[2]||dd(fd)),Ad.source.end.offset++;fd[0][0]!=="word";)fd.length===1&&this.unknownWord(fd),Ad.raws.before+=fd.shift()[1];for(Ad.source.start=this.getPosition(fd[0][2]),Ad.prop="";fd.length;){let Od=fd[0][0];if(Od===":"||Od==="space"||Od==="comment")break;Ad.prop+=fd.shift()[1]}Ad.raws.between="";let Dd;for(;fd.length;)if(Dd=fd.shift(),Dd[0]===":"){Ad.raws.between+=Dd[1];break}else Dd[0]==="word"&&/ \w /.test(Dd[1])&&this.unknownWord([Dd]),Ad.raws.between+=Dd[1];(Ad.prop[0]==="_"||Ad.prop[0]==="*")&&(Ad.raws.before+=Ad.prop[0],Ad.prop=Ad.prop.slice(1));let Ld=[],Rd;for(;fd.length&&(Rd=fd[0][0],!(Rd!=="space"&&Rd!=="comment"));)Ld.push(fd.shift());this.precheckMissedSemicolon(fd);for(let Od=fd.length-1;Od>=0;Od--){if(Dd=fd[Od],Dd[1].toLowerCase()==="!important"){Ad.important=!0;let Md=this.stringFrom(fd,Od);Md=this.spacesFromEnd(fd)+Md,Md!==" !important"&&(Ad.r
` );Od=new Array(jd.length);let Ud=0;for(let Hd=0,Wd=jd.length;Hd<Wd;Hd++)Od[Hd]=Ud,Ud+=jd[Hd].length+1;this[Td]=Od}Rd=Od[Od.length-1];let Md=0;if(Ld>=Rd)Md=Od.length-1;else{let jd=Od.length-2,Ud;for(;Md<jd;)if(Ud=Md+(jd-Md>>1),Ld<Od[Ud])jd=Ud-1;else if(Ld>=Od[Ud+1])Md=Ud+1;else{Md=Ud;break}}return{col:Ld-Od[Md]+1,line:Md+1}}mapResolve(Ld){return/^ \w +: \/ \/ /.test(Ld)?Ld:ud(this.map.consumer().sourceRoot||this.map.root||".",Ld)}origin(Ld,Rd,Od,Md){if(!this.map)return!1;let jd=this.map.consumer(),Ud=jd.originalPositionFor({column:Rd,line:Ld});if(!Ud.source)return!1;let Hd;typeof Od=="number"&&(Hd=jd.originalPositionFor({column:Md,line:Od}));let Wd;sd(Ud.source)?Wd=ad(Ud.source):Wd=new URL(Ud.source,this.map.consumer().sourceRoot||ad(this.map.mapFile));let Zd={column:Ud.column,endColumn:Hd&&Hd.column,endLine:Hd&&Hd.line,line:Ud.line,url:Wd.toString()};if(Wd.protocol==="file:")if(nd)Zd.file=nd(Wd);else throw new Error("file: protocol is not available in this PostCSS build");let zd=jd.sourceContentFor(Ud.source);return zd&&(Zd.source=zd),Zd}toJSON(){let Ld={};for(let Rd of["hasBOM","css","file","id"])this[Rd]!=null&&(Ld[Rd]=this[Rd]);return this.map&&(Ld.map={...this.map},Ld.map.consumerCache&&(Ld.map.consumerCache=void 0)),Ld}get from(){return this.file||this.id}};qa.exports=Dd,Dd.default=Dd,dd&&dd.registerInput&&dd.registerInput(Dd)}),pt $ 1=y $ 3((Ra,qa)=>{var td=re $ 1(),rd=Ht $ 2(),nd=Re $ 2();function ad(sd,ud){let cd=new nd(sd,ud),dd=new rd(cd);try{dd.parse()}catch(pd){throw pd}return dd.root}qa.exports=ad,ad.default=ad,td.registerParse(ad)}),no $ 1=y $ 3((Ra,qa)=>{var td=Vt $ 2(),rd=Re $ 2();qa.exports={isInlineComment(nd){if(nd[0]==="word"&&nd[1].slice(0,2)==="//"){let ad=nd,sd=[],ud,cd;for(;nd;){if(/ \r ? \n /.test(nd[1])){if(/['"].* \r ? \n /.test(nd[1])){sd.push(nd[1].substring(0,nd[1].indexOf( `
2024-09-25 14:23:53 +08:00
` ))),cd=nd[1].substring(nd[1].indexOf( `
2024-09-28 20:51:35 +08:00
` ));let pd=this.input.css.valueOf().substring(this.tokenizer.position());cd+=pd,ud=nd[3]+pd.length-cd.length}else this.tokenizer.back(nd);break}sd.push(nd[1]),ud=nd[2],nd=this.tokenizer.nextToken({ignoreUnclosed:!0})}let dd=["comment",sd.join(""),ad[2],ud];return this.inlineComment(dd),cd&&(this.input=new rd(cd),this.tokenizer=td(this.input)),!0}else if(nd[1]==="/"){let ad=this.tokenizer.nextToken({ignoreUnclosed:!0});if(ad[0]==="comment"&&/^ \/ \* /.test(ad[1]))return ad[0]="word",ad[1]=ad[1].slice(1),nd[1]="//",this.tokenizer.back(ad),qa.exports.isInlineComment.bind(this)(nd)}return!1}}}),oo $ 2=y $ 3((Ra,qa)=>{qa.exports={interpolation(td){let rd=[td,this.tokenizer.nextToken()],nd=["word","}"];if(rd[0][1].length>1||rd[1][0]!=="{")return this.tokenizer.back(rd[1]),!1;for(td=this.tokenizer.nextToken();td&&nd.includes(td[0]);)rd.push(td),td=this.tokenizer.nextToken();let ad=rd.map(dd=>dd[1]),[sd]=rd,ud=rd.pop(),cd=["word",ad.join(""),sd[2],ud[2]];return this.tokenizer.back(td),this.tokenizer.back(cd),!0}}}),uo $ 2=y $ 3((Ra,qa)=>{var td=/^#[0-9a-fA-F]{6} $ |^#[0-9a-fA-F]{3} $ /,rd=/ \. [0-9]/,nd=ad=>{let[,sd]=ad,[ud]=sd;return(ud==="."||ud==="#")&&td.test(sd)===!1&&rd.test(sd)===!1};qa.exports={isMixinToken:nd}}),co $ 1=y $ 3((Ra,qa)=>{var td=Vt $ 2(),rd=/^url \( (.+) \) /;qa.exports=nd=>{let{name:ad,params:sd=""}=nd;if(ad==="import"&&sd.length){nd.import=!0;let ud=td({css:sd});for(nd.filename=sd.replace(rd," $ 1");!ud.endOfFile();){let[cd,dd]=ud.nextToken();if(cd==="word"&&dd==="url")return;if(cd==="brackets"){nd.options=dd,nd.filename=sd.replace(dd,"").trim();break}}}}}),mo $ 2=y $ 3((Ra,qa)=>{var td=/: $ /,rd=/^:( \s +)?/;qa.exports=nd=>{let{name:ad,params:sd=""}=nd;if(nd.name.slice(-1)===":"){if(td.test(ad)){let[ud]=ad.match(td);nd.name=ad.replace(ud,""),nd.raws.afterName=ud+(nd.raws.afterName||""),nd.variable=!0,nd.value=nd.params}if(rd.test(sd)){let[ud]=sd.match(rd);nd.value=sd.replace(ud,""),nd.raws.afterName=(nd.raws.afterName||"")+ud,nd.variable=!0}}}}),go $ 2=y $ 3((Ra,qa)=>{var td=Oe $ 1(),rd=Ht $ 2(),{isInlineComment:nd}=no $ 1(),{interpolation:ad}=oo $ 2(),{isMixinToken:sd}=uo $ 2(),ud=co $ 1(),cd=mo $ 2(),dd=/(! \s *important) $ /i;qa.exports=class extends rd{constructor(...pd){super(...pd),this.lastNode=null}atrule(pd){ad.bind(this)(pd)||(super.atrule(pd),ud(this.lastNode),cd(this.lastNode))}decl(...pd){super.decl(...pd),/extend \( .+ \) /i.test(this.lastNode.value)&&(this.lastNode.extend=!0)}each(pd){pd[0][1]= ` $ { pd [ 0 ] [ 1 ] } ` ;let fd=pd.findIndex(Dd=>Dd[0]==="("),Td=pd.reverse().find(Dd=>Dd[0]===")"),Ad=pd.reverse().indexOf(Td),Sd=pd.splice(fd,Ad).map(Dd=>Dd[1]).join("");for(let Dd of pd.reverse())this.tokenizer.back(Dd);this.atrule(this.tokenizer.nextToken()),this.lastNode.function=!0,this.lastNode.params=Sd}init(pd,fd,Td){super.init(pd,fd,Td),this.lastNode=pd}inlineComment(pd){let fd=new td,Td=pd[1].slice(2);if(this.init(fd,pd[2]),fd.source.end=this.getPosition(pd[3]||pd[2]),fd.inline=!0,fd.raws.begin="//",/^ \s * $ /.test(Td))fd.text="",fd.raws.left=Td,fd.raws.right="";else{let Ad=Td.match(/^( \s *)([^]*[^ \s ])( \s *) $ /);[,fd.raws.left,fd.text,fd.raws.right]=Ad}}mixin(pd){let[fd]=pd,Td=fd[1].slice(0,1),Ad=pd.findIndex(Od=>Od[0]==="brackets"),Sd=pd.findIndex(Od=>Od[0]==="("),Dd="";if((Ad<0||Ad>3)&&Sd>0){let Od=pd.reduce((Jd,hf,vf)=>hf[0]===")"?vf:Jd),Md=pd.slice(Sd,Od+Sd).map(Jd=>Jd[1]).join(""),[jd]=pd.slice(Sd),Ud=[jd[2],jd[3]],[Hd]=pd.slice(Od,Od+1),Wd=[Hd[2],Hd[3]],Zd=["brackets",Md].concat(Ud,Wd),zd=pd.slice(0,Sd),Qd=pd.slice(Od+1);pd=zd,pd.push(Zd),pd=pd.concat(Qd)}let Ld=[];for(let Od of pd)if((Od[1]==="!"||Ld.length)&&Ld.push(Od),Od[1]==="important")break;if(Ld.length){let[Od]=Ld,Md=pd.indexOf(Od),jd=Ld[Ld.length-1],Ud=[Od[2],Od[3]],Hd=[jd[4],jd[5]],Wd=["word",Ld.map(Zd=>Zd[1]).join("")].concat(Ud,Hd);pd.splice(Md,Ld.length,Wd)}let Rd=pd.findIndex(Od=>dd.test(Od[1]));Rd>0&&([,Dd]=pd[Rd],pd.splice(Rd,1));for(let Od of pd.reverse())this.tokenizer.back(Od);this.atrule(this.tokenizer.nextToken()),this.lastNode.mixin=!0,this.lastNode.raws.identifier=Td,Dd&&(this.lastNode.important=!0,this.lastNode.raws.important=Dd)}other(pd){nd.bind(this)(pd)||super.other(pd)}rule(pd){let
https : //evilmartians.com/chronicles/postcss-8-plugin-migration`));let Jd=Hd(...Qd);return Jd.postcssPlugin=Ud,Jd.postcssVersion=new sd().version,Jd}let zd;return Object.defineProperty(Zd,"postcss",{get(){return zd||(zd=Zd()),zd}}),Zd.process=function(Qd,Jd,hf){return jd([Zd(hf)]).process(Qd,Jd)},Zd},jd.stringify=ud,jd.parse=Dd,jd.fromJSON=cd,jd.list=Ld,jd.comment=Ud=>new fd(Ud),jd.atRule=Ud=>new Td(Ud),jd.decl=Ud=>new rd(Ud),jd.rule=Ud=>new Rd(Ud),jd.root=Ud=>new Od(Ud),jd.document=Ud=>new dd(Ud),jd.CssSyntaxError=td,jd.Declaration=rd,jd.Container=ad,jd.Processor=sd,jd.Document=dd,jd.Comment=fd,jd.Warning=pd,jd.AtRule=Td,jd.Result=Ad,jd.Input=Sd,jd.Rule=Rd,jd.Root=Od,jd.Node=Md,nd.registerPostcss(jd),qa.exports=jd,jd.default=jd}),Ho$2=y$3((Ra,qa)=>{var{Container:td}=Zt$1(),rd=class extends td{constructor(nd){super(nd),this.type="decl",this.isNested=!0,this.nodes||(this.nodes=[])}};qa.exports=rd}),Jo$1=y$3((Ra,qa)=>{var td=/[\t\n\f\r "#'()/;[\\\]{}]/g,rd=/[,\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,nd=/.[\r\n"'(/\\]/,ad=/[\da-f]/i,sd=/[\n\f\r]/g;qa.exports=function(ud,cd={}){let dd=ud.css.valueOf(),pd=cd.ignoreErrors,fd,Td,Ad,Sd,Dd,Ld,Rd,Od,Md,jd=dd.length,Ud=0,Hd=[],Wd=[],Zd;function zd(){return Ud}function Qd(_f){throw ud.error("Unclosed "+_f,Ud)}function Jd(){return Wd.length===0&&Ud>=jd}function hf(){let _f=1,bf=!1,xf=!1;for(;_f>0;)Td+=1,dd.length<=Td&&Qd("interpolation"),fd=dd.charCodeAt(Td),Od=dd.charCodeAt(Td+1),bf?!xf&&fd===bf?(bf=!1,xf=!1):fd===92?xf=!xf:xf&&(xf=!1):fd===39||fd===34?bf=fd:fd===125?_f-=1:fd===35&&Od===123&&(_f+=1)}function vf(_f){if(Wd.length)return Wd.pop();if(Ud>=jd)return;let bf=_f?_f.ignoreUnclosed:!1;switch(fd=dd.charCodeAt(Ud),fd){case 10:case 32:case 9:case 13:case 12:{Td=Ud;do Td+=1,fd=dd.charCodeAt(Td);while(fd===32||fd===10||fd===9||fd===13||fd===12);Md=["space",dd.slice(Ud,Td)],Ud=Td-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let xf=String.fromCharCode(fd);Md=[xf,xf,Ud];break}case 44:{Md=["word",",",Ud,Ud+1];break}case 40:{if(Rd=Hd.length?Hd.pop()[1]:"",Od=dd.charCodeAt(Ud+1),Rd==="url"&&Od!==39&&Od!==34){for(Zd=1,Ld=!1,Td=Ud+1;Td<=dd.length-1;){if(Od=dd.charCodeAt(Td),Od===92)Ld=!Ld;else if(Od===40)Zd+=1;else if(Od===41&&(Zd-=1,Zd===0))break;Td+=1}Sd=dd.slice(Ud,Td+1),Md=["brackets",Sd,Ud,Td],Ud=Td}else Td=dd.indexOf(")",Ud+1),Sd=dd.slice(Ud,Td+1),Td===-1||nd.test(Sd)?Md=["(","(",Ud]:(Md=["brackets",Sd,Ud,Td],Ud=Td);break}case 39:case 34:{for(Ad=fd,Td=Ud,Ld=!1;Td<jd&&(Td++,Td===jd&&Qd("string"),fd=dd.charCodeAt(Td),Od=dd.charCodeAt(Td+1),!(!Ld&&fd===Ad));)fd===92?Ld=!Ld:Ld?Ld=!1:fd===35&&Od===123&&hf();Md=["string",dd.slice(Ud,Td+1),Ud,Td],Ud=Td;break}case 64:{td.lastIndex=Ud+1,td.test(dd),td.lastIndex===0?Td=dd.length-1:Td=td.lastIndex-2,Md=["at-word",dd.slice(Ud,Td+1),Ud,Td],Ud=Td;break}case 92:{for(Td=Ud,Dd=!0;dd.charCodeAt(Td+1)===92;)Td+=1,Dd=!Dd;if(fd=dd.charCodeAt(Td+1),Dd&&fd!==47&&fd!==32&&fd!==10&&fd!==9&&fd!==13&&fd!==12&&(Td+=1,ad.test(dd.charAt(Td)))){for(;ad.test(dd.charAt(Td+1));)Td+=1;dd.charCodeAt(Td+1)===32&&(Td+=1)}Md=["word",dd.slice(Ud,Td+1),Ud,Td],Ud=Td;break}default:Od=dd.charCodeAt(Ud+1),fd===35&&Od===123?(Td=Ud,hf(),Sd=dd.slice(Ud,Td+1),Md=["word",Sd,Ud,Td],Ud=Td):fd===47&&Od===42?(Td=dd.indexOf("*/",Ud+2)+1,Td===0&&(pd||bf?Td=dd.length:Qd("comment")),Md=["comment",dd.slice(Ud,Td+1),Ud,Td],Ud=Td):fd===47&&Od===47?(sd.lastIndex=Ud+1,sd.test(dd),sd.lastIndex===0?Td=dd.length-1:Td=sd.lastIndex-2,Sd=dd.slice(Ud,Td+1),Md=["comment",Sd,Ud,Td,"inline"],Ud=Td):(rd.lastIndex=Ud+1,rd.test(dd),rd.lastIndex===0?Td=dd.length-1:Td=rd.lastIndex-2,Md=["word",dd.slice(Ud,Td+1),Ud,Td],Hd.push(Md),Ud=Td);break}return Ud++,Md}function Tf(_f){Wd.push(_f)}return{back:Tf,endOfFile:Jd,nextToken:vf,position:zd}}}),Zo$1=y$3((Ra,qa)=>{var{Comment:td}=Zt$1(),rd=Ht$2(),nd=Ho$2(),ad=Jo$1(),sd=class extends rd{atrule(ud){let cd=ud[1],dd=ud;for(;!this.tokenizer.endOfFile();){let pd=this.tokenizer.nextToken();if(pd[0]==="word"&&pd[2]===dd[3]+1)cd+=pd[1],dd=pd;else{this.tokenizer.back(pd);break}}super.atrule(["at-word",cd,ud[2],dd[3]])}comment(ud){if(ud[4]==="inline"){let c
` ))break;fd[0]==="("?dd+=1:fd[0]===")"?dd-=1:dd===0&&fd[0]===":"&&(cd=!0)}if(!cd||pd.trim()===""||/^[#:A-Za-z-]/.test(pd))super.rule(ud);else{ud.pop();let fd=new nd;this.init(fd,ud[0][2]);let Td;for(let Sd=ud.length-1;Sd>=0;Sd--)if(ud[Sd][0]!=="space"){Td=ud[Sd];break}if(Td[3]){let Sd=this.input.fromOffset(Td[3]);fd.source.end={column:Sd.col,line:Sd.line,offset:Td[3]+1}}else{let Sd=this.input.fromOffset(Td[2]);fd.source.end={column:Sd.col,line:Sd.line,offset:Td[2]+1}}for(;ud[0][0]!=="word";)fd.raws.before+=ud.shift()[1];if(ud[0][2]){let Sd=this.input.fromOffset(ud[0][2]);fd.source.start={column:Sd.col,line:Sd.line,offset:ud[0][2]}}for(fd.prop="";ud.length;){let Sd=ud[0][0];if(Sd===":"||Sd==="space"||Sd==="comment")break;fd.prop+=ud.shift()[1]}fd.raws.between="";let Ad;for(;ud.length;)if(Ad=ud.shift(),Ad[0]===":"){fd.raws.between+=Ad[1];break}else fd.raws.between+=Ad[1];(fd.prop[0]==="_"||fd.prop[0]==="*")&&(fd.raws.before+=fd.prop[0],fd.prop=fd.prop.slice(1)),fd.raws.between+=this.spacesAndCommentsFromStart(ud),this.precheckMissedSemicolon(ud);for(let Sd=ud.length-1;Sd>0;Sd--){if(Ad=ud[Sd],Ad[1]==="!important"){fd.important=!0;let Dd=this.stringFrom(ud,Sd);Dd=this.spacesFromEnd(ud)+Dd,Dd!==" !important"&&(fd.raws.important=Dd);break}else if(Ad[1]==="important"){let Dd=ud.slice(0),Ld="";for(let Rd=Sd;Rd>0;Rd--){let Od=Dd[Rd][0];if(Ld.trim().indexOf("!")===0&&Od!=="space")break;Ld=Dd.pop()[1]+Ld}Ld.trim().indexOf("!")===0&&(fd.important=!0,fd.raws.important=Ld,ud=Dd)}if(Ad[0]!=="space"&&Ad[0]!=="comment")break}this.raw(fd,"value",ud),fd.value.includes(":")&&this.checkMissedSemicolon(ud),this.current=fd}}};qa.exports=sd}),ta=y $ 3((Ra,qa)=>{var{Input:td}=Zt $ 1(),rd=Zo $ 1();qa.exports=function(nd,ad){let sd=new td(nd,ad),ud=new rd(sd);return ud.parse(),ud.root}}),Os=y $ 3(Ra=>{Object.defineProperty(Ra,"__esModule",{value:!0});function qa(td){this.after=td.after,this.before=td.before,this.type=td.type,this.value=td.value,this.sourceIndex=td.sourceIndex}Ra.default=qa}),As=y $ 3(Ra=>{Object.defineProperty(Ra,"__esModule",{value:!0});var qa=Os(),td=rd(qa);function rd(ad){return ad&&ad.__esModule?ad:{default:ad}}function nd(ad){var sd=this;this.constructor(ad),this.nodes=ad.nodes,this.after===void 0&&(this.after=this.nodes.length>0?this.nodes[this.nodes.length-1].after:""),this.before===void 0&&(this.before=this.nodes.length>0?this.nodes[0].before:""),this.sourceIndex===void 0&&(this.sourceIndex=this.before.length),this.nodes.forEach(function(ud){ud.parent=sd})}nd.prototype=Object.create(td.default.prototype),nd.constructor=td.default,nd.prototype.walk=function(ad,sd){for(var ud=typeof ad=="string"||ad instanceof RegExp,cd=ud?sd:ad,dd=typeof ad=="string"?new RegExp(ad):ad,pd=0;pd<this.nodes.length;pd++){var fd=this.nodes[pd],Td=ud?dd.test(fd.type):!0;if(Td&&cd&&cd(fd,pd,this.nodes)===!1||fd.nodes&&fd.walk(ad,sd)===!1)return!1}return!0},nd.prototype.each=function(){for(var ad=arguments.length<=0||arguments[0]===void 0?function(){}:arguments[0],sd=0;sd<this.nodes.length;sd++){var ud=this.nodes[sd];if(ad(ud,sd,this.nodes)===!1)return!1}return!0},Ra.default=nd}),aa $ 1=y $ 3(Ra=>{Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.parseMediaFeature=sd,Ra.parseMediaQuery=ud,Ra.parseMediaList=cd;var qa=Os(),td=ad(qa),rd=As(),nd=ad(rd);function ad(dd){return dd&&dd.__esModule?dd:{default:dd}}function sd(dd){var pd=arguments.length<=1||arguments[1]===void 0?0:arguments[1],fd=[{mode:"normal",character:null}],Td=[],Ad=0,Sd="",Dd=null,Ld=null,Rd=pd,Od=dd;dd[0]==="("&&dd[dd.length-1]===")"&&(Od=dd.substring(1,dd.length-1),Rd++);for(var Md=0;Md<Od.length;Md++){var jd=Od[Md];if((jd==="'"||jd==='"')&&(fd[Ad].isCalculationEnabled===!0?(fd.push({mode:"string",isCalculationEnabled:!1,character:jd}),Ad++):fd[Ad].mode==="string"&&fd[Ad].character===jd&&Od[Md-1]!==" \\ "&&(fd.pop(),Ad--)),jd==="{"?(fd.push({mode:"interpolation",isCalculationEnabled:!0}),Ad++):jd==="}"&&(fd.pop(),Ad--),fd[Ad].mode==="normal"&&jd===":"){var Ud=Od.substring(Md+1);Ld={type:"value",before:/^( \s *)/.exec(Ud)[1],after:/( \s *) $ /.exec(Ud)[1],value:Ud.trim()},Ld.sourceIndex=Ld.before.length
` ),Yf=Bf.length-1,Yf>0?(Pf=gf+Yf,Df=bf-Bf[Yf].length):(Pf=gf,Df=Ef),vf.push(["comment",Zf,gf,Mf-Ef,Pf,bf-Df,Mf]),Ef=Df,gf=Pf,Mf=bf):(Qd.lastIndex=Mf+1,Qd.test(Tf),Qd.lastIndex===0?bf=Tf.length-1:bf=Qd.lastIndex-2,vf.push(["word",Tf.slice(Mf,bf+1),gf,Mf-Ef,gf,bf-Ef,Mf]),Mf=bf);break}Mf++}return vf}qa.exports=Ra.default}),tu $ 2=y $ 3((Ra,qa)=>{Ra.__esModule=!0;var td=function(){function Ef(gf,Mf){for(var Gf=0;Gf<Mf.length;Gf++){var ah=Mf[Gf];ah.enumerable=ah.enumerable||!1,ah.configurable=!0,"value"in ah&&(ah.writable=!0),Object.defineProperty(gf,ah.key,ah)}}return function(gf,Mf,Gf){return Mf&&Ef(gf.prototype,Mf),Gf&&Ef(gf,Gf),gf}}(),rd=qs(),nd= $ f(rd),ad=Ls(),sd= $ f(ad),ud=Ds $ 1(),cd= $ f(ud),dd=ga $ 1(),pd= $ f(dd),fd=xa(),Td= $ f(fd),Ad=ka(),Sd= $ f(Ad),Dd=Sa(),Ld= $ f(Dd),Rd=Oa $ 1(),Od= $ f(Rd),Md=Aa(),jd= $ f(Md),Ud=Pa $ 1(),Hd= $ f(Ud),Wd=Ia(),Zd= $ f(Wd),zd=La(),Qd= $ f(zd),Jd=Ma(),hf= $ f(Jd),vf=Ua $ 1(),Tf= $ f(vf),_f= $ a $ 1(),bf= $ f(_f),xf=Ya $ 1(),Bf= $ f(xf),Yf=Xa $ 1(),Zf= $ f(Yf),Vf=D $ 1(),Pf=Df(Vf);function Df(Ef){if(Ef&&Ef.__esModule)return Ef;var gf={};if(Ef!=null)for(var Mf in Ef)Object.prototype.hasOwnProperty.call(Ef,Mf)&&(gf[Mf]=Ef[Mf]);return gf.default=Ef,gf}function $ f(Ef){return Ef&&Ef.__esModule?Ef:{default:Ef}}function Jf(Ef,gf){if(!(Ef instanceof gf))throw new TypeError("Cannot call a class as a function")}var Xf=function(){function Ef(gf){Jf(this,Ef),this.input=gf,this.lossy=gf.options.lossless===!1,this.position=0,this.root=new pd.default;var Mf=new Td.default;return this.root.append(Mf),this.current=Mf,this.lossy?this.tokens=(0,Zf.default)({safe:gf.safe,css:gf.css.trim()}):this.tokens=(0,Zf.default)(gf),this.loop()}return Ef.prototype.attribute=function(){var gf="",Mf=void 0,Gf=this.currToken;for(this.position++;this.position<this.tokens.length&&this.currToken[0]!=="]";)gf+=this.tokens[this.position][1],this.position++;this.position===this.tokens.length&&!~gf.indexOf("]")&&this.error("Expected a closing square bracket.");var ah=gf.split(/((?:[*~^ $ |]?=))([^]*)/),Wf=ah[0].split(/( \| )/g),Rf={operator:ah[1],value:ah[2],source:{start:{line:Gf[2],column:Gf[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:Gf[4]};if(Wf.length>1?(Wf[0]===""&&(Wf[0]=!0),Rf.attribute=this.parseValue(Wf[2]),Rf.namespace=this.parseNamespace(Wf[0])):Rf.attribute=this.parseValue(ah[0]),Mf=new Qd.default(Rf),ah[2]){var qf=ah[2].split(/( \s +i \s *?) $ /),lh=qf[0].trim();Mf.value=this.lossy?lh:qf[0],qf[1]&&(Mf.insensitive=!0,this.lossy||(Mf.raws.insensitive=qf[1])),Mf.quoted=lh[0]==="'"||lh[0]==='"',Mf.raws.unquoted=Mf.quoted?lh.slice(1,-1):lh}this.newNode(Mf),this.position++},Ef.prototype.combinator=function(){if(this.currToken[1]==="|")return this.namespace();for(var gf=new Tf.default({value:"",source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]});this.position<this.tokens.length&&this.currToken&&(this.currToken[0]==="space"||this.currToken[0]==="combinator");)this.nextToken&&this.nextToken[0]==="combinator"?(gf.spaces.before=this.parseSpace(this.currToken[1]),gf.source.start.line=this.nextToken[2],gf.source.start.column=this.nextToken[3],gf.source.end.column=this.nextToken[3],gf.source.end.line=this.nextToken[2],gf.sourceIndex=this.nextToken[4]):this.prevToken&&this.prevToken[0]==="combinator"?gf.spaces.after=this.parseSpace(this.currToken[1]):this.currToken[0]==="combinator"?gf.value=this.currToken[1]:this.currToken[0]==="space"&&(gf.value=this.parseSpace(this.currToken[1]," ")),this.position++;return this.newNode(gf)},Ef.prototype.comma=function(){if(this.position===this.tokens.length-1){this.root.trailingComma=!0,this.position++;return}var gf=new Td.default;this.current.parent.append(gf),this.current=gf,this.position++},Ef.prototype.comment=function(){var gf=new Ld.default({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[4],column:this.currToken[5]}},sourceIndex:this.currToken[6]});this.newNode(gf),this.position++},Ef.prototype.error=function(gf){throw new this.input.error(gf)},Ef.prototype.
` ?(ad=1,sd+=1):ad+=1;return{line:sd,column:ad}}positionBy(rd){let nd=this.source.start;if(Object(rd).index)nd=this.positionInside(rd.index);else if(Object(rd).word){let ad=this.toString().indexOf(rd.word);ad!==-1&&(nd=this.positionInside(ad))}return nd}}}),U $ 2=y $ 3((Ra,qa)=>{var td=z $ 2(),rd=class extends td{constructor(nd){super(nd),this.nodes||(this.nodes=[])}push(nd){return nd.parent=this,this.nodes.push(nd),this}each(nd){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let ad=this.lastEach,sd,ud;if(this.indexes[ad]=0,!!this.nodes){for(;this.indexes[ad]<this.nodes.length&&(sd=this.indexes[ad],ud=nd(this.nodes[sd],sd),ud!==!1);)this.indexes[ad]+=1;return delete this.indexes[ad],ud}}walk(nd){return this.each((ad,sd)=>{let ud=nd(ad,sd);return ud!==!1&&ad.walk&&(ud=ad.walk(nd)),ud})}walkType(nd,ad){if(!nd||!ad)throw new Error("Parameters {type} and {callback} are required.");let sd=typeof nd=="function";return this.walk((ud,cd)=>{if(sd&&ud instanceof nd||!sd&&ud.type===nd)return ad.call(this,ud,cd)})}append(nd){return nd.parent=this,this.nodes.push(nd),this}prepend(nd){return nd.parent=this,this.nodes.unshift(nd),this}cleanRaws(nd){if(super.cleanRaws(nd),this.nodes)for(let ad of this.nodes)ad.cleanRaws(nd)}insertAfter(nd,ad){let sd=this.index(nd),ud;this.nodes.splice(sd+1,0,ad);for(let cd in this.indexes)ud=this.indexes[cd],sd<=ud&&(this.indexes[cd]=ud+this.nodes.length);return this}insertBefore(nd,ad){let sd=this.index(nd),ud;this.nodes.splice(sd,0,ad);for(let cd in this.indexes)ud=this.indexes[cd],sd<=ud&&(this.indexes[cd]=ud+this.nodes.length);return this}removeChild(nd){nd=this.index(nd),this.nodes[nd].parent=void 0,this.nodes.splice(nd,1);let ad;for(let sd in this.indexes)ad=this.indexes[sd],ad>=nd&&(this.indexes[sd]=ad-1);return this}removeAll(){for(let nd of this.nodes)nd.parent=void 0;return this.nodes=[],this}every(nd){return this.nodes.every(nd)}some(nd){return this.nodes.some(nd)}index(nd){return typeof nd=="number"?nd:this.nodes.indexOf(nd)}get first(){if(this.nodes)return this.nodes[0]}get last(){if(this.nodes)return this.nodes[this.nodes.length-1]}toString(){let nd=this.nodes.map(String).join("");return this.value&&(nd=this.value+nd),this.raws.before&&(nd=this.raws.before+nd),this.raws.after&&(nd+=this.raws.after),nd}};rd.registerWalker=nd=>{let ad="walk"+nd.name;ad.lastIndexOf("s")!==ad.length-1&&(ad+="s"),!rd.prototype[ad]&&(rd.prototype[ad]=function(sd){return this.walkType(nd,sd)})},qa.exports=rd}),uu $ 2=y $ 3((Ra,qa)=>{var td=U $ 2();qa.exports=class extends td{constructor(rd){super(rd),this.type="root"}}}),cu $ 2=y $ 3((Ra,qa)=>{var td=U $ 2();qa.exports=class extends td{constructor(rd){super(rd),this.type="value",this.unbalanced=0}}}),hu $ 2=y $ 3((Ra,qa)=>{var td=U $ 2(),rd=class extends td{constructor(nd){super(nd),this.type="atword"}toString(){return this.quoted&&this.raws.quote,[this.raws.before,"@",String.prototype.toString.call(this.value),this.raws.after].join("")}};td.registerWalker(rd),qa.exports=rd}),mu $ 1=y $ 3((Ra,qa)=>{var td=U $ 2(),rd=z $ 2(),nd=class extends rd{constructor(ad){super(ad),this.type="colon"}};td.registerWalker(nd),qa.exports=nd}),wu $ 2=y $ 3((Ra,qa)=>{var td=U $ 2(),rd=z $ 2(),nd=class extends rd{constructor(ad){super(ad),this.type="comma"}};td.registerWalker(nd),qa.exports=nd}),vu $ 1=y $ 3((Ra,qa)=>{var td=U $ 2(),rd=z $ 2(),nd=class extends rd{constructor(ad){super(ad),this.type="comment",this.inline=Object(ad).inline||!1}toString(){return[this.raws.before,this.inline?"//":"/*",String(this.value),this.inline?"":"*/",this.raws.after].join("")}};td.registerWalker(nd),qa.exports=nd}),_u $ 1=y $ 3((Ra,qa)=>{var td=U $ 2(),rd=class extends td{constructor(nd){super(nd),this.type="func",this.unbalanced=-1}};td.registerWalker(rd),qa.exports=rd}),Eu $ 1=y $ 3((Ra,qa)=>{var td=U $ 2(),rd=z $ 2(),nd=class extends rd{constructor(ad){super(ad),this.type="number",this.unit=Object(ad).unit||""}toString(){return[this.raws.before,String(this.value),this.unit,this.raws.after].join("")}};td.registerWalker(nd),qa.exports=nd}),Tu $ 1=y $ 3((Ra,qa)=>{var td=U $ 2(),rd=z $ 2(),nd=class extends rd{constructor(ad){super(a
` ,Dd+2);Md=Tf!==-1?Tf-1:Td}Wd=fd.slice(Dd,Md+1),Ud=Wd.split( `
` ),Hd=Ud.length-1,Hd>0?(Zd=Sd+Hd,zd=Md-Ud[Hd].length):(Zd=Sd,zd=Ad),pd.push(["comment",Wd,Sd,Dd-Ad,Zd,Md-zd,Dd]),Ad=zd,Sd=Zd,Dd=Md}else if(Od===35&&!ad.test(fd.slice(Dd+1,Dd+2)))Md=Dd+1,pd.push(["#",fd.slice(Dd,Md),Sd,Dd-Ad,Sd,Md-Ad,Dd]),Dd=Md-1;else if((Od===117||Od===85)&&fd.charCodeAt(Dd+1)===43){Md=Dd+2;do Md+=1,Od=fd.charCodeAt(Md);while(Md<Td&&sd.test(fd.slice(Md,Md+1)));pd.push(["unicoderange",fd.slice(Dd,Md),Sd,Dd-Ad,Sd,Md-Ad,Dd]),Dd=Md-1}else if(Od===47)Md=Dd+1,pd.push(["operator",fd.slice(Dd,Md),Sd,Dd-Ad,Sd,Md-Ad,Dd]),Dd=Md-1;else{let Tf=rd;if(Od>=48&&Od<=57&&(Tf=nd),Tf.lastIndex=Dd+1,Tf.test(fd),Tf.lastIndex===0?Md=fd.length-1:Md=Tf.lastIndex-2,Tf===nd||Od===46){let _f=fd.charCodeAt(Md),bf=fd.charCodeAt(Md+1),xf=fd.charCodeAt(Md+2);(_f===101||_f===69)&&(bf===45||bf===43)&&xf>=48&&xf<=57&&(nd.lastIndex=Md+2,nd.test(fd),nd.lastIndex===0?Md=fd.length-1:Md=nd.lastIndex-2)}pd.push(["word",fd.slice(Dd,Md+1),Sd,Dd-Ad,Sd,Md-Ad,Dd]),Dd=Md}break}Dd++}return pd}}), $ u $ 1=y $ 3((Ra,qa)=>{var td=class extends Error{constructor(rd){super(rd),this.name=this.constructor.name,this.message=rd||"An error ocurred while parsing.",typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(rd).stack}};qa.exports=td}),Vu $ 1=y $ 3((Ra,qa)=>{var td=uu $ 2(),rd=cu $ 2(),nd=hu $ 2(),ad=mu $ 1(),sd=wu $ 2(),ud=vu $ 1(),cd=_u $ 1(),dd=Eu $ 1(),pd=Tu $ 1(),fd=Cu $ 2(),Td=Nu $ 1(),Ad=Ru $ 1(),Sd=qu $ 1(),Dd=Uu $ 1(),Ld=qs(),Rd=Ls(),Od=Ds $ 1(),Md= $ u $ 1();function jd(Ud){return Ud.sort((Hd,Wd)=>Hd-Wd)}qa.exports=class{constructor(Ud,Hd){let Wd={loose:!1};this.cache=[],this.input=Ud,this.options=Object.assign({},Wd,Hd),this.position=0,this.unbalanced=0,this.root=new td;let Zd=new rd;this.root.append(Zd),this.current=Zd,this.tokens=Dd(Ud,this.options)}parse(){return this.loop()}colon(){let Ud=this.currToken;this.newNode(new ad({value:Ud[1],source:{start:{line:Ud[2],column:Ud[3]},end:{line:Ud[4],column:Ud[5]}},sourceIndex:Ud[6]})),this.position++}comma(){let Ud=this.currToken;this.newNode(new sd({value:Ud[1],source:{start:{line:Ud[2],column:Ud[3]},end:{line:Ud[4],column:Ud[5]}},sourceIndex:Ud[6]})),this.position++}comment(){let Ud=!1,Hd=this.currToken[1].replace(/ \/ \* | \* \/ /g,""),Wd;this.options.loose&&Hd.startsWith("//")&&(Hd=Hd.substring(2),Ud=!0),Wd=new ud({value:Hd,inline:Ud,source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[4],column:this.currToken[5]}},sourceIndex:this.currToken[6]}),this.newNode(Wd),this.position++}error(Ud,Hd){throw new Md(Ud+ ` at line : $ { Hd [ 2 ] } , column $ { Hd [ 3 ] } ` )}loop(){for(;this.position<this.tokens.length;)this.parseTokens();return!this.current.last&&this.spaces?this.current.raws.before+=this.spaces:this.spaces&&(this.current.last.raws.after+=this.spaces),this.spaces="",this.root}operator(){let Ud=this.currToken[1],Hd;if(Ud==="+"||Ud==="-"){if(this.options.loose||this.position>0&&(this.current.type==="func"&&this.current.value==="calc"?this.prevToken[0]!=="space"&&this.prevToken[0]!=="("?this.error("Syntax Error",this.currToken):this.nextToken[0]!=="space"&&this.nextToken[0]!=="word"?this.error("Syntax Error",this.currToken):this.nextToken[0]==="word"&&this.current.last.type!=="operator"&&this.current.last.value!=="("&&this.error("Syntax Error",this.currToken):(this.nextToken[0]==="space"||this.nextToken[0]==="operator"||this.prevToken[0]==="operator")&&this.error("Syntax Error",this.currToken)),this.options.loose){if((!this.current.nodes.length||this.current.last&&this.current.last.type==="operator")&&this.nextToken[0]==="word")return this.word()}else if(this.nextToken[0]==="word")return this.word()}return Hd=new pd({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]}),this.position++,this.newNode(Hd)}parseTokens(){switch(this.currToken[0]){case"space":this.space();break;case"colon":this.colon();break;case"comma":this.comma();break;case"comment":this.comment();break;case"(":this.parenOpen();break;case")":this.parenClose();break;case"atword":case"
2024-09-25 14:23:53 +08:00
Expected it to be 'string' or 'object' . ` ;if(Ve $ 1(Ra))throw new Error("doc is valid.");let td=Object.prototype.toString.call(Ra);if(td!=="[object Object]")return ` Unexpected doc '${td}' . ` ;let rd=ml([...bt $ 2].map(nd=> ` '${nd}' ` ));return ` Unexpected doc . type '${Ra.type}' .
Expected it to be $ { rd } . ` }var Fr $ 1=class extends Error{constructor(td){super(yl(td));Qm(this,"name","InvalidDocError");this.doc=td}}, $ r $ 1=Fr $ 1,Zs=()=>{},_t $ 1=Zs;function q $ 2(Ra){return{type:we $ 1,contents:Ra}}function en $ 1(Ra,qa){return{type:ge $ 1,contents:qa,n:Ra}}function L $ 2(Ra,qa={}){return _t $ 1(qa.expandedStates),{type:ve $ 1,id:qa.id,contents:Ra,break:!!qa.shouldBreak,expandedStates:qa.expandedStates}}function tn $ 1(Ra){return en $ 1({type:"root"},Ra)}function ue $ 1(Ra){return en $ 1(-1,Ra)}function Ge $ 1(Ra){return{type:xe $ 2,parts:Ra}}function kt $ 2(Ra,qa="",td={}){return{type:oe $ 1,breakContents:Ra,flatContents:qa,groupId:td.groupId}}var je $ 2={type:be $ 2},wl={type:K $ 1,hard:!0},A $ 1={type:K $ 1},M $ 2={type:K $ 1,soft:!0},E $ 1=[wl,je $ 2];function V $ 2(Ra,qa){let td=[];for(let rd=0;rd<qa.length;rd++)rd!==0&&td.push(Ra),td.push(qa[rd]);return td}var gl=(Ra,qa,td)=>{if(!(Ra&&qa==null))return Array.isArray(qa)||typeof qa=="string"?qa[td<0?qa.length+td:td]:qa.at(td)},G $ 2=gl;function vl(Ra,qa){if(typeof Ra=="string")return qa(Ra);let td=new Map;return rd(Ra);function rd(ad){if(td.has(ad))return td.get(ad);let sd=nd(ad);return td.set(ad,sd),sd}function nd(ad){switch(Ve $ 1(ad)){case Be $ 1:return qa(ad.map(rd));case xe $ 2:return qa({...ad,parts:ad.parts.map(rd)});case oe $ 1:return qa({...ad,breakContents:rd(ad.breakContents),flatContents:rd(ad.flatContents)});case ve $ 1:{let{expandedStates:sd,contents:ud}=ad;return sd?(sd=sd.map(rd),ud=sd[0]):ud=rd(ud),qa({...ad,contents:ud,expandedStates:sd})}case ge $ 1:case we $ 1:case $ e $ 2:case ze $ 1:case We $ 1:return qa({...ad,contents:rd(ad.contents)});case Me $ 2:case Ue $ 1:case Fe $ 1:case Ye $ 1:case K $ 1:case be $ 2:return qa(ad);default:throw new $ r $ 1(ad)}}}function xl $ 1(Ra){return Ra.type===K $ 1&&!Ra.hard?Ra.soft?"":" ":Ra.type===oe $ 1?Ra.flatContents:Ra}function rn $ 1(Ra){return vl(Ra,xl $ 1)}function bl(Ra){return Array.isArray(Ra)&&Ra.length>0}var ee $ 1=bl,Et $ 1="'",sn='"';function _l(Ra,qa){let td=qa===!0||qa===Et $ 1?Et $ 1:sn,rd=td===Et $ 1?sn:Et $ 1,nd=0,ad=0;for(let sd of Ra)sd===td?nd++:sd===rd&&ad++;return nd>ad?rd:td}var nn $ 1=_l;function kl $ 1(Ra,qa,td){let rd=qa==='"'?"'":'"',nd=_ $ 3(!1,Ra,/ \\ (.)|(["'])/gsu,(ad,sd,ud)=>sd===rd?sd:ud===qa?" \\ "+ud:ud||(td&&/^[^ \n \r "'0-7 \\ bfnrt-vx \u 2028 \u 2029] $ /u.test(sd)?sd:" \\ "+sd));return qa+nd+qa}var on=kl $ 1;function El $ 1(Ra,qa){let td=Ra.slice(1,-1),rd=qa.parser==="json"||qa.parser==="jsonc"||qa.parser==="json5"&&qa.quoteProps==="preserve"&&!qa.singleQuote?'"':qa.__isInHtmlAttribute?"'":nn $ 1(td,qa.singleQuote);return on(td,rd,!(qa.parser==="css"||qa.parser==="less"||qa.parser==="scss"||qa.__embeddedInHtml))}var St $ 1=El $ 1,Wr $ 1=class extends Error{constructor(td,rd,nd="type"){super( ` Unexpected $ { rd } node $ { nd } : $ { JSON . stringify ( td [ nd ] ) } . ` );Qm(this,"name","UnexpectedNodeError");this.node=td}},an $ 1=Wr $ 1;function Sl(Ra){return(Ra==null?void 0:Ra.type)==="front-matter"}var _e $ 1=Sl,Tl=new Set(["raw","raws","sourceIndex","source","before","after","trailingComma","spaces"]);function un $ 1(Ra,qa,td){if(_e $ 1(Ra)&&Ra.language==="yaml"&&delete qa.value,Ra.type==="css-comment"&&td.type==="css-root"&&td.nodes.length>0&&((td.nodes[0]===Ra||_e $ 1(td.nodes[0])&&td.nodes[1]===Ra)&&(delete qa.text,/^ \* \s *@(?:format|prettier) \s * $ /u.test(Ra.text))||td.type==="css-root"&&G $ 2(!1,td.nodes,-1)===Ra))return null;if(Ra.type==="value-root"&&delete qa.text,(Ra.type==="media-query"||Ra.type==="media-query-list"||Ra.type==="media-feature-expression")&&delete qa.value,Ra.type==="css-rule"&&delete qa.params,(Ra.type==="media-feature"||Ra.type==="media-keyword"||Ra.type==="media-type"||Ra.type==="media-unknown"||Ra.type==="media-url"||Ra.type==="media-value"||Ra.type==="selector-attribute"||Ra.type==="selector-string"||Ra.type==="selector-class"||Ra.type==="selector-combinator"||Ra.type==="value-string")&&Ra.value&&(qa.value=Ol $ 1(Ra.value)),Ra.type==="selector-combinator"&&(qa.value=_ $ 3(!1,qa.value,/ \s +/gu," ")),Ra.type==="media-feature"&&(qa.value=_ $ 3(!1,qa.value," ","")),(Ra.type==="value-word"&&(Ra.isColor&&Ra.isHex||["initial","inherit","unset","revert"].includes(Ra.value.toLowerCase()))||Ra.type==="media-feature"||Ra.type
` ,td)+1;return td+Ra.column}var zr $ 1=Il;function Tt $ 2(Ra){return(qa,td,rd)=>{let nd=!!(rd!=null&&rd.backwards);if(td===!1)return!1;let{length:ad}=qa,sd=td;for(;sd>=0&&sd<ad;){let ud=qa.charAt(sd);if(Ra instanceof RegExp){if(!Ra.test(ud))return sd}else if(!Ra.includes(ud))return sd;nd?sd--:sd++}return sd===-1||sd===ad?sd:!1}}var Ot $ 2=Tt $ 2(" "),yn $ 1=Tt $ 2(",; "),Ct $ 1=Tt $ 2(/[^ \n \r ]/u);function wn $ 2(Ra,qa){var td,rd,nd;if(typeof((rd=(td=Ra.source)==null?void 0:td.start)==null?void 0:rd.offset)=="number")return Ra.source.start.offset;if(typeof Ra.sourceIndex=="number")return Ra.sourceIndex;if((nd=Ra.source)!=null&&nd.start)return zr $ 1(Ra.source.start,qa);throw Object.assign(new Error("Can not locate node."),{node:Ra})}function Vr $ 1(Ra,qa){var td,rd;if(Ra.type==="css-comment"&&Ra.inline)return Ct $ 1(qa,Ra.source.startOffset);if(typeof((rd=(td=Ra.source)==null?void 0:td.end)==null?void 0:rd.offset)=="number")return Ra.source.end.offset;if(Ra.source){if(Ra.source.end)return zr $ 1(Ra.source.end,qa);if(ee $ 1(Ra.nodes))return Vr $ 1(G $ 2(!1,Ra.nodes,-1),qa)}return null}function Gr $ 1(Ra,qa){Ra.source&&(Ra.source.startOffset=wn $ 2(Ra,qa),Ra.source.endOffset=Vr $ 1(Ra,qa));for(let td in Ra){let rd=Ra[td];td==="source"||!rd||typeof rd!="object"||(rd.type==="value-root"||rd.type==="value-unknown"?gn $ 2(rd,ql(Ra),rd.text||rd.value):Gr $ 1(rd,qa))}}function gn $ 2(Ra,qa,td){Ra.source&&(Ra.source.startOffset=wn $ 2(Ra,td)+qa,Ra.source.endOffset=Vr $ 1(Ra,td)+qa);for(let rd in Ra){let nd=Ra[rd];rd==="source"||!nd||typeof nd!="object"||gn $ 2(nd,qa,td)}}function ql(Ra){var qa;let td=Ra.source.startOffset;return typeof Ra.prop=="string"&&(td+=Ra.prop.length),Ra.type==="css-atrule"&&typeof Ra.name=="string"&&(td+=1+Ra.name.length+Ra.raws.afterName.match(/^ \s *:? \s */u)[0].length),Ra.type!=="css-atrule"&&typeof((qa=Ra.raws)==null?void 0:qa.between)=="string"&&(td+=Ra.raws.between.length),td}function vn $ 1(Ra){let qa="initial",td="initial",rd,nd=!1,ad=[];for(let sd=0;sd<Ra.length;sd++){let ud=Ra[sd];switch(qa){case"initial":if(ud==="'"){qa="single-quotes";continue}if(ud==='"'){qa="double-quotes";continue}if((ud==="u"||ud==="U")&&Ra.slice(sd,sd+4).toLowerCase()==="url("){qa="url",sd+=3;continue}if(ud==="*"&&Ra[sd-1]==="/"){qa="comment-block";continue}if(ud==="/"&&Ra[sd-1]==="/"){qa="comment-inline",rd=sd-1;continue}continue;case"single-quotes":if(ud==="'"&&Ra[sd-1]!==" \\ "&&(qa=td,td="initial"),ud=== `
` ||ud===" \r ")return Ra;continue;case"double-quotes":if(ud==='"'&&Ra[sd-1]!==" \\ "&&(qa=td,td="initial"),ud=== `
` ||ud===" \r ")return Ra;continue;case"url":if(ud===")"&&(qa="initial"),ud=== `
` ||ud===" \r ")return Ra;if(ud==="'"){qa="single-quotes",td="url";continue}if(ud==='"'){qa="double-quotes",td="url";continue}continue;case"comment-block":ud==="/"&&Ra[sd-1]==="*"&&(qa="initial");continue;case"comment-inline":(ud==='"'||ud==="'"||ud==="*")&&(nd=!0),(ud=== `
` ||ud===" \r ")&&(nd&&ad.push([rd,sd]),qa="initial",nd=!1);continue}}for(let[sd,ud]of ad)Ra=Ra.slice(0,sd)+_ $ 3(!1,Ra.slice(sd,ud),/["'*]/gu," ")+Ra.slice(ud);return Ra}function N $ 2(Ra){var qa;return(qa=Ra.source)==null?void 0:qa.startOffset}function P $ 2(Ra){var qa;return(qa=Ra.source)==null?void 0:qa.endOffset}var Ll $ 1=/ \* \/ $ /,Dl $ 1=/^ \/ \* \* ?/,kn $ 1=/^ \s *( \/ \* \* ?(.| \r ? \n )*? \* \/ )/,Ml $ 1=/(^| \s +) \/ \/ ([^ \n \r ]*)/g,xn $ 1=/^( \r ? \n )+/,Bl=/(?:^| \r ? \n ) *(@[^ \n \r ]*?) * \r ? \n *(?![^ \n \r @]* \/ \/ [^]*)([^ \s @][^ \n \r @]+?) * \r ? \n /g,bn $ 2=/(?:^| \r ? \n ) *@( \S +) *([^ \n \r ]*)/g,Ul=/( \r ? \n |^) * \* ?/g,En $ 1=[];function Sn $ 1(Ra){let qa=Ra.match(kn $ 1);return qa?qa[0].trimStart():""}function Tn $ 2(Ra){let qa=Ra.match(kn $ 1),td=qa==null?void 0:qa[0];return td==null?Ra:Ra.slice(td.length)}function On $ 1(Ra){let qa= `
` ;Ra=_ $ 3(!1,Ra.replace(Dl $ 1,"").replace(Ll $ 1,""),Ul," $ 1");let td="";for(;td!==Ra;)td=Ra,Ra=_ $ 3(!1,Ra,Bl, ` $ { qa } $1 $2$ { qa } ` );Ra=Ra.replace(xn $ 1,"").trimEnd();let rd=Object.create(null),nd=_ $ 3(!1,Ra,bn $ 2,"").replace(xn $ 1,"").trimEnd(),ad;for(;ad=bn $ 2.exec(Ra);){let sd=_ $ 3(!1,ad[2],Ml $ 1,"");if(typeof rd[ad[1]]=="string"||Array.isArray(rd[ad[1]])){let ud=rd[ad[1]];rd[ad[1]]=[...En $ 1,...Array.isArray(ud)?ud:[ud],sd]}else rd[ad[1]]=sd}return{comments:nd,pragmas:rd}}function Cn $ 2({comments:Ra="",pragmas:qa={}}){let td= `
` ,rd="/**",nd=" *",ad=" */",sd=Object.keys(qa),ud=sd.flatMap(dd=>_n $ 2(dd,qa[dd])).map(dd=> ` $ { nd } $ { dd } $ { td } ` ).join("");if(!Ra){if(sd.length===0)return"";if(sd.length===1&&!Array.isArray(qa[sd[0]])){let dd=qa[sd[0]];return ` $ { rd } $ { _n$2 ( sd [ 0 ] , dd ) [ 0 ] } $ { ad } ` }}let cd=Ra.split(td).map(dd=> ` $ { nd } $ { dd } ` ).join(td)+td;return rd+td+(Ra?cd:"")+(Ra&&sd.length>0?nd+td:"")+ud+ad}function _n $ 2(Ra,qa){return[...En $ 1,...Array.isArray(qa)?qa:[qa]].map(td=> ` @ $ { Ra } $ { td } ` .trim())}function Fl(Ra){if(!Ra.startsWith("#!"))return"";let qa=Ra.indexOf( `
` );return qa===-1?Ra:Ra.slice(0,qa)}var An $ 1=Fl;function Nn $ 1(Ra){let qa=An $ 1(Ra);qa&&(Ra=Ra.slice(qa.length+1));let td=Sn $ 1(Ra),{pragmas:rd,comments:nd}=On $ 1(td);return{shebang:qa,text:Ra,pragmas:rd,comments:nd}}function Pn $ 2(Ra){let{pragmas:qa}=Nn $ 1(Ra);return Object.prototype.hasOwnProperty.call(qa,"prettier")||Object.prototype.hasOwnProperty.call(qa,"format")}function Rn(Ra){let{shebang:qa,text:td,pragmas:rd,comments:nd}=Nn $ 1(Ra),ad=Tn $ 2(td),sd=Cn $ 2({pragmas:{format:"",...rd},comments:nd.trimStart()});return(qa? ` $ { qa }
` :"")+sd+(ad.startsWith( `
2024-09-18 09:46:23 +08:00
` )? `
` : `
2024-09-25 14:23:53 +08:00
` )+ad}var Qe $ 1=3;function $ l(Ra){let qa=Ra.slice(0,Qe $ 1);if(qa!=="---"&&qa!=="+++")return;let td=Ra.indexOf( `
` ,Qe $ 1);if(td===-1)return;let rd=Ra.slice(Qe $ 1,td).trim(),nd=Ra.indexOf( `
$ { qa } ` ,td),ad=rd;if(ad||(ad=qa==="+++"?"toml":"yaml"),nd===-1&&qa==="---"&&ad==="yaml"&&(nd=Ra.indexOf( `
... ` ,td)),nd===-1)return;let sd=nd+1+Qe $ 1,ud=Ra.charAt(sd+1);if(!/ \s ?/u.test(ud))return;let cd=Ra.slice(0,sd);return{type:"front-matter",language:ad,explicitLanguage:rd,value:Ra.slice(td+1,nd),startDelimiter:qa,endDelimiter:cd.slice(-Qe $ 1),raw:cd}}function Wl $ 1(Ra){let qa= $ l(Ra);if(!qa)return{content:Ra};let{raw:td}=qa;return{frontMatter:qa,content:_ $ 3(!1,td,/[^ \n ]/gu," ")+Ra.slice(td.length)}}var Je $ 2=Wl $ 1;function In(Ra){return Pn $ 2(Je $ 2(Ra).content)}function qn $ 2(Ra){let{frontMatter:qa,content:td}=Je $ 2(Ra);return(qa?qa.raw+ `
2024-09-28 20:51:35 +08:00
` :"")+Rn(td)}var Yl $ 1=new Set(["red","green","blue","alpha","a","rgb","hue","h","saturation","s","lightness","l","whiteness","w","blackness","b","tint","shade","blend","blenda","contrast","hsl","hsla","hwb","hwba"]);function Ln(Ra){var qa,td;return(td=(qa=Ra.findAncestor(rd=>rd.type==="css-decl"))==null?void 0:qa.prop)==null?void 0:td.toLowerCase()}var zl $ 1=new Set(["initial","inherit","unset","revert"]);function Dn $ 2(Ra){return zl $ 1.has(Ra.toLowerCase())}function Mn(Ra,qa){var td;let rd=Ra.findAncestor(nd=>nd.type==="css-atrule");return((td=rd==null?void 0:rd.name)==null?void 0:td.toLowerCase().endsWith("keyframes"))&&["from","to"].includes(qa.toLowerCase())}function te $ 1(Ra){return Ra.includes(" $ ")||Ra.includes("@")||Ra.includes("#")||Ra.startsWith("%")||Ra.startsWith("--")||Ra.startsWith(":--")||Ra.includes("(")&&Ra.includes(")")?Ra:Ra.toLowerCase()}function ke $ 2(Ra,qa){var td;let rd=Ra.findAncestor(nd=>nd.type==="value-func");return((td=rd==null?void 0:rd.value)==null?void 0:td.toLowerCase())===qa}function Bn $ 2(Ra){var qa;let td=Ra.findAncestor(nd=>nd.type==="css-rule"),rd=(qa=td==null?void 0:td.raws)==null?void 0:qa.selector;return rd&&(rd.startsWith(":import")||rd.startsWith(":export"))}function Ee $ 1(Ra,qa){let td=Array.isArray(qa)?qa:[qa],rd=Ra.findAncestor(nd=>nd.type==="css-atrule");return rd&&td.includes(rd.name.toLowerCase())}function Un $ 1(Ra){var qa;let{node:td}=Ra;return td.groups[0].value==="url"&&td.groups.length===2&&((qa=Ra.findAncestor(rd=>rd.type==="css-atrule"))==null?void 0:qa.name)==="import"}function Fn $ 1(Ra){return Ra.type==="value-func"&&Ra.value.toLowerCase()==="url"}function $ n $ 2(Ra){return Ra.type==="value-func"&&Ra.value.toLowerCase()==="var"}function Wn(Ra){let{selector:qa}=Ra;return qa?typeof qa=="string"&&/^@.+:.* $ /u.test(qa)||qa.value&&/^@.+:.* $ /u.test(qa.value):!1}function Yn $ 1(Ra){return Ra.type==="value-word"&&["from","through","end"].includes(Ra.value)}function zn $ 1(Ra){return Ra.type==="value-word"&&["and","or","not"].includes(Ra.value)}function Vn $ 1(Ra){return Ra.type==="value-word"&&Ra.value==="in"}function At $ 2(Ra){return Ra.type==="value-operator"&&Ra.value==="*"}function Xe $ 1(Ra){return Ra.type==="value-operator"&&Ra.value==="/"}function Q $ 3(Ra){return Ra.type==="value-operator"&&Ra.value==="+"}function le $ 1(Ra){return Ra.type==="value-operator"&&Ra.value==="-"}function Vl(Ra){return Ra.type==="value-operator"&&Ra.value==="%"}function Nt $ 1(Ra){return At $ 2(Ra)||Xe $ 1(Ra)||Q $ 3(Ra)||le $ 1(Ra)||Vl(Ra)}function Gn $ 2(Ra){return Ra.type==="value-word"&&["==","!="].includes(Ra.value)}function jn $ 1(Ra){return Ra.type==="value-word"&&["<",">","<=",">="].includes(Ra.value)}function Ze $ 1(Ra,qa){return qa.parser==="scss"&&Ra.type==="css-atrule"&&["if","else","for","each","while"].includes(Ra.name)}function Hr $ 1(Ra){var qa;return((qa=Ra.raws)==null?void 0:qa.params)&&/^ \( \s * \) $ /u.test(Ra.raws.params)}function Pt $ 1(Ra){return Ra.name.startsWith("prettier-placeholder")}function Hn(Ra){return Ra.prop.startsWith("@prettier-placeholder")}function Kn $ 1(Ra,qa){return Ra.value===" $ $ "&&Ra.type==="value-func"&&(qa==null?void 0:qa.type)==="value-word"&&!qa.raws.before}function Qn $ 2(Ra){var qa,td;return((qa=Ra.value)==null?void 0:qa.type)==="value-root"&&((td=Ra.value.group)==null?void 0:td.type)==="value-value"&&Ra.prop.toLowerCase()==="composes"}function Jn $ 2(Ra){var qa,td,rd;return((rd=(td=(qa=Ra.value)==null?void 0:qa.group)==null?void 0:td.group)==null?void 0:rd.type)==="value-paren_group"&&Ra.value.group.group.open!==null&&Ra.value.group.group.close!==null}function ce $ 1(Ra){var qa;return((qa=Ra.raws)==null?void 0:qa.before)===""}function Rt $ 2(Ra){var qa,td;return Ra.type==="value-comma_group"&&((td=(qa=Ra.groups)==null?void 0:qa[1])==null?void 0:td.type)==="value-colon"}function jr $ 1(Ra){var qa;return Ra.type==="value-paren_group"&&((qa=Ra.groups)==null?void 0:qa[0])&&Rt $ 2(Ra.groups[0])}function Kr $ 1(Ra,qa){var td;if(qa.parser!=="scss")return!1;let{node:rd}=Ra;if(rd.groups.length===0)return!1;let nd=Ra.grandparent;if(!jr $ 1(rd)&&!(nd&&jr $ 1(nd)))return!1;let ad=Ra.findAncestor(sd=>sd.type==="css-decl"
2024-09-25 14:23:53 +08:00
` )return qa-2;if(nd=== `
` ||nd===" \r "||nd===" \u 2028"||nd===" \u 2029")return qa-1}else{if(nd===" \r "&&Ra.charAt(qa+1)=== `
` )return qa+2;if(nd=== `
2024-09-28 20:51:35 +08:00
` ||nd===" \r "||nd===" \u 2028"||nd===" \u 2029")return qa+1}return qa}var Dt $ 2=Xl $ 1;function Zl(Ra,qa,td={}){let rd=Ot $ 2(Ra,td.backwards?qa-1:qa,td),nd=Dt $ 2(Ra,rd,td);return rd!==nd}var Mt $ 1=Zl;function ec(Ra,qa){if(qa===!1)return!1;if(Ra.charAt(qa)==="/"&&Ra.charAt(qa+1)==="*"){for(let td=qa+2;td<Ra.length;++td)if(Ra.charAt(td)==="*"&&Ra.charAt(td+1)==="/")return td+2}return qa}var ui $ 2=ec;function tc(Ra,qa){return qa===!1?!1:Ra.charAt(qa)==="/"&&Ra.charAt(qa+1)==="/"?Ct $ 1(Ra,qa):qa}var li $ 2=tc;function rc $ 1(Ra,qa){let td=null,rd=qa;for(;rd!==td;)td=rd,rd=yn $ 1(Ra,rd),rd=ui $ 2(Ra,rd),rd=Ot $ 2(Ra,rd);return rd=li $ 2(Ra,rd),rd=Dt $ 2(Ra,rd),rd!==!1&&Mt $ 1(Ra,rd)}var Bt $ 2=rc $ 1;function sc $ 1({node:Ra,parent:qa},td){return!!(Ra.source&&td.originalText.slice(N $ 2(Ra),N $ 2(qa.close)).trimEnd().endsWith(","))}function nc(Ra,qa){return $ n $ 2(Ra.grandparent)&&sc $ 1(Ra,qa)?",":Ra.node.type!=="value-comment"&&!(Ra.node.type==="value-comma_group"&&Ra.node.groups.every(td=>td.type==="value-comment"))&&ai $ 1(qa)&&Ra.callParent(()=>Kr $ 1(Ra,qa))?kt $ 2(","):""}function ci $ 1(Ra,qa,td){let{node:rd,parent:nd}=Ra,ad=Ra.map(({node:Ad})=>typeof Ad=="string"?Ad:td(),"groups");if(nd&&Fn $ 1(nd)&&(rd.groups.length===1||rd.groups.length>0&&rd.groups[0].type==="value-comma_group"&&rd.groups[0].groups.length>0&&rd.groups[0].groups[0].type==="value-word"&&rd.groups[0].groups[0].value.startsWith("data:")))return[rd.open?td("open"):"",V $ 2(",",ad),rd.close?td("close"):""];if(!rd.open){let Ad=es $ 1(Ra),Sd=V $ 2([",",Ad?E $ 1:A $ 1],ad);return q $ 2(Ad?[E $ 1,Sd]:L $ 2(Ge $ 1(Sd)))}let sd=Ra.map(({node:Ad,isLast:Sd,index:Dd})=>{var Ld;let Rd=ad[Dd];if(Rt $ 2(Ad)&&Ad.type==="value-comma_group"&&Ad.groups&&Ad.groups[0].type!=="value-paren_group"&&((Ld=Ad.groups[2])==null?void 0:Ld.type)==="value-paren_group"){let{parts:Md}=Rd.contents.contents;Md[1]=L $ 2(Md[1]),Rd=L $ 2(ue $ 1(Rd))}let Od=[Rd,Sd?nc(Ra,qa):","];if(!Sd&&Ad.type==="value-comma_group"&&ee $ 1(Ad.groups)){let Md=G $ 2(!1,Ad.groups,-1);!Md.source&&Md.close&&(Md=Md.close),Md.source&&Bt $ 2(qa.originalText,P $ 2(Md))&&Od.push(E $ 1)}return Od},"groups"),ud=Xn $ 2(rd,nd),cd=ti $ 2(rd,nd),dd=Kr $ 1(Ra,qa),pd=cd||dd&&!ud,fd=cd||ud,Td=L $ 2([rd.open?td("open"):"",q $ 2([M $ 2,V $ 2(A $ 1,sd)]),M $ 2,rd.close?td("close"):""],{shouldBreak:pd});return fd?ue $ 1(Td):Td}function es $ 1(Ra){return Ra.match(qa=>qa.type==="value-paren_group"&&!qa.open&&qa.groups.some(td=>td.type==="value-comma_group"),(qa,td)=>td==="group"&&qa.type==="value-value",(qa,td)=>td==="group"&&qa.type==="value-root",(qa,td)=>td==="value"&&(qa.type==="css-decl"&&!qa.prop.startsWith("--")||qa.type==="css-atrule"&&qa.variable))}function ic(Ra,qa,td){let rd=[];return Ra.each(()=>{let{node:nd,previous:ad}=Ra;if((ad==null?void 0:ad.type)==="css-comment"&&ad.text.trim()==="prettier-ignore"?rd.push(qa.originalText.slice(N $ 2(nd),P $ 2(nd))):rd.push(td()),Ra.isLast)return;let{next:sd}=Ra;sd.type==="css-comment"&&!Mt $ 1(qa.originalText,N $ 2(sd),{backwards:!0})&&!_e $ 1(nd)||sd.type==="css-atrule"&&sd.name==="else"&&nd.type!=="css-comment"?rd.push(" "):(rd.push(qa.__isHTMLStyleAttribute?A $ 1:E $ 1),Bt $ 2(qa.originalText,P $ 2(nd))&&!_e $ 1(nd)&&rd.push(E $ 1))},"nodes"),rd}var Te $ 1=ic;function oc(Ra,qa,td){var rd,nd,ad,sd,ud,cd;let{node:dd}=Ra;switch(dd.type){case"front-matter":return[dd.raw,E $ 1];case"css-root":{let pd=Te $ 1(Ra,qa,td),fd=dd.raws.after.trim();return fd.startsWith(";")&&(fd=fd.slice(1).trim()),[dd.frontMatter?[td("frontMatter"),E $ 1]:"",pd,fd? ` $ { fd } ` :"",dd.nodes.length>0?E $ 1:""]}case"css-comment":{let pd=dd.inline||dd.raws.inline,fd=qa.originalText.slice(N $ 2(dd),P $ 2(dd));return pd?fd.trimEnd():fd}case"css-rule":return[td("selector"),dd.important?" !important":"",dd.nodes?[((rd=dd.selector)==null?void 0:rd.type)==="selector-unknown"&&Se $ 1(dd.selector.value)?A $ 1:dd.selector?" ":"","{",dd.nodes.length>0?q $ 2([E $ 1,Te $ 1(Ra,qa,td)]):"",E $ 1,"}",Wn(dd)?";":""]:";"];case"css-decl":{let pd=Ra.parent,{between:fd}=dd.raws,Td=fd.trim(),Ad=Td===":",Sd=typeof dd.value=="string"&&/^ * $ /u.test(dd.value),Dd=typeof dd.value=="string"?dd.value:td("value");return Dd=Qn $ 2(dd)?rn $ 1(Dd):Dd,!Ad&&Se $ 1(Td)&&!((ad=(nd=dd.value)==null?void 0:nd.gro
` ,Ud(jd.gutter,bf.replace(/ \d /g," "))," ",Zf,Ud(jd.marker,"^").repeat(Vf)].join(""),Bf&&Rd.message&&(Yf+=" "+Ud(jd.message,Rd.message))}return[Ud(jd.marker,">"),Ud(jd.gutter,bf),vf.length>0? ` $ { vf } ` :"",Yf].join("")}else return ` $ { Ud ( jd . gutter , bf ) } $ { vf . length > 0 ? ` ${ vf } ` : "" } ` }).join( `
2024-09-25 14:23:53 +08:00
` );return Rd.message&&!Qd&&(hf= ` $ { " " . repeat ( Jd + 1 ) } $ { Rd . message }
2024-09-28 20:51:35 +08:00
$ { hf } ` ),Od?Md.reset(hf):hf}function Sd(Dd,Ld,Rd,Od={}){if(!dd){dd=!0;let Md="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use ` codeFrameColumns ` .";{let jd=new Error(Md);jd.name="DeprecationWarning",console.warn(new Error(Md))}}return Rd=Math.max(Rd,0),Ad(Dd,{start:{column:Rd,line:Ld}},Od)}}),ir={};We(ir,{__debug:()=>di $ 1,check:()=>fi,doc:()=>nr,format:()=>gu $ 1,formatWithCursor:()=>Cu $ 1,getSupportInfo:()=>pi $ 2,util:()=>or,version:()=>fu});var Ou=(Ra,qa,td,rd)=>{if(!(Ra&&qa==null))return qa.replaceAll?qa.replaceAll(td,rd):td.global?qa.replace(td,rd):qa.split(td).join(rd)},ne $ 1=Ou;function Z $ 1(){}Z $ 1.prototype={diff:function(Ra,qa){var td,rd=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},nd=rd.callback;typeof rd=="function"&&(nd=rd,rd={}),this.options=rd;var ad=this;function sd(Md){return nd?(setTimeout(function(){nd(void 0,Md)},0),!0):Md}Ra=this.castInput(Ra),qa=this.castInput(qa),Ra=this.removeEmpty(this.tokenize(Ra)),qa=this.removeEmpty(this.tokenize(qa));var ud=qa.length,cd=Ra.length,dd=1,pd=ud+cd;rd.maxEditLength&&(pd=Math.min(pd,rd.maxEditLength));var fd=(td=rd.timeout)!==null&&td!==void 0?td:1/0,Td=Date.now()+fd,Ad=[{oldPos:-1,lastComponent:void 0}],Sd=this.extractCommon(Ad[0],qa,Ra,0);if(Ad[0].oldPos+1>=cd&&Sd+1>=ud)return sd([{value:this.join(qa),count:qa.length}]);var Dd=-1/0,Ld=1/0;function Rd(){for(var Md=Math.max(Dd,-dd);Md<=Math.min(Ld,dd);Md+=2){var jd=void 0,Ud=Ad[Md-1],Hd=Ad[Md+1];Ud&&(Ad[Md-1]=void 0);var Wd=!1;if(Hd){var Zd=Hd.oldPos-Md;Wd=Hd&&0<=Zd&&Zd<ud}var zd=Ud&&Ud.oldPos+1<cd;if(!Wd&&!zd){Ad[Md]=void 0;continue}if(!zd||Wd&&Ud.oldPos+1<Hd.oldPos?jd=ad.addToPath(Hd,!0,void 0,0):jd=ad.addToPath(Ud,void 0,!0,1),Sd=ad.extractCommon(jd,qa,Ra,Md),jd.oldPos+1>=cd&&Sd+1>=ud)return sd(Su(ad,jd.lastComponent,qa,Ra,ad.useLongestToken));Ad[Md]=jd,jd.oldPos+1>=cd&&(Ld=Math.min(Ld,Md-1)),Sd+1>=ud&&(Dd=Math.max(Dd,Md+1))}dd++}if(nd)(function Md(){setTimeout(function(){if(dd>pd||Date.now()>Td)return nd();Rd()||Md()},0)})();else for(;dd<=pd&&Date.now()<=Td;){var Od=Rd();if(Od)return Od}},addToPath:function(Ra,qa,td,rd){var nd=Ra.lastComponent;return nd&&nd.added===qa&&nd.removed===td?{oldPos:Ra.oldPos+rd,lastComponent:{count:nd.count+1,added:qa,removed:td,previousComponent:nd.previousComponent}}:{oldPos:Ra.oldPos+rd,lastComponent:{count:1,added:qa,removed:td,previousComponent:nd}}},extractCommon:function(Ra,qa,td,rd){for(var nd=qa.length,ad=td.length,sd=Ra.oldPos,ud=sd-rd,cd=0;ud+1<nd&&sd+1<ad&&this.equals(qa[ud+1],td[sd+1]);)ud++,sd++,cd++;return cd&&(Ra.lastComponent={count:cd,previousComponent:Ra.lastComponent}),Ra.oldPos=sd,ud},equals:function(Ra,qa){return this.options.comparator?this.options.comparator(Ra,qa):Ra===qa||this.options.ignoreCase&&Ra.toLowerCase()===qa.toLowerCase()},removeEmpty:function(Ra){for(var qa=[],td=0;td<Ra.length;td++)Ra[td]&&qa.push(Ra[td]);return qa},castInput:function(Ra){return Ra},tokenize:function(Ra){return Ra.split("")},join:function(Ra){return Ra.join("")}};function Su(Ra,qa,td,rd,nd){for(var ad=[],sd;qa;)ad.push(qa),sd=qa.previousComponent,delete qa.previousComponent,qa=sd;ad.reverse();for(var ud=0,cd=ad.length,dd=0,pd=0;ud<cd;ud++){var fd=ad[ud];if(fd.removed){if(fd.value=Ra.join(rd.slice(pd,pd+fd.count)),pd+=fd.count,ud&&ad[ud-1].added){var Td=ad[ud-1];ad[ud-1]=ad[ud],ad[ud]=Td}}else{if(!fd.added&&nd){var Ad=td.slice(dd,dd+fd.count);Ad=Ad.map(function(Dd,Ld){var Rd=rd[pd+Ld];return Rd.length>Dd.length?Rd:Dd}),fd.value=Ra.join(Ad)}else fd.value=Ra.join(td.slice(dd,dd+fd.count));dd+=fd.count,fd.added||(pd+=fd.count)}}var Sd=ad[cd-1];return cd>1&&typeof Sd.value=="string"&&(Sd.added||Sd.removed)&&Ra.equals("",Sd.value)&&(ad[cd-2].value+=Sd.value,ad.pop()),ad}var lr=/^[A-Za-z \x C0- \u 02C6 \u 02C8- \u 02D7 \u 02DE- \u 02FF \u 1E00- \u 1EFF]+ $ /,cr=/ \S /,fr=new Z $ 1;fr.equals=function(Ra,qa){return this.options.ignoreCase&&(Ra=Ra.toLowerCase(),qa=qa.toLowerCase()),Ra===qa||this.options.ignoreWhitespace&&!cr.test(Ra)&&!cr.test(qa)};fr.tokenize=function(Ra){for(var qa=Ra.split(/([^ \S \r \n ]+|[()[ \] {}'" \r \n ]| \b )/),td=0;td<qa.length-1;td++)!qa[td+1]&&qa[td+2]&&lr.
2024-09-25 14:23:53 +08:00
` ));var qa=[],td=Ra.split(/( \n | \r \n )/);td[td.length-1]||td.pop();for(var rd=0;rd<td.length;rd++){var nd=td[rd];rd%2&&!this.options.newlineIsToken?qa[qa.length-1]+=nd:(this.options.ignoreWhitespace&&(nd=nd.trim()),qa.push(nd))}return qa};var Nu=new Z $ 1;Nu.tokenize=function(Ra){return Ra.split(/( \S .+?[.!?])(?= \s +| $ )/)};var Tu=new Z $ 1;Tu.tokenize=function(Ra){return Ra.split(/([{}:;,]| \s +)/)};function $ e $ 1(Ra){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"? $ e $ 1=function(qa){return typeof qa}: $ e $ 1=function(qa){return qa&&typeof Symbol=="function"&&qa.constructor===Symbol&&qa!==Symbol.prototype?"symbol":typeof qa}, $ e $ 1(Ra)}var ku=Object.prototype.toString,Ae=new Z $ 1;Ae.useLongestToken=!0;Ae.tokenize=pr.tokenize;Ae.castInput=function(Ra){var qa=this.options,td=qa.undefinedReplacement,rd=qa.stringifyReplacer,nd=rd===void 0?function(ad,sd){return typeof sd>"u"?td:sd}:rd;return typeof Ra=="string"?Ra:JSON.stringify(Bt $ 1(Ra,null,null,nd),nd," ")};Ae.equals=function(Ra,qa){return Z $ 1.prototype.equals.call(Ae,Ra.replace(/,([ \r \n ])/g," $ 1"),qa.replace(/,([ \r \n ])/g," $ 1"))};function Bt $ 1(Ra,qa,td,rd,nd){qa=qa||[],td=td||[],rd&&(Ra=rd(nd,Ra));var ad;for(ad=0;ad<qa.length;ad+=1)if(qa[ad]===Ra)return td[ad];var sd;if(ku.call(Ra)==="[object Array]"){for(qa.push(Ra),sd=new Array(Ra.length),td.push(sd),ad=0;ad<Ra.length;ad+=1)sd[ad]=Bt $ 1(Ra[ad],qa,td,rd,nd);return qa.pop(),td.pop(),sd}if(Ra&&Ra.toJSON&&(Ra=Ra.toJSON()), $ e $ 1(Ra)==="object"&&Ra!==null){qa.push(Ra),sd={},td.push(sd);var ud=[],cd;for(cd in Ra)Ra.hasOwnProperty(cd)&&ud.push(cd);for(ud.sort(),ad=0;ad<ud.length;ad+=1)cd=ud[ad],sd[cd]=Bt $ 1(Ra[cd],qa,td,rd,cd);qa.pop(),td.pop()}else sd=Ra;return sd}var Ve=new Z $ 1;Ve.tokenize=function(Ra){return Ra.slice()};Ve.join=Ve.removeEmpty=function(Ra){return Ra};function dr(Ra,qa,td){return Ve.diff(Ra,qa,td)}function Fr(Ra){let qa=Ra.indexOf(" \r ");return qa>=0?Ra.charAt(qa+1)=== `
2024-09-18 09:46:23 +08:00
` ?"crlf":"cr":"lf"}function Be(Ra){switch(Ra){case"cr":return" \r ";case"crlf":return ` \ r
` ;default:return `
2024-09-25 14:23:53 +08:00
` }}function wt(Ra,qa){let td;switch(qa){case `
` :td=/ \n /gu;break;case" \r ":td=/ \r /gu;break;case ` \ r
` :td=/ \r \n /gu;break;default:throw new Error( ` Unexpected "eol" $ { JSON . stringify ( qa ) } . ` )}let rd=Ra.match(td);return rd?rd.length:0}function mr(Ra){return ne $ 1(!1,Ra,/ \r \n ?/gu, `
` )}var U $ 1="string",W $ 1="array",z $ 1="cursor",L $ 1="indent",P $ 1="align",I $ 1="trim",x $ 2="group",S $ 1="fill",_ $ 2="if-break",R $ 3="indent-if-break",Y $ 1="line-suffix",j $ 1="line-suffix-boundary",B $ 1="line",N $ 1="label",b $ 1="break-parent",Ue=new Set([z $ 1,L $ 1,P $ 1,I $ 1,x $ 2,S $ 1,_ $ 2,R $ 3,Y $ 1,j $ 1,B $ 1,N $ 1,b $ 1]);function Lu(Ra){if(typeof Ra=="string")return U $ 1;if(Array.isArray(Ra))return W $ 1;if(!Ra)return;let{type:qa}=Ra;if(Ue.has(qa))return qa}var G $ 1=Lu,Pu=Ra=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(Ra);function Iu(Ra){let qa=Ra===null?"null":typeof Ra;if(qa!=="string"&&qa!=="object")return ` Unexpected doc '${qa}' ,
Expected it to be 'string' or 'object' . ` ;if(G $ 1(Ra))throw new Error("doc is valid.");let td=Object.prototype.toString.call(Ra);if(td!=="[object Object]")return ` Unexpected doc '${td}' . ` ;let rd=Pu([...Ue].map(nd=> ` '${nd}' ` ));return ` Unexpected doc . type '${Ra.type}' .
Expected it to be $ { rd } . ` }var xt=class extends Error{constructor(qa){super(Iu(qa));Qm(this,"name","InvalidDocError");this.doc=qa}},Q $ 2=xt,Er={};function Ru(Ra,qa,td,rd){let nd=[Ra];for(;nd.length>0;){let ad=nd.pop();if(ad===Er){td(nd.pop());continue}td&&nd.push(ad,Er);let sd=G $ 1(ad);if(!sd)throw new Q $ 2(ad);if((qa==null?void 0:qa(ad))!==!1)switch(sd){case W $ 1:case S $ 1:{let ud=sd===W $ 1?ad:ad.parts;for(let cd=ud.length,dd=cd-1;dd>=0;--dd)nd.push(ud[dd]);break}case _ $ 2:nd.push(ad.flatContents,ad.breakContents);break;case x $ 2:if(rd&&ad.expandedStates)for(let ud=ad.expandedStates.length,cd=ud-1;cd>=0;--cd)nd.push(ad.expandedStates[cd]);else nd.push(ad.contents);break;case P $ 1:case L $ 1:case R $ 3:case N $ 1:case Y $ 1:nd.push(ad.contents);break;case U $ 1:case z $ 1:case I $ 1:case j $ 1:case B $ 1:case b $ 1:break;default:throw new Q $ 2(ad)}}}var we=Ru,hr $ 2=()=>{},ze=hr $ 2;function De(Ra){return{type:L $ 1,contents:Ra}}function ae(Ra,qa){return{type:P $ 1,contents:qa,n:Ra}}function _t(Ra,qa={}){return ze(qa.expandedStates),{type:x $ 2,id:qa.id,contents:Ra,break:!!qa.shouldBreak,expandedStates:qa.expandedStates}}function Cr(Ra){return ae(Number.NEGATIVE_INFINITY,Ra)}function gr(Ra){return ae({type:"root"},Ra)}function yr(Ra){return ae(-1,Ra)}function Ar(Ra,qa){return _t(Ra[0],{...qa,expandedStates:Ra})}function Ge(Ra){return{type:S $ 1,parts:Ra}}function Br(Ra,qa="",td={}){return{type:_ $ 2,breakContents:Ra,flatContents:qa,groupId:td.groupId}}function wr(Ra,qa){return{type:R $ 3,contents:Ra,groupId:qa.groupId,negate:qa.negate}}function xe $ 1(Ra){return{type:Y $ 1,contents:Ra}}var xr={type:j $ 1},de={type:b $ 1},_r={type:I $ 1},_e={type:B $ 1,hard:!0},vt={type:B $ 1,hard:!0,literal:!0},Ke $ 1={type:B $ 1},vr={type:B $ 1,soft:!0},q $ 1=[_e,de],qe $ 1=[vt,de],ve={type:z $ 1};function be $ 1(Ra,qa){let td=[];for(let rd=0;rd<qa.length;rd++)rd!==0&&td.push(Ra),td.push(qa[rd]);return td}function Je $ 1(Ra,qa,td){let rd=Ra;if(qa>0){for(let nd=0;nd<Math.floor(qa/td);++nd)rd=De(rd);rd=ae(qa%td,rd),rd=ae(Number.NEGATIVE_INFINITY,rd)}return rd}function br $ 2(Ra,qa){return Ra?{type:N $ 1,label:Ra,contents:qa}:qa}function ee(Ra){var qa;if(!Ra)return"";if(Array.isArray(Ra)){let td=[];for(let rd of Ra)if(Array.isArray(rd))td.push(...ee(rd));else{let nd=ee(rd);nd!==""&&td.push(nd)}return td}return Ra.type===_ $ 2?{...Ra,breakContents:ee(Ra.breakContents),flatContents:ee(Ra.flatContents)}:Ra.type===x $ 2?{...Ra,contents:ee(Ra.contents),expandedStates:(qa=Ra.expandedStates)==null?void 0:qa.map(ee)}:Ra.type===S $ 1?{type:"fill",parts:Ra.parts.map(ee)}:Ra.contents?{...Ra,contents:ee(Ra.contents)}:Ra}function Or(Ra){let qa=Object.create(null),td=new Set;return rd(ee(Ra));function rd(ad,sd,ud){var cd,dd;if(typeof ad=="string")return JSON.stringify(ad);if(Array.isArray(ad)){let pd=ad.map(rd).filter(Boolean);return pd.length===1?pd[0]: ` [ $ { pd . join ( ", " ) } ] ` }if(ad.type===B $ 1){let pd=((cd=ud==null?void 0:ud[sd+1])==null?void 0:cd.type)===b $ 1;return ad.literal?pd?"literalline":"literallineWithoutBreakParent":ad.hard?pd?"hardline":"hardlineWithoutBreakParent":ad.soft?"softline":"line"}if(ad.type===b $ 1)return((dd=ud==null?void 0:ud[sd-1])==null?void 0:dd.type)===B $ 1&&ud[sd-1].hard?void 0:"breakParent";if(ad.type===I $ 1)return"trim";if(ad.type===L $ 1)return"indent("+rd(ad.contents)+")";if(ad.type===P $ 1)return ad.n===Number.NEGATIVE_INFINITY?"dedentToRoot("+rd(ad.contents)+")":ad.n<0?"dedent("+rd(ad.contents)+")":ad.n.type==="root"?"markAsRoot("+rd(ad.contents)+")":"align("+JSON.stringify(ad.n)+", "+rd(ad.contents)+")";if(ad.type===_ $ 2)return"ifBreak("+rd(ad.breakContents)+(ad.flatContents?", "+rd(ad.flatContents):"")+(ad.groupId?(ad.flatContents?"":', ""')+ ` , { groupId : $ { nd ( ad . groupId ) } } ` :"")+")";if(ad.type===R $ 3){let pd=[];ad.negate&&pd.push("negate: true"),ad.groupId&&pd.push( ` groupId : $ { nd ( ad . groupId ) } ` );let fd=pd.length>0? ` , { $ { pd . join ( ", " ) } } ` :"";return ` indentIfBreak ( $ { rd ( ad . contents ) } $ { fd } ) ` }if(ad.type===x $ 2){let pd=[];ad.break&&ad.break!=="propagated"&&pd.push("shouldBreak: true"),ad.id&&pd.push( ` id : $ { nd ( ad . id ) } ` );let fd=pd.length>0? ` , { $ { pd . join ( ", " ) } } ` :"";return ad.expandedStates? ` conditionalGroup ( [ $ { ad . expanded
` )):td)}function Uu(Ra){if(Ra.type===B $ 1)return!0}function Hr(Ra){return Xe(Ra,Uu,!1)}function Qe(Ra,qa){return Ra.type===N $ 1?{...Ra,contents:qa(Ra.contents)}:qa(Ra)}var H $ 1=Symbol("MODE_BREAK"),J $ 1=Symbol("MODE_FLAT"),Te=Symbol("cursor");function Wr(){return{value:"",length:0,queue:[]}}function zu(Ra,qa){return bt $ 1(Ra,{type:"indent"},qa)}function Gu(Ra,qa,td){return qa===Number.NEGATIVE_INFINITY?Ra.root||Wr():qa<0?bt $ 1(Ra,{type:"dedent"},td):qa?qa.type==="root"?{...Ra,root:Ra}:bt $ 1(Ra,{type:typeof qa=="string"?"stringAlign":"numberAlign",n:qa},td):Ra}function bt $ 1(Ra,qa,td){let rd=qa.type==="dedent"?Ra.queue.slice(0,-1):[...Ra.queue,qa],nd="",ad=0,sd=0,ud=0;for(let Sd of rd)switch(Sd.type){case"indent":pd(),td.useTabs?cd(1):dd(td.tabWidth);break;case"stringAlign":pd(),nd+=Sd.n,ad+=Sd.n.length;break;case"numberAlign":sd+=1,ud+=Sd.n;break;default:throw new Error( ` Unexpected type '${Sd.type}' ` )}return Td(),{...Ra,value:nd,length:ad,queue:rd};function cd(Sd){nd+=" ".repeat(Sd),ad+=td.tabWidth*Sd}function dd(Sd){nd+=" ".repeat(Sd),ad+=Sd}function pd(){td.useTabs?fd():Td()}function fd(){sd>0&&cd(sd),Ad()}function Td(){ud>0&&dd(ud),Ad()}function Ad(){sd=0,ud=0}}function Ot $ 1(Ra){let qa=0,td=0,rd=Ra.length;e:for(;rd--;){let nd=Ra[rd];if(nd===Te){td++;continue}for(let ad=nd.length-1;ad>=0;ad--){let sd=nd[ad];if(sd===" "||sd===" ")qa++;else{Ra[rd]=nd.slice(0,ad+1);break e}}}if(qa>0||td>0)for(Ra.length=rd+1;td-- >0;)Ra.push(Te);return qa}function et $ 2(Ra,qa,td,rd,nd,ad){if(td===Number.POSITIVE_INFINITY)return!0;let sd=qa.length,ud=[Ra],cd=[];for(;td>=0;){if(ud.length===0){if(sd===0)return!0;ud.push(qa[--sd]);continue}let{mode:dd,doc:pd}=ud.pop(),fd=G $ 1(pd);switch(fd){case U $ 1:cd.push(pd),td-=Oe(pd);break;case W $ 1:case S $ 1:{let Td=fd===W $ 1?pd:pd.parts;for(let Ad=Td.length-1;Ad>=0;Ad--)ud.push({mode:dd,doc:Td[Ad]});break}case L $ 1:case P $ 1:case R $ 3:case N $ 1:ud.push({mode:dd,doc:pd.contents});break;case I $ 1:td+=Ot $ 1(cd);break;case x $ 2:{if(ad&&pd.break)return!1;let Td=pd.break?H $ 1:dd,Ad=pd.expandedStates&&Td===H $ 1?y $ 2(!1,pd.expandedStates,-1):pd.contents;ud.push({mode:Td,doc:Ad});break}case _ $ 2:{let Td=(pd.groupId?nd[pd.groupId]||J $ 1:dd)===H $ 1?pd.breakContents:pd.flatContents;Td&&ud.push({mode:dd,doc:Td});break}case B $ 1:if(dd===H $ 1||pd.hard)return!0;pd.soft||(cd.push(" "),td--);break;case Y $ 1:rd=!0;break;case j $ 1:if(rd)return!1;break}}return!1}function Fe(Ra,qa){let td={},rd=qa.printWidth,nd=Be(qa.endOfLine),ad=0,sd=[{ind:Wr(),mode:H $ 1,doc:Ra}],ud=[],cd=!1,dd=[],pd=0;for(Rr(Ra);sd.length>0;){let{ind:Td,mode:Ad,doc:Sd}=sd.pop();switch(G $ 1(Sd)){case U $ 1:{let Dd=nd!== `
` ?ne $ 1(!1,Sd, `
2024-09-28 20:51:35 +08:00
` ,nd):Sd;ud.push(Dd),sd.length>0&&(ad+=Oe(Dd));break}case W $ 1:for(let Dd=Sd.length-1;Dd>=0;Dd--)sd.push({ind:Td,mode:Ad,doc:Sd[Dd]});break;case z $ 1:if(pd>=2)throw new Error("There are too many 'cursor' in doc.");ud.push(Te),pd++;break;case L $ 1:sd.push({ind:zu(Td,qa),mode:Ad,doc:Sd.contents});break;case P $ 1:sd.push({ind:Gu(Td,Sd.n,qa),mode:Ad,doc:Sd.contents});break;case I $ 1:ad-=Ot $ 1(ud);break;case x $ 2:switch(Ad){case J $ 1:if(!cd){sd.push({ind:Td,mode:Sd.break?H $ 1:J $ 1,doc:Sd.contents});break}case H $ 1:{cd=!1;let Dd={ind:Td,mode:J $ 1,doc:Sd.contents},Ld=rd-ad,Rd=dd.length>0;if(!Sd.break&&et $ 2(Dd,sd,Ld,Rd,td))sd.push(Dd);else if(Sd.expandedStates){let Od=y $ 2(!1,Sd.expandedStates,-1);if(Sd.break){sd.push({ind:Td,mode:H $ 1,doc:Od});break}else for(let Md=1;Md<Sd.expandedStates.length+1;Md++)if(Md>=Sd.expandedStates.length){sd.push({ind:Td,mode:H $ 1,doc:Od});break}else{let jd=Sd.expandedStates[Md],Ud={ind:Td,mode:J $ 1,doc:jd};if(et $ 2(Ud,sd,Ld,Rd,td)){sd.push(Ud);break}}}else sd.push({ind:Td,mode:H $ 1,doc:Sd.contents});break}}Sd.id&&(td[Sd.id]=y $ 2(!1,sd,-1).mode);break;case S $ 1:{let Dd=rd-ad,{parts:Ld}=Sd;if(Ld.length===0)break;let[Rd,Od]=Ld,Md={ind:Td,mode:J $ 1,doc:Rd},jd={ind:Td,mode:H $ 1,doc:Rd},Ud=et $ 2(Md,[],Dd,dd.length>0,td,!0);if(Ld.length===1){Ud?sd.push(Md):sd.push(jd);break}let Hd={ind:Td,mode:J $ 1,doc:Od},Wd={ind:Td,mode:H $ 1,doc:Od};if(Ld.length===2){Ud?sd.push(Hd,Md):sd.push(Wd,jd);break}Ld.splice(0,2);let Zd={ind:Td,mode:Ad,doc:Ge(Ld)},zd=Ld[0];et $ 2({ind:Td,mode:J $ 1,doc:[Rd,Od,zd]},[],Dd,dd.length>0,td,!0)?sd.push(Zd,Hd,Md):Ud?sd.push(Zd,Wd,Md):sd.push(Zd,Wd,jd);break}case _ $ 2:case R $ 3:{let Dd=Sd.groupId?td[Sd.groupId]:Ad;if(Dd===H $ 1){let Ld=Sd.type===_ $ 2?Sd.breakContents:Sd.negate?Sd.contents:De(Sd.contents);Ld&&sd.push({ind:Td,mode:Ad,doc:Ld})}if(Dd===J $ 1){let Ld=Sd.type===_ $ 2?Sd.flatContents:Sd.negate?De(Sd.contents):Sd.contents;Ld&&sd.push({ind:Td,mode:Ad,doc:Ld})}break}case Y $ 1:dd.push({ind:Td,mode:Ad,doc:Sd.contents});break;case j $ 1:dd.length>0&&sd.push({ind:Td,mode:Ad,doc:_e});break;case B $ 1:switch(Ad){case J $ 1:if(Sd.hard)cd=!0;else{Sd.soft||(ud.push(" "),ad+=1);break}case H $ 1:if(dd.length>0){sd.push({ind:Td,mode:Ad,doc:Sd},...dd.reverse()),dd.length=0;break}Sd.literal?Td.root?(ud.push(nd,Td.root.value),ad=Td.root.length):(ud.push(nd),ad=0):(ad-=Ot $ 1(ud),ud.push(nd+Td.value),ad=Td.length);break}break;case N $ 1:sd.push({ind:Td,mode:Ad,doc:Sd.contents});break;case b $ 1:break;default:throw new Q $ 2(Sd)}sd.length===0&&dd.length>0&&(sd.push(...dd.reverse()),dd.length=0)}let fd=ud.indexOf(Te);if(fd!==-1){let Td=ud.indexOf(Te,fd+1),Ad=ud.slice(0,fd).join(""),Sd=ud.slice(fd+1,Td).join(""),Dd=ud.slice(Td+1).join("");return{formatted:Ad+Sd+Dd,cursorNodeStart:Ad.length,cursorNodeText:Sd}}return{formatted:ud.join("")}}function Ku(Ra,qa,td=0){let rd=0;for(let nd=td;nd<Ra.length;++nd)Ra[nd]===" "?rd=rd+qa-rd%qa:rd++;return rd}var me=Ku,te,Nt,tt $ 1,St=class{constructor(Ra){Dr(this,te),this.stack=[Ra]}get key(){let{stack:Ra,siblings:qa}=this;return y $ 2(!1,Ra,qa===null?-2:-4)??null}get index(){return this.siblings===null?null:y $ 2(!1,this.stack,-2)}get node(){return y $ 2(!1,this.stack,-1)}get parent(){return this.getNode(1)}get grandparent(){return this.getNode(2)}get isInArray(){return this.siblings!==null}get siblings(){let{stack:Ra}=this,qa=y $ 2(!1,Ra,-3);return Array.isArray(qa)?qa:null}get next(){let{siblings:Ra}=this;return Ra===null?null:Ra[this.index+1]}get previous(){let{siblings:Ra}=this;return Ra===null?null:Ra[this.index-1]}get isFirst(){return this.index===0}get isLast(){let{siblings:Ra,index:qa}=this;return Ra!==null&&qa===Ra.length-1}get isRoot(){return this.stack.length===1}get root(){return this.stack[0]}get ancestors(){return[...pe(this,te,tt $ 1).call(this)]}getName(){let{stack:Ra}=this,{length:qa}=Ra;return qa>1?y $ 2(!1,Ra,-2):null}getValue(){return y $ 2(!1,this.stack,-1)}getNode(Ra=0){let qa=pe(this,te,Nt).call(this,Ra);return qa===-1?null:this.stack[qa]}getParentNode(Ra=0){return this.getNode(Ra+1)}call(Ra,...qa){let{stack:td}=this,{length:rd}=td,nd=y $ 2(!1,td,-1);for(let ad of qa)nd=nd[ad],td.push(ad,nd);try{return Ra(this)
2024-09-25 14:23:53 +08:00
` )return qa-2;if(nd=== `
` ||nd===" \r "||nd===" \u 2028"||nd===" \u 2029")return qa-1}else{if(nd===" \r "&&Ra.charAt(qa+1)=== `
` )return qa+2;if(nd=== `
2024-09-28 20:51:35 +08:00
` ||nd===" \r "||nd===" \u 2028"||nd===" \u 2029")return qa+1}return qa}var M $ 1=Ju $ 1;function Xu $ 1(Ra,qa,td={}){let rd=T $ 1(Ra,td.backwards?qa-1:qa,td),nd=M $ 1(Ra,rd,td);return rd!==nd}var V $ 1=Xu $ 1;function Zu $ 1(Ra){return Array.isArray(Ra)&&Ra.length>0}var kt $ 1=Zu $ 1,Gr=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),Qu $ 1=Ra=>Object.keys(Ra).filter(qa=>!Gr.has(qa));function eo(Ra){return Ra?qa=>Ra(qa,Gr):Qu $ 1}var X $ 2=eo;function to(Ra){let qa=Ra.type||Ra.kind||"(unknown type)",td=String(Ra.name||Ra.id&&(typeof Ra.id=="object"?Ra.id.name:Ra.id)||Ra.key&&(typeof Ra.key=="object"?Ra.key.name:Ra.key)||Ra.value&&(typeof Ra.value=="object"?"":String(Ra.value))||Ra.operator||"");return td.length>20&&(td=td.slice(0,19)+"…"),qa+(td?" "+td:"")}function Lt(Ra,qa){(Ra.comments??(Ra.comments=[])).push(qa),qa.printed=!1,qa.nodeDescription=to(Ra)}function ue(Ra,qa){qa.leading=!0,qa.trailing=!1,Lt(Ra,qa)}function re(Ra,qa,td){qa.leading=!1,qa.trailing=!1,td&&(qa.marker=td),Lt(Ra,qa)}function oe(Ra,qa){qa.leading=!1,qa.trailing=!0,Lt(Ra,qa)}var Pt=new WeakMap;function ut(Ra,qa){if(Pt.has(Ra))return Pt.get(Ra);let{printer:{getCommentChildNodes:td,canAttachComment:rd,getVisitorKeys:nd},locStart:ad,locEnd:sd}=qa;if(!rd)return[];let ud=((td==null?void 0:td(Ra,qa))??[...Tt $ 1(Ra,{getVisitorKeys:X $ 2(nd)})]).flatMap(cd=>rd(cd)?[cd]:ut(cd,qa));return ud.sort((cd,dd)=>ad(cd)-ad(dd)||sd(cd)-sd(dd)),Pt.set(Ra,ud),ud}function qr(Ra,qa,td,rd){let{locStart:nd,locEnd:ad}=td,sd=nd(qa),ud=ad(qa),cd=ut(Ra,td),dd,pd,fd=0,Td=cd.length;for(;fd<Td;){let Ad=fd+Td>>1,Sd=cd[Ad],Dd=nd(Sd),Ld=ad(Sd);if(Dd<=sd&&ud<=Ld)return qr(Sd,qa,td,Sd);if(Ld<=sd){dd=Sd,fd=Ad+1;continue}if(ud<=Dd){pd=Sd,Td=Ad;continue}throw new Error("Comment location overlaps with node location")}if((rd==null?void 0:rd.type)==="TemplateLiteral"){let{quasis:Ad}=rd,Sd=Rt $ 1(Ad,qa,td);dd&&Rt $ 1(Ad,dd,td)!==Sd&&(dd=null),pd&&Rt $ 1(Ad,pd,td)!==Sd&&(pd=null)}return{enclosingNode:rd,precedingNode:dd,followingNode:pd}}var It $ 1=()=>!1;function Jr(Ra,qa){let{comments:td}=Ra;if(delete Ra.comments,!kt $ 1(td)||!qa.printer.canAttachComment)return;let rd=[],{locStart:nd,locEnd:ad,printer:{experimentalFeatures:{avoidAstMutation:sd=!1}={},handleComments:ud={}},originalText:cd}=qa,{ownLine:dd=It $ 1,endOfLine:pd=It $ 1,remaining:fd=It $ 1}=ud,Td=td.map((Ad,Sd)=>({...qr(Ra,Ad,qa),comment:Ad,text:cd,options:qa,ast:Ra,isLastComment:td.length-1===Sd}));for(let[Ad,Sd]of Td.entries()){let{comment:Dd,precedingNode:Ld,enclosingNode:Rd,followingNode:Od,text:Md,options:jd,ast:Ud,isLastComment:Hd}=Sd;if(jd.parser==="json"||jd.parser==="json5"||jd.parser==="jsonc"||jd.parser==="__js_expression"||jd.parser==="__ts_expression"||jd.parser==="__vue_expression"||jd.parser==="__vue_ts_expression"){if(nd(Dd)-nd(Ud)<=0){ue(Ud,Dd);continue}if(ad(Dd)-ad(Ud)>=0){oe(Ud,Dd);continue}}let Wd;if(sd?Wd=[Sd]:(Dd.enclosingNode=Rd,Dd.precedingNode=Ld,Dd.followingNode=Od,Wd=[Dd,Md,jd,Ud,Hd]),ro(Md,jd,Td,Ad))Dd.placement="ownLine",dd(...Wd)||(Od?ue(Od,Dd):Ld?oe(Ld,Dd):re(Rd||Ud,Dd));else if(no(Md,jd,Td,Ad))Dd.placement="endOfLine",pd(...Wd)||(Ld?oe(Ld,Dd):Od?ue(Od,Dd):re(Rd||Ud,Dd));else if(Dd.placement="remaining",!fd(...Wd))if(Ld&&Od){let Zd=rd.length;Zd>0&&rd[Zd-1].followingNode!==Od&&Kr(rd,jd),rd.push(Sd)}else Ld?oe(Ld,Dd):Od?ue(Od,Dd):re(Rd||Ud,Dd)}if(Kr(rd,qa),!sd)for(let Ad of td)delete Ad.precedingNode,delete Ad.enclosingNode,delete Ad.followingNode}var Xr=Ra=>!/[ \S \n \u 2028 \u 2029]/u.test(Ra);function ro(Ra,qa,td,rd){let{comment:nd,precedingNode:ad}=td[rd],{locStart:sd,locEnd:ud}=qa,cd=sd(nd);if(ad)for(let dd=rd-1;dd>=0;dd--){let{comment:pd,precedingNode:fd}=td[dd];if(fd!==ad||!Xr(Ra.slice(ud(pd),cd)))break;cd=sd(pd)}return V $ 1(Ra,cd,{backwards:!0})}function no(Ra,qa,td,rd){let{comment:nd,followingNode:ad}=td[rd],{locStart:sd,locEnd:ud}=qa,cd=ud(nd);if(ad)for(let dd=rd+1;dd<td.length;dd++){let{comment:pd,followingNode:fd}=td[dd];if(fd!==ad||!Xr(Ra.slice(cd,sd(pd))))break;cd=ud(pd)}return V $ 1(Ra,cd)}function Kr(Ra,qa){var td,rd;let nd=Ra.length;if(nd===0)return;let{precedingNode:ad,followingNode:sd}=Ra[0],ud=qa.loc
2024-09-18 09:46:23 +08:00
( mixed values within one file are normalised by looking at what 's used after the first line)`}]},filepath:{category:"Special",type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:"Other",cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{category:"Special",type:"boolean",default:!1,description:"Insert @format pragma into file' s first docblock comment . ",cliCategory:" Other "},parser:{category:" Global ",type:" choice ",default:void 0,description:" Which parser to use . ",exception:Ra=>typeof Ra==" string "||typeof Ra==" function ",choices:[{value:" flow ",description:" Flow "},{value:" babel ",description:" JavaScript "},{value:" babel - flow ",description:" Flow "},{value:" babel - ts ",description:" TypeScript "},{value:" typescript ",description:" TypeScript "},{value:" acorn ",description:" JavaScript "},{value:" espree ",description:" JavaScript "},{value:" meriyah ",description:" JavaScript "},{value:" css ",description:" CSS "},{value:" less ",description:" Less "},{value:" scss ",description:" SCSS "},{value:" json ",description:" JSON "},{value:" json5 ",description:" JSON5 "},{value:" jsonc ",description:" JSON with Comments "},{value:" json - stringify ",description:" JSON . stringify "},{value:" graphql ",description:" GraphQL "},{value:" markdown ",description:" Markdown "},{value:" mdx ",description:" MDX "},{value:" vue ",description:" Vue "},{value:" yaml ",description:" YAML "},{value:" glimmer ",description:" Ember / Handlebars "},{value:" html ",description:" HTML "},{value:" angular ",description:" Angular "},{value:" lwc ",description:" Lightning Web Components "}]},plugins:{type:" path ",array:!0,default:[{value:[]}],category:" Global ",description:" Add a plugin . Multiple plugins can be passed as separate ` --plugin ` s . ",exception:Ra=>typeof Ra==" string "||typeof Ra==" object ",cliName:" plugin ",cliCategory:" Config "},printWidth:{category:" Global ",type:" int ",default:80,description:" The line length where Prettier will try wrap . ",range:{start:0,end:1/0,step:1}},rangeEnd:{category:" Special ",type:" int " , default : 1 / 0 , range : { start : 0 , end : 1 / 0 , step : 1 } , description : ` Format code ending at a given character offset (exclusive).
The range will extend forwards to the end of the selected statement . ` ,cliCategory:"Editor"},rangeStart:{category:"Special",type:"int",default:0,range:{start:0,end:1/0,step:1},description: ` Format code starting at a given character offset .
The range will extend backwards to the start of the first line containing the selected statement . ` ,cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description: ` Require either '@prettier' or '@format' to be present in the file ' s first docblock comment
2024-09-25 14:23:53 +08:00
in order for it to be formatted . ` ,cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};function ot $ 1({plugins:Ra=[],showDeprecated:qa=!1}={}){let td=Ra.flatMap(nd=>nd.languages??[]),rd=[];for(let nd of lo $ 1(Object.assign({},...Ra.map(({options:ad})=>ad),rn)))!qa&&nd.deprecated||(Array.isArray(nd.choices)&&(qa||(nd.choices=nd.choices.filter(ad=>!ad.deprecated)),nd.name==="parser"&&(nd.choices=[...nd.choices,...Do(nd.choices,td,Ra)])),nd.pluginDefaults=Object.fromEntries(Ra.filter(ad=>{var sd;return((sd=ad.defaultOptions)==null?void 0:sd[nd.name])!==void 0}).map(ad=>[ad.name,ad.defaultOptions[nd.name]])),rd.push(nd));return{languages:td,options:rd}}function*Do(Ra,qa,td){let rd=new Set(Ra.map(nd=>nd.value));for(let nd of qa)if(nd.parsers){for(let ad of nd.parsers)if(!rd.has(ad)){rd.add(ad);let sd=td.find(cd=>cd.parsers&&Object.prototype.hasOwnProperty.call(cd.parsers,ad)),ud=nd.name;sd!=null&&sd.name&&(ud+= ` ( plugin : $ { sd . name } ) ` ),yield{value:ad,description:ud}}}}function lo $ 1(Ra){let qa=[];for(let[td,rd]of Object.entries(Ra)){let nd={name:td,...rd};Array.isArray(nd.default)&&(nd.default=y $ 2(!1,nd.default,-1).value),qa.push(nd)}return qa}var co=Ra=>String(Ra).split(/[/ \\ ]/u).pop();function nn(Ra,qa){if(!qa)return;let td=co(qa).toLowerCase();return Ra.find(({filenames:rd})=>rd==null?void 0:rd.some(nd=>nd.toLowerCase()===td))??Ra.find(({extensions:rd})=>rd==null?void 0:rd.some(nd=>td.endsWith(nd)))}function fo(Ra,qa){if(qa)return Ra.find(({name:td})=>td.toLowerCase()===qa)??Ra.find(({aliases:td})=>td==null?void 0:td.includes(qa))??Ra.find(({extensions:td})=>td==null?void 0:td.includes( ` . $ { qa } ` ))}function po $ 1(Ra,qa){let td=Ra.plugins.flatMap(nd=>nd.languages??[]),rd=fo(td,qa.language)??nn(td,qa.physicalFile)??nn(td,qa.file)??(qa.physicalFile,void 0);return rd==null?void 0:rd.parsers[0]}var un=po $ 1,ie={key:Ra=>/^[ $ _a-zA-Z][ $ _a-zA-Z0-9]* $ /.test(Ra)?Ra:JSON.stringify(Ra),value(Ra){if(Ra===null||typeof Ra!="object")return JSON.stringify(Ra);if(Array.isArray(Ra))return ` [ $ { Ra . map ( td => ie . value ( td ) ) . join ( ", " ) } ] ` ;let qa=Object.keys(Ra);return qa.length===0?"{}": ` { $ { qa . map ( td => ` ${ ie . key ( td ) } : ${ ie . value ( Ra [ td ] ) } ` ) . join ( ", " ) } } ` },pair:({key:Ra,value:qa})=>ie.value({[Ra]:qa})},Yt=Me $ 1(it()),an=(Ra,qa,{descriptor:td})=>{let rd=[ ` $ { Yt . default . yellow ( typeof Ra == "string" ? td . key ( Ra ) : td . pair ( Ra ) ) } is deprecated ` ];return qa&&rd.push( ` we now treat it as $ { Yt . default . blue ( typeof qa == "string" ? td . key ( qa ) : td . pair ( qa ) ) } ` ),rd.join("; ")+"."},le=Me $ 1(it()),st $ 1=Symbol.for("vnopts.VALUE_NOT_EXIST"),he $ 1=Symbol.for("vnopts.VALUE_UNCHANGED"),Dn $ 1=" ".repeat(2),cn $ 1=(Ra,qa,td)=>{let{text:rd,list:nd}=td.normalizeExpectedResult(td.schemas[Ra].expected(td)),ad=[];return rd&&ad.push(ln(Ra,qa,rd,td.descriptor)),nd&&ad.push([ln(Ra,qa,nd.title,td.descriptor)].concat(nd.values.map(sd=>fn(sd,td.loggerPrintWidth))).join( `
` )),pn(ad,td.loggerPrintWidth)};function ln(Ra,qa,td,rd){return[ ` Invalid $ { le . default . red ( rd . key ( Ra ) ) } value . ` , ` Expected $ { le . default . blue ( td ) } , ` , ` but received $ { qa === st$1 ? le . default . gray ( "nothing" ) : le . default . red ( rd . value ( qa ) ) } . ` ].join(" ")}function fn({text:Ra,list:qa},td){let rd=[];return Ra&&rd.push( ` - $ { le . default . blue ( Ra ) } ` ),qa&&rd.push([ ` - $ { le . default . blue ( qa . title ) } : ` ].concat(qa.values.map(nd=>fn(nd,td-Dn $ 1.length).replace(/^| \n /g, ` $ & $ { Dn$1 } ` ))).join( `
` )),pn(rd,td)}function pn(Ra,qa){if(Ra.length===1)return Ra[0];let[td,rd]=Ra,[nd,ad]=Ra.map(sd=>sd.split( `
` ,1)[0].length);return nd>qa&&nd>ad?rd:td}var Wt=Me $ 1(it()),jt=[],dn=[];function Ht $ 1(Ra,qa){if(Ra===qa)return 0;let td=Ra;Ra.length>qa.length&&(Ra=qa,qa=td);let rd=Ra.length,nd=qa.length;for(;rd>0&&Ra.charCodeAt(~-rd)===qa.charCodeAt(~-nd);)rd--,nd--;let ad=0;for(;ad<rd&&Ra.charCodeAt(ad)===qa.charCodeAt(ad);)ad++;if(rd-=ad,nd-=ad,rd===0)return nd;let sd,ud,cd,dd,pd=0,fd=0;for(;pd<rd;)dn[pd]=Ra.charCodeAt(ad+pd),jt[pd]=++pd;for(;fd<nd;)for(sd=qa.charCodeAt(ad+fd),cd=fd++,ud=fd,pd=0;pd<rd;pd++)dd=sd===dn[pd]?cd:cd+1,cd=jt[pd],ud=jt[pd]=cd>ud?dd>ud?ud+1:dd:dd>cd?cd+1:dd;return ud}var at $ 2=(Ra,qa,{descriptor:td,logger:rd,schemas:nd})=>{let ad=[ ` Ignored unknown option $ { Wt . default . yellow ( td . pair ( { key : Ra , value : qa } ) ) } . ` ],sd=Object.keys(nd).sort().find(ud=>Ht $ 1(Ra,ud)<3);sd&&ad.push( ` Did you mean $ { Wt . default . blue ( td . key ( sd ) ) } ? ` ),rd.warn(ad.join(" "))},Fo=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];function mo $ 1(Ra,qa){let td=new Ra(qa),rd=Object.create(td);for(let nd of Fo)nd in qa&&(rd[nd]=Eo(qa[nd],td,O $ 2.prototype[nd].length));return rd}var O $ 2=class{static create(qa){return mo $ 1(this,qa)}constructor(qa){this.name=qa.name}default(qa){}expected(qa){return"nothing"}validate(qa,td){return!1}deprecated(qa,td){return!1}forward(qa,td){}redirect(qa,td){}overlap(qa,td,rd){return qa}preprocess(qa,td){return qa}postprocess(qa,td){return he $ 1}};function Eo(Ra,qa,td){return typeof Ra=="function"?(...rd)=>Ra(...rd.slice(0,td-1),qa,...rd.slice(td-1)):()=>Ra}var Dt $ 1=class extends O $ 2{constructor(qa){super(qa),this._sourceName=qa.sourceName}expected(qa){return qa.schemas[this._sourceName].expected(qa)}validate(qa,td){return td.schemas[this._sourceName].validate(qa,td)}redirect(qa,td){return this._sourceName}},lt=class extends O $ 2{expected(){return"anything"}validate(){return!0}},ct=class extends O $ 2{constructor({valueSchema:Ra,name:qa=Ra.name,...td}){super({...td,name:qa}),this._valueSchema=Ra}expected(Ra){let{text:qa,list:td}=Ra.normalizeExpectedResult(this._valueSchema.expected(Ra));return{text:qa&& ` an array of $ { qa } ` ,list:td&&{title:"an array of the following values",values:[{list:td}]}}}validate(Ra,qa){if(!Array.isArray(Ra))return!1;let td=[];for(let rd of Ra){let nd=qa.normalizeValidateResult(this._valueSchema.validate(rd,qa),rd);nd!==!0&&td.push(nd.value)}return td.length===0?!0:{value:td}}deprecated(Ra,qa){let td=[];for(let rd of Ra){let nd=qa.normalizeDeprecatedResult(this._valueSchema.deprecated(rd,qa),rd);nd!==!1&&td.push(...nd.map(({value:ad})=>({value:[ad]})))}return td}forward(Ra,qa){let td=[];for(let rd of Ra){let nd=qa.normalizeForwardResult(this._valueSchema.forward(rd,qa),rd);td.push(...nd.map(Fn))}return td}redirect(Ra,qa){let td=[],rd=[];for(let nd of Ra){let ad=qa.normalizeRedirectResult(this._valueSchema.redirect(nd,qa),nd);"remain"in ad&&td.push(ad.remain),rd.push(...ad.redirect.map(Fn))}return td.length===0?{redirect:rd}:{redirect:rd,remain:td}}overlap(Ra,qa){return Ra.concat(qa)}};function Fn({from:Ra,to:qa}){return{from:[Ra],to:qa}}var ft=class extends O $ 2{expected(){return"true or false"}validate(Ra){return typeof Ra=="boolean"}};function En(Ra,qa){let td=Object.create(null);for(let rd of Ra){let nd=rd[qa];if(td[nd])throw new Error( ` Duplicate $ { qa } $ { JSON . stringify ( nd ) } ` );td[nd]=rd}return td}function hn(Ra,qa){let td=new Map;for(let rd of Ra){let nd=rd[qa];if(td.has(nd))throw new Error( ` Duplicate $ { qa } $ { JSON . stringify ( nd ) } ` );td.set(nd,rd)}return td}function Cn $ 1(){let Ra=Object.create(null);return qa=>{let td=JSON.stringify(qa);return Ra[td]?!0:(Ra[td]=!0,!1)}}function gn $ 1(Ra,qa){let td=[],rd=[];for(let nd of Ra)qa(nd)?td.push(nd):rd.push(nd);return[td,rd]}function yn(Ra){return Ra===Math.floor(Ra)}function An(Ra,qa){if(Ra===qa)return 0;let td=typeof Ra,rd=typeof qa,nd=["undefined","object","boolean","number","string"];return td!==rd?nd.indexOf(td)-nd.indexOf(rd):td!=="string"?Number(Ra)-Number(qa):Ra.localeCompare(qa)}function Bn $ 1(Ra){return(...qa)=>{let td=Ra(...qa);return typeof td=="string"?new Error(td):td}}function Mt(Ra){return Ra===void 0?{
` +rd,Ra.codeFrame=rd,Ra}throw Ra}var ce=ko;async function Un(Ra,qa,td,rd,nd){let{embeddedLanguageFormatting:ad,printer:{embed:sd,hasPrettierIgnore:ud=()=>!1,getVisitorKeys:cd}}=td;if(!sd||ad!=="auto")return;if(sd.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/en/plugins.html#optional-embed");let dd=X $ 2(sd.getVisitorKeys??cd),pd=[];Ad();let fd=Ra.stack;for(let{print:Sd,node:Dd,pathStack:Ld}of pd)try{Ra.stack=Ld;let Rd=await Sd(Td,qa,Ra,td);Rd&&nd.set(Dd,Rd)}catch(Rd){if(globalThis.PRETTIER_DEBUG)throw Rd}Ra.stack=fd;function Td(Sd,Dd){return Po(Sd,Dd,td,rd)}function Ad(){let{node:Sd}=Ra;if(Sd===null||typeof Sd!="object"||ud(Ra))return;for(let Ld of dd(Sd))Array.isArray(Sd[Ld])?Ra.each(Ad,Ld):Ra.call(Ad,Ld);let Dd=sd(Ra,td);if(Dd){if(typeof Dd=="function"){pd.push({print:Dd,node:Sd,pathStack:[...Ra.stack]});return}nd.set(Sd,Dd)}}}async function Po(Ra,qa,td,rd){let nd=await se({...td,...qa,parentParser:td.parser,originalText:Ra},{passThrough:!0}),{ast:ad}=await ce(Ra,nd),sd=await rd(ad,nd);return Ze(sd)}function Io(Ra,qa){let{originalText:td,[Symbol.for("comments")]:rd,locStart:nd,locEnd:ad,[Symbol.for("printedComments")]:sd}=qa,{node:ud}=Ra,cd=nd(ud),dd=ad(ud);for(let pd of rd)nd(pd)>=cd&&ad(pd)<=dd&&sd.add(pd);return td.slice(cd,dd)}var zn=Io;async function Ye(Ra,qa){({ast:Ra}=await Qt(Ra,qa));let td=new Map,rd=new Mr(Ra),nd=new Map;await Un(rd,sd,qa,Ye,nd);let ad=await Gn $ 1(rd,qa,sd,void 0,nd);return en(qa),ad;function sd(cd,dd){return cd===void 0||cd===rd?ud(dd):Array.isArray(cd)?rd.call(()=>ud(dd),...cd):rd.call(()=>ud(dd),cd)}function ud(cd){let dd=rd.node;if(dd==null)return"";let pd=dd&&typeof dd=="object"&&cd===void 0;if(pd&&td.has(dd))return td.get(dd);let fd=Gn $ 1(rd,qa,sd,cd,nd);return pd&&td.set(dd,fd),fd}}function Gn $ 1(Ra,qa,td,rd,nd){var ad;let{node:sd}=Ra,{printer:ud}=qa,cd;return(ad=ud.hasPrettierIgnore)!=null&&ad.call(ud,Ra)?cd=zn(Ra,qa):nd.has(sd)?cd=nd.get(sd):cd=ud.print(Ra,qa,td,rd),sd===qa.cursorNode&&(cd=Qe(cd,dd=>[ve,dd,ve])),ud.printComment&&(!ud.willPrintOwnComments||!ud.willPrintOwnComments(Ra,qa))&&(cd=Qr $ 1(Ra,cd,qa)),cd}async function Qt(Ra,qa){let td=Ra.comments??[];qa[Symbol.for("comments")]=td,qa[Symbol.for("tokens")]=Ra.tokens??[],qa[Symbol.for("printedComments")]=new Set,Jr(Ra,qa);let{printer:{preprocess:rd}}=qa;return Ra=rd?await rd(Ra,qa):Ra,{ast:Ra,comments:td}}function Ro(Ra,qa){let{cursorOffset:td,locStart:rd,locEnd:nd}=qa,ad=X $ 2(qa.printer.getVisitorKeys),sd=cd=>rd(cd)<=td&&nd(cd)>=td,ud=Ra;for(let cd of Ur(Ra,{getVisitorKeys:ad,filter:sd}))ud=cd;return ud}var Kn=Ro;function Yo(Ra,qa){let{printer:{massageAstNode:td,getVisitorKeys:rd}}=qa;if(!td)return Ra;let nd=X $ 2(rd),ad=td.ignoredProperties??new Set;return sd(Ra);function sd(ud,cd){if(!(ud!==null&&typeof ud=="object"))return ud;if(Array.isArray(ud))return ud.map(Td=>sd(Td,cd)).filter(Boolean);let dd={},pd=new Set(nd(ud));for(let Td in ud)!Object.prototype.hasOwnProperty.call(ud,Td)||ad.has(Td)||(pd.has(Td)?dd[Td]=sd(ud[Td],ud):dd[Td]=ud[Td]);let fd=td(ud,dd,cd);if(fd!==null)return fd??dd}}var qn $ 1=Yo,jo $ 1=(Ra,qa,td)=>{if(!(Ra&&qa==null)){if(qa.findLastIndex)return qa.findLastIndex(td);for(let rd=qa.length-1;rd>=0;rd--){let nd=qa[rd];if(td(nd,rd,qa))return rd}return-1}},Jn $ 1=jo $ 1,Ho $ 1=({parser:Ra})=>Ra==="json"||Ra==="json5"||Ra==="jsonc"||Ra==="json-stringify";function Wo $ 1(Ra,qa){let td=[Ra.node,...Ra.parentNodes],rd=new Set([qa.node,...qa.parentNodes]);return td.find(nd=>Qn $ 1.has(nd.type)&&rd.has(nd))}function Xn $ 1(Ra){let qa=Jn $ 1(!1,Ra,td=>td.type!=="Program"&&td.type!=="File");return qa===-1?Ra:Ra.slice(0,qa+1)}function Mo(Ra,qa,{locStart:td,locEnd:rd}){let nd=Ra.node,ad=qa.node;if(nd===ad)return{startNode:nd,endNode:ad};let sd=td(Ra.node);for(let cd of Xn $ 1(qa.parentNodes))if(td(cd)>=sd)ad=cd;else break;let ud=rd(qa.node);for(let cd of Xn $ 1(Ra.parentNodes)){if(rd(cd)<=ud)nd=cd;else break;if(nd===ad)break}return{startNode:nd,endNode:ad}}function er(Ra,qa,td,rd,nd=[],ad){let{locStart:sd,locEnd:ud}=td,cd=sd(Ra),dd=ud(Ra);if(!(
` ,nd)+1),cd=rd.slice(ud,nd).match(/^ \s */u)[0],dd=me(cd,qa.tabWidth),pd=await ou $ 1(sd,{...qa,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:qa.cursorOffset>nd&&qa.cursorOffset<=ad?qa.cursorOffset-nd:-1,endOfLine:"lf"},dd),fd=pd.formatted.trimEnd(),{cursorOffset:Td}=qa;Td>ad?Td+=fd.length-sd.length:pd.cursorOffset>=0&&(Td=pd.cursorOffset+nd);let Ad=rd.slice(0,nd)+fd+rd.slice(ad);if(qa.endOfLine!=="lf"){let Sd=Be(qa.endOfLine);Td>=0&&Sd=== ` \ r
` &&(Td+=wt(Ad.slice(0,Td), `
2024-09-18 09:46:23 +08:00
` )),Ad=ne $ 1(!1,Ad, `
2024-09-25 14:23:53 +08:00
` ,Sd)}return{formatted:Ad,cursorOffset:Td,comments:pd.comments}}function tr(Ra,qa,td){return typeof qa!="number"||Number.isNaN(qa)||qa<0||qa>Ra.length?td:qa}function ru $ 1(Ra,qa){let{cursorOffset:td,rangeStart:rd,rangeEnd:nd}=qa;return td=tr(Ra,td,-1),rd=tr(Ra,rd,0),nd=tr(Ra,nd,Ra.length),{...qa,cursorOffset:td,rangeStart:rd,rangeEnd:nd}}function iu $ 1(Ra,qa){let{cursorOffset:td,rangeStart:rd,rangeEnd:nd,endOfLine:ad}=ru $ 1(Ra,qa),sd=Ra.charAt(0)===uu $ 1;if(sd&&(Ra=Ra.slice(1),td--,rd--,nd--),ad==="auto"&&(ad=Fr(Ra)),Ra.includes(" \r ")){let ud=cd=>wt(Ra.slice(0,Math.max(cd,0)), ` \ r
` );td-=ud(td),rd-=ud(rd),nd-=ud(nd),Ra=mr(Ra)}return{hasBOM:sd,text:Ra,options:ru $ 1(Ra,{...qa,cursorOffset:td,rangeStart:rd,rangeEnd:nd,endOfLine:ad})}}async function nu $ 1(Ra,qa){let td=await ht $ 1(qa);return!td.hasPragma||td.hasPragma(Ra)}async function rr(Ra,qa){let{hasBOM:td,text:rd,options:nd}=iu $ 1(Ra,await se(qa));if(nd.rangeStart>=nd.rangeEnd&&rd!==""||nd.requirePragma&&!await nu $ 1(rd,nd))return{formatted:Ra,cursorOffset:qa.cursorOffset,comments:[]};let ad;return nd.rangeStart>0||nd.rangeEnd<rd.length?ad=await Uo $ 1(rd,nd):(!nd.requirePragma&&nd.insertPragma&&nd.printer.insertPragma&&!await nu $ 1(rd,nd)&&(rd=nd.printer.insertPragma(rd)),ad=await ou $ 1(rd,nd)),td&&(ad.formatted=uu $ 1+ad.formatted,ad.cursorOffset>=0&&ad.cursorOffset++),ad}async function su $ 1(Ra,qa,td){let{text:rd,options:nd}=iu $ 1(Ra,await se(qa)),ad=await ce(rd,nd);return td&&(td.preprocessForPrint&&(ad.ast=await Qt(ad.ast,nd)),td.massage&&(ad.ast=qn $ 1(ad.ast,nd))),ad}async function au $ 1(Ra,qa){qa=await se(qa);let td=await Ye(Ra,qa);return Fe(td,qa)}async function Du(Ra,qa){let td=Or(Ra),{formatted:rd}=await rr(td,{...qa,parser:"__js_expression"});return rd}async function lu $ 1(Ra,qa){qa=await se(qa);let{ast:td}=await ce(Ra,qa);return Ye(td,qa)}async function cu $ 1(Ra,qa){return Fe(Ra,await se(qa))}var nr={};We(nr,{builders:()=>Go $ 1,printer:()=>Ko $ 1,utils:()=>qo});var Go $ 1={join:be $ 1,line:Ke $ 1,softline:vr,hardline:q $ 1,literalline:qe $ 1,group:_t,conditionalGroup:Ar,fill:Ge,lineSuffix:xe $ 1,lineSuffixBoundary:xr,cursor:ve,breakParent:de,ifBreak:Br,trim:_r,indent:De,indentIfBreak:wr,align:ae,addAlignmentToDoc:Je $ 1,markAsRoot:gr,dedentToRoot:Cr,dedent:yr,hardlineWithoutBreakParent:_e,literallineWithoutBreakParent:vt,label:br $ 2,concat:Ra=>Ra},Ko $ 1={printDocToString:Fe},qo={willBreak:Ir,traverseDoc:we,findInDoc:Xe,mapDoc:Ne,removeLines:Yr,stripTrailingHardline:Ze,replaceEndOfLine:jr,canBreak:Hr},fu="3.3.3",or={};We(or,{addDanglingComment:()=>re,addLeadingComment:()=>ue,addTrailingComment:()=>oe,getAlignmentSize:()=>me,getIndentSize:()=>pu $ 1,getMaxContinuousCount:()=>du $ 1,getNextNonSpaceNonCommentCharacter:()=>Fu,getNextNonSpaceNonCommentCharacterIndex:()=>si,getStringWidth:()=>Oe,hasNewline:()=>V $ 1,hasNewlineInRange:()=>mu,hasSpaces:()=>Eu,isNextLineEmpty:()=>ci,isNextLineEmptyAfterIndex:()=>gt,isPreviousLineEmpty:()=>Di $ 1,makeString:()=>hu $ 1,skip:()=>Ee,skipEverythingButNewLine:()=>nt $ 1,skipInlineComment:()=>Ce,skipNewline:()=>M $ 1,skipSpaces:()=>T $ 1,skipToLineEnd:()=>rt,skipTrailingComment:()=>ge,skipWhitespace:()=>zr});function Jo(Ra,qa){if(qa===!1)return!1;if(Ra.charAt(qa)==="/"&&Ra.charAt(qa+1)==="*"){for(let td=qa+2;td<Ra.length;++td)if(Ra.charAt(td)==="*"&&Ra.charAt(td+1)==="/")return td+2}return qa}var Ce=Jo;function Xo(Ra,qa){return qa===!1?!1:Ra.charAt(qa)==="/"&&Ra.charAt(qa+1)==="/"?nt $ 1(Ra,qa):qa}var ge=Xo;function Zo(Ra,qa){let td=null,rd=qa;for(;rd!==td;)td=rd,rd=T $ 1(Ra,rd),rd=Ce(Ra,rd),rd=ge(Ra,rd),rd=M $ 1(Ra,rd);return rd}var je $ 1=Zo;function Qo(Ra,qa){let td=null,rd=qa;for(;rd!==td;)td=rd,rd=rt(Ra,rd),rd=Ce(Ra,rd),rd=T $ 1(Ra,rd);return rd=ge(Ra,rd),rd=M $ 1(Ra,rd),rd!==!1&&V $ 1(Ra,rd)}var gt=Qo;function ei(Ra,qa){let td=Ra.lastIndexOf( `
` );return td===-1?0:me(Ra.slice(td+1).match(/^[ \t ]*/u)[0],qa)}var pu $ 1=ei;function ur(Ra){if(typeof Ra!="string")throw new TypeError("Expected a string");return Ra.replace(/[| \\ {}()[ \] ^ $ +*?.]/g," \\ $ &").replace(/-/g," \\ x2d")}function ti $ 1(Ra,qa){let td=Ra.match(new RegExp( ` ( $ { ur ( qa ) } ) + ` ,"gu"));return td===null?0:td.reduce((rd,nd)=>Math.max(rd,nd.length/qa.length),0)}var du $ 1=ti $ 1;function ri $ 1(Ra,qa){let td=je $ 1(Ra,qa);return td===!1?"":Ra.charAt(td)}var Fu=ri $ 1;function ni $ 1(Ra,qa,td){for(let rd=qa;rd<td;++rd)if(Ra.charAt(rd)=== `
2024-09-28 20:51:35 +08:00
` )return!0;return!1}var mu=ni $ 1;function ui $ 1(Ra,qa,td={}){return T $ 1(Ra,td.backwards?qa-1:qa,td)!==qa}var Eu=ui $ 1;function oi $ 1(Ra,qa,td){let rd=qa==='"'?"'":'"',nd=ne $ 1(!1,Ra,/ \\ (.)|(["'])/gsu,(ad,sd,ud)=>sd===rd?sd:ud===qa?" \\ "+ud:ud||(td&&/^[^ \n \r "'0-7 \\ bfnrt-vx \u 2028 \u 2029] $ /u.test(sd)?sd:" \\ "+sd));return qa+nd+qa}var hu $ 1=oi $ 1;function ii $ 1(Ra,qa,td){return je $ 1(Ra,td(qa))}function si(Ra,qa){return arguments.length===2||typeof qa=="number"?je $ 1(Ra,qa):ii $ 1(...arguments)}function ai(Ra,qa,td){return Le $ 1(Ra,td(qa))}function Di $ 1(Ra,qa){return arguments.length===2||typeof qa=="number"?Le $ 1(Ra,qa):ai(...arguments)}function li $ 1(Ra,qa,td){return gt(Ra,td(qa))}function ci(Ra,qa){return arguments.length===2||typeof qa=="number"?gt(Ra,qa):li $ 1(...arguments)}function fe(Ra,qa=1){return async(...td)=>{let rd=td[qa]??{},nd=rd.plugins??[];return td[qa]={...rd,plugins:Array.isArray(nd)?nd:Object.values(nd)},Ra(...td)}}var Cu $ 1=fe(rr);async function gu $ 1(Ra,qa){let{formatted:td}=await Cu $ 1(Ra,{...qa,cursorOffset:-1});return td}async function fi(Ra,qa){return await gu $ 1(Ra,qa)===Ra}var pi $ 2=fe(ot $ 1,0),di $ 1={parse:fe(su $ 1),formatAST:fe(au $ 1),formatDoc:fe(Du),printToDoc:fe(lu $ 1),printDocToString:fe(cu $ 1)};function addPrefix(Ra){return ` $ { prefix } _ _$ { Ra } ` }function customizeTheme(Ra,qa){const td=JSON.parse(JSON.stringify(Ra)),{fontSize:rd,color:nd}=qa;if(rd)for(let ad=1;ad<=4;ad++){const sd=td.block[ ` h$ { ad } ` ]["font-size"];td.block[ ` h$ { ad } ` ]["font-size"]= ` $ { rd * Number . parseFloat ( sd ) } px ` }return nd&&(td.base["--md-primary-color"]=nd),td}function customCssWithTemplate(Ra,qa,td){const rd=customizeTheme(td,{color:qa}),nd=(ud,cd,dd)=>{dd.forEach(pd=>{cd[pd]&&(ud[pd]=Object.assign(ud[pd]||{},cd[pd]))})},ad=["h1","h2","h3","h4","code","code_pre","p","hr","blockquote","blockquote_p","image","ul","ol"],sd=["strong","codespan","link","wx_link","listitem"];return nd(rd.block,Ra,ad),nd(rd.inline,Ra,sd),rd}function css2json(Ra){Ra=Ra.replace(/ \/ \* [ \s \S ]*? \* \/ /g,"");const qa={},td=rd=>rd.reduce((nd,ad)=>{const[sd,ud]=ad.split(":").map(cd=>cd.trim());return sd&&(nd[sd]=ud),nd},{});for(;Ra.includes("{")&&Ra.includes("}");){const rd=Ra.indexOf("{"),nd=Ra.indexOf("}"),ad=Ra.substring(rd+1,nd).split(";").map(cd=>cd.trim()).filter(Boolean),sd=Ra.substring(0,rd).split(",").map(cd=>cd.trim()),ud=td(ad);sd.forEach(cd=>{qa[cd]={...qa[cd]||{},...ud}}),Ra=Ra.slice(nd+1).trim()}return qa}async function formatDoc(Ra,qa="markdown"){const td={markdown:[prettierPluginMarkdown,prettierPluginBabel,prettierPluginEstree],css:[prettierPluginCss]},rd=qa in td?qa:"markdown";return await gu $ 1(Ra,{parser:rd,plugins:td[rd]})}function downloadMD(Ra){const qa=document.createElement("a");qa.download="content.md",qa.style.display="none";const td=new Blob([Ra]);qa.href=URL.createObjectURL(td),document.body.appendChild(qa),qa.click(),document.body.removeChild(qa)}function exportHTML(){const Ra=document.querySelector("#output");nd(Ra);const qa=Ra.innerHTML,td=document.createElement("a");td.download="content.html",td.style.display="none";const rd=new Blob([ ` < html > < head > < meta charset = "utf-8" / > < / h e a d > < b o d y > < d i v s t y l e = " w i d t h : 7 5 0 p x ; m a r g i n : a u t o ; " > $ { q a } < / d i v > < / b o d y > < / h t m l > ` ] ) ; t d . h r e f = U R L . c r e a t e O b j e c t U R L ( r d ) , d o c u m e n t . b o d y . a p p e n d C h i l d ( t d ) , t d . c l i c k ( ) , d o c u m e n t . b o d y . r e m o v e C h i l d ( t d ) ; f u n c t i o n n d ( a d ) { f u n c t i o n s d ( p d , f d = [ " w i d t h " , " h e i g h t " ] ) { c o n s t T d = g e t C o m p u t e d S t y l e ( p d , n u l l ) ; r e t u r n O b j e c t . e n t r i e s ( T d ) . f i l t e r ( ( [ A d ] ) = > T d . g e t P r o p e r t y V a l u e ( A d ) & & ! f d . i n c l u d e s ( A d ) ) . m a p ( ( [ A d , S d ] ) = > ` $ { A d } : $ { S d } ; ` ) . j o i n ( " " ) } s w i t c h ( ! 0 ) { c a s e u d ( a d ) : c a s e c d ( a d ) : c a s e d d ( a d ) : a d . s e t A t t r i b u t e ( " s t y l e " , s d ( a d ) ) } a d . c h i l d r e n . l e n g t h & & A r r a y . f r o m ( a d . c h i l d r e n ) . f o r E a c h ( p d = > n d ( p d ) ) ; f u n c t i o n u d ( p d ) { r e t u r n p d . t a g N a m e = = = " P R E " & & A r r a y . f r o m ( p d . c l a s s L i s t ) . i n c l u d e s ( " c o d e _ _ p r e " ) } f u n c t i o n c d ( p d ) { r e t u r n p d = = n u l l ? ! 1 : p d . t a g N a m e = = = " C O D E " } f u n c t i o n d d ( p d ) { r e t u r n p d . t a g N a m e = = = " S P A N " & & ( c d ( p d . p a r e n t E l e m e n t ) | | c d ( p d . p a r e n t E l e m e n t . p a r e n t E l e m e n t ) ) } } } f u n c t i o n c r e a t e T a b l e ( { d a t a : R a , r o w s : q a , c o l s : t d } ) { l e t r d = " " ; f o r ( l e t n d = 0 ; n d < q a + 2 ; + + n d ) { r d + = " | " ; c o n s t a d = [ ] ; f o r ( l e t s d = 0 ; s d < t d ; + + s d ) { c o n s t u d = n d > 1 ? n d - 1 : n d ; a d . p u s h ( n d = = = 1 ? " - - - " : R a [ ` k _ $ { u d } _ $ { s d } ` ] | | " " ) } r d + = a d . j o i n ( " |
2024-09-25 14:23:53 +08:00
` }return rd}function toBase64 $ 1(Ra){return new Promise((qa,td)=>{const rd=new FileReader;rd.readAsDataURL(Ra),rd.onload=()=>qa(rd.result.split(",").pop()),rd.onerror=nd=>td(nd)})}function checkImage(Ra){if(!/ \. (?:gif|jpe?g|png) $ /i.test(Ra.name))return{ok:!1,msg:"请上传 JPG/PNG/GIF 格式的图片"};const td=10;return Ra.size>td*1024*1024?{ok:!1,msg: ` 由于公众号限制 , 图片大小不能超过 $ { td } M ` }:{ok:!0}}function removeLeft(Ra){const qa=Ra.split( `
` ),td=qa.filter(rd=>rd.trim()).map(rd=>rd.match(/(^ \s +)?/)[0].length).sort((rd,nd)=>rd-nd)[0];return qa.map(rd=>rd.slice(td)).join( `
2024-09-28 20:51:35 +08:00
` )}function solveWeChatImage(){const qa=document.getElementById("output").getElementsByTagName("img");for(let td=0;td<qa.length;td++){const rd=qa[td],nd=rd.getAttribute("width"),ad=rd.getAttribute("height");rd.removeAttribute("width"),rd.removeAttribute("height"),rd.style.width=nd,rd.style.height=ad}}function mergeCss(Ra){return juice(Ra,{inlinePseudoElements:!0,preserveImportant:!0})}function deepFreeze(Ra){return Ra instanceof Map?Ra.clear=Ra.delete=Ra.set=function(){throw new Error("map is read-only")}:Ra instanceof Set&&(Ra.add=Ra.clear=Ra.delete=function(){throw new Error("set is read-only")}),Object.freeze(Ra),Object.getOwnPropertyNames(Ra).forEach(qa=>{const td=Ra[qa],rd=typeof td;(rd==="object"||rd==="function")&&!Object.isFrozen(td)&&deepFreeze(td)}),Ra}let Response $ 1=class{constructor(qa){qa.data===void 0&&(qa.data={}),this.data=qa.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function escapeHTML(Ra){return Ra.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function inherit $ 1(Ra,...qa){const td=Object.create(null);for(const rd in Ra)td[rd]=Ra[rd];return qa.forEach(function(rd){for(const nd in rd)td[nd]=rd[nd]}),td}const SPAN_CLOSE="</span>",emitsWrappingTags=Ra=>!!Ra.scope,scopeToCSSClass=(Ra,{prefix:qa})=>{if(Ra.startsWith("language:"))return Ra.replace("language:","language-");if(Ra.includes(".")){const td=Ra.split(".");return[ ` $ { qa } $ { td . shift ( ) } ` ,...td.map((rd,nd)=> ` $ { rd } $ { "_" . repeat ( nd + 1 ) } ` )].join(" ")}return ` $ { qa } $ { Ra } ` };class HTMLRenderer{constructor(qa,td){this.buffer="",this.classPrefix=td.classPrefix,qa.walk(this)}addText(qa){this.buffer+=escapeHTML(qa)}openNode(qa){if(!emitsWrappingTags(qa))return;const td=scopeToCSSClass(qa.scope,{prefix:this.classPrefix});this.span(td)}closeNode(qa){emitsWrappingTags(qa)&&(this.buffer+=SPAN_CLOSE)}value(){return this.buffer}span(qa){this.buffer+= ` < span class = "${qa}" > ` }}const newNode=(Ra={})=>{const qa={children:[]};return Object.assign(qa,Ra),qa};class TokenTree{constructor(){this.rootNode=newNode(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(qa){this.top.children.push(qa)}openNode(qa){const td=newNode({scope:qa});this.add(td),this.stack.push(td)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(qa){return this.constructor._walk(qa,this.rootNode)}static _walk(qa,td){return typeof td=="string"?qa.addText(td):td.children&&(qa.openNode(td),td.children.forEach(rd=>this._walk(qa,rd)),qa.closeNode(td)),qa}static _collapse(qa){typeof qa!="string"&&qa.children&&(qa.children.every(td=>typeof td=="string")?qa.children=[qa.children.join("")]:qa.children.forEach(td=>{TokenTree._collapse(td)}))}}class TokenTreeEmitter extends TokenTree{constructor(qa){super(),this.options=qa}addText(qa){qa!==""&&this.add(qa)}startScope(qa){this.openNode(qa)}endScope(){this.closeNode()}__addSublanguage(qa,td){const rd=qa.root;td&&(rd.scope= ` language : $ { td } ` ),this.add(rd)}toHTML(){return new HTMLRenderer(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function source(Ra){return Ra?typeof Ra=="string"?Ra:Ra.source:null}function lookahead(Ra){return concat $ 2("(?=",Ra,")")}function anyNumberOfTimes(Ra){return concat $ 2("(?:",Ra,")*")}function optional(Ra){return concat $ 2("(?:",Ra,")?")}function concat $ 2(...Ra){return Ra.map(td=>source(td)).join("")}function stripOptionsFromArgs(Ra){const qa=Ra[Ra.length-1];return typeof qa=="object"&&qa.constructor===Object?(Ra.splice(Ra.length-1,1),qa):{}}function either(...Ra){return"("+(stripOptionsFromArgs(Ra).capture?"":"?:")+Ra.map(rd=>source(rd)).join("|")+")"}function countMatchGroups(Ra){return new RegExp(Ra.toString()+"|").exec("").length-1}function startsWith $ 1(Ra,qa){const td=Ra&&Ra.exec(qa);return td&&td.index===0}const BACKREF_RE=/ \[ (?:[^ \\ \] ]| \\ .)* \] | \( \? ?| \\ ([1-9][0-9]*)| \\ ./;function _rewriteBackreferences(Ra,{joinWith:qa}){let td=0;return Ra.map(rd=>{td+=1;const nd=td;let ad
https : //github.com/highlightjs/highlight.js/issues/2277`),Vf=xf,Zf=Bf),Yf===void 0&&(Yf=!0);const Pf={code:Zf,language:Vf};_f("before:highlight",Pf);const Df=Pf.result?Pf.result:fd(Pf.language,Pf.code,Yf);return Df.code=Pf.code,_f("after:highlight",Df),Df}function fd(xf,Bf,Yf,Zf){const Vf=Object.create(null);function Pf(Bh,Yh){return Bh.keywords[Yh]}function Df(){if(!jf.keywords){_h.addText(nh);return}let Bh=0;jf.keywordPatternRe.lastIndex=0;let Yh=jf.keywordPatternRe.exec(nh),dm="";for(;Yh;){dm+=nh.substring(Bh,Yh.index);const rh=Uf.case_insensitive?Yh[0].toLowerCase():Yh[0],If=Pf(jf,rh);if(If){const[Nf,Qf]=If;if(_h.addText(dm),dm="",Vf[rh]=(Vf[rh]||0)+1,Vf[rh]<=MAX_KEYWORD_HITS&&(wh+=Qf),Nf.startsWith("_"))dm+=Yh[0];else{const oh=Uf.classNameAliases[Nf]||Nf;Xf(Yh[0],oh)}}else dm+=Yh[0];Bh=jf.keywordPatternRe.lastIndex,Yh=jf.keywordPatternRe.exec(nh)}dm+=nh.substring(Bh),_h.addText(dm)}function $f(){if(nh==="")return;let Bh=null;if(typeof jf.subLanguage=="string"){if(!qa[jf.subLanguage]){_h.addText(nh);return}Bh=fd(jf.subLanguage,nh,!0,uh[jf.subLanguage]),uh[jf.subLanguage]=Bh._top}else Bh=Ad(nh,jf.subLanguage.length?jf.subLanguage:null);jf.relevance>0&&(wh+=Bh.relevance),_h.__addSublanguage(Bh._emitter,Bh.language)}function Jf(){jf.subLanguage!=null?$f():Df(),nh=""}function Xf(Bh,Yh){Bh!==""&&(_h.startScope(Yh),_h.addText(Bh),_h.endScope())}function Ef(Bh,Yh){let dm=1;const rh=Yh.length-1;for(;dm<=rh;){if(!Bh._emit[dm]){dm++;continue}const If=Uf.classNameAliases[Bh[dm]]||Bh[dm],Nf=Yh[dm];If?Xf(Nf,If):(nh=Nf,Df(),nh=""),dm++}}function gf(Bh,Yh){return Bh.scope&&typeof Bh.scope=="string"&&_h.openNode(Uf.classNameAliases[Bh.scope]||Bh.scope),Bh.beginScope&&(Bh.beginScope._wrap?(Xf(nh,Uf.classNameAliases[Bh.beginScope._wrap]||Bh.beginScope._wrap),nh=""):Bh.beginScope._multi&&(Ef(Bh.beginScope,Yh),nh="")),jf=Object.create(Bh,{parent:{value:jf}}),jf}function Mf(Bh,Yh,dm){let rh=startsWith$1(Bh.endRe,dm);if(rh){if(Bh["on:end"]){const If=new Response$1(Bh);Bh["on:end"](Yh,If),If.isMatchIgnored&&(rh=!1)}if(rh){for(;Bh.endsParent&&Bh.parent;)Bh=Bh.parent;return Bh}}if(Bh.endsWithParent)return Mf(Bh.parent,Yh,dm)}function Gf(Bh){return jf.matcher.regexIndex===0?(nh+=Bh[0],1):(Vh=!0,0)}function ah(Bh){const Yh=Bh[0],dm=Bh.rule,rh=new Response$1(dm),If=[dm.__beforeBegin,dm["on:begin"]];for(const Nf of If)if(Nf&&(Nf(Bh,rh),rh.isMatchIgnored))return Gf(Yh);return dm.skip?nh+=Yh:(dm.excludeBegin&&(nh+=Yh),Jf(),!dm.returnBegin&&!dm.excludeBegin&&(nh=Yh)),gf(dm,Bh),dm.returnBegin?0:Yh.length}function Wf(Bh){const Yh=Bh[0],dm=Bf.substring(Bh.index),rh=Mf(jf,Bh,dm);if(!rh)return NO_MATCH;const If=jf;jf.endScope&&jf.endScope._wrap?(Jf(),Xf(Yh,jf.endScope._wrap)):jf.endScope&&jf.endScope._multi?(Jf(),Ef(jf.endScope,Bh)):If.skip?nh+=Yh:(If.returnEnd||If.excludeEnd||(nh+=Yh),Jf(),If.excludeEnd&&(nh=Yh));do jf.scope&&_h.closeNode(),!jf.skip&&!jf.subLanguage&&(wh+=jf.relevance),jf=jf.parent;while(jf!==rh.parent);return rh.starts&&gf(rh.starts,Bh),If.returnEnd?0:Yh.length}function Rf(){const Bh=[];for(let Yh=jf;Yh!==Uf;Yh=Yh.parent)Yh.scope&&Bh.unshift(Yh.scope);Bh.forEach(Yh=>_h.openNode(Yh))}let qf={};function lh(Bh,Yh){const dm=Yh&&Yh[0];if(nh+=Bh,dm==null)return Jf(),0;if(qf.type==="begin"&&Yh.type==="end"&&qf.index===Yh.index&&dm===""){if(nh+=Bf.slice(Yh.index,Yh.index+1),!nd){const rh=new Error(`0 width match regex (${xf})`);throw rh.languageName=xf,rh.badRule=qf.rule,rh}return 1}if(qf=Yh,Yh.type==="begin")return ah(Yh);if(Yh.type==="illegal"&&!Yf){const rh=new Error('Illegal lexeme "'+dm+'" for mode "'+(jf.scope||"<unnamed>")+'"');throw rh.mode=jf,rh}else if(Yh.type==="end"){const rh=Wf(Yh);if(rh!==NO_MATCH)return rh}if(Yh.type==="illegal"&&dm==="")return 1;if(Th>1e5&&Th>Yh.index*3)throw new Error("potential infinite loop, way more iterations than matches");return nh+=dm,dm.length}const Uf=zd(xf);if(!Uf)throw error(ad.replace("{}",xf)),new Error('Unknown language: "'+xf+'"');const wf=compileLanguage(Uf);let Of="",jf=Zf||wf;const uh={},_h=new ud.__emitter(ud);Rf();let nh="",wh=0,hh=0,Th=0,Vh=!1;try{if(Uf.__emitTokens)Uf.__emitTokens(Bf,_h
` },Sd]}}return kotlin_1=nd,kotlin_1}var lasso_1,hasRequiredLasso;function requireLasso(){if(hasRequiredLasso)return lasso_1;hasRequiredLasso=1;function Ra(qa){const td="[a-zA-Z_][ \\ w.]*",rd="< \\ ?(lasso(script)?|=)",nd=" \\ ]| \\ ?>",ad={ $ pattern:td+"|&[lg]t;",literal:"true false none minimal full all void and or not bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft",built_in:"array date decimal duration integer map pair string tag xml null boolean bytes keyword list locale queue set stack staticarray local var variable global data self inherited currentcapture givenblock",keyword:"cache database_names database_schemanames database_tablenames define_tag define_type email_batch encode_set html_comment handle handle_error header if inline iterate ljax_target link link_currentaction link_currentgroup link_currentrecord link_detail link_firstgroup link_firstrecord link_lastgroup link_lastrecord link_nextgroup link_nextrecord link_prevgroup link_prevrecord log loop namespace_using output_none portal private protect records referer referrer repeating resultset rows search_args search_arguments select sort_args sort_arguments thread_atomic value_list while abort case else fail_if fail_ifnot fail if_empty if_false if_null if_true loop_abort loop_continue loop_count params params_up return return_value run_children soap_definetag soap_lastrequest soap_lastresponse tag_name ascending average by define descending do equals frozen group handle_failure import in into join let match max min on order parent protected provide public require returnhome skip split_thread sum take thread to trait type where with yield yieldhome"},sd=qa.COMMENT("<!--","-->",{relevance:0}),ud={className:"meta",begin:" \\ [noprocess \\ ]",starts:{end:" \\ [/noprocess \\ ]",returnEnd:!0,contains:[sd]}},cd={className:"meta",begin:" \\ [/noprocess|"+rd},dd={className:"symbol",begin:"'"+td+"'"},pd=[qa.C_LINE_COMMENT_MODE,qa.C_BLOCK_COMMENT_MODE,qa.inherit(qa.C_NUMBER_MODE,{begin:qa.C_NUMBER_RE+"|(-?infinity|NaN) \\ b"}),qa.inherit(qa.APOS_STRING_MODE,{illegal:null}),qa.inherit(qa.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:" ` ",end:" ` "},{variants:[{begin:"[# $ ]"+td},{begin:"#",end:" \\ d+",illegal:" \\ W"}]},{className:"type",begin:":: \\ s*",end:td,illegal:" \\ W"},{className:"params",variants:[{begin:"-(?!infinity)"+td,relevance:0},{begin:"( \\ . \\ . \\ .)"}]},{begin:/(->| \. ) \s */,relevance:0,contains:[dd]},{className:"class",beginKeywords:"define",returnEnd:!0,end:" \\ (|=>",contains:[qa.inherit(qa.TITLE_MODE,{begin:td+"(=(?!>))?|[-+*/%](?!>)"})]}];return{name:"Lasso",aliases:["ls","lassoscript"],case_insensitive:!0,keywords:ad,contains:[{className:"meta",begin:nd,relevance:0,starts:{end:" \\ [|"+rd,returnEnd:!0,relevance:0,contains:[sd]}},ud,cd,{className:"meta",begin:" \\ [no_square_brackets",starts:{end:" \\ [/no_square_brackets \\ ]",keywords:ad,contains:[{className:"meta",begin:nd,relevance:0,starts:{end:" \\ [noprocess \\ ]|"+rd,returnEnd:!0,contains:[sd]}},ud,cd].concat(pd)}},{className:"meta",begin:" \\ [",relevance:0},{className:"meta",begin:"^#!",end:"lasso9 $ ",relevance:10}].concat(pd)}}return lasso_1=Ra,lasso_1}var latex_1,hasRequiredLatex;function requireLatex(){if(hasRequiredLatex)return latex_1;hasRequiredLatex=1;function Ra(qa){const rd=qa.regex.either(...["(?:NeedsTeXFormat|RequirePackage|GetIdInfo)","Provides(?:Expl)?(?:Package|Class|File)","(?:DeclareOption|ProcessOptions)","(?:documentclass|usepackage|input|include)","makeat(?:letter|other)","ExplSyntax(?:On|Off)","(?:new|renew|provide)?command","(?:re)newenvironment","(?:New|Renew|Provide|Declare)(?:Expandable)?DocumentCommand","(?:New|Renew|Provide|Declare)DocumentEnvironment","(?:(?:e|g|x)?def|let)","(?:begin|end)","(?:part|chapter|(?:sub){0,2}section|(?:sub)?paragraph)","caption","(?:label|(?:eq|page|name)?ref|(?:paren|foot|super)?cite)","(?:alpha|beta|[Gg]amma|[Dd]elta|(?:var)?epsilon|zeta|eta|[Tt]heta|vartheta)","(?:iota|(?:var)?kappa|[Ll]ambda|mu|nu|[Xx]i|[Pp]i|varpi|(?:var)rho)","(?:[Ss]igma|varsigma|tau|[Uu]psilon|[Pp]hi|varphi|chi|[Pp]si|[Oo]mega)","(?:frac|sum|prod|lim|infty|times|sqrt|leq|geq|left|right|middl
] ` ,Sd={scope:"string",variants:[pd,dd,fd,Td]},Dd={scope:"number",variants:[{begin:" \\ b0[bB][01]+(?:_[01]+)* \\ b"},{begin:" \\ b0[oO][0-7]+(?:_[0-7]+)* \\ b"},{begin:" \\ b0[xX][ \\ da-fA-F]+(?:_[ \\ da-fA-F]+)* \\ b"},{begin:"(?: \\ b \\ d+(?:_ \\ d+)*( \\ .(?: \\ d+(?:_ \\ d+)*))?| \\ B \\ . \\ d+)(?:[eE][+-]? \\ d+)?"}],relevance:0},Ld=["false","null","true"],Rd=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],Od=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],jd={keyword:Rd,literal:(Tf=>{const _f=[];return Tf.forEach(bf=>{_f.push(bf),bf.toLowerCase()===bf?_f.push(bf.toUpperCase()):_f.push(bf.toLowerCase())}),_f})(Ld),built_in:Od},Ud=Tf=>Tf.map(_f=>_f.replace(/ \| \d + $ /,"")),Hd={variants:[{match:[/new/,td.concat(Ad,"+"),td.concat("(?!",Ud(Od).join(" \\ b|")," \\ b)"),ad],scope:{1:"keyword",4:"title.class"}}]},Wd=td.concat(nd," \\ b(?! \\ ()"),Zd={variants:[{match:[td.concat(/::/,td.lookahead(/(?!class \b )/)),Wd],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[ad,td.concat(/::/,td.lookahead(/(?!class \b )/)),Wd],scope:{1:"title.class",3:"variable.constant"}},{match:[ad,td.concat("::",td.lookahead(/(?!class \b )/))],scope:{1:"title.class"}},{match:[ad,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},zd={scope:"attr",match:td.concat(nd,td.lookahead(":"),td.lookahead(/(?!::)/))},Qd={relevance:0,begin:/ \( /,end:/ \) /,keywords:jd,contains:[zd,sd,Zd,qa.C_BLOCK_COMMENT_MODE,Sd,Dd,Hd]},Jd={relevance:0,match:[/ \b /,td.concat("(?!fn \\ b|function \\ b|",Ud(Rd).join(" \\ b|"),"|",Ud(Od).join(" \\ b|")," \\ b)"),nd,td.concat(Ad,"*"),td.lookahead(/(?= \( )/)],scope:{3:"title.function.invoke"},contains:[Qd]};Qd.contains.push(Jd);const hf=[zd,Zd,qa.C_BLOCK_COMMENT_MODE,Sd,Dd,Hd],vf={begin:td.concat(/# \[ \s */,ad),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:Ld,keyword:["new","array"]},contains:[{begi
] * ; ` ,relevance:0},{begin:"[vp][0-9]+"}]}}return smali_1=Ra,smali_1}var smalltalk_1,hasRequiredSmalltalk;function requireSmalltalk(){if(hasRequiredSmalltalk)return smalltalk_1;hasRequiredSmalltalk=1;function Ra(qa){const td="[a-z][a-zA-Z0-9_]*",rd={className:"string",begin:" \\ $ .{1}"},nd={className:"symbol",begin:"#"+qa.UNDERSCORE_IDENT_RE};return{name:"Smalltalk",aliases:["st"],keywords:["self","super","nil","true","false","thisContext"],contains:[qa.COMMENT('"','"'),qa.APOS_STRING_MODE,{className:"type",begin:" \\ b[A-Z][A-Za-z0-9_]*",relevance:0},{begin:td+":",relevance:0},qa.C_NUMBER_MODE,nd,rd,{begin:" \\ |[ ]*"+td+"([ ]+"+td+")*[ ]* \\ |",returnBegin:!0,end:/ \| /,illegal:/ \S /,contains:[{begin:"( \\ |[ ]*)?"+td}]},{begin:"# \\ (",end:" \\ )",contains:[qa.APOS_STRING_MODE,rd,qa.C_NUMBER_MODE,nd]}]}}return smalltalk_1=Ra,smalltalk_1}var sml_1,hasRequiredSml;function requireSml(){if(hasRequiredSml)return sml_1;hasRequiredSml=1;function Ra(qa){return{name:"SML (Standard ML)",aliases:["ml"],keywords:{ $ pattern:"[a-z_] \\ w*!?",keyword:"abstype and andalso as case datatype do else end eqtype exception fn fun functor handle if in include infix infixr let local nonfix of op open orelse raise rec sharing sig signature struct structure then type val with withtype where while",built_in:"array bool char exn int list option order real ref string substring vector unit word",literal:"true false NONE SOME LESS EQUAL GREATER nil"},illegal:/ \/ \/ |>>/,contains:[{className:"literal",begin:/ \[ ( \| \| )? \] | \( \) /,relevance:0},qa.COMMENT(" \\ ( \\ *"," \\ * \\ )",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[ \\ w']*"},{className:"type",begin:" ` [ A - Z ] [ \ \ w ']*"},{className:"type",begin:"\\b[A-Z][\\w' ] * ",relevance:0},{begin:" [ a - z _ ] \ \ w * '[\\w' ] * "},qa.inherit(qa.APOS_STRING_MODE,{className:" string ",relevance:0}),qa.inherit(qa.QUOTE_STRING_MODE,{illegal:null}),{className:" number ",begin:" \ \ b ( 0 [ xX ] [ a - fA - F0 - 9_ ] + [ Lln ] ? | 0 [ oO ] [ 0 - 7_ ] + [ Lln ] ? | 0 [ bB ] [ 01_ ] + [ Lln ] ? | [ 0 - 9 ] [ 0 - 9_ ] * ( [ Lln ] | ( \ \ . [ 0 - 9_ ] * ) ? ( [ eE ] [ - + ] ? [ 0 - 9_ ] + ) ? ) ? ) ",relevance:0},{begin:/[-=]>/}]}}return sml_1=Ra,sml_1}var sqf_1,hasRequiredSqf;function requireSqf(){if(hasRequiredSqf)return sqf_1;hasRequiredSqf=1;function Ra(qa){const td={className:" variable ",begin:/\b_+[a-zA-Z]\w*/},rd={className:" title ",begin:/[a-zA-Z][a-zA-Z_0-9]*_fnc_[a-zA-Z_0-9]+/},nd={className:" string ",variants:[{begin:'" ',end:' "',contains:[{begin:'" "',relevance:0}]},{begin:" '",end:"' ",contains:[{begin:" '' ",relevance:0}]}]},ad=[" break "," breakWith "," breakOut "," breakTo "," case "," catch "," continue "," continueWith "," default "," do "," else "," exit "," exitWith "," for "," forEach "," from "," if "," local "," private "," switch "," step "," then "," throw "," to "," try "," waitUntil "," while "," with "],sd=[" blufor "," civilian "," configNull "," controlNull "," displayNull "," diaryRecordNull "," east "," endl "," false "," grpNull "," independent "," lineBreak "," locationNull "," nil "," objNull "," opfor "," pi "," resistance "," scriptNull "," sideAmbientLife "," sideEmpty "," sideEnemy "," sideFriendly "," sideLogic "," sideUnknown "," taskNull "," teamMemberNull "," true "," west "],ud=[" abs "," accTime "," acos "," action "," actionIDs "," actionKeys "," actionKeysEx "," actionKeysImages "," actionKeysNames "," actionKeysNamesArray "," actionName "," actionParams "," activateAddons "," activatedAddons "," activateKey "," activeTitleEffectParams "," add3DENConnection "," add3DENEventHandler "," add3DENLayer "," addAction "," addBackpack "," addBackpackCargo "," addBackpackCargoGlobal "," addBackpackGlobal "," addBinocularItem "," addCamShake "," addCuratorAddons "," addCuratorCameraArea "," addCuratorEditableObjects "," addCuratorEditingArea "," addCuratorPoints "," addEditorObject "," addEventHandler "," addForce "," addForceGeneratorRTD "," addGoggles "," addGroupIcon "," addHandgunItem "," addHeadgear "," addItem "," addItemCargo "," addItemCargoGlobal "," addItemPool "," addItemToBackpack "," addItemToUniform "," addItemToVest "," addLiveStats "," addMagazine "," addMagazineAmmoCargo "," addMagazineCargo "," addMagazineCargoGlobal "," addMagazineGlobal "," addMagazinePool "," addMagazines "," addMagazineTurret "," addMenu "," addMenuItem "," addMissionEventHandler "," addMPEventHandler "," addMusicEventHandler "," addonFiles "," addOwnedMine "," addPlayerSc
2024-09-18 09:46:23 +08:00
] * ? "'`},{begin:`" [ ^ \ r
2024-09-25 14:23:53 +08:00
"]*" ` }]},{className:"built_in",variants:[{begin:" \\ b(abs|acos|asin|atan|atan2|atanh|ceil|cloglog|comb|cos|digamma|exp|floor|invcloglog|invlogit|ln|lnfact|lnfactorial|lngamma|log|log10|max|min|mod|reldif|round|sign|sin|sqrt|sum|tan|tanh|trigamma|trunc|betaden|Binomial|binorm|binormal|chi2|chi2tail|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|F|Fden|Ftail|gammaden|gammap|ibeta|invbinomial|invchi2|invchi2tail|invF|invFtail|invgammap|invibeta|invnchi2|invnFtail|invnibeta|invnorm|invnormal|invttail|nbetaden|nchi2|nFden|nFtail|nibeta|norm|normal|normalden|normd|npnchi2|tden|ttail|uniform|abbrev|char|index|indexnot|length|lower|ltrim|match|plural|proper|real|regexm|regexr|regexs|reverse|rtrim|string|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrtrim|strtrim|strupper|subinstr|subinword|substr|trim|upper|word|wordcount|_caller|autocode|byteorder|chop|clip|cond|e|epsdouble|epsfloat|group|inlist|inrange|irecode|matrix|maxbyte|maxdouble|maxfloat|maxint|maxlong|mi|minbyte|mindouble|minfloat|minint|minlong|missing|r|recode|replay|return|s|scalar|d|date|day|dow|doy|halfyear|mdy|month|quarter|week|year|d|daily|dofd|dofh|dofm|dofq|dofw|dofy|h|halfyearly|hofd|m|mofd|monthly|q|qofd|quarterly|tin|twithin|w|weekly|wofd|y|yearly|yh|ym|yofd|yq|yw|cholesky|colnumb|colsof|corr|det|diag|diag0cnt|el|get|hadamard|I|inv|invsym|issym|issymmetric|J|matmissing|matuniform|mreldif|nullmat|rownumb|rowsof|sweep|syminv|trace|vec|vecdiag)(?= \\ ()"}]},qa.COMMENT("^[ ]* \\ *.* $ ",!1),qa.C_LINE_COMMENT_MODE,qa.C_BLOCK_COMMENT_MODE]}}return stata_1=Ra,stata_1}var step21_1,hasRequiredStep21;function requireStep21(){if(hasRequiredStep21)return step21_1;hasRequiredStep21=1;function Ra(qa){return{name:"STEP Part 21",aliases:["p21","step","stp"],case_insensitive:!0,keywords:{ $ pattern:"[A-Z_][A-Z0-9_.]*",keyword:["HEADER","ENDSEC","DATA"]},contains:[{className:"meta",begin:"ISO-10303-21;",relevance:10},{className:"meta",begin:"END-ISO-10303-21;",relevance:10},qa.C_LINE_COMMENT_MODE,qa.C_BLOCK_COMMENT_MODE,qa.COMMENT("/ \\ * \\ *!"," \\ */"),qa.C_NUMBER_MODE,qa.inherit(qa.APOS_STRING_MODE,{illegal:null}),qa.inherit(qa.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"'",end:"'"},{className:"symbol",variants:[{begin:"#",end:" \\ d+",illegal:" \\ W"}]}]}}return step21_1=Ra,step21_1}var stylus_1,hasRequiredStylus;function requireStylus(){if(hasRequiredStylus)return stylus_1;hasRequiredStylus=1;const Ra=dd=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:dd.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4})) \b /},FUNCTION_DISPATCH:{className:"built_in",begin:/[ \w -]+(?= \( )/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/ \[ /,end:/ \] /,illegal:" $ ",contains:[dd.APOS_STRING_MODE,dd.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:dd.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),qa=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],td=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],rd=[...qa,...td],nd=["any
2024-09-18 09:46:23 +08:00
( multipart ) ? ` ,end: ` \ \ ]
2024-09-28 20:51:35 +08:00
` },{className:"string",begin:" \\ d{4}- \\ d{2}- \\ d{2}( \\ s+) \\ d{2}: \\ d{2}: \\ d{2}. \\ d+Z"},{className:"string",begin:"( \\ +|-) \\ d+"},{className:"keyword",relevance:10,variants:[{begin:"^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?) \\ s+(test)?"},{begin:"^progress(:?)( \\ s+)?(pop|push)?"},{begin:"^tags:"},{begin:"^time:"}]}]}}return subunit_1=Ra,subunit_1}var swift_1,hasRequiredSwift;function requireSwift(){if(hasRequiredSwift)return swift_1;hasRequiredSwift=1;function Ra(Zd){return Zd?typeof Zd=="string"?Zd:Zd.source:null}function qa(Zd){return td("(?=",Zd,")")}function td(...Zd){return Zd.map(Qd=>Ra(Qd)).join("")}function rd(Zd){const zd=Zd[Zd.length-1];return typeof zd=="object"&&zd.constructor===Object?(Zd.splice(Zd.length-1,1),zd):{}}function nd(...Zd){return"("+(rd(Zd).capture?"":"?:")+Zd.map(Jd=>Ra(Jd)).join("|")+")"}const ad=Zd=>td(/ \b /,Zd,/ \w $ /.test(Zd)?/ \b /:/ \B /),sd=["Protocol","Type"].map(ad),ud=["init","self"].map(ad),cd=["Any","Self"],dd=["actor","any","associatedtype","async","await",/as \? /,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate \( set \) /,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init \? /,/init!/,"inout",/internal \( set \) /,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open \( set \) /,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private \( set \) /,"private","protocol",/public \( set \) /,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try \? /,/try!/,"try","typealias",/unowned \( safe \) /,/unowned \( unsafe \) /,"unowned","var","weak","where","while","willSet"],pd=["false","nil","true"],fd=["assignment","associativity","higherThan","left","lowerThan","none","right"],Td=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],Ad=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],Sd=nd(/[/= \- +!*%<>&|^~?]/,/[ \u 00A1- \u 00A7]/,/[ \u 00A9 \u 00AB]/,/[ \u 00AC \u 00AE]/,/[ \u 00B0 \u 00B1]/,/[ \u 00B6 \u 00BB \u 00BF \u 00D7 \u 00F7]/,/[ \u 2016- \u 2017]/,/[ \u 2020- \u 2027]/,/[ \u 2030- \u 203E]/,/[ \u 2041- \u 2053]/,/[ \u 2055- \u 205E]/,/[ \u 2190- \u 23FF]/,/[ \u 2500- \u 2775]/,/[ \u 2794- \u 2BFF]/,/[ \u 2E00- \u 2E7F]/,/[ \u 3001- \u 3003]/,/[ \u 3008- \u 3020]/,/[ \u 3030]/),Dd=nd(Sd,/[ \u 0300- \u 036F]/,/[ \u 1DC0- \u 1DFF]/,/[ \u 20D0- \u 20FF]/,/[ \u FE00- \u FE0F]/,/[ \u FE20- \u FE2F]/),Ld=td(Sd,Dd,"*"),Rd=nd(/[a-zA-Z_]/,/[ \u 00A8 \u 00AA \u 00AD \u 00AF \u 00B2- \u 00B5 \u 00B7- \u 00BA]/,/[ \u 00BC- \u 00BE \u 00C0- \u 00D6 \u 00D8- \u 00F6 \u 00F8- \u 00FF]/,/[ \u 0100- \u 02FF \u 0370- \u 167F \u 1681- \u 180D \u 180F- \u 1DBF]/,/[ \u 1E00- \u 1FFF]/,/[ \u 200B- \u 200D \u 202A- \u 202E \u 203F- \u 2040 \u 2054 \u 2060- \u 206F]/,/[ \u 2070- \u 20CF \u 2100- \u 218F \u 2460- \u 24FF \u 2776- \u 2793]/,/[ \u 2C00- \u 2DFF \u 2E80- \u 2FFF]/,/[ \u 3004- \u 3007 \u 3021- \u 302F \u 3031- \u 303F \u 3040- \u D7FF]/,/[ \u F900- \u FD3D \u FD40- \u FDCF \u FDF0- \u FE1F \u FE30- \u FE44]/,/[ \u FE47- \u FEFE \u FF00- \u FFFD]/),Od=nd(Rd,/ \d /,/[ \u 0300- \u 036F \u 1DC0- \u 1DFF \u 20D0- \u 20FF \u FE20- \u FE2F]/),Md=td(Rd,Od,"*"),jd=td(/[A-Z]/,Od,"*"),Ud=["attached","autoclosure",td(/convention \( /,nd("swift","block","c"),/ \) /),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","N
2024-09-25 14:23:53 +08:00
` ).map(nd=>{const ad=nd.match(/^ \s +/);if(ad===null)return nd;const[sd]=ad;return sd.length>=rd.length?nd.slice(rd.length):nd}).join( `
` )}let _Tokenizer $ 1=class{constructor(qa){Qm(this,"options");Qm(this,"rules");Qm(this,"lexer");this.options=qa||_defaults $ 1}space(qa){const td=this.rules.block.newline.exec(qa);if(td&&td[0].length>0)return{type:"space",raw:td[0]}}code(qa){const td=this.rules.block.code.exec(qa);if(td){const rd=td[0].replace(/^(?: {1,4}| {0,3} \t )/gm,"");return{type:"code",raw:td[0],codeBlockStyle:"indented",text:this.options.pedantic?rd:rtrim $ 1(rd, `
` )}}}fences(qa){const td=this.rules.block.fences.exec(qa);if(td){const rd=td[0],nd=indentCodeCompensation $ 1(rd,td[3]||"");return{type:"code",raw:rd,lang:td[2]?td[2].trim().replace(this.rules.inline.anyPunctuation," $ 1"):td[2],text:nd}}}heading(qa){const td=this.rules.block.heading.exec(qa);if(td){let rd=td[2].trim();if(/# $ /.test(rd)){const nd=rtrim $ 1(rd,"#");(this.options.pedantic||!nd||/ $ /.test(nd))&&(rd=nd.trim())}return{type:"heading",raw:td[0],depth:td[1].length,text:rd,tokens:this.lexer.inline(rd)}}}hr(qa){const td=this.rules.block.hr.exec(qa);if(td)return{type:"hr",raw:rtrim $ 1(td[0], `
` )}}blockquote(qa){const td=this.rules.block.blockquote.exec(qa);if(td){let rd=rtrim $ 1(td[0], `
2024-09-18 09:46:23 +08:00
` ).split( `
2024-09-25 14:23:53 +08:00
` ),nd="",ad="";const sd=[];for(;rd.length>0;){let ud=!1;const cd=[];let dd;for(dd=0;dd<rd.length;dd++)if(/^ {0,3}>/.test(rd[dd]))cd.push(rd[dd]),ud=!0;else if(!ud)cd.push(rd[dd]);else break;rd=rd.slice(dd);const pd=cd.join( `
` ),fd=pd.replace(/ \n {0,3}((?:=+|-+) *)(?= \n | $ )/g, `
$1 ` ).replace(/^ {0,3}>[ \t ]?/gm,"");nd=nd? ` $ { nd }
$ { pd } ` :pd,ad=ad? ` $ { ad }
$ { fd } ` :fd;const Td=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(fd,sd,!0),this.lexer.state.top=Td,rd.length===0)break;const Ad=sd[sd.length-1];if((Ad==null?void 0:Ad.type)==="code")break;if((Ad==null?void 0:Ad.type)==="blockquote"){const Sd=Ad,Dd=Sd.raw+ `
` +rd.join( `
` ),Ld=this.blockquote(Dd);sd[sd.length-1]=Ld,nd=nd.substring(0,nd.length-Sd.raw.length)+Ld.raw,ad=ad.substring(0,ad.length-Sd.text.length)+Ld.text;break}else if((Ad==null?void 0:Ad.type)==="list"){const Sd=Ad,Dd=Sd.raw+ `
` +rd.join( `
` ),Ld=this.list(Dd);sd[sd.length-1]=Ld,nd=nd.substring(0,nd.length-Ad.raw.length)+Ld.raw,ad=ad.substring(0,ad.length-Sd.raw.length)+Ld.raw,rd=Dd.substring(sd[sd.length-1].raw.length).split( `
` );continue}}return{type:"blockquote",raw:nd,tokens:sd,text:ad}}}list(qa){let td=this.rules.block.list.exec(qa);if(td){let rd=td[1].trim();const nd=rd.length>1,ad={type:"list",raw:"",ordered:nd,start:nd?+rd.slice(0,-1):"",loose:!1,items:[]};rd=nd? ` \ \ d { 1 , 9 } \ \ $ { rd . slice ( - 1 ) } ` : ` \ \ $ { rd } ` ,this.options.pedantic&&(rd=nd?rd:"[*+-]");const sd=new RegExp( ` ^ ( { 0 , 3 } $ { rd } ) ( ( ? : [ ] [ ^ \ \ n ] * ) ? ( ? : \ \ n | $ ) ) ` );let ud=!1;for(;qa;){let cd=!1,dd="",pd="";if(!(td=sd.exec(qa))||this.rules.block.hr.test(qa))break;dd=td[0],qa=qa.substring(dd.length);let fd=td[2].split( `
` ,1)[0].replace(/^ \t +/,Rd=>" ".repeat(3*Rd.length)),Td=qa.split( `
` ,1)[0],Ad=!fd.trim(),Sd=0;if(this.options.pedantic?(Sd=2,pd=fd.trimStart()):Ad?Sd=td[1].length+1:(Sd=td[2].search(/[^ ]/),Sd=Sd>4?1:Sd,pd=fd.slice(Sd),Sd+=td[1].length),Ad&&/^[ \t ]* $ /.test(Td)&&(dd+=Td+ `
` ,qa=qa.substring(Td.length+1),cd=!0),!cd){const Rd=new RegExp( ` ^ { 0 , $ { Math . min ( 3 , Sd - 1 ) } } ( ? : [ * + - ] | \ \ d { 1 , 9 } [ . ) ] ) ( ( ? : [ ] [ ^ \ \ n ] * ) ? ( ? : \ \ n | $ ) ) ` ),Od=new RegExp( ` ^ { 0 , $ { Math . min ( 3 , Sd - 1 ) } } ( ( ? : - * ) { 3 , } | ( ? : _ * ) { 3 , } | ( ? : \ \ * * ) { 3 , } ) ( ? : \ \ n + | $ ) ` ),Md=new RegExp( ` ^ { 0 , $ { Math . min ( 3 , Sd - 1 ) } } ( ? : \ ` \` \` |~~~) ` ) , jd = new RegExp ( ` ^ {0, ${ Math . min ( 3 , Sd - 1 ) } }# ` ) , Ud = new RegExp ( ` ^ {0, ${ Math . min ( 3 , Sd - 1 ) } }<[a-z].*> ` , "i" ) ; for ( ; qa ; ) { const Hd = qa . split ( `
2024-09-28 20:51:35 +08:00
` ,1)[0];let Wd;if(Td=Hd,this.options.pedantic?(Td=Td.replace(/^ {1,4}(?=( {4})*[^ ])/g," "),Wd=Td):Wd=Td.replace(/ \t /g," "),Md.test(Td)||jd.test(Td)||Ud.test(Td)||Rd.test(Td)||Od.test(Td))break;if(Wd.search(/[^ ]/)>=Sd||!Td.trim())pd+= `
` +Wd.slice(Sd);else{if(Ad||fd.replace(/ \t /g," ").search(/[^ ]/)>=4||Md.test(fd)||jd.test(fd)||Od.test(fd))break;pd+= `
2024-09-25 14:23:53 +08:00
` +Td}!Ad&&!Td.trim()&&(Ad=!0),dd+=Hd+ `
2024-09-28 20:51:35 +08:00
` ,qa=qa.substring(Hd.length+1),fd=Wd.slice(Sd)}}ad.loose||(ud?ad.loose=!0:/ \n [ \t ]* \n [ \t ]* $ /.test(dd)&&(ud=!0));let Dd=null,Ld;this.options.gfm&&(Dd=/^ \[ [ xX] \] /.exec(pd),Dd&&(Ld=Dd[0]!=="[ ] ",pd=pd.replace(/^ \[ [ xX] \] +/,""))),ad.items.push({type:"list_item",raw:dd,task:!!Dd,checked:Ld,loose:!1,text:pd,tokens:[]}),ad.raw+=dd}ad.items[ad.items.length-1].raw=ad.items[ad.items.length-1].raw.trimEnd(),ad.items[ad.items.length-1].text=ad.items[ad.items.length-1].text.trimEnd(),ad.raw=ad.raw.trimEnd();for(let cd=0;cd<ad.items.length;cd++)if(this.lexer.state.top=!1,ad.items[cd].tokens=this.lexer.blockTokens(ad.items[cd].text,[]),!ad.loose){const dd=ad.items[cd].tokens.filter(fd=>fd.type==="space"),pd=dd.length>0&&dd.some(fd=>/ \n .* \n /.test(fd.raw));ad.loose=pd}if(ad.loose)for(let cd=0;cd<ad.items.length;cd++)ad.items[cd].loose=!0;return ad}}html(qa){const td=this.rules.block.html.exec(qa);if(td)return{type:"html",block:!0,raw:td[0],pre:td[1]==="pre"||td[1]==="script"||td[1]==="style",text:td[0]}}def(qa){const td=this.rules.block.def.exec(qa);if(td){const rd=td[1].toLowerCase().replace(/ \s +/g," "),nd=td[2]?td[2].replace(/^<(.*)> $ /," $ 1").replace(this.rules.inline.anyPunctuation," $ 1"):"",ad=td[3]?td[3].substring(1,td[3].length-1).replace(this.rules.inline.anyPunctuation," $ 1"):td[3];return{type:"def",tag:rd,raw:td[0],href:nd,title:ad}}}table(qa){const td=this.rules.block.table.exec(qa);if(!td||!/[:|]/.test(td[2]))return;const rd=splitCells $ 1(td[1]),nd=td[2].replace(/^ \| | \| * $ /g,"").split("|"),ad=td[3]&&td[3].trim()?td[3].replace(/ \n [ \t ]* $ /,"").split( `
2024-09-25 14:23:53 +08:00
` ):[],sd={type:"table",raw:td[0],header:[],align:[],rows:[]};if(rd.length===nd.length){for(const ud of nd)/^ *-+: * $ /.test(ud)?sd.align.push("right"):/^ *:-+: * $ /.test(ud)?sd.align.push("center"):/^ *:-+ * $ /.test(ud)?sd.align.push("left"):sd.align.push(null);for(let ud=0;ud<rd.length;ud++)sd.header.push({text:rd[ud],tokens:this.lexer.inline(rd[ud]),header:!0,align:sd.align[ud]});for(const ud of ad)sd.rows.push(splitCells $ 1(ud,sd.header.length).map((cd,dd)=>({text:cd,tokens:this.lexer.inline(cd),header:!1,align:sd.align[dd]})));return sd}}lheading(qa){const td=this.rules.block.lheading.exec(qa);if(td)return{type:"heading",raw:td[0],depth:td[2].charAt(0)==="="?1:2,text:td[1],tokens:this.lexer.inline(td[1])}}paragraph(qa){const td=this.rules.block.paragraph.exec(qa);if(td){const rd=td[1].charAt(td[1].length-1)=== `
` ?td[1].slice(0,-1):td[1];return{type:"paragraph",raw:td[0],text:rd,tokens:this.lexer.inline(rd)}}}text(qa){const td=this.rules.block.text.exec(qa);if(td)return{type:"text",raw:td[0],text:td[0],tokens:this.lexer.inline(td[0])}}escape(qa){const td=this.rules.inline.escape.exec(qa);if(td)return{type:"escape",raw:td[0],text:escape $ 1 $ 1(td[1])}}tag(qa){const td=this.rules.inline.tag.exec(qa);if(td)return!this.lexer.state.inLink&&/^<a /i.test(td[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^< \/ a>/i.test(td[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)( \s |>)/i.test(td[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^< \/ (pre|code|kbd|script)( \s |>)/i.test(td[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:td[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:td[0]}}link(qa){const td=this.rules.inline.link.exec(qa);if(td){const rd=td[2].trim();if(!this.options.pedantic&&/^</.test(rd)){if(!/> $ /.test(rd))return;const sd=rtrim $ 1(rd.slice(0,-1)," \\ ");if((rd.length-sd.length)%2===0)return}else{const sd=findClosingBracket $ 1(td[2],"()");if(sd>-1){const cd=(td[0].indexOf("!")===0?5:4)+td[1].length+sd;td[2]=td[2].substring(0,sd),td[0]=td[0].substring(0,cd).trim(),td[3]=""}}let nd=td[2],ad="";if(this.options.pedantic){const sd=/^([^'"]*[^ \s ]) \s +(['"])(.*) \2 /.exec(nd);sd&&(nd=sd[1],ad=sd[3])}else ad=td[3]?td[3].slice(1,-1):"";return nd=nd.trim(),/^</.test(nd)&&(this.options.pedantic&&!/> $ /.test(rd)?nd=nd.slice(1):nd=nd.slice(1,-1)),outputLink $ 1(td,{href:nd&&nd.replace(this.rules.inline.anyPunctuation," $ 1"),title:ad&&ad.replace(this.rules.inline.anyPunctuation," $ 1")},td[0],this.lexer)}}reflink(qa,td){let rd;if((rd=this.rules.inline.reflink.exec(qa))||(rd=this.rules.inline.nolink.exec(qa))){const nd=(rd[2]||rd[1]).replace(/ \s +/g," "),ad=td[nd.toLowerCase()];if(!ad){const sd=rd[0].charAt(0);return{type:"text",raw:sd,text:sd}}return outputLink $ 1(rd,ad,rd[0],this.lexer)}}emStrong(qa,td,rd=""){let nd=this.rules.inline.emStrongLDelim.exec(qa);if(!nd||nd[3]&&rd.match(/[ \p {L} \p {N}]/u))return;if(!(nd[1]||nd[2]||"")||!rd||this.rules.inline.punctuation.exec(rd)){const sd=[...nd[0]].length-1;let ud,cd,dd=sd,pd=0;const fd=nd[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(fd.lastIndex=0,td=td.slice(-1*qa.length+sd);(nd=fd.exec(td))!=null;){if(ud=nd[1]||nd[2]||nd[3]||nd[4]||nd[5]||nd[6],!ud)continue;if(cd=[...ud].length,nd[3]||nd[4]){dd+=cd;continue}else if((nd[5]||nd[6])&&sd%3&&!((sd+cd)%3)){pd+=cd;continue}if(dd-=cd,dd>0)continue;cd=Math.min(cd,cd+dd+pd);const Td=[...nd[0]][0].length,Ad=qa.slice(0,sd+nd.index+Td+cd);if(Math.min(sd,cd)%2){const Dd=Ad.slice(1,-1);return{type:"em",raw:Ad,text:Dd,tokens:this.lexer.inlineTokens(Dd)}}const Sd=Ad.slice(2,-2);return{type:"strong",raw:Ad,text:Sd,tokens:this.lexer.inlineTokens(Sd)}}}}codespan(qa){const td=this.rules.inline.code.exec(qa);if(td){let rd=td[2].replace(/ \n /g," ");const nd=/[^ ]/.test(rd),ad=/^ /.test(rd)&&/ $ /.test(rd);return nd&&ad&&(rd=rd.substring(1,rd.length-1)),rd=escape $ 1 $ 1(rd,!0),{type:"codespan",raw:td[0],text:rd}}}br(qa){const td=this.rules.inline.br.exec(qa);if(td)return{type:"br",raw:td[0]}}del(qa){const td=this.rules.inline.del.exec(qa);if(td)return{type:"del",raw:td[0],text:td[2],tokens:this.lexer.inlineTokens(td[2])}}autolink(qa){const td=this.rules.inline.autolink.exec(qa);if(td){let rd,nd;return td[2]==="@"?(rd=escape $ 1 $ 1(td[1]),nd="mailto:"+rd):(rd=escape $ 1 $ 1(td[1]),nd=rd),{type:"link",raw:td[0],text:rd,href:nd,tokens:[{type:"text",raw:rd,text:rd}]}}}url(qa){var rd;let td;if(td=this.rules.inline.url.exec(qa)){let nd,ad;if(td[2]==="@")nd=escape $ 1 $ 1(td[0]),ad="mailto:"+nd;else{let sd;do sd=td[0],td[0]=((rd=this.rules.inline._backpedal.exec(td[0]))==null?void 0:rd[0])??"";while(sd!==td[0]);nd=escape $ 1 $ 1(td[0]),td[1]==="www."?ad="http://"+td[0]:ad=td[0]}return{type:"link",raw:td[0],text:nd,href:ad,tokens:[{type:"text",raw:nd,text:nd}]}}}inlineText(qa){const td=this.rules.inline.text.exec(qa);if(td){let rd;return this.lexer.state.inRawBl
] ` ).replace("lheading",lheading $ 1).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},escape $ 3=/^ \\ ([!"# $ %&'()*+, \- ./:;<=>?@ \[ \] \\ ^_ ` { | } ~ ] ) / , inlineCode$1 = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/ , br$1 = /^( {2,}|\\)\n(?!\s*$)/ , inlineText$1 = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/ , _punctuation$1 = "\\p{P}\\p{S}" , punctuation$1 = edit$1 ( /^((?![*_])[\spunctuation])/ , "u" ) . replace ( /punctuation/g , _punctuation$1 ) . getRegex ( ) , blockSkip$1 = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g , emStrongLDelim$1 = edit$1 ( /^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/ , "u" ) . replace ( /punct/g , _punctuation$1 ) . getRegex ( ) , emStrongRDelimAst$1 = edit$1 ( "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])" , "gu" ) . replace ( /punct/g , _punctuation$1 ) . getRegex ( ) , emStrongRDelimUnd$1 = edit$1 ( "^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])" , "gu" ) . replace ( /punct/g , _punctuation$1 ) . getRegex ( ) , anyPunctuation$1 = edit$1 ( /\\([punct])/ , "gu" ) . replace ( /punct/g , _punctuation$1 ) . getRegex ( ) , autolink$1 = edit$1 ( /^<(scheme:[^\s\x00-\x1f<>]*|email)>/ ) . replace ( "scheme" , /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/ ) . replace ( "email" , /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/ ) . getRegex ( ) , _inlineComment$1 = edit$1 ( _comment$1 ) . replace ( "(?:-->|$)" , "-->" ) . getRegex ( ) , tag$1 = edit$1 ( "^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>" ) . replace ( "comment" , _inlineComment$1 ) . replace ( "attribute" , /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/ ) . getRegex ( ) , _inlineLabel$1 = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/ , link$1 = edit$1 ( /^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/ ) . replace ( "label" , _inlineLabel$1 ) . replace ( "href" , /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/ ) . replace ( "title" , /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/ ) . getRegex ( ) , reflink$1 = edit$1 ( /^!?\[(label)\]\[(ref)\]/ ) . replace ( "label" , _inlineLabel$1 ) . replace ( "ref" , _blockLabel$1 ) . getRegex ( ) , nolink$1 = edit$1 ( /^!?\[(ref)\](?:\[\])?/ ) . replace ( "ref" , _blockLabel$1 ) . getRegex ( ) , reflinkSearch$1 = edit$1 ( "reflink|nolink(?!\\()" , "g" ) . replace ( "reflink" , reflink$1 ) . replace ( "nolink" , nolink$1 ) . getRegex ( ) , inlineNormal$1 = { _backpedal : noopTest$1 , anyPunctuation : anyPunctuation$1 , autolink : autolink$1 , blockSkip : blockSkip$1 , br : br$1 , code : inlineCode$1 , del : noopTest$1 , emStrongLDelim : emStrongLDelim$1 , emStrongRDelimAst : emStrongRDelimAst$1 , emStrongRDelimUnd : emStrongRDelimUnd$1 , escape : escape$3 , link : link$1 , nolink : nolink$1 , punctuation : punctuation$1 , reflink : reflink$1 , reflinkSearch : reflinkSearch$1 , tag : tag$1 , text : inlineText$1 , url : noopTest$1 } , inlinePedantic$1 = { ... inlineNormal$1 , link : edit$1 ( /^!?\[(label)\]\((.*?)\)/ ) . replace ( "label" , _inlineLabel$1 ) . getRegex ( ) , reflink : edit$1 ( /^!?\[(label)\]\s*\[([^\]]*)\]/ ) . replace ( "label" , _inlineLabel$1 ) . getRegex ( ) } , inlineGfm$1 = { ... inlineNormal$1 , escape : edit$1 ( escape$3 ) . replace ( "])" , "~|])" ) . getRegex ( ) , url : edit$1 ( /^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/ , "i" ) . replace ( "email" , /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/ ) . getRegex ( ) , _backpedal : /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/ , del : /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/ , text : /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/ } , inlineBreaks$1 = { ... inlineGfm$1 , br : edit$1 ( br$1 ) . replace ( "{2,}" , "*" ) .
` ),this.blockTokens(qa,this.tokens);for(let td=0;td<this.inlineQueue.length;td++){const rd=this.inlineQueue[td];this.inlineTokens(rd.src,rd.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(qa,td=[],rd=!1){this.options.pedantic&&(qa=qa.replace(/ \t /g," ").replace(/^ + $ /gm,""));let nd,ad,sd;for(;qa;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(ud=>(nd=ud.call({lexer:this},qa,td))?(qa=qa.substring(nd.raw.length),td.push(nd),!0):!1))){if(nd=this.tokenizer.space(qa)){qa=qa.substring(nd.raw.length),nd.raw.length===1&&td.length>0?td[td.length-1].raw+= `
` :td.push(nd);continue}if(nd=this.tokenizer.code(qa)){qa=qa.substring(nd.raw.length),ad=td[td.length-1],ad&&(ad.type==="paragraph"||ad.type==="text")?(ad.raw+= `
` +nd.raw,ad.text+= `
` +nd.text,this.inlineQueue[this.inlineQueue.length-1].src=ad.text):td.push(nd);continue}if(nd=this.tokenizer.fences(qa)){qa=qa.substring(nd.raw.length),td.push(nd);continue}if(nd=this.tokenizer.heading(qa)){qa=qa.substring(nd.raw.length),td.push(nd);continue}if(nd=this.tokenizer.hr(qa)){qa=qa.substring(nd.raw.length),td.push(nd);continue}if(nd=this.tokenizer.blockquote(qa)){qa=qa.substring(nd.raw.length),td.push(nd);continue}if(nd=this.tokenizer.list(qa)){qa=qa.substring(nd.raw.length),td.push(nd);continue}if(nd=this.tokenizer.html(qa)){qa=qa.substring(nd.raw.length),td.push(nd);continue}if(nd=this.tokenizer.def(qa)){qa=qa.substring(nd.raw.length),ad=td[td.length-1],ad&&(ad.type==="paragraph"||ad.type==="text")?(ad.raw+= `
` +nd.raw,ad.text+= `
` +nd.raw,this.inlineQueue[this.inlineQueue.length-1].src=ad.text):this.tokens.links[nd.tag]||(this.tokens.links[nd.tag]={href:nd.href,title:nd.title});continue}if(nd=this.tokenizer.table(qa)){qa=qa.substring(nd.raw.length),td.push(nd);continue}if(nd=this.tokenizer.lheading(qa)){qa=qa.substring(nd.raw.length),td.push(nd);continue}if(sd=qa,this.options.extensions&&this.options.extensions.startBlock){let ud=1/0;const cd=qa.slice(1);let dd;this.options.extensions.startBlock.forEach(pd=>{dd=pd.call({lexer:this},cd),typeof dd=="number"&&dd>=0&&(ud=Math.min(ud,dd))}),ud<1/0&&ud>=0&&(sd=qa.substring(0,ud+1))}if(this.state.top&&(nd=this.tokenizer.paragraph(sd))){ad=td[td.length-1],rd&&(ad==null?void 0:ad.type)==="paragraph"?(ad.raw+= `
` +nd.raw,ad.text+= `
` +nd.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=ad.text):td.push(nd),rd=sd.length!==qa.length,qa=qa.substring(nd.raw.length);continue}if(nd=this.tokenizer.text(qa)){qa=qa.substring(nd.raw.length),ad=td[td.length-1],ad&&ad.type==="text"?(ad.raw+= `
` +nd.raw,ad.text+= `
` +nd.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=ad.text):td.push(nd);continue}if(qa){const ud="Infinite loop on byte: "+qa.charCodeAt(0);if(this.options.silent){console.error(ud);break}else throw new Error(ud)}}return this.state.top=!0,td}inline(qa,td=[]){return this.inlineQueue.push({src:qa,tokens:td}),td}inlineTokens(qa,td=[]){let rd,nd,ad,sd=qa,ud,cd,dd;if(this.tokens.links){const pd=Object.keys(this.tokens.links);if(pd.length>0)for(;(ud=this.tokenizer.rules.inline.reflinkSearch.exec(sd))!=null;)pd.includes(ud[0].slice(ud[0].lastIndexOf("[")+1,-1))&&(sd=sd.slice(0,ud.index)+"["+"a".repeat(ud[0].length-2)+"]"+sd.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(ud=this.tokenizer.rules.inline.blockSkip.exec(sd))!=null;)sd=sd.slice(0,ud.index)+"["+"a".repeat(ud[0].length-2)+"]"+sd.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(ud=this.tokenizer.rules.inline.anyPunctuation.exec(sd))!=null;)sd=sd.slice(0,ud.index)+"++"+sd.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;qa;)if(cd||(dd=""),cd=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(pd=>(rd=pd.call({lexer:this},qa,td))?(qa=qa.substring(rd.raw.length),td.push(rd),!0):!1))){if(rd=this.tokenizer.escape(qa)){qa=qa.substring(rd.raw.length),td.push(rd);continue}if(rd=this.tokenizer.tag(qa)){qa=qa.substring(rd.raw.length),nd=td[td.length-1],nd&&rd.type==="text"&&nd.type==="text"?(nd.raw+=rd.raw,nd.text+=rd.text):td.push(rd);continue}if(rd=this.tokenizer.link(qa)){qa=qa.substring(rd.raw.length),td.push(rd);continue}if(rd=this.tokenizer.reflink(qa,this.tokens.links)){qa=qa.substring(rd.raw.length),nd=td[td.length-1],nd&&rd.type==="text"&&nd.type==="text"?(nd.raw+=rd.raw,nd.text+=rd.text):td.push(rd);continue}if(rd=this.tokenizer.emStrong(qa,sd,dd)){qa=qa.substring(rd.raw.length),td.push(rd);continue}if(rd=this.tokenizer.codespan(qa)){qa=qa.substring(rd.raw.length),td.push(rd);continue}if(rd=this.tokenizer.br(qa)){qa=qa.substring(rd.raw.length),td.push(rd);continue}if(rd=this.tokenizer.del(qa)){qa=qa.substring(rd.raw.length),td.push(rd);continue}if(rd=this.tokenizer.autolink(qa)){qa=qa.substring(rd.raw.length),td.push(rd);continue}if(!this.state.inLink&&(rd=this.tokenizer.url(qa))){qa=qa.substring(rd.raw.length),td.push(rd);continue}if(ad=qa,this.options.extensions&&this.options.extensions.startInline){let pd=1/0;const fd=qa.slice(1);let Td;this.options.extensions.startInline.forEach(Ad=>{Td=Ad.call({lexer:this},fd),typeof Td=="number"&&Td>=0&&(pd=Math.min(pd,Td))}),pd<1/0&&pd>=0&&(ad=qa.substring(0,pd+1))}if(rd=this.tokenizer.inlineText(ad)){qa=qa.substring(rd.raw.length),rd.raw.slice(-1)!=="_"&&(dd=rd.raw.slice(-1)),cd=!0,nd=td[td.length-1],nd&&nd.type==="text"?(nd.raw+=rd.raw,nd.text+=rd.text):td.push(rd);continue}if(qa){const pd="Infinite loop on byte: "+qa.charCodeAt(0);if(this.options.silent){console.error(pd);break}else throw new Error(pd)}}return td}},_Renderer $ 1=class{constructor(qa){Qm(this,"options");Qm(this,"parser");this.options=qa||_defaults $ 1}space(qa){return""}code({text:qa,lang:td,escaped:rd}){var sd;const nd=(sd=(td||"").match(/^ \S */))==null?void 0:sd[0],ad=qa.replace(/ \n $ /,"")+ `
` ;return nd?'<pre><code class="language-'+escape $ 1 $ 1(nd)+'">'+(rd?ad:escape $ 1 $ 1(ad,!0))+ ` < / c o d e > < / p r e >
` :"<pre><code>"+(rd?ad:escape $ 1 $ 1(ad,!0))+ ` < / c o d e > < / p r e >
2024-09-18 09:46:23 +08:00
` }blockquote({tokens:qa}){return ` < blockquote >
$ { this . parser . parse ( qa ) } < / b l o c k q u o t e >
2024-09-25 14:23:53 +08:00
` }html({text:qa}){return qa}heading({tokens:qa,depth:td}){return ` < h$ { td } > $ { this . parser . parseInline ( qa ) } < / h $ { t d } >
2024-09-18 09:46:23 +08:00
` }hr(qa){return ` < hr >
2024-09-25 14:23:53 +08:00
` }list(qa){const td=qa.ordered,rd=qa.start;let nd="";for(let ud=0;ud<qa.items.length;ud++){const cd=qa.items[ud];nd+=this.listitem(cd)}const ad=td?"ol":"ul",sd=td&&rd!==1?' start="'+rd+'"':"";return"<"+ad+sd+ ` >
` +nd+"</"+ad+ ` >
` }listitem(qa){let td="";if(qa.task){const rd=this.checkbox({checked:!!qa.checked});qa.loose?qa.tokens.length>0&&qa.tokens[0].type==="paragraph"?(qa.tokens[0].text=rd+" "+qa.tokens[0].text,qa.tokens[0].tokens&&qa.tokens[0].tokens.length>0&&qa.tokens[0].tokens[0].type==="text"&&(qa.tokens[0].tokens[0].text=rd+" "+qa.tokens[0].tokens[0].text)):qa.tokens.unshift({type:"text",raw:rd+" ",text:rd+" "}):td+=rd+" "}return td+=this.parser.parse(qa.tokens,!!qa.loose), ` < li > $ { td } < / l i >
2024-09-18 09:46:23 +08:00
` }checkbox({checked:qa}){return"<input "+(qa?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:qa}){return ` < p > $ { this . parser . parseInline ( qa ) } < / p >
2024-09-25 14:23:53 +08:00
` }table(qa){let td="",rd="";for(let ad=0;ad<qa.header.length;ad++)rd+=this.tablecell(qa.header[ad]);td+=this.tablerow({text:rd});let nd="";for(let ad=0;ad<qa.rows.length;ad++){const sd=qa.rows[ad];rd="";for(let ud=0;ud<sd.length;ud++)rd+=this.tablecell(sd[ud]);nd+=this.tablerow({text:rd})}return nd&&(nd= ` < tbody > $ { nd } < / t b o d y > ` ) , ` < t a b l e >
2024-09-18 09:46:23 +08:00
< thead >
2024-09-25 14:23:53 +08:00
` +td+ ` < / t h e a d >
` +nd+ ` < / t a b l e >
2024-09-18 09:46:23 +08:00
` }tablerow({text:qa}){return ` < tr >
$ { qa } < / t r >
2024-09-25 14:23:53 +08:00
` }tablecell(qa){const td=this.parser.parseInline(qa.tokens),rd=qa.header?"th":"td";return(qa.align? ` < $ { rd } align = "${qa.align}" > ` : ` < $ { rd } > ` )+td+ ` < / $ { r d } >
` }strong({tokens:qa}){return ` < strong > $ { this . parser . parseInline ( qa ) } < / s t r o n g > ` } e m ( { t o k e n s : q a } ) { r e t u r n ` < e m > $ { t h i s . p a r s e r . p a r s e I n l i n e ( q a ) } < / e m > ` } c o d e s p a n ( { t e x t : q a } ) { r e t u r n ` < c o d e > $ { q a } < / c o d e > ` } b r ( q a ) { r e t u r n " < b r > " } d e l ( { t o k e n s : q a } ) { r e t u r n ` < d e l > $ { t h i s . p a r s e r . p a r s e I n l i n e ( q a ) } < / d e l > ` } l i n k ( { h r e f : q a , t i t l e : t d , t o k e n s : r d } ) { c o n s t n d = t h i s . p a r s e r . p a r s e I n l i n e ( r d ) , a d = c l e a n U r l $ 1 ( q a ) ; i f ( a d = = = n u l l ) r e t u r n n d ; q a = a d ; l e t s d = ' < a h r e f = " ' + q a + ' " ' ; r e t u r n t d & & ( s d + = ' t i t l e = " ' + t d + ' " ' ) , s d + = " > " + n d + " < / a > " , s d } i m a g e ( { h r e f : q a , t i t l e : t d , t e x t : r d } ) { c o n s t n d = c l e a n U r l $ 1 ( q a ) ; i f ( n d = = = n u l l ) r e t u r n r d ; q a = n d ; l e t a d = ` < i m g s r c = " $ { q a } " a l t = " $ { r d } " ` ; r e t u r n t d & & ( a d + = ` t i t l e = " $ { t d } " ` ) , a d + = " > " , a d } t e x t ( q a ) { r e t u r n " t o k e n s " i n q a & & q a . t o k e n s ? t h i s . p a r s e r . p a r s e I n l i n e ( q a . t o k e n s ) : q a . t e x t } } , _ T e x t R e n d e r e r $ 1 = c l a s s { s t r o n g ( { t e x t : q a } ) { r e t u r n q a } e m ( { t e x t : q a } ) { r e t u r n q a } c o d e s p a n ( { t e x t : q a } ) { r e t u r n q a } d e l ( { t e x t : q a } ) { r e t u r n q a } h t m l ( { t e x t : q a } ) { r e t u r n q a } t e x t ( { t e x t : q a } ) { r e t u r n q a } l i n k ( { t e x t : q a } ) { r e t u r n " " + q a } i m a g e ( { t e x t : q a } ) { r e t u r n " " + q a } b r ( ) { r e t u r n " " } } , _ P a r s e r $ 1 = c l a s s S 2 { c o n s t r u c t o r ( q a ) { Q m ( t h i s , " o p t i o n s " ) ; Q m ( t h i s , " r e n d e r e r " ) ; Q m ( t h i s , " t e x t R e n d e r e r " ) ; t h i s . o p t i o n s = q a | | _ d e f a u l t s $ 1 , t h i s . o p t i o n s . r e n d e r e r = t h i s . o p t i o n s . r e n d e r e r | | n e w _ R e n d e r e r $ 1 , t h i s . r e n d e r e r = t h i s . o p t i o n s . r e n d e r e r , t h i s . r e n d e r e r . o p t i o n s = t h i s . o p t i o n s , t h i s . r e n d e r e r . p a r s e r = t h i s , t h i s . t e x t R e n d e r e r = n e w _ T e x t R e n d e r e r $ 1 } s t a t i c p a r s e ( q a , t d ) { r e t u r n n e w S 2 ( t d ) . p a r s e ( q a ) } s t a t i c p a r s e I n l i n e ( q a , t d ) { r e t u r n n e w S 2 ( t d ) . p a r s e I n l i n e ( q a ) } p a r s e ( q a , t d = ! 0 ) { l e t r d = " " ; f o r ( l e t n d = 0 ; n d < q a . l e n g t h ; n d + + ) { c o n s t a d = q a [ n d ] ; i f ( t h i s . o p t i o n s . e x t e n s i o n s & & t h i s . o p t i o n s . e x t e n s i o n s . r e n d e r e r s & & t h i s . o p t i o n s . e x t e n s i o n s . r e n d e r e r s [ a d . t y p e ] ) { c o n s t u d = a d , c d = t h i s . o p t i o n s . e x t e n s i o n s . r e n d e r e r s [ u d . t y p e ] . c a l l ( { p a r s e r : t h i s } , u d ) ; i f ( c d ! = = ! 1 | | ! [ " s p a c e " , " h r " , " h e a d i n g " , " c o d e " , " t a b l e " , " b l o c k q u o t e " , " l i s t " , " h t m l " , " p a r a g r a p h " , " t e x t " ] . i n c l u d e s ( u d . t y p e ) ) { r d + = c d | | " " ; c o n t i n u e } } c o n s t s d = a d ; s w i t c h ( s d . t y p e ) { c a s e " s p a c e " : { r d + = t h i s . r e n d e r e r . s p a c e ( s d ) ; c o n t i n u e } c a s e " h r " : { r d + = t h i s . r e n d e r e r . h r ( s d ) ; c o n t i n u e } c a s e " h e a d i n g " : { r d + = t h i s . r e n d e r e r . h e a d i n g ( s d ) ; c o n t i n u e } c a s e " c o d e " : { r d + = t h i s . r e n d e r e r . c o d e ( s d ) ; c o n t i n u e } c a s e " t a b l e " : { r d + = t h i s . r e n d e r e r . t a b l e ( s d ) ; c o n t i n u e } c a s e " b l o c k q u o t e " : { r d + = t h i s . r e n d e r e r . b l o c k q u o t e ( s d ) ; c o n t i n u e } c a s e " l i s t " : { r d + = t h i s . r e n d e r e r . l i s t ( s d ) ; c o n t i n u e } c a s e " h t m l " : { r d + = t h i s . r e n d e r e r . h t m l ( s d ) ; c o n t i n u e } c a s e " p a r a g r a p h " : { r d + = t h i s . r e n d e r e r . p a r a g r a p h ( s d ) ; c o n t i n u e } c a s e " t e x t " : { l e t u d = s d , c d = t h i s . r e n d e r e r . t e x t ( u d ) ; f o r ( ; n d + 1 < q a . l e n g t h & & q a [ n d + 1 ] . t y p e = = = " t e x t " ; ) u d = q a [ + + n d ] , c d + = `
` +this.renderer.text(ud);td?rd+=this.renderer.paragraph({type:"paragraph",raw:cd,text:cd,tokens:[{type:"text",raw:cd,text:cd}]}):rd+=cd;continue}default:{const ud='Token with "'+sd.type+'" type was not found.';if(this.options.silent)return console.error(ud),"";throw new Error(ud)}}}return rd}parseInline(qa,td){td=td||this.renderer;let rd="";for(let nd=0;nd<qa.length;nd++){const ad=qa[nd];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[ad.type]){const ud=this.options.extensions.renderers[ad.type].call({parser:this},ad);if(ud!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(ad.type)){rd+=ud||"";continue}}const sd=ad;switch(sd.type){case"escape":{rd+=td.text(sd);break}case"html":{rd+=td.html(sd);break}case"link":{rd+=td.link(sd);break}case"image":{rd+=td.image(sd);break}case"strong":{rd+=td.strong(sd);break}case"em":{rd+=td.em(sd);break}case"codespan":{rd+=td.codespan(sd);break}case"br":{rd+=td.br(sd);break}case"del":{rd+=td.del(sd);break}case"text":{rd+=td.text(sd);break}default:{const ud='Token with "'+sd.type+'" type was not found.';if(this.options.silent)return console.error(ud),"";throw new Error(ud)}}}return rd}};var E2;let _Hooks $ 1=(E2=class{constructor(qa){Qm(this,"options");Qm(this,"block");this.options=qa||_defaults $ 1}preprocess(qa){return qa}postprocess(qa){return qa}processAllTokens(qa){return qa}provideLexer(){return this.block?_Lexer $ 1.lex:_Lexer $ 1.lexInline}provideParser(){return this.block?_Parser $ 1.parse:_Parser $ 1.parseInline}},Qm(E2,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),E2),Marked $ 1=class{constructor(...qa){Qm(this,"defaults",_getDefaults $ 1());Qm(this,"options",this.setOptions);Qm(this,"parse",this.parseMarkdown(!0));Qm(this,"parseInline",this.parseMarkdown(!1));Qm(this,"Parser",_Parser $ 1);Qm(this,"Renderer",_Renderer $ 1);Qm(this,"TextRenderer",_TextRenderer $ 1);Qm(this,"Lexer",_Lexer $ 1);Qm(this,"Tokenizer",_Tokenizer $ 1);Qm(this,"Hooks",_Hooks $ 1);this.use(...qa)}walkTokens(qa,td){var nd,ad;let rd=[];for(const sd of qa)switch(rd=rd.concat(td.call(this,sd)),sd.type){case"table":{const ud=sd;for(const cd of ud.header)rd=rd.concat(this.walkTokens(cd.tokens,td));for(const cd of ud.rows)for(const dd of cd)rd=rd.concat(this.walkTokens(dd.tokens,td));break}case"list":{const ud=sd;rd=rd.concat(this.walkTokens(ud.items,td));break}default:{const ud=sd;(ad=(nd=this.defaults.extensions)==null?void 0:nd.childTokens)!=null&&ad[ud.type]?this.defaults.extensions.childTokens[ud.type].forEach(cd=>{const dd=ud[cd].flat(1/0);rd=rd.concat(this.walkTokens(dd,td))}):ud.tokens&&(rd=rd.concat(this.walkTokens(ud.tokens,td)))}}return rd}use(...qa){const td=this.defaults.extensions||{renderers:{},childTokens:{}};return qa.forEach(rd=>{const nd={...rd};if(nd.async=this.defaults.async||nd.async||!1,rd.extensions&&(rd.extensions.forEach(ad=>{if(!ad.name)throw new Error("extension name required");if("renderer"in ad){const sd=td.renderers[ad.name];sd?td.renderers[ad.name]=function(...ud){let cd=ad.renderer.apply(this,ud);return cd===!1&&(cd=sd.apply(this,ud)),cd}:td.renderers[ad.name]=ad.renderer}if("tokenizer"in ad){if(!ad.level||ad.level!=="block"&&ad.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const sd=td[ad.level];sd?sd.unshift(ad.tokenizer):td[ad.level]=[ad.tokenizer],ad.start&&(ad.level==="block"?td.startBlock?td.startBlock.push(ad.start):td.startBlock=[ad.start]:ad.level==="inline"&&(td.startInline?td.startInline.push(ad.start):td.startInline=[ad.start]))}"childTokens"in ad&&ad.childTokens&&(td.childTokens[ad.name]=ad.childTokens)}),nd.extensions=td),rd.renderer){const ad=this.defaults.renderer||new _Renderer $ 1(this.defaults);for(const sd in rd.renderer){if(!(sd in ad))throw new Error( ` renderer '${sd}' does not exist ` );if(["options","parser"].includes(sd))continue;const ud=sd,cd=rd.renderer[ud],dd=ad[ud];ad[ud]=(...pd)=>{let fd=cd.apply(ad,pd);return fd===!1&&(fd=dd.apply(ad,pd)),fd||""}}nd.renderer=ad}if(rd.tokenizer){const ad=this.defaults.tokenizer||new _Tokenizer $ 1(
2024-09-28 20:51:35 +08:00
Please report this to https : //github.com/markedjs/marked.`,qa){const nd="<p>An error occurred:</p><pre>"+escape$1$1(rd.message+"",!0)+"</pre>";return td?Promise.resolve(nd):nd}if(td)return Promise.reject(rd);throw rd}}};const markedInstance$1=new Marked$1;function marked$1(Ra,qa){return markedInstance$1.parse(Ra,qa)}marked$1.options=marked$1.setOptions=function(Ra){return markedInstance$1.setOptions(Ra),marked$1.defaults=markedInstance$1.defaults,changeDefaults$1(marked$1.defaults),marked$1};marked$1.getDefaults=_getDefaults$1;marked$1.defaults=_defaults$1;marked$1.use=function(...Ra){return markedInstance$1.use(...Ra),marked$1.defaults=markedInstance$1.defaults,changeDefaults$1(marked$1.defaults),marked$1};marked$1.walkTokens=function(Ra,qa){return markedInstance$1.walkTokens(Ra,qa)};marked$1.parseInline=markedInstance$1.parseInline;marked$1.Parser=_Parser$1;marked$1.parser=_Parser$1.parse;marked$1.Renderer=_Renderer$1;marked$1.TextRenderer=_TextRenderer$1;marked$1.Lexer=_Lexer$1;marked$1.lexer=_Lexer$1.lex;marked$1.Tokenizer=_Tokenizer$1;marked$1.Hooks=_Hooks$1;marked$1.parse=marked$1;marked$1.options;marked$1.setOptions;marked$1.use;marked$1.walkTokens;marked$1.parseInline;_Parser$1.parse;_Lexer$1.lex;const scriptRel="modulepreload",assetsURL=function(Ra){return"/md/"+Ra},seen={},__vitePreload=function(qa,td,rd){let nd=Promise.resolve();if(td&&td.length>0){document.getElementsByTagName("link");const sd=document.querySelector("meta[property=csp-nonce]"),ud=(sd==null?void 0:sd.nonce)||(sd==null?void 0:sd.getAttribute("nonce"));nd=Promise.allSettled(td.map(cd=>{if(cd=assetsURL(cd),cd in seen)return;seen[cd]=!0;const dd=cd.endsWith(".css"),pd=dd?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${cd}"]${pd}`))return;const fd=document.createElement("link");if(fd.rel=dd?"stylesheet":scriptRel,dd||(fd.as="script"),fd.crossOrigin="",fd.href=cd,ud&&fd.setAttribute("nonce",ud),document.head.appendChild(fd),dd)return new Promise((Td,Ad)=>{fd.addEventListener("load",Td),fd.addEventListener("error",()=>Ad(new Error(`Unable to preload CSS for ${cd}`)))})}))}function ad(sd){const ud=new Event("vite:preloadError",{cancelable:!0});if(ud.payload=sd,window.dispatchEvent(ud),!ud.defaultPrevented)throw sd}return nd.then(sd=>{for(const ud of sd||[])ud.status==="rejected"&&ad(ud.reason);return qa().catch(ad)})},Channel={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:Ra=>Ra>=255?255:Ra<0?0:Ra,g:Ra=>Ra>=255?255:Ra<0?0:Ra,b:Ra=>Ra>=255?255:Ra<0?0:Ra,h:Ra=>Ra%360,s:Ra=>Ra>=100?100:Ra<0?0:Ra,l:Ra=>Ra>=100?100:Ra<0?0:Ra,a:Ra=>Ra>=1?1:Ra<0?0:Ra},toLinear:Ra=>{const qa=Ra/255;return Ra>.03928?Math.pow((qa+.055)/1.055,2.4):qa/12.92},hue2rgb:(Ra,qa,td)=>(td<0&&(td+=1),td>1&&(td-=1),td<1/6?Ra+(qa-Ra)*6*td:td<1/2?qa:td<2/3?Ra+(qa-Ra)*(2/3-td)*6:Ra),hsl2rgb:({h:Ra,s:qa,l:td},rd)=>{if(!qa)return td*2.55;Ra/=360,qa/=100,td/=100;const nd=td<.5?td*(1+qa):td+qa-td*qa,ad=2*td-nd;switch(rd){case"r":return Channel.hue2rgb(ad,nd,Ra+1/3)*255;case"g":return Channel.hue2rgb(ad,nd,Ra)*255;case"b":return Channel.hue2rgb(ad,nd,Ra-1/3)*255}},rgb2hsl:({r:Ra,g:qa,b:td},rd)=>{Ra/=255,qa/=255,td/=255;const nd=Math.max(Ra,qa,td),ad=Math.min(Ra,qa,td),sd=(nd+ad)/2;if(rd==="l")return sd*100;if(nd===ad)return 0;const ud=nd-ad,cd=sd>.5?ud/(2-nd-ad):ud/(nd+ad);if(rd==="s")return cd*100;switch(nd){case Ra:return((qa-td)/ud+(qa<td?6:0))*60;case qa:return((td-Ra)/ud+2)*60;case td:return((Ra-qa)/ud+4)*60;default:return-1}}},Lang={clamp:(Ra,qa,td)=>qa>td?Math.min(qa,Math.max(td,Ra)):Math.min(td,Math.max(qa,Ra)),round:Ra=>Math.round(Ra*1e10)/1e10},Unit={dec2hex:Ra=>{const qa=Math.round(Ra).toString(16);return qa.length>1?qa:`0${qa}`}},Utils={channel:Channel,lang:Lang,unit:Unit},DEC2HEX={};for(let Ra=0;Ra<=255;Ra++)DEC2HEX[Ra]=Utils.unit.dec2hex(Ra);const TYPE={ALL:0,RGB:1,HSL:2};class Type{constructor(){this.type=TYPE.ALL}get(){return this.type}set(qa){if(this.type&&this.type!==qa)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=qa}reset(){this.type=TYPE.ALL}is(qa){return this.type===qa}}class Chan
` +S_),Wf&&arrayForEach([hf,vf,Tf],w_=>{S_=stringReplace(S_,w_," ")}),jd&&jf?jd.createHTML(S_):S_},qa.setConfig=function(){let Rh=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};A_(Rh),lh=!0},qa.clearConfig=function(){e_=null,lh=!1},qa.isValidAttribute=function(Rh,mh,im){e_||A_({});const fm=Pm(Rh),Gm=Pm(mh);return dh(fm,Gm,im)},qa.addHook=function(Rh,mh){typeof mh=="function"&&(Jd[Rh]=Jd[Rh]||[],arrayPush(Jd[Rh],mh))},qa.removeHook=function(Rh){if(Jd[Rh])return arrayPop(Jd[Rh])},qa.removeHooks=function(Rh){Jd[Rh]&&(Jd[Rh]=[])},qa.removeAllHooks=function(){Jd={}},qa}var purify=createDOMPurify(),__defProp=Object.defineProperty,__name=(Ra,qa)=>__defProp(Ra,"name",{value:qa,configurable:!0}),__export=(Ra,qa)=>{for(var td in qa)__defProp(Ra,td,{get:qa[td],enumerable:!0})},LEVELS={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},log $ 1={trace:__name((...Ra)=>{},"trace"),debug:__name((...Ra)=>{},"debug"),info:__name((...Ra)=>{},"info"),warn:__name((...Ra)=>{},"warn"),error:__name((...Ra)=>{},"error"),fatal:__name((...Ra)=>{},"fatal")},setLogLevel=__name(function(Ra="fatal"){let qa=LEVELS.fatal;typeof Ra=="string"?Ra.toLowerCase()in LEVELS&&(qa=LEVELS[Ra]):typeof Ra=="number"&&(qa=Ra),log $ 1.trace=()=>{},log $ 1.debug=()=>{},log $ 1.info=()=>{},log $ 1.warn=()=>{},log $ 1.error=()=>{},log $ 1.fatal=()=>{},qa<=LEVELS.fatal&&(log $ 1.fatal=console.error?console.error.bind(console,format $ 1("FATAL"),"color: orange"):console.log.bind(console," \x 1B[35m",format $ 1("FATAL"))),qa<=LEVELS.error&&(log $ 1.error=console.error?console.error.bind(console,format $ 1("ERROR"),"color: orange"):console.log.bind(console," \x 1B[31m",format $ 1("ERROR"))),qa<=LEVELS.warn&&(log $ 1.warn=console.warn?console.warn.bind(console,format $ 1("WARN"),"color: orange"):console.log.bind(console," \x 1B[33m",format $ 1("WARN"))),qa<=LEVELS.info&&(log $ 1.info=console.info?console.info.bind(console,format $ 1("INFO"),"color: lightblue"):console.log.bind(console," \x 1B[34m",format $ 1("INFO"))),qa<=LEVELS.debug&&(log $ 1.debug=console.debug?console.debug.bind(console,format $ 1("DEBUG"),"color: lightgreen"):console.log.bind(console," \x 1B[32m",format $ 1("DEBUG"))),qa<=LEVELS.trace&&(log $ 1.trace=console.debug?console.debug.bind(console,format $ 1("TRACE"),"color: lightgreen"):console.log.bind(console," \x 1B[32m",format $ 1("TRACE")))},"setLogLevel"),format $ 1=__name(Ra=> ` % c$ { dayjs2 ( ) . format ( "ss.SSS" ) } : $ { Ra } : ` ,"format"),frontMatterRegex=/^-{3} \s *[ \n \r ](.*?)[ \n \r ]-{3} \s *[ \n \r ]+/s,directiveRegex=/%{2}{ \s *(?:( \w +) \s *:|( \w +)) \s *(?:( \w +)|((?:(?!}%{2}).| \r ? \n )*))? \s *(?:}%{2})?/gi,anyCommentRegex=/ \s *%%.* \n /gm,sy,UnknownDiagramError=(sy=class extends Error{constructor(qa){super(qa),this.name="UnknownDiagramError"}},__name(sy,"UnknownDiagramError"),sy),detectors={},detectType=__name(function(Ra,qa){Ra=Ra.replace(frontMatterRegex,"").replace(directiveRegex,"").replace(anyCommentRegex, `
2024-09-25 14:23:53 +08:00
` );for(const[td,{detector:rd}]of Object.entries(detectors))if(rd(Ra,qa))return td;throw new UnknownDiagramError( ` No diagram type detected matching given configuration for text : $ { Ra } ` )},"detectType"),registerLazyLoadedDiagrams=__name((...Ra)=>{for(const{id:qa,detector:td,loader:rd}of Ra)addDetector(qa,td,rd)},"registerLazyLoadedDiagrams"),addDetector=__name((Ra,qa,td)=>{detectors[Ra]&&log $ 1.warn( ` Detector with key $ { Ra } already exists . Overwriting . ` ),detectors[Ra]={detector:qa,loader:td},log $ 1.debug( ` Detector with key $ { Ra } added$ { td ? " with loader" : "" } ` )},"addDetector"),getDiagramLoader=__name(Ra=>detectors[Ra].loader,"getDiagramLoader"),assignWithDepth=__name((Ra,qa,{depth:td=2,clobber:rd=!1}={})=>{const nd={depth:td,clobber:rd};return Array.isArray(qa)&&!Array.isArray(Ra)?(qa.forEach(ad=>assignWithDepth(Ra,ad,nd)),Ra):Array.isArray(qa)&&Array.isArray(Ra)?(qa.forEach(ad=>{Ra.includes(ad)||Ra.push(ad)}),Ra):Ra===void 0||td<=0?Ra!=null&&typeof Ra=="object"&&typeof qa=="object"?Object.assign(Ra,qa):qa:(qa!==void 0&&typeof Ra=="object"&&typeof qa=="object"&&Object.keys(qa).forEach(ad=>{typeof qa[ad]=="object"&&(Ra[ad]===void 0||typeof Ra[ad]=="object")?(Ra[ad]===void 0&&(Ra[ad]=Array.isArray(qa[ad])?[]:{}),Ra[ad]=assignWithDepth(Ra[ad],qa[ad],{depth:td-1,clobber:rd})):(rd||typeof Ra[ad]!="object"&&typeof qa[ad]!="object")&&(Ra[ad]=qa[ad])}),Ra)},"assignWithDepth"),assignWithDepth_default=assignWithDepth,oldAttributeBackgroundColorOdd="#ffffff",oldAttributeBackgroundColorEven="#f2f2f2",mkBorder=__name((Ra,qa)=>qa?adjust(Ra,{s:-40,l:10}):adjust(Ra,{s:-40,l:-10}),"mkBorder"),oy,Theme=(oy=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var td,rd,nd,ad,sd,ud,cd,dd,pd,fd,Td;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||adjust(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||adjust(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mkBorder(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mkBorder(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mkBorder(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||invert(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||invert(this.tertiaryColor),this.lineColor=this.lineColor||invert(this.background),this.arrowheadColor=this.arrowheadColor||invert(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?darken(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextCo
font - family : $ { td . fontFamily } ;
font - size : $ { td . fontSize } ;
fill : $ { td . textColor }
2024-09-18 09:46:23 +08:00
}
/* Classes common for multiple diagrams */
& . error - icon {
2024-09-25 14:23:53 +08:00
fill : $ { td . errorBkgColor } ;
2024-09-18 09:46:23 +08:00
}
& . error - text {
2024-09-25 14:23:53 +08:00
fill : $ { td . errorTextColor } ;
stroke : $ { td . errorTextColor } ;
2024-09-18 09:46:23 +08:00
}
& . edge - thickness - normal {
stroke - width : 1 px ;
}
& . edge - thickness - thick {
stroke - width : 3.5 px
}
& . edge - pattern - solid {
stroke - dasharray : 0 ;
}
& . edge - thickness - invisible {
stroke - width : 0 ;
fill : none ;
}
& . edge - pattern - dashed {
stroke - dasharray : 3 ;
}
. edge - pattern - dotted {
stroke - dasharray : 2 ;
}
& . marker {
2024-09-25 14:23:53 +08:00
fill : $ { td . lineColor } ;
stroke : $ { td . lineColor } ;
2024-09-18 09:46:23 +08:00
}
& . marker . cross {
2024-09-25 14:23:53 +08:00
stroke : $ { td . lineColor } ;
2024-09-18 09:46:23 +08:00
}
& svg {
2024-09-25 14:23:53 +08:00
font - family : $ { td . fontFamily } ;
font - size : $ { td . fontSize } ;
2024-09-18 09:46:23 +08:00
}
& p {
margin : 0
}
2024-09-25 14:23:53 +08:00
$ { rd }
2024-09-18 09:46:23 +08:00
$ { qa }
` },"getStyles"),addStylesForDiagram=__name((Ra,qa)=>{qa!==void 0&&(themes[Ra]=qa)},"addStylesForDiagram"),styles_default=getStyles $ 1,commonDb_exports={};__export(commonDb_exports,{clear:()=>clear $ 1,getAccDescription:()=>getAccDescription,getAccTitle:()=>getAccTitle,getDiagramTitle:()=>getDiagramTitle,setAccDescription:()=>setAccDescription,setAccTitle:()=>setAccTitle,setDiagramTitle:()=>setDiagramTitle});var accTitle="",diagramTitle="",accDescription="",sanitizeText2=__name(Ra=>sanitizeText(Ra,getConfig $ 1()),"sanitizeText"),clear $ 1=__name(()=>{accTitle="",accDescription="",diagramTitle=""},"clear"),setAccTitle=__name(Ra=>{accTitle=sanitizeText2(Ra).replace(/^ \s +/g,"")},"setAccTitle"),getAccTitle=__name(()=>accTitle,"getAccTitle"),setAccDescription=__name(Ra=>{accDescription=sanitizeText2(Ra).replace(/ \n \s +/g, `
2024-09-25 14:23:53 +08:00
` )},"setAccDescription"),getAccDescription=__name(()=>accDescription,"getAccDescription"),setDiagramTitle=__name(Ra=>{diagramTitle=sanitizeText2(Ra)},"setDiagramTitle"),getDiagramTitle=__name(()=>diagramTitle,"getDiagramTitle"),log2=log $ 1,setLogLevel2=setLogLevel,getConfig2=getConfig $ 1,setConfig2=setConfig,defaultConfig2=defaultConfig,sanitizeText3=__name(Ra=>sanitizeText(Ra,getConfig2()),"sanitizeText"),setupGraphViewbox2=setupGraphViewbox,getCommonDb=__name(()=>commonDb_exports,"getCommonDb"),diagrams={},registerDiagram=__name((Ra,qa,td)=>{var rd;diagrams[Ra]&&log2.warn( ` Diagram with id $ { Ra } already registered . Overwriting . ` ),diagrams[Ra]=qa,td&&addDetector(Ra,td),addStylesForDiagram(Ra,qa.styles),(rd=qa.injectUtils)==null||rd.call(qa,log2,setLogLevel2,getConfig2,sanitizeText3,setupGraphViewbox2,getCommonDb(),()=>{})},"registerDiagram"),getDiagram=__name(Ra=>{if(Ra in diagrams)return diagrams[Ra];throw new DiagramNotFoundError(Ra)},"getDiagram"),Ay,DiagramNotFoundError=(Ay=class extends Error{constructor(qa){super( ` Diagram $ { qa } not found . ` )}},__name(Ay,"DiagramNotFoundError"),Ay);const defaultIconDimensions=Object.freeze({left:0,top:0,width:16,height:16}),defaultIconTransformations=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),defaultIconProps=Object.freeze({...defaultIconDimensions,...defaultIconTransformations}),defaultExtendedIconProps=Object.freeze({...defaultIconProps,body:"",hidden:!1}),defaultIconSizeCustomisations=Object.freeze({width:null,height:null}),defaultIconCustomisations=Object.freeze({...defaultIconSizeCustomisations,...defaultIconTransformations}),matchIconName=/^[a-z0-9]+(-[a-z0-9]+)* $ /,stringToIcon=(Ra,qa,td,rd="")=>{const nd=Ra.split(":");if(Ra.slice(0,1)==="@"){if(nd.length<2||nd.length>3)return null;rd=nd.shift().slice(1)}if(nd.length>3||!nd.length)return null;if(nd.length>1){const ud=nd.pop(),cd=nd.pop(),dd={provider:nd.length>0?nd[0]:rd,prefix:cd,name:ud};return validateIconName(dd)?dd:null}const ad=nd[0],sd=ad.split("-");if(sd.length>1){const ud={provider:rd,prefix:sd.shift(),name:sd.join("-")};return validateIconName(ud)?ud:null}if(td&&rd===""){const ud={provider:rd,prefix:"",name:ad};return validateIconName(ud,td)?ud:null}return null},validateIconName=(Ra,qa)=>Ra?!!((Ra.provider===""||Ra.provider.match(matchIconName))&&(qa&&Ra.prefix===""||Ra.prefix.match(matchIconName))&&Ra.name.match(matchIconName)):!1;function mergeIconTransformations(Ra,qa){const td={};!Ra.hFlip!=!qa.hFlip&&(td.hFlip=!0),!Ra.vFlip!=!qa.vFlip&&(td.vFlip=!0);const rd=((Ra.rotate||0)+(qa.rotate||0))%4;return rd&&(td.rotate=rd),td}function mergeIconData(Ra,qa){const td=mergeIconTransformations(Ra,qa);for(const rd in defaultExtendedIconProps)rd in defaultIconTransformations?rd in Ra&&!(rd in td)&&(td[rd]=defaultIconTransformations[rd]):rd in qa?td[rd]=qa[rd]:rd in Ra&&(td[rd]=Ra[rd]);return td}function getIconsTree(Ra,qa){const td=Ra.icons,rd=Ra.aliases||Object.create(null),nd=Object.create(null);function ad(sd){if(td[sd])return nd[sd]=[];if(!(sd in nd)){nd[sd]=null;const ud=rd[sd]&&rd[sd].parent,cd=ud&&ad(ud);cd&&(nd[sd]=[ud].concat(cd))}return nd[sd]}return(qa||Object.keys(td).concat(Object.keys(rd))).forEach(ad),nd}function internalGetIconData(Ra,qa,td){const rd=Ra.icons,nd=Ra.aliases||Object.create(null);let ad={};function sd(ud){ad=mergeIconData(rd[ud]||nd[ud],ad)}return sd(qa),td.forEach(sd),mergeIconData(Ra,ad)}function getIconData(Ra,qa){if(Ra.icons[qa])return internalGetIconData(Ra,qa,[]);const td=getIconsTree(Ra,[qa])[qa];return td?internalGetIconData(Ra,qa,td):null}const unitsSplit=/(-?[0-9.]*[0-9]+[0-9.]*)/g,unitsTest=/^-?[0-9.]*[0-9]+[0-9.]* $ /g;function calculateSize(Ra,qa,td){if(qa===1)return Ra;if(td=td||100,typeof Ra=="number")return Math.ceil(Ra*qa*td)/td;if(typeof Ra!="string")return Ra;const rd=Ra.split(unitsSplit);if(rd===null||!rd.length)return Ra;const nd=[];let ad=rd.shift(),sd=unitsTest.test(ad);for(;;){if(sd){const ud=parseFloat(ad);isNaN(ud)?nd.push(ad):nd.push(Math.ceil(ud*qa*td)/td)}else nd.push(ad);if(ad=rd.shift(),ad===void 0)return nd.join("");sd=!sd}}function splitSVGDefs(Ra,qa="defs"){let td=
` ,"ig");Ra=Ra.trim().replace(nd,"").replace(/'/gm,'"'),log $ 1.debug( ` Detecting diagram directive$ { qa !== null ? " type:" + qa : "" } based on the text : $ { Ra } ` );let ad;const sd=[];for(;(ad=directiveRegex.exec(Ra))!==null;)if(ad.index===directiveRegex.lastIndex&&directiveRegex.lastIndex++,ad&&!qa||qa&&((td=ad[1])!=null&&td.match(qa))||qa&&((rd=ad[2])!=null&&rd.match(qa))){const ud=ad[1]?ad[1]:ad[2],cd=ad[3]?ad[3].trim():ad[4]?JSON.parse(ad[4].trim()):null;sd.push({type:ud,args:cd})}return sd.length===0?{type:Ra,args:null}:sd.length===1?sd[0]:sd}catch(nd){return log $ 1.error( ` ERROR : $ { nd . message } - Unable to parse directive type : '${qa}' based on the text : '${Ra}' ` ),{type:void 0,args:null}}},"detectDirective"),removeDirectives=__name(function(Ra){return Ra.replace(directiveRegex,"")},"removeDirectives"),isSubstringInArray=__name(function(Ra,qa){for(const[td,rd]of qa.entries())if(rd.match(Ra))return td;return-1},"isSubstringInArray");function interpolateToCurve(Ra,qa){if(!Ra)return qa;const td= ` curve$ { Ra . charAt ( 0 ) . toUpperCase ( ) + Ra . slice ( 1 ) } ` ;return d3CurveTypes[td]??qa}__name(interpolateToCurve,"interpolateToCurve");function formatUrl(Ra,qa){const td=Ra.trim();if(td)return qa.securityLevel!=="loose"?sanitizeUrl_1(td):td}__name(formatUrl,"formatUrl");var runFunc=__name((Ra,...qa)=>{const td=Ra.split("."),rd=td.length-1,nd=td[rd];let ad=window;for(let sd=0;sd<rd;sd++)if(ad=ad[td[sd]],!ad){log $ 1.error( ` Function name : $ { Ra } not found in window ` );return}ad[nd](...qa)},"runFunc");function distance(Ra,qa){return!Ra||!qa?0:Math.sqrt(Math.pow(qa.x-Ra.x,2)+Math.pow(qa.y-Ra.y,2))}__name(distance,"distance");function traverseEdge(Ra){let qa,td=0;Ra.forEach(nd=>{td+=distance(nd,qa),qa=nd});const rd=td/2;return calculatePoint(Ra,rd)}__name(traverseEdge,"traverseEdge");function calcLabelPosition(Ra){return Ra.length===1?Ra[0]:traverseEdge(Ra)}__name(calcLabelPosition,"calcLabelPosition");var roundNumber=__name((Ra,qa=2)=>{const td=Math.pow(10,qa);return Math.round(Ra*td)/td},"roundNumber"),calculatePoint=__name((Ra,qa)=>{let td,rd=qa;for(const nd of Ra){if(td){const ad=distance(nd,td);if(ad<rd)rd-=ad;else{const sd=rd/ad;if(sd<=0)return td;if(sd>=1)return{x:nd.x,y:nd.y};if(sd>0&&sd<1)return{x:roundNumber((1-sd)*td.x+sd*nd.x,5),y:roundNumber((1-sd)*td.y+sd*nd.y,5)}}}td=nd}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),calcCardinalityPosition=__name((Ra,qa,td)=>{log $ 1.info( ` our points $ { JSON . stringify ( qa ) } ` ),qa[0]!==td&&(qa=qa.reverse());const nd=calculatePoint(qa,25),ad=Ra?10:5,sd=Math.atan2(qa[0].y-nd.y,qa[0].x-nd.x),ud={x:0,y:0};return ud.x=Math.sin(sd)*ad+(qa[0].x+nd.x)/2,ud.y=-Math.cos(sd)*ad+(qa[0].y+nd.y)/2,ud},"calcCardinalityPosition");function calcTerminalLabelPosition(Ra,qa,td){const rd=structuredClone(td);log $ 1.info("our points",rd),qa!=="start_left"&&qa!=="start_right"&&rd.reverse();const nd=25+Ra,ad=calculatePoint(rd,nd),sd=10+Ra*.5,ud=Math.atan2(rd[0].y-ad.y,rd[0].x-ad.x),cd={x:0,y:0};return qa==="start_left"?(cd.x=Math.sin(ud+Math.PI)*sd+(rd[0].x+ad.x)/2,cd.y=-Math.cos(ud+Math.PI)*sd+(rd[0].y+ad.y)/2):qa==="end_right"?(cd.x=Math.sin(ud-Math.PI)*sd+(rd[0].x+ad.x)/2-5,cd.y=-Math.cos(ud-Math.PI)*sd+(rd[0].y+ad.y)/2-5):qa==="end_left"?(cd.x=Math.sin(ud)*sd+(rd[0].x+ad.x)/2-5,cd.y=-Math.cos(ud)*sd+(rd[0].y+ad.y)/2-5):(cd.x=Math.sin(ud)*sd+(rd[0].x+ad.x)/2,cd.y=-Math.cos(ud)*sd+(rd[0].y+ad.y)/2),cd}__name(calcTerminalLabelPosition,"calcTerminalLabelPosition");function getStylesFromArray(Ra){let qa="",td="";for(const rd of Ra)rd!==void 0&&(rd.startsWith("color:")||rd.startsWith("text-align:")?td=td+rd+";":qa=qa+rd+";");return{style:qa,labelStyle:td}}__name(getStylesFromArray,"getStylesFromArray");var cnt=0,generateId=__name(()=>(cnt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+cnt),"generateId");function makeRandomHex(Ra){let qa="";const td="0123456789abcdef",rd=td.length;for(let nd=0;nd<Ra;nd++)qa+=td.charAt(Math.floor(Math.random()*rd));return qa}__name(makeRandomHex,"makeRandomHex");var random=__name(Ra=>makeRandomHex(Ra.length),"random"),getTextObj=__name(function(){return{x:0,y:0,fill:vo
` ).map(nd=>{const ad=nd.match(/^ \s +/);if(ad===null)return nd;const[sd]=ad;return sd.length>=rd.length?nd.slice(rd.length):nd}).join( `
` )}class _Tokenizer{constructor(qa){Qm(this,"options");Qm(this,"rules");Qm(this,"lexer");this.options=qa||_defaults}space(qa){const td=this.rules.block.newline.exec(qa);if(td&&td[0].length>0)return{type:"space",raw:td[0]}}code(qa){const td=this.rules.block.code.exec(qa);if(td){const rd=td[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:td[0],codeBlockStyle:"indented",text:this.options.pedantic?rd:rtrim(rd, `
` )}}}fences(qa){const td=this.rules.block.fences.exec(qa);if(td){const rd=td[0],nd=indentCodeCompensation(rd,td[3]||"");return{type:"code",raw:rd,lang:td[2]?td[2].trim().replace(this.rules.inline.anyPunctuation," $ 1"):td[2],text:nd}}}heading(qa){const td=this.rules.block.heading.exec(qa);if(td){let rd=td[2].trim();if(/# $ /.test(rd)){const nd=rtrim(rd,"#");(this.options.pedantic||!nd||/ $ /.test(nd))&&(rd=nd.trim())}return{type:"heading",raw:td[0],depth:td[1].length,text:rd,tokens:this.lexer.inline(rd)}}}hr(qa){const td=this.rules.block.hr.exec(qa);if(td)return{type:"hr",raw:rtrim(td[0], `
` )}}blockquote(qa){const td=this.rules.block.blockquote.exec(qa);if(td){let rd=rtrim(td[0], `
2024-09-18 09:46:23 +08:00
` ).split( `
2024-09-25 14:23:53 +08:00
` ),nd="",ad="";const sd=[];for(;rd.length>0;){let ud=!1;const cd=[];let dd;for(dd=0;dd<rd.length;dd++)if(/^ {0,3}>/.test(rd[dd]))cd.push(rd[dd]),ud=!0;else if(!ud)cd.push(rd[dd]);else break;rd=rd.slice(dd);const pd=cd.join( `
` ),fd=pd.replace(/ \n {0,3}((?:=+|-+) *)(?= \n | $ )/g, `
$1 ` ).replace(/^ {0,3}>[ \t ]?/gm,"");nd=nd? ` $ { nd }
$ { pd } ` :pd,ad=ad? ` $ { ad }
$ { fd } ` :fd;const Td=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(fd,sd,!0),this.lexer.state.top=Td,rd.length===0)break;const Ad=sd[sd.length-1];if((Ad==null?void 0:Ad.type)==="code")break;if((Ad==null?void 0:Ad.type)==="blockquote"){const Sd=Ad,Dd=Sd.raw+ `
` +rd.join( `
` ),Ld=this.blockquote(Dd);sd[sd.length-1]=Ld,nd=nd.substring(0,nd.length-Sd.raw.length)+Ld.raw,ad=ad.substring(0,ad.length-Sd.text.length)+Ld.text;break}else if((Ad==null?void 0:Ad.type)==="list"){const Sd=Ad,Dd=Sd.raw+ `
` +rd.join( `
` ),Ld=this.list(Dd);sd[sd.length-1]=Ld,nd=nd.substring(0,nd.length-Ad.raw.length)+Ld.raw,ad=ad.substring(0,ad.length-Sd.raw.length)+Ld.raw,rd=Dd.substring(sd[sd.length-1].raw.length).split( `
` );continue}}return{type:"blockquote",raw:nd,tokens:sd,text:ad}}}list(qa){let td=this.rules.block.list.exec(qa);if(td){let rd=td[1].trim();const nd=rd.length>1,ad={type:"list",raw:"",ordered:nd,start:nd?+rd.slice(0,-1):"",loose:!1,items:[]};rd=nd? ` \ \ d { 1 , 9 } \ \ $ { rd . slice ( - 1 ) } ` : ` \ \ $ { rd } ` ,this.options.pedantic&&(rd=nd?rd:"[*+-]");const sd=new RegExp( ` ^ ( { 0 , 3 } $ { rd } ) ( ( ? : [ ] [ ^ \ \ n ] * ) ? ( ? : \ \ n | $ ) ) ` );let ud=!1;for(;qa;){let cd=!1,dd="",pd="";if(!(td=sd.exec(qa))||this.rules.block.hr.test(qa))break;dd=td[0],qa=qa.substring(dd.length);let fd=td[2].split( `
` ,1)[0].replace(/^ \t +/,Rd=>" ".repeat(3*Rd.length)),Td=qa.split( `
` ,1)[0],Ad=!fd.trim(),Sd=0;if(this.options.pedantic?(Sd=2,pd=fd.trimStart()):Ad?Sd=td[1].length+1:(Sd=td[2].search(/[^ ]/),Sd=Sd>4?1:Sd,pd=fd.slice(Sd),Sd+=td[1].length),Ad&&/^ * $ /.test(Td)&&(dd+=Td+ `
` ,qa=qa.substring(Td.length+1),cd=!0),!cd){const Rd=new RegExp( ` ^ { 0 , $ { Math . min ( 3 , Sd - 1 ) } } ( ? : [ * + - ] | \ \ d { 1 , 9 } [ . ) ] ) ( ( ? : [ ] [ ^ \ \ n ] * ) ? ( ? : \ \ n | $ ) ) ` ),Od=new RegExp( ` ^ { 0 , $ { Math . min ( 3 , Sd - 1 ) } } ( ( ? : - * ) { 3 , } | ( ? : _ * ) { 3 , } | ( ? : \ \ * * ) { 3 , } ) ( ? : \ \ n + | $ ) ` ),Md=new RegExp( ` ^ { 0 , $ { Math . min ( 3 , Sd - 1 ) } } ( ? : \ ` \` \` |~~~) ` ) , jd = new RegExp ( ` ^ {0, ${ Math . min ( 3 , Sd - 1 ) } }# ` ) ; for ( ; qa ; ) { const Ud = qa . split ( `
` ,1)[0];if(Td=Ud,this.options.pedantic&&(Td=Td.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),Md.test(Td)||jd.test(Td)||Rd.test(Td)||Od.test(qa))break;if(Td.search(/[^ ]/)>=Sd||!Td.trim())pd+= `
` +Td.slice(Sd);else{if(Ad||fd.search(/[^ ]/)>=4||Md.test(fd)||jd.test(fd)||Od.test(fd))break;pd+= `
` +Td}!Ad&&!Td.trim()&&(Ad=!0),dd+=Ud+ `
` ,qa=qa.substring(Ud.length+1),fd=Td.slice(Sd)}}ad.loose||(ud?ad.loose=!0:/ \n * \n * $ /.test(dd)&&(ud=!0));let Dd=null,Ld;this.options.gfm&&(Dd=/^ \[ [ xX] \] /.exec(pd),Dd&&(Ld=Dd[0]!=="[ ] ",pd=pd.replace(/^ \[ [ xX] \] +/,""))),ad.items.push({type:"list_item",raw:dd,task:!!Dd,checked:Ld,loose:!1,text:pd,tokens:[]}),ad.raw+=dd}ad.items[ad.items.length-1].raw=ad.items[ad.items.length-1].raw.trimEnd(),ad.items[ad.items.length-1].text=ad.items[ad.items.length-1].text.trimEnd(),ad.raw=ad.raw.trimEnd();for(let cd=0;cd<ad.items.length;cd++)if(this.lexer.state.top=!1,ad.items[cd].tokens=this.lexer.blockTokens(ad.items[cd].text,[]),!ad.loose){const dd=ad.items[cd].tokens.filter(fd=>fd.type==="space"),pd=dd.length>0&&dd.some(fd=>/ \n .* \n /.test(fd.raw));ad.loose=pd}if(ad.loose)for(let cd=0;cd<ad.items.length;cd++)ad.items[cd].loose=!0;return ad}}html(qa){const td=this.rules.block.html.exec(qa);if(td)return{type:"html",block:!0,raw:td[0],pre:td[1]==="pre"||td[1]==="script"||td[1]==="style",text:td[0]}}def(qa){const td=this.rules.block.def.exec(qa);if(td){const rd=td[1].toLowerCase().replace(/ \s +/g," "),nd=td[2]?td[2].replace(/^<(.*)> $ /," $ 1").replace(this.rules.inline.anyPunctuation," $ 1"):"",ad=td[3]?td[3].substring(1,td[3].length-1).replace(this.rules.inline.anyPunctuation," $ 1"):td[3];return{type:"def",tag:rd,raw:td[0],href:nd,title:ad}}}table(qa){const td=this.rules.block.table.exec(qa);if(!td||!/[:|]/.test(td[2]))return;const rd=splitCells(td[1]),nd=td[2].replace(/^ \| | \| * $ /g,"").split("|"),ad=td[3]&&td[3].trim()?td[3].replace(/ \n [ \t ]* $ /,"").split( `
` ):[],sd={type:"table",raw:td[0],header:[],align:[],rows:[]};if(rd.length===nd.length){for(const ud of nd)/^ *-+: * $ /.test(ud)?sd.align.push("right"):/^ *:-+: * $ /.test(ud)?sd.align.push("center"):/^ *:-+ * $ /.test(ud)?sd.align.push("left"):sd.align.push(null);for(let ud=0;ud<rd.length;ud++)sd.header.push({text:rd[ud],tokens:this.lexer.inline(rd[ud]),header:!0,align:sd.align[ud]});for(const ud of ad)sd.rows.push(splitCells(ud,sd.header.length).map((cd,dd)=>({text:cd,tokens:this.lexer.inline(cd),header:!1,align:sd.align[dd]})));return sd}}lheading(qa){const td=this.rules.block.lheading.exec(qa);if(td)return{type:"heading",raw:td[0],depth:td[2].charAt(0)==="="?1:2,text:td[1],tokens:this.lexer.inline(td[1])}}paragraph(qa){const td=this.rules.block.paragraph.exec(qa);if(td){const rd=td[1].charAt(td[1].length-1)=== `
` ?td[1].slice(0,-1):td[1];return{type:"paragraph",raw:td[0],text:rd,tokens:this.lexer.inline(rd)}}}text(qa){const td=this.rules.block.text.exec(qa);if(td)return{type:"text",raw:td[0],text:td[0],tokens:this.lexer.inline(td[0])}}escape(qa){const td=this.rules.inline.escape.exec(qa);if(td)return{type:"escape",raw:td[0],text:escape $ 1(td[1])}}tag(qa){const td=this.rules.inline.tag.exec(qa);if(td)return!this.lexer.state.inLink&&/^<a /i.test(td[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^< \/ a>/i.test(td[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)( \s |>)/i.test(td[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^< \/ (pre|code|kbd|script)( \s |>)/i.test(td[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:td[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:td[0]}}link(qa){const td=this.rules.inline.link.exec(qa);if(td){const rd=td[2].trim();if(!this.options.pedantic&&/^</.test(rd)){if(!/> $ /.test(rd))return;const sd=rtrim(rd.slice(0,-1)," \\ ");if((rd.length-sd.length)%2===0)return}else{const sd=findClosingBracket(td[2],"()");if(sd>-1){const cd=(td[0].indexOf("!")===0?5:4)+td[1].length+sd;td[2]=td[2].substring(0,sd),td[0]=td[0].substring(0,cd).trim(),td[3]=""}}let nd=td[2],ad="";if(this.options.pedantic){const sd=/^([^'"]*[^ \s ]) \s +(['"])(.*) \2 /.exec(nd);sd&&(nd=sd[1],ad=sd[3])}else ad=td[3]?td[3].slice(1,-1):"";return nd=nd.trim(),/^</.test(nd)&&(this.options.pedantic&&!/> $ /.test(rd)?nd=nd.slice(1):nd=nd.slice(1,-1)),outputLink(td,{href:nd&&nd.replace(this.rules.inline.anyPunctuation," $ 1"),title:ad&&ad.replace(this.rules.inline.anyPunctuation," $ 1")},td[0],this.lexer)}}reflink(qa,td){let rd;if((rd=this.rules.inline.reflink.exec(qa))||(rd=this.rules.inline.nolink.exec(qa))){const nd=(rd[2]||rd[1]).replace(/ \s +/g," "),ad=td[nd.toLowerCase()];if(!ad){const sd=rd[0].charAt(0);return{type:"text",raw:sd,text:sd}}return outputLink(rd,ad,rd[0],this.lexer)}}emStrong(qa,td,rd=""){let nd=this.rules.inline.emStrongLDelim.exec(qa);if(!nd||nd[3]&&rd.match(/[ \p {L} \p {N}]/u))return;if(!(nd[1]||nd[2]||"")||!rd||this.rules.inline.punctuation.exec(rd)){const sd=[...nd[0]].length-1;let ud,cd,dd=sd,pd=0;const fd=nd[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(fd.lastIndex=0,td=td.slice(-1*qa.length+sd);(nd=fd.exec(td))!=null;){if(ud=nd[1]||nd[2]||nd[3]||nd[4]||nd[5]||nd[6],!ud)continue;if(cd=[...ud].length,nd[3]||nd[4]){dd+=cd;continue}else if((nd[5]||nd[6])&&sd%3&&!((sd+cd)%3)){pd+=cd;continue}if(dd-=cd,dd>0)continue;cd=Math.min(cd,cd+dd+pd);const Td=[...nd[0]][0].length,Ad=qa.slice(0,sd+nd.index+Td+cd);if(Math.min(sd,cd)%2){const Dd=Ad.slice(1,-1);return{type:"em",raw:Ad,text:Dd,tokens:this.lexer.inlineTokens(Dd)}}const Sd=Ad.slice(2,-2);return{type:"strong",raw:Ad,text:Sd,tokens:this.lexer.inlineTokens(Sd)}}}}codespan(qa){const td=this.rules.inline.code.exec(qa);if(td){let rd=td[2].replace(/ \n /g," ");const nd=/[^ ]/.test(rd),ad=/^ /.test(rd)&&/ $ /.test(rd);return nd&&ad&&(rd=rd.substring(1,rd.length-1)),rd=escape $ 1(rd,!0),{type:"codespan",raw:td[0],text:rd}}}br(qa){const td=this.rules.inline.br.exec(qa);if(td)return{type:"br",raw:td[0]}}del(qa){const td=this.rules.inline.del.exec(qa);if(td)return{type:"del",raw:td[0],text:td[2],tokens:this.lexer.inlineTokens(td[2])}}autolink(qa){const td=this.rules.inline.autolink.exec(qa);if(td){let rd,nd;return td[2]==="@"?(rd=escape $ 1(td[1]),nd="mailto:"+rd):(rd=escape $ 1(td[1]),nd=rd),{type:"link",raw:td[0],text:rd,href:nd,tokens:[{type:"text",raw:rd,text:rd}]}}}url(qa){var rd;let td;if(td=this.rules.inline.url.exec(qa)){let nd,ad;if(td[2]==="@")nd=escape $ 1(td[0]),ad="mailto:"+nd;else{let sd;do sd=td[0],td[0]=((rd=this.rules.inline._backpedal.exec(td[0]))==null?void 0:rd[0])??"";while(sd!==td[0]);nd=escape $ 1(td[0]),td[1]==="www."?ad="http://"+td[0]:ad=td[0]}return{type:"link",raw:td[0],text:nd,href:ad,tokens:[{type:"text",raw:nd,text:nd}]}}}inlineText(qa){const td=this.rules.inline.text.exec(qa);if(td){let rd;return this.lexer.state.inRawBlock?rd=td[0]:rd=esca
] ` ).replace("lheading",lheading).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},escape $ 2=/^ \\ ([!"# $ %&'()*+, \- ./:;<=>?@ \[ \] \\ ^_ ` { | } ~ ] ) / , inlineCode = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/ , br = /^( {2,}|\\)\n(?!\s*$)/ , inlineText = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/ , _punctuation = "\\p{P}\\p{S}" , punctuation = edit ( /^((?![*_])[\spunctuation])/ , "u" ) . replace ( /punctuation/g , _punctuation ) . getRegex ( ) , blockSkip = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g , emStrongLDelim = edit ( /^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/ , "u" ) . replace ( /punct/g , _punctuation ) . getRegex ( ) , emStrongRDelimAst = edit ( "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])" , "gu" ) . replace ( /punct/g , _punctuation ) . getRegex ( ) , emStrongRDelimUnd = edit ( "^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])" , "gu" ) . replace ( /punct/g , _punctuation ) . getRegex ( ) , anyPunctuation = edit ( /\\([punct])/ , "gu" ) . replace ( /punct/g , _punctuation ) . getRegex ( ) , autolink = edit ( /^<(scheme:[^\s\x00-\x1f<>]*|email)>/ ) . replace ( "scheme" , /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/ ) . replace ( "email" , /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/ ) . getRegex ( ) , _inlineComment = edit ( _comment ) . replace ( "(?:-->|$)" , "-->" ) . getRegex ( ) , tag = edit ( "^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>" ) . replace ( "comment" , _inlineComment ) . replace ( "attribute" , /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/ ) . getRegex ( ) , _inlineLabel = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/ , link = edit ( /^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/ ) . replace ( "label" , _inlineLabel ) . replace ( "href" , /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/ ) . replace ( "title" , /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/ ) . getRegex ( ) , reflink = edit ( /^!?\[(label)\]\[(ref)\]/ ) . replace ( "label" , _inlineLabel ) . replace ( "ref" , _blockLabel ) . getRegex ( ) , nolink = edit ( /^!?\[(ref)\](?:\[\])?/ ) . replace ( "ref" , _blockLabel ) . getRegex ( ) , reflinkSearch = edit ( "reflink|nolink(?!\\()" , "g" ) . replace ( "reflink" , reflink ) . replace ( "nolink" , nolink ) . getRegex ( ) , inlineNormal = { _backpedal : noopTest , anyPunctuation , autolink , blockSkip , br , code : inlineCode , del : noopTest , emStrongLDelim , emStrongRDelimAst , emStrongRDelimUnd , escape : escape$2 , link , nolink , punctuation , reflink , reflinkSearch , tag , text : inlineText , url : noopTest } , inlinePedantic = { ... inlineNormal , link : edit ( /^!?\[(label)\]\((.*?)\)/ ) . replace ( "label" , _inlineLabel ) . getRegex ( ) , reflink : edit ( /^!?\[(label)\]\s*\[([^\]]*)\]/ ) . replace ( "label" , _inlineLabel ) . getRegex ( ) } , inlineGfm = { ... inlineNormal , escape : edit ( escape$2 ) . replace ( "])" , "~|])" ) . getRegex ( ) , url : edit ( /^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/ , "i" ) . replace ( "email" , /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/ ) . getRegex ( ) , _backpedal : /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/ , del : /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/ , text : /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/ } , inlineBreaks = { ... inlineGfm , br : edit ( br ) . replace ( "{2,}" , "*" ) . getRegex ( ) , text : edit ( inlineGfm . text ) . replace ( "\\b_" , "\\b_| {2,}\\n" ) . replace ( /\{2,\}/g , "*" ) . getRegex ( ) } , block = { normal : blockNormal , gfm : blockGfm , pedantic : blockPedantic } , inline = { normal : inlineNormal , gfm : inlineGfm , breaks : inlineBreaks , pedantic : inlinePedantic } ; class _Lexer { constructor ( qa ) { Qm ( this , "
` ),this.blockTokens(qa,this.tokens);for(let td=0;td<this.inlineQueue.length;td++){const rd=this.inlineQueue[td];this.inlineTokens(rd.src,rd.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(qa,td=[],rd=!1){this.options.pedantic?qa=qa.replace(/ \t /g," ").replace(/^ + $ /gm,""):qa=qa.replace(/^( *)( \t +)/gm,(ud,cd,dd)=>cd+" ".repeat(dd.length));let nd,ad,sd;for(;qa;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(ud=>(nd=ud.call({lexer:this},qa,td))?(qa=qa.substring(nd.raw.length),td.push(nd),!0):!1))){if(nd=this.tokenizer.space(qa)){qa=qa.substring(nd.raw.length),nd.raw.length===1&&td.length>0?td[td.length-1].raw+= `
` :td.push(nd);continue}if(nd=this.tokenizer.code(qa)){qa=qa.substring(nd.raw.length),ad=td[td.length-1],ad&&(ad.type==="paragraph"||ad.type==="text")?(ad.raw+= `
` +nd.raw,ad.text+= `
` +nd.text,this.inlineQueue[this.inlineQueue.length-1].src=ad.text):td.push(nd);continue}if(nd=this.tokenizer.fences(qa)){qa=qa.substring(nd.raw.length),td.push(nd);continue}if(nd=this.tokenizer.heading(qa)){qa=qa.substring(nd.raw.length),td.push(nd);continue}if(nd=this.tokenizer.hr(qa)){qa=qa.substring(nd.raw.length),td.push(nd);continue}if(nd=this.tokenizer.blockquote(qa)){qa=qa.substring(nd.raw.length),td.push(nd);continue}if(nd=this.tokenizer.list(qa)){qa=qa.substring(nd.raw.length),td.push(nd);continue}if(nd=this.tokenizer.html(qa)){qa=qa.substring(nd.raw.length),td.push(nd);continue}if(nd=this.tokenizer.def(qa)){qa=qa.substring(nd.raw.length),ad=td[td.length-1],ad&&(ad.type==="paragraph"||ad.type==="text")?(ad.raw+= `
` +nd.raw,ad.text+= `
` +nd.raw,this.inlineQueue[this.inlineQueue.length-1].src=ad.text):this.tokens.links[nd.tag]||(this.tokens.links[nd.tag]={href:nd.href,title:nd.title});continue}if(nd=this.tokenizer.table(qa)){qa=qa.substring(nd.raw.length),td.push(nd);continue}if(nd=this.tokenizer.lheading(qa)){qa=qa.substring(nd.raw.length),td.push(nd);continue}if(sd=qa,this.options.extensions&&this.options.extensions.startBlock){let ud=1/0;const cd=qa.slice(1);let dd;this.options.extensions.startBlock.forEach(pd=>{dd=pd.call({lexer:this},cd),typeof dd=="number"&&dd>=0&&(ud=Math.min(ud,dd))}),ud<1/0&&ud>=0&&(sd=qa.substring(0,ud+1))}if(this.state.top&&(nd=this.tokenizer.paragraph(sd))){ad=td[td.length-1],rd&&(ad==null?void 0:ad.type)==="paragraph"?(ad.raw+= `
` +nd.raw,ad.text+= `
` +nd.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=ad.text):td.push(nd),rd=sd.length!==qa.length,qa=qa.substring(nd.raw.length);continue}if(nd=this.tokenizer.text(qa)){qa=qa.substring(nd.raw.length),ad=td[td.length-1],ad&&ad.type==="text"?(ad.raw+= `
` +nd.raw,ad.text+= `
` +nd.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=ad.text):td.push(nd);continue}if(qa){const ud="Infinite loop on byte: "+qa.charCodeAt(0);if(this.options.silent){console.error(ud);break}else throw new Error(ud)}}return this.state.top=!0,td}inline(qa,td=[]){return this.inlineQueue.push({src:qa,tokens:td}),td}inlineTokens(qa,td=[]){let rd,nd,ad,sd=qa,ud,cd,dd;if(this.tokens.links){const pd=Object.keys(this.tokens.links);if(pd.length>0)for(;(ud=this.tokenizer.rules.inline.reflinkSearch.exec(sd))!=null;)pd.includes(ud[0].slice(ud[0].lastIndexOf("[")+1,-1))&&(sd=sd.slice(0,ud.index)+"["+"a".repeat(ud[0].length-2)+"]"+sd.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(ud=this.tokenizer.rules.inline.blockSkip.exec(sd))!=null;)sd=sd.slice(0,ud.index)+"["+"a".repeat(ud[0].length-2)+"]"+sd.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(ud=this.tokenizer.rules.inline.anyPunctuation.exec(sd))!=null;)sd=sd.slice(0,ud.index)+"++"+sd.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;qa;)if(cd||(dd=""),cd=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(pd=>(rd=pd.call({lexer:this},qa,td))?(qa=qa.substring(rd.raw.length),td.push(rd),!0):!1))){if(rd=this.tokenizer.escape(qa)){qa=qa.substring(rd.raw.length),td.push(rd);continue}if(rd=this.tokenizer.tag(qa)){qa=qa.substring(rd.raw.length),nd=td[td.length-1],nd&&rd.type==="text"&&nd.type==="text"?(nd.raw+=rd.raw,nd.text+=rd.text):td.push(rd);continue}if(rd=this.tokenizer.link(qa)){qa=qa.substring(rd.raw.length),td.push(rd);continue}if(rd=this.tokenizer.reflink(qa,this.tokens.links)){qa=qa.substring(rd.raw.length),nd=td[td.length-1],nd&&rd.type==="text"&&nd.type==="text"?(nd.raw+=rd.raw,nd.text+=rd.text):td.push(rd);continue}if(rd=this.tokenizer.emStrong(qa,sd,dd)){qa=qa.substring(rd.raw.length),td.push(rd);continue}if(rd=this.tokenizer.codespan(qa)){qa=qa.substring(rd.raw.length),td.push(rd);continue}if(rd=this.tokenizer.br(qa)){qa=qa.substring(rd.raw.length),td.push(rd);continue}if(rd=this.tokenizer.del(qa)){qa=qa.substring(rd.raw.length),td.push(rd);continue}if(rd=this.tokenizer.autolink(qa)){qa=qa.substring(rd.raw.length),td.push(rd);continue}if(!this.state.inLink&&(rd=this.tokenizer.url(qa))){qa=qa.substring(rd.raw.length),td.push(rd);continue}if(ad=qa,this.options.extensions&&this.options.extensions.startInline){let pd=1/0;const fd=qa.slice(1);let Td;this.options.extensions.startInline.forEach(Ad=>{Td=Ad.call({lexer:this},fd),typeof Td=="number"&&Td>=0&&(pd=Math.min(pd,Td))}),pd<1/0&&pd>=0&&(ad=qa.substring(0,pd+1))}if(rd=this.tokenizer.inlineText(ad)){qa=qa.substring(rd.raw.length),rd.raw.slice(-1)!=="_"&&(dd=rd.raw.slice(-1)),cd=!0,nd=td[td.length-1],nd&&nd.type==="text"?(nd.raw+=rd.raw,nd.text+=rd.text):td.push(rd);continue}if(qa){const pd="Infinite loop on byte: "+qa.charCodeAt(0);if(this.options.silent){console.error(pd);break}else throw new Error(pd)}}return td}}class _Renderer{constructor(qa){Qm(this,"options");Qm(this,"parser");this.options=qa||_defaults}space(qa){return""}code({text:qa,lang:td,escaped:rd}){var sd;const nd=(sd=(td||"").match(/^ \S */))==null?void 0:sd[0],ad=qa.replace(/ \n $ /,"")+ `
` ;return nd?'<pre><code class="language-'+escape $ 1(nd)+'">'+(rd?ad:escape $ 1(ad,!0))+ ` < / c o d e > < / p r e >
` :"<pre><code>"+(rd?ad:escape $ 1(ad,!0))+ ` < / c o d e > < / p r e >
2024-09-18 09:46:23 +08:00
` }blockquote({tokens:qa}){return ` < blockquote >
$ { this . parser . parse ( qa ) } < / b l o c k q u o t e >
2024-09-25 14:23:53 +08:00
` }html({text:qa}){return qa}heading({tokens:qa,depth:td}){return ` < h$ { td } > $ { this . parser . parseInline ( qa ) } < / h $ { t d } >
2024-09-18 09:46:23 +08:00
` }hr(qa){return ` < hr >
2024-09-25 14:23:53 +08:00
` }list(qa){const td=qa.ordered,rd=qa.start;let nd="";for(let ud=0;ud<qa.items.length;ud++){const cd=qa.items[ud];nd+=this.listitem(cd)}const ad=td?"ol":"ul",sd=td&&rd!==1?' start="'+rd+'"':"";return"<"+ad+sd+ ` >
` +nd+"</"+ad+ ` >
` }listitem(qa){let td="";if(qa.task){const rd=this.checkbox({checked:!!qa.checked});qa.loose?qa.tokens.length>0&&qa.tokens[0].type==="paragraph"?(qa.tokens[0].text=rd+" "+qa.tokens[0].text,qa.tokens[0].tokens&&qa.tokens[0].tokens.length>0&&qa.tokens[0].tokens[0].type==="text"&&(qa.tokens[0].tokens[0].text=rd+" "+qa.tokens[0].tokens[0].text)):qa.tokens.unshift({type:"text",raw:rd+" ",text:rd+" "}):td+=rd+" "}return td+=this.parser.parse(qa.tokens,!!qa.loose), ` < li > $ { td } < / l i >
2024-09-18 09:46:23 +08:00
` }checkbox({checked:qa}){return"<input "+(qa?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:qa}){return ` < p > $ { this . parser . parseInline ( qa ) } < / p >
2024-09-25 14:23:53 +08:00
` }table(qa){let td="",rd="";for(let ad=0;ad<qa.header.length;ad++)rd+=this.tablecell(qa.header[ad]);td+=this.tablerow({text:rd});let nd="";for(let ad=0;ad<qa.rows.length;ad++){const sd=qa.rows[ad];rd="";for(let ud=0;ud<sd.length;ud++)rd+=this.tablecell(sd[ud]);nd+=this.tablerow({text:rd})}return nd&&(nd= ` < tbody > $ { nd } < / t b o d y > ` ) , ` < t a b l e >
2024-09-18 09:46:23 +08:00
< thead >
2024-09-25 14:23:53 +08:00
` +td+ ` < / t h e a d >
` +nd+ ` < / t a b l e >
2024-09-18 09:46:23 +08:00
` }tablerow({text:qa}){return ` < tr >
$ { qa } < / t r >
2024-09-25 14:23:53 +08:00
` }tablecell(qa){const td=this.parser.parseInline(qa.tokens),rd=qa.header?"th":"td";return(qa.align? ` < $ { rd } align = "${qa.align}" > ` : ` < $ { rd } > ` )+td+ ` < / $ { r d } >
` }strong({tokens:qa}){return ` < strong > $ { this . parser . parseInline ( qa ) } < / s t r o n g > ` } e m ( { t o k e n s : q a } ) { r e t u r n ` < e m > $ { t h i s . p a r s e r . p a r s e I n l i n e ( q a ) } < / e m > ` } c o d e s p a n ( { t e x t : q a } ) { r e t u r n ` < c o d e > $ { q a } < / c o d e > ` } b r ( q a ) { r e t u r n " < b r > " } d e l ( { t o k e n s : q a } ) { r e t u r n ` < d e l > $ { t h i s . p a r s e r . p a r s e I n l i n e ( q a ) } < / d e l > ` } l i n k ( { h r e f : q a , t i t l e : t d , t o k e n s : r d } ) { c o n s t n d = t h i s . p a r s e r . p a r s e I n l i n e ( r d ) , a d = c l e a n U r l ( q a ) ; i f ( a d = = = n u l l ) r e t u r n n d ; q a = a d ; l e t s d = ' < a h r e f = " ' + q a + ' " ' ; r e t u r n t d & & ( s d + = ' t i t l e = " ' + t d + ' " ' ) , s d + = " > " + n d + " < / a > " , s d } i m a g e ( { h r e f : q a , t i t l e : t d , t e x t : r d } ) { c o n s t n d = c l e a n U r l ( q a ) ; i f ( n d = = = n u l l ) r e t u r n r d ; q a = n d ; l e t a d = ` < i m g s r c = " $ { q a } " a l t = " $ { r d } " ` ; r e t u r n t d & & ( a d + = ` t i t l e = " $ { t d } " ` ) , a d + = " > " , a d } t e x t ( q a ) { r e t u r n " t o k e n s " i n q a & & q a . t o k e n s ? t h i s . p a r s e r . p a r s e I n l i n e ( q a . t o k e n s ) : q a . t e x t } } c l a s s _ T e x t R e n d e r e r { s t r o n g ( { t e x t : q a } ) { r e t u r n q a } e m ( { t e x t : q a } ) { r e t u r n q a } c o d e s p a n ( { t e x t : q a } ) { r e t u r n q a } d e l ( { t e x t : q a } ) { r e t u r n q a } h t m l ( { t e x t : q a } ) { r e t u r n q a } t e x t ( { t e x t : q a } ) { r e t u r n q a } l i n k ( { t e x t : q a } ) { r e t u r n " " + q a } i m a g e ( { t e x t : q a } ) { r e t u r n " " + q a } b r ( ) { r e t u r n " " } } c l a s s _ P a r s e r { c o n s t r u c t o r ( q a ) { Q m ( t h i s , " o p t i o n s " ) ; Q m ( t h i s , " r e n d e r e r " ) ; Q m ( t h i s , " t e x t R e n d e r e r " ) ; t h i s . o p t i o n s = q a | | _ d e f a u l t s , t h i s . o p t i o n s . r e n d e r e r = t h i s . o p t i o n s . r e n d e r e r | | n e w _ R e n d e r e r , t h i s . r e n d e r e r = t h i s . o p t i o n s . r e n d e r e r , t h i s . r e n d e r e r . o p t i o n s = t h i s . o p t i o n s , t h i s . r e n d e r e r . p a r s e r = t h i s , t h i s . t e x t R e n d e r e r = n e w _ T e x t R e n d e r e r } s t a t i c p a r s e ( q a , t d ) { r e t u r n n e w _ P a r s e r ( t d ) . p a r s e ( q a ) } s t a t i c p a r s e I n l i n e ( q a , t d ) { r e t u r n n e w _ P a r s e r ( t d ) . p a r s e I n l i n e ( q a ) } p a r s e ( q a , t d = ! 0 ) { l e t r d = " " ; f o r ( l e t n d = 0 ; n d < q a . l e n g t h ; n d + + ) { c o n s t a d = q a [ n d ] ; i f ( t h i s . o p t i o n s . e x t e n s i o n s & & t h i s . o p t i o n s . e x t e n s i o n s . r e n d e r e r s & & t h i s . o p t i o n s . e x t e n s i o n s . r e n d e r e r s [ a d . t y p e ] ) { c o n s t u d = a d , c d = t h i s . o p t i o n s . e x t e n s i o n s . r e n d e r e r s [ u d . t y p e ] . c a l l ( { p a r s e r : t h i s } , u d ) ; i f ( c d ! = = ! 1 | | ! [ " s p a c e " , " h r " , " h e a d i n g " , " c o d e " , " t a b l e " , " b l o c k q u o t e " , " l i s t " , " h t m l " , " p a r a g r a p h " , " t e x t " ] . i n c l u d e s ( u d . t y p e ) ) { r d + = c d | | " " ; c o n t i n u e } } c o n s t s d = a d ; s w i t c h ( s d . t y p e ) { c a s e " s p a c e " : { r d + = t h i s . r e n d e r e r . s p a c e ( s d ) ; c o n t i n u e } c a s e " h r " : { r d + = t h i s . r e n d e r e r . h r ( s d ) ; c o n t i n u e } c a s e " h e a d i n g " : { r d + = t h i s . r e n d e r e r . h e a d i n g ( s d ) ; c o n t i n u e } c a s e " c o d e " : { r d + = t h i s . r e n d e r e r . c o d e ( s d ) ; c o n t i n u e } c a s e " t a b l e " : { r d + = t h i s . r e n d e r e r . t a b l e ( s d ) ; c o n t i n u e } c a s e " b l o c k q u o t e " : { r d + = t h i s . r e n d e r e r . b l o c k q u o t e ( s d ) ; c o n t i n u e } c a s e " l i s t " : { r d + = t h i s . r e n d e r e r . l i s t ( s d ) ; c o n t i n u e } c a s e " h t m l " : { r d + = t h i s . r e n d e r e r . h t m l ( s d ) ; c o n t i n u e } c a s e " p a r a g r a p h " : { r d + = t h i s . r e n d e r e r . p a r a g r a p h ( s d ) ; c o n t i n u e } c a s e " t e x t " : { l e t u d = s d , c d = t h i s . r e n d e r e r . t e x t ( u d ) ; f o r ( ; n d + 1 < q a . l e n g t h & & q a [ n d + 1 ] . t y p e = = = " t e x t " ; ) u d = q a [ + + n d ] , c d + = `
` +this.renderer.text(ud);td?rd+=this.renderer.paragraph({type:"paragraph",raw:cd,text:cd,tokens:[{type:"text",raw:cd,text:cd}]}):rd+=cd;continue}default:{const ud='Token with "'+sd.type+'" type was not found.';if(this.options.silent)return console.error(ud),"";throw new Error(ud)}}}return rd}parseInline(qa,td){td=td||this.renderer;let rd="";for(let nd=0;nd<qa.length;nd++){const ad=qa[nd];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[ad.type]){const ud=this.options.extensions.renderers[ad.type].call({parser:this},ad);if(ud!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(ad.type)){rd+=ud||"";continue}}const sd=ad;switch(sd.type){case"escape":{rd+=td.text(sd);break}case"html":{rd+=td.html(sd);break}case"link":{rd+=td.link(sd);break}case"image":{rd+=td.image(sd);break}case"strong":{rd+=td.strong(sd);break}case"em":{rd+=td.em(sd);break}case"codespan":{rd+=td.codespan(sd);break}case"br":{rd+=td.br(sd);break}case"del":{rd+=td.del(sd);break}case"text":{rd+=td.text(sd);break}default:{const ud='Token with "'+sd.type+'" type was not found.';if(this.options.silent)return console.error(ud),"";throw new Error(ud)}}}return rd}}class _Hooks{constructor(qa){Qm(this,"options");this.options=qa||_defaults}preprocess(qa){return qa}postprocess(qa){return qa}processAllTokens(qa){return qa}}Qm(_Hooks,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));var tv,lS,x2,uS;class Marked{constructor(...qa){nS(this,tv);Qm(this,"defaults",_getDefaults());Qm(this,"options",this.setOptions);Qm(this,"parse",wE(this,tv,x2).call(this,_Lexer.lex,_Parser.parse));Qm(this,"parseInline",wE(this,tv,x2).call(this,_Lexer.lexInline,_Parser.parseInline));Qm(this,"Parser",_Parser);Qm(this,"Renderer",_Renderer);Qm(this,"TextRenderer",_TextRenderer);Qm(this,"Lexer",_Lexer);Qm(this,"Tokenizer",_Tokenizer);Qm(this,"Hooks",_Hooks);this.use(...qa)}walkTokens(qa,td){var nd,ad;let rd=[];for(const sd of qa)switch(rd=rd.concat(td.call(this,sd)),sd.type){case"table":{const ud=sd;for(const cd of ud.header)rd=rd.concat(this.walkTokens(cd.tokens,td));for(const cd of ud.rows)for(const dd of cd)rd=rd.concat(this.walkTokens(dd.tokens,td));break}case"list":{const ud=sd;rd=rd.concat(this.walkTokens(ud.items,td));break}default:{const ud=sd;(ad=(nd=this.defaults.extensions)==null?void 0:nd.childTokens)!=null&&ad[ud.type]?this.defaults.extensions.childTokens[ud.type].forEach(cd=>{const dd=ud[cd].flat(1/0);rd=rd.concat(this.walkTokens(dd,td))}):ud.tokens&&(rd=rd.concat(this.walkTokens(ud.tokens,td)))}}return rd}use(...qa){const td=this.defaults.extensions||{renderers:{},childTokens:{}};return qa.forEach(rd=>{const nd={...rd};if(nd.async=this.defaults.async||nd.async||!1,rd.extensions&&(rd.extensions.forEach(ad=>{if(!ad.name)throw new Error("extension name required");if("renderer"in ad){const sd=td.renderers[ad.name];sd?td.renderers[ad.name]=function(...ud){let cd=ad.renderer.apply(this,ud);return cd===!1&&(cd=sd.apply(this,ud)),cd}:td.renderers[ad.name]=ad.renderer}if("tokenizer"in ad){if(!ad.level||ad.level!=="block"&&ad.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const sd=td[ad.level];sd?sd.unshift(ad.tokenizer):td[ad.level]=[ad.tokenizer],ad.start&&(ad.level==="block"?td.startBlock?td.startBlock.push(ad.start):td.startBlock=[ad.start]:ad.level==="inline"&&(td.startInline?td.startInline.push(ad.start):td.startInline=[ad.start]))}"childTokens"in ad&&ad.childTokens&&(td.childTokens[ad.name]=ad.childTokens)}),nd.extensions=td),rd.renderer){const ad=this.defaults.renderer||new _Renderer(this.defaults);for(const sd in rd.renderer){if(!(sd in ad))throw new Error( ` renderer '${sd}' does not exist ` );if(["options","parser"].includes(sd))continue;const ud=sd;let cd=rd.renderer[ud];rd.useNewRenderer||(cd=wE(this,tv,lS).call(this,cd,ud,ad));const dd=ad[ud];ad[ud]=(...pd)=>{let fd=cd.apply(ad,pd);return fd===!1&&(fd=dd.apply(ad,pd)),fd||""}}nd.renderer=ad}if(rd.tokenizer){const ad=this.defaults.tokenizer||new _Tokenizer(this.defaults);for(const sd in
Please report this to https : //github.com/markedjs/marked.`,qa){const nd="<p>An error occurred:</p><pre>"+escape$1(rd.message+"",!0)+"</pre>";return td?Promise.resolve(nd):nd}if(td)return Promise.reject(rd);throw rd}};const markedInstance=new Marked;function marked(Ra,qa){return markedInstance.parse(Ra,qa)}marked.options=marked.setOptions=function(Ra){return markedInstance.setOptions(Ra),marked.defaults=markedInstance.defaults,changeDefaults(marked.defaults),marked};marked.getDefaults=_getDefaults;marked.defaults=_defaults;marked.use=function(...Ra){return markedInstance.use(...Ra),marked.defaults=markedInstance.defaults,changeDefaults(marked.defaults),marked};marked.walkTokens=function(Ra,qa){return markedInstance.walkTokens(Ra,qa)};marked.parseInline=markedInstance.parseInline;marked.Parser=_Parser;marked.parser=_Parser.parse;marked.Renderer=_Renderer;marked.TextRenderer=_TextRenderer;marked.Lexer=_Lexer;marked.lexer=_Lexer.lex;marked.Tokenizer=_Tokenizer;marked.Hooks=_Hooks;marked.parse=marked;marked.options;marked.setOptions;marked.use;marked.walkTokens;marked.parseInline;_Parser.parse;_Lexer.lex;function dedent(Ra){for(var qa=[],td=1;td<arguments.length;td++)qa[td-1]=arguments[td];var rd=Array.from(typeof Ra=="string"?[Ra]:Ra);rd[rd.length-1]=rd[rd.length-1].replace(/\r?\n([\t ]*)$/,"");var nd=rd.reduce(function(ud,cd){var dd=cd.match(/\n([\t ]+|(?!\s).)/g);return dd?ud.concat(dd.map(function(pd){var fd,Td;return(Td=(fd=pd.match(/[\t ]/g))===null||fd===void 0?void 0:fd.length)!==null&&Td!==void 0?Td:0})):ud},[]);if(nd.length){var ad=new RegExp(`
[ ] { ` +Math.min.apply(Math,nd)+"}","g");rd=rd.map(function(ud){return ud.replace(ad, `
` )})}rd[0]=rd[0].replace(/^ \r ? \n /,"");var sd=rd[0];return qa.forEach(function(ud,cd){var dd=sd.match(/(?:^| \n )( *) $ /),pd=dd?dd[1]:"",fd=ud;typeof ud=="string"&&ud.includes( `
` )&&(fd=String(ud).split( `
` ).map(function(Td,Ad){return Ad===0?Td:""+pd+Td}).join( `
` )),sd+=fd+rd[cd+1]}),sd}function preprocessMarkdown(Ra,{markdownAutoWrap:qa}){const rd=Ra.replace(/<br \/ >/g, `
2024-09-18 09:46:23 +08:00
` ).replace(/ \n {2,}/g, `
2024-09-25 14:23:53 +08:00
` ),nd=dedent(rd);return qa===!1?nd.replace(/ /g," "):nd}__name(preprocessMarkdown,"preprocessMarkdown");function markdownToLines(Ra,qa={}){const td=preprocessMarkdown(Ra,qa),rd=marked.lexer(td),nd=[[]];let ad=0;function sd(ud,cd="normal"){ud.type==="text"?ud.text.split( `
` ).forEach((pd,fd)=>{fd!==0&&(ad++,nd.push([])),pd.split(" ").forEach(Td=>{Td&&nd[ad].push({content:Td,type:cd})})}):ud.type==="strong"||ud.type==="em"?ud.tokens.forEach(dd=>{sd(dd,ud.type)}):ud.type==="html"&&nd[ad].push({content:ud.text,type:"normal"})}return __name(sd,"processNode"),rd.forEach(ud=>{var cd;ud.type==="paragraph"?(cd=ud.tokens)==null||cd.forEach(dd=>{sd(dd)}):ud.type==="html"&&nd[ad].push({content:ud.text,type:"normal"})}),nd}__name(markdownToLines,"markdownToLines");function markdownToHTML(Ra,{markdownAutoWrap:qa}={}){const td=marked.lexer(Ra);function rd(nd){var ad,sd,ud;return nd.type==="text"?qa===!1?nd.text.replace(/ \n */g,"<br/>").replace(/ /g," "):nd.text.replace(/ \n */g,"<br/>"):nd.type==="strong"? ` < strong > $ { ( ad = nd . tokens ) == null ? void 0 : ad . map ( rd ) . join ( "" ) } < / s t r o n g > ` : n d . t y p e = = = " e m " ? ` < e m > $ { ( s d = n d . t o k e n s ) = = n u l l ? v o i d 0 : s d . m a p ( r d ) . j o i n ( " " ) } < / e m > ` : n d . t y p e = = = " p a r a g r a p h " ? ` < p > $ { ( u d = n d . t o k e n s ) = = n u l l ? v o i d 0 : u d . m a p ( r d ) . j o i n ( " " ) } < / p > ` : n d . t y p e = = = " s p a c e " ? " " : n d . t y p e = = = " h t m l " ? ` $ { n d . t e x t } ` : ` U n s u p p o r t e d m a r k d o w n : $ { n d . t y p e } ` } r e t u r n _ _ n a m e ( r d , " o u t p u t " ) , t d . m a p ( r d ) . j o i n ( " " ) } _ _ n a m e ( m a r k d o w n T o H T M L , " m a r k d o w n T o H T M L " ) ; f u n c t i o n s p l i t T e x t T o C h a r s ( R a ) { r e t u r n I n t l . S e g m e n t e r ? [ . . . n e w I n t l . S e g m e n t e r ( ) . s e g m e n t ( R a ) ] . m a p ( q a = > q a . s e g m e n t ) : [ . . . R a ] } _ _ n a m e ( s p l i t T e x t T o C h a r s , " s p l i t T e x t T o C h a r s " ) ; f u n c t i o n s p l i t W o r d T o F i t W i d t h ( R a , q a ) { c o n s t t d = s p l i t T e x t T o C h a r s ( q a . c o n t e n t ) ; r e t u r n s p l i t W o r d T o F i t W i d t h R e c u r s i o n ( R a , [ ] , t d , q a . t y p e ) } _ _ n a m e ( s p l i t W o r d T o F i t W i d t h , " s p l i t W o r d T o F i t W i d t h " ) ; f u n c t i o n s p l i t W o r d T o F i t W i d t h R e c u r s i o n ( R a , q a , t d , r d ) { i f ( t d . l e n g t h = = = 0 ) r e t u r n [ { c o n t e n t : q a . j o i n ( " " ) , t y p e : r d } , { c o n t e n t : " " , t y p e : r d } ] ; c o n s t [ n d , . . . a d ] = t d , s d = [ . . . q a , n d ] ; r e t u r n R a ( [ { c o n t e n t : s d . j o i n ( " " ) , t y p e : r d } ] ) ? s p l i t W o r d T o F i t W i d t h R e c u r s i o n ( R a , s d , a d , r d ) : ( q a . l e n g t h = = = 0 & & n d & & ( q a . p u s h ( n d ) , t d . s h i f t ( ) ) , [ { c o n t e n t : q a . j o i n ( " " ) , t y p e : r d } , { c o n t e n t : t d . j o i n ( " " ) , t y p e : r d } ] ) } _ _ n a m e ( s p l i t W o r d T o F i t W i d t h R e c u r s i o n , " s p l i t W o r d T o F i t W i d t h R e c u r s i o n " ) ; f u n c t i o n s p l i t L i n e T o F i t W i d t h ( R a , q a ) { i f ( R a . s o m e ( ( { c o n t e n t : t d } ) = > t d . i n c l u d e s ( `
` )))throw new Error("splitLineToFitWidth does not support newlines in the line");return splitLineToFitWidthRecursion(Ra,qa)}__name(splitLineToFitWidth,"splitLineToFitWidth");function splitLineToFitWidthRecursion(Ra,qa,td=[],rd=[]){if(Ra.length===0)return rd.length>0&&td.push(rd),td.length>0?td:[];let nd="";Ra[0].content===" "&&(nd=" ",Ra.shift());const ad=Ra.shift()??{content:" ",type:"normal"},sd=[...rd];if(nd!==""&&sd.push({content:nd,type:"normal"}),sd.push(ad),qa(sd))return splitLineToFitWidthRecursion(Ra,qa,td,sd);if(rd.length>0)td.push(rd),Ra.unshift(ad);else if(ad.content){const[ud,cd]=splitWordToFitWidth(qa,ad);td.push([ud]),cd.content&&Ra.unshift(cd)}return splitLineToFitWidthRecursion(Ra,qa,td)}__name(splitLineToFitWidthRecursion,"splitLineToFitWidthRecursion");function applyStyle $ 1(Ra,qa){qa&&Ra.attr("style",qa)}__name(applyStyle $ 1,"applyStyle");async function addHtmlSpan(Ra,qa,td,rd,nd=!1){const ad=Ra.append("foreignObject");ad.attr("width", ` $ { 10 * td } px ` ),ad.attr("height", ` $ { 10 * td } px ` );const sd=ad.append("xhtml:div");let ud=qa.label;qa.label&&hasKatex(qa.label)&&(ud=await renderKatex(qa.label.replace(common_default.lineBreakRegex, `
2024-09-28 20:51:35 +08:00
` ),getConfig2()));const cd=qa.isNode?"nodeLabel":"edgeLabel",dd=sd.append("span");dd.html(ud),applyStyle $ 1(dd,qa.labelStyle),dd.attr("class", ` $ { cd } $ { rd } ` ),applyStyle $ 1(sd,qa.labelStyle),sd.style("display","table-cell"),sd.style("white-space","nowrap"),sd.style("line-height","1.5"),sd.style("max-width",td+"px"),sd.style("text-align","center"),sd.attr("xmlns","http://www.w3.org/1999/xhtml"),nd&&sd.attr("class","labelBkg");let pd=sd.node().getBoundingClientRect();return pd.width===td&&(sd.style("display","table"),sd.style("white-space","break-spaces"),sd.style("width",td+"px"),pd=sd.node().getBoundingClientRect()),ad.node()}__name(addHtmlSpan,"addHtmlSpan");function createTspan(Ra,qa,td){return Ra.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",qa*td-.1+"em").attr("dy",td+"em")}__name(createTspan,"createTspan");function computeWidthOfText(Ra,qa,td){const rd=Ra.append("text"),nd=createTspan(rd,1,qa);updateTextContentAndStyles(nd,td);const ad=nd.node().getComputedTextLength();return rd.remove(),ad}__name(computeWidthOfText,"computeWidthOfText");function computeDimensionOfText(Ra,qa,td){var sd;const rd=Ra.append("text"),nd=createTspan(rd,1,qa);updateTextContentAndStyles(nd,[{content:td,type:"normal"}]);const ad=(sd=nd.node())==null?void 0:sd.getBoundingClientRect();return ad&&rd.remove(),ad}__name(computeDimensionOfText,"computeDimensionOfText");function createFormattedText(Ra,qa,td,rd=!1){const ad=qa.append("g"),sd=ad.insert("rect").attr("class","background").attr("style","stroke: none"),ud=ad.append("text").attr("y","-10.1");let cd=0;for(const dd of td){const pd=__name(Td=>computeWidthOfText(ad,1.1,Td)<=Ra,"checkWidth"),fd=pd(dd)?[dd]:splitLineToFitWidth(dd,pd);for(const Td of fd){const Ad=createTspan(ud,cd,1.1);updateTextContentAndStyles(Ad,Td),cd++}}if(rd){const dd=ud.node().getBBox(),pd=2;return sd.attr("x",-pd).attr("y",-pd).attr("width",dd.width+2*pd).attr("height",dd.height+2*pd),ad.node()}else return ud.node()}__name(createFormattedText,"createFormattedText");function updateTextContentAndStyles(Ra,qa){Ra.text(""),qa.forEach((td,rd)=>{const nd=Ra.append("tspan").attr("font-style",td.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",td.type==="strong"?"bold":"normal");rd===0?nd.text(td.content):nd.text(" "+td.content)})}__name(updateTextContentAndStyles,"updateTextContentAndStyles");function replaceIconSubstring(Ra){return Ra.replace(/fa[bklrs]?:fa-[ \w -]+/g,qa=> ` < i class = '${qa.replace(":"," ")}' > < /i>`)}__name(replaceIconSubstring,"replaceIconSubstring");var createText=__name(async(Ra,qa="",{style:td="",isTitle:rd=!1,classes:nd="",useHtmlLabels:ad=!0,isNode:sd=!0,width:ud=200,addSvgBackground:cd=!1}={},dd)=>{if(log$1.debug("XYZ createText",qa,td,rd,nd,ad,sd,"addSvgBackground: ",cd),ad){const pd=markdownToHTML(qa,dd),fd=replaceIconSubstring(decodeEntities(pd)),Td=qa.replace(/ \ \ \ \ / g , "\\" ) , Ad = { isNode : sd , label : hasKatex ( qa ) ? Td : fd , labelStyle : td . replace ( "fill:" , "color:" ) } ; return await addHtmlSpan ( Ra , Ad , ud , nd , cd ) } else { const pd = qa . replace ( /<br\s*\/?>/g , "<br/>" ) , fd = markdownToLines ( pd . replace ( "<br>" , "<br/>" ) , dd ) , Td = createFormattedText ( ud , Ra , fd , qa ? cd : ! 1 ) ; if ( sd ) { /stroke:/ . exec ( td ) && ( td = td . replace ( "stroke:" , "lineColor:" ) ) ; const Ad = td . replace ( /stroke:[^;]+;?/g , "" ) . replace ( /stroke-width:[^;]+;?/g , "" ) . replace ( /fill:[^;]+;?/g , "" ) . replace ( /color:/g , "fill:" ) ; select ( Td ) . attr ( "style" , Ad ) } else { const Ad = td . replace ( /stroke:[^;]+;?/g , "" ) . replace ( /stroke-width:[^;]+;?/g , "" ) . replace ( /fill:[^;]+;?/g , "" ) . replace ( /background:/g , "fill:" ) ; select ( Td ) . select ( "rect" ) . attr ( "style" , Ad . replace ( /background:/g , "fill:" ) ) ; const Sd = td . replace ( /stroke:[^;]+;?/g , "" ) . replace ( /stroke-width:[^;]+;?/g , "" ) . replace ( /fill:[^;]+;?/g , "" ) . replace ( /color:/g , "fill:" ) ; select ( Td ) . select ( "text" ) . attr ( "style" , Sd ) } return Td } } , "createText" ) ; function t ( Ra , qa , td ) { if ( Ra && Ra . length ) { const [ rd , nd ] = qa , ad = Math . PI / 180 * td , sd = Math . cos ( ad ) , ud = Math . sin ( ad ) ; for ( const cd of Ra ) { const [ dd , pd ] = cd ; cd [ 0 ] = ( dd - rd ) * sd - ( pd - nd ) * ud + rd , cd [ 1 ] = ( dd - rd ) * ud + ( pd - nd ) * sd + nd } } } function e ( Ra , qa ) { return Ra [ 0 ] === qa [ 0 ] && Ra [ 1 ] === qa [ 1 ] } function s ( Ra , qa , td , rd = 1 ) { const n
` ),getConfig2()));const nd=Ra.isNode?"nodeLabel":"edgeLabel";return td.html('<span class="'+nd+'" '+(Ra.labelStyle?'style="'+Ra.labelStyle+'"':"")+">"+rd+"</span>"),applyStyle(td,Ra.labelStyle),td.style("display","inline-block"),td.style("padding-right","1px"),td.style("white-space","nowrap"),td.attr("xmlns","http://www.w3.org/1999/xhtml"),qa.node()}__name(addHtmlLabel,"addHtmlLabel");var createLabel=__name(async(Ra,qa,td,rd)=>{let nd=Ra||"";if(typeof nd=="object"&&(nd=nd[0]),evaluate(getConfig2().flowchart.htmlLabels)){nd=nd.replace(/ \\ n| \n /g,"<br />"),log $ 1.info("vertexText"+nd);const ad={isNode:rd,label:decodeEntities(nd).replace(/fa[blrs]?:fa-[ \w -]+/g,ud=> ` < i class = '${ud.replace(":"," ")}' > < /i>`),labelStyle:qa&&qa.replace("fill:","color:")};return await addHtmlLabel(ad)}else{const ad=document.createElementNS("http:/ / www . w3 . org / 2000 / svg "," text ");ad.setAttribute(" style ",qa.replace(" color : "," fill : "));let sd=[];typeof nd==" string "?sd=nd.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(nd)?sd=nd:sd=[];for(const ud of sd){const cd=document.createElementNS(" http : //www.w3.org/2000/svg","tspan");cd.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),cd.setAttribute("dy","1em"),cd.setAttribute("x","0"),td?cd.setAttribute("class","title-row"):cd.setAttribute("class","row"),cd.textContent=ud.trim(),ad.appendChild(cd)}return ad}},"createLabel"),createLabel_default=createLabel,createRoundedRectPathD=__name((Ra,qa,td,rd,nd)=>["M",Ra+nd,qa,"H",Ra+td-nd,"A",nd,nd,0,0,1,Ra+td,qa+nd,"V",qa+rd-nd,"A",nd,nd,0,0,1,Ra+td-nd,qa+rd,"H",Ra+nd,"A",nd,nd,0,0,1,Ra,qa+rd-nd,"V",qa+nd,"A",nd,nd,0,0,1,Ra+nd,qa,"Z"].join(" "),"createRoundedRectPathD"),solidStateFill=__name(Ra=>{const{handDrawnSeed:qa}=getConfig2();return{fill:Ra,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:Ra,seed:qa}},"solidStateFill"),compileStyles=__name(Ra=>{const qa=styles2Map([...Ra.cssCompiledStyles||[],...Ra.cssStyles||[]]);return{stylesMap:qa,stylesArray:[...qa]}},"compileStyles"),styles2Map=__name(Ra=>{const qa=new Map;return Ra.forEach(td=>{const[rd,nd]=td.split(":");qa.set(rd.trim(),nd==null?void 0:nd.trim())}),qa},"styles2Map"),styles2String=__name(Ra=>{const{stylesArray:qa}=compileStyles(Ra),td=[],rd=[],nd=[],ad=[];return qa.forEach(sd=>{const ud=sd[0];ud==="color"||ud==="font-size"||ud==="font-family"||ud==="font-weight"||ud==="font-style"||ud==="text-decoration"||ud==="text-align"||ud==="text-transform"||ud==="line-height"||ud==="letter-spacing"||ud==="word-spacing"||ud==="text-shadow"||ud==="text-overflow"||ud==="white-space"||ud==="word-wrap"||ud==="word-break"||ud==="overflow-wrap"||ud==="hyphens"?td.push(sd.join(":")+" !important"):(rd.push(sd.join(":")+" !important"),ud.includes("stroke")&&nd.push(sd.join(":")+" !important"),ud==="fill"&&ad.push(sd.join(":")+" !important"))}),{labelStyles:td.join(";"),nodeStyles:rd.join(";"),stylesArray:qa,borderStyles:nd,backgroundStyles:ad}},"styles2String"),userNodeOverrides=__name((Ra,qa)=>{const{themeVariables:td,handDrawnSeed:rd}=getConfig2(),{nodeBorder:nd,mainBkg:ad}=td,{stylesMap:sd}=compileStyles(Ra);return Object.assign({roughness:.7,fill:sd.get("fill")||ad,fillStyle:"hachure",fillWeight:4,stroke:sd.get("stroke")||nd,seed:rd,strokeWidth:1.3},qa)},"userNodeOverrides"),rect=__name(async(Ra,qa)=>{log$1.info("Creating subgraph rect for ",qa.id,qa);const td=getConfig2(),{themeVariables:rd,handDrawnSeed:nd}=td,{clusterBkg:ad,clusterBorder:sd}=rd,{labelStyles:ud,nodeStyles:cd,borderStyles:dd,backgroundStyles:pd}=styles2String(qa),fd=Ra.insert("g").attr("class","cluster "+qa.cssClasses).attr("id",qa.id).attr("data-look",qa.look),Td=evaluate(td.flowchart.htmlLabels),Ad=fd.insert("g").attr("class","cluster-label "),Sd=await createText(Ad,qa.label,{style:qa.labelStyle,useHtmlLabels:Td,isNode:!0});let Dd=Sd.getBBox();if(evaluate(td.flowchart.htmlLabels)){const Wd=Sd.children[0],Zd=select(Sd);Dd=Wd.getBoundingClientRect(),Zd.attr("width",Dd.width),Zd.attr("height",Dd.height)}const Ld=qa.width<=Dd.width+qa.padding?Dd.width+qa.padding:qa.width;qa.width<=Dd.width+qa.padding?qa.diff=(Ld-qa.width)
2024-09-18 09:46:23 +08:00
outsidePoint : $ { JSON . stringify ( qa ) }
2024-09-25 14:23:53 +08:00
insidePoint : $ { JSON . stringify ( td ) }
2024-09-28 20:51:35 +08:00
node : x : $ { Ra . x } y : $ { Ra . y } w : $ { Ra . width } h : $ { Ra . height } ` );const rd=Ra.x,nd=Ra.y,ad=Math.abs(rd-td.x),sd=Ra.width/2;let ud=td.x<qa.x?sd-ad:sd+ad;const cd=Ra.height/2,dd=Math.abs(qa.y-td.y),pd=Math.abs(qa.x-td.x);if(Math.abs(nd-qa.y)*sd>Math.abs(rd-qa.x)*cd){let fd=td.y<qa.y?qa.y-cd-nd:nd-cd-qa.y;ud=pd*fd/dd;const Td={x:td.x<qa.x?td.x+ud:td.x-pd+ud,y:td.y<qa.y?td.y+dd-fd:td.y-dd+fd};return ud===0&&(Td.x=qa.x,Td.y=qa.y),pd===0&&(Td.x=qa.x),dd===0&&(Td.y=qa.y),log $ 1.debug( ` abc89 top / bottom calc , Q $ { dd } , q $ { fd } , R $ { pd } , r $ { ud } ` ,Td),Td}else{td.x<qa.x?ud=qa.x-sd-rd:ud=rd-sd-qa.x;let fd=dd*ud/pd,Td=td.x<qa.x?td.x+pd-ud:td.x-pd+ud,Ad=td.y<qa.y?td.y+fd:td.y-fd;return log $ 1.debug( ` sides calc abc89 , Q $ { dd } , q $ { fd } , R $ { pd } , r $ { ud } ` ,{_x:Td,_y:Ad}),ud===0&&(Td=qa.x,Ad=qa.y),pd===0&&(Td=qa.x),dd===0&&(Ad=qa.y),{x:Td,y:Ad}}},"intersection"),cutPathAtIntersect=__name((Ra,qa)=>{log $ 1.warn("abc88 cutPathAtIntersect",Ra,qa);let td=[],rd=Ra[0],nd=!1;return Ra.forEach(ad=>{if(log $ 1.info("abc88 checking point",ad,qa),!outsideNode(qa,ad)&&!nd){const sd=intersection(qa,rd,ad);log $ 1.debug("abc88 inside",ad,rd,sd),log $ 1.debug("abc88 intersection",sd,qa);let ud=!1;td.forEach(cd=>{ud=ud||cd.x===sd.x&&cd.y===sd.y}),td.some(cd=>cd.x===sd.x&&cd.y===sd.y)?log $ 1.warn("abc88 no intersect",sd,td):td.push(sd),nd=!0}else log $ 1.warn("abc88 outside",ad,rd),rd=ad,nd||td.push(ad)}),log $ 1.debug("returning points",td),td},"cutPathAtIntersect");function extractCornerPoints(Ra){const qa=[],td=[];for(let rd=1;rd<Ra.length-1;rd++){const nd=Ra[rd-1],ad=Ra[rd],sd=Ra[rd+1];(nd.x===ad.x&&ad.y===sd.y&&Math.abs(ad.x-sd.x)>5&&Math.abs(ad.y-nd.y)>5||nd.y===ad.y&&ad.x===sd.x&&Math.abs(ad.x-nd.x)>5&&Math.abs(ad.y-sd.y)>5)&&(qa.push(ad),td.push(rd))}return{cornerPoints:qa,cornerPointPositions:td}}__name(extractCornerPoints,"extractCornerPoints");var findAdjacentPoint=__name(function(Ra,qa,td){const rd=qa.x-Ra.x,nd=qa.y-Ra.y,ad=Math.sqrt(rd*rd+nd*nd),sd=td/ad;return{x:qa.x-sd*rd,y:qa.y-sd*nd}},"findAdjacentPoint"),fixCorners=__name(function(Ra){const{cornerPointPositions:qa}=extractCornerPoints(Ra),td=[];for(let rd=0;rd<Ra.length;rd++)if(qa.includes(rd)){const nd=Ra[rd-1],ad=Ra[rd+1],sd=Ra[rd],ud=findAdjacentPoint(nd,sd,5),cd=findAdjacentPoint(ad,sd,5),dd=cd.x-ud.x,pd=cd.y-ud.y;td.push(ud);const fd=Math.sqrt(2)*2;let Td={x:sd.x,y:sd.y};if(Math.abs(ad.x-nd.x)>10&&Math.abs(ad.y-nd.y)>=10){log $ 1.debug("Corner point fixing",Math.abs(ad.x-nd.x),Math.abs(ad.y-nd.y));const Ad=5;sd.x===ud.x?Td={x:dd<0?ud.x-Ad+fd:ud.x+Ad-fd,y:pd<0?ud.y-fd:ud.y+fd}:Td={x:dd<0?ud.x-fd:ud.x+fd,y:pd<0?ud.y-Ad+fd:ud.y+Ad-fd}}else log $ 1.debug("Corner point skipping fixing",Math.abs(ad.x-nd.x),Math.abs(ad.y-nd.y));td.push(Td,cd)}else td.push(Ra[rd]);return td},"fixCorners"),insertEdge=__name(function(Ra,qa,td,rd,nd,ad,sd){const{handDrawnSeed:ud}=getConfig2();let cd=qa.points,dd=!1;const pd=nd;var fd=ad;fd.intersect&&pd.intersect&&(cd=cd.slice(1,qa.points.length-1),cd.unshift(pd.intersect(cd[0])),log $ 1.debug("Last point APA12",qa.start,"-->",qa.end,cd[cd.length-1],fd,fd.intersect(cd[cd.length-1])),cd.push(fd.intersect(cd[cd.length-1]))),qa.toCluster&&(log $ 1.info("to cluster abc88",td.get(qa.toCluster)),cd=cutPathAtIntersect(qa.points,td.get(qa.toCluster).node),dd=!0),qa.fromCluster&&(log $ 1.debug("from cluster abc88",td.get(qa.fromCluster),JSON.stringify(cd,null,2)),cd=cutPathAtIntersect(cd.reverse(),td.get(qa.fromCluster).node).reverse(),dd=!0);let Td=cd.filter(Zd=>!Number.isNaN(Zd.y));Td=fixCorners(Td);let Ad=Td[Td.length-1];if(Td.length>1){Ad=Td[Td.length-1];const Zd=Td[Td.length-2],zd=(Ad.x-Zd.x)/2,Qd=(Ad.y-Zd.y)/2,Jd={x:Zd.x+zd,y:Zd.y+Qd};Td.splice(-1,0,Jd)}let Sd=curveBasis;qa.curve&&(Sd=qa.curve);const{x:Dd,y:Ld}=getLineFunctionsWithOffset(qa),Rd=line $ 1().x(Dd).y(Ld).curve(Sd);let Od;switch(qa.thickness){case"normal":Od="edge-thickness-normal";break;case"thick":Od="edge-thickness-thick";break;case"invisible":Od="edge-thickness-invisible";break;default:Od="edge-thickness-normal"}switch(qa.pattern){case"solid":Od+=" edge-pattern-solid";break;case"dotted":Od+=" edge-pattern-dotted";break;case"
2024-09-25 14:23:53 +08:00
point : ` ,Td, `
2024-09-18 09:46:23 +08:00
node :
` ,qa, `
2024-09-28 21:10:55 +08:00
res : ` ,intersect_default.polygon(qa,dd,Td)),intersect_default.polygon(qa,dd,Td)},nd},"question"),createHexagonPathD=__name((Ra,qa,td,rd,nd)=>[ ` M$ { Ra + nd } , $ { qa } ` , ` L$ { Ra + td - nd } , $ { qa } ` , ` L$ { Ra + td } , $ { qa - rd / 2 } ` , ` L$ { Ra + td - nd } , $ { qa - rd } ` , ` L$ { Ra + nd } , $ { qa - rd } ` , ` L$ { Ra } , $ { qa - rd / 2 } ` ,"Z"].join(" "),"createHexagonPathD"),hexagon=__name(async(Ra,qa)=>{const{labelStyles:td,nodeStyles:rd}=styles2String(qa);qa.labelStyle=td;const{shapeSvg:nd,bbox:ad}=await labelHelper(Ra,qa,getNodeClasses(qa)),sd=4,ud=ad.height+qa.padding,cd=ud/sd,dd=ad.width+2*cd+qa.padding,pd=[{x:cd,y:0},{x:dd-cd,y:0},{x:dd,y:-ud/2},{x:dd-cd,y:-ud},{x:cd,y:-ud},{x:0,y:-ud/2}];let fd;const{cssStyles:Td}=qa;if(qa.look==="handDrawn"){const Ad=at $ 1.svg(nd),Sd=userNodeOverrides(qa,{}),Dd=createHexagonPathD(0,0,dd,ud,cd),Ld=Ad.path(Dd,Sd);fd=nd.insert(()=>Ld,":first-child").attr("transform", ` translate ( $ { - dd / 2 } , $ { ud / 2 } ) ` ),Td&&fd.attr("style",Td)}else fd=insertPolygonShape(nd,dd,ud,pd);return rd&&fd.attr("style",rd),qa.width=dd,qa.height=ud,updateNodeBounds(qa,fd),qa.intersect=function(Ad){return intersect_default.polygon(qa,pd,Ad)},nd},"hexagon"),createLeanRightPathD=__name((Ra,qa,td,rd)=>[ ` M$ { Ra - 2 * rd / 6 } , $ { qa } ` , ` L$ { Ra + td - rd / 6 } , $ { qa } ` , ` L$ { Ra + td + 2 * rd / 6 } , $ { qa - rd } ` , ` L$ { Ra + rd / 6 } , $ { qa - rd } ` ,"Z"].join(" "),"createLeanRightPathD"),lean_right=__name(async(Ra,qa)=>{const{labelStyles:td,nodeStyles:rd}=styles2String(qa);qa.labelStyle=td;const{shapeSvg:nd,bbox:ad}=await labelHelper(Ra,qa,getNodeClasses(qa)),sd=ad.width+qa.padding,ud=ad.height+qa.padding,cd=[{x:-2*ud/6,y:0},{x:sd-ud/6,y:0},{x:sd+2*ud/6,y:-ud},{x:ud/6,y:-ud}];let dd;const{cssStyles:pd}=qa;if(qa.look==="handDrawn"){const fd=at $ 1.svg(nd),Td=userNodeOverrides(qa,{}),Ad=createLeanRightPathD(0,0,sd,ud),Sd=fd.path(Ad,Td);dd=nd.insert(()=>Sd,":first-child").attr("transform", ` translate ( $ { - sd / 2 } , $ { ud / 2 } ) ` ),pd&&dd.attr("style",pd)}else dd=insertPolygonShape(nd,sd,ud,cd);return rd&&dd.attr("style",rd),qa.width=sd,qa.height=ud,updateNodeBounds(qa,dd),qa.intersect=function(fd){return intersect_default.polygon(qa,cd,fd)},nd},"lean_right"),createLeanLeftPathD=__name((Ra,qa,td,rd)=>[ ` M$ { Ra + 2 * rd / 6 } , $ { qa } ` , ` L$ { Ra + td + rd / 6 } , $ { qa } ` , ` L$ { Ra + td - 2 * rd / 6 } , $ { qa - rd } ` , ` L$ { Ra - rd / 6 } , $ { qa - rd } ` ,"Z"].join(" "),"createLeanLeftPathD"),lean_left=__name(async(Ra,qa)=>{const{labelStyles:td,nodeStyles:rd}=styles2String(qa);qa.labelStyle=td;const{shapeSvg:nd,bbox:ad}=await labelHelper(Ra,qa,getNodeClasses(qa)),sd=ad.width+qa.padding,ud=ad.height+qa.padding,cd=[{x:2*ud/6,y:0},{x:sd+ud/6,y:0},{x:sd-2*ud/6,y:-ud},{x:-ud/6,y:-ud}];let dd;const{cssStyles:pd}=qa;if(qa.look==="handDrawn"){const fd=at $ 1.svg(nd),Td=userNodeOverrides(qa,{}),Ad=createLeanLeftPathD(0,0,sd,ud),Sd=fd.path(Ad,Td);dd=nd.insert(()=>Sd,":first-child").attr("transform", ` translate ( $ { - sd / 2 } , $ { ud / 2 } ) ` ),pd&&dd.attr("style",pd)}else dd=insertPolygonShape(nd,sd,ud,cd);return rd&&dd.attr("style",rd),qa.width=sd,qa.height=ud,updateNodeBounds(qa,dd),qa.intersect=function(fd){return intersect_default.polygon(qa,cd,fd)},nd},"lean_left"),createTrapezoidPathD=__name((Ra,qa,td,rd)=>[ ` M$ { Ra - 2 * rd / 6 } , $ { qa } ` , ` L$ { Ra + td + 2 * rd / 6 } , $ { qa } ` , ` L$ { Ra + td - rd / 6 } , $ { qa - rd } ` , ` L$ { Ra + rd / 6 } , $ { qa - rd } ` ,"Z"].join(" "),"createTrapezoidPathD"),trapezoid=__name(async(Ra,qa)=>{const{labelStyles:td,nodeStyles:rd}=styles2String(qa);qa.labelStyle=td;const{shapeSvg:nd,bbox:ad}=await labelHelper(Ra,qa,getNodeClasses(qa)),sd=ad.width+qa.padding,ud=ad.height+qa.padding,cd=[{x:-2*ud/6,y:0},{x:sd+2*ud/6,y:0},{x:sd-ud/6,y:-ud},{x:ud/6,y:-ud}];let dd;const{cssStyles:pd}=qa;if(qa.look==="handDrawn"){const fd=at $ 1.svg(nd),Td=userNodeOverrides(qa,{}),Ad=createTrapezoidPathD(0,0,sd,ud),Sd=fd.path(Ad,Td);dd=nd.insert(()=>Sd,":first-child").attr("transform", ` translate ( $ { - sd / 2 } , $ { ud / 2 } ) ` ),pd&&dd.attr("style",pd)}else dd=insertPolygonShape(nd,sd,ud,cd);return rd&&dd.attr("style",rd),qa.width=sd,qa.height=ud,updateNodeBounds(qa,dd),qa.intersect=function(fd){return intersect_default.polygon(qa,cd,fd)},nd},"trapezoid"),createInvertedTrapezoidPathD=__name((Ra,qa,td,rd)=>[ ` M$ { Ra + rd / 6 } , $ { qa } ` , ` L$ { Ra + td - rd / 6 } , $ { qa } ` , ` L$ { Ra + td + 2 * rd / 6 } , $ { qa - rd } ` , ` L$ { Ra - 2 * rd / 6 } , $ { qa - rd } ` ,"Z
` );const rd=selectSvgElement(qa),nd=rd.append("g");rd.attr("viewBox","0 0 2412 512"),configureSvgSize(rd,100,512,!0),nd.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),nd.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),nd.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),nd.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),nd.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),nd.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),nd.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),nd.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text( ` mermaid version $ { td } ` )},"draw"),renderer={draw},errorRenderer_default=renderer,diagram={db:{},renderer,parser:{parse:__name(()=>{},"parse")}},errorDiagram_default=diagram,id18="flowchart-elk",detector18=__name((Ra,qa={})=>{var td;return/^ \s *flowchart-elk/.test(Ra)||/^ \s *flowchart|graph/.test(Ra)&&((td=qa==null?void 0:qa.flowchart)==null?void 0:td.defaultRenderer)==="elk"?(qa.layout="elk",!0):!1},"detector"),loader18=__name(async()=>{const{diagram:Ra}=await __vitePreload(async()=>{const{diagram:qa}=await import("./flowDiagram-JSIZSE4D-BQxRgrT4.js");return{diagram:qa}},__vite__mapDeps([8,9,10,11]));return{id:id18,diagram:Ra}},"loader"),plugin16={id:id18,detector:detector18,loader:loader18},detector_default=plugin16,id19="timeline",detector19=__name(Ra=>/^ \s *timeline/.test(Ra),"detector"),loader19=__name(async()=>{const{diagram:Ra}=await __vitePreload(async()=>{const{diagram:qa}=await import("./timeline-definition-KYQAIZUX-ZeSNtck4.js");return{diagram:qa}},__vite__mapDeps([36,22]));return{id:id19,diagram:Ra}},"loader"),plugin17={id:id19,detector:detector19,loader:loader19},detector_default2=plugin17,id20="mindmap",detector20=__name(Ra=>/^ \s *mindmap/.test(Ra),"detector"),loader20=__name(async()=>{const{diagram:Ra}=await __vitePreload(async()=>{const{diagram:qa}=await import("./mindmap-definition-FCEC46F3-DNGnOEa-.js");return{diagram:qa}},__vite__mapDeps([37,38]));return{id:id20,diagram:Ra}},"loader"),plugin18={id:id20,detector:detector20,loader:loader20},detector_default3=plugin18,id21="sankey",detector21=__name(Ra=>/^ \s *sankey-beta/.test(Ra),"detector"),loader21=__name(async()=>{const{diagram:Ra}=await __vitePreload(async()=>{const{diagram:qa}=await import("./sankeyDiagram-KMMQDL5K-CMbkK5Db.js");return{diagram:qa}},__vite__mapDeps([39,23,19]));return{id:id21,diagram:Ra}},"loader"),plugin19={id:id21,detector:detector21,loader:loader21},sankeyDetector_default=plugin19,id22="packet",detector22=__name(Ra=>/^ \s *packet-beta/.test(Ra),"detec
2024-09-25 14:23:53 +08:00
` ;try{getDiagram(nd)}catch{const fd=getDiagramLoader(nd);if(!fd)throw new UnknownDiagramError( ` Diagram $ { nd } not found . ` );const{id:Td,diagram:Ad}=await fd();registerDiagram(Td,Ad)}const{db:ad,parser:sd,renderer:ud,init:cd}=getDiagram(nd);return sd.parser&&(sd.parser.yy=ad),(dd=ad.clear)==null||dd.call(ad),cd==null||cd(rd),td.title&&((pd=ad.setDiagramTitle)==null||pd.call(ad,td.title)),await sd.parse(qa),new g1(nd,qa,ad,sd,ud)}async render(qa,td){await this.renderer.draw(this.text,qa,td,this)}getParser(){return this.parser}getType(){return this.type}},__name(g1,"Diagram"),g1),interactionFunctions=[],attachFunctions=__name(()=>{interactionFunctions.forEach(Ra=>{Ra()}),interactionFunctions=[]},"attachFunctions"),cleanupComments=__name(Ra=>Ra.replace(/^ \s *%%(?!{)[^ \n ]+ \n ?/gm,"").trimStart(),"cleanupComments");function isNothing(Ra){return typeof Ra>"u"||Ra===null}__name(isNothing,"isNothing");function isObject $ 3(Ra){return typeof Ra=="object"&&Ra!==null}__name(isObject $ 3,"isObject");function toArray $ 2(Ra){return Array.isArray(Ra)?Ra:isNothing(Ra)?[]:[Ra]}__name(toArray $ 2,"toArray");function extend $ 1(Ra,qa){var td,rd,nd,ad;if(qa)for(ad=Object.keys(qa),td=0,rd=ad.length;td<rd;td+=1)nd=ad[td],Ra[nd]=qa[nd];return Ra}__name(extend $ 1,"extend");function repeat(Ra,qa){var td="",rd;for(rd=0;rd<qa;rd+=1)td+=Ra;return td}__name(repeat,"repeat");function isNegativeZero(Ra){return Ra===0&&Number.NEGATIVE_INFINITY===1/Ra}__name(isNegativeZero,"isNegativeZero");var isNothing_1=isNothing,isObject_1=isObject $ 3,toArray_1=toArray $ 2,repeat_1=repeat,isNegativeZero_1=isNegativeZero,extend_1=extend $ 1,common={isNothing:isNothing_1,isObject:isObject_1,toArray:toArray_1,repeat:repeat_1,isNegativeZero:isNegativeZero_1,extend:extend_1};function formatError(Ra,qa){var td="",rd=Ra.reason||"(unknown reason)";return Ra.mark?(Ra.mark.name&&(td+='in "'+Ra.mark.name+'" '),td+="("+(Ra.mark.line+1)+":"+(Ra.mark.column+1)+")",!qa&&Ra.mark.snippet&&(td+= `
` +Ra.mark.snippet),rd+" "+td):rd}__name(formatError,"formatError");function YAMLException $ 1(Ra,qa){Error.call(this),this.name="YAMLException",this.reason=Ra,this.mark=qa,this.message=formatError(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}__name(YAMLException $ 1,"YAMLException $ 1");YAMLException $ 1.prototype=Object.create(Error.prototype);YAMLException $ 1.prototype.constructor=YAMLException $ 1;YAMLException $ 1.prototype.toString=__name(function(qa){return this.name+": "+formatError(this,qa)},"toString");var exception=YAMLException $ 1;function getLine(Ra,qa,td,rd,nd){var ad="",sd="",ud=Math.floor(nd/2)-1;return rd-qa>ud&&(ad=" ... ",qa=rd-ud+ad.length),td-rd>ud&&(sd=" ...",td=rd+ud-sd.length),{str:ad+Ra.slice(qa,td).replace(/ \t /g,"→")+sd,pos:rd-qa+ad.length}}__name(getLine,"getLine");function padStart(Ra,qa){return common.repeat(" ",qa-Ra.length)+Ra}__name(padStart,"padStart");function makeSnippet(Ra,qa){if(qa=Object.create(qa||null),!Ra.buffer)return null;qa.maxLength||(qa.maxLength=79),typeof qa.indent!="number"&&(qa.indent=1),typeof qa.linesBefore!="number"&&(qa.linesBefore=3),typeof qa.linesAfter!="number"&&(qa.linesAfter=2);for(var td=/ \r ? \n | \r | \0 /g,rd=[0],nd=[],ad,sd=-1;ad=td.exec(Ra.buffer);)nd.push(ad.index),rd.push(ad.index+ad[0].length),Ra.position<=ad.index&&sd<0&&(sd=rd.length-2);sd<0&&(sd=rd.length-1);var ud="",cd,dd,pd=Math.min(Ra.line+qa.linesAfter,nd.length).toString().length,fd=qa.maxLength-(qa.indent+pd+3);for(cd=1;cd<=qa.linesBefore&&!(sd-cd<0);cd++)dd=getLine(Ra.buffer,rd[sd-cd],nd[sd-cd],Ra.position-(rd[sd]-rd[sd-cd]),fd),ud=common.repeat(" ",qa.indent)+padStart((Ra.line-cd+1).toString(),pd)+" | "+dd.str+ `
` +ud;for(dd=getLine(Ra.buffer,rd[sd],nd[sd],Ra.position,fd),ud+=common.repeat(" ",qa.indent)+padStart((Ra.line+1).toString(),pd)+" | "+dd.str+ `
` ,ud+=common.repeat("-",qa.indent+pd+3+dd.pos)+ ` ^
` ,cd=1;cd<=qa.linesAfter&&!(sd+cd>=nd.length);cd++)dd=getLine(Ra.buffer,rd[sd+cd],nd[sd+cd],Ra.position-(rd[sd]-rd[sd+cd]),fd),ud+=common.repeat(" ",qa.indent)+padStart((Ra.line+cd+1).toString(),pd)+" | "+dd.str+ `
` ;return ud.replace(/ \n $ /,"")}__name(makeSnippet,"makeSnippet");var snippet=makeSnippet,TYPE_CONSTRUCTOR_OPTIONS=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],YAML_NODE_KINDS=["scalar","sequence","mapping"];function compileStyleAliases(Ra){var qa={};return Ra!==null&&Object.keys(Ra).forEach(function(td){Ra[td].forEach(function(rd){qa[String(rd)]=td})}),qa}__name(compileStyleAliases,"compileStyleAliases");function Type $ 1(Ra,qa){if(qa=qa||{},Object.keys(qa).forEach(function(td){if(TYPE_CONSTRUCTOR_OPTIONS.indexOf(td)===-1)throw new exception('Unknown option "'+td+'" is met in definition of "'+Ra+'" YAML type.')}),this.options=qa,this.tag=Ra,this.kind=qa.kind||null,this.resolve=qa.resolve||function(){return!0},this.construct=qa.construct||function(td){return td},this.instanceOf=qa.instanceOf||null,this.predicate=qa.predicate||null,this.represent=qa.represent||null,this.representName=qa.representName||null,this.defaultStyle=qa.defaultStyle||null,this.multi=qa.multi||!1,this.styleAliases=compileStyleAliases(qa.styleAliases||null),YAML_NODE_KINDS.indexOf(this.kind)===-1)throw new exception('Unknown kind "'+this.kind+'" is specified for "'+Ra+'" YAML type.')}__name(Type $ 1,"Type $ 1");var type $ 1=Type $ 1;function compileList(Ra,qa){var td=[];return Ra[qa].forEach(function(rd){var nd=td.length;td.forEach(function(ad,sd){ad.tag===rd.tag&&ad.kind===rd.kind&&ad.multi===rd.multi&&(nd=sd)}),td[nd]=rd}),td}__name(compileList,"compileList");function compileMap(){var Ra={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},qa,td;function rd(nd){nd.multi?(Ra.multi[nd.kind].push(nd),Ra.multi.fallback.push(nd)):Ra[nd.kind][nd.tag]=Ra.fallback[nd.tag]=nd}for(__name(rd,"collectType"),qa=0,td=arguments.length;qa<td;qa+=1)arguments[qa].forEach(rd);return Ra}__name(compileMap,"compileMap");function Schema $ 1(Ra){return this.extend(Ra)}__name(Schema $ 1,"Schema $ 1");Schema $ 1.prototype.extend=__name(function(qa){var td=[],rd=[];if(qa instanceof type $ 1)rd.push(qa);else if(Array.isArray(qa))rd=rd.concat(qa);else if(qa&&(Array.isArray(qa.implicit)||Array.isArray(qa.explicit)))qa.implicit&&(td=td.concat(qa.implicit)),qa.explicit&&(rd=rd.concat(qa.explicit));else throw new exception("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");td.forEach(function(ad){if(!(ad instanceof type $ 1))throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(ad.loadKind&&ad.loadKind!=="scalar")throw new exception("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(ad.multi)throw new exception("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),rd.forEach(function(ad){if(!(ad instanceof type $ 1))throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var nd=Object.create(Schema $ 1.prototype);return nd.implicit=(this.implicit||[]).concat(td),nd.explicit=(this.explicit||[]).concat(rd),nd.compiledImplicit=compileList(nd,"implicit"),nd.compiledExplicit=compileList(nd,"explicit"),nd.compiledTypeMap=compileMap(nd.compiledImplicit,nd.compiledExplicit),nd},"extend");var schema=Schema $ 1,str=new type $ 1("tag:yaml.org,2002:str",{kind:"scalar",construct:__name(function(Ra){return Ra!==null?Ra:""},"construct")}),seq $ 1=new type $ 1("tag:yaml.org,2002:seq",{kind:"sequence",construct:__name(function(Ra){return Ra!==null?Ra:[]},"construct")}),map $ 2=new type $ 1("tag:yaml.org,2002:map",{kind:"mapping",construct:__name(function(Ra){return Ra!==null?Ra:{}},"construct")}),failsafe=new schema({explicit:[str,seq $ 1,map $ 2]});function resolveYamlNull(Ra){if(Ra===null)return!0;var qa=Ra.length;return qa===1&&Ra==="~"||qa===4&&(Ra==="null"||Ra==="Null"||Ra==="NULL")}__name(resolveYamlNull,"resolveYamlNull");function constructYamlNull(){return null}__name(constructYamlNull,"constructYamlNull");function isNull(Ra){
\ r ` ;function resolveYamlBinary(Ra){if(Ra===null)return!1;var qa,td,rd=0,nd=Ra.length,ad=BASE64_MAP;for(td=0;td<nd;td++)if(qa=ad.indexOf(Ra.charAt(td)),!(qa>64)){if(qa<0)return!1;rd+=6}return rd%8===0}__name(resolveYamlBinary,"resolveYamlBinary");function constructYamlBinary(Ra){var qa,td,rd=Ra.replace(/[ \r \n =]/g,""),nd=rd.length,ad=BASE64_MAP,sd=0,ud=[];for(qa=0;qa<nd;qa++)qa%4===0&&qa&&(ud.push(sd>>16&255),ud.push(sd>>8&255),ud.push(sd&255)),sd=sd<<6|ad.indexOf(rd.charAt(qa));return td=nd%4*6,td===0?(ud.push(sd>>16&255),ud.push(sd>>8&255),ud.push(sd&255)):td===18?(ud.push(sd>>10&255),ud.push(sd>>2&255)):td===12&&ud.push(sd>>4&255),new Uint8Array(ud)}__name(constructYamlBinary,"constructYamlBinary");function representYamlBinary(Ra){var qa="",td=0,rd,nd,ad=Ra.length,sd=BASE64_MAP;for(rd=0;rd<ad;rd++)rd%3===0&&rd&&(qa+=sd[td>>18&63],qa+=sd[td>>12&63],qa+=sd[td>>6&63],qa+=sd[td&63]),td=(td<<8)+Ra[rd];return nd=ad%3,nd===0?(qa+=sd[td>>18&63],qa+=sd[td>>12&63],qa+=sd[td>>6&63],qa+=sd[td&63]):nd===2?(qa+=sd[td>>10&63],qa+=sd[td>>4&63],qa+=sd[td<<2&63],qa+=sd[64]):nd===1&&(qa+=sd[td>>2&63],qa+=sd[td<<4&63],qa+=sd[64],qa+=sd[64]),qa}__name(representYamlBinary,"representYamlBinary");function isBinary(Ra){return Object.prototype.toString.call(Ra)==="[object Uint8Array]"}__name(isBinary,"isBinary");var binary=new type $ 1("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary}),_hasOwnProperty $ 3=Object.prototype.hasOwnProperty,_toString $ 2=Object.prototype.toString;function resolveYamlOmap(Ra){if(Ra===null)return!0;var qa=[],td,rd,nd,ad,sd,ud=Ra;for(td=0,rd=ud.length;td<rd;td+=1){if(nd=ud[td],sd=!1,_toString $ 2.call(nd)!=="[object Object]")return!1;for(ad in nd)if(_hasOwnProperty $ 3.call(nd,ad))if(!sd)sd=!0;else return!1;if(!sd)return!1;if(qa.indexOf(ad)===-1)qa.push(ad);else return!1}return!0}__name(resolveYamlOmap,"resolveYamlOmap");function constructYamlOmap(Ra){return Ra!==null?Ra:[]}__name(constructYamlOmap,"constructYamlOmap");var omap=new type $ 1("tag:yaml.org,2002:omap",{kind:"sequence",resolve:resolveYamlOmap,construct:constructYamlOmap}),_toString $ 1=Object.prototype.toString;function resolveYamlPairs(Ra){if(Ra===null)return!0;var qa,td,rd,nd,ad,sd=Ra;for(ad=new Array(sd.length),qa=0,td=sd.length;qa<td;qa+=1){if(rd=sd[qa],_toString $ 1.call(rd)!=="[object Object]"||(nd=Object.keys(rd),nd.length!==1))return!1;ad[qa]=[nd[0],rd[nd[0]]]}return!0}__name(resolveYamlPairs,"resolveYamlPairs");function constructYamlPairs(Ra){if(Ra===null)return[];var qa,td,rd,nd,ad,sd=Ra;for(ad=new Array(sd.length),qa=0,td=sd.length;qa<td;qa+=1)rd=sd[qa],nd=Object.keys(rd),ad[qa]=[nd[0],rd[nd[0]]];return ad}__name(constructYamlPairs,"constructYamlPairs");var pairs=new type $ 1("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:resolveYamlPairs,construct:constructYamlPairs}),_hasOwnProperty $ 2=Object.prototype.hasOwnProperty;function resolveYamlSet(Ra){if(Ra===null)return!0;var qa,td=Ra;for(qa in td)if(_hasOwnProperty $ 2.call(td,qa)&&td[qa]!==null)return!1;return!0}__name(resolveYamlSet,"resolveYamlSet");function constructYamlSet(Ra){return Ra!==null?Ra:{}}__name(constructYamlSet,"constructYamlSet");var set=new type $ 1("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet}),_default=core $ 1.extend({implicit:[timestamp,merge $ 1],explicit:[binary,omap,pairs,set]}),_hasOwnProperty $ 1=Object.prototype.hasOwnProperty,CONTEXT_FLOW_IN=1,CONTEXT_FLOW_OUT=2,CONTEXT_BLOCK_IN=3,CONTEXT_BLOCK_OUT=4,CHOMPING_CLIP=1,CHOMPING_STRIP=2,CHOMPING_KEEP=3,PATTERN_NON_PRINTABLE=/[ \x 00- \x 08 \x 0B \x 0C \x 0E- \x 1F \x 7F- \x 84 \x 86- \x 9F \u FFFE \u FFFF]|[ \u D800- \u DBFF](?![ \u DC00- \u DFFF])|(?:[^ \u D800- \u DBFF]|^)[ \u DC00- \u DFFF]/,PATTERN_NON_ASCII_LINE_BREAKS=/[ \x 85 \u 2028 \u 2029]/,PATTERN_FLOW_INDICATORS=/[, \[ \] \{ \} ]/,PATTERN_TAG_HANDLE=/^(?:!|!!|![a-z \- ]+!) $ /i,PATTERN_TAG_URI=/^(?:!|[^, \[ \] \{ \} ])(?:%[0-9a-f]{2}|[0-9a-z \- #; \/ \? :@&= \+ \$ ,_ \. !~ \* ' \( \) \[ \] ])* $ /i;function _class(Ra){return Object.prototype.toString.call(Ra)}__name(_class,"_class");function is_EOL(Ra){return Ra===10||Ra=
` :Ra===118?" \v ":Ra===102?" \f ":Ra===114?" \r ":Ra===101?" \x 1B":Ra===32?" ":Ra===34?'"':Ra===47?"/":Ra===92?" \\ ":Ra===78?"
":Ra===95?" ":Ra===76?" \u 2028":Ra===80?" \u 2029":""}__name(simpleEscapeSequence,"simpleEscapeSequence");function charFromCodepoint(Ra){return Ra<=65535?String.fromCharCode(Ra):String.fromCharCode((Ra-65536>>10)+55296,(Ra-65536&1023)+56320)}__name(charFromCodepoint,"charFromCodepoint");var simpleEscapeCheck=new Array(256),simpleEscapeMap=new Array(256);for(i $ 1=0;i $ 1<256;i $ 1++)simpleEscapeCheck[i $ 1]=simpleEscapeSequence(i $ 1)?1:0,simpleEscapeMap[i $ 1]=simpleEscapeSequence(i $ 1);var i $ 1;function State $ 1(Ra,qa){this.input=Ra,this.filename=qa.filename||null,this.schema=qa.schema||_default,this.onWarning=qa.onWarning||null,this.legacy=qa.legacy||!1,this.json=qa.json||!1,this.listener=qa.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=Ra.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}__name(State $ 1,"State $ 1");function generateError(Ra,qa){var td={name:Ra.filename,buffer:Ra.input.slice(0,-1),position:Ra.position,line:Ra.line,column:Ra.position-Ra.lineStart};return td.snippet=snippet(td),new exception(qa,td)}__name(generateError,"generateError");function throwError(Ra,qa){throw generateError(Ra,qa)}__name(throwError,"throwError");function throwWarning(Ra,qa){Ra.onWarning&&Ra.onWarning.call(null,generateError(Ra,qa))}__name(throwWarning,"throwWarning");var directiveHandlers={YAML:__name(function(qa,td,rd){var nd,ad,sd;qa.version!==null&&throwError(qa,"duplication of %YAML directive"),rd.length!==1&&throwError(qa,"YAML directive accepts exactly one argument"),nd=/^([0-9]+) \. ([0-9]+) $ /.exec(rd[0]),nd===null&&throwError(qa,"ill-formed argument of the YAML directive"),ad=parseInt(nd[1],10),sd=parseInt(nd[2],10),ad!==1&&throwError(qa,"unacceptable YAML version of the document"),qa.version=rd[0],qa.checkLineBreaks=sd<2,sd!==1&&sd!==2&&throwWarning(qa,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:__name(function(qa,td,rd){var nd,ad;rd.length!==2&&throwError(qa,"TAG directive accepts exactly two arguments"),nd=rd[0],ad=rd[1],PATTERN_TAG_HANDLE.test(nd)||throwError(qa,"ill-formed tag handle (first argument) of the TAG directive"),_hasOwnProperty $ 1.call(qa.tagMap,nd)&&throwError(qa,'there is a previously declared suffix for "'+nd+'" tag handle'),PATTERN_TAG_URI.test(ad)||throwError(qa,"ill-formed tag prefix (second argument) of the TAG directive");try{ad=decodeURIComponent(ad)}catch{throwError(qa,"tag prefix is malformed: "+ad)}qa.tagMap[nd]=ad},"handleTagDirective")};function captureSegment(Ra,qa,td,rd){var nd,ad,sd,ud;if(qa<td){if(ud=Ra.input.slice(qa,td),rd)for(nd=0,ad=ud.length;nd<ad;nd+=1)sd=ud.charCodeAt(nd),sd===9||32<=sd&&sd<=1114111||throwError(Ra,"expected valid JSON character");else PATTERN_NON_PRINTABLE.test(ud)&&throwError(Ra,"the stream contains non-printable characters");Ra.result+=ud}}__name(captureSegment,"captureSegment");function mergeMappings(Ra,qa,td,rd){var nd,ad,sd,ud;for(common.isObject(td)||throwError(Ra,"cannot merge mappings; the provided source object is unacceptable"),nd=Object.keys(td),sd=0,ud=nd.length;sd<ud;sd+=1)ad=nd[sd],_hasOwnProperty $ 1.call(qa,ad)||(qa[ad]=td[ad],rd[ad]=!0)}__name(mergeMappings,"mergeMappings");function storeMappingPair(Ra,qa,td,rd,nd,ad,sd,ud,cd){var dd,pd;if(Array.isArray(nd))for(nd=Array.prototype.slice.call(nd),dd=0,pd=nd.length;dd<pd;dd+=1)Array.isArray(nd[dd])&&throwError(Ra,"nested arrays are not supported inside keys"),typeof nd=="object"&&_class(nd[dd])==="[object Object]"&&(nd[dd]="[object Object]");if(typeof nd=="object"&&_class(nd)==="[object Object]"&&(nd="[object Object]"),nd=String(nd),qa===null&&(qa={}),rd==="tag:yaml.org,2002:merge")if(Array.isArray(ad))for(dd=0,pd=ad.length;dd<pd;dd+=1)mergeMappings(Ra,qa,ad[dd],td);else mergeMappings(Ra,qa,ad,td);else!Ra.json&&!_hasOwnProperty $ 1.call(td,nd)&&_hasOwnProperty $ 1.call(qa,nd)&&(Ra.line=sd||Ra.line,Ra.lineStart=ud||Ra.lineStart,Ra.position=cd||Ra.positio
` ,qa-1))}__name(writeFoldedLines,"writeFoldedLines");function readPlainScalar(Ra,qa,td){var rd,nd,ad,sd,ud,cd,dd,pd,fd=Ra.kind,Td=Ra.result,Ad;if(Ad=Ra.input.charCodeAt(Ra.position),is_WS_OR_EOL(Ad)||is_FLOW_INDICATOR(Ad)||Ad===35||Ad===38||Ad===42||Ad===33||Ad===124||Ad===62||Ad===39||Ad===34||Ad===37||Ad===64||Ad===96||(Ad===63||Ad===45)&&(nd=Ra.input.charCodeAt(Ra.position+1),is_WS_OR_EOL(nd)||td&&is_FLOW_INDICATOR(nd)))return!1;for(Ra.kind="scalar",Ra.result="",ad=sd=Ra.position,ud=!1;Ad!==0;){if(Ad===58){if(nd=Ra.input.charCodeAt(Ra.position+1),is_WS_OR_EOL(nd)||td&&is_FLOW_INDICATOR(nd))break}else if(Ad===35){if(rd=Ra.input.charCodeAt(Ra.position-1),is_WS_OR_EOL(rd))break}else{if(Ra.position===Ra.lineStart&&testDocumentSeparator(Ra)||td&&is_FLOW_INDICATOR(Ad))break;if(is_EOL(Ad))if(cd=Ra.line,dd=Ra.lineStart,pd=Ra.lineIndent,skipSeparationSpace(Ra,!1,-1),Ra.lineIndent>=qa){ud=!0,Ad=Ra.input.charCodeAt(Ra.position);continue}else{Ra.position=sd,Ra.line=cd,Ra.lineStart=dd,Ra.lineIndent=pd;break}}ud&&(captureSegment(Ra,ad,sd,!1),writeFoldedLines(Ra,Ra.line-cd),ad=sd=Ra.position,ud=!1),is_WHITE_SPACE(Ad)||(sd=Ra.position+1),Ad=Ra.input.charCodeAt(++Ra.position)}return captureSegment(Ra,ad,sd,!1),Ra.result?!0:(Ra.kind=fd,Ra.result=Td,!1)}__name(readPlainScalar,"readPlainScalar");function readSingleQuotedScalar(Ra,qa){var td,rd,nd;if(td=Ra.input.charCodeAt(Ra.position),td!==39)return!1;for(Ra.kind="scalar",Ra.result="",Ra.position++,rd=nd=Ra.position;(td=Ra.input.charCodeAt(Ra.position))!==0;)if(td===39)if(captureSegment(Ra,rd,Ra.position,!0),td=Ra.input.charCodeAt(++Ra.position),td===39)rd=Ra.position,Ra.position++,nd=Ra.position;else return!0;else is_EOL(td)?(captureSegment(Ra,rd,nd,!0),writeFoldedLines(Ra,skipSeparationSpace(Ra,!1,qa)),rd=nd=Ra.position):Ra.position===Ra.lineStart&&testDocumentSeparator(Ra)?throwError(Ra,"unexpected end of the document within a single quoted scalar"):(Ra.position++,nd=Ra.position);throwError(Ra,"unexpected end of the stream within a single quoted scalar")}__name(readSingleQuotedScalar,"readSingleQuotedScalar");function readDoubleQuotedScalar(Ra,qa){var td,rd,nd,ad,sd,ud;if(ud=Ra.input.charCodeAt(Ra.position),ud!==34)return!1;for(Ra.kind="scalar",Ra.result="",Ra.position++,td=rd=Ra.position;(ud=Ra.input.charCodeAt(Ra.position))!==0;){if(ud===34)return captureSegment(Ra,td,Ra.position,!0),Ra.position++,!0;if(ud===92){if(captureSegment(Ra,td,Ra.position,!0),ud=Ra.input.charCodeAt(++Ra.position),is_EOL(ud))skipSeparationSpace(Ra,!1,qa);else if(ud<256&&simpleEscapeCheck[ud])Ra.result+=simpleEscapeMap[ud],Ra.position++;else if((sd=escapedHexLen(ud))>0){for(nd=sd,ad=0;nd>0;nd--)ud=Ra.input.charCodeAt(++Ra.position),(sd=fromHexCode(ud))>=0?ad=(ad<<4)+sd:throwError(Ra,"expected hexadecimal character");Ra.result+=charFromCodepoint(ad),Ra.position++}else throwError(Ra,"unknown escape sequence");td=rd=Ra.position}else is_EOL(ud)?(captureSegment(Ra,td,rd,!0),writeFoldedLines(Ra,skipSeparationSpace(Ra,!1,qa)),td=rd=Ra.position):Ra.position===Ra.lineStart&&testDocumentSeparator(Ra)?throwError(Ra,"unexpected end of the document within a double quoted scalar"):(Ra.position++,rd=Ra.position)}throwError(Ra,"unexpected end of the stream within a double quoted scalar")}__name(readDoubleQuotedScalar,"readDoubleQuotedScalar");function readFlowCollection(Ra,qa){var td=!0,rd,nd,ad,sd=Ra.tag,ud,cd=Ra.anchor,dd,pd,fd,Td,Ad,Sd=Object.create(null),Dd,Ld,Rd,Od;if(Od=Ra.input.charCodeAt(Ra.position),Od===91)pd=93,Ad=!1,ud=[];else if(Od===123)pd=125,Ad=!0,ud={};else return!1;for(Ra.anchor!==null&&(Ra.anchorMap[Ra.anchor]=ud),Od=Ra.input.charCodeAt(++Ra.position);Od!==0;){if(skipSeparationSpace(Ra,!0,qa),Od=Ra.input.charCodeAt(Ra.position),Od===pd)return Ra.position++,Ra.tag=sd,Ra.anchor=cd,Ra.kind=Ad?"mapping":"sequence",Ra.result=ud,!0;td?Od===44&&throwError(Ra,"expected the node content, but found ','"):throwError(Ra,"missed comma between flow collection entries"),Ld=Dd=Rd=null,fd=Td=!1,Od===63&&(dd=Ra.input.charCodeAt(Ra.position+1),is_WS_OR_EOL(dd)&&(fd=Td=!0,Ra.position++,skipSeparationSpace(Ra,!0,qa))),rd=Ra.l
` ,ad?1+cd:cd):nd===CHOMPING_CLIP&&ad&&(Ra.result+= `
` );break}for(rd?is_WHITE_SPACE(fd)?(dd=!0,Ra.result+=common.repeat( `
` ,ad?1+cd:cd)):dd?(dd=!1,Ra.result+=common.repeat( `
` ,cd+1)):cd===0?ad&&(Ra.result+=" "):Ra.result+=common.repeat( `
` ,cd):Ra.result+=common.repeat( `
` ,ad?1+cd:cd),ad=!0,sd=!0,cd=0,td=Ra.position;!is_EOL(fd)&&fd!==0;)fd=Ra.input.charCodeAt(++Ra.position);captureSegment(Ra,td,Ra.position,!1)}return!0}__name(readBlockScalar,"readBlockScalar");function readBlockSequence(Ra,qa){var td,rd=Ra.tag,nd=Ra.anchor,ad=[],sd,ud=!1,cd;if(Ra.firstTabInLine!==-1)return!1;for(Ra.anchor!==null&&(Ra.anchorMap[Ra.anchor]=ad),cd=Ra.input.charCodeAt(Ra.position);cd!==0&&(Ra.firstTabInLine!==-1&&(Ra.position=Ra.firstTabInLine,throwError(Ra,"tab characters must not be used in indentation")),!(cd!==45||(sd=Ra.input.charCodeAt(Ra.position+1),!is_WS_OR_EOL(sd))));){if(ud=!0,Ra.position++,skipSeparationSpace(Ra,!0,-1)&&Ra.lineIndent<=qa){ad.push(null),cd=Ra.input.charCodeAt(Ra.position);continue}if(td=Ra.line,composeNode(Ra,qa,CONTEXT_BLOCK_IN,!1,!0),ad.push(Ra.result),skipSeparationSpace(Ra,!0,-1),cd=Ra.input.charCodeAt(Ra.position),(Ra.line===td||Ra.lineIndent>qa)&&cd!==0)throwError(Ra,"bad indentation of a sequence entry");else if(Ra.lineIndent<qa)break}return ud?(Ra.tag=rd,Ra.anchor=nd,Ra.kind="sequence",Ra.result=ad,!0):!1}__name(readBlockSequence,"readBlockSequence");function readBlockMapping(Ra,qa,td){var rd,nd,ad,sd,ud,cd,dd=Ra.tag,pd=Ra.anchor,fd={},Td=Object.create(null),Ad=null,Sd=null,Dd=null,Ld=!1,Rd=!1,Od;if(Ra.firstTabInLine!==-1)return!1;for(Ra.anchor!==null&&(Ra.anchorMap[Ra.anchor]=fd),Od=Ra.input.charCodeAt(Ra.position);Od!==0;){if(!Ld&&Ra.firstTabInLine!==-1&&(Ra.position=Ra.firstTabInLine,throwError(Ra,"tab characters must not be used in indentation")),rd=Ra.input.charCodeAt(Ra.position+1),ad=Ra.line,(Od===63||Od===58)&&is_WS_OR_EOL(rd))Od===63?(Ld&&(storeMappingPair(Ra,fd,Td,Ad,Sd,null,sd,ud,cd),Ad=Sd=Dd=null),Rd=!0,Ld=!0,nd=!0):Ld?(Ld=!1,nd=!0):throwError(Ra,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),Ra.position+=1,Od=rd;else{if(sd=Ra.line,ud=Ra.lineStart,cd=Ra.position,!composeNode(Ra,td,CONTEXT_FLOW_OUT,!1,!0))break;if(Ra.line===ad){for(Od=Ra.input.charCodeAt(Ra.position);is_WHITE_SPACE(Od);)Od=Ra.input.charCodeAt(++Ra.position);if(Od===58)Od=Ra.input.charCodeAt(++Ra.position),is_WS_OR_EOL(Od)||throwError(Ra,"a whitespace character is expected after the key-value separator within a block mapping"),Ld&&(storeMappingPair(Ra,fd,Td,Ad,Sd,null,sd,ud,cd),Ad=Sd=Dd=null),Rd=!0,Ld=!1,nd=!1,Ad=Ra.tag,Sd=Ra.result;else if(Rd)throwError(Ra,"can not read an implicit mapping pair; a colon is missed");else return Ra.tag=dd,Ra.anchor=pd,!0}else if(Rd)throwError(Ra,"can not read a block mapping entry; a multiline key may not be an implicit key");else return Ra.tag=dd,Ra.anchor=pd,!0}if((Ra.line===ad||Ra.lineIndent>qa)&&(Ld&&(sd=Ra.line,ud=Ra.lineStart,cd=Ra.position),composeNode(Ra,qa,CONTEXT_BLOCK_OUT,!0,nd)&&(Ld?Sd=Ra.result:Dd=Ra.result),Ld||(storeMappingPair(Ra,fd,Td,Ad,Sd,Dd,sd,ud,cd),Ad=Sd=Dd=null),skipSeparationSpace(Ra,!0,-1),Od=Ra.input.charCodeAt(Ra.position)),(Ra.line===ad||Ra.lineIndent>qa)&&Od!==0)throwError(Ra,"bad indentation of a mapping entry");else if(Ra.lineIndent<qa)break}return Ld&&storeMappingPair(Ra,fd,Td,Ad,Sd,null,sd,ud,cd),Rd&&(Ra.tag=dd,Ra.anchor=pd,Ra.kind="mapping",Ra.result=fd),Rd}__name(readBlockMapping,"readBlockMapping");function readTagProperty(Ra){var qa,td=!1,rd=!1,nd,ad,sd;if(sd=Ra.input.charCodeAt(Ra.position),sd!==33)return!1;if(Ra.tag!==null&&throwError(Ra,"duplication of a tag property"),sd=Ra.input.charCodeAt(++Ra.position),sd===60?(td=!0,sd=Ra.input.charCodeAt(++Ra.position)):sd===33?(rd=!0,nd="!!",sd=Ra.input.charCodeAt(++Ra.position)):nd="!",qa=Ra.position,td){do sd=Ra.input.charCodeAt(++Ra.position);while(sd!==0&&sd!==62);Ra.position<Ra.length?(ad=Ra.input.slice(qa,Ra.position),sd=Ra.input.charCodeAt(++Ra.position)):throwError(Ra,"unexpected end of the stream within a verbatim tag")}else{for(;sd!==0&&!is_WS_OR_EOL(sd);)sd===33&&(rd?throwError(Ra,"tag suffix cannot contain exclamation marks"):(nd=Ra.input.slice(qa-1,Ra.position+1),PATTERN_TAG_HANDLE.test(nd)||throwError(Ra,"named tag handle cannot contain such characters"),rd=!0,qa=Ra.position+1)),sd=Ra.input.charCodeAt(++Ra.position);
` ),Ra.charCodeAt(0)===65279&&(Ra=Ra.slice(1)));var td=new State $ 1(Ra,qa),rd=Ra.indexOf(" \0 ");for(rd!==-1&&(td.position=rd,throwError(td,"null byte is not allowed in input")),td.input+=" \0 ";td.input.charCodeAt(td.position)===32;)td.lineIndent+=1,td.position+=1;for(;td.position<td.length-1;)readDocument(td);return td.documents}__name(loadDocuments,"loadDocuments");function loadAll $ 1(Ra,qa,td){qa!==null&&typeof qa=="object"&&typeof td>"u"&&(td=qa,qa=null);var rd=loadDocuments(Ra,td);if(typeof qa!="function")return rd;for(var nd=0,ad=rd.length;nd<ad;nd+=1)qa(rd[nd])}__name(loadAll $ 1,"loadAll $ 1");function load $ 1(Ra,qa){var td=loadDocuments(Ra,qa);if(td.length!==0){if(td.length===1)return td[0];throw new exception("expected a single document in the stream, but found more")}}__name(load $ 1,"load $ 1");var loadAll_1=loadAll $ 1,load_1=load $ 1,loader25={loadAll:loadAll_1,load:load_1},_toString=Object.prototype.toString,_hasOwnProperty=Object.prototype.hasOwnProperty,CHAR_BOM=65279,CHAR_TAB=9,CHAR_LINE_FEED=10,CHAR_CARRIAGE_RETURN=13,CHAR_SPACE=32,CHAR_EXCLAMATION=33,CHAR_DOUBLE_QUOTE=34,CHAR_SHARP=35,CHAR_PERCENT=37,CHAR_AMPERSAND=38,CHAR_SINGLE_QUOTE=39,CHAR_ASTERISK=42,CHAR_COMMA=44,CHAR_MINUS=45,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_GREATER_THAN=62,CHAR_QUESTION=63,CHAR_COMMERCIAL_AT=64,CHAR_LEFT_SQUARE_BRACKET=91,CHAR_RIGHT_SQUARE_BRACKET=93,CHAR_GRAVE_ACCENT=96,CHAR_LEFT_CURLY_BRACKET=123,CHAR_VERTICAL_LINE=124,CHAR_RIGHT_CURLY_BRACKET=125,ESCAPE_SEQUENCES={};ESCAPE_SEQUENCES[0]=" \\ 0";ESCAPE_SEQUENCES[7]=" \\ a";ESCAPE_SEQUENCES[8]=" \\ b";ESCAPE_SEQUENCES[9]=" \\ t";ESCAPE_SEQUENCES[10]=" \\ n";ESCAPE_SEQUENCES[11]=" \\ v";ESCAPE_SEQUENCES[12]=" \\ f";ESCAPE_SEQUENCES[13]=" \\ r";ESCAPE_SEQUENCES[27]=" \\ e";ESCAPE_SEQUENCES[34]=' \\ "';ESCAPE_SEQUENCES[92]=" \\ \\ ";ESCAPE_SEQUENCES[133]=" \\ N";ESCAPE_SEQUENCES[160]=" \\ _";ESCAPE_SEQUENCES[8232]=" \\ L";ESCAPE_SEQUENCES[8233]=" \\ P";var DEPRECATED_BOOLEANS_SYNTAX=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],DEPRECATED_BASE60_SYNTAX=/^[-+]?[0-9_]+(?::[0-9_]+)+(?: \. [0-9_]*)? $ /;function compileStyleMap(Ra,qa){var td,rd,nd,ad,sd,ud,cd;if(qa===null)return{};for(td={},rd=Object.keys(qa),nd=0,ad=rd.length;nd<ad;nd+=1)sd=rd[nd],ud=String(qa[sd]),sd.slice(0,2)==="!!"&&(sd="tag:yaml.org,2002:"+sd.slice(2)),cd=Ra.compiledTypeMap.fallback[sd],cd&&_hasOwnProperty.call(cd.styleAliases,ud)&&(ud=cd.styleAliases[ud]),td[sd]=ud;return td}__name(compileStyleMap,"compileStyleMap");function encodeHex(Ra){var qa,td,rd;if(qa=Ra.toString(16).toUpperCase(),Ra<=255)td="x",rd=2;else if(Ra<=65535)td="u",rd=4;else if(Ra<=4294967295)td="U",rd=8;else throw new exception("code point within a string may not be greater than 0xFFFFFFFF");return" \\ "+td+common.repeat("0",rd-qa.length)+qa}__name(encodeHex,"encodeHex");var QUOTING_TYPE_SINGLE=1,QUOTING_TYPE_DOUBLE=2;function State(Ra){this.schema=Ra.schema||_default,this.indent=Math.max(1,Ra.indent||2),this.noArrayIndent=Ra.noArrayIndent||!1,this.skipInvalid=Ra.skipInvalid||!1,this.flowLevel=common.isNothing(Ra.flowLevel)?-1:Ra.flowLevel,this.styleMap=compileStyleMap(this.schema,Ra.styles||null),this.sortKeys=Ra.sortKeys||!1,this.lineWidth=Ra.lineWidth||80,this.noRefs=Ra.noRefs||!1,this.noCompatMode=Ra.noCompatMode||!1,this.condenseFlow=Ra.condenseFlow||!1,this.quotingType=Ra.quotingType==='"'?QUOTING_TYPE_DOUBLE:QUOTING_TYPE_SINGLE,this.forceQuotes=Ra.forceQuotes||!1,this.replacer=typeof Ra.replacer=="function"?Ra.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}__name(State,"State");function indentString(Ra,qa){for(var td=common.repeat(" ",qa),rd=0,nd=-1,ad="",sd,ud=Ra.length;rd<ud;)nd=Ra.indexOf( `
` ,rd),nd===-1?(sd=Ra.slice(rd),rd=ud):(sd=Ra.slice(rd,nd+1),rd=nd+1),sd.length&&sd!== `
` &&(ad+=td),ad+=sd;return ad}__name(indentString,"indentString");function generateNextLine(Ra,qa){return `
` +common.repeat(" ",Ra.indent*qa)}__name(generateNextLine,"generateNextLine");function testImplicitResolving(Ra,qa){var td,rd,nd;for(td=0,rd=Ra.implicitTypes.length;td<rd;td+=1)if(nd=Ra.implicitTypes[td],nd.resolve(qa))return!0;return!1}__name(testImplicitResolving,"testImplicitResolving");function isWhitespace(Ra){return Ra===CHAR_SPACE||Ra===CHAR_TAB}__name(isWhitespace,"isWhitespace");function isPrintable(Ra){return 32<=Ra&&Ra<=126||161<=Ra&&Ra<=55295&&Ra!==8232&&Ra!==8233||57344<=Ra&&Ra<=65533&&Ra!==CHAR_BOM||65536<=Ra&&Ra<=1114111}__name(isPrintable,"isPrintable");function isNsCharOrWhitespace(Ra){return isPrintable(Ra)&&Ra!==CHAR_BOM&&Ra!==CHAR_CARRIAGE_RETURN&&Ra!==CHAR_LINE_FEED}__name(isNsCharOrWhitespace,"isNsCharOrWhitespace");function isPlainSafe(Ra,qa,td){var rd=isNsCharOrWhitespace(Ra),nd=rd&&!isWhitespace(Ra);return(td?rd:rd&&Ra!==CHAR_COMMA&&Ra!==CHAR_LEFT_SQUARE_BRACKET&&Ra!==CHAR_RIGHT_SQUARE_BRACKET&&Ra!==CHAR_LEFT_CURLY_BRACKET&&Ra!==CHAR_RIGHT_CURLY_BRACKET)&&Ra!==CHAR_SHARP&&!(qa===CHAR_COLON&&!nd)||isNsCharOrWhitespace(qa)&&!isWhitespace(qa)&&Ra===CHAR_SHARP||qa===CHAR_COLON&&nd}__name(isPlainSafe,"isPlainSafe");function isPlainSafeFirst(Ra){return isPrintable(Ra)&&Ra!==CHAR_BOM&&!isWhitespace(Ra)&&Ra!==CHAR_MINUS&&Ra!==CHAR_QUESTION&&Ra!==CHAR_COLON&&Ra!==CHAR_COMMA&&Ra!==CHAR_LEFT_SQUARE_BRACKET&&Ra!==CHAR_RIGHT_SQUARE_BRACKET&&Ra!==CHAR_LEFT_CURLY_BRACKET&&Ra!==CHAR_RIGHT_CURLY_BRACKET&&Ra!==CHAR_SHARP&&Ra!==CHAR_AMPERSAND&&Ra!==CHAR_ASTERISK&&Ra!==CHAR_EXCLAMATION&&Ra!==CHAR_VERTICAL_LINE&&Ra!==CHAR_EQUALS&&Ra!==CHAR_GREATER_THAN&&Ra!==CHAR_SINGLE_QUOTE&&Ra!==CHAR_DOUBLE_QUOTE&&Ra!==CHAR_PERCENT&&Ra!==CHAR_COMMERCIAL_AT&&Ra!==CHAR_GRAVE_ACCENT}__name(isPlainSafeFirst,"isPlainSafeFirst");function isPlainSafeLast(Ra){return!isWhitespace(Ra)&&Ra!==CHAR_COLON}__name(isPlainSafeLast,"isPlainSafeLast");function codePointAt(Ra,qa){var td=Ra.charCodeAt(qa),rd;return td>=55296&&td<=56319&&qa+1<Ra.length&&(rd=Ra.charCodeAt(qa+1),rd>=56320&&rd<=57343)?(td-55296)*1024+rd-56320+65536:td}__name(codePointAt,"codePointAt");function needIndentIndicator(Ra){var qa=/^ \n * /;return qa.test(Ra)}__name(needIndentIndicator,"needIndentIndicator");var STYLE_PLAIN=1,STYLE_SINGLE=2,STYLE_LITERAL=3,STYLE_FOLDED=4,STYLE_DOUBLE=5;function chooseScalarStyle(Ra,qa,td,rd,nd,ad,sd,ud){var cd,dd=0,pd=null,fd=!1,Td=!1,Ad=rd!==-1,Sd=-1,Dd=isPlainSafeFirst(codePointAt(Ra,0))&&isPlainSafeLast(codePointAt(Ra,Ra.length-1));if(qa||sd)for(cd=0;cd<Ra.length;dd>=65536?cd+=2:cd++){if(dd=codePointAt(Ra,cd),!isPrintable(dd))return STYLE_DOUBLE;Dd=Dd&&isPlainSafe(dd,pd,ud),pd=dd}else{for(cd=0;cd<Ra.length;dd>=65536?cd+=2:cd++){if(dd=codePointAt(Ra,cd),dd===CHAR_LINE_FEED)fd=!0,Ad&&(Td=Td||cd-Sd-1>rd&&Ra[Sd+1]!==" ",Sd=cd);else if(!isPrintable(dd))return STYLE_DOUBLE;Dd=Dd&&isPlainSafe(dd,pd,ud),pd=dd}Td=Td||Ad&&cd-Sd-1>rd&&Ra[Sd+1]!==" "}return!fd&&!Td?Dd&&!sd&&!nd(Ra)?STYLE_PLAIN:ad===QUOTING_TYPE_DOUBLE?STYLE_DOUBLE:STYLE_SINGLE:td>9&&needIndentIndicator(Ra)?STYLE_DOUBLE:sd?ad===QUOTING_TYPE_DOUBLE?STYLE_DOUBLE:STYLE_SINGLE:Td?STYLE_FOLDED:STYLE_LITERAL}__name(chooseScalarStyle,"chooseScalarStyle");function writeScalar(Ra,qa,td,rd,nd){Ra.dump=function(){if(qa.length===0)return Ra.quotingType===QUOTING_TYPE_DOUBLE?'""':"''";if(!Ra.noCompatMode&&(DEPRECATED_BOOLEANS_SYNTAX.indexOf(qa)!==-1||DEPRECATED_BASE60_SYNTAX.test(qa)))return Ra.quotingType===QUOTING_TYPE_DOUBLE?'"'+qa+'"':"'"+qa+"'";var ad=Ra.indent*Math.max(1,td),sd=Ra.lineWidth===-1?-1:Math.max(Math.min(Ra.lineWidth,40),Ra.lineWidth-ad),ud=rd||Ra.flowLevel>-1&&td>=Ra.flowLevel;function cd(dd){return testImplicitResolving(Ra,dd)}switch(__name(cd,"testAmbiguity"),chooseScalarStyle(qa,ud,Ra.indent,sd,cd,Ra.quotingType,Ra.forceQuotes&&!rd,nd)){case STYLE_PLAIN:return qa;case STYLE_SINGLE:return"'"+qa.replace(/'/g,"''")+"'";case STYLE_LITERAL:return"|"+blockHeader(qa,Ra.indent)+dropEndingNewline(indentString(qa,ad));case STYLE_FOLDED:return">"+blockHeader(qa,Ra.indent)+dropEndingNewline(indentString(foldString(qa,sd),ad));case STYLE_DOUBLE:return'"'+escapeString(qa)+'"';default:throw new
` ,nd=rd&&(Ra[Ra.length-2]=== `
2024-09-18 09:46:23 +08:00
` ||Ra=== `
2024-09-25 14:23:53 +08:00
` ),ad=nd?"+":rd?"":"-";return td+ad+ `
2024-09-18 09:46:23 +08:00
` }__name(blockHeader,"blockHeader");function dropEndingNewline(Ra){return Ra[Ra.length-1]=== `
2024-09-25 14:23:53 +08:00
` ?Ra.slice(0,-1):Ra}__name(dropEndingNewline,"dropEndingNewline");function foldString(Ra,qa){for(var td=/( \n +)([^ \n ]*)/g,rd=function(){var dd=Ra.indexOf( `
` );return dd=dd!==-1?dd:Ra.length,td.lastIndex=dd,foldLine(Ra.slice(0,dd),qa)}(),nd=Ra[0]=== `
` ||Ra[0]===" ",ad,sd;sd=td.exec(Ra);){var ud=sd[1],cd=sd[2];ad=cd[0]===" ",rd+=ud+(!nd&&!ad&&cd!==""? `
` :"")+foldLine(cd,qa),nd=ad}return rd}__name(foldString,"foldString");function foldLine(Ra,qa){if(Ra===""||Ra[0]===" ")return Ra;for(var td=/ [^ ]/g,rd,nd=0,ad,sd=0,ud=0,cd="";rd=td.exec(Ra);)ud=rd.index,ud-nd>qa&&(ad=sd>nd?sd:ud,cd+= `
` +Ra.slice(nd,ad),nd=ad+1),sd=ud;return cd+= `
` ,Ra.length-nd>qa&&sd>nd?cd+=Ra.slice(nd,sd)+ `
` +Ra.slice(sd+1):cd+=Ra.slice(nd),cd.slice(1)}__name(foldLine,"foldLine");function escapeString(Ra){for(var qa="",td=0,rd,nd=0;nd<Ra.length;td>=65536?nd+=2:nd++)td=codePointAt(Ra,nd),rd=ESCAPE_SEQUENCES[td],!rd&&isPrintable(td)?(qa+=Ra[nd],td>=65536&&(qa+=Ra[nd+1])):qa+=rd||encodeHex(td);return qa}__name(escapeString,"escapeString");function writeFlowSequence(Ra,qa,td){var rd="",nd=Ra.tag,ad,sd,ud;for(ad=0,sd=td.length;ad<sd;ad+=1)ud=td[ad],Ra.replacer&&(ud=Ra.replacer.call(td,String(ad),ud)),(writeNode(Ra,qa,ud,!1,!1)||typeof ud>"u"&&writeNode(Ra,qa,null,!1,!1))&&(rd!==""&&(rd+=","+(Ra.condenseFlow?"":" ")),rd+=Ra.dump);Ra.tag=nd,Ra.dump="["+rd+"]"}__name(writeFlowSequence,"writeFlowSequence");function writeBlockSequence(Ra,qa,td,rd){var nd="",ad=Ra.tag,sd,ud,cd;for(sd=0,ud=td.length;sd<ud;sd+=1)cd=td[sd],Ra.replacer&&(cd=Ra.replacer.call(td,String(sd),cd)),(writeNode(Ra,qa+1,cd,!0,!0,!1,!0)||typeof cd>"u"&&writeNode(Ra,qa+1,null,!0,!0,!1,!0))&&((!rd||nd!=="")&&(nd+=generateNextLine(Ra,qa)),Ra.dump&&CHAR_LINE_FEED===Ra.dump.charCodeAt(0)?nd+="-":nd+="- ",nd+=Ra.dump);Ra.tag=ad,Ra.dump=nd||"[]"}__name(writeBlockSequence,"writeBlockSequence");function writeFlowMapping(Ra,qa,td){var rd="",nd=Ra.tag,ad=Object.keys(td),sd,ud,cd,dd,pd;for(sd=0,ud=ad.length;sd<ud;sd+=1)pd="",rd!==""&&(pd+=", "),Ra.condenseFlow&&(pd+='"'),cd=ad[sd],dd=td[cd],Ra.replacer&&(dd=Ra.replacer.call(td,cd,dd)),writeNode(Ra,qa,cd,!1,!1)&&(Ra.dump.length>1024&&(pd+="? "),pd+=Ra.dump+(Ra.condenseFlow?'"':"")+":"+(Ra.condenseFlow?"":" "),writeNode(Ra,qa,dd,!1,!1)&&(pd+=Ra.dump,rd+=pd));Ra.tag=nd,Ra.dump="{"+rd+"}"}__name(writeFlowMapping,"writeFlowMapping");function writeBlockMapping(Ra,qa,td,rd){var nd="",ad=Ra.tag,sd=Object.keys(td),ud,cd,dd,pd,fd,Td;if(Ra.sortKeys===!0)sd.sort();else if(typeof Ra.sortKeys=="function")sd.sort(Ra.sortKeys);else if(Ra.sortKeys)throw new exception("sortKeys must be a boolean or a function");for(ud=0,cd=sd.length;ud<cd;ud+=1)Td="",(!rd||nd!=="")&&(Td+=generateNextLine(Ra,qa)),dd=sd[ud],pd=td[dd],Ra.replacer&&(pd=Ra.replacer.call(td,dd,pd)),writeNode(Ra,qa+1,dd,!0,!0,!0)&&(fd=Ra.tag!==null&&Ra.tag!=="?"||Ra.dump&&Ra.dump.length>1024,fd&&(Ra.dump&&CHAR_LINE_FEED===Ra.dump.charCodeAt(0)?Td+="?":Td+="? "),Td+=Ra.dump,fd&&(Td+=generateNextLine(Ra,qa)),writeNode(Ra,qa+1,pd,!0,fd)&&(Ra.dump&&CHAR_LINE_FEED===Ra.dump.charCodeAt(0)?Td+=":":Td+=": ",Td+=Ra.dump,nd+=Td));Ra.tag=ad,Ra.dump=nd||"{}"}__name(writeBlockMapping,"writeBlockMapping");function detectType2(Ra,qa,td){var rd,nd,ad,sd,ud,cd;for(nd=td?Ra.explicitTypes:Ra.implicitTypes,ad=0,sd=nd.length;ad<sd;ad+=1)if(ud=nd[ad],(ud.instanceOf||ud.predicate)&&(!ud.instanceOf||typeof qa=="object"&&qa instanceof ud.instanceOf)&&(!ud.predicate||ud.predicate(qa))){if(td?ud.multi&&ud.representName?Ra.tag=ud.representName(qa):Ra.tag=ud.tag:Ra.tag="?",ud.represent){if(cd=Ra.styleMap[ud.tag]||ud.defaultStyle,_toString.call(ud.represent)==="[object Function]")rd=ud.represent(qa,cd);else if(_hasOwnProperty.call(ud.represent,cd))rd=ud.represent[cd](qa,cd);else throw new exception("!<"+ud.tag+'> tag resolver accepts not "'+cd+'" style');Ra.dump=rd}return!0}return!1}__name(detectType2,"detectType");function writeNode(Ra,qa,td,rd,nd,ad,sd){Ra.tag=null,Ra.dump=td,detectType2(Ra,td,!1)||detectType2(Ra,td,!0);var ud=_toString.call(Ra.dump),cd=rd,dd;rd&&(rd=Ra.flowLevel<0||Ra.flowLevel>qa);var pd=ud==="[object Object]"||ud==="[object Array]",fd,Td;if(pd&&(fd=Ra.duplicates.indexOf(td),Td=fd!==-1),(Ra.tag!==null&&Ra.tag!=="?"||Td||Ra.indent!==2&&qa>0)&&(nd=!1),Td&&Ra.usedDuplicates[fd])Ra.dump="*ref_"+fd;else{if(pd&&Td&&!Ra.usedDuplicates[fd]&&(Ra.usedDuplicates[fd]=!0),ud==="[object Object]")rd&&Object.keys(Ra.dump).length!==0?(writeBlockMapping(Ra,qa,Ra.dump,nd),Td&&(Ra.dump="&ref_"+fd+Ra.dump)):(writeFlowMapping(Ra,qa,Ra.dump),Td&&(Ra.dump="&ref_"+fd+" "+Ra.dump));else if(ud==="[object Array]")rd&&Ra.dump.length!==0?(Ra.noArrayIndent&&!sd&&qa>0?writeBlockSequence(Ra,qa-1,Ra.dump,nd):writeBlockSequence(Ra,qa,Ra.dump,nd),Td&&(Ra.dump="&ref_"+fd+Ra.dump)):(writeFlowSequence(Ra,qa,Ra.dump),Td&&(Ra.dump="
` :""}__name(dump $ 1,"dump $ 1");function renamed(Ra,qa){return function(){throw new Error("Function yaml."+Ra+" is removed in js-yaml 4. Use yaml."+qa+" instead, which is now safe by default.")}}__name(renamed,"renamed");var JSON_SCHEMA=json,load=loader25.load;function extractFrontMatter(Ra){const qa=Ra.match(frontMatterRegex);if(!qa)return{text:Ra,metadata:{}};let td=load(qa[1],{schema:JSON_SCHEMA})??{};td=typeof td=="object"&&!Array.isArray(td)?td:{};const rd={};return td.displayMode&&(rd.displayMode=td.displayMode.toString()),td.title&&(rd.title=td.title.toString()),td.config&&(rd.config=td.config),{text:Ra.slice(qa[0].length),metadata:rd}}__name(extractFrontMatter,"extractFrontMatter");var cleanupText=__name(Ra=>Ra.replace(/ \r \n ?/g, `
` ).replace(/<( \w +)([^>]*)>/g,(qa,td,rd)=>"<"+td+rd.replace(/="([^"]*)"/g,"=' $ 1'")+">"),"cleanupText"),processFrontmatter=__name(Ra=>{const{text:qa,metadata:td}=extractFrontMatter(Ra),{displayMode:rd,title:nd,config:ad={}}=td;return rd&&(ad.gantt||(ad.gantt={}),ad.gantt.displayMode=rd),{title:nd,config:ad,text:qa}},"processFrontmatter"),processDirectives=__name(Ra=>{const qa=utils_default.detectInit(Ra)??{},td=utils_default.detectDirective(Ra,"wrap");return Array.isArray(td)?qa.wrap=td.some(({type:rd})=>rd==="wrap"):(td==null?void 0:td.type)==="wrap"&&(qa.wrap=!0),{text:removeDirectives(Ra),directive:qa}},"processDirectives");function preprocessDiagram(Ra){const qa=cleanupText(Ra),td=processFrontmatter(qa),rd=processDirectives(td.text),nd=cleanAndMerge(td.config,rd.directive);return Ra=cleanupComments(rd.text),{code:Ra,title:td.title,config:nd}}__name(preprocessDiagram,"preprocessDiagram");function toBase64(Ra){const qa=new TextEncoder().encode(Ra),td=Array.from(qa,rd=>String.fromCodePoint(rd)).join("");return btoa(td)}__name(toBase64,"toBase64");var MAX_TEXTLENGTH=5e4,MAX_TEXTLENGTH_EXCEEDED_MSG="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",SECURITY_LVL_SANDBOX="sandbox",SECURITY_LVL_LOOSE="loose",XMLNS_SVG_STD="http://www.w3.org/2000/svg",XMLNS_XLINK_STD="http://www.w3.org/1999/xlink",XMLNS_XHTML_STD="http://www.w3.org/1999/xhtml",IFRAME_WIDTH="100%",IFRAME_HEIGHT="100%",IFRAME_STYLES="border:0;margin:0;",IFRAME_BODY_STYLE="margin:0",IFRAME_SANDBOX_OPTS="allow-top-navigation-by-user-activation allow-popups",IFRAME_NOT_SUPPORTED_MSG='The "iframe" tag is not supported by your browser.',DOMPURIFY_TAGS=["foreignobject"],DOMPURIFY_ATTR=["dominant-baseline"];function processAndSetConfigs(Ra){const qa=preprocessDiagram(Ra);return reset(),addDirective(qa.config??{}),qa}__name(processAndSetConfigs,"processAndSetConfigs");async function parse(Ra,qa){addDiagrams();try{const{code:td,config:rd}=processAndSetConfigs(Ra);return{diagramType:(await getDiagramFromText(td)).type,config:rd}}catch(td){if(qa!=null&&qa.suppressErrors)return!1;throw td}}__name(parse,"parse");var cssImportantStyles=__name((Ra,qa,td=[])=> `
. $ { Ra } $ { qa } { $ { td . join ( " !important; " ) } ! important ; } ` ,"cssImportantStyles"),createCssStyles=__name((Ra,qa=new Map)=>{var rd;let td="";if(Ra.themeCSS!==void 0&&(td+= `
$ { Ra . themeCSS } ` ),Ra.fontFamily!==void 0&&(td+= `
: root { -- mermaid - font - family : $ { Ra . fontFamily } } ` ),Ra.altFontFamily!==void 0&&(td+= `
: root { -- mermaid - alt - font - family : $ { Ra . altFontFamily } } ` ),qa instanceof Map){const ud=Ra.htmlLabels??((rd=Ra.flowchart)==null?void 0:rd.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];qa.forEach(cd=>{isEmpty $ 1(cd.styles)||ud.forEach(dd=>{td+=cssImportantStyles(cd.id,dd,cd.styles)}),isEmpty $ 1(cd.textStyles)||(td+=cssImportantStyles(cd.id,"tspan",((cd==null?void 0:cd.textStyles)||[]).map(dd=>dd.replace("color","fill"))))})}return td},"createCssStyles"),createUserStyles=__name((Ra,qa,td,rd)=>{const nd=createCssStyles(Ra,td),ad=styles_default(qa,nd,Ra.themeVariables);return serialize(compile( ` $ { rd } { $ { ad } } ` ),stringify $ 1)},"createUserStyles"),cleanUpSvgCode=__name((Ra="",qa,td)=>{let rd=Ra;return!td&&!qa&&(rd=rd.replace(/marker-end="url \( [ \d +./:=?A-Za-z-]*?#/g,'marker-end="url(#')),rd=decodeEntities(rd),rd=rd.replace(/<br>/g,"<br/>"),rd},"cleanUpSvgCode"),putIntoIFrame=__name((Ra="",qa)=>{var nd,ad;const td=(ad=(nd=qa==null?void 0:qa.viewBox)==null?void 0:nd.baseVal)!=null&&ad.height?qa.viewBox.baseVal.height+"px":IFRAME_HEIGHT,rd=toBase64( ` < body style = "${IFRAME_BODY_STYLE}" > $ { Ra } < / b o d y > ` ) ; r e t u r n ` < i f r a m e s t y l e = " w i d t h : $ { I F R A M E _ W I D T H } ; h e i g h t : $ { t d } ; $ { I F R A M E _ S T Y L E S } " s r c = " d a t a : t e x t / h t m l ; c h a r s e t = U T F - 8 ; b a s e 6 4 , $ { r d } " s a n d b o x = " $ { I F R A M E _ S A N D B O X _ O P T S } " >
2024-09-18 09:46:23 +08:00
$ { IFRAME _NOT _SUPPORTED _MSG }
2024-09-28 20:51:35 +08:00
< / i f r a m e > ` } , " p u t I n t o I F r a m e " ) , a p p e n d D i v S v g G = _ _ n a m e ( ( R a , q a , t d , r d , n d ) = > { c o n s t a d = R a . a p p e n d ( " d i v " ) ; a d . a t t r ( " i d " , t d ) , r d & & a d . a t t r ( " s t y l e " , r d ) ; c o n s t s d = a d . a p p e n d ( " s v g " ) . a t t r ( " i d " , q a ) . a t t r ( " w i d t h " , " 1 0 0 % " ) . a t t r ( " x m l n s " , X M L N S _ S V G _ S T D ) ; r e t u r n n d & & s d . a t t r ( " x m l n s : x l i n k " , n d ) , s d . a p p e n d ( " g " ) , R a } , " a p p e n d D i v S v g G " ) ; f u n c t i o n s a n d b o x e d I f r a m e ( R a , q a ) { r e t u r n R a . a p p e n d ( " i f r a m e " ) . a t t r ( " i d " , q a ) . a t t r ( " s t y l e " , " w i d t h : 1 0 0 % ; h e i g h t : 1 0 0 % ; " ) . a t t r ( " s a n d b o x " , " " ) } _ _ n a m e ( s a n d b o x e d I f r a m e , " s a n d b o x e d I f r a m e " ) ; v a r r e m o v e E x i s t i n g E l e m e n t s = _ _ n a m e ( ( R a , q a , t d , r d ) = > { v a r n d , a d , s d ; ( n d = R a . g e t E l e m e n t B y I d ( q a ) ) = = n u l l | | n d . r e m o v e ( ) , ( a d = R a . g e t E l e m e n t B y I d ( t d ) ) = = n u l l | | a d . r e m o v e ( ) , ( s d = R a . g e t E l e m e n t B y I d ( r d ) ) = = n u l l | | s d . r e m o v e ( ) } , " r e m o v e E x i s t i n g E l e m e n t s " ) , r e n d e r = _ _ n a m e ( a s y n c f u n c t i o n ( R a , q a , t d ) { v a r h f , v f , T f , _ f , b f , x f ; a d d D i a g r a m s ( ) ; c o n s t r d = p r o c e s s A n d S e t C o n f i g s ( q a ) ; q a = r d . c o d e ; c o n s t n d = g e t C o n f i g $ 1 ( ) ; l o g $ 1 . d e b u g ( n d ) , q a . l e n g t h > ( ( n d = = n u l l ? v o i d 0 : n d . m a x T e x t S i z e ) ? ? M A X _ T E X T L E N G T H ) & & ( q a = M A X _ T E X T L E N G T H _ E X C E E D E D _ M S G ) ; c o n s t a d = " # " + R a , s d = " i " + R a , u d = " # " + s d , c d = " d " + R a , d d = " # " + c d , p d = _ _ n a m e ( ( ) = > { c o n s t Y f = s e l e c t ( T d ? u d : d d ) . n o d e ( ) ; Y f & & " r e m o v e " i n Y f & & Y f . r e m o v e ( ) } , " r e m o v e T e m p E l e m e n t s " ) ; l e t f d = s e l e c t ( " b o d y " ) ; c o n s t T d = n d . s e c u r i t y L e v e l = = = S E C U R I T Y _ L V L _ S A N D B O X , A d = n d . s e c u r i t y L e v e l = = = S E C U R I T Y _ L V L _ L O O S E , S d = n d . f o n t F a m i l y ; i f ( t d ! = = v o i d 0 ) { i f ( t d & & ( t d . i n n e r H T M L = " " ) , T d ) { c o n s t B f = s a n d b o x e d I f r a m e ( s e l e c t ( t d ) , s d ) ; f d = s e l e c t ( B f . n o d e s ( ) [ 0 ] . c o n t e n t D o c u m e n t . b o d y ) , f d . n o d e ( ) . s t y l e . m a r g i n = 0 } e l s e f d = s e l e c t ( t d ) ; a p p e n d D i v S v g G ( f d , R a , c d , ` f o n t - f a m i l y : $ { S d } ` , X M L N S _ X L I N K _ S T D ) } e l s e { i f ( r e m o v e E x i s t i n g E l e m e n t s ( d o c u m e n t , R a , c d , s d ) , T d ) { c o n s t B f = s a n d b o x e d I f r a m e ( s e l e c t ( " b o d y " ) , s d ) ; f d = s e l e c t ( B f . n o d e s ( ) [ 0 ] . c o n t e n t D o c u m e n t . b o d y ) , f d . n o d e ( ) . s t y l e . m a r g i n = 0 } e l s e f d = s e l e c t ( " b o d y " ) ; a p p e n d D i v S v g G ( f d , R a , c d ) } l e t D d , L d ; t r y { D d = a w a i t D i a g r a m . f r o m T e x t ( q a , { t i t l e : r d . t i t l e } ) } c a t c h ( B f ) { i f ( n d . s u p p r e s s E r r o r R e n d e r i n g ) t h r o w p d ( ) , B f ; D d = a w a i t D i a g r a m . f r o m T e x t ( " e r r o r " ) , L d = B f } c o n s t R d = f d . s e l e c t ( d d ) . n o d e ( ) , O d = D d . t y p e , M d = R d . f i r s t C h i l d , j d = M d . f i r s t C h i l d , U d = ( v f = ( h f = D d . r e n d e r e r ) . g e t C l a s s e s ) = = n u l l ? v o i d 0 : v f . c a l l ( h f , q a , D d ) , H d = c r e a t e U s e r S t y l e s ( n d , O d , U d , a d ) , W d = d o c u m e n t . c r e a t e E l e m e n t ( " s t y l e " ) ; W d . i n n e r H T M L = H d , M d . i n s e r t B e f o r e ( W d , j d ) ; t r y { a w a i t D d . r e n d e r e r . d r a w ( q a , R a , v e r s i o n , D d ) } c a t c h ( B f ) { t h r o w n d . s u p p r e s s E r r o r R e n d e r i n g ? p d ( ) : e r r o r R e n d e r e r _ d e f a u l t . d r a w ( q a , R a , v e r s i o n ) , B f } c o n s t Z d = f d . s e l e c t ( ` $ { d d } s v g ` ) , z d = ( _ f = ( T f = D d . d b ) . g e t A c c T i t l e ) = = n u l l ? v o i d 0 : _ f . c a l l ( T f ) , Q d = ( x f = ( b f = D d . d b ) . g e t A c c D e s c r i p t i o n ) = = n u l l ? v o i d 0 : x f . c a l l ( b f ) ; a d d A 1 1 y I n f o ( O d , Z d , z d , Q d ) , f d . s e l e c t ( ` [ i d = " $ { R a } " ] ` ) . s e l e c t A l l ( " f o r e i g n o b j e c t > * " ) . a t t r ( " x m l n s " , X M L N S _ X H T M L _ S T D ) ; l e t J d = f d . s e l e c t ( d d ) . n o d e ( ) . i n n e r H T M L ; i f ( l o g $ 1 . d e b u g ( " c o n f i g . a r r o w M a r k e r A b s o l u t e " , n d . a r r o w M a r k e r A b s o l u t e ) , J d = c l e a n U p S v g C o d e ( J d , T d , e v a l u a t e ( n d . a r r o w M a r k e r A b s o l u t e ) ) , T d ) { c o n s t B f = f d . s e l e c t ( d d + " s v g " ) . n o d e ( ) ; J d = p u t I n t o I F r a m e ( J d , B f ) } e l s e A d | | ( J d = p u r i f y . s a n i t i z e ( J d , { A D D _ T A G S : D O M P U R I F Y _ T A G S , A D D _ A T T R : D O M P U R I F Y _ A T T R } ) ) ; i f ( a t t a c h F u n c t i o n s ( ) , L d ) t h r o w L d ; r e t u r n p d ( ) , { d i a g r a m T y p e : O d , s v g : J d , b i n d F u n c t i o n s : D d . d b . b i n d F u n c t i o n s } } , " r e n d e r " ) ; f u n c t i o n i n i t i a l i z e ( R a = { } ) { v a r r d ; c o n s t q a = a s s i g n W i t h D e p t h _ d e f a u l t ( { } , R a ) ; q a ! = n u l l & & q a . f o n t F a m i l y & & ! ( ( r d = q a . t h e m e V a r i a b l e s ) ! = n u l l & & r d . f o n t F a m i l y ) & & ( q a . t h e m e V a r i a b l e s | | ( q a . t h e m e V a r i a b l e s = { } ) , q a . t h e m e V a r i a b l e s . f o n t F a m i l y = q a . f o n t F a m i l y ) , s a v e C o n f i g F r o m I n i t i a l i z e ( q a ) , q a ! = n u l l & & q a . t h e m e & & q a . t h e m e i n t h e m e s _ d e f a u l t ? q a . t h e m e V a r i a b l e s = t h e m e s _ d e f a u l t [ q a . t h e m e ] . g e t T h e m e V a r i a b l e s ( q a . t h e m e V a r i a b l e s ) : q a & & ( q a . t h e m e V a r i a b l e s = t h e m e s _ d e f a u l t . d e f a u l t . g e t T h e m e V a r i a b l e s ( q a . t h e m e V a r i a b l e s ) ) ; c o n s t t d = t y p e o f q a = = " o b j e c t " ? s e t S i t e C o n f i g ( q a ) : g e t S i t e C o n f i g ( ) ; s e t L o g L e v e l ( t d . l o g L e v e l ) , a d d D i a g r a m s ( ) } _ _ n a m e ( i n i t i a l i z e , " i n i t i a l i z e " ) ; v a r g e t D i a g r a m F r o m T e x t = _ _ n a m e ( ( R a , q a = { } ) = > { c o n s t { c o d e : t d } = p r e p r o c e s s D i a g r a m ( R a ) ; r e t u r n D i a g r a m . f r o m T e x t ( t d , q a ) } , " g e t D i a g r a m F r o m T e x t " ) ; f u n c t i o n a d d A 1 1 y I n f o ( R a , q a , t d , r d ) { s e t A 1 1 y D i a g r a m I n f o ( q a , R a ) , a d d S V G a 1 1 y T i t l e D e s c r i p t i o n ( q a , t d , r d , q a . a t t r ( " i d " ) ) } _ _ n a m e ( a d d A 1 1 y I n f o , " a d d A 1 1 y I n f o " ) ; v a r m e r m a i d A P I = O b j e c t . f r e e z e ( { r e n d e r , p a r s e , g e t D i a g r a m F r o m T e x t , i n i t i a l i z e , g e t C o n f i g : g e t C o n f i g $ 1 , s e t C o n f i g , g e t S i t e C o n f i g , u p d a t e S i t e C o n f i g , r e s e t : _ _ n a m e ( ( ) = > { r e s e t ( ) } , " r e s e t " ) , g l o b a l R e s e t : _ _ n a m e ( ( ) = > { r e s e t ( d e f a u l t C o n f i g ) } , " g l o b a l R e s e t " ) , d e f a u l t C o n f i g } ) ; s e t L o g L e v e l ( g e t C o n f i g $ 1 ( ) . l o g L e v e
2024-09-18 09:46:23 +08:00
* Wait for document loaded before starting the execution
* //*! Bundled license information:
js - yaml / dist / js - yaml . mjs :
( * ! js - yaml 4.1 . 0 https : //github.com/nodeca/js-yaml @license MIT *)
2024-09-28 20:51:35 +08:00
* /const inlineRule=/ ^ ( \ $ { 1 , 2 } ) ( ? ! \ $ ) ( ( ? : \ \ . | [ ^ \ \ \ n ] ) * ? ( ? : \ \ . | [ ^ \ \ \ n$ ] ) ) \ 1 ( ? = [ \ s ? ! . , : ? ! 。 , : ] | $ ) / , inlineRuleNonStandard = /^(\${1,2})(?!\$)((?:\\.|[^\\\n])*?(?:\\.|[^\\\n$]))\1/ , blockRule = /^(\${1,2})\n((?:\\[\s\S]|[^\\])+?)\n\1(?:\n|$)/ ; function createRenderer ( Ra ) { return qa => { window . MathJax . texReset ( ) ; const rd = window . MathJax . tex2svg ( qa . text , { display : Ra } ) . firstChild , nd = rd . style [ "min-width" ] || rd . getAttribute ( "width" ) ; return rd . removeAttribute ( "width" ) , rd . style = "max-width: 300vw !important;" , rd . style . width = nd , rd . style . display = "initial" , Ra ? ` <section style="text-align: center; overflow: auto;"> ${ rd . outerHTML } </section> ` : ` <span style="vertical-align: middle; line-height: 1;"> ${ rd . outerHTML } </span> ` } } function inlineKatex ( Ra , qa ) { const td = Ra && Ra . nonStandard , rd = td ? inlineRuleNonStandard : inlineRule ; return { name : "inlineKatex" , level : "inline" , start ( nd ) { let ad , sd = nd ; for ( ; sd ; ) { if ( ad = sd . indexOf ( "$" ) , ad === - 1 ) return ; if ( ( td ? ad > - 1 : ad === 0 || sd . charAt ( ad - 1 ) === " " ) && sd . substring ( ad ) . match ( rd ) ) return ad ; sd = sd . substring ( ad + 1 ) . replace ( /^\$+/ , "" ) } } , tokenizer ( nd ) { const ad = nd . match ( rd ) ; if ( ad ) return { type : "inlineKatex" , raw : ad [ 0 ] , text : ad [ 2 ] . trim ( ) , displayMode : ad [ 1 ] . length === 2 } } , renderer : qa } } function blockKatex ( Ra , qa ) { return { name : "blockKatex" , level : "block" , tokenizer ( td ) { const rd = td . match ( blockRule ) ; if ( rd ) return { type : "blockKatex" , raw : rd [ 0 ] , text : rd [ 2 ] . trim ( ) , displayMode : rd [ 1 ] . length === 2 } } , renderer : qa } } function MDKatex ( Ra = { } ) { return { extensions : [ inlineKatex ( Ra , createRenderer ( ! 1 ) ) , blockKatex ( Ra , createRenderer ( ! 0 ) ) ] } } marked$1 . use ( MDKatex ( { nonStandard : ! 0 } ) ) ; function buildTheme ( { theme : Ra , fonts : qa , size : td , isUseIndent : rd } ) { const nd = cloneDeep ( Ra ) , ad = toMerged ( nd . base , { "font-family" : qa , "font-size" : td } ) ; rd && ( nd . block . p = { "text-indent" : "2em" , ... nd . block . p } ) ; const sd = ud => Object . fromEntries ( Object . entries ( ud ) . map ( ( [ cd , dd ] ) => [ cd , toMerged ( ad , dd ) ] ) ) ; return { ... sd ( nd . inline ) , ... sd ( nd . block ) } } function buildAddition ( ) { return `
2024-09-18 09:46:23 +08:00
< style >
. preview - wrapper pre : : before {
position : absolute ;
top : 0 ;
right : 0 ;
color : # ccc ;
text - align : center ;
font - size : 0.8 em ;
padding : 5 px 10 px 0 ;
line - height : 15 px ;
height : 15 px ;
font - weight : 600 ;
}
< / s t y l e >
2024-09-25 14:23:53 +08:00
` }function getStyles(Ra,qa,td=""){const rd=Ra[qa];return rd? ` style = "${Object.entries(rd).map(([ad,sd])=>`${ad}:${sd}`).join(" ; ")}${td}" ` :""}function buildFootnoteArray(Ra){return Ra.map(([qa,td,rd])=>rd===td? ` < code style = "font-size: 90%; opacity: 0.6;" > [ $ { qa } ] < /code>: <i style="word-break: break-all">${td}</i > < br / > ` : ` < code style = "font-size: 90%; opacity: 0.6;" > [ $ { qa } ] < /code> ${td}: <i style="word-break: break-all">${rd}</i > < br / > ` ).join( `
` )}function transform $ 1(Ra,qa,td){const rd=Ra.split("-");for(const nd of rd){if(nd==="alt"&&qa)return qa;if(nd==="title"&&td)return td}return""}const macCodeSvg= `
2024-09-18 09:46:23 +08:00
< svg xmlns = "http://www.w3.org/2000/svg" version = "1.1" x = "0px" y = "0px" width = "45px" height = "13px" viewBox = "0 0 450 130" >
< ellipse cx = "65" cy = "65" rx = "50" ry = "52" stroke = "rgb(220,60,54)" stroke - width = "2" fill = "rgb(237,108,96)" / >
< ellipse cx = "225" cy = "65" rx = "50" ry = "52" stroke = "rgb(218,151,33)" stroke - width = "2" fill = "rgb(247,193,81)" / >
< ellipse cx = "385" cy = "65" rx = "50" ry = "52" stroke = "rgb(27,161,37)" stroke - width = "2" fill = "rgb(100,200,86)" / >
< / s v g >
2024-09-25 14:23:53 +08:00
` .trim();function initRenderer(Ra){const qa=[];let td=0,rd=buildTheme(Ra),nd=0,ad=0,sd=!1;function ud(Sd,Dd=""){return getStyles(rd,Sd,Dd)}function cd(Sd,Dd,Ld){const Rd=Ld??Sd;return ` < $ { Rd } $ { ud ( Sd ) } > $ { Dd } < /${Rd}>`}function dd(Sd,Dd){return qa.push([++td,Sd,Dd]),td}function pd(Sd){qa.length=0,td=0,fd(Sd)}function fd(Sd){Ra={...Ra,...Sd},rd=buildTheme(Ra)}const Td=()=>qa.length?cd("h4","引用链接")+cd("footnotes",buildFootnoteArray(qa),"p"):"",Ad={heading({tokens:Sd,depth:Dd}){const Ld=this.parser.parseInline(Sd),Rd=`h${Dd}`;return cd(Rd,Ld)},paragraph({tokens:Sd}){const Dd=this.parser.parseInline(Sd),Ld=Dd.includes("<figure")&&Dd.includes("<img"),Rd=Dd.trim()==="";return Ld||Rd?Dd:cd("p",Dd)},blockquote({tokens:Sd}){let Dd=this.parser.parse(Sd);return Dd=Dd.replace(/ < p . * ? > / g , ` < p $ { u d ( " b l o c k q u o t e _ p " ) } > ` ) , c d ( " b l o c k q u o t e " , D d ) } , c o d e ( { t e x t : S d , l a n g : D d = " " } ) { i f ( D d . s t a r t s W i t h ( " m e r m a i d " ) ) r e t u r n c l e a r T i m e o u t ( n d ) , n d = s e t T i m e o u t ( ( ) = > { m e r m a i d _ d e f a u l t . r u n ( ) } , 0 ) , ` < p r e c l a s s = " m e r m a i d " > $ { S d } < / p r e > ` ; c o n s t L d = D d . s p l i t ( " " ) [ 0 ] , R d = H i g h l i g h t J S . g e t L a n g u a g e ( L d ) ? L d : " p l a i n t e x t " ; l e t O d = H i g h l i g h t J S . h i g h l i g h t ( S d , { l a n g u a g e : R d } ) . v a l u e ; O d = O d . r e p l a c e ( / \ r \ n / g , " < b r / > " ) . r e p l a c e ( / \ n / g , " < b r / > " ) . r e p l a c e ( / ( > [ ^ < ] + ) | ( ^ [ ^ < ] + ) / g , U d = > U d . r e p l a c e ( / \ s / g , " & n b s p ; " ) ) ; c o n s t M d = ` < s p a n c l a s s = " m a c - s i g n " s t y l e = " p a d d i n g : 1 0 p x 1 4 p x 0 ; " h i d d e n > $ { m a c C o d e S v g } < / s p a n > ` , j d = ` < c o d e c l a s s = " l a n g u a g e - $ { D d } " $ { u d ( " c o d e " ) } > $ { O d } < / c o d e > ` ; r e t u r n ` < p r e c l a s s = " h l j s c o d e _ _ p r e " $ { u d ( " c o d e _ p r e " ) } > $ { M d } $ { j d } < / p r e > ` } , c o d e s p a n ( { t e x t : S d } ) { r e t u r n c d ( " c o d e s p a n " , S d , " c o d e " ) } , l i s t i t e m ( S d ) { c o n s t D d = s d ? ` $ { a d + 1 } . ` : " • " , L d = S d . t o k e n s . m a p ( R d = > t h i s [ R d . t y p e ] ( R d ) ) . j o i n ( " " ) ; r e t u r n c d ( " l i s t i t e m " , ` $ { D d } $ { L d } ` , " l i " ) } , l i s t ( { o r d e r e d : S d , i t e m s : D d } ) { c o n s t L d = [ ] ; f o r ( l e t O d = 0 ; O d < D d . l e n g t h ; O d + + ) { s d = S d , a d = O d ; c o n s t M d = D d [ O d ] ; L d . p u s h ( t h i s . l i s t i t e m ( M d ) ) } r e t u r n c d ( S d ? " o l " : " u l " , L d . j o i n ( " " ) ) } , i m a g e ( { h r e f : S d , t i t l e : D d , t e x t : L d } ) { c o n s t R d = c d ( " f i g c a p t i o n " , t r a n s f o r m $ 1 ( R a . l e g e n d , L d , D d ) ) , O d = u d ( " f i g u r e " ) , M d = u d ( " i m a g e " ) ; r e t u r n ` < f i g u r e $ { O d } > < i m g $ { M d } s r c = " $ { S d } " t i t l e = " $ { D d } " a l t = " $ { L d } " / > $ { R d } < / f i g u r e > ` } , l i n k ( { h r e f : S d , t i t l e : D d , t e x t : L d } ) { i f ( S d . s t a r t s W i t h ( " h t t p s : / / m p . w e i x i n . q q . c o m " ) ) r e t u r n ` < a h r e f = " $ { S d } " t i t l e = " $ { D d | | L d } " $ { u d ( " w x _ l i n k " ) } > $ { L d } < / a > ` ; i f ( S d = = = L d ) r e t u r n L d ; i f ( R a . s t a t u s ) { c o n s t R d = d d ( D d | | L d , S d ) ; r e t u r n ` < s p a n $ { u d ( " l i n k " ) } > $ { L d } < s u p > [ $ { R d } ] < / s u p > < / s p a n > ` } r e t u r n c d ( " l i n k " , L d , " s p a n " ) } , s t r o n g ( { t o k e n s : S d } ) { r e t u r n c d ( " s t r o n g " , t h i s . p a r s e r . p a r s e I n l i n e ( S d ) ) } , e m ( { t o k e n s : S d } ) { r e t u r n c d ( " e m " , t h i s . p a r s e r . p a r s e I n l i n e ( S d ) , " s p a n " ) } , t a b l e ( { h e a d e r : S d , r o w s : D d } ) { c o n s t L d = S d . m a p ( O d = > t h i s . t a b l e c e l l ( O d ) ) . j o i n ( " " ) , R d = D d . m a p ( O d = > { c o n s t M d = O d . m a p ( j d = > t h i s . t a b l e c e l l ( j d ) ) . j o i n ( " " ) ; r e t u r n c d ( " t r " , M d ) } ) . j o i n ( " " ) ; r e t u r n `
2024-09-18 09:46:23 +08:00
< section style = "padding:0 8px; max-width: 100%; overflow: auto" >
< table class = "preview-table" >
2024-09-25 14:23:53 +08:00
< thead $ { ud ( "thead" ) } > $ { Ld } < / t h e a d >
2024-09-18 09:46:23 +08:00
< tbody > $ { Rd } < / t b o d y >
< / t a b l e >
< / s e c t i o n >
2024-09-28 20:51:35 +08:00
` },tablecell(Sd){const Dd=this.parser.parseInline(Sd.tokens);return cd("td",Dd)},hr(Sd){return cd("hr","")}};return marked $ 1.use({renderer:Ad}),{buildAddition,buildFootnotes:Td,setOptions:fd,reset:pd}}function tryOnScopeDispose(Ra){return getCurrentScope()?(onScopeDispose(Ra),!0):!1}function toValue $ 2(Ra){return typeof Ra=="function"?Ra():unref(Ra)}const isClient=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const toString $ 2=Object.prototype.toString,isObject $ 2=Ra=>toString $ 2.call(Ra)==="[object Object]",noop $ 3=()=>{};function createFilterWrapper(Ra,qa){function td(...rd){return new Promise((nd,ad)=>{Promise.resolve(Ra(()=>qa.apply(this,rd),{fn:qa,thisArg:this,args:rd})).then(nd).catch(ad)})}return td}const bypassFilter=Ra=>Ra();function pausableFilter(Ra=bypassFilter){const qa=ref $ 1(!0);function td(){qa.value=!1}function rd(){qa.value=!0}const nd=(...ad)=>{qa.value&&Ra(...ad)};return{isActive:readonly(qa),pause:td,resume:rd,eventFilter:nd}}function getLifeCycleTarget(Ra){return getCurrentInstance()}function toRef(...Ra){if(Ra.length!==1)return toRef $ 1(...Ra);const qa=Ra[0];return typeof qa=="function"?readonly(customRef(()=>({get:qa,set:noop $ 3}))):ref $ 1(qa)}function watchWithFilter(Ra,qa,td={}){const{eventFilter:rd=bypassFilter,...nd}=td;return watch(Ra,createFilterWrapper(rd,qa),nd)}function watchPausable(Ra,qa,td={}){const{eventFilter:rd,...nd}=td,{eventFilter:ad,pause:sd,resume:ud,isActive:cd}=pausableFilter(rd);return{stop:watchWithFilter(Ra,qa,{...nd,eventFilter:ad}),pause:sd,resume:ud,isActive:cd}}function tryOnMounted(Ra,qa=!0,td){getLifeCycleTarget()?onMounted(Ra,td):qa?Ra():nextTick $ 1(Ra)}function useToggle(Ra=!1,qa={}){const{truthyValue:td=!0,falsyValue:rd=!1}=qa,nd=isRef(Ra),ad=ref $ 1(Ra);function sd(ud){if(arguments.length)return ad.value=ud,ad.value;{const cd=toValue $ 2(td);return ad.value=ad.value===cd?toValue $ 2(rd):cd,ad.value}}return nd?sd:[ad,sd]}const defaultWindow=isClient?window:void 0;function unrefElement(Ra){var qa;const td=toValue $ 2(Ra);return(qa=td==null?void 0:td. $ el)!=null?qa:td}function useEventListener(...Ra){let qa,td,rd,nd;if(typeof Ra[0]=="string"||Array.isArray(Ra[0])?([td,rd,nd]=Ra,qa=defaultWindow):[qa,td,rd,nd]=Ra,!qa)return noop $ 3;Array.isArray(td)||(td=[td]),Array.isArray(rd)||(rd=[rd]);const ad=[],sd=()=>{ad.forEach(pd=>pd()),ad.length=0},ud=(pd,fd,Td,Ad)=>(pd.addEventListener(fd,Td,Ad),()=>pd.removeEventListener(fd,Td,Ad)),cd=watch(()=>[unrefElement(qa),toValue $ 2(nd)],([pd,fd])=>{if(sd(),!pd)return;const Td=isObject $ 2(fd)?{...fd}:fd;ad.push(...td.flatMap(Ad=>rd.map(Sd=>ud(pd,Ad,Sd,Td))))},{immediate:!0,flush:"post"}),dd=()=>{cd(),sd()};return tryOnScopeDispose(dd),dd}function useMounted(){const Ra=ref $ 1(!1),qa=getCurrentInstance();return qa&&onMounted(()=>{Ra.value=!0},qa),Ra}function useSupported(Ra){const qa=useMounted();return computed(()=>(qa.value,!!Ra()))}function useMediaQuery(Ra,qa={}){const{window:td=defaultWindow}=qa,rd=useSupported(()=>td&&"matchMedia"in td&&typeof td.matchMedia=="function");let nd;const ad=ref $ 1(!1),sd=dd=>{ad.value=dd.matches},ud=()=>{nd&&("removeEventListener"in nd?nd.removeEventListener("change",sd):nd.removeListener(sd))},cd=watchEffect(()=>{rd.value&&(ud(),nd=td.matchMedia(toValue $ 2(Ra)),"addEventListener"in nd?nd.addEventListener("change",sd):nd.addListener(sd),ad.value=nd.matches)});return tryOnScopeDispose(()=>{cd(),ud(),nd=void 0}),ad}const _global $ 1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global $ 1<"u"?global $ 1:typeof self<"u"?self:{},globalKey="__vueuse_ssr_handlers__",handlers=getHandlers();function getHandlers(){return globalKey in _global $ 1||(_global $ 1[globalKey]=_global $ 1[globalKey]||{}),_global $ 1[globalKey]}function getSSRHandler(Ra,qa){return handlers[Ra]||qa}function usePreferredDark(Ra){return useMediaQuery("(prefers-color-scheme: dark)",Ra)}function guessSerializerType(Ra){return Ra==null?"any":Ra instanceof Set?"set":Ra instanceof Map?"map":Ra instanceof Date?"date":typeof Ra=="boolean"?"boolean":typeof Ra=="string"?"string":typeof Ra=="obje
2024-09-25 14:23:53 +08:00
b ` .split(/ \n /).length!=3?function(Nd){for(var Fd=0,Kd=[],Yd=Nd.length;Fd<=Yd;){var df=Nd.indexOf( `
2024-09-28 20:51:35 +08:00
` ,Fd);df==-1&&(df=Nd.length);var Sf=Nd.slice(Fd,Nd.charAt(df-1)==" \r "?df-1:df),kf=Sf.indexOf(" \r ");kf!=-1?(Kd.push(Sf.slice(0,kf)),Fd+=kf+1):(Kd.push(Sf),Fd=df+1)}return Kd}:function(Nd){return Nd.split(/ \r \n ?| \n /)},ch=window.getSelection?function(Nd){try{return Nd.selectionStart!=Nd.selectionEnd}catch{return!1}}:function(Nd){var Fd;try{Fd=Nd.ownerDocument.selection.createRange()}catch{}return!Fd||Fd.parentElement()!=Nd?!1:Fd.compareEndPoints("StartToEnd",Fd)!=0},eh=function(){var Nd=_f("div");return"oncopy"in Nd?!0:(Nd.setAttribute("oncopy","return;"),typeof Nd.oncopy=="function")}(),dh=null;function yh(Nd){if(dh!=null)return dh;var Fd=Tf(Nd,_f("span","x")),Kd=Fd.getBoundingClientRect(),Yd=xf(Fd,0,1).getBoundingClientRect();return dh=Math.abs(Kd.left-Yd.left)>1}var vh={},kh={};function Rh(Nd,Fd){arguments.length>2&&(Fd.dependencies=Array.prototype.slice.call(arguments,2)),vh[Nd]=Fd}function mh(Nd,Fd){kh[Nd]=Fd}function im(Nd){if(typeof Nd=="string"&&kh.hasOwnProperty(Nd))Nd=kh[Nd];else if(Nd&&typeof Nd.name=="string"&&kh.hasOwnProperty(Nd.name)){var Fd=kh[Nd.name];typeof Fd=="string"&&(Fd={name:Fd}),Nd=hh(Fd,Nd),Nd.name=Fd.name}else{if(typeof Nd=="string"&&/^[ \w \- ]+ \/ [ \w \- ]+ \+ xml $ /.test(Nd))return im("application/xml");if(typeof Nd=="string"&&/^[ \w \- ]+ \/ [ \w \- ]+ \+ json $ /.test(Nd))return im("application/json")}return typeof Nd=="string"?{name:Nd}:Nd||{name:"null"}}function fm(Nd,Fd){Fd=im(Fd);var Kd=vh[Fd.name];if(!Kd)return fm(Nd,"text/plain");var Yd=Kd(Nd,Fd);if(Gm.hasOwnProperty(Fd.name)){var df=Gm[Fd.name];for(var Sf in df)df.hasOwnProperty(Sf)&&(Yd.hasOwnProperty(Sf)&&(Yd["_"+Sf]=Yd[Sf]),Yd[Sf]=df[Sf])}if(Yd.name=Fd.name,Fd.helperType&&(Yd.helperType=Fd.helperType),Fd.modeProps)for(var kf in Fd.modeProps)Yd[kf]=Fd.modeProps[kf];return Yd}var Gm={};function Nm(Nd,Fd){var Kd=Gm.hasOwnProperty(Nd)?Gm[Nd]:Gm[Nd]={};gf(Fd,Kd)}function Ym(Nd,Fd){if(Fd===!0)return Fd;if(Nd.copyState)return Nd.copyState(Fd);var Kd={};for(var Yd in Fd){var df=Fd[Yd];df instanceof Array&&(df=df.concat([])),Kd[Yd]=df}return Kd}function S_(Nd,Fd){for(var Kd;Nd.innerMode&&(Kd=Nd.innerMode(Fd),!(!Kd||Kd.mode==Nd));)Fd=Kd.state,Nd=Kd.mode;return Kd||{mode:Nd,state:Fd}}function w_(Nd,Fd,Kd){return Nd.startState?Nd.startState(Fd,Kd):!0}var p_=function(Nd,Fd,Kd){this.pos=this.start=0,this.string=Nd,this.tabSize=Fd||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=Kd};p_.prototype.eol=function(){return this.pos>=this.string.length},p_.prototype.sol=function(){return this.pos==this.lineStart},p_.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},p_.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},p_.prototype.eat=function(Nd){var Fd=this.string.charAt(this.pos),Kd;if(typeof Nd=="string"?Kd=Fd==Nd:Kd=Fd&&(Nd.test?Nd.test(Fd):Nd(Fd)),Kd)return++this.pos,Fd},p_.prototype.eatWhile=function(Nd){for(var Fd=this.pos;this.eat(Nd););return this.pos>Fd},p_.prototype.eatSpace=function(){for(var Nd=this.pos;/[ \s \u 00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>Nd},p_.prototype.skipToEnd=function(){this.pos=this.string.length},p_.prototype.skipTo=function(Nd){var Fd=this.string.indexOf(Nd,this.pos);if(Fd>-1)return this.pos=Fd,!0},p_.prototype.backUp=function(Nd){this.pos-=Nd},p_.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Mf(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Mf(this.string,this.lineStart,this.tabSize):0)},p_.prototype.indentation=function(){return Mf(this.string,null,this.tabSize)-(this.lineStart?Mf(this.string,this.lineStart,this.tabSize):0)},p_.prototype.match=function(Nd,Fd,Kd){if(typeof Nd=="string"){var Yd=function(kf){return Kd?kf.toLowerCase():kf},df=this.string.substr(this.pos,Nd.length);if(Yd(df)==Yd(Nd))return Fd!==!1&&(this.pos+=Nd.length),!0}else{var Sf=this.string.slice(this.pos).match(Nd);return Sf&&Sf.index>0?null:(Sf&&Fd!==!1&&(this.pos+=Sf[0].length),Sf)}},p_.prototype.current=funct
` ?(mm=bh.appendChild(_f("span",Hh[0]==" \r "?"␍":"","cm-invalidchar")),mm.setAttribute("cm-text",Hh[0]),Nd.col+=1):(mm=Nd.cm.options.specialCharPlaceholder(Hh[0]),mm.setAttribute("cm-text",Hh[0]),cd&&dd<9?bh.appendChild(_f("span",[mm])):bh.appendChild(mm),Nd.col+=1);Nd.map.push(Nd.pos,Nd.pos+1,mm),Nd.pos++}}if(Nd.trailingSpace=Ff.charCodeAt(Fd.length-1)==32,Kd||Yd||df||th||Sf||kf){var Vm=Kd||"";Yd&&(Vm+=Yd),df&&(Vm+=df);var Fm=_f("span",[bh],Vm,Sf);if(kf)for(var Wm in kf)kf.hasOwnProperty(Wm)&&Wm!="style"&&Wm!="class"&&Fm.setAttribute(Wm,kf[Wm]);return Nd.content.appendChild(Fm)}Nd.content.appendChild(bh)}}function ov(Nd,Fd){if(Nd.length>1&&!/ /.test(Nd))return Nd;for(var Kd=Fd,Yd="",df=0;df<Nd.length;df++){var Sf=Nd.charAt(df);Sf==" "&&Kd&&(df==Nd.length-1||Nd.charCodeAt(df+1)==32)&&(Sf=" "),Yd+=Sf,Kd=Sf==" "}return Yd}function Y_(Nd,Fd){return function(Kd,Yd,df,Sf,kf,Ff,Kf){df=df?df+" cm-force-border":"cm-force-border";for(var th=Kd.pos,bh=th+Yd.length;;){for(var Ah=void 0,Hh=0;Hh<Fd.length&&(Ah=Fd[Hh],!(Ah.to>th&&Ah.from<=th));Hh++);if(Ah.to>=bh)return Nd(Kd,Yd,df,Sf,kf,Ff,Kf);Nd(Kd,Yd.slice(0,Ah.to-th),df,Sf,null,Ff,Kf),Sf=null,Yd=Yd.slice(Ah.to-th),th=Ah.to}}}function b0(Nd,Fd,Kd,Yd){var df=!Yd&&Kd.widgetNode;df&&Nd.map.push(Nd.pos,Nd.pos+Fd,df),!Yd&&Nd.cm.display.input.needsContentAttribute&&(df||(df=Nd.content.appendChild(document.createElement("span"))),df.setAttribute("cm-marker",Kd.id)),df&&(Nd.cm.display.input.setUneditable(df),Nd.content.appendChild(df)),Nd.pos+=Fd,Nd.trailingSpace=!1}function Gv(Nd,Fd,Kd){var Yd=Nd.markedSpans,df=Nd.text,Sf=0;if(!Yd){for(var kf=1;kf<Kd.length;kf+=2)Fd.addToken(Fd,df.slice(Sf,Sf=Kd[kf]),A1(Kd[kf+1],Fd.cm.options));return}for(var Ff=df.length,Kf=0,th=1,bh="",Ah,Hh,jh=0,cm,mm,Im,jm,Vm;;){if(jh==Kf){cm=mm=Im=Hh="",Vm=null,jm=null,jh=1/0;for(var Fm=[],Wm=void 0,n_=0;n_<Yd.length;++n_){var t_=Yd[n_],__=t_.marker;if(__.type=="bookmark"&&t_.from==Kf&&__.widgetNode)Fm.push(__);else if(t_.from<=Kf&&(t_.to==null||t_.to>Kf||__.collapsed&&t_.to==Kf&&t_.from==Kf)){if(t_.to!=null&&t_.to!=Kf&&jh>t_.to&&(jh=t_.to,mm=""),__.className&&(cm+=" "+__.className),__.css&&(Hh=(Hh?Hh+";":"")+__.css),__.startStyle&&t_.from==Kf&&(Im+=" "+__.startStyle),__.endStyle&&t_.to==jh&&(Wm||(Wm=[])).push(__.endStyle,t_.to),__.title&&((Vm||(Vm={})).title=__.title),__.attributes)for(var j_ in __.attributes)(Vm||(Vm={}))[j_]=__.attributes[j_];__.collapsed&&(!jm||Fv(jm.marker,__)<0)&&(jm=t_)}else t_.from>Kf&&jh>t_.from&&(jh=t_.from)}if(Wm)for(var sg=0;sg<Wm.length;sg+=2)Wm[sg+1]==jh&&(mm+=" "+Wm[sg]);if(!jm||jm.from==Kf)for(var X_=0;X_<Fm.length;++X_)b0(Fd,0,Fm[X_]);if(jm&&(jm.from||0)==Kf){if(b0(Fd,(jm.to==null?Ff+1:jm.to)-Kf,jm.marker,jm.from==null),jm.to==null)return;jm.to==Kf&&(jm=!1)}}if(Kf>=Ff)break;for(var rg=Math.min(Ff,jh);;){if(bh){var ug=Kf+bh.length;if(!jm){var cg=ug>rg?bh.slice(0,rg-Kf):bh;Fd.addToken(Fd,cg,Ah?Ah+cm:cm,Im,Kf+cg.length==jh?mm:"",Hh,Vm)}if(ug>=rg){bh=bh.slice(rg-Kf),Kf=rg;break}Kf=ug,Im=""}bh=df.slice(Sf,Sf=Kd[th++]),Ah=A1(Kd[th++],Fd.cm.options)}}}function w1(Nd,Fd,Kd){this.line=Fd,this.rest=K0(Fd),this.size=this.rest?Um(uh(this.rest))-Kd+1:1,this.node=this.text=null,this.hidden=ig(Nd,Fd)}function ub(Nd,Fd,Kd){for(var Yd=[],df,Sf=Fd;Sf<Kd;Sf=df){var kf=new w1(Nd.doc,Om(Nd.doc,Sf),Sf);df=Sf+kf.size,Yd.push(kf)}return Yd}var s0=null;function N1(Nd){s0?s0.ops.push(Nd):Nd.ownsGroup=s0={ops:[Nd],delayedCallbacks:[]}}function Iy(Nd){var Fd=Nd.delayedCallbacks,Kd=0;do{for(;Kd<Fd.length;Kd++)Fd[Kd].call(null);for(var Yd=0;Yd<Nd.ops.length;Yd++){var df=Nd.ops[Yd];if(df.cursorActivityHandlers)for(;df.cursorActivityCalled<df.cursorActivityHandlers.length;)df.cursorActivityHandlers[df.cursorActivityCalled++].call(null,df.cm)}}while(Kd<Fd.length)}function qd(Nd,Fd){var Kd=Nd.ownsGroup;if(Kd)try{Iy(Kd)}finally{s0=null,Fd(Kd)}}var kd=null;function Vd(Nd,Fd){var Kd=Hm(Nd,Fd);if(Kd.length){var Yd=Array.prototype.slice.call(arguments,2),df;s0?df=s0.delayedCallbacks:kd?df=kd:(df=kd=[],setTimeout(pf,0));for(var Sf=function(Ff){df.push(function(){return Kd[Ff].apply(null,Yd)})},kf=0;kf<Kd.length;++kf)S
top : ` +Wm+"px; width: "+(n_??Kf-Fm)+ ` px ;
height : ` +(t_-Wm)+"px"))}function Ah(Fm,Wm,n_){var t_=Om(df,Fm),__=t_.text.length,j_,sg;function X_(cg,Pg){return pm(Nd,_m(Fm,cg),"div",t_,Pg)}function rg(cg,Pg,Dg){var mg=G_(Nd,t_,null,cg),dg=Pg=="ltr"==(Dg=="after")?"left":"right",ng=Dg=="after"?mg.begin:mg.end-(/ \s /.test(t_.text.charAt(mg.end-1))?2:1);return X_(ng,dg)[dg]}var ug=Xh(t_,df.direction);return Qf(ug,Wm||0,n_??__,function(cg,Pg,Dg,mg){var dg=Dg=="ltr",ng=X_(cg,dg?"left":"right"),Ug=X_(Pg-1,dg?"right":"left"),Mv=Wm==null&&cg==0,Sb=n_==null&&Pg==__,Og=mg==0,H0=!ug||mg==ug.length-1;if(Ug.top-ng.top<=3){var xg=(th?Mv:Sb)&&Og,xE=(th?Sb:Mv)&&H0,G0=xg?Ff:(dg?ng:Ug).left,xb=xE?Kf:(dg?Ug:ng).right;bh(G0,ng.top,xb-G0,ng.bottom)}else{var Cb, $ g,Bv,CE;dg?(Cb=th&&Mv&&Og?Ff:ng.left, $ g=th?Kf:rg(cg,Dg,"before"),Bv=th?Ff:rg(Pg,Dg,"after"),CE=th&&Sb&&H0?Kf:Ug.right):(Cb=th?rg(cg,Dg,"before"):Ff, $ g=!th&&Mv&&Og?Kf:ng.right,Bv=!th&&Sb&&H0?Ff:Ug.left,CE=th?rg(Pg,Dg,"after"):Kf),bh(Cb,ng.top, $ g-Cb,ng.bottom),ng.bottom<Ug.top&&bh(Ff,ng.bottom,null,Ug.top),bh(Bv,Ug.top,CE-Bv,Ug.bottom)}(!j_|| $ b(ng,j_)<0)&&(j_=ng), $ b(Ug,j_)<0&&(j_=Ug),(!sg|| $ b(ng,sg)<0)&&(sg=ng), $ b(Ug,sg)<0&&(sg=Ug)}),{start:j_,end:sg}}var Hh=Fd.from(),jh=Fd.to();if(Hh.line==jh.line)Ah(Hh.line,Hh.ch,jh.ch);else{var cm=Om(df,Hh.line),mm=Om(df,jh.line),Im=P_(cm)==P_(mm),jm=Ah(Hh.line,Hh.ch,Im?cm.text.length+1:null).end,Vm=Ah(jh.line,Im?0:null,jh.ch).start;Im&&(jm.top<Vm.top-2?(bh(jm.right,jm.top,null,jm.bottom),bh(Ff,Vm.top,Vm.left,Vm.bottom)):bh(jm.right,jm.top,Vm.left-jm.right,jm.bottom)),jm.bottom<Vm.top&&bh(Ff,jm.bottom,null,Vm.top)}Kd.appendChild(Sf)}function Lb(Nd){if(Nd.state.focused){var Fd=Nd.display;clearInterval(Fd.blinker);var Kd=!0;Fd.cursorDiv.style.visibility="",Nd.options.cursorBlinkRate>0?Fd.blinker=setInterval(function(){Nd.hasFocus()||fv(Nd),Fd.cursorDiv.style.visibility=(Kd=!Kd)?"":"hidden"},Nd.options.cursorBlinkRate):Nd.options.cursorBlinkRate<0&&(Fd.cursorDiv.style.visibility="hidden")}}function pb(Nd){Nd.hasFocus()||(Nd.display.input.focus(),Nd.state.focused||Hy(Nd))}function pv(Nd){Nd.state.delayingBlurEvent=!0,setTimeout(function(){Nd.state.delayingBlurEvent&&(Nd.state.delayingBlurEvent=!1,Nd.state.focused&&fv(Nd))},100)}function Hy(Nd,Fd){Nd.state.delayingBlurEvent&&!Nd.state.draggingText&&(Nd.state.delayingBlurEvent=!1),Nd.options.readOnly!="nocursor"&&(Nd.state.focused||(Pm(Nd,"focus",Nd,Fd),Nd.state.focused=!0,Zf(Nd.display.wrapper,"CodeMirror-focused"),!Nd.curOp&&Nd.display.selForContextMenu!=Nd.doc.sel&&(Nd.display.input.reset(),pd&&setTimeout(function(){return Nd.display.input.reset(!0)},20)),Nd.display.input.receivedFocus()),Lb(Nd))}function fv(Nd,Fd){Nd.state.delayingBlurEvent||(Nd.state.focused&&(Pm(Nd,"blur",Nd,Fd),Nd.state.focused=!1,hf(Nd.display.wrapper,"CodeMirror-focused")),clearInterval(Nd.display.blinker),setTimeout(function(){Nd.state.focused||(Nd.display.shift=!1)},150))}function B1(Nd){for(var Fd=Nd.display,Kd=Fd.lineDiv.offsetTop,Yd=Math.max(0,Fd.scroller.getBoundingClientRect().top),df=Fd.lineDiv.getBoundingClientRect().top,Sf=0,kf=0;kf<Fd.view.length;kf++){var Ff=Fd.view[kf],Kf=Nd.options.lineWrapping,th=void 0,bh=0;if(!Ff.hidden){if(df+=Ff.line.height,cd&&dd<8){var Ah=Ff.node.offsetTop+Ff.node.offsetHeight;th=Ah-Kd,Kd=Ah}else{var Hh=Ff.node.getBoundingClientRect();th=Hh.bottom-Hh.top,!Kf&&Ff.text.firstChild&&(bh=Ff.text.firstChild.getBoundingClientRect().right-Hh.left-1)}var jh=Ff.line.height-th;if((jh>.005||jh<-.005)&&(df<Yd&&(Sf-=jh),a_(Ff.line,th),zv(Ff.line),Ff.rest))for(var cm=0;cm<Ff.rest.length;cm++)zv(Ff.rest[cm]);if(bh>Nd.display.sizerWidth){var mm=Math.ceil(bh/Q0(Nd.display));mm>Nd.display.maxLineLength&&(Nd.display.maxLineLength=mm,Nd.display.maxLine=Ff.line,Nd.display.maxLineChanged=!0)}}}Math.abs(Sf)>2&&(Fd.scroller.scrollTop+=Sf)}function zv(Nd){if(Nd.widgets)for(var Fd=0;Fd<Nd.widgets.length;++Fd){var Kd=Nd.widgets[Fd],Yd=Kd.node.parentNode;Yd&&(Kd.height=Yd.offsetHeight)}}function Fb(Nd,Fd,Kd){var Yd=Kd&&Kd.top!=null?Math.max(0,Kd.top):Nd.scroller.scrollTop;Yd=Math.floor(Yd-vg(Nd));var df=Kd&&Kd.bottom!=null?Kd.bottom:Yd+Nd
2024-09-25 14:23:53 +08:00
top : ` +(Fd.top-Kd.viewOffset-vg(Nd.display))+ ` px ;
height : ` +(Fd.bottom-Fd.top+B0(Nd)+Kd.barHeight)+ ` px ;
2024-09-28 20:51:35 +08:00
left : ` +Fd.left+"px; width: "+Math.max(2,Fd.right-Fd.left)+"px;");Nd.display.lineSpace.appendChild(kf),kf.scrollIntoView(df),Nd.display.lineSpace.removeChild(kf)}}}function kT(Nd,Fd,Kd,Yd){Yd==null&&(Yd=0);var df;!Nd.options.lineWrapping&&Fd==Kd&&(Kd=Fd.sticky=="before"?_m(Fd.line,Fd.ch+1,"before"):Fd,Fd=Fd.ch?_m(Fd.line,Fd.sticky=="before"?Fd.ch-1:Fd.ch,"after"):Fd);for(var Sf=0;Sf<5;Sf++){var kf=!1,Ff=Zh(Nd,Fd),Kf=!Kd||Kd==Fd?Ff:Zh(Nd,Kd);df={left:Math.min(Ff.left,Kf.left),top:Math.min(Ff.top,Kf.top)-Yd,right:Math.max(Ff.left,Kf.left),bottom:Math.max(Ff.bottom,Kf.bottom)+Yd};var th=Xy(Nd,df),bh=Nd.doc.scrollTop,Ah=Nd.doc.scrollLeft;if(th.scrollTop!=null&&(Wv(Nd,th.scrollTop),Math.abs(Nd.doc.scrollTop-bh)>1&&(kf=!0)),th.scrollLeft!=null&&(S0(Nd,th.scrollLeft),Math.abs(Nd.doc.scrollLeft-Ah)>1&&(kf=!0)),!kf)break}return df}function PE(Nd,Fd){var Kd=Xy(Nd,Fd);Kd.scrollTop!=null&&Wv(Nd,Kd.scrollTop),Kd.scrollLeft!=null&&S0(Nd,Kd.scrollLeft)}function Xy(Nd,Fd){var Kd=Nd.display,Yd=y0(Nd.display);Fd.top<0&&(Fd.top=0);var df=Nd.curOp&&Nd.curOp.scrollTop!=null?Nd.curOp.scrollTop:Kd.scroller.scrollTop,Sf=Ry(Nd),kf={};Fd.bottom-Fd.top>Sf&&(Fd.bottom=Fd.top+Sf);var Ff=Nd.doc.height+kb(Kd),Kf=Fd.top<Yd,th=Fd.bottom>Ff-Yd;if(Fd.top<df)kf.scrollTop=Kf?0:Fd.top;else if(Fd.bottom>df+Sf){var bh=Math.min(Fd.top,(th?Ff:Fd.bottom)-Sf);bh!=df&&(kf.scrollTop=bh)}var Ah=Nd.options.fixedGutter?0:Kd.gutters.offsetWidth,Hh=Nd.curOp&&Nd.curOp.scrollLeft!=null?Nd.curOp.scrollLeft:Kd.scroller.scrollLeft-Ah,jh=Mb(Nd)-Kd.gutters.offsetWidth,cm=Fd.right-Fd.left>jh;return cm&&(Fd.right=Fd.left+jh),Fd.left<10?kf.scrollLeft=0:Fd.left<Hh?kf.scrollLeft=Math.max(0,Fd.left+Ah-(cm?0:10)):Fd.right>jh+Hh-3&&(kf.scrollLeft=Fd.right+(cm?0:10)-jh),kf}function Qy(Nd,Fd){Fd!=null&&(P1(Nd),Nd.curOp.scrollTop=(Nd.curOp.scrollTop==null?Nd.doc.scrollTop:Nd.curOp.scrollTop)+Fd)}function J_(Nd){P1(Nd);var Fd=Nd.getCursor();Nd.curOp.scrollToPos={from:Fd,to:Fd,margin:Nd.options.cursorScrollMargin}}function hg(Nd,Fd,Kd){(Fd!=null||Kd!=null)&&P1(Nd),Fd!=null&&(Nd.curOp.scrollLeft=Fd),Kd!=null&&(Nd.curOp.scrollTop=Kd)}function MT(Nd,Fd){P1(Nd),Nd.curOp.scrollToPos=Fd}function P1(Nd){var Fd=Nd.curOp.scrollToPos;if(Fd){Nd.curOp.scrollToPos=null;var Kd=Jm(Nd,Fd.from),Yd=Jm(Nd,Fd.to);Jy(Nd,Kd,Yd,Fd.margin)}}function Jy(Nd,Fd,Kd,Yd){var df=Xy(Nd,{left:Math.min(Fd.left,Kd.left),top:Math.min(Fd.top,Kd.top)-Yd,right:Math.max(Fd.right,Kd.right),bottom:Math.max(Fd.bottom,Kd.bottom)+Yd});hg(Nd,df.scrollLeft,df.scrollTop)}function Wv(Nd,Fd){Math.abs(Nd.doc.scrollTop-Fd)<2||(nd||x0(Nd,{top:Fd}), $ 1(Nd,Fd,!0),nd&&x0(Nd),Xv(Nd,100))}function $ 1(Nd,Fd,Kd){Fd=Math.max(0,Math.min(Nd.display.scroller.scrollHeight-Nd.display.scroller.clientHeight,Fd)),!(Nd.display.scroller.scrollTop==Fd&&!Kd)&&(Nd.doc.scrollTop=Fd,Nd.display.scrollbars.setScrollTop(Fd),Nd.display.scroller.scrollTop!=Fd&&(Nd.display.scroller.scrollTop=Fd))}function S0(Nd,Fd,Kd,Yd){Fd=Math.max(0,Math.min(Fd,Nd.display.scroller.scrollWidth-Nd.display.scroller.clientWidth)),!((Kd?Fd==Nd.doc.scrollLeft:Math.abs(Nd.doc.scrollLeft-Fd)<2)&&!Yd)&&(Nd.doc.scrollLeft=Fd,jE(Nd),Nd.display.scroller.scrollLeft!=Fd&&(Nd.display.scroller.scrollLeft=Fd),Nd.display.scrollbars.setScrollLeft(Fd))}function jb(Nd){var Fd=Nd.display,Kd=Fd.gutters.offsetWidth,Yd=Math.round(Nd.doc.height+kb(Nd.display));return{clientHeight:Fd.scroller.clientHeight,viewHeight:Fd.wrapper.clientHeight,scrollWidth:Fd.scroller.scrollWidth,clientWidth:Fd.scroller.clientWidth,viewWidth:Fd.wrapper.clientWidth,barLeft:Nd.options.fixedGutter?Kd:0,docHeight:Yd,scrollHeight:Yd+B0(Nd)+Fd.barHeight,nativeBarWidth:Fd.nativeBarWidth,gutterWidth:Kd}}var l0=function(Nd,Fd,Kd){this.cm=Kd;var Yd=this.vert=_f("div",[_f("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),df=this.horiz=_f("div",[_f("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");Yd.tabIndex=df.tabIndex=-1,Nd(Yd),Nd(df),lm(Yd,"scroll",function(){Yd.clientHeight&&Fd(Yd.scrollTop,"vertical")}),lm(df,"scroll",function(){df.clientWidth&&Fd(df.scrollLeft,"horizontal")}),thi
` },setDirection:yg(function(Nd){Nd!="rtl"&&(Nd="ltr"),Nd!=this.direction&&(this.direction=Nd,this.iter(function(Fd){return Fd.order=null}),this.cm&&eb(this.cm))})}),Bg.prototype.eachLine=Bg.prototype.iter;var V1=0;function YT(Nd){var Fd=this;if(sT(Fd),!(e_(Fd,Nd)||R_(Fd.display,Nd))){Zm(Nd),cd&&(V1=+new Date);var Kd=P0(Fd,Nd,!0),Yd=Nd.dataTransfer.files;if(!(!Kd||Fd.isReadOnly()))if(Yd&&Yd.length&&window.FileReader&&window.File)for(var df=Yd.length,Sf=Array(df),kf=0,Ff=function(){++kf==df&& $ _(Fd,function(){Kd=o_(Fd.doc,Kd);var jh={from:Kd,to:Kd,text:Fd.doc.splitLines(Sf.filter(function(cm){return cm!=null}).join(Fd.doc.lineSeparator())),origin:"paste"};Sv(Fd.doc,jh),gb(Fd.doc,hb(o_(Fd.doc,Kd),o_(Fd.doc,mb(jh))))})()},Kf=function(jh,cm){if(Fd.options.allowDropFileTypes&&ah(Fd.options.allowDropFileTypes,jh.type)==-1){Ff();return}var mm=new FileReader;mm.onerror=function(){return Ff()},mm.onload=function(){var Im=mm.result;if(/[ \x 00- \x 08 \x 0e- \x 1f]{2}/.test(Im)){Ff();return}Sf[cm]=Im,Ff()},mm.readAsText(jh)},th=0;th<Yd.length;th++)Kf(Yd[th],th);else{if(Fd.state.draggingText&&Fd.doc.sel.contains(Kd)>-1){Fd.state.draggingText(Nd),setTimeout(function(){return Fd.display.input.focus()},20);return}try{var bh=Nd.dataTransfer.getData("Text");if(bh){var Ah;if(Fd.state.draggingText&&!Fd.state.draggingText.copy&&(Ah=Fd.listSelections()),Ng(Fd.doc,hb(Kd,Kd)),Ah)for(var Hh=0;Hh<Ah.length;++Hh)zb(Fd.doc,"",Ah[Hh].anchor,Ah[Hh].head,"drag");Fd.replaceSelection(bh,"around","paste"),Fd.display.input.focus()}}catch{}}}}function fE(Nd,Fd){if(cd&&(!Nd.state.draggingText||+new Date-V1<100)){Q_(Fd);return}if(!(e_(Nd,Fd)||R_(Nd.display,Fd))&&(Fd.dataTransfer.setData("Text",Nd.getSelection()),Fd.dataTransfer.effectAllowed="copyMove",Fd.dataTransfer.setDragImage&&!Dd)){var Kd=_f("img",null,null,"position: fixed; left: 0; top: 0;");Kd.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Sd&&(Kd.width=Kd.height=1,Nd.display.wrapper.appendChild(Kd),Kd._top=Kd.offsetTop),Fd.dataTransfer.setDragImage(Kd,0,0),Sd&&Kd.parentNode.removeChild(Kd)}}function b_(Nd,Fd){var Kd=P0(Nd,Fd);if(Kd){var Yd=document.createDocumentFragment();M1(Nd,Kd,Yd),Nd.display.dragCursor||(Nd.display.dragCursor=_f("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),Nd.display.lineSpace.insertBefore(Nd.display.dragCursor,Nd.display.cursorDiv)),Tf(Nd.display.dragCursor,Yd)}}function sT(Nd){Nd.display.dragCursor&&(Nd.display.lineSpace.removeChild(Nd.display.dragCursor),Nd.display.dragCursor=null)}function oT(Nd){if(document.getElementsByClassName){for(var Fd=document.getElementsByClassName("CodeMirror"),Kd=[],Yd=0;Yd<Fd.length;Yd++){var df=Fd[Yd].CodeMirror;df&&Kd.push(df)}Kd.length&&Kd[0].operation(function(){for(var Sf=0;Sf<Kd.length;Sf++)Nd(Kd[Sf])})}}var wv=!1;function lT(){wv||(KT(),wv=!0)}function KT(){var Nd;lm(window,"resize",function(){Nd==null&&(Nd=setTimeout(function(){Nd=null,oT(XT)},100))}),lm(window,"blur",function(){return oT(fv)})}function XT(Nd){var Fd=Nd.display;Fd.cachedCharWidth=Fd.cachedTextHeight=Fd.cachedPaddingH=null,Fd.scrollbarsClipped=!1,Nd.setSize()}for(var Tg={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:" ` ",219:" [ ",220:" \ \ ",221:" ] ",222:" ' ",224:" Mod ",63232:" Up ",63233:" Down ",63234:" Left ",63235:" Right ",63272:" Delete ",63273:" Home ",63275:" End ",63276:" PageUp ",63277:" PageDown ",63302:" Insert "},r1=0;r1<10;r1++)Tg[r1+48]=Tg[r1+96]=String(r1);for(var Kb=65;Kb<=90;Kb++)Tg[Kb]=String.fromCharCode(Kb);for(var Xb=1;Xb<=12;Xb++)Tg[Xb+111]=Tg[Xb+63235]=" F "+Xb;var F0={};F0.basic={Left:" goCharLeft ",Right:" goCharRight ",Up:" goLineUp ",Down:" goLineDown ",End:" goLineEnd ",Home:" goLineStartSmart ",PageUp:" goPageUp ",PageDown:" goPageDown ",Delete:" delCharAfter ",Backspace:" delCharBefore "," Shift - Backspace ":"
` ,"start")},toggleOverwrite:function(Nd){return Nd.toggleOverwrite()}};function rb(Nd,Fd){var Kd=Om(Nd.doc,Fd),Yd=P_(Kd);return Yd!=Kd&&(Fd=Um(Yd)),s1(!0,Nd,Yd,Fd,1)}function cT(Nd,Fd){var Kd=Om(Nd.doc,Fd),Yd=Uv(Kd);return Yd!=Kd&&(Fd=Um(Yd)),s1(!0,Nd,Kd,Fd,-1)}function mE(Nd,Fd){var Kd=rb(Nd,Fd.line),Yd=Om(Nd.doc,Kd.line),df=Xh(Yd,Nd.doc.direction);if(!df||df[0].level==0){var Sf=Math.max(Kd.ch,Yd.text.search(/ \S /)),kf=Fd.line==Kd.line&&Fd.ch<=Sf&&Fd.ch;return _m(Kd.line,kf?0:Sf,Kd.sticky)}return Kd}function Nv(Nd,Fd,Kd){if(typeof Fd=="string"&&(Fd=o1[Fd],!Fd))return!1;Nd.display.input.ensurePolled();var Yd=Nd.display.shift,df=!1;try{Nd.isReadOnly()&&(Nd.state.suppressEdits=!0),Kd&&(Nd.display.shift=!1),df=Fd(Nd)!=Rf}finally{Nd.display.shift=Yd,Nd.state.suppressEdits=!1}return df}function QT(Nd,Fd,Kd){for(var Yd=0;Yd<Nd.state.keyMaps.length;Yd++){var df=Qg(Fd,Nd.state.keyMaps[Yd],Kd,Nd);if(df)return df}return Nd.options.extraKeys&&Qg(Fd,Nd.options.extraKeys,Kd,Nd)||Qg(Fd,Nd.options.keyMap,Kd,Nd)}var JT=new Gf;function l1(Nd,Fd,Kd,Yd){var df=Nd.state.keySeq;if(df){if(z1(Fd))return"handled";if(/ \' $ /.test(Fd)?Nd.state.keySeq=null:JT.set(50,function(){Nd.state.keySeq==df&&(Nd.state.keySeq=null,Nd.display.input.reset())}),_E(Nd,df+" "+Fd,Kd,Yd))return!0}return _E(Nd,Fd,Kd,Yd)}function _E(Nd,Fd,Kd,Yd){var df=QT(Nd,Fd,Yd);return df=="multi"&&(Nd.state.keySeq=Fd),df=="handled"&&Vd(Nd,"keyHandled",Nd,Fd,Kd),(df=="handled"||df=="multi")&&(Zm(Kd),Lb(Nd)),!!df}function gE(Nd,Fd){var Kd=n1(Fd,!0);return Kd?Fd.shiftKey&&!Nd.state.keySeq?l1(Nd,"Shift-"+Kd,Fd,function(Yd){return Nv(Nd,Yd,!0)})||l1(Nd,Kd,Fd,function(Yd){if(typeof Yd=="string"?/^go[A-Z]/.test(Yd):Yd.motion)return Nv(Nd,Yd)}):l1(Nd,Kd,Fd,function(Yd){return Nv(Nd,Yd)}):!1}function ZT(Nd,Fd,Kd){return l1(Nd,"'"+Kd+"'",Fd,function(Yd){return Nv(Nd,Yd,!0)})}var Y1=null;function bE(Nd){var Fd=this;if(!(Nd.target&&Nd.target!=Fd.display.input.getField())&&(Fd.curOp.focus=Yf( $ f(Fd)),!e_(Fd,Nd))){cd&&dd<11&&Nd.keyCode==27&&(Nd.returnValue=!1);var Kd=Nd.keyCode;Fd.display.shift=Kd==16||Nd.shiftKey;var Yd=gE(Fd,Nd);Sd&&(Y1=Yd?Kd:null,!Yd&&Kd==88&&!eh&&(Ud?Nd.metaKey:Nd.ctrlKey)&&Fd.replaceSelection("",null,"cut")),nd&&!Ud&&!Yd&&Kd==46&&Nd.shiftKey&&!Nd.ctrlKey&&document.execCommand&&document.execCommand("cut"),Kd==18&&!/ \b CodeMirror-crosshair \b /.test(Fd.display.lineDiv.className)&&zg(Fd)}}function zg(Nd){var Fd=Nd.display.lineDiv;Zf(Fd,"CodeMirror-crosshair");function Kd(Yd){(Yd.keyCode==18||!Yd.altKey)&&(hf(Fd,"CodeMirror-crosshair"),Rm(document,"keyup",Kd),Rm(document,"mouseover",Kd))}lm(document,"keyup",Kd),lm(document,"mouseover",Kd)}function D0(Nd){Nd.keyCode==16&&(this.doc.sel.shift=!1),e_(this,Nd)}function dT(Nd){var Fd=this;if(!(Nd.target&&Nd.target!=Fd.display.input.getField())&&!(R_(Fd.display,Nd)||e_(Fd,Nd)||Nd.ctrlKey&&!Nd.altKey||Ud&&Nd.metaKey)){var Kd=Nd.keyCode,Yd=Nd.charCode;if(Sd&&Kd==Y1){Y1=null,Zm(Nd);return}if(!(Sd&&(!Nd.which||Nd.which<10)&&gE(Fd,Nd))){var df=String.fromCharCode(Yd??Kd);df!=" \b "&&(ZT(Fd,Nd,df)||Fd.display.input.onKeyPress(Nd))}}}var e2=400,Dv=function(Nd,Fd,Kd){this.time=Nd,this.pos=Fd,this.button=Kd};Dv.prototype.compare=function(Nd,Fd,Kd){return this.time+e2>Nd&&s_(Fd,this.pos)==0&&Kd==this.button};var j0,Iv;function pT(Nd,Fd){var Kd=+new Date;return Iv&&Iv.compare(Kd,Nd,Fd)?(j0=Iv=null,"triple"):j0&&j0.compare(Kd,Nd,Fd)?(Iv=new Dv(Kd,Nd,Fd),j0=null,"double"):(j0=new Dv(Kd,Nd,Fd),Iv=null,"single")}function fT(Nd){var Fd=this,Kd=Fd.display;if(!(e_(Fd,Nd)||Kd.activeTouch&&Kd.input.supportsTouch())){if(Kd.input.ensurePolled(),Kd.shift=Nd.shiftKey,R_(Kd,Nd)){pd||(Kd.scroller.draggable=!1,setTimeout(function(){return Kd.scroller.draggable=!0},100));return}if(!Rv(Fd,Nd)){var Yd=P0(Fd,Nd),df=H_(Nd),Sf=Yd?pT(Yd,df):"single";Xf(Fd).focus(),df==1&&Fd.state.selectingText&&Fd.state.selectingText(Nd),!(Yd&&hT(Fd,df,Yd,Sf,Nd))&&(df==1?Yd?u1(Fd,Yd,Sf,Nd):Z_(Nd)==Kd.scroller&&Zm(Nd):df==2?(Yd&&vv(Fd.doc,Yd),setTimeout(function(){return Kd.input.focus()},20)):df==3&&(Qd?Fd.display.input.onContextMenu(Nd):pv(Fd)))}}}function hT(Nd,Fd,Kd,Yd,df){var Sf="Click";
` )==Fd){if(Yd.ranges.length%c0.text.length==0){th=[];for(var bh=0;bh<c0.text.length;bh++)th.push(Sf.splitLines(c0.text[bh]))}}else Kf.length==Yd.ranges.length&&Nd.options.pasteLinesPerSelection&&(th=_h(Kf,function(jm){return[jm]}));for(var Ah=Nd.curOp.updateInput,Hh=Yd.ranges.length-1;Hh>=0;Hh--){var jh=Yd.ranges[Hh],cm=jh.from(),mm=jh.to();jh.empty()&&(Kd&&Kd>0?cm=_m(cm.line,cm.ch-Kd):Nd.state.overwrite&&!Ff?mm=_m(mm.line,Math.min(Om(Sf,mm.line).text.length,mm.ch+uh(Kf).length)):Ff&&c0&&c0.lineWise&&c0.text.join( `
` )==Kf.join( `
` )&&(cm=mm=_m(cm.line,0)));var Im={from:cm,to:mm,text:th?th[Hh%th.length]:Kf,origin:df||(Ff?"paste":Nd.state.cutIncoming>kf?"cut":"+input")};Sv(Nd.doc,Im),Vd(Nd,"inputRead",Nd,Im)}Fd&&!Ff&&ty(Nd,Fd),J_(Nd),Nd.curOp.updateInput<2&&(Nd.curOp.updateInput=Ah),Nd.curOp.typing=!0,Nd.state.pasteIncoming=Nd.state.cutIncoming=-1}function U0(Nd,Fd){var Kd=Nd.clipboardData&&Nd.clipboardData.getData("Text");if(Kd)return Nd.preventDefault(),!Fd.isReadOnly()&&!Fd.options.disableInput&&Fd.hasFocus()&&Ig(Fd,function(){return SE(Fd,Kd,0,null,"paste")}),!0}function ty(Nd,Fd){if(!(!Nd.options.electricChars||!Nd.options.smartIndent))for(var Kd=Nd.doc.sel,Yd=Kd.ranges.length-1;Yd>=0;Yd--){var df=Kd.ranges[Yd];if(!(df.head.ch>100||Yd&&Kd.ranges[Yd-1].head.line==df.head.line)){var Sf=Nd.getModeAt(df.head),kf=!1;if(Sf.electricChars){for(var Ff=0;Ff<Sf.electricChars.length;Ff++)if(Fd.indexOf(Sf.electricChars.charAt(Ff))>-1){kf=p1(Nd,df.head.line,"smart");break}}else Sf.electricInput&&Sf.electricInput.test(Om(Nd.doc,df.head.line).text.slice(0,df.head.ch))&&(kf=p1(Nd,df.head.line,"smart"));kf&&Vd(Nd,"electricInput",Nd,df.head.line)}}}function ry(Nd){for(var Fd=[],Kd=[],Yd=0;Yd<Nd.doc.sel.ranges.length;Yd++){var df=Nd.doc.sel.ranges[Yd].head.line,Sf={anchor:_m(df,0),head:_m(df+1,0)};Kd.push(Sf),Fd.push(Nd.getRange(Sf.anchor,Sf.head))}return{text:Fd,ranges:Kd}}function f1(Nd,Fd,Kd,Yd){Nd.setAttribute("autocorrect",Kd?"on":"off"),Nd.setAttribute("autocapitalize",Yd?"on":"off"),Nd.setAttribute("spellcheck",!!Fd)}function h1(){var Nd=_f("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),Fd=_f("div",[Nd],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return pd?Nd.style.width="1000px":Nd.setAttribute("wrap","off"),Od&&(Nd.style.border="1px solid black"),Fd}function kv(Nd){var Fd=Nd.optionHandlers,Kd=Nd.helpers={};Nd.prototype={constructor:Nd,focus:function(){Xf(this).focus(),this.display.input.focus()},setOption:function(Yd,df){var Sf=this.options,kf=Sf[Yd];Sf[Yd]==df&&Yd!="mode"||(Sf[Yd]=df,Fd.hasOwnProperty(Yd)&& $ _(this,Fd[Yd])(this,df,kf),Pm(this,"optionChange",this,Yd))},getOption:function(Yd){return this.options[Yd]},getDoc:function(){return this.doc},addKeyMap:function(Yd,df){this.state.keyMaps[df?"push":"unshift"](i1(Yd))},removeKeyMap:function(Yd){for(var df=this.state.keyMaps,Sf=0;Sf<df.length;++Sf)if(df[Sf]==Yd||df[Sf].name==Yd)return df.splice(Sf,1),!0},addOverlay:u_(function(Yd,df){var Sf=Yd.token?Yd:Nd.getMode(this.options,Yd);if(Sf.startState)throw new Error("Overlays may not be stateful.");nh(this.state.overlays,{mode:Sf,modeSpec:Yd,opaque:df&&df.opaque,priority:df&&df.priority||0},function(kf){return kf.priority}),this.state.modeGen++,jg(this)}),removeOverlay:u_(function(Yd){for(var df=this.state.overlays,Sf=0;Sf<df.length;++Sf){var kf=df[Sf].modeSpec;if(kf==Yd||typeof Yd=="string"&&kf.name==Yd){df.splice(Sf,1),this.state.modeGen++,jg(this);return}}}),indentLine:u_(function(Yd,df,Sf){typeof df!="string"&&typeof df!="number"&&(df==null?df=this.options.smartIndent?"smart":"prev":df=df?"add":"subtract"),Zg(this.doc,Yd)&&p1(this,Yd,df,Sf)}),indentSelection:u_(function(Yd){for(var df=this.doc.sel.ranges,Sf=-1,kf=0;kf<df.length;kf++){var Ff=df[kf];if(Ff.empty())Ff.head.line>Sf&&(p1(this,Ff.head.line,Yd,!0),Sf=Ff.head.line,kf==this.doc.sel.primIndex&&J_(this));else{var Kf=Ff.from(),th=Ff.to(),bh=Math.max(Sf,Kf.line);Sf=Math.min(this.lastLine(),th.line-(th.ch?0:1))+1;for(var Ah=bh;Ah<Sf;++Ah)p1(this,Ah,Yd);var Hh=this.doc.sel.ranges;Kf.ch==0&&df.length==Hh.length&&Hh[kf].from().ch>0&&u0(this.doc,kf,new k_(Kf,Hh[kf].to()),qf)}}}),getTokenAt:function(Yd,df){return sb(this,Yd,df)},getLineTokens:function(Yd,df){return sb(this,_m(Yd),df,!0)},getTokenTypeAt:function(Yd){Yd=o_(this.doc,Yd);var df=k0(this,Om(this.doc,Yd.line)),Sf=0,kf=(df.length-1)/2,Ff=Yd.ch,Kf;if(Ff==0)Kf=df[2];else for(;;){var th=Sf+kf>>1;if((th?df[th*2-1]:0)>=Ff)kf=th;else if(df[th*2+1]<Ff)Sf=th+1;else{Kf=df[th*2+2];break}}var bh=Kf?Kf.indexOf("overlay "):-1;return bh<0?Kf:bh==0?null:K
2024-09-25 14:23:53 +08:00
` ,Im=Bh(mm,jh)?"w":Hh&&mm== `
2024-09-28 20:51:35 +08:00
` ?"n":!Hh||/ \s /.test(mm)?null:"p";if(Hh&&!cm&&!Im&&(Im="s"),Ah&&Ah!=Im){Kd<0&&(Kd=1,bh(),Fd.sticky="after");break}if(Im&&(Ah=Im),Kd>0&&!bh(!cm))break}var jm=Ev(Nd,Fd,Sf,kf,!0);return kg(Sf,jm)&&(jm.hitSide=!0),jm}function m1(Nd,Fd,Kd,Yd){var df=Nd.doc,Sf=Fd.left,kf;if(Yd=="page"){var Ff=Math.min(Nd.display.wrapper.clientHeight,Xf(Nd).innerHeight||df(Nd).documentElement.clientHeight),Kf=Math.max(Ff-.5*y0(Nd.display),3);kf=(Kd>0?Fd.bottom:Fd.top)+Kd*Kf}else Yd=="line"&&(kf=Kd>0?Fd.bottom+3:Fd.top-3);for(var th;th=N_(Nd,Sf,kf),!!th.outside;){if(Kd<0?kf<=0:kf>=df.height){th.hitSide=!0;break}kf+=Kd*5}return th}var M_=function(Nd){this.cm=Nd,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Gf,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};M_.prototype.init=function(Nd){var Fd=this,Kd=this,Yd=Kd.cm,df=Kd.div=Nd.lineDiv;df.contentEditable=!0,f1(df,Yd.options.spellcheck,Yd.options.autocorrect,Yd.options.autocapitalize);function Sf(Ff){for(var Kf=Ff.target;Kf;Kf=Kf.parentNode){if(Kf==df)return!0;if(/ \b CodeMirror-(?:line)?widget \b /.test(Kf.className))break}return!1}lm(df,"paste",function(Ff){!Sf(Ff)||e_(Yd,Ff)||U0(Ff,Yd)||dd<=11&&setTimeout( $ _(Yd,function(){return Fd.updateFromDOM()}),20)}),lm(df,"compositionstart",function(Ff){Fd.composing={data:Ff.data,done:!1}}),lm(df,"compositionupdate",function(Ff){Fd.composing||(Fd.composing={data:Ff.data,done:!1})}),lm(df,"compositionend",function(Ff){Fd.composing&&(Ff.data!=Fd.composing.data&&Fd.readFromDOMSoon(),Fd.composing.done=!0)}),lm(df,"touchstart",function(){return Kd.forceCompositionEnd()}),lm(df,"input",function(){Fd.composing||Fd.readFromDOMSoon()});function kf(Ff){if(!(!Sf(Ff)||e_(Yd,Ff))){if(Yd.somethingSelected())Z1({lineWise:!1,text:Yd.getSelections()}),Ff.type=="cut"&&Yd.replaceSelection("",null,"cut");else if(Yd.options.lineWiseCopyCut){var Kf=ry(Yd);Z1({lineWise:!0,text:Kf.text}),Ff.type=="cut"&&Yd.operation(function(){Yd.setSelections(Kf.ranges,0,qf),Yd.replaceSelection("",null,"cut")})}else return;if(Ff.clipboardData){Ff.clipboardData.clearData();var th=c0.text.join( `
` );if(Ff.clipboardData.setData("Text",th),Ff.clipboardData.getData("Text")==th){Ff.preventDefault();return}}var bh=h1(),Ah=bh.firstChild;f1(Ah),Yd.display.lineSpace.insertBefore(bh,Yd.display.lineSpace.firstChild),Ah.value=c0.text.join( `
` );var Hh=Yf(Jf(df));Pf(Ah),setTimeout(function(){Yd.display.lineSpace.removeChild(bh),Hh.focus(),Hh==df&&Kd.showPrimarySelection()},50)}}lm(df,"copy",kf),lm(df,"cut",kf)},M_.prototype.screenReaderLabelChanged=function(Nd){Nd?this.div.setAttribute("aria-label",Nd):this.div.removeAttribute("aria-label")},M_.prototype.prepareSelection=function(){var Nd=Fy(this.cm,!1);return Nd.focus=Yf(Jf(this.div))==this.div,Nd},M_.prototype.showSelection=function(Nd,Fd){!Nd||!this.cm.display.view.length||((Nd.focus||Fd)&&this.showPrimarySelection(),this.showMultipleSelections(Nd))},M_.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},M_.prototype.showPrimarySelection=function(){var Nd=this.getSelection(),Fd=this.cm,Kd=Fd.doc.sel.primary(),Yd=Kd.from(),df=Kd.to();if(Fd.display.viewTo==Fd.display.viewFrom||Yd.line>=Fd.display.viewTo||df.line<Fd.display.viewFrom){Nd.removeAllRanges();return}var Sf=Sg(Fd,Nd.anchorNode,Nd.anchorOffset),kf=Sg(Fd,Nd.focusNode,Nd.focusOffset);if(!(Sf&&!Sf.bad&&kf&&!kf.bad&&s_(Gg(Sf,kf),Yd)==0&&s_(m0(Sf,kf),df)==0)){var Ff=Fd.display.view,Kf=Yd.line>=Fd.display.viewFrom&&Eb(Fd,Yd)||{node:Ff[0].measure.map[2],offset:0},th=df.line<Fd.display.viewTo&&Eb(Fd,df);if(!th){var bh=Ff[Ff.length-1].measure,Ah=bh.maps?bh.maps[bh.maps.length-1]:bh.map;th={node:Ah[Ah.length-1],offset:Ah[Ah.length-2]-Ah[Ah.length-3]}}if(!Kf||!th){Nd.removeAllRanges();return}var Hh=Nd.rangeCount&&Nd.getRangeAt(0),jh;try{jh=xf(Kf.node,Kf.offset,th.offset,th.node)}catch{}jh&&(!nd&&Fd.state.focused?(Nd.collapse(Kf.node,Kf.offset),jh.collapsed||(Nd.removeAllRanges(),Nd.addRange(jh))):(Nd.removeAllRanges(),Nd.addRange(jh)),Hh&&Nd.anchorNode==null?Nd.addRange(Hh):nd&&this.startGracePeriod()),this.rememberSelection()}},M_.prototype.startGracePeriod=function(){var Nd=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){Nd.gracePeriod=!1,Nd.selectionChanged()&&Nd.cm.operation(function(){return Nd.cm.curOp.selectionChanged=!0})},20)},M_.prototype.showMultipleSelections=function(Nd){Tf(this.cm.display.cursorDiv,Nd.cursors),Tf(this.cm.display.selectionDiv,Nd.selection)},M_.prototype.rememberSelection=function(){var Nd=this.getSelection();this.lastAnchorNode=Nd.anchorNode,this.lastAnchorOffset=Nd.anchorOffset,this.lastFocusNode=Nd.focusNode,this.lastFocusOffset=Nd.focusOffset},M_.prototype.selectionInEditor=function(){var Nd=this.getSelection();if(!Nd.rangeCount)return!1;var Fd=Nd.getRangeAt(0).commonAncestorContainer;return Bf(this.div,Fd)},M_.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||Yf(Jf(this.div))!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},M_.prototype.blur=function(){this.div.blur()},M_.prototype.getField=function(){return this.div},M_.prototype.supportsTouch=function(){return!0},M_.prototype.receivedFocus=function(){var Nd=this,Fd=this;this.selectionInEditor()?setTimeout(function(){return Nd.pollSelection()},20):Ig(this.cm,function(){return Fd.cm.curOp.selectionChanged=!0});function Kd(){Fd.cm.state.focused&&(Fd.pollSelection(),Fd.polling.set(Fd.cm.options.pollInterval,Kd))}this.polling.set(this.cm.options.pollInterval,Kd)},M_.prototype.selectionChanged=function(){var Nd=this.getSelection();return Nd.anchorNode!=this.lastAnchorNode||Nd.anchorOffset!=this.lastAnchorOffset||Nd.focusNode!=this.lastFocusNode||Nd.focusOffset!=this.lastFocusOffset},M_.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var Nd=this.getSelection(),Fd=this.cm;if(Md&&Td&&this.cm.display.gutterSpecs.length&&n2(Nd.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var Kd=Sg(Fd,Nd.anchorNode,Nd.anchorOffset),Yd=Sg(Fd,Nd.focusNode,Nd.focusOffset);Kd&&Yd&&Ig(Fd,function(){wg(Fd.doc,hb(Kd,Yd),qf),(Kd.bad||Yd.bad)&&(Fd.curOp.selectionChanged=!0)})}}},M_.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMT
` ),Pf(df))}else return;kf.type=="cut"&&(Yd.state.cutIncoming=+new Date)}}lm(df,"cut",Sf),lm(df,"copy",Sf),lm(Nd.scroller,"paste",function(kf){if(!(R_(Nd,kf)||e_(Yd,kf))){if(!df.dispatchEvent){Yd.state.pasteIncoming=+new Date,Kd.focus();return}var Ff=new Event("paste");Ff.clipboardData=kf.clipboardData,df.dispatchEvent(Ff)}}),lm(Nd.lineSpace,"selectstart",function(kf){R_(Nd,kf)||Zm(kf)}),lm(df,"compositionstart",function(){var kf=Yd.getCursor("from");Kd.composing&&Kd.composing.range.clear(),Kd.composing={start:kf,range:Yd.markText(kf,Yd.getCursor("to"),{className:"CodeMirror-composing"})}}),lm(df,"compositionend",function(){Kd.composing&&(Kd.poll(),Kd.composing.range.clear(),Kd.composing=null)})},ag.prototype.createField=function(Nd){this.wrapper=h1(),this.textarea=this.wrapper.firstChild;var Fd=this.cm.options;f1(this.textarea,Fd.spellcheck,Fd.autocorrect,Fd.autocapitalize)},ag.prototype.screenReaderLabelChanged=function(Nd){Nd?this.textarea.setAttribute("aria-label",Nd):this.textarea.removeAttribute("aria-label")},ag.prototype.prepareSelection=function(){var Nd=this.cm,Fd=Nd.display,Kd=Nd.doc,Yd=Fy(Nd);if(Nd.options.moveInputWithCursor){var df=Zh(Nd,Kd.sel.primary().head,"div"),Sf=Fd.wrapper.getBoundingClientRect(),kf=Fd.lineDiv.getBoundingClientRect();Yd.teTop=Math.max(0,Math.min(Fd.wrapper.clientHeight-10,df.top+kf.top-Sf.top)),Yd.teLeft=Math.max(0,Math.min(Fd.wrapper.clientWidth-10,df.left+kf.left-Sf.left))}return Yd},ag.prototype.showSelection=function(Nd){var Fd=this.cm,Kd=Fd.display;Tf(Kd.cursorDiv,Nd.cursors),Tf(Kd.selectionDiv,Nd.selection),Nd.teTop!=null&&(this.wrapper.style.top=Nd.teTop+"px",this.wrapper.style.left=Nd.teLeft+"px")},ag.prototype.reset=function(Nd){if(!(this.contextMenuPending||this.composing&&Nd)){var Fd=this.cm;if(this.resetting=!0,Fd.somethingSelected()){this.prevInput="";var Kd=Fd.getSelection();this.textarea.value=Kd,Fd.state.focused&&Pf(this.textarea),cd&&dd>=9&&(this.hasSelection=Kd)}else Nd||(this.prevInput=this.textarea.value="",cd&&dd>=9&&(this.hasSelection=null));this.resetting=!1}},ag.prototype.getField=function(){return this.textarea},ag.prototype.supportsTouch=function(){return!1},ag.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!jd||Yf(Jf(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},ag.prototype.blur=function(){this.textarea.blur()},ag.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ag.prototype.receivedFocus=function(){this.slowPoll()},ag.prototype.slowPoll=function(){var Nd=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){Nd.poll(),Nd.cm.state.focused&&Nd.slowPoll()})},ag.prototype.fastPoll=function(){var Nd=!1,Fd=this;Fd.pollingFast=!0;function Kd(){var Yd=Fd.poll();!Yd&&!Nd?(Nd=!0,Fd.polling.set(60,Kd)):(Fd.pollingFast=!1,Fd.slowPoll())}Fd.polling.set(20,Kd)},ag.prototype.poll=function(){var Nd=this,Fd=this.cm,Kd=this.textarea,Yd=this.prevInput;if(this.contextMenuPending||this.resetting||!Fd.state.focused||ch(Kd)&&!Yd&&!this.composing||Fd.isReadOnly()||Fd.options.disableInput||Fd.state.keySeq)return!1;var df=Kd.value;if(df==Yd&&!Fd.somethingSelected())return!1;if(cd&&dd>=9&&this.hasSelection===df||Ud&&/[ \u f700- \u f7ff]/.test(df))return Fd.display.input.reset(),!1;if(Fd.doc.sel==Fd.display.selForContextMenu){var Sf=df.charCodeAt(0);if(Sf==8203&&!Yd&&(Yd=" "),Sf==8666)return this.reset(),this.cm.execCommand("undo")}for(var kf=0,Ff=Math.min(Yd.length,df.length);kf<Ff&&Yd.charCodeAt(kf)==df.charCodeAt(kf);)++kf;return Ig(Fd,function(){SE(Fd,df.slice(kf),Yd.length-kf,null,Nd.composing?"*compose":null),df.length>1e3||df.indexOf( `
` )>-1?Kd.value=Nd.prevInput="":Nd.prevInput=df,Nd.composing&&(Nd.composing.range.clear(),Nd.composing.range=Fd.markText(Nd.composing.start,Fd.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ag.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ag.prototype.onKeyPress=function(){cd&&dd>=9&&(this.hasSelection=null),this.fastPoll()},ag.prototype.onContextMenu=function(Nd){var Fd=this,Kd=Fd.cm,Yd=Kd.display,df=Fd.textarea;Fd.contextMenuPending&&Fd.contextMenuPending();var Sf=P0(Kd,Nd),kf=Yd.scroller.scrollTop;if(!Sf||Sd)return;var Ff=Kd.options.resetSelectionOnContextMenu;Ff&&Kd.doc.sel.contains(Sf)==-1&& $ _(Kd,wg)(Kd.doc,hb(Sf),qf);var Kf=df.style.cssText,th=Fd.wrapper.style.cssText,bh=Fd.wrapper.offsetParent.getBoundingClientRect();Fd.wrapper.style.cssText="position: static",df.style.cssText= ` position : absolute ; width : 30 px ; height : 30 px ;
2024-09-25 14:23:53 +08:00
top : ` +(Nd.clientY-bh.top-5)+"px; left: "+(Nd.clientX-bh.left-5)+ ` px ;
z - index : 1000 ; background : ` +(cd?"rgba(255, 255, 255, .05)":"transparent")+ ` ;
2024-09-28 21:10:55 +08:00
outline : none ; border - width : 0 ; outline : none ; overflow : hidden ; opacity : . 05 ; filter : alpha ( opacity = 5 ) ; ` ;var Ah;pd&&(Ah=df.ownerDocument.defaultView.scrollY),Yd.input.focus(),pd&&df.ownerDocument.defaultView.scrollTo(null,Ah),Yd.input.reset(),Kd.somethingSelected()||(df.value=Fd.prevInput=" "),Fd.contextMenuPending=jh,Yd.selForContextMenu=Kd.doc.sel,clearTimeout(Yd.detectingSelectAll);function Hh(){if(df.selectionStart!=null){var mm=Kd.somethingSelected(),Im=" "+(mm?df.value:"");df.value="⇚",df.value=Im,Fd.prevInput=mm?"":" ",df.selectionStart=1,df.selectionEnd=Im.length,Yd.selForContextMenu=Kd.doc.sel}}function jh(){if(Fd.contextMenuPending==jh&&(Fd.contextMenuPending=!1,Fd.wrapper.style.cssText=th,df.style.cssText=Kf,cd&&dd<9&&Yd.scrollbars.setScrollTop(Yd.scroller.scrollTop=kf),df.selectionStart!=null)){(!cd||cd&&dd<9)&&Hh();var mm=0,Im=function(){Yd.selForContextMenu==Kd.doc.sel&&df.selectionStart==0&&df.selectionEnd>0&&Fd.prevInput==" "? $ _(Kd,Tv)(Kd):mm++<10?Yd.detectingSelectAll=setTimeout(Im,500):(Yd.selForContextMenu=null,Yd.input.reset())};Yd.detectingSelectAll=setTimeout(Im,200)}}if(cd&&dd>=9&&Hh(),Qd){Q_(Nd);var cm=function(){Rm(window,"mouseup",cm),setTimeout(jh,20)};lm(window,"mouseup",cm)}else setTimeout(jh,50)},ag.prototype.readOnlyChanged=function(Nd){Nd||this.reset(),this.textarea.disabled=Nd=="nocursor",this.textarea.readOnly=!!Nd},ag.prototype.setUneditable=function(){},ag.prototype.needsContentAttribute=!1;function yT(Nd,Fd){if(Fd=Fd?gf(Fd):{},Fd.value=Nd.value,!Fd.tabindex&&Nd.tabIndex&&(Fd.tabindex=Nd.tabIndex),!Fd.placeholder&&Nd.placeholder&&(Fd.placeholder=Nd.placeholder),Fd.autofocus==null){var Kd=Yf(Jf(Nd));Fd.autofocus=Kd==Nd||Nd.getAttribute("autofocus")!=null&&Kd==document.body}function Yd(){Nd.value=Ff.getValue()}var df;if(Nd.form&&(lm(Nd.form,"submit",Yd),!Fd.leaveSubmitMethodAlone)){var Sf=Nd.form;df=Sf.submit;try{var kf=Sf.submit=function(){Yd(),Sf.submit=df,Sf.submit(),Sf.submit=kf}}catch{}}Fd.finishInit=function(Kf){Kf.save=Yd,Kf.getTextArea=function(){return Nd},Kf.toTextArea=function(){Kf.toTextArea=isNaN,Yd(),Nd.parentNode.removeChild(Kf.getWrapperElement()),Nd.style.display="",Nd.form&&(Rm(Nd.form,"submit",Yd),!Fd.leaveSubmitMethodAlone&&typeof Nd.form.submit=="function"&&(Nd.form.submit=df))}},Nd.style.display="none";var Ff=D_(function(Kf){return Nd.parentNode.insertBefore(Kf,Nd.nextSibling)},Fd);return Ff}function a2(Nd){Nd.off=Rm,Nd.on=lm,Nd.wheelEventPixels=GT,Nd.Doc=Bg,Nd.splitLines=Cf,Nd.countColumn=Mf,Nd.findColumn=wf,Nd.isWordChar=Vh,Nd.Pass=Rf,Nd.signal=Pm,Nd.Line=g0,Nd.changeEnd=mb,Nd.scrollbarModel=Ub,Nd.Pos=_m,Nd.cmpPos=s_,Nd.modes=vh,Nd.mimeModes=kh,Nd.resolveMode=im,Nd.getMode=fm,Nd.modeExtensions=Gm,Nd.extendMode=Nm,Nd.copyState=Ym,Nd.startState=w_,Nd.innerMode=S_,Nd.commands=o1,Nd.keyMap=F0,Nd.keyName=n1,Nd.isModifierKey=z1,Nd.lookupKey=Qg,Nd.normalizeKeyMap=Xg,Nd.StringStream=p_,Nd.SharedTextMarker=Av,Nd.TextMarker=N0,Nd.LineWidget=Yb,Nd.e_preventDefault=Zm,Nd.e_stopPropagation=L_,Nd.e_stop=Q_,Nd.addClass=Zf,Nd.contains=Bf,Nd.rmClass=hf,Nd.keyNames=Tg}TE(D_),kv(D_);var ET="iter insert remove copy getEditor constructor".split(" ");for(var ny in Bg.prototype)Bg.prototype.hasOwnProperty(ny)&&ah(ET,ny)<0&&(D_.prototype[ny]=function(Nd){return function(){return Nd.apply(this.doc,arguments)}}(Bg.prototype[ny]));return A_(Bg),D_.inputStyles={textarea:ag,contenteditable:M_},D_.defineMode=function(Nd){!D_.defaults.mode&&Nd!="null"&&(D_.defaults.mode=Nd),Rh.apply(this,arguments)},D_.defineMIME=mh,D_.defineMode("null",function(){return{token:function(Nd){return Nd.skipToEnd()}}}),D_.defineMIME("text/plain","null"),D_.defineExtension=function(Nd,Fd){D_.prototype[Nd]=Fd},D_.defineDocExtension=function(Nd,Fd){Bg.prototype[Nd]=Fd},D_.fromTextArea=yT,a2(D_),D_.version="5.65.17",D_})}(codemirror)),codemirror.exports}var codemirrorExports=requireCodemirror();const CodeMirror=getDefaultExportFromCjs(codemirrorExports),useStore=defineStore("store",()=>{const Ra=useDark(),qa=useToggle(Ra),td=useStorage("isMacCodeBlock",!0),rd=useToggle(td),nd=useStorage("isEditOnLeft",!
2024-09-18 09:46:23 +08:00
< style >
. hljs . code _ _pre > . mac - sign {
display : inline - block ;
}
. hljs . code _ _pre {
padding : 0 ! important ;
}
. hljs . code _ _pre code {
display : - webkit - box ;
padding : 0.5 em 1 em 1 em ;
overflow - x : auto ;
text - indent : 0 ;
}
< / s t y l e >
2024-09-28 20:51:35 +08:00
` ),pd.value=qf},xf=()=>{const qf=css2json(Hd.value.getValue()),lh=customCssWithTemplate(qf,Sd.value,customizeTheme(themeMap[fd.value],{fontSize:Rd.value,color:Sd.value}));_f.setOptions({theme:lh}),bf()};onMounted(()=>{const qf=document.querySelector("#cssEditor");qf.value=Qd().content;const lh=Ra.value?"darcula":"xq-light";Hd.value=markRaw(CodeMirror.fromTextArea(qf,{mode:"css",theme:lh,lineNumbers:!1,lineWrapping:!0,styleActiveLine:!0,matchBrackets:!0,autofocus:!0,extraKeys:{[ ` $ { shiftKey } - $ { altKey } - F ` ]:function(wf){formatDoc(wf.getValue(),"css").then(Of=>{Qd().content=Of,wf.setValue(Of)})}}})),Hd.value.on("keyup",(Uf,wf)=>{(wf.keyCode>=65&&wf.keyCode<=90||wf.keyCode===189)&&Uf.showHint(wf)}),Hd.value.on("update",()=>{xf(),Qd().content=Hd.value.getValue()})}),watch(Ra,()=>{var lh,Uf;const qf=Ra.value?"darcula":"xq-light";(Uf=(lh=toRaw(Hd.value))==null?void 0:lh.setOption)==null||Uf.call(lh,"theme",qf)});const Bf=()=>{sd.value=!1,td.value=!0,fd.value=themeOptions[0].value,Td.value=fontFamilyOptions[0].value,Td.value=fontFamilyOptions[0].value,Ad.value=fontSizeOptions[2].value,Sd.value=colorOptions[0].value,Dd.value=codeBlockThemeOptions[2].value,Ld.value=legendOptions[3].value,zd.value={active:"方案 1",tabs:[{title:"方案 1",name:"方案 1",content:Zd.value||DEFAULT_CSS_CONTENT}]},Hd.value.setValue(DEFAULT_CSS_CONTENT),xf(),bf()},Yf=qf=>(...lh)=>{qf(...lh),bf()},Zf=(qf,lh)=>{const Uf=themeMap[fd.value],wf=Number(qf.replace("px",""));return customCssWithTemplate(css2json(Qd().content),lh,customizeTheme(Uf,{fontSize:wf,color:lh}))},Vf=Yf(qf=>{_f.setOptions({theme:customCssWithTemplate(css2json(Qd().content),Sd.value,customizeTheme(themeMap[qf],{fontSize:Rd.value}))}),fd.value=qf}),Pf=Yf(qf=>{_f.setOptions({fonts:qf}),Td.value=qf}),Df=Yf(qf=>{const lh=Zf(qf,Sd.value);_f.setOptions({size:qf,theme:lh}),Ad.value=qf}), $ f=Yf(qf=>{const lh=Zf(Ad.value,qf);_f.setOptions({theme:lh}),Sd.value=qf}),Jf=Yf(qf=>{Dd.value=qf}),Xf=Yf(qf=>{Ld.value=qf}),Ef=Yf(()=>{rd()}),gf=Yf(()=>{ud()}),Mf=Yf(()=>{dd()});return{isDark:Ra,toggleDark:qa,isEditOnLeft:nd,toggleEditOnLeft:ad,isMacCodeBlock:td,isCiteStatus:sd,citeStatusChanged:gf,isUseIndent:cd,useIndentChanged:Mf,output:pd,editor:Od,cssEditor:Hd,theme:fd,fontFamily:Td,fontSize:Ad,primaryColor:Sd,codeBlockTheme:Dd,legend:Ld,editorRefresh:bf,themeChanged:Vf,fontChanged:Pf,sizeChanged:Df,colorChanged: $ f,codeBlockThemeChanged:Jf,legendChanged:Xf,macCodeBlockChanged:Ef,formatContent:jd,exportEditorContent2HTML:()=>{exportHTML(),document.querySelector("#output").innerHTML=pd.value},exportEditorContent2MD:()=>{downloadMD(Od.value.getValue())},importMarkdownContent:()=>{const qf=document.body,lh=document.createElement("input");lh.type="file",lh.name="filename",lh.accept=".md",lh.onchange=()=>{const Uf=lh.files[0];if(!Uf)return;const wf=new FileReader;wf.readAsText(Uf),wf.onload=Of=>{Od.value.setValue(Of.target.result),ElMessage.success("文档导入成功")}},qf.appendChild(lh),lh.click(),qf.removeChild(lh)},resetStyleConfirm:()=>{ElMessageBox.confirm("此操作将丢失本地自定义样式,是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",center:!0}).then(()=>{Bf(),ElMessage({type:"success",message:"样式重置成功~"})}).catch(()=>{Od.value.focus()})},editorContent:Md,cssContentConfig:zd,addCssContentTab:vf,validatorTabName:Tf,setCssEditorValue:Wd,tabChanged:Jd,renameTab:hf}}),useDisplayStore=defineStore("display",()=>{const Ra=ref $ 1(!1),qa=useToggle(Ra),td=ref $ 1(!1),rd=useToggle(td),nd=ref $ 1(!1),ad=useToggle(nd);return{isShowCssEditor:Ra,toggleShowCssEditor:qa,isShowInsertFormDialog:td,toggleShowInsertFormDialog:rd,isShowUploadImgDialog:nd,toggleShowUploadImgDialog:ad}}),_sfc_main $ N=defineComponent({__name:"CssEditor",setup(Ra){const qa=useStore(),td=useDisplayStore();function rd(){ElMessageBox.prompt("请输入新的方案名称","编辑方案名称",{confirmButtonText:"确认",cancelButtonText:"取消",inputValue:qa.cssContentConfig.active,inputErrorMessage:"不能与现有方案重名",inputValidator:qa.validatorTabName}).then(({value:a
2024-09-18 09:46:23 +08:00
` )].join( `
2024-09-28 20:51:35 +08:00
` ))}return()=>ad.value||nd.value||ud.value?h $ 1(qa.default({present:ud})[0],{ref:pd=>{const fd= $ e(pd);return typeof(fd==null?void 0:fd.hasAttribute)>"u"||(fd!=null&&fd.hasAttribute("data-radix-popper-content-wrapper")?sd.value=fd.firstElementChild:sd.value=fd),fd}}):null}}),[et,qi]=Q("DialogRoot"),Yi=defineComponent({__name:"DialogRoot",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(Ra,{emit:qa}){const td=Ra,rd=ne(td,"open",qa,{defaultValue:td.defaultOpen,passive:td.open===void 0}),nd=ref $ 1(),ad=ref $ 1(),{modal:sd}=toRefs(td);return qi({open:rd,modal:sd,openModal:()=>{rd.value=!0},onOpenChange:ud=>{rd.value=ud},onOpenToggle:()=>{rd.value=!rd.value},contentId:"",titleId:"",descriptionId:"",triggerElement:nd,contentElement:ad}),(ud,cd)=>renderSlot(ud. $ slots,"default",{open:unref(rd)})}}),ht=defineComponent({__name:"Teleport",props:{to:{default:"body"},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(Ra){const qa=ja();return(td,rd)=>unref(qa)||td.forceMount?(openBlock(),createBlock(Teleport $ 1,{key:0,to:td.to,disabled:td.disabled},[renderSlot(td. $ slots,"default")],8,["to","disabled"])):createCommentVNode("",!0)}}),_v=defineComponent({__name:"DialogPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(Ra){const qa=Ra;return(td,rd)=>(openBlock(),createBlock(unref(ht),normalizeProps(guardReactiveProps(qa)),{default:withCtx(()=>[renderSlot(td. $ slots,"default")]),_:3},16))}}),Zi="dismissableLayer.pointerDownOutside",Ji="dismissableLayer.focusOutside";function Ll(Ra,qa){const td=qa.closest("[data-dismissable-layer]"),rd=Ra.dataset.dismissableLayer===""?Ra:Ra.querySelector("[data-dismissable-layer]"),nd=Array.from(Ra.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(td&&rd===td||nd.indexOf(rd)<nd.indexOf(td))}function zl(Ra,qa){var td;const rd=((td=qa==null?void 0:qa.value)==null?void 0:td.ownerDocument)??(globalThis==null?void 0:globalThis.document),nd=ref $ 1(!1),ad=ref $ 1(()=>{});return watchEffect(sd=>{if(!qe)return;const ud=async dd=>{const pd=dd.target;if(qa!=null&&qa.value){if(Ll(qa.value,pd)){nd.value=!1;return}if(dd.target&&!nd.value){let fd=function(){Kt(Zi,Ra,Td)};const Td={originalEvent:dd};dd.pointerType==="touch"?(rd.removeEventListener("click",ad.value),ad.value=fd,rd.addEventListener("click",ad.value,{once:!0})):fd()}else rd.removeEventListener("click",ad.value);nd.value=!1}},cd=window.setTimeout(()=>{rd.addEventListener("pointerdown",ud)},0);sd(()=>{window.clearTimeout(cd),rd.removeEventListener("pointerdown",ud),rd.removeEventListener("click",ad.value)})}),{onPointerDownCapture:()=>nd.value=!0}}function Kl(Ra,qa){var td;const rd=((td=qa==null?void 0:qa.value)==null?void 0:td.ownerDocument)??(globalThis==null?void 0:globalThis.document),nd=ref $ 1(!1);return watchEffect(ad=>{if(!qe)return;const sd=async ud=>{qa!=null&&qa.value&&(await nextTick $ 1(),!(!qa.value||Ll(qa.value,ud.target))&&ud.target&&!nd.value&&Kt(Ji,Ra,{originalEvent:ud}))};rd.addEventListener("focusin",sd),ad(()=>rd.removeEventListener("focusin",sd))}),{onFocusCapture:()=>nd.value=!0,onBlurCapture:()=>nd.value=!1}}const je=reactive({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),yt=defineComponent({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(Ra,{emit:qa}){const td=Ra,rd=qa,{forwardRef:nd,currentElement:ad}=R $ 1(),sd=computed(()=>{var Sd;return((Sd=ad.value)==null?void 0:Sd.ownerDocument)??globalThis.document}),ud=computed(()=>je.layersRoot),cd=computed(()=>ad.value?Array.from(ud.value).indexOf(ad.value):-1),dd=computed(()=>je.layersWithOutsidePointerEventsDisabled.size>0),pd=computed(()=>{const Sd=Array.from(ud.value),[Dd]=[...je.layersWithOutsidePointerEventsDisabled].slice(-1),Ld=Sd.indexOf(Dd);return cd.value>=Ld}),fd=zl(async Sd=>{const Dd=[...je.branches].some(Ld=>Ld==null?void 0:Ld.contains(Sd.target));!pd.va
2024-09-25 14:23:53 +08:00
* @ license lucide - vue - next v0 . 445.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const toKebabCase=Ra=>Ra.replace(/ ( [ a - z0 - 9 ] ) ( [ A - Z ] ) / g , "$1-$2" ) . toLowerCase ( ) ; / * *
2024-09-25 14:23:53 +08:00
* @ license lucide - vue - next v0 . 445.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /var defaultAttributes={xmlns:"http:/ / www . w3 . org / 2000 / svg ",width:24,height:24,viewBox:" 0 0 24 24 ",fill:" none ",stroke:" currentColor "," stroke - width ":2," stroke - linecap ":" round "," stroke - linejoin ":" round " } ; / * *
2024-09-25 14:23:53 +08:00
* @ license lucide - vue - next v0 . 445.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
2024-09-25 14:23:53 +08:00
* / c o n s t I c o n = ( { s i z e : R a , s t r o k e W i d t h : q a = 2 , a b s o l u t e S t r o k e W i d t h : t d , c o l o r : r d , i c o n N o d e : n d , n a m e : a d , c l a s s : s d , . . . u d } , { s l o t s : c d } ) = > h $ 1 ( " s v g " , { . . . d e f a u l t A t t r i b u t e s , w i d t h : R a | | d e f a u l t A t t r i b u t e s . w i d t h , h e i g h t : R a | | d e f a u l t A t t r i b u t e s . h e i g h t , s t r o k e : r d | | d e f a u l t A t t r i b u t e s . s t r o k e , " s t r o k e - w i d t h " : t d ? N u m b e r ( q a ) * 2 4 / N u m b e r ( R a ) : q a , c l a s s : [ " l u c i d e " , ` l u c i d e - $ { t o K e b a b C a s e ( a d ? ? " i c o n " ) } ` ] , . . . u d } , [ . . . n d . m a p ( d d = > h $ 1 ( . . . d d ) ) , . . . c d . d e f a u l t ? [ c d . d e f a u l t ( ) ] : [ ] ] ) ; / * *
* @ license lucide - vue - next v0 . 445.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
2024-09-25 14:23:53 +08:00
* /const createLucideIcon=(Ra,qa)=>(td,{slots:rd})=>h$1(Icon,{...td,iconNode:qa,name:Ra},rd);/ * *
* @ license lucide - vue - next v0 . 445.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const Check=createLucideIcon("CheckIcon",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/ * *
2024-09-25 14:23:53 +08:00
* @ license lucide - vue - next v0 . 445.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const ChevronDown=createLucideIcon("ChevronDownIcon",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/ * *
2024-09-25 14:23:53 +08:00
* @ license lucide - vue - next v0 . 445.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const ChevronRight=createLucideIcon("ChevronRightIcon",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/ * *
2024-09-25 14:23:53 +08:00
* @ license lucide - vue - next v0 . 445.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const ChevronUp=createLucideIcon("ChevronUpIcon",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/ * *
2024-09-25 14:23:53 +08:00
* @ license lucide - vue - next v0 . 445.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const CloudUpload=createLucideIcon("CloudUploadIcon",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);/ * *
2024-09-25 14:23:53 +08:00
* @ license lucide - vue - next v0 . 445.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const Moon=createLucideIcon("MoonIcon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/ * *
2024-09-25 14:23:53 +08:00
* @ license lucide - vue - next v0 . 445.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const Paintbrush=createLucideIcon("PaintbrushIcon",[["path",{d:"m14.622 17.897-10.68-2.913",key:"vj2p1u"}],["path",{d:"M18.376 2.622a1 1 0 1 1 3.002 3.002L17.36 9.643a.5.5 0 0 0 0 .707l.944.944a2.41 2.41 0 0 1 0 3.408l-.944.944a.5.5 0 0 1-.707 0L8.354 7.348a.5.5 0 0 1 0-.707l.944-.944a2.41 2.41 0 0 1 3.408 0l.944.944a.5.5 0 0 0 .707 0z",key:"18tc5c"}],["path",{d:"M9 8c-1.804 2.71-3.97 3.46-6.583 3.948a.507.507 0 0 0-.302.819l7.32 8.883a1 1 0 0 0 1.185.204C12.735 20.405 16 16.792 16 15",key:"ytzfxy"}]]);/ * *
2024-09-25 14:23:53 +08:00
* @ license lucide - vue - next v0 . 445.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const Sun=createLucideIcon("SunIcon",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/ * *
2024-09-25 14:23:53 +08:00
* @ license lucide - vue - next v0 . 445.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const Table=createLucideIcon("TableIcon",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]);/ * *
2024-09-25 14:23:53 +08:00
* @ license lucide - vue - next v0 . 445.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
2024-09-28 20:51:35 +08:00
* / c o n s t X = c r e a t e L u c i d e I c o n ( " X I c o n " , [ [ " p a t h " , { d : " M 1 8 6 6 1 8 " , k e y : " 1 b l 5 f 8 " } ] , [ " p a t h " , { d : " m 6 6 1 2 1 2 " , k e y : " d 8 b k 6 v " } ] ] ) , _ s f c _ m a i n $ K = d e f i n e C o m p o n e n t ( { _ _ n a m e : " M e n u b a r C o n t e n t " , p r o p s : { f o r c e M o u n t : { t y p e : B o o l e a n } , l o o p : { t y p e : B o o l e a n } , s i d e : { } , s i d e O f f s e t : { d e f a u l t : 8 } , a l i g n : { d e f a u l t : " s t a r t " } , a l i g n O f f s e t : { d e f a u l t : - 4 } , a v o i d C o l l i s i o n s : { t y p e : B o o l e a n } , c o l l i s i o n B o u n d a r y : { } , c o l l i s i o n P a d d i n g : { } , a r r o w P a d d i n g : { } , s t i c k y : { } , h i d e W h e n D e t a c h e d : { t y p e : B o o l e a n } , u p d a t e P o s i t i o n S t r a t e g y : { } , p r i o r i t i z e P o s i t i o n : { t y p e : B o o l e a n } , a s C h i l d : { t y p e : B o o l e a n } , a s : { } , c l a s s : { } } , s e t u p ( R a ) { c o n s t q a = R a , t d = c o m p u t e d ( ( ) = > { c o n s t { c l a s s : n d , . . . a d } = q a ; r e t u r n a d } ) , r d = I t ( t d ) ; r e t u r n ( n d , a d ) = > ( o p e n B l o c k ( ) , c r e a t e B l o c k ( u n r e f ( z h ) , n u l l , { d e f a u l t : w i t h C t x ( ( ) = > [ c r e a t e V N o d e ( u n r e f ( K h ) , m e r g e P r o p s ( u n r e f ( r d ) , { c l a s s : u n r e f ( c n ) ( " z - 5 0 m i n - w - 4 8 o v e r f l o w - h i d d e n r o u n d e d - m d b o r d e r b g - p o p o v e r p - 1 t e x t - p o p o v e r - f o r e g r o u n d s h a d o w - m d d a t a - [ s t a t e = o p e n ] : a n i m a t e - i n d a t a - [ s t a t e = c l o s e d ] : f a d e - o u t - 0 d a t a - [ s t a t e = o p e n ] : f a d e - i n - 0 d a t a - [ s t a t e = c l o s e d ] : z o o m - o u t - 9 5 d a t a - [ s t a t e = o p e n ] : z o o m - i n - 9 5 d a t a - [ s i d e = b o t t o m ] : s l i d e - i n - f r o m - t o p - 2 d a t a - [ s i d e = l e f t ] : s l i d e - i n - f r o m - r i g h t - 2 d a t a - [ s i d e = r i g h t ] : s l i d e - i n - f r o m - l e f t - 2 d a t a - [ s i d e = t o p ] : s l i d e - i n - f r o m - b o t t o m - 2 " , q a . c l a s s ) } ) , { d e f a u l t : w i t h C t x ( ( ) = > [ r e n d e r S l o t ( n d . $ s l o t s , " d e f a u l t " ) ] ) , _ : 3 } , 1 6 , [ " c l a s s " ] ) ] ) , _ : 3 } ) ) } } ) , _ s f c _ m a i n $ J = d e f i n e C o m p o n e n t ( { _ _ n a m e : " M e n u b a r I t e m " , p r o p s : { d i s a b l e d : { t y p e : B o o l e a n } , t e x t V a l u e : { } , a s C h i l d : { t y p e : B o o l e a n } , a s : { } , c l a s s : { } , i n s e t : { t y p e : B o o l e a n } } , e m i t s : [ " s e l e c t " ] , s e t u p ( R a , { e m i t : q a } ) { c o n s t t d = R a , r d = q a , n d = c o m p u t e d ( ( ) = > { c o n s t { c l a s s : s d , . . . u d } = t d ; r e t u r n u d } ) , a d = x e ( n d , r d ) ; r e t u r n ( s d , u d ) = > ( o p e n B l o c k ( ) , c r e a t e B l o c k ( u n r e f ( W h ) , m e r g e P r o p s ( u n r e f ( a d ) , { c l a s s : u n r e f ( c n ) ( " r e l a t i v e f l e x c u r s o r - d e f a u l t s e l e c t - n o n e i t e m s - c e n t e r r o u n d e d - s m p x - 2 p y - 1 . 5 t e x t - s m o u t l i n e - n o n e f o c u s : b g - a c c e n t f o c u s : t e x t - a c c e n t - f o r e g r o u n d d a t a - [ d i s a b l e d ] : p o i n t e r - e v e n t s - n o n e d a t a - [ d i s a b l e d ] : o p a c i t y - 5 0 " , s d . i n s e t & & " p l - 8 " , t d . c l a s s ) } ) , { d e f a u l t : w i t h C t x ( ( ) = > [ r e n d e r S l o t ( s d . $ s l o t s , " d e f a u l t " ) ] ) , _ : 3 } , 1 6 , [ " c l a s s " ] ) ) } } ) , _ s f c _ m a i n $ I = d e f i n e C o m p o n e n t ( { _ _ n a m e : " M e n u b a r M e n u " , p r o p s : { v a l u e : { } } , s e t u p ( R a ) { c o n s t q a = R a ; r e t u r n ( t d , r d ) = > ( o p e n B l o c k ( ) , c r e a t e B l o c k ( u n r e f ( N h ) , n o r m a l i z e P r o p s ( g u a r d R e a c t i v e P r o p s ( q a ) ) , { d e f a u l t : w i t h C t x ( ( ) = > [ r e n d e r S l o t ( t d . $ s l o t s , " d e f a u l t " ) ] ) , _ : 3 } , 1 6 ) ) } } ) , _ s f c _ m a i n $ H = d e f i n e C o m p o n e n t ( { _ _ n a m e : " M e n u b a r S e p a r a t o r " , p r o p s : { a s C h i l d : { t y p e : B o o l e a n } , a s : { } , c l a s s : { } } , s e t u p ( R a ) { c o n s t q a = R a , t d = c o m p u t e d ( ( ) = > { c o n s t { c l a s s : n d , . . . a d } = q a ; r e t u r n a d } ) , r d = I t ( t d ) ; r e t u r n ( n d , a d ) = > ( o p e n B l o c k ( ) , c r e a t e B l o c k ( u n r e f ( U h ) , m e r g e P r o p s ( { c l a s s : u n r e f ( c n ) ( " - m x - 1 m y - 1 h - p x b g - m u t e d " , q a . c l a s s ) } , u n r e f ( r d ) ) , n u l l , 1 6 , [ " c l a s s " ] ) ) } } ) , _ s f c _ m a i n $ G = d e f i n e C o m p o n e n t ( { _ _ n a m e : " M e n u b a r S h o r t c u t " , p r o p s : { c l a s s : { } } , s e t u p ( R a ) { c o n s t q a = R a ; r e t u r n ( t d , r d ) = > ( o p e n B l o c k ( ) , c r e a t e E l e m e n t B l o c k ( " s p a n " , { c l a s s : n o r m a l i z e C l a s s ( u n r e f ( c n ) ( " m l - a u t o t e x t - x s t r a c k i n g - w i d e s t t e x t - m u t e d - f o r e g r o u n d " , q a . c l a s s ) ) } , [ r e n d e r S l o t ( t d . $ s l o t s , " d e f a u l t " ) ] , 2 ) ) } } ) , _ s f c _ m a i n $ F = d e f i n e C o m p o n e n t ( { _ _ n a m e : " M e n u b a r S u b " , p r o p s : { d e f a u l t O p e n : { t y p e : B o o l e a n } , o p e n : { t y p e : B o o l e a n } } , e m i t s : [ " u p d a t e : o p e n " ] , s e t u p ( R a , { e m i t : q a } ) { c o n s t n d = x e ( R a , q a ) ; r e t u r n ( a d , s d ) = > ( o p e n B l o c k ( ) , c r e a t e B l o c k ( u n r e f ( J h ) , n o r m a l i z e P r o p s ( g u a r d R e a c t i v e P r o p s ( u n r e f ( n d ) ) ) , { d e f a u l t : w i t h C t x ( ( ) = > [ r e n d e r S l o t ( a d . $ s l o t s , " d e f a u l t " ) ] ) , _ : 3 } , 1 6 ) ) } } ) , _ s f c _ m a i n $ E = d e f i n e C o m p o n e n t ( { _ _ n a m e : " M e n u b a r S u b C o n t e n t " , p r o p s : { f o r c e M o u n t : { t y p e : B o o l e a n } , l o o p : { t y p e : B o o l e a n } , s i d e O f f s e t : { } , a l i g n O f f s e t : { } , a v o i d C o l l i s i o n s : { t y p e : B o o l e a n } , c o l l i s i o n B o u n d a r y : { } , c o l l i s i o n P a d d i n g : { } , a r r o w P a d d i n g : { } , s t i c k y : { } , h i d e W h e n D e t a c h e d : { t y p e : B o o l e a n } , u p d a t e P o s i t i o n S t r a t e g y : { } , p r i o r i t i z e P o s i t i o n : { t y p e : B o o l e a n } , a s C h i l d : { t y p e : B o o l e a n } , a s : { } , c l a s s : { } } , e m i t s : [ " e s c a p e K e y D o w n " , " p o i n t e r D o w n O u t s i d e " , " f o c u s O u t s i d e " , " i n t e r a c t O u t s i d e " , " e n t r y F o c u s " , " o p e n A u t o F o c u s " , " c l o s e A u t o F o c u s " ] , s e t u p ( R a , { e m i t : q a } ) { c o n s t t d = R a , r d = q a , n d = c o m p u t e d ( ( ) = > { c o n s t { c l a s s : s d , . . . u d } = t d ; r e t u r n u d } ) , a d = x e ( n d , r d ) ; r e t u r n ( s d , u d ) = > ( o p e n B l o c k ( ) , c r e a t e B l o c k ( u n r e f ( z h ) , n u l l , { d e f a u l t : w i t h C t x ( ( ) = > [ c r e a t e V N o d e ( u n r e f ( Q h ) , m e r g e P r o p s ( u n r e f ( a d ) , { c l a s s : u n r e f ( c n ) ( " z - 5 0 m i n - w - 3 2 o v e r f l o w - h i d d e n r o u n d e d - m d b o r d e r b g - p o p o v e r p - 1 t e x t - p o p o v e r - f o r e g r o u n d d a t a - [ s t a t e = o p e n ] : a n i m a t e - i n d a t a - [ s t a t e = c l o s e d ] : a n i m a t e - o u t d a t a - [ s t a t e = c l o s e d ] : f a d e - o u t - 0 d a t a - [ s t a t e = o p e n ] : f a d e - i n - 0 d a t a - [ s t a t e = c l
2024-09-25 14:23:53 +08:00
$ { pd }
` ,"end"),ud(),rd()}function dd(pd){pd||rd(!1)}return(pd,fd)=>{const Td=ElInputNumber,Ad=ElCol,Sd=ElRow,Dd=ElInput,Ld=_sfc_main $ M;return openBlock(),createBlock(unref(_sfc_main $ p),{open:unref(td).isShowInsertFormDialog,"onUpdate:open":dd},{default:withCtx(()=>[createVNode(unref(_sfc_main $ o),null,{default:withCtx(()=>[createVNode(unref(_sfc_main $ m),null,{default:withCtx(()=>[createVNode(unref(_sfc_main $ l),null,{default:withCtx(()=>fd[3]||(fd[3]=[createTextVNode("插入表格")])),_:1})]),_:1}),createVNode(Sd,{class:"tb-options",type:"flex",align:"middle",gutter:10},{default:withCtx(()=>[createVNode(Ad,{span:12},{default:withCtx(()=>[fd[4]||(fd[4]=createTextVNode(" 行数: ")),createVNode(Td,{modelValue:nd.value,"onUpdate:modelValue":fd[0]||(fd[0]=Rd=>nd.value=Rd),"controls-position":"right",min:1,max:100,size:"small"},null,8,["modelValue"])]),_:1}),createVNode(Ad,{span:12},{default:withCtx(()=>[fd[5]||(fd[5]=createTextVNode(" 列数: ")),createVNode(Td,{modelValue:ad.value,"onUpdate:modelValue":fd[1]||(fd[1]=Rd=>ad.value=Rd),"controls-position":"right",min:1,max:100,size:"small"},null,8,["modelValue"])]),_:1})]),_:1}),createBaseVNode("table",_hoisted_1 $ 2,[(openBlock(!0),createElementBlock(Fragment,null,renderList(nd.value+1,Rd=>(openBlock(),createElementBlock("tr",{key:Rd,class:normalizeClass({"head-style":Rd===1})},[(openBlock(!0),createElementBlock(Fragment,null,renderList(ad.value,Od=>(openBlock(),createElementBlock("td",{key:Od},[createVNode(Dd,{modelValue:sd.value[ ` k _$ { Rd - 1 } _$ { Od - 1 } ` ],"onUpdate:modelValue":Md=>sd.value[ ` k _$ { Rd - 1 } _$ { Od - 1 } ` ]=Md,align:"center",placeholder:Rd===1?"表头":""},null,8,["modelValue","onUpdate:modelValue","placeholder"])]))),128))],2))),128))]),createVNode(unref(_sfc_main $ n),null,{default:withCtx(()=>[createVNode(Ld,{variant:"outline",onClick:fd[2]||(fd[2]=Rd=>unref(rd)(!1))},{default:withCtx(()=>fd[6]||(fd[6]=[createTextVNode(" 取 消 ")])),_:1}),createVNode(Ld,{onClick:cd},{default:withCtx(()=>fd[7]||(fd[7]=[createTextVNode(" 确 定 ")])),_:1})]),_:1})]),_:1})]),_:1},8,["open"])}}}),InsertFormDialog=_export_sfc(_sfc_main $ a,[["__scopeId","data-v-054300b0"]]),_sfc_main $ 9=defineComponent({__name:"UploadImgDialog",emits:["uploadImage"],setup(Ra,{emit:qa}){const td=qa,rd=useDisplayStore(),nd=ref $ 1({repo:"",branch:"",accessToken:""}),ad=ref $ 1({accessKeyId:"",accessKeySecret:"",bucket:"",region:"",path:"",cdnHost:"",useSSL:!0}),sd=ref $ 1({secretId:"",secretKey:"",bucket:"",region:"",path:"",cdnHost:""}),ud=ref $ 1({accessKey:"",secretKey:"",bucket:"",domain:"",region:"",path:""}),cd=ref $ 1({endpoint:"",port:"",useSSL:!0,bucket:"",accessKey:"",secretKey:""}),dd=ref $ 1({code:localStorage.getItem("formCustomConfig")||removeLeft( `
2024-09-18 09:46:23 +08:00
const { file , util , okCb , errCb } = CUSTOM _ARG
const param = new FormData ( )
param . append ( 'file' , file )
util . axios . post ( '${window.location.origin}/upload' , param , {
headers : { 'Content-Type' : 'multipart/form-data' }
} ) . then ( res => {
okCb ( res . url )
} ) . catch ( err => {
errCb ( err )
} )
2024-09-28 20:51:35 +08:00
` ).trim(),editor:null}),pd=[{value:"default",label:"默认"},{value:"github",label:"GitHub"},{value:"aliOSS",label:"阿里云"},{value:"txCOS",label:"腾讯云"},{value:"qiniu",label:"七牛云"},{value:"minio",label:"MinIO"},{value:"formCustom",label:"自定义代码"}],fd=ref $ 1("default"),Td=ref $ 1(null),Ad=ref $ 1("upload");watch(Ad,async Wd=>{Wd==="formCustom"&&nextTick $ 1(()=>{var zd;const Zd=Td.value. $ el.querySelector("textarea");(zd=dd.value).editor||(zd.editor=CodeMirror.fromTextArea(Zd,{mode:"javascript"}))})},{immediate:!0}),onBeforeMount(()=>{localStorage.getItem("githubConfig")&&(nd.value=JSON.parse(localStorage.getItem("githubConfig"))),localStorage.getItem("aliOSSConfig")&&(ad.value=JSON.parse(localStorage.getItem("aliOSSConfig"))),localStorage.getItem("txCOSConfig")&&(sd.value=JSON.parse(localStorage.getItem("txCOSConfig"))),localStorage.getItem("qiniuConfig")&&(ud.value=JSON.parse(localStorage.getItem("qiniuConfig"))),localStorage.getItem("minioConfig")&&(cd.value=JSON.parse(localStorage.getItem("minioConfig"))),localStorage.getItem("imgHost")&&(fd.value=localStorage.getItem("imgHost"))});function Sd(){localStorage.setItem("imgHost",fd.value),ElMessage.success("已成功切换图床")}function Dd(){if(!(nd.value.repo&&nd.value.accessToken)){const Wd=nd.value.repo?"token":"GitHub 仓库";ElMessage.error( ` 参数 「 $ { Wd } 」 不能为空 ` );return}localStorage.setItem("githubConfig",JSON.stringify(nd.value)),ElMessage.success("保存成功")}function Ld(){if(!(ad.value.accessKeyId&&ad.value.accessKeySecret&&ad.value.bucket&&ad.value.region)){ElMessage.error("阿里云 OSS 参数配置不全");return}localStorage.setItem("aliOSSConfig",JSON.stringify(ad.value)),ElMessage.success("保存成功")}function Rd(){if(!(cd.value.endpoint&&cd.value.bucket&&cd.value.accessKey&&cd.value.secretKey)){ElMessage.error("MinIO 参数配置不全");return}localStorage.setItem("minioConfig",JSON.stringify(cd.value)),ElMessage.success("保存成功")}function Od(){if(!(sd.value.secretId&&sd.value.secretKey&&sd.value.bucket&&sd.value.region)){ElMessage.error("腾讯云 COS 参数配置不全");return}localStorage.setItem("txCOSConfig",JSON.stringify(sd.value)),ElMessage.success("保存成功")}function Md(){if(!(ud.value.accessKey&&ud.value.secretKey&&ud.value.bucket&&ud.value.domain)){ElMessage.error("七牛云 Kodo 参数配置不全");return}localStorage.setItem("qiniuConfig",JSON.stringify(ud.value)),ElMessage.success("保存成功")}function jd(){const Wd=dd.value.editor.getValue();localStorage.setItem("formCustomConfig",Wd),ElMessage.success("保存成功")}function Ud(Wd){const Zd=checkImage(Wd);if(!Zd.ok)return ElMessage.error(Zd.msg),!1;let zd=localStorage.getItem("imgHost");zd=zd||"default",localStorage.setItem("imgHost",zd);const Qd=localStorage.getItem( ` $ { zd } Config ` );return zd==="default"||Qd?!0:(ElMessage.error( ` 请先配置 $ { zd } 图床参数 ` ),!1)}function Hd(Wd){td("uploadImage",Wd.file)}return(Wd,Zd)=>{const zd=ElOption,Qd=ElSelect,Jd=ElIcon,hf=ElUpload,vf=ElTabPane,Tf=ElInput,_f=ElFormItem,bf=ElLink,xf=ElButton,Bf=ElForm,Yf=ElSwitch,Zf=ElTabs;return openBlock(),createBlock(unref(_sfc_main $ p),{open:unref(rd).isShowUploadImgDialog,"onUpdate:open":Zd[31]||(Zd[31]=Vf=>unref(rd).isShowUploadImgDialog=Vf)},{default:withCtx(()=>[createVNode(unref(_sfc_main $ o),{class:"max-w-max"},{default:withCtx(()=>[createVNode(unref(_sfc_main $ m),null,{default:withCtx(()=>[createVNode(unref(_sfc_main $ l),null,{default:withCtx(()=>Zd[32]||(Zd[32]=[createTextVNode("本地上传")])),_:1})]),_:1}),createVNode(Zf,{modelValue:Ad.value,"onUpdate:modelValue":Zd[30]||(Zd[30]=Vf=>Ad.value=Vf)},{default:withCtx(()=>[createVNode(vf,{class:"upload-panel",label:"选择上传",name:"upload"},{default:withCtx(()=>[createVNode(Qd,{modelValue:fd.value,"onUpdate:modelValue":Zd[0]||(Zd[0]=Vf=>fd.value=Vf),placeholder:"请选择",size:"small",onChange:Sd},{default:withCtx(()=>[(openBlock(),createElementBlock(Fragment,null,renderList(pd,Vf=>createVNode(zd,{key:Vf.value,label:Vf.label,value:Vf.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),creat
` ).forEach(function(Rd){if(Rd){var Od=Rd.indexOf(":"),Md=Rd.substr(0,Od).trim().toLowerCase(),jd=Rd.substr(Od+1).trim();Dd[Md]=jd}}),{error:Td,statusCode:Ad.status,statusMessage:Ad.statusText,headers:Dd,body:Sd}},dd=function(Td,Ad){return!Ad&&Ad==="text"?Td.responseText:Td.response},pd=function(Td,Ad){var Sd=(Td.method||"GET").toUpperCase(),Dd=Td.url;if(Td.qs){var Ld=ud(Td.qs);Ld&&(Dd+=(Dd.indexOf("?")===-1?"?":"&")+Ld)}var Rd=new XMLHttpRequest;if(Rd.open(Sd,Dd,!0),Rd.responseType=Td.dataType||"text",Td.xhrFields)for(var Od in Td.xhrFields)Rd[Od]=Td.xhrFields[Od];var Md=Td.headers;if(Md)for(var jd in Md)Md.hasOwnProperty(jd)&&jd.toLowerCase()!=="content-length"&&jd.toLowerCase()!=="user-agent"&&jd.toLowerCase()!=="origin"&&jd.toLowerCase()!=="host"&&Rd.setRequestHeader(jd,Md[jd]);return Td.onProgress&&Rd.upload&&(Rd.upload.onprogress=Td.onProgress),Td.onDownloadProgress&&(Rd.onprogress=Td.onDownloadProgress),Td.timeout&&(Rd.timeout=Td.timeout),Rd.ontimeout=function(Ud){var Hd=new Error("timeout");Ad(cd(Hd,Rd))},Rd.onload=function(){Ad(cd(null,Rd,dd(Rd,Td.dataType)))},Rd.onerror=function(Ud){var Hd=dd(Rd,Td.dataType);if(Hd)Ad(cd(null,Rd,Hd));else{var Wd=Rd.statusText;!Wd&&Rd.status===0&&(Wd=new Error("CORS blocked or network error")),Ad(cd(Wd,Rd,Hd))}},Rd.send(Td.body||""),Rd};td.exports=pd},"./node_modules/@babel/runtime/helpers/classCallCheck.js":function(td,rd){function nd(ad,sd){if(!(ad instanceof sd))throw new TypeError("Cannot call a class as a function")}td.exports=nd,td.exports.__esModule=!0,td.exports.default=td.exports},"./node_modules/@babel/runtime/helpers/createClass.js":function(td,rd,nd){var ad=nd("./node_modules/@babel/runtime/helpers/toPropertyKey.js");function sd(cd,dd){for(var pd=0;pd<dd.length;pd++){var fd=dd[pd];fd.enumerable=fd.enumerable||!1,fd.configurable=!0,"value"in fd&&(fd.writable=!0),Object.defineProperty(cd,ad(fd.key),fd)}}function ud(cd,dd,pd){return dd&&sd(cd.prototype,dd),pd&&sd(cd,pd),Object.defineProperty(cd,"prototype",{writable:!1}),cd}td.exports=ud,td.exports.__esModule=!0,td.exports.default=td.exports},"./node_modules/@babel/runtime/helpers/toPrimitive.js":function(td,rd,nd){var ad=nd("./node_modules/@babel/runtime/helpers/typeof.js").default;function sd(ud,cd){if(ad(ud)!=="object"||ud===null)return ud;var dd=ud[Symbol.toPrimitive];if(dd!==void 0){var pd=dd.call(ud,cd||"default");if(ad(pd)!=="object")return pd;throw new TypeError("@@toPrimitive must return a primitive value.")}return(cd==="string"?String:Number)(ud)}td.exports=sd,td.exports.__esModule=!0,td.exports.default=td.exports},"./node_modules/@babel/runtime/helpers/toPropertyKey.js":function(td,rd,nd){var ad=nd("./node_modules/@babel/runtime/helpers/typeof.js").default,sd=nd("./node_modules/@babel/runtime/helpers/toPrimitive.js");function ud(cd){var dd=sd(cd,"string");return ad(dd)==="symbol"?dd:String(dd)}td.exports=ud,td.exports.__esModule=!0,td.exports.default=td.exports},"./node_modules/@babel/runtime/helpers/typeof.js":function(td,rd){function nd(ad){"@babel/helpers - typeof";return td.exports=nd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(sd){return typeof sd}:function(sd){return sd&&typeof Symbol=="function"&&sd.constructor===Symbol&&sd!==Symbol.prototype?"symbol":typeof sd},td.exports.__esModule=!0,td.exports.default=td.exports,nd(ad)}td.exports=nd,td.exports.__esModule=!0,td.exports.default=td.exports},"./node_modules/fast-xml-parser/src/fxp.js":function(td,rd,nd){const ad=nd("./node_modules/fast-xml-parser/src/validator.js"),sd=nd("./node_modules/fast-xml-parser/src/xmlparser/XMLParser.js"),ud=nd("./node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js");td.exports={XMLParser:sd,XMLValidator:ad,XMLBuilder:ud}},"./node_modules/fast-xml-parser/src/util.js":function(td,rd,nd){const ad=":A-Za-z_ \\ u00C0- \\ u00D6 \\ u00D8- \\ u00F6 \\ u00F8- \\ u02FF \\ u0370- \\ u037D \\ u037F- \\ u1FFF \\ u200C- \\ u200D \\ u2070- \\ u218F \\ u2C00- \\ u2FEF \\ u3001- \\ uD7FF \\ uF900- \\ uFDCF \\ uFDF0- \\ uFFFD",sd=ad+" \\ -. \\ d \\ u00B7 \\ u0300- \\ u036F \\ u203F- \\ u2040",ud="["+ad+"]["+sd+"]*",cd=new RegExp("^"+ud+" $ "),dd=function(fd,Td){const Ad=[];l
` &&Hd[Jd]!==" \r ";Jd++)Tf+=Hd[Jd];if(Tf=Tf.trim(),Tf[Tf.length-1]==="/"&&(Tf=Tf.substring(0,Tf.length-1),Jd--),!Md(Tf)){let xf;return Tf.trim().length===0?xf="Invalid space after '<'.":xf="Tag '"+Tf+"' is an invalid name.",Rd("InvalidTag",xf,jd(Hd,Jd))}const _f=Td(Hd,Jd);if(_f===!1)return Rd("InvalidAttr","Attributes for '"+Tf+"' have open quote.",jd(Hd,Jd));let bf=_f.value;if(Jd=_f.index,bf[bf.length-1]==="/"){const xf=Jd-bf.length;bf=bf.substring(0,bf.length-1);const Bf=Sd(bf,Wd);if(Bf===!0)zd=!0;else return Rd(Bf.err.code,Bf.err.msg,jd(Hd,xf+Bf.err.line))}else if(vf)if(_f.tagClosed){if(bf.trim().length>0)return Rd("InvalidTag","Closing tag '"+Tf+"' can't have attributes or invalid starting.",jd(Hd,hf));if(Zd.length===0)return Rd("InvalidTag","Closing tag '"+Tf+"' has not been opened.",jd(Hd,hf));{const xf=Zd.pop();if(Tf!==xf.tagName){let Bf=jd(Hd,xf.tagStartPos);return Rd("InvalidTag","Expected closing tag '"+xf.tagName+"' (opened in line "+Bf.line+", col "+Bf.col+") instead of closing tag '"+Tf+"'.",jd(Hd,hf))}Zd.length==0&&(Qd=!0)}}else return Rd("InvalidTag","Closing tag '"+Tf+"' doesn't have proper closing.",jd(Hd,Jd));else{const xf=Sd(bf,Wd);if(xf!==!0)return Rd(xf.err.code,xf.err.msg,jd(Hd,Jd-bf.length+xf.err.line));if(Qd===!0)return Rd("InvalidXml","Multiple possible root nodes found.",jd(Hd,Jd));Wd.unpairedTags.indexOf(Tf)!==-1||Zd.push({tagName:Tf,tagStartPos:hf}),zd=!0}for(Jd++;Jd<Hd.length;Jd++)if(Hd[Jd]==="<")if(Hd[Jd+1]==="!"){Jd++,Jd=dd(Hd,Jd);continue}else if(Hd[Jd+1]==="?"){if(Jd=cd(Hd,++Jd),Jd.err)return Jd}else break;else if(Hd[Jd]==="&"){const xf=Ld(Hd,Jd);if(xf==-1)return Rd("InvalidChar","char '&' is not expected.",jd(Hd,Jd));Jd=xf}else if(Qd===!0&&!ud(Hd[Jd]))return Rd("InvalidXml","Extra text at the end",jd(Hd,Jd));Hd[Jd]==="<"&&Jd--}}else{if(ud(Hd[Jd]))continue;return Rd("InvalidChar","char '"+Hd[Jd]+"' is not expected.",jd(Hd,Jd))}if(zd){if(Zd.length==1)return Rd("InvalidTag","Unclosed tag '"+Zd[0].tagName+"'.",jd(Hd,Zd[0].tagStartPos));if(Zd.length>0)return Rd("InvalidXml","Invalid '"+JSON.stringify(Zd.map(Jd=>Jd.tagName),null,4).replace(/ \r ? \n /g,"")+"' found.",{line:1,col:1})}else return Rd("InvalidXml","Start tag expected.",1);return!0};function ud(Hd){return Hd===" "||Hd===" "||Hd=== `
` ||Hd===" \r "}function cd(Hd,Wd){const Zd=Wd;for(;Wd<Hd.length;Wd++)if(Hd[Wd]=="?"||Hd[Wd]==" "){const zd=Hd.substr(Zd,Wd-Zd);if(Wd>5&&zd==="xml")return Rd("InvalidXml","XML declaration allowed only at the start of the document.",jd(Hd,Wd));if(Hd[Wd]=="?"&&Hd[Wd+1]==">"){Wd++;break}else continue}return Wd}function dd(Hd,Wd){if(Hd.length>Wd+5&&Hd[Wd+1]==="-"&&Hd[Wd+2]==="-"){for(Wd+=3;Wd<Hd.length;Wd++)if(Hd[Wd]==="-"&&Hd[Wd+1]==="-"&&Hd[Wd+2]===">"){Wd+=2;break}}else if(Hd.length>Wd+8&&Hd[Wd+1]==="D"&&Hd[Wd+2]==="O"&&Hd[Wd+3]==="C"&&Hd[Wd+4]==="T"&&Hd[Wd+5]==="Y"&&Hd[Wd+6]==="P"&&Hd[Wd+7]==="E"){let Zd=1;for(Wd+=8;Wd<Hd.length;Wd++)if(Hd[Wd]==="<")Zd++;else if(Hd[Wd]===">"&&(Zd--,Zd===0))break}else if(Hd.length>Wd+9&&Hd[Wd+1]==="["&&Hd[Wd+2]==="C"&&Hd[Wd+3]==="D"&&Hd[Wd+4]==="A"&&Hd[Wd+5]==="T"&&Hd[Wd+6]==="A"&&Hd[Wd+7]==="["){for(Wd+=8;Wd<Hd.length;Wd++)if(Hd[Wd]==="]"&&Hd[Wd+1]==="]"&&Hd[Wd+2]===">"){Wd+=2;break}}return Wd}const pd='"',fd="'";function Td(Hd,Wd){let Zd="",zd="",Qd=!1;for(;Wd<Hd.length;Wd++){if(Hd[Wd]===pd||Hd[Wd]===fd)zd===""?zd=Hd[Wd]:zd!==Hd[Wd]||(zd="");else if(Hd[Wd]===">"&&zd===""){Qd=!0;break}Zd+=Hd[Wd]}return zd!==""?!1:{value:Zd,index:Wd,tagClosed:Qd}}const Ad=new RegExp( ` ( \ \ s * ) ( [ ^ \ \ s = ] + ) ( \ \ s *= ) ? ( \ \ s * ( [ '"])(([\\s\\S])*?)\\5)?`,"g");function Sd(Hd,Wd){const Zd=ad.getAllMatches(Hd,Ad),zd={};for(let Qd=0;Qd<Zd.length;Qd++){if(Zd[Qd][1].length===0)return Rd("InvalidAttr","Attribute ' "+Zd[Qd][2]+" ' has no space in starting.",Ud(Zd[Qd]));if(Zd[Qd][3]!==void 0&&Zd[Qd][4]===void 0)return Rd("InvalidAttr","Attribute ' "+Zd[Qd][2]+" ' is without value.",Ud(Zd[Qd]));if(Zd[Qd][3]===void 0&&!Wd.allowBooleanAttributes)return Rd("InvalidAttr","boolean attribute ' "+Zd[Qd][2]+" ' is not allowed.",Ud(Zd[Qd]));const Jd=Zd[Qd][2];if(!Od(Jd))return Rd("InvalidAttr","Attribute ' "+Jd+" ' is an invalid name.",Ud(Zd[Qd]));if(!zd.hasOwnProperty(Jd))zd[Jd]=1;else return Rd("InvalidAttr","Attribute ' "+Jd+" ' is repeated.",Ud(Zd[Qd]))}return!0}function Dd(Hd,Wd){let Zd=/\d/;for(Hd[Wd]==="x"&&(Wd++,Zd=/[\da-fA-F]/);Wd<Hd.length;Wd++){if(Hd[Wd]===";")return Wd;if(!Hd[Wd].match(Zd))break}return-1}function Ld(Hd,Wd){if(Wd++,Hd[Wd]===";")return-1;if(Hd[Wd]==="#")return Wd++,Dd(Hd,Wd);let Zd=0;for(;Wd<Hd.length;Wd++,Zd++)if(!(Hd[Wd].match(/\w/)&&Zd<20)){if(Hd[Wd]===";")break;return-1}return Wd}function Rd(Hd,Wd,Zd){return{err:{code:Hd,msg:Wd,line:Zd.line||Zd,col:Zd.col}}}function Od(Hd){return ad.isName(Hd)}function Md(Hd){return ad.isName(Hd)}function jd(Hd,Wd){const Zd=Hd.substring(0,Wd).split(/\r?\n/);return{line:Zd.length,col:Zd[Zd.length-1].length+1}}function Ud(Hd){return Hd.startIndex+Hd[1].length}},"./node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js":function(td,rd,nd){const ad=nd("./node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js"),sd={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(fd,Td){return Td},attributeValueProcessor:function(fd,Td){return Td},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("' "," g "),val:" & apos ; "},{regex:new RegExp('" ' , "g" ) , val : """ } ] , processEntities : ! 0 , stopNodes : [ ] , oneListGroup : ! 1 } ; function ud ( fd ) { this . options = Object . assign ( { } , sd , fd ) , this . options . ignoreAttributes || this . options . attributesGroupName ? this . isAttribute = function ( ) { return ! 1 } : ( this . attrPrefixLen = this . options . attributeNamePrefix . length , this . isAttribute = pd ) , this . processTextOrObjNode = cd , this . options . format ? ( this . indentate = dd , this . tagEndChar = ` >
2024-09-18 09:46:23 +08:00
` ,this.newLine= `
2024-09-25 14:23:53 +08:00
` ):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}ud.prototype.build=function(fd){return this.options.preserveOrder?ad(fd,this.options):(Array.isArray(fd)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(fd={[this.options.arrayNodeName]:fd}),this.j2x(fd,0).val)},ud.prototype.j2x=function(fd,Td){let Ad="",Sd="";for(let Dd in fd)if(Object.prototype.hasOwnProperty.call(fd,Dd))if(typeof fd[Dd]>"u")this.isAttribute(Dd)&&(Sd+="");else if(fd[Dd]===null)this.isAttribute(Dd)?Sd+="":Dd[0]==="?"?Sd+=this.indentate(Td)+"<"+Dd+"?"+this.tagEndChar:Sd+=this.indentate(Td)+"<"+Dd+"/"+this.tagEndChar;else if(fd[Dd]instanceof Date)Sd+=this.buildTextValNode(fd[Dd],Dd,"",Td);else if(typeof fd[Dd]!="object"){const Ld=this.isAttribute(Dd);if(Ld)Ad+=this.buildAttrPairStr(Ld,""+fd[Dd]);else if(Dd===this.options.textNodeName){let Rd=this.options.tagValueProcessor(Dd,""+fd[Dd]);Sd+=this.replaceEntitiesValue(Rd)}else Sd+=this.buildTextValNode(fd[Dd],Dd,"",Td)}else if(Array.isArray(fd[Dd])){const Ld=fd[Dd].length;let Rd="";for(let Od=0;Od<Ld;Od++){const Md=fd[Dd][Od];typeof Md>"u"||(Md===null?Dd[0]==="?"?Sd+=this.indentate(Td)+"<"+Dd+"?"+this.tagEndChar:Sd+=this.indentate(Td)+"<"+Dd+"/"+this.tagEndChar:typeof Md=="object"?this.options.oneListGroup?Rd+=this.j2x(Md,Td+1).val:Rd+=this.processTextOrObjNode(Md,Dd,Td):Rd+=this.buildTextValNode(Md,Dd,"",Td))}this.options.oneListGroup&&(Rd=this.buildObjectNode(Rd,Dd,"",Td)),Sd+=Rd}else if(this.options.attributesGroupName&&Dd===this.options.attributesGroupName){const Ld=Object.keys(fd[Dd]),Rd=Ld.length;for(let Od=0;Od<Rd;Od++)Ad+=this.buildAttrPairStr(Ld[Od],""+fd[Dd][Ld[Od]])}else Sd+=this.processTextOrObjNode(fd[Dd],Dd,Td);return{attrStr:Ad,val:Sd}},ud.prototype.buildAttrPairStr=function(fd,Td){return Td=this.options.attributeValueProcessor(fd,""+Td),Td=this.replaceEntitiesValue(Td),this.options.suppressBooleanAttributes&&Td==="true"?" "+fd:" "+fd+'="'+Td+'"'};function cd(fd,Td,Ad){const Sd=this.j2x(fd,Ad+1);return fd[this.options.textNodeName]!==void 0&&Object.keys(fd).length===1?this.buildTextValNode(fd[this.options.textNodeName],Td,Sd.attrStr,Ad):this.buildObjectNode(Sd.val,Td,Sd.attrStr,Ad)}ud.prototype.buildObjectNode=function(fd,Td,Ad,Sd){if(fd==="")return Td[0]==="?"?this.indentate(Sd)+"<"+Td+Ad+"?"+this.tagEndChar:this.indentate(Sd)+"<"+Td+Ad+this.closeTag(Td)+this.tagEndChar;{let Dd="</"+Td+this.tagEndChar,Ld="";return Td[0]==="?"&&(Ld="?",Dd=""),(Ad||Ad==="")&&fd.indexOf("<")===-1?this.indentate(Sd)+"<"+Td+Ad+Ld+">"+fd+Dd:this.options.commentPropName!==!1&&Td===this.options.commentPropName&&Ld.length===0?this.indentate(Sd)+ ` <!-- $ { fd } -- > ` +this.newLine:this.indentate(Sd)+"<"+Td+Ad+Ld+this.tagEndChar+fd+this.indentate(Sd)+Dd}},ud.prototype.closeTag=function(fd){let Td="";return this.options.unpairedTags.indexOf(fd)!==-1?this.options.suppressUnpairedNode||(Td="/"):this.options.suppressEmptyNode?Td="/":Td= ` > < /${fd}`,Td},ud.prototype.buildTextValNode=function(fd,Td,Ad,Sd){if(this.options.cdataPropName!==!1&&Td===this.options.cdataPropName)return this.indentate(Sd)+`<![CDATA[${fd}]]>`+this.newLine;if(this.options.commentPropName!==!1&&Td===this.options.commentPropName)return this.indentate(Sd)+`<!--${fd}-->`+this.newLine;if(Td[0]==="?")return this.indentate(Sd)+"<"+Td+Ad+"?"+this.tagEndChar;{let Dd=this.options.tagValueProcessor(Td,fd);return Dd=this.replaceEntitiesValue(Dd),Dd===""?this.indentate(Sd)+"<"+Td+Ad+this.closeTag(Td)+this.tagEndChar:this.indentate(Sd)+"<"+Td+Ad+">"+Dd+"</ "+Td+this.tagEndChar}},ud.prototype.replaceEntitiesValue=function(fd){if(fd&&fd.length>0&&this.options.processEntities)for(let Td=0;Td<this.options.entities.length;Td++){const Ad=this.options.entities[Td];fd=fd.replace(Ad.regex,Ad.val)}return fd};function dd(fd){return this.options.indentBy.repeat(fd)}function pd(fd){return fd.startsWith(this.options.attributeNamePrefix)&&fd!==this.options.textNodeName?fd.substr(this.attrPrefixLen):!1}td.exports=ud}," . / node _modules / fast - xml - parser / src / xmlbuilder / orderedJs2Xml . js " : function ( td , rd ) { const nd = `
2024-09-28 20:51:35 +08:00
` ;function ad(fd,Td){let Ad="";return Td.format&&Td.indentBy.length>0&&(Ad=nd),sd(fd,Td,"",Ad)}function sd(fd,Td,Ad,Sd){let Dd="",Ld=!1;for(let Rd=0;Rd<fd.length;Rd++){const Od=fd[Rd],Md=ud(Od);if(Md===void 0)continue;let jd="";if(Ad.length===0?jd=Md:jd= ` $ { Ad } . $ { Md } ` ,Md===Td.textNodeName){let zd=Od[Md];dd(jd,Td)||(zd=Td.tagValueProcessor(Md,zd),zd=pd(zd,Td)),Ld&&(Dd+=Sd),Dd+=zd,Ld=!1;continue}else if(Md===Td.cdataPropName){Ld&&(Dd+=Sd),Dd+= ` < ! [ CDATA [ $ { Od [ Md ] [ 0 ] [ Td . textNodeName ] } ] ] > ` ,Ld=!1;continue}else if(Md===Td.commentPropName){Dd+=Sd+ ` <!-- $ { Od [ Md ] [ 0 ] [ Td . textNodeName ] } -- > ` ,Ld=!0;continue}else if(Md[0]==="?"){const zd=cd(Od[":@"],Td),Qd=Md==="?xml"?"":Sd;let Jd=Od[Md][0][Td.textNodeName];Jd=Jd.length!==0?" "+Jd:"",Dd+=Qd+ ` < $ { Md } $ { Jd } $ { zd } ? > ` ,Ld=!0;continue}let Ud=Sd;Ud!==""&&(Ud+=Td.indentBy);const Hd=cd(Od[":@"],Td),Wd=Sd+ ` < $ { Md } $ { Hd } ` ,Zd=sd(Od[Md],Td,jd,Ud);Td.unpairedTags.indexOf(Md)!==-1?Td.suppressUnpairedNode?Dd+=Wd+">":Dd+=Wd+"/>":(!Zd||Zd.length===0)&&Td.suppressEmptyNode?Dd+=Wd+"/>":Zd&&Zd.endsWith(">")?Dd+=Wd+ ` > $ { Zd } $ { Sd } < /${Md}>`:(Dd+=Wd+">",Zd&&Sd!==""&&(Zd.includes("/ > ")||Zd.includes(" < /"))?Dd+=Sd+Td.indentBy+Zd+Sd:Dd+=Zd,Dd+=`</ $ { Md } > ` ),Ld=!0}return Dd}function ud(fd){const Td=Object.keys(fd);for(let Ad=0;Ad<Td.length;Ad++){const Sd=Td[Ad];if(fd.hasOwnProperty(Sd)&&Sd!==":@")return Sd}}function cd(fd,Td){let Ad="";if(fd&&!Td.ignoreAttributes)for(let Sd in fd){if(!fd.hasOwnProperty(Sd))continue;let Dd=Td.attributeValueProcessor(Sd,fd[Sd]);Dd=pd(Dd,Td),Dd===!0&&Td.suppressBooleanAttributes?Ad+= ` $ { Sd . substr ( Td . attributeNamePrefix . length ) } ` :Ad+= ` $ { Sd . substr ( Td . attributeNamePrefix . length ) } = "${Dd}" ` }return Ad}function dd(fd,Td){fd=fd.substr(0,fd.length-Td.textNodeName.length-1);let Ad=fd.substr(fd.lastIndexOf(".")+1);for(let Sd in Td.stopNodes)if(Td.stopNodes[Sd]===fd||Td.stopNodes[Sd]==="*."+Ad)return!0;return!1}function pd(fd,Td){if(fd&&fd.length>0&&Td.processEntities)for(let Ad=0;Ad<Td.entities.length;Ad++){const Sd=Td.entities[Ad];fd=fd.replace(Sd.regex,Sd.val)}return fd}td.exports=ad},"./node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js":function(td,rd,nd){const ad=nd("./node_modules/fast-xml-parser/src/util.js");function sd(Sd,Dd){const Ld={};if(Sd[Dd+3]==="O"&&Sd[Dd+4]==="C"&&Sd[Dd+5]==="T"&&Sd[Dd+6]==="Y"&&Sd[Dd+7]==="P"&&Sd[Dd+8]==="E"){Dd=Dd+9;let Rd=1,Od=!1,Md=!1,jd="";for(;Dd<Sd.length;Dd++)if(Sd[Dd]==="<"&&!Md){if(Od&&dd(Sd,Dd))Dd+=7,[entityName,val,Dd]=ud(Sd,Dd+1),val.indexOf("&")===-1&&(Ld[Ad(entityName)]={regx:RegExp( ` & $ { entityName } ; ` ,"g"),val});else if(Od&&pd(Sd,Dd))Dd+=8;else if(Od&&fd(Sd,Dd))Dd+=8;else if(Od&&Td(Sd,Dd))Dd+=9;else if(cd)Md=!0;else throw new Error("Invalid DOCTYPE");Rd++,jd=""}else if(Sd[Dd]===">"){if(Md?Sd[Dd-1]==="-"&&Sd[Dd-2]==="-"&&(Md=!1,Rd--):Rd--,Rd===0)break}else Sd[Dd]==="["?Od=!0:jd+=Sd[Dd];if(Rd!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:Ld,i:Dd}}function ud(Sd,Dd){let Ld="";for(;Dd<Sd.length&&Sd[Dd]!=="'"&&Sd[Dd]!=='"';Dd++)Ld+=Sd[Dd];if(Ld=Ld.trim(),Ld.indexOf(" ")!==-1)throw new Error("External entites are not supported");const Rd=Sd[Dd++];let Od="";for(;Dd<Sd.length&&Sd[Dd]!==Rd;Dd++)Od+=Sd[Dd];return[Ld,Od,Dd]}function cd(Sd,Dd){return Sd[Dd+1]==="!"&&Sd[Dd+2]==="-"&&Sd[Dd+3]==="-"}function dd(Sd,Dd){return Sd[Dd+1]==="!"&&Sd[Dd+2]==="E"&&Sd[Dd+3]==="N"&&Sd[Dd+4]==="T"&&Sd[Dd+5]==="I"&&Sd[Dd+6]==="T"&&Sd[Dd+7]==="Y"}function pd(Sd,Dd){return Sd[Dd+1]==="!"&&Sd[Dd+2]==="E"&&Sd[Dd+3]==="L"&&Sd[Dd+4]==="E"&&Sd[Dd+5]==="M"&&Sd[Dd+6]==="E"&&Sd[Dd+7]==="N"&&Sd[Dd+8]==="T"}function fd(Sd,Dd){return Sd[Dd+1]==="!"&&Sd[Dd+2]==="A"&&Sd[Dd+3]==="T"&&Sd[Dd+4]==="T"&&Sd[Dd+5]==="L"&&Sd[Dd+6]==="I"&&Sd[Dd+7]==="S"&&Sd[Dd+8]==="T"}function Td(Sd,Dd){return Sd[Dd+1]==="!"&&Sd[Dd+2]==="N"&&Sd[Dd+3]==="O"&&Sd[Dd+4]==="T"&&Sd[Dd+5]==="A"&&Sd[Dd+6]==="T"&&Sd[Dd+7]==="I"&&Sd[Dd+8]==="O"&&Sd[Dd+9]==="N"}function Ad(Sd){if(ad.isName(Sd))return Sd;throw new Error( ` Invalid entity name $ { Sd } ` )}td.exports=sd},"./node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js":function(td,rd){const nd={preserveOrd
` );const Qd=new sd("!xml");let Jd=Qd,hf="",vf="";for(let Tf=0;Tf<zd.length;Tf++)if(zd[Tf]==="<")if(zd[Tf+1]==="/"){const bf=Ud(zd,">",Tf,"Closing Tag is not closed.");let xf=zd.substring(Tf+2,bf).trim();if(this.options.removeNSPrefix){const Zf=xf.indexOf(":");Zf!==-1&&(xf=xf.substr(Zf+1))}this.options.transformTagName&&(xf=this.options.transformTagName(xf)),Jd&&(hf=this.saveTextToParentTag(hf,Jd,vf));const Bf=vf.substring(vf.lastIndexOf(".")+1);if(xf&&this.options.unpairedTags.indexOf(xf)!==-1)throw new Error( ` Unpaired tag can not be used as closing tag : < /${xf}>`);let Yf=0;Bf&&this.options.unpairedTags.indexOf(Bf)!==-1?(Yf=vf.lastIndexOf(".",vf.lastIndexOf(".")-1),this.tagsNodeStack.pop()):Yf=vf.lastIndexOf("."),vf=vf.substring(0,Yf),Jd=this.tagsNodeStack.pop(),hf="",Tf=bf}else if(zd[Tf+1]==="?"){let bf=Hd(zd,Tf,!1,"?>");if(!bf)throw new Error("Pi Tag is not closed.");if(hf=this.saveTextToParentTag(hf,Jd,vf),!(this.options.ignoreDeclaration&&bf.tagName==="?xml"||this.options.ignorePiTags)){const xf=new sd(bf.tagName);xf.add(this.options.textNodeName,""),bf.tagName!==bf.tagExp&&bf.attrExpPresent&&(xf[":@"]=this.buildAttributesMap(bf.tagExp,vf,bf.tagName)),this.addChild(Jd,xf,vf)}Tf=bf.closeIndex+1}else if(zd.substr(Tf+1,3)==="!--"){const bf=Ud(zd,"-->",Tf+4,"Comment is not closed.");if(this.options.commentPropName){const xf=zd.substring(Tf+4,bf-2);hf=this.saveTextToParentTag(hf,Jd,vf),Jd.add(this.options.commentPropName,[{[this.options.textNodeName]:xf}])}Tf=bf}else if(zd.substr(Tf+1,2)==="!D"){const bf=ud(zd,Tf);this.docTypeEntities=bf.entities,Tf=bf.i}else if(zd.substr(Tf+1,2)==="!["){const bf=Ud(zd,"]]>",Tf,"CDATA is not closed.")-2,xf=zd.substring(Tf+9,bf);hf=this.saveTextToParentTag(hf,Jd,vf);let Bf=this.parseTextData(xf,Jd.tagname,vf,!0,!1,!0,!0);Bf==null&&(Bf=""),this.options.cdataPropName?Jd.add(this.options.cdataPropName,[{[this.options.textNodeName]:xf}]):Jd.add(this.options.textNodeName,Bf),Tf=bf+2}else{let bf=Hd(zd,Tf,this.options.removeNSPrefix),xf=bf.tagName;const Bf=bf.rawTagName;let Yf=bf.tagExp,Zf=bf.attrExpPresent,Vf=bf.closeIndex;this.options.transformTagName&&(xf=this.options.transformTagName(xf)),Jd&&hf&&Jd.tagname!=="!xml"&&(hf=this.saveTextToParentTag(hf,Jd,vf,!1));const Pf=Jd;if(Pf&&this.options.unpairedTags.indexOf(Pf.tagname)!==-1&&(Jd=this.tagsNodeStack.pop(),vf=vf.substring(0,vf.lastIndexOf("."))),xf!==Qd.tagname&&(vf+=vf?"."+xf:xf),this.isItStopNode(this.options.stopNodes,vf,xf)){let Df="";if(Yf.length>0&&Yf.lastIndexOf("/ ")===Yf.length-1)xf[xf.length-1]===" / "?(xf=xf.substr(0,xf.length-1),vf=vf.substr(0,vf.length-1),Yf=xf):Yf=Yf.substr(0,Yf.length-1),Tf=bf.closeIndex;else if(this.options.unpairedTags.indexOf(xf)!==-1)Tf=bf.closeIndex;else{const Jf=this.readStopNodeData(zd,Bf,Vf+1);if(!Jf)throw new Error(`Unexpected end of ${Bf}`);Tf=Jf.i,Df=Jf.tagContent}const $f=new sd(xf);xf!==Yf&&Zf&&($f[" : @ "]=this.buildAttributesMap(Yf,vf,xf)),Df&&(Df=this.parseTextData(Df,xf,vf,!0,Zf,!0,!0)),vf=vf.substr(0,vf.lastIndexOf(" . ")),$f.add(this.options.textNodeName,Df),this.addChild(Jd,$f,vf)}else{if(Yf.length>0&&Yf.lastIndexOf(" / ")===Yf.length-1){xf[xf.length-1]===" / "?(xf=xf.substr(0,xf.length-1),vf=vf.substr(0,vf.length-1),Yf=xf):Yf=Yf.substr(0,Yf.length-1),this.options.transformTagName&&(xf=this.options.transformTagName(xf));const Df=new sd(xf);xf!==Yf&&Zf&&(Df[" : @ "]=this.buildAttributesMap(Yf,vf,xf)),this.addChild(Jd,Df,vf),vf=vf.substr(0,vf.lastIndexOf(" . "))}else{const Df=new sd(xf);this.tagsNodeStack.push(Jd),xf!==Yf&&Zf&&(Df[" : @ "]=this.buildAttributesMap(Yf,vf,xf)),this.addChild(Jd,Df,vf),Jd=Df}hf=" ",Tf=Vf}}else hf+=zd[Tf];return Qd.child};function Ld(zd,Qd,Jd){const hf=this.options.updateTag(Qd.tagname,Jd,Qd[" : @ "]);hf===!1||(typeof hf==" string " && ( Qd . tagname = hf ) , zd . addChild ( Qd ) ) } const Rd = function ( zd ) { if ( this . options . processEntities ) { for ( let Qd in this . docTypeEntities ) { const Jd = this . docTypeEntities [ Qd ] ; zd = zd . replace ( Jd . regx , Jd . val ) } for ( let Qd in this . lastEntities ) { const Jd = this . lastEntities [ Qd ] ; zd = zd . replace ( Jd . regex , Jd . val ) } if ( this . options . htmlEntities ) for ( let Qd in this . htmlEntities ) { const Jd = this . htm
In order to be iterable , non - array objects must have a [ Symbol . iterator ] ( ) method . ` )}var Oh=!0,Xh=!1,gm;return{s:function(){Qf=Qf.call(If)},n:function(){var Hm=Qf.next();return Oh=Hm.done,Hm},e:function(Hm){Xh=!0,gm=Hm},f:function(){try{!Oh&&Qf.return!=null&&Qf.return()}finally{if(Xh)throw gm}}}}function cd(If,Nf){if(If){if(typeof If=="string")return dd(If,Nf);var Qf=Object.prototype.toString.call(If).slice(8,-1);if(Qf==="Object"&&If.constructor&&(Qf=If.constructor.name),Qf==="Map"||Qf==="Set")return Array.from(If);if(Qf==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array $ /.test(Qf))return dd(If,Nf)}}function dd(If,Nf){(Nf==null||Nf>If.length)&&(Nf=If.length);for(var Qf=0,oh=new Array(Nf);Qf<Nf;Qf++)oh[Qf]=If[Qf];return oh}var pd=nd("./lib/md5.js"),fd=nd("./lib/crypto.js"),Td=nd("./node_modules/fast-xml-parser/src/fxp.js"),Ad=Td.XMLParser,Sd=Td.XMLBuilder,Dd=new Ad({ignoreDeclaration:!0,ignoreAttributes:!0,parseTagValue:!1}),Ld=new Sd,Rd=nd("./lib/base64.js"),Od=nd("./src/tracker.js"),Md=function(Nf){var Qf=Dd.parse(Nf);return Qf},jd=function(Nf){var Qf=Ld.build(Nf);return Qf};function Ud(If){return encodeURIComponent(If).replace(/!/g,"%21").replace(/'/g,"%27").replace(/ \( /g,"%28").replace(/ \) /g,"%29").replace(/ \* /g,"%2A")}function Hd(If,Nf){var Qf=[];for(var oh in If)If.hasOwnProperty(oh)&&Qf.push(Nf?Ud(oh).toLowerCase():oh);return Qf.sort(function(xh,Oh){return xh=xh.toLowerCase(),Oh=Oh.toLowerCase(),xh===Oh?0:xh>Oh?1:-1})}var Wd=function(Nf,Qf){var oh,xh,Oh,Xh=[],gm=Hd(Nf);for(oh=0;oh<gm.length;oh++)xh=gm[oh],Oh=Nf[xh]===void 0||Nf[xh]===null?"":""+Nf[xh],xh=Qf?Ud(xh).toLowerCase():Ud(xh),Oh=Ud(Oh)||"",Xh.push(xh+"="+Oh);return Xh.join("&")},Zd=["cache-control","content-disposition","content-encoding","content-length","content-md5","expect","expires","host","if-match","if-modified-since","if-none-match","if-unmodified-since","origin","range","transfer-encoding","pic-operations"],zd=function(Nf){var Qf={};for(var oh in Nf){var xh=oh.toLowerCase();(xh.indexOf("x-cos-")>-1||Zd.indexOf(xh)>-1)&&(Qf[oh]=Nf[oh])}return Qf},Qd=function(Nf){Nf=Nf||{};var Qf=Nf.SecretId,oh=Nf.SecretKey,xh=Nf.KeyTime,Oh=(Nf.method||Nf.Method||"get").toLowerCase(),Xh=Df(Nf.Query||Nf.params||{}),gm=zd(Df(Nf.Headers||Nf.headers||{})),lm=Nf.Key||"",Hm;Nf.UseRawKey?Hm=Nf.Pathname||Nf.pathname||"/"+lm:(Hm=Nf.Pathname||Nf.pathname||lm,Hm.indexOf("/")!==0&&(Hm="/"+Hm));var Rm=Nf.ForceSignHost!==!1;if(!gm.Host&&!gm.host&&Nf.Bucket&&Nf.Region&&Rm&&(gm.Host=Nf.Bucket+".cos."+Nf.Region+".myqcloud.com"),!Qf)throw new Error("missing param SecretId");if(!oh)throw new Error("missing param SecretKey");var Pm=Math.round(jf(Nf.SystemClockOffset)/1e3)-1,e_=Pm,U_=Nf.Expires||Nf.expires;U_===void 0?e_+=900:e_+=U_*1||0;var C_="sha1",A_=Qf,Zm=xh||Pm+";"+e_,L_=xh||Pm+";"+e_,V_=Hd(gm,!0).join(";").toLowerCase(),Q_=Hd(Xh,!0).join(";").toLowerCase(),Z_=fd.HmacSHA1(L_,oh).toString(),H_=[Oh,Hm,rh.obj2str(Xh,!0),rh.obj2str(gm,!0),""].join( `
2024-09-25 14:23:53 +08:00
` ),O_=["sha1",Zm,fd.SHA1(H_).toString(),""].join( `
2024-09-28 20:51:35 +08:00
` ), $ m=fd.HmacSHA1(O_,Z_).toString(),Rg=["q-sign-algorithm="+C_,"q-ak="+A_,"q-sign-time="+Zm,"q-key-time="+L_,"q-header-list="+V_,"q-url-param-list="+Q_,"q-signature="+ $ m].join("&");return Rg},Jd=function(Nf,Qf,oh){var xh=Qf/8,Oh=Nf.slice(oh,oh+xh);return new Uint8Array(Oh).reverse(),new{8:Uint8Array,16:Uint16Array,32:Uint32Array}[Qf](Oh)[0]},hf=function(Nf,Qf,oh,xh){var Oh=Nf.slice(Qf,oh),Xh="";return new Uint8Array(Oh).forEach(function(gm){Xh+=String.fromCharCode(gm)}),xh&&(Xh=decodeURIComponent(escape(Xh))),Xh},vf=function(Nf){for(var Qf={},oh=hf(Nf),xh={records:[]};Nf.byteLength;){var Oh=Jd(Nf,32,0),Xh=Jd(Nf,32,4),gm=Oh-Xh-16,lm=0,Hm;for(Nf=Nf.slice(12);lm<Xh;){var Rm=Jd(Nf,8,lm),Pm=hf(Nf,lm+1,lm+1+Rm),e_=Jd(Nf,16,lm+Rm+2),U_=hf(Nf,lm+Rm+4,lm+Rm+4+e_);Qf[Pm]=U_,lm+=Rm+4+e_}if(Qf[":event-type"]==="Records")Hm=hf(Nf,lm,lm+gm,!0),xh.records.push(Hm);else if(Qf[":event-type"]==="Stats")Hm=hf(Nf,lm,lm+gm,!0),xh.stats=rh.xml2json(Hm).Stats;else if(Qf[":event-type"]==="error"){var C_=Qf[":error-code"],A_=Qf[":error-message"],Zm=new Error(A_);Zm.message=A_,Zm.name=Zm.code=C_,xh.error=Zm}Nf=Nf.slice(lm+gm+4)}return{payload:xh.records.join(""),body:oh}},Tf=function(Nf){var Qf=this.options.CopySourceParser;if(Qf)return Qf(Nf);var oh=Nf.match(/^([^.]+- \d +) \. cos(v6|-cdc|-cdz|-internal)? \. ([^.]+) \. ((myqcloud \. com)|(tencentcos \. cn)) \/ (.+) $ /);return oh?{Bucket:oh[1],Region:oh[3],Key:oh[7]}:null},_f=function(){},bf=function(Nf){var Qf={};for(var oh in Nf)Nf.hasOwnProperty(oh)&&Nf[oh]!==void 0&&Nf[oh]!==null&&(Qf[oh]=Nf[oh]);return Qf},xf=function(Nf,Qf){var oh,xh=new FileReader;FileReader.prototype.readAsBinaryString?(oh=FileReader.prototype.readAsBinaryString,xh.onload=function(){Qf(this.result)}):FileReader.prototype.readAsArrayBuffer?oh=function(Xh){var gm="",lm=new FileReader;lm.onload=function(Hm){for(var Rm=new Uint8Array(lm.result),Pm=Rm.byteLength,e_=0;e_<Pm;e_++)gm+=String.fromCharCode(Rm[e_]);Qf(gm)},lm.readAsArrayBuffer(Xh)}:console.error("FileReader not support readAsBinaryString"),oh.call(xh,Nf)},Bf=function(){var If=function(oh,xh){oh=oh.split("."),xh=xh.split(".");for(var Oh=0;Oh<xh.length;Oh++)if(oh[Oh]!==xh[Oh])return parseInt(oh[Oh])>parseInt(xh[Oh])?1:-1;return 0},Nf=function(oh){if(!oh)return!1;var xh=(oh.match(/Chrome \/ ([. \d ]+)/)||[])[1],Oh=(oh.match(/QBCore \/ ([. \d ]+)/)||[])[1],Xh=(oh.match(/QQBrowser \/ ([. \d ]+)/)||[])[1],gm=xh&&If(xh,"53.0.2785.116")<0&&Oh&&If(Oh,"3.53.991.400")<0&&Xh&&If(Xh,"9.0.2524.400")<=0||!1;return gm};return Nf(typeof navigator<"u"&&navigator.userAgent)}(),Yf=function(Nf,Qf,oh,xh,Oh){var Xh;if(Nf.slice?Xh=Nf.slice(Qf,oh):Nf.mozSlice?Xh=Nf.mozSlice(Qf,oh):Nf.webkitSlice&&(Xh=Nf.webkitSlice(Qf,oh)),xh&&Bf){var gm=new FileReader;gm.onload=function(lm){Xh=null,Oh(new Blob([gm.result]))},gm.readAsArrayBuffer(Xh)}else Oh(Xh)},Zf=function(Nf,Qf,oh,xh){oh=oh||_f,Nf?typeof Qf=="string"?oh(rh.md5(Qf,!0)):Blob&&Qf instanceof Blob?rh.getFileMd5(Qf,function(Oh,Xh){oh(Xh)},xh):oh():oh()},Vf=1024*1024,Pf=function(Nf,Qf,oh){var xh=Nf.size,Oh=0,Xh=pd.getCtx(),gm=function lm(Hm){if(Hm>=xh){var Rm=Xh.digest("hex");Qf(null,Rm);return}var Pm=Math.min(xh,Hm+Vf);rh.fileSlice(Nf,Hm,Pm,!1,function(e_){xf(e_,function(U_){e_=null,Xh=Xh.update(U_,!0),Oh+=U_.length,U_=null,oh&&oh({loaded:Oh,total:xh,percent:Math.round(Oh/xh*1e4)/1e4}),lm(Hm+Vf)})})};gm(0)};function Df(If){return Gf(If,function(Nf){return sd(Nf)==="object"&&Nf!==null?Df(Nf):Nf})}function $ f(If,Nf,Qf){return If&&Nf in If?If[Nf]:Qf}function Jf(If,Nf){return Mf(Nf,function(Qf,oh){If[oh]=Nf[oh]}),If}function Xf(If){return If instanceof Array}function Ef(If,Nf){for(var Qf=!1,oh=0;oh<If.length;oh++)if(Nf===If[oh]){Qf=!0;break}return Qf}function gf(If){return Xf(If)?If:[If]}function Mf(If,Nf){for(var Qf in If)If.hasOwnProperty(Qf)&&Nf(If[Qf],Qf)}function Gf(If,Nf){var Qf=Xf(If)?[]:{};for(var oh in If)If.hasOwnProperty(oh)&&(Qf[oh]=Nf(If[oh],oh));return Qf}function ah(If,Nf){var Qf=Xf(If),oh=Qf?[]:{};for(var xh in If)If.hasOwnProperty(xh)&&Nf(If[xh],xh)&&(Qf?oh.push(If[xh]):oh[xh]=If[xh]);return oh}var Wf=function(Nf){var Qf,oh,xh,Oh="";for(Qf=0,oh=Nf.length/2
2024-09-18 09:46:23 +08:00
( c ) 2012 by Cédric Mesnil . All rights reserved .
Redistribution and use in source and binary forms , with or without modification , are permitted provided that the following conditions are met :
- Redistributions of source code must retain the above copyright notice , this list of conditions and the following disclaimer .
- Redistributions in binary form must reproduce the above copyright notice , this list of conditions and the following disclaimer in the documentation and / or other materials provided with the distribution .
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT LIMITED TO , THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE , DATA , OR PROFITS ; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE .
2024-09-28 20:51:35 +08:00
* / r e t u r n f u n c t i o n ( r d ) { v a r n d = t d , a d = n d . l i b , s d = a d . W o r d A r r a y , u d = a d . H a s h e r , c d = n d . a l g o , d d = s d . c r e a t e ( [ 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 1 0 , 1 1 , 1 2 , 1 3 , 1 4 , 1 5 , 7 , 4 , 1 3 , 1 , 1 0 , 6 , 1 5 , 3 , 1 2 , 0 , 9 , 5 , 2 , 1 4 , 1 1 , 8 , 3 , 1 0 , 1 4 , 4 , 9 , 1 5 , 8 , 1 , 2 , 7 , 0 , 6 , 1 3 , 1 1 , 5 , 1 2 , 1 , 9 , 1 1 , 1 0 , 0 , 8 , 1 2 , 4 , 1 3 , 3 , 7 , 1 5 , 1 4 , 5 , 6 , 2 , 4 , 0 , 5 , 9 , 7 , 1 2 , 2 , 1 0 , 1 4 , 1 , 3 , 8 , 1 1 , 6 , 1 5 , 1 3 ] ) , p d = s d . c r e a t e ( [ 5 , 1 4 , 7 , 0 , 9 , 2 , 1 1 , 4 , 1 3 , 6 , 1 5 , 8 , 1 , 1 0 , 3 , 1 2 , 6 , 1 1 , 3 , 7 , 0 , 1 3 , 5 , 1 0 , 1 4 , 1 5 , 8 , 1 2 , 4 , 9 , 1 , 2 , 1 5 , 5 , 1 , 3 , 7 , 1 4 , 6 , 9 , 1 1 , 8 , 1 2 , 2 , 1 0 , 0 , 4 , 1 3 , 8 , 6 , 4 , 1 , 3 , 1 1 , 1 5 , 0 , 5 , 1 2 , 2 , 1 3 , 9 , 7 , 1 0 , 1 4 , 1 2 , 1 5 , 1 0 , 4 , 1 , 5 , 8 , 7 , 6 , 2 , 1 3 , 1 4 , 0 , 3 , 9 , 1 1 ] ) , f d = s d . c r e a t e ( [ 1 1 , 1 4 , 1 5 , 1 2 , 5 , 8 , 7 , 9 , 1 1 , 1 3 , 1 4 , 1 5 , 6 , 7 , 9 , 8 , 7 , 6 , 8 , 1 3 , 1 1 , 9 , 7 , 1 5 , 7 , 1 2 , 1 5 , 9 , 1 1 , 7 , 1 3 , 1 2 , 1 1 , 1 3 , 6 , 7 , 1 4 , 9 , 1 3 , 1 5 , 1 4 , 8 , 1 3 , 6 , 5 , 1 2 , 7 , 5 , 1 1 , 1 2 , 1 4 , 1 5 , 1 4 , 1 5 , 9 , 8 , 9 , 1 4 , 5 , 6 , 8 , 6 , 5 , 1 2 , 9 , 1 5 , 5 , 1 1 , 6 , 8 , 1 3 , 1 2 , 5 , 1 2 , 1 3 , 1 4 , 1 1 , 8 , 5 , 6 ] ) , T d = s d . c r e a t e ( [ 8 , 9 , 9 , 1 1 , 1 3 , 1 5 , 1 5 , 5 , 7 , 7 , 8 , 1 1 , 1 4 , 1 4 , 1 2 , 6 , 9 , 1 3 , 1 5 , 7 , 1 2 , 8 , 9 , 1 1 , 7 , 7 , 1 2 , 7 , 6 , 1 5 , 1 3 , 1 1 , 9 , 7 , 1 5 , 1 1 , 8 , 6 , 6 , 1 4 , 1 2 , 1 3 , 5 , 1 4 , 1 3 , 1 3 , 7 , 5 , 1 5 , 5 , 8 , 1 1 , 1 4 , 1 4 , 6 , 1 4 , 6 , 9 , 1 2 , 9 , 1 2 , 5 , 1 5 , 8 , 8 , 5 , 1 2 , 9 , 1 2 , 5 , 1 4 , 6 , 8 , 1 3 , 6 , 5 , 1 5 , 1 3 , 1 1 , 1 1 ] ) , A d = s d . c r e a t e ( [ 0 , 1 5 1 8 5 0 0 2 4 9 , 1 8 5 9 7 7 5 3 9 3 , 2 4 0 0 9 5 9 7 0 8 , 2 8 4 0 8 5 3 8 3 8 ] ) , S d = s d . c r e a t e ( [ 1 3 5 2 8 2 9 9 2 6 , 1 5 4 8 6 0 3 6 8 4 , 1 8 3 6 0 7 2 6 9 1 , 2 0 5 3 9 9 4 2 1 7 , 0 ] ) , D d = c d . R I P E M D 1 6 0 = u d . e x t e n d ( { _ d o R e s e t : f u n c t i o n ( ) { t h i s . _ h a s h = s d . c r e a t e ( [ 1 7 3 2 5 8 4 1 9 3 , 4 0 2 3 2 3 3 4 1 7 , 2 5 6 2 3 8 3 1 0 2 , 2 7 1 7 3 3 8 7 8 , 3 2 8 5 3 7 7 5 2 0 ] ) } , _ d o P r o c e s s B l o c k : f u n c t i o n ( H d , W d ) { f o r ( v a r Z d = 0 ; Z d < 1 6 ; Z d + + ) { v a r z d = W d + Z d , Q d = H d [ z d ] ; H d [ z d ] = ( Q d < < 8 | Q d > > > 2 4 ) & 1 6 7 1 1 9 3 5 | ( Q d < < 2 4 | Q d > > > 8 ) & 4 2 7 8 2 5 5 3 6 0 } v a r J d = t h i s . _ h a s h . w o r d s , h f = A d . w o r d s , v f = S d . w o r d s , T f = d d . w o r d s , _ f = p d . w o r d s , b f = f d . w o r d s , x f = T d . w o r d s , B f , Y f , Z f , V f , P f , D f , $ f , J f , X f , E f ; D f = B f = J d [ 0 ] , $ f = Y f = J d [ 1 ] , J f = Z f = J d [ 2 ] , X f = V f = J d [ 3 ] , E f = P f = J d [ 4 ] ; f o r ( v a r g f , Z d = 0 ; Z d < 8 0 ; Z d + = 1 ) g f = B f + H d [ W d + T f [ Z d ] ] | 0 , Z d < 1 6 ? g f + = L d ( Y f , Z f , V f ) + h f [ 0 ] : Z d < 3 2 ? g f + = R d ( Y f , Z f , V f ) + h f [ 1 ] : Z d < 4 8 ? g f + = O d ( Y f , Z f , V f ) + h f [ 2 ] : Z d < 6 4 ? g f + = M d ( Y f , Z f , V f ) + h f [ 3 ] : g f + = j d ( Y f , Z f , V f ) + h f [ 4 ] , g f = g f | 0 , g f = U d ( g f , b f [ Z d ] ) , g f = g f + P f | 0 , B f = P f , P f = V f , V f = U d ( Z f , 1 0 ) , Z f = Y f , Y f = g f , g f = D f + H d [ W d + _ f [ Z d ] ] | 0 , Z d < 1 6 ? g f + = j d ( $ f , J f , X f ) + v f [ 0 ] : Z d < 3 2 ? g f + = M d ( $ f , J f , X f ) + v f [ 1 ] : Z d < 4 8 ? g f + = O d ( $ f , J f , X f ) + v f [ 2 ] : Z d < 6 4 ? g f + = R d ( $ f , J f , X f ) + v f [ 3 ] : g f + = L d ( $ f , J f , X f ) + v f [ 4 ] , g f = g f | 0 , g f = U d ( g f , x f [ Z d ] ) , g f = g f + E f | 0 , D f = E f , E f = X f , X f = U d ( J f , 1 0 ) , J f = $ f , $ f = g f ; g f = J d [ 1 ] + Z f + X f | 0 , J d [ 1 ] = J d [ 2 ] + V f + E f | 0 , J d [ 2 ] = J d [ 3 ] + P f + D f | 0 , J d [ 3 ] = J d [ 4 ] + B f + $ f | 0 , J d [ 4 ] = J d [ 0 ] + Y f + J f | 0 , J d [ 0 ] = g f } , _ d o F i n a l i z e : f u n c t i o n ( ) { v a r H d = t h i s . _ d a t a , W d = H d . w o r d s , Z d = t h i s . _ n D a t a B y t e s * 8 , z d = H d . s i g B y t e s * 8 ; W d [ z d > > > 5 ] | = 1 2 8 < < 2 4 - z d % 3 2 , W d [ ( z d + 6 4 > > > 9 < < 4 ) + 1 4 ] = ( Z d < < 8 | Z d > > > 2 4 ) & 1 6 7 1 1 9 3 5 | ( Z d < < 2 4 | Z d > > > 8 ) & 4 2 7 8 2 5 5 3 6 0 , H d . s i g B y t e s = ( W d . l e n g t h + 1 ) * 4 , t h i s . _ p r o c e s s ( ) ; f o r ( v a r Q d = t h i s . _ h a s h , J d = Q d . w o r d s , h f = 0 ; h f < 5 ; h f + + ) { v a r v f = J d [ h f ] ; J d [ h f ] = ( v f < < 8 | v f > > > 2 4 ) & 1 6 7 1 1 9 3 5 | ( v f < < 2 4 | v f > > > 8 ) & 4 2 7 8 2 5 5 3 6 0 } r e t u r n Q d } , c l o n e : f u n c t i o n ( ) { v a r H d = u d . c l o n e . c a l l ( t h i s ) ; r e t u r n H d . _ h a s h = t h i s . _ h a s h . c l o n e ( ) , H d } } ) ; f u n c t i o n L d ( H d , W d , Z d ) { r e t u r n H d ^ W d ^ Z d } f u n c t i o n R d ( H d , W d , Z d ) { r e t u r n H d & W d | ~ H d & Z d } f u n c t i o n O d ( H d , W d , Z d ) { r e t u r n ( H d | ~ W d ) ^ Z d } f u n c t i o n M d ( H d , W d , Z d ) { r e t u r n H d & Z d | W d & ~ Z d } f u n c t i o n j d ( H d , W d , Z d ) { r e t u r n H d ^ ( W d | ~ Z d ) } f u n c t i o n U d ( H d , W d ) { r e t u r n H d < < W d | H d > > > 3 2 - W d } n d . R I P E M D 1 6 0 = u d . _ c r e a t e H e l p e r ( D d ) , n d . H m a c R I P E M D 1 6 0 = u d . _ c r e a t e H m a c H e l p e r ( D d ) } ( ) , t d . R I P E M D 1 6 0 } ) } ( r i p e m d 1 6 0 ) ) , r i p e m d 1 6 0 . e x p o r t s } v a r h m a c = { e x p o r t s : { } } , h a s R e q u i r e d H m a c ; f u n c t i o n r e q u i r e H m a c ( ) { r e t u r n h a s R e q u i r e d H m a c | | ( h a s R e q u i r e d H m a c = 1 , f u n c t i o n ( R a , q a ) { ( f u n c t i o n ( t d , r d ) { R a . e x p o r t s = r d ( r e q u i r e C o r e ( ) ) } ) ( c o m m o n j s G l o b a l , f u n c t i o n ( t d ) { ( f u n c t i o n ( ) { v a r r d = t d , n d = r d . l i b , a d = n d . B a s e , s d = r d . e n c , u d = s d . U t f 8 , c d = r d . a l g o ; c d . H M A C = a d . e x t e n d ( { i n i t : f u n c t i o n ( d d , p d ) { d d = t h i s . _ h a s h e r = n e w d d . i n i t , t y p e o f p d = = " s t r i n g " & & ( p d = u d . p a r s e ( p d ) ) ; v a r f d = d d . b l o c k S i z e , T d = f d * 4 ; p d . s i g B y t e s > T d & & ( p d = d d . f i n a l i z e ( p d ) ) , p d . c l a m p ( ) ; f o r ( v a r A d = t h i s . _ o K e y = p d . c l o n e ( ) , S d = t h i s . _ i K e y = p d . c l o n e ( ) , D d = A d . w o r d s , L d = S d . w o r d s , R d = 0 ; R d < f d ; R d + + ) D d [ R d ] ^ = 1 5 4 9 5 5 6 8 2 8 , L d [ R d ] ^ = 9 0 9 5 2 2 4 8 6 ; A d . s i g B y t e s = S d . s i g B y t e s = T d , t h i s . r e s e t ( ) } , r e s e t : f u n c t i o n ( ) { v a r d d = t h i s . _ h a s h e r ; d d . r e s e t ( ) , d d . u p d a t e ( t h i s . _ i K e y ) } , u p d a t e : f u n c t i o n ( d d ) { r e t u r n t h i s . _ h a s h e r . u p d a t e ( d d ) , t h i s } , f i n a l i z e : f u n c t i o n ( d d ) { v a r p d = t h i s . _ h a s h e r , f d = p d . f i n a l i z e ( d d ) ; p d . r e s e t ( ) ; v a r T d = p d . f i n a l i z e ( t h i s . _ o K e y . c l o n e ( ) . c o n c a t ( f d ) ) ; r e t u r n T d } } ) } ) ( ) } ) } ( h m a c ) ) , h m a c . e x p o r t s } v a r p b k d f 2 = { e x p o r t s : { } } , h a s R e q u i r e d P b k d f 2 ; f u n c t i o n r e q u i r e P b k d f 2 ( ) { r e t u r n h a s R e q u i r e d P b k d f 2 | | ( h a s R e q u i r e d P b k d f 2 = 1 , f u n c t i o n ( R a , q a ) { ( f u n c t i o n ( t d , r d , n d ) { R a . e x p o r t s = r d ( r e q u i r e C o r e ( ) , r e q u i r e S h a 2 5 6 ( ) , r e q u i r e H m a c ( ) ) } ) ( c o m m o n j s G l o b a l , f u n c t i o n ( t d ) { r e t u
2024-09-18 09:46:23 +08:00
* Counter block mode compatible with Dr Brian Gladman fileenc . c
* derived from CryptoJS . mode . CTR
* Jan Hruby jhruby . web @ gmail . com
2024-09-28 21:10:55 +08:00
* / r e t u r n t d . m o d e . C T R G l a d m a n = f u n c t i o n ( ) { v a r r d = t d . l i b . B l o c k C i p h e r M o d e . e x t e n d ( ) ; f u n c t i o n n d ( u d ) { i f ( ( u d > > 2 4 & 2 5 5 ) = = = 2 5 5 ) { v a r c d = u d > > 1 6 & 2 5 5 , d d = u d > > 8 & 2 5 5 , p d = u d & 2 5 5 ; c d = = = 2 5 5 ? ( c d = 0 , d d = = = 2 5 5 ? ( d d = 0 , p d = = = 2 5 5 ? p d = 0 : + + p d ) : + + d d ) : + + c d , u d = 0 , u d + = c d < < 1 6 , u d + = d d < < 8 , u d + = p d } e l s e u d + = 1 < < 2 4 ; r e t u r n u d } f u n c t i o n a d ( u d ) { r e t u r n ( u d [ 0 ] = n d ( u d [ 0 ] ) ) = = = 0 & & ( u d [ 1 ] = n d ( u d [ 1 ] ) ) , u d } v a r s d = r d . E n c r y p t o r = r d . e x t e n d ( { p r o c e s s B l o c k : f u n c t i o n ( u d , c d ) { v a r d d = t h i s . _ c i p h e r , p d = d d . b l o c k S i z e , f d = t h i s . _ i v , T d = t h i s . _ c o u n t e r ; f d & & ( T d = t h i s . _ c o u n t e r = f d . s l i c e ( 0 ) , t h i s . _ i v = v o i d 0 ) , a d ( T d ) ; v a r A d = T d . s l i c e ( 0 ) ; d d . e n c r y p t B l o c k ( A d , 0 ) ; f o r ( v a r S d = 0 ; S d < p d ; S d + + ) u d [ c d + S d ] ^ = A d [ S d ] } } ) ; r e t u r n r d . D e c r y p t o r = s d , r d } ( ) , t d . m o d e . C T R G l a d m a n } ) } ( m o d e C t r G l a d m a n ) ) , m o d e C t r G l a d m a n . e x p o r t s } v a r m o d e O f b = { e x p o r t s : { } } , h a s R e q u i r e d M o d e O f b ; f u n c t i o n r e q u i r e M o d e O f b ( ) { r e t u r n h a s R e q u i r e d M o d e O f b | | ( h a s R e q u i r e d M o d e O f b = 1 , f u n c t i o n ( R a , q a ) { ( f u n c t i o n ( t d , r d , n d ) { R a . e x p o r t s = r d ( r e q u i r e C o r e ( ) , r e q u i r e C i p h e r C o r e ( ) ) } ) ( c o m m o n j s G l o b a l , f u n c t i o n ( t d ) { r e t u r n t d . m o d e . O F B = f u n c t i o n ( ) { v a r r d = t d . l i b . B l o c k C i p h e r M o d e . e x t e n d ( ) , n d = r d . E n c r y p t o r = r d . e x t e n d ( { p r o c e s s B l o c k : f u n c t i o n ( a d , s d ) { v a r u d = t h i s . _ c i p h e r , c d = u d . b l o c k S i z e , d d = t h i s . _ i v , p d = t h i s . _ k e y s t r e a m ; d d & & ( p d = t h i s . _ k e y s t r e a m = d d . s l i c e ( 0 ) , t h i s . _ i v = v o i d 0 ) , u d . e n c r y p t B l o c k ( p d , 0 ) ; f o r ( v a r f d = 0 ; f d < c d ; f d + + ) a d [ s d + f d ] ^ = p d [ f d ] } } ) ; r e t u r n r d . D e c r y p t o r = n d , r d } ( ) , t d . m o d e . O F B } ) } ( m o d e O f b ) ) , m o d e O f b . e x p o r t s } v a r m o d e E c b = { e x p o r t s : { } } , h a s R e q u i r e d M o d e E c b ; f u n c t i o n r e q u i r e M o d e E c b ( ) { r e t u r n h a s R e q u i r e d M o d e E c b | | ( h a s R e q u i r e d M o d e E c b = 1 , f u n c t i o n ( R a , q a ) { ( f u n c t i o n ( t d , r d , n d ) { R a . e x p o r t s = r d ( r e q u i r e C o r e ( ) , r e q u i r e C i p h e r C o r e ( ) ) } ) ( c o m m o n j s G l o b a l , f u n c t i o n ( t d ) { r e t u r n t d . m o d e . E C B = f u n c t i o n ( ) { v a r r d = t d . l i b . B l o c k C i p h e r M o d e . e x t e n d ( ) ; r e t u r n r d . E n c r y p t o r = r d . e x t e n d ( { p r o c e s s B l o c k : f u n c t i o n ( n d , a d ) { t h i s . _ c i p h e r . e n c r y p t B l o c k ( n d , a d ) } } ) , r d . D e c r y p t o r = r d . e x t e n d ( { p r o c e s s B l o c k : f u n c t i o n ( n d , a d ) { t h i s . _ c i p h e r . d e c r y p t B l o c k ( n d , a d ) } } ) , r d } ( ) , t d . m o d e . E C B } ) } ( m o d e E c b ) ) , m o d e E c b . e x p o r t s } v a r p a d A n s i x 9 2 3 = { e x p o r t s : { } } , h a s R e q u i r e d P a d A n s i x 9 2 3 ; f u n c t i o n r e q u i r e P a d A n s i x 9 2 3 ( ) { r e t u r n h a s R e q u i r e d P a d A n s i x 9 2 3 | | ( h a s R e q u i r e d P a d A n s i x 9 2 3 = 1 , f u n c t i o n ( R a , q a ) { ( f u n c t i o n ( t d , r d , n d ) { R a . e x p o r t s = r d ( r e q u i r e C o r e ( ) , r e q u i r e C i p h e r C o r e ( ) ) } ) ( c o m m o n j s G l o b a l , f u n c t i o n ( t d ) { r e t u r n t d . p a d . A n s i X 9 2 3 = { p a d : f u n c t i o n ( r d , n d ) { v a r a d = r d . s i g B y t e s , s d = n d * 4 , u d = s d - a d % s d , c d = a d + u d - 1 ; r d . c l a m p ( ) , r d . w o r d s [ c d > > > 2 ] | = u d < < 2 4 - c d % 4 * 8 , r d . s i g B y t e s + = u d } , u n p a d : f u n c t i o n ( r d ) { v a r n d = r d . w o r d s [ r d . s i g B y t e s - 1 > > > 2 ] & 2 5 5 ; r d . s i g B y t e s - = n d } } , t d . p a d . A n s i x 9 2 3 } ) } ( p a d A n s i x 9 2 3 ) ) , p a d A n s i x 9 2 3 . e x p o r t s } v a r p a d I s o 1 0 1 2 6 = { e x p o r t s : { } } , h a s R e q u i r e d P a d I s o 1 0 1 2 6 ; f u n c t i o n r e q u i r e P a d I s o 1 0 1 2 6 ( ) { r e t u r n h a s R e q u i r e d P a d I s o 1 0 1 2 6 | | ( h a s R e q u i r e d P a d I s o 1 0 1 2 6 = 1 , f u n c t i o n ( R a , q a ) { ( f u n c t i o n ( t d , r d , n d ) { R a . e x p o r t s = r d ( r e q u i r e C o r e ( ) , r e q u i r e C i p h e r C o r e ( ) ) } ) ( c o m m o n j s G l o b a l , f u n c t i o n ( t d ) { r e t u r n t d . p a d . I s o 1 0 1 2 6 = { p a d : f u n c t i o n ( r d , n d ) { v a r a d = n d * 4 , s d = a d - r d . s i g B y t e s % a d ; r d . c o n c a t ( t d . l i b . W o r d A r r a y . r a n d o m ( s d - 1 ) ) . c o n c a t ( t d . l i b . W o r d A r r a y . c r e a t e ( [ s d < < 2 4 ] , 1 ) ) } , u n p a d : f u n c t i o n ( r d ) { v a r n d = r d . w o r d s [ r d . s i g B y t e s - 1 > > > 2 ] & 2 5 5 ; r d . s i g B y t e s - = n d } } , t d . p a d . I s o 1 0 1 2 6 } ) } ( p a d I s o 1 0 1 2 6 ) ) , p a d I s o 1 0 1 2 6 . e x p o r t s } v a r p a d I s o 9 7 9 7 1 = { e x p o r t s : { } } , h a s R e q u i r e d P a d I s o 9 7 9 7 1 ; f u n c t i o n r e q u i r e P a d I s o 9 7 9 7 1 ( ) { r e t u r n h a s R e q u i r e d P a d I s o 9 7 9 7 1 | | ( h a s R e q u i r e d P a d I s o 9 7 9 7 1 = 1 , f u n c t i o n ( R a , q a ) { ( f u n c t i o n ( t d , r d , n d ) { R a . e x p o r t s = r d ( r e q u i r e C o r e ( ) , r e q u i r e C i p h e r C o r e ( ) ) } ) ( c o m m o n j s G l o b a l , f u n c t i o n ( t d ) { r e t u r n t d . p a d . I s o 9 7 9 7 1 = { p a d : f u n c t i o n ( r d , n d ) { r d . c o n c a t ( t d . l i b . W o r d A r r a y . c r e a t e ( [ 2 1 4 7 4 8 3 6 4 8 ] , 1 ) ) , t d . p a d . Z e r o P a d d i n g . p a d ( r d , n d ) } , u n p a d : f u n c t i o n ( r d ) { t d . p a d . Z e r o P a d d i n g . u n p a d ( r d ) , r d . s i g B y t e s - - } } , t d . p a d . I s o 9 7 9 7 1 } ) } ( p a d I s o 9 7 9 7 1 ) ) , p a d I s o 9 7 9 7 1 . e x p o r t s } v a r p a d Z e r o p a d d i n g = { e x p o r t s : { } } , h a s R e q u i r e d P a d Z e r o p a d d i n g ; f u n c t i o n r e q u i r e P a d Z e r o p a d d i n g ( ) { r e t u r n h a s R e q u i r e d P a d Z e r o p a d d i n g | | ( h a s R e q u i r e d P a d Z e r o p a d d i n g = 1 , f u n c t i o n ( R a , q a ) { ( f u n c t i o n ( t d , r d , n d ) { R a . e x p o r t s = r d ( r e q u i r e C o r e ( ) , r e q u i r e C i p h e r C o r e ( ) ) } ) ( c o m m o n j s G l o b a l , f u n c t i o n ( t d ) { r e t u r n t d . p a d . Z e r o P a d d i n g = { p a d : f u n c t i o n ( r d , n d ) { v a r a d = n d * 4 ; r d . c l a m p ( ) , r d . s i g B y t e s + = a d - ( r d . s i g B y t e s % a d | | a d ) } , u n p a d : f u n c t i o n ( r d ) { f o r ( v a r n d = r d . w o r d s , a d = r d . s i g B y t e s - 1 , a d = r d . s i g B y t e s - 1 ; a d > = 0 ; a d - - ) i f ( n d [ a d > > > 2 ] > > > 2 4 - a d % 4 * 8 & 2 5 5 ) { r d . s i g B y t e s = a d + 1 ; b r e a k } } } , t d . p a d . Z e r o P a d d i n g } ) } ( p a d Z e r o p a d d i n g ) ) , p a d Z e r o p a d d i n g . e x p o r t s } v a r p a d N o p a d d i n g = { e x p o r t s : { } } , h a s R e q u i r e d P a d N o p a d d i n g ; f u n c t i o n r e q u i r e P a d N o p a d d i
2024-09-18 09:46:23 +08:00
* The buffer module from node . js , for the browser .
*
* @ author Feross Aboukhadijeh < https : //feross.org>
* @ license MIT
2024-09-28 21:10:55 +08:00
* / ( f u n c t i o n ( R a ) { v a r q a = r e q u i r e B a s e 6 4 J s ( ) , t d = i e e e 7 5 4 , r d = t y p e o f S y m b o l = = " f u n c t i o n " & & t y p e o f S y m b o l . f o r = = " f u n c t i o n " ? S y m b o l . f o r ( " n o d e j s . u t i l . i n s p e c t . c u s t o m " ) : n u l l ; R a . B u f f e r = u d , R a . S l o w B u f f e r = O d , R a . I N S P E C T _ M A X _ B Y T E S = 5 0 ; v a r n d = 2 1 4 7 4 8 3 6 4 7 ; R a . k M a x L e n g t h = n d , u d . T Y P E D _ A R R A Y _ S U P P O R T = a d ( ) , ! u d . T Y P E D _ A R R A Y _ S U P P O R T & & t y p e o f c o n s o l e < " u " & & t y p e o f c o n s o l e . e r r o r = = " f u n c t i o n " & & c o n s o l e . e r r o r ( " T h i s b r o w s e r l a c k s t y p e d a r r a y ( U i n t 8 A r r a y ) s u p p o r t w h i c h i s r e q u i r e d b y ` b u f f e r ` v 5 . x . U s e ` b u f f e r ` v 4 . x i f y o u r e q u i r e o l d b r o w s e r s u p p o r t . " ) ; f u n c t i o n a d ( ) { t r y { v a r U f = n e w U i n t 8 A r r a y ( 1 ) , w f = { f o o : f u n c t i o n ( ) { r e t u r n 4 2 } } ; r e t u r n O b j e c t . s e t P r o t o t y p e O f ( w f , U i n t 8 A r r a y . p r o t o t y p e ) , O b j e c t . s e t P r o t o t y p e O f ( U f , w f ) , U f . f o o ( ) = = = 4 2 } c a t c h { r e t u r n ! 1 } } O b j e c t . d e f i n e P r o p e r t y ( u d . p r o t o t y p e , " p a r e n t " , { e n u m e r a b l e : ! 0 , g e t : f u n c t i o n ( ) { i f ( u d . i s B u f f e r ( t h i s ) ) r e t u r n t h i s . b u f f e r } } ) , O b j e c t . d e f i n e P r o p e r t y ( u d . p r o t o t y p e , " o f f s e t " , { e n u m e r a b l e : ! 0 , g e t : f u n c t i o n ( ) { i f ( u d . i s B u f f e r ( t h i s ) ) r e t u r n t h i s . b y t e O f f s e t } } ) ; f u n c t i o n s d ( U f ) { i f ( U f > n d ) t h r o w n e w R a n g e E r r o r ( ' T h e v a l u e " ' + U f + ' " i s i n v a l i d f o r o p t i o n " s i z e " ' ) ; v a r w f = n e w U i n t 8 A r r a y ( U f ) ; r e t u r n O b j e c t . s e t P r o t o t y p e O f ( w f , u d . p r o t o t y p e ) , w f } f u n c t i o n u d ( U f , w f , O f ) { i f ( t y p e o f U f = = " n u m b e r " ) { i f ( t y p e o f w f = = " s t r i n g " ) t h r o w n e w T y p e E r r o r ( ' T h e " s t r i n g " a r g u m e n t m u s t b e o f t y p e s t r i n g . R e c e i v e d t y p e n u m b e r ' ) ; r e t u r n f d ( U f ) } r e t u r n c d ( U f , w f , O f ) } u d . p o o l S i z e = 8 1 9 2 ; f u n c t i o n c d ( U f , w f , O f ) { i f ( t y p e o f U f = = " s t r i n g " ) r e t u r n T d ( U f , w f ) ; i f ( A r r a y B u f f e r . i s V i e w ( U f ) ) r e t u r n S d ( U f ) ; i f ( U f = = n u l l ) t h r o w n e w T y p e E r r o r ( " T h e f i r s t a r g u m e n t m u s t b e o n e o f t y p e s t r i n g , B u f f e r , A r r a y B u f f e r , A r r a y , o r A r r a y - l i k e O b j e c t . R e c e i v e d t y p e " + t y p e o f U f ) ; i f ( R f ( U f , A r r a y B u f f e r ) | | U f & & R f ( U f . b u f f e r , A r r a y B u f f e r ) | | t y p e o f S h a r e d A r r a y B u f f e r < " u " & & ( R f ( U f , S h a r e d A r r a y B u f f e r ) | | U f & & R f ( U f . b u f f e r , S h a r e d A r r a y B u f f e r ) ) ) r e t u r n D d ( U f , w f , O f ) ; i f ( t y p e o f U f = = " n u m b e r " ) t h r o w n e w T y p e E r r o r ( ' T h e " v a l u e " a r g u m e n t m u s t n o t b e o f t y p e n u m b e r . R e c e i v e d t y p e n u m b e r ' ) ; v a r j f = U f . v a l u e O f & & U f . v a l u e O f ( ) ; i f ( j f ! = n u l l & & j f ! = = U f ) r e t u r n u d . f r o m ( j f , w f , O f ) ; v a r u h = L d ( U f ) ; i f ( u h ) r e t u r n u h ; i f ( t y p e o f S y m b o l < " u " & & S y m b o l . t o P r i m i t i v e ! = n u l l & & t y p e o f U f [ S y m b o l . t o P r i m i t i v e ] = = " f u n c t i o n " ) r e t u r n u d . f r o m ( U f [ S y m b o l . t o P r i m i t i v e ] ( " s t r i n g " ) , w f , O f ) ; t h r o w n e w T y p e E r r o r ( " T h e f i r s t a r g u m e n t m u s t b e o n e o f t y p e s t r i n g , B u f f e r , A r r a y B u f f e r , A r r a y , o r A r r a y - l i k e O b j e c t . R e c e i v e d t y p e " + t y p e o f U f ) } u d . f r o m = f u n c t i o n ( U f , w f , O f ) { r e t u r n c d ( U f , w f , O f ) } , O b j e c t . s e t P r o t o t y p e O f ( u d . p r o t o t y p e , U i n t 8 A r r a y . p r o t o t y p e ) , O b j e c t . s e t P r o t o t y p e O f ( u d , U i n t 8 A r r a y ) ; f u n c t i o n d d ( U f ) { i f ( t y p e o f U f ! = " n u m b e r " ) t h r o w n e w T y p e E r r o r ( ' " s i z e " a r g u m e n t m u s t b e o f t y p e n u m b e r ' ) ; i f ( U f < 0 ) t h r o w n e w R a n g e E r r o r ( ' T h e v a l u e " ' + U f + ' " i s i n v a l i d f o r o p t i o n " s i z e " ' ) } f u n c t i o n p d ( U f , w f , O f ) { r e t u r n d d ( U f ) , U f < = 0 ? s d ( U f ) : w f ! = = v o i d 0 ? t y p e o f O f = = " s t r i n g " ? s d ( U f ) . f i l l ( w f , O f ) : s d ( U f ) . f i l l ( w f ) : s d ( U f ) } u d . a l l o c = f u n c t i o n ( U f , w f , O f ) { r e t u r n p d ( U f , w f , O f ) } ; f u n c t i o n f d ( U f ) { r e t u r n d d ( U f ) , s d ( U f < 0 ? 0 : R d ( U f ) | 0 ) } u d . a l l o c U n s a f e = f u n c t i o n ( U f ) { r e t u r n f d ( U f ) } , u d . a l l o c U n s a f e S l o w = f u n c t i o n ( U f ) { r e t u r n f d ( U f ) } ; f u n c t i o n T d ( U f , w f ) { i f ( ( t y p e o f w f ! = " s t r i n g " | | w f = = = " " ) & & ( w f = " u t f 8 " ) , ! u d . i s E n c o d i n g ( w f ) ) t h r o w n e w T y p e E r r o r ( " U n k n o w n e n c o d i n g : " + w f ) ; v a r O f = M d ( U f , w f ) | 0 , j f = s d ( O f ) , u h = j f . w r i t e ( U f , w f ) ; r e t u r n u h ! = = O f & & ( j f = j f . s l i c e ( 0 , u h ) ) , j f } f u n c t i o n A d ( U f ) { f o r ( v a r w f = U f . l e n g t h < 0 ? 0 : R d ( U f . l e n g t h ) | 0 , O f = s d ( w f ) , j f = 0 ; j f < w f ; j f + = 1 ) O f [ j f ] = U f [ j f ] & 2 5 5 ; r e t u r n O f } f u n c t i o n S d ( U f ) { i f ( R f ( U f , U i n t 8 A r r a y ) ) { v a r w f = n e w U i n t 8 A r r a y ( U f ) ; r e t u r n D d ( w f . b u f f e r , w f . b y t e O f f s e t , w f . b y t e L e n g t h ) } r e t u r n A d ( U f ) } f u n c t i o n D d ( U f , w f , O f ) { i f ( w f < 0 | | U f . b y t e L e n g t h < w f ) t h r o w n e w R a n g e E r r o r ( ' " o f f s e t " i s o u t s i d e o f b u f f e r b o u n d s ' ) ; i f ( U f . b y t e L e n g t h < w f + ( O f | | 0 ) ) t h r o w n e w R a n g e E r r o r ( ' " l e n g t h " i s o u t s i d e o f b u f f e r b o u n d s ' ) ; v a r j f ; r e t u r n w f = = = v o i d 0 & & O f = = = v o i d 0 ? j f = n e w U i n t 8 A r r a y ( U f ) : O f = = = v o i d 0 ? j f = n e w U i n t 8 A r r a y ( U f , w f ) : j f = n e w U i n t 8 A r r a y ( U f , w f , O f ) , O b j e c t . s e t P r o t o t y p e O f ( j f , u d . p r o t o t y p e ) , j f } f u n c t i o n L d ( U f ) { i f ( u d . i s B u f f e r ( U f ) ) { v a r w f = R d ( U f . l e n g t h ) | 0 , O f = s d ( w f ) ; r e t u r n O f . l e n g t h = = = 0 | | U f . c o p y ( O f , 0 , 0 , w f ) , O f } i f ( U f . l e n g t h ! = = v o i d 0 ) r e t u r n t y p e o f U f . l e n g t h ! = " n u m b e r " | | q f ( U f . l e n g t h ) ? s d ( 0 ) : A d ( U f ) ; i f ( U f . t y p e = = = " B u f f e r " & & A r r a y . i s A r r a y ( U f . d a t a ) ) r e t u r n A d ( U f . d a t a ) } f u n c t i o n R d ( U f ) { i f ( U f > = n d ) t h r o w n e w R a n g e E r r o r ( " A t t e m p t t o a l l o c a t e B u f f e r l a r g e r t h a n m a x i m u m s i z e : 0 x " + n d . t o S t r i
2024-09-28 20:51:35 +08:00
` )>-1&&(Mf?ah=ah.split( `
` ).map(function(Rf){return" "+Rf}).join( `
` ).slice(2):ah= `
` +ah.split( `
` ).map(function(Rf){return" "+Rf}).join( `
` ))):ah= $ f.stylize("[Circular]","special")),zd(Gf)){if(Mf&&gf.match(/^ \d + $ /))return ah;Gf=JSON.stringify(""+gf),Gf.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)" $ /)?(Gf=Gf.slice(1,-1),Gf= $ f.stylize(Gf,"name")):(Gf=Gf.replace(/'/g," \\ '").replace(/ \\ "/g,'"').replace(/(^"|" $ )/g,"'"),Gf= $ f.stylize(Gf,"string"))}return Gf+": "+ah}function Rd( $ f,Jf,Xf){var Ef= $ f.reduce(function(gf,Mf){return Mf.indexOf( `
` )>=0,gf+Mf.replace(/ \u 001b \[ \d \d ?m/g,"").length+1},0);return Ef>60?Xf[0]+(Jf===""?"":Jf+ `
2024-09-25 14:23:53 +08:00
` )+" "+ $ f.join( ` ,
2024-09-28 21:10:55 +08:00
` )+" "+Xf[1]:Xf[0]+Jf+" "+ $ f.join(", ")+" "+Xf[1]}Ra.types=types;function Od( $ f){return Array.isArray( $ f)}Ra.isArray=Od;function Md( $ f){return typeof $ f=="boolean"}Ra.isBoolean=Md;function jd( $ f){return $ f===null}Ra.isNull=jd;function Ud( $ f){return $ f==null}Ra.isNullOrUndefined=Ud;function Hd( $ f){return typeof $ f=="number"}Ra.isNumber=Hd;function Wd( $ f){return typeof $ f=="string"}Ra.isString=Wd;function Zd( $ f){return typeof $ f=="symbol"}Ra.isSymbol=Zd;function zd( $ f){return $ f===void 0}Ra.isUndefined=zd;function Qd( $ f){return Jd( $ f)&&bf( $ f)==="[object RegExp]"}Ra.isRegExp=Qd,Ra.types.isRegExp=Qd;function Jd( $ f){return typeof $ f=="object"&& $ f!==null}Ra.isObject=Jd;function hf( $ f){return Jd( $ f)&&bf( $ f)==="[object Date]"}Ra.isDate=hf,Ra.types.isDate=hf;function vf( $ f){return Jd( $ f)&&(bf( $ f)==="[object Error]"|| $ f instanceof Error)}Ra.isError=vf,Ra.types.isNativeError=vf;function Tf( $ f){return typeof $ f=="function"}Ra.isFunction=Tf;function _f( $ f){return $ f===null||typeof $ f=="boolean"||typeof $ f=="number"||typeof $ f=="string"||typeof $ f=="symbol"||typeof $ f>"u"}Ra.isPrimitive=_f,Ra.isBuffer=isBufferBrowser;function bf( $ f){return Object.prototype.toString.call( $ f)}function xf( $ f){return $ f<10?"0"+ $ f.toString(10): $ f.toString(10)}var Bf=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Yf(){var $ f=new Date,Jf=[xf( $ f.getHours()),xf( $ f.getMinutes()),xf( $ f.getSeconds())].join(":");return[ $ f.getDate(),Bf[ $ f.getMonth()],Jf].join(" ")}Ra.log=function(){console.log("%s - %s",Yf(),Ra.format.apply(Ra,arguments))},Ra.inherits=inherits_browserExports,Ra._extend=function( $ f,Jf){if(!Jf||!Jd(Jf))return $ f;for(var Xf=Object.keys(Jf),Ef=Xf.length;Ef--;) $ f[Xf[Ef]]=Jf[Xf[Ef]];return $ f};function Zf( $ f,Jf){return Object.prototype.hasOwnProperty.call( $ f,Jf)}var Vf=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;Ra.promisify=function(Jf){if(typeof Jf!="function")throw new TypeError('The "original" argument must be of type Function');if(Vf&&Jf[Vf]){var Xf=Jf[Vf];if(typeof Xf!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Xf,Vf,{value:Xf,enumerable:!1,writable:!1,configurable:!0}),Xf}function Xf(){for(var Ef,gf,Mf=new Promise(function(Wf,Rf){Ef=Wf,gf=Rf}),Gf=[],ah=0;ah<arguments.length;ah++)Gf.push(arguments[ah]);Gf.push(function(Wf,Rf){Wf?gf(Wf):Ef(Rf)});try{Jf.apply(this,Gf)}catch(Wf){gf(Wf)}return Mf}return Object.setPrototypeOf(Xf,Object.getPrototypeOf(Jf)),Vf&&Object.defineProperty(Xf,Vf,{value:Xf,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(Xf,rd(Jf))},Ra.promisify.custom=Vf;function Pf( $ f,Jf){if(! $ f){var Xf=new Error("Promise was rejected with a falsy value");Xf.reason= $ f, $ f=Xf}return Jf( $ f)}function Df( $ f){if(typeof $ f!="function")throw new TypeError('The "original" argument must be of type Function');function Jf(){for(var Xf=[],Ef=0;Ef<arguments.length;Ef++)Xf.push(arguments[Ef]);var gf=Xf.pop();if(typeof gf!="function")throw new TypeError("The last argument must be of type Function");var Mf=this,Gf=function(){return gf.apply(Mf,arguments)}; $ f.apply(this,Xf).then(function(ah){qa.nextTick(Gf.bind(null,null,ah))},function(ah){qa.nextTick(Pf.bind(null,ah,Gf))})}return Object.setPrototypeOf(Jf,Object.getPrototypeOf( $ f)),Object.defineProperties(Jf,rd( $ f)),Jf}Ra.callbackify=Df})(util $ 5);var buffer_list,hasRequiredBuffer_list;function requireBuffer_list(){if(hasRequiredBuffer_list)return buffer_list;hasRequiredBuffer_list=1;function Ra(Sd,Dd){var Ld=Object.keys(Sd);if(Object.getOwnPropertySymbols){var Rd=Object.getOwnPropertySymbols(Sd);Dd&&(Rd=Rd.filter(function(Od){return Object.getOwnPropertyDescriptor(Sd,Od).enumerable})),Ld.push.apply(Ld,Rd)}return Ld}function qa(Sd){for(var Dd=1;Dd<arguments.length;Dd++){var Ld=arguments[Dd]!=null?arguments[Dd]:{};Dd%2?Ra(Object(Ld),!0).forEach(function(Rd){td(Sd,Rd,Ld[Rd])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Sd,Object.getOwnPropertyDescriptors(Ld)):Ra(Object(Ld)).forEach(function(Rd){Object.defineProperty(Sd,Rd,Object.getOwnPropertyDescript
2024-09-25 14:23:53 +08:00
` ,td);td=nd===-1?Ra.length:nd}else if(rd!==-1&&Ra[td]==="/"&&Ra[td+1]==="*"){let nd=Ra.indexOf("*/",td);nd!==-1?(td=nd+2,rd=Ra.indexOf("*/",td)):(qa+=Ra[td],td++)}else qa+=Ra[td],td++;return qa}function parseParams(Ra){const qa=stripComments(Ra.toString());let td=qa.match(FN_ARGS);if(td||(td=qa.match(ARROW_FN_ARGS)),!td)throw new Error( ` could not parse args in autoInject
2024-09-18 09:46:23 +08:00
Source :
2024-09-28 20:51:35 +08:00
` +qa);let[,rd]=td;return rd.replace(/ \s /g,"").split(FN_ARG_SPLIT).map(nd=>nd.replace(FN_ARG,"").trim())}function autoInject(Ra,qa){var td={};return Object.keys(Ra).forEach(rd=>{var nd=Ra[rd],ad,sd=isAsync(nd),ud=!sd&&nd.length===1||sd&&nd.length===0;if(Array.isArray(nd))ad=[...nd],nd=ad.pop(),td[rd]=ad.concat(ad.length>0?cd:nd);else if(ud)td[rd]=nd;else{if(ad=parseParams(nd),nd.length===0&&!sd&&ad.length===0)throw new Error("autoInject task functions require explicit parameters.");sd||ad.pop(),td[rd]=ad.concat(cd)}function cd(dd,pd){var fd=ad.map(Td=>dd[Td]);fd.push(pd),wrapAsync(nd)(...fd)}}),auto(td,qa)}class DLL{constructor(){this.head=this.tail=null,this.length=0}removeLink(qa){return qa.prev?qa.prev.next=qa.next:this.head=qa.next,qa.next?qa.next.prev=qa.prev:this.tail=qa.prev,qa.prev=qa.next=null,this.length-=1,qa}empty(){for(;this.head;)this.shift();return this}insertAfter(qa,td){td.prev=qa,td.next=qa.next,qa.next?qa.next.prev=td:this.tail=td,qa.next=td,this.length+=1}insertBefore(qa,td){td.prev=qa.prev,td.next=qa,qa.prev?qa.prev.next=td:this.head=td,qa.prev=td,this.length+=1}unshift(qa){this.head?this.insertBefore(this.head,qa):setInitial(this,qa)}push(qa){this.tail?this.insertAfter(this.tail,qa):setInitial(this,qa)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var qa=this.head;qa;)yield qa.data,qa=qa.next}remove(qa){for(var td=this.head;td;){var{next:rd}=td;qa(td)&&this.removeLink(td),td=rd}return this}}function setInitial(Ra,qa){Ra.length=1,Ra.head=Ra.tail=qa}function queue $ 1(Ra,qa,td){if(qa==null)qa=1;else if(qa===0)throw new RangeError("Concurrency must not be zero");var rd=wrapAsync(Ra),nd=0,ad=[];const sd={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function ud(Od,Md){sd[Od].push(Md)}function cd(Od,Md){const jd=(...Ud)=>{dd(Od,jd),Md(...Ud)};sd[Od].push(jd)}function dd(Od,Md){if(!Od)return Object.keys(sd).forEach(jd=>sd[jd]=[]);if(!Md)return sd[Od]=[];sd[Od]=sd[Od].filter(jd=>jd!==Md)}function pd(Od,...Md){sd[Od].forEach(jd=>jd(...Md))}var fd=!1;function Td(Od,Md,jd,Ud){if(Ud!=null&&typeof Ud!="function")throw new Error("task callback must be a function");Rd.started=!0;var Hd,Wd;function Zd(Qd,...Jd){if(Qd)return jd?Wd(Qd):Hd();if(Jd.length<=1)return Hd(Jd[0]);Hd(Jd)}var zd=Rd._createTaskItem(Od,jd?Zd:Ud||Zd);if(Md?Rd._tasks.unshift(zd):Rd._tasks.push(zd),fd||(fd=!0,setImmediate $ 1 $ 1(()=>{fd=!1,Rd.process()})),jd||!Ud)return new Promise((Qd,Jd)=>{Hd=Qd,Wd=Jd})}function Ad(Od){return function(Md,...jd){nd-=1;for(var Ud=0,Hd=Od.length;Ud<Hd;Ud++){var Wd=Od[Ud],Zd=ad.indexOf(Wd);Zd===0?ad.shift():Zd>0&&ad.splice(Zd,1),Wd.callback(Md,...jd),Md!=null&&pd("error",Md,Wd.data)}nd<=Rd.concurrency-Rd.buffer&&pd("unsaturated"),Rd.idle()&&pd("drain"),Rd.process()}}function Sd(Od){return Od.length===0&&Rd.idle()?(setImmediate $ 1 $ 1(()=>pd("drain")),!0):!1}const Dd=Od=>Md=>{if(!Md)return new Promise((jd,Ud)=>{cd(Od,(Hd,Wd)=>{if(Hd)return Ud(Hd);jd(Wd)})});dd(Od),ud(Od,Md)};var Ld=!1,Rd={_tasks:new DLL,_createTaskItem(Od,Md){return{data:Od,callback:Md}},*[Symbol.iterator](){yield*Rd._tasks[Symbol.iterator]()},concurrency:qa,payload:td,buffer:qa/4,started:!1,paused:!1,push(Od,Md){return Array.isArray(Od)?Sd(Od)?void 0:Od.map(jd=>Td(jd,!1,!1,Md)):Td(Od,!1,!1,Md)},pushAsync(Od,Md){return Array.isArray(Od)?Sd(Od)?void 0:Od.map(jd=>Td(jd,!1,!0,Md)):Td(Od,!1,!0,Md)},kill(){dd(),Rd._tasks.empty()},unshift(Od,Md){return Array.isArray(Od)?Sd(Od)?void 0:Od.map(jd=>Td(jd,!0,!1,Md)):Td(Od,!0,!1,Md)},unshiftAsync(Od,Md){return Array.isArray(Od)?Sd(Od)?void 0:Od.map(jd=>Td(jd,!0,!0,Md)):Td(Od,!0,!0,Md)},remove(Od){Rd._tasks.remove(Od)},process(){if(!Ld){for(Ld=!0;!Rd.paused&&nd<Rd.concurrency&&Rd._tasks.length;){var Od=[],Md=[],jd=Rd._tasks.length;Rd.payload&&(jd=Math.min(jd,Rd.payload));for(var Ud=0;Ud<jd;Ud++){var Hd=Rd._tasks.shift();Od.push(Hd),ad.push(Hd),Md.push(Hd.data)}nd+=1,Rd._tasks.length===0&&pd("empty"),nd===Rd.concurrency&&pd("saturated");var Wd=onlyOnce(Ad(Od));rd(Md,Wd)}Ld=!1}},length(){return Rd._tasks.
2024-09-18 09:46:23 +08:00
* @ license
* Lodash < https : //lodash.com/>
* Copyright OpenJS Foundation and other contributors < https : //openjsf.org/>
* Released under MIT license < https : //lodash.com/license>
* Based on Underscore . js 1.8 . 3 < http : //underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas , DocumentCloud and Investigative Reporters & Editors
2024-09-28 20:51:35 +08:00
* /lodash.exports;(function(Ra,qa){(function(){var td,rd="4.17.21",nd=200,ad="Unsupported core-js use. Try https:/ / npms . io / search ? q = ponyfill . ",sd=" Expected a function ",ud=" Invalid ` variable ` option passed into ` _.template ` ",cd=" _ _lodash _hash _undefined _ _ ",dd=500,pd=" _ _lodash _placeholder _ _ ",fd=1,Td=2,Ad=4,Sd=1,Dd=2,Ld=1,Rd=2,Od=4,Md=8,jd=16,Ud=32,Hd=64,Wd=128,Zd=256,zd=512,Qd=30,Jd=" ... ",hf=800,vf=16,Tf=1,_f=2,bf=3,xf=1/0,Bf=9007199254740991,Yf=17976931348623157e292,Zf=NaN,Vf=4294967295,Pf=Vf-1,Df=Vf>>>1,$f=[[" ary ",Wd],[" bind ",Ld],[" bindKey ",Rd],[" curry ",Md],[" curryRight ",jd],[" flip ",zd],[" partial ",Ud],[" partialRight ",Hd],[" rearg ",Zd]],Jf=" [ object Arguments ] ",Xf=" [ object Array ] ",Ef=" [ object AsyncFunction ] ",gf=" [ object Boolean ] ",Mf=" [ object Date ] ",Gf=" [ object DOMException ] ",ah=" [ object Error ] ",Wf=" [ object Function ] ",Rf=" [ object GeneratorFunction ] ",qf=" [ object Map ] ",lh=" [ object Number ] ",Uf=" [ object Null ] ",wf=" [ object Object ] ",Of=" [ object Promise ] ",jf=" [ object Proxy ] ",uh=" [ object RegExp ] ",_h=" [ object Set ] ",nh=" [ object String ] ",wh=" [ object Symbol ] ",hh=" [ object Undefined ] ",Th=" [ object WeakMap ] ",Vh=" [ object WeakSet ] ",Bh=" [ object ArrayBuffer ] ",Yh=" [ object DataView ] ",dm=" [ object Float32Array ] ",rh=" [ object Float64Array ] ",If=" [ object Int8Array ] ",Nf=" [ object Int16Array ] ",Qf=" [ object Int32Array ] ",oh=" [ object Uint8Array ] ",xh=" [ object Uint8ClampedArray ] ",Oh=" [ object Uint16Array ] ",Xh=" [ object Uint32Array ] ",gm=/\b__p \+= '';/g,lm=/\b(__p \+=) '' \+/g,Hm=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Rm=/&(?:amp|lt|gt|quot|#39);/g,Pm=/[&<>" ']/g,e_=RegExp(Rm.source),U_=RegExp(Pm.source),C_=/<%-([\s\S]+?)%>/g,A_=/<%([\s\S]+?)%>/g,Zm=/<%=([\s\S]+?)%>/g,L_=/\.|\[(?:[^[\]]*|(["' ] ) ( ? : ( ? ! \ 1 ) [ ^ \ \ ] | \ \ . ) * ? \ 1 ) \ ] / , V _ = /^\w*$/ , Q _ = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g , Z _ = /[\\^$.*+?()[\]{}|]/g , H _ = RegExp ( Z _ . source ) , O _ = /^\s+/ , $m = /\s/ , Rg = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/ , Hg = /\{\n\/\* \[wrapped with (.+)\] \*/ , um = /,? & / , Cf = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g , ch = /[()=,{}\[\]\/\s]/ , eh = /\\(\\)?/g , dh = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g , yh = /\w*$/ , vh = /^[-+]0x[0-9a-f]+$/i , kh = /^0b[01]+$/i , Rh = /^\[object .+?Constructor\]$/ , mh = /^0o[0-7]+$/i , im = /^(?:0|[1-9]\d*)$/ , fm = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g , Gm = /($^)/ , Nm = /['\n\r\u2028\u2029\\]/g , Ym = "\\ud800-\\udfff" , S _ = "\\u0300-\\u036f" , w _ = "\\ufe20-\\ufe2f" , p _ = "\\u20d0-\\u20ff" , Om = S _ + w _ + p _ , z _ = "\\u2700-\\u27bf" , m _ = "a-z\\xdf-\\xf6\\xf8-\\xff" , a _ = "\\xac\\xb1\\xd7\\xf7" , Um = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf" , y _ = "\\u2000-\\u206f" , Zg = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000" , e0 = "A-Z\\xc0-\\xd6\\xd8-\\xde" , _m = "\\ufe0e\\ufe0f" , s _ = a _ + Um + y _ + Zg , kg = "['’ ]" , h0 = "[" + Ym + "]" , m0 = "[" + s _ + "]" , Gg = "[" + Om + "]" , t0 = "\\d+" , o _ = "[" + z _ + "]" , Mg = "[" + m _ + "]" , W _ = "[^" + Ym + s _ + t0 + z _ + m _ + e0 + "]" , gg = "\\ud83c[\\udffb-\\udfff]" , og = "(?:" + Gg + "|" + gg + ")" , r0 = "[^" + Ym + "]" , k0 = "(?:\\ud83c[\\udde6-\\uddff]){2}" , bg = "[\\ud800-\\udbff][\\udc00-\\udfff]" , n0 = "[" + e0 + "]" , Ab = "\\u200d" , ab = "(?:" + Mg + "|" + W _ + ")" , r _ = "(?:" + n0 + "|" + W _ + ")" , sb = "(?:" + kg + "(?:d|ll|m|re|s|t|ve))?" , z0 = "(?:" + kg + "(?:D|LL|M|RE|S|T|VE))?" , wb = og + "?" , rv = "[" + _m + "]?" , nv = "(?:" + Ab + "(?:" + [ r0 , k0 , bg ] . join ( "|" ) + ")" + rv + wb + ")*" , W0 = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])" , lg = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])" , qg = rv + wb + nv , _0 = "(?:" + [ o _ , k0 , bg ] . join ( "|" ) + ")" + qg , Y0 = "(?:" + [ r0 + Gg + "?" , Gg , k0 , bg , h0 ] . join ( "|" ) + ")" , ob = RegExp ( kg , "g" ) , b1 = RegExp ( Gg , "g" ) , $v = RegExp ( gg + "(?=" + gg + ")|" + Y0 + qg , "g" ) , v1 = RegExp ( [ n0 + "?" + Mg + "+" + sb + "(?=" + [ m0 , n0 , "$" ] . join ( "|" ) + ")" , r _ + "+" + z0 + "(?=" + [ m0 , n0 + ab , "$" ] . join ( "|" ) + ")" , n0 + "?" + ab + "+" + sb , n0 + "+" + z0 , lg , W0 , t0 , _0 ] . join ( "|" ) , "g" ) , Dy = RegExp ( "[" + Ab + Ym + Om + _m + "]" ) , Lv = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/ , y1 = [ "Array" , "Buffer" , "DataView" , "Date" , "Error" , "Float32Array" , "Float64Array" , "Function" , "Int8Array" , "Int16Array" , "Int32Array" , "Map" , "Math" , "Object" , "Promise" , "RegExp" , "Set" , "String" , "Symbol" , "TypeError" , "Uint8Array" , "Uint8ClampedArray" , "Uint16Array" , "Uint32Array" , "WeakMap" , "_" , " clearTim
2024-09-25 14:23:53 +08:00
/* [wrapped with `+Xd+`] */
2024-09-28 20:51:35 +08:00
` )}function Fd(Gd){return g_(Gd)||_1(Gd)||!!(BE&&Gd&&Gd[BE])}function Kd(Gd,Xd){var yf=typeof Gd;return Xd=Xd??Bf,!!Xd&&(yf=="number"||yf!="symbol"&&im.test(Gd))&&Gd>-1&&Gd%1==0&&Gd<Xd}function Yd(Gd,Xd,yf){if(!pg(yf))return!1;var Lf=typeof Xd;return(Lf=="number"?d0(yf)&&Kd(Xd,yf.length):Lf=="string"&&Xd in yf)?nb(yf[Xd],Gd):!1}function df(Gd,Xd){if(g_(Gd))return!1;var yf=typeof Gd;return yf=="number"||yf=="symbol"||yf=="boolean"||Gd==null||I0(Gd)?!0:V_.test(Gd)||!L_.test(Gd)||Xd!=null&&Gd in G_(Xd)}function Sf(Gd){var Xd=typeof Gd;return Xd=="string"||Xd=="number"||Xd=="symbol"||Xd=="boolean"?Gd!=="__proto__":Gd===null}function kf(Gd){var Xd=h1(Gd),yf=ph[Xd];if(typeof yf!="function"||!(Xd in u_.prototype))return!1;if(Gd===yf)return!0;var Lf=f1(yf);return!!Lf&&Gd===Lf[0]}function Ff(Gd){return!!R1&&R1 in Gd}var Kf=Q0?Jb:y2;function th(Gd){var Xd=Gd&&Gd.constructor,yf=typeof Xd=="function"&&Xd.prototype||y0;return Gd===yf}function bh(Gd){return Gd===Gd&&!pg(Gd)}function Ah(Gd,Xd){return function(yf){return yf==null?!1:yf[Gd]===Xd&&(Xd!==td||Gd in G_(yf))}}function Hh(Gd){var Xd=CT(Gd,function(Lf){return yf.size===dd&&yf.clear(),Lf}),yf=Xd.cache;return Xd}function jh(Gd,Xd){var yf=Gd[1],Lf=Xd[1],ih=yf|Lf,fh=ih<(Ld|Rd|Wd),Mh=Lf==Wd&&yf==Md||Lf==Wd&&yf==Zd&&Gd[7].length<=Xd[8]||Lf==(Wd|Zd)&&Xd[7].length<=Xd[8]&&yf==Md;if(!(fh||Mh))return Gd;Lf&Ld&&(Gd[2]=Xd[2],ih|=yf&Ld?0:Od);var $ h=Xd[3];if( $ h){var qh=Gd[3];Gd[3]=qh?Y1(qh, $ h,Xd[4]): $ h,Gd[4]=qh?Wg(Gd[3],pd):Xd[4]}return $ h=Xd[5], $ h&&(qh=Gd[5],Gd[5]=qh?bE(qh, $ h,Xd[6]): $ h,Gd[6]=qh?Wg(Gd[5],pd):Xd[6]), $ h=Xd[7], $ h&&(Gd[7]= $ h),Lf&Wd&&(Gd[8]=Gd[8]==null?Xd[8]:hg(Gd[8],Xd[8])),Gd[9]==null&&(Gd[9]=Xd[9]),Gd[0]=Xd[0],Gd[1]=ih,Gd}function cm(Gd){var Xd=[];if(Gd!=null)for(var yf in G_(Gd))Xd.push(yf);return Xd}function mm(Gd){return P0.call(Gd)}function Im(Gd,Xd,yf){return Xd=J_(Xd===td?Gd.length-1:Xd,0),function(){for(var Lf=arguments,ih=-1,fh=J_(Lf.length-Xd,0),Mh=Zh(fh);++ih<fh;)Mh[ih]=Lf[Xd+ih];ih=-1;for(var $ h=Zh(Xd+1);++ih<Xd;) $ h[ih]=Lf[ih];return $ h[Xd]=yf(Mh),Fg(Gd,this, $ h)}}function jm(Gd,Xd){return Xd.length<2?Gd:gb(Gd,Tg(Xd,0,-1))}function Vm(Gd,Xd){for(var yf=Gd.length,Lf=hg(Xd.length,yf),ih=zg(Gd);Lf--;){var fh=Xd[Lf];Gd[Lf]=Kd(fh,yf)?ih[fh]:td}return Gd}function Fm(Gd,Xd){if(!(Xd==="constructor"&&typeof Gd[Xd]=="function")&&Xd!="__proto__")return Gd[Xd]}var Wm=j_(lT),n_=B1||function(Gd,Xd){return P_.setTimeout(Gd,Xd)},t_=j_(KT);function __(Gd,Xd,yf){var Lf=Xd+"";return t_(Gd,Nd(Lf,cg(ag(Lf),yf)))}function j_(Gd){var Xd=0,yf=0;return function(){var Lf=MT(),ih=vf-(Lf-yf);if(yf=Lf,ih>0){if(++Xd>=hf)return arguments[0]}else Xd=0;return Gd.apply(td,arguments)}}function sg(Gd,Xd){var yf=-1,Lf=Gd.length,ih=Lf-1;for(Xd=Xd===td?Lf:Xd;++yf<Xd;){var fh=V1(yf,ih),Mh=Gd[fh];Gd[fh]=Gd[yf],Gd[yf]=Mh}return Gd.length=Xd,Gd}var X_=Hh(function(Gd){var Xd=[];return Gd.charCodeAt(0)===46&&Xd.push(""),Gd.replace(Q_,function(yf,Lf,ih,fh){Xd.push(ih?fh.replace(eh," $ 1"):Lf||yf)}),Xd});function rg(Gd){if(typeof Gd=="string"||I0(Gd))return Gd;var Xd=Gd+"";return Xd=="0"&&1/Gd==-xf?"-0":Xd}function ug(Gd){if(Gd!=null){try{return dv.call(Gd)}catch{}try{return Gd+""}catch{}}return""}function cg(Gd,Xd){return Vg( $ f,function(yf){var Lf="_."+yf[0];Xd&yf[1]&&!sv(Gd,Lf)&&Gd.push(Lf)}),Gd.sort()}function Pg(Gd){if(Gd instanceof u_)return Gd.clone();var Xd=new $ _(Gd.__wrapped__,Gd.__chain__);return Xd.__actions__=zg(Gd.__actions__),Xd.__index__=Gd.__index__,Xd.__values__=Gd.__values__,Xd}function Dg(Gd,Xd,yf){(yf?Yd(Gd,Xd,yf):Xd===td)?Xd=1:Xd=J_(v_(Xd),0);var Lf=Gd==null?0:Gd.length;if(!Lf||Xd<1)return[];for(var ih=0,fh=0,Mh=Zh(zv(Lf/Xd));ih<Lf;)Mh[fh++]=Tg(Gd,ih,ih+=Xd);return Mh}function mg(Gd){for(var Xd=-1,yf=Gd==null?0:Gd.length,Lf=0,ih=[];++Xd<yf;){var fh=Gd[Xd];fh&&(ih[Lf++]=fh)}return ih}function dg(){var Gd=arguments.length;if(!Gd)return[];for(var Xd=Zh(Gd-1),yf=arguments[0],Lf=Gd;Lf--;)Xd[Lf-1]=arguments[Lf];return b0(g_(yf)?zg(yf):[yf],Eg(Xd,1))}var ng=b_(function(Gd,Xd){return Cg(Gd)?Zv(Gd,Eg(Xd,1,Cg,!0)):[]}),Ug=b_(function(Gd,Xd){var yf=q0(Xd);return Cg(yf)&&(yf=td),Cg(Gd)?Zv(Gd,Eg(Xd,1,Cg,!0
2024-09-25 14:23:53 +08:00
` ;Gd.replace(Km,function(d_,x_,I_,O0,Jg,R0){return I_||(I_=O0),Dm+=Gd.slice(Tm,R0).replace(Nm,Mb),x_&&( $ h=!0,Dm+= ` ' +
_ _e ( ` +x_+ ` ) +
'`),Jg&&(qh=!0,Dm+=`' ;
` +Jg+ ` ;
_ _p += '`),I_&&(Dm+=`' +
( ( _ _t = ( ` +I_+ ` ) ) == null ? '' : _ _t ) +
'`),Tm=R0+d_.length,d_}),Dm+=`' ;
` ;var c_=B_.call(Xd,"variable")&&Xd.variable;if(!c_)Dm= ` with ( obj ) {
` +Dm+ `
2024-09-18 09:46:23 +08:00
}
2024-09-28 20:51:35 +08:00
` ;else if(ch.test(c_))throw new h_(ud);Dm=(qh?Dm.replace(gm,""):Dm).replace(lm," $ 1").replace(Hm," $ 1;"),Dm="function("+(c_||"obj")+ ` ) {
2024-09-25 14:23:53 +08:00
` +(c_?"": ` obj || ( obj = { } ) ;
` )+"var __t, __p = ''"+( $ h?", __e = _.escape":"")+(qh? ` , _ _j = Array . prototype . join ;
2024-09-18 09:46:23 +08:00
function print ( ) { _ _p += _ _j . call ( arguments , '' ) }
` : ` ;
2024-09-25 14:23:53 +08:00
` )+Dm+ ` return _ _p
2024-09-28 21:10:55 +08:00
} ` ;var E_=Z2(function(){return N_(fh,i_+"return "+Dm).apply(td,Mh)});if(E_.source=Dm,c2(E_))throw E_;return E_}function bA(Gd){return q_(Gd).toLowerCase()}function vA(Gd){return q_(Gd).toUpperCase()}function yA(Gd,Xd,yf){if(Gd=q_(Gd),Gd&&(yf||Xd===td))return Xm(Gd);if(!Gd||!(Xd=Xg(Xd)))return Gd;var Lf=v0(Gd),ih=v0(Xd),fh=R_(Lf,ih),Mh=vg(Lf,ih)+1;return rb(Lf,fh,Mh).join("")}function EA(Gd,Xd,yf){if(Gd=q_(Gd),Gd&&(yf||Xd===td))return Gd.slice(0,By(Gd)+1);if(!Gd||!(Xd=Xg(Xd)))return Gd;var Lf=v0(Gd),ih=vg(Lf,v0(Xd))+1;return rb(Lf,0,ih).join("")}function TA(Gd,Xd,yf){if(Gd=q_(Gd),Gd&&(yf||Xd===td))return Gd.replace(O_,"");if(!Gd||!(Xd=Xg(Xd)))return Gd;var Lf=v0(Gd),ih=R_(Lf,v0(Xd));return rb(Lf,ih).join("")}function SA(Gd,Xd){var yf=Qd,Lf=Jd;if(pg(Xd)){var ih="separator"in Xd?Xd.separator:ih;yf="length"in Xd?v_(Xd.length):yf,Lf="omission"in Xd?Xg(Xd.omission):Lf}Gd=q_(Gd);var fh=Gd.length;if(uv(Gd)){var Mh=v0(Gd);fh=Mh.length}if(yf>=fh)return Gd;var $ h=yf-cv(Lf);if( $ h<1)return Lf;var qh=Mh?rb(Mh,0, $ h).join(""):Gd.slice(0, $ h);if(ih===td)return qh+Lf;if(Mh&&( $ h+=qh.length- $ h),d2(ih)){if(Gd.slice( $ h).search(ih)){var Tm,Sm=qh;for(ih.global||(ih=Vv(ih.source,q_(yh.exec(ih))+"g")),ih.lastIndex=0;Tm=ih.exec(Sm);)var Dm=Tm.index;qh=qh.slice(0,Dm===td? $ h:Dm)}}else if(Gd.indexOf(Xg(ih), $ h)!= $ h){var Km=qh.lastIndexOf(ih);Km>-1&&(qh=qh.slice(0,Km))}return qh+Lf}function xA(Gd){return Gd=q_(Gd),Gd&&e_.test(Gd)?Gd.replace(Rm,OE):Gd}var CA=Ov(function(Gd,Xd,yf){return Gd+(yf?" ":"")+Xd.toUpperCase()}),h2=hT("toUpperCase");function J2(Gd,Xd,yf){return Gd=q_(Gd),Xd=yf?td:Xd,Xd===td?NE(Gd)?kE(Gd):Iy(Gd):Gd.match(Xd)||[]}var Z2=b_(function(Gd,Xd){try{return Fg(Gd,td,Xd)}catch(yf){return c2(yf)?yf:new h_(yf)}}),AA=U0(function(Gd,Xd){return Vg(Xd,function(yf){yf=rg(yf),eb(Gd,yf,l2(Gd[yf],Gd))}),Gd});function wA(Gd){var Xd=Gd==null?0:Gd.length,yf=l_();return Gd=Xd?Y_(Gd,function(Lf){if(typeof Lf[1]!="function")throw new o0(sd);return[yf(Lf[0]),Lf[1]]}):[],b_(function(Lf){for(var ih=-1;++ih<Xd;){var fh=Gd[ih];if(Fg(fh[0],this,Lf))return Fg(fh[1],this,Lf)}})}function NA(Gd){return VT(Kg(Gd,fd))}function m2(Gd){return function(){return Gd}}function DA(Gd,Xd){return Gd==null||Gd!==Gd?Xd:Gd}var IA=mT(),OA=mT(!0);function f0(Gd){return Gd}function _2(Gd){return xv(typeof Gd=="function"?Gd:Kg(Gd,fd))}function RA(Gd){return rT(Kg(Gd,fd))}function kA(Gd,Xd){return dE(Gd,Kg(Xd,fd))}var MA=b_(function(Gd,Xd){return function(yf){return Tv(yf,Gd,Xd)}}),BA=b_(function(Gd,Xd){return function(yf){return Tv(Gd,yf,Xd)}});function g2(Gd,Xd,yf){var Lf=Lg(Xd),ih=G1(Xd,Lf);yf==null&&!(pg(Xd)&&(ih.length||!Lf.length))&&(yf=Xd,Xd=Gd,Gd=this,ih=G1(Xd,Lg(Xd)));var fh=!(pg(yf)&&"chain"in yf)||!!yf.chain,Mh=Jb(Gd);return Vg(ih,function( $ h){var qh=Xd[ $ h];Gd[ $ h]=qh,Mh&&(Gd.prototype[ $ h]=function(){var Tm=this.__chain__;if(fh||Tm){var Sm=Gd(this.__wrapped__),Dm=Sm.__actions__=zg(this.__actions__);return Dm.push({func:qh,args:arguments,thisArg:Gd}),Sm.__chain__=Tm,Sm}return qh.apply(Gd,b0([this.value()],arguments))})}),Gd}function PA(){return P_._===this&&(P_._=jg),this}function b2(){}function $ A(Gd){return Gd=v_(Gd),b_(function(Xd){return Av(Xd,Gd)})}var LA=X1(Y_),FA=X1(Rb),jA=X1(ub);function eS(Gd){return df(Gd)?sh(rg(Gd)):WT(Gd)}function UA(Gd){return function(Xd){return Gd==null?td:gb(Gd,Xd)}}var HA=Qb(),GA=Qb(!0);function v2(){return[]}function y2(){return!1}function qA(){return{}}function VA(){return""}function zA(){return!0}function WA(Gd,Xd){if(Gd=v_(Gd),Gd<1||Gd>Bf)return[];var yf=Vf,Lf=hg(Gd,Vf);Xd=l_(Xd),Gd-=Vf;for(var ih=Lm(Lf,Xd);++yf<Gd;)Xd(yf);return ih}function YA(Gd){return g_(Gd)?Y_(Gd,rg):I0(Gd)?[Gd]:zg(X_(q_(Gd)))}function KA(Gd){var Xd=++ME;return q_(Gd)+Xd}var XA=Rv(function(Gd,Xd){return Gd+Xd},0),QA=TE("ceil"),JA=Rv(function(Gd,Xd){return Gd/Xd},1),ZA=TE("floor");function ew(Gd){return Gd&&Gd.length?U1(Gd,f0,q1):td}function tw(Gd,Xd){return Gd&&Gd.length?U1(Gd,l_(Xd,2),q1):td}function rw(Gd){return zf(Gd,f0)}function nw(Gd,Xd){return zf(Gd,l_(Xd,2))}function iw(Gd){return Gd&&Gd.length?U1(Gd,f0,Yb):td}function aw(Gd,Xd){return Gd&&Gd.length?U1(Gd,l_
2024-09-25 14:23:53 +08:00
` :"")),td&&td()}function ad(sd){return sd.interrupt?(sd.interrupt.append=Ra,sd.interrupt.end=nd,sd.interrupt=!1,Ra(!0),!0):!1}if(Ra(!1,qa.indents+(qa.name?"<"+qa.name:"")+(qa.attributes.length?" "+qa.attributes.join(" "):"")+(rd?qa.name?">":"":qa.name?"/>":"")+(qa.indent&&rd>1? `
` :"")),!rd)return Ra(!1,qa.indent? `
` :"");ad(qa)||nd()}function attribute(Ra,qa){return Ra+'="'+escapeForXML(qa)+'"'}xml $ 2.exports=xml $ 1;xml $ 2.exports.element=xml $ 2.exports.Element=element;var xmlExports=xml $ 2.exports;const Xml=getDefaultExportFromCjs(xmlExports);var xml2js={},defaults $ 1={},hasRequiredDefaults;function requireDefaults(){return hasRequiredDefaults||(hasRequiredDefaults=1,(function(){defaults $ 1.defaults={"0.1":{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:" $ ",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:" $ $ ",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline: `
2024-09-28 20:51:35 +08:00
` },headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(commonjsGlobal)),defaults $ 1}var builder={},lib $ 2={},Utility={},hasRequiredUtility;function requireUtility(){return hasRequiredUtility||(hasRequiredUtility=1,(function(){var Ra,qa,td,rd,nd,ad,sd,ud=[].slice,cd={}.hasOwnProperty;Ra=function(){var dd,pd,fd,Td,Ad,Sd;if(Sd=arguments[0],Ad=2<=arguments.length?ud.call(arguments,1):[],nd(Object.assign))Object.assign.apply(null,arguments);else for(dd=0,fd=Ad.length;dd<fd;dd++)if(Td=Ad[dd],Td!=null)for(pd in Td)cd.call(Td,pd)&&(Sd[pd]=Td[pd]);return Sd},nd=function(dd){return!!dd&&Object.prototype.toString.call(dd)==="[object Function]"},ad=function(dd){var pd;return!!dd&&((pd=typeof dd)=="function"||pd==="object")},td=function(dd){return nd(Array.isArray)?Array.isArray(dd):Object.prototype.toString.call(dd)==="[object Array]"},rd=function(dd){var pd;if(td(dd))return!dd.length;for(pd in dd)if(cd.call(dd,pd))return!1;return!0},sd=function(dd){var pd,fd;return ad(dd)&&(fd=Object.getPrototypeOf(dd))&&(pd=fd.constructor)&&typeof pd=="function"&&pd instanceof pd&&Function.prototype.toString.call(pd)===Function.prototype.toString.call(Object)},qa=function(dd){return nd(dd.valueOf)?dd.valueOf():dd},Utility.assign=Ra,Utility.isFunction=nd,Utility.isObject=ad,Utility.isArray=td,Utility.isEmpty=rd,Utility.isPlainObject=sd,Utility.getValue=qa}).call(commonjsGlobal)),Utility}var XMLDOMImplementation={exports:{}},hasRequiredXMLDOMImplementation;function requireXMLDOMImplementation(){return hasRequiredXMLDOMImplementation||(hasRequiredXMLDOMImplementation=1,(function(){XMLDOMImplementation.exports=function(){function Ra(){}return Ra.prototype.hasFeature=function(qa,td){return!0},Ra.prototype.createDocumentType=function(qa,td,rd){throw new Error("This DOM method is not implemented.")},Ra.prototype.createDocument=function(qa,td,rd){throw new Error("This DOM method is not implemented.")},Ra.prototype.createHTMLDocument=function(qa){throw new Error("This DOM method is not implemented.")},Ra.prototype.getFeature=function(qa,td){throw new Error("This DOM method is not implemented.")},Ra}()}).call(commonjsGlobal)),XMLDOMImplementation.exports}var XMLDocument={exports:{}},XMLDOMConfiguration={exports:{}},XMLDOMErrorHandler={exports:{}},hasRequiredXMLDOMErrorHandler;function requireXMLDOMErrorHandler(){return hasRequiredXMLDOMErrorHandler||(hasRequiredXMLDOMErrorHandler=1,(function(){XMLDOMErrorHandler.exports=function(){function Ra(){}return Ra.prototype.handleError=function(qa){throw new Error(qa)},Ra}()}).call(commonjsGlobal)),XMLDOMErrorHandler.exports}var XMLDOMStringList={exports:{}},hasRequiredXMLDOMStringList;function requireXMLDOMStringList(){return hasRequiredXMLDOMStringList||(hasRequiredXMLDOMStringList=1,(function(){XMLDOMStringList.exports=function(){function Ra(qa){this.arr=qa||[]}return Object.defineProperty(Ra.prototype,"length",{get:function(){return this.arr.length}}),Ra.prototype.item=function(qa){return this.arr[qa]||null},Ra.prototype.contains=function(qa){return this.arr.indexOf(qa)!==-1},Ra}()}).call(commonjsGlobal)),XMLDOMStringList.exports}var hasRequiredXMLDOMConfiguration;function requireXMLDOMConfiguration(){return hasRequiredXMLDOMConfiguration||(hasRequiredXMLDOMConfiguration=1,(function(){var Ra,qa;Ra=requireXMLDOMErrorHandler(),qa=requireXMLDOMStringList(),XMLDOMConfiguration.exports=function(){function td(){this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new Ra,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=Object.create(this.defaultParams)}return Object.defineProperty(td.prototype,"parameterNames",{get:function(){return new qa(Object.keys(this.defaultParams))}}),td.prototype.getParameter=function(rd){return this.params.hasOwnProperty(rd)?this.params[rd]:null},td.prototype.canSetParameter=function(rd,nd){return!0},td.prototype.setParameter=fu
` ,sd.offset=(dd=ad.offset)!=null?dd:0,sd.dontPrettyTextNodes=(pd=(fd=ad.dontPrettyTextNodes)!=null?fd:ad.dontprettytextnodes)!=null?pd:0,sd.spaceBeforeSlash=(Td=(Ad=ad.spaceBeforeSlash)!=null?Ad:ad.spacebeforeslash)!=null?Td:"",sd.spaceBeforeSlash===!0&&(sd.spaceBeforeSlash=" "),sd.suppressPrettyCount=0,sd.user={},sd.state=qa.None,sd},nd.prototype.indent=function(ad,sd,ud){var cd;return!sd.pretty||sd.suppressPrettyCount?"":sd.pretty&&(cd=(ud||0)+sd.offset+1,cd>0)?new Array(cd).join(sd.indent):""},nd.prototype.endline=function(ad,sd,ud){return!sd.pretty||sd.suppressPrettyCount?"":sd.newline},nd.prototype.attribute=function(ad,sd,ud){var cd;return this.openAttribute(ad,sd,ud),cd=" "+ad.name+'="'+ad.value+'"',this.closeAttribute(ad,sd,ud),cd},nd.prototype.cdata=function(ad,sd,ud){var cd;return this.openNode(ad,sd,ud),sd.state=qa.OpenTag,cd=this.indent(ad,sd,ud)+"<![CDATA[",sd.state=qa.InsideTag,cd+=ad.value,sd.state=qa.CloseTag,cd+="]]>"+this.endline(ad,sd,ud),sd.state=qa.None,this.closeNode(ad,sd,ud),cd},nd.prototype.comment=function(ad,sd,ud){var cd;return this.openNode(ad,sd,ud),sd.state=qa.OpenTag,cd=this.indent(ad,sd,ud)+"<!-- ",sd.state=qa.InsideTag,cd+=ad.value,sd.state=qa.CloseTag,cd+=" -->"+this.endline(ad,sd,ud),sd.state=qa.None,this.closeNode(ad,sd,ud),cd},nd.prototype.declaration=function(ad,sd,ud){var cd;return this.openNode(ad,sd,ud),sd.state=qa.OpenTag,cd=this.indent(ad,sd,ud)+"<?xml",sd.state=qa.InsideTag,cd+=' version="'+ad.version+'"',ad.encoding!=null&&(cd+=' encoding="'+ad.encoding+'"'),ad.standalone!=null&&(cd+=' standalone="'+ad.standalone+'"'),sd.state=qa.CloseTag,cd+=sd.spaceBeforeSlash+"?>",cd+=this.endline(ad,sd,ud),sd.state=qa.None,this.closeNode(ad,sd,ud),cd},nd.prototype.docType=function(ad,sd,ud){var cd,dd,pd,fd,Td;if(ud||(ud=0),this.openNode(ad,sd,ud),sd.state=qa.OpenTag,fd=this.indent(ad,sd,ud),fd+="<!DOCTYPE "+ad.root().name,ad.pubID&&ad.sysID?fd+=' PUBLIC "'+ad.pubID+'" "'+ad.sysID+'"':ad.sysID&&(fd+=' SYSTEM "'+ad.sysID+'"'),ad.children.length>0){for(fd+=" [",fd+=this.endline(ad,sd,ud),sd.state=qa.InsideTag,Td=ad.children,dd=0,pd=Td.length;dd<pd;dd++)cd=Td[dd],fd+=this.writeChildNode(cd,sd,ud+1);sd.state=qa.CloseTag,fd+="]"}return sd.state=qa.CloseTag,fd+=sd.spaceBeforeSlash+">",fd+=this.endline(ad,sd,ud),sd.state=qa.None,this.closeNode(ad,sd,ud),fd},nd.prototype.element=function(ad,sd,ud){var cd,dd,pd,fd,Td,Ad,Sd,Dd,Ld,Rd,Od,Md,jd,Ud;ud||(ud=0),Rd=!1,Od="",this.openNode(ad,sd,ud),sd.state=qa.OpenTag,Od+=this.indent(ad,sd,ud)+"<"+ad.name,Md=ad.attribs;for(Ld in Md)rd.call(Md,Ld)&&(cd=Md[Ld],Od+=this.attribute(cd,sd,ud));if(pd=ad.children.length,fd=pd===0?null:ad.children[0],pd===0||ad.children.every(function(Hd){return(Hd.type===Ra.Text||Hd.type===Ra.Raw)&&Hd.value===""}))sd.allowEmpty?(Od+=">",sd.state=qa.CloseTag,Od+="</"+ad.name+">"+this.endline(ad,sd,ud)):(sd.state=qa.CloseTag,Od+=sd.spaceBeforeSlash+"/>"+this.endline(ad,sd,ud));else if(sd.pretty&&pd===1&&(fd.type===Ra.Text||fd.type===Ra.Raw)&&fd.value!=null)Od+=">",sd.state=qa.InsideTag,sd.suppressPrettyCount++,Rd=!0,Od+=this.writeChildNode(fd,sd,ud+1),sd.suppressPrettyCount--,Rd=!1,sd.state=qa.CloseTag,Od+="</"+ad.name+">"+this.endline(ad,sd,ud);else{if(sd.dontPrettyTextNodes){for(jd=ad.children,Td=0,Sd=jd.length;Td<Sd;Td++)if(dd=jd[Td],(dd.type===Ra.Text||dd.type===Ra.Raw)&&dd.value!=null){sd.suppressPrettyCount++,Rd=!0;break}}for(Od+=">"+this.endline(ad,sd,ud),sd.state=qa.InsideTag,Ud=ad.children,Ad=0,Dd=Ud.length;Ad<Dd;Ad++)dd=Ud[Ad],Od+=this.writeChildNode(dd,sd,ud+1);sd.state=qa.CloseTag,Od+=this.indent(ad,sd,ud)+"</"+ad.name+">",Rd&&sd.suppressPrettyCount--,Od+=this.endline(ad,sd,ud),sd.state=qa.None}return this.closeNode(ad,sd,ud),Od},nd.prototype.writeChildNode=function(ad,sd,ud){switch(ad.type){case Ra.CData:return this.cdata(ad,sd,ud);case Ra.Comment:return this.comment(ad,sd,ud);case Ra.Element:return this.element(ad,sd,ud);case Ra.Raw:return this.raw(ad,sd,ud);case Ra.Text:return this.text(ad,sd,ud);case Ra.ProcessingInstruction:return this.processingInstruction(ad,sd,ud);case Ra.Dummy:return"";case Ra.Declaration:return
` ||Ef===" \r "||Ef===" "}function Ud(Ef){return Ef==='"'||Ef==="'"}function Hd(Ef){return Ef===">"||jd(Ef)}function Wd(Ef,gf){return Ef.test(gf)}function Zd(Ef,gf){return!Wd(Ef,gf)}var zd=0;qa.STATE={BEGIN:zd++,BEGIN_WHITESPACE:zd++,TEXT:zd++,TEXT_ENTITY:zd++,OPEN_WAKA:zd++,SGML_DECL:zd++,SGML_DECL_QUOTED:zd++,DOCTYPE:zd++,DOCTYPE_QUOTED:zd++,DOCTYPE_DTD:zd++,DOCTYPE_DTD_QUOTED:zd++,COMMENT_STARTING:zd++,COMMENT:zd++,COMMENT_ENDING:zd++,COMMENT_ENDED:zd++,CDATA:zd++,CDATA_ENDING:zd++,CDATA_ENDING_2:zd++,PROC_INST:zd++,PROC_INST_BODY:zd++,PROC_INST_ENDING:zd++,OPEN_TAG:zd++,OPEN_TAG_SLASH:zd++,ATTRIB:zd++,ATTRIB_NAME:zd++,ATTRIB_NAME_SAW_WHITE:zd++,ATTRIB_VALUE:zd++,ATTRIB_VALUE_QUOTED:zd++,ATTRIB_VALUE_CLOSED:zd++,ATTRIB_VALUE_UNQUOTED:zd++,ATTRIB_VALUE_ENTITY_Q:zd++,ATTRIB_VALUE_ENTITY_U:zd++,CLOSE_TAG:zd++,CLOSE_TAG_SAW_WHITE:zd++,SCRIPT:zd++,SCRIPT_ENDING:zd++},qa.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},qa.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(qa.ENTITIES).forEach(function(Ef){var gf=qa.ENTITIES[Ef],Mf=typeof gf=="number"?String.fromCharCode(gf):gf;qa.ENTITIES[Ef]=Mf});for(var Qd in qa.STATE)qa.STATE[qa.STATE[Qd]]=Qd;zd=qa.STATE;function Jd(Ef,gf,Mf){Ef[gf]&&Ef[gf](Mf)}function hf(Ef,gf,Mf){Ef.textNode&&vf(Ef),Jd(Ef,gf,Mf)}function vf(Ef){Ef.textNode=Tf(Ef.opt,Ef.textNode),Ef.textNode&&Jd(Ef,"ontext",Ef.textNode),Ef.textNode=""}function Tf(Ef,gf){return Ef.trim&&(gf=gf.trim()),Ef.normalize&&(gf=gf.replace(/ \s +/g," ")),gf}function _f(Ef,gf){return vf(Ef),Ef.trackPosition&&(gf+= `
Line : ` +Ef.line+ `
Column : ` +Ef.column+ `
Char : ` +Ef.c),gf=new Error(gf),Ef.error=gf,Jd(Ef,"onerror",gf),Ef}function bf(Ef){return Ef.sawRoot&&!Ef.closedRoot&&xf(Ef,"Unclosed root tag"),Ef.state!==zd.BEGIN&&Ef.state!==zd.BEGIN_WHITESPACE&&Ef.state!==zd.TEXT&&_f(Ef,"Unexpected end"),vf(Ef),Ef.c="",Ef.closed=!0,Jd(Ef,"onend"),rd.call(Ef,Ef.strict,Ef.opt),Ef}function xf(Ef,gf){if(typeof Ef!="object"||!(Ef instanceof rd))throw new Error("bad call to strictFail");Ef.strict&&_f(Ef,gf)}function Bf(Ef){Ef.strict||(Ef.tagName=Ef.tagName[Ef.looseCase]());var gf=Ef.tags[Ef.tags.length-1]||Ef,Mf=Ef.tag={name:Ef.tagName,attributes:{}};Ef.opt.xmlns&&(Mf.ns=gf.ns),Ef.attribList.length=0,hf(Ef,"onopentagstart",Mf)}function Yf(Ef,gf){var Mf=Ef.indexOf(":"),Gf=Mf<0?["",Ef]:Ef.split(":"),ah=Gf[0],Wf=Gf[1];return gf&&Ef==="xmlns"&&(ah="xmlns",Wf=""),{prefix:ah,local:Wf}}function Zf(Ef){if(Ef.strict||(Ef.attribName=Ef.attribName[Ef.looseCase]()),Ef.attribList.indexOf(Ef.attribName)!==-1||Ef.tag.attributes.hasOwnProperty(Ef.attribName)){Ef.attribName=Ef.attribValue="";return}if(Ef.opt.xmlns){var gf=Yf(Ef.attribName,!0),Mf=gf.prefix,Gf=gf.local;if(Mf==="xmlns")if(Gf==="xml"&&Ef.attribValue!==Ad)xf(Ef,"xml: prefix must be bound to "+Ad+ `
Actual : ` +Ef.attribValue);else if(Gf==="xmlns"&&Ef.attribValue!==Sd)xf(Ef,"xmlns: prefix must be bound to "+Sd+ `
Actual : ` +Ef.attribValue);else{var ah=Ef.tag,Wf=Ef.tags[Ef.tags.length-1]||Ef;ah.ns===Wf.ns&&(ah.ns=Object.create(Wf.ns)),ah.ns[Gf]=Ef.attribValue}Ef.attribList.push([Ef.attribName,Ef.attribValue])}else Ef.tag.attributes[Ef.attribName]=Ef.attribValue,hf(Ef,"onattribute",{name:Ef.attribName,value:Ef.attribValue});Ef.attribName=Ef.attribValue=""}function Vf(Ef,gf){if(Ef.opt.xmlns){var Mf=Ef.tag,Gf=Yf(Ef.tagName);Mf.prefix=Gf.prefix,Mf.local=Gf.local,Mf.uri=Mf.ns[Gf.prefix]||"",Mf.prefix&&!Mf.uri&&(xf(Ef,"Unbound namespace prefix: "+JSON.stringify(Ef.tagName)),Mf.uri=Gf.prefix);var ah=Ef.tags[Ef.tags.length-1]||Ef;Mf.ns&&ah.ns!==Mf.ns&&Object.keys(Mf.ns).forEach(function(nh){hf(Ef,"onopennamespace",{prefix:nh,uri:Mf.ns[nh]})});for(var Wf=0,Rf=Ef.attribList.length;Wf<Rf;Wf++){var qf=Ef.attribList[Wf],lh=qf[0],Uf=qf[1],wf=Yf(lh,!0),Of=wf.prefix,jf=wf.local,uh=Of===""?"":Mf.ns[Of]||"",_h={name:lh,value:Uf,prefix:Of,local:jf,uri:uh};Of&&Of!=="xmlns"&&!uh&&(xf(Ef,"Unbound namespace prefix: "+JSON.stringify(Of)),_h.uri=Of),Ef.tag.attributes[lh]=_h,hf(Ef,"onattribute",_h)}Ef.attribList.length=0}Ef.tag.isSelfClosing=!!gf,Ef.sawRoot=!0,Ef.tags.push(Ef.tag),hf(Ef,"onopentag",Ef.tag),gf||(!Ef.noscript&&Ef.tagName.toLowerCase()==="script"?Ef.state=zd.SCRIPT:Ef.state=zd.TEXT,Ef.tag=null,Ef.tagName=""),Ef.attribName=Ef.attribValue="",Ef.attribList.length=0}function Pf(Ef){if(!Ef.tagName){xf(Ef,"Weird empty close tag."),Ef.textNode+="</>",Ef.state=zd.TEXT;return}if(Ef.script){if(Ef.tagName!=="script"){Ef.script+="</"+Ef.tagName+">",Ef.tagName="",Ef.state=zd.SCRIPT;return}hf(Ef,"onscript",Ef.script),Ef.script=""}var gf=Ef.tags.length,Mf=Ef.tagName;Ef.strict||(Mf=Mf[Ef.looseCase]());for(var Gf=Mf;gf--;){var ah=Ef.tags[gf];if(ah.name!==Gf)xf(Ef,"Unexpected close tag");else break}if(gf<0){xf(Ef,"Unmatched closing tag: "+Ef.tagName),Ef.textNode+="</"+Ef.tagName+">",Ef.state=zd.TEXT;return}Ef.tagName=Mf;for(var Wf=Ef.tags.length;Wf-- >gf;){var Rf=Ef.tag=Ef.tags.pop();Ef.tagName=Ef.tag.name,hf(Ef,"onclosetag",Ef.tagName);var qf={};for(var lh in Rf.ns)qf[lh]=Rf.ns[lh];var Uf=Ef.tags[Ef.tags.length-1]||Ef;Ef.opt.xmlns&&Rf.ns!==Uf.ns&&Object.keys(Rf.ns).forEach(function(wf){var Of=Rf.ns[wf];hf(Ef,"onclosenamespace",{prefix:wf,uri:Of})})}gf===0&&(Ef.closedRoot=!0),Ef.tagName=Ef.attribValue=Ef.attribName="",Ef.attribList.length=0,Ef.state=zd.TEXT}function Df(Ef){var gf=Ef.entity,Mf=gf.toLowerCase(),Gf,ah="";return Ef.ENTITIES[gf]?Ef.ENTITIES[gf]:Ef.ENTITIES[Mf]?Ef.ENTITIES[Mf]:(gf=Mf,gf.charAt(0)==="#"&&(gf.charAt(1)==="x"?(gf=gf.slice(2),Gf=parseInt(gf,16),ah=Gf.toString(16)):(gf=gf.slice(1),Gf=parseInt(gf,10),ah=Gf.toString(10))),gf=gf.replace(/^0+/,""),isNaN(Gf)||ah.toLowerCase()!==gf?(xf(Ef,"Invalid character entity"),"&"+Ef.entity+";"):String.fromCodePoint(Gf))}function $ f(Ef,gf){gf==="<"?(Ef.state=zd.OPEN_WAKA,Ef.startTagPosition=Ef.position):jd(gf)||(xf(Ef,"Non-whitespace before first tag."),Ef.textNode=gf,Ef.state=zd.TEXT)}function Jf(Ef,gf){var Mf="";return gf<Ef.length&&(Mf=Ef.charAt(gf)),Mf}function Xf(Ef){var gf=this;if(this.error)throw this.error;if(gf.closed)return _f(gf,"Cannot write after close. Assign an onready handler.");if(Ef===null)return bf(gf);typeof Ef=="object"&&(Ef=Ef.toString());for(var Mf=0,Gf="";Gf=Jf(Ef,Mf++),gf.c=Gf,!!Gf;)switch(gf.trackPosition&&(gf.position++,Gf=== `
` ?(gf.line++,gf.column=0):gf.column++),gf.state){case zd.BEGIN:if(gf.state=zd.BEGIN_WHITESPACE,Gf===" \u FEFF")continue; $ f(gf,Gf);continue;case zd.BEGIN_WHITESPACE: $ f(gf,Gf);continue;case zd.TEXT:if(gf.sawRoot&&!gf.closedRoot){for(var ah=Mf-1;Gf&&Gf!=="<"&&Gf!=="&";)Gf=Jf(Ef,Mf++),Gf&&gf.trackPosition&&(gf.position++,Gf=== `
2024-09-28 21:10:55 +08:00
` ?(gf.line++,gf.column=0):gf.column++);gf.textNode+=Ef.substring(ah,Mf-1)}Gf==="<"&&!(gf.sawRoot&&gf.closedRoot&&!gf.strict)?(gf.state=zd.OPEN_WAKA,gf.startTagPosition=gf.position):(!jd(Gf)&&(!gf.sawRoot||gf.closedRoot)&&xf(gf,"Text data outside of root node."),Gf==="&"?gf.state=zd.TEXT_ENTITY:gf.textNode+=Gf);continue;case zd.SCRIPT:Gf==="<"?gf.state=zd.SCRIPT_ENDING:gf.script+=Gf;continue;case zd.SCRIPT_ENDING:Gf==="/"?gf.state=zd.CLOSE_TAG:(gf.script+="<"+Gf,gf.state=zd.SCRIPT);continue;case zd.OPEN_WAKA:if(Gf==="!")gf.state=zd.SGML_DECL,gf.sgmlDecl="";else if(!jd(Gf))if(Wd(Ld,Gf))gf.state=zd.OPEN_TAG,gf.tagName=Gf;else if(Gf==="/")gf.state=zd.CLOSE_TAG,gf.tagName="";else if(Gf==="?")gf.state=zd.PROC_INST,gf.procInstName=gf.procInstBody="";else{if(xf(gf,"Unencoded <"),gf.startTagPosition+1<gf.position){var Wf=gf.position-gf.startTagPosition;Gf=new Array(Wf).join(" ")+Gf}gf.textNode+="<"+Gf,gf.state=zd.TEXT}continue;case zd.SGML_DECL:if(gf.sgmlDecl+Gf==="--"){gf.state=zd.COMMENT,gf.comment="",gf.sgmlDecl="";continue}gf.doctype&&gf.doctype!==!0&&gf.sgmlDecl?(gf.state=zd.DOCTYPE_DTD,gf.doctype+="<!"+gf.sgmlDecl+Gf,gf.sgmlDecl=""):(gf.sgmlDecl+Gf).toUpperCase()===fd?(hf(gf,"onopencdata"),gf.state=zd.CDATA,gf.sgmlDecl="",gf.cdata=""):(gf.sgmlDecl+Gf).toUpperCase()===Td?(gf.state=zd.DOCTYPE,(gf.doctype||gf.sawRoot)&&xf(gf,"Inappropriately located doctype declaration"),gf.doctype="",gf.sgmlDecl=""):Gf===">"?(hf(gf,"onsgmldeclaration",gf.sgmlDecl),gf.sgmlDecl="",gf.state=zd.TEXT):(Ud(Gf)&&(gf.state=zd.SGML_DECL_QUOTED),gf.sgmlDecl+=Gf);continue;case zd.SGML_DECL_QUOTED:Gf===gf.q&&(gf.state=zd.SGML_DECL,gf.q=""),gf.sgmlDecl+=Gf;continue;case zd.DOCTYPE:Gf===">"?(gf.state=zd.TEXT,hf(gf,"ondoctype",gf.doctype),gf.doctype=!0):(gf.doctype+=Gf,Gf==="["?gf.state=zd.DOCTYPE_DTD:Ud(Gf)&&(gf.state=zd.DOCTYPE_QUOTED,gf.q=Gf));continue;case zd.DOCTYPE_QUOTED:gf.doctype+=Gf,Gf===gf.q&&(gf.q="",gf.state=zd.DOCTYPE);continue;case zd.DOCTYPE_DTD:Gf==="]"?(gf.doctype+=Gf,gf.state=zd.DOCTYPE):Gf==="<"?(gf.state=zd.OPEN_WAKA,gf.startTagPosition=gf.position):Ud(Gf)?(gf.doctype+=Gf,gf.state=zd.DOCTYPE_DTD_QUOTED,gf.q=Gf):gf.doctype+=Gf;continue;case zd.DOCTYPE_DTD_QUOTED:gf.doctype+=Gf,Gf===gf.q&&(gf.state=zd.DOCTYPE_DTD,gf.q="");continue;case zd.COMMENT:Gf==="-"?gf.state=zd.COMMENT_ENDING:gf.comment+=Gf;continue;case zd.COMMENT_ENDING:Gf==="-"?(gf.state=zd.COMMENT_ENDED,gf.comment=Tf(gf.opt,gf.comment),gf.comment&&hf(gf,"oncomment",gf.comment),gf.comment=""):(gf.comment+="-"+Gf,gf.state=zd.COMMENT);continue;case zd.COMMENT_ENDED:Gf!==">"?(xf(gf,"Malformed comment"),gf.comment+="--"+Gf,gf.state=zd.COMMENT):gf.doctype&&gf.doctype!==!0?gf.state=zd.DOCTYPE_DTD:gf.state=zd.TEXT;continue;case zd.CDATA:Gf==="]"?gf.state=zd.CDATA_ENDING:gf.cdata+=Gf;continue;case zd.CDATA_ENDING:Gf==="]"?gf.state=zd.CDATA_ENDING_2:(gf.cdata+="]"+Gf,gf.state=zd.CDATA);continue;case zd.CDATA_ENDING_2:Gf===">"?(gf.cdata&&hf(gf,"oncdata",gf.cdata),hf(gf,"onclosecdata"),gf.cdata="",gf.state=zd.TEXT):Gf==="]"?gf.cdata+="]":(gf.cdata+="]]"+Gf,gf.state=zd.CDATA);continue;case zd.PROC_INST:Gf==="?"?gf.state=zd.PROC_INST_ENDING:jd(Gf)?gf.state=zd.PROC_INST_BODY:gf.procInstName+=Gf;continue;case zd.PROC_INST_BODY:if(!gf.procInstBody&&jd(Gf))continue;Gf==="?"?gf.state=zd.PROC_INST_ENDING:gf.procInstBody+=Gf;continue;case zd.PROC_INST_ENDING:Gf===">"?(hf(gf,"onprocessinginstruction",{name:gf.procInstName,body:gf.procInstBody}),gf.procInstName=gf.procInstBody="",gf.state=zd.TEXT):(gf.procInstBody+="?"+Gf,gf.state=zd.PROC_INST_BODY);continue;case zd.OPEN_TAG:Wd(Rd,Gf)?gf.tagName+=Gf:(Bf(gf),Gf===">"?Vf(gf):Gf==="/"?gf.state=zd.OPEN_TAG_SLASH:(jd(Gf)||xf(gf,"Invalid character in tag name"),gf.state=zd.ATTRIB));continue;case zd.OPEN_TAG_SLASH:Gf===">"?(Vf(gf,!0),Pf(gf)):(xf(gf,"Forward-slash in opening tag not followed by >"),gf.state=zd.ATTRIB);continue;case zd.ATTRIB:if(jd(Gf))continue;Gf===">"?Vf(gf):Gf==="/"?gf.state=zd.OPEN_TAG_SLASH:Wd(Ld,Gf)?(gf.attribName=Gf,gf.attribValue="",gf.state=zd.ATTRIB_NAME):xf(gf,"Invalid attribute name");continue;case zd.ATTRIB_NAME:Gf==="="?gf.state
2024-09-25 14:23:53 +08:00
` &&Ra[ad]!==" \r ";ad++)cd+=Ra[ad];if(cd=cd.trim(),cd[cd.length-1]==="/"&&(cd=cd.substring(0,cd.length-1),ad--),!validateTagName(cd)){let fd;return cd.trim().length===0?fd="Invalid space after '<'.":fd="Tag '"+cd+"' is an invalid name.",getErrorObject("InvalidTag",fd,getLineNumberForPosition(Ra,ad))}const dd=readAttributeStr(Ra,ad);if(dd===!1)return getErrorObject("InvalidAttr","Attributes for '"+cd+"' have open quote.",getLineNumberForPosition(Ra,ad));let pd=dd.value;if(ad=dd.index,pd[pd.length-1]==="/"){const fd=ad-pd.length;pd=pd.substring(0,pd.length-1);const Td=validateAttributeString(pd,qa);if(Td===!0)rd=!0;else return getErrorObject(Td.err.code,Td.err.msg,getLineNumberForPosition(Ra,fd+Td.err.line))}else if(ud)if(dd.tagClosed){if(pd.trim().length>0)return getErrorObject("InvalidTag","Closing tag '"+cd+"' can't have attributes or invalid starting.",getLineNumberForPosition(Ra,sd));if(td.length===0)return getErrorObject("InvalidTag","Closing tag '"+cd+"' has not been opened.",getLineNumberForPosition(Ra,sd));{const fd=td.pop();if(cd!==fd.tagName){let Td=getLineNumberForPosition(Ra,fd.tagStartPos);return getErrorObject("InvalidTag","Expected closing tag '"+fd.tagName+"' (opened in line "+Td.line+", col "+Td.col+") instead of closing tag '"+cd+"'.",getLineNumberForPosition(Ra,sd))}td.length==0&&(nd=!0)}}else return getErrorObject("InvalidTag","Closing tag '"+cd+"' doesn't have proper closing.",getLineNumberForPosition(Ra,ad));else{const fd=validateAttributeString(pd,qa);if(fd!==!0)return getErrorObject(fd.err.code,fd.err.msg,getLineNumberForPosition(Ra,ad-pd.length+fd.err.line));if(nd===!0)return getErrorObject("InvalidXml","Multiple possible root nodes found.",getLineNumberForPosition(Ra,ad));qa.unpairedTags.indexOf(cd)!==-1||td.push({tagName:cd,tagStartPos:sd}),rd=!0}for(ad++;ad<Ra.length;ad++)if(Ra[ad]==="<")if(Ra[ad+1]==="!"){ad++,ad=readCommentAndCDATA(Ra,ad);continue}else if(Ra[ad+1]==="?"){if(ad=readPI(Ra,++ad),ad.err)return ad}else break;else if(Ra[ad]==="&"){const fd=validateAmpersand(Ra,ad);if(fd==-1)return getErrorObject("InvalidChar","char '&' is not expected.",getLineNumberForPosition(Ra,ad));ad=fd}else if(nd===!0&&!isWhiteSpace(Ra[ad]))return getErrorObject("InvalidXml","Extra text at the end",getLineNumberForPosition(Ra,ad));Ra[ad]==="<"&&ad--}}else{if(isWhiteSpace(Ra[ad]))continue;return getErrorObject("InvalidChar","char '"+Ra[ad]+"' is not expected.",getLineNumberForPosition(Ra,ad))}if(rd){if(td.length==1)return getErrorObject("InvalidTag","Unclosed tag '"+td[0].tagName+"'.",getLineNumberForPosition(Ra,td[0].tagStartPos));if(td.length>0)return getErrorObject("InvalidXml","Invalid '"+JSON.stringify(td.map(ad=>ad.tagName),null,4).replace(/ \r ? \n /g,"")+"' found.",{line:1,col:1})}else return getErrorObject("InvalidXml","Start tag expected.",1);return!0};function isWhiteSpace(Ra){return Ra===" "||Ra===" "||Ra=== `
` ||Ra===" \r "}function readPI(Ra,qa){const td=qa;for(;qa<Ra.length;qa++)if(Ra[qa]=="?"||Ra[qa]==" "){const rd=Ra.substr(td,qa-td);if(qa>5&&rd==="xml")return getErrorObject("InvalidXml","XML declaration allowed only at the start of the document.",getLineNumberForPosition(Ra,qa));if(Ra[qa]=="?"&&Ra[qa+1]==">"){qa++;break}else continue}return qa}function readCommentAndCDATA(Ra,qa){if(Ra.length>qa+5&&Ra[qa+1]==="-"&&Ra[qa+2]==="-"){for(qa+=3;qa<Ra.length;qa++)if(Ra[qa]==="-"&&Ra[qa+1]==="-"&&Ra[qa+2]===">"){qa+=2;break}}else if(Ra.length>qa+8&&Ra[qa+1]==="D"&&Ra[qa+2]==="O"&&Ra[qa+3]==="C"&&Ra[qa+4]==="T"&&Ra[qa+5]==="Y"&&Ra[qa+6]==="P"&&Ra[qa+7]==="E"){let td=1;for(qa+=8;qa<Ra.length;qa++)if(Ra[qa]==="<")td++;else if(Ra[qa]===">"&&(td--,td===0))break}else if(Ra.length>qa+9&&Ra[qa+1]==="["&&Ra[qa+2]==="C"&&Ra[qa+3]==="D"&&Ra[qa+4]==="A"&&Ra[qa+5]==="T"&&Ra[qa+6]==="A"&&Ra[qa+7]==="["){for(qa+=8;qa<Ra.length;qa++)if(Ra[qa]==="]"&&Ra[qa+1]==="]"&&Ra[qa+2]===">"){qa+=2;break}}return qa}const doubleQuote='"',singleQuote="'";function readAttributeStr(Ra,qa){let td="",rd="",nd=!1;for(;qa<Ra.length;qa++){if(Ra[qa]===doubleQuote||Ra[qa]===singleQuote)rd===""?rd=Ra[qa]:rd!==Ra[qa]||(rd="");else if(Ra[qa]===">"&&rd===""){nd=!0;break}td+=Ra[qa]}return rd!==""?!1:{value:td,index:qa,tagClosed:nd}}const validAttrStrRegxp=new RegExp( ` ( \ \ s * ) ( [ ^ \ \ s = ] + ) ( \ \ s *= ) ? ( \ \ s * ( [ '"])(([\\s\\S])*?)\\5)?`,"g");function validateAttributeString(Ra,qa){const td=util$3.getAllMatches(Ra,validAttrStrRegxp),rd={};for(let nd=0;nd<td.length;nd++){if(td[nd][1].length===0)return getErrorObject("InvalidAttr","Attribute ' "+td[nd][2]+" ' has no space in starting.",getPositionFromMatch(td[nd]));if(td[nd][3]!==void 0&&td[nd][4]===void 0)return getErrorObject("InvalidAttr","Attribute ' "+td[nd][2]+" ' is without value.",getPositionFromMatch(td[nd]));if(td[nd][3]===void 0&&!qa.allowBooleanAttributes)return getErrorObject("InvalidAttr","boolean attribute ' "+td[nd][2]+" ' is not allowed.",getPositionFromMatch(td[nd]));const ad=td[nd][2];if(!validateAttrName(ad))return getErrorObject("InvalidAttr","Attribute ' "+ad+" ' is an invalid name.",getPositionFromMatch(td[nd]));if(!rd.hasOwnProperty(ad))rd[ad]=1;else return getErrorObject("InvalidAttr","Attribute ' "+ad+" ' is repeated . ",getPositionFromMatch(td[nd]))}return!0}function validateNumberAmpersand(Ra,qa){let td=/\d/;for(Ra[qa]===" x "&&(qa++,td=/[\da-fA-F]/);qa<Ra.length;qa++){if(Ra[qa]===" ; ")return qa;if(!Ra[qa].match(td))break}return-1}function validateAmpersand(Ra,qa){if(qa++,Ra[qa]===" ; ")return-1;if(Ra[qa]===" # ")return qa++,validateNumberAmpersand(Ra,qa);let td=0;for(;qa<Ra.length;qa++,td++)if(!(Ra[qa].match(/\w/)&&td<20)){if(Ra[qa]===" ; ")break;return-1}return qa}function getErrorObject(Ra,qa,td){return{err:{code:Ra,msg:qa,line:td.line||td,col:td.col}}}function validateAttrName(Ra){return util$3.isName(Ra)}function validateTagName(Ra){return util$3.isName(Ra)}function getLineNumberForPosition(Ra,qa){const td=Ra.substring(0,qa).split(/\r?\n/);return{line:td.length,col:td[td.length-1].length+1}}function getPositionFromMatch(Ra){return Ra.startIndex+Ra[1].length}var OptionsBuilder={};const defaultOptions$1={preserveOrder:!1,attributeNamePrefix:" @ _ ",attributesGroupName:!1,textNodeName:" # text ",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(Ra,qa){return qa},attributeValueProcessor:function(Ra,qa){return qa},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(Ra,qa,td){return Ra}},buildOptions$1=function(Ra){return Object.assign({},defaultOptions$1,Ra)};OptionsBuilder.buildOptions=buildOptions$1;OptionsBuilder.defaultOptions=defaultOptions$1;class XmlNode{constructor(qa){this.tagname=qa,this.child=[],this[" : @ "]={}}add(qa,td){qa===" _ _proto _ _ "&&(qa=" # _ _proto _ _ " ) , this . child . push ( { [ qa ] : td } ) } addChild ( qa )
` );const qa=new xmlNode("!xml");let td=qa,rd="",nd="";for(let ad=0;ad<Ra.length;ad++)if(Ra[ad]==="<")if(Ra[ad+1]==="/"){const ud=findClosingIndex(Ra,">",ad,"Closing Tag is not closed.");let cd=Ra.substring(ad+2,ud).trim();if(this.options.removeNSPrefix){const fd=cd.indexOf(":");fd!==-1&&(cd=cd.substr(fd+1))}this.options.transformTagName&&(cd=this.options.transformTagName(cd)),td&&(rd=this.saveTextToParentTag(rd,td,nd));const dd=nd.substring(nd.lastIndexOf(".")+1);if(cd&&this.options.unpairedTags.indexOf(cd)!==-1)throw new Error( ` Unpaired tag can not be used as closing tag : < /${cd}>`);let pd=0;dd&&this.options.unpairedTags.indexOf(dd)!==-1?(pd=nd.lastIndexOf(".",nd.lastIndexOf(".")-1),this.tagsNodeStack.pop()):pd=nd.lastIndexOf("."),nd=nd.substring(0,pd),td=this.tagsNodeStack.pop(),rd="",ad=ud}else if(Ra[ad+1]==="?"){let ud=readTagExp(Ra,ad,!1,"?>");if(!ud)throw new Error("Pi Tag is not closed.");if(rd=this.saveTextToParentTag(rd,td,nd),!(this.options.ignoreDeclaration&&ud.tagName==="?xml"||this.options.ignorePiTags)){const cd=new xmlNode(ud.tagName);cd.add(this.options.textNodeName,""),ud.tagName!==ud.tagExp&&ud.attrExpPresent&&(cd[":@"]=this.buildAttributesMap(ud.tagExp,nd,ud.tagName)),this.addChild(td,cd,nd)}ad=ud.closeIndex+1}else if(Ra.substr(ad+1,3)==="!--"){const ud=findClosingIndex(Ra,"-->",ad+4,"Comment is not closed.");if(this.options.commentPropName){const cd=Ra.substring(ad+4,ud-2);rd=this.saveTextToParentTag(rd,td,nd),td.add(this.options.commentPropName,[{[this.options.textNodeName]:cd}])}ad=ud}else if(Ra.substr(ad+1,2)==="!D"){const ud=readDocType(Ra,ad);this.docTypeEntities=ud.entities,ad=ud.i}else if(Ra.substr(ad+1,2)==="!["){const ud=findClosingIndex(Ra,"]]>",ad,"CDATA is not closed.")-2,cd=Ra.substring(ad+9,ud);rd=this.saveTextToParentTag(rd,td,nd);let dd=this.parseTextData(cd,td.tagname,nd,!0,!1,!0,!0);dd==null&&(dd=""),this.options.cdataPropName?td.add(this.options.cdataPropName,[{[this.options.textNodeName]:cd}]):td.add(this.options.textNodeName,dd),ad=ud+2}else{let ud=readTagExp(Ra,ad,this.options.removeNSPrefix),cd=ud.tagName;const dd=ud.rawTagName;let pd=ud.tagExp,fd=ud.attrExpPresent,Td=ud.closeIndex;this.options.transformTagName&&(cd=this.options.transformTagName(cd)),td&&rd&&td.tagname!=="!xml"&&(rd=this.saveTextToParentTag(rd,td,nd,!1));const Ad=td;if(Ad&&this.options.unpairedTags.indexOf(Ad.tagname)!==-1&&(td=this.tagsNodeStack.pop(),nd=nd.substring(0,nd.lastIndexOf("."))),cd!==qa.tagname&&(nd+=nd?"."+cd:cd),this.isItStopNode(this.options.stopNodes,nd,cd)){let Sd="";if(pd.length>0&&pd.lastIndexOf("/ ")===pd.length-1)cd[cd.length-1]===" / "?(cd=cd.substr(0,cd.length-1),nd=nd.substr(0,nd.length-1),pd=cd):pd=pd.substr(0,pd.length-1),ad=ud.closeIndex;else if(this.options.unpairedTags.indexOf(cd)!==-1)ad=ud.closeIndex;else{const Ld=this.readStopNodeData(Ra,dd,Td+1);if(!Ld)throw new Error(`Unexpected end of ${dd}`);ad=Ld.i,Sd=Ld.tagContent}const Dd=new xmlNode(cd);cd!==pd&&fd&&(Dd[" : @ "]=this.buildAttributesMap(pd,nd,cd)),Sd&&(Sd=this.parseTextData(Sd,cd,nd,!0,fd,!0,!0)),nd=nd.substr(0,nd.lastIndexOf(" . ")),Dd.add(this.options.textNodeName,Sd),this.addChild(td,Dd,nd)}else{if(pd.length>0&&pd.lastIndexOf(" / ")===pd.length-1){cd[cd.length-1]===" / "?(cd=cd.substr(0,cd.length-1),nd=nd.substr(0,nd.length-1),pd=cd):pd=pd.substr(0,pd.length-1),this.options.transformTagName&&(cd=this.options.transformTagName(cd));const Sd=new xmlNode(cd);cd!==pd&&fd&&(Sd[" : @ "]=this.buildAttributesMap(pd,nd,cd)),this.addChild(td,Sd,nd),nd=nd.substr(0,nd.lastIndexOf(" . "))}else{const Sd=new xmlNode(cd);this.tagsNodeStack.push(td),cd!==pd&&fd&&(Sd[" : @ "]=this.buildAttributesMap(pd,nd,cd)),this.addChild(td,Sd,nd),td=Sd}rd=" ",ad=Td}}else rd+=Ra[ad];return qa.child};function addChild(Ra,qa,td){const rd=this.options.updateTag(qa.tagname,td,qa[" : @ "]);rd===!1||(typeof rd==" string " && ( qa . tagname = rd ) , Ra . addChild ( qa ) ) } const replaceEntitiesValue$1 = function ( Ra ) { if ( this . options . processEntities ) { for ( let qa in this . docTypeEntities ) { const td = this . docTypeEntities [ qa ] ; Ra = Ra . replace ( td . regx , td . val ) } for ( let qa in this . lastEntities ) { const td = this . lastEntit
` ;function toXml(Ra,qa){let td="";return qa.format&&qa.indentBy.length>0&&(td=EOL),arrToStr(Ra,qa,"",td)}function arrToStr(Ra,qa,td,rd){let nd="",ad=!1;for(let sd=0;sd<Ra.length;sd++){const ud=Ra[sd],cd=propName(ud);if(cd===void 0)continue;let dd="";if(td.length===0?dd=cd:dd= ` $ { td } . $ { cd } ` ,cd===qa.textNodeName){let Sd=ud[cd];isStopNode(dd,qa)||(Sd=qa.tagValueProcessor(cd,Sd),Sd=replaceEntitiesValue(Sd,qa)),ad&&(nd+=rd),nd+=Sd,ad=!1;continue}else if(cd===qa.cdataPropName){ad&&(nd+=rd),nd+= ` < ! [ CDATA [ $ { ud [ cd ] [ 0 ] [ qa . textNodeName ] } ] ] > ` ,ad=!1;continue}else if(cd===qa.commentPropName){nd+=rd+ ` <!-- $ { ud [ cd ] [ 0 ] [ qa . textNodeName ] } -- > ` ,ad=!0;continue}else if(cd[0]==="?"){const Sd=attr_to_str(ud[":@"],qa),Dd=cd==="?xml"?"":rd;let Ld=ud[cd][0][qa.textNodeName];Ld=Ld.length!==0?" "+Ld:"",nd+=Dd+ ` < $ { cd } $ { Ld } $ { Sd } ? > ` ,ad=!0;continue}let pd=rd;pd!==""&&(pd+=qa.indentBy);const fd=attr_to_str(ud[":@"],qa),Td=rd+ ` < $ { cd } $ { fd } ` ,Ad=arrToStr(ud[cd],qa,dd,pd);qa.unpairedTags.indexOf(cd)!==-1?qa.suppressUnpairedNode?nd+=Td+">":nd+=Td+"/>":(!Ad||Ad.length===0)&&qa.suppressEmptyNode?nd+=Td+"/>":Ad&&Ad.endsWith(">")?nd+=Td+ ` > $ { Ad } $ { rd } < /${cd}>`:(nd+=Td+">",Ad&&rd!==""&&(Ad.includes("/ > ")||Ad.includes(" < /"))?nd+=rd+qa.indentBy+Ad+rd:nd+=Ad,nd+=`</ $ { cd } > ` ),ad=!0}return nd}function propName(Ra){const qa=Object.keys(Ra);for(let td=0;td<qa.length;td++){const rd=qa[td];if(Ra.hasOwnProperty(rd)&&rd!==":@")return rd}}function attr_to_str(Ra,qa){let td="";if(Ra&&!qa.ignoreAttributes)for(let rd in Ra){if(!Ra.hasOwnProperty(rd))continue;let nd=qa.attributeValueProcessor(rd,Ra[rd]);nd=replaceEntitiesValue(nd,qa),nd===!0&&qa.suppressBooleanAttributes?td+= ` $ { rd . substr ( qa . attributeNamePrefix . length ) } ` :td+= ` $ { rd . substr ( qa . attributeNamePrefix . length ) } = "${nd}" ` }return td}function isStopNode(Ra,qa){Ra=Ra.substr(0,Ra.length-qa.textNodeName.length-1);let td=Ra.substr(Ra.lastIndexOf(".")+1);for(let rd in qa.stopNodes)if(qa.stopNodes[rd]===Ra||qa.stopNodes[rd]==="*."+td)return!0;return!1}function replaceEntitiesValue(Ra,qa){if(Ra&&Ra.length>0&&qa.processEntities)for(let td=0;td<qa.entities.length;td++){const rd=qa.entities[td];Ra=Ra.replace(rd.regex,rd.val)}return Ra}var orderedJs2Xml=toXml;const buildFromOrderedJs=orderedJs2Xml,getIgnoreAttributesFn=ignoreAttributes,defaultOptions={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(Ra,qa){return qa},attributeValueProcessor:function(Ra,qa){return qa},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Builder(Ra){this.options=Object.assign({},defaultOptions,Ra),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=getIgnoreAttributesFn(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=isAttribute),this.processTextOrObjNode=processTextOrObjNode,this.options.format?(this.indentate=indentate,this.tagEndChar= ` >
2024-09-18 09:46:23 +08:00
` ,this.newLine= `
2024-09-28 20:51:35 +08:00
` ):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}Builder.prototype.build=function(Ra){return this.options.preserveOrder?buildFromOrderedJs(Ra,this.options):(Array.isArray(Ra)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(Ra={[this.options.arrayNodeName]:Ra}),this.j2x(Ra,0,[]).val)};Builder.prototype.j2x=function(Ra,qa,td){let rd="",nd="";const ad=td.join(".");for(let sd in Ra)if(Object.prototype.hasOwnProperty.call(Ra,sd))if(typeof Ra[sd]>"u")this.isAttribute(sd)&&(nd+="");else if(Ra[sd]===null)this.isAttribute(sd)?nd+="":sd[0]==="?"?nd+=this.indentate(qa)+"<"+sd+"?"+this.tagEndChar:nd+=this.indentate(qa)+"<"+sd+"/"+this.tagEndChar;else if(Ra[sd]instanceof Date)nd+=this.buildTextValNode(Ra[sd],sd,"",qa);else if(typeof Ra[sd]!="object"){const ud=this.isAttribute(sd);if(ud&&!this.ignoreAttributesFn(ud,ad))rd+=this.buildAttrPairStr(ud,""+Ra[sd]);else if(!ud)if(sd===this.options.textNodeName){let cd=this.options.tagValueProcessor(sd,""+Ra[sd]);nd+=this.replaceEntitiesValue(cd)}else nd+=this.buildTextValNode(Ra[sd],sd,"",qa)}else if(Array.isArray(Ra[sd])){const ud=Ra[sd].length;let cd="",dd="";for(let pd=0;pd<ud;pd++){const fd=Ra[sd][pd];if(!(typeof fd>"u"))if(fd===null)sd[0]==="?"?nd+=this.indentate(qa)+"<"+sd+"?"+this.tagEndChar:nd+=this.indentate(qa)+"<"+sd+"/"+this.tagEndChar;else if(typeof fd=="object")if(this.options.oneListGroup){const Td=this.j2x(fd,qa+1,td.concat(sd));cd+=Td.val,this.options.attributesGroupName&&fd.hasOwnProperty(this.options.attributesGroupName)&&(dd+=Td.attrStr)}else cd+=this.processTextOrObjNode(fd,sd,qa,td);else if(this.options.oneListGroup){let Td=this.options.tagValueProcessor(sd,fd);Td=this.replaceEntitiesValue(Td),cd+=Td}else cd+=this.buildTextValNode(fd,sd,"",qa)}this.options.oneListGroup&&(cd=this.buildObjectNode(cd,sd,dd,qa)),nd+=cd}else if(this.options.attributesGroupName&&sd===this.options.attributesGroupName){const ud=Object.keys(Ra[sd]),cd=ud.length;for(let dd=0;dd<cd;dd++)rd+=this.buildAttrPairStr(ud[dd],""+Ra[sd][ud[dd]])}else nd+=this.processTextOrObjNode(Ra[sd],sd,qa,td);return{attrStr:rd,val:nd}};Builder.prototype.buildAttrPairStr=function(Ra,qa){return qa=this.options.attributeValueProcessor(Ra,""+qa),qa=this.replaceEntitiesValue(qa),this.options.suppressBooleanAttributes&&qa==="true"?" "+Ra:" "+Ra+'="'+qa+'"'};function processTextOrObjNode(Ra,qa,td,rd){const nd=this.j2x(Ra,td+1,rd.concat(qa));return Ra[this.options.textNodeName]!==void 0&&Object.keys(Ra).length===1?this.buildTextValNode(Ra[this.options.textNodeName],qa,nd.attrStr,td):this.buildObjectNode(nd.val,qa,nd.attrStr,td)}Builder.prototype.buildObjectNode=function(Ra,qa,td,rd){if(Ra==="")return qa[0]==="?"?this.indentate(rd)+"<"+qa+td+"?"+this.tagEndChar:this.indentate(rd)+"<"+qa+td+this.closeTag(qa)+this.tagEndChar;{let nd="</"+qa+this.tagEndChar,ad="";return qa[0]==="?"&&(ad="?",nd=""),(td||td==="")&&Ra.indexOf("<")===-1?this.indentate(rd)+"<"+qa+td+ad+">"+Ra+nd:this.options.commentPropName!==!1&&qa===this.options.commentPropName&&ad.length===0?this.indentate(rd)+ ` <!-- $ { Ra } -- > ` +this.newLine:this.indentate(rd)+"<"+qa+td+ad+this.tagEndChar+Ra+this.indentate(rd)+nd}};Builder.prototype.closeTag=function(Ra){let qa="";return this.options.unpairedTags.indexOf(Ra)!==-1?this.options.suppressUnpairedNode||(qa="/"):this.options.suppressEmptyNode?qa="/":qa= ` > < /${Ra}`,qa};Builder.prototype.buildTextValNode=function(Ra,qa,td,rd){if(this.options.cdataPropName!==!1&&qa===this.options.cdataPropName)return this.indentate(rd)+`<![CDATA[${Ra}]]>`+this.newLine;if(this.options.commentPropName!==!1&&qa===this.options.commentPropName)return this.indentate(rd)+`<!--${Ra}-->`+this.newLine;if(qa[0]==="?")return this.indentate(rd)+"<"+qa+td+"?"+this.tagEndChar;{let nd=this.options.tagValueProcessor(qa,Ra);return nd=this.replaceEntitiesValue(nd),nd===""?this.indentate(rd)+"<"+qa+td+this.closeTag(qa)+this.tagEndChar:this.indentate(rd)+"<"+qa+td+">"+nd+"</ " + qa + this . tagEndChar } } ; Builder . prototype . replaceEntitiesValue = function ( Ra ) { if ( Ra && Ra . length > 0 && this . options . processEntities ) for ( let qa = 0 ; qa < this . op
2024-09-18 09:46:23 +08:00
* mime - db
* Copyright ( c ) 2014 Jonathan Ong
* Copyright ( c ) 2015 - 2022 Douglas Christopher Wilson
* MIT Licensed
* /var mimeDb=require$$0;/ * !
* mime - types
* Copyright ( c ) 2014 Jonathan Ong
* Copyright ( c ) 2015 Douglas Christopher Wilson
* MIT Licensed
2024-09-28 21:10:55 +08:00
* /(function(Ra){var qa=mimeDb,td=pathBrowserify.extname,rd=/ ^ \ s * ( [ ^ ; \ s ] * ) ( ? : ; | \ s | $ ) / , nd = /^text\//i ; Ra . charset = ad , Ra . charsets = { lookup : ad } , Ra . contentType = sd , Ra . extension = ud , Ra . extensions = Object . create ( null ) , Ra . lookup = cd , Ra . types = Object . create ( null ) , dd ( Ra . extensions , Ra . types ) ; function ad ( pd ) { if ( ! pd || typeof pd != "string" ) return ! 1 ; var fd = rd . exec ( pd ) , Td = fd && qa [ fd [ 1 ] . toLowerCase ( ) ] ; return Td && Td . charset ? Td . charset : fd && nd . test ( fd [ 1 ] ) ? "UTF-8" : ! 1 } function sd ( pd ) { if ( ! pd || typeof pd != "string" ) return ! 1 ; var fd = pd . indexOf ( "/" ) === - 1 ? Ra . lookup ( pd ) : pd ; if ( ! fd ) return ! 1 ; if ( fd . indexOf ( "charset" ) === - 1 ) { var Td = Ra . charset ( fd ) ; Td && ( fd += "; charset=" + Td . toLowerCase ( ) ) } return fd } function ud ( pd ) { if ( ! pd || typeof pd != "string" ) return ! 1 ; var fd = rd . exec ( pd ) , Td = fd && Ra . extensions [ fd [ 1 ] . toLowerCase ( ) ] ; return ! Td || ! Td . length ? ! 1 : Td [ 0 ] } function cd ( pd ) { if ( ! pd || typeof pd != "string" ) return ! 1 ; var fd = td ( "x." + pd ) . toLowerCase ( ) . substr ( 1 ) ; return fd && Ra . types [ fd ] || ! 1 } function dd ( pd , fd ) { var Td = [ "nginx" , "apache" , void 0 , "iana" ] ; Object . keys ( qa ) . forEach ( function ( Sd ) { var Dd = qa [ Sd ] , Ld = Dd . extensions ; if ( ! ( ! Ld || ! Ld . length ) ) { pd [ Sd ] = Ld ; for ( var Rd = 0 ; Rd < Ld . length ; Rd ++ ) { var Od = Ld [ Rd ] ; if ( fd [ Od ] ) { var Md = Td . indexOf ( qa [ fd [ Od ] ] . source ) , jd = Td . indexOf ( Dd . source ) ; if ( fd [ Od ] !== "application/octet-stream" && ( Md > jd || Md === jd && fd [ Od ] . substr ( 0 , 12 ) === "application/" ) ) continue } fd [ Od ] = Sd } } } ) } } ) ( mimeTypes$1 ) ; let ENCRYPTION _TYPES = function ( Ra ) { return Ra . SSEC = "SSE-C" , Ra . KMS = "KMS" , Ra } ( { } ) , RETENTION _MODES = function ( Ra ) { return Ra . GOVERNANCE = "GOVERNANCE" , Ra . COMPLIANCE = "COMPLIANCE" , Ra } ( { } ) , RETENTION _VALIDITY _UNITS = function ( Ra ) { return Ra . DAYS = "Days" , Ra . YEARS = "Years" , Ra } ( { } ) , LEGAL _HOLD _STATUS = function ( Ra ) { return Ra . ENABLED = "ON" , Ra . DISABLED = "OFF" , Ra } ( { } ) ; const MetaDataHeaderPrefix = "x-amz-meta-" ; function uriEscape ( Ra ) { return Ra . split ( "" ) . reduce ( ( qa , td ) => { const rd = Buffer$2 . from ( td ) ; if ( rd . length === 1 && ( "A" <= td && td <= "Z" || "a" <= td && td <= "z" || "0" <= td && td <= "9" || td === "_" || td === "." || td === "~" || td === "-" ) ) return qa = qa + td , qa ; for ( const nd of rd ) qa = qa + "%" + nd . toString ( 16 ) . toUpperCase ( ) ; return qa } , "" ) } function uriResourceEscape ( Ra ) { return uriEscape ( Ra ) . replace ( /%2F/g , "/" ) } function getScope ( Ra , qa , td = "s3" ) { return ` ${ makeDateShort ( qa ) } / ${ Ra } / ${ td } /aws4_request ` } function isAmazonEndpoint ( Ra ) { return Ra === "s3.amazonaws.com" || Ra === "s3.cn-north-1.amazonaws.com.cn" } function isVirtualHostStyle ( Ra , qa , td , rd ) { return qa === "https:" && td . includes ( "." ) ? ! 1 : isAmazonEndpoint ( Ra ) || ! rd } function isValidIP ( Ra ) { return ipaddr . isValid ( Ra ) } function isValidEndpoint ( Ra ) { return isValidDomain ( Ra ) || isValidIP ( Ra ) } function isValidDomain ( Ra ) { if ( ! isString$1 ( Ra ) || Ra . length === 0 || Ra . length > 255 || Ra [ 0 ] === "-" || Ra . slice ( - 1 ) === "-" || Ra [ 0 ] === "_" || Ra . slice ( - 1 ) === "_" || Ra [ 0 ] === "." ) return ! 1 ; const qa = "`~!@#$%^&*()+={}[]|\\\"';:><?/" ; for ( const td of qa ) if ( Ra . includes ( td ) ) return ! 1 ; return ! 0 } function probeContentType ( Ra ) { let qa = mimeTypes$1 . lookup ( Ra ) ; return qa || ( qa = "application/octet-stream" ) , qa } function isValidPort ( Ra ) { return isNumber$1 ( Ra ) ? 0 <= Ra && Ra <= 65535 : ! 1 } function isValidBucketName ( Ra ) { return ! isString$1 ( Ra ) || Ra . length < 3 || Ra . length > 63 || Ra . includes ( ".." ) || /[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/ . test ( Ra ) ? ! 1 : ! ! /^[a-z0-9][a-z0-9.-]+[a-z0-9]$/ . test ( Ra ) } function isValidObjectName ( Ra ) { return isValidPrefix ( Ra ) ? Ra . length !== 0 : ! 1 } function isValidPrefix ( Ra ) { return ! ( ! isString$1 ( Ra ) || Ra . length > 1024 ) } function isNumber$1 ( Ra ) { return typeof Ra == "number" } function isFunction$1 ( Ra ) { return typeof Ra == "function" } function isString$1 ( Ra ) { return typeof Ra == "string" } function isObject$1 ( Ra ) { return typeof Ra == "object" && Ra !== null } function isReadableStream$1 ( Ra ) { return isObject$1 ( Ra ) && isFunction$1 ( Ra . _read ) } function isBoolean$1 ( Ra ) { return typeof Ra == "boolean" } function isEmpty ( Ra ) { return _ . isEmpty ( Ra ) } function isEmptyObject ( Ra ) { return Object . values ( Ra ) . filter ( qa => qa !== void 0 ) . length !== 0 } function isDefined ( Ra ) { return Ra != null } function isValidDate ( Ra ) { return Ra instanceof Date && ! isNaN ( Ra ) } function makeDateLong ( Ra ) { Ra = Ra || new Date ; const qa = Ra . toISOString ( ) ; return qa . slice ( 0 , 4 ) + qa . slice ( 5 , 7 ) + qa . slice ( 8 , 13 ) + qa . slice ( 14 , 16 ) + qa . slice ( 17 , 19 ) + "Z" } function makeDateShort ( Ra ) { Ra = Ra || new Date ; const qa = Ra . toISOString ( ) ; return qa . slice ( 0 , 4 ) + qa . sl
2024-09-18 09:46:23 +08:00
` )+ `
2024-09-25 14:23:53 +08:00
` ,rd.join(";").toLowerCase(),nd].join( `
` )}function getCredential(Ra,qa,td,rd="s3"){if(!isString $ 1(Ra))throw new TypeError('accessKey should be of type "string"');if(!isString $ 1(qa))throw new TypeError('region should be of type "string"');if(!isObject $ 1(td))throw new TypeError('requestDate should be of type "object"');return ` $ { Ra } / $ { getScope ( qa , td , rd ) } ` }function getSignedHeaders(Ra){if(!isObject $ 1(Ra))throw new TypeError('request should be of type "object"');const qa=["authorization","content-length","content-type","user-agent"];return Object.keys(Ra).filter(td=>!qa.includes(td)).sort()}function getSigningKey(Ra,qa,td,rd="s3"){if(!isObject $ 1(Ra))throw new TypeError('date should be of type "object"');if(!isString $ 1(qa))throw new TypeError('region should be of type "string"');if(!isString $ 1(td))throw new TypeError('secretKey should be of type "string"');const nd=makeDateShort(Ra);return(void 0)("sha256",(void 0)("sha256",(void 0)("sha256",(void 0)("sha256","AWS4"+td).update(nd).digest()).update(qa).digest()).update(rd).digest()).update("aws4_request").digest()}function getStringToSign(Ra,qa,td,rd="s3"){if(!isString $ 1(Ra))throw new TypeError('canonicalRequest should be of type "string"');if(!isObject $ 1(qa))throw new TypeError('requestDate should be of type "object"');if(!isString $ 1(td))throw new TypeError('region should be of type "string"');const nd=(void 0)("sha256").update(Ra).digest("hex"),ad=getScope(td,qa,rd);return[signV4Algorithm,makeDateLong(qa),ad,nd].join( `
2024-09-28 21:10:55 +08:00
` )}function postPresignSignatureV4(Ra,qa,td,rd){if(!isString $ 1(Ra))throw new TypeError('region should be of type "string"');if(!isObject $ 1(qa))throw new TypeError('date should be of type "object"');if(!isString $ 1(td))throw new TypeError('secretKey should be of type "string"');if(!isString $ 1(rd))throw new TypeError('policyBase64 should be of type "string"');return(void 0)("sha256",getSigningKey(qa,Ra,td)).update(rd).digest("hex").toLowerCase()}function signV4(Ra,qa,td,rd,nd,ad,sd="s3"){if(!isObject $ 1(Ra))throw new TypeError('request should be of type "object"');if(!isString $ 1(qa))throw new TypeError('accessKey should be of type "string"');if(!isString $ 1(td))throw new TypeError('secretKey should be of type "string"');if(!isString $ 1(rd))throw new TypeError('region should be of type "string"');if(!qa)throw new AccessKeyRequiredError("accessKey is required for signing");if(!td)throw new SecretKeyRequiredError("secretKey is required for signing");const ud=getSignedHeaders(Ra.headers),cd=getCanonicalRequest(Ra.method,Ra.path,Ra.headers,ud,ad),dd=sd||"s3",pd=getStringToSign(cd,nd,rd,dd),fd=getSigningKey(nd,rd,td,dd),Td=getCredential(qa,rd,nd,dd),Ad=(void 0)("sha256",fd).update(pd).digest("hex").toLowerCase();return ` $ { signV4Algorithm } Credential = $ { Td } , SignedHeaders = $ { ud . join ( ";" ) . toLowerCase ( ) } , Signature = $ { Ad } ` }function presignSignatureV4(Ra,qa,td,rd,nd,ad,sd){if(!isObject $ 1(Ra))throw new TypeError('request should be of type "object"');if(!isString $ 1(qa))throw new TypeError('accessKey should be of type "string"');if(!isString $ 1(td))throw new TypeError('secretKey should be of type "string"');if(!isString $ 1(nd))throw new TypeError('region should be of type "string"');if(!qa)throw new AccessKeyRequiredError("accessKey is required for presigning");if(!td)throw new SecretKeyRequiredError("secretKey is required for presigning");if(!isNumber $ 1(sd))throw new TypeError('expires should be of type "number"');if(sd<1)throw new ExpiresParamError("expires param cannot be less than 1 seconds");if(sd>604800)throw new ExpiresParamError("expires param cannot be greater than 7 days");const ud=makeDateLong(ad),cd=getSignedHeaders(Ra.headers),dd=getCredential(qa,nd,ad),pd="UNSIGNED-PAYLOAD",fd=[];fd.push( ` X - Amz - Algorithm = $ { signV4Algorithm } ` ),fd.push( ` X - Amz - Credential = $ { uriEscape ( dd ) } ` ),fd.push( ` X - Amz - Date = $ { ud } ` ),fd.push( ` X - Amz - Expires = $ { sd } ` ),fd.push( ` X - Amz - SignedHeaders = $ { uriEscape ( cd . join ( ";" ) . toLowerCase ( ) ) } ` ),rd&&fd.push( ` X - Amz - Security - Token = $ { uriEscape ( rd ) } ` );const Td=Ra.path.split("?")[0];let Ad=Ra.path.split("?")[1];Ad?Ad=Ad+"&"+fd.join("&"):Ad=fd.join("&");const Sd=Td+"?"+Ad,Dd=getCanonicalRequest(Ra.method,Sd,Ra.headers,cd,pd),Ld=getStringToSign(Dd,ad,nd),Od=(void 0)("sha256",getSigningKey(ad,nd,td)).update(Ld).digest("hex").toLowerCase();return Ra.protocol+"//"+Ra.headers.host+Sd+ ` & X - Amz - Signature = $ { Od } ` }async function readAsBuffer(Ra){return new Promise((qa,td)=>{const rd=[];Ra.on("data",nd=>rd.push(nd)).on("error",nd=>td(nd)).on("end",()=>qa(Buffer $ 2.concat(rd)))})}async function readAsString(Ra){return(await readAsBuffer(Ra)).toString()}async function drainResponse(Ra){return new Promise((qa,td)=>{Ra.on("data",()=>{}).on("error",rd=>td(rd)).on("end",()=>qa())})}function parseBucketRegion(Ra){return parseXml(Ra).LocationConstraint}const fxp=new fxp $ 2.XMLParser;function parseError(Ra,qa){let td={};const rd=fxp.parse(Ra);rd.Error&&(td=rd.Error);const nd=new S3Error;return Object.entries(td).forEach(([ad,sd])=>{nd[ad.toLowerCase()]=sd}),Object.entries(qa).forEach(([ad,sd])=>{nd[ad]=sd}),nd}async function parseResponseError(Ra){const qa=Ra.statusCode;let td,rd;qa===301?(td="MovedPermanently",rd="Moved Permanently"):qa===307?(td="TemporaryRedirect",rd="Are you using the correct endpoint URL?"):qa===403?(td="AccessDenied",rd="Valid and authorized credentials required"):qa===404?(td="NotFound",rd="Not Found"):qa===405||qa===501?(td="MethodNotAllowed",rd="Method Not Allowed"):(td="UnknownError",rd= ` $ { qa } ` );const nd={};nd.amzRequestid=Ra.headers["x-amz-request-id"],nd.amzId2=Ra.headers["x-amz-id-2"],nd.amzBucketRegion=Ra.headers["x-amz-bucket
2024-09-25 14:23:53 +08:00
` )}),nd.write( `
` )};if(nd.write( ` REQUEST : $ { qa . method } $ { qa . path }
` ),ad(qa.headers),td&&(this.logStream.write( ` RESPONSE : $ { td . statusCode }
` ),ad(td.headers)),rd){nd.write( ` ERROR BODY :
` );const sd=JSON.stringify(rd,null," ");nd.write( ` $ { sd }
2024-09-28 21:10:55 +08:00
` )}}traceOn(qa){qa||(qa=define_process_default $ 3.stdout),this.logStream=qa}traceOff(){this.logStream=void 0}async makeRequestAsync(qa,td="",rd=[200],nd=""){if(!isObject $ 1(qa))throw new TypeError('options should be of type "object"');if(!isString $ 1(td)&&!isObject $ 1(td))throw new TypeError('payload should be of type "string" or "Buffer"');if(rd.forEach(sd=>{if(!isNumber $ 1(sd))throw new TypeError('statusCode should be of type "number"')}),!isString $ 1(nd))throw new TypeError('region should be of type "string"');qa.headers||(qa.headers={}),(qa.method==="POST"||qa.method==="PUT"||qa.method==="DELETE")&&(qa.headers["content-length"]=td.length.toString());const ad=this.enableSHA256?toSha256(td):"";return this.makeRequestStreamAsync(qa,td,ad,rd,nd)}async makeRequestAsyncOmit(qa,td="",rd=[200],nd=""){const ad=await this.makeRequestAsync(qa,td,rd,nd);return await drainResponse(ad),ad}async makeRequestStreamAsync(qa,td,rd,nd,ad){if(!isObject $ 1(qa))throw new TypeError('options should be of type "object"');if(!(Buffer $ 2.isBuffer(td)||typeof td=="string"||isReadableStream $ 1(td)))throw new InvalidArgumentError( ` stream should be a Buffer , string or readable Stream , got $ { typeof td } instead ` );if(!isString $ 1(rd))throw new TypeError('sha256sum should be of type "string"');if(nd.forEach(cd=>{if(!isNumber $ 1(cd))throw new TypeError('statusCode should be of type "number"')}),!isString $ 1(ad))throw new TypeError('region should be of type "string"');if(!this.enableSHA256&&rd.length!==0)throw new InvalidArgumentError("sha256sum expected to be empty for anonymous or https requests");if(this.enableSHA256&&rd.length!==64)throw new InvalidArgumentError( ` Invalid sha256sum : $ { rd } ` );await this.checkAndRefreshCreds(),ad=ad||await this.getBucketRegionAsync(qa.bucketName);const sd=this.getRequestOptions({...qa,region:ad});if(!this.anonymous){this.enableSHA256||(rd="UNSIGNED-PAYLOAD");const cd=new Date;sd.headers["x-amz-date"]=makeDateLong(cd),sd.headers["x-amz-content-sha256"]=rd,this.sessionToken&&(sd.headers["x-amz-security-token"]=this.sessionToken),sd.headers.authorization=signV4(sd,this.accessKey,this.secretKey,ad,cd,rd)}const ud=await request $ 1(this.transport,sd,td);if(!ud.statusCode)throw new Error("BUG: response doesn't have a statusCode");if(!nd.includes(ud.statusCode)){delete this.regionMap[qa.bucketName];const cd=await parseResponseError(ud);throw this.logHTTP(sd,ud,cd),cd}return this.logHTTP(sd,ud),ud}async getBucketRegionAsync(qa){if(!isValidBucketName(qa))throw new InvalidBucketNameError( ` Invalid bucket name : $ { qa } ` );if(this.region)return this.region;const td=this.regionMap[qa];if(td)return td;const rd=async dd=>{const pd=await readAsString(dd),fd=parseBucketRegion(pd)||DEFAULT_REGION;return this.regionMap[qa]=fd,fd},nd="GET",ad="location",sd=this.pathStyle&&!isBrowser_1;let ud;try{const dd=await this.makeRequestAsync({method:nd,bucketName:qa,query:ad,pathStyle:sd},"",[200],DEFAULT_REGION);return rd(dd)}catch(dd){if(dd.name!=="AuthorizationHeaderMalformed"||(ud=dd.Region,!ud))throw dd}const cd=await this.makeRequestAsync({method:nd,bucketName:qa,query:ad,pathStyle:sd},"",[200],ud);return await rd(cd)}makeRequest(qa,td="",rd=[200],nd="",ad,sd){let ud;ad?ud=this.makeRequestAsync(qa,td,rd,nd):ud=this.makeRequestAsyncOmit(qa,td,rd,nd),ud.then(cd=>sd(null,cd),cd=>{sd(cd)})}makeRequestStream(qa,td,rd,nd,ad,sd,ud){(async()=>{const dd=await this.makeRequestStreamAsync(qa,td,rd,nd,ad);return sd||await drainResponse(dd),dd})().then(dd=>ud(null,dd),dd=>ud(dd))}getBucketRegion(qa,td){return this.getBucketRegionAsync(qa).then(rd=>td(null,rd),rd=>td(rd))}async removeBucket(qa){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);await this.makeRequestAsyncOmit({method:"DELETE",bucketName:qa},"",[204]),delete this.regionMap[qa]}async statObject(qa,td,rd={}){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isValidObjectName(td))throw new InvalidObjectNameError( ` Invalid object name : $ { td } ` );if(!isObject $ 1(rd))throw new InvalidArgumentError('statOpts should be of type "object"');const
2024-09-18 09:46:23 +08:00
object - assign
( c ) Sindre Sorhus
@ license MIT
2024-09-25 14:23:53 +08:00
* /var objectAssign,hasRequiredObjectAssign;function requireObjectAssign(){if(hasRequiredObjectAssign)return objectAssign;hasRequiredObjectAssign=1;var Ra=Object.getOwnPropertySymbols,qa=Object.prototype.hasOwnProperty,td=Object.prototype.propertyIsEnumerable;function rd(ad){if(ad==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(ad)}function nd(){try{if(!Object.assign)return!1;var ad=new String("abc");if(ad[5]="de",Object.getOwnPropertyNames(ad)[0]==="5")return!1;for(var sd={},ud=0;ud<10;ud++)sd["_"+String.fromCharCode(ud)]=ud;var cd=Object.getOwnPropertyNames(sd).map(function(pd){return sd[pd]});if(cd.join("")!=="0123456789")return!1;var dd={};return"abcdefghijklmnopqrst".split("").forEach(function(pd){dd[pd]=pd}),Object.keys(Object.assign({},dd)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return objectAssign=nd()?Object.assign:function(ad,sd){for(var ud,cd=rd(ad),dd,pd=1;pd<arguments.length;pd++){ud=Object(arguments[pd]);for(var fd in ud)qa.call(ud,fd)&&(cd[fd]=ud[fd]);if(Ra){dd=Ra(ud);for(var Td=0;Td<dd.length;Td++)td.call(ud,dd[Td])&&(cd[dd[Td]]=ud[dd[Td]])}}return cd},objectAssign}var ajax={},hasRequiredAjax;function requireAjax(){return hasRequiredAjax||(hasRequiredAjax=1,function(Ra){Ra.__esModule=!0,Ra.default=qa;function qa(td,rd){return rd===void 0&&(rd={}),new Promise(function(nd,ad){var sd=rd,ud=sd.async,cd=ud===void 0?!0:ud,dd=sd.data,pd=dd===void 0?null:dd,fd=sd.headers,Td=fd===void 0?{}:fd,Ad=sd.method,Sd=Ad===void 0?"get":Ad,Dd=sd.timeout,Ld=Dd===void 0?0:Dd,Rd=sd.onprogress,Od=new XMLHttpRequest,Md;Ld&&(Md=setTimeout(function(){ad(new Error("the request timeout "+Ld+"ms"))},Ld)),Od.onerror=function(){ad(new Error("unknown error"))},Od.upload&&(Od.upload.onprogress=Rd),Od.onreadystatechange=function(){if(Od.readyState===4)if(Ld&&clearTimeout(Md),Od.status>=200&&Od.status<300)nd(Od.response,Od);else{var jd=new Error("the request is error");ad(jd)}},Od.open(Sd,td,cd),Object.keys(Td).forEach(function(jd){Od.setRequestHeader(jd,Td[jd])});try{Od.send(pd)}catch(jd){ad(jd)}})}}(ajax)),ajax}var utils$2={},md5={exports:{}},crypt={exports:{}},hasRequiredCrypt;function requireCrypt(){return hasRequiredCrypt||(hasRequiredCrypt=1,function(){var Ra="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/ ",qa={rotl:function(td,rd){return td<<rd|td>>>32-rd},rotr:function(td,rd){return td<<32-rd|td>>>rd},endian:function(td){if(td.constructor==Number)return qa.rotl(td,8)&16711935|qa.rotl(td,24)&4278255360;for(var rd=0;rd<td.length;rd++)td[rd]=qa.endian(td[rd]);return td},randomBytes:function(td){for(var rd=[];td>0;td--)rd.push(Math.floor(Math.random()*256));return rd},bytesToWords:function(td){for(var rd=[],nd=0,ad=0;nd<td.length;nd++,ad+=8)rd[ad>>>5]|=td[nd]<<24-ad%32;return rd},wordsToBytes:function(td){for(var rd=[],nd=0;nd<td.length*32;nd+=8)rd.push(td[nd>>>5]>>>24-nd%32&255);return rd},bytesToHex:function(td){for(var rd=[],nd=0;nd<td.length;nd++)rd.push((td[nd]>>>4).toString(16)),rd.push((td[nd]&15).toString(16));return rd.join(" ")},hexToBytes:function(td){for(var rd=[],nd=0;nd<td.length;nd+=2)rd.push(parseInt(td.substr(nd,2),16));return rd},bytesToBase64:function(td){for(var rd=[],nd=0;nd<td.length;nd+=3)for(var ad=td[nd]<<16|td[nd+1]<<8|td[nd+2],sd=0;sd<4;sd++)nd*8+sd*6<=td.length*8?rd.push(Ra.charAt(ad>>>6*(3-sd)&63)):rd.push(" = ");return rd.join(" ")},base64ToBytes:function(td){td=td.replace(/[^A-Z0-9+\/]/ig," " ) ; for ( var rd = [ ] , nd = 0 , ad = 0 ; nd < td . length ; ad = ++ nd % 4 ) ad != 0 && rd . push ( ( Ra . indexOf ( td . charAt ( nd - 1 ) ) & Math . pow ( 2 , - 2 * ad + 8 ) - 1 ) << ad * 2 | Ra . indexOf ( td . charAt ( nd ) ) >>> 6 - ad * 2 ) ; return rd } } ; crypt . exports = qa } ( ) ) , crypt . exports } var charenc _1 , hasRequiredCharenc ; function requireCharenc ( ) { if ( hasRequiredCharenc ) return charenc _1 ; hasRequiredCharenc = 1 ; var Ra = { utf8 : { stringToBytes : function ( qa ) { return Ra . bin . stringToBytes ( unescape ( encodeURIComponent ( qa ) ) ) } , bytesToString : function ( qa ) { return decodeURIComponent ( escape ( Ra . bin . bytesToString ( qa ) ) ) } } , bin : { stringToBytes : function ( qa ) { for ( var td = [ ] , rd = 0 ; rd < qa . length ; rd ++ ) td . push ( qa . charCodeAt ( rd ) & 255 ) ; return td } , bytesToString : function ( qa ) {
2024-09-18 09:46:23 +08:00
* Determine if an object is a Buffer
*
* @ author Feross Aboukhadijeh < https : //feross.org>
* @ license MIT
2024-09-25 14:23:53 +08:00
* / v a r i s B u f f e r _ 1 , h a s R e q u i r e d I s B u f f e r ; f u n c t i o n r e q u i r e I s B u f f e r ( ) { i f ( h a s R e q u i r e d I s B u f f e r ) r e t u r n i s B u f f e r _ 1 ; h a s R e q u i r e d I s B u f f e r = 1 , i s B u f f e r _ 1 = f u n c t i o n ( t d ) { r e t u r n t d ! = n u l l & & ( R a ( t d ) | | q a ( t d ) | | ! ! t d . _ i s B u f f e r ) } ; f u n c t i o n R a ( t d ) { r e t u r n ! ! t d . c o n s t r u c t o r & & t y p e o f t d . c o n s t r u c t o r . i s B u f f e r = = " f u n c t i o n " & & t d . c o n s t r u c t o r . i s B u f f e r ( t d ) } f u n c t i o n q a ( t d ) { r e t u r n t y p e o f t d . r e a d F l o a t L E = = " f u n c t i o n " & & t y p e o f t d . s l i c e = = " f u n c t i o n " & & R a ( t d . s l i c e ( 0 , 0 ) ) } r e t u r n i s B u f f e r _ 1 } v a r h a s R e q u i r e d M d 5 ; f u n c t i o n r e q u i r e M d 5 ( ) { r e t u r n h a s R e q u i r e d M d 5 | | ( h a s R e q u i r e d M d 5 = 1 , f u n c t i o n ( ) { v a r R a = r e q u i r e C r y p t ( ) , q a = r e q u i r e C h a r e n c ( ) . u t f 8 , t d = r e q u i r e I s B u f f e r ( ) , r d = r e q u i r e C h a r e n c ( ) . b i n , n d = f u n c t i o n ( a d , s d ) { a d . c o n s t r u c t o r = = S t r i n g ? s d & & s d . e n c o d i n g = = = " b i n a r y " ? a d = r d . s t r i n g T o B y t e s ( a d ) : a d = q a . s t r i n g T o B y t e s ( a d ) : t d ( a d ) ? a d = A r r a y . p r o t o t y p e . s l i c e . c a l l ( a d , 0 ) : ! A r r a y . i s A r r a y ( a d ) & & a d . c o n s t r u c t o r ! = = U i n t 8 A r r a y & & ( a d = a d . t o S t r i n g ( ) ) ; f o r ( v a r u d = R a . b y t e s T o W o r d s ( a d ) , c d = a d . l e n g t h * 8 , d d = 1 7 3 2 5 8 4 1 9 3 , p d = - 2 7 1 7 3 3 8 7 9 , f d = - 1 7 3 2 5 8 4 1 9 4 , T d = 2 7 1 7 3 3 8 7 8 , A d = 0 ; A d < u d . l e n g t h ; A d + + ) u d [ A d ] = ( u d [ A d ] < < 8 | u d [ A d ] > > > 2 4 ) & 1 6 7 1 1 9 3 5 | ( u d [ A d ] < < 2 4 | u d [ A d ] > > > 8 ) & 4 2 7 8 2 5 5 3 6 0 ; u d [ c d > > > 5 ] | = 1 2 8 < < c d % 3 2 , u d [ ( c d + 6 4 > > > 9 < < 4 ) + 1 4 ] = c d ; f o r ( v a r S d = n d . _ f f , D d = n d . _ g g , L d = n d . _ h h , R d = n d . _ i i , A d = 0 ; A d < u d . l e n g t h ; A d + = 1 6 ) { v a r O d = d d , M d = p d , j d = f d , U d = T d ; d d = S d ( d d , p d , f d , T d , u d [ A d + 0 ] , 7 , - 6 8 0 8 7 6 9 3 6 ) , T d = S d ( T d , d d , p d , f d , u d [ A d + 1 ] , 1 2 , - 3 8 9 5 6 4 5 8 6 ) , f d = S d ( f d , T d , d d , p d , u d [ A d + 2 ] , 1 7 , 6 0 6 1 0 5 8 1 9 ) , p d = S d ( p d , f d , T d , d d , u d [ A d + 3 ] , 2 2 , - 1 0 4 4 5 2 5 3 3 0 ) , d d = S d ( d d , p d , f d , T d , u d [ A d + 4 ] , 7 , - 1 7 6 4 1 8 8 9 7 ) , T d = S d ( T d , d d , p d , f d , u d [ A d + 5 ] , 1 2 , 1 2 0 0 0 8 0 4 2 6 ) , f d = S d ( f d , T d , d d , p d , u d [ A d + 6 ] , 1 7 , - 1 4 7 3 2 3 1 3 4 1 ) , p d = S d ( p d , f d , T d , d d , u d [ A d + 7 ] , 2 2 , - 4 5 7 0 5 9 8 3 ) , d d = S d ( d d , p d , f d , T d , u d [ A d + 8 ] , 7 , 1 7 7 0 0 3 5 4 1 6 ) , T d = S d ( T d , d d , p d , f d , u d [ A d + 9 ] , 1 2 , - 1 9 5 8 4 1 4 4 1 7 ) , f d = S d ( f d , T d , d d , p d , u d [ A d + 1 0 ] , 1 7 , - 4 2 0 6 3 ) , p d = S d ( p d , f d , T d , d d , u d [ A d + 1 1 ] , 2 2 , - 1 9 9 0 4 0 4 1 6 2 ) , d d = S d ( d d , p d , f d , T d , u d [ A d + 1 2 ] , 7 , 1 8 0 4 6 0 3 6 8 2 ) , T d = S d ( T d , d d , p d , f d , u d [ A d + 1 3 ] , 1 2 , - 4 0 3 4 1 1 0 1 ) , f d = S d ( f d , T d , d d , p d , u d [ A d + 1 4 ] , 1 7 , - 1 5 0 2 0 0 2 2 9 0 ) , p d = S d ( p d , f d , T d , d d , u d [ A d + 1 5 ] , 2 2 , 1 2 3 6 5 3 5 3 2 9 ) , d d = D d ( d d , p d , f d , T d , u d [ A d + 1 ] , 5 , - 1 6 5 7 9 6 5 1 0 ) , T d = D d ( T d , d d , p d , f d , u d [ A d + 6 ] , 9 , - 1 0 6 9 5 0 1 6 3 2 ) , f d = D d ( f d , T d , d d , p d , u d [ A d + 1 1 ] , 1 4 , 6 4 3 7 1 7 7 1 3 ) , p d = D d ( p d , f d , T d , d d , u d [ A d + 0 ] , 2 0 , - 3 7 3 8 9 7 3 0 2 ) , d d = D d ( d d , p d , f d , T d , u d [ A d + 5 ] , 5 , - 7 0 1 5 5 8 6 9 1 ) , T d = D d ( T d , d d , p d , f d , u d [ A d + 1 0 ] , 9 , 3 8 0 1 6 0 8 3 ) , f d = D d ( f d , T d , d d , p d , u d [ A d + 1 5 ] , 1 4 , - 6 6 0 4 7 8 3 3 5 ) , p d = D d ( p d , f d , T d , d d , u d [ A d + 4 ] , 2 0 , - 4 0 5 5 3 7 8 4 8 ) , d d = D d ( d d , p d , f d , T d , u d [ A d + 9 ] , 5 , 5 6 8 4 4 6 4 3 8 ) , T d = D d ( T d , d d , p d , f d , u d [ A d + 1 4 ] , 9 , - 1 0 1 9 8 0 3 6 9 0 ) , f d = D d ( f d , T d , d d , p d , u d [ A d + 3 ] , 1 4 , - 1 8 7 3 6 3 9 6 1 ) , p d = D d ( p d , f d , T d , d d , u d [ A d + 8 ] , 2 0 , 1 1 6 3 5 3 1 5 0 1 ) , d d = D d ( d d , p d , f d , T d , u d [ A d + 1 3 ] , 5 , - 1 4 4 4 6 8 1 4 6 7 ) , T d = D d ( T d , d d , p d , f d , u d [ A d + 2 ] , 9 , - 5 1 4 0 3 7 8 4 ) , f d = D d ( f d , T d , d d , p d , u d [ A d + 7 ] , 1 4 , 1 7 3 5 3 2 8 4 7 3 ) , p d = D d ( p d , f d , T d , d d , u d [ A d + 1 2 ] , 2 0 , - 1 9 2 6 6 0 7 7 3 4 ) , d d = L d ( d d , p d , f d , T d , u d [ A d + 5 ] , 4 , - 3 7 8 5 5 8 ) , T d = L d ( T d , d d , p d , f d , u d [ A d + 8 ] , 1 1 , - 2 0 2 2 5 7 4 4 6 3 ) , f d = L d ( f d , T d , d d , p d , u d [ A d + 1 1 ] , 1 6 , 1 8 3 9 0 3 0 5 6 2 ) , p d = L d ( p d , f d , T d , d d , u d [ A d + 1 4 ] , 2 3 , - 3 5 3 0 9 5 5 6 ) , d d = L d ( d d , p d , f d , T d , u d [ A d + 1 ] , 4 , - 1 5 3 0 9 9 2 0 6 0 ) , T d = L d ( T d , d d , p d , f d , u d [ A d + 4 ] , 1 1 , 1 2 7 2 8 9 3 3 5 3 ) , f d = L d ( f d , T d , d d , p d , u d [ A d + 7 ] , 1 6 , - 1 5 5 4 9 7 6 3 2 ) , p d = L d ( p d , f d , T d , d d , u d [ A d + 1 0 ] , 2 3 , - 1 0 9 4 7 3 0 6 4 0 ) , d d = L d ( d d , p d , f d , T d , u d [ A d + 1 3 ] , 4 , 6 8 1 2 7 9 1 7 4 ) , T d = L d ( T d , d d , p d , f d , u d [ A d + 0 ] , 1 1 , - 3 5 8 5 3 7 2 2 2 ) , f d = L d ( f d , T d , d d , p d , u d [ A d + 3 ] , 1 6 , - 7 2 2 5 2 1 9 7 9 ) , p d = L d ( p d , f d , T d , d d , u d [ A d + 6 ] , 2 3 , 7 6 0 2 9 1 8 9 ) , d d = L d ( d d , p d , f d , T d , u d [ A d + 9 ] , 4 , - 6 4 0 3 6 4 4 8 7 ) , T d = L d ( T d , d d , p d , f d , u d [ A d + 1 2 ] , 1 1 , - 4 2 1 8 1 5 8 3 5 ) , f d = L d ( f d , T d , d d , p d , u d [ A d + 1 5 ] , 1 6 , 5 3 0 7 4 2 5 2 0 ) , p d = L d ( p d , f d , T d , d d , u d [ A d + 2 ] , 2 3 , - 9 9 5 3 3 8 6 5 1 ) , d d = R d ( d d , p d , f d , T d , u d [ A d + 0 ] , 6 , - 1 9 8 6 3 0 8 4 4 ) , T d = R d ( T d , d d , p d , f d , u d [ A d + 7 ] , 1 0 , 1 1 2 6 8 9 1 4 1 5 ) , f d = R d ( f d , T d , d d , p d , u d [ A d + 1 4 ] , 1 5 , - 1 4 1 6 3 5 4 9 0 5 ) , p d = R d ( p d , f d , T d , d d , u d [ A d + 5 ] , 2 1 , - 5 7 4 3 4 0 5 5 ) , d d = R d ( d d , p d , f d , T d , u d [ A d + 1 2 ] , 6 , 1 7 0 0 4 8 5 5 7 1 ) , T d = R d ( T d , d d , p d , f d , u d [ A d + 3 ] , 1 0 , - 1 8 9 4 9 8 6 6 0 6 ) , f d = R d ( f d , T d , d d , p d , u d [ A d + 1 0 ] , 1 5 , - 1 0 5 1 5 2 3 ) , p d = R d ( p d , f d , T d , d d , u d [ A d + 1 ] , 2 1 , - 2 0 5 4 9 2 2 7 9 9 ) , d d = R d ( d d , p d , f d , T d , u d [ A d + 8 ] , 6 , 1 8 7 3 3 1 3 3 5 9 ) , T d = R d ( T d , d d , p d , f d , u d [ A d + 1 5 ] , 1 0 , - 3 0 6 1 1 7 4 4 ) , f d = R d ( f d , T d , d d , p d , u d [ A d + 6 ] , 1 5 , - 1 5 6 0 1 9 8 3 8 0 ) , p d = R d ( p d , f d , T d , d d , u d [ A d + 1 3 ] , 2 1 , 1 3 0 9 1 5 1 6 4 9 ) , d d = R d ( d d , p d , f d , T d , u d [ A d + 4 ] , 6 , - 1 4 5 5 2 3 0 7 0 ) , T d = R d ( T d , d d , p d , f d , u d [ A d + 1 1 ] , 1 0 , - 1 1 2 0 2 1 0 3 7 9 ) , f d = R d ( f d , T d , d d , p d , u d [ A d + 2 ] , 1 5 , 7 1 8 7 8 7 2 5 9 ) , p d = R d ( p d , f d , T d , d d , u d [ A d + 9 ] , 2 1 , - 3 4 3 4 8 5 5 5 1 ) , d d = d d + O d > > > 0 , p d = p d + M d > > > 0 , f d = f d + j d > > > 0 , T d = T d + U d > > > 0 } r e t u r n R a . e n d i a n ( [ d d , p d , f d , T d ] ) } ; n d . _ f f = f u n c t i o n ( a d , s d , u d , c d , d d , p d , f d ) { v a r T d = a d + ( s d & u d | ~ s d & c d ) + ( d d > > > 0 ) + f d ; r e t u r n ( T d < < p d | T d > > > 3 2 - p d ) + s d } , n d . _ g g = f u n c t i o n ( a d , s
2024-09-18 09:46:23 +08:00
* !
* ! Copyright 2011 - 2012 , 2014 Jean - Christophe Sirot < sirot @ chelonix . com >
* !
* ! This file is part of digest . js
* !
* ! digest . js is free software : you can redistribute it and / or modify it under
* ! the terms of the GNU General Public License as published by the Free Software
* ! Foundation , either version 3 of the License , or ( at your option ) any later
* ! version .
* !
* ! digest . js is distributed in the hope that it will be useful , but
* ! WITHOUT ANY WARRANTY ; without even the implied warranty of MERCHANTABILITY
* ! or FITNESS FOR A PARTICULAR PURPOSE . See the GNU General Public License for
* ! more details .
* !
* ! You should have received a copy of the GNU General Public License along with
* ! digest . js . If not , see http : //www.gnu.org/licenses/.
* !
2024-09-25 14:23:53 +08:00
* ! * * * * * END LICENSE BLOCK * * * * * * / v a r h a s R e q u i r e d D i g e s t ; f u n c t i o n r e q u i r e D i g e s t ( ) { r e t u r n h a s R e q u i r e d D i g e s t | | ( h a s R e q u i r e d D i g e s t = 1 , f u n c t i o n ( R a , q a ) { ( f u n c t i o n ( ) { A r r a y B u f f e r . p r o t o t y p e . s l i c e | | ( A r r a y B u f f e r . p r o t o t y p e . s l i c e = f u n c t i o n ( t d , r d ) { v a r n d , a d = n e w U i n t 8 A r r a y ( t h i s ) ; r d = = = v o i d 0 & & ( r d = a d . l e n g t h ) ; v a r s d = n e w A r r a y B u f f e r ( r d - t d ) , u d = n e w U i n t 8 A r r a y ( s d ) ; f o r ( n d = 0 ; n d < u d . l e n g t h ; n d + + ) u d [ n d ] = a d [ n d + t d ] ; r e t u r n s d } ) } ) ( ) , f u n c t i o n ( t d ) { f u n c t i o n r d ( ) { } r d . p r o t o t y p e . p r o c e s s B l o c k = f u n c t i o n ( p d ) { v a r f d = t h i s . c u r r e n t [ 0 ] , T d = t h i s . c u r r e n t [ 1 ] , A d = t h i s . c u r r e n t [ 2 ] , S d = t h i s . c u r r e n t [ 3 ] , D d = t h i s . c u r r e n t [ 4 ] , L d = [ p d [ 0 ] < < 2 4 | p d [ 1 ] < < 1 6 | p d [ 2 ] < < 8 | p d [ 3 ] , p d [ 4 ] < < 2 4 | p d [ 5 ] < < 1 6 | p d [ 6 ] < < 8 | p d [ 7 ] , p d [ 8 ] < < 2 4 | p d [ 9 ] < < 1 6 | p d [ 1 0 ] < < 8 | p d [ 1 1 ] , p d [ 1 2 ] < < 2 4 | p d [ 1 3 ] < < 1 6 | p d [ 1 4 ] < < 8 | p d [ 1 5 ] , p d [ 1 6 ] < < 2 4 | p d [ 1 7 ] < < 1 6 | p d [ 1 8 ] < < 8 | p d [ 1 9 ] , p d [ 2 0 ] < < 2 4 | p d [ 2 1 ] < < 1 6 | p d [ 2 2 ] < < 8 | p d [ 2 3 ] , p d [ 2 4 ] < < 2 4 | p d [ 2 5 ] < < 1 6 | p d [ 2 6 ] < < 8 | p d [ 2 7 ] , p d [ 2 8 ] < < 2 4 | p d [ 2 9 ] < < 1 6 | p d [ 3 0 ] < < 8 | p d [ 3 1 ] , p d [ 3 2 ] < < 2 4 | p d [ 3 3 ] < < 1 6 | p d [ 3 4 ] < < 8 | p d [ 3 5 ] , p d [ 3 6 ] < < 2 4 | p d [ 3 7 ] < < 1 6 | p d [ 3 8 ] < < 8 | p d [ 3 9 ] , p d [ 4 0 ] < < 2 4 | p d [ 4 1 ] < < 1 6 | p d [ 4 2 ] < < 8 | p d [ 4 3 ] , p d [ 4 4 ] < < 2 4 | p d [ 4 5 ] < < 1 6 | p d [ 4 6 ] < < 8 | p d [ 4 7 ] , p d [ 4 8 ] < < 2 4 | p d [ 4 9 ] < < 1 6 | p d [ 5 0 ] < < 8 | p d [ 5 1 ] , p d [ 5 2 ] < < 2 4 | p d [ 5 3 ] < < 1 6 | p d [ 5 4 ] < < 8 | p d [ 5 5 ] , p d [ 5 6 ] < < 2 4 | p d [ 5 7 ] < < 1 6 | p d [ 5 8 ] < < 8 | p d [ 5 9 ] , p d [ 6 0 ] < < 2 4 | p d [ 6 1 ] < < 1 6 | p d [ 6 2 ] < < 8 | p d [ 6 3 ] ] , R d , O d ; f o r ( O d = 1 6 ; O d < 8 0 ; O d + + ) L d . p u s h ( ( L d [ O d - 3 ] ^ L d [ O d - 8 ] ^ L d [ O d - 1 4 ] ^ L d [ O d - 1 6 ] ) < < 1 | ( L d [ O d - 3 ] ^ L d [ O d - 8 ] ^ L d [ O d - 1 4 ] ^ L d [ O d - 1 6 ] ) > > > 3 1 ) ; f o r ( O d = 0 ; O d < 8 0 ; O d + + ) R d = ( f d < < 5 | f d > > > 2 7 ) + D d + L d [ O d ] , O d < 2 0 ? R d + = ( T d & A d | ~ T d & S d ) + 1 5 1 8 5 0 0 2 4 9 | 0 : O d < 4 0 ? R d + = ( T d ^ A d ^ S d ) + 1 8 5 9 7 7 5 3 9 3 | 0 : O d < 6 0 ? R d + = ( T d & A d | T d & S d | A d & S d ) + 2 4 0 0 9 5 9 7 0 8 | 0 : R d + = ( T d ^ A d ^ S d ) + 3 3 9 5 4 6 9 7 8 2 | 0 , D d = S d , S d = A d , A d = T d < < 3 0 | T d > > > 2 , T d = f d , f d = R d ; t h i s . c u r r e n t [ 0 ] + = f d , t h i s . c u r r e n t [ 1 ] + = T d , t h i s . c u r r e n t [ 2 ] + = A d , t h i s . c u r r e n t [ 3 ] + = S d , t h i s . c u r r e n t [ 4 ] + = D d , t h i s . c u r r e n t L e n + = 6 4 } , r d . p r o t o t y p e . d o P a d d i n g = f u n c t i o n ( ) { v a r p d = ( t h i s . i n L e n + t h i s . c u r r e n t L e n ) * 8 , f d = 0 , T d = p d & 4 2 9 4 9 6 7 2 9 5 , A d = t h i s . i n L e n < = 5 5 ? 5 5 - t h i s . i n L e n : 1 1 9 - t h i s . i n L e n , S d = n e w U i n t 8 A r r a y ( n e w A r r a y B u f f e r ( A d + 1 + 8 ) ) ; r e t u r n S d [ 0 ] = 1 2 8 , S d [ S d . l e n g t h - 1 ] = T d & 2 5 5 , S d [ S d . l e n g t h - 2 ] = T d > > > 8 & 2 5 5 , S d [ S d . l e n g t h - 3 ] = T d > > > 1 6 & 2 5 5 , S d [ S d . l e n g t h - 4 ] = T d > > > 2 4 & 2 5 5 , S d [ S d . l e n g t h - 5 ] = f d & 2 5 5 , S d [ S d . l e n g t h - 6 ] = f d > > > 8 & 2 5 5 , S d [ S d . l e n g t h - 7 ] = f d > > > 1 6 & 2 5 5 , S d [ S d . l e n g t h - 8 ] = f d > > > 2 4 & 2 5 5 , S d } , r d . p r o t o t y p e . g e t D i g e s t = f u n c t i o n ( ) { v a r p d = n e w U i n t 8 A r r a y ( n e w A r r a y B u f f e r ( 2 0 ) ) ; r e t u r n p d [ 3 ] = t h i s . c u r r e n t [ 0 ] & 2 5 5 , p d [ 2 ] = t h i s . c u r r e n t [ 0 ] > > > 8 & 2 5 5 , p d [ 1 ] = t h i s . c u r r e n t [ 0 ] > > > 1 6 & 2 5 5 , p d [ 0 ] = t h i s . c u r r e n t [ 0 ] > > > 2 4 & 2 5 5 , p d [ 7 ] = t h i s . c u r r e n t [ 1 ] & 2 5 5 , p d [ 6 ] = t h i s . c u r r e n t [ 1 ] > > > 8 & 2 5 5 , p d [ 5 ] = t h i s . c u r r e n t [ 1 ] > > > 1 6 & 2 5 5 , p d [ 4 ] = t h i s . c u r r e n t [ 1 ] > > > 2 4 & 2 5 5 , p d [ 1 1 ] = t h i s . c u r r e n t [ 2 ] & 2 5 5 , p d [ 1 0 ] = t h i s . c u r r e n t [ 2 ] > > > 8 & 2 5 5 , p d [ 9 ] = t h i s . c u r r e n t [ 2 ] > > > 1 6 & 2 5 5 , p d [ 8 ] = t h i s . c u r r e n t [ 2 ] > > > 2 4 & 2 5 5 , p d [ 1 5 ] = t h i s . c u r r e n t [ 3 ] & 2 5 5 , p d [ 1 4 ] = t h i s . c u r r e n t [ 3 ] > > > 8 & 2 5 5 , p d [ 1 3 ] = t h i s . c u r r e n t [ 3 ] > > > 1 6 & 2 5 5 , p d [ 1 2 ] = t h i s . c u r r e n t [ 3 ] > > > 2 4 & 2 5 5 , p d [ 1 9 ] = t h i s . c u r r e n t [ 4 ] & 2 5 5 , p d [ 1 8 ] = t h i s . c u r r e n t [ 4 ] > > > 8 & 2 5 5 , p d [ 1 7 ] = t h i s . c u r r e n t [ 4 ] > > > 1 6 & 2 5 5 , p d [ 1 6 ] = t h i s . c u r r e n t [ 4 ] > > > 2 4 & 2 5 5 , p d . b u f f e r } , r d . p r o t o t y p e . r e s e t = f u n c t i o n ( ) { t h i s . c u r r e n t L e n = 0 , t h i s . i n L e n = 0 , t h i s . c u r r e n t = n e w U i n t 3 2 A r r a y ( n e w A r r a y B u f f e r ( 2 0 ) ) , t h i s . c u r r e n t [ 0 ] = 1 7 3 2 5 8 4 1 9 3 , t h i s . c u r r e n t [ 1 ] = 4 0 2 3 2 3 3 4 1 7 , t h i s . c u r r e n t [ 2 ] = 2 5 6 2 3 8 3 1 0 2 , t h i s . c u r r e n t [ 3 ] = 2 7 1 7 3 3 8 7 8 , t h i s . c u r r e n t [ 4 ] = 3 2 8 5 3 7 7 5 2 0 } , r d . p r o t o t y p e . b l o c k L e n = 6 4 , r d . p r o t o t y p e . d i g e s t L e n = 2 0 ; v a r n d = f u n c t i o n ( p d ) { v a r f d = n e w A r r a y B u f f e r ( p d . l e n g t h ) , T d = n e w U i n t 8 A r r a y ( f d ) , A d ; f o r ( A d = 0 ; A d < p d . l e n g t h ; A d + + ) T d [ A d ] = p d . c h a r C o d e A t ( A d ) ; r e t u r n T d } , a d = f u n c t i o n ( p d ) { v a r f d = n e w A r r a y B u f f e r ( 1 ) , T d = n e w U i n t 8 A r r a y ( f d ) ; r e t u r n T d [ 0 ] = p d , T d } , s d = f u n c t i o n ( p d ) { i f ( p d . c o n s t r u c t o r = = = U i n t 8 A r r a y ) r e t u r n p d ; i f ( p d . c o n s t r u c t o r = = = A r r a y B u f f e r ) r e t u r n n e w U i n t 8 A r r a y ( p d ) ; i f ( p d . c o n s t r u c t o r = = = S t r i n g ) r e t u r n n d ( p d ) ; i f ( p d . c o n s t r u c t o r = = = N u m b e r ) { i f ( p d > 2 5 5 ) t h r o w " F o r m o r e t h a n o n e b y t e , u s e a n a r r a y b u f f e r " ; i f ( p d < 0 ) t h r o w " I n p u t v a l u e m u s t b e p o s i t i v e " ; r e t u r n a d ( p d ) } e l s e t h r o w " U n s u p p o r t e d t y p e " } , u d = f u n c t i o n ( p d ) { v a r f d = f u n c t i o n ( S d ) { f o r ( v a r D d = S d . l e n g t h , L d = 0 ; D d > 0 ; ) { v a r R d = t h i s . b l o c k L e n - t h i s . i n L e n ; R d > D d & & ( R d = D d ) ; v a r O d = S d . s u b a r r a y ( L d , L d + R d ) ; t h i s . i n b u f . s e t ( O d , t h i s . i n L e n ) , L d + = R d , D d - = R d , t h i s . i n L e n + = R d , t h i s . i n L e n = = = t h i s . b l o c k L e n & & ( t h i s . p r o c e s s B l o c k ( t h i s . i n b u f ) , t h i s . i n L e n = 0 ) } } , T d = f u n c t i o n ( ) { v a r S d = t h i s . d o P a d d i n g ( ) ; t h i s . u p d a t e ( S d ) ; v a r D d = t h i s . g e t D i g e s t ( ) ; r e t u r n t h i s . r e s e t ( ) , D d } , A d = f u n c t i o n ( ) { i f ( ! p d ) t h r o w " U n s u p p o r t e d a l g o r i t h m : " + p d . t o S t r i n g ( ) ; p d . p r o t o t y p e .
2024-09-28 20:51:35 +08:00
` )}),Sd}function fd(Ad,Sd,Dd){Ad===void 0&&(Ad=""),Sd===void 0&&(Sd="");var Ld="";Ad&&(Ld+="/"+Ad),Sd&&(Sd.charAt(0)!=="/"&&(Ld+="/"),Ld+=Sd);var Rd=""+Ld,Od="?";if(Dd){var Md=function(Hd,Wd){return Hd[0]>Wd[0]?1:Hd[0]<Wd[0]?-1:0},jd=function(Hd){Rd+=Od+Hd,Dd[Hd]&&(Rd+="="+Dd[Hd]),Od="&"};Object.keys(Dd).sort(Md).forEach(jd)}return Rd}function Td(Ad){Ad===void 0&&(Ad={});var Sd=Ad,Dd=Sd.type,Ld=Dd===void 0?"header":Dd,Rd=Sd.verb,Od=Rd===void 0?"":Rd,Md=Sd.contentMd5,jd=Md===void 0?"":Md,Ud=Sd.expires,Hd=Ud===void 0?ad()+3600:Ud,Wd=Sd.bucket,Zd=Sd.objectName,zd=Sd.accessKeySecret,Qd=Sd.headers,Jd=Qd===void 0?{}:Qd,hf=Sd.subResource,vf=Jd["x-oss-date"]||"",Tf=Jd["Content-Type"]||"",_f=[Od,jd,Tf];Ld==="header"?_f.push(vf):_f.push(Hd);var bf=pd(Jd),xf=fd(Wd,Zd,hf);_f.push(""+bf+xf);var Bf=_f.join( `
2024-09-28 21:10:55 +08:00
` ),Yf=new rd.default.HMAC_SHA1;Yf.setKey(zd),Yf.update(Bf);var Zf=new Uint8Array(Yf.finalize()),Vf=td.default.fromByteArray(Zf);return Vf}return utils $ 2}(function(Ra){var qa=interopRequireDefaultExports;Ra.__esModule=!0,Ra.default=void 0;var td=qa(requireObjectAssign()),rd=qa(requireAjax()),nd=requireUtils(),ad=function(){function sd(cd){cd===void 0&&(cd={}),(0,nd.assertOptions)(cd),this.opts=(0,td.default)({region:"oss-cn-hangzhou",internal:!1,cname:!1,secure:!1,timeout:6e4},cd);var dd=this.opts,pd=dd.bucket,fd=dd.region,Td=dd.endpoint,Ad=dd.internal;if(this.host="",Td)this.host=Td;else{var Sd=pd;Ad&&(Sd+="-internal"),Sd+="."+fd+".aliyuncs.com",this.host=Sd}}var ud=sd.prototype;return ud.put=function(dd,pd,fd){var Td=this;return fd===void 0&&(fd={}),new Promise(function(Ad,Sd){(0,nd.blobToBuffer)(pd).then(function(Dd){var Ld=Td.opts,Rd=Ld.accessKeyId,Od=Ld.accessKeySecret,Md=Ld.stsToken,jd=Ld.bucket,Ud="PUT",Hd=(0,nd.getContentMd5)(Dd),Wd=pd.type,Zd={"Content-Md5":Hd,"Content-Type":Wd,"x-oss-date":new Date().toGMTString()};Md&&(Zd["x-oss-security-token"]=Md);var zd=(0,nd.getSignature)({verb:Ud,contentMd5:Hd,headers:Zd,bucket:jd,objectName:dd,accessKeyId:Rd,accessKeySecret:Od});Zd.Authorization="OSS "+Rd+":"+zd;var Qd=Td.opts.secure?"https":"http",Jd=Qd+"://"+Td.host+"/"+dd;return(0,rd.default)(Jd,{method:Ud,headers:Zd,data:pd,timeout:Td.opts.timeout,onprogress:fd.onprogress})}).then(Ad).catch(Sd)})},ud.putSymlink=function(dd,pd){var fd=this.opts,Td=fd.accessKeyId,Ad=fd.accessKeySecret,Sd=fd.stsToken,Dd=fd.bucket,Ld="PUT",Rd={"x-oss-date":new Date().toGMTString(),"x-oss-symlink-target":encodeURI(pd)};Sd&&(Rd["x-oss-security-token"]=Sd);var Od=(0,nd.getSignature)({verb:Ld,headers:Rd,bucket:Dd,objectName:dd,accessKeyId:Td,accessKeySecret:Ad,subResource:{symlink:""}});Rd.Authorization="OSS "+Td+":"+Od;var Md=this.opts.secure?"https":"http",jd=Md+"://"+this.host+"/"+dd+"?symlink";return(0,rd.default)(jd,{method:Ld,headers:Rd,timeout:this.opts.timeout})},ud.signatureUrl=function(dd,pd){pd===void 0&&(pd={});var fd=pd,Td=fd.expires,Ad=Td===void 0?1800:Td,Sd=fd.method,Dd=fd.process,Ld=fd.response,Rd=this.opts,Od=Rd.accessKeyId,Md=Rd.accessKeySecret,jd=Rd.stsToken,Ud=Rd.bucket,Hd={},Wd={};if(Dd){var Zd="x-oss-process";Wd[Zd]=Dd}Ld&&Object.keys(Ld).forEach(function(Tf){var _f="response-"+Tf.toLowerCase();Wd[_f]=Ld[Tf]}),Object.keys(pd).forEach(function(Tf){var _f=Tf.toLowerCase(),bf=pd[Tf];_f.indexOf("x-oss-")===0?Hd[_f]=bf:_f.indexOf("content-md5")===0||_f.indexOf("content-type")===0?Hd[Tf]=bf:_f!=="expires"&&_f!=="response"&&_f!=="process"&&_f!=="method"&&(Wd[_f]=bf)});var zd=pd["security-token"]||jd;zd&&(Wd["security-token"]=zd);var Qd=(0,nd.unix)()+Ad,Jd=(0,nd.getSignature)({type:"url",verb:Sd||"GET",accessKeyId:Od,accessKeySecret:Md,bucket:Ud,objectName:dd,headers:Hd,subResource:Wd,expires:Qd}),hf=this.opts.secure?"https":"http",vf=hf+"://"+this.host+"/"+dd;return vf+="?OSSAccessKeyId="+Od,vf+="&Expires="+Qd,vf+="&Signature="+encodeURIComponent(Jd),Object.keys(Wd).forEach(function(Tf){vf+="&"+Tf+"="+encodeURIComponent(Wd[Tf])}),vf},sd}();Ra.default=ad})(TinyOSS);var lib=TinyOSS.default;const OSS=getDefaultExportFromCjs(lib);var byteToHex=[];for(var i=0;i<256;++i)byteToHex.push((i+256).toString(16).slice(1));function unsafeStringify(Ra,qa=0){return(byteToHex[Ra[qa+0]]+byteToHex[Ra[qa+1]]+byteToHex[Ra[qa+2]]+byteToHex[Ra[qa+3]]+"-"+byteToHex[Ra[qa+4]]+byteToHex[Ra[qa+5]]+"-"+byteToHex[Ra[qa+6]]+byteToHex[Ra[qa+7]]+"-"+byteToHex[Ra[qa+8]]+byteToHex[Ra[qa+9]]+"-"+byteToHex[Ra[qa+10]]+byteToHex[Ra[qa+11]]+byteToHex[Ra[qa+12]]+byteToHex[Ra[qa+13]]+byteToHex[Ra[qa+14]]+byteToHex[Ra[qa+15]]).toLowerCase()}var getRandomValues,rnds8=new Uint8Array(16);function rng(){if(!getRandomValues&&(getRandomValues=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!getRandomValues))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return getRandomValues(rnds8)}var randomUUID=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);co
2024-09-25 14:23:53 +08:00
` ).forEach(function(sd){nd=sd.indexOf(":"),td=sd.substring(0,nd).trim().toLowerCase(),rd=sd.substring(nd+1).trim(),!(!td||qa[td]&&ignoreDuplicateOf[td])&&(td==="set-cookie"?qa[td]?qa[td].push(rd):qa[td]=[rd]:qa[td]=qa[td]?qa[td]+", "+rd:rd)}),qa}, $ internals=Symbol("internals");function normalizeHeader(Ra){return Ra&&String(Ra).trim().toLowerCase()}function normalizeValue(Ra){return Ra===!1||Ra==null?Ra:utils $ 1.isArray(Ra)?Ra.map(normalizeValue):String(Ra)}function parseTokens(Ra){const qa=Object.create(null),td=/([^ \s ,;=]+) \s *(?:= \s *([^,;]+))?/g;let rd;for(;rd=td.exec(Ra);)qa[rd[1]]=rd[2];return qa}const isValidHeaderName=Ra=>/^[-_a-zA-Z0-9^ ` | ~ , ! # $ % & ' * + . ] + $ / . test ( Ra . trim ( ) ) ; function matchHeaderValue ( Ra , qa , td , rd , nd ) { if ( utils$1 . isFunction ( rd ) ) return rd . call ( this , qa , td ) ; if ( nd && ( qa = td ) , ! ! utils$1 . isString ( qa ) ) { if ( utils$1 . isString ( rd ) ) return qa . indexOf ( rd ) !== - 1 ; if ( utils$1 . isRegExp ( rd ) ) return rd . test ( qa ) } } function formatHeader ( Ra ) { return Ra . trim ( ) . toLowerCase ( ) . replace ( /([a-z\d])(\w*)/g , ( qa , td , rd ) => td . toUpperCase ( ) + rd ) } function buildAccessors ( Ra , qa ) { const td = utils$1 . toCamelCase ( " " + qa ) ; [ "get" , "set" , "has" ] . forEach ( rd => { Object . defineProperty ( Ra , rd + td , { value : function ( nd , ad , sd ) { return this [ rd ] . call ( this , qa , nd , ad , sd ) } , configurable : ! 0 } ) } ) } class AxiosHeaders { constructor ( qa ) { qa && this . set ( qa ) } set ( qa , td , rd ) { const nd = this ; function ad ( ud , cd , dd ) { const pd = normalizeHeader ( cd ) ; if ( ! pd ) throw new Error ( "header name must be a non-empty string" ) ; const fd = utils$1 . findKey ( nd , pd ) ; ( ! fd || nd [ fd ] === void 0 || dd === ! 0 || dd === void 0 && nd [ fd ] !== ! 1 ) && ( nd [ fd || cd ] = normalizeValue ( ud ) ) } const sd = ( ud , cd ) => utils$1 . forEach ( ud , ( dd , pd ) => ad ( dd , pd , cd ) ) ; if ( utils$1 . isPlainObject ( qa ) || qa instanceof this . constructor ) sd ( qa , td ) ; else if ( utils$1 . isString ( qa ) && ( qa = qa . trim ( ) ) && ! isValidHeaderName ( qa ) ) sd ( parseHeaders ( qa ) , td ) ; else if ( utils$1 . isHeaders ( qa ) ) for ( const [ ud , cd ] of qa . entries ( ) ) ad ( cd , ud , rd ) ; else qa != null && ad ( td , qa , rd ) ; return this } get ( qa , td ) { if ( qa = normalizeHeader ( qa ) , qa ) { const rd = utils$1 . findKey ( this , qa ) ; if ( rd ) { const nd = this [ rd ] ; if ( ! td ) return nd ; if ( td === ! 0 ) return parseTokens ( nd ) ; if ( utils$1 . isFunction ( td ) ) return td . call ( this , nd , rd ) ; if ( utils$1 . isRegExp ( td ) ) return td . exec ( nd ) ; throw new TypeError ( "parser must be boolean|regexp|function" ) } } } has ( qa , td ) { if ( qa = normalizeHeader ( qa ) , qa ) { const rd = utils$1 . findKey ( this , qa ) ; return ! ! ( rd && this [ rd ] !== void 0 && ( ! td || matchHeaderValue ( this , this [ rd ] , rd , td ) ) ) } return ! 1 } delete ( qa , td ) { const rd = this ; let nd = ! 1 ; function ad ( sd ) { if ( sd = normalizeHeader ( sd ) , sd ) { const ud = utils$1 . findKey ( rd , sd ) ; ud && ( ! td || matchHeaderValue ( rd , rd [ ud ] , ud , td ) ) && ( delete rd [ ud ] , nd = ! 0 ) } } return utils$1 . isArray ( qa ) ? qa . forEach ( ad ) : ad ( qa ) , nd } clear ( qa ) { const td = Object . keys ( this ) ; let rd = td . length , nd = ! 1 ; for ( ; rd -- ; ) { const ad = td [ rd ] ; ( ! qa || matchHeaderValue ( this , this [ ad ] , ad , qa , ! 0 ) ) && ( delete this [ ad ] , nd = ! 0 ) } return nd } normalize ( qa ) { const td = this , rd = { } ; return utils$1 . forEach ( this , ( nd , ad ) => { const sd = utils$1 . findKey ( rd , ad ) ; if ( sd ) { td [ sd ] = normalizeValue ( nd ) , delete td [ ad ] ; return } const ud = qa ? formatHeader ( ad ) : String ( ad ) . trim ( ) ; ud !== ad && delete td [ ad ] , td [ ud ] = normalizeValue ( nd ) , rd [ ud ] = ! 0 } ) , this } concat ( ... qa ) { return this . constructor . concat ( this , ... qa ) } toJSON ( qa ) { const td = Object . create ( null ) ; return utils$1 . forEach ( this , ( rd , nd ) => { rd != null && rd !== ! 1 && ( td [ nd ] = qa && utils$1 . isArray ( rd ) ? rd . join ( ", " ) : rd ) } ) , td } [ Symbol . iterator ] ( ) { return Object . entries ( this . toJSON ( ) ) [ Symbol . iterator ] ( ) } toString ( ) { return Object . entries ( this . toJSON ( ) ) . map ( ( [ qa , td ] ) => qa + ": " + td ) . join ( `
2024-09-28 20:51:35 +08:00
` )}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(qa){return qa instanceof this?qa:new this(qa)}static concat(qa,...td){const rd=new this(qa);return td.forEach(nd=>rd.set(nd)),rd}static accessor(qa){const rd=(this[ $ internals]=this[ $ internals]={accessors:{}}).accessors,nd=this.prototype;function ad(sd){const ud=normalizeHeader(sd);rd[ud]||(buildAccessors(nd,sd),rd[ud]=!0)}return utils $ 1.isArray(qa)?qa.forEach(ad):ad(qa),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);utils $ 1.reduceDescriptors(AxiosHeaders.prototype,({value:Ra},qa)=>{let td=qa[0].toUpperCase()+qa.slice(1);return{get:()=>Ra,set(rd){this[td]=rd}}});utils $ 1.freezeMethods(AxiosHeaders);function transformData(Ra,qa){const td=this||defaults,rd=qa||td,nd=AxiosHeaders.from(rd.headers);let ad=rd.data;return utils $ 1.forEach(Ra,function(ud){ad=ud.call(td,ad,nd.normalize(),qa?qa.status:void 0)}),nd.normalize(),ad}function isCancel(Ra){return!!(Ra&&Ra.__CANCEL__)}function CanceledError(Ra,qa,td){AxiosError.call(this,Ra??"canceled",AxiosError.ERR_CANCELED,qa,td),this.name="CanceledError"}utils $ 1.inherits(CanceledError,AxiosError,{__CANCEL__:!0});function settle(Ra,qa,td){const rd=td.config.validateStatus;!td.status||!rd||rd(td.status)?Ra(td):qa(new AxiosError("Request failed with status code "+td.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(td.status/100)-4],td.config,td.request,td))}function parseProtocol(Ra){const qa=/^([-+ \w ]{1,25})(:? \/ \/ |:)/.exec(Ra);return qa&&qa[1]||""}function speedometer(Ra,qa){Ra=Ra||10;const td=new Array(Ra),rd=new Array(Ra);let nd=0,ad=0,sd;return qa=qa!==void 0?qa:1e3,function(cd){const dd=Date.now(),pd=rd[ad];sd||(sd=dd),td[nd]=cd,rd[nd]=dd;let fd=ad,Td=0;for(;fd!==nd;)Td+=td[fd++],fd=fd%Ra;if(nd=(nd+1)%Ra,nd===ad&&(ad=(ad+1)%Ra),dd-sd<qa)return;const Ad=pd&&dd-pd;return Ad?Math.round(Td*1e3/Ad):void 0}}function throttle(Ra,qa){let td=0,rd=1e3/qa,nd,ad;const sd=(dd,pd=Date.now())=>{td=pd,nd=null,ad&&(clearTimeout(ad),ad=null),Ra.apply(null,dd)};return[(...dd)=>{const pd=Date.now(),fd=pd-td;fd>=rd?sd(dd,pd):(nd=dd,ad||(ad=setTimeout(()=>{ad=null,sd(nd)},rd-fd)))},()=>nd&&sd(nd)]}const progressEventReducer=(Ra,qa,td=3)=>{let rd=0;const nd=speedometer(50,250);return throttle(ad=>{const sd=ad.loaded,ud=ad.lengthComputable?ad.total:void 0,cd=sd-rd,dd=nd(cd),pd=sd<=ud;rd=sd;const fd={loaded:sd,total:ud,progress:ud?sd/ud:void 0,bytes:cd,rate:dd||void 0,estimated:dd&&ud&&pd?(ud-sd)/dd:void 0,event:ad,lengthComputable:ud!=null,[qa?"download":"upload"]:!0};Ra(fd)},td)},progressEventDecorator=(Ra,qa)=>{const td=Ra!=null;return[rd=>qa[0]({lengthComputable:td,total:Ra,loaded:rd}),qa[1]]},asyncDecorator=Ra=>(...qa)=>utils $ 1.asap(()=>Ra(...qa)),isURLSameOrigin=platform.hasStandardBrowserEnv?function(){const qa=platform.navigator&&/(msie|trident)/i.test(platform.navigator.userAgent),td=document.createElement("a");let rd;function nd(ad){let sd=ad;return qa&&(td.setAttribute("href",sd),sd=td.href),td.setAttribute("href",sd),{href:td.href,protocol:td.protocol?td.protocol.replace(/: $ /,""):"",host:td.host,search:td.search?td.search.replace(/^ \? /,""):"",hash:td.hash?td.hash.replace(/^#/,""):"",hostname:td.hostname,port:td.port,pathname:td.pathname.charAt(0)==="/"?td.pathname:"/"+td.pathname}}return rd=nd(window.location.href),function(sd){const ud=utils $ 1.isString(sd)?nd(sd):sd;return ud.protocol===rd.protocol&&ud.host===rd.host}}():function(){return function(){return!0}}(),cookies=platform.hasStandardBrowserEnv?{write(Ra,qa,td,rd,nd,ad){const sd=[Ra+"="+encodeURIComponent(qa)];utils $ 1.isNumber(td)&&sd.push("expires="+new Date(td).toGMTString()),utils $ 1.isString(rd)&&sd.push("path="+rd),utils $ 1.isString(nd)&&sd.push("domain="+nd),ad===!0&&sd.push("secure"),document.cookie=sd.join("; ")},read(Ra){const qa=document.cookie.match(new RegExp("(^|; \\ s*)("+Ra+")=([^;]*)"));return qa?decodeURIComponent(qa[3]):null},remove(Ra){this.write(Ra,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function isAbsoluteURL(Ra){return/^([a-z][a-z \d + \- .]*
2024-09-25 14:23:53 +08:00
` +ad.map(renderReason).join( `
` ):" "+renderReason(ad[0]):"as no adapter specified";throw new AxiosError("There is no suitable adapter to dispatch the request "+sd,"ERR_NOT_SUPPORT")}return rd},adapters:knownAdapters};function throwIfCancellationRequested(Ra){if(Ra.cancelToken&&Ra.cancelToken.throwIfRequested(),Ra.signal&&Ra.signal.aborted)throw new CanceledError(null,Ra)}function dispatchRequest(Ra){return throwIfCancellationRequested(Ra),Ra.headers=AxiosHeaders.from(Ra.headers),Ra.data=transformData.call(Ra,Ra.transformRequest),["post","put","patch"].indexOf(Ra.method)!==-1&&Ra.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(Ra.adapter||defaults.adapter)(Ra).then(function(rd){return throwIfCancellationRequested(Ra),rd.data=transformData.call(Ra,Ra.transformResponse,rd),rd.headers=AxiosHeaders.from(rd.headers),rd},function(rd){return isCancel(rd)||(throwIfCancellationRequested(Ra),rd&&rd.response&&(rd.response.data=transformData.call(Ra,Ra.transformResponse,rd.response),rd.response.headers=AxiosHeaders.from(rd.response.headers))),Promise.reject(rd)})}const VERSION="1.7.7",validators $ 1={};["object","boolean","number","function","string","symbol"].forEach((Ra,qa)=>{validators $ 1[Ra]=function(rd){return typeof rd===Ra||"a"+(qa<1?"n ":" ")+Ra}});const deprecatedWarnings={};validators $ 1.transitional=function(qa,td,rd){function nd(ad,sd){return"[Axios v"+VERSION+"] Transitional option '"+ad+"'"+sd+(rd?". "+rd:"")}return(ad,sd,ud)=>{if(qa===!1)throw new AxiosError(nd(sd," has been removed"+(td?" in "+td:"")),AxiosError.ERR_DEPRECATED);return td&&!deprecatedWarnings[sd]&&(deprecatedWarnings[sd]=!0,console.warn(nd(sd," has been deprecated since v"+td+" and will be removed in the near future"))),qa?qa(ad,sd,ud):!0}};function assertOptions(Ra,qa,td){if(typeof Ra!="object")throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE);const rd=Object.keys(Ra);let nd=rd.length;for(;nd-- >0;){const ad=rd[nd],sd=qa[ad];if(sd){const ud=Ra[ad],cd=ud===void 0||sd(ud,ad,Ra);if(cd!==!0)throw new AxiosError("option "+ad+" must be "+cd,AxiosError.ERR_BAD_OPTION_VALUE);continue}if(td!==!0)throw new AxiosError("Unknown option "+ad,AxiosError.ERR_BAD_OPTION)}}const validator={assertOptions,validators:validators $ 1},validators=validator.validators;class Axios{constructor(qa){this.defaults=qa,this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(qa,td){try{return await this._request(qa,td)}catch(rd){if(rd instanceof Error){let nd;Error.captureStackTrace?Error.captureStackTrace(nd={}):nd=new Error;const ad=nd.stack?nd.stack.replace(/^.+ \n /,""):"";try{rd.stack?ad&&!String(rd.stack).endsWith(ad.replace(/^.+ \n .+ \n /,""))&&(rd.stack+= `
` +ad):rd.stack=ad}catch{}}throw rd}}_request(qa,td){typeof qa=="string"?(td=td||{},td.url=qa):td=qa||{},td=mergeConfig(this.defaults,td);const{transitional:rd,paramsSerializer:nd,headers:ad}=td;rd!==void 0&&validator.assertOptions(rd,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),nd!=null&&(utils $ 1.isFunction(nd)?td.paramsSerializer={serialize:nd}:validator.assertOptions(nd,{encode:validators.function,serialize:validators.function},!0)),td.method=(td.method||this.defaults.method||"get").toLowerCase();let sd=ad&&utils $ 1.merge(ad.common,ad[td.method]);ad&&utils $ 1.forEach(["delete","get","head","post","put","patch","common"],Sd=>{delete ad[Sd]}),td.headers=AxiosHeaders.concat(sd,ad);const ud=[];let cd=!0;this.interceptors.request.forEach(function(Dd){typeof Dd.runWhen=="function"&&Dd.runWhen(td)===!1||(cd=cd&&Dd.synchronous,ud.unshift(Dd.fulfilled,Dd.rejected))});const dd=[];this.interceptors.response.forEach(function(Dd){dd.push(Dd.fulfilled,Dd.rejected)});let pd,fd=0,Td;if(!cd){const Sd=[dispatchRequest.bind(this),void 0];for(Sd.unshift.apply(Sd,ud),Sd.push.apply(Sd,dd),Td=Sd.length,pd=Promise.resolve(td);fd<Td;)pd=pd.then(Sd[fd++],Sd[fd++]);return pd}Td=ud.length;let Ad=td;for(fd=0;fd<Td;){const Sd=ud[fd++],Dd=ud[fd++];try{Ad=Sd(Ad)}catch(Ld){Dd.call(this,Ld);break}}try{pd=dispatchRequest.call(this,Ad)}catch(Sd){return Promise.reject(Sd)}for(fd=0,Td=dd.length;fd<Td;)pd=pd.then(dd[fd++],dd[fd++]);return pd}getUri(qa){qa=mergeConfig(this.defaults,qa);const td=buildFullPath(qa.baseURL,qa.url);return buildURL(td,qa.params,qa.paramsSerializer)}}utils $ 1.forEach(["delete","get","head","options"],function(qa){Axios.prototype[qa]=function(td,rd){return this.request(mergeConfig(rd||{},{method:qa,url:td,data:(rd||{}).data}))}});utils $ 1.forEach(["post","put","patch"],function(qa){function td(rd){return function(ad,sd,ud){return this.request(mergeConfig(ud||{},{method:qa,headers:rd?{"Content-Type":"multipart/form-data"}:{},url:ad,data:sd}))}}Axios.prototype[qa]=td(),Axios.prototype[qa+"Form"]=td(!0)});class CancelToken{constructor(qa){if(typeof qa!="function")throw new TypeError("executor must be a function.");let td;this.promise=new Promise(function(ad){td=ad});const rd=this;this.promise.then(nd=>{if(!rd._listeners)return;let ad=rd._listeners.length;for(;ad-- >0;)rd._listeners[ad](nd);rd._listeners=null}),this.promise.then=nd=>{let ad;const sd=new Promise(ud=>{rd.subscribe(ud),ad=ud}).then(nd);return sd.cancel=function(){rd.unsubscribe(ad)},sd},qa(function(ad,sd,ud){rd.reason||(rd.reason=new CanceledError(ad,sd,ud),td(rd.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(qa){if(this.reason){qa(this.reason);return}this._listeners?this._listeners.push(qa):this._listeners=[qa]}unsubscribe(qa){if(!this._listeners)return;const td=this._listeners.indexOf(qa);td!==-1&&this._listeners.splice(td,1)}toAbortSignal(){const qa=new AbortController,td=rd=>{qa.abort(rd)};return this.subscribe(td),qa.signal.unsubscribe=()=>this.unsubscribe(td),qa.signal}static source(){let qa;return{token:new CancelToken(function(nd){qa=nd}),cancel:qa}}}function spread(Ra){return function(td){return Ra.apply(null,td)}}function isAxiosError(Ra){return utils $ 1.isObject(Ra)&&Ra.isAxiosError===!0}const HttpStatusCode={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,Expect
2024-09-18 09:46:23 +08:00
async ( CUSTOM _ARG ) => {
$ { localStorage . getItem ( "formCustomConfig" ) }
}
2024-09-28 20:51:35 +08:00
` ;return new Promise((resolve,reject)=>{const exportObj={content,file,util:{axios:service,CryptoJS,OSS,COS,Buffer:Buffer $ 1,uuidv4:v4,qiniu,tokenTools,getDir,getDateFilename},okCb:resolve,errCb:reject};eval(str)(exportObj).catch(Ra=>{console.error(Ra),reject(Ra)})})}function fileUpload(Ra,qa){const td=localStorage.getItem("imgHost");switch(td||localStorage.setItem("imgHost","default"),td){case"aliOSS":return aliOSSFileUpload(qa);case"minio":return minioFileUpload(Ra,qa.name);case"txCOS":return txCOSFileUpload(qa);case"qiniu":return qiniuUpload(qa);case"gitee":return giteeUpload(Ra,qa.name);case"github":return ghFileUpload(Ra,qa.name);case"formCustom":return formCustomUpload(Ra,qa);default:return ghFileUpload(Ra,qa.name)}}const fileApi={fileUpload},_hoisted_1={class:"container-main flex-1"},_hoisted_2={class:"preview border shadow-xl"},_hoisted_3=["innerHTML"],_hoisted_4={key:0,class:"loading-mask"},_sfc_main $ 1=defineComponent({__name:"CodemirrorEditor",setup(Ra){const qa=useStore(),td=useDisplayStore(),{isDark:rd,output:nd,editor:ad,editorContent:sd}=storeToRefs(qa),{isShowCssEditor:ud}=storeToRefs(td),{editorRefresh:cd,exportEditorContent2HTML:dd,exportEditorContent2MD:pd,formatContent:fd,importMarkdownContent:Td,resetStyleConfirm:Ad}=qa,{toggleShowInsertFormDialog:Sd,toggleShowUploadImgDialog:Dd}=td,Ld=ref $ 1(!1),Rd=ref $ 1(),Od=ref $ 1(null);function Md(){const Bf=Vf=>{let Pf,Df;clearTimeout(Rd.value),Vf==="preview"?(Pf=Od.value. $ el,Df=document.querySelector(".CodeMirror-scroll"),ad.value.off("scroll",Yf),Rd.value=setTimeout(()=>{ad.value.on("scroll",Yf)},300)):(Pf=document.querySelector(".CodeMirror-scroll"),Df=Od.value. $ el,Df.removeEventListener("scroll",Zf,!1),Rd.value=setTimeout(()=>{Df.addEventListener("scroll",Zf,!1)},300));const Jf=Pf.scrollTop/(Pf.scrollHeight-Pf.offsetHeight)*(Df.scrollHeight-Df.offsetHeight);Df.scrollTo(0,Jf)};function Yf(){Bf("editor")}function Zf(){Bf("preview")}Od.value. $ el.addEventListener("scroll",Zf,!1),ad.value.on("scroll",Yf)}onMounted(()=>{setTimeout(()=>{Md()},300)});function jd(){cd()}const Ud=ref $ 1(!1),Hd=ref $ 1(!1);function Wd(){Hd.value=!0,Ud.value=!0}function Zd(){Ud.value=!1,setTimeout(()=>{Hd.value=!1},800)}function zd(Bf){const Yf=checkImage(Bf);if(!Yf.ok)return ElMessage.error(Yf.msg),!1;const Zf=localStorage.getItem("imgHost")||"default";localStorage.setItem("imgHost",Zf);const Vf=localStorage.getItem( ` $ { Zf } Config ` );return Zf==="default"||Vf?!0:(ElMessage.error( ` 请先配置 $ { Zf } 图床参数 ` ),!1)}function Qd(Bf){if(!Bf){ElMessage.error("上传图片未知异常");return}Dd(!1);const Yf=ad.value.getCursor(),Zf= ` ! [ ] ( $ { Bf } ) ` ;toRaw(qa.editor).replaceSelection( `
$ { Zf }
` ,Yf),ElMessage.success("图片上传成功")}function Jd(Bf,Yf){Ld.value=!0,toBase64 $ 1(Bf).then(Zf=>fileApi.fileUpload(Zf,Bf)).then(Zf=>{Yf?Yf(Zf):Qd(Zf)}).catch(Zf=>{ElMessage.error(Zf.message)}).finally(()=>{Ld.value=!1})}const hf=ref $ 1();watch(rd,()=>{var Yf,Zf;const Bf=rd.value?"darcula":"xq-light";(Zf=(Yf=toRaw(ad.value))==null?void 0:Yf.setOption)==null||Zf.call(Yf,"theme",Bf)});function vf(){const Bf=document.querySelector("#editor");Bf.value||(Bf.value=sd.value),ad.value=CodeMirror.fromTextArea(Bf,{mode:"text/x-markdown",theme:rd.value?"darcula":"xq-light",lineNumbers:!1,lineWrapping:!0,styleActiveLine:!0,autoCloseBrackets:!0,extraKeys:{[ ` $ { shiftKey } - $ { altKey } - F ` ]:function(Zf){formatDoc(Zf.getValue()).then(Vf=>{Zf.setValue(Vf)})},[ ` $ { ctrlKey } - B ` ]:function(Zf){const Vf=Zf.getSelection();Zf.replaceSelection( ` * * $ { Vf } * * ` )},[ ` $ { ctrlKey } - I ` ]:function(Zf){const Vf=Zf.getSelection();Zf.replaceSelection( ` * $ { Vf } * ` )},[ ` $ { ctrlKey } - D ` ]:function(Zf){const Vf=Zf.getSelection();Zf.replaceSelection( ` ~ ~ $ { Vf } ~ ~ ` )},[ ` $ { ctrlKey } - K ` ]:function(Zf){const Vf=Zf.getSelection();Zf.replaceSelection( ` [ $ { Vf } ] ( ) ` )},[ ` $ { ctrlKey } - E ` ]:function(Zf){const Vf=Zf.getSelection();Zf.replaceSelection( ` \ ` ${ Vf } \` ` ) } , [ ` ${ ctrlKey } -L ` ] : function ( Zf ) { const Vf = Zf . getSelection ( ) ; Zf . replaceSelection ( ` \` ${ Vf } \` ` ) } } } ) , ad . value . on ( "change" , Yf => { clearTimeout ( hf . value ) , hf . value = setTimeout ( ( ) => { jd ( ) , sd . value = Yf . getValue ( ) } , 300 ) } ) , ad . value . on ( "paste" , ( Yf , Zf ) => { if ( ! ( ! ( Zf . clipboardData && Zf . clipboardData . items ) || Ld . value ) ) for ( let Vf = 0 , Pf = Zf . clipboardData . items . length ; Vf < Pf ; ++ Vf ) { const Df = Zf . clipboardData . items [ Vf ] ; if ( Df . kind === "file" ) { const $f = Df . getAsFile ( ) ; if ( ! zd ( $f ) ) continue ; Jd ( $f ) } } } ) } const Tf = ref$1 ( null ) ; function _f ( Bf ) { ad . value . options . extraKeys [ Bf ] ( ad . value ) } const bf = ref$1 ( null ) ; function xf ( ) { const Bf = bf . value . $el , Yf = async ( { md : Pf , list : Df } ) => { const $f = [ ... Pf . str . matchAll ( /!\[(.*?)\]\((.*?)\)/g ) || [ ] ] . filter ( Ef => Ef ) , Jf = Pf . path . match ( /.+?\// ) [ 0 ] ; ( await Promise . all ( $f . map ( Ef => new Promise ( gf => { let [ , , Mf ] = Ef ; Mf = Mf . replace ( /^.\// , "" ) ; const { file : Gf } = Df . find ( ah => ah . path === ` ${ Jf } ${ Mf } ` ) || { } ; Jd ( Gf , ah => { gf ( { matchStr : Mf , url : ah } ) } ) } ) ) ) ) . forEach ( Ef => { Pf . str = Pf . str . replace ( ` ](./ ${ Ef . matchStr } ) ` , ` ]( ${ Ef . url } ) ` ) . replace ( ` ]( ${ Ef . matchStr } ) ` , ` ]( ${ Ef . url } ) ` ) } ) , ad . value . setValue ( Pf . str ) } ; Bf . ondragover = Pf => Pf . preventDefault ( ) , Bf . ondrop = async Pf => { Pf . preventDefault ( ) ; for ( const Df of Pf . dataTransfer . items ) Df . getAsFileSystemHandle ( ) . then ( async $f => { if ( $f . kind === "directory" ) { const Jf = await Vf ( $f ) , Xf = await Zf ( { list : Jf } ) ; Yf ( { md : Xf , list : Jf } ) } else { const Jf = await $f . getFile ( ) ; console . log ( "file" , Jf ) } } ) } ; async function Zf ( { list : Pf } ) { return new Promise ( Df => { const { path : $f , file : Jf } = Pf . find ( Ef => Ef . path . match ( /\.md$/ ) ) , Xf = new FileReader ; Xf . readAsText ( Jf , "UTF-8" ) , Xf . onload = Ef => { Df ( { str : Ef . target . result , file : Jf , path : $f } ) } } ) } async function Vf ( Pf ) { const Df = [ ] ; let $f = "" ; try { const Jf = [ Pf ] ; for ( const Xf of Jf ) { $f += ` ${ Xf . name } / ` ; for await ( const [ , Ef ] of Xf ) Ef . kind === "file" ? Df . push ( { path : $f + Ef . name , file : await Ef . getFile ( ) } ) : ( Df . push ( { path : ` ${ $f + Ef . name } / ` } ) , Jf . push ( Ef ) ) } } catch ( Jf ) { console . error ( Jf ) } return Df } } return onMounted ( ( ) => { vf ( ) , jd ( ) , xf ( ) } ) , ( Bf , Yf ) => { const Zf = ElRow ; return openBlock ( ) , createElementBlock ( "div" , { ref _key : "container" , ref : Tf , class : "container flex flex-col" } , [ createVNode ( EditorHeader , { onAddFormat : _f , onFormatContent : unref ( fd ) , onStartCopy : Wd , onEndCopy : Zd } , null , 8 , [ "onFormatContent" ] ) , createBaseVNode ( "main" , _hoisted _1 , [ createVNode ( Zf , { class : "container-main-section h-full border-1" } , { default : withCtx ( ( ) => [ createVNode ( unref ( ElCol ) , { ref _key : "codeMirrorWrapper" , ref : bf , span : unref ( ud ) ? 8 : 12 , class : normalizeClass ( [ "codeMirror-wrapper border-r-1" , { "order-1" : ! unref ( qa ) . isEditOnLeft } ] ) } , { default : withCtx ( ( ) => [ createVNode ( unref ( _sfc _main$7 ) , null , { default : withCtx ( ( ) => [ createVNode ( unref ( _sfc _main$2 ) , null , { default : withCtx ( ( ) => Yf [ 7 ] || ( Yf [ 7 ] = [ createBaseVNode ( "textarea" , { id : "editor" , type : "textarea" , placeholder : "Your markdown text here." } , null , - 1 ) ] ) ) , _ : 1 } ) , createVNode ( unref ( _sfc _main$6 ) , { class : "w-64" } , { default : withCtx ( ( ) => [ createVNode ( unref ( _sfc _main$5 ) , { inset : "" , onClick : Yf [ 0 ] || ( Yf [ 0 ] = Vf => unref ( Dd ) ( ) ) } , { default : withCtx ( ( ) => Y
` ;Rd.replaceSelection(Wd+Wd,null),Td(Rd,-1),jd=Rd.listSelections();for(var Zd=0;Zd<jd.length;Zd++){var zd=jd[Zd].head.line;Rd.indentLine(zd,null,!0),Rd.indentLine(zd+1,null,!0)}})}function Td(Rd,Od){for(var Md=[],jd=Rd.listSelections(),Ud=0,Hd=0;Hd<jd.length;Hd++){var Wd=jd[Hd];Wd.head==Rd.getCursor()&&(Ud=Hd);var Zd=Wd.head.ch||Od>0?{line:Wd.head.line,ch:Wd.head.ch+Od}:{line:Wd.head.line-1};Md.push({anchor:Zd,head:Zd})}Rd.setSelections(Md,Ud)}function Ad(Rd){var Od=td.cmpPos(Rd.anchor,Rd.head)>0;return{anchor:new nd(Rd.anchor.line,Rd.anchor.ch+(Od?-1:1)),head:new nd(Rd.head.line,Rd.head.ch+(Od?1:-1))}}function Sd(Rd,Od){var Md=dd(Rd);if(!Md||Rd.getOption("disableInput"))return td.Pass;var jd=ad(Md,"pairs"),Ud=jd.indexOf(Od);if(Ud==-1)return td.Pass;for(var Hd=ad(Md,"closeBefore"),Wd=ad(Md,"triples"),Zd=jd.charAt(Ud+1)==Od,zd=Rd.listSelections(),Qd=Ud%2==0,Jd,hf=0;hf<zd.length;hf++){var vf=zd[hf],Tf=vf.head,_f,bf=Rd.getRange(Tf,nd(Tf.line,Tf.ch+1));if(Qd&&!vf.empty())_f="surround";else if((Zd||!Qd)&&bf==Od)Zd&&Ld(Rd,Tf)?_f="both":Wd.indexOf(Od)>=0&&Rd.getRange(Tf,nd(Tf.line,Tf.ch+3))==Od+Od+Od?_f="skipThree":_f="skip";else if(Zd&&Tf.ch>1&&Wd.indexOf(Od)>=0&&Rd.getRange(nd(Tf.line,Tf.ch-2),Tf)==Od+Od){if(Tf.ch>2&&/ \b string/.test(Rd.getTokenTypeAt(nd(Tf.line,Tf.ch-2))))return td.Pass;_f="addFour"}else if(Zd){var xf=Tf.ch==0?" ":Rd.getRange(nd(Tf.line,Tf.ch-1),Tf);if(!td.isWordChar(bf)&&xf!=Od&&!td.isWordChar(xf))_f="both";else return td.Pass}else if(Qd&&(bf.length===0||/ \s /.test(bf)||Hd.indexOf(bf)>-1))_f="both";else return td.Pass;if(!Jd)Jd=_f;else if(Jd!=_f)return td.Pass}var Bf=Ud%2?jd.charAt(Ud-1):Od,Yf=Ud%2?Od:jd.charAt(Ud+1);Rd.operation(function(){if(Jd=="skip")Td(Rd,1);else if(Jd=="skipThree")Td(Rd,3);else if(Jd=="surround"){for(var Zf=Rd.getSelections(),Vf=0;Vf<Zf.length;Vf++)Zf[Vf]=Bf+Zf[Vf]+Yf;Rd.replaceSelections(Zf,"around"),Zf=Rd.listSelections().slice();for(var Vf=0;Vf<Zf.length;Vf++)Zf[Vf]=Ad(Zf[Vf]);Rd.setSelections(Zf)}else Jd=="both"?(Rd.replaceSelection(Bf+Yf,null),Rd.triggerElectric(Bf+Yf),Td(Rd,-1)):Jd=="addFour"&&(Rd.replaceSelection(Bf+Bf+Bf+Bf,"before"),Td(Rd,1))})}function Dd(Rd,Od){var Md=Rd.getRange(nd(Od.line,Od.ch-1),nd(Od.line,Od.ch+1));return Md.length==2?Md:null}function Ld(Rd,Od){var Md=Rd.getTokenAt(nd(Od.line,Od.ch+1));return/ \b string/.test(Md.type)&&Md.start==Od.ch&&(Od.ch==0||!/ \b string/.test(Rd.getTokenTypeAt(Od)))}})})();(function(Ra,qa){(function(td){td(requireCodemirror())})(function(td){var rd=/MSIE \d /.test(navigator.userAgent)&&(document.documentMode==null||document.documentMode<8),nd=td.Pos,ad={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function sd(Td){return Td&&Td.bracketRegex||/[(){}[ \] ]/}function ud(Td,Ad,Sd){var Dd=Td.getLineHandle(Ad.line),Ld=Ad.ch-1,Rd=Sd&&Sd.afterCursor;Rd==null&&(Rd=/(^| )cm-fat-cursor( $ | )/.test(Td.getWrapperElement().className));var Od=sd(Sd),Md=!Rd&&Ld>=0&&Od.test(Dd.text.charAt(Ld))&&ad[Dd.text.charAt(Ld)]||Od.test(Dd.text.charAt(Ld+1))&&ad[Dd.text.charAt(++Ld)];if(!Md)return null;var jd=Md.charAt(1)==">"?1:-1;if(Sd&&Sd.strict&&jd>0!=(Ld==Ad.ch))return null;var Ud=Td.getTokenTypeAt(nd(Ad.line,Ld+1)),Hd=cd(Td,nd(Ad.line,Ld+(jd>0?1:0)),jd,Ud,Sd);return Hd==null?null:{from:nd(Ad.line,Ld),to:Hd&&Hd.pos,match:Hd&&Hd.ch==Md.charAt(0),forward:jd>0}}function cd(Td,Ad,Sd,Dd,Ld){for(var Rd=Ld&&Ld.maxScanLineLength||1e4,Od=Ld&&Ld.maxScanLines||1e3,Md=[],jd=sd(Ld),Ud=Sd>0?Math.min(Ad.line+Od,Td.lastLine()+1):Math.max(Td.firstLine()-1,Ad.line-Od),Hd=Ad.line;Hd!=Ud;Hd+=Sd){var Wd=Td.getLine(Hd);if(Wd){var Zd=Sd>0?0:Wd.length-1,zd=Sd>0?Wd.length:-1;if(!(Wd.length>Rd))for(Hd==Ad.line&&(Zd=Ad.ch-(Sd<0?1:0));Zd!=zd;Zd+=Sd){var Qd=Wd.charAt(Zd);if(jd.test(Qd)&&(Dd===void 0||(Td.getTokenTypeAt(nd(Hd,Zd+1))||"")==(Dd||""))){var Jd=ad[Qd];if(Jd&&Jd.charAt(1)==">"==Sd>0)Md.push(Qd);else if(Md.length)Md.pop();else return{pos:nd(Hd,Zd),ch:Qd}}}}}return Hd-Sd==(Sd>0?Td.lastLine():Td.firstLine())?!1:null}function dd(Td,Ad,Sd){for(var Dd=Td.state.matchBrackets.maxHighlightLineLength||1e3,Ld=Sd&&Sd.highlightNonMatching,Rd=[],Od=Td.listSelections(