2022-11-09 21:39:00 -05:00
parcelRequire = function ( e , r , t , n ) { var i , o = "function" == typeof parcelRequire && parcelRequire , u = "function" == typeof require && require ; function f ( t , n ) { if ( ! r [ t ] ) { if ( ! e [ t ] ) { var i = "function" == typeof parcelRequire && parcelRequire ; if ( ! n && i ) return i ( t , ! 0 ) ; if ( o ) return o ( t , ! 0 ) ; if ( u && "string" == typeof t ) return u ( t ) ; var c = new Error ( "Cannot find module '" + t + "'" ) ; throw c . code = "MODULE_NOT_FOUND" , c } p . resolve = function ( r ) { return e [ t ] [ 1 ] [ r ] || r } , p . cache = { } ; var l = r [ t ] = new f . Module ( t ) ; e [ t ] [ 0 ] . call ( l . exports , p , l , l . exports , this ) } return r [ t ] . exports ; function p ( e ) { return f ( p . resolve ( e ) ) } } f . isParcelRequire = ! 0 , f . Module = function ( e ) { this . id = e , this . bundle = f , this . exports = { } } , f . modules = e , f . cache = r , f . parent = o , f . register = function ( r , t ) { e [ r ] = [ function ( e , r ) { r . exports = t } , { } ] } ; for ( var c = 0 ; c < t . length ; c ++ ) try { f ( t [ c ] ) } catch ( e ) { i || ( i = e ) } if ( t . length ) { var l = f ( t [ t . length - 1 ] ) ; "object" == typeof exports && "undefined" != typeof module ? module . exports = l : "function" == typeof define && define . amd ? define ( function ( ) { return l } ) : n && ( this [ n ] = l ) } if ( parcelRequire = f , i ) throw i ; return f } ( { "aSor" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . render = L , exports . hydrate = M , exports . h = exports . createElement = a , exports . Fragment = v , exports . createRef = h , exports . Component = y , exports . cloneElement = F , exports . createContext = R , exports . toChildArray = C , exports . _unmount = W , exports . options = exports . isValidElement = void 0 ; var e , t , n , o , _ , l , r , i , u = { } , s = [ ] , c = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i ; function p ( e , t ) { for ( var n in t ) e [ n ] = t [ n ] ; return e } function f ( e ) { var t = e . parentNode ; t && t . removeChild ( e ) } function a ( e , t , n ) { var o , _ = arguments , l = { } ; for ( o in t ) "key" !== o && "ref" !== o && ( l [ o ] = t [ o ] ) ; if ( arguments . length > 3 ) for ( n = [ n ] , o = 3 ; o < arguments . length ; o ++ ) n . push ( _ [ o ] ) ; if ( null != n && ( l . children = n ) , "function" == typeof e && null != e . defaultProps ) for ( o in e . defaultProps ) void 0 === l [ o ] && ( l [ o ] = e . defaultProps [ o ] ) ; return d ( e , l , t && t . key , t && t . ref , null ) } function d ( t , n , o , _ , l ) { var r = { type : t , props : n , key : o , ref : _ , _ _k : null , _ _ : null , _ _b : 0 , _ _e : null , _ _d : void 0 , _ _c : null , constructor : void 0 , _ _v : l } ; return null == l && ( r . _ _v = r ) , e . vnode && e . vnode ( r ) , r } function h ( ) { return { } } function v ( e ) { return e . children } function y ( e , t ) { this . props = e , this . context = t } function m ( e , t ) { if ( null == t ) return e . _ _ ? m ( e . _ _ , e . _ _ . _ _k . indexOf ( e ) + 1 ) : null ; for ( var n ; t < e . _ _k . length ; t ++ ) if ( null != ( n = e . _ _k [ t ] ) && null != n . _ _e ) return n . _ _e ; return "function" == typeof e . type ? m ( e ) : null } function k ( e ) { var t , n ; if ( null != ( e = e . _ _ ) && null != e . _ _c ) { for ( e . _ _e = e . _ _c . base = null , t = 0 ; t < e . _ _k . length ; t ++ ) if ( null != ( n = e . _ _k [ t ] ) && null != n . _ _e ) { e . _ _e = e . _ _c . base = n . _ _e ; break } return k ( e ) } } function g ( t ) { ( ! t . _ _d && ( t . _ _d = ! 0 ) && n . push ( t ) && ! o ++ || l !== e . debounceRendering ) && ( ( l = e . debounceRendering ) || _ ) ( x ) } function x ( ) { for ( var e ; o = n . length ; ) e = n . sort ( function ( e , t ) { return e . _ _v . _ _b - t . _ _v . _ _b } ) , n = [ ] , e . some ( function ( e ) { var t , n , o , _ , l , r , i ; e . _ _d && ( r = ( l = ( t = e ) . _ _v ) . _ _e , ( i = t . _ _P ) && ( n = [ ] , ( o = p ( { } , l ) ) . _ _v = o , _ = N ( i , l , o , t . _ _n , void 0 !== i . ownerSVGElement , null , n , null == r ? m ( l ) : r ) , U ( n , l ) , _ != r && k ( l ) ) ) } ) } function b ( e , t , n , o , _ , l , r , i , c ) { var p , a , d , h , v , y , k , g = n && n . _ _k || s , x = g . length ; if ( i == u && ( i = null != l ? l [ 0 ] : x ? m ( n , 0 ) : null ) , p = 0 , t . _ _k = C ( t . _ _k , function ( n ) { if ( null != n ) { if ( n . _ _ = t , n . _ _b = t . _ _b + 1 , null === ( d = g [ p ] ) || d && n . key == d . key && n . type === d . type ) g [ p ] = void 0 ; else for ( a = 0 ; a < x ; a ++ ) { if ( ( d = g [ a ] ) && n . key == d . key && n . type === d . type ) { g [ a ] = void 0 ; break } d = null } if ( h = N ( e , n , d = d || u , o , _ , l , r , i , c ) , ( a = n . ref ) && d . ref != a && ( k || ( k = [ ] ) , d . ref && k . push ( d . ref , null , n ) , k . push ( a , n . _ _c || h , n ) ) , null != h ) { var s ; if ( null == y && ( y = h ) , void 0 !== n . _ _d ) s = n . _ _d , n . _ _d = void 0 ; else if ( l == d || h != i || null == h . parentNode ) { e : if ( null == i || i . parentNode !== e ) e . appendChild ( h ) , s = null ; else { for ( v = i , a = 0 ; ( v = v . nextSibling ) && a < x ; a += 2 ) if ( v == h ) break e ; e . insertBefore ( h , i ) , s = i } "option" == t . type && ( e . value = "" ) } i = void 0 !== s ? s : h . nextSibling , "function" == typeof t . type && ( t . _ _d = i ) } else i && d . _ _e == i && i . parentNode != e && ( i = m ( d ) ) } return p ++ , n } ) , t . _ _e = y , null != l && "function" != typeof t . type ) for ( p = l . length ; p -- ; ) null != l [ p ] && f ( l [ p ] ) ; for ( p = x ; p -- ; ) null != g [ p ] && W ( g [ p ] , g [ p ] ) ; if ( k ) for ( p = 0 ; p < k . length ; p ++ ) T ( k [ p ] , k [ ++ p ] , k [ ++ p ] ) } function C ( e , t , n ) { if ( null == n && ( n = [ ] ) , null == e || "boolean" == typeof e ) t && n . push ( t ( null ) ) ; else if ( Array . isArray ( e ) ) for ( var o = 0 ; o < e . length ; o ++ ) C ( e [ o ] , t , n ) ; else n . push ( t ? t ( "string" == typeof e || "number" == typeof e ? d ( null , e , null , null , e ) : null != e . _ _e || null != e . _ _c ? d ( e . type , e . props , e . key , null , e . _ _v ) : e ) : e ) ; return n } function w ( e , t , n , o , _ ) { var l ; for ( l in n ) "children" === l || "key" === l || l in t || P ( e , l , null , n [ l ] , o ) ; for ( l in t ) _ && "function" != typeof t [ l ] || "children" === l || "key" === l || "value" === l || "checked" === l || n [ l ] === t [ l ] || P ( e , l , t [ l ] , n [ l ] , o ) } function S ( e , t , n ) { "-" === t [ 0 ] ? e . setProperty ( t , n ) : e [ t ] = "number" == typeof n && ! 1 === c . test ( t ) ? n + "px" : null == n ? "" : n } function P ( e , t , n , o , _ ) { var l , r , i , u , s ; if ( _ ? "className" === t && ( t = "class" ) : "class" === t && ( t = "className" ) , "style" === t ) if ( l = e . style , "string" == typeof n ) l . cssText = n ; else { if ( "string" == typeof o && ( l . cssText = "" , o = null ) , o ) for ( u in o ) n && u in n || S ( l , u , "" ) ; if ( n ) for ( s in n ) o && n [ s ] === o [ s ] || S ( l , s , n [ s ] ) } else "o" === t [ 0 ] && "n" === t [ 1 ] ? ( r = t !== ( t = t . replace ( /Capture$/ , "" ) ) , i = t . toLowerCase ( ) , t = ( i in e ? i : t ) . slice ( 2 ) , n ? ( o || e . addEventListener ( t , E , r ) , ( e . l || ( e . l = { } ) ) [ t ] = n ) : e . removeEventListener ( t , E , r ) ) : "list" !== t && "tagName" !== t && "form" !== t && "type" !== t && "size" !== t && ! _ && t in e
} , { } ] , "ucYa" : [ function ( require , module , exports ) {
"use strict" ; function t ( t ) { return t [ t . length - 1 ] || null } function e ( t , e ) { t . sort ( function ( t , r ) { const n = e ( t ) , o = e ( r ) ; return n < o ? - 1 : n > o ? 1 : 0 } ) } function r ( t , e , r ) { return t . has ( e ) || t . set ( e , r ( e ) ) , t . get ( e ) } function n ( t , e , r ) { return t . has ( e ) ? t . get ( e ) : r ( e ) } function o ( t , e ) { if ( ! t . has ( e ) ) throw new Error ( ` Expected key ${ e } ` ) ; return t . get ( e ) } Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . lastOf = t , exports . sortBy = e , exports . getOrInsert = r , exports . getOrElse = n , exports . getOrThrow = o , exports . itMap = l , exports . itForEach = u , exports . itReduce = i , exports . zeroPad = c , exports . formatPercent = a , exports . fract = f , exports . triangle = h , exports . findValueBisect = g , exports . findIndexBisect = p , exports . noop = x , exports . objectsHaveShallowEquality = d , exports . memoizeByShallowEquality = y , exports . memoizeByReference = w , exports . lazyStatic = E , exports . decodeBase64 = A , exports . KeyedSet = void 0 ; class s { constructor ( ) { this . map = new Map } getOrInsert ( t ) { const e = t . key , r = this . map . get ( e ) ; return r || ( this . map . set ( e , t ) , t ) } forEach ( t ) { this . map . forEach ( t ) } [ Symbol . iterator ] ( ) { return this . map . values ( ) } } function * l ( t , e ) { for ( let r of t ) yield e ( r ) } function u ( t , e ) { for ( let r of t ) e ( r ) } function i ( t , e , r ) { let n = r ; for ( let o of t ) n = e ( n , o ) ; return n } function c ( t , e ) { return new Array ( Math . max ( e - t . length , 0 ) + 1 ) . join ( "0" ) + t } function a ( t ) { let e = ` ${ t . toFixed ( 0 ) } % ` ; return 100 === t ? e = "100%" : t > 99 ? e = ">99%" : t < . 01 ? e = "<0.01%" : t < 1 ? e = ` ${ t . toFixed ( 2 ) } % ` : t < 10 && ( e = ` ${ t . toFixed ( 1 ) } % ` ) , e } function f ( t ) { return t - Math . floor ( t ) } function h ( t ) { return 2 * Math . abs ( f ( t ) - . 5 ) - 1 } function g ( t , e , r , n , o = 1 ) { for ( console . assert ( ! isNaN ( o ) && ! isNaN ( n ) ) ; ; ) { if ( e - t <= o ) return [ t , e ] ; const s = ( e + t ) / 2 ; r ( s ) < n ? t = s : e = s } } function p ( t , e ) { if ( 0 === t . length ) return - 1 ; let r = 0 , n = t . length - 1 ; for ( ; n !== r ; ) { const o = Math . floor ( ( r + n ) / 2 ) ; e ( t [ o ] ) ? n = o : r = o + 1 } return e ( t [ n ] ) ? n : - 1 } function x ( ... t ) { } function d ( t , e ) { for ( let r in t ) if ( t [ r ] !== e [ r ] ) return ! 1 ; for ( let r in e ) if ( t [ r ] !== e [ r ] ) return ! 1 ; return ! 0 } function y ( t ) { let e = null ; return r => { let n ; return null == e ? ( n = t ( r ) , e = { args : r , result : n } , n ) : d ( e . args , r ) ? e . result : ( e . args = r , e . result = t ( r ) , e . result ) } } function w ( t ) { let e = null ; return r => { let n ; return null == e ? ( n = t ( r ) , e = { args : r , result : n } , n ) : e . args === r ? e . result : ( e . args = r , e . result = t ( r ) , e . result ) } } function E ( t ) { let e = null ; return ( ) => ( null == e && ( e = { result : t ( ) } ) , e . result ) } exports . KeyedSet = s ; const m = E ( ( ) => { const t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" , e = new Map ; for ( let r = 0 ; r < t . length ; r ++ ) e . set ( t . charAt ( r ) , r ) ; return e . set ( "=" , - 1 ) , e } ) ; function A ( t ) { const e = m ( ) ; if ( t . length % 4 != 0 ) throw new Error ( ` Invalid length for base64 encoded string. Expected length % 4 = 0, got length = ${ t . length } ` ) ; const r = t . length / 4 ; let n ; n = t . length >= 4 && "=" === t . charAt ( t . length - 1 ) ? "=" === t . charAt ( t . length - 2 ) ? 3 * r - 2 : 3 * r - 1 : 3 * r ; const o = new Uint8Array ( n ) ; let s = 0 ; for ( let l = 0 ; l < r ; l ++ ) { const r = t . charAt ( 4 * l + 0 ) , n = t . charAt ( 4 * l + 1 ) , u = t . charAt ( 4 * l + 2 ) , i = t . charAt ( 4 * l + 3 ) , c = e . get ( r ) , a = e . get ( n ) , f = e . get ( u ) , h = e . get ( i ) ; if ( null == c || null == a || null == f || null == h ) throw new Error ( ` Invalid quartet at indices ${ 4 * l } .. ${ 4 * l + 3 } : ${ t . substring ( 4 * l , 4 * l + 3 ) } ` ) ; o [ s ++ ] = c << 2 | a >> 4 , "=" !== u && ( o [ s ++ ] = ( 15 & a ) << 4 | f >> 2 ) , "=" !== i && ( o [ s ++ ] = ( 7 & f ) << 6 | h ) } if ( s !== n ) throw new Error ( ` Expected to decode ${ n } bytes, but only decoded ${ s } ) ` ) ; return o }
} , { } ] , "EhY8" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . LRUCache = exports . List = void 0 ; class t { constructor ( t ) { this . data = t , this . prev = null , this . next = null } } class e { constructor ( ) { this . head = null , this . tail = null , this . size = 0 } getHead ( ) { return this . head } getTail ( ) { return this . tail } getSize ( ) { return this . size } append ( t ) { this . tail ? ( this . tail . next = t , t . prev = this . tail , this . tail = t ) : this . head = this . tail = t , this . size ++ } prepend ( t ) { return this . head ? ( this . head . prev = t , t . next = this . head , this . head = t ) : this . head = this . tail = t , this . size ++ , t } pop ( ) { if ( this . tail ) { const t = this . tail ; return t . prev ? ( this . tail = t . prev , this . tail . next = null ) : this . head = this . tail = null , this . size -- , t . prev = null , t } return null } dequeue ( ) { if ( this . head ) { const t = this . head ; return t . next ? ( this . head = t . next , this . head . prev = null ) : this . head = this . tail = null , this . size -- , t . next = null , t } return null } remove ( t ) { null == t . prev ? this . dequeue ( ) : null == t . next ? this . pop ( ) : ( t . next . prev = t . prev , t . prev . next = t . next , t . next = null , t . prev = null , this . size -- ) } } exports . List = e ; class i { constructor ( t ) { this . capacity = t , this . list = new e , this . map = new Map } has ( t ) { return this . map . has ( t ) } get ( t ) { const e = this . map . get ( t ) ; return e ? ( this . list . remove ( e . listNode ) , this . list . prepend ( e . listNode ) , e ? e . value : null ) : null } getSize ( ) { return this . list . getSize ( ) } getCapacity ( ) { return this . capacity } insert ( e , i ) { const s = this . map . get ( e ) ; for ( s && this . list . remove ( s . listNode ) ; this . list . getSize ( ) >= this . capacity ; ) this . map . delete ( this . list . pop ( ) . data ) ; const h = this . list . prepend ( new t ( e ) ) ; this . map . set ( e , { value : i , listNode : h } ) } getOrInsert ( t , e ) { let i = this . get ( t ) ; return null == i && ( i = e ( t ) , this . insert ( t , i ) ) , i } removeLRU ( ) { const t = this . list . pop ( ) ; if ( ! t ) return null ; const e = t . data , i = this . map . get ( e ) . value ; return this . map . delete ( e ) , [ e , i ] } clear ( ) { this . list = new e , this . map = new Map } } exports . LRUCache = i ;
} , { } ] , "tDuZ" : [ function ( require , module , exports ) {
"use strict" ; function t ( t , i , s ) { return t < i ? i : t > s ? s : t } Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . clamp = t , exports . Rect = exports . AffineTransform = exports . Vec2 = void 0 ; class i { constructor ( t , i ) { this . x = t , this . y = i } withX ( t ) { return new i ( t , this . y ) } withY ( t ) { return new i ( this . x , t ) } plus ( t ) { return new i ( this . x + t . x , this . y + t . y ) } minus ( t ) { return new i ( this . x - t . x , this . y - t . y ) } times ( t ) { return new i ( this . x * t , this . y * t ) } timesPointwise ( t ) { return new i ( this . x * t . x , this . y * t . y ) } dividedByPointwise ( t ) { return new i ( this . x / t . x , this . y / t . y ) } dot ( t ) { return this . x * t . x + this . y * t . y } equals ( t ) { return this . x === t . x && this . y === t . y } approxEquals ( t , i = 1e-9 ) { return Math . abs ( this . x - t . x ) < i && Math . abs ( this . y - t . y ) < i } length2 ( ) { return this . dot ( this ) } length ( ) { return Math . sqrt ( this . length2 ( ) ) } abs ( ) { return new i ( Math . abs ( this . x ) , Math . abs ( this . y ) ) } static min ( t , s ) { return new i ( Math . min ( t . x , s . x ) , Math . min ( t . y , s . y ) ) } static max ( t , s ) { return new i ( Math . max ( t . x , s . x ) , Math . max ( t . y , s . y ) ) } static clamp ( s , e , r ) { return new i ( t ( s . x , e . x , r . x ) , t ( s . y , e . y , r . y ) ) } flatten ( ) { return [ this . x , this . y ] } } exports . Vec2 = i , i . zero = new i ( 0 , 0 ) , i . unit = new i ( 1 , 1 ) ; class s { constructor ( t = 1 , i = 0 , s = 0 , e = 0 , r = 1 , n = 0 ) { this . m00 = t , this . m01 = i , this . m02 = s , this . m10 = e , this . m11 = r , this . m12 = n } withScale ( t ) { let { m00 : i , m01 : e , m02 : r , m10 : n , m11 : h , m12 : m } = this ; return i = t . x , h = t . y , new s ( i , e , r , n , h , m ) } static withScale ( t ) { return ( new s ) . withScale ( t ) } scaledBy ( t ) { return s . withScale ( t ) . times ( this ) } getScale ( ) { return new i ( this . m00 , this . m11 ) } withTranslation ( t ) { let { m00 : i , m01 : e , m02 : r , m10 : n , m11 : h , m12 : m } = this ; return r = t . x , m = t . y , new s ( i , e , r , n , h , m ) } static withTranslation ( t ) { return ( new s ) . withTranslation ( t ) } getTranslation ( ) { return new i ( this . m02 , this . m12 ) } translatedBy ( t ) { return s . withTranslation ( t ) . times ( this ) } static betweenRects ( t , e ) { return s . withTranslation ( t . origin . times ( - 1 ) ) . scaledBy ( new i ( e . size . x / t . size . x , e . size . y / t . size . y ) ) . translatedBy ( e . origin ) } times ( t ) { const i = this . m00 * t . m00 + this . m01 * t . m10 , e = this . m00 * t . m01 + this . m01 * t . m11 , r = this . m00 * t . m02 + this . m01 * t . m12 + this . m02 , n = this . m10 * t . m00 + this . m11 * t . m10 , h = this . m10 * t . m01 + this . m11 * t . m11 , m = this . m10 * t . m02 + this . m11 * t . m12 + this . m12 ; return new s ( i , e , r , n , h , m ) } equals ( t ) { return this . m00 == t . m00 && this . m01 == t . m01 && this . m02 == t . m02 && this . m10 == t . m10 && this . m11 == t . m11 && this . m12 == t . m12 } approxEquals ( t , i = 1e-9 ) { return Math . abs ( this . m00 - t . m00 ) < i && Math . abs ( this . m01 - t . m01 ) < i && Math . abs ( this . m02 - t . m02 ) < i && Math . abs ( this . m10 - t . m10 ) < i && Math . abs ( this . m11 - t . m11 ) < i && Math . abs ( this . m12 - t . m12 ) < i } timesScalar ( t ) { const { m00 : i , m01 : e , m02 : r , m10 : n , m11 : h , m12 : m } = this ; return new s ( t * i , t * e , t * r , t * n , t * h , t * m ) } det ( ) { const { m00 : t , m01 : i , m02 : s , m10 : e , m11 : r , m12 : n } = this ; return t * ( 1 * r - 0 * n ) - i * ( 1 * e - 0 * n ) + s * ( 0 * e - 0 * r ) } adj ( ) { const { m00 : t , m01 : i , m02 : e , m10 : r , m11 : n , m12 : h } = this ; return new s ( + ( 1 * n - 0 * h ) , - ( 1 * i - 0 * e ) , + ( i * h - e * n ) , - ( 1 * r - 0 * h ) , + ( 1 * t - 0 * e ) , - ( t * h - e * r ) ) } inverted ( ) { const t = this . det ( ) ; return 0 === t ? null : this . adj ( ) . timesScalar ( 1 / t ) } transformVector ( t ) { return new i ( t . x * this . m00 + t . y * this . m01 , t . x * this . m10 + t . y * this . m11 ) } inverseTransformVector ( t ) { const i = this . inverted ( ) ; return i ? i . transformVector ( t ) : null } transformPosition ( t ) { return new i ( t . x * this . m00 + t . y * this . m01 + this . m02 , t . x * this . m10 + t . y * this . m11 + this . m12 ) } inverseTransformPosition ( t ) { const i = this . inverted ( ) ; return i ? i . transformPosition ( t ) : null } transformRect ( t ) { const i = this . transformVector ( t . size ) , s = this . transformPosition ( t . origin ) ; return i . x < 0 && i . y < 0 ? new e ( s . plus ( i ) , i . abs ( ) ) : i . x < 0 ? new e ( s . withX ( s . x + i . x ) , i . abs ( ) ) : i . y < 0 ? new e ( s . withY ( s . y + i . y ) , i . abs ( ) ) : new e ( s , i ) } inverseTransformRect ( t ) { const i = this . inverted ( ) ; return i ? i . transformRect ( t ) : null } flatten ( ) { return [ this . m00 , this . m10 , 0 , this . m01 , this . m11 , 0 , this . m02 , this . m12 , 1 ] } } exports . AffineTransform = s ; class e { constructor ( t , i ) { this . origin = t , this . size = i } isEmpty ( ) { return 0 == this . width ( ) || 0 == this . height ( ) } width ( ) { return this . size . x } height ( ) { return this . size . y } left ( ) { return this . origin . x } right ( ) { return this . left ( ) + this . width ( ) } top ( ) { return this . origin . y } bottom ( ) { return this . top ( ) + this . height ( ) } topLeft ( ) { return this . origin } topRight ( ) { return this . origin . plus ( new i ( this . width ( ) , 0 ) ) } bottomRight ( ) { return this . origin . plus ( this . size ) } bottomLeft ( ) { return this . origin . plus ( new i ( 0 , this . height ( ) ) ) } withOrigi
} , { } ] , "pBGv" : [ function ( require , module , exports ) {
var t , e , n = module . exports = { } ; function r ( ) { throw new Error ( "setTimeout has not been defined" ) } function o ( ) { throw new Error ( "clearTimeout has not been defined" ) } function i ( e ) { if ( t === setTimeout ) return setTimeout ( e , 0 ) ; if ( ( t === r || ! t ) && setTimeout ) return t = setTimeout , setTimeout ( e , 0 ) ; try { return t ( e , 0 ) } catch ( n ) { try { return t . call ( null , e , 0 ) } catch ( n ) { return t . call ( this , e , 0 ) } } } function u ( t ) { if ( e === clearTimeout ) return clearTimeout ( t ) ; if ( ( e === o || ! e ) && clearTimeout ) return e = clearTimeout , clearTimeout ( t ) ; try { return e ( t ) } catch ( n ) { try { return e . call ( null , t ) } catch ( n ) { return e . call ( this , t ) } } } ! function ( ) { try { t = "function" == typeof setTimeout ? setTimeout : r } catch ( n ) { t = r } try { e = "function" == typeof clearTimeout ? clearTimeout : o } catch ( n ) { e = o } } ( ) ; var c , s = [ ] , l = ! 1 , a = - 1 ; function f ( ) { l && c && ( l = ! 1 , c . length ? s = c . concat ( s ) : a = - 1 , s . length && h ( ) ) } function h ( ) { if ( ! l ) { var t = i ( f ) ; l = ! 0 ; for ( var e = s . length ; e ; ) { for ( c = s , s = [ ] ; ++ a < e ; ) c && c [ a ] . run ( ) ; a = - 1 , e = s . length } c = null , l = ! 1 , u ( t ) } } function m ( t , e ) { this . fun = t , this . array = e } function p ( ) { } n . nextTick = function ( t ) { var e = new Array ( arguments . length - 1 ) ; if ( arguments . length > 1 ) for ( var n = 1 ; n < arguments . length ; n ++ ) e [ n - 1 ] = arguments [ n ] ; s . push ( new m ( t , e ) ) , 1 !== s . length || l || i ( h ) } , m . prototype . run = function ( ) { this . fun . apply ( null , this . array ) } , n . title = "browser" , n . env = { } , n . argv = [ ] , n . version = "" , n . versions = { } , n . on = p , n . addListener = p , n . once = p , n . off = p , n . removeListener = p , n . removeAllListeners = p , n . emit = p , n . prependListener = p , n . prependOnceListener = p , n . listeners = function ( t ) { return [ ] } , n . binding = function ( t ) { throw new Error ( "process.binding is not supported" ) } , n . cwd = function ( ) { return "/" } , n . chdir = function ( t ) { throw new Error ( "process.chdir is not supported" ) } , n . umask = function ( ) { return 0 } ;
} , { } ] , "XGYN" : [ function ( require , module , exports ) {
var process = require ( "process" ) ;
2024-01-01 20:09:05 -05:00
var t = require ( "process" ) ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . WebGL = exports . Graphics = void 0 ; const e = void 0 !== t && t . env && ! 0 ; function i ( t ) { if ( ! e && ! t ) throw new Error ( "Assertion failed." ) } function r ( t , e ) { - 1 === t . indexOf ( e ) && t . push ( e ) } function s ( t , e ) { const i = t . indexOf ( e ) ; - 1 !== i && t . splice ( i , 1 ) } function n ( t , e ) { return i ( e >= 0 && e <= 31 ) , t . TEXTURE0 + e } var h , a ; exports . Graphics = h , function ( t ) { t . Rect = class { constructor ( t = 0 , e = 0 , i = 0 , r = 0 ) { this . x = t , this . y = e , this . width = i , this . height = r } set ( t , e , i , r ) { this . x = t , this . y = e , this . width = i , this . height = r } equals ( t ) { return this . x === t . x && this . y === t . y && this . width === t . width && this . height === t . height } } ; class e { constructor ( t , e , i , r ) { this . redF = t , this . greenF = e , this . blueF = i , this . alphaF = r } equals ( t ) { return this . redF === t . redF && this . greenF === t . greenF && this . blueF === t . blueF && this . alphaF === t . alphaF } } let i , r , s , n , h ; e . TRANSPARENT = new e ( 0 , 0 , 0 , 0 ) , t . Color = e , function ( t ) { t [ t . ZERO = 0 ] = "ZERO" , t [ t . ONE = 1 ] = "ONE" , t [ t . SOURCE _COLOR = 2 ] = "SOURCE_COLOR" , t [ t . TARGET _COLOR = 3 ] = "TARGET_COLOR" , t [ t . INVERSE _SOURCE _COLOR = 4 ] = "INVERSE_SOURCE_COLOR" , t [ t . INVERSE _TARGET _COLOR = 5 ] = "INVERSE_TARGET_COLOR" , t [ t . SOURCE _ALPHA = 6 ] = "SOURCE_ALPHA" , t [ t . TARGET _ALPHA = 7 ] = "TARGET_ALPHA" , t [ t . INVERSE _SOURCE _ALPHA = 8 ] = "INVERSE_SOURCE_ALPHA" , t [ t . INVERSE _TARGET _ALPHA = 9 ] = "INVERSE_TARGET_ALPHA" , t [ t . CONSTANT = 10 ] = "CONSTANT" , t [ t . INVERSE _CONSTANT = 11 ] = "INVERSE_CONSTANT" } ( i = t . BlendOperation || ( t . BlendOperation = { } ) ) , function ( t ) { t [ t . TRIANGLES = 0 ] = "TRIANGLES" , t [ t . TRIANGLE _STRIP = 1 ] = "TRIANGLE_STRIP" } ( r = t . Primitive || ( t . Primitive = { } ) ) ; function a ( t ) { return t == s . FLOAT ? 4 : 1 } t . Context = class { constructor ( ) { this . resizeEventHandlers = new Set } setCopyBlendState ( ) { this . setBlendState ( i . ONE , i . ZERO ) } setAddBlendState ( ) { this . setBlendState ( i . ONE , i . ONE ) } setPremultipliedBlendState ( ) { this . setBlendState ( i . ONE , i . INVERSE _SOURCE _ALPHA ) } setUnpremultipliedBlendState ( ) { this . setBlendState ( i . SOURCE _ALPHA , i . INVERSE _SOURCE _ALPHA ) } addAfterResizeEventHandler ( t ) { this . resizeEventHandlers . add ( t ) } removeAfterResizeEventHandler ( t ) { this . resizeEventHandlers . delete ( t ) } } , function ( t ) { t [ t . FLOAT = 0 ] = "FLOAT" , t [ t . BYTE = 1 ] = "BYTE" } ( s = t . AttributeType || ( t . AttributeType = { } ) ) , t . attributeByteLength = a ; class _ { constructor ( t , e , i , r ) { this . name = t , this . type = e , this . count = i , this . byteOffset = r } } t . Attribute = _ ; t . VertexFormat = class { constructor ( ) { this . _attributes = [ ] , this . _stride = 0 } get attributes ( ) { return this . _attributes } get stride ( ) { return this . _stride } add ( t , e , i ) { return this . attributes . push ( new _ ( t , e , i , this . stride ) ) , this . _stride += i * a ( e ) , this } } ; t . VertexBuffer = class { uploadFloat32Array ( t ) { this . upload ( new Uint8Array ( t . buffer ) , 0 ) } uploadFloats ( t ) { this . uploadFloat32Array ( new Float32Array ( t ) ) } } , function ( t ) { t [ t . NEAREST = 0 ] = "NEAREST" , t [ t . LINEAR = 1 ] = "LINEAR" } ( n = t . PixelFilter || ( t . PixelFilter = { } ) ) , function ( t ) { t [ t . REPEAT = 0 ] = "REPEAT" , t [ t . CLAMP = 1 ] = "CLAMP" } ( h = t . PixelWrap || ( t . PixelWrap = { } ) ) ; class o { constructor ( t , e , i ) { this . minFilter = t , this . magFilter = e , this . wrap = i } } o . LINEAR _CLAMP = new o ( n . LINEAR , n . LINEAR , h . CLAMP ) , o . LINEAR _MIN _NEAREST _MAG _CLAMP = new o ( n . LINEAR , n . NEAREST , h . CLAMP ) , o . NEAREST _CLAMP = new o ( n . NEAREST , n . NEAREST , h . CLAMP ) , t . TextureFormat = o } ( h || ( exports . Graphics = h = { } ) ) , exports . WebGL = a , function ( t ) { class a extends h . Context { get widthInPixels ( ) { return this . _width } get heightInPixels ( ) { return this . _height } constructor ( t = document . createElement ( "canvas" ) ) { super ( ) , this . _attributeCount = 0 , this . _blendOperations = 0 , this . _contextResetHandlers = [ ] , this . _currentClearColor = h . Color . TRANSPARENT , this . _currentRenderTarget = null , this . _defaultViewport = new h . Rect , this . _forceStateUpdate = ! 0 , this . _generation = 1 , this . _height = 0 , this . _oldBlendOperations = 0 , this . _oldRenderTarget = null , this . _oldViewport = new h . Rect , this . _width = 0 , this . handleWebglContextRestored = ( ( ) => { this . _attributeCount = 0 , this . _currentClearColor = h . Color . TRANSPARENT , this . _ forceStateUpdate = ! 0 , this . _generation ++ ; for ( let t of this . _contextResetHandlers ) t ( ) } ) , this . ANGLE _instanced _arrays = null , this . ANGLE _instanced _arrays _generation = - 1 ; let e = t . getContext ( "webgl" , { alpha : ! 1 , antialias : ! 1 , depth : ! 1 , preserveDrawingBuffer : ! 1 , stencil : ! 1 } ) ; if ( null == e ) throw new Error ( "Setup failure" ) ; this . _gl = e ; let i = t . style ; t . width = 0 , t . height = 0 , i . width = i . height = "0" , t . add
2022-11-09 21:39:00 -05:00
} , { "process" : "pBGv" } ] , "MMP6" : [ function ( require , module , exports ) {
"use strict" ; function e ( e , t , r ) { let { m00 : n , m01 : o , m02 : s , m10 : i , m11 : f , m12 : m } = r ; e . setUniformMat3 ( t , n , o , s , i , f , m , 0 , 0 , 1 ) } function t ( e , t , r ) { e . setUniformVec2 ( t , r . x , r . y ) } function r ( e , t , r ) { e . setRenderTarget ( t ) , e . setViewport ( 0 , 0 , t . texture . width , t . texture . height ) , r ( ) , e . setRenderTarget ( null ) } Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . setUniformAffineTransform = e , exports . setUniformVec2 = t , exports . renderInto = r ;
} , { } ] , "UGJH" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . RectangleBatchRenderer = exports . RectangleBatch = void 0 ; var e = require ( "../lib/math" ) , t = require ( "./graphics" ) , r = require ( "./utils" ) ; const i = new t . Graphics . VertexFormat ; i . add ( "configSpacePos" , t . Graphics . AttributeType . FLOAT , 2 ) , i . add ( "color" , t . Graphics . AttributeType . FLOAT , 3 ) ; const s = "\n uniform mat3 configSpaceToNDC;\n\n attribute vec2 configSpacePos;\n attribute vec3 color;\n varying vec3 vColor;\n\n void main() {\n vColor = color;\n vec2 position = (configSpaceToNDC * vec3(configSpacePos, 1)).xy;\n gl_Position = vec4(position, 1, 1);\n }\n" , n = "\n precision mediump float;\n varying vec3 vColor;\n\n void main() {\n gl_FragColor = vec4(vColor.rgb, 1);\n }\n" ; class o { constructor ( e ) { this . gl = e , this . rects = [ ] , this . colors = [ ] , this . buffer = null } getRectCount ( ) { return this . rects . length } getBuffer ( ) { if ( this . buffer ) return this . buffer ; const e = [ [ 0 , 0 ] , [ 1 , 0 ] , [ 0 , 1 ] , [ 1 , 0 ] , [ 0 , 1 ] , [ 1 , 1 ] ] , t = new Uint8Array ( i . stride * e . length * this . rects . length ) , r = new Float32Array ( t . buffer ) ; let s = 0 ; for ( let i = 0 ; i < this . rects . length ; i ++ ) { const t = this . rects [ i ] , n = this . colors [ i ] ; for ( let i of e ) r [ s ++ ] = t . origin . x + i [ 0 ] * t . size . x , r [ s ++ ] = t . origin . y + i [ 1 ] * t . size . y , r [ s ++ ] = n . r , r [ s ++ ] = n . g , r [ s ++ ] = n . b } if ( s !== r . length ) throw new Error ( "Buffer expected to be full but wasn't" ) ; return this . buffer = this . gl . createVertexBuffer ( t . length ) , this . buffer . upload ( t ) , this . buffer } addRect ( e , t ) { this . rects . push ( e ) , this . colors . push ( t ) , this . buffer && ( this . buffer . free ( ) , this . buffer = null ) } free ( ) { this . buffer && ( this . buffer . free ( ) , this . buffer = null ) } } exports . RectangleBatch = o ; class c { constructor ( e ) { this . gl = e , this . material = e . createMaterial ( i , s , n ) } render ( i ) { ( 0 , r . setUniformAffineTransform ) ( this . material , "configSpaceToNDC" , ( ( ) => { const t = e . AffineTransform . betweenRects ( i . configSpaceSrcRect , i . physicalSpaceDstRect ) , r = new e . Vec2 ( this . gl . viewport . width , this . gl . viewport . height ) ; return e . AffineTransform . withTranslation ( new e . Vec2 ( - 1 , 1 ) ) . times ( e . AffineTransform . withScale ( new e . Vec2 ( 2 , - 2 ) . dividedByPointwise ( r ) ) ) . times ( t ) } ) ( ) ) , this . gl . setUnpremultipliedBlendState ( ) , this . gl . draw ( t . Graphics . Primitive . TRIANGLES , this . material , i . batch . getBuffer ( ) ) } } exports . RectangleBatchRenderer = c ;
} , { "../lib/math" : "tDuZ" , "./graphics" : "XGYN" , "./utils" : "MMP6" } ] , "x77Y" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . Color = void 0 ; var t = require ( "./math" ) ; class r { constructor ( t = 0 , r = 0 , s = 0 , e = 1 ) { this . r = t , this . g = r , this . b = s , this . a = e } static fromLumaChromaHue ( s , e , o ) { const i = o / 60 , a = e * ( 1 - Math . abs ( i % 2 - 1 ) ) , [ n , h , u ] = i < 1 ? [ e , a , 0 ] : i < 2 ? [ a , e , 0 ] : i < 3 ? [ 0 , e , a ] : i < 4 ? [ 0 , a , e ] : i < 5 ? [ a , 0 , e ] : [ e , 0 , a ] , c = s - ( . 3 * n + . 59 * h + . 11 * u ) ; return new r ( ( 0 , t . clamp ) ( n + c , 0 , 1 ) , ( 0 , t . clamp ) ( h + c , 0 , 1 ) , ( 0 , t . clamp ) ( u + c , 0 , 1 ) , 1 ) } static fromCSSHex ( t ) { if ( 7 !== t . length || "#" !== t [ 0 ] ) throw new Error ( ` Invalid color input ${ t } ` ) ; const s = parseInt ( t . substr ( 1 , 2 ) , 16 ) / 255 , e = parseInt ( t . substr ( 3 , 2 ) , 16 ) / 255 , o = parseInt ( t . substr ( 5 , 2 ) , 16 ) / 255 ; if ( s < 0 || s > 1 || e < 0 || e > 1 || o < 0 || o > 1 ) throw new Error ( ` Invalid color input ${ t } ` ) ; return new r ( s , e , o ) } withAlpha ( t ) { return new r ( this . r , this . g , this . b , t ) } toCSS ( ) { return ` rgba( ${ ( 255 * this . r ) . toFixed ( ) } , ${ ( 255 * this . g ) . toFixed ( ) } , ${ ( 255 * this . b ) . toFixed ( ) } , ${ this . a . toFixed ( 2 ) } ) ` } } exports . Color = r ;
} , { "./math" : "tDuZ" } ] , "cFC1" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . RowAtlas = void 0 ; var e = require ( "../lib/lru-cache" ) , t = require ( "./rectangle-batch-renderer" ) , r = require ( "../lib/math" ) , i = require ( "../lib/color" ) , c = require ( "./graphics" ) , h = require ( "./utils" ) ; class a { constructor ( h , a , s ) { this . gl = h , this . rectangleBatchRenderer = a , this . textureRenderer = s , this . texture = h . createTexture ( c . Graphics . TextureFormat . NEAREST _CLAMP , 4096 , 4096 ) , this . renderTarget = h . createRenderTarget ( this . texture ) , this . rowCache = new e . LRUCache ( this . texture . height ) , this . clearLineBatch = new t . RectangleBatch ( h ) , this . clearLineBatch . addRect ( r . Rect . unit , new i . Color ( 0 , 0 , 0 , 0 ) ) , h . addContextResetHandler ( ( ) => { this . rowCache . clear ( ) } ) } has ( e ) { return this . rowCache . has ( e ) } getResolution ( ) { return this . texture . width } getCapacity ( ) { return this . texture . height } allocateLine ( e ) { if ( this . rowCache . getSize ( ) < this . rowCache . getCapacity ( ) ) { const t = this . rowCache . getSize ( ) ; return this . rowCache . insert ( e , t ) , t } { const [ , t ] = this . rowCache . removeLRU ( ) ; return this . rowCache . insert ( e , t ) , t } } writeToAtlasIfNeeded ( e , t ) { ( 0 , h . renderInto ) ( this . gl , this . renderTarget , ( ) => { for ( let i of e ) { let e = this . rowCache . get ( i ) ; if ( null != e ) continue ; e = this . allocateLine ( i ) ; const c = new r . Rect ( new r . Vec2 ( 0 , e ) , new r . Vec2 ( this . texture . width , 1 ) ) ; this . rectangleBatchRenderer . render ( { batch : this . clearLineBatch , configSpaceSrcRect : r . Rect . unit , physicalSpaceDstRect : c } ) , t ( c , i ) } } ) } renderViaAtlas ( e , t ) { let i = this . rowCache . get ( e ) ; if ( null == i ) return ! 1 ; const c = new r . Rect ( new r . Vec2 ( 0 , i ) , new r . Vec2 ( this . texture . width , 1 ) ) ; return this . textureRenderer . render ( { texture : this . texture , srcRect : c , dstRect : t } ) , ! 0 } } exports . RowAtlas = a ;
} , { "../lib/lru-cache" : "EhY8" , "./rectangle-batch-renderer" : "UGJH" , "../lib/math" : "tDuZ" , "../lib/color" : "x77Y" , "./graphics" : "XGYN" , "./utils" : "MMP6" } ] , "p3j0" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . TextureRenderer = void 0 ; var e = require ( "../lib/math" ) , t = require ( "./graphics" ) , r = require ( "./utils" ) ; const n = "\n uniform mat3 uvTransform;\n uniform mat3 positionTransform;\n\n attribute vec2 position;\n attribute vec2 uv;\n varying vec2 vUv;\n\n void main() {\n vUv = (uvTransform * vec3(uv, 1)).xy;\n gl_Position = vec4((positionTransform * vec3(position, 1)).xy, 0, 1);\n }\n" , i = "\n precision mediump float;\n\n varying vec2 vUv;\n uniform sampler2D texture;\n\n void main() {\n gl_FragColor = texture2D(texture, vUv);\n }\n" ; class s { constructor ( e ) { this . gl = e ; const r = new t . Graphics . VertexFormat ; r . add ( "position" , t . Graphics . AttributeType . FLOAT , 2 ) , r . add ( "uv" , t . Graphics . AttributeType . FLOAT , 2 ) ; const s = [ { pos : [ - 1 , 1 ] , uv : [ 0 , 1 ] } , { pos : [ 1 , 1 ] , uv : [ 1 , 1 ] } , { pos : [ - 1 , - 1 ] , uv : [ 0 , 0 ] } , { pos : [ 1 , - 1 ] , uv : [ 1 , 0 ] } ] , o = [ ] ; for ( let t of s ) o . push ( t . pos [ 0 ] ) , o . push ( t . pos [ 1 ] ) , o . push ( t . uv [ 0 ] ) , o . push ( t . uv [ 1 ] ) ; this . buffer = e . createVertexBuffer ( r . stride * s . length ) , this . buffer . upload ( new Uint8Array ( new Float32Array ( o ) . buffer ) ) , this . material = e . createMaterial ( r , n , i ) } render ( n ) { this . material . setUniformSampler ( "texture" , n . texture , 0 ) , ( 0 , r . setUniformAffineTransform ) ( this . material , "uvTransform" , ( ( ) => { const { srcRect : t , texture : r } = n , i = e . AffineTransform . withTranslation ( new e . Vec2 ( 0 , 1 ) ) . times ( e . AffineTransform . withScale ( new e . Vec2 ( 1 , - 1 ) ) ) . times ( e . AffineTransform . betweenRects ( new e . Rect ( e . Vec2 . zero , new e . Vec2 ( r . width , r . height ) ) , e . Rect . unit ) ) . transformRect ( t ) ; return e . AffineTransform . betweenRects ( e . Rect . unit , i ) } ) ( ) ) , ( 0 , r . setUniformAffineTransform ) ( this . material , "positionTransform" , ( ( ) => { const { dstRect : t } = n , { viewport : r } = this . gl , i = new e . Vec2 ( r . width , r . height ) , s = e . AffineTransform . withScale ( new e . Vec2 ( 1 , - 1 ) ) . times ( e . AffineTransform . betweenRects ( new e . Rect ( e . Vec2 . zero , i ) , e . Rect . NDC ) ) . transformRect ( t ) ; return e . AffineTransform . betweenRects ( e . Rect . NDC , s ) } ) ( ) ) , this . gl . setUnpremultipliedBlendState ( ) , this . gl . draw ( t . Graphics . Primitive . TRIANGLE _STRIP , this . material , this . buffer ) } } exports . TextureRenderer = s ;
} , { "../lib/math" : "tDuZ" , "./graphics" : "XGYN" , "./utils" : "MMP6" } ] , "tdKg" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . ViewportRectangleRenderer = void 0 ; var e = require ( "../lib/color" ) , i = require ( "./graphics" ) , r = require ( "./utils" ) ; const o = new i . Graphics . VertexFormat ; o . add ( "position" , i . Graphics . AttributeType . FLOAT , 2 ) ; const n = "\n attribute vec2 position;\n\n void main() {\n gl_Position = vec4(position, 0, 1);\n }\n" , t = i => { const { r : r , g : o , b : n } = e . Color . fromCSSHex ( i . fgSecondaryColor ) , t = ` ${ r . toFixed ( 1 ) } , ${ o . toFixed ( 1 ) } , ${ n . toFixed ( 1 ) } ` ; return ` \n precision mediump float; \n \n uniform mat3 configSpaceToPhysicalViewSpace; \n uniform vec2 physicalSize; \n uniform vec2 physicalOrigin; \n uniform vec2 configSpaceViewportOrigin; \n uniform vec2 configSpaceViewportSize; \n uniform float framebufferHeight; \n \n void main() { \n vec2 origin = (configSpaceToPhysicalViewSpace * vec3(configSpaceViewportOrigin, 1.0)).xy; \n vec2 size = (configSpaceToPhysicalViewSpace * vec3(configSpaceViewportSize, 0.0)).xy; \n \n vec2 halfSize = physicalSize / 2.0; \n \n float borderWidth = 2.0; \n \n origin = floor(origin * halfSize) / halfSize + borderWidth * vec2(1.0, 1.0); \n size = floor(size * halfSize) / halfSize - 2.0 * borderWidth * vec2(1.0, 1.0); \n \n vec2 coord = gl_FragCoord.xy; \n coord.x = coord.x - physicalOrigin.x; \n coord.y = framebufferHeight - coord.y - physicalOrigin.y; \n vec2 clamped = clamp(coord, origin, origin + size); \n vec2 gap = clamped - coord; \n float maxdist = max(abs(gap.x), abs(gap.y)); \n \n // TOOD(jlfwong): Could probably optimize this to use mix somehow. \n if (maxdist == 0.0) { \n // Inside viewport rectangle \n gl_FragColor = vec4(0, 0, 0, 0); \n } else if (maxdist < borderWidth) { \n // Inside viewport rectangle at border \n gl_FragColor = vec4( ${ t } , 0.8); \n } else { \n // Outside viewport rectangle \n gl_FragColor = vec4( ${ t } , 0.5); \n } \n } \n ` } ; class a { constructor ( e , i ) { this . gl = e ; const r = [ [ - 1 , 1 ] , [ 1 , 1 ] , [ - 1 , - 1 ] , [ 1 , - 1 ] ] , a = [ ] ; for ( let o of r ) a . push ( o [ 0 ] ) , a . push ( o [ 1 ] ) ; this . buffer = e . createVertexBuffer ( o . stride * r . length ) , this . buffer . upload ( new Uint8Array ( new Float32Array ( a ) . buffer ) ) , this . material = e . createMaterial ( o , n , t ( i ) ) } render ( e ) { ( 0 , r . setUniformAffineTransform ) ( this . material , "configSpaceToPhysicalViewSpace" , e . configSpaceToPhysicalViewSpace ) , ( 0 , r . setUniformVec2 ) ( this . material , "configSpaceViewportOrigin" , e . configSpaceViewportRect . origin ) , ( 0 , r . setUniformVec2 ) ( this . material , "configSpaceViewportSize" , e . configSpaceViewportRect . size ) ; const o = this . gl . viewport ; this . material . setUniformVec2 ( "physicalOrigin" , o . x , o . y ) , this . material . setUniformVec2 ( "physicalSize" , o . width , o . height ) , this . material . setUniformFloat ( "framebufferHeight" , this . gl . renderTargetHeightInPixels ) , this . gl . setBlendState ( i . Graphics . BlendOperation . SOURCE _ALPHA , i . Graphics . BlendOperation . INVERSE _SOURCE _ALPHA ) , this . gl . draw ( i . Graphics . Primitive . TRIANGLE _STRIP , this . material , this . buffer ) } } exports . ViewportRectangleRenderer = a ;
} , { "../lib/color" : "x77Y" , "./graphics" : "XGYN" , "./utils" : "MMP6" } ] , "Q0ad" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . FlamechartColorPassRenderer = void 0 ; var e = require ( "../lib/math" ) , r = require ( "./graphics" ) , n = require ( "./utils" ) ; const t = new r . Graphics . VertexFormat ; t . add ( "position" , r . Graphics . AttributeType . FLOAT , 2 ) , t . add ( "uv" , r . Graphics . AttributeType . FLOAT , 2 ) ; const i = "\n uniform mat3 uvTransform;\n uniform mat3 positionTransform;\n\n attribute vec2 position;\n attribute vec2 uv;\n varying vec2 vUv;\n\n void main() {\n vUv = (uvTransform * vec3(uv, 1)).xy;\n gl_Position = vec4((positionTransform * vec3(position, 1)).xy, 0, 1);\n }\n" , o = e => ` \n precision mediump float; \n \n uniform vec2 uvSpacePixelSize; \n uniform float renderOutlines; \n \n varying vec2 vUv; \n uniform sampler2D colorTexture; \n \n // https://en.wikipedia.org/wiki/HSL_and_HSV#From_luma/chroma/hue \n vec3 hcl2rgb(float H, float C, float L) { \n float hPrime = H / 60.0; \n float X = C * (1.0 - abs(mod(hPrime, 2.0) - 1.0)); \n vec3 RGB = \n hPrime < 1.0 ? vec3(C, X, 0) : \n hPrime < 2.0 ? vec3(X, C, 0) : \n hPrime < 3.0 ? vec3(0, C, X) : \n hPrime < 4.0 ? vec3(0, X, C) : \n hPrime < 5.0 ? vec3(X, 0, C) : \n vec3(C, 0, X); \n \n float m = L - dot(RGB, vec3(0.30, 0.59, 0.11)); \n return RGB + vec3(m, m, m); \n } \n \n float triangle(float x) { \n return 2.0 * abs(fract(x) - 0.5) - 1.0; \n } \n \n ${ e } \n \n void main() { \n vec4 here = texture2D(colorTexture, vUv); \n \n if (here.z == 0.0) { \n // Background color \n gl_FragColor = vec4(0, 0, 0, 0); \n return; \n } \n \n // Sample the 4 surrounding pixels in the depth texture to determine \n // if we should draw a boundary here or not. \n vec4 N = texture2D(colorTexture, vUv + vec2(0, uvSpacePixelSize.y)); \n vec4 E = texture2D(colorTexture, vUv + vec2(uvSpacePixelSize.x, 0)); \n vec4 S = texture2D(colorTexture, vUv + vec2(0, -uvSpacePixelSize.y)); \n vec4 W = texture2D(colorTexture, vUv + vec2(-uvSpacePixelSize.x, 0)); \n \n // NOTE: For outline checks, we intentionally check both the right \n // and the left to determine if we're an edge. If a rectangle is a single \n // pixel wide, we don't want to render it as an outline, so this method \n // of checking ensures that we don't outline single physical-space \n // pixel width rectangles. \n if ( \n renderOutlines > 0.0 && \n ( \n here.y == N.y && here.y != S.y || // Top edge \n here.y == S.y && here.y != N.y || // Bottom edge \n here.x == E.x && here.x != W.x || // Left edge \n here.x == W.x && here.x != E.x \n ) \n ) { \n // We're on an edge! Draw transparent. \n gl_FragColor = vec4(0, 0, 0, 0); \n } else { \n // Not on an edge. Draw the appropriate color. \n gl_FragColor = vec4(colorForBucket(here.z), here.a); \n } \n } \n ` ; class a { constructor ( e , r ) { this . gl = e ; const n = [ { pos : [ - 1 , 1 ] , uv : [ 0 , 1 ] } , { pos : [ 1 , 1 ] , uv : [ 1 , 1 ] } , { pos : [ - 1 , - 1 ] , uv : [ 0 , 0 ] } , { pos : [ 1 , - 1 ] , uv : [ 1 , 0 ] } ] , a = [ ] ; for ( let t of n ) a . push ( t . pos [ 0 ] ) , a . push ( t . pos [ 1 ] ) , a . push ( t . uv [ 0 ] ) , a . push ( t . uv [ 1 ] ) ; this . buffer = e . createVertexBuffer ( t . stride * n . length ) , this . buffer . uploadFloats ( a ) , this . material = e . createMaterial ( t , i , o ( r . colorForBucketGLSL ) ) } render ( t ) { const { srcRect : i , rectInfoTexture : o } = t , a = e . AffineTransform . withTranslation ( new e . Vec2 ( 0 , 1 ) ) . times ( e . AffineTransform . withScale ( new e . Vec2 ( 1 , - 1 ) ) ) . times ( e . AffineTransform . betweenRects ( new e . Rect ( e . Vec2 . zero , new e . Vec2 ( o . width , o . height ) ) , e . Rect . unit ) ) . transformRect ( i ) , s = e . AffineTransform . betweenRects ( e . Rect . unit , a ) , { dstRect : c } = t , l = new e . Vec2 ( this . gl . viewport . width , this . gl . viewport . height ) , u = e . AffineTransform . withScale ( new e . Vec2 ( 1 , - 1 ) ) . times ( e . AffineTransform . betweenRects ( new e . Rect ( e . Vec2 . zero , l ) , e . Rect . NDC ) ) . transformRect ( c ) , h = e . AffineTransform . betweenRects ( e . Rect . NDC , u ) , f = e . Vec2 . unit . dividedByPointwise ( new e . Vec2 ( t . rectInfoTexture . width , t . rectInfoTexture . height ) ) ; this . material . setUniformSampler ( "colorTexture" , t . rectInfoTexture , 0 ) , ( 0 , n . setUniformAffineTransform ) ( this . material , "uvTransform" , s ) , this . material . setUniformFloat ( "renderOutlines" , t . renderOutlines ? 1 : 0 ) , this . material . setUniform
} , { "../lib/math" : "tDuZ" , "./graphics" : "XGYN" , "./utils" : "MMP6" } ] , "KwET" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . CanvasContext = void 0 ; var e = require ( "./graphics" ) , r = require ( "./rectangle-batch-renderer" ) , t = require ( "./texture-renderer" ) , i = require ( "../lib/math" ) , n = require ( "./overlay-rectangle-renderer" ) , s = require ( "./flamechart-color-pass-renderer" ) , o = require ( "../lib/color" ) ; class a { constructor ( i , a ) { this . animationFrameRequest = null , this . beforeFrameHandlers = new Set , this . onBeforeFrame = ( ( ) => { this . animationFrameRequest = null , this . gl . setViewport ( 0 , 0 , this . gl . renderTargetWidthInPixels , this . gl . renderTargetHeightInPixels ) ; const r = o . Color . fromCSSHex ( this . theme . bgPrimaryColor ) ; this . gl . clear ( new e . Graphics . Color ( r . r , r . g , r . b , r . a ) ) ; for ( const e of this . beforeFrameHandlers ) e ( ) } ) , this . gl = new e . WebGL . Context ( i ) , this . rectangleBatchRenderer = new r . RectangleBatchRenderer ( this . gl ) , this . textureRenderer = new t . TextureRenderer ( this . gl ) , this . viewportRectangleRenderer = new n . ViewportRectangleRenderer ( this . gl , a ) , this . flamechartColorPassRenderer = new s . FlamechartColorPassRenderer ( this . gl , a ) , this . theme = a , this . gl . addAfterResizeEventHandler ( this . onBeforeFrame ) ; const l = this . gl . getWebGLInfo ( ) ; l && console . log ( ` WebGL initialized. renderer: ${ l . renderer } , vendor: ${ l . vendor } , version: ${ l . version } ` ) , window . testContextLoss = ( ( ) => { this . gl . testContextLoss ( ) } ) } addBeforeFrameHandler ( e ) { this . beforeFrameHandlers . add ( e ) } removeBeforeFrameHandler ( e ) { this . beforeFrameHandlers . delete ( e ) } requestFrame ( ) { this . animationFrameRequest || ( this . animationFrameRequest = requestAnimationFrame ( this . onBeforeFrame ) ) } setViewport ( e , r ) { const { origin : t , size : i } = e ; let n = this . gl . viewport ; this . gl . setViewport ( t . x , t . y , i . x , i . y ) , r ( ) ; let { x : s , y : o , width : a , height : l } = n ; this . gl . setViewport ( s , o , a , l ) } renderBehind ( e , r ) { const t = e . getBoundingClientRect ( ) , n = new i . Rect ( new i . Vec2 ( t . left * window . devicePixelRatio , t . top * window . devicePixelRatio ) , new i . Vec2 ( t . width * window . devicePixelRatio , t . height * window . devicePixelRatio ) ) ; this . setViewport ( n , r ) } } exports . CanvasContext = a ;
} , { "./graphics" : "XGYN" , "./rectangle-batch-renderer" : "UGJH" , "./texture-renderer" : "p3j0" , "../lib/math" : "tDuZ" , "./overlay-rectangle-renderer" : "tdKg" , "./flamechart-color-pass-renderer" : "Q0ad" , "../lib/color" : "x77Y" } ] , "zEXv" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . getFrameToColorBucket = exports . getProfileToView = exports . getRowAtlas = exports . getCanvasContext = exports . createGetCSSColorForFrame = exports . createGetColorBucketForFrame = void 0 ; var e = require ( "../lib/utils" ) , t = require ( "../gl/row-atlas" ) , o = require ( "../gl/canvas-context" ) ; const r = ( 0 , e . memoizeByReference ) ( e => t => e . get ( t . key ) || 0 ) ; exports . createGetColorBucketForFrame = r ; const n = ( 0 , e . memoizeByShallowEquality ) ( ( { theme : e , frameToColorBucket : t } ) => { const o = r ( t ) ; return t => { const r = o ( t ) / 255 ; return e . colorForBucket ( r ) . toCSS ( ) } } ) ; exports . createGetCSSColorForFrame = n ; const a = ( 0 , e . memoizeByShallowEquality ) ( ( { theme : e , canvas : t } ) => new o . CanvasContext ( t , e ) ) ; exports . getCanvasContext = a ; const s = ( 0 , e . memoizeByReference ) ( e => new t . RowAtlas ( e . gl , e . rectangleBatchRenderer , e . textureRenderer ) ) ; exports . getRowAtlas = s ; const l = ( 0 , e . memoizeByShallowEquality ) ( ( { profile : e , flattenRecursion : t } ) => t ? e . getProfileWithRecursionFlattened ( ) : e ) ; exports . getProfileToView = l ; const c = ( 0 , e . memoizeByReference ) ( e => { const t = [ ] ; function o ( e ) { return ( e . file || "" ) + e . name } e . forEachFrame ( e => t . push ( e ) ) , t . sort ( function ( e , t ) { return o ( e ) > o ( t ) ? 1 : - 1 } ) ; const r = new Map ; for ( let n = 0 ; n < t . length ; n ++ ) r . set ( t [ n ] . key , Math . floor ( 255 * n / t . length ) ) ; return r } ) ; exports . getFrameToColorBucket = c ;
} , { "../lib/utils" : "ucYa" , "../gl/row-atlas" : "cFC1" , "../gl/canvas-context" : "KwET" } ] , "MwGB" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . useState = a , exports . useReducer = p , exports . useEffect = h , exports . useLayoutEffect = v , exports . useRef = m , exports . useImperativeHandle = H , exports . useMemo = l , exports . useCallback = d , exports . useContext = x , exports . useDebugValue = y , exports . useErrorBoundary = E ; var _ , n , t , o = require ( "preact" ) , e = 0 , u = [ ] , r = o . options . _ _r , i = o . options . diffed , c = o . options . _ _c , s = o . options . unmount ; function f ( _ , t ) { o . options . _ _h && o . options . _ _h ( n , _ , e || t ) , e = 0 ; var u = n . _ _H || ( n . _ _H = { _ _ : [ ] , _ _h : [ ] } ) ; return _ >= u . _ _ . length && u . _ _ . push ( { } ) , u . _ _ [ _ ] } function a ( _ ) { return e = 1 , p ( A , _ ) } function p ( t , o , e ) { var u = f ( _ ++ , 2 ) ; return u . _ _c || ( u . _ _c = n , u . _ _ = [ e ? e ( o ) : A ( void 0 , o ) , function ( _ ) { var n = t ( u . _ _ [ 0 ] , _ ) ; u . _ _ [ 0 ] !== n && ( u . _ _ [ 0 ] = n , u . _ _c . setState ( { } ) ) } ] ) , u . _ _ } function h ( t , e ) { var u = f ( _ ++ , 3 ) ; ! o . options . _ _s && q ( u . _ _H , e ) && ( u . _ _ = t , u . _ _H = e , n . _ _H . _ _h . push ( u ) ) } function v ( t , e ) { var u = f ( _ ++ , 4 ) ; ! o . options . _ _s && q ( u . _ _H , e ) && ( u . _ _ = t , u . _ _H = e , n . _ _h . push ( u ) ) } function m ( _ ) { return e = 5 , l ( function ( ) { return { current : _ } } , [ ] ) } function H ( _ , n , t ) { e = 6 , v ( function ( ) { "function" == typeof _ ? _ ( n ( ) ) : _ && ( _ . current = n ( ) ) } , null == t ? t : t . concat ( _ ) ) } function l ( n , t ) { var o = f ( _ ++ , 7 ) ; return q ( o . _ _H , t ) ? ( o . _ _H = t , o . _ _h = n , o . _ _ = n ( ) ) : o . _ _ } function d ( _ , n ) { return e = 8 , l ( function ( ) { return _ } , n ) } function x ( t ) { var o = n . context [ t . _ _c ] , e = f ( _ ++ , 9 ) ; return e . _ _c = t , o ? ( null == e . _ _ && ( e . _ _ = ! 0 , o . sub ( n ) ) , o . props . value ) : t . _ _ } function y ( _ , n ) { o . options . useDebugValue && o . options . useDebugValue ( n ? n ( _ ) : _ ) } function E ( t ) { var o = f ( _ ++ , 10 ) , e = a ( ) ; return o . _ _ = t , n . componentDidCatch || ( n . componentDidCatch = function ( _ ) { o . _ _ && o . _ _ ( _ ) , e [ 1 ] ( _ ) } ) , [ e [ 0 ] , function ( ) { e [ 1 ] ( void 0 ) } ] } function b ( ) { u . some ( function ( _ ) { if ( _ . _ _P ) try { _ . _ _H . _ _h . forEach ( g ) , _ . _ _H . _ _h . forEach ( D ) , _ . _ _H . _ _h = [ ] } catch ( n ) { return _ . _ _H . _ _h = [ ] , o . options . _ _e ( n , _ . _ _v ) , ! 0 } } ) , u = [ ] } function g ( _ ) { _ . t && _ . t ( ) } function D ( _ ) { var n = _ . _ _ ( ) ; "function" == typeof n && ( _ . t = n ) } function q ( _ , n ) { return ! _ || n . some ( function ( n , t ) { return n !== _ [ t ] } ) } function A ( _ , n ) { return "function" == typeof n ? n ( _ ) : n } o . options . _ _r = function ( t ) { r && r ( t ) , _ = 0 , ( n = t . _ _c ) . _ _H && ( n . _ _H . _ _h . forEach ( g ) , n . _ _H . _ _h . forEach ( D ) , n . _ _H . _ _h = [ ] ) } , o . options . diffed = function ( _ ) { i && i ( _ ) ; var n = _ . _ _c ; if ( n ) { var e = n . _ _H ; e && e . _ _h . length && ( 1 !== u . push ( n ) && t === o . options . requestAnimationFrame || ( ( t = o . options . requestAnimationFrame ) || function ( _ ) { var n , t = function ( ) { clearTimeout ( o ) , cancelAnimationFrame ( n ) , setTimeout ( _ ) } , o = setTimeout ( t , 100 ) ; "undefined" != typeof window && ( n = requestAnimationFrame ( t ) ) } ) ( b ) ) } } , o . options . _ _c = function ( _ , n ) { n . some ( function ( _ ) { try { _ . _ _h . forEach ( g ) , _ . _ _h = _ . _ _h . filter ( function ( _ ) { return ! _ . _ _ || D ( _ ) } ) } catch ( t ) { n . some ( function ( _ ) { _ . _ _h && ( _ . _ _h = [ ] ) } ) , n = [ ] , o . options . _ _e ( t , _ . _ _v ) } } ) , c && c ( _ , n ) } , o . options . unmount = function ( _ ) { s && s ( _ ) ; var n = _ . _ _c ; if ( n ) { var t = n . _ _H ; if ( t ) try { t . _ _ . forEach ( function ( _ ) { return _ . t && _ . t ( ) } ) } catch ( _ ) { o . options . _ _e ( _ , n . _ _v ) } } } ;
} , { "preact" : "aSor" } ] , "AQ6k" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) ; var e = { version : ! 0 , Children : ! 0 , render : ! 0 , hydrate : ! 0 , unmountComponentAtNode : ! 0 , createPortal : ! 0 , createFactory : ! 0 , cloneElement : ! 0 , isValidElement : ! 0 , findDOMNode : ! 0 , PureComponent : ! 0 , memo : ! 0 , forwardRef : ! 0 , unstable _batchedUpdates : ! 0 , Suspense : ! 0 , SuspenseList : ! 0 , lazy : ! 0 , createElement : ! 0 , createContext : ! 0 , createRef : ! 0 , Fragment : ! 0 , Component : ! 0 } ; exports . render = E , exports . hydrate = k , exports . unmountComponentAtNode = j , exports . createPortal = C , exports . createFactory = A , exports . cloneElement = U , exports . isValidElement = S , exports . findDOMNode = F , exports . memo = i , exports . forwardRef = l , exports . Suspense = d , exports . SuspenseList = v , exports . lazy = m , Object . defineProperty ( exports , "createElement" , { enumerable : ! 0 , get : function ( ) { return n . createElement } } ) , Object . defineProperty ( exports , "createContext" , { enumerable : ! 0 , get : function ( ) { return n . createContext } } ) , Object . defineProperty ( exports , "createRef" , { enumerable : ! 0 , get : function ( ) { return n . createRef } } ) , Object . defineProperty ( exports , "Fragment" , { enumerable : ! 0 , get : function ( ) { return n . Fragment } } ) , Object . defineProperty ( exports , "Component" , { enumerable : ! 0 , get : function ( ) { return n . Component } } ) , exports . unstable _batchedUpdates = exports . PureComponent = exports . Children = exports . version = exports . default = void 0 ; var t = require ( "preact/hooks" ) ; Object . keys ( t ) . forEach ( function ( n ) { "default" !== n && "__esModule" !== n && ( Object . prototype . hasOwnProperty . call ( e , n ) || Object . defineProperty ( exports , n , { enumerable : ! 0 , get : function ( ) { return t [ n ] } } ) ) } ) ; var n = require ( "preact" ) ; function r ( e , t ) { for ( var n in t ) e [ n ] = t [ n ] ; return e } function o ( e , t ) { for ( var n in e ) if ( "__source" !== n && ! ( n in t ) ) return ! 0 ; for ( var r in t ) if ( "__source" !== r && e [ r ] !== t [ r ] ) return ! 0 ; return ! 1 } var u = function ( e ) { var t , n ; function r ( t ) { var n ; return ( n = e . call ( this , t ) || this ) . isPureReactComponent = ! 0 , n } return n = e , ( t = r ) . prototype = Object . create ( n . prototype ) , t . prototype . constructor = t , t . _ _proto _ _ = n , r . prototype . shouldComponentUpdate = function ( e , t ) { return o ( this . props , e ) || o ( this . state , t ) } , r } ( n . Component ) ; function i ( e , t ) { function u ( e ) { var n = this . props . ref , r = n == e . ref ; return ! r && n && ( n . call ? n ( null ) : n . current = null ) , t ? ! t ( this . props , e ) || ! r : o ( this . props , e ) } function i ( t ) { return this . shouldComponentUpdate = u , ( 0 , n . createElement ) ( e , r ( { } , t ) ) } return i . prototype . isReactComponent = ! 0 , i . displayName = "Memo(" + ( e . displayName || e . name ) + ")" , i . t = ! 0 , i } exports . PureComponent = u ; var a = n . options . _ _b ; function l ( e ) { function t ( t ) { var n = r ( { } , t ) ; return delete n . ref , e ( n , t . ref ) } return t . prototype . isReactComponent = t . t = ! 0 , t . displayName = "ForwardRef(" + ( e . displayName || e . name ) + ")" , t } n . options . _ _b = function ( e ) { e . type && e . type . t && e . ref && ( e . props . ref = e . ref , e . ref = null ) , a && a ( e ) } ; var c = function ( e , t ) { return e ? ( 0 , n . toChildArray ) ( e ) . reduce ( function ( e , n , r ) { return e . concat ( t ( n , r ) ) } , [ ] ) : null } , p = { map : c , forEach : c , count : function ( e ) { return e ? ( 0 , n . toChildArray ) ( e ) . length : 0 } , only : function ( e ) { if ( 1 !== ( e = ( 0 , n . toChildArray ) ( e ) ) . length ) throw new Error ( "Children.only() expects only one child." ) ; return e [ 0 ] } , toArray : n . toChildArray } , s = n . options . _ _e ; function f ( e ) { return e && ( ( e = r ( { } , e ) ) . _ _c = null , e . _ _k = e . _ _k && e . _ _k . map ( f ) ) , e } function d ( ) { this . _ _u = 0 , this . o = null , this . _ _b = null } function _ ( e ) { var t = e . _ _ . _ _c ; return t && t . u && t . u ( e ) } function m ( e ) { var t , r , o ; function u ( u ) { if ( t || ( t = e ( ) ) . then ( function ( e ) { r = e . default || e } , function ( e ) { o = e } ) , o ) throw o ; if ( ! r ) throw t ; return ( 0 , n . createElement ) ( r , u ) } return u . displayName = "Lazy" , u . t = ! 0 , u } function v ( ) { this . i = null , this . l = null } exports . Children = p , n . options . _ _e = function ( e , t , n ) { if ( e . then ) for ( var r , o = t ; o = o . _ _ ; ) if ( ( r = o . _ _c ) && r . _ _c ) return r . _ _c ( e , t . _ _c ) ; s ( e , t , n ) } , ( d . prototype = new n . Component ) . _ _c = function ( e , t ) { var n = this ; null == n . o && ( n . o = [ ] ) , n . o . push ( t ) ; var r = _ ( n . _ _v ) , o = ! 1 , u = function ( ) { o || ( o = ! 0 , r ? r ( i ) : i ( ) ) } ; t . _ _c = t . componentWillUnmount , t . componentWillUnmount = function ( ) { u ( ) , t . _ _c && t . _ _c ( ) } ; var i = function ( ) { var e ; if ( ! -- n . _ _u ) for ( n . _ _v . _ _k [ 0 ] = n . state . u , n . setState ( { u : n . _ _b = null } ) ; e = n . o . pop ( ) ; ) e . forceUpdate ( ) } ; n . _ _u ++ || n . setState ( { u : n . _ _b = n . _ _v . _ _k [ 0 ] } ) , e . then ( u , u ) } , d . prototype . render = function ( e , t ) { return this . _ _b && ( this . _ _v . _ _k [ 0 ] = f ( this . _ _b ) , this . _ _b = null ) , [ ( 0 , n . createElement ) ( n . Component , null , t . u ? null : e . children ) , t
} , { "preact/hooks" : "MwGB" , "preact" : "aSor" } ] , "QkVE" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . useAtom = i , exports . Atom = void 0 ; var s = require ( "preact/hooks" ) ; let t = null , e = null ; class r { constructor ( s , t ) { this . state = s , this . observers = [ ] , this . set = this . set . bind ( this ) , this . get = this . get . bind ( this ) } set ( s ) { this . state !== s && ( this . state = s , this . observers . forEach ( s => s ( ) ) ) } get ( ) { return this . state } subscribe ( s ) { this . observers . push ( s ) } unsubscribe ( s ) { const t = this . observers . indexOf ( s ) ; - 1 !== t && this . observers . splice ( t , 1 ) } } function i ( t ) { const [ e , r ] = ( 0 , s . useState ) ( t . get ( ) ) ; return ( 0 , s . useLayoutEffect ) ( ( ) => { function s ( ) { r ( t . get ( ) ) } return r ( t . get ( ) ) , t . subscribe ( s ) , ( ) => { t . unsubscribe ( s ) } } , [ t ] ) , e } exports . Atom = r ;
} , { "preact/hooks" : "MwGB" } ] , "dpTI" : [ function ( require , module , exports ) {
"use strict" ; var e ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . ViewMode = void 0 , exports . ViewMode = e , function ( e ) { e [ e . CHRONO _FLAME _CHART = 0 ] = "CHRONO_FLAME_CHART" , e [ e . LEFT _HEAVY _FLAME _GRAPH = 1 ] = "LEFT_HEAVY_FLAME_GRAPH" , e [ e . SANDWICH _VIEW = 2 ] = "SANDWICH_VIEW" } ( e || ( exports . ViewMode = e = { } ) ) ;
} , { } ] , "O1pB" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . getHashParams = o ; var e = require ( "../lib/view-mode" ) ; function r ( r ) { switch ( r ) { case "time-ordered" : return e . ViewMode . CHRONO _FLAME _CHART ; case "left-heavy" : return e . ViewMode . LEFT _HEAVY _FLAME _GRAPH ; case "sandwich" : return e . ViewMode . SANDWICH _VIEW ; default : return null } } function o ( e = window . location . hash ) { try { if ( ! e . startsWith ( "#" ) ) return { } ; const t = e . substr ( 1 ) . split ( "&" ) , i = { } ; for ( const e of t ) { let [ o , t ] = e . split ( "=" ) ; if ( t = decodeURIComponent ( t ) , "profileURL" === o ) i . profileURL = t ; else if ( "title" === o ) i . title = t ; else if ( "localProfilePath" === o ) i . localProfilePath = t ; else if ( "view" === o ) { const e = r ( t ) ; null !== e ? i . viewMode = e : console . error ( ` Ignoring invalid view specifier: ${ t } ` ) } } return i } catch ( o ) { return console . error ( "Error when loading hash fragment." ) , console . error ( o ) , { } } }
} , { "../lib/view-mode" : "dpTI" } ] , "uxXA" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . ProfileGroupAtom = exports . FlamechartID = void 0 ; var e , t = require ( "../lib/atom" ) , a = require ( "../lib/math" ) , l = require ( "../lib/utils" ) ; exports . FlamechartID = e , function ( e ) { e . LEFT _HEAVY = "LEFT_HEAVY" , e . CHRONO = "CHRONO" , e . SANDWICH _INVERTED _CALLERS = "SANDWICH_INVERTED_CALLERS" , e . SANDWICH _CALLEES = "SANDWICH_CALLEES" } ( e || ( exports . FlamechartID = e = { } ) ) ; let i = { hover : null , selectedNode : null , configSpaceViewportRect : a . Rect . empty , logicalSpaceViewportSize : a . Vec2 . zero } ; class s extends t . Atom { constructor ( ) { super ( ... arguments ) , this . setProfileGroup = ( e => { this . set ( { name : e . name , indexToView : e . indexToView , profiles : e . profiles . map ( e => ( { profile : e , chronoViewState : i , leftHeavyViewState : i , sandwichViewState : { callerCallee : null } } ) ) } ) } ) , this . setProfileIndexToView = ( e => { null != this . state && ( e = ( 0 , a . clamp ) ( e , 0 , this . state . profiles . length - 1 ) , this . set ( Object . assign ( Object . assign ( { } , this . state ) , { indexToView : e } ) ) ) } ) , this . setSelectedFrame = ( e => { if ( null == this . state ) return ; null != this . getActiveProfile ( ) && this . updateActiveSandwichViewState ( t => null == e ? { callerCallee : null } : { callerCallee : { invertedCallerFlamegraph : i , calleeFlamegraph : i , selectedFrame : e } } ) } ) } set ( e ) { const t = this . state ; null != t && null != e && ( 0 , l . objectsHaveShallowEquality ) ( t , e ) || super . set ( e ) } getActiveProfile ( ) { var e ; return null == this . state ? null : this . state . profiles [ null === ( e = this . state ) || void 0 === e ? void 0 : e . indexToView ] || null } updateActiveProfileState ( e ) { if ( null == this . state ) return ; const { indexToView : t , profiles : a } = this . state ; this . set ( Object . assign ( Object . assign ( { } , this . state ) , { profiles : a . map ( ( a , l ) => l != t ? a : e ( a ) ) } ) ) } updateActiveSandwichViewState ( e ) { this . updateActiveProfileState ( t => Object . assign ( Object . assign ( { } , t ) , { sandwichViewState : e ( t . sandwichViewState ) } ) ) } updateFlamechartState ( t , a ) { switch ( t ) { case e . CHRONO : this . updateActiveProfileState ( e => Object . assign ( Object . assign ( { } , e ) , { chronoViewState : a ( e . chronoViewState ) } ) ) ; break ; case e . LEFT _HEAVY : this . updateActiveProfileState ( e => Object . assign ( Object . assign ( { } , e ) , { leftHeavyViewState : a ( e . leftHeavyViewState ) } ) ) ; break ; case e . SANDWICH _CALLEES : this . updateActiveSandwichViewState ( e => Object . assign ( Object . assign ( { } , e ) , { callerCallee : null == e . callerCallee ? null : Object . assign ( Object . assign ( { } , e . callerCallee ) , { calleeFlamegraph : a ( e . callerCallee . calleeFlamegraph ) } ) } ) ) ; break ; case e . SANDWICH _INVERTED _CALLERS : this . updateActiveSandwichViewState ( e => Object . assign ( Object . assign ( { } , e ) , { callerCallee : null == e . callerCallee ? null : Object . assign ( Object . assign ( { } , e . callerCallee ) , { invertedCallerFlamegraph : a ( e . callerCallee . invertedCallerFlamegraph ) } ) } ) ) } } setFlamechartHoveredNode ( e , t ) { this . updateFlamechartState ( e , e => Object . assign ( Object . assign ( { } , e ) , { hover : t } ) ) } setSelectedNode ( e , t ) { this . updateFlamechartState ( e , e => Object . assign ( Object . assign ( { } , e ) , { selectedNode : t } ) ) } setConfigSpaceViewportRect ( e , t ) { this . updateFlamechartState ( e , e => Object . assign ( Object . assign ( { } , e ) , { configSpaceViewportRect : t } ) ) } setLogicalSpaceViewportSize ( e , t ) { this . updateFlamechartState ( e , e => Object . assign ( Object . assign ( { } , e ) , { logicalSpaceViewportSize : t } ) ) } clearHoverNode ( ) { this . setFlamechartHoveredNode ( e . CHRONO , null ) , this . setFlamechartHoveredNode ( e . LEFT _HEAVY , null ) , this . setFlamechartHoveredNode ( e . SANDWICH _CALLEES , null ) , this . setFlamechartHoveredNode ( e . SANDWICH _INVERTED _CALLERS , null ) } } exports . ProfileGroupAtom = s ;
} , { "../lib/atom" : "QkVE" , "../lib/math" : "tDuZ" , "../lib/utils" : "ucYa" } ] , "LDQe" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . tableSortMethodAtom = exports . SortDirection = exports . SortField = exports . errorAtom = exports . loadingAtom = exports . canUseXHR = exports . dragActiveAtom = exports . glCanvasAtom = exports . hashParamsAtom = exports . profileGroupAtom = exports . viewModeAtom = exports . searchQueryAtom = exports . searchIsActiveAtom = exports . flattenRecursionAtom = void 0 ; var o = require ( "../lib/atom" ) , t = require ( "../lib/view-mode" ) , e = require ( "../lib/hash-params" ) , r = require ( "./profile-group" ) ; const s = new o . Atom ( ! 1 , "flattenRecursion" ) ; exports . flattenRecursionAtom = s ; const n = new o . Atom ( ! 1 , "searchIsActive" ) ; exports . searchIsActiveAtom = n ; const i = new o . Atom ( "" , "searchQueryAtom" ) ; exports . searchQueryAtom = i ; const A = new o . Atom ( t . ViewMode . CHRONO _FLAME _CHART , "viewMode" ) ; exports . viewModeAtom = A ; const a = new r . ProfileGroupAtom ( null , "profileGroup" ) ; exports . profileGroupAtom = a , A . subscribe ( ( ) => { a . clearHoverNode ( ) } ) ; const p = ( 0 , e . getHashParams ) ( ) , c = new o . Atom ( p , "hashParams" ) ; exports . hashParamsAtom = c ; const m = new o . Atom ( null , "glCanvas" ) ; exports . glCanvasAtom = m ; const l = new o . Atom ( ! 1 , "dragActive" ) ; exports . dragActiveAtom = l ; const x = window . location . protocol , d = "http:" === x || "https:" === x ; exports . canUseXHR = d ; const u = d && null != p . profileURL , h = new o . Atom ( u , "loading" ) ; exports . loadingAtom = h ; const S = new o . Atom ( ! 1 , "error" ) ; var v , w ; exports . errorAtom = S , exports . SortField = v , function ( o ) { o [ o . SYMBOL _NAME = 0 ] = "SYMBOL_NAME" , o [ o . SELF = 1 ] = "SELF" , o [ o . TOTAL = 2 ] = "TOTAL" } ( v || ( exports . SortField = v = { } ) ) , exports . SortDirection = w , function ( o ) { o [ o . ASCENDING = 0 ] = "ASCENDING" , o [ o . DESCENDING = 1 ] = "DESCENDING" } ( w || ( exports . SortDirection = w = { } ) ) ; const E = new o . Atom ( { field : v . SELF , direction : w . DESCENDING } , "tableSortMethod" ) ; exports . tableSortMethodAtom = E ;
} , { "../lib/atom" : "QkVE" , "../lib/view-mode" : "dpTI" , "../lib/hash-params" : "O1pB" , "./profile-group" : "uxXA" } ] , "MY42" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . useActiveProfileState = t ; var e = require ( "./getters" ) , i = require ( "." ) , r = require ( "../lib/atom" ) ; function t ( ) { const t = ( 0 , r . useAtom ) ( i . flattenRecursionAtom ) , o = ( 0 , r . useAtom ) ( i . profileGroupAtom ) ; if ( ! o ) return null ; if ( o . indexToView >= o . profiles . length ) return null ; const n = o . indexToView , s = o . profiles [ n ] ; return Object . assign ( Object . assign ( { } , o . profiles [ o . indexToView ] ) , { profile : ( 0 , e . getProfileToView ) ( { profile : s . profile , flattenRecursion : t } ) , index : o . indexToView } ) }
} , { "./getters" : "zEXv" , "." : "LDQe" , "../lib/atom" : "QkVE" } ] , "KQrJ" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . colorSchemeAtom = exports . ColorScheme = void 0 ; var e , o = require ( "../lib/atom" ) ; exports . ColorScheme = e , function ( e ) { e [ e . SYSTEM = 0 ] = "SYSTEM" , e [ e . DARK = 1 ] = "DARK" , e [ e . LIGHT = 2 ] = "LIGHT" } ( e || ( exports . ColorScheme = e = { } ) ) ; const r = "speedscope-color-scheme" ; function t ( ) { const o = window . localStorage && window . localStorage [ r ] ; return "DARK" === o ? e . DARK : "LIGHT" === o ? e . LIGHT : e . SYSTEM } function c ( ) { return matchMedia ( "(prefers-color-scheme: dark)" ) } function s ( o ) { if ( c ( ) . matches ) switch ( o ) { case e . SYSTEM : return e . LIGHT ; case e . LIGHT : return e . DARK ; case e . DARK : return e . SYSTEM } else switch ( o ) { case e . SYSTEM : return e . DARK ; case e . DARK : return e . LIGHT ; case e . LIGHT : return e . SYSTEM } } class a extends o . Atom { constructor ( ) { super ( ... arguments ) , this . cycleToNextColorScheme = ( ( ) => { this . set ( s ( this . get ( ) ) ) } ) } } const n = new a ( t ( ) , "colorScheme" ) ; exports . colorSchemeAtom = n , n . subscribe ( ( ) => { const o = n . get ( ) ; switch ( o ) { case e . DARK : window . localStorage [ r ] = "DARK" ; break ; case e . LIGHT : window . localStorage [ r ] = "LIGHT" ; break ; case e . SYSTEM : delete window . localStorage [ r ] ; break ; default : return o } return o } ) ;
} , { "../lib/atom" : "QkVE" } ] , "osod" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . darkTheme = void 0 ; var o , r = require ( "../../lib/color" ) , e = require ( "../../lib/utils" ) ; ! function ( o ) { o . LIGHTER _GRAY = "#D0D0D0" , o . LIGHT _GRAY = "#BDBDBD" , o . GRAY = "#666666" , o . DARK _GRAY = "#222222" , o . DARKER _GRAY = "#0C0C0C" , o . OFF _BLACK = "#060606" , o . BLACK = "#000000" , o . BLUE = "#00769B" , o . PALE _BLUE = "#004E75" , o . GREEN = "#0F8A42" , o . LIGHT _BROWN = "#D6AE24" , o . BROWN = "#A66F1C" } ( o || ( o = { } ) ) ; const t = . 2 , l = . 1 , a = . 2 , R = . 1 , c = o => { const t = ( 0 , e . triangle ) ( 30 * o ) , l = . 9 * o * 360 , a = . 2 + . 1 * t , R = . 2 - . 1 * t ; return r . Color . fromLumaChromaHue ( R , a , l ) } , A = ` \n vec3 colorForBucket(float t) { \n float x = triangle(30.0 * t); \n float H = 360.0 * (0.9 * t); \n float C = ${ . 2. toFixed ( 1 ) } + ${ . 1. toFixed ( 1 ) } * x; \n float L = ${ . 2. toFixed ( 1 ) } - ${ . 1. toFixed ( 1 ) } * x; \n return hcl2rgb(H, C, L); \n } \n ` , C = { fgPrimaryColor : o . LIGHTER _GRAY , fgSecondaryColor : o . GRAY , bgPrimaryColor : o . OFF _BLACK , bgSecondaryColor : o . DARKER _GRAY , altFgPrimaryColor : o . LIGHTER _GRAY , altFgSecondaryColor : o . GRAY , altBgPrimaryColor : o . BLACK , altBgSecondaryColor : o . DARKER _GRAY , selectionPrimaryColor : o . BLUE , selectionSecondaryColor : o . PALE _BLUE , weightColor : o . GREEN , searchMatchTextColor : o . DARKER _GRAY , searchMatchPrimaryColor : o . BROWN , searchMatchSecondaryColor : o . LIGHT _BROWN , colorForBucket : c , colorForBucketGLSL : A } ; exports . darkTheme = C ;
} , { "../../lib/color" : "x77Y" , "../../lib/utils" : "ucYa" } ] , "CjU5" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . lightTheme = void 0 ; var o , r = require ( "../../lib/color" ) , e = require ( "../../lib/utils" ) ; ! function ( o ) { o . WHITE = "#FFFFFF" , o . OFF _WHITE = "#F6F6F6" , o . LIGHT _GRAY = "#BDBDBD" , o . GRAY = "#666666" , o . DARK _GRAY = "#222222" , o . OFF _BLACK = "#111111" , o . BLACK = "#000000" , o . DARK _BLUE = "#2F80ED" , o . PALE _DARK _BLUE = "#8EB7ED" , o . GREEN = "#6FCF97" , o . YELLOW = "#FEDC62" , o . ORANGE = "#FFAC02" } ( o || ( o = { } ) ) ; const t = . 25 , l = . 2 , a = . 8 , F = . 15 , c = o => { const t = ( 0 , e . triangle ) ( 30 * o ) , l = . 9 * o * 360 , a = . 25 + . 2 * t , F = . 8 - . 15 * t ; return r . Color . fromLumaChromaHue ( F , a , l ) } , i = ` \n vec3 colorForBucket(float t) { \n float x = triangle(30.0 * t); \n float H = 360.0 * (0.9 * t); \n float C = ${ . 25. toFixed ( 1 ) } + ${ . 2. toFixed ( 1 ) } * x; \n float L = ${ . 8. toFixed ( 1 ) } - ${ . 15. toFixed ( 1 ) } * x; \n return hcl2rgb(H, C, L); \n } \n ` , C = { fgPrimaryColor : o . BLACK , fgSecondaryColor : o . LIGHT _GRAY , bgPrimaryColor : o . WHITE , bgSecondaryColor : o . OFF _WHITE , altFgPrimaryColor : o . WHITE , altFgSecondaryColor : o . LIGHT _GRAY , altBgPrimaryColor : o . BLACK , altBgSecondaryColor : o . DARK _GRAY , selectionPrimaryColor : o . DARK _BLUE , selectionSecondaryColor : o . PALE _DARK _BLUE , weightColor : o . GREEN , searchMatchTextColor : o . BLACK , searchMatchPrimaryColor : o . ORANGE , searchMatchSecondaryColor : o . YELLOW , colorForBucket : c , colorForBucketGLSL : i } ; exports . lightTheme = C ;
} , { "../../lib/color" : "x77Y" , "../../lib/utils" : "ucYa" } ] , "gzKG" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . useTheme = i , exports . withTheme = u , exports . colorSchemeToString = a , exports . ThemeProvider = S , exports . ThemeContext = void 0 ; var e = require ( "preact" ) , r = require ( "preact/hooks" ) , t = require ( "../../app-state/color-scheme" ) , o = require ( "../../lib/atom" ) , c = require ( "../../lib/utils" ) , n = require ( "./dark-theme" ) , h = require ( "./light-theme" ) ; const s = ( 0 , e . createContext ) ( h . lightTheme ) ; function i ( ) { return ( 0 , r . useContext ) ( s ) } function u ( e ) { return ( 0 , c . memoizeByReference ) ( e ) } function m ( ) { return matchMedia ( "(prefers-color-scheme: dark)" ) } function a ( e ) { switch ( e ) { case t . ColorScheme . SYSTEM : return "System" ; case t . ColorScheme . DARK : return "Dark" ; case t . ColorScheme . LIGHT : return "Light" } } function l ( e , r ) { switch ( e ) { case t . ColorScheme . SYSTEM : return r ? n . darkTheme : h . lightTheme ; case t . ColorScheme . DARK : return n . darkTheme ; case t . ColorScheme . LIGHT : return h . lightTheme } } function S ( c ) { const [ n , h ] = ( 0 , r . useState ) ( ( ) => m ( ) . matches ) , i = ( 0 , r . useCallback ) ( e => { h ( e . matches ) } , [ h ] ) ; ( 0 , r . useEffect ) ( ( ) => { const e = m ( ) ; return e . addEventListener ( "change" , i ) , ( ) => { e . removeEventListener ( "change" , i ) } } , [ i ] ) ; const u = l ( ( 0 , o . useAtom ) ( t . colorSchemeAtom ) , n ) ; return ( 0 , e . h ) ( s . Provider , { value : u , children : c . children } ) } exports . ThemeContext = s ;
} , { "preact" : "aSor" , "preact/hooks" : "MwGB" , "../../app-state/color-scheme" : "KQrJ" , "../../lib/atom" : "QkVE" , "../../lib/utils" : "ucYa" , "./dark-theme" : "osod" , "./light-theme" : "CjU5" } ] , "QXNG" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . default = t ; var e = /-webkit-|-moz-|-ms-/ ; function t ( t ) { return "string" == typeof t && e . test ( t ) } module . exports = exports . default ;
} , { } ] , "tSfb" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . default = i ; var e = require ( "css-in-js-utils/lib/isPrefixedValue" ) , t = r ( e ) ; function r ( e ) { return e && e . _ _esModule ? e : { default : e } } var u = [ "-webkit-" , "-moz-" , "" ] ; function i ( e , r ) { if ( "string" == typeof r && ! ( 0 , t . default ) ( r ) && r . indexOf ( "calc(" ) > - 1 ) return u . map ( function ( e ) { return r . replace ( /calc\(/g , e + "calc(" ) } ) } module . exports = exports . default ;
} , { "css-in-js-utils/lib/isPrefixedValue" : "QXNG" } ] , "ie1g" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . default = u ; var e = require ( "css-in-js-utils/lib/isPrefixedValue" ) , r = t ( e ) ; function t ( e ) { return e && e . _ _esModule ? e : { default : e } } var s = [ "-webkit-" , "" ] ; function u ( e , t ) { if ( "string" == typeof t && ! ( 0 , r . default ) ( t ) && t . indexOf ( "cross-fade(" ) > - 1 ) return s . map ( function ( e ) { return t . replace ( /cross-fade\(/g , e + "cross-fade(" ) } ) } module . exports = exports . default ;
} , { "css-in-js-utils/lib/isPrefixedValue" : "QXNG" } ] , "CYBj" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . default = o ; var e = [ "-webkit-" , "-moz-" , "" ] , r = { "zoom-in" : ! 0 , "zoom-out" : ! 0 , grab : ! 0 , grabbing : ! 0 } ; function o ( o , t ) { if ( "cursor" === o && r . hasOwnProperty ( t ) ) return e . map ( function ( e ) { return e + t } ) } module . exports = exports . default ;
} , { } ] , "MH9I" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . default = u ; var e = require ( "css-in-js-utils/lib/isPrefixedValue" ) , t = r ( e ) ; function r ( e ) { return e && e . _ _esModule ? e : { default : e } } var i = [ "-webkit-" , "" ] ; function u ( e , r ) { if ( "string" == typeof r && ! ( 0 , t . default ) ( r ) && r . indexOf ( "filter(" ) > - 1 ) return i . map ( function ( e ) { return r . replace ( /filter\(/g , e + "filter(" ) } ) } module . exports = exports . default ;
} , { "css-in-js-utils/lib/isPrefixedValue" : "QXNG" } ] , "jmPR" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . default = i ; var e = { flex : [ "-webkit-box" , "-moz-box" , "-ms-flexbox" , "-webkit-flex" , "flex" ] , "inline-flex" : [ "-webkit-inline-box" , "-moz-inline-box" , "-ms-inline-flexbox" , "-webkit-inline-flex" , "inline-flex" ] } ; function i ( i , l ) { if ( "display" === i && e . hasOwnProperty ( l ) ) return e [ l ] } module . exports = exports . default ;
} , { } ] , "FRuF" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . default = s ; var e = { "space-around" : "distribute" , "space-between" : "justify" , "flex-start" : "start" , "flex-end" : "end" } , t = { alignContent : "msFlexLinePack" , alignSelf : "msFlexItemAlign" , alignItems : "msFlexAlign" , justifyContent : "msFlexPack" , order : "msFlexOrder" , flexGrow : "msFlexPositive" , flexShrink : "msFlexNegative" , flexBasis : "msFlexPreferredSize" } ; function s ( s , l , r ) { t . hasOwnProperty ( s ) && ( r [ t [ s ] ] = e [ l ] || l ) } module . exports = exports . default ;
} , { } ] , "bHSr" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . default = i ; var e = { "space-around" : "justify" , "space-between" : "justify" , "flex-start" : "start" , "flex-end" : "end" , "wrap-reverse" : "multiple" , wrap : "multiple" } , t = { alignItems : "WebkitBoxAlign" , justifyContent : "WebkitBoxPack" , flexWrap : "WebkitBoxLines" } ; function i ( i , r , o ) { "flexDirection" === i && "string" == typeof r && ( r . indexOf ( "column" ) > - 1 ? o . WebkitBoxOrient = "vertical" : o . WebkitBoxOrient = "horizontal" , r . indexOf ( "reverse" ) > - 1 ? o . WebkitBoxDirection = "reverse" : o . WebkitBoxDirection = "normal" ) , t . hasOwnProperty ( i ) && ( o [ t [ i ] ] = e [ r ] || r ) } module . exports = exports . default ;
} , { } ] , "QxYG" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . default = n ; var e = require ( "css-in-js-utils/lib/isPrefixedValue" ) , t = r ( e ) ; function r ( e ) { return e && e . _ _esModule ? e : { default : e } } var i = [ "-webkit-" , "-moz-" , "" ] , a = /linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/ ; function n ( e , r ) { if ( "string" == typeof r && ! ( 0 , t . default ) ( r ) && a . test ( r ) ) return i . map ( function ( e ) { return e + r } ) } module . exports = exports . default ;
} , { "css-in-js-utils/lib/isPrefixedValue" : "QXNG" } ] , "qrrU" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . default = u ; var e = require ( "css-in-js-utils/lib/isPrefixedValue" ) , t = r ( e ) ; function r ( e ) { return e && e . _ _esModule ? e : { default : e } } var i = [ "-webkit-" , "" ] ; function u ( e , r ) { if ( "string" == typeof r && ! ( 0 , t . default ) ( r ) && r . indexOf ( "image-set(" ) > - 1 ) return i . map ( function ( e ) { return r . replace ( /image-set\(/g , e + "image-set(" ) } ) } module . exports = exports . default ;
} , { "css-in-js-utils/lib/isPrefixedValue" : "QXNG" } ] , "pEQ2" : [ function ( require , module , exports ) {
"use strict" ; function e ( e , t ) { if ( "position" === e && "sticky" === t ) return [ "-webkit-sticky" , "sticky" ] } Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . default = e , module . exports = exports . default ;
} , { } ] , "M0DH" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . default = i ; var t = [ "-webkit-" , "-moz-" , "" ] , e = { maxHeight : ! 0 , maxWidth : ! 0 , width : ! 0 , height : ! 0 , columnWidth : ! 0 , minWidth : ! 0 , minHeight : ! 0 } , n = { "min-content" : ! 0 , "max-content" : ! 0 , "fill-available" : ! 0 , "fit-content" : ! 0 , "contain-floats" : ! 0 } ; function i ( i , o ) { if ( e . hasOwnProperty ( i ) && n . hasOwnProperty ( o ) ) return t . map ( function ( t ) { return t + o } ) } module . exports = exports . default ;
} , { } ] , "jNGL" : [ function ( require , module , exports ) {
"use strict" ; var e = /[A-Z]/g , r = /^ms-/ , s = { } ; function t ( t ) { return t in s ? s [ t ] : s [ t ] = t . replace ( e , "-$&" ) . toLowerCase ( ) . replace ( r , "-ms-" ) } module . exports = t ;
} , { } ] , "S6J3" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . default = u ; var e = require ( "hyphenate-style-name" ) , t = r ( e ) ; function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function u ( e ) { return ( 0 , t . default ) ( e ) } module . exports = exports . default ;
} , { "hyphenate-style-name" : "jNGL" } ] , "XxlV" : [ function ( require , module , exports ) {
"use strict" ; function e ( e ) { return e . charAt ( 0 ) . toUpperCase ( ) + e . slice ( 1 ) } Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . default = e , module . exports = exports . default ;
} , { } ] , "cnM4" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . default = l ; var t = require ( "css-in-js-utils/lib/hyphenateProperty" ) , e = s ( t ) , r = require ( "css-in-js-utils/lib/isPrefixedValue" ) , i = s ( r ) , n = require ( "../../utils/capitalizeString" ) , o = s ( n ) ; function s ( t ) { return t && t . _ _esModule ? t : { default : t } } var u = { transition : ! 0 , transitionProperty : ! 0 , WebkitTransition : ! 0 , WebkitTransitionProperty : ! 0 , MozTransition : ! 0 , MozTransitionProperty : ! 0 } , a = { Webkit : "-webkit-" , Moz : "-moz-" , ms : "-ms-" } ; function f ( t , r ) { if ( ( 0 , i . default ) ( t ) ) return t ; for ( var n = t . split ( /,(?![^()]*(?:\([^()]*\))?\))/g ) , o = 0 , s = n . length ; o < s ; ++ o ) { var u = n [ o ] , f = [ u ] ; for ( var l in r ) { var p = ( 0 , e . default ) ( l ) ; if ( u . indexOf ( p ) > - 1 && "order" !== p ) for ( var d = r [ l ] , c = 0 , b = d . length ; c < b ; ++ c ) f . unshift ( u . replace ( p , a [ d [ c ] ] + p ) ) } n [ o ] = f . join ( "," ) } return n . join ( "," ) } function l ( t , e , r , i ) { if ( "string" == typeof e && u . hasOwnProperty ( t ) ) { var n = f ( e , i ) , s = n . split ( /,(?![^()]*(?:\([^()]*\))?\))/g ) . filter ( function ( t ) { return ! /-moz-|-ms-/ . test ( t ) } ) . join ( "," ) ; if ( t . indexOf ( "Webkit" ) > - 1 ) return s ; var a = n . split ( /,(?![^()]*(?:\([^()]*\))?\))/g ) . filter ( function ( t ) { return ! /-webkit-|-ms-/ . test ( t ) } ) . join ( "," ) ; return t . indexOf ( "Moz" ) > - 1 ? a : ( r [ "Webkit" + ( 0 , o . default ) ( t ) ] = s , r [ "Moz" + ( 0 , o . default ) ( t ) ] = a , n ) } } module . exports = exports . default ;
} , { "css-in-js-utils/lib/hyphenateProperty" : "S6J3" , "css-in-js-utils/lib/isPrefixedValue" : "QXNG" , "../../utils/capitalizeString" : "XxlV" } ] , "ZBgn" : [ function ( require , module , exports ) {
"use strict" ; function r ( r ) { for ( var t = 5381 , e = r . length ; e ; ) t = 33 * t ^ r . charCodeAt ( -- e ) ; return t >>> 0 } module . exports = r ;
} , { } ] , "D2Wi" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . default = u ; var e = require ( "./capitalizeString" ) , r = t ( e ) ; function t ( e ) { return e && e . _ _esModule ? e : { default : e } } function u ( e , t , u ) { if ( e . hasOwnProperty ( t ) ) { for ( var o = { } , a = e [ t ] , n = ( 0 , r . default ) ( t ) , f = Object . keys ( u ) , l = 0 ; l < f . length ; l ++ ) { var i = f [ l ] ; if ( i === t ) for ( var s = 0 ; s < a . length ; s ++ ) o [ a [ s ] + n ] = u [ t ] ; o [ i ] = u [ i ] } return o } return u } module . exports = exports . default ;
} , { "./capitalizeString" : "XxlV" } ] , "qgi9" : [ function ( require , module , exports ) {
"use strict" ; function e ( e , t , r , o , u ) { for ( var s = 0 , f = e . length ; s < f ; ++ s ) { var l = e [ s ] ( t , r , o , u ) ; if ( l ) return l } } Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . default = e , module . exports = exports . default ;
} , { } ] , "a80f" : [ function ( require , module , exports ) {
"use strict" ; function e ( e , r ) { - 1 === e . indexOf ( r ) && e . push ( r ) } function r ( r , t ) { if ( Array . isArray ( t ) ) for ( var o = 0 , s = t . length ; o < s ; ++ o ) e ( r , t [ o ] ) ; else e ( r , t ) } Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . default = r , module . exports = exports . default ;
} , { } ] , "ek9P" : [ function ( require , module , exports ) {
"use strict" ; function e ( e ) { return e instanceof Object && ! Array . isArray ( e ) } Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . default = e , module . exports = exports . default ;
} , { } ] , "rHEJ" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . default = n ; var e = require ( "../utils/prefixProperty" ) , r = s ( e ) , t = require ( "../utils/prefixValue" ) , u = s ( t ) , l = require ( "../utils/addNewValuesOnly" ) , a = s ( l ) , i = require ( "../utils/isObject" ) , f = s ( i ) ; function s ( e ) { return e && e . _ _esModule ? e : { default : e } } function n ( e ) { var t = e . prefixMap , l = e . plugins ; return function e ( i ) { for ( var s in i ) { var n = i [ s ] ; if ( ( 0 , f . default ) ( n ) ) i [ s ] = e ( n ) ; else if ( Array . isArray ( n ) ) { for ( var d = [ ] , o = 0 , p = n . length ; o < p ; ++ o ) { var v = ( 0 , u . default ) ( l , s , n [ o ] , i , t ) ; ( 0 , a . default ) ( d , v || n [ o ] ) } d . length > 0 && ( i [ s ] = d ) } else { var x = ( 0 , u . default ) ( l , s , n , i , t ) ; x && ( i [ s ] = x ) , i = ( 0 , r . default ) ( t , s , i ) } } return i } } module . exports = exports . default ;
} , { "../utils/prefixProperty" : "D2Wi" , "../utils/prefixValue" : "qgi9" , "../utils/addNewValuesOnly" : "a80f" , "../utils/isObject" : "ek9P" } ] , "AARE" : [ function ( require , module , exports ) {
var global = arguments [ 3 ] ;
var e = arguments [ 3 ] ; function t ( e ) { r . length || ( n ( ) , a = ! 0 ) , r [ r . length ] = e } module . exports = t ; var n , r = [ ] , a = ! 1 , o = 0 , u = 1024 ; function l ( ) { for ( ; o < r . length ; ) { var e = o ; if ( o += 1 , r [ e ] . call ( ) , o > u ) { for ( var t = 0 , n = r . length - o ; t < n ; t ++ ) r [ t ] = r [ t + o ] ; r . length -= o , o = 0 } } r . length = 0 , o = 0 , a = ! 1 } var i = void 0 !== e ? e : self , c = i . MutationObserver || i . WebKitMutationObserver ; function f ( e ) { var t = 1 , n = new c ( e ) , r = document . createTextNode ( "" ) ; return n . observe ( r , { characterData : ! 0 } ) , function ( ) { t = - t , r . data = t } } function v ( e ) { return function ( ) { var t = setTimeout ( r , 0 ) , n = setInterval ( r , 50 ) ; function r ( ) { clearTimeout ( t ) , clearInterval ( n ) , e ( ) } } } n = "function" == typeof c ? f ( l ) : v ( l ) , t . requestFlush = n , t . makeRequestCallFromTimer = v ;
} , { } ] , "Ezpt" : [ function ( require , module , exports ) {
"use strict" ; var t = require ( "./raw" ) , r = [ ] , n = [ ] , e = t . makeRequestCallFromTimer ( l ) ; function l ( ) { if ( n . length ) throw n . shift ( ) } function o ( n ) { var e ; ( e = r . length ? r . pop ( ) : new i ) . task = n , t ( e ) } function i ( ) { this . task = null } module . exports = o , i . prototype . call = function ( ) { try { this . task . call ( ) } catch ( t ) { o . onerror ? o . onerror ( t ) : ( n . push ( t ) , e ( ) ) } finally { this . task = null , r [ r . length ] = this } } ;
} , { "./raw" : "AARE" } ] , "CxN7" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . flushToStyleTag = exports . minify = exports . css = exports . StyleSheetTestUtils = exports . StyleSheetServer = exports . StyleSheet = void 0 ; var e = m ( require ( "inline-style-prefixer/static/plugins/calc" ) ) , t = m ( require ( "inline-style-prefixer/static/plugins/crossFade" ) ) , r = m ( require ( "inline-style-prefixer/static/plugins/cursor" ) ) , n = m ( require ( "inline-style-prefixer/static/plugins/filter" ) ) , i = m ( require ( "inline-style-prefixer/static/plugins/flex" ) ) , o = m ( require ( "inline-style-prefixer/static/plugins/flexboxIE" ) ) , a = m ( require ( "inline-style-prefixer/static/plugins/flexboxOld" ) ) , s = m ( require ( "inline-style-prefixer/static/plugins/gradient" ) ) , u = m ( require ( "inline-style-prefixer/static/plugins/imageSet" ) ) , l = m ( require ( "inline-style-prefixer/static/plugins/position" ) ) , f = m ( require ( "inline-style-prefixer/static/plugins/sizing" ) ) , c = m ( require ( "inline-style-prefixer/static/plugins/transition" ) ) , y = m ( require ( "string-hash" ) ) , p = m ( require ( "inline-style-prefixer/static/createPrefixer" ) ) , d = m ( require ( "asap" ) ) ; function m ( e ) { return e && e . _ _esModule ? e : { default : e } } var h = [ "Webkit" ] , g = [ "Moz" ] , S = [ "ms" ] , v = [ "Webkit" , "Moz" ] , x = [ "Webkit" , "ms" ] , b = [ "Webkit" , "Moz" , "ms" ] , k = { plugins : [ e . default , t . default , r . default , n . default , i . default , o . default , a . default , s . default , u . default , l . default , f . default , c . default ] , prefixMap : { transform : x , transformOrigin : x , transformOriginX : x , transformOriginY : x , backfaceVisibility : h , perspective : h , perspectiveOrigin : h , transformStyle : h , transformOriginZ : h , animation : h , animationDelay : h , animationDirection : h , animationFillMode : h , animationDuration : h , animationIterationCount : h , animationName : h , animationPlayState : h , animationTimingFunction : h , appearance : v , userSelect : b , fontKerning : h , textEmphasisPosition : h , textEmphasis : h , textEmphasisStyle : h , textEmphasisColor : h , boxDecorationBreak : h , clipPath : h , maskImage : h , maskMode : h , maskRepeat : h , maskPosition : h , maskClip : h , maskOrigin : h , maskSize : h , maskComposite : h , mask : h , maskBorderSource : h , maskBorderMode : h , maskBorderSlice : h , maskBorderWidth : h , maskBorderOutset : h , maskBorderRepeat : h , maskBorder : h , maskType : h , textDecorationStyle : v , textDecorationSkip : v , textDecorationLine : v , textDecorationColor : v , filter : h , fontFeatureSettings : v , breakAfter : b , breakBefore : b , breakInside : b , columnCount : v , columnFill : v , columnGap : v , columnRule : v , columnRuleColor : v , columnRuleStyle : v , columnRuleWidth : v , columns : v , columnSpan : v , columnWidth : v , writingMode : x , flex : x , flexBasis : h , flexDirection : x , flexGrow : h , flexFlow : x , flexShrink : h , flexWrap : x , alignContent : h , alignItems : h , alignSelf : h , justifyContent : h , order : h , transitionDelay : h , transitionDuration : h , transitionProperty : h , transitionTimingFunction : h , backdropFilter : h , scrollSnapType : x , scrollSnapPointsX : x , scrollSnapPointsY : x , scrollSnapDestination : x , scrollSnapCoordinate : x , shapeImageThreshold : h , shapeImageMargin : h , shapeImageOutside : h , hyphens : b , flowInto : x , flowFrom : x , regionFragment : x , boxSizing : g , textAlignLast : g , tabSize : g , wrapFlow : S , wrapThrough : S , wrapMargin : S , touchAction : S , gridTemplateColumns : S , gridTemplateRows : S , gridTemplateAreas : S , gridTemplate : S , gridAutoColumns : S , gridAutoRows : S , gridAutoFlow : S , grid : S , gridRowStart : S , gridColumnStart : S , gridRowEnd : S , gridRow : S , gridColumn : S , gridColumnEnd : S , gridColumnGap : S , gridRowGap : S , gridArea : S , gridGap : S , textSizeAdjust : x , borderImage : h , borderImageOutset : h , borderImageRepeat : h , borderImageSlice : h , borderImageSource : h , borderImageWidth : h } } , O = "function" == typeof Symbol && "symbol" == typeof Symbol . iterator ? function ( e ) { return typeof e } : function ( e ) { return e && "function" == typeof Symbol && e . constructor === Symbol && e !== Symbol . prototype ? "symbol" : typeof e } , w = function ( ) { function e ( e , t ) { for ( var r = 0 ; r < t . length ; r ++ ) { var n = t [ r ] ; n . enumerable = n . enumerable || ! 1 , n . configurable = ! 0 , "value" in n && ( n . writable = ! 0 ) , Object . defineProperty ( e , n . key , n ) } } return function ( t , r , n ) { return r && e ( t . prototype , r ) , n && e ( t , n ) , t } } ( ) ; function A ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } var C = "undefined" != typeof Map , j = function ( ) { function e ( ) { A ( this , e ) , this . elements = { } , this . keyOrder = [ ] } return w ( e , [ { key : "forEach" , value : function ( ) { return function ( e ) { for ( var t = 0 ; t < this . keyOrder . length ; t ++ ) e ( this . element
} , { "inline-style-prefixer/static/plugins/calc" : "tSfb" , "inline-style-prefixer/static/plugins/crossFade" : "ie1g" , "inline-style-prefixer/static/plugins/cursor" : "CYBj" , "inline-style-prefixer/static/plugins/filter" : "MH9I" , "inline-style-prefixer/static/plugins/flex" : "jmPR" , "inline-style-prefixer/static/plugins/flexboxIE" : "FRuF" , "inline-style-prefixer/static/plugins/flexboxOld" : "bHSr" , "inline-style-prefixer/static/plugins/gradient" : "QxYG" , "inline-style-prefixer/static/plugins/imageSet" : "qrrU" , "inline-style-prefixer/static/plugins/position" : "pEQ2" , "inline-style-prefixer/static/plugins/sizing" : "M0DH" , "inline-style-prefixer/static/plugins/transition" : "cnM4" , "string-hash" : "ZBgn" , "inline-style-prefixer/static/createPrefixer" : "rHEJ" , "asap" : "Ezpt" } ] , "hvr4" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . commonStyle = exports . ZIndex = exports . Duration = exports . Sizes = exports . FontSize = exports . FontFamily = void 0 ; var e , o , t , T , i , r = require ( "aphrodite" ) ; exports . FontFamily = e , function ( e ) { e . MONOSPACE = '"Source Code Pro", Courier, monospace' } ( e || ( exports . FontFamily = e = { } ) ) , exports . FontSize = o , function ( e ) { e [ e . LABEL = 10 ] = "LABEL" , e [ e . TITLE = 12 ] = "TITLE" , e [ e . BIG _BUTTON = 36 ] = "BIG_BUTTON" } ( o || ( exports . FontSize = o = { } ) ) , exports . Sizes = t , function ( e ) { e [ e . MINIMAP _HEIGHT = 100 ] = "MINIMAP_HEIGHT" , e [ e . DETAIL _VIEW _HEIGHT = 150 ] = "DETAIL_VIEW_HEIGHT" , e [ e . TOOLTIP _WIDTH _MAX = 900 ] = "TOOLTIP_WIDTH_MAX" , e [ e . TOOLTIP _HEIGHT _MAX = 80 ] = "TOOLTIP_HEIGHT_MAX" , e [ e . SEPARATOR _HEIGHT = 2 ] = "SEPARATOR_HEIGHT" , e [ e . FRAME _HEIGHT = 20 ] = "FRAME_HEIGHT" , e [ e . TOOLBAR _HEIGHT = 20 ] = "TOOLBAR_HEIGHT" , e [ e . TOOLBAR _TAB _HEIGHT = 18 ] = "TOOLBAR_TAB_HEIGHT" } ( t || ( exports . Sizes = t = { } ) ) , exports . Duration = T , function ( e ) { e . HOVER _CHANGE = "0.07s" } ( T || ( exports . Duration = T = { } ) ) , exports . ZIndex = i , function ( e ) { e [ e . PROFILE _SELECT = 1 ] = "PROFILE_SELECT" , e [ e . HOVERTIP = 2 ] = "HOVERTIP" } ( i || ( exports . ZIndex = i = { } ) ) ; const I = r . StyleSheet . create ( { fillY : { height : "100%" } , fillX : { width : "100%" } , hbox : { display : "flex" , flexDirection : "row" , position : "relative" , overflow : "hidden" } , vbox : { display : "flex" , flexDirection : "column" , position : "relative" , overflow : "hidden" } } ) ; exports . commonStyle = I ;
} , { "aphrodite" : "CxN7" } ] , "DHvC" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . exactMatchStrings = s , exports . FlamechartSearchResults = exports . ProfileSearchResults = exports . FlamechartType = void 0 ; var e , t = require ( "./math" ) ; function s ( e , t ) { const s = e . toLocaleLowerCase ( ) , r = t . toLocaleLowerCase ( ) ; let h = 0 ; const a = [ ] ; for ( ; ; ) { let e = s . indexOf ( r , h ) ; if ( - 1 === e ) return a ; a . push ( [ e , e + t . length ] ) , h = e + t . length } } exports . FlamechartType = e , function ( e ) { e [ e . CHRONO _FLAME _CHART = 0 ] = "CHRONO_FLAME_CHART" , e [ e . LEFT _HEAVY _FLAME _GRAPH = 1 ] = "LEFT_HEAVY_FLAME_GRAPH" } ( e || ( exports . FlamechartType = e = { } ) ) ; class r { constructor ( e , t ) { this . profile = e , this . searchQuery = t , this . matches = null } getMatchForFrame ( e ) { return this . matches || ( this . matches = new Map , this . profile . forEachFrame ( e => { const t = s ( e . name , this . searchQuery ) ; this . matches . set ( e , 0 === t . length ? null : t ) } ) ) , this . matches . get ( e ) || null } } exports . ProfileSearchResults = r ; class h { constructor ( e , t ) { this . flamechart = e , this . profileResults = t , this . matches = null } getResults ( ) { if ( null == this . matches ) { const e = [ ] , s = new Map , r = ( h , a ) => { const { node : c } = h ; if ( this . profileResults . getMatchForFrame ( c . frame ) ) { const r = new t . Rect ( new t . Vec2 ( h . start , a ) , new t . Vec2 ( h . end - h . start , 1 ) ) ; s . set ( c , e . length ) , e . push ( { configSpaceBounds : r , node : c } ) } h . children . forEach ( e => { r ( e , a + 1 ) } ) } , h = this . flamechart . getLayers ( ) ; h . length > 0 && h [ 0 ] . forEach ( e => r ( e , 0 ) ) , this . matches = { matches : e , indexForNode : s } } return this . matches } count ( ) { return this . getResults ( ) . matches . length } indexOf ( e ) { const t = this . getResults ( ) . indexForNode . get ( e ) ; return void 0 === t ? null : t } at ( e ) { const t = this . getResults ( ) . matches ; if ( e < 0 || e >= t . length ) throw new Error ( ` Index ${ e } out of bounds in list of ${ t . length } matches. ` ) ; return t [ e ] } } exports . FlamechartSearchResults = h ;
} , { "./math" : "tDuZ" } ] , "t9CM" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . SearchView = exports . ProfileSearchContextProvider = exports . ProfileSearchContext = void 0 ; var e = require ( "aphrodite" ) , t = require ( "preact" ) , r = require ( "preact/hooks" ) , o = require ( "preact/compat" ) , n = require ( "./style" ) , s = require ( "../lib/profile-search" ) , i = require ( "../app-state/active-profile-state" ) , l = require ( "./themes/theme" ) , a = require ( "../app-state" ) , c = require ( "../lib/atom" ) ; function u ( e ) { e . stopPropagation ( ) } const h = ( 0 , t . createContext ) ( null ) ; exports . ProfileSearchContext = h ; const p = ( { children : e } ) => { const o = ( 0 , i . useActiveProfileState ) ( ) , n = o ? o . profile : null , l = ( 0 , c . useAtom ) ( a . searchIsActiveAtom ) , u = ( 0 , c . useAtom ) ( a . searchQueryAtom ) , p = ( 0 , r . useMemo ) ( ( ) => n && l && 0 !== u . length ? new s . ProfileSearchResults ( n , u ) : null , [ l , u , n ] ) ; return ( 0 , t . h ) ( h . Provider , { value : p } , e ) } ; exports . ProfileSearchContextProvider = p ; const d = ( 0 , o . memo ) ( ( { numResults : o , resultIndex : n , selectNext : s , selectPrev : i } ) => { const h = ( 0 , l . useTheme ) ( ) , p = m ( h ) , d = ( 0 , c . useAtom ) ( a . searchIsActiveAtom ) , f = ( 0 , c . useAtom ) ( a . searchQueryAtom ) , y = a . searchQueryAtom . set , g = a . searchIsActiveAtom . set , x = ( 0 , r . useCallback ) ( e => { const t = e . target . value ; y ( t ) } , [ y ] ) , b = ( 0 , r . useRef ) ( null ) , v = ( 0 , r . useCallback ) ( ( ) => g ( ! 1 ) , [ g ] ) , C = ( 0 , r . useCallback ) ( e => { e . shiftKey ? i ( ) : s ( ) } , [ i , s ] ) , S = ( 0 , r . useCallback ) ( e => { e . stopPropagation ( ) , "Escape" === e . key && g ( ! 1 ) , "Enter" === e . key && C ( e ) , "f" == e . key && ( e . metaKey || e . ctrlKey ) && ( b . current && b . current . select ( ) , e . preventDefault ( ) ) } , [ g , C ] ) ; return ( 0 , r . useEffect ) ( ( ) => { const e = e => { "f" == e . key && ( e . metaKey || e . ctrlKey ) && ( e . preventDefault ( ) , b . current ? b . current . select ( ) : ( g ( ! 0 ) , requestAnimationFrame ( ( ) => { b . current && b . current . select ( ) } ) ) ) } ; return window . addEventListener ( "keydown" , e ) , ( ) => { window . removeEventListener ( "keydown" , e ) } } , [ g ] ) , d ? ( 0 , t . h ) ( "div" , { className : ( 0 , e . css ) ( p . searchView ) } , ( 0 , t . h ) ( "span" , { className : ( 0 , e . css ) ( p . icon ) } , "🔍" ) , ( 0 , t . h ) ( "span" , { className : ( 0 , e . css ) ( p . inputContainer ) } , ( 0 , t . h ) ( "input" , { className : ( 0 , e . css ) ( p . input ) , value : f , onInput : x , onKeyDown : S , onKeyUp : u , onKeyPress : u , ref : b } ) ) , null != o && ( 0 , t . h ) ( t . Fragment , null , ( 0 , t . h ) ( "span" , { className : ( 0 , e . css ) ( p . resultCount ) } , null == n ? "?" : n + 1 , "/" , o ) , ( 0 , t . h ) ( "button" , { className : ( 0 , e . css ) ( p . icon , p . button ) , onClick : i } , "⬅️" ) , ( 0 , t . h ) ( "button" , { className : ( 0 , e . css ) ( p . icon , p . button ) , onClick : s } , "➡️" ) ) , ( 0 , t . h ) ( "svg" , { className : ( 0 , e . css ) ( p . icon ) , onClick : v , width : "16" , height : "16" , viewBox : "0 0 16 16" , fill : "none" , xmlns : "http://www.w3.org/2000/svg" } , ( 0 , t . h ) ( "path" , { d : "M4.99999 4.16217L11.6427 10.8048M11.6427 4.16217L4.99999 10.8048" , stroke : h . altFgSecondaryColor } ) ) ) : null } ) ; exports . SearchView = d ; const m = ( 0 , l . withTheme ) ( t => e . StyleSheet . create ( { searchView : { position : "absolute" , top : 0 , right : 10 , height : n . Sizes . TOOLBAR _HEIGHT , width : 208 , borderWidth : 2 , borderColor : t . altFgPrimaryColor , borderStyle : "solid" , fontSize : n . FontSize . LABEL , boxSizing : "border-box" , background : t . altBgSecondaryColor , color : t . altFgPrimaryColor , display : "flex" , alignItems : "center" } , inputContainer : { flexShrink : 1 , flexGrow : 1 , display : "flex" } , input : { width : "100%" , border : "none" , background : "none" , fontSize : n . FontSize . LABEL , lineHeight : ` ${ n . Sizes . TOOLBAR _HEIGHT } px ` , color : t . altFgPrimaryColor , ":focus" : { border : "none" , outline : "none" } , "::selection" : { color : t . altFgPrimaryColor , background : t . selectionPrimaryColor } } , resultCount : { verticalAlign : "middle" } , icon : { flexShrink : 0 , verticalAlign : "middle" , height : "100%" , margin : "0px 2px 0px 2px" , fontSize : n . FontSize . LABEL } , button : { display : "inline" , background : "none" , border : "none" , padding : 0 , ":focus" : { outline : "none" } } } ) ) ;
} , { "aphrodite" : "CxN7" , "preact" : "aSor" , "preact/hooks" : "MwGB" , "preact/compat" : "AQ6k" , "./style" : "hvr4" , "../lib/profile-search" : "DHvC" , "../app-state/active-profile-state" : "MY42" , "./themes/theme" : "gzKG" , "../app-state" : "LDQe" , "../lib/atom" : "QkVE" } ] , "FbpF" : [ function ( require , module , exports ) {
"use strict" ; function e ( e ) { return e . replace ( /\\([a-fA-F0-9]{2})/g , ( e , n ) => { const t = parseInt ( n , 16 ) ; return String . fromCharCode ( t ) } ) } function n ( n ) { const t = n . split ( "\n" ) ; if ( ! t . length ) return null ; if ( "" === t [ t . length - 1 ] && t . pop ( ) , ! t . length ) return null ; const r = new Map , o = /^(\d+):(.+)$/ , s = /^([\$\w]+):([\$\w-]+)$/ ; for ( const u of t ) { const n = o . exec ( u ) ; if ( n ) { r . set ( ` wasm-function[ ${ n [ 1 ] } ] ` , e ( n [ 2 ] ) ) ; continue } const t = s . exec ( u ) ; if ( ! t ) return null ; r . set ( t [ 1 ] , e ( t [ 2 ] ) ) } return e => r . has ( e . name ) ? { name : r . get ( e . name ) } : null } Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . importEmscriptenSymbolMap = n ;
} , { } ] , "Pua8" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . ColorChit = o ; var e = require ( "preact" ) , t = require ( "aphrodite" ) , r = require ( "./style" ) , i = require ( "./themes/theme" ) ; function o ( r ) { const o = s ( ( 0 , i . useTheme ) ( ) ) ; return ( 0 , e . h ) ( "span" , { className : ( 0 , t . css ) ( o . stackChit ) , style : { backgroundColor : r . color } } ) } const s = ( 0 , i . withTheme ) ( e => t . StyleSheet . create ( { stackChit : { position : "relative" , top : - 1 , display : "inline-block" , verticalAlign : "middle" , marginRight : "0.5em" , border : ` 1px solid ${ e . fgSecondaryColor } ` , width : r . FontSize . LABEL - 2 , height : r . FontSize . LABEL - 2 } } ) ) ;
} , { "preact" : "aSor" , "aphrodite" : "CxN7" , "./style" : "hvr4" , "./themes/theme" : "gzKG" } ] , "SGwe" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . ScrollableListView = void 0 ; var e = require ( "preact" ) , t = require ( "preact/hooks" ) ; const r = ( { items : r , axis : l , renderItems : n , className : i , initialIndexInView : s } ) => { const [ u , o ] = ( 0 , t . useState ) ( null ) , [ c , a ] = ( 0 , t . useState ) ( 0 ) , d = ( 0 , t . useRef ) ( null ) , f = "x" === l ? "width" : "height" , x = "x" === l ? "left" : "top" , b = "x" === l ? "scrollLeft" : "scrollTop" , h = s ? r . reduce ( ( e , t , r ) => r < s ? e + t . size : e , 0 ) : 0 , m = ( 0 , t . useRef ) ( h ) , v = ( 0 , t . useCallback ) ( e => { e ? requestAnimationFrame ( ( ) => { o ( e . getBoundingClientRect ( ) [ f ] ) , null != m . current && ( e . scrollTo ( { [ x ] : m . current } ) , m . current = null ) } ) : o ( null ) , d . current = e } , [ o , f , x ] ) , g = ( 0 , t . useMemo ) ( ( ) => { if ( null == d . current || null == u || null == c ) return null ; const e = c - u / 4 , t = c + u + u / 4 ; let l = 0 , n = 0 , i = 0 ; for ( ; i < r . length ; i ++ ) { if ( n = l , ( l += r [ i ] . size ) >= e ) break } const s = i ; for ( ; i < r . length ; i ++ ) { if ( ( l += r [ i ] . size ) >= t ) break } return { firstVisibleIndex : s , lastVisibleIndex : Math . min ( i , r . length - 1 ) , invisiblePrefixSize : n } } , [ u , c , r ] ) , p = ( 0 , t . useMemo ) ( ( ) => r . reduce ( ( e , t ) => e + t . size , 0 ) , [ r ] ) , w = ( 0 , t . useCallback ) ( ( ) => { null != d . current && a ( d . current [ b ] ) } , [ b ] ) ; ( 0 , t . useEffect ) ( ( ) => { const e = ( ) => { null != d . current && o ( d . current . getBoundingClientRect ( ) [ f ] ) } ; return window . addEventListener ( "resize" , e ) , ( ) => { window . removeEventListener ( "resize" , e ) } } , [ f ] ) ; const z = ( 0 , t . useMemo ) ( ( ) => g ? n ( g . firstVisibleIndex , g . lastVisibleIndex ) : null , [ n , g ] ) , I = ( 0 , t . useMemo ) ( ( ) => ( 0 , e . h ) ( "div" , { style : { height : p } } , ( 0 , e . h ) ( "div" , { style : { transform : ` translateY( ${ ( null == g ? void 0 : g . invisiblePrefixSize ) || 0 } px) ` } } , z ) ) , [ g , z , p ] ) ; return ( 0 , e . h ) ( "div" , { className : i , ref : v , onScroll : w } , I ) } ; exports . ScrollableListView = r ;
} , { "preact" : "aSor" , "preact/hooks" : "MwGB" } ] , "Ivh5" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . ProfileTableViewContainer = exports . ProfileTableView = void 0 ; var e = require ( "preact" ) , t = require ( "aphrodite" ) , r = require ( "../lib/utils" ) , o = require ( "./style" ) , l = require ( "./color-chit" ) , i = require ( "./scrollable-list-view" ) , a = require ( "../app-state/getters" ) , s = require ( "preact/compat" ) , c = require ( "preact/hooks" ) , n = require ( "./sandwich-view" ) , h = require ( "../lib/color" ) , d = require ( "./themes/theme" ) , m = require ( "../app-state" ) , u = require ( "../lib/atom" ) ; function S ( r ) { const o = p ( ( 0 , d . useTheme ) ( ) ) ; return ( 0 , e . h ) ( "div" , { className : ( 0 , t . css ) ( o . hBarDisplay ) } , ( 0 , e . h ) ( "div" , { className : ( 0 , t . css ) ( o . hBarDisplayFilled ) , style : { width : ` ${ r . perc } % ` } } ) ) } function b ( r ) { const o = ( 0 , d . useTheme ) ( ) , l = p ( o ) , { activeDirection : i } = r , a = i === m . SortDirection . ASCENDING ? o . fgPrimaryColor : o . fgSecondaryColor , s = i === m . SortDirection . DESCENDING ? o . fgPrimaryColor : o . fgSecondaryColor ; return ( 0 , e . h ) ( "svg" , { width : "8" , height : "10" , viewBox : "0 0 8 10" , fill : "none" , xmlns : "http://www.w3.org/2000/svg" , className : ( 0 , t . css ) ( l . sortIcon ) } , ( 0 , e . h ) ( "path" , { d : "M0 4L4 0L8 4H0Z" , fill : a } ) , ( 0 , e . h ) ( "path" , { d : "M0 4L4 0L8 4H0Z" , transform : "translate(0 10) scale(1 -1)" , fill : s } ) ) } function g ( t , r , o ) { const l = [ ] ; let i = 0 ; for ( let a of r ) l . push ( t . slice ( i , a [ 0 ] ) ) , l . push ( ( 0 , e . h ) ( "span" , { className : o } , t . slice ( a [ 0 ] , a [ 1 ] ) ) ) , i = a [ 1 ] ; return l . push ( t . slice ( i ) ) , ( 0 , e . h ) ( "span" , null , l ) } const C = ( { frame : o , matchedRanges : i , profile : a , index : s , selectedFrame : c , setSelectedFrame : n , getCSSColorForFrame : h } ) => { const m = p ( ( 0 , d . useTheme ) ( ) ) , u = o . getTotalWeight ( ) , b = o . getSelfWeight ( ) , C = 100 * u / a . getTotalNonIdleWeight ( ) , f = 100 * b / a . getTotalNonIdleWeight ( ) , w = o === c ; return ( 0 , e . h ) ( "tr" , { key : ` ${ s } ` , onClick : n . bind ( null , o ) , className : ( 0 , t . css ) ( m . tableRow , s % 2 == 0 && m . tableRowEven , w && m . tableRowSelected ) } , ( 0 , e . h ) ( "td" , { className : ( 0 , t . css ) ( m . numericCell ) } , a . formatValue ( u ) , " (" , ( 0 , r . formatPercent ) ( C ) , ")" , ( 0 , e . h ) ( S , { perc : C } ) ) , ( 0 , e . h ) ( "td" , { className : ( 0 , t . css ) ( m . numericCell ) } , a . formatValue ( b ) , " (" , ( 0 , r . formatPercent ) ( f ) , ")" , ( 0 , e . h ) ( S , { perc : f } ) ) , ( 0 , e . h ) ( "td" , { title : o . file , className : ( 0 , t . css ) ( m . textCell ) } , ( 0 , e . h ) ( l . ColorChit , { color : h ( o ) } ) , i ? g ( o . name , i , ( 0 , t . css ) ( m . matched , w && m . matchedSelected ) ) : o . name ) ) } , f = ( 0 , s . memo ) ( ( { profile : r , sortMethod : l , setSortMethod : a , selectedFrame : s , setSelectedFrame : h , getCSSColorForFrame : u , searchQuery : S , searchIsActive : g } ) => { const f = p ( ( 0 , d . useTheme ) ( ) ) , w = ( 0 , c . useCallback ) ( ( e , t ) => { if ( t . preventDefault ( ) , l . field == e ) a ( { field : e , direction : l . direction === m . SortDirection . ASCENDING ? m . SortDirection . DESCENDING : m . SortDirection . ASCENDING } ) ; else switch ( e ) { case m . SortField . SYMBOL _NAME : a ( { field : e , direction : m . SortDirection . ASCENDING } ) ; break ; case m . SortField . SELF : case m . SortField . TOTAL : a ( { field : e , direction : m . SortDirection . DESCENDING } ) } } , [ l , a ] ) , F = ( 0 , c . useContext ) ( n . SandwichViewContext ) , y = ( 0 , c . useCallback ) ( ( o , l ) => { if ( ! F ) return null ; const i = [ ] ; for ( let e = o ; e <= l ; e ++ ) { const t = F . rowList [ e ] , o = F . getSearchMatchForFrame ( t ) ; i . push ( C ( { frame : t , matchedRanges : null == o ? null : o , index : e , profile : r , selectedFrame : s , setSelectedFrame : h , getCSSColorForFrame : u } ) ) } return 0 === i . length && ( g ? i . push ( ( 0 , e . h ) ( "tr" , null , ( 0 , e . h ) ( "td" , { className : ( 0 , t . css ) ( f . emptyState ) } , 'No symbol names match query "' , S , '".' ) ) ) : i . push ( ( 0 , e . h ) ( "tr" , null , ( 0 , e . h ) ( "td" , { className : ( 0 , t . css ) ( f . emptyState ) } , "No symbols found." ) ) ) ) , ( 0 , e . h ) ( "table" , { className : ( 0 , t . css ) ( f . tableView ) } , i ) } , [ F , r , s , h , u , g , S , f . emptyState , f . tableView ] ) , N = ( 0 , c . useMemo ) ( ( ) => null == F ? [ ] : F . rowList . map ( e => ( { size : o . Sizes . FRAME _HEIGHT } ) ) , [ F ] ) , E = ( 0 , c . useCallback ) ( e => w ( m . SortField . TOTAL , e ) , [ w ] ) , A = ( 0 , c . useCallback ) ( e => w ( m . SortField . SELF , e ) , [ w ] ) , v = ( 0 , c . useCallback ) ( e => w ( m . SortField . SYMBOL _NAME , e ) , [ w ] ) ; return ( 0 , e . h ) ( "div" , { className : ( 0 , t . css ) ( o . commonStyle . vbox , f . profileTableView ) } , ( 0 , e . h ) ( "table" , { className : ( 0 , t . css ) ( f . tableView ) } , ( 0 , e . h ) ( "thead" , { className : ( 0 , t . css ) ( f . tableHeader ) } , ( 0 , e . h ) ( "tr" , null , ( 0 , e . h ) ( "th" , { className : ( 0 , t . css ) ( f . numericCell ) , onClick : E } , ( 0 , e . h ) ( b , { activeDirection : l . field === m . SortField . TOTAL ? l . direction : null } ) , "Total" ) , ( 0 , e . h ) ( "th" , { className : ( 0 , t . css ) ( f . numericCell ) , onClick : A } , ( 0 , e . h ) ( b , { activeDirection : l . field === m . SortField . SELF ? l . direction : null } ) , "Self" ) , ( 0 , e . h ) ( "th" , { className : ( 0 ,
} , { "preact" : "aSor" , "aphrodite" : "CxN7" , "../lib/utils" : "ucYa" , "./style" : "hvr4" , "./color-chit" : "Pua8" , "./scrollable-list-view" : "SGwe" , "../app-state/getters" : "zEXv" , "preact/compat" : "AQ6k" , "preact/hooks" : "MwGB" , "./sandwich-view" : "L8J2" , "../lib/color" : "x77Y" , "./themes/theme" : "gzKG" , "../app-state" : "LDQe" , "../lib/atom" : "QkVE" } ] , "gFMr" : [ function ( require , module , exports ) {
2024-01-01 20:09:05 -05:00
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . Flamechart = void 0 ; var t = require ( "./utils" ) , e = require ( "./math" ) ; class i { getTotalWeight ( ) { return this . totalWeight } getLayers ( ) { return this . layers } getColorBucketForFrame ( t ) { return this . source . getColorBucketForFrame ( t ) } getMinFrameWidth ( ) { return this . minFrameWidth } formatValue ( t ) { return this . source . formatValue ( t ) } getClampedViewportWidth ( t ) { const i = this . getTotalWeight ( ) , r = Math . pow ( 2 , 40 ) , s = ( 0 , e . clamp ) ( 3 * this . getMinFrameWidth ( ) , i / r , i ) ; return ( 0 , e . clamp ) ( t , s , i ) } getClampedConfigSpaceViewportRect ( { configSpaceViewportRect : t , renderInverted : i } ) { const r = new e . Vec2 ( this . getTotalWeight ( ) , this . getLayers ( ) . length ) , s = this . getClampedViewportWidth ( t . size . x ) , h = t . size . withX ( s ) , a = e . Vec2 . clamp ( t . origin , new e . Vec2 ( 0 , i ? 0 : - 1 ) , e . Vec2 . max ( e . Vec2 . zero , r . minus ( h ) . plus ( new e . Vec2 ( 0 , 1 ) ) ) ) ; return new e . Rect ( a , t . size . withX ( s ) ) } constructor ( e ) { this . source = e , this . layers = [ ] , this . totalWeight = 0 , this . minFrameWidth = 1 ; const i = [ ] ; this . minFrameWidth = 1 / 0 ; this . totalWeight = e . getTotalWeight ( ) , e . forEachCall ( ( e , r ) => { const s = ( 0 , t . lastOf ) ( i ) , h = { node : e , parent : s , children : [ ] , start : r , end : r } ; s && s . children . push ( h ) , i . push ( h ) } , ( t , e ) => { console . assert ( i . length > 0 ) ; const r = i . pop ( ) ; if ( r . end = e , r . end - r . start == 0 ) return ; const s = i . length ; for ( ; this . layers . length <= s ; ) this . layers . push ( [ ] ) ; this . layers [ s ] . push ( r ) , this . minFrameWidth = Math . min ( this . minFrameWidth , r . end - r . start ) } ) , isFinite ( this . minFrameWidth ) || ( this . minFrameWidth = 1 ) } } exports . Flamechart = i ;
2022-11-09 21:39:00 -05:00
} , { "./utils" : "ucYa" , "./math" : "tDuZ" } ] , "P80v" : [ function ( require , module , exports ) {
2024-01-01 20:09:05 -05:00
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . FlamechartRenderer = exports . FlamechartRowAtlasKey = void 0 ; var e = require ( "./rectangle-batch-renderer" ) , t = require ( "../lib/math" ) , r = require ( "../lib/color" ) , n = require ( "../lib/utils" ) , s = require ( "./graphics" ) , o = require ( "./utils" ) ; const c = 1e4 ; class i { constructor ( e , t , r ) { this . batch = e , this . bounds = t , this . numPrecedingRectanglesInRow = r , this . children = [ ] } getBatch ( ) { return this . batch } getBounds ( ) { return this . bounds } getRectCount ( ) { return this . batch . getRectCount ( ) } getChildren ( ) { return this . children } getParity ( ) { return this . numPrecedingRectanglesInRow % 2 } forEachLeafNodeWithinBounds ( e , t ) { this . bounds . hasIntersectionWith ( e ) && t ( this ) } } class h { constructor ( e ) { if ( this . children = e , this . rectCount = 0 , 0 === e . length ) throw new Error ( "Empty interior node" ) ; let r = 1 / 0 , n = - 1 / 0 , s = 1 / 0 , o = - 1 / 0 ; for ( let t of e ) { this . rectCount += t . getRectCount ( ) ; const e = t . getBounds ( ) ; r = Math . min ( r , e . left ( ) ) , n = Math . max ( n , e . right ( ) ) , s = Math . min ( s , e . top ( ) ) , o = Math . max ( o , e . bottom ( ) ) } this . bounds = new t . Rect ( new t . Vec2 ( r , s ) , new t . Vec2 ( n - r , o - s ) ) } getBounds ( ) { return this . bounds } getRectCount ( ) { return this . rectCount } getChildren ( ) { return this . children } forEachLeafNodeWithinBounds ( e , t ) { if ( this . bounds . hasIntersectionWith ( e ) ) for ( let r of this . children ) r . forEachLeafNodeWithinBounds ( e , t ) } } class a { get key ( ) { return ` ${ this . stackDepth } _ ${ this . index } _ ${ this . zoomLevel } ` } constructor ( e ) { this . stackDepth = e . stackDepth , this . zoomLevel = e . zoomLevel , this . index = e . index } static getOrInsert ( e , t ) { return e . getOrInsert ( new a ( t ) ) } } exports . FlamechartRowAtlasKey = a ; class l { constructor ( s , o , a , l , g , d = { inverted : ! 1 } ) { this . gl = s , this . rowAtlas = o , this . flamechart = a , this . rectangleBatchRenderer = l , this . colorPassRenderer = g , this . options = d , this . layers = [ ] , this . rectInfoTexture = null , this . rectInfoRenderTarget = null , this . atlasKeys = new n . KeyedSet ; const f = a . getLayers ( ) . length ; for ( let n = 0 ; n < f ; n ++ ) { const s = [ ] , o = d . inverted ? f - 1 - n : n ; let l = 1 / 0 , g = - 1 / 0 , u = new e . RectangleBatch ( this . gl ) , R = 0 ; const w = a . getLayers ( ) [ n ] ; for ( let h = 0 ; h < w . length ; h ++ ) { const a = w [ h ] ; u . getRectCount ( ) >= c && ( s . push ( new i ( u , new t . Rect ( new t . Vec2 ( l , o ) , new t . Vec2 ( g - l , 1 ) ) , R ) ) , l = 1 / 0 , g = - 1 / 0 , u = new e . RectangleBatch ( this . gl ) ) ; const d = new t . Rect ( new t . Vec2 ( a . start , o ) , new t . Vec2 ( a . end - a . start , 1 ) ) ; l = Math . min ( l , d . left ( ) ) , g = Math . max ( g , d . right ( ) ) ; const f = new r . Color ( ( 1 + h % 255 ) / 256 , ( 1 + n % 255 ) / 256 , ( 1 + this . flamechart . getColorBucketForFrame ( a . node . frame ) ) / 256 ) ; u . addRect ( d , f ) , R ++ } u . getRectCount ( ) > 0 && s . push ( new i ( u , new t . Rect ( new t . Vec2 ( l , o ) , new t . Vec2 ( g - l , 1 ) ) , R ) ) , this . layers . push ( new h ( s ) ) } } getRectInfoTexture ( e , t ) { if ( this . rectInfoTexture ) { const r = this . rectInfoTexture ; r . width == e && r . height == t || r . resize ( e , t ) } else this . rectInfoTexture = this . gl . createTexture ( s . Graphics . TextureFormat . NEAREST _CLAMP , e , t ) ; return this . rectInfoTexture } getRectInfoRenderTarget ( e , t ) { const r = this . getRectInfoTexture ( e , t ) ; return this . rectInfoRenderTarget && this . rectInfoRenderTarget . texture != r && ( this . rectInfoRenderTarget . texture . free ( ) , this . rectInfoRenderTarget . setColor ( r ) ) , this . rectInfoRenderTarget || ( this . rectInfoRenderTarget = this . gl . createRenderTarget ( r ) ) , this . rectInfoRenderTarget } free ( ) { this . rectInfoRenderTarget && this . rectInfoRenderTarget . free ( ) , this . rectInfoTexture && this . rectInfoTexture . free ( ) } configSpaceBoundsForKey ( e ) { const { stackDepth : r , zoomLevel : n , index : s } = e , o = this . flamechart . getTotalWeight ( ) / Math . pow ( 2 , n ) , c = this . flamechart . getLayers ( ) . length , i = this . options . inverted ? c - 1 - r : r ; return new t . Rect ( new t . Vec2 ( o * s , i ) , new t . Vec2 ( o , 1 ) ) } render ( e ) { const { configSpaceSrcRect : r , physicalSpaceDstRect : n } = e , c = [ ] , i = t . AffineTransform . betweenRects ( r , n ) ; if ( r . isEmpty ( ) ) return ; let h = 0 ; for ( ; ; ) { const e = a . getOrInsert ( this . atlasKeys , { stackDepth : 0 , zoomLevel : h , index : 0 } ) , t = this . configSpaceBoundsForKey ( e ) ; if ( i . transformRect ( t ) . width ( ) < this . rowAtlas . getResolution ( ) ) break ; h ++ } const l = Math . max ( 0 , Math . floor ( r . top ( ) ) ) , g = Math . min ( this . layers . length , Math . ceil ( r . bottom ( ) ) ) , d = this . flamechart . getTotalWeight ( ) , f = Math . pow ( 2 , h ) , u = Math . floor ( f * r . left ( ) / d ) , R = Math . ceil ( f * r . right ( ) / d ) , w = this . flamechart . getLayers ( ) . length ; for ( let t = l ; t < g ; t ++ ) for ( let e = u ; e <= R ; e ++ ) { const n = this . options . inverted ? w - 1 - t : t , s = a . getOrInsert ( this . atlasKeys
2022-11-09 21:39:00 -05:00
} , { "./rectangle-batch-renderer" : "UGJH" , "../lib/math" : "tDuZ" , "../lib/color" : "x77Y" , "../lib/utils" : "ucYa" , "./graphics" : "XGYN" , "./utils" : "MMP6" } ] , "jZ6t" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . getFlamechartStyle = void 0 ; var e = require ( "aphrodite" ) , o = require ( "./style" ) , r = require ( "./themes/theme" ) ; const t = ( 0 , r . withTheme ) ( r => e . StyleSheet . create ( { hoverCount : { color : r . weightColor } , fill : { width : "100%" , height : "100%" , position : "absolute" , left : 0 , top : 0 } , minimap : { height : o . Sizes . MINIMAP _HEIGHT , borderBottom : ` ${ o . Sizes . SEPARATOR _HEIGHT } px solid ${ r . fgSecondaryColor } ` } , panZoomView : { flex : 1 } , detailView : { display : "grid" , height : o . Sizes . DETAIL _VIEW _HEIGHT , overflow : "hidden" , gridTemplateColumns : "120px 120px 1fr" , gridTemplateRows : "repeat(4, 1fr)" , borderTop : ` ${ o . Sizes . SEPARATOR _HEIGHT } px solid ${ r . fgSecondaryColor } ` , fontSize : o . FontSize . LABEL , position : "absolute" , background : r . bgPrimaryColor , width : "100vw" , bottom : 0 } , stackTraceViewPadding : { padding : 5 } , stackTraceView : { height : o . Sizes . DETAIL _VIEW _HEIGHT , lineHeight : ` ${ o . FontSize . LABEL + 2 } px ` , overflow : "auto" , "::-webkit-scrollbar" : { background : r . bgPrimaryColor } , "::-webkit-scrollbar-thumb" : { background : r . fgSecondaryColor , borderRadius : 20 , border : ` 3px solid ${ r . bgPrimaryColor } ` , ":hover" : { background : r . fgPrimaryColor } } } , stackLine : { whiteSpace : "nowrap" } , stackFileLine : { color : r . fgSecondaryColor } , statsTable : { display : "grid" , gridTemplateColumns : "1fr 1fr" , gridTemplateRows : ` repeat(3, ${ o . FontSize . LABEL + 10 } px) ` , gridGap : "1px 1px" , textAlign : "center" , paddingRight : 1 } , statsTableHeader : { gridColumn : "1 / 3" } , statsTableCell : { position : "relative" , display : "flex" , justifyContent : "center" , alignItems : "center" } , thisInstanceCell : { background : r . selectionPrimaryColor , color : r . altFgPrimaryColor } , allInstancesCell : { background : r . selectionSecondaryColor , color : r . altFgPrimaryColor } , barDisplay : { position : "absolute" , top : 0 , left : 0 , background : "rgba(0, 0, 0, 0.2)" , width : "100%" } } ) ) ; exports . getFlamechartStyle = t ;
} , { "aphrodite" : "CxN7" , "./style" : "hvr4" , "./themes/theme" : "gzKG" } ] , "eeWS" : [ function ( require , module , exports ) {
2023-07-26 20:42:51 -04:00
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . cachedMeasureTextWidth = i , exports . buildTrimmedText = s , exports . trimTextMid = h , exports . remapRangesToTrimmedText = o , exports . ELLIPSIS = void 0 ; var e = require ( "./utils" ) ; const t = "…" ; exports . ELLIPSIS = t ; const n = new Map ; let r = - 1 ; function i ( e , t ) { return window . devicePixelRatio !== r && ( n . clear ( ) , r = window . devicePixelRatio ) , n . has ( t ) || n . set ( t , e . measureText ( t ) . width ) , n . get ( t ) } function s ( e , n ) { if ( e . length <= n ) return { trimmedString : e , trimmedLength : e . length , prefixLength : e . length , suffixLength : 0 , originalString : e , originalLength : e . length } ; let r = Math . floor ( n / 2 ) ; const i = n - r - 1 , s = e . substring ( 0 , r ) , h = e . substring ( e . length - i , e . length ) , g = s + t + h ; return { trimmedString : g , trimmedLength : g . length , prefixLength : s . length , suffixLength : h . length , originalString : e , originalLength : e . length } } function h ( t , n , r ) { if ( i ( t , n ) <= r ) return s ( n , n . length ) ; const [ h ] = ( 0 , e . findValueBisect ) ( 0 , n . length , e => i ( t , s ( n , Math . floor ( e ) ) . trimmedString ) , r ) ; return s ( n , Math . floor ( h ) ) } var g ; function a ( e , t ) { return t < e . prefixLength ? g . IN _PREFIX : t < e . originalLength - e . suffixLength ? g . ELIDED : g . IN _SUFFIX } function o ( e , t ) { const n = [ ] , r = e . originalLength - e . trimmedLength ; let i = ! 1 ; for ( let [ s , h ] of t ) { let t = a ( e , s ) , o = a ( e , h - 1 ) ; switch ( t ) { case g . IN _PREFIX : switch ( o ) { case g . IN _PREFIX : n . push ( [ s , h ] ) ; break ; case g . ELIDED : n . push ( [ s , e . prefixLength + 1 ] ) , i = ! 0 ; break ; case g . IN _SUFFIX : n . push ( [ s , h - r ] ) } break ; case g . ELIDED : switch ( o ) { case g . IN _PREFIX : throw new Error ( "Unexpected highlight range starts in elided and ends in prefix" ) ; case g . ELIDED : i || ( n . push ( [ e . prefixLength , e . prefixLength + 1 ] ) , i = ! 0 ) ; break ; case g . IN _SUFFIX : i ? n . push ( [ e . trimmedLength - e . suffixLength , h - r ] ) : ( n . push ( [ e . prefixLength , h - r ] ) , i = ! 0 ) } break ; case g . IN _SUFFIX : switch ( o ) { case g . IN _PREFIX : throw new Error ( "Unexpected highlight range starts in suffix and ends in prefix" ) ; case g . ELIDED : throw new Error ( "Unexpected highlight range starts in suffix and ends in elided" ) ; case g . IN _SUFFIX : n . push ( [ s - r , h - r ] ) } } } return n } ! function ( e ) { e [ e . IN _PREFIX = 0 ] = "IN_PREFIX" , e [ e . IN _SUFFIX = 1 ] = "IN_SUFFIX" , e [ e . ELIDED = 2 ] = "ELIDED" } ( g || ( g = { } ) ) ;
2022-11-09 21:39:00 -05:00
} , { "./utils" : "ucYa" } ] , "S7z0" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . FlamechartMinimapView = void 0 ; var e , t = require ( "preact" ) , i = require ( "aphrodite" ) , o = require ( "../lib/math" ) , s = require ( "./flamechart-style" ) , n = require ( "./style" ) , r = require ( "../lib/text-utils" ) , a = require ( "../lib/color" ) ; ! function ( e ) { e [ e . DRAW _NEW _VIEWPORT = 0 ] = "DRAW_NEW_VIEWPORT" , e [ e . TRANSLATE _VIEWPORT = 1 ] = "TRANSLATE_VIEWPORT" } ( e || ( e = { } ) ) ; class c extends t . Component { constructor ( ) { super ( ... arguments ) , this . container = null , this . containerRef = ( e => { this . container = e || null } ) , this . overlayCanvas = null , this . overlayCtx = null , this . onWindowResize = ( ( ) => { this . onBeforeFrame ( ) } ) , this . onBeforeFrame = ( ( ) => { this . maybeClearInteractionLock ( ) , this . resizeOverlayCanvasIfNeeded ( ) , this . renderRects ( ) , this . renderOverlays ( ) } ) , this . renderCanvas = ( ( ) => { this . props . canvasContext . requestFrame ( ) } ) , this . frameHadWheelEvent = ! 1 , this . framesWithoutWheelEvents = 0 , this . interactionLock = null , this . maybeClearInteractionLock = ( ( ) => { this . interactionLock && ( this . frameHadWheelEvent || ( this . framesWithoutWheelEvents ++ , this . framesWithoutWheelEvents >= 2 && ( this . interactionLock = null , this . framesWithoutWheelEvents = 0 ) ) , this . props . canvasContext . requestFrame ( ) ) , this . frameHadWheelEvent = ! 1 } ) , this . onWheel = ( e => { if ( e . preventDefault ( ) , this . frameHadWheelEvent = ! 0 , ( e . metaKey || e . ctrlKey ) && "pan" !== this . interactionLock ) { let t = 1 + e . deltaY / 100 ; e . ctrlKey && ( t = 1 + e . deltaY / 40 ) , t = ( 0 , o . clamp ) ( t , . 1 , 10 ) , this . zoom ( t ) } else "zoom" !== this . interactionLock && this . pan ( new o . Vec2 ( e . deltaX , e . deltaY ) ) ; this . renderCanvas ( ) } ) , this . dragStartConfigSpaceMouse = null , this . dragConfigSpaceViewportOffset = null , this . draggingMode = null , this . onMouseDown = ( t => { const i = this . configSpaceMouse ( t ) ; i && ( this . props . configSpaceViewportRect . contains ( i ) ? ( this . draggingMode = e . TRANSLATE _VIEWPORT , this . dragConfigSpaceViewportOffset = i . minus ( this . props . configSpaceViewportRect . origin ) ) : this . draggingMode = e . DRAW _NEW _VIEWPORT , this . dragStartConfigSpaceMouse = i , window . addEventListener ( "mousemove" , this . onWindowMouseMove ) , window . addEventListener ( "mouseup" , this . onWindowMouseUp ) , this . updateCursor ( i ) ) } ) , this . onWindowMouseMove = ( t => { if ( ! this . dragStartConfigSpaceMouse ) return ; let i = this . configSpaceMouse ( t ) ; if ( i ) if ( this . updateCursor ( i ) , i = new o . Rect ( new o . Vec2 ( 0 , 0 ) , this . configSpaceSize ( ) ) . closestPointTo ( i ) , this . draggingMode === e . DRAW _NEW _VIEWPORT ) { const e = this . dragStartConfigSpaceMouse ; let t = i ; if ( ! e || ! t ) return ; const s = Math . min ( e . x , t . x ) , n = Math . max ( e . x , t . x ) - s , r = this . props . configSpaceViewportRect . height ( ) ; this . props . setConfigSpaceViewportRect ( new o . Rect ( new o . Vec2 ( s , t . y - r / 2 ) , new o . Vec2 ( n , r ) ) ) } else if ( this . draggingMode === e . TRANSLATE _VIEWPORT ) { if ( ! this . dragConfigSpaceViewportOffset ) return ; const e = i . minus ( this . dragConfigSpaceViewportOffset ) ; this . props . setConfigSpaceViewportRect ( this . props . configSpaceViewportRect . withOrigin ( e ) ) } } ) , this . updateCursor = ( t => { this . draggingMode === e . TRANSLATE _VIEWPORT ? ( document . body . style . cursor = "grabbing" , document . body . style . cursor = "-webkit-grabbing" ) : this . draggingMode === e . DRAW _NEW _VIEWPORT ? document . body . style . cursor = "col-resize" : this . props . configSpaceViewportRect . contains ( t ) ? ( document . body . style . cursor = "grab" , document . body . style . cursor = "-webkit-grab" ) : document . body . style . cursor = "col-resize" } ) , this . onMouseLeave = ( ( ) => { null == this . draggingMode && ( document . body . style . cursor = "default" ) } ) , this . onMouseMove = ( e => { const t = this . configSpaceMouse ( e ) ; t && this . updateCursor ( t ) } ) , this . onWindowMouseUp = ( e => { this . draggingMode = null , window . removeEventListener ( "mousemove" , this . onWindowMouseMove ) , window . removeEventListener ( "mouseup" , this . onWindowMouseUp ) ; const t = this . configSpaceMouse ( e ) ; t && this . updateCursor ( t ) } ) , this . overlayCanvasRef = ( e => { e ? ( this . overlayCanvas = e , this . overlayCtx = this . overlayCanvas . getContext ( "2d" ) , this . renderCanvas ( ) ) : ( this . overlayCanvas = null , this . overlayCtx = null ) } ) } physicalViewSize ( ) { return new o . Vec2 ( this . overlayCanvas ? this . overlayCanvas . width : 0 , this . overlayCanvas ? this . overlayCanvas . height : 0 ) } getStyle ( ) { return ( 0 , s . getFlamechartStyle ) ( this . props . theme ) } minimapOrigin ( ) { return new o . Vec2 ( 0 , n . Sizes . FRAME _HEIGHT * window . devicePixelRatio ) } configSpaceSize ( ) { return new o . Vec2 ( this . props . flamechart . getTotalWeight ( ) , t
} , { "preact" : "aSor" , "aphrodite" : "CxN7" , "../lib/math" : "tDuZ" , "./flamechart-style" : "jZ6t" , "./style" : "hvr4" , "../lib/text-utils" : "eeWS" , "../lib/color" : "x77Y" } ] , "uohB" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . FlamechartDetailView = o ; var e = require ( "aphrodite" ) , l = require ( "preact" ) , t = require ( "./flamechart-style" ) , s = require ( "../lib/utils" ) , a = require ( "./color-chit" ) , c = require ( "./themes/theme" ) ; function r ( a ) { const r = ( 0 , t . getFlamechartStyle ) ( ( 0 , c . useTheme ) ( ) ) , i = a . formatter ( a . selectedTotal ) , o = a . formatter ( a . selectedSelf ) , h = 100 * a . selectedTotal / a . grandTotal , n = 100 * a . selectedSelf / a . grandTotal ; return ( 0 , l . h ) ( "div" , { className : ( 0 , e . css ) ( r . statsTable ) } , ( 0 , l . h ) ( "div" , { className : ( 0 , e . css ) ( a . cellStyle , r . statsTableCell , r . statsTableHeader ) } , a . title ) , ( 0 , l . h ) ( "div" , { className : ( 0 , e . css ) ( a . cellStyle , r . statsTableCell ) } , "Total" ) , ( 0 , l . h ) ( "div" , { className : ( 0 , e . css ) ( a . cellStyle , r . statsTableCell ) } , "Self" ) , ( 0 , l . h ) ( "div" , { className : ( 0 , e . css ) ( a . cellStyle , r . statsTableCell ) } , i ) , ( 0 , l . h ) ( "div" , { className : ( 0 , e . css ) ( a . cellStyle , r . statsTableCell ) } , o ) , ( 0 , l . h ) ( "div" , { className : ( 0 , e . css ) ( a . cellStyle , r . statsTableCell ) } , ( 0 , s . formatPercent ) ( h ) , ( 0 , l . h ) ( "div" , { className : ( 0 , e . css ) ( r . barDisplay ) , style : { height : ` ${ h } % ` } } ) ) , ( 0 , l . h ) ( "div" , { className : ( 0 , e . css ) ( a . cellStyle , r . statsTableCell ) } , ( 0 , s . formatPercent ) ( n ) , ( 0 , l . h ) ( "div" , { className : ( 0 , e . css ) ( r . barDisplay ) , style : { height : ` ${ n } % ` } } ) ) ) } function i ( s ) { const r = ( 0 , t . getFlamechartStyle ) ( ( 0 , c . useTheme ) ( ) ) , i = [ ] ; let o = s . node ; for ( ; o && ! o . isRoot ( ) ; o = o . parent ) { const t = [ ] , { frame : c } = o ; if ( t . push ( ( 0 , l . h ) ( a . ColorChit , { color : s . getFrameColor ( c ) } ) ) , i . length && t . push ( ( 0 , l . h ) ( "span" , { className : ( 0 , e . css ) ( r . stackFileLine ) } , "> " ) ) , t . push ( c . name ) , c . file ) { let s = c . file ; null != c . line && ( s += ` : ${ c . line } ` , null != c . col && ( s += ` : ${ c . col } ` ) ) , t . push ( ( 0 , l . h ) ( "span" , { className : ( 0 , e . css ) ( r . stackFileLine ) } , " (" , s , ")" ) ) } i . push ( ( 0 , l . h ) ( "div" , { className : ( 0 , e . css ) ( r . stackLine ) } , t ) ) } return ( 0 , l . h ) ( "div" , { className : ( 0 , e . css ) ( r . stackTraceView ) } , ( 0 , l . h ) ( "div" , { className : ( 0 , e . css ) ( r . stackTraceViewPadding ) } , i ) ) } function o ( s ) { const a = ( 0 , t . getFlamechartStyle ) ( ( 0 , c . useTheme ) ( ) ) , { flamechart : o , selectedNode : h } = s , { frame : n } = h ; return ( 0 , l . h ) ( "div" , { className : ( 0 , e . css ) ( a . detailView ) } , ( 0 , l . h ) ( r , { title : "This Instance" , cellStyle : a . thisInstanceCell , grandTotal : o . getTotalWeight ( ) , selectedTotal : h . getTotalWeight ( ) , selectedSelf : h . getSelfWeight ( ) , formatter : o . formatValue . bind ( o ) } ) , ( 0 , l . h ) ( r , { title : "All Instances" , cellStyle : a . allInstancesCell , grandTotal : o . getTotalWeight ( ) , selectedTotal : n . getTotalWeight ( ) , selectedSelf : n . getSelfWeight ( ) , formatter : o . formatValue . bind ( o ) } ) , ( 0 , l . h ) ( i , { node : h , getFrameColor : s . getCSSColorForFrame } ) ) }
} , { "aphrodite" : "CxN7" , "preact" : "aSor" , "./flamechart-style" : "jZ6t" , "../lib/utils" : "ucYa" , "./color-chit" : "Pua8" , "./themes/theme" : "gzKG" } ] , "e6nh" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . BatchCanvasRectRenderer = exports . BatchCanvasTextRenderer = void 0 ; class t { constructor ( ) { this . argsBatch = [ ] } text ( t ) { this . argsBatch . push ( t ) } fill ( t , e ) { if ( 0 !== this . argsBatch . length ) { t . fillStyle = e ; for ( let e of this . argsBatch ) t . fillText ( e . text , e . x , e . y ) ; this . argsBatch = [ ] } } } exports . BatchCanvasTextRenderer = t ; class e { constructor ( ) { this . argsBatch = [ ] } rect ( t ) { this . argsBatch . push ( t ) } drawPath ( t ) { t . beginPath ( ) ; for ( let e of this . argsBatch ) t . rect ( e . x , e . y , e . w , e . h ) ; t . closePath ( ) , this . argsBatch = [ ] } fill ( t , e ) { 0 !== this . argsBatch . length && ( t . fillStyle = e , this . drawPath ( t ) , t . fill ( ) ) } stroke ( t , e , s ) { 0 !== this . argsBatch . length && ( t . strokeStyle = e , t . lineWidth = s , this . drawPath ( t ) , t . stroke ( ) ) } } exports . BatchCanvasRectRenderer = e ;
} , { } ] , "e7Fh" : [ function ( require , module , exports ) {
2024-01-01 20:09:05 -05:00
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . FlamechartPanZoomView = void 0 ; var e = require ( "../lib/math" ) , t = require ( "./style" ) , i = require ( "../lib/text-utils" ) , o = require ( "./flamechart-style" ) , s = require ( "preact" ) , r = require ( "aphrodite" ) , n = require ( "../lib/canvas-2d-batch-renderers" ) , a = require ( "../lib/color" ) ; class h extends s . Component { constructor ( ) { super ( ... arguments ) , this . container = null , this . containerRef = ( e => { this . container = e || null } ) , this . overlayCanvas = null , this . overlayCtx = null , this . hoveredLabel = null , this . overlayCanvasRef = ( e => { e ? ( this . overlayCanvas = e , this . overlayCtx = this . overlayCanvas . getContext ( "2d" ) , this . renderCanvas ( ) ) : ( this . overlayCanvas = null , this . overlayCtx = null ) } ) , this . LOGICAL _VIEW _SPACE _FRAME _HEIGHT = t . Sizes . FRAME _HEIGHT , this . onWindowResize = ( ( ) => { this . updateConfigSpaceViewport ( ) , this . onBeforeFrame ( ) } ) , this . frameHadWheelEvent = ! 1 , this . framesWithoutWheelEvents = 0 , this . interactionLock = null , this . maybeClearInteractionLock = ( ( ) => { this . interactionLock && ( this . frameHadWheelEvent || ( this . framesWithoutWheelEvents ++ , this . framesWithoutWheelEvents >= 2 && ( this . interactionLock = null , this . framesWithoutWheelEvents = 0 ) ) , this . props . canvasContext . requestFrame ( ) ) , this . frameHadWheelEvent = ! 1 } ) , this . onBeforeFrame = ( ( ) => { this . resizeOverlayCanvasIfNeeded ( ) , this . renderRects ( ) , this . renderOverlays ( ) , this . maybeClearInteractionLock ( ) } ) , this . renderCanvas = ( ( ) => { this . props . canvasContext . requestFrame ( ) } ) , this . lastDragPos = null , this . mouseDownPos = null , this . onMouseDown = ( t => { this . mouseDownPos = this . lastDragPos = new e . Vec2 ( t . offsetX , t . offsetY ) , this . updateCursor ( ) , window . addEventListener ( "mouseup" , this . onWindowMouseUp ) } ) , this . onMouseDrag = ( t => { if ( ! this . lastDragPos ) return ; const i = new e . Vec2 ( t . offsetX , t . offsetY ) ; this . pan ( this . lastDragPos . minus ( i ) ) , this . lastDragPos = i , this . hoveredLabel && this . props . onNodeHover ( null ) } ) , this . onDblClick = ( t => { if ( this . hoveredLabel ) { const t = this . hoveredLabel . configSpaceBounds , i = new e . Rect ( t . origin . minus ( new e . Vec2 ( 0 , 1 ) ) , t . size . withY ( this . props . configSpaceViewportRect . height ( ) ) ) ; this . props . setConfigSpaceViewportRect ( i ) } } ) , this . onClick = ( t => { const i = new e . Vec2 ( t . offsetX , t . offsetY ) , o = this . mouseDownPos ; this . mouseDownPos = null , o && i . minus ( o ) . length ( ) > 5 || ( this . hoveredLabel ? ( this . props . onNodeSelect ( this . hoveredLabel . node ) , this . renderCanvas ( ) ) : this . props . onNodeSelect ( null ) ) } ) , this . onWindowMouseUp = ( e => { this . lastDragPos = null , this . updateCursor ( ) , window . removeEventListener ( "mouseup" , this . onWindowMouseUp ) } ) , this . onMouseMove = ( t => { if ( this . updateCursor ( ) , this . lastDragPos ) return t . preventDefault ( ) , void this . onMouseDrag ( t ) ; const i = new e . Vec2 ( t . offsetX , t . offsetY ) , o = this . logicalToPhysicalViewSpace ( ) . transformPosition ( i ) , s = this . configSpaceToPhysicalViewSpace ( ) . inverseTransformPosition ( o ) ; if ( ! s ) return ; const r = ( t , i = 0 ) => { const o = t . end - t . start , n = this . props . renderInverted ? this . configSpaceSize ( ) . y - 1 - i : i , a = new e . Rect ( new e . Vec2 ( t . start , n ) , new e . Vec2 ( o , 1 ) ) ; if ( s . x < a . left ( ) ) return null ; if ( s . x > a . right ( ) ) return null ; a . contains ( s ) && ( this . hoveredLabel = { configSpaceBounds : a , node : t . node } ) ; for ( let e of t . children ) r ( e , i + 1 ) } ; ( ( ) => { this . hoveredLabel = null } ) ( ) ; for ( let e of this . props . flamechart . getLayers ( ) [ 0 ] || [ ] ) r ( e ) ; this . hoveredLabel ? this . props . onNodeHover ( { node : this . hoveredLabel . node , event : t } ) : this . props . onNodeHover ( null ) , this . renderCanvas ( ) } ) , this . onMouseLeave = ( e => { this . hoveredLabel = null , this . props . onNodeHover ( null ) , this . renderCanvas ( ) } ) , this . onWheel = ( t => { t . preventDefault ( ) , this . frameHadWheelEvent = ! 0 ; const i = t . metaKey || t . ctrlKey ; let o = t . deltaY , s = t . deltaX ; if ( t . deltaMode === t . DOM _DELTA _LINE && ( o *= this . LOGICAL _VIEW _SPACE _FRAME _HEIGHT , s *= this . LOGICAL _VIEW _SPACE _FRAME _HEIGHT ) , i && "pan" !== this . interactionLock ) { let i = 1 + o / 100 ; t . ctrlKey && ( i = 1 + o / 40 ) , i = ( 0 , e . clamp ) ( i , . 1 , 10 ) , this . zoom ( new e . Vec2 ( t . offsetX , t . offsetY ) , i ) } else "zoom" !== this . interactionLock && this . pan ( new e . Vec2 ( s , o ) ) ; this . renderCanvas ( ) } ) , this . onWindowKeyPress = ( t => { if ( ! this . container ) return ; const { width : i , height : o } = this . container . getBoundingClientRect ( ) ; "=" === t . key || "+" === t . key ? ( this . zoom ( new e . Vec2 ( i / 2 , o / 2 ) , . 5 ) , t . preventDefault ( ) ) : "-" !== t . key && "_" !== t . key || ( this . zoom ( new e . Vec2 ( i / 2 , o / 2 ) , 2 ) , t . preventDefault ( ) ) , t . ctrlK
2022-11-09 21:39:00 -05:00
} , { "../lib/math" : "tDuZ" , "./style" : "hvr4" , "../lib/text-utils" : "eeWS" , "./flamechart-style" : "jZ6t" , "preact" : "aSor" , "aphrodite" : "CxN7" , "../lib/canvas-2d-batch-renderers" : "e6nh" , "../lib/color" : "x77Y" } ] , "PGRN" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . Hovertip = n ; var e = require ( "./style" ) , t = require ( "aphrodite" ) , i = require ( "preact" ) , o = require ( "./themes/theme" ) , r = require ( "preact/hooks" ) ; function n ( e ) { const n = a ( ( 0 , o . useTheme ) ( ) ) , { containerSize : s , offset : d } = e , h = s . x , l = s . y , p = ( 0 , r . useCallback ) ( e => { if ( ! e ) return ; const t = e . getBoundingClientRect ( ) ; let i = d . x + 7 ; i + t . width > h - 1 && ( i = h - t . width - 1 ) < 1 && ( i = 1 ) , e . style . left = ` ${ i } px ` ; let o = d . y + 7 ; o + t . height > l - 1 && ( o = d . y - t . height - 1 ) < 1 && ( o = 1 ) , e . style . top = ` ${ o } px ` } , [ h , l , d . x , d . y ] ) ; return ( 0 , i . h ) ( "div" , { className : ( 0 , t . css ) ( n . hoverTip ) , ref : p } , ( 0 , i . h ) ( "div" , { className : ( 0 , t . css ) ( n . hoverTipRow ) } , e . children ) ) } const s = 2 , a = ( 0 , o . withTheme ) ( i => t . StyleSheet . create ( { hoverTip : { position : "absolute" , background : i . bgPrimaryColor , border : "1px solid black" , maxWidth : e . Sizes . TOOLTIP _WIDTH _MAX , paddingTop : 2 , paddingBottom : 2 , pointerEvents : "none" , userSelect : "none" , fontSize : e . FontSize . LABEL , fontFamily : e . FontFamily . MONOSPACE , zIndex : e . ZIndex . HOVERTIP } , hoverTipRow : { textOverflow : "ellipsis" , whiteSpace : "nowrap" , overflowX : "hidden" , paddingLeft : 2 , paddingRight : 2 , maxWidth : e . Sizes . TOOLTIP _WIDTH _MAX } } ) ) ;
} , { "./style" : "hvr4" , "aphrodite" : "CxN7" , "preact" : "aSor" , "./themes/theme" : "gzKG" , "preact/hooks" : "MwGB" } ] , "zsRf" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . FlamechartSearchView = exports . FlamechartSearchContextProvider = exports . FlamechartSearchContext = void 0 ; var e = require ( "preact/compat" ) , t = require ( "preact/hooks" ) , l = require ( "./search-view" ) , r = require ( "../lib/profile-search" ) , c = require ( "../lib/math" ) , n = require ( "preact" ) ; const o = ( 0 , n . createContext ) ( null ) ; exports . FlamechartSearchContext = o ; const u = ( { flamechart : e , selectedNode : c , setSelectedNode : u , configSpaceViewportRect : a , setConfigSpaceViewportRect : s , children : i } ) => { const p = ( 0 , t . useContext ) ( l . ProfileSearchContext ) , h = ( 0 , t . useMemo ) ( ( ) => null == p ? null : new r . FlamechartSearchResults ( e , p ) , [ e , p ] ) ; return ( 0 , n . h ) ( o . Provider , { value : { results : h , flamechart : e , selectedNode : c , setSelectedNode : u , configSpaceViewportRect : a , setConfigSpaceViewportRect : s } } , i ) } ; exports . FlamechartSearchContextProvider = u ; const a = ( 0 , e . memo ) ( ( ) => { const e = ( 0 , t . useContext ) ( o ) , r = null == e ? null : e . results , u = null == e ? null : e . selectedNode , a = null == e ? null : e . setSelectedNode , s = null == e ? null : e . configSpaceViewportRect , i = null == e ? null : e . setConfigSpaceViewportRect , p = null == e ? null : e . flamechart , h = null == r ? null : r . count ( ) , d = ( 0 , t . useMemo ) ( ( ) => null == r ? null : null == u ? null : r . indexOf ( u ) , [ r , u ] ) , f = ( 0 , t . useCallback ) ( e => { if ( ! a ) return ; if ( ! p ) return ; if ( ! s ) return ; if ( ! i ) return ; const t = e . configSpaceBounds , l = new c . Rect ( t . origin . minus ( new c . Vec2 ( 0 , 1 ) ) , t . size . withY ( s . height ( ) ) ) ; a ( e . node ) , i ( p . getClampedConfigSpaceViewportRect ( { configSpaceViewportRect : l } ) ) } , [ s , i , a , p ] ) , { selectPrev : x , selectNext : S } = ( 0 , t . useMemo ) ( ( ) => null == h || 0 === h || null == r ? { selectPrev : ( ) => { } , selectNext : ( ) => { } } : { selectPrev : ( ) => { if ( ! ( null == r ? void 0 : r . at ) ) return ; if ( null == h || 0 === h ) return ; let e = null == d ? h - 1 : d - 1 ; e < 0 && ( e = h - 1 ) ; const t = r . at ( e ) ; f ( t ) } , selectNext : ( ) => { if ( ! ( null == r ? void 0 : r . at ) ) return ; if ( null == h || 0 === h ) return ; let e = null == d ? 0 : d + 1 ; e >= h && ( e = 0 ) ; const t = r . at ( e ) ; f ( t ) } } , [ h , d , r , f ] ) ; return ( 0 , n . h ) ( l . SearchView , { resultIndex : d , numResults : h , selectPrev : x , selectNext : S } ) } ) ; exports . FlamechartSearchView = a ;
} , { "preact/compat" : "AQ6k" , "preact/hooks" : "MwGB" , "./search-view" : "t9CM" , "../lib/profile-search" : "DHvC" , "../lib/math" : "tDuZ" , "preact" : "aSor" } ] , "Hete" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . StatelessComponent = void 0 ; var e = require ( "preact" ) ; class t extends e . Component { } exports . StatelessComponent = t ;
} , { "preact" : "aSor" } ] , "Z2mP" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . FlamechartView = void 0 ; var e = require ( "preact" ) , t = require ( "aphrodite" ) , r = require ( "../lib/math" ) , i = require ( "../lib/utils" ) , o = require ( "./flamechart-minimap-view" ) , s = require ( "./style" ) , a = require ( "./flamechart-detail-view" ) , c = require ( "./flamechart-pan-zoom-view" ) , p = require ( "./hovertip" ) , h = require ( "./search-view" ) , n = require ( "./flamechart-search-view" ) , l = require ( "./flamechart-style" ) , m = require ( "../lib/preact-helpers" ) ; class f extends m . StatelessComponent { constructor ( ) { super ( ... arguments ) , this . setConfigSpaceViewportRect = ( e => { const t = s . Sizes . DETAIL _VIEW _HEIGHT / s . Sizes . FRAME _HEIGHT , i = this . configSpaceSize ( ) , o = this . props . flamechart . getClampedViewportWidth ( e . size . x ) , a = e . size . withX ( o ) , c = r . Vec2 . clamp ( e . origin , new r . Vec2 ( 0 , - 1 ) , r . Vec2 . max ( r . Vec2 . zero , i . minus ( a ) . plus ( new r . Vec2 ( 0 , t + 1 ) ) ) ) ; this . props . setConfigSpaceViewportRect ( new r . Rect ( c , e . size . withX ( o ) ) ) } ) , this . setLogicalSpaceViewportSize = ( e => { this . props . setLogicalSpaceViewportSize ( e ) } ) , this . transformViewport = ( e => { const t = e . transformRect ( this . props . configSpaceViewportRect ) ; this . setConfigSpaceViewportRect ( t ) } ) , this . onNodeHover = ( e => { this . props . setNodeHover ( e ) } ) , this . onNodeClick = ( e => { this . props . setSelectedNode ( e ) } ) , this . container = null , this . containerRef = ( e => { this . container = e || null } ) } getStyle ( ) { return ( 0 , l . getFlamechartStyle ) ( this . props . theme ) } configSpaceSize ( ) { return new r . Vec2 ( this . props . flamechart . getTotalWeight ( ) , this . props . flamechart . getLayers ( ) . length ) } formatValue ( e ) { const t = 100 * e / this . props . flamechart . getTotalWeight ( ) , r = ( 0 , i . formatPercent ) ( t ) ; return ` ${ this . props . flamechart . formatValue ( e ) } ( ${ r } ) ` } renderTooltip ( ) { if ( ! this . container ) return null ; const { hover : i } = this . props ; if ( ! i ) return null ; const { width : o , height : s , left : a , top : c } = this . container . getBoundingClientRect ( ) , h = new r . Vec2 ( i . event . clientX - a , i . event . clientY - c ) , n = i . node . frame , l = this . getStyle ( ) ; return ( 0 , e . h ) ( p . Hovertip , { containerSize : new r . Vec2 ( o , s ) , offset : h } , ( 0 , e . h ) ( "span" , { className : ( 0 , t . css ) ( l . hoverCount ) } , this . formatValue ( i . node . getTotalWeight ( ) ) ) , " " , n . name , n . file ? ( 0 , e . h ) ( "div" , null , n . file , ":" , n . line ) : void 0 ) } render ( ) { const r = this . getStyle ( ) ; return ( 0 , e . h ) ( "div" , { className : ( 0 , t . css ) ( r . fill , s . commonStyle . vbox ) , ref : this . containerRef } , ( 0 , e . h ) ( o . FlamechartMinimapView , { theme : this . props . theme , configSpaceViewportRect : this . props . configSpaceViewportRect , transformViewport : this . transformViewport , flamechart : this . props . flamechart , flamechartRenderer : this . props . flamechartRenderer , canvasContext : this . props . canvasContext , setConfigSpaceViewportRect : this . setConfigSpaceViewportRect } ) , ( 0 , e . h ) ( h . ProfileSearchContext . Consumer , null , t => ( 0 , e . h ) ( e . Fragment , null , ( 0 , e . h ) ( c . FlamechartPanZoomView , { theme : this . props . theme , canvasContext : this . props . canvasContext , flamechart : this . props . flamechart , flamechartRenderer : this . props . flamechartRenderer , renderInverted : ! 1 , onNodeHover : this . onNodeHover , onNodeSelect : this . onNodeClick , selectedNode : this . props . selectedNode , transformViewport : this . transformViewport , configSpaceViewportRect : this . props . configSpaceViewportRect , setConfigSpaceViewportRect : this . setConfigSpaceViewportRect , logicalSpaceViewportSize : this . props . logicalSpaceViewportSize , setLogicalSpaceViewportSize : this . setLogicalSpaceViewportSize , searchResults : t } ) , ( 0 , e . h ) ( n . FlamechartSearchView , null ) ) ) , this . renderTooltip ( ) , this . props . selectedNode && ( 0 , e . h ) ( a . FlamechartDetailView , { flamechart : this . props . flamechart , getCSSColorForFrame : this . props . getCSSColorForFrame , selectedNode : this . props . selectedNode } ) ) } } exports . FlamechartView = f ;
} , { "preact" : "aSor" , "aphrodite" : "CxN7" , "../lib/math" : "tDuZ" , "../lib/utils" : "ucYa" , "./flamechart-minimap-view" : "S7z0" , "./style" : "hvr4" , "./flamechart-detail-view" : "uohB" , "./flamechart-pan-zoom-view" : "e7Fh" , "./hovertip" : "PGRN" , "./search-view" : "t9CM" , "./flamechart-search-view" : "zsRf" , "./flamechart-style" : "jZ6t" , "../lib/preact-helpers" : "Hete" } ] , "PJJu" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . useFlamechartSetters = h , exports . LeftHeavyFlamechartView = exports . getLeftHeavyFlamechart = exports . ChronoFlamechartView = exports . createMemoizedFlamechartRenderer = exports . getChronoViewFlamechart = void 0 ; var e = require ( "preact" ) , t = require ( "../lib/flamechart" ) , r = require ( "../gl/flamechart-renderer" ) , a = require ( "../lib/utils" ) , o = require ( "./flamechart-view" ) , c = require ( "../app-state/getters" ) , l = require ( "preact/compat" ) , i = require ( "./flamechart-search-view" ) , m = require ( "./themes/theme" ) , s = require ( "../app-state/profile-group" ) , n = require ( "../app-state" ) ; function h ( e ) { return { setNodeHover : ( 0 , l . useCallback ) ( t => { n . profileGroupAtom . setFlamechartHoveredNode ( e , t ) } , [ e ] ) , setLogicalSpaceViewportSize : ( 0 , l . useCallback ) ( t => { n . profileGroupAtom . setLogicalSpaceViewportSize ( e , t ) } , [ e ] ) , setConfigSpaceViewportRect : ( 0 , l . useCallback ) ( t => { n . profileGroupAtom . setConfigSpaceViewportRect ( e , t ) } , [ e ] ) , setSelectedNode : ( 0 , l . useCallback ) ( t => { n . profileGroupAtom . setSelectedNode ( e , t ) } , [ e ] ) } } const p = ( 0 , a . memoizeByShallowEquality ) ( ( { profile : e , getColorBucketForFrame : r } ) => new t . Flamechart ( { getTotalWeight : e . getTotalWeight . bind ( e ) , forEachCall : e . forEachCall . bind ( e ) , formatValue : e . formatValue . bind ( e ) , getColorBucketForFrame : r } ) ) ; exports . getChronoViewFlamechart = p ; const f = e => ( 0 , a . memoizeByShallowEquality ) ( ( { canvasContext : t , flamechart : a } ) => new r . FlamechartRenderer ( t . gl , ( 0 , c . getRowAtlas ) ( t ) , a , t . rectangleBatchRenderer , t . flamechartColorPassRenderer , e ) ) ; exports . createMemoizedFlamechartRenderer = f ; const C = f ( ) , u = ( 0 , l . memo ) ( t => { const { activeProfileState : r , glCanvas : a } = t , { profile : l , chronoViewState : n } = r , f = ( 0 , m . useTheme ) ( ) , u = ( 0 , c . getCanvasContext ) ( { theme : f , canvas : a } ) , d = ( 0 , c . getFrameToColorBucket ) ( l ) , F = ( 0 , c . createGetColorBucketForFrame ) ( d ) , g = ( 0 , c . createGetCSSColorForFrame ) ( { theme : f , frameToColorBucket : d } ) , S = p ( { profile : l , getColorBucketForFrame : F } ) , w = C ( { canvasContext : u , flamechart : S } ) , v = h ( s . FlamechartID . CHRONO ) ; return ( 0 , e . h ) ( i . FlamechartSearchContextProvider , { flamechart : S , selectedNode : n . selectedNode , setSelectedNode : v . setSelectedNode , configSpaceViewportRect : n . configSpaceViewportRect , setConfigSpaceViewportRect : v . setConfigSpaceViewportRect } , ( 0 , e . h ) ( o . FlamechartView , Object . assign ( { theme : f , renderInverted : ! 1 , flamechart : S , flamechartRenderer : w , canvasContext : u , getCSSColorForFrame : g } , n , v ) ) ) } ) ; exports . ChronoFlamechartView = u ; const d = ( 0 , a . memoizeByShallowEquality ) ( ( { profile : e , getColorBucketForFrame : r } ) => new t . Flamechart ( { getTotalWeight : e . getTotalNonIdleWeight . bind ( e ) , forEachCall : e . forEachCallGrouped . bind ( e ) , formatValue : e . formatValue . bind ( e ) , getColorBucketForFrame : r } ) ) ; exports . getLeftHeavyFlamechart = d ; const F = f ( ) , g = ( 0 , l . memo ) ( t => { const { activeProfileState : r , glCanvas : a } = t , { profile : l , leftHeavyViewState : n } = r , p = ( 0 , m . useTheme ) ( ) , f = ( 0 , c . getCanvasContext ) ( { theme : p , canvas : a } ) , C = ( 0 , c . getFrameToColorBucket ) ( l ) , u = ( 0 , c . createGetColorBucketForFrame ) ( C ) , g = ( 0 , c . createGetCSSColorForFrame ) ( { theme : p , frameToColorBucket : C } ) , S = d ( { profile : l , getColorBucketForFrame : u } ) , w = F ( { canvasContext : f , flamechart : S } ) , v = h ( s . FlamechartID . LEFT _HEAVY ) ; return ( 0 , e . h ) ( i . FlamechartSearchContextProvider , { flamechart : S , selectedNode : n . selectedNode , setSelectedNode : v . setSelectedNode , configSpaceViewportRect : n . configSpaceViewportRect , setConfigSpaceViewportRect : v . setConfigSpaceViewportRect } , ( 0 , e . h ) ( o . FlamechartView , Object . assign ( { theme : p , renderInverted : ! 1 , flamechart : S , flamechartRenderer : w , canvasContext : f , getCSSColorForFrame : g } , n , v ) ) ) } ) ; exports . LeftHeavyFlamechartView = g ;
} , { "preact" : "aSor" , "../lib/flamechart" : "gFMr" , "../gl/flamechart-renderer" : "P80v" , "../lib/utils" : "ucYa" , "./flamechart-view" : "Z2mP" , "../app-state/getters" : "zEXv" , "preact/compat" : "AQ6k" , "./flamechart-search-view" : "zsRf" , "./themes/theme" : "gzKG" , "../app-state/profile-group" : "uxXA" , "../app-state" : "LDQe" } ] , "MXNL" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . getStyle = exports . FlamechartWrapper = void 0 ; var e = require ( "aphrodite" ) , t = require ( "preact" ) , r = require ( "./style" ) , o = require ( "../lib/math" ) , i = require ( "./flamechart-pan-zoom-view" ) , s = require ( "../lib/utils" ) , p = require ( "./hovertip" ) , a = require ( "./themes/theme" ) , n = require ( "../lib/preact-helpers" ) ; class c extends n . StatelessComponent { constructor ( ) { super ( ... arguments ) , this . setConfigSpaceViewportRect = ( e => { this . props . setConfigSpaceViewportRect ( this . clampViewportToFlamegraph ( e ) ) } ) , this . setLogicalSpaceViewportSize = ( e => { this . props . setLogicalSpaceViewportSize ( e ) } ) , this . transformViewport = ( e => { this . setConfigSpaceViewportRect ( e . transformRect ( this . props . configSpaceViewportRect ) ) } ) , this . container = null , this . containerRef = ( e => { this . container = e || null } ) , this . setNodeHover = ( e => { this . props . setNodeHover ( e ) } ) } clampViewportToFlamegraph ( e ) { const { flamechart : t , renderInverted : r } = this . props ; return t . getClampedConfigSpaceViewportRect ( { configSpaceViewportRect : e , renderInverted : r } ) } formatValue ( e ) { const t = 100 * e / this . props . flamechart . getTotalWeight ( ) , r = ( 0 , s . formatPercent ) ( t ) ; return ` ${ this . props . flamechart . formatValue ( e ) } ( ${ r } ) ` } renderTooltip ( ) { if ( ! this . container ) return null ; const { hover : r } = this . props ; if ( ! r ) return null ; const { width : i , height : s , left : a , top : n } = this . container . getBoundingClientRect ( ) , c = new o . Vec2 ( r . event . clientX - a , r . event . clientY - n ) , h = l ( this . props . theme ) , m = r . node . frame ; return ( 0 , t . h ) ( p . Hovertip , { containerSize : new o . Vec2 ( i , s ) , offset : c } , ( 0 , t . h ) ( "span" , { className : ( 0 , e . css ) ( h . hoverCount ) } , this . formatValue ( r . node . getTotalWeight ( ) ) ) , " " , m . name , m . file ? ( 0 , t . h ) ( "div" , null , m . file , ":" , m . line ) : void 0 ) } render ( ) { return ( 0 , t . h ) ( "div" , { className : ( 0 , e . css ) ( r . commonStyle . fillY , r . commonStyle . fillX , r . commonStyle . vbox ) , ref : this . containerRef } , ( 0 , t . h ) ( i . FlamechartPanZoomView , { theme : this . props . theme , selectedNode : null , onNodeHover : this . setNodeHover , onNodeSelect : s . noop , configSpaceViewportRect : this . props . configSpaceViewportRect , setConfigSpaceViewportRect : this . setConfigSpaceViewportRect , transformViewport : this . transformViewport , flamechart : this . props . flamechart , flamechartRenderer : this . props . flamechartRenderer , canvasContext : this . props . canvasContext , renderInverted : this . props . renderInverted , logicalSpaceViewportSize : this . props . logicalSpaceViewportSize , setLogicalSpaceViewportSize : this . setLogicalSpaceViewportSize , searchResults : null } ) , this . renderTooltip ( ) ) } } exports . FlamechartWrapper = c ; const l = ( 0 , a . withTheme ) ( t => e . StyleSheet . create ( { hoverCount : { color : t . weightColor } } ) ) ; exports . getStyle = l ;
} , { "aphrodite" : "CxN7" , "preact" : "aSor" , "./style" : "hvr4" , "../lib/math" : "tDuZ" , "./flamechart-pan-zoom-view" : "e7Fh" , "../lib/utils" : "ucYa" , "./hovertip" : "PGRN" , "./themes/theme" : "gzKG" , "../lib/preact-helpers" : "Hete" } ] , "Cw7z" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . InvertedCallerFlamegraphView = void 0 ; var e = require ( "../lib/utils" ) , r = require ( "../lib/flamechart" ) , t = require ( "./flamechart-view-container" ) , a = require ( "../app-state/getters" ) , o = require ( "./flamechart-wrapper" ) , l = require ( "preact" ) , i = require ( "preact/compat" ) , n = require ( "./themes/theme" ) , m = require ( "../app-state/profile-group" ) , c = require ( "../app-state" ) , s = require ( "../lib/atom" ) ; const u = ( 0 , e . memoizeByShallowEquality ) ( ( { profile : e , frame : r , flattenRecursion : t } ) => { let a = e . getInvertedProfileForCallersOf ( r ) ; return t ? a . getProfileWithRecursionFlattened ( ) : a } ) , h = ( 0 , e . memoizeByShallowEquality ) ( ( { invertedCallerProfile : e , getColorBucketForFrame : t } ) => new r . Flamechart ( { getTotalWeight : e . getTotalNonIdleWeight . bind ( e ) , forEachCall : e . forEachCallGrouped . bind ( e ) , formatValue : e . formatValue . bind ( e ) , getColorBucketForFrame : t } ) ) , f = ( 0 , t . createMemoizedFlamechartRenderer ) ( { inverted : ! 0 } ) , p = ( 0 , i . memo ) ( r => { const { activeProfileState : i } = r ; let { profile : p , sandwichViewState : C } = i ; const d = ( 0 , s . useAtom ) ( c . flattenRecursionAtom ) , F = ( 0 , s . useAtom ) ( c . glCanvasAtom ) , g = ( 0 , n . useTheme ) ( ) ; if ( ! p ) throw new Error ( "profile missing" ) ; if ( ! F ) throw new Error ( "glCanvas missing" ) ; const { callerCallee : v } = C ; if ( ! v ) throw new Error ( "callerCallee missing" ) ; const { selectedFrame : w } = v , q = ( 0 , a . getFrameToColorBucket ) ( p ) , S = ( 0 , a . createGetColorBucketForFrame ) ( q ) , E = ( 0 , a . createGetCSSColorForFrame ) ( { theme : g , frameToColorBucket : q } ) , b = ( 0 , a . getCanvasContext ) ( { theme : g , canvas : F } ) , B = h ( { invertedCallerProfile : u ( { profile : p , frame : w , flattenRecursion : d } ) , getColorBucketForFrame : S } ) , I = f ( { canvasContext : b , flamechart : B } ) ; return ( 0 , l . h ) ( o . FlamechartWrapper , Object . assign ( { theme : g , renderInverted : ! 0 , flamechart : B , flamechartRenderer : I , canvasContext : b , getCSSColorForFrame : E } , ( 0 , t . useFlamechartSetters ) ( m . FlamechartID . SANDWICH _INVERTED _CALLERS ) , v . invertedCallerFlamegraph , { setSelectedNode : e . noop } ) ) } ) ; exports . InvertedCallerFlamegraphView = p ;
} , { "../lib/utils" : "ucYa" , "../lib/flamechart" : "gFMr" , "./flamechart-view-container" : "PJJu" , "../app-state/getters" : "zEXv" , "./flamechart-wrapper" : "MXNL" , "preact" : "aSor" , "preact/compat" : "AQ6k" , "./themes/theme" : "gzKG" , "../app-state/profile-group" : "uxXA" , "../app-state" : "LDQe" , "../lib/atom" : "QkVE" } ] , "KT37" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . CalleeFlamegraphView = void 0 ; var e = require ( "../lib/utils" ) , r = require ( "../lib/flamechart" ) , t = require ( "./flamechart-view-container" ) , a = require ( "../app-state/getters" ) , o = require ( "./flamechart-wrapper" ) , l = require ( "preact" ) , i = require ( "preact/compat" ) , c = require ( "./themes/theme" ) , m = require ( "../app-state/profile-group" ) , n = require ( "../app-state" ) , s = require ( "../lib/atom" ) ; const u = ( 0 , e . memoizeByShallowEquality ) ( ( { profile : e , frame : r , flattenRecursion : t } ) => { let a = e . getProfileForCalleesOf ( r ) ; return t ? a . getProfileWithRecursionFlattened ( ) : a } ) , h = ( 0 , e . memoizeByShallowEquality ) ( ( { calleeProfile : e , getColorBucketForFrame : t } ) => new r . Flamechart ( { getTotalWeight : e . getTotalNonIdleWeight . bind ( e ) , forEachCall : e . forEachCallGrouped . bind ( e ) , formatValue : e . formatValue . bind ( e ) , getColorBucketForFrame : t } ) ) , f = ( 0 , t . createMemoizedFlamechartRenderer ) ( ) , p = ( 0 , i . memo ) ( r => { const { activeProfileState : i } = r , { profile : p , sandwichViewState : C } = i , F = ( 0 , s . useAtom ) ( n . flattenRecursionAtom ) , g = ( 0 , s . useAtom ) ( n . glCanvasAtom ) , d = ( 0 , c . useTheme ) ( ) ; if ( ! p ) throw new Error ( "profile missing" ) ; if ( ! g ) throw new Error ( "glCanvas missing" ) ; const { callerCallee : w } = C ; if ( ! w ) throw new Error ( "callerCallee missing" ) ; const { selectedFrame : q } = w , v = ( 0 , a . getFrameToColorBucket ) ( p ) , S = ( 0 , a . createGetColorBucketForFrame ) ( v ) , E = ( 0 , a . createGetCSSColorForFrame ) ( { theme : d , frameToColorBucket : v } ) , b = ( 0 , a . getCanvasContext ) ( { theme : d , canvas : g } ) , B = h ( { calleeProfile : u ( { profile : p , frame : q , flattenRecursion : F } ) , getColorBucketForFrame : S } ) , k = f ( { canvasContext : b , flamechart : B } ) ; return ( 0 , l . h ) ( o . FlamechartWrapper , Object . assign ( { theme : d , renderInverted : ! 1 , flamechart : B , flamechartRenderer : k , canvasContext : b , getCSSColorForFrame : E } , ( 0 , t . useFlamechartSetters ) ( m . FlamechartID . SANDWICH _CALLEES ) , w . calleeFlamegraph , { setSelectedNode : e . noop } ) ) } ) ; exports . CalleeFlamegraphView = p ;
} , { "../lib/utils" : "ucYa" , "../lib/flamechart" : "gFMr" , "./flamechart-view-container" : "PJJu" , "../app-state/getters" : "zEXv" , "./flamechart-wrapper" : "MXNL" , "preact" : "aSor" , "preact/compat" : "AQ6k" , "./themes/theme" : "gzKG" , "../app-state/profile-group" : "uxXA" , "../app-state" : "LDQe" , "../lib/atom" : "QkVE" } ] , "cWm7" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . SandwichSearchView = void 0 ; var e = require ( "preact/compat" ) , l = require ( "preact/hooks" ) , t = require ( "./search-view" ) , r = require ( "preact" ) , s = require ( "./sandwich-view" ) ; const c = ( 0 , e . memo ) ( ( ) => { const e = ( 0 , l . useContext ) ( s . SandwichViewContext ) , c = null != e ? e . rowList : null , n = null != ( null == e ? void 0 : e . selectedFrame ) ? e . getIndexForFrame ( e . selectedFrame ) : null , u = null != c ? c . length : null , { selectPrev : i , selectNext : a } = ( 0 , l . useMemo ) ( ( ) => null == c || null == u || 0 === u || null == e ? { selectPrev : ( ) => { } , selectNext : ( ) => { } } : { selectPrev : ( ) => { let l = null == n ? u - 1 : n - 1 ; l < 0 && ( l = u - 1 ) , e . setSelectedFrame ( c [ l ] ) } , selectNext : ( ) => { let l = null == n ? 0 : n + 1 ; l >= u && ( l = 0 ) , e . setSelectedFrame ( c [ l ] ) } } , [ n , c , u , e ] ) ; return ( 0 , r . h ) ( t . SearchView , { resultIndex : n , numResults : u , selectPrev : i , selectNext : a } ) } ) ; exports . SandwichSearchView = c ;
} , { "preact/compat" : "AQ6k" , "preact/hooks" : "MwGB" , "./search-view" : "t9CM" , "preact" : "aSor" , "./sandwich-view" : "L8J2" } ] , "L8J2" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . SandwichViewContainer = exports . SandwichViewContext = void 0 ; var e = require ( "aphrodite" ) , t = require ( "./profile-table-view" ) , r = require ( "preact" ) , a = require ( "preact/compat" ) , l = require ( "preact/hooks" ) , o = require ( "./style" ) , s = require ( "./inverted-caller-flamegraph-view" ) , i = require ( "./callee-flamegraph-view" ) , n = require ( "./sandwich-search-view" ) , c = require ( "../lib/utils" ) , h = require ( "./search-view" ) , m = require ( "./themes/theme" ) , d = require ( "../app-state" ) , p = require ( "../lib/atom" ) , f = require ( "../lib/preact-helpers" ) ; class u extends f . StatelessComponent { constructor ( ) { super ( ... arguments ) , this . setSelectedFrame = ( e => { this . props . setSelectedFrame ( e ) } ) , this . onWindowKeyPress = ( e => { "Escape" === e . key && this . setSelectedFrame ( null ) } ) } componentDidMount ( ) { window . addEventListener ( "keydown" , this . onWindowKeyPress ) } componentWillUnmount ( ) { window . removeEventListener ( "keydown" , this . onWindowKeyPress ) } render ( ) { const a = S ( this . props . theme ) , { selectedFrame : l } = this . props ; let c = null ; return l && ( c = ( 0 , r . h ) ( "div" , { className : ( 0 , e . css ) ( o . commonStyle . fillY , a . callersAndCallees , o . commonStyle . vbox ) } , ( 0 , r . h ) ( "div" , { className : ( 0 , e . css ) ( o . commonStyle . hbox , a . panZoomViewWraper ) } , ( 0 , r . h ) ( "div" , { className : ( 0 , e . css ) ( a . flamechartLabelParent ) } , ( 0 , r . h ) ( "div" , { className : ( 0 , e . css ) ( a . flamechartLabel ) } , "Callers" ) ) , ( 0 , r . h ) ( s . InvertedCallerFlamegraphView , { glCanvas : this . props . glCanvas , activeProfileState : this . props . activeProfileState } ) ) , ( 0 , r . h ) ( "div" , { className : ( 0 , e . css ) ( a . divider ) } ) , ( 0 , r . h ) ( "div" , { className : ( 0 , e . css ) ( o . commonStyle . hbox , a . panZoomViewWraper ) } , ( 0 , r . h ) ( "div" , { className : ( 0 , e . css ) ( a . flamechartLabelParent , a . flamechartLabelParentBottom ) } , ( 0 , r . h ) ( "div" , { className : ( 0 , e . css ) ( a . flamechartLabel , a . flamechartLabelBottom ) } , "Callees" ) ) , ( 0 , r . h ) ( i . CalleeFlamegraphView , { glCanvas : this . props . glCanvas , activeProfileState : this . props . activeProfileState } ) ) ) ) , ( 0 , r . h ) ( "div" , { className : ( 0 , e . css ) ( o . commonStyle . hbox , o . commonStyle . fillY ) } , ( 0 , r . h ) ( "div" , { className : ( 0 , e . css ) ( a . tableView ) } , ( 0 , r . h ) ( t . ProfileTableViewContainer , { activeProfileState : this . props . activeProfileState } ) , ( 0 , r . h ) ( n . SandwichSearchView , null ) ) , c ) } } const S = ( 0 , m . withTheme ) ( t => e . StyleSheet . create ( { tableView : { position : "relative" , flex : 1 } , panZoomViewWraper : { flex : 1 } , flamechartLabelParent : { display : "flex" , flexDirection : "column" , justifyContent : "flex-end" , alignItems : "flex-start" , fontSize : o . FontSize . TITLE , width : 1.2 * o . FontSize . TITLE , borderRight : ` 1px solid ${ t . fgSecondaryColor } ` } , flamechartLabelParentBottom : { justifyContent : "flex-start" } , flamechartLabel : { transform : "rotate(-90deg)" , transformOrigin : "50% 50% 0" , width : 1.2 * o . FontSize . TITLE , flexShrink : 1 } , flamechartLabelBottom : { transform : "rotate(-90deg)" , display : "flex" , justifyContent : "flex-end" } , callersAndCallees : { flex : 1 , borderLeft : ` ${ o . Sizes . SEPARATOR _HEIGHT } px solid ${ t . fgSecondaryColor } ` } , divider : { height : 2 , background : t . fgSecondaryColor } } ) ) , v = ( 0 , r . createContext ) ( null ) ; exports . SandwichViewContext = v ; const w = ( 0 , a . memo ) ( e => { const { activeProfileState : t , glCanvas : a } = e , { sandwichViewState : o , index : s } = t , { callerCallee : i } = o , n = ( 0 , m . useTheme ) ( ) , f = ( 0 , l . useCallback ) ( e => { d . profileGroupAtom . setSelectedFrame ( e ) } , [ ] ) , S = t . profile , w = ( 0 , p . useAtom ) ( d . tableSortMethodAtom ) , x = ( 0 , l . useContext ) ( h . ProfileSearchContext ) , C = i ? i . selectedFrame : null , g = ( 0 , l . useMemo ) ( ( ) => { const e = [ ] ; switch ( S . forEachFrame ( t => { x && ! x . getMatchForFrame ( t ) || e . push ( t ) } ) , w . field ) { case d . SortField . SYMBOL _NAME : ( 0 , c . sortBy ) ( e , e => e . name . toLowerCase ( ) ) ; break ; case d . SortField . SELF : ( 0 , c . sortBy ) ( e , e => e . getSelfWeight ( ) ) ; break ; case d . SortField . TOTAL : ( 0 , c . sortBy ) ( e , e => e . getTotalWeight ( ) ) } return w . direction === d . SortDirection . DESCENDING && e . reverse ( ) , e } , [ S , x , w ] ) , b = ( 0 , l . useMemo ) ( ( ) => { const e = new Map ; for ( let t = 0 ; t < g . length ; t ++ ) e . set ( g [ t ] , t ) ; return t => { const r = e . get ( t ) ; return null == r ? null : r } } , [ g ] ) , F = ( 0 , l . useMemo ) ( ( ) => e => null == x ? null : x . getMatchForFrame ( e ) , [ x ] ) , y = { rowList : g , selectedFrame : C , setSelectedFrame : f , getIndexForFrame : b , getSearchMatchForFrame : F } ; return ( 0 , r . h ) ( v . Provider , { value : y } , ( 0 , r . h ) ( u , { theme : n , activeProfileState : t , glCanvas : a , setSelectedFrame : f , selectedFrame : C , profileIndex : s } ) ) } ) ; exports . SandwichViewContainer = w ;
} , { "aphrodite" : "CxN7" , "./profile-table-view" : "Ivh5" , "preact" : "aSor" , "preact/compat" : "AQ6k" , "preact/hooks" : "MwGB" , "./style" : "hvr4" , "./inverted-caller-flamegraph-view" : "Cw7z" , "./callee-flamegraph-view" : "KT37" , "./sandwich-search-view" : "cWm7" , "../lib/utils" : "ucYa" , "./search-view" : "t9CM" , "./themes/theme" : "gzKG" , "../app-state" : "LDQe" , "../lib/atom" : "QkVE" , "../lib/preact-helpers" : "Hete" } ] , "LsM4" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . ByteFormatter = exports . TimeFormatter = exports . RawValueFormatter = void 0 ; var t = require ( "./utils" ) ; class e { constructor ( ) { this . unit = "none" } format ( t ) { return t . toLocaleString ( ) } } exports . RawValueFormatter = e ; class r { constructor ( t ) { this . unit = t , this . multiplier = "nanoseconds" === t ? 1e-9 : "microseconds" === t ? 1e-6 : "milliseconds" === t ? . 001 : 1 } formatUnsigned ( e ) { const r = e * this . multiplier ; if ( r / 60 >= 1 ) { const e = Math . floor ( r / 60 ) , o = Math . floor ( r - 60 * e ) . toString ( ) ; return ` ${ e } : ${ ( 0 , t . zeroPad ) ( o , 2 ) } ` } return r / 1 >= 1 ? ` ${ r . toFixed ( 2 ) } s ` : r / . 001 >= 1 ? ` ${ ( r / . 001 ) . toFixed ( 2 ) } ms ` : r / 1e-6 >= 1 ? ` ${ ( r / 1e-6 ) . toFixed ( 2 ) } µs ` : ` ${ ( r / 1e-9 ) . toFixed ( 2 ) } ns ` } format ( t ) { return ` ${ t < 0 ? "-" : "" } ${ this . formatUnsigned ( Math . abs ( t ) ) } ` } } exports . TimeFormatter = r ; class o { constructor ( ) { this . unit = "bytes" } format ( t ) { return t < 1024 ? ` ${ t . toFixed ( 0 ) } B ` : ( t /= 1024 ) < 1024 ? ` ${ t . toFixed ( 2 ) } KB ` : ( t /= 1024 ) < 1024 ? ` ${ t . toFixed ( 2 ) } MB ` : ` ${ ( t /= 1024 ) . toFixed ( 2 ) } GB ` } } exports . ByteFormatter = o ;
} , { "./utils" : "ucYa" } ] , "FheM" : [ function ( require , module , exports ) {
var t = null ; function e ( ) { return t || ( t = n ( ) ) , t } function n ( ) { try { throw new Error } catch ( e ) { var t = ( "" + e . stack ) . match ( /(https?|file|ftp|chrome-extension|moz-extension):\/\/[^)\n]+/g ) ; if ( t ) return r ( t [ 0 ] ) } return "/" } function r ( t ) { return ( "" + t ) . replace ( /^((?:https?|file|ftp|chrome-extension|moz-extension):\/\/.+)\/[^/]+$/ , "$1" ) + "/" } exports . getBundleURL = e , exports . getBaseURL = r ;
} , { } ] , "TUK3" : [ function ( require , module , exports ) {
var r = require ( "./bundle-url" ) . getBundleURL ; function e ( r ) { Array . isArray ( r ) || ( r = [ r ] ) ; var e = r [ r . length - 1 ] ; try { return Promise . resolve ( require ( e ) ) } catch ( n ) { if ( "MODULE_NOT_FOUND" === n . code ) return new s ( function ( n , i ) { t ( r . slice ( 0 , - 1 ) ) . then ( function ( ) { return require ( e ) } ) . then ( n , i ) } ) ; throw n } } function t ( r ) { return Promise . all ( r . map ( u ) ) } var n = { } ; function i ( r , e ) { n [ r ] = e } module . exports = exports = e , exports . load = t , exports . register = i ; var o = { } ; function u ( e ) { var t ; if ( Array . isArray ( e ) && ( t = e [ 1 ] , e = e [ 0 ] ) , o [ e ] ) return o [ e ] ; var i = ( e . substring ( e . lastIndexOf ( "." ) + 1 , e . length ) || e ) . toLowerCase ( ) , u = n [ i ] ; return u ? o [ e ] = u ( r ( ) + e ) . then ( function ( r ) { return r && module . bundle . register ( t , r ) , r } ) . catch ( function ( r ) { throw delete o [ e ] , r } ) : void 0 } function s ( r ) { this . executor = r , this . promise = null } s . prototype . then = function ( r , e ) { return null === this . promise && ( this . promise = new Promise ( this . executor ) ) , this . promise . then ( r , e ) } , s . prototype . catch = function ( r ) { return null === this . promise && ( this . promise = new Promise ( this . executor ) ) , this . promise . catch ( r ) } ;
} , { "./bundle-url" : "FheM" } ] , "YG8z" : [ function ( require , module , exports ) {
2024-01-01 20:09:05 -05:00
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . CallTreeProfileBuilder = exports . StackListProfileBuilder = exports . Profile = exports . CallTreeNode = exports . Frame = exports . HasWeights = void 0 ; var e = require ( "./utils" ) , t = require ( "./value-formatters" ) , r = function ( e , t , r , s ) { return new ( r || ( r = Promise ) ) ( function ( a , i ) { function l ( e ) { try { n ( s . next ( e ) ) } catch ( t ) { i ( t ) } } function o ( e ) { try { n ( s . throw ( e ) ) } catch ( t ) { i ( t ) } } function n ( e ) { var t ; e . done ? a ( e . value ) : ( t = e . value , t instanceof r ? t : new r ( function ( e ) { e ( t ) } ) ) . then ( l , o ) } n ( ( s = s . apply ( e , t || [ ] ) ) . next ( ) ) } ) } ; const s = require ( "_bundle_loader" ) ( require . resolve ( "./demangle-cpp" ) ) ; class a { constructor ( ) { this . selfWeight = 0 , this . totalWeight = 0 } getSelfWeight ( ) { return this . selfWeight } getTotalWeight ( ) { return this . totalWeight } addToTotalWeight ( e ) { this . totalWeight += e } addToSelfWeight ( e ) { this . selfWeight += e } overwriteWeightWith ( e ) { this . selfWeight = e . selfWeight , this . totalWeight = e . totalWeight } } exports . HasWeights = a ; class i extends a { constructor ( e ) { super ( ) , this . key = e . key , this . name = e . name , this . file = e . file , this . line = e . line , this . col = e . col } static getOrInsert ( e , t ) { return e . getOrInsert ( new i ( t ) ) } } exports . Frame = i , i . root = new i ( { key : "(speedscope root)" , name : "(speedscope root)" } ) ; class l extends a { isRoot ( ) { return this . frame === i . root } isFrozen ( ) { return this . frozen } freeze ( ) { this . frozen = ! 0 } constructor ( e , t ) { super ( ) , this . frame = e , this . parent = t , this . children = [ ] , this . frozen = ! 1 } } exports . CallTreeNode = l ; class o { getAppendOrderCalltreeRoot ( ) { return this . appendOrderCalltreeRoot } getGroupedCalltreeRoot ( ) { return this . groupedCalltreeRoot } constructor ( r = 0 ) { this . name = "" , this . frames = new e . KeyedSet , this . appendOrderCalltreeRoot = new l ( i . root , null ) , this . groupedCalltreeRoot = new l ( i . root , null ) , this . samples = [ ] , this . weights = [ ] , this . valueFormatter = new t . RawValueFormatter , this . totalNonIdleWeight = null , this . totalWeight = r } shallowClone ( ) { const e = new o ( this . totalWeight ) ; return Object . assign ( e , this ) , e } formatValue ( e ) { return this . valueFormatter . format ( e ) } setValueFormatter ( e ) { this . valueFormatter = e } getWeightUnit ( ) { return this . valueFormatter . unit } getName ( ) { return this . name } setName ( e ) { this . name = e } getTotalWeight ( ) { return this . totalWeight } getTotalNonIdleWeight ( ) { return null === this . totalNonIdleWeight && ( this . totalNonIdleWeight = this . groupedCalltreeRoot . children . reduce ( ( e , t ) => e + t . getTotalWeight ( ) , 0 ) ) , this . totalNonIdleWeight } sortGroupedCallTree ( ) { ! function e ( t ) { t . children . sort ( ( e , t ) => - ( e . getTotalWeight ( ) - t . getTotalWeight ( ) ) ) , t . children . forEach ( e ) } ( this . groupedCalltreeRoot ) } forEachCallGrouped ( e , t ) { ! function r ( s , a ) { s . frame !== i . root && e ( s , a ) ; let l = 0 ; s . children . forEach ( function ( e ) { r ( e , a + l ) , l += e . getTotalWeight ( ) } ) , s . frame !== i . root && t ( s , a + s . getTotalWeight ( ) ) } ( this . groupedCalltreeRoot , 0 ) } forEachCall ( t , r ) { let s = [ ] , a = 0 , l = 0 ; for ( let o of this . samples ) { let n = null ; for ( n = o ; n && n . frame != i . root && - 1 === s . indexOf ( n ) ; n = n . parent ) ; for ( ; s . length > 0 && ( 0 , e . lastOf ) ( s ) != n ; ) { r ( s . pop ( ) , a ) } const h = [ ] ; for ( let e = o ; e && e . frame != i . root && e != n ; e = e . parent ) h . push ( e ) ; h . reverse ( ) ; for ( let e of h ) t ( e , a ) ; s = s . concat ( h ) , a += this . weights [ l ++ ] } for ( let e = s . length - 1 ; e >= 0 ; e -- ) r ( s [ e ] , a ) } forEachFrame ( e ) { this . frames . forEach ( e ) } getProfileWithRecursionFlattened ( ) { const e = new h , t = [ ] , r = new Set ; this . forEachCall ( function ( s , a ) { r . has ( s . frame ) ? t . push ( null ) : ( r . add ( s . frame ) , t . push ( s ) , e . enterFrame ( s . frame , a ) ) } , function ( s , a ) { const i = t . pop ( ) ; i && ( r . delete ( i . frame ) , e . leaveFrame ( i . frame , a ) ) } ) ; const s = e . build ( ) ; return s . name = this . name , s . valueFormatter = this . valueFormatter , this . forEachFrame ( e => { s . frames . getOrInsert ( e ) . overwriteWeightWith ( e ) } ) , s } getInvertedProfileForCallersOf ( e ) { const t = i . getOrInsert ( this . frames , e ) , r = new n , s = [ ] ; ! function e ( r ) { if ( r . frame === t ) s . push ( r ) ; else for ( let t of r . children ) e ( t ) } ( this . appendOrderCalltreeRoot ) ; for ( let l of s ) { const e = [ ] ; for ( let t = l ; null != t && t . frame !== i . root ; t = t . parent ) e . push ( t . frame ) ; r . appendSampleWithWeight ( e , l . getTotalWeight ( ) ) } const a = r . build ( ) ; return a . name = this . name , a . valueFormatter = this . valueFormatter , a } getProfileForCalleesOf ( e ) { const t = i . getOrInsert ( this . frames , e ) , r = new n ; ! function e ( s ) { if ( s . frame === t ) ! function ( e ) { const t = [ ] ; ! function e ( s ) { t . push ( s . frame ) , r . appendSampleWithWeight ( t , s . getSelfWeight (
2022-11-09 21:39:00 -05:00
} , { "./utils" : "ucYa" , "./value-formatters" : "LsM4" , "_bundle_loader" : "TUK3" , "./demangle-cpp" : [ [ "demangle-cpp.1768f4cc.js" , "bS28" ] , "demangle-cpp.1768f4cc.js.map" , "bS28" ] } ] , "x8nU" : [ function ( require , module , exports ) {
"use strict" ; var e ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . FileFormat = void 0 , exports . FileFormat = e , function ( e ) { let t , o ; ! function ( e ) { e . EVENTED = "evented" , e . SAMPLED = "sampled" } ( t = e . ProfileType || ( e . ProfileType = { } ) ) , function ( e ) { e . OPEN _FRAME = "O" , e . CLOSE _FRAME = "C" } ( o = e . EventType || ( e . EventType = { } ) ) } ( e || ( exports . FileFormat = e = { } ) ) ;
} , { } ] , "EHrm" : [ function ( require , module , exports ) {
2024-01-12 21:34:41 -05:00
module . exports = { name : "speedscope" , version : "1.20.0" , description : "" , repository : "jlfwong/speedscope" , main : "index.js" , bin : { speedscope : "./bin/cli.js" } , scripts : { deploy : "./scripts/deploy.sh" , prepack : "./scripts/build-release.sh" , prettier : "prettier --write 'src/**/*.ts' 'src/**/*.tsx'" , lint : "eslint 'src/**/*.ts' 'src/**/*.tsx'" , jest : "./scripts/test-setup.sh && jest --runInBand" , coverage : "npm run jest -- --coverage" , typecheck : "tsc --noEmit" , test : "./scripts/ci.sh" , serve : "parcel assets/index.html --open --no-autoinstall" } , files : [ "bin/cli.js" , "dist/release/**" , "!*.map" ] , browserslist : [ "last 2 Chrome versions" , "last 2 Firefox versions" ] , author : "" , license : "MIT" , devDependencies : { "@types/jest" : "22.2.3" , "@types/jszip" : "3.1.4" , "@types/node" : "14.0.1" , "@types/pako" : "1.0.0" , "@typescript-eslint/eslint-plugin" : "6.16.0" , "@typescript-eslint/parser" : "6.16.0" , acorn : "7.2.0" , aphrodite : "2.1.0" , eslint : "8.0.0" , "eslint-plugin-prettier" : "5.1.2" , "eslint-plugin-react-hooks" : "4.6.0" , jest : "24.3.0" , jsverify : "0.8.3" , jszip : "3.1.5" , pako : "1.0.6" , "parcel-bundler" : "1.12.4" , preact : "10.4.1" , prettier : "3.1.1" , protobufjs : "6.8.8" , "source-map" : "0.6.1" , "ts-jest" : "24.3.0" , typescript : "5.3.3" , "typescript-json-schema" : "0.42.0" , "uglify-es" : "3.2.2" , "uint8array-json-parser" : "0.0.2" } , jest : { transform : { "^.+\\.tsx?$" : "ts-jest" } , setupFilesAfterEnv : [ "./src/jest-setup.js" ] , testRegex : "\\.test\\.tsx?$" , collectCoverageFrom : [ "**/*.{ts,tsx}" , "!**/*.d.{ts,tsx}" ] , moduleFileExtensions : [ "ts" , "tsx" , "js" , "jsx" , "json" ] } , dependencies : { open : "7.2.0" } } ;
2022-11-09 21:39:00 -05:00
} , { } ] , "Xzb6" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . exportProfileGroup = r , exports . importSpeedscopeProfiles = s , exports . saveToFile = l ; var e = require ( "./profile" ) , t = require ( "./value-formatters" ) , n = require ( "./file-format-spec" ) ; function r ( e ) { const t = [ ] , n = new Map ; function r ( e ) { let r = n . get ( e ) ; if ( null == r ) { const o = { name : e . name } ; null != e . file && ( o . file = e . file ) , null != e . line && ( o . line = e . line ) , null != e . col && ( o . col = e . col ) , r = t . length , n . set ( e , r ) , t . push ( o ) } return r } const a = { exporter : ` speedscope@ ${ require ( "../../package.json" ) . version } ` , name : e . name , activeProfileIndex : e . indexToView , $schema : "https://www.speedscope.app/file-format-schema.json" , shared : { frames : t } , profiles : [ ] } ; for ( let s of e . profiles ) a . profiles . push ( o ( s , r ) ) ; return a } function o ( e , t ) { const r = { type : n . FileFormat . ProfileType . EVENTED , name : e . getName ( ) , unit : e . getWeightUnit ( ) , startValue : 0 , endValue : e . getTotalWeight ( ) , events : [ ] } ; return e . forEachCall ( ( e , o ) => { r . events . push ( { type : n . FileFormat . EventType . OPEN _FRAME , frame : t ( e . frame ) , at : o } ) } , ( e , o ) => { r . events . push ( { type : n . FileFormat . EventType . CLOSE _FRAME , frame : t ( e . frame ) , at : o } ) } ) , r } function a ( r , o ) { function a ( e ) { const { name : n , unit : o } = r ; switch ( o ) { case "nanoseconds" : case "microseconds" : case "milliseconds" : case "seconds" : e . setValueFormatter ( new t . TimeFormatter ( o ) ) ; break ; case "bytes" : e . setValueFormatter ( new t . ByteFormatter ) ; break ; case "none" : e . setValueFormatter ( new t . RawValueFormatter ) } e . setName ( n ) } switch ( r . type ) { case n . FileFormat . ProfileType . EVENTED : return function ( t ) { const { startValue : r , endValue : s , events : l } = t , i = new e . CallTreeProfileBuilder ( s - r ) ; a ( i ) ; const c = o . map ( ( e , t ) => Object . assign ( { key : t } , e ) ) ; for ( let e of l ) switch ( e . type ) { case n . FileFormat . EventType . OPEN _FRAME : i . enterFrame ( c [ e . frame ] , e . at - r ) ; break ; case n . FileFormat . EventType . CLOSE _FRAME : i . leaveFrame ( c [ e . frame ] , e . at - r ) } return i . build ( ) } ( r ) ; case n . FileFormat . ProfileType . SAMPLED : return function ( t ) { const { startValue : n , endValue : r , samples : s , weights : l } = t , i = new e . StackListProfileBuilder ( r - n ) ; a ( i ) ; const c = o . map ( ( e , t ) => Object . assign ( { key : t } , e ) ) ; if ( s . length !== l . length ) throw new Error ( ` Expected samples.length ( ${ s . length } ) to equal weights.length ( ${ l . length } ) ` ) ; for ( let e = 0 ; e < s . length ; e ++ ) { const t = s [ e ] , n = l [ e ] ; i . appendSampleWithWeight ( t . map ( e => c [ e ] ) , n ) } return i . build ( ) } ( r ) } } function s ( e ) { return { name : e . name || e . profiles [ 0 ] . name || "profile" , indexToView : e . activeProfileIndex || 0 , profiles : e . profiles . map ( t => a ( t , e . shared . frames ) ) } } function l ( e ) { const t = r ( e ) , n = new Blob ( [ JSON . stringify ( t ) ] , { type : "text/json" } ) , o = ` ${ ( t . name ? t . name . split ( "." ) [ 0 ] : "profile" ) . replace ( /\W+/g , "_" ) } .speedscope.json ` ; console . log ( "Saving" , o ) ; const a = document . createElement ( "a" ) ; a . download = o , a . href = window . URL . createObjectURL ( n ) , a . dataset . downloadurl = [ "text/json" , a . download , a . href ] . join ( ":" ) , document . body . appendChild ( a ) , a . click ( ) , document . body . removeChild ( a ) }
} , { "./profile" : "YG8z" , "./value-formatters" : "LsM4" , "./file-format-spec" : "x8nU" , "../../package.json" : "EHrm" } ] , "C6HJ" : [ function ( require , module , exports ) {
"use strict" ; function r ( r , e ) { return d ( r , e ) } Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . fuzzyMatchStrings = r ; const e = "a" . charCodeAt ( 0 ) , t = "z" . charCodeAt ( 0 ) , n = "A" . charCodeAt ( 0 ) , o = "Z" . charCodeAt ( 0 ) , c = "0" . charCodeAt ( 0 ) , a = "9" . charCodeAt ( 0 ) ; var h ; function u ( r ) { const u = r . charCodeAt ( 0 ) ; return e <= u && u <= t ? h . charLower : n <= u && u <= o ? h . charUpper : c <= u && u <= a ? h . charNumber : h . charNonWord } function l ( r , o ) { if ( r === o ) return ! 0 ; const c = o . charCodeAt ( 0 ) ; return e <= c && c <= t && r . charCodeAt ( 0 ) === c - e + n } function d ( r , e ) { if ( 0 == e . length ) return { matchedRanges : [ ] , score : 0 } ; let t = 0 , n = - 1 , o = - 1 , c = r . length , a = e . length ; for ( let h = 0 ; h < c ; h ++ ) { if ( l ( r [ h ] , e [ t ] ) && ( n < 0 && ( n = h ) , ++ t == a ) ) { o = h + 1 ; break } } if ( - 1 == o ) return null ; t -- ; for ( let h = o - 1 ; h >= n ; h -- ) { if ( l ( r [ h ] , e [ t ] ) && -- t < 0 ) return A ( r , e , n = h , o ) } throw new Error ( "Implementation error. This must be a bug in fzfFuzzyMatchV1" ) } ! function ( r ) { r [ r . charNonWord = 0 ] = "charNonWord" , r [ r . charLower = 1 ] = "charLower" , r [ r . charUpper = 2 ] = "charUpper" , r [ r . charNumber = 3 ] = "charNumber" } ( h || ( h = { } ) ) ; const f = 16 , i = - 3 , s = - 1 , p = f / 2 , N = f / 2 , b = p + s , g = - ( i + s ) , m = 2 ; function w ( r , e ) { return r === h . charNonWord && e !== h . charNonWord ? p : r === h . charLower && e == h . charUpper || r !== h . charNumber && e == h . charNumber ? b : e === h . charNonWord ? N : 0 } function A ( r , e , t , n ) { let o = 0 , c = 0 , a = ! 1 , d = 0 , N = 0 , b = new Array ( e . length ) , A = h . charNonWord ; t > 0 && ( A = u ( r [ t - 1 ] ) ) ; for ( let h = t ; h < n ; h ++ ) { let t = r [ h ] , n = u ( t ) ; if ( l ( t , e [ o ] ) ) { b [ o ] = h , c += f ; let r = w ( A , n ) ; 0 == d ? N = r : ( r === p && ( N = r ) , r = Math . max ( r , N , g ) ) , c += 0 === o ? r * m : r , a = ! 1 , d ++ , o ++ } else c += a ? s : i , a = ! 0 , d = 0 , N = 0 ; A = n } if ( o !== e . length ) throw new Error ( "fzfCalculateScore should only be called when pattern is found between sidx and eidx" ) ; let C = [ [ b [ 0 ] , b [ 0 ] + 1 ] ] ; for ( let h = 1 ; h < b . length ; h ++ ) { const r = b [ h ] , e = C [ C . length - 1 ] ; e [ 1 ] === r ? e [ 1 ] = r + 1 : C . push ( [ r , r + 1 ] ) } return { score : c , matchedRanges : C } }
} , { } ] , "tOar" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . ProfileSelectRow = a , exports . ProfileSelect = u ; var e = require ( "preact" ) , o = require ( "preact/hooks" ) , r = require ( "aphrodite" ) , l = require ( "./style" ) , t = require ( "../lib/fuzzy-find" ) , i = require ( "../lib/utils" ) , n = require ( "./themes/theme" ) ; function s ( o , r , l ) { const t = [ ] ; let i = 0 ; for ( let n of r ) t . push ( o . slice ( i , n [ 0 ] ) ) , t . push ( ( 0 , e . h ) ( "span" , { className : l } , o . slice ( n [ 0 ] , n [ 1 ] ) ) ) , i = n [ 1 ] ; return t . push ( o . slice ( i ) ) , ( 0 , e . h ) ( "span" , null , t ) } function a ( { setProfileIndexToView : l , setHoveredProfileIndex : t , profile : i , selected : a , hovered : c , profileCount : d , nodeRef : u , closeProfileSelect : p , indexInProfileGroup : h , matchedRanges : g , indexInFilteredListView : m } ) { const b = f ( ( 0 , n . useTheme ) ( ) ) , x = ( 0 , o . useCallback ) ( ( ) => { p ( ) , l ( h ) } , [ p , l , h ] ) , I = ( 0 , o . useCallback ) ( e => { t ( h ) } , [ t , h ] ) , P = i . getName ( ) , w = 1 + Math . floor ( Math . log10 ( d ) ) , y = ( 0 , r . css ) ( b . highlighted ) , S = ( 0 , o . useMemo ) ( ( ) => { return s ( P , g , y ) } , [ P , g , y ] ) ; return ( 0 , e . h ) ( "div" , { ref : u , onMouseUp : x , onMouseEnter : I , title : P , className : ( 0 , r . css ) ( b . profileRow , m % 2 == 0 && b . profileRowEven , a && b . profileRowSelected , c && b . profileRowHovered ) } , ( 0 , e . h ) ( "span" , { className : ( 0 , r . css ) ( b . profileIndex , a && b . profileIndexSelected ) , style : { width : w + "em" } } , h + 1 , ":" ) , " " , S ) } function c ( e ) { e . stopPropagation ( ) } function d ( e , o ) { const r = [ ] ; for ( let l = 0 ; l < e . length ; l ++ ) { const i = e [ l ] , n = ( 0 , t . fuzzyMatchStrings ) ( i . getName ( ) , o ) ; n && r . push ( Object . assign ( { indexInProfileGroup : l , profile : i } , n ) ) } return ( 0 , i . sortBy ) ( r , e => - e . score ) , r } function u ( { profiles : l , closeProfileSelect : t , indexToView : i , visible : s , setProfileIndexToView : u } ) { const p = f ( ( 0 , n . useTheme ) ( ) ) , [ h , g ] = ( 0 , o . useState ) ( "" ) , m = ( 0 , o . useCallback ) ( e => { const o = e . target . value ; g ( o ) } , [ g ] ) , b = ( 0 , o . useCallback ) ( e => { e && ( s ? e . select ( ) : e . blur ( ) ) } , [ s ] ) , x = ( 0 , o . useMemo ) ( ( ) => d ( l , h ) , [ l , h ] ) , [ I , P ] = ( 0 , o . useState ) ( 0 ) , w = ( 0 , o . useRef ) ( null ) ; ( 0 , o . useEffect ) ( ( ) => { s && ( P ( null ) , null !== w . current && w . current . scrollIntoView ( { behavior : "auto" , block : "nearest" , inline : "nearest" } ) ) } , [ s ] ) ; const y = ( 0 , o . useCallback ) ( e => { e . stopPropagation ( ) ; let o = null ; switch ( e . key ) { case "Enter" : null != I && ( t ( ) , u ( I ) ) ; break ; case "Escape" : t ( ) ; break ; case "ArrowDown" : if ( e . preventDefault ( ) , o = 0 , null != I ) { const e = x . findIndex ( e => e . indexInProfileGroup === I ) ; - 1 !== e && ( o = e + 1 ) } break ; case "ArrowUp" : if ( e . preventDefault ( ) , o = x . length - 1 , null != I ) { const e = x . findIndex ( e => e . indexInProfileGroup === I ) ; - 1 !== e && ( o = e - 1 ) } } if ( null != o && o >= 0 && o < x . length ) { const e = x [ o ] . indexInProfileGroup ; P ( e ) , v ( ! 0 ) } } , [ t , u , I , x ] ) , [ S , v ] = ( 0 , o . useState ) ( ! 1 ) ; ( 0 , o . useEffect ) ( ( ) => { x . length > 0 && ( P ( x [ 0 ] . indexInProfileGroup ) , v ( ! 0 ) ) } , [ P , x ] ) ; const C = ( 0 , o . useCallback ) ( e => { S && e && ( e . scrollIntoView ( { behavior : "auto" , block : "nearest" , inline : "nearest" } ) , v ( ! 1 ) ) } , [ S , v ] ) , k = ( 0 , o . useCallback ) ( e => { w . current = e , C ( e ) } , [ w , C ] ) ; return ( 0 , e . h ) ( "div" , { className : ( 0 , r . css ) ( p . profileSelectOuter ) } , ( 0 , e . h ) ( "div" , { className : ( 0 , r . css ) ( p . caret ) } ) , ( 0 , e . h ) ( "div" , { className : ( 0 , r . css ) ( p . profileSelectBox ) } , ( 0 , e . h ) ( "div" , { className : ( 0 , r . css ) ( p . filterInputContainer ) } , ( 0 , e . h ) ( "input" , { type : "text" , className : ( 0 , r . css ) ( p . filterInput ) , ref : b , placeholder : "Filter..." , value : h , onInput : m , onKeyDown : y , onKeyUp : c , onKeyPress : c } ) ) , ( 0 , e . h ) ( "div" , { className : ( 0 , r . css ) ( p . profileSelectScrolling ) } , x . map ( ( { profile : o , matchedRanges : r , indexInProfileGroup : n } , s ) => { let c = void 0 ; const d = n === i , p = n === I ; return d && p ? c = k : d ? c = w : p && ( c = C ) , ( 0 , e . h ) ( a , { setHoveredProfileIndex : P , indexInProfileGroup : n , indexInFilteredListView : s , hovered : n == I , selected : n === i , profile : o , profileCount : l . length , nodeRef : c , matchedRanges : r , setProfileIndexToView : u , closeProfileSelect : t } ) } ) , 0 === x . length ? ( 0 , e . h ) ( "div" , { className : ( 0 , r . css ) ( p . profileRow ) } , 'No results match filter "' , h , '"' ) : null ) ) ) } const p = 10 , f = ( 0 , n . withTheme ) ( e => r . StyleSheet . create ( { filterInputContainer : { display : "flex" , flexDirection : "column" , padding : 5 , alignItems : "stretch" } , filterInput : { color : e . altFgPrimaryColor , background : e . altBgSecondaryColor , borderRadius : 5 , padding : 5 , ":focus" : { border : "none" , outline : "none" } , "::selection" : { color : e . altFgPrimaryColor , background : e . selectionPrimaryColor } } , caret : { width : 0 , height : 0 , borderLeft : "5px solid transparent" , borderRight : "5px solid transparent" , borderBottom : "5px solid black" } , highlighted : { background : e . selectionSecondaryColor } , pad
} , { "preact" : "aSor" , "preact/hooks" : "MwGB" , "aphrodite" : "CxN7" , "./style" : "hvr4" , "../lib/fuzzy-find" : "C6HJ" , "../lib/utils" : "ucYa" , "./themes/theme" : "gzKG" } ] , "BPHY" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . Toolbar = T ; var e = require ( "preact" ) , o = require ( "preact/hooks" ) , t = require ( "aphrodite" ) , i = require ( "./style" ) , s = require ( "./profile-select" ) , l = require ( "../lib/utils" ) , a = require ( "./themes/theme" ) , r = require ( "../lib/view-mode" ) , n = require ( "../app-state" ) , c = require ( "../app-state/color-scheme" ) , h = require ( "../lib/atom" ) ; function d ( e , t ) { return ( 0 , o . useCallback ) ( ( ) => e ( t ) , [ e , t ] ) } function m ( o ) { const i = g ( ( 0 , a . useTheme ) ( ) ) , s = d ( n . viewModeAtom . set , r . ViewMode . CHRONO _FLAME _CHART ) , l = d ( n . viewModeAtom . set , r . ViewMode . LEFT _HEAVY _FLAME _GRAPH ) , c = d ( n . viewModeAtom . set , r . ViewMode . SANDWICH _VIEW ) ; return o . activeProfileState ? ( 0 , e . h ) ( "div" , { className : ( 0 , t . css ) ( i . toolbarLeft ) } , ( 0 , e . h ) ( "div" , { className : ( 0 , t . css ) ( i . toolbarTab , o . viewMode === r . ViewMode . CHRONO _FLAME _CHART && i . toolbarTabActive ) , onClick : s } , ( 0 , e . h ) ( "span" , { className : ( 0 , t . css ) ( i . emoji ) } , "🕰" ) , "Time Order" ) , ( 0 , e . h ) ( "div" , { className : ( 0 , t . css ) ( i . toolbarTab , o . viewMode === r . ViewMode . LEFT _HEAVY _FLAME _GRAPH && i . toolbarTabActive ) , onClick : l } , ( 0 , e . h ) ( "span" , { className : ( 0 , t . css ) ( i . emoji ) } , "⬅️" ) , "Left Heavy" ) , ( 0 , e . h ) ( "div" , { className : ( 0 , t . css ) ( i . toolbarTab , o . viewMode === r . ViewMode . SANDWICH _VIEW && i . toolbarTabActive ) , onClick : c } , ( 0 , e . h ) ( "span" , { className : ( 0 , t . css ) ( i . emoji ) } , "🥪" ) , "Sandwich" ) ) : null } const b = ( ( ) => { let e = null ; return o => { let t = ( null == o ? void 0 : o . profiles . map ( e => e . profile ) ) || null ; return ( null === e || null != t && ! ( 0 , l . objectsHaveShallowEquality ) ( e , t ) ) && ( e = t ) , e } } ) ( ) ; function u ( i ) { const l = g ( ( 0 , a . useTheme ) ( ) ) , { activeProfileState : r , profileGroup : n } = i , c = b ( n ) , [ h , d ] = ( 0 , o . useState ) ( ! 1 ) , m = ( 0 , o . useCallback ) ( ( ) => { d ( ! 0 ) } , [ d ] ) , u = ( 0 , o . useCallback ) ( ( ) => { d ( ! 1 ) } , [ d ] ) ; return ( 0 , o . useEffect ) ( ( ) => { const e = e => { "t" === e . key && ( e . preventDefault ( ) , d ( ! 0 ) ) } ; return window . addEventListener ( "keypress" , e ) , ( ) => { window . removeEventListener ( "keypress" , e ) } } , [ d ] ) , ( 0 , o . useEffect ) ( ( ) => { const e = e => { "t" === e . key && ( e . preventDefault ( ) , d ( ! 0 ) ) } ; return window . addEventListener ( "keypress" , e ) , ( ) => { window . removeEventListener ( "keypress" , e ) } } , [ d ] ) , r && n && c ? 1 === n . profiles . length ? ( 0 , e . h ) ( e . Fragment , null , r . profile . getName ( ) ) : ( 0 , e . h ) ( "div" , { className : ( 0 , t . css ) ( l . toolbarCenter ) , onMouseLeave : u } , ( 0 , e . h ) ( "span" , { onMouseOver : m } , r . profile . getName ( ) , " " , ( 0 , e . h ) ( "span" , { className : ( 0 , t . css ) ( l . toolbarProfileIndex ) } , "(" , r . index + 1 , "/" , n . profiles . length , ")" ) ) , ( 0 , e . h ) ( "div" , { style : { display : h ? "block" : "none" } } , ( 0 , e . h ) ( s . ProfileSelect , { setProfileIndexToView : i . setProfileIndexToView , indexToView : n . indexToView , profiles : c , closeProfileSelect : u , visible : h } ) ) ) : ( 0 , e . h ) ( e . Fragment , null , "🔬speedscope" ) } function p ( o ) { const i = g ( ( 0 , a . useTheme ) ( ) ) , s = ( 0 , h . useAtom ) ( c . colorSchemeAtom ) , l = ( 0 , e . h ) ( "div" , { className : ( 0 , t . css ) ( i . toolbarTab ) , onClick : o . saveFile } , ( 0 , e . h ) ( "span" , { className : ( 0 , t . css ) ( i . emoji ) } , "⤴️" ) , "Export" ) , r = ( 0 , e . h ) ( "div" , { className : ( 0 , t . css ) ( i . toolbarTab ) , onClick : o . browseForFile } , ( 0 , e . h ) ( "span" , { className : ( 0 , t . css ) ( i . emoji ) } , "⤵️" ) , "Import" ) , n = ( 0 , e . h ) ( "div" , { className : ( 0 , t . css ) ( i . toolbarTab ) , onClick : c . colorSchemeAtom . cycleToNextColorScheme } , ( 0 , e . h ) ( "span" , { className : ( 0 , t . css ) ( i . emoji ) } , "🎨" ) , ( 0 , e . h ) ( "span" , { className : ( 0 , t . css ) ( i . toolbarTabColorSchemeToggle ) } , ( 0 , a . colorSchemeToString ) ( s ) ) ) , d = ( 0 , e . h ) ( "div" , { className : ( 0 , t . css ) ( i . toolbarTab ) } , ( 0 , e . h ) ( "a" , { href : "https://github.com/jlfwong/speedscope#usage" , className : ( 0 , t . css ) ( i . noLinkStyle ) , target : "_blank" } , ( 0 , e . h ) ( "span" , { className : ( 0 , t . css ) ( i . emoji ) } , "❓" ) , "Help" ) ) ; return ( 0 , e . h ) ( "div" , { className : ( 0 , t . css ) ( i . toolbarRight ) } , o . activeProfileState && l , r , n , d ) } function T ( o ) { const i = g ( ( 0 , a . useTheme ) ( ) ) ; return ( 0 , e . h ) ( "div" , { className : ( 0 , t . css ) ( i . toolbar ) } , ( 0 , e . h ) ( m , Object . assign ( { } , o ) ) , ( 0 , e . h ) ( u , Object . assign ( { } , o ) ) , ( 0 , e . h ) ( p , Object . assign ( { } , o ) ) ) } const g = ( 0 , a . withTheme ) ( e => t . StyleSheet . create ( { toolbar : { height : i . Sizes . TOOLBAR _HEIGHT , flexShrink : 0 , background : e . altBgPrimaryColor , color : e . altFgPrimaryColor , textAlign : "center" , fontFamily : i . FontFamily . MONOSPACE , fontSize : i . FontSize . TITLE , lineHeight : ` ${ i . Sizes . TOOLBAR _TAB _HEIGHT } px ` , userSelect : "none" } , toolbarLeft : { position : "absolute" , height : i . Sizes . TOOLBAR _HEIGHT , overflow : "hidden" , top : 0 , left : 0 , marginRight : 2 , textAlign : "left" } , toolb
} , { "preact" : "aSor" , "preact/hooks" : "MwGB" , "aphrodite" : "CxN7" , "./style" : "hvr4" , "./profile-select" : "tOar" , "../lib/utils" : "ucYa" , "./themes/theme" : "gzKG" , "../lib/view-mode" : "dpTI" , "../app-state" : "LDQe" , "../app-state/color-scheme" : "KQrJ" , "../lib/atom" : "QkVE" } ] , "bv0g" : [ function ( require , module , exports ) {
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . importJavaScriptSourceMapSymbolRemapper = r ; var e = require ( "./utils" ) , n = function ( e , n , o , l ) { return new ( o || ( o = Promise ) ) ( function ( r , i ) { function t ( e ) { try { a ( l . next ( e ) ) } catch ( n ) { i ( n ) } } function u ( e ) { try { a ( l . throw ( e ) ) } catch ( n ) { i ( n ) } } function a ( e ) { var n ; e . done ? r ( e . value ) : ( n = e . value , n instanceof o ? n : new o ( function ( e ) { e ( n ) } ) ) . then ( t , u ) } a ( ( l = l . apply ( e , n || [ ] ) ) . next ( ) ) } ) } ; const o = require ( "_bundle_loader" ) ( require . resolve ( "source-map" ) ) , l = ! 1 ; function r ( r , i ) { return n ( this , void 0 , void 0 , function * ( ) { const n = yield o ; let t = null , u = null ; try { u = JSON . parse ( r ) , t = new n . SourceMapConsumer ( u ) } catch ( s ) { return null } const a = [ ] ; t . eachMapping ( function ( e ) { a . push ( Object . assign ( Object . assign ( { } , e ) , { generatedColumn : e . generatedColumn + 1 , originalColumn : e . originalColumn + 1 } ) ) } , { } , n . SourceMapConsumer . GENERATED _ORDER ) ; const c = i . replace ( /\.[^/]*$/ , "" ) ; return n => { var o ; let r = ! 1 ; if ( ( null == u ? void 0 : u . file ) && ( null == u ? void 0 : u . file ) === n . file ? r = ! 0 : ( "/" + ( null === ( o = n . file ) || void 0 === o ? void 0 : o . replace ( /\.[^/]*$/ , "" ) ) ) . endsWith ( "/" + c ) && ( r = ! 0 ) , ! r ) return null ; if ( null == n . line || null == n . col ) return null ; let i = ( 0 , e . findIndexBisect ) ( a , e => e . generatedLine > n . line || ! ( e . generatedLine < n . line ) && e . generatedColumn >= n . col ) ; if ( - 1 === i ) i = a . length - 1 ; else { if ( 0 === i ) return null ; i -- } const s = a [ i ] , m = { } ; if ( null != s . name ) m . name = s . name ; else if ( null != s . source ) { const e = null == t ? void 0 : t . sourceContentFor ( s . source , ! 0 ) ; if ( e ) { const n = e . split ( "\n" ) [ s . originalLine - 1 ] ; if ( n ) { const e = /\w+/ . exec ( n . substr ( s . originalColumn - 1 ) ) ; e && ( m . name = e [ 0 ] ) } } } switch ( m . name ) { case "constructor" : m . name = n . name + " constructor" ; break ; case "function" : m . name = n . name ; break ; case "const" : case "export" : m . name = n . name } return m . name && n . name . includes ( m . name ) && ( m . name = n . name ) , null != s . source && ( m . file = s . source , m . line = s . originalLine , m . col = s . originalColumn ) , l && ( console . groupCollapsed ( ` Remapping " ${ n . name } " -> " ${ m . name } " ` ) , console . log ( "before" , Object . assign ( { } , n ) ) , console . log ( "item @ index" , s ) , console . log ( "item @ index + 1" , a [ i + 1 ] ) , console . log ( "after" , m ) , console . groupEnd ( ) ) , m } } ) }
} , { "_bundle_loader" : "TUK3" , "source-map" : [ [ "source-map.438fa06b.js" , "aRf0" ] , "source-map.438fa06b.js.map" , "aRf0" ] , "./utils" : "ucYa" } ] , "ThNa" : [ function ( require , module , exports ) {
module . exports = "perf-vertx-stacks-01-collapsed-all.2681da68.txt" ;
} , { } ] , "wCGh" : [ function ( require , module , exports ) {
2024-01-01 20:09:05 -05:00
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . Application = exports . GLCanvas = void 0 ; var e = require ( "preact" ) , t = require ( "aphrodite" ) , o = require ( "./style" ) , i = require ( "../lib/emscripten" ) , r = require ( "./sandwich-view" ) , s = require ( "../lib/file-format" ) , n = require ( "./flamechart-view-container" ) , a = require ( "./toolbar" ) , l = require ( "../lib/js-source-map" ) , c = require ( "./themes/theme" ) , p = require ( "../lib/view-mode" ) , d = require ( "../app-state" ) , h = require ( "../lib/preact-helpers" ) , u = function ( e , t , o , i ) { return new ( o || ( o = Promise ) ) ( function ( r , s ) { function n ( e ) { try { l ( i . next ( e ) ) } catch ( t ) { s ( t ) } } function a ( e ) { try { l ( i . throw ( e ) ) } catch ( t ) { s ( t ) } } function l ( e ) { var t ; e . done ? r ( e . value ) : ( t = e . value , t instanceof o ? t : new o ( function ( e ) { e ( t ) } ) ) . then ( n , a ) } l ( ( i = i . apply ( e , t || [ ] ) ) . next ( ) ) } ) } ; const m = require ( "_bundle_loader" ) ( require . resolve ( "../import" ) ) ; function f ( e , t ) { return u ( this , void 0 , void 0 , function * ( ) { return ( yield m ) . importProfileGroupFromText ( e , t ) } ) } function v ( e , t ) { return u ( this , void 0 , void 0 , function * ( ) { return ( yield m ) . importProfileGroupFromBase64 ( e , t ) } ) } function g ( e , t ) { return u ( this , void 0 , void 0 , function * ( ) { return ( yield m ) . importProfilesFromArrayBuffer ( e , t ) } ) } function w ( e ) { return u ( this , void 0 , void 0 , function * ( ) { return ( yield m ) . importProfilesFromFile ( e ) } ) } function y ( e ) { return u ( this , void 0 , void 0 , function * ( ) { return ( yield m ) . importFromFileSystemDirectoryEntry ( e ) } ) } m . then ( ( ) => { } ) , require ( "_bundle_loader" ) ( require . resolve ( "../lib/demangle-cpp" ) ) . then ( ( ) => { } ) , require ( "_bundle_loader" ) ( require . resolve ( "source-map" ) ) . then ( ( ) => { } ) ; const b = require ( "../../sample/profiles/stackcollapse/perf-vertx-stacks-01-collapsed-all.txt" ) ; function x ( e ) { return null != e && e . isDirectory } class C extends h . StatelessComponent { constructor ( ) { super ( ... arguments ) , this . canvas = null , this . ref = ( e => { e instanceof HTMLCanvasElement ? this . canvas = e : this . canvas = null , this . props . setGLCanvas ( this . canvas ) } ) , this . container = null , this . containerRef = ( e => { e instanceof HTMLElement ? this . container = e : this . container = null } ) , this . maybeResize = ( ( ) => { if ( ! this . container ) return ; if ( ! this . props . canvasContext ) return ; let { width : e , height : t } = this . container . getBoundingClientRect ( ) ; const o = e , i = t , r = e * window . devicePixelRatio , s = t * window . devicePixelRatio ; this . props . canvasContext . gl . resize ( r , s , o , i ) } ) , this . onWindowResize = ( ( ) => { this . props . canvasContext && this . props . canvasContext . requestFrame ( ) } ) } componentWillReceiveProps ( e ) { this . props . canvasContext !== e . canvasContext && ( this . props . canvasContext && this . props . canvasContext . removeBeforeFrameHandler ( this . maybeResize ) , e . canvasContext && ( e . canvasContext . addBeforeFrameHandler ( this . maybeResize ) , e . canvasContext . requestFrame ( ) ) ) } componentDidMount ( ) { window . addEventListener ( "resize" , this . onWindowResize ) } componentWillUnmount ( ) { this . props . canvasContext && this . props . canvasContext . removeBeforeFrameHandler ( this . maybeResize ) , window . removeEventListener ( "resize" , this . onWindowResize ) } render ( ) { const o = F ( this . props . theme ) ; return ( 0 , e . h ) ( "div" , { ref : this . containerRef , className : ( 0 , t . css ) ( o . glCanvasView ) } , ( 0 , e . h ) ( "canvas" , { ref : this . ref , width : 1 , height : 1 } ) ) } } exports . GLCanvas = C ; class P extends h . StatelessComponent { constructor ( ) { super ( ... arguments ) , this . loadExample = ( ( ) => { this . loadProfile ( ( ) => u ( this , void 0 , void 0 , function * ( ) { const e = yield fetch ( b ) . then ( e => e . text ( ) ) ; return yield f ( "perf-vertx-stacks-01-collapsed-all.txt" , e ) } ) ) } ) , this . onDrop = ( e => { if ( this . props . setDragActive ( ! 1 ) , e . preventDefault ( ) , ! e . dataTransfer ) return ; const t = e . dataTransfer . items [ 0 ] ; if ( "webkitGetAsEntry" in t ) { const e = t . webkitGetAsEntry ( ) ; if ( e && x ( e ) && e . name . endsWith ( ".trace" ) ) { console . log ( "Importing as Instruments.app .trace file" ) ; const t = e ; return void this . loadProfile ( ( ) => u ( this , void 0 , void 0 , function * ( ) { return yield y ( t ) } ) ) } } let o = e . dataTransfer . files . item ( 0 ) ; o && this . loadFromFile ( o ) } ) , this . onDragOver = ( e => { this . props . setDragActive ( ! 0 ) , e . preventDefault ( ) } ) , this . onDragLeave = ( e => { this . props . setDragActive ( ! 1 ) , e . preventDefault ( ) } ) , this . onWindowKeyPress = ( e => u ( this , void 0 , void 0 , function * ( ) { if ( "1" === e . key ) this . props . setViewMode ( p . ViewMode . CHRONO _FLAME _CHART ) ; else if ( "2" === e . key ) this . props . setViewMode ( p . ViewMode . LEFT _HEAVY _FLAME _GRAPH ) ; else if (
2024-01-12 21:34:41 -05:00
} , { "preact" : "aSor" , "aphrodite" : "CxN7" , "./style" : "hvr4" , "../lib/emscripten" : "FbpF" , "./sandwich-view" : "L8J2" , "../lib/file-format" : "Xzb6" , "./flamechart-view-container" : "PJJu" , "./toolbar" : "BPHY" , "../lib/js-source-map" : "bv0g" , "./themes/theme" : "gzKG" , "../lib/view-mode" : "dpTI" , "../app-state" : "LDQe" , "../lib/preact-helpers" : "Hete" , "_bundle_loader" : "TUK3" , "../import" : [ [ "import.7f8cb9f9.js" , "uRa7" ] , "import.7f8cb9f9.js.map" , "uRa7" ] , "../lib/demangle-cpp" : [ [ "demangle-cpp.1768f4cc.js" , "bS28" ] , "demangle-cpp.1768f4cc.js.map" , "bS28" ] , "source-map" : [ [ "source-map.438fa06b.js" , "aRf0" ] , "source-map.438fa06b.js.map" , "aRf0" ] , "../../sample/profiles/stackcollapse/perf-vertx-stacks-01-collapsed-all.txt" : "ThNa" } ] , "A6uO" : [ function ( require , module , exports ) {
2022-11-09 21:39:00 -05:00
"use strict" ; Object . defineProperty ( exports , "__esModule" , { value : ! 0 } ) , exports . ApplicationContainer = void 0 ; var e = require ( "preact" ) , t = require ( "../app-state/getters" ) , o = require ( "preact/compat" ) , r = require ( "../app-state/active-profile-state" ) , a = require ( "./themes/theme" ) , i = require ( "../app-state" ) , s = require ( "../lib/atom" ) , n = require ( "./search-view" ) , m = require ( "./application" ) ; const u = ( 0 , o . memo ) ( ( ) => { const u = ( 0 , s . useAtom ) ( i . glCanvasAtom ) , l = ( 0 , a . useTheme ) ( ) , p = ( 0 , o . useMemo ) ( ( ) => u ? ( 0 , t . getCanvasContext ) ( { theme : l , canvas : u } ) : null , [ l , u ] ) ; return ( 0 , e . h ) ( n . ProfileSearchContextProvider , null , ( 0 , e . h ) ( m . Application , { activeProfileState : ( 0 , r . useActiveProfileState ) ( ) , canvasContext : p , setGLCanvas : i . glCanvasAtom . set , setLoading : i . loadingAtom . set , setError : i . errorAtom . set , setProfileGroup : i . profileGroupAtom . setProfileGroup , setDragActive : i . dragActiveAtom . set , setViewMode : i . viewModeAtom . set , setFlattenRecursion : i . flattenRecursionAtom . set , setProfileIndexToView : i . profileGroupAtom . setProfileIndexToView , profileGroup : ( 0 , s . useAtom ) ( i . profileGroupAtom ) , theme : l , flattenRecursion : ( 0 , s . useAtom ) ( i . flattenRecursionAtom ) , viewMode : ( 0 , s . useAtom ) ( i . viewModeAtom ) , hashParams : ( 0 , s . useAtom ) ( i . hashParamsAtom ) , glCanvas : u , dragActive : ( 0 , s . useAtom ) ( i . dragActiveAtom ) , loading : ( 0 , s . useAtom ) ( i . loadingAtom ) , error : ( 0 , s . useAtom ) ( i . errorAtom ) } ) ) } ) ; exports . ApplicationContainer = u ;
} , { "preact" : "aSor" , "../app-state/getters" : "zEXv" , "preact/compat" : "AQ6k" , "../app-state/active-profile-state" : "MY42" , "./themes/theme" : "gzKG" , "../app-state" : "LDQe" , "../lib/atom" : "QkVE" , "./search-view" : "t9CM" , "./application" : "wCGh" } ] , "K5F6" : [ function ( require , module , exports ) {
"use strict" ; var e = require ( "preact" ) , o = require ( "./views/application-container" ) , d = require ( "./views/themes/theme" ) ; console . log ( ` speedscope v ${ require ( "../package.json" ) . version } ` ) , module . hot && ( module . hot . dispose ( ( ) => { ( 0 , e . render ) ( ( 0 , e . h ) ( "div" , null ) , document . body , document . body . lastElementChild || void 0 ) } ) , module . hot . accept ( ) ) , ( 0 , e . render ) ( ( 0 , e . h ) ( d . ThemeProvider , null , ( 0 , e . h ) ( o . ApplicationContainer , null ) ) , document . body , document . body . lastElementChild || void 0 ) ;
} , { "preact" : "aSor" , "./views/application-container" : "A6uO" , "./views/themes/theme" : "gzKG" , "../package.json" : "EHrm" } ] , "Yi9z" : [ function ( require , module , exports ) {
module . exports = function ( n ) { return new Promise ( function ( e , o ) { var r = document . createElement ( "script" ) ; r . async = ! 0 , r . type = "text/javascript" , r . charset = "utf-8" , r . src = n , r . onerror = function ( n ) { r . onerror = r . onload = null , o ( n ) } , r . onload = function ( ) { r . onerror = r . onload = null , e ( ) } , document . getElementsByTagName ( "head" ) [ 0 ] . appendChild ( r ) } ) } ;
} , { } ] , 0 : [ function ( require , module , exports ) {
var b = require ( "TUK3" ) ; b . register ( "js" , require ( "Yi9z" ) ) ;
} , { } ] } , { } , [ 0 , "K5F6" ] , null )
2024-01-12 21:34:41 -05:00
//# sourceMappingURL=speedscope.80eb88d2.js.map