1
+ /*[global-shim-start]*/
2
+ ( function ( exports , global , doEval ) {
3
+ // jshint ignore:line
4
+ var origDefine = global . define ;
5
+
6
+ var get = function ( name ) {
7
+ var parts = name . split ( "." ) ,
8
+ cur = global ,
9
+ i ;
10
+ for ( i = 0 ; i < parts . length ; i ++ ) {
11
+ if ( ! cur ) {
12
+ break ;
13
+ }
14
+ cur = cur [ parts [ i ] ] ;
15
+ }
16
+ return cur ;
17
+ } ;
18
+ var set = function ( name , val ) {
19
+ var parts = name . split ( "." ) ,
20
+ cur = global ,
21
+ i ,
22
+ part ,
23
+ next ;
24
+ for ( i = 0 ; i < parts . length - 1 ; i ++ ) {
25
+ part = parts [ i ] ;
26
+ next = cur [ part ] ;
27
+ if ( ! next ) {
28
+ next = cur [ part ] = { } ;
29
+ }
30
+ cur = next ;
31
+ }
32
+ part = parts [ parts . length - 1 ] ;
33
+ cur [ part ] = val ;
34
+ } ;
35
+ var useDefault = function ( mod ) {
36
+ if ( ! mod || ! mod . __esModule ) return false ;
37
+ var esProps = { __esModule : true , default : true } ;
38
+ for ( var p in mod ) {
39
+ if ( ! esProps [ p ] ) return false ;
40
+ }
41
+ return true ;
42
+ } ;
43
+
44
+ var hasCjsDependencies = function ( deps ) {
45
+ return (
46
+ deps [ 0 ] === "require" && deps [ 1 ] === "exports" && deps [ 2 ] === "module"
47
+ ) ;
48
+ } ;
49
+
50
+ var modules =
51
+ ( global . define && global . define . modules ) ||
52
+ ( global . _define && global . _define . modules ) ||
53
+ { } ;
54
+ var ourDefine = ( global . define = function ( moduleName , deps , callback ) {
55
+ var module ;
56
+ if ( typeof deps === "function" ) {
57
+ callback = deps ;
58
+ deps = [ ] ;
59
+ }
60
+ var args = [ ] ,
61
+ i ;
62
+ for ( i = 0 ; i < deps . length ; i ++ ) {
63
+ args . push (
64
+ exports [ deps [ i ] ]
65
+ ? get ( exports [ deps [ i ] ] )
66
+ : modules [ deps [ i ] ] || get ( deps [ i ] )
67
+ ) ;
68
+ }
69
+ // CJS has no dependencies but 3 callback arguments
70
+ if ( hasCjsDependencies ( deps ) || ( ! deps . length && callback . length ) ) {
71
+ module = { exports : { } } ;
72
+ args [ 0 ] = function ( name ) {
73
+ return exports [ name ] ? get ( exports [ name ] ) : modules [ name ] ;
74
+ } ;
75
+ args [ 1 ] = module . exports ;
76
+ args [ 2 ] = module ;
77
+ } else if ( ! args [ 0 ] && deps [ 0 ] === "exports" ) {
78
+ // Babel uses the exports and module object.
79
+ module = { exports : { } } ;
80
+ args [ 0 ] = module . exports ;
81
+ if ( deps [ 1 ] === "module" ) {
82
+ args [ 1 ] = module ;
83
+ }
84
+ } else if ( ! args [ 0 ] && deps [ 0 ] === "module" ) {
85
+ args [ 0 ] = { id : moduleName } ;
86
+ }
87
+
88
+ global . define = origDefine ;
89
+ var result = callback ? callback . apply ( null , args ) : undefined ;
90
+ global . define = ourDefine ;
91
+
92
+ // Favor CJS module.exports over the return value
93
+ result = module && module . exports ? module . exports : result ;
94
+ modules [ moduleName ] = result ;
95
+
96
+ // Set global exports
97
+ var globalExport = exports [ moduleName ] ;
98
+ if ( globalExport && ! get ( globalExport ) ) {
99
+ if ( useDefault ( result ) ) {
100
+ result = result [ "default" ] ;
101
+ }
102
+ set ( globalExport , result ) ;
103
+ }
104
+ } ) ;
105
+ global . define . orig = origDefine ;
106
+ global . define . modules = modules ;
107
+ global . define . amd = true ;
108
+ ourDefine ( "@loader" , [ ] , function ( ) {
109
+ // shim for @@global -helpers
110
+ var noop = function ( ) { } ;
111
+ return {
112
+ get : function ( ) {
113
+ return { prepareGlobal : noop , retrieveGlobal : noop } ;
114
+ } ,
115
+ global : global ,
116
+ __exec : function ( __load ) {
117
+ doEval ( __load . source , global ) ;
118
+ }
119
+ } ;
120
+ } ) ;
121
+ } ) (
122
+ { } ,
123
+ typeof self == "object" && self . Object == Object
124
+ ? self
125
+ : typeof process === "object" &&
126
+ Object . prototype . toString . call ( process ) === "[object process]"
127
+ ? global
128
+ : window ,
129
+ function ( __$source__ , __$global__ ) {
130
+ // jshint ignore:line
131
+ eval ( "(function() { " + __$source__ + " \n }).call(__$global__);" ) ;
132
+ }
133
+ ) ;
134
+
135
+ /*can-importer@0.0.0#can-importer*/
136
+ define ( 'can-importer' , [
137
+ 'require' ,
138
+ 'exports' ,
139
+ 'module' ,
140
+ 'can-globals/global/global' ,
141
+ 'can-namespace'
142
+ ] , function ( require , exports , module ) {
143
+ ( function ( global , require , exports , module ) {
144
+ 'use strict' ;
145
+ var getGlobal = require ( 'can-globals/global/global' ) ;
146
+ var namespace = require ( 'can-namespace' ) ;
147
+ module . exports = namespace . import = function ( moduleName , parentName ) {
148
+ return new Promise ( function ( resolve , reject ) {
149
+ try {
150
+ var global = getGlobal ( ) ;
151
+ if ( typeof global . System === 'object' && isFunction ( global . System [ 'import' ] ) ) {
152
+ global . System [ 'import' ] ( moduleName , { name : parentName } ) . then ( resolve , reject ) ;
153
+ } else if ( global . define && global . define . amd ) {
154
+ global . require ( [ moduleName ] , function ( value ) {
155
+ resolve ( value ) ;
156
+ } ) ;
157
+ } else if ( global . require ) {
158
+ resolve ( global . require ( moduleName ) ) ;
159
+ } else {
160
+ if ( typeof stealRequire !== 'undefined' ) {
161
+ steal . import ( moduleName , { name : parentName } ) . then ( resolve , reject ) ;
162
+ } else {
163
+ resolve ( ) ;
164
+ }
165
+ }
166
+ } catch ( err ) {
167
+ reject ( err ) ;
168
+ }
169
+ } ) ;
170
+ } ;
171
+ function isFunction ( fn ) {
172
+ return typeof fn === 'function' ;
173
+ }
174
+ } ( function ( ) {
175
+ return this ;
176
+ } ( ) , require , exports , module ) ) ;
177
+ } ) ;
178
+ /*[global-shim-end]*/
179
+ ( function ( global ) { // jshint ignore:line
180
+ global . _define = global . define ;
181
+ global . define = global . define . orig ;
182
+ }
183
+ ) ( typeof self == "object" && self . Object == Object ? self : ( typeof process === "object" && Object . prototype . toString . call ( process ) === "[object process]" ) ? global : window ) ;
0 commit comments