@@ -8109,6 +8109,8 @@ const Range = __nccwpck_require__(9828)
81098109/***/ 9828:
81108110/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
81118111
8112+ const SPACE_CHARACTERS = /\s+/g
8113+
81128114// hoisted class for cyclic dependency
81138115class Range {
81148116 constructor (range, options) {
@@ -8129,7 +8131,7 @@ class Range {
81298131 // just put it in the set and return
81308132 this.raw = range.value
81318133 this.set = [[range]]
8132- this.format()
8134+ this.formatted = undefined
81338135 return this
81348136 }
81358137
@@ -8140,10 +8142,7 @@ class Range {
81408142 // First reduce all whitespace as much as possible so we do not have to rely
81418143 // on potentially slow regexes like \s*. This is then stored and used for
81428144 // future error messages as well.
8143- this.raw = range
8144- .trim()
8145- .split(/\s+/)
8146- .join(' ')
8145+ this.raw = range.trim().replace(SPACE_CHARACTERS, ' ')
81478146
81488147 // First, split on ||
81498148 this.set = this.raw
@@ -8177,14 +8176,29 @@ class Range {
81778176 }
81788177 }
81798178
8180- this.format()
8179+ this.formatted = undefined
8180+ }
8181+
8182+ get range () {
8183+ if (this.formatted === undefined) {
8184+ this.formatted = ''
8185+ for (let i = 0; i < this.set.length; i++) {
8186+ if (i > 0) {
8187+ this.formatted += '||'
8188+ }
8189+ const comps = this.set[i]
8190+ for (let k = 0; k < comps.length; k++) {
8191+ if (k > 0) {
8192+ this.formatted += ' '
8193+ }
8194+ this.formatted += comps[k].toString().trim()
8195+ }
8196+ }
8197+ }
8198+ return this.formatted
81818199 }
81828200
81838201 format () {
8184- this.range = this.set
8185- .map((comps) => comps.join(' ').trim())
8186- .join('||')
8187- .trim()
81888202 return this.range
81898203 }
81908204
0 commit comments