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B,CAAG,SACrB,AAAK,EAGD,AAAe,UAAf,OAAO,EACH,EAED,KAAK,KAAK,CAAC,GALV,CAAC,CAMV,C,G,E,Q,S,C,C,C,E,E,E,O,C,U,W,O,C,G,E,E,O,C,W,W,O,C,G,E,E,O,C,a,W,O,C,G,E,E,O,C,e,W,O,C,GCRO,IAAM,EAAU,CACtB,+BACA,iCACA,6BACA,2BACA,CAEY,EAAW,MACX,EAAa,MAEb,EAAe,CAC3B,QAAS,SACT,QAAS,QACV,C,G,E,Q,S,C,C,C,E,E,E,O,C,Q,W,O,C,G,E,E,O,C,U,W,O,C,G,E,E,O,C,uB,W,O,C,GCPO,IAAM,EAAQ,CAAC,EAAG,IAEjB,EAAE,GAAG,CAAC,AAAC,GAEN,AADG,EAAE,IAAI,CAAC,AAAC,GAAM,EAAE,EAAE,GAAK,EAAE,EAAE,EAAI,EAAE,IAAI,GAAK,EAAE,IAAI,GAC3C,GAIJ,EAAU,CAAC,EAAM,IAC7B,EAAK,MAAM,CAAC,CAAC,EAAK,KACjB,IAAM,EAAI,CAAI,CAAC,EAAI,CAKnB,OAJK,CAAG,CAAC,EAAE,EACV,CAAA,CAAG,CAAC,EAAE,CAAG,EAAE,AAAF,EAEV,CAAG,CAAC,EAAE,CAAC,IAAI,CAAC,GACL,CACR,EAAG,CAAC,GAEQ,EAAuB,CAAC,EAAK,IACzC,OAAO,MAAM,CAAC,EAAQ,EAAK,G","sources":["","node_modules/idb/build/index.js","node_modules/idb/build/wrap-idb-value.js","src/consts/asset.js","src/utilities/safeParse.js","src/worker/constants.js","src/worker/utility.js"],"sourcesContent":["\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\n var $parcel$global =\n typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequire05cf\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequire05cf\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\nparcelRegister(\"2S9N4\", function(module, exports) {\n\n$parcel$export(module.exports, \"openDB\", function () { return $2178381af1cf984e$export$ca0ed41b1a2af7e; });\n$parcel$export(module.exports, \"deleteDB\", function () { return $2178381af1cf984e$export$9d6df0ac66a98bb2; });\n\nvar $8aIag = parcelRequire(\"8aIag\");\n/**\n * Open a database.\n *\n * @param name Name of the database.\n * @param version Schema version.\n * @param callbacks Additional callbacks.\n */ function $2178381af1cf984e$export$ca0ed41b1a2af7e(name, version, { blocked: blocked, upgrade: upgrade, blocking: blocking, terminated: terminated } = {}) {\n const request = indexedDB.open(name, version);\n const openPromise = (0, $8aIag.w)(request);\n if (upgrade) request.addEventListener('upgradeneeded', (event)=>{\n upgrade((0, $8aIag.w)(request.result), event.oldVersion, event.newVersion, (0, $8aIag.w)(request.transaction), event);\n });\n if (blocked) request.addEventListener('blocked', (event)=>blocked(// Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405\n event.oldVersion, event.newVersion, event));\n openPromise.then((db)=>{\n if (terminated) db.addEventListener('close', ()=>terminated());\n if (blocking) db.addEventListener('versionchange', (event)=>blocking(event.oldVersion, event.newVersion, event));\n }).catch(()=>{});\n return openPromise;\n}\n/**\n * Delete a database.\n *\n * @param name Name of the database.\n */ function $2178381af1cf984e$export$9d6df0ac66a98bb2(name, { blocked: blocked } = {}) {\n const request = indexedDB.deleteDatabase(name);\n if (blocked) request.addEventListener('blocked', (event)=>blocked(// Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405\n event.oldVersion, event));\n return (0, $8aIag.w)(request).then(()=>undefined);\n}\nconst $2178381af1cf984e$var$readMethods = [\n 'get',\n 'getKey',\n 'getAll',\n 'getAllKeys',\n 'count'\n];\nconst $2178381af1cf984e$var$writeMethods = [\n 'put',\n 'add',\n 'delete',\n 'clear'\n];\nconst $2178381af1cf984e$var$cachedMethods = new Map();\nfunction $2178381af1cf984e$var$getMethod(target, prop) {\n if (!(target instanceof IDBDatabase && !(prop in target) && typeof prop === 'string')) return;\n if ($2178381af1cf984e$var$cachedMethods.get(prop)) return $2178381af1cf984e$var$cachedMethods.get(prop);\n const targetFuncName = prop.replace(/FromIndex$/, '');\n const useIndex = prop !== targetFuncName;\n const isWrite = $2178381af1cf984e$var$writeMethods.includes(targetFuncName);\n if (// Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.\n !(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) || !(isWrite || $2178381af1cf984e$var$readMethods.includes(targetFuncName))) return;\n const method = async function(storeName, ...args) {\n // isWrite ? 'readwrite' : undefined gzipps better, but fails in Edge :(\n const tx = this.transaction(storeName, isWrite ? 'readwrite' : 'readonly');\n let target = tx.store;\n if (useIndex) target = target.index(args.shift());\n // Must reject if op rejects.\n // If it's a write operation, must reject if tx.done rejects.\n // Must reject with op rejection first.\n // Must resolve with op value.\n // Must handle both promises (no unhandled rejections)\n return (await Promise.all([\n target[targetFuncName](...args),\n isWrite && tx.done\n ]))[0];\n };\n $2178381af1cf984e$var$cachedMethods.set(prop, method);\n return method;\n}\n(0, $8aIag.r)((oldTraps)=>({\n ...oldTraps,\n get: (target, prop, receiver)=>$2178381af1cf984e$var$getMethod(target, prop) || oldTraps.get(target, prop, receiver),\n has: (target, prop)=>!!$2178381af1cf984e$var$getMethod(target, prop) || oldTraps.has(target, prop)\n }));\n\n});\nparcelRegister(\"8aIag\", function(module, exports) {\n\n$parcel$export(module.exports, \"w\", function () { return $5f31840df4fad724$export$efccba1c4a2ef57b; });\n$parcel$export(module.exports, \"r\", function () { return $5f31840df4fad724$export$43caf9889c228507; });\nconst $5f31840df4fad724$export$23f2a1d2818174ef = (object, constructors)=>constructors.some((c)=>object instanceof c);\nlet $5f31840df4fad724$var$idbProxyableTypes;\nlet $5f31840df4fad724$var$cursorAdvanceMethods;\n// This is a function to prevent it throwing up in node environments.\nfunction $5f31840df4fad724$var$getIdbProxyableTypes() {\n return $5f31840df4fad724$var$idbProxyableTypes || ($5f31840df4fad724$var$idbProxyableTypes = [\n IDBDatabase,\n IDBObjectStore,\n IDBIndex,\n IDBCursor,\n IDBTransaction\n ]);\n}\n// This is a function to prevent it throwing up in node environments.\nfunction $5f31840df4fad724$var$getCursorAdvanceMethods() {\n return $5f31840df4fad724$var$cursorAdvanceMethods || ($5f31840df4fad724$var$cursorAdvanceMethods = [\n IDBCursor.prototype.advance,\n IDBCursor.prototype.continue,\n IDBCursor.prototype.continuePrimaryKey\n ]);\n}\nconst $5f31840df4fad724$var$cursorRequestMap = new WeakMap();\nconst $5f31840df4fad724$var$transactionDoneMap = new WeakMap();\nconst $5f31840df4fad724$var$transactionStoreNamesMap = new WeakMap();\nconst $5f31840df4fad724$var$transformCache = new WeakMap();\nconst $5f31840df4fad724$export$407448d2b89b1813 = new WeakMap();\nfunction $5f31840df4fad724$var$promisifyRequest(request) {\n const promise = new Promise((resolve, reject)=>{\n const unlisten = ()=>{\n request.removeEventListener('success', success);\n request.removeEventListener('error', error);\n };\n const success = ()=>{\n resolve($5f31840df4fad724$export$efccba1c4a2ef57b(request.result));\n unlisten();\n };\n const error = ()=>{\n reject(request.error);\n unlisten();\n };\n request.addEventListener('success', success);\n request.addEventListener('error', error);\n });\n promise.then((value)=>{\n // Since cursoring reuses the IDBRequest (*sigh*), we cache it for later retrieval\n // (see wrapFunction).\n if (value instanceof IDBCursor) $5f31840df4fad724$var$cursorRequestMap.set(value, request);\n // Catching to avoid \"Uncaught Promise exceptions\"\n }).catch(()=>{});\n // This mapping exists in reverseTransformCache but doesn't doesn't exist in transformCache. This\n // is because we create many promises from a single IDBRequest.\n $5f31840df4fad724$export$407448d2b89b1813.set(promise, request);\n return promise;\n}\nfunction $5f31840df4fad724$var$cacheDonePromiseForTransaction(tx) {\n // Early bail if we've already created a done promise for this transaction.\n if ($5f31840df4fad724$var$transactionDoneMap.has(tx)) return;\n const done = new Promise((resolve, reject)=>{\n const unlisten = ()=>{\n tx.removeEventListener('complete', complete);\n tx.removeEventListener('error', error);\n tx.removeEventListener('abort', error);\n };\n const complete = ()=>{\n resolve();\n unlisten();\n };\n const error = ()=>{\n reject(tx.error || new DOMException('AbortError', 'AbortError'));\n unlisten();\n };\n tx.addEventListener('complete', complete);\n tx.addEventListener('error', error);\n tx.addEventListener('abort', error);\n });\n // Cache it for later retrieval.\n $5f31840df4fad724$var$transactionDoneMap.set(tx, done);\n}\nlet $5f31840df4fad724$var$idbProxyTraps = {\n get (target, prop, receiver) {\n if (target instanceof IDBTransaction) {\n // Special handling for transaction.done.\n if (prop === 'done') return $5f31840df4fad724$var$transactionDoneMap.get(target);\n // Polyfill for objectStoreNames because of Edge.\n if (prop === 'objectStoreNames') return target.objectStoreNames || $5f31840df4fad724$var$transactionStoreNamesMap.get(target);\n // Make tx.store return the only store in the transaction, or undefined if there are many.\n if (prop === 'store') return receiver.objectStoreNames[1] ? undefined : receiver.objectStore(receiver.objectStoreNames[0]);\n }\n // Else transform whatever we get back.\n return $5f31840df4fad724$export$efccba1c4a2ef57b(target[prop]);\n },\n set (target, prop, value) {\n target[prop] = value;\n return true;\n },\n has (target, prop) {\n if (target instanceof IDBTransaction && (prop === 'done' || prop === 'store')) return true;\n return prop in target;\n }\n};\nfunction $5f31840df4fad724$export$43caf9889c228507(callback) {\n $5f31840df4fad724$var$idbProxyTraps = callback($5f31840df4fad724$var$idbProxyTraps);\n}\nfunction $5f31840df4fad724$var$wrapFunction(func) {\n // Due to expected object equality (which is enforced by the caching in `wrap`), we\n // only create one new func per func.\n // Edge doesn't support objectStoreNames (booo), so we polyfill it here.\n if (func === IDBDatabase.prototype.transaction && !('objectStoreNames' in IDBTransaction.prototype)) return function(storeNames, ...args) {\n const tx = func.call($5f31840df4fad724$export$3b14a55fb2447963(this), storeNames, ...args);\n $5f31840df4fad724$var$transactionStoreNamesMap.set(tx, storeNames.sort ? storeNames.sort() : [\n storeNames\n ]);\n return $5f31840df4fad724$export$efccba1c4a2ef57b(tx);\n };\n // Cursor methods are special, as the behaviour is a little more different to standard IDB. In\n // IDB, you advance the cursor and wait for a new 'success' on the IDBRequest that gave you the\n // cursor. It's kinda like a promise that can resolve with many values. That doesn't make sense\n // with real promises, so each advance methods returns a new promise for the cursor object, or\n // undefined if the end of the cursor has been reached.\n if ($5f31840df4fad724$var$getCursorAdvanceMethods().includes(func)) return function(...args) {\n // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n // the original object.\n func.apply($5f31840df4fad724$export$3b14a55fb2447963(this), args);\n return $5f31840df4fad724$export$efccba1c4a2ef57b($5f31840df4fad724$var$cursorRequestMap.get(this));\n };\n return function(...args) {\n // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n // the original object.\n return $5f31840df4fad724$export$efccba1c4a2ef57b(func.apply($5f31840df4fad724$export$3b14a55fb2447963(this), args));\n };\n}\nfunction $5f31840df4fad724$var$transformCachableValue(value) {\n if (typeof value === 'function') return $5f31840df4fad724$var$wrapFunction(value);\n // This doesn't return, it just creates a 'done' promise for the transaction,\n // which is later returned for transaction.done (see idbObjectHandler).\n if (value instanceof IDBTransaction) $5f31840df4fad724$var$cacheDonePromiseForTransaction(value);\n if ($5f31840df4fad724$export$23f2a1d2818174ef(value, $5f31840df4fad724$var$getIdbProxyableTypes())) return new Proxy(value, $5f31840df4fad724$var$idbProxyTraps);\n // Return the same value back if we're not going to transform it.\n return value;\n}\nfunction $5f31840df4fad724$export$efccba1c4a2ef57b(value) {\n // We sometimes generate multiple promises from a single IDBRequest (eg when cursoring), because\n // IDB is weird and a single IDBRequest can yield many responses, so these can't be cached.\n if (value instanceof IDBRequest) return $5f31840df4fad724$var$promisifyRequest(value);\n // If we've already transformed this value before, reuse the transformed value.\n // This is faster, but it also provides object equality.\n if ($5f31840df4fad724$var$transformCache.has(value)) return $5f31840df4fad724$var$transformCache.get(value);\n const newValue = $5f31840df4fad724$var$transformCachableValue(value);\n // Not all types are transformed.\n // These may be primitive types, so they can't be WeakMap keys.\n if (newValue !== value) {\n $5f31840df4fad724$var$transformCache.set(value, newValue);\n $5f31840df4fad724$export$407448d2b89b1813.set(newValue, value);\n }\n return newValue;\n}\nconst $5f31840df4fad724$export$3b14a55fb2447963 = (value)=>$5f31840df4fad724$export$407448d2b89b1813.get(value);\n\n});\n\n\nparcelRegister(\"8x03h\", function(module, exports) {\n\n$parcel$export(module.exports, \"ASSET_TYPES\", function () { return $636172204d7691ab$export$e18ad1b53d14ba76; });\n$parcel$export(module.exports, \"ASSET_OPTIONS\", function () { return $636172204d7691ab$export$8617d478dd885e99; });\n$parcel$export(module.exports, \"ASSET_STATUS\", function () { return $636172204d7691ab$export$2746f307f4d2220d; });\n$parcel$export(module.exports, \"isAssetPending\", function () { return $636172204d7691ab$export$2557dfa1895bbc21; });\n$parcel$export(module.exports, \"ASSET_TYPES_REVERSE\", function () { return $636172204d7691ab$export$d3780eeb4a8eaed3; });\n$parcel$export(module.exports, \"ASSET_NAMES\", function () { return $636172204d7691ab$export$283fb573323c7ce5; });\n$parcel$export(module.exports, \"ASSET_CODE\", function () { return $636172204d7691ab$export$d92a67ca76245040; });\n$parcel$export(module.exports, \"ASSET_EDIT_URL\", function () { return $636172204d7691ab$export$d4c6f4024d6babc8; });\n$parcel$export(module.exports, \"ASSET_ACCOUNT_TYPE_TO_LABEL\", function () { return $636172204d7691ab$export$e1db0dfe454d4a50; });\n$parcel$export(module.exports, \"ASSET_LIQUID_TAGS_MAPPING\", function () { return $636172204d7691ab$export$5f390c85ae290ec5; });\n$parcel$export(module.exports, \"ASSET_CASK_TAGS_MAPPING\", function () { return $636172204d7691ab$export$d3472318b7ef90e3; });\n$parcel$export(module.exports, \"LIQUID_ACCOUNT_TYPE\", function () { return $636172204d7691ab$export$822f43bbf42ed35e; });\n$parcel$export(module.exports, \"LIQUID_ACCOUNT_TYPE_OPTIONS\", function () { return $636172204d7691ab$export$8eea456d6591cdc; });\nconst $636172204d7691ab$export$e18ad1b53d14ba76 = {\n cask: '1',\n filling_tank: '20',\n ibc: '21',\n pallet: '22',\n tanker: '23',\n container: '24'\n};\nconst $636172204d7691ab$export$8617d478dd885e99 = [\n {\n label: 'Cask',\n value: '1'\n },\n {\n label: 'IBC',\n value: '21'\n },\n {\n label: 'Pallet',\n value: '22'\n },\n {\n label: 'Tanker',\n value: '23'\n },\n {\n label: 'Container',\n value: '24'\n }\n];\nconst $636172204d7691ab$export$e4abac893f36ee97 = [\n {\n label: 'Cask',\n value: '1'\n },\n {\n label: 'IBC',\n value: '21'\n }\n];\nconst $636172204d7691ab$export$2746f307f4d2220d = {\n PENDING_CREATE: '0',\n PENDING_DEPLOY: '1',\n ACTIVE: '2',\n REJECT_CREATE: '3',\n PENDING_UPDATE: '4',\n REJECT_UPDATE: '5',\n PENDING_MOVE: '6',\n MOVED: '7',\n PENDING_REMOVE: '8',\n REMOVED: '9',\n DEFECTED: '10'\n};\nconst $636172204d7691ab$export$3f9b9ee173d00bda = (status)=>status === $636172204d7691ab$export$2746f307f4d2220d.ACTIVE;\nconst $636172204d7691ab$export$2557dfa1895bbc21 = (status)=>[\n $636172204d7691ab$export$2746f307f4d2220d.PENDING_CREATE,\n $636172204d7691ab$export$2746f307f4d2220d.PENDING_UPDATE\n ].includes(status);\nconst $636172204d7691ab$export$d3780eeb4a8eaed3 = {\n 1: 'cask',\n 20: 'filling_tank',\n 21: 'ibc',\n 22: 'pallet',\n 23: 'tanker',\n 24: 'container'\n};\nconst $636172204d7691ab$export$283fb573323c7ce5 = {\n 1: 'Cask',\n 20: 'Filling Tank',\n 21: 'IBC',\n 22: 'Pallet',\n 23: 'Tanker',\n 24: 'Container'\n};\nconst $636172204d7691ab$export$d92a67ca76245040 = {\n 1: 'C',\n 20: 'F',\n 21: 'I',\n 22: 'P',\n 23: 'T'\n};\nconst $636172204d7691ab$export$d4c6f4024d6babc8 = {\n 1: '/app/cask',\n 20: '/app/tank',\n 21: '/app/ibc',\n 22: '/app/pallet',\n 23: '/app/tanker',\n 24: '/app/container'\n};\nconst $636172204d7691ab$export$4db6abdaec93baea = {\n BENEFICIAL_OWNER: 0,\n REGISTERED_OWNER: 1,\n REPRESENTATIVE_OWNER: 2\n};\nconst $636172204d7691ab$export$a0a5f5d40c56d20d = Object.values($636172204d7691ab$export$4db6abdaec93baea).map((type)=>[\n String(type),\n '',\n '',\n ''\n ]);\nconst $636172204d7691ab$export$e1db0dfe454d4a50 = {\n [$636172204d7691ab$export$4db6abdaec93baea.BENEFICIAL_OWNER]: 'Deed Holder',\n [$636172204d7691ab$export$4db6abdaec93baea.REGISTERED_OWNER]: 'Managing Agent',\n [$636172204d7691ab$export$4db6abdaec93baea.REPRESENTATIVE_OWNER]: 'Representative Agent'\n};\nconst $636172204d7691ab$export$5f390c85ae290ec5 = {\n '12 year old malt': 'malt,12yr',\n '12 year old malt ex cherry': 'malt,12yr,ex-cherry',\n 'gnd malt': 'gnd,malt',\n '19 year old powerscourt': 'powerscourt,19yr',\n grain: 'grain',\n 'malt td': 'malt,td',\n 'mitchers blend': 'mitchers,blend',\n 'new make malt': 'malt,new-make',\n 'pot still': 'pot-still',\n 'dd malt': 'malt,dd',\n '19 year old malt': 'malt,19yr',\n '20 year old malt': 'malt,20yr',\n 'cooley grain': 'cooley,grain',\n 'new make irish whiskey': 'new-make,irish,whiskey',\n 'pot still heavy': 'pot-still,heavy',\n 'pot still light': 'pot-still,light'\n};\nconst $636172204d7691ab$export$d3472318b7ef90e3 = {\n ab1: 'american,oak,bourbon,standard',\n american: 'american,oak,standard',\n bourbon: 'american,oak,bourbon,standard',\n 'sherry oloroso': 'sherry,olorosso',\n french: 'french,oak',\n 'heaven hill': 'american,oak,bourbon,heaven-hill,standard',\n 'heaven hill b2': 'american,oak,bourbon,heaven-hill,b2,standard',\n 'heaven hill b3': 'american,oak,bourbon,heaven-hill,b3,standard',\n 'heavily charred b1': 'american,oak,heavy,char,b1',\n 'hungarian oak': 'hungarian,oak',\n 'jack daniels': 'american,oak,jack-daniels,standard',\n 'jim beam': 'american,oak,jim-beam,standard',\n 'kelvin cooperage': 'kelvin-cooperage',\n 'pedro ximenez': 'px,sherry',\n 'px sherry': 'px,sherry',\n sauternes: 'sauternes',\n speyside: 'speyside',\n 'virgina hungarian oak': 'virgin,hungarian,oak',\n 'western spirit b1': 'american,oak,bourbon,western-spirit,b1,standard',\n 'wild turkey': 'american,oak,bourbon,wild-turkey,standard',\n mostcatel: 'moscatel,fortified,wine',\n banyuls: 'banyuls,fortified,wine',\n rivesaltes: 'riversaltes,fortified,wine',\n chestnutt: 'chestnut',\n cherry: 'cherry',\n 'amontillado butt': 'butt,amontillado,sherry',\n 'amontillado hogs': 'hogshead,amontillado,sherry',\n 'apricot brandy': 'apricot,brandy',\n cavadlos: 'cavaldos,brandy',\n 'cavadlos 2nd fill': 'cavaldos,brandy,re-fill,2nd',\n 'cassis blackcurrant liquor': 'cassis,liqueur,blackcurrant',\n 'cerise cherry brandy': 'cerise,brandy,cherry',\n champagne: 'champagne',\n 'fine red wine': 'red,fine,wine',\n 'fino hog': 'fino,hogshead',\n 'four roses b1': 'american,oak,bourbon,four-roses,b1,standard',\n 'kelvin wine': 'kelvin-wine',\n maderia: 'madeira,fortified,wine',\n 'manzinalla hogs': 'manzanilla,sherry,hogshead',\n 'maple bourbon': 'american,oak,bourbon,four-roses,b1,standard',\n 'maple syrup': 'maple-syrup',\n marsella: 'marsella,fortified,wine',\n mezcal: 'mezcal,mescal',\n monbazillac: 'monbazillac,wine,sweet',\n neoc: 'neoc,french,oak',\n 'neoc 2nd fill': 'neoc,french,oak,re-fill,2nd',\n 'neoc 3rd fill': 'neoc,french,oak,re-fill,3rd',\n oloroso: 'sherry,olorosso',\n 'oloroso butt': 'sherry,olorosso,butt',\n 'oloroso hog': 'sherry,olorosso,hogshead',\n 'orange liquor': 'orange,liqueur',\n 'orange sherry': 'orange,sherry',\n 'orange wine': 'orange,wine',\n 'oz tyler b1': 'american,oak,bourbon,oz-tyler,b1',\n 'pinot noir': 'pinot-noir',\n 'red wine': 'red,wine',\n 'ruby port': 'ruby,port',\n 'robertson b1': 'robertson,whiskey,b1',\n run: 'rum',\n 'select bourbon': 'american,oak,bourbon,select,standard',\n sherry: 'sherry',\n tequilla: 'tequila',\n 'virgin oak': 'virgin,oak'\n};\nconst $636172204d7691ab$export$822f43bbf42ed35e = {\n production: '1',\n storage: '2',\n processing: '3'\n};\nconst $636172204d7691ab$export$8eea456d6591cdc = [\n {\n label: 'Production',\n value: '1'\n },\n {\n label: 'Storage',\n value: '2'\n },\n {\n label: 'Processing',\n value: '3'\n }\n];\n\n});\n\nparcelRegister(\"lsA5v\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", function () { return $f9f834c3729b129e$export$2e2bcd8739ae039; });\nfunction $f9f834c3729b129e$var$safeParse(val) {\n if (!val) return {};\n if (typeof val === 'object') return val;\n return JSON.parse(val);\n}\nvar $f9f834c3729b129e$export$2e2bcd8739ae039 = $f9f834c3729b129e$var$safeParse;\n\n});\n\nparcelRegister(\"8KUNJ\", function(module, exports) {\n\n$parcel$export(module.exports, \"ORIGINS\", function () { return $65feae1b92dfe712$export$93217506e04f32d1; });\n$parcel$export(module.exports, \"ASSET_ID\", function () { return $65feae1b92dfe712$export$7956ac7796569f29; });\n$parcel$export(module.exports, \"REQUEST_ID\", function () { return $65feae1b92dfe712$export$1a1d5f86328670f6; });\n$parcel$export(module.exports, \"LOCAL_STATUS\", function () { return $65feae1b92dfe712$export$7cd9c37679c58eb4; });\nconst $65feae1b92dfe712$export$93217506e04f32d1 = [\n 'https://dev-api.metacask.com',\n 'https://dev-api.proofworks.com',\n 'https://api.proofworks.com',\n 'https://api.metacask.com'\n];\nconst $65feae1b92dfe712$export$c69bf045a678b870 = 'api-cache';\nconst $65feae1b92dfe712$export$7956ac7796569f29 = '/t/';\nconst $65feae1b92dfe712$export$1a1d5f86328670f6 = '/r/';\nconst $65feae1b92dfe712$export$7cd9c37679c58eb4 = {\n CREATED: 'create',\n UPDATED: 'update'\n};\n\n});\n\nparcelRegister(\"55ttD\", function(module, exports) {\n\n$parcel$export(module.exports, \"merge\", function () { return $3b4448e14a14a8ae$export$4950aa0f605343fb; });\n$parcel$export(module.exports, \"groupBy\", function () { return $3b4448e14a14a8ae$export$3f063810d7bf01bd; });\n$parcel$export(module.exports, \"groupArrayByProperty\", function () { return $3b4448e14a14a8ae$export$6bdb6c8cee971283; });\n// export const merge = (l, r, seen = new Set()) =>\n// \tl.concat(r).filter((x) => {\n// \t\tconst k = `${x?.id}${x?.path}`;\n// \t\treturn seen.has(k) ? false : seen.add(k);\n// \t});\nconst $3b4448e14a14a8ae$export$4950aa0f605343fb = (l, r)=>{\n // Map the contents of r, and replace with matching item from l if it exists..\n return r.map((i)=>{\n const f = l.find((v)=>v.id === i.id && v.path === i.path);\n return f ? f : i;\n });\n};\nconst $3b4448e14a14a8ae$export$3f063810d7bf01bd = (list, key)=>list.reduce((acc, item)=>{\n const k = item[key];\n if (!acc[k]) acc[k] = [];\n acc[k].push(item);\n return acc;\n }, {});\nconst $3b4448e14a14a8ae$export$6bdb6c8cee971283 = (arr, key)=>Object.values($3b4448e14a14a8ae$export$3f063810d7bf01bd(arr, key)); // const downloadAll = async (url, headers, params = {}, list = []) => {\n // \tconst response = await fetch(url, {\n // \t\tmethod: 'POST',\n // \t\theaders: {\n // \t\t\t'Content-Type': 'application/json',\n // \t\t\t...headers,\n // \t\t},\n // \t\tbody: JSON.stringify(params),\n // \t});\n // \tif (!response.ok) {\n // \t\tconst text = await response.text();\n // \t\tthrow new Error(text);\n // \t}\n // \tconst { items = [], page } = await response.json();\n // \tif (page && Object.keys(page).length && items && items.length > 0) {\n // \t\treturn downloadAll(url, headers, { ...params, page }, list.concat(items));\n // \t}\n // \treturn list.concat(items);\n // };\n // const downloadAllRaw = async (url, headers, params = {}) => {\n // \tconst response = await fetch(url, {\n // \t\tmethod: 'POST',\n // \t\theaders: {\n // \t\t\t'Content-Type': 'application/json',\n // \t\t\t...headers,\n // \t\t},\n // \t\tbody: JSON.stringify(params),\n // \t});\n // \tif (!response.ok) {\n // \t\tconst text = await response.text();\n // \t\tthrow new Error(text);\n // \t}\n // \treturn response.json();\n // };\n // export const downloadAllGetRaw = async (url, headers, params = {}) => {\n // \tconst response = await fetch(`${url}${objectToQueryString(params)}`, {\n // \t\tmethod: 'GET',\n // \t\theaders: {\n // \t\t\t'Content-Type': 'application/json',\n // \t\t\t...headers,\n // \t\t},\n // \t});\n // \tif (!response.ok) {\n // \t\tconst text = await response.text();\n // \t\tthrow new Error(text);\n // \t}\n // \treturn response.json();\n // };\n // const downloadAllGet = async (url, headers, params = {}, list = []) => {\n // \tconst response = await fetch(`${url}${objectToQueryString(params)}`, {\n // \t\tmethod: 'GET',\n // \t\theaders: {\n // \t\t\t'Content-Type': 'application/json',\n // \t\t\t...headers,\n // \t\t},\n // \t});\n // \tif (!response.ok) {\n // \t\tconst text = await response.text();\n // \t\tthrow new Error(text);\n // \t}\n // \tconst { items = [], page } = await response.json();\n // \tif (page && Object.keys(page).length && items && items.length > 0) {\n // \t\treturn downloadAllGet(url, headers, { ...params, page }, list.concat(items));\n // \t}\n // \treturn list.concat(items);\n // };\n // export const saveAllFacilities = async (\n // \tfacilityRepository,\n // \toriginalUrl,\n // \theaders = {},\n // \tbody = {},\n // ) => {\n // \t// Download all the facilities\n // \tconst list = await downloadAllGetRaw(originalUrl, headers, body);\n // \t// clear db\n // \tawait facilityRepository.clear();\n // \t// store inside db\n // \tawait facilityRepository.bulkAdd(\n // \t\tObject.entries(list).map(([v, k]) => ({\n // \t\t\tpath: v,\n // \t\t\t...k,\n // \t\t})),\n // \t);\n // \treturn list;\n // };\n // export const saveAllRequests = async (\n // \trequestRepository,\n // \toriginalUrl,\n // \theaders = {},\n // ) => {\n // \t// clear db\n // \tawait requestRepository.clear();\n // \t// Download all the request\n // \tconst { items = [] } = await downloadAllGetRaw(originalUrl, headers, {});\n // \t// store inside db\n // \tawait requestRepository.bulkAdd(items);\n // \treturn items;\n // };\n // export const saveAllSkuList = async (\n // \tskuRepository,\n // \toriginalUrl,\n // \theaders = {},\n // ) => {\n // \t// clear db\n // \tawait skuRepository.clear();\n // \t// Download all the request\n // \tconst response = await fetch(`${originalUrl}${objectToQueryString({})}`, {\n // \t\tmethod: 'GET',\n // \t\theaders: {\n // \t\t\t'Content-Type': 'application/json',\n // \t\t\t...headers,\n // \t\t},\n // \t});\n // \tif (!response.ok) {\n // \t\tconst text = await response.text();\n // \t\tthrow new Error(text);\n // \t}\n // \tconst list = await response.json();\n // \t// store inside db\n // \tawait skuRepository.bulkAdd(list);\n // \treturn list;\n // };\n // export const saveAllAssets = async (\n // \tassetRepository,\n // \toriginalUrl,\n // \theaders = {},\n // \tbody = {},\n // \tsaveEmptyAssets = false,\n // ) => {\n // \t// clear db\n // \tawait assetRepository.clear();\n // \t// Download all the assets\n // \tconst list = await downloadAllRaw(originalUrl, headers, { ...body });\n // \t// download unlocated assets\n // \tif (saveEmptyAssets) {\n // \t\tconst emptyList = await downloadAllRaw(originalUrl, headers, {\n // \t\t\t...body,\n // \t\t\tlimit: 200,\n // \t\t\tfacility_id: '0/0/0',\n // \t\t\trow: '0',\n // \t\t\tlevel: '0',\n // \t\t});\n // \t\tlist.push(...emptyList);\n // \t}\n // \t// store inside db\n // \tawait assetRepository.bulkAdd(list);\n // \treturn list;\n // };\n\n});\n\n\n//# sourceMappingURL=service-worker.cbd1f558.js.map\n","import { w as wrap, r as replaceTraps } from './wrap-idb-value.js';\nexport { u as unwrap, w as wrap } from './wrap-idb-value.js';\n\n/**\n * Open a database.\n *\n * @param name Name of the database.\n * @param version Schema version.\n * @param callbacks Additional callbacks.\n */\nfunction openDB(name, version, { blocked, upgrade, blocking, terminated } = {}) {\n const request = indexedDB.open(name, version);\n const openPromise = wrap(request);\n if (upgrade) {\n request.addEventListener('upgradeneeded', (event) => {\n upgrade(wrap(request.result), event.oldVersion, event.newVersion, wrap(request.transaction), event);\n });\n }\n if (blocked) {\n request.addEventListener('blocked', (event) => blocked(\n // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405\n event.oldVersion, event.newVersion, event));\n }\n openPromise\n .then((db) => {\n if (terminated)\n db.addEventListener('close', () => terminated());\n if (blocking) {\n db.addEventListener('versionchange', (event) => blocking(event.oldVersion, event.newVersion, event));\n }\n })\n .catch(() => { });\n return openPromise;\n}\n/**\n * Delete a database.\n *\n * @param name Name of the database.\n */\nfunction deleteDB(name, { blocked } = {}) {\n const request = indexedDB.deleteDatabase(name);\n if (blocked) {\n request.addEventListener('blocked', (event) => blocked(\n // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405\n event.oldVersion, event));\n }\n return wrap(request).then(() => undefined);\n}\n\nconst readMethods = ['get', 'getKey', 'getAll', 'getAllKeys', 'count'];\nconst writeMethods = ['put', 'add', 'delete', 'clear'];\nconst cachedMethods = new Map();\nfunction getMethod(target, prop) {\n if (!(target instanceof IDBDatabase &&\n !(prop in target) &&\n typeof prop === 'string')) {\n return;\n }\n if (cachedMethods.get(prop))\n return cachedMethods.get(prop);\n const targetFuncName = prop.replace(/FromIndex$/, '');\n const useIndex = prop !== targetFuncName;\n const isWrite = writeMethods.includes(targetFuncName);\n if (\n // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.\n !(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) ||\n !(isWrite || readMethods.includes(targetFuncName))) {\n return;\n }\n const method = async function (storeName, ...args) {\n // isWrite ? 'readwrite' : undefined gzipps better, but fails in Edge :(\n const tx = this.transaction(storeName, isWrite ? 'readwrite' : 'readonly');\n let target = tx.store;\n if (useIndex)\n target = target.index(args.shift());\n // Must reject if op rejects.\n // If it's a write operation, must reject if tx.done rejects.\n // Must reject with op rejection first.\n // Must resolve with op value.\n // Must handle both promises (no unhandled rejections)\n return (await Promise.all([\n target[targetFuncName](...args),\n isWrite && tx.done,\n ]))[0];\n };\n cachedMethods.set(prop, method);\n return method;\n}\nreplaceTraps((oldTraps) => ({\n ...oldTraps,\n get: (target, prop, receiver) => getMethod(target, prop) || oldTraps.get(target, prop, receiver),\n has: (target, prop) => !!getMethod(target, prop) || oldTraps.has(target, prop),\n}));\n\nexport { deleteDB, openDB };\n","const instanceOfAny = (object, constructors) => constructors.some((c) => object instanceof c);\n\nlet idbProxyableTypes;\nlet cursorAdvanceMethods;\n// This is a function to prevent it throwing up in node environments.\nfunction getIdbProxyableTypes() {\n return (idbProxyableTypes ||\n (idbProxyableTypes = [\n IDBDatabase,\n IDBObjectStore,\n IDBIndex,\n IDBCursor,\n IDBTransaction,\n ]));\n}\n// This is a function to prevent it throwing up in node environments.\nfunction getCursorAdvanceMethods() {\n return (cursorAdvanceMethods ||\n (cursorAdvanceMethods = [\n IDBCursor.prototype.advance,\n IDBCursor.prototype.continue,\n IDBCursor.prototype.continuePrimaryKey,\n ]));\n}\nconst cursorRequestMap = new WeakMap();\nconst transactionDoneMap = new WeakMap();\nconst transactionStoreNamesMap = new WeakMap();\nconst transformCache = new WeakMap();\nconst reverseTransformCache = new WeakMap();\nfunction promisifyRequest(request) {\n const promise = new Promise((resolve, reject) => {\n const unlisten = () => {\n request.removeEventListener('success', success);\n request.removeEventListener('error', error);\n };\n const success = () => {\n resolve(wrap(request.result));\n unlisten();\n };\n const error = () => {\n reject(request.error);\n unlisten();\n };\n request.addEventListener('success', success);\n request.addEventListener('error', error);\n });\n promise\n .then((value) => {\n // Since cursoring reuses the IDBRequest (*sigh*), we cache it for later retrieval\n // (see wrapFunction).\n if (value instanceof IDBCursor) {\n cursorRequestMap.set(value, request);\n }\n // Catching to avoid \"Uncaught Promise exceptions\"\n })\n .catch(() => { });\n // This mapping exists in reverseTransformCache but doesn't doesn't exist in transformCache. This\n // is because we create many promises from a single IDBRequest.\n reverseTransformCache.set(promise, request);\n return promise;\n}\nfunction cacheDonePromiseForTransaction(tx) {\n // Early bail if we've already created a done promise for this transaction.\n if (transactionDoneMap.has(tx))\n return;\n const done = new Promise((resolve, reject) => {\n const unlisten = () => {\n tx.removeEventListener('complete', complete);\n tx.removeEventListener('error', error);\n tx.removeEventListener('abort', error);\n };\n const complete = () => {\n resolve();\n unlisten();\n };\n const error = () => {\n reject(tx.error || new DOMException('AbortError', 'AbortError'));\n unlisten();\n };\n tx.addEventListener('complete', complete);\n tx.addEventListener('error', error);\n tx.addEventListener('abort', error);\n });\n // Cache it for later retrieval.\n transactionDoneMap.set(tx, done);\n}\nlet idbProxyTraps = {\n get(target, prop, receiver) {\n if (target instanceof IDBTransaction) {\n // Special handling for transaction.done.\n if (prop === 'done')\n return transactionDoneMap.get(target);\n // Polyfill for objectStoreNames because of Edge.\n if (prop === 'objectStoreNames') {\n return target.objectStoreNames || transactionStoreNamesMap.get(target);\n }\n // Make tx.store return the only store in the transaction, or undefined if there are many.\n if (prop === 'store') {\n return receiver.objectStoreNames[1]\n ? undefined\n : receiver.objectStore(receiver.objectStoreNames[0]);\n }\n }\n // Else transform whatever we get back.\n return wrap(target[prop]);\n },\n set(target, prop, value) {\n target[prop] = value;\n return true;\n },\n has(target, prop) {\n if (target instanceof IDBTransaction &&\n (prop === 'done' || prop === 'store')) {\n return true;\n }\n return prop in target;\n },\n};\nfunction replaceTraps(callback) {\n idbProxyTraps = callback(idbProxyTraps);\n}\nfunction wrapFunction(func) {\n // Due to expected object equality (which is enforced by the caching in `wrap`), we\n // only create one new func per func.\n // Edge doesn't support objectStoreNames (booo), so we polyfill it here.\n if (func === IDBDatabase.prototype.transaction &&\n !('objectStoreNames' in IDBTransaction.prototype)) {\n return function (storeNames, ...args) {\n const tx = func.call(unwrap(this), storeNames, ...args);\n transactionStoreNamesMap.set(tx, storeNames.sort ? storeNames.sort() : [storeNames]);\n return wrap(tx);\n };\n }\n // Cursor methods are special, as the behaviour is a little more different to standard IDB. In\n // IDB, you advance the cursor and wait for a new 'success' on the IDBRequest that gave you the\n // cursor. It's kinda like a promise that can resolve with many values. That doesn't make sense\n // with real promises, so each advance methods returns a new promise for the cursor object, or\n // undefined if the end of the cursor has been reached.\n if (getCursorAdvanceMethods().includes(func)) {\n return function (...args) {\n // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n // the original object.\n func.apply(unwrap(this), args);\n return wrap(cursorRequestMap.get(this));\n };\n }\n return function (...args) {\n // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n // the original object.\n return wrap(func.apply(unwrap(this), args));\n };\n}\nfunction transformCachableValue(value) {\n if (typeof value === 'function')\n return wrapFunction(value);\n // This doesn't return, it just creates a 'done' promise for the transaction,\n // which is later returned for transaction.done (see idbObjectHandler).\n if (value instanceof IDBTransaction)\n cacheDonePromiseForTransaction(value);\n if (instanceOfAny(value, getIdbProxyableTypes()))\n return new Proxy(value, idbProxyTraps);\n // Return the same value back if we're not going to transform it.\n return value;\n}\nfunction wrap(value) {\n // We sometimes generate multiple promises from a single IDBRequest (eg when cursoring), because\n // IDB is weird and a single IDBRequest can yield many responses, so these can't be cached.\n if (value instanceof IDBRequest)\n return promisifyRequest(value);\n // If we've already transformed this value before, reuse the transformed value.\n // This is faster, but it also provides object equality.\n if (transformCache.has(value))\n return transformCache.get(value);\n const newValue = transformCachableValue(value);\n // Not all types are transformed.\n // These may be primitive types, so they can't be WeakMap keys.\n if (newValue !== value) {\n transformCache.set(value, newValue);\n reverseTransformCache.set(newValue, value);\n }\n return newValue;\n}\nconst unwrap = (value) => reverseTransformCache.get(value);\n\nexport { reverseTransformCache as a, instanceOfAny as i, replaceTraps as r, unwrap as u, wrap as w };\n","export const ASSET_TYPES = {\n\tcask: '1',\n\tfilling_tank: '20',\n\tibc: '21',\n\tpallet: '22',\n\ttanker: '23',\n\tcontainer: '24',\n\t// bottle: '2',\n};\n\nexport const ASSET_OPTIONS = [\n\t{ label: 'Cask', value: '1' },\n\t{ label: 'IBC', value: '21' },\n\t{ label: 'Pallet', value: '22' },\n\t{ label: 'Tanker', value: '23' },\n\t{ label: 'Container', value: '24' },\n];\n\nexport const CONTAINER_OPTIONS = [\n\t{ label: 'Cask', value: '1' },\n\t{ label: 'IBC', value: '21' },\n];\n\nexport const ASSET_STATUS = {\n\tPENDING_CREATE: '0', // when created on pending table\n\tPENDING_DEPLOY: '1', // when approved and waiting for chain deploy (not used for now)\n\tACTIVE: '2', // when asset is on main table (after approval)\n\tREJECT_CREATE: '3', // when asset was rejected (after approval)\n\tPENDING_UPDATE: '4', // when asset was updated and waiting for approval (pending + main)\n\tREJECT_UPDATE: '5', // when asset was rejected (after approval)\n\tPENDING_MOVE: '6', // when transferring assets and pending chain approval (asset migration)\n\tMOVED: '7', // when the asset is shipped to other company and chain approved (not used for now)\n\tPENDING_REMOVE: '8', // when the asset is shipped to other company awaiting chain approval(not used for now) simply we are deleting the record\n\tREMOVED: '9', // when the asset is shipped and chain approved(not used for now) simply we are deleting the record\n\tDEFECTED: '10', // when asset is defected\n};\n\nexport const isAssetActive = (status) => status === ASSET_STATUS.ACTIVE;\nexport const isAssetPending = (status) =>\n\t[ASSET_STATUS.PENDING_CREATE, ASSET_STATUS.PENDING_UPDATE].includes(status);\n\nexport const ASSET_TYPES_REVERSE = {\n\t1: 'cask',\n\t20: 'filling_tank',\n\t21: 'ibc',\n\t22: 'pallet',\n\t23: 'tanker',\n\t24: 'container',\n};\n\nexport const ASSET_NAMES = {\n\t1: 'Cask',\n\t20: 'Filling Tank',\n\t21: 'IBC',\n\t22: 'Pallet',\n\t23: 'Tanker',\n\t24: 'Container',\n};\n\nexport const ASSET_CODE = {\n\t1: 'C',\n\t20: 'F',\n\t21: 'I',\n\t22: 'P',\n\t23: 'T',\n};\n\nexport const ASSET_EDIT_URL = {\n\t1: '/app/cask',\n\t20: '/app/tank',\n\t21: '/app/ibc',\n\t22: '/app/pallet',\n\t23: '/app/tanker',\n\t24: '/app/container',\n};\n\nexport const ASSET_ACCOUNT_TYPE = {\n\tBENEFICIAL_OWNER: 0,\n\tREGISTERED_OWNER: 1,\n\tREPRESENTATIVE_OWNER: 2,\n};\n\nexport const DEFAULT_ASSET_ACCOUNTS = Object.values(ASSET_ACCOUNT_TYPE).map(\n\t(type) => [String(type), '', '', ''],\n);\n\nexport const ASSET_ACCOUNT_TYPE_TO_LABEL = {\n\t[ASSET_ACCOUNT_TYPE.BENEFICIAL_OWNER]: 'Deed Holder',\n\t[ASSET_ACCOUNT_TYPE.REGISTERED_OWNER]: 'Managing Agent',\n\t[ASSET_ACCOUNT_TYPE.REPRESENTATIVE_OWNER]: 'Representative Agent',\n};\n\nexport const ASSET_LIQUID_TAGS_MAPPING = {\n\t'12 year old malt': 'malt,12yr',\n\t'12 year old malt ex cherry': 'malt,12yr,ex-cherry',\n\t'gnd malt': 'gnd,malt',\n\t'19 year old powerscourt': 'powerscourt,19yr',\n\tgrain: 'grain',\n\t'malt td': 'malt,td',\n\t'mitchers blend': 'mitchers,blend',\n\t'new make malt': 'malt,new-make',\n\t'pot still': 'pot-still',\n\t'dd malt': 'malt,dd',\n\t'19 year old malt': 'malt,19yr',\n\t'20 year old malt': 'malt,20yr',\n\t'cooley grain': 'cooley,grain',\n\t'new make irish whiskey': 'new-make,irish,whiskey',\n\t'pot still heavy': 'pot-still,heavy',\n\t'pot still light': 'pot-still,light',\n};\n\nexport const ASSET_CASK_TAGS_MAPPING = {\n\tab1: 'american,oak,bourbon,standard',\n\tamerican: 'american,oak,standard',\n\tbourbon: 'american,oak,bourbon,standard',\n\t'sherry oloroso': 'sherry,olorosso',\n\tfrench: 'french,oak',\n\t'heaven hill': 'american,oak,bourbon,heaven-hill,standard',\n\t'heaven hill b2': 'american,oak,bourbon,heaven-hill,b2,standard',\n\t'heaven hill b3': 'american,oak,bourbon,heaven-hill,b3,standard',\n\t'heavily charred b1': 'american,oak,heavy,char,b1',\n\t'hungarian oak': 'hungarian,oak',\n\t'jack daniels': 'american,oak,jack-daniels,standard',\n\t'jim beam': 'american,oak,jim-beam,standard',\n\t'kelvin cooperage': 'kelvin-cooperage',\n\t'pedro ximenez': 'px,sherry',\n\t'px sherry': 'px,sherry',\n\tsauternes: 'sauternes',\n\tspeyside: 'speyside',\n\t'virgina hungarian oak': 'virgin,hungarian,oak',\n\t'western spirit b1': 'american,oak,bourbon,western-spirit,b1,standard',\n\t'wild turkey': 'american,oak,bourbon,wild-turkey,standard',\n\tmostcatel: 'moscatel,fortified,wine',\n\tbanyuls: 'banyuls,fortified,wine',\n\trivesaltes: 'riversaltes,fortified,wine',\n\tchestnutt: 'chestnut',\n\tcherry: 'cherry',\n\t'amontillado butt': 'butt,amontillado,sherry',\n\t'amontillado hogs': 'hogshead,amontillado,sherry',\n\t'apricot brandy': 'apricot,brandy',\n\tcavadlos: 'cavaldos,brandy',\n\t'cavadlos 2nd fill': 'cavaldos,brandy,re-fill,2nd',\n\t'cassis blackcurrant liquor': 'cassis,liqueur,blackcurrant',\n\t'cerise cherry brandy': 'cerise,brandy,cherry',\n\tchampagne: 'champagne',\n\t'fine red wine': 'red,fine,wine',\n\t'fino hog': 'fino,hogshead',\n\t'four roses b1': 'american,oak,bourbon,four-roses,b1,standard',\n\t'kelvin wine': 'kelvin-wine',\n\tmaderia: 'madeira,fortified,wine',\n\t'manzinalla hogs': 'manzanilla,sherry,hogshead',\n\t'maple bourbon': 'american,oak,bourbon,four-roses,b1,standard',\n\t'maple syrup': 'maple-syrup',\n\tmarsella: 'marsella,fortified,wine',\n\tmezcal: 'mezcal,mescal',\n\tmonbazillac: 'monbazillac,wine,sweet',\n\tneoc: 'neoc,french,oak',\n\t'neoc 2nd fill': 'neoc,french,oak,re-fill,2nd',\n\t'neoc 3rd fill': 'neoc,french,oak,re-fill,3rd',\n\toloroso: 'sherry,olorosso',\n\t'oloroso butt': 'sherry,olorosso,butt',\n\t'oloroso hog': 'sherry,olorosso,hogshead',\n\t'orange liquor': 'orange,liqueur',\n\t'orange sherry': 'orange,sherry',\n\t'orange wine': 'orange,wine',\n\t'oz tyler b1': 'american,oak,bourbon,oz-tyler,b1',\n\t'pinot noir': 'pinot-noir',\n\t'red wine': 'red,wine',\n\t'ruby port': 'ruby,port',\n\t'robertson b1': 'robertson,whiskey,b1',\n\trun: 'rum',\n\t'select bourbon': 'american,oak,bourbon,select,standard',\n\tsherry: 'sherry',\n\ttequilla: 'tequila',\n\t'virgin oak': 'virgin,oak',\n};\n\nexport const LIQUID_ACCOUNT_TYPE = {\n\tproduction: '1',\n\tstorage: '2',\n\tprocessing: '3',\n};\n\nexport const LIQUID_ACCOUNT_TYPE_OPTIONS = [\n\t{ label: 'Production', value: '1' },\n\t{ label: 'Storage', value: '2' },\n\t{ label: 'Processing', value: '3' },\n];\n","function safeParse(val) {\n\tif (!val) {\n\t\treturn {};\n\t}\n\tif (typeof val === 'object') {\n\t\treturn val;\n\t}\n\treturn JSON.parse(val);\n}\n\nexport default safeParse;\n","export const ORIGINS = [\n\t'https://dev-api.metacask.com',\n\t'https://dev-api.proofworks.com',\n\t'https://api.proofworks.com',\n\t'https://api.metacask.com',\n];\nexport const API_CACHE = 'api-cache';\nexport const ASSET_ID = '/t/';\nexport const REQUEST_ID = '/r/';\n\nexport const LOCAL_STATUS = {\n\tCREATED: 'create',\n\tUPDATED: 'update',\n};\n","// export const merge = (l, r, seen = new Set()) =>\n// \tl.concat(r).filter((x) => {\n// \t\tconst k = `${x?.id}${x?.path}`;\n// \t\treturn seen.has(k) ? false : seen.add(k);\n// \t});\n\nexport const merge = (l, r) => {\n\t// Map the contents of r, and replace with matching item from l if it exists..\n\treturn r.map((i) => {\n\t\tconst f = l.find((v) => v.id === i.id && v.path === i.path);\n\t\treturn f ? f : i;\n\t});\n}\n\nexport const groupBy = (list, key) =>\n\tlist.reduce((acc, item) => {\n\t\tconst k = item[key];\n\t\tif (!acc[k]) {\n\t\t\tacc[k] = [];\n\t\t}\n\t\tacc[k].push(item);\n\t\treturn acc;\n\t}, {});\n\nexport const groupArrayByProperty = (arr, key) =>\n\tObject.values(groupBy(arr, key));\n\n// const downloadAll = async (url, headers, params = {}, list = []) => {\n// \tconst response = await fetch(url, {\n// \t\tmethod: 'POST',\n// \t\theaders: {\n// \t\t\t'Content-Type': 'application/json',\n// \t\t\t...headers,\n// \t\t},\n// \t\tbody: JSON.stringify(params),\n// \t});\n// \tif (!response.ok) {\n// \t\tconst text = await response.text();\n// \t\tthrow new Error(text);\n// \t}\n// \tconst { items = [], page } = await response.json();\n// \tif (page && Object.keys(page).length && items && items.length > 0) {\n// \t\treturn downloadAll(url, headers, { ...params, page }, list.concat(items));\n// \t}\n// \treturn list.concat(items);\n// };\n// const downloadAllRaw = async (url, headers, params = {}) => {\n// \tconst response = await fetch(url, {\n// \t\tmethod: 'POST',\n// \t\theaders: {\n// \t\t\t'Content-Type': 'application/json',\n// \t\t\t...headers,\n// \t\t},\n// \t\tbody: JSON.stringify(params),\n// \t});\n// \tif (!response.ok) {\n// \t\tconst text = await response.text();\n// \t\tthrow new Error(text);\n// \t}\n// \treturn response.json();\n// };\n\n// export const downloadAllGetRaw = async (url, headers, params = {}) => {\n// \tconst response = await fetch(`${url}${objectToQueryString(params)}`, {\n// \t\tmethod: 'GET',\n// \t\theaders: {\n// \t\t\t'Content-Type': 'application/json',\n// \t\t\t...headers,\n// \t\t},\n// \t});\n// \tif (!response.ok) {\n// \t\tconst text = await response.text();\n// \t\tthrow new Error(text);\n// \t}\n// \treturn response.json();\n// };\n\n// const downloadAllGet = async (url, headers, params = {}, list = []) => {\n// \tconst response = await fetch(`${url}${objectToQueryString(params)}`, {\n// \t\tmethod: 'GET',\n// \t\theaders: {\n// \t\t\t'Content-Type': 'application/json',\n// \t\t\t...headers,\n// \t\t},\n// \t});\n// \tif (!response.ok) {\n// \t\tconst text = await response.text();\n// \t\tthrow new Error(text);\n// \t}\n// \tconst { items = [], page } = await response.json();\n// \tif (page && Object.keys(page).length && items && items.length > 0) {\n// \t\treturn downloadAllGet(url, headers, { ...params, page }, list.concat(items));\n// \t}\n// \treturn list.concat(items);\n// };\n\n// export const saveAllFacilities = async (\n// \tfacilityRepository,\n// \toriginalUrl,\n// \theaders = {},\n// \tbody = {},\n// ) => {\n// \t// Download all the facilities\n// \tconst list = await downloadAllGetRaw(originalUrl, headers, body);\n// \t// clear db\n// \tawait facilityRepository.clear();\n// \t// store inside db\n// \tawait facilityRepository.bulkAdd(\n// \t\tObject.entries(list).map(([v, k]) => ({\n// \t\t\tpath: v,\n// \t\t\t...k,\n// \t\t})),\n// \t);\n// \treturn list;\n// };\n\n// export const saveAllRequests = async (\n// \trequestRepository,\n// \toriginalUrl,\n// \theaders = {},\n// ) => {\n// \t// clear db\n// \tawait requestRepository.clear();\n// \t// Download all the request\n// \tconst { items = [] } = await downloadAllGetRaw(originalUrl, headers, {});\n// \t// store inside db\n// \tawait requestRepository.bulkAdd(items);\n// \treturn items;\n// };\n// export const saveAllSkuList = async (\n// \tskuRepository,\n// \toriginalUrl,\n// \theaders = {},\n// ) => {\n// \t// clear db\n// \tawait skuRepository.clear();\n// \t// Download all the request\n// \tconst response = await fetch(`${originalUrl}${objectToQueryString({})}`, {\n// \t\tmethod: 'GET',\n// \t\theaders: {\n// \t\t\t'Content-Type': 'application/json',\n// \t\t\t...headers,\n// \t\t},\n// \t});\n// \tif (!response.ok) {\n// \t\tconst text = await response.text();\n// \t\tthrow new Error(text);\n// \t}\n// \tconst list = await response.json();\n// \t// store inside db\n// \tawait skuRepository.bulkAdd(list);\n// \treturn list;\n// };\n\n// export const saveAllAssets = async (\n// \tassetRepository,\n// \toriginalUrl,\n// \theaders = {},\n// \tbody = {},\n// \tsaveEmptyAssets = false,\n// ) => {\n// \t// clear db\n// \tawait assetRepository.clear();\n// \t// Download all the assets\n\n// \tconst list = await downloadAllRaw(originalUrl, headers, { ...body });\n// \t// download unlocated assets\n// \tif (saveEmptyAssets) {\n// \t\tconst emptyList = await downloadAllRaw(originalUrl, headers, {\n// \t\t\t...body,\n// \t\t\tlimit: 200,\n// \t\t\tfacility_id: '0/0/0',\n// \t\t\trow: '0',\n// \t\t\tlevel: '0',\n// \t\t});\n// \t\tlist.push(...emptyList);\n// \t}\n// \t// store inside db\n// \tawait assetRepository.bulkAdd(list);\n// \treturn list;\n// };\n"],"names":["$parcel$export","e","n","v","s","Object","defineProperty","get","set","enumerable","configurable","$parcel$global","globalThis","self","window","global","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","parcelRegister","$2178381af1cf984e$export$ca0ed41b1a2af7e","$2178381af1cf984e$export$9d6df0ac66a98bb2","$8aIag","name","version","blocked","upgrade","blocking","terminated","request","indexedDB","open","openPromise","w","addEventListener","event","result","oldVersion","newVersion","transaction","then","db","catch","deleteDatabase","undefined","$2178381af1cf984e$var$readMethods","$2178381af1cf984e$var$writeMethods","$2178381af1cf984e$var$cachedMethods","Map","$2178381af1cf984e$var$getMethod","target","prop","IDBDatabase","targetFuncName","replace","useIndex","isWrite","includes","IDBIndex","IDBObjectStore","prototype","method","storeName","args","tx","store","index","shift","Promise","all","done","r","oldTraps","receiver","has","$5f31840df4fad724$var$idbProxyableTypes","$5f31840df4fad724$var$cursorAdvanceMethods","$5f31840df4fad724$export$efccba1c4a2ef57b","$5f31840df4fad724$export$43caf9889c228507","$5f31840df4fad724$export$23f2a1d2818174ef","object","constructors","some","c","$5f31840df4fad724$var$cursorRequestMap","WeakMap","$5f31840df4fad724$var$transactionDoneMap","$5f31840df4fad724$var$transactionStoreNamesMap","$5f31840df4fad724$var$transformCache","$5f31840df4fad724$export$407448d2b89b1813","$5f31840df4fad724$var$idbProxyTraps","IDBTransaction","objectStoreNames","objectStore","value","callback","IDBRequest","$5f31840df4fad724$var$promisifyRequest","promise","resolve","reject","unlisten","removeEventListener","success","error","IDBCursor","newValue","$5f31840df4fad724$var$transformCachableValue","func","$5f31840df4fad724$var$getCursorAdvanceMethods","advance","continue","continuePrimaryKey","apply","$5f31840df4fad724$export$3b14a55fb2447963","storeNames","sort","$5f31840df4fad724$var$cacheDonePromiseForTransaction","complete","DOMException","Proxy","$636172204d7691ab$export$e18ad1b53d14ba76","$636172204d7691ab$export$8617d478dd885e99","$636172204d7691ab$export$2746f307f4d2220d","$636172204d7691ab$export$2557dfa1895bbc21","$636172204d7691ab$export$d3780eeb4a8eaed3","$636172204d7691ab$export$283fb573323c7ce5","$636172204d7691ab$export$d92a67ca76245040","$636172204d7691ab$export$d4c6f4024d6babc8","$636172204d7691ab$export$e1db0dfe454d4a50","$636172204d7691ab$export$5f390c85ae290ec5","$636172204d7691ab$export$d3472318b7ef90e3","$636172204d7691ab$export$822f43bbf42ed35e","$636172204d7691ab$export$8eea456d6591cdc","cask","filling_tank","ibc","pallet","tanker","container","label","PENDING_CREATE","PENDING_DEPLOY","ACTIVE","REJECT_CREATE","PENDING_UPDATE","REJECT_UPDATE","PENDING_MOVE","MOVED","PENDING_REMOVE","REMOVED","DEFECTED","status","$636172204d7691ab$export$4db6abdaec93baea","BENEFICIAL_OWNER","REGISTERED_OWNER","REPRESENTATIVE_OWNER","values","map","type","String","grain","ab1","american","bourbon","french","sauternes","speyside","mostcatel","banyuls","rivesaltes","chestnutt","cherry","cavadlos","champagne","maderia","marsella","mezcal","monbazillac","neoc","oloroso","run","sherry","tequilla","production","storage","processing","$f9f834c3729b129e$export$2e2bcd8739ae039","val","JSON","parse","$65feae1b92dfe712$export$93217506e04f32d1","$65feae1b92dfe712$export$7956ac7796569f29","$65feae1b92dfe712$export$1a1d5f86328670f6","$65feae1b92dfe712$export$7cd9c37679c58eb4","CREATED","UPDATED","$3b4448e14a14a8ae$export$4950aa0f605343fb","$3b4448e14a14a8ae$export$3f063810d7bf01bd","$3b4448e14a14a8ae$export$6bdb6c8cee971283","l","i","f","find","path","list","key","reduce","acc","item","k","push","arr"],"version":3,"file":"service-worker.cbd1f558.js.map"}