This commit is contained in:
XTT-20201225UUE\Administrator
2021-07-05 21:05:04 +08:00
parent 07337a28ce
commit c11929dc92
108 changed files with 111 additions and 4 deletions
@@ -0,0 +1 @@
{"ast":null,"code":"var _jsxFileName = \"D:\\\\code\\\\React\\\\hooks\\\\2\\\\src\\\\components\\\\counter.js\";\nimport React, { useContext } from 'react';\nimport { context } from './context';\nexport default function Counter() {\n let counterContext = useContext(context); // console.log(counterContext);\n\n return React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 7\n },\n __self: this\n }, \"\\u5B50\\u7EC4\\u4EF6\\u8BA1\\u6570\\u5668:\", counterContext.state.count);\n}","map":{"version":3,"sources":["D:/code/React/hooks/2/src/components/counter.js"],"names":["React","useContext","context","Counter","counterContext","state","count"],"mappings":";AAAA,OAAOA,KAAP,IAAcC,UAAd,QAAgC,OAAhC;AACA,SAAQC,OAAR,QAAsB,WAAtB;AACA,eAAe,SAASC,OAAT,GAAkB;AAC7B,MAAIC,cAAc,GAACH,UAAU,CAACC,OAAD,CAA7B,CAD6B,CAE7B;;AACA,SACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8CACYE,cAAc,CAACC,KAAf,CAAqBC,KADjC,CADJ;AAKH","sourcesContent":["import React,{useContext} from 'react';\r\nimport {context} from './context'\r\nexport default function Counter(){\r\n let counterContext=useContext(context);\r\n // console.log(counterContext);\r\n return (\r\n <div>\r\n 子组件计数器:{counterContext.state.count}\r\n </div>\r\n )\r\n}"]},"metadata":{},"sourceType":"module"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar inherits = require('inherits'),\n IframeTransport = require('../iframe'),\n objectUtils = require('../../utils/object');\n\nmodule.exports = function (transport) {\n function IframeWrapTransport(transUrl, baseUrl) {\n IframeTransport.call(this, transport.transportName, transUrl, baseUrl);\n }\n\n inherits(IframeWrapTransport, IframeTransport);\n\n IframeWrapTransport.enabled = function (url, info) {\n if (!global.document) {\n return false;\n }\n\n var iframeInfo = objectUtils.extend({}, info);\n iframeInfo.sameOrigin = true;\n return transport.enabled(iframeInfo) && IframeTransport.enabled();\n };\n\n IframeWrapTransport.transportName = 'iframe-' + transport.transportName;\n IframeWrapTransport.needBody = true;\n IframeWrapTransport.roundTrips = IframeTransport.roundTrips + transport.roundTrips - 1; // html, javascript (2) + transport - no CORS (1)\n\n IframeWrapTransport.facadeTransport = transport;\n return IframeWrapTransport;\n};","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"import _slicedToArray from \"D:\\\\code\\\\React\\\\hooks\\\\2\\\\node_modules\\\\@babel\\\\runtime/helpers/esm/slicedToArray\";\nvar _jsxFileName = \"D:\\\\code\\\\React\\\\hooks\\\\2\\\\src\\\\App.js\";\nimport React, { useReducer } from 'react';\nimport { defaultState, CounterReducer } from './components/reducer';\nimport Counter from './components/counter';\nimport { context } from './components/context';\nlet icount = 0;\n\nfunction App() {\n let _useReducer = useReducer(CounterReducer, defaultState),\n _useReducer2 = _slicedToArray(_useReducer, 2),\n state = _useReducer2[0],\n dispatch = _useReducer2[1];\n\n return React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 9\n },\n __self: this\n }, React.createElement(context.Provider, {\n value: {\n state,\n dispatch\n },\n __source: {\n fileName: _jsxFileName,\n lineNumber: 10\n },\n __self: this\n }, React.createElement(Counter, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 11\n },\n __self: this\n })), \"\\u8BA1\\u6570\\u5668\\uFF1A\", React.createElement(\"button\", {\n type: \"button\",\n onClick: () => {\n dispatch({\n type: \"inc\",\n payload: {\n count: --icount\n }\n });\n },\n __source: {\n fileName: _jsxFileName,\n lineNumber: 14\n },\n __self: this\n }, \"-\"), state.count, React.createElement(\"button\", {\n type: \"button\",\n onClick: () => {\n dispatch({\n type: \"inc\",\n payload: {\n count: ++icount\n }\n });\n },\n __source: {\n fileName: _jsxFileName,\n lineNumber: 18\n },\n __self: this\n }, \"+\"));\n}\n\nexport default App;","map":{"version":3,"sources":["D:/code/React/hooks/2/src/App.js"],"names":["React","useReducer","defaultState","CounterReducer","Counter","context","icount","App","state","dispatch","type","payload","count"],"mappings":";;AAAA,OAAOA,KAAP,IAAcC,UAAd,QAA+B,OAA/B;AACA,SAAQC,YAAR,EAAqBC,cAArB,QAA0C,sBAA1C;AACA,OAAOC,OAAP,MAAoB,sBAApB;AACA,SAAQC,OAAR,QAAsB,sBAAtB;AACA,IAAIC,MAAM,GAAC,CAAX;;AACA,SAASC,GAAT,GAAc;AAAA,oBACWN,UAAU,CAACE,cAAD,EAAgBD,YAAhB,CADrB;AAAA;AAAA,MACLM,KADK;AAAA,MACCC,QADD;;AAEV,SACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI,oBAAC,OAAD,CAAS,QAAT;AAAkB,IAAA,KAAK,EAAE;AAACD,MAAAA,KAAD;AAAOC,MAAAA;AAAP,KAAzB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI,oBAAC,OAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IADJ,CADJ,8BAKI;AAAQ,IAAA,IAAI,EAAC,QAAb;AACA,IAAA,OAAO,EAAE,MAAI;AAACA,MAAAA,QAAQ,CAAC;AAACC,QAAAA,IAAI,EAAC,KAAN;AAAYC,QAAAA,OAAO,EAAC;AAACC,UAAAA,KAAK,EAAC,EAAEN;AAAT;AAApB,OAAD,CAAR;AAAgD,KAD9D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SALJ,EAQSE,KAAK,CAACI,KARf,EASI;AAAQ,IAAA,IAAI,EAAC,QAAb;AACA,IAAA,OAAO,EAAE,MAAI;AAACH,MAAAA,QAAQ,CAAC;AAACC,QAAAA,IAAI,EAAC,KAAN;AAAYC,QAAAA,OAAO,EAAC;AAACC,UAAAA,KAAK,EAAC,EAAEN;AAAT;AAApB,OAAD,CAAR;AAAgD,KAD9D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SATJ,CADJ;AAeH;;AAED,eAAeC,GAAf","sourcesContent":["import React,{useReducer} from 'react';\r\nimport {defaultState,CounterReducer} from './components/reducer'\r\nimport Counter from './components/counter'\r\nimport {context} from './components/context'\r\nlet icount=0;\r\nfunction App(){\r\n let [state,dispatch]=useReducer(CounterReducer,defaultState);\r\n return (\r\n <div>\r\n <context.Provider value={{state,dispatch}}>\r\n <Counter></Counter>\r\n </context.Provider>\r\n 计数器:\r\n <button type=\"button\"\r\n onClick={()=>{dispatch({type:\"inc\",payload:{count:--icount}})}}\r\n >-</button> \r\n {state.count} \r\n <button type=\"button\"\r\n onClick={()=>{dispatch({type:\"inc\",payload:{count:++icount}})}}\r\n >+</button>\r\n </div>\r\n )\r\n}\r\n\r\nexport default App;\r\n"]},"metadata":{},"sourceType":"module"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar URL = require('url-parse');\n\nvar debug = function () {};\n\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:utils:url');\n}\n\nmodule.exports = {\n getOrigin: function (url) {\n if (!url) {\n return null;\n }\n\n var p = new URL(url);\n\n if (p.protocol === 'file:') {\n return null;\n }\n\n var port = p.port;\n\n if (!port) {\n port = p.protocol === 'https:' ? '443' : '80';\n }\n\n return p.protocol + '//' + p.hostname + ':' + port;\n },\n isOriginEqual: function (a, b) {\n var res = this.getOrigin(a) === this.getOrigin(b);\n debug('same', a, b, res);\n return res;\n },\n isSchemeEqual: function (a, b) {\n return a.split(':')[0] === b.split(':')[0];\n },\n addPath: function (url, path) {\n var qs = url.split('?');\n return qs[0] + path + (qs[1] ? '?' + qs[1] : '');\n },\n addQuery: function (url, q) {\n return url + (url.indexOf('?') === -1 ? '?' + q : '&' + q);\n }\n};","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar urlUtils = require('./utils/url'),\n eventUtils = require('./utils/event'),\n JSON3 = require('json3'),\n FacadeJS = require('./facade'),\n InfoIframeReceiver = require('./info-iframe-receiver'),\n iframeUtils = require('./utils/iframe'),\n loc = require('./location');\n\nvar debug = function () {};\n\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:iframe-bootstrap');\n}\n\nmodule.exports = function (SockJS, availableTransports) {\n var transportMap = {};\n availableTransports.forEach(function (at) {\n if (at.facadeTransport) {\n transportMap[at.facadeTransport.transportName] = at.facadeTransport;\n }\n }); // hard-coded for the info iframe\n // TODO see if we can make this more dynamic\n\n transportMap[InfoIframeReceiver.transportName] = InfoIframeReceiver;\n var parentOrigin;\n /* eslint-disable camelcase */\n\n SockJS.bootstrap_iframe = function () {\n /* eslint-enable camelcase */\n var facade;\n iframeUtils.currentWindowId = loc.hash.slice(1);\n\n var onMessage = function (e) {\n if (e.source !== parent) {\n return;\n }\n\n if (typeof parentOrigin === 'undefined') {\n parentOrigin = e.origin;\n }\n\n if (e.origin !== parentOrigin) {\n return;\n }\n\n var iframeMessage;\n\n try {\n iframeMessage = JSON3.parse(e.data);\n } catch (ignored) {\n debug('bad json', e.data);\n return;\n }\n\n if (iframeMessage.windowId !== iframeUtils.currentWindowId) {\n return;\n }\n\n switch (iframeMessage.type) {\n case 's':\n var p;\n\n try {\n p = JSON3.parse(iframeMessage.data);\n } catch (ignored) {\n debug('bad json', iframeMessage.data);\n break;\n }\n\n var version = p[0];\n var transport = p[1];\n var transUrl = p[2];\n var baseUrl = p[3];\n debug(version, transport, transUrl, baseUrl); // change this to semver logic\n\n if (version !== SockJS.version) {\n throw new Error('Incompatible SockJS! Main site uses:' + ' \"' + version + '\", the iframe:' + ' \"' + SockJS.version + '\".');\n }\n\n if (!urlUtils.isOriginEqual(transUrl, loc.href) || !urlUtils.isOriginEqual(baseUrl, loc.href)) {\n throw new Error('Can\\'t connect to different domain from within an ' + 'iframe. (' + loc.href + ', ' + transUrl + ', ' + baseUrl + ')');\n }\n\n facade = new FacadeJS(new transportMap[transport](transUrl, baseUrl));\n break;\n\n case 'm':\n facade._send(iframeMessage.data);\n\n break;\n\n case 'c':\n if (facade) {\n facade._close();\n }\n\n facade = null;\n break;\n }\n };\n\n eventUtils.attachEvent('message', onMessage); // Start\n\n iframeUtils.postMessage('s');\n };\n};","map":null,"metadata":{},"sourceType":"script"}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"ast":null,"code":"var conversions = require('./conversions');\n\nvar route = require('./route');\n\nvar convert = {};\nvar models = Object.keys(conversions);\n\nfunction wrapRaw(fn) {\n var wrappedFn = function (args) {\n if (args === undefined || args === null) {\n return args;\n }\n\n if (arguments.length > 1) {\n args = Array.prototype.slice.call(arguments);\n }\n\n return fn(args);\n }; // preserve .conversion property if there is one\n\n\n if ('conversion' in fn) {\n wrappedFn.conversion = fn.conversion;\n }\n\n return wrappedFn;\n}\n\nfunction wrapRounded(fn) {\n var wrappedFn = function (args) {\n if (args === undefined || args === null) {\n return args;\n }\n\n if (arguments.length > 1) {\n args = Array.prototype.slice.call(arguments);\n }\n\n var result = fn(args); // we're assuming the result is an array here.\n // see notice in conversions.js; don't use box types\n // in conversion functions.\n\n if (typeof result === 'object') {\n for (var len = result.length, i = 0; i < len; i++) {\n result[i] = Math.round(result[i]);\n }\n }\n\n return result;\n }; // preserve .conversion property if there is one\n\n\n if ('conversion' in fn) {\n wrappedFn.conversion = fn.conversion;\n }\n\n return wrappedFn;\n}\n\nmodels.forEach(function (fromModel) {\n convert[fromModel] = {};\n Object.defineProperty(convert[fromModel], 'channels', {\n value: conversions[fromModel].channels\n });\n Object.defineProperty(convert[fromModel], 'labels', {\n value: conversions[fromModel].labels\n });\n var routes = route(fromModel);\n var routeModels = Object.keys(routes);\n routeModels.forEach(function (toModel) {\n var fn = routes[toModel];\n convert[fromModel][toModel] = wrapRounded(fn);\n convert[fromModel][toModel].raw = wrapRaw(fn);\n });\n});\nmodule.exports = convert;","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict'; // Few cool transports do work only for same-origin. In order to make\n// them work cross-domain we shall use iframe, served from the\n// remote domain. New browsers have capabilities to communicate with\n// cross domain iframe using postMessage(). In IE it was implemented\n// from IE 8+, but of course, IE got some details wrong:\n// http://msdn.microsoft.com/en-us/library/cc197015(v=VS.85).aspx\n// http://stevesouders.com/misc/test-postmessage.php\n\nvar inherits = require('inherits'),\n JSON3 = require('json3'),\n EventEmitter = require('events').EventEmitter,\n version = require('../version'),\n urlUtils = require('../utils/url'),\n iframeUtils = require('../utils/iframe'),\n eventUtils = require('../utils/event'),\n random = require('../utils/random');\n\nvar debug = function () {};\n\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:transport:iframe');\n}\n\nfunction IframeTransport(transport, transUrl, baseUrl) {\n if (!IframeTransport.enabled()) {\n throw new Error('Transport created when disabled');\n }\n\n EventEmitter.call(this);\n var self = this;\n this.origin = urlUtils.getOrigin(baseUrl);\n this.baseUrl = baseUrl;\n this.transUrl = transUrl;\n this.transport = transport;\n this.windowId = random.string(8);\n var iframeUrl = urlUtils.addPath(baseUrl, '/iframe.html') + '#' + this.windowId;\n debug(transport, transUrl, iframeUrl);\n this.iframeObj = iframeUtils.createIframe(iframeUrl, function (r) {\n debug('err callback');\n self.emit('close', 1006, 'Unable to load an iframe (' + r + ')');\n self.close();\n });\n this.onmessageCallback = this._message.bind(this);\n eventUtils.attachEvent('message', this.onmessageCallback);\n}\n\ninherits(IframeTransport, EventEmitter);\n\nIframeTransport.prototype.close = function () {\n debug('close');\n this.removeAllListeners();\n\n if (this.iframeObj) {\n eventUtils.detachEvent('message', this.onmessageCallback);\n\n try {\n // When the iframe is not loaded, IE raises an exception\n // on 'contentWindow'.\n this.postMessage('c');\n } catch (x) {// intentionally empty\n }\n\n this.iframeObj.cleanup();\n this.iframeObj = null;\n this.onmessageCallback = this.iframeObj = null;\n }\n};\n\nIframeTransport.prototype._message = function (e) {\n debug('message', e.data);\n\n if (!urlUtils.isOriginEqual(e.origin, this.origin)) {\n debug('not same origin', e.origin, this.origin);\n return;\n }\n\n var iframeMessage;\n\n try {\n iframeMessage = JSON3.parse(e.data);\n } catch (ignored) {\n debug('bad json', e.data);\n return;\n }\n\n if (iframeMessage.windowId !== this.windowId) {\n debug('mismatched window id', iframeMessage.windowId, this.windowId);\n return;\n }\n\n switch (iframeMessage.type) {\n case 's':\n this.iframeObj.loaded(); // window global dependency\n\n this.postMessage('s', JSON3.stringify([version, this.transport, this.transUrl, this.baseUrl]));\n break;\n\n case 't':\n this.emit('message', iframeMessage.data);\n break;\n\n case 'c':\n var cdata;\n\n try {\n cdata = JSON3.parse(iframeMessage.data);\n } catch (ignored) {\n debug('bad json', iframeMessage.data);\n return;\n }\n\n this.emit('close', cdata[0], cdata[1]);\n this.close();\n break;\n }\n};\n\nIframeTransport.prototype.postMessage = function (type, data) {\n debug('postMessage', type, data);\n this.iframeObj.post(JSON3.stringify({\n windowId: this.windowId,\n type: type,\n data: data || ''\n }), this.origin);\n};\n\nIframeTransport.prototype.send = function (message) {\n debug('send', message);\n this.postMessage('m', message);\n};\n\nIframeTransport.enabled = function () {\n return iframeUtils.iframeEnabled;\n};\n\nIframeTransport.transportName = 'iframe';\nIframeTransport.roundTrips = 2;\nmodule.exports = IframeTransport;","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar EventEmitter = require('events').EventEmitter,\n inherits = require('inherits'),\n urlUtils = require('./utils/url'),\n XDR = require('./transport/sender/xdr'),\n XHRCors = require('./transport/sender/xhr-cors'),\n XHRLocal = require('./transport/sender/xhr-local'),\n XHRFake = require('./transport/sender/xhr-fake'),\n InfoIframe = require('./info-iframe'),\n InfoAjax = require('./info-ajax');\n\nvar debug = function () {};\n\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:info-receiver');\n}\n\nfunction InfoReceiver(baseUrl, urlInfo) {\n debug(baseUrl);\n var self = this;\n EventEmitter.call(this);\n setTimeout(function () {\n self.doXhr(baseUrl, urlInfo);\n }, 0);\n}\n\ninherits(InfoReceiver, EventEmitter); // TODO this is currently ignoring the list of available transports and the whitelist\n\nInfoReceiver._getReceiver = function (baseUrl, url, urlInfo) {\n // determine method of CORS support (if needed)\n if (urlInfo.sameOrigin) {\n return new InfoAjax(url, XHRLocal);\n }\n\n if (XHRCors.enabled) {\n return new InfoAjax(url, XHRCors);\n }\n\n if (XDR.enabled && urlInfo.sameScheme) {\n return new InfoAjax(url, XDR);\n }\n\n if (InfoIframe.enabled()) {\n return new InfoIframe(baseUrl, url);\n }\n\n return new InfoAjax(url, XHRFake);\n};\n\nInfoReceiver.prototype.doXhr = function (baseUrl, urlInfo) {\n var self = this,\n url = urlUtils.addPath(baseUrl, '/info');\n debug('doXhr', url);\n this.xo = InfoReceiver._getReceiver(baseUrl, url, urlInfo);\n this.timeoutRef = setTimeout(function () {\n debug('timeout');\n\n self._cleanup(false);\n\n self.emit('finish');\n }, InfoReceiver.timeout);\n this.xo.once('finish', function (info, rtt) {\n debug('finish', info, rtt);\n\n self._cleanup(true);\n\n self.emit('finish', info, rtt);\n });\n};\n\nInfoReceiver.prototype._cleanup = function (wasClean) {\n debug('_cleanup');\n clearTimeout(this.timeoutRef);\n this.timeoutRef = null;\n\n if (!wasClean && this.xo) {\n this.xo.close();\n }\n\n this.xo = null;\n};\n\nInfoReceiver.prototype.close = function () {\n debug('close');\n this.removeAllListeners();\n\n this._cleanup(false);\n};\n\nInfoReceiver.timeout = 8000;\nmodule.exports = InfoReceiver;","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"/*\r\nobject-assign\r\n(c) Sindre Sorhus\r\n@license MIT\r\n*/\n'use strict';\n/* eslint-disable no-unused-vars */\n\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n if (val === null || val === undefined) {\n throw new TypeError('Object.assign cannot be called with null or undefined');\n }\n\n return Object(val);\n}\n\nfunction shouldUseNative() {\n try {\n if (!Object.assign) {\n return false;\n } // Detect buggy property enumeration order in older V8 versions.\n // https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\n\n var test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\n test1[5] = 'de';\n\n if (Object.getOwnPropertyNames(test1)[0] === '5') {\n return false;\n } // https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\n\n var test2 = {};\n\n for (var i = 0; i < 10; i++) {\n test2['_' + String.fromCharCode(i)] = i;\n }\n\n var order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n return test2[n];\n });\n\n if (order2.join('') !== '0123456789') {\n return false;\n } // https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\n\n var test3 = {};\n 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n test3[letter] = letter;\n });\n\n if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {\n return false;\n }\n\n return true;\n } catch (err) {\n // We don't expect any of the above to throw, but better to be safe.\n return false;\n }\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n var from;\n var to = toObject(target);\n var symbols;\n\n for (var s = 1; s < arguments.length; s++) {\n from = Object(arguments[s]);\n\n for (var key in from) {\n if (hasOwnProperty.call(from, key)) {\n to[key] = from[key];\n }\n }\n\n if (getOwnPropertySymbols) {\n symbols = getOwnPropertySymbols(from);\n\n for (var i = 0; i < symbols.length; i++) {\n if (propIsEnumerable.call(from, symbols[i])) {\n to[symbols[i]] = from[symbols[i]];\n }\n }\n }\n }\n\n return to;\n};","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"var conversions = require('./conversions');\n/*\r\n\tthis function routes a model to all other models.\r\n\r\n\tall functions that are routed have a property `.conversion` attached\r\n\tto the returned synthetic function. This property is an array\r\n\tof strings, each with the steps in between the 'from' and 'to'\r\n\tcolor models (inclusive).\r\n\r\n\tconversions that are not possible simply are not included.\r\n*/\n\n\nfunction buildGraph() {\n var graph = {}; // https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\n var models = Object.keys(conversions);\n\n for (var len = models.length, i = 0; i < len; i++) {\n graph[models[i]] = {\n // http://jsperf.com/1-vs-infinity\n // micro-opt, but this is simple.\n distance: -1,\n parent: null\n };\n }\n\n return graph;\n} // https://en.wikipedia.org/wiki/Breadth-first_search\n\n\nfunction deriveBFS(fromModel) {\n var graph = buildGraph();\n var queue = [fromModel]; // unshift -> queue -> pop\n\n graph[fromModel].distance = 0;\n\n while (queue.length) {\n var current = queue.pop();\n var adjacents = Object.keys(conversions[current]);\n\n for (var len = adjacents.length, i = 0; i < len; i++) {\n var adjacent = adjacents[i];\n var node = graph[adjacent];\n\n if (node.distance === -1) {\n node.distance = graph[current].distance + 1;\n node.parent = current;\n queue.unshift(adjacent);\n }\n }\n }\n\n return graph;\n}\n\nfunction link(from, to) {\n return function (args) {\n return to(from(args));\n };\n}\n\nfunction wrapConversion(toModel, graph) {\n var path = [graph[toModel].parent, toModel];\n var fn = conversions[graph[toModel].parent][toModel];\n var cur = graph[toModel].parent;\n\n while (graph[cur].parent) {\n path.unshift(graph[cur].parent);\n fn = link(conversions[graph[cur].parent][cur], fn);\n cur = graph[cur].parent;\n }\n\n fn.conversion = path;\n return fn;\n}\n\nmodule.exports = function (fromModel) {\n var graph = deriveBFS(fromModel);\n var conversion = {};\n var models = Object.keys(graph);\n\n for (var len = models.length, i = 0; i < len; i++) {\n var toModel = models[i];\n var node = graph[toModel];\n\n if (node.parent === null) {\n // no possible conversion, or this node is the source model.\n continue;\n }\n\n conversion[toModel] = wrapConversion(toModel, graph);\n }\n\n return conversion;\n};","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar inherits = require('inherits'),\n Event = require('./event');\n\nfunction TransportMessageEvent(data) {\n Event.call(this);\n this.initEvent('message', false, false);\n this.data = data;\n}\n\ninherits(TransportMessageEvent, Event);\nmodule.exports = TransportMessageEvent;","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nexports.decode = exports.parse = require('./decode');\nexports.encode = exports.stringify = require('./encode');","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"var g; // This works in non-strict mode\n\ng = function () {\n return this;\n}();\n\ntry {\n // This works if eval is allowed (see CSP)\n g = g || new Function(\"return this\")();\n} catch (e) {\n // This works if the window reference is available\n if (typeof window === \"object\") g = window;\n} // g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\n\nmodule.exports = g;","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"/**\r\n * Helpers.\r\n */\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n/**\r\n * Parse or format the given `val`.\r\n *\r\n * Options:\r\n *\r\n * - `long` verbose formatting [false]\r\n *\r\n * @param {String|Number} val\r\n * @param {Object} [options]\r\n * @throws {Error} throw an error if val is not a non-empty string or a number\r\n * @return {String|Number}\r\n * @api public\r\n */\n\nmodule.exports = function (val, options) {\n options = options || {};\n var type = typeof val;\n\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n\n throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val));\n};\n/**\r\n * Parse the given `str` and return milliseconds.\r\n *\r\n * @param {String} str\r\n * @return {Number}\r\n * @api private\r\n */\n\n\nfunction parse(str) {\n str = String(str);\n\n if (str.length > 100) {\n return;\n }\n\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);\n\n if (!match) {\n return;\n }\n\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n\n default:\n return undefined;\n }\n}\n/**\r\n * Short format for `ms`.\r\n *\r\n * @param {Number} ms\r\n * @return {String}\r\n * @api private\r\n */\n\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n\n return ms + 'ms';\n}\n/**\r\n * Long format for `ms`.\r\n *\r\n * @param {Number} ms\r\n * @return {String}\r\n * @api private\r\n */\n\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n\n return ms + ' ms';\n}\n/**\r\n * Pluralization helper.\r\n */\n\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"\"use strict\";\n/*\r\n MIT License http://www.opensource.org/licenses/mit-license.php\r\n Author Tobias Koppers @sokra\r\n*/\n// css base code, injected by the css-loader\n\nmodule.exports = function (useSourceMap) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item, useSourceMap);\n\n if (item[2]) {\n return '@media ' + item[2] + '{' + content + '}';\n } else {\n return content;\n }\n }).join('');\n }; // import a list of modules into the list\n\n\n list.i = function (modules, mediaQuery) {\n if (typeof modules === 'string') {\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n for (var i = 0; i < this.length; i++) {\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n\n for (i = 0; i < modules.length; i++) {\n var item = modules[i]; // skip already imported module\n // this implementation is not 100% perfect for weird media query combinations\n // when a module is imported multiple times with different media queries.\n // I hope this will never occur (Hey this way we have smaller bundles)\n\n if (item[0] == null || !alreadyImportedModules[item[0]]) {\n if (mediaQuery && !item[2]) {\n item[2] = mediaQuery;\n } else if (mediaQuery) {\n item[2] = '(' + item[2] + ') and (' + mediaQuery + ')';\n }\n\n list.push(item);\n }\n }\n };\n\n return list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n var content = item[1] || '';\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (useSourceMap && typeof btoa === 'function') {\n var sourceMapping = toComment(cssMapping);\n var sourceURLs = cssMapping.sources.map(function (source) {\n return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */';\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n }\n\n return [content].join('\\n');\n} // Adapted from convert-source-map (MIT)\n\n\nfunction toComment(sourceMap) {\n // eslint-disable-next-line no-undef\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n return '/*# ' + data + ' */';\n}","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"var _jsxFileName = \"D:\\\\code\\\\React\\\\hooks\\\\2\\\\src\\\\index.js\";\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport './assets/css/common/public.css';\nimport App from './App';\nimport * as serviceWorker from './serviceWorker';\nReactDOM.render(React.createElement(App, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 7\n },\n __self: this\n}), document.getElementById('root')); // If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\n\nserviceWorker.unregister();","map":{"version":3,"sources":["D:/code/React/hooks/2/src/index.js"],"names":["React","ReactDOM","App","serviceWorker","render","document","getElementById","unregister"],"mappings":";AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,QAAP,MAAqB,WAArB;AACA,OAAO,gCAAP;AACA,OAAOC,GAAP,MAAgB,OAAhB;AACA,OAAO,KAAKC,aAAZ,MAA+B,iBAA/B;AAEAF,QAAQ,CAACG,MAAT,CAAgB,oBAAC,GAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAhB,EAAyBC,QAAQ,CAACC,cAAT,CAAwB,MAAxB,CAAzB,E,CAEA;AACA;AACA;;AACAH,aAAa,CAACI,UAAd","sourcesContent":["import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport './assets/css/common/public.css';\r\nimport App from './App';\r\nimport * as serviceWorker from './serviceWorker';\r\n\r\nReactDOM.render(<App />, document.getElementById('root'));\r\n\r\n// If you want your app to work offline and load faster, you can change\r\n// unregister() to register() below. Note this comes with some pitfalls.\r\n// Learn more about service workers: https://bit.ly/CRA-PWA\r\nserviceWorker.unregister();\r\n"]},"metadata":{},"sourceType":"module"}
@@ -0,0 +1 @@
{"ast":null,"code":"if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor;\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor;\n\n var TempCtor = function () {};\n\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n };\n}","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar inherits = require('inherits'),\n AjaxBasedTransport = require('./lib/ajax-based'),\n XhrReceiver = require('./receiver/xhr'),\n XHRCorsObject = require('./sender/xhr-cors'),\n XHRLocalObject = require('./sender/xhr-local');\n\nfunction XhrPollingTransport(transUrl) {\n if (!XHRLocalObject.enabled && !XHRCorsObject.enabled) {\n throw new Error('Transport created when disabled');\n }\n\n AjaxBasedTransport.call(this, transUrl, '/xhr', XhrReceiver, XHRCorsObject);\n}\n\ninherits(XhrPollingTransport, AjaxBasedTransport);\n\nXhrPollingTransport.enabled = function (info) {\n if (info.nullOrigin) {\n return false;\n }\n\n if (XHRLocalObject.enabled && info.sameOrigin) {\n return true;\n }\n\n return XHRCorsObject.enabled;\n};\n\nXhrPollingTransport.transportName = 'xhr-polling';\nXhrPollingTransport.roundTrips = 2; // preflight, ajax\n\nmodule.exports = XhrPollingTransport;","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nmodule.exports = {\n stdout: false,\n stderr: false\n};","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n/* Simplified implementation of DOM2 EventTarget.\r\n * http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-EventTarget\r\n */\n\nfunction EventTarget() {\n this._listeners = {};\n}\n\nEventTarget.prototype.addEventListener = function (eventType, listener) {\n if (!(eventType in this._listeners)) {\n this._listeners[eventType] = [];\n }\n\n var arr = this._listeners[eventType]; // #4\n\n if (arr.indexOf(listener) === -1) {\n // Make a copy so as not to interfere with a current dispatchEvent.\n arr = arr.concat([listener]);\n }\n\n this._listeners[eventType] = arr;\n};\n\nEventTarget.prototype.removeEventListener = function (eventType, listener) {\n var arr = this._listeners[eventType];\n\n if (!arr) {\n return;\n }\n\n var idx = arr.indexOf(listener);\n\n if (idx !== -1) {\n if (arr.length > 1) {\n // Make a copy so as not to interfere with a current dispatchEvent.\n this._listeners[eventType] = arr.slice(0, idx).concat(arr.slice(idx + 1));\n } else {\n delete this._listeners[eventType];\n }\n\n return;\n }\n};\n\nEventTarget.prototype.dispatchEvent = function () {\n var event = arguments[0];\n var t = event.type; // equivalent of Array.prototype.slice.call(arguments, 0);\n\n var args = arguments.length === 1 ? [event] : Array.apply(null, arguments); // TODO: This doesn't match the real behavior; per spec, onfoo get\n // their place in line from the /first/ time they're set from\n // non-null. Although WebKit bumps it to the end every time it's\n // set.\n\n if (this['on' + t]) {\n this['on' + t].apply(this, args);\n }\n\n if (t in this._listeners) {\n // Grab a reference to the listeners list. removeEventListener may alter the list.\n var listeners = this._listeners[t];\n\n for (var i = 0; i < listeners.length; i++) {\n listeners[i].apply(this, args);\n }\n }\n};\n\nmodule.exports = EventTarget;","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"import React from 'react';\nexport const context = React.createContext();","map":{"version":3,"sources":["D:/code/React/hooks/2/src/components/context/index.js"],"names":["React","context","createContext"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAO,MAAMC,OAAO,GAAED,KAAK,CAACE,aAAN,EAAf","sourcesContent":["import React from 'react';\r\nexport const context =React.createContext();"]},"metadata":{},"sourceType":"module"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar inherits = require('inherits'),\n AjaxBasedTransport = require('./lib/ajax-based'),\n XhrReceiver = require('./receiver/xhr'),\n XDRObject = require('./sender/xdr'); // According to:\n// http://stackoverflow.com/questions/1641507/detect-browser-support-for-cross-domain-xmlhttprequests\n// http://hacks.mozilla.org/2009/07/cross-site-xmlhttprequest-with-cors/\n\n\nfunction XdrStreamingTransport(transUrl) {\n if (!XDRObject.enabled) {\n throw new Error('Transport created when disabled');\n }\n\n AjaxBasedTransport.call(this, transUrl, '/xhr_streaming', XhrReceiver, XDRObject);\n}\n\ninherits(XdrStreamingTransport, AjaxBasedTransport);\n\nXdrStreamingTransport.enabled = function (info) {\n if (info.cookie_needed || info.nullOrigin) {\n return false;\n }\n\n return XDRObject.enabled && info.sameScheme;\n};\n\nXdrStreamingTransport.transportName = 'xdr-streaming';\nXdrStreamingTransport.roundTrips = 2; // preflight, ajax\n\nmodule.exports = XdrStreamingTransport;","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict'; // The simplest and most robust transport, using the well-know cross\n// domain hack - JSONP. This transport is quite inefficient - one\n// message could use up to one http request. But at least it works almost\n// everywhere.\n// Known limitations:\n// o you will get a spinning cursor\n// o for Konqueror a dumb timer is needed to detect errors\n\nvar inherits = require('inherits'),\n SenderReceiver = require('./lib/sender-receiver'),\n JsonpReceiver = require('./receiver/jsonp'),\n jsonpSender = require('./sender/jsonp');\n\nfunction JsonPTransport(transUrl) {\n if (!JsonPTransport.enabled()) {\n throw new Error('Transport created when disabled');\n }\n\n SenderReceiver.call(this, transUrl, '/jsonp', jsonpSender, JsonpReceiver);\n}\n\ninherits(JsonPTransport, SenderReceiver);\n\nJsonPTransport.enabled = function () {\n return !!global.document;\n};\n\nJsonPTransport.transportName = 'jsonp-polling';\nJsonPTransport.roundTrips = 1;\nJsonPTransport.needBody = true;\nmodule.exports = JsonPTransport;","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}","map":null,"metadata":{},"sourceType":"script"}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"ast":null,"code":"/**\r\n * Copyright (c) 2015-present, Facebook, Inc.\r\n *\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE file in the root directory of this source tree.\r\n */\n'use strict';\n\nvar _slicedToArray = require(\"D:\\\\code\\\\React\\\\hooks\\\\2\\\\node_modules\\\\@babel\\\\runtime/helpers/slicedToArray\");\n\nconst chalk = require('chalk');\n\nconst friendlySyntaxErrorLabel = 'Syntax error:';\n\nfunction isLikelyASyntaxError(message) {\n return message.indexOf(friendlySyntaxErrorLabel) !== -1;\n} // Cleans up webpack error messages.\n\n\nfunction formatMessage(message) {\n let lines = message.split('\\n'); // Strip Webpack-added headers off errors/warnings\n // https://github.com/webpack/webpack/blob/master/lib/ModuleError.js\n\n lines = lines.filter(line => !/Module [A-z ]+\\(from/.test(line)); // Transform parsing error into syntax error\n // TODO: move this to our ESLint formatter?\n\n lines = lines.map(line => {\n const parsingError = /Line (\\d+):(?:(\\d+):)?\\s*Parsing error: (.+)$/.exec(line);\n\n if (!parsingError) {\n return line;\n }\n\n const _parsingError = _slicedToArray(parsingError, 4),\n errorLine = _parsingError[1],\n errorColumn = _parsingError[2],\n errorMessage = _parsingError[3];\n\n return \"\".concat(friendlySyntaxErrorLabel, \" \").concat(errorMessage, \" (\").concat(errorLine, \":\").concat(errorColumn, \")\");\n });\n message = lines.join('\\n'); // Smoosh syntax errors (commonly found in CSS)\n\n message = message.replace(/SyntaxError\\s+\\((\\d+):(\\d+)\\)\\s*(.+?)\\n/g, \"\".concat(friendlySyntaxErrorLabel, \" $3 ($1:$2)\\n\")); // Clean up export errors\n\n message = message.replace(/^.*export '(.+?)' was not found in '(.+?)'.*$/gm, \"Attempted import error: '$1' is not exported from '$2'.\");\n message = message.replace(/^.*export 'default' \\(imported as '(.+?)'\\) was not found in '(.+?)'.*$/gm, \"Attempted import error: '$2' does not contain a default export (imported as '$1').\");\n message = message.replace(/^.*export '(.+?)' \\(imported as '(.+?)'\\) was not found in '(.+?)'.*$/gm, \"Attempted import error: '$1' is not exported from '$3' (imported as '$2').\");\n lines = message.split('\\n'); // Remove leading newline\n\n if (lines.length > 2 && lines[1].trim() === '') {\n lines.splice(1, 1);\n } // Clean up file name\n\n\n lines[0] = lines[0].replace(/^(.*) \\d+:\\d+-\\d+$/, '$1'); // Cleans up verbose \"module not found\" messages for files and packages.\n\n if (lines[1] && lines[1].indexOf('Module not found: ') === 0) {\n lines = [lines[0], lines[1].replace('Error: ', '').replace('Module not found: Cannot find file:', 'Cannot find file:')];\n } // Add helpful message for users trying to use Sass for the first time\n\n\n if (lines[1] && lines[1].match(/Cannot find module.+node-sass/)) {\n lines[1] = 'To import Sass files, you first need to install node-sass.\\n';\n lines[1] += 'Run `npm install node-sass` or `yarn add node-sass` inside your workspace.';\n }\n\n lines[0] = chalk.inverse(lines[0]);\n message = lines.join('\\n'); // Internal stacks are generally useless so we strip them... with the\n // exception of stacks containing `webpack:` because they're normally\n // from user code generated by Webpack. For more information see\n // https://github.com/facebook/create-react-app/pull/1050\n\n message = message.replace(/^\\s*at\\s((?!webpack:).)*:\\d+:\\d+[\\s)]*(\\n|$)/gm, ''); // at ... ...:x:y\n\n message = message.replace(/^\\s*at\\s<anonymous>(\\n|$)/gm, ''); // at <anonymous>\n\n lines = message.split('\\n'); // Remove duplicated newlines\n\n lines = lines.filter((line, index, arr) => index === 0 || line.trim() !== '' || line.trim() !== arr[index - 1].trim()); // Reassemble the message\n\n message = lines.join('\\n');\n return message.trim();\n}\n\nfunction formatWebpackMessages(json) {\n const formattedErrors = json.errors.map(function (message) {\n return formatMessage(message, true);\n });\n const formattedWarnings = json.warnings.map(function (message) {\n return formatMessage(message, false);\n });\n const result = {\n errors: formattedErrors,\n warnings: formattedWarnings\n };\n\n if (result.errors.some(isLikelyASyntaxError)) {\n // If there are any syntax errors, show just them.\n result.errors = result.errors.filter(isLikelyASyntaxError);\n }\n\n return result;\n}\n\nmodule.exports = formatWebpackMessages;","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nmodule.exports = options => {\n options = Object.assign({\n onlyFirst: false\n }, options);\n const pattern = ['[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:[a-zA-Z\\\\d]*(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?\\\\u0007)', '(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-ntqry=><~]))'].join('|');\n return new RegExp(pattern, options.onlyFirst ? undefined : 'g');\n};","map":null,"metadata":{},"sourceType":"script"}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n/* global crypto:true */\n\nvar crypto = require('crypto'); // This string has length 32, a power of 2, so the modulus doesn't introduce a\n// bias.\n\n\nvar _randomStringChars = 'abcdefghijklmnopqrstuvwxyz012345';\nmodule.exports = {\n string: function (length) {\n var max = _randomStringChars.length;\n var bytes = crypto.randomBytes(length);\n var ret = [];\n\n for (var i = 0; i < length; i++) {\n ret.push(_randomStringChars.substr(bytes[i] % max, 1));\n }\n\n return ret.join('');\n },\n number: function (max) {\n return Math.floor(Math.random() * max);\n },\n numberString: function (max) {\n var t = ('' + (max - 1)).length;\n var p = new Array(t + 1).join('0');\n return (p + this.number(max)).slice(-t);\n }\n};","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar inherits = require('inherits'),\n XhrDriver = require('../driver/xhr');\n\nfunction XHRCorsObject(method, url, payload, opts) {\n XhrDriver.call(this, method, url, payload, opts);\n}\n\ninherits(XHRCorsObject, XhrDriver);\nXHRCorsObject.enabled = XhrDriver.enabled && XhrDriver.supportsCORS;\nmodule.exports = XHRCorsObject;","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar inherits = require('inherits'),\n HtmlfileReceiver = require('./receiver/htmlfile'),\n XHRLocalObject = require('./sender/xhr-local'),\n AjaxBasedTransport = require('./lib/ajax-based');\n\nfunction HtmlFileTransport(transUrl) {\n if (!HtmlfileReceiver.enabled) {\n throw new Error('Transport created when disabled');\n }\n\n AjaxBasedTransport.call(this, transUrl, '/htmlfile', HtmlfileReceiver, XHRLocalObject);\n}\n\ninherits(HtmlFileTransport, AjaxBasedTransport);\n\nHtmlFileTransport.enabled = function (info) {\n return HtmlfileReceiver.enabled && info.sameOrigin;\n};\n\nHtmlFileTransport.transportName = 'htmlfile';\nHtmlFileTransport.roundTrips = 2;\nmodule.exports = HtmlFileTransport;","map":null,"metadata":{},"sourceType":"script"}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nmodule.exports = {\n isString: function (arg) {\n return typeof arg === 'string';\n },\n isObject: function (arg) {\n return typeof arg === 'object' && arg !== null;\n },\n isNull: function (arg) {\n return arg === null;\n },\n isNullOrUndefined: function (arg) {\n return arg == null;\n }\n};","map":null,"metadata":{},"sourceType":"script"}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar inherits = require('inherits'),\n EventEmitter = require('events').EventEmitter;\n\nvar debug = function () {};\n\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:buffered-sender');\n}\n\nfunction BufferedSender(url, sender) {\n debug(url);\n EventEmitter.call(this);\n this.sendBuffer = [];\n this.sender = sender;\n this.url = url;\n}\n\ninherits(BufferedSender, EventEmitter);\n\nBufferedSender.prototype.send = function (message) {\n debug('send', message);\n this.sendBuffer.push(message);\n\n if (!this.sendStop) {\n this.sendSchedule();\n }\n}; // For polling transports in a situation when in the message callback,\n// new message is being send. If the sending connection was started\n// before receiving one, it is possible to saturate the network and\n// timeout due to the lack of receiving socket. To avoid that we delay\n// sending messages by some small time, in order to let receiving\n// connection be started beforehand. This is only a halfmeasure and\n// does not fix the big problem, but it does make the tests go more\n// stable on slow networks.\n\n\nBufferedSender.prototype.sendScheduleWait = function () {\n debug('sendScheduleWait');\n var self = this;\n var tref;\n\n this.sendStop = function () {\n debug('sendStop');\n self.sendStop = null;\n clearTimeout(tref);\n };\n\n tref = setTimeout(function () {\n debug('timeout');\n self.sendStop = null;\n self.sendSchedule();\n }, 25);\n};\n\nBufferedSender.prototype.sendSchedule = function () {\n debug('sendSchedule', this.sendBuffer.length);\n var self = this;\n\n if (this.sendBuffer.length > 0) {\n var payload = '[' + this.sendBuffer.join(',') + ']';\n this.sendStop = this.sender(this.url, payload, function (err) {\n self.sendStop = null;\n\n if (err) {\n debug('error', err);\n self.emit('close', err.code || 1006, 'Sending error: ' + err);\n self.close();\n } else {\n self.sendScheduleWait();\n }\n });\n this.sendBuffer = [];\n }\n};\n\nBufferedSender.prototype._cleanup = function () {\n debug('_cleanup');\n this.removeAllListeners();\n};\n\nBufferedSender.prototype.close = function () {\n debug('close');\n\n this._cleanup();\n\n if (this.sendStop) {\n this.sendStop();\n this.sendStop = null;\n }\n};\n\nmodule.exports = BufferedSender;","map":null,"metadata":{},"sourceType":"script"}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar inherits = require('inherits'),\n iframeUtils = require('../../utils/iframe'),\n urlUtils = require('../../utils/url'),\n EventEmitter = require('events').EventEmitter,\n random = require('../../utils/random');\n\nvar debug = function () {};\n\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:receiver:htmlfile');\n}\n\nfunction HtmlfileReceiver(url) {\n debug(url);\n EventEmitter.call(this);\n var self = this;\n iframeUtils.polluteGlobalNamespace();\n this.id = 'a' + random.string(6);\n url = urlUtils.addQuery(url, 'c=' + decodeURIComponent(iframeUtils.WPrefix + '.' + this.id));\n debug('using htmlfile', HtmlfileReceiver.htmlfileEnabled);\n var constructFunc = HtmlfileReceiver.htmlfileEnabled ? iframeUtils.createHtmlfile : iframeUtils.createIframe;\n global[iframeUtils.WPrefix][this.id] = {\n start: function () {\n debug('start');\n self.iframeObj.loaded();\n },\n message: function (data) {\n debug('message', data);\n self.emit('message', data);\n },\n stop: function () {\n debug('stop');\n\n self._cleanup();\n\n self._close('network');\n }\n };\n this.iframeObj = constructFunc(url, function () {\n debug('callback');\n\n self._cleanup();\n\n self._close('permanent');\n });\n}\n\ninherits(HtmlfileReceiver, EventEmitter);\n\nHtmlfileReceiver.prototype.abort = function () {\n debug('abort');\n\n this._cleanup();\n\n this._close('user');\n};\n\nHtmlfileReceiver.prototype._cleanup = function () {\n debug('_cleanup');\n\n if (this.iframeObj) {\n this.iframeObj.cleanup();\n this.iframeObj = null;\n }\n\n delete global[iframeUtils.WPrefix][this.id];\n};\n\nHtmlfileReceiver.prototype._close = function (reason) {\n debug('_close', reason);\n this.emit('close', null, reason);\n this.removeAllListeners();\n};\n\nHtmlfileReceiver.htmlfileEnabled = false; // obfuscate to avoid firewalls\n\nvar axo = ['Active'].concat('Object').join('X');\n\nif (axo in global) {\n try {\n HtmlfileReceiver.htmlfileEnabled = !!new global[axo]('htmlfile');\n } catch (x) {// intentionally empty\n }\n}\n\nHtmlfileReceiver.enabled = HtmlfileReceiver.htmlfileEnabled || iframeUtils.iframeEnabled;\nmodule.exports = HtmlfileReceiver;","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar inherits = require('inherits'),\n EventEmitter = require('events').EventEmitter;\n\nvar debug = function () {};\n\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:receiver:xhr');\n}\n\nfunction XhrReceiver(url, AjaxObject) {\n debug(url);\n EventEmitter.call(this);\n var self = this;\n this.bufferPosition = 0;\n this.xo = new AjaxObject('POST', url, null);\n this.xo.on('chunk', this._chunkHandler.bind(this));\n this.xo.once('finish', function (status, text) {\n debug('finish', status, text);\n\n self._chunkHandler(status, text);\n\n self.xo = null;\n var reason = status === 200 ? 'network' : 'permanent';\n debug('close', reason);\n self.emit('close', null, reason);\n\n self._cleanup();\n });\n}\n\ninherits(XhrReceiver, EventEmitter);\n\nXhrReceiver.prototype._chunkHandler = function (status, text) {\n debug('_chunkHandler', status);\n\n if (status !== 200 || !text) {\n return;\n }\n\n for (var idx = -1;; this.bufferPosition += idx + 1) {\n var buf = text.slice(this.bufferPosition);\n idx = buf.indexOf('\\n');\n\n if (idx === -1) {\n break;\n }\n\n var msg = buf.slice(0, idx);\n\n if (msg) {\n debug('message', msg);\n this.emit('message', msg);\n }\n }\n};\n\nXhrReceiver.prototype._cleanup = function () {\n debug('_cleanup');\n this.removeAllListeners();\n};\n\nXhrReceiver.prototype.abort = function () {\n debug('abort');\n\n if (this.xo) {\n this.xo.close();\n debug('close');\n this.emit('close', null, 'user');\n this.xo = null;\n }\n\n this._cleanup();\n};\n\nmodule.exports = XhrReceiver;","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar Driver = global.WebSocket || global.MozWebSocket;\n\nif (Driver) {\n module.exports = function WebSocketBrowserDriver(url) {\n return new Driver(url);\n };\n} else {\n module.exports = undefined;\n}","map":null,"metadata":{},"sourceType":"script"}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar inherits = require('inherits'),\n urlUtils = require('../../utils/url'),\n BufferedSender = require('./buffered-sender'),\n Polling = require('./polling');\n\nvar debug = function () {};\n\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:sender-receiver');\n}\n\nfunction SenderReceiver(transUrl, urlSuffix, senderFunc, Receiver, AjaxObject) {\n var pollUrl = urlUtils.addPath(transUrl, urlSuffix);\n debug(pollUrl);\n var self = this;\n BufferedSender.call(this, transUrl, senderFunc);\n this.poll = new Polling(Receiver, pollUrl, AjaxObject);\n this.poll.on('message', function (msg) {\n debug('poll message', msg);\n self.emit('message', msg);\n });\n this.poll.once('close', function (code, reason) {\n debug('poll close', code, reason);\n self.poll = null;\n self.emit('close', code, reason);\n self.close();\n });\n}\n\ninherits(SenderReceiver, BufferedSender);\n\nSenderReceiver.prototype.close = function () {\n BufferedSender.prototype.close.call(this);\n debug('close');\n this.removeAllListeners();\n\n if (this.poll) {\n this.poll.abort();\n this.poll = null;\n }\n};\n\nmodule.exports = SenderReceiver;","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"module.exports = global.EventSource;","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar random = require('../../utils/random'),\n urlUtils = require('../../utils/url');\n\nvar debug = function () {};\n\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:sender:jsonp');\n}\n\nvar form, area;\n\nfunction createIframe(id) {\n debug('createIframe', id);\n\n try {\n // ie6 dynamic iframes with target=\"\" support (thanks Chris Lambacher)\n return global.document.createElement('<iframe name=\"' + id + '\">');\n } catch (x) {\n var iframe = global.document.createElement('iframe');\n iframe.name = id;\n return iframe;\n }\n}\n\nfunction createForm() {\n debug('createForm');\n form = global.document.createElement('form');\n form.style.display = 'none';\n form.style.position = 'absolute';\n form.method = 'POST';\n form.enctype = 'application/x-www-form-urlencoded';\n form.acceptCharset = 'UTF-8';\n area = global.document.createElement('textarea');\n area.name = 'd';\n form.appendChild(area);\n global.document.body.appendChild(form);\n}\n\nmodule.exports = function (url, payload, callback) {\n debug(url, payload);\n\n if (!form) {\n createForm();\n }\n\n var id = 'a' + random.string(8);\n form.target = id;\n form.action = urlUtils.addQuery(urlUtils.addPath(url, '/jsonp_send'), 'i=' + id);\n var iframe = createIframe(id);\n iframe.id = id;\n iframe.style.display = 'none';\n form.appendChild(iframe);\n\n try {\n area.value = payload;\n } catch (e) {// seriously broken browsers get here\n }\n\n form.submit();\n\n var completed = function (err) {\n debug('completed', id, err);\n\n if (!iframe.onerror) {\n return;\n }\n\n iframe.onreadystatechange = iframe.onerror = iframe.onload = null; // Opera mini doesn't like if we GC iframe\n // immediately, thus this timeout.\n\n setTimeout(function () {\n debug('cleaning up', id);\n iframe.parentNode.removeChild(iframe);\n iframe = null;\n }, 500);\n area.value = ''; // It is not possible to detect if the iframe succeeded or\n // failed to submit our form.\n\n callback(err);\n };\n\n iframe.onerror = function () {\n debug('onerror', id);\n completed();\n };\n\n iframe.onload = function () {\n debug('onload', id);\n completed();\n };\n\n iframe.onreadystatechange = function (e) {\n debug('onreadystatechange', id, iframe.readyState, e);\n\n if (iframe.readyState === 'complete') {\n completed();\n }\n };\n\n return function () {\n debug('aborted', id);\n completed(new Error('Aborted'));\n };\n};","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"/**\r\n * Copyright (c) 2013-present, Facebook, Inc.\r\n *\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE file in the root directory of this source tree.\r\n */\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\nmodule.exports = ReactPropTypesSecret;","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"import _defineProperty from \"D:\\\\code\\\\React\\\\hooks\\\\2\\\\node_modules\\\\@babel\\\\runtime/helpers/esm/defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nexport let defaultState = {\n count: 1\n};\nexport let CounterReducer = (state1 = defaultState, action) => {\n state1.count = action.payload.count;\n console.log(action);\n return _objectSpread({}, state1); //解构\n // return JSON.parse(JSON.stringify(state)); //深拷贝\n};","map":{"version":3,"sources":["D:/code/React/hooks/2/src/components/reducer/index.js"],"names":["defaultState","count","CounterReducer","state1","action","payload","console","log"],"mappings":";;;;;;AAAA,OAAO,IAAIA,YAAY,GAAC;AACpBC,EAAAA,KAAK,EAAC;AADc,CAAjB;AAGP,OAAO,IAAIC,cAAc,GAAC,CAACC,MAAM,GAACH,YAAR,EAAqBI,MAArB,KAA8B;AACpDD,EAAAA,MAAM,CAACF,KAAP,GAAaG,MAAM,CAACC,OAAP,CAAeJ,KAA5B;AACAK,EAAAA,OAAO,CAACC,GAAR,CAAYH,MAAZ;AACA,2BAAWD,MAAX,EAHoD,CAGjC;AACnB;AACH,CALM","sourcesContent":["export let defaultState={\r\n count:1\r\n}\r\nexport let CounterReducer=(state1=defaultState,action)=>{\r\n state1.count=action.payload.count;\r\n console.log(action);\r\n return {...state1} //解构\r\n // return JSON.parse(JSON.stringify(state)); //深拷贝\r\n};"]},"metadata":{},"sourceType":"module"}
@@ -0,0 +1 @@
{"ast":null,"code":"module.exports = function (module) {\n if (!module.webpackPolyfill) {\n module.deprecate = function () {};\n\n module.paths = []; // module.parent = undefined by default\n\n if (!module.children) module.children = [];\n Object.defineProperty(module, \"loaded\", {\n enumerable: true,\n get: function () {\n return module.l;\n }\n });\n Object.defineProperty(module, \"id\", {\n enumerable: true,\n get: function () {\n return module.i;\n }\n });\n module.webpackPolyfill = 1;\n }\n\n return module;\n};","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nconst TEMPLATE_REGEX = /(?:\\\\(u[a-f\\d]{4}|x[a-f\\d]{2}|.))|(?:\\{(~)?(\\w+(?:\\([^)]*\\))?(?:\\.\\w+(?:\\([^)]*\\))?)*)(?:[ \\t]|(?=\\r?\\n)))|(\\})|((?:.|[\\r\\n\\f])+?)/gi;\nconst STYLE_REGEX = /(?:^|\\.)(\\w+)(?:\\(([^)]*)\\))?/g;\nconst STRING_REGEX = /^(['\"])((?:\\\\.|(?!\\1)[^\\\\])*)\\1$/;\nconst ESCAPE_REGEX = /\\\\(u[a-f\\d]{4}|x[a-f\\d]{2}|.)|([^\\\\])/gi;\nconst ESCAPES = new Map([['n', '\\n'], ['r', '\\r'], ['t', '\\t'], ['b', '\\b'], ['f', '\\f'], ['v', '\\v'], ['0', '\\0'], ['\\\\', '\\\\'], ['e', '\\u001B'], ['a', '\\u0007']]);\n\nfunction unescape(c) {\n if (c[0] === 'u' && c.length === 5 || c[0] === 'x' && c.length === 3) {\n return String.fromCharCode(parseInt(c.slice(1), 16));\n }\n\n return ESCAPES.get(c) || c;\n}\n\nfunction parseArguments(name, args) {\n const results = [];\n const chunks = args.trim().split(/\\s*,\\s*/g);\n let matches;\n\n for (const chunk of chunks) {\n if (!isNaN(chunk)) {\n results.push(Number(chunk));\n } else if (matches = chunk.match(STRING_REGEX)) {\n results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr));\n } else {\n throw new Error(\"Invalid Chalk template style argument: \".concat(chunk, \" (in style '\").concat(name, \"')\"));\n }\n }\n\n return results;\n}\n\nfunction parseStyle(style) {\n STYLE_REGEX.lastIndex = 0;\n const results = [];\n let matches;\n\n while ((matches = STYLE_REGEX.exec(style)) !== null) {\n const name = matches[1];\n\n if (matches[2]) {\n const args = parseArguments(name, matches[2]);\n results.push([name].concat(args));\n } else {\n results.push([name]);\n }\n }\n\n return results;\n}\n\nfunction buildStyle(chalk, styles) {\n const enabled = {};\n\n for (const layer of styles) {\n for (const style of layer.styles) {\n enabled[style[0]] = layer.inverse ? null : style.slice(1);\n }\n }\n\n let current = chalk;\n\n for (const styleName of Object.keys(enabled)) {\n if (Array.isArray(enabled[styleName])) {\n if (!(styleName in current)) {\n throw new Error(\"Unknown Chalk style: \".concat(styleName));\n }\n\n if (enabled[styleName].length > 0) {\n current = current[styleName].apply(current, enabled[styleName]);\n } else {\n current = current[styleName];\n }\n }\n }\n\n return current;\n}\n\nmodule.exports = (chalk, tmp) => {\n const styles = [];\n const chunks = [];\n let chunk = []; // eslint-disable-next-line max-params\n\n tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => {\n if (escapeChar) {\n chunk.push(unescape(escapeChar));\n } else if (style) {\n const str = chunk.join('');\n chunk = [];\n chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str));\n styles.push({\n inverse,\n styles: parseStyle(style)\n });\n } else if (close) {\n if (styles.length === 0) {\n throw new Error('Found extraneous } in Chalk template literal');\n }\n\n chunks.push(buildStyle(chalk, styles)(chunk.join('')));\n chunk = [];\n styles.pop();\n } else {\n chunk.push(chr);\n }\n });\n chunks.push(chunk.join(''));\n\n if (styles.length > 0) {\n const errMsg = \"Chalk template literal is missing \".concat(styles.length, \" closing bracket\").concat(styles.length === 1 ? '' : 's', \" (`}`)\");\n throw new Error(errMsg);\n }\n\n return chunks.join('');\n};","map":null,"metadata":{},"sourceType":"script"}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"ast":null,"code":"// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n'use strict'; // If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nmodule.exports = function (qs, sep, eq, options) {\n sep = sep || '&';\n eq = eq || '=';\n var obj = {};\n\n if (typeof qs !== 'string' || qs.length === 0) {\n return obj;\n }\n\n var regexp = /\\+/g;\n qs = qs.split(sep);\n var maxKeys = 1000;\n\n if (options && typeof options.maxKeys === 'number') {\n maxKeys = options.maxKeys;\n }\n\n var len = qs.length; // maxKeys <= 0 means that we should not limit keys count\n\n if (maxKeys > 0 && len > maxKeys) {\n len = maxKeys;\n }\n\n for (var i = 0; i < len; ++i) {\n var x = qs[i].replace(regexp, '%20'),\n idx = x.indexOf(eq),\n kstr,\n vstr,\n k,\n v;\n\n if (idx >= 0) {\n kstr = x.substr(0, idx);\n vstr = x.substr(idx + 1);\n } else {\n kstr = x;\n vstr = '';\n }\n\n k = decodeURIComponent(kstr);\n v = decodeURIComponent(vstr);\n\n if (!hasOwnProperty(obj, k)) {\n obj[k] = v;\n } else if (isArray(obj[k])) {\n obj[k].push(v);\n } else {\n obj[k] = [obj[k], v];\n }\n }\n\n return obj;\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};","map":null,"metadata":{},"sourceType":"script"}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar matchOperatorsRe = /[|\\\\{}()[\\]^$+*?.]/g;\n\nmodule.exports = function (str) {\n if (typeof str !== 'string') {\n throw new TypeError('Expected a string');\n }\n\n return str.replace(matchOperatorsRe, '\\\\$&');\n};","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"import _slicedToArray from \"D:\\\\code\\\\React\\\\hooks\\\\2\\\\node_modules\\\\@babel\\\\runtime/helpers/esm/slicedToArray\";\nvar _jsxFileName = \"D:\\\\code\\\\React\\\\hooks\\\\2\\\\src\\\\App.js\";\nimport React, { useReducer } from 'react';\nimport { defaultState, CounterReducer } from './components/reducer';\nimport Counter from './components/counter';\nimport { context } from './components/context';\nlet icount = 0;\n\nfunction App() {\n let _useReducer = useReducer(CounterReducer, defaultState),\n _useReducer2 = _slicedToArray(_useReducer, 2),\n state = _useReducer2[0],\n dispatch = _useReducer2[1];\n\n return React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 9\n },\n __self: this\n }, React.createElement(context.Provider, {\n value: {\n state,\n dispatch\n },\n __source: {\n fileName: _jsxFileName,\n lineNumber: 10\n },\n __self: this\n }, React.createElement(Counter, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 11\n },\n __self: this\n })), \"\\u8BA1\\u6570\\u5668\\uFF1A\", React.createElement(\"button\", {\n type: \"button\",\n onClick: () => {\n dispatch({\n type: \"inc\",\n payload: {\n count: --icount\n }\n });\n },\n __source: {\n fileName: _jsxFileName,\n lineNumber: 16\n },\n __self: this\n }, \"-\"), state.count, React.createElement(\"button\", {\n type: \"button\",\n onClick: () => {\n dispatch({\n type: \"inc\",\n payload: {\n count: ++icount\n }\n });\n },\n __source: {\n fileName: _jsxFileName,\n lineNumber: 20\n },\n __self: this\n }, \"+\"));\n}\n\nexport default App;","map":{"version":3,"sources":["D:/code/React/hooks/2/src/App.js"],"names":["React","useReducer","defaultState","CounterReducer","Counter","context","icount","App","state","dispatch","type","payload","count"],"mappings":";;AAAA,OAAOA,KAAP,IAAcC,UAAd,QAA+B,OAA/B;AACA,SAAQC,YAAR,EAAqBC,cAArB,QAA0C,sBAA1C;AACA,OAAOC,OAAP,MAAoB,sBAApB;AACA,SAAQC,OAAR,QAAsB,sBAAtB;AACA,IAAIC,MAAM,GAAC,CAAX;;AACA,SAASC,GAAT,GAAc;AAAA,oBACWN,UAAU,CAACE,cAAD,EAAgBD,YAAhB,CADrB;AAAA;AAAA,MACLM,KADK;AAAA,MACCC,QADD;;AAEV,SACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI,oBAAC,OAAD,CAAS,QAAT;AAAkB,IAAA,KAAK,EAAE;AAACD,MAAAA,KAAD;AAAOC,MAAAA;AAAP,KAAzB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI,oBAAC,OAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IADJ,CADJ,8BAOI;AAAQ,IAAA,IAAI,EAAC,QAAb;AACA,IAAA,OAAO,EAAE,MAAI;AAACA,MAAAA,QAAQ,CAAC;AAACC,QAAAA,IAAI,EAAC,KAAN;AAAYC,QAAAA,OAAO,EAAC;AAACC,UAAAA,KAAK,EAAC,EAAEN;AAAT;AAApB,OAAD,CAAR;AAAgD,KAD9D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAPJ,EAUSE,KAAK,CAACI,KAVf,EAWI;AAAQ,IAAA,IAAI,EAAC,QAAb;AACA,IAAA,OAAO,EAAE,MAAI;AAACH,MAAAA,QAAQ,CAAC;AAACC,QAAAA,IAAI,EAAC,KAAN;AAAYC,QAAAA,OAAO,EAAC;AAACC,UAAAA,KAAK,EAAC,EAAEN;AAAT;AAApB,OAAD,CAAR;AAAgD,KAD9D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAXJ,CADJ;AAiBH;;AAED,eAAeC,GAAf","sourcesContent":["import React,{useReducer} from 'react';\r\nimport {defaultState,CounterReducer} from './components/reducer'\r\nimport Counter from './components/counter'\r\nimport {context} from './components/context'\r\nlet icount=0;\r\nfunction App(){\r\n let [state,dispatch]=useReducer(CounterReducer,defaultState);\r\n return (\r\n <div>\r\n <context.Provider value={{state,dispatch}}>\r\n <Counter></Counter>\r\n </context.Provider>\r\n\r\n \r\n 计数器:\r\n <button type=\"button\"\r\n onClick={()=>{dispatch({type:\"inc\",payload:{count:--icount}})}}\r\n >-</button> \r\n {state.count} \r\n <button type=\"button\"\r\n onClick={()=>{dispatch({type:\"inc\",payload:{count:++icount}})}}\r\n >+</button>\r\n </div>\r\n )\r\n}\r\n\r\nexport default App;\r\n"]},"metadata":{},"sourceType":"module"}
@@ -0,0 +1 @@
{"ast":null,"code":"/**\r\n * Copyright (c) 2013-present, Facebook, Inc.\r\n *\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE file in the root directory of this source tree.\r\n */\n'use strict';\n\nvar printWarning = function () {};\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\n var loggedTypeFailures = {};\n var has = Function.call.bind(Object.prototype.hasOwnProperty);\n\n printWarning = function (text) {\n var message = 'Warning: ' + text;\n\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n/**\r\n * Assert that the values match with the type specs.\r\n * Error messages are memorized and will only be shown once.\r\n *\r\n * @param {object} typeSpecs Map of name to a ReactPropType\r\n * @param {object} values Runtime values that need to be type-checked\r\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\r\n * @param {string} componentName Name of the component for error messages.\r\n * @param {?Function} getStack Returns the component stack.\r\n * @private\r\n */\n\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n\n if (error && !(error instanceof Error)) {\n printWarning((componentName || 'React class') + ': type specification of ' + location + ' `' + typeSpecName + '` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).');\n }\n\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n var stack = getStack ? getStack() : '';\n printWarning('Failed ' + location + ' type: ' + error.message + (stack != null ? stack : ''));\n }\n }\n }\n }\n}\n/**\r\n * Resets warning cache when testing.\r\n *\r\n * @private\r\n */\n\n\ncheckPropTypes.resetWarningCache = function () {\n if (process.env.NODE_ENV !== 'production') {\n loggedTypeFailures = {};\n }\n};\n\nmodule.exports = checkPropTypes;","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nfunction Event(eventType) {\n this.type = eventType;\n}\n\nEvent.prototype.initEvent = function (eventType, canBubble, cancelable) {\n this.type = eventType;\n this.bubbles = canBubble;\n this.cancelable = cancelable;\n this.timeStamp = +new Date();\n return this;\n};\n\nEvent.prototype.stopPropagation = function () {};\n\nEvent.prototype.preventDefault = function () {};\n\nEvent.CAPTURING_PHASE = 1;\nEvent.AT_TARGET = 2;\nEvent.BUBBLING_PHASE = 3;\nmodule.exports = Event;","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar transportList = require('./transport-list');\n\nmodule.exports = require('./main')(transportList); // TODO can't get rid of this until all servers do\n\nif ('_sockjs_onload' in global) {\n setTimeout(global._sockjs_onload, 1);\n}","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nconst ansiRegex = require('ansi-regex');\n\nconst stripAnsi = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string;\n\nmodule.exports = stripAnsi;\nmodule.exports.default = stripAnsi;","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar inherits = require('inherits'),\n AjaxBasedTransport = require('./lib/ajax-based'),\n XhrReceiver = require('./receiver/xhr'),\n XHRCorsObject = require('./sender/xhr-cors'),\n XHRLocalObject = require('./sender/xhr-local'),\n browser = require('../utils/browser');\n\nfunction XhrStreamingTransport(transUrl) {\n if (!XHRLocalObject.enabled && !XHRCorsObject.enabled) {\n throw new Error('Transport created when disabled');\n }\n\n AjaxBasedTransport.call(this, transUrl, '/xhr_streaming', XhrReceiver, XHRCorsObject);\n}\n\ninherits(XhrStreamingTransport, AjaxBasedTransport);\n\nXhrStreamingTransport.enabled = function (info) {\n if (info.nullOrigin) {\n return false;\n } // Opera doesn't support xhr-streaming #60\n // But it might be able to #92\n\n\n if (browser.isOpera()) {\n return false;\n }\n\n return XHRCorsObject.enabled;\n};\n\nXhrStreamingTransport.transportName = 'xhr-streaming';\nXhrStreamingTransport.roundTrips = 2; // preflight, ajax\n// Safari gets confused when a streaming ajax request is started\n// before onload. This causes the load indicator to spin indefinetely.\n// Only require body when used in a browser\n\nXhrStreamingTransport.needBody = !!global.document;\nmodule.exports = XhrStreamingTransport;","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar debug = function () {};\n\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:utils:transport');\n}\n\nmodule.exports = function (availableTransports) {\n return {\n filterToEnabled: function (transportsWhitelist, info) {\n var transports = {\n main: [],\n facade: []\n };\n\n if (!transportsWhitelist) {\n transportsWhitelist = [];\n } else if (typeof transportsWhitelist === 'string') {\n transportsWhitelist = [transportsWhitelist];\n }\n\n availableTransports.forEach(function (trans) {\n if (!trans) {\n return;\n }\n\n if (trans.transportName === 'websocket' && info.websocket === false) {\n debug('disabled from server', 'websocket');\n return;\n }\n\n if (transportsWhitelist.length && transportsWhitelist.indexOf(trans.transportName) === -1) {\n debug('not in whitelist', trans.transportName);\n return;\n }\n\n if (trans.enabled(info)) {\n debug('enabled', trans.transportName);\n transports.main.push(trans);\n\n if (trans.facadeTransport) {\n transports.facade.push(trans.facadeTransport);\n }\n } else {\n debug('disabled', trans.transportName);\n }\n });\n return transports;\n }\n };\n};","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar EventEmitter = require('events').EventEmitter,\n inherits = require('inherits'),\n JSON3 = require('json3'),\n objectUtils = require('./utils/object');\n\nvar debug = function () {};\n\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:info-ajax');\n}\n\nfunction InfoAjax(url, AjaxObject) {\n EventEmitter.call(this);\n var self = this;\n var t0 = +new Date();\n this.xo = new AjaxObject('GET', url);\n this.xo.once('finish', function (status, text) {\n var info, rtt;\n\n if (status === 200) {\n rtt = +new Date() - t0;\n\n if (text) {\n try {\n info = JSON3.parse(text);\n } catch (e) {\n debug('bad json', text);\n }\n }\n\n if (!objectUtils.isObject(info)) {\n info = {};\n }\n }\n\n self.emit('finish', info, rtt);\n self.removeAllListeners();\n });\n}\n\ninherits(InfoAjax, EventEmitter);\n\nInfoAjax.prototype.close = function () {\n this.removeAllListeners();\n this.xo.close();\n};\n\nmodule.exports = InfoAjax;","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar inherits = require('inherits'),\n AjaxBasedTransport = require('./lib/ajax-based'),\n EventSourceReceiver = require('./receiver/eventsource'),\n XHRCorsObject = require('./sender/xhr-cors'),\n EventSourceDriver = require('eventsource');\n\nfunction EventSourceTransport(transUrl) {\n if (!EventSourceTransport.enabled()) {\n throw new Error('Transport created when disabled');\n }\n\n AjaxBasedTransport.call(this, transUrl, '/eventsource', EventSourceReceiver, XHRCorsObject);\n}\n\ninherits(EventSourceTransport, AjaxBasedTransport);\n\nEventSourceTransport.enabled = function () {\n return !!EventSourceDriver;\n};\n\nEventSourceTransport.transportName = 'eventsource';\nEventSourceTransport.roundTrips = 2;\nmodule.exports = EventSourceTransport;","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar EventEmitter = require('events').EventEmitter,\n inherits = require('inherits'),\n JSON3 = require('json3'),\n utils = require('./utils/event'),\n IframeTransport = require('./transport/iframe'),\n InfoReceiverIframe = require('./info-iframe-receiver');\n\nvar debug = function () {};\n\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:info-iframe');\n}\n\nfunction InfoIframe(baseUrl, url) {\n var self = this;\n EventEmitter.call(this);\n\n var go = function () {\n var ifr = self.ifr = new IframeTransport(InfoReceiverIframe.transportName, url, baseUrl);\n ifr.once('message', function (msg) {\n if (msg) {\n var d;\n\n try {\n d = JSON3.parse(msg);\n } catch (e) {\n debug('bad json', msg);\n self.emit('finish');\n self.close();\n return;\n }\n\n var info = d[0],\n rtt = d[1];\n self.emit('finish', info, rtt);\n }\n\n self.close();\n });\n ifr.once('close', function () {\n self.emit('finish');\n self.close();\n });\n }; // TODO this seems the same as the 'needBody' from transports\n\n\n if (!global.document.body) {\n utils.attachEvent('load', go);\n } else {\n go();\n }\n}\n\ninherits(InfoIframe, EventEmitter);\n\nInfoIframe.enabled = function () {\n return IframeTransport.enabled();\n};\n\nInfoIframe.prototype.close = function () {\n if (this.ifr) {\n this.ifr.close();\n }\n\n this.removeAllListeners();\n this.ifr = null;\n};\n\nmodule.exports = InfoIframe;","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nmodule.exports = {\n isObject: function (obj) {\n var type = typeof obj;\n return type === 'function' || type === 'object' && !!obj;\n },\n extend: function (obj) {\n if (!this.isObject(obj)) {\n return obj;\n }\n\n var source, prop;\n\n for (var i = 1, length = arguments.length; i < length; i++) {\n source = arguments[i];\n\n for (prop in source) {\n if (Object.prototype.hasOwnProperty.call(source, prop)) {\n obj[prop] = source[prop];\n }\n }\n }\n\n return obj;\n }\n};","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar inherits = require('inherits'),\n EventEmitter = require('events').EventEmitter,\n EventSourceDriver = require('eventsource');\n\nvar debug = function () {};\n\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:receiver:eventsource');\n}\n\nfunction EventSourceReceiver(url) {\n debug(url);\n EventEmitter.call(this);\n var self = this;\n var es = this.es = new EventSourceDriver(url);\n\n es.onmessage = function (e) {\n debug('message', e.data);\n self.emit('message', decodeURI(e.data));\n };\n\n es.onerror = function (e) {\n debug('error', es.readyState, e); // ES on reconnection has readyState = 0 or 1.\n // on network error it's CLOSED = 2\n\n var reason = es.readyState !== 2 ? 'network' : 'permanent';\n\n self._cleanup();\n\n self._close(reason);\n };\n}\n\ninherits(EventSourceReceiver, EventEmitter);\n\nEventSourceReceiver.prototype.abort = function () {\n debug('abort');\n\n this._cleanup();\n\n this._close('user');\n};\n\nEventSourceReceiver.prototype._cleanup = function () {\n debug('cleanup');\n var es = this.es;\n\n if (es) {\n es.onmessage = es.onerror = null;\n es.close();\n this.es = null;\n }\n};\n\nEventSourceReceiver.prototype._close = function (reason) {\n debug('close', reason);\n var self = this; // Safari and chrome < 15 crash if we close window before\n // waiting for ES cleanup. See:\n // https://code.google.com/p/chromium/issues/detail?id=89155\n\n setTimeout(function () {\n self.emit('close', null, reason);\n self.removeAllListeners();\n }, 200);\n};\n\nmodule.exports = EventSourceReceiver;","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar inherits = require('inherits'),\n EventEmitter = require('events').EventEmitter;\n\nvar debug = function () {};\n\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:polling');\n}\n\nfunction Polling(Receiver, receiveUrl, AjaxObject) {\n debug(receiveUrl);\n EventEmitter.call(this);\n this.Receiver = Receiver;\n this.receiveUrl = receiveUrl;\n this.AjaxObject = AjaxObject;\n\n this._scheduleReceiver();\n}\n\ninherits(Polling, EventEmitter);\n\nPolling.prototype._scheduleReceiver = function () {\n debug('_scheduleReceiver');\n var self = this;\n var poll = this.poll = new this.Receiver(this.receiveUrl, this.AjaxObject);\n poll.on('message', function (msg) {\n debug('message', msg);\n self.emit('message', msg);\n });\n poll.once('close', function (code, reason) {\n debug('close', code, reason, self.pollIsClosing);\n self.poll = poll = null;\n\n if (!self.pollIsClosing) {\n if (reason === 'network') {\n self._scheduleReceiver();\n } else {\n self.emit('close', code || 1006, reason);\n self.removeAllListeners();\n }\n }\n });\n};\n\nPolling.prototype.abort = function () {\n debug('abort');\n this.removeAllListeners();\n this.pollIsClosing = true;\n\n if (this.poll) {\n this.poll.abort();\n }\n};\n\nmodule.exports = Polling;","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar inherits = require('inherits'),\n AjaxBasedTransport = require('./lib/ajax-based'),\n XdrStreamingTransport = require('./xdr-streaming'),\n XhrReceiver = require('./receiver/xhr'),\n XDRObject = require('./sender/xdr');\n\nfunction XdrPollingTransport(transUrl) {\n if (!XDRObject.enabled) {\n throw new Error('Transport created when disabled');\n }\n\n AjaxBasedTransport.call(this, transUrl, '/xhr', XhrReceiver, XDRObject);\n}\n\ninherits(XdrPollingTransport, AjaxBasedTransport);\nXdrPollingTransport.enabled = XdrStreamingTransport.enabled;\nXdrPollingTransport.transportName = 'xdr-polling';\nXdrPollingTransport.roundTrips = 2; // preflight, ajax\n\nmodule.exports = XdrPollingTransport;","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"module.exports = '1.4.0';","map":null,"metadata":{},"sourceType":"script"}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar JSON3 = require('json3'),\n iframeUtils = require('./utils/iframe');\n\nfunction FacadeJS(transport) {\n this._transport = transport;\n transport.on('message', this._transportMessage.bind(this));\n transport.on('close', this._transportClose.bind(this));\n}\n\nFacadeJS.prototype._transportClose = function (code, reason) {\n iframeUtils.postMessage('c', JSON3.stringify([code, reason]));\n};\n\nFacadeJS.prototype._transportMessage = function (frame) {\n iframeUtils.postMessage('t', frame);\n};\n\nFacadeJS.prototype._send = function (data) {\n this._transport.send(data);\n};\n\nFacadeJS.prototype._close = function () {\n this._transport.close();\n\n this._transport.removeAllListeners();\n};\n\nmodule.exports = FacadeJS;","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.min.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar inherits = require('inherits'),\n urlUtils = require('../../utils/url'),\n SenderReceiver = require('./sender-receiver');\n\nvar debug = function () {};\n\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:ajax-based');\n}\n\nfunction createAjaxSender(AjaxObject) {\n return function (url, payload, callback) {\n debug('create ajax sender', url, payload);\n var opt = {};\n\n if (typeof payload === 'string') {\n opt.headers = {\n 'Content-type': 'text/plain'\n };\n }\n\n var ajaxUrl = urlUtils.addPath(url, '/xhr_send');\n var xo = new AjaxObject('POST', ajaxUrl, payload, opt);\n xo.once('finish', function (status) {\n debug('finish', status);\n xo = null;\n\n if (status !== 200 && status !== 204) {\n return callback(new Error('http status ' + status));\n }\n\n callback();\n });\n return function () {\n debug('abort');\n xo.close();\n xo = null;\n var err = new Error('Aborted');\n err.code = 1000;\n callback(err);\n };\n };\n}\n\nfunction AjaxBasedTransport(transUrl, urlSuffix, Receiver, AjaxObject) {\n SenderReceiver.call(this, transUrl, urlSuffix, createAjaxSender(AjaxObject), Receiver, AjaxObject);\n}\n\ninherits(AjaxBasedTransport, SenderReceiver);\nmodule.exports = AjaxBasedTransport;","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar random = require('./random');\n\nvar onUnload = {},\n afterUnload = false // detect google chrome packaged apps because they don't allow the 'unload' event\n,\n isChromePackagedApp = global.chrome && global.chrome.app && global.chrome.app.runtime;\nmodule.exports = {\n attachEvent: function (event, listener) {\n if (typeof global.addEventListener !== 'undefined') {\n global.addEventListener(event, listener, false);\n } else if (global.document && global.attachEvent) {\n // IE quirks.\n // According to: http://stevesouders.com/misc/test-postmessage.php\n // the message gets delivered only to 'document', not 'window'.\n global.document.attachEvent('on' + event, listener); // I get 'window' for ie8.\n\n global.attachEvent('on' + event, listener);\n }\n },\n detachEvent: function (event, listener) {\n if (typeof global.addEventListener !== 'undefined') {\n global.removeEventListener(event, listener, false);\n } else if (global.document && global.detachEvent) {\n global.document.detachEvent('on' + event, listener);\n global.detachEvent('on' + event, listener);\n }\n },\n unloadAdd: function (listener) {\n if (isChromePackagedApp) {\n return null;\n }\n\n var ref = random.string(8);\n onUnload[ref] = listener;\n\n if (afterUnload) {\n setTimeout(this.triggerUnloadCallbacks, 0);\n }\n\n return ref;\n },\n unloadDel: function (ref) {\n if (ref in onUnload) {\n delete onUnload[ref];\n }\n },\n triggerUnloadCallbacks: function () {\n for (var ref in onUnload) {\n onUnload[ref]();\n delete onUnload[ref];\n }\n }\n};\n\nvar unloadTriggered = function () {\n if (afterUnload) {\n return;\n }\n\n afterUnload = true;\n module.exports.triggerUnloadCallbacks();\n}; // 'unload' alone is not reliable in opera within an iframe, but we\n// can't use `beforeunload` as IE fires it on javascript: links.\n\n\nif (!isChromePackagedApp) {\n module.exports.attachEvent('unload', unloadTriggered);\n}","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n/**\r\n * Check if we're required to add a port number.\r\n *\r\n * @see https://url.spec.whatwg.org/#default-port\r\n * @param {Number|String} port Port number we need to check\r\n * @param {String} protocol Protocol we need to check against.\r\n * @returns {Boolean} Is it a default port for the given protocol\r\n * @api private\r\n */\n\nmodule.exports = function required(port, protocol) {\n protocol = protocol.split(':')[0];\n port = +port;\n if (!port) return false;\n\n switch (protocol) {\n case 'http':\n case 'ws':\n return port !== 80;\n\n case 'https':\n case 'wss':\n return port !== 443;\n\n case 'ftp':\n return port !== 21;\n\n case 'gopher':\n return port !== 70;\n\n case 'file':\n return false;\n }\n\n return port !== 0;\n};","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar inherits = require('inherits'),\n EventTarget = require('./eventtarget');\n\nfunction EventEmitter() {\n EventTarget.call(this);\n}\n\ninherits(EventEmitter, EventTarget);\n\nEventEmitter.prototype.removeAllListeners = function (type) {\n if (type) {\n delete this._listeners[type];\n } else {\n this._listeners = {};\n }\n};\n\nEventEmitter.prototype.once = function (type, listener) {\n var self = this,\n fired = false;\n\n function g() {\n self.removeListener(type, g);\n\n if (!fired) {\n fired = true;\n listener.apply(this, arguments);\n }\n }\n\n this.on(type, g);\n};\n\nEventEmitter.prototype.emit = function () {\n var type = arguments[0];\n var listeners = this._listeners[type];\n\n if (!listeners) {\n return;\n } // equivalent of Array.prototype.slice.call(arguments, 1);\n\n\n var l = arguments.length;\n var args = new Array(l - 1);\n\n for (var ai = 1; ai < l; ai++) {\n args[ai - 1] = arguments[ai];\n }\n\n for (var i = 0; i < listeners.length; i++) {\n listeners[i].apply(this, args);\n }\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener = EventTarget.prototype.addEventListener;\nEventEmitter.prototype.removeListener = EventTarget.prototype.removeEventListener;\nmodule.exports.EventEmitter = EventEmitter;","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar JSON3 = require('json3'); // Some extra characters that Chrome gets wrong, and substitutes with\n// something else on the wire.\n// eslint-disable-next-line no-control-regex\n\n\nvar extraEscapable = /[\\x00-\\x1f\\ud800-\\udfff\\ufffe\\uffff\\u0300-\\u0333\\u033d-\\u0346\\u034a-\\u034c\\u0350-\\u0352\\u0357-\\u0358\\u035c-\\u0362\\u0374\\u037e\\u0387\\u0591-\\u05af\\u05c4\\u0610-\\u0617\\u0653-\\u0654\\u0657-\\u065b\\u065d-\\u065e\\u06df-\\u06e2\\u06eb-\\u06ec\\u0730\\u0732-\\u0733\\u0735-\\u0736\\u073a\\u073d\\u073f-\\u0741\\u0743\\u0745\\u0747\\u07eb-\\u07f1\\u0951\\u0958-\\u095f\\u09dc-\\u09dd\\u09df\\u0a33\\u0a36\\u0a59-\\u0a5b\\u0a5e\\u0b5c-\\u0b5d\\u0e38-\\u0e39\\u0f43\\u0f4d\\u0f52\\u0f57\\u0f5c\\u0f69\\u0f72-\\u0f76\\u0f78\\u0f80-\\u0f83\\u0f93\\u0f9d\\u0fa2\\u0fa7\\u0fac\\u0fb9\\u1939-\\u193a\\u1a17\\u1b6b\\u1cda-\\u1cdb\\u1dc0-\\u1dcf\\u1dfc\\u1dfe\\u1f71\\u1f73\\u1f75\\u1f77\\u1f79\\u1f7b\\u1f7d\\u1fbb\\u1fbe\\u1fc9\\u1fcb\\u1fd3\\u1fdb\\u1fe3\\u1feb\\u1fee-\\u1fef\\u1ff9\\u1ffb\\u1ffd\\u2000-\\u2001\\u20d0-\\u20d1\\u20d4-\\u20d7\\u20e7-\\u20e9\\u2126\\u212a-\\u212b\\u2329-\\u232a\\u2adc\\u302b-\\u302c\\uaab2-\\uaab3\\uf900-\\ufa0d\\ufa10\\ufa12\\ufa15-\\ufa1e\\ufa20\\ufa22\\ufa25-\\ufa26\\ufa2a-\\ufa2d\\ufa30-\\ufa6d\\ufa70-\\ufad9\\ufb1d\\ufb1f\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40-\\ufb41\\ufb43-\\ufb44\\ufb46-\\ufb4e\\ufff0-\\uffff]/g,\n extraLookup; // This may be quite slow, so let's delay until user actually uses bad\n// characters.\n\nvar unrollLookup = function (escapable) {\n var i;\n var unrolled = {};\n var c = [];\n\n for (i = 0; i < 65536; i++) {\n c.push(String.fromCharCode(i));\n }\n\n escapable.lastIndex = 0;\n c.join('').replace(escapable, function (a) {\n unrolled[a] = '\\\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);\n return '';\n });\n escapable.lastIndex = 0;\n return unrolled;\n}; // Quote string, also taking care of unicode characters that browsers\n// often break. Especially, take care of unicode surrogates:\n// http://en.wikipedia.org/wiki/Mapping_of_Unicode_characters#Surrogates\n\n\nmodule.exports = {\n quote: function (string) {\n var quoted = JSON3.stringify(string); // In most cases this should be very fast and good enough.\n\n extraEscapable.lastIndex = 0;\n\n if (!extraEscapable.test(quoted)) {\n return quoted;\n }\n\n if (!extraLookup) {\n extraLookup = unrollLookup(extraEscapable);\n }\n\n return quoted.replace(extraEscapable, function (a) {\n return extraLookup[a];\n });\n }\n};","map":null,"metadata":{},"sourceType":"script"}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nmodule.exports = global.location || {\n origin: 'http://localhost:80',\n protocol: 'http:',\n host: 'localhost',\n port: 80,\n href: 'http://localhost/',\n hash: ''\n};","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nmodule.exports = {\n isOpera: function () {\n return global.navigator && /opera/i.test(global.navigator.userAgent);\n },\n isKonqueror: function () {\n return global.navigator && /konqueror/i.test(global.navigator.userAgent);\n } // #187 wrap document.domain in try/catch because of WP8 from file:///\n ,\n hasDomain: function () {\n // non-browser client always has a domain\n if (!global.document) {\n return true;\n }\n\n try {\n return !!global.document.domain;\n } catch (e) {\n return false;\n }\n }\n};","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nif (global.crypto && global.crypto.getRandomValues) {\n module.exports.randomBytes = function (length) {\n var bytes = new Uint8Array(length);\n global.crypto.getRandomValues(bytes);\n return bytes;\n };\n} else {\n module.exports.randomBytes = function (length) {\n var bytes = new Array(length);\n\n for (var i = 0; i < length; i++) {\n bytes[i] = Math.floor(Math.random() * 256);\n }\n\n return bytes;\n };\n}","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar inherits = require('inherits'),\n Event = require('./event');\n\nfunction CloseEvent() {\n Event.call(this);\n this.initEvent('close', false, false);\n this.wasClean = false;\n this.code = 0;\n this.reason = '';\n}\n\ninherits(CloseEvent, Event);\nmodule.exports = CloseEvent;","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar inherits = require('inherits'),\n XhrDriver = require('../driver/xhr');\n\nfunction XHRLocalObject(method, url, payload\n/*, opts */\n) {\n XhrDriver.call(this, method, url, payload, {\n noCredentials: true\n });\n}\n\ninherits(XHRLocalObject, XhrDriver);\nXHRLocalObject.enabled = XhrDriver.enabled;\nmodule.exports = XHRLocalObject;","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar has = Object.prototype.hasOwnProperty,\n undef;\n/**\r\n * Decode a URI encoded string.\r\n *\r\n * @param {String} input The URI encoded string.\r\n * @returns {String|Null} The decoded string.\r\n * @api private\r\n */\n\nfunction decode(input) {\n try {\n return decodeURIComponent(input.replace(/\\+/g, ' '));\n } catch (e) {\n return null;\n }\n}\n/**\r\n * Attempts to encode a given input.\r\n *\r\n * @param {String} input The string that needs to be encoded.\r\n * @returns {String|Null} The encoded string.\r\n * @api private\r\n */\n\n\nfunction encode(input) {\n try {\n return encodeURIComponent(input);\n } catch (e) {\n return null;\n }\n}\n/**\r\n * Simple query string parser.\r\n *\r\n * @param {String} query The query string that needs to be parsed.\r\n * @returns {Object}\r\n * @api public\r\n */\n\n\nfunction querystring(query) {\n var parser = /([^=?&]+)=?([^&]*)/g,\n result = {},\n part;\n\n while (part = parser.exec(query)) {\n var key = decode(part[1]),\n value = decode(part[2]); //\n // Prevent overriding of existing properties. This ensures that build-in\n // methods like `toString` or __proto__ are not overriden by malicious\n // querystrings.\n //\n // In the case if failed decoding, we want to omit the key/value pairs\n // from the result.\n //\n\n if (key === null || value === null || key in result) continue;\n result[key] = value;\n }\n\n return result;\n}\n/**\r\n * Transform a query string to an object.\r\n *\r\n * @param {Object} obj Object that should be transformed.\r\n * @param {String} prefix Optional prefix.\r\n * @returns {String}\r\n * @api public\r\n */\n\n\nfunction querystringify(obj, prefix) {\n prefix = prefix || '';\n var pairs = [],\n value,\n key; //\n // Optionally prefix with a '?' if needed\n //\n\n if ('string' !== typeof prefix) prefix = '?';\n\n for (key in obj) {\n if (has.call(obj, key)) {\n value = obj[key]; //\n // Edge cases where we actually want to encode the value to an empty\n // string instead of the stringified value.\n //\n\n if (!value && (value === null || value === undef || isNaN(value))) {\n value = '';\n }\n\n key = encodeURIComponent(key);\n value = encodeURIComponent(value); //\n // If we failed to encode the strings, we should bail out as we don't\n // want to add invalid strings to the query.\n //\n\n if (key === null || value === null) continue;\n pairs.push(key + '=' + value);\n }\n }\n\n return pairs.length ? prefix + pairs.join('&') : '';\n} //\n// Expose the module.\n//\n\n\nexports.stringify = querystringify;\nexports.parse = querystring;","map":null,"metadata":{},"sourceType":"script"}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar logObject = {};\n['log', 'debug', 'warn'].forEach(function (level) {\n var levelExists;\n\n try {\n levelExists = global.console && global.console[level] && global.console[level].apply;\n } catch (e) {// do nothing\n }\n\n logObject[level] = levelExists ? function () {\n return global.console[level].apply(global.console, arguments);\n } : level === 'log' ? function () {} : logObject.log;\n});\nmodule.exports = logObject;","map":null,"metadata":{},"sourceType":"script"}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar inherits = require('inherits'),\n EventEmitter = require('events').EventEmitter,\n JSON3 = require('json3'),\n XHRLocalObject = require('./transport/sender/xhr-local'),\n InfoAjax = require('./info-ajax');\n\nfunction InfoReceiverIframe(transUrl) {\n var self = this;\n EventEmitter.call(this);\n this.ir = new InfoAjax(transUrl, XHRLocalObject);\n this.ir.once('finish', function (info, rtt) {\n self.ir = null;\n self.emit('message', JSON3.stringify([info, rtt]));\n });\n}\n\ninherits(InfoReceiverIframe, EventEmitter);\nInfoReceiverIframe.transportName = 'iframe-info-receiver';\n\nInfoReceiverIframe.prototype.close = function () {\n if (this.ir) {\n this.ir.close();\n this.ir = null;\n }\n\n this.removeAllListeners();\n};\n\nmodule.exports = InfoReceiverIframe;","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nfunction checkDCE() {\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function') {\n return;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n // This branch is unreachable because this function is only called\n // in production, but the condition is true only in development.\n // Therefore if the branch is still here, dead code elimination wasn't\n // properly applied.\n // Don't change the message. React DevTools relies on it. Also make sure\n // this message doesn't occur elsewhere in this function, or it will cause\n // a false positive.\n throw new Error('^_^');\n }\n\n try {\n // Verify that the code above has been dead code eliminated (DCE'd).\n __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n } catch (err) {\n // DevTools shouldn't crash React, no matter what.\n // We should still report in case we break this code.\n console.error(err);\n }\n}\n\nif (process.env.NODE_ENV === 'production') {\n // DCE check should happen before ReactDOM bundle executes so that\n // DevTools can report bad minification during injection.\n checkDCE();\n module.exports = require('./cjs/react-dom.production.min.js');\n} else {\n module.exports = require('./cjs/react-dom.development.js');\n}","map":null,"metadata":{},"sourceType":"script"}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar EventEmitter = require('events').EventEmitter,\n inherits = require('inherits'),\n eventUtils = require('../../utils/event'),\n browser = require('../../utils/browser'),\n urlUtils = require('../../utils/url');\n\nvar debug = function () {};\n\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:sender:xdr');\n} // References:\n// http://ajaxian.com/archives/100-line-ajax-wrapper\n// http://msdn.microsoft.com/en-us/library/cc288060(v=VS.85).aspx\n\n\nfunction XDRObject(method, url, payload) {\n debug(method, url);\n var self = this;\n EventEmitter.call(this);\n setTimeout(function () {\n self._start(method, url, payload);\n }, 0);\n}\n\ninherits(XDRObject, EventEmitter);\n\nXDRObject.prototype._start = function (method, url, payload) {\n debug('_start');\n var self = this;\n var xdr = new global.XDomainRequest(); // IE caches even POSTs\n\n url = urlUtils.addQuery(url, 't=' + +new Date());\n\n xdr.onerror = function () {\n debug('onerror');\n\n self._error();\n };\n\n xdr.ontimeout = function () {\n debug('ontimeout');\n\n self._error();\n };\n\n xdr.onprogress = function () {\n debug('progress', xdr.responseText);\n self.emit('chunk', 200, xdr.responseText);\n };\n\n xdr.onload = function () {\n debug('load');\n self.emit('finish', 200, xdr.responseText);\n\n self._cleanup(false);\n };\n\n this.xdr = xdr;\n this.unloadRef = eventUtils.unloadAdd(function () {\n self._cleanup(true);\n });\n\n try {\n // Fails with AccessDenied if port number is bogus\n this.xdr.open(method, url);\n\n if (this.timeout) {\n this.xdr.timeout = this.timeout;\n }\n\n this.xdr.send(payload);\n } catch (x) {\n this._error();\n }\n};\n\nXDRObject.prototype._error = function () {\n this.emit('finish', 0, '');\n\n this._cleanup(false);\n};\n\nXDRObject.prototype._cleanup = function (abort) {\n debug('cleanup', abort);\n\n if (!this.xdr) {\n return;\n }\n\n this.removeAllListeners();\n eventUtils.unloadDel(this.unloadRef);\n this.xdr.ontimeout = this.xdr.onerror = this.xdr.onprogress = this.xdr.onload = null;\n\n if (abort) {\n try {\n this.xdr.abort();\n } catch (x) {// intentionally empty\n }\n }\n\n this.unloadRef = this.xdr = null;\n};\n\nXDRObject.prototype.close = function () {\n debug('close');\n\n this._cleanup(true);\n}; // IE 8/9 if the request target uses the same scheme - #79\n\n\nXDRObject.enabled = !!(global.XDomainRequest && browser.hasDomain());\nmodule.exports = XDRObject;","map":null,"metadata":{},"sourceType":"script"}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"ast":null,"code":"/**\r\n * Copyright (c) 2015-present, Facebook, Inc.\r\n *\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE file in the root directory of this source tree.\r\n */\n'use strict'; // TODO: we might want to make this injectable to support DEV-time non-root URLs.\n\nmodule.exports = '/__open-stack-frame-in-editor';","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nmodule.exports = [// streaming transports\nrequire('./transport/websocket'), require('./transport/xhr-streaming'), require('./transport/xdr-streaming'), require('./transport/eventsource'), require('./transport/lib/iframe-wrap')(require('./transport/eventsource')) // polling transports\n, require('./transport/htmlfile'), require('./transport/lib/iframe-wrap')(require('./transport/htmlfile')), require('./transport/xhr-polling'), require('./transport/xdr-polling'), require('./transport/lib/iframe-wrap')(require('./transport/xhr-polling')), require('./transport/jsonp-polling')];","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n'use strict';\n\nvar stringifyPrimitive = function (v) {\n switch (typeof v) {\n case 'string':\n return v;\n\n case 'boolean':\n return v ? 'true' : 'false';\n\n case 'number':\n return isFinite(v) ? v : '';\n\n default:\n return '';\n }\n};\n\nmodule.exports = function (obj, sep, eq, name) {\n sep = sep || '&';\n eq = eq || '=';\n\n if (obj === null) {\n obj = undefined;\n }\n\n if (typeof obj === 'object') {\n return map(objectKeys(obj), function (k) {\n var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n\n if (isArray(obj[k])) {\n return map(obj[k], function (v) {\n return ks + encodeURIComponent(stringifyPrimitive(v));\n }).join(sep);\n } else {\n return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n }\n }).join(sep);\n }\n\n if (!name) return '';\n return encodeURIComponent(stringifyPrimitive(name)) + eq + encodeURIComponent(stringifyPrimitive(obj));\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\nfunction map(xs, f) {\n if (xs.map) return xs.map(f);\n var res = [];\n\n for (var i = 0; i < xs.length; i++) {\n res.push(f(xs[i], i));\n }\n\n return res;\n}\n\nvar objectKeys = Object.keys || function (obj) {\n var res = [];\n\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);\n }\n\n return res;\n};","map":null,"metadata":{},"sourceType":"script"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nvar EventEmitter = require('events').EventEmitter,\n inherits = require('inherits');\n\nfunction XHRFake()\n/* method, url, payload, opts */\n{\n var self = this;\n EventEmitter.call(this);\n this.to = setTimeout(function () {\n self.emit('finish', 200, '{}');\n }, XHRFake.timeout);\n}\n\ninherits(XHRFake, EventEmitter);\n\nXHRFake.prototype.close = function () {\n clearTimeout(this.to);\n};\n\nXHRFake.timeout = 2000;\nmodule.exports = XHRFake;","map":null,"metadata":{},"sourceType":"script"}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"ast":null,"code":"import _defineProperty from \"D:\\\\code\\\\React\\\\hooks\\\\2\\\\node_modules\\\\@babel\\\\runtime/helpers/esm/defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nexport let defaultState = {\n count: 1\n};\nexport let CounterReducer = (state = defaultState, action) => {\n state.count = action.payload.count;\n console.log(action);\n return _objectSpread({}, state); //解构\n // return JSON.parse(JSON.stringify(state)); //深拷贝\n};","map":{"version":3,"sources":["D:/code/React/hooks/2/src/components/reducer/index.js"],"names":["defaultState","count","CounterReducer","state","action","payload","console","log"],"mappings":";;;;;;AAAA,OAAO,IAAIA,YAAY,GAAC;AACpBC,EAAAA,KAAK,EAAC;AADc,CAAjB;AAGP,OAAO,IAAIC,cAAc,GAAC,CAACC,KAAK,GAACH,YAAP,EAAoBI,MAApB,KAA6B;AACnDD,EAAAA,KAAK,CAACF,KAAN,GAAYG,MAAM,CAACC,OAAP,CAAeJ,KAA3B;AACAK,EAAAA,OAAO,CAACC,GAAR,CAAYH,MAAZ;AACA,2BAAWD,KAAX,EAHmD,CAGjC;AAClB;AACH,CALM","sourcesContent":["export let defaultState={\r\n count:1\r\n}\r\nexport let CounterReducer=(state=defaultState,action)=>{\r\n state.count=action.payload.count;\r\n console.log(action);\r\n return {...state} //解构\r\n // return JSON.parse(JSON.stringify(state)); //深拷贝\r\n};"]},"metadata":{},"sourceType":"module"}
@@ -0,0 +1 @@
{"ast":null,"code":"'use strict';\n\nconst colorConvert = require('color-convert');\n\nconst wrapAnsi16 = (fn, offset) => function () {\n const code = fn.apply(colorConvert, arguments);\n return \"\\x1B[\".concat(code + offset, \"m\");\n};\n\nconst wrapAnsi256 = (fn, offset) => function () {\n const code = fn.apply(colorConvert, arguments);\n return \"\\x1B[\".concat(38 + offset, \";5;\").concat(code, \"m\");\n};\n\nconst wrapAnsi16m = (fn, offset) => function () {\n const rgb = fn.apply(colorConvert, arguments);\n return \"\\x1B[\".concat(38 + offset, \";2;\").concat(rgb[0], \";\").concat(rgb[1], \";\").concat(rgb[2], \"m\");\n};\n\nfunction assembleStyles() {\n const codes = new Map();\n const styles = {\n modifier: {\n reset: [0, 0],\n // 21 isn't widely supported and 22 does the same thing\n bold: [1, 22],\n dim: [2, 22],\n italic: [3, 23],\n underline: [4, 24],\n inverse: [7, 27],\n hidden: [8, 28],\n strikethrough: [9, 29]\n },\n color: {\n black: [30, 39],\n red: [31, 39],\n green: [32, 39],\n yellow: [33, 39],\n blue: [34, 39],\n magenta: [35, 39],\n cyan: [36, 39],\n white: [37, 39],\n gray: [90, 39],\n // Bright color\n redBright: [91, 39],\n greenBright: [92, 39],\n yellowBright: [93, 39],\n blueBright: [94, 39],\n magentaBright: [95, 39],\n cyanBright: [96, 39],\n whiteBright: [97, 39]\n },\n bgColor: {\n bgBlack: [40, 49],\n bgRed: [41, 49],\n bgGreen: [42, 49],\n bgYellow: [43, 49],\n bgBlue: [44, 49],\n bgMagenta: [45, 49],\n bgCyan: [46, 49],\n bgWhite: [47, 49],\n // Bright color\n bgBlackBright: [100, 49],\n bgRedBright: [101, 49],\n bgGreenBright: [102, 49],\n bgYellowBright: [103, 49],\n bgBlueBright: [104, 49],\n bgMagentaBright: [105, 49],\n bgCyanBright: [106, 49],\n bgWhiteBright: [107, 49]\n }\n }; // Fix humans\n\n styles.color.grey = styles.color.gray;\n\n for (const groupName of Object.keys(styles)) {\n const group = styles[groupName];\n\n for (const styleName of Object.keys(group)) {\n const style = group[styleName];\n styles[styleName] = {\n open: \"\\x1B[\".concat(style[0], \"m\"),\n close: \"\\x1B[\".concat(style[1], \"m\")\n };\n group[styleName] = styles[styleName];\n codes.set(style[0], style[1]);\n }\n\n Object.defineProperty(styles, groupName, {\n value: group,\n enumerable: false\n });\n Object.defineProperty(styles, 'codes', {\n value: codes,\n enumerable: false\n });\n }\n\n const ansi2ansi = n => n;\n\n const rgb2rgb = (r, g, b) => [r, g, b];\n\n styles.color.close = '\\u001B[39m';\n styles.bgColor.close = '\\u001B[49m';\n styles.color.ansi = {\n ansi: wrapAnsi16(ansi2ansi, 0)\n };\n styles.color.ansi256 = {\n ansi256: wrapAnsi256(ansi2ansi, 0)\n };\n styles.color.ansi16m = {\n rgb: wrapAnsi16m(rgb2rgb, 0)\n };\n styles.bgColor.ansi = {\n ansi: wrapAnsi16(ansi2ansi, 10)\n };\n styles.bgColor.ansi256 = {\n ansi256: wrapAnsi256(ansi2ansi, 10)\n };\n styles.bgColor.ansi16m = {\n rgb: wrapAnsi16m(rgb2rgb, 10)\n };\n\n for (let key of Object.keys(colorConvert)) {\n if (typeof colorConvert[key] !== 'object') {\n continue;\n }\n\n const suite = colorConvert[key];\n\n if (key === 'ansi16') {\n key = 'ansi';\n }\n\n if ('ansi16' in suite) {\n styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);\n styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);\n }\n\n if ('ansi256' in suite) {\n styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);\n styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);\n }\n\n if ('rgb' in suite) {\n styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);\n styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);\n }\n }\n\n return styles;\n} // Make the export immutable\n\n\nObject.defineProperty(module, 'exports', {\n enumerable: true,\n get: assembleStyles\n});","map":null,"metadata":{},"sourceType":"script"}

Some files were not shown because too many files have changed in this diff Show More