1 |
- {"ast":null,"code":"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n// Port of lower_bound from https://en.cppreference.com/w/cpp/algorithm/lower_bound\n// Used to compute insertion index to keep queue sorted after insertion\nfunction lowerBound(array, value, comparator) {\n let first = 0;\n let count = array.length;\n while (count > 0) {\n const step = count / 2 | 0;\n let it = first + step;\n if (comparator(array[it], value) <= 0) {\n first = ++it;\n count -= step + 1;\n } else {\n count = step;\n }\n }\n return first;\n}\nexports.default = lowerBound;","map":{"version":3,"names":["Object","defineProperty","exports","value","lowerBound","array","comparator","first","count","length","step","it","default"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/p-queue/dist/lower-bound.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// Port of lower_bound from https://en.cppreference.com/w/cpp/algorithm/lower_bound\n// Used to compute insertion index to keep queue sorted after insertion\nfunction lowerBound(array, value, comparator) {\n let first = 0;\n let count = array.length;\n while (count > 0) {\n const step = (count / 2) | 0;\n let it = first + step;\n if (comparator(array[it], value) <= 0) {\n first = ++it;\n count -= step + 1;\n }\n else {\n count = step;\n }\n }\n return first;\n}\nexports.default = lowerBound;\n"],"mappings":"AAAA,YAAY;;AACZA,MAAM,CAACC,cAAc,CAACC,OAAO,EAAE,YAAY,EAAE;EAAEC,KAAK,EAAE;AAAK,CAAC,CAAC;AAC7D;AACA;AACA,SAASC,UAAUA,CAACC,KAAK,EAAEF,KAAK,EAAEG,UAAU,EAAE;EAC1C,IAAIC,KAAK,GAAG,CAAC;EACb,IAAIC,KAAK,GAAGH,KAAK,CAACI,MAAM;EACxB,OAAOD,KAAK,GAAG,CAAC,EAAE;IACd,MAAME,IAAI,GAAIF,KAAK,GAAG,CAAC,GAAI,CAAC;IAC5B,IAAIG,EAAE,GAAGJ,KAAK,GAAGG,IAAI;IACrB,IAAIJ,UAAU,CAACD,KAAK,CAACM,EAAE,CAAC,EAAER,KAAK,CAAC,IAAI,CAAC,EAAE;MACnCI,KAAK,GAAG,EAAEI,EAAE;MACZH,KAAK,IAAIE,IAAI,GAAG,CAAC;IACrB,CAAC,MACI;MACDF,KAAK,GAAGE,IAAI;IAChB;EACJ;EACA,OAAOH,KAAK;AAChB;AACAL,OAAO,CAACU,OAAO,GAAGR,UAAU","ignoreList":[]},"metadata":{},"sourceType":"script","externalDependencies":[]}
|