Files
pezkuwi-mobile-app/frontend/.metro-cache/cache/29/3e7d722617aa3d4893d4117df93b3c121a52fc11a4d35ec8ae91427e0ac21e9286bbc3
T
2025-11-07 20:14:32 +00:00

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 = {\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 };\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":57,"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,21],[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],[13,23,8,21],[14,6,9,4],[14,10,9,8,"root"],[14,14,9,12],[14,17,9,15],[14,21,9,19],[14,24,9,22],[15,8,10,6,"alias"],[15,13,10,11],[15,15,10,13],[15,22,10,20],[16,8,11,6,"exact"],[16,13,11,11],[16,15,11,13],[16,24,11,22],[17,8,12,6,"stringify"],[17,17,12,15],[17,19,12,17],[17,27,12,25],[18,8,13,6,"parse"],[18,13,13,11],[18,15,13,13],[19,6,14,4],[19,7,14,5],[20,4,15,2],[20,5,15,3],[21,4,16,2],[21,8,16,6],[21,15,16,13,"config"],[21,21,16,19],[21,26,16,24],[21,34,16,32],[21,38,16,36,"config"],[21,44,16,42],[21,49,16,47],[21,53,16,51],[21,55,16,53],[22,6,17,4],[22,12,17,10],[22,16,17,14,"Error"],[22,21,17,19],[22,22,17,20],[22,77,17,75,"JSON"],[22,81,17,79],[22,82,17,80,"stringify"],[22,91,17,89],[22,92,17,90,"config"],[22,98,17,96],[22,99,17,97],[22,102,17,100],[22,103,17,101],[23,4,18,2],[24,4,19,2],[24,10,19,8,"validationErrors"],[24,26,19,24],[24,29,19,27,"Object"],[24,35,19,33],[24,36,19,34,"fromEntries"],[24,47,19,45],[24,48,19,46,"Object"],[24,54,19,52],[24,55,19,53,"keys"],[24,59,19,57],[24,60,19,58,"config"],[24,66,19,64],[24,67,19,65],[24,68,19,66,"map"],[24,71,19,69],[24,72,19,70,"key"],[24,75,19,73],[24,79,19,77],[25,6,20,4],[25,10,20,8,"key"],[25,13,20,11],[25,17,20,15,"validation"],[25,27,20,25],[25,29,20,27],[26,8,21,6],[26,14,21,12,"type"],[26,18,21,16],[26,21,21,19,"validation"],[26,31,21,29],[26,32,21,30,"key"],[26,35,21,33],[26,36,21,34],[27,8,22,6],[28,8,23,6],[28,14,23,12,"value"],[28,19,23,17],[28,22,23,20,"config"],[28,28,23,26],[28,29,23,27,"key"],[28,32,23,30],[28,33,23,31],[29,8,24,6],[29,12,24,10,"value"],[29,17,24,15],[29,22,24,20,"undefined"],[29,31,24,29],[29,33,24,31],[30,10,25,8],[30,14,25,12,"type"],[30,18,25,16],[30,23,25,21],[30,30,25,28],[30,32,25,30],[31,12,26,10],[31,16,26,14],[31,17,26,15,"Array"],[31,22,26,20],[31,23,26,21,"isArray"],[31,30,26,28],[31,31,26,29,"value"],[31,36,26,34],[31,37,26,35],[31,39,26,37],[32,14,27,12],[32,21,27,19],[32,22,27,20,"key"],[32,25,27,23],[32,27,27,25],[32,53,27,51],[32,60,27,58,"value"],[32,65,27,63],[32,68,27,66],[32,69,27,67],[33,12,28,10],[34,10,29,8],[34,11,29,9],[34,17,29,15],[34,21,29,19],[34,28,29,26,"value"],[34,33,29,31],[34,38,29,36,"type"],[34,42,29,40],[34,44,29,42],[35,12,30,10],[35,19,30,17],[35,20,30,18,"key"],[35,23,30,21],[35,25,30,23],[35,38,30,36,"type"],[35,42,30,40],[35,53,30,51],[35,60,30,58,"value"],[35,65,30,63],[35,68,30,66],[35,69,30,67],[36,10,31,8],[37,8,32,6],[38,6,33,4],[38,7,33,5],[38,13,33,11],[39,8,34,6],[39,15,34,13],[39,16,34,14,"key"],[39,19,34,17],[39,21,34,19],[39,33,34,31],[39,34,34,32],[40,6,35,4],[41,6,36,4],[41,13,36,11],[41,17,36,15],[42,4,37,2],[42,5,37,3],[42,6,37,4],[42,7,37,5,"filter"],[42,13,37,11],[42,14,37,12,"Boolean"],[42,21,37,19],[42,22,37,20],[42,23,37,21],[43,4,38,2],[43,8,38,6,"Object"],[43,14,38,12],[43,15,38,13,"keys"],[43,19,38,17],[43,20,38,18,"validationErrors"],[43,36,38,34],[43,37,38,35],[43,38,38,36,"length"],[43,44,38,42],[43,46,38,44],[44,6,39,4],[44,12,39,10],[44,16,39,14,"Error"],[44,21,39,19],[44,22,39,20],[44,73,39,71,"formatToList"],[44,85,39,83],[44,86,39,84,"validationErrors"],[44,102,39,100],[44,103,39,101],[44,158,39,156,"formatToList"],[44,170,39,168],[44,171,39,169,"validation"],[44,181,39,179],[44,182,39,180],[44,408,39,406],[44,409,39,407],[45,4,40,2],[46,4,41,2],[46,8,41,6,"root"],[46,12,41,10],[46,16,41,14],[46,22,41,20],[46,26,41,24,"config"],[46,32,41,30],[46,36,41,34],[46,43,41,41,"config"],[46,49,41,47],[46,50,41,48,"path"],[46,54,41,52],[46,59,41,57],[46,67,41,65],[46,71,41,69,"config"],[46,77,41,75],[46,78,41,76,"path"],[46,82,41,80],[46,83,41,81,"includes"],[46,91,41,89],[46,92,41,90],[46,95,41,93],[46,96,41,94],[46,98,41,96],[47,6,42,4],[47,12,42,10],[47,16,42,14,"Error"],[47,21,42,19],[47,22,42,20],[47,45,42,43,"config"],[47,51,42,49],[47,52,42,50,"path"],[47,56,42,54],[47,138,42,136],[47,139,42,137],[48,4,43,2],[49,4,44,2],[49,8,44,6],[49,17,44,15],[49,21,44,19,"config"],[49,27,44,25],[49,31,44,29,"config"],[49,37,44,35],[49,38,44,36,"screens"],[49,45,44,43],[49,47,44,45],[50,6,45,4,"Object"],[50,12,45,10],[50,13,45,11,"entries"],[50,20,45,18],[50,21,45,19,"config"],[50,27,45,25],[50,28,45,26,"screens"],[50,35,45,33],[50,36,45,34],[50,37,45,35,"forEach"],[50,44,45,42],[50,45,45,43],[50,46,45,44],[50,47,45,45,"_"],[50,48,45,46],[50,50,45,48,"value"],[50,55,45,53],[50,56,45,54],[50,61,45,59],[51,8,46,6],[51,12,46,10],[51,19,46,17,"value"],[51,24,46,22],[51,29,46,27],[51,37,46,35],[51,39,46,37],[52,10,47,8,"validatePathConfig"],[52,28,47,26],[52,29,47,27,"value"],[52,34,47,32],[52,36,47,34],[52,41,47,39],[52,42,47,40],[53,8,48,6],[54,6,49,4],[54,7,49,5],[54,8,49,6],[55,4,50,2],[56,2,51,0],[57,0,51,1],[57,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"}]}