%PDF- %PDF-
Direktori : /www/varak.net/nextcloud.varak.net/apps_old/apps/text/js/ |
Current File : //www/varak.net/nextcloud.varak.net/apps_old/apps/text/js/ordinal-Bt1svyuw.chunk.mjs.map |
{"version":3,"file":"ordinal-Bt1svyuw.chunk.mjs","sources":["../node_modules/internmap/src/index.js","../node_modules/d3-scale/src/ordinal.js"],"sourcesContent":["export class InternMap extends Map {\n constructor(entries, key = keyof) {\n super();\n Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n if (entries != null) for (const [key, value] of entries) this.set(key, value);\n }\n get(key) {\n return super.get(intern_get(this, key));\n }\n has(key) {\n return super.has(intern_get(this, key));\n }\n set(key, value) {\n return super.set(intern_set(this, key), value);\n }\n delete(key) {\n return super.delete(intern_delete(this, key));\n }\n}\n\nexport class InternSet extends Set {\n constructor(values, key = keyof) {\n super();\n Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n if (values != null) for (const value of values) this.add(value);\n }\n has(value) {\n return super.has(intern_get(this, value));\n }\n add(value) {\n return super.add(intern_set(this, value));\n }\n delete(value) {\n return super.delete(intern_delete(this, value));\n }\n}\n\nfunction intern_get({_intern, _key}, value) {\n const key = _key(value);\n return _intern.has(key) ? _intern.get(key) : value;\n}\n\nfunction intern_set({_intern, _key}, value) {\n const key = _key(value);\n if (_intern.has(key)) return _intern.get(key);\n _intern.set(key, value);\n return value;\n}\n\nfunction intern_delete({_intern, _key}, value) {\n const key = _key(value);\n if (_intern.has(key)) {\n value = _intern.get(key);\n _intern.delete(key);\n }\n return value;\n}\n\nfunction keyof(value) {\n return value !== null && typeof value === \"object\" ? value.valueOf() : value;\n}\n","import {InternMap} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport const implicit = Symbol(\"implicit\");\n\nexport default function ordinal() {\n var index = new InternMap(),\n domain = [],\n range = [],\n unknown = implicit;\n\n function scale(d) {\n let i = index.get(d);\n if (i === undefined) {\n if (unknown !== implicit) return unknown;\n index.set(d, i = domain.push(d) - 1);\n }\n return range[i % range.length];\n }\n\n scale.domain = function(_) {\n if (!arguments.length) return domain.slice();\n domain = [], index = new InternMap();\n for (const value of _) {\n if (index.has(value)) continue;\n index.set(value, domain.push(value) - 1);\n }\n return scale;\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), scale) : range.slice();\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.copy = function() {\n return ordinal(domain, range).unknown(unknown);\n };\n\n initRange.apply(scale, arguments);\n\n return scale;\n}\n"],"names":["InternMap","entries","key","keyof","value","intern_get","intern_set","intern_delete","_intern","_key","implicit","ordinal","index","domain","range","unknown","scale","d","i","_","initRange"],"mappings":";8CAAO,MAAMA,UAAkB,GAAI,CACjC,YAAYC,EAASC,EAAMC,EAAO,CAGhC,GAFA,QACA,OAAO,iBAAiB,KAAM,CAAC,QAAS,CAAC,MAAO,IAAI,GAAK,EAAG,KAAM,CAAC,MAAOD,CAAG,CAAC,CAAC,EAC3ED,GAAW,KAAM,SAAW,CAACC,EAAKE,CAAK,IAAKH,EAAS,KAAK,IAAIC,EAAKE,CAAK,CAC7E,CACD,IAAIF,EAAK,CACP,OAAO,MAAM,IAAIG,EAAW,KAAMH,CAAG,CAAC,CACvC,CACD,IAAIA,EAAK,CACP,OAAO,MAAM,IAAIG,EAAW,KAAMH,CAAG,CAAC,CACvC,CACD,IAAIA,EAAKE,EAAO,CACd,OAAO,MAAM,IAAIE,EAAW,KAAMJ,CAAG,EAAGE,CAAK,CAC9C,CACD,OAAOF,EAAK,CACV,OAAO,MAAM,OAAOK,EAAc,KAAML,CAAG,CAAC,CAC7C,CACH,CAmBA,SAASG,EAAW,CAAC,QAAAG,EAAS,KAAAC,CAAI,EAAGL,EAAO,CAC1C,MAAMF,EAAMO,EAAKL,CAAK,EACtB,OAAOI,EAAQ,IAAIN,CAAG,EAAIM,EAAQ,IAAIN,CAAG,EAAIE,CAC/C,CAEA,SAASE,EAAW,CAAC,QA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