mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-06 03:17:58 +00:00
1 line
7.6 KiB
Plaintext
1 line
7.6 KiB
Plaintext
{"dependencies":[{"name":"../../../exports/InteractionManager","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":13,"column":0,"index":225},"end":{"line":13,"column":69,"index":294}}],"key":"xCxB1zW50yE4RuPd5KrkShI1yG4=","exportNames":["*"],"imports":1}}],"output":[{"data":{"code":"__d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {\n /**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n */\n\n 'use strict';\n\n Object.defineProperty(exports, '__esModule', {\n value: true\n });\n function _interopDefault(e) {\n return e && e.__esModule ? e : {\n default: e\n };\n }\n Object.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _default;\n }\n });\n var _exportsInteractionManager = require(_dependencyMap[0], \"../../../exports/InteractionManager\");\n var InteractionManager = _interopDefault(_exportsInteractionManager);\n /**\n * A simple class for batching up invocations of a low-pri callback. A timeout is set to run the\n * callback once after a delay, no matter how many times it's scheduled. Once the delay is reached,\n * InteractionManager.runAfterInteractions is used to invoke the callback after any hi-pri\n * interactions are done running.\n *\n * Make sure to cleanup with dispose(). Example:\n *\n * class Widget extends React.Component {\n * _batchedSave: new Batchinator(() => this._saveState, 1000);\n * _saveSate() {\n * // save this.state to disk\n * }\n * componentDidUpdate() {\n * this._batchedSave.schedule();\n * }\n * componentWillUnmount() {\n * this._batchedSave.dispose();\n * }\n * ...\n * }\n */\n class Batchinator {\n constructor(callback, delayMS) {\n this._delay = delayMS;\n this._callback = callback;\n }\n /*\n * Cleanup any pending tasks.\n *\n * By default, if there is a pending task the callback is run immediately. Set the option abort to\n * true to not call the callback if it was pending.\n */\n dispose(options) {\n if (options === void 0) {\n options = {\n abort: false\n };\n }\n if (this._taskHandle) {\n this._taskHandle.cancel();\n if (!options.abort) {\n this._callback();\n }\n this._taskHandle = null;\n }\n }\n schedule() {\n if (this._taskHandle) {\n return;\n }\n var timeoutHandle = setTimeout(() => {\n this._taskHandle = InteractionManager.default.runAfterInteractions(() => {\n // Note that we clear the handle before invoking the callback so that if the callback calls\n // schedule again, it will actually schedule another task.\n this._taskHandle = null;\n this._callback();\n });\n }, this._delay);\n this._taskHandle = {\n cancel: () => clearTimeout(timeoutHandle)\n };\n }\n }\n var _default = Batchinator;\n});","lineCount":95,"map":[[2,2,1,0],[3,0,2,0],[4,0,3,0],[5,0,4,0],[6,0,5,0],[7,0,6,0],[8,0,7,0],[9,0,8,0],[10,0,9,0],[12,2,11,0],[12,14,11,12],[14,2,11,13,"Object"],[14,8,11,13],[14,9,11,13,"defineProperty"],[14,23,11,13],[14,24,11,13,"exports"],[14,31,11,13],[15,4,11,13,"value"],[15,9,11,13],[16,2,11,13],[17,2,11,13],[17,11,11,13,"_interopDefault"],[17,27,11,13,"e"],[17,28,11,13],[18,4,11,13],[18,11,11,13,"e"],[18,12,11,13],[18,16,11,13,"e"],[18,17,11,13],[18,18,11,13,"__esModule"],[18,28,11,13],[18,31,11,13,"e"],[18,32,11,13],[19,6,11,13,"default"],[19,13,11,13],[19,15,11,13,"e"],[20,4,11,13],[21,2,11,13],[22,2,79,0,"Object"],[22,8,79,0],[22,9,79,0,"defineProperty"],[22,23,79,0],[22,24,79,0,"exports"],[22,31,79,0],[23,4,79,0,"enumerable"],[23,14,79,0],[24,4,79,0,"get"],[24,7,79,0],[24,18,79,0,"get"],[24,19,79,0],[25,6,79,0],[25,13,79,0,"_default"],[25,21,79,0],[26,4,79,0],[27,2,79,0],[28,2,13,0],[28,6,13,0,"_exportsInteractionManager"],[28,32,13,0],[28,35,13,0,"require"],[28,42,13,0],[28,43,13,0,"_dependencyMap"],[28,57,13,0],[29,2,13,0],[29,6,13,0,"InteractionManager"],[29,24,13,0],[29,27,13,0,"_interopDefault"],[29,42,13,0],[29,43,13,0,"_exportsInteractionManager"],[29,69,13,0],[30,2,15,0],[31,0,16,0],[32,0,17,0],[33,0,18,0],[34,0,19,0],[35,0,20,0],[36,0,21,0],[37,0,22,0],[38,0,23,0],[39,0,24,0],[40,0,25,0],[41,0,26,0],[42,0,27,0],[43,0,28,0],[44,0,29,0],[45,0,30,0],[46,0,31,0],[47,0,32,0],[48,0,33,0],[49,0,34,0],[50,0,35,0],[51,0,36,0],[52,2,37,0],[52,8,37,6,"Batchinator"],[52,19,37,17],[52,20,37,18],[53,4,38,2,"constructor"],[53,15,38,13,"constructor"],[53,16,38,14,"callback"],[53,24,38,22],[53,26,38,24,"delayMS"],[53,33,38,31],[53,35,38,33],[54,6,39,4],[54,10,39,8],[54,11,39,9,"_delay"],[54,17,39,15],[54,20,39,18,"delayMS"],[54,27,39,25],[55,6,40,4],[55,10,40,8],[55,11,40,9,"_callback"],[55,20,40,18],[55,23,40,21,"callback"],[55,31,40,29],[56,4,41,2],[57,4,42,2],[58,0,43,0],[59,0,44,0],[60,0,45,0],[61,0,46,0],[62,0,47,0],[63,4,48,2,"dispose"],[63,11,48,9,"dispose"],[63,12,48,10,"options"],[63,19,48,17],[63,21,48,19],[64,6,49,4],[64,10,49,8,"options"],[64,17,49,15],[64,22,49,20],[64,27,49,25],[64,28,49,26],[64,30,49,28],[65,8,50,6,"options"],[65,15,50,13],[65,18,50,16],[66,10,51,8,"abort"],[66,15,51,13],[66,17,51,15],[67,8,52,6],[67,9,52,7],[68,6,53,4],[69,6,54,4],[69,10,54,8],[69,14,54,12],[69,15,54,13,"_taskHandle"],[69,26,54,24],[69,28,54,26],[70,8,55,6],[70,12,55,10],[70,13,55,11,"_taskHandle"],[70,24,55,22],[70,25,55,23,"cancel"],[70,31,55,29],[70,32,55,30],[70,33,55,31],[71,8,56,6],[71,12,56,10],[71,13,56,11,"options"],[71,20,56,18],[71,21,56,19,"abort"],[71,26,56,24],[71,28,56,26],[72,10,57,8],[72,14,57,12],[72,15,57,13,"_callback"],[72,24,57,22],[72,25,57,23],[72,26,57,24],[73,8,58,6],[74,8,59,6],[74,12,59,10],[74,13,59,11,"_taskHandle"],[74,24,59,22],[74,27,59,25],[74,31,59,29],[75,6,60,4],[76,4,61,2],[77,4,62,2,"schedule"],[77,12,62,10,"schedule"],[77,13,62,10],[77,15,62,13],[78,6,63,4],[78,10,63,8],[78,14,63,12],[78,15,63,13,"_taskHandle"],[78,26,63,24],[78,28,63,26],[79,8,64,6],[80,6,65,4],[81,6,66,4],[81,10,66,8,"timeoutHandle"],[81,23,66,21],[81,26,66,24,"setTimeout"],[81,36,66,34],[81,37,66,35],[81,43,66,41],[82,8,67,6],[82,12,67,10],[82,13,67,11,"_taskHandle"],[82,24,67,22],[82,27,67,25,"InteractionManager"],[82,45,67,43],[82,46,67,43,"default"],[82,53,67,43],[82,54,67,44,"runAfterInteractions"],[82,74,67,64],[82,75,67,65],[82,81,67,71],[83,10,68,8],[84,10,69,8],[85,10,70,8],[85,14,70,12],[85,15,70,13,"_taskHandle"],[85,26,70,24],[85,29,70,27],[85,33,70,31],[86,10,71,8],[86,14,71,12],[86,15,71,13,"_callback"],[86,24,71,22],[86,25,71,23],[86,26,71,24],[87,8,72,6],[87,9,72,7],[87,10,72,8],[88,6,73,4],[88,7,73,5],[88,9,73,7],[88,13,73,11],[88,14,73,12,"_delay"],[88,20,73,18],[88,21,73,19],[89,6,74,4],[89,10,74,8],[89,11,74,9,"_taskHandle"],[89,22,74,20],[89,25,74,23],[90,8,75,6,"cancel"],[90,14,75,12],[90,16,75,14,"cancel"],[90,17,75,14],[90,22,75,20,"clearTimeout"],[90,34,75,32],[90,35,75,33,"timeoutHandle"],[90,48,75,46],[91,6,76,4],[91,7,76,5],[92,4,77,2],[93,2,78,0],[94,2,79,0],[94,6,79,0,"_default"],[94,14,79,0],[94,17,79,15,"Batchinator"],[94,28,79,26],[95,0,79,27],[95,3]],"functionMap":{"names":["<global>","Batchinator","Batchinator#constructor","Batchinator#dispose","Batchinator#schedule","setTimeout$argument_0","InteractionManager.runAfterInteractions$argument_0","_taskHandle.cancel"],"mappings":"AAA;ACoC;ECC;GDG;EEO;GFa;EGC;mCCI;iECC;ODK;KDC;cGE,iCH;GHE;CDC"},"hasCjsExports":false},"type":"js/module"}]} |