1/*
2 * Copyright (c) 2024 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16const overrideMap = new Map();
17overrideMap.set(
18  'ArkCheckboxComponent',
19  new Map([
20    ['Symbol(width)', CheckboxWidthModifier],
21    ['Symbol(height)', CheckboxHeightModifier],
22  ])
23);
24overrideMap.set(
25  'ArkTextComponent',
26  new Map([
27    ['Symbol(foregroundColor)', TextForegroundColorModifier]
28  ])
29);
30function applyAndMergeModifier(instance, modifier) {
31  let myMap = modifier._modifiersWithKeys;
32  myMap.setOnChange((key, value) => {
33    modifier._changed = !modifier._changed;
34  });
35  let component = instance;
36  mergeMaps(component._modifiersWithKeys, modifier._modifiersWithKeys);
37}
38function copyModifierWithKey(obj) {
39  let newObj = { ...obj };
40  newObj.applyStage = obj === null || obj === void 0 ? void 0 : obj.applyStage;
41  newObj.applyPeer = obj === null || obj === void 0 ? void 0 : obj.applyPeer;
42  newObj.checkObjectDiff = obj === null || obj === void 0 ? void 0 : obj.checkObjectDiff;
43  return newObj;
44}
45function mergeMaps(stageMap, newMap) {
46  newMap.forEach((value, key) => {
47    stageMap.set(key, copyModifierWithKey(value));
48  });
49  return stageMap;
50}
51class ModifierUtils {
52  static copyModifierWithKey(obj) {
53    let newObj = { ...obj };
54    newObj.applyStage = obj === null || obj === void 0 ? void 0 : obj.applyStage;
55    newObj.applyPeer = obj === null || obj === void 0 ? void 0 : obj.applyPeer;
56    newObj.checkObjectDiff = obj === null || obj === void 0 ? void 0 : obj.checkObjectDiff;
57    return newObj;
58  }
59  static mergeMaps(stageMap, newMap) {
60    newMap.forEach((value, key) => {
61      stageMap.set(key, this.copyModifierWithKey(value));
62    });
63  }
64  static mergeMapsEmplace(stageMap, newMap, componentOverrideMap) {
65    newMap.forEach((value, key) => {
66      if (!key) {
67        ArkLogConsole.info('key of modifier map is undefined, ModifierWithKey is ' +
68          (value ? value.constructor.name.toString() : 'undefined'));
69      } else {
70        if (componentOverrideMap.has(key.toString())) {
71          const newValue = new (componentOverrideMap.get(key.toString()))(value.stageValue);
72          stageMap.set(key, newValue);
73        } else {
74          stageMap.set(key, this.copyModifierWithKey(value));
75        }
76      }
77    });
78  }
79  static applyAndMergeModifier(instance, modifier) {
80    let component = instance;
81    if (component.constructor.name && overrideMap.has(component.constructor.name)) {
82      const componentOverrideMap = overrideMap.get(component.constructor.name);
83      this.mergeMapsEmplace(component._modifiersWithKeys, modifier._modifiersWithKeys,
84        componentOverrideMap);
85    } else {
86      this.mergeMaps(component._modifiersWithKeys, modifier._modifiersWithKeys);
87    }
88  }
89  static applySetOnChange(modifier) {
90    // It is to make the stateMgmt can addRef of _changed,
91    // so that the modifier change can be observed by makeObserved when modifier._changed changed.
92    modifier._changed;
93    let myMap = modifier._modifiersWithKeys;
94    if (modifier._classType === ModifierType.STATE) {
95      myMap.setOnChange((key, value) => {
96        this.putDirtyModifier(modifier, value);
97      });
98    } else {
99      myMap.setOnChange((key, value) => {
100        modifier._changed = !modifier._changed;
101      });
102    }
103  }
104  static putDirtyModifier(arkModifier, attributeModifierWithKey) {
105    attributeModifierWithKey.value = attributeModifierWithKey.stageValue;
106    if (!arkModifier._weakPtr.invalid()) {
107      attributeModifierWithKey.applyPeer(arkModifier.nativePtr,
108        (attributeModifierWithKey.value === undefined ||
109          attributeModifierWithKey.value === null)
110      );
111    } else {
112      ArkLogConsole.info('pointer is invalid when putDirtyModifier in ' + (arkModifier ?
113        arkModifier.constructor.name.toString() : 'undefined') + ' of ' + (attributeModifierWithKey ?
114        attributeModifierWithKey.constructor.name.toString() : 'undefined'));
115    }
116    this.dirtyComponentSet.add(arkModifier);
117    if (!this.dirtyFlag) {
118      this.dirtyFlag = true;
119      this.requestFrame();
120    }
121  }
122  static requestFrame() {
123    const frameCallback = () => {
124      if (this.timeoutId !== -1) {
125        clearTimeout(this.timeoutId);
126      }
127      this.dirtyComponentSet.forEach((item) => {
128        const nativePtrValid = !item._weakPtr.invalid();
129        if (item._nativePtrChanged && nativePtrValid) {
130          item._modifiersWithKeys.forEach((value, key) => {
131            value.applyPeer(item.nativePtr,
132              (value.value === undefined || value.value === null));
133          });
134          item._nativePtrChanged = false;
135        }
136        if (nativePtrValid) {
137          getUINativeModule().frameNode.markDirty(item.nativePtr, 0b100);
138        }
139      });
140      this.dirtyComponentSet.clear();
141      this.dirtyFlag = false;
142      this.timeoutId = -1;
143    };
144    if (this.timeoutId !== -1) {
145      clearTimeout(this.timeoutId);
146    }
147    this.timeoutId = setTimeout(frameCallback, 100);
148    getUINativeModule().frameNode.registerFrameCallback(frameCallback);
149  }
150}
151ModifierUtils.dirtyComponentSet = new Set();
152ModifierUtils.dirtyFlag = false;
153ModifierUtils.timeoutId = -1;
154class ModifierMap {
155  constructor() {
156    this.map_ = new Map();
157  }
158  clear() {
159    this.map_.clear();
160  }
161  delete(key) {
162    return this.map_.delete(key);
163  }
164  forEach(callbackfn, thisArg) {
165    this.map_.forEach(callbackfn, thisArg);
166  }
167  get(key) {
168    return this.map_.get(key);
169  }
170  has(key) {
171    return this.map_.has(key);
172  }
173  set(key, value) {
174    const _a = this.changeCallback;
175    this.map_.set(key, value);
176    _a === null || _a === void 0 ? void 0 : _a(key, value);
177    return this;
178  }
179  get size() {
180    return this.map_.size;
181  }
182  entries() {
183    return this.map_.entries();
184  }
185  keys() {
186    return this.map_.keys();
187  }
188  values() {
189    return this.map_.values();
190  }
191  [Symbol.iterator]() {
192    return this.map_.entries();
193  }
194  get [Symbol.toStringTag]() {
195    return 'ModifierMapTag';
196  }
197  setOnChange(callback) {
198    this.changeCallback = callback;
199  }
200}
201class AttributeUpdater {
202  constructor() {
203    this._state = AttributeUpdater.StateEnum.INIT;
204    this._attribute = null;
205    this._isAttributeUpdater = true;
206  }
207  get isAttributeUpdater() {
208    return this._isAttributeUpdater;
209  }
210  get attribute() {
211    return this._attribute;
212  }
213  set attribute(value) {
214    if (!this._attribute && value) {
215      this._attribute = value;
216    }
217  }
218  get modifierState() {
219    return this._state;
220  }
221  set modifierState(value) {
222    this._state = value;
223  }
224  initializeModifier(instance) {}
225  onComponentChanged(instance) {}
226  updateConstructorParams(...args) {
227    if (!this.attribute) {
228      ArkLogConsole.info('AttributeUpdater has not been initialized before updateConstructorParams.');
229      return;
230    }
231    this.attribute.initialize(args);
232  }
233}
234AttributeUpdater.StateEnum = {
235  INIT: 0,
236  UPDATE: 1,
237};
238class CommonModifier extends ArkComponent {
239  constructor(nativePtr, classType) {
240    if (!classType) {
241      classType = ModifierType.EXPOSE_MODIFIER;
242    }
243    super(nativePtr, classType);
244  }
245  applyNormalAttribute(instance) {
246    ModifierUtils.applySetOnChange(this);
247    ModifierUtils.applyAndMergeModifier(instance, this);
248  }
249}
250class AlphabetIndexerModifier extends ArkAlphabetIndexerComponent {
251  constructor(nativePtr, classType) {
252    super(nativePtr, classType);
253    this._modifiersWithKeys = new ModifierMap();
254  }
255  applyNormalAttribute(instance) {
256    ModifierUtils.applySetOnChange(this);
257    ModifierUtils.applyAndMergeModifier(instance, this);
258  }
259}
260class BlankModifier extends ArkBlankComponent {
261  constructor(nativePtr, classType) {
262    super(nativePtr, classType);
263    this._modifiersWithKeys = new ModifierMap();
264  }
265  applyNormalAttribute(instance) {
266    ModifierUtils.applySetOnChange(this);
267    ModifierUtils.applyAndMergeModifier(instance, this);
268  }
269}
270class ButtonModifier extends ArkButtonComponent {
271  constructor(nativePtr, classType) {
272    super(nativePtr, classType);
273    this._modifiersWithKeys = new ModifierMap();
274  }
275  applyNormalAttribute(instance) {
276    ModifierUtils.applySetOnChange(this);
277    ModifierUtils.applyAndMergeModifier(instance, this);
278  }
279}
280class CalendarPickerModifier extends ArkCalendarPickerComponent {
281  constructor(nativePtr, classType) {
282    super(nativePtr, classType);
283    this._modifiersWithKeys = new ModifierMap();
284  }
285  applyNormalAttribute(instance) {
286    ModifierUtils.applySetOnChange(this);
287    ModifierUtils.applyAndMergeModifier(instance, this);
288  }
289}
290class CheckboxModifier extends ArkCheckboxComponent {
291  constructor(nativePtr, classType) {
292    super(nativePtr, classType);
293    this._modifiersWithKeys = new ModifierMap();
294  }
295  applyNormalAttribute(instance) {
296    ModifierUtils.applySetOnChange(this);
297    ModifierUtils.applyAndMergeModifier(instance, this);
298  }
299}
300class CheckboxGroupModifier extends ArkCheckboxGroupComponent {
301  constructor(nativePtr, classType) {
302    super(nativePtr, classType);
303    this._modifiersWithKeys = new ModifierMap();
304  }
305  applyNormalAttribute(instance) {
306    ModifierUtils.applySetOnChange(this);
307    ModifierUtils.applyAndMergeModifier(instance, this);
308  }
309}
310class CircleModifier extends ArkCircleComponent {
311  constructor(nativePtr, classType) {
312    super(nativePtr, classType);
313    this._modifiersWithKeys = new ModifierMap();
314  }
315  applyNormalAttribute(instance) {
316    ModifierUtils.applySetOnChange(this);
317    ModifierUtils.applyAndMergeModifier(instance, this);
318  }
319}
320class ColumnModifier extends ArkColumnComponent {
321  constructor(nativePtr, classType) {
322    super(nativePtr, classType);
323    this._modifiersWithKeys = new ModifierMap();
324  }
325  applyNormalAttribute(instance) {
326    ModifierUtils.applySetOnChange(this);
327    ModifierUtils.applyAndMergeModifier(instance, this);
328  }
329}
330class ColumnSplitModifier extends ArkColumnSplitComponent {
331  constructor(nativePtr, classType) {
332    super(nativePtr, classType);
333    this._modifiersWithKeys = new ModifierMap();
334  }
335  applyNormalAttribute(instance) {
336    ModifierUtils.applySetOnChange(this);
337    ModifierUtils.applyAndMergeModifier(instance, this);
338  }
339}
340class CounterModifier extends ArkCounterComponent {
341  constructor(nativePtr, classType) {
342    super(nativePtr, classType);
343    this._modifiersWithKeys = new ModifierMap();
344  }
345  applyNormalAttribute(instance) {
346    ModifierUtils.applySetOnChange(this);
347    ModifierUtils.applyAndMergeModifier(instance, this);
348  }
349}
350class DataPanelModifier extends ArkDataPanelComponent {
351  constructor(nativePtr, classType) {
352    super(nativePtr, classType);
353    this._modifiersWithKeys = new ModifierMap();
354  }
355  applyNormalAttribute(instance) {
356    ModifierUtils.applySetOnChange(this);
357    ModifierUtils.applyAndMergeModifier(instance, this);
358  }
359}
360class DatePickerModifier extends ArkDatePickerComponent {
361  constructor(nativePtr, classType) {
362    super(nativePtr, classType);
363    this._modifiersWithKeys = new ModifierMap();
364  }
365  applyNormalAttribute(instance) {
366    ModifierUtils.applySetOnChange(this);
367    ModifierUtils.applyAndMergeModifier(instance, this);
368  }
369}
370class DividerModifier extends ArkDividerComponent {
371  constructor(nativePtr, classType) {
372    super(nativePtr, classType);
373    this._modifiersWithKeys = new ModifierMap();
374  }
375  applyNormalAttribute(instance) {
376    ModifierUtils.applySetOnChange(this);
377    ModifierUtils.applyAndMergeModifier(instance, this);
378  }
379}
380class FlexModifier extends ArkFlexComponent {
381  constructor(nativePtr, classType) {
382    super(nativePtr, classType);
383    this._modifiersWithKeys = new ModifierMap();
384  }
385  applyNormalAttribute(instance) {
386    ModifierUtils.applySetOnChange(this);
387    ModifierUtils.applyAndMergeModifier(instance, this);
388  }
389}
390class FormComponentModifier extends ArkFormComponentComponent {
391  constructor(nativePtr, classType) {
392    super(nativePtr, classType);
393    this._modifiersWithKeys = new ModifierMap();
394  }
395  applyNormalAttribute(instance) {
396    ModifierUtils.applySetOnChange(this);
397    ModifierUtils.applyAndMergeModifier(instance, this);
398  }
399}
400class GaugeModifier extends ArkGaugeComponent {
401  constructor(nativePtr, classType) {
402    super(nativePtr, classType);
403    this._modifiersWithKeys = new ModifierMap();
404  }
405  applyNormalAttribute(instance) {
406    ModifierUtils.applySetOnChange(this);
407    ModifierUtils.applyAndMergeModifier(instance, this);
408  }
409}
410class GridModifier extends ArkGridComponent {
411  constructor(nativePtr, classType) {
412    super(nativePtr, classType);
413    this._modifiersWithKeys = new ModifierMap();
414  }
415  applyNormalAttribute(instance) {
416    ModifierUtils.applySetOnChange(this);
417    ModifierUtils.applyAndMergeModifier(instance, this);
418  }
419}
420class GridColModifier extends ArkGridColComponent {
421  constructor(nativePtr, classType) {
422    super(nativePtr, classType);
423    this._modifiersWithKeys = new ModifierMap();
424  }
425  applyNormalAttribute(instance) {
426    ModifierUtils.applySetOnChange(this);
427    ModifierUtils.applyAndMergeModifier(instance, this);
428  }
429}
430class GridItemModifier extends ArkGridItemComponent {
431  constructor(nativePtr, classType) {
432    super(nativePtr, classType);
433    this._modifiersWithKeys = new ModifierMap();
434  }
435  applyNormalAttribute(instance) {
436    ModifierUtils.applySetOnChange(this);
437    ModifierUtils.applyAndMergeModifier(instance, this);
438  }
439}
440class GridRowModifier extends ArkGridRowComponent {
441  constructor(nativePtr, classType) {
442    super(nativePtr, classType);
443    this._modifiersWithKeys = new ModifierMap();
444  }
445  applyNormalAttribute(instance) {
446    ModifierUtils.applySetOnChange(this);
447    ModifierUtils.applyAndMergeModifier(instance, this);
448  }
449}
450class HyperlinkModifier extends ArkHyperlinkComponent {
451  constructor(nativePtr, classType) {
452    super(nativePtr, classType);
453    this._modifiersWithKeys = new ModifierMap();
454  }
455  applyNormalAttribute(instance) {
456    ModifierUtils.applySetOnChange(this);
457    ModifierUtils.applyAndMergeModifier(instance, this);
458  }
459}
460function copyImageAnimatorModifierWithKey(obj) {
461  let _a;
462  let _b;
463  let newObj = { ...obj };
464  if (obj.convertImageFrames !== undefined) {
465    newObj.convertImageFrames = (_a = obj) === null || _a === void 0 ? void 0 : _a.convertImageFrames;
466    newObj.isEqual = (_b = obj) === null || _b === void 0 ? void 0 : _b.isEqual;
467  }
468  newObj.applyStage = obj === null || obj === void 0 ? void 0 : obj.applyStage;
469  newObj.applyPeer = obj === null || obj === void 0 ? void 0 : obj.applyPeer;
470  newObj.checkObjectDiff = obj === null || obj === void 0 ? void 0 : obj.checkObjectDiff;
471  return newObj;
472}
473function mergeImageAnimatorMaps(stageMap, newMap) {
474  newMap.forEach((value, key) => {
475    stageMap.set(key, copyImageAnimatorModifierWithKey(value));
476  });
477  return stageMap;
478}
479class ImageAnimatorModifier extends ArkImageAnimatorComponent {
480  constructor(nativePtr, classType) {
481    super(nativePtr, classType);
482    this._modifiersWithKeys = new ModifierMap();
483  }
484  applyNormalAttribute(instance) {
485    ModifierUtils.applySetOnChange(this);
486    let component = instance;
487    mergeImageAnimatorMaps(component._modifiersWithKeys, this._modifiersWithKeys);
488  }
489}
490class ImageModifier extends ArkImageComponent {
491  constructor(nativePtr, classType) {
492    super(nativePtr, classType);
493    this._modifiersWithKeys = new ModifierMap();
494  }
495  applyNormalAttribute(instance) {
496    ModifierUtils.applySetOnChange(this);
497    ModifierUtils.applyAndMergeModifier(instance, this);
498  }
499}
500class ImageSpanModifier extends ArkImageSpanComponent {
501  constructor(nativePtr, classType) {
502    super(nativePtr, classType);
503    this._modifiersWithKeys = new ModifierMap();
504  }
505  applyNormalAttribute(instance) {
506    ModifierUtils.applySetOnChange(this);
507    ModifierUtils.applyAndMergeModifier(instance, this);
508  }
509}
510class LineModifier extends ArkLineComponent {
511  constructor(nativePtr, classType) {
512    super(nativePtr, classType);
513    this._modifiersWithKeys = new ModifierMap();
514  }
515  applyNormalAttribute(instance) {
516    ModifierUtils.applySetOnChange(this);
517    ModifierUtils.applyAndMergeModifier(instance, this);
518  }
519}
520class ListModifier extends ArkListComponent {
521  constructor(nativePtr, classType) {
522    super(nativePtr, classType);
523    this._modifiersWithKeys = new ModifierMap();
524  }
525  applyNormalAttribute(instance) {
526    ModifierUtils.applySetOnChange(this);
527    ModifierUtils.applyAndMergeModifier(instance, this);
528  }
529}
530class ListItemModifier extends ArkListItemComponent {
531  constructor(nativePtr, classType) {
532    super(nativePtr, classType);
533    this._modifiersWithKeys = new ModifierMap();
534  }
535  applyNormalAttribute(instance) {
536    ModifierUtils.applySetOnChange(this);
537    ModifierUtils.applyAndMergeModifier(instance, this);
538  }
539}
540class ListItemGroupModifier extends ArkListItemGroupComponent {
541  constructor(nativePtr, classType) {
542    super(nativePtr, classType);
543    this._modifiersWithKeys = new ModifierMap();
544  }
545  applyNormalAttribute(instance) {
546    ModifierUtils.applySetOnChange(this);
547    ModifierUtils.applyAndMergeModifier(instance, this);
548  }
549}
550class LoadingProgressModifier extends ArkLoadingProgressComponent {
551  constructor(nativePtr, classType) {
552    super(nativePtr, classType);
553    this._modifiersWithKeys = new ModifierMap();
554  }
555  applyNormalAttribute(instance) {
556    ModifierUtils.applySetOnChange(this);
557    ModifierUtils.applyAndMergeModifier(instance, this);
558  }
559}
560class MarqueeModifier extends ArkMarqueeComponent {
561  constructor(nativePtr, classType) {
562    super(nativePtr, classType);
563    this._modifiersWithKeys = new ModifierMap();
564  }
565  applyNormalAttribute(instance) {
566    ModifierUtils.applySetOnChange(this);
567    ModifierUtils.applyAndMergeModifier(instance, this);
568  }
569}
570class MenuModifier extends ArkMenuComponent {
571  constructor(nativePtr, classType) {
572    super(nativePtr, classType);
573    this._modifiersWithKeys = new ModifierMap();
574  }
575  applyNormalAttribute(instance) {
576    ModifierUtils.applySetOnChange(this);
577    ModifierUtils.applyAndMergeModifier(instance, this);
578  }
579}
580class MenuItemModifier extends ArkMenuItemComponent {
581  constructor(nativePtr, classType) {
582    super(nativePtr, classType);
583    this._modifiersWithKeys = new ModifierMap();
584  }
585  applyNormalAttribute(instance) {
586    ModifierUtils.applySetOnChange(this);
587    ModifierUtils.applyAndMergeModifier(instance, this);
588  }
589}
590class NavDestinationModifier extends ArkNavDestinationComponent {
591  constructor(nativePtr, classType) {
592    super(nativePtr, classType);
593    this._modifiersWithKeys = new ModifierMap();
594  }
595  applyNormalAttribute(instance) {
596    ModifierUtils.applySetOnChange(this);
597    ModifierUtils.applyAndMergeModifier(instance, this);
598  }
599}
600class NavigationModifier extends ArkNavigationComponent {
601  constructor(nativePtr, classType) {
602    super(nativePtr, classType);
603    this._modifiersWithKeys = new ModifierMap();
604  }
605  applyNormalAttribute(instance) {
606    ModifierUtils.applySetOnChange(this);
607    ModifierUtils.applyAndMergeModifier(instance, this);
608  }
609}
610class NavigatorModifier extends ArkNavigatorComponent {
611  constructor(nativePtr, classType) {
612    super(nativePtr, classType);
613    this._modifiersWithKeys = new ModifierMap();
614  }
615  applyNormalAttribute(instance) {
616    ModifierUtils.applySetOnChange(this);
617    ModifierUtils.applyAndMergeModifier(instance, this);
618  }
619}
620class NavRouterModifier extends ArkNavRouterComponent {
621  constructor(nativePtr, classType) {
622    super(nativePtr, classType);
623    this._modifiersWithKeys = new ModifierMap();
624  }
625  applyNormalAttribute(instance) {
626    ModifierUtils.applySetOnChange(this);
627    ModifierUtils.applyAndMergeModifier(instance, this);
628  }
629}
630class PanelModifier extends ArkPanelComponent {
631  constructor(nativePtr, classType) {
632    super(nativePtr, classType);
633    this._modifiersWithKeys = new ModifierMap();
634  }
635  applyNormalAttribute(instance) {
636    ModifierUtils.applySetOnChange(this);
637    ModifierUtils.applyAndMergeModifier(instance, this);
638  }
639}
640class PathModifier extends ArkPathComponent {
641  constructor(nativePtr, classType) {
642    super(nativePtr, classType);
643    this._modifiersWithKeys = new ModifierMap();
644  }
645  applyNormalAttribute(instance) {
646    ModifierUtils.applySetOnChange(this);
647    ModifierUtils.applyAndMergeModifier(instance, this);
648  }
649}
650class PatternLockModifier extends ArkPatternLockComponent {
651  constructor(nativePtr, classType) {
652    super(nativePtr, classType);
653    this._modifiersWithKeys = new ModifierMap();
654  }
655  applyNormalAttribute(instance) {
656    ModifierUtils.applySetOnChange(this);
657    ModifierUtils.applyAndMergeModifier(instance, this);
658  }
659}
660class PluginComponentModifier extends ArkPluginComponent {
661  constructor(nativePtr, classType) {
662    super(nativePtr, classType);
663    this._modifiersWithKeys = new ModifierMap();
664  }
665  applyNormalAttribute(instance) {
666    ModifierUtils.applySetOnChange(this);
667    ModifierUtils.applyAndMergeModifier(instance, this);
668  }
669}
670class PolygonModifier extends ArkPolygonComponent {
671  constructor(nativePtr, classType) {
672    super(nativePtr, classType);
673    this._modifiersWithKeys = new ModifierMap();
674  }
675  applyNormalAttribute(instance) {
676    ModifierUtils.applySetOnChange(this);
677    ModifierUtils.applyAndMergeModifier(instance, this);
678  }
679}
680class PolylineModifier extends ArkPolylineComponent {
681  constructor(nativePtr, classType) {
682    super(nativePtr, classType);
683    this._modifiersWithKeys = new ModifierMap();
684  }
685  applyNormalAttribute(instance) {
686    ModifierUtils.applySetOnChange(this);
687    ModifierUtils.applyAndMergeModifier(instance, this);
688  }
689}
690class ProgressModifier extends ArkProgressComponent {
691  constructor(nativePtr, classType) {
692    super(nativePtr, classType);
693    this._modifiersWithKeys = new ModifierMap();
694  }
695  applyNormalAttribute(instance) {
696    ModifierUtils.applySetOnChange(this);
697    ModifierUtils.applyAndMergeModifier(instance, this);
698  }
699}
700class QRCodeModifier extends ArkQRCodeComponent {
701  constructor(nativePtr, classType) {
702    super(nativePtr, classType);
703    this._modifiersWithKeys = new ModifierMap();
704  }
705  applyNormalAttribute(instance) {
706    ModifierUtils.applySetOnChange(this);
707    ModifierUtils.applyAndMergeModifier(instance, this);
708  }
709}
710class RadioModifier extends ArkRadioComponent {
711  constructor(nativePtr, classType) {
712    super(nativePtr, classType);
713    this._modifiersWithKeys = new ModifierMap();
714  }
715  applyNormalAttribute(instance) {
716    ModifierUtils.applySetOnChange(this);
717    ModifierUtils.applyAndMergeModifier(instance, this);
718  }
719}
720class RatingModifier extends ArkRatingComponent {
721  constructor(nativePtr, classType) {
722    super(nativePtr, classType);
723    this._modifiersWithKeys = new ModifierMap();
724  }
725  applyNormalAttribute(instance) {
726    ModifierUtils.applySetOnChange(this);
727    ModifierUtils.applyAndMergeModifier(instance, this);
728  }
729}
730class RectModifier extends ArkRectComponent {
731  constructor(nativePtr, classType) {
732    super(nativePtr, classType);
733    this._modifiersWithKeys = new ModifierMap();
734  }
735  applyNormalAttribute(instance) {
736    ModifierUtils.applySetOnChange(this);
737    ModifierUtils.applyAndMergeModifier(instance, this);
738  }
739}
740class RefreshModifier extends ArkRefreshComponent {
741  constructor(nativePtr, classType) {
742    super(nativePtr, classType);
743    this._modifiersWithKeys = new ModifierMap();
744  }
745  applyNormalAttribute(instance) {
746    ModifierUtils.applySetOnChange(this);
747    ModifierUtils.applyAndMergeModifier(instance, this);
748  }
749}
750class RelativeContainerModifier extends ArkRelativeContainerComponent {
751  constructor(nativePtr, classType) {
752    super(nativePtr, classType);
753    this._modifiersWithKeys = new ModifierMap();
754  }
755  applyNormalAttribute(instance) {
756    ModifierUtils.applySetOnChange(this);
757    ModifierUtils.applyAndMergeModifier(instance, this);
758  }
759}
760class RichEditorModifier extends ArkRichEditorComponent {
761  constructor(nativePtr, classType) {
762    super(nativePtr, classType);
763    this._modifiersWithKeys = new ModifierMap();
764  }
765  applyNormalAttribute(instance) {
766    ModifierUtils.applySetOnChange(this);
767    ModifierUtils.applyAndMergeModifier(instance, this);
768  }
769}
770class RowModifier extends ArkRowComponent {
771  constructor(nativePtr, classType) {
772    super(nativePtr, classType);
773    this._modifiersWithKeys = new ModifierMap();
774  }
775  applyNormalAttribute(instance) {
776    ModifierUtils.applySetOnChange(this);
777    ModifierUtils.applyAndMergeModifier(instance, this);
778  }
779}
780class RowSplitModifier extends ArkRowSplitComponent {
781  constructor(nativePtr, classType) {
782    super(nativePtr, classType);
783    this._modifiersWithKeys = new ModifierMap();
784  }
785  applyNormalAttribute(instance) {
786    ModifierUtils.applySetOnChange(this);
787    ModifierUtils.applyAndMergeModifier(instance, this);
788  }
789}
790class ScrollModifier extends ArkScrollComponent {
791  constructor(nativePtr, classType) {
792    super(nativePtr, classType);
793    this._modifiersWithKeys = new ModifierMap();
794  }
795  applyNormalAttribute(instance) {
796    ModifierUtils.applySetOnChange(this);
797    ModifierUtils.applyAndMergeModifier(instance, this);
798  }
799}
800class SearchModifier extends ArkSearchComponent {
801  constructor(nativePtr, classType) {
802    super(nativePtr, classType);
803    this._modifiersWithKeys = new ModifierMap();
804  }
805  applyNormalAttribute(instance) {
806    ModifierUtils.applySetOnChange(this);
807    ModifierUtils.applyAndMergeModifier(instance, this);
808  }
809}
810class SelectModifier extends ArkSelectComponent {
811  constructor(nativePtr, classType) {
812    super(nativePtr, classType);
813    this._modifiersWithKeys = new ModifierMap();
814  }
815  applyNormalAttribute(instance) {
816    ModifierUtils.applySetOnChange(this);
817    ModifierUtils.applyAndMergeModifier(instance, this);
818  }
819}
820class ShapeModifier extends ArkShapeComponent {
821  constructor(nativePtr, classType) {
822    super(nativePtr, classType);
823    this._modifiersWithKeys = new ModifierMap();
824  }
825  applyNormalAttribute(instance) {
826    ModifierUtils.applySetOnChange(this);
827    ModifierUtils.applyAndMergeModifier(instance, this);
828  }
829}
830class SideBarContainerModifier extends ArkSideBarContainerComponent {
831  constructor(nativePtr, classType) {
832    super(nativePtr, classType);
833    this._modifiersWithKeys = new ModifierMap();
834  }
835  applyNormalAttribute(instance) {
836    ModifierUtils.applySetOnChange(this);
837    ModifierUtils.applyAndMergeModifier(instance, this);
838  }
839}
840class SliderModifier extends ArkSliderComponent {
841  constructor(nativePtr, classType) {
842    super(nativePtr, classType);
843    this._modifiersWithKeys = new ModifierMap();
844  }
845  applyNormalAttribute(instance) {
846    ModifierUtils.applySetOnChange(this);
847    ModifierUtils.applyAndMergeModifier(instance, this);
848  }
849}
850class SpanModifier extends ArkSpanComponent {
851  constructor(nativePtr, classType) {
852    super(nativePtr, classType);
853    this._modifiersWithKeys = new ModifierMap();
854  }
855  applyNormalAttribute(instance) {
856    ModifierUtils.applySetOnChange(this);
857    ModifierUtils.applyAndMergeModifier(instance, this);
858  }
859}
860class StackModifier extends ArkStackComponent {
861  constructor(nativePtr, classType) {
862    super(nativePtr, classType);
863    this._modifiersWithKeys = new ModifierMap();
864  }
865  applyNormalAttribute(instance) {
866    ModifierUtils.applySetOnChange(this);
867    ModifierUtils.applyAndMergeModifier(instance, this);
868  }
869}
870class StepperItemModifier extends ArkStepperItemComponent {
871  constructor(nativePtr, classType) {
872    super(nativePtr, classType);
873    this._modifiersWithKeys = new ModifierMap();
874  }
875  applyNormalAttribute(instance) {
876    ModifierUtils.applySetOnChange(this);
877    ModifierUtils.applyAndMergeModifier(instance, this);
878  }
879}
880class SwiperModifier extends ArkSwiperComponent {
881  constructor(nativePtr, classType) {
882    super(nativePtr, classType);
883    this._modifiersWithKeys = new ModifierMap();
884  }
885  applyNormalAttribute(instance) {
886    ModifierUtils.applySetOnChange(this);
887    ModifierUtils.applyAndMergeModifier(instance, this);
888  }
889}
890class TabContentModifier extends ArkTabContentComponent {
891  constructor(nativePtr, classType) {
892    super(nativePtr, classType);
893    this._modifiersWithKeys = new ModifierMap();
894  }
895  applyNormalAttribute(instance) {
896    ModifierUtils.applySetOnChange(this);
897    ModifierUtils.applyAndMergeModifier(instance, this);
898  }
899}
900class TabsModifier extends ArkTabsComponent {
901  constructor(nativePtr, classType) {
902    super(nativePtr, classType);
903    this._modifiersWithKeys = new ModifierMap();
904  }
905  applyNormalAttribute(instance) {
906    ModifierUtils.applySetOnChange(this);
907    ModifierUtils.applyAndMergeModifier(instance, this);
908  }
909}
910class TextAreaModifier extends ArkTextAreaComponent {
911  constructor(nativePtr, classType) {
912    super(nativePtr, classType);
913    this._modifiersWithKeys = new ModifierMap();
914  }
915  applyNormalAttribute(instance) {
916    ModifierUtils.applySetOnChange(this);
917    ModifierUtils.applyAndMergeModifier(instance, this);
918  }
919}
920class TextModifier extends ArkTextComponent {
921  constructor(nativePtr, classType) {
922    super(nativePtr, classType);
923    this._modifiersWithKeys = new ModifierMap();
924  }
925  applyNormalAttribute(instance) {
926    ModifierUtils.applySetOnChange(this);
927    ModifierUtils.applyAndMergeModifier(instance, this);
928  }
929}
930class TextClockModifier extends ArkTextClockComponent {
931  constructor(nativePtr, classType) {
932    super(nativePtr, classType);
933    this._modifiersWithKeys = new ModifierMap();
934  }
935  applyNormalAttribute(instance) {
936    ModifierUtils.applySetOnChange(this);
937    ModifierUtils.applyAndMergeModifier(instance, this);
938  }
939}
940class TextInputModifier extends ArkTextInputComponent {
941  constructor(nativePtr, classType) {
942    super(nativePtr, classType);
943    this._modifiersWithKeys = new ModifierMap();
944  }
945  applyNormalAttribute(instance) {
946    ModifierUtils.applySetOnChange(this);
947    ModifierUtils.applyAndMergeModifier(instance, this);
948  }
949}
950class TextPickerModifier extends ArkTextPickerComponent {
951  constructor(nativePtr, classType) {
952    super(nativePtr, classType);
953    this._modifiersWithKeys = new ModifierMap();
954  }
955  applyNormalAttribute(instance) {
956    ModifierUtils.applySetOnChange(this);
957    ModifierUtils.applyAndMergeModifier(instance, this);
958  }
959}
960class TextTimerModifier extends ArkTextTimerComponent {
961  constructor(nativePtr, classType) {
962    super(nativePtr, classType);
963    this._modifiersWithKeys = new ModifierMap();
964  }
965  applyNormalAttribute(instance) {
966    ModifierUtils.applySetOnChange(this);
967    ModifierUtils.applyAndMergeModifier(instance, this);
968  }
969}
970class TimePickerModifier extends ArkTimePickerComponent {
971  constructor(nativePtr, classType) {
972    super(nativePtr, classType);
973    this._modifiersWithKeys = new ModifierMap();
974  }
975  applyNormalAttribute(instance) {
976    ModifierUtils.applySetOnChange(this);
977    ModifierUtils.applyAndMergeModifier(instance, this);
978  }
979}
980class ToggleModifier extends ArkToggleComponent {
981  constructor(nativePtr, classType) {
982    super(nativePtr, classType);
983    this._modifiersWithKeys = new ModifierMap();
984  }
985  applyNormalAttribute(instance) {
986    ModifierUtils.applySetOnChange(this);
987    ModifierUtils.applyAndMergeModifier(instance, this);
988  }
989}
990class VideoModifier extends ArkVideoComponent {
991  constructor(nativePtr, classType) {
992    super(nativePtr, classType);
993    this._modifiersWithKeys = new ModifierMap();
994  }
995  applyNormalAttribute(instance) {
996    ModifierUtils.applySetOnChange(this);
997    ModifierUtils.applyAndMergeModifier(instance, this);
998  }
999}
1000class WaterFlowModifier extends ArkWaterFlowComponent {
1001  constructor(nativePtr, classType) {
1002    super(nativePtr, classType);
1003    this._modifiersWithKeys = new ModifierMap();
1004  }
1005  applyNormalAttribute(instance) {
1006    ModifierUtils.applySetOnChange(this);
1007    ModifierUtils.applyAndMergeModifier(instance, this);
1008  }
1009}
1010class ParticleModifier extends ArkParticleComponent {
1011  constructor(nativePtr, classType) {
1012    super(nativePtr, classType);
1013    this._modifiersWithKeys = new ModifierMap();
1014  }
1015  applyNormalAttribute(instance) {
1016    ModifierUtils.applySetOnChange(this);
1017    ModifierUtils.applyAndMergeModifier(instance, this);
1018  }
1019}
1020
1021class MediaCachedImageModifier extends ArkMediaCachedImageComponent {
1022  constructor(nativePtr, classType) {
1023    super(nativePtr, classType);
1024    this._modifiersWithKeys = new ModifierMap();
1025  }
1026  applyNormalAttribute(instance) {
1027    ModifierUtils.applySetOnChange(this);
1028    ModifierUtils.applyAndMergeModifier(instance, this);
1029  }
1030}
1031
1032class SymbolGlyphModifier extends ArkSymbolGlyphComponent {
1033  constructor(src, nativePtr, classType) {
1034    super(nativePtr, classType);
1035    this._modifiersWithKeys = new ModifierMap();
1036    if (src !== undefined) {
1037      this.initialize([src]);
1038    }
1039  }
1040  applyNormalAttribute(instance) {
1041    ModifierUtils.applySetOnChange(this);
1042    ModifierUtils.applyAndMergeModifier(instance, this);
1043  }
1044}
1045
1046class SymbolSpanModifier extends ArkSymbolSpanComponent {
1047  constructor(src, nativePtr, classType) {
1048    super(nativePtr, classType);
1049    this._modifiersWithKeys = new ModifierMap();
1050    if (src !== undefined) {
1051      this.initialize([src]);
1052    }
1053  }
1054  applyNormalAttribute(instance) {
1055    ModifierUtils.applySetOnChange(this);
1056    ModifierUtils.applyAndMergeModifier(instance, this);
1057  }
1058}
1059
1060class Component3DModifier extends ArkComponent3DComponent {
1061  constructor(nativePtr, classType) {
1062    super(nativePtr, classType);
1063    this._modifiersWithKeys = new ModifierMap();
1064  }
1065  applyNormalAttribute(instance) {
1066    ModifierUtils.applySetOnChange(this);
1067    ModifierUtils.applyAndMergeModifier(instance, this);
1068  }
1069}
1070
1071class ContainerSpanModifier extends ArkContainerSpanComponent {
1072  constructor(nativePtr, classType) {
1073    super(nativePtr, classType);
1074    this._modifiersWithKeys = new ModifierMap();
1075  }
1076  applyNormalAttribute(instance) {
1077    ModifierUtils.applySetOnChange(this);
1078    ModifierUtils.applyAndMergeModifier(instance, this);
1079  }
1080}
1081
1082export default { CommonModifier, AlphabetIndexerModifier, BlankModifier, ButtonModifier, CalendarPickerModifier, CheckboxModifier, CheckboxGroupModifier, CircleModifier,
1083  ColumnModifier, ColumnSplitModifier, CounterModifier, DataPanelModifier, DatePickerModifier, DividerModifier, FormComponentModifier, GaugeModifier,
1084  GridModifier, GridColModifier, GridItemModifier, GridRowModifier, HyperlinkModifier, ImageAnimatorModifier, ImageModifier, ImageSpanModifier, LineModifier,
1085  ListModifier, ListItemModifier, ListItemGroupModifier, LoadingProgressModifier, MarqueeModifier, MenuModifier, MenuItemModifier, NavDestinationModifier,
1086  NavigationModifier, NavigatorModifier, NavRouterModifier, PanelModifier, PathModifier, PatternLockModifier, PolygonModifier, PolylineModifier,
1087  ProgressModifier, QRCodeModifier, RadioModifier, RatingModifier, RectModifier, RelativeContainerModifier, RichEditorModifier, RowModifier, RowSplitModifier,
1088  ScrollModifier, SearchModifier, SelectModifier, ShapeModifier, SideBarContainerModifier, SliderModifier, SpanModifier, StackModifier, StepperItemModifier,
1089  SwiperModifier, TabsModifier, TextAreaModifier, TextModifier, TextClockModifier, TextInputModifier, TextPickerModifier, TextTimerModifier, TimePickerModifier,
1090  ToggleModifier, VideoModifier, WaterFlowModifier, FlexModifier, PluginComponentModifier, RefreshModifier, TabContentModifier, ModifierUtils, AttributeUpdater,
1091  ParticleModifier, MediaCachedImageModifier, SymbolGlyphModifier, SymbolSpanModifier, Component3DModifier, ContainerSpanModifier };
1092