mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 14:31:02 +00:00
1 line
8.5 KiB
Plaintext
1 line
8.5 KiB
Plaintext
{"dependencies":[],"output":[{"data":{"code":"__d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {\n \"use strict\";\n\n Object.defineProperty(exports, '__esModule', {\n value: true\n });\n exports.validatePathConfig = validatePathConfig;\n const formatToList = items => Object.entries(items).map(([key, value]) => `- ${key} (${value})`).join('\\n');\n function validatePathConfig(config, root = true) {\n const validation = Object.assign({\n path: 'string',\n initialRouteName: 'string',\n screens: 'object'\n }, root ? null : {\n alias: 'array',\n exact: 'boolean',\n stringify: 'object',\n parse: 'object'\n });\n if (typeof config !== 'object' || config === null) {\n throw new Error(`Expected the configuration to be an object, but got ${JSON.stringify(config)}.`);\n }\n const validationErrors = Object.fromEntries(Object.keys(config).map(key => {\n if (key in validation) {\n const type = validation[key];\n // @ts-expect-error: we know the key exists\n const value = config[key];\n if (value !== undefined) {\n if (type === 'array') {\n if (!Array.isArray(value)) {\n return [key, `expected 'Array', got '${typeof value}'`];\n }\n } else if (typeof value !== type) {\n return [key, `expected '${type}', got '${typeof value}'`];\n }\n }\n } else {\n return [key, 'extraneous'];\n }\n return null;\n }).filter(Boolean));\n if (Object.keys(validationErrors).length) {\n throw new Error(`Found invalid properties in the configuration:\\n${formatToList(validationErrors)}\\n\\nYou can only specify the following properties:\\n${formatToList(validation)}\\n\\nIf you want to specify configuration for screens, you need to specify them under a 'screens' property.\\n\\nSee https://reactnavigation.org/docs/configuring-links for more details on how to specify a linking configuration.`);\n }\n if (root && 'path' in config && typeof config.path === 'string' && config.path.includes(':')) {\n throw new Error(`Found invalid path '${config.path}'. The 'path' in the top-level configuration cannot contain patterns for params.`);\n }\n if ('screens' in config && config.screens) {\n Object.entries(config.screens).forEach(([_, value]) => {\n if (typeof value !== 'string') {\n validatePathConfig(value, false);\n }\n });\n }\n }\n});","lineCount":56,"map":[[2,2,1,0],[2,14,1,12],[4,2,1,13,"Object"],[4,8,1,13],[4,9,1,13,"defineProperty"],[4,23,1,13],[4,24,1,13,"exports"],[4,31,1,13],[5,4,1,13,"value"],[5,9,1,13],[6,2,1,13],[7,2,4,0,"exports"],[7,9,4,0],[7,10,4,0,"validatePathConfig"],[7,28,4,0],[7,31,4,0,"validatePathConfig"],[7,49,4,0],[8,2,3,0],[8,8,3,6,"formatToList"],[8,20,3,18],[8,23,3,21,"items"],[8,28,3,26],[8,32,3,30,"Object"],[8,38,3,36],[8,39,3,37,"entries"],[8,46,3,44],[8,47,3,45,"items"],[8,52,3,50],[8,53,3,51],[8,54,3,52,"map"],[8,57,3,55],[8,58,3,56],[8,59,3,57],[8,60,3,58,"key"],[8,63,3,61],[8,65,3,63,"value"],[8,70,3,68],[8,71,3,69],[8,76,3,74],[8,81,3,79,"key"],[8,84,3,82],[8,89,3,87,"value"],[8,94,3,92],[8,97,3,95],[8,98,3,96],[8,99,3,97,"join"],[8,103,3,101],[8,104,3,102],[8,108,3,106],[8,109,3,107],[9,2,4,7],[9,11,4,16,"validatePathConfig"],[9,29,4,34,"validatePathConfig"],[9,30,4,35,"config"],[9,36,4,41],[9,38,4,43,"root"],[9,42,4,47],[9,45,4,50],[9,49,4,54],[9,51,4,56],[10,4,5,2],[10,10,5,8,"validation"],[10,20,5,18],[10,23,5,18,"Object"],[10,29,5,18],[10,30,5,18,"assign"],[10,36,5,18],[11,6,6,4,"path"],[11,10,6,8],[11,12,6,10],[11,20,6,18],[12,6,7,4,"initialRouteName"],[12,22,7,20],[12,24,7,22],[12,32,7,30],[13,6,8,4,"screens"],[13,13,8,11],[13,15,8,13],[14,4,8,21],[14,7,9,8,"root"],[14,11,9,12],[14,14,9,15],[14,18,9,19],[14,21,9,22],[15,6,10,6,"alias"],[15,11,10,11],[15,13,10,13],[15,20,10,20],[16,6,11,6,"exact"],[16,11,11,11],[16,13,11,13],[16,22,11,22],[17,6,12,6,"stringify"],[17,15,12,15],[17,17,12,17],[17,25,12,25],[18,6,13,6,"parse"],[18,11,13,11],[18,13,13,13],[19,4,14,4],[19,5,14,5],[19,6,15,3],[20,4,16,2],[20,8,16,6],[20,15,16,13,"config"],[20,21,16,19],[20,26,16,24],[20,34,16,32],[20,38,16,36,"config"],[20,44,16,42],[20,49,16,47],[20,53,16,51],[20,55,16,53],[21,6,17,4],[21,12,17,10],[21,16,17,14,"Error"],[21,21,17,19],[21,22,17,20],[21,77,17,75,"JSON"],[21,81,17,79],[21,82,17,80,"stringify"],[21,91,17,89],[21,92,17,90,"config"],[21,98,17,96],[21,99,17,97],[21,102,17,100],[21,103,17,101],[22,4,18,2],[23,4,19,2],[23,10,19,8,"validationErrors"],[23,26,19,24],[23,29,19,27,"Object"],[23,35,19,33],[23,36,19,34,"fromEntries"],[23,47,19,45],[23,48,19,46,"Object"],[23,54,19,52],[23,55,19,53,"keys"],[23,59,19,57],[23,60,19,58,"config"],[23,66,19,64],[23,67,19,65],[23,68,19,66,"map"],[23,71,19,69],[23,72,19,70,"key"],[23,75,19,73],[23,79,19,77],[24,6,20,4],[24,10,20,8,"key"],[24,13,20,11],[24,17,20,15,"validation"],[24,27,20,25],[24,29,20,27],[25,8,21,6],[25,14,21,12,"type"],[25,18,21,16],[25,21,21,19,"validation"],[25,31,21,29],[25,32,21,30,"key"],[25,35,21,33],[25,36,21,34],[26,8,22,6],[27,8,23,6],[27,14,23,12,"value"],[27,19,23,17],[27,22,23,20,"config"],[27,28,23,26],[27,29,23,27,"key"],[27,32,23,30],[27,33,23,31],[28,8,24,6],[28,12,24,10,"value"],[28,17,24,15],[28,22,24,20,"undefined"],[28,31,24,29],[28,33,24,31],[29,10,25,8],[29,14,25,12,"type"],[29,18,25,16],[29,23,25,21],[29,30,25,28],[29,32,25,30],[30,12,26,10],[30,16,26,14],[30,17,26,15,"Array"],[30,22,26,20],[30,23,26,21,"isArray"],[30,30,26,28],[30,31,26,29,"value"],[30,36,26,34],[30,37,26,35],[30,39,26,37],[31,14,27,12],[31,21,27,19],[31,22,27,20,"key"],[31,25,27,23],[31,27,27,25],[31,53,27,51],[31,60,27,58,"value"],[31,65,27,63],[31,68,27,66],[31,69,27,67],[32,12,28,10],[33,10,29,8],[33,11,29,9],[33,17,29,15],[33,21,29,19],[33,28,29,26,"value"],[33,33,29,31],[33,38,29,36,"type"],[33,42,29,40],[33,44,29,42],[34,12,30,10],[34,19,30,17],[34,20,30,18,"key"],[34,23,30,21],[34,25,30,23],[34,38,30,36,"type"],[34,42,30,40],[34,53,30,51],[34,60,30,58,"value"],[34,65,30,63],[34,68,30,66],[34,69,30,67],[35,10,31,8],[36,8,32,6],[37,6,33,4],[37,7,33,5],[37,13,33,11],[38,8,34,6],[38,15,34,13],[38,16,34,14,"key"],[38,19,34,17],[38,21,34,19],[38,33,34,31],[38,34,34,32],[39,6,35,4],[40,6,36,4],[40,13,36,11],[40,17,36,15],[41,4,37,2],[41,5,37,3],[41,6,37,4],[41,7,37,5,"filter"],[41,13,37,11],[41,14,37,12,"Boolean"],[41,21,37,19],[41,22,37,20],[41,23,37,21],[42,4,38,2],[42,8,38,6,"Object"],[42,14,38,12],[42,15,38,13,"keys"],[42,19,38,17],[42,20,38,18,"validationErrors"],[42,36,38,34],[42,37,38,35],[42,38,38,36,"length"],[42,44,38,42],[42,46,38,44],[43,6,39,4],[43,12,39,10],[43,16,39,14,"Error"],[43,21,39,19],[43,22,39,20],[43,73,39,71,"formatToList"],[43,85,39,83],[43,86,39,84,"validationErrors"],[43,102,39,100],[43,103,39,101],[43,158,39,156,"formatToList"],[43,170,39,168],[43,171,39,169,"validation"],[43,181,39,179],[43,182,39,180],[43,408,39,406],[43,409,39,407],[44,4,40,2],[45,4,41,2],[45,8,41,6,"root"],[45,12,41,10],[45,16,41,14],[45,22,41,20],[45,26,41,24,"config"],[45,32,41,30],[45,36,41,34],[45,43,41,41,"config"],[45,49,41,47],[45,50,41,48,"path"],[45,54,41,52],[45,59,41,57],[45,67,41,65],[45,71,41,69,"config"],[45,77,41,75],[45,78,41,76,"path"],[45,82,41,80],[45,83,41,81,"includes"],[45,91,41,89],[45,92,41,90],[45,95,41,93],[45,96,41,94],[45,98,41,96],[46,6,42,4],[46,12,42,10],[46,16,42,14,"Error"],[46,21,42,19],[46,22,42,20],[46,45,42,43,"config"],[46,51,42,49],[46,52,42,50,"path"],[46,56,42,54],[46,138,42,136],[46,139,42,137],[47,4,43,2],[48,4,44,2],[48,8,44,6],[48,17,44,15],[48,21,44,19,"config"],[48,27,44,25],[48,31,44,29,"config"],[48,37,44,35],[48,38,44,36,"screens"],[48,45,44,43],[48,47,44,45],[49,6,45,4,"Object"],[49,12,45,10],[49,13,45,11,"entries"],[49,20,45,18],[49,21,45,19,"config"],[49,27,45,25],[49,28,45,26,"screens"],[49,35,45,33],[49,36,45,34],[49,37,45,35,"forEach"],[49,44,45,42],[49,45,45,43],[49,46,45,44],[49,47,45,45,"_"],[49,48,45,46],[49,50,45,48,"value"],[49,55,45,53],[49,56,45,54],[49,61,45,59],[50,8,46,6],[50,12,46,10],[50,19,46,17,"value"],[50,24,46,22],[50,29,46,27],[50,37,46,35],[50,39,46,37],[51,10,47,8,"validatePathConfig"],[51,28,47,26],[51,29,47,27,"value"],[51,34,47,32],[51,36,47,34],[51,41,47,39],[51,42,47,40],[52,8,48,6],[53,6,49,4],[53,7,49,5],[53,8,49,6],[54,4,50,2],[55,2,51,0],[56,0,51,1],[56,3]],"functionMap":{"names":["<global>","formatToList","Object.entries.map$argument_0","validatePathConfig","Object.keys.map$argument_0","Object.entries.forEach$argument_0"],"mappings":"AAA;qBCE,mCC,uCD,YD;OGC;sECe;GDkB;2CEQ;KFI;CHE"},"hasCjsExports":false},"type":"js/module"}]} |